-
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
Consolidate math call transformations in recognizedCallTransformer #2320
Conversation
Depends on eclipse-omr/omr#2711 and eclipse-omr/omr#2722 |
TR::Compiler->target.cpu.isPower() || | ||
TR::Compiler->target.cpu.isZ() || | ||
TR::Compiler->target.cpu.isARM() && !disableARMMaxMin) && | ||
!comp()->getOption(TR_DisableMaxMinOptimization); |
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.
Are we able to eliminate these platform checks and the disableARMMaxMin
static variables by simply setting TR_DisableMaxMinOptimization
on ARM? Similarly below.
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.
c03fdfd
The proposed change implicitly enabled transforming [i/l]abs on X86 while not deleting old related X86 CodeGen logic, it might be better to wait for #2360 |
Thank you for waiting. #2360 has now been merged. This PR may need a rebase to reflect the latest change. |
@@ -48,22 +48,34 @@ void J9::RecognizedCallTransformer::processIntrinsicFunction(TR::TreeTop* treeto | |||
TR::TransformUtil::removeTree(comp(), treetop); | |||
} | |||
|
|||
|
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.
Extra new line not needed.
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.
a207c22
TR::Compiler->target.cpu.isPower() || | ||
TR::Compiler->target.cpu.isZ() || | ||
TR::Compiler->target.cpu.isARM()) && | ||
!comp()->getOption(TR_DisableMaxMinOptimization); |
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.
We still need to fold all of these platform checks.
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.
a207c22
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.
#2360 doesn't seem being included in your branch. Please rebase it to the latest OpenJ9 master before merging this PR.
case TR::java_lang_Math_max_D: | ||
case TR::java_lang_Math_min_D: | ||
return (TR::Compiler->target.cpu.isARM()) && | ||
!comp()->getOption(TR_DisableMaxMinOptimization); |
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.
This is already set on ARM so we don't need the isARM
platform check.
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.
Since only arm supports transformation of Max and Min calls, without the isARM
check this would always return false. I intended to leave this code so in the future it could be enabled on ARM. Instead, should the cases for floating point max and min calls just be removed?
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.
Instead, should the cases for floating point max and min calls just be removed?
I think so yes.
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.
Move transformations from java/lang/math calls to opcodes into recognized call transformer optimization and add transformations for Z. Closes: eclipse-openj9#2045 Signed-off-by: Daniel Hong <daniel.hong@live.com>
Remove booleans that were previously used as placeholders for ARM. Setting options to disable features will be done with OMR Options instead. Signed-off-by: Daniel Hong <daniel.hong@live.com>
Remove platform check in J9RecognizedCallTransformer for max and min operations, since all platforms support call transformation. Signed-off-by: Daniel Hong <daniel.hong@live.com>
Remove cases in recognized call transformer dealing with max/min calls using floating point numbers. Signed-off-by: Daniel Hong <daniel.hong@live.com>
Jenkins test sanity |
Windows failures due to #2129. |
Move transformations from java/lang/math calls to opcodes
into recognized call transformer optimization and add
transformations for Z.
Closes: #2045
Signed-off-by: Daniel Hong daniel.hong@live.com