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]

Patch installed



I've installed this patch.  It should fix problems with splitters which
lose death notes (which in turn cause the scheduler to abort)


        * toplev.c (rest_of_compilation): No longer set reload_completed.
        * reload1.c (reload): Set it here.  Perform instruction splitting
        after reload has completed if we will be running the scheduler
        again.


Index: toplev.c
===================================================================
RCS file: /cvs/cvsfiles/devo/gcc/toplev.c,v
retrieving revision 1.335
diff -c -3 -p -r1.335 toplev.c
*** toplev.c	1998/10/21 00:43:01	1.335
--- toplev.c	1998/11/01 03:40:25
*************** rest_of_compilation (decl)
*** 3963,3970 ****
    if (failure)
      goto exit_rest_of_compilation;
  
-   reload_completed = 1;
- 
    /* Do a very simple CSE pass over just the hard registers.  */
    if (optimize > 0)
      reload_cse_regs (insns);
--- 3963,3968 ----
Index: reload1.c
===================================================================
RCS file: /cvs/cvsfiles/devo/gcc/reload1.c,v
retrieving revision 1.197
diff -c -3 -p -r1.197 reload1.c
*** reload1.c	1998/10/28 07:17:11	1.197
--- reload1.c	1998/11/01 03:40:39
*************** reload (first, global, dumpfile)
*** 1232,1237 ****
--- 1232,1241 ----
  	}
      }
  
+   /* We've finished reloading.  This reload_completed must be set before we
+      perform instruction splitting below.  */
+   reload_completed = 1;
+ 
    /* Make a pass over all the insns and delete all USEs which we inserted
       only to tag a REG_EQUAL note on them.  Remove all REG_DEAD and REG_UNUSED
       notes.  Delete all CLOBBER insns and simplify (subreg (reg)) operands.  */
*************** reload (first, global, dumpfile)
*** 1263,1268 ****
--- 1267,1290 ----
  
  	/* And simplify (subreg (reg)) if it appears as an operand.  */
  	cleanup_subreg_operands (insn);
+ 
+ 	/* If optimizing and we are performing instruction scheduling after
+ 	   reload, then go ahead and split insns now since we are about to
+ 	   recompute flow information anyway.  */
+ 	if (optimize && flag_schedule_insns_after_reload)
+ 	  {
+ 	    rtx last, first;
+ 
+ 	    last = try_split (PATTERN (insn), insn, 1);
+ 
+ 	    if (last != insn)
+ 	      {
+ 		PUT_CODE (insn, NOTE);
+ 		NOTE_SOURCE_FILE (insn) = 0;
+ 		NOTE_LINE_NUMBER (insn) = NOTE_INSN_DELETED;
+ 	      }
+ 	  }
+ 	   
        }
  
    /* If we are doing stack checking, give a warning if this function's


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