LLVM API Documentation

llvm::LiveIntervals Class Reference

#include <LiveIntervalAnalysis.h>

Inheritance diagram for llvm::LiveIntervals:
[legend]
Collaboration diagram for llvm::LiveIntervals:
[legend]

List of all members.

Public Types

typedef Reg2IntervalMap::iterator iterator
typedef
Reg2IntervalMap::const_iterator 
const_iterator

Public Member Functions

 LiveIntervals ()
const_iterator begin () const
const_iterator end () const
iterator begin ()
iterator end ()
unsigned getNumIntervals () const
LiveInterval & getInterval (unsigned reg)
const LiveInterval & getInterval (unsigned reg) const
bool hasInterval (unsigned reg) const
unsigned getMBBStartIdx (MachineBasicBlock *MBB) const
unsigned getMBBStartIdx (unsigned MBBNo) const
unsigned getMBBEndIdx (MachineBasicBlock *MBB) const
unsigned getMBBEndIdx (unsigned MBBNo) const
double getScaledIntervalSize (LiveInterval &I)
unsigned getApproximateInstructionCount (LiveInterval &I)
MachineBasicBlock * getMBBFromIndex (unsigned index) const
unsigned getInstructionIndex (const MachineInstr *instr) const
 getInstructionIndex - returns the base index of instr
MachineInstr * getInstructionFromIndex (unsigned index) const
bool hasGapBeforeInstr (unsigned Index)
bool hasGapAfterInstr (unsigned Index)
unsigned findGapBeforeInstr (unsigned Index, bool Furthest=false)
void InsertMachineInstrInMaps (MachineInstr *MI, unsigned Index)
bool conflictsWithPhysRegDef (const LiveInterval &li, VirtRegMap &vrm, unsigned reg)
bool conflictsWithPhysRegRef (LiveInterval &li, unsigned Reg, bool CheckUse, SmallPtrSet< MachineInstr *, 32 > &JoinedCopies)
bool findLiveInMBBs (unsigned Start, unsigned End, SmallVectorImpl< MachineBasicBlock * > &MBBs) const
bool findReachableMBBs (unsigned Start, unsigned End, SmallVectorImpl< MachineBasicBlock * > &MBBs) const
LiveInterval & getOrCreateInterval (unsigned reg)
LiveInterval * dupInterval (LiveInterval *li)
LiveRange addLiveRangeToEndOfBlock (unsigned reg, MachineInstr *startInst)
void removeInterval (unsigned Reg)
bool isNotInMIMap (MachineInstr *instr) const
void RemoveMachineInstrFromMaps (MachineInstr *MI)
void ReplaceMachineInstrInMaps (MachineInstr *MI, MachineInstr *NewMI)
BumpPtrAllocator & getVNInfoAllocator ()
unsigned getVNInfoSourceReg (const VNInfo *VNI) const
virtual void getAnalysisUsage (AnalysisUsage &AU) const
virtual void releaseMemory ()
virtual bool runOnMachineFunction (MachineFunction &)
 runOnMachineFunction - pass entry point
virtual void print (std::ostream &O, const Module *=0) const
 print - Implement the dump method.
void print (std::ostream *O, const Module *M=0) const
std::vector< LiveInterval * > addIntervalsForSpills (const LiveInterval &i, SmallVectorImpl< LiveInterval * > &SpillIs, const MachineLoopInfo *loopInfo, VirtRegMap &vrm)
std::vector< LiveInterval * > addIntervalsForSpillsFast (const LiveInterval &li, const MachineLoopInfo *loopInfo, VirtRegMap &vrm)
bool spillPhysRegAroundRegDefsUses (const LiveInterval &li, unsigned PhysReg, VirtRegMap &vrm)
bool isReMaterializable (const LiveInterval &li, SmallVectorImpl< LiveInterval * > &SpillIs, bool &isLoad)
bool isReMaterializable (const LiveInterval &li, const VNInfo *ValNo, MachineInstr *MI)
unsigned getRepresentativeReg (unsigned Reg) const
unsigned getNumConflictsWithPhysReg (const LiveInterval &li, unsigned PhysReg) const
void processImplicitDefs ()
void computeNumbering ()
 computeNumbering - Compute the index numbering.
