LLVM/project 665fd6allvm/test/Transforms/LoopInterchange reduction-extra-use-in-inner-loop.ll

[LoopInterchange] Add test for extra reduction use in inner loop (NFC)
DeltaFile
+281-0llvm/test/Transforms/LoopInterchange/reduction-extra-use-in-inner-loop.ll
+281-01 files

LLVM/project 2dc0a06llvm/lib/Transforms/Scalar LoopInterchange.cpp, llvm/test/Transforms/LoopInterchange reduction-extra-use-in-inner-loop.ll

[LoopInterchange] Reject if outer reduction value has extra user
DeltaFile
+13-23llvm/test/Transforms/LoopInterchange/reduction-extra-use-in-inner-loop.ll
+20-0llvm/lib/Transforms/Scalar/LoopInterchange.cpp
+33-232 files

LLVM/project 7462c28llvm/lib/Transforms/Scalar LoopInterchange.cpp

address review
DeltaFile
+1-3llvm/lib/Transforms/Scalar/LoopInterchange.cpp
+1-31 files

LLVM/project ad4bd90llvm/lib/Transforms/Scalar LoopInterchange.cpp, llvm/test/Transforms/LoopInterchange inner-induciton-step-is-not-invariant.ll

[LoopInterchange] Reject if inner loop IV has outer-variant step
DeltaFile
+20-48llvm/test/Transforms/LoopInterchange/inner-induciton-step-is-not-invariant.ll
+7-1llvm/lib/Transforms/Scalar/LoopInterchange.cpp
+27-492 files

LLVM/project 4c0e292llvm/include/llvm/TableGen Error.h SetTheory.h

