LLVM/project e35f904clang/include/clang/CIR/Dialect/IR CIRDialect.td, clang/lib/CIR/CodeGen CIRGenModule.h CIRGenFunction.h

[CIR][SYCL] Emit attributes on the SYCL kernel caller (#224667)

Emit norecurse, mustprogress, and sycl-module-id.

This matches the classic behavior that is specific to the SYCL kernel
caller.

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply at anthropic.com>
DeltaFile
+47-0clang/test/CIR/CodeGenSYCL/kernel-caller-attributes.cpp
+27-3clang/lib/CIR/CodeGen/CIRGenSYCL.cpp
+21-6clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp
+16-0clang/lib/CIR/CodeGen/CIRGenFunction.h
+3-0clang/include/clang/CIR/Dialect/IR/CIRDialect.td
+2-0clang/lib/CIR/CodeGen/CIRGenModule.h
+116-96 files

LLVM/project 18f2436lldb/test/API/functionalities/scripted_process TestScriptedProcess.py

[lldb/test] Register the addressable_bits_scripted_process module with the script interpreter (#224803)

`test_scripted_process_addressable_bits` imported
`addressable_bits_scripted_process` into the test process, which makes
the module's constants available to the test but tells lldb's own script
interpreter nothing about it, so
`SBLaunchInfo::SetScriptedProcessClassName()` had nothing to resolve:

```
  error: failed to create ScriptedProcess: failed to create script object:
  Could not find script class:
  addressable_bits_scripted_process.AddressableBitsScriptedProcess
```

Import the file with `command script import` the way the other scripted
process tests in this file do.
DeltaFile
+5-0lldb/test/API/functionalities/scripted_process/TestScriptedProcess.py
+5-01 files

LLVM/project 5d05951flang/test/Driver bbc-openmp-target-context.f90, flang/tools/bbc bbc.cpp

Set bbc target context for semantics
DeltaFile
+17-0flang/test/Driver/bbc-openmp-target-context.f90
+2-0flang/tools/bbc/bbc.cpp
+19-02 files

LLVM/project e80cb50clang/lib/StaticAnalyzer/Checkers/WebKit RawPtrRefLocalVarsChecker.cpp

[WebKit Checkers][NFC] Extract hasGuardian from isPtrOriginSafe in RawPtrRefLocalVarsChecker (#224726)

So an upcoming borrow checker can skip it.

(A guardian variable is an independent declaration that ensures a
lifetime. Borrow checking does not accept guardian variables because
they do not convey `lifetimebound` links.)

Assisted-by: Claude
DeltaFile
+33-31clang/lib/StaticAnalyzer/Checkers/WebKit/RawPtrRefLocalVarsChecker.cpp
+33-311 files

LLVM/project c38a705lldb/source/Plugins/ObjectFile/ELF ObjectFileELF.cpp, lldb/source/Plugins/ObjectFile/Mach-O ObjectFileMachO.cpp

[lldb] Bound DataExtractor::PeekCStr to the data it reads from (#224452)

PeekCStr only validated the first byte without checking for a terminator.
Every caller then treated the result as a C string, so an unterminated
string table let strlen run past the mapping, causing a crash or
security bug.

Return an optional StringRef, produced only when the terminator lies
within the data. The length comes along with it, so callers no longer
rescan, and an absent string stays distinct from an empty one.

ValueObject was the only caller that wanted an unterminated buffer. It
scans fixed size chunks of inferior memory, so it now asks for bytes with
PeekData and bounds its own scan.

rdar://186891223
DeltaFile
+46-40lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
+79-0lldb/test/Shell/ObjectFile/MachO/unterminated-symbol-name.yaml
+24-30lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
+27-24lldb/source/Utility/DataExtractor.cpp
+19-0lldb/unittests/Utility/DataExtractorTest.cpp
+14-4lldb/source/ValueObject/ValueObject.cpp
+209-985 files not shown
+242-11711 files

LLVM/project 0da0168lldb/source/Plugins/Process/FreeBSD-Kernel-Core ProcessFreeBSDKernelCore.h ProcessFreeBSDKernelCore.cpp

Revert "[lldb][FreeBSDKernel] Support cross-architecture FreeBSD kernel cores" (#224799)

Reverts llvm/llvm-project#223593

Merged by mistake.
DeltaFile
+5-33lldb/source/Plugins/Process/FreeBSD-Kernel-Core/ProcessFreeBSDKernelCore.cpp
+0-10lldb/source/Plugins/Process/FreeBSD-Kernel-Core/ProcessFreeBSDKernelCore.h
+5-432 files

LLVM/project 3088d0alldb/source/Plugins/Process/FreeBSD-Kernel-Core ProcessFreeBSDKernelCore.h ProcessFreeBSDKernelCore.cpp

[lldb][FreeBSDKernel] Support cross-architecture FreeBSD kernel cores (#223593)

FreeBSD's kvm_open(3) man page states that a valid resolver is required
to debug non-native kernel images as libkvm needs to map symbol names to
kernel virtual addresses. Since ProcessFreeBSDKernelCore aims to debug
kernel image and core dump from any architectures, pass a valid resolver
to kvm_open2().

Assisted-by: GPT
DeltaFile
+33-5lldb/source/Plugins/Process/FreeBSD-Kernel-Core/ProcessFreeBSDKernelCore.cpp
+10-0lldb/source/Plugins/Process/FreeBSD-Kernel-Core/ProcessFreeBSDKernelCore.h
+43-52 files

LLVM/project 041328elldb/source/Plugins/DynamicLoader/FreeBSD-Kernel DynamicLoaderFreeBSDKernel.cpp

[lldb][FreeBSDKernel] Avoid null dereference probing FreeBSD kernels (#223590)

CheckForKernelImageAtAddress() accepts an optional read_error pointer,
but dereferenced it unconditionally in many code paths. If read_error is
null, point read_error to a dummy local variable to prevent null
dereference.

Fixes: b3cc4804d45d6b612ac9b3cc47ebbb0da44ebc60
DeltaFile
+6-2lldb/source/Plugins/DynamicLoader/FreeBSD-Kernel/DynamicLoaderFreeBSDKernel.cpp
+6-21 files

LLVM/project 7192e07lldb/source/Plugins/Process/FreeBSD-Kernel-Core ProcessFreeBSDKernelCore.cpp

[lldb][FreeBSDKernel] Load unrelocated FreeBSD kernel sections (#223589)

Even though displacement is zero, we need to mark the module as loaded.

Fixes: 62d06083ef186abe610de4742c62c84c2f97fcd0
DeltaFile
+0-3lldb/source/Plugins/Process/FreeBSD-Kernel-Core/ProcessFreeBSDKernelCore.cpp
+0-31 files

LLVM/project d035826clang/lib/AST/ByteCode State.h State.cpp

[clang][bytecode] Flip a boolean flag meaning (#224649)

We only use this flag once, when passing it to
`setFoldFailureDiagnostic()` (where we invert it), so it doesn't make
sense to call it IsCCEDiag.
DeltaFile
+6-6clang/lib/AST/ByteCode/State.cpp
+1-1clang/lib/AST/ByteCode/State.h
+7-72 files

LLVM/project da72f2cllvm/lib/Support/Unix Path.inc

[Support] Only enable use of /proc/self/fd on Linux (#222497)

Only enable the use of /proc/self/fd on OSes that provide
the compatible /proc/self/fd interface.
DeltaFile
+3-5llvm/lib/Support/Unix/Path.inc
+3-51 files

LLVM/project 3834f58clang/lib/AST/ByteCode Interp.cpp

[clang][bytecode] Only call getSource() if we diagnose (#224663)

We can avoid this if we only return false anyway. Also rename a
variable.
DeltaFile
+7-7clang/lib/AST/ByteCode/Interp.cpp
+7-71 files

LLVM/project 3ff9abellvm/lib/Target/AArch64 AArch64InstrInfo.cpp, llvm/lib/Target/AArch64/MCTargetDesc AArch64MCLFIRewriter.cpp

[LFI][AArch64] Do not flush deferred LR guards on temporary labels (#224776)

In function epilogues with unwinding enabled, DWARF CFI directives
between restoring x30 and autiasp trigger
MCObjectStreamer::emitCFILabel, which emits temporary labels. onLabel
assumed all labels were branch targets and flushed DeferredLRGuard,
emitting `add x30, x27, w30, uxtw` before autiasp. Because w30
zero-extends, this stripped the PAC signature from x30 and caused PAC
exceptions on hardware with FEAT_FPAC.

Fix it by not flushing the deferred LR guard on temporary symbols in
onLabel. Also, update AArch64InstrInfo::getLFIInstSizeInBytes to return
8 for RET to fix the size assertion failure in +assertions builds, which
occurs because RET did not account for the deferred LR guard that can
precede the return instruction.

Assisted-by: Gemini
DeltaFile
+29-0llvm/test/MC/AArch64/LFI/return.s
+11-0llvm/test/MC/AArch64/LFI/guard-elim.s
+4-5llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
+3-2llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCLFIRewriter.cpp
+47-74 files

LLVM/project 851eb5alldb/examples/python/templates scripted_process.py, lldb/include/lldb/Interpreter/Interfaces ScriptedProcessInterface.h

[lldb/Interpreter] Let a Scripted Process report its addressable bits (#224701)
DeltaFile
+86-0lldb/test/API/functionalities/scripted_process/addressable_bits_scripted_process.py
+45-0lldb/test/API/functionalities/scripted_process/TestScriptedProcess.py
+27-3lldb/source/Plugins/Process/scripted/ScriptedProcess.cpp
+20-0lldb/examples/python/templates/scripted_process.py
+13-0lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedProcessPythonInterface.cpp
+4-0lldb/include/lldb/Interpreter/Interfaces/ScriptedProcessInterface.h
+195-34 files not shown
+203-310 files

LLVM/project f43368bclang/lib/Interpreter IncrementalExecutor.cpp, llvm/include/llvm/ExecutionEngine/Orc SharedMemoryMapSPS.h SharedMemoryMap.h

[ORC] Drive SharedMemoryMapper via proxies (#224786)

Add a SharedMemoryMapBindings handle (SharedMemoryMap.h) and its SPS
proxy specs (SharedMemoryMapSPS.h), mirroring SimpleMemoryMap, and bind
SharedMemoryMapper to it in place of its four callSPSWrapperAsync sites.
Dispatch and callee errors now share one channel, dropping the per-call
SerializationErr handling. Updates the llvm-jitlink and clang-repl
factories and the unit test.
DeltaFile
+68-0llvm/include/llvm/ExecutionEngine/Orc/SharedMemoryMap.h
+14-50llvm/lib/ExecutionEngine/Orc/MemoryMapper.cpp
+53-0llvm/include/llvm/ExecutionEngine/Orc/SharedMemoryMapSPS.h
+36-0llvm/lib/ExecutionEngine/Orc/SharedMemoryMapSPS.cpp
+21-13llvm/unittests/ExecutionEngine/Orc/SharedMemoryMapperTest.cpp
+6-22clang/lib/Interpreter/IncrementalExecutor.cpp
+198-853 files not shown
+210-1149 files

LLVM/project 61ce430llvm/lib/Target/AMDGPU AMDGPUISelDAGToDAG.cpp, llvm/test/CodeGen/AMDGPU memory-legalizer-global-lastuse.ll global-saddr-narrow-offset.ll

[AMDGPU] Narrow provably-I32 address offsets

Add a `tryNarrowToI32()` function that uses KnowsBits to detect 64-bit
offests that could be in a 32-bit register, allowing us to match
base + offset cases that don't involve literal base + (ext offset)
nodes.

Apply this to global_* instructions and the scalar memory instructions
that take a scalar offset.

This does leave a few dead copies when we have to bail out of the SMEM
handling for creatining a negative offset, but those don't have
end-to-end effect and it looks like you could already get dead MOVs
from that codepath.

AI disclosure: Claude wrote the code, I looked at it.
DeltaFile
+212-356llvm/test/CodeGen/AMDGPU/memory-legalizer-global-nontemporal.ll
+124-226llvm/test/CodeGen/AMDGPU/memory-legalizer-global-volatile.ll
+39-111llvm/test/CodeGen/AMDGPU/GlobalISel/extractelement.i8.ll
+34-59llvm/test/CodeGen/AMDGPU/global-saddr-narrow-offset.ll
+24-42llvm/test/CodeGen/AMDGPU/memory-legalizer-global-lastuse.ll
+30-18llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp
+463-81210 files not shown
+551-93416 files

LLVM/project a94e4bellvm/test/CodeGen/AMDGPU global-saddr-narrow-offset.ll

Fix test typo
DeltaFile
+1-1llvm/test/CodeGen/AMDGPU/global-saddr-narrow-offset.ll
+1-11 files

LLVM/project aa16dddllvm/test/CodeGen/AMDGPU smrd-narrow-soffset.ll global-saddr-narrow-offset.ll

[AMDGPU] Pre-commit tests for narrowing offsets in address matching

When trying to match either SADDR+VADDR global_* or the s_load_* that
takes a 32-bit offset, we don't check for cases where a 64-bit value
is trivially truncatable to 32 bits. Add tests for these cases.

AI disclosure: Claude wrote these tests
DeltaFile
+564-0llvm/test/CodeGen/AMDGPU/global-saddr-narrow-offset.ll
+411-0llvm/test/CodeGen/AMDGPU/smrd-narrow-soffset.ll
+975-02 files

LLVM/project a312cb0llvm/lib/IR PassTimingInfo.cpp

[llvm][timing] Reset recycled timer with different names. (#218492)

Legacy pass-manager timers are keyed by the pass instance pointer and
the map entry outlives the pass, so a pass allocated at a recycled
address inherits the previous pass's timer and reports its time under
that pass's name. When a recycled instance which has different name can
end up having leftover name comes from whichever target ran before.
Re-create the timer when the name no longer matches.

fixes: #218491
DeltaFile
+13-7llvm/lib/IR/PassTimingInfo.cpp
+13-71 files

LLVM/project 40a6a44llvm/include/llvm/Option OptTable.h, llvm/lib/Option OptTable.cpp

[Option] Emit the Info table from TableGen. NFC (#224508)

Each tool expands OPTION into an Info array and passes it with up to
five side tables to GenericOptTable or PrecomputedOptTable, so a new
side table touches every tool.

Emit the Info table from TableGen with numeric group and alias IDs and
bundle all tables into an OptTable::Tables aggregate under one
OPTTABLE_CODE block, so a tool just constructs OptTable(OptionTables).
Every table now uses the precomputed prefix union, which removes
GenericOptTable and PrecomputedOptTable.

Aided by Opus 5
DeltaFile
+138-109llvm/utils/TableGen/OptionParserEmitter.cpp
+55-100llvm/unittests/Option/OptionParsingTest.cpp
+15-88llvm/tools/llvm-objcopy/ObjcopyOptions.cpp
+12-63llvm/include/llvm/Option/OptTable.h
+13-39llvm/lib/Option/OptTable.cpp
+11-40llvm/tools/llvm-objdump/llvm-objdump.cpp
+244-43949 files not shown
+379-1,19155 files

LLVM/project 8c18880llvm/lib/Transforms/Vectorize SLPVectorizer.cpp

Address comments

Created using spr 1.3.7
DeltaFile
+3-2llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+3-21 files

LLVM/project 61b0646llvm/lib/Transforms/IPO LowerTypeTests.cpp

[LowerTypeTests] Apply kill switch to CFI jump table reordering (#224782)

This is follow up to #221046, for which I failed to upload rebased
version.

* https://github.com/llvm/llvm-project/pull/221046
DeltaFile
+2-1llvm/lib/Transforms/IPO/LowerTypeTests.cpp
+2-11 files

LLVM/project 8538563llvm/lib/Transforms/IPO LowerTypeTests.cpp

[𝘀𝗽𝗿] initial version

Created using spr 1.3.7
DeltaFile
+2-1llvm/lib/Transforms/IPO/LowerTypeTests.cpp
+2-11 files

LLVM/project 2adfaf8llvm/include/llvm/SandboxIR Type.h, llvm/unittests/SandboxIR TypesTest.cpp

[SandboxIR] Implement PointerType::getAddressSpace() (#224751)

This patch implements PointerType::getAddressSpace() in Sandbox IR,
mirroring LLVM IR.
DeltaFile
+5-0llvm/include/llvm/SandboxIR/Type.h
+3-0llvm/unittests/SandboxIR/TypesTest.cpp
+8-02 files

LLVM/project 3228e8fllvm/lib/Transforms/IPO LowerTypeTests.cpp, llvm/test/Transforms/LowerTypeTests cfi-jumptable-hotness-summary.ll

[LowerTypeTests] Reorder CFI jump table entries based on hotness (#221046)

Order CFI jump table entries by function hotness. We use `cfi.functions`
metadata in ThinLTO, or `BlockFrequencyInfo` / function entry counts in
full LTO.

We want the hottest function to be optimized by the last entry thing for
SHT_LLVM_CFI_JUMP_TABLE. The linker deletes the final branch in the jump
table and moves the table directly before that target function so it
falls through.

This also ensures the jump table lands in a hot section (.text.hot)
instead of a cold section (.text.unlikely). Type contiguity is
preserved.

This PR reliably improves the performance of our server binary by 0.2%,
and some smaller binaries up to 5%.

PR Stack:

    [8 lines not shown]
DeltaFile
+48-5llvm/lib/Transforms/IPO/LowerTypeTests.cpp
+7-7llvm/test/Transforms/LowerTypeTests/cfi-jumptable-hotness-summary.ll
+55-122 files

LLVM/project 349afefclang/lib/CIR/Dialect/Analysis CIRBasicAliasAnalysis.cpp, clang/test/CIR/Analysis alias-analysis-underlying-object.cir

rebase

Created using spr 1.3.7
DeltaFile
+234-147llvm/tools/llvm-jitlink/llvm-jitlink.cpp
+271-78clang/test/CIR/Analysis/alias-analysis-underlying-object.cir
+211-120clang/lib/CIR/Dialect/Analysis/CIRBasicAliasAnalysis.cpp
+0-276llvm/lib/Target/SPIRV/SPIRVLegalizeImplicitBinding.cpp
+276-0llvm/lib/Target/SPIRV/SPIRVLegalizeResourceBinding.cpp
+196-32mlir/lib/Conversion/VectorToXeGPU/VectorToXeGPU.cpp
+1,188-65357 files not shown
+3,039-89563 files

LLVM/project d34ec23clang/test/CodeGenCXX GH211943.cpp builtin-dump-struct.cpp

[Clang][NFC] Move GH211943 test into existing builtin-dump-struct test file (#224421)

Follow-up to #212377 per post-commit review by @shafik.
Moves the regression test from a standalone GH211943.cpp into the
existing CodeGenCXX/builtin-dump-struct.cpp under a namespace GH211943
block, guarded by #ifdef TEST_WERROR with a second RUN line.
DeltaFile
+17-0clang/test/CodeGenCXX/builtin-dump-struct.cpp
+0-13clang/test/CodeGenCXX/GH211943.cpp
+17-132 files

LLVM/project 5e88b5allvm/test/Transforms/LowerTypeTests cfi-jumptable-hotness-summary.ll

[NFC][LowerTypeTests] Add RUN line for -reorder-cfi-jump-tables-profiles=false (#224779)

Update CHECK lines to match the new jump table layout in

* https://github.com/llvm/llvm-project/pull/224779

Assisted-by: Gemini
DeltaFile
+88-0llvm/test/Transforms/LowerTypeTests/cfi-jumptable-hotness-summary.ll
+88-01 files

LLVM/project 2537bfallvm/test/Transforms/LowerTypeTests cfi-jumptable-hotness-summary.ll

[𝘀𝗽𝗿] initial version

Created using spr 1.3.7
DeltaFile
+88-0llvm/test/Transforms/LowerTypeTests/cfi-jumptable-hotness-summary.ll
+88-01 files

LLVM/project c100470llvm/test/Transforms/LowerTypeTests cfi-jumptable-hotness-summary.ll

[𝘀𝗽𝗿] initial version

Created using spr 1.3.7
DeltaFile
+88-0llvm/test/Transforms/LowerTypeTests/cfi-jumptable-hotness-summary.ll
+88-01 files