LLVM/project 91a0ba8clang/lib/DependencyScanning ModuleDepCollector.cpp, clang/lib/Frontend CompilerInstance.cpp CompilerInvocation.cpp

[clang][modules] Add `-fmodules-ignore-search-path=<path>` (#217061)

This introduces the search-path counterpart to
`-fmodules-ignore-macro=<macro>`. The named header search `<path>` is
dropped from the context hash of every module and physically removed
from every module-build invocation, and kept only for the translation
unit itself.

The motivating case is a build system that hands every compile a
per-target header search directory (e.g. Xcode's `DerivedSources`) even
though no modules include anything from it. Under
`-fmodules-strict-context-hash` those directories feed every module's
context hash, so an SDK module like Foundation is rebuilt once per
target rather than just once. Ignoring the directories for modules lets
those builds share a single module cache while the TUs that really do
need them keep working.

This only works right when no module needs the path: a lookup that would
have resolved through an ignored path simply fails, exactly as ignoring

    [6 lines not shown]
DeltaFile
+194-0clang/test/ClangScanDeps/modules-ignore-search-path-optimize-args.c
+112-0clang/test/ClangScanDeps/modules-context-hash-ignore-search-path.c
+91-0clang/test/Modules/modules-ignore-search-path.c
+20-1clang/lib/Frontend/CompilerInvocation.cpp
+12-0clang/lib/DependencyScanning/ModuleDepCollector.cpp
+11-0clang/lib/Frontend/CompilerInstance.cpp
+440-15 files not shown
+463-411 files

LLVM/project c2230d1clang/lib/Serialization ModuleManager.cpp

[clang][modules] Cache failures for explicit modules (#215968)

Explicit module files are a (binary) input to the compilation. Just like
any other input file they are expected to not change during compilation.
There's no reason to disable failure caching in the `FileManager` for
them.
DeltaFile
+2-2clang/lib/Serialization/ModuleManager.cpp
+2-21 files

LLVM/project 8c7c7d1clang/lib/Serialization ASTReader.cpp

[clang][modules] Cache failed stats of additional module maps (#215964)

The additional module maps stored in PCMs are just regular input files
that are not expected to change during compilation. There's no reason to
disable failure caching in the `FileManager` for them.
DeltaFile
+1-1clang/lib/Serialization/ASTReader.cpp
+1-11 files

LLVM/project fdd53b9llvm/test/Analysis/ScalarEvolution exit-count-greater-than.ll

[SCEV] Add tests for backedge-taken count of loops exiting on (U|S)GT. (#217721)

Tests for https://github.com/llvm/llvm-project/issues/217537.
DeltaFile
+242-0llvm/test/Analysis/ScalarEvolution/exit-count-greater-than.ll
+242-01 files

LLVM/project 948d280clang/lib/Driver/ToolChains Clang.cpp, clang/test/CodeGenCUDA offload_via_llvm_math.cu

add math functions
DeltaFile
+252-0clang/test/CodeGenCUDA/offload_via_llvm_math.cu
+137-0offload/languages/include/kernel/LanguageMath.h
+71-36clang/lib/Driver/ToolChains/Clang.cpp
+105-0offload/test/offloading/language/math.cpp
+12-0clang/test/Driver/gpu-libc.c
+3-0offload/languages/include/hip/hip_runtime.h
+580-362 files not shown
+584-368 files

LLVM/project 7198b3fllvm/include/llvm/IR ModuleSummaryIndex.h DebugProgramInstruction.h

[IR] Remove dead declarations (#217701)

handleChangedLocation: The corresponding function definition was
removed on January 16, 2024 in commit
d499df02a2508641d67918d7dc41b2e01a4a4114.

noRenameOnPromotion: Added on February 28, 2026 in commit
3e05ab6322cbf2a96362dcacb5907ba519fe552d without a corresponding
function definition.
DeltaFile
+0-4llvm/include/llvm/IR/DebugProgramInstruction.h
+0-2llvm/include/llvm/IR/ModuleSummaryIndex.h
+0-62 files

LLVM/project a97afdeflang/lib/Lower/OpenMP Clauses.cpp, flang/lib/Parser openmp-parsers.cpp parse-tree.cpp

[flang][OpenMP] Switch SOURCE/SINK to use modifier infrastructure (#217644)

They are instances of the dependence-type modifier in the spec. Putting
them into the modifier infrastructure in the compiler will remove the
need for them to be validated by hand in the future.
DeltaFile
+48-17flang/lib/Semantics/check-omp-structure.cpp
+26-22flang/test/Parser/OpenMP/ordered-depend.f90
+26-21flang/test/Parser/OpenMP/doacross-clause.f90
+19-17flang/lib/Lower/OpenMP/Clauses.cpp
+6-10flang/lib/Parser/parse-tree.cpp
+9-5flang/lib/Parser/openmp-parsers.cpp
+134-928 files not shown
+163-10714 files

LLVM/project a005951llvm/lib/Transforms/IPO LowerTypeTests.cpp, llvm/test/Transforms/LowerTypeTests export-alias.ll import-alias.ll

[llvm] Propagate dso_local for jump table aliases (#217101)

LowerTypeTests should propagate dso_local if the original function it
would generate an alias for was also dso_local. The benefit here is that
references to the alias can now use PCREL relocs which could prevent
some GOT-generating relocs. Note this is independent of the visibility
and linkage so the types of symbols this would benefit are external
non-hidden dso_local functions.

Gemini was used to help generate tests. I reviewed this to the best of
my ability before posting a PR.
DeltaFile
+25-9llvm/test/Transforms/LowerTypeTests/x86-jumptable.ll
+14-0llvm/lib/Transforms/IPO/LowerTypeTests.cpp
+11-1llvm/test/Transforms/LowerTypeTests/import-alias.ll
+10-1llvm/test/Transforms/LowerTypeTests/Inputs/exported-funcs.yaml
+8-2llvm/test/Transforms/LowerTypeTests/export-alias.ll
+2-0llvm/test/Transforms/LowerTypeTests/Inputs/import-alias.yaml
+70-136 files

LLVM/project e7a9648llvm/lib/Target/AMDGPU AMDGPUCodeGenPrepare.cpp, llvm/test/CodeGen/AMDGPU amdgpu-codegenprepare-fdiv.ll amdgpu-codegenprepare-fdiv.f64.ll

[AMDGPU] Do not propagate ninf/nsz from sqrt when forming rsq (#217599)

These flags only apply to the sqrt, not the quotient

1.0/sqrt(+0.0) is a valid +inf if the fdiv has no ninf, so copying them
makes it poison
DeltaFile
+87-48llvm/test/CodeGen/AMDGPU/amdgpu-codegenprepare-fdiv.f64.ll
+26-26llvm/test/CodeGen/AMDGPU/amdgpu-codegenprepare-fdiv.ll
+6-2llvm/lib/Target/AMDGPU/AMDGPUCodeGenPrepare.cpp
+119-763 files

LLVM/project c47d47aclang/docs ClangFormatStyleOptions.md, clang/include/clang/Format Format.h

[clang-format][docs] Fix grammar in AllowShortFunctionsOnASingleLine (#217625)

## Summary

The `InlineOnly` description said "does not implies `empty`". Change to
"does not imply".

Updated both `Format.h` (source of the style option docs) and
`ClangFormatStyleOptions.md`.

Fixes #195326

Assisted-by: Grok (xAI)
DeltaFile
+1-1clang/include/clang/Format/Format.h
+1-1clang/docs/ClangFormatStyleOptions.md
+2-22 files

LLVM/project 651bdf7flang/test/Semantics/OpenMP doacross.f90

Add more cases to diagnose
DeltaFile
+8-0flang/test/Semantics/OpenMP/doacross.f90
+8-01 files

LLVM/project 19b8265flang/lib/Semantics check-omp-structure.cpp

Only check iteration vector when it's allowed
DeltaFile
+11-6flang/lib/Semantics/check-omp-structure.cpp
+11-61 files

LLVM/project 540e355clang/lib/Basic TargetID.cpp, clang/lib/Basic/Targets AMDGPU.h AMDGPU.cpp

clang/AMDGPU: Use feature bitset for xnack/sramecc queries (#217704)

Complete the conversion of clang from the manual ArchAttr field
to the generated feature bitset.

Co-authored-by: Claude (Claude-Opus-4.8)
DeltaFile
+4-3clang/lib/Driver/ToolChains/AMDGPU.cpp
+4-3clang/lib/Basic/TargetID.cpp
+3-2llvm/lib/TargetParser/AMDGPUTargetParser.cpp
+2-1llvm/lib/Target/AMDGPU/AMDGPU.td
+1-1clang/lib/Basic/Targets/AMDGPU.h
+1-1clang/lib/Basic/Targets/AMDGPU.cpp
+15-116 files

LLVM/project 6f9c1deflang/lib/Semantics check-omp-structure.cpp

Fix typo
DeltaFile
+1-1flang/lib/Semantics/check-omp-structure.cpp
+1-11 files

LLVM/project b5f0749offload/test/offloading/CUDA stream_api.cu blocking_stream_semantics.cu, offload/test/offloading/HIP blocking_stream_semantics.hip

unify tests
DeltaFile
+0-131offload/test/offloading/CUDA/blocking_stream_semantics.cu
+127-0offload/test/offloading/language/blocking_stream_semantics.cpp
+0-125offload/test/offloading/HIP/blocking_stream_semantics.hip
+108-0offload/test/offloading/language/stream_api.cpp
+0-100offload/test/offloading/CUDA/stream_api.cu
+100-0offload/test/offloading/language/get_errs.cpp
+335-35646 files not shown
+1,084-1,95352 files

LLVM/project da92ff6lldb/source/Symbol SymbolLocator.cpp, lldb/unittests/Symbol SymbolLocatorTest.cpp

[lldb] Only report a symbol server error when the download failed (#217669)

Every symbol locator plugin writes into the same Status, and a plugin
that delivers a symbol file is under no obligation to clear what an
earlier step recorded there, so a search that ended in a download could
still report an error at the user. That contradicts what symbol_error
promises its readers, which is an explanation for a search that came up
short.

Take the download's own answer as the authority on whether anything was
delivered, and consult the Status only when nothing was.

Reported by Coverity (CID 1685292).

Assisted-by: Claude
DeltaFile
+29-3lldb/unittests/Symbol/SymbolLocatorTest.cpp
+5-3lldb/source/Symbol/SymbolLocator.cpp
+34-62 files

LLVM/project 9c8d7a8mlir/test/Dialect/OpenACC acc-compute-lowering-loop.mlir

[OpenACC] fix test after strict properties change (#217717)

Rebased shortly after the change and didn't catch the test failure
DeltaFile
+1-2mlir/test/Dialect/OpenACC/acc-compute-lowering-loop.mlir
+1-21 files

LLVM/project 499b333clang/docs BoundsSafetyImplPlans.rst, clang/include/clang/Basic Attr.td AttrDocs.td

[NFC][BoundsSafety] Give `counted_by_or_null`, `sized_by`, and `sized_by_or_null` their own documentation (#212877)

Previously the `counted_by`, `counted_by_or_null`, `sized_by`, and
`sized_by_or_null` attributes all pointed at a single `Documentation`
object (`CountedByDocs`). The generated `AttributeReference.rst`
therefore folded all four into one entry whose text described only
`counted_by` used on a C99 flexible array member.

This was misleading because the attributes differ in important ways that
went undocumented:

* `counted_by` counts *elements* whereas `sized_by` counts *bytes*.
* `counted_by` and `sized_by` require a null pointer to have a zero
count/size, while the `_or_null` variants allow a null pointer
regardless of the count or size.
* `counted_by` may be applied to a flexible array member, but
`sized_by`, `counted_by_or_null`, and `sized_by_or_null` apply to
pointers only.


    [34 lines not shown]
DeltaFile
+225-6clang/include/clang/Basic/AttrDocs.td
+9-0clang/docs/BoundsSafetyImplPlans.rst
+3-3clang/include/clang/Basic/Attr.td
+237-93 files

LLVM/project 0b2e935openmp/runtime/src kmp_sched.cpp

[NFCI][OpenMP][OMPT] Move `for_static_init` work callbacks into macro (#217259)

`__kmp_for_static_init` uses a very similar pattern for dispatching the
work callback to an attached tool throughout the function. Hence, avoid
the duplication by moving the pattern into a macro, taking the number of
loop iterations as an argument. Without OMPT, this macro is a no-op.

Signed-off-by: Jan André Reuter <jan at zyten.de>
DeltaFile
+12-26openmp/runtime/src/kmp_sched.cpp
+12-261 files

LLVM/project 299bf4allvm/lib/Target/AArch64 AArch64TargetTransformInfo.h AArch64TargetTransformInfo.cpp, llvm/lib/Target/ARM ARMTargetTransformInfo.h

[AArch64][ARM] Rename Type *Val to Ty. NFC (#217718)
DeltaFile
+18-19llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
+5-5llvm/lib/Target/AArch64/AArch64TargetTransformInfo.h
+2-2llvm/lib/Target/ARM/ARMTargetTransformInfo.h
+25-263 files

LLVM/project ffc4828flang/examples/FeatureList FeatureList.cpp

Add Doacross::Modifier to FeatureList.cpp
DeltaFile
+1-0flang/examples/FeatureList/FeatureList.cpp
+1-01 files

LLVM/project c6d146bbolt/lib/Passes BinaryPasses.cpp, bolt/lib/Rewrite RewriteInstance.cpp

[BOLT] Fix code section ordering comparator (#216725)

## Summary

`RewriteInstance::getCodeSections()` used a comparator that violated
strict weak ordering:

- Distinct special sections with the same name could each compare less
than the other.
- Different cold sections could each be equivalent to an `Other` section
while remaining ordered relative to one another.

This replaces that comparator with `CodeSectionOrder`, which assigns
explicit ranks to section kinds and orders cold-section suffixes
deterministically.

## Main-branch reproduction



    [49 lines not shown]
DeltaFile
+97-44bolt/lib/Rewrite/RewriteInstance.cpp
+55-0bolt/test/X86/code-section-order-injected.s
+11-7bolt/lib/Passes/BinaryPasses.cpp
+163-513 files

LLVM/project cb0fb6cflang/lib/Lower/OpenMP Utils.cpp, flang/test/Lower/OpenMP default-mapper-iso-c-nested.f90 explicit-map-flat-allocatable-no-mapper.f90

[Flang][OpenMP] Stop emitting implicit mappers for allocatable derived types (and arrays of them) unconditionally (#216184)

We should not be emitting these implicit mappers at the top level if the
contents of the derived type do not require mapping of allocatables. If
we do this, we negatively impact performance with unneccessary maps, in
certain cases (array of structs) this can be quite significant.
DeltaFile
+47-0flang/test/Lower/OpenMP/default-mapper-iso-c-nested.f90
+47-0flang/test/Lower/OpenMP/explicit-map-flat-allocatable-no-mapper.f90
+6-6flang/lib/Lower/OpenMP/Utils.cpp
+100-63 files

LLVM/project f2951f7clang/docs ReleaseNotes.md, clang/lib/Sema SemaDeclCXX.cpp

[Clang][Sema] Fix crash on default argument added after a parameter pack (#217386)

Fixes #216211

The DR1344 check that runs next locates "the
first defaulted parameter" as `getParamDecl(getMinRequiredArguments())`,
which is wrong when a parameter pack comes first: the pack is skipped by
the count but still occupies a slot. The lookup lands on the pack and
`assert(NewParam->hasDefaultArg())` fails. Without assertions, the
"makes this constructor a default constructor" error is emitted pointing
at the wrong parameter.

The DR1344 check now scans for the first parameter that actually has a
default argument, so the assertion holds and the diagnostic points at
the right parameter.

LLM tools were used for this contribution.
DeltaFile
+22-0clang/test/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p4.cpp
+5-2clang/lib/Sema/SemaDeclCXX.cpp
+5-0clang/docs/ReleaseNotes.md
+32-23 files

LLVM/project d125ad5clang/lib/CodeGen CGBuiltin.cpp

Fix typo
DeltaFile
+1-1clang/lib/CodeGen/CGBuiltin.cpp
+1-11 files

LLVM/project 4293693clang/lib/CodeGen CGBuiltin.cpp

Hoist assert
DeltaFile
+1-1clang/lib/CodeGen/CGBuiltin.cpp
+1-11 files

LLVM/project 400b052llvm/lib/Transforms/Vectorize VPlanTransforms.cpp, llvm/test/Transforms/LoopVectorize cast-induction.ll as_cast.ll

[VPlan] Sink single-scalar VPI to replicate regions (#208906)

The newly-introduced scalar-casts are sunk. The patch also generalizes
the existing special cases correctly using
vputils::doesGeneratePerAllLanes.
DeltaFile
+11-10llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+8-8llvm/test/Transforms/LoopVectorize/as_cast.ll
+2-2llvm/test/Transforms/LoopVectorize/cast-induction.ll
+21-203 files

LLVM/project 01b363cclang/lib/CodeGen CGOpenMPRuntime.cpp, llvm/include/llvm/Frontend/OpenMP OMPIRBuilder.h

[llvm][OpenMP] Use vector for number of threads and teams (#211453)

Changes necessary to support the `dims` modifier (OpenMP 6.1) in future PRs.
DeltaFile
+13-7llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp
+11-8llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
+6-3clang/lib/CodeGen/CGOpenMPRuntime.cpp
+4-4mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
+4-4llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h
+38-265 files

LLVM/project 4e1eac7clang/lib/Lex PPDirectives.cpp, clang/test/Modules repeated-include-missing-submodule.c

[clang][lex] Fix repeated `#import` of a header missing from umbrella (#217691)

The PR https://github.com/llvm/llvm-project/pull/216704 fixed repeated
`#import` of a header that belongs to a module in textual builds. One
omission was not setting the boolean we now use to make the decision to
import or skip when we tried importing a submodule but figured out it's
not covered by the umbrella. This PR fixes that.

rdar://185417139
DeltaFile
+18-0clang/test/Modules/repeated-include-missing-submodule.c
+1-0clang/lib/Lex/PPDirectives.cpp
+19-02 files

LLVM/project ac311c0offload/languages/include/kernel LanguageRuntime.h, offload/languages/kernel/src LanguageRuntime.cpp

add Memset
DeltaFile
+87-0offload/test/offloading/CUDA/memset.cu
+85-0offload/test/offloading/HIP/memset.hip
+14-0offload/languages/kernel/src/LanguageRuntime.cpp
+1-2offload/test/offloading/HIP/basic_launch_blocks_and_threads.hip
+1-2offload/test/offloading/CUDA/basic_launch_blocks_and_threads.cu
+2-0offload/languages/include/kernel/LanguageRuntime.h
+190-42 files not shown
+192-48 files