[PATCH] D25963: [LoopUnroll] Implement profile-based loop peeling

Michael Kuperstein via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 11 11:30:33 PST 2017


mkuper added inline comments.


================
Comment at: llvm/trunk/lib/Transforms/Utils/LoopUnrollPeel.cpp:357
+    else
+      BackEdgeWeight = 1;
+
----------------
trentxintong wrote:
> @mkuper any particular reasons why the backedge weight has to be 1 instead of 0 ?
There was some concern (on IRC, I don't remember who expressed it, unfortunately) that other things that look at profile information will not be happy with 0 weights, since clang doesn't normally generate them (the whole "Laplace's Rule of Succession" adjustment).

I haven't actually tested it, but it didn't seem like it should matter much - if we get here, the distribution isn't that realistic to begin with. So I preferred to play it safe. 


Repository:
  rL LLVM

https://reviews.llvm.org/D25963





More information about the llvm-commits mailing list