49 if (!
O->isDef() ||
O->isDebug())
51 unsigned Reg =
O->getReg();
55 }
else if (
O->isRegMask())
61 if (!
O->isReg() || !
O->readsReg() ||
O->isDebug())
63 unsigned Reg =
O->getReg();
74 unsigned Reg =
O->getReg();
77 if (!
O->isDef() && !
O->readsReg())
80 }
else if (
O->isRegMask())
88 for (
const auto &LI : MBB.
liveins())
bool isCalleeSavedInfoValid() const
Has the callee saved info been calculated yet?
bool empty() const
Returns true if the set is empty.
This class represents lattice values for constants.
static void addBlockLiveIns(LiveRegUnits &LiveUnits, const MachineBasicBlock &MBB)
Add live-in registers of basic block MBB to LiveUnits.
unsigned getNumRegUnits() const
Return the number of (native) register units in the target.
const BitVector & getBitVector() const
Return the internal bitvector representation of the set.
iterator_range< succ_iterator > successors()
bool isReturnBlock() const
Convenience function that returns true if the block ends in a return instruction. ...
void addLiveOuts(const MachineBasicBlock &MBB)
Adds registers living out of block MBB.
void addRegsInMask(const uint32_t *RegMask)
Adds register units not preserved by the regmask RegMask.
The MachineFrameInfo class represents an abstract stack frame until prolog/epilog code is inserted...
void addLiveIns(const MachineBasicBlock &MBB)
Adds registers living into block MBB.
MCRegUnitRootIterator enumerates the root registers of a register unit.
static void addCalleeSavedRegs(LiveRegUnits &LiveUnits, const MachineFunction &MF)
Adds all callee saved registers to LiveUnits.
Analysis containing CSE Info
uint16_t MCPhysReg
An unsigned integer type large enough to represent all physical registers, but not necessarily virtua...
void addRegMasked(MCPhysReg Reg, LaneBitmask Mask)
Adds register units covered by physical register Reg that are part of the lanemask Mask...
void removeReg(MCPhysReg Reg)
Removes all register units covered by physical register Reg.
unsigned const MachineRegisterInfo * MRI
MachineFrameInfo & getFrameInfo()
getFrameInfo - Return the frame info object for the current function.
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
void stepBackward(const MachineInstr &MI)
Updates liveness when stepping backwards over the instruction MI.
void addUnits(const BitVector &RegUnits)
Adds all register units marked in the bitvector RegUnits.
ConstMIBundleOperands - Iterate over all operands in a const bundle of machine instructions.
void accumulate(const MachineInstr &MI)
Adds all register units used, defined or clobbered in MI.
The CalleeSavedInfo class tracks the information need to locate where a callee saved register is in t...
static bool clobbersPhysReg(const uint32_t *RegMask, unsigned PhysReg)
clobbersPhysReg - Returns true if this RegMask clobbers PhysReg.
MachineRegisterInfo - Keep track of information for virtual and physical registers, including vreg register classes, use/def chains for registers, etc.
Representation of each machine instruction.
static bool isPhysicalRegister(unsigned Reg)
Return true if the specified register number is in the physical register namespace.
const MachineFunction * getParent() const
Return the MachineFunction containing this basic block.
void addReg(MCPhysReg Reg)
Adds register units covered by physical register Reg.
MachineRegisterInfo & getRegInfo()
getRegInfo - Return information about the registers currently in use.
const std::vector< CalleeSavedInfo > & getCalleeSavedInfo() const
Returns a reference to call saved info vector for the current function.
A set of register units used to track register liveness.
iterator_range< livein_iterator > liveins() const
void removeRegsNotPreserved(const uint32_t *RegMask)
Removes register units not preserved by the regmask RegMask.
const MCPhysReg * getCalleeSavedRegs() const
Returns list of callee saved registers.
bool isValid() const
Check if the iterator is at the end of the list.