1 /* src/vm/jit/schedule/schedule.h - architecture independent instruction
4 Copyright (C) 1996-2005 R. Grafl, A. Krall, C. Kruegel, C. Oates,
5 R. Obermaisser, M. Platter, M. Probst, S. Ring, E. Steiner,
6 C. Thalinger, D. Thuernbeck, P. Tomsich, C. Ullrich, J. Wenninger,
7 Institut f. Computersprachen - TU Wien
9 This file is part of CACAO.
11 This program is free software; you can redistribute it and/or
12 modify it under the terms of the GNU General Public License as
13 published by the Free Software Foundation; either version 2, or (at
14 your option) any later version.
16 This program is distributed in the hope that it will be useful, but
17 WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 General Public License for more details.
21 You should have received a copy of the GNU General Public License
22 along with this program; if not, write to the Free Software
23 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
26 Contact: cacao@complang.tuwien.ac.at
28 Authors: Christian Thalinger
32 $Id: schedule.h 1985 2005-03-04 17:09:13Z twisti $
42 #include "vm/jit/reg.h"
45 typedef struct scheduledata scheduledata;
46 typedef struct minstruction minstruction;
47 typedef struct nodelink nodelink;
50 /* machine instruction flags **************************************************/
52 #define SCHEDULE_LEADER 0x01
55 /* scheduledata ****************************************************************
59 *******************************************************************************/
62 minstruction *mi; /* machine instruction array */
63 s4 micount; /* number of machine instructions */
64 nodelink *leaders; /* list containing sink nodes */
66 s4 *intregs_define_dep;
67 s4 *fltregs_define_dep;
68 s4 *memory_define_dep;
70 nodelink **intregs_use_dep;
71 nodelink **fltregs_use_dep;
72 nodelink **memory_use_dep;
76 /* minstruction ****************************************************************
78 This structure contains all information for one machine instruction
79 required to schedule it.
81 *******************************************************************************/
84 u4 instr[2]; /* machine instruction word */
86 u1 startcycle; /* start pipeline cycle */
87 u1 endcycle; /* end pipeline cycle */
88 s4 priority; /* priority of this instruction node */
89 nodelink *deps; /* operand dependencies */
90 minstruction *next; /* link to next machine instruction */
94 /* nodelink ********************************************************************
98 *******************************************************************************/
101 s4 minode; /* pointer to machine instruction */
102 nodelink *next; /* link to next node */
106 /* function prototypes ********************************************************/
108 scheduledata *schedule_init(registerdata *rd);
109 void schedule_setup(scheduledata *sd, registerdata *rd);
111 void schedule_calc_priority(minstruction *mi);
113 void schedule_add_define_dep(scheduledata *sd, s4 *define_dep, nodelink **use_dep);
114 void schedule_add_use_dep(scheduledata *sd, s4 *define_dep, nodelink **use_dep);
116 void schedule_add_memory_define_dep(scheduledata *sd);
117 void schedule_add_memory_use_dep(scheduledata *sd);
119 void schedule_do_schedule(scheduledata *sd);
121 #endif /* _SCHEDULE_H */
125 * These are local overrides for various environment variables in Emacs.
126 * Please do not remove this and leave it at the end of the file, where
127 * Emacs will automagically detect them.
128 * ---------------------------------------------------------------------
131 * indent-tabs-mode: t