void scaleNumbering (int factor)
bool intervalIsInOneMBB (const LiveInterval &li) const

Static Public Member Functions

static unsigned getBaseIndex (unsigned index)
static unsigned getBoundaryIndex (unsigned index)
static unsigned getLoadIndex (unsigned index)
static unsigned getUseIndex (unsigned index)
static unsigned getDefIndex (unsigned index)
static unsigned getStoreIndex (unsigned index)
static float getSpillWeight (bool isDef, bool isUse, unsigned loopDepth)

Static Public Attributes

static char ID = 0

Classes

struct  SRInfo
 SRInfo - Spill / restore info.


Detailed Description

Definition at line 59 of file LiveIntervalAnalysis.h.


Member Typedef Documentation

typedef Reg2IntervalMap::iterator llvm::LiveIntervals::iterator

Definition at line 127 of file LiveIntervalAnalysis.h.

typedef Reg2IntervalMap::const_iterator llvm::LiveIntervals::const_iterator

Definition at line 128 of file LiveIntervalAnalysis.h.


Constructor & Destructor Documentation

llvm::LiveIntervals::LiveIntervals (  )  [inline]

Definition at line 102 of file LiveIntervalAnalysis.h.


Member Function Documentation

static unsigned llvm::LiveIntervals::getBaseIndex ( unsigned  index  )  [inline, static]

static unsigned llvm::LiveIntervals::getBoundaryIndex ( unsigned  index  )  [inline, static]

Definition at line 107 of file LiveIntervalAnalysis.h.

References getBaseIndex(), and llvm::LiveInterval::InstrSlots::NUM.

static unsigned llvm::LiveIntervals::getLoadIndex ( unsigned  index  )  [inline, static]

static unsigned llvm::LiveIntervals::getUseIndex ( unsigned  index  )  [inline, static]

static unsigned llvm::LiveIntervals::getDefIndex ( unsigned  index  )  [inline, static]

static unsigned llvm::LiveIntervals::getStoreIndex ( unsigned  index  )  [inline, static]

static float llvm::LiveIntervals::getSpillWeight ( bool  isDef,
bool  isUse,
unsigned  loopDepth 
) [inline, static]

Definition at line 123 of file LiveIntervalAnalysis.h.

References F.

Referenced by llvm::SimpleRegisterCoalescing::runOnMachineFunction().

const_iterator llvm::LiveIntervals::begin (  )  const [inline]

const_iterator llvm::LiveIntervals::end (  )  const [inline]

iterator llvm::LiveIntervals::begin (  )  [inline]

Definition at line 131 of file LiveIntervalAnalysis.h.

iterator llvm::LiveIntervals::end (  )  [inline]

Definition at line 132 of file LiveIntervalAnalysis.h.

unsigned llvm::LiveIntervals::getNumIntervals (  )  const [inline]

Definition at line 133 of file LiveIntervalAnalysis.h.

Referenced by runOnMachineFunction().

LiveInterval& llvm::LiveIntervals::getInterval ( unsigned  reg  )  [inline]

const LiveInterval& llvm::LiveIntervals::getInterval ( unsigned  reg  )  const [inline]

Definition at line 141 of file LiveIntervalAnalysis.h.

bool llvm::LiveIntervals::hasInterval ( unsigned  reg  )  const [inline]

unsigned llvm::LiveIntervals::getMBBStartIdx ( MachineBasicBlock *  MBB  )  const [inline]

getMBBStartIdx - Return the base index of the first instruction in the specified MachineBasicBlock.

Definition at line 153 of file LiveIntervalAnalysis.h.

References llvm::MachineBasicBlock::getNumber().

Referenced by computeNumbering(), and isLiveIn().

unsigned llvm::LiveIntervals::getMBBStartIdx ( unsigned  MBBNo  )  const [inline]

Definition at line 156 of file LiveIntervalAnalysis.h.

unsigned llvm::LiveIntervals::getMBBEndIdx ( MachineBasicBlock *  MBB  )  const [inline]

getMBBEndIdx - Return the store index of the last instruction in the specified MachineBasicBlock.

Definition at line 163 of file LiveIntervalAnalysis.h.

