public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH 0/6] more ifdef removal
@ 2015-10-11  0:25 tbsaunde+gcc
  2015-10-11  0:26 ` [PATCH 5/6] remove unneeded #if for HARD_FRAME_POINTER_IS_ARG_POINTER tbsaunde+gcc
                   ` (5 more replies)
  0 siblings, 6 replies; 11+ messages in thread
From: tbsaunde+gcc @ 2015-10-11  0:25 UTC (permalink / raw)
  To: gcc-patches

From: Trevor Saunders <tbsaunde+gcc@tbsaunde.org>

Hi,

more of the same sort of ifdef removal adding defaults.

patches individually bootstrapped + regtested on x86_64-linux-gnu, committing
as preapproved.

Trev


Trevor Saunders (6):
  always define INITIAL_FRAME_ADDRESS_RTX
  always define SETUP_FRAME_ADDRESSES
  always define DYNAMIC_CHAIN_ADDRESS
  always define FRAME_ADDR_RTX
  remove unneeded #if for HARD_FRAME_POINTER_IS_ARG_POINTER
  always define REVERSE_CONDITION

 gcc/builtins.c     | 56 +++++++++++++++++++-----------------------------------
 gcc/defaults.h     | 20 +++++++++++++++++++
 gcc/doc/tm.texi    |  4 ++--
 gcc/doc/tm.texi.in |  4 ++--
 gcc/except.c       |  2 --
 gcc/jump.c         |  8 +-------
 6 files changed, 45 insertions(+), 49 deletions(-)

-- 
2.6.1

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

* [PATCH 2/6] always define SETUP_FRAME_ADDRESSES
  2015-10-11  0:25 [PATCH 0/6] more ifdef removal tbsaunde+gcc
                   ` (2 preceding siblings ...)
  2015-10-11  0:26 ` [PATCH 6/6] always define REVERSE_CONDITION tbsaunde+gcc
@ 2015-10-11  0:26 ` tbsaunde+gcc
  2015-10-12 10:19   ` Bernd Schmidt
  2015-10-11  0:26 ` [PATCH 1/6] always define INITIAL_FRAME_ADDRESS_RTX tbsaunde+gcc
  2015-10-11  0:26 ` [PATCH 3/6] always define DYNAMIC_CHAIN_ADDRESS tbsaunde+gcc
  5 siblings, 1 reply; 11+ messages in thread
From: tbsaunde+gcc @ 2015-10-11  0:26 UTC (permalink / raw)
  To: gcc-patches

From: Trevor Saunders <tbsaunde+gcc@tbsaunde.org>

gcc/ChangeLog:

2015-10-10  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* defaults.h (SETUP_FRAME_ADDRESSES): New default definition.
	* builtins.c (expand_builtin_return_addr): Adjust.
	* doc/tm.texi: Likewise.
	* doc/tm.texi.in: Likewise.
	* except.c (expand_builtin_unwind_init): Likewise.
---
 gcc/builtins.c     | 5 -----
 gcc/defaults.h     | 4 ++++
 gcc/doc/tm.texi    | 4 ++--
 gcc/doc/tm.texi.in | 4 ++--
 gcc/except.c       | 2 --
 5 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/gcc/builtins.c b/gcc/builtins.c
index 3bbe763..bd95acb 100644
--- a/gcc/builtins.c
+++ b/gcc/builtins.c
@@ -784,13 +784,8 @@ expand_builtin_return_addr (enum built_in_function fndecl_code, int count)
 	}
     }
 
-  /* Some machines need special handling before we can access
-     arbitrary frames.  For example, on the SPARC, we must first flush
-     all register windows to the stack.  */
-#ifdef SETUP_FRAME_ADDRESSES
   if (count > 0)
     SETUP_FRAME_ADDRESSES ();
