From b86a5e40b4dcddf530798307f99896f6ab99bcaf Mon Sep 17 00:00:00 2001 From: Alex Reinking Date: Thu, 21 Nov 2024 15:51:05 -0500 Subject: [PATCH] Remove unused is_update argument Affects apply_split in ApplySplit.cpp and build_loop_nest in ScheduleFunctions.cpp --- src/ApplySplit.cpp | 2 +- src/ApplySplit.h | 2 +- src/Func.cpp | 8 ++++---- src/ScheduleFunctions.cpp | 9 ++++----- 4 files changed, 10 insertions(+), 11 deletions(-) diff --git a/src/ApplySplit.cpp b/src/ApplySplit.cpp index 48d27b1ffc7a..7bcdc521ba4e 100644 --- a/src/ApplySplit.cpp +++ b/src/ApplySplit.cpp @@ -11,7 +11,7 @@ using std::map; using std::string; using std::vector; -vector apply_split(const Split &split, bool is_update, const string &prefix, +vector apply_split(const Split &split, const string &prefix, map &dim_extent_alignment) { vector result; diff --git a/src/ApplySplit.h b/src/ApplySplit.h index 5e646b22f08b..4f74aea9ec62 100644 --- a/src/ApplySplit.h +++ b/src/ApplySplit.h @@ -79,7 +79,7 @@ struct ApplySplitResult { * defined the values of variables referred by the predicates and substitutions * (ordered from innermost to outermost let). */ std::vector apply_split( - const Split &split, bool is_update, const std::string &prefix, + const Split &split, const std::string &prefix, std::map &dim_extent_alignment); /** Compute the loop bounds of the new dimensions resulting from applying the diff --git a/src/Func.cpp b/src/Func.cpp index 4a33eea8f686..f5f47e134458 100644 --- a/src/Func.cpp +++ b/src/Func.cpp @@ -659,7 +659,7 @@ bool apply_split(const Split &s, vector &rvars, rvars.insert(it + 1, {s.outer, 0, simplify((old_extent - 1 + s.factor) / s.factor)}); - vector splits_result = apply_split(s, true, "", dim_extent_alignment); + vector splits_result = apply_split(s, "", dim_extent_alignment); vector> bounds_let_stmts = compute_loop_bounds_after_split(s, ""); apply_split_result(bounds_let_stmts, splits_result, predicates, args, values); @@ -694,7 +694,7 @@ bool apply_fuse(const Split &s, vector &rvars, iter_outer->extent = extent; rvars.erase(iter_inner); - vector splits_result = apply_split(s, true, "", dim_extent_alignment); + vector splits_result = apply_split(s, "", dim_extent_alignment); vector> bounds_let_stmts = compute_loop_bounds_after_split(s, ""); apply_split_result(bounds_let_stmts, splits_result, predicates, args, values); @@ -718,7 +718,7 @@ bool apply_purify(const Split &s, vector &rvars, << ", deleting it from the rvars list\n"; rvars.erase(iter); - vector splits_result = apply_split(s, true, "", dim_extent_alignment); + vector splits_result = apply_split(s, "", dim_extent_alignment); vector> bounds_let_stmts = compute_loop_bounds_after_split(s, ""); apply_split_result(bounds_let_stmts, splits_result, predicates, args, values); @@ -738,7 +738,7 @@ bool apply_rename(const Split &s, vector &rvars, debug(4) << " Renaming " << iter->var << " into " << s.outer << "\n"; iter->var = s.outer; - vector splits_result = apply_split(s, true, "", dim_extent_alignment); + vector splits_result = apply_split(s, "", dim_extent_alignment); vector> bounds_let_stmts = compute_loop_bounds_after_split(s, ""); apply_split_result(bounds_let_stmts, splits_result, predicates, args, values); diff --git a/src/ScheduleFunctions.cpp b/src/ScheduleFunctions.cpp index a853b24af341..52c43a5f1ef8 100644 --- a/src/ScheduleFunctions.cpp +++ b/src/ScheduleFunctions.cpp @@ -174,8 +174,7 @@ Stmt build_loop_nest( const string &prefix, int start_fuse, const Function &func, - const Definition &def, - bool is_update) { + const Definition &def) { const auto &dims = func.args(); const auto &func_s = func.schedule(); const auto &stage_s = def.schedule(); @@ -220,7 +219,7 @@ Stmt build_loop_nest( user_assert(predicated_vars.count(split.old_var) == 0) << "Cannot split a loop variable resulting from a split using PredicateLoads or PredicateStores."; - vector splits_result = apply_split(split, is_update, prefix, dim_extent_alignment); + vector splits_result = apply_split(split, prefix, dim_extent_alignment); // To ensure we substitute all indices used in call or provide, // we need to substitute all lets in, so we correctly guard x in @@ -503,7 +502,7 @@ Stmt build_provide_loop_nest(const map &env, } // Default schedule/values if there is no specialization - Stmt stmt = build_loop_nest(body, prefix, start_fuse, func, def, is_update); + Stmt stmt = build_loop_nest(body, prefix, start_fuse, func, def); stmt = inject_placeholder_prefetch(stmt, env, prefix, def.schedule().prefetches()); // Make any specialized copies @@ -847,7 +846,7 @@ Stmt build_extern_produce(const map &env, Function f, const Ta Definition f_def_no_pred = f.definition().get_copy(); f_def_no_pred.predicate() = const_true(); - return build_loop_nest(check, f.name() + ".s0.", -1, f, f_def_no_pred, false); + return build_loop_nest(check, f.name() + ".s0.", -1, f, f_def_no_pred); } // A schedule may include explicit bounds on some dimension. This