[PATCH] D12474: [LV] Factor the creation of the loop induction variable out of createEmptyLoop()

James Molloy via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 31 10:11:10 PDT 2015


jmolloy added a comment.

Hi Michael,

Thankyou so much for reviewing my mountain of code reviews :)

Patch updated. I've also taken your advice on other commits and checked all code changes for each commit - there's nothing unexpected in any of them.

Cheers,

James


================
Comment at: lib/Transforms/Vectorize/LoopVectorize.cpp:2572
@@ +2571,3 @@
+                                                      Value *Step,
+                                                      Instruction *DL) {
+  BasicBlock *Header = L->getHeader();
----------------
mzolotukhin wrote:
> `DL` seems to be unused. And it's not clear from the name, what it stands for. Should it be used instead of `OldInduction` in `setDebugLocFromInst`?
Good catch, thanks! Updated.

================
Comment at: lib/Transforms/Vectorize/LoopVectorize.cpp:2589
@@ +2588,3 @@
+  Induction->addIncoming(Start, L->getLoopPreheader());
+  Induction->addIncoming(Next, Header);
+  // Create the compare.
----------------
mzolotukhin wrote:
> Should `Latch` be used instead of `Header` here?
I don't think so - Induction is in the latch and needs to branch back to the header.


Repository:
  rL LLVM

http://reviews.llvm.org/D12474





More information about the llvm-commits mailing list