From 171eed533408a23de0b141af17475fd6b4da72e0 Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Tue, 27 Feb 2007 21:08:07 +0000 Subject: [PATCH] Let MRegisterInfo owns RegScavenger. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34689 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Target/MRegisterInfo.h | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/include/llvm/Target/MRegisterInfo.h b/include/llvm/Target/MRegisterInfo.h index 96bd0e9cdcd..dd666a31a00 100644 --- a/include/llvm/Target/MRegisterInfo.h +++ b/include/llvm/Target/MRegisterInfo.h @@ -23,14 +23,15 @@ namespace llvm { -class Type; +class BitVector; +class CalleeSavedInfo; class MachineFunction; class MachineInstr; class MachineLocation; class MachineMove; +class RegScavenger; class TargetRegisterClass; -class CalleeSavedInfo; -class BitVector; +class Type; /// TargetRegisterDesc - This record contains all of the information known about /// a particular register. The AliasSet field (if not null) contains a pointer @@ -213,6 +214,12 @@ protected: virtual ~MRegisterInfo(); public: + /// getRegScavenger - Returns pointer to an instance of register scavenger it + /// the specific target is making use of one. + virtual RegScavenger *getRegScavenger() const { + return NULL; + } + enum { // Define some target independent constants /// NoRegister - This physical register is not a real target register. It /// is useful as a sentinal. @@ -391,12 +398,6 @@ public: return false; } - /// requiresRegisterScavenging - returns true if the target requires (and - /// can make use of) the register scavenger. - virtual bool requiresRegisterScavenging() const { - return false; - } - /// hasFP - Return true if the specified function should have a dedicated frame /// pointer register. For most targets this is true only if the function has /// variable sized allocas or if frame pointer elimination is disabled.