LLVM/project f484b74clang/include/clang/Analysis/Analyses/LifetimeSafety Facts.h, clang/include/clang/Basic DiagnosticGroups.td DiagnosticSemaKinds.td

[LifetimeSafety] Handle escape through assignment to global storage (#181646)

This PR allows for modelling escape of parameters to global storage, and
dangling global storage.

Change summary:

1. Created `GlobalEscapeFact` as a subclass of `OriginEscapesFact`
2. Emit a `GlobalEscapeFact` for all origins with global-storage that
remain live at function exit.
3. Integrated into warning reporting as necessary, introducing the
groups `-Wlifetime-safety-dangling-global` and
`-Wlifetime-safety-dangling-global-moved`
4. Wrote sema tests for escape to a variety of global storage locations.
DeltaFile
+44-0clang/test/Sema/warn-lifetime-safety-dangling-global.cpp
+37-0clang/lib/Sema/AnalysisBasedWarnings.cpp
+25-3clang/test/Sema/warn-lifetime-safety-noescape.cpp
+21-1clang/include/clang/Analysis/Analyses/LifetimeSafety/Facts.h
+17-1clang/include/clang/Basic/DiagnosticGroups.td
+14-0clang/include/clang/Basic/DiagnosticSemaKinds.td
+158-55 files not shown
+197-711 files

LLVM/project 733637flldb/source/Commands CommandObjectTarget.cpp CommandObjectProcess.cpp

[lldb] Use AppendMessageWithFormatv instead of AppendMessageWithFormat (#185012)

When the message ends with a newline. ...WithFormatv adds a newline
automatically.

Note that the ":x" style is lower case hex with 0x prefix. (see
llvm/include/llvm/Support/FormatProviders.h)

This change does not change uses where multiple chunks are emitted to
one line, or the message has embedded newlines. I want to deal with
these more complex cases later.

This is round 3 of N doing this, converting a few files at a time.
DeltaFile
+16-16lldb/source/Commands/CommandObjectTarget.cpp
+16-16lldb/source/Commands/CommandObjectProcess.cpp
+15-17lldb/source/Commands/CommandObjectBreakpoint.cpp
+5-5lldb/source/Commands/CommandObjectMemory.cpp
+52-544 files

LLVM/project 4a2fcceclang-tools-extra/test/clang-tidy/checkers/Inputs/Headers utility, clang-tools-extra/test/clang-tidy/checkers/bugprone forwarding-reference-overload.cpp use-after-move.cpp

[clang-tidy][NFC] Use universal utility mock in testcases [1/N] (#185431)

Follow-up PR of #185210. 

Only half of the affected test files are converted in this patch.
DeltaFile
+25-47clang-tools-extra/test/clang-tidy/checkers/bugprone/forwarding-reference-overload.cpp
+48-0clang-tools-extra/test/clang-tidy/checkers/Inputs/Headers/utility
+2-36clang-tools-extra/test/clang-tidy/checkers/bugprone/use-after-move.cpp
+2-32clang-tools-extra/test/clang-tidy/checkers/performance/move-const-arg-const-ref.cpp
+1-31clang-tools-extra/test/clang-tidy/checkers/performance/move-const-arg.cpp
+2-20clang-tools-extra/test/clang-tidy/checkers/performance/move-const-arg-trivially-copyable.cpp
+80-16610 files not shown
+97-29416 files

LLVM/project c1f3cb7clang/test/Preprocessor riscv-target-features.c, llvm/lib/Target/RISCV RISCVInstrInfoZvk.td RISCVFeatures.td

[RISCV] Make zvknha a subset of zvknhb (#178680)

zvknha is a strict subset of zvknhb. Treat it as such.

Ref:
https://github.com/riscv/riscv-isa-manual/blob/main/src/vector-crypto.adoc#zvknh
DeltaFile
+8-8llvm/test/CodeGen/RISCV/attributes.ll
+7-7llvm/lib/Target/RISCV/RISCVInstrInfoZvk.td
+11-0clang/test/Preprocessor/riscv-target-features.c
+4-4llvm/test/MC/RISCV/attribute-arch.s
+3-3llvm/test/MC/RISCV/rvv/zvknh.s
+1-5llvm/lib/Target/RISCV/RISCVFeatures.td
+34-273 files not shown
+40-319 files

LLVM/project 1729480libcxx/include vector module.modulemap.in, libcxx/include/__format formatter_bool_impl.h formatter_bool.h

[libc++] Reduce the amount of formatter code included in <vector> (#178683)

`formatter::parse` and `formatter::format` only have to accept
`basic_format_parse_context` and `basic_format_context` respectively,
which are only guaranteed to be provided via `<format>`. This allows us
to only declare the functions for `formatter<bool>` in `<vector>` and
define them if `<format>` is included. This reduces the amount of time
it takes to parse `<vector>` by ~15% on my system.
DeltaFile
+60-0libcxx/include/__format/formatter_bool_impl.h
+5-30libcxx/include/__format/formatter_bool.h
+10-6libcxx/include/vector
+0-14libcxx/test/libcxx/transitive_includes/cxx26.csv
+9-1libcxx/include/module.modulemap.in
+4-3libcxx/test/support/platform_support.h
+88-543 files not shown
+91-569 files

LLVM/project 3a03764libcxx/utils/ci/docker docker-compose.yml

[libc++] Update the docker base image version (#185592)

This updates the base image version so we can update our compilers.
DeltaFile
+2-2libcxx/utils/ci/docker/docker-compose.yml
+2-21 files

LLVM/project c889454llvm/include/llvm/MC MCAsmInfo.h, llvm/lib/MC MCContext.cpp

[MC] Rename PrivateGlobalPrefix to InternalSymbolPrefix. NFC (#185164)

The "private global" terminology, likely came from
llvm/lib/IR/Mangler.cpp, is misleading: "private" is the opposite of
"global", and these prefixed symbols are not global in the object file
format sense (e.g. ELF has STB_GLOBAL while these symbols are always
STB_LOCAL). The term "internal symbol" better describes their purpose:
symbols for internal use by compilers and assemblers, not meant to be
visible externally.

This rename is a step toward adopting the "internal symbol prefix"
terminology agreed with GNU as
(https://sourceware.org/pipermail/binutils/2026-March/148448.html).
DeltaFile
+13-13llvm/lib/Target/ARM/ARMAsmPrinter.cpp
+6-6llvm/lib/MC/MCContext.cpp
+6-6llvm/lib/Target/MSP430/MSP430MCInstLower.cpp
+6-6llvm/include/llvm/MC/MCAsmInfo.h
+6-6llvm/lib/Target/Lanai/LanaiMCInstLower.cpp
+4-5llvm/lib/Target/ARM/ARMISelLowering.cpp
+41-4241 files not shown
+101-10247 files

LLVM/project fe04edclibcxx/docs/ReleaseNotes 23.rst, libcxx/include deque

[libc++] Fix strict aliasing violation for `deque::const_iterator` (#136067)

When the allocators use fancy pointers, the internal map of `deque`
stores `FancyPtr<T>` objects, and the previous strategy accessed these
objects via `const FancyPtr<const T>` lvalues, which usually caused core
language undefined behavior. Now `const_iterator` stores `FancyPtr<const
FancyPtr<T>>` instead of `FancyPtr<const FancyPtr<const T>>`, and ABI
break can happen when such two types have incompatible layouts.

This is necessary for reducing undefined behavior and `constexpr`
support for `deque` in C++26, and I currently don't want to provide any
way to opt-out of that behavior.

For `iterator`, the current strategy makes it store
`FancyPtr<FancyPtr<T>>`. But it would make more sense to also store
`FancyPtr<const FancyPtr<T>>` because we never modify the map via
`iterator`.

For some pathological combinations of allocators and fancy pointers, the

    [3 lines not shown]
DeltaFile
+23-12libcxx/include/deque
+9-0libcxx/docs/ReleaseNotes/23.rst
+32-122 files

LLVM/project 2571b13llvm/include/llvm/ExecutionEngine/Orc WaitingOnGraphOpReplay.h WaitingOnGraph.h, llvm/test/ExecutionEngine/JITLink/Generic waiting-on-graph-capture-replay.test

[ORC] Add WaitingOnGraph record / replay facilities. (#185275)

WaitingOnGraph is critical to the performance of LLVM's JIT (see e.g.
https://github.com/llvm/llvm-project/issues/179611), and these facilities will
make it easier to capture and investigate test cases, and build a performance
regression suite.

WaitingOnGraph::OpRecorder provides an interface for classes that want to
capture the essential WaitingOnGraph operations: simplify-and-emit, and fail.
WaitingOnGraph::simplify and WaitingOnGraph::fail now take an optional
OpRecorder pointer.

WaitingOnGraphOpStreamRecorder (WaitingOnGraphOpReplay.h) is an OpRecorder
implementation that serializes operations to a line-oriented text format on a
raw_ostream. WaitingOnGraphOpReplay provides types and utilities for iterating
over and replaying recorded operations. readWaitingOnGraphOpsFromBuffer returns
an iterator range over the ops in a serialized buffer.

The new ExecutionSession::setWaitingOnGraphOpRecorder method can be used to

    [8 lines not shown]
DeltaFile
+462-0llvm/include/llvm/ExecutionEngine/Orc/WaitingOnGraphOpReplay.h
+94-1llvm/tools/llvm-jitlink/llvm-jitlink.cpp
+44-0llvm/unittests/ExecutionEngine/Orc/WaitingOnGraphTest.cpp
+26-0llvm/tools/llvm-jitlink/llvm-jitlink.h
+18-2llvm/include/llvm/ExecutionEngine/Orc/WaitingOnGraph.h
+17-0llvm/test/ExecutionEngine/JITLink/Generic/waiting-on-graph-capture-replay.test
+661-32 files not shown
+683-58 files

LLVM/project 8ec961ellvm/lib/Target/AMDGPU AMDGPULowerKernelAttributes.cpp, llvm/lib/Target/AMDGPU/Utils AMDGPUBaseInfo.h AMDGPUBaseInfo.cpp

Reapply "AMDGPU: Annotate group size ABI loads with range metadata (#185420)" (#185588)

This reverts commit d5685ac6db0ae4cbca1745f18d8f2f7dc7d673a5.

Fix off by one error. The end of the range is open.
DeltaFile
+122-15llvm/test/CodeGen/AMDGPU/implicit-arg-v5-opt.ll
+48-19llvm/lib/Target/AMDGPU/AMDGPULowerKernelAttributes.cpp
+8-7llvm/test/CodeGen/AMDGPU/implicit-arg-block-count.ll
+8-7llvm/test/CodeGen/AMDGPU/amdgpu-max-num-workgroups-load-annotate.ll
+5-2llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h
+0-5llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp
+191-552 files not shown
+193-578 files

LLVM/project 3cd9ca3clang-tools-extra/clang-tidy/performance FasterStringFindCheck.cpp FasterStringFindCheck.h, clang-tools-extra/docs ReleaseNotes.rst

[clang-tidy] Fix false negatives in performance-faster-string-find with libstdc++ (#185559)

The check previously used a custom, heuristic-based matcher to avoid
matching inside uninstantiated generic templates. However, the matcher
caught the `SubstTemplateTypeParmType` from `libstdc++`, silencing valid
warnings.

This PR removes manual template filtering and uses
`TK_IgnoreUnlessSpelledInSource` instead.

As of AI Usage: Gemini 3 is used for pre-commit reviews.
Closes https://github.com/llvm/llvm-project/issues/182012
DeltaFile
+21-6clang-tools-extra/test/clang-tidy/checkers/performance/faster-string-find.cpp
+2-14clang-tools-extra/clang-tidy/performance/FasterStringFindCheck.cpp
+6-3clang-tools-extra/docs/ReleaseNotes.rst
+3-0clang-tools-extra/clang-tidy/performance/FasterStringFindCheck.h
+32-234 files

LLVM/project 59e6f31llvm/lib/Analysis DependenceAnalysis.cpp

[DA] Remove absolute value calculations in the Weak Zero SIV tests
DeltaFile
+7-7llvm/lib/Analysis/DependenceAnalysis.cpp
+7-71 files

LLVM/project 9140528llvm/test/Analysis/DependenceAnalysis weak-zero-siv-addrec-wrap.ll

[DA] Update tests for the Weak Zero SIV tests (NFC)
DeltaFile
+112-0llvm/test/Analysis/DependenceAnalysis/weak-zero-siv-addrec-wrap.ll
+112-01 files

LLVM/project 030571bllvm/include/llvm/Analysis DependenceAnalysis.h, llvm/lib/Analysis DependenceAnalysis.cpp

[DA] Consolidate the core logic of the Weak Zero SIV tests (NFCI)
DeltaFile
+80-124llvm/lib/Analysis/DependenceAnalysis.cpp
+5-0llvm/include/llvm/Analysis/DependenceAnalysis.h
+85-1242 files

LLVM/project e60dd7fllvm/lib/Analysis DependenceAnalysis.cpp, llvm/test/Analysis/DependenceAnalysis weak-zero-siv-addrec-wrap.ll

[DA] Add nsw check for addrecs in the Weak Zero SIV tests
DeltaFile
+31-16llvm/test/Analysis/DependenceAnalysis/weak-zero-siv-addrec-wrap.ll
+3-0llvm/lib/Analysis/DependenceAnalysis.cpp
+34-162 files

LLVM/project b7992dfllvm/lib/Target/AMDGPU AMDGPULowerKernelAttributes.cpp, llvm/lib/Target/AMDGPU/Utils AMDGPUBaseInfo.h AMDGPUBaseInfo.cpp

Reapply "AMDGPU: Annotate group size ABI loads with range metadata (#185420)"

This reverts commit d5685ac6db0ae4cbca1745f18d8f2f7dc7d673a5.

Fix off by one error. The end of the range is open.
DeltaFile
+122-15llvm/test/CodeGen/AMDGPU/implicit-arg-v5-opt.ll
+48-19llvm/lib/Target/AMDGPU/AMDGPULowerKernelAttributes.cpp
+8-7llvm/test/CodeGen/AMDGPU/amdgpu-max-num-workgroups-load-annotate.ll
+8-7llvm/test/CodeGen/AMDGPU/implicit-arg-block-count.ll
+5-2llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h
+0-5llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp
+191-552 files not shown
+193-578 files

LLVM/project a682073llvm/lib/Target/X86 X86InstrAVX10.td X86IntrinsicsInfo.h, llvm/test/CodeGen/X86 avx10_2minmax-intrinsics.ll

Fixing upper lane return source for X86 intrinsics (#185329)

Closes https://github.com/llvm/llvm-project/issues/184245
DeltaFile
+57-0llvm/test/CodeGen/X86/avx10_2minmax-intrinsics.ll
+12-12llvm/lib/Target/X86/X86InstrAVX10.td
+9-6llvm/lib/Target/X86/X86IntrinsicsInfo.h
+78-183 files

LLVM/project 432745fmlir/lib/Dialect/LLVMIR/Transforms InlinerInterfaceImpl.cpp, mlir/test/Dialect/LLVMIR inlining.mlir

[MLIR][LLVMIR] Preserve byval alignment in memcpy after inlining (#185433)

This PR adds alignment attributes to the generated memcpy intrinsics
after inlining functions with byval arguments.
DeltaFile
+20-0mlir/test/Dialect/LLVMIR/inlining.mlir
+11-1mlir/lib/Dialect/LLVMIR/Transforms/InlinerInterfaceImpl.cpp
+31-12 files

LLVM/project b093513llvm/lib/Analysis DependenceAnalysis.cpp

[DA] Remove absolute value calculations in the Weak Zero SIV tests
DeltaFile
+7-7llvm/lib/Analysis/DependenceAnalysis.cpp
+7-71 files

LLVM/project d47612dllvm/lib/Analysis DependenceAnalysis.cpp, llvm/test/Analysis/DependenceAnalysis weak-zero-siv-addrec-wrap.ll

[DA] Add nsw check for addrecs in the Weak Zero SIV tests
DeltaFile
+31-16llvm/test/Analysis/DependenceAnalysis/weak-zero-siv-addrec-wrap.ll
+3-0llvm/lib/Analysis/DependenceAnalysis.cpp
+34-162 files

LLVM/project 0e06371llvm/test/Analysis/DependenceAnalysis weak-zero-siv-addrec-wrap.ll

[DA] Update tests for the Weak Zero SIV tests (NFC)
DeltaFile
+112-0llvm/test/Analysis/DependenceAnalysis/weak-zero-siv-addrec-wrap.ll
+112-01 files

LLVM/project d056888llvm/include/llvm/Analysis DependenceAnalysis.h, llvm/lib/Analysis DependenceAnalysis.cpp

[DA] Consolidate the core logic of the Weak Zero SIV tests (NFCI)
DeltaFile
+75-124llvm/lib/Analysis/DependenceAnalysis.cpp
+5-0llvm/include/llvm/Analysis/DependenceAnalysis.h
+80-1242 files

LLVM/project a266f60llvm/test/CodeGen/AArch64 sve2-bf16-converts.ll sve-bf16-converts.ll, llvm/test/CodeGen/PowerPC scalar_cmp.ll

[SelectionDAG] Remove `NoNaNsFPMath` uses (#183448)

This pr removes the rest uses in LLVMCodeGen.
DeltaFile
+112-68llvm/test/CodeGen/AArch64/sve2-bf16-converts.ll
+71-40llvm/test/CodeGen/AArch64/sve-bf16-converts.ll
+15-15llvm/test/CodeGen/X86/avx512fp16-fminimum-fmaximum.ll
+13-13llvm/test/CodeGen/X86/fminimum-fmaximum.ll
+13-13llvm/test/CodeGen/X86/fminimumnum-fmaximumnum.ll
+10-12llvm/test/CodeGen/PowerPC/scalar_cmp.ll
+234-1619 files not shown
+261-18415 files

LLVM/project 710ce4eclang/lib/Driver/ToolChains AMDGPU.cpp, clang/test/Driver hip-sanitize-options.hip amdgpu-openmp-sanitize-options.c

Revert "[ASan] Enable Internalization for 'asanrtl.bc' in Driver (#18… (#185458)

…2825)"

Enabling internalization of `asanrtl.bc` breaks the asan reporting on
hip side , due to duplicate `__asan_report_XXX` calls in code object and
the llvm-ir.

This reverts commit dc26edd9b6602857b67f35c8d2f6fe4ed13c8137.
DeltaFile
+12-12clang/test/Driver/hip-sanitize-options.hip
+1-1clang/test/Driver/amdgpu-openmp-sanitize-options.c
+1-1clang/lib/Driver/ToolChains/AMDGPU.cpp
+1-1clang/test/Driver/rocm-device-libs.cl
+15-154 files

LLVM/project a2a3708llvm/lib/Analysis DependenceAnalysis.cpp

[DA] Remove absolute value calculations in the Weak Zero SIV tests
DeltaFile
+7-7llvm/lib/Analysis/DependenceAnalysis.cpp
+7-71 files

LLVM/project d140ee5llvm/lib/Analysis DependenceAnalysis.cpp, llvm/test/Analysis/DependenceAnalysis weak-zero-siv-addrec-wrap.ll

[DA] Add nsw check for addrecs in the Weak Zero SIV tests
DeltaFile
+4-4llvm/test/Analysis/DependenceAnalysis/weak-zero-siv-addrec-wrap.ll
+3-0llvm/lib/Analysis/DependenceAnalysis.cpp
+7-42 files

LLVM/project 3b6243ellvm/test/Analysis/DependenceAnalysis weak-zero-siv-addrec-wrap.ll

[DA] Update tests for the Weak Zero SIV tests (NFC)
DeltaFile
+127-0llvm/test/Analysis/DependenceAnalysis/weak-zero-siv-addrec-wrap.ll
+127-01 files

LLVM/project 6907dc1llvm/include/llvm/Analysis DependenceAnalysis.h, llvm/lib/Analysis DependenceAnalysis.cpp

[DA] Consolidate the core logic of the Weak Zero SIV tests (NFCI)
DeltaFile
+75-124llvm/lib/Analysis/DependenceAnalysis.cpp
+5-0llvm/include/llvm/Analysis/DependenceAnalysis.h
+80-1242 files

LLVM/project 737b4f4llvm/include/llvm/Analysis DependenceAnalysis.h, llvm/lib/Analysis DependenceAnalysis.cpp

[DA] Extract reversing dependence logic (NFCI)
DeltaFile
+10-7llvm/lib/Analysis/DependenceAnalysis.cpp
+6-0llvm/include/llvm/Analysis/DependenceAnalysis.h
+16-72 files

LLVM/project 54b671elibcxx/include optional

[libc++][NFC] Simplify most of `optional.observe` (#185252)

- Hoist `operator*()`, `operator->()`, `value()` into their respective
`optional_storage_base` to reduce the amount of concepts flying around.
- `value_or()` has been deliberately left out since that seems to
produce extra (superfluous) error messages during invalid template
instantiation.
DeltaFile
+75-115libcxx/include/optional
+75-1151 files