This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH/RFC] [PR optimization/13567] Don't cse no-conflict block
- From: Jim Wilson <wilson at specifixinc dot com>
- To: kaz Kojima <kkojima at rr dot iij4u dot or dot jp>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: 08 Jan 2004 00:21:08 -0800
- Subject: Re: [PATCH/RFC] [PR optimization/13567] Don't cse no-conflict block
- References: <20040108.114731.126784697.kkojima@rr.iij4u.or.jp>
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