-
Notifications
You must be signed in to change notification settings - Fork 396
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
Add the macros with the hardcoded prefixes #6945
base: master
Are you sure you want to change the base?
Conversation
The local test results of the code changes in the GitHub pull request is located at the following url: https://drive.google.com/file/d/1OuVzManwMle7SJqRELQP315tafN6YX3U/view?usp=sharing. The local test results of the code changes in the GitHub pull request could be displayed with the file that is located at the following url: https://github.com/singh264/scripts/blob/main/display_test_openj9-openjdk-jdk8_results.sh. |
Sorry just saw this PR, will review the changes later this week |
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.
Some minor suggestions. I still have to go through 14 files, will post another comment for those soon.
compiler/il/OMRNode.cpp
Outdated
@@ -6472,7 +6476,7 @@ OMR::Node::setArrayChkPrimitiveArray2(bool v) | |||
{ | |||
TR::Compilation * c = TR::comp(); | |||
TR_ASSERT(self()->getOpCodeValue() == TR::ArrayCHK, "Opcode must be ArrayCHK"); | |||
if (performNodeTransformation2(c, "O^O NODE FLAGS: Setting arrayChkPrimitiveArray2 flag on node %p to %d\n", self(), v)) | |||
if (performNodeTransformation3(c, "%s Setting arrayChkPrimitiveArray2 flag on node %p to %d\n", OPT_DETAILS, self(), v)) |
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 space here before Setting
compiler/z/codegen/OMRPeephole.cpp
Outdated
@@ -1578,7 +1580,7 @@ OMR::Z::Peephole::tryToRemoveDuplicateNILF() | |||
{ | |||
if (currInst->getSourceImmediate() == nextInst->getSourceImmediate()) | |||
{ | |||
if (performTransformation(self()->comp(), "O^O S390 PEEPHOLE: deleting duplicate NILF from pair %p %p*\n", currInst, nextInst)) | |||
if (performTransformation(self()->comp(), "%sdeleting duplicate NILF from pair %p %p*\n", OPT_DETAILS_S390_PEEPHOLE, currInst, nextInst)) |
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.
To be consistent, can you please capitalize D
compiler/z/codegen/OMRPeephole.cpp
Outdated
@@ -1602,7 +1604,7 @@ OMR::Z::Peephole::tryToRemoveDuplicateNILF() | |||
else if (((currInst->getSourceImmediate() & nextInst->getSourceImmediate()) == currInst->getSourceImmediate()) && | |||
((nextInst->getSourceImmediate() & currInst->getSourceImmediate()) != nextInst->getSourceImmediate())) | |||
{ | |||
if (performTransformation(self()->comp(), "O^O S390 PEEPHOLE: deleting unnecessary NILF from pair %p %p*\n", currInst, nextInst)) | |||
if (performTransformation(self()->comp(), "%sdeleting unnecessary NILF from pair %p %p*\n", OPT_DETAILS_S390_PEEPHOLE, currInst, nextInst)) |
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.
same here
compiler/z/codegen/OMRPeephole.cpp
Outdated
@@ -1633,7 +1635,7 @@ OMR::Z::Peephole::tryToRemoveDuplicateNILH() | |||
if (currInst->matchesTargetRegister(nextInst->getRegisterOperand(1)) && | |||
nextInst->matchesTargetRegister(currInst->getRegisterOperand(1))) | |||
{ | |||
if (performTransformation(self()->comp(), "O^O S390 PEEPHOLE: deleting duplicate NILH from pair %p %p*\n", currInst, nextInst)) | |||
if (performTransformation(self()->comp(), "%sdeleting duplicate NILH from pair %p %p*\n", OPT_DETAILS_S390_PEEPHOLE, currInst, nextInst)) |
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.
same here
compiler/z/codegen/OMRPeephole.cpp
Outdated
@@ -1771,7 +1773,7 @@ OMR::Z::Peephole::tryToRemoveRedundantShift() | |||
uint32_t newShift = currRSInst->getSourceImmediate() + nextRSInst->getSourceImmediate(); | |||
if (newShift < 64) | |||
{ | |||
if (performTransformation(self()->comp(), "O^O S390 PEEPHOLE: merging SRL/SLL pair [%p] [%p]\n", cursor, cursor->getNext())) | |||
if (performTransformation(self()->comp(), "%smerging SRL/SLL pair [%p] [%p]\n", OPT_DETAILS_S390_PEEPHOLE, cursor, cursor->getNext())) |
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.
To be consistent, can you please capitalize M
.
compiler/il/Aliases.cpp
Outdated
@@ -65,6 +65,8 @@ | |||
#include "runtime/RuntimeAssumptions.hpp" | |||
#endif | |||
|
|||
#define OPT_DETAILS "O^O REFINING ALIASES: " |
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.
Don't think we need to be specific here. IL ALIASES:
should suffice.
@@ -70,6 +70,7 @@ | |||
#include "runtime/Runtime.hpp" | |||
#include "infra/SimpleRegex.hpp" | |||
|
|||
#define OPT_DETAILS "O^O OSR: " |
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 can reword this to be more generic since the message has enough detail to indicate the transformation is related to OSR call. So maybe reword to IL Resolved Method Symbol
.
compiler/optimizer/Inliner.cpp
Outdated
@@ -1683,7 +1684,7 @@ void TR_InlinerBase::rematerializeCallArguments(TR_TransformInlinedFunction & ti | |||
if (rematTree == argStoreTree) | |||
{ | |||
TR::Node *duplicateStore = argStore->duplicateTree(); | |||
if (performTransformation(comp(), "O^O GUARDED CALL REMAT: Rematerialize [%p] as [%p]\n", argStore, duplicateStore)) | |||
if (performTransformation(comp(), "%sRematerialize [%p] as [%p]\n", OPT_DETAILS_GUARDED_CALL_REMAT, argStore, duplicateStore)) |
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 can reword the message to indicate that a guarded call is being rematerialized.
compiler/optimizer/Inliner.cpp
Outdated
@@ -1693,7 +1694,7 @@ void TR_InlinerBase::rematerializeCallArguments(TR_TransformInlinedFunction & ti | |||
{ | |||
TR::Node *duplicateStore = TR::Node::createStore(argStore->getSymbolReference(), TR::Node::createLoad(argStore, rematTree->getNode()->getSymbolReference())); | |||
duplicateStore->setByteCodeInfo(argStore->getByteCodeInfo()); | |||
if (performTransformation(comp(), "O^O GUARDED CALL REMAT: Partial rematerialize of [%p] as [%p] - load of [%d]\n", argStore, duplicateStore, rematTree->getNode()->getSymbolReference()->getReferenceNumber())) | |||
if (performTransformation(comp(), "%sPartial rematerialize of [%p] as [%p] - load of [%d]\n", OPT_DETAILS_GUARDED_CALL_REMAT, argStore, duplicateStore, rematTree->getNode()->getSymbolReference()->getReferenceNumber())) |
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 can reword the message to indicate that a guarded call is being partially rematerialized.
compiler/optimizer/Inliner.cpp
Outdated
@@ -119,6 +119,7 @@ int32_t *NumInlinedMethods = NULL; | |||
int32_t *InlinedSizes = NULL; | |||
|
|||
#define OPT_DETAILS "O^O INLINER: " | |||
#define OPT_DETAILS_GUARDED_CALL_REMAT "O^O GUARDED CALL REMAT: " |
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.
Don't think we need a specific macro for guarded calls
Add the macros with the hardcoded prefixes of format O\^O [a-z A-Z]+(:)?. Closes: eclipse-omr#4550. Author: Amarpreet Singh amarpreet1997@gmail.com.
The code is refactored based on the following GitHub pull request review: eclipse-omr#6945 (review). Closes: eclipse-omr#4550. Author: Amarpreet Singh amarpreet1997@gmail.com.
The local test results of the code changes in the GitHub pull request is located at the following url: https://drive.google.com/file/d/19lcbXGXhrajZTzfy08-JWLPv3ZffOLMh/view?usp=sharing. The local test results of the code changes in the GitHub pull request could be displayed with the file that is located at the following url: https://github.com/singh264/scripts/blob/main/display_test_openj9-openjdk-jdk8_results.sh. |
Add the macros with the hardcoded prefixes
of format O^O [a-z A-Z]+(:)?.
Closes: #4550.
Author: Amarpreet Singh amarpreet1997@gmail.com.