This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: fix opt/8634
Hello,
> > It would also make a sense
> > to have less memory bloated code representation (but this is of course
> > something that cannot be changed now, and also it does not seem
> > quite desirable).
>
> It can be changed. I can't find it now, but some time ago I wrote a
> mail message to the GCC lists explaining how you could do everything
> that GCC does now with RTL by using data structures that are tied to
> specific machine instructions; for instance, instead of having
>
> (jump_insn 178 177 325 (set (pc)
> (if_then_else (ne (reg:CC 150)
> (const_int 0 [0x0]))
> (label_ref 231)
> (pc))) 541 {*rs6000.md:13889} (nil)
> (expr_list:REG_DEAD (reg:CC 150)
> (nil)))
>
> you have
>
> (jump_insn 178 177 325 541 {*rs6000.md:13889} (reg:CC 150) (label_ref 231)
> (nil)
> (expr_list:REG_DEAD (reg:CC 150) (nil))
> )
>
> which can be even further simplified if you notice that the first
> parameter will always be a REG and the second a label_ref. The
> biggest win is not even in memory consumption, although that's pretty
> big, it's that you don't have to traverse over all the pointers; you
> can look at everything in this insn, other than the notes, without any
> pointer dereferences at all.
sounds cool; still it would be quite intrusive change. There is quite
a lot of code that traverses rtl; how would you cope with this? Or would
all such code have to be rewritten?
Zdenek