References llvm::MachineBasicBlock::getNumber().

Referenced by addLiveRangeToEndOfBlock(), computeNumbering(), findReachableMBBs(), and getMBBFromIndex().

unsigned llvm::LiveIntervals::getMBBEndIdx ( unsigned  MBBNo  )  const [inline]

Definition at line 166 of file LiveIntervalAnalysis.h.

double llvm::LiveIntervals::getScaledIntervalSize ( LiveInterval &  I  )  [inline]

getScaledIntervalSize - get the size of an interval in "units," where every function is composed of one thousand units. This measure scales properly with empty index slots in the function.

Definition at line 174 of file LiveIntervalAnalysis.h.

References llvm::LiveInterval::getSize(), and llvm::LiveInterval::InstrSlots::NUM.

Referenced by getApproximateInstructionCount().

unsigned llvm::LiveIntervals::getApproximateInstructionCount ( LiveInterval &  I  )  [inline]

getApproximateInstructionCount - computes an estimate of the number of instructions in a given LiveInterval.

Definition at line 180 of file LiveIntervalAnalysis.h.

References getScaledIntervalSize().

Referenced by addIntervalsForSpills(), llvm::SimpleRegisterCoalescing::getRepIntervalSize(), and llvm::SimpleRegisterCoalescing::runOnMachineFunction().

MachineBasicBlock* llvm::LiveIntervals::getMBBFromIndex ( unsigned  index  )  const [inline]

getMBBFromIndex - given an index in any instruction of an MBB return a pointer the MBB

Definition at line 187 of file LiveIntervalAnalysis.h.

References getMBBEndIdx().

unsigned llvm::LiveIntervals::getInstructionIndex ( const MachineInstr *  instr  )  const [inline]

MachineInstr* llvm::LiveIntervals::getInstructionFromIndex ( unsigned  index  )  const [inline]

getInstructionFromIndex - given an index in any slot of an instruction return a pointer the instruction

Definition at line 210 of file LiveIntervalAnalysis.h.

References llvm::LiveInterval::InstrSlots::NUM.

Referenced by addIntervalsForSpills(), conflictsWithPhysRegDef(), conflictsWithPhysRegRef(), findGapBeforeInstr(), hasGapAfterInstr(), hasGapBeforeInstr(), isReMaterializable(), and PropagateDeadness().

bool llvm::LiveIntervals::hasGapBeforeInstr ( unsigned  Index  )  [inline]

hasGapBeforeInstr - Return true if the previous instruction slot, i.e. Index - InstrSlots::NUM, is not occupied.

Definition at line 219 of file LiveIntervalAnalysis.h.

References getBaseIndex(), getInstructionFromIndex(), and llvm::LiveInterval::InstrSlots::NUM.

bool llvm::LiveIntervals::hasGapAfterInstr ( unsigned  Index  )  [inline]

hasGapAfterInstr - Return true if the successive instruction slot, i.e. Index + InstrSlots::Num, is not occupied.

Definition at line 226 of file LiveIntervalAnalysis.h.

References getBaseIndex(), getInstructionFromIndex(), and llvm::LiveInterval::InstrSlots::NUM.

unsigned llvm::LiveIntervals::findGapBeforeInstr ( unsigned  Index,
bool  Furthest = false 
) [inline]

findGapBeforeInstr - Find an empty instruction slot before the specified index. If "Furthest" is true, find one that's furthest away from the index (but before any index that's occupied).

Definition at line 234 of file LiveIntervalAnalysis.h.

References getBaseIndex(), getInstructionFromIndex(), and llvm::LiveInterval::InstrSlots::NUM.

void llvm::LiveIntervals::InsertMachineInstrInMaps ( MachineInstr *  MI,
unsigned  Index 
) [inline]

InsertMachineInstrInMaps - Insert the specified machine instruction into the instruction index map at the given index.

Definition at line 250 of file LiveIntervalAnalysis.h.

References llvm::LiveInterval::InstrSlots::NUM.

bool LiveIntervals::conflictsWithPhysRegDef ( const LiveInterval &  li,
VirtRegMap &  vrm,
unsigned  reg 
)

conflictsWithPhysRegDef - Returns true if the specified register is defined during the duration of the specified interval.

