public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Remove SLOW_SHORT_ACCESS from target headers
@ 2022-11-10  1:15 apinski
  2022-11-10  1:20 ` Andrew Pinski
  0 siblings, 1 reply; 4+ messages in thread
From: apinski @ 2022-11-10  1:15 UTC (permalink / raw)
  To: gcc-patches; +Cc: Andrew Pinski

From: Andrew Pinski <apinski@marvell.com>

SLOW_SHORT_ACCESS is defined in bfin and i386 target
headers but the target macro is not used elsewhere.
So let's remove it from those two headers and posion it.

OK? Built x86_64-linux-gnu and bfin-elf.

gcc/ChangeLog:

	* config/bfin/bfin.h (SLOW_SHORT_ACCESS): Delete.
	* config/i386/i386.h (SLOW_SHORT_ACCESS): Delete.
	* system.h: Poison SLOW_SHORT_ACCESS
---
 gcc/config/bfin/bfin.h | 1 -
 gcc/config/i386/i386.h | 3 ---
 gcc/system.h           | 2 +-
 3 files changed, 1 insertion(+), 5 deletions(-)

diff --git a/gcc/config/bfin/bfin.h b/gcc/config/bfin/bfin.h
index 4e7753038a8..1d75c655df8 100644
--- a/gcc/config/bfin/bfin.h
+++ b/gcc/config/bfin/bfin.h
@@ -810,7 +810,6 @@ typedef struct {
    subsequent accesses occur to other fields in the same word of the
    structure, but to different bytes.  */
 #define SLOW_BYTE_ACCESS  0
-#define SLOW_SHORT_ACCESS 0
 
 /* Define this if most significant bit is lowest numbered
    in instructions that operate on numbered bit-fields. */
diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h
index b32db8da109..a5ad9f387f7 100644
--- a/gcc/config/i386/i386.h
+++ b/gcc/config/i386/i386.h
@@ -1933,9 +1933,6 @@ do {							\
 
 #define SLOW_BYTE_ACCESS 0
 
-/* Nonzero if access to memory by shorts is slow and undesirable.  */
-#define SLOW_SHORT_ACCESS 0
-
 /* Define this macro if it is as good or better to call a constant
    function address than to call an address kept in a register.
 
diff --git a/gcc/system.h b/gcc/system.h
index c192b6c3ce7..de9c5c0d2ef 100644
--- a/gcc/system.h
+++ b/gcc/system.h
@@ -1075,7 +1075,7 @@ extern void fancy_abort (const char *, int, const char *)
 	EH_FRAME_IN_DATA_SECTION TARGET_FLT_EVAL_METHOD_NON_DEFAULT	   \
 	JCR_SECTION_NAME TARGET_USE_JCR_SECTION SDB_DEBUGGING_INFO	   \
 	SDB_DEBUG NO_IMPLICIT_EXTERN_C NOTICE_UPDATE_CC			   \
-	CC_STATUS_MDEP_INIT CC_STATUS_MDEP CC_STATUS
+	CC_STATUS_MDEP_INIT CC_STATUS_MDEP CC_STATUS SLOW_SHORT_ACCESS
 
 /* Hooks that are no longer used.  */
  #pragma GCC poison LANG_HOOKS_FUNCTION_MARK LANG_HOOKS_FUNCTION_FREE	\
-- 
2.17.1


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

* Re: [PATCH] Remove SLOW_SHORT_ACCESS from target headers
  2022-11-10  1:15 [PATCH] Remove SLOW_SHORT_ACCESS from target headers apinski
@ 2022-11-10  1:20 ` Andrew Pinski
  2022-11-10  8:47   ` Richard Biener
  0 siblings, 1 reply; 4+ messages in thread
From: Andrew Pinski @ 2022-11-10  1:20 UTC (permalink / raw)
  To: apinski; +Cc: gcc-patches

On Wed, Nov 9, 2022 at 5:16 PM apinski--- via Gcc-patches
<gcc-patches@gcc.gnu.org> wrote:
>
> From: Andrew Pinski <apinski@marvell.com>
>
> SLOW_SHORT_ACCESS is defined in bfin and i386 target
> headers but the target macro is not used elsewhere.
> So let's remove it from those two headers and poison it.

Just to add, this target macro was defined in GCC 2.8.0 in i386.h but
not used in any other sources.
apinski@xeond:~/src/upstream-gcc/gcc$ git grep SLOW_SHORT_ACCESS
releases/gcc-2.8.0
releases/gcc-2.8.0:gcc/config/i386/i386.h:#define SLOW_SHORT_ACCESS 0

So it looks like it was never used for the last 24+ years and it is
time to finally remove it.

Thanks,
Andrew Pinski


>
> OK? Built x86_64-linux-gnu and bfin-elf.
>
> gcc/ChangeLog:
>
>         * config/bfin/bfin.h (SLOW_SHORT_ACCESS): Delete.
>         * config/i386/i386.h (SLOW_SHORT_ACCESS): Delete.
>         * system.h: Poison SLOW_SHORT_ACCESS
> ---
>  gcc/config/bfin/bfin.h | 1 -
>  gcc/config/i386/i386.h | 3 ---
>  gcc/system.h           | 2 +-
>  3 files changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/gcc/config/bfin/bfin.h b/gcc/config/bfin/bfin.h
> index 4e7753038a8..1d75c655df8 100644
> --- a/gcc/config/bfin/bfin.h
> +++ b/gcc/config/bfin/bfin.h
> @@ -810,7 +810,6 @@ typedef struct {
>     subsequent accesses occur to other fields in the same word of the
>     structure, but to different bytes.  */
>  #define SLOW_BYTE_ACCESS  0
> -#define SLOW_SHORT_ACCESS 0
>
>  /* Define this if most significant bit is lowest numbered
>     in instructions that operate on numbered bit-fields. */
> diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h
> index b32db8da109..a5ad9f387f7 100644
> --- a/gcc/config/i386/i386.h
> +++ b/gcc/config/i386/i386.h
> @@ -1933,9 +1933,6 @@ do {                                                      \
>
>  #define SLOW_BYTE_ACCESS 0
>
> -/* Nonzero if access to memory by shorts is slow and undesirable.  */
> -#define SLOW_SHORT_ACCESS 0
> -
>  /* Define this macro if it is as good or better to call a constant
>     function address than to call an address kept in a register.
>
> diff --git a/gcc/system.h b/gcc/system.h
> index c192b6c3ce7..de9c5c0d2ef 100644
> --- a/gcc/system.h
> +++ b/gcc/system.h
> @@ -1075,7 +1075,7 @@ extern void fancy_abort (const char *, int, const char *)
>         EH_FRAME_IN_DATA_SECTION TARGET_FLT_EVAL_METHOD_NON_DEFAULT        \
>         JCR_SECTION_NAME TARGET_USE_JCR_SECTION SDB_DEBUGGING_INFO         \
>         SDB_DEBUG NO_IMPLICIT_EXTERN_C NOTICE_UPDATE_CC                    \
> -       CC_STATUS_MDEP_INIT CC_STATUS_MDEP CC_STATUS
> +       CC_STATUS_MDEP_INIT CC_STATUS_MDEP CC_STATUS SLOW_SHORT_ACCESS
>
>  /* Hooks that are no longer used.  */
>   #pragma GCC poison LANG_HOOKS_FUNCTION_MARK LANG_HOOKS_FUNCTION_FREE  \
> --
> 2.17.1
>

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

* Re: [PATCH] Remove SLOW_SHORT_ACCESS from target headers
  2022-11-10  1:20 ` Andrew Pinski
