From: Jan Hubicka <hubicka@ucw.cz>
To: Martin Jambor <mjambor@suse.cz>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] ipa-sra: Fix address escape case when detecting Fortran descriptors
Date: Wed, 14 Dec 2022 16:34:54 +0100 [thread overview]
Message-ID: <Y5ntHoEXnwYD1XHf@kam.mff.cuni.cz> (raw)
In-Reply-To: <ri6sfhirp37.fsf@suse.cz>
> Hi,
>
> The discussion about scan_expr_access in ipa-sra.cc brought my
> attention to a missing case of handling an ADDR_EXPR. As the added
> testcase shows, the heuristics which looks for parameters which are
> local variables that are only written to and passed by reference in
> calls can miss a case where the address of the variable in question is
> stored elsewhere in an assignment.
>
> This patch adds that case to the function and also adds the
> optimization that Richi suggested, i.e. bailing out early on simple
> SSA_NAMEs and constant trees.
>
> The patch is undergoing bootstrap and testing on an x86_64-linux right
> now. OK if it passes?
>
> Thanks,
>
> Martin
>
>
> gcc/ChangeLog:
>
> 2022-12-14 Martin Jambor <mjambor@suse.cz>
>
> * ipa-sra.cc (loaded_decls): Adjust comment.
> (scan_expr_access): Also detect assignments of address of local
> variables to a variable. Bail out early on SSA_NAMEs and
> constants as an optimization.
>
> gcc/testsuite/ChangeLog:
>
> 2022-12-14 Martin Jambor <mjambor@suse.cz>
>
> * gcc.dg/ipa/ipa-sra-29.c: New test.
OK,
Thanks!
Honza
prev parent reply other threads:[~2022-12-14 15:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-14 15:18 Martin Jambor
2022-12-14 15:34 ` Jan Hubicka [this message]
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=Y5ntHoEXnwYD1XHf@kam.mff.cuni.cz \
--to=hubicka@ucw.cz \
--cc=gcc-patches@gcc.gnu.org \
--cc=mjambor@suse.cz \
/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).