Skip to content

Commit

Permalink
Merge pull request eclipse-omr#7334 from hzongaro/hide-load-of-classD…
Browse files Browse the repository at this point in the history
…epthAndFlags

Hide details of IL to test for array type class and remove unused symbol references
  • Loading branch information
0xdaryl authored Jul 5, 2024
2 parents 127e633 + a62b60b commit d58019e
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 24 deletions.
3 changes: 1 addition & 2 deletions compiler/compile/OMRNonHelperSymbols.enum
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@
addressOfClassOfMethodSymbol,
componentClassSymbol,
isArraySymbol,
isClassAndDepthFlagsSymbol,
isClassDepthAndFlagsSymbol = isClassAndDepthFlagsSymbol,
isClassDepthAndFlagsSymbol,
isClassFlagsSymbol,
vftSymbol,
currentThreadSymbol,
Expand Down
6 changes: 0 additions & 6 deletions compiler/compile/OMRSymbolReferenceTable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -317,12 +317,6 @@ OMR::SymbolReferenceTable::findClassDepthAndFlagsSymbolRef()
return element(isClassDepthAndFlagsSymbol);
}

TR::SymbolReference *
OMR::SymbolReferenceTable::findClassAndDepthFlagsSymbolRef()
{
return element(isClassAndDepthFlagsSymbol);
}


TR::SymbolReference *
OMR::SymbolReferenceTable::findClassFlagsSymbolRef()
Expand Down
4 changes: 1 addition & 3 deletions compiler/compile/OMRSymbolReferenceTable.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,7 @@ class SymbolReferenceTable
componentClassSymbol,
componentClassAsPrimitiveSymbol,
isArraySymbol,
isClassAndDepthFlagsSymbol,
isClassDepthAndFlagsSymbol = isClassAndDepthFlagsSymbol,
isClassDepthAndFlagsSymbol,
initializeStatusFromClassSymbol,
isClassFlagsSymbol,
vftSymbol,
Expand Down Expand Up @@ -773,7 +772,6 @@ class SymbolReferenceTable
TR::SymbolReference * findInstanceDescriptionSymbolRef();
TR::SymbolReference * findDescriptionWordFromPtrSymbolRef();
TR::SymbolReference * findClassFlagsSymbolRef();
TR::SymbolReference * findClassAndDepthFlagsSymbolRef();
TR::SymbolReference * findClassDepthAndFlagsSymbolRef();
TR::SymbolReference * findArrayComponentTypeSymbolRef();
TR::SymbolReference * findClassIsArraySymbolRef();
Expand Down
16 changes: 3 additions & 13 deletions compiler/optimizer/LoopVersioner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8349,19 +8349,9 @@ bool TR_LoopVersioner::depsForLoopEntryPrep(

TR::Node *vftLoad = TR::Node::createWithSymRef(TR::aloadi, 1, 1, firstChild, comp()->getSymRefTab()->findOrCreateVftSymbolRef());
//TR::Node *componentTypeLoad = TR::Node::create(TR::aloadi, 1, vftLoad, comp()->getSymRefTab()->findOrCreateArrayComponentTypeSymbolRef());
TR::Node *classFlag = NULL;
if (comp()->target().is32Bit())
{
classFlag = TR::Node::createWithSymRef(TR::iloadi, 1, 1, vftLoad, comp()->getSymRefTab()->findOrCreateClassAndDepthFlagsSymbolRef());
}
else
{
classFlag = TR::Node::createWithSymRef(TR::lloadi, 1, 1, vftLoad, comp()->getSymRefTab()->findOrCreateClassAndDepthFlagsSymbolRef());
classFlag = TR::Node::create(TR::l2i, 1, classFlag);
}
TR::Node *andConstNode = TR::Node::create(classFlag, TR::iconst, 0, TR::Compiler->cls.flagValueForArrayCheck(comp()));
TR::Node * andNode = TR::Node::create(TR::iand, 2, classFlag, andConstNode);
TR::Node *cmp = TR::Node::createif(TR::ificmpne, andNode, andConstNode, _exitGotoTarget);
TR::Node *classFlag = comp()->fej9()->testIsClassArrayType(vftLoad);
TR::Node *zeroNode = TR::Node::iconst(classFlag, 0);
TR::Node *cmp = TR::Node::createif(TR::ificmpeq, classFlag, zeroNode, _exitGotoTarget);
if (addLoopEntryPrepDep(LoopEntryPrep::TEST, cmp, deps, visited) == NULL)
{
dumpOptDetailsFailedToCreateTest("array type", firstChild);
Expand Down

0 comments on commit d58019e

Please sign in to comment.