LLVM/project 033aa12llvm/lib/Target/Hexagon HexagonRDFOpt.cpp, llvm/test/CodeGen/Hexagon rdfopt-liveins-hang.mir

[Hexagon] Fix HexagonRDFOpt hang during live-in recomputation (#209986)

After HexagonRDFOpt, the compiler recomputed live-in registers for every
block in one batch. On large inputs (e.g. kernel builds) this was slow,
and on some functions each pass changed the live-in values of other
blocks, triggering more passes until the compiler hung (PR #207422).

Fix: process blocks one at a time in post-order (successors before
predecessors) and stop as soon as nothing changes. Add a pass limit as a
safety net to keep compile time bounded in all cases.

(cherry picked from commit da6f3e6cc2565e4c6cf720931845c8eee132ce86)
DeltaFile
+541-0llvm/test/CodeGen/Hexagon/rdfopt-liveins-hang.mir
+21-5llvm/lib/Target/Hexagon/HexagonRDFOpt.cpp
+562-52 files

LLVM/project f04bf47libc/src/__support/File/linux file.cpp, libc/src/__support/OSUtil/linux auxv.h

[libc][NFC] Port raw syscall users to existing syscall_wrappers (#208039)

Several call sites still invoked syscall_impl directly (or carried
their own SYS_* fallback ladders) for syscalls that already have a
wrapper in src/__support/OSUtil/linux/syscall_wrappers.

This PR removes these syscalls in favor of the syscall_wrappers.
DeltaFile
+0-34libc/src/sys/ipc/linux/kernel_statx.h
+14-16libc/src/__support/File/linux/file.cpp
+15-11libc/src/__support/threads/linux/thread.cpp
+6-17libc/src/sys/mman/linux/shm_unlink.cpp
+13-8libc/src/__support/OSUtil/linux/auxv.h
+7-8libc/src/stdio/linux/remove.cpp
+55-9417 files not shown
+111-14823 files

LLVM/project db1f902.ci compute_projects_test.py compute_projects.py, .github/workflows premerge.yaml

Add macOS premerge check workflow (#207435)

Added a premerge check workflow for macOS self-hosted runners to build
and test projects.
DeltaFile
+109-31.github/workflows/premerge.yaml
+50-2.ci/compute_projects_test.py
+12-2.ci/compute_projects.py
+171-353 files

LLVM/project a67eac3llvm/lib/Target/AMDGPU SOPInstructions.td

[NFC][AMDGPU] Cleanup in SOPInstructions.td (#210367)

- Eliminate code which was accidentally merged during a merge-conflict
(https://github.com/llvm/llvm-project/pull/203155/changes#r3560059941)
- Remove comments as they are specific to usubsat.
DeltaFile
+0-9llvm/lib/Target/AMDGPU/SOPInstructions.td
+0-91 files

LLVM/project 53c048blibcxx/utils/ci/images libcxx_release_runners.txt

[libc++] Update release runners to the image that was used on main at the branch point (#210378)

This will allow retaining a stable image for CI throughout the whole
LLVM 23 release.
DeltaFile
+1-1libcxx/utils/ci/images/libcxx_release_runners.txt
+1-11 files

LLVM/project 0b666f7utils/bazel/llvm-project-overlay/lldb/source/Plugins BUILD.bazel plugin_config.bzl

Add missing BigArchive container plugin to lldb's bazel build (#210304)

Another missing plugin and its libraries in the LLDB bazel build. Based
this one on source/Plugins/ObjectContainer/Big-Archive/CMakeLists.txt
and its dependecies ( {}.cpp & {}.h)

waiting on CI to confirm bazel is correct as cannot build locally.

Can confirm this library will convert to BUCK internally at Meta and
build with buck2 where we do have in the default plugin list.

bazel rule assisted with: claude
DeltaFile
+15-0utils/bazel/llvm-project-overlay/lldb/source/Plugins/BUILD.bazel
+1-0utils/bazel/llvm-project-overlay/lldb/source/Plugins/plugin_config.bzl
+16-02 files

LLVM/project fd55bbdcompiler-rt/test/profile/Linux counter_promo_for.c counter_promo_while.c

[compiler-rt] Fix tests after #205331 (#210370)

New optimizations changed some compiler-rt tests. Update the test
expectations based on this.

Fixes #210355.
DeltaFile
+0-6compiler-rt/test/profile/Linux/counter_promo_for.c
+0-6compiler-rt/test/profile/Linux/counter_promo_while.c
+0-122 files

LLVM/project d63bd84flang/include/flang/Optimizer/Dialect FIROps.td, flang/lib/Optimizer/CodeGen CodeGen.cpp

[flang] Added fir.create_box operation. (#210220)

This patch adds `fir.create_box` operation that allows
creating `!fir.box<>` values with arbitrary byte strides.
It can be used to recreate boxes describing non-contiguous
arrays from descriptor components (base_addr/lbs/extents/strides)
across offload regions.

This is just initial definition and code generation code.
The folders and passes producing this operation will be added
later.
DeltaFile
+67-0flang/lib/Optimizer/Dialect/FIROps.cpp
+59-0flang/include/flang/Optimizer/Dialect/FIROps.td
+49-6flang/lib/Optimizer/CodeGen/CodeGen.cpp
+40-0flang/test/Fir/invalid.fir
+39-0flang/test/Fir/create-box-codegen.fir
+21-0flang/test/Fir/fir-ops.fir
+275-66 files

LLVM/project 8258e55llvm/lib/Transforms/Vectorize VPlanTransforms.cpp VPlanUtils.cpp, llvm/test/Transforms/LoopVectorize vplan-based-stride-mv.ll

Expand to VPlan recipes instead of to LLVM IR
DeltaFile
+20-22llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+36-0llvm/lib/Transforms/Vectorize/VPlanUtils.cpp
+4-4llvm/test/Transforms/LoopVectorize/vplan-based-stride-mv.ll
+5-0llvm/lib/Transforms/Vectorize/VPlanUtils.h
+65-264 files

LLVM/project 9e7830dllvm/lib/Transforms/Vectorize VPlanTransforms.cpp VPlanTransforms.h

Address review comments
DeltaFile
+17-26llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+6-3llvm/lib/Transforms/Vectorize/VPlanTransforms.h
+1-1llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+24-303 files

LLVM/project 193fc77llvm/lib/Transforms/Vectorize VPlanTransforms.cpp VPlan.h, llvm/test/Transforms/LoopVectorize vplan-based-stride-mv.ll

[VPlan] Implement VPlan-based stride speculation
DeltaFile
+734-914llvm/test/Transforms/LoopVectorize/vplan-based-stride-mv.ll
+399-222llvm/test/Transforms/LoopVectorize/VPlan/vplan-based-stride-mv.ll
+249-2llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+42-0llvm/lib/Transforms/Vectorize/VPlan.h
+7-5llvm/lib/Transforms/Vectorize/VPRecipeBuilder.h
+10-0llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+1,441-1,1435 files not shown
+1,466-1,14611 files

LLVM/project 662b2c6llvm/test/Transforms/LoopVectorize vplan-based-stride-mv.ll, llvm/test/Transforms/LoopVectorize/VPlan vplan-based-stride-mv.ll

Add `@independent_strides` test
DeltaFile
+217-86llvm/test/Transforms/LoopVectorize/vplan-based-stride-mv.ll
+92-0llvm/test/Transforms/LoopVectorize/VPlan/vplan-based-stride-mv.ll
+309-862 files

LLVM/project bb7eed2llvm/test/Transforms/LoopVectorize vplan-based-stride-mv.ll, llvm/test/Transforms/LoopVectorize/VPlan vplan-based-stride-mv.ll

[NFC][VPlan] Add initial tests for future VPlan-based stride MV

I tried to include both the features that current
LoopAccessAnalysis-based transformation supports (e.g., trunc/sext of
stride) but also cases where the current implementation behaves poorly,
e.g., https://godbolt.org/z/h31c3zKxK; as well as some other potentially
interesting scenarios I could imagine.

The are two test files with the same content. One is for VPlan dump change of
the future transformation alone (I'll update `-vplan-print-after` in the next
PR), another is for the full vectorizer pipeline. The latter have two `RUN:`
lines:
 * No multiversioning, so the next PR diff can show the transformation itself
 * Stride multiversionin performed in LAA, so that we can compare future
   VPlan-based transformation vs old behavior.
DeltaFile
+4,731-0llvm/test/Transforms/LoopVectorize/vplan-based-stride-mv.ll
+3,417-0llvm/test/Transforms/LoopVectorize/VPlan/vplan-based-stride-mv.ll
+8,148-02 files

LLVM/project a55b011clang/test/CodeGen/SystemZ systemz-module.flags.c

[SystemZ/[z/OS] Guard source-epoch related testcase to 64-bit clang targets (#210341)

This patch guards the following testcase for 64-bit clang targets Clang :: CodeGen/SystemZ/systemz-module.flags.c
DeltaFile
+2-0clang/test/CodeGen/SystemZ/systemz-module.flags.c
+2-01 files

LLVM/project e9473e1clang/include/clang/Basic DiagnosticIDs.h

[clang][NFC] Bump the maximum number of Frontend diagnostics

The number of Frontend diagnostics in DiagnosticFrontendKinds.td is close
to the DIAG_SIZE_FRONTEND limit of 200 (195 in use). Increase the limit
to 300.
DeltaFile
+1-1clang/include/clang/Basic/DiagnosticIDs.h
+1-11 files

LLVM/project 0ba1420llvm/lib/Target/AMDGPU SOPInstructions.td

[NFC] Cleanup in SOPInstructions.td

- Eliminate code which was accidentally merged during a merge-conflict
(https://github.com/llvm/llvm-project/pull/203155/changes#r3560059941)
- Remove comments as they are specific to usubsat.
DeltaFile
+0-9llvm/lib/Target/AMDGPU/SOPInstructions.td
+0-91 files

LLVM/project 3298029llvm/lib/Target/AMDGPU AMDGPUSwLowerLDS.cpp, llvm/test/CodeGen/AMDGPU amdgpu-sw-lower-lds-flat-ptr-arg-asan.ll

update
DeltaFile
+231-94llvm/lib/Target/AMDGPU/AMDGPUSwLowerLDS.cpp
+213-30llvm/test/CodeGen/AMDGPU/amdgpu-sw-lower-lds-flat-ptr-arg-asan.ll
+444-1242 files

LLVM/project 60846c8cross-project-tests/intrinsic-header-tests riscv_packed_simd.c

[RISCV][P-ext][NFC] Add cross-project tests for packed zip/unzip intrinsics (#209575)
DeltaFile
+68-0cross-project-tests/intrinsic-header-tests/riscv_packed_simd.c
+68-01 files

LLVM/project 5f7060cclang/lib/Frontend FrontendActions.cpp, clang/test/Templight templight-empty-entries-fix.cpp templight-nested-memoization.cpp

[clang] remove templight support (#210166)

Removed as unmaintained, per discussion in
https://discourse.llvm.org/t/rfc-removing-templight-support/90777
DeltaFile
+0-345clang/test/Templight/templight-empty-entries-fix.cpp
+0-262clang/lib/Frontend/FrontendActions.cpp
+0-174clang/test/Templight/templight-nested-memoization.cpp
+0-85clang/test/Templight/templight-prior-template-arg.cpp
+0-84clang/test/Templight/templight-nested-template-instantiation.cpp
+0-82clang/test/Templight/templight-default-arg-inst.cpp
+0-1,03221 files not shown
+4-1,55127 files

LLVM/project c5dd38dllvm/lib/Target/AMDGPU SIISelLowering.cpp AMDGPUISelLowering.cpp, llvm/test/CodeGen/AMDGPU uaddsat.ll

[AMDGPU] Lower uniform uaddsat.i16 to SALU instructions
DeltaFile
+100-90llvm/test/CodeGen/AMDGPU/GlobalISel/uaddsat.ll
+56-0llvm/test/CodeGen/AMDGPU/uaddsat.ll
+10-2llvm/lib/Target/AMDGPU/SIISelLowering.cpp
+1-0llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
+167-924 files

LLVM/project bcb4590compiler-rt/test/sanitizer_common/android_commands android_common.py, lldb/examples/python delta.py gdbremote.py

Replace Python's deprecated tempfile.mktemp() with secure temp APIs (#210123)

Python's tempfile.mktemp() is deprecated and insecure: it returns a path
without creating the file, leaving a TOCTOU/symlink window before the
file is opened. Replace every use, choosing the temp API by lifetime:

- compiler-rt android_common.py adb(): tempfile.TemporaryFile
(anonymous, auto-deleted), read back via seek(0); drops manual
close()/unlink().
- compiler-rt android_common.py pull_from_device():
tempfile.TemporaryDirectory so "adb pull" writes into a private,
auto-cleaned directory.
- lldb examples delta.py / gdbremote.py start_gdb_log():
tempfile.NamedTemporaryFile(delete=False); the log must outlive the call
for a later stop_gdb_log, so it is intentionally not auto-deleted.

Reported by internal static analysis and contributed upstream for the
benefit of the wider community.


    [3 lines not shown]
DeltaFile
+18-23compiler-rt/test/sanitizer_common/android_commands/android_common.py
+2-1lldb/examples/python/delta.py
+2-1lldb/examples/python/gdbremote.py
+22-253 files

LLVM/project de5cef3mlir/include/mlir/Dialect/Vector/IR VectorOps.td VectorOps.h, mlir/lib/Dialect/Vector/IR VectorOps.cpp

[mlir][vector] Extend `combineContractAndBroadcast` to accept `vector.shape_cast` (#208752)

`combineContractAndBroadcast` is a pattern that matches
`vector.contract` operations whose inputs are defined by
`vector.broadcast`, e.g.:

```mlir
%0 = vector.broadcast %lhs : vector<8x4xi32> to vector<1x8x4xi32>
%1 = vector.broadcast %rhs : vector<8x4xi32> to vector<1x8x4xi32>
%result = vector.contract {
    indexing_maps = [#map0, #map1, #map2],
    iterator_types = ["reduction", "parallel", "parallel", "reduction"],
    kind = #vector.kind<add>
  } %0, %1, %acc : vector<1x8x4xi32>, vector<1x8x4xi32> into vector<8x8xi32>
```

The pattern folds away the reduction over a unit dimension introduced by
the defining operations, producing a simplified `vector.contract`:


    [22 lines not shown]
DeltaFile
+90-55mlir/lib/Dialect/Vector/IR/VectorOps.cpp
+101-2mlir/test/Dialect/Vector/vector-reduce-to-contract.mlir
+26-14mlir/lib/Dialect/Vector/Transforms/VectorTransforms.cpp
+3-0mlir/include/mlir/Dialect/Vector/IR/VectorOps.td
+1-1mlir/include/mlir/Dialect/Vector/IR/VectorOps.h
+221-725 files

LLVM/project 709b7d1llvm/lib/Target/X86 X86ISelLowering.cpp

[X86] Pull out isFoldableAsShuffle lamdba as helper function. NFC. (#210354)

For future reuse.
DeltaFile
+7-7llvm/lib/Target/X86/X86ISelLowering.cpp
+7-71 files

LLVM/project 06340b8clang/include/clang/ExtractAPI DeclarationFragments.h, clang/lib/ExtractAPI DeclarationFragments.cpp

[ExtractAPI] Include nullability attributes (#209221)

Nullability attributes (nullable, nonnull, null_unspecified,
null_resettable) add valuable context about the type, and would be
useful when viewing declarations. This patch updates ExtractAPI to
include these attributes in the symbol graph.

rdar://139097216
DeltaFile
+142-0clang/test/ExtractAPI/objc_nullability.m
+18-3clang/lib/ExtractAPI/DeclarationFragments.cpp
+4-0clang/include/clang/ExtractAPI/DeclarationFragments.h
+164-33 files

LLVM/project e57b9c0clang/include/clang/ExtractAPI ExtractAPIVisitor.h, clang/test/ExtractAPI availability_typedef_anonymous_record.c

[ExtractAPI] Include availability attributes for anonymous typedefs (#209187)

When an anonymous type is defined and has availability attributes, the
attributes are attached to the typedef rather than the type being
defined. This patch updates the anonymous type handling logic to merge
the availability from the typedef in order to correctly include it in
the symbol graph.

rdar://125497949
DeltaFile
+24-0clang/test/ExtractAPI/availability_typedef_anonymous_record.c
+10-6clang/include/clang/ExtractAPI/ExtractAPIVisitor.h
+34-62 files

LLVM/project 4671287lldb/source/Plugins/Process/Windows/Common ProcessWindows.cpp

[lldb][Windows] Reuse preloaded exe module on launch (#210010)

# Brief

Recreating the module everytime causes the path to be canonicalized.
This does not work well with subst drives, because the newly created
module will not have the correct drive path, causing breakpoints to be
unresolved.


# Description
`ProcessWindows::OnDebuggerConnected` derives the executable module from
`GetModuleFileNameExW` on every connect. This returns the process
image's *real* path, so when the target is created via a subst'd or
mapped drive (e.g. `S:\...\a.out`, where `S:` is subst for `C:\S`) it
comes back as `C:\S\...\a.out`. `GetOrCreateModule` then fails to match
the module LLDB had already preloaded and creates a duplicate instead.
The duplicate leaves the original module's breakpoint location orphaned
unresolved while the new module's location is resolved, so a source line

    [16 lines not shown]
DeltaFile
+15-17lldb/source/Plugins/Process/Windows/Common/ProcessWindows.cpp
+15-171 files

LLVM/project 30f270elld/COFF InputFiles.cpp Driver.cpp, lld/test/COFF link-dll-arm64x.s

[LLD] [COFF] Fix linking directly against an ARM64X DLL without import library (#210311)

In mingw mode, when linking against a DLL, the user can either provide a
regular import library, or provide the actual DLL. When linking against
an ARM64X image, add both native and EC views to the symbol table on EC
targets. Also getMachine() on such images returns ARM64X, treat it as
ARM64 instead.
DeltaFile
+81-0lld/test/COFF/link-dll-arm64x.s
+3-15lld/COFF/InputFiles.cpp
+15-1lld/COFF/Driver.cpp
+4-2lld/COFF/InputFiles.h
+103-184 files

LLVM/project 45f76eallvm/utils/gn/secondary/clang/unittests/CIR BUILD.gn

[gn build] Port 40ae05d4773f (#210357)
DeltaFile
+1-0llvm/utils/gn/secondary/clang/unittests/CIR/BUILD.gn
+1-01 files

LLVM/project d05f7b2llvm/utils/gn/secondary/llvm/lib/Target/AArch64 BUILD.gn

[gn build] Port 38104cf836c3 (#210356)
DeltaFile
+1-0llvm/utils/gn/secondary/llvm/lib/Target/AArch64/BUILD.gn
+1-01 files

LLVM/project 0b1652dllvm/lib/Target/RISCV/GISel RISCVLegalizerInfo.cpp, llvm/test/CodeGen/RISCV/GlobalISel atomicrmw-xchg.ll legalizer-info-validation.mir

[RISCV][GlobalISel] Legalize G_ATOMICRMW_XCHG (#209983)

This commit makes `xchg` consistent with `add/and/or/xor` across all
type/extension combinations. Updates `legalizer-info-validation.mir` for
the newly defined rules and adds `atomicrmw-xchg.ll` and
`legalize-atomicrmw-xchg-rv{32,64}.mir` tests.
DeltaFile
+1,267-0llvm/test/CodeGen/RISCV/GlobalISel/atomicrmw-xchg.ll
+125-0llvm/test/CodeGen/RISCV/GlobalISel/legalizer/legalize-atomicrmw-xchg-rv64.mir
+94-0llvm/test/CodeGen/RISCV/GlobalISel/legalizer/legalize-atomicrmw-xchg-rv32.mir
+3-2llvm/test/CodeGen/RISCV/GlobalISel/legalizer-info-validation.mir
+3-2llvm/lib/Target/RISCV/GISel/RISCVLegalizerInfo.cpp
+1,492-45 files