[tree-ssa-branch] Optimizing non-SIMPLE trees

Jan Hubicka jh@suse.cz
Fri Aug 23 03:32:00 GMT 2002


> The problem seems to come down to this: the builtin expanders want args
> like '(char*)"foo"', and that's not a valid SIMPLE value, so we copy it
> into a temporary pointer.  Doing the reverse substitution in CCP isn't a
> solution, as it would produce something not SIMPLE.
> 
> Possible solutions are
>  1) Change SIMPLE so that 'val' allows ADDR_EXPR->STRING_CST (and whatever
>     other tree patterns various builtins want).
>  2) Enhance the builtin expanders to use dataflow information.
> 
> I prefer #2.
Yes, #2 should be easy and convenient way to do so.  There are not that
many expanders around so this is task doable in a day I expect.

Alternate still can be to convert SIMPLE into non-SIMPLE (with complex
operands) by CCP just before RTL expansion, but it is getting, well,
ugly.

Problem may be the standard RTL lowering process that commonly asks
whether given operand is an constant.  Perhaps it can be done by
teaching code to expand registers to ask dataflow whether register is
known to be constant and use the constant instead...

Honza
> 
> Jason



More information about the Gcc mailing list