22 #ifndef LLVM_LIB_CODEGEN_LIVERANGECALC_H
23 #define LLVM_LIB_CODEGEN_LIVERANGECALC_H
33 class MachineDominatorTree;
34 template <
class NodeT>
class DomTreeNodeBase;
46 typedef std::pair<VNInfo*, MachineDomTreeNode*> LiveOutPair;
68 std::map<LiveRange*,std::pair<BitVector,BitVector>> EntryInfoMap;
109 : LR(LR), DomNode(node),
Kill(kill),
Value(
nullptr) {}
153 void updateFromLiveIns();
169 void resetLiveOutMap();
173 DomTree(nullptr), Alloc(nullptr) {}
253 Map[
MBB] = LiveOutPair(VNI,
nullptr);
268 LiveIn.
push_back(LiveInBlock(LR, DomNode, Kill));
void push_back(const T &Elt)
void createDeadDefs(LiveRange &LR, unsigned Reg)
createDeadDefs - Create a dead def in LI for every def operand of Reg.
int getNumber() const
MachineBasicBlocks are uniquely numbered at the function level, unless they're not in a MachineFuncti...
void setLiveOutValue(MachineBasicBlock *MBB, VNInfo *VNI)
setLiveOutValue - Indicate that VNI is live out from MBB.
static LaneBitmask getAll()
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.
Reg
All possible values of the reg field in the ModR/M byte.
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.
void reset(const MachineFunction *MF, SlotIndexes *, MachineDominatorTree *, VNInfo::Allocator *)
reset - Prepare caches for a new set of non-overlapping live ranges.
Allocate memory in an ever growing pool, as if by bump-pointer.
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.
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...