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

Villmow, Micah Micah.Villmow at amd.com
Tue May 24 21:01:27 PDT 2011


Here is the updated patch.

-----Original Message-----
From: rengolin at gmail.com [mailto:rengolin at gmail.com] On Behalf Of Renato Golin
Sent: Monday, May 23, 2011 1:24 PM
To: Villmow, Micah
Cc: llvm-commits at cs.uiuc.edu
Subject: Re: [llvm-commits] [Patch] Dump DbgInfo from SelectionDAG

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: dump_debug_info.patch
Type: application/octet-stream
Size: 2062 bytes
Desc: dump_debug_info.patch
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20110524/3dbc4f7b/attachment.obj>


More information about the llvm-commits mailing list