@ 2022-11-10  8:47   ` Richard Biener
  2022-11-10 16:22     ` Andrew Pinski
  0 siblings, 1 reply; 4+ messages in thread
From: Richard Biener @ 2022-11-10  8:47 UTC (permalink / raw)
  To: Andrew Pinski; +Cc: apinski, gcc-patches

On Thu, Nov 10, 2022 at 2:21 AM Andrew Pinski via Gcc-patches
<gcc-patches@gcc.gnu.org> wrote:
>
> On Wed, Nov 9, 2022 at 5:16 PM apinski--- via Gcc-patches
> <gcc-patches@gcc.gnu.org> wrote:
> >
> > From: Andrew Pinski <apinski@marvell.com>
> >
> > SLOW_SHORT_ACCESS is defined in bfin and i386 target
> > headers but the target macro is not used elsewhere.
> > So let's remove it from those two headers and poison it.
>
> Just to add, this target macro was defined in GCC 2.8.0 in i386.h but
> not used in any other sources.
> apinski@xeond:~/src/upstream-gcc/gcc$ git grep SLOW_SHORT_ACCESS
> releases/gcc-2.8.0
> releases/gcc-2.8.0:gcc/config/i386/i386.h:#define SLOW_SHORT_ACCESS 0
>
> So it looks like it was never used for the last 24+ years and it is
> time to finally remove it.

