@@ -65,7 +65,7 @@ TR_VectorAPIExpansion::perform()
65
65
}
66
66
67
67
bool
68
- TR_VectorAPIExpansion::isVectorAPIMethod (TR::MethodSymbol * methodSymbol)
68
+ TR_VectorAPIExpansion::isVectorAPIMethod (TR::MethodSymbol *methodSymbol)
69
69
{
70
70
TR::RecognizedMethod index = methodSymbol->getRecognizedMethod ();
71
71
@@ -74,7 +74,7 @@ TR_VectorAPIExpansion::isVectorAPIMethod(TR::MethodSymbol * methodSymbol)
74
74
}
75
75
76
76
TR_VectorAPIExpansion::vapiObjType
77
- TR_VectorAPIExpansion::getReturnType (TR::MethodSymbol * methodSymbol)
77
+ TR_VectorAPIExpansion::getReturnType (TR::MethodSymbol *methodSymbol)
78
78
{
79
79
if (!isVectorAPIMethod (methodSymbol)) return Unknown;
80
80
@@ -84,7 +84,7 @@ TR_VectorAPIExpansion::getReturnType(TR::MethodSymbol * methodSymbol)
84
84
}
85
85
86
86
TR_VectorAPIExpansion::vapiObjType
87
- TR_VectorAPIExpansion::getArgumentType (TR::MethodSymbol * methodSymbol, int32_t i)
87
+ TR_VectorAPIExpansion::getArgumentType (TR::MethodSymbol *methodSymbol, int32_t i)
88
88
{
89
89
TR_ASSERT_FATAL (i < _maxNumberArguments, " Wrong argument index" );
90
90
@@ -367,7 +367,7 @@ TR_VectorAPIExpansion::visitNodeToBuildVectorAliases(TR::Node *node, bool verify
367
367
}
368
368
else if (opCode.isFunctionCall ())
369
369
{
370
- TR::MethodSymbol * methodSymbol = node->getSymbolReference ()->getSymbol ()->castToMethodSymbol ();
370
+ TR::MethodSymbol *methodSymbol = node->getSymbolReference ()->getSymbol ()->castToMethodSymbol ();
371
371
TR::DataType methodElementType = TR::NoType;
372
372
int32_t methodNumLanes = 0 ;
373
373
int32_t methodRefNum = node->getSymbolReference ()->getReferenceNumber ();
@@ -665,7 +665,7 @@ TR_VectorAPIExpansion::visitNodeToBuildVectorAliases(TR::Node *node, bool verify
665
665
bool scalarResult = false ;
666
666
if (child->getOpCode ().isFunctionCall ())
667
667
{
668
- TR::MethodSymbol * methodSymbol = child->getSymbolReference ()->getSymbol ()->castToMethodSymbol ();
668
+ TR::MethodSymbol *methodSymbol = child->getSymbolReference ()->getSymbol ()->castToMethodSymbol ();
669
669
if (getReturnType (methodSymbol) == Scalar) continue ; // OK to use by any other parent node
670
670
}
671
671
@@ -712,7 +712,7 @@ TR_VectorAPIExpansion::visitNodeToBuildVectorAliases(TR::Node *node, bool verify
712
712
713
713
void
714
714
TR_VectorAPIExpansion::findAllAliases (int32_t classId, int32_t id,
715
- TR_BitVector * vectorAliasTableElement::* aliasesField,
715
+ TR_BitVector *vectorAliasTableElement::* aliasesField,
716
716
int32_t vectorAliasTableElement::* classField)
717
717
{
718
718
bool tempAliases = &vectorAliasTableElement::_tempAliases == aliasesField;
@@ -788,7 +788,7 @@ TR_VectorAPIExpansion::buildAliasClasses()
788
788
789
789
int32_t symRefCount = comp ()->getSymRefTab ()->getNumSymRefs ();
790
790
791
- TR_BitVector * vectorAliasTableElement::* aliasesField = &vectorAliasTableElement::_aliases;
791
+ TR_BitVector *vectorAliasTableElement::* aliasesField = &vectorAliasTableElement::_aliases;
792
792
int32_t vectorAliasTableElement::* classField = &vectorAliasTableElement::_classId;
793
793
794
794
for (int32_t i = 0 ; i < symRefCount; i++)
@@ -960,7 +960,7 @@ TR_VectorAPIExpansion::findVectorMethods(TR::Compilation *comp)
960
960
961
961
if (opCode.isFunctionCall ())
962
962
{
963
- TR::MethodSymbol * methodSymbol = node->getSymbolReference ()->getSymbol ()->castToMethodSymbol ();
963
+ TR::MethodSymbol *methodSymbol = node->getSymbolReference ()->getSymbol ()->castToMethodSymbol ();
964
964
965
965
if (isVectorAPIMethod (methodSymbol))
966
966
{
@@ -1085,7 +1085,7 @@ TR_VectorAPIExpansion::validateSymRef(int32_t id, int32_t i, vec_sz_t &classLeng
1085
1085
1086
1086
1087
1087
void
1088
- TR_VectorAPIExpansion::validateVectorAliasClasses (TR_BitVector * vectorAliasTableElement::* aliasesField,
1088
+ TR_VectorAPIExpansion::validateVectorAliasClasses (TR_BitVector *vectorAliasTableElement::* aliasesField,
1089
1089
int32_t vectorAliasTableElement::* classField)
1090
1090
{
1091
1091
bool tempClasses = &vectorAliasTableElement::_tempAliases == aliasesField;
@@ -1666,42 +1666,41 @@ TR_VectorAPIExpansion::transformIL(bool checkBoxing)
1666
1666
continue ;
1667
1667
1668
1668
bool scalarized;
1669
- bool vectorizedOrScalarizedNode;
1670
1669
TR::DataType elementType;
1671
1670
int32_t bitsLength;
1672
1671
vapiObjType objectType;
1673
1672
1674
- vectorizedOrScalarizedNode = isVectorizedOrScalarizedNode (node, elementType, bitsLength, objectType, scalarized);
1673
+ bool vectorizedOrScalarizedNode = isVectorizedOrScalarizedNode (node, elementType, bitsLength, objectType, scalarized);
1675
1674
1676
1675
// Vectorize intrinsic if its operands are known
1677
1676
if (boxingAllowed () &&
1678
1677
!vectorizedOrScalarizedNode &&
1679
1678
opCode.isFunctionCall ())
1680
1679
{
1681
- TR::MethodSymbol * methodSymbol = node->getSymbolReference ()->getSymbol ()->castToMethodSymbol ();
1680
+ TR::MethodSymbol *methodSymbol = node->getSymbolReference ()->getSymbol ()->castToMethodSymbol ();
1682
1681
if (isVectorAPIMethod (methodSymbol))
1683
1682
{
1684
1683
if (methodSymbol->getRecognizedMethod () == TR::jdk_internal_vm_vector_VectorSupport_compare)
1685
1684
{
1685
+ // compare has 2 operands that we can use
1686
1686
for (int i = 0 ; i < 2 ; i++)
1687
1687
{
1688
- TR::Node* operand = node->getChild (getFirstOperandIndex (methodSymbol) + i);
1688
+ TR::Node * operand = node->getChild (getFirstOperandIndex (methodSymbol) + i);
1689
1689
1690
- bool operandVectorizedOrScalarized;
1691
1690
bool operandScalarized;
1692
1691
TR::DataType operandElementType;
1693
1692
int32_t operandBitsLength;
1694
1693
vapiObjType operandObjectType;
1695
1694
1696
- operandVectorizedOrScalarized = isVectorizedOrScalarizedNode (operand, operandElementType, operandBitsLength,
1695
+ bool operandVectorizedOrScalarized = isVectorizedOrScalarizedNode (operand, operandElementType, operandBitsLength,
1697
1696
operandObjectType, operandScalarized);
1698
1697
1699
1698
if (operandVectorizedOrScalarized &&
1700
1699
!operandScalarized)
1701
1700
{
1702
- TR::MethodSymbol * methodSymbol = node->getSymbolReference ()->getSymbol ()->castToMethodSymbol ();
1701
+ TR::MethodSymbol *methodSymbol = node->getSymbolReference ()->getSymbol ()->castToMethodSymbol ();
1703
1702
TR::RecognizedMethod index = methodSymbol->getRecognizedMethod ();
1704
- int32_t handlerIndex = index - _firstMethod;
1703
+ int32_t handlerIndex = static_cast < int32_t >( index) - _firstMethod;
1705
1704
1706
1705
TR::VectorLength operandVectorLength = OMR::DataType::bitsToVectorLength (operandBitsLength);
1707
1706
int32_t operandElementSize = OMR::DataType::getSize (operandElementType);
0 commit comments