[PATCH] D70513: [VectorUtils] API for VFShape, update VFInfo.

Sander de Smalen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 4 09:04:59 PST 2019


sdesmalen added inline comments.


================
Comment at: llvm/include/llvm/Analysis/VectorUtils.h:91
   }
+  /// Update the parameter in position P.ParamPos to P.
+  void updateParam(VFParameter P) {
----------------
nit: can you add a newline between the previous and next method?


================
Comment at: llvm/lib/Analysis/VectorUtils.cpp:1189
+       ++Pos) {
+    if (Parameters[Pos].ParamPos != Pos)
+      return false;
----------------
should this be an assert?


================
Comment at: llvm/lib/Analysis/VectorUtils.cpp:1191
+      return false;
+    switch (Parameters[Pos].ParamKind) {
+    default: // Nothign to check.
----------------
nit: can you add a newline above?


================
Comment at: llvm/lib/Analysis/VectorUtils.cpp:1192
+    switch (Parameters[Pos].ParamKind) {
+    default: // Nothign to check.
+      break;
----------------
nit: Nothign -> Nothing


================
Comment at: llvm/lib/Analysis/VectorUtils.cpp:1222
+      // internal).
+      if (Parameters[Pos].ParamPos != NumParams - 1)
+        return false;
----------------
Can you add a function here that calculates this, per supported VFABI?


================
Comment at: llvm/unittests/Analysis/VectorUtilsTest.cpp:311
+  }
+  bool validParams(ArrayRef<VFParameter> Parameters) {
+    Shape.Parameters =
----------------
nit: this could do with some newlines.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D70513





More information about the llvm-commits mailing list