public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH 0/3] Default LRA to "on"
@ 2016-09-12 22:22 Segher Boessenkool
  2016-09-12 22:22 ` [PATCH 2/3] Change the default of TARGET_LRA_P to true Segher Boessenkool
                   ` (2 more replies)
  0 siblings, 3 replies; 22+ messages in thread
From: Segher Boessenkool @ 2016-09-12 22:22 UTC (permalink / raw)
  To: gcc-patches; +Cc: Segher Boessenkool

All primary platforms default to LRA now, not the old reload.  It is too
early to remove reload (and all ports still using reload ;-) ), this will
take time, but as a first step this series makes LRA used by default.

It should not change behaviour for any existing port, only for new ports.
After the patches, ports that always want LRA do not have to define
anything, where currently ports that never want LRA define nothing.

This series is not exhaustively tested.  Is it okay for trunk though?


Segher

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [PATCH 1/3] Put a TARGET_LRA_P into every target
  2016-09-12 22:22 [PATCH 0/3] Default LRA to "on" Segher Boessenkool
  2016-09-12 22:22 ` [PATCH 2/3] Change the default of TARGET_LRA_P to true Segher Boessenkool
@ 2016-09-12 22:22 ` Segher Boessenkool
  2016-09-13 10:42   ` Bernd Schmidt
  2016-09-13 20:39   ` Jeff Law
  2016-09-12 22:28 ` [PATCH 3/3] Delete TARGET_LRA_P from those targets that set it to "true" Segher Boessenkool
  2 siblings, 2 replies; 22+ messages in thread
From: Segher Boessenkool @ 2016-09-12 22:22 UTC (permalink / raw)
  To: gcc-patches; +Cc: Segher Boessenkool

This patch adds a TARGET_LRA_P (defined to hook_bool_void_false) to
every target that didn't yet override the hook.  No functional change.


Segher


2016-09-12  Segher Boessenkool  <segher@kernel.crashing.org>

	* config/alpha/alpha.c (TARGET_LRA_P): New macro, defined to
	hook_bool_void_false.
	* config/avr/avr.c: Ditto.
	* config/bfin/bfin.c: Ditto.
	* config/c6x/c6x.c: Ditto.
	* config/cr16/cr16.c: Ditto.
	* config/cris/cris.c: Ditto.
	* config/epiphany/epiphany.c: Ditto.
	* config/fr30/fr30.c: Ditto.
	* config/frv/frv.c: Ditto.
	* config/h8300/h8300.c: Ditto.
	* config/ia64/ia64.c: Ditto.
	* config/iq2000/iq2000.c: Ditto.
	* config/lm32/lm32.c: Ditto.
	* config/m32c/m32c.c: Ditto.
	* config/m32r/m32r.c: Ditto.
	* config/m68k/m68k.c: Ditto.
	* config/mcore/mcore.c: Ditto.
	* config/microblaze/microblaze.c: Ditto.
	* config/mmix/mmix.c: Ditto.
	* config/mn10300/mn10300.c: Ditto.
	* config/moxie/moxie.c: Ditto.
	* config/msp430/msp430.c: Ditto.
	* config/nios2/nios2.c: Ditto.
	* config/nvptx/nvptx.c: Ditto.
	* config/pa/pa.c: Ditto.
	* config/pdp11/pdp11.c: Ditto.
	* config/rl78/rl78.c: Ditto.
	* config/sparc/sparc.c: Ditto.
	* config/spu/spu.c: Ditto.
	* config/stormy16/stormy16.c: Ditto.
	* config/tilegx/tilegx.c: Ditto.
	* config/tilepro/tilepro.c: Ditto.
	* config/v850/v850.c: Ditto.
	* config/vax/vax.c: Ditto.
	* config/visium/visium.c: Ditto.
	* config/xtensa/xtensa.c: Ditto.


diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c
index 702cd27..0f878c1 100644
--- a/gcc/config/alpha/alpha.c
+++ b/gcc/config/alpha/alpha.c
@@ -10039,6 +10039,9 @@ alpha_atomic_assign_expand_fenv (tree *hold, tree *clear, tree *update)
 #define TARGET_MANGLE_TYPE alpha_mangle_type
 #endif
 
+#undef TARGET_LRA_P
+#define TARGET_LRA_P hook_bool_void_false
+
 #undef TARGET_LEGITIMATE_ADDRESS_P
 #define TARGET_LEGITIMATE_ADDRESS_P alpha_legitimate_address_p
 
diff --git a/gcc/config/avr/avr.c b/gcc/config/avr/avr.c
index f6d7342..148a61d 100644
--- a/gcc/config/avr/avr.c
+++ b/gcc/config/avr/avr.c
@@ -13843,6 +13843,9 @@ avr_fold_builtin (tree fndecl, int n_args ATTRIBUTE_UNUSED, tree *arg,
 #undef  TARGET_CONVERT_TO_TYPE
 #define TARGET_CONVERT_TO_TYPE avr_convert_to_type
 
+#undef TARGET_LRA_P
+#define TARGET_LRA_P hook_bool_void_false
+
 #undef  TARGET_ADDR_SPACE_SUBSET_P
 #define TARGET_ADDR_SPACE_SUBSET_P avr_addr_space_subset_p
 
diff --git a/gcc/config/bfin/bfin.c b/gcc/config/bfin/bfin.c
index 086d548..e1e3945 100644
--- a/gcc/config/bfin/bfin.c
+++ b/gcc/config/bfin/bfin.c
@@ -5805,6 +5805,9 @@ bfin_conditional_register_usage (void)
 #undef TARGET_RETURN_IN_MEMORY
 #define TARGET_RETURN_IN_MEMORY bfin_return_in_memory
 
+#undef TARGET_LRA_P
+#define TARGET_LRA_P hook_bool_void_false
+
 #undef TARGET_LEGITIMATE_ADDRESS_P
 #define TARGET_LEGITIMATE_ADDRESS_P	bfin_legitimate_address_p
 
diff --git a/gcc/config/c6x/c6x.c b/gcc/config/c6x/c6x.c
index d87d0cc..2f80213 100644
--- a/gcc/config/c6x/c6x.c
+++ b/gcc/config/c6x/c6x.c
@@ -6749,6 +6749,9 @@ c6x_debug_unwind_info (void)
 #undef TARGET_LEGITIMATE_ADDRESS_P
 #define TARGET_LEGITIMATE_ADDRESS_P c6x_legitimate_address_p
 
+#undef TARGET_LRA_P
+#define TARGET_LRA_P hook_bool_void_false
+
 #undef TARGET_IN_SMALL_DATA_P
 #define TARGET_IN_SMALL_DATA_P c6x_in_small_data_p
 #undef	TARGET_ASM_SELECT_RTX_SECTION
diff --git a/gcc/config/cr16/cr16.c b/gcc/config/cr16/cr16.c
index 141b8bc..2f75ca2 100644
--- a/gcc/config/cr16/cr16.c
+++ b/gcc/config/cr16/cr16.c
@@ -172,6 +172,9 @@ static void cr16_print_operand_address (FILE *, machine_mode, rtx);
 #undef TARGET_LEGITIMATE_ADDRESS_P
 #define TARGET_LEGITIMATE_ADDRESS_P     cr16_legitimate_address_p
 
+#undef TARGET_LRA_P
+#define TARGET_LRA_P hook_bool_void_false
+
 /* Returning function value.  */
 #undef TARGET_FUNCTION_VALUE
 #define TARGET_FUNCTION_VALUE 		cr16_function_value
diff --git a/gcc/config/cris/cris.c b/gcc/config/cris/cris.c
index 7a2ac81..2038193 100644
--- a/gcc/config/cris/cris.c
+++ b/gcc/config/cris/cris.c
@@ -212,6 +212,9 @@ int cris_cpu_version = CRIS_DEFAULT_CPU_VERSION;
 #undef TARGET_INIT_LIBFUNCS
 #define TARGET_INIT_LIBFUNCS cris_init_libfuncs
 
+#undef TARGET_LRA_P
+#define TARGET_LRA_P hook_bool_void_false
+
 #undef TARGET_LEGITIMATE_ADDRESS_P
 #define TARGET_LEGITIMATE_ADDRESS_P cris_legitimate_address_p
 
diff --git a/gcc/config/epiphany/epiphany.c b/gcc/config/epiphany/epiphany.c
index 25cbdfc..b871ccb 100644
--- a/gcc/config/epiphany/epiphany.c
+++ b/gcc/config/epiphany/epiphany.c
@@ -102,6 +102,8 @@ static rtx_insn *frame_insn (rtx);
 #define TARGET_SCHED_ISSUE_RATE epiphany_issue_rate
 #define TARGET_SCHED_ADJUST_COST epiphany_adjust_cost
 
+#define TARGET_LRA_P hook_bool_void_false
+
 #define TARGET_LEGITIMATE_ADDRESS_P epiphany_legitimate_address_p
 
 #define TARGET_SECONDARY_RELOAD epiphany_secondary_reload
diff --git a/gcc/config/fr30/fr30.c b/gcc/config/fr30/fr30.c
index f4fef2b..741a013 100644
--- a/gcc/config/fr30/fr30.c
+++ b/gcc/config/fr30/fr30.c
@@ -179,6 +179,9 @@ static int fr30_num_arg_regs (machine_mode, const_tree);
 #undef TARGET_CAN_ELIMINATE
 #define TARGET_CAN_ELIMINATE fr30_can_eliminate
 
+#undef TARGET_LRA_P
+#define TARGET_LRA_P hook_bool_void_false
+
 #undef TARGET_ASM_TRAMPOLINE_TEMPLATE
 #define TARGET_ASM_TRAMPOLINE_TEMPLATE fr30_asm_trampoline_template
 #undef TARGET_TRAMPOLINE_INIT
diff --git a/gcc/config/frv/frv.c b/gcc/config/frv/frv.c
index 4bfa827..60c3863 100644
--- a/gcc/config/frv/frv.c
+++ b/gcc/config/frv/frv.c
@@ -491,6 +491,9 @@ static bool frv_class_likely_spilled_p 		(reg_class_t);
 #undef  TARGET_SECONDARY_RELOAD
 #define TARGET_SECONDARY_RELOAD frv_secondary_reload
 
+#undef TARGET_LRA_P
+#define TARGET_LRA_P hook_bool_void_false
+
 #undef TARGET_LEGITIMATE_ADDRESS_P
 #define TARGET_LEGITIMATE_ADDRESS_P frv_legitimate_address_p
 
diff --git a/gcc/config/h8300/h8300.c b/gcc/config/h8300/h8300.c
index 1818684..db8eeab 100644
--- a/gcc/config/h8300/h8300.c
+++ b/gcc/config/h8300/h8300.c
@@ -6097,6 +6097,9 @@ h8300_trampoline_init (rtx m_tramp, tree fndecl, rtx cxt)
 #undef TARGET_HARD_REGNO_SCRATCH_OK
 #define TARGET_HARD_REGNO_SCRATCH_OK h8300_hard_regno_scratch_ok
 
+#undef TARGET_LRA_P
+#define TARGET_LRA_P hook_bool_void_false
+
 #undef TARGET_LEGITIMATE_ADDRESS_P
 #define TARGET_LEGITIMATE_ADDRESS_P	h8300_legitimate_address_p
 
diff --git a/gcc/config/ia64/ia64.c b/gcc/config/ia64/ia64.c
index ebd2c86..5f0bf43 100644
--- a/gcc/config/ia64/ia64.c
+++ b/gcc/config/ia64/ia64.c
@@ -603,6 +603,9 @@ static const struct attribute_spec ia64_attribute_table[] =
 #undef TARGET_LEGITIMATE_ADDRESS_P
 #define TARGET_LEGITIMATE_ADDRESS_P ia64_legitimate_address_p
 
+#undef TARGET_LRA_P
+#define TARGET_LRA_P hook_bool_void_false
+
 #undef TARGET_CANNOT_FORCE_CONST_MEM
 #define TARGET_CANNOT_FORCE_CONST_MEM ia64_cannot_force_const_mem
 
diff --git a/gcc/config/iq2000/iq2000.c b/gcc/config/iq2000/iq2000.c
index 73b9cdb..c7e5f19 100644
--- a/gcc/config/iq2000/iq2000.c
+++ b/gcc/config/iq2000/iq2000.c
@@ -237,6 +237,9 @@ static bool iq2000_print_operand_punct_valid_p (unsigned char code);
 #undef	TARGET_EXPAND_BUILTIN_VA_START
 #define	TARGET_EXPAND_BUILTIN_VA_START	iq2000_va_start
 
+#undef TARGET_LRA_P
+#define TARGET_LRA_P hook_bool_void_false
+
 #undef TARGET_LEGITIMATE_ADDRESS_P
 #define TARGET_LEGITIMATE_ADDRESS_P	iq2000_legitimate_address_p
 
diff --git a/gcc/config/lm32/lm32.c b/gcc/config/lm32/lm32.c
index 4a8079f..8a10220 100644
--- a/gcc/config/lm32/lm32.c
+++ b/gcc/config/lm32/lm32.c
@@ -99,6 +99,8 @@ static void lm32_function_arg_advance (cumulative_args_t cum,
 #define TARGET_MAX_ANCHOR_OFFSET 0x7fff
 #undef TARGET_CAN_ELIMINATE
 #define TARGET_CAN_ELIMINATE lm32_can_eliminate
+#undef TARGET_LRA_P
+#define TARGET_LRA_P hook_bool_void_false
 #undef TARGET_LEGITIMATE_ADDRESS_P
 #define TARGET_LEGITIMATE_ADDRESS_P lm32_legitimate_address_p
 
diff --git a/gcc/config/m32c/m32c.c b/gcc/config/m32c/m32c.c
index 6f6d7e4..1db1ef7 100644
--- a/gcc/config/m32c/m32c.c
+++ b/gcc/config/m32c/m32c.c
@@ -1632,6 +1632,9 @@ m32c_trampoline_init (rtx m_tramp, tree fndecl, rtx chainval)
 #undef A0
 }
 
+#undef TARGET_LRA_P
+#define TARGET_LRA_P hook_bool_void_false
+
 /* Addressing Modes */
 
 /* The r8c/m32c family supports a wide range of non-orthogonal
diff --git a/gcc/config/m32r/m32r.c b/gcc/config/m32r/m32r.c
index b40c53c..943f8c7 100644
--- a/gcc/config/m32r/m32r.c
+++ b/gcc/config/m32r/m32r.c
@@ -119,6 +119,9 @@ static const struct attribute_spec m32r_attribute_table[] =
 #undef  TARGET_ATTRIBUTE_TAKES_IDENTIFIER_P
 #define TARGET_ATTRIBUTE_TAKES_IDENTIFIER_P m32r_attribute_identifier
 
+#undef TARGET_LRA_P
+#define TARGET_LRA_P hook_bool_void_false
+
 #undef TARGET_LEGITIMATE_ADDRESS_P
 #define TARGET_LEGITIMATE_ADDRESS_P m32r_legitimate_address_p
 #undef TARGET_LEGITIMIZE_ADDRESS
diff --git a/gcc/config/m68k/m68k.c b/gcc/config/m68k/m68k.c
index 7cee0f5..a104193 100644
--- a/gcc/config/m68k/m68k.c
+++ b/gcc/config/m68k/m68k.c
@@ -289,6 +289,9 @@ static void m68k_init_sync_libfuncs (void) ATTRIBUTE_UNUSED;
 #define TARGET_ASM_OUTPUT_DWARF_DTPREL m68k_output_dwarf_dtprel
 #endif
 
+#undef TARGET_LRA_P
+#define TARGET_LRA_P hook_bool_void_false
+
 #undef TARGET_LEGITIMATE_ADDRESS_P
 #define TARGET_LEGITIMATE_ADDRESS_P	m68k_legitimate_address_p
 
diff --git a/gcc/config/mcore/mcore.c b/gcc/config/mcore/mcore.c
index c9d0506..3afe42c 100644
--- a/gcc/config/mcore/mcore.c
+++ b/gcc/config/mcore/mcore.c
@@ -232,6 +232,9 @@ static const struct attribute_spec mcore_attribute_table[] =
 #undef TARGET_ADDR_SPACE_LEGITIMATE_ADDRESS_P
 #define TARGET_ADDR_SPACE_LEGITIMATE_ADDRESS_P mcore_legitimate_address_p
 
+#undef TARGET_LRA_P
+#define TARGET_LRA_P hook_bool_void_false
+
 #undef TARGET_WARN_FUNC_RETURN
 #define TARGET_WARN_FUNC_RETURN mcore_warn_func_return
 
diff --git a/gcc/config/microblaze/microblaze.c b/gcc/config/microblaze/microblaze.c
index 735dff5..e32fa0e 100644
--- a/gcc/config/microblaze/microblaze.c
+++ b/gcc/config/microblaze/microblaze.c
@@ -3810,6 +3810,9 @@ microblaze_machine_dependent_reorg (void)
 #undef TARGET_LEGITIMATE_ADDRESS_P
 #define TARGET_LEGITIMATE_ADDRESS_P 	microblaze_legitimate_address_p 
 
+#undef TARGET_LRA_P
+#define TARGET_LRA_P hook_bool_void_false
+
 #undef TARGET_FRAME_POINTER_REQUIRED
 #define TARGET_FRAME_POINTER_REQUIRED	microblaze_frame_pointer_required
 
diff --git a/gcc/config/mmix/mmix.c b/gcc/config/mmix/mmix.c
index 3fffdc2..bf06e3b 100644
--- a/gcc/config/mmix/mmix.c
+++ b/gcc/config/mmix/mmix.c
@@ -260,6 +260,9 @@ static void mmix_conditional_register_usage (void);
 #undef TARGET_PREFERRED_OUTPUT_RELOAD_CLASS
 #define TARGET_PREFERRED_OUTPUT_RELOAD_CLASS mmix_preferred_output_reload_class
 
+#undef TARGET_LRA_P
+#define TARGET_LRA_P hook_bool_void_false
+
 #undef TARGET_LEGITIMATE_ADDRESS_P
 #define TARGET_LEGITIMATE_ADDRESS_P	mmix_legitimate_address_p
 #undef TARGET_LEGITIMATE_CONSTANT_P
diff --git a/gcc/config/mn10300/mn10300.c b/gcc/config/mn10300/mn10300.c
index 6e590cd..e384796 100644
--- a/gcc/config/mn10300/mn10300.c
+++ b/gcc/config/mn10300/mn10300.c
@@ -3379,6 +3379,9 @@ mn10300_reorg (void)
 #undef  TARGET_CASE_VALUES_THRESHOLD
 #define TARGET_CASE_VALUES_THRESHOLD mn10300_case_values_threshold
 
+#undef TARGET_LRA_P
+#define TARGET_LRA_P hook_bool_void_false
+
 #undef  TARGET_LEGITIMATE_ADDRESS_P
 #define TARGET_LEGITIMATE_ADDRESS_P	mn10300_legitimate_address_p
 #undef  TARGET_DELEGITIMIZE_ADDRESS
diff --git a/gcc/config/moxie/moxie.c b/gcc/config/moxie/moxie.c
index 4e38a57..9d376f1 100644
--- a/gcc/config/moxie/moxie.c
+++ b/gcc/config/moxie/moxie.c
@@ -624,6 +624,9 @@ moxie_legitimate_address_p (machine_mode mode ATTRIBUTE_UNUSED,
 #undef  TARGET_FUNCTION_ARG_ADVANCE
 #define TARGET_FUNCTION_ARG_ADVANCE	moxie_function_arg_advance
 
+#undef TARGET_LRA_P
+#define TARGET_LRA_P hook_bool_void_false
+
 #undef  TARGET_ADDR_SPACE_LEGITIMATE_ADDRESS_P
 #define TARGET_ADDR_SPACE_LEGITIMATE_ADDRESS_P	moxie_legitimate_address_p
 
diff --git a/gcc/config/msp430/msp430.c b/gcc/config/msp430/msp430.c
index dba4d19..8b44e8c 100644
--- a/gcc/config/msp430/msp430.c
+++ b/gcc/config/msp430/msp430.c
@@ -1490,6 +1490,9 @@ msp430_gimplify_va_arg_expr (tree valist, tree type, gimple_seq *pre_p,
   return addr;
 }
 \f
+#undef TARGET_LRA_P
+#define TARGET_LRA_P hook_bool_void_false
+
 /* Addressing Modes */
 
 #undef  TARGET_LEGITIMATE_ADDRESS_P
diff --git a/gcc/config/nios2/nios2.c b/gcc/config/nios2/nios2.c
index 18fcbb3..632adad 100644
--- a/gcc/config/nios2/nios2.c
+++ b/gcc/config/nios2/nios2.c
@@ -5038,6 +5038,9 @@ nios2_adjust_reg_alloc_order (void)
 #undef TARGET_LEGITIMATE_ADDRESS_P
 #define TARGET_LEGITIMATE_ADDRESS_P nios2_legitimate_address_p
 
+#undef TARGET_LRA_P
+#define TARGET_LRA_P hook_bool_void_false
+
 #undef TARGET_PREFERRED_RELOAD_CLASS
 #define TARGET_PREFERRED_RELOAD_CLASS nios2_preferred_reload_class
 
diff --git a/gcc/config/nvptx/nvptx.c b/gcc/config/nvptx/nvptx.c
index 23b5078..16e04a4 100644
--- a/gcc/config/nvptx/nvptx.c
+++ b/gcc/config/nvptx/nvptx.c
@@ -4856,6 +4856,9 @@ nvptx_goacc_reduction (gcall *call)
 #undef TARGET_ATTRIBUTE_TABLE
 #define TARGET_ATTRIBUTE_TABLE nvptx_attribute_table
 
+#undef TARGET_LRA_P
+#define TARGET_LRA_P hook_bool_void_false
+
 #undef TARGET_LEGITIMATE_ADDRESS_P
 #define TARGET_LEGITIMATE_ADDRESS_P nvptx_legitimate_address_p
 
diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c
index 251c1ad..18b7324 100644
--- a/gcc/config/pa/pa.c
+++ b/gcc/config/pa/pa.c
@@ -397,6 +397,9 @@ static size_t n_deferred_plabels = 0;
 #undef TARGET_LEGITIMATE_ADDRESS_P
 #define TARGET_LEGITIMATE_ADDRESS_P pa_legitimate_address_p
 
+#undef TARGET_LRA_P
+#define TARGET_LRA_P hook_bool_void_false
+
 struct gcc_target targetm = TARGET_INITIALIZER;
 \f
 /* Parse the -mfixed-range= option string.  */
diff --git a/gcc/config/pdp11/pdp11.c b/gcc/config/pdp11/pdp11.c
index 35d57c7..7fa08cb 100644
--- a/gcc/config/pdp11/pdp11.c
+++ b/gcc/config/pdp11/pdp11.c
@@ -208,6 +208,9 @@ static bool pdp11_scalar_mode_supported_p (machine_mode);
 #undef  TARGET_PREFERRED_OUTPUT_RELOAD_CLASS
 #define TARGET_PREFERRED_OUTPUT_RELOAD_CLASS pdp11_preferred_output_reload_class
 
+#undef TARGET_LRA_P
+#define TARGET_LRA_P hook_bool_void_false
+
 #undef  TARGET_LEGITIMATE_ADDRESS_P
 #define TARGET_LEGITIMATE_ADDRESS_P pdp11_legitimate_address_p
 
diff --git a/gcc/config/rl78/rl78.c b/gcc/config/rl78/rl78.c
index 3ddb198..ecbf6f9 100644
--- a/gcc/config/rl78/rl78.c
+++ b/gcc/config/rl78/rl78.c
@@ -1071,6 +1071,9 @@ rl78_is_legitimate_constant (machine_mode mode ATTRIBUTE_UNUSED, rtx x ATTRIBUTE
   return true;
 }
 
+#undef TARGET_LRA_P
+#define TARGET_LRA_P hook_bool_void_false
+
 #undef  TARGET_ADDR_SPACE_LEGITIMATE_ADDRESS_P
 #define TARGET_ADDR_SPACE_LEGITIMATE_ADDRESS_P	rl78_as_legitimate_address
 
diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c
index 254b722..1932b1b 100644
--- a/gcc/config/sparc/sparc.c
+++ b/gcc/config/sparc/sparc.c
@@ -827,6 +827,9 @@ char sparc_hard_reg_printed[8];
 #define TARGET_MANGLE_TYPE sparc_mangle_type
 #endif
 
+#undef TARGET_LRA_P
+#define TARGET_LRA_P hook_bool_void_false
+
 #undef TARGET_LEGITIMATE_ADDRESS_P
 #define TARGET_LEGITIMATE_ADDRESS_P sparc_legitimate_address_p
 
diff --git a/gcc/config/spu/spu.c b/gcc/config/spu/spu.c
index fc791f5..28173e5 100644
--- a/gcc/config/spu/spu.c
+++ b/gcc/config/spu/spu.c
@@ -7153,6 +7153,9 @@ static const struct attribute_spec spu_attribute_table[] =
 
 /*  TARGET overrides.  */
 
+#undef TARGET_LRA_P
+#define TARGET_LRA_P hook_bool_void_false
+
 #undef TARGET_ADDR_SPACE_POINTER_MODE
 #define TARGET_ADDR_SPACE_POINTER_MODE spu_addr_space_pointer_mode
 
diff --git a/gcc/config/stormy16/stormy16.c b/gcc/config/stormy16/stormy16.c
index 50af15b..1eb95f5 100644
--- a/gcc/config/stormy16/stormy16.c
+++ b/gcc/config/stormy16/stormy16.c
@@ -2677,6 +2677,9 @@ xstormy16_return_in_memory (const_tree type, const_tree fntype ATTRIBUTE_UNUSED)
 #undef  TARGET_PREFERRED_OUTPUT_RELOAD_CLASS
 #define TARGET_PREFERRED_OUTPUT_RELOAD_CLASS xstormy16_preferred_reload_class
 
+#undef TARGET_LRA_P
+#define TARGET_LRA_P hook_bool_void_false
+
 #undef TARGET_LEGITIMATE_ADDRESS_P
 #define TARGET_LEGITIMATE_ADDRESS_P	xstormy16_legitimate_address_p
 #undef TARGET_MODE_DEPENDENT_ADDRESS_P
diff --git a/gcc/config/tilegx/tilegx.c b/gcc/config/tilegx/tilegx.c
index 5508ed8..d743c63 100644
--- a/gcc/config/tilegx/tilegx.c
+++ b/gcc/config/tilegx/tilegx.c
@@ -5625,6 +5625,9 @@ tilegx_file_end (void)
 #undef  TARGET_LEGITIMATE_CONSTANT_P
 #define TARGET_LEGITIMATE_CONSTANT_P tilegx_legitimate_constant_p
 
+#undef TARGET_LRA_P
+#define TARGET_LRA_P hook_bool_void_false
+
 #undef  TARGET_LEGITIMATE_ADDRESS_P
 #define TARGET_LEGITIMATE_ADDRESS_P tilegx_legitimate_address_p
 
diff --git a/gcc/config/tilepro/tilepro.c b/gcc/config/tilepro/tilepro.c
index 7237a60..33e4993 100644
--- a/gcc/config/tilepro/tilepro.c
+++ b/gcc/config/tilepro/tilepro.c
@@ -5017,6 +5017,9 @@ tilepro_file_end (void)
 #undef  TARGET_LEGITIMATE_CONSTANT_P
 #define TARGET_LEGITIMATE_CONSTANT_P tilepro_legitimate_constant_p
 
+#undef TARGET_LRA_P
+#define TARGET_LRA_P hook_bool_void_false
+
 #undef  TARGET_LEGITIMATE_ADDRESS_P
 #define TARGET_LEGITIMATE_ADDRESS_P tilepro_legitimate_address_p
 
diff --git a/gcc/config/v850/v850.c b/gcc/config/v850/v850.c
index e0e4215..f1716d1 100644
--- a/gcc/config/v850/v850.c
+++ b/gcc/config/v850/v850.c
@@ -3340,6 +3340,9 @@ v850_gen_movdi (rtx * operands)
 #undef  TARGET_LEGITIMATE_CONSTANT_P
 #define TARGET_LEGITIMATE_CONSTANT_P v850_legitimate_constant_p
 
+#undef TARGET_LRA_P
+#define TARGET_LRA_P hook_bool_void_false
+
 #undef  TARGET_ADDR_SPACE_LEGITIMATE_ADDRESS_P
 #define TARGET_ADDR_SPACE_LEGITIMATE_ADDRESS_P v850_legitimate_address_p
 
diff --git a/gcc/config/vax/vax.c b/gcc/config/vax/vax.c
index 804f0c7..06ab571 100644
--- a/gcc/config/vax/vax.c
+++ b/gcc/config/vax/vax.c
@@ -96,6 +96,9 @@ static bool vax_mode_dependent_address_p (const_rtx, addr_space_t);
 #undef TARGET_BUILTIN_SETJMP_FRAME_VALUE
 #define TARGET_BUILTIN_SETJMP_FRAME_VALUE vax_builtin_setjmp_frame_value
 
+#undef TARGET_LRA_P
+#define TARGET_LRA_P hook_bool_void_false
+
 #undef TARGET_LEGITIMATE_ADDRESS_P
 #define TARGET_LEGITIMATE_ADDRESS_P vax_legitimate_address_p
 #undef TARGET_MODE_DEPENDENT_ADDRESS_P
diff --git a/gcc/config/visium/visium.c b/gcc/config/visium/visium.c
index 360a674..af58f99 100644
--- a/gcc/config/visium/visium.c
+++ b/gcc/config/visium/visium.c
@@ -264,6 +264,9 @@ static unsigned int visium_reorg (void);
 #undef  TARGET_LEGITIMATE_CONSTANT_P
 #define TARGET_LEGITIMATE_CONSTANT_P visium_legitimate_constant_p
 
+#undef TARGET_LRA_P
+#define TARGET_LRA_P hook_bool_void_false
+
 #undef  TARGET_LEGITIMATE_ADDRESS_P
 #define TARGET_LEGITIMATE_ADDRESS_P visium_legitimate_address_p
 
diff --git a/gcc/config/xtensa/xtensa.c b/gcc/config/xtensa/xtensa.c
index 917ea94..07c9e8f 100644
--- a/gcc/config/xtensa/xtensa.c
+++ b/gcc/config/xtensa/xtensa.c
@@ -264,6 +264,9 @@ static void xtensa_conditional_register_usage (void);
 #undef TARGET_CANNOT_FORCE_CONST_MEM
 #define TARGET_CANNOT_FORCE_CONST_MEM xtensa_cannot_force_const_mem
 
+#undef TARGET_LRA_P
+#define TARGET_LRA_P hook_bool_void_false
+
 #undef TARGET_LEGITIMATE_ADDRESS_P
 #define TARGET_LEGITIMATE_ADDRESS_P	xtensa_legitimate_address_p
 
-- 
1.9.3

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [PATCH 2/3] Change the default of TARGET_LRA_P to true
  2016-09-12 22:22 [PATCH 0/3] Default LRA to "on" Segher Boessenkool
@ 2016-09-12 22:22 ` Segher Boessenkool
  2016-09-12 22:22 ` [PATCH 1/3] Put a TARGET_LRA_P into every target Segher Boessenkool
  2016-09-12 22:28 ` [PATCH 3/3] Delete TARGET_LRA_P from those targets that set it to "true" Segher Boessenkool
  2 siblings, 0 replies; 22+ messages in thread
