[PATCH] [Polly] Add early exits for SCoPs we did not optimize

Tobias Grosser tobias at grosser.es
Tue Feb 3 07:01:41 PST 2015


Hi Johannes,

thanks. This patch looks very nice now.
As mentioned in my previous review I agree that "[improvements to the heuristic] require some thoughts and may not be needed for the initial version.".

One comment from my last review, where I would be still interested on your opinion is the following one:

  Also, I think it would be good to get a test case for our heuristic here, similar to how the loop vectorizer has test cases for its performance model:
  
  Transforms/LoopVectorize/X86/uint64_to_fp64-cost-model.ll

Cheers,
Tobias


================
Comment at: include/polly/ScopInfo.h:787
@@ -783,1 +786,3 @@
 
+  /// @brief Mark the SCoP as optmized by the scheduler.
+  void markAsOptimized() { IsOptimized = true; }
----------------
optimized

================
Comment at: include/polly/ScopInfo.h:790
@@ +789,3 @@
+
+  /// @brief Check ifthe SCoP has been optimized by the scheduler.
+  bool isOptimized() const { return IsOptimized; }
----------------
if the (missing space)

================
Comment at: lib/Transform/ScheduleOptimizer.cpp:568
@@ +567,3 @@
+  // before/after the scheduling optimizer
+  // (e.g. number of stride-one accesses)
+  bool changed = !isl_union_map_is_equal(OldSchedule, NewSchedule);
----------------
(e.g., number of stride-one accesses).

================
Comment at: lib/Transform/ScheduleOptimizer.cpp:578
@@ -558,1 +577,3 @@
+    return false;
+  }
 
----------------
This is now very nice and concise (It still it may be worth to be outlined into a separate function).

================
Comment at: test/Isl/CodeGen/MemAccess/codegen_constant_offset.ll:1
@@ -1,2 +1,2 @@
-;RUN: opt %loadPolly -polly-import-jscop -polly-import-jscop-dir=%S -polly-import-jscop-postfix=transformed -polly-codegen-isl -instnamer < %s -S | FileCheck %s
+;RUN: opt %loadPolly -polly-no-early-exit -polly-no-early-exit -polly-import-jscop -polly-import-jscop-dir=%S -polly-import-jscop-postfix=transformed -polly-codegen-isl -instnamer < %s -S | FileCheck %s
 
----------------
You add the flag twice.

http://reviews.llvm.org/D7254

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list