for (auto &Access : AccessFunctions)
if (Access->getScopArrayInfo() == Array)
Access->setAccessRelation(Access->getAccessRelation().apply_range(
- isl::manage(isl_map_copy(Transform))));
+ isl::manage_copy(Transform)));
isl_map_free(Transform);
extractScalarValues(Load, VectorMap, ScalarMaps);
Value *NewLoad;
- if (Access.isStrideZero(isl::manage(isl_map_copy(Schedule))))
+ if (Access.isStrideZero(isl::manage_copy(Schedule)))
NewLoad = generateStrideZeroLoad(Stmt, Load, ScalarMaps[0], NewAccesses);
- else if (Access.isStrideOne(isl::manage(isl_map_copy(Schedule))))
+ else if (Access.isStrideOne(isl::manage_copy(Schedule)))
NewLoad = generateStrideOneLoad(Stmt, Load, ScalarMaps, NewAccesses);
- else if (Access.isStrideX(isl::manage(isl_map_copy(Schedule)), -1))
+ else if (Access.isStrideX(isl::manage_copy(Schedule), -1))
NewLoad = generateStrideOneLoad(Stmt, Load, ScalarMaps, NewAccesses, true);
else
NewLoad = generateUnknownStrideLoad(Stmt, Load, ScalarMaps, NewAccesses);
// the data location.
extractScalarValues(Store, VectorMap, ScalarMaps);
- if (Access.isStrideOne(isl::manage(isl_map_copy(Schedule)))) {
+ if (Access.isStrideOne(isl::manage_copy(Schedule))) {
Type *VectorPtrType = getVectorPtrTy(Pointer, getVectorWidth());
Value *NewPointer = generateLocationAccessed(Stmt, Store, ScalarMaps[0],
VLTS[0], NewAccesses);
for (auto RWAccIt1 = RWAccIt0 + 1; RWAccIt1 != RWAccEnd; ++RWAccIt1)
RunCondition = isl_ast_expr_and(
RunCondition,
- buildCondition(S, isl::manage(isl_ast_build_copy(Build)), RWAccIt0,
- RWAccIt1)
+ buildCondition(S, isl::manage_copy(Build), RWAccIt0, RWAccIt1)
.release());
for (const Scop::MinMaxAccessTy &ROAccIt : MinMaxReadOnly)
RunCondition = isl_ast_expr_and(
RunCondition,
- buildCondition(S, isl::manage(isl_ast_build_copy(Build)), RWAccIt0,
- &ROAccIt)
+ buildCondition(S, isl::manage_copy(Build), RWAccIt0, &ROAccIt)
.release());
}
}
__isl_take isl_ast_print_options *O,
__isl_keep isl_ast_node *Node,
void *User) {
- isl::ast_node AstNode = isl::manage(isl_ast_node_copy(Node));
+ isl::ast_node AstNode = isl::manage_copy(Node);
isl::ast_expr NodeExpr = AstNode.user_get_expr();
isl::ast_expr CallExpr = NodeExpr.get_op_arg(0);
isl::id CallExprId = CallExpr.get_id();
else
P = isl_printer_print_str(P, "/* write */ ");
- isl::ast_build Build =
- isl::manage(isl_ast_build_copy(IslAstInfo::getBuild(Node)));
+ isl::ast_build Build = isl::manage_copy(IslAstInfo::getBuild(Node));
if (MemAcc->isAffine()) {
isl_pw_multi_aff *PwmaPtr =
MemAcc->applyScheduleToAccessRelation(Build.get_schedule()).release();
Value *IV;
CmpInst::Predicate Predicate;
- bool LoopVectorizerDisabled =
- IsLoopVectorizerDisabled(isl::manage(isl_ast_node_copy(For)));
+ bool LoopVectorizerDisabled = IsLoopVectorizerDisabled(isl::manage_copy(For));
Body = isl_ast_node_for_get_body(For);
auto *Build = IslAstInfo::getBuild(Node);
assert(Build && "Could not obtain isl_ast_build from user node");
- Stmt->setAstBuild(isl::manage(isl_ast_build_copy(Build)));
+ Stmt->setAstBuild(isl::manage_copy(Build));
for (auto *MA : *Stmt) {
if (!MA->hasNewAccessRelation()) {
// bits. These are -- in case wrapping intrinsics are used -- translated to
// runtime library calls that are not available on all systems (e.g., Android)
// and consequently will result in linker errors.
- if (ExprBuilder.hasLargeInts(isl::manage(isl_ast_expr_copy(Condition)))) {
+ if (ExprBuilder.hasLargeInts(isl::manage_copy(Condition))) {
isl_ast_expr_free(Condition);
return Builder.getFalse();
}
if (!Stmt || !Build_C)
return NULL;
- isl::ast_build Build = isl::manage(isl_ast_build_copy(Build_C));
+ isl::ast_build Build = isl::manage_copy(Build_C);
isl::ctx Ctx = Build.get_ctx();
isl::id_to_ast_expr RefToExpr = isl::id_to_ast_expr::alloc(Ctx, 0);
Value *ArraySize = ConstantInt::get(Builder.getInt64Ty(), Array->size);
if (!gpu_array_is_scalar(Array)) {
- isl::multi_pw_aff ArrayBound =
- isl::manage(isl_multi_pw_aff_copy(Array->bound));
+ isl::multi_pw_aff ArrayBound = isl::manage_copy(Array->bound);
isl::pw_aff OffsetDimZero = ArrayBound.get_pw_aff(0);
isl::ast_expr Res = Build.expr_from(OffsetDimZero);
isl::ast_build Build = isl::ast_build::from_context(S.getContext());
- isl::set Min = isl::manage(isl_set_copy(Array->extent)).lexmin();
+ isl::set Min = isl::manage_copy(Array->extent).lexmin();
isl::set ZeroSet = isl::set::universe(Min.get_space());
std::vector<Value *> Sizes;
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));
+ isl::multi_pw_aff GridSizePwAffs = isl::manage_copy(Kernel->grid_size);
for (long i = 0; i < Kernel->n_grid; i++) {
isl::pw_aff Size = GridSizePwAffs.get_pw_aff(i);
isl::ast_expr GridSize = Context.expr_from(Size);
Arg->setName(Kernel->array[i].array->name);
isl_id *Id = isl_space_get_tuple_id(Prog->array[i].space, isl_dim_set);
- const ScopArrayInfo *SAI =
- ScopArrayInfo::getFromId(isl::manage(isl_id_copy(Id)));
+ const ScopArrayInfo *SAI = ScopArrayInfo::getFromId(isl::manage_copy(Id));
Type *EleTy = SAI->getElementType();
Value *Val = &*Arg;
SmallVector<const SCEV *, 4> Sizes;
continue;
isl_id *Id = isl_space_get_tuple_id(Prog->array[i].space, isl_dim_set);
- const ScopArrayInfo *SAI =
- ScopArrayInfo::getFromId(isl::manage(isl_id_copy(Id)));
+ const ScopArrayInfo *SAI = ScopArrayInfo::getFromId(isl::manage_copy(Id));
isl_id_free(Id);
if (SAI->getNumberOfDimensions() > 0) {
continue;
isl_id *Id = isl_space_get_tuple_id(Prog->array[i].space, isl_dim_set);
- const ScopArrayInfo *SAI =
- ScopArrayInfo::getFromId(isl::manage(isl_id_copy(Id)));
+ const ScopArrayInfo *SAI = ScopArrayInfo::getFromId(isl::manage_copy(Id));
isl_id_free(Id);
if (SAI->getNumberOfDimensions() > 0) {
}
LLVM_DUMP_METHOD void polly::dumpPw(__isl_keep isl_set *Set) {
- dumpPw(isl::manage(isl_set_copy(Set)));
+ dumpPw(isl::manage_copy(Set));
}
LLVM_DUMP_METHOD void polly::dumpPw(__isl_keep isl_map *Map) {
- dumpPw(isl::manage(isl_map_copy(Map)));
+ dumpPw(isl::manage_copy(Map));
}
LLVM_DUMP_METHOD void polly::dumpPw(__isl_keep isl_union_set *USet) {
- dumpPw(isl::manage(isl_union_set_copy(USet)));
+ dumpPw(isl::manage_copy(USet));
}
LLVM_DUMP_METHOD void polly::dumpPw(__isl_keep isl_union_map *UMap) {
- dumpPw(isl::manage(isl_union_map_copy(UMap)));
+ dumpPw(isl::manage_copy(UMap));
}
LLVM_DUMP_METHOD void polly::dumpExpanded(const isl::set &Set) {
}
LLVM_DUMP_METHOD void polly::dumpExpanded(__isl_keep isl_set *Set) {
- dumpExpanded(isl::manage(isl_set_copy(Set)));
+ dumpExpanded(isl::manage_copy(Set));
}
LLVM_DUMP_METHOD void polly::dumpExpanded(__isl_keep isl_map *Map) {
- dumpExpanded(isl::manage(isl_map_copy(Map)));
+ dumpExpanded(isl::manage_copy(Map));
}
LLVM_DUMP_METHOD void polly::dumpExpanded(__isl_keep isl_union_set *USet) {
- dumpExpanded(isl::manage(isl_union_set_copy(USet)));
+ dumpExpanded(isl::manage_copy(USet));
}
LLVM_DUMP_METHOD void polly::dumpExpanded(__isl_keep isl_union_map *UMap) {
- dumpExpanded(isl::manage(isl_union_map_copy(UMap)));
+ dumpExpanded(isl::manage_copy(UMap));
}
#endif
auto *SmallerDom =
isl_pw_aff_lt_set(OpPWAC.first.copy(), isl_pw_aff_neg(ExpPWA));
auto *OutOfBoundsDom = isl_set_union(SmallerDom, GreaterDom);
- OpPWAC.second =
- OpPWAC.second.unite(isl::manage(isl_set_copy(OutOfBoundsDom)));
+ OpPWAC.second = OpPWAC.second.unite(isl::manage_copy(OutOfBoundsDom));
if (!BB) {
assert(isl_set_dim(OutOfBoundsDom, isl_dim_set) == 0 &&
// Does Proposed write at the same time as Existing already does (order of
// writes is undefined)? Writing the same value is permitted.
- auto ExistingWrittenDomain =
- isl::manage(isl_union_map_domain(Existing.Written.copy()));
+ auto ExistingWrittenDomain = Existing.Written.domain();
auto BothWritten =
Existing.Written.domain().intersect(Proposed.Written.domain());
auto ExistingKnownWritten = filterKnownValInst(Existing.Written);
// matrix B, the second operand of the matrix multiplication.
Node = Node.parent().parent().parent().parent().parent().parent();
Node = isl::manage(isl_schedule_node_band_split(Node.release(), 2)).child(0);
- auto AccRel = getMatMulAccRel(isl::manage(MapOldIndVar.copy()), 3, 7);
+ auto AccRel = getMatMulAccRel(MapOldIndVar, 3, 7);
unsigned FirstDimSize = MacroParams.Nc / MicroParams.Nr;
unsigned SecondDimSize = MacroParams.Kc;
unsigned ThirdDimSize = MicroParams.Nr;
auto DomainId = Domain.get_tuple_id();
auto *NewStmt = Stmt->getParent()->addScopStmt(
OldAcc, MMI.B->getLatestAccessRelation(), Domain);
- ExtMap = ExtMap.set_tuple_id(isl::dim::out, isl::manage(DomainId.copy()));
- ExtMap = ExtMap.intersect_range(isl::manage(Domain.copy()));
+ ExtMap = ExtMap.set_tuple_id(isl::dim::out, DomainId);
+ ExtMap = ExtMap.intersect_range(Domain);
ExtMap = ExtMap.set_tuple_id(isl::dim::out, NewStmt->getDomainId());
Node = createExtensionNode(Node, ExtMap);
// Create a copy statement that corresponds to the memory access
// to the matrix A, the first operand of the matrix multiplication.
Node = Node.child(0);
- AccRel = getMatMulAccRel(isl::manage(MapOldIndVar.copy()), 4, 6);
+ AccRel = getMatMulAccRel(MapOldIndVar, 4, 6);
FirstDimSize = MacroParams.Mc / MicroParams.Mr;
ThirdDimSize = MicroParams.Mr;
SAI = Stmt->getParent()->createScopArrayInfo(
auto Domain = Node.get_universe_domain();
assert(isl_union_set_n_set(Domain.keep()) == 1);
if (Node.get_schedule_depth() != 0 ||
- (isl::set(isl::manage(Domain.copy())).dim(isl::dim::set) !=
+ (isl::set(Domain).dim(isl::dim::set) !=
isl_schedule_node_band_n_member(Node.keep())))
return Node;
Node = isl::manage(isl_schedule_node_delete(Node.take()));
__isl_give isl_schedule_node *
ScheduleTreeOptimizer::optimizeBand(__isl_take isl_schedule_node *Node,
void *User) {
- if (!isTileableBandNode(isl::manage(isl_schedule_node_copy(Node))))
+ if (!isTileableBandNode(isl::manage_copy(Node)))
return Node;
const OptimizerAdditionalInfoTy *OAI =
MatMulInfoTy MMI;
if (PMBasedOpts && User &&
- isMatrMultPattern(isl::manage(isl_schedule_node_copy(Node)), OAI->D,
- MMI)) {
+ isMatrMultPattern(isl::manage_copy(Node), OAI->D, MMI)) {
DEBUG(dbgs() << "The matrix multiplication pattern was detected\n");
MatMulOpts++;
return optimizeMatMulPattern(isl::manage(Node), OAI->TTI, MMI).release();
isl_schedule_node_foreach_descendant_top_down(
Root.get(),
[](__isl_keep isl_schedule_node *nodeptr, void *user) -> isl_bool {
- isl::schedule_node Node = isl::manage(isl_schedule_node_copy(nodeptr));
+ isl::schedule_node Node = isl::manage_copy(nodeptr);
int Version = *static_cast<int *>(user);
switch (isl_schedule_node_get_type(Node.get())) {