[flang] Add policy-driven allocation-placement pass - memory passes unification [2/5] (#210742)
Introduce a new function-level pass, allocation-placement, that unifies
the stack/heap placement decisions currently split between the
stack-arrays and memory-allocation-opt passes. For each array allocation
it consults a policy to decide whether it should live on the stack
(fir.alloca) or the heap (fir.allocmem) and rewrites it accordingly,
reusing fir::replaceAllocas for stack-to-heap and the StackArrays
analysis/rewrite for heap-to-stack (so heap-to-stack only happens where
it is provably safe).
The default policy (AllocationPlacementPolicy.h) is threshold-driven:
- small constant-size arrays go on the stack within a per-function stack
budget, otherwise on the heap;
- big constant-size arrays: user variables stay on the stack,
temporaries go on the heap;
- runtime-sized arrays go on the heap;
- an aggressive mode places all arrays on the stack (best effort). User
variables are distinguished from compiler temporaries via the presence
[6 lines not shown]
[APINotes] Diagnose invalid Where.Parameters selectors (#209408)
This PR adds diagnostics for exact `Where.Parameters` selectors on top
of the existing parsing, serialization, and Sema matching support.
It diagnoses duplicate exact selectors during API notes conversion,
including duplicate `Where.Parameters: []`, while still allowing broad
name-only entries and same-name entries with different selectors.
It also adds reader/Sema support to warn under `-Wapinotes` when an
exact selector in API notes does not match any visible overload. The
reader can now enumerate stored exact selectors for global functions and
C++ methods, and Sema compares those against the selector candidates
derived from the visible overload set.
The diagnostic path follows the same matching policy as Sema, including
the desugared alias fallback, so valid matched selectors do not produce
false warnings.
[9 lines not shown]
[clang][bytecode][NFC] Add CHECK markers for functions in test (#212699)
We aren't testing the existence of the function in the output here, but
without these markers, debugging test failures here can become very
cumbersome.
[X86] Remove TuningFastSHLDRotate from BMI2 targets (#211217)
This flag has no effect at `x86-64-v3` or `v4`. It only enables a pseudo
that lowers `rotl`/`rotr` by immediate to `shld $imm, %reg, %reg`, but a
higher-priority `RORX` pattern matches the same case and always wins the
iSel tie.
Both patterns match `rotl(GR64, imm)`; only their `AddedComplexity`
differs:
```
// X86InstrShiftRotate.td:507 -- SHLD-rotate pseudo, complexity 5
let Predicates = [HasFastSHLDRotate], AddedComplexity = 5, ... in {
def SHLDROT64ri : ... [(set GR64:$dst, (rotl GR64:$src1, (i8 imm:$shamt)))]>;
}
// X86InstrShiftRotate.td:602 -- RORX pattern, complexity 10, only needs BMI2
let AddedComplexity = 10 in {
def : Pat<(rotl GR64:$src, (i8 imm:$shamt)),
[7 lines not shown]
[Docs][AMDGPU] availability/visibility in addrspace(3)
addrspace(3) on AMDGPU corresponds to LDS, which is a fast memory directly
accessed by all threads in a workgroup (there is no intervening cache). Thus,
any accesses to this addrspace have built-in availability and visibility at
"workgroup" scope.
flnews-snapshot: Update to 1.4.0pre3
Bug fixes:
- FILTER: Avoid double free in filter rule constructor if regular
expression for string could not be compiled (reported by
Michael Uplawski, patch from Robert Kuhn assisted by Claude AI).
New features and improvements:
- FILTER: Display line number in scorefile (if debug mode is enabled).
AMDGPU: Add supports-wgp subtarget feature
Whether the hardware supports WGP (work-group processor) execution mode is a
fixed per-GPU capability, distinct from the per-kernel cumode selection. Add
a dedicated feature instead of inferring from the generation and instructions.
Co-authored-by: Claude (Claude-Opus-4.8)
lang/rust: set RUST_BACKTRACE=1 on recent CURRENT on powerpc64le
After src 70509d1d9cba254dfd5b3dd83d8a011b5e125788, RUST_BACKTRACE=1
doesn't cause a crash anymore.
[SPIR-V] Fix OpDecorate insertion point for non-PHI defs in decorateUsesAsNonUniform (#212524)
Inserting before the defining instruction placed the decoration ahead of
its own operand, breaking dominance for the loop-carried case
Fix machine code errors from
https://github.com/llvm/llvm-project/pull/208224#issuecomment-5095074660
authpf(8) read_config() should chop off trailing white space
if administrator mistakenly types into configuration file
anchor=authpf_test
where 'authpf_test' is followed by white space, the authpf(8)
is going to use anchor 'authpf_test ' instead of the 'authpf_test'
which is defined in pf.conf(5) as 'anchor authpf_test/*'
issue kindly reported and patch submitted by
Avinash Duduskar <avinash.duduskar (_at_) gmail (_dot_) com>
OK sashan@
PR: 296958
MFC after: 1 week
Obtained from: OpenBSD, sashan <sashan at openbsd.org>, 2d12a8e44d
[3 lines not shown]