[PATCH] i386: Use the STC bb-reorder algorithm at -Os (PR67864)
Segher Boessenkool
segher@kernel.crashing.org
Fri Oct 16 13:33:00 GMT 2015
On Fri, Oct 16, 2015 at 02:55:54PM +0200, Bernd Schmidt wrote:
> On 10/16/2015 02:53 PM, Segher Boessenkool wrote:
> >For x86, STC still gives better results for optimise-for-size than
> >"simple" does. So use STC at -Os as well.
>
> For how many targets is this true, and for the others, what is the
> biggest win from "simple"?
See <http://gcc.gnu.org/ml/gcc-patches/2015-10/msg00882.html>.
Of the targets I could test there, only x86 and mn10300 like STC better.
My theory is that is because they have a smaller encoding for very short
branches.
Simple is about half a percent smaller on most targets.
> If the list of targets which get patches such
> as this one is too large, maybe we ought to admit defeat on the "simple"
> algorithm and revert it.
(Revert it for -Os, not -O1).
Yes, but it's just these two. For everything else simple wins now.
Segher
More information about the Gcc-patches
mailing list