[PATCH] D63917: [LoopPeel] Re-factor llvm::peelLoop method. NFC.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 3 04:55:48 PDT 2019


fhahn added inline comments.


================
Comment at: lib/Transforms/Utils/LoopUnrollPeel.cpp:390
+/// \param[out] ExitWeight The weight of the edge from Latch to Exit block.
+/// \param[out] CurHeaderWeight The # of time the header is executed.
+static void initBranchWeights(BasicBlock *Header, BranchInst *LatchBR,
----------------
skatkov wrote:
> fhahn wrote:
> > Using weight in the description for ExitWeight and # of times for CurHeaderWeigth seems inconsistent? (Also in some comments)
> Could you please elaborate a bit on this comment?
> I did not change anything in the semantic, just moved the code in a separate functions.
> 
> So the weights still make sense...
Yep, it was = a small thing. I just found it a bit inconsistent that ExitWeight and CurHeaderWeight are described differently. I think something like `\param[out] ExitWeight The number of times the edge from Latch to Exit block is executed (or taken)` would be more consistent with the description for CurHeaderWeight.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D63917/new/

https://reviews.llvm.org/D63917





More information about the llvm-commits mailing list