This is the mail archive of the gcc@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: [tree-ssa-branch] Optimizing non-SIMPLE trees


> 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


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