Skip to content

Commit

Permalink
Support enabling the inlining of OpenJ9 fmax/fmin/dmax/dmin nodes
Browse files Browse the repository at this point in the history
Add Math.max/min/F/D to list of recognized Java methods to:
- Disable special aliasing rules since they are intrinsically optimized
- Disable implicit asynchronous checks

Signed-off-by: Sarwat Shaheen <[email protected]>
  • Loading branch information
sarwat12 authored and matthewhall2 committed Oct 10, 2024
1 parent 36ecc66 commit 476b604
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
8 changes: 8 additions & 0 deletions compiler/il/Aliases.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,10 @@ OMR::SymbolReference::getUseonlyAliasesBV(TR::SymbolReferenceTable * symRefTab)
case TR::java_lang_Math_min_I:
case TR::java_lang_Math_max_L:
case TR::java_lang_Math_min_L:
case TR::java_lang_Math_max_F:
case TR::java_lang_Math_min_F:
case TR::java_lang_Math_max_D:
case TR::java_lang_Math_min_D:
case TR::java_lang_Math_abs_I:
case TR::java_lang_Math_abs_L:
case TR::java_lang_Math_abs_F:
Expand Down Expand Up @@ -473,6 +477,10 @@ OMR::SymbolReference::getUseDefAliasesBV(bool isDirectCall, bool includeGCSafePo
case TR::java_lang_Math_min_I:
case TR::java_lang_Math_max_L:
case TR::java_lang_Math_min_L:
case TR::java_lang_Math_max_F:
case TR::java_lang_Math_min_F:
case TR::java_lang_Math_max_D:
case TR::java_lang_Math_min_D:
case TR::java_lang_Math_abs_I:
case TR::java_lang_Math_abs_L:
case TR::java_lang_Math_abs_F:
Expand Down
4 changes: 4 additions & 0 deletions compiler/optimizer/RedundantAsyncCheckRemoval.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,10 @@ bool TR_RedundantAsyncCheckRemoval::callDoesAnImplicitAsyncCheck(TR::Node *callN
(symbol->getRecognizedMethod()==TR::java_lang_Math_min_I) ||
(symbol->getRecognizedMethod()==TR::java_lang_Math_max_L) ||
(symbol->getRecognizedMethod()==TR::java_lang_Math_min_L) ||
(symbol->getRecognizedMethod()==TR::java_lang_Math_max_D) ||
(symbol->getRecognizedMethod()==TR::java_lang_Math_min_D) ||
(symbol->getRecognizedMethod()==TR::java_lang_Math_max_F) ||
(symbol->getRecognizedMethod()==TR::java_lang_Math_min_F) ||
(symbol->getRecognizedMethod()==TR::java_lang_Math_abs_L) ||
(symbol->getRecognizedMethod()==TR::java_lang_Math_abs_D) ||
(symbol->getRecognizedMethod()==TR::java_lang_Math_abs_F) ||
Expand Down

0 comments on commit 476b604

Please sign in to comment.