forked from OSchip/llvm-project
[mlir] Allow nested regions in inlineRegionAndEmitStore
This is useful for scalar code that uses for/while loops. This has also been confirmed to work for representing std.pow as an scf.for loop on gpus. Differential Revision: https://reviews.llvm.org/D93308
This commit is contained in:
parent
76edf98b27
commit
922d3d5522
|
@ -71,7 +71,6 @@ static void inlineRegionAndEmitStore(OpType op, ArrayRef<Value> indexedValues,
|
|||
BlockAndValueMapping map;
|
||||
map.map(block.getArguments(), indexedValues);
|
||||
for (auto &op : block.without_terminator()) {
|
||||
assert(op.getNumRegions() == 0 && "expected a non-nested region");
|
||||
auto *newOp = b.clone(op, map);
|
||||
map.map(op.getResults(), newOp->getResults());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue