summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/IPO
diff options
context:
space:
mode:
authorSanjoy Das <sanjoy@playingwithpointers.com>2017-09-28 02:45:42 +0000
committerSanjoy Das <sanjoy@playingwithpointers.com>2017-09-28 02:45:42 +0000
commitdef1729dc40d4d24ee979be9b2be8d4d70fae1c9 (patch)
tree53bbae000b5cf251decf8940c2c33c4e99655d94 /llvm/lib/Transforms/IPO
parentcf771adfeac07feb466a72f5b8b8acb13d50f788 (diff)
downloadbcm5719-llvm-def1729dc40d4d24ee979be9b2be8d4d70fae1c9.tar.gz
bcm5719-llvm-def1729dc40d4d24ee979be9b2be8d4d70fae1c9.zip
Use a BumpPtrAllocator for Loop objects
Summary: And now that we no longer have to explicitly free() the Loop instances, we can (with more ease) use the destructor of LoopBase to do what LoopBase::clear() was doing. Reviewers: chandlerc Subscribers: mehdi_amini, mcrosier, llvm-commits Differential Revision: https://reviews.llvm.org/D38201 llvm-svn: 314375
Diffstat (limited to 'llvm/lib/Transforms/IPO')
-rw-r--r--llvm/lib/Transforms/IPO/Inliner.cpp4
-rw-r--r--llvm/lib/Transforms/IPO/LoopExtractor.cpp3
2 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/IPO/Inliner.cpp b/llvm/lib/Transforms/IPO/Inliner.cpp
index 4233ba9deec..680a450c1c9 100644
--- a/llvm/lib/Transforms/IPO/Inliner.cpp
+++ b/llvm/lib/Transforms/IPO/Inliner.cpp
@@ -1044,8 +1044,8 @@ PreservedAnalyses InlinerPass::run(LazyCallGraph::SCC &InitialC,
FunctionAnalysisManager &FAM =
AM.getResult<FunctionAnalysisManagerCGSCCProxy>(DeadC, CG)
.getManager();
- FAM.clear(*DeadF);
- AM.clear(DeadC);
+ FAM.clear(*DeadF, DeadF->getName());
+ AM.clear(DeadC, DeadC.getName());
auto &DeadRC = DeadC.getOuterRefSCC();
CG.removeDeadFunction(*DeadF);
diff --git a/llvm/lib/Transforms/IPO/LoopExtractor.cpp b/llvm/lib/Transforms/IPO/LoopExtractor.cpp
index b499092a1ee..36b6bdba2cd 100644
--- a/llvm/lib/Transforms/IPO/LoopExtractor.cpp
+++ b/llvm/lib/Transforms/IPO/LoopExtractor.cpp
@@ -80,7 +80,7 @@ INITIALIZE_PASS(SingleLoopExtractor, "loop-extract-single",
//
Pass *llvm::createLoopExtractorPass() { return new LoopExtractor(); }
-bool LoopExtractor::runOnLoop(Loop *L, LPPassManager &) {
+bool LoopExtractor::runOnLoop(Loop *L, LPPassManager &LPM) {
if (skipLoop(L))
return false;
@@ -143,6 +143,7 @@ bool LoopExtractor::runOnLoop(Loop *L, LPPassManager &) {
Changed = true;
// After extraction, the loop is replaced by a function call, so
// we shouldn't try to run any more loop passes on it.
+ LPM.markLoopAsDeleted(*L);
LI.erase(L);
}
++NumExtracted;
OpenPOWER on IntegriCloud