diff options
author | Sanjoy Das <sanjoy@playingwithpointers.com> | 2017-09-28 02:45:42 +0000 |
---|---|---|
committer | Sanjoy Das <sanjoy@playingwithpointers.com> | 2017-09-28 02:45:42 +0000 |
commit | def1729dc40d4d24ee979be9b2be8d4d70fae1c9 (patch) | |
tree | 53bbae000b5cf251decf8940c2c33c4e99655d94 /llvm/lib/Transforms/Utils/CloneFunction.cpp | |
parent | cf771adfeac07feb466a72f5b8b8acb13d50f788 (diff) | |
download | bcm5719-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/Utils/CloneFunction.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/CloneFunction.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Utils/CloneFunction.cpp b/llvm/lib/Transforms/Utils/CloneFunction.cpp index 9c4e13903ed..3b19ba1b50f 100644 --- a/llvm/lib/Transforms/Utils/CloneFunction.cpp +++ b/llvm/lib/Transforms/Utils/CloneFunction.cpp @@ -747,7 +747,7 @@ Loop *llvm::cloneLoopWithPreheader(BasicBlock *Before, BasicBlock *LoopDomBB, Function *F = OrigLoop->getHeader()->getParent(); Loop *ParentLoop = OrigLoop->getParentLoop(); - Loop *NewLoop = new Loop(); + Loop *NewLoop = LI->AllocateLoop(); if (ParentLoop) ParentLoop->addChildLoop(NewLoop); else |