[PATCH] Yet another tree dumper

Dale Johannesen dalej@apple.com
Fri Oct 10 16:44:00 GMT 2003


On Thursday, October 9, 2003, at 07:57  PM, Jason Merrill wrote:

> 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
>> [...]
>
>> (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
>>
>
> This doesn't seem like a significant enough improvement to justify
> duplicating so much code.

As an experienced user of both dumpers, I find the second one is FAR 
superior.
I think others will agree if you give it a try.



More information about the Gcc-patches mailing list