[mlir][NFC] Use `getConstantIntValue` instead of casting to `ConstantIndexOp`
authorMatthias Springer <me@m-sp.org>
Tue, 4 Jul 2023 12:03:02 +0000 (14:03 +0200)
committerMatthias Springer <me@m-sp.org>
Tue, 4 Jul 2023 12:08:37 +0000 (14:08 +0200)
commitcb7bda2ace81226c5b33165411dd0316f93fa57e
treeac17373150735891bac6fb6e485e36b3efc1104a
parent880f306226fcb97d85d422480954eb8765ff31c7
[mlir][NFC] Use `getConstantIntValue` instead of casting to `ConstantIndexOp`

`getConstantIntValue` extracts constant values from all constant-like ops, not just `arith::ConstantIndexOp`.

Differential Revision: https://reviews.llvm.org/D154356
15 files changed:
mlir/lib/Conversion/SCFToGPU/SCFToGPU.cpp
mlir/lib/Dialect/Affine/Analysis/AffineStructures.cpp
mlir/lib/Dialect/Affine/Analysis/Utils.cpp
mlir/lib/Dialect/Affine/IR/AffineOps.cpp
mlir/lib/Dialect/GPU/IR/GPUDialect.cpp
mlir/lib/Dialect/Linalg/Transforms/Promotion.cpp
mlir/lib/Dialect/Linalg/Transforms/Tiling.cpp
mlir/lib/Dialect/Linalg/Utils/Utils.cpp
mlir/lib/Dialect/SCF/IR/SCF.cpp
mlir/lib/Dialect/SCF/Utils/Utils.cpp
mlir/lib/Dialect/SparseTensor/IR/CMakeLists.txt
mlir/lib/Dialect/SparseTensor/IR/SparseTensorDialect.cpp
mlir/lib/Dialect/Vector/IR/VectorOps.cpp
mlir/lib/Dialect/Vector/Transforms/VectorTransferOpTransforms.cpp
utils/bazel/llvm-project-overlay/mlir/BUILD.bazel