[ARM] Optimize code for 0 and int min (#229489)
## Summary
Optimize Thumb-2 code generation for zero tests of values masked by
contiguous low-bit masks. For these tests, shifting the input can
preserve whether the masked value is zero while avoiding a `BIC`.
The four source forms covered by this pattern reduce to one of two
zero-test shapes: an `i32` test or an `i64` test lowered across two
`i32` halves.
## Changes
- Add a helper to recognize eligible single-use ANDs with contiguous low
masks and form an equivalent shifted value for a zero test.
- Apply the transform to Thumb-2 equality and inequality comparisons
against zero, including the OR of halves produced when an `i64`
comparison is lowered.
[24 lines not shown]
[MachineLICM] Don't request BFI analysis if not needed. NFC (#235638)
BFI is only needed in one place, isTgtHotterThanSrc, which is only
called when there's profiling info. Lazily request it to save 0.06%
geomean on stage2-O3:
https://llvm-compile-time-tracker.com/compare.php?from=36c4d811b59c826b416fd66518f406c96829d4be&to=c57789d7ebd8288fe063fd7b33481e88eed80527&stat=instructions:u
I also considered some sort of lambda that's called directly from
isTgtHotterThanSrc, but it turns out that's not NFC as the MachineLICM
can split the preheader before it's called so the BFI analysis returned
is slightly different. Might be worth exploring later.
[RISCV] Lazily request analyses in RISCVGatherScatterLowering and RISCVVLOptimizer. NFC (#235546)
We skip RISCVGatherScatterLowering and RISCVVLOptimizer when there's no
V extension (or fixed length vector support), but after we request any
analyses. So on no-V configurations we'll still end up computing the
analyses. Fetch these lazily so that we don't unnecessarily compute them
in the new PM. The legacy PM will still redundantly compute them.
This also has the benefit that if e.g. there are no gather/scatters in a
function or no instructions with an optimisable VL, we also won't
request the analyses.
[libc] Implement thrd_sleep and thrd_yield in threads (#232919)
Implement the standard C11/C23 thread functions `thrd_sleep` and
`thrd_yield` in `<threads.h>`.
Fixes #232378.
Assisted by Antigravity and reviewed by Aman Maurya.
[AArch64] Support FP atomic stores with memory hints
This patch extends the atomic-store-hint pseudos to accept preserved
floating-point atomic stores. It adds an FPR16 pseudo family and direct
half, bfloat, float, and double patterns for the supported addressing
modes.
The pseudos expand relaxed stores to STR and RCPC3 release and
sequentially consistent stores to STLUR, retaining memory hints without
cross-register-bank copies.
The existing AArch64::ATOMIC_STORE_HINT_H is renamed to
AArch64::ATOMIC_STORE_HINT_HH and AArch64::ATOMIC_STORE_HINT_H now means
FP16 instead of it's old association with integer half-word.
[AArch64] Support direct RCPC3 FP atomic loads and stores
Preserve half, bfloat, float, and double atomic loads and stores
through AtomicExpand for acquire and release orderings, and preserve
sequentially consistent stores, when RCPC3 and NEON are available.
Add SelectionDAG patterns for the RCPC3 LDAPUR and STLUR operations,
including unscaled offsets, and update the existing FP lane patterns to
match the preserved floating-point atomic nodes. Targets without the
required features continue to use integer lowering.
[CIR] Add long_double_size to #cir.lowering_lang_options (#234946)
It represents `LangOpts::LongDoubleSize` which is initialized if
`-mlong-double-*` command line option is present.
Relates to https://github.com/llvm/llvm-project/issues/227917 .
Firewall: Rules - fix decoration magic in searchRuleAction(), partly reverts https://github.com/opnsense/core/commit/c96610594dc770023047441d3657989f6ea9b7ad
Initial the meta fields where added in https://github.com/opnsense/core/pull/9121 because of missing tooltips, but because the $filter_funct_rs method already parsed the data, it was a convenience to place it inside the block (so we only need to loop through the set once).
Given the loop is much cheaper than the filter action added later, we better move this out of there and only return that data to the user for the output he actually receives (after filtering).
[mlir][NVVM] Split enums and attributes out of NVVMDialect.h
Many users of the NVVM dialect outside of the dialect itself only need its
enums and attributes but had to include `NVVMDialect.h`, which pulls in
the declarations of all NVVM ops and their includes.
Add a new `NVVMAttributes.h` header that declares only the NVVM enums and
attributes, and use it where applicable. `NVVMDialect.h` now contains
only the op declarations and drops the includes that are no longer needed.
The definitions were split out of NVVMDialect.cpp as well to keep a
traditional header-source file split.
Co-authored-by: Claude <noreply at anthropic.com>
[unittests] Skip target tests when the default triple is not built
PassBuilder and TargetMachine C API tests FAIL when LLVM_TARGETS_TO_BUILD
excludes the host triple. Skip instead, and avoid tearing down an
uninitialized TargetMachine after a skipped SetUp.
Co-authored-by: Cursor <cursoragent at cursor.com>
[SCEV] Do not consider base pointer defining scope for offset flags in `getGEPExpr` (#222713)
The defining scope of the base pointer of a GEP was previously being
used to infer no-wrap flags on the SCEV sub-expressions for the offset,
which however only depend on the index operands. Ensure the scope
bound for the offset flags is therefore derived from those alone.
Fixes: https://github.com/llvm/llvm-project/issues/221524.
[AArch64] Support direct relaxed FP atomic loads and stores
This patch preserves half, bfloat, float, and double atomic loads and
stores through AtomicExpand when they use unordered or monotonic
ordering and the target supports floating point.
It adds SelectionDAG patterns that select the accesses directly in the
floating-point register bank. Unsupported targets, stronger orderings,
and stores carrying memory hints continue to use integer lowering but
will be handled in the subsequent PRs.
[Analysis] De-templatize TBAANodeImpl and TBAAStructTagNodeImpl (NFC) (#235609)
This patch removes MutableTBAANode and MutableTBAAStructTagNode while
turning TBAANodeImpl and TBAAStructTagNodeImpl into non-template classes
TBAANode and TBAAStructTagNode, respectively.
Note that the last uses of MutableTBAANode and MutableTBAAStructTagNode
were removed on November 3, 2017 in commit
4b77f463d0838bc2bae34b05e2dab9e1d7387dae, leaving TBAANode and
TBAAStructTagNode as the only instantiations of TBAANodeImpl and
TBAAStructTagNodeImpl, respectively.
Assisted-by: Antigravity
[flang] Replace PointerUnion::dyn_cast with llvm::dyn_cast (NFC) (#235608)
PointerUnion::dyn_cast has been soft-deprecated in favor of
llvm::dyn_cast and llvm::dyn_cast_if_present. This patch replaces
PointerUnion::dyn_cast with llvm::dyn_cast.
Note that AliasAnalysis::Source::SourceOrigin::u is always initialized
with nonnull values, and other methods in AliasAnalysis.cpp already
use llvm::dyn_cast and llvm::cast on origin.u.
This patch completes the migration away from PointerUnion::dyn_cast
under flang/.
Assisted-by: Antigravity
[OpenMP] Add runtime selection for metadirective with non-constant conditions. (#192455)
This patch implements runtime evaluation and selection for `OpenMP`
metadirectives when user conditions are non-constant expressions.
[AArch64] Prevent debug instructions and pseudo probes from changing post-RA scheduling (#234920)
A `DBG_VALUE` or `PSEUDO_PROBE` between an ordinary AArch64 instruction
and a
following CFI instruction hides the CFI from
`AArch64InstrInfo::isSchedulingBoundary`. The `PostMachineScheduler` can
then
include the instruction in the preceding region and reorder it, so
non-code
metadata changes the final instruction order.
Look past debug instructions and pseudo probes when finding the
following CFI
boundary. A focused `postmisched` MIR test covers both cases.
This is related to, but distinct from, #36588. That issue concerned CFI
instructions introduced by debug-info emission. Here the CFI boundary is
already present, but an intervening debug instruction or pseudo probe
hides it.
[2 lines not shown]
Refactor and rename variables & functions for clarity
This refactor should make it clearer that CAs are prioritised only if
they were confirmed in the previous run, and improves logic that hinged
upon a timestamp being non-zero.
OK tb@
[JumpTableToSwitch] Call values JT everywhere, rename jump table type to JumpTable (NFC) (#235449)
Currently `expandToSwitch` uses `JT` for what rest of the code calls
`JumpTable`. Call it `JT` everywhere. With this we also drop the
redundant `Ty` suffix in `JumpTableToTy`.
py-xhtml2pdf: updated to 0.2.28
0.2.28
New
Output for print shops: @page { bleed: 3mm; marks: crop cross } grows
the page around its trim size, with a TrimBox and a BleedBox,
backgrounds that reach into the bleed and crop and registration marks
outside it.
device-cmyk() and cmyk() colours in CSS, written to the PDF in
DeviceCMYK.
PDF/X-4: pdfx={"profile": ..., "condition": ...}, or
--pdfx-profile on the command line, adds the output intent, XMP
metadata and page boxes PDF/X asks for, tags RGB as sRGB and draws neutral
greys on the black plate.
A document with bleed, marks or PDF/X logs the images drawn under 300 ppi
and the text set in fonts that are not embedded.
@font-face takes OpenType fonts with PostScript (CFF) outlines, and
[20 lines not shown]