LLVM API Documentation
#include <LiveIntervalAnalysis.h>
Definition at line 59 of file LiveIntervalAnalysis.h.
| 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.
| llvm::LiveIntervals::LiveIntervals | ( | ) | [inline] |
Definition at line 102 of file LiveIntervalAnalysis.h.
Definition at line 104 of file LiveIntervalAnalysis.h.
References llvm::LiveInterval::InstrSlots::NUM.
Referenced by addIntervalsForSpills(), conflictsWithPhysRegDef(), conflictsWithPhysRegRef(), findGapBeforeInstr(), getBoundaryIndex(), getDefIndex(), getLoadIndex(), getStoreIndex(), getUseIndex(), hasGapAfterInstr(), and hasGapBeforeInstr().
Definition at line 107 of file LiveIntervalAnalysis.h.
References getBaseIndex(), and llvm::LiveInterval::InstrSlots::NUM.
Definition at line 110 of file LiveIntervalAnalysis.h.
References getBaseIndex(), and llvm::LiveInterval::InstrSlots::LOAD.
Referenced by addIntervalsForSpills(), addIntervalsForSpillsFast(), and spillPhysRegAroundRegDefsUses().
Definition at line 113 of file LiveIntervalAnalysis.h.
References getBaseIndex(), and llvm::LiveInterval::InstrSlots::USE.
Referenced by addIntervalsForSpills(), and addIntervalsForSpillsFast().
Definition at line 116 of file LiveIntervalAnalysis.h.
References llvm::LiveInterval::InstrSlots::DEF, and getBaseIndex().
Referenced by addIntervalsForSpills(), addIntervalsForSpillsFast(), and PropagateDeadness().
Definition at line 119 of file LiveIntervalAnalysis.h.
References getBaseIndex(), and llvm::LiveInterval::InstrSlots::STORE.
Referenced by addIntervalsForSpills(), addIntervalsForSpillsFast(), and spillPhysRegAroundRegDefsUses().
| 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] |
Definition at line 129 of file LiveIntervalAnalysis.h.
Referenced by computeNumbering(), print(), llvm::SimpleRegisterCoalescing::runOnMachineFunction(), and scaleNumbering().
| const_iterator llvm::LiveIntervals::end | ( | ) | const [inline] |
Definition at line 130 of file LiveIntervalAnalysis.h.
Referenced by computeNumbering(), conflictsWithPhysRegDef(), conflictsWithPhysRegRef(), print(), llvm::SimpleRegisterCoalescing::runOnMachineFunction(), and scaleNumbering().
| 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] |
| LiveInterval& llvm::LiveIntervals::getInterval | ( | unsigned | reg | ) | [inline] |
Definition at line 135 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 141 of file LiveIntervalAnalysis.h.
Definition at line 147 of file LiveIntervalAnalysis.h.
Referenced by llvm::VirtRegMap::FindUnusedRegisters(), 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 153 of file LiveIntervalAnalysis.h.
References llvm::MachineBasicBlock::getNumber().
Referenced by computeNumbering(), and isLiveIn().
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().
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] |
getInstructionIndex - returns the base index of instr
Definition at line 202 of file LiveIntervalAnalysis.h.
Referenced by addIntervalsForSpillsFast(), addLiveRangeToEndOfBlock(), getConflictWeight(), getNumConflictsWithPhysReg(), llvm::IntervalPrefixPrinter::operator()(), 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 210 of file LiveIntervalAnalysis.h.
References llvm::LiveInterval::InstrSlots::NUM.
Referenced by addIntervalsForSpills(), conflictsWithPhysRegDef(), conflictsWithPhysRegRef(), findGapBeforeInstr(), hasGapAfterInstr(), hasGapBeforeInstr(), isReMaterializable(), and PropagateDeadness().
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.
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.
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 | |||
| ) |
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 579 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::LiveInterval::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 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] |
Definition at line 281 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 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] |
| 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] |
Definition at line 337 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 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] |
getAnalysisUsage - Subclasses that override getAnalysisUsage must call this.
For MachineFunctionPasses, calling AU.preservesCFG() indicates that the pass does not modify the MachineBasicBlock CFG.
Reimplemented from llvm::MachineFunctionPass.
Definition at line 69 of file LiveIntervalAnalysis.cpp.
References llvm::AnalysisUsage::addPreserved(), llvm::AnalysisUsage::addPreservedID(), llvm::AnalysisUsage::addRequired(), llvm::AnalysisUsage::addRequiredID(), llvm::MachineFunctionPass::getAnalysisUsage(), llvm::MachineDominatorsID, llvm::MachineLoopInfoID, llvm::PHIEliminationID, llvm::AnalysisUsage::setPreservesCFG(), 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 87 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 498 of file LiveIntervalAnalysis.cpp.
References computeNumbering(), DEBUG, llvm::Pass::dump(), llvm::TargetRegisterInfo::getAllocatableSet(), llvm::TargetMachine::getInstrInfo(), getNumIntervals(), llvm::MachineFunction::getRegInfo(), llvm::TargetMachine::getRegisterInfo(), llvm::MachineFunction::getTarget(), and processImplicitDefs().
| 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] |
| 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 | |||
| ) |
addIntervalsForSpillsFast - Quickly create new intervals for spilled defs / uses without remat or splitting.
Definition at line 2008 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::LiveInterval::getNextValue(), llvm::MachineInstr::getNumOperands(), llvm::MachineInstr::getOperand(), getOrCreateInterval(), llvm::MachineOperand::getReg(), llvm::MachineRegisterInfo::getRegClass(), getStoreIndex(), getUseIndex(), getVNInfoAllocator(), llvm::VirtRegMap::grow(), HUGE_VALF, 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().
| bool LiveIntervals::spillPhysRegAroundRegDefsUses | ( | const LiveInterval & | li, | |
| unsigned | PhysReg, | |||
| VirtRegMap & | vrm | |||
| ) |
spillPhysRegAroundRegDefsUses - Spill the specified physical register around all defs and uses of the specified interval. Return true if it was able to cut its interval.
spillPhysRegAroundRegDefsUses - Spill the specified physical register around all defs and uses of the specified interval. Return true if it was able to cut its interval.
Definition at line 2459 of file LiveIntervalAnalysis.cpp.
References llvm::VirtRegMap::addEmergencySpill(), 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::llvm_report_error(), llvm::MachineInstr::print(), llvm::LiveInterval::reg, llvm::MachineRegisterInfo::reg_begin(), llvm::MachineRegisterInfo::reg_end(), llvm::LiveInterval::removeRange(), and llvm::raw_string_ostream::str().
| 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().
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 | ( | ) |
computeNumbering - Compute the index numbering.
Definition at line 257 of file LiveIntervalAnalysis.cpp.
References llvm::LoopInfo::begin(), llvm::MachineBasicBlock::begin(), begin(), llvm::MachineFunction::begin(), llvm::VNInfo::def, E, llvm::LoopInfo::end(), llvm::MachineBasicBlock::end(), end(), llvm::MachineFunction::end(), llvm::MachineBasicBlock::getFirstTerminator(), getMBBEndIdx(), getMBBStartIdx(), llvm::MachineBasicBlock::getNumber(), llvm::MachineFunction::getNumBlockIDs(), index, llvm::VNInfo::isDefAccurate(), llvm::VNInfo::isUnused(), llvm::VNInfo::kills, LE, LI, llvm::LiveInterval::InstrSlots::LOAD, MBB, and llvm::LiveInterval::InstrSlots::NUM.
Referenced by runOnMachineFunction().
| 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().
char LiveIntervals::ID = 0 [static] |
Definition at line 101 of file LiveIntervalAnalysis.h.