LLVM/project ec8945a — llvm/utils/gn/secondary/libcxx/include BUILD.gn

[gn build] Port f24773d94e88 (#246926)
DeltaFile
+2-0llvm/utils/gn/secondary/libcxx/include/BUILD.gn
+2-01 files

LLVM/project 6bfb0e6 — llvm/utils/gn/secondary/libcxx/include BUILD.gn

[gn build] Port 137344a1574a (#246925)
DeltaFile
+2-1llvm/utils/gn/secondary/libcxx/include/BUILD.gn
+2-11 files

LLVM/project e692084 — llvm/utils/gn/secondary/clang/lib/Headers BUILD.gn

[gn build] Port 088b8d8146fa (#246924)
DeltaFile
+2-0llvm/utils/gn/secondary/clang/lib/Headers/BUILD.gn
+2-01 files

LLVM/project 01a244e — llvm/docs NVPTXUsage.md, llvm/include/llvm/IR NVVMIntrinsicUtils.h

[NVPTX] Add support for comparison and set intrinsics (#246077)

This patch adds support for instruction types `.u8x4`, `.s8x4`, 
`.u16x2`, `.s16x2` for set instruction introduced in PTX 9.4:

- `llvm.nvvm.compare.and.set.{v4i8, v2i16}`

PTX ISA Reference:
https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#comparison-and-selection-instructions-set

---------

Signed-off-by: DharuniRAcharya <dharunira at nvidia.com>
DeltaFile
+419-0llvm/test/CodeGen/NVPTX/compare-and-set.ll
+48-0llvm/include/llvm/IR/NVVMIntrinsicUtils.h
+47-0llvm/docs/NVPTXUsage.md
+31-0llvm/test/Verifier/NVPTX/compare-and-set.ll
+18-0llvm/lib/Target/NVPTX/NVPTXIntrinsics.td
+16-0llvm/lib/IR/VerifierNVVM.cpp
+579-05 files not shown
+615-011 files

LLVM/project 31c7b14 — mlir/include/mlir/Analysis/Presburger IntegerRelation.h, mlir/lib/Analysis/Presburger Matrix.cpp IntegerRelation.cpp

[mlir][Presburger] Add IntegerRelation::gist (context-based simplification)

Add IntegerRelation::gist(context), a port of ISL's isl_basic_map_gist
(uset_gist / uset_gist_full), along with the supporting row-reduction
helpers IntMatrix::rowReduce and IntegerRelation::reduceUsingEqualities.

Supporting helpers:
- IntMatrix::rowReduce: performs Gauss-Jordan row reduction in place
  along a caller-specified column order, swapping pivot rows to the top,
  normalizing modified rows by GCD, and returning the pivot columns
  (with unit tests in MatrixTest.cpp).
- IntegerRelation::eliminateVarUsingEquality(ArrayRef, col): eliminates
  a variable from every constraint using an external equality row.
- IntegerRelation::reduceUsingEqualities: orchestrates IntMatrix::rowReduce
  to project context equalities onto involved variables, detect
  inconsistent equalities, and rewrite all constraints of a relation
  using the remaining equalities (port of ISL's
  isl_basic_set_reduce_using_equalities with project_onto_involved).


    [58 lines not shown]
DeltaFile
+489-0mlir/unittests/Analysis/Presburger/IntegerPolyhedronTest.cpp
+331-0mlir/lib/Analysis/Presburger/IntegerRelation.cpp
+75-5mlir/include/mlir/Analysis/Presburger/IntegerRelation.h
+50-0mlir/unittests/Analysis/Presburger/MatrixTest.cpp
+41-0mlir/unittests/Analysis/Presburger/IntegerRelationTest.cpp
+36-0mlir/lib/Analysis/Presburger/Matrix.cpp
+1,022-52 files not shown
+1,069-58 files

LLVM/project 8b19c47 — mlir/include/mlir/Analysis/Presburger IntegerRelation.h Matrix.h, mlir/lib/Analysis/Presburger Matrix.cpp IntegerRelation.cpp

[mlir][Presburger] NFC: extract eliminateColumnUsingRow and eliminateVarUsingEquality

Extract IntMatrix::eliminateColumnUsingRow (eliminating a column from a
row using a pivot row with the smallest positive multiplier on the row)
and IntegerRelation::eliminateVarUsingEquality (applying it to every
other equality and every inequality of the relation).

Replace the file-local eliminateFromConstraint helper with these
primitives in gaussianEliminateVars, gaussianEliminate, and
removeRedundantLocalVars, and add a unit test for
IntMatrix::eliminateColumnUsingRow.
DeltaFile
+27-63mlir/lib/Analysis/Presburger/IntegerRelation.cpp
+22-0mlir/unittests/Analysis/Presburger/MatrixTest.cpp
+20-0mlir/lib/Analysis/Presburger/Matrix.cpp
+11-0mlir/include/mlir/Analysis/Presburger/Matrix.h
+7-0mlir/include/mlir/Analysis/Presburger/IntegerRelation.h
+87-635 files

LLVM/project 9f78e66 — clang/lib/Basic/Targets AMDGPU.h AMDGPU.cpp

[Clang][AMDGPU] Remove redundant isAMDGCN checks. NFC

After the r600 target removal, AMDGPUTargetInfo is only created for
the amdgcn triple, so every `isAMDGCN()` check in it is always true.
Drop those checks and the helpers that only wrapped them.

```
if (hasFMAF())
  Builder.defineMacro("__HAS_FMAF__");
  -->
Builder.defineMacro("__HAS_FMAF__");
```

RFC: https://discourse.llvm.org/t/rfc-amdgpu-deprecating-and-removing-llvm-s-r600-terascale-backend/92840
DeltaFile
+15-22clang/lib/Basic/Targets/AMDGPU.cpp
+5-25clang/lib/Basic/Targets/AMDGPU.h
+20-472 files

LLVM/project 4eaa092 — clang/docs UsersManual.md, clang/include/clang/Basic BuiltinsAMDGPUDocs.td BuiltinsAMDGPU.td

[Clang][AMDGPU] Remove R600 target support

Remove the r600 triple from the clang frontend, driver and CodeGen,
together with the `__R600__` macro and the `__builtin_r600_*` builtins.
AMDGPUTargetInfo now only handles amdgcn, so the R600 branches are gone.

```
$ clang --target=r600 -S test.cl
error: unknown target triple 'r600'
```

RFC: https://discourse.llvm.org/t/rfc-amdgpu-deprecating-and-removing-llvm-s-r600-terascale-backend/92840
DeltaFile
+41-68clang/lib/Basic/Targets/AMDGPU.h
+6-17clang/lib/Basic/Targets/AMDGPU.cpp
+0-17clang/include/clang/Basic/BuiltinsAMDGPU.td
+0-6clang/lib/CodeGen/TargetBuiltins/AMDGPU.cpp
+0-6clang/docs/UsersManual.md
+3-3clang/include/clang/Basic/BuiltinsAMDGPUDocs.td
+50-11710 files not shown
+54-13016 files

LLVM/project 0727409 — clang/lib/CIR/CodeGen CIRGenBuiltin.cpp CIRGenBuiltinAMDGPU.cpp

[CIR][AMDGPU] Remove R600 builtin handling. NFC (#246816)

Remove the r600 triple case and the `__builtin_r600_recipsqrt_ieee*`
cases. CIR never implemented them, and they now fall through to the
`default` NYI path.

RFC: https://discourse.llvm.org/t/rfc-amdgpu-deprecating-and-removing-llvm-s-r600-terascale-backend/92840
DeltaFile
+0-7clang/lib/CIR/CodeGen/CIRGenBuiltinAMDGPU.cpp
+0-1clang/lib/CIR/CodeGen/CIRGenBuiltin.cpp
+0-82 files

LLVM/project 1de6d35 — bolt/include/bolt/Passes BinaryPasses.h, bolt/lib/Passes FrameOptimizer.cpp ShrinkWrapping.cpp

[BOLT] Use LLVM statistics for pass counters (NFC) (#246445)
DeltaFile
+71-35bolt/lib/Passes/BinaryPasses.cpp
+21-11bolt/lib/Passes/IdenticalCodeFolding.cpp
+16-8bolt/lib/Passes/ShrinkWrapping.cpp
+18-1bolt/lib/Passes/FrameOptimizer.cpp
+16-0bolt/test/X86/stats.test
+0-11bolt/include/bolt/Passes/BinaryPasses.h
+142-667 files not shown
+161-9113 files

LLVM/project b3aee63 — clang-tools-extra/clang-tidy/misc ExplicitConstructorCheck.cpp, clang-tools-extra/docs ReleaseNotes.md

[clang-tidy] Respect explicit(false) on conversion operators (#240521)

Commit eb3b063995d6 (#82689) taught `ExplicitConstructorCheck`
(`misc-explicit-constructor`, aliased as `google-explicit-constructor`
and `cppcoreguidelines-explicit-constructor`) to ignore C++20
`explicit(false)` and instantiation-dependent `explicit(...)`
expressions on constructors, and to diagnose non-literal `false`
expressions without emitting an invalid `explicit` fix-it.

However, the `CXXConversionDecl` branch still unconditionally warned on
any conversion operator where `isExplicit()` was false and suggested
inserting `explicit `, even when `explicit(false)` or a dependent
`explicit(...)` specifier was already written. Apply the same
`ExplicitSpecifier` inspection to conversion operators so deliberately
implicit C++20 `explicit(false)` and dependent `explicit(...)`
conversion operators are not diagnosed.

Assisted-by: Gemini
DeltaFile
+51-1clang-tools-extra/test/clang-tidy/checkers/misc/explicit-constructor-cxx20.cpp
+16-2clang-tools-extra/clang-tidy/misc/ExplicitConstructorCheck.cpp
+5-0clang-tools-extra/docs/ReleaseNotes.md
+1-0clang-tools-extra/docs/clang-tidy/checks/misc/explicit-constructor.rst
+73-34 files

LLVM/project d7e2583 — clang/include/clang/ScalableStaticAnalysis/Analyses/PointerFlow PointerFlowPairs.h

Replace deprecated PointerUnion::dyn_cast with dyn_cast_if_present
DeltaFile
+2-2clang/include/clang/ScalableStaticAnalysis/Analyses/PointerFlow/PointerFlowPairs.h
+2-21 files

LLVM/project c064c26 — llvm/lib/Transforms/IPO AttributorAttributes.cpp, llvm/test/Transforms/Attributor value-simplify-duplicate-scope.ll

[Attributor] Merge the scopes of potential values with a `|=`

`recurseForValue` merges the scopes of a value with `+=`. If a value appears
more than once in the values of one scope, the sum is not a valid scope.

This PR was assisted by AI but I reviewed all the changes.
DeltaFile
+38-0llvm/test/Transforms/Attributor/value-simplify-duplicate-scope.ll
+2-1llvm/lib/Transforms/IPO/AttributorAttributes.cpp
+40-12 files

LLVM/project fcdd266 — clang/test/Analysis lifetime-end-path-notes.cpp

Update the RUN line.
DeltaFile
+1-5clang/test/Analysis/lifetime-end-path-notes.cpp
+1-51 files

LLVM/project 5630e1a — llvm/lib/CodeGen RegAllocFast.cpp, llvm/test/CodeGen/X86 regallocfast-tied.mir

[RegAllocFast] Keep inline asm uses off a tied physical def's register (#246907)

```
%1:gr32 = MOV32ri 0
INLINEASM ..., def %2, implicit-def $ecx, %0(tied-def 3), %0(tied-def 5), %1
$edx = COPY %0
```

%0 is used after the asm, so both tied uses are copies of it. %1 is
assigned $ecx, and the copy into $ecx overwrites it:

```
renamable $ecx = MOV32ri 0
$eax = COPY $edx
$ecx = COPY $edx
INLINEASM ..., killed renamable $ecx
```

lowerTiedUse frees the tied def's register after inserting the copy. A

    [4 lines not shown]
DeltaFile
+7-5llvm/test/CodeGen/X86/regallocfast-tied.mir
+4-2llvm/lib/CodeGen/RegAllocFast.cpp
+11-72 files

LLVM/project 42dfc4e — llvm/lib/Target/Sparc/AsmParser SparcAsmParser.cpp, llvm/test/MC/Sparc sparc-mem-asi-instructions.s sparc-asm-errors.s

[Sparc][MC] Don't report "unexpected token" after an operand error (#245208)

When an operand failed to parse, parseInstruction always reported
"unexpected token", even when the operand parser had already reported a
more specific error. So most operand errors were followed by a second,
less useful one, e.g.:

```
error: invalid register name
error: unexpected token
```

Make the operand parsers follow the ParseStatus convention, where
Failure means an error was reported and NoMatch means nothing was
consumed and no error was reported, and only report "unexpected token"
for NoMatch:

- parseSparcAsmOperand returns NoMatch for tokens it does not handle,
  and Failure only after an error.

    [19 lines not shown]
DeltaFile
+76-44llvm/lib/Target/Sparc/AsmParser/SparcAsmParser.cpp
+44-11llvm/test/MC/Sparc/sparc-asm-errors.s
+1-2llvm/test/MC/Sparc/Relocations/data-directive-specifier.s
+1-1llvm/test/MC/Sparc/sparc-mem-asi-instructions.s
+122-584 files

LLVM/project f77efa3 — clang/test/Analysis lifetime-end-order.cpp

Add helper to the foor loop test case.
DeltaFile
+3-0clang/test/Analysis/lifetime-end-order.cpp
+3-01 files

LLVM/project d141802 — clang/test/Analysis lifetime-end-order.cpp

Add a simple test case.
DeltaFile
+12-0clang/test/Analysis/lifetime-end-order.cpp
+12-01 files

LLVM/project 6011249 — clang/test/Analysis lifetime-end-order.cpp

Exercise the lifetime end of variables in the inner scope.
DeltaFile
+5-0clang/test/Analysis/lifetime-end-order.cpp
+5-01 files

LLVM/project 845ec2f — clang/test/Analysis nonreturn-destructors-cfg-output.cpp lifetime-end-simple-cfg-output.cpp

Remove cfg-lifetime from RUN lines in test files.
DeltaFile
+4-0clang/test/Analysis/lifetime-end-path-notes.cpp
+1-1clang/test/Analysis/nonreturn-destructors-cfg-output.cpp
+1-1clang/test/Analysis/lifetime-end-simple-cfg-output.cpp
+1-1clang/test/Analysis/lifetime-cfg-output.cpp
+1-1clang/test/Analysis/lifetime-bound.cpp
+1-1clang/test/Analysis/exprwithcleanups-lifetime-marker-cfg.cpp
+9-52 files not shown
+10-78 files

LLVM/project e6399e8 — clang/docs/analyzer checkers.md

remove the cfg-lifetime prerequisite note from the documentation.
DeltaFile
+0-4clang/docs/analyzer/checkers.md
+0-41 files

LLVM/project dca65b1 — clang/test/Analysis cxx20-range-for-cfg.cpp auto-obj-dtors-cfg-output.cpp

Update the CFG output in the test files.
DeltaFile
+3-3clang/test/Analysis/scopes-cfg-output.cpp
+4-1clang/test/Analysis/cfg-range-for-init-order.cpp
+2-2clang/test/Analysis/cxx20-range-for-cfg.cpp
+2-2clang/test/Analysis/auto-obj-dtors-cfg-output.cpp
+11-84 files

LLVM/project 6c4287a — clang/test/Analysis lifetime-end-order.cpp

Update the test file.
DeltaFile
+39-33clang/test/Analysis/lifetime-end-order.cpp
+39-331 files

LLVM/project 0868aeb — clang/test/Analysis end-function-return-stmt.cpp lifetime-end-order.cpp

[analyzer] Turn on CFGLifetimeEnds elements by default
DeltaFile
+68-0clang/test/Analysis/lifetime-end-order.cpp
+2-1clang/test/Analysis/end-function-return-stmt.cpp
+70-12 files

LLVM/project 4c8dd77 — clang/test/Analysis temp-obj-dtors-cfg-output.cpp cfg-rich-constructors.cpp, clang/test/Analysis/Inputs/expected-plists retain-release.m.objcpp.plist retain-release.m.objc.plist

[analyzer] Enable CFG::LifetimeEnd elements by default
DeltaFile
+310-185clang/test/Analysis/scopes-cfg-output.cpp
+306-185clang/test/Analysis/auto-obj-dtors-cfg-output.cpp
+206-106clang/test/Analysis/cfg-rich-constructors.cpp
+142-89clang/test/Analysis/temp-obj-dtors-cfg-output.cpp
+36-11clang/test/Analysis/Inputs/expected-plists/retain-release.m.objcpp.plist
+36-11clang/test/Analysis/Inputs/expected-plists/retain-release.m.objc.plist
+1,036-58719 files not shown
+1,156-63225 files

LLVM/project 3649f70 — llvm/lib/Transforms/Instrumentation MemorySanitizer.cpp, llvm/test/Instrumentation/MemorySanitizer masked-store-load.ll

[msan][test] Show masked_store with zero mask incorrectly sets origin (#246161)

handleMaskedStore() unconditionally sets the origin, even in cases where
the mask ends up being zero (as evaluated at compile-time or runtime)
i.e., no bytes were stored. This PR adds a regression test case and a
TODO in the MSan instrumentation pass.

---------

Co-authored-by: Vitaly Buka <vitalybuka at google.com>
DeltaFile
+67-0llvm/test/Instrumentation/MemorySanitizer/masked-store-load.ll
+3-0llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp
+70-02 files

LLVM/project f5492c2 — compiler-rt/test/asan/TestCases/Linux dlopen-mixed-c-cxx.c

[ASan][test] Use %run in dlopen-mixed-c-cxx.c (#246215)

The test ran its binary directly, so it failed on targets that need an
emulator or a remote device.

Assisted-by: Claude Code
DeltaFile
+1-1compiler-rt/test/asan/TestCases/Linux/dlopen-mixed-c-cxx.c
+1-11 files

LLVM/project 14f5342 — clang/test/Analysis lifetime-end-path-notes.cpp

Update the test file.
DeltaFile
+6-6clang/test/Analysis/lifetime-end-path-notes.cpp
+6-61 files

LLVM/project d2ca9de — clang/lib/ScalableStaticAnalysis/Analyses/PointerFlow PointerFlowPairs.cpp

fix clang-format
DeltaFile
+4-2clang/lib/ScalableStaticAnalysis/Analyses/PointerFlow/PointerFlowPairs.cpp
+4-21 files

LLVM/project f0a6223 — libc/test/src/math/exhaustive cos.wc sin.wc, llvm/test/CodeGen/AMDGPU amdgcn.bitcast.960bit.ll frem.ll

Merge remote-tracking branch 'origin/main' into users/ziqingluo/PR-187125348-1
DeltaFile
+1,091,085-0libc/test/src/math/exhaustive/sin.wc
+1,090,178-0libc/test/src/math/exhaustive/cos.wc
+118,393-140,328llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.1024bit.ll
+39,195-46,216llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.512bit.ll
+32,671-17,355llvm/test/CodeGen/AMDGPU/frem.ll
+21,244-27,281llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.960bit.ll
+2,392,766-231,18046,930 files not shown
+6,686,330-1,986,61246,936 files