class SplitAnalysis
Declaration
class SplitAnalysis { /* full declaration omitted */ };
Description
SplitAnalysis - Analyze a LiveInterval, looking for live range splitting opportunities.
Declared at: llvm/lib/CodeGen/SplitKit.h:95
Member Variables
- public const llvm::MachineFunction& MF
- public const llvm::VirtRegMap& VRM
- public const llvm::LiveIntervals& LIS
- public const llvm::MachineLoopInfo& Loops
- public const llvm::TargetInstrInfo& TII
Method Overview
- public SplitAnalysis(const llvm::VirtRegMap & vrm, const llvm::LiveIntervals & lis, const llvm::MachineLoopInfo & mli)
- public void analyze(const llvm::LiveInterval * li)
- public void clear()
- public unsigned int countLiveBlocks(const llvm::LiveInterval * li) const
- public bool didRepairRange() const
- public llvm::SlotIndex getFirstSplitPoint(unsigned int Num)
- public llvm::SlotIndex getLastSplitPoint(unsigned int Num)
- public MachineBasicBlock::iterator getLastSplitPointIter(llvm::MachineBasicBlock * BB)
- public unsigned int getNumLiveBlocks() const
- public unsigned int getNumThroughBlocks() const
- public const llvm::LiveInterval & getParent() const
- public const llvm::BitVector & getThroughBlocks() const
- public ArrayRef<llvm::SplitAnalysis::BlockInfo> getUseBlocks() const
- public ArrayRef<llvm::SlotIndex> getUseSlots() const
- public bool isOriginalEndpoint(llvm::SlotIndex Idx) const
- public bool isThroughBlock(unsigned int MBB) const
- public bool shouldSplitSingleBlock(const llvm::SplitAnalysis::BlockInfo & BI, bool SingleInstrs) const
Methods
¶SplitAnalysis(const llvm::VirtRegMap& vrm,
const llvm::LiveIntervals& lis,
const llvm::MachineLoopInfo& mli)
SplitAnalysis(const llvm::VirtRegMap& vrm,
const llvm::LiveIntervals& lis,
const llvm::MachineLoopInfo& mli)
Declared at: llvm/lib/CodeGen/SplitKit.h:168
Parameters
- const llvm::VirtRegMap& vrm
- const llvm::LiveIntervals& lis
- const llvm::MachineLoopInfo& mli
¶void analyze(const llvm::LiveInterval* li)
void analyze(const llvm::LiveInterval* li)
Description
analyze - set CurLI to the specified interval, and analyze how it may be split.
Declared at: llvm/lib/CodeGen/SplitKit.h:173
Parameters
- const llvm::LiveInterval* li
¶void clear()
void clear()
Description
clear - clear all data structures so SplitAnalysis is ready to analyze a new interval.
Declared at: llvm/lib/CodeGen/SplitKit.h:182
¶unsigned int countLiveBlocks(
const llvm::LiveInterval* li) const
unsigned int countLiveBlocks(
const llvm::LiveInterval* li) const
Description
countLiveBlocks - Return the number of blocks where li is live. This is guaranteed to return the same number as getNumLiveBlocks() after calling analyze(li).
Declared at: llvm/lib/CodeGen/SplitKit.h:219
Parameters
- const llvm::LiveInterval* li
¶bool didRepairRange() const
bool didRepairRange() const
Description
didRepairRange() - Returns true if CurLI was invalid and has been repaired by analyze(). This really shouldn't happen, but sometimes the coalescer can create live ranges that end in mid-air.
Declared at: llvm/lib/CodeGen/SplitKit.h:178
¶llvm::SlotIndex getFirstSplitPoint(
unsigned int Num)
llvm::SlotIndex getFirstSplitPoint(
unsigned int Num)
Declared at: llvm/lib/CodeGen/SplitKit.h:241
Parameters
- unsigned int Num
¶llvm::SlotIndex getLastSplitPoint(
unsigned int Num)
llvm::SlotIndex getLastSplitPoint(
unsigned int Num)
Declared at: llvm/lib/CodeGen/SplitKit.h:233
Parameters
- unsigned int Num
¶MachineBasicBlock::iterator getLastSplitPointIter(
llvm::MachineBasicBlock* BB)
MachineBasicBlock::iterator getLastSplitPointIter(
llvm::MachineBasicBlock* BB)
Declared at: llvm/lib/CodeGen/SplitKit.h:237
Parameters
¶unsigned int getNumLiveBlocks() const
unsigned int getNumLiveBlocks() const
Description
getNumLiveBlocks - Return the number of blocks where CurLI is live.
Declared at: llvm/lib/CodeGen/SplitKit.h:212
¶unsigned int getNumThroughBlocks() const
unsigned int getNumThroughBlocks() const
Description
getNumThroughBlocks - Return the number of through blocks.
Declared at: llvm/lib/CodeGen/SplitKit.h:203
¶const llvm::LiveInterval& getParent() const
const llvm::LiveInterval& getParent() const
Description
getParent - Return the last analyzed interval.
Declared at: llvm/lib/CodeGen/SplitKit.h:185
¶const llvm::BitVector& getThroughBlocks() const
const llvm::BitVector& getThroughBlocks() const
Description
getThroughBlocks - Return the set of through blocks.
Declared at: llvm/lib/CodeGen/SplitKit.h:209
¶ArrayRef<llvm::SplitAnalysis::BlockInfo>
getUseBlocks() const
ArrayRef<llvm::SplitAnalysis::BlockInfo>
getUseBlocks() const
Description
getUseBlocks - Return an array of BlockInfo objects for the basic blocks where CurLI has uses.
Declared at: llvm/lib/CodeGen/SplitKit.h:200
¶ArrayRef<llvm::SlotIndex> getUseSlots() const
ArrayRef<llvm::SlotIndex> getUseSlots() const
Description
getUseSlots - Return an array of SlotIndexes of instructions using CurLI. This include both use and def operands, at most one entry per instruction.
Declared at: llvm/lib/CodeGen/SplitKit.h:196
¶bool isOriginalEndpoint(llvm::SlotIndex Idx) const
bool isOriginalEndpoint(llvm::SlotIndex Idx) const
Description
isOriginalEndpoint - Return true if the original live range was killed or (re-)defined at Idx. Idx should be the 'def' slot for a normal kill/def, and 'use' for an early-clobber def. This can be used to recognize code inserted by earlier live range splitting.
Declared at: llvm/lib/CodeGen/SplitKit.h:192
Parameters
- llvm::SlotIndex Idx
¶bool isThroughBlock(unsigned int MBB) const
bool isThroughBlock(unsigned int MBB) const
Description
isThroughBlock - Return true if CurLI is live through MBB without uses.
Declared at: llvm/lib/CodeGen/SplitKit.h:206
Parameters
- unsigned int MBB
¶bool shouldSplitSingleBlock(
const llvm::SplitAnalysis::BlockInfo& BI,
bool SingleInstrs) const
bool shouldSplitSingleBlock(
const llvm::SplitAnalysis::BlockInfo& BI,
bool SingleInstrs) const
Description
shouldSplitSingleBlock - Returns true if it would help to create a local live range for the instructions in BI. There is normally no benefit to creating a live range for a single instruction, but it does enable register class inflation if the instruction has a restricted register class.
Declared at: llvm/lib/CodeGen/SplitKit.h:231
Parameters
- const llvm::SplitAnalysis::BlockInfo& BI
- The block to be isolated.
- bool SingleInstrs
- True when single instructions should be isolated.