LLVM/project fbd4bcc — clang/lib/Format TokenAnnotator.cpp, clang/unittests/Format FormatTest.cpp

[clang-format] Fix a crash in UseBreakAfter on an unmatched brace (#240744)

With `BinPack: UseBreakAfter`, the loop that adds breaks between
arguments skips nested brackets by jumping to their `MatchingParen`.
When a nested bracket isn't closed on the same line, for example because
a `;` in an inactive `#else` branch splits the line, `MatchingParen` is
null and the loop dereferences it.

Stop the loop in that case. The tokens after the unclosed bracket are
nested inside it, so they aren't arguments of the outer bracket anyway.

Fixes #233301

AI-assisted; I reviewed and tested the change.
DeltaFile
+10-0clang/unittests/Format/FormatTest.cpp
+4-1clang/lib/Format/TokenAnnotator.cpp
+14-12 files

LLVM/project 31c4bb5 — llvm/lib/Transforms/Scalar ConstraintElimination.cpp, llvm/test/Transforms/ConstraintElimination minmax.ll

[ConstraintElim] Split signed min/max across their operands when checking a compare

The existing constraint systems only record the bounds that hold for both
operands of a min/max (smax(a, b) >= a and >= b, smin(a, b) <= a and <= b). The
other direction is a disjunction, which cannot be recorded as a fact. When a
compare of signed decompositions involves a min/max result, split it into its
operands: the decomposition is monotonic in that result, so it is the max or min
of its values on each side, and the relation holds for all or for either side
respectively.

https://alive2.llvm.org/ce/z/zsGkJ-
DeltaFile
+367-3llvm/test/Transforms/ConstraintElimination/minmax.ll
+179-0llvm/lib/Transforms/Scalar/ConstraintElimination.cpp
+546-32 files

LLVM/project e0c9350 — clang/lib/CIR/Dialect/Transforms FlattenCFG.cpp, clang/test/CIR/Transforms flatten-cleanup-scope-multi-exit.cir

[CIR] Keep volatile and atomic return loads before cleanups (#242713)

When FlattenCFG routes a `cir.return` through a cleanup, it sinks a load
of an entry-block alloca that feeds the return into the block after the
cleanup. For a volatile or atomic load this moved the access past the
cleanup code. Such a load is now spilled to a temporary before the
cleanup, like any other return operand.

Assisted-by: Claude Code (claude-opus-5-5).
DeltaFile
+27-0clang/test/CIR/Transforms/flatten-cleanup-scope-multi-exit.cir
+4-0clang/lib/CIR/Dialect/Transforms/FlattenCFG.cpp
+31-02 files

LLVM/project e1aba87 — llvm/lib/Target/AArch64 AArch64TargetTransformInfo.cpp

[AArch64] Simplify Apple runtime unroll calculation(NFC) (#242836)

- Name magic numbers, as constexpr
- Name line remainder calculations to make the semantics clear (includes
CSE for 2 calcs of InstsInLastLine)
- Use for instead of while and trim the first duplicate iteration
- Make SizeWithUC induction variable instead repeating a multiply
DeltaFile
+11-9llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
+11-91 files

LLVM/project fb69a60 — libc/src/__support/macros sanitizer.h, libc/test/src/sys/mman/linux CMakeLists.txt mlock_test.cpp

[libc][test] Bound mlockall memory locking and skip under sanitizers (#242736)

Shadow-memory sanitizers map terabytes of shadow memory, which is why
sanitizer_common intercepts mlockall as a no-op. Because
LIBC_NAMESPACE::mlockall invokes SYS_mlockall directly, it bypasses
sanitizer interceptors; calling mlockall(MCL_CURRENT) when
RLIMIT_MEMLOCK is unlimited or CAP_IPC_LOCK is held attempts to
populate and wire-lock the shadow region, exhausting physical RAM.

Define LIBC_HAS_SANITIZER in sanitizer.h for shadow-memory sanitizers
(ASan, MSan, TSan, and HWASan) and skip LlvmLibcMlockTest.MLockAll
under sanitizers. For unprivileged non-sanitizer builds (without
CAP_IPC_LOCK), also cap soft RLIMIT_MEMLOCK to 64 MiB inside MLockAll
so mlockall fails fast with ENOMEM if multi-gigabyte virtual arenas are
mapped on hosts with RLIM_INFINITY.

Assisted-by: Gemini
DeltaFile
+42-0libc/test/src/sys/mman/linux/mlock_test.cpp
+16-0libc/src/__support/macros/sanitizer.h
+4-0utils/bazel/llvm-project-overlay/libc/test/src/sys/mman/BUILD.bazel
+4-0libc/test/src/sys/mman/linux/CMakeLists.txt
+66-04 files

LLVM/project 0f7c212 — llvm/lib/CodeGen GlobalMerge.cpp, llvm/test/Transforms/GlobalMerge reorder-only.ll

[GlobalMerge] Add -global-merge-reorder-only option

In reorder-only mode the pass makes the same grouping decisions but, instead
of merging, only places the affected globals next to each other so each keeps
its own symbol. Off by default.

rdar://192416322
DeltaFile
+29-0llvm/test/Transforms/GlobalMerge/reorder-only.ll
+26-0llvm/lib/CodeGen/GlobalMerge.cpp
+55-02 files

LLVM/project 67a1f4c — libc/src/__support/FPUtil double_double.h, libc/src/__support/macros CMakeLists.txt optimization.h

[libc][math] Add do not optimize macros and guard some double-double functions.

Guard some double-double computations against -(a * b) -> a * (-b) optimizations from compilers.
DeltaFile
+172-0libc/test/src/__support/FPUtil/double_double_test.cpp
+73-0libc/src/__support/macros/optimization.h
+12-0libc/test/src/__support/FPUtil/CMakeLists.txt
+11-0utils/bazel/llvm-project-overlay/libc/test/src/__support/FPUtil/BUILD.bazel
+6-0libc/src/__support/FPUtil/double_double.h
+4-0libc/src/__support/macros/CMakeLists.txt
+278-03 files not shown
+282-09 files

LLVM/project ce6d698 — clang/include/clang/CIR MissingFeatures.h, clang/lib/CIR/CodeGen CMakeLists.txt TargetInfo.h

[CIR][SystemZ][NFC] Add SystemZTargetCIRGenInfo (#237828)

Adds implementation for SystemZ TargetCIRGenInfo (following the
structure used in #215424). getTargetCIRGenInfo() had no SystemZ case so
it fell through to x86_64 target info.

The only hook in SystemZTargetCodeGenInfo in classic code gen that has a
CIR equivalent is setTargetAttributes. setTargetAttributes adds the
s390x-visible-vector-ABI module flag which CIR doesn't emit yet. This is
my intended next PR. For now, I add a MissingFeatures marker.

The other classic hook testFPKind has no counterpart in TargetCIRGenInfo
yet.

z/OS uses XPLINK ABI which has its own target info in classic codegen.
For now, z/OS uses the SystemZ ELF target info as a placeholder. I
marked it with targetCIRGenInfoOS() for follow up.

NFC. 

    [4 lines not shown]
DeltaFile
+47-0clang/lib/CIR/CodeGen/Targets/SystemZ.cpp
+8-0clang/lib/CIR/CodeGen/CIRGenModule.cpp
+3-0clang/lib/CIR/CodeGen/TargetInfo.h
+1-0clang/lib/CIR/CodeGen/CMakeLists.txt
+1-0clang/include/clang/CIR/MissingFeatures.h
+60-05 files

LLVM/project ea118ae — flang/include/flang/Parser parse-tree.h, flang/lib/Parser Fortran-parsers.cpp

[flang][parser] Parse the !DIR$ ALIGN compiler directive (#236444)

Parse a per-variable alignment directive in two spellings, `!DIR$
ALIGN(n) :: name-list` and the Intel-compatible `!DIR$ ATTRIBUTES ALIGN
: n :: name-list`, into one new `CompilerDirective::Align` node holding
the value and the names. Unparsing always emits the first spelling,
which becomes the canonical form (module files will use it). A bare
`!DIR$ ALIGN` or a token that merely starts with `ALIGN` still falls
through to the generic name/value directive parser, and `!DEC$` lines
remain comments.

Nothing acts on the directive yet. To make sure no revision silently
accepts and ignores it, name resolution warns that `!DIR$ ALIGN` is
recognized but not yet honored; semantics (applicability checks, value
validation, module files) and lowering follow in separate patches, and
the lowering patch removes the warning.

This is the first front-end patch of the directive proposed in the RFC
https://discourse.llvm.org/t/rfc-a-directive-to-set-the-alignment-of-variables-in-flang/92619;

    [2 lines not shown]
DeltaFile
+59-0flang/test/Parser/align-directive.f90
+45-0flang/test/Semantics/align-directive-ignored.f90
+21-0flang/test/Parser/align-directive-fixed.f
+16-3flang/lib/Parser/Fortran-parsers.cpp
+9-1flang/include/flang/Parser/parse-tree.h
+8-0flang/lib/Semantics/resolve-names.cpp
+158-44 files not shown
+167-510 files

LLVM/project 6b404c8 — clang/test/CodeGen catch-alignment-assumption-attribute-alloc_align-on-function.cpp catch-alignment-assumption-attribute-alloc_align-on-function-variable.cpp

CodeGen: hand assume_aligned tests to the care of update_cc_test_checks

My previous change already landed upstream for the two alloc_align
tests. Since a later patch's review feedback requested also checking
AssumeAlignedAttr in EmitReturnValueCheck, convert the two
corresponding assume_aligned tests (and refresh the alloc_align tests)
using update_cc_test_checks.py first so that the functional changes in
the next patch are obvious.

This patch is originally from 2023 and was rebased and revised with
assistance from an LLM. I have manually reviewed the diffs to the
limit of my abilities (I don't do much in LLVM, and this is my first
time touching clang in a meaningful way) and they appear sensible. The
commit messages are entirely written by me.

Differential Revision: https://reviews.llvm.org/D152400
DeltaFile
+84-35clang/test/CodeGen/catch-alignment-assumption-attribute-assume_aligned-on-function-two-params.cpp
+79-34clang/test/CodeGen/catch-alignment-assumption-attribute-assume_aligned-on-function.cpp
+25-12clang/test/CodeGen/catch-alignment-assumption-attribute-alloc_align-on-function-variable.cpp
+11-11clang/test/CodeGen/catch-alignment-assumption-attribute-alloc_align-on-function.cpp
+199-924 files

LLVM/project 2ccfb72 — llvm/lib/Transforms/Utils SimplifyLibCalls.cpp, llvm/test/Transforms/InstCombine simplify-libcalls-new.ll

SimplifyLibCalls: preserve allocation attributes in optimizeNew

When `LibCallSimplifier::optimizeNew` rewrites an `operator new` call into a
`__hot_cold_t` allocation call, forward the allocation attributes
(`allockind`, `allocsize`, `"alloc-family"`, and parameter `allocalign`) from
the original call onto the synthesized call instruction alongside its metadata.

This is a new patch since 2023 (unlike most of the rest of the stack)
and allows the next patch to remove more specialized C++ knowledge
from the LLVM layer, instead leaving it in clang where it seems more
sensible.

This patch was authored with the assistance of an LLM and was reviewed
by me before posting.
DeltaFile
+10-1llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
+1-1llvm/test/Transforms/InstCombine/simplify-libcalls-new.ll
+11-22 files

LLVM/project 36a8e95 — clang/test/CodeGenCXX cxx2a-destroying-delete.cpp cxx1z-aligned-allocation.cpp, clang/test/Headers openmp_new_nothrow.cpp

CGCall: emit allocptr attributes for operator delete

With this change, we're almost ready to drop the entire table out of
MemoryBuiltins.cpp and rely solely on attributes to detect allocator
functions.

Per review feedback on D123085, emit `allocptr` in
`CodeGenModule::ConstructAttributeList` so that both the function
declaration and all calls to replaceable global `operator delete` /
`operator delete[]` receive the attribute.

This patch is originally from 2023 and was rebased and revised with
assistance from an LLM. I have manually reviewed the diffs to the
limit of my abilities (I don't do much in LLVM, and this is my first
time touching clang in a meaningful way) and they appear sensible. The
commit messages are entirely written by me.

Differential Revision: https://reviews.llvm.org/D123085
DeltaFile
+20-20clang/test/CodeGenCXX/microsoft-vector-deleting-dtors.cpp
+20-20clang/test/CodeGenCXX/cxx1y-sized-deallocation.cpp
+10-10clang/test/Headers/openmp_new_nothrow.cpp
+9-9clang/test/CodeGenCXX/microsoft-vector-deleting-dtors2.cpp
+7-7clang/test/CodeGenCXX/cxx2a-destroying-delete.cpp
+7-7clang/test/CodeGenCXX/cxx1z-aligned-allocation.cpp
+73-7331 files not shown
+152-14337 files

LLVM/project 2b831b8 — clang/lib/CodeGen CodeGenFunction.cpp, clang/test/CodeGen catch-alignment-assumption-attribute-assume_aligned-on-function.cpp catch-alignment-assumption-attribute-assume_aligned-on-function-two-params.cpp

clang: also check alloc_align and assume_aligned claims in return

Prior to this patch, we only check alloc_align and assume_aligned claims
in the caller. We are about to thread alloc_align information down into
LLVM, which would then have a chance to defeat the sanitizer checks by
performing optimizations. To avoid that, we also check alignment claims
in the called function prior to return.

Per review feedback on D121629:
- Also verify the alignment required by `AssumeAlignedAttr` in
  `EmitReturnValueCheck`.
- Add a new `ReturnAlignmentAssumption` (`return_alignment_assumption`)
  sanitizer handler in clang and compiler-rt that accepts the dynamic
  return statement `SourceLocation` pointer loaded from `ReturnLocation`.
- Only emit the sanitizer check (and not a redundant `llvm.assume`) in
  `EmitReturnValueCheck`.

This patch is originally from 2023 and was rebased and revised with
assistance from an LLM. I have manually reviewed the diffs to the

    [5 lines not shown]
DeltaFile
+90-15clang/test/CodeGen/catch-alignment-assumption-attribute-alloc_align-on-function.cpp
+90-15clang/test/CodeGen/catch-alignment-assumption-attribute-alloc_align-on-function-variable.cpp
+82-13clang/test/CodeGen/catch-alignment-assumption-attribute-assume_aligned-on-function-two-params.cpp
+79-13clang/test/CodeGen/catch-alignment-assumption-attribute-assume_aligned-on-function.cpp
+51-18clang/lib/CodeGen/CodeGenFunction.cpp
+46-10compiler-rt/lib/ubsan/ubsan_handlers.cpp
+438-8411 files not shown
+504-8817 files

LLVM/project 4829e64 — clang/lib/CodeGen CodeGenFunction.h CodeGenFunction.cpp

[NFC] clang: simplify emitAlignmentAssumptionCheck

Move the alignment check condition (`ptrtoint`, optional offset subtraction,
mask, and `icmp eq 0`) into `CodeGenFunction::emitAlignmentAssumptionCheck`
and emit the sanitizer check before `Builder.CreateAlignmentAssumption`.

This removes the need to pass `TheCheck` and `Assumption` into
`emitAlignmentAssumptionCheck` (or temporarily unlink and re-insert
`Assumption`) and prepares `emitAlignmentAssumptionCheck` to be called
directly without an accompanying `@llvm.assume`.

This patch is new since this line of work was originally authored in
2023. It was largely written by an LLM in response to review feedback
for the next patch, but I hand-reviewed the content and it looks
reasonable enough (with the same disclaimer as other patches that I
know nothing about clang.)
DeltaFile
+47-64clang/lib/CodeGen/CodeGenFunction.cpp
+1-3clang/lib/CodeGen/CodeGenFunction.h
+48-672 files

LLVM/project dd45e7a — clang/lib/CodeGen CGExprCXX.cpp, clang/test/CodeGenCXX new_hot_cold.cpp

CGExprCXX: emit family and allockind attributes

This allows us to remove the special knowledge about C++ allocation from
LLVM's MemoryBuiltins.cpp, instead trusting attributes to communicate
the important properties.

Annoyingly, clang has to grow a little bit of hard-coded knowledge about
mangled symbol names in order to actually get the most-basic-matching
::operator::new when working out the alloc-family attribute. I spent
some time trying to do this "right" by looking up the available
operators new and finding the best one, but that's super tricky and this
has the virtue of working and being pretty obviously correct when
compared to the old code.

Happily, clang now emits allocator family attributes for custom
allocators like the `__hot_cold_t` overloads in `new_hot_cold.cpp`
(which `isReplaceableGlobalAllocationFunction` in clang recognizes),
allowing us to remove that special knowledge from LLVM.


    [7 lines not shown]
DeltaFile
+2-120llvm/lib/Analysis/MemoryBuiltins.cpp
+51-51llvm/test/Transforms/InstCombine/new-delete-itanium.ll
+51-3clang/lib/CodeGen/CGExprCXX.cpp
+10-22clang/test/Headers/openmp_new_nothrow.cpp
+14-14llvm/test/Transforms/InstCombine/new-delete-itanium-32.ll
+16-10clang/test/CodeGenCXX/new_hot_cold.cpp
+144-22017 files not shown
+177-25023 files

LLVM/project 01087e6 — clang/lib/CodeGen CGCall.cpp, clang/test/CodeGen alloc-align-attr.c catch-alignment-assumption-attribute-alloc_align-on-function.cpp

clang: emit allocalign to LLVM for alloc_align attributes

LLVM is growing knowledge of this, so we should inform it when we have
the information available. As a bonus, since we now check return
alignments in the callee as of an earlier patch of mine, we can now drop
the redundant llvm.assume() that this previously emitted.

This patch is originally from 2023 and was rebased and revised with
assistance from an LLM. I have manually reviewed the diffs to the
limit of my abilities (I don't do much in LLVM, and this is my first
time touching clang in a meaningful way) and they appear sensible. The
commit messages are entirely written by me.

Differential Revision: https://reviews.llvm.org/D119271
DeltaFile
+14-85clang/test/CodeGen/catch-alignment-assumption-attribute-alloc_align-on-function-variable.cpp
+7-36clang/test/CodeGen/catch-alignment-assumption-attribute-alloc_align-on-function.cpp
+24-2clang/lib/CodeGen/CGCall.cpp
+6-16clang/test/CodeGen/alloc-align-attr.c
+8-8clang/test/CodeGenCXX/new_hot_cold.cpp
+6-6clang/test/CodeGenCXX/cxx1z-aligned-allocation.cpp
+65-1539 files not shown
+80-18115 files

LLVM/project 882aac7 — llvm/lib/Target/AMDGPU SIPreEmitPeephole.cpp, llvm/test/CodeGen/AMDGPU insert-skip-from-vcc.mir

[AMDGPU] Use bundle-aware iterator in matchVccMask (#243188)

The backward scan from the S_AND started at A.getReverseIterator(),
which is a not bundle-aware and can step into a preceding BUNDLE,
triggering the MachineInstrBundleIterator assertion. So, we shall start
from a MachineBasicBlock::reverse_iterator instead.

Fixes https://lab.llvm.org/buildbot/#/builders/10/builds/39523
(#241405).

Assisted-by: Cursor (Claude Opus 5.5)
DeltaFile
+32-0llvm/test/CodeGen/AMDGPU/insert-skip-from-vcc.mir
+3-2llvm/lib/Target/AMDGPU/SIPreEmitPeephole.cpp
+35-22 files

LLVM/project ba493a4 — llvm/lib/Target/AMDGPU SIInstrInfo.cpp SIFixSGPRCopies.cpp

[AMDGPU] Use isVALU(AllowLDSDMA=false) where LDS DMA cannot match. NFC. (#243039)

Switch calls to isVALU from AllowLDSDMA=true to AllowLDSDMA=false where
the result cannot differ for an LDS DMA instruction:

- The instruction is known not to be LDS DMA, e.g. wave reduction
opcodes
  in SIISelLowering, or an else-if chain that already handled isLDSDMA.
- The check is combined with "defines register R". LDS DMA instructions
  have no explicit defs and their only implicit defs are ASYNCcnt or
  TENSORcnt. This covers all IsHazardDef callbacks passed to
  getWaitStatesSinceDef.
- The check is ORed with isVMEM or IsMemOrExport, and the hazard only
  applies to GFX90A+ GFX9 targets, where all LDS DMA instructions are
  VMEM.
- The hazard only exists on GFX11, which has no LDS DMA instructions.
- shouldReadExec falls through to returning true anyway.

Also simplify "!isVALU(MI, true) || isLDSDMA(MI)" to

    [2 lines not shown]
DeltaFile
+26-27llvm/lib/Target/AMDGPU/GCNHazardRecognizer.cpp
+3-3llvm/lib/Target/AMDGPU/SIISelLowering.cpp
+1-1llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
+1-1llvm/lib/Target/AMDGPU/SIFixSGPRCopies.cpp
+1-1llvm/lib/Target/AMDGPU/GCNPreRAAntiHints.cpp
+32-335 files

LLVM/project ad41f6e — clang/include/clang/DependencyScanning DependencyScanningService.h InProcessModuleCache.h, clang/lib/DependencyScanning InProcessModuleCache.cpp

[clang][deps] Flush the in-process module cache on a background thread

The in-process module cache keeps every PCM built during the lifetime of the
dependency scanning service in memory, and flushes them to disk at the end.
Long-running builds that scan many variants of modules (e.g. with different
search paths or macro definitions) accumulate tens of gigabytes worth of
scanning PCMs this way. Moreover, the final flush is single-threaded and
happens after all scanning work is done.

This PR makes the service start a background thread that flushes each PCM to
disk as soon as it's written, and then replaces its in-memory buffer with the
memory-mapped file. Readers of the in-memory buffer keep it alive on their own
(shared ownership), and importers of the freshly built PCM never wait for the
IO, since the file gets written without holding the entry lock. Reads and
timestamps are still served from memory. The final flush is kept, but only
writes PCMs the background thread failed to write. With
`-no-flush-module-cache`, nothing changes.

I tried several approaches, all measured on a scan of the macOS SDK where

    [52 lines not shown]
DeltaFile
+96-7clang/lib/DependencyScanning/InProcessModuleCache.cpp
+53-0clang/unittests/DependencyScanning/InProcessModuleCacheTest.cpp
+50-0clang/test/ClangScanDeps/module-cache-flush-in-background.c
+38-1clang/include/clang/DependencyScanning/InProcessModuleCache.h
+7-2clang/include/clang/DependencyScanning/DependencyScanningService.h
+2-1clang/test/ClangScanDeps/logging-simple-by-name.c
+246-112 files not shown
+249-138 files

LLVM/project 3396915 — clang/lib/Frontend CompilerInstance.cpp

[clang] Extract built PCMs from their container without copying (#242384)

When a module is built implicitly, the importing instance extracts the
AST
file from the module cache's view of the written PCM and stores a copy
of it
in its `InMemoryModuleCache`. That's an extra heap copy of every built
PCM,
kept alive for the lifetime of the translation unit.

This PR resolves the FIXME by storing a buffer that keeps the written
PCM
alive and exposes just the AST file: the `__clangast` section for PCMs
wrapped in an object file (`-gmodules`), or the whole PCM otherwise. The
in-process module cache now shares the memory of its entry with the
importing instance, and the cross-process module cache gives it the
memory-mapped file.

For a regular implicit modules build importing Foundation and friends,

    [5 lines not shown]
DeltaFile
+27-7clang/lib/Frontend/CompilerInstance.cpp
+27-71 files

LLVM/project 46627c6 — libc/src/__support endian_internal.h, libc/src/__support/net byte_order.h

Revert "[libc] Add network byte-order helpers to __support/net" (#243187)

Reverts llvm/llvm-project#243122 (and follow-up Bazel fix #243138):
breaks non-Linux targets.
DeltaFile
+0-53libc/test/src/__support/net/byte_order_test.cpp
+20-23libc/src/__support/endian_internal.h
+0-35libc/src/__support/net/byte_order.h
+18-15libc/test/src/netinet/in_test.cpp
+13-13libc/test/src/arpa/inet/inet_aton_test.cpp
+11-10libc/test/src/sys/socket/linux/bind_test.cpp
+62-14921 files not shown
+122-25927 files

LLVM/project 98def7f — lldb/test/API/tools/lldb-dap/runInTerminal main.c TestDAP_runInTerminal.py, lldb/tools/lldb-dap JSONUtils.cpp

[lldb-dap] Don't parse launch-target args in runInTerminal launcher (#243096)

When the debug adapter requests the client to launch a program in the
terminal (runInTerminal), it provides a launcher command like:
```
    lldb-dap --comm-file <file> --launch-target <program> <args>
```
Previously, if <args> contained flags matching lldb-dap's own options
(e.g., `--version` or `--help`), lldb-dap would consume them and act on
them (e.g. printing its version and exiting) instead of passing them to
the target program causing
the launch to fail.

The commit resolves the ambiguity by changing `--launch-target` to a
boolean flag and requiring a `--` separator before the target program
and its arguments.

The launcher command is now formatted as:
```

    [2 lines not shown]
DeltaFile
+50-1lldb/test/API/tools/lldb-dap/runInTerminal/TestDAP_runInTerminal_launcher.py
+25-25lldb/tools/lldb-dap/tool/lldb-dap.cpp
+26-0lldb/test/API/tools/lldb-dap/runInTerminal/TestDAP_runInTerminal.py
+7-5lldb/test/API/tools/lldb-dap/runInTerminal/main.c
+5-6lldb/tools/lldb-dap/tool/Options.td
+4-4lldb/tools/lldb-dap/JSONUtils.cpp
+117-416 files

LLVM/project 24a7d7a — lld/MachO Driver.cpp InputFiles.h

[lld][MachO] Batch command-line object files and archive member scanning in parallel

This is part of the ld64.lld performance improvements tracked by

Currently, command-line object files and archive member symbol tables
are still parsed and scanned one file at a time as Driver::processFile()
encounters them.

This change splits ObjFile::parseLazy() into scanLazy() and
registerLazy(), and queues command-line object files and archive members
via parseLater(). parseBatch() runs scanLazy() and parsePrepare() in
parallel across the batch before running registerLazy() and
parseFinish() serially in command-line order, flushing before any other
input type.

Locally, this shows an ~8% link-time performance improvement over the
baseline.

AI use: this change is based off a prototype developed by an LLM.

    [2 lines not shown]
DeltaFile
+91-29lld/MachO/InputFiles.cpp
+19-8lld/MachO/InputFiles.h
+14-5lld/MachO/Driver.cpp
+124-423 files

LLVM/project a19d220 — lld/MachO InputFiles.h InputFiles.cpp

[lld][MachO] Split ObjFile::parse() and parse extracted archive rounds in parallel

This is part of the ld64.lld performance improvements tracked by
#222068 and #238938.

Currently, parsePendingExtracts() parses each extracted archive member
serially from start to finish, even though section creation, subsection
splitting, local symbol creation, and hashing external symbol names only
touch per-file state.

This change splits ObjFile::parse() into parsePrepare() and
parseFinish(), using makeThreadLocal() for per-file allocations.
parsePendingExtracts() now processes extracted members in rounds,
running parsePrepare() in parallel across each round and parseFinish()
serially in file order.

Locally, this shows a ~4% link-time performance improvement over the
baseline.


    [3 lines not shown]
DeltaFile
+184-83lld/MachO/InputFiles.cpp
+33-4lld/MachO/InputFiles.h
+217-872 files

LLVM/project 689a69f — lld/MachO SymbolTable.cpp SymbolTable.h

[lld][MachO][NFC] Accept CachedHashStringRef in SymbolTable insertion methods

This is part of the ld64.lld performance improvements tracked by

Currently, SymbolTable::insert() constructs a CachedHashStringRef on the
serial insertion path. This change adds CachedHashStringRef overloads
for insert(), addDefined(), addUndefined(), addCommon(), and
addLazyObject() so callers can pre-hash symbol names in parallel, while
keeping StringRef wrappers for existing callers.

AI use: this change is based off a prototype developed by an LLM.

This commit is output-preserving.
DeltaFile
+33-7lld/MachO/SymbolTable.h
+19-16lld/MachO/SymbolTable.cpp
+52-232 files

LLVM/project 90b059b — llvm/lib/Target/SystemZ/MCTargetDesc SystemZHLASMAsmStreamer.cpp, llvm/test/CodeGen/SystemZ zos-ppa2.ll zos-readonly-addressing.ll

Remove repeating the X
DeltaFile
+5-9llvm/lib/Target/SystemZ/MCTargetDesc/SystemZHLASMAsmStreamer.cpp
+2-2llvm/test/CodeGen/SystemZ/zos-readonly-addressing.ll
+1-1llvm/test/CodeGen/SystemZ/zos-ppa2.ll
+8-123 files

LLVM/project eca5570 — lld/MachO InputFiles.cpp Symbols.h

preserve pending archive definitions across intervening weak dylibs
DeltaFile
+50-25lld/MachO/SymbolTable.cpp
+13-3lld/MachO/Symbols.h
+7-0lld/MachO/InputFiles.cpp
+70-283 files

LLVM/project f29bfda — llvm/lib/Target/AMDGPU SIISelLowering.cpp, llvm/test/CodeGen/AMDGPU or.ll

[AMDGPU] Fold OR of {SIGN|ANY}_EXTENDed SGPR booleans to SELECT

`or x, (sext cc)` with an SGPR boolean materializes the 0/-1 mask and
then ORs it in. `select cc, -1, x` does the same in one instruction.

After legalization, fold i32 `or x, (sext/anyext cc)` to
`select cc, -1, x`. The high bits of ANY_EXTEND are unspecified, so
they can be chosen to match sign extension. ZERO_EXTEND stays
excluded: `or x, (zext cc)` is `select cc, (or x, 1), x`, which keeps
the OR.

Two checks avoid code-size regressions. The extension must have one
use; otherwise it is still materialized and the select may need an
e64 cndmask. A divergent OR also skips the fold when its uniform
condition has other uses: the select needs the condition as a lane
mask, and the other use would then convert it back to SCC.

Split out of #230701, which extends the existing AND fold to
ANY_EXTEND. Both patches add the same isBoolSGPRExt helper.

    [2 lines not shown]
DeltaFile
+208-0llvm/test/CodeGen/AMDGPU/or.ll
+28-0llvm/lib/Target/AMDGPU/SIISelLowering.cpp
+236-02 files

LLVM/project f609a16 — llvm/include/llvm/CodeGen LiveIntervals.h, llvm/lib/CodeGen LiveIntervals.cpp

CodeGen: Simplify def segment extension in shrinkToUses (#242869)

During extendSegmentsToUses, Segments holds only one def segment per
value, and none extend past their block. Live-in segments are kept
separately in LiveIns. To extend a def to a use, find the last segment
starting before the use, check that it starts in the use's block, and
move its end to the use. This replaces extendInBlock, whose general
search and merging of overlapped segments never applies here.

Also combine the per-block live-out and live-in tables into one struct.

llc instructions:u:
  CTMark x86_64: -0.07%
  CTMark arm64:  -0.10%
  AMDGPU sample: -0.27%

Largest AMDGPU improvements:
  rocprim warp_sort (gfx1100):                    -1.89%
  rocsolver stedc (gfx942):                       -1.70%

    [4 lines not shown]
DeltaFile
+25-26llvm/lib/CodeGen/LiveIntervals.cpp
+14-8llvm/include/llvm/CodeGen/LiveIntervals.h
+39-342 files

LLVM/project 839a04a — flang/test/Lower/OpenMP declare-simd.f90, mlir/include/mlir/Dialect/OpenMP OpenMPOps.td

Resovle conflift
DeltaFile
+8-8mlir/test/Target/LLVMIR/openmp-declare-simd-aarch64-wds.mlir
+8-8flang/test/Lower/OpenMP/declare-simd.f90
+4-4mlir/test/Dialect/OpenMP/ops.mlir
+4-1mlir/include/mlir/Dialect/OpenMP/OpenMPOps.td
+2-2mlir/test/Target/LLVMIR/openmp-declare-simd-aarch64-nds.mlir
+1-1mlir/test/Target/LLVMIR/openmp-declare-simd-aarch64-01.mlir
+27-242 files not shown
+29-268 files