On Sat, Apr 29, 2017 at 10:43:52PM +0200, Steven Bosscher wrote:
> On Wed, Apr 26, 2017 at 1:25 PM, Jakub Jelinek wrote:
> > Or shall we just:
> > --- gcc/alias.c 2017-04-25 15:51:31.072923325 +0200
> > +++ gcc/alias.c 2017-04-26 13:23:55.595048464 +0200
> > @@ -3221,6 +3221,8 @@ memory_modified_in_insn_p (const_rtx mem
> > {
> > if (!INSN_P (insn))
> > return false;
> > + if (CALL_P (insn))
> > + return true;
>
> +"&& ! RTL_CONST_OR_PURE_CALL_P (insn)" ?
Without detailed analysis of the MEM I'm not convinced it is safe.
I believe even const or pure calls invalidate e.g. the argument stack slots,
at least in the ABIs where stack slots are owned by callee, not caller.
Jakub