RFR: 8210425: [x86] sharedRuntimeTrig/sharedRuntimeTrans compiled without optimization

David Holmes david.holmes at oracle.com
Wed Sep 5 21:29:18 UTC 2018

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.

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


> 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

More information about the hotspot-dev mailing list