summaryrefslogtreecommitdiffstats
path: root/gcc/target.h
diff options
context:
space:
mode:
authorzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>2001-08-18 20:25:54 +0000
committerzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>2001-08-18 20:25:54 +0000
commit747af5e778fd8703ab7c4c5bbf3cfaacbee6bb7f (patch)
treeaaae6cbc02ac7bffabdd0d787362314965ff9d55 /gcc/target.h
parentad99e708993275cfd0d666486d9c1b8bc7107416 (diff)
downloadppe42-gcc-747af5e778fd8703ab7c4c5bbf3cfaacbee6bb7f.tar.gz
ppe42-gcc-747af5e778fd8703ab7c4c5bbf3cfaacbee6bb7f.zip
* haifa-sched.c: Convert to target hooks. Macros replaced
are ISSUE_RATE, ADJUST_COST, ADJUST_PRIORITY, MD_SCHED_INIT, MD_SCHED_REORDER, MD_SCHED_REORDER2, MD_SCHED_VARIABLE_ISSUE, MD_SCHED_FINISH, and HAVE_cycle_display. * target-def.h (TARGET_SCHED_ADJUST_COST, TARGET_SCHED_ADJUST_PRIORITY, TARGET_SCHED_ISSUE_RATE, TARGET_SCHED_VARIABLE_ISSUE, TARGET_SCHED_INIT, TARGET_SCHED_FINISH, TARGET_SCHED_REORDER, TARGET_SCHED_REORDER2, TARGET_SCHED_CYCLE_DISPLAY): New hook #defines to be overridden. (TARGET_SCHED): Bring them all together. (TARGET_INITIALIZER): Update. * target.h: Don't forward declare struct rtx_def. Use 'rtx' instead of 'struct rtx_def *' throughout. (struct sched): New set of hooks for the scheduler. * Makefile.in (haifa-sched.o): Depend on target.h. * doc/tm.texi: Document the new scheduler hooks, together in their own section, instead of scattered around. Fix a bunch of underfull/overfull hboxes. * a29k.h, alpha.h, arm.h, c4x.h, convex.h, d30v.h, i386.h, ia64.h, m32r.h, m88k.h, mips.h, pa.h, rs6000.h, s390.h, sh.h, sparc.h: Don't define any of the old scheduler macros. * a29k.c, alpha.c, arm.c, c4x.c, convex.c, d30v.c, i386.c, ia64.c, m32r.c, m88k.c, mips.c, pa.c, rs6000.c, s390.c, sh.c, sparc.c: Create hook functions from code extracted from corresponding target header, or make existing hooks static, as appropriate. Set the appropriate entries in targetm. * alpha-protos.h, arm-protos.h, c4x-protos.h, d30v-protos.h, i386-protos.h, ia64-protos.h, m32r-protos.h, pa-protos.h, rs6000-protos.h, s390-protos.h, sparc-protos.h: Remove prototypes for functions which are now static. * d30v.h, d30v.c, m32r.h, m32r.c: Remove #ifdef HAIFA and related gunk; the Haifa scheduler is now the only choice. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@45009 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/target.h')
-rw-r--r--gcc/target.h54
1 files changed, 44 insertions, 10 deletions
diff --git a/gcc/target.h b/gcc/target.h
index bc839c5c829..8d73f496ba0 100644
--- a/gcc/target.h
+++ b/gcc/target.h
@@ -44,9 +44,6 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
to gradually reduce the amount of conditional compilation that is
scattered throughout GCC. */
-/* Forward declaration for the benefit of prototypes. */
-struct rtx_def;
-
struct gcc_target
{
/* Functions that output assembler for the target. */
@@ -72,12 +69,52 @@ struct gcc_target
void (* named_section) PARAMS ((const char *, unsigned int));
/* Output a constructor for a symbol with a given priority. */
- void (* constructor) PARAMS ((struct rtx_def *, int));
+ void (* constructor) PARAMS ((rtx, int));
/* Output a destructor for a symbol with a given priority. */
- void (* destructor) PARAMS ((struct rtx_def *, int));
+ void (* destructor) PARAMS ((rtx, int));
} asm_out;
+ /* Functions relating to instruction scheduling. */
+ struct sched
+ {
+ /* Given the current cost, COST, of an insn, INSN, calculate and
+ return a new cost based on its relationship to DEP_INSN through
+ the dependence LINK. The default is to make no adjustment. */
+ int (* adjust_cost) PARAMS ((rtx insn, rtx link, rtx def_insn, int cost));
+
+ /* Adjust the priority of an insn as you see fit. Returns the new
+ priority. */
+ int (* adjust_priority) PARAMS ((rtx, int));
+
+ /* Function which returns the maximum number of insns that can be
+ scheduled in the same machine cycle. This must be constant
+ over an entire compilation. The default is 1. */
+ int (* issue_rate) PARAMS ((void));
+
+ /* Calculate how much this insn affects how many more insns we
+ can emit this cycle. Default is they all cost the same. */
+ int (* variable_issue) PARAMS ((FILE *, int, rtx, int));
+
+ /* Initialize machine-dependent scheduling code. */
+ void (* md_init) PARAMS ((FILE *, int, int));
+
+ /* Finalize machine-dependent scheduling code. */
+ void (* md_finish) PARAMS ((FILE *, int));
+
+ /* Reorder insns in a machine-dependent fashion, in two different
+ places. Default does nothing. */
+ int (* reorder) PARAMS ((FILE *, int, rtx *, int *, int));
+ int (* reorder2) PARAMS ((FILE *, int, rtx *, int *, int));
+
+ /* cycle_display is a pointer to a function which can emit
+ data into the assembly stream about the current cycle.
+ Arguments are CLOCK, the data to emit, and LAST, the last
+ insn in the new chain we're building. Returns a new LAST.
+ The default is to do nothing. */
+ rtx (* cycle_display) PARAMS ((int clock, rtx last));
+ } sched;
+
/* Given two decls, merge their attributes and return the result. */
tree (* merge_decl_attributes) PARAMS ((tree, tree));
@@ -111,11 +148,8 @@ struct gcc_target
void (* init_builtins) PARAMS ((void));
/* Expand a target-specific builtin. */
- struct rtx_def * (* expand_builtin) PARAMS ((tree exp,
- struct rtx_def *target,
- struct rtx_def *subtarget,
- enum machine_mode mode,
- int ignore));
+ rtx (* expand_builtin) PARAMS ((tree exp, rtx target, rtx subtarget,
+ enum machine_mode mode, int ignore));
/* Given a decl, a section name, and whether the decl initializer
has relocs, choose attributes for the section. */
OpenPOWER on IntegriCloud