-#endif
 
   /* On the SPARC, the return address is not in the frame, it is in a
      register.  There is no way to access it off of the current frame
diff --git a/gcc/defaults.h b/gcc/defaults.h
index c4d9536..5f1ea76 100644
--- a/gcc/defaults.h
+++ b/gcc/defaults.h
@@ -1281,6 +1281,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 #define INITIAL_FRAME_ADDRESS_RTX NULL
 #endif
 
+#ifndef SETUP_FRAME_ADDRESSES
+#define SETUP_FRAME_ADDRESSES() do { } while (0)
+#endif
+
 #ifdef GCC_INSN_FLAGS_H
 /* Dependent default target macro definitions
 
diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi
index 72366b9..d09e646 100644
--- a/gcc/doc/tm.texi
+++ b/gcc/doc/tm.texi
@@ -3020,11 +3020,11 @@ address of the stack word that points to the previous frame.
 @end defmac
 
 @defmac SETUP_FRAME_ADDRESSES
-If defined, a C expression that produces the machine-specific code to
+A C expression that produces the machine-specific code to
 setup the stack so that arbitrary frames can be accessed.  For example,
 on the SPARC, we must flush all of the register windows to the stack
 before we can access arbitrary stack frames.  You will seldom need to
-define this macro.
+define this macro.  The default is to do nothing.
 @end defmac
 
 @deftypefn {Target Hook} rtx TARGET_BUILTIN_SETJMP_FRAME_VALUE (void)
diff --git a/gcc/doc/tm.texi.in b/gcc/doc/tm.texi.in
index d8d0087..33939ec 100644
--- a/gcc/doc/tm.texi.in
+++ b/gcc/doc/tm.texi.in
@@ -2626,11 +2626,11 @@ address of the stack word that points to the previous frame.
 @end defmac
 
 @defmac SETUP_FRAME_ADDRESSES
-If defined, a C expression that produces the machine-specific code to
+A C expression that produces the machine-specific code to
 setup the stack so that arbitrary frames can be accessed.  For example,
 on the SPARC, we must flush all of the register windows to the stack
 before we can access arbitrary stack frames.  You will seldom need to
-define this macro.
+define this macro.  The default is to do nothing.
 @end defmac
 
 @hook TARGET_BUILTIN_SETJMP_FRAME_VALUE
diff --git a/gcc/except.c b/gcc/except.c
index fed18ee..8f77653 100644
--- a/gcc/except.c
+++ b/gcc/except.c
@@ -2120,9 +2120,7 @@ expand_builtin_unwind_init (void)
      able to copy the saved values for any registers from frames we unwind.  */
   crtl->saves_all_registers = 1;
 
-#ifdef SETUP_FRAME_ADDRESSES
   SETUP_FRAME_ADDRESSES ();
-#endif
 }
 
 /* Map a non-negative number to an eh return data register number; expands
-- 
2.6.1

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

* [PATCH 4/6] always define FRAME_ADDR_RTX
  2015-10-11  0:25 [PATCH 0/6] more ifdef removal tbsaunde+gcc
  2015-10-11  0:26 ` [PATCH 5/6] remove unneeded #if for HARD_FRAME_POINTER_IS_ARG_POINTER tbsaunde+gcc
@ 2015-10-11  0:26 ` tbsaunde+gcc
  2015-10-11  0:26 ` [PATCH 6/6] always define REVERSE_CONDITION tbsaunde+gcc
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 11+ messages in thread
From: tbsaunde+gcc @ 2015-10-11  0:26 UTC (permalink / raw)
  To: gcc-patches

From: Trevor Saunders <tbsaunde+gcc@tbsaunde.org>

gcc/ChangeLog:

2015-10-10  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* defaults.h (FRAME_ADDR_RTX): New default definition.
	* builtins.c (expand_builtin_return_addr): Adjust.
---
 gcc/builtins.c | 4 ----
 gcc/defaults.h | 4 ++++
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/gcc/builtins.c b/gcc/builtins.c
index 750488e..65aa71f 100644
--- a/gcc/builtins.c
+++ b/gcc/builtins.c
@@ -808,11 +808,7 @@ expand_builtin_return_addr (enum built_in_function fndecl_code, int count)
   /* For __builtin_frame_address, return what we've got.  But, on
      the SPARC for example, we may have to add a bias.  */
   if (fndecl_code == BUILT_IN_FRAME_ADDRESS)
