From: Serguei Katkov Date: Thu, 4 Jul 2019 05:10:14 +0000 (+0000) Subject: [LoopPeel] Some small comment update. NFC. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e814b8e666ee3421bfb9af6d4cbcb4e98d17668c;p=llvm [LoopPeel] Some small comment update. NFC. Follow-up change of comment after https://reviews.llvm.org/D63917 is landed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@365107 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/Utils/LoopUnrollPeel.cpp b/lib/Transforms/Utils/LoopUnrollPeel.cpp index dcd059da858..157e8e7c1d7 100644 --- a/lib/Transforms/Utils/LoopUnrollPeel.cpp +++ b/lib/Transforms/Utils/LoopUnrollPeel.cpp @@ -386,8 +386,8 @@ static void updateBranchWeights(BasicBlock *Header, BranchInst *LatchBR, /// \param Header The header block. /// \param LatchBR The latch branch. /// \param AvgIters The average number of iterations we expect the loop to have. -/// \param[out] ExitWeight The weight of the edge from Latch to Exit block. -/// \param[out] CurHeaderWeight The # of time the header is executed. +/// \param[out] ExitWeight The # of times the edge from Latch to Exit is taken. +/// \param[out] CurHeaderWeight The # of times the header is executed. static void initBranchWeights(BasicBlock *Header, BranchInst *LatchBR, unsigned AvgIters, uint64_t &ExitWeight, uint64_t &CurHeaderWeight) { @@ -397,7 +397,7 @@ static void initBranchWeights(BasicBlock *Header, BranchInst *LatchBR, unsigned HeaderIdx = LatchBR->getSuccessor(0) == Header ? 0 : 1; ExitWeight = HeaderIdx ? TrueWeight : FalseWeight; // The # of times the loop body executes is the sum of the exit block - // weight and the # of times the backedges are taken. + // is taken and the # of times the backedges are taken. CurHeaderWeight = TrueWeight + FalseWeight; }