[PATCH] Tweaks for constant-equality-comparisons in BPI

Hal Finkel hfinkel at anl.gov
Wed Oct 30 14:48:49 PDT 2013


----- Original Message -----
> ----- Original Message -----
> > ----- Original Message -----
> > > 
> > > On 28 October 2013 14:42, Renato Golin < renato.golin at linaro.org
> > > >
> > > wrote:
> > > 
> > > I'll check the test-suite and others on my Chromebook and will
> > > get
> > > back to you.
> > > 
> > > 
> > > I haven't done much, with Connect and all, but the little I did
> > > had
> > > no noticeable difference.
> > > 
> > > 
> > > I'd be interested in knowing if there's anything that will
> > > benefit
> > > (or even suffer) from this change.
> > 
> > It looks like I'm seeing a statistically-significant 1% speedup in
> > MultiSource/Applications/sqlite3/sqlite3 on the PPC A2 from the (x
> > == -1) heuristic (currently based on 10 test-suite runs; 5 with the
> > heuristic, 5 without), with no significant regressions. I've not
> > yet
> > tested the power-of-two heuristic.
> 
> Quick update: I see regressions from the power-of-two heuristic
> (amusingly enough, sqlite was a big one, over 2%), so I would not
> want to use that as I originally proposed. I'll also run a set of
> benchmarks where we 'do nothing' for the power-of-two case to see
> how that compares.

My best statistical evidence supports keeping the current behavior for (x ==/!= 0) (so doing nothing different for the power-of-two case), and committing the (x ==/!= -1) change (which gives a measurable speedup).

I'd also like to commit the error-reporting-functions-as-cold-functions change (the patch from the other e-mail); I see no changes in the test suite, but that helps mostly for debugging (when people add conditional fprintf(stderr, ...) into hot parts of the code).

Thoughts?

Thanks again,
Hal

> 
> Thanks again,
> Hal
> 
> > 
> >  -Hal
> > 
> > > 
> > > 
> > > cheers,
> > > --renato
> > 
> > --
> > Hal Finkel
> > Assistant Computational Scientist
> > Leadership Computing Facility
> > Argonne National Laboratory
> > _______________________________________________
> > llvm-commits mailing list
> > llvm-commits at cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
> > 
> 
> --
> Hal Finkel
> Assistant Computational Scientist
> Leadership Computing Facility
> Argonne National Laboratory
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
> 

-- 
Hal Finkel
Assistant Computational Scientist
Leadership Computing Facility
Argonne National Laboratory



More information about the llvm-commits mailing list