-#ifdef FRAME_ADDR_RTX
     return FRAME_ADDR_RTX (tem);
-#else
-    return tem;
-#endif
 
   /* For __builtin_return_address, get the return address from that frame.  */
 #ifdef RETURN_ADDR_RTX
diff --git a/gcc/defaults.h b/gcc/defaults.h
index 80ad35c..eb16fc8 100644
--- a/gcc/defaults.h
+++ b/gcc/defaults.h
@@ -1289,6 +1289,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 #define DYNAMIC_CHAIN_ADDRESS(x) (x)
 #endif
 
+#ifndef FRAME_ADDR_RTX
+#define FRAME_ADDR_RTX(x) (x)
+#endif
+
 #ifdef GCC_INSN_FLAGS_H
 /* Dependent default target macro definitions
 
-- 
2.6.1

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

* [PATCH 6/6] always define REVERSE_CONDITION
  2015-10-11  0:25 [PATCH 0/6] more ifdef removal tbsaunde+gcc
  2015-10-11  0:26 ` [PATCH 5/6] remove unneeded #if for HARD_FRAME_POINTER_IS_ARG_POINTER tbsaunde+gcc
  2015-10-11  0:26 ` [PATCH 4/6] always define FRAME_ADDR_RTX tbsaunde+gcc
@ 2015-10-11  0:26 ` tbsaunde+gcc
  2015-10-11  0:26 ` [PATCH 2/6] always define SETUP_FRAME_ADDRESSES tbsaunde+gcc
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 11+ messages in thread
From: tbsaunde+gcc @ 2015-10-11  0:26 UTC (permalink / raw)
  To: gcc-patches

From: Trevor Saunders <tbsaunde+gcc@tbsaunde.org>

gcc/ChangeLog:

2015-10-10  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* defaults.h (REVERSE_CONDITION): New default definition.
	* jump.c (reversed_comparison_code_parts): Adjust.
---
 gcc/defaults.h | 4 ++++
 gcc/jump.c     | 8 +-------
 2 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/gcc/defaults.h b/gcc/defaults.h
index eb16fc8..cee799d 100644
--- a/gcc/defaults.h
+++ b/gcc/defaults.h
@@ -1293,6 +1293,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 #define FRAME_ADDR_RTX(x) (x)
 #endif
 
+#ifndef REVERSE_CONDITION
+#define REVERSE_CONDITION(code, mode) reverse_condition (code)
+#endif
+
 #ifdef GCC_INSN_FLAGS_H
 /* Dependent default target macro definitions
 
diff --git a/gcc/jump.c b/gcc/jump.c
index 21324cd..f0d2af0 100644
--- a/gcc/jump.c
+++ b/gcc/jump.c
@@ -389,13 +389,7 @@ reversed_comparison_code_parts (enum rtx_code code, const_rtx arg0,
      machine description to do tricks.  */
   if (GET_MODE_CLASS (mode) == MODE_CC
       && REVERSIBLE_CC_MODE (mode))
-    {
-#ifdef REVERSE_CONDITION
-      return REVERSE_CONDITION (code, mode);
-#else
-      return reverse_condition (code);
-#endif
-    }
+    return REVERSE_CONDITION (code, mode);
 
   /* Try a few special cases based on the comparison code.  */
   switch (code)
-- 
2.6.1

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

