[polly] r265882 - Add __isl_give annotations to return types [NFC]
Johannes Doerfert via llvm-commits
llvm-commits at lists.llvm.org
Sat Apr 9 14:55:25 PDT 2016
Author: jdoerfert
Date: Sat Apr 9 16:55:23 2016
New Revision: 265882
URL: http://llvm.org/viewvc/llvm-project?rev=265882&view=rev
Log:
Add __isl_give annotations to return types [NFC]
Modified:
polly/trunk/lib/Analysis/DependenceInfo.cpp
polly/trunk/lib/Analysis/ScopInfo.cpp
polly/trunk/lib/CodeGen/IslAst.cpp
polly/trunk/lib/Transform/DeadCodeElimination.cpp
Modified: polly/trunk/lib/Analysis/DependenceInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Analysis/DependenceInfo.cpp?rev=265882&r1=265881&r2=265882&view=diff
==============================================================================
--- polly/trunk/lib/Analysis/DependenceInfo.cpp (original)
+++ polly/trunk/lib/Analysis/DependenceInfo.cpp Sat Apr 9 16:55:23 2016
@@ -716,7 +716,7 @@ void Dependences::releaseMemory() {
ReductionDependences.clear();
}
-isl_union_map *Dependences::getDependences(int Kinds) const {
+__isl_give isl_union_map *Dependences::getDependences(int Kinds) const {
assert(hasValidDependences() && "No valid dependences available");
isl_space *Space = isl_union_map_get_space(RAW);
isl_union_map *Deps = isl_union_map_empty(Space);
@@ -745,7 +745,8 @@ bool Dependences::hasValidDependences()
return (RAW != nullptr) && (WAR != nullptr) && (WAW != nullptr);
}
-isl_map *Dependences::getReductionDependences(MemoryAccess *MA) const {
+__isl_give isl_map *
+Dependences::getReductionDependences(MemoryAccess *MA) const {
return isl_map_copy(ReductionDependences.lookup(MA));
}
Modified: polly/trunk/lib/Analysis/ScopInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Analysis/ScopInfo.cpp?rev=265882&r1=265881&r2=265882&view=diff
==============================================================================
--- polly/trunk/lib/Analysis/ScopInfo.cpp (original)
+++ polly/trunk/lib/Analysis/ScopInfo.cpp Sat Apr 9 16:55:23 2016
@@ -243,7 +243,9 @@ int ScopArrayInfo::getElemSizeInBytes()
return DL.getTypeAllocSize(ElementType);
}
-isl_id *ScopArrayInfo::getBasePtrId() const { return isl_id_copy(Id); }
+__isl_give isl_id *ScopArrayInfo::getBasePtrId() const {
+ return isl_id_copy(Id);
+}
void ScopArrayInfo::dump() const { print(errs()); }
@@ -942,7 +944,7 @@ void MemoryAccess::setNewAccessRelation(
//===----------------------------------------------------------------------===//
-isl_map *ScopStmt::getSchedule() const {
+__isl_give isl_map *ScopStmt::getSchedule() const {
isl_set *Domain = getDomain();
if (isl_set_is_empty(Domain)) {
isl_set_free(Domain);
@@ -1763,7 +1765,7 @@ __isl_give isl_id *Scop::getIdForParam(c
const_cast<void *>((const void *)Parameter));
}
-isl_set *Scop::addNonEmptyDomainConstraints(isl_set *C) const {
+__isl_give isl_set *Scop::addNonEmptyDomainConstraints(isl_set *C) const {
isl_set *DomainContext = isl_union_set_params(getDomains());
return isl_set_intersect_params(C, DomainContext);
}
@@ -2109,11 +2111,11 @@ static inline __isl_give isl_set *addDom
return isl_set_set_dim_id(Domain, isl_dim_set, Dim, DimId);
}
-isl_set *Scop::getDomainConditions(ScopStmt *Stmt) {
+__isl_give isl_set *Scop::getDomainConditions(ScopStmt *Stmt) {
return getDomainConditions(Stmt->getEntryBlock());
}
-isl_set *Scop::getDomainConditions(BasicBlock *BB) {
+__isl_give isl_set *Scop::getDomainConditions(BasicBlock *BB) {
auto DIt = DomainMap.find(BB);
if (DIt != DomainMap.end())
return isl_set_copy(DIt->getSecond());
@@ -2449,10 +2451,11 @@ bool Scop::buildDomainsWithBranchConstra
return true;
}
-isl_set *Scop::getPredecessorDomainConstraints(BasicBlock *BB, isl_set *Domain,
- ScopDetection &SD,
- DominatorTree &DT,
- LoopInfo &LI) {
+__isl_give isl_set *Scop::getPredecessorDomainConstraints(BasicBlock *BB,
+ isl_set *Domain,
+ ScopDetection &SD,
+ DominatorTree &DT,
+ LoopInfo &LI) {
// If @p BB is the ScopEntry we are done
if (R.getEntry() == BB)
return isl_set_universe(isl_set_get_space(Domain));
@@ -3066,7 +3069,7 @@ const InvariantEquivClassTy *Scop::looku
return nullptr;
}
-isl_set *Scop::getErrorCtxReachingStmt(ScopStmt &Stmt) {
+__isl_give isl_set *Scop::getErrorCtxReachingStmt(ScopStmt &Stmt) {
auto *BB = Stmt.getEntryBlock();
return isl_set_copy(ErrorDomainCtxMap.lookup(BB));
}
Modified: polly/trunk/lib/CodeGen/IslAst.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/CodeGen/IslAst.cpp?rev=265882&r1=265881&r2=265882&view=diff
==============================================================================
--- polly/trunk/lib/CodeGen/IslAst.cpp (original)
+++ polly/trunk/lib/CodeGen/IslAst.cpp Sat Apr 9 16:55:23 2016
@@ -536,12 +536,13 @@ bool IslAstInfo::isExecutedInParallel(__
return isOutermostParallel(Node) && !isReductionParallel(Node);
}
-isl_union_map *IslAstInfo::getSchedule(__isl_keep isl_ast_node *Node) {
+__isl_give isl_union_map *
+IslAstInfo::getSchedule(__isl_keep isl_ast_node *Node) {
IslAstUserPayload *Payload = getNodePayload(Node);
return Payload ? isl_ast_build_get_schedule(Payload->Build) : nullptr;
}
-isl_pw_aff *
+__isl_give isl_pw_aff *
IslAstInfo::getMinimalDependenceDistance(__isl_keep isl_ast_node *Node) {
IslAstUserPayload *Payload = getNodePayload(Node);
return Payload ? isl_pw_aff_copy(Payload->MinimalDependenceDistance)
Modified: polly/trunk/lib/Transform/DeadCodeElimination.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Transform/DeadCodeElimination.cpp?rev=265882&r1=265881&r2=265882&view=diff
==============================================================================
--- polly/trunk/lib/Transform/DeadCodeElimination.cpp (original)
+++ polly/trunk/lib/Transform/DeadCodeElimination.cpp Sat Apr 9 16:55:23 2016
@@ -90,7 +90,7 @@ char DeadCodeElim::ID = 0;
// bounded write accesses can not overwrite all of the data-locations. As
// this means may-writes are in the current situation always live, there is
// no point in trying to remove them from the live-out set.
-isl_union_set *DeadCodeElim::getLiveOut(Scop &S) {
+__isl_give isl_union_set *DeadCodeElim::getLiveOut(Scop &S) {
isl_union_map *Schedule = S.getSchedule();
isl_union_map *WriteIterations = isl_union_map_reverse(S.getMustWrites());
isl_union_map *WriteTimes =
More information about the llvm-commits
mailing list