OK.  I notice you didn't remove any documentation so it was also undocumented?

Thanks,
Richard.

> Thanks,
> Andrew Pinski
>
>
> >
> > OK? Built x86_64-linux-gnu and bfin-elf.
> >
> > gcc/ChangeLog:
> >
> >         * config/bfin/bfin.h (SLOW_SHORT_ACCESS): Delete.
> >         * config/i386/i386.h (SLOW_SHORT_ACCESS): Delete.
> >         * system.h: Poison SLOW_SHORT_ACCESS
> > ---
> >  gcc/config/bfin/bfin.h | 1 -
> >  gcc/config/i386/i386.h | 3 ---
> >  gcc/system.h           | 2 +-
> >  3 files changed, 1 insertion(+), 5 deletions(-)
> >
> > diff --git a/gcc/config/bfin/bfin.h b/gcc/config/bfin/bfin.h
> > index 4e7753038a8..1d75c655df8 100644
> > --- a/gcc/config/bfin/bfin.h
> > +++ b/gcc/config/bfin/bfin.h
> > @@ -810,7 +810,6 @@ typedef struct {
> >     subsequent accesses occur to other fields in the same word of the
> >     structure, but to different bytes.  */
> >  #define SLOW_BYTE_ACCESS  0
> > -#define SLOW_SHORT_ACCESS 0
> >
> >  /* Define this if most significant bit is lowest numbered
> >     in instructions that operate on numbered bit-fields. */
> > diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h
> > index b32db8da109..a5ad9f387f7 100644
> > --- a/gcc/config/i386/i386.h
> > +++ b/gcc/config/i386/i386.h
> > @@ -1933,9 +1933,6 @@ do {                                                      \
> >
> >  #define SLOW_BYTE_ACCESS 0
> >
> > -/* Nonzero if access to memory by shorts is slow and undesirable.  */
> > -#define SLOW_SHORT_ACCESS 0
> > -
> >  /* Define this macro if it is as good or better to call a constant
> >     function address than to call an address kept in a register.
> >
> > diff --git a/gcc/system.h b/gcc/system.h
> > index c192b6c3ce7..de9c5c0d2ef 100644
> > --- a/gcc/system.h
> > +++ b/gcc/system.h
> > @@ -1075,7 +1075,7 @@ extern void fancy_abort (const char *, int, const char *)
> >         EH_FRAME_IN_DATA_SECTION TARGET_FLT_EVAL_METHOD_NON_DEFAULT        \
> >         JCR_SECTION_NAME TARGET_USE_JCR_SECTION SDB_DEBUGGING_INFO         \
> >         SDB_DEBUG NO_IMPLICIT_EXTERN_C NOTICE_UPDATE_CC                    \
> > -       CC_STATUS_MDEP_INIT CC_STATUS_MDEP CC_STATUS
> > +       CC_STATUS_MDEP_INIT CC_STATUS_MDEP CC_STATUS SLOW_SHORT_ACCESS
> >
> >  /* Hooks that are no longer used.  */
> >   #pragma GCC poison LANG_HOOKS_FUNCTION_MARK LANG_HOOKS_FUNCTION_FREE  \
> > --
> > 2.17.1
> >

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

* Re: [PATCH] Remove SLOW_SHORT_ACCESS from target headers
  2022-11-10  8:47   ` Richard Biener
@ 2022-11-10 16:22     ` Andrew Pinski
  0 siblings, 0 replies; 4+ messages in thread
From: Andrew Pinski @ 2022-11-10 16:22 UTC (permalink / raw)
  To: Richard Biener; +Cc: apinski, gcc-patches

On Thu, Nov 10, 2022 at 12:47 AM Richard Biener
<richard.guenther@gmail.com> wrote:
>
> On Thu, Nov 10, 2022 at 2:21 AM Andrew Pinski via Gcc-patches
> <gcc-patches@gcc.gnu.org> wrote:
> >
> > On Wed, Nov 9, 2022 at 5:16 PM apinski--- via Gcc-patches
> > <gcc-patches@gcc.gnu.org> wrote:
> > >
> > > From: Andrew Pinski <apinski@marvell.com>
> > >
> > > SLOW_SHORT_ACCESS is defined in bfin and i386 target
> > > headers but the target macro is not used elsewhere.
> > > So let's remove it from those two headers and poison it.
> >
> > Just to add, this target macro was defined in GCC 2.8.0 in i386.h but
> > not used in any other sources.
> > apinski@xeond:~/src/upstream-gcc/gcc$ git grep SLOW_SHORT_ACCESS
> > releases/gcc-2.8.0
> > releases/gcc-2.8.0:gcc/config/i386/i386.h:#define SLOW_SHORT_ACCESS 0
> >
> > So it looks like it was never used for the last 24+ years and it is
> > time to finally remove it.
>
> OK.  I notice you didn't remove any documentation so it was also undocumented?

Yes it was never documented as far as I can tell. It was just ever
defined in those 2 headers. Also it looked like bfin copied it from
the
i386 header too. The define has been in the i386 header since the GCC
2.8.0 release and not used anywhere else even at that point; searching
git earlier becomes harder and there was no reference to it in
ChangeLogs either.

Thanks,
Andrew

>
> Thanks,
> Richard.
>
> > Thanks,
> > Andrew Pinski
> >
> >
> > >
> > > OK? Built x86_64-linux-gnu and bfin-elf.
> > >
> > > gcc/ChangeLog:
> > >
> > >         * config/bfin/bfin.h (SLOW_SHORT_ACCESS): Delete.
> > >         * config/i386/i386.h (SLOW_SHORT_ACCESS): Delete.
> > >         * system.h: Poison SLOW_SHORT_ACCESS
> > > ---
> > >  gcc/config/bfin/bfin.h | 1 -
> > >  gcc/config/i386/i386.h | 3 ---
> > >  gcc/system.h           | 2 +-
> > >  3 files changed, 1 insertion(+), 5 deletions(-)
> > >
> > > diff --git a/gcc/config/bfin/bfin.h b/gcc/config/bfin/bfin.h
> > > index 4e7753038a8..1d75c655df8 100644
> > > --- a/gcc/config/bfin/bfin.h
> > > +++ b/gcc/config/bfin/bfin.h
> > > @@ -810,7 +810,6 @@ typedef struct {
> > >     subsequent accesses occur to other fields in the same word of the
> > >     structure, but to different bytes.  */
> > >  #define SLOW_BYTE_ACCESS  0
> > > -#define SLOW_SHORT_ACCESS 0
> > >
> > >  /* Define this if most significant bit is lowest numbered
> > >     in instructions that operate on numbered bit-fields. */
> > > diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h
> > > index b32db8da109..a5ad9f387f7 100644
> > > --- a/gcc/config/i386/i386.h
> > > +++ b/gcc/config/i386/i386.h
> > > @@ -1933,9 +1933,6 @@ do {                                                      \
> > >
> > >  #define SLOW_BYTE_ACCESS 0
> > >
> > > -/* Nonzero if access to memory by shorts is slow and undesirable.  */
> > > -#define SLOW_SHORT_ACCESS 0
> > > -
> > >  /* Define this macro if it is as good or better to call a constant
> > >     function address than to call an address kept in a register.
> > >
> > > diff --git a/gcc/system.h b/gcc/system.h
> > > index c192b6c3ce7..de9c5c0d2ef 100644
> > > --- a/gcc/system.h
> > > +++ b/gcc/system.h
> > > @@ -1075,7 +1075,7 @@ extern void fancy_abort (const char *, int, const char *)
> > >         EH_FRAME_IN_DATA_SECTION TARGET_FLT_EVAL_METHOD_NON_DEFAULT        \
> > >         JCR_SECTION_NAME TARGET_USE_JCR_SECTION SDB_DEBUGGING_INFO         \
> > >         SDB_DEBUG NO_IMPLICIT_EXTERN_C NOTICE_UPDATE_CC                    \
> > > -       CC_STATUS_MDEP_INIT CC_STATUS_MDEP CC_STATUS
> > > +       CC_STATUS_MDEP_INIT CC_STATUS_MDEP CC_STATUS SLOW_SHORT_ACCESS
> > >
> > >  /* Hooks that are no longer used.  */
> > >   #pragma GCC poison LANG_HOOKS_FUNCTION_MARK LANG_HOOKS_FUNCTION_FREE  \
> > > --
> > > 2.17.1
> > >

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

end of thread, other threads:[~2022-11-10 16:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-10  1:15 [PATCH] Remove SLOW_SHORT_ACCESS from target headers apinski
2022-11-10  1:20 ` Andrew Pinski
2022-11-10  8:47   ` Richard Biener
2022-11-10 16:22     ` Andrew Pinski

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