Skip to content

Commit

Permalink
Merge pull request #7519 from a7ehuo/techdebt-cleanup-opcode-comments
Browse files Browse the repository at this point in the history
Clean up references to old opcodes
  • Loading branch information
hzongaro authored Nov 4, 2024
2 parents a1cc349 + 6e681da commit 6fa1806
Show file tree
Hide file tree
Showing 30 changed files with 145 additions and 145 deletions.
6 changes: 3 additions & 3 deletions compiler/aarch64/codegen/UnaryEvaluator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -619,19 +619,19 @@ TR::Register *OMR::ARM64::TreeEvaluator::l2aEvaluator(TR::Node *node, TR::CodeGe
if (comp->useCompressedPointers())
{
// pattern match the sequence under the l2a
// iaload f l2a <- node
// aloadi f l2a <- node
// aload O ladd
// lshl
// i2l
// iiload f <- load
// iloadi f <- load
// aload O
// iconst shftKonst
// lconst HB
//
// -or- if the load is known to be null
// l2a
// i2l
// iiload f
// iloadi f
// aload O
//
TR::Node *firstChild = node->getFirstChild();
Expand Down
14 changes: 7 additions & 7 deletions compiler/arm/codegen/OMRTreeEvaluator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3153,7 +3153,7 @@ TR::Instruction *loadAddressConstant(TR::CodeGenerator *cg, TR::Node * node, int
return armLoadConstant(node, value, trgReg, cg, cursor);
}

// also handles iiload
// also handles iloadi
TR::Register *OMR::ARM::TreeEvaluator::iloadEvaluator(TR::Node *node, TR::CodeGenerator *cg)
{
TR::Register *tempReg;
Expand Down Expand Up @@ -3202,7 +3202,7 @@ static bool nodeIsNeeded(TR::Node *checkNode, TR::Node *node)
return result;
}

// handles aload and iaload
// handles aload and aloadi
TR::Register *OMR::ARM::TreeEvaluator::aloadEvaluator(TR::Node *node, TR::CodeGenerator *cg)
{
TR::Compilation *comp = cg->comp();
Expand Down Expand Up @@ -3298,7 +3298,7 @@ TR::Register *OMR::ARM::TreeEvaluator::aloadEvaluator(TR::Node *node, TR::CodeGe
return tempReg;
}

// also handles ilload
// also handles lloadi
TR::Register *OMR::ARM::TreeEvaluator::lloadEvaluator(TR::Node *node, TR::CodeGenerator *cg)
{
TR::Register *lowReg = cg->allocateRegister();
Expand Down Expand Up @@ -3342,7 +3342,7 @@ TR::Register *OMR::ARM::TreeEvaluator::lloadEvaluator(TR::Node *node, TR::CodeGe
// aloadEvaluator handled by iloadEvaluator


// also handles ibload
// also handles bloadi
TR::Register *OMR::ARM::TreeEvaluator::bloadEvaluator(TR::Node *node, TR::CodeGenerator *cg)
{
return commonLoadEvaluator(node, TR::InstOpCode::ldrsb, 1, cg);
Expand Down Expand Up @@ -3469,7 +3469,7 @@ TR::Register *OMR::ARM::TreeEvaluator::awrtbariEvaluator(TR::Node *node, TR::Cod
#endif
}

// also handles ilstore
// also handles lstorei
TR::Register *OMR::ARM::TreeEvaluator::lstoreEvaluator(TR::Node *node, TR::CodeGenerator *cg)
{
TR::Node *valueChild;
Expand Down Expand Up @@ -3527,7 +3527,7 @@ TR::Register *OMR::ARM::TreeEvaluator::lstoreEvaluator(TR::Node *node, TR::CodeG
return NULL;
}

// also handles ibstore
// also handles bstorei
TR::Register *OMR::ARM::TreeEvaluator::bstoreEvaluator(TR::Node *node, TR::CodeGenerator *cg)
{
return commonStoreEvaluator(node, TR::InstOpCode::strb, 1, cg);
Expand All @@ -3539,7 +3539,7 @@ TR::Register *OMR::ARM::TreeEvaluator::sstoreEvaluator(TR::Node *node, TR::CodeG
return commonStoreEvaluator(node, TR::InstOpCode::strh, 2, cg);
}

// also handles astore, iastore, iistore
// also handles astore, astorei, istorei
TR::Register *OMR::ARM::TreeEvaluator::istoreEvaluator(TR::Node *node, TR::CodeGenerator *cg)
{
return commonStoreEvaluator(node, TR::InstOpCode::str, 4, cg);
Expand Down
8 changes: 4 additions & 4 deletions compiler/codegen/NodeEvaluation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,10 @@ OMR::CodeGenerator::evaluate(TR::Node * node)
// As well, more insidious trees exist:
//
// ificmpeq
// iiload
// iloadi
// i2l
// x
// iiload
// iloadi
// ishl
// ==> i2l
// 4
Expand All @@ -144,11 +144,11 @@ OMR::CodeGenerator::evaluate(TR::Node * node)
// perform the function calls:
//
// ificmpeq
// iiload
// iloadi
// ishl
// ==> x
// 7
// iiload
// iloadi
// ishl
// ==> x
// 4
Expand Down
8 changes: 4 additions & 4 deletions compiler/codegen/OMRCodeGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1929,9 +1929,9 @@ OMR::CodeGenerator::addressesMatch(TR::Node *addr1, TR::Node *addr2, bool addres
if (self()->isSupportedAdd(addr1) && self()->isSupportedAdd(addr2) &&
self()->nodeMatches(addr1->getSecondChild(), addr2->getSecondChild(), addressesUnderSameTreeTop))
{
// for the case where the iaload itself is below an addition, match the additions first
// for the case where the aloadi itself is below an addition, match the additions first
// aiadd
// iaload
// aloadi
// aload
// iconst
addr1 = addr1->getFirstChild();
Expand Down Expand Up @@ -3430,10 +3430,10 @@ OMR::CodeGenerator::isInMemoryInstructionCandidate(TR::Node * node)
//
// Examples:
//
// ibstore
// bstorei
// addr
// bor/band/bxor
// ibload
// bloadi
// =>addr
// bconst
//
Expand Down
6 changes: 3 additions & 3 deletions compiler/il/OMRNode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7004,7 +7004,7 @@ OMR::Node::chkUnsigned()
bool
OMR::Node::isClassPointerConstant()
{
TR_ASSERT((self()->getOpCodeValue() == TR::aconst)||(self()->getOpCodeValue() == TR::aloadi), "Can only call this for aconst or iaload\n");
TR_ASSERT((self()->getOpCodeValue() == TR::aconst)||(self()->getOpCodeValue() == TR::aloadi), "Can only call this for aconst or aloadi\n");
return _flags.testAny(classPointerConstant);
}

Expand All @@ -7027,7 +7027,7 @@ OMR::Node::chkClassPointerConstant()
bool
OMR::Node::isMethodPointerConstant()
{
TR_ASSERT((self()->getOpCodeValue() == TR::aconst)||(self()->getOpCodeValue() == TR::aloadi), "Can only call this for aconst or iaload\n");
TR_ASSERT((self()->getOpCodeValue() == TR::aconst)||(self()->getOpCodeValue() == TR::aloadi), "Can only call this for aconst or aloadi\n");
return _flags.testAny(methodPointerConstant);
}

Expand Down Expand Up @@ -7056,7 +7056,7 @@ void
OMR::Node::setUnneededIALoad(bool v)
{
TR::Compilation * c = TR::comp();
TR_ASSERT(self()->getOpCodeValue() == TR::aloadi, "Can only call this for iaload");
TR_ASSERT(self()->getOpCodeValue() == TR::aloadi, "Can only call this for aloadi");
if (performNodeTransformation2(c, "O^O NODE FLAGS: Setting unneededIALoad flag on node %p to %d\n", self(), v))
_flags.set(unneededIALoad, v);
}
Expand Down
12 changes: 6 additions & 6 deletions compiler/il/OMRNode.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1373,7 +1373,7 @@ class OMR_EXTENSIBLE Node
void setUnsigned(bool b);
bool chkUnsigned();

// Flags used by aconst and iaload (on s390 iaload can be used after dynamic lit pool)
// Flags used by aconst and aloadi (on s390 aloadi can be used after dynamic lit pool)
bool isClassPointerConstant();
void setIsClassPointerConstant(bool b);
bool chkClassPointerConstant();
Expand Down Expand Up @@ -1502,11 +1502,11 @@ class OMR_EXTENSIBLE Node
void setReturnIsDummy();
bool chkReturnIsDummy();

// Flag used by ilload nodes for DFP
// Flag used by lloadi nodes for DFP
bool isBigDecimalLoad();
void setIsBigDecimalLoad();

// Flag used by iload, iiload, lload, ilload, aload, iaload
// Flag used by iload, iloadi, lload, lloadi, aload, aloadi
bool isLoadAndTest() { return _flags.testAny(loadAndTest); }
void setIsLoadAndTest(bool v) { _flags.set(loadAndTest, v); }

Expand Down Expand Up @@ -1938,7 +1938,7 @@ class OMR_EXTENSIBLE Node
// currently used for ldiv folding to idiv, when both children are with highWordZero
Unsigned = 0x00004000,

// Flags used by TR::aconst and TR::iaload (on s390 iaload can be used after dynamic lit pool)
// Flags used by TR::aconst and TR::aloadi (on s390 aloadi can be used after dynamic lit pool)
//
classPointerConstant = 0x00010000,
methodPointerConstant = 0x00002000,
Expand Down Expand Up @@ -2014,12 +2014,12 @@ class OMR_EXTENSIBLE Node
// Flag used by TR::Return
returnIsDummy = 0x00001000,

// Flag used by ilload nodes for BigDecimal long field (DFP)
// Flag used by lloadi nodes for BigDecimal long field (DFP)
// Active when disableDFP JIT option not specifiec, and running
// on hardware Power or zSeries hardware that supports DFP
bigDecimal_load = 0x00000002, // TODO: make J9_PROJECT_SPECIFIC

// Flag used by iload, iiload, lload, ilload, aload, iaload
// Flag used by iload, iloadi, lload, lloadi, aload, aloadi
loadAndTest = 0x00008000,

// Flag used by TR::New when the codegen supports
Expand Down
4 changes: 2 additions & 2 deletions compiler/infra/TreeServices.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,15 +168,15 @@ TR_AddressTree::processMultiplyNode(TR::Node * multiplyNode)
// ixload
// aiadd <memory reference sub-tree>
// l2i
// ilload <DirectByteBuffer>
// lloadi <DirectByteBuffer>
// aload <Buffer>
//
// (64-bit)
// ladd
// x2i
// ixload
// aladd <memory reference sub-tree>
// ilload <DirectByteBuffer>
// lloadi <DirectByteBuffer>
// aload <Buffer>
bool
TR_AddressTree::process(TR::Node * aiaddNode, bool onlyConsiderConstAiaddSecondChild)
Expand Down
6 changes: 3 additions & 3 deletions compiler/optimizer/CopyPropagation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1088,11 +1088,11 @@ void TR_CopyPropagation::commonIndirectLoadsFromAutos()
if (!currentTree->getNextTreeTop())
break;
TR::Node *nextNode = currentTree->getNextTreeTop()->getNode();
// iistore M
// istorei M
// loadaddr A
// X
// istore TMP ==> istore TMP
// iiload M X
// iloadi M X
// loadaddr A

if (node->getOpCode().isStoreIndirect() &&
Expand Down Expand Up @@ -2320,7 +2320,7 @@ TR::Node * TR_CopyPropagation::isCheapRematerializationCandidate(TR::Node * defN

// 1) indirect loads where the base ptr is on the stack or a location pointer
//
// iaload <refined-array-shadow> [id=238:"PSALIT2"] [#1.64 Shadow] [flags 0x80000607 0x0 ] [0x2B026BFC] bci=[-1,37,329] rc=2 vc=9438 vn=- sti=- udi=331 nc=1 addr=4
// aloadi <refined-array-shadow> [id=238:"PSALIT2"] [#1.64 Shadow] [flags 0x80000607 0x0 ] [0x2B026BFC] bci=[-1,37,329] rc=2 vc=9438 vn=- sti=- udi=331 nc=1 addr=4
// aiadd (internalPtr ) [0x2B016B20] bci=[-1,37,329] rc=1 vc=9438 vn=- sti=- udi=- nc=2 addr=4 flg=0x8000
// loadaddr <auto slot 40> [id=152:"PSA"] [#1.63 Auto] [flags 0x4000008 0x0 ] [0x2B016AD0] bci=[-1,37,329] rc=1 vc=9438 vn=- sti=- udi=- nc=0 addr=4
// iconst 1212 (X!=0 X>=0 ) [0x2B016B70] bci=[-1,37,329] rc=1 vc=9438 vn=- sti=- udi=- nc=0 flg=0x104
Expand Down
8 changes: 4 additions & 4 deletions compiler/optimizer/GeneralLoopUnroller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4240,13 +4240,13 @@ TR_GeneralLoopUnroller::canUnrollUnCountedLoop(TR_RegionStructure *loop,
// Detect Small loops like:
// [0x37047e24] BBStart (block 133) (frequency 127) (is in loop 133)
// [0x37047f58] astore #392[0x36e8c8e4]
// [0x37047ef8] iaload #549[0x37047c9c]+24
// [0x37047ef8] aloadi #549[0x37047c9c]+24
// [0x37047ed0] aload #392[0x36e8c8e4] Auto[<temp slot 8>] <flags:"0x4" (X!=0 )/>
// [0x375191d4] NULLCHK on [0x37047ef8] #18[0x36a24b1c] Method[jitThrowNullPointerException]
// [0x375191fc] iaload #549[0x37047c9c]+24
// ==>iaload at [0x37047ef8]
// [0x375191fc] aloadi #549[0x37047c9c]+24
// ==>aloadi at [0x37047ef8]
// [0x3751925c] ifacmpne --> block 133 BBStart at [0x37047e24]
// ==>iaload at [0x375191fc]
// ==>aloadi at [0x375191fc]
// [0x37519288] aconst NULL <flags:"0x2" (X==0 )/>
// [0x37519144] BBEnd (block 133)

Expand Down
2 changes: 1 addition & 1 deletion compiler/optimizer/Inliner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3612,7 +3612,7 @@ bool TR_TransformInlinedFunction::findCallNodeInTree(TR::Node * callNode, TR::No
bool TR_TransformInlinedFunction::findReturnValueInTree(TR::Node * rvStoreNode, TR::Node * node, TR::Compilation *comp)
{
TR::SymbolReference *rvSymRef = rvStoreNode->getSymbolReference();
// ibload
// bloadi
// loadaddr rvSymRef
if (node->getOpCode().isLoadIndirect() &&
node->getFirstChild()->getOpCodeValue() == TR::loadaddr &&
Expand Down
6 changes: 3 additions & 3 deletions compiler/optimizer/LocalOpts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2312,11 +2312,11 @@ bool TR_CompactNullChecks::replaceNullCheckIfPossible(TR::Node *cursorNode, TR::
// loadaddr
// ...
// NULLCHK #1
// iaload
// aloadi
// aload #1
// ..
// NULLCHK #2
// iiload
// iloadi
// aload #1
if (!compactionDone)
{
Expand Down Expand Up @@ -5118,7 +5118,7 @@ bool TR_Rematerialization::examineNode(TR::TreeTop *treeTop, TR::Node *parent, T
state->_currentlyCommonedLoads.getListHead()->getData()->isBigDecimalLoad()))
considerRegPressure = false;

// rematerialize to generate TM's. ibload's are not evaluated
// rematerialize to generate TM's. bloadi's are not evaluated
if (NULL != regPress)
{
considerRegPressure = false;
Expand Down
Loading

0 comments on commit 6fa1806

Please sign in to comment.