[PATCH] D36647: [Polly][WIP] Scalar fully indexed expansion

Michael Kruse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 14 05:33:45 PDT 2017


Meinersbur added inline comments.


================
Comment at: lib/Transform/MaximalStaticExpansion.cpp:84-85
   /// @param ExpandedSAI The expanded SAI created during write expansion.
-  void expandRead(Scop &S, MemoryAccess *MA, isl::union_map &Dependences,
-                  ScopArrayInfo *ExpandedSAI);
+  /// @param If Reverse is true, the Dependences union_map is reversed before
+  /// intersection.
+  void expandAccordingToDependences(Scop &S, MemoryAccess *MA,
----------------
[Style] Doxygen expects `@param ParameterName`, that is, it interprets `If` as a parameter name.


================
Comment at: lib/Transform/MaximalStaticExpansion.cpp:369-371
+  for (auto MA : Writes) {
+    expandAccordingToDependences(S, MA, Dependences, ExpandedSAI, false);
+  }
----------------
[Style] No parenthesis around single statements.


================
Comment at: test/MaximalStaticExpansion/non_working_phi.ll:1
+; RUN: opt %loadPolly -polly-canonicalize -polly-mse -analyze < %s 2>1| FileCheck %s
+;
----------------
Try not to add other passes than the one you are testing. That makes the test case more robust against changes in those passes (now that -polly-position=before-vectorizer is default, and the new pass manager doesn't even have an "early" extension point, `-polly-canonicalize` might be removed in the mid-term).

Use `opt -polly-canonicalize -S non_working_phi.ll > non_working_phi.ll` to produce an .ll file which doesn't need --polly-canonicalize.

If you are using clang, use `-polly-dump-before-file=non_working_phi.ll` to generate an .ll file that does not need any processing.


https://reviews.llvm.org/D36647





More information about the llvm-commits mailing list