- // Array of LiveIntervalUnions indexed by physical register.
- class LIUArray {
- unsigned nRegs_;
- OwningArrayPtr<LiveIntervalUnion> array_;
- public:
- LIUArray(): nRegs_(0) {}
-
- unsigned numRegs() const { return nRegs_; }
-
- void init(unsigned nRegs);
-
- void clear();
-
- LiveIntervalUnion& operator[](unsigned physReg) {
- assert(physReg < nRegs_ && "physReg out of bounds");
- return array_[physReg];
- }
- };
-
- const TargetRegisterInfo *tri_;
- VirtRegMap *vrm_;
- LiveIntervals *lis_;
- LIUArray physReg2liu_;
-
- // Current queries, one per physreg. They must be reinitialized each time we
- // query on a new live virtual register.
- OwningArrayPtr<LiveIntervalUnion::Query> queries_;
-
- RegAllocBase(): tri_(0), vrm_(0), lis_(0) {}
+ const TargetRegisterInfo *TRI;
+ MachineRegisterInfo *MRI;
+ VirtRegMap *VRM;
+ LiveIntervals *LIS;
+ LiveRegMatrix *Matrix;
+ RegisterClassInfo RegClassInfo;
+
+ RegAllocBase()
+ : TRI(nullptr), MRI(nullptr), VRM(nullptr), LIS(nullptr), Matrix(nullptr) {}