[PATCH] D130954: [DeadArgElim] Clear state before returning (NFC).
Michele Scandale via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 1 18:48:49 PDT 2022
michele.scandale created this revision.
michele.scandale added reviewers: fhahn, aeubanks, nikic.
Herald added subscribers: ormris, hiraditya.
Herald added a project: All.
michele.scandale requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Ensure that the all state that depends on a module or context is cleared
so that there are no issues when the same instance of the pass is used
to process different modules.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D130954
Files:
llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp
Index: llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp
===================================================================
--- llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp
+++ llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp
@@ -1112,6 +1112,10 @@
for (auto &F : M)
Changed |= removeDeadArgumentsFromCallers(F);
+ LiveFunctions.clear();
+ LiveValues.clear();
+ Uses.clear();
+
if (!Changed)
return PreservedAnalyses::all();
return PreservedAnalyses::none();
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D130954.449161.patch
Type: text/x-patch
Size: 496 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220802/8faf4956/attachment.bin>
More information about the llvm-commits
mailing list