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;
157 UserValue *next =
nullptr;
185 : Variable(var), Expression(expr), dl(std::move(L)), leader(
this),
189 UserValue *getLeader() {
190 UserValue *l = leader;
191 while (l != l->leader)
197 UserValue *getNext()
const {
return next; }
204 return Var == Variable && Expr == Expression && dl->getInlinedAt() == IA;
208 static UserValue *merge(UserValue *L1, UserValue *L2) {
209 L2 = L2->getLeader();
212 L1 = L1->getLeader();
222 End->next = L1->next;
238 for (
unsigned i = 0, e = locations.
size(); i != e; ++i)
239 if (locations[i].
isReg() &&
240 locations[i].getReg() == LocMO.
getReg() &&
241 locations[i].getSubReg() == LocMO.
getSubReg())
244 for (
unsigned i = 0, e = locations.
size(); i != e; ++i)
256 return locations.
size() - 1;
260 void mapVirtRegs(LDVImpl *LDV);
297 void addDefsFromCopies(
325 DebugLoc getDebugLoc() {
return dl;}
339 bool EmitDone =
false;
342 bool ModifiedMF =
false;
349 VRMap virtRegToEqClass;
360 UserValue *lookupVirtReg(
unsigned VirtReg);
376 void computeIntervals();
387 virtRegToEqClass.clear();
390 assert((!ModifiedMF || EmitDone) &&
391 "Dbg values are not emitted in LDV");
397 void mapVirtReg(
unsigned VirtReg, UserValue *EC);
410 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) 416 auto *Scope = cast<DIScope>(DL.
getScope());
418 CommentOS << Scope->getFilename();
419 CommentOS <<
':' << DL.
getLine();
421 CommentOS <<
':' << DL.
getCol();
437 OS << Res <<
"," << V->
getLine();
438 if (
auto *InlinedAt = DL->getInlinedAt()) {
439 if (
DebugLoc InlinedAtDL = InlinedAt) {
448 auto *DV = cast<DILocalVariable>(Variable);
454 OS <<
" [" <<
I.start() <<
';' <<
I.stop() <<
"):";
455 if (
I.value().isUndef())
458 OS <<
I.value().locNo();
459 if (
I.value().wasIndirect())
463 for (
unsigned i = 0, e = locations.size(); i != e; ++i) {
464 OS <<
" Loc" << i <<
'=';
465 locations[i].print(OS, TRI);
471 OS <<
"********** DEBUG VARIABLES **********\n";
472 for (
unsigned i = 0, e = userValues.size(); i != e; ++i)
473 userValues[i]->
print(OS, TRI);
477 void UserValue::mapVirtRegs(LDVImpl *LDV) {
478 for (
unsigned i = 0, e = locations.size(); i != e; ++i)
479 if (locations[i].
isReg() &&
481 LDV->mapVirtReg(locations[i].getReg(),
this);
486 UserValue *&Leader = userVarMap[Var];
488 UserValue *UV = Leader->getLeader();
490 for (; UV; UV = UV->getNext())
491 if (UV->match(Var, Expr, DL->getInlinedAt()))
495 userValues.push_back(
496 llvm::make_unique<UserValue>(Var, Expr, DL, allocator));
497 UserValue *UV = userValues.back().get();
498 Leader = UserValue::merge(Leader, UV);
502 void LDVImpl::mapVirtReg(
unsigned VirtReg, UserValue *EC) {
504 UserValue *&Leader = virtRegToEqClass[VirtReg];
505 Leader = UserValue::merge(Leader, EC);
508 UserValue *LDVImpl::lookupVirtReg(
unsigned VirtReg) {
509 if (UserValue *UV = virtRegToEqClass.lookup(VirtReg))
510 return UV->getLeader();
530 bool Discard =
false;
534 if (!LIS->hasInterval(Reg)) {
538 LLVM_DEBUG(
dbgs() <<
"Discarding debug info (no LIS interval): " << Idx
550 LLVM_DEBUG(
dbgs() <<
"Discarding debug info (reg not live): " << Idx
565 UV->addDef(Idx, MI.
getOperand(0), IsIndirect);
569 UV->addDef(Idx, MO,
false);
575 bool Changed =
false;
581 if (!MBBI->isDebugValue()) {
588 ? LIS->getMBBStartIdx(MBB)
589 : LIS->getInstructionIndex(*std::prev(MBBI)).getRegSlot();
592 if (handleDebugValue(*MBBI, Idx)) {
593 MBBI = MBB->
erase(MBBI);
597 }
while (MBBI != MBBE && MBBI->isDebugValue());
617 if (!Segment || Segment->valno != VNI) {
622 if (Segment->end < Stop) {
632 if (I.
value() != Loc || I.
stop() != Start)
644 else if (!ToEnd && Kills)
648 I.
insert(Start, Stop, Loc);
651 void UserValue::addDefsFromCopies(
667 if (MO.getSubReg() || !MI->
isCopy())
690 CopyValues.
push_back(std::make_pair(DstLI, DstVNI));
693 if (CopyValues.
empty())
700 for (
unsigned i = 0, e = Kills.
size(); i != e; ++i) {
702 for (
unsigned j = 0, e = CopyValues.
size(); j != e; ++j) {
704 const VNInfo *DstVNI = CopyValues[j].second;
712 << DstVNI->
id <<
" in " << *DstLI <<
'\n');
715 unsigned LocNo = getLocationNo(CopyMI->
getOperand(0));
718 NewDefs.push_back(std::make_pair(Idx, NewLoc));
731 if (!
I.value().isUndef())
732 Defs.
push_back(std::make_pair(
I.start(),
I.value()));
735 for (
unsigned i = 0; i != Defs.
size(); ++i) {
740 if (!LocMO.
isReg()) {
741 extendDef(Idx, Loc,
nullptr,
nullptr,
nullptr, LIS);
748 const VNInfo *VNI =
nullptr;
754 extendDef(Idx, Loc, LI, VNI, &Kills, LIS);
792 if (PrevEnd && I.
start() < PrevEnd) {
805 I.
insert(RStart, IStop, Loc);
813 if (I.
start() < RStart) {
817 trimmedDefs.insert(RStart);
834 if (PrevEnd && I.
start() < PrevEnd)
838 void LDVImpl::computeIntervals() {
842 for (
unsigned i = 0, e = userValues.size(); i != e; ++i) {
843 userValues[i]->computeIntervals(MF->getRegInfo(), *
TRI, *LIS,
LS);
844 userValues[i]->mapVirtRegs(
this);
853 LLVM_DEBUG(
dbgs() <<
"********** COMPUTING LIVE DEBUG VARIABLES: " 854 << mf.
getName() <<
" **********\n");
859 ModifiedMF = Changed;
865 for (
auto MBBI = MBB.begin(), MBBE = MBB.end(); MBBI != MBBE; ) {
866 if (!MBBI->isDebugValue()) {
870 MBBI = MBB.erase(MBBI);
883 pImpl =
new LDVImpl(
this);
884 return static_cast<LDVImpl*
>(pImpl)->runOnMachineFunction(mf);
887 void LiveDebugVariables::releaseMemory() {
889 static_cast<LDVImpl*
>(pImpl)->
clear();
894 delete static_cast<LDVImpl*
>(pImpl);
905 dbgs() <<
"Splitting Loc" << OldLocNo <<
'\t';
908 bool DidChange =
false;
911 for (
unsigned i = 0; i != NewRegs.
size(); ++i) {
921 if (!LocMapI.
valid())
925 while (LocMapI.
valid() && LII != LIE) {
932 if (LocMapI.
value().locNo() == OldLocNo && LII->start < LocMapI.
stop()) {
936 MO.
setSubReg(locations[OldLocNo].getSubReg());
937 NewLocNo = getLocationNo(MO);
946 if (LStart < LII->start)
948 if (LStop > LII->end)
955 if (LStart < LocMapI.
start()) {
958 assert(LocMapI.
valid() &&
"Unexpected coalescing");
960 if (LStop > LocMapI.
stop()) {
962 LocMapI.
insert(LII->end, LStop, OldLoc);
968 if (LII->end < LocMapI.
stop()) {
974 if (!LocMapI.
valid())
982 locations.erase(locations.begin() + OldLocNo);
984 while (LocMapI.
valid()) {
986 if (v.
locNo() == OldLocNo) {
988 << LocMapI.
stop() <<
")\n");
1000 dbgs() <<
"Split result: \t";
1009 bool DidChange =
false;
1012 for (
unsigned i = locations.size(); i ; --i) {
1013 unsigned LocNo = i-1;
1017 DidChange |= splitLocation(LocNo, NewRegs, LIS);
1023 bool DidChange =
false;
1024 for (UserValue *UV = lookupVirtReg(OldReg); UV; UV = UV->getNext())
1025 DidChange |= UV->splitRegister(OldReg, NewRegs, *LIS);
1031 UserValue *UV = lookupVirtReg(OldReg);
1032 for (
unsigned i = 0; i != NewRegs.
size(); ++i)
1033 mapVirtReg(NewRegs[i], UV);
1039 static_cast<LDVImpl*
>(pImpl)->
splitRegister(OldReg, NewRegs);
1054 for (
unsigned I = 0,
E = locations.size();
I !=
E; ++
I) {
1055 bool Spilled =
false;
1060 unsigned VirtReg = Loc.
getReg();
1079 auto InsertResult = NewLocations.
insert({Loc, Spilled});
1080 unsigned NewLocNo = std::distance(NewLocations.
begin(), InsertResult.first);
1081 LocNoMap[
I] = NewLocNo;
1086 SpilledLocations.
clear();
1087 SpilledLocations.
resize(NewLocations.
size());
1088 for (
auto &Pair : NewLocations) {
1089 locations.push_back(Pair.first);
1091 unsigned NewLocNo = std::distance(&*NewLocations.begin(), &Pair);
1092 SpilledLocations.
set(NewLocNo);
1106 unsigned NewLocNo = LocNoMap[Loc.
locNo()];
1108 I.setStart(
I.start());
1148 while (I != MBB->
end() && !I->isTerminator()) {
1152 if (I->definesRegister(Reg, &TRI))
1154 return std::next(I);
1168 StopIdx = (MBBEndIdx < StopIdx) ? MBBEndIdx : StopIdx;
1173 locations[Loc.
locNo()] :
1179 ++NumInsertedDebugValues;
1181 assert(cast<DILocalVariable>(Variable)
1182 ->isValidLocationForIntrinsic(getDebugLoc()) &&
1183 "Expected inlined-at fields to agree");
1196 assert((!Spilled || MO.
isFI()) &&
"a spilled location must be a frame index");
1199 BuildMI(*MBB, I, getDebugLoc(), TII.
get(TargetOpcode::DBG_VALUE),
1200 IsIndirect, MO, Variable, Expr);
1205 }
while (I != MBB->
end());
1218 bool Spilled = !Loc.
isUndef() ? SpilledLocations.
test(Loc.
locNo()) :
false;
1223 if (trimmedDefs.count(Start))
1231 insertDebugValue(&*MBB, Start, Stop, Loc, Spilled, LIS, TII, TRI);
1234 while (Stop > MBBEnd) {
1241 insertDebugValue(&*MBB, Start, Stop, Loc, Spilled, LIS, TII, TRI);
1251 void LDVImpl::emitDebugValues(
VirtRegMap *VRM) {
1252 LLVM_DEBUG(
dbgs() <<
"********** EMITTING LIVE DEBUG VARIABLES **********\n");
1257 for (
unsigned i = 0, e = userValues.size(); i != e; ++i) {
1259 userValues[i]->rewriteLocations(*VRM, *TRI, SpilledLocations);
1260 userValues[i]->emitDebugValues(VRM, *LIS, *TII, *TRI, SpilledLocations);
1270 bool LiveDebugVariables::doInitialization(
Module &M) {
1274 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) 1277 static_cast<LDVImpl*
>(pImpl)->
print(
dbgs());
static bool isReg(const MCInst &MI, unsigned OpNo)
void resize(unsigned N, bool t=false)
resize - Grow or shrink the bitvector.
void setValueUnchecked(ValT x)
setValueUnchecked - Change the mapped value of the current interval without checking for coalescing...
void push_back(const T &Elt)
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()
SlotIndex getBaseIndex() const
Returns the base index for associated with this index.
SlotIndex def
The index of the defining instruction.
Compute iterated dominance frontiers using a linear time algorithm.
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
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
bool test(unsigned Idx) 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.
#define LLVM_DUMP_METHOD
Mark debug helper function definitions like dump() that should not be stripped from debug builds...
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.
void clear()
clear - Removes all bits from the bitvector. Does not change capacity.
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
Access to explicit operands of the instruction.
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.
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.
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.
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.
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...
static void collectDebugValues(MachineInstr &MI, SmallVectorImpl< MachineInstr *> &DbgValues)
collectDebgValues - Scan instructions following MI and collect any matching DBG_VALUEs.
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.