This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Disable -mbranch-likely for -Os when targetting generic architecture
- From: Richard Sandiford <rdsandiford at googlemail dot com>
- To: Robert Suchanek <Robert dot Suchanek at imgtec dot com>
- Cc: Matthew Fortune <Matthew dot Fortune at imgtec dot com>, "Catherine_Moore\ at mentor dot com" <Catherine_Moore at mentor dot com>, "gcc-patches\ at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 20 Aug 2015 21:09:54 +0100
- Subject: Re: [PATCH] Disable -mbranch-likely for -Os when targetting generic architecture
- Authentication-results: sourceware.org; auth=none
- References: <B5E67142681B53468FAF6B7C31356562441B05F4 at hhmail02 dot hh dot imgtec dot org>
Robert Suchanek <Robert.Suchanek@imgtec.com> writes:
> The patch below disables generation of the branch likely instructions for -Os
> but only for generic architecture. The branch likely may result in some
> code size reduction but the cost of running the code on R6 core is significant.
How about instead splitting PTF_AVOID_BRANCHLIKELY into
PTF_AVOID_BRANCHLIKELY_SPEED and PTF_AVOID_BRANCHLIKELY_SIZE?
We could have PTF_AVOID_BRANCHLIKELY_ALWAYS as an OR of the two.
Anything that does string ops on the architecture is suspicious :-)
Thanks,
Richard