Chris Lattner | 158e0a3e | 2018-07-08 20:51:38 -0700 | [diff] [blame] | 1 | //===- Builders.h - Helpers for constructing MLIR Classes -------*- C++ -*-===// |
| 2 | // |
| 3 | // Copyright 2019 The MLIR Authors. |
| 4 | // |
| 5 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | // you may not use this file except in compliance with the License. |
| 7 | // You may obtain a copy of the License at |
| 8 | // |
| 9 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | // |
| 11 | // Unless required by applicable law or agreed to in writing, software |
| 12 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | // See the License for the specific language governing permissions and |
| 15 | // limitations under the License. |
| 16 | // ============================================================================= |
| 17 | |
| 18 | #ifndef MLIR_IR_BUILDERS_H |
| 19 | #define MLIR_IR_BUILDERS_H |
| 20 | |
Uday Bondhugula | 1598495 | 2018-08-01 22:36:12 -0700 | [diff] [blame] | 21 | #include "mlir/IR/Attributes.h" |
Chris Lattner | 158e0a3e | 2018-07-08 20:51:38 -0700 | [diff] [blame] | 22 | #include "mlir/IR/CFGFunction.h" |
Tatiana Shpeisman | 565b964 | 2018-07-16 11:47:09 -0700 | [diff] [blame] | 23 | #include "mlir/IR/MLFunction.h" |
| 24 | #include "mlir/IR/Statements.h" |
Chris Lattner | 158e0a3e | 2018-07-08 20:51:38 -0700 | [diff] [blame] | 25 | |
| 26 | namespace mlir { |
| 27 | class MLIRContext; |
| 28 | class Module; |
| 29 | class Type; |
| 30 | class PrimitiveType; |
| 31 | class IntegerType; |
| 32 | class FunctionType; |
| 33 | class VectorType; |
| 34 | class RankedTensorType; |
| 35 | class UnrankedTensorType; |
Chris Lattner | 1ac20cb | 2018-07-10 10:59:53 -0700 | [diff] [blame] | 36 | class BoolAttr; |
| 37 | class IntegerAttr; |
| 38 | class FloatAttr; |
| 39 | class StringAttr; |
James Molloy | f0d2f44 | 2018-08-03 01:54:46 -0700 | [diff] [blame] | 40 | class TypeAttr; |
Chris Lattner | 1ac20cb | 2018-07-10 10:59:53 -0700 | [diff] [blame] | 41 | class ArrayAttr; |
Chris Lattner | 4613d9e | 2018-08-19 21:17:22 -0700 | [diff] [blame] | 42 | class FunctionAttr; |
MLIR Team | b61885d | 2018-07-18 16:29:21 -0700 | [diff] [blame] | 43 | class AffineMapAttr; |
Chris Lattner | 1ac20cb | 2018-07-10 10:59:53 -0700 | [diff] [blame] | 44 | class AffineMap; |
| 45 | class AffineExpr; |
| 46 | class AffineConstantExpr; |
| 47 | class AffineDimExpr; |
| 48 | class AffineSymbolExpr; |
Chris Lattner | 158e0a3e | 2018-07-08 20:51:38 -0700 | [diff] [blame] | 49 | |
| 50 | /// This class is a general helper class for creating context-global objects |
| 51 | /// like types, attributes, and affine expressions. |
| 52 | class Builder { |
| 53 | public: |
| 54 | explicit Builder(MLIRContext *context) : context(context) {} |
| 55 | explicit Builder(Module *module); |
| 56 | |
| 57 | MLIRContext *getContext() const { return context; } |
| 58 | |
Chris Lattner | 1ac20cb | 2018-07-10 10:59:53 -0700 | [diff] [blame] | 59 | Identifier getIdentifier(StringRef str); |
| 60 | Module *createModule(); |
| 61 | |
Chris Lattner | 158e0a3e | 2018-07-08 20:51:38 -0700 | [diff] [blame] | 62 | // Types. |
Chris Lattner | c325119 | 2018-07-27 13:09:58 -0700 | [diff] [blame] | 63 | FloatType *getBF16Type(); |
| 64 | FloatType *getF16Type(); |
| 65 | FloatType *getF32Type(); |
| 66 | FloatType *getF64Type(); |
| 67 | |
| 68 | OtherType *getAffineIntType(); |
| 69 | OtherType *getTFControlType(); |
James Molloy | 72b0cbe | 2018-08-01 12:55:27 -0700 | [diff] [blame] | 70 | OtherType *getTFStringType(); |
Chris Lattner | 158e0a3e | 2018-07-08 20:51:38 -0700 | [diff] [blame] | 71 | IntegerType *getIntegerType(unsigned width); |
| 72 | FunctionType *getFunctionType(ArrayRef<Type *> inputs, |
| 73 | ArrayRef<Type *> results); |
Jacques Pienaar | c03c695 | 2018-08-10 11:56:47 -0700 | [diff] [blame] | 74 | MemRefType *getMemRefType(ArrayRef<int> shape, Type *elementType, |
| 75 | ArrayRef<AffineMap *> affineMapComposition = {}, |
| 76 | unsigned memorySpace = 0); |
Chris Lattner | 158e0a3e | 2018-07-08 20:51:38 -0700 | [diff] [blame] | 77 | VectorType *getVectorType(ArrayRef<unsigned> shape, Type *elementType); |
| 78 | RankedTensorType *getTensorType(ArrayRef<int> shape, Type *elementType); |
| 79 | UnrankedTensorType *getTensorType(Type *elementType); |
| 80 | |
Chris Lattner | 1ac20cb | 2018-07-10 10:59:53 -0700 | [diff] [blame] | 81 | // Attributes. |
| 82 | BoolAttr *getBoolAttr(bool value); |
| 83 | IntegerAttr *getIntegerAttr(int64_t value); |
| 84 | FloatAttr *getFloatAttr(double value); |
| 85 | StringAttr *getStringAttr(StringRef bytes); |
| 86 | ArrayAttr *getArrayAttr(ArrayRef<Attribute *> value); |
MLIR Team | b61885d | 2018-07-18 16:29:21 -0700 | [diff] [blame] | 87 | AffineMapAttr *getAffineMapAttr(AffineMap *value); |
James Molloy | f0d2f44 | 2018-08-03 01:54:46 -0700 | [diff] [blame] | 88 | TypeAttr *getTypeAttr(Type *type); |
Chris Lattner | 1aa4632 | 2018-08-21 17:55:22 -0700 | [diff] [blame] | 89 | FunctionAttr *getFunctionAttr(const Function *value); |
Chris Lattner | 1ac20cb | 2018-07-10 10:59:53 -0700 | [diff] [blame] | 90 | |
| 91 | // Affine Expressions and Affine Map. |
| 92 | AffineMap *getAffineMap(unsigned dimCount, unsigned symbolCount, |
Uday Bondhugula | 0115dbb | 2018-07-11 21:31:07 -0700 | [diff] [blame] | 93 | ArrayRef<AffineExpr *> results, |
| 94 | ArrayRef<AffineExpr *> rangeSizes); |
Chris Lattner | 1ac20cb | 2018-07-10 10:59:53 -0700 | [diff] [blame] | 95 | AffineDimExpr *getDimExpr(unsigned position); |
| 96 | AffineSymbolExpr *getSymbolExpr(unsigned position); |
| 97 | AffineConstantExpr *getConstantExpr(int64_t constant); |
| 98 | AffineExpr *getAddExpr(AffineExpr *lhs, AffineExpr *rhs); |
| 99 | AffineExpr *getSubExpr(AffineExpr *lhs, AffineExpr *rhs); |
| 100 | AffineExpr *getMulExpr(AffineExpr *lhs, AffineExpr *rhs); |
| 101 | AffineExpr *getModExpr(AffineExpr *lhs, AffineExpr *rhs); |
| 102 | AffineExpr *getFloorDivExpr(AffineExpr *lhs, AffineExpr *rhs); |
| 103 | AffineExpr *getCeilDivExpr(AffineExpr *lhs, AffineExpr *rhs); |
| 104 | |
Uday Bondhugula | bc53562 | 2018-08-07 14:24:38 -0700 | [diff] [blame] | 105 | // Integer set. |
| 106 | IntegerSet *getIntegerSet(unsigned dimCount, unsigned symbolCount, |
| 107 | ArrayRef<AffineExpr *> constraints, |
| 108 | ArrayRef<bool> isEq); |
| 109 | |
Chris Lattner | 158e0a3e | 2018-07-08 20:51:38 -0700 | [diff] [blame] | 110 | // TODO: Helpers for affine map/exprs, etc. |
Chris Lattner | 158e0a3e | 2018-07-08 20:51:38 -0700 | [diff] [blame] | 111 | protected: |
| 112 | MLIRContext *context; |
| 113 | }; |
| 114 | |
| 115 | /// This class helps build a CFGFunction. Instructions that are created are |
| 116 | /// automatically inserted at an insertion point or added to the current basic |
| 117 | /// block. |
| 118 | class CFGFuncBuilder : public Builder { |
| 119 | public: |
Chris Lattner | 8174f3a | 2018-07-29 16:45:23 -0700 | [diff] [blame] | 120 | CFGFuncBuilder(BasicBlock *block, BasicBlock::iterator insertPoint) |
| 121 | : Builder(block->getFunction()->getContext()), |
| 122 | function(block->getFunction()) { |
| 123 | setInsertionPoint(block, insertPoint); |
| 124 | } |
| 125 | |
| 126 | CFGFuncBuilder(OperationInst *insertBefore) |
| 127 | : CFGFuncBuilder(insertBefore->getBlock(), |
| 128 | BasicBlock::iterator(insertBefore)) {} |
| 129 | |
Chris Lattner | 158e0a3e | 2018-07-08 20:51:38 -0700 | [diff] [blame] | 130 | CFGFuncBuilder(BasicBlock *block) |
| 131 | : Builder(block->getFunction()->getContext()), |
| 132 | function(block->getFunction()) { |
| 133 | setInsertionPoint(block); |
| 134 | } |
Chris Lattner | 8174f3a | 2018-07-29 16:45:23 -0700 | [diff] [blame] | 135 | |
Chris Lattner | 158e0a3e | 2018-07-08 20:51:38 -0700 | [diff] [blame] | 136 | CFGFuncBuilder(CFGFunction *function) |
| 137 | : Builder(function->getContext()), function(function) {} |
| 138 | |
| 139 | /// Reset the insertion point to no location. Creating an operation without a |
| 140 | /// set insertion point is an error, but this can still be useful when the |
| 141 | /// current insertion point a builder refers to is being removed. |
| 142 | void clearInsertionPoint() { |
| 143 | this->block = nullptr; |
| 144 | insertPoint = BasicBlock::iterator(); |
| 145 | } |
| 146 | |
Chris Lattner | 8174f3a | 2018-07-29 16:45:23 -0700 | [diff] [blame] | 147 | /// Set the insertion point to the specified location. |
| 148 | void setInsertionPoint(BasicBlock *block, BasicBlock::iterator insertPoint) { |
| 149 | assert(block->getFunction() == function && |
| 150 | "can't move to a different function"); |
| 151 | this->block = block; |
| 152 | this->insertPoint = insertPoint; |
| 153 | } |
| 154 | |
| 155 | /// Set the insertion point to the specified operation. |
| 156 | void setInsertionPoint(OperationInst *inst) { |
| 157 | setInsertionPoint(inst->getBlock(), BasicBlock::iterator(inst)); |
| 158 | } |
| 159 | |
Chris Lattner | 158e0a3e | 2018-07-08 20:51:38 -0700 | [diff] [blame] | 160 | /// Set the insertion point to the end of the specified block. |
| 161 | void setInsertionPoint(BasicBlock *block) { |
Chris Lattner | 8174f3a | 2018-07-29 16:45:23 -0700 | [diff] [blame] | 162 | setInsertionPoint(block, block->end()); |
Chris Lattner | 158e0a3e | 2018-07-08 20:51:38 -0700 | [diff] [blame] | 163 | } |
| 164 | |
Chris Lattner | 992a127 | 2018-08-07 12:02:37 -0700 | [diff] [blame] | 165 | void insert(OperationInst *opInst) { |
| 166 | block->getOperations().insert(insertPoint, opInst); |
| 167 | } |
| 168 | |
Chris Lattner | 8a9310a | 2018-08-24 21:13:19 -0700 | [diff] [blame^] | 169 | /// Add new basic block and set the insertion point to the end of it. If an |
| 170 | /// 'insertBefore' basic block is passed, the block will be placed before the |
| 171 | /// specified block. If not, the block will be appended to the end of the |
| 172 | /// current function. |
| 173 | BasicBlock *createBlock(BasicBlock *insertBefore = nullptr); |
Tatiana Shpeisman | 6708b45 | 2018-07-24 10:15:13 -0700 | [diff] [blame] | 174 | |
Chris Lattner | eed6c4d | 2018-08-07 09:12:35 -0700 | [diff] [blame] | 175 | /// Create an operation given the fields represented as an OperationState. |
| 176 | OperationInst *createOperation(const OperationState &state); |
| 177 | |
Chris Lattner | eed6c4d | 2018-08-07 09:12:35 -0700 | [diff] [blame] | 178 | /// Create operation of specific op type at the current insertion point. |
| 179 | template <typename OpTy, typename... Args> |
Chris Lattner | 1628fa0 | 2018-08-23 14:32:25 -0700 | [diff] [blame] | 180 | OpPointer<OpTy> create(Attribute *location, Args... args) { |
| 181 | OperationState state(getContext(), location, OpTy::getOperationName()); |
Chris Lattner | 1eb7748 | 2018-08-22 19:25:49 -0700 | [diff] [blame] | 182 | OpTy::build(this, &state, args...); |
| 183 | auto *inst = createOperation(state); |
Chris Lattner | 992a127 | 2018-08-07 12:02:37 -0700 | [diff] [blame] | 184 | auto result = inst->template getAs<OpTy>(); |
| 185 | assert(result && "Builder didn't return the right type"); |
| 186 | return result; |
Chris Lattner | eed6c4d | 2018-08-07 09:12:35 -0700 | [diff] [blame] | 187 | } |
| 188 | |
Uday Bondhugula | 1598495 | 2018-08-01 22:36:12 -0700 | [diff] [blame] | 189 | OperationInst *cloneOperation(const OperationInst &srcOpInst) { |
| 190 | auto *op = srcOpInst.clone(); |
Chris Lattner | 992a127 | 2018-08-07 12:02:37 -0700 | [diff] [blame] | 191 | insert(op); |
Uday Bondhugula | 1598495 | 2018-08-01 22:36:12 -0700 | [diff] [blame] | 192 | return op; |
| 193 | } |
| 194 | |
Chris Lattner | 158e0a3e | 2018-07-08 20:51:38 -0700 | [diff] [blame] | 195 | // Terminators. |
| 196 | |
Chris Lattner | 091a6b5 | 2018-08-23 14:58:27 -0700 | [diff] [blame] | 197 | ReturnInst *createReturn(Attribute *location, ArrayRef<CFGValue *> operands) { |
Chris Lattner | 1628fa0 | 2018-08-23 14:32:25 -0700 | [diff] [blame] | 198 | return insertTerminator(ReturnInst::create(location, operands)); |
Chris Lattner | 4074644 | 2018-07-21 14:32:09 -0700 | [diff] [blame] | 199 | } |
Chris Lattner | 158e0a3e | 2018-07-08 20:51:38 -0700 | [diff] [blame] | 200 | |
Chris Lattner | 8a9310a | 2018-08-24 21:13:19 -0700 | [diff] [blame^] | 201 | BranchInst *createBranch(Attribute *location, BasicBlock *dest, |
| 202 | ArrayRef<CFGValue *> operands = {}) { |
| 203 | return insertTerminator(BranchInst::create(location, dest, operands)); |
Chris Lattner | 158e0a3e | 2018-07-08 20:51:38 -0700 | [diff] [blame] | 204 | } |
| 205 | |
Chris Lattner | 091a6b5 | 2018-08-23 14:58:27 -0700 | [diff] [blame] | 206 | CondBranchInst *createCondBranch(Attribute *location, CFGValue *condition, |
| 207 | BasicBlock *trueDest, |
| 208 | BasicBlock *falseDest) { |
James Molloy | 4f78837 | 2018-07-24 15:01:27 -0700 | [diff] [blame] | 209 | return insertTerminator( |
Chris Lattner | 1628fa0 | 2018-08-23 14:32:25 -0700 | [diff] [blame] | 210 | CondBranchInst::create(location, condition, trueDest, falseDest)); |
James Molloy | 4f78837 | 2018-07-24 15:01:27 -0700 | [diff] [blame] | 211 | } |
| 212 | |
Chris Lattner | 158e0a3e | 2018-07-08 20:51:38 -0700 | [diff] [blame] | 213 | private: |
| 214 | template <typename T> |
| 215 | T *insertTerminator(T *term) { |
| 216 | block->setTerminator(term); |
| 217 | return term; |
| 218 | } |
| 219 | |
| 220 | CFGFunction *function; |
| 221 | BasicBlock *block = nullptr; |
| 222 | BasicBlock::iterator insertPoint; |
| 223 | }; |
| 224 | |
Tatiana Shpeisman | 565b964 | 2018-07-16 11:47:09 -0700 | [diff] [blame] | 225 | /// This class helps build an MLFunction. Statements that are created are |
| 226 | /// automatically inserted at an insertion point or added to the current |
| 227 | /// statement block. |
| 228 | class MLFuncBuilder : public Builder { |
| 229 | public: |
Chris Lattner | e787b32 | 2018-08-08 11:14:57 -0700 | [diff] [blame] | 230 | /// Create ML function builder and set insertion point to the given statement, |
| 231 | /// which will cause subsequent insertions to go right before it. |
| 232 | MLFuncBuilder(Statement *stmt) |
| 233 | // TODO: Eliminate findFunction from this. |
| 234 | : Builder(stmt->findFunction()->getContext()) { |
| 235 | setInsertionPoint(stmt); |
| 236 | } |
| 237 | |
| 238 | MLFuncBuilder(StmtBlock *block, StmtBlock::iterator insertPoint) |
| 239 | // TODO: Eliminate findFunction from this. |
Tatiana Shpeisman | d880b35 | 2018-07-31 23:14:16 -0700 | [diff] [blame] | 240 | : Builder(block->findFunction()->getContext()) { |
Chris Lattner | e787b32 | 2018-08-08 11:14:57 -0700 | [diff] [blame] | 241 | setInsertionPoint(block, insertPoint); |
Tatiana Shpeisman | 565b964 | 2018-07-16 11:47:09 -0700 | [diff] [blame] | 242 | } |
| 243 | |
| 244 | /// Reset the insertion point to no location. Creating an operation without a |
| 245 | /// set insertion point is an error, but this can still be useful when the |
| 246 | /// current insertion point a builder refers to is being removed. |
| 247 | void clearInsertionPoint() { |
| 248 | this->block = nullptr; |
| 249 | insertPoint = StmtBlock::iterator(); |
| 250 | } |
| 251 | |
Tatiana Shpeisman | d880b35 | 2018-07-31 23:14:16 -0700 | [diff] [blame] | 252 | /// Set the insertion point to the specified location. |
| 253 | /// Unlike CFGFuncBuilder, MLFuncBuilder allows to set insertion |
| 254 | /// point to a different function. |
| 255 | void setInsertionPoint(StmtBlock *block, StmtBlock::iterator insertPoint) { |
| 256 | // TODO: check that insertPoint is in this rather than some other block. |
| 257 | this->block = block; |
| 258 | this->insertPoint = insertPoint; |
| 259 | } |
| 260 | |
Uday Bondhugula | 6770171 | 2018-08-21 16:01:23 -0700 | [diff] [blame] | 261 | /// Set the insertion point to the specified operation, which will cause |
| 262 | /// subsequent insertions to go right before it. |
Chris Lattner | e787b32 | 2018-08-08 11:14:57 -0700 | [diff] [blame] | 263 | void setInsertionPoint(Statement *stmt) { |
Tatiana Shpeisman | d880b35 | 2018-07-31 23:14:16 -0700 | [diff] [blame] | 264 | setInsertionPoint(stmt->getBlock(), StmtBlock::iterator(stmt)); |
| 265 | } |
| 266 | |
Chris Lattner | e787b32 | 2018-08-08 11:14:57 -0700 | [diff] [blame] | 267 | /// Set the insertion point to the start of the specified block. |
| 268 | void setInsertionPointToStart(StmtBlock *block) { |
Uday Bondhugula | 1598495 | 2018-08-01 22:36:12 -0700 | [diff] [blame] | 269 | this->block = block; |
| 270 | insertPoint = block->begin(); |
| 271 | } |
| 272 | |
Chris Lattner | e787b32 | 2018-08-08 11:14:57 -0700 | [diff] [blame] | 273 | /// Set the insertion point to the end of the specified block. |
| 274 | void setInsertionPointToEnd(StmtBlock *block) { |
| 275 | this->block = block; |
| 276 | insertPoint = block->end(); |
| 277 | } |
| 278 | |
Uday Bondhugula | 84b8095 | 2018-08-03 13:22:26 -0700 | [diff] [blame] | 279 | /// Get the current insertion point of the builder. |
| 280 | StmtBlock::iterator getInsertionPoint() const { return insertPoint; } |
| 281 | |
Chris Lattner | eed6c4d | 2018-08-07 09:12:35 -0700 | [diff] [blame] | 282 | /// Create an operation given the fields represented as an OperationState. |
| 283 | OperationStmt *createOperation(const OperationState &state); |
| 284 | |
Chris Lattner | 992a127 | 2018-08-07 12:02:37 -0700 | [diff] [blame] | 285 | /// Create operation of specific op type at the current insertion point. |
Jacques Pienaar | ac86d10 | 2018-08-03 08:16:37 -0700 | [diff] [blame] | 286 | template <typename OpTy, typename... Args> |
Chris Lattner | 1628fa0 | 2018-08-23 14:32:25 -0700 | [diff] [blame] | 287 | OpPointer<OpTy> create(Attribute *location, Args... args) { |
| 288 | OperationState state(getContext(), location, OpTy::getOperationName()); |
Chris Lattner | 1eb7748 | 2018-08-22 19:25:49 -0700 | [diff] [blame] | 289 | OpTy::build(this, &state, args...); |
| 290 | auto *stmt = createOperation(state); |
Chris Lattner | 992a127 | 2018-08-07 12:02:37 -0700 | [diff] [blame] | 291 | auto result = stmt->template getAs<OpTy>(); |
| 292 | assert(result && "Builder didn't return the right type"); |
| 293 | return result; |
Jacques Pienaar | ac86d10 | 2018-08-03 08:16:37 -0700 | [diff] [blame] | 294 | } |
| 295 | |
Chris Lattner | e787b32 | 2018-08-08 11:14:57 -0700 | [diff] [blame] | 296 | /// Create a deep copy of the specified statement, remapping any operands that |
| 297 | /// use values outside of the statement using the map that is provided ( |
| 298 | /// leaving them alone if no entry is present). Replaces references to cloned |
| 299 | /// sub-statements to the corresponding statement that is copied, and adds |
| 300 | /// those mappings to the map. |
| 301 | Statement *clone(const Statement &stmt, |
| 302 | OperationStmt::OperandMapTy &operandMapping) { |
| 303 | Statement *cloneStmt = stmt.clone(operandMapping, getContext()); |
Uday Bondhugula | 134154e | 2018-08-06 18:40:34 -0700 | [diff] [blame] | 304 | block->getStatements().insert(insertPoint, cloneStmt); |
| 305 | return cloneStmt; |
Uday Bondhugula | 84b8095 | 2018-08-03 13:22:26 -0700 | [diff] [blame] | 306 | } |
| 307 | |
Chris Lattner | 1604e47 | 2018-07-23 08:42:19 -0700 | [diff] [blame] | 308 | // Creates for statement. When step is not specified, it is set to 1. |
Chris Lattner | 1628fa0 | 2018-08-23 14:32:25 -0700 | [diff] [blame] | 309 | ForStmt *createFor(Attribute *location, AffineConstantExpr *lowerBound, |
Uday Bondhugula | 6770171 | 2018-08-21 16:01:23 -0700 | [diff] [blame] | 310 | AffineConstantExpr *upperBound, int64_t step = 1); |
Tatiana Shpeisman | 565b964 | 2018-07-16 11:47:09 -0700 | [diff] [blame] | 311 | |
Chris Lattner | 1628fa0 | 2018-08-23 14:32:25 -0700 | [diff] [blame] | 312 | IfStmt *createIf(Attribute *location, IntegerSet *condition); |
Tatiana Shpeisman | 565b964 | 2018-07-16 11:47:09 -0700 | [diff] [blame] | 313 | |
| 314 | private: |
| 315 | StmtBlock *block = nullptr; |
| 316 | StmtBlock::iterator insertPoint; |
| 317 | }; |
Chris Lattner | 158e0a3e | 2018-07-08 20:51:38 -0700 | [diff] [blame] | 318 | |
| 319 | } // namespace mlir |
| 320 | |
| 321 | #endif |