LLVM API Documentation
#include <LiveInterval.h>
Definition at line 248 of file LiveInterval.h.
| typedef SmallVector<LiveRange,4> llvm::LiveInterval::Ranges |
Definition at line 251 of file LiveInterval.h.
| typedef SmallVector<VNInfo*,4> llvm::LiveInterval::VNInfoList |
Definition at line 252 of file LiveInterval.h.
| typedef Ranges::iterator llvm::LiveInterval::iterator |
Definition at line 285 of file LiveInterval.h.
| typedef Ranges::const_iterator llvm::LiveInterval::const_iterator |
Definition at line 289 of file LiveInterval.h.
| typedef VNInfoList::iterator llvm::LiveInterval::vni_iterator |
Definition at line 293 of file LiveInterval.h.
| typedef VNInfoList::const_iterator llvm::LiveInterval::const_vni_iterator |
Definition at line 297 of file LiveInterval.h.
| iterator llvm::LiveInterval::begin | ( | ) | [inline] |
Definition at line 286 of file LiveInterval.h.
References ranges.
Referenced by FindLiveRangeContaining(), getSize(), isOnlyLROfValNo(), join(), MergeInClobberRange(), MergeInClobberRanges(), MergeRangesInAsValue(), MergeValueInAsValue(), MergeValueNumberInto(), overlaps(), overlapsFrom(), removeRange(), and scaleNumbering().
| iterator llvm::LiveInterval::end | ( | ) | [inline] |
Definition at line 287 of file LiveInterval.h.
References ranges.
Referenced by advanceTo(), FindLiveRangeContaining(), getLiveRangeContaining(), getSize(), isOnlyLROfValNo(), join(), MergeInClobberRange(), MergeInClobberRanges(), MergeRangesInAsValue(), MergeValueInAsValue(), MergeValueNumberInto(), overlaps(), overlapsFrom(), removeRange(), removeRange(), and scaleNumbering().
| const_iterator llvm::LiveInterval::begin | ( | ) | const [inline] |
| const_iterator llvm::LiveInterval::end | ( | ) | const [inline] |
| vni_iterator llvm::LiveInterval::vni_begin | ( | ) | [inline] |
Definition at line 294 of file LiveInterval.h.
References valnos.
Referenced by llvm::LiveIntervals::addIntervalsForSpills(), findDefinedVNInfo(), llvm::LiveIntervals::isReMaterializable(), print(), and scaleNumbering().
| vni_iterator llvm::LiveInterval::vni_end | ( | ) | [inline] |
Definition at line 295 of file LiveInterval.h.
References valnos.
Referenced by llvm::LiveIntervals::addIntervalsForSpills(), findDefinedVNInfo(), llvm::LiveIntervals::isReMaterializable(), print(), and scaleNumbering().
| const_vni_iterator llvm::LiveInterval::vni_begin | ( | ) | const [inline] |
| const_vni_iterator llvm::LiveInterval::vni_end | ( | ) | const [inline] |
advanceTo - Advance the specified iterator to point to the LiveRange containing the specified position, or end() if the position is past the end of the interval. If no LiveRange contains this position, but the position is in a hole, this method returns an iterator pointing the the LiveRange immediately after the hole.
Definition at line 306 of file LiveInterval.h.
References end(), and endNumber().
| void llvm::LiveInterval::clear | ( | ) | [inline] |
| bool llvm::LiveInterval::isStackSlot | ( | ) | const [inline] |
isStackSlot - Return true if this is a stack slot interval.
Definition at line 325 of file LiveInterval.h.
References reg.
Referenced by getStackSlotIndex(), and print().
| int llvm::LiveInterval::getStackSlotIndex | ( | ) | const [inline] |
getStackSlotIndex - Return stack slot index if this is a stack slot interval.
Definition at line 331 of file LiveInterval.h.
References isStackSlot(), and reg.
Referenced by print().
| bool llvm::LiveInterval::hasAtLeastOneValue | ( | ) | const [inline] |
| bool llvm::LiveInterval::containsOneValue | ( | ) | const [inline] |
| unsigned llvm::LiveInterval::getNumValNums | ( | ) | const [inline] |
Definition at line 340 of file LiveInterval.h.
References valnos.
Referenced by llvm::LiveIntervals::addIntervalsForSpills(), Copy(), join(), MergeValueInAsValue(), MergeValueNumberInto(), print(), removeRange(), and removeValNo().
getValNumInfo - Returns pointer to the specified val#.
Definition at line 344 of file LiveInterval.h.
References valnos.
Referenced by addStackInterval(), Copy(), and join().
| VNInfo* llvm::LiveInterval::getNextValue | ( | unsigned | MIIdx, | |
| MachineInstr * | CopyMI, | |||
| bool | isDefAccurate, | |||
| BumpPtrAllocator & | VNInfoAllocator | |||
| ) | [inline] |
getNextValue - Create a new value number and return it. MIIdx specifies the instruction that defines the value number.
Definition at line 353 of file LiveInterval.h.
References llvm::BumpPtrAllocator::Allocate(), llvm::VNInfo::setIsDefAccurate(), and valnos.
Referenced by llvm::LiveIntervals::addIntervalsForSpillsFast(), llvm::LiveIntervals::addLiveRangeToEndOfBlock(), addStackInterval(), MergeInClobberRange(), and MergeInClobberRanges().
| VNInfo* llvm::LiveInterval::createValueCopy | ( | const VNInfo * | orig, | |
| BumpPtrAllocator & | VNInfoAllocator | |||
| ) | [inline] |
Create a copy of the given value. The new value will be identical except for the Value number.
Definition at line 369 of file LiveInterval.h.
References llvm::BumpPtrAllocator::Allocate(), and valnos.
Referenced by Copy().
| static void llvm::LiveInterval::addKill | ( | VNInfo * | VNI, | |
| unsigned | KillIdx, | |||
| bool | phiKill | |||
| ) | [inline, static] |
addKill - Add a kill instruction index to the specified value number.
Definition at line 382 of file LiveInterval.h.
References llvm::VNInfo::kills.
| void llvm::LiveInterval::addKills | ( | VNInfo * | VNI, | |
| const VNInfo::KillSet & | kills | |||
| ) | [inline] |
addKills - Add a number of kills into the VNInfo kill vector. If this interval is live at a kill point, then the kill is not added.
Definition at line 396 of file LiveInterval.h.
References llvm::RegState::Kill, llvm::VNInfo::KillInfo::killIdx, llvm::VNInfo::kills, and liveBeforeAndAt().
removeKill - Remove the specified kill from the list of kills of the specified val#.
Definition at line 410 of file LiveInterval.h.
References llvm::VNInfo::kills.
| static void llvm::LiveInterval::removeKills | ( | VNInfo * | VNI, | |
| unsigned | Start, | |||
| unsigned | End | |||
| ) | [inline, static] |
removeKills - Remove all the kills in specified range [Start, End] of the specified val#.
Definition at line 423 of file LiveInterval.h.
References E, and llvm::VNInfo::kills.
Referenced by removeRange().
isKill - Return true if the specified index is a kill of the specified val#.
Definition at line 435 of file LiveInterval.h.
References llvm::VNInfo::kills.
isOnlyLROfValNo - Return true if the specified live range is the only one defined by the its val#.
Definition at line 444 of file LiveInterval.h.
References begin(), E, end(), and llvm::LiveRange::valno.
MergeValueNumberInto - This method is called when two value nubmers are found to be equivalent. This eliminates V1, replacing all LiveRanges with the V1 value number with the V2 value number. This can cause merging of V1/V2 values numbers and compaction of the value space.
MergeValueNumberInto - This method is called when two value nubmers are found to be equivalent. This eliminates V1, replacing all LiveRanges with the V1 value number with the V2 value number. This can cause merging of V1/V2 values numbers and compaction of the value space.
Definition at line 705 of file LiveInterval.cpp.
References begin(), llvm::VNInfo::copyFrom(), end(), getNumValNums(), llvm::VNInfo::id, Prev, ranges, llvm::VNInfo::setIsUnused(), std::swap(), and valnos.
| void LiveInterval::MergeInClobberRanges | ( | const LiveInterval & | Clobbers, | |
| BumpPtrAllocator & | VNInfoAllocator | |||
| ) |
MergeInClobberRanges - For any live ranges that are not defined in the current interval, but are defined in the Clobbers interval, mark them used with an unknown definition value. Caller must pass in reference to VNInfoAllocator since it will create a new val#.
MergeInClobberRanges - For any live ranges that are not defined in the current interval, but are defined in the Clobbers interval, mark them used with an unknown definition value.
Definition at line 610 of file LiveInterval.cpp.
References begin(), E, empty(), End, llvm::DenseMap< KeyT, ValueT, KeyInfoT, ValueInfoT >::end(), end(), llvm::DenseMap< KeyT, ValueT, KeyInfoT, ValueInfoT >::find(), getNextValue(), if(), llvm::DenseMap< KeyT, ValueT, KeyInfoT, ValueInfoT >::insert(), and valnos.
| void LiveInterval::MergeInClobberRange | ( | unsigned | Start, | |
| unsigned | End, | |||
| BumpPtrAllocator & | VNInfoAllocator | |||
| ) |
MergeInClobberRange - Same as MergeInClobberRanges except it merge in a single LiveRange only.
Definition at line 675 of file LiveInterval.cpp.
References begin(), end(), and getNextValue().
| void LiveInterval::MergeRangesInAsValue | ( | const LiveInterval & | RHS, | |
| VNInfo * | LHSValNo | |||
| ) |
MergeValueInAsValue - Merge all of the live ranges of a specific val# in RHS into this live interval as the specified value number. The LiveRanges in RHS are allowed to overlap with LiveRanges in the current interval, it will replace the value numbers of the overlaped live ranges with the specified value number.
MergeRangesInAsValue - Merge all of the intervals in RHS into this live interval as the specified value number. The LiveRanges in RHS are allowed to overlap with LiveRanges in the current interval, but only if the overlapping LiveRanges have the specified value number.
Definition at line 525 of file LiveInterval.cpp.
References begin(), E, end(), InsertPos, and llvm::LiveRange::valno.
Referenced by addStackInterval().
| void LiveInterval::MergeValueInAsValue | ( | const LiveInterval & | RHS, | |
| const VNInfo * | RHSValNo, | |||
| VNInfo * | LHSValNo | |||
| ) |
MergeValueInAsValue - Merge all of the live ranges of a specific val# in RHS into this live interval as the specified value number. The LiveRanges in RHS are allowed to overlap with LiveRanges in the current interval, but only if the overlapping LiveRanges have the specified value number.
MergeValueInAsValue - Merge all of the live ranges of a specific val# in RHS into this live interval as the specified value number. The LiveRanges in RHS are allowed to overlap with LiveRanges in the current interval, it will replace the value numbers of the overlaped live ranges with the specified value number.
Definition at line 543 of file LiveInterval.cpp.
References begin(), E, End, end(), getNumValNums(), llvm::VNInfo::id, llvm::SmallSet< T, N >::insert(), llvm::SmallVectorImpl< T >::push_back(), llvm::VNInfo::setIsUnused(), llvm::SmallVectorImpl< T >::size(), V1, and valnos.
| void LiveInterval::Copy | ( | const LiveInterval & | RHS, | |
| MachineRegisterInfo * | MRI, | |||
| BumpPtrAllocator & | VNInfoAllocator | |||
| ) |
Copy - Copy the specified live interval. This copies all the fields except for the register of the interval.
Definition at line 770 of file LiveInterval.cpp.
References addRange(), createValueCopy(), llvm::LiveRange::end, getNumValNums(), llvm::MachineRegisterInfo::getRegAllocationHint(), getValNumInfo(), llvm::VNInfo::id, ranges, reg, llvm::MachineRegisterInfo::setRegAllocationHint(), llvm::LiveRange::start, llvm::LiveRange::valno, valnos, and weight.
Referenced by llvm::LiveIntervals::dupInterval().
| bool llvm::LiveInterval::empty | ( | ) | const [inline] |
Definition at line 491 of file LiveInterval.h.
References ranges.
Referenced by llvm::LiveIntervals::addIntervalsForSpills(), beginNumber(), endNumber(), MergeInClobberRanges(), print(), removeIntervalIfEmpty(), and removeValNo().
| unsigned llvm::LiveInterval::beginNumber | ( | ) | const [inline] |
beginNumber - Return the lowest numbered slot covered by interval.
Definition at line 494 of file LiveInterval.h.
References empty(), and ranges.
Referenced by operator<().
| unsigned llvm::LiveInterval::endNumber | ( | ) | const [inline] |
endNumber - return the maximum point of the interval of the whole, exclusive.
Definition at line 502 of file LiveInterval.h.
References empty(), and ranges.
Referenced by advanceTo(), and expiredAt().
Definition at line 39 of file LiveInterval.cpp.
References ranges.
Referenced by getConflictWeight(), llvm::LiveIntervals::getNumConflictsWithPhysReg(), isLiveIn(), and llvm::LiveIntervals::spillPhysRegAroundRegDefsUses().
getLiveRangeContaining - Return the live range that contains the specified index, or null if there is none.
Definition at line 521 of file LiveInterval.h.
References end(), and FindLiveRangeContaining().
getLiveRangeContaining - Return the live range that contains the specified index, or null if there is none.
Definition at line 528 of file LiveInterval.h.
References end(), and FindLiveRangeContaining().
| LiveInterval::const_iterator LiveInterval::FindLiveRangeContaining | ( | unsigned | Idx | ) | const |
FindLiveRangeContaining - Return an iterator to the live range that contains the specified index, or end() if there is none.
getLiveRangeContaining - Return the live range that contains the specified index, or null if there is none.
Definition at line 390 of file LiveInterval.cpp.
References begin(), end(), and ranges.
Referenced by getLiveRangeContaining(), and removeRange().
| LiveInterval::iterator LiveInterval::FindLiveRangeContaining | ( | unsigned | Idx | ) |
FindLiveRangeContaining - Return an iterator to the live range that contains the specified index, or end() if there is none.
Definition at line 402 of file LiveInterval.cpp.
findDefinedVNInfo - Find the VNInfo that's defined at the specified index (register interval) or defined by the specified register (stack inteval).
findDefinedVNInfo - Find the VNInfo that's defined at the specified index (register interval) or defined by the specified register (stack inteval).
Definition at line 415 of file LiveInterval.cpp.
References vni_begin(), and vni_end().
| bool llvm::LiveInterval::overlaps | ( | const LiveInterval & | other | ) | const [inline] |
overlaps - Return true if the intersection of the two live intervals is not empty.
Definition at line 548 of file LiveInterval.h.
References begin(), and overlapsFrom().
Referenced by llvm::RegallocQuery::interfere().
overlaps - Return true if the live interval overlaps a range specified by [Start, End).
overlaps - Return true if the live interval overlaps a range specified by [Start, End).
Definition at line 130 of file LiveInterval.cpp.
| bool LiveInterval::overlapsFrom | ( | const LiveInterval & | other, | |
| const_iterator | I | |||
| ) | const |
overlapsFrom - Return true if the intersection of the two live intervals is not empty. The specified iterator is a hint that we can begin scanning the Other interval starting at I.
Definition at line 88 of file LiveInterval.cpp.
References begin(), end(), ranges, and std::swap().
Referenced by overlaps().
| void llvm::LiveInterval::addRange | ( | LiveRange | LR | ) | [inline] |
addRange - Add the specified LiveRange to this interval, merging intervals as appropriate. This returns an iterator to the inserted live range (which may have grown since it was inserted.
Definition at line 564 of file LiveInterval.h.
References ranges.
Referenced by llvm::LiveIntervals::addIntervalsForSpillsFast(), llvm::LiveIntervals::addLiveRangeToEndOfBlock(), and Copy().
| void LiveInterval::join | ( | LiveInterval & | Other, | |
| const int * | LHSValNoAssignments, | |||
| const int * | RHSValNoAssignments, | |||
| SmallVector< VNInfo *, 16 > & | NewVNInfo, | |||
| MachineRegisterInfo * | MRI | |||
| ) |
join - Join two live intervals (this, and other) together. This applies mappings to the value numbers in the LHS/RHS intervals as specified. If the intervals are not joinable, this aborts.
join - Join two live intervals (this, and other) together. This applies mappings to the value numbers in the LHS/RHS intervals as specified. If the intervals are not joinable, this aborts.
Definition at line 429 of file LiveInterval.cpp.
References begin(), ComputeJoinedWeight(), E, end(), getNumValNums(), llvm::MachineRegisterInfo::getRegAllocationHint(), getValNumInfo(), llvm::VNInfo::id, InsertPos, llvm::TargetRegisterInfo::isVirtualRegister(), llvm::SmallVectorImpl< T >::push_back(), ranges, reg, llvm::MachineRegisterInfo::setRegAllocationHint(), llvm::SmallVectorImpl< T >::size(), and valnos.
isInOneLiveRange - Return true if the range specified is entirely in the a single LiveRange of the live interval.
isInOneLiveRange - Return true if the range specified is entirely in the a single LiveRange of the live interval.
Definition at line 267 of file LiveInterval.cpp.
References ranges.
Referenced by llvm::LiveIntervals::spillPhysRegAroundRegDefsUses().
removeRange - Remove the specified range from this interval. Note that the range must be a single LiveRange in its entirety.
removeRange - Remove the specified range from this interval. Note that the range must be in a single LiveRange in its entirety.
Definition at line 278 of file LiveInterval.cpp.
References begin(), end(), getNumValNums(), II, llvm::next(), ranges, removeKills(), llvm::VNInfo::setIsUnused(), and valnos.
Referenced by llvm::LiveIntervals::addIntervalsForSpills(), removeRange(), removeRange(), and llvm::LiveIntervals::spillPhysRegAroundRegDefsUses().
Definition at line 584 of file LiveInterval.h.
References llvm::LiveRange::end, removeRange(), and llvm::LiveRange::start.
| void LiveInterval::removeValNo | ( | VNInfo * | ValNo | ) |
removeValNo - Remove all the ranges defined by the specified value#. Also remove the value# from value# list.
removeValNo - Remove all the ranges defined by the specified value#. Also remove the value# from value# list.
Definition at line 340 of file LiveInterval.cpp.
References E, empty(), getNumValNums(), llvm::VNInfo::id, ranges, llvm::VNInfo::setIsUnused(), and valnos.
| void LiveInterval::scaleNumbering | ( | unsigned | factor | ) |
scaleNumbering - Renumber VNI and ranges to provide gaps for new instructions.
scaleNumbering - Renumber VNI and ranges to provide gaps for new instructions.
Definition at line 365 of file LiveInterval.cpp.
References begin(), llvm::VNInfo::def, end(), llvm::VNInfo::isDefAccurate(), llvm::VNInfo::kills, llvm::LiveInterval::InstrSlots::scale(), vni_begin(), and vni_end().
| unsigned LiveInterval::getSize | ( | ) | const |
getSize - Returns the sum of sizes of all the LiveRange's.
Definition at line 789 of file LiveInterval.cpp.
References begin(), E, and end().
Referenced by llvm::LiveIntervals::getScaledIntervalSize().
| void LiveInterval::ComputeJoinedWeight | ( | const LiveInterval & | Other | ) |
ComputeJoinedWeight - Set the weight of a live interval after Other has been merged into it.
ComputeJoinedWeight - Set the weight of a live interval Joined after Other has been merged into it.
Definition at line 798 of file LiveInterval.cpp.
References HUGE_VALF, llvm::TargetRegisterInfo::isPhysicalRegister(), reg, and weight.
Referenced by join().
| bool llvm::LiveInterval::operator< | ( | const LiveInterval & | other | ) | const [inline] |
| void LiveInterval::print | ( | std::ostream & | OS, | |
| const TargetRegisterInfo * | TRI = 0 | |||
| ) | const |
Definition at line 830 of file LiveInterval.cpp.
Referenced by llvm::LiveIntervals::addIntervalsForSpills(), llvm::operator<<(), and print().
| void llvm::LiveInterval::print | ( | std::ostream * | OS, | |
| const TargetRegisterInfo * | TRI = 0 | |||
| ) | const [inline] |
| void LiveInterval::print | ( | raw_ostream & | OS, | |
| const TargetRegisterInfo * | TRI = 0 | |||
| ) | const |
Definition at line 836 of file LiveInterval.cpp.
References llvm::VNInfo::def, E, empty(), llvm::TargetRegisterInfo::getName(), getNumValNums(), getStackSlotIndex(), llvm::VNInfo::hasPHIKill(), llvm::VNInfo::isDefAccurate(), llvm::TargetRegisterInfo::isPhysicalRegister(), isStackSlot(), llvm::VNInfo::isUnused(), llvm::VNInfo::kills, ranges, reg, vni_begin(), vni_end(), and weight.
| void llvm::LiveInterval::print | ( | raw_ostream * | OS, | |
| const TargetRegisterInfo * | TRI = 0 | |||
| ) | const [inline] |
| void LiveInterval::dump | ( | ) | const |
Definition at line 894 of file LiveInterval.cpp.
References llvm::errs().
Referenced by llvm::LiveIntervals::addIntervalsForSpillsFast().
Definition at line 254 of file LiveInterval.h.
Referenced by llvm::LiveIntervals::addIntervalsForSpills(), llvm::LiveIntervals::addIntervalsForSpillsFast(), addStackInterval(), ComputeJoinedWeight(), llvm::LiveIntervals::conflictsWithPhysRegDef(), Copy(), llvm::LiveIntervals::dupInterval(), llvm::LiveIntervals::getNumConflictsWithPhysReg(), getStackSlotIndex(), isStackSlot(), join(), LiveInterval(), print(), PropagateDeadness(), removeIntervalIfEmpty(), removeRange(), llvm::SimpleRegisterCoalescing::runOnMachineFunction(), and llvm::LiveIntervals::spillPhysRegAroundRegDefsUses().
Definition at line 256 of file LiveInterval.h.
Referenced by llvm::LiveIntervals::addIntervalsForSpills(), llvm::LiveIntervals::addIntervalsForSpillsFast(), ComputeJoinedWeight(), Copy(), print(), and llvm::SimpleRegisterCoalescing::runOnMachineFunction().
Definition at line 257 of file LiveInterval.h.
Referenced by llvm::LiveIntervals::addIntervalsForSpills(), addRange(), begin(), beginNumber(), clear(), llvm::LiveIntervals::conflictsWithPhysRegDef(), llvm::LiveIntervals::conflictsWithPhysRegRef(), Copy(), empty(), end(), endNumber(), FindLiveRangeContaining(), llvm::LiveIntervals::intervalIsInOneMBB(), isInOneLiveRange(), isZeroLengthInterval(), join(), liveAt(), liveBeforeAndAt(), MergeValueNumberInto(), overlapsFrom(), print(), removeRange(), and removeValNo().
Definition at line 258 of file LiveInterval.h.
Referenced by clear(), containsOneValue(), Copy(), createValueCopy(), getNextValue(), getNumValNums(), getValNumInfo(), hasAtLeastOneValue(), join(), MergeInClobberRanges(), MergeValueInAsValue(), MergeValueNumberInto(), removeRange(), removeValNo(), vni_begin(), and vni_end().