Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit 9d999c5

Browse files
franksinankayaSergey Andreenko
authored andcommitted
find ./ -type f -exec sed -i -e 's/\<gtNextStmt\>/GetNextStmt()/g' {} \; (#26801)
* find ./ -type f -exec sed -i -e 's/\<gtNextStmt\>/getNextStmt()/g' {} \; * Capitalize attempt #2
1 parent d8b7989 commit 9d999c5

File tree

10 files changed

+43
-45
lines changed

10 files changed

+43
-45
lines changed

src/jit/assertionprop.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4999,7 +4999,7 @@ Statement* Compiler::optVNAssertionPropCurStmt(BasicBlock* block, Statement* stm
49994999

50005000
// Check if propagation removed statements starting from current stmt.
50015001
// If so, advance to the next good statement.
5002-
Statement* nextStmt = (prev == nullptr) ? block->firstStmt() : prev->getNextStmt();
5002+
Statement* nextStmt = (prev == nullptr) ? block->firstStmt() : prev->GetNextStmt();
50035003
return nextStmt;
50045004
}
50055005

@@ -5041,7 +5041,7 @@ void Compiler::optAssertionPropMain()
50415041
if (fgRemoveRestOfBlock)
50425042
{
50435043
fgRemoveStmt(block, stmt);
5044-
stmt = stmt->getNextStmt();
5044+
stmt = stmt->GetNextStmt();
50455045
continue;
50465046
}
50475047
else
@@ -5052,7 +5052,7 @@ void Compiler::optAssertionPropMain()
50525052
// Propagation resulted in removal of the remaining stmts, perform it.
50535053
if (fgRemoveRestOfBlock)
50545054
{
5055-
stmt = stmt->getNextStmt();
5055+
stmt = stmt->GetNextStmt();
50565056
continue;
50575057
}
50585058

@@ -5071,7 +5071,7 @@ void Compiler::optAssertionPropMain()
50715071
}
50725072

50735073
// Advance the iterator
5074-
stmt = stmt->getNextStmt();
5074+
stmt = stmt->GetNextStmt();
50755075
}
50765076
}
50775077

@@ -5144,7 +5144,7 @@ void Compiler::optAssertionPropMain()
51445144
if (fgRemoveRestOfBlock)
51455145
{
51465146
fgRemoveStmt(block, stmt);
5147-
stmt = stmt->getNextStmt();
5147+
stmt = stmt->GetNextStmt();
51485148
continue;
51495149
}
51505150

@@ -5199,8 +5199,8 @@ void Compiler::optAssertionPropMain()
51995199

52005200
// Check if propagation removed statements starting from current stmt.
52015201
// If so, advance to the next good statement.
5202-
Statement* nextStmt = (prevStmt == nullptr) ? block->firstStmt() : prevStmt->getNextStmt();
5203-
stmt = (stmt == nextStmt) ? stmt->getNextStmt() : nextStmt;
5202+
Statement* nextStmt = (prevStmt == nullptr) ? block->firstStmt() : prevStmt->GetNextStmt();
5203+
stmt = (stmt == nextStmt) ? stmt->GetNextStmt() : nextStmt;
52045204
}
52055205
optAssertionPropagatedCurrentStmt = false; // clear it back as we are done with stmts.
52065206
}

