Skip to content

Commit

Permalink
Merge pull request eclipse-omr#3857 from wbh123456/relocatecreateorfind
Browse files Browse the repository at this point in the history
Remove the createOrFindClonedNode function in OMR
  • Loading branch information
0xdaryl authored May 22, 2019
2 parents ee8052d + 8d0708b commit 341d49f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 26 deletions.
22 changes: 0 additions & 22 deletions compiler/codegen/OMRCodeGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@ OMR::CodeGenerator::CodeGenerator() :
_implicitExceptionPoint(0),
_localsThatAreStored(NULL),
_numLocalsWhenStoreAnalysisWasDone(-1),
_uncommmonedNodes(self()->comp()->trMemory(), stackAlloc),
_ialoadUnneeded(self()->comp()->trMemory()),
_symRefTab(self()->comp()->getSymRefTab()),
_vmThreadRegister(NULL),
Expand Down Expand Up @@ -1291,27 +1290,6 @@ bool OMR::CodeGenerator::areAssignableGPRsScarce()
return (self()->getMaximumNumbersOfAssignableGPRs() <= threshold);
}

// J9
//
TR::Node *
OMR::CodeGenerator::createOrFindClonedNode(TR::Node *node, int32_t numChildren)
{
TR_HashId index;
if (!_uncommmonedNodes.locate(node->getGlobalIndex(), index))
{
// has not been uncommoned already, clone and store for later
TR::Node *clone = TR::Node::copy(node, numChildren);
_uncommmonedNodes.add(node->getGlobalIndex(), index, clone);
node = clone;
}
else
{
// found previously cloned node
node = (TR::Node *) _uncommmonedNodes.getData(index);
}
return node;
}


// returns true iff, based on opcodes and offsets if two store/load/address nodes are definitely disjoint (i.e. guaranteed not to overlap)
// any combination of stores,loads and address nodes are allowed as node1 and node2
Expand Down
5 changes: 1 addition & 4 deletions compiler/codegen/OMRCodeGenerator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,6 @@ class OMR_EXTENSIBLE CodeGenerator

TR_BitVector *_localsThatAreStored;
int32_t _numLocalsWhenStoreAnalysisWasDone;
TR_HashTabInt _uncommmonedNodes; // uncommoned nodes keyed by the original nodes
List<TR_Pair<TR::Node, int32_t> > _ialoadUnneeded;

public:
Expand Down Expand Up @@ -1386,9 +1385,7 @@ class OMR_EXTENSIBLE CodeGenerator
return true;
}

// --------------------------------------------------------------------------

TR::Node *createOrFindClonedNode(TR::Node *node, int32_t numChildren);
// --------------------------------------------------------------------------

bool constantAddressesCanChangeSize(TR::Node *node);
bool profiledPointersRequireRelocation();
Expand Down

0 comments on commit 341d49f

Please sign in to comment.