summaryrefslogtreecommitdiff
path: root/polly/lib/CodeGen/PPCGCodeGeneration.cpp
diff options
context:
space:
mode:
authorTobias Grosser <tobias@grosser.es>2017-07-21 23:07:56 +0000
committerTobias Grosser <tobias@grosser.es>2017-07-21 23:07:56 +0000
commit77eef90f5035ddbafa7b7cd2448e504465887dc3 (patch)
tree6065bb9e2e1f1b7ccee02cb2a2dae59810280fd3 /polly/lib/CodeGen/PPCGCodeGeneration.cpp
parent1f3881575a69f6438a0652d3d6702733556dc11a (diff)
Move ScopArrayInfo to isl++
This moves the full ScopArrayInfo class to isl++ llvm-svn: 308801
Diffstat (limited to 'polly/lib/CodeGen/PPCGCodeGeneration.cpp')
-rw-r--r--polly/lib/CodeGen/PPCGCodeGeneration.cpp34
1 files changed, 18 insertions, 16 deletions
diff --git a/polly/lib/CodeGen/PPCGCodeGeneration.cpp b/polly/lib/CodeGen/PPCGCodeGeneration.cpp
index ec4884881798..c3b8c472a59b 100644
--- a/polly/lib/CodeGen/PPCGCodeGeneration.cpp
+++ b/polly/lib/CodeGen/PPCGCodeGeneration.cpp
@@ -179,7 +179,7 @@ static MustKillsInfo computeMustKillsInfo(const Scop &S) {
for (ScopArrayInfo *SAI : S.arrays()) {
if (SAI->isPHIKind() ||
(SAI->isValueKind() && isScalarUsesContainedInScop(S, SAI)))
- KillMemIds.push_back(isl::manage(SAI->getBasePtrId()));
+ KillMemIds.push_back(isl::manage(SAI->getBasePtrId().release()));
}
Info.TaggedMustKills = isl::union_map::empty(isl::space(ParamSpace));
@@ -2423,7 +2423,7 @@ public:
}
for (auto &Array : S->arrays()) {
- auto Id = Array->getBasePtrId();
+ auto Id = Array->getBasePtrId().release();
Names = isl_id_to_ast_expr_set(Names, Id, isl_ast_expr_copy(Zero));
}
@@ -2574,19 +2574,20 @@ public:
if (isl_union_set_is_empty(AccessUSet)) {
isl_union_set_free(AccessUSet);
- return isl_set_empty(Array->getSpace());
+ return isl_set_empty(Array->getSpace().release());
}
if (Array->getNumberOfDimensions() == 0) {
isl_union_set_free(AccessUSet);
- return isl_set_universe(Array->getSpace());
+ return isl_set_universe(Array->getSpace().release());
}
isl_set *AccessSet =
- isl_union_set_extract_set(AccessUSet, Array->getSpace());
+ isl_union_set_extract_set(AccessUSet, Array->getSpace().release());
isl_union_set_free(AccessUSet);
- isl_local_space *LS = isl_local_space_from_space(Array->getSpace());
+ isl_local_space *LS =
+ isl_local_space_from_space(Array->getSpace().release());
isl_pw_aff *Val =
isl_pw_aff_from_aff(isl_aff_var_on_domain(LS, isl_dim_set, 0));
@@ -2597,12 +2598,12 @@ public:
isl_pw_aff_dim(Val, isl_dim_in));
OuterMax = isl_pw_aff_add_dims(OuterMax, isl_dim_in,
isl_pw_aff_dim(Val, isl_dim_in));
- OuterMin =
- isl_pw_aff_set_tuple_id(OuterMin, isl_dim_in, Array->getBasePtrId());
- OuterMax =
- isl_pw_aff_set_tuple_id(OuterMax, isl_dim_in, Array->getBasePtrId());
+ OuterMin = isl_pw_aff_set_tuple_id(OuterMin, isl_dim_in,
+ Array->getBasePtrId().release());
+ OuterMax = isl_pw_aff_set_tuple_id(OuterMax, isl_dim_in,
+ Array->getBasePtrId().release());
- isl_set *Extent = isl_set_universe(Array->getSpace());
+ isl_set *Extent = isl_set_universe(Array->getSpace().release());
Extent = isl_set_intersect(
Extent, isl_pw_aff_le_set(OuterMin, isl_pw_aff_copy(Val)));
@@ -2613,7 +2614,7 @@ public:
for (unsigned i = 0; i < NumDims; ++i) {
isl_pw_aff *PwAff =
- const_cast<isl_pw_aff *>(Array->getDimensionSizePw(i));
+ const_cast<isl_pw_aff *>(Array->getDimensionSizePw(i).release());
// isl_pw_aff can be NULL for zero dimension. Only in the case of a
// Fortran array will we have a legitimate dimension.
@@ -2623,7 +2624,8 @@ public:
}
isl_pw_aff *Val = isl_pw_aff_from_aff(isl_aff_var_on_domain(
- isl_local_space_from_space(Array->getSpace()), isl_dim_set, i));
+ isl_local_space_from_space(Array->getSpace().release()), isl_dim_set,
+ i));
PwAff = isl_pw_aff_add_dims(PwAff, isl_dim_in,
isl_pw_aff_dim(Val, isl_dim_in));
PwAff = isl_pw_aff_set_tuple_id(PwAff, isl_dim_in,
@@ -2680,7 +2682,7 @@ public:
}
for (unsigned i = 1; i < PPCGArray.n_index; ++i) {
- isl_pw_aff *Bound = Array->getDimensionSizePw(i);
+ isl_pw_aff *Bound = Array->getDimensionSizePw(i).release();
auto LS = isl_pw_aff_get_domain_space(Bound);
auto Aff = isl_multi_aff_zero(LS);
Bound = isl_pw_aff_pullback_multi_aff(Bound, Aff);
@@ -2714,7 +2716,7 @@ public:
gpu_array_info &PPCGArray = PPCGProg->array[i];
- PPCGArray.space = Array->getSpace();
+ PPCGArray.space = Array->getSpace().release();
PPCGArray.type = strdup(TypeName.c_str());
PPCGArray.size = Array->getElementType()->getPrimitiveSizeInBits() / 8;
PPCGArray.name = strdup(Array->getName().c_str());
@@ -2749,7 +2751,7 @@ public:
isl_union_map *Maps = isl_union_map_empty(S->getParamSpace());
for (auto &Array : S->arrays()) {
- isl_space *Space = Array->getSpace();
+ isl_space *Space = Array->getSpace().release();
Space = isl_space_map_from_set(Space);
isl_map *Identity = isl_map_identity(Space);
Maps = isl_union_map_add_map(Maps, Identity);