aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen/MachineRegisterInfo.h
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2011-08-09 16:46:27 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2011-08-09 16:46:27 +0000
commit6d1fd0b979cb88809ebb77a24f4da69e1d67606b (patch)
treeca8e4a42c2abc216b48849a0adff87ea35349d6c /include/llvm/CodeGen/MachineRegisterInfo.h
parent719927a68f5b8ca34bacbeb7c970f281e27cbf63 (diff)
Move CalculateRegClass to MRI::recomputeRegClass.
This function doesn't have anything to do with spill weights, and MRI already has functions for manipulating the register class of a virtual register. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137123 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/MachineRegisterInfo.h')
-rw-r--r--include/llvm/CodeGen/MachineRegisterInfo.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/MachineRegisterInfo.h b/include/llvm/CodeGen/MachineRegisterInfo.h
index 6fd983ba50..5eeaa28747 100644
--- a/include/llvm/CodeGen/MachineRegisterInfo.h
+++ b/include/llvm/CodeGen/MachineRegisterInfo.h
@@ -219,9 +219,20 @@ public:
/// Return the new register class, or NULL if no such class exists.
/// This should only be used when the constraint is known to be trivial, like
/// GR32 -> GR32_NOSP. Beware of increasing register pressure.
+ ///
const TargetRegisterClass *constrainRegClass(unsigned Reg,
const TargetRegisterClass *RC);
+ /// recomputeRegClass - Try to find a legal super-class of Reg's register
+ /// class that still satisfies the constraints from the instructions using
+ /// Reg. Returns true if Reg was upgraded.
+ ///
+ /// This method can be used after constraints have been removed from a
+ /// virtual register, for example after removing instructions or splitting
+ /// the live range.
+ ///
+ bool recomputeRegClass(unsigned Reg, const TargetMachine&);
+
/// createVirtualRegister - Create and return a new virtual register in the
/// function with the specified register class.
///