LLVM/project 9179fa0llvm/lib/Analysis ConstantFolding.cpp, llvm/lib/IR Constants.cpp ConstantFold.cpp

[RFC][NFCI][Constants] Add `Constant::isZeroValue`

The old `isZeroValue` was removed because it was functionally identical to
`Constant::isNullValue`. Currently, a "null value" in LLVM means a zero value.
We are moving toward changing the semantics of `ConstantPointerNull` to
represent a semantic null pointer instead of a zero-valued pointer. As a result,
the meaning of "null value" will also change in the future.

This PR series is the first step toward renaming the two widely used "null
value" interfaces to "zero value". As the first PR in the series, this change
adds a "new" `isZeroValue` alongside `isNullValue`, and makes `isNullValue` call
`isZeroValue` directly. Then, all uses of `isNullValue` in LLVM are replaced
with `isZeroValue`. Uses in other projects will be updated in separate PRs.

The plan is to eventually remove `isNullValue` after all uses have been
migrated.
DeltaFile
+15-15llvm/lib/Analysis/ConstantFolding.cpp
+14-14llvm/lib/IR/Constants.cpp
+11-11llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
+11-9llvm/lib/IR/ConstantFold.cpp
+9-9llvm/unittests/Analysis/ValueLatticeTest.cpp
+9-9llvm/lib/Transforms/Utils/SimplifyCFG.cpp
+69-67100 files not shown
+278-265106 files

LLVM/project fcbbc1f. pyproject.toml, mlir/lib/Dialect/XeGPU/IR XeGPUOps.cpp

format

Created using spr 1.3.7
DeltaFile
+290-0mlir/lib/Dialect/XeGPU/Transforms/XeGPUArrayLengthOptimization.cpp
+167-0mlir/test/Dialect/XeGPU/array-len-op-unit.mlir
+31-0mlir/test/lib/Dialect/XeGPU/TestXeGPUTransforms.cpp
+22-0pyproject.toml
+12-3mlir/lib/Dialect/XeGPU/IR/XeGPUOps.cpp
+7-7mlir/test/Dialect/XeGPU/subgroup-distribute-unit.mlir
+529-1013 files not shown
+578-3519 files

LLVM/project 77b6273. pyproject.toml, mlir/lib/Dialect/XeGPU/IR XeGPUOps.cpp

[𝘀𝗽𝗿] changes introduced through rebase

Created using spr 1.3.7

[skip ci]
DeltaFile
+290-0mlir/lib/Dialect/XeGPU/Transforms/XeGPUArrayLengthOptimization.cpp
+167-0mlir/test/Dialect/XeGPU/array-len-op-unit.mlir
+31-0mlir/test/lib/Dialect/XeGPU/TestXeGPUTransforms.cpp
+22-0pyproject.toml
+12-3mlir/lib/Dialect/XeGPU/IR/XeGPUOps.cpp
+7-7mlir/test/Dialect/XeGPU/ops.mlir
+529-1010 files not shown
+565-2416 files

LLVM/project d3fe213. pyproject.toml, mlir/lib/Dialect/XeGPU/IR XeGPUOps.cpp

format

Created using spr 1.3.7
DeltaFile
+290-0mlir/lib/Dialect/XeGPU/Transforms/XeGPUArrayLengthOptimization.cpp
+167-0mlir/test/Dialect/XeGPU/array-len-op-unit.mlir
+31-0mlir/test/lib/Dialect/XeGPU/TestXeGPUTransforms.cpp
+22-0pyproject.toml
+12-3mlir/lib/Dialect/XeGPU/IR/XeGPUOps.cpp
+7-7mlir/test/Dialect/XeGPU/subgroup-distribute-unit.mlir
+529-1010 files not shown
+565-2416 files

LLVM/project ca201db. pyproject.toml, mlir/lib/Dialect/XeGPU/IR XeGPUOps.cpp

[𝘀𝗽𝗿] changes introduced through rebase

Created using spr 1.3.7

[skip ci]
DeltaFile
+290-0mlir/lib/Dialect/XeGPU/Transforms/XeGPUArrayLengthOptimization.cpp
+167-0mlir/test/Dialect/XeGPU/array-len-op-unit.mlir
+31-0mlir/test/lib/Dialect/XeGPU/TestXeGPUTransforms.cpp
+22-0pyproject.toml
+12-3mlir/lib/Dialect/XeGPU/IR/XeGPUOps.cpp
+7-7mlir/test/Dialect/XeGPU/subgroup-distribute-unit.mlir
+529-109 files not shown
+563-2315 files

