// pvn - a write back pointer to the normal value portion of 'vnWx'
// pvnx - a write back pointer for the exception set portion of 'vnWx'
//
-// Return Values: - This method signature is void but can return up to two values
-// using the write back parameters.
+// Return Values: - This method signature is void but returns two values using
+// the write back parameters.
//
-// Note: 'pvnx' is only written when 'vnWx' actually has an exception set,
-// otherwise it is left unchanged. When we have an exception set 'vnWx'
-// will be a VN func with m_func == VNF_ValWithExc.
-// When 'vnWx' does not have an exception set, the orginal value is the
-// normal value and is written to 'pvn'.
+// Note: When 'vnWx' does not have an exception set, the orginal value is the
+// normal value and is written to 'pvn' and VNForEmptyExcSet() is
+// written to 'pvnx'
//
void ValueNumStore::VNUnpackExc(ValueNum vnWx, ValueNum* pvn, ValueNum* pvnx)
{
}
else
{
- *pvn = vnWx;
+ *pvn = vnWx;
+ *pvnx = VNForEmptyExcSet();
}
}
else
{
ValueNum vnNorm;
- ValueNum vnX = VNForEmptyExcSet();
+ ValueNum vnX;
VNUnpackExc(vn, &vnNorm, &vnX);
return VNForFunc(TypeOfVN(vnNorm), VNF_ValWithExc, vnNorm, VNExcSetUnion(vnX, excSet));
}
ValueNum opAvnWx = opA->gtVNPair.GetLiberal();
assert(VNIsValid(opAvnWx));
ValueNum opAvn;
- ValueNum opAvnx = VNForEmptyExcSet();
+ ValueNum opAvnx;
VNUnpackExc(opAvnWx, &opAvn, &opAvnx);
assert(VNIsValid(opAvn) && VNIsValid(opAvnx));
// First we'll record the exeception set for the rhs and
// later we will union in the exeception set for the lhs
//
- ValueNum vnExcSet = ValueNumStore::VNForEmptyExcSet();
+ ValueNum vnExcSet;
// Unpack, Norm,Exc for 'rhsVNPair'
ValueNum vnRhsLibNorm;
if (obj != nullptr)
{
// Unpack, Norm,Exc for 'obj'
- ValueNum vnObjExcSet = ValueNumStore::VNForEmptyExcSet();
+ ValueNum vnObjExcSet;
vnStore->VNUnpackExc(obj->gtVNPair.GetLiberal(), &normVal, &vnObjExcSet);
vnExcSet = vnStore->VNExcSetUnion(vnExcSet, vnObjExcSet);
// See if the addr has any exceptional part.
ValueNumPair addrNvnp;
- ValueNumPair addrXvnp = ValueNumPair(ValueNumStore::VNForEmptyExcSet(), ValueNumStore::VNForEmptyExcSet());
+ ValueNumPair addrXvnp;
vnStore->VNPUnpackExc(addr->gtVNPair, &addrNvnp, &addrXvnp);
// Is the dereference immutable? If so, model it as referencing the read-only heap.
else
{
ValueNumPair op1VNP;
- ValueNumPair op1VNPx = ValueNumStore::VNPForEmptyExcSet();
+ ValueNumPair op1VNPx;
vnStore->VNPUnpackExc(tree->gtOp.gtOp1->gtVNPair, &op1VNP, &op1VNPx);
// If we are fetching the array length for an array ref that came from global memory
// PtrToXXX.
ValueNumPair op1vnp;
- ValueNumPair op1Xvnp = ValueNumStore::VNPForEmptyExcSet();
+ ValueNumPair op1Xvnp;
vnStore->VNPUnpackExc(tree->gtOp.gtOp1->gtVNPair, &op1vnp, &op1Xvnp);
ValueNumPair op2vnp;
- ValueNumPair op2Xvnp = ValueNumStore::VNPForEmptyExcSet();
+ ValueNumPair op2Xvnp;
vnStore->VNPUnpackExc(op2VNPair, &op2vnp, &op2Xvnp);
ValueNumPair excSet = vnStore->VNPExcSetUnion(op1Xvnp, op2Xvnp);
case GT_COMMA:
{
ValueNumPair op1vnp;
- ValueNumPair op1Xvnp = ValueNumStore::VNPForEmptyExcSet();
+ ValueNumPair op1Xvnp;
vnStore->VNPUnpackExc(tree->gtOp.gtOp1->gtVNPair, &op1vnp, &op1Xvnp);
ValueNumPair op2vnp;
ValueNumPair op2Xvnp = ValueNumStore::VNPForEmptyExcSet();
var_types resultType = genActualType(castToType);
ValueNumPair castArgVNP;
- ValueNumPair castArgxVNP = ValueNumStore::VNPForEmptyExcSet();
+ ValueNumPair castArgxVNP;
VNPUnpackExc(srcVNPair, &castArgVNP, &castArgxVNP);
// When we're considering actual value returned by a non-checking cast, (hasOverflowCheck is false)
// Has at least two arguments.
ValueNumPair vnp1wx = getCurrentArg(1)->gtVNPair;
ValueNumPair vnp1;
- ValueNumPair vnp1x = ValueNumStore::VNPForEmptyExcSet();
+ ValueNumPair vnp1x;
vnStore->VNPUnpackExc(vnp1wx, &vnp1, &vnp1x);
vnpExc = vnStore->VNPExcSetUnion(vnpExc, vnp1x);
{
ValueNumPair vnp2wx = getCurrentArg(2)->gtVNPair;
ValueNumPair vnp2;
- ValueNumPair vnp2x = ValueNumStore::VNPForEmptyExcSet();
+ ValueNumPair vnp2x;
vnStore->VNPUnpackExc(vnp2wx, &vnp2, &vnp2x);
vnpExc = vnStore->VNPExcSetUnion(vnpExc, vnp2x);
// Unpack, Norm,Exc for the tree's op1 VN
ValueNumPair vnpBaseNorm;
- ValueNumPair vnpBaseExc = ValueNumStore::VNPForEmptyExcSet();
+ ValueNumPair vnpBaseExc;
vnStore->VNPUnpackExc(baseVNP, &vnpBaseNorm, &vnpBaseExc);
// The Norm VN for op1 is used to create the NullPtrExc
// Unpack, Norm,Exc for the tree's VN
ValueNumPair vnpTreeNorm;
- ValueNumPair vnpTreeExc = ValueNumStore::VNPForEmptyExcSet();
+ ValueNumPair vnpTreeExc;
ValueNumPair vnpDivZeroExc = ValueNumStore::VNPForEmptyExcSet();
ValueNumPair vnpArithmExc = ValueNumStore::VNPForEmptyExcSet();
// Unpack, Norm,Exc for the tree's VN
//
ValueNumPair vnpTreeNorm;
- ValueNumPair vnpTreeExc = ValueNumStore::VNPForEmptyExcSet();
+ ValueNumPair vnpTreeExc;
vnStore->VNPUnpackExc(tree->gtVNPair, &vnpTreeNorm, &vnpTreeExc);
// Unpack, Norm,Exc for the tree's VN
//
ValueNumPair vnpTreeNorm;
- ValueNumPair vnpTreeExc = ValueNumStore::VNPForEmptyExcSet();
+ ValueNumPair vnpTreeExc;
ValueNumPair newExcSet;
vnStore->VNPUnpackExc(tree->gtVNPair, &vnpTreeNorm, &vnpTreeExc);