From d21968d11a715b60091cc26ffb8f92f7983ae263 Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Wed, 25 Apr 2007 22:10:09 +0000 Subject: Change UsedPhysRegs from array bool to BitVector to save some space. Setting / getting its states now go through MachineFunction. llvm-svn: 36451 --- llvm/lib/CodeGen/MachineFunction.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'llvm/lib/CodeGen/MachineFunction.cpp') diff --git a/llvm/lib/CodeGen/MachineFunction.cpp b/llvm/lib/CodeGen/MachineFunction.cpp index 4453be80c1c..29eee3612f6 100644 --- a/llvm/lib/CodeGen/MachineFunction.cpp +++ b/llvm/lib/CodeGen/MachineFunction.cpp @@ -114,11 +114,12 @@ void ilist_traits::transferNodesFromList( 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 @@ MachineFunction::~MachineFunction() { delete FrameInfo; delete ConstantPool; delete JumpTableInfo; - delete[] UsedPhysRegs; } -- cgit v1.2.3