if (verbose)
{
printf("\nVN relop based copy assertion prop in " FMT_BB ":\n", compCurBB->bbNum);
- printf("Assertion index=#%02u: V%02d.%02d %s V%02d.%02d\n", index, op1->gtLclVar.GetLclNum(),
- op1->gtLclVar.GetSsaNum(), (curAssertion->assertionKind == OAK_EQUAL) ? "==" : "!=",
- op2->gtLclVar.GetLclNum(), op2->gtLclVar.GetSsaNum());
+ printf("Assertion index=#%02u: V%02d.%02d %s V%02d.%02d\n", index, op1->AsLclVar()->GetLclNum(),
+ op1->AsLclVar()->GetSsaNum(), (curAssertion->assertionKind == OAK_EQUAL) ? "==" : "!=",
+ op2->AsLclVar()->GetLclNum(), op2->AsLclVar()->GetSsaNum());
gtDispTree(tree, nullptr, nullptr, true);
}
#endif
case GT_LCL_VAR:
{
assert(srcNode->IsRegOptional() ||
- !compiler->lvaTable[srcNode->gtLclVar.GetLclNum()].lvIsRegCandidate());
+ !compiler->lvaTable[srcNode->AsLclVar()->GetLclNum()].lvIsRegCandidate());
varNum = srcNode->AsLclVar()->GetLclNum();
offset = 0;
case GT_LCL_VAR:
{
assert(memOp->IsRegOptional() ||
- !emitComp->lvaTable[memOp->gtLclVar.GetLclNum()].lvIsRegCandidate());
+ !emitComp->lvaTable[memOp->AsLclVar()->GetLclNum()].lvIsRegCandidate());
varNum = memOp->AsLclVar()->GetLclNum();
offset = 0;
break;
{
UINT64 bits;
case GT_LCL_VAR:
- add = tree->gtLclVar.GetLclNum();
+ add = tree->AsLclVar()->GetLclNum();
break;
case GT_LCL_FLD:
hash = genTreeHashAdd(hash, tree->gtLclFld.GetLclNum());
return false;
}
- assert(tree->gtLclVar.GetLclNum() < lvaTableCnt);
- LclVarDsc* varDsc = lvaTable + tree->gtLclVar.GetLclNum();
+ assert(tree->AsLclVar()->GetLclNum() < lvaTableCnt);
+ LclVarDsc* varDsc = lvaTable + tree->AsLclVar()->GetLclNum();
if (varDsc->lvDoNotEnregister)
{
costEx = 1;
costSz = 1;
/* Sign-extend and zero-extend are more expensive to load */
- if (lvaTable[tree->gtLclVar.GetLclNum()].lvNormalizeOnLoad())
+ if (lvaTable[tree->AsLclVar()->GetLclNum()].lvNormalizeOnLoad())
{
costEx += 1;
costSz += 1;
// Remember that the LclVar node has been cloned. The flag will be set
// on 'copy' as well.
tree->gtFlags |= GTF_VAR_CLONED;
- copy = gtNewLclvNode(tree->gtLclVarCommon.GetLclNum(), tree->gtType DEBUGARG(tree->gtLclVar.gtLclILoffs));
+ copy =
+ gtNewLclvNode(tree->gtLclVarCommon.GetLclNum(), tree->gtType DEBUGARG(tree->AsLclVar()->gtLclILoffs));
break;
case GT_LCL_FLD:
// Remember that the LclVar node has been cloned. The flag will
// be set on 'copy' as well.
tree->gtFlags |= GTF_VAR_CLONED;
- copy = gtNewLclvNode(tree->gtLclVar.GetLclNum(), tree->gtType DEBUGARG(tree->gtLclVar.gtLclILoffs));
+ copy = gtNewLclvNode(tree->AsLclVar()->GetLclNum(),
+ tree->gtType DEBUGARG(tree->AsLclVar()->gtLclILoffs));
copy->AsLclVarCommon()->SetSsaNum(tree->AsLclVarCommon()->GetSsaNum());
}
copy->gtFlags = tree->gtFlags;
}
var_types valTyp = val->TypeGet();
- if (val->OperGet() == GT_LCL_VAR && lvaTable[val->gtLclVar.GetLclNum()].lvNormalizeOnLoad())
+ if (val->OperGet() == GT_LCL_VAR && lvaTable[val->AsLclVar()->GetLclNum()].lvNormalizeOnLoad())
{
- valTyp = lvaGetRealType(val->gtLclVar.GetLclNum());
+ valTyp = lvaGetRealType(val->AsLclVar()->GetLclNum());
val->gtType = valTyp;
}
var_types dstTyp = varDsc->TypeGet();
case GT_LCL_VAR:
{
- assert(op2->IsRegOptional() || !compiler->lvaTable[op2->gtLclVar.GetLclNum()].lvIsRegCandidate());
+ assert(op2->IsRegOptional() ||
+ !compiler->lvaTable[op2->AsLclVar()->GetLclNum()].lvIsRegCandidate());
varNum = op2->AsLclVar()->GetLclNum();
offset = 0;
break;
case GT_LCL_VAR:
{
- assert(op2->IsRegOptional() || !compiler->lvaTable[op2->gtLclVar.GetLclNum()].lvIsRegCandidate());
+ assert(op2->IsRegOptional() ||
+ !compiler->lvaTable[op2->AsLclVar()->GetLclNum()].lvIsRegCandidate());
varNum = op2->AsLclVar()->GetLclNum();
offset = 0;
break;
case GT_LCL_VAR:
{
- assert(op2->IsRegOptional() || !compiler->lvaTable[op2->gtLclVar.GetLclNum()].lvIsRegCandidate());
+ assert(op2->IsRegOptional() ||
+ !compiler->lvaTable[op2->AsLclVar()->GetLclNum()].lvIsRegCandidate());
varNum = op2->AsLclVar()->GetLclNum();
offset = 0;
break;
case GT_CLS_VAR_ADDR:
{
- emit->emitIns_SIMD_R_R_R_C(ins, attr, targetReg, op1Reg, op2Reg, addr->gtClsVar.gtClsVarHnd, 0);
+ emit->emitIns_SIMD_R_R_R_C(ins, attr, targetReg, op1Reg, op2Reg, addr->AsClsVar()->gtClsVarHnd, 0);
return;
}
case GT_LCL_VAR:
{
- assert(op3->IsRegOptional() || !compiler->lvaTable[op3->gtLclVar.GetLclNum()].lvIsRegCandidate());
+ assert(op3->IsRegOptional() ||
+ !compiler->lvaTable[op3->AsLclVar()->GetLclNum()].lvIsRegCandidate());
varNum = op3->AsLclVar()->GetLclNum();
offset = 0;
break;
inlCurArgInfo->argIsLclVar = true;
/* Remember the "original" argument number */
- INDEBUG(curArgVal->gtLclVar.gtLclILoffs = argNum;)
+ INDEBUG(curArgVal->AsLclVar()->gtLclILoffs = argNum;)
}
if ((curArgVal->OperKind() & GTK_CONST) ||
if (argInfo.argIsUsed || (op1->TypeGet() != lclTyp))
{
assert(op1->gtOper == GT_LCL_VAR);
- assert(lclNum == op1->gtLclVar.gtLclILoffs);
+ assert(lclNum == op1->AsLclVar()->gtLclILoffs);
var_types newTyp = lclTyp;
}
// Create a new lcl var node - remember the argument lclNum
- op1 = gtNewLclvNode(op1->gtLclVarCommon.GetLclNum(), newTyp DEBUGARG(op1->gtLclVar.gtLclILoffs));
+ op1 = gtNewLclvNode(op1->gtLclVarCommon.GetLclNum(), newTyp DEBUGARG(op1->AsLclVar()->gtLclILoffs));
}
}
else if (argInfo.argIsByRefToStructLocal && !argInfo.argHasStargOp)
assert(tree && (tree->gtOper == GT_LCL_VAR || tree->gtOper == GT_LCL_VAR_ADDR || tree->gtOper == GT_STORE_LCL_VAR));
assert(tree->gtLclVarCommon.GetLclNum() < compiler->lvaCount);
- GetEmitter()->emitVarRefOffs = tree->gtLclVar.gtLclILoffs;
+ GetEmitter()->emitVarRefOffs = tree->AsLclVar()->gtLclILoffs;
#endif // DEBUG
}
case GT_LCL_VAR:
{
assert(rmOp->IsRegOptional() ||
- !compiler->lvaGetDesc(rmOp->gtLclVar.GetLclNum())->lvIsRegCandidate());
+ !compiler->lvaGetDesc(rmOp->AsLclVar()->GetLclNum())->lvIsRegCandidate());
varNum = rmOp->AsLclVar()->GetLclNum();
offset = 0;
break;
{
structHnd = call->gtRetClsHnd;
if (info.compCompHnd->isStructRequiringStackAllocRetBuf(structHnd) &&
- !(dest->OperGet() == GT_LCL_VAR && dest->gtLclVar.GetLclNum() == info.compRetBuffArg))
+ !(dest->OperGet() == GT_LCL_VAR && dest->AsLclVar()->GetLclNum() == info.compRetBuffArg))
{
// Force re-evaluating the argInfo as the return argument has changed.
call->fgArgInfo = nullptr;
{
GenTree* var = origDest->AsOp()->gtOp1;
origDest = gtNewOperNode(GT_COMMA, var->TypeGet(), origDest,
- gtNewLclvNode(var->gtLclVar.GetLclNum(), var->TypeGet()));
+ gtNewLclvNode(var->AsLclVar()->GetLclNum(), var->TypeGet()));
}
}
GenTree* copyBlk = gtNewCpObjNode(origDest, retValVarAddr, structHnd, false);
if (dst != nullptr)
{
assert(dst->gtOper == GT_LCL_VAR);
- lclNum = dst->gtLclVar.GetLclNum();
+ lclNum = dst->AsLclVar()->GetLclNum();
}
else
{
assert(tree->IsPhiDefn());
- if (tree->AsOp()->gtOp1->gtLclVar.GetLclNum() == lclNum)
+ if (tree->AsOp()->gtOp1->AsLclVar()->GetLclNum() == lclNum)
{
// It's the definition for the right local. Add "ssaNum" to the RHS.
AddPhiArg(handler, stmt, tree->gtGetOp2()->AsPhi(), lclNum, ssaNum, block);
GenTree* tree = stmt->GetRootNode();
GenTreePhi* phi = tree->gtGetOp2()->AsPhi();
- unsigned lclNum = tree->AsOp()->gtOp1->gtLclVar.GetLclNum();
+ unsigned lclNum = tree->AsOp()->gtOp1->AsLclVar()->GetLclNum();
unsigned ssaNum = pRenameState->Top(lclNum);
// Search the arglist for an existing definition for ssaNum.
// (Can we assert that its the head of the list? This should only happen when we add
// Get the phi node from GT_ASG.
GenTree* lclVar = tree->AsOp()->gtOp1;
- unsigned lclNum = lclVar->gtLclVar.GetLclNum();
+ unsigned lclNum = lclVar->AsLclVar()->GetLclNum();
// If the variable is live-out of "blk", and is therefore live on entry to the try-block-start
// "succ", then we make sure the current SSA name for the