Skip to content
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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

singh264
Copy link
Contributor

Add the macros with the hardcoded prefixes
of format O^O [a-z A-Z]+(:)?.

Closes: #4550.
Author: Amarpreet Singh amarpreet1997@gmail.com.

@singh264
Copy link
Contributor Author

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.

@singh264
Copy link
Contributor Author

@VermaSh

@VermaSh
Copy link
Contributor

VermaSh commented May 1, 2023

Sorry just saw this PR, will review the changes later this week

Copy link
Contributor

@VermaSh VermaSh left a 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.

@@ -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))
Copy link
Contributor

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

@@ -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))
Copy link
Contributor

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

@@ -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))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

@@ -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))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

@@ -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()))
Copy link
Contributor

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.

@@ -65,6 +65,8 @@
#include "runtime/RuntimeAssumptions.hpp"
#endif

#define OPT_DETAILS "O^O REFINING ALIASES: "
Copy link
Contributor

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: "
Copy link
Contributor

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.

@@ -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))
Copy link
Contributor

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.

@@ -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()))
Copy link
Contributor

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.

@@ -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: "
Copy link
Contributor

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.
@singh264
Copy link
Contributor Author

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.

@singh264 singh264 requested a review from VermaSh May 15, 2023 11:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Consolidate all hardcoded prefixes of format O\^O [a-z A-Z]+(:)?
2 participants