From 2ab004d8455bfd8152c384f80da32d6aabb402f2 Mon Sep 17 00:00:00 2001 From: Bruce Forstall Date: Fri, 14 May 2021 12:22:07 -0700 Subject: [PATCH] Remove unused Compiler::optFindLoopNumberFromBeginBlock() --- src/coreclr/jit/compiler.h | 1 - src/coreclr/jit/optimizer.cpp | 24 ------------------------ 2 files changed, 25 deletions(-) diff --git a/src/coreclr/jit/compiler.h b/src/coreclr/jit/compiler.h index b69ae916c5d683..f16b7158a4d044 100644 --- a/src/coreclr/jit/compiler.h +++ b/src/coreclr/jit/compiler.h @@ -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, diff --git a/src/coreclr/jit/optimizer.cpp b/src/coreclr/jit/optimizer.cpp index cc324bfd8cf349..c0f3d7b48fcecf 100644 --- a/src/coreclr/jit/optimizer.cpp +++ b/src/coreclr/jit/optimizer.cpp @@ -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.