TableGen: Remember superclass results when finding derived definitions (#234807)
getAllDerivedDefinitions checks every def with isSubClassOf, which
searches the def's superclasses recursively. Most defs share a few
superclasses, so the same searches are repeated many times: for AMDGPU,
each uncached query checks 153000 defs. Remember the result for each
superclass during a query instead.
All 366 tablegen runs in an LLVM build with all targets:
Gigainstructions Gigacycles CPU seconds
Before 2277 1477 521
After 2264 (-0.5%) 1423 (-3.7%) 503 (-3.3%)
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
Merge tag 'hardening-v7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux
Pull hardening updates from Kees Cook:
- Provide kmalloc_obj*-style API for devm_kmalloc()
- Improve seq_buf API for saner C String handling with several bug
fixes along the way (Kees Cook, Bill Wendling)
- Overflow helper readability improvements (Bill Wendling)
- Unexport native_write_cr4() (Dennis Chen)
- um: fix CONFIG_GCOV for built-in code (Johannes Berg)
- Improve stackinit test coverage (Justin Stitt)
- KMSAN: fix memset() when using fortify-source, again (Arnd Bergmann)
[32 lines not shown]
Merge tag 'execve-v7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux
Pull execve update Kees Cook:
"Make CIs happier about the execve tests: report the skipped
binfmt_misc_bpf test on stderr (Sasha Levin)"
* tag 'execve-v7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
selftests/exec: report the skipped binfmt_misc_bpf test on stderr
Merge tag 'seccomp-v7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux
Pull seccomp updates from Kees Cook:
- allow addfd to transfer O_PATH descriptors (Cong Wang)
- allow restarting interrupted unreceived notifications (Cong Wang)
- fix SECCOMP_ADDFD_FLAG_SEND when interrupted (Hui Peng)
- Various docs and test clean-ups
* tag 'seccomp-v7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
selftests/seccomp: Split fork_and_close into clone and close tests
seccomp: Document RESTART_BEFORE_RECV and O_PATH addfd
selftests/seccomp: test addfd with an O_PATH descriptor
seccomp: allow addfd to transfer O_PATH descriptors
docs/seccomp: describe the SECCOMP_FILTER_FLAG_RESTART_BEFORE_RECV flag
selftests/seccomp: cover restart of unreceived notifications
[2 lines not shown]
Merge tag 'pstore-v7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux
Pull pstore updates from Kees Cook:
- don't leave an ERR_PTR in the ramoops zone pointer (Andrea Parri)
- reject persistent RAM zones too small for the buffer header (Andrea Parri)
- publish big_oops_buf after max_compressed_size (Jaidev Shastri)
* tag 'pstore-v7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
pstore: publish big_oops_buf after max_compressed_size
pstore: reject persistent RAM zones too small for the buffer header
pstore: don't leave an ERR_PTR in the ramoops zone pointer
[llvm-reduce] Skip landingpad clauses in operands-to-args (#219748)
Fixes #219667.
The operands-to-args delta pass could select a landingpad clause for
replacement with a function argument. Landingpad clauses must remain
constants, so this produced invalid IR and triggered the
`cast<Constant>`
assertion while the reducer verified a candidate.
Skip operands owned by `LandingPadInst`. The regression test runs only
the
operands-to-args pass with `--abort-on-invalid-reduction` and verifies
that
the function remains argument-free and that its catch clause remains
constant.
AI assistance disclosure: OpenAI Codex 5.6 Sol assisted with
implementation
[2 lines not shown]
[MemProf] Fix remapping of matching calls when assigning function clones
When a function has several calls with identical callsite metadata, they
are recorded on one context node with the extra calls in
Node->MatchingCalls. If that function is cloned by context
disambiguation, assignFunctions must remap each version's matching calls
through the function clone's CallMap, the same way it remaps the primary
Call.
Two problems in the IR path:
* AssignCallsiteCloneToFuncClone rewrote the matching calls of the
original node (Node->MatchingCalls) instead of those of the callsite
clone being assigned. The clone node (whose MatchingCalls were copied
from the original at creation) kept the original instructions, and the
original node's list was overwritten with the clone's. UpdateCalls then
updated each function version's matching calls with the other version's
callee clone, i.e. swapped.
[16 lines not shown]
TableGen: Remember superclass results when finding derived definitions
getAllDerivedDefinitions checks every def with isSubClassOf, which
searches the def's superclasses recursively. Most defs share a few
superclasses, so the same searches are repeated many times: for AMDGPU,
each uncached query checks 153000 defs. Remember the result for each
superclass during a query instead.
All 366 tablegen runs in an LLVM build with all targets:
Gigainstructions Gigacycles CPU seconds
Before 2277 1477 521
After 2264 (-0.5%) 1423 (-3.7%) 503 (-3.3%)
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
lua-lpeg: add missing .so symlink on macOS
for lua to successfully load lua-lpeg, the shared library needs to have a .so
extension instead of the .dylib that will be generated on macOS. This patch
fixes this, making it possible to use lua-lpeg without manually needing to
symlink this afterwards.
[SelectionDAG] Do not treat variadic vreg results as physreg defs (#229847)
AddSchedEdges sets hasPhysRegDefs on a scheduling unit when a machine
node has more used results than explicit defs. Later, in the list
scheduler, canClobberPhysRegDefs assumes that each extra result is an
implicit physical register def. It then indexes implicit_defs() by the
result number.
This assumption is wrong for instructions with variadicOpsAreDefs on
targets where usesPhysRegsForValues returns false, such as WebAssembly.
On these targets, the extra results are virtual registers, not physical
ones. As a result, RegReductionPQBase::PrescheduleNodesWithMultipleUses
reads past the end of the implicit def list.
This change makes the scheduler check for this case. Now hasPhysRegDefs
is set only when the extra results really are physical registers.
Effect on WebAssembly code:
Before this change, every WebAssembly call with a used result was marked
[16 lines not shown]
15.2: Update stable/15 to -PRERELEASE
This marks the start of the FreeBSD 15.2 release cycle; the stable/15
tree is now in "code slush".
Developers are encouraged to prioritize fixing bugs (and/or merging bug
fixes from HEAD) over new features at this time. Commit approval from
re@ is not required but if new features introduce problems they may be
removed from the release.
Approved by: re (implicit)
Sponsored by: OpenSats Initiative
Merge tag 'for-linus-fwctl' of git://git.kernel.org/pub/scm/linux/kernel/git/fwctl/fwctl
Pull fwctl update from Jason Gunthorpe:
- One bug fix for a CFI issue in the Rust bindings
* tag 'for-linus-fwctl' of git://git.kernel.org/pub/scm/linux/kernel/git/fwctl/fwctl:
rust: fwctl: declare cfi_encoding for fwctl_rpc_scope