15 #ifndef LLVM_LIB_CODEGEN_REGISTERCOALESCER_H 16 #define LLVM_LIB_CODEGEN_REGISTERCOALESCER_H 21 class TargetRegisterClass;
22 class TargetRegisterInfo;
47 bool CrossClass =
false;
65 : TRI(tri), DstReg(PhysReg), SrcReg(VirtReg) {}
80 bool isPhys()
const {
return !NewRC; }
113 #endif // LLVM_LIB_CODEGEN_REGISTERCOALESCER_H This class represents lattice values for constants.
bool isCoalescable(const MachineInstr *) const
Return true if MI is a copy instruction that will become an identity copy after coalescing.
bool isPhys() const
Return true if DstReg is a physical register.
unsigned getDstReg() const
Return the register (virtual or physical) that will remain after coalescing.
bool isPartial() const
Return true if the original copy instruction did not copy the full register, but was a subreg operati...
A helper class for register coalescers.
CoalescerPair(const TargetRegisterInfo &tri)
bool setRegisters(const MachineInstr *)
Set registers to match the copy instruction MI.
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.
unsigned getSrcReg() const
Return the virtual register that will be coalesced away.
TargetRegisterInfo base class - We assume that the target defines a static array of TargetRegisterDes...
unsigned getSrcIdx() const
Return the subregister index that SrcReg will be coalesced into, or 0.
unsigned getDstIdx() const
Return the subregister index that DstReg 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.
const TargetRegisterClass * getNewRC() const
Return the register class of the coalesced register.