[PATCH] D18158: Adding ability to unroll loops using epilogue remainder.
Z. Zheng via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 1 15:45:07 PDT 2016
zzheng added a comment.
I've seen 'unrolling loop' in comments, personally I prefer 'unrolled loop' for clarity.
================
Comment at: lib/Transforms/Utils/LoopUnroll.cpp:297
@@ -292,2 +296,3 @@
+ // Don't output the runtime loop remainder if Count is a multiple of
// TripMultiple. Such a prolog is never needed, and is unsafe if the loop
// contains a convergent instruction.
----------------
'prolog'?
I recommend changing prolog/remainder here to 'leftover'
================
Comment at: lib/Transforms/Utils/LoopUnrollRuntime.cpp:146
@@ +145,3 @@
+/// - Update PHI nodes at the unrolling loop exit and epilog loop exit
+/// - Create PHI nodes at the unrolling loop exit to combine
+/// values that exit the unrolling loop code and jump around it.
----------------
You mean 'unrolled loop', right?
================
Comment at: lib/Transforms/Utils/LoopUnrollRuntime.cpp:191
@@ +190,3 @@
+ // NewExit was spilt 1 more time to get EpilogPreHeader.
+ assert(PN->hasOneUse() && "The phi should have 1 use");
+ PHINode *EpilogPN = cast<PHINode> (PN->use_begin()->getUser());
----------------
PN shoudl have 2 uses, right? One in epilogue loop or its preheader and one in Exit.
Please clarify it only has 1 use for now as we'll add the use in epilogue later.
http://reviews.llvm.org/D18158
More information about the llvm-commits
mailing list