Minor haifa cleanup

Jeffrey A Law law@cygnus.com
Sat Oct 16 20:51:00 GMT 1999


While investigating some lameness in haifa I came across this minor 
cleanup.

A few months ago haifa was changed to clear out the LOG_LINKS of each insn
before analyzing the instruction.

So, whatever log links previously existed on each instruction are zapped.

Thus, we do not need to worry about explicitly zapping links in sched2 that
were set up by the region scheduling code in sched1.

	* haifa-sched.c (schedule_insns): Do not remove inter-block
	dependencies anymore.

Index: haifa-sched.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/haifa-sched.c,v
retrieving revision 1.115
diff -c -3 -p -r1.115 haifa-sched.c
*** haifa-sched.c	1999/10/16 08:54:07	1.115
--- haifa-sched.c	1999/10/17 03:46:17
*************** schedule_insns (dump_file)
*** 6845,6884 ****
  	  break;
        }
  
-   /* After reload, remove inter-blocks dependences computed before reload.  
*/
-   if (reload_completed)
-     {
-       int b;
-       rtx insn;
- 
-       for (b = 0; b < n_basic_blocks; b++)
- 	for (insn = BLOCK_HEAD (b);; insn = NEXT_INSN (insn))
- 	  {
- 	    rtx link, prev;
- 
- 	    if (GET_RTX_CLASS (GET_CODE (insn)) == 'i')
- 	      {
- 		prev = NULL_RTX;
- 		link = LOG_LINKS (insn);
- 		while (link)
- 		  {
- 		    rtx x = XEXP (link, 0);
- 
- 		    if (INSN_BLOCK (x) != b)
- 		      {
- 		        remove_dependence (insn, x);
- 			link = prev ? XEXP (prev, 1) : LOG_LINKS (insn);
- 		      }
- 		    else
- 		      prev = link, link = XEXP (prev, 1);
- 		  }
- 	      }
- 
- 	    if (insn == BLOCK_END (b))
- 	      break;
- 	  }
-     }
- 
    nr_regions = 0;
    rgn_table = (region *) alloca ((n_basic_blocks) * sizeof (region));
    rgn_bb_table = (int *) alloca ((n_basic_blocks) * sizeof (int));
--- 6845,6850 ----




More information about the Gcc-patches mailing list