aboutsummaryrefslogtreecommitdiff
path: root/mlir/lib/Transforms/LoopInvariantCodeMotion.cpp
diff options
context:
space:
mode:
authorRiver Riddle <riverriddle@google.com>2019-05-11 18:59:54 -0700
committerMehdi Amini <joker.eph@gmail.com>2019-05-20 13:37:52 -0700
commitd5b60ee8407d12e51b017c6390af5c17683713e1 (patch)
tree19f0378cf0c5f571d041bc3814449bf3de292bc5 /mlir/lib/Transforms/LoopInvariantCodeMotion.cpp
parentadca3c2edcdd1375d8c421816ec53044537ccd64 (diff)
downloadllvm-d5b60ee8407d12e51b017c6390af5c17683713e1.zip
llvm-d5b60ee8407d12e51b017c6390af5c17683713e1.tar.gz
llvm-d5b60ee8407d12e51b017c6390af5c17683713e1.tar.bz2
Replace Operation::isa with llvm::isa.
-- PiperOrigin-RevId: 247789235
Diffstat (limited to 'mlir/lib/Transforms/LoopInvariantCodeMotion.cpp')
-rw-r--r--mlir/lib/Transforms/LoopInvariantCodeMotion.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/mlir/lib/Transforms/LoopInvariantCodeMotion.cpp b/mlir/lib/Transforms/LoopInvariantCodeMotion.cpp
index 2f95db9..402f7d9 100644
--- a/mlir/lib/Transforms/LoopInvariantCodeMotion.cpp
+++ b/mlir/lib/Transforms/LoopInvariantCodeMotion.cpp
@@ -82,7 +82,7 @@ void LoopInvariantCodeMotion::runOnAffineForOp(AffineForOp forOp) {
for (auto &op : *loopBody) {
// If the operation is loop invariant, insert it into opsToMove.
- if (!op.isa<AffineForOp>() && !op.isa<AffineTerminatorOp>() &&
+ if (!isa<AffineForOp>(op) && !isa<AffineTerminatorOp>(op) &&
loopDefinedOps.count(&op) != 1) {
LLVM_DEBUG(op.print(llvm::dbgs() << "\nLICM'ing op\n"));
opsToMove.push_back(&op);
@@ -99,7 +99,7 @@ void LoopInvariantCodeMotion::runOnAffineForOp(AffineForOp forOp) {
// If the for loop body has a single operation (the terminator), erase it.
if (forOp.getBody()->getOperations().size() == 1) {
- assert(forOp.getBody()->getOperations().front().isa<AffineTerminatorOp>());
+ assert(isa<AffineTerminatorOp>(forOp.getBody()->front()));
forOp.erase();
}
}