LLVM/project 241f03dclang/test/AST ast-dump-linkage.cpp ast-dump-linkage-internal.cpp, libc/src/semaphore/linux named_semaphore.cpp

rebase

Created using spr 1.3.7
DeltaFile
+485-0clang/test/AST/ast-dump-linkage.cpp
+477-0clang/test/AST/ast-dump-linkage-internal.cpp
+198-0llvm/test/Transforms/LoopVectorize/AArch64/transform-narrow-interleave-to-widen-memory-with-live-outs.ll
+195-0libc/src/semaphore/linux/named_semaphore.cpp
+63-63clang/test/AST/ast-dump-decl.cpp
+114-0libc/test/src/semaphore/linux/semaphore_test.cpp
+1,532-63133 files not shown
+3,046-683139 files

LLVM/project 72c2847clang/test/AST ast-dump-linkage.cpp ast-dump-linkage-internal.cpp, libc/src/semaphore/linux named_semaphore.cpp

[𝘀𝗽𝗿] changes introduced through rebase

Created using spr 1.3.7

[skip ci]
DeltaFile
+485-0clang/test/AST/ast-dump-linkage.cpp
+477-0clang/test/AST/ast-dump-linkage-internal.cpp
+198-0llvm/test/Transforms/LoopVectorize/AArch64/transform-narrow-interleave-to-widen-memory-with-live-outs.ll
+195-0libc/src/semaphore/linux/named_semaphore.cpp
+63-63clang/test/AST/ast-dump-decl.cpp
+114-0libc/test/src/semaphore/linux/semaphore_test.cpp
+1,532-63132 files not shown
+3,038-674138 files

LLVM/project 3cbe75blibc/src/semaphore/linux named_semaphore.cpp

