LLVM  12.0.0git
Public Member Functions | List of all members
llvm::LiveIntervalCalc Class Reference

#include "llvm/CodeGen/LiveIntervalCalc.h"

Inheritance diagram for llvm::LiveIntervalCalc:
Inheritance graph
[legend]
Collaboration diagram for llvm::LiveIntervalCalc:
Collaboration graph
[legend]

Public Member Functions

 LiveIntervalCalc ()=default
 
void createDeadDefs (LiveRange &LR, Register Reg)
 createDeadDefs - Create a dead def in LI for every def operand of Reg. More...
 
void extendToUses (LiveRange &LR, MCRegister PhysReg)
 Extend the live range of LR to reach all uses of Reg. More...
 
void calculate (LiveInterval &LI, bool TrackSubRegs)
 Calculates liveness for the register specified in live interval LI. More...
 
void constructMainRangeFromSubranges (LiveInterval &LI)
 For live interval LI with correct SubRanges construct matching information for the main live range. More...
 
- Public Member Functions inherited from llvm::LiveRangeCalc
 LiveRangeCalc ()=default
 
void reset (const MachineFunction *mf, SlotIndexes *SI, MachineDominatorTree *MDT, VNInfo::Allocator *VNIA)
 reset - Prepare caches for a new set of non-overlapping live ranges. More...
 
void extend (LiveRange &LR, SlotIndex Use, unsigned PhysReg, ArrayRef< SlotIndex > Undefs)
 Extend the live range of LR to reach Use. More...
 
void setLiveOutValue (MachineBasicBlock *MBB, VNInfo *VNI)
 setLiveOutValue - Indicate that VNI is live out from MBB. More...
 
void addLiveInBlock (LiveRange &LR, MachineDomTreeNode *DomNode, SlotIndex Kill=SlotIndex())
 addLiveInBlock - Add a block with an unknown live-in value. More...
 
void calculateValues ()
 calculateValues - Calculate the value that will be live-in to each block added with addLiveInBlock. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from llvm::LiveRangeCalc
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 corresponding to the slot indices in Defs. More...
 
- Protected Member Functions inherited from llvm::LiveRangeCalc
const MachineFunctiongetMachineFunction ()
 Some getters to expose in a read-only way some private fields to subclasses. More...
 
const MachineRegisterInfogetRegInfo () const
 
SlotIndexesgetIndexes ()
 
MachineDominatorTreegetDomTree ()
 
VNInfo::AllocatorgetVNAlloc ()
 
void resetLiveOutMap ()
 Reset Map and Seen fields. More...
 

Detailed Description

Definition at line 28 of file LiveIntervalCalc.h.

Constructor & Destructor Documentation

◆ LiveIntervalCalc()

llvm::LiveIntervalCalc::LiveIntervalCalc ( )
default

Member Function Documentation

◆ calculate()

void LiveIntervalCalc::calculate ( LiveInterval LI,
bool  TrackSubRegs 
)

◆ constructMainRangeFromSubranges()

void LiveIntervalCalc::constructMainRangeFromSubranges ( LiveInterval LI)

◆ createDeadDefs()

void LiveIntervalCalc::createDeadDefs ( LiveRange LR,
Register  Reg 
)

createDeadDefs - Create a dead def in LI for every def operand of Reg.

Each instruction defining Reg gets a new VNInfo with a corresponding minimal live range.

Definition at line 133 of file LiveIntervalCalc.cpp.

References assert(), createDeadDef(), llvm::LiveRangeCalc::getIndexes(), llvm::LiveRangeCalc::getRegInfo(), llvm::LiveRangeCalc::getVNAlloc(), MRI, and Reg.

◆ extendToUses()

void llvm::LiveIntervalCalc::extendToUses ( LiveRange LR,
MCRegister  PhysReg 
)
inline

Extend the live range of LR to reach all uses of Reg.

All uses must be jointly dominated by existing liveness. PHI-defs are inserted as needed to preserve SSA form.

Definition at line 54 of file LiveIntervalCalc.h.

References llvm::LaneBitmask::getAll().


The documentation for this class was generated from the following files: