/// @param Parameter A SCEV that was recognized as a Parameter.
///
/// @return The corresponding isl_id or NULL otherwise.
- __isl_give isl_id *getIdForParam(const SCEV *Parameter) const;
+ isl::id getIdForParam(const SCEV *Parameter) const;
/// Get the maximum region of this static control part.
///
}
}
-__isl_give isl_id *Scop::getIdForParam(const SCEV *Parameter) const {
+isl::id Scop::getIdForParam(const SCEV *Parameter) const {
// Normalize the SCEV to get the representing element for an invariant load.
Parameter = getRepresentingInvariantLoadSCEV(Parameter);
- return isl_id_copy(ParameterIds.lookup(Parameter));
+ return isl::manage(isl_id_copy(ParameterIds.lookup(Parameter)));
}
__isl_give isl_set *
if (!Values.count(AccInst))
continue;
- if (isl_id *ParamId = getIdForParam(Parameter)) {
+ if (isl_id *ParamId = getIdForParam(Parameter).release()) {
int Dim = isl_set_find_dim_by_id(DomainCtx, isl_dim_param, ParamId);
if (Dim >= 0)
DomainCtx = isl_set_eliminate(DomainCtx, isl_dim_param, Dim, 1);
unsigned PDim = 0;
for (const SCEV *Parameter : Parameters) {
- isl::id Id = isl::manage(getIdForParam(Parameter));
+ isl::id Id = getIdForParam(Parameter);
Space = Space.set_dim_id(isl::dim::param, PDim++, Id);
}
bool IslNodeBuilder::materializeParameters() {
for (const SCEV *Param : S.parameters()) {
- isl_id *Id = S.getIdForParam(Param);
+ isl_id *Id = S.getIdForParam(Param).release();
if (!materializeValue(Id))
return false;
}
}
if (SE.isSCEVable(AccInstTy)) {
- isl_id *ParamId = S.getIdForParam(SE.getSCEV(AccInst));
+ isl_id *ParamId = S.getIdForParam(SE.getSCEV(AccInst)).release();
if (ParamId)
IDToValue[ParamId] = PreloadVal;
isl_id_free(ParamId);
auto *Zero = isl_ast_expr_from_val(isl_val_zero(S->getIslCtx()));
for (const SCEV *P : S->parameters()) {
- isl_id *Id = S->getIdForParam(P);
+ isl_id *Id = S->getIdForParam(P).release();
Names = isl_id_to_ast_expr_set(Names, Id, isl_ast_expr_copy(Zero));
}
// expression, but create a new parameter in the isl_pw_aff. This allows us
// to treat subexpressions that we cannot translate into an piecewise affine
// expression, as constant parameters of the piecewise affine expression.
- if (isl_id *Id = S->getIdForParam(Expr)) {
+ if (isl_id *Id = S->getIdForParam(Expr).release()) {
isl_space *Space = isl_space_set_alloc(Ctx, 1, NumIterators);
Space = isl_space_set_dim_id(Space, isl_dim_param, 0, Id);