@@ -15507,7 +15507,8 @@ inline void Compiler::impReimportMarkBlock(BasicBlock* block)
15507
15507
15508
15508
void Compiler::impReimportMarkSuccessors(BasicBlock* block)
15509
15509
{
15510
- for (unsigned i = 0; i < block->NumSucc(); i++)
15510
+ const unsigned numSuccs = block->NumSucc();
15511
+ for (unsigned i = 0; i < numSuccs; i++)
15511
15512
{
15512
15513
impReimportMarkBlock(block->GetSucc(i));
15513
15514
}
@@ -15682,7 +15683,8 @@ void Compiler::impImportBlock(BasicBlock* block)
15682
15683
JITDUMP("Marking BBF_INTERNAL block BB%02u as BBF_IMPORTED\n", block->bbNum);
15683
15684
block->bbFlags |= BBF_IMPORTED;
15684
15685
15685
- for (unsigned i = 0; i < block->NumSucc(); i++)
15686
+ const unsigned numSuccs = block->NumSucc();
15687
+ for (unsigned i = 0; i < numSuccs; i++)
15686
15688
{
15687
15689
impImportBlockPending(block->GetSucc(i));
15688
15690
}
@@ -16109,7 +16111,8 @@ void Compiler::impImportBlock(BasicBlock* block)
16109
16111
impReimportSpillClique(block);
16110
16112
16111
16113
// For blocks that haven't been imported yet, we still need to mark them as pending import.
16112
- for (unsigned i = 0; i < block->NumSucc(); i++)
16114
+ const unsigned numSuccs = block->NumSucc();
16115
+ for (unsigned i = 0; i < numSuccs; i++)
16113
16116
{
16114
16117
BasicBlock* succ = block->GetSucc(i);
16115
16118
if ((succ->bbFlags & BBF_IMPORTED) == 0)
@@ -16123,7 +16126,8 @@ void Compiler::impImportBlock(BasicBlock* block)
16123
16126
// otherwise just import the successors of block
16124
16127
16125
16128
/* Does this block jump to any other blocks? */
16126
- for (unsigned i = 0; i < block->NumSucc(); i++)
16129
+ const unsigned numSuccs = block->NumSucc();
16130
+ for (unsigned i = 0; i < numSuccs; i++)
16127
16131
{
16128
16132
impImportBlockPending(block->GetSucc(i));
16129
16133
}
@@ -16380,7 +16384,8 @@ void Compiler::impWalkSpillCliqueFromPred(BasicBlock* block, SpillCliqueWalker*
16380
16384
BasicBlock* blk = node->m_blk;
16381
16385
FreeBlockListNode(node);
16382
16386
16383
- for (unsigned succNum = 0; succNum < blk->NumSucc(); succNum++)
16387
+ const unsigned numSuccs = blk->NumSucc();
16388
+ for (unsigned succNum = 0; succNum < numSuccs; succNum++)
16384
16389
{
16385
16390
BasicBlock* succ = blk->GetSucc(succNum);
16386
16391
// If it's not already in the clique, add it, and also add it
0 commit comments