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/RFC] [PR optimization/13567] Don't cse no-conflict block


On Wed, 2004-01-07 at 18:47, kaz Kojima wrote:
> 	* cse.c (cse_basic_block): Skip cse_insn for SET insns from
> 	a no-confilict block.

This looks like the right idea.  However, it looks like you are skipping
over the last instruction of a no-conflict block, which has the
REG_EQUAL note.  We actually do want cse to use this note, as this may
be useful for later optimizations.  I think skipping all of the insns
inside the no-conflict block, but still handling the last one is right. 
So I'd suggest clearing no_conflict (along with libcall_insn) when we
see a REG_RETVAL note.  I think this is better if it works.

Another alternative is setting libcall_insn when we see a
REG_NO_CONFLICT note, instead of setting the new no_conflict variable. 
There is already code to suppress recording dest values set when
libcall_insn is set.  This may be enough to solve the problem.  If so, I
think this is an ever better fix, since simple cse of insn sources
inside the no-conflict block may result in better code.
-- 
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com


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