[polly] r277810 - [DependenceInfo] Reset operations counter when setting limit.

Michael Kruse via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 5 04:31:03 PDT 2016


Author: meinersbur
Date: Fri Aug  5 06:31:02 2016
New Revision: 277810

URL: http://llvm.org/viewvc/llvm-project?rev=277810&view=rev
Log:
[DependenceInfo] Reset operations counter when setting limit.

When entering the dependence computation and the max_operations is set, the
operations counter may have already exceeded the counter, thus aborting any ISL
computation from the start. The counter is reset at the end of the dependence
calculation such that a follow-up recomputation might succeed, ie. the success
of the first dependence calculation depends on unrelated ISL operations that
happened before, giving it a disadvantage to the following calculations.

This patch resets the operations counter at the beginning of the dependence
recalculation to not depend on previous actions. Otherwise additional
preprocessing of the Scop that aims to improve its schedulability (eg. DeLICM)
do have the effect that DependenceInfo and hence the scheduling fail more
likely, contraproductive to the goal of said preprocessing.

Modified:
    polly/trunk/lib/Analysis/DependenceInfo.cpp

Modified: polly/trunk/lib/Analysis/DependenceInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Analysis/DependenceInfo.cpp?rev=277810&r1=277809&r2=277810&view=diff
==============================================================================
--- polly/trunk/lib/Analysis/DependenceInfo.cpp (original)
+++ polly/trunk/lib/Analysis/DependenceInfo.cpp Fri Aug  5 06:31:02 2016
@@ -366,8 +366,10 @@ void Dependences::calculateDependences(S
   }
 
   long MaxOpsOld = isl_ctx_get_max_operations(IslCtx.get());
-  if (OptComputeOut)
+  if (OptComputeOut) {
+    isl_ctx_reset_operations(IslCtx.get());
     isl_ctx_set_max_operations(IslCtx.get(), OptComputeOut);
+  }
 
   auto OnErrorStatus = isl_options_get_on_error(IslCtx.get());
   isl_options_set_on_error(IslCtx.get(), ISL_ON_ERROR_CONTINUE);




More information about the llvm-commits mailing list