Skip to content

Commit

Permalink
Remove unused Compiler::optFindLoopNumberFromBeginBlock() (#52786)
Browse files Browse the repository at this point in the history
  • Loading branch information
BruceForstall committed May 14, 2021
1 parent bfab3e1 commit 7225d59
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 25 deletions.
1 change: 0 additions & 1 deletion src/coreclr/jit/compiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -6497,7 +6497,6 @@ class Compiler
unsigned optLoopsCloned; // number of loops cloned in the current method.

#ifdef DEBUG
unsigned optFindLoopNumberFromBeginBlock(BasicBlock* begBlk);
void optPrintLoopInfo(unsigned loopNum,
BasicBlock* lpHead,
BasicBlock* lpFirst,
Expand Down
24 changes: 0 additions & 24 deletions src/coreclr/jit/optimizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -583,30 +583,6 @@ void Compiler::optUpdateLoopsBeforeRemoveBlock(BasicBlock* block, bool skipUnmar

#ifdef DEBUG

/*****************************************************************************
*
* Given the beginBlock of the loop, return the index of this loop
* to the loop table.
*/

unsigned Compiler::optFindLoopNumberFromBeginBlock(BasicBlock* begBlk)
{
unsigned lnum = 0;

for (lnum = 0; lnum < optLoopCount; lnum++)
{
if (optLoopTable[lnum].lpHead->bbNext == begBlk)
{
// Found the loop.
return lnum;
}
}

noway_assert(!"Loop number not found.");

return optLoopCount;
}

/*****************************************************************************
*
* Print loop info in an uniform way.
Expand Down

0 comments on commit 7225d59

Please sign in to comment.