[polly] r287267 - [DBG] Collect statistics about actually versioned SCoPs

Johannes Doerfert via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 17 13:55:43 PST 2016


Author: jdoerfert
Date: Thu Nov 17 15:55:43 2016
New Revision: 287267

URL: http://llvm.org/viewvc/llvm-project?rev=287267&view=rev
Log:
[DBG] Collect statistics about actually versioned SCoPs

Modified:
    polly/trunk/lib/CodeGen/IslNodeBuilder.cpp

Modified: polly/trunk/lib/CodeGen/IslNodeBuilder.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/CodeGen/IslNodeBuilder.cpp?rev=287267&r1=287266&r2=287267&view=diff
==============================================================================
--- polly/trunk/lib/CodeGen/IslNodeBuilder.cpp (original)
+++ polly/trunk/lib/CodeGen/IslNodeBuilder.cpp Thu Nov 17 15:55:43 2016
@@ -50,6 +50,10 @@
 using namespace polly;
 using namespace llvm;
 
+#define DEBUG_TYPE "polly-codegen"
+
+STATISTIC(VERSIONED_SCOPS, "Number of SCoPs that required versioning.");
+
 // The maximal number of dimensions we allow during invariant load construction.
 // More complex access ranges will result in very high compile time and are also
 // unlikely to result in good code. This value is very high and should only
@@ -1338,5 +1342,9 @@ Value *IslNodeBuilder::createRTC(isl_ast
 
   RTC = Builder.CreateAnd(RTC, OverflowHappened, "polly.rtc.result");
   ExprBuilder.setTrackOverflow(false);
+
+  if (!isa<ConstantInt>(RTC))
+    VERSIONED_SCOPS++;
+
   return RTC;
 }




More information about the llvm-commits mailing list