[PATCH] D67594: [LoopUnroll] Use LoopSize+1 as threshold, to allow unrolling loops matching LoopSize.

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Sep 15 13:29:51 PDT 2019


dmgreen added a comment.

So we unroll the loop if the sizes are equal too? Sounds sensible to me.



================
Comment at: llvm/lib/Transforms/Scalar/LoopUnrollPass.cpp:1036
   // When optimizing for size, use LoopSize as threshold, to (fully) unroll
   // loops, if it does not increase code size.
   if (OptForSize)
----------------
Can you update this comment with why it's +1.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D67594





More information about the llvm-commits mailing list