# class, but different set of parameters.
add_compile_options(-Wno-overloaded-virtual)
add_compile_options(-Wno-unused-variable)
-# Enum value is not handled in a switch (and there is no default clause)
-# Remaining cases are in JIT only
-add_compile_options(-Wno-switch)
# Explicit constructor calls are not supported by clang (this->ClassName::ClassName())
add_compile_options(-Wno-microsoft)
# This warning is caused by comparing 'this' to NULL
case ELEMENT_TYPE_PTR:
wcsncat_s(typeName, typeNameLen, W("*\0"), typeNameLen);
return S_OK;
+ default:
+ // note we can never reach here as this is a nested switch
+ // and corElemType can only be one of the values above
+ break;
}
}
break;
printed = true;
}
break;
+ default:
+ break;
}
}
}
return S_OK;
}
-#endif // !FEATURE_PAL
\ No newline at end of file
+#endif // !FEATURE_PAL
}
}
break;
+
+ default:
+ // for all other 'assertion->op2.kind' values we don't check anything
+ break;
}
}
}
// For most of the assertions that we create below
// the assertion is true after the tree is processed
bool assertionProven = true;
- unsigned assertionIndex = 0;
+ unsigned assertionIndex = NO_ASSERTION_INDEX;
switch (tree->gtOper)
{
case GT_ASG:
case GT_JTRUE:
assertionIndex = optAssertionGenJtrue(tree);
break;
+
+ default:
+ // All other gtOper node kinds, leave 'assertionIndex' = NO_ASSERTION_INDEX
+ break;
}
// For global assertion prop we must store the assertion number in the tree node
usable = ((impAssertion->assertionKind == OAK_EQUAL) && (impAssertion->op2.u1.iconVal == iconVal)) ||
((impAssertion->assertionKind == OAK_NOT_EQUAL) && (impAssertion->op2.u1.iconVal != iconVal));
break;
+
+ default:
+ // leave 'usable' = false;
+ break;
}
if (usable)
(depAssertLclNum == impAssertion->op1.lcl.lclNum && depAssertSsaNum == impAssertion->op1.lcl.ssaNum));
}
break;
+
+ default:
+ // leave 'usable' = false;
+ break;
}
if (usable)
case INS_shr:
ins = INS_shr_1;
break;
+ default:
+ // leave 'ins' unchanged
+ break;
}
getEmitter()->emitIns_C(ins, attr, operand->gtClsVar.gtClsVarHnd, 0);
}
case INS_shr:
ins = INS_shr_N;
break;
+ default:
+ // leave 'ins' unchanged
+ break;
}
if (isClsVarAddr)
{
case O2K_SUBRANGE:
return ((op2.u2.loBound == that->op2.u2.loBound) &&
(op2.u2.hiBound == that->op2.u2.hiBound));
+
+ case O2K_INVALID:
+ // we will return false
+ break;
}
return false;
}
return true;
}
break;
+
+ default:
+ // we return false for these unhandled 'oper' kinds
+ break;
}
}
return false;
case CEE_CONV_OVF_U_UN:
case CEE_CONV_U:
isNative = true;
+ default:
+ // leave 'isNative' = false;
+ break;
}
if (isNative)
{
return true;
}
break;
+
+ default:
+ // for all other 'oper' kinds, we will return false
+ break;
}
return false;
}
// rep movs kills RCX, RDI and RSI
killMask = RBM_RCX | RBM_RDI | RBM_RSI;
break;
+ case GenTreeBlkOp::BlkOpKindUnroll:
+ case GenTreeBlkOp::BlkOpKindInvalid:
+ // for these 'cpBlkNode->gtBlkOpKind' kinds, we leave 'killMask' = RBM_NONE
+ break;
}
}
break;
killMask |= RBM_RCX;
}
break;
+ case GenTreeBlkOp::BlkOpKindUnroll:
+ case GenTreeBlkOp::BlkOpKindInvalid:
+ // for these 'cpBlkNode->gtBlkOpKind' kinds, we leave 'killMask' = RBM_NONE
+ break;
}
}
break;
}
break;
#endif // PROFILING_SUPPORTED && _TARGET_AMD64_
+
+ default:
+ // for all other 'tree->OperGet()' kinds, leave 'killMask' = RBM_NONE
+ break;
}
return killMask;
}
}
break;
}
+ default:
+ // for all other 'operTreeNodee->OperGet()' kinds, we leave 'score' unchanged
+ break;
}
}
}
assert(regRecord != nullptr);
dumpLsraAllocationEvent(LSRA_EVENT_KEPT_ALLOCATION, nullptr, regRecord->regNum, currentBlock);
break;
+
+ case RefTypeUpperVectorSaveDef:
+ case RefTypeUpperVectorSaveUse:
case RefTypeDef:
case RefTypeUse:
case RefTypeParamDef:
// Do nothing; these will be handled by the RefTypeBB.
DBEXEC(VERBOSE, printf(" "));
break;
+
+ case RefTypeInvalid:
+ case RefTypeBound:
+ // for these 'currentRefPosition->refType' values, No action to take
+ break;
}
+
if (currentRefPosition->refType != RefTypeBB)
{
DBEXEC(VERBOSE, dumpRegRecords());
{
heapHavoc = true;
}
+ break;
}
+
+ default:
+ // All other gtOper node kinds, leave 'heapHavoc' unchanged (i.e. false)
+ break;
}
}
}
case GT_ASG_ADD:
return IsBinOpMonotonicallyIncreasing(asg->gtGetOp1(), asg->gtGetOp2(), GT_ADD, path);
+
+ default:
+ // All other 'asg->OperGet()' kinds, return false
+ break;
}
JITDUMP("Unknown local definition type\n");
return false;
case GT_LE:
pRange->uLimit = limit;
break;
+
+ default:
+ // All other 'cmpOper' kinds leave lLimit/uLimit unchanged
+ break;
}
JITDUMP("The range after edge merging:");
JITDUMP(pRange->ToString(m_pCompiler->getAllocatorDebugOnly()));
}
case GT_ASG_ADD:
- // If the operator of the definition is +=, then compute the range of the operands of +.
- // Note that gtGetOp1 will return op1 to be the lhs; in the formulation of ssa, we have
- // a side table for defs and the lhs of a += is considered to be a use for SSA numbering.
+ // If the operator of the definition is +=, then compute the range of the operands of +.
+ // Note that gtGetOp1 will return op1 to be the lhs; in the formulation of ssa, we have
+ // a side table for defs and the lhs of a += is considered to be a use for SSA numbering.
return ComputeRangeForBinOp(loc->block, loc->stmt,
asg->gtGetOp1(), asg->gtGetOp2(), GT_ADD, path, monotonic DEBUGARG(indent));
+
+ default:
+ // All other 'asg->OperGet()' kinds, return Limit::keUnknown
+ break;
}
return Range(Limit(Limit::keUnknown));
}
case GT_ASG_ADD:
// For GT_ASG_ADD, op2 is use, op1 is also use since we side table for defs in useasg case.
return DoesBinOpOverflow(loc->block, loc->stmt, asg->gtGetOp1(), asg->gtGetOp2(), path);
+
+ default:
+ // All other 'asg->OperGet()' kinds, conservatively return true
+ break;
}
return true;
}
}
cns += i;
return true;
+
+ case keUndef:
+ case keUnknown:
+ // For these values of 'type', conservatively return false
+ break;
}
+
return false;
}
{
case GT_MOD:
return fmod(v0, v1);
+ default:
+ // For any other values of 'oper', we will assert and return 0.0f
+ break;
}
+ assert(!"EvalOpIntegral<float> with pExcSet");
return 0.0f;
}
{
case GT_MOD:
return fmod(v0, v1);
+ default:
+ // For any other value of 'oper', we will assert and return 0.0
+ break;
}
+ assert(!"EvalOpIntegral<double> with pExcSet");
return 0.0;
}