* [PATCH 3/6] always define DYNAMIC_CHAIN_ADDRESS
  2015-10-11  0:25 [PATCH 0/6] more ifdef removal tbsaunde+gcc
                   ` (4 preceding siblings ...)
  2015-10-11  0:26 ` [PATCH 1/6] always define INITIAL_FRAME_ADDRESS_RTX tbsaunde+gcc
@ 2015-10-11  0:26 ` tbsaunde+gcc
  5 siblings, 0 replies; 11+ messages in thread
From: tbsaunde+gcc @ 2015-10-11  0:26 UTC (permalink / raw)
  To: gcc-patches

From: Trevor Saunders <tbsaunde+gcc@tbsaunde.org>

gcc/ChangeLog:

2015-10-10  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* defaults.h (DYNAMIC_CHAIN_ADDRESS): New default definition.
	* builtins.c (expand_builtin_return_addr): Adjust.
---
 gcc/builtins.c | 2 --
 gcc/defaults.h | 4 ++++
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/gcc/builtins.c b/gcc/builtins.c
index bd95acb..750488e 100644
--- a/gcc/builtins.c
+++ b/gcc/builtins.c
@@ -799,9 +799,7 @@ expand_builtin_return_addr (enum built_in_function fndecl_code, int count)
     {
       /* Assume the dynamic chain pointer is in the word that the
 	 frame address points to, unless otherwise specified.  */
-#ifdef DYNAMIC_CHAIN_ADDRESS
       tem = DYNAMIC_CHAIN_ADDRESS (tem);
-#endif
       tem = memory_address (Pmode, tem);
       tem = gen_frame_mem (Pmode, tem);
       tem = copy_to_reg (tem);
diff --git a/gcc/defaults.h b/gcc/defaults.h
index 5f1ea76..80ad35c 100644
--- a/gcc/defaults.h
+++ b/gcc/defaults.h
@@ -1285,6 +1285,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 #define SETUP_FRAME_ADDRESSES() do { } while (0)
 #endif
 
+#ifndef DYNAMIC_CHAIN_ADDRESS
+#define DYNAMIC_CHAIN_ADDRESS(x) (x)
+#endif
+
 #ifdef GCC_INSN_FLAGS_H
 /* Dependent default target macro definitions
 
-- 
2.6.1

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

* [PATCH 1/6] always define INITIAL_FRAME_ADDRESS_RTX
  2015-10-11  0:25 [PATCH 0/6] more ifdef removal tbsaunde+gcc
                   ` (3 preceding siblings ...)
  2015-10-11  0:26 ` [PATCH 2/6] always define SETUP_FRAME_ADDRESSES tbsaunde+gcc
@ 2015-10-11  0:26 ` tbsaunde+gcc
  2015-10-11  0:26 ` [PATCH 3/6] always define DYNAMIC_CHAIN_ADDRESS tbsaunde+gcc
  5 siblings, 0 replies; 11+ messages in thread
From: tbsaunde+gcc @ 2015-10-11  0:26 UTC (permalink / raw)
  To: gcc-patches

From: Trevor Saunders <tbsaunde+gcc@tbsaunde.org>

gcc/ChangeLog:

2015-10-10  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* builtins.c (expand_builtin_return_addr): Adjust.
	* defaults.h (INITIAL_FRAME_ADDRESS_RTX): New default definition.
---
 gcc/builtins.c | 41 +++++++++++++++++++----------------------
 gcc/defaults.h |  4 ++++
 2 files changed, 23 insertions(+), 22 deletions(-)

diff --git a/gcc/builtins.c b/gcc/builtins.c
index 643eeef..3bbe763 100644
--- a/gcc/builtins.c
+++ b/gcc/builtins.c
@@ -761,31 +761,28 @@ static rtx
 expand_builtin_return_addr (enum built_in_function fndecl_code, int count)
 {
   int i;
-
-#ifdef INITIAL_FRAME_ADDRESS_RTX
   rtx tem = INITIAL_FRAME_ADDRESS_RTX;
-#else
-  rtx tem;
-
-  /* For a zero count with __builtin_return_address, we don't care what
-     frame address we return, because target-specific definitions will
-     override us.  Therefore frame pointer elimination is OK, and using
-     the soft frame pointer is OK.
-
-     For a nonzero count, or a zero count with __builtin_frame_address,
-     we require a stable offset from the current frame pointer to the
-     previous one, so we must use the hard frame pointer, and
-     we must disable frame pointer elimination.  */
-  if (count == 0 && fndecl_code == BUILT_IN_RETURN_ADDRESS)
-    tem = frame_pointer_rtx;
-  else
-    {
-      tem = hard_frame_pointer_rtx;
+  if (tem == NULL_RTX)
+    {
+      /* For a zero count with __builtin_return_address, we don't care what
+	 frame address we return, because target-specific definitions will
+	 override us.  Therefore frame pointer elimination is OK, and using
+	 the soft frame pointer is OK.
+
+	 For a nonzero count, or a zero count with __builtin_frame_address,
+	 we require a stable offset from the current frame pointer to the
+	 previous one, so we must use the hard frame pointer, and
+	 we must disable frame pointer elimination.  */
+      if (count == 0 && fndecl_code == BUILT_IN_RETURN_ADDRESS)
+	tem = frame_pointer_rtx;
+      else
+	{
+	  tem = hard_frame_pointer_rtx;
 
-      /* Tell reload not to eliminate the frame pointer.  */
-      crtl->accesses_prior_frames = 1;
+	  /* Tell reload not to eliminate the frame pointer.  */
+	  crtl->accesses_prior_frames = 1;
+	}
     }
-#endif
 
   /* Some machines need special handling before we can access
      arbitrary frames.  For example, on the SPARC, we must first flush
diff --git a/gcc/defaults.h b/gcc/defaults.h
index 14ef91a..c4d9536 100644
--- a/gcc/defaults.h
+++ b/gcc/defaults.h
@@ -1277,6 +1277,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 #define CONSTANT_ALIGNMENT(EXP, ALIGN) ALIGN
 #endif
 
+#ifndef INITIAL_FRAME_ADDRESS_RTX
+#define INITIAL_FRAME_ADDRESS_RTX NULL
+#endif
+
 #ifdef GCC_INSN_FLAGS_H
 /* Dependent default target macro definitions
 
-- 
2.6.1

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

* [PATCH 5/6] remove unneeded #if for HARD_FRAME_POINTER_IS_ARG_POINTER
  2015-10-11  0:25 [PATCH 0/6] more ifdef removal tbsaunde+gcc
@ 2015-10-11  0:26 ` tbsaunde+gcc
  2015-10-11  0:26 ` [PATCH 4/6] always define FRAME_ADDR_RTX tbsaunde+gcc
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 11+ messages in thread
From: tbsaunde+gcc @ 2015-10-11  0:26 UTC (permalink / raw)
  To: gcc-patches

From: Trevor Saunders <tbsaunde+gcc@tbsaunde.org>

gcc/ChangeLog:

2015-10-10  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* builtins.c (expand_builtin_setjmp_receiver): Don't use #if to
	check HARD_FRAME_POINTER_IS_ARG_POINTER.
---
 gcc/builtins.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/gcc/builtins.c b/gcc/builtins.c
index 65aa71f..b4ac535 100644
--- a/gcc/builtins.c
+++ b/gcc/builtins.c
@@ -915,8 +915,7 @@ expand_builtin_setjmp_receiver (rtx receiver_label)
       emit_clobber (hard_frame_pointer_rtx);
     }
 
-#if !HARD_FRAME_POINTER_IS_ARG_POINTER
-  if (fixed_regs[ARG_POINTER_REGNUM])
+  if (!HARD_FRAME_POINTER_IS_ARG_POINTER && fixed_regs[ARG_POINTER_REGNUM])
     {
 #ifdef ELIMINABLE_REGS
       /* If the argument pointer can be eliminated in favor of the
@@ -941,7 +940,6 @@ expand_builtin_setjmp_receiver (rtx receiver_label)
 			  copy_to_reg (get_arg_pointer_save_area ()));
 	}
     }
-#endif
 
   if (receiver_label != NULL && targetm.have_builtin_setjmp_receiver ())
     emit_insn (targetm.gen_builtin_setjmp_receiver (receiver_label));
-- 
2.6.1

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

* Re: [PATCH 2/6] always define SETUP_FRAME_ADDRESSES
  2015-10-11  0:26 ` [PATCH 2/6] always define SETUP_FRAME_ADDRESSES tbsaunde+gcc
