aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2007-09-26 21:31:07 +0000
committerEvan Cheng <evan.cheng@apple.com>2007-09-26 21:31:07 +0000
commitff110265753c19daf0468ee1facf357460497b7e (patch)
treec5bbe8a4aa494a3f681eff1fdc9ad0db00b88a14 /include
parentbf4f89dc000c37caba7d55682d4eecddffa60505 (diff)
downloadexternal_llvm-ff110265753c19daf0468ee1facf357460497b7e.zip
external_llvm-ff110265753c19daf0468ee1facf357460497b7e.tar.gz
external_llvm-ff110265753c19daf0468ee1facf357460497b7e.tar.bz2
- Added MRegisterInfo::getCrossCopyRegClass() hook. For register classes where reg to reg copies are not possible, this returns another register class which registers in the specified register class can be copied to (and copy back from).
- X86 copyRegToReg() now supports copying between EFLAGS and GR32 / GR64 registers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42372 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Target/MRegisterInfo.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/llvm/Target/MRegisterInfo.h b/include/llvm/Target/MRegisterInfo.h
index 14ed694..bc58080 100644
--- a/include/llvm/Target/MRegisterInfo.h
+++ b/include/llvm/Target/MRegisterInfo.h
@@ -315,6 +315,11 @@ public:
return Reg >= FirstVirtualRegister;
}
+ /// getPhysicalRegisterRegClass - Returns the Register Class of a physical
+ /// register of the given type.
+ const TargetRegisterClass *getPhysicalRegisterRegClass(MVT::ValueType VT,
+ unsigned Reg) const;
+
/// getAllocatableSet - Returns a bitset indexed by register number
/// indicating if a register is allocatable or not. If a register class is
/// specified, returns the subset for the class.
@@ -509,6 +514,14 @@ public:
const TargetRegisterClass *DestRC,
const TargetRegisterClass *SrcRC) const = 0;
+ /// getCrossCopyRegClass - Returns a legal register class to copy a register
+ /// in the specified class to or from. Returns NULL if it is possible to copy
+ /// between a two registers of the specified class.
+ virtual const TargetRegisterClass *
+ getCrossCopyRegClass(const TargetRegisterClass *RC) const {
+ return NULL;
+ }
+
/// reMaterialize - Re-issue the specified 'original' instruction at the
/// specific location targeting a new destination register.
virtual void reMaterialize(MachineBasicBlock &MBB,