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/93385] [10/11/12 Regression] wrong code with u128 modulo at -O2 -fno-dce -fno-ipa-cp -fno-tree-dce
Date: Mon, 28 Jun 2021 16:28:04 +0000	[thread overview]
Message-ID: <bug-93385-4-TLZLGOBh0d@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-93385-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #45 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:87467f45e831e8e943efdae8920453741986d355

commit r12-1847-g87467f45e831e8e943efdae8920453741986d355
Author: Martin Jambor <mjambor@suse.cz>
Date:   Mon Jun 28 18:20:00 2021 +0200

    ipa-sra: Restructure how cloning and call redirection communicate (PR
93385)

    I was asked by Richi to split my fix for PR 93385 for easier review
    into IPA-SRA materialization refactoring and the actual DCE addition.
    Fortunately it was mostly natural except for a temporary weird
    condition in ipa_param_body_adjustments::modify_call_stmt.
    Additionally.  In addition to the patch I posted previously, this one
    also deallocated the newly added summary in toplev::finalize and fixes
    a mistakenly uninitialized field.

    This is the first part which basically replaces performed_splits in
    clone_info and the code which generates it, keeps it up-to-date and
    consumes it with new edge summaries which are much nicer.  It simply
    contains 1) a mapping from the original argument indices to the actual
    indices in the call statement as it is now, 2) information needed to
    identify arguments representing pass-through IPA-SRA splits with which
    have been added to the call arguments in place of an original
    argument/reference and 3) a delta to the index where va_args may start
    - so basically directly all the information that the consumer of
    performed_splits had to compute and we also do not need the weird
    dummy declarations.

    The main disadvantage is that the information has to be created (and
    kept up-to-date) for all call graph edges associated with the given
    statement from all clones (including inline clones) of the clone where
    splitting or removal happened first.  But all of this happens during
    clone materialization so the only effect on WPA memory consumption is
    the removal of a pointer from clone_info.

    The statement modification code also has to know the statement from
    the original function in order to be able to locate the edge summaries
    which at this point are still keyed to these.  However, the code is
    already quite heavily dependant on how things are structured in
    tree-inline.c and in order to fix bugs like these it probably has to
    be.

    The subsequent patch needs this new information to be able to remove
    arguments from calls during materialization and communicate this
    information to the call redirection.

    gcc/ChangeLog:

    2021-05-17  Martin Jambor  <mjambor@suse.cz>

            PR ipa/93385
            * symtab-clones.h (clone_info): Removed member param_adjustments.
            * ipa-param-manipulation.h: Adjust initial comment to reflect how
we
            deal with pass-through splits now.
            (ipa_param_performed_split): Removed.
            (ipa_param_adjustments::modify_call): Adjusted parameters.
            (class ipa_param_body_adjustments): Adjusted parameters of
            register_replacement, modify_gimple_stmt and modify_call_stmt.
            (ipa_verify_edge_has_no_modifications): Declare.
            (ipa_edge_modifications_finalize): Declare.
            * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Remove
            performed_splits processing, pas only edge to padjs->modify_call,
            check that call arguments were not modified if they should not have
            been.
            * cgraphclones.c (cgraph_node::create_clone): Do not copy performed
            splits.
            * ipa-param-manipulation.c (struct pass_through_split_map): New
type.
            (ipa_edge_modification_info): Likewise.
            (ipa_edge_modification_sum): Likewise.
            (ipa_edge_modifications): New edge summary.
            (ipa_verify_edge_has_no_modifications): New function.
            (transitive_split_p): Removed.
            (transitive_split_map): Likewise.
            (init_transitive_splits): Likewise.
            (ipa_param_adjustments::modify_call): Adjusted to use the new edge
            summary instead of performed_splits.
            (ipa_param_body_adjustments::register_replacement): Drop dummy
            parameter, set base_index of the created
