[polly] r266087 - Do not by default minimize remarks

Johannes Doerfert via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 12 09:09:46 PDT 2016


Author: jdoerfert
Date: Tue Apr 12 11:09:44 2016
New Revision: 266087

URL: http://llvm.org/viewvc/llvm-project?rev=266087&view=rev
Log:
Do not by default minimize remarks

  We used checks to minimize the number of remarks we present to a user
  but these checks can become expensive, especially since all wrapping
  assumptions are emitted separately. Because there is not benefit for a
  "headless" run we put these checks under a command line flag. Thus, if
  the flag is not given we will emit "non-effective" remarks, e.g.,
  duplicates and revert to the old behaviour if it is given. As this
  also changes the internal representation of some sets we set the flag
  by default for our unit tests.


Modified:
    polly/trunk/lib/Analysis/ScopInfo.cpp
    polly/trunk/test/lit.site.cfg.in
    polly/trunk/test/update_check.py

Modified: polly/trunk/lib/Analysis/ScopInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Analysis/ScopInfo.cpp?rev=266087&r1=266086&r2=266087&view=diff
==============================================================================
--- polly/trunk/lib/Analysis/ScopInfo.cpp (original)
+++ polly/trunk/lib/Analysis/ScopInfo.cpp Tue Apr 12 11:09:44 2016
@@ -67,6 +67,11 @@ STATISTIC(RichScopFound, "Number of Scop
 // are also unlikely to result in good code
 static int const MaxConjunctsInDomain = 20;
 
+static cl::opt<bool> PollyRemarksMinimal(
+    "polly-remarks-minimal",
+    cl::desc("Do not emit remarks about assumptions that are known"),
+    cl::Hidden, cl::ZeroOrMore, cl::init(false), cl::cat(PollyCategory));
+
 static cl::opt<bool> ModelReadOnlyScalars(
     "polly-analyze-read-only-scalars",
     cl::desc("Model read-only scalar values in the scop description"),
@@ -3450,18 +3455,20 @@ static std::string toString(AssumptionKi
 
 bool Scop::trackAssumption(AssumptionKind Kind, __isl_keep isl_set *Set,
                            DebugLoc Loc, AssumptionSign Sign) {
-  if (Sign == AS_ASSUMPTION) {
-    if (isl_set_is_subset(Context, Set))
-      return false;
+  if (PollyRemarksMinimal) {
+    if (Sign == AS_ASSUMPTION) {
+      if (isl_set_is_subset(Context, Set))
+        return false;
 
-    if (isl_set_is_subset(AssumedContext, Set))
-      return false;
-  } else {
-    if (isl_set_is_disjoint(Set, Context))
-      return false;
+      if (isl_set_is_subset(AssumedContext, Set))
+        return false;
+    } else {
+      if (isl_set_is_disjoint(Set, Context))
+        return false;
 
-    if (isl_set_is_subset(Set, InvalidContext))
-      return false;
+      if (isl_set_is_subset(Set, InvalidContext))
+        return false;
+    }
   }
 
   auto &F = *getRegion().getEntry()->getParent();

Modified: polly/trunk/test/lit.site.cfg.in
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/lit.site.cfg.in?rev=266087&r1=266086&r2=266087&view=diff
==============================================================================
--- polly/trunk/test/lit.site.cfg.in (original)
+++ polly/trunk/test/lit.site.cfg.in Tue Apr 12 11:09:44 2016
@@ -37,10 +37,12 @@ if config.link_polly_into_tools == '' or
     config.substitutions.append(('%loadPolly', '-load '
                                  + config.polly_lib_dir + '/LLVMPolly at LLVM_SHLIBEXT@'
                                  + ' -polly-process-unprofitable '
+                                 + ' -polly-remarks-minimal '
                                  ))
 else:
     config.substitutions.append(('%loadPolly', ''
                                  + ' -polly-process-unprofitable '
+                                 + ' -polly-remarks-minimal '
                                  ))
 
 # Let the main config do the real work.

Modified: polly/trunk/test/update_check.py
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/update_check.py?rev=266087&r1=266086&r2=266087&view=diff
==============================================================================
--- polly/trunk/test/update_check.py (original)
+++ polly/trunk/test/update_check.py Tue Apr 12 11:09:44 2016
@@ -283,6 +283,7 @@ def main():
                 if not link_polly_into_tools:
                     newtool += ['-load',os.path.join(polly_lib_dir,'LLVMPolly' + shlibext)]
                 newtool.append('-polly-process-unprofitable')
+                newtool.append('-polly-remarks-minimal')
             elif toolarg == '2>&1':
                 optstderr = subprocess.STDOUT
             else:




More information about the llvm-commits mailing list