On 7/09/2018 12:32 AM, Severin Gehwolf wrote:
Hi,

On Thu, 2018-09-06 at 07:29 +1000, David Holmes wrote:
Hi Severin,

On 6/09/2018 4:36 AM, Severin Gehwolf wrote:
Hi,

On Linux x86 (32 and 64 bit) sharedRuntime{Trans,Trig}.ccp files get
compiled with -O0. It appears to be for the same (historical?) reason
as for fdlibm files in core-libs. JDK-8210416 is an attempt to make
this consistent on all Linux arches (as s390x/ppc64/aarch64 already use
that) for fdlibm. This patch does the same for the hotspot copies.
Compile it with OPT and -ffp-contract=off instead of no optimization at
all. Thoughts?

The code in sharedRuntimeTrig is expected/required to be built the same
way as the fdlibm library as it contains the same code. So if it is okay
to change the way fdlibm is built then it follows this is okay too. I
traced this change to the optimization flags back to 2001 but no details
on the exact issue seen with fdlibm.

Right. I should note that ppc64, s390x and aarch64 ports don't have
this optimization turned off as those overrides are in a x86 specific
block. It appears it hasn't caused issues for these ports so far.

Your comment on JDK-8210416 says that it was introduced for an issue on
GCC 1.1.1 i386 back in 1998. Wow ;-)

Is -ffp-contract=off a gcc-specific flag? If so this should be a gcc
conditional not a linux-x86 one.

clang has it (as noted elsewhere), but I don't know which version.
What's the "blessed" clang version for JDK 12?

I've no idea sorry.

Once 8210416 has settled on the right approach for the makefiles the same can be applied here.

Thanks,
David

Thanks,
Severin

webrev: http://cr.openjdk.java.net/~sgehwolf/webrevs/JDK-8210425/webrev.01/
Bug:    https://bugs.openjdk.java.net/browse/JDK-8210425

Testing: - make run-test-tier1 (no new failures).
           - Currently running through submit.
           - Verified objects get compiled with -O3 -ffp-contract=off in
             build logs.

Thanks,
Severin


Reply via email to