diff options
| author | Philip Pfaffe <philip.pfaffe@gmail.com> | 2017-11-19 22:13:34 +0000 |
|---|---|---|
| committer | Philip Pfaffe <philip.pfaffe@gmail.com> | 2017-11-19 22:13:34 +0000 |
| commit | 00fd43b327a252280db1c34696efee809c2286bc (patch) | |
| tree | 093cf147174d34b59f3ccea6abec1607f37232e5 /polly/lib/CodeGen/IslNodeBuilder.cpp | |
| parent | 0f45abdef73db109bae53cd470e73982d35f8b0f (diff) | |
| download | bcm5719-llvm-00fd43b327a252280db1c34696efee809c2286bc.tar.gz bcm5719-llvm-00fd43b327a252280db1c34696efee809c2286bc.zip | |
Port ScopInfo to the isl cpp bindings
Summary:
Most changes are mechanical, but in one place I changed the program semantics
by fixing a likely bug:
In `Scop::hasFeasibleRuntimeContext()`, I'm now explicitely handling the
error-case. Before, when the call to `addNonEmptyDomainConstraints()`
returned a null set, this (probably) accidentally worked because
isl_bool_error converts to true. I'm checking for nullptr now.
Reviewers: grosser, Meinersbur, bollu
Reviewed By: Meinersbur
Subscribers: nemanjai, kbarton, pollydev, llvm-commits
Differential Revision: https://reviews.llvm.org/D39971
llvm-svn: 318632
Diffstat (limited to 'polly/lib/CodeGen/IslNodeBuilder.cpp')
| -rw-r--r-- | polly/lib/CodeGen/IslNodeBuilder.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/polly/lib/CodeGen/IslNodeBuilder.cpp b/polly/lib/CodeGen/IslNodeBuilder.cpp index 381195d48ee..cd4f8d6605a 100644 --- a/polly/lib/CodeGen/IslNodeBuilder.cpp +++ b/polly/lib/CodeGen/IslNodeBuilder.cpp @@ -849,7 +849,7 @@ __isl_give isl_id_to_ast_expr * IslNodeBuilder::createNewAccesses(ScopStmt *Stmt, __isl_keep isl_ast_node *Node) { isl_id_to_ast_expr *NewAccesses = - isl_id_to_ast_expr_alloc(Stmt->getParent()->getIslCtx(), 0); + isl_id_to_ast_expr_alloc(Stmt->getParent()->getIslCtx().get(), 0); auto *Build = IslAstInfo::getBuild(Node); assert(Build && "Could not obtain isl_ast_build from user node"); @@ -1072,7 +1072,7 @@ bool IslNodeBuilder::materializeValue(isl_id *Id) { auto MemInst = MemAccInst::dyn_cast(Inst); auto Address = MemInst ? MemInst.getPointerOperand() : nullptr; if (Address && SE.getUnknown(UndefValue::get(Address->getType())) == - SE.getPointerBase(SE.getSCEV(Address))) { + SE.getPointerBase(SE.getSCEV(Address))) { } else if (S.getStmtFor(Inst)) { IsDead = false; } else { @@ -1353,7 +1353,7 @@ bool IslNodeBuilder::preloadInvariantEquivClass( return false; // The execution context of the IAClass. - isl_set *&ExecutionCtx = IAClass.ExecutionContext; + isl::set &ExecutionCtx = IAClass.ExecutionContext; // If the base pointer of this class is dependent on another one we have to // make sure it was preloaded already. @@ -1364,8 +1364,8 @@ bool IslNodeBuilder::preloadInvariantEquivClass( // After we preloaded the BaseIAClass we adjusted the BaseExecutionCtx and // we need to refine the ExecutionCtx. - isl_set *BaseExecutionCtx = isl_set_copy(BaseIAClass->ExecutionContext); - ExecutionCtx = isl_set_intersect(ExecutionCtx, BaseExecutionCtx); + isl::set BaseExecutionCtx = BaseIAClass->ExecutionContext; + ExecutionCtx = ExecutionCtx.intersect(BaseExecutionCtx); } // If the size of a dimension is dependent on another class, make sure it is @@ -1381,8 +1381,8 @@ bool IslNodeBuilder::preloadInvariantEquivClass( // After we preloaded the BaseIAClass we adjusted the BaseExecutionCtx // and we need to refine the ExecutionCtx. - isl_set *BaseExecutionCtx = isl_set_copy(BaseIAClass->ExecutionContext); - ExecutionCtx = isl_set_intersect(ExecutionCtx, BaseExecutionCtx); + isl::set BaseExecutionCtx = BaseIAClass->ExecutionContext; + ExecutionCtx = ExecutionCtx.intersect(BaseExecutionCtx); } } } @@ -1390,7 +1390,7 @@ bool IslNodeBuilder::preloadInvariantEquivClass( Instruction *AccInst = MA->getAccessInstruction(); Type *AccInstTy = AccInst->getType(); - Value *PreloadVal = preloadInvariantLoad(*MA, isl_set_copy(ExecutionCtx)); + Value *PreloadVal = preloadInvariantLoad(*MA, ExecutionCtx.copy()); if (!PreloadVal) return false; |

