[PATCH] D152552: [CodeGenPrepare] Implement releaseMemory
Sven van Haastregt via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 16 08:04:29 PDT 2023
svenvh updated this revision to Diff 532150.
svenvh edited the summary of this revision.
svenvh added a reviewer: arsenm.
svenvh added a comment.
Herald added a subscriber: wdng.
Also clear some members that were cleared at the start of `runOnFunction`.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D152552/new/
https://reviews.llvm.org/D152552
Files:
llvm/lib/CodeGen/CodeGenPrepare.cpp
Index: llvm/lib/CodeGen/CodeGenPrepare.cpp
===================================================================
--- llvm/lib/CodeGen/CodeGenPrepare.cpp
+++ llvm/lib/CodeGen/CodeGenPrepare.cpp
@@ -377,6 +377,15 @@
bool runOnFunction(Function &F) override;
+ void releaseMemory() override {
+ // Clear per function information.
+ InsertedInsts.clear();
+ PromotedInsts.clear();
+ FreshBBs.clear();
+ BPI.reset();
+ BFI.reset();
+ }
+
StringRef getPassName() const override { return "CodeGen Prepare"; }
void getAnalysisUsage(AnalysisUsage &AU) const override {
@@ -498,10 +507,6 @@
DL = &F.getParent()->getDataLayout();
bool EverMadeChange = false;
- // Clear per function information.
- InsertedInsts.clear();
- PromotedInsts.clear();
- FreshBBs.clear();
TM = &getAnalysis<TargetPassConfig>().getTM<TargetMachine>();
SubtargetInfo = TM->getSubtargetImpl(F);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D152552.532150.patch
Type: text/x-patch
Size: 911 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230616/b0bf40d6/attachment.bin>
More information about the llvm-commits
mailing list