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: [PATCH] Disable -mbranch-likely for -Os when targetting generic architecture


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


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