This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Yet another tree dumper


On Thu, 9 Oct 2003 18:16:47 -0700, Devang Patel <dpatel@apple.com> wrote:

> (gdb) call debug_tree (current_function_decl)
>   <function_decl 0x7b6af8 main
>      type <function_type 0x7b6bd0
>          type <integer_type 0x40f47438 int SI
>              size <integer_cst 0x40f4521c constant 32>
>              unit size <integer_cst 0x40f452a8 constant 4>
>              align 32 symtab 0 alias set -1 precision 32 min <integer_cst
> 0x40f45280 -2147483648> max <integer_cst 0x40f45294 2147483647>
>              pointer_to_this <pointer_type 0x40f51c3c>>
>          DI
>          size <integer_cst 0x40f455b4 constant 64>
>          unit size <integer_cst 0x40f457a8 constant 8>
>          align 64 symtab 0 alias set -1>
>      public static SI file h.c line 3 context <translation_unit_decl
> 0x40f470d8>
>      result <result_decl 0x7b6b64 type <integer_type 0x40f47438 int>
>          SI file h.c line 3 size <integer_cst 0x40f4521c 32> unit size
> <integer_cst 0x40f452a8 4>
>          align 32> initial <block 0x40f461b8>
>      (mem:SI (symbol_ref:SI ("!T__main") [flags 0x3] <function_decl
> 0x7b6af8 main>) [0 S4 A8])
>      saved-insns 0x40f97800>

>[...]

> (gdb) call dmp_tree2(current_function_decl)
> function_decl:0x7b6af8 t=0x7b6bd0 {function_type} line=3(h.c) pub
> initial=0x40f461b8
>                         saved-insns=0x40f97800 0x7b6b64(0x0){0x7b77bc}
> cntxt=0x40f470d8
>                         rtl=0x40ff60d8 main
>   result_decl:0x7b6b64 t=0x40f47438 {int} line=3
>
>   expr_stmt:0x7b77bc (dummy, to be deleted) 0x40f545f0
>
>   compound_stmt:0x7b77d0 line=3 0x7b77e4
>    scope_stmt:0x7b77e4 line=4 BEGIN block=0x40f461b8
>     block:0x40f461b8 vars=0x0 abs-orig=0x0 super=0x0 sub=0x0
> frag-origin=0x0 frag-chain=0x0
>
>     expr_stmt:0x7b7924 line=4 0x7b8138
>      call_expr:0x7b8138 t=0x40f47438 {int} func=0x7b78ac args=0x7b78fc
>       addr_expr:0x7b78ac (func) t=0x7b6d80 {pointer_type} 0x7ac000
>        function_decl:0x7ac000 t=0x40f84654 {int} BUILT_IN_NORMAL
> attr=0x40f7fcbc cntxt=0x40f470d8
>                               rtl=0x40f70d5c printf
>       tree_list:0x7b78fc (args) purpose=0x0 value=0x7b78e8 chain=0x0
>     scope_stmt:0x7b7938 line=5 END block=0x40f461b8

This doesn't seem like a significant enough improvement to justify
duplicating so much code.

Jason


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]