conflictsWithPhysRegDef - Returns true if the specified register is defined during the duration of the specified interval.

Definition at line 539 of file LiveIntervalAnalysis.cpp.

References E, end(), getBaseIndex(), getInstructionFromIndex(), llvm::MachineInstr::getNumOperands(), llvm::MachineInstr::getOperand(), llvm::VirtRegMap::getPhys(), llvm::MachineOperand::getReg(), llvm::VirtRegMap::hasPhys(), index, llvm::TargetInstrInfo::isMoveInstr(), llvm::MachineOperand::isReg(), llvm::TargetRegisterInfo::isVirtualRegister(), MI, llvm::LiveInterval::InstrSlots::NUM, llvm::LiveInterval::ranges, llvm::LiveInterval::reg, and llvm::TargetRegisterInfo::regsOverlap().

bool LiveIntervals::conflictsWithPhysRegRef ( LiveInterval &  li,
unsigned  Reg,
bool  CheckUse,
SmallPtrSet< MachineInstr *, 32 > &  JoinedCopies 
)

bool LiveIntervals::findLiveInMBBs ( unsigned  Start,
unsigned  End,
SmallVectorImpl< MachineBasicBlock * > &  MBBs 
) const

findLiveInMBBs - Given a live range, if the value of the range is live in any MBB returns true as well as the list of basic blocks in which the value is live.

Definition at line 1079 of file LiveIntervalAnalysis.cpp.

References llvm::SmallVectorImpl< T >::push_back().

bool LiveIntervals::findReachableMBBs ( unsigned  Start,
unsigned  End,
SmallVectorImpl< MachineBasicBlock * > &  MBBs 
) const

findReachableMBBs - Return a list MBB that can be reached via any branch or fallthroughs. Return true if the list is not empty.

Definition at line 1095 of file LiveIntervalAnalysis.cpp.

References getMBBEndIdx(), llvm::SmallVectorImpl< T >::push_back(), SE, llvm::MachineBasicBlock::succ_begin(), and llvm::MachineBasicBlock::succ_end().

LiveInterval& llvm::LiveIntervals::getOrCreateInterval ( unsigned  reg  )  [inline]

LiveInterval * LiveIntervals::dupInterval ( LiveInterval *  li  ) 

dupInterval - Duplicate a live interval. The caller is responsible for managing the allocated memory.

dupInterval - Duplicate a live interval. The caller is responsible for managing the allocated memory.

Definition at line 1123 of file LiveIntervalAnalysis.cpp.

References llvm::LiveInterval::Copy(), getVNInfoAllocator(), and llvm::LiveInterval::reg.

LiveRange LiveIntervals::addLiveRangeToEndOfBlock ( unsigned  reg,
MachineInstr *  startInst 
)

addLiveRangeToEndOfBlock - Given a register and an instruction, adds a live range from that instruction to the end of its MBB.

Definition at line 2511 of file LiveIntervalAnalysis.cpp.

References llvm::LiveInterval::addRange(), llvm::LiveInterval::InstrSlots::DEF, getInstructionIndex(), getMBBEndIdx(), llvm::LiveInterval::getNextValue(), getOrCreateInterval(), llvm::MachineInstr::getParent(), getVNInfoAllocator(), llvm::VNInfo::kills, llvm::VNInfo::setHasPHIKill(), and VN.

void llvm::LiveIntervals::removeInterval ( unsigned  Reg  )  [inline]

Definition at line 299 of file LiveIntervalAnalysis.h.

Referenced by removeIntervalIfEmpty().

bool llvm::LiveIntervals::isNotInMIMap ( MachineInstr *  instr  )  const [inline]

isNotInMIMap - returns true if the specified machine instr has been removed or was never entered in the map.

Definition at line 307 of file LiveIntervalAnalysis.h.

void llvm::LiveIntervals::RemoveMachineInstrFromMaps ( MachineInstr *  MI  )  [inline]

RemoveMachineInstrFromMaps - This marks the specified machine instr as deleted.

Definition at line 313 of file LiveIntervalAnalysis.h.

References llvm::LiveInterval::InstrSlots::NUM.

Referenced by llvm::SimpleRegisterCoalescing::runOnMachineFunction().

