[PATCH] fold-const.c use of BRANCH_COST

Segher Boessenkool segher@koffie.nl
Sat Apr 12 02:48:00 GMT 2003


Geoff Keating wrote:
> Andrew Pinski <pinskia@physics.uc.edu> writes:
> 
>>Because with BRANCH_COST set to 3, gcc on PPC produces
>>serializing instructions (adde, subfe, subfme, subfze) on some
>>processors, like 750 and 7400.
>>It also sometimes produces smaller code.
> 
> If these instructions are serializing, it's probably not useful for
> GCC to be producing them at all on these processors; they'll always be
> slower than a branch.

On G3 and G4, these insns are only execution serialized (because
XER is not renamed), not completion serialized or worse.  They
can be quite useful, especially if interleaved with integer, load
or AltiVec insns; it's certainly not worse then branching in
most cases.  Current GCC seems to like them a little bit *too*
much, though.


Segher

[Execution serialization means: the insn won't execute until all
prior insns have completed; for most such insns the results of
the insn are only available after the insn has completed.]




More information about the Gcc-patches mailing list