summaryrefslogtreecommitdiffstats
path: root/polly/lib/CodeGen
diff options
context:
space:
mode:
authorTobias Grosser <tobias@grosser.es>2017-08-06 19:52:38 +0000
committerTobias Grosser <tobias@grosser.es>2017-08-06 19:52:38 +0000
commit8ea1fc19b30a3669dad22bb6af7001771fc568b0 (patch)
treec58911459431a518ef733c6b10661ac54efe350c /polly/lib/CodeGen
parent9a63570b13a261e15682b8e197d6bfae4854ba1e (diff)
downloadbcm5719-llvm-8ea1fc19b30a3669dad22bb6af7001771fc568b0.tar.gz
bcm5719-llvm-8ea1fc19b30a3669dad22bb6af7001771fc568b0.zip
[ScopInfo] Translate Scop::getContext to isl++ [NFC]
llvm-svn: 310221
Diffstat (limited to 'polly/lib/CodeGen')
-rw-r--r--polly/lib/CodeGen/BlockGenerators.cpp2
-rw-r--r--polly/lib/CodeGen/CodeGeneration.cpp2
-rw-r--r--polly/lib/CodeGen/IslAst.cpp2
-rw-r--r--polly/lib/CodeGen/IslNodeBuilder.cpp6
-rw-r--r--polly/lib/CodeGen/PPCGCodeGeneration.cpp17
5 files changed, 14 insertions, 15 deletions
diff --git a/polly/lib/CodeGen/BlockGenerators.cpp b/polly/lib/CodeGen/BlockGenerators.cpp
index bff60ed1133..190a4406543 100644
--- a/polly/lib/CodeGen/BlockGenerators.cpp
+++ b/polly/lib/CodeGen/BlockGenerators.cpp
@@ -609,7 +609,7 @@ void BlockGenerator::generateConditionalExecution(
// If the condition is a tautology, don't generate a condition around the
// code.
bool IsPartialWrite =
- !StmtDom.intersect_params(give(Stmt.getParent()->getContext()))
+ !StmtDom.intersect_params(Stmt.getParent()->getContext())
.is_subset(Subdomain);
if (!IsPartialWrite) {
GenThenFunc();
diff --git a/polly/lib/CodeGen/CodeGeneration.cpp b/polly/lib/CodeGen/CodeGeneration.cpp
index 51b90860c58..78702646014 100644
--- a/polly/lib/CodeGen/CodeGeneration.cpp
+++ b/polly/lib/CodeGen/CodeGeneration.cpp
@@ -228,7 +228,7 @@ static bool CodeGen(Scop &S, IslAstInfo &AI, LoopInfo &LI, DominatorTree &DT,
isl_ast_node_free(AstRoot);
} else {
- NodeBuilder.addParameters(S.getContext());
+ NodeBuilder.addParameters(S.getContext().release());
Value *RTC = NodeBuilder.createRTC(AI.getRunCondition());
Builder.GetInsertBlock()->getTerminator()->setOperand(0, RTC);
diff --git a/polly/lib/CodeGen/IslAst.cpp b/polly/lib/CodeGen/IslAst.cpp
index dafc18b0077..b056ed8f198 100644
--- a/polly/lib/CodeGen/IslAst.cpp
+++ b/polly/lib/CodeGen/IslAst.cpp
@@ -426,7 +426,7 @@ void IslAst::init(const Dependences &D) {
AstBuildUserInfo BuildInfo;
if (UseContext)
- Build = isl_ast_build_from_context(S.getContext());
+ Build = isl_ast_build_from_context(S.getContext().release());
else
Build = isl_ast_build_from_context(isl_set_universe(S.getParamSpace()));
diff --git a/polly/lib/CodeGen/IslNodeBuilder.cpp b/polly/lib/CodeGen/IslNodeBuilder.cpp
index dec8eab9bbf..b0018c9629b 100644
--- a/polly/lib/CodeGen/IslNodeBuilder.cpp
+++ b/polly/lib/CodeGen/IslNodeBuilder.cpp
@@ -815,9 +815,9 @@ IslNodeBuilder::createNewAccesses(ScopStmt *Stmt,
auto SchedDom = isl_set_from_union_set(
isl_union_map_domain(isl_union_map_copy(Schedule)));
auto AccDom = isl_map_domain(MA->getAccessRelation().release());
- Dom = isl_set_intersect_params(Dom, Stmt->getParent()->getContext());
+ Dom = isl_set_intersect_params(Dom, Stmt->getParent()->getContext().release());
SchedDom =
- isl_set_intersect_params(SchedDom, Stmt->getParent()->getContext());
+ isl_set_intersect_params(SchedDom, Stmt->getParent()->getContext().release());
assert(isl_set_is_subset(SchedDom, AccDom) &&
"Access relation not defined on full schedule domain");
assert(isl_set_is_subset(Dom, AccDom) &&
@@ -1184,7 +1184,7 @@ Value *IslNodeBuilder::preloadInvariantLoad(const MemoryAccess &MA,
isl_set *Domain) {
isl_set *AccessRange = isl_map_range(MA.getAddressFunction().release());
- AccessRange = isl_set_gist_params(AccessRange, S.getContext());
+ AccessRange = isl_set_gist_params(AccessRange, S.getContext().release());
if (!materializeParameters(AccessRange)) {
isl_set_free(AccessRange);
diff --git a/polly/lib/CodeGen/PPCGCodeGeneration.cpp b/polly/lib/CodeGen/PPCGCodeGeneration.cpp
index 8661555ec88..74c9bfac677 100644
--- a/polly/lib/CodeGen/PPCGCodeGeneration.cpp
+++ b/polly/lib/CodeGen/PPCGCodeGeneration.cpp
@@ -762,7 +762,7 @@ void GPUNodeBuilder::finalize() {
void GPUNodeBuilder::allocateDeviceArrays() {
assert(!ManagedMemory && "Managed memory will directly send host pointers "
"to the kernel. There is no need for device arrays");
- isl_ast_build *Build = isl_ast_build_from_context(S.getContext());
+ isl_ast_build *Build = isl_ast_build_from_context(S.getContext().release());
for (int i = 0; i < Prog->n_array; ++i) {
gpu_array_info *Array = &Prog->array[i];
@@ -1071,7 +1071,7 @@ static bool isPrefix(std::string String, std::string Prefix) {
Value *GPUNodeBuilder::getArraySize(gpu_array_info *Array) {
isl::ast_build Build =
- isl::ast_build::from_context(isl::manage(S.getContext()));
+ isl::ast_build::from_context(S.getContext());
Value *ArraySize = ConstantInt::get(Builder.getInt64Ty(), Array->size);
if (!gpu_array_is_scalar(Array)) {
@@ -1100,7 +1100,7 @@ Value *GPUNodeBuilder::getArrayOffset(gpu_array_info *Array) {
return nullptr;
isl::ast_build Build =
- isl::ast_build::from_context(isl::manage(S.getContext()));
+ isl::ast_build::from_context(S.getContext());
isl::set Min = isl::manage(isl_set_copy(Array->extent)).lexmin();
@@ -1517,8 +1517,7 @@ void GPUNodeBuilder::clearLoops(Function *F) {
std::tuple<Value *, Value *> GPUNodeBuilder::getGridSizes(ppcg_kernel *Kernel) {
std::vector<Value *> Sizes;
- isl::ast_build Context =
- isl::ast_build::from_context(isl::manage(S.getContext()));
+ isl::ast_build Context = isl::ast_build::from_context(S.getContext());
isl::multi_pw_aff GridSizePwAffs =
isl::manage(isl_multi_pw_aff_copy(Kernel->grid_size));
@@ -2631,10 +2630,10 @@ public:
PPCGScop->start = 0;
PPCGScop->end = 0;
- PPCGScop->context = S->getContext();
+ PPCGScop->context = S->getContext().release();
PPCGScop->domain = S->getDomains();
// TODO: investigate this further. PPCG calls collect_call_domains.
- PPCGScop->call = isl_union_set_from_set(S->getContext());
+ PPCGScop->call = isl_union_set_from_set(S->getContext().release());
PPCGScop->tagged_reads = getTaggedReads();
PPCGScop->reads = S->getReads().release();
PPCGScop->live_in = nullptr;
@@ -2845,7 +2844,7 @@ public:
isl_aff *One = isl_aff_zero_on_domain(LS);
One = isl_aff_add_constant_si(One, 1);
Bound = isl_pw_aff_add(Bound, isl_pw_aff_alloc(Dom, One));
- Bound = isl_pw_aff_gist(Bound, S->getContext());
+ Bound = isl_pw_aff_gist(Bound, S->getContext().release());
Bounds.push_back(Bound);
}
}
@@ -3375,7 +3374,7 @@ public:
// TODO: Handle LICM
auto SplitBlock = StartBlock->getSinglePredecessor();
Builder.SetInsertPoint(SplitBlock->getTerminator());
- NodeBuilder.addParameters(S->getContext());
+ NodeBuilder.addParameters(S->getContext().release());
isl_ast_build *Build = isl_ast_build_alloc(S->getIslCtx());
isl_ast_expr *Condition = IslAst::buildRunCondition(*S, Build);
OpenPOWER on IntegriCloud