- /// TurnCopyIntoImpDef - If source of the specified copy is an implicit def,
- /// turn the copy into an implicit def.
- bool TurnCopyIntoImpDef(MachineBasicBlock::iterator &I,
- MachineBasicBlock *MBB,
- unsigned DstReg, unsigned SrcReg);
-
- /// CanCoalesceWithImpDef - Returns true if the specified copy instruction
- /// from an implicit def to another register can be coalesced away.
- bool CanCoalesceWithImpDef(MachineInstr *CopyMI,
- LiveInterval &li, LiveInterval &ImpLi) const;
-
- /// RemoveCopiesFromValNo - The specified value# is defined by an implicit
- /// def and it is being removed. Turn all copies from this value# into
- /// identity copies so they will be removed.
- void RemoveCopiesFromValNo(LiveInterval &li, VNInfo *VNI);
-
- /// isProfitableToCoalesceToSubRC - Given that register class of DstReg is
- /// a subset of the register class of SrcReg, return true if it's profitable
- /// to coalesce the two registers.
- bool isProfitableToCoalesceToSubRC(unsigned SrcReg, unsigned DstReg,
- MachineBasicBlock *MBB);
-
- /// RangeIsDefinedByCopyFromReg - Return true if the specified live range of
- /// the specified live interval is defined by a copy from the specified
- /// register.
- bool RangeIsDefinedByCopyFromReg(LiveInterval &li, LiveRange *LR,
- unsigned Reg);
-
- /// isBackEdgeCopy - Return true if CopyMI is a back edge copy.
- ///
- bool isBackEdgeCopy(MachineInstr *CopyMI, unsigned DstReg) const;
+ /// shouldJoinPhys - Return true if a physreg copy should be joined.
+ bool shouldJoinPhys(CoalescerPair &CP);
+
+ /// isWinToJoinCrossClass - Return true if it's profitable to coalesce
+ /// two virtual registers from different register classes.
+ bool isWinToJoinCrossClass(unsigned SrcReg,
+ unsigned DstReg,
+ const TargetRegisterClass *SrcRC,
+ const TargetRegisterClass *DstRC,
+ const TargetRegisterClass *NewRC);