Two unrelated API cleanups: remove the location processing stuff from custom op
parser hooks, as it has been subsumed by a simpler and cleaner mechanism.
Second, remove the "Inst" suffixes from a few methods in CFGFuncBuilder since
they are redundant and this is inconsistent with the other builders. NFC.
PiperOrigin-RevId: 210006263
diff --git a/include/mlir/IR/Builders.h b/include/mlir/IR/Builders.h
index 48e78c7..9267605 100644
--- a/include/mlir/IR/Builders.h
+++ b/include/mlir/IR/Builders.h
@@ -191,18 +191,17 @@
// Terminators.
- ReturnInst *createReturnInst(Attribute *location,
- ArrayRef<CFGValue *> operands) {
+ ReturnInst *createReturn(Attribute *location, ArrayRef<CFGValue *> operands) {
return insertTerminator(ReturnInst::create(location, operands));
}
- BranchInst *createBranchInst(Attribute *location, BasicBlock *dest) {
+ BranchInst *createBranch(Attribute *location, BasicBlock *dest) {
return insertTerminator(BranchInst::create(location, dest));
}
- CondBranchInst *createCondBranchInst(Attribute *location, CFGValue *condition,
- BasicBlock *trueDest,
- BasicBlock *falseDest) {
+ CondBranchInst *createCondBranch(Attribute *location, CFGValue *condition,
+ BasicBlock *trueDest,
+ BasicBlock *falseDest) {
return insertTerminator(
CondBranchInst::create(location, condition, trueDest, falseDest));
}