return Ast.getRunCondition();
}
-IslAstUserPayload *IslAstInfo::getNodePayload(__isl_keep isl_ast_node *Node) {
- isl_id *Id = isl_ast_node_get_annotation(Node);
+IslAstUserPayload *IslAstInfo::getNodePayload(const isl::ast_node &Node) {
+ isl::id Id = Node.get_annotation();
if (!Id)
return nullptr;
- IslAstUserPayload *Payload = (IslAstUserPayload *)isl_id_get_user(Id);
- isl_id_free(Id);
+ IslAstUserPayload *Payload = (IslAstUserPayload *)Id.get_user();
return Payload;
}
bool IslAstInfo::isInnermost(__isl_keep isl_ast_node *Node) {
- IslAstUserPayload *Payload = getNodePayload(Node);
+ IslAstUserPayload *Payload = getNodePayload(isl::manage_copy(Node));
return Payload && Payload->IsInnermost;
}
}
bool IslAstInfo::isInnermostParallel(__isl_keep isl_ast_node *Node) {
- IslAstUserPayload *Payload = getNodePayload(Node);
+ IslAstUserPayload *Payload = getNodePayload(isl::manage_copy(Node));
return Payload && Payload->IsInnermostParallel;
}
bool IslAstInfo::isOutermostParallel(__isl_keep isl_ast_node *Node) {
- IslAstUserPayload *Payload = getNodePayload(Node);
+ IslAstUserPayload *Payload = getNodePayload(isl::manage_copy(Node));
return Payload && Payload->IsOutermostParallel;
}
bool IslAstInfo::isReductionParallel(__isl_keep isl_ast_node *Node) {
- IslAstUserPayload *Payload = getNodePayload(Node);
+ IslAstUserPayload *Payload = getNodePayload(isl::manage_copy(Node));
return Payload && Payload->IsReductionParallel;
}
__isl_give isl_union_map *
IslAstInfo::getSchedule(__isl_keep isl_ast_node *Node) {
- IslAstUserPayload *Payload = getNodePayload(Node);
+ IslAstUserPayload *Payload = getNodePayload(isl::manage_copy(Node));
return Payload ? isl_ast_build_get_schedule(Payload->Build) : nullptr;
}
__isl_give isl_pw_aff *
IslAstInfo::getMinimalDependenceDistance(__isl_keep isl_ast_node *Node) {
- IslAstUserPayload *Payload = getNodePayload(Node);
+ IslAstUserPayload *Payload = getNodePayload(isl::manage_copy(Node));
return Payload ? Payload->MinimalDependenceDistance.copy() : nullptr;
}
IslAstInfo::MemoryAccessSet *
IslAstInfo::getBrokenReductions(__isl_keep isl_ast_node *Node) {
- IslAstUserPayload *Payload = getNodePayload(Node);
+ IslAstUserPayload *Payload = getNodePayload(isl::manage_copy(Node));
return Payload ? &Payload->BrokenReductions : nullptr;
}
isl_ast_build *IslAstInfo::getBuild(__isl_keep isl_ast_node *Node) {
- IslAstUserPayload *Payload = getNodePayload(Node);
+ IslAstUserPayload *Payload = getNodePayload(isl::manage_copy(Node));
return Payload ? Payload->Build : nullptr;
}