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:97

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
private const llvm::LiveInterval* CurLI = nullptr
private llvm::InsertPointAnalysis IPA
Insert Point Analysis.
private SmallVector<llvm::SlotIndex, 8> UseSlots
private SmallVector<llvm::SplitAnalysis::BlockInfo, 8> UseBlocks
UseBlocks - Blocks where CurLI has uses.
private unsigned int NumGapBlocks
NumGapBlocks - Number of duplicate entries in UseBlocks for blocks where the live range has a gap.
private llvm::BitVector ThroughBlocks
ThroughBlocks - Block numbers where CurLI is live through without uses.
private unsigned int NumThroughBlocks
NumThroughBlocks - Number of live-through blocks.

Method Overview

Methods

SplitAnalysis(const llvm::VirtRegMap& vrm,
              const llvm::LiveIntervals& lis,
              const llvm::MachineLoopInfo& mli)

Declared at: llvm/lib/CodeGen/SplitKit.h:170

Parameters

const llvm::VirtRegMap& vrm
const llvm::LiveIntervals& lis
const llvm::MachineLoopInfo& mli

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:175

Parameters

const llvm::LiveInterval* li

void analyzeUses()

Declared at: llvm/lib/CodeGen/SplitKit.h:164

void calcLiveBlockInfo()

Description

calcLiveBlockInfo - Compute per-block information about CurLI.

Declared at: llvm/lib/CodeGen/SplitKit.h:167

void clear()

Description

clear - clear all data structures so SplitAnalysis is ready to analyze a new interval.

Declared at: llvm/lib/CodeGen/SplitKit.h:179

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:216

Parameters

const llvm::LiveInterval* li

llvm::SlotIndex getFirstSplitPoint(
    unsigned int Num)

Declared at: llvm/lib/CodeGen/SplitKit.h:242

Parameters

unsigned int Num

llvm::SlotIndex getLastSplitPoint(
    unsigned int Num)

Declared at: llvm/lib/CodeGen/SplitKit.h:230

Parameters

unsigned int Num

llvm::SlotIndex getLastSplitPoint(
    llvm::MachineBasicBlock* BB)

Declared at: llvm/lib/CodeGen/SplitKit.h:234

Parameters

llvm::MachineBasicBlock* BB

MachineBasicBlock::iterator getLastSplitPointIter(
    llvm::MachineBasicBlock* BB)

Declared at: llvm/lib/CodeGen/SplitKit.h:238

Parameters

llvm::MachineBasicBlock* BB

unsigned int getNumLiveBlocks() const

Description

getNumLiveBlocks - Return the number of blocks where CurLI is live.

Declared at: llvm/lib/CodeGen/SplitKit.h:209

unsigned int getNumThroughBlocks() const

Description

getNumThroughBlocks - Return the number of through blocks.

Declared at: llvm/lib/CodeGen/SplitKit.h:200

const llvm::LiveInterval& getParent() const

Description

getParent - Return the last analyzed interval.

Declared at: llvm/lib/CodeGen/SplitKit.h:182

const llvm::BitVector& getThroughBlocks() const

Description

getThroughBlocks - Return the set of through blocks.

Declared at: llvm/lib/CodeGen/SplitKit.h:206

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:197

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:193

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:189

Parameters

llvm::SlotIndex Idx

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:203

Parameters

unsigned int MBB

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:228

Parameters

const llvm::SplitAnalysis::BlockInfo& BI
The block to be isolated.
bool SingleInstrs
True when single instructions should be isolated.