[PATCH] D38367: [SLP] Added more missed optimiazation remarks

Adam Nemet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 14 10:19:10 PST 2017


anemet accepted this revision.
anemet added a comment.
This revision is now accepted and ready to land.

This looks great with some minor nits (go ahead and commit after fixing them).  Thanks for your work!  And sorry about the delay.



================
Comment at: lib/Transforms/Vectorize/SLPVectorizer.cpp:5304
       }
+
       if (V.isTreeTinyAndNotFullyVectorizable())
----------------
Remove this whitespace-only change.


================
Comment at: lib/Transforms/Vectorize/SLPVectorizer.cpp:5319
+                     << "but not beneficial with cost "
+                     << ore::NV("Cost", Cost);
+          });
----------------
We should probably print the threshold here too


================
Comment at: lib/Transforms/Vectorize/SLPVectorizer.cpp:5326-5332
+      V.getORE()->emit([&]() {
+          return OptimizationRemark(
+                     SV_NAME, "VectorizedHorizontalReduction", cast<Instruction>(VL[0]))
           << "Vectorized horizontal reduction with cost "
           << ore::NV("Cost", Cost) << " and with tree size "
-          << ore::NV("TreeSize", V.getTreeSize()));
+          << ore::NV("TreeSize", V.getTreeSize());
+      });
----------------
Ouch, thanks for fixing this.


Repository:
  rL LLVM

https://reviews.llvm.org/D38367





More information about the llvm-commits mailing list