This is the mail archive of the gcc-patches@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: [PATCH] fold-const.c use of BRANCH_COST


Geoff Keating wrote:
Andrew Pinski <pinskia at physics dot uc dot 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.]



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