diff options
author | Mogball <jeffniu22@gmail.com> | 2021-10-12 23:14:57 +0000 |
---|---|---|
committer | Mogball <jeffniu22@gmail.com> | 2021-10-13 03:07:03 +0000 |
commit | a54f4eae0e1d0ef5adccdcf9f6c2b518dc1101aa (patch) | |
tree | f4478fb873d88f382b2c3dbdadf254e68faa7244 /mlir/lib/Dialect/Linalg/Transforms/Loops.cpp | |
parent | 666accf283311c5110ae4e2e5e4c4b99078eed15 (diff) | |
download | llvm-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.cpp | 3 |
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(); |