SsaDefArray<LclSsaVarDsc> lvPerSsaData;
+ // True if ssaNum is a viable ssaNum for this local.
+ bool IsValidSsaNum(unsigned ssaNum) const
+ {
+ return lvPerSsaData.IsValidSsaNum(ssaNum);
+ }
+
// Returns the address of the per-Ssa data for the given ssaNum (which is required
// not to be the SsaConfig::RESERVED_SSA_NUM, which indicates that the variable is
// not an SSA variable).
//
void Compiler::gtDispSsaName(unsigned lclNum, unsigned ssaNum, bool isDef)
{
- if (ssaNum != SsaConfig::RESERVED_SSA_NUM)
+ if (ssaNum == SsaConfig::RESERVED_SSA_NUM)
{
- if (isDef)
+ return;
+ }
+
+ LclVarDsc* const lclDsc = lvaGetDesc(lclNum);
+ bool const isValid = lclDsc->IsValidSsaNum(ssaNum);
+
+ if (isDef)
+ {
+ if (!isValid)
{
- unsigned oldDefSsaNum = lvaGetDesc(lclNum)->GetPerSsaData(ssaNum)->GetUseDefSsaNum();
- if (oldDefSsaNum != SsaConfig::RESERVED_SSA_NUM)
- {
- printf("ud:%d->%d", oldDefSsaNum, ssaNum);
- return;
- }
+ printf("?d:%d", ssaNum);
+ return;
}
- printf("%s:%d", isDef ? "d" : "u", ssaNum);
+ unsigned oldDefSsaNum = lclDsc->GetPerSsaData(ssaNum)->GetUseDefSsaNum();
+ if (oldDefSsaNum != SsaConfig::RESERVED_SSA_NUM)
+ {
+ printf("ud:%d->%d", oldDefSsaNum, ssaNum);
+ return;
+ }
}
+
+ printf("%s%s:%d", isValid ? "" : "?", isDef ? "d" : "u", ssaNum);
}
//------------------------------------------------------------------------
return OperIsLocal(OperGet());
}
+ bool IsAnyLocal() const
+ {
+ return OperIsAnyLocal(OperGet());
+ }
+
bool IsLclVarAddr() const;
// Returns "true" iff 'this' is a GT_LCL_FLD or GT_STORE_LCL_FLD on which the type