Skip to content

Commit

Permalink
Deprecate unsigned load IL
Browse files Browse the repository at this point in the history
  • Loading branch information
fjeremic committed May 5, 2021
1 parent 5681311 commit 926ac47
Show file tree
Hide file tree
Showing 21 changed files with 23 additions and 278 deletions.
6 changes: 0 additions & 6 deletions compiler/aarch64/codegen/OMRTreeEvaluator.cpp
Expand Up @@ -509,12 +509,6 @@ OMR::ARM64::TreeEvaluator::sloadEvaluator(TR::Node *node, TR::CodeGenerator *cg)
return commonLoadEvaluator(node, TR::InstOpCode::ldrshimmx, cg);
}

TR::Register *
OMR::ARM64::TreeEvaluator::cloadEvaluator(TR::Node *node, TR::CodeGenerator *cg)
{
return commonLoadEvaluator(node, TR::InstOpCode::ldrhimm, cg);
}

// also handles vloadi
TR::Register *
OMR::ARM64::TreeEvaluator::vloadEvaluator(TR::Node *node, TR::CodeGenerator *cg)
Expand Down
8 changes: 0 additions & 8 deletions compiler/aarch64/codegen/OMRTreeEvaluator.hpp
Expand Up @@ -539,12 +539,6 @@ class OMR_EXTENSIBLE TreeEvaluator: public OMR::TreeEvaluator
static TR::Register *vlRegStoreEvaluator(TR::Node *node, TR::CodeGenerator *cg);
static TR::Register *vfRegStoreEvaluator(TR::Node *node, TR::CodeGenerator *cg);
static TR::Register *vdRegStoreEvaluator(TR::Node *node, TR::CodeGenerator *cg);
static TR::Register *iuloadEvaluator(TR::Node *node, TR::CodeGenerator *cg);
static TR::Register *luloadEvaluator(TR::Node *node, TR::CodeGenerator *cg);
static TR::Register *buloadEvaluator(TR::Node *node, TR::CodeGenerator *cg);
static TR::Register *iuloadiEvaluator(TR::Node *node, TR::CodeGenerator *cg);
static TR::Register *luloadiEvaluator(TR::Node *node, TR::CodeGenerator *cg);
static TR::Register *buloadiEvaluator(TR::Node *node, TR::CodeGenerator *cg);
static TR::Register *iustoreEvaluator(TR::Node *node, TR::CodeGenerator *cg);
static TR::Register *lustoreEvaluator(TR::Node *node, TR::CodeGenerator *cg);
static TR::Register *bustoreEvaluator(TR::Node *node, TR::CodeGenerator *cg);
Expand All @@ -567,8 +561,6 @@ class OMR_EXTENSIBLE TreeEvaluator: public OMR::TreeEvaluator
static TR::Register *d2luEvaluator(TR::Node *node, TR::CodeGenerator *cg);
static TR::Register *d2buEvaluator(TR::Node *node, TR::CodeGenerator *cg);
static TR::Register *d2cEvaluator(TR::Node *node, TR::CodeGenerator *cg);
static TR::Register *cloadEvaluator(TR::Node *node, TR::CodeGenerator *cg);
static TR::Register *cloadiEvaluator(TR::Node *node, TR::CodeGenerator *cg);
static TR::Register *cstoreEvaluator(TR::Node *node, TR::CodeGenerator *cg);
static TR::Register *cstoreiEvaluator(TR::Node *node, TR::CodeGenerator *cg);
static TR::Register *monentEvaluator(TR::Node *node, TR::CodeGenerator *cg);
Expand Down
8 changes: 0 additions & 8 deletions compiler/aarch64/codegen/OMRTreeEvaluatorTable.hpp
Expand Up @@ -513,12 +513,6 @@
#define _vlRegStoreEvaluator TR::TreeEvaluator::unImpOpEvaluator
#define _vfRegStoreEvaluator TR::TreeEvaluator::unImpOpEvaluator
#define _vdRegStoreEvaluator TR::TreeEvaluator::unImpOpEvaluator
#define _iuloadEvaluator TR::TreeEvaluator::unImpOpEvaluator
#define _luloadEvaluator TR::TreeEvaluator::unImpOpEvaluator
#define _buloadEvaluator TR::TreeEvaluator::unImpOpEvaluator
#define _iuloadiEvaluator TR::TreeEvaluator::unImpOpEvaluator
#define _luloadiEvaluator TR::TreeEvaluator::unImpOpEvaluator
#define _buloadiEvaluator TR::TreeEvaluator::unImpOpEvaluator
#define _iustoreEvaluator TR::TreeEvaluator::unImpOpEvaluator
#define _lustoreEvaluator TR::TreeEvaluator::unImpOpEvaluator
#define _bustoreEvaluator TR::TreeEvaluator::unImpOpEvaluator
Expand All @@ -541,8 +535,6 @@
#define _d2luEvaluator TR::TreeEvaluator::unImpOpEvaluator
#define _d2buEvaluator TR::TreeEvaluator::unImpOpEvaluator
#define _d2cEvaluator TR::TreeEvaluator::unImpOpEvaluator
#define _cloadEvaluator TR::TreeEvaluator::cloadEvaluator
#define _cloadiEvaluator TR::TreeEvaluator::cloadEvaluator
#define _cstoreEvaluator TR::TreeEvaluator::sstoreEvaluator
#define _cstoreiEvaluator TR::TreeEvaluator::sstoreEvaluator
#define _monentEvaluator TR::TreeEvaluator::unImpOpEvaluator
Expand Down
6 changes: 0 additions & 6 deletions compiler/arm/codegen/OMRTreeEvaluator.cpp
Expand Up @@ -524,12 +524,6 @@ TR::Register *OMR::ARM::TreeEvaluator::sloadEvaluator(TR::Node *node, TR::CodeGe
return commonLoadEvaluator(node, ARMOp_ldrsh, 2, cg);
}

