mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-21 03:32:21 +00:00
CodeGen: switch raw array to std::vector
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216355 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
c11cb6914d
commit
c97e8d8ddc
@ -70,7 +70,7 @@ private:
|
||||
|
||||
/// PhysRegUseDefLists - This is an array of the head of the use/def list for
|
||||
/// physical registers.
|
||||
MachineOperand **PhysRegUseDefLists;
|
||||
std::vector<MachineOperand *> PhysRegUseDefLists;
|
||||
|
||||
/// getRegUseDefListHead - Return the head pointer for the register use/def
|
||||
/// list for the specified virtual or physical register.
|
||||
@ -124,7 +124,6 @@ private:
|
||||
void operator=(const MachineRegisterInfo&) LLVM_DELETED_FUNCTION;
|
||||
public:
|
||||
explicit MachineRegisterInfo(const MachineFunction *MF);
|
||||
~MachineRegisterInfo();
|
||||
|
||||
const TargetRegisterInfo *getTargetRegisterInfo() const {
|
||||
return MF->getSubtarget().getRegisterInfo();
|
||||
|
@ -31,14 +31,7 @@ MachineRegisterInfo::MachineRegisterInfo(const MachineFunction *MF)
|
||||
UsedPhysRegMask.resize(getTargetRegisterInfo()->getNumRegs());
|
||||
|
||||
// Create the physreg use/def lists.
|
||||
PhysRegUseDefLists =
|
||||
new MachineOperand*[getTargetRegisterInfo()->getNumRegs()];
|
||||
memset(PhysRegUseDefLists, 0,
|
||||
sizeof(MachineOperand*)*getTargetRegisterInfo()->getNumRegs());
|
||||
}
|
||||
|
||||
MachineRegisterInfo::~MachineRegisterInfo() {
|
||||
delete [] PhysRegUseDefLists;
|
||||
PhysRegUseDefLists.resize(getTargetRegisterInfo()->getNumRegs(), nullptr);
|
||||
}
|
||||
|
||||
/// setRegClass - Set the register class of the specified virtual register.
|
||||
|
Loading…
x
Reference in New Issue
Block a user