[PATCH] D60897: [SLP] Look-ahead operand reordering heuristic.

Alexey Bataev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 29 14:45:46 PDT 2019


ABataev added a comment.

Tests?



================
Comment at: lib/Transforms/Vectorize/SLPVectorizer.cpp:756
+    static int getShallowScore(Value *V1, Value *V2, const DataLayout &DL,
+                              ScalarEvolution &SE) {
+      LoadInst *LI1 = dyn_cast<LoadInst>(V1);
----------------
Seems to me, the code is not formatted


================
Comment at: lib/Transforms/Vectorize/SLPVectorizer.cpp:757
+                              ScalarEvolution &SE) {
+      LoadInst *LI1 = dyn_cast<LoadInst>(V1);
+      LoadInst *LI2 = dyn_cast<LoadInst>(V2);
----------------
`auto *`


================
Comment at: lib/Transforms/Vectorize/SLPVectorizer.cpp:758
+      LoadInst *LI1 = dyn_cast<LoadInst>(V1);
+      LoadInst *LI2 = dyn_cast<LoadInst>(V2);
+      if (LI1 && LI2)
----------------
`auto *`


================
Comment at: lib/Transforms/Vectorize/SLPVectorizer.cpp:764
+
+      Constant *C1 = dyn_cast<Constant>(V1);
+      Constant *C2 = dyn_cast<Constant>(V2);
----------------
`auto *`


================
Comment at: lib/Transforms/Vectorize/SLPVectorizer.cpp:765
+      Constant *C1 = dyn_cast<Constant>(V1);
+      Constant *C2 = dyn_cast<Constant>(V2);
+      if (C1 && C2)
----------------
`auto *`


================
Comment at: lib/Transforms/Vectorize/SLPVectorizer.cpp:769
+
+      Instruction *I1 = dyn_cast<Instruction>(V1);
+      Instruction *I2 = dyn_cast<Instruction>(V2);
----------------
`auto *`


================
Comment at: lib/Transforms/Vectorize/SLPVectorizer.cpp:770
+      Instruction *I1 = dyn_cast<Instruction>(V1);
+      Instruction *I2 = dyn_cast<Instruction>(V2);
+      if (I1 && I2) {
----------------
`auto *`


================
Comment at: lib/Transforms/Vectorize/SLPVectorizer.cpp:815
+      //  or if they are not consecutive, early return the current cost.
+      Instruction *I1 = dyn_cast<Instruction>(V1);
+      Instruction *I2 = dyn_cast<Instruction>(V2);
----------------
`auto *`


================
Comment at: lib/Transforms/Vectorize/SLPVectorizer.cpp:816
+      Instruction *I1 = dyn_cast<Instruction>(V1);
+      Instruction *I2 = dyn_cast<Instruction>(V2);
+      if (CurrLevel == MaxLevel || !(I1 && I2) || I1 == I2 ||
----------------
`auto *`


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D60897/new/

https://reviews.llvm.org/D60897





More information about the llvm-commits mailing list