[LLVMdev] Nice nodes dumping patch

Stepan Dyatkovskiy stpworld at narod.ru
Wed Sep 12 07:57:38 PDT 2012


As James requested, added constant inlining feature.

Options are:
   -debug-node-ids
   -debug-inline-consts

-Stepan

Stepan Dyatkovskiy wrote:
> Hi all. Currently if you launch some tool with "-debug" option, you got
> pretty detailed dump. Though the SelectionDAG nodes will dumped as its
> pointer values:
> 0xa1d7258: i32 = GlobalAddress<void (i32, ...)* @f> 0
> 0xa1d7368: i32 = undef [ORD=1]
> 0xa1d73f0: i32 = TargetConstant<12> [ORD=1]
> ...
> It is good if you want to look at memory contents by its address then.
> But if you just want to understand how the DAG looks 0xABRACADABRA
> annoying sometimes.
> This patch allows to see the DAG in more readable form:
>
>    Node0: i32 = GlobalAddress<void (i32, ...)* @f> 0
>    Node1: i32 = undef [ORD=1]
>    Node2: i32 = TargetConstant<12> [ORD=1]
>
> Just invoke tools with "-debug -dump-node-ids" options. Note if you omit
> the second option it will dump nodes as its pointer values.
>
> This feature also allows to compare two debug logs with diff tool, since
> node ids depends on its dump order only.
>
> Note sure that it should gone to the main branch. But absolutely sure
> that it may be helpful ;-)
>
> -Stepan.
>
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: nice-debug.patch
Type: text/x-patch
Size: 4794 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120912/1f56c29e/attachment.bin>


More information about the llvm-dev mailing list