From: Segher Boessenkool @ 2016-09-12 22:22 UTC (permalink / raw)
  To: gcc-patches; +Cc: Segher Boessenkool

Since all targets now define TARGET_LRA_P, this does not change behaviour
for any existing target.  Newly added ports will by default use LRA now.


Segher


2016-09-12  Segher Boessenkool  <segher@kernel.crashing.org>

	* targhooks.c (default_lra_p): Return true instead of false.

---
 gcc/targhooks.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/targhooks.c b/gcc/targhooks.c
index 97856fa..67cc53a 100644
--- a/gcc/targhooks.c
+++ b/gcc/targhooks.c
@@ -995,7 +995,7 @@ default_ira_change_pseudo_allocno_class (int regno ATTRIBUTE_UNUSED,
 extern bool
 default_lra_p (void)
 {
-  return false;
+  return true;
 }
 
 int
-- 
1.9.3

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [PATCH 3/3] Delete TARGET_LRA_P from those targets that set it to "true"
  2016-09-12 22:22 [PATCH 0/3] Default LRA to "on" Segher Boessenkool
  2016-09-12 22:22 ` [PATCH 2/3] Change the default of TARGET_LRA_P to true Segher Boessenkool
  2016-09-12 22:22 ` [PATCH 1/3] Put a TARGET_LRA_P into every target Segher Boessenkool
@ 2016-09-12 22:28 ` Segher Boessenkool
  2 siblings, 0 replies; 22+ messages in thread
From: Segher Boessenkool @ 2016-09-12 22:28 UTC (permalink / raw)
  To: gcc-patches; +Cc: Segher Boessenkool

A few targets aready always want LRA; those then do not need to override
the default anymore.


Segher


2016-09-12  Segher Boessenkool  <segher@kernel.crashing.org>

	* config/aarch64/aarch64.c (TARGET_LRA_P): Delete macro.
	* config/arm/arm.c (TARGET_LRA_P): Delete macro.
	* config/i386/i386.c (TARGET_LRA_P): Delete macro.
	* config/nds32/nds32.c (TARGET_LRA_P): Delete macro.

---
 gcc/config/aarch64/aarch64.c | 3 ---
 gcc/config/arm/arm.c         | 3 ---
 gcc/config/i386/i386.c       | 3 ---
 gcc/config/nds32/nds32.c     | 3 ---
 4 files changed, 12 deletions(-)

diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c
index 2be750e..04302ad 100644
--- a/gcc/config/aarch64/aarch64.c
+++ b/gcc/config/aarch64/aarch64.c
@@ -14170,9 +14170,6 @@ aarch64_optab_supported_p (int op, machine_mode mode1, machine_mode,
 #undef TARGET_LIBGCC_CMP_RETURN_MODE
 #define TARGET_LIBGCC_CMP_RETURN_MODE aarch64_libgcc_cmp_return_mode
 
-#undef TARGET_LRA_P
-#define TARGET_LRA_P hook_bool_void_true
-
 #undef TARGET_MANGLE_TYPE
 #define TARGET_MANGLE_TYPE aarch64_mangle_type
 
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index 946f308..1183d45 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -355,9 +355,6 @@ static const struct attribute_spec arm_attribute_table[] =
 #undef TARGET_LEGITIMIZE_ADDRESS
 #define TARGET_LEGITIMIZE_ADDRESS arm_legitimize_address
 
-#undef TARGET_LRA_P
-#define TARGET_LRA_P hook_bool_void_true
-
 #undef  TARGET_ATTRIBUTE_TABLE
 #define TARGET_ATTRIBUTE_TABLE arm_attribute_table
 
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 051fddb..370345e 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -50620,9 +50620,6 @@ ix86_addr_space_zero_address_valid (addr_space_t as)
 #undef TARGET_LEGITIMATE_ADDRESS_P
 #define TARGET_LEGITIMATE_ADDRESS_P ix86_legitimate_address_p
 
-#undef TARGET_LRA_P
-#define TARGET_LRA_P hook_bool_void_true
-
 #undef TARGET_REGISTER_PRIORITY
 #define TARGET_REGISTER_PRIORITY ix86_register_priority
 
diff --git a/gcc/config/nds32/nds32.c b/gcc/config/nds32/nds32.c
index c47c122..8dbeba5 100644
--- a/gcc/config/nds32/nds32.c
+++ b/gcc/config/nds32/nds32.c
@@ -3547,9 +3547,6 @@ nds32_target_alignment (rtx label)
 #undef TARGET_CLASS_MAX_NREGS
 #define TARGET_CLASS_MAX_NREGS nds32_class_max_nregs
 
-#undef TARGET_LRA_P
-#define TARGET_LRA_P hook_bool_void_true
-
 #undef TARGET_REGISTER_PRIORITY
 #define TARGET_REGISTER_PRIORITY nds32_register_priority
 
-- 
1.9.3

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 1/3] Put a TARGET_LRA_P into every target
  2016-09-12 22:22 ` [PATCH 1/3] Put a TARGET_LRA_P into every target Segher Boessenkool
@ 2016-09-13 10:42   ` Bernd Schmidt
  2016-09-13 11:11     ` Segher Boessenkool
  2016-09-13 16:02     ` Jeff Law
  2016-09-13 20:39   ` Jeff Law
  1 sibling, 2 replies; 22+ messages in thread
From: Bernd Schmidt @ 2016-09-13 10:42 UTC (permalink / raw)
  To: Segher Boessenkool, gcc-patches

On 09/13/2016 12:22 AM, Segher Boessenkool wrote:
> This patch adds a TARGET_LRA_P (defined to hook_bool_void_false) to
> every target that didn't yet override the hook.  No functional change.

This patch series makes very little sense to me. Adding 35 new instances 
of a hook definition so you can delete four others?


Bernd

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 1/3] Put a TARGET_LRA_P into every target
  2016-09-13 10:42   ` Bernd Schmidt
@ 2016-09-13 11:11     ` Segher Boessenkool
  2016-09-13 14:27       ` Andrew Pinski
  2016-09-13 16:23       ` Joseph Myers
  2016-09-13 16:02     ` Jeff Law
  1 sibling, 2 replies; 22+ messages in thread
From: Segher Boessenkool @ 2016-09-13 11:11 UTC (permalink / raw)
  To: Bernd Schmidt; +Cc: gcc-patches

On Tue, Sep 13, 2016 at 12:26:04PM +0200, Bernd Schmidt wrote:
> On 09/13/2016 12:22 AM, Segher Boessenkool wrote:
> >This patch adds a TARGET_LRA_P (defined to hook_bool_void_false) to
> >every target that didn't yet override the hook.  No functional change.
> 
> This patch series makes very little sense to me. Adding 35 new instances 
> of a hook definition so you can delete four others?

No, the purpose is to default to LRA instead of reload.  Everything should
switch to LRA eventually, so over time we need to define the macro in fewer
and fewer targets, until one day whatever remains can all be ripped out.

Yes, many targets need the hook definition after this series; that should
stick out like a sore thumb, help to remind people to change their target
to use LRA (not a huge amount of work for most, although it can get tricky).

And all new ports should use LRA, so it should be the default.

Wrt "delete only four"...  There are five or six or so more that use LRA,
but those can all be switched to use old reload instead.  Some day that
will be turned off, too.


Segher

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 1/3] Put a TARGET_LRA_P into every target
  2016-09-13 11:11     ` Segher Boessenkool
