LLVM/project 5f668c4 — clang/utils/perf-training lit.site.cfg.in lit.cfg, clang/utils/perf-training/llvm-support build.test

[CMake] Pass through -DCMAKE_MAKE_PROGRAM= when generating profdata for clang (#225970)

Since we're already passing the -DCMAKE_GENERATOR through, we need the
corresponding CMAKE_MAKE_PROGRAM, which CMake doesn't always know how to
find itself.

rdar://187916126
DeltaFile
+1-1clang/utils/perf-training/llvm-support/build.test
+1-0clang/utils/perf-training/lit.site.cfg.in
+1-0clang/utils/perf-training/lit.cfg
+1-0clang/utils/perf-training/bolt.lit.site.cfg.in
+1-0clang/utils/perf-training/bolt.lit.cfg
+5-15 files

LLVM/project 271e877 — llvm/lib/ExecutionEngine/Orc ReOptimizeLayer.cpp

[ORC] Match const void *Tag signature in orc_rt_lite_reoptimize_helper (#237757)

SelfExecutorProcessControl::jitDispatchViaWrapperFunctionManager takes a
const void *FnTag second parameter; using void *Tag in
orc_rt_lite_reoptimize_helper's JITDispatch function pointer trips
-fsanitize=cfi-icall.

This is needed to remove the `LIT_FILTER_OUT="ExecutionEngine/"`
workaround in
https://github.com/llvm/llvm-zorg/blob/d6d19aa00e80a00ee06119d173d1979dbeed1ab2/zorg/buildbot/builders/sanitizers/buildbot_functions.sh#L665
on
https://lab.llvm.org/buildbot/#/builders/sanitizer-x86_64-linux-bootstrap-cfi
and
https://lab.llvm.org/buildbot/#/builders/sanitizer-aarch64-linux-bootstrap-cfi.

Assisted-by: Gemini
DeltaFile
+2-2llvm/lib/ExecutionEngine/Orc/ReOptimizeLayer.cpp
+2-21 files

LLVM/project 73fd9cd — llvm/lib/Target/AMDGPU SIFixSGPRCopies.cpp SIFixSGPRCopies.h, llvm/test/CodeGen/AMDGPU fix-sgpr-copies-nophis.mir

[AMDGPU] Clear NoPHIs after SIFixSGPRCopies under the new pass manager (#238429)

SIFixSGPRCopies can build waterfall loops, which add PHIs. The legacy
pass declares that it clears NoPHIs, but the new pass manager's
SIFixSGPRCopiesPass declared no properties and never applied them. So a
function kept NoPHIs after the pass added a PHI, and the machine
verifier rejected it. Declare the cleared property and apply it with
MFPropsModifier. The test waterfalls a buffer load's resource under both
pass managers.
DeltaFile
+31-0llvm/test/CodeGen/AMDGPU/fix-sgpr-copies-nophis.mir
+5-0llvm/lib/Target/AMDGPU/SIFixSGPRCopies.h
+1-0llvm/lib/Target/AMDGPU/SIFixSGPRCopies.cpp
+37-03 files

LLVM/project f2eecdd — llvm/lib/Target/AMDGPU SIISelLowering.cpp, llvm/test/CodeGen/AMDGPU fptoi.i128.ll amdgpu-mul24-knownbits.ll

[AMDGPU] Use the mul24 result width for known bits

Extend the low 24 operand bits to the destination width before multiplying. Using the i32 operand width for i64 results can incorrectly fold upper product bits to zero.

Cover signed and unsigned i64 results and restore the bf16-to-i128 sign-extension checks affected by the incorrect inference.
DeltaFile
+89-0llvm/test/CodeGen/AMDGPU/amdgpu-mul24-knownbits.ll
+1-1llvm/lib/Target/AMDGPU/SIISelLowering.cpp
+2-0llvm/test/CodeGen/AMDGPU/fptoi.i128.ll
+92-13 files

LLVM/project 90fb25a — llvm/lib/Target/AMDGPU SIISelLowering.cpp, llvm/test/CodeGen/AMDGPU fptoi.i128.ll lshl64-to-32.ll

[AMDGPU] Track GlobalISel known bits for mul24 intrinsics

Sign or zero extend the low 24 operand bits before querying KnownBits::mul. This allows GlobalISel to narrow shifts and simplify address calculations through mul24 intrinsics.

Cover ignored high bits, zero operands and overflow, and update the affected codegen checks.
DeltaFile
+165-0llvm/test/CodeGen/AMDGPU/amdgpu-mul24-knownbits.ll
+78-0llvm/test/CodeGen/AMDGPU/lshl64-to-32.ll
+25-35llvm/test/CodeGen/AMDGPU/GlobalISel/shl-ext-reduce.ll
+18-0llvm/lib/Target/AMDGPU/SIISelLowering.cpp
+0-2llvm/test/CodeGen/AMDGPU/fptoi.i128.ll
+286-375 files

LLVM/project ec9963c — llvm/test/Transforms/InstCombine mul-knownbits-negative.ll

[KnownBits] Cover negative multiplication boundaries

Exercise both operand orders and i8, i32, i65 and i128 results. Preserve cases where zero or signed and unsigned wraparound prevent leading-bit inference.
DeltaFile
+278-0llvm/test/Transforms/InstCombine/mul-knownbits-negative.ll
+278-01 files

LLVM/project daaa2f6 — llvm/utils/TableGen/Common CodeGenSchedule.cpp

TableGen: Keep the instregex prefix for patterns with a top-level ?

instregex discarded a pattern's literal prefix, and ran the regex on
every instruction, if the pattern had a ? outside parentheses, as in
LDPS?Wi. A ? only makes the atom before it optional, and an atom
directly before it is already dropped from the prefix. Only a top-level
| makes the prefix unusable.

AArch64GenSubtargetInfo.inc tablegen run:

            Gigainstructions  Gigacycles      CPU seconds
  Before    44.6              18.8            5.7
  After     43.1 (-3.4%)      17.8 (-4.9%)    5.4 (-4.6%)

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+3-2llvm/utils/TableGen/Common/CodeGenSchedule.cpp
+3-21 files

LLVM/project 92bb278 — llvm/tools/sancov sancov.cpp

Rename function.
DeltaFile
+7-6llvm/tools/sancov/sancov.cpp
+7-61 files

LLVM/project c39757f — clang/lib/CIR/Dialect/Transforms TargetLowering.cpp CXXABILowering.cpp, clang/lib/CIR/Lowering/DirectToLLVM LowerToLLVM.h LowerToLLVM.cpp

[CIR][NFCI] Prepare LLVM lowering patterns for one-shot conversion (#235196)

One-shot conversion (which speeds up LLVM lowering significantly) erases
the root op as soon as a pattern replaces it, so any read of the op past
that point is a use after free. Capture the values the lowering patterns
reuse after the replace: the parent location and module in the
CIRAttrToValue visitors and the MemSet alignment. AtomicXchg is split
into create plus replace so the forward helpers still see a live op.

Region type conversion also moves ahead of the block moves in the FuncOp
and generic patterns, so a conversion failure leaves the body unmoved
for the driver to report.
DeltaFile
+162-156clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp
+12-7clang/lib/CIR/Dialect/Transforms/TargetLowering.cpp
+12-7clang/lib/CIR/Dialect/Transforms/CXXABILowering.cpp
+2-2clang/test/CIR/CodeGen/complex-mul-div.cpp
+3-1clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.h
+1-1clang/utils/TableGen/CIRLoweringEmitter.cpp
+192-1746 files

LLVM/project da5e737 — clang/docs/BoundsSafety index.md BoundsSafetyUpstreamStatus.md

[BoundsSafety][Docs] Track upstream status in a GitHub issue

Replace the BoundsSafetyUpstreamStatus page with a short summary in the
Upstream Status section of the index page, and link to a tracking issue
for the details. The per-feature tables and PR links change often, and
are easier to keep up to date in an issue than in the docs.

Assisted-by: Sonnet 5.5
DeltaFile
+0-47clang/docs/BoundsSafety/BoundsSafetyUpstreamStatus.md
+24-4clang/docs/BoundsSafety/index.md
+24-512 files

LLVM/project 35be6c2 — llvm/lib/Target/BPF BPFISelDAGToDAG.cpp, llvm/test/CodeGen/BPF rodata_8.ll

[BPF] Sign-extend constants folded from sign-extending loads (#238316)

`PreprocessLoad` replaces a load from a constant global with the
constant value, but always zero-extends it. On v4, where LDSX is legal,
the load can be a `SEXTLOAD`, and the sign extension is lost:
```
  struct S { signed char a; };
  static const struct S g = { -1 };
  long f(void) { return *(&g.a); }
```
  clang --target=bpf -mcpu=v4 -O0:  r0 = 255     ; should be -1

At -O1 and above the load is folded in IR first, and clang folds a plain
`g.a` itself, hence `-O0` and `*(&g.a)`.

Sign-extend the folded constant when the load is a `SEXTLOAD`.
DeltaFile
+77-0llvm/test/CodeGen/BPF/rodata_8.ll
+6-1llvm/lib/Target/BPF/BPFISelDAGToDAG.cpp
+83-12 files

LLVM/project 81a7107 — llvm/docs/Proposals VariableNames.rst VariableNames.md, llvm/utils/gn README.rst README.md

[LLVM][docs] Rename llvm rst docs to md [1/2] (#234561)

Tracking issue:
[#201242](https://github.com/llvm/llvm-project/issues/201242)

See the [migration
guide](https://llvm.org/docs/SphinxQuickstartTemplate.html#markdown-migration-guidelines)
for more information.

this is the initial straight rename commit.
it will probably break the docs build, but it has to be a separate pr
for blame preservation purposes.
DeltaFile
+0-397llvm/docs/Proposals/VariableNames.rst
+397-0llvm/docs/Proposals/VariableNames.md
+0-136llvm/utils/gn/README.rst
+136-0llvm/utils/gn/README.md
+0-69llvm/utils/lit/README.rst
+69-0llvm/utils/lit/README.md
+602-6026 files

LLVM/project 9ecf4a2 — clang/lib/CIR/Dialect/Transforms EHABILowering.cpp, clang/test/CIR/CodeGen ehspec-noexcept.cpp

[CIR][EH] Drop personality from functions without landing pads (#236322)

Match classic codegen, which sets a personality only where it emits
landing pad and erase the personality declaration once it is unused
DeltaFile
+46-0clang/test/CIR/Transforms/eh-abi-lowering-personality.cir
+26-3clang/lib/CIR/Dialect/Transforms/EHABILowering.cpp
+1-7clang/test/CIR/CodeGen/ehspec-noexcept.cpp
+73-103 files

LLVM/project 9bfef45 — llvm/include/llvm/IR RuntimeLibcallsImpl.td RuntimeLibcalls.td

RuntimeLibcalls: Use size_t for the align_val_t arguments of new and delete (#238237)

std::align_val_t has size_t as its underlying type. Some overloads
used IntPlus, which is too narrow on 64-bit targets. No test changes
because no target adds these to the libcall sets yet.

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+20-20llvm/include/llvm/IR/RuntimeLibcalls.td
+1-0llvm/include/llvm/IR/RuntimeLibcallsImpl.td
+21-202 files

LLVM/project 6e4fff0 — llvm/lib/Target/X86 X86ISelLoweringCall.cpp, llvm/test/CodeGen/X86 ptr32-call.ll

[X86] Fix crash when calling through __ptr32 function pointer (#209078)

Fixes #56199 

Calling through a __ptr32 function pointer on x86-64 crashes during
instruction selection
because LowerCall doesn't extend the 32-bit callee to 64-bit.
This patch sign-extends __sptr (addrspace 270) and zero-extends __uptr
(addrspace 271)
callee pointers to i64 before building the CALL/TC_RETURN node.
DeltaFile
+62-0llvm/test/CodeGen/X86/ptr32-call.ll
+12-0llvm/lib/Target/X86/X86ISelLoweringCall.cpp
+74-02 files

LLVM/project 51489b3 — clang/docs MemorySanitizer.md

[Docs, MemorySanitizer] Reword to improve readability (#235477)
DeltaFile
+2-2clang/docs/MemorySanitizer.md
+2-21 files

LLVM/project bf5ec26 — llvm/lib/Transforms/Vectorize LoopVectorizationLegality.cpp

Remove newline
DeltaFile
+0-1llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp
+0-11 files

LLVM/project 322e2c6 — clang/lib/Driver/ToolChains CommonArgs.cpp, clang/test/Driver lto-aix.c

CodeGen: Replace TargetOptions::DebuggerTuning with module flag

Read the debugger tuning from the module's "debugger-tuning" flag instead of
TargetOptions. Delete the now-dead -debugger-tune= cl::opt and the
TargetOptions::DebuggerTuning field.

Update the tests relying on it to directly use the module flag. The cases
that exercise multiple values do a text substitution to swap the value.
Alternatively this could be changed to synthesize the module flag in the
llc flag like some of the other widely used module flags do.

Co-authored-by: Claude Sonnet 5 <noreply at anthropic.com>
DeltaFile
+24-19llvm/test/DebugInfo/MIR/X86/call-site-gnu-vs-dwarf5-attrs.mir
+6-16llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+12-9llvm/test/DebugInfo/X86/convert-debugloc.ll
+6-14clang/test/Driver/lto-aix.c
+13-5llvm/test/DebugInfo/X86/debugger-tune.ll
+0-17clang/lib/Driver/ToolChains/CommonArgs.cpp
+61-8058 files not shown
+243-25164 files

LLVM/project 3ecc27b — llvm/lib/CodeGen/LiveDebugValues LiveDebugValues.cpp

Not sure why the bot needs this include but I don't
DeltaFile
+1-0llvm/lib/CodeGen/LiveDebugValues/LiveDebugValues.cpp
+1-01 files

LLVM/project b5c129a — llvm/include/llvm/IR Module.h, llvm/lib/CodeGen/AsmPrinter DwarfDebug.cpp

Actually resolve the default in Module
DeltaFile
+2-1llvm/include/llvm/IR/Module.h
+0-2llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+1-1llvm/lib/IR/Module.cpp
+3-43 files

LLVM/project 2b23e95 — llvm/test/DebugInfo/Generic 2010-04-19-FramePtr.ll

Fix 2010-04-19-FramePtr.ll on non-Darwin hosts

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply at anthropic.com>
DeltaFile
+4-2llvm/test/DebugInfo/Generic/2010-04-19-FramePtr.ll
+4-21 files

LLVM/project 0dc300d — flang/lib/Semantics check-omp-variant.cpp canonicalize-omp.cpp, flang/test/Semantics/OpenMP metadirective-declare-reduction-v52.f90 metadirective-declare-reduction-v51.f90

[flang][OpenMP] Improve diagnosing invalid operators in DECLARE_REDUCTION (#232353)

Move the check out of the common MakeNameFromOperator function and
into OmpStructureChecker. Remove the no longer needed SemanticsContext
parameter in MakeNameFromOperator.

This will allow reusing at least some parts of the the name-mangling
code in DECLARE_INDUCTION.
DeltaFile
+58-21flang/lib/Semantics/check-omp-structure.cpp
+61-0flang/test/Semantics/OpenMP/metadirective-declare-reduction-v52.f90
+61-0flang/test/Semantics/OpenMP/metadirective-declare-reduction-v51.f90
+36-20flang/lib/Semantics/openmp-utils.cpp
+30-9flang/lib/Semantics/canonicalize-omp.cpp
+19-1flang/lib/Semantics/check-omp-variant.cpp
+265-5115 files not shown
+305-7721 files

LLVM/project 8a3983e — llvm/lib/Transforms/Vectorize VPlan.h

[VPlan] Simplify VPInstruction::hasResult (NFC) (#237926)

We can directly use the scalar type stored in VPRecipeBase.
DeltaFile
+1-24llvm/lib/Transforms/Vectorize/VPlan.h
+1-241 files

LLVM/project 4436467 — lldb/include/lldb/Target Process.h, lldb/source/Target Process.cpp

[LLDB] Guard Process::m_instrumentation_runtimes with a mutex

This patch is the sixth part in a patch series that will allow
enabling/disabling InstrumentationRuntime plugins in a running debug
session.

`Process::m_instrumentation_runtimes` can be accessed from multiple
threads. For example, a plugin can be enabled/disabled in a process
from the command thread (or from another debugger when using the
`global` domain) while `Process::ModulesDidLoad()` iterates over the
plugins on another thread, or while an SB API client calls
`Process::GetInstrumentationRuntime()`. These accesses were
unsynchronized.

Now every access to `m_instrumentation_runtimes` is guarded by the new
`m_instrumentation_runtimes_mutex`:

* `Process::Finalize()` and `Process::DidExec()` clear the map while
  holding the mutex.

    [13 lines not shown]
DeltaFile
+25-10lldb/source/Target/Process.cpp
+2-0lldb/include/lldb/Target/Process.h
+27-102 files

LLVM/project 06ee859 — lldb/include/lldb/Target InstrumentationRuntime.h, lldb/source/Plugins/InstrumentationRuntime/ASan InstrumentationRuntimeASan.cpp

[LLDB] Keep InstrumentationRuntime plugins alive during breakpoint callbacks

This patch is the fifth part in a patch series that will allow
enabling/disabling InstrumentationRuntime plugins in a running debug
session.

InstrumentationRuntime plugins passed a raw `this` pointer as the baton
for their breakpoint callbacks. Now that disabling a plugin in a process
destroys the plugin instance, a plugin could be destroyed (e.g. by
`plugin disable` running on the command thread) while one of its
breakpoint callbacks was running on another thread (e.g. the thread
handling the stop event), causing a use-after-free.

Try to partially fix this by keeping a plugin alive while the baton is being
used.  Now the plugins use a baton created by
`InstrumentationRuntime::CreateBreakpointBaton()` which only holds a weak
reference to the plugin. In a callback,
`InstrumentationRuntime::GetRuntimeFromBaton()` gets a strong reference to the
plugin which keeps the plugin alive until the callback finishes.  If the plugin

    [13 lines not shown]
DeltaFile
+6-13lldb/source/Target/Process.cpp
+14-0lldb/source/Target/InstrumentationRuntime.cpp
+12-0lldb/include/lldb/Target/InstrumentationRuntime.h
+8-3lldb/source/Plugins/InstrumentationRuntime/TSan/InstrumentationRuntimeTSan.cpp
+8-3lldb/source/Plugins/InstrumentationRuntime/ASan/InstrumentationRuntimeASan.cpp
+8-2lldb/source/Plugins/InstrumentationRuntime/MainThreadChecker/InstrumentationRuntimeMainThreadChecker.cpp
+56-212 files not shown
+71-258 files

LLVM/project 50491c1 — llvm/lib/Transforms/Vectorize LoopVectorizationPlanner.h LoopVectorizationLegality.cpp, llvm/test/Transforms/LoopVectorize compress-idioms.ll

Fixups
DeltaFile
+94-0llvm/test/Transforms/LoopVectorize/compress-idioms.ll
+16-17llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+0-8llvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.cpp
+2-5llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+0-6llvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.h
+0-6llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp
+112-426 files

LLVM/project eca43cc — libcxx/docs/Status Cxx23Issues.csv, libcxx/include/__iterator common_iterator.h

[libc++] Implement LWG3601: `common_iterator`'s postfix-proxy needs `indirectly_readable` (#237574)

`common_iterator::operator++(int)` now returns the postfix-proxy only
when the underlying iterator is `indirectly_readable`. Previously, a
non-readable iterator with a usable `value_type` and a non-referenceable
`*it++` got a proxy holding a copied value. Now it gets the result of
the underlying `it++`.

Fixes #104946
DeltaFile
+22-0libcxx/test/std/iterators/predef.iterators/iterators.common/types.h
+17-0libcxx/test/std/iterators/predef.iterators/iterators.common/plus_plus.pass.cpp
+2-1libcxx/include/__iterator/common_iterator.h
+1-1libcxx/docs/Status/Cxx23Issues.csv
+42-24 files

LLVM/project 0d63f78 — lldb/source/Core PluginManager.cpp, lldb/source/Target Process.cpp

[LLDB] Support enabling/disabling InstrumentationRuntime plugins in a debug session

This patch is the fourth part in a patch series that will allow
enabling/disabling InstrumentationRuntime plugins in a running debug
session.

This is a rework of an older now abandoned patch:
https://github.com/llvm/llvm-project/pull/193334

Previously enabling/disabling an instrumentation runtime plugin via the
`plugin enable/disable instrumentation-runtime.<name>` command was only
supported using the `global` domain. This only toggled the plugin's
enablement state in the PluginManager. This would affect the enablement
in newly launched processes but not in any existing processes. In
practice what this meant is that:

1. If the plugin was activated when the inferior process was launched it
   could not be disabled even if requested. This meant it was impossible
   to prevent LLDB from stopping at the breakpoint set by an

    [106 lines not shown]
DeltaFile
+575-0lldb/test/API/functionalities/ubsan/plugin_enable_disable/TestUbsanPluginEnableDisable.py
+555-6lldb/test/API/lang/BoundsSafety/soft_trap/TestBoundsSafetyInstrumentationPlugin.py
+183-13lldb/source/Core/PluginManager.cpp
+171-0lldb/test/Shell/Commands/command-plugin-enable-disable-domain-flag-two-targets.test
+119-0lldb/test/Shell/Commands/command-plugin-enable-disable-domain-flag-one-target.test
+73-2lldb/source/Target/Process.cpp
+1,676-2115 files not shown
+2,072-6821 files

LLVM/project d1acd0e — llvm/include/llvm/IR Intrinsics.td, llvm/test/TableGen intrinsic-attr-errors.td

TableGen: Describe intrinsic attributes with IR Attributes definitions (#237605)

Once upon a time attributes were not declared in tablegen. The backend
tablegen components grew a separate IntrinsicProperty system parallel
to the IR attributes and the emitter maintained a not-quite 1:1
mapping system between them. This is a step towards unifying the
attributes and intrinsic properties.

Intrinsic properties that correspond directly to an IR attribute now
name the Attributes.td record they imply. CodeGenIntrinsic collects
the records generically instead of decoding each property into a
dedicated bool or ArgAttrKind enum value, and the emitter prints the
attribute name from the record rather than maintaining a manual
property to attribute mapping.

Properties with special behaviors (memory effects, Throws,
IntrHasSideEffects, Commutative, IntrTriviallyScalarizable) are still
handled individually. Throws should really be replaced especially
given we have a list of default intrinsic attributes that could add

    [2 lines not shown]
DeltaFile
+67-82llvm/utils/TableGen/Basic/CodeGenIntrinsics.cpp
+20-101llvm/utils/TableGen/Basic/IntrinsicEmitter.cpp
+45-51llvm/include/llvm/IR/Intrinsics.td
+15-58llvm/utils/TableGen/Basic/CodeGenIntrinsics.h
+24-0llvm/test/TableGen/intrinsic-attr-errors.td
+1-1llvm/utils/TableGen/GlobalISelEmitter.cpp
+172-2932 files not shown
+174-2958 files

LLVM/project bea7230 — lldb/source/Plugins/TypeSystem/Fortran FortranTypes.h

Used more concrete type profile, when looping through parameter types
DeltaFile
+1-1lldb/source/Plugins/TypeSystem/Fortran/FortranTypes.h
+1-11 files