LLVM/project a312590mlir/lib/Dialect/Transform/IR Utils.cpp

address review
DeltaFile
+10-4mlir/lib/Dialect/Transform/IR/Utils.cpp
+10-41 files

LLVM/project b13867dcompiler-rt/cmake builtin-config-ix.cmake, compiler-rt/cmake/Modules CompilerRTUtils.cmake

[compiler-rt] Initial support for compiler-rt builtins on SPIRV64 target (#192897)
DeltaFile
+18-0compiler-rt/cmake/caches/SPIRV64.cmake
+5-0compiler-rt/lib/builtins/int_types.h
+4-1compiler-rt/cmake/Modules/CompilerRTUtils.cmake
+3-1compiler-rt/lib/builtins/CMakeLists.txt
+2-1compiler-rt/cmake/builtin-config-ix.cmake
+1-1compiler-rt/lib/builtins/int_lib.h
+33-46 files

LLVM/project 20005a0flang/test/Lower constant-logical-transfer.f90

[flang] Update LIT test for big-endian platform (NFC) (#193309)

Specify the kind type parameter to ensure the 64-bit value is correctly represented
in the big endian environment.
DeltaFile
+1-1flang/test/Lower/constant-logical-transfer.f90
+1-11 files

LLVM/project 8144c14lldb/source/Target AssertFrameRecognizer.cpp

[lldb] Fix assert frame recognizer for non-macOS Apple platforms (#193435)
DeltaFile
+12-0lldb/source/Target/AssertFrameRecognizer.cpp
+12-01 files

LLVM/project d154ccdllvm/lib/Target/AArch64 AArch64ISelLowering.cpp, llvm/test/CodeGen/AArch64 fixed-vector-deinterleave.ll

[AArch64][ISel] Add lowering for fixed-width deinterleave3 (#192972)
DeltaFile
+109-0llvm/test/CodeGen/AArch64/fixed-vector-deinterleave.ll
+31-0llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
+140-02 files

LLVM/project d51db87llvm/test/CodeGen/AMDGPU/NextUseAnalysis spill-vreg-many-lanes.mir acyclic-770bb.mir

Rebase

Created using spr 1.3.7
DeltaFile
+275,101-0llvm/test/CodeGen/AMDGPU/NextUseAnalysis/spill-vreg-many-lanes.mir
+144,679-0llvm/test/CodeGen/AMDGPU/NextUseAnalysis/acyclic-770bb.mir
+57,682-0llvm/test/CodeGen/AMDGPU/NextUseAnalysis/double-nested-loops-complex-cfg.mir
+41,844-0llvm/test/CodeGen/AMDGPU/NextUseAnalysis/test_ers_multiple_spills2.mir
+40,613-0llvm/test/CodeGen/AMDGPU/NextUseAnalysis/test_ers_multiple_spills1.mir
+37,209-0llvm/test/CodeGen/AMDGPU/NextUseAnalysis/test_ers_multiple_spills3.mir
+597,128-02,786 files not shown
+944,678-57,7512,792 files

LLVM/project 54fcd86libc/hdr/types struct_sockaddr_storage.h CMakeLists.txt, libc/include/llvm-libc-types struct_sockaddr_storage.h

[libc] Add struct sockaddr_storage (on linux) (#192978)

This deceptively simple patch has one catch. The POSIX standard states:

"""
When a pointer to a sockaddr_storage structure is converted to a pointer
to a sockaddr structure, or vice versa, the ss_family member of the
sockaddr_storage structure shall map onto the sa_family member of the
sockaddr structure. When a pointer to a sockaddr_storage structure is
converted to a pointer to a protocol-specific address structure, or vice
versa, the ss_family member shall map onto a member of that structure
that is of type sa_family_t that identifies the protocol's address
family. When a pointer to a sockaddr structure is converted to a pointer
to a protocol-specific address structure, or vice versa, the sa_family
member shall map onto a member of that structure that is of type
sa_family_t that identifies the protocol's address family. Additionally,
the structures shall be defined in such a way that the compiler treats
an access to the stored value of the sa_family_t member of any of these
structures, via an lvalue expression whose type involves any other one

    [20 lines not shown]
DeltaFile
+37-0libc/test/src/sys/socket/linux/sockaddr_storage_test.cpp
+26-0libc/test/src/sys/socket/linux/sockaddr_storage_helper.cpp
+24-0libc/include/llvm-libc-types/struct_sockaddr_storage.h
+21-0libc/hdr/types/struct_sockaddr_storage.h
+12-0libc/test/src/sys/socket/linux/CMakeLists.txt
+9-0libc/hdr/types/CMakeLists.txt
+129-05 files not shown
+134-211 files

LLVM/project 0dadac7flang/lib/Semantics resolve-directives.cpp

[flang][OpenMP] Remove unused member, NFC

After e8e8b6a3d8616b5d6572f9e16442cc97ef3867bd, the member
`privateDataSharingAttributeObjects_` of OmpAttrVisitor is no longer
used. Remove it and the associated accessor functions.
DeltaFile
+0-12flang/lib/Semantics/resolve-directives.cpp
+0-121 files

LLVM/project e1ab08allvm/include/llvm/Transforms/Utils LoopUtils.h, llvm/lib/CodeGen ExpandReductions.cpp

[RISCV] Functional llvm.vector.reduce.mul on scalable types (#193094)

RVV does not have an instruction for performing a horizontal multiply
reduction (either integer or floating point). However, a user of clang
can explicitly write at least the integer form via the
__builtin_reduce_mul construct, and currently we just crash when
compiling this.

This change converts the crash into functionally correct scalar loop to
process each element one by one at runtime. This will be slow, but at
least correct.

Note that to my knowledge we can't generate the floating point one
directly from C, but I decided to handle both for completeness while I
was here.

Written by Claude Code with guidance and review by me.
DeltaFile
+509-2llvm/test/CodeGen/RISCV/rvv/vreductions-int.ll
+140-0llvm/test/CodeGen/RISCV/rvv/vreductions-fp-sdnode.ll
+61-0llvm/lib/Transforms/Utils/LoopUtils.cpp
+27-6llvm/lib/CodeGen/ExpandReductions.cpp
+10-0llvm/include/llvm/Transforms/Utils/LoopUtils.h
+747-85 files

LLVM/project 59bf896lldb/source/Commands CommandObjectMemory.cpp CommandObjectProcess.cpp

[lldb] Remove trailing newlines from AppendErrorWithFormat calls (part 2) (#193168)

Follow up to #192965.

This call adds a newline if there isn't one. Changing these will
eventually let us always add a newline, which is in line with
the other methods on CommandReturnObject.

This is a small part of calls found with:
* VSCode search for
`(\.AppendErrorWithFormat\(([\s\r\n]+)?"(?:(?:\\.|[^"\\])*))\\n"` and
replace with `$1"`.
* Asserting that the last character of the format string is not a
newline.
* Manual inspection.
DeltaFile
+36-36lldb/source/Commands/CommandObjectMemory.cpp
+17-18lldb/source/Commands/CommandObjectProcess.cpp
+12-14lldb/source/Commands/CommandObjectFrame.cpp
+8-8lldb/source/Commands/CommandObjectLog.cpp
+6-6lldb/source/Commands/CommandObjectRegister.cpp
+3-3lldb/source/Commands/CommandObjectPlatform.cpp
+82-852 files not shown
+84-878 files

LLVM/project 8f51fe4llvm/lib/Target/ARM ARMISelLowering.cpp, llvm/test/CodeGen/Thumb2 mve-no-fp.ll

arm: fix float to integer conversion with `+mve` (#193319)

Fix an instruction selection failure when using the `+mve` (and an implied `-mve.fp`)
target feature. From what I understand, e.g. based on
https://reviews.llvm.org/D60694, this combination of target features
enables float registers and loads/moves, but no real FP operations.
Hence

https://godbolt.org/z/xeTcbqMqx

```llvm
define i32 @foo(float %x) {
  %i = call i32 @llvm.fptosi.sat.i32.f32(float %x)
  ret i32 %i
}
```

compiled with `llc -mtriple=thumbv8m.main-none-eabi
-mattr=+v8.1m.main,-mve.fp,+mve -O2` hit

    [8 lines not shown]
DeltaFile
+325-0llvm/test/CodeGen/Thumb2/mve-no-fp.ll
+3-5llvm/lib/Target/ARM/ARMISelLowering.cpp
+328-52 files

LLVM/project b77a894clang/lib/AST/ByteCode Pointer.h

[clang][bytecode] print array root state in Pointer::print() (#193494)

And check isZero() so later output checks don't run into null pointers
as much.
DeltaFile
+6-1clang/lib/AST/ByteCode/Pointer.h
+6-11 files

LLVM/project 1364f52llvm/test/Transforms/LoopInterchange pr45743-move-from-inner-preheader.ll

[LoopInterchange] Fix out-of-bounds accesses in tests (NFC) (#193272)

These tests trigger out-of-bounds accesses. Fix them by decreasing the
backedge-taken counts of the loops, and add pseudo code.
DeltaFile
+34-9llvm/test/Transforms/LoopInterchange/pr45743-move-from-inner-preheader.ll
+34-91 files

LLVM/project 4dbb7eellvm/test/CodeGen/AMDGPU load-constant-i8.ll load-global-i8.ll, llvm/test/CodeGen/RISCV idiv_large.ll

[DAG] visitFREEZE - revisit frozen node after merging with unfrozen uses (#188206)

After merging other uses of a N to all use FREEZE(N), make sure we
revisit FREEZE(N) to attempt to push the FREEZE through the (now
hasOneUse()) operand.

The only remaining annoyance I can find is the freeze nodes interfering
with amdgpu scalar/vector instructions - mainly because we end up with
more freeze(vectorload) patterns and extract_vector_elt nodes can't peek
through anymore - this is an ongoing general problem that nobody has
found a good answer to yet.
DeltaFile
+918-920llvm/test/CodeGen/AMDGPU/load-constant-i8.ll
+820-816llvm/test/CodeGen/AMDGPU/load-global-i8.ll
+798-412llvm/test/CodeGen/RISCV/rvv/setcc-fp-vp.ll
+642-412llvm/test/CodeGen/AMDGPU/load-global-i16.ll
+440-462llvm/test/CodeGen/RISCV/idiv_large.ll
+368-370llvm/test/CodeGen/AMDGPU/load-constant-i16.ll
+3,986-3,39224 files not shown
+5,443-4,84530 files

LLVM/project ba767d0llvm/lib/CodeGen MachineCopyPropagation.cpp

[MachineCopyPropagation][NFC] Refactor EliminateSpillageCopies (#192609)

This patch builds on the original implementation to address areas that
may impact compile time regression if enabled. The aim of the patch is
to streamline and improve the implementation for better compile time
impact. A summary of the changes is as follows:
- Cost modelling that does an initial scan of the block, any blocks with
less than 6 copies are immediately skipped.
- RegMask scan in `findLastSeenDefInCopy` removed. This now only checks
the recorded copies to ensure that RegMasks are clobbered when they are
seen if they clobber a Reg
- Streamlining of `IsSpillReloadPair` and `IsChainedCopy` to reduce the
need for a second call to isCopyInstr to get the DestSourcePair, these
are now returned from the lamdba function
- Use of TRI API to get the CommonRegClass

Assisted-by: Claude Sonnet 4.6 (Co-Pilot)
DeltaFile
+65-41llvm/lib/CodeGen/MachineCopyPropagation.cpp
+65-411 files

LLVM/project d93ea57lldb/source/Plugins/Process/gdb-remote ProcessGDBRemote.cpp ProcessGDBRemote.h

[lldb] Override UpdateBreakpointSites in ProcessGDBRemote to use MultiBreakpoint

This concludes the implementation of MultiBreakpoint by actually using
the new packet to batch breakpoint requests.

https://github.com/llvm/llvm-project/pull/192910
DeltaFile
+183-0lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
+8-0lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h
+191-02 files

LLVM/project 9a7fcf5lldb/include/lldb/Target Process.h, lldb/source/Plugins/Process/Utility StopInfoMachException.cpp

[lldb] Implement delayed breakpoints

This patch changes the Process class so that it delays *physically*
enabling/disabling breakpoints until the process is about to
resume/detach/be destroyed, potentially reducing the packets transmitted
by batching all breakpoints together.

Most classes only need to know whether a breakpoint is "logically"
enabled, as opposed to "physically" enabled (i.e. the remote server has
actually enabled the breakpoint). However, lower level classes like
derived Process classes, or StopInfo may actually need to know whether
the breakpoint was physically enabled. As such, this commit also adds a
"IsPhysicallyEnabled" API.

https://github.com/llvm/llvm-project/pull/192910
DeltaFile
+95-8lldb/source/Target/Process.cpp
+30-1lldb/include/lldb/Target/Process.h
+6-6lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
+5-3lldb/source/Plugins/Process/Utility/StopInfoMachException.cpp
+4-2lldb/source/Target/ThreadPlanStepOverBreakpoint.cpp
+5-0lldb/source/Target/TargetProperties.td
+145-203 files not shown
+149-249 files

LLVM/project 2070181lldb/include/lldb/Breakpoint BreakpointSite.h, lldb/include/lldb/Target Process.h

[lldb][NFC] Move BreakpointSite::IsEnabled/SetEnabled into Process

The Process class is the one responsible for managing the state of a
BreakpointSite inside the process. As such, it should be the one
answering questions about the state of the site.

https://github.com/llvm/llvm-project/pull/192910
DeltaFile
+23-29lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
+16-7lldb/source/Target/Process.cpp
+6-14lldb/include/lldb/Breakpoint/BreakpointSite.h
+10-0lldb/include/lldb/Target/Process.h
+5-5lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
+8-0lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h
+68-555 files not shown
+76-6411 files

LLVM/project ff8d8aclldb/source/Plugins/Process/gdb-remote GDBRemoteCommunicationClient.cpp GDBRemoteCommunicationClient.h, lldb/unittests/Process/gdb-remote GDBRemoteCommunicationClientTest.cpp

[lldb][GDBRemote] Parse MultiBreakpoint+ capability
DeltaFile
+22-0lldb/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp
+10-0lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
+3-0lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h
+35-03 files

LLVM/project 85dc811llvm/lib/CodeGen/SelectionDAG DAGCombiner.cpp

[X86] Add TODO for nsw+nuw handling to (add (add X, Y), X) --> add(add(X, X), Y) (#193503)

Noticed on #162242
DeltaFile
+1-0llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+1-01 files

LLVM/project 4c04adcclang/test/Sema warn-lifetime-safety.cpp, llvm/test/CodeGen/X86 isel-fmul-vector.ll isel-fsub-vector.ll

Merge branch 'main' into users/kparzysz/r07-move-branching-check
DeltaFile
+0-230clang/test/Sema/warn-lifetime-safety.cpp
+114-0llvm/test/CodeGen/X86/isel-fmul-vector.ll
+114-0llvm/test/CodeGen/X86/isel-fsub-vector.ll
+114-0llvm/test/CodeGen/X86/isel-fadd-vector.ll
+114-0llvm/test/CodeGen/X86/isel-fdiv-vector.ll
+106-0llvm/test/Transforms/InstCombine/phi.ll
+562-23072 files not shown
+1,383-69678 files

LLVM/project 475639allvm/test lit.cfg.py

Add SPIRV to excluded profcheck targets (#193509)
DeltaFile
+1-1llvm/test/lit.cfg.py
+1-11 files

LLVM/project a490b93lldb/include/lldb/Utility StringExtractorGDBRemote.h, lldb/packages/Python/lldbsuite/test/tools/lldb-server gdbremote_testcase.py

[lldb-server] Implement support for MultiBreakpoint packet

This is fairly straightforward, thanks to the helper functions created
in the previous commit.

https://github.com/llvm/llvm-project/pull/192910
DeltaFile
+50-0lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
+2-0lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.h
+2-0lldb/source/Utility/StringExtractorGDBRemote.cpp
+1-0lldb/include/lldb/Utility/StringExtractorGDBRemote.h
+0-1lldb/test/API/functionalities/multi-breakpoint/TestMultiBreakpoint.py
+1-0lldb/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py
+56-16 files

LLVM/project 8c83175lldb/source/Plugins/Process/gdb-remote GDBRemoteCommunicationServerLLGS.cpp GDBRemoteCommunicationServerLLGS.h

[lldb-server][NFC] Factor out code handling breakpoint packets

This commit extracts the code handling breakpoint packets into a helper
function that can be used by a future implementation of the
MultiBreakpointPacket.

It is meant to be purely NFC.

There are two functions handling breakpoint packets (`handle_Z`
and `handle_z`) with a lot of repeated code. This commit did not attempt
to merge the two, as that would make the diff much larger due to subtle
differences in the error message produced by the two. The only
deduplication done is in the code processing a GDBStoppointType, where a
helper struct (`BreakpointKind`) and function (`std::optional<BreakpointKind> getBreakpointKind(GDBStoppointType stoppoint_type)`) was created.

https://github.com/llvm/llvm-project/pull/192910
DeltaFile
+147-105lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
+28-0lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.h
+175-1052 files

LLVM/project 20a7d26llvm/lib/Target/SPIRV SPIRVLegalizeZeroSizeArrays.cpp, llvm/test/CodeGen/SPIRV legalize-zero-size-arrays-appending.ll

[SPIRV] Fix legalization of zero-sized intrinsic globals (#192730)

Some LLVM global intrinsics like `llvm.global_ctors` may become
zero-sized arrays if all constructors are inlined/optimized out.

These variables use appending linkage, which is only valid on arrays,
however as we are lowing to a pointer, this causes invalid IR if we
maintain the same linkage.

Use `ExternalWeak` linkage, the only other mergable linking type allowed
for intrinsic global variables with definitions. We also need to not
specify an initializer to not produce an invalid module.

As these variables do not represent user visible code, and all entries
were optimized out anyway, the new linkage should be fine.

---------

Signed-off-by: Nick Sarnie <nick.sarnie at intel.com>
DeltaFile
+13-2llvm/lib/Target/SPIRV/SPIRVLegalizeZeroSizeArrays.cpp
+14-0llvm/test/CodeGen/SPIRV/legalize-zero-size-arrays-appending.ll
+27-22 files

LLVM/project 8427d0clldb/source/Plugins/Process/gdb-remote GDBRemoteCommunicationServerLLGS.cpp GDBRemoteCommunicationServerLLGS.h

[lldbremote][NFC] Factor out code handling breakpoint packets

This commit extracts the code handling breakpoint packets into a helper
function that can be used by a future implementation of the
MultiBreakpointPacket.

It is meant to be purely NFC.

There are two functions handling breakpoint packets (`handle_Z`
and `handle_z`) with a lot of repeated code. This commit did not attempt
to merge the two, as that would make the diff much larger due to subtle
differences in the error message produced by the two. The only
deduplication done is in the code processing a GDBStoppointType, where a
helper struct (`BreakpointKind`) and function (`std::optional<BreakpointKind> getBreakpointKind(GDBStoppointType stoppoint_type)`) was created.

https://github.com/llvm/llvm-project/pull/192910
DeltaFile
+147-105lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
+28-0lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.h
+175-1052 files

LLVM/project 0c5d9b6lldb/test/API/functionalities/multi-breakpoint TestMultiBreakpoint.py main.c, lldb/tools/debugserver/source RNBRemote.cpp JSON.h

[debugserver] Implement MultiBreakpoint

This implements the packet as described in https://github.com/llvm/llvm-project/pull/192910
DeltaFile
+190-0lldb/test/API/functionalities/multi-breakpoint/TestMultiBreakpoint.py
+60-0lldb/tools/debugserver/source/RNBRemote.cpp
+7-0lldb/test/API/functionalities/multi-breakpoint/main.c
+3-0lldb/test/API/functionalities/multi-breakpoint/Makefile
+2-0lldb/tools/debugserver/source/JSON.h
+2-0lldb/tools/debugserver/source/RNBRemote.h
+264-06 files

LLVM/project c8b526fbolt/lib/Target/AArch64 AArch64MCSymbolizer.cpp, bolt/test/AArch64 tls-desc-le-relaxation-alternative.test

[bolt] AArch64: Fix TLSDESC to LE relaxation by mold (#190370)

mold linker creates relaxation stub from TLSDESC to LE, (lld makes it
IE) using sequence as NOP+NOP+MOVZ+MOVK. This in itself is not an issue,
when --emit-relocs is added the relocs R_AARCH64_TLSDESC_ADD_LO12 and
R_AARCH64_TLSDESC_CALL are associated with useful MOVW instructions.
However bolt does not check for R_AARCH64_TLSDESC_ADD_LO12 in
adjustRelocation() when disassembling the file. This later triggers a
bug when reloc is patched as movk is patched with S_LO12 fixup kind
which is invalid.

Refer to bug: https://github.com/llvm/llvm-project/issues/190366 for
details.
DeltaFile
+28-0bolt/test/AArch64/tls-desc-le-relaxation-alternative.test
+1-0bolt/lib/Target/AArch64/AArch64MCSymbolizer.cpp
+29-02 files

LLVM/project eda6c60offload/plugins-nextgen/level_zero/include L0Context.h L0Kernel.h, offload/plugins-nextgen/level_zero/src L0Kernel.cpp L0Context.cpp

[offload] Get kernel argument sizes from Level Zero (#192487)

Retrieve kernel argument sizes directly from Level Zero API as a
temporary workaround. This approach assumes no padding or alignment
between arguments. This enables immediate functionality while a more
permanent solution requiring offload API changes is being discussed.
DeltaFile
+27-8offload/plugins-nextgen/level_zero/src/L0Kernel.cpp
+7-0offload/plugins-nextgen/level_zero/src/L0Context.cpp
+5-0offload/plugins-nextgen/level_zero/include/L0Context.h
+2-0offload/plugins-nextgen/level_zero/include/L0Kernel.h
+41-84 files

LLVM/project f5e80c9flang/include/flang/Parser parse-tree.h, flang/lib/Lower Bridge.cpp

[Flang] Add SIMD Compiler Directive (#192969)

Similar to #192674, this adds support for the SIMD Compiler Directive,
previously supported by legacy Fortran frontends such as classic-flang.
This operates in the same way as `VECTORALWAYS`, marking a DO loop to be
vectorised by the LLVM Backend.

The missing support was highlighted while building an opensource
benchmark, as build warnings were indicating that this compiler
directive was being ignored.
DeltaFile
+72-0flang/test/Parser/simd-directive.f90
+17-0flang/test/Lower/simd-directive.f90
+9-0flang/test/Semantics/simd-directive01.f90
+8-0flang/lib/Lower/Bridge.cpp
+5-1flang/lib/Semantics/canonicalize-directives.cpp
+3-1flang/include/flang/Parser/parse-tree.h
+114-25 files not shown
+123-311 files