@ 2016-09-13 14:27       ` Andrew Pinski
  2016-09-13 15:53         ` Peter Bergner
  2016-09-13 16:23       ` Joseph Myers
  1 sibling, 1 reply; 22+ messages in thread
From: Andrew Pinski @ 2016-09-13 14:27 UTC (permalink / raw)
  To: Segher Boessenkool; +Cc: Bernd Schmidt, GCC Patches

On Tue, Sep 13, 2016 at 12:03 PM, Segher Boessenkool
<segher@kernel.crashing.org> wrote:
> On Tue, Sep 13, 2016 at 12:26:04PM +0200, Bernd Schmidt wrote:
>> On 09/13/2016 12:22 AM, Segher Boessenkool wrote:
>> >This patch adds a TARGET_LRA_P (defined to hook_bool_void_false) to
>> >every target that didn't yet override the hook.  No functional change.
>>
>> This patch series makes very little sense to me. Adding 35 new instances
>> of a hook definition so you can delete four others?
>
> No, the purpose is to default to LRA instead of reload.  Everything should
> switch to LRA eventually, so over time we need to define the macro in fewer
> and fewer targets, until one day whatever remains can all be ripped out.
>
> Yes, many targets need the hook definition after this series; that should
> stick out like a sore thumb, help to remind people to change their target
> to use LRA (not a huge amount of work for most, although it can get tricky).
>
> And all new ports should use LRA, so it should be the default.

Since nobody else has said anything on this patch besides Bernd, I am
going to say yes please.  This patch in my mind is the right way
forward.  In the same new ports should not be cc0 ports (though I know
some folks try that every once in a while).

Thanks,
Andrew

>
> Wrt "delete only four"...  There are five or six or so more that use LRA,
> but those can all be switched to use old reload instead.  Some day that
> will be turned off, too.
>
>
> Segher

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 1/3] Put a TARGET_LRA_P into every target
  2016-09-13 14:27       ` Andrew Pinski
