+2014-12-19 Kaz Kojima <kkojima@gcc.gnu.org>
+
+ * config/sh/sh.c (sh_lra_p): New function.
+ (TARGET_LRA_P): Define.
+ (sh_legitimize_reload_address): Return false if sh_lra_p is true.
+ * config/sh/sh.opt (mlra): New option.
+
2014-12-19 Kaz Kojima <kkojima@gcc.gnu.org>
* lra-constraints.c (process_address_1): Try if target can split
static int sh_mode_entry (int);
static int sh_mode_exit (int);
static int sh_mode_priority (int entity, int n);
+static bool sh_lra_p (void);
static rtx mark_constant_pool_use (rtx);
static tree sh_handle_interrupt_handler_attribute (tree *, tree, tree,
#undef TARGET_ENCODE_SECTION_INFO
#define TARGET_ENCODE_SECTION_INFO sh_encode_section_info
+#undef TARGET_LRA_P
+#define TARGET_LRA_P sh_lra_p
+
#undef TARGET_SECONDARY_RELOAD
#define TARGET_SECONDARY_RELOAD sh_secondary_reload
enum reload_type type = (enum reload_type) itype;
const int mode_sz = GET_MODE_SIZE (mode);
+ if (sh_lra_p ())
+ return false;
+
if (! ALLOW_INDEXED_ADDRESS
&& GET_CODE (*p) == PLUS
&& REG_P (XEXP (*p, 0)) && REG_P (XEXP (*p, 1)))
return ((TARGET_FPU_SINGLE != 0) ^ (n) ? FP_MODE_SINGLE : FP_MODE_DOUBLE);
}
+/* Return true if we use LRA instead of reload pass. */
+static bool
+sh_lra_p (void)
+{
+ return sh_lra_flag;
+}
+
/* Implement TARGET_USE_BY_PIECES_INFRASTRUCTURE_P. */
static bool