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 DCE REG_LIBCALL note moving from noop move insns (PR rtl-optimization/33644)


On Thu, Oct 18, 2007 at 08:03:26AM -0400, Kenneth Zadeck wrote:
> I actually did not know that there were such optimizations.  I thought
> that most of the back end treated libcalls as black boxes. 

AFAIK that's definitely not the case, most passes treat insns in libcall
sequences as any other insns.  The libcall notes I believe are meant as
optimization rather than optimization inhibitor, so I'd say what dce.c
does with it (treats them as optimization inhibitor) is wrong.
As optimization these notes say - if you delete the REG_RETVAL marked
insn, you can delete the whole libcall sequence, as it is now useless,
no matter what other side effects (e.g. setting hard registers) it has.
dce.c treats them as if an insn is part of libcall sequence, it must not be
deleted.

	Jakub


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