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] Add un-distribution to tree-ssa-reassoc (2nd try)


On Tue, May 20, 2008 at 8:38 PM, Toon Moene <toon@moene.indiv.nluug.nl> wrote:
> Richard Guenther wrote:
>
>> This adds un-distribution capabilities to tree-ssa-reassoc:
>> a * b + a * c -> a * (b + c)
>
> As far as I can see (function reassociate_bb) this transformation is
> dependent on flag_associative_math.
>
> However, in Fortran, *this* re-association is always legal; see note 7.18
> (7th example) in paragraph 7.18.3 of the Fortran 2003 Standard.
>
> "nag, nag".

Fortran should always set flag_associative_math now that we adhere to
parentheses.
I didn't commit the patch to do so because of some interaction (diagnostic wise)
with flag_trapping_math (and another, I think flag_finite_math_only)
as I was not sure
if/how a reasonable default of them would be for Fortran.  Remember that doing
re-association can result in extra Infs or exceptions for example.

Richard.


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