This is the mail archive of the gcc@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: remaining libjava/verify_local_live_at_start failures


> On Sun, 10 Mar 2002, Jan Hubicka wrote:
> > In case you are testing the targets that broke and the bug has
> > dissapeared or you know about targets where it remains, please
> > let me know.  It would be really helpfull!
> 
> Most errors are gone, thanks.  I see these errors with the trunk
> LAST_UPDATED Wed Mar 13 16:27:53 GMT 2002 which look related to
> your changes:
> 
> cris-axis-elf:
> g77.f-torture/execute/f90-intrinsic-bit.f: In program `MAIN__':
> g77.f-torture/execute/f90-intrinsic-bit.f:399: Internal compiler error in purge_dead_edges, at cfgrtl.c:2219
>  with -O1.
> 
> gcc.c-torture/compile/20010518-1.c: In function `emit_reload_insns':
> gcc.c-torture/compile/20010518-1.c:205: Internal compiler error in delete_insn, at cfgrtl.c:140
>  with -O1, -Os and -O2.  (This is the 20010518-1.c I recently
> told you about.  It's on 3.1 too.  I'll test your "split_insn
> fix" <URL:http://gcc.gnu.org/ml/gcc-patches/2002-03/msg00762.html>
> which looks promising.)
> 
> gcc.c-torture/execute/920501-2.c: In function `main':
> gcc.c-torture/execute/920501-2.c:114: missing barrier after block 0
> gcc.c-torture/execute/920501-2.c:114: verify_flow_info failed
>  with -O1, -O2, -O3 -fomit-frame-pointer, -O3
> -fomit-frame-pointer -funroll-loops, -O3 -fomit-frame-pointer
> -funroll-all-loops -finline-functions, -O3 -g, -Os.
> 
> gcc.c-torture/execute/950503-1.c: In function `main':
> gcc.c-torture/execute/950503-1.c:14: Internal compiler error in purge_dead_edges, at cfgrtl.c:2219
>  with -O1.
> 

Hi,
all the failures appears to be due to libcall regions nesting that confuses most
of code for handling libcalls around so eventually we end up with strange
things.  The nested region in testcase I investigated comes from libcall that
loads constant as argument and the following expander:

(define_expand "movdi"
  [(set (match_operand:DI 0 "nonimmediate_operand" "")
	(match_operand:DI 1 "general_operand" ""))]
  ""
  "
{
  if (GET_CODE (operands[0]) == MEM && operands[1] != const0_rtx)
    operands[1] = copy_to_mode_reg (DImode, operands[1]);

  /* Some other ports (as of 2001-09-10 for example mcore and romp) also
     prefer to split up constants early, like this.  The testcase in
     gcc.c-torture/execute/961213-1.c shows that CSE2 gets confused by the
     resulting subreg sets when using the construct from mcore (as of FSF
     CVS, version -r 1.5), and it believe that the high part (the last one
     emitted) is the final value.  This construct from romp seems more
     robust, especially considering the head comments from
     emit_no_conflict_block.  */

It is currently invalid to emit such no_conflict_blocks, but as I see some
other ports do the trick too, I think it is sane to allow it by simply teaching
the libcall block construction code to avoid the nesting.  It is more robust
after all too.

Note that in this particular case I think REG_EQUAL note can be enought to
represent the fact.

All the failures appears to go away, at least for me.  Can you send me
the command line where i960 dies for you?
Going to build mmix.

OK for mainline/branch?

Honza

Mon Mar 25 13:14:28 CET 2002  Jan Hubicka  <jh@suse.cz>
	* optabs.c (emit_no_conflict_block, emit_libcall_block): Avoid nesting
	of libcall regions.

*** optabs.c.old	Mon Mar 25 13:06:45 2002
--- optabs.c	Mon Mar 25 13:11:30 2002
*************** emit_no_conflict_block (insns, target, o
*** 2739,2749 ****
       these from the list.  */
    for (insn = insns; insn; insn = next)
      {
!       rtx set = 0;
        int i;
  
        next = NEXT_INSN (insn);
  
        if (GET_CODE (PATTERN (insn)) == SET || GET_CODE (PATTERN (insn)) == USE
  	  || GET_CODE (PATTERN (insn)) == CLOBBER)
  	set = PATTERN (insn);
--- 2739,2756 ----
       these from the list.  */
    for (insn = insns; insn; insn = next)
      {
!       rtx set = 0, note;
        int i;
  
        next = NEXT_INSN (insn);
  
+       /* Some ports (cris) create an libcall regions at their own.  We must
+ 	 avoid any potential nesting of LIBCALLs.  */
+       if ((note = find_reg_note (insn, REG_LIBCALL, NULL)) != NULL)
+ 	remove_note (insn, note);
+       if ((note = find_reg_note (insn, REG_RETVAL, NULL)) != NULL)
+ 	remove_note (insn, note);
+ 
        if (GET_CODE (PATTERN (insn)) == SET || GET_CODE (PATTERN (insn)) == USE
  	  || GET_CODE (PATTERN (insn)) == CLOBBER)
  	set = PATTERN (insn);
*************** emit_libcall_block (insns, target, resul
*** 2906,2911 ****
--- 2913,2926 ----
    for (insn = insns; insn; insn = next)
      {
        rtx set = single_set (insn);
+       rtx note;
+ 
+       /* Some ports (cris) create an libcall regions at their own.  We must
+ 	 avoid any potential nesting of LIBCALLs.  */
+       if ((note = find_reg_note (insn, REG_LIBCALL, NULL)) != NULL)
+ 	remove_note (insn, note);
+       if ((note = find_reg_note (insn, REG_RETVAL, NULL)) != NULL)
+ 	remove_note (insn, note);
  
        next = NEXT_INSN (insn);
  


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