[PATCH] D78258: [mlir][Inliner] Store the resolved call by-value instead of by-reference
River Riddle via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 15 17:07:10 PDT 2020
rriddle created this revision.
rriddle added a reviewer: mehdi_amini.
Herald added subscribers: llvm-commits, frgossen, grosul1, Joonsoo, liufengdb, lucyrfox, mgester, arpith-jacob, nicolasvasilache, antiagainst, shauheen, burmako, jpienaar, eraman.
Herald added a project: LLVM.
rsuderman accepted this revision.
This revision is now accepted and ready to land.
This avoids asan failures as more calls may be added during inlining, invalidating the reference.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D78258
Files:
mlir/lib/Transforms/Inliner.cpp
Index: mlir/lib/Transforms/Inliner.cpp
===================================================================
--- mlir/lib/Transforms/Inliner.cpp
+++ mlir/lib/Transforms/Inliner.cpp
@@ -455,7 +455,7 @@
// here as more calls may be added during inlining.
bool inlinedAnyCalls = false;
for (unsigned i = 0; i != calls.size(); ++i) {
- ResolvedCall &it = calls[i];
+ ResolvedCall it = calls[i];
LLVM_DEBUG({
llvm::dbgs() << "* Considering inlining call: ";
it.call.dump();
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D78258.257903.patch
Type: text/x-patch
Size: 501 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200416/d673532d/attachment.bin>
More information about the llvm-commits
mailing list