mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-22 13:29:44 +00:00
VNInfos don't need to be destructed anymore.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106943 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
fc91e7d9cb
commit
ce9a20b808
@ -67,7 +67,7 @@ namespace llvm {
|
|||||||
} cr;
|
} cr;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typedef SpecificBumpPtrAllocator<VNInfo> Allocator;
|
typedef BumpPtrAllocator Allocator;
|
||||||
|
|
||||||
/// The ID number of this value.
|
/// The ID number of this value.
|
||||||
unsigned id;
|
unsigned id;
|
||||||
@ -319,8 +319,8 @@ namespace llvm {
|
|||||||
/// the instruction that defines the value number.
|
/// the instruction that defines the value number.
|
||||||
VNInfo *getNextValue(SlotIndex def, MachineInstr *CopyMI,
|
VNInfo *getNextValue(SlotIndex def, MachineInstr *CopyMI,
|
||||||
bool isDefAccurate, VNInfo::Allocator &VNInfoAllocator) {
|
bool isDefAccurate, VNInfo::Allocator &VNInfoAllocator) {
|
||||||
VNInfo *VNI = VNInfoAllocator.Allocate();
|
VNInfo *VNI =
|
||||||
new (VNI) VNInfo((unsigned)valnos.size(), def, CopyMI);
|
new (VNInfoAllocator) VNInfo((unsigned)valnos.size(), def, CopyMI);
|
||||||
VNI->setIsDefAccurate(isDefAccurate);
|
VNI->setIsDefAccurate(isDefAccurate);
|
||||||
valnos.push_back(VNI);
|
valnos.push_back(VNI);
|
||||||
return VNI;
|
return VNI;
|
||||||
@ -330,8 +330,8 @@ namespace llvm {
|
|||||||
/// for the Value number.
|
/// for the Value number.
|
||||||
VNInfo *createValueCopy(const VNInfo *orig,
|
VNInfo *createValueCopy(const VNInfo *orig,
|
||||||
VNInfo::Allocator &VNInfoAllocator) {
|
VNInfo::Allocator &VNInfoAllocator) {
|
||||||
VNInfo *VNI = VNInfoAllocator.Allocate();
|
VNInfo *VNI =
|
||||||
new (VNI) VNInfo((unsigned)valnos.size(), *orig);
|
new (VNInfoAllocator) VNInfo((unsigned)valnos.size(), *orig);
|
||||||
valnos.push_back(VNI);
|
valnos.push_back(VNI);
|
||||||
return VNI;
|
return VNI;
|
||||||
}
|
}
|
||||||
|
@ -87,8 +87,8 @@ void LiveIntervals::releaseMemory() {
|
|||||||
|
|
||||||
r2iMap_.clear();
|
r2iMap_.clear();
|
||||||
|
|
||||||
// Release VNInfo memroy regions after all VNInfo objects are dtor'd.
|
// Release VNInfo memory regions, VNInfo objects don't need to be dtor'd.
|
||||||
VNInfoAllocator.DestroyAll();
|
VNInfoAllocator.Reset();
|
||||||
while (!CloneMIs.empty()) {
|
while (!CloneMIs.empty()) {
|
||||||
MachineInstr *MI = CloneMIs.back();
|
MachineInstr *MI = CloneMIs.back();
|
||||||
CloneMIs.pop_back();
|
CloneMIs.pop_back();
|
||||||
|
@ -35,8 +35,8 @@ void LiveStacks::getAnalysisUsage(AnalysisUsage &AU) const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void LiveStacks::releaseMemory() {
|
void LiveStacks::releaseMemory() {
|
||||||
// Release VNInfo memroy regions after all VNInfo objects are dtor'd.
|
// Release VNInfo memory regions, VNInfo objects don't need to be dtor'd.
|
||||||
VNInfoAllocator.DestroyAll();
|
VNInfoAllocator.Reset();
|
||||||
S2IMap.clear();
|
S2IMap.clear();
|
||||||
S2RCMap.clear();
|
S2RCMap.clear();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user