From eba86a1208ef48437381d340bf5c29812e46b91a Mon Sep 17 00:00:00 2001 From: Tobias Grosser Date: Wed, 9 Nov 2016 04:24:49 +0000 Subject: [PATCH] ScopInfo: only run code needed for ASSERT in DEBUG mode Suggested-by: Johannes Doerfert llvm-svn: 286338 --- polly/lib/Analysis/ScopInfo.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/polly/lib/Analysis/ScopInfo.cpp b/polly/lib/Analysis/ScopInfo.cpp index 473eee2..187a8f7 100644 --- a/polly/lib/Analysis/ScopInfo.cpp +++ b/polly/lib/Analysis/ScopInfo.cpp @@ -4153,6 +4153,7 @@ void Scop::addScopStmt(BasicBlock *BB, Region *R) { ScopStmt *Scop::addScopStmt(__isl_take isl_map *SourceRel, __isl_take isl_map *TargetRel, __isl_take isl_set *Domain) { +#ifndef NDEBUG isl_set *SourceDomain = isl_map_domain(isl_map_copy(SourceRel)); isl_set *TargetDomain = isl_map_domain(isl_map_copy(TargetRel)); assert(isl_set_is_subset(Domain, TargetDomain) && @@ -4161,6 +4162,7 @@ ScopStmt *Scop::addScopStmt(__isl_take isl_map *SourceRel, "Source access not defined for complete statement domain"); isl_set_free(SourceDomain); isl_set_free(TargetDomain); +#endif Stmts.emplace_back(*this, SourceRel, TargetRel, Domain); CopyStmtsNum++; return &(Stmts.back()); -- 2.7.4