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

Michael Zolotukhin via llvm-commits llvm-commits at lists.llvm.org
Sun Aug 30 13:31:19 PDT 2015


mzolotukhin added a comment.

Hi James,

Thanks for your efforts in cleaning this up. In general, LGTM, with a few remarks inline:


================
Comment at: lib/Transforms/Vectorize/LoopVectorize.cpp:2572
@@ +2571,3 @@
+                                                      Value *Step,
+                                                      Instruction *DL) {
+  BasicBlock *Header = L->getHeader();
----------------
`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`?

================
Comment at: lib/Transforms/Vectorize/LoopVectorize.cpp:2589
@@ +2588,3 @@
+  Induction->addIncoming(Start, L->getLoopPreheader());
+  Induction->addIncoming(Next, Header);
+  // Create the compare.
----------------
Should `Latch` be used instead of `Header` here?


Repository:
  rL LLVM

http://reviews.llvm.org/D12474





More information about the llvm-commits mailing list