LLVM/project 6adda8c. pyproject.toml, mlir/lib/Dialect/XeGPU/IR XeGPUOps.cpp

format

Created using spr 1.3.7
DeltaFile
+290-0mlir/lib/Dialect/XeGPU/Transforms/XeGPUArrayLengthOptimization.cpp
+167-0mlir/test/Dialect/XeGPU/array-len-op-unit.mlir
+31-0mlir/test/lib/Dialect/XeGPU/TestXeGPUTransforms.cpp
+22-0pyproject.toml
+12-3mlir/lib/Dialect/XeGPU/IR/XeGPUOps.cpp
+7-7mlir/test/Dialect/XeGPU/ops.mlir
+529-109 files not shown
+563-2315 files

LLVM/project 7a56f05. pyproject.toml, mlir/lib/Dialect/XeGPU/IR XeGPUOps.cpp

[𝘀𝗽𝗿] changes introduced through rebase

Created using spr 1.3.7

[skip ci]
DeltaFile
+290-0mlir/lib/Dialect/XeGPU/Transforms/XeGPUArrayLengthOptimization.cpp
+167-0mlir/test/Dialect/XeGPU/array-len-op-unit.mlir
+31-0mlir/test/lib/Dialect/XeGPU/TestXeGPUTransforms.cpp
+22-0pyproject.toml
+12-3mlir/lib/Dialect/XeGPU/IR/XeGPUOps.cpp
+7-7mlir/test/Dialect/XeGPU/ops.mlir
+529-107 files not shown
+561-2113 files

LLVM/project 81ac467. pyproject.toml, mlir/lib/Dialect/XeGPU/IR XeGPUOps.cpp

format

Created using spr 1.3.7
DeltaFile
+290-0mlir/lib/Dialect/XeGPU/Transforms/XeGPUArrayLengthOptimization.cpp
+167-0mlir/test/Dialect/XeGPU/array-len-op-unit.mlir
+31-0mlir/test/lib/Dialect/XeGPU/TestXeGPUTransforms.cpp
+22-0pyproject.toml
+12-3mlir/lib/Dialect/XeGPU/IR/XeGPUOps.cpp
+7-7mlir/test/Dialect/XeGPU/subgroup-distribute-unit.mlir
+529-107 files not shown
+561-2113 files

LLVM/project 74f547a. pyproject.toml, mlir/lib/Dialect/XeGPU/IR XeGPUOps.cpp

[𝘀𝗽𝗿] changes introduced through rebase

Created using spr 1.3.7

[skip ci]
DeltaFile
+290-0mlir/lib/Dialect/XeGPU/Transforms/XeGPUArrayLengthOptimization.cpp
+167-0mlir/test/Dialect/XeGPU/array-len-op-unit.mlir
+31-0mlir/test/lib/Dialect/XeGPU/TestXeGPUTransforms.cpp
+22-0pyproject.toml
+12-3mlir/lib/Dialect/XeGPU/IR/XeGPUOps.cpp
+7-7mlir/test/Dialect/XeGPU/ops.mlir
+529-107 files not shown
+561-2113 files

LLVM/project ae6ae9f. pyproject.toml, mlir/lib/Dialect/XeGPU/IR XeGPUOps.cpp

format

Created using spr 1.3.7
DeltaFile
+290-0mlir/lib/Dialect/XeGPU/Transforms/XeGPUArrayLengthOptimization.cpp
+167-0mlir/test/Dialect/XeGPU/array-len-op-unit.mlir
+31-0mlir/test/lib/Dialect/XeGPU/TestXeGPUTransforms.cpp
+22-0pyproject.toml
+12-3mlir/lib/Dialect/XeGPU/IR/XeGPUOps.cpp
+7-7mlir/test/Dialect/XeGPU/ops.mlir
+529-107 files not shown
+561-2113 files

LLVM/project 8d783be. pyproject.toml, compiler-rt/test/asan/TestCases contiguous_container_crash.cpp

[𝘀𝗽𝗿] changes introduced through rebase

Created using spr 1.3.7

[skip ci]
DeltaFile
+290-0mlir/lib/Dialect/XeGPU/Transforms/XeGPUArrayLengthOptimization.cpp
+167-0mlir/test/Dialect/XeGPU/array-len-op-unit.mlir
+31-0mlir/test/lib/Dialect/XeGPU/TestXeGPUTransforms.cpp
+22-0pyproject.toml
+8-8compiler-rt/test/asan/TestCases/contiguous_container_crash.cpp
+12-3mlir/lib/Dialect/XeGPU/IR/XeGPUOps.cpp
+530-118 files not shown
+569-2914 files