@ 2016-09-13 15:53         ` Peter Bergner
  2016-09-13 16:08           ` Jeff Law
  0 siblings, 1 reply; 22+ messages in thread
From: Peter Bergner @ 2016-09-13 15:53 UTC (permalink / raw)
  To: Andrew Pinski; +Cc: Segher Boessenkool, Bernd Schmidt, GCC Patches

On 9/13/16 9:26 AM, Andrew Pinski wrote:
> On Tue, Sep 13, 2016 at 12:03 PM, Segher Boessenkool
>> And all new ports should use LRA, so it should be the default.
>
> Since nobody else has said anything on this patch besides Bernd, I am
> going to say yes please.  This patch in my mind is the right way
> forward.  In the same new ports should not be cc0 ports (though I know
> some folks try that every once in a while).

+ 1!

If we don't make LRA the default, it will be very easy for new ports
to default to reload, since they'll have to actively force usage of
LRA and I can see that point being missed even if we have it documented.
We don't want new ports to find out they need to enable LRA during
their patch submission, since that entails a huge amount of retesting.
It should be LRA from day 1 for them.

Peter


^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 1/3] Put a TARGET_LRA_P into every target
  2016-09-13 10:42   ` Bernd Schmidt
  2016-09-13 11:11     ` Segher Boessenkool
