[PATCH] D15690: Gather and Scatter intrinsics in the Loop Vectorizer

Nadav Rotem via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 28 09:11:33 PST 2016


nadav added inline comments.

================
Comment at: ../lib/Transforms/Vectorize/LoopVectorize.cpp:2506
@@ -2457,3 +2505,3 @@
     for (unsigned Part = 0; Part < UF; ++Part) {
-      // Calculate the pointer for the specific unroll-part.
-      Value *PartPtr =
+      Instruction *NewSI;
+      if (CreateGatherScatter) {
----------------
Please initialize to null. 

================
Comment at: ../lib/Transforms/Vectorize/LoopVectorize.cpp:2556
@@ -2502,1 +2555,3 @@
+      // Calculate the pointer for the specific unroll-part.
+      Value *PartPtr = Builder.CreateGEP(nullptr, Ptr, Builder.getInt32(Part * VF));
 
----------------
Please don't clean the code as part of this change. It makes it more difficult to review the code. 

================
Comment at: ../lib/Transforms/Vectorize/LoopVectorize.cpp:5334
@@ +5333,3 @@
+/// It is possible when gather/scatter is supported by target.
+static bool isGatherOrScatterLegal(Instruction *I, Value *Ptr,
+                                   LoopVectorizationLegality *Legal) {
----------------
Please use Doxygen style comment and document each of the arguments with \p. 

================
Comment at: ../unittests/Support/AlignOfTest.cpp:93
@@ -92,3 +92,3 @@
 struct Abstract1 {
-  virtual ~Abstract1() = default;
   virtual void method() = 0;
----------------
Why is this change needed?


Repository:
  rL LLVM

http://reviews.llvm.org/D15690





More information about the llvm-commits mailing list