summaryrefslogtreecommitdiffstats
path: root/mlir/lib/IR/Operation.cpp
diff options
context:
space:
mode:
authorChris Lattner <clattner@google.com>2018-12-28 13:07:39 -0800
committerjpienaar <jpienaar@google.com>2019-03-29 14:43:58 -0700
commit315a466aed9bcc896007098719ed9e0a35a3459d (patch)
tree5de796018001a55709d69fc51d362197680d315c /mlir/lib/IR/Operation.cpp
parent2a463c36b1f1cc42e585144a9b012cf948baa708 (diff)
downloadbcm5719-llvm-315a466aed9bcc896007098719ed9e0a35a3459d.tar.gz
bcm5719-llvm-315a466aed9bcc896007098719ed9e0a35a3459d.zip
Rename BasicBlock and StmtBlock to Block, and make a pass cleaning it up. I did not make an effort to rename all of the 'bb' names in the codebase, since they are still correct and any specific missed once can be fixed up on demand.
The last major renaming is Statement -> Instruction, which is why Statement and Stmt still appears in various places. This is step 19/n towards merging instructions and statements, NFC. PiperOrigin-RevId: 227163082
Diffstat (limited to 'mlir/lib/IR/Operation.cpp')
-rw-r--r--mlir/lib/IR/Operation.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/mlir/lib/IR/Operation.cpp b/mlir/lib/IR/Operation.cpp
index 23e54b3638e..ccd7d65f7c8 100644
--- a/mlir/lib/IR/Operation.cpp
+++ b/mlir/lib/IR/Operation.cpp
@@ -245,7 +245,7 @@ bool OpTrait::impl::verifySameOperandsAndResultType(const OperationInst *op) {
static bool verifyBBArguments(
llvm::iterator_range<OperationInst::const_operand_iterator> operands,
- const BasicBlock *destBB, const OperationInst *op) {
+ const Block *destBB, const OperationInst *op) {
unsigned operandCount = std::distance(operands.begin(), operands.end());
if (operandCount != destBB->getNumArguments())
return op->emitError("branch has " + Twine(operandCount) +
@@ -277,11 +277,11 @@ static bool verifyTerminatorSuccessors(const OperationInst *op) {
bool OpTrait::impl::verifyIsTerminator(const OperationInst *op) {
// Verify that the operation is at the end of the respective parent block.
if (op->getFunction()->isML()) {
- StmtBlock *block = op->getBlock();
- if (!block || block->getContainingStmt() || &block->back() != op)
+ Block *block = op->getBlock();
+ if (!block || block->getContainingInst() || &block->back() != op)
return op->emitOpError("must be the last statement in the ML function");
} else {
- const BasicBlock *block = op->getBlock();
+ const Block *block = op->getBlock();
if (!block || &block->back() != op)
return op->emitOpError(
"must be the last instruction in the parent basic block.");
OpenPOWER on IntegriCloud