summaryrefslogtreecommitdiff
path: root/gcc/config/arm
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/config/arm
parentad99e708993275cfd0d666486d9c1b8bc7107416 (diff)
downloadgcc-747af5e778fd8703ab7c4c5bbf3cfaacbee6bb7f.tar.gz
* 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/config/arm')
-rw-r--r--gcc/config/arm/arm-protos.h1
-rw-r--r--gcc/config/arm/arm.c7
-rw-r--r--gcc/config/arm/arm.h5
3 files changed, 6 insertions, 7 deletions
diff --git a/gcc/config/arm/arm-protos.h b/gcc/config/arm/arm-protos.h
index 1a603f26313..2c3f8318ea1 100644
--- a/gcc/config/arm/arm-protos.h
+++ b/gcc/config/arm/arm-protos.h
@@ -49,7 +49,6 @@ extern RTX_CODE arm_canonicalize_comparison PARAMS ((RTX_CODE, rtx *));
extern int legitimate_pic_operand_p PARAMS ((rtx));
extern rtx legitimize_pic_address PARAMS ((rtx, enum machine_mode, rtx));
extern int arm_rtx_costs PARAMS ((rtx, RTX_CODE, RTX_CODE));
-extern int arm_adjust_cost PARAMS ((rtx, rtx, rtx, int));
extern int const_double_rtx_ok_for_fpu PARAMS ((rtx));
extern int neg_const_double_rtx_ok_for_fpu PARAMS ((rtx));
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index 13669b75440..825a46516d9 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -117,6 +117,8 @@ static int arm_comp_type_attributes PARAMS ((tree, tree));
static void arm_set_default_type_attributes PARAMS ((tree));
static void arm_elf_asm_named_section PARAMS ((const char *,
unsigned int));
+static int arm_adjust_cost PARAMS ((rtx, rtx, rtx, int));
+
#undef Hint
#undef Mmode
#undef Ulong
@@ -157,6 +159,9 @@ static void arm_elf_asm_named_section PARAMS ((const char *,
#undef TARGET_EXPAND_BUILTIN
#define TARGET_EXPAND_BUILTIN arm_expand_builtin
+#undef TARGET_SCHED_ADJUST_COST
+#define TARGET_SCHED_ADJUST_COST arm_adjust_cost
+
struct gcc_target targetm = TARGET_INITIALIZER;
/* Obstack for minipool constant handling. */
@@ -2744,7 +2749,7 @@ arm_rtx_costs (x, code, outer)
}
}
-int
+static int
arm_adjust_cost (insn, link, dep, cost)
rtx insn;
rtx link;
diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h
index 28f49eacbc4..784f28fac39 100644
--- a/gcc/config/arm/arm.h
+++ b/gcc/config/arm/arm.h
@@ -2446,11 +2446,6 @@ typedef struct
conditional instructions */
#define BRANCH_COST \
(TARGET_ARM ? 4 : (optimize > 1 ? 1 : 0))
-
-/* A C statement to update the variable COST based on the relationship
- between INSN that is dependent on DEP through dependence LINK. */
-#define ADJUST_COST(INSN, LINK, DEP, COST) \
- (COST) = arm_adjust_cost (INSN, LINK, DEP, COST)
/* Position Independent Code. */
/* We decide which register to use based on the compilation options and