ipa_param_body_replacement.
            (phi_arg_will_live_p): New function.
            (ipa_param_body_adjustments::common_initialization): Do not create
            IPA_SRA dummy decls.
            (simple_tree_swap_info): Removed.
            (remap_split_decl_to_dummy): Likewise.
            (record_argument_state_1): New function.
            (record_argument_state): Likewise.
            (ipa_param_body_adjustments::modify_call_stmt): New parameter
            orig_stmt.  Do not work with dummy decls, save necessary info about
            changes to ipa_edge_modifications.
            (ipa_param_body_adjustments::modify_gimple_stmt): New parameter
            orig_stmt, pass it to modify_call_stmt.
            (ipa_param_body_adjustments::modify_cfun_body): Adjust call to
            modify_gimple_stmt.
            (ipa_edge_modifications_finalize): New function.
            * tree-inline.c (remap_gimple_stmt): Pass original statement to
            modify_gimple_stmt.
            (copy_phis_for_bb): Do not copy dead PHI nodes.
            (expand_call_inline): Do not remap performed_splits.
            (update_clone_info): Likewise.
            * toplev.c: Include ipa-param-manipulation.h.
            (toplev::finalize): Call ipa_edge_modifications_finalize.

  parent reply	other threads:[~2021-06-28 16:28 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-93385-4@http.gcc.gnu.org/bugzilla/>
2020-03-15 11:58 ` [Bug ipa/93385] [10 " jakub at gcc dot gnu.org
2020-04-09  9:25 ` rguenth at gcc dot gnu.org
2020-04-17 11:50 ` jamborm at gcc dot gnu.org
2020-04-17 12:06 ` jakub at gcc dot gnu.org
2020-04-17 12:08 ` rguenth at gcc dot gnu.org
2020-04-17 12:09 ` jakub at gcc dot gnu.org
2020-04-17 12:16 ` rguenther at suse dot de
2020-04-17 13:41 ` jamborm at gcc dot gnu.org
2020-04-17 13:53 ` jakub at gcc dot gnu.org
2020-04-17 14:00 ` rguenther at suse dot de
2020-04-17 14:00 ` jamborm at gcc dot gnu.org
2020-04-17 14:11 ` jakub at gcc dot gnu.org
2020-04-17 14:23 ` jakub at gcc dot gnu.org
2020-04-20  8:14 ` rguenther at suse dot de
2020-04-20  9:06 ` jakub at gcc dot gnu.org
2020-04-20 21:02 ` jamborm at gcc dot gnu.org
2020-04-21 10:34 ` rguenth at gcc dot gnu.org
2020-04-21 13:00 ` jakub at gcc dot gnu.org
2020-05-04 12:03 ` [Bug ipa/93385] [10/11 " cvs-commit at gcc dot gnu.org
2020-05-07 11:56 ` jakub at gcc dot gnu.org
2020-05-28 12:33 ` jamborm at gcc dot gnu.org
2020-06-08 18:18 ` jamborm at gcc dot gnu.org
2020-07-23  6:51 ` rguenth at gcc dot gnu.org
2020-07-27 15:04 ` jamborm at gcc dot gnu.org
2020-11-26 12:01 ` jamborm at gcc dot gnu.org
2021-01-21 15:18 ` jakub at gcc dot gnu.org
2021-03-12 12:51 ` jamborm at gcc dot gnu.org
2021-03-30 13:12 ` jamborm at gcc dot gnu.org
2021-04-08 12:02 ` rguenth at gcc dot gnu.org
2021-04-27 13:35 ` [Bug ipa/93385] [10/11/12 " jamborm at gcc dot gnu.org
2021-05-12 11:40 ` jamborm at gcc dot gnu.org
2021-06-28 16:28 ` cvs-commit at gcc dot gnu.org [this message]
2021-06-28 16:28 ` cvs-commit at gcc dot gnu.org
2021-06-28 17:30 ` [Bug ipa/93385] [10/11 " jamborm at gcc dot gnu.org
2021-11-04 17:09 ` cvs-commit at gcc dot gnu.org
2022-06-28 10:39 ` jakub at gcc dot gnu.org
2023-07-07 10:36 ` [Bug ipa/93385] [11 " rguenth at gcc dot gnu.org
2023-07-14 20:09 ` pinskia at gcc dot gnu.org
2023-07-29  8:07 ` pinskia at gcc dot gnu.org
2023-07-29  9:16 ` xry111 at gcc dot gnu.org
2023-07-29  9:43 ` rguenther at suse dot de

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-93385-4-TLZLGOBh0d@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).