summaryrefslogtreecommitdiff
path: root/mlir/lib/Dialect/Linalg/Transforms/Loops.cpp
diff options
context:
space:
mode:
authorMogball <jeffniu22@gmail.com>2021-10-12 23:14:57 +0000
committerMogball <jeffniu22@gmail.com>2021-10-13 03:07:03 +0000
commita54f4eae0e1d0ef5adccdcf9f6c2b518dc1101aa (patch)
treef4478fb873d88f382b2c3dbdadf254e68faa7244 /mlir/lib/Dialect/Linalg/Transforms/Loops.cpp
parent666accf283311c5110ae4e2e5e4c4b99078eed15 (diff)
downloadllvm-a54f4eae0e1d0ef5adccdcf9f6c2b518dc1101aa.tar.gz
[MLIR] Replace std ops with arith dialect ops
Precursor: https://reviews.llvm.org/D110200 Removed redundant ops from the standard dialect that were moved to the `arith` or `math` dialects. Renamed all instances of operations in the codebase and in tests. Reviewed By: rriddle, jpienaar Differential Revision: https://reviews.llvm.org/D110797
Diffstat (limited to 'mlir/lib/Dialect/Linalg/Transforms/Loops.cpp')
-rw-r--r--mlir/lib/Dialect/Linalg/Transforms/Loops.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/mlir/lib/Dialect/Linalg/Transforms/Loops.cpp b/mlir/lib/Dialect/Linalg/Transforms/Loops.cpp
index f027d0d5f388..ff19f6adc1fe 100644
--- a/mlir/lib/Dialect/Linalg/Transforms/Loops.cpp
+++ b/mlir/lib/Dialect/Linalg/Transforms/Loops.cpp
@@ -7,6 +7,7 @@
//===----------------------------------------------------------------------===//
#include "PassDetail.h"
+#include "mlir/Dialect/Arithmetic/IR/Arithmetic.h"
#include "mlir/Dialect/Linalg/IR/LinalgOps.h"
#include "mlir/Dialect/Linalg/IR/LinalgTypes.h"
#include "mlir/Dialect/Linalg/Passes.h"
@@ -349,7 +350,7 @@ struct FoldAffineOp : public RewritePattern {
AffineExpr expr = map.getResult(0);
if (map.getNumInputs() == 0) {
if (auto val = expr.dyn_cast<AffineConstantExpr>()) {
- rewriter.replaceOpWithNewOp<ConstantIndexOp>(op, val.getValue());
+ rewriter.replaceOpWithNewOp<arith::ConstantIndexOp>(op, val.getValue());
return success();
}
return failure();