From dae2e9287d828eaf113586f77bb21c31d357611e Mon Sep 17 00:00:00 2001 From: Johannes Doerfert Date: Thu, 17 Nov 2016 21:55:43 +0000 Subject: [PATCH] [DBG] Collect statistics about actually versioned SCoPs llvm-svn: 287267 --- polly/lib/CodeGen/IslNodeBuilder.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/polly/lib/CodeGen/IslNodeBuilder.cpp b/polly/lib/CodeGen/IslNodeBuilder.cpp index 6c1eded2664e..ed46f509b818 100644 --- a/polly/lib/CodeGen/IslNodeBuilder.cpp +++ b/polly/lib/CodeGen/IslNodeBuilder.cpp @@ -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_expr *Condition) { RTC = Builder.CreateAnd(RTC, OverflowHappened, "polly.rtc.result"); ExprBuilder.setTrackOverflow(false); + + if (!isa(RTC)) + VERSIONED_SCOPS++; + return RTC; }