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

Remove vestigal trivial store sinking optimization #3893

Merged
merged 7 commits into from
May 28, 2019

Conversation

0xdaryl
Copy link
Contributor

@0xdaryl 0xdaryl commented May 23, 2019

  • Remove deprecated trivial store sinking optimization
  • Fold code assuming setSinkMethodMetaDataStores is always false
  • Fold code assuming enablePreciseSymbolTracking is false
  • Remove obsolete trivial dead store functions
  • Remove _commonedLoadsList
  • Fold and remove deprecated trivial store sinking functions
  • Remove obsolete searchAndMarkFirstUses

The work to remove is spread across multiple commits as the logic to remove and fold dead code is easier to reason about.

@0xdaryl
Copy link
Contributor Author

0xdaryl commented May 23, 2019

@genie-omr build all

@0xdaryl
Copy link
Contributor Author

0xdaryl commented May 23, 2019

Un-WIPing as downstream dependencies are merged.

@0xdaryl 0xdaryl changed the title WIP: Remove vestigal trivial store sinking optimization Remove vestigal trivial store sinking optimization May 23, 2019
@@ -957,7 +908,7 @@ void TR_SinkStores::lookForSinkableStores()
store->_commonedLoadsUnderTree &&
store->_commonedLoadsUnderTree->get(killedSymIdx))
{
traceMsg(comp()," store->containsUnsatisfedLoadFromSymbol(%d) = %d so %s temp\n",killedSymIdx,store->containsUnsatisfedLoadFromSymbol(killedSymIdx),store->containsUnsatisfedLoadFromSymbol(killedSymIdx) ? "needs":"doesn't need");
traceMsg(comp()," store->containsUnsatisfedLoadFromSymbol(%d) = %d so %s temp\n",killedSymIdx, false, "doesn't need");
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure if this trace message still makes sense, since the only thing that can change is killedSymIdx. Maybe it can be rephrased to something like

                           traceMsg(comp(),"            killedSymIdx = %d and temp is not needed\n",killedSymIdx);

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agreed. Fixed.

This optimization is a remnant of a legacy project consuming OMR and is
not useful to OMR nor any of its consuming projects.  Remove it and repair
some source code formatting.

Signed-off-by: Daryl Maier <maier@ca.ibm.com>
This function always returns false now that trivial store sinking has
been removed.

Signed-off-by: Daryl Maier <maier@ca.ibm.com>
This function always returns false now that trivial store sinking has been
removed.

Signed-off-by: Daryl Maier <maier@ca.ibm.com>
* initCommonedLoadsList(TR::Node *node, vcount_t visitCount)
* killCommonedLoadFromSymbol(int32_t symIdx)

Signed-off-by: Daryl Maier <maier@ca.ibm.com>
Removing trivial store sinking made this list obsolete.

Signed-off-by: Daryl Maier <maier@ca.ibm.com>
* containsKilledCommonedLoad
* containsSatisfiedAndNotKilledCommonedLoad
* containsCommonedLoad
* getCommonedLoad
* satisfyCommonedLoad
* areAllCommonedLoadsSatisfied
* containsUnsatisfiedLoadFromSymbol

Remove fields:

* _satisfiedCommonedLoadsCount
* _commonedLoadsCount

Signed-off-by: Daryl Maier <maier@ca.ibm.com>
No longer called once trivial store sinking is removed.

Signed-off-by: Daryl Maier <maier@ca.ibm.com>
@0xdaryl
Copy link
Contributor Author

0xdaryl commented May 24, 2019

@genie-omr build all

Copy link
Contributor

@Leonardo2718 Leonardo2718 left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@0xdaryl
Copy link
Contributor Author

0xdaryl commented May 27, 2019

@Leonardo2718 , I think this is ready to go.

@Leonardo2718 Leonardo2718 self-assigned this May 28, 2019
@Leonardo2718 Leonardo2718 merged commit 846bfcd into eclipse-omr:master May 28, 2019
0xdaryl added a commit to 0xdaryl/omr that referenced this pull request Sep 17, 2020
The previous cleanup deprecated store sinking code in eclipse-omr#3893 left some unreachable
remnants behind.  Remove them now.

Signed-off-by: Daryl Maier <maier@ca.ibm.com>
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.

2 participants