Set flag to true when definition is emitted. (#97)
This commit is contained in:
parent
a720f9a7b2
commit
0d307d1183
|
@ -168,6 +168,8 @@ void BuildKrnlLoop::createDefineAndOptimizeOp(bool withEmptyOptimization) {
|
||||||
originalLoops.reserve(originalLoopNum);
|
originalLoops.reserve(originalLoopNum);
|
||||||
for (auto result : loopsOp.getResults())
|
for (auto result : loopsOp.getResults())
|
||||||
originalLoops.push_back(result);
|
originalLoops.push_back(result);
|
||||||
|
createdDefineOp = true;
|
||||||
|
|
||||||
// inserte optimize loop op.
|
// inserte optimize loop op.
|
||||||
auto optimizedLoopsOp =
|
auto optimizedLoopsOp =
|
||||||
rewriter.create<KrnlOptimizeLoopsOp>(loc, originalLoopNum);
|
rewriter.create<KrnlOptimizeLoopsOp>(loc, originalLoopNum);
|
||||||
|
@ -182,9 +184,10 @@ void BuildKrnlLoop::createDefineAndOptimizeOp(bool withEmptyOptimization) {
|
||||||
rewriter.create<KrnlReturnLoopsOp>(loc, originalLoops);
|
rewriter.create<KrnlReturnLoopsOp>(loc, originalLoops);
|
||||||
rewriter.restoreInsertionPoint(ip);
|
rewriter.restoreInsertionPoint(ip);
|
||||||
}
|
}
|
||||||
|
createdOptimizeOp = true;
|
||||||
|
|
||||||
// prepare data structure to push bounds
|
// prepare data structure to push bounds
|
||||||
pack = new KrnlIterateOperandPack(rewriter, originalLoops, optLoops);
|
pack = new KrnlIterateOperandPack(rewriter, originalLoops, optLoops);
|
||||||
createdOptimizeOp = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// push bounds (lower and upper) and return index for loop info
|
// push bounds (lower and upper) and return index for loop info
|
||||||
|
|
Loading…
Reference in New Issue