* Re: Question about apparently obsolete comment in gcse.c
[not found] ` <20040607164318.GC28128@redhat.com>
@ 2004-06-07 18:04 ` Steven Bosscher
2004-06-07 18:19 ` Richard Henderson
0 siblings, 1 reply; 2+ messages in thread
From: Steven Bosscher @ 2004-06-07 18:04 UTC (permalink / raw)
To: Richard Henderson; +Cc: jh, gcc-patches
On Monday 07 June 2004 18:43, Richard Henderson wrote:
> On Mon, Jun 07, 2004 at 12:32:52PM +0200, Steven Bosscher wrote:
> > Should gcse, in the code mentioned above, be looking at the successors of
> > bb and do nothing if there are no abnormal edges there?
>
> Yes.
Actually, wouldn't this do the trick too? This doesn't handle the
non-local label case mentioned in the comment before the function,
but the existing check doesn't do that either.
* gcse.c (compute_transpout): Check if the last insn in a
block is a call that may throw.
Index: gcse.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/gcse.c,v
retrieving revision 1.303
diff -c -3 -p -r1.303 gcse.c
*** gcse.c 14 May 2004 15:35:11 -0000 1.303
--- gcse.c 7 Jun 2004 12:28:41 -0000
*************** compute_transpout (void)
*** 5047,5056 ****
FOR_EACH_BB (bb)
{
! /* Note that flow inserted a nop a the end of basic blocks that
! end in call instructions for reasons other than abnormal
! control flow. */
! if (GET_CODE (BB_END (bb)) != CALL_INSN)
continue;
for (i = 0; i < expr_hash_table.size; i++)
--- 5047,5054 ----
FOR_EACH_BB (bb)
{
! if (GET_CODE (BB_END (bb)) != CALL_INSN
! || !can_throw_internal (BB_END (bb)))
continue;
for (i = 0; i < expr_hash_table.size; i++)
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Question about apparently obsolete comment in gcse.c
2004-06-07 18:04 ` Question about apparently obsolete comment in gcse.c Steven Bosscher
@ 2004-06-07 18:19 ` Richard Henderson
0 siblings, 0 replies; 2+ messages in thread
From: Richard Henderson @ 2004-06-07 18:19 UTC (permalink / raw)
To: Steven Bosscher; +Cc: jh, gcc-patches
On Mon, Jun 07, 2004 at 06:53:53PM +0200, Steven Bosscher wrote:
> Actually, wouldn't this do the trick too? This doesn't handle the
> non-local label case mentioned in the comment before the function,
> but the existing check doesn't do that either.
I'd just as soon you check the edges to check the conditions
mentioned in the comment. That's *definitely* the most correct
thing to do.
And it shouldn't take very long at all, since if there are any
abnormal edges, all but the single fallthru edge will be abnormal.
r~
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-06-07 17:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <2284245.1086604372102.SLOX.WebMail.wwwrun@extimap.suse.de>
[not found] ` <20040607164318.GC28128@redhat.com>
2004-06-07 18:04 ` Question about apparently obsolete comment in gcse.c Steven Bosscher
2004-06-07 18:19 ` Richard Henderson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).