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 ipa/103227] [12 Regression] 58% exchange2 regression with -Ofast -march=native on zen3 since r12-5223-gecdf414bd89e6ba251f6b3f494407139b4dbae0e
Date: Thu, 25 Nov 2021 17:17:12 +0000	[thread overview]
Message-ID: <bug-103227-4-0ffy0fKsHc@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-103227-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #13 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Martin Jambor <jamborm@gcc.gnu.org>:

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

commit r12-5527-g5bc4cb04127a4805b6228b0a6cbfebdbd61314d2
Author: Martin Jambor <mjambor@suse.cz>
Date:   Thu Nov 25 17:58:12 2021 +0100

    ipa: Teach IPA-CP transformation about IPA-SRA modifications (PR 103227)

    PR 103227 exposed an issue with ordering of transformations of IPA
    passes.  IPA-CP can create clones for constants passed by reference
    and at the same time IPA-SRA can also decide that the parameter does
    not need to be a pointer (or an aggregate) and plan to convert it
    into (a) simple scalar(s).  Because no intermediate clone is created
    just for the purpose of ordering the transformations and because
    IPA-SRA transformation is implemented as part of clone
    materialization, the IPA-CP transformation happens only afterwards,
    reversing the order of the transformations compared to the ordering of
    analyses.

    IPA-CP transformation looks at planned substitutions for values passed
    by reference or in aggregates but finds that all the relevant
    parameters no longer exist.  Currently it subsequently simply gives
    up, leading to clones created for no good purpose (and huge regression
    of 548.exchange_r.  This patch teaches it recognize the situation,
    look up the new scalarized parameter and perform value substitution on
    it.  On my desktop this has recovered the lost exchange2 run-time (and
    some more).

    I have disabled IPA-SRA in a Fortran testcase so that the dumping from
    the transformation phase can still be matched in order to verify that
    IPA-CP understands the IL after verifying that it does the right thing
    also with IPA-SRA.

    gcc/ChangeLog:

    2021-11-23  Martin Jambor  <mjambor@suse.cz>

            PR ipa/103227
            * ipa-prop.h (ipa_get_param): New overload.  Move bits of the
existing
            one to the new one.
            * ipa-param-manipulation.h (ipa_param_adjustments): New member
            function get_updated_index_or_split.
            * ipa-param-manipulation.c
            (ipa_param_adjustments::get_updated_index_or_split): New function.
            * ipa-prop.c (adjust_agg_replacement_values): Reimplement, add
            capability to identify scalarized parameters and perform
substitution
            on them.
            (ipcp_transform_function): Create descriptors earlier, handle new
            return values of adjust_agg_replacement_values.

    gcc/testsuite/ChangeLog:

    2021-11-23  Martin Jambor  <mjambor@suse.cz>

            PR ipa/103227
            * gcc.dg/ipa/pr103227-1.c: New test.
            * gcc.dg/ipa/pr103227-3.c: Likewise.
            * gcc.dg/ipa/pr103227-2.c: Likewise.
            * gfortran.dg/pr53787.f90: Disable IPA-SRA.

  parent reply	other threads:[~2021-11-25 17:17 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-13 21:05 [Bug tree-optimization/103227] New: 58% exchange2 regression with -Ofast -march=native on zen3 between g:1ae8edf5f73ca5c3 and g:2af63f0f53a12a72 hubicka at gcc dot gnu.org
2021-11-13 22:00 ` [Bug ipa/103227] " hubicka at gcc dot gnu.org
2021-11-13 22:11 ` hubicka at gcc dot gnu.org
2021-11-13 22:15 ` hubicka at gcc dot gnu.org
2021-11-15  9:04 ` [Bug ipa/103227] [12 Regression] 58% exchange2 regression with -Ofast -march=native on zen3 since r12-5223-gecdf414bd89e6ba251f6b3f494407139b4dbae0e rguenth at gcc dot gnu.org
2021-11-19 18:18 ` jamborm at gcc dot gnu.org
2021-11-19 21:12 ` hubicka at kam dot mff.cuni.cz
2021-11-19 21:22 ` hubicka at gcc dot gnu.org
2021-11-19 23:21 ` jamborm at gcc dot gnu.org
2021-11-20 12:32 ` hubicka at kam dot mff.cuni.cz
2021-11-20 12:39 ` hubicka at kam dot mff.cuni.cz
2021-11-21 15:16 ` cvs-commit at gcc dot gnu.org
2021-11-23 17:02 ` jamborm at gcc dot gnu.org
2021-11-24 12:52 ` jamborm at gcc dot gnu.org
2021-11-25 17:17 ` cvs-commit at gcc dot gnu.org [this message]
2021-11-26  9:19 ` hubicka at gcc dot gnu.org
2021-11-28 18:56 ` hubicka at gcc dot gnu.org
2022-12-14  0:04 ` cvs-commit at gcc dot gnu.org
2023-08-15 15:45 ` 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-103227-4-0ffy0fKsHc@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).