22 #ifndef LLVM_LIB_CODEGEN_LIVERANGECALC_H 23 #define LLVM_LIB_CODEGEN_LIVERANGECALC_H 38 template <
class NodeT>
class DomTreeNodeBase;
39 class MachineDominatorTree;
40 class MachineFunction;
41 class MachineRegisterInfo;
54 using LiveOutPair = std::pair<VNInfo *, MachineDomTreeNode *>;
118 : LR(LR), DomNode(node),
Kill(kill) {}
162 void updateFromLiveIns();
178 void resetLiveOutMap();
259 Map[MBB] = LiveOutPair(VNI,
nullptr);
298 #endif // LLVM_LIB_CODEGEN_LIVERANGECALC_H
A common definition of LaneBitmask for use in TableGen and CodeGen.
void createDeadDefs(LiveRange &LR, unsigned Reg)
createDeadDefs - Create a dead def in LI for every def operand of Reg.
This class represents lattice values for constants.
void setLiveOutValue(MachineBasicBlock *MBB, VNInfo *VNI)
setLiveOutValue - Indicate that VNI is live out from MBB.
void push_back(const T &Elt)
LiveInterval - This class represents the liveness of a register, or stack slot.
void constructMainRangeFromSubranges(LiveInterval &LI)
For live interval LI with correct SubRanges construct matching information for the main live range...
VNInfo - Value Number Information.
This class represents the liveness of a register, stack slot, etc.
DomTreeNodeBase< MachineBasicBlock > MachineDomTreeNode
A Use represents the edge between a Value definition and its users.
static constexpr LaneBitmask getAll()
void addLiveInBlock(LiveRange &LR, MachineDomTreeNode *DomNode, SlotIndex Kill=SlotIndex())
addLiveInBlock - Add a block with an unknown live-in value.
Base class for the actual dominator tree node.
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
void extend(LiveRange &LR, SlotIndex Use, unsigned PhysReg, ArrayRef< SlotIndex > Undefs)
Extend the live range of LR to reach Use.
int getNumber() const
MachineBasicBlocks are uniquely numbered at the function level, unless they're not in a MachineFuncti...
Allocate memory in an ever growing pool, as if by bump-pointer.
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 calculate(LiveInterval &LI, bool TrackSubRegs)
Calculates liveness for the register specified in live interval LI.
MachineRegisterInfo - Keep track of information for virtual and physical registers, including vreg register classes, use/def chains for registers, etc.
void extendToUses(LiveRange &LR, unsigned PhysReg)
Extend the live range of LR to reach all uses of Reg.
LLVM Value Representation.
#define LLVM_ATTRIBUTE_UNUSED
SlotIndex - An opaque wrapper around machine indexes.
void calculateValues()
calculateValues - Calculate the value that will be live-in to each block added with addLiveInBlock...
DominatorTree Class - Concrete subclass of DominatorTreeBase that is used to compute a normal dominat...
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 corresp...