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]

Re: Complex Division Patch (reprise)


My proposal is this:

  1.  I re-do Toon's patch so that it chooses the old method vs. the
      new based on a new global variable, and each implementation is
      in its own function.

  2.  The new global variable defaults to "use old method".

  3.  The Fortran front end (and any other) initializes that variable
      so we use the new method when compiling Fortran code.  (There's
      already a mechanism for this, and it's already used, so there's
      nothing new about doing things this way.)

  4.  To address a *years-old* issue Toon also raised (again), I "fix"
      the back end's sqrt implementation to worry about `errno' *only*
      if another new global variable is set.

  5.  The other new global variable defaults to "worry about errno".

  6.  The Fortran front end (and any other) initializes that variable
      so we don't worry about errno when compiling Fortran code.

  7.  No changes are made to the meaning of -ffast-math.

  8.  No new options are introduced.

  9.  No code-generation changes are introduced for gcc/g++ users.

I'll do the above within a couple of days unless Jeff says they can't
go into 1.2, in which case I'll work on higher-priority stuff.

Jeff, are you willing to let the above go into 1.2, if I make suitably
clean patches for it, and verify that *no* code changes occur for
gcc compilation of pertinent C code?  The effect of these changes
would be *solely* limited to improving performance on g77-compiled
code.

(I won't be particularly upset if some or all of the above ends up
getting put off, but, really, we g77 people have been asking for
these things to be fixed, especially sqrt<->errno, for years now,
and it's only been our own lack of resources and planning that caused
us to slip the 1.2 date.  However, I'm confident I'd remember to get
this done ASAP in the mainline after the 1.2 branch is made.)

After 1.2, we can talk about how command-line options (such as -ffast-math,
or new ones) might control the above behaviors.

So what the above accomplishes is to better insulate Fortran and C
programmers from having to "pay for" the other group's requirements.
(Fortran programmers generally want full range for complex division;
C programmers generally want errno maintained.)

        tq vm, (burley)


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