[PATCH] D28897: [PM] Simplify the new PM interface to the loop unroller and expose two factory functions for the two modes the loop unroller is actually used in in-tree: simplified full-unrolling and the entire thing including partial unrolling.

Chandler Carruth via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 23 19:38:44 PST 2017


chandlerc added inline comments.


================
Comment at: include/llvm/Transforms/Scalar/LoopUnrollPass.h:25-31
+public:
+  static LoopUnrollPass createSimple() {
+    return LoopUnrollPass(/*AllowPartialUnrolling*/ false);
+  }
+  static LoopUnrollPass create() {
+    return LoopUnrollPass(/*AllowPartialUnrolling*/ false);
+  }
----------------
davide wrote:
> Is it intended that you're passing `false` to both `create()` and `createSimple()` ?
> Shouldn't `create()` allow the entire thing, including partial unrolling? Here you don't enable it at all.
Ahem. Indeed, that was not intended. More tests are also in order here!

(This isn't heavily used yet, so it isn't that surprising that i've missed a test for this.)


https://reviews.llvm.org/D28897





More information about the llvm-commits mailing list