This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] ira: volatile asm's are not moveable (PR82602)
- From: Segher Boessenkool <segher at kernel dot crashing dot org>
- To: Bernd Edlinger <bernd dot edlinger at hotmail dot de>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Vladimir Makarov <vmakarov at redhat dot com>
- Date: Wed, 18 Oct 2017 06:30:23 -0500
- Subject: Re: [PATCH] ira: volatile asm's are not moveable (PR82602)
- Authentication-results: sourceware.org; auth=none
- References: <AM5PR0701MB2657C556D5D99A66BF79B74FE44D0@AM5PR0701MB2657.eurprd07.prod.outlook.com>
On Wed, Oct 18, 2017 at 11:10:48AM +0000, Bernd Edlinger wrote:
> A memory clobber would also make rtx_moveable_p return false,
> thru the following case:
>
> case MEM:
> if (type == OP_IN && MEM_READONLY_P (x))
> return rtx_moveable_p (&XEXP (x, 0), OP_IN);
> return false;
>
> ...
>
> case CLOBBER:
> return rtx_moveable_p (&SET_DEST (x), OP_OUT);
>
>
> because that memory clobber is in a parallel statement
> together with the ASM_OUTPUT.
>
> Right?
Yes, that looks correct. And a memory clobber of course _should_ make
the insn non-moveable as well -- it's an unknown side effect all by
itself :-)
Segher