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: promoting complex modes (plus splitting complex args)


One of the reasons to it this way was that we get the functionality
basically for free, just by handling CONCAT's a few places where we
didn't.  Only the corner case in question is causing problems and I
think we can address this.

Look at the patch, pretty much everything is just handling conversion
of complex numbers.  There's only a one line change to promote_mode():

         case CHAR_TYPE:      case REAL_TYPE:       case OFFSET_TYPE:
   +     case COMPLEX_TYPE:
                PROMOTE_MODE (mode, unsignedp, type);

...everything else just happens for free.

 > OK, so let's add a new macro named something like PASS_COMPLEX_AS_COMPONENTS
 > and implement that.

I saw some horrendously big patches trying to do this, and the patches
were VERY intrusive, in the order of 1500 lines.  That was one of the
motivations to finding a more succint alternative.  The current
approach is short and to the point and is very straightforward IMO.

The reason I took the current approach was because rth suggested it,
so I'll let him chime in.  But if every one is against this approach I
suppose I can go back to the drawing board, but I'd obviously prefer
not to.

Aldy


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