DAG dump readability
Sean Silva
silvas at purdue.edu
Fri Dec 6 10:57:07 PST 2013
On Fri, Dec 6, 2013 at 1:52 PM, Stepan Dyatkovskiy <stpworld at narod.ru>wrote:
> Yep. May be we can pick up something shorter then "Node". Don't think # is
> the best choice, since '#' is used already (in additional info for
> load/store instructions).
> May be we can use N0, N1, N2, ... form.
>
>
> Though my goal was to improve readability (I didn't try make constructions
> shorter).
> IMHO it is difficult to lookup 0x1234545 in heap
The addresses may be there so that it is easy to look at nodes in the
debugger.
-- Sean Silva
> of very similar numbers (0x1324545, 0x1243545, ...).
> It is more comfortable to see Node1, Node2, Node3, where Node1 could be
> introduced only before Node2 and Node3.
>
> Numbers are not Node IDs actually, but serial numbers assigned to each
> pointers. For first pointer we assign 0, for second 1 and so on.
>
> Using this approach you can get easy convert dump with pointers into one
> with Node<Num>-s.
>
> -Stepan.
>
> Mikael Lyngvig wrote:
>
>> Perhaps you should consider to use #ID instead of NodeID (#43 instead of
>> Node43) as it appears that there may be quite a few nodes in each line
>> and you thereby can save three characters per node. But as you are
>> already saving a few characters per node, it may be a silly suggestion.
>> Just my two pennies.
>>
>>
>> -- Mikael
>>
>>
>> 2013/12/6 Stepan Dyatkovskiy <stpworld at narod.ru <mailto:stpworld at narod.ru
>> >>
>>
>>
>> Hi all!
>> I propose DAG dump improvement (for -debug output). To be short just
>> look at example below:
>>
>> Now:
>> 0x3adf4e0: v4i32,ch = load 0x3ab64c0, 0x3ab5680, 0x3abaee0
>> <LD16[bitcast ([4 x i32]* @f to <4 x
>> i32>*)](align=4)(tbaa=<badref>__)> [ORD=47] [ID=-3]
>>
>>
>> After:
>> Node47: v4i32,ch = load Node7, Node46, Node26<i32 undef>
>> <LD16[bitcast ([4 x i32]* @f to <4 x
>> i32>*)](align=4)(tbaa=<badref>__)> [ORD=47] [ID=-3]
>>
>>
>> Features:
>> * Possibility to replace 0xCRAZYNUM with something more
>> readable (Node<Num>).
>> You can also setup to output both CRAZYNUM and Node<Num>.
>> * Constants, registers and undef could be inlined. So you don't
>> need
>> to lookup top part of dump just to realize that 0x3abaee0 is
>> undef.
>> It could be inlined in hint mode, or substitution mode.
>> In last case you will get next output:
>> Node47: v4i32,ch = load Node7, Node46, i32 undef <LD16[bitcast
>> ([4 x i32]* @f to <4 x i32>*)](align=4)(tbaa=<badref>__)> [ORD=47]
>>
>> [ID=-3]
>>
>> Will wait you reviews, remarks and questions.
>>
>> -Stepan
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu <mailto:llvm-commits at cs.uiuc.edu>
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>>
>>
>>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131206/d16ba3b9/attachment.html>
More information about the llvm-commits
mailing list