public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Richard Sandiford <rsandifo@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r12-4407] arm: Remove add_stmt_cost hook Date: Thu, 14 Oct 2021 15:35:56 +0000 (GMT) [thread overview] Message-ID: <20211014153556.1C65A3857C51@sourceware.org> (raw) https://gcc.gnu.org/g:1975395021e34088865e6566e281622a218be70e commit r12-4407-g1975395021e34088865e6566e281622a218be70e Author: Richard Sandiford <richard.sandiford@arm.com> Date: Thu Oct 14 16:35:41 2021 +0100 arm: Remove add_stmt_cost hook The arm implementation of add_stmt_cost was added alongside arm_builtin_vectorization_cost. At that time it was necessary to override the latter when overriding the former, since default_add_stmt_cost didn't indirect through the builtin_vectorization_cost target hook: int stmt_cost = default_builtin_vectorization_cost (kind, vectype, misalign); That was fixed by: | 2014-06-06 Bingfeng Mei <bmei@broadcom.com> | | * targhooks.c (default_add_stmt_cost): Call target specific | hook instead of default one. so the arm definition of add_stmt_cost is now equivalent to the default. gcc/ * config/arm/arm.c (arm_add_stmt_cost): Delete. (TARGET_VECTORIZE_ADD_STMT_COST): Delete. Diff: --- gcc/config/arm/arm.c | 40 ---------------------------------------- 1 file changed, 40 deletions(-) diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index d8c5d2bc7db..e51f60a1841 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -304,11 +304,6 @@ static bool aarch_macro_fusion_pair_p (rtx_insn*, rtx_insn*); static int arm_builtin_vectorization_cost (enum vect_cost_for_stmt type_of_cost, tree vectype, int misalign ATTRIBUTE_UNUSED); -static unsigned arm_add_stmt_cost (vec_info *vinfo, void *data, int count, - enum vect_cost_for_stmt kind, - struct _stmt_vec_info *stmt_info, - tree vectype, int misalign, - enum vect_cost_model_location where); static void arm_canonicalize_comparison (int *code, rtx *op0, rtx *op1, bool op0_preserve_value); @@ -769,8 +764,6 @@ static const struct attribute_spec arm_attribute_table[] = #undef TARGET_VECTORIZE_BUILTIN_VECTORIZATION_COST #define TARGET_VECTORIZE_BUILTIN_VECTORIZATION_COST \ arm_builtin_vectorization_cost -#undef TARGET_VECTORIZE_ADD_STMT_COST -#define TARGET_VECTORIZE_ADD_STMT_COST arm_add_stmt_cost #undef TARGET_CANONICALIZE_COMPARISON #define TARGET_CANONICALIZE_COMPARISON \ @@ -12242,39 +12235,6 @@ arm_builtin_vectorization_cost (enum vect_cost_for_stmt type_of_cost, } } -/* Implement targetm.vectorize.add_stmt_cost. */ - -static unsigned -arm_add_stmt_cost (vec_info *vinfo, void *data, int count, - enum vect_cost_for_stmt kind, - struct _stmt_vec_info *stmt_info, tree vectype, - int misalign, enum vect_cost_model_location where) -{ - unsigned *cost = (unsigned *) data; - unsigned retval = 0; - - if (flag_vect_cost_model) - { - int stmt_cost = arm_builtin_vectorization_cost (kind, vectype, misalign); - - /* Statements in an inner loop relative to the loop being - vectorized are weighted more heavily. The value here is - arbitrary and could potentially be improved with analysis. */ - if (where == vect_body && stmt_info - && stmt_in_inner_loop_p (vinfo, stmt_info)) - { - loop_vec_info loop_vinfo = dyn_cast<loop_vec_info> (vinfo); - gcc_assert (loop_vinfo); - count *= LOOP_VINFO_INNER_LOOP_COST_FACTOR (loop_vinfo); /* FIXME. */ - } - - retval = (unsigned) (count * stmt_cost); - cost[where] += retval; - } - - return retval; -} - /* Return true if and only if this insn can dual-issue only as older. */ static bool cortexa7_older_only (rtx_insn *insn)
reply other threads:[~2021-10-14 15:35 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20211014153556.1C65A3857C51@sourceware.org \ --to=rsandifo@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).