-
Notifications
You must be signed in to change notification settings - Fork 738
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove unnecessary gcc-specific optimization flags #4156
Remove unnecessary gcc-specific optimization flags #4156
Conversation
Jenkins test sanity osx jdk8,jdk11 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
@DanHeidinga and @nbhuiyan - we do need to be careful that the floating point rounding mode is correct without the -f option and that NANs don't trap. These bugs can be really subtle so we need to be sure what the Clang mode is with these options off otherwise the JIT can encounter incorrect floating point behaviour which is an absolute nightmare to debug (speaking from experience). FYI @0dvictor since you added these options originally. |
Quote from LLVM's documentation: (http://llvm.org/docs/LangRef.html)
The behavior should be same as GCC's |
Thanks for looking into this, @0dvictor! If we were to remove these options for gcc as well, I think it's necessary to understand the original motivations behind specifying |
No, it wasn't necessary. The four floating point related GCC options are directly inferred from The Java Language Specification on floating point semantics, and hence were added.
Good suggestion, I've checked GCC versions from 4.4.7 to 8.2, |
cab7090
to
127319f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The updated change to completely remove the options looks good.
Jenkins test sanity osx jdk8,jdk11 |
@0dvictor Are you OK with the updated change? |
Jenkins test sanity xlinux jdk8 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
-fno-rounding-math and -fno-signaling-nans options were made specific to GCC due to resulting in warnings on Clang. In Clang, these options are not supported, but it does assume round-to-nearest mode and use non-signalling NaNs by default. In GCC, these 2 options are set by default, and hence it is not necessary to specify them. Removing these options entirely from the makefile will prevent any potential confusion about the default behavior on Clang and GCC. Signed-off-by: Nazim Uddin Bhuiyan <nazimudd@ualberta.ca>
127319f
to
f8222df
Compare
@DanHeidinga |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The updated change LGTM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Jenkins test sanity xlinux jdk8 |
The above compiler options were removed in eclipse-openj9#4156. Removing the above compiler options causes a performance regression. Symptoms of the performance regression: bursts of high throughput mixed with periods of lower throughput. These symptoms cause a 5-7% throughput regression. Reintroducing the above compiler options fixes the throughput regression. Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
Using -fno-rounding-math and -fno-signalling-nans flags on OSX
results in Clang warning about these unsupported options for
every use of this option.
Signed-off-by: Nazim Uddin Bhuiyan nazimudd@ualberta.ca
Edit: Also removed these options for GCC due to them being defaults.
Edit2: Since #4118 addressed the clang warning issues, this PR has been modified to address just removing the options on GCC.