This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: patch: promoting complex modes (plus splitting complex args)
- From: Aldy Hernandez <aldyh at redhat dot com>
- To: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- Cc: dje at watson dot ibm dot com, gcc-patches at gcc dot gnu dot org, rth at redhat dot com
- Date: 23 Jan 2003 07:18:48 -0800
- Subject: Re: patch: promoting complex modes (plus splitting complex args)
- References: <10301222035.AA17738@vlsi1.ultra.nyu.edu>
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