This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: RFA: Fix other/44566
Quoting "Joseph S. Myers" <joseph@codesourcery.com>:
On Sat, 26 Jun 2010, Joern Rennecke wrote:
So at least the flags that potentially change program behaviour must be
global, since they represent the user's choices in the context of the
selected main target.
Flags affecting semantics like that should be used to affect the GIMPLE
generated rather than global flags being used later in the optimizers.
But still, the place where flag_finite_math_only is manipulated by the sh
is OVERRIDE_OPTIONS (or targetm.target_option_override if my hookizing
patch gets approved), so a change to that logic is needed if the SH
is to be allowed as a secondary target.
And besides, the SH can't use GIMPLE codes in its instruction conditions.
Some instruction patterns are predicated on !TARGET_IEEE, which in turn is
influenced by the eventual setting of flag_finite_math_only inside
sh_override_options.
So, unless you want have rtl codes to encode possible presence of NaNs,
and hack places like cse.c and combine.c to propagate this into different
kinds of comparison / scc codes, and hack all targets to digest this, we
are stuck with global state (might be specific to a target / function, but
would apply to the entirety of a function at least) to control such things.