Skip to content

Commit 6e78cc6

Browse files
committed
[ScopInfo] Translate ParameterIds to isl++
llvm-svn: 310795
1 parent 43e3b78 commit 6e78cc6

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

polly/include/polly/ScopInfo.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1730,7 +1730,7 @@ class Scop {
17301730
ParameterSetTy Parameters;
17311731

17321732
/// Mapping from parameters to their ids.
1733-
DenseMap<const SCEV *, isl_id *> ParameterIds;
1733+
DenseMap<const SCEV *, isl::id> ParameterIds;
17341734

17351735
/// The context of the SCoP created during SCoP detection.
17361736
ScopDetection::DetectionContext &DC;

polly/lib/Analysis/ScopInfo.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2180,8 +2180,8 @@ void Scop::createParameterId(const SCEV *Parameter) {
21802180
ParameterName = getIslCompatibleName("", ParameterName, "");
21812181
}
21822182

2183-
auto *Id = isl_id_alloc(getIslCtx(), ParameterName.c_str(),
2184-
const_cast<void *>((const void *)Parameter));
2183+
isl::id Id = isl::id::alloc(getIslCtx(), ParameterName.c_str(),
2184+
const_cast<void *>((const void *)Parameter));
21852185
ParameterIds[Parameter] = Id;
21862186
}
21872187

@@ -2199,7 +2199,7 @@ void Scop::addParams(const ParameterSetTy &NewParameters) {
21992199
isl::id Scop::getIdForParam(const SCEV *Parameter) const {
22002200
// Normalize the SCEV to get the representing element for an invariant load.
22012201
Parameter = getRepresentingInvariantLoadSCEV(Parameter);
2202-
return isl::manage(isl_id_copy(ParameterIds.lookup(Parameter)));
2202+
return ParameterIds.lookup(Parameter);
22032203
}
22042204

22052205
isl::set Scop::addNonEmptyDomainConstraints(isl::set C) const {
@@ -3698,8 +3698,7 @@ Scop::~Scop() {
36983698
isl_set_free(InvalidContext);
36993699
isl_schedule_free(Schedule);
37003700

3701-
for (auto &It : ParameterIds)
3702-
isl_id_free(It.second);
3701+
ParameterIds.clear();
37033702

37043703
for (auto &AS : RecordedAssumptions)
37053704
isl_set_free(AS.Set);

0 commit comments

Comments
 (0)