[PATCH] D59973: [SLP] Refactoring of the operand reordering code.

Alexey Bataev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 1 13:13:44 PDT 2019


ABataev added inline comments.


================
Comment at: lib/Transforms/Vectorize/SLPVectorizer.cpp:683
+  LLVM_DUMP_METHOD static void
+  dumpModeVec(const SmallVectorImpl<ReorderingMode> &ReorderingModes) {
+    for (unsigned OpIdx = 0, E = ReorderingModes.size(); OpIdx != E; ++OpIdx)
----------------
RKSimon wrote:
> This isn't used yet - can it wait until you need it? Also - should you use ArrayRef?
This must be an ArrayRef definitely


================
Comment at: lib/Transforms/Vectorize/SLPVectorizer.cpp:719
+      /// The operand value.
+      Value *V;
+      /// TreeEntries only allow a single opcode, or an alternate sequence of
----------------
Provide default initializers


================
Comment at: lib/Transforms/Vectorize/SLPVectorizer.cpp:735
+  public:
+    VLOperands() {}
+    /// Initialize with all the operands of the instruction vector \p VL.
----------------
`{}` -> `= default;`


================
Comment at: lib/Transforms/Vectorize/SLPVectorizer.cpp:802
+    /// \returns the operand value at \p OpIdx and \p Lane.
+    Value *getValue(unsigned OpIdx, unsigned Lane) {
+      return getData(OpIdx, Lane).V;
----------------
const member function


================
Comment at: lib/Transforms/Vectorize/SLPVectorizer.cpp:811
+    /// opearnd at \p OpIdx.
+    ValueList getVL(unsigned OpIdx) {
+      ValueList OpVL;
----------------
make function const


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

https://reviews.llvm.org/D59973





More information about the llvm-commits mailing list