// Check if propagation removed statements starting from current stmt.
// If so, advance to the next good statement.
- Statement* nextStmt = (prev == nullptr) ? block->firstStmt() : prev->getNextStmt();
+ Statement* nextStmt = (prev == nullptr) ? block->firstStmt() : prev->GetNextStmt();
return nextStmt;
}
if (fgRemoveRestOfBlock)
{
fgRemoveStmt(block, stmt);
- stmt = stmt->getNextStmt();
+ stmt = stmt->GetNextStmt();
continue;
}
else
// Propagation resulted in removal of the remaining stmts, perform it.
if (fgRemoveRestOfBlock)
{
- stmt = stmt->getNextStmt();
+ stmt = stmt->GetNextStmt();
continue;
}
}
// Advance the iterator
- stmt = stmt->getNextStmt();
+ stmt = stmt->GetNextStmt();
}
}
if (fgRemoveRestOfBlock)
{
fgRemoveStmt(block, stmt);
- stmt = stmt->getNextStmt();
+ stmt = stmt->GetNextStmt();
continue;
}
// Check if propagation removed statements starting from current stmt.
// If so, advance to the next good statement.
- Statement* nextStmt = (prevStmt == nullptr) ? block->firstStmt() : prevStmt->getNextStmt();
- stmt = (stmt == nextStmt) ? stmt->getNextStmt() : nextStmt;
+ Statement* nextStmt = (prevStmt == nullptr) ? block->firstStmt() : prevStmt->GetNextStmt();
+ stmt = (stmt == nextStmt) ? stmt->GetNextStmt() : nextStmt;
}
optAssertionPropagatedCurrentStmt = false; // clear it back as we are done with stmts.
}
while ((tree->OperGet() == GT_ASG && tree->gtOp.gtOp2->OperGet() == GT_PHI) ||
(tree->OperGet() == GT_STORE_LCL_VAR && tree->gtOp.gtOp1->OperGet() == GT_PHI))
{
- stmt = stmt->getNextStmt();
+ stmt = stmt->GetNextStmt();
if (stmt == nullptr)
{
return nullptr;
if ((tree->OperGet() == GT_ASG && tree->gtOp.gtOp2->OperGet() == GT_CATCH_ARG) ||
(tree->OperGet() == GT_STORE_LCL_VAR && tree->gtOp.gtOp1->OperGet() == GT_CATCH_ARG))
{
- stmt = stmt->getNextStmt();
+ stmt = stmt->GetNextStmt();
}
return stmt;
}
for (BasicBlock* block = fgFirstBB; block != nullptr; block = block->bbNext)
{
- for (Statement* stmt = block->FirstNonPhiDef(); stmt != nullptr; stmt = stmt->getNextStmt())
+ for (Statement* stmt = block->FirstNonPhiDef(); stmt != nullptr; stmt = stmt->GetNextStmt())
{
for (GenTree* tree = stmt->gtStmtList; tree != nullptr; tree = tree->gtNext)
{
for (Statement* stmt = block->firstStmt(); stmt != nullptr;)
{
// Preserve the next link before the propagation and morph.
- Statement* next = stmt->gtNextStmt;
+ Statement* next = stmt->GetNextStmt();
compCurStmt = stmt;
{
// There is at least one statement already.
Statement* lastStmt = firstStmt->getPrevStmt();
- noway_assert(lastStmt != nullptr && lastStmt->getNextStmt() == nullptr);
+ noway_assert(lastStmt != nullptr && lastStmt->GetNextStmt() == nullptr);
// Append the statement after the last one.
lastStmt->gtNext = stmt;
noway_assert(stmtLast);
noway_assert(stmtLast->gtNext == nullptr);
- Statement* stmtNext = stmtAfter->getNextStmt();
+ Statement* stmtNext = stmtAfter->GetNextStmt();
if (stmtNext == nullptr)
{
//
// More formally, if control flow targets an instruction, that instruction must be the
// start of a new sequence point.
- Statement* nextStmt = newStmt->getNextStmt();
+ Statement* nextStmt = newStmt->GetNextStmt();
if (nextStmt != nullptr)
{
// Is it possible for gtNext to be NULL?
Statement* stmt = top->firstStmt();
while (stmt->gtNext)
{
- stmt = stmt->gtNextStmt;
+ stmt = stmt->GetNextStmt();
}
fgRemoveStmt(top, stmt);
fgInsertStmtAtEnd(bottom, stmt);
if (stmt != nullptr)
{
- newBlock->bbStmtList = stmt->gtNextStmt;
+ newBlock->bbStmtList = stmt->GetNextStmt();
if (newBlock->bbStmtList != nullptr)
{
newBlock->bbStmtList->gtPrev = curr->bbStmtList->gtPrev;
}
else
{
- block->bbStmtList = firstStmt->gtNextStmt;
+ block->bbStmtList = firstStmt->GetNextStmt();
block->bbStmtList->gtPrev = firstStmt->gtPrev;
}
}
{
do
{
- currentDumpStmt = currentDumpStmt->getNextStmt();
+ currentDumpStmt = currentDumpStmt->GetNextStmt();
printf("\n");
// Split statements between topBlock and bottomBlock.
// First figure out bottomBlock_Begin
Statement* bottomBlock_Begin;
- bottomBlock_Begin = stmtAfter->gtNextStmt;
+ bottomBlock_Begin = stmtAfter->GetNextStmt();
if (topBlock->bbStmtList == nullptr)
{
BasicBlock* block = inlineInfo->iciBlock;
Statement* callStmt = inlineInfo->iciStmt;
IL_OFFSETX callILOffset = callStmt->gtStmtILoffsx;
- Statement* postStmt = callStmt->gtNextStmt;
+ Statement* postStmt = callStmt->GetNextStmt();
Statement* afterStmt = callStmt; // afterStmt is the place where the new statements should be inserted after.
Statement* newStmt = nullptr;
GenTreeCall* call = inlineInfo->iciCall->AsCall();
// Update any newly added statements with the appropriate context.
InlineContext* context = callStmt->gtInlineContext;
assert(context != nullptr);
- for (Statement* addedStmt = callStmt->gtNextStmt; addedStmt != postStmt; addedStmt = addedStmt->gtNextStmt)
+ for (Statement* addedStmt = callStmt->GetNextStmt(); addedStmt != postStmt; addedStmt = addedStmt->GetNextStmt())
{
assert(addedStmt->gtInlineContext == nullptr);
addedStmt->gtInlineContext = context;
#endif
public:
- __declspec(property(get = getNextStmt)) Statement* gtNextStmt;
-
__declspec(property(get = getPrevStmt)) Statement* gtPrevStmt;
Statement* gtNext;
bool compilerAdded;
- Statement* getNextStmt()
+ Statement* GetNextStmt()
{
if (gtNext == nullptr)
{
else
{
// Insert after the oldLastStmt before the first inserted for op2.
- beforeStmt = oldLastStmt->getNextStmt();
+ beforeStmt = oldLastStmt->GetNextStmt();
}
impInsertTreeBefore(structVal->gtOp.gtOp1, impCurStmtOffs, beforeStmt);
assert(treeWithCall == call);
}
#endif
- Statement* nextMorphStmt = fgMorphStmt->gtNextStmt;
+ Statement* nextMorphStmt = fgMorphStmt->GetNextStmt();
// Remove all stmts after the call.
while (nextMorphStmt != nullptr)
{
Statement* stmtToRemove = nextMorphStmt;
- nextMorphStmt = stmtToRemove->gtNextStmt;
+ nextMorphStmt = stmtToRemove->GetNextStmt();
fgRemoveStmt(compCurBB, stmtToRemove);
}
}
// Or this is the last statement of a conditional branch that was just folded?
- if (!removedStmt && (stmt->getNextStmt() == nullptr) && !fgRemoveRestOfBlock)
+ if (!removedStmt && (stmt->GetNextStmt() == nullptr) && !fgRemoveRestOfBlock)
{
if (fgFoldConditional(block))
{
Statement* stmt = block->firstStmt();
GenTree* prev = nullptr;
- for (; stmt != nullptr; prev = stmt->gtStmtExpr, stmt = stmt->gtNextStmt)
+ for (; stmt != nullptr; prev = stmt->gtStmtExpr, stmt = stmt->GetNextStmt())
{
if (fgRemoveRestOfBlock)
{
morph = stmt->gtStmtExpr;
noway_assert(compTailCallUsed);
noway_assert((morph->gtOper == GT_CALL) && morph->AsCall()->IsTailCall());
- noway_assert(stmt->gtNextStmt == nullptr);
+ noway_assert(stmt->GetNextStmt() == nullptr);
GenTreeCall* call = morph->AsCall();
// Could either be
noway_assert(compTailCallUsed);
noway_assert((tree->gtOper == GT_CALL) && tree->AsCall()->IsTailCall());
- noway_assert(stmt->gtNextStmt == nullptr);
+ noway_assert(stmt->GetNextStmt() == nullptr);
GenTreeCall* call = morph->AsCall();
// This block must be ending with a GT_RETURN
noway_assert(lastStmt != nullptr);
- noway_assert(lastStmt->getNextStmt() == nullptr);
+ noway_assert(lastStmt->GetNextStmt() == nullptr);
noway_assert(ret != nullptr);
// GT_RETURN must have non-null operand as the method is returning the value assigned to
{
// This block ends with a GT_RETURN
noway_assert(lastStmt != nullptr);
- noway_assert(lastStmt->getNextStmt() == nullptr);
+ noway_assert(lastStmt->GetNextStmt() == nullptr);
// Must be a void GT_RETURN with null operand; delete it as this block branches to oneReturn
// block
var_types simdType = getSIMDTypeForSize(simdSize);
int assignmentsCount = simdSize / genTypeSize(baseType) - 1;
int remainingAssignments = assignmentsCount;
- Statement* curStmt = stmt->getNextStmt();
+ Statement* curStmt = stmt->GetNextStmt();
Statement* lastStmt = stmt;
while (curStmt != nullptr && remainingAssignments > 0)
prevRHS = curRHS;
lastStmt = curStmt;
- curStmt = curStmt->getNextStmt();
+ curStmt = curStmt->GetNextStmt();
}
if (remainingAssignments > 0)
for (int i = 0; i < assignmentsCount; i++)
{
- fgRemoveStmt(block, stmt->getNextStmt());
+ fgRemoveStmt(block, stmt->GetNextStmt());
}
GenTree* copyBlkDst = createAddressNodeForSIMDInit(originalLHS, simdSize);
{
while ((stmt != nullptr) && !stmt->IsNothingNode())
{
- stmt = stmt->gtNextStmt;
+ stmt = stmt->GetNextStmt();
}
return stmt;
}
// the call.
Statement* callStmt = fgMorphStmt;
- Statement* nextMorphStmt = callStmt->gtNextStmt;
+ Statement* nextMorphStmt = callStmt->GetNextStmt();
#if !defined(FEATURE_CORECLR) && defined(_TARGET_AMD64_)
// Legacy Jit64 Compat:
}
noway_assert(isSideEffectFree);
- nextMorphStmt = popStmt->gtNextStmt;
+ nextMorphStmt = popStmt->GetNextStmt();
}
// Next skip any GT_NOP nodes after the pop
GenTree* retExpr = retStmt->gtStmtExpr;
noway_assert(retExpr->gtOper == GT_RETURN);
- nextMorphStmt = retStmt->gtNextStmt;
+ nextMorphStmt = retStmt->GetNextStmt();
}
else
{
unsigned dstLclNum = moveExpr->gtGetOp1()->AsLclVarCommon()->gtLclNum;
callResultLclNumber = dstLclNum;
- nextMorphStmt = moveStmt->gtNextStmt;
+ nextMorphStmt = moveStmt->GetNextStmt();
}
if (nextMorphStmt != nullptr)
#endif
noway_assert(callResultLclNumber == treeWithLcl->AsLclVarCommon()->gtLclNum);
- nextMorphStmt = retStmt->gtNextStmt;
+ nextMorphStmt = retStmt->GetNextStmt();
}
}
}
#ifdef DEBUG
while (testStmt->gtNext != nullptr)
{
- testStmt = testStmt->getNextStmt();
+ testStmt = testStmt->GetNextStmt();
}
assert(testStmt == result);
// First: visit phi's. If "newVNForPhis", give them new VN's. If not,
// first check to see if all phi args have the same value.
- for (; (stmt != nullptr) && stmt->IsPhiDefnStmt(); stmt = stmt->getNextStmt())
+ for (; (stmt != nullptr) && stmt->IsPhiDefnStmt(); stmt = stmt->GetNextStmt())
{
GenTree* asg = stmt->gtStmtExpr;
assert(asg->OperIs(GT_ASG));
}
// Now iterate over the remaining statements, and their trees.
- for (; stmt != nullptr; stmt = stmt->getNextStmt())
+ for (; stmt != nullptr; stmt = stmt->GetNextStmt())
{
#ifdef DEBUG
if (verbose)