diff options
Diffstat (limited to 'llvm/lib/CodeGen/RegAllocBase.h')
-rw-r--r-- | llvm/lib/CodeGen/RegAllocBase.h | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/llvm/lib/CodeGen/RegAllocBase.h b/llvm/lib/CodeGen/RegAllocBase.h index d8921b5ce6d..686ffc36e04 100644 --- a/llvm/lib/CodeGen/RegAllocBase.h +++ b/llvm/lib/CodeGen/RegAllocBase.h @@ -1,4 +1,4 @@ -//===-- RegAllocBase.h - basic regalloc interface and driver --*- C++ -*---===// +//===- RegAllocBase.h - basic regalloc interface and driver -----*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -37,17 +37,20 @@ #ifndef LLVM_LIB_CODEGEN_REGALLOCBASE_H #define LLVM_LIB_CODEGEN_REGALLOCBASE_H -#include "llvm/CodeGen/LiveInterval.h" +#include "llvm/ADT/SmallPtrSet.h" #include "llvm/CodeGen/RegisterClassInfo.h" namespace llvm { -template<typename T> class SmallVectorImpl; -class TargetRegisterInfo; -class VirtRegMap; +class LiveInterval; class LiveIntervals; class LiveRegMatrix; +class MachineInstr; +class MachineRegisterInfo; +template<typename T> class SmallVectorImpl; class Spiller; +class TargetRegisterInfo; +class VirtRegMap; /// RegAllocBase provides the register allocation driver and interface that can /// be extended to add interesting heuristics. @@ -57,12 +60,13 @@ class Spiller; /// assignment order. class RegAllocBase { virtual void anchor(); + protected: - const TargetRegisterInfo *TRI; - MachineRegisterInfo *MRI; - VirtRegMap *VRM; - LiveIntervals *LIS; - LiveRegMatrix *Matrix; + const TargetRegisterInfo *TRI = nullptr; + MachineRegisterInfo *MRI = nullptr; + VirtRegMap *VRM = nullptr; + LiveIntervals *LIS = nullptr; + LiveRegMatrix *Matrix = nullptr; RegisterClassInfo RegClassInfo; /// Inst which is a def of an original reg and whose defs are already all @@ -71,10 +75,8 @@ protected: /// always available for the remat of all the siblings of the original reg. SmallPtrSet<MachineInstr *, 32> DeadRemats; - RegAllocBase() - : TRI(nullptr), MRI(nullptr), VRM(nullptr), LIS(nullptr), Matrix(nullptr) {} - - virtual ~RegAllocBase() {} + RegAllocBase() = default; + virtual ~RegAllocBase() = default; // A RegAlloc pass should call this before allocatePhysRegs. void init(VirtRegMap &vrm, LiveIntervals &lis, LiveRegMatrix &mat); @@ -120,4 +122,4 @@ private: } // end namespace llvm -#endif +#endif // LLVM_LIB_CODEGEN_REGALLOCBASE_H |