void llvm::LiveIntervals::ReplaceMachineInstrInMaps ( MachineInstr *  MI,
MachineInstr *  NewMI 
) [inline]

ReplaceMachineInstrInMaps - Replacing a machine instr with a new one in maps used by register allocator.

Definition at line 325 of file LiveIntervalAnalysis.h.

References Index, and llvm::LiveInterval::InstrSlots::NUM.

BumpPtrAllocator& llvm::LiveIntervals::getVNInfoAllocator (  )  [inline]

unsigned LiveIntervals::getVNInfoSourceReg ( const VNInfo *  VNI  )  const

getVNInfoSourceReg - Helper function that parses the specified VNInfo copy field and returns the source register that defines it.

getVNInfoSourceReg - Helper function that parses the specified VNInfo copy field and returns the source register that defines it.

Definition at line 1131 of file LiveIntervalAnalysis.cpp.

References llvm::TargetInstrInfo::EXTRACT_SUBREG, llvm::VNInfo::getCopy(), llvm::MachineOperand::getImm(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), llvm::TargetRegisterInfo::getSubReg(), llvm::TargetInstrInfo::INSERT_SUBREG, llvm::TargetInstrInfo::isMoveInstr(), llvm::TargetRegisterInfo::isPhysicalRegister(), llvm_unreachable, Reg, and llvm::TargetInstrInfo::SUBREG_TO_REG.

void LiveIntervals::getAnalysisUsage ( AnalysisUsage &  AU  )  const [virtual]

void LiveIntervals::releaseMemory (  )  [virtual]

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.

Reimplemented from llvm::Pass.

Definition at line 87 of file LiveIntervalAnalysis.cpp.

References llvm::MachineFunction::DeleteMachineInstr(), E, MI, and llvm::BumpPtrAllocator::Reset().

bool LiveIntervals::runOnMachineFunction ( MachineFunction &  fn  )  [virtual]

void LiveIntervals::print ( std::ostream &  O,
const Module *  = 0 
) const [virtual]

print - Implement the dump method.

Reimplemented from llvm::Pass.

Definition at line 519 of file LiveIntervalAnalysis.cpp.

References llvm::MachineFunction::begin(), begin(), E, llvm::MachineFunction::end(), end(), and getInstructionIndex().

Referenced by llvm::SimpleRegisterCoalescing::print(), and print().

void llvm::LiveIntervals::print ( std::ostream *  O,
const Module *  M = 0 
) const [inline]

Reimplemented from llvm::Pass.

Definition at line 351 of file LiveIntervalAnalysis.h.

References M, and print().

std::vector< LiveInterval * > LiveIntervals::addIntervalsForSpills ( const LiveInterval &  i,
SmallVectorImpl< LiveInterval * > &  SpillIs,
const MachineLoopInfo *  loopInfo,
VirtRegMap &  vrm 
)

addIntervalsForSpills - Create new intervals for spilled defs / uses of the given interval. FIXME: It also returns the weight of the spill slot (if any is created) by reference. This is temporary.

Definition at line 2096 of file LiveIntervalAnalysis.cpp.

