[CIR][EH] Implement flattening for dynamic exception specification (#223780)
This change implements the CFG flattening for try operations with filter
and unexpected exception handlers. The flattening dispatches unexpected
exceptions to an operation that will later be lowered to target-specific
IR to call std::unexpected, while exceptions that match the dynamic
exception specification are routed to normal unwind handling.
Target-specific EH ABI lowering will be added in a follow-up change.
Assisted-by: Cursor / various models
[SLP]Fix splat gather subtree keep/drop to restore lost vectorization
The splat gather subtrees were kept on cost ties and resurrected by the
trimming revert without a profitability re-check, and dropping them left
the gathered loads built for them orphaned and forcing extracts. This
rejected otherwise profitable VF=2 trees. Keep subtrees only when
strictly profitable, re-evaluate them against the restored tree on a
revert, and delete the gathered loads left dead by a drop.
Fixes the remaining regressions from #220250 reported in #221717.
Reviewers:
Pull Request: https://github.com/llvm/llvm-project/pull/223833
[CodeGen] Fix -fsanitize=array-bounds for __sized_by / _or_null pointers (#213795)
`EmitCountedByBoundsChecking()` assumed a CountAttributedType is always
a __counted_by pointer. That isn't true; there are four versions of the
attribute:
* `__counted_by`: Already handled correctly.
* `__counted_by_or_null`: Incorrectly handled.
* `__sized_by`: Incorrectly handled.
* `__sized_by_or_null`: Incorrectly handled.
In particular:
* __sized_by / __sized_by_or_null: the loaded bound is a byte count, but
the
element index was compared against it directly, so an access was only
flagged once the index exceeded the byte count -- missing out-of-bounds
accesses for a pointee larger than one byte. Convert the loaded byte
count
[54 lines not shown]
bcm2835_pwm: Fix dev.pwm.0.ratio2 register
A typo in the sysctl for RPI0 PWM channel 2 was causing it to
write to the wrong register, leaving it misconfigured if used.
PR: 298301
MFC after: 3 days (problem reported on 14.4)
Reviewed by: adrian
Reported by: Attila Kover <attila.kover at guardian.co.uk>
Differential Revision: https://reviews.freebsd.org/D59644
[AMDGPU] Fix for GFX11 VOPD interlock hazard (#220348)
On GFX11, a VOPD consumer whose X/Y sources share a gather class (srcA
or srcB) and the same VGPR parity can lose the destination-buffer interlock
for one of those sources. Thus, use parity as bank mask instead.
[SPIRV] Emit RuntimeDescriptorArrayEXT capability for all unbounded array types (#222819)
Previously, the `RuntimeDescriptorArrayEXT` capability was emitted only
for image descriptor arrays. This change emits the capability for the
shader whenever resource array has `ArraySize == 0`.
This covers all supported runtime descriptor array types, including
images, structured buffers, samplers, and counter descriptor arrays.
Emitting the capability for these arrays is necessary to support dynamic
resources in SPIR-V.
Assisted by GPT-5.6 Sol.
[docs] Require MyST for Sphinx documentation builds
Fedora plans to use the man pages we build in our binary releases for
its packaging:
https://discourse.llvm.org/t/rfc-make-myst-markdown-the-llvm-docs-format-rip-rest/90840/37
I'm assuming that other distributions are either going to be able to
install the necessary Python modules that we depend on (myst_parser
etc), or will be able to adopt similar strategies. Therefore, I think we
can remove this enum and associated complexity.
Assisted-by: codex
Remove source_rc_confs, inlined from defaults/rc.conf
Inlining source_rc_confs broke sysrc_test:A_flag
While here, switch to SPDX, bump version/copyrights, fixup comments.
Prevent common function override when bsdconfig includes new
sysrc.subr that contains inlined commons. Fix non-unique duplicate
header variable incorrectly shared between bsdconfig's sysrc.subr
include and new sysrc.subr include.
Harden RC_DEFAULTS parameter expansion from DoS-via-glob (SC2223).
Move pgm to the correct location to not override bsdconfig's pgm.
Drop _SYSRC_JAILED=1 that is no-longer needed. Drop i18n from
jail_depend now that messages are inlined to subr.
Reported by: siva
Fixes: eaeb5f29bc6f sysrc: make independant from bsdconfig(8)
[bazel] Add script for finding files not in the graph (#220343)
This is useful to make sure that globs cover all files in a given
subdirectory. Right now this doesn't cover many directories because we
don't have tons of tests in bazel but if we eventually add those we can
more easily spot ones we miss with this script.
Assisted by: codex
[MLIR][XeVM] Hoist contiguous-slice shuffles through n-ary elementwise ops (#222452)
XeGPU expresses vector operands in their logical element type, so
per-lane compute chains can end up wider than the SPIR-V backend can
legalize as a single operand. HandleVectorExtractPattern already narrows
such chains by hoisting a contiguous-slice shufflevector upward through
unary element-wise ops (fpext/fptrunc/bitcast), merging shuffle chains,
and folding into smaller loads. But it stops at n-ary ops, so a chain
like
%0 = llvm.fdiv %a, %b : vector<32xf32> // wide, binary
%1 = llvm.shufflevector %0, %0 [0..15] : vector<32xf32> // legal 16-wide
slice
keeps a wide vector<32xf32> compute that the backend rejects.
This extends the pattern to hoist a contiguous slice through n-ary
element-wise ops as well: slice each same-length vector operand with the
same mask and re-create the op at the narrow width. The freshly created
[5 lines not shown]
[CodeGen] Drop dead SlotIndexes before allocation
SlotIndexes keeps the index list entry of an erased instruction and only
clears its instruction pointer. Live range sizes are measured in slot
indexes and greedy ranks ranges by size, so the leftovers inflate some
ranges more than others and reorder allocation, spilling heavily on
register-starved functions.
Add SlotIndexes::compactIndexes() to erase them. Erased entries are
unlinked, so LiveIntervals, LiveStacks and LiveDebugVariables first
report the indexes they hold via appendReferencedIndexes(); a missed one
trips an assert instead of dangling.
Off by default behind -greedy-compact-slot-indexes, since it changes
allocation across much of the test suite.
Revert "[flang][test][NFC] Add OpenMP test for mismatched loop bound types" (#223813)
Reverts llvm/llvm-project#221097
This fails buildbots
https://lab.llvm.org/buildbot/#/builders/80/builds/24748 and precommit
CI.
@doru1004 please look at it and remand when fixed.