From d5b60ee8407d12e51b017c6390af5c17683713e1 Mon Sep 17 00:00:00 2001 From: River Riddle Date: Sat, 11 May 2019 18:59:54 -0700 Subject: Replace Operation::isa with llvm::isa. -- PiperOrigin-RevId: 247789235 --- mlir/lib/Transforms/LoopInvariantCodeMotion.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mlir/lib/Transforms/LoopInvariantCodeMotion.cpp') diff --git a/mlir/lib/Transforms/LoopInvariantCodeMotion.cpp b/mlir/lib/Transforms/LoopInvariantCodeMotion.cpp index 2f95db95c6f..402f7d9afef 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() && !op.isa() && + if (!isa(op) && !isa(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()); + assert(isa(forOp.getBody()->front())); forOp.erase(); } } -- cgit v1.2.3