mirror of https://github.com/llvm/torch-mlir
update llvm-project to d13da154a7c7eff77df8686b2de1cfdfa7cc7029 (#2483)
parent
c9fd78988e
commit
ff7f8b21dc
|
@ -1 +1 @@
|
||||||
Subproject commit f66cd9e9556a53142a26a5c21a72e21f1579217c
|
Subproject commit d13da154a7c7eff77df8686b2de1cfdfa7cc7029
|
|
@ -237,17 +237,17 @@ public:
|
||||||
|
|
||||||
SmallVector<Type> regionArgTypes;
|
SmallVector<Type> regionArgTypes;
|
||||||
SmallVector<Location> regionArgLocs;
|
SmallVector<Location> regionArgLocs;
|
||||||
for (Value value : scfForOp.getLoopBody().front().getArguments()) {
|
for (Value value : scfForOp.getRegion().front().getArguments()) {
|
||||||
regionArgTypes.push_back(value.getType());
|
regionArgTypes.push_back(value.getType());
|
||||||
regionArgLocs.push_back(value.getLoc());
|
regionArgLocs.push_back(value.getLoc());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Populate the loop body region.
|
// Populate the loop body region.
|
||||||
if (!scfForOp.getLoopBody().empty())
|
if (!scfForOp.getRegion().empty())
|
||||||
rewriter.eraseBlock(&scfForOp.getLoopBody().back());
|
rewriter.eraseBlock(&scfForOp.getRegion().back());
|
||||||
|
|
||||||
auto *block = rewriter.createBlock(&scfForOp.getLoopBody(),
|
auto *block = rewriter.createBlock(&scfForOp.getRegion(),
|
||||||
scfForOp.getLoopBody().begin(),
|
scfForOp.getRegion().begin(),
|
||||||
regionArgTypes, regionArgLocs);
|
regionArgTypes, regionArgLocs);
|
||||||
|
|
||||||
// Rewrite uses of the torch loop block arguments to the new for-loop
|
// Rewrite uses of the torch loop block arguments to the new for-loop
|
||||||
|
|
Loading…
Reference in New Issue