This is the mail archive of the
mailing list for the GCC project.
PR target/52555: attribute optimize is overriding command line options
- From: Aldy Hernandez <aldyh at redhat dot com>
- To: Jakub Jelinek <jakub at redhat dot com>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 11 Feb 2013 18:15:05 -0600
- Subject: PR target/52555: attribute optimize is overriding command line options
The problem here is that -ffast-math is overridden when switching
optimization options on a per function basis with
The x86 ceilf* instructions depend on unsafe math optimizations, but the
optabs are created at the beginning of the compilation. When fast math
becomes unavailable, the target can no longer find the instructions.
Fixed by recalculating the optabs when creating new optimization nodes,
and switching to these (if appropriate) at cfun switching time.
How does this look?
Jakub, what's this you mention in the PR about caching
__optimize__((3))? You also mention I shouldn't compare against
this_target_optabs, but default_target_optabs. But what if
this_target_optabs has changed? (See patch).
Tested on x86-64 Linux. It would be nice if someone with access to a
SWITCHABLE_TARGET platform (mips) could also test this.
Description: Text document