23 #ifndef LLVM_LIB_CODEGEN_LIVERANGECALC_H 24 #define LLVM_LIB_CODEGEN_LIVERANGECALC_H 39 template <
class NodeT>
class DomTreeNodeBase;
40 class MachineDominatorTree;
41 class MachineFunction;
42 class MachineRegisterInfo;
55 using LiveOutPair = std::pair<VNInfo *, MachineDomTreeNode *>;
119 : LR(LR), DomNode(node),
Kill(kill) {}
162 void updateFromLiveIns();
231 Seen.
set(
MBB->getNumber());
232 Map[
MBB] = LiveOutPair(VNI,
nullptr);
270 #endif // LLVM_LIB_CODEGEN_LIVERANGECALC_H
A common definition of LaneBitmask for use in TableGen and CodeGen.
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)
VNInfo - Value Number Information.
The last use of a register.
This class represents the liveness of a register, stack slot, etc.
void resetLiveOutMap()
Reset Map and Seen fields.
DomTreeNodeBase< MachineBasicBlock > MachineDomTreeNode
A Use represents the edge between a Value definition and its users.
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.
unsigned const MachineRegisterInfo * MRI
Allocate memory in an ever growing pool, as if by bump-pointer.
#define LLVM_ATTRIBUTE_UNUSED
SlotIndexes * getIndexes()
const MachineFunction * getMachineFunction()
Some getters to expose in a read-only way some private fields to subclasses.
VNInfo::Allocator * getVNAlloc()
void reset(const MachineFunction *mf, SlotIndexes *SI, MachineDominatorTree *MDT, VNInfo::Allocator *VNIA)
reset - Prepare caches for a new set of non-overlapping live ranges.
MachineDominatorTree * getDomTree()
MachineRegisterInfo - Keep track of information for virtual and physical registers,...
const MachineRegisterInfo * getRegInfo() const
LLVM Value Representation.
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...