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]

Re: Proposed major change to combine


>     Whenever three insns are cheaper than two insns,
>     the three insns would be better.
> 
> We currently have no metric that would tell us that: I don't think
> adding up rtx_cost of all the SET_SRC expressions is meant for that
> sort of purpose.  Moreover, it seems unlikely for modern machines.

No, it should add the rtx_cost of the patterns of the insns involved.
granted, this will often give wrong results right now, but that could 
e fixed.

> Can you give an example?

The SH port has a fake shift insn pattern that pretends to be able to shift
by amounts that the hardware doesn't actually support.
So this eventually needs to be expanded into multiple smaller shifts.
When such a shift is used before / after an AND operation, there are
oportunities to reduce the overall machine insn count.


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