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<Location> regionArgLocs;
|
||||
for (Value value : scfForOp.getLoopBody().front().getArguments()) {
|
||||
for (Value value : scfForOp.getRegion().front().getArguments()) {
|
||||
regionArgTypes.push_back(value.getType());
|
||||
regionArgLocs.push_back(value.getLoc());
|
||||
}
|
||||
|
||||
// Populate the loop body region.
|
||||
if (!scfForOp.getLoopBody().empty())
|
||||
rewriter.eraseBlock(&scfForOp.getLoopBody().back());
|
||||
if (!scfForOp.getRegion().empty())
|
||||
rewriter.eraseBlock(&scfForOp.getRegion().back());
|
||||
|
||||
auto *block = rewriter.createBlock(&scfForOp.getLoopBody(),
|
||||
scfForOp.getLoopBody().begin(),
|
||||
auto *block = rewriter.createBlock(&scfForOp.getRegion(),
|
||||
scfForOp.getRegion().begin(),
|
||||
regionArgTypes, regionArgLocs);
|
||||
|
||||
// Rewrite uses of the torch loop block arguments to the new for-loop
|
||||
|
|
Loading…
Reference in New Issue