@ 2016-09-13 16:02     ` Jeff Law
  1 sibling, 0 replies; 22+ messages in thread
From: Jeff Law @ 2016-09-13 16:02 UTC (permalink / raw)
  To: Bernd Schmidt, Segher Boessenkool, gcc-patches

On 09/13/2016 04:26 AM, Bernd Schmidt wrote:
> On 09/13/2016 12:22 AM, Segher Boessenkool wrote:
>> This patch adds a TARGET_LRA_P (defined to hook_bool_void_false) to
>> every target that didn't yet override the hook.  No functional change.
>
> This patch series makes very little sense to me. Adding 35 new instances
> of a hook definition so you can delete four others?
I think a large part of the benefit here is the mental change that LRA 
is the default now and that it's fairly easy to find ports which haven't 
been converted.

Jeff

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 1/3] Put a TARGET_LRA_P into every target
  2016-09-13 15:53         ` Peter Bergner
@ 2016-09-13 16:08           ` Jeff Law
  2016-09-13 17:08             ` Mike Stump
  0 siblings, 1 reply; 22+ messages in thread
From: Jeff Law @ 2016-09-13 16:08 UTC (permalink / raw)
  To: Peter Bergner, Andrew Pinski
  Cc: Segher Boessenkool, Bernd Schmidt, GCC Patches

