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]

mainline patch for issue info


I've worked up a patch for Alpha to align instruction groups
properly so that they may be slotted and issued in the same cycle.

To do this well, I need additional info from Haifa, describing what
it expects to be able to simultaneously issue.  I accomplish this
by marking instructions that begin a group with TImode.  This does
of course clobber the annotations reload left; for that reason I
don't add this info for machines that can't dual issue at all.

Ok?


r~


	* haifa-sched.c (last_clock_var): New.
	(schedule_block): Initialize it.
	(schedule_insn): Use it to fill insn modes with issue information.

Index: haifa-sched.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/haifa-sched.c,v
retrieving revision 1.64
diff -c -p -d -r1.64 haifa-sched.c
*** haifa-sched.c	1998/07/02 06:26:36	1.64
--- haifa-sched.c	1998/08/18 19:39:39
*************** adjust_priority (prev)
*** 4257,4262 ****
--- 4257,4265 ----
      }
  }
  
+ /* Clock at which the previous instruction was issued.  */
+ static int last_clock_var;
+ 
  /* INSN is the "currently executing insn".  Launch each insn which was
     waiting on INSN.  READY is a vector of insns which are ready to fire.
     N_READY is the number of elements in READY.  CLOCK is the current
*************** schedule_insn (insn, ready, n_ready, clo
*** 4341,4346 ****
--- 4344,4360 ----
  	}
      }
  
+   /* Annotate the instruction with issue information -- TImode 
+      indicates that the instruction is expected not to be able
+      to issue on the same cycle as the previous insn.  A machine
+      may use this information to decide how the instruction should
+      be aligned.  */
+   if (reload_completed && issue_rate > 1)
+     {
+       PUT_MODE (insn, clock > last_clock_var ? TImode : VOIDmode);
+       last_clock_var = clock;
+     }
+ 
    return n_ready;
  }
  
*************** schedule_block (bb, rgn_n_insns)
*** 6717,6722 ****
--- 6731,6737 ----
    q_ptr = 0;
    q_size = 0;
    clock_var = 0;
+   last_clock_var = 0;
    bzero ((char *) insn_queue, sizeof (insn_queue));
  
    /* We start inserting insns after PREV_HEAD.  */


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