From ff7f8b21dcc842a4f70209a6d255d54c4ef6e39b Mon Sep 17 00:00:00 2001 From: Daniel Garvey <34486624+dan-garvey@users.noreply.github.com> Date: Tue, 26 Sep 2023 16:15:55 -0500 Subject: [PATCH] update llvm-project to d13da154a7c7eff77df8686b2de1cfdfa7cc7029 (#2483) --- externals/llvm-project | 2 +- lib/Conversion/TorchToSCF/TorchToSCF.cpp | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/externals/llvm-project b/externals/llvm-project index f66cd9e95..d13da154a 160000 --- a/externals/llvm-project +++ b/externals/llvm-project @@ -1 +1 @@ -Subproject commit f66cd9e9556a53142a26a5c21a72e21f1579217c +Subproject commit d13da154a7c7eff77df8686b2de1cfdfa7cc7029 diff --git a/lib/Conversion/TorchToSCF/TorchToSCF.cpp b/lib/Conversion/TorchToSCF/TorchToSCF.cpp index 146959151..96e14f0fd 100644 --- a/lib/Conversion/TorchToSCF/TorchToSCF.cpp +++ b/lib/Conversion/TorchToSCF/TorchToSCF.cpp @@ -237,17 +237,17 @@ public: SmallVector regionArgTypes; SmallVector 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