LLVM/project 3f0a74b. pyproject.toml, compiler-rt/test/asan/TestCases contiguous_container_crash.cpp

format

Created using spr 1.3.7
DeltaFile
+290-0mlir/lib/Dialect/XeGPU/Transforms/XeGPUArrayLengthOptimization.cpp
+167-0mlir/test/Dialect/XeGPU/array-len-op-unit.mlir
+31-0mlir/test/lib/Dialect/XeGPU/TestXeGPUTransforms.cpp
+22-0pyproject.toml
+8-8compiler-rt/test/asan/TestCases/contiguous_container_crash.cpp
+12-3mlir/lib/Dialect/XeGPU/IR/XeGPUOps.cpp
+530-118 files not shown
+569-2914 files

LLVM/project 490349b. pyproject.toml, mlir/lib/Dialect/XeGPU/IR XeGPUOps.cpp

[𝘀𝗽𝗿] changes introduced through rebase

Created using spr 1.3.7

[skip ci]
DeltaFile
+290-0mlir/lib/Dialect/XeGPU/Transforms/XeGPUArrayLengthOptimization.cpp
+167-0mlir/test/Dialect/XeGPU/array-len-op-unit.mlir
+31-0mlir/test/lib/Dialect/XeGPU/TestXeGPUTransforms.cpp
+22-0pyproject.toml
+12-3mlir/lib/Dialect/XeGPU/IR/XeGPUOps.cpp
+7-7mlir/test/Dialect/XeGPU/subgroup-distribute-unit.mlir
+529-107 files not shown
+561-2113 files

LLVM/project 51989af. pyproject.toml, mlir/lib/Dialect/XeGPU/IR XeGPUOps.cpp

format

Created using spr 1.3.7
DeltaFile
+290-0mlir/lib/Dialect/XeGPU/Transforms/XeGPUArrayLengthOptimization.cpp
+167-0mlir/test/Dialect/XeGPU/array-len-op-unit.mlir
+31-0mlir/test/lib/Dialect/XeGPU/TestXeGPUTransforms.cpp
+22-0pyproject.toml
+12-3mlir/lib/Dialect/XeGPU/IR/XeGPUOps.cpp
+7-7mlir/test/Dialect/XeGPU/subgroup-distribute-unit.mlir
+529-107 files not shown
+561-2113 files

LLVM/project 46a2a07. pyproject.toml, mlir/lib/Dialect/XeGPU/IR XeGPUOps.cpp

[𝘀𝗽𝗿] changes introduced through rebase

Created using spr 1.3.7

[skip ci]
DeltaFile
+290-0mlir/lib/Dialect/XeGPU/Transforms/XeGPUArrayLengthOptimization.cpp
+167-0mlir/test/Dialect/XeGPU/array-len-op-unit.mlir
+31-0mlir/test/lib/Dialect/XeGPU/TestXeGPUTransforms.cpp
+22-0pyproject.toml
+12-3mlir/lib/Dialect/XeGPU/IR/XeGPUOps.cpp
+7-7mlir/test/Dialect/XeGPU/subgroup-distribute-unit.mlir
+529-107 files not shown
+561-2113 files

LLVM/project f51c80a. pyproject.toml, mlir/lib/Dialect/XeGPU/IR XeGPUOps.cpp

format

Created using spr 1.3.7
DeltaFile
+290-0mlir/lib/Dialect/XeGPU/Transforms/XeGPUArrayLengthOptimization.cpp
+167-0mlir/test/Dialect/XeGPU/array-len-op-unit.mlir
+31-0mlir/test/lib/Dialect/XeGPU/TestXeGPUTransforms.cpp
+22-0pyproject.toml
+12-3mlir/lib/Dialect/XeGPU/IR/XeGPUOps.cpp
+7-7mlir/test/Dialect/XeGPU/ops.mlir
+529-107 files not shown
+561-2113 files

LLVM/project 51d52c2lldb/source/Plugins/ExpressionParser/Clang IRForTarget.cpp IRForTarget.h

