This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH]: Fix PR c/12372
- From: Eric Botcazou <ebotcazou at libertysurf dot fr>
- To: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- Cc: jason at redhat dot com,rth at redhat dot com,gcc-patches at gcc dot gnu dot org
- Date: Thu, 23 Oct 2003 13:33:23 +0200
- Subject: Re: [PATCH]: Fix PR c/12372
- References: <200310110435.h9B4ZLoo020504@hiauly1.hia.nrc.ca>
> Yes, except that this code has no effect. The immediately preceding
> line is
>
> flags &= ~(ECF_CONST | ECF_PURE | ECF_LIBCALL_BLOCK);
Funny indeed.
> I don't understand why other ports are not affected by this problem.
At least SPARC is affected. And the symptoms are exactly the same, except
that only one insn is deleted.
> I tend to think that in distinguishing const and pure functions, memory
> accesses to the argument block shouldn't be a determining factor. Thus,
> it would seem better to find some other way to keep the arguments of a
> const sibcall from deleted by flow. For non-sibcalls, the parameters
> are enclosed in LIBCALL...RETVAL notes preventing the individual stores
> from being considered separately for deletion.
Which leads to the obvious (and probably naive) question: why can we not do
the same for sibcalls, stretching a bit the semantics of REG_RETVAL in the
process?
--
Eric Botcazou