[llvm-commits] [llvm] r106943 - in /llvm/trunk: include/llvm/CodeGen/LiveInterval.h lib/CodeGen/LiveIntervalAnalysis.cpp lib/CodeGen/LiveStackAnalysis.cpp
Benjamin Kramer
benny.kra at googlemail.com
Sat Jun 26 04:30:59 PDT 2010
Author: d0k
Date: Sat Jun 26 06:30:59 2010
New Revision: 106943
URL: http://llvm.org/viewvc/llvm-project?rev=106943&view=rev
Log:
VNInfos don't need to be destructed anymore.
Modified:
llvm/trunk/include/llvm/CodeGen/LiveInterval.h
llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp
llvm/trunk/lib/CodeGen/LiveStackAnalysis.cpp
Modified: llvm/trunk/include/llvm/CodeGen/LiveInterval.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/LiveInterval.h?rev=106943&r1=106942&r2=106943&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/LiveInterval.h (original)
+++ llvm/trunk/include/llvm/CodeGen/LiveInterval.h Sat Jun 26 06:30:59 2010
@@ -67,7 +67,7 @@
} cr;
public:
- typedef SpecificBumpPtrAllocator<VNInfo> Allocator;
+ typedef BumpPtrAllocator Allocator;
/// The ID number of this value.
unsigned id;
@@ -319,8 +319,8 @@
/// the instruction that defines the value number.
VNInfo *getNextValue(SlotIndex def, MachineInstr *CopyMI,
bool isDefAccurate, VNInfo::Allocator &VNInfoAllocator) {
- VNInfo *VNI = VNInfoAllocator.Allocate();
- new (VNI) VNInfo((unsigned)valnos.size(), def, CopyMI);
+ VNInfo *VNI =
+ new (VNInfoAllocator) VNInfo((unsigned)valnos.size(), def, CopyMI);
VNI->setIsDefAccurate(isDefAccurate);
valnos.push_back(VNI);
return VNI;
@@ -330,8 +330,8 @@
/// for the Value number.
VNInfo *createValueCopy(const VNInfo *orig,
VNInfo::Allocator &VNInfoAllocator) {
- VNInfo *VNI = VNInfoAllocator.Allocate();
- new (VNI) VNInfo((unsigned)valnos.size(), *orig);
+ VNInfo *VNI =
+ new (VNInfoAllocator) VNInfo((unsigned)valnos.size(), *orig);
valnos.push_back(VNI);
return VNI;
}
Modified: llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp?rev=106943&r1=106942&r2=106943&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp (original)
+++ llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp Sat Jun 26 06:30:59 2010
@@ -87,8 +87,8 @@
r2iMap_.clear();
- // Release VNInfo memroy regions after all VNInfo objects are dtor'd.
- VNInfoAllocator.DestroyAll();
+ // Release VNInfo memory regions, VNInfo objects don't need to be dtor'd.
+ VNInfoAllocator.Reset();
while (!CloneMIs.empty()) {
MachineInstr *MI = CloneMIs.back();
CloneMIs.pop_back();
Modified: llvm/trunk/lib/CodeGen/LiveStackAnalysis.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LiveStackAnalysis.cpp?rev=106943&r1=106942&r2=106943&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/LiveStackAnalysis.cpp (original)
+++ llvm/trunk/lib/CodeGen/LiveStackAnalysis.cpp Sat Jun 26 06:30:59 2010
@@ -35,8 +35,8 @@
}
void LiveStacks::releaseMemory() {
- // Release VNInfo memroy regions after all VNInfo objects are dtor'd.
- VNInfoAllocator.DestroyAll();
+ // Release VNInfo memory regions, VNInfo objects don't need to be dtor'd.
+ VNInfoAllocator.Reset();
S2IMap.clear();
S2RCMap.clear();
}
More information about the llvm-commits
mailing list