From 5052bd8582fbcfc0a4774c34141c2dd04b333613 Mon Sep 17 00:00:00 2001 From: River Riddle Date: Fri, 1 Feb 2019 16:42:18 -0800 Subject: Define the AffineForOp and replace ForInst with it. This patch is largely mechanical, i.e. changing usages of ForInst to OpPointer. An important difference is that upon construction an AffineForOp no longer automatically creates the body and induction variable. To generate the body/iv, 'createBody' can be called on an AffineForOp with no body. PiperOrigin-RevId: 232060516 --- mlir/lib/Analysis/Verifier.cpp | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'mlir/lib/Analysis/Verifier.cpp') diff --git a/mlir/lib/Analysis/Verifier.cpp b/mlir/lib/Analysis/Verifier.cpp index 474eeb2a28e..a69831053ad 100644 --- a/mlir/lib/Analysis/Verifier.cpp +++ b/mlir/lib/Analysis/Verifier.cpp @@ -72,7 +72,6 @@ public: bool verify(); bool verifyBlock(const Block &block, bool isTopLevel); bool verifyOperation(const OperationInst &op); - bool verifyForInst(const ForInst &forInst); bool verifyDominance(const Block &block); bool verifyInstDominance(const Instruction &inst); @@ -175,10 +174,6 @@ bool FuncVerifier::verifyBlock(const Block &block, bool isTopLevel) { if (verifyOperation(cast(inst))) return true; break; - case Instruction::Kind::For: - if (verifyForInst(cast(inst))) - return true; - break; } } @@ -240,11 +235,6 @@ bool FuncVerifier::verifyOperation(const OperationInst &op) { return false; } -bool FuncVerifier::verifyForInst(const ForInst &forInst) { - // TODO: check that loop bounds are properly formed. - return verifyBlock(*forInst.getBody(), /*isTopLevel=*/false); -} - bool FuncVerifier::verifyDominance(const Block &block) { for (auto &inst : block) { // Check that all operands on the instruction are ok. @@ -262,10 +252,6 @@ bool FuncVerifier::verifyDominance(const Block &block) { return true; break; } - case Instruction::Kind::For: - if (verifyDominance(*cast(inst).getBody())) - return true; - break; } } return false; -- cgit v1.2.3