src/jit/block.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -834,7 +834,7 @@ Statement* BasicBlock::FirstNonPhiDef()
834834
while ((tree->OperGet() == GT_ASG && tree->gtOp.gtOp2->OperGet() == GT_PHI) ||
835835
(tree->OperGet() == GT_STORE_LCL_VAR && tree->gtOp.gtOp1->OperGet() == GT_PHI))
836836
{
837-
stmt = stmt->getNextStmt();
837+
stmt = stmt->GetNextStmt();
838838
if (stmt == nullptr)
839839
{
840840
return nullptr;
@@ -855,7 +855,7 @@ Statement* BasicBlock::FirstNonPhiDefOrCatchArgAsg()
855855
if ((tree->OperGet() == GT_ASG && tree->gtOp.gtOp2->OperGet() == GT_CATCH_ARG) ||
856856
(tree->OperGet() == GT_STORE_LCL_VAR && tree->gtOp.gtOp1->OperGet() == GT_CATCH_ARG))
857857
{
858-
stmt = stmt->getNextStmt();
858+
stmt = stmt->GetNextStmt();
859859
}
860860
return stmt;
861861
}

src/jit/compiler.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6860,7 +6860,7 @@ Compiler::NodeToIntMap* Compiler::FindReachableNodesInNodeTestData()
68606860

68616861
for (BasicBlock* block = fgFirstBB; block != nullptr; block = block->bbNext)
68626862
{
6863-
for (Statement* stmt = block->FirstNonPhiDef(); stmt != nullptr; stmt = stmt->getNextStmt())
6863+
for (Statement* stmt = block->FirstNonPhiDef(); stmt != nullptr; stmt = stmt->GetNextStmt())
68646864
{
68656865
for (GenTree* tree = stmt->gtStmtList; tree != nullptr; tree = tree->gtNext)
68666866
{

src/jit/earlyprop.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ void Compiler::optEarlyProp()
188188
for (Statement* stmt = block->firstStmt(); stmt != nullptr;)
189189
{
190190
// Preserve the next link before the propagation and morph.
191-
Statement* next = stmt->gtNextStmt;
191+
Statement* next = stmt->GetNextStmt();
192192

193193
compCurStmt = stmt;
194194

src/jit/flowgraph.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -625,7 +625,7 @@ void Compiler::fgInsertStmtAtEnd(BasicBlock* block, Statement* stmt)
625625
{
626626
// There is at least one statement already.
627627
Statement* lastStmt = firstStmt->getPrevStmt();
628-
noway_assert(lastStmt != nullptr && lastStmt->getNextStmt() == nullptr);
628+
noway_assert(lastStmt != nullptr && lastStmt->GetNextStmt() == nullptr);
629629

630630
// Append the statement after the last one.
631631
lastStmt->gtNext = stmt;
@@ -845,7 +845,7 @@ Statement* Compiler::fgInsertStmtListAfter(BasicBlock* block, Statement* stmtAft
845845
noway_assert(stmtLast);
846846
noway_assert(stmtLast->gtNext == nullptr);
847847

848-
Statement* stmtNext = stmtAfter->getNextStmt();
848+
Statement* stmtNext = stmtAfter->GetNextStmt();
849849

850850
if (stmtNext == nullptr)
851851
{
@@ -3909,7 +3909,7 @@ bool Compiler::fgCreateGCPoll(GCPollType pollType, BasicBlock* block)
39093909
//
39103910
// More formally, if control flow targets an instruction, that instruction must be the
39113911
// start of a new sequence point.
3912-
Statement* nextStmt = newStmt->getNextStmt();
3912+
Statement* nextStmt = newStmt->GetNextStmt();
39133913
if (nextStmt != nullptr)
39143914
{
39153915
// Is it possible for gtNext to be NULL?
@@ -3968,7 +3968,7 @@ bool Compiler::fgCreateGCPoll(GCPollType pollType, BasicBlock* block)
39683968
Statement* stmt = top->firstStmt();
39693969
while (stmt->gtNext)
39703970
{
3971-
stmt = stmt->gtNextStmt;
3971+
stmt = stmt->GetNextStmt();
39723972
}
39733973
fgRemoveStmt(top, stmt);
39743974
fgInsertStmtAtEnd(bottom, stmt);
@@ -9438,7 +9438,7 @@ BasicBlock* Compiler::fgSplitBlockAfterStatement(BasicBlock* curr, Statement* st
94389438

94399439
if (stmt != nullptr)
94409440
{
9441-
newBlock->bbStmtList = stmt->gtNextStmt;
9441+
newBlock->bbStmtList = stmt->GetNextStmt();
94429442
if (newBlock->bbStmtList != nullptr)
94439443
{
94449444
newBlock->bbStmtList->gtPrev = curr->bbStmtList->gtPrev;
@@ -10044,7 +10044,7 @@ void Compiler::fgRemoveStmt(BasicBlock* block, Statement* stmt)
1004410044
}
1004510045
else
1004610046
{
10047-
block->bbStmtList = firstStmt->gtNextStmt;
10047+
block->bbStmtList = firstStmt->GetNextStmt();
1004810048
block->bbStmtList->gtPrev = firstStmt->gtPrev;
1004910049
}
1005010050
}
@@ -22971,7 +22971,7 @@ void Compiler::fgInsertInlineeBlocks(InlineInfo* pInlineInfo)
2297122971
{
2297222972
do
2297322973
{
22974-
currentDumpStmt = currentDumpStmt->getNextStmt();
22974+
currentDumpStmt = currentDumpStmt->GetNextStmt();
2297522975

2297622976
printf("\n");
2297722977

@@ -23012,7 +23012,7 @@ void Compiler::fgInsertInlineeBlocks(InlineInfo* pInlineInfo)
2301223012
// Split statements between topBlock and bottomBlock.
2301323013
// First figure out bottomBlock_Begin
2301423014
Statement* bottomBlock_Begin;
23015-
bottomBlock_Begin = stmtAfter->gtNextStmt;
23015+
bottomBlock_Begin = stmtAfter->GetNextStmt();
2301623016

2301723017
if (topBlock->bbStmtList == nullptr)
2301823018
{
@@ -23245,7 +23245,7 @@ Statement* Compiler::fgInlinePrependStatements(InlineInfo* inlineInfo)
2324523245
BasicBlock* block = inlineInfo->iciBlock;
2324623246
Statement* callStmt = inlineInfo->iciStmt;
2324723247
IL_OFFSETX callILOffset = callStmt->gtStmtILoffsx;
23248-
Statement* postStmt = callStmt->gtNextStmt;
23248+
Statement* postStmt = callStmt->GetNextStmt();
2324923249
Statement* afterStmt = callStmt; // afterStmt is the place where the new statements should be inserted after.
2325023250
Statement* newStmt = nullptr;
2325123251
GenTreeCall* call = inlineInfo->iciCall->AsCall();
@@ -23601,7 +23601,7 @@ Statement* Compiler::fgInlinePrependStatements(InlineInfo* inlineInfo)
2360123601
// Update any newly added statements with the appropriate context.
2360223602
InlineContext* context = callStmt->gtInlineContext;
2360323603
assert(context != nullptr);
23604-
for (Statement* addedStmt = callStmt->gtNextStmt; addedStmt != postStmt; addedStmt = addedStmt->gtNextStmt)
23604+
for (Statement* addedStmt = callStmt->GetNextStmt(); addedStmt != postStmt; addedStmt = addedStmt->GetNextStmt())
2360523605
{
2360623606
assert(addedStmt->gtInlineContext == nullptr);
2360723607
addedStmt->gtInlineContext = context;

src/jit/gentree.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5149,16 +5149,14 @@ struct Statement
51495149
#endif
51505150

51515151
public:
5152-
__declspec(property(get = getNextStmt)) Statement* gtNextStmt;
5153-
51545152
__declspec(property(get = getPrevStmt)) Statement* gtPrevStmt;
51555153

51565154
Statement* gtNext;
51575155
Statement* gtPrev;
51585156

51595157
bool compilerAdded;
51605158

5161-
Statement* getNextStmt()
5159+
Statement* GetNextStmt()
51625160
{
51635161
if (gtNext == nullptr)
51645162
{

src/jit/importer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1505,7 +1505,7 @@ GenTree* Compiler::impGetStructAddr(GenTree* structVal,
15051505
else
15061506
{
15071507
// Insert after the oldLastStmt before the first inserted for op2.
1508-
beforeStmt = oldLastStmt->getNextStmt();
1508+
beforeStmt = oldLastStmt->GetNextStmt();
15091509
}
15101510

15111511
impInsertTreeBefore(structVal->gtOp.gtOp1, impCurStmtOffs, beforeStmt);

src/jit/morph.cpp

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7498,12 +7498,12 @@ GenTree* Compiler::fgMorphPotentialTailCall(GenTreeCall* call)
74987498
assert(treeWithCall == call);
74997499
}
75007500
#endif
7501-
Statement* nextMorphStmt = fgMorphStmt->gtNextStmt;
7501+
Statement* nextMorphStmt = fgMorphStmt->GetNextStmt();
75027502
// Remove all stmts after the call.
75037503
while (nextMorphStmt != nullptr)
75047504
{
75057505
Statement* stmtToRemove = nextMorphStmt;
7506-
nextMorphStmt = stmtToRemove->gtNextStmt;
7506+
nextMorphStmt = stmtToRemove->GetNextStmt();
75077507
fgRemoveStmt(compCurBB, stmtToRemove);
75087508
}
75097509

@@ -15468,7 +15468,7 @@ bool Compiler::fgMorphBlockStmt(BasicBlock* block, Statement* stmt DEBUGARG(cons
1546815468
}
1546915469

1547015470
// Or this is the last statement of a conditional branch that was just folded?
15471-
if (!removedStmt && (stmt->getNextStmt() == nullptr) && !fgRemoveRestOfBlock)
15471+
if (!removedStmt && (stmt->GetNextStmt() == nullptr) && !fgRemoveRestOfBlock)
1547215472
{
1547315473
if (fgFoldConditional(block))
1547415474
{
@@ -15551,7 +15551,7 @@ void Compiler::fgMorphStmts(BasicBlock* block, bool* lnot, bool* loadw)
1555115551

1555215552
Statement* stmt = block->firstStmt();
1555315553
GenTree* prev = nullptr;
15554-
for (; stmt != nullptr; prev = stmt->gtStmtExpr, stmt = stmt->gtNextStmt)
15554+
for (; stmt != nullptr; prev = stmt->gtStmtExpr, stmt = stmt->GetNextStmt())
1555515555
{
1555615556
if (fgRemoveRestOfBlock)
1555715557
{
@@ -15599,7 +15599,7 @@ void Compiler::fgMorphStmts(BasicBlock* block, bool* lnot, bool* loadw)
1559915599
morph = stmt->gtStmtExpr;
1560015600
noway_assert(compTailCallUsed);
1560115601
noway_assert((morph->gtOper == GT_CALL) && morph->AsCall()->IsTailCall());
15602-
noway_assert(stmt->gtNextStmt == nullptr);
15602+
noway_assert(stmt->GetNextStmt() == nullptr);
1560315603

1560415604
GenTreeCall* call = morph->AsCall();
1560515605
// Could either be
@@ -15623,7 +15623,7 @@ void Compiler::fgMorphStmts(BasicBlock* block, bool* lnot, bool* loadw)
1562315623

1562415624
noway_assert(compTailCallUsed);
1562515625
noway_assert((tree->gtOper == GT_CALL) && tree->AsCall()->IsTailCall());
15626-
noway_assert(stmt->gtNextStmt == nullptr);
15626+
noway_assert(stmt->GetNextStmt() == nullptr);
1562715627

1562815628
GenTreeCall* call = morph->AsCall();
1562915629

@@ -15886,7 +15886,7 @@ void Compiler::fgMorphBlocks()
1588615886

1588715887
// This block must be ending with a GT_RETURN
1588815888
noway_assert(lastStmt != nullptr);
15889-
noway_assert(lastStmt->getNextStmt() == nullptr);
15889+
noway_assert(lastStmt->GetNextStmt() == nullptr);
1589015890
noway_assert(ret != nullptr);
1589115891

1589215892
// GT_RETURN must have non-null operand as the method is returning the value assigned to
@@ -15923,7 +15923,7 @@ void Compiler::fgMorphBlocks()
1592315923
{
1592415924
// This block ends with a GT_RETURN
1592515925
noway_assert(lastStmt != nullptr);
15926-
noway_assert(lastStmt->getNextStmt() == nullptr);
15926+
noway_assert(lastStmt->GetNextStmt() == nullptr);
1592715927

1592815928
// Must be a void GT_RETURN with null operand; delete it as this block branches to oneReturn
1592915929
// block
@@ -18665,7 +18665,7 @@ bool Compiler::fgMorphCombineSIMDFieldAssignments(BasicBlock* block, Statement*
1866518665
var_types simdType = getSIMDTypeForSize(simdSize);
1866618666
int assignmentsCount = simdSize / genTypeSize(baseType) - 1;
1866718667
int remainingAssignments = assignmentsCount;
18668-
Statement* curStmt = stmt->getNextStmt();
18668+
Statement* curStmt = stmt->GetNextStmt();
1866918669
Statement* lastStmt = stmt;
1867018670

1867118671
while (curStmt != nullptr && remainingAssignments > 0)
@@ -18688,7 +18688,7 @@ bool Compiler::fgMorphCombineSIMDFieldAssignments(BasicBlock* block, Statement*
1868818688
prevRHS = curRHS;
1868918689

1869018690
lastStmt = curStmt;
18691-
curStmt = curStmt->getNextStmt();
18691+
curStmt = curStmt->GetNextStmt();
1869218692
}
1869318693

1869418694
if (remainingAssignments > 0)
@@ -18712,7 +18712,7 @@ bool Compiler::fgMorphCombineSIMDFieldAssignments(BasicBlock* block, Statement*
1871218712

1871318713
for (int i = 0; i < assignmentsCount; i++)
1871418714
{
18715-
fgRemoveStmt(block, stmt->getNextStmt());
18715+
fgRemoveStmt(block, stmt->GetNextStmt());
1871618716
}
1871718717

1871818718
GenTree* copyBlkDst = createAddressNodeForSIMDInit(originalLHS, simdSize);
@@ -18781,7 +18781,7 @@ Statement* SkipNopStmts(Statement* stmt)
1878118781
{
1878218782
while ((stmt != nullptr) && !stmt->IsNothingNode())
1878318783
{
18784-
stmt = stmt->gtNextStmt;
18784+
stmt = stmt->GetNextStmt();
1878518785
}
1878618786
return stmt;
1878718787
}
@@ -18806,7 +18806,7 @@ bool Compiler::fgCheckStmtAfterTailCall()
1880618806
// the call.
1880718807
Statement* callStmt = fgMorphStmt;
1880818808

18809-
Statement* nextMorphStmt = callStmt->gtNextStmt;
18809+
Statement* nextMorphStmt = callStmt->GetNextStmt();
1881018810

1881118811
#if !defined(FEATURE_CORECLR) && defined(_TARGET_AMD64_)
1881218812
// Legacy Jit64 Compat:
@@ -18848,7 +18848,7 @@ bool Compiler::fgCheckStmtAfterTailCall()
1884818848
}
1884918849
noway_assert(isSideEffectFree);
1885018850

18851-
nextMorphStmt = popStmt->gtNextStmt;
18851+
nextMorphStmt = popStmt->GetNextStmt();
1885218852
}
1885318853

1885418854
// Next skip any GT_NOP nodes after the pop
@@ -18871,7 +18871,7 @@ bool Compiler::fgCheckStmtAfterTailCall()
1887118871
GenTree* retExpr = retStmt->gtStmtExpr;
1887218872
noway_assert(retExpr->gtOper == GT_RETURN);
1887318873

18874-
nextMorphStmt = retStmt->gtNextStmt;
18874+
nextMorphStmt = retStmt->GetNextStmt();
1887518875
}
1887618876
else
1887718877
{
@@ -18893,7 +18893,7 @@ bool Compiler::fgCheckStmtAfterTailCall()
1889318893
unsigned dstLclNum = moveExpr->gtGetOp1()->AsLclVarCommon()->gtLclNum;
1889418894
callResultLclNumber = dstLclNum;
1889518895

18896-
nextMorphStmt = moveStmt->gtNextStmt;
18896+
nextMorphStmt = moveStmt->GetNextStmt();
1889718897
}
1889818898
if (nextMorphStmt != nullptr)
1889918899
#endif
@@ -18911,7 +18911,7 @@ bool Compiler::fgCheckStmtAfterTailCall()
1891118911

1891218912
noway_assert(callResultLclNumber == treeWithLcl->AsLclVarCommon()->gtLclNum);
1891318913

18914-
nextMorphStmt = retStmt->gtNextStmt;
18914+
nextMorphStmt = retStmt->GetNextStmt();
1891518915
}
1891618916
}
1891718917
}

src/jit/optimizer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4016,7 +4016,7 @@ static Statement* optFindLoopTermTest(BasicBlock* bottom)
40164016
#ifdef DEBUG
40174017
while (testStmt->gtNext != nullptr)
40184018
{
4019-
testStmt = testStmt->getNextStmt();
4019+
testStmt = testStmt->GetNextStmt();
40204020
}
40214021

40224022
assert(testStmt == result);

src/jit/valuenum.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5820,7 +5820,7 @@ void Compiler::fgValueNumberBlock(BasicBlock* blk)
58205820

58215821
// First: visit phi's. If "newVNForPhis", give them new VN's. If not,
58225822
// first check to see if all phi args have the same value.
5823-
for (; (stmt != nullptr) && stmt->IsPhiDefnStmt(); stmt = stmt->getNextStmt())
5823+
for (; (stmt != nullptr) && stmt->IsPhiDefnStmt(); stmt = stmt->GetNextStmt())
58245824
{
58255825
GenTree* asg = stmt->gtStmtExpr;
58265826
assert(asg->OperIs(GT_ASG));
@@ -5985,7 +5985,7 @@ void Compiler::fgValueNumberBlock(BasicBlock* blk)
59855985
}
59865986

59875987
// Now iterate over the remaining statements, and their trees.
5988-
for (; stmt != nullptr; stmt = stmt->getNextStmt())
5988+
for (; stmt != nullptr; stmt = stmt->GetNextStmt())
59895989
{
59905990
#ifdef DEBUG
59915991
if (verbose)

0 commit comments

Comments
 (0)