From: Kazu Hirata Date: Fri, 16 Sep 2022 16:32:02 +0000 (-0700) Subject: [ModuleInliner] Remove a redundaunt variable (NFC) X-Git-Tag: upstream/17.0.6~33332 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=42a90e6017b04f218a398b46c331fb5a8336433d;p=platform%2Fupstream%2Fllvm.git [ModuleInliner] Remove a redundaunt variable (NFC) In the CGSCC inliner, DidInline was used as an indicator to update the call graph. In the module inliner, DidInline is always true at the end of the "while" loop, so can just drop it. --- diff --git a/llvm/lib/Transforms/IPO/ModuleInliner.cpp b/llvm/lib/Transforms/IPO/ModuleInliner.cpp index 15d6687..8ae9bc3 100644 --- a/llvm/lib/Transforms/IPO/ModuleInliner.cpp +++ b/llvm/lib/Transforms/IPO/ModuleInliner.cpp @@ -212,7 +212,6 @@ PreservedAnalyses ModuleInlinerPass::run(Module &M, // Now process as many calls as we have within this caller in the sequence. // We bail out as soon as the caller has to change so we can // prepare the context of that new caller. - bool DidInline = false; auto P = Calls->pop(); CallBase *CB = P.first; const int InlineHistoryID = P.second; @@ -245,7 +244,6 @@ PreservedAnalyses ModuleInlinerPass::run(Module &M, continue; } - DidInline = true; ++NumInlined; LLVM_DEBUG(dbgs() << " Size after inlining: " << F.getInstructionCount() @@ -305,8 +303,6 @@ PreservedAnalyses ModuleInlinerPass::run(Module &M, else Advice->recordInlining(); - if (!DidInline) - continue; Changed = true; }