X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FCodeGen%2FRegAllocBase.h;h=659b8f505a229fd277a69726cd519a64e7f9852b;hb=6de0a12927845ca49cd5cb1da9206fe503b565ec;hp=9c0029837d02d814b2d2c59264cce61c7be7062e;hpb=55c06ae7afa3f862a6bb4a4441fe485c135f5b5e;p=oota-llvm.git diff --git a/lib/CodeGen/RegAllocBase.h b/lib/CodeGen/RegAllocBase.h index 9c0029837d0..659b8f505a2 100644 --- a/lib/CodeGen/RegAllocBase.h +++ b/lib/CodeGen/RegAllocBase.h @@ -34,10 +34,9 @@ // //===----------------------------------------------------------------------===// -#ifndef LLVM_CODEGEN_REGALLOCBASE -#define LLVM_CODEGEN_REGALLOCBASE +#ifndef LLVM_LIB_CODEGEN_REGALLOCBASE_H +#define LLVM_LIB_CODEGEN_REGALLOCBASE_H -#include "llvm/ADT/OwningPtr.h" #include "llvm/CodeGen/LiveInterval.h" #include "llvm/CodeGen/RegisterClassInfo.h" @@ -57,6 +56,7 @@ class Spiller; /// live range splitting. They must also override enqueue/dequeue to provide an /// assignment order. class RegAllocBase { + virtual void anchor(); protected: const TargetRegisterInfo *TRI; MachineRegisterInfo *MRI; @@ -65,7 +65,8 @@ protected: LiveRegMatrix *Matrix; RegisterClassInfo RegClassInfo; - RegAllocBase(): TRI(0), MRI(0), VRM(0), LIS(0), Matrix(0) {} + RegAllocBase() + : TRI(nullptr), MRI(nullptr), VRM(nullptr), LIS(nullptr), Matrix(nullptr) {} virtual ~RegAllocBase() {} @@ -95,6 +96,9 @@ protected: // Use this group name for NamedRegionTimer. static const char TimerGroupName[]; + /// Method called when the allocator is about to remove a LiveInterval. + virtual void aboutToRemoveInterval(LiveInterval &LI) {} + public: /// VerifyEnabled - True when -verify-regalloc is given. static bool VerifyEnabled; @@ -105,4 +109,4 @@ private: } // end namespace llvm -#endif // !defined(LLVM_CODEGEN_REGALLOCBASE) +#endif