projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
76edf98
)
[mlir] Allow nested regions in inlineRegionAndEmitStore
author
Tres Popp
<tpopp@google.com>
Tue, 15 Dec 2020 16:40:12 +0000
(17:40 +0100)
committer
Tres Popp
<tpopp@google.com>
Tue, 15 Dec 2020 20:02:57 +0000
(21:02 +0100)
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
mlir/lib/Dialect/Linalg/Transforms/Loops.cpp
patch
|
blob
|
history
diff --git
a/mlir/lib/Dialect/Linalg/Transforms/Loops.cpp
b/mlir/lib/Dialect/Linalg/Transforms/Loops.cpp
index d4529792624ca2e5fc3fc0adc9f1c0de91c1ec1a..3a5b791769590fe294a5cec4adb0bc382449b47a 100644
(file)
--- a/
mlir/lib/Dialect/Linalg/Transforms/Loops.cpp
+++ b/
mlir/lib/Dialect/Linalg/Transforms/Loops.cpp
@@
-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());
}