@ 2015-10-12 10:19   ` Bernd Schmidt
  2015-10-15  2:14     ` Trevor Saunders
  0 siblings, 1 reply; 11+ messages in thread
From: Bernd Schmidt @ 2015-10-12 10:19 UTC (permalink / raw)
  To: tbsaunde+gcc, gcc-patches

On 10/11/2015 02:25 AM, tbsaunde+gcc@tbsaunde.org wrote:
> From: Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
>
> gcc/ChangeLog:
>
> 2015-10-10  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
>
> 	* defaults.h (SETUP_FRAME_ADDRESSES): New default definition.
> 	* builtins.c (expand_builtin_return_addr): Adjust.
> 	* doc/tm.texi: Likewise.
> 	* doc/tm.texi.in: Likewise.
> 	* except.c (expand_builtin_unwind_init): Likewise.

If we go to the trouble of changing this, could we convert macros to 
target hooks instead while we're there? REVERSE_CONDITION, 
SETUP_FRAME_ADDRESSES and FRAME_ADDR_RTX all seem to be used only in a 
handful of ports, and INITIAL_FRAME_ADDRESS_RTX only in one.


Bernd

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

* Re: [PATCH 2/6] always define SETUP_FRAME_ADDRESSES
  2015-10-12 10:19   ` Bernd Schmidt
@ 2015-10-15  2:14     ` Trevor Saunders
  2015-10-15  9:47       ` Bernd Schmidt
  0 siblings, 1 reply; 11+ messages in thread
From: Trevor Saunders @ 2015-10-15  2:14 UTC (permalink / raw)
  To: Bernd Schmidt; +Cc: tbsaunde+gcc, gcc-patches

On Mon, Oct 12, 2015 at 12:19:08PM +0200, Bernd Schmidt wrote:
> On 10/11/2015 02:25 AM, tbsaunde+gcc@tbsaunde.org wrote:
> >From: Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
> >
> >gcc/ChangeLog:
> >
> >2015-10-10  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
> >
> >	* defaults.h (SETUP_FRAME_ADDRESSES): New default definition.
> >	* builtins.c (expand_builtin_return_addr): Adjust.
> >	* doc/tm.texi: Likewise.
> >	* doc/tm.texi.in: Likewise.
> >	* except.c (expand_builtin_unwind_init): Likewise.
> 
> If we go to the trouble of changing this, could we convert macros to target
> hooks instead while we're there? REVERSE_CONDITION, SETUP_FRAME_ADDRESSES
> and FRAME_ADDR_RTX all seem to be used only in a handful of ports, and
> INITIAL_FRAME_ADDRESS_RTX only in one.

I'm definitely planning to do that, but I think this is still somewhat
useful even if only to have one list to look at for what hooks need to
be added.

Trev

> 
> 
> Bernd

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

* Re: [PATCH 2/6] always define SETUP_FRAME_ADDRESSES
  2015-10-15  2:14     ` Trevor Saunders
