This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: ra-debug.c: why?
- From: Daniel Berlin <dberlin at dberlin dot org>
- To: Zack Weinberg <zack at codesourcery dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Wed, 17 Jul 2002 20:03:31 -0400 (EDT)
- Subject: Re: ra-debug.c: why?
On Wed, 17 Jul 2002, Zack Weinberg wrote:
> Why is it necessary for the new register allocator to have a complete
> copy of the RTL dumper with the format changed around?
Mainly because basically every single paper on register allocation uses
that type of format.
I didn't implement it, Mike did. But I can see why he'd rather see it in
that format.
> Now there are
> two places to edit when we want to tweak the dump format, and two
> different formats for developers to be familiar with.
Say what?
The formats are different, remember, so if you are "tweaking" one,
why would you need to change the other.
It's also not as if new RTL is added *all* the time.
It's just not he big deal you are trying to make it out to be.
Also, which developers need to be "familiar with" it. Rarely does the
allocator get modified, and it's not as if this format is confusing.
In particular, the dump is *not* exclusive of an RTL dump, it is just a
dump that is specific to the new register allocator, and only interesting
to see what the effect insns have on the new register allocator, and to
debug stuff.
It is *much* easier to read and understand for someone trying to debug a
register allocator, than an RTL dump is.
You can see an RTL dump in the results of reload.
> Also, having
> one dump be in a different format from the others makes it impossible
> to do side-by-side diff between successive dumps to determine what
> changed.
This is not a problem, since the new regalloc doesn't change anything
except spill code, and the spill code is quite obvious in the new format.
Reload does the register reassignment.
And reload prints it in the normal RTL dump format.
If you want to know what the allocator does, it quite clearly tells you
what registers get what colors.
Since it doesn't actually modify the registers to have this color (reload
does this), it can't print out an RTL dump with the new colors anyway.
I still don't get what the BFD is.
On the tree-ssa-branch, fer instance, you can have it print tree dumps in
unparsed (C format), or the normal dump format.
And debug_tree looks like neither.
Each format has it's usefulness, it's not something that requires
weeks or months of learning.
If you don't like it, turn it off, it's an option, not a requirement.
>
> zw
>
>