@@ -15426,7 +15426,8 @@ inline void Compiler::impReimportMarkBlock(BasicBlock* block)
15426
15426
15427
15427
void Compiler::impReimportMarkSuccessors(BasicBlock* block)
15428
15428
{
15429
- for (unsigned i = 0; i < block->NumSucc(); i++)
15429
+ const unsigned numSuccs = block->NumSucc();
15430
+ for (unsigned i = 0; i < numSuccs; i++)
15430
15431
{
15431
15432
impReimportMarkBlock(block->GetSucc(i));
15432
15433
}
@@ -15601,7 +15602,8 @@ void Compiler::impImportBlock(BasicBlock* block)
15601
15602
JITDUMP("Marking BBF_INTERNAL block BB%02u as BBF_IMPORTED\n", block->bbNum);
15602
15603
block->bbFlags |= BBF_IMPORTED;
15603
15604
15604
- for (unsigned i = 0; i < block->NumSucc(); i++)
15605
+ const unsigned numSuccs = block->NumSucc();
15606
+ for (unsigned i = 0; i < numSuccs; i++)
15605
15607
{
15606
15608
impImportBlockPending(block->GetSucc(i));
15607
15609
}
@@ -16028,7 +16030,8 @@ void Compiler::impImportBlock(BasicBlock* block)
16028
16030
impReimportSpillClique(block);
16029
16031
16030
16032
// For blocks that haven't been imported yet, we still need to mark them as pending import.
16031
- for (unsigned i = 0; i < block->NumSucc(); i++)
16033
+ const unsigned numSuccs = block->NumSucc();
16034
+ for (unsigned i = 0; i < numSuccs; i++)
16032
16035
{
16033
16036
BasicBlock* succ = block->GetSucc(i);
16034
16037
if ((succ->bbFlags & BBF_IMPORTED) == 0)
@@ -16042,7 +16045,8 @@ void Compiler::impImportBlock(BasicBlock* block)
16042
16045
// otherwise just import the successors of block
16043
16046
16044
16047
/* Does this block jump to any other blocks? */
16045
- for (unsigned i = 0; i < block->NumSucc(); i++)
16048
+ const unsigned numSuccs = block->NumSucc();
16049
+ for (unsigned i = 0; i < numSuccs; i++)
16046
16050
{
16047
16051
impImportBlockPending(block->GetSucc(i));
16048
16052
}
@@ -16299,7 +16303,8 @@ void Compiler::impWalkSpillCliqueFromPred(BasicBlock* block, SpillCliqueWalker*
16299
16303
BasicBlock* blk = node->m_blk;
16300
16304
FreeBlockListNode(node);
16301
16305
16302
- for (unsigned succNum = 0; succNum < blk->NumSucc(); succNum++)
16306
+ const unsigned numSuccs = blk->NumSucc();
16307
+ for (unsigned succNum = 0; succNum < numSuccs; succNum++)
16303
16308
{
16304
16309
BasicBlock* succ = blk->GetSucc(succNum);
16305
16310
// If it's not already in the clique, add it, and also add it
0 commit comments