LLVM/project 991455ellvm/lib/Transforms/Utils SCCPSolver.cpp, llvm/test/Transforms/SCCP bitcast-vector-refinement.l.ll

[SCCP] Use mergeInValue instead of markConstant when folding CastInst (#173190)

Fixes #173180 

The crash occurs when a vector constant refines its value during
iterative analysis.
In `SCCPInstVisitor::visitCastInst`, the logic for folding constants
through a `CastInst` uses `markConstant`. This function is strictly
designed for initial assignments and contains an assertion that prevents
a lattice element from being updated with a different constant pointer.

During the analysis of loops or complex data flows, a vector constant
may "refine." For example:

First Pass: SCCP identifies a value as `<4 x i64> {poison, poison,
poison, 0}`.

Second Pass: The value refines to `<4 x i64> zeroinitializer`.


    [10 lines not shown]
DeltaFile
+29-0llvm/test/Transforms/SCCP/bitcast-vector-refinement.l.ll
+5-2llvm/lib/Transforms/Utils/SCCPSolver.cpp
+34-22 files

LLVM/project 11a1fc4libcxx/test/std/containers/sequences/array empty.verify.cpp compare.verify.cpp, libcxx/test/std/containers/sequences/array/array.cons deduct.verify.cpp

[libc++][NFC] Refactor `std::array`'s `verify.cpp` tests (#173455)

This came up in a review previously: replaces `main()` in some
`verify.cpp` tests.
DeltaFile
+0-24libcxx/test/std/containers/sequences/array/empty.verify.cpp
+7-11libcxx/test/std/containers/sequences/array/array.swap/swap.verify.cpp
+3-4libcxx/test/std/containers/sequences/array/array.creation/to_array.verify.cpp
+3-4libcxx/test/std/containers/sequences/array/array.cons/deduct.verify.cpp
+1-3libcxx/test/std/containers/sequences/array/compare.verify.cpp
+1-3libcxx/test/std/containers/sequences/array/array.fill/fill.verify.cpp
+15-491 files not shown
+16-507 files

LLVM/project 71bba12clang/include/clang/Lex Preprocessor.h, clang/lib/Lex Preprocessor.cpp PPDirectives.cpp

Revert "Reapply "[C++20][Modules] Implement P1857R3 Modules Dependency Discovery" (#173130)" (#173549)

This reverts commit 0d1c396ce8178baf05f277b16bf41b8a6b847d6d.

Co-authored-by: Yihan Wang <yihwang at nvidia.com>
DeltaFile
+211-279clang/lib/Lex/Preprocessor.cpp
+31-441clang/lib/Lex/PPDirectives.cpp
+0-207clang/test/CXX/module/cpp.pre/p1.cpp
+61-135clang/include/clang/Lex/Preprocessor.h
+15-149clang/lib/Lex/DependencyDirectivesScanner.cpp
+77-47clang/lib/Parse/Parser.cpp
+395-1,25838 files not shown
+537-1,70944 files

LLVM/project 6d1e7d4llvm/lib/IR IRBuilder.cpp, llvm/test/Transforms/LoopVectorize step-vector-i1-wrapping.ll

[LV][IRBuilder] Allow implicit truncation of step vector (#173229)

LV can create step vectors that wrap around, e.g. `step-vector i1` with
VF>2. Allow truncation when creating the vector constant to avoid an
assertion failure with https://github.com/llvm/llvm-project/pull/171456.

After https://github.com/llvm/llvm-project/pull/173494 the definition of
the llvm.stepvector intrinsic has been changed to make it have wrapping
semantics, so the semantics for the fixed and scalable case match now.
DeltaFile
+38-0llvm/test/Transforms/LoopVectorize/step-vector-i1-wrapping.ll
+3-1llvm/lib/IR/IRBuilder.cpp
+41-12 files

LLVM/project 63d57b9mlir/lib/Transforms RemoveDeadValues.cpp, mlir/test/Transforms remove-dead-values.mlir

tmp commit

simple test working

draft: do not erase IR, just replace uses
DeltaFile
+115-287mlir/lib/Transforms/RemoveDeadValues.cpp
+66-45mlir/test/Transforms/remove-dead-values.mlir
+181-3322 files

LLVM/project f5dadffmlir/lib/Transforms RemoveDeadValues.cpp

[mlir][Transforms][NFC] `remove-dead-values`: Split `OperationToCleanup`
DeltaFile
+9-4mlir/lib/Transforms/RemoveDeadValues.cpp
+9-41 files

LLVM/project 64e7f72libcxx/include ios, libcxx/include/__ios fpos.h

[libc++][ios] Applied `[[nodiscard]]` (#173520)

`[[nodiscard]]` should be applied to functions where discarding the
return value is most likely a correctness issue.

- https://libcxx.llvm.org/CodingGuidelines.htm
- https://wg21.link/iostreams.base
DeltaFile
+89-0libcxx/test/libcxx/input.output/iostreams.base/nodiscard.verify.cpp
+30-30libcxx/include/ios
+5-5libcxx/include/__ios/fpos.h
+124-353 files

LLVM/project 0d1c396clang/include/clang/Lex Preprocessor.h, clang/lib/Lex Preprocessor.cpp PPDirectives.cpp

Reapply "[C++20][Modules] Implement P1857R3 Modules Dependency Discovery" (#173130)

This PR reapply https://github.com/llvm/llvm-project/pull/107168.

---------

Signed-off-by: Wang, Yihan <yronglin777 at gmail.com>
Signed-off-by: yronglin <yronglin777 at gmail.com>
DeltaFile
+277-209clang/lib/Lex/Preprocessor.cpp
+441-31clang/lib/Lex/PPDirectives.cpp
+207-0clang/test/CXX/module/cpp.pre/p1.cpp
+135-61clang/include/clang/Lex/Preprocessor.h
+150-16clang/lib/Lex/DependencyDirectivesScanner.cpp
+47-77clang/lib/Parse/Parser.cpp
+1,257-39438 files not shown
+1,708-53644 files

LLVM/project 3da3934llvm/docs LangRef.rst, llvm/lib/Transforms/InstCombine InstCombineVectorOps.cpp

[LLVM][LangRef] Redefine out-of-range stepvector values as being truncated. (#173494)

The LangRef current defines out-of-range stepvector values as poison.
This property is at odds with both the expansion used for fixed-length
vectors and the equivalent ISD node, both of which implicitly truncate
out-of-range values.
DeltaFile
+5-2llvm/test/Transforms/InstCombine/vscale_extractelement.ll
+3-2llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
+1-1llvm/docs/LangRef.rst
+9-53 files

LLVM/project 91c65d6mlir/lib/Transforms RemoveDeadValues.cpp

[mlir][Transforms][NFC] `remove-dead-values`: Simplify dropped value handling
DeltaFile
+7-14mlir/lib/Transforms/RemoveDeadValues.cpp
+7-141 files

LLVM/project 510a459mlir/lib/Transforms RemoveDeadValues.cpp

[mlir][Transforms] `remove-dead-values`: Use proper rewriter API
DeltaFile
+5-9mlir/lib/Transforms/RemoveDeadValues.cpp
+5-91 files

LLVM/project 36f2c32mlir/lib/Transforms RemoveDeadValues.cpp, mlir/test/Transforms remove-dead-values.mlir

draft: do not erase IR, just replace uses
DeltaFile
+107-181mlir/lib/Transforms/RemoveDeadValues.cpp
+66-45mlir/test/Transforms/remove-dead-values.mlir
+173-2262 files

LLVM/project 94c014alibcxx/docs/ReleaseNotes 22.rst

[libc++][NFC] Fixed formatting in Release Notes (#173526)

DeltaFile
+1-1libcxx/docs/ReleaseNotes/22.rst
+1-11 files

LLVM/project 8e335e9clang/include/clang/Basic BuiltinsX86_64.td, clang/lib/Headers amxavx512intrin.h

[X86][AMX-AVX512] Add required/min vector width 512 constraint (#173532)

We use ZMM registers in AMX-AVX512 instructions.

Fixes: https://godbolt.org/z/GsY167Yzn
DeltaFile
+2-2clang/include/clang/Basic/BuiltinsX86_64.td
+1-1clang/lib/Headers/amxavx512intrin.h
+3-32 files

LLVM/project 347c600clang/lib/Format TokenAnnotator.cpp, clang/unittests/Format FormatTest.cpp

[clang-format] Fix a crash in formatting unbalanced angle brackets (#173456)

Fixes #173382
DeltaFile
+6-1clang/unittests/Format/FormatTest.cpp
+1-3clang/lib/Format/TokenAnnotator.cpp
+7-42 files

LLVM/project 56f5fdaclang-tools-extra/clangd AST.cpp XRefs.cpp, clang-tools-extra/clangd/index SymbolCollector.cpp

[clangd] Find references to constructors called indirectly via a forwarding function (#169742)

Calls to functions that forward to a constructor, such as make_unique,
are now recorded as references to the called constructor as well, so
that searching for references to a constructor finds such call sites.

Co-authored-by: Nathan Ridge <zeratul976 at hotmail.com>
DeltaFile
+137-1clang-tools-extra/clangd/unittests/XRefsTests.cpp
+121-1clang-tools-extra/clangd/unittests/BackgroundIndexTests.cpp
+76-2clang-tools-extra/clangd/AST.cpp
+39-7clang-tools-extra/clangd/index/SymbolCollector.cpp
+38-7clang-tools-extra/clangd/XRefs.cpp
+1-21clang-tools-extra/clangd/Preamble.cpp
+412-396 files not shown
+462-4412 files

LLVM/project 7902a68llvm/lib/Target/AMDGPU SIRegisterInfo.td

[NFC][AMDGPU] Improve the alignment of some TableGen code
DeltaFile
+75-75llvm/lib/Target/AMDGPU/SIRegisterInfo.td
+75-751 files

LLVM/project 5d6c40bmlir/lib/Dialect/Tensor/IR ValueBoundsOpInterfaceImpl.cpp, mlir/test/Dialect/Tensor value-bounds-op-interface-impl.mlir

Revert "[mlir][tensor] Add ValueBoundsOpInterface for ExpandShapeOp and CollapseShapeOp (#173356)"

This reverts commit 5154a05ef2c44697af0f51ef9e26e84422fd2d91.
It broke sanitizer build bots -- see
https://lab.llvm.org/buildbot/#/builders/52/builds/13831
DeltaFile
+0-36mlir/lib/Dialect/Tensor/IR/ValueBoundsOpInterfaceImpl.cpp
+0-32mlir/test/Dialect/Tensor/value-bounds-op-interface-impl.mlir
+0-682 files

LLVM/project ba08fb7mlir/include/mlir/Dialect/OpenACC/Transforms ACCSpecializePatterns.h, mlir/lib/Dialect/OpenACC/Transforms ACCSpecializeForHost.cpp ACCSpecializeForDevice.cpp

Revert "[mlir][acc] Add ACCSpecializeForDevice and ACCSpecializeForHost passes (#173407)"

This reverts commit 51253b31551796c6857e56f48531e15923aa49c5.
It introduced a user-after-free reported by ASan -- see
https://github.com/llvm/llvm-project/pull/173407#issuecomment-3690793823
DeltaFile
+0-471mlir/lib/Dialect/OpenACC/Transforms/ACCSpecializeForHost.cpp
+0-404mlir/test/Dialect/OpenACC/acc-specialize-for-host.mlir
+0-204mlir/test/Dialect/OpenACC/acc-specialize-for-device.mlir
+0-172mlir/lib/Dialect/OpenACC/Transforms/ACCSpecializeForDevice.cpp
+0-157mlir/test/Dialect/OpenACC/acc-specialize-for-host-fallback.mlir
+0-122mlir/include/mlir/Dialect/OpenACC/Transforms/ACCSpecializePatterns.h
+0-1,5303 files not shown
+0-1,6239 files

LLVM/project 0a415dbmlir/include/mlir/Dialect/OpenACC/Transforms Passes.td, mlir/lib/Dialect/OpenACC/Transforms ACCIfClauseLowering.cpp CMakeLists.txt

Revert "[mlir][acc] Add ACCIfClauseLowering pass (#173447)"

This reverts commit f64bc988959f1ac028d2b64500791014537d3706.

The revert is needed because this commit depends on a previous commit
(PR #173407) that is about to be reverted due to a use-after-free -- see
https://github.com/llvm/llvm-project/pull/173407#issuecomment-3690793823
DeltaFile
+0-245mlir/lib/Dialect/OpenACC/Transforms/ACCIfClauseLowering.cpp
+0-224mlir/test/Dialect/OpenACC/acc-if-clause-lowering.mlir
+0-35mlir/include/mlir/Dialect/OpenACC/Transforms/Passes.td
+0-1mlir/lib/Dialect/OpenACC/Transforms/CMakeLists.txt
+0-5054 files

LLVM/project 22b3073clang-tools-extra/clang-tidy/misc UseInternalLinkageCheck.cpp, clang-tools-extra/docs/clang-tidy/checks/misc use-internal-linkage.rst

[clang-tidy] Add fine-grained options to `misc-use-internal-linkage` (#173310)

There were several requests in #172797 to add fine-grained configuration
for this check: here it is. By default, everything is enabled.

Note: I think the tests could be better expressed if they were all in
the same file and used combinations of
`-check-suffixes={VAR,FUNC,TYPE}`, but I imagine merging all the tests
would have made reviewing confusing. Maybe a future PR?
DeltaFile
+107-0clang-tools-extra/test/clang-tidy/checkers/misc/use-internal-linkage-type.cpp
+0-99clang-tools-extra/test/clang-tidy/checkers/misc/use-internal-linkage-tag.cpp
+33-19clang-tools-extra/clang-tidy/misc/UseInternalLinkageCheck.cpp
+14-3clang-tools-extra/test/clang-tidy/checkers/misc/use-internal-linkage-var.cpp
+14-3clang-tools-extra/test/clang-tidy/checkers/misc/use-internal-linkage-func.cpp
+14-1clang-tools-extra/docs/clang-tidy/checks/misc/use-internal-linkage.rst
+182-1255 files not shown
+207-13711 files

LLVM/project 7ed5d6bllvm/lib/Target/RISCV RISCVISelLowering.cpp

[RISCV] Use TargetConstant for intrinsic IDs (#173517)

These should always use TargetConstant.
DeltaFile
+6-5llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+6-51 files

LLVM/project 3f06e4cllvm/lib/Target/BPF BPFISelLowering.cpp

[BPF] Use Register instead of MCRegister for virtual reg. NFC
DeltaFile
+1-1llvm/lib/Target/BPF/BPFISelLowering.cpp
+1-11 files

LLVM/project e135447llvm/lib/IR Instructions.cpp, llvm/test/Transforms/DFAJumpThreading dfa-unfold-select.ll

[IR] Change PHINode::removeIncomingValueIf() to loop incoming values backwards (#173444)

See discussion in
https://github.com/llvm/llvm-project/pull/172639#issuecomment-3686893143

If someone did `PN->removeIncomingValueIf([](unsigned Idx) { return Idx
== 0; })` to remove the first incoming value, current implementation
will remove all incoming values.

There are purely index based predicate use cases in:
-
https://github.com/llvm/llvm-project/blob/8c5a0f74a12d69d2fb7d6ed59f91759f18273bcd/llvm/lib/Transforms/Utils/LoopSimplify.cpp#L429
-
https://github.com/llvm/llvm-project/blob/8c5a0f74a12d69d2fb7d6ed59f91759f18273bcd/llvm/lib/Transforms/Utils/LoopUtils.cpp#L562

This patch makes `PHINode::removeIncomingValueIf()` to loop incoming
values backwards, to ensure `PHINode::removeIncomingValueIf()` working
as expected.
DeltaFile
+9-9llvm/test/Transforms/DFAJumpThreading/dfa-unfold-select.ll
+3-4llvm/lib/IR/Instructions.cpp
+1-1llvm/test/Transforms/JumpThreading/select.ll
+13-143 files

LLVM/project fe64b4fmlir/include/mlir/Bindings/Python IRCore.h, mlir/lib/Bindings/Python IRCore.cpp MainModule.cpp

remove registerError
DeltaFile
+0-19mlir/include/mlir/Bindings/Python/IRCore.h
+0-16mlir/lib/Bindings/Python/IRCore.cpp
+14-2mlir/lib/Bindings/Python/MainModule.cpp
+0-1mlir/lib/Bindings/Python/IRAttributes.cpp
+0-1mlir/lib/Bindings/Python/IRTypes.cpp
+0-1mlir/lib/Bindings/Python/Pass.cpp
+14-406 files

LLVM/project 0a15765mlir/cmake/modules AddMLIRPython.cmake, mlir/examples/standalone/python CMakeLists.txt

try moving MLIR_BINDINGS_PYTHON_NB_DOMAIN compile defn
DeltaFile
+6-0mlir/cmake/modules/AddMLIRPython.cmake
+1-1mlir/examples/standalone/test/python/smoketest.py
+0-1mlir/examples/standalone/python/CMakeLists.txt
+0-1mlir/python/CMakeLists.txt
+7-34 files

LLVM/project 6785c40llvm/include/llvm/Support KnownFPClass.h, llvm/lib/Analysis ValueTracking.cpp

ValueTracking: Avoid calling computeKnownFPClass on matched constant (#173248)

The fmul case already tries to match a literal value, we don't
need to match it twice.
DeltaFile
+6-4llvm/lib/Analysis/ValueTracking.cpp
+4-0llvm/include/llvm/Support/KnownFPClass.h
+4-0llvm/lib/Support/KnownFPClass.cpp
+14-43 files

LLVM/project ee1bac8llvm/lib/Transforms/Vectorize VPlanUtils.cpp

[VPlan] Support binary add/sub in getSCEVExprForVPValue. (NFCI)

Handle binary add/sub in getSCEVExprForVPValue. This means we are able
to compute more replicate recipe costs in the VPlan cost model. It
should produce the same costs.
DeltaFile
+25-0llvm/lib/Transforms/Vectorize/VPlanUtils.cpp
+25-01 files

LLVM/project 48b8917llvm/include/llvm/Support KnownFPClass.h, llvm/lib/Analysis ValueTracking.cpp

ValueTracking: Avoid calling computeKnownFPClass on matched constant

The fmul case already tries to match a literal value, we don't
need to match it twice.
DeltaFile
+6-4llvm/lib/Analysis/ValueTracking.cpp
+4-0llvm/include/llvm/Support/KnownFPClass.h
+4-0llvm/lib/Support/KnownFPClass.cpp
+14-43 files

LLVM/project 5020e0fllvm/lib/Analysis ValueTracking.cpp, llvm/test/CodeGen/AMDGPU fold-fabs.ll

ValueTracking: Improve computeKnownFPClass fmul handling (#173247)

Improve known non-nan sign bit tracking. Handle cases with
a known 0 or inf input of indeterminate sign.

The tails of some library functions have sign management
for special cases.
DeltaFile
+44-44llvm/test/Transforms/Attributor/nofpclass-fmul.ll
+34-12llvm/lib/Analysis/ValueTracking.cpp
+1-3llvm/test/Transforms/InstCombine/fpcast.ll
+1-2llvm/test/Transforms/LoopVectorize/scalable-inductions.ll
+1-1llvm/test/Transforms/Attributor/nofpclass-nan-fmul.ll
+0-1llvm/test/CodeGen/AMDGPU/fold-fabs.ll
+81-636 files