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] Optimize x*x*x*x*x*x using 3 multiplications.


>>>>> "Joseph" == Joseph S Myers <jsm@polyomino.org.uk> writes:

Joseph> * Constant folding needed by the language definition as part
Joseph> of semantic analysis.  This should be the *only* folding done
Joseph> during parsing and semantic analysis and diagnosis of
Joseph> constraint violations.

Java also needs different kinds of floating point operations depending
on whether the context is strictfp.  In a strictfp context, floating
point math must give more precise answers.  I'm not an fp expert, but
my understanding is that basically in a non-strict-fp, we can generate
faster code on x86, and in a strictfp context we have to generate
slower but more accurate code.  (I've read that on non-x86
architectures the code can often end up being the same; supposedly
this has to do with oddities of x86 fp code.)

Last time this topic came up, I thought we had talked about the
possibility of having a flag on the tree nodes that would tell the
back end what to do.  Maybe I'm misremembering though.


I think step 1 here should be to collect a list of requirements that
is as complete as possible.  I'd be happy to send a list of Java needs
(if someone actually wants that :-).

Tom


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