diff --git a/src/jit/assertionprop.cpp b/src/jit/assertionprop.cpp index a04d5678e867..d807e9f2b69d 100644 --- a/src/jit/assertionprop.cpp +++ b/src/jit/assertionprop.cpp @@ -4999,7 +4999,7 @@ Statement* Compiler::optVNAssertionPropCurStmt(BasicBlock* block, Statement* stm // 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; } @@ -5041,7 +5041,7 @@ void Compiler::optAssertionPropMain() if (fgRemoveRestOfBlock) { fgRemoveStmt(block, stmt); - stmt = stmt->getNextStmt(); + stmt = stmt->GetNextStmt(); continue; } else @@ -5052,7 +5052,7 @@ void Compiler::optAssertionPropMain() // Propagation resulted in removal of the remaining stmts, perform it. if (fgRemoveRestOfBlock) { - stmt = stmt->getNextStmt(); + stmt = stmt->GetNextStmt(); continue; } @@ -5071,7 +5071,7 @@ void Compiler::optAssertionPropMain() } // Advance the iterator - stmt = stmt->getNextStmt(); + stmt = stmt->GetNextStmt(); } } @@ -5144,7 +5144,7 @@ void Compiler::optAssertionPropMain() if (fgRemoveRestOfBlock) { fgRemoveStmt(block, stmt); - stmt = stmt->getNextStmt(); + stmt = stmt->GetNextStmt(); continue; } @@ -5199,8 +5199,8 @@ void Compiler::optAssertionPropMain() // 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. } diff --git a/src/jit/block.cpp b/src/jit/block.cpp index 85e60eaf7d6d..f5efda47331e 100644 --- a/src/jit/block.cpp +++ b/src/jit/block.cpp @@ -834,7 +834,7 @@ Statement* BasicBlock::FirstNonPhiDef() 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; @@ -855,7 +855,7 @@ Statement* BasicBlock::FirstNonPhiDefOrCatchArgAsg() 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; } diff --git a/src/jit/compiler.cpp b/src/jit/compiler.cpp index cb786e3feb06..199b40316c93 100644 --- a/src/jit/compiler.cpp +++ b/src/jit/compiler.cpp @@ -6860,7 +6860,7 @@ Compiler::NodeToIntMap* Compiler::FindReachableNodesInNodeTestData() 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) { diff --git a/src/jit/earlyprop.cpp b/src/jit/earlyprop.cpp index 1bc92bd56468..a0832f59aa22 100644 --- a/src/jit/earlyprop.cpp +++ b/src/jit/earlyprop.cpp @@ -188,7 +188,7 @@ void Compiler::optEarlyProp() 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; diff --git a/src/jit/flowgraph.cpp b/src/jit/flowgraph.cpp index c476ab7e20ea..c759e4ed99b1 100644 --- a/src/jit/flowgraph.cpp +++ b/src/jit/flowgraph.cpp @@ -625,7 +625,7 @@ void Compiler::fgInsertStmtAtEnd(BasicBlock* block, Statement* 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; @@ -845,7 +845,7 @@ Statement* Compiler::fgInsertStmtListAfter(BasicBlock* block, Statement* stmtAft noway_assert(stmtLast); noway_assert(stmtLast->gtNext == nullptr); - Statement* stmtNext = stmtAfter->getNextStmt(); + Statement* stmtNext = stmtAfter->GetNextStmt(); if (stmtNext == nullptr) { @@ -3909,7 +3909,7 @@ bool Compiler::fgCreateGCPoll(GCPollType pollType, BasicBlock* block) // // 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? @@ -3968,7 +3968,7 @@ bool Compiler::fgCreateGCPoll(GCPollType pollType, BasicBlock* block) Statement* stmt = top->firstStmt(); while (stmt->gtNext) { - stmt = stmt->gtNextStmt; + stmt = stmt->GetNextStmt(); } fgRemoveStmt(top, stmt); fgInsertStmtAtEnd(bottom, stmt); @@ -9438,7 +9438,7 @@ BasicBlock* Compiler::fgSplitBlockAfterStatement(BasicBlock* curr, Statement* st if (stmt != nullptr) { - newBlock->bbStmtList = stmt->gtNextStmt; + newBlock->bbStmtList = stmt->GetNextStmt(); if (newBlock->bbStmtList != nullptr) { newBlock->bbStmtList->gtPrev = curr->bbStmtList->gtPrev; @@ -10044,7 +10044,7 @@ void Compiler::fgRemoveStmt(BasicBlock* block, Statement* stmt) } else { - block->bbStmtList = firstStmt->gtNextStmt; + block->bbStmtList = firstStmt->GetNextStmt(); block->bbStmtList->gtPrev = firstStmt->gtPrev; } } @@ -22971,7 +22971,7 @@ void Compiler::fgInsertInlineeBlocks(InlineInfo* pInlineInfo) { do { - currentDumpStmt = currentDumpStmt->getNextStmt(); + currentDumpStmt = currentDumpStmt->GetNextStmt(); printf("\n"); @@ -23012,7 +23012,7 @@ void Compiler::fgInsertInlineeBlocks(InlineInfo* pInlineInfo) // 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) { @@ -23245,7 +23245,7 @@ Statement* Compiler::fgInlinePrependStatements(InlineInfo* inlineInfo) 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(); @@ -23601,7 +23601,7 @@ Statement* Compiler::fgInlinePrependStatements(InlineInfo* inlineInfo) // 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; diff --git a/src/jit/gentree.h b/src/jit/gentree.h index d7c3858ae573..f6d61f400e15 100644 --- a/src/jit/gentree.h +++ b/src/jit/gentree.h @@ -5149,8 +5149,6 @@ struct Statement #endif public: - __declspec(property(get = getNextStmt)) Statement* gtNextStmt; - __declspec(property(get = getPrevStmt)) Statement* gtPrevStmt; Statement* gtNext; @@ -5158,7 +5156,7 @@ struct Statement bool compilerAdded; - Statement* getNextStmt() + Statement* GetNextStmt() { if (gtNext == nullptr) { diff --git a/src/jit/importer.cpp b/src/jit/importer.cpp index eaacc8556eb1..17a6782b08cc 100644 --- a/src/jit/importer.cpp +++ b/src/jit/importer.cpp @@ -1505,7 +1505,7 @@ GenTree* Compiler::impGetStructAddr(GenTree* structVal, else { // Insert after the oldLastStmt before the first inserted for op2. - beforeStmt = oldLastStmt->getNextStmt(); + beforeStmt = oldLastStmt->GetNextStmt(); } impInsertTreeBefore(structVal->gtOp.gtOp1, impCurStmtOffs, beforeStmt); diff --git a/src/jit/morph.cpp b/src/jit/morph.cpp index caa5a6eedda0..a39e1603b19f 100644 --- a/src/jit/morph.cpp +++ b/src/jit/morph.cpp @@ -7596,12 +7596,12 @@ GenTree* Compiler::fgMorphPotentialTailCall(GenTreeCall* call) 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); } @@ -15566,7 +15566,7 @@ bool Compiler::fgMorphBlockStmt(BasicBlock* block, Statement* stmt DEBUGARG(cons } // 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)) { @@ -15649,7 +15649,7 @@ void Compiler::fgMorphStmts(BasicBlock* block, bool* lnot, bool* loadw) 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) { @@ -15697,7 +15697,7 @@ void Compiler::fgMorphStmts(BasicBlock* block, bool* lnot, bool* loadw) 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 @@ -15721,7 +15721,7 @@ void Compiler::fgMorphStmts(BasicBlock* block, bool* lnot, bool* loadw) 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(); @@ -15984,7 +15984,7 @@ void Compiler::fgMorphBlocks() // 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 @@ -16021,7 +16021,7 @@ void Compiler::fgMorphBlocks() { // 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 @@ -18763,7 +18763,7 @@ bool Compiler::fgMorphCombineSIMDFieldAssignments(BasicBlock* block, Statement* 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) @@ -18786,7 +18786,7 @@ bool Compiler::fgMorphCombineSIMDFieldAssignments(BasicBlock* block, Statement* prevRHS = curRHS; lastStmt = curStmt; - curStmt = curStmt->getNextStmt(); + curStmt = curStmt->GetNextStmt(); } if (remainingAssignments > 0) @@ -18810,7 +18810,7 @@ bool Compiler::fgMorphCombineSIMDFieldAssignments(BasicBlock* block, Statement* for (int i = 0; i < assignmentsCount; i++) { - fgRemoveStmt(block, stmt->getNextStmt()); + fgRemoveStmt(block, stmt->GetNextStmt()); } GenTree* copyBlkDst = createAddressNodeForSIMDInit(originalLHS, simdSize); @@ -18879,7 +18879,7 @@ Statement* SkipNopStmts(Statement* stmt) { while ((stmt != nullptr) && !stmt->IsNothingNode()) { - stmt = stmt->gtNextStmt; + stmt = stmt->GetNextStmt(); } return stmt; } @@ -18904,7 +18904,7 @@ bool Compiler::fgCheckStmtAfterTailCall() // the call. Statement* callStmt = fgMorphStmt; - Statement* nextMorphStmt = callStmt->gtNextStmt; + Statement* nextMorphStmt = callStmt->GetNextStmt(); #if !defined(FEATURE_CORECLR) && defined(_TARGET_AMD64_) // Legacy Jit64 Compat: @@ -18946,7 +18946,7 @@ bool Compiler::fgCheckStmtAfterTailCall() } noway_assert(isSideEffectFree); - nextMorphStmt = popStmt->gtNextStmt; + nextMorphStmt = popStmt->GetNextStmt(); } // Next skip any GT_NOP nodes after the pop @@ -18969,7 +18969,7 @@ bool Compiler::fgCheckStmtAfterTailCall() GenTree* retExpr = retStmt->gtStmtExpr; noway_assert(retExpr->gtOper == GT_RETURN); - nextMorphStmt = retStmt->gtNextStmt; + nextMorphStmt = retStmt->GetNextStmt(); } else { @@ -18991,7 +18991,7 @@ bool Compiler::fgCheckStmtAfterTailCall() unsigned dstLclNum = moveExpr->gtGetOp1()->AsLclVarCommon()->gtLclNum; callResultLclNumber = dstLclNum; - nextMorphStmt = moveStmt->gtNextStmt; + nextMorphStmt = moveStmt->GetNextStmt(); } if (nextMorphStmt != nullptr) #endif @@ -19009,7 +19009,7 @@ bool Compiler::fgCheckStmtAfterTailCall() noway_assert(callResultLclNumber == treeWithLcl->AsLclVarCommon()->gtLclNum); - nextMorphStmt = retStmt->gtNextStmt; + nextMorphStmt = retStmt->GetNextStmt(); } } } diff --git a/src/jit/optimizer.cpp b/src/jit/optimizer.cpp index b63c454d6cea..31dce34514fa 100644 --- a/src/jit/optimizer.cpp +++ b/src/jit/optimizer.cpp @@ -4016,7 +4016,7 @@ static Statement* optFindLoopTermTest(BasicBlock* bottom) #ifdef DEBUG while (testStmt->gtNext != nullptr) { - testStmt = testStmt->getNextStmt(); + testStmt = testStmt->GetNextStmt(); } assert(testStmt == result); diff --git a/src/jit/valuenum.cpp b/src/jit/valuenum.cpp index 05e9d249d0b2..30b238f2dc05 100644 --- a/src/jit/valuenum.cpp +++ b/src/jit/valuenum.cpp @@ -5820,7 +5820,7 @@ void Compiler::fgValueNumberBlock(BasicBlock* blk) // 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)); @@ -5985,7 +5985,7 @@ void Compiler::fgValueNumberBlock(BasicBlock* blk) } // 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)