[PATCH] D24203: [LoopUnroll] Properly update loop-info when cloning prologues and epilogues.
Evgeny Stupachenko via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 7 15:28:03 PDT 2016
evstupac added a comment.
Hi Michael,
The fix is good. I have some suggestions in inline comments.
Thanks,
Evgeny
================
Comment at: lib/Transforms/Utils/LoopUnrollRuntime.cpp:306
@@ +305,3 @@
+ // Figure out which loop NewBB is in.
+ const Loop *OldLoop = LI->getLoopFor(*BB);
+ Loop *&NewLoop = NewLoops[OldLoop];
----------------
Since
line 632: LoopBlocksDFS LoopBlocks(L);
Is there a case when LI->getLoopFor(*BB) is not L?
================
Comment at: lib/Transforms/Utils/LoopUnrollRuntime.cpp:309
@@ +308,3 @@
+ if (!NewLoop) {
+ if (CreateRemainderLoop || OldLoop != L) {
+ // This is a first block belonging to OldLoop encountered in our RPO
----------------
Should be simplified to just:
if (CreateRemainderLoop) {
https://reviews.llvm.org/D24203
More information about the llvm-commits
mailing list