Jean Christophe Beyler <jean.christophe.bey...@gmail.com> writes:

> I'm currently working on removing the constant folding and constant
> propagation because, on the architecture I'm working on, it is highly
> costly to move a constant into a register if the number is big (we can
> say over 16 bits).
>
> Currently, I've been looking into this and it seems that I have to
> hack into the fold-const.c file, CCP, SCCVN and probably the propagate
> passes to tell the compiler to be careful if the number is too big.
> But I'm sure there are many other places I'll have to hack and slash
> to tell him to stop the folding and propagation. Is there an easier
> way to do this ?

This type of thing is normally controlled by the TARGET_RTX_COSTS
hook.  E.g., see the handling of CONST_INT mips_rtx_costs in
config/mips/mips.c.

Ian

Reply via email to