LLVM 20.0.0git
|
#include "llvm/CodeGen/LiveIntervalCalc.h"
Public Member Functions | |
LiveIntervalCalc ()=default | |
void | createDeadDefs (LiveRange &LR, Register Reg) |
createDeadDefs - Create a dead def in LI for every def operand of Reg. | |
void | extendToUses (LiveRange &LR, MCRegister PhysReg) |
Extend the live range of LR to reach all uses of Reg. | |
void | calculate (LiveInterval &LI, bool TrackSubRegs) |
Calculates liveness for the register specified in live interval LI . | |
void | constructMainRangeFromSubranges (LiveInterval &LI) |
For live interval LI with correct SubRanges construct matching information for the main live range. | |
Public Member Functions inherited from llvm::LiveRangeCalc | |
LiveRangeCalc ()=default | |
void | reset (const MachineFunction *mf, SlotIndexes *SI, MachineDominatorTree *MDT, VNInfo::Allocator *VNIA) |
reset - Prepare caches for a new set of non-overlapping live ranges. | |
void | extend (LiveRange &LR, SlotIndex Use, unsigned PhysReg, ArrayRef< SlotIndex > Undefs) |
Extend the live range of LR to reach Use . | |
void | setLiveOutValue (MachineBasicBlock *MBB, VNInfo *VNI) |
setLiveOutValue - Indicate that VNI is live out from MBB. | |
void | addLiveInBlock (LiveRange &LR, MachineDomTreeNode *DomNode, SlotIndex Kill=SlotIndex()) |
addLiveInBlock - Add a block with an unknown live-in value. | |
void | calculateValues () |
calculateValues - Calculate the value that will be live-in to each block added with addLiveInBlock. | |
Additional Inherited Members | |
Static Public Member Functions inherited from llvm::LiveRangeCalc | |
static LLVM_ATTRIBUTE_UNUSED bool | isJointlyDominated (const MachineBasicBlock *MBB, ArrayRef< SlotIndex > Defs, const SlotIndexes &Indexes) |
A diagnostic function to check if the end of the block MBB is jointly dominated by the blocks corresponding to the slot indices in Defs . | |
Protected Member Functions inherited from llvm::LiveRangeCalc | |
const MachineFunction * | getMachineFunction () |
Some getters to expose in a read-only way some private fields to subclasses. | |
const MachineRegisterInfo * | getRegInfo () const |
SlotIndexes * | getIndexes () |
MachineDominatorTree * | getDomTree () |
VNInfo::Allocator * | getVNAlloc () |
void | resetLiveOutMap () |
Reset Map and Seen fields. | |
Definition at line 28 of file LiveIntervalCalc.h.
|
default |
void LiveIntervalCalc::calculate | ( | LiveInterval & | LI, |
bool | TrackSubRegs | ||
) |
Calculates liveness for the register specified in live interval LI
.
Creates subregister live ranges as needed if subreg liveness tracking is enabled.
Definition at line 41 of file LiveIntervalCalc.cpp.
References assert(), llvm::LiveRange::clear(), constructMainRangeFromSubranges(), createDeadDef(), llvm::LiveInterval::createSubRangeFrom(), llvm::LiveRange::empty(), llvm::LaneBitmask::getAll(), llvm::LiveRangeCalc::getDomTree(), llvm::LiveRangeCalc::getIndexes(), llvm::LiveRangeCalc::getMachineFunction(), llvm::LiveRangeCalc::getRegInfo(), llvm::LiveRangeCalc::getVNAlloc(), llvm::LiveInterval::hasSubRanges(), MRI, llvm::LiveInterval::refineSubRanges(), llvm::LiveInterval::reg(), llvm::LiveInterval::removeEmptySubRanges(), llvm::LiveRangeCalc::reset(), llvm::LiveRangeCalc::resetLiveOutMap(), llvm::LiveInterval::subranges(), SubReg, and TRI.
void LiveIntervalCalc::constructMainRangeFromSubranges | ( | LiveInterval & | LI | ) |
For live interval LI
with correct SubRanges construct matching information for the main live range.
Expects the main live range to not have any segments or value numbers.
Definition at line 105 of file LiveIntervalCalc.cpp.
References assert(), llvm::LiveRange::createDeadDef(), llvm::VNInfo::def, llvm::SmallVectorBase< Size_T >::empty(), llvm::LaneBitmask::getAll(), llvm::LiveRangeCalc::getVNAlloc(), llvm::VNInfo::isPHIDef(), llvm::VNInfo::isUnused(), llvm::LiveInterval::reg(), llvm::LiveRangeCalc::resetLiveOutMap(), llvm::LiveRange::segments, llvm::LiveInterval::subranges(), and llvm::LiveRange::valnos.
Referenced by calculate().
createDeadDefs - Create a dead def in LI for every def operand of Reg.
Each instruction defining Reg gets a new VNInfo with a corresponding minimal live range.
Definition at line 122 of file LiveIntervalCalc.cpp.
References assert(), createDeadDef(), llvm::LiveRangeCalc::getIndexes(), llvm::LiveRangeCalc::getRegInfo(), llvm::LiveRangeCalc::getVNAlloc(), and MRI.
|
inline |
Extend the live range of LR
to reach all uses of Reg.
All uses must be jointly dominated by existing liveness. PHI-defs are inserted as needed to preserve SSA form.
Definition at line 54 of file LiveIntervalCalc.h.
References llvm::LaneBitmask::getAll().