mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-19 18:24:00 +00:00
LivePhysRegs: Add support to add pristine registers when populating with live-in/live-out registers.
Differential Revision: http://reviews.llvm.org/D10139 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241172 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -116,19 +116,15 @@ public:
|
||||
void stepForward(const MachineInstr &MI,
|
||||
SmallVectorImpl<std::pair<unsigned, const MachineOperand*>> &Clobbers);
|
||||
|
||||
/// \brief Adds all live-in registers of basic block @p MBB.
|
||||
void addLiveIns(const MachineBasicBlock *MBB) {
|
||||
for (MachineBasicBlock::livein_iterator LI = MBB->livein_begin(),
|
||||
LE = MBB->livein_end(); LI != LE; ++LI)
|
||||
addReg(*LI);
|
||||
}
|
||||
/// \brief Adds all live-in registers of basic block @p MBB; After prologue/
|
||||
/// epilogue insertion \p AddPristines should be set to true to insert the
|
||||
/// pristine registers.
|
||||
void addLiveIns(const MachineBasicBlock *MBB, bool AddPristines = false);
|
||||
|
||||
/// \brief Adds all live-out registers of basic block @p MBB.
|
||||
void addLiveOuts(const MachineBasicBlock *MBB) {
|
||||
for (MachineBasicBlock::const_succ_iterator SI = MBB->succ_begin(),
|
||||
SE = MBB->succ_end(); SI != SE; ++SI)
|
||||
addLiveIns(*SI);
|
||||
}
|
||||
/// \brief Adds all live-out registers of basic block @p MBB; After prologue/
|
||||
/// epilogue insertion \p AddPristines should be set to true to insert the
|
||||
/// pristine registers.
|
||||
void addLiveOuts(const MachineBasicBlock *MBB, bool AddPristines = false);
|
||||
|
||||
typedef SparseSet<unsigned>::const_iterator const_iterator;
|
||||
const_iterator begin() const { return LiveRegs.begin(); }
|
||||
|
Reference in New Issue
Block a user