public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/100089] [11/12 Regression] 30% performance regression for denbench/mp2decoddata2 with -O3
Date: Tue, 24 Aug 2021 09:36:14 +0000	[thread overview]
Message-ID: <bug-100089-4-dFjEoLSWk9@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-100089-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100089

--- Comment #8 from Richard Biener <rguenth at gcc dot gnu.org> ---
So if we agree to a sane way to cost branchy code on the scalar side then it
should be possible to compare the scalar cost of the not if-converted inner
loop body against the full partially vectorized and if-converted inner loop
body.

vect_bb_vectorization_profitable_p would have to add the cost of the scalar
stmts not covered by vectorization - this set is conveniently available as
the set of stmts not having the visited flag set before we clear it here:

vect_bb_vectorization_profitable_p (bb_vec_info bb_vinfo,
                                    vec<slp_instance> slp_instances)
{
...
  /* Unset visited flag.  */
  stmt_info_for_cost *cost;
  FOR_EACH_VEC_ELT (scalar_costs, i, cost)
    gimple_set_visited  (cost->stmt_info->stmt, false);

so we'd need to walk over all stmts in the BB and add the cost of the
not marked stmts to the vector cost.  We'd want to force a single
SLP "subgraph" in this mode to avoid going over the whole block
multiple times.

  parent reply	other threads:[~2021-08-24  9:36 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-15  6:35 [Bug tree-optimization/100089] New: [11 Performance regression ] 30% " crazylht at gmail dot com
2021-04-15  7:17 ` [Bug tree-optimization/100089] [11 Regression] 30% performance regression " rguenth at gcc dot gnu.org
2021-04-27 11:40 ` [Bug tree-optimization/100089] [11/12 " jakub at gcc dot gnu.org
2021-05-12  8:19 ` rsandifo at gcc dot gnu.org
2021-05-12  8:27 ` rguenth at gcc dot gnu.org
2021-07-28  7:06 ` rguenth at gcc dot gnu.org
2021-08-23 12:47 ` rguenth at gcc dot gnu.org
2021-08-24  1:28 ` cvs-commit at gcc dot gnu.org
2021-08-24  9:36 ` rguenth at gcc dot gnu.org [this message]
2021-08-24 10:34 ` rguenth at gcc dot gnu.org
2021-08-24 12:23 ` cvs-commit at gcc dot gnu.org
2021-08-24 12:27 ` rguenth at gcc dot gnu.org
2021-08-30 12:05 ` rguenth at gcc dot gnu.org
2021-08-31 10:27 ` rguenth at gcc dot gnu.org
2022-01-21 12:34 ` rguenth at gcc dot gnu.org
2022-01-21 13:23 ` cvs-commit at gcc dot gnu.org
2022-01-21 13:24 ` [Bug tree-optimization/100089] [11 " rguenth at gcc dot gnu.org
2022-04-21  7:49 ` rguenth at gcc dot gnu.org
2023-05-29 10:04 ` jakub at gcc dot gnu.org

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=bug-100089-4-dFjEoLSWk9@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@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: link
Be 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).