LLVM: llvm::LiveRangeCalc Class Reference (original) (raw)
#include "[llvm/CodeGen/LiveRangeCalc.h](LiveRangeCalc%5F8h%5Fsource.html)"
| Public Member Functions | |
|---|---|
| LiveRangeCalc ()=default | |
| LLVM_ABI void | reset (const MachineFunction *mf, SlotIndexes *SI, MachineDominatorTree *MDT, VNInfo::Allocator *VNIA) |
| reset - Prepare caches for a new set of non-overlapping live ranges. | |
| LLVM_ABI void | extend (LiveRange &LR, SlotIndex Use, Register 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. | |
| LLVM_ABI void | calculateValues () |
| calculateValues - Calculate the value that will be live-in to each block added with addLiveInBlock. |
| Protected Member Functions | |
|---|---|
| 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 () |
| LLVM_ABI void | resetLiveOutMap () |
| Reset Map and Seen fields. |
Definition at line 46 of file LiveRangeCalc.h.
| llvm::LiveRangeCalc::LiveRangeCalc ( ) | default |
|---|
◆ addLiveInBlock()
addLiveInBlock - Add a block with an unknown live-in value.
This function can only be called once per basic block. Once the live-in value has been determined, calculateValues() will add liveness to LI.
Parameters
| LR | The live range that is live-in to the block. |
|---|---|
| DomNode | The domtree node for the block. |
| Kill | Index in block where LI is killed. If the value is live-through, set Kill = SLotIndex() and also call setLiveOutValue(MBB, 0). |
Definition at line 244 of file LiveRangeCalc.h.
◆ calculateValues()
| void LiveRangeCalc::calculateValues | ( | ) |
|---|
calculateValues - Calculate the value that will be live-in to each block added with addLiveInBlock.
Add PHI-def values as needed to preserve SSA form. Add liveness to all live-in blocks up to the Kill point, or the whole block for live-through blocks.
Every predecessor of a live-in block must have been given a value with setLiveOutValue, the value may be null for live-trough blocks.
Definition at line 113 of file LiveRangeCalc.cpp.
References assert().
Referenced by extend().
◆ extend()
◆ getDomTree()
◆ getIndexes()
| SlotIndexes * llvm::LiveRangeCalc::getIndexes ( ) | inlineprotected |
|---|
◆ getMachineFunction()
◆ getRegInfo()
◆ getVNAlloc()
◆ isJointlyDominated()
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.
This function is mainly for use in self-verification checks.
Definition at line 435 of file LiveRangeCalc.cpp.
References B(), I, llvm::SetVector< T, Vector, Set, N >::insert(), MBB, P, llvm::BitVector::set(), and llvm::SetVector< T, Vector, Set, N >::size().
◆ reset()
◆ resetLiveOutMap()
| void LiveRangeCalc::resetLiveOutMap ( ) | protected |
|---|
◆ setLiveOutValue()
setLiveOutValue - Indicate that VNI is live out from MBB.
The calculateValues() function will not add liveness for MBB, the caller should take care of that.
VNI may be null only if MBB is a live-through block also passed to addLiveInBlock().
Definition at line 230 of file LiveRangeCalc.h.
References MBB.
The documentation for this class was generated from the following files:
- include/llvm/CodeGen/LiveRangeCalc.h
- lib/CodeGen/LiveRangeCalc.cpp