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: recombination?


"Erich Plondke" <eplondke@gmail.com> writes:

>   * Combine doesn't pick tuples of three to attempt to combine, so it
> would never
>     pick mult, plus, and ashift to try together.

Actually, combine does try to put pairs and triplets of instructions
together.  It won't do four instructions at once, though.

>   * Combine doesn't put an instruction back to try and combine again,
> so once I get "mac"
>     combine doesn't try again to find "mac_s16".

No, actually, it will do this.  It is possible to build up
combinations through a sequence of insn patterns.

I don't know why it didn't combine for you.  You will have look at the
RTL debugging dump to figure it out.

A common problem is that combine will normally only combine two or
three SETs if the destination register of the earlier one dies in the
later one.  (Technically it will try to putting together a PARALLEL of
the combined instruction and the initial SET, but this rarely
matches.)

Another occasional problem is that combine will only do a combination
if the resulting instruction is cheaper, so you have to make sure that
your costs are right.

Ian


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