LLVM/project 760bb06llvm/include/llvm/IR ModuleSummaryIndex.h ModuleSummaryIndexYAML.h, llvm/lib/Bitcode/Writer BitcodeWriter.cpp

[ThinLTO] Change GlobalValueSummaryMapTy from std::map to DenseMap+deque (#157839)

Replace GlobalValueSummaryMapTy with a custom container using DenseMap
for O(1) lookup and std::deque for storage with pointer stability. Sort
by GUID at serialization points to preserve deterministic output order.

RFC:
https://discourse.llvm.org/t/rfc-change-globalvaluesummarymapty-from-std-map-to-llvm-densemap-for-thin-linking-performance/88191
DeltaFile
+95-8llvm/include/llvm/IR/ModuleSummaryIndex.h
+7-3llvm/lib/IR/AsmWriter.cpp
+6-3llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
+5-1llvm/lib/Transforms/IPO/MemProfContextDisambiguation.cpp
+2-1llvm/include/llvm/IR/ModuleSummaryIndexYAML.h
+115-165 files

LLVM/project 4fad93blibcxx/include/__vector layout.h

[libc++] Use _LIBCPP_NO_UNIQUE_ADDRESS for the new vector layout (#207149)

We use `_LIBCPP_NO_UNIQUE_ADDRESS`, since a plain
`[[no_unique_address]]` doesn't work on Windows.
DeltaFile
+1-1libcxx/include/__vector/layout.h
+1-11 files

LLVM/project 94acbb7clang/lib/Sema SemaOpenMP.cpp

[NFC][Clang][OpenMP] Simplify checks for num_teams and thread_limit expressions
DeltaFile
+62-57clang/lib/Sema/SemaOpenMP.cpp
+62-571 files

LLVM/project 3c0f9cbclang/test/CodeGen/LoongArch/lasx builtin.c builtin-alias.c, llvm/test/CodeGen/RISCV determine-callee-saves-gpr.mir

Merge branch 'main' into users/c8ef/assert_test_string
DeltaFile
+733-733clang/test/CodeGen/LoongArch/lasx/builtin.c
+733-733clang/test/CodeGen/LoongArch/lasx/builtin-alias.c
+42-1,387llvm/test/CodeGen/X86/haddsub-2.ll
+1,283-0llvm/test/CodeGen/RISCV/determine-callee-saves-gpr.mir
+1,030-14llvm/test/Transforms/PhaseOrdering/X86/hsub.ll
+959-12llvm/test/Transforms/PhaseOrdering/X86/hadd.ll
+4,780-2,879465 files not shown
+22,434-11,843471 files

LLVM/project 53af7edclang/lib/Sema SemaOpenMP.cpp

[NFC][Clang][OpenMP] Simplify checks for num_teams and thread_limit expressions
DeltaFile
+62-57clang/lib/Sema/SemaOpenMP.cpp
+62-571 files

LLVM/project 2cf5b7bllvm/lib/CodeGen/SelectionDAG LegalizeVectorTypes.cpp, llvm/test/CodeGen/RISCV/rvv vector-deinterleave.ll

[LegalizeType] Fix VECTOR_DEINTERLEAVE widening with incorrect insert_subvector (#207245)

Partially address #207136 

There are really two parts in the associated issue: (1) incorrect type
widening logics that `insert_subvector` with indices that are not a
multiple of the sub-vector's minimum number of elements, and (2)
incorrect RISC-V lowering logics when it comes to fixed vector.

This PR addresses the first part: It turns out in order to have a
widened, packed concat vector, we don't need to use any insert_subvector
that involves widened operands -- just `concat_vectors` on the
_original_ (narrow) operands (before adjusting to the size of the
desired widened concat vector)
DeltaFile
+32-0llvm/test/CodeGen/RISCV/rvv/vector-deinterleave.ll
+7-10llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
+39-102 files

LLVM/project be1d8d4llvm/lib/Target/AArch64 AArch64ISelLowering.cpp, llvm/test/CodeGen/AArch64 cttz-of-bool-vector-bitcast.ll

[AArch64] Lower cttz(bitcast <Nxi1> to iN) with shrn-based compressed movemask (#199081)

The existing lowering in vectorToScalarBitmask() creates a 1 bit per
lane movemask using a powers of 2 reduction (and+addv with a constant
pool entry).

This patch adds a DAG combine on ISD::CTTZ that recognizes cttz(bitcast
<N x i1> to iN) and produces a compressed movemask with shrn (for i8
lanes) or xtn (for wider lanes) then runs scalar cttz on a 64- or
128-bit value. Dividing by bits per lane gives the lane index.

Supports lane counts {2, 4, 8, 16, 32} (one or two NEON registers)

For the example in the issue (`<16 x i8> -> i16`):

Before:
```asm
adrp x8, .LCPI0_0
cmlt v0.16b, v0.16b, #0

    [34 lines not shown]
DeltaFile
+940-0llvm/test/CodeGen/AArch64/cttz-of-bool-vector-bitcast.ll
+132-0llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
+1,072-02 files

LLVM/project 604db5fcompiler-rt/lib/profile InstrProfilingPlatformROCm.cpp

[PGO][HIP][NFC] Fix hipModuleGetGlobal -Wunused-function warning (#207293)

The functions trigger the warning on Windows (without elf.h) and is
fatal under -Werror.
Fix by adding [[maybe_unused]]. Alternatively it could be moved inside
the existing __has_include(<elf.h>) block,; however that would trigger
-Wunused-but-set-global on pHipModuleGetGlobal.
Current fix is minimal and can be removed once hipModuleGetGlobal is
supported without elf.h.
DeltaFile
+1-0compiler-rt/lib/profile/InstrProfilingPlatformROCm.cpp
+1-01 files

LLVM/project 247a272clang/lib/Sema SemaDecl.cpp, clang/test/SemaCXX injected-class-name-crash.cpp

[clang] fix redeclarations of the injected class name

The declaration used to represent an injected class name should never
be part of any redeclaration chain.

This is a regression since Clang 22, and this will be backported, so no release notes.

Fixes #202320
DeltaFile
+14-11clang/lib/Sema/SemaDecl.cpp
+7-0clang/test/SemaCXX/injected-class-name-crash.cpp
+21-112 files

LLVM/project d7cd957clang-tools-extra/clangd ModulesBuilder.cpp Preamble.cpp, clang-tools-extra/clangd/unittests PrerequisiteModulesTest.cpp

[clangd] Invalidate preamble when new module imports are added (#199460)

When using `SkipPreambleBuild`, adding a new `import` statement to a
file did
not invalidate the existing preamble because `isPreambleCompatible` only
checked whether existing prerequisite modules were up-to-date, not
whether
the set of required modules itself had changed.

Fixes: #199389
Partially addresses: #126350
DeltaFile
+56-0clang-tools-extra/clangd/unittests/PrerequisiteModulesTest.cpp
+24-0clang-tools-extra/clangd/ModulesBuilder.cpp
+16-1clang-tools-extra/clangd/Preamble.cpp
+7-0clang-tools-extra/clangd/ModulesBuilder.h
+103-14 files

LLVM/project 9d103e0llvm/lib/FileCheck FileCheckImpl.h

Rename printVariables to printVariableDefAttempts
DeltaFile
+2-2llvm/lib/FileCheck/FileCheckImpl.h
+2-21 files

LLVM/project c9c7b8allvm/lib/FileCheck FileCheck.cpp

Rename printVariables to printVariableDefAttempts
DeltaFile
+4-4llvm/lib/FileCheck/FileCheck.cpp
+4-41 files

LLVM/project b3d0b1fflang-rt/include/flang-rt/runtime allocator-registry.h

[flang-rt] Use posix_memalign instead of std::aligned_alloc (#207248)

MallocWrapper called std::aligned_alloc for over-aligned requests, but
that C11 function is only available on macOS 10.15 and newer. flang-rt
builds with a Darwin deployment target of 10.7 (set in
AddFlangRT.cmake), so the build failed under
-Werror=unguarded-availability-new.

Use posix_memalign instead, as it is available on all supported POSIX
targets.
DeltaFile
+14-2flang-rt/include/flang-rt/runtime/allocator-registry.h
+14-21 files

LLVM/project a4b1846llvm/docs MergeFunctions.md Vectorizers.md, llvm/docs/Frontend PerformanceTips.md

[docs] Rewrite 20 selected rst LLVM docs to Markdown (#205923)

Tracking issue: https://github.com/llvm/llvm-project/issues/201242
Migration guide docs:
https://llvm.org/docs/SphinxQuickstartTemplate.html#markdown-migration-guidelines
RFC:
https://discourse.llvm.org/t/rfc-make-myst-markdown-the-llvm-docs-format-rip-rest/90840
DeltaFile
+224-250llvm/docs/MergeFunctions.md
+227-241llvm/docs/Vectorizers.md
+191-243llvm/docs/MyFirstTypoFix.md
+166-204llvm/docs/MemProf.md
+152-195llvm/docs/Frontend/PerformanceTips.md
+147-154llvm/docs/AdvancedBuilds.md
+1,107-1,28715 files not shown
+2,174-2,45221 files

LLVM/project 20a60c5llvm/docs MergeFunctions.md MergeFunctions.rst

[docs] Rename 20 selected rst docs to Markdown (#205921)

Tracking issue: https://github.com/llvm/llvm-project/issues/201242
Migration guide docs:
https://llvm.org/docs/SphinxQuickstartTemplate.html#markdown-migration-guidelines
RFC:
https://discourse.llvm.org/t/rfc-make-myst-markdown-the-llvm-docs-format-rip-rest/90840

This may break the doc build, but it will be fixed in a follow-up.
DeltaFile
+785-0llvm/docs/MergeFunctions.md
+0-785llvm/docs/MergeFunctions.rst
+0-522llvm/docs/MyFirstTypoFix.rst
+522-0llvm/docs/MyFirstTypoFix.md
+0-511llvm/docs/Vectorizers.rst
+511-0llvm/docs/Vectorizers.md
+1,818-1,81837 files not shown
+5,461-5,46143 files

LLVM/project 1ed13f9.github CODEOWNERS

Fix CODEOWNERS error, remove Lanza from ClangIR owners

The github project reports:
Unknown owner on line 39: make sure <name> exists and has write access to the repository

I assume Nathan's commit access lapsed and he has the `triage` role now.

I added a comment saying he is an emeritus owner. This is reversible,
and I assume if he needs or wants write access, we can revisit this in
the future.
DeltaFile
+5-3.github/CODEOWNERS
+5-31 files

LLVM/project ab6058allvm/docs LangRef.md

[docs] Rewrite LangRef.md as Markdown
DeltaFile
+14,672-17,477llvm/docs/LangRef.md
+14,672-17,4771 files

LLVM/project d619174llvm/docs LangRef.md

Migrate 11 tables back from list-table to regular markdown tables
DeltaFile
+80-202llvm/docs/LangRef.md
+80-2021 files

LLVM/project ad38f51.github new-prs-labeler.yml, llvm/docs LangRef.md LangRef.rst

[docs] Rename LangRef.{rst|md}

Tracking issue: #201242

This commit does not use valid markdown, so the docs will not build, but they will be fixed in an immediate follow-up commit that does the migration.
DeltaFile
+33,180-0llvm/docs/LangRef.md
+0-33,180llvm/docs/LangRef.rst
+1-1.github/new-prs-labeler.yml
+1-1llvm/docs/AddingConstrainedIntrinsics.rst
+33,182-33,1824 files

LLVM/project c3b744bclang/lib/CIR/CodeGen CIRGenBuiltinX86.cpp, clang/test/CIR/CodeGen builtins-x86.c

[clang][CIR]: X86 movnti/movntsd/movntss CIR implementation. (#206388)

### Implements X86 CIR codegen builtins:

- __builtin_ia32_movnti
- __builtin_ia32_movnti64
- __builtin_ia32_movntsd
- __builtin_ia32_movntss

Folow the original codegen architecture lowering to movntss call.

Towards #167765.
DeltaFile
+31-3clang/test/CIR/CodeGen/builtins-x86.c
+18-0clang/lib/CIR/CodeGen/CIRGenBuiltinX86.cpp
+49-32 files

LLVM/project 5302608offload/plugins-nextgen/common/src GlobalHandler.cpp

[Offload] Guard __llvm_write_custom_profile null check on non-Windows (#207170)

On Windows __llvm_write_custom_profile is defined as a strong stub (MSVC
lacks proper weak symbol support) by 09a51b2818e2, so its address is a
compile-time constant that is never null. The `if
(!__llvm_write_custom_profile)` check therefore triggers
-Wpointer-bool-conversion, which is fatal under -Werror.

Assisted-by: Claude
DeltaFile
+4-0offload/plugins-nextgen/common/src/GlobalHandler.cpp
+4-01 files

LLVM/project b1e2dd3llvm/docs MergeFunctions.md HowToCrossCompileLLVM.md

[docs] Finish MyST migration for selected docs
DeltaFile
+117-120llvm/docs/MergeFunctions.md
+96-96llvm/docs/HowToCrossCompileLLVM.md
+19-20llvm/docs/MyFirstTypoFix.md
+22-16llvm/docs/Vectorizers.md
+14-15llvm/docs/HowToBuildWithPGO.md
+13-10llvm/docs/CycleTerminology.md
+281-27712 files not shown
+331-34318 files

LLVM/project 3d3ca2allvm/docs MergeFunctions.md MergeFunctions.rst

[docs] Rename selected rst docs to Markdown
DeltaFile
+785-0llvm/docs/MergeFunctions.md
+0-785llvm/docs/MergeFunctions.rst
+522-0llvm/docs/MyFirstTypoFix.md
+0-522llvm/docs/MyFirstTypoFix.rst
+511-0llvm/docs/Vectorizers.md
+0-511llvm/docs/Vectorizers.rst
+1,818-1,81837 files not shown
+5,461-5,46143 files

LLVM/project f7abd23llvm/docs MergeFunctions.md MyFirstTypoFix.md, llvm/docs/Frontend PerformanceTips.md

[docs] Convert selected rst docs with rst2myst
DeltaFile
+279-302llvm/docs/MergeFunctions.md
+194-245llvm/docs/MyFirstTypoFix.md
+208-228llvm/docs/Vectorizers.md
+166-203llvm/docs/MemProf.md
+153-195llvm/docs/Frontend/PerformanceTips.md
+154-153llvm/docs/AdvancedBuilds.md
+1,154-1,32614 files not shown
+2,225-2,49120 files

LLVM/project 7b11c7cclang/lib/AST ExprConstant.cpp, clang/lib/AST/ByteCode InterpBuiltin.cpp Interp.h

[Clang] Fix offsetof sign-extending unsigned array indices >= 128 (#204139)

When evaluating __builtin_offsetof with an unsigned integer array index
(e.g. uint8_t, uint16_t) whose value has the high bit set, Clang was
calling getSExtValue() on the APSInt index, which sign-extends the value
and produces a large bogus offset.

Fix this to use the correct kind of extension to extend smaller values, and to check for overflow in conversions of larger values.

Fixes #199319

AI Tool Use: GitHub Copilot (Claude Sonnet 4.6) was used to assist in
identifying the root cause of the bug in ExprConstant.cpp and drafting
the fix. The fix was reviewed, tested, and validated manually.
DeltaFile
+56-0clang/test/Sema/offsetof-unsigned-index.c
+17-1clang/lib/AST/ByteCode/InterpBuiltin.cpp
+13-1clang/lib/AST/ExprConstant.cpp
+13-0clang/lib/AST/ByteCode/Interp.h
+10-0clang/lib/AST/ByteCode/Opcodes.td
+7-0clang/lib/AST/ByteCode/Compiler.cpp
+116-22 files not shown
+121-28 files

LLVM/project 475f4e8bolt/lib/Core DIEBuilder.cpp BinaryContext.cpp

[BOLT] Stop materializing .dwo DIE vectors early in the pipeline

Summary: preprocessDWODebugInfo() eagerly force-extracted every .dwo
compile unit's DIE tree (getNonSkeletonUnitDIE(false)) very early in
BOLT pipeline, way before DWARFRewriter kicked in. Those vectors then
sit in memory throughout the entire rewrite pipeline, directly
contributing to BOLT's RSS peak. I did a fair amount of digging and
didn't find any reason as to why we need to keep all DIEs of DWO CU
materialized at all, since DWARFRewriter won't even read this vector
(the #197359 concurrency fix did use that, but that is unnecessary).
The problem is that these DIE trees are a massive contribution to RSS
when processing large binaries where we have 10s of K of dwos, storing
complete trees for each processed dwo.

This diff changes the #197359 concurrency fix to not rely on the DIE
sibling/children structure. It parses DWP type units selectively per
compile unit (DIEBuilder::buildDWPTypeUnitsForUnit ->
collectReferencedTypeSignatures) by finding the DW_FORM_ref_sig8
references in a unit's DIEs to decide which type units belong in that

    [23 lines not shown]
DeltaFile
+19-17bolt/lib/Core/DIEBuilder.cpp
+8-8bolt/lib/Core/BinaryContext.cpp
+27-252 files

LLVM/project 879f762bolt/include/bolt/Core BinaryFunction.h BinaryContext.h, bolt/lib/Core BinaryContext.cpp BinaryFunction.cpp

[BOLT] Fix shifted DWARF inline-scope ranges; track scope boundaries

Summary:
BOLT updated DWARF lexical-scope ranges (DW_TAG_inlined_subroutine /
lexical_block low_pc/high_pc and DW_AT_ranges) via
translateInputToOutputRange(), which mapped a boundary using its input
offset relative to the start of the containing basic block:

  OutAddr = BB.getOutputAddressRange().first + (InputOffset - BB.getOffset())

This assumes intra-block byte offsets are preserved input->output. Any
pass that changes instruction sizes within a block ahead of a scope
boundary breaks that assumption. With --plt=all, each `call foo at PLT`
(5 bytes, e8+rel32) is rewritten to `call *foo at GOT(%rip)` (6 bytes,
ff 15+rel32); N such calls before a boundary shift its emitted low_pc/
high_pc N bytes too early, onto the preceding instruction. The range
stays within the parent so `llvm-dwarfdump --verify` does not catch it;
symbolizers then attribute samples on those instructions to the wrong
inlined frames.

    [43 lines not shown]
DeltaFile
+614-0bolt/test/X86/dwarf-inline-range-plt-shift.s
+81-0bolt/lib/Core/BinaryContext.cpp
+54-4bolt/include/bolt/Core/BinaryFunction.h
+42-12bolt/lib/Core/BinaryFunction.cpp
+5-10bolt/include/bolt/Core/BinaryContext.h
+14-0bolt/lib/Rewrite/RewriteInstance.cpp
+810-261 files not shown
+814-287 files

LLVM/project c2b50a1llvm/test/CodeGen/RISCV determine-callee-saves-gpr.mir

[CodeGen] Add tests for `determineCalleeSaves`. (#204855)
DeltaFile
+1,283-0llvm/test/CodeGen/RISCV/determine-callee-saves-gpr.mir
+1,283-01 files

LLVM/project b7623f5llvm/test/Transforms/LoopVectorize/AArch64 reduction-recurrence-costs-sve.ll partial-reduce-dot-product-neon.ll, llvm/test/Transforms/LoopVectorize/RISCV gather-scatter-cost.ll

[VPlan] Strip early-bail in noalias-check (#203936)

canHoistOrSinkWithNoAliasCheck currently bails eagerly when the
candidate memory location doesn't have a scope. This is unnecessary,
because the alias check automatically handles this: stripping this check
allows us to run the loop, which would never get to the alias check if
none of the recipes write to memory. The end result is that a read-only
FirstBB to LastBB ranges are determined not to alias with anything, even
if the scope metadata is absent, leading to licm-load-store
improvements.
DeltaFile
+306-107llvm/test/Transforms/LoopVectorize/AArch64/reduction-recurrence-costs-sve.ll
+43-81llvm/test/Transforms/LoopVectorize/RISCV/gather-scatter-cost.ll
+60-60llvm/test/Transforms/LoopVectorize/AArch64/partial-reduce-dot-product-neon.ll
+57-15llvm/test/Transforms/LoopVectorize/X86/cost-model-i386.ll
+39-23llvm/test/Transforms/LoopVectorize/X86/replicating-load-store-costs.ll
+30-30llvm/test/Transforms/LoopVectorize/AArch64/pr60831-sve-inv-store-crash.ll
+535-31632 files not shown
+759-54338 files

LLVM/project e8c4e99llvm/lib/Transforms/Vectorize VPlan.h, llvm/unittests/Transforms/Vectorize VPlanTest.cpp

[VPlan] Strip secondary SIVSteps constructor (NFC) (#207193)

Migrate the only use-site in unit-test to use the canonical constructor.
DeltaFile
+2-12llvm/lib/Transforms/Vectorize/VPlan.h
+1-2llvm/unittests/Transforms/Vectorize/VPlanTest.cpp
+3-142 files