[llvm] Fix most LLVM_ABI annotations in TableGen (#203246)

This updates most LLVM_ABI annotations in the TableGen headers to match
expected usage:
* All public APIs should be properly annotated.
* Inlined functions should not be annotated.

These changes were done by a script fixing annotations on LLVM public
headers and manually checked.

This effort is tracked in #109483.
DeltaFile
+31-25llvm/include/llvm/TableGen/Error.h
+8-8llvm/include/llvm/TableGen/SetTheory.h
+6-5llvm/include/llvm/TableGen/TableGenBackend.h
+4-4llvm/include/llvm/TableGen/TGTimer.h
+4-3llvm/include/llvm/TableGen/Main.h
+3-3llvm/include/llvm/TableGen/StringToOffsetTable.h
+56-482 files not shown
+60-508 files

LLVM/project 4ebce6ellvm/include/llvm/Frontend/HLSL CBuffer.h HLSLBinding.h, llvm/include/llvm/Frontend/OpenMP OMPIRBuilder.h OMP.h

[llvm] Fix most LLVM_ABI annotations in Frontend (#203245)

This updates most LLVM_ABI annotations in the Frontend headers to match
expected usage:
* All public APIs should be properly annotated.
* Inlined functions should not be annotated.

These changes were done by a script fixing annotations on LLVM public
headers and manually checked.

This effort is tracked in #109483.
DeltaFile
+11-10llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h
+2-2llvm/include/llvm/Frontend/HLSL/CBuffer.h
+1-1llvm/include/llvm/Frontend/HLSL/HLSLBinding.h
+1-1llvm/include/llvm/Frontend/HLSL/RootSignatureMetadata.h
+1-1llvm/include/llvm/Frontend/OpenMP/OMP.h
+16-155 files

LLVM/project c6f0d5dllvm/include/llvm/IR PrintPasses.h NVVMIntrinsicUtils.h

[llvm] Fix most LLVM_ABI annotations in IR (#203244)

This updates most LLVM_ABI annotations in the IR headers to match
expected usage:
* All public APIs should be properly annotated.
* Inlined functions should not be annotated.

These changes were done by a script fixing annotations on LLVM public
headers and manually checked.

This effort is tracked in #109483.
DeltaFile
+22-20llvm/include/llvm/IR/PrintPasses.h
+13-7llvm/include/llvm/IR/NVVMIntrinsicUtils.h
+5-6llvm/include/llvm/IR/RuntimeLibcalls.h
+5-5llvm/include/llvm/IR/DebugInfoMetadata.h
+3-3llvm/include/llvm/IR/SafepointIRVerifier.h
+3-2llvm/include/llvm/IR/Statepoint.h
+51-438 files not shown
+63-5214 files

LLVM/project 1e283d4llvm/include/llvm/CAS ObjectStore.h OnDiskGraphDB.h

[llvm] Fix most LLVM_ABI annotations in CAS (#203243)

This updates most LLVM_ABI annotations in the CAS headers to match
expected usage:
* All public APIs should be properly annotated.
* Inlined functions should not be annotated.

These changes were done by a script fixing annotations on LLVM public
headers and manually checked.

This effort is tracked in #109483.
DeltaFile
+7-9llvm/include/llvm/CAS/ObjectStore.h
+8-7llvm/include/llvm/CAS/OnDiskGraphDB.h
+2-2llvm/include/llvm/CAS/ActionCache.h
+2-2llvm/include/llvm/CAS/CASID.h
+2-2llvm/include/llvm/CAS/OnDiskTrieRawHashMap.h
+2-2llvm/include/llvm/CAS/UnifiedOnDiskCache.h
+23-242 files not shown
+25-268 files

LLVM/project e1f9a86libc/hdr/types struct_sockaddr_in6.h, libc/include/llvm-libc-macros netinet-in-macros.h

[libc] Add the sockaddr_in6 type and IN6ADDR_*_INIT macros (#201357)

This patch adds struct sockaddr_in6 and the
IN6ADDR_ANY_INIT/IN6ADDR_LOOPBACK_INIT initializer macros. These are
configured to be exported via <netinet/in.h>.

I also added tests for these new features:
- layout and initialization check in test/src/netinet/in_test.cpp
verifying sockaddr_in6 size/member alignment and the in6_addr
initializer macros.
- a smoke test in test/src/sys/socket/linux/bind_test.cpp to verify
binding AF_INET6 to a localhost address. This requires a configured ipv6
stack, and may need tweaking/skipping if our build infrastructure does
not support it.

Assisted by Gemini.
DeltaFile
+31-0libc/include/llvm-libc-types/struct_sockaddr_in6.h
+30-0libc/test/src/sys/socket/linux/bind_test.cpp
+27-1libc/test/src/netinet/in_test.cpp
+27-0libc/hdr/types/struct_sockaddr_in6.h
+13-0libc/include/llvm-libc-macros/netinet-in-macros.h
+10-0libc/include/llvm-libc-types/CMakeLists.txt
+138-16 files not shown
+160-112 files

LLVM/project 4c67285llvm/lib/Target/AMDGPU AMDGPULegalizerInfo.cpp AMDGPURegBankLegalizeRules.cpp, llvm/test/CodeGen/AMDGPU llvm.amdgcn.icmp.w64.ll llvm.amdgcn.fcmp.w64.ll

[AMDGPU][GlobalISel] Add register bank legalize rules for amdgcn_icmp, amdgcn_fcmp (#172017)
DeltaFile
+151-56llvm/test/CodeGen/AMDGPU/llvm.amdgcn.icmp.w64.ll
+111-59llvm/test/CodeGen/AMDGPU/llvm.amdgcn.fcmp.w64.ll
+74-37llvm/test/CodeGen/AMDGPU/llvm.amdgcn.icmp.w32.ll
+25-0llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
+20-0llvm/lib/Target/AMDGPU/AMDGPURegBankLegalizeRules.cpp
+2-2llvm/test/CodeGen/AMDGPU/llvm.amdgcn.fcmp.w32.ll
+383-1542 files not shown
+385-1588 files

LLVM/project 6ff34e9libc/src/__support/OSUtil/linux/syscall_wrappers recvmmsg.h, libc/src/sys/socket recvmmsg.h

[libc] Implement recvmmsg (on linux) (#202328)

The function (unlike sendmmsg) takes a timeout argument, so I make sure
to always call the version with a 64-bit time_t. I've also renamed the
sendmmsg_test.cpp unit test to sendrecvmmsg_test.cpp to test both
functions. I also updated the yaml config and docgen files to include
the new function and the struct_timespec type dependency.

Assisted by Gemini.
DeltaFile
+99-0libc/test/src/sys/socket/linux/sendrecvmmsg_test.cpp
+0-84libc/test/src/sys/socket/linux/sendmmsg_test.cpp
+46-0libc/src/__support/OSUtil/linux/syscall_wrappers/recvmmsg.h
+32-0libc/src/sys/socket/linux/recvmmsg.cpp
+28-0libc/src/sys/socket/recvmmsg.h
+14-0libc/src/sys/socket/linux/CMakeLists.txt
+219-848 files not shown
+262-8714 files

LLVM/project 653865dflang/lib/Semantics resolve-directives.cpp, flang/test/Semantics/OpenMP use-rename-array-dsa.f90

[Flang][OpenMP] Fix implicit symbol resolution for USE-renamed arrays (#189215)

[Flang][OpenMP] Fix USE-renamed array DSA in OpenMP regions

  Problem: for a USE-renamed symbol (e.g. USE mod, ONLY: s_ary => ary),
  the HostAssoc in the OMP scope was created under the original name
  "ary" instead of the local alias "s_ary".

  Fix: add a DeclareNewAccessEntity overload that takes an explicit
  SourceName, and call it with symbol->name() (the alias) rather than
  the ultimate symbol's name, so the HostAssoc is created under the
  name the user wrote.

  Fixes #185344

  Assisted-by: Claude Sonnet 4.6
DeltaFile
+34-0flang/test/Semantics/OpenMP/use-rename-array-dsa.f90
+14-6flang/lib/Semantics/resolve-directives.cpp
+48-62 files

LLVM/project 97ed134clang/lib/Basic/Targets AMDGPU.cpp AMDGPU.h

[AMDGPU] remove DefIsPriv mapping (#202694)

Since various commits that now avoid immediately casting most
temporaries, and now follow Sema for variables, this looks like tests
pass now without needing a second map to correct those issues
afterwards. Hopefully this will help find any similar remaining issues
expeditiously, if any.
DeltaFile
+2-42clang/lib/Basic/Targets/AMDGPU.cpp
+1-4clang/lib/Basic/Targets/AMDGPU.h
+3-462 files

LLVM/project 59e18f4clang/lib/CodeGen CGCall.cpp

[clang] `this` getter missed in ConstructAttributeList (#203010)

In https://reviews.llvm.org/D159247 (400d3261a0da56554aee8e5a2fbc27eade9d05db)
it looks intended to update all of these calls, but missed this. The
effect is that a reference `&this` in a non-zero addrspace would take
this branch and crash there (because it ends up asserting that `this`
is a pointer). DRY the code since this branch looks like it kept
getting copied more incorrectly over time. I don't have an actual use
or test for this, I just noticed it while I was trying to break other
things in fuzzing.
DeltaFile
+3-5clang/lib/CodeGen/CGCall.cpp
+3-51 files

LLVM/project 7daddf2cmake/Modules HandleDoxygen.cmake, flang CMakeLists.txt

[docs] try again to handle doxygen everywhere (#203081)

The previous attempt at this (b7da9565017e32c18b927a7637714d1b660b558d)
still broke standalone builds. Now I have locally tested standalone
flang, runtimes (with openmp), lldb, combined builds, and the utils
script. Hopefully that covers everything this time, and gets everything
into a more consistent state (always using the HandleDoxygen script in
the same way, included exactly once as required by the cmake design).
DeltaFile
+0-11llvm/CMakeLists.txt
+4-3flang/CMakeLists.txt
+5-0cmake/Modules/HandleDoxygen.cmake
+3-1runtimes/CMakeLists.txt
+0-3lldb/docs/CMakeLists.txt
+0-3flang/docs/CMakeLists.txt
+12-218 files not shown
+13-3314 files

LLVM/project 709bb79llvm/lib/Target/AMDGPU AMDGPURegBankLegalizeRules.cpp AMDGPURegBankLegalizeHelper.cpp, llvm/test/CodeGen/AMDGPU llvm.prefetch.ll

AMDGPU/GlobalISel: RegBankLegalize rules for G_PREFETCH
DeltaFile
+27-0llvm/lib/Target/AMDGPU/AMDGPURegBankLegalizeRules.cpp
+6-6llvm/test/CodeGen/AMDGPU/llvm.prefetch.ll
+8-0llvm/lib/Target/AMDGPU/AMDGPURegBankLegalizeHelper.cpp
+4-1llvm/lib/Target/AMDGPU/AMDGPURegBankLegalizeRules.h
+45-74 files

LLVM/project c8ad049llvm/lib/Transforms/Scalar LoopInterchange.cpp, llvm/test/Transforms/LoopInterchange reduction2mem-limitation.ll

[LoopInterchange] Consolidate induction and reduction vars check (#203197)

Previously, the handling of PHI nodes in loop headers was scattered. In
particular, there were two separate functions, `findInductions` and
`findInductionAndReductions`, which made the code difficult to reason
about. This patch consolidates these two functions, along with their
related caller logic, into a single function,
`checkInductionsAndReductions`. Although some remarks and debug outputs
have changed as a result, I believe the functionality itself remains
unchanged.
DeltaFile
+72-95llvm/lib/Transforms/Scalar/LoopInterchange.cpp
+4-10llvm/test/Transforms/LoopInterchange/reduction2mem-limitation.ll
+76-1052 files

LLVM/project e0e9e81openmp/runtime/src kmp_adt.cpp

add missing file
DeltaFile
+63-0openmp/runtime/src/kmp_adt.cpp
+63-01 files

LLVM/project 47cc4f8openmp/runtime/src kmp_adt.h CMakeLists.txt, openmp/runtime/unittests/ADT TestStringRef.cpp

implement feedback
DeltaFile
+8-42openmp/runtime/src/kmp_adt.h
+7-0openmp/runtime/unittests/ADT/TestStringRef.cpp
+1-0openmp/runtime/src/CMakeLists.txt
+16-423 files

LLVM/project cd2a097cross-project-tests/debuginfo-tests/dexter/dex/evaluation ExpectWriter.py, cross-project-tests/debuginfo-tests/dexter/feature_tests/scripts/rewriting rewrite_scopes_list.cpp rewrite_scopes.cpp

[Dexter] Write expects for variables in Debugger scopes

Following on from the previous patch, this patch adds support for writing
expects from !value/all nodes, generating separate expects for each
variable in the requested debugger scope, for each continuous range of lines
it is live for.
DeltaFile
+185-19cross-project-tests/debuginfo-tests/dexter/dex/evaluation/ExpectWriter.py
+71-0cross-project-tests/debuginfo-tests/dexter/feature_tests/scripts/rewriting/Inputs/rewrite_scopes_list_expected.cpp
+54-0cross-project-tests/debuginfo-tests/dexter/feature_tests/scripts/rewriting/rewrite_scopes_list.cpp
+49-0cross-project-tests/debuginfo-tests/dexter/feature_tests/scripts/rewriting/Inputs/rewrite_scopes_expected.cpp
+40-0cross-project-tests/debuginfo-tests/dexter/feature_tests/scripts/rewriting/rewrite_scopes.cpp
+399-195 files

LLVM/project 32ecd3ellvm/lib/Transforms/Scalar LoopInterchange.cpp, llvm/test/Transforms/LoopInterchange non-phi-uses-lcssa-phi.ll

[LoopInterchange] Bail out when outer loop latch PHI has non-PHI user (#201923)

When there are non-PHI instructions in the outer loop that use values
originating from the LCSSA PHIs of the inner loop, it becomes difficult
to adjust the wiring during the transformation. In fact, multiple issues
(#200819 and #201571) have been raised related to this pattern. #201059
tried to resolve the issue by modifying the transformation phase, but it
was insufficient.
Instead of spending effort in the transformation phase, this patch adds
an additional check in the legality check and rejects such cases. I
think the cases rejected by this additional check are not very
practical, so the impact on realistic cases should be low, and it is
simpler than adjusting the wiring in the transformation phase.
This patch also effectively reverts #201059, as it is no longer
necessary.

Fix #201571.
DeltaFile
+74-24llvm/test/Transforms/LoopInterchange/non-phi-uses-lcssa-phi.ll
+22-4llvm/lib/Transforms/Scalar/LoopInterchange.cpp
+96-282 files

LLVM/project fee67eellvm/lib/Target/X86 X86FlagsCopyLowering.cpp, llvm/test/CodeGen/X86 flags-copy-lowering-unreachable.mir

[X86] Don't assert on EFLAGS copies in unreachable blocks (#203208)

X86FlagsCopyLowering collects the EFLAGS copies to lower using a
ReversePostOrderTraversal, which only visits blocks reachable from the
entry. Its end-of-pass verification, however, iterated over every block
in the function, so an EFLAGS copy left in an unreachable block (e.g.
produced by ISel for an always-taken branch whose other edge is dead)
tripped the "Unlowered EFLAGS copy!" assertion.

Such copies are harmless: the unreachable block is removed by the
unreachable-block elimination pass that runs right after this one,
before register allocation, so the copy never reaches a pass that cannot
handle it. Restrict the verification to reachable blocks (depth_first
from the entry) to match the set of blocks actually processed.

Found via fuzzing (llvm-isel-fuzzer).
DeltaFile
+29-0llvm/test/CodeGen/X86/flags-copy-lowering-unreachable.mir
+3-2llvm/lib/Target/X86/X86FlagsCopyLowering.cpp
+32-22 files

LLVM/project e5b82f4cross-project-tests/debuginfo-tests/dexter/dex/debugger DAP.py

format
DeltaFile
+5-1cross-project-tests/debuginfo-tests/dexter/dex/debugger/DAP.py
+5-11 files

LLVM/project f4a0273lldb/test/API/tools/lldb-dap/coreFile TestDAP_coreFile.py, lldb/tools/lldb-dap/Handler AttachRequestHandler.cpp

[lldb-dap] Support loading core files through attachCommands (#202785)

The `attachCommands` attach option lets users bootstrap a session with
arbitrary LLDB commands, but a command that loaded a core (e.g. `target
create --core`) produced a broken session:
`ConfigurationDoneRequestHandler` would call `process.Continue()` on the
core and fail, because the non-live-session handling was keyed on the
`coreFile` attach argument rather than on the actual resulting process.

This teaches `AttachRequestHandler` to detect, after the attach commands
run, whether the selected process was loaded from a core via the
`SBProcess:: IsLiveDebugSession()` API added in #203111. When it is a
core, it sets `stop_at_entry` and clears `is_live_session`, mirroring
what the `coreFile` key does.
DeltaFile
+91-41lldb/test/API/tools/lldb-dap/coreFile/TestDAP_coreFile.py
+9-0lldb/tools/lldb-dap/Handler/AttachRequestHandler.cpp
+100-412 files

LLVM/project 9d98437llvm/include/llvm/ADT StringMap.h, llvm/lib/Transforms/IPO StripSymbols.cpp

[StringMap] Invalidate iterators in remove() (#203249)

erase() bumps the epoch to invalidate iterators (#202237), but the
lower-level remove() — which detaches an entry without destroying it,
used
by ValueSymbolTable via Value::setName() — did not. Move the
incrementEpoch() into remove() so remove-while-iterating fails fast
under
LLVM_ENABLE_ABI_BREAKING_CHECKS too.

Aided by Claude Opus 4.8
Reland after lldb fix #203035
DeltaFile
+10-7llvm/lib/Transforms/IPO/StripSymbols.cpp
+11-0llvm/unittests/ADT/StringMapTest.cpp
+4-2llvm/include/llvm/ADT/StringMap.h
+25-93 files

LLVM/project 831ed97mlir/docs LangRef.md

[mlir][LangRef] Clarify terminator continuations (#201111)

Document that terminators may have no normal control-flow continuation,
such as ub.unreachable. Also clarify that no-return calls do not remove
the structural terminator requirement.

Assisted-by: Codex
DeltaFile
+24-17mlir/docs/LangRef.md
+24-171 files

LLVM/project 625538fllvm/lib/Support KnownBits.cpp, llvm/unittests/Support KnownBitsTest.cpp

[KnownBits] Fix add() SelfAdd assertion for bitwidths >= 512 (#202769)

`KnownBits::add()` with `SelfAdd=true` lowers `X+X` to `shl(X, 1)` using
a fixed 8-bit shift amount:

```cpp
KnownBits Amt = KnownBits::makeConstant(APInt(8, 1));
return KnownBits::shl(LHS, Amt, NUW, NSW, /*ShAmtNonZero=*/true);
```

The comment there claims the shift-amount bitwidth is independent of the
source bitwidth, but that is not true: `shl()`'s `getMaxShiftAmount()`
extracts `Log2_32(BitWidth)` bits from the shift amount's max value when
`BitWidth` is a power of two:

```cpp
static unsigned getMaxShiftAmount(const APInt &MaxValue, unsigned BitWidth) {
  if (isPowerOf2_32(BitWidth))
    return MaxValue.extractBitsAsZExtValue(Log2_32(BitWidth), 0);

    [23 lines not shown]
DeltaFile
+19-0llvm/unittests/Support/KnownBitsTest.cpp
+4-1llvm/lib/Support/KnownBits.cpp
+23-12 files

LLVM/project 534e92allvm/lib/Transforms/Scalar LoopInterchange.cpp

address review
DeltaFile
+1-3llvm/lib/Transforms/Scalar/LoopInterchange.cpp
+1-31 files

LLVM/project 495d2adllvm/lib/Transforms/Scalar LoopInterchange.cpp, llvm/test/Transforms/LoopInterchange reduction-extra-use-in-inner-loop.ll

[LoopInterchange] Reject if outer reduction value has extra user
DeltaFile
+13-23llvm/test/Transforms/LoopInterchange/reduction-extra-use-in-inner-loop.ll
+20-0llvm/lib/Transforms/Scalar/LoopInterchange.cpp
+33-232 files

LLVM/project 2a1767cllvm/test/Transforms/LoopInterchange reduction-extra-use-in-inner-loop.ll

[LoopInterchange] Add test for extra reduction use in inner loop (NFC)
DeltaFile
+281-0llvm/test/Transforms/LoopInterchange/reduction-extra-use-in-inner-loop.ll
+281-01 files