From: Martin Jambor <mjambor@suse.cz>
To: Richard Biener <rguenther@suse.de>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>, Jan Hubicka <hubicka@ucw.cz>
Subject: Re: [PATCH] tree-sra: Avoid returns of references to SRA candidates
Date: Tue, 28 Nov 2023 17:16:09 +0100 [thread overview]
Message-ID: <ri6zfyxhn06.fsf@> (raw)
In-Reply-To: <nycvar.YFH.7.77.849.2311280805200.21409@jbgna.fhfr.qr>
On Tue, Nov 28 2023, Richard Biener wrote:
> On Mon, 27 Nov 2023, Martin Jambor wrote:
>
>> Hi,
>>
>> The enhancement to address PR 109849 contained an importsnt thinko,
>> and that any reference that is passed to a function and does not
>> escape, must also not happen to be aliased by the return value of the
>> function. This has quickly transpired as bugs PR 112711 and PR
>> 112721.
>>
>> Just as IPA-modref does a good enough job to allow us to rely on the
>> escaped set of variables, it sems to be doing well also on updating
>> EAF_NOT_RETURNED_DIRECTLY call argument flag which happens to address
>> exactly the situation we need to avoid. Of course, if a call
>> statement ignores any returned value, we also do not need to check the
>> flag.
>
> But what about EAF_NOT_RETURNED_INDIRECTLY? Don't you need to
> verify the parameter doesn't escape through the return at all?
>
I thought EAF_NOT_RETURNED_INDIRECTLY prohibits things like "return
param->next" but those are not a problem (whatever next points to cannot
be an SRA candidate and any ADDR_EXPR storing its address there would
trigger a disqualification or at least an assert). But I guess I am
wrong, what is actually the exact meaning of the flag?
Thanks,
Martin
next prev parent reply other threads:[~2023-11-28 16:16 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-27 18:16 Martin Jambor
2023-11-28 8:05 ` Richard Biener
2023-11-28 16:16 ` Martin Jambor [this message]
2023-11-28 16:33 ` Richard Biener
2023-11-28 16:59 ` Jan Hubicka
2023-11-28 17:30 ` Richard Biener
2023-11-28 17:38 ` Jan Hubicka
2023-11-28 18:35 ` Richard Biener
2023-11-29 12:04 ` Martin Jambor
2023-11-29 12:18 ` Jan Hubicka
[not found] <6564dd10.050a0220.70a2b.e9d6SMTPIN_ADDED_BROKEN@mx.google.com>
2023-11-27 18:20 ` Andrew Pinski
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=ri6zfyxhn06.fsf@ \
--to=mjambor@suse.cz \
--cc=gcc-patches@gcc.gnu.org \
--cc=hubicka@ucw.cz \
--cc=rguenther@suse.de \
/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).