Skip to content

Commit

Permalink
Remove unused function in HexagonOptimize
Browse files Browse the repository at this point in the history
  • Loading branch information
steven-johnson committed Dec 16, 2024
1 parent 5264706 commit 937fab5
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions src/HexagonOptimize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -141,24 +141,6 @@ string type_suffix(const vector<Expr> &ops, bool signed_variants) {

namespace {

// Helper to handle various forms of multiplication.
Expr as_mul(const Expr &a) {
if (a.as<Mul>()) {
return a;
} else if (const Call *wm = Call::as_intrinsic(a, {Call::widening_mul})) {
return simplify(Mul::make(cast(wm->type, wm->args[0]), cast(wm->type, wm->args[1])));
} else if (const Call *s = Call::as_intrinsic(a, {Call::shift_left, Call::widening_shift_left})) {
auto log2_b = as_const_uint(s->args[1]);
if (log2_b) {
Expr b = make_one(s->type) << cast(UInt(s->type.bits()), (int)*log2_b);
return simplify(Mul::make(cast(s->type, s->args[0]), b));
}
} else if (const Call *wm = Call::as_intrinsic(a, {Call::widen_right_mul})) {
return simplify(Mul::make(wm->args[0], cast(wm->type, wm->args[1])));
}
return Expr();
}

// Helpers to generate horizontally reducing multiply operations.
Expr halide_hexagon_add_2mpy(Type result_type, const string &suffix, Expr v0, Expr v1, Expr c0, Expr c1) {
Expr call = Call::make(result_type, "halide.hexagon.add_2mpy" + suffix,
Expand Down

0 comments on commit 937fab5

Please sign in to comment.