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/113359] [13/14 Regression] LTO miscompilation of ceph on aarch64 and x86_64
Date: Mon, 08 Apr 2024 16:57:02 +0000	[thread overview]
Message-ID: <bug-113359-4-dTkJ5n3Eqq@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-113359-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #25 from GCC 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:1e3312a25a7b34d6e3f549273e1674c7114e4408

commit r14-9841-g1e3312a25a7b34d6e3f549273e1674c7114e4408
Author: Martin Jambor <mjambor@suse.cz>
Date:   Mon Apr 8 18:53:23 2024 +0200

    ICF&SRA: Make ICF and SRA agree on padding

    PR 113359 shows that (at least with -fno-strict-aliasing) ICF can
    unify two functions which copy an aggregate type of the same size but
    then SRA, through its total scalarization, can copy the aggregate by
    pieces, skipping paddding, but the padding was not the same in the two
    original functions that ICF unified.

    This patch enhances SRA with the ability to collect padding
    information which then can be compared from within ICF.  Unfortunately
    SRA uses OPTION_SET_P when determining its limits, so ICF needs to
    switch cfuns at least once to figure it out too.

    gcc/ChangeLog:

    2024-03-27  Martin Jambor  <mjambor@suse.cz>

            PR ipa/113359
            * ipa-icf-gimple.h (func_checker): New members
            safe_for_total_scalarization_p, m_total_scalarization_limit_known_p
            and m_total_scalarization_limit.
            (func_checker::func_checker): Initialize new member variables.
            * ipa-icf-gimple.cc: Include tree-sra.h.
            (func_checker::func_checker): Initialize new member variables.
            (func_checker::safe_for_total_scalarization_p): New function.
            (func_checker::compare_operand): Use the new function.
            * tree-sra.h (sra_get_max_scalarization_size): Declare.
            (sra_total_scalarization_would_copy_same_data_p): Likewise.
            * tree-sra.cc (prepare_iteration_over_array_elts): New function.
            (class sra_padding_collecting): New.
            (sra_padding_collecting::record_padding): Likewise.
            (scalarizable_type_p): Rename to totally_scalarizable_type_p.  Add
            ability to record padding when requested.
            (totally_scalarize_subtree): Split out gathering information
necessary
            to iterate over array elements to
prepare_iteration_over_array_elts.
            Fix errornous early exit.
            (analyze_all_variable_accesses): Adjust the call to
            totally_scalarizable_type_p.  Move determining of total
scalariation
            size limit...
            (sra_get_max_scalarization_size): ...here.
            (check_ts_and_push_padding_to_vec): New function.
            (sra_total_scalarization_would_copy_same_data_p): Likewise.

    gcc/testsuite/ChangeLog:

    2024-03-27  Martin Jambor  <mjambor@suse.cz>

            PR ipa/113359
            * gcc.dg/lto/pr113359-1_0.c: New.
            * gcc.dg/lto/pr113359-1_1.c: Likewise.
            * gcc.dg/lto/pr113359-2_0.c: Likewise.
            * gcc.dg/lto/pr113359-2_1.c: Likewise.
            * gcc.dg/lto/pr113359-3_0.c: Likewise.
            * gcc.dg/lto/pr113359-3_1.c: Likewise.
            * gcc.dg/lto/pr113359-4_0.c: Likewise.
            * gcc.dg/lto/pr113359-4_1.c: Likewise.
            * gcc.dg/lto/pr113359-5_0.c: Likewise.
            * gcc.dg/lto/pr113359-5_1.c: Likewise.

  parent reply	other threads:[~2024-04-08 16:57 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-12 18:31 [Bug tree-optimization/113359] New: [13 Regression] LTO miscompilation of ceph on aarch64 jakub at gcc dot gnu.org
2024-01-12 18:31 ` [Bug tree-optimization/113359] " jakub at gcc dot gnu.org
2024-01-12 18:32 ` jakub at gcc dot gnu.org
2024-01-12 18:32 ` jakub at gcc dot gnu.org
2024-01-12 18:33 ` jakub at gcc dot gnu.org
2024-01-12 18:34 ` [Bug ipa/113359] " jakub at gcc dot gnu.org
2024-01-12 19:54 ` jakub at gcc dot gnu.org
2024-01-12 19:56 ` jakub at gcc dot gnu.org
2024-01-12 20:29 ` pinskia at gcc dot gnu.org
2024-01-15  8:24 ` rguenth at gcc dot gnu.org
2024-02-05 21:48 ` jamborm at gcc dot gnu.org
2024-02-06  8:29 ` rguenth at gcc dot gnu.org
2024-02-06 10:00 ` hubicka at gcc dot gnu.org
2024-02-06 12:39 ` jakub at gcc dot gnu.org
2024-02-06 12:47 ` rguenther at suse dot de
2024-02-07 17:01 ` jamborm at gcc dot gnu.org
2024-02-19 15:31 ` jamborm at gcc dot gnu.org
2024-03-09 21:44 ` pinskia at gcc dot gnu.org
2024-03-09 21:45 ` sjames at gcc dot gnu.org
2024-03-09 21:45 ` [Bug ipa/113359] [13/14 " pinskia at gcc dot gnu.org
2024-03-15 15:02 ` law at gcc dot gnu.org
2024-03-15 15:13 ` avieira at gcc dot gnu.org
2024-03-15 15:25 ` law at gcc dot gnu.org
2024-03-26 10:42 ` [Bug ipa/113359] [13/14 Regression] LTO miscompilation of ceph on aarch64 and x86_64 rguenth at gcc dot gnu.org
2024-03-28  8:59 ` jamborm at gcc dot gnu.org
2024-04-04 11:40 ` hubicka at gcc dot gnu.org
2024-04-04 21:22 ` jamborm at gcc dot gnu.org
2024-04-08 16:57 ` cvs-commit at gcc dot gnu.org [this message]
2024-04-08 16:59 ` jamborm at gcc dot gnu.org
2024-04-08 17:01 ` [Bug ipa/113359] [13 " jakub at gcc dot gnu.org
2024-04-09  6:33 ` rguenth at gcc dot gnu.org
2024-05-14 11:22 ` cvs-commit at gcc dot gnu.org
2024-05-14 11:58 ` jamborm at gcc dot gnu.org
2024-05-14 12:00 ` jamborm at gcc dot gnu.org
2024-05-17 14:29 ` dkm at gcc dot gnu.org
2024-05-20 15:10 ` jamborm at gcc dot gnu.org
2024-05-20 15:13 ` dkm 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-113359-4-dTkJ5n3Eqq@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).