References addIntervalsForSpillsFast(), llvm::VirtRegMap::addKillPoint(), llvm::MachineInstr::addOperand(), llvm::VirtRegMap::addRestorePoint(), llvm::VirtRegMap::addSpillPoint(), llvm::VirtRegMap::assignVirt2StackSlot(), llvm::TargetInstrDesc::canFoldAsLoad(), llvm::SmallVectorImpl< T >::clear(), llvm::MachineFunction::CloneMachineInstr(), llvm::SmallPtrSet< PtrType, SmallSize >::count(), llvm::MachineOperand::CreateReg(), llvm::VNInfo::def, DOUT, E, llvm::SmallVectorImpl< T >::empty(), llvm::LiveInterval::empty(), EnableFastSpilling, llvm::LiveRange::end, llvm::BitVector::find_first(), llvm::BitVector::find_next(), llvm::MachineInstr::findRegisterUseOperandIdx(), getApproximateInstructionCount(), getBaseIndex(), getDefIndex(), llvm::MachineInstr::getDesc(), getInstructionFromIndex(), getInterval(), llvm::VirtRegMap::getKillPoint(), getLoadIndex(), llvm::MachineFunction::getNumBlockIDs(), llvm::MachineInstr::getNumOperands(), llvm::LiveInterval::getNumValNums(), llvm::MachineInstr::getOperand(), getOrCreateInterval(), llvm::VirtRegMap::getPreSplitReg(), llvm::MachineOperand::getReg(), llvm::MachineRegisterInfo::getRegClass(), llvm::VirtRegMap::getReMaterializedMI(), llvm::VirtRegMap::getStackSlot(), getStoreIndex(), getUseIndex(), llvm::VNInfo::hasPHIKill(), HUGE_VALF, llvm::VNInfo::id, llvm::SmallPtrSet< PtrType, SmallSize >::insert(), intervalIsInOneMBB(), llvm::MachineOperand::isDef(), llvm::VNInfo::isDefAccurate(), llvm::TargetInstrInfo::isLoadFromStackSlot(), llvm::MachineOperand::isReg(), llvm::MachineInstr::isRegTiedToDefOperand(), isReMaterializable(), llvm::VirtRegMap::isReMaterialized(), llvm::VNInfo::isUnused(), LI, llvm::VirtRegMap::MAX_STACK_SLOT, llvm::VirtRegMap::NO_STACK_SLOT, llvm::LiveInterval::InstrSlots::NUM, llvm::LiveInterval::print(), llvm::SmallVectorImpl< T >::push_back(), llvm::LiveInterval::ranges, llvm::LiveInterval::reg, llvm::MachineInstr::registerDefIsDead(), llvm::VirtRegMap::removeKillPoint(), llvm::LiveInterval::removeRange(), llvm::SmallVectorImpl< T >::resize(), llvm::BitVector::set(), llvm::MachineOperand::setIsKill(), llvm::VirtRegMap::setIsSplitFromReg(), SplitAtBB, SplitLimit, VN, llvm::LiveInterval::vni_begin(), llvm::LiveInterval::vni_end(), and llvm::LiveInterval::weight.

std::vector< LiveInterval * > LiveIntervals::addIntervalsForSpillsFast ( const LiveInterval &  li,
const MachineLoopInfo *  loopInfo,
VirtRegMap &  vrm 
)

bool LiveIntervals::spillPhysRegAroundRegDefsUses ( const LiveInterval &  li,
unsigned  PhysReg,
VirtRegMap &  vrm 
)

bool LiveIntervals::isReMaterializable ( const LiveInterval &  li,
SmallVectorImpl< LiveInterval * > &  SpillIs,
bool &  isLoad 
)

isReMaterializable - Returns true if every definition of MI of every val# of the specified interval is re-materializable. Also returns true by reference if all of the defs are load instructions.

isReMaterializable - Returns true if every definition of MI of every val# of the specified interval is re-materializable.

Definition at line 1325 of file LiveIntervalAnalysis.cpp.

References llvm::VNInfo::def, getInstructionFromIndex(), llvm::VNInfo::isDefAccurate(), llvm::VNInfo::isUnused(), llvm::LiveInterval::vni_begin(), and llvm::LiveInterval::vni_end().

Referenced by addIntervalsForSpills(), isReMaterializable(), and llvm::SimpleRegisterCoalescing::runOnMachineFunction().

bool LiveIntervals::isReMaterializable ( const LiveInterval &  li,
const VNInfo *  ValNo,
MachineInstr *  MI 
)

isReMaterializable - Returns true if the definition MI of the specified val# of the specified interval is re-materializable.

isReMaterializable - Returns true if the definition MI of the specified val# of the specified interval is re-materializable.

Definition at line 1316 of file LiveIntervalAnalysis.cpp.

References isReMaterializable().

unsigned LiveIntervals::getRepresentativeReg ( unsigned  Reg  )  const

getRepresentativeReg - Find the largest super register of the specified physical register.

getRepresentativeReg - Find the largest super register of the specified physical register.

Definition at line 2426 of file LiveIntervalAnalysis.cpp.

References llvm::TargetRegisterInfo::getSuperRegisters(), and hasInterval().

Referenced by getNumConflictsWithPhysReg(), and spillPhysRegAroundRegDefsUses().

