[PATCH] D63917: [LoopPeel] Re-factor llvm::peelLoop method. NFC.
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 28 10:43:57 PDT 2019
fhahn added a comment.
LGTM, just 2 small nits.
================
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,
----------------
Using weight in the description for ExitWeight and # of times for CurHeaderWeigth seems inconsistent? (Also in some comments)
================
Comment at: lib/Transforms/Utils/LoopUnrollPeel.cpp:397
+ return;
+ unsigned HeaderIdx = (LatchBR->getSuccessor(0) == Header ? 0 : 1);
+ ExitWeight = HeaderIdx ? TrueWeight : FalseWeight;
----------------
nit: no brackets required?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D63917/new/
https://reviews.llvm.org/D63917
More information about the llvm-commits
mailing list