15 #ifndef LLVM_LIB_CODEGEN_REGISTERCOALESCER_H
16 #define LLVM_LIB_CODEGEN_REGISTERCOALESCER_H
21 class TargetRegisterInfo;
22 class TargetRegisterClass;
23 class TargetInstrInfo;
61 : TRI(tri), DstReg(0), SrcReg(0), DstIdx(0), SrcIdx(0),
68 : TRI(tri), DstReg(PhysReg), SrcReg(VirtReg), DstIdx(0), SrcIdx(0),
84 bool isPhys()
const {
return !NewRC; }
unsigned getDstReg() const
Return the register (virtual or physical) that will remain after coalescing.
bool isCrossClass() const
Return true if DstReg is virtual and NewRC is a smaller register class than DstReg's.
bool isFlipped() const
Return true when getSrcReg is the register being defined by the original copy instruction.
A helper class for register coalescers.
Function Alias Analysis false
CoalescerPair(const TargetRegisterInfo &tri)
bool setRegisters(const MachineInstr *)
Set registers to match the copy instruction MI.
const TargetRegisterClass * getNewRC() const
Return the register class of the coalesced register.
TargetRegisterInfo base class - We assume that the target defines a static array of TargetRegisterDes...
bool isPhys() const
Return true if DstReg is a physical register.
bool isCoalescable(const MachineInstr *) const
Return true if MI is a copy instruction that will become an identity copy after coalescing.
unsigned getDstIdx() const
Return the subregister index that DstReg will be coalesced into, or 0.
unsigned getSrcIdx() const
Return the subregister index that SrcReg will be coalesced into, or 0.
Representation of each machine instruction.
CoalescerPair(unsigned VirtReg, unsigned PhysReg, const TargetRegisterInfo &tri)
Create a CoalescerPair representing a virtreg-to-physreg copy.
bool flip()
Swap SrcReg and DstReg.
bool isPartial() const
Return true if the original copy instruction did not copy the full register, but was a subreg operati...
unsigned getSrcReg() const
Return the virtual register that will be coalesced away.