On 09/13/2016 09:45 AM, Peter Bergner wrote:
> On 9/13/16 9:26 AM, Andrew Pinski wrote:
>> On Tue, Sep 13, 2016 at 12:03 PM, Segher Boessenkool
>>> And all new ports should use LRA, so it should be the default.
>>
>> Since nobody else has said anything on this patch besides Bernd, I am
>> going to say yes please.  This patch in my mind is the right way
>> forward.  In the same new ports should not be cc0 ports (though I know
>> some folks try that every once in a while).
>
> + 1!
>
> If we don't make LRA the default, it will be very easy for new ports
> to default to reload, since they'll have to actively force usage of
> LRA and I can see that point being missed even if we have it documented.
> We don't want new ports to find out they need to enable LRA during
> their patch submission, since that entails a huge amount of retesting.
> It should be LRA from day 1 for them.
Right.  We want ports to start development using LRA from day 1.

The big question in my mind is whether or not we want to make it harder 
for ports to use reload :-)

Jeff

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 1/3] Put a TARGET_LRA_P into every target
  2016-09-13 11:11     ` Segher Boessenkool
  2016-09-13 14:27       ` Andrew Pinski
@ 2016-09-13 16:23       ` Joseph Myers
  2016-09-13 20:07         ` Segher Boessenkool
  1 sibling, 1 reply; 22+ messages in thread
From: Joseph Myers @ 2016-09-13 16:23 UTC (permalink / raw)
  To: Segher Boessenkool; +Cc: Bernd Schmidt, gcc-patches

On Tue, 13 Sep 2016, Segher Boessenkool wrote:

> Yes, many targets need the hook definition after this series; that should
> stick out like a sore thumb, help to remind people to change their target
> to use LRA (not a huge amount of work for most, although it can get tricky).

I would also encourage an email to all the maintainers of ports using 
reload, CC gcc@, pointing out that moving is desirable and with pointers 
to guidance on how to do the move.

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 1/3] Put a TARGET_LRA_P into every target
  2016-09-13 16:08           ` Jeff Law
@ 2016-09-13 17:08             ` Mike Stump
  0 siblings, 0 replies; 22+ messages in thread
From: Mike Stump @ 2016-09-13 17:08 UTC (permalink / raw)
  To: Jeff Law
  Cc: Peter Bergner, Andrew Pinski, Segher Boessenkool, Bernd Schmidt,
	GCC Patches

On Sep 13, 2016, at 9:07 AM, Jeff Law <law@redhat.com> wrote:
> 
> On 09/13/2016 09:45 AM, Peter Bergner wrote:
>> On 9/13/16 9:26 AM, Andrew Pinski wrote:
>>> On Tue, Sep 13, 2016 at 12:03 PM, Segher Boessenkool
>>>> And all new ports should use LRA, so it should be the default.
>>> 
>>> I am going to say yes please.  This patch in my mind is the right way
>>> forward.
>> 
>> + 1!
>> 
>> should be LRA from day 1 for them.
> Right.  We want ports to start development using LRA from day 1.

As the author of a few new ports, let me say that I have wanted the LRA default for a while now.  I was amazed that this wasn't already the case.  I personally favor the patch series.

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 1/3] Put a TARGET_LRA_P into every target
  2016-09-13 16:23       ` Joseph Myers
@ 2016-09-13 20:07         ` Segher Boessenkool
  0 siblings, 0 replies; 22+ messages in thread
From: Segher Boessenkool @ 2016-09-13 20:07 UTC (permalink / raw)
  To: Joseph Myers; +Cc: Bernd Schmidt, gcc-patches

