LLVM/project 2349d7f — llvm/lib/Target/X86 X86Subtarget.cpp

[spr] update

Created using spr 2.0.0-beta.2
DeltaFile
+2-3llvm/lib/Target/X86/X86Subtarget.cpp
+2-31 files

LLVM/project bbcc4ed — llvm/lib/Target/X86 X86ISelLoweringCall.cpp X86Subtarget.cpp, llvm/test/CodeGen/X86 ifunc-pic-i386.ll

[spr] update

Created using spr 2.0.0-beta.2
DeltaFile
+295-0llvm/test/CodeGen/X86/ifunc-pic-i386.ll
+11-1llvm/lib/Target/X86/X86Subtarget.cpp
+7-4llvm/lib/Target/X86/X86ISelLoweringCall.cpp
+313-53 files

LLVM/project 67545a8 — llvm/test/CodeGen/X86 ifunc-i386.ll

[test][X86] Precommit tests for 32-bit ELF PIC local IFUNCs (#248322)

Add codegen tests for calls, tail calls, musttail calls, and address
materialization of internal, hidden, and dso_local IFUNCs on i386 ELF.

The test covers the pic and static relocation models with SelectionDAG,
FastISel, and GlobalISel. The checks record the current output, where
PIC code references these IFUNCs with R_386_PC32 and R_386_GOTOFF.

Needed by #248318.

Assisted-by: Gemini
DeltaFile
+439-0llvm/test/CodeGen/X86/ifunc-i386.ll
+439-01 files

LLVM/project 788f0f2 — llvm/lib/Transforms/Vectorize/SLPVectorizer SLPTree.cpp

fixing undef issue
DeltaFile
+1-1llvm/lib/Transforms/Vectorize/SLPVectorizer/SLPTree.cpp
+1-11 files

LLVM/project 4e9dcc6 — clang/include/clang/CIR/Dialect/IR CIRTypes.td CIRDialectBytecode.td, clang/lib/CIR/Dialect/IR CIRDialectBytecode.cpp CIRTypes.cpp

[CIR] Add bytecode encodings for struct and union types (#247883)

Struct and union types were the last CIR types stored as their printed
text in bytecode. The printed form of a record expands every record it
reaches that has not been printed yet, so the text grows with the depth
of nesting and dominates CIR bytecode for C++.

A named record can refer to itself, so the reader creates it incomplete
and publishes it with tryStartCyclicRead (#229910) before reading its
members. Anonymous records cannot refer to themselves and are built once
their members are read.

Bytecode output for two of the CIR codegen TUs (-fclangir -emit-cir -c
on preprocessed sources, same binaries):
```
  CIRGenModule.cpp:  7.3 GB, 4m41s, 10 GB RSS -> 4.5 MB, 19s, 1.2 GB RSS
  CIRGenExprCXX.cpp: 3.9 GB, 2m11s,  6 GB RSS -> 2.0 MB, 12s, 0.9 GB RSS
```
For reference, their -O3 LLVM bitcode is 1.4 MB and 0.5 MB.
DeltaFile
+325-0clang/unittests/CIR/RecordBytecodeTest.cpp
+89-0clang/test/CIR/Bytecode/records.cir
+57-14clang/lib/CIR/Dialect/IR/CIRTypes.cpp
+66-0clang/lib/CIR/Dialect/IR/CIRDialectBytecode.cpp
+39-2clang/include/clang/CIR/Dialect/IR/CIRDialectBytecode.td
+35-0clang/include/clang/CIR/Dialect/IR/CIRTypes.td
+611-162 files not shown
+615-208 files

LLVM/project efe64ed — llvm/lib/Target/X86 X86Subtarget.cpp

[spr] update

Created using spr 2.0.0-beta.2
DeltaFile
+2-3llvm/lib/Target/X86/X86Subtarget.cpp
+2-31 files

LLVM/project da8f682 — clang/include/clang/CIR/Dialect/IR CIRTypes.td, clang/lib/CIR/Dialect/IR CIRTypes.cpp

[CIR] Add verifier enforcement of illegal SVE types (#247874)

This change updates the VectorType verifier to reject illegal SVE vector
sizes and updates the StructType, UnionType, and ArrayType verifiers to
reject scalable SVE vectors and svecount as elements/members.

Although LLVM IR represents tuples as a struct of SVE vectors, I intend
to add a dedicated tuple type in CIR.

Assisted-by: Cursor / various models
DeltaFile
+61-15clang/lib/CIR/Dialect/IR/CIRTypes.cpp
+63-9clang/test/CIR/IR/invalid-vector.cir
+49-2clang/test/CIR/IR/vector.cir
+44-0clang/test/CIR/IR/invalid-sizeless.cir
+25-7clang/include/clang/CIR/Dialect/IR/CIRTypes.td
+242-335 files

LLVM/project d4c0607 — lld/MachO Symbols.h Target.h

[lld][MachO] Avoid redundant work in Writer::scanRelocations() (#246903)

During relocation scanning, `Writer::scanRelocations()` looks up
`target->getRelocAttrs(r.type)` up to three times per symbol relocation
(in `scanRelocations()`, `validateSymbolRelocation()`, and
`prepareSymbolRelocation()`), tests `r.referent` twice for symbol
referents, and makes an out-of-line call to `validateSymbolRelocation()`
on every symbol relocation even though it only rejects two rare
thread-local-variable cases.

Move `validateSymbolRelocation()` (whose only caller is
`Writer::scanRelocations()`) into `Writer.cpp`, split the rare TLV
validation logic into a `LLVM_ATTRIBUTE_NOINLINE` helper, and mark
`DylibSymbol` `final` so `dysym->isTlv()` avoids a virtual call on the
fast path. Fetch `RelocAttrs` once per relocation, pass it to
`validateSymbolRelocation()` and `prepareSymbolRelocation()`, hoist
loop-invariant `target->relocAttrs` and `config->emitChainedFixups`, and
dispatch on `r.referent` once for non-subtractor relocations.

Assisted by Gemini + Claude.
DeltaFile
+42-27lld/MachO/Writer.cpp
+6-1lld/MachO/Target.h
+1-1lld/MachO/Symbols.h
+49-293 files

LLVM/project 9bb26d4 — llvm/test/CodeGen/X86 ifunc-pic-i386.ll ifunc-i386.ll

[spr] update

Created using spr 2.0.0-beta.2
DeltaFile
+471-0llvm/test/CodeGen/X86/ifunc-i386.ll
+0-367llvm/test/CodeGen/X86/ifunc-pic-i386.ll
+471-3672 files

LLVM/project bc3525b — llvm/test/CodeGen/X86 ifunc-pic-i386.ll ifunc-i386.ll

[spr] update

Created using spr 2.0.0-beta.2
DeltaFile
+439-0llvm/test/CodeGen/X86/ifunc-i386.ll
+0-335llvm/test/CodeGen/X86/ifunc-pic-i386.ll
+439-3352 files

LLVM/project 7ee4267 — llvm/docs/CommandGuide llvm-ir2vec.md, llvm/test/tools/llvm-ir2vec triplets-max-arg-index.mir

[llvm-ir2vec] Add --max-arg-index to bound the Arg relations in triplets
DeltaFile
+38-0llvm/test/tools/llvm-ir2vec/triplets-max-arg-index.mir
+18-9llvm/utils/mlgo-utils/IR2Vec/generateTriplets.py
+5-19llvm/tools/llvm-ir2vec/lib/IRUtils/IRUtils.cpp
+17-0llvm/tools/llvm-ir2vec/lib/Common.h
+12-4llvm/docs/CommandGuide/llvm-ir2vec.md
+11-0llvm/tools/llvm-ir2vec/llvm-ir2vec.cpp
+101-321 files not shown
+104-357 files

LLVM/project 9244a01 — llvm/docs/CommandGuide llvm-ir2vec.md, llvm/test/tools/llvm-ir2vec triplets-max-arg-index.ll

[llvm-ir2vec] Add --max-arg-index to bound the Arg relations in IR triplets
DeltaFile
+40-0llvm/test/tools/llvm-ir2vec/triplets-max-arg-index.ll
+18-3llvm/tools/llvm-ir2vec/lib/IRUtils/IRUtils.cpp
+4-1llvm/docs/CommandGuide/llvm-ir2vec.md
+62-43 files

LLVM/project 292201f — llvm/tools/llvm-ir2vec/lib Common.h, llvm/tools/llvm-ir2vec/lib/IRUtils IRUtils.h IRUtils.cpp

[llvm-ir2vec][NFC]  Refactoring writers into a base class (#247950)

(useful for upcoming PR)
DeltaFile
+33-2llvm/tools/llvm-ir2vec/lib/Common.h
+3-15llvm/tools/llvm-ir2vec/lib/MIRUtils/MIRUtils.cpp
+4-14llvm/tools/llvm-ir2vec/lib/IRUtils/IRUtils.cpp
+1-1llvm/tools/llvm-ir2vec/lib/MIRUtils/MIRUtils.h
+1-1llvm/tools/llvm-ir2vec/lib/IRUtils/IRUtils.h
+42-335 files

LLVM/project 4cf06b4 — lldb/include/lldb/Symbol SymbolFile.h, lldb/source/Plugins/SymbolFile/JSON SymbolFileJSON.cpp

[lldb][NFC] Have a clearer contract for SymbolFiles to mark change (#241655)

SymbolFile::AddSymbols can add symbols to an ObjectFile's Symtab. It can
also modify the symbols in the Symtab -- e.g. SymbolFileWasm can add
mangled names to an existing symbol. For a recent PR, I added a call to
Symtab::SetSymbolFileAddedSymbols() when a name was added to an existing
symbol in the Symtab. But this still left open the possibility of future
SymbolFile plugins, or downstream ones, doing the same thing (changing a
symbol in a Symtab), and we would not detect that the Symtab has been
updated since its ObjectFile state.

This changes SymbolFile::AddSymbols to return a bool indicating if
Symbols were added or updated. And in SymbolFileCommon::GetSymtab,
instead of checking that the number of symbols had changed and calling
Symtab::SetSymbolFileAddedSymbols(), use this new returned value.

As I look towards a bloom filter representation of the ObjectFile's
symtab, I become more focused on making sure I can tell when a
SymbolFile has modified the Symtab in any way, so the bloom filter can

    [3 lines not shown]
DeltaFile
+61-0lldb/unittests/Symbol/SymtabTest.cpp
+6-6lldb/include/lldb/Symbol/SymbolFile.h
+5-5lldb/test/Shell/SymbolFile/DWARF/wasm-symtab-state-updated-symbol.yaml
+5-4lldb/source/Plugins/SymbolFile/JSON/SymbolFileJSON.cpp
+5-3lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
+6-2lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp
+88-2013 files not shown
+111-3819 files

LLVM/project ebf1429 — mlir/lib/Dialect/XeGPU/IR XeGPUDialect.cpp, mlir/test/Dialect/XeGPU propagate-layout-subgroup.mlir

[MLIR][XeGPU] Spread replicated sg_layout outermost-first in expandDim (#244999)

When expandDim splits a dim whose sg_data spans the whole dim, every
subgroup holds all of it, so the replicated subgroups can sit on any of
the new dims. expandDim currently places them on the innermost new dim.
For example, expanding sg_layout = [2, 2], sg_data = [16, 1024] on dim 1
to [32, 32] gives sg_layout = [2, 1, 2], sg_data = [16, 32, 32]. This
layout by itself is fine, since the two subgroups on the inner dim are
replicas. But in the mxfp use case the inner dim is the one reduced to
compute the scale, so it is sliced away, and its two subgroups go with
it. The multi_reduction rule then no longer sees those subgroups and
splits the reduced dim across them.

This PR places replicated subgroups on the outermost new dims instead.
For the same example, expandDim now gives sg_layout = [2, 2, 1], sg_data
= [16, 32, 32]. The sliced dim then has only one subgroup, so the
reduction rule sees all subgroups in use and keeps the reduction within
each subgroup:
main: slice<sg_layout = [2, 1, 2], sg_data = [16, 32, 32], dims = [2]>

    [12 lines not shown]
DeltaFile
+29-16mlir/lib/Dialect/XeGPU/IR/XeGPUDialect.cpp
+17-1mlir/test/Dialect/XeGPU/propagate-layout-subgroup.mlir
+46-172 files

LLVM/project 1f02d98 — compiler-rt/lib/sanitizer_common sanitizer_stoptheworld_linux_libcdep.cpp, compiler-rt/test/lsan/TestCases/Linux seccomp_kills_ptrace.cpp

[spr] update

Created using spr 2.0.0-beta.2
DeltaFile
+19-83compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cpp
+29-0compiler-rt/test/lsan/TestCases/Linux/seccomp_kills_ptrace.cpp
+48-832 files

LLVM/project ca7710a — lldb/include/lldb/Target Process.h, lldb/source/Plugins/DynamicLoader/MacOSX-DYLD DynamicLoaderDarwin.cpp DynamicLoaderMacOSXDYLD.cpp

[lldb] Add a DataFileCache for ObjectFile header bytes (#231344)

When creating a memory-read module, lldb needs to read the binary's
header & load commands (Mach-O terminology) out of memory, and then read
the symbol table out of memory. In
https://github.com/llvm/llvm-project/pull/229305 I added a new setting
default-on which saves the symbol table for a memory-read binary in the
DataFileCache. But we're still reading the header and load command bytes
out of memory on every debug session, and if there are a large number of
binary images being read from memory, this packet communication will be
a real performance problem.

This patch enables a new DataFileCache file with the same
`symbols.enable-lldb-index-cache-memory-modules` default-on setting,
"headerbytes". After creating a memory-read binary, it saves the bytes
of the header to the DataFileCache. And before reading a new memory-read
binary, it looks in the DataFileCache to see if the header bytes are
already available. If so, it puts those bytes in the Process
memory-cache, and allows the ObjectFile plugin sublcass to read them.

    [37 lines not shown]
DeltaFile
+104-0lldb/source/Target/Process.cpp
+61-30lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp
+86-0lldb/test/API/macosx/memory-read-module-symtab/TestMemoryReadModuleNoHeaderBytesCache.py
+60-17lldb/test/API/macosx/memory-read-module-symtab/TestMemoryReadModuleSymtab.py
+41-4lldb/include/lldb/Target/Process.h
+4-3lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.cpp
+356-5410 files not shown
+394-5516 files

LLVM/project 4eebf1a — llvm/test/CodeGen/X86 ifunc-pic-i386.ll

[spr] update

Created using spr 2.0.0-beta.2
DeltaFile
+166-94llvm/test/CodeGen/X86/ifunc-pic-i386.ll
+166-941 files

LLVM/project f645c02 — llvm/test/CodeGen/X86 ifunc-pic-i386.ll

[spr] update

Created using spr 2.0.0-beta.2
DeltaFile
+150-78llvm/test/CodeGen/X86/ifunc-pic-i386.ll
+150-781 files

LLVM/project 7a3776b — mlir/include/mlir/Dialect/XeGPU/Transforms XeGPULayoutImpl.h, mlir/lib/Dialect/XeGPU/Transforms XeGPULayoutImpl.cpp

[MLIR][XeGPU] Check that a split shape_cast layout collapses at subgroup level (#245861)

For a shape_cast that splits a source dim, the source layout is derived
by collapsing the result layout. That is only exact when each sg tile is
contiguous in the collapsed dim. setupShapeCastResultLayout already
checks this for inst_data and lane layouts, but not at subgroup level.

In simple_mxfp_gemm_quantizeA_F4/F8, the result layout sg_layout = [2,
1, 2], sg_data = [16, 32, 16] of a 32x1024 -> 32x32x32 shape_cast was
collapsed to sg_data = [16, 512]. Its sg tile is not contiguous, so the
scales came out wrong.

This PR adds the subgroup check. When a group does not collapse, its
subgroups move to the group's outer dims (here [2, 2, 1] / [16, 16,
32]), and a convert_layout gives the consumer its layout.

assisted-by-claude

---------

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+108-2mlir/lib/Dialect/XeGPU/Transforms/XeGPULayoutImpl.cpp
+72-0mlir/test/Dialect/XeGPU/propagate-layout-subgroup.mlir
+11-2mlir/include/mlir/Dialect/XeGPU/Transforms/XeGPULayoutImpl.h
+191-43 files

LLVM/project f4ecd10 — lld/MachO Symbols.h Target.h

[lld][MachO] Avoid redundant work in Writer::scanRelocations()

During relocation scanning, `Writer::scanRelocations()` looks up
`target->getRelocAttrs(r.type)` up to three times per symbol relocation
(in `scanRelocations()`, `validateSymbolRelocation()`, and
`prepareSymbolRelocation()`), tests `r.referent` twice for symbol
referents, and runs the full `validateSymbolRelocation()` body on every
symbol relocation even though it only rejects two rare
thread-local-variable cases.

Split the rare TLV validation logic in `validateSymbolRelocation()` into
a `LLVM_ATTRIBUTE_NOINLINE` helper, and mark `DylibSymbol` `final` so
`dysym->isTlv()` avoids a virtual call on the fast path. Fetch
`RelocAttrs` once per relocation, pass it to
`validateSymbolRelocation()` and `prepareSymbolRelocation()`, hoist
loop-invariant `target->relocAttrs` and `config->emitChainedFixups`, and
dispatch on `r.referent` once for non-subtractor relocations.
DeltaFile
+42-27lld/MachO/Writer.cpp
+6-1lld/MachO/Target.h
+1-1lld/MachO/Symbols.h
+49-293 files

LLVM/project 9d0b0d5 — lld/MachO Relocations.h Relocations.cpp

[lld][MachO][NFC] Move validateSymbolRelocation() into Writer.cpp (#248324)

`Writer::scanRelocations()` is the only caller of
`validateSymbolRelocation()`. Move it as-is into `Writer.cpp` as a
`static` helper in preparation for #246903 (which optimizes
`Writer::scanRelocations()` and includes the full benchmark results).
DeltaFile
+0-47lld/MachO/Relocations.cpp
+47-0lld/MachO/Writer.cpp
+0-3lld/MachO/Relocations.h
+47-503 files

LLVM/project ffebd2f — llvm/include/llvm/ProfileData SampleProfReader.h, llvm/lib/ProfileData SampleProfReader.cpp

[SampleProfile] Keep inline-root discovery in the sample loader

Move the IR inline-frame scan and selective root discovery out of the
public SampleProfileReader API. The loader retains the same depth-ordered
algorithm and delegates named profile reads to the existing reader API.
Preserve nested-profile preference, missing-outer-frame discovery,
request deduplication, remapping, and error propagation.

Reject a missing or zero-head root before looking up the call target.
Use the matched profile's function identity directly, without changing
the target-count, definition, checksum, or phase checks.

Assisted-by: Metamate
DeltaFile
+104-10llvm/lib/Transforms/IPO/SampleProfile.cpp
+0-96llvm/lib/ProfileData/SampleProfReader.cpp
+0-5llvm/include/llvm/ProfileData/SampleProfReader.h
+104-1113 files

LLVM/project c5ea6ee — llvm/lib/MC MCAssembler.cpp, llvm/lib/Target/RISCV/MCTargetDesc RISCVMCCodeEmitter.cpp RISCVAsmBackend.cpp

[MC,RISCV] Use a symbol for the skip target of linker-relaxable long branches (#247437)

When the assembler relaxes an out-of-range conditional branch to an
inverted branch over a JAL, the branch should carry a relocation but
doesn't:

```
0: c.beqz a0, 0x6    # no relocation
2: jal    zero, ext  # R_RISCV_JAL ext, R_RISCV_RELAX
6:
```

Add a MCAsmBackend::relaxInstruction overload, overridden by RISC-V to
define a temporary symbol at the start of the next fragment and append
it to the long branch pseudo. The inverted branch targets that symbol
and gets an R_RISCV_BRANCH or R_RISCV_RVC_BRANCH relocation.

Fixes #236343

LLM-aided
DeltaFile
+40-20llvm/test/MC/RISCV/long-conditional-jump.s
+42-18llvm/test/MC/RISCV/xqcibi-long-conditional-jump.s
+45-0llvm/lib/Target/RISCV/MCTargetDesc/RISCVAsmBackend.cpp
+19-11llvm/lib/Target/RISCV/MCTargetDesc/RISCVMCCodeEmitter.cpp
+8-4llvm/test/MC/RISCV/zibi-long-conditional-jump.s
+3-6llvm/lib/MC/MCAssembler.cpp
+157-597 files not shown
+182-6713 files

LLVM/project cc1fd59 — llvm/test/Transforms/SampleProfile thinlto-orphaned-root-rejection.ll

[SampleProfile] Test isolated inline-root recovery rejections

Exercise already loaded roots, failed intermediate frames, nested-profile preference, partial copies, and the greater-than count boundary before simplifying the implementation.

Assisted-by: Metamate
DeltaFile
+98-0llvm/test/Transforms/SampleProfile/thinlto-orphaned-root-rejection.ll
+98-01 files

LLVM/project 5252ed2 — llvm/docs ReleaseNotes.md, llvm/tools/llvm-exegesis/lib BenchmarkRunner.cpp SubprocessMemory.h

[llvm-exegesis] Use memfd_create over shm_open (#246568)

The shm_open strategy relied on having a unique filename in /dev/shm per
exegesis invocation (which might be called on multiple threads in the
same process by API users). This is fundamentally fragile (see past
commits to add support for threads). The most recent example is that
bazel will try and run tests in some cases in their own PID namespaces
which breaks the current assumption that PIDs are globally unique.

Instead, use memfd_create so that we do not need to come up with a
globally unique name at all. This also removes a bunch of string
handling to construct filenames which is nice. The only potential issue
is that memfd_create was only introduced in Linux 3.4/a glibc of a
similar era. I remember people complaining that some parts of
llvm-exegesis broke builds on RHEL6 which uses Linux kernel 2 and does
not support memfd_create. But RHEL6 is extra dead at this point, so
hopefully that's not an issue anymore.

Assisted-By: LLM
DeltaFile
+48-89llvm/tools/llvm-exegesis/lib/SubprocessMemory.cpp
+23-48llvm/unittests/tools/llvm-exegesis/X86/SubprocessMemoryTest.cpp
+22-29llvm/tools/llvm-exegesis/lib/SubprocessMemory.h
+5-10llvm/tools/llvm-exegesis/lib/BenchmarkRunner.cpp
+4-0llvm/docs/ReleaseNotes.md
+102-1765 files

LLVM/project 35ddc92 — lld/MachO SyntheticSections.cpp InputFiles.cpp

[lld][MachO][NFC] Introduce SectionView for section-level predicates (#248238)

Add a lightweight `SectionView` wrapper implicitly constructible from
either a `Section` or an `InputSection`, and convert all section-level
predicate functions (`isCodeSection`, `isCfStringSection`,
`isClassRefsSection`, `isSelRefsSection`, `isEhFrameSection`,
`isGccExceptTabSection`, `usesAuthGot`, and ICF's
`isFoldableIgnoringRelocatedBytes`) to accept `SectionView`.

This avoids duplicating `(const Section &)` / `(const InputSection *)`
overloads as we refactor loops over `InputSection`s (which are generally
grouped by their originating `Section`) to hoist or cache section-level
predicate results across consecutive subsections of the same `Section`.

Assisted by Gemini.
DeltaFile
+20-24lld/MachO/InputSection.cpp
+21-21lld/MachO/ICF.cpp
+18-8lld/MachO/InputSection.h
+4-4lld/MachO/Writer.cpp
+3-3lld/MachO/InputFiles.cpp
+2-2lld/MachO/SyntheticSections.cpp
+68-622 files not shown
+70-648 files

LLVM/project b6afaec — llvm/include/llvm/IR RuntimeLibcalls.td, llvm/test/Transforms/Util/DeclareRuntimeLibcalls asan.ll aarch64.ll

RuntimeLibcalls: Make asan runtime available with out of tree support (#248131)

The previous set of systems was based on what targets are built in the
compiler-rt sources. However a few targets have out of tree runtimes,
so list those too (MSVC on AArch64, AMDGPU, Emscripten and the
PlayStation SDK). Also, drop the stack poisoning functions from
AMDGPU since the pass skips inserting those for it.

Assisted-by: Claude
DeltaFile
+20-13llvm/include/llvm/IR/RuntimeLibcalls.td
+18-1llvm/test/Transforms/Util/DeclareRuntimeLibcalls/aarch64.ll
+9-1llvm/test/Transforms/Util/DeclareRuntimeLibcalls/asan.ll
+1-0llvm/unittests/IR/RuntimeLibcallsTest.cpp
+48-154 files

LLVM/project a9c9c86 — llvm/include/llvm/ProfileData SampleProfReader.h, llvm/include/llvm/Transforms/IPO SampleProfileMatcher.h

[SampleProfile] Split stale inline-frame matching into a follow-up

Keep the basic inline-profile recovery in #245375 and move the stale-location
extension into a separate stacked change. Preserve selective root discovery,
nested-profile preference, missing-outer-frame handling, and the definition,
call-count, zero-head, and available-checksum checks.

Restore the existing stale-profile matcher, remove matching-only retrieval
policy and location-map accessors, and reject known checksum mismatches in
root fallback. Move the synthetic moved-probe tests with the extension while
retaining the basic recovery and negative checksum tests.

This commit is directly on top of 76cd07eceb984b3c248387a1c8f6ee0e891e7343,
so the published recovery commit does not need to be rewritten. The stacked
follow-up restores the original combined source tree exactly.

Assisted-by: OpenAI
DeltaFile
+78-96llvm/lib/Transforms/IPO/SampleProfileMatcher.cpp
+2-16llvm/test/Transforms/SampleProfile/thinlto-orphaned-local-root.ll
+6-10llvm/lib/Transforms/IPO/SampleProfile.cpp
+3-5llvm/include/llvm/Transforms/IPO/SampleProfileMatcher.h
+2-4llvm/include/llvm/ProfileData/SampleProfReader.h
+2-3llvm/lib/ProfileData/SampleProfReader.cpp
+93-1341 files not shown
+93-1387 files

LLVM/project 8d837b4 — llvm/lib/ProfileData SampleProf.cpp SampleProfReader.cpp, llvm/lib/Transforms/IPO SampleProfile.cpp SampleProfileMatcher.cpp

[SampleProfile] Retrieve root profiles for inlined functions

Pre-link inlining can leave an inline frame whose samples are stored in a
separate root. Reading profiles only for surviving Function objects misses
that root. Looking only under the caller also fails when the profile and
IR inline trees disagree, including when an inner function is inlined first.

Put selective inline-root retrieval in the sample-profile reader so sample
loading and stale matching can both use it. Collect inline frames once,
prefer matching nested profiles, and batch missing-root reads by depth.
Do not let a missing outer profile hide a deeper frame or repeatedly request
names that are absent from the profile.

Let stale matching collect anchors inside eliminated inline frames and
reuse its existing matching algorithm and location-map distribution. For
MD5 profiles, resolve known callee hashes before the comparison loop.

Keep retrieval separate from permission to reuse sample counts. Post-link
fallback still checks the caller's count and probe checksum. Reject zero-head

    [4 lines not shown]
DeltaFile
+306-0llvm/test/Transforms/SampleProfile/thinlto-orphaned-local-root.ll
+95-77llvm/lib/Transforms/IPO/SampleProfileMatcher.cpp
+104-0llvm/test/Transforms/SampleProfile/thinlto-orphaned-nonlocal-root.ll
+97-0llvm/lib/ProfileData/SampleProfReader.cpp
+79-5llvm/lib/Transforms/IPO/SampleProfile.cpp
+11-9llvm/lib/ProfileData/SampleProf.cpp
+692-913 files not shown
+716-969 files