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] Fix PR17687, sincos causing extra addressable vars


On Fri, 2006-12-08 at 09:54 +0100, Richard Guenther wrote:
> I don't agree.  I had the fold variant before and people didn't like
> it.

But it was way different than what you have now as before you used cexp
and now you added cexpi (though I would have called it cexpim).

> Also folding will result in non-gimple which means I could as well
> stick it into convert.c.
No, No, no.  95% of the optimizations in convert.c, need to move.

Generating non-gimple is not an issue as the passes should be able to
handle the non-gimple comming out of fold (most don't right now but
those are bugs to some extend.  There is no way to fix fold to produce
gimple for all folding because that would mean fold would have to figure
out if it could work in high gimple or low gimple which are two
different beasts when it comes to temporary variables.

>   Also I don't see how SAVE_EXPR will help,
> can you elaborate?  (ok, I guess we can share SAVE_EXPR trees?)

It saves you from having to generate a variable but then if you place
that code in builtins.c, you would need to use SAVE_EXPRs.

If you are going to place this code in the gimplifier, you might as well
use the BIND tree with the temp variable there as that makes the temp
variable's range of life short and known to the expanders.

Oh one more thing.  I think you currently lose line information for the
function call (yes there are lots of cases where we lose that also but
those are bugs and should be fixed).

Thanks,
Andrew Pinski


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