On Tue, Sep 13, 2016 at 04:15:45PM +0000, Joseph Myers wrote:
> On Tue, 13 Sep 2016, Segher Boessenkool wrote:
> 
> > Yes, many targets need the hook definition after this series; that should
> > stick out like a sore thumb, help to remind people to change their target
> > to use LRA (not a huge amount of work for most, although it can get tricky).
> 
> I would also encourage an email to all the maintainers of ports using 
> reload, CC gcc@, pointing out that moving is desirable and with pointers 
> to guidance on how to do the move.

Yeah.  I'll also do a news entry.  Pointers to guidance...  I'll create
a wiki page so that we can collect everyone's experience :-)


Segher

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 1/3] Put a TARGET_LRA_P into every target
  2016-09-12 22:22 ` [PATCH 1/3] Put a TARGET_LRA_P into every target Segher Boessenkool
  2016-09-13 10:42   ` Bernd Schmidt
@ 2016-09-13 20:39   ` Jeff Law
  2016-09-14 11:06     ` Segher Boessenkool
  1 sibling, 1 reply; 22+ messages in thread
From: Jeff Law @ 2016-09-13 20:39 UTC (permalink / raw)
  To: Segher Boessenkool, gcc-patches

On 09/12/2016 04:22 PM, Segher Boessenkool wrote:
> This patch adds a TARGET_LRA_P (defined to hook_bool_void_false) to
> every target that didn't yet override the hook.  No functional change.
>
>
> Segher
>
>
> 2016-09-12  Segher Boessenkool  <segher@kernel.crashing.org>
>
> 	* config/alpha/alpha.c (TARGET_LRA_P): New macro, defined to
> 	hook_bool_void_false.
> 	* config/avr/avr.c: Ditto.
> 	* config/bfin/bfin.c: Ditto.
> 	* config/c6x/c6x.c: Ditto.
> 	* config/cr16/cr16.c: Ditto.
> 	* config/cris/cris.c: Ditto.
> 	* config/epiphany/epiphany.c: Ditto.
> 	* config/fr30/fr30.c: Ditto.
> 	* config/frv/frv.c: Ditto.
> 	* config/h8300/h8300.c: Ditto.
> 	* config/ia64/ia64.c: Ditto.
> 	* config/iq2000/iq2000.c: Ditto.
> 	* config/lm32/lm32.c: Ditto.
> 	* config/m32c/m32c.c: Ditto.
> 	* config/m32r/m32r.c: Ditto.
> 	* config/m68k/m68k.c: Ditto.
> 	* config/mcore/mcore.c: Ditto.
> 	* config/microblaze/microblaze.c: Ditto.
> 	* config/mmix/mmix.c: Ditto.
> 	* config/mn10300/mn10300.c: Ditto.
> 	* config/moxie/moxie.c: Ditto.
> 	* config/msp430/msp430.c: Ditto.
> 	* config/nios2/nios2.c: Ditto.
> 	* config/nvptx/nvptx.c: Ditto.
> 	* config/pa/pa.c: Ditto.
> 	* config/pdp11/pdp11.c: Ditto.
> 	* config/rl78/rl78.c: Ditto.
> 	* config/sparc/sparc.c: Ditto.
> 	* config/spu/spu.c: Ditto.
> 	* config/stormy16/stormy16.c: Ditto.
> 	* config/tilegx/tilegx.c: Ditto.
> 	* config/tilepro/tilepro.c: Ditto.
> 	* config/v850/v850.c: Ditto.
> 	* config/vax/vax.c: Ditto.
> 	* config/visium/visium.c: Ditto.
> 	* config/xtensa/xtensa.c: Ditto.
I believe a doc update of some kind is in order.  With the doc update 
the entire series is OK.
jeff

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 1/3] Put a TARGET_LRA_P into every target
  2016-09-13 20:39   ` Jeff Law
@ 2016-09-14 11:06     ` Segher Boessenkool
  2016-09-14 13:01       ` Peter Bergner
  2016-09-16 10:39       ` Gerald Pfeifer
  0 siblings, 2 replies; 22+ messages in thread
From: Segher Boessenkool @ 2016-09-14 11:06 UTC (permalink / raw)
  To: Jeff Law; +Cc: gcc-patches

On Tue, Sep 13, 2016 at 02:38:54PM -0600, Jeff Law wrote:
> I believe a doc update of some kind is in order.  With the doc update 
> the entire series is OK.

Good catch, thanks.  My tests finished, all results identical.  I'll add
the following patch for the doc update (I hope the wording is strong enough).

Thanks,


Segher


2016-09-14  Segher Boessenkool  <segher@kernel.crashing.org>

	* target.def (lra_p): Change commentary (for the manual) for the
	new default.
	* doc/tm.texi: Regenerate.

---
 gcc/doc/tm.texi | 2 +-
 gcc/target.def  | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi
index dc5bcd6..0ca00d2 100644
--- a/gcc/doc/tm.texi
+++ b/gcc/doc/tm.texi
@@ -2861,7 +2861,7 @@ A target hook which can change allocno class for given pseudo from
 @end deftypefn
 
 @deftypefn {Target Hook} bool TARGET_LRA_P (void)
-A target hook which returns true if we use LRA instead of reload pass.    The default version of this target hook returns always false, but new  ports should use LRA.
+A target hook which returns true if we use LRA instead of reload pass.    The default version of this target hook returns always true.  New ports  should use LRA, and existing ports are encouraged to convert.
 @end deftypefn
 
 @deftypefn {Target Hook} int TARGET_REGISTER_PRIORITY (int)
diff --git a/gcc/target.def b/gcc/target.def
index 8509e7d..a4e4cbb 100644
--- a/gcc/target.def
+++ b/gcc/target.def
@@ -4929,8 +4929,8 @@ DEFHOOK
 (lra_p,
  "A target hook which returns true if we use LRA instead of reload pass.\
   \
-  The default version of this target hook returns always false, but new\
-  ports should use LRA.",
+  The default version of this target hook returns always true.  New ports\
+  should use LRA, and existing ports are encouraged to convert.",
  bool, (void),
  default_lra_p)
 
-- 
1.9.3

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 1/3] Put a TARGET_LRA_P into every target
  2016-09-14 11:06     ` Segher Boessenkool
@ 2016-09-14 13:01       ` Peter Bergner
  2016-09-14 14:01         ` Segher Boessenkool
  2016-09-16 10:39       ` Gerald Pfeifer
  1 sibling, 1 reply; 22+ messages in thread
From: Peter Bergner @ 2016-09-14 13:01 UTC (permalink / raw)
  To: Segher Boessenkool; +Cc: Jeff Law, gcc-patches

On 9/14/16 5:35 AM, Segher Boessenkool wrote:
> On Tue, Sep 13, 2016 at 02:38:54PM -0600, Jeff Law wrote:
>> I believe a doc update of some kind is in order.  With the doc update
>> the entire series is OK.
>
> Good catch, thanks.  My tests finished, all results identical.  I'll add
> the following patch for the doc update (I hope the wording is strong enough).

Maybe s/New ports should use LRA/New ports must use LRA/ ?



> + New ports  should use LRA, and existing ports are encouraged to convert.
              ^^
              extra space

Peter

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 1/3] Put a TARGET_LRA_P into every target
  2016-09-14 13:01       ` Peter Bergner
@ 2016-09-14 14:01         ` Segher Boessenkool
  0 siblings, 0 replies; 22+ messages in thread
From: Segher Boessenkool @ 2016-09-14 14:01 UTC (permalink / raw)
  To: Peter Bergner; +Cc: Jeff Law, gcc-patches, gcc

On Wed, Sep 14, 2016 at 07:46:13AM -0500, Peter Bergner wrote:
> On 9/14/16 5:35 AM, Segher Boessenkool wrote:
> > (I hope the wording is strong enough).

> Maybe s/New ports should use LRA/New ports must use LRA/ ?

Yeah maybe.  Does anyone else have an opinion on this?  Cc:ing gcc@...

> >+ New ports  should use LRA, and existing ports are encouraged to convert.
>              ^^
>              extra space

