This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: branch optimizations
- From: Mike Stump <mikestump at comcast dot net>
- To: Zdenek Dvorak <ook at ucw dot cz>, Jason Eckhardt <jle at rice dot edu>
- Cc: "gcc-patches at gcc dot gnu dot org Patches" <gcc-patches at gcc dot gnu dot org>, Kenneth Zadeck <zadeck at naturalbridge dot com>, Steven Bosscher <stevenb dot gcc at gmail dot com>
- Date: Fri, 29 Apr 2011 12:14:18 -0700
- Subject: Re: branch optimizations
- References: <80433F2F-02E5-4912-B0F0-8F47D76C2513@comcast.net> <BANLkTik6aBDgJFtL8keFCcP6GC8VfQE6Kg@mail.gmail.com>
Someone pointed out a patch by Zdenek Dvorak which implements TSP-based basic block reordering:
http://gcc.gnu.org/ml/gcc-patches/2004-03/msg02335.html
to me. From the spec numbers presented, it looks enticing. Zdenek, do you think this is still a reasonable direction to go? If so, I'd like to ping it for review. One thing I don't like about it is that it does static prediction, though, I'd be happy to alter it for dynamic prediction. In my patch:
http://gcc.gnu.org/ml/gcc/2011-04/msg00365.html
I do handle dynamic prediction (hidden behind the CHEAPER target macro), though, the math is machine independent, once you have the costs and the expected mis-prediction rate.
Did I read the numbers right, 4.7% across a fair bit of spec on x86? That seems like a worthwhile type of number, yes?