[PATCH] Further restrict TER replacing over calls (PR55752)
Jakub Jelinek
jakub@redhat.com
Thu Dec 20 13:59:00 GMT 2012
On Thu, Dec 20, 2012 at 02:51:55PM +0100, Richard Biener wrote:
> In the PR we perform expression replacement of an FP operation
> across a builtin call that sets the FP control register. This
> patch restricts replacement across calls further, from allowing
> all builtins to only allowing those without side-effects.
>
> Allowing replacement over calls at all was to not pessimize
> FP code generation for example for sqrt which is most often
> expanded to a single instruction.
>
> Bootstrap and regtest running on x86_64-unknown-linux-gnu.
>
> Comments?
Wouldn't it be better to have there a list of known builtins over which it
is fine to do TER? I'd bet most of memory or string builtins that don't
call malloc/free should be still ok, but they surely have side-effects.
> 2012-12-20 Richard Biener <rguenther@suse.de>
>
> PR middle-end/55752
> * tree-ssa-ter.c (find_replaceable_in_bb): Only allow replacing
> across calls with no side-effects.
Jakub
More information about the Gcc-patches
mailing list