This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH]: Fix PR c/12372


> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]