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: Question about apparently obsolete comment in gcse.c


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++)


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