public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/109849] suboptimal code for vector walking loop
Date: Sun, 18 Jun 2023 16:59:18 +0000	[thread overview]
Message-ID: <bug-109849-4-vZTvLR4jx6@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-109849-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #15 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jan Hubicka <hubicka@gcc.gnu.org>:

https://gcc.gnu.org/g:5a1ef1cfac005370d0a5a0f85798724cb2c9cf5e

commit r14-1909-g5a1ef1cfac005370d0a5a0f85798724cb2c9cf5e
Author: Honza <jh@ryzen3.suse.cz>
Date:   Sun Jun 18 18:58:26 2023 +0200

    Analyze SRA candidates in ipa-fnsummary

    this patch extends ipa-fnsummary to anticipate statements that will be
removed
    by SRA.  This is done by looking for calls passing addresses of automatic
    variables.  In function body we look for dereferences from pointers of such
    variables and mark them with new not_sra_candidate condition.

    This is just first step which is overly optimistic.  We do not try to prove
that
    given automatic variable will not be SRAed even after inlining.  We now
also
    optimistically assume that the transformation will always happen.  I will
restrict
    this in a followup patch, but I think it is useful to gether some data on
how
    much code is affected by this.

    This is motivated by PR109849 where we fail to fully inline push_back.
    The patch alone does not solve the problem even for -O3, but improves
    analysis in this case.

    gcc/ChangeLog:

            PR tree-optimization/109849
            * ipa-fnsummary.cc (evaluate_conditions_for_known_args): Add new
parameter
            ES; handle ipa_predicate::not_sra_candidate.
            (evaluate_properties_for_edge): Pass es to
            evaluate_conditions_for_known_args.
            (ipa_fn_summary_t::duplicate): Handle sra candidates.
            (dump_ipa_call_summary): Dump points_to_possible_sra_candidate.
            (load_or_store_of_ptr_parameter): New function.
            (points_to_possible_sra_candidate_p): New function.
            (analyze_function_body): Initialize
points_to_possible_sra_candidate;
            determine sra predicates.
            (estimate_ipcp_clone_size_and_time): Update call of
            evaluate_conditions_for_known_args.
            (remap_edge_params): Update points_to_possible_sra_candidate.
            (read_ipa_call_summary): Stream points_to_possible_sra_candidate
            (write_ipa_call_summary): Likewise.
            * ipa-predicate.cc (ipa_predicate::add_clause): Handle
not_sra_candidate.
            (dump_condition): Dump it.
            * ipa-predicate.h (struct inline_param_summary): Add
            points_to_possible_sra_candidate.

    gcc/testsuite/ChangeLog:

            PR tree-optimization/109849
            * g++.dg/ipa/devirt-45.C: Update template.

  parent reply	other threads:[~2023-06-18 16:59 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-13 22:26 [Bug middle-end/109849] New: " hubicka at gcc dot gnu.org
2023-05-13 22:32 ` [Bug middle-end/109849] " pinskia at gcc dot gnu.org
2023-05-13 22:40 ` pinskia at gcc dot gnu.org
2023-05-14  5:57 ` amonakov at gcc dot gnu.org
2023-05-14  9:58 ` hubicka at ucw dot cz
2023-05-14 10:01 ` hubicka at ucw dot cz
2023-05-15  6:56 ` rguenth at gcc dot gnu.org
2023-05-17 14:53 ` hubicka at gcc dot gnu.org
2023-05-17 20:36 ` rguenth at gcc dot gnu.org
2023-05-18  9:35 ` hubicka at gcc dot gnu.org
2023-05-18 11:54 ` rguenth at gcc dot gnu.org
2023-05-18 13:00 ` hubicka at gcc dot gnu.org
2023-05-23  9:57 ` cvs-commit at gcc dot gnu.org
2023-05-23 10:10 ` rguenth at gcc dot gnu.org
2023-05-24 11:19 ` cvs-commit at gcc dot gnu.org
2023-06-16 14:20 ` hubicka at gcc dot gnu.org
2023-06-18 16:59 ` cvs-commit at gcc dot gnu.org [this message]
2023-06-19 16:28 ` cvs-commit at gcc dot gnu.org
2023-06-26 16:30 ` cvs-commit at gcc dot gnu.org
2023-06-28  9:47 ` cvs-commit at gcc dot gnu.org
2023-06-29 20:46 ` cvs-commit at gcc dot gnu.org
2023-06-30 14:28 ` cvs-commit at gcc dot gnu.org
2023-11-19 15:25 ` hubicka at gcc dot gnu.org
2023-11-21 14:17 ` cvs-commit at gcc dot gnu.org
2023-11-21 15:12 ` hubicka at gcc dot gnu.org
2023-11-24 16:35 ` cvs-commit at gcc dot gnu.org
2023-11-24 17:00 ` cvs-commit at gcc dot gnu.org
2023-11-24 17:00 ` jamborm at gcc dot gnu.org
2023-11-27 14:39 ` rguenth at gcc dot gnu.org
2023-11-28  9:33 ` redi at gcc dot gnu.org
2023-11-28 10:32 ` jamborm at gcc dot gnu.org
2023-11-28 12:41 ` redi at gcc dot gnu.org
2023-11-28 13:29 ` redi at gcc dot gnu.org
2023-11-28 15:29 ` redi at gcc dot gnu.org
2023-11-28 22:21 ` redi at gcc dot gnu.org
2023-11-29 12:27 ` hubicka at ucw dot cz
2023-11-29 15:25 ` cvs-commit at gcc dot gnu.org
2024-01-03 17:41 ` jamborm 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-109849-4-vZTvLR4jx6@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).