unsigned LiveIntervals::getNumConflictsWithPhysReg ( const LiveInterval &  li,
unsigned  PhysReg 
) const

getNumConflictsWithPhysReg - Return the number of uses and defs of the specified interval that conflicts with the specified physical register.

getNumConflictsWithPhysReg - Return the number of uses and defs of the specified interval that conflicts with the specified physical register.

Definition at line 2441 of file LiveIntervalAnalysis.cpp.

References E, getInstructionIndex(), getInterval(), llvm::MachineOperand::getParent(), getRepresentativeReg(), llvm::LiveInterval::liveAt(), llvm::LiveInterval::reg, llvm::MachineRegisterInfo::reg_begin(), and llvm::MachineRegisterInfo::reg_end().

void LiveIntervals::processImplicitDefs (  ) 

processImplicitDefs - Process IMPLICIT_DEF instructions. Add isUndef marker to implicit_def defs and their uses.

processImplicitDefs - Process IMPLICIT_DEF instructions and make sure there is one implicit_def for each use. Add isUndef marker to implicit_def defs and their uses.

Definition at line 129 of file LiveIntervalAnalysis.cpp.

References llvm::MachineBasicBlock::begin(), llvm::MachineFunction::begin(), CanTurnIntoImplicitDef(), llvm::SmallVectorImpl< T >::clear(), llvm::SmallSet< T, N >::clear(), llvm::SmallSet< T, N >::count(), llvm::MachineRegisterInfo::createVirtualRegister(), DE, llvm::MachineRegisterInfo::def_begin(), llvm::MachineRegisterInfo::def_end(), llvm::df_ext_begin(), llvm::df_ext_end(), E, llvm::MachineBasicBlock::end(), Entry, llvm::SmallSet< T, N >::erase(), llvm::MachineInstr::eraseFromParent(), llvm::TargetInstrInfo::get(), llvm::MachineInstr::getNumOperands(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineInstr::getParent(), llvm::MachineOperand::getReg(), llvm::MachineRegisterInfo::getRegClass(), llvm::TargetInstrInfo::IMPLICIT_DEF, llvm::SmallSet< T, N >::insert(), llvm::MachineOperand::isDef(), llvm::MachineOperand::isKill(), llvm::TargetInstrInfo::isMoveInstr(), llvm::TargetRegisterInfo::isPhysicalRegister(), llvm::MachineOperand::isReg(), llvm::MachineInstr::isRegTiedToDefOperand(), llvm::MachineOperand::isUndef(), llvm::MachineOperand::isUse(), MBB, MI, llvm::SmallVectorImpl< T >::push_back(), Reg, llvm::MachineInstr::RemoveOperand(), llvm::MachineInstr::setDesc(), llvm::MachineOperand::setIsKill(), llvm::MachineOperand::setIsUndef(), llvm::MachineOperand::setReg(), llvm::SmallVectorImpl< T >::size(), llvm::MachineRegisterInfo::use_begin(), llvm::MachineRegisterInfo::use_end(), and Visited.

Referenced by runOnMachineFunction().

void LiveIntervals::computeNumbering (  ) 

void LiveIntervals::scaleNumbering ( int  factor  ) 

scaleNumbering - Rescale interval numbers to introduce gaps for new instructions

Definition at line 446 of file LiveIntervalAnalysis.cpp.

References begin(), llvm::MachineFunction::begin(), end(), llvm::MachineFunction::end(), llvm::MachineBasicBlock::getNumber(), LE, LI, MBB, MI, and llvm::LiveInterval::InstrSlots::scale().

bool LiveIntervals::intervalIsInOneMBB ( const LiveInterval &  li  )  const

intervalIsInOneMBB - Returns true if the specified interval is entirely within a single basic block.

Definition at line 1450 of file LiveIntervalAnalysis.cpp.

References E, II, llvm::SmallPtrSet< PtrType, SmallSize >::insert(), llvm::LiveInterval::ranges, and llvm::SmallPtrSetImpl::size().

Referenced by addIntervalsForSpills().


Member Data Documentation

char LiveIntervals::ID = 0 [static]

Definition at line 101 of file LiveIntervalAnalysis.h.


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