Skip to content

Commit

Permalink
Merge pull request eclipse-omr#7545 from a7ehuo/techdebt-cleanup-opco…
Browse files Browse the repository at this point in the history
…de-comments-4

Clean up references to old opcodes
  • Loading branch information
hzongaro authored Nov 13, 2024
2 parents f7360a9 + 78e9be4 commit 0c0927f
Show file tree
Hide file tree
Showing 9 changed files with 47 additions and 63 deletions.
8 changes: 4 additions & 4 deletions compiler/arm/codegen/FPTreeEvaluator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1385,7 +1385,7 @@ TR::Register *OMR::ARM::TreeEvaluator::dstoreEvaluator(TR::Node *node, TR::CodeG
return NULL;
}

TR::Register *OMR::ARM::TreeEvaluator::ifstoreEvaluator(TR::Node *node, TR::CodeGenerator *cg)
TR::Register *OMR::ARM::TreeEvaluator::fstoreiEvaluator(TR::Node *node, TR::CodeGenerator *cg)
{
TR::Node *secondChild = node->getSecondChild();
TR::Register *sourceReg = cg->evaluate(secondChild);
Expand Down Expand Up @@ -1440,7 +1440,7 @@ TR::Register *OMR::ARM::TreeEvaluator::ifstoreEvaluator(TR::Node *node, TR::Code
return NULL;
}

TR::Register *OMR::ARM::TreeEvaluator::idstoreEvaluator(TR::Node *node, TR::CodeGenerator *cg)
TR::Register *OMR::ARM::TreeEvaluator::dstoreiEvaluator(TR::Node *node, TR::CodeGenerator *cg)
{
TR::Node *secondChild = node->getSecondChild();
TR::Register *sourceReg = cg->evaluate(secondChild);
Expand Down Expand Up @@ -2811,12 +2811,12 @@ TR::Register *OMR::ARM::TreeEvaluator::dstoreEvaluator(TR::Node *node, TR::CodeG
return NULL;
}

TR::Register *OMR::ARM::TreeEvaluator::ifstoreEvaluator(TR::Node *node, TR::CodeGenerator *cg)
TR::Register *OMR::ARM::TreeEvaluator::fstoreiEvaluator(TR::Node *node, TR::CodeGenerator *cg)
{
return NULL;
}

TR::Register *OMR::ARM::TreeEvaluator::idstoreEvaluator(TR::Node *node, TR::CodeGenerator *cg)
TR::Register *OMR::ARM::TreeEvaluator::dstoreiEvaluator(TR::Node *node, TR::CodeGenerator *cg)
{
return NULL;
}
Expand Down
16 changes: 2 additions & 14 deletions compiler/arm/codegen/OMRTreeEvaluator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -229,18 +229,6 @@ OMR::ARM::TreeEvaluator::lstoreiEvaluator(TR::Node *node, TR::CodeGenerator *cg)
return TR::TreeEvaluator::lstoreEvaluator(node, cg);
}

TR::Register*
OMR::ARM::TreeEvaluator::fstoreiEvaluator(TR::Node *node, TR::CodeGenerator *cg)
{
return TR::TreeEvaluator::ifstoreEvaluator(node, cg);
}

TR::Register*
OMR::ARM::TreeEvaluator::dstoreiEvaluator(TR::Node *node, TR::CodeGenerator *cg)
{
return TR::TreeEvaluator::idstoreEvaluator(node, cg);
}

TR::Register*
OMR::ARM::TreeEvaluator::astoreiEvaluator(TR::Node *node, TR::CodeGenerator *cg)
{
Expand Down Expand Up @@ -3376,7 +3364,7 @@ TR::Register *OMR::ARM::TreeEvaluator::bloadEvaluator(TR::Node *node, TR::CodeGe
return commonLoadEvaluator(node, TR::InstOpCode::ldrsb, 1, cg);
}

// also handles isload
// also handles sloadi
TR::Register *OMR::ARM::TreeEvaluator::sloadEvaluator(TR::Node *node, TR::CodeGenerator *cg)
{
return commonLoadEvaluator(node, TR::InstOpCode::ldrsh, 2, cg);
Expand Down Expand Up @@ -3561,7 +3549,7 @@ TR::Register *OMR::ARM::TreeEvaluator::bstoreEvaluator(TR::Node *node, TR::CodeG
return commonStoreEvaluator(node, TR::InstOpCode::strb, 1, cg);
}

// also handles isstore,isstore
// also handles sstorei
TR::Register *OMR::ARM::TreeEvaluator::sstoreEvaluator(TR::Node *node, TR::CodeGenerator *cg)
{
return commonStoreEvaluator(node, TR::InstOpCode::strh, 2, cg);
Expand Down
2 changes: 0 additions & 2 deletions compiler/arm/codegen/OMRTreeEvaluator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -559,8 +559,6 @@ class OMR_EXTENSIBLE TreeEvaluator: public OMR::TreeEvaluator
static TR::Register *dstoreEvaluator(TR::Node *node, TR::CodeGenerator *cg);
static TR::Register *bstoreEvaluator(TR::Node *node, TR::CodeGenerator *cg);
static TR::Register *sstoreEvaluator(TR::Node *node, TR::CodeGenerator *cg);
static TR::Register *ifstoreEvaluator(TR::Node *node, TR::CodeGenerator *cg);
static TR::Register *idstoreEvaluator(TR::Node *node, TR::CodeGenerator *cg);
static TR::Register *gotoEvaluator(TR::Node *node, TR::CodeGenerator *cg);
static TR::Register *ireturnEvaluator(TR::Node *node, TR::CodeGenerator *cg);
static TR::Register *lreturnEvaluator(TR::Node *node, TR::CodeGenerator *cg);
Expand Down
56 changes: 28 additions & 28 deletions compiler/optimizer/LoopReducer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -531,10 +531,10 @@ TR_CharToByteArraycopy::checkArrayStores(TR::Node * origHighStoreNode, TR::Node
if (!iand) return false;
TR::Node * c2i = testBinaryIConst(comp(), iand, TR::iand, TR::su2i, 0xFF00, "checkArrayStores: high store child is not iand of su2i and 0xFF00\n");
if (!c2i) return false;
TR::Node * isload = testUnary(comp(), c2i->getFirstChild(), TR::sloadi, "checkArrayStores: high store child is not isload\n");
if (!isload) return false;
TR::Node * sloadi = testUnary(comp(), c2i->getFirstChild(), TR::sloadi, "checkArrayStores: high store child is not sloadi\n");
if (!sloadi) return false;

bool checkLoad = getLoadAddress()->checkAiadd(isload->getFirstChild(), 2);
bool checkLoad = getLoadAddress()->checkAiadd(sloadi->getFirstChild(), 2);
if (!checkLoad)
{
return false;
Expand All @@ -544,12 +544,12 @@ TR_CharToByteArraycopy::checkArrayStores(TR::Node * origHighStoreNode, TR::Node
if (!iand) return false;
c2i = testBinaryIConst(comp(), iand, TR::iand, TR::su2i, 0xFF, "checkArrayStores: low store child is not iand of su2i and 0xFF\n");
if (!c2i) return false;
TR::Node * isloadDup = testUnary(comp(), c2i->getFirstChild(), TR::sloadi, "checkArrayStores: low store child is not isload\n");
if (!isloadDup) return false;
TR::Node * sloadiDup = testUnary(comp(), c2i->getFirstChild(), TR::sloadi, "checkArrayStores: low store child is not sloadi\n");
if (!sloadiDup) return false;

if (isloadDup != isload)
if (sloadiDup != sloadi)
{
dumpOptDetails(comp(), "checkArrayStores: two isload addresses are not the same\n");
dumpOptDetails(comp(), "checkArrayStores: two sloadi addresses are not the same\n");
return false;
}

Expand Down Expand Up @@ -1519,13 +1519,13 @@ static void swapIfNecessary(TR::Node *&aiaddFirstChild, TR::Node *&aiaddSecondCh
//
//istore #transchar (store translated character)
// s2i
// isload <translate-char> (load character)
// sloadi <translate-char> (load character)
// aiadd
// aload #table (translation table)
// isub (add displacement to get to start of array with index into translation table)
// imul (multiply by stride of target - may not be present if byte-to-byte)
// bu2i (widen byte (unsigned) to int - could be
// bloadi #byte (load the byte - could also be isload)
// bloadi #byte (load the byte - could also be sloadi)
// aiadd
// aload #base (load base pointer)
// isub (add displacement to get to relative index)
Expand All @@ -1540,7 +1540,7 @@ static void swapIfNecessary(TR::Node *&aiaddFirstChild, TR::Node *&aiaddSecondCh
// bloadi <translate-char> (load character)
// iadd
// c2i (widen byte (unsigned) to int - could be
// isload #byte (load the byte - could also be isload)
// sloadi #byte (load the byte - could also be sloadi)
// aiadd
// aload #base (load base pointer)
// isub (add displacement to get to relative index)
Expand Down Expand Up @@ -1680,7 +1680,7 @@ TR_Arraytranslate::checkLoad(TR::Node * loadNode)
//
//Store tree should look as follows:
//
//isstore #reschar (result char stored into output array)
//sstorei #reschar (result char stored into output array)
// aiadd
// aload #outbase (load output base ptr)
// isub (add displacement to get to relative index
Expand All @@ -1696,7 +1696,7 @@ TR_Arraytranslate::checkStore(TR::Node * storeNode)
{
if (storeNode->getOpCodeValue() != TR::sstorei && storeNode->getOpCodeValue() != TR::bstorei)
{
dumpOptDetails(comp(), "...store tree does not have isstore/bstorei - no arraytranslate reduction\n");
dumpOptDetails(comp(), "...store tree does not have sstorei/bstorei - no arraytranslate reduction\n");
return false;
}

Expand Down Expand Up @@ -1766,11 +1766,11 @@ TR_Arraytranslate::checkStore(TR::Node * storeNode)
//Break tree should look as follows:
//
//ifscmpeq --> block <no-stop>
// ==>isload at <translate-char>
// ==>sloadi at <translate-char>
// sconst <termination char>
//-or-
//ifXcmpYY --> block <no-stop>
// ==>isload at <translate-char>
// ==>sloadi at <translate-char>
// iconst <termination char>
//
bool
Expand Down Expand Up @@ -2447,13 +2447,13 @@ TR_LoopReducer::generateArraytranslate(TR_RegionStructure * whileLoop, TR_Induct
//BBStart <load-char>
//istore #transchar (store translated character)
// c2i
// isload <translate-char> (load character)
// sloadi <translate-char> (load character)
// aiadd
// aload #table (translation table)
// isub (add displacement to get to start of array with index into translation table)
// imul (multiply by stride of target - may not be present if byte-to-byte)
// bu2i (widen byte (unsigned) to int - could be
// bloadi #byte (load the byte - could also be isload)
// bloadi #byte (load the byte - could also be sloadi)
// aiadd
// aload #base (load base pointer)
// isub (add displacement to get to relative index)
Expand All @@ -2462,15 +2462,15 @@ TR_LoopReducer::generateArraytranslate(TR_RegionStructure * whileLoop, TR_Induct
// iconst 2
// iconst -16
//ifscmpne --> block <no-stop>
// ==>isload at <translate-char>
// ==>sloadi at <translate-char>
// sconst <termination char>
//BBEnd <load-char>
//BBStart <escape>
// goto <escape-block>
//BBEnd <escape>
//
//BBStart <store-char>
//isstore #reschar (result char stored into output array)
//sstorei #reschar (result char stored into output array)
// aiadd
// aload #outbase (load output base ptr)
// isub (add displacement to get to relative index
Expand All @@ -2497,13 +2497,13 @@ TR_LoopReducer::generateArraytranslate(TR_RegionStructure * whileLoop, TR_Induct
//BBStart <load-char>
//istore #transchar (store translated character)
// c2i
// isload <translate-char> (load character)
// sloadi <translate-char> (load character)
// aiadd
// aload #table (translation table)
// isub (add displacement to get to start of array with index into translation table)
// imul (multiply by stride of target - may not be present if byte-to-byte)
// bu2i (widen byte (unsigned) to int - could be
// bloadi #byte (load the byte - could also be isload)
// bloadi #byte (load the byte - could also be sloadi)
// aiadd
// aload #base (load base pointer)
// isub (add displacement to get to relative index)
Expand All @@ -2512,12 +2512,12 @@ TR_LoopReducer::generateArraytranslate(TR_RegionStructure * whileLoop, TR_Induct
// iconst 2
// iconst -16
//ifscmpeq --> block <escape-block>
// ==>isload at <translate-char>
// ==>sloadi at <translate-char>
// sconst <termination char>
//BBEnd <load-char>
//
//BBStart <store-char>
//isstore #reschar (result char stored into output array)
//sstorei #reschar (result char stored into output array)
// aiadd
// aload #outbase (load output base ptr)
// isub (add displacement to get to relative index
Expand Down Expand Up @@ -2565,7 +2565,7 @@ TR_LoopReducer::generateArraytranslate(TR_RegionStructure * whileLoop, TR_Induct
//BBEnd <escape>
//
//BBStart <store-char>
//isstore #reschar (result char stored into output array)
//sstorei #reschar (result char stored into output array)
// aiadd
// aload #outbase (load output base ptr)
// isub (add displacement to get to relative index
Expand All @@ -2587,7 +2587,7 @@ TR_LoopReducer::generateArraytranslate(TR_RegionStructure * whileLoop, TR_Induct
//
//Simplest form of the loop is:
//BBStart <load/store-char>
// isstore #reschar (result char stored into output array)
// sstorei #reschar (result char stored into output array)
// aiadd
// aload #outbase (load output base ptr)
// isub (add displacement to get to relative index
Expand Down Expand Up @@ -2950,10 +2950,10 @@ TR_LoopReducer::generateArraytranslate(TR_RegionStructure * whileLoop, TR_Induct
// <aiadd input tree>
// <aiadd output tree>
// <aload translation table>
// <isload translate char>
// <sloadi translate char>
// <termination value>
//
//isstore #reschar (result char stored into output array)
//sstorei #reschar (result char stored into output array)
// <original aiadd input tree>
//
//goto <escape-block>
Expand Down Expand Up @@ -3702,7 +3702,7 @@ TR_LoopReducer::generateArraytranslateAndTest(TR_RegionStructure * whileLoop, TR
//The following is the type of loop that needs to be reduced to an arraycopy (byte to char arraycopy)
//
//BBStart (block 22) (frequency 840) (is in loop 22)
//isstore #134[0x005f227c] Shadow[<array-shadow>]
//sstorei #134[0x005f227c] Shadow[<array-shadow>]
// aiadd
// aload #219[0x00703ac8] Auto[<temp slot 9>]
// isub
Expand Down Expand Up @@ -3947,7 +3947,7 @@ TR_LoopReducer::generateByteToCharArraycopy(TR_InductionVariable * byteIndVar, T
// ishr
// iand
// c2i
// isload #156[0x019D0EC0] Shadow[<array-shadow>]
// sloadi #156[0x019D0EC0] Shadow[<array-shadow>]
// aiadd
// aload #241[0x015D9DA4] Auto[<temp slot 8>]
// isub
Expand Down
4 changes: 2 additions & 2 deletions compiler/optimizer/VPHandlers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1613,7 +1613,7 @@ TR::Node *constrainLload(OMR::ValuePropagation *vp, TR::Node *node)
return node;
}

// Also handles ifload
// Also handles floadi
//
TR::Node *constrainFload(OMR::ValuePropagation *vp, TR::Node *node)
{
Expand All @@ -1633,7 +1633,7 @@ TR::Node *constrainFload(OMR::ValuePropagation *vp, TR::Node *node)
return node;
}

// Also handles idload
// Also handles dloadi
//
TR::Node *constrainDload(OMR::ValuePropagation *vp, TR::Node *node)
{
Expand Down
2 changes: 1 addition & 1 deletion compiler/p/codegen/OMRTreeEvaluator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3014,7 +3014,7 @@ TR::Register *OMR::Power::TreeEvaluator::bstoreEvaluator(TR::Node *node, TR::Cod
return NULL;
}

// also handles isstore
// also handles sstorei
TR::Register *OMR::Power::TreeEvaluator::sstoreEvaluator(TR::Node *node, TR::CodeGenerator *cg)
{
TR::Node *valueChild;
Expand Down
8 changes: 4 additions & 4 deletions compiler/x/codegen/OMRTreeEvaluator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -732,7 +732,7 @@ TR::Register *OMR::X86::TreeEvaluator::bloadEvaluator(TR::Node *node, TR::CodeGe
return reg;
}

// also handles isload
// also handles sloadi
TR::Register *OMR::X86::TreeEvaluator::sloadEvaluator(TR::Node *node, TR::CodeGenerator *cg)
{
TR::MemoryReference *sourceMR = generateX86MemoryReference(node, cg);
Expand Down Expand Up @@ -776,7 +776,7 @@ OMR::X86::TreeEvaluator::fwrtbariEvaluator(TR::Node *node, TR::CodeGenerator *cg

// bloadiEvaluator handled by bloadEvaluator

// isloadEvaluator handled by sloadEvaluator
// sloadiEvaluator handled by sloadEvaluator

// also used for istorei, astore and astorei
TR::Register *OMR::X86::TreeEvaluator::integerStoreEvaluator(TR::Node *node, TR::CodeGenerator *cg)
Expand Down Expand Up @@ -1096,7 +1096,7 @@ TR::Register *OMR::X86::TreeEvaluator::bstoreEvaluator(TR::Node *node, TR::CodeG
return TR::TreeEvaluator::integerStoreEvaluator(node, cg);
}

// also handles isstore
// also handles sstorei
TR::Register *OMR::X86::TreeEvaluator::sstoreEvaluator(TR::Node *node, TR::CodeGenerator *cg)
{
return TR::TreeEvaluator::integerStoreEvaluator(node, cg);
Expand All @@ -1110,7 +1110,7 @@ TR::Register *OMR::X86::TreeEvaluator::sstoreEvaluator(TR::Node *node, TR::CodeG

// bstoreiEvaluator handled by bstoreEvaluator

// isstoreEvaluator handled by sstoreEvaluator
// sstoreiEvaluator handled by sstoreEvaluator

TR::Register *
OMR::X86::TreeEvaluator::arraycmpEvaluator(
Expand Down
12 changes: 6 additions & 6 deletions compiler/z/codegen/OMRTreeEvaluator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5161,9 +5161,9 @@ generateS390CompareAndBranchOpsHelper(TR::Node * node, TR::CodeGenerator * cg, T

// ificmpyy
// s2i ; refcnt-1, unevaluated
// isload ; evaluated
// sloadi ; evaluated
// s2i ; refcnt-1, unevaluated
// isload ; evaluated
// sloadi ; evaluated
//
// Try to generate a CR.
// FIXME: can't the binary commutative analyser handle this? that's where this should be done
Expand Down Expand Up @@ -7920,7 +7920,7 @@ OMR::Z::TreeEvaluator::axaddEvaluator(TR::Node * node, TR::CodeGenerator * cg)
* lloadi handled by lloadEvaluator
* aloadiEvaluator handled by aloadEvaluator
* bloadiEvaluator handled by bloadEvaluator
* isloadEvaluator handled by sloadEvaluator
* sloadiEvaluator handled by sloadEvaluator
*
* iload Evaluator: load integer
* - also handles iloadi
Expand All @@ -7944,7 +7944,7 @@ OMR::Z::TreeEvaluator::lloadEvaluator(TR::Node * node, TR::CodeGenerator * cg)

/**
* sload Evaluator: load short integer
* - also handles isload
* - also handles sloadi
*/
TR::Register *
OMR::Z::TreeEvaluator::sloadEvaluator(TR::Node * node, TR::CodeGenerator * cg)
Expand Down Expand Up @@ -7980,7 +7980,7 @@ OMR::Z::TreeEvaluator::bloadEvaluator(TR::Node * node, TR::CodeGenerator * cg)
* istorei handled by istoreEvaluator
* astoreiEvaluator handled by istoreEvaluator
* bstoreiEvaluator handled by bstoreEvaluator
* isstoreEvaluator handled by sstoreEvaluator
* sstoreiEvaluator handled by sstoreEvaluator
*/
/**
* istoreEvaluator - store integer
Expand Down Expand Up @@ -8014,7 +8014,7 @@ OMR::Z::TreeEvaluator::lstoreEvaluator(TR::Node * node, TR::CodeGenerator * cg)

/**
* sstoreEvaluator - store short integer
* - also handles isstore
* - also handles sstorei
*/
TR::Register *
OMR::Z::TreeEvaluator::sstoreEvaluator(TR::Node * node, TR::CodeGenerator * cg)
Expand Down
Loading

0 comments on commit 0c0927f

Please sign in to comment.