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]

[PATCH] S/390 Bootstrap failure due to fixup_eh_region_note


Hello Richard,

I've done as you suggested and it is certainly no surprise for you
that the assertion in question is not triggered anymore.
Here is the patch I've tested.

Bootstrapped on s390, s390x and i686 no testsuite regressions.

OK for mainline?

Bye,

-Andreas-


2005-09-06  Andreas Krebbel  <krebbel1@de.ibm.com>

	* reload1.c (fixup_eh_region_note): Remove assertion.
	(fixup_abnormal_edges): Reverted removal of call to 
	find_many_sub_basic_blocks made on 2005-08-31.


Index: gcc/reload1.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/reload1.c,v
retrieving revision 1.481
diff -p -c -r1.481 reload1.c
*** gcc/reload1.c	1 Sep 2005 23:35:18 -0000	1.481
--- gcc/reload1.c	6 Sep 2005 08:11:47 -0000
*************** fixup_eh_region_note (rtx insn, rtx prev
*** 3788,3811 ****
  	REG_NOTES (i)
  	  = gen_rtx_EXPR_LIST (REG_EH_REGION, XEXP (note, 0), REG_NOTES (i));
        }
- 
-   /* ??? Since we entered with one eh insn, we should exit with one eh insn;
-      otherwise we're unsure that we're not losing an exception.  Except that
-      the instruction stream incoming to reload doesn't pass the "if 
-      reg_eh_region is present, may_trap_p is true" smoke test.
- 
-      Worse, even if it did, rtx_addr_can_trap_p returns false for some forms
-      of address that include constants regardless of the actual value of the
-      constant.  If we decide that "int a[3]; a[100000]" should be considered
-      non-trapping, we should get that story straight across more of the
-      compiler.  If we decide that it should trap, then we cannot decide
-      may_trap_p on the basis of rtx_addr_can_trap_p at all.  Which may not
-      be such a big thing -- it doesn't seem hard to get MEM_NOTRAP_P set
-      correctly in the first place.
- 
-      Fixing all that is not in the cards for gcc 4.2, so for the nonce we
-      allow all eh insns to evaporate.  */
-   gcc_assert (trap_count <= 1);
  }
  
  /* Reload pseudo-registers into hard regs around each insn as needed.
--- 3788,3793 ----
*************** fixup_abnormal_edges (void)
*** 8191,8196 ****
--- 8173,8187 ----
  	}
      }
  
+   /* We've possibly turned single trapping insn into multiple ones.  */
+   if (flag_non_call_exceptions)
+     {
+       sbitmap blocks;
+       blocks = sbitmap_alloc (last_basic_block);
+       sbitmap_ones (blocks);
+       find_many_sub_basic_blocks (blocks);
+     }
+ 
    if (inserted)
      commit_edge_insertions ();
  


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