// also handles icload
TR::Register *OMR::ARM::TreeEvaluator::cloadEvaluator(TR::Node *node, TR::CodeGenerator *cg)
{
return commonLoadEvaluator(node, ARMOp_ldrh, 2, cg);
}

TR::Register *OMR::ARM::TreeEvaluator::commonLoadEvaluator(TR::Node *node, TR_ARMOpCodes memToRegOp, int32_t memSize, TR::CodeGenerator *cg)
{
TR::Register *tempReg = node->setRegister(cg->allocateRegister());
Expand Down
1 change: 0 additions & 1 deletion compiler/arm/codegen/OMRTreeEvaluator.hpp
Expand Up @@ -72,7 +72,6 @@ class OMR_EXTENSIBLE TreeEvaluator: public OMR::TreeEvaluator
static TR::Register *dloadEvaluator(TR::Node *node, TR::CodeGenerator *cg);
static TR::Register *bloadEvaluator(TR::Node *node, TR::CodeGenerator *cg);
static TR::Register *sloadEvaluator(TR::Node *node, TR::CodeGenerator *cg);
static TR::Register *cloadEvaluator(TR::Node *node, TR::CodeGenerator *cg);
static TR::Register *aloadEvaluator(TR::Node *node, TR::CodeGenerator *cg);
static TR::Register *istoreEvaluator(TR::Node *node, TR::CodeGenerator *cg);
static TR::Register *awrtbarEvaluator(TR::Node *node, TR::CodeGenerator *cg);
Expand Down
8 changes: 0 additions & 8 deletions compiler/arm/codegen/OMRTreeEvaluatorTable.hpp
Expand Up @@ -514,12 +514,6 @@
#define _vlRegStoreEvaluator TR::TreeEvaluator::unImpOpEvaluator
#define _vfRegStoreEvaluator TR::TreeEvaluator::unImpOpEvaluator
#define _vdRegStoreEvaluator TR::TreeEvaluator::unImpOpEvaluator
#define _iuloadEvaluator TR::TreeEvaluator::iloadEvaluator
#define _luloadEvaluator TR::TreeEvaluator::lloadEvaluator
#define _buloadEvaluator TR::TreeEvaluator::bloadEvaluator
#define _iuloadiEvaluator TR::TreeEvaluator::iloadEvaluator
#define _luloadiEvaluator TR::TreeEvaluator::lloadEvaluator
#define _buloadiEvaluator TR::TreeEvaluator::bloadEvaluator
#define _iustoreEvaluator TR::TreeEvaluator::istoreEvaluator
#define _lustoreEvaluator TR::TreeEvaluator::lstoreEvaluator
#define _bustoreEvaluator TR::TreeEvaluator::bstoreEvaluator
Expand All @@ -542,8 +536,6 @@
#define _d2luEvaluator TR::TreeEvaluator::d2lEvaluator
#define _d2buEvaluator TR::TreeEvaluator::d2bEvaluator
#define _d2cEvaluator TR::TreeEvaluator::d2cEvaluator
#define _cloadEvaluator TR::TreeEvaluator::cloadEvaluator
#define _cloadiEvaluator TR::TreeEvaluator::cloadEvaluator
#define _cstoreEvaluator TR::TreeEvaluator::sstoreEvaluator
#define _cstoreiEvaluator TR::TreeEvaluator::sstoreEvaluator
#define _monentEvaluator TR::TreeEvaluator::monentEvaluator
Expand Down
4 changes: 0 additions & 4 deletions compiler/il/OMRIL.cpp
Expand Up @@ -685,10 +685,6 @@ OMR::IL::opCodeForCorrespondingDirectLoad(TR::ILOpCodes loadOpCode)
case TR::dload: return TR::dstore;
case TR::aload: return TR::astore;
case TR::vload: return TR::vstore;
case TR::cload: return TR::cstore;
case TR::buload: return TR::bstore;
case TR::iuload: return TR::istore;
case TR::luload: return TR::lstore;
case TR::brdbar:
case TR::srdbar:
case TR::irdbar:
Expand Down
10 changes: 0 additions & 10 deletions compiler/il/OMRNode.hpp
Expand Up @@ -385,16 +385,6 @@ class OMR_EXTENSIBLE Node
case TR::luneg:
case TR::lusub:

//Load
case TR::buload:
case TR::buloadi:
case TR::cload:
case TR::cloadi:
case TR::iuload:
case TR::iuloadi:
case TR::luload:
case TR::luloadi:

//Store
case TR::bustore:
case TR::bustorei:
Expand Down
128 changes: 0 additions & 128 deletions compiler/il/OMROpcodes.enum
Expand Up @@ -7843,102 +7843,6 @@ OPCODE_MACRO(\
/* .ifCompareOpCode = */ TR::BadILOp, \
/* .description = Store vector global register */ \
)
OPCODE_MACRO(\
/* .opcode = */ iuload, \
/* .name = */ "iuload", \
/* .properties1 = */ ILProp1::LoadVar | ILProp1::HasSymbolRef, \
/* .properties2 = */ ILProp2::ValueNumberShare | ILProp2::SupportedForPRE| ILProp2::MayUseSystemStack, \
/* .properties3 = */ ILProp3::LikeUse, \
/* .properties4 = */ 0, \
/* .dataType = */ TR::Int32, \
/* .typeProperties = */ ILTypeProp::Size_4 | ILTypeProp::Unsigned, \
/* .childProperties = */ ILChildProp::NoChildren, \
/* .swapChildrenOpCode = */ TR::BadILOp, \
/* .reverseBranchOpCode = */ TR::BadILOp, \
/* .booleanCompareOpCode = */ TR::BadILOp, \
/* .ifCompareOpCode = */ TR::BadILOp, \
/* .description = load unsigned integer */ \
)
OPCODE_MACRO(\
/* .opcode = */ luload, \
/* .name = */ "luload", \
/* .properties1 = */ ILProp1::LoadVar | ILProp1::HasSymbolRef, \
/* .properties2 = */ ILProp2::ValueNumberShare | ILProp2::SupportedForPRE| ILProp2::MayUseSystemStack, \
/* .properties3 = */ ILProp3::LikeUse, \
/* .properties4 = */ 0, \
/* .dataType = */ TR::Int64, \
/* .typeProperties = */ ILTypeProp::Size_8 | ILTypeProp::Unsigned, \
/* .childProperties = */ ILChildProp::NoChildren, \
/* .swapChildrenOpCode = */ TR::BadILOp, \
/* .reverseBranchOpCode = */ TR::BadILOp, \
/* .booleanCompareOpCode = */ TR::BadILOp, \
/* .ifCompareOpCode = */ TR::BadILOp, \
/* .description = load unsigned long integer */ \
)
OPCODE_MACRO(\
/* .opcode = */ buload, \
/* .name = */ "buload", \
/* .properties1 = */ ILProp1::LoadVar | ILProp1::HasSymbolRef, \
/* .properties2 = */ ILProp2::ValueNumberShare | ILProp2::SupportedForPRE| ILProp2::MayUseSystemStack, \
/* .properties3 = */ ILProp3::LikeUse, \
/* .properties4 = */ 0, \
/* .dataType = */ TR::Int8, \
/* .typeProperties = */ ILTypeProp::Size_1 | ILTypeProp::Unsigned, \
/* .childProperties = */ ILChildProp::NoChildren, \
/* .swapChildrenOpCode = */ TR::BadILOp, \
/* .reverseBranchOpCode = */ TR::BadILOp, \
/* .booleanCompareOpCode = */ TR::BadILOp, \
/* .ifCompareOpCode = */ TR::BadILOp, \
/* .description = load unsigned byte */ \
)
OPCODE_MACRO(\
/* .opcode = */ iuloadi, \
/* .name = */ "iuloadi", \
/* .properties1 = */ ILProp1::LoadVar | ILProp1::Indirect | ILProp1::HasSymbolRef, \
/* .properties2 = */ ILProp2::ValueNumberShare | ILProp2::SupportedForPRE| ILProp2::MayUseSystemStack, \
/* .properties3 = */ ILProp3::LikeUse, \
/* .properties4 = */ 0, \
/* .dataType = */ TR::Int32, \
/* .typeProperties = */ ILTypeProp::Size_4 | ILTypeProp::Unsigned, \
/* .childProperties = */ ONE_CHILD(TR::Address), \
/* .swapChildrenOpCode = */ TR::BadILOp, \
/* .reverseBranchOpCode = */ TR::BadILOp, \
/* .booleanCompareOpCode = */ TR::BadILOp, \
/* .ifCompareOpCode = */ TR::BadILOp, \
/* .description = load indirect unsigned integer */ \
)
OPCODE_MACRO(\
/* .opcode = */ luloadi, \
/* .name = */ "luloadi", \
/* .properties1 = */ ILProp1::LoadVar | ILProp1::Indirect | ILProp1::HasSymbolRef, \
/* .properties2 = */ ILProp2::ValueNumberShare | ILProp2::SupportedForPRE| ILProp2::MayUseSystemStack, \
/* .properties3 = */ ILProp3::LikeUse, \
/* .properties4 = */ 0, \
/* .dataType = */ TR::Int64, \
/* .typeProperties = */ ILTypeProp::Size_8 | ILTypeProp::Unsigned, \
/* .childProperties = */ ONE_CHILD(TR::Address), \
/* .swapChildrenOpCode = */ TR::BadILOp, \
/* .reverseBranchOpCode = */ TR::BadILOp, \
/* .booleanCompareOpCode = */ TR::BadILOp, \
/* .ifCompareOpCode = */ TR::BadILOp, \
/* .description = load indirect unsigned long integer */ \
)
OPCODE_MACRO(\
/* .opcode = */ buloadi, \
/* .name = */ "buloadi", \
/* .properties1 = */ ILProp1::LoadVar | ILProp1::Indirect | ILProp1::HasSymbolRef, \
/* .properties2 = */ ILProp2::ValueNumberShare | ILProp2::SupportedForPRE| ILProp2::MayUseSystemStack, \
/* .properties3 = */ ILProp3::LikeUse, \
/* .properties4 = */ 0, \
/* .dataType = */ TR::Int8, \
/* .typeProperties = */ ILTypeProp::Size_1 | ILTypeProp::Unsigned, \
/* .childProperties = */ ONE_CHILD(TR::Address), \
/* .swapChildrenOpCode = */ TR::BadILOp, \
/* .reverseBranchOpCode = */ TR::BadILOp, \
/* .booleanCompareOpCode = */ TR::BadILOp, \
/* .ifCompareOpCode = */ TR::BadILOp, \
/* .description = load indirect unsigned byte */ \
)
OPCODE_MACRO(\
/* .opcode = */ iustore, \
/* .name = */ "iustore", \
Expand Down Expand Up @@ -8291,38 +8195,6 @@ OPCODE_MACRO(\
/* .ifCompareOpCode = */ TR::BadILOp, \
/* .description = convert double to char */ \
)
OPCODE_MACRO(\
/* .opcode = */ cload, \
/* .name = */ "cload", \
/* .properties1 = */ ILProp1::LoadVar | ILProp1::HasSymbolRef, \
/* .properties2 = */ ILProp2::ValueNumberShare | ILProp2::SupportedForPRE| ILProp2::MayUseSystemStack, \
/* .properties3 = */ ILProp3::LikeUse, \
/* .properties4 = */ 0, \
/* .dataType = */ TR::Int16, \
/* .typeProperties = */ ILTypeProp::Size_2 | ILTypeProp::Unsigned, \
/* .childProperties = */ ILChildProp::NoChildren, \
/* .swapChildrenOpCode = */ TR::BadILOp, \
/* .reverseBranchOpCode = */ TR::BadILOp, \
/* .booleanCompareOpCode = */ TR::BadILOp, \
/* .ifCompareOpCode = */ TR::BadILOp, \
/* .description = load short unsigned integer */ \
)
OPCODE_MACRO(\
/* .opcode = */ cloadi, \
/* .name = */ "cloadi", \
/* .properties1 = */ ILProp1::LoadVar | ILProp1::Indirect | ILProp1::HasSymbolRef, \
/* .properties2 = */ ILProp2::ValueNumberShare | ILProp2::SupportedForPRE| ILProp2::MayUseSystemStack, \
/* .properties3 = */ ILProp3::LikeUse, \
/* .properties4 = */ 0, \
/* .dataType = */ TR::Int16, \
/* .typeProperties = */ ILTypeProp::Size_2 | ILTypeProp::Unsigned, \
/* .childProperties = */ ONE_CHILD(TR::Address), \
/* .swapChildrenOpCode = */ TR::BadILOp, \
/* .reverseBranchOpCode = */ TR::BadILOp, \
/* .booleanCompareOpCode = */ TR::BadILOp, \
/* .ifCompareOpCode = */ TR::BadILOp, \
/* .description = load indirect unsigned short integer */ \
)
OPCODE_MACRO(\
/* .opcode = */ cstore, \
/* .name = */ "cstore", \
Expand Down
32 changes: 16 additions & 16 deletions compiler/optimizer/LoopReducer.cpp
Expand Up @@ -1518,14 +1518,14 @@ static void swapIfNecessary(TR::Node *&aiaddFirstChild, TR::Node *&aiaddSecondCh
//Load tree should look as follows:
//
//istore #transchar (store translated character)
// c2i
// icload <translate-char> (load character)
// s2i
// isload <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
// ibload #byte (load the byte - could also be icload)
// ibload #byte (load the byte - could also be isload)
// 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
// ibload <translate-char> (load character)
// iadd
// c2i (widen byte (unsigned) to int - could be
// icload #byte (load the byte - could also be icload)
// isload #byte (load the byte - could also be isload)
// aiadd
// aload #base (load base pointer)
// isub (add displacement to get to relative index)
Expand Down Expand Up @@ -1598,7 +1598,7 @@ TR_Arraytranslate::checkLoad(TR::Node * loadNode)

if (transLoadNode->getOpCodeValue() != TR::bloadi)
{
dumpOptDetails(comp(), "...load tree does not have ibload/icload - no arraytranslate reduction\n");
dumpOptDetails(comp(), "...load tree does not have ibload - no arraytranslate reduction\n");
return false;
}
_resultUnconvertedNode = transLoadNode;
Expand Down Expand Up @@ -1658,7 +1658,7 @@ TR_Arraytranslate::checkLoad(TR::Node * loadNode)

if (inLoadNode->getOpCodeValue() != TR::bloadi)
{
dumpOptDetails(comp(), "...load tree does not have 2nd icload/ibload - check if compiler-generated table lookup match\n");
dumpOptDetails(comp(), "...load tree does not have 2nd bloadi - check if compiler-generated table lookup match\n");
inLoadNode = transLoadNode;
_tableNode = NULL;
_compilerGeneratedTable = true;
Expand Down Expand Up @@ -1766,11 +1766,11 @@ TR_Arraytranslate::checkStore(TR::Node * storeNode)
//Break tree should look as follows:
//
//ifscmpeq --> block <no-stop>
// ==>icload at <translate-char>
// ==>isload at <translate-char>
// sconst <termination char>
//-or-
//ifXcmpYY --> block <no-stop>
// ==>icload at <translate-char>
// ==>isload at <translate-char>
// iconst <termination char>
//
bool
Expand Down Expand Up @@ -2441,13 +2441,13 @@ TR_LoopReducer::generateArraytranslate(TR_RegionStructure * whileLoop, TR_Induct
//BBStart <load-char>
//istore #transchar (store translated character)
// c2i
// icload <translate-char> (load character)
// isload <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
// ibload #byte (load the byte - could also be icload)
// ibload #byte (load the byte - could also be isload)
// aiadd
// aload #base (load base pointer)
// isub (add displacement to get to relative index)
Expand All @@ -2456,7 +2456,7 @@ TR_LoopReducer::generateArraytranslate(TR_RegionStructure * whileLoop, TR_Induct
// iconst 2
// iconst -16
//ifscmpne --> block <no-stop>
// ==>icload at <translate-char>
// ==>isload at <translate-char>
// sconst <termination char>
//BBEnd <load-char>
//BBStart <escape>
Expand Down Expand Up @@ -2491,13 +2491,13 @@ TR_LoopReducer::generateArraytranslate(TR_RegionStructure * whileLoop, TR_Induct
//BBStart <load-char>
//istore #transchar (store translated character)
// c2i
// icload <translate-char> (load character)
// isload <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
// ibload #byte (load the byte - could also be icload)
// ibload #byte (load the byte - could also be isload)
// aiadd
// aload #base (load base pointer)
// isub (add displacement to get to relative index)
Expand All @@ -2506,7 +2506,7 @@ TR_LoopReducer::generateArraytranslate(TR_RegionStructure * whileLoop, TR_Induct
// iconst 2
// iconst -16
//ifscmpeq --> block <escape-block>
// ==>icload at <translate-char>
// ==>isload at <translate-char>
// sconst <termination char>
//BBEnd <load-char>
//
Expand Down Expand Up @@ -2944,7 +2944,7 @@ TR_LoopReducer::generateArraytranslate(TR_RegionStructure * whileLoop, TR_Induct
// <aiadd input tree>
// <aiadd output tree>
// <aload translation table>
// <icload translate char>
// <isload translate char>
// <termination value>
//
//icstore #reschar (result char stored into output array)
Expand Down Expand Up @@ -3941,7 +3941,7 @@ TR_LoopReducer::generateByteToCharArraycopy(TR_InductionVariable * byteIndVar, T
// ishr
// iand
// c2i
// icload #156[0x019D0EC0] Shadow[<array-shadow>]
// isload #156[0x019D0EC0] Shadow[<array-shadow>]
// aiadd
// aload #241[0x015D9DA4] Auto[<temp slot 8>]
// isub
Expand Down

0 comments on commit 926ac47

Please sign in to comment.