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]

Re: RFA: non-const libcalls


On May 12, 2001, Richard Henderson <rth@redhat.com> wrote:

> On Sat, May 12, 2001 at 09:14:09AM -0300, Alexandre Oliva wrote:
>> These
>> +@code{MEM}s are used only in @code{LIBCALL}s, because they don't
>> +introduce basic blocks.

> Err, no.  Basic blocks have nothing to do with this.  These
> mems are used only on CONST_CALL_P libcalls.

My recollection of this is fuzzy.  The port I worked on that used lots
of by-reference arguments to libcalls faced problems of having stores
into the stack slots used to pass arguments deleted because of some
pass that looked for dead stores.  I'm pretty sure there was no
problem in case the stores came before a regular call because this
thing operated only within basic blocks, but in the case of libcalls,
it failed, because it ended up deciding the store was dead if it
happened to be in the exit block.  Or something like that.  Do you
recognize this pattern of keeping track of stores looking for dead
ones?  Could you point me at the pass or chunk of code that does that,
to refresh my memory?  I poked around for a while, found something in
flow that seemed to be what I was looking for, but I'm not sure.

>> +A register or memory region specified in a @code{clobber} in this list
>> +is modified @emph{after} the execution of the @code{call_insn} (i.e.,
>> +it's preserved during the execution of the @code{call_insn} itself, but
>> +the called function is assumed to clobber it), while a register
>> +specified in a @code{clobber} in the body of the @code{call_insn} is
>> +clobbered before the insn completes execution (i.e., it's modified
>> +before the callee starts executing).

> This distinction is meaningless.  The call pattern is atomic as far
> as the compiler is concerned.

Ok to remove the original paragraph, then?

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me


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