LLVM API Documentation
#include <LiveInterval.h>
Public Types | |
| typedef SmallVector< KillInfo, 4 > | KillSet |
Public Member Functions | |
| VNInfo () | |
| VNInfo (unsigned i, unsigned d, MachineInstr *c) | |
| VNInfo (unsigned i, const VNInfo &orig) | |
| VNInfo construtor, copies values from orig, except for the value number. | |
| void | copyFrom (VNInfo &src) |
| Copy from the parameter into this VNInfo. | |
| unsigned | getFlags () const |
| Used for copying value number info. | |
| void | setFlags (unsigned flags) |
| MachineInstr * | getCopy () const |
| void | setCopy (MachineInstr *c) |
| unsigned | getReg () const |
| void | setReg (unsigned reg) |
| bool | hasPHIKill () const |
| Returns true if one or more kills are PHI nodes. | |
| void | setHasPHIKill (bool hasKill) |
| bool | hasRedefByEC () const |
| void | setHasRedefByEC (bool hasRedef) |
| bool | isPHIDef () const |
| void | setIsPHIDef (bool phiDef) |
| bool | isUnused () const |
| Returns true if this value is unused. | |
| void | setIsUnused (bool unused) |
| bool | isDefAccurate () const |
| Returns true if the def is accurate. | |
| void | setIsDefAccurate (bool defAccurate) |
Public Attributes | |
| unsigned | id |
| The ID number of this value. | |
| unsigned | def |
| The index of the defining instruction (if isDefAccurate() returns true). | |
| KillSet | kills |
| MachineInstr * | copy |
| unsigned | reg |
Classes | |
| struct | KillInfo |
| Holds information about individual kills. More... | |
Care must be taken in interpreting the def index of the value. The following rules apply:
If the isDefAccurate() method returns false then def does not contain the index of the defining MachineInstr, or even (necessarily) to a MachineInstr at all. In general such a def index is not meaningful and should not be used. The exception is that, for values originally defined by PHI instructions, after PHI elimination def will contain the index of the MBB in which the PHI originally existed. This can be used to insert code (spills or copies) which deals with the value, which will be live in to the block.
Definition at line 53 of file LiveInterval.h.
| typedef SmallVector<KillInfo, 4> llvm::VNInfo::KillSet |
Definition at line 83 of file LiveInterval.h.
| llvm::VNInfo::VNInfo | ( | ) | [inline] |
Definition at line 93 of file LiveInterval.h.
| llvm::VNInfo::VNInfo | ( | unsigned | i, | |
| unsigned | d, | |||
| MachineInstr * | c | |||
| ) | [inline] |
VNInfo constructor. d is presumed to point to the actual defining instr. If it doesn't setIsDefAccurate(false) should be called after construction.
Definition at line 99 of file LiveInterval.h.
VNInfo construtor, copies values from orig, except for the value number.
Definition at line 103 of file LiveInterval.h.
| void llvm::VNInfo::copyFrom | ( | VNInfo & | src | ) | [inline] |
Copy from the parameter into this VNInfo.
Definition at line 108 of file LiveInterval.h.
References cr, def, flags, and kills.
Referenced by llvm::LiveInterval::MergeValueNumberInto().
| unsigned llvm::VNInfo::getFlags | ( | ) | const [inline] |
| void llvm::VNInfo::setFlags | ( | unsigned | flags | ) | [inline] |
Definition at line 117 of file LiveInterval.h.
| MachineInstr* llvm::VNInfo::getCopy | ( | ) | const [inline] |
For a register interval, if this VN was definied by a copy instr getCopy() returns a pointer to it, otherwise returns 0. For a stack interval the behaviour of this method is undefined.
Definition at line 122 of file LiveInterval.h.
Referenced by llvm::LiveIntervals::getVNInfoSourceReg().
| void llvm::VNInfo::setCopy | ( | MachineInstr * | c | ) | [inline] |
For a register interval, set the copy member. This method should not be called on stack intervals as it may lead to undefined behavior.
Definition at line 126 of file LiveInterval.h.
| unsigned llvm::VNInfo::getReg | ( | ) | const [inline] |
For a stack interval, returns the reg which this stack interval was defined from. For a register interval the behaviour of this method is undefined.
Definition at line 131 of file LiveInterval.h.
| void llvm::VNInfo::setReg | ( | unsigned | reg | ) | [inline] |
For a stack interval, set the defining register. This method should not be called on register intervals as it may lead to undefined behaviour.
Definition at line 135 of file LiveInterval.h.
| bool llvm::VNInfo::hasPHIKill | ( | ) | const [inline] |
Returns true if one or more kills are PHI nodes.
Definition at line 138 of file LiveInterval.h.
Referenced by llvm::LiveIntervals::addIntervalsForSpills(), and llvm::LiveInterval::print().
| void llvm::VNInfo::setHasPHIKill | ( | bool | hasKill | ) | [inline] |
Definition at line 139 of file LiveInterval.h.
Referenced by llvm::LiveIntervals::addLiveRangeToEndOfBlock().
| bool llvm::VNInfo::hasRedefByEC | ( | ) | const [inline] |
Returns true if this value is re-defined by an early clobber somewhere during the live range.
Definition at line 148 of file LiveInterval.h.
| void llvm::VNInfo::setHasRedefByEC | ( | bool | hasRedef | ) | [inline] |
Definition at line 149 of file LiveInterval.h.
| bool llvm::VNInfo::isPHIDef | ( | ) | const [inline] |
Returns true if this value is defined by a PHI instruction (or was, PHI instrucions may have been eliminated).
Definition at line 158 of file LiveInterval.h.
| void llvm::VNInfo::setIsPHIDef | ( | bool | phiDef | ) | [inline] |
Definition at line 159 of file LiveInterval.h.
| bool llvm::VNInfo::isUnused | ( | ) | const [inline] |
Returns true if this value is unused.
Definition at line 167 of file LiveInterval.h.
Referenced by llvm::LiveIntervals::addIntervalsForSpills(), llvm::LiveIntervals::computeNumbering(), llvm::LiveIntervals::isReMaterializable(), and llvm::LiveInterval::print().
| void llvm::VNInfo::setIsUnused | ( | bool | unused | ) | [inline] |
Definition at line 168 of file LiveInterval.h.
Referenced by llvm::LiveInterval::MergeValueInAsValue(), llvm::LiveInterval::MergeValueNumberInto(), llvm::LiveInterval::removeRange(), and llvm::LiveInterval::removeValNo().
| bool llvm::VNInfo::isDefAccurate | ( | ) | const [inline] |
Returns true if the def is accurate.
Definition at line 176 of file LiveInterval.h.
Referenced by llvm::LiveIntervals::addIntervalsForSpills(), llvm::LiveIntervals::computeNumbering(), llvm::LiveIntervals::isReMaterializable(), llvm::LiveInterval::print(), and llvm::LiveInterval::scaleNumbering().
| void llvm::VNInfo::setIsDefAccurate | ( | bool | defAccurate | ) | [inline] |
Definition at line 65 of file LiveInterval.h.
Definition at line 66 of file LiveInterval.h.
The ID number of this value.
Definition at line 86 of file LiveInterval.h.
Referenced by llvm::LiveIntervals::addIntervalsForSpills(), ComputeUltimateVN(), llvm::LiveInterval::Copy(), llvm::LiveInterval::join(), llvm::LiveInterval::MergeValueInAsValue(), llvm::LiveInterval::MergeValueNumberInto(), llvm::operator<<(), and llvm::LiveInterval::removeValNo().
The index of the defining instruction (if isDefAccurate() returns true).
Definition at line 89 of file LiveInterval.h.
Referenced by llvm::LiveIntervals::addIntervalsForSpills(), llvm::LiveIntervals::computeNumbering(), copyFrom(), llvm::LiveIntervals::isReMaterializable(), llvm::LiveInterval::print(), and llvm::LiveInterval::scaleNumbering().
Definition at line 91 of file LiveInterval.h.
Referenced by llvm::LiveInterval::addKill(), llvm::LiveInterval::addKills(), llvm::LiveIntervals::addLiveRangeToEndOfBlock(), llvm::LiveIntervals::computeNumbering(), copyFrom(), llvm::LiveInterval::isKill(), llvm::LiveInterval::print(), llvm::LiveInterval::removeKill(), llvm::LiveInterval::removeKills(), and llvm::LiveInterval::scaleNumbering().