diff options
| author | River Riddle <riverriddle@google.com> | 2019-02-01 16:42:18 -0800 |
|---|---|---|
| committer | jpienaar <jpienaar@google.com> | 2019-03-29 16:06:49 -0700 |
| commit | 5052bd8582fbcfc0a4774c34141c2dd04b333613 (patch) | |
| tree | 845641f175aee8c535a4d7deb43e5c854f07add4 /mlir/lib/IR/Builders.cpp | |
| parent | e0774c008fdcee1d4007ede4fde4cf7ad83cfda8 (diff) | |
| download | bcm5719-llvm-5052bd8582fbcfc0a4774c34141c2dd04b333613.tar.gz bcm5719-llvm-5052bd8582fbcfc0a4774c34141c2dd04b333613.zip | |
Define the AffineForOp and replace ForInst with it. This patch is largely mechanical, i.e. changing usages of ForInst to OpPointer<AffineForOp>. 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
Diffstat (limited to 'mlir/lib/IR/Builders.cpp')
| -rw-r--r-- | mlir/lib/IR/Builders.cpp | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/mlir/lib/IR/Builders.cpp b/mlir/lib/IR/Builders.cpp index ffeb4e0317f..68fbef2d27a 100644 --- a/mlir/lib/IR/Builders.cpp +++ b/mlir/lib/IR/Builders.cpp @@ -312,19 +312,3 @@ OperationInst *FuncBuilder::createOperation(const OperationState &state) { block->getInstructions().insert(insertPoint, op); return op; } - -ForInst *FuncBuilder::createFor(Location location, ArrayRef<Value *> lbOperands, - AffineMap lbMap, ArrayRef<Value *> ubOperands, - AffineMap ubMap, int64_t step) { - auto *inst = - ForInst::create(location, lbOperands, lbMap, ubOperands, ubMap, step); - block->getInstructions().insert(insertPoint, inst); - return inst; -} - -ForInst *FuncBuilder::createFor(Location location, int64_t lb, int64_t ub, - int64_t step) { - auto lbMap = AffineMap::getConstantMap(lb, context); - auto ubMap = AffineMap::getConstantMap(ub, context); - return createFor(location, {}, lbMap, {}, ubMap, step); -} |

