diff options
| -rw-r--r-- | mlir/include/mlir/IR/OpDefinition.h | 4 | ||||
| -rw-r--r-- | mlir/lib/Target/LLVMIR/ConvertToLLVMIR.cpp | 12 |
2 files changed, 6 insertions, 10 deletions
diff --git a/mlir/include/mlir/IR/OpDefinition.h b/mlir/include/mlir/IR/OpDefinition.h index 85f9a88963e..ee5bf3749ae 100644 --- a/mlir/include/mlir/IR/OpDefinition.h +++ b/mlir/include/mlir/IR/OpDefinition.h @@ -726,10 +726,6 @@ public: /// Return the operation that this refers to. Instruction *getInstruction() { return OpState::getInstruction(); } - // FIXME: Remove this, this is just a transition to allow using -> and staging - // patches. - ConcreteType *operator->() { return static_cast<ConcreteType *>(this); } - /// Return true if this "op class" can match against the specified operation. /// This hook can be overridden with a more specific implementation in /// the subclass of Base. diff --git a/mlir/lib/Target/LLVMIR/ConvertToLLVMIR.cpp b/mlir/lib/Target/LLVMIR/ConvertToLLVMIR.cpp index 76d484ac402..91bc05ea682 100644 --- a/mlir/lib/Target/LLVMIR/ConvertToLLVMIR.cpp +++ b/mlir/lib/Target/LLVMIR/ConvertToLLVMIR.cpp @@ -238,13 +238,13 @@ bool ModuleTranslation::convertInstruction(Instruction &inst, // Emit branches. We need to look up the remapped blocks and ignore the block // arguments that were transformed into PHI nodes. if (auto op = inst.dyn_cast<LLVM::BrOp>()) { - builder.CreateBr(blockMapping[op->getSuccessor(0)]); + builder.CreateBr(blockMapping[op.getSuccessor(0)]); return false; } if (auto op = inst.dyn_cast<LLVM::CondBrOp>()) { - builder.CreateCondBr(valueMapping.lookup(op->getOperand(0)), - blockMapping[op->getSuccessor(0)], - blockMapping[op->getSuccessor(1)]); + builder.CreateCondBr(valueMapping.lookup(op.getOperand(0)), + blockMapping[op.getSuccessor(0)], + blockMapping[op.getSuccessor(1)]); return false; } @@ -306,11 +306,11 @@ static Value *getPHISourceValue(Block *current, Block *pred, assert(condBranchOp && "only branch instructions can be terminators of a block that " "has successors"); - assert((condBranchOp->getSuccessor(0) != condBranchOp->getSuccessor(1)) && + assert((condBranchOp.getSuccessor(0) != condBranchOp.getSuccessor(1)) && "successors with arguments in LLVM conditional branches must be " "different blocks"); - return condBranchOp->getSuccessor(0) == current + return condBranchOp.getSuccessor(0) == current ? terminator.getSuccessorOperand(0, index) : terminator.getSuccessorOperand(1, index); } |

