[LLVMdev] Bug in MachineRegisterInfo ?
Pranav Bhandarkar
pranavb at codeaurora.org
Tue Apr 10 10:20:52 PDT 2012
Hi,
I wanted to see the non-debug uses of register 0 (Noreg) and so, I wrote the
following piece of code.
*****
MRI = &MF.getRegInfo();
if (!MRI->use_nodbg_empty(0)) {
for (MachineRegisterInfo::use_nodbg_iterator
ri = MRI->use_nodbg_begin(0), re = MRI->use_nodbg_end();
ri != re; ++ri) {
MachineInstr *UseMI = &*ri;
UseMI->dump ();
}
}
*****
But I see that UseMI is
DBG_VALUE %noreg, 0, !"foobar"; line no:511 inlined @[ foo.cc:364:5 ]
Also, when I want to check what "isDebugValue" returns, I get this.
(gdb) p UseMI->isDebugValue()
$1 = true
Isn't this a bug ? There seems to be something wrong or am I missing
something ?
TIA,
Pranav
Qualcomm Innovation Center (QuIC) is a member of the Code Aurora Forum.
More information about the llvm-dev
mailing list