public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeff Law <jeffreyalaw@gmail.com>
To: Andrew Pinski <pinskia@gmail.com>,
	Richard Biener <richard.guenther@gmail.com>
Cc: Andrew Pinski <apinski@marvell.com>, gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] Mark asm goto with outputs as volatile
Date: Wed, 28 Jun 2023 10:20:00 -0600	[thread overview]
Message-ID: <11194a0f-42d6-48f8-184a-b0ba9b9586da@gmail.com> (raw)
In-Reply-To: <CA+=Sn1mQ_-XU1qrW8zyQD3tH9jDyh6nXVN7eKS1WAcouB3g5OQ@mail.gmail.com>



On 6/27/23 11:23, Andrew Pinski via Gcc-patches wrote:
> On Tue, Jun 27, 2023 at 12:14 AM Richard Biener via Gcc-patches
> <gcc-patches@gcc.gnu.org> wrote:
>>
>> On Tue, Jun 27, 2023 at 5:26 AM Andrew Pinski via Gcc-patches
>> <gcc-patches@gcc.gnu.org> wrote:
>>>
>>> The manual references asm goto as being implicitly volatile already
>>> and that was done when asm goto could not have outputs. When outputs
>>> were added to `asm goto`, only asm goto without outputs were still being
>>> marked as volatile. Now some parts of GCC decide, removing the `asm goto`
>>> is ok if the output is not used, though not updating the CFG (this happens
>>> on both the RTL level and the gimple level). Since the biggest user of `asm goto`
>>> is the Linux kernel and they expect them to be volatile (they use them to
>>> copy to/from userspace), we should just mark the inline-asm as volatile.
>>>
>>> OK? Bootstrapped and tested on x86_64-linux-gnu.
>>
>> OK.
> 
> Committed to GCC 12 and GCC 13 branches also.
The test should be conditional on target lra since we don't support asm 
goto on the reload targets.

It looks like gcc.dg/pr108095.c needs similar adjustment.  Consider a 
patch to make those adjustments pre-approved.

jeff

  reply	other threads:[~2023-06-28 16:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-27  3:24 Andrew Pinski
2023-06-27  7:13 ` Richard Biener
2023-06-27 17:23   ` Andrew Pinski
2023-06-28 16:20     ` Jeff Law [this message]
2023-06-27  7:36 ` Andreas Schwab

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=11194a0f-42d6-48f8-184a-b0ba9b9586da@gmail.com \
    --to=jeffreyalaw@gmail.com \
    --cc=apinski@marvell.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=pinskia@gmail.com \
    --cc=richard.guenther@gmail.com \
    /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).