2011-06-02 Julian Brown <julian@codesourcery.com>
- * arm-cores.def (arm1156t2-s, arm1156t2f-s): Use v6t2 tuning.
+ * config/arm/arm-protos.h (tune_params): Add branch_cost hook.
+ * config/arm/arm.c (arm_default_branch_cost): New.
+ (arm_slowmul_tune, arm_fastmul_tune, arm_xscale_tune, arm_9e_tune)
+ (arm_v6t2_tune, arm_cortex_tune, arm_cortex_a9_tune)
+ (arm_fa726_tune): Set branch_cost field using
+ arm_default_branch_cost.
+ * config/arm/arm.h (BRANCH_COST): Use branch_cost hook from
+ current_tune structure.
+ * dojump.c (tm_p.h): Include file.
+
+2011-06-02 Julian Brown <julian@codesourcery.com>
+
+ * config/arm/arm-cores.def (arm1156t2-s, arm1156t2f-s): Use v6t2
+ tuning.
(cortex-a5, cortex-a8, cortex-a15, cortex-r4, cortex-r4f, cortex-m4)
(cortex-m3, cortex-m1, cortex-m0): Use cortex tuning.
* config/arm/arm-protos.h (tune_params): Add prefer_constant_pool
static void arm_conditional_register_usage (void);
static reg_class_t arm_preferred_rename_class (reg_class_t rclass);
static unsigned int arm_autovectorize_vector_sizes (void);
+static int arm_default_branch_cost (bool, bool);
\f
/* Table of machine attributes. */
NULL,
3, /* Constant limit. */
ARM_PREFETCH_NOT_BENEFICIAL,
- true /* Prefer constant pool. */
+ true, /* Prefer constant pool. */
+ arm_default_branch_cost
};
const struct tune_params arm_fastmul_tune =
NULL,
1, /* Constant limit. */
ARM_PREFETCH_NOT_BENEFICIAL,
- true /* Prefer constant pool. */
+ true, /* Prefer constant pool. */
+ arm_default_branch_cost
};
const struct tune_params arm_xscale_tune =
xscale_sched_adjust_cost,
2, /* Constant limit. */
ARM_PREFETCH_NOT_BENEFICIAL,
- true /* Prefer constant pool. */
+ true, /* Prefer constant pool. */
+ arm_default_branch_cost
};
const struct tune_params arm_9e_tune =
NULL,
1, /* Constant limit. */
ARM_PREFETCH_NOT_BENEFICIAL,
- true /* Prefer constant pool. */
+ true, /* Prefer constant pool. */
+ arm_default_branch_cost
};
const struct tune_params arm_v6t2_tune =
NULL,
1, /* Constant limit. */
ARM_PREFETCH_NOT_BENEFICIAL,
- false /* Prefer constant pool. */
+ false, /* Prefer constant pool. */
+ arm_default_branch_cost
};
/* Generic Cortex tuning. Use more specific tunings if appropriate. */
NULL,
1, /* Constant limit. */
ARM_PREFETCH_NOT_BENEFICIAL,
- false /* Prefer constant pool. */
+ false, /* Prefer constant pool. */
+ arm_default_branch_cost
};
const struct tune_params arm_cortex_a9_tune =
cortex_a9_sched_adjust_cost,
1, /* Constant limit. */
ARM_PREFETCH_BENEFICIAL(4,32,32),
- false /* Prefer constant pool. */
+ false, /* Prefer constant pool. */
+ arm_default_branch_cost
};
const struct tune_params arm_fa726te_tune =
fa726te_sched_adjust_cost,
1, /* Constant limit. */
ARM_PREFETCH_NOT_BENEFICIAL,
- true /* Prefer constant pool. */
+ true, /* Prefer constant pool. */
+ arm_default_branch_cost
};
return cost;
}
+static int
+arm_default_branch_cost (bool speed_p, bool predictable_p ATTRIBUTE_UNUSED)
+{
+ if (TARGET_32BIT)
+ return (TARGET_THUMB2 && !speed_p) ? 1 : 4;
+ else
+ return (optimize > 0) ? 2 : 0;
+}
+
static int fp_consts_inited = 0;
/* Only zero is valid for VFP. Other values are also valid for FPA. */