summaryrefslogtreecommitdiff
path: root/lib/Target/ARM/ARMLoadStoreOptimizer.cpp
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2015-07-20 23:17:14 +0000
committerMatthias Braun <matze@braunis.de>2015-07-20 23:17:14 +0000
commit2271d686de72e59df3c6859ba19ac8257ca197fe (patch)
tree433335f8fd8e85470150676c71c7bdbafcd155ac /lib/Target/ARM/ARMLoadStoreOptimizer.cpp
parentf4f0f405c8a0712f300e8e9a9f12b2e93a3f624c (diff)
Revert "ARM: Use SpecificBumpPtrAllocator to fix leak introduced in r241920"
This reverts commit r241951. It caused http://llvm.org/PR24190 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242733 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/ARMLoadStoreOptimizer.cpp')
-rw-r--r--lib/Target/ARM/ARMLoadStoreOptimizer.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Target/ARM/ARMLoadStoreOptimizer.cpp b/lib/Target/ARM/ARMLoadStoreOptimizer.cpp
index 1bf2c3d0255..e22adabb828 100644
--- a/lib/Target/ARM/ARMLoadStoreOptimizer.cpp
+++ b/lib/Target/ARM/ARMLoadStoreOptimizer.cpp
@@ -116,7 +116,7 @@ namespace {
/// Whether the instructions can be merged into a ldrd/strd instruction.
bool CanMergeToLSDouble;
};
- SpecificBumpPtrAllocator<MergeCandidate> Allocator;
+ BumpPtrAllocator Allocator;
SmallVector<const MergeCandidate*,4> Candidates;
SmallVector<MachineInstr*,4> MergeBaseCandidates;
@@ -979,7 +979,7 @@ void ARMLoadStoreOpt::FormCandidates(const MemOpQueue &MemOps) {
}
// Form a candidate from the Ops collected so far.
- MergeCandidate *Candidate = new(Allocator.Allocate()) MergeCandidate;
+ MergeCandidate *Candidate = new(Allocator) MergeCandidate;
for (unsigned C = SIndex, CE = SIndex + Count; C < CE; ++C)
Candidate->Instrs.push_back(MemOps[C].MI);
Candidate->LatestMIIdx = Latest - SIndex;
@@ -1825,7 +1825,7 @@ bool ARMLoadStoreOpt::runOnMachineFunction(MachineFunction &Fn) {
Modified |= MergeReturnIntoLDM(MBB);
}
- Allocator.DestroyAll();
+ Allocator.Reset();
return Modified;
}