Change UsedPhysRegs from array bool to BitVector to save some space. Setting / getting its states now go through MachineFunction.
llvm-svn: 36451
diff --git a/llvm/lib/CodeGen/MachineFunction.cpp b/llvm/lib/CodeGen/MachineFunction.cpp
index 4453be8..29eee36 100644
--- a/llvm/lib/CodeGen/MachineFunction.cpp
+++ b/llvm/lib/CodeGen/MachineFunction.cpp
@@ -114,11 +114,12 @@
MachineFunction::MachineFunction(const Function *F,
const TargetMachine &TM)
- : Annotation(MF_AID), Fn(F), Target(TM), UsedPhysRegs(0) {
+ : Annotation(MF_AID), Fn(F), Target(TM) {
SSARegMapping = new SSARegMap();
MFInfo = 0;
FrameInfo = new MachineFrameInfo();
ConstantPool = new MachineConstantPool(TM.getTargetData());
+ UsedPhysRegs.resize(TM.getRegisterInfo()->getNumRegs());
// Set up jump table.
const TargetData &TD = *TM.getTargetData();
@@ -138,7 +139,6 @@
delete FrameInfo;
delete ConstantPool;
delete JumpTableInfo;
- delete[] UsedPhysRegs;
}