[llvm-commits] [Patch] Dump DbgInfo from SelectionDAG

Renato Golin rengolin at systemcall.org
Mon May 23 13:23:30 PDT 2011


On 23 May 2011 19:34, Villmow, Micah <Micah.Villmow at amd.com> wrote:
> Devang,
>  Here is a patch that introduces the dump API to dbg info so that it emits information when SelectionDAG->dump() is also called. This is useful when attempting to see which phase of DAG combine invalidates debug information.

Hi Micah,

This is a good idea. I have some style comments only...


In SelectionDag::dump()

+  if (DbgInfo) {
+    dbgs() << "SelectionDAG has debug information.\n";
+    DbgInfo->dump();
+  }

I'd put the print inside the function and leave only:

+  if (DbgInfo)
+    DbgInfo->dump();


In SDDbgInfo::dump(), I wouldn't separate them into "Argument" and
"Normal", because the former is just for ByVal arguments, not all
arguments. Maybe just call it "ByVal" and the rest call nothing, just
"debug values".


In SDDbgValue::dump(), I'd use a switch for getKind():

+  if (getKind() == SDNODE) {
+    dbgs() << "SDNODE\t";
(...)


cheers,
--renato




More information about the llvm-commits mailing list