LLVM API Documentation
#include <LiveIntervalAnalysis.h>
Definition at line 58 of file LiveIntervalAnalysis.h.
| typedef Reg2IntervalMap::iterator llvm::LiveIntervals::iterator |
Definition at line 132 of file LiveIntervalAnalysis.h.
| typedef Reg2IntervalMap::const_iterator llvm::LiveIntervals::const_iterator |
Definition at line 133 of file LiveIntervalAnalysis.h.
| llvm::LiveIntervals::LiveIntervals | ( | ) | [inline] |
Definition at line 97 of file LiveIntervalAnalysis.h.
Definition at line 109 of file LiveIntervalAnalysis.h.
References llvm::LiveIntervals::InstrSlots::NUM.
Referenced by addIntervalsForSpills(), conflictsWithPhysRegDef(), conflictsWithPhysRegRef(), findGapBeforeInstr(), getBoundaryIndex(), getDefIndex(), getLoadIndex(), getStoreIndex(), getUseIndex(), and hasGapBeforeInstr().
Definition at line 112 of file LiveIntervalAnalysis.h.
References getBaseIndex(), and llvm::LiveIntervals::InstrSlots::NUM.
Definition at line 115 of file LiveIntervalAnalysis.h.
References getBaseIndex(), and llvm::LiveIntervals::InstrSlots::LOAD.
Referenced by addIntervalsForSpills(), addIntervalsForSpillsFast(), and spillPhysRegAroundRegDefsUses().
Definition at line 118 of file LiveIntervalAnalysis.h.
References getBaseIndex(), and llvm::LiveIntervals::InstrSlots::USE.
Referenced by addIntervalsForSpills(), and addIntervalsForSpillsFast().
Definition at line 121 of file LiveIntervalAnalysis.h.
References llvm::LiveIntervals::InstrSlots::DEF, and getBaseIndex().
Referenced by addIntervalsForSpills(), addIntervalsForSpillsFast(), and PropagateDeadness().
Definition at line 124 of file LiveIntervalAnalysis.h.
References getBaseIndex(), and llvm::LiveIntervals::InstrSlots::STORE.
Referenced by addIntervalsForSpills(), addIntervalsForSpillsFast(), and spillPhysRegAroundRegDefsUses().
| static float llvm::LiveIntervals::getSpillWeight | ( | bool | isDef, | |
| bool | isUse, | |||
| unsigned | loopDepth | |||
| ) | [inline, static] |
Definition at line 128 of file LiveIntervalAnalysis.h.
References F.
Referenced by addIntervalsForSpills(), addIntervalsForSpillsFast(), and llvm::SimpleRegisterCoalescing::runOnMachineFunction().
| const_iterator llvm::LiveIntervals::begin | ( | ) | const [inline] |
Definition at line 134 of file LiveIntervalAnalysis.h.
Referenced by computeNumbering(), print(), and llvm::SimpleRegisterCoalescing::runOnMachineFunction().
| const_iterator llvm::LiveIntervals::end | ( | ) | const [inline] |
Definition at line 135 of file LiveIntervalAnalysis.h.
Referenced by computeNumbering(), conflictsWithPhysRegDef(), conflictsWithPhysRegRef(), print(), and llvm::SimpleRegisterCoalescing::runOnMachineFunction().
| iterator llvm::LiveIntervals::begin | ( | ) | [inline] |
Definition at line 136 of file LiveIntervalAnalysis.h.
| iterator llvm::LiveIntervals::end | ( | ) | [inline] |
Definition at line 137 of file LiveIntervalAnalysis.h.
| unsigned llvm::LiveIntervals::getNumIntervals | ( | ) | const [inline] |
| LiveInterval& llvm::LiveIntervals::getInterval | ( | unsigned | reg | ) | [inline] |
Definition at line 140 of file LiveIntervalAnalysis.h.
Referenced by addIntervalsForSpills(), addStackInterval(), getNumConflictsWithPhysReg(), llvm::SimpleRegisterCoalescing::getRepIntervalSize(), removeIntervalIfEmpty(), removeRange(), llvm::SimpleRegisterCoalescing::runOnMachineFunction(), and spillPhysRegAroundRegDefsUses().
| const LiveInterval& llvm::LiveIntervals::getInterval | ( | unsigned | reg | ) | const [inline] |
Definition at line 146 of file LiveIntervalAnalysis.h.
| bool llvm::LiveIntervals::hasInterval | ( | unsigned | reg | ) | const [inline] |
Definition at line 152 of file LiveIntervalAnalysis.h.
Referenced by llvm::SimpleRegisterCoalescing::getRepIntervalSize(), getRepresentativeReg(), removeIntervalIfEmpty(), removeRange(), llvm::SimpleRegisterCoalescing::runOnMachineFunction(), and spillPhysRegAroundRegDefsUses().
| unsigned llvm::LiveIntervals::getMBBStartIdx | ( | MachineBasicBlock * | MBB | ) | const [inline] |
getMBBStartIdx - Return the base index of the first instruction in the specified MachineBasicBlock.
Definition at line 158 of file LiveIntervalAnalysis.h.
References llvm::MachineBasicBlock::getNumber().
Referenced by computeNumbering(), and isLiveIn().
Definition at line 161 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 168 of file LiveIntervalAnalysis.h.
References llvm::MachineBasicBlock::getNumber().
Referenced by addLiveRangeToEndOfBlock(), computeNumbering(), findReachableMBBs(), and getMBBFromIndex().
Definition at line 171 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 179 of file LiveIntervalAnalysis.h.
References llvm::LiveInterval::getSize(), and llvm::LiveIntervals::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 185 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 192 of file LiveIntervalAnalysis.h.
References getMBBEndIdx().
| unsigned llvm::LiveIntervals::getInstructionIndex | ( | MachineInstr * | instr | ) | const [inline] |
getInstructionIndex - returns the base index of instr
Definition at line 207 of file LiveIntervalAnalysis.h.
Referenced by addIntervalsForSpillsFast(), addLiveRangeToEndOfBlock(), getConflictWeight(), getNumConflictsWithPhysReg(), print(), and spillPhysRegAroundRegDefsUses().
| 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 215 of file LiveIntervalAnalysis.h.
References llvm::LiveIntervals::InstrSlots::NUM.
Referenced by addIntervalsForSpills(), conflictsWithPhysRegDef(), conflictsWithPhysRegRef(), findGapBeforeInstr(), 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 224 of file LiveIntervalAnalysis.h.
References getBaseIndex(), getInstructionFromIndex(), and llvm::LiveIntervals::InstrSlots::NUM.
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 232 of file LiveIntervalAnalysis.h.
References getBaseIndex(), getInstructionFromIndex(), and llvm::LiveIntervals::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 248 of file LiveIntervalAnalysis.h.
References llvm::LiveIntervals::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 288 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::LiveIntervals::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 | |||
| ) |
conflictsWithPhysRegRef - Similar to conflictsWithPhysRegRef except it can check use as well.
conflictsWithPhysRegRef - Similar to conflictsWithPhysRegRef except it can check use as well.
Definition at line 328 of file LiveIntervalAnalysis.cpp.
References llvm::SmallPtrSet< PtrType, SmallSize >::count(), E, end(), getBaseIndex(), getInstructionFromIndex(), llvm::MachineInstr::getNumOperands(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), index, llvm::MachineOperand::isReg(), llvm::TargetRegisterInfo::isSubRegister(), llvm::MachineOperand::isUse(), llvm::TargetRegisterInfo::isVirtualRegister(), MI, llvm::LiveIntervals::InstrSlots::NUM, and llvm::LiveInterval::ranges.
| 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 789 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 805 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] |
Definition at line 279 of file LiveIntervalAnalysis.h.
Referenced by addIntervalsForSpills(), addIntervalsForSpillsFast(), addLiveRangeToEndOfBlock(), and isLiveIn().
| 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 833 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 2262 of file LiveIntervalAnalysis.cpp.
References llvm::LiveInterval::addRange(), llvm::LiveIntervals::InstrSlots::DEF, getInstructionIndex(), getMBBEndIdx(), llvm::LiveInterval::getNextValue(), getOrCreateInterval(), llvm::MachineInstr::getParent(), getVNInfoAllocator(), llvm::VNInfo::hasPHIKill, llvm::VNInfo::kills, llvm::SmallVectorImpl< T >::push_back(), and VN.
| void llvm::LiveIntervals::removeInterval | ( | unsigned | Reg | ) | [inline] |
| bool llvm::LiveIntervals::isRemoved | ( | MachineInstr * | instr | ) | const [inline] |
isRemoved - returns true if the specified machine instr has been removed.
Definition at line 305 of file LiveIntervalAnalysis.h.
| void llvm::LiveIntervals::RemoveMachineInstrFromMaps | ( | MachineInstr * | MI | ) | [inline] |
RemoveMachineInstrFromMaps - This marks the specified machine instr as deleted.
Definition at line 311 of file LiveIntervalAnalysis.h.
References llvm::LiveIntervals::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 323 of file LiveIntervalAnalysis.h.
References Index, and llvm::LiveIntervals::InstrSlots::NUM.
| BumpPtrAllocator& llvm::LiveIntervals::getVNInfoAllocator | ( | ) | [inline] |
Definition at line 335 of file LiveIntervalAnalysis.h.
Referenced by addIntervalsForSpillsFast(), addLiveRangeToEndOfBlock(), and dupInterval().
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 841 of file LiveIntervalAnalysis.cpp.
References llvm::VNInfo::copy, llvm::TargetInstrInfo::EXTRACT_SUBREG, 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(), and Reg.
| void LiveIntervals::getAnalysisUsage | ( | AnalysisUsage & | ) | const [virtual] |
getAnalysisUsage - This function should be overriden by passes that need analysis information to do their job. If a pass specifies that it uses a particular analysis result to this function, it can then use the getAnalysis<AnalysisType>() function, below.
Reimplemented from llvm::Pass.
Definition at line 63 of file LiveIntervalAnalysis.cpp.
References llvm::AnalysisUsage::addPreserved(), llvm::AnalysisUsage::addPreservedID(), llvm::AnalysisUsage::addRequired(), llvm::AnalysisUsage::addRequiredID(), llvm::Pass::getAnalysisUsage(), llvm::MachineDominatorsID, llvm::MachineLoopInfoID, llvm::PHIEliminationID, llvm::StrongPHIElim, and llvm::TwoAddressInstructionPassID.
| 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 80 of file LiveIntervalAnalysis.cpp.
References llvm::MachineFunction::DeleteMachineInstr(), E, MI, and llvm::BumpPtrAllocator::Reset().
| bool LiveIntervals::runOnMachineFunction | ( | MachineFunction & | fn | ) | [virtual] |
runOnMachineFunction - pass entry point
runOnMachineFunction - Register allocate the whole function
Implements llvm::MachineFunctionPass.
Definition at line 248 of file LiveIntervalAnalysis.cpp.
References computeNumbering(), DEBUG, llvm::Pass::dump(), llvm::TargetRegisterInfo::getAllocatableSet(), llvm::TargetMachine::getInstrInfo(), getNumIntervals(), llvm::MachineFunction::getRegInfo(), llvm::TargetMachine::getRegisterInfo(), and llvm::MachineFunction::getTarget().
| void LiveIntervals::print | ( | std::ostream & | O, | |
| const Module * | = 0 | |||
| ) | const [virtual] |
print - Implement the dump method.
Reimplemented from llvm::Pass.
Definition at line 268 of file LiveIntervalAnalysis.cpp.
References llvm::MachineFunction::begin(), begin(), E, llvm::MachineFunction::end(), end(), getInstructionIndex(), and llvm::Intrinsic::getName().
Referenced by llvm::SimpleRegisterCoalescing::print(), and print().
| void llvm::LiveIntervals::print | ( | std::ostream * | O, | |
| const Module * | M = 0 | |||
| ) | const [inline] |
| std::vector< LiveInterval * > LiveIntervals::addIntervalsForSpills | ( | const LiveInterval & | i, | |
| SmallVectorImpl< LiveInterval * > & | SpillIs, | |||
| const MachineLoopInfo * | loopInfo, | |||
| VirtRegMap & | vrm, | |||
| float & | SSWeight | |||
| ) |
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 1840 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::LiveInterval::empty(), llvm::SmallVectorImpl< T >::empty(), EnableFastSpilling, llvm::LiveRange::end, llvm::BitVector::find_first(), llvm::BitVector::find_next(), llvm::MachineInstr::findRegisterUseOperandIdx(), getApproximateInstructionCount(), getBaseIndex(), llvm::MachineFunction::getBlockNumbered(), getDefIndex(), llvm::MachineInstr::getDesc(), getInstructionFromIndex(), getInterval(), llvm::VirtRegMap::getKillPoint(), getLoadIndex(), llvm::MachineLoopInfo::getLoopDepth(), llvm::MachineFunction::getNumBlockIDs(), llvm::MachineInstr::getNumOperands(), llvm::LiveInterval::getNumValNums(), llvm::MachineInstr::getOperand(), llvm::TargetInstrDesc::getOperandConstraint(), getOrCreateInterval(), llvm::VirtRegMap::getPreSplitReg(), llvm::MachineOperand::getReg(), llvm::MachineRegisterInfo::getRegClass(), llvm::VirtRegMap::getReMaterializedMI(), getSpillWeight(), llvm::VirtRegMap::getStackSlot(), getStoreIndex(), getUseIndex(), llvm::VNInfo::hasPHIKill, HUGE_VALF, llvm::VNInfo::id, llvm::SmallPtrSet< PtrType, SmallSize >::insert(), intervalIsInOneMBB(), llvm::MachineOperand::isDef(), llvm::MachineOperand::isImplicit(), llvm::TargetInstrInfo::isLoadFromStackSlot(), llvm::MachineOperand::isReg(), isReMaterializable(), llvm::VirtRegMap::isReMaterialized(), LI, llvm::VirtRegMap::MAX_STACK_SLOT, llvm::LiveIntervals::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, llvm::TOI::TIED_TO, 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, | |||
| float & | SSWeight | |||
| ) |
addIntervalsForSpillsFast - Quickly create new intervals for spilled defs / uses without remat or splitting.
Definition at line 1738 of file LiveIntervalAnalysis.cpp.
References llvm::LiveInterval::addRange(), llvm::VirtRegMap::addRestorePoint(), llvm::VirtRegMap::addSpillPoint(), llvm::VirtRegMap::assignVirt2StackSlot(), llvm::SmallVectorImpl< T >::begin(), llvm::MachineRegisterInfo::createVirtualRegister(), DEBUG, DOUT, llvm::LiveInterval::dump(), E, llvm::SmallVectorImpl< T >::end(), getDefIndex(), getInstructionIndex(), getLoadIndex(), llvm::MachineLoopInfo::getLoopDepth(), llvm::LiveInterval::getNextValue(), llvm::MachineInstr::getNumOperands(), llvm::MachineInstr::getOperand(), getOrCreateInterval(), llvm::MachineInstr::getParent(), llvm::MachineOperand::getReg(), llvm::MachineRegisterInfo::getRegClass(), getSpillWeight(), getStoreIndex(), getUseIndex(), getVNInfoAllocator(), llvm::VirtRegMap::grow(), HUGE_VALF, Indices, llvm::MachineOperand::isDef(), llvm::MachineOperand::isReg(), llvm::MachineOperand::isUse(), llvm::SmallVectorImpl< T >::push_back(), llvm::LiveInterval::reg, llvm::MachineRegisterInfo::reg_begin(), llvm::MachineRegisterInfo::reg_end(), llvm::MachineOperand::setIsKill(), llvm::MachineOperand::setReg(), and llvm::LiveInterval::weight.
Referenced by addIntervalsForSpills().
| void LiveIntervals::spillPhysRegAroundRegDefsUses | ( | const LiveInterval & | li, | |
| unsigned | PhysReg, | |||
| VirtRegMap & | vrm | |||
| ) |
spillPhysRegAroundRegDefsUses - Spill the specified physical register around all defs and uses of the specified interval.
spillPhysRegAroundRegDefsUses - Spill the specified physical register around all defs and uses of the specified interval.
Definition at line 2215 of file LiveIntervalAnalysis.cpp.
References llvm::VirtRegMap::addEmergencySpill(), llvm::cerr(), llvm::SmallPtrSet< PtrType, SmallSize >::count(), E, llvm::TargetRegisterInfo::getAliasSet(), getInstructionIndex(), getInterval(), getLoadIndex(), llvm::MachineInstr::getOpcode(), llvm::MachineOperand::getParent(), getRepresentativeReg(), getStoreIndex(), llvm::TargetRegisterInfo::getSubRegisters(), hasInterval(), llvm::TargetInstrInfo::INLINEASM, llvm::SmallPtrSet< PtrType, SmallSize >::insert(), llvm::LiveInterval::isInOneLiveRange(), llvm::TargetRegisterInfo::isSuperRegister(), llvm::LiveInterval::liveAt(), llvm::MachineInstr::print(), llvm::LiveInterval::reg, llvm::MachineRegisterInfo::reg_begin(), llvm::MachineRegisterInfo::reg_end(), and llvm::LiveInterval::removeRange().
| 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 1030 of file LiveIntervalAnalysis.cpp.
References llvm::VNInfo::def, getInstructionFromIndex(), 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 1021 of file LiveIntervalAnalysis.cpp.
References isReMaterializable().
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 2183 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 2198 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::computeNumbering | ( | ) |
computeNumbering - Compute the index numbering.
Definition at line 100 of file LiveIntervalAnalysis.cpp.
References llvm::LoopInfo::begin(), begin(), llvm::MachineBasicBlock::begin(), llvm::MachineFunction::begin(), llvm::VNInfo::def, E, llvm::LoopInfo::end(), end(), llvm::MachineBasicBlock::end(), llvm::MachineFunction::end(), getMBBEndIdx(), getMBBStartIdx(), llvm::MachineBasicBlock::getNumber(), llvm::MachineFunction::getNumBlockIDs(), index, llvm::VNInfo::kills, LE, LI, llvm::LiveIntervals::InstrSlots::LOAD, MBB, llvm::LiveIntervals::InstrSlots::NUM, offset, and llvm::SmallVectorImpl< T >::size().
Referenced by runOnMachineFunction().
| bool LiveIntervals::intervalIsInOneMBB | ( | const LiveInterval & | li | ) | const |
intervalIsInOneMBB - Returns true if the specified interval is entirely within a single basic block.
Definition at line 1159 of file LiveIntervalAnalysis.cpp.
References E, II, llvm::SmallPtrSet< PtrType, SmallSize >::insert(), llvm::LiveInterval::ranges, and llvm::SmallPtrSetImpl::size().
Referenced by addIntervalsForSpills().
char LiveIntervals::ID = 0 [static] |
Definition at line 96 of file LiveIntervalAnalysis.h.