47 #include "llvm/Config/llvm-config.h" 67 #define DEBUG_TYPE "livedebugvars" 73 STATISTIC(NumInsertedDebugValues,
"Number of DBG_VALUEs inserted");
78 "Debug Variable Analysis",
false,
false)
84 void LiveDebugVariables::getAnalysisUsage(
AnalysisUsage &AU)
const {
102 : LocNo(LocNo), WasIndirect(WasIndirect) {
103 static_assert(
sizeof(*
this) ==
sizeof(
unsigned),
"bad bitfield packing");
104 assert(locNo() == LocNo &&
"location truncation");
122 return LHS.LocNo == RHS.LocNo && LHS.WasIndirect == RHS.WasIndirect;
127 return !(LHS == RHS);
132 unsigned WasIndirect : 1;
161 UserValue *next =
nullptr;
189 : Variable(var), Expression(expr), dl(std::move(L)), leader(
this),
193 UserValue *getLeader() {
194 UserValue *l = leader;
195 while (l != l->leader)
201 UserValue *getNext()
const {
return next; }
208 return Var == Variable && Expr == Expression && dl->getInlinedAt() == IA;
212 static UserValue *merge(UserValue *L1, UserValue *L2) {
213 L2 = L2->getLeader();
216 L1 = L1->getLeader();
226 End->next = L1->next;
242 for (
unsigned i = 0, e = locations.
size(); i != e; ++i)
243 if (locations[i].
isReg() &&
244 locations[i].getReg() == LocMO.
getReg() &&
245 locations[i].getSubReg() == LocMO.
getSubReg())
248 for (
unsigned i = 0, e = locations.
size(); i != e; ++i)
260 return locations.
size() - 1;
264 void mapVirtRegs(LDVImpl *LDV);
306 void addDefsFromCopies(
351 bool EmitDone =
false;
354 bool ModifiedMF =
false;
361 VRMap virtRegToEqClass;
372 UserValue *lookupVirtReg(
unsigned VirtReg);
392 void computeIntervals();
403 virtRegToEqClass.clear();
406 assert((!ModifiedMF || EmitDone) &&
407 "Dbg values are not emitted in LDV");
413 void mapVirtReg(
unsigned VirtReg, UserValue *EC);
426 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) 432 auto *Scope = cast<DIScope>(DL.
getScope());
434 CommentOS << Scope->getFilename();
435 CommentOS <<
':' << DL.
getLine();
437 CommentOS <<
':' << DL.
getCol();
453 OS << Res <<
"," << V->
getLine();
454 if (
auto *InlinedAt = DL->getInlinedAt()) {
455 if (
DebugLoc InlinedAtDL = InlinedAt) {
464 auto *DV = cast<DILocalVariable>(Variable);
470 OS <<
" [" <<
I.start() <<
';' <<
I.stop() <<
"):";
471 if (
I.value().isUndef())
474 OS <<
I.value().locNo();
475 if (
I.value().wasIndirect())
479 for (
unsigned i = 0, e = locations.size(); i != e; ++i) {
480 OS <<
" Loc" << i <<
'=';
481 locations[i].print(OS, TRI);
487 OS <<
"********** DEBUG VARIABLES **********\n";
488 for (
unsigned i = 0, e = userValues.size(); i != e; ++i)
489 userValues[i]->
print(OS, TRI);
493 void UserValue::mapVirtRegs(LDVImpl *LDV) {
494 for (
unsigned i = 0, e = locations.size(); i != e; ++i)
495 if (locations[i].
isReg() &&
497 LDV->mapVirtReg(locations[i].getReg(),
this);
502 UserValue *&Leader = userVarMap[Var];
504 UserValue *UV = Leader->getLeader();
506 for (; UV; UV = UV->getNext())
507 if (UV->match(Var, Expr, DL->getInlinedAt()))
511 userValues.push_back(
512 llvm::make_unique<UserValue>(Var, Expr, DL, allocator));
513 UserValue *UV = userValues.back().get();
514 Leader = UserValue::merge(Leader, UV);
518 void LDVImpl::mapVirtReg(
unsigned VirtReg, UserValue *EC) {
520 UserValue *&Leader = virtRegToEqClass[VirtReg];
521 Leader = UserValue::merge(Leader, EC);
524 UserValue *LDVImpl::lookupVirtReg(
unsigned VirtReg) {
525 if (UserValue *UV = virtRegToEqClass.lookup(VirtReg))
526 return UV->getLeader();
546 bool Discard =
false;
550 if (!LIS->hasInterval(Reg)) {
554 LLVM_DEBUG(
dbgs() <<
"Discarding debug info (no LIS interval): " << Idx
566 LLVM_DEBUG(
dbgs() <<
"Discarding debug info (reg not live): " << Idx
581 UV->addDef(Idx, MI.
getOperand(0), IsIndirect);
585 UV->addDef(Idx, MO,
false);
591 bool Changed =
false;
599 if (!MBBI->isDebugInstr()) {
607 ? LIS->getMBBStartIdx(MBB)
608 : LIS->getInstructionIndex(*std::prev(MBBI)).getRegSlot();
613 if (MBBI->isDebugValue() && handleDebugValue(*MBBI, Idx)) {
614 MBBI = MBB->
erase(MBBI);
618 }
while (MBBI != MBBE && MBBI->isDebugInstr());
636 if (!Segment || Segment->valno != VNI) {
641 if (Segment->end < Stop) {
651 if (I.
value() != Loc || I.
stop() != Start)
663 else if (!ToEnd && Kills)
667 I.
insert(Start, Stop, Loc);
670 void UserValue::addDefsFromCopies(
686 if (MO.getSubReg() || !MI->
isCopy())
709 CopyValues.
push_back(std::make_pair(DstLI, DstVNI));
712 if (CopyValues.
empty())
719 for (
unsigned i = 0, e = Kills.
size(); i != e; ++i) {
721 for (
unsigned j = 0, e = CopyValues.
size(); j != e; ++j) {
723 const VNInfo *DstVNI = CopyValues[j].second;
731 << DstVNI->
id <<
" in " << *DstLI <<
'\n');
734 unsigned LocNo = getLocationNo(CopyMI->
getOperand(0));
737 NewDefs.push_back(std::make_pair(Idx, NewLoc));
750 if (!
I.value().isUndef())
751 Defs.
push_back(std::make_pair(
I.start(),
I.value()));
754 for (
unsigned i = 0; i != Defs.
size(); ++i) {
759 if (!LocMO.
isReg()) {
760 extendDef(Idx, Loc,
nullptr,
nullptr,
nullptr, LIS);
767 const VNInfo *VNI =
nullptr;
773 extendDef(Idx, Loc, LI, VNI, &Kills, LIS);
819 if (PrevEnd && I.
start() < PrevEnd) {
832 I.
insert(RStart, IStop, Loc);
840 if (I.
start() < RStart) {
844 trimmedDefs.insert(RStart);
861 if (PrevEnd && I.
start() < PrevEnd)
865 void LDVImpl::computeIntervals() {
869 for (
unsigned i = 0, e = userValues.size(); i != e; ++i) {
870 userValues[i]->computeIntervals(MF->getRegInfo(), *
TRI, *LIS,
LS);
871 userValues[i]->mapVirtRegs(
this);
880 LLVM_DEBUG(
dbgs() <<
"********** COMPUTING LIVE DEBUG VARIABLES: " 881 << mf.
getName() <<
" **********\n");
883 bool Changed = collectDebugValues(mf);
886 ModifiedMF = Changed;
892 for (
auto MBBI = MBB.begin(), MBBE = MBB.end(); MBBI != MBBE; ) {
893 if (!MBBI->isDebugValue()) {
897 MBBI = MBB.erase(MBBI);
910 pImpl =
new LDVImpl(
this);
911 return static_cast<LDVImpl*
>(pImpl)->runOnMachineFunction(mf);
914 void LiveDebugVariables::releaseMemory() {
916 static_cast<LDVImpl*
>(pImpl)->
clear();
921 delete static_cast<LDVImpl*
>(pImpl);
932 dbgs() <<
"Splitting Loc" << OldLocNo <<
'\t';
935 bool DidChange =
false;
938 for (
unsigned i = 0; i != NewRegs.
size(); ++i) {
948 if (!LocMapI.
valid())
952 while (LocMapI.
valid() && LII != LIE) {
959 if (LocMapI.
value().locNo() == OldLocNo && LII->start < LocMapI.
stop()) {
963 MO.
setSubReg(locations[OldLocNo].getSubReg());
964 NewLocNo = getLocationNo(MO);
973 if (LStart < LII->start)
975 if (LStop > LII->end)
982 if (LStart < LocMapI.
start()) {
985 assert(LocMapI.
valid() &&
"Unexpected coalescing");
987 if (LStop > LocMapI.
stop()) {
989 LocMapI.
insert(LII->end, LStop, OldLoc);
995 if (LII->end < LocMapI.
stop()) {
1001 if (!LocMapI.
valid())
1009 locations.erase(locations.begin() + OldLocNo);
1011 while (LocMapI.
valid()) {
1013 if (v.
locNo() == OldLocNo) {
1015 << LocMapI.
stop() <<
")\n");
1027 dbgs() <<
"Split result: \t";
1036 bool DidChange =
false;
1039 for (
unsigned i = locations.size(); i ; --i) {
1040 unsigned LocNo = i-1;
1044 DidChange |= splitLocation(LocNo, NewRegs, LIS);
1050 bool DidChange =
false;
1051 for (UserValue *UV = lookupVirtReg(OldReg); UV; UV = UV->getNext())
1052 DidChange |= UV->splitRegister(OldReg, NewRegs, *LIS);
1058 UserValue *UV = lookupVirtReg(OldReg);
1059 for (
unsigned i = 0; i != NewRegs.
size(); ++i)
1060 mapVirtReg(NewRegs[i], UV);
1066 static_cast<LDVImpl*
>(pImpl)->
splitRegister(OldReg, NewRegs);
1083 for (
unsigned I = 0,
E = locations.size();
I !=
E; ++
I) {
1084 bool Spilled =
false;
1085 unsigned SpillOffset = 0;
1090 unsigned VirtReg = Loc.
getReg();
1118 auto InsertResult = NewLocations.
insert({Loc, {Spilled, SpillOffset}});
1119 unsigned NewLocNo = std::distance(NewLocations.
begin(), InsertResult.first);
1120 LocNoMap[
I] = NewLocNo;
1125 SpillOffsets.
clear();
1126 for (
auto &Pair : NewLocations) {
1128 unsigned SpillOffset;
1129 std::tie(Spilled, SpillOffset) = Pair.second;
1130 locations.push_back(Pair.first);
1132 unsigned NewLocNo = std::distance(&*NewLocations.begin(), &Pair);
1133 SpillOffsets[NewLocNo] = SpillOffset;
1147 unsigned NewLocNo = LocNoMap[Loc.
locNo()];
1149 I.setStart(
I.start());
1189 while (I != MBB->
end() && !I->isTerminator()) {
1193 if (I->definesRegister(Reg, &TRI))
1195 return std::next(I);
1203 bool Spilled,
unsigned SpillOffset,
1208 StopIdx = (MBBEndIdx < StopIdx) ? MBBEndIdx : StopIdx;
1213 locations[Loc.
locNo()] :
1219 ++NumInsertedDebugValues;
1221 assert(cast<DILocalVariable>(Variable)
1223 "Expected inlined-at fields to agree");
1238 assert((!Spilled || MO.
isFI()) &&
"a spilled location must be a frame index");
1242 IsIndirect, MO, Variable, Expr);
1247 }
while (I != MBB->
end());
1262 bool Spilled = SpillIt != SpillOffsets.
end();
1263 unsigned SpillOffset = Spilled ? SpillIt->second : 0;
1268 if (trimmedDefs.count(Start))
1276 insertDebugValue(&*MBB, Start, Stop, Loc, Spilled, SpillOffset, LIS, TII,
1280 while (Stop > MBBEnd) {
1287 insertDebugValue(&*MBB, Start, Stop, Loc, Spilled, SpillOffset, LIS, TII,
1298 void LDVImpl::emitDebugValues(
VirtRegMap *VRM) {
1299 LLVM_DEBUG(
dbgs() <<
"********** EMITTING LIVE DEBUG VARIABLES **********\n");
1304 for (
unsigned i = 0, e = userValues.size(); i != e; ++i) {
1306 userValues[i]->rewriteLocations(*VRM, *MF, *TII, *TRI, SpillOffsets);
1307 userValues[i]->emitDebugValues(VRM, *LIS, *TII, *TRI, SpillOffsets);
1317 bool LiveDebugVariables::doInitialization(
Module &M) {
1321 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) 1324 static_cast<LDVImpl*
>(pImpl)->
print(
dbgs());
static bool isReg(const MCInst &MI, unsigned OpNo)
void setValueUnchecked(ValT x)
setValueUnchecked - Change the mapped value of the current interval without checking for coalescing...
void setValue(ValT x)
setValue - Change the mapped value of the current interval.
Safe Stack instrumentation pass
static PassRegistry * getPassRegistry()
getPassRegistry - Access the global registry object, which is automatically initialized at applicatio...
instr_iterator instr_end()
const TargetRegisterClass * getRegClass(unsigned Reg) const
Return the register class of the specified virtual register.
SlotIndex getBaseIndex() const
Returns the base index for associated with this index.
SlotIndex def
The index of the defining instruction.
This class represents lattice values for constants.
A Module instance is used to store all the information related to an LLVM module. ...
SlotIndex getPrevIndex() const
Returns the previous index.
static void printDebugLoc(const DebugLoc &DL, raw_ostream &CommentOS, const LLVMContext &Ctx)
virtual const TargetRegisterInfo * getRegisterInfo() const
getRegisterInfo - If register information is available, return it.
Segments::iterator iterator
void push_back(const T &Elt)
const DebugLoc & getDebugLoc() const
Returns the debug location id of this MachineInstr.
LiveInterval - This class represents the liveness of a register, or stack slot.
iterator_range< use_nodbg_iterator > use_nodbg_operands(unsigned Reg) const
iterator getFirstTerminator()
Returns an iterator to the first terminator instruction of this basic block.
void initializeLiveDebugVariablesPass(PassRegistry &)
unsigned getReg() const
getReg - Returns the register number.
static bool isVirtualRegister(unsigned Reg)
Return true if the specified register number is in the virtual register namespace.
iterator advanceTo(iterator I, SlotIndex Pos)
advanceTo - Advance the specified iterator to point to the Segment containing the specified position...
unsigned getSubReg() const
SmallVectorImpl< InsnRange > & getRanges()
This class implements a map that also provides access to all stored values in a deterministic order...
bool isMetadata() const
isMetadata - Tests if this is a MO_Metadata operand.
STATISTIC(NumFunctions, "Total number of functions")
unsigned const TargetRegisterInfo * TRI
bool valid() const
valid - Return true if the current position is valid, false for end().
void setIsDead(bool Val=true)
void setMap(const IntervalMap &m)
setMap - Change the map iterated over.
VNInfo - Value Number Information.
LexicalScope - This class is used to track scope information.
void dump() const
dump - Print data structures to dbgs().
bool isImm() const
isImm - Tests if this is a MO_Immediate operand.
static DIExpression * prepend(const DIExpression *Expr, bool DerefBefore, int64_t Offset=0, bool DerefAfter=false, bool StackValue=false)
Prepend DIExpr with a deref and offset operation and optionally turn it into a stack value...
static MachineOperand CreateReg(unsigned Reg, bool isDef, bool isImp=false, bool isKill=false, bool isDead=false, bool isUndef=false, bool isEarlyClobber=false, unsigned SubReg=0, bool isDebug=false, bool isInternalRead=false, bool isRenamable=false)
This class represents the liveness of a register, stack slot, etc.
bool isNotInMIMap(const MachineInstr &Instr) const
Returns true if the specified machine instr has been removed or was never entered in the map...
bool match(Val *V, const Pattern &P)
#define INITIALIZE_PASS_DEPENDENCY(depName)
SlotIndex getNextIndex() const
Returns the next index.
MachineFunction & getMachineFunction() const
StringRef getName() const
instr_iterator erase(instr_iterator I)
Remove an instruction from the instruction list and delete it.
~LiveDebugVariables() override
void emitDebugValues(VirtRegMap *VRM)
emitDebugValues - Emit new DBG_VALUE instructions reflecting the changes that happened during registe...
MachineFunctionPass - This class adapts the FunctionPass interface to allow convenient creation of pa...
const HexagonInstrInfo * TII
Printable printMBBReference(const MachineBasicBlock &MBB)
Prints a machine basic block reference.
unsigned getNumOperands() const
Retuns the total number of operands.
MachineBasicBlock iterator that automatically skips over MIs that are inside bundles (i...
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
Result of a LiveRange query.
void advanceTo(KeyT x)
advanceTo - Move to the first interval with stop >= x, or end().
bool isTerminator(QueryType Type=AnyInBundle) const
Returns true if this instruction part of the terminator for a basic block.
DbgValueLocation(unsigned LocNo, bool WasIndirect)
friend bool operator==(const DbgValueLocation &LHS, const DbgValueLocation &RHS)
MachineInstr * getInstructionFromIndex(SlotIndex index) const
Returns the instruction associated with the given index.
SlotIndex getRegSlot(bool EC=false) const
Returns the register use/def slot in the current instruction for a normal or early-clobber def...
void initialize(const MachineFunction &)
initialize - Scan machine function and constuct lexical scope nest, resets the instance if necessary...
void erase()
erase - Erase the current interval.
LLVMContext & getContext() const
LLVM_NODISCARD LLVM_ATTRIBUTE_ALWAYS_INLINE bool empty() const
empty - Check if the string is empty.
bool isAssignedReg(unsigned virtReg) const
returns true if the specified virtual register is not mapped to a stack slot or rematerialized.
SlotIndex getNextSlot() const
Returns the next slot in the index list.
void clearParent()
clearParent - Reset the parent pointer.
LexicalScope * findLexicalScope(const DILocation *DL)
findLexicalScope - Find lexical scope, either regular or inlined, for the given DebugLoc.
virtual const TargetInstrInfo * getInstrInfo() const
const_iterator find(KeyT x) const
find - Return an iterator pointing to the first interval ending at or after x, or end()...
virtual bool doInitialization(Module &)
doInitialization - Virtual method overridden by subclasses to do any necessary initialization before ...
StringRef getName() const
getName - Return the name of the corresponding LLVM function.
void setStartUnchecked(KeyT a)
setStartUnchecked - Move the start of the current interval without checking for coalescing or overlap...
DbgValueLocation changeLocNo(unsigned NewLocNo) const
LiveQueryResult Query(SlotIndex Idx) const
Query Liveness at Idx.
TargetInstrInfo - Interface to description of machine instruction set.
iterator find(const_arg_type_t< KeyT > Val)
bool isIdenticalTo(const MachineOperand &Other) const
Returns true if this operand is identical to the specified operand except for liveness related flags ...
VNInfo * getVNInfoAt(SlotIndex Idx) const
getVNInfoAt - Return the VNInfo that is live at Idx, or NULL.
MachineInstrBuilder BuildMI(MachineFunction &MF, const DebugLoc &DL, const MCInstrDesc &MCID)
Builder interface. Specify how to create the initial instruction itself.
initializer< Ty > init(const Ty &Val)
unsigned const MachineRegisterInfo * MRI
bool hasInterval(unsigned Reg) const
static void removeDebugValues(MachineFunction &mf)
const TargetSubtargetInfo & getSubtarget() const
getSubtarget - Return the subtarget for which this machine code is being compiled.
void getAnalysisUsage(AnalysisUsage &AU) const override
getAnalysisUsage - Subclasses that override getAnalysisUsage must call this.
typename Sizer::Allocator Allocator
This is an important class for using LLVM in a threaded context.
DISubprogram * getSubprogram() const
Get the attached subprogram.
size_t size() const
size - Get the array size.
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
INITIALIZE_PASS_BEGIN(LiveDebugVariables, DEBUG_TYPE, "Debug Variable Analysis", false, false) INITIALIZE_PASS_END(LiveDebugVariables
SmallSet - This maintains a set of unique values, optimizing for the case when the set is small (less...
void find(KeyT x)
find - Move to the first interval with stop >= x, or end().
const KeyT & start() const
start - Return the beginning of the current interval.
void goToBegin()
goToBegin - Move to the first interval in map.
Represent the analysis usage information of a pass.
void substPhysReg(unsigned Reg, const TargetRegisterInfo &)
substPhysReg - Substitute the current register with the physical register Reg, taking any existing Su...
static void print(raw_ostream &Out, object::Archive::Kind Kind, T Val)
self_iterator getIterator()
MachineBasicBlock * getMBBFromIndex(SlotIndex index) const
MDNode * getScope() const
SlotIndex getMBBStartIdx(const MachineBasicBlock *mbb) const
Return the first index in the given basic block.
virtual bool getStackSlotRange(const TargetRegisterClass *RC, unsigned SubIdx, unsigned &Size, unsigned &Offset, const MachineFunction &MF) const
Compute the size in bytes and offset within a stack slot of a spilled register or subregister...
TargetRegisterInfo base class - We assume that the target defines a static array of TargetRegisterDes...
DILocation * getInlinedAt() const
INITIALIZE_PASS_END(RegBankSelect, DEBUG_TYPE, "Assign register bank of generic virtual registers", false, false) RegBankSelect
const DIExpression * getDebugExpression() const
Return the complex address expression referenced by this DBG_VALUE instruction.
unsigned id
The ID number of this value.
std::pair< iterator, bool > insert(const std::pair< KeyT, ValueT > &KV)
Iterator for intrusive lists based on ilist_node.
void splitRegister(unsigned OldReg, ArrayRef< unsigned > NewRegs, LiveIntervals &LIS)
splitRegister - Move any user variables in OldReg to the live ranges in NewRegs where they are live...
MachineOperand class - Representation of each machine instruction operand.
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small...
friend bool operator!=(const DbgValueLocation &LHS, const DbgValueLocation &RHS)
LiveInterval & getInterval(unsigned Reg)
const Function & getFunction() const
Return the LLVM function that this machine code represents.
raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.
const ValT & value() const
value - Return the mapped value at the current interval.
static unsigned getReg(const void *D, unsigned RC, unsigned RegNo)
VNInfo * valueOutOrDead() const
Returns the value alive at the end of the instruction, if any.
SlotIndex getMBBEndIdx(const MachineBasicBlock *mbb) const
Return the last index in the given basic block.
static void clear(coro::Shape &Shape)
SlotIndex getInstructionIndex(const MachineInstr &Instr) const
Returns the base index of the given instruction.
const KeyT & stop() const
stop - Return the end of the current interval.
const MachineBasicBlock * getParent() const
MachineRegisterInfo - Keep track of information for virtual and physical registers, including vreg register classes, use/def chains for registers, etc.
void insert(KeyT a, KeyT b, ValT y)
insert - Insert mapping [a;b] -> y before the current position.
Representation of each machine instruction.
static bool isPhysicalRegister(unsigned Reg)
Return true if the specified register number is in the physical register namespace.
static void printExtendedName(raw_ostream &OS, const DILocalVariable *V, const DILocation *DL)
static bool isEarlierEqualInstr(SlotIndex A, SlotIndex B)
Return true if A refers to the same instruction as B or an earlier one.
MachineRegisterInfo & getRegInfo()
getRegInfo - Return information about the registers currently in use.
static DebugLoc getDebugLoc(MachineBasicBlock::instr_iterator FirstMI, MachineBasicBlock::instr_iterator LastMI)
Return the first found DebugLoc that has a DILocation, given a range of instructions.
LexicalScopes - This class provides interface to collect and use lexical scoping information from mac...
LLVM_NODISCARD bool empty() const
static MachineBasicBlock::iterator findNextInsertLocation(MachineBasicBlock *MBB, MachineBasicBlock::iterator I, SlotIndex StopIdx, MachineOperand &LocMO, LiveIntervals &LIS, const TargetRegisterInfo &TRI)
Find an iterator for inserting the next DBG_VALUE instruction (or end if no more insert locations fou...
const MCInstrDesc & get(unsigned Opcode) const
Return the machine instruction descriptor that corresponds to the specified instruction opcode...
void setReg(unsigned Reg)
Change the register this operand corresponds to.
static cl::opt< bool > EnableLDV("live-debug-variables", cl::init(true), cl::desc("Enable the live debug variables pass"), cl::Hidden)
void setIsUse(bool Val=true)
void setSubReg(unsigned subReg)
bool isFI() const
isFI - Tests if this is a MO_FrameIndex operand.
virtual void print(raw_ostream &OS, const Module *M) const
print - Print out the internal state of the pass.
Describes a location by number along with some flags about the original usage of the location...
unsigned getPhys(unsigned virtReg) const
returns the physical register mapped to the specified virtual register
bool isReg() const
isReg - Tests if this is a MO_Register operand.
const Segment * getSegmentContaining(SlotIndex Idx) const
Return the segment that contains the specified index, or null if there is none.
void setStopUnchecked(KeyT b)
setStopUnchecked - Move the end of the current interval without checking for coalescing or overlaps...
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
SlotIndex beginIndex() const
beginIndex - Return the lowest numbered slot covered.
int getStackSlot(unsigned virtReg) const
returns the stack slot mapped to the specified virtual register
static cl::opt< bool, true > Debug("debug", cl::desc("Enable debug output"), cl::Hidden, cl::location(DebugFlag))
const DILocalVariable * getDebugVariable() const
Return the debug variable referenced by this DBG_VALUE instruction.
This class implements an extremely fast bulk output stream that can only output to a stream...
iterator SkipPHIsLabelsAndDebug(iterator I)
Return the first instruction in MBB after I that is not a PHI, label or debug.
StringRef - Represent a constant reference to a string, i.e.
static MachineBasicBlock::iterator findInsertLocation(MachineBasicBlock *MBB, SlotIndex Idx, LiveIntervals &LIS)
Find an iterator for inserting a DBG_VALUE instruction.
void setIsDebug(bool Val=true)
const MachineOperand & getOperand(unsigned i) const
SlotIndex - An opaque wrapper around machine indexes.
static MachineOperand CreateFI(int Idx)
DominatorTree Class - Concrete subclass of DominatorTreeBase that is used to compute a normal dominat...
std::pair< const MachineInstr *, const MachineInstr * > InsnRange
InsnRange - This is used to track range of instructions with identical lexical scope.