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 MainModule.cpp IRCore.cpp

remove registerError
DeltaFile
+0-19mlir/include/mlir/Bindings/Python/IRCore.h
+14-2mlir/lib/Bindings/Python/MainModule.cpp
+0-16mlir/lib/Bindings/Python/IRCore.cpp
+0-1mlir/lib/Bindings/Python/Pass.cpp
+0-1mlir/lib/Bindings/Python/IRTypes.cpp
+0-1mlir/lib/Bindings/Python/IRAttributes.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/python/CMakeLists.txt
+0-1mlir/examples/standalone/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/lib/Support/KnownFPClass.cpp
+4-0llvm/include/llvm/Support/KnownFPClass.h
+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

LLVM/project 2568ec6llvm/lib/Transforms/Vectorize SLPVectorizer.cpp, llvm/test/Transforms/SLPVectorizer/X86 non-schedulable-recalculate-deps.ll

[SLP]Recalculate dependencies for all cleared entries

Need to recalculate the dependencies for all cleared items to avoid
a crash, if the entry is used in other vector nodes

Fixes #173469
DeltaFile
+61-0llvm/test/Transforms/SLPVectorizer/X86/non-schedulable-recalculate-deps.ll
+1-3llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+62-32 files

LLVM/project 80a4be8llvm/test/Transforms/InstCombine simplify-demanded-fpclass-exp.ll

InstCombine: Add baseline tests for exp SimplifyDemandedFPClass
DeltaFile
+502-0llvm/test/Transforms/InstCombine/simplify-demanded-fpclass-exp.ll
+502-01 files

LLVM/project 54006dfllvm/include/llvm/Support KnownFPClass.h, llvm/lib/Analysis ValueTracking.cpp

Make KnownFPClass::exp not side-effecting
DeltaFile
+9-7llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
+5-9llvm/lib/Analysis/ValueTracking.cpp
+5-5llvm/lib/Support/KnownFPClass.cpp
+1-1llvm/include/llvm/Support/KnownFPClass.h
+20-224 files

LLVM/project 17c15adllvm/include/llvm/Support KnownFPClass.h, llvm/lib/Analysis ValueTracking.cpp

InstCombine: Handle exp/exp2/exp10 in SimplifyDemandedFPClass

I'm working on optimizing out the tail sequences in the
implementations of the 4 different flavors of pow. These
include chains of selects on the various edge cases.

Related to #64870
DeltaFile
+90-0llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
+34-47llvm/test/Transforms/InstCombine/simplify-demanded-fpclass-exp.ll
+24-0llvm/lib/Support/KnownFPClass.cpp
+2-17llvm/lib/Analysis/ValueTracking.cpp
+3-0llvm/include/llvm/Support/KnownFPClass.h
+153-645 files

LLVM/project 2ce622cllvm/lib/Analysis ValueTracking.cpp, llvm/test/Transforms/Attributor nofpclass-exp.ll

positive values never denormal
DeltaFile
+8-8llvm/test/Transforms/Attributor/nofpclass-exp.ll
+2-3llvm/lib/Analysis/ValueTracking.cpp
+10-112 files

LLVM/project b84f116llvm/lib/Analysis ValueTracking.cpp, llvm/test/Transforms/Attributor nofpclass-exp.ll

ValueTracking: Improve handling of exp intrinsic for overflow

Teach exp handling that positive inputs cannot introduce overflow,
and negative inputs cannot introduce underflow.
DeltaFile
+24-24llvm/test/Transforms/Attributor/nofpclass-exp.ll
+16-0llvm/lib/Analysis/ValueTracking.cpp
+2-2llvm/test/Transforms/Attributor/AMDGPU/nofpclass-amdgcn-exp.ll
+42-263 files

LLVM/project 174db36llvm/lib/Analysis ValueTracking.cpp

Remove redundant check
DeltaFile
+3-6llvm/lib/Analysis/ValueTracking.cpp
+3-61 files

LLVM/project bb978d6llvm/test/Transforms/Attributor nofpclass-exp.ll

ValueTracking: Add baseline tests for computeKnownFPClass exp

This is already handled, but misses opportunities. Test cases
where the input is known positive or negative.
DeltaFile
+101-0llvm/test/Transforms/Attributor/nofpclass-exp.ll
+101-01 files

LLVM/project ed3862cllvm/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 3c70f79llvm/lib/Transforms/InstCombine InstCombineSimplifyDemanded.cpp

Address comment
DeltaFile
+9-14llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
+9-141 files

LLVM/project 2edb979llvm/lib/Analysis ValueTracking.cpp, llvm/test/Transforms/Attributor nofpclass-fmul.ll

Always inf or nan
DeltaFile
+10-10llvm/test/Transforms/Attributor/nofpclass-fmul.ll
+2-1llvm/lib/Analysis/ValueTracking.cpp
+12-112 files

LLVM/project 5e35cbbllvm/include/llvm/Support KnownFPClass.h, llvm/lib/Analysis ValueTracking.cpp

Make KnownFPClass::canonicalize not side-effecting
DeltaFile
+16-14llvm/lib/Support/KnownFPClass.cpp
+3-2llvm/include/llvm/Support/KnownFPClass.h
+3-2llvm/lib/Analysis/ValueTracking.cpp
+1-3llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
+23-214 files

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

ValueTracking: Improve computeKnownFPClass fmul handling

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
+35-35llvm/test/Transforms/Attributor/nofpclass-fmul.ll
+33-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
+71-546 files

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

InstCombine: Handle canonicalize in SimplifyDemandedFPClass

Doesn't try to handle PositiveZero flushing mode, but I
don't believe it is incorrect with it.
DeltaFile
+73-0llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
+24-49llvm/test/Transforms/InstCombine/simplify-demanded-fpclass-canonicalize.ll
+6-49llvm/lib/Analysis/ValueTracking.cpp
+48-0llvm/lib/Support/KnownFPClass.cpp
+5-0llvm/include/llvm/Support/KnownFPClass.h
+156-985 files

LLVM/project 08b1403llvm/test/Transforms/Attributor nofpclass-fmul.ll

ValueTracking: Add baseline tests for fmul computeKnownFPClass (#173246)

DeltaFile
+477-0llvm/test/Transforms/Attributor/nofpclass-fmul.ll
+477-01 files

LLVM/project 60d3b49llvm/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/lib/Support/KnownFPClass.cpp
+4-0llvm/include/llvm/Support/KnownFPClass.h
+14-43 files

LLVM/project e486f53llvm/lib/Analysis ValueTracking.cpp, llvm/test/Transforms/Attributor nofpclass-fmul.ll

Always inf or nan
DeltaFile
+10-10llvm/test/Transforms/Attributor/nofpclass-fmul.ll
+2-1llvm/lib/Analysis/ValueTracking.cpp
+12-112 files