[PATCH] D60266: [LoopUnroll] Rotate loop, when optimizing for size and can fully unroll a loop.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 4 10:01:05 PDT 2019


fhahn marked an inline comment as done.
fhahn added inline comments.


================
Comment at: llvm/lib/Transforms/Scalar/LoopUnrollPass.cpp:1108
+
+    // Loops with indirectbr cannot be cloned.
+    if (!L->isSafeToClone())
----------------
paquette wrote:
> I feel like this comment doesn't really describe why you're avoiding loops that are unsafe to clone? Maybe a bit more detail here?
Having all of those checks here is a bit unfortunate, really, because they are basically taken as is from UnrollLoop, and the comments make more sense there IMO. I'll see if I can push the rotation logic into LoopUnroll, as an option. 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D60266





More information about the llvm-commits mailing list