[libc][semaphore] Zero-initialize rand_bytes to fix GCC warning (#195757)

GCC 15 warns about `rand_bytes` being maybe uninitialized when passed to
`getrandom`. Since `getrandom` writes to it, it doesn't strictly need
initialization, but zero-initializing it satisfies the compiler and
avoids the `-Werror=maybe-uninitialized` error.

Fix for https://github.com/llvm/llvm-project/pull/192278

Assisted by Gemini
DeltaFile
+1-1libc/src/semaphore/linux/named_semaphore.cpp
+1-11 files

LLVM/project 8c6ee8dllvm/lib/IR Constants.cpp, llvm/test/Assembler aggregate-constant-values.ll

[RFC][IR] Support vector splats in `ConstantPointerNull`

This PR allows `ConstantPointerNull` to represent both scalar pointer nulls and
fixed or scalable vector splats of pointer nulls. This change first aligns with
the native splat behavior of `ConstantInt` and `ConstantFP`, and second, makes
it easier to eventually change the semantics of `ConstantPointerNull` to
represent a semantic null pointer instead of a zero value, which is what it
represents today.
DeltaFile
+31-31llvm/test/Transforms/RewriteStatepointsForGC/base-vector.ll
+30-30llvm/test/Transforms/LoopVectorize/X86/masked_load_store.ll
+49-4llvm/lib/IR/Constants.cpp
+28-0llvm/unittests/IR/ConstantsTest.cpp
+18-9llvm/test/Transforms/RewriteStatepointsForGC/base-inference.ll
+24-0llvm/test/Assembler/aggregate-constant-values.ll
+180-7463 files not shown
+351-22269 files

LLVM/project 5d4b5c5clang/lib/FrontendTool ExecuteCompilerInvocation.cpp

fix clang-format
DeltaFile
+2-1clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp
+2-11 files

LLVM/project f68a900compiler-rt/test/asan/TestCases handle_noreturn_bug.cpp, compiler-rt/test/asan/TestCases/Linux odr-vtable.cpp activation-options.cpp

[asan] Remove XFAIL from tests that are passing with debug checks

These tests have been passing with COMPILER_RT_DEBUG=ON since 2022 (at
least for x86).

Fixes https://github.com/llvm/llvm-project/issues/46206

Pull Request: https://github.com/llvm/llvm-project/pull/84614
DeltaFile
+0-3compiler-rt/test/asan/TestCases/Linux/odr-vtable.cpp
+0-2compiler-rt/test/asan/TestCases/Linux/activation-options.cpp
+0-2compiler-rt/test/asan/TestCases/Posix/start-deactivated.cpp
+0-2compiler-rt/test/asan/TestCases/Linux/odr-violation.cpp
+0-2compiler-rt/test/asan/TestCases/handle_noreturn_bug.cpp
+0-115 files

LLVM/project 7e20b8bclang/test/AST ast-dump-linkage.cpp ast-dump-linkage-internal.cpp, libc/src/semaphore/linux named_semaphore.cpp

rebase

Created using spr 1.3.7
DeltaFile
+485-0clang/test/AST/ast-dump-linkage.cpp
+477-0clang/test/AST/ast-dump-linkage-internal.cpp
+198-0llvm/test/Transforms/LoopVectorize/AArch64/transform-narrow-interleave-to-widen-memory-with-live-outs.ll
+195-0libc/src/semaphore/linux/named_semaphore.cpp
+63-63clang/test/AST/ast-dump-decl.cpp
+114-0libc/test/src/semaphore/linux/semaphore_test.cpp
+1,532-63131 files not shown
+3,020-666137 files

LLVM/project 167f42bclang/test/AST ast-dump-linkage.cpp ast-dump-linkage-internal.cpp, libc/src/semaphore/linux named_semaphore.cpp

[𝘀𝗽𝗿] changes introduced through rebase

Created using spr 1.3.7

[skip ci]
DeltaFile
+485-0clang/test/AST/ast-dump-linkage.cpp
+477-0clang/test/AST/ast-dump-linkage-internal.cpp
+198-0llvm/test/Transforms/LoopVectorize/AArch64/transform-narrow-interleave-to-widen-memory-with-live-outs.ll
+195-0libc/src/semaphore/linux/named_semaphore.cpp
+63-63clang/test/AST/ast-dump-decl.cpp
+114-0libc/test/src/semaphore/linux/semaphore_test.cpp
+1,532-63132 files not shown
+3,024-673138 files

LLVM/project bdb9151llvm/test/CodeGen/AMDGPU amdgcn.bitcast.1024bit.ll amdgcn.bitcast.512bit.ll, llvm/test/CodeGen/AMDGPU/NextUseAnalysis spill-vreg-many-lanes.mir acyclic-770bb.mir

rebase

Created using spr 1.3.8-beta.1
DeltaFile
+275,101-0llvm/test/CodeGen/AMDGPU/NextUseAnalysis/spill-vreg-many-lanes.mir
+230,288-0llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.1024bit.ll
+144,679-0llvm/test/CodeGen/AMDGPU/NextUseAnalysis/acyclic-770bb.mir
+95,086-0llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.512bit.ll
+92,827-0llvm/test/CodeGen/RISCV/rvv/clmulh-sdnode.ll
+42,349-42,348llvm/test/MC/AMDGPU/gfx8_asm_vop3.s
+880,330-42,348109,423 files not shown
+18,213,359-6,036,414109,429 files

LLVM/project 63b0e73libc Maintainers.md

[libc] Add vhscampos as the maintainer for ARM and AArch64 (#195051)
DeltaFile
+4-0libc/Maintainers.md
+4-01 files

LLVM/project 12f896dclang/test/Analysis/Scalable/EndToEnd/UnsafeBufferFlow connected_units_by_ret.cpp disconnected_units.cpp

[SSAF][UnsafeBufferReachableAnalysis] add end-to-end testing
DeltaFile
+183-0clang/test/Analysis/Scalable/EndToEnd/UnsafeBufferFlow/connected_units_by_ret.cpp
+138-0clang/test/Analysis/Scalable/EndToEnd/UnsafeBufferFlow/disconnected_units.cpp
+117-0clang/test/Analysis/Scalable/EndToEnd/UnsafeBufferFlow/connected_units_by_calls.cpp
+111-0clang/test/Analysis/Scalable/EndToEnd/UnsafeBufferFlow/connected_units_by_global.cpp
+83-0clang/test/Analysis/Scalable/EndToEnd/UnsafeBufferFlow/connected_units_by_class_and_clients.cpp
+632-05 files

LLVM/project 183dc93clang/include/clang/ScalableStaticAnalysisFramework/Core/SourcePassAnalysis SourcePassAnalysis.h, clang/include/clang/ScalableStaticAnalysisFramework/Core/WholeProgramAnalysis WPASuite.h

[SSAF] Add UnsafeBufferReachableDebugAnalysis--a source pass analysis

Also added temporary workaround for LUNamespace and Entity linkage info
DeltaFile
+103-1clang/lib/ScalableStaticAnalysisFramework/Analyses/UnsafeBufferUsage/UnsafeBufferUsageAnalysis.cpp
+26-0clang/lib/ScalableStaticAnalysisFramework/Core/Serialization/JSONFormat/WPASuite.cpp
+4-1clang/lib/ScalableStaticAnalysisFramework/Core/TUSummary/TUSummaryBuilder.cpp
+5-0clang/include/clang/ScalableStaticAnalysisFramework/Core/WholeProgramAnalysis/WPASuite.h
+2-0clang/test/Analysis/Scalable/ssaf-format/WPASuite/without-plugin.test
+2-0clang/include/clang/ScalableStaticAnalysisFramework/Core/SourcePassAnalysis/SourcePassAnalysis.h
+142-215 files not shown
+157-221 files

LLVM/project d99031bclang/test/Analysis/Scalable/ssaf-analyzer/Inputs lu-badext.txt lu-noext, clang/test/Analysis/Scalable/ssaf-analyzer/Outputs all.json both.json

Pull in the draft PR "[clang][ssaf] Add clang-ssaf-analyzer #188881"
DeltaFile
+131-0clang/tools/clang-ssaf-analyzer/SSAFAnalyzer.cpp
+126-0clang/test/Analysis/Scalable/ssaf-analyzer/Inputs/lu-badext.txt
+126-0clang/test/Analysis/Scalable/ssaf-analyzer/Inputs/lu-noext
+126-0clang/test/Analysis/Scalable/ssaf-analyzer/Inputs/lu.json
+96-0clang/test/Analysis/Scalable/ssaf-analyzer/Outputs/all.json
+87-0clang/test/Analysis/Scalable/ssaf-analyzer/Outputs/both.json
+692-011 files not shown
+1,036-017 files

LLVM/project c1fceb3clang-tools-extra/docs ReleaseNotes.rst, clang-tools-extra/test/clang-tidy/checkers/misc const-correctness-pointer-as-pointers.cpp

[clang][Analysis] Handle const-qualified pointer refs in `ExprMutationAnalyzer` (#190421)

Teach `ExprMutationAnalyzer` to recognize references to const-qualified
pointer objects, such as `T *const &`, as non-const pointee sinks when
the pointee type itself is non-const.

Fixes #190218 
Fixes #157730
DeltaFile
+57-0clang/unittests/Analysis/ExprMutationAnalyzerTest.cpp
+51-0clang-tools-extra/test/clang-tidy/checkers/misc/const-correctness-pointer-as-pointers.cpp
+23-4clang/lib/Analysis/ExprMutationAnalyzer.cpp
+3-0clang-tools-extra/docs/ReleaseNotes.rst
+134-44 files

LLVM/project 7a38657llvm/lib/Target/AMDGPU AMDGPURegBankLegalizeRules.cpp, llvm/test/CodeGen/AMDGPU llvm.amdgcn.permlane.gfx1250.ll

[AMDGPU][GlobalISel] RegBankLegalize rules for permlane_(bcast|up|down|xor|idx_gen) intrinsics (#195583)
DeltaFile
+10-0llvm/lib/Target/AMDGPU/AMDGPURegBankLegalizeRules.cpp
+1-1llvm/test/CodeGen/AMDGPU/llvm.amdgcn.permlane.gfx1250.ll
+11-12 files

LLVM/project 53e3ca1compiler-rt/test/sanitizer_common/TestCases/Posix create_thread_loop2.cpp

[compiler-rt][test] Disable create_thread_loop2 for lsan on Darwin (#195753)

create_thread_loop2 occasionally hangs on macOS till hitting timeout.
Disable the tests for LSAN on macOS.
DeltaFile
+3-0compiler-rt/test/sanitizer_common/TestCases/Posix/create_thread_loop2.cpp
+3-01 files

LLVM/project 4ae338fllvm/lib/Support APFloat.cpp, llvm/unittests/ADT APFloatTest.cpp

APFloat: fix wrong result status for large floats (#189925)

For large float literals such as
`10384593717069655257060992658440193.0`,
[`FloatingLiteral::isExact`](https://github.com/llvm/llvm-project/blob/6b2b0da40de1495ace2b100799a35711f7ad7b21/clang/include/clang/AST/Expr.h#L1702)
was incorrectly returning `true`.

The issue has been tracked down to
`IEEEFloat::roundSignificandWithExponent` incorrectly reporting `opOK`.
DeltaFile
+22-0llvm/unittests/ADT/APFloatTest.cpp
+6-6llvm/lib/Support/APFloat.cpp
+28-62 files

LLVM/project 0f0ec8fcompiler-rt/test/sanitizer_common/TestCases/Posix create_thread_loop2.cpp

[𝘀𝗽𝗿] initial version

Created using spr 1.3.7
DeltaFile
+3-0compiler-rt/test/sanitizer_common/TestCases/Posix/create_thread_loop2.cpp
+3-01 files

LLVM/project 4f40fe1llvm/docs SandboxIR.md, llvm/include/llvm/SandboxIR Tracker.h

[SandboxIR][Tracker] Support nested checkpoints (#191097)

This patch implements nested checkpointing, i.e., you can now save the
IR state more than once and revert more than once.
For example, after two saves: save(1) and save(2), a revert() will bring
you back to the IR state of save(2), one more revert will bring you back
to the IR state of save(1).
DeltaFile
+67-7llvm/unittests/SandboxIR/TrackerTest.cpp
+23-5llvm/lib/SandboxIR/Tracker.cpp
+8-9llvm/include/llvm/SandboxIR/Tracker.h
+5-0llvm/docs/SandboxIR.md
+103-214 files

LLVM/project 6e3ab87compiler-rt/cmake/Modules CompilerRTDarwinUtils.cmake, compiler-rt/lib/builtins/arm aeabi_cfcmp.S aeabi_cdcmp.S

[cmake][compiler-rt][darwin] builtin libraries don't build for armv6m in Darwin (#195372)

darwin_add_builtin_libraries tests for _Float16 and __bf16 for the host
architecture rather than the one being built, add -arch to fix that so
that armv6m correctly reports that it does not support __bf16.
cfcmp/cdcmp get "error: unsupported relocation type" on their "Branch to
target address" to c{f,d}cmple. Switch those to "Call a subroutine"
instructions on Thumb-1 (e.g. armv6m).

Assisted-by: Claude Code

rdar://167828904
DeltaFile
+6-0compiler-rt/lib/builtins/arm/aeabi_cfcmp.S
+6-0compiler-rt/lib/builtins/arm/aeabi_cdcmp.S
+3-0compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake
+15-03 files

LLVM/project 5847857flang/lib/Semantics check-omp-loop.cpp, flang/test/Semantics/OpenMP do01.f90

[flang][OpenMP] Detect DSA conflicts in nested loop constructs (#195323)

Follow-up to https://github.com/llvm/llvm-project/pull/194961

The fix from PR194961 did not detect explicit/predefined DSA conflicts
on an iteration variable in a nested loop construct. For example, in a
testcase inspired by Fujitsu 0165_0035.f90:
```
  !$omp parallel do private(i) shared(j)
  do i=1,1
    do j=1,1
      !$omp parallel do default(none) shared(k)
      do k=1,1
      end do
      !$omp end parallel do
    end do
  end do
```
the "shared(k)" was not flagged as incorrect.

    [2 lines not shown]
DeltaFile
+13-5flang/lib/Semantics/check-omp-loop.cpp
+17-0flang/test/Semantics/OpenMP/do01.f90
+30-52 files

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

[asan] Record container poisoning in poison history (#195674)
DeltaFile
+8-0compiler-rt/lib/asan/asan_poisoning.cpp
+6-0compiler-rt/test/asan/TestCases/contiguous_container_crash.cpp
+1-0compiler-rt/lib/asan/asan_errors.cpp
+15-03 files

LLVM/project 457628cclang/test/AST ast-dump-linkage.cpp ast-dump-linkage-internal.cpp, libc/src/semaphore/linux named_semaphore.cpp

[𝘀𝗽𝗿] changes introduced through rebase

Created using spr 1.3.7

[skip ci]
DeltaFile
+485-0clang/test/AST/ast-dump-linkage.cpp
+477-0clang/test/AST/ast-dump-linkage-internal.cpp
+198-0llvm/test/Transforms/LoopVectorize/AArch64/transform-narrow-interleave-to-widen-memory-with-live-outs.ll
+195-0libc/src/semaphore/linux/named_semaphore.cpp
+63-63clang/test/AST/ast-dump-decl.cpp
+114-0libc/test/src/semaphore/linux/semaphore_test.cpp
+1,532-63113 files not shown
+2,696-636119 files

LLVM/project b58f4cellvm/lib/DWARFLinker/Parallel AcceleratorRecordsSaver.cpp AcceleratorRecordsSaver.h, llvm/test/tools/dsymutil/AArch64 dwarf5-dwarf4-combination-macho.test

[DWARFLinker] Emit DW_IDX_parent in the accelerator table (#195403)

.debug_names entries produced by the parallel linker were always emitted
with std::nullopt for ParentDIEOffset, resulting in a missing
DW_IDX_parent. The classic linker emits it via
DWARF5AccelTableData::getDefiningParentDieOffset on the output DIE tree.

The parallel linker can't use the same approach because the records are
saved during cloneDIE, before the output DIE has been linked into its
parent, so DIE::getParent() is nullptr at that time time. Fix that by
computing the parent offset from the input-side DIE tree instead. We
look up InputDieEntry's parent via getParentIdx, skip parents marked
DW_AT_declaration, and translate them to the output offset through
CompileUnit::getDieOutOffset. Since no real DIE can live at offset 0, we
can use that to unambiguously mark input DIEs that were not cloned into
this CU's plain DWARF (e.g. routed only into the artificial type unit)
and is treated as "no parent".

Only compile-unit accelerator entries are covered. Type-unit entries
(artificial type unit) still emit no DW_IDX_parent, tracked by a TODO.
DeltaFile
+66-28llvm/lib/DWARFLinker/Parallel/AcceleratorRecordsSaver.cpp
+16-4llvm/lib/DWARFLinker/Parallel/AcceleratorRecordsSaver.h
+4-8llvm/test/tools/dsymutil/AArch64/dwarf5-dwarf4-combination-macho.test
+2-2llvm/lib/DWARFLinker/Parallel/DWARFLinkerImpl.cpp
+4-0llvm/lib/DWARFLinker/Parallel/DWARFLinkerUnit.h
+4-0llvm/test/tools/dsymutil/AArch64/DWARFLinkerParallel/accel-imported-declarations.test
+96-426 files

LLVM/project df8c87dllvm/lib/Transforms/IPO Instrumentor.cpp

Update llvm/lib/Transforms/IPO/Instrumentor.cpp

Co-authored-by: Matt Arsenault <Matthew.Arsenault at amd.com>
DeltaFile
+1-1llvm/lib/Transforms/IPO/Instrumentor.cpp
+1-11 files

LLVM/project 9aa55b2compiler-rt/lib/sanitizer_common sanitizer_symbolizer_report.cpp, compiler-rt/lib/tsan/rtl tsan_report.cpp

[sanitizer] Capitalize HINT in reports (#195734)

Consistency with other sanitizer reports which use uppercase "HINT:".
DeltaFile
+7-6compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_report.cpp
+6-6compiler-rt/test/asan/TestCases/Posix/high-address-dereference.c
+3-2compiler-rt/lib/tsan/rtl/tsan_report.cpp
+1-1compiler-rt/test/asan/TestCases/Windows/report_after_syminitialize.cpp
+17-154 files

LLVM/project affe132libc/src/__support/OSUtil/linux/syscall_wrappers ftruncate.h link.h, libc/src/semaphore posix_semaphore.h

Add named posix semaphore lifetime operations on linux (#192278)

This implements the second part of #190847 

Specifically, this pr adds `sem_open`, `sem_close`, and `sem_unlink` for
posix semaphore on linux.
https://pubs.opengroup.org/onlinepubs/9799919799/functions/sem_open.html

https://pubs.opengroup.org/onlinepubs/9799919799/functions/sem_close.html

https://pubs.opengroup.org/onlinepubs/9799919799/functions/sem_unlink.html

Since it targets on linux implementation, two extra things are added:
1. add system call wrappers for `mmap`, `munmap`, `link`, `unlink`, and
`ftruncate`. Those are necessary for the implementation of semaphore on
linux. Wrappers is added based on the refactor proposal:
https://libc.llvm.org/dev/syscall_wrapper_refactor.html.
2. refactor the previous semaphore implementation, put it under `linux/`
since its based on linux.
DeltaFile
+195-0libc/src/semaphore/linux/named_semaphore.cpp
+114-0libc/test/src/semaphore/linux/semaphore_test.cpp
+73-0libc/src/semaphore/linux/semaphore.h
+0-59libc/src/semaphore/posix_semaphore.h
+41-0libc/src/__support/OSUtil/linux/syscall_wrappers/ftruncate.h
+39-0libc/src/__support/OSUtil/linux/syscall_wrappers/link.h
+462-598 files not shown
+616-10914 files

LLVM/project 7237429llvm/lib/Target/AArch64 AArch64ISelLowering.cpp, llvm/test/CodeGen/AArch64 aarch64_be-shuffle-vector.ll fix-shuffle-vector-be-rev.ll

[AArch64] Fix `shufflevector` miscompilation on `aarch64_be` (#193076)

A function like

```llvm
define <4 x i16> @xtn_shuffle_even_v8i16(<8 x i16> %a) {
entry:
  %r = shufflevector <8 x i16> %a, <8 x i16> poison, <4 x i32> <i32 0, i32 2, i32 4, i32 6>
  ret <4 x i16> %r
}
```

will use the `xtn` instruction, which for each 32-bit vector element
keeps only the lower 16 bits, so effectively this is a truncation.
However, if the vector actually has 16-bit elements, then the conversion
from a shuffle to a truncation is only valid on LE, not on BE. On BE,
`uzp1` should be used instead. So this PR moves some logic to right
after a check for LE, so that BE does not miscompile.


    [5 lines not shown]
DeltaFile
+95-0llvm/test/CodeGen/AArch64/aarch64_be-shuffle-vector.ll
+27-27llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
+0-39llvm/test/CodeGen/AArch64/fix-shuffle-vector-be-rev.ll
+122-663 files

LLVM/project 5e29d8allvm/lib/Target/Mips MipsDelaySlotFiller.cpp, llvm/test/CodeGen/Mips unalignedload.ll mips1-load-in-delay-slot.ll

Prevent undefined behavior caused by combination of branch and load delay slots on MIPS1 (#185427)

Under certain conditions the LLVM `MipsDelaySlotFiller` fills a branch
delay slot with an instruction requiring a load delay slot. However the
`MipsDelaySlotFiller` does not check the filled instruction for hazard
which leads to code like this:
```asm
        beqz    $1, $BB0_5
        lbu     $2, %lo(_RNvCs5jWYnRsDZoD_3app13CONTROLLERS_A)($2)
# --- Some other instructions
$BB0_5:
        andi    $1, $2, 1
```
`lbu` got moved into the branch delay slot but has a load delay slot -
so when jumping to `$BB0_5` the value for `$2` will not be ready, which
leads to undefined behavior.

This PR suggests to declare instructions with a load delay slot to be
hazardous for the branch delay slot, only for `MIPS1`. This will prevent

    [23 lines not shown]
DeltaFile
+221-84llvm/test/CodeGen/Mips/llvm-ir/load.ll
+225-35llvm/test/CodeGen/Mips/llvm-ir/select-dbl.ll
+179-32llvm/lib/Target/Mips/MipsDelaySlotFiller.cpp
+62-6llvm/test/CodeGen/Mips/unalignedload.ll
+61-0llvm/test/CodeGen/Mips/mips1-load-in-delay-slot.ll
+50-0llvm/test/CodeGen/Mips/gprestore.ll
+798-1571 files not shown
+800-1587 files

LLVM/project 125619allvm/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/lib/Transforms/Utils/SimplifyCFG.cpp
+9-9llvm/unittests/Analysis/ValueLatticeTest.cpp
+69-67100 files not shown
+276-265106 files