[PATCH] D36309: [LoopUnroll] Enable option to peel remainder loop
Sam Parker via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 7 08:39:41 PDT 2017
samparker added inline comments.
================
Comment at: lib/Transforms/Utils/LoopUnrollRuntime.cpp:894
+ if (remainderLoop && PeelRemainder)
+ peelLoop(remainderLoop, Count - 1, LI, SE, DT, AC, PreserveLCSSA);
+
----------------
efriedma wrote:
> I think I would write this using UnrollLoop: full unrolling will result in a slightly simpler CFG because the backedge goes away. (Granted, later optimizations will probably clean it up either way.)
That's not possible here though. As we only know the maximum trip count, we'll need to maintain comparisons for each iteration and convert the backedges to early exits.
https://reviews.llvm.org/D36309
More information about the llvm-commits
mailing list