mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-23 22:23:00 +00:00
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
This commit is contained in:
@@ -49,11 +49,6 @@ namespace llvm {
|
||||
const MachineLoopInfo &loops) :
|
||||
MF(mf), LIS(lis), Loops(loops) {}
|
||||
|
||||
/// CalculateRegClass - recompute the register class for reg from its uses.
|
||||
/// Since the register class can affect the allocation hint, this function
|
||||
/// should be called before CalculateWeightAndHint if both are called.
|
||||
void CalculateRegClass(unsigned reg);
|
||||
|
||||
/// CalculateWeightAndHint - (re)compute li's spill weight and allocation
|
||||
/// hint.
|
||||
void CalculateWeightAndHint(LiveInterval &li);
|
||||
|
||||
@@ -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.
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user