Skip to content

Commit

Permalink
Merge pull request #20521 from a7ehuo/techdebt-cleanup-opcode-update-…
Browse files Browse the repository at this point in the history
…code

Clean up references to old opcodes
  • Loading branch information
hzongaro authored Nov 13, 2024
2 parents edccce1 + dca50bf commit a8ea161
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 21 deletions.
22 changes: 11 additions & 11 deletions runtime/compiler/optimizer/IdiomTransformations.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1390,12 +1390,12 @@ checkByteToChar(TR::Compilation *comp, TR::Node *iorNode, TR::Node *&inputNode,
// if index is i then inputNode = bloadi child of imul
// else fail
//
TR::Node *ibloadNode = imulNode->getFirstChild()->skipConversions();
TR::Node *bloadiNode = imulNode->getFirstChild()->skipConversions();
bool plusOne = false;
bool matchPattern = false;
if (ibloadNode->getOpCodeValue() == TR::bloadi)
if (bloadiNode->getOpCodeValue() == TR::bloadi)
{
TR::Node *subNode = ibloadNode->getFirstChild()->getSecondChild();
TR::Node *subNode = bloadiNode->getFirstChild()->getSecondChild();
int32_t hdrSize = TR::Compiler->om.contiguousArrayHeaderSizeInBytes() + 1;
if (subNode->getOpCode().isSub() &&
subNode->getSecondChild()->getOpCode().isLoadConst())
Expand Down Expand Up @@ -1425,7 +1425,7 @@ checkByteToChar(TR::Compilation *comp, TR::Node *iorNode, TR::Node *&inputNode,
{
if (!plusOne)
{
inputNode = ibloadNode->getFirstChild();
inputNode = bloadiNode->getFirstChild();
return true;
}
else
Expand Down Expand Up @@ -5947,13 +5947,13 @@ CISCTransform2ArrayCopySub(TR_CISCTransformer *trans, TR::Node *indexRepNode, TR
return false;
}

TR::Node *optionalIistore = NULL;
TR::Node *optionalIstorei = NULL;
if (P->getImportantNode(4))
{
TR_CISCNode *optionalCISCIistore = trans->getP2TInLoopIfSingle(P->getImportantNode(4));
if (!optionalCISCIistore)
TR_CISCNode *optionalCISCIstorei = trans->getP2TInLoopIfSingle(P->getImportantNode(4));
if (!optionalCISCIstorei)
return false;
optionalIistore = optionalCISCIistore->getHeadOfTrNode()->duplicateTree();
optionalIstorei = optionalCISCIstorei->getHeadOfTrNode()->duplicateTree();
}

TR::Node * exitVarNode = createLoad(exitVarRepNode);
Expand Down Expand Up @@ -6112,11 +6112,11 @@ CISCTransform2ArrayCopySub(TR_CISCTransformer *trans, TR::Node *indexRepNode, TR
block->append(theOtherVarUpdateTreeTop);
}

if (optionalIistore)
if (optionalIstorei)
{
TR_ASSERT(theOtherVarUpdateNode != NULL, "error!");
optionalIistore->setAndIncChild(1, theOtherVarUpdateNode->getChild(0));
block->append(TR::TreeTop::create(comp, optionalIistore));
optionalIstorei->setAndIncChild(1, theOtherVarUpdateNode->getChild(0));
block->append(TR::TreeTop::create(comp, optionalIstorei));
}

trans->insertAfterNodes(block);
Expand Down
8 changes: 4 additions & 4 deletions runtime/compiler/optimizer/SequentialStoreSimplifier.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1982,7 +1982,7 @@ static TR::TreeTop* generateArraycopyFromSequentialStores(TR::Compilation* comp,
return treeTop;
}

static TR::TreeTop* generateArraycopyFromSequentialLoadsDEPRECATED(TR::Compilation* comp, TR::TreeTop* currentTreeTop, TR::Node* ibloadNode)
static TR::TreeTop* generateArraycopyFromSequentialLoadsDEPRECATED(TR::Compilation* comp, TR::TreeTop* currentTreeTop, TR::Node* bloadiNode)
{

static const char * disableSeqLoadOpt = feGetEnv("TR_DisableSeqLoadOpt");
Expand All @@ -2000,7 +2000,7 @@ static TR::TreeTop* generateArraycopyFromSequentialLoadsDEPRECATED(TR::Compilati
TR::Node* rootNode;

//checking the number of bytes
while ( !((currentNode->getFirstChild() == ibloadNode) && (currentNode->getOpCodeValue() == TR::bu2i)) )
while ( !((currentNode->getFirstChild() == bloadiNode) && (currentNode->getOpCodeValue() == TR::bu2i)) )
{
if ( (currentNode->getOpCodeValue() == TR::iadd) || (currentNode->getOpCodeValue() == TR::ior))
{
Expand Down Expand Up @@ -2039,7 +2039,7 @@ static TR::TreeTop* generateArraycopyFromSequentialLoadsDEPRECATED(TR::Compilati

// Need to make sure these loads are not under spine checks.
//
if (comp->requiresSpineChecks() && ibloadNode->getReferenceCount() > 1)
if (comp->requiresSpineChecks() && bloadiNode->getReferenceCount() > 1)
{
TR::TreeTop *tt = currentTreeTop;
TR::TreeTop *lastTreeTop = currentTreeTop->getEnclosingBlock()->startOfExtendedBlock()->getFirstRealTreeTop()->getPrevTreeTop();
Expand All @@ -2054,7 +2054,7 @@ static TR::TreeTop* generateArraycopyFromSequentialLoadsDEPRECATED(TR::Compilati
node = node->getFirstChild();
while (node->getOpCode().isConversion())
node = node->getFirstChild();
if (node == ibloadNode)
if (node == bloadiNode)
{
dumpOptDetails(comp, " Sequential Load to spine checked array not reducible\n");
return currentTreeTop;
Expand Down
6 changes: 3 additions & 3 deletions runtime/compiler/z/codegen/J9CodeGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -547,9 +547,9 @@ J9::Z::CodeGenerator::lowerTreeIfNeeded(

// J9, Z
//
if (comp->target().cpu.isZ() && node->getOpCodeValue() == TR::aloadi && node->isUnneededIALoad())
if (comp->target().cpu.isZ() && node->getOpCodeValue() == TR::aloadi && node->isUnneededAloadi())
{
ListIterator<TR_Pair<TR::Node, int32_t> > listIter(&_ialoadUnneeded);
ListIterator<TR_Pair<TR::Node, int32_t> > listIter(&_aloadiUnneeded);
TR_Pair<TR::Node, int32_t> *ptr;
uintptr_t temp;
int32_t updatedTemp;
Expand All @@ -559,7 +559,7 @@ J9::Z::CodeGenerator::lowerTreeIfNeeded(
updatedTemp = (int32_t) temp;
if (ptr->getKey() == node && temp != node->getReferenceCount())
{
node->setUnneededIALoad(false);
node->setUnneededAloadi(false);
break;
}
}
Expand Down
2 changes: 1 addition & 1 deletion runtime/compiler/z/codegen/J9MemoryReference.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ J9::Z::MemoryReference::createUnresolvedDataSnippet(TR::Node * node, TR::CodeGen
}

TR::UnresolvedDataSnippet *
J9::Z::MemoryReference::createUnresolvedDataSnippetForiaload(TR::Node * node, TR::CodeGenerator * cg, TR::SymbolReference * symRef, TR::Register * tempReg, bool & isStore)
J9::Z::MemoryReference::createUnresolvedDataSnippetForAloadi(TR::Node * node, TR::CodeGenerator * cg, TR::SymbolReference * symRef, TR::Register * tempReg, bool & isStore)
{
// Have to catch the case where, on first glance, a putstatic looks
// like a 'read' since the unresolved ref is on the aloadi, not the
Expand Down
2 changes: 1 addition & 1 deletion runtime/compiler/z/codegen/J9MemoryReference.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class OMR_EXTENSIBLE MemoryReference : public OMR::MemoryReferenceConnector
static bool typeNeedsAlignment(TR::Node *node);

TR::UnresolvedDataSnippet * createUnresolvedDataSnippet(TR::Node * node, TR::CodeGenerator * cg, TR::SymbolReference * symRef, TR::Register * tempReg, bool isStore);
TR::UnresolvedDataSnippet * createUnresolvedDataSnippetForiaload(TR::Node * node, TR::CodeGenerator * cg, TR::SymbolReference * symRef, TR::Register * tempReg, bool & isStore);
TR::UnresolvedDataSnippet * createUnresolvedDataSnippetForAloadi(TR::Node * node, TR::CodeGenerator * cg, TR::SymbolReference * symRef, TR::Register * tempReg, bool & isStore);
void createUnresolvedSnippetWithNodeRegister(TR::Node * node, TR::CodeGenerator * cg, TR::SymbolReference * symRef, TR::Register *& writableLiteralPoolRegister);
void createUnresolvedDataSnippetForBaseNode(TR::CodeGenerator * cg, TR::Register * writableLiteralPoolRegister);

Expand Down
2 changes: 1 addition & 1 deletion runtime/compiler/z/codegen/J9TreeEvaluator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7649,7 +7649,7 @@ J9::Z::TreeEvaluator::evaluateNULLCHKWithPossibleResolve(TR::Node * node, bool n

// determine if an explicit check is needed
if (cg->getSupportsImplicitNullChecks()
&& !firstChild->isUnneededIALoad())
&& !firstChild->isUnneededAloadi())
{
if (opCode.isLoadVar()
|| (cg->comp()->target().is64Bit() && opCode.getOpCodeValue()==TR::l2i)
Expand Down

0 comments on commit a8ea161

Please sign in to comment.