DAG dump readability

Stepan Dyatkovskiy stpworld at narod.ru
Mon Dec 9 06:12:12 PST 2013


ping
Stepan Dyatkovskiy wrote:
>  > The addresses may be there so that it is easy to look at nodes in the
>  > debugger.
>
> I took it into account. You can set it up to output both Node<Num> and
> pointer, it will take next form:
> Node47<0x12312312>: v4i32,ch = load Node7<0x23423434>,
> Node46<0x45563457>, Node26<0x67867834, i32 undef>
>
> For both node itself, and operands you can say what you want to see:
> id - only Node<Num>
> ptr - only pointer
> idptr - both.
>
> Command line options that allows to tune it are defined in patch in the
> beginning of SelectionDAGDumper.cpp file.
>
> -Stepan.
>
> Sean Silva wrote:
>>
>>
>>
>> On Fri, Dec 6, 2013 at 1:52 PM, Stepan Dyatkovskiy <stpworld at narod.ru
>> <mailto: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> <mailto: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>
>>         <mailto:llvm-commits at cs.uiuc.__edu
>>         <mailto:llvm-commits at cs.uiuc.edu>>
>>         http://lists.cs.uiuc.edu/__mailman/listinfo/llvm-commits
>>         <http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits>
>>
>>
>>
>>     _________________________________________________
>>     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
>>     <http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits>
>>
>>
>




More information about the llvm-commits mailing list