@ 2015-10-15  9:47       ` Bernd Schmidt
  2015-10-16  5:37         ` Trevor Saunders
  0 siblings, 1 reply; 11+ messages in thread
From: Bernd Schmidt @ 2015-10-15  9:47 UTC (permalink / raw)
  To: Trevor Saunders; +Cc: tbsaunde+gcc, gcc-patches

On 10/15/2015 04:13 AM, Trevor Saunders wrote:
> On Mon, Oct 12, 2015 at 12:19:08PM +0200, Bernd Schmidt wrote:
>> If we go to the trouble of changing this, could we convert macros to target
>> hooks instead while we're there? REVERSE_CONDITION, SETUP_FRAME_ADDRESSES
>> and FRAME_ADDR_RTX all seem to be used only in a handful of ports, and
>> INITIAL_FRAME_ADDRESS_RTX only in one.
>
> I'm definitely planning to do that, but I think this is still somewhat
> useful even if only to have one list to look at for what hooks need to
> be added.

I'd prefer to do things right from the start, at least for easy cases 
such as these. Each change we make has a chance of introducing errors, 
and there is a cost for people working on patches each time the code 
changes under them. And for you it'll be less work in the long run as well.


Bernd

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

* Re: [PATCH 2/6] always define SETUP_FRAME_ADDRESSES
  2015-10-15  9:47       ` Bernd Schmidt
@ 2015-10-16  5:37         ` Trevor Saunders
  0 siblings, 0 replies; 11+ messages in thread
