class LiveIntervals
Declaration
class LiveIntervals : public MachineFunctionPass { /* full declaration omitted */ };
Description
MachineFunctionPass - This class adapts the FunctionPass interface to allow convenient creation of passes that operate on the MachineFunction representation. Instead of overriding runOnFunction, subclasses override runOnMachineFunction.
Declared at: llvm/include/llvm/CodeGen/LiveIntervals.h:54
Inherits from: MachineFunctionPass
Member Variables
- public static char ID
Method Overview
- public llvm::SlotIndex InsertMachineInstrInMaps(llvm::MachineInstr & MI)
- public void InsertMachineInstrRangeInMaps(MachineBasicBlock::iterator B, MachineBasicBlock::iterator E)
- public LiveIntervals()
- public void RemoveMachineInstrFromMaps(llvm::MachineInstr & MI)
- public llvm::SlotIndex ReplaceMachineInstrInMaps(llvm::MachineInstr & MI, llvm::MachineInstr & NewMI)
- public void addKillFlags(const llvm::VirtRegMap *)
- public LiveInterval::Segment addSegmentToEndOfBlock(unsigned int reg, llvm::MachineInstr & startInst)
- public bool checkRegMaskInterference(llvm::LiveInterval & LI, llvm::BitVector & UsableRegs)
- public void constructMainRangeFromSubranges(llvm::LiveInterval & LI)
- public llvm::LiveInterval & createAndComputeVirtRegInterval(llvm::Register Reg)
- public llvm::LiveInterval & createEmptyInterval(llvm::Register Reg)
- public void extendToIndices(llvm::LiveRange & LR, ArrayRef<llvm::SlotIndex> Indices, ArrayRef<llvm::SlotIndex> Undefs)
- public void extendToIndices(llvm::LiveRange & LR, ArrayRef<llvm::SlotIndex> Indices)
- public llvm::AliasAnalysis * getAliasAnalysis() const
- public void getAnalysisUsage(llvm::AnalysisUsage & AU) const
- public const llvm::LiveRange * getCachedRegUnit(unsigned int Unit) const
- public llvm::LiveRange * getCachedRegUnit(unsigned int Unit)
- public llvm::MachineInstr * getInstructionFromIndex(llvm::SlotIndex index) const
- public llvm::SlotIndex getInstructionIndex(const llvm::MachineInstr & Instr) const
- public llvm::LiveInterval & getInterval(llvm::Register Reg)
- public const llvm::LiveInterval & getInterval(llvm::Register Reg) const
- public llvm::SlotIndex getMBBEndIdx(const llvm::MachineBasicBlock * mbb) const
- public llvm::MachineBasicBlock * getMBBFromIndex(llvm::SlotIndex index) const
- public llvm::SlotIndex getMBBStartIdx(const llvm::MachineBasicBlock * mbb) const
- public ArrayRef<const uint32_t *> getRegMaskBits() const
- public ArrayRef<const uint32_t *> getRegMaskBitsInBlock(unsigned int MBBNum) const
- public ArrayRef<llvm::SlotIndex> getRegMaskSlots() const
- public ArrayRef<llvm::SlotIndex> getRegMaskSlotsInBlock(unsigned int MBBNum) const
- public llvm::LiveRange & getRegUnit(unsigned int Unit)
- public llvm::SlotIndexes * getSlotIndexes() const
- public static float getSpillWeight(bool isDef, bool isUse, const llvm::MachineBlockFrequencyInfo * MBFI, const llvm::MachineInstr & MI)
- public static float getSpillWeight(bool isDef, bool isUse, const llvm::MachineBlockFrequencyInfo * MBFI, const llvm::MachineBasicBlock * MBB)
- public VNInfo::Allocator & getVNInfoAllocator()
- public void handleMove(llvm::MachineInstr & MI, bool UpdateFlags = false)
- public void handleMoveIntoBundle(llvm::MachineInstr & MI, llvm::MachineInstr & BundleStart, bool UpdateFlags = false)
- public bool hasInterval(llvm::Register Reg) const
- public bool hasPHIKill(const llvm::LiveInterval & LI, const llvm::VNInfo * VNI) const
- public void insertMBBInMaps(llvm::MachineBasicBlock * MBB)
- public llvm::MachineBasicBlock * intervalIsInOneMBB(const llvm::LiveInterval & LI) const
- public bool isLiveInToMBB(const llvm::LiveRange & LR, const llvm::MachineBasicBlock * mbb) const
- public bool isLiveOutOfMBB(const llvm::LiveRange & LR, const llvm::MachineBasicBlock * mbb) const
- public bool isNotInMIMap(const llvm::MachineInstr & Instr) const
- public void print(llvm::raw_ostream & O, const llvm::Module * = nullptr) const
- public void pruneValue(llvm::LiveInterval &, llvm::SlotIndex, SmallVectorImpl<llvm::SlotIndex> *)
- public void pruneValue(llvm::LiveRange & LR, llvm::SlotIndex Kill, SmallVectorImpl<llvm::SlotIndex> * EndPoints)
- public void releaseMemory()
- public void removeAllRegUnitsForPhysReg(unsigned int Reg)
- public void removeInterval(unsigned int Reg)
- public void removePhysRegDefAt(unsigned int Reg, llvm::SlotIndex Pos)
- public void removeRegUnit(unsigned int Unit)
- public void removeVRegDefAt(llvm::LiveInterval & LI, llvm::SlotIndex Pos)
- public void repairIntervalsInRange(llvm::MachineBasicBlock * MBB, MachineBasicBlock::iterator Begin, MachineBasicBlock::iterator End, ArrayRef<unsigned int> OrigRegs)
- public bool runOnMachineFunction(llvm::MachineFunction &)
- public bool shrinkToUses(llvm::LiveInterval * li, SmallVectorImpl<llvm::MachineInstr *> * dead = nullptr)
- public void shrinkToUses(LiveInterval::SubRange & SR, unsigned int Reg)
- public void splitSeparateComponents(llvm::LiveInterval & LI, SmallVectorImpl<llvm::LiveInterval *> & SplitLIs)
- public ~LiveIntervals()
Inherited from MachineFunctionPass:
- public doInitialization
- protected getAnalysisUsage
- protected getClearedProperties
- protected getRequiredProperties
- protected getSetProperties
- protected runOnMachineFunction
Inherited from FunctionPass:
- public assignPassManager
- public createPrinterPass
- public getPotentialPassManagerType
- public runOnFunction
- protected skipFunction
Inherited from Pass:
- public assignPassManager
- public createPass
- public createPrinterPass
- public doFinalization
- public doInitialization
- public dump
- public dumpPassStructure
- public getAdjustedAnalysisPointer
- public getAnalysis
- public getAnalysis
- public getAnalysisID
- public getAnalysisID
- public getAnalysisIfAvailable
- public getAnalysisUsage
- public getAsImmutablePass
- public getAsPMDataManager
- public getPassID
- public getPassKind
- public getPassName
- public getPotentialPassManagerType
- public getResolver
- public lookupPassInfo
- public lookupPassInfo
- public mustPreserveAnalysisID
- public preparePassManager
- public print
- public releaseMemory
- public setResolver
- public verifyAnalysis
Methods
¶llvm::SlotIndex InsertMachineInstrInMaps(
llvm::MachineInstr& MI)
llvm::SlotIndex InsertMachineInstrInMaps(
llvm::MachineInstr& MI)
Declared at: llvm/include/llvm/CodeGen/LiveIntervals.h:266
Parameters
¶void InsertMachineInstrRangeInMaps(
MachineBasicBlock::iterator B,
MachineBasicBlock::iterator E)
void InsertMachineInstrRangeInMaps(
MachineBasicBlock::iterator B,
MachineBasicBlock::iterator E)
Declared at: llvm/include/llvm/CodeGen/LiveIntervals.h:270
Parameters
¶LiveIntervals()
LiveIntervals()
Declared at: llvm/include/llvm/CodeGen/LiveIntervals.h:101
¶void RemoveMachineInstrFromMaps(
llvm::MachineInstr& MI)
void RemoveMachineInstrFromMaps(
llvm::MachineInstr& MI)
Declared at: llvm/include/llvm/CodeGen/LiveIntervals.h:276
Parameters
¶llvm::SlotIndex ReplaceMachineInstrInMaps(
llvm::MachineInstr& MI,
llvm::MachineInstr& NewMI)
llvm::SlotIndex ReplaceMachineInstrInMaps(
llvm::MachineInstr& MI,
llvm::MachineInstr& NewMI)
Declared at: llvm/include/llvm/CodeGen/LiveIntervals.h:280
Parameters
- llvm::MachineInstr& MI
- llvm::MachineInstr& NewMI
¶void addKillFlags(const llvm::VirtRegMap*)
void addKillFlags(const llvm::VirtRegMap*)
Description
Add kill flags to any instruction that kills a virtual register.
Declared at: llvm/include/llvm/CodeGen/LiveIntervals.h:304
Parameters
- const llvm::VirtRegMap*
¶LiveInterval::Segment addSegmentToEndOfBlock(
unsigned int reg,
llvm::MachineInstr& startInst)
LiveInterval::Segment addSegmentToEndOfBlock(
unsigned int reg,
llvm::MachineInstr& startInst)
Description
Given a register and an instruction, adds a live segment from that instruction to the end of its MBB.
Declared at: llvm/include/llvm/CodeGen/LiveIntervals.h:152
Parameters
- unsigned int reg
- llvm::MachineInstr& startInst
¶bool checkRegMaskInterference(
llvm::LiveInterval& LI,
llvm::BitVector& UsableRegs)
bool checkRegMaskInterference(
llvm::LiveInterval& LI,
llvm::BitVector& UsableRegs)
Description
Test if \p LI is live across any register mask instructions, and compute a bit mask of physical registers that are not clobbered by any of them. Returns false if \p LI doesn't cross any register mask instructions. In that case, the bit vector is not filled in.
Declared at: llvm/include/llvm/CodeGen/LiveIntervals.h:377
Parameters
- llvm::LiveInterval& LI
- llvm::BitVector& UsableRegs
¶void constructMainRangeFromSubranges(
llvm::LiveInterval& LI)
void constructMainRangeFromSubranges(
llvm::LiveInterval& LI)
Description
For live interval \p LI with correct SubRanges construct matching information for the main live range. Expects the main live range to not have any segments or value numbers.
Declared at: llvm/include/llvm/CodeGen/LiveIntervals.h:446
Parameters
¶llvm::LiveInterval&
createAndComputeVirtRegInterval(
llvm::Register Reg)
llvm::LiveInterval&
createAndComputeVirtRegInterval(
llvm::Register Reg)
Declared at: llvm/include/llvm/CodeGen/LiveIntervals.h:138
Parameters
- llvm::Register Reg
¶llvm::LiveInterval& createEmptyInterval(
llvm::Register Reg)
llvm::LiveInterval& createEmptyInterval(
llvm::Register Reg)
Description
Interval creation.
Declared at: llvm/include/llvm/CodeGen/LiveIntervals.h:131
Parameters
- llvm::Register Reg
¶void extendToIndices(
llvm::LiveRange& LR,
ArrayRef<llvm::SlotIndex> Indices,
ArrayRef<llvm::SlotIndex> Undefs)
void extendToIndices(
llvm::LiveRange& LR,
ArrayRef<llvm::SlotIndex> Indices,
ArrayRef<llvm::SlotIndex> Undefs)
Description
Extend the live range \p LR to reach all points in \p Indices. The points in the \p Indices array must be jointly dominated by the union of the existing defs in \p LR and points in \p Undefs. PHI-defs are added as needed to maintain SSA form. If a SlotIndex in \p Indices is the end index of a basic block, \p LR will be extended to be live out of the basic block. If a SlotIndex in \p Indices is jointy dominated only by points in\p Undefs, the live range will not be extended to that point. See also LiveRangeCalc::extend().
Declared at: llvm/include/llvm/CodeGen/LiveIntervals.h:184
Parameters
- llvm::LiveRange& LR
- ArrayRef<llvm::SlotIndex> Indices
- ArrayRef<llvm::SlotIndex> Undefs
¶void extendToIndices(
llvm::LiveRange& LR,
ArrayRef<llvm::SlotIndex> Indices)
void extendToIndices(
llvm::LiveRange& LR,
ArrayRef<llvm::SlotIndex> Indices)
Declared at: llvm/include/llvm/CodeGen/LiveIntervals.h:187
Parameters
- llvm::LiveRange& LR
- ArrayRef<llvm::SlotIndex> Indices
¶llvm::AliasAnalysis* getAliasAnalysis() const
llvm::AliasAnalysis* getAliasAnalysis() const
Declared at: llvm/include/llvm/CodeGen/LiveIntervals.h:215
¶void getAnalysisUsage(
llvm::AnalysisUsage& AU) const
void getAnalysisUsage(
llvm::AnalysisUsage& AU) const
Description
getAnalysisUsage - Subclasses that override getAnalysisUsage must call this. For MachineFunctionPasses, calling AU.preservesCFG() indicates that the pass does not modify the MachineBasicBlock CFG.
Declared at: llvm/include/llvm/CodeGen/LiveIntervals.h:286
Parameters
¶const llvm::LiveRange* getCachedRegUnit(
unsigned int Unit) const
const llvm::LiveRange* getCachedRegUnit(
unsigned int Unit) const
Declared at: llvm/include/llvm/CodeGen/LiveIntervals.h:410
Parameters
- unsigned int Unit
¶llvm::LiveRange* getCachedRegUnit(
unsigned int Unit)
llvm::LiveRange* getCachedRegUnit(
unsigned int Unit)
Description
Return the live range for register unit \p Unit if it has already been computed, or nullptr if it hasn't been computed yet.
Declared at: llvm/include/llvm/CodeGen/LiveIntervals.h:406
Parameters
- unsigned int Unit
¶llvm::MachineInstr* getInstructionFromIndex(
llvm::SlotIndex index) const
llvm::MachineInstr* getInstructionFromIndex(
llvm::SlotIndex index) const
Description
Returns the instruction associated with the given index.
Declared at: llvm/include/llvm/CodeGen/LiveIntervals.h:231
Parameters
- llvm::SlotIndex index
¶llvm::SlotIndex getInstructionIndex(
const llvm::MachineInstr& Instr) const
llvm::SlotIndex getInstructionIndex(
const llvm::MachineInstr& Instr) const
Description
Returns the base index of the given instruction.
Declared at: llvm/include/llvm/CodeGen/LiveIntervals.h:226
Parameters
- const llvm::MachineInstr& Instr
¶llvm::LiveInterval& getInterval(
llvm::Register Reg)
llvm::LiveInterval& getInterval(
llvm::Register Reg)
Declared at: llvm/include/llvm/CodeGen/LiveIntervals.h:114
Parameters
- llvm::Register Reg
¶const llvm::LiveInterval& getInterval(
llvm::Register Reg) const
const llvm::LiveInterval& getInterval(
llvm::Register Reg) const
Declared at: llvm/include/llvm/CodeGen/LiveIntervals.h:121
Parameters
- llvm::Register Reg
¶llvm::SlotIndex getMBBEndIdx(
const llvm::MachineBasicBlock* mbb) const
llvm::SlotIndex getMBBEndIdx(
const llvm::MachineBasicBlock* mbb) const
Description
Return the last index in the given basic block.
Declared at: llvm/include/llvm/CodeGen/LiveIntervals.h:241
Parameters
- const llvm::MachineBasicBlock* mbb
¶llvm::MachineBasicBlock* getMBBFromIndex(
llvm::SlotIndex index) const
llvm::MachineBasicBlock* getMBBFromIndex(
llvm::SlotIndex index) const
Declared at: llvm/include/llvm/CodeGen/LiveIntervals.h:255
Parameters
- llvm::SlotIndex index
¶llvm::SlotIndex getMBBStartIdx(
const llvm::MachineBasicBlock* mbb) const
llvm::SlotIndex getMBBStartIdx(
const llvm::MachineBasicBlock* mbb) const
Description
Return the first index in the given basic block.
Declared at: llvm/include/llvm/CodeGen/LiveIntervals.h:236
Parameters
- const llvm::MachineBasicBlock* mbb
¶ArrayRef<const uint32_t*> getRegMaskBits() const
ArrayRef<const uint32_t*> getRegMaskBits() const
Description
Returns an array of register mask pointers corresponding to getRegMaskSlots().
Declared at: llvm/include/llvm/CodeGen/LiveIntervals.h:362
¶ArrayRef<const uint32_t*> getRegMaskBitsInBlock(
unsigned int MBBNum) const
ArrayRef<const uint32_t*> getRegMaskBitsInBlock(
unsigned int MBBNum) const
Description
Returns an array of mask pointers corresponding to getRegMaskSlotsInBlock(MBBNum).
Declared at: llvm/include/llvm/CodeGen/LiveIntervals.h:366
Parameters
- unsigned int MBBNum
¶ArrayRef<llvm::SlotIndex> getRegMaskSlots() const
ArrayRef<llvm::SlotIndex> getRegMaskSlots() const
Description
Returns a sorted array of slot indices of all instructions with register mask operands.
Declared at: llvm/include/llvm/CodeGen/LiveIntervals.h:351
¶ArrayRef<llvm::SlotIndex> getRegMaskSlotsInBlock(
unsigned int MBBNum) const
ArrayRef<llvm::SlotIndex> getRegMaskSlotsInBlock(
unsigned int MBBNum) const
Description
Returns a sorted array of slot indices of all instructions with register mask operands in the basic block numbered \p MBBNum.
Declared at: llvm/include/llvm/CodeGen/LiveIntervals.h:355
Parameters
- unsigned int MBBNum
¶llvm::LiveRange& getRegUnit(unsigned int Unit)
llvm::LiveRange& getRegUnit(unsigned int Unit)
Description
Return the live range for register unit \p Unit. It will be computed if it doesn't exist.
Declared at: llvm/include/llvm/CodeGen/LiveIntervals.h:393
Parameters
- unsigned int Unit
¶llvm::SlotIndexes* getSlotIndexes() const
llvm::SlotIndexes* getSlotIndexes() const
Declared at: llvm/include/llvm/CodeGen/LiveIntervals.h:211
¶static float getSpillWeight(
bool isDef,
bool isUse,
const llvm::MachineBlockFrequencyInfo* MBFI,
const llvm::MachineInstr& MI)
static float getSpillWeight(
bool isDef,
bool isUse,
const llvm::MachineBlockFrequencyInfo* MBFI,
const llvm::MachineInstr& MI)
Description
Calculate the spill weight to assign to a single instruction.
Declared at: llvm/include/llvm/CodeGen/LiveIntervals.h:105
Parameters
- bool isDef
- bool isUse
- const llvm::MachineBlockFrequencyInfo* MBFI
- const llvm::MachineInstr& MI
¶static float getSpillWeight(
bool isDef,
bool isUse,
const llvm::MachineBlockFrequencyInfo* MBFI,
const llvm::MachineBasicBlock* MBB)
static float getSpillWeight(
bool isDef,
bool isUse,
const llvm::MachineBlockFrequencyInfo* MBFI,
const llvm::MachineBasicBlock* MBB)
Description
Calculate the spill weight to assign to a single instruction.
Declared at: llvm/include/llvm/CodeGen/LiveIntervals.h:110
Parameters
- bool isDef
- bool isUse
- const llvm::MachineBlockFrequencyInfo* MBFI
- const llvm::MachineBasicBlock* MBB
¶VNInfo::Allocator& getVNInfoAllocator()
VNInfo::Allocator& getVNInfoAllocator()
Declared at: llvm/include/llvm/CodeGen/LiveIntervals.h:284
¶void handleMove(llvm::MachineInstr& MI,
bool UpdateFlags = false)
void handleMove(llvm::MachineInstr& MI,
bool UpdateFlags = false)
Description
Call this method to notify LiveIntervals that instruction \p MI has been moved within a basic block. This will update the live intervals for all operands of \p MI. Moves between basic blocks are not supported.
Declared at: llvm/include/llvm/CodeGen/LiveIntervals.h:311
Parameters
- llvm::MachineInstr& MI
- bool UpdateFlags = false
- Update live intervals for nonallocatable physregs.
¶void handleMoveIntoBundle(
llvm::MachineInstr& MI,
llvm::MachineInstr& BundleStart,
bool UpdateFlags = false)
void handleMoveIntoBundle(
llvm::MachineInstr& MI,
llvm::MachineInstr& BundleStart,
bool UpdateFlags = false)
Description
Update intervals for operands of \p MI so that they begin/end on the SlotIndex for \p BundleStart. Requires MI and BundleStart to have SlotIndexes, and assumes existing liveness is accurate. BundleStart should be the first instruction in the Bundle.
Declared at: llvm/include/llvm/CodeGen/LiveIntervals.h:321
Parameters
- llvm::MachineInstr& MI
- llvm::MachineInstr& BundleStart
- bool UpdateFlags = false
- Update live intervals for nonallocatable physregs.
¶bool hasInterval(llvm::Register Reg) const
bool hasInterval(llvm::Register Reg) const
Declared at: llvm/include/llvm/CodeGen/LiveIntervals.h:125
Parameters
- llvm::Register Reg
¶bool hasPHIKill(const llvm::LiveInterval& LI,
const llvm::VNInfo* VNI) const
bool hasPHIKill(const llvm::LiveInterval& LI,
const llvm::VNInfo* VNI) const
Description
Returns true if VNI is killed by any PHI-def values in LI. This may conservatively return true to avoid expensive computations.
Declared at: llvm/include/llvm/CodeGen/LiveIntervals.h:301
Parameters
- const llvm::LiveInterval& LI
- const llvm::VNInfo* VNI
¶void insertMBBInMaps(llvm::MachineBasicBlock* MBB)
void insertMBBInMaps(llvm::MachineBasicBlock* MBB)
Declared at: llvm/include/llvm/CodeGen/LiveIntervals.h:259
Parameters
¶llvm::MachineBasicBlock* intervalIsInOneMBB(
const llvm::LiveInterval& LI) const
llvm::MachineBasicBlock* intervalIsInOneMBB(
const llvm::LiveInterval& LI) const
Description
If LI is confined to a single basic block, return a pointer to that block. If LI is live in to or out of any block, return NULL.
Declared at: llvm/include/llvm/CodeGen/LiveIntervals.h:297
Parameters
- const llvm::LiveInterval& LI
¶bool isLiveInToMBB(
const llvm::LiveRange& LR,
const llvm::MachineBasicBlock* mbb) const
bool isLiveInToMBB(
const llvm::LiveRange& LR,
const llvm::MachineBasicBlock* mbb) const
Declared at: llvm/include/llvm/CodeGen/LiveIntervals.h:245
Parameters
- const llvm::LiveRange& LR
- const llvm::MachineBasicBlock* mbb
¶bool isLiveOutOfMBB(
const llvm::LiveRange& LR,
const llvm::MachineBasicBlock* mbb) const
bool isLiveOutOfMBB(
const llvm::LiveRange& LR,
const llvm::MachineBasicBlock* mbb) const
Declared at: llvm/include/llvm/CodeGen/LiveIntervals.h:250
Parameters
- const llvm::LiveRange& LR
- const llvm::MachineBasicBlock* mbb
¶bool isNotInMIMap(
const llvm::MachineInstr& Instr) const
bool isNotInMIMap(
const llvm::MachineInstr& Instr) const
Description
Returns true if the specified machine instr has been removed or was never entered in the map.
Declared at: llvm/include/llvm/CodeGen/LiveIntervals.h:221
Parameters
- const llvm::MachineInstr& Instr
¶void print(llvm::raw_ostream& O,
const llvm::Module* = nullptr) const
void print(llvm::raw_ostream& O,
const llvm::Module* = nullptr) const
Description
Implement the dump method.
Declared at: llvm/include/llvm/CodeGen/LiveIntervals.h:293
Parameters
- llvm::raw_ostream& O
- const llvm::Module* = nullptr
¶void pruneValue(llvm::LiveInterval&,
llvm::SlotIndex,
SmallVectorImpl<llvm::SlotIndex>*)
void pruneValue(llvm::LiveInterval&,
llvm::SlotIndex,
SmallVectorImpl<llvm::SlotIndex>*)
Description
This function should not be used. Its intent is to tell you that you are doing something wrong if you call pruneValue directly on a LiveInterval. Indeed, you are supposed to call pruneValue on the main LiveRange and all the LiveRanges of the subranges if any.
Declared at: llvm/include/llvm/CodeGen/LiveIntervals.h:205
Parameters
- llvm::LiveInterval&
- llvm::SlotIndex
- SmallVectorImpl<llvm::SlotIndex>*
¶void pruneValue(
llvm::LiveRange& LR,
llvm::SlotIndex Kill,
SmallVectorImpl<llvm::SlotIndex>* EndPoints)
void pruneValue(
llvm::LiveRange& LR,
llvm::SlotIndex Kill,
SmallVectorImpl<llvm::SlotIndex>* EndPoints)
Description
If \p LR has a live value at \p Kill, prune its live range by removing any liveness reachable from Kill. Add live range end points to EndPoints such that extendToIndices(LI, EndPoints) will reconstruct the value's live range. Calling pruneValue() and extendToIndices() can be used to reconstruct SSA form after adding defs to a virtual register.
Declared at: llvm/include/llvm/CodeGen/LiveIntervals.h:198
Parameters
- llvm::LiveRange& LR
- llvm::SlotIndex Kill
- SmallVectorImpl<llvm::SlotIndex>* EndPoints
¶void releaseMemory()
void releaseMemory()
Description
releaseMemory() - This member can be implemented by a pass if it wants to be able to release its memory when it is no longer needed. The default behavior of passes is to hold onto memory for the entire duration of their lifetime (which is the entire compile time). For pipelined passes, this is not a big deal because that memory gets recycled every time the pass is invoked on another program unit. For IP passes, it is more important to free memory when it is unused. Optionally implement this function to release pass memory when it is no longer used.
Declared at: llvm/include/llvm/CodeGen/LiveIntervals.h:287
¶void removeAllRegUnitsForPhysReg(unsigned int Reg)
void removeAllRegUnitsForPhysReg(unsigned int Reg)
Description
Remove associated live ranges for the register units associated with \p Reg. Subsequent uses should rely on on-demand recomputation.
Declared at: llvm/include/llvm/CodeGen/LiveIntervals.h:425
Parameters
- unsigned int Reg
¶void removeInterval(unsigned int Reg)
void removeInterval(unsigned int Reg)
Description
Interval removal.
Declared at: llvm/include/llvm/CodeGen/LiveIntervals.h:145
Parameters
- unsigned int Reg
¶void removePhysRegDefAt(unsigned int Reg,
llvm::SlotIndex Pos)
void removePhysRegDefAt(unsigned int Reg,
llvm::SlotIndex Pos)
Description
Remove value numbers and related live segments starting at position\p Pos that are part of any liverange of physical register \p Reg or one of its subregisters.
Declared at: llvm/include/llvm/CodeGen/LiveIntervals.h:433
Parameters
- unsigned int Reg
- llvm::SlotIndex Pos
¶void removeRegUnit(unsigned int Unit)
void removeRegUnit(unsigned int Unit)
Description
Remove computed live range for register unit \p Unit. Subsequent uses should rely on on-demand recomputation.
Declared at: llvm/include/llvm/CodeGen/LiveIntervals.h:416
Parameters
- unsigned int Unit
¶void removeVRegDefAt(llvm::LiveInterval& LI,
llvm::SlotIndex Pos)
void removeVRegDefAt(llvm::LiveInterval& LI,
llvm::SlotIndex Pos)
Description
Remove value number and related live segments of \p LI and its subranges that start at position \p Pos.
Declared at: llvm/include/llvm/CodeGen/LiveIntervals.h:437
Parameters
¶void repairIntervalsInRange(
llvm::MachineBasicBlock* MBB,
MachineBasicBlock::iterator Begin,
MachineBasicBlock::iterator End,
ArrayRef<unsigned int> OrigRegs)
void repairIntervalsInRange(
llvm::MachineBasicBlock* MBB,
MachineBasicBlock::iterator Begin,
MachineBasicBlock::iterator End,
ArrayRef<unsigned int> OrigRegs)
Description
Update live intervals for instructions in a range of iterators. It is intended for use after target hooks that may insert or remove instructions, and is only efficient for a small number of instructions. OrigRegs is a vector of registers that were originally used by the instructions in the range between the two iterators. Currently, the only only changes that are supported are simple removal and addition of uses.
Declared at: llvm/include/llvm/CodeGen/LiveIntervals.h:333
Parameters
- llvm::MachineBasicBlock* MBB
- MachineBasicBlock::iterator Begin
- MachineBasicBlock::iterator End
- ArrayRef<unsigned int> OrigRegs
¶bool runOnMachineFunction(llvm::MachineFunction&)
bool runOnMachineFunction(llvm::MachineFunction&)
Description
Pass entry point; Calculates LiveIntervals.
Declared at: llvm/include/llvm/CodeGen/LiveIntervals.h:290
Parameters
¶bool shrinkToUses(
llvm::LiveInterval* li,
SmallVectorImpl<llvm::MachineInstr*>* dead =
nullptr)
bool shrinkToUses(
llvm::LiveInterval* li,
SmallVectorImpl<llvm::MachineInstr*>* dead =
nullptr)
Description
After removing some uses of a register, shrink its live range to just the remaining uses. This method does not compute reaching defs for new uses, and it doesn't remove dead defs. Dead PHIDef values are marked as unused. New dead machine instructions are added to the dead vector. Returns true if the interval may have been separated into multiple connected components.
Declared at: llvm/include/llvm/CodeGen/LiveIntervals.h:161
Parameters
- llvm::LiveInterval* li
- SmallVectorImpl<llvm::MachineInstr*>* dead = nullptr
¶void shrinkToUses(LiveInterval::SubRange& SR,
unsigned int Reg)
void shrinkToUses(LiveInterval::SubRange& SR,
unsigned int Reg)
Description
Specialized version of shrinkToUses(LiveInterval *li, SmallVectorImpl <MachineInstr *> *dead) that works on a subregister live range and only looks at uses matching the lane mask of the subregister range. This may leave the subrange empty which needs to be cleaned up with LiveInterval::removeEmptySubranges() afterwards.
Declared at: llvm/include/llvm/CodeGen/LiveIntervals.h:170
Parameters
- LiveInterval::SubRange& SR
- unsigned int Reg
¶void splitSeparateComponents(
llvm::LiveInterval& LI,
SmallVectorImpl<llvm::LiveInterval*>&
SplitLIs)
void splitSeparateComponents(
llvm::LiveInterval& LI,
SmallVectorImpl<llvm::LiveInterval*>&
SplitLIs)
Description
Split separate components in LiveInterval \p LI into separate intervals.
Declared at: llvm/include/llvm/CodeGen/LiveIntervals.h:440
Parameters
- llvm::LiveInterval& LI
- SmallVectorImpl<llvm::LiveInterval*>& SplitLIs
¶~LiveIntervals()
~LiveIntervals()
Declared at: llvm/include/llvm/CodeGen/LiveIntervals.h:102