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: [tree-ssa] Fix mudflap codegen and allow optimizations [patch]


Which process is that PowerPC, the timings are totally different between processors.
Also the branch predictor are also totally different. Same Problem in x86 but not as drastic.


Thanks,
Andrew Pinski

On Sunday, Apr 27, 2003, at 23:22 US/Eastern, Diego Novillo wrote:

On Sun, Apr 27, 2003 at 09:56:30PM -0400, Frank Ch. Eigler wrote:

- The call to __builtin_expect was using BIT_IOR_EXPR instead of
  TRUTH_ORIF_EXPR.  This prevents the short-circuit evaluation of
  the predicate, producing slightly slower code. [...]

Are you sure about that? Short-circuit evaluation usually requires additional branches. I recall experimenting with this early on, and it made runs slower, not faster.

I had tested the attached on x86 and found the TRUTH_ORIF version
faster than BIT_IOR by about 33%.

But now I've also tested it on x86_64 and PPC and found the exact
opposite (on x86-64 BIT_IOR is 47% faster, on PPC, BIT_IOR is 17%
faster).

So, that's 2 out of 3 and you're right that the code is less
jumpy.  I'll revert to using BIT_IOR.


Diego. <a.c>


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