23#ifndef LLVM_CODEGEN_LIVERANGECALC_H
24#define LLVM_CODEGEN_LIVERANGECALC_H
38template <
class NodeT>
class DomTreeNodeBase;
39class MachineDominatorTree;
41class MachineRegisterInfo;
54 using LiveOutPair = std::pair<VNInfo *, MachineDomTreeNode *>;
118 : LR(LR), DomNode(node), Kill(kill) {}
161 void updateFromLiveIns();
230 Seen.
set(
MBB->getNumber());
231 Map[
MBB] = LiveOutPair(VNI,
nullptr);
245 LiveIn.
push_back(LiveInBlock(LR, DomNode, Kill));
unsigned const MachineRegisterInfo * MRI
This file implements the BitVector class.
#define LLVM_ATTRIBUTE_UNUSED
This file defines the DenseMap class.
This file implements an indexed map.
This file defines the SmallVector class.
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Allocate memory in an ever growing pool, as if by bump-pointer.
Base class for the actual dominator tree node.
SlotIndexes * getIndexes()
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...
MachineDominatorTree * getDomTree()
void addLiveInBlock(LiveRange &LR, MachineDomTreeNode *DomNode, SlotIndex Kill=SlotIndex())
addLiveInBlock - Add a block with an unknown live-in value.
void resetLiveOutMap()
Reset Map and Seen fields.
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.
const MachineFunction * getMachineFunction()
Some getters to expose in a read-only way some private fields to subclasses.
const MachineRegisterInfo * getRegInfo() const
void extend(LiveRange &LR, SlotIndex Use, unsigned PhysReg, ArrayRef< SlotIndex > Undefs)
Extend the live range of LR to reach Use.
void calculateValues()
calculateValues - Calculate the value that will be live-in to each block added with addLiveInBlock.
void setLiveOutValue(MachineBasicBlock *MBB, VNInfo *VNI)
setLiveOutValue - Indicate that VNI is live out from MBB.
This class represents the liveness of a register, stack slot, etc.
DominatorTree Class - Concrete subclass of DominatorTreeBase that is used to compute a normal dominat...
MachineRegisterInfo - Keep track of information for virtual and physical registers,...
SlotIndex - An opaque wrapper around machine indexes.
void push_back(const T &Elt)
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
A Use represents the edge between a Value definition and its users.
VNInfo - Value Number Information.
LLVM Value Representation.
This is an optimization pass for GlobalISel generic memory operations.
DomTreeNodeBase< MachineBasicBlock > MachineDomTreeNode