LLVM/project 51b0fc4clang-tools-extra/clang-tidy/cppcoreguidelines ProTypeMemberInitCheck.cpp

[clang-tidy][NFC] Remove a wrong comment in ProTypeMemberInitCheck (#205477)

`getAsCXXRecordDecl` will return nullptr for any dependent types.

It's introduced by #192786, see
https://github.com/llvm/llvm-project/pull/192786#issuecomment-4785223372
in original PR.
DeltaFile
+0-2clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.cpp
+0-21 files

LLVM/project 7570d2dllvm/lib/Target/AMDGPU SIInstrInfo.cpp, llvm/test/CodeGen/AMDGPU dpp_combine_gfx11.mir

[AMDGPU] Reject src1 immediates with dpp when unsupported (#201494)

This fixes an oversight in #164241.
DeltaFile
+19-0llvm/test/MachineVerifier/AMDGPU/dpp-imm-src1.mir
+10-0llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
+4-2llvm/test/CodeGen/AMDGPU/dpp_combine_gfx11.mir
+33-23 files

LLVM/project d17d249libc/utils/MPFRWrapper MPCommon.cpp

[libc][NFC] Remove a compiler warning for MPCommon (#205264)

Local build on Linux platform reports a compiler warning:
llvm-project/libc/utils/MPFRWrapper/MPCommon.cpp:546:15: warning:
implicit conversion loses integer precision: 'long' to 'int'
[-Wshorten-64-to-32]
  546 |     int mod = mpfr_get_si(value_ret_exact.value, MPFR_RNDN);
      |         ~~~   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.

Signed-off-by: jinge90 <ge.jin at intel.com>
DeltaFile
+1-1libc/utils/MPFRWrapper/MPCommon.cpp
+1-11 files

LLVM/project 9ee7bdaclang-tools-extra/clang-tidy/altera UnrollLoopsCheck.cpp, clang/include/clang/AST Decl.h

[clang][AST] Refactor `EvaluatedStmt` accessors in `VarDecl` (#205033)

1) Return the evaluated APValue as a const pointer since it
    may not be modified by callers.
 2) Only return a non-nullptr from `getEvaluatedValue()` if
    the APValue not absent.
DeltaFile
+8-7clang/include/clang/AST/Decl.h
+8-7clang/lib/AST/Decl.cpp
+2-2clang/lib/AST/ExprConstant.cpp
+1-1clang-tools-extra/clang-tidy/altera/UnrollLoopsCheck.cpp
+1-1clang/lib/CodeGen/CGExprConstant.cpp
+1-1clang/lib/Serialization/ASTWriter.cpp
+21-196 files

LLVM/project 2cbaca8llvm/lib/Analysis AliasAnalysis.cpp, llvm/test/Transforms/DeadStoreElimination atomic.ll atomic-todo.ll

Reapply [AA] Improve precision for monotonic atomic load/stor… (#195015)

Reverts https://github.com/llvm/llvm-project/pull/173135 and and add two
new IR tests to demonstrate the impact of different atomic orderings on
Dead Store Elimination(DSE).

This reverts commit c8941df6a1e4ed5e1ba3287985a60e1d7512c250.

Co-authored-by: Aiden Grossman <aidengrossman at google.com>
DeltaFile
+67-26llvm/test/Transforms/DeadStoreElimination/atomic.ll
+0-23llvm/test/Transforms/DeadStoreElimination/atomic-todo.ll
+2-4llvm/lib/Analysis/AliasAnalysis.cpp
+69-533 files

LLVM/project 793557ccompiler-rt/lib/instrumentor-tools/precision-analysis precision_analysis_runtime.cpp CMakeLists.txt, compiler-rt/test/instrumentor-tools precision_fp16_overflow.c precision_detailed.c

[Instrumentor] Add runtime examples: [2/N] A FP precision analysis

Second example:
Check all floating point operations and track if they could be done at
lower precision.

Partially developped by Claude (AI), tested and verified by me.
DeltaFile
+603-0compiler-rt/lib/instrumentor-tools/precision-analysis/precision_analysis_runtime.cpp
+92-0compiler-rt/test/instrumentor-tools/precision_fp16_overflow.c
+76-0compiler-rt/test/instrumentor-tools/precision_detailed.c
+67-0compiler-rt/lib/instrumentor-tools/precision-analysis/CMakeLists.txt
+66-0compiler-rt/test/instrumentor-tools/precision_mixed.c
+56-0compiler-rt/test/instrumentor-tools/simple_precision.c
+960-04 files not shown
+1,010-210 files

LLVM/project be3ee6fllvm/lib/Target/AArch64 AArch64InstrInfo.cpp, llvm/test/CodeGen/AArch64 peephole-substitute-cmp-adcs.mir

[AArch64] Add final missing instructions to sForm (#167518)

Fix missing opcodes in table of flag-setting instructions.
DeltaFile
+286-0llvm/test/CodeGen/AArch64/peephole-substitute-cmp-adcs.mir
+26-12llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
+312-122 files

LLVM/project f41a6b7.github/workflows release-binaries.yml

[Github] Bump release-binaries python version (#179287)

This makes it more consistent with the rest of the repository.
DeltaFile
+2-2.github/workflows/release-binaries.yml
+2-21 files

LLVM/project ca36859clang/docs ReleaseNotes.rst, clang/lib/CodeGen/Targets X86.cpp

[clang] Exclude EmptyRecord when calculating larger CXX records (#205040)

To match with GCC: https://godbolt.org/z/KPKGhhenK

Fixes: #203760

Assisted-by: Claude Sonnet 4.6
DeltaFile
+18-0clang/test/CodeGen/X86/avx-cxx-record.cpp
+2-0clang/docs/ReleaseNotes.rst
+1-0clang/lib/CodeGen/Targets/X86.cpp
+21-03 files

LLVM/project e8ce6c4compiler-rt/lib/instrumentor-tools instrumentor_runtime.h, compiler-rt/lib/instrumentor-tools/flop-counter flop_counter_runtime.cpp README.md

[Instrumentor] Add runtime examples: [1/N] A flop counter

This adds a instrumentor-tools folder into compiler RT to showcase
use cases of the instrumentor. The initial example is a program that,
via instrumentation, counts the number of flops performed. Call and
intrinsic support will follow after #198042.

Partially developped by Claude (AI), tested and verified by me.
DeltaFile
+295-0compiler-rt/lib/instrumentor-tools/instrumentor_runtime.h
+169-0compiler-rt/lib/instrumentor-tools/flop-counter/flop_counter_runtime.cpp
+77-0compiler-rt/lib/instrumentor-tools/flop-counter/README.md
+75-0compiler-rt/test/instrumentor-tools/lit.cfg.py
+67-0compiler-rt/lib/instrumentor-tools/flop-counter/CMakeLists.txt
+54-0compiler-rt/test/instrumentor-tools/CMakeLists.txt
+737-010 files not shown
+948-116 files

LLVM/project 87c73adllvm/test/tools/llubi icmp_ptr.ll, llvm/tools/llubi/lib Interpreter.cpp

[llubi] Add basic support for pointer comparisons (#205410)

This patch was a part of
https://github.com/llvm/llvm-project/pull/201170. I split the `icmp ptr`
support from the original PR since I am worried it might not catch up
for the LLVM 23 release (#201170 is blocked by #200672 for curating
mixed provenance tests). I hope we can pick most of the low-hanging
fruit exposed by fuzzers before the release. The released version should
be able to run csmith-generated tests without obvious false positives or
crashes.

BTW, this patch doesn't respect the exact semantics of `icmp ptr` (i.e.,
truncating the address to the address width. The naming is a bit
confusing...). Currently, we don't model external state in non-address
bits of a pointer in llubi. So I think it is fine.
DeltaFile
+31-0llvm/test/tools/llubi/icmp_ptr.ll
+4-3llvm/tools/llubi/lib/Interpreter.cpp
+35-32 files

LLVM/project 716d8d6compiler-rt/lib/instrumentor-tools instrumentor_runtime.h, compiler-rt/lib/instrumentor-tools/flop-counter flop_counter_runtime.cpp README.md

[Instrumentor] Add runtime examples: [1/N] A flop counter

This adds a instrumentor-tools folder into compiler RT to showcase
use cases of the instrumentor. The initial example is a program that,
via instrumentation, counts the number of flops performed. Call and
intrinsic support will follow after #198042.

Partially developped by Claude (AI), tested and verified by me.
DeltaFile
+295-0compiler-rt/lib/instrumentor-tools/instrumentor_runtime.h
+180-0compiler-rt/lib/instrumentor-tools/flop-counter/flop_counter_runtime.cpp
+107-0compiler-rt/lib/instrumentor-tools/flop-counter/README.md
+75-0compiler-rt/test/instrumentor-tools/lit.cfg.py
+68-0compiler-rt/lib/instrumentor-tools/flop-counter/CMakeLists.txt
+54-0compiler-rt/test/instrumentor-tools/CMakeLists.txt
+779-010 files not shown
+1,001-116 files

LLVM/project 822c268llvm/lib/Transforms/IPO Instrumentor.cpp, llvm/test/Instrumentation/Instrumentor default_rt.c numeric_subtypeid.ll

[Instrumentor] Add subtype IDs to complement type IDs for vectors/arrays

If the type of an argument passed to the instrumentation is a vector or
array, we still want to filter on the underlying type, and the
instrumentation might also need to know. Thus, we can now pass a subtype
ID, which is -1 except if it's a vector or array, then it's the element
type ID. Structs need to be handled differently.
DeltaFile
+88-9llvm/lib/Transforms/IPO/Instrumentor.cpp
+22-22llvm/test/Instrumentation/Instrumentor/default_rt.c
+39-0llvm/test/Instrumentation/Instrumentor/numeric_subtypeid.ll
+10-10llvm/test/Instrumentation/Instrumentor/module_and_globals.ll
+20-0llvm/test/Instrumentation/Instrumentor/default_config.json
+19-0llvm/test/Instrumentation/Instrumentor/numeric_subtypeid_config.json
+198-418 files not shown
+249-5214 files

LLVM/project 719144amlir/lib/Dialect/MemRef/IR MemRefOps.cpp, mlir/lib/Dialect/Tensor/IR TensorOps.cpp

[mlir] Simplify DimOp::fold by using `getConstantIndex`(NFC) (#205343)

Refactor `DimOp::fold` in both memref and tensor dialects to use the
existing `getConstantIndex()` helper instead of manually extracting the
index via `IntegerAttr`.
DeltaFile
+8-10mlir/lib/Dialect/MemRef/IR/MemRefOps.cpp
+8-10mlir/lib/Dialect/Tensor/IR/TensorOps.cpp
+16-202 files

LLVM/project 4bb31d7mlir/lib/Dialect/GPU/IR GPUDialect.cpp, mlir/test/Dialect/GPU canonicalize.mlir

[mlir][gpu] Fix memref.dim folding with negative index (#205338)

Fixes #205073.
DeltaFile
+11-0mlir/test/Dialect/GPU/canonicalize.mlir
+4-3mlir/lib/Dialect/GPU/IR/GPUDialect.cpp
+15-32 files

LLVM/project cfce4a6libcxx/test/libcxx/containers/views/views.span/span.elem assert.op_idx.pass.mm

[C++ Safe Buffers][libcxx][test] Add a test for hardened span in ObjC++

The C++ Safe Buffers project does not officially support ObjC++, while
people may still want to apply the analysis to ObjC++ code for
improved confidence. However, it would be meaningless to do so if
hardened containers do not trap out-of-bounds accesses. We need to add
a test that shows that hardened containers do work for ObjC++.

rdar://180461846
DeltaFile
+48-0libcxx/test/libcxx/containers/views/views.span/span.elem/assert.op_idx.pass.mm
+48-01 files

LLVM/project f12b167flang/lib/Lower/OpenMP OpenMP.cpp, flang/lib/Lower/Support ReductionProcessor.cpp

[flang][OpenMP] Fix ICE lowering user-defined operator declare reduction

A REDUCTION clause naming a user-defined operator (e.g.,
reduction(.myop.:x)) crashed in lowering: ReductionProcessor assumed the
DefinedOperator clause variant always held an intrinsic operator and called
std::get<IntrinsicOperator> unconditionally, which aborts for the
DefinedOpName alternative.

Handle DefinedOpName in the reduction clause processor, adding the
clause-side counterpart to the directive handling from #190288. For a
locally declared user-defined operator reduction, resolve the operator to
its reduction symbol and reference the omp.declare_reduction op materialized
for the declare reduction directive. The op name is now module-scoped via
AbstractConverter::mangleName, on the directive and clause sides in
lockstep, so reductions with the same operator spelling in different modules
no longer collide.

Cases that are not yet supported (reductions imported by USE association,
renamed or merged operators, and declarations with multiple types) now emit

    [10 lines not shown]
DeltaFile
+64-0flang/lib/Lower/Support/ReductionProcessor.cpp
+38-0flang/test/Lower/OpenMP/Todo/declare-reduction-operator-multiple-types.f90
+36-0flang/test/Lower/OpenMP/Todo/declare-reduction-operator-use-assoc.f90
+36-0flang/test/Lower/OpenMP/declare-reduction-operator-derived.f90
+31-0flang/test/Lower/OpenMP/declare-reduction-operator.f90
+19-1flang/lib/Lower/OpenMP/OpenMP.cpp
+224-11 files not shown
+234-17 files

LLVM/project c48e258.github/workflows prune-branches.yml

[Github] Reenable prune-unused-branches workflow

The Github API has recovered and the previous failure mode has been
rectified by ensuring that branches are ready for deletion for seven
days rather than 24 hours.

Reviewers: cmtice

Reviewed By: cmtice

Pull Request: https://github.com/llvm/llvm-project/pull/205439
DeltaFile
+2-0.github/workflows/prune-branches.yml
+2-01 files

LLVM/project b71216alldb/source/Host/macosx/objcxx HostInfoMacOSX.mm, llvm/lib/Target/Hexagon HexagonHVXSaveRemark.cpp

fix

Created using spr 1.3.7
DeltaFile
+228-0llvm/lib/Target/Hexagon/HexagonHVXSaveRemark.cpp
+148-40mlir/lib/Dialect/Tosa/IR/TosaOps.cpp
+87-90lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm
+141-0llvm/test/CodeGen/Hexagon/hvx-save-remarks.ll
+92-25llvm/lib/Transforms/Vectorize/SandboxVectorizer/Scheduler.cpp
+93-0llvm/unittests/Transforms/Vectorize/SandboxVectorizer/SchedulerTest.cpp
+789-15536 files not shown
+1,569-27642 files

LLVM/project c45f57blldb/source/Host/macosx/objcxx HostInfoMacOSX.mm, llvm/lib/Target/Hexagon HexagonHVXSaveRemark.cpp

[𝘀𝗽𝗿] changes introduced through rebase

Created using spr 1.3.7

[skip ci]
DeltaFile
+228-0llvm/lib/Target/Hexagon/HexagonHVXSaveRemark.cpp
+148-40mlir/lib/Dialect/Tosa/IR/TosaOps.cpp
+87-90lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm
+141-0llvm/test/CodeGen/Hexagon/hvx-save-remarks.ll
+92-25llvm/lib/Transforms/Vectorize/SandboxVectorizer/Scheduler.cpp
+93-0llvm/unittests/Transforms/Vectorize/SandboxVectorizer/SchedulerTest.cpp
+789-15536 files not shown
+1,569-27642 files

LLVM/project bdc00c2.github/workflows prune-unused-branches.py

[Github] Make prune-unused-branches only delete branches after 7 days

To hopefully prevent the last failure mode that led to the job being
disabled where the GitHub API failed to return results for >24 hours.

Reviewers: cmtice

Pull Request: https://github.com/llvm/llvm-project/pull/205438
DeltaFile
+9-2.github/workflows/prune-unused-branches.py
+9-21 files

LLVM/project e5a847aflang/lib/Semantics check-omp-structure.cpp

Change warnings to errors
DeltaFile
+3-3flang/lib/Semantics/check-omp-structure.cpp
+3-31 files

LLVM/project c997a13llvm/lib/Target/Hexagon HexagonHVXSaveRemark.cpp HexagonTargetMachine.cpp, llvm/test/CodeGen/Hexagon hvx-save-remarks.ll

[Hexagon] Add HVX caller-save remark pass for call-site diagnostics (#189188)

Add a new MachineFunctionPass (HexagonHVXSaveRemark) that emits
optimization analysis remarks when HVX vector registers must be saved
and restored around function calls. All HVX registers are caller-saved
(Section 5.3 of the Hexagon ABI), so any HVX value live across a call
requires a save/restore pair on the stack. Each HVX vector is 64 or 128
bytes, making this overhead expensive.

The pass exits when remarks are not requested
(-Rpass-analysis=hexagon-hvx-save) or when HVX is not enabled. A byte
threshold (default 1024, tunable via -hexagon-hvx-save-threshold)
filters out functions with only a small number of saves. The remarks
help programmers identify call sites where inlining, hoisting, or
sinking could reduce the save/restore cost.
DeltaFile
+228-0llvm/lib/Target/Hexagon/HexagonHVXSaveRemark.cpp
+141-0llvm/test/CodeGen/Hexagon/hvx-save-remarks.ll
+2-0llvm/lib/Target/Hexagon/HexagonTargetMachine.cpp
+2-0llvm/lib/Target/Hexagon/Hexagon.h
+1-0llvm/lib/Target/Hexagon/CMakeLists.txt
+374-05 files

LLVM/project 614b0b4lldb/source/Host/macosx/objcxx HostInfoMacOSX.mm

[lldb] Resolve dyld introspection SPIs with dlsym (NFC) (#205434)

HostInfoMacOSX's SharedCacheInfo used the dyld process-snapshot
introspection SPIs only when <mach-o/dyld_introspection.h> was present,
gating the calling code behind a compile-time macro.

To avoid bifurcating the behavior based on the SDK, rather than the
presence of the symbols, use dlsym to resolve them at runtime.

While here, fold the duplicate dlsym of dyld_image_segment_data_ into
the new, once-initialized, shared table.

Assisted-by: Claude
DeltaFile
+87-90lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm
+87-901 files

LLVM/project 8ab3f6flld/COFF ICF.cpp Writer.cpp, lld/test/COFF duplicate-pdata-entry-arm64.yaml duplicate-pdata-entry.s

[COFF] Make ICF compare .pdata xdata references

ICF must not fold functions solely because their .text is identical when their unwind or EH information differs. On AMD64 and ARM64, .pdata records describe code ranges and point at the unwind data used for unwinding and EH dispatch, so different reachable .xdata gives otherwise identical functions different semantics.

Record live .pdata records by the code section they describe and compare those records during ICF, following .pdata relocations to compare referenced .xdata sections directly. This keeps folding valid when the reachable unwind data is equivalent, while preventing folds for object files where old MSVC compilers did not associate .xdata with the parent .text COMDAT.

Drop the post-ICF duplicate .pdata removal workaround, update the existing test expectations, and add an ARM64 variant covering the two-field .pdata form.
DeltaFile
+216-9lld/COFF/ICF.cpp
+192-0lld/test/COFF/duplicate-pdata-entry-arm64.yaml
+0-103lld/COFF/Writer.cpp
+12-12lld/test/COFF/duplicate-pdata-entry.s
+0-4lld/COFF/Driver.cpp
+0-1lld/COFF/Writer.h
+420-1296 files

LLVM/project bab165ellvm/tools/dsymutil Options.td

[dsymutil] Fix help message after #200971 (#203337)

The default DWARF linker is parallel after #200971. Fix help message
which still suggests classic DWARF linker.
DeltaFile
+1-1llvm/tools/dsymutil/Options.td
+1-11 files

LLVM/project 43b63b6llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer Scheduler.h VecUtils.h, llvm/lib/Transforms/Vectorize/SandboxVectorizer Scheduler.cpp DependencyGraph.cpp

[SandboxVec][Scheduler] Implement direction (#205193)

DGNode::UnscheduledPreds was added in a previous patch, so this patch
makes use of it in the scheduler. Depending on Dir we can now schedule
BottomUp or TopDown.
DeltaFile
+92-25llvm/lib/Transforms/Vectorize/SandboxVectorizer/Scheduler.cpp
+93-0llvm/unittests/Transforms/Vectorize/SandboxVectorizer/SchedulerTest.cpp
+22-2llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/Scheduler.h
+14-0llvm/unittests/Transforms/Vectorize/SandboxVectorizer/VecUtilsTest.cpp
+10-0llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/VecUtils.h
+3-2llvm/lib/Transforms/Vectorize/SandboxVectorizer/DependencyGraph.cpp
+234-296 files

LLVM/project c179b4eflang/lib/Lower Bridge.cpp, flang/test/Lower/CUDA cuda-data-transfer.cuf

[flang][cuda] Materialize trivial computation to avoid data transfer error (#205422)

Avoid this error: `error: 'cuf.data_transfer' op expect src and dst to
be references or descriptors or src to be a constant: 'f32' -
'!fir.ref<f32>'`
DeltaFile
+36-1flang/test/Lower/CUDA/cuda-data-transfer.cuf
+7-2flang/lib/Lower/Bridge.cpp
+43-32 files

LLVM/project 592c973llvm/test/CodeGen/AMDGPU amdgcn.bitcast.1024bit.ll, llvm/test/CodeGen/RISCV clmul.ll

Rebase

Created using spr 1.3.7
DeltaFile
+25,784-36,416llvm/test/CodeGen/RISCV/rvv/clmulh-sdnode.ll
+12,227-23,140llvm/test/CodeGen/RISCV/rvv/clmul-sdnode.ll
+12,991-3,310llvm/test/MC/AMDGPU/gfx13_asm_vop3_dpp16.s
+11,856-3,719llvm/test/MC/AMDGPU/gfx12_asm_vop3_dpp16.s
+4,004-11,142llvm/test/CodeGen/RISCV/clmul.ll
+6,940-6,782llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.1024bit.ll
+73,802-84,5096,149 files not shown
+412,102-283,4376,155 files

LLVM/project caa3926flang/lib/Semantics expression.cpp tools.cpp, flang/test/Semantics enumeration-type-declarations.f90

Modified ExpressionAnalyzer::Analyze derived type check to use ultimate symbol, added a guard in IsEnumerationType to use ultimate, and added test cases for USE-associated enumeration types.
DeltaFile
+37-0flang/test/Semantics/enumeration-type-declarations.f90
+5-3flang/lib/Semantics/expression.cpp
+3-1flang/lib/Semantics/tools.cpp
+45-43 files