[llvm-commits] [llvm] r74147 - /llvm/trunk/lib/CodeGen/MachineFunction.cpp
Bill Wendling
isanbard at gmail.com
Wed Jun 24 17:32:48 PDT 2009
Author: void
Date: Wed Jun 24 19:32:48 2009
New Revision: 74147
URL: http://llvm.org/viewvc/llvm-project?rev=74147&view=rev
Log:
My guess is that RegInfo should only call the Allocator.Deallocator if it's not
null.
Modified:
llvm/trunk/lib/CodeGen/MachineFunction.cpp
Modified: llvm/trunk/lib/CodeGen/MachineFunction.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineFunction.cpp?rev=74147&r1=74146&r2=74147&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MachineFunction.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineFunction.cpp Wed Jun 24 19:32:48 2009
@@ -124,25 +124,28 @@
MachineFrameInfo(*TM.getFrameInfo());
ConstantPool = new (Allocator.Allocate<MachineConstantPool>())
MachineConstantPool(TM.getTargetData());
-
+
// Set up jump table.
const TargetData &TD = *TM.getTargetData();
bool IsPic = TM.getRelocationModel() == Reloc::PIC_;
unsigned EntrySize = IsPic ? 4 : TD.getPointerSize();
- unsigned Alignment = IsPic ? TD.getABITypeAlignment(Type::Int32Ty)
- : TD.getPointerABIAlignment();
+ unsigned TyAlignment = IsPic ? TD.getABITypeAlignment(Type::Int32Ty)
+ : TD.getPointerABIAlignment();
JumpTableInfo = new (Allocator.Allocate<MachineJumpTableInfo>())
- MachineJumpTableInfo(EntrySize, Alignment);
+ MachineJumpTableInfo(EntrySize, TyAlignment);
}
MachineFunction::~MachineFunction() {
BasicBlocks.clear();
InstructionRecycler.clear(Allocator);
BasicBlockRecycler.clear(Allocator);
- if (RegInfo)
- RegInfo->~MachineRegisterInfo(); Allocator.Deallocate(RegInfo);
+ if (RegInfo) {
+ RegInfo->~MachineRegisterInfo();
+ Allocator.Deallocate(RegInfo);
+ }
if (MFInfo) {
- MFInfo->~MachineFunctionInfo(); Allocator.Deallocate(MFInfo);
+ MFInfo->~MachineFunctionInfo();
+ Allocator.Deallocate(MFInfo);
}
FrameInfo->~MachineFrameInfo(); Allocator.Deallocate(FrameInfo);
ConstantPool->~MachineConstantPool(); Allocator.Deallocate(ConstantPool);
More information about the llvm-commits
mailing list