[llvm-commits] [polly] r141255 - in /polly/trunk: include/polly/ScopInfo.h lib/Analysis/ScopInfo.cpp lib/Cloog.cpp
Tobias Grosser
grosser at fim.uni-passau.de
Wed Oct 5 17:03:59 PDT 2011
Author: grosser
Date: Wed Oct 5 19:03:59 2011
New Revision: 141255
URL: http://llvm.org/viewvc/llvm-project?rev=141255&view=rev
Log:
ScopInfo: Only give away a copy of the Context
Modified:
polly/trunk/include/polly/ScopInfo.h
polly/trunk/lib/Analysis/ScopInfo.cpp
polly/trunk/lib/Cloog.cpp
Modified: polly/trunk/include/polly/ScopInfo.h
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/include/polly/ScopInfo.h?rev=141255&r1=141254&r2=141255&view=diff
==============================================================================
--- polly/trunk/include/polly/ScopInfo.h (original)
+++ polly/trunk/include/polly/ScopInfo.h Wed Oct 5 19:03:59 2011
@@ -498,7 +498,7 @@
/// @brief Get the constraint on parameter of this Scop.
///
/// @return The constraint on parameter of this Scop.
- inline isl_set *getContext() const { return Context; }
+ __isl_give isl_set *getContext() const;
__isl_give isl_space *getParamSpace() const;
/// @brief Get an isl string representing the context.
Modified: polly/trunk/lib/Analysis/ScopInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Analysis/ScopInfo.cpp?rev=141255&r1=141254&r2=141255&view=diff
==============================================================================
--- polly/trunk/lib/Analysis/ScopInfo.cpp (original)
+++ polly/trunk/lib/Analysis/ScopInfo.cpp Wed Oct 5 19:03:59 2011
@@ -780,10 +780,7 @@
}
std::string ScopStmt::getDomainStr() const {
- isl_set *domain = getDomain();
- std::string string = stringFromIslObj(domain);
- isl_set_free(domain);
- return string;
+ return stringFromIslObj(Domain);
}
std::string ScopStmt::getScatteringStr() const {
@@ -917,7 +914,7 @@
}
std::string Scop::getContextStr() const {
- return stringFromIslObj(getContext());
+ return stringFromIslObj(Context);
}
std::string Scop::getNameStr() const {
@@ -937,6 +934,9 @@
return EntryName + "---" + ExitName;
}
+__isl_give isl_set *Scop::getContext() const {
+ return isl_set_copy(Context);
+}
__isl_give isl_space *Scop::getParamSpace() const {
return isl_set_get_space(this->Context);
}
Modified: polly/trunk/lib/Cloog.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Cloog.cpp?rev=141255&r1=141254&r2=141255&view=diff
==============================================================================
--- polly/trunk/lib/Cloog.cpp (original)
+++ polly/trunk/lib/Cloog.cpp Wed Oct 5 19:03:59 2011
@@ -174,10 +174,9 @@
}
CloogInput *Cloog::buildCloogInput() {
- CloogDomain *Context =
- cloog_domain_from_isl_set(isl_set_copy(S->getContext()));
+ CloogDomain *Context = cloog_domain_from_isl_set(S->getContext());
CloogUnionDomain *Statements = buildCloogUnionDomain();
- CloogInput *Input = cloog_input_alloc (Context, Statements);
+ CloogInput *Input = cloog_input_alloc(Context, Statements);
return Input;
}
} // End namespace polly.
More information about the llvm-commits
mailing list