From: Trevor Saunders @ 2015-10-16  5:37 UTC (permalink / raw)
  To: Bernd Schmidt; +Cc: tbsaunde+gcc, gcc-patches

On Thu, Oct 15, 2015 at 11:47:10AM +0200, Bernd Schmidt wrote:
> On 10/15/2015 04:13 AM, Trevor Saunders wrote:
> >On Mon, Oct 12, 2015 at 12:19:08PM +0200, Bernd Schmidt wrote:
> >>If we go to the trouble of changing this, could we convert macros to target
> >>hooks instead while we're there? REVERSE_CONDITION, SETUP_FRAME_ADDRESSES
> >>and FRAME_ADDR_RTX all seem to be used only in a handful of ports, and
> >>INITIAL_FRAME_ADDRESS_RTX only in one.
> >
> >I'm definitely planning to do that, but I think this is still somewhat
> >useful even if only to have one list to look at for what hooks need to
> >be added.
> 
> I'd prefer to do things right from the start, at least for easy cases such
> as these. Each change we make has a chance of introducing errors, and there
> is a cost for people working on patches each time the code changes under
> them. And for you it'll be less work in the long run as well.

Its a fair concern that changing things has risks, on the other hand
breaking the change up into parts makes the parts simpler to check for
correctness.  At any rate I don't have any more tiny patches like this
coming, so I don't know how much this discussion is getting us ;)

thanks!

Trev

> 
> 
> Bernd

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

end of thread, other threads:[~2015-10-16  5:37 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-11  0:25 [PATCH 0/6] more ifdef removal tbsaunde+gcc
2015-10-11  0:26 ` [PATCH 5/6] remove unneeded #if for HARD_FRAME_POINTER_IS_ARG_POINTER tbsaunde+gcc
2015-10-11  0:26 ` [PATCH 4/6] always define FRAME_ADDR_RTX tbsaunde+gcc
2015-10-11  0:26 ` [PATCH 6/6] always define REVERSE_CONDITION tbsaunde+gcc
2015-10-11  0:26 ` [PATCH 2/6] always define SETUP_FRAME_ADDRESSES tbsaunde+gcc
2015-10-12 10:19   ` Bernd Schmidt
2015-10-15  2:14     ` Trevor Saunders
2015-10-15  9:47       ` Bernd Schmidt
2015-10-16  5:37         ` Trevor Saunders
2015-10-11  0:26 ` [PATCH 1/6] always define INITIAL_FRAME_ADDRESS_RTX tbsaunde+gcc
2015-10-11  0:26 ` [PATCH 3/6] always define DYNAMIC_CHAIN_ADDRESS tbsaunde+gcc

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).