That is auto-generated, and not new :-)  The various info backends do
not seem to care (TeX doesn't, do any others?)


Segher

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 1/3] Put a TARGET_LRA_P into every target
  2016-09-14 11:06     ` Segher Boessenkool
  2016-09-14 13:01       ` Peter Bergner
@ 2016-09-16 10:39       ` Gerald Pfeifer
  2016-09-16 13:34         ` Richard Kenner
  2016-09-16 14:35         ` Segher Boessenkool
  1 sibling, 2 replies; 22+ messages in thread
From: Gerald Pfeifer @ 2016-09-16 10:39 UTC (permalink / raw)
  To: Segher Boessenkool; +Cc: Jeff Law, gcc-patches

On Wed, 14 Sep 2016, Segher Boessenkool wrote:
> 2016-09-14  Segher Boessenkool  <segher@kernel.crashing.org>
> 
> 	* target.def (lra_p): Change commentary (for the manual) for the
> 	new default.
> 	* doc/tm.texi: Regenerate.

"returns always true" -> "always returns true" ?

(The former is how we'd say it in German, and hence might be common in 
Dutch as well?  In English, both probably are fine, the latter feeling 
more natural to me.  But then, I'm not a native speaker. ;-)

Gerald

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 1/3] Put a TARGET_LRA_P into every target
  2016-09-16 10:39       ` Gerald Pfeifer
@ 2016-09-16 13:34         ` Richard Kenner
  2016-09-16 14:35         ` Segher Boessenkool
  1 sibling, 0 replies; 22+ messages in thread
From: Richard Kenner @ 2016-09-16 13:34 UTC (permalink / raw)
  To: gerald; +Cc: gcc-patches, law, segher

> "returns always true" -> "always returns true" ?
> 
> (The former is how we'd say it in German, and hence might be common in 
> Dutch as well?  In English, both probably are fine, the latter feeling 
> more natural to me.  But then, I'm not a native speaker. ;-)

The former is unusual in English and borders on being "wrong".  It
would be parsed as saying that it returns something called "always
true", as if that were a construct.

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 1/3] Put a TARGET_LRA_P into every target
  2016-09-16 10:39       ` Gerald Pfeifer
  2016-09-16 13:34         ` Richard Kenner
@ 2016-09-16 14:35         ` Segher Boessenkool
  2016-09-16 19:46           ` Mike Stump
  1 sibling, 1 reply; 22+ messages in thread
From: Segher Boessenkool @ 2016-09-16 14:35 UTC (permalink / raw)
  To: Gerald Pfeifer; +Cc: Jeff Law, gcc-patches

On Fri, Sep 16, 2016 at 12:26:42PM +0200, Gerald Pfeifer wrote:
> On Wed, 14 Sep 2016, Segher Boessenkool wrote:
> > 2016-09-14  Segher Boessenkool  <segher@kernel.crashing.org>
> > 
> > 	* target.def (lra_p): Change commentary (for the manual) for the
> > 	new default.
> > 	* doc/tm.texi: Regenerate.
> 
> "returns always true" -> "always returns true" ?
> 
> (The former is how we'd say it in German, and hence might be common in 
> Dutch as well?  In English, both probably are fine, the latter feeling 
> more natural to me.  But then, I'm not a native speaker. ;-)

In Dutch we would do this altogether differently.  I did not change this
text at all though (except s/false/true/) ;-)

Does just "The default version of this target hook returns true." sound
better?  I.e. delete "always".


Segher

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 1/3] Put a TARGET_LRA_P into every target
  2016-09-16 14:35         ` Segher Boessenkool
@ 2016-09-16 19:46           ` Mike Stump
  2016-09-19 15:55             ` Segher Boessenkool
  0 siblings, 1 reply; 22+ messages in thread
From: Mike Stump @ 2016-09-16 19:46 UTC (permalink / raw)
  To: Segher Boessenkool; +Cc: Gerald Pfeifer, Jeff Law, gcc-patches

On Sep 16, 2016, at 6:40 AM, Segher Boessenkool <segher@kernel.crashing.org> wrote:
> 
> Does just "The default version of this target hook returns true." sound
> better?  I.e. delete "always".

That is fine.

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 1/3] Put a TARGET_LRA_P into every target
  2016-09-16 19:46           ` Mike Stump
@ 2016-09-19 15:55             ` Segher Boessenkool
  0 siblings, 0 replies; 22+ messages in thread
From: Segher Boessenkool @ 2016-09-19 15:55 UTC (permalink / raw)
  To: Mike Stump; +Cc: Gerald Pfeifer, Jeff Law, gcc-patches

On Fri, Sep 16, 2016 at 12:04:23PM -0700, Mike Stump wrote:
> On Sep 16, 2016, at 6:40 AM, Segher Boessenkool <segher@kernel.crashing.org> wrote:
> > 
> > Does just "The default version of this target hook returns true." sound
> > better?  I.e. delete "always".
> 
> That is fine.

Okay, I'll commit the following (yes I'm slow).

Thanks,


Segher


2016-09-19  Segher Boessenkool  <segher@kernel.crashing.org>

	* target.def (lra_p): Wordsmithing.
	* doc/tm.texi: Regenerate.

---
 gcc/doc/tm.texi | 2 +-
 gcc/target.def  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi
index 0ca00d2..ced6274 100644
--- a/gcc/doc/tm.texi
+++ b/gcc/doc/tm.texi
@@ -2861,7 +2861,7 @@ A target hook which can change allocno class for given pseudo from
 @end deftypefn
 
 @deftypefn {Target Hook} bool TARGET_LRA_P (void)
-A target hook which returns true if we use LRA instead of reload pass.    The default version of this target hook returns always true.  New ports  should use LRA, and existing ports are encouraged to convert.
+A target hook which returns true if we use LRA instead of reload pass.    The default version of this target hook returns true.  New ports  should use LRA, and existing ports are encouraged to convert.
 @end deftypefn
 
 @deftypefn {Target Hook} int TARGET_REGISTER_PRIORITY (int)
diff --git a/gcc/target.def b/gcc/target.def
index a4e4cbb..0e10d6f 100644
--- a/gcc/target.def
+++ b/gcc/target.def
@@ -4929,7 +4929,7 @@ DEFHOOK
 (lra_p,
  "A target hook which returns true if we use LRA instead of reload pass.\
   \
-  The default version of this target hook returns always true.  New ports\
+  The default version of this target hook returns true.  New ports\
   should use LRA, and existing ports are encouraged to convert.",
  bool, (void),
  default_lra_p)
-- 
1.9.3

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2016-09-19 15:50 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-12 22:22 [PATCH 0/3] Default LRA to "on" Segher Boessenkool
2016-09-12 22:22 ` [PATCH 2/3] Change the default of TARGET_LRA_P to true Segher Boessenkool
2016-09-12 22:22 ` [PATCH 1/3] Put a TARGET_LRA_P into every target Segher Boessenkool
2016-09-13 10:42   ` Bernd Schmidt
2016-09-13 11:11     ` Segher Boessenkool
2016-09-13 14:27       ` Andrew Pinski
2016-09-13 15:53         ` Peter Bergner
2016-09-13 16:08           ` Jeff Law
2016-09-13 17:08             ` Mike Stump
2016-09-13 16:23       ` Joseph Myers
2016-09-13 20:07         ` Segher Boessenkool
2016-09-13 16:02     ` Jeff Law
2016-09-13 20:39   ` Jeff Law
2016-09-14 11:06     ` Segher Boessenkool
2016-09-14 13:01       ` Peter Bergner
2016-09-14 14:01         ` Segher Boessenkool
2016-09-16 10:39       ` Gerald Pfeifer
2016-09-16 13:34         ` Richard Kenner
2016-09-16 14:35         ` Segher Boessenkool
2016-09-16 19:46           ` Mike Stump
2016-09-19 15:55             ` Segher Boessenkool
2016-09-12 22:28 ` [PATCH 3/3] Delete TARGET_LRA_P from those targets that set it to "true" Segher Boessenkool

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).