This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: i386 CONST_COSTS take 2
> P.S.: I realise that my last idea doesn't quite work - cse can move constants
> both ways, i.e. either load them separately or put them directly into an insn.
> gcse, on the other hand, only tried to load them into registers.
>
> So with the current infrastructure, you'd have to have a zero cost for
> cse1 to put the constants into the insn, and a non-zero cost for gcse
> to common them and cse2 to leave them alone.
GCSE is able to take care for costs and commonize constants inside expressions?
I think we can't do that, as it does not take costs into accounts current at all
(I have patch for that but it is not reviewed) and it cse just root expressions.
Perhaps it can be worth making extra pass for that....
Honza