[lldb] IRForTarget::UnfoldConstant should return an llvm::Error (#195322)

UnfoldConstant returns a boolean and logs errors to a stream. However,
the prevailing pattern is to return an Error object and let the caller
decide what to do with it.

Currently, these error messages are dumped out to stdout when LLDB
encoutners an issue. I decided not to change that behavior with this
commit to keep it simple and self-contained.

I also reformatted and simplified some code in UnfoldConstant where it
was relatively easy.
DeltaFile
+47-48lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp
+5-8lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.h
+52-562 files

LLVM/project 9376d9bclang/docs LanguageExtensions.rst

[docs] Document the usage of operators on RVV sized types (#194979)

We have existing support in clang for operator overloading on RVV
builtin types when those types are sized. This can be achieved through a
combination of the -mrvv-vector-bits=N command line (to communicate
exact VLEN to the compiler) and the riscv_rvv_vector_bits attribute on
the types themselves. We have fairly complete test coverage for this in
clang/test/CodeGen/RISCV/rvv-vls-*.ll.

Our documentation did not reflect this reality, so this patch updates
the documentation to match the actual support.

Patch written by Claude, with minor sanity checking by me.
DeltaFile
+33-24clang/docs/LanguageExtensions.rst
+33-241 files

LLVM/project 956d713llvm/include/llvm/Testing/Demangle DemangleTestCases.inc, llvm/lib/Analysis ConstantFolding.cpp

[RFC][NFCI][Constants] Add `Constant::isZeroValue`

The old `isZeroValue` was removed because it was functionally identical to
`Constant::isNullValue`. Currently, a "null value" in LLVM means a zero value.
We are moving toward changing the semantics of `ConstantPointerNull` to
represent a semantic null pointer instead of a zero-valued pointer. As a result,
the meaning of "null value" will also change in the future.

This PR series is the first step toward renaming the two widely used "null
value" interfaces to "zero value". As the first PR in the series, this change
adds a "new" `isZeroValue` alongside `isNullValue`, and makes `isNullValue` call
`isZeroValue` directly. Then, all uses of `isNullValue` in LLVM are replaced
with `isZeroValue`. Uses in other projects will be updated in separate PRs.

The plan is to eventually remove `isNullValue` after all uses have been
migrated.
DeltaFile
+15-15llvm/lib/Analysis/ConstantFolding.cpp
+14-14llvm/lib/IR/Constants.cpp
+11-11llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
+11-11llvm/include/llvm/Testing/Demangle/DemangleTestCases.inc
+11-9llvm/lib/IR/ConstantFold.cpp
+9-9llvm/lib/Transforms/Utils/SimplifyCFG.cpp
+71-69101 files not shown
+284-277107 files

LLVM/project c8b54a4clang/lib/CodeGen CGValue.h

[Codegen] Initialize RValue IsVolatile field in constructor (#195556)

Static analysis flagged that in some cases IsVolatile is left
uninitialzed. I adjusted the constructor to initialize IsVolatile.
DeltaFile
+1-1clang/lib/CodeGen/CGValue.h
+1-11 files

LLVM/project c3761b6clang/lib/AST TextNodeDumper.cpp, clang/test/AST ast-dump-linkage.cpp ast-dump-linkage-internal.cpp

[clang] Add formal linkage to textual AST dump (#194600)

This PR adds formal linkage (external, module, internal) to the textual
AST dumps. The motivation is to inform users (including ourselves) what
Clang thinks the linkage is, and to prevent situations where `extern` is
mistaken for an indication of external linkage (see #192116 for an
example).

The wording around linkage is known to be defective, but that's the best
we have: [[basic.link]](https://eel.is/c++draft/basic.link) paragraphs 3
through 7.

There are enough changes in this PR, so I decided to defer adding formal
linkage to JSON dumps to another PR.

(Open questions and suggestions for reviewers are in
https://github.com/llvm/llvm-project/pull/194600#issuecomment-4360515791)

---------

Co-authored-by: Matheus Izvekov <mizvekov at gmail.com>
DeltaFile
+485-0clang/test/AST/ast-dump-linkage.cpp
+477-0clang/test/AST/ast-dump-linkage-internal.cpp
+63-63clang/test/AST/ast-dump-decl.cpp
+54-0clang/lib/AST/TextNodeDumper.cpp
+16-16clang/test/CXX/class/class.mfct/p1-cxx20.cpp
+16-16clang/test/AST/ast-dump-templates-pattern.cpp
+1,111-9569 files not shown
+1,362-34575 files

LLVM/project 03d600eclang/test/Driver cspgo-lto.c

[NFC][Darwin] Use add -fuse-ld=ld for Darwin CSPGO use test (#195721)
DeltaFile
+4-4clang/test/Driver/cspgo-lto.c
+4-41 files

LLVM/project 9aec705utils/bazel/llvm-project-overlay/mlir BUILD.bazel

[bazel][MLIR][NVVM] Port #195608: remove GPUToNVVM (#195731)

Port 2b8c1178ddc4e0e524c14ff4d7fb39a9e502fe9f
DeltaFile
+0-13utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
+0-131 files

LLVM/project fe7a252compiler-rt/lib/asan asan_errors.cpp asan_poisoning.cpp, compiler-rt/test/asan/TestCases contiguous_container_crash.cpp

[𝘀𝗽𝗿] changes to main this commit is based on

Created using spr 1.3.7

[skip ci]
DeltaFile
+80-5compiler-rt/test/asan/TestCases/contiguous_container_crash.cpp
+15-20compiler-rt/lib/asan/asan_errors.cpp
+12-1compiler-rt/lib/asan/asan_poisoning.cpp
+1-1compiler-rt/lib/asan/asan_poisoning.h
+108-274 files

LLVM/project 89ba624compiler-rt/lib/asan asan_errors.cpp asan_poisoning.cpp, compiler-rt/lib/sanitizer_common sanitizer_symbolizer_report.cpp

[𝘀𝗽𝗿] initial version

Created using spr 1.3.7
DeltaFile
+80-5compiler-rt/test/asan/TestCases/contiguous_container_crash.cpp
+15-20compiler-rt/lib/asan/asan_errors.cpp
+12-1compiler-rt/lib/asan/asan_poisoning.cpp
+4-4compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_report.cpp
+1-1compiler-rt/lib/asan/asan_poisoning.h
+1-1compiler-rt/lib/tsan/rtl/tsan_report.cpp
+113-326 files

LLVM/project 69ce00fcompiler-rt/lib/asan asan_errors.cpp asan_poisoning.cpp, compiler-rt/test/asan/TestCases contiguous_container_crash.cpp

[𝘀𝗽𝗿] initial version

Created using spr 1.3.7
DeltaFile
+80-5compiler-rt/test/asan/TestCases/contiguous_container_crash.cpp
+15-20compiler-rt/lib/asan/asan_errors.cpp
+12-1compiler-rt/lib/asan/asan_poisoning.cpp
+1-1compiler-rt/lib/asan/asan_poisoning.h
+108-274 files

LLVM/project 37f7421compiler-rt/lib/asan asan_errors.cpp asan_poisoning.cpp, compiler-rt/test/asan/TestCases contiguous_container_crash.cpp

[𝘀𝗽𝗿] changes to main this commit is based on

Created using spr 1.3.7

[skip ci]
DeltaFile
+80-5compiler-rt/test/asan/TestCases/contiguous_container_crash.cpp
+14-19compiler-rt/lib/asan/asan_errors.cpp
+12-1compiler-rt/lib/asan/asan_poisoning.cpp
+1-1compiler-rt/lib/asan/asan_poisoning.h
+107-264 files

LLVM/project 171d28fcompiler-rt/lib/asan asan_errors.cpp asan_poisoning.cpp, compiler-rt/test/asan/TestCases contiguous_container_crash.cpp

[𝘀𝗽𝗿] changes to main this commit is based on

Created using spr 1.3.7

[skip ci]
DeltaFile
+80-5compiler-rt/test/asan/TestCases/contiguous_container_crash.cpp
+8-17compiler-rt/lib/asan/asan_errors.cpp
+8-0compiler-rt/lib/asan/asan_poisoning.cpp
+96-223 files

LLVM/project 3a902edcompiler-rt/lib/asan asan_errors.cpp asan_poisoning.cpp, compiler-rt/test/asan/TestCases contiguous_container_crash.cpp

[𝘀𝗽𝗿] initial version

Created using spr 1.3.7
DeltaFile
+80-5compiler-rt/test/asan/TestCases/contiguous_container_crash.cpp
+14-19compiler-rt/lib/asan/asan_errors.cpp
+12-1compiler-rt/lib/asan/asan_poisoning.cpp
+1-1compiler-rt/lib/asan/asan_poisoning.h
+107-264 files

LLVM/project 458ec2aclang/test/CIR/IR invalid-construct-catch-param.cir, libc/test/src/__support/File file_test.cpp

rebase

Created using spr 1.3.7
DeltaFile
+474-486llvm/include/llvm/ADT/ArrayRef.h
+370-389llvm/test/CodeGen/AMDGPU/GlobalISel/fshl.ll
+160-172llvm/test/CodeGen/AMDGPU/GlobalISel/fshr.ll
+260-0libc/test/src/__support/File/file_test.cpp
+142-75llvm/test/CodeGen/AMDGPU/GlobalISel/urem.i64.ll
+211-0clang/test/CIR/IR/invalid-construct-catch-param.cir
+1,617-1,122140 files not shown
+4,491-2,014146 files