[PATCH] D36309: [LoopUnroll] Enable option to unroll remainder loop

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 8 11:01:40 PDT 2017

efriedma added reviewers: efriedma, anna, reames, mkuper, sanjoy, mzolotukhin.
efriedma added inline comments.

Comment at: lib/Transforms/Utils/LoopUnrollRuntime.cpp:896
+    UnrollLoop(remainderLoop, Count - 1, Count - 1, false, true, false, true,
+               false, 1, 0, false, LI, SE, DT, AC, ORE, PreserveLCSSA);
+  }
It's difficult to figure out what you're actually passing here; maybe include the parameter names in comments, like `UnrollLoop(remainderLoop, /*Count*/Count - 1, /*TripCount*/Count - 1, /*Force*/ false,` etc.

Comment at: test/Transforms/LoopUnroll/runtime-unroll-remainder.ll:1
+; RUN: opt < %s -S -loop-unroll -unroll-runtime=true -unroll-count=4 -unroll-remainder -simplifycfg -instcombine | FileCheck %s
I'd prefer to see the result without the simplifycfg run, to see what the generated IR actually looks like.


More information about the llvm-commits mailing list