[PATCH] D83187: [LoopUnroll] Update branch weight for remainder loop
Hongtao Yu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 15 11:35:54 PDT 2020
hoyFB marked 3 inline comments as done.
hoyFB added inline comments.
================
Comment at: llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp:521
+ : TrueWeight;
+ uint64_t BackEdgeWeight = (UnrollFactor - 1) * ExitWeight;
+ BasicBlock *Header = RemainderLoop->getHeader();
----------------
asbirlea wrote:
> Nit: not sure if possible: is it correct if `UnrollFactor = 1` to set `BackEdgeWeight = 0`?
Good point. `UnrollFactor` should never be one since it means the loop is not being unrolled. I put an assert for that.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D83187/new/
https://reviews.llvm.org/D83187
More information about the llvm-commits
mailing list