mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-05-20 20:38:48 +00:00
Added debugging routine dumpUses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47042 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
fd29e0eb06
commit
1eb5cf9c7d
@ -110,13 +110,22 @@ public:
|
|||||||
RegNo -= TargetRegisterInfo::FirstVirtualRegister;
|
RegNo -= TargetRegisterInfo::FirstVirtualRegister;
|
||||||
return VRegInfo[RegNo].second;
|
return VRegInfo[RegNo].second;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// getVRegDef - Return the machine instr that defines the specified virtual
|
||||||
|
/// register or null if none is found. This assumes that the code is in SSA
|
||||||
|
/// form, so there should only be one definition.
|
||||||
|
MachineInstr *getVRegDef(unsigned Reg) const;
|
||||||
|
|
||||||
|
#ifndef NDEBUG
|
||||||
|
void dumpUses(unsigned RegNo) const;
|
||||||
|
#endif
|
||||||
|
|
||||||
//===--------------------------------------------------------------------===//
|
//===--------------------------------------------------------------------===//
|
||||||
// Virtual Register Info
|
// Virtual Register Info
|
||||||
//===--------------------------------------------------------------------===//
|
//===--------------------------------------------------------------------===//
|
||||||
|
|
||||||
/// getRegClass - Return the register class of the specified virtual register.
|
/// getRegClass - Return the register class of the specified virtual register.
|
||||||
const TargetRegisterClass *getRegClass(unsigned Reg) {
|
const TargetRegisterClass *getRegClass(unsigned Reg) const {
|
||||||
Reg -= TargetRegisterInfo::FirstVirtualRegister;
|
Reg -= TargetRegisterInfo::FirstVirtualRegister;
|
||||||
assert(Reg < VRegInfo.size() && "Invalid vreg!");
|
assert(Reg < VRegInfo.size() && "Invalid vreg!");
|
||||||
return VRegInfo[Reg].first;
|
return VRegInfo[Reg].first;
|
||||||
@ -145,11 +154,6 @@ public:
|
|||||||
return VRegInfo.size()+TargetRegisterInfo::FirstVirtualRegister-1;
|
return VRegInfo.size()+TargetRegisterInfo::FirstVirtualRegister-1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// getVRegDef - Return the machine instr that defines the specified virtual
|
|
||||||
/// register or null if none is found. This assumes that the code is in SSA
|
|
||||||
/// form, so there should only be one definition.
|
|
||||||
MachineInstr *getVRegDef(unsigned Reg) const;
|
|
||||||
|
|
||||||
|
|
||||||
//===--------------------------------------------------------------------===//
|
//===--------------------------------------------------------------------===//
|
||||||
// Physical Register Use Info
|
// Physical Register Use Info
|
||||||
|
@ -73,3 +73,11 @@ MachineInstr *MachineRegisterInfo::getVRegDef(unsigned Reg) const {
|
|||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef NDEBUG
|
||||||
|
void MachineRegisterInfo::dumpUses(unsigned Reg) const {
|
||||||
|
for (use_iterator I = use_begin(Reg), E = use_end(); I != E; ++I)
|
||||||
|
I.getOperand().getParent()->dump();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user