public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH 00/12] misc conditional compilation work
@ 2015-11-09 16:45 tbsaunde+gcc
  2015-11-09 16:45 ` [PATCH 08/12] always define DWARF2_LINENO_DEBUGGING_INFO tbsaunde+gcc
                   ` (12 more replies)
  0 siblings, 13 replies; 44+ messages in thread
From: tbsaunde+gcc @ 2015-11-09 16:45 UTC (permalink / raw)
  To: gcc-patches

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

Hi,

basically $subject, making some code unconditionally compiled, and changing
other things from #ifdef to #if so they can be made unconditional
incrementally.

patches individually bootstrapped + regtested on x86_64-linux-gnu, and a
slightly earlier version of the series ran through config-list.mk.  I think
everything here is either preapproved, or obvious so I'll commit it later
today if nobody complains.

Trev



Trevor Saunders (12):
  reduce conditional compilation for HARD_FRAME_POINTER_IS_ARG_POINTER
  remove EXTENDED_SDB_BASIC_TYPES
  remove conditional compilation of sdb debug info
  always define XCOFF_DEBUGGING_INFO
  always define VMS_DEBUGGING_INFO
  always define DWARF2_DEBUGGING_INFO
  always define DBX_DEBUGGING_INFO
  always define DWARF2_LINENO_DEBUGGING_INFO
  always define TARGET_PECOFF
  always define EH_RETURN_HANDLER_RTX
  always define HAVE_AS_LEB128
  always define ENABLE_OFFLOADING

 gcc/acinclude.m4                   |   4 ++
 gcc/c/c-parser.c                   |  13 ++---
 gcc/cgraph.c                       |   5 +-
 gcc/collect2.c                     |   4 +-
 gcc/config/arc/arc.h               |   4 +-
 gcc/config/i386/i386.h             |   3 --
 gcc/config/microblaze/microblaze.h |   2 +-
 gcc/config/pdp11/pdp11.h           |   2 +-
 gcc/config/rs6000/rs6000.c         |   4 +-
 gcc/configure                      | 106 +++++++++++++++++++++++++++++++++++--
 gcc/configure.ac                   |   5 ++
 gcc/cp/parser.c                    |  13 ++---
 gcc/cp/vtable-class-hierarchy.c    |   8 ---
 gcc/dbxout.c                       |  39 +++++++-------
 gcc/dbxout.h                       |   2 +-
 gcc/defaults.h                     |  48 ++++++++++++++---
 gcc/df-scan.c                      |   2 -
 gcc/doc/tm.texi                    |  12 ++---
 gcc/doc/tm.texi.in                 |  12 ++---
 gcc/dwarf2asm.c                    |  12 ++---
 gcc/dwarf2out.c                    |  28 ++++------
 gcc/dwarf2out.h                    |   2 -
 gcc/emit-rtl.c                     |   7 +--
 gcc/except.c                       |  27 +++++-----
 gcc/final.c                        |  10 ++--
 gcc/function.c                     |   2 +-
 gcc/gcc.c                          |   8 ++-
 gcc/gsyms.h                        |  11 ----
 gcc/omp-low.c                      |  16 +++---
 gcc/opts.c                         |   9 ++--
 gcc/output.h                       |   2 -
 gcc/sdbout.c                       |  12 +----
 gcc/targhooks.c                    |   6 +--
 gcc/toplev.c                       |  34 ++++--------
 gcc/varasm.c                       |   8 +--
 gcc/varpool.c                      |  13 ++---
 gcc/vmsdbgout.c                    |   2 +-
 gcc/xcoffout.c                     |   2 +-
 38 files changed, 285 insertions(+), 214 deletions(-)

-- 
2.5.0.rc1.5.gc07173f

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

* [PATCH 08/12] always define DWARF2_LINENO_DEBUGGING_INFO
  2015-11-09 16:45 [PATCH 00/12] misc conditional compilation work tbsaunde+gcc
@ 2015-11-09 16:45 ` tbsaunde+gcc
  2015-11-09 16:45 ` [PATCH 10/12] always define EH_RETURN_HANDLER_RTX tbsaunde+gcc
                   ` (11 subsequent siblings)
  12 siblings, 0 replies; 44+ messages in thread
From: tbsaunde+gcc @ 2015-11-09 16:45 UTC (permalink / raw)
  To: gcc-patches

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

gcc/ChangeLog:

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

	* defaults.h (DWARF2_LINENO_DEBUGGING_INFO): new default
	definition.
	* dwarf2out.c (dwarf2out_init): Adjust.
	* opts.c (set_debug_level): Likewise.
	* toplev.c (process_options): Likewise.
---
 gcc/defaults.h  | 6 +++++-
 gcc/dwarf2out.c | 4 ++--
 gcc/opts.c      | 9 ++++-----
 gcc/toplev.c    | 4 +---
 4 files changed, 12 insertions(+), 11 deletions(-)

diff --git a/gcc/defaults.h b/gcc/defaults.h
index d1728aa..65ffe59 100644
--- a/gcc/defaults.h
+++ b/gcc/defaults.h
@@ -926,6 +926,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 #define DWARF2_DEBUGGING_INFO 0
 #endif
 
+#ifndef DWARF2_LINENO_DEBUGGING_INFO
+#define DWARF2_LINENO_DEBUGGING_INFO 0
+#endif
+
 #ifndef XCOFF_DEBUGGING_INFO
 #define XCOFF_DEBUGGING_INFO 0
 #endif
@@ -952,7 +956,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 #elif SDB_DEBUGGING_INFO
 #define PREFERRED_DEBUGGING_TYPE SDB_DEBUG
 
-#elif DWARF2_DEBUGGING_INFO || defined DWARF2_LINENO_DEBUGGING_INFO
+#elif DWARF2_DEBUGGING_INFO || DWARF2_LINENO_DEBUGGING_INFO
 #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
 
 #elif VMS_DEBUGGING_INFO
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index cb6acc6..2d94bc3 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -23257,7 +23257,7 @@ dwarf2out_init (const char *filename ATTRIBUTE_UNUSED)
   /* Allocate the file_table.  */
   file_table = hash_table<dwarf_file_hasher>::create_ggc (50);
 
-#ifndef DWARF2_LINENO_DEBUGGING_INFO
+#if !DWARF2_LINENO_DEBUGGING_INFO
   /* Allocate the decl_die_table.  */
   decl_die_table = hash_table<decl_die_hasher>::create_ggc (10);
 
@@ -23379,7 +23379,7 @@ dwarf2out_init (const char *filename ATTRIBUTE_UNUSED)
   text_section_line_info = new_line_info_table ();
   text_section_line_info->end_label = text_end_label;
 
-#ifdef DWARF2_LINENO_DEBUGGING_INFO
+#if DWARF2_LINENO_DEBUGGING_INFO
   cur_line_info_table = text_section_line_info;
 #endif
 
diff --git a/gcc/opts.c b/gcc/opts.c
index 0ed9ac6..1300a92 100644
--- a/gcc/opts.c
+++ b/gcc/opts.c
@@ -2287,11 +2287,10 @@ set_debug_level (enum debug_info_type type, int extended, const char *arg,
 
 	  if (extended == 2)
 	    {
-#if DWARF2_DEBUGGING_INFO || defined DWARF2_LINENO_DEBUGGING_INFO
-	      opts->x_write_symbols = DWARF2_DEBUG;
-#elif DBX_DEBUGGING_INFO
-	      opts->x_write_symbols = DBX_DEBUG;
-#endif
+	      if (DWARF2_DEBUGGING_INFO || DWARF2_LINENO_DEBUGGING_INFO)
+		opts->x_write_symbols = DWARF2_DEBUG;
+	      else if (DBX_DEBUGGING_INFO)
+		opts->x_write_symbols = DBX_DEBUG;
 	    }
 
 	  if (opts->x_write_symbols == NO_DEBUG)
diff --git a/gcc/toplev.c b/gcc/toplev.c
index d015f0f..f318a98 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -1380,10 +1380,8 @@ process_options (void)
 	   && (write_symbols == VMS_DEBUG
 	       || write_symbols == VMS_AND_DWARF2_DEBUG))
     debug_hooks = &vmsdbg_debug_hooks;
-#ifdef DWARF2_LINENO_DEBUGGING_INFO
-  else if (write_symbols == DWARF2_DEBUG)
+  else if (DWARF2_LINENO_DEBUGGING_INFO && write_symbols == DWARF2_DEBUG)
     debug_hooks = &dwarf2_lineno_debug_hooks;
-#endif
   else
     error ("target system does not support the %qs debug format",
 	   debug_type_names[write_symbols]);
-- 
2.5.0.rc1.5.gc07173f

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

* [PATCH 10/12] always define EH_RETURN_HANDLER_RTX
  2015-11-09 16:45 [PATCH 00/12] misc conditional compilation work tbsaunde+gcc
  2015-11-09 16:45 ` [PATCH 08/12] always define DWARF2_LINENO_DEBUGGING_INFO tbsaunde+gcc
@ 2015-11-09 16:45 ` tbsaunde+gcc
  2015-11-09 17:42   ` David Malcolm
  2015-11-09 18:27   ` Bernd Schmidt
  2015-11-09 16:46 ` [PATCH 02/12] remove EXTENDED_SDB_BASIC_TYPES tbsaunde+gcc
                   ` (10 subsequent siblings)
  12 siblings, 2 replies; 44+ messages in thread
From: tbsaunde+gcc @ 2015-11-09 16:45 UTC (permalink / raw)
  To: gcc-patches

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

gcc/ChangeLog:

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

	* defaults.h (EH_RETURN_HANDLER_RTX): New default definition.
	* df-scan.c (df_get_exit_block_use_set): Adjust.
	* except.c (expand_eh_return): Likewise.
---
 gcc/defaults.h | 4 ++++
 gcc/df-scan.c  | 2 --
 gcc/except.c   | 9 ++++-----
 3 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/gcc/defaults.h b/gcc/defaults.h
index c20de44..047a0db 100644
--- a/gcc/defaults.h
+++ b/gcc/defaults.h
@@ -1325,6 +1325,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 #define TARGET_PECOFF 0
 #endif
 
+#ifndef EH_RETURN_HANDLER_RTX
+#define EH_RETURN_HANDLER_RTX NULL
+#endif
+
 #ifdef GCC_INSN_FLAGS_H
 /* Dependent default target macro definitions
 
diff --git a/gcc/df-scan.c b/gcc/df-scan.c
index 2e5fe97..a735925 100644
--- a/gcc/df-scan.c
+++ b/gcc/df-scan.c
@@ -3714,7 +3714,6 @@ df_get_exit_block_use_set (bitmap exit_block_uses)
     }
 #endif
 
-#ifdef EH_RETURN_HANDLER_RTX
   if ((!targetm.have_epilogue () || ! epilogue_completed)
       && crtl->calls_eh_return)
     {
@@ -3722,7 +3721,6 @@ df_get_exit_block_use_set (bitmap exit_block_uses)
       if (tmp && REG_P (tmp))
 	df_mark_reg (tmp, exit_block_uses);
     }
-#endif
 
   /* Mark function return value.  */
   diddle_return_value (df_mark_reg, (void*) exit_block_uses);
diff --git a/gcc/except.c b/gcc/except.c
index 1801fe7..1a41a34 100644
--- a/gcc/except.c
+++ b/gcc/except.c
@@ -2255,11 +2255,10 @@ expand_eh_return (void)
     emit_insn (targetm.gen_eh_return (crtl->eh.ehr_handler));
   else
     {
-#ifdef EH_RETURN_HANDLER_RTX
-      emit_move_insn (EH_RETURN_HANDLER_RTX, crtl->eh.ehr_handler);
-#else
-      error ("__builtin_eh_return not supported on this target");
-#endif
+      if (rtx handler = EH_RETURN_HANDLER_RTX)
+	emit_move_insn (handler, crtl->eh.ehr_handler);
+      else
+	error ("__builtin_eh_return not supported on this target");
     }
 
   emit_label (around_label);
-- 
2.5.0.rc1.5.gc07173f

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

* [PATCH 07/12] always define DBX_DEBUGGING_INFO
  2015-11-09 16:45 [PATCH 00/12] misc conditional compilation work tbsaunde+gcc
                   ` (7 preceding siblings ...)
  2015-11-09 16:46 ` [PATCH 09/12] always define TARGET_PECOFF tbsaunde+gcc
@ 2015-11-09 16:46 ` tbsaunde+gcc
  2015-11-09 16:46 ` [PATCH 01/12] reduce conditional compilation for HARD_FRAME_POINTER_IS_ARG_POINTER tbsaunde+gcc
                   ` (3 subsequent siblings)
  12 siblings, 0 replies; 44+ messages in thread
From: tbsaunde+gcc @ 2015-11-09 16:46 UTC (permalink / raw)
  To: gcc-patches

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

gcc/ChangeLog:

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

	* config/arc/arc.h: Define DBX_DEBUGGING_INFO to 1.
	* config/pdp11/pdp11.h: Likewise.
	* defaults.h (DBX_DEBUGGING_INFO): New default definition.
	* config/rs6000/rs6000.c (macho_branch_islands): Adjust.
	* dbxout.c (struct dbx_file): Likewise.
	(debug_flush_symbol_queue): Likewise.
	(default_stabs_asm_out_destructor): Likewise.
	(default_stabs_asm_out_constructor): Likewise.
					* dbxout.h: Likewise.
		* doc/tm.texi: Regenerate.
	* doc/tm.texi.in: Adjust.
	* final.c: Likewise.
	* gcc.c: Likewise.
	* opts.c (set_debug_level): Likewise.
	* toplev.c (process_options): Likewise.
---
 gcc/config/arc/arc.h       |  2 +-
 gcc/config/pdp11/pdp11.h   |  2 +-
 gcc/config/rs6000/rs6000.c |  4 ++--
 gcc/dbxout.c               | 20 ++++++++++----------
 gcc/dbxout.h               |  2 +-
 gcc/defaults.h             |  8 ++++++--
 gcc/doc/tm.texi            |  4 ++--
 gcc/doc/tm.texi.in         |  4 ++--
 gcc/final.c                |  2 +-
 gcc/gcc.c                  |  4 ++--
 gcc/opts.c                 |  2 +-
 gcc/toplev.c               |  6 ++----
 12 files changed, 31 insertions(+), 29 deletions(-)

diff --git a/gcc/config/arc/arc.h b/gcc/config/arc/arc.h
index cb98bda..b40b04f 100644
--- a/gcc/config/arc/arc.h
+++ b/gcc/config/arc/arc.h
@@ -1441,7 +1441,7 @@ extern int arc_return_address_regs[4];
 #ifdef DBX_DEBUGGING_INFO
 #undef DBX_DEBUGGING_INFO
 #endif
-#define DBX_DEBUGGING_INFO
+#define DBX_DEBUGGING_INFO 1
 
 #ifdef DWARF2_DEBUGGING_INFO
 #undef DWARF2_DEBUGGING_INFO
diff --git a/gcc/config/pdp11/pdp11.h b/gcc/config/pdp11/pdp11.h
index 8339f1c..2c82e2c 100644
--- a/gcc/config/pdp11/pdp11.h
+++ b/gcc/config/pdp11/pdp11.h
@@ -38,7 +38,7 @@ along with GCC; see the file COPYING3.  If not see
 
 /* Generate DBX debugging information.  */
 
-#define DBX_DEBUGGING_INFO
+#define DBX_DEBUGGING_INFO 1
 
 #define TARGET_40_PLUS		(TARGET_40 || TARGET_45)
 #define TARGET_10		(! TARGET_40_PLUS)
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index 6ed82cb..4ccee23 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -30455,7 +30455,7 @@ macho_branch_islands (void)
 	}
       strcpy (tmp_buf, "\n");
       strcat (tmp_buf, label);
-#if defined (DBX_DEBUGGING_INFO) || (XCOFF_DEBUGGING_INFO)
+#if (DBX_DEBUGGING_INFO) || (XCOFF_DEBUGGING_INFO)
       if (write_symbols == DBX_DEBUG || write_symbols == XCOFF_DEBUG)
 	dbxout_stabd (N_SLINE, bi->line_number);
 #endif /* DBX_DEBUGGING_INFO || XCOFF_DEBUGGING_INFO */
@@ -30505,7 +30505,7 @@ macho_branch_islands (void)
 	  strcat (tmp_buf, ")\n\tmtctr r12\n\tbctr");
 	}
       output_asm_insn (tmp_buf, 0);
-#if defined (DBX_DEBUGGING_INFO) || (XCOFF_DEBUGGING_INFO)
+#if (DBX_DEBUGGING_INFO) || (XCOFF_DEBUGGING_INFO)
       if (write_symbols == DBX_DEBUG || write_symbols == XCOFF_DEBUG)
 	dbxout_stabd (N_SLINE, bi->line_number);
 #endif /* DBX_DEBUGGING_INFO || XCOFF_DEBUGGING_INFO */
diff --git a/gcc/dbxout.c b/gcc/dbxout.c
index d9bd59f..993ceda 100644
--- a/gcc/dbxout.c
+++ b/gcc/dbxout.c
@@ -217,7 +217,7 @@ struct dbx_file
    should always be 0 because we should not have needed any file numbers
    yet.  */
 
-#if (defined (DBX_DEBUGGING_INFO) || (XCOFF_DEBUGGING_INFO)) \
+#if ((DBX_DEBUGGING_INFO) || (XCOFF_DEBUGGING_INFO)) \
     && defined (DBX_USE_BINCL)
 static struct dbx_file *current_file;
 #endif
@@ -250,7 +250,7 @@ static GTY(()) int lastfile_is_base;
 /* Typical USG systems don't have stab.h, and they also have
    no use for DBX-format debugging info.  */
 
-#if defined (DBX_DEBUGGING_INFO) || (XCOFF_DEBUGGING_INFO)
+#if (DBX_DEBUGGING_INFO) || (XCOFF_DEBUGGING_INFO)
 
 #ifdef DBX_USE_BINCL
 /* If zero then there is no pending BINCL.  */
@@ -329,7 +329,7 @@ static void dbxout_handle_pch (unsigned);
 static void debug_free_queue (void);
 \f
 /* The debug hooks structure.  */
-#if defined (DBX_DEBUGGING_INFO)
+#if (DBX_DEBUGGING_INFO)
 
 static void dbxout_source_line (unsigned int, const char *, int, bool);
 static void dbxout_begin_prologue (unsigned int, const char *);
@@ -860,7 +860,7 @@ dbxout_finish_complex_stabs (tree sym, stab_code_type code,
   obstack_free (&stabstr_ob, str);
 }
 
-#if defined (DBX_DEBUGGING_INFO) || (XCOFF_DEBUGGING_INFO)
+#if (DBX_DEBUGGING_INFO) || (XCOFF_DEBUGGING_INFO)
 
 /* When -gused is used, emit debug info for only used symbols. But in
    addition to the standard intercepted debug_hooks there are some
@@ -885,7 +885,7 @@ static int symbol_queue_size = 0;
 
 #endif /* DBX_DEBUGGING_INFO || XCOFF_DEBUGGING_INFO */
 
-#if defined (DBX_DEBUGGING_INFO)
+#if (DBX_DEBUGGING_INFO)
 
 static void
 dbxout_function_end (tree decl ATTRIBUTE_UNUSED)
@@ -1207,7 +1207,7 @@ dbxout_handle_pch (unsigned at_end)
     }
 }
 
-#if defined (DBX_DEBUGGING_INFO)
+#if (DBX_DEBUGGING_INFO)
 
 static void dbxout_block (tree, int, tree);
 
@@ -1411,7 +1411,7 @@ debug_flush_symbol_queue (void)
       TREE_USED (symbol_queue[i]) = 1;
       TYPE_DECL_SUPPRESS_DEBUG (symbol_queue[i]) = 0;
 
-#ifdef DBX_DEBUGGING_INFO
+#if DBX_DEBUGGING_INFO
       dbxout_symbol (symbol_queue[i], 0);
 #endif
 
@@ -3636,7 +3636,7 @@ dbxout_args (tree args)
     }
 }
 \f
-#if defined (DBX_DEBUGGING_INFO)
+#if (DBX_DEBUGGING_INFO)
 
 /* Subroutine of dbxout_block.  Emit an N_LBRAC stab referencing LABEL.
    BEGIN_LABEL is the name of the beginning of the function, which may
@@ -3788,7 +3788,7 @@ void
 default_stabs_asm_out_destructor (rtx symbol ATTRIBUTE_UNUSED,
 				  int priority ATTRIBUTE_UNUSED)
 {
-#if defined DBX_DEBUGGING_INFO || XCOFF_DEBUGGING_INFO
+#if DBX_DEBUGGING_INFO || XCOFF_DEBUGGING_INFO
   /* Tell GNU LD that this is part of the static destructor set.
      This will work for any system that uses stabs, most usefully
      aout systems.  */
@@ -3805,7 +3805,7 @@ void
 default_stabs_asm_out_constructor (rtx symbol ATTRIBUTE_UNUSED,
 				   int priority ATTRIBUTE_UNUSED)
 {
-#if defined DBX_DEBUGGING_INFO || XCOFF_DEBUGGING_INFO
+#if DBX_DEBUGGING_INFO || XCOFF_DEBUGGING_INFO
   /* Tell GNU LD that this is part of the static destructor set.
      This will work for any system that uses stabs, most usefully
      aout systems.  */
diff --git a/gcc/dbxout.h b/gcc/dbxout.h
index 954e138..725abb8 100644
--- a/gcc/dbxout.h
+++ b/gcc/dbxout.h
@@ -29,7 +29,7 @@ extern void default_stabs_asm_out_destructor (rtx, int);
 extern void default_stabs_asm_out_constructor (rtx, int);
 
 /* dbxout helper functions */
-#if defined DBX_DEBUGGING_INFO || XCOFF_DEBUGGING_INFO
+#if DBX_DEBUGGING_INFO || XCOFF_DEBUGGING_INFO
 
 extern void dbxout_int (int);
 extern void dbxout_stabd (int, int);
diff --git a/gcc/defaults.h b/gcc/defaults.h
index dddf796..d1728aa 100644
--- a/gcc/defaults.h
+++ b/gcc/defaults.h
@@ -914,6 +914,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 #define DEFAULT_GDB_EXTENSIONS 1
 #endif
 
+#ifndef DBX_DEBUGGING_INFO
+#define DBX_DEBUGGING_INFO 0
+#endif
+
 #ifndef SDB_DEBUGGING_INFO
 #define SDB_DEBUGGING_INFO 0
 #endif
@@ -933,7 +937,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 /* If more than one debugging type is supported, you must define
    PREFERRED_DEBUGGING_TYPE to choose the default.  */
 
-#if 1 < (defined (DBX_DEBUGGING_INFO) + (SDB_DEBUGGING_INFO) \
+#if 1 < ((DBX_DEBUGGING_INFO) + (SDB_DEBUGGING_INFO) \
 	 + (DWARF2_DEBUGGING_INFO) + (XCOFF_DEBUGGING_INFO) \
 	 + (VMS_DEBUGGING_INFO))
 #ifndef PREFERRED_DEBUGGING_TYPE
@@ -942,7 +946,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 
 /* If only one debugging format is supported, define PREFERRED_DEBUGGING_TYPE
    here so other code needn't care.  */
-#elif defined DBX_DEBUGGING_INFO
+#elif DBX_DEBUGGING_INFO
 #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
 
 #elif SDB_DEBUGGING_INFO
diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi
index 88c89be..95e071b 100644
--- a/gcc/doc/tm.texi
+++ b/gcc/doc/tm.texi
@@ -9338,7 +9338,7 @@ When the user specifies @option{-ggdb}, GCC normally also uses the
 value of this macro to select the debugging output format, but with two
 exceptions.  If @code{DWARF2_DEBUGGING_INFO} is defined, GCC uses the
 value @code{DWARF2_DEBUG}.  Otherwise, if @code{DBX_DEBUGGING_INFO} is
-defined, GCC uses @code{DBX_DEBUG}.
+defined to 1, GCC uses @code{DBX_DEBUG}.
 
 The value of this macro only affects the default debugging output; the
 user can always get a specific type of output by using @option{-gstabs},
@@ -9352,7 +9352,7 @@ user can always get a specific type of output by using @option{-gstabs},
 These are specific options for DBX output.
 
 @defmac DBX_DEBUGGING_INFO
-Define this macro if GCC should produce debugging output for DBX
+Define this macro to 1 if GCC should produce debugging output for DBX
 in response to the @option{-g} option.
 @end defmac
 
diff --git a/gcc/doc/tm.texi.in b/gcc/doc/tm.texi.in
index 4b46a45..9a7f557 100644
--- a/gcc/doc/tm.texi.in
+++ b/gcc/doc/tm.texi.in
@@ -6763,7 +6763,7 @@ When the user specifies @option{-ggdb}, GCC normally also uses the
 value of this macro to select the debugging output format, but with two
 exceptions.  If @code{DWARF2_DEBUGGING_INFO} is defined, GCC uses the
 value @code{DWARF2_DEBUG}.  Otherwise, if @code{DBX_DEBUGGING_INFO} is
-defined, GCC uses @code{DBX_DEBUG}.
+defined to 1, GCC uses @code{DBX_DEBUG}.
 
 The value of this macro only affects the default debugging output; the
 user can always get a specific type of output by using @option{-gstabs},
@@ -6777,7 +6777,7 @@ user can always get a specific type of output by using @option{-gstabs},
 These are specific options for DBX output.
 
 @defmac DBX_DEBUGGING_INFO
-Define this macro if GCC should produce debugging output for DBX
+Define this macro to 1 if GCC should produce debugging output for DBX
 in response to the @option{-g} option.
 @end defmac
 
diff --git a/gcc/final.c b/gcc/final.c
index a4b66c2..9eeea3e 100644
--- a/gcc/final.c
+++ b/gcc/final.c
@@ -84,7 +84,7 @@ along with GCC; see the file COPYING3.  If not see
 
 #include "dwarf2out.h"
 
-#ifdef DBX_DEBUGGING_INFO
+#if DBX_DEBUGGING_INFO
 #include "dbxout.h"
 #endif
 
diff --git a/gcc/gcc.c b/gcc/gcc.c
index 2600b83..bdd64a6 100644
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -828,14 +828,14 @@ proper position among the other output files.  */
 /* Define ASM_DEBUG_SPEC to be a spec suitable for translating '-g'
    to the assembler.  */
 #ifndef ASM_DEBUG_SPEC
-# if defined(DBX_DEBUGGING_INFO) && (DWARF2_DEBUGGING_INFO) \
+# if (DBX_DEBUGGING_INFO) && (DWARF2_DEBUGGING_INFO) \
      && defined(HAVE_AS_GDWARF2_DEBUG_FLAG) && defined(HAVE_AS_GSTABS_DEBUG_FLAG)
 #  define ASM_DEBUG_SPEC						\
       (PREFERRED_DEBUGGING_TYPE == DBX_DEBUG				\
        ? "%{!g0:%{gdwarf*:--gdwarf2}%{!gdwarf*:%{g*:--gstabs}}}" ASM_MAP	\
        : "%{!g0:%{gstabs*:--gstabs}%{!gstabs*:%{g*:--gdwarf2}}}" ASM_MAP)
 # else
-#  if defined(DBX_DEBUGGING_INFO) && defined(HAVE_AS_GSTABS_DEBUG_FLAG)
+#  if (DBX_DEBUGGING_INFO) && defined(HAVE_AS_GSTABS_DEBUG_FLAG)
 #   define ASM_DEBUG_SPEC "%{g*:%{!g0:--gstabs}}" ASM_MAP
 #  endif
 #  if (DWARF2_DEBUGGING_INFO) && defined(HAVE_AS_GDWARF2_DEBUG_FLAG)
diff --git a/gcc/opts.c b/gcc/opts.c
index 1ae7d75..0ed9ac6 100644
--- a/gcc/opts.c
+++ b/gcc/opts.c
@@ -2289,7 +2289,7 @@ set_debug_level (enum debug_info_type type, int extended, const char *arg,
 	    {
 #if DWARF2_DEBUGGING_INFO || defined DWARF2_LINENO_DEBUGGING_INFO
 	      opts->x_write_symbols = DWARF2_DEBUG;
-#elif defined DBX_DEBUGGING_INFO
+#elif DBX_DEBUGGING_INFO
 	      opts->x_write_symbols = DBX_DEBUG;
 #endif
 	    }
diff --git a/gcc/toplev.c b/gcc/toplev.c
index b12571b..d015f0f 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -76,7 +76,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "tree-chkp.h"
 #include "omp-low.h"
 
-#if defined(DBX_DEBUGGING_INFO) || (XCOFF_DEBUGGING_INFO)
+#if (DBX_DEBUGGING_INFO) || (XCOFF_DEBUGGING_INFO)
 #include "dbxout.h"
 #endif
 
@@ -1368,10 +1368,8 @@ process_options (void)
 
   if (write_symbols == NO_DEBUG)
     ;
-#if defined(DBX_DEBUGGING_INFO)
-  else if (write_symbols == DBX_DEBUG)
+  else if (DBX_DEBUGGING_INFO && write_symbols == DBX_DEBUG)
     debug_hooks = &dbx_debug_hooks;
-#endif
   else if (XCOFF_DEBUGGING_INFO && write_symbols == XCOFF_DEBUG)
     debug_hooks = &xcoff_debug_hooks;
   else if (SDB_DEBUGGING_INFO && write_symbols == SDB_DEBUG)
-- 
2.5.0.rc1.5.gc07173f

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

* [PATCH 05/12] always define VMS_DEBUGGING_INFO
  2015-11-09 16:45 [PATCH 00/12] misc conditional compilation work tbsaunde+gcc
                   ` (9 preceding siblings ...)
  2015-11-09 16:46 ` [PATCH 01/12] reduce conditional compilation for HARD_FRAME_POINTER_IS_ARG_POINTER tbsaunde+gcc
@ 2015-11-09 16:46 ` tbsaunde+gcc
  2015-11-09 18:34   ` Bernd Schmidt
  2015-11-09 16:46 ` [PATCH 11/12] always define HAVE_AS_LEB128 tbsaunde+gcc
  2015-11-09 17:57 ` [PATCH 00/12] misc conditional compilation work Jeff Law
  12 siblings, 1 reply; 44+ messages in thread
From: tbsaunde+gcc @ 2015-11-09 16:46 UTC (permalink / raw)
  To: gcc-patches

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

gcc/ChangeLog:

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

	* defaults.h (VMS_DEBUGGING_INFO): New default definition.
	* doc/tm.texi: Regenerate.
	* doc/tm.texi.in: Adjust.
	* dwarf2out.c (output_file_names): Likewise.
	(add_name_and_src_coords_attributes): Likewise.
	* dwarf2out.h: Likewise.
	* toplev.c (process_options): Likewise.
	* vmsdbgout.c: Likewise.
---
 gcc/defaults.h     | 8 ++++++--
 gcc/doc/tm.texi    | 2 +-
 gcc/doc/tm.texi.in | 2 +-
 gcc/dwarf2out.c    | 8 ++++----
 gcc/dwarf2out.h    | 2 --
 gcc/toplev.c       | 6 +++---
 gcc/vmsdbgout.c    | 2 +-
 7 files changed, 16 insertions(+), 14 deletions(-)

diff --git a/gcc/defaults.h b/gcc/defaults.h
index b518863..0de7899 100644
--- a/gcc/defaults.h
+++ b/gcc/defaults.h
@@ -922,12 +922,16 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 #define XCOFF_DEBUGGING_INFO 0
 #endif
 
+#ifndef VMS_DEBUGGING_INFO
+#define VMS_DEBUGGING_INFO 0
+#endif
+
 /* If more than one debugging type is supported, you must define
    PREFERRED_DEBUGGING_TYPE to choose the default.  */
 
 #if 1 < (defined (DBX_DEBUGGING_INFO) + (SDB_DEBUGGING_INFO) \
 	 + defined (DWARF2_DEBUGGING_INFO) + (XCOFF_DEBUGGING_INFO) \
-         + defined (VMS_DEBUGGING_INFO))
+	 + (VMS_DEBUGGING_INFO))
 #ifndef PREFERRED_DEBUGGING_TYPE
 #error You must define PREFERRED_DEBUGGING_TYPE
 #endif /* no PREFERRED_DEBUGGING_TYPE */
@@ -943,7 +947,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 #elif defined DWARF2_DEBUGGING_INFO || defined DWARF2_LINENO_DEBUGGING_INFO
 #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
 
-#elif defined VMS_DEBUGGING_INFO
+#elif VMS_DEBUGGING_INFO
 #define PREFERRED_DEBUGGING_TYPE VMS_AND_DWARF2_DEBUG
 
 #elif XCOFF_DEBUGGING_INFO
diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi
index 0399248..b3b684a 100644
--- a/gcc/doc/tm.texi
+++ b/gcc/doc/tm.texi
@@ -9720,7 +9720,7 @@ number @var{line} of the current source file to the stdio stream
 Here are macros for VMS debug format.
 
 @defmac VMS_DEBUGGING_INFO
-Define this macro if GCC should produce debugging output for VMS
+Define this macro to 1 if GCC should produce debugging output for VMS
 in response to the @option{-g} option.  The default behavior for VMS
 is to generate minimal debug info for a traceback in the absence of
 @option{-g} unless explicitly overridden with @option{-g0}.  This
diff --git a/gcc/doc/tm.texi.in b/gcc/doc/tm.texi.in
index 84e8383..0f0a4f2 100644
--- a/gcc/doc/tm.texi.in
+++ b/gcc/doc/tm.texi.in
@@ -7113,7 +7113,7 @@ number @var{line} of the current source file to the stdio stream
 Here are macros for VMS debug format.
 
 @defmac VMS_DEBUGGING_INFO
-Define this macro if GCC should produce debugging output for VMS
+Define this macro to 1 if GCC should produce debugging output for VMS
 in response to the @option{-g} option.  The default behavior for VMS
 is to generate minimal debug info for a traceback in the absence of
 @option{-g} unless explicitly overridden with @option{-g0}.  This
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 072e485..88c931c 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -101,7 +101,7 @@ static void dwarf2out_decl (tree);
 #define HAVE_XCOFF_DWARF_EXTRAS 0
 #endif
 
-#ifdef VMS_DEBUGGING_INFO
+#if VMS_DEBUGGING_INFO
 int vms_file_stats_name (const char *, long long *, long *, char *, int *);
 
 /* Define this macro to be a nonzero value if the directory specifications
@@ -10229,7 +10229,7 @@ output_file_names (void)
       int file_idx = backmap[i];
       int dir_idx = dirs[files[file_idx].dir_idx].dir_idx;
 
-#ifdef VMS_DEBUGGING_INFO
+#if VMS_DEBUGGING_INFO
 #define MAX_VMS_VERSION_LEN 6 /* ";32768" */
 
       /* Setting these fields can lead to debugger miscomparisons,
@@ -17319,7 +17319,7 @@ add_name_and_src_coords_attributes (dw_die_ref die, tree decl)
       add_linkage_name (die, decl);
     }
 
-#ifdef VMS_DEBUGGING_INFO
+#if VMS_DEBUGGING_INFO
   /* Get the function's name, as described by its RTL.  This may be different
      from the DECL_NAME name used in the source file.  */
   if (TREE_CODE (decl) == FUNCTION_DECL && TREE_ASM_WRITTEN (decl))
@@ -17331,7 +17331,7 @@ add_name_and_src_coords_attributes (dw_die_ref die, tree decl)
 #endif /* VMS_DEBUGGING_INFO */
 }
 
-#ifdef VMS_DEBUGGING_INFO
+#if VMS_DEBUGGING_INFO
 /* Output the debug main pointer die for VMS */
 
 void
diff --git a/gcc/dwarf2out.h b/gcc/dwarf2out.h
index 4fe3527..d344508 100644
--- a/gcc/dwarf2out.h
+++ b/gcc/dwarf2out.h
@@ -257,9 +257,7 @@ extern void debug_dwarf_loc_descr (dw_loc_descr_ref);
 extern void debug (die_struct &ref);
 extern void debug (die_struct *ptr);
 extern void dwarf2out_set_demangle_name_func (const char *(*) (const char *));
-#ifdef VMS_DEBUGGING_INFO
 extern void dwarf2out_vms_debug_main_pointer (void);
-#endif
 
 enum array_descr_ordering
 {
diff --git a/gcc/toplev.c b/gcc/toplev.c
index 420ae3d..15b8e54 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -1380,10 +1380,10 @@ process_options (void)
   else if (write_symbols == DWARF2_DEBUG)
     debug_hooks = &dwarf2_debug_hooks;
 #endif
-#ifdef VMS_DEBUGGING_INFO
-  else if (write_symbols == VMS_DEBUG || write_symbols == VMS_AND_DWARF2_DEBUG)
+  else if (VMS_DEBUGGING_INFO
+	   && (write_symbols == VMS_DEBUG
+	       || write_symbols == VMS_AND_DWARF2_DEBUG))
     debug_hooks = &vmsdbg_debug_hooks;
-#endif
 #ifdef DWARF2_LINENO_DEBUGGING_INFO
   else if (write_symbols == DWARF2_DEBUG)
     debug_hooks = &dwarf2_lineno_debug_hooks;
diff --git a/gcc/vmsdbgout.c b/gcc/vmsdbgout.c
index d41d4b2..6dd6878 100644
--- a/gcc/vmsdbgout.c
+++ b/gcc/vmsdbgout.c
@@ -24,7 +24,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "coretypes.h"
 #include "tm.h"
 
-#ifdef VMS_DEBUGGING_INFO
+#if VMS_DEBUGGING_INFO
 #include "alias.h"
 #include "tree.h"
 #include "varasm.h"
-- 
2.5.0.rc1.5.gc07173f

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

* [PATCH 02/12] remove EXTENDED_SDB_BASIC_TYPES
  2015-11-09 16:45 [PATCH 00/12] misc conditional compilation work tbsaunde+gcc
  2015-11-09 16:45 ` [PATCH 08/12] always define DWARF2_LINENO_DEBUGGING_INFO tbsaunde+gcc
  2015-11-09 16:45 ` [PATCH 10/12] always define EH_RETURN_HANDLER_RTX tbsaunde+gcc
@ 2015-11-09 16:46 ` tbsaunde+gcc
  2015-11-09 18:49   ` Bernd Schmidt
  2015-11-09 16:46 ` [PATCH 03/12] remove conditional compilation of sdb debug info tbsaunde+gcc
                   ` (9 subsequent siblings)
  12 siblings, 1 reply; 44+ messages in thread
From: tbsaunde+gcc @ 2015-11-09 16:46 UTC (permalink / raw)
  To: gcc-patches

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

The last target using this was i960, which was removed many years ago,
so there's no reason to keep it.

gcc/ChangeLog:

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

	* gsyms.h (enum sdb_type): Remove code for
	EXTENDED_SDB_BASIC_TYPES.
	(enum sdb_masks): Likewise.
	* sdbout.c (plain_type_1): Likewise.
---
 gcc/gsyms.h  | 11 -----------
 gcc/sdbout.c |  6 +-----
 2 files changed, 1 insertion(+), 16 deletions(-)

diff --git a/gcc/gsyms.h b/gcc/gsyms.h
index 608ff1e..0c458bb 100644
--- a/gcc/gsyms.h
+++ b/gcc/gsyms.h
@@ -74,9 +74,6 @@ enum sdb_type
   T_USHORT = 13,
   T_UINT = 14,
   T_ULONG = 15
-#ifdef EXTENDED_SDB_BASIC_TYPES
-  , T_LNGDBL = 16
-#endif
 };
 
 enum sdb_type_class
@@ -89,19 +86,11 @@ enum sdb_type_class
 
 enum sdb_masks
 {
-#ifdef EXTENDED_SDB_BASIC_TYPES
-  N_BTMASK = 0x1f,
-  N_TMASK = 0x60,
-  N_TMASK1 = 0x300,
-  N_TMASK2 = 0x360,
-  N_BTSHFT = 5,
-#else
   N_BTMASK = 017,
   N_TMASK = 060,
   N_TMASK1 = 0300,
   N_TMASK2 = 0360,
   N_BTSHFT = 4,
-#endif
   N_TSHIFT = 2
 };
 
diff --git a/gcc/sdbout.c b/gcc/sdbout.c
index 7964059..e495a8a 100644
--- a/gcc/sdbout.c
+++ b/gcc/sdbout.c
@@ -516,13 +516,9 @@ plain_type_1 (tree type, int level)
 	  return T_FLOAT;
 	if (precision == DOUBLE_TYPE_SIZE)
 	  return T_DOUBLE;
-#ifdef EXTENDED_SDB_BASIC_TYPES
-	if (precision == LONG_DOUBLE_TYPE_SIZE)
-	  return T_LNGDBL;
-#else
 	if (precision == LONG_DOUBLE_TYPE_SIZE)
 	  return T_DOUBLE;	/* better than nothing */
-#endif
+
 	return 0;
       }
 
-- 
2.5.0.rc1.5.gc07173f

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

* [PATCH 11/12] always define HAVE_AS_LEB128
  2015-11-09 16:45 [PATCH 00/12] misc conditional compilation work tbsaunde+gcc
                   ` (10 preceding siblings ...)
  2015-11-09 16:46 ` [PATCH 05/12] always define VMS_DEBUGGING_INFO tbsaunde+gcc
@ 2015-11-09 16:46 ` tbsaunde+gcc
  2015-11-09 18:42   ` Bernd Schmidt
  2015-11-09 17:57 ` [PATCH 00/12] misc conditional compilation work Jeff Law
  12 siblings, 1 reply; 44+ messages in thread
From: tbsaunde+gcc @ 2015-11-09 16:46 UTC (permalink / raw)
  To: gcc-patches

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

gcc/ChangeLog:

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

	* acinclude.m4: Always define HAVE_AS_LEB128.
	* configure: Regenerate.
	* configure.ac: Adjust.
	* dwarf2asm.c (dw2_asm_output_data_uleb128): Likewise.
	(dw2_asm_output_data_sleb128): Likewise.
	(dw2_asm_output_delta_uleb128): Likewise.
	(dw2_asm_output_delta_sleb128): Likewise.
	* except.c (output_one_function_exception_table): Likewise.
---
 gcc/acinclude.m4 |  4 +++
 gcc/configure    | 98 +++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 gcc/configure.ac |  2 ++
 gcc/dwarf2asm.c  |  8 ++---
 gcc/except.c     | 18 +++++------
 5 files changed, 116 insertions(+), 14 deletions(-)

diff --git a/gcc/acinclude.m4 b/gcc/acinclude.m4
index b8a4c28..e7d75c8 100644
--- a/gcc/acinclude.m4
+++ b/gcc/acinclude.m4
@@ -550,6 +550,10 @@ AC_CACHE_CHECK([assembler for $1], [$2],
 ifelse([$7],,,[dnl
 if test $[$2] = yes; then
   $7
+fi])
+ifelse([$8],,,[dnl
+if test $[$2] != yes; then
+  $8
 fi])])
 
 dnl gcc_SUN_LD_VERSION
diff --git a/gcc/configure b/gcc/configure
index de6cf13..14d828c 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -22411,6 +22411,7 @@ $as_echo "#define HAVE_GAS_BALIGN_AND_P2ALIGN 1" >>confdefs.h
 
 fi
 
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .p2align with maximum skip" >&5
 $as_echo_n "checking assembler for .p2align with maximum skip... " >&6; }
 if test "${gcc_cv_as_max_skip_p2align+set}" = set; then :
@@ -22446,6 +22447,7 @@ $as_echo "#define HAVE_GAS_MAX_SKIP_P2ALIGN 1" >>confdefs.h
 
 fi
 
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .literal16" >&5
 $as_echo_n "checking assembler for .literal16... " >&6; }
 if test "${gcc_cv_as_literal16+set}" = set; then :
@@ -22481,6 +22483,7 @@ $as_echo "#define HAVE_GAS_LITERAL16 1" >>confdefs.h
 
 fi
 
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for working .subsection -1" >&5
 $as_echo_n "checking assembler for working .subsection -1... " >&6; }
 if test "${gcc_cv_as_subsection_m1+set}" = set; then :
@@ -22528,6 +22531,7 @@ $as_echo "#define HAVE_GAS_SUBSECTION_ORDERING 1" >>confdefs.h
 
 fi
 
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .weak" >&5
 $as_echo_n "checking assembler for .weak... " >&6; }
 if test "${gcc_cv_as_weak+set}" = set; then :
@@ -22563,6 +22567,7 @@ $as_echo "#define HAVE_GAS_WEAK 1" >>confdefs.h
 
 fi
 
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .weakref" >&5
 $as_echo_n "checking assembler for .weakref... " >&6; }
 if test "${gcc_cv_as_weakref+set}" = set; then :
@@ -22598,6 +22603,7 @@ $as_echo "#define HAVE_GAS_WEAKREF 1" >>confdefs.h
 
 fi
 
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .nsubspa comdat" >&5
 $as_echo_n "checking assembler for .nsubspa comdat... " >&6; }
 if test "${gcc_cv_as_nsubspa_comdat+set}" = set; then :
@@ -22634,6 +22640,7 @@ $as_echo "#define HAVE_GAS_NSUBSPA_COMDAT 1" >>confdefs.h
 
 fi
 
+
 # .hidden needs to be supported in both the assembler and the linker,
 # because GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN.
 # This is irritatingly difficult to feature test for; we have to check the
@@ -22673,6 +22680,7 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_hidden" >&5
 $as_echo "$gcc_cv_as_hidden" >&6; }
 
+
 case "${target}" in
   *-*-darwin*)
     # Darwin as has some visibility support, though with a different syntax.
@@ -23125,6 +23133,11 @@ if test $gcc_cv_as_leb128 = yes; then
 $as_echo "#define HAVE_AS_LEB128 1" >>confdefs.h
 
 fi
+if test $gcc_cv_as_leb128 != yes; then
+
+$as_echo "#define HAVE_AS_LEB128 0" >>confdefs.h
+
+fi
 
 # Check if we have assembler support for unwind directives.
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for cfi directives" >&5
@@ -23204,6 +23217,7 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_cfi_directive" >&5
 $as_echo "$gcc_cv_as_cfi_directive" >&6; }
 
+
 if test $gcc_cv_as_cfi_directive = yes && test x$gcc_cv_objdump != x; then
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for working cfi advance" >&5
 $as_echo_n "checking assembler for working cfi advance... " >&6; }
@@ -23241,6 +23255,7 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_cfi_advance_working" >&5
 $as_echo "$gcc_cv_as_cfi_advance_working" >&6; }
 
+
 else
   # no objdump, err on the side of caution
   gcc_cv_as_cfi_advance_working=no
@@ -23284,6 +23299,7 @@ fi
 $as_echo "$gcc_cv_as_cfi_personality_directive" >&6; }
 
 
+
 cat >>confdefs.h <<_ACEOF
 #define HAVE_GAS_CFI_PERSONALITY_DIRECTIVE `if test $gcc_cv_as_cfi_personality_directive = yes;
     then echo 1; else echo 0; fi`
@@ -23336,6 +23352,7 @@ $as_echo "$gcc_cv_as_cfi_sections_directive" >&6; }
 
 
 
+
 cat >>confdefs.h <<_ACEOF
 #define HAVE_GAS_CFI_SECTIONS_DIRECTIVE `if test $gcc_cv_as_cfi_sections_directive = yes;
     then echo 1; else echo 0; fi`
@@ -23439,6 +23456,7 @@ fi
 $as_echo "$gcc_cv_as_eh_frame" >&6; }
 
 
+
 if test $gcc_cv_as_eh_frame = buggy; then
 
 $as_echo "#define USE_AS_TRADITIONAL_FORMAT 1" >>confdefs.h
@@ -23476,6 +23494,7 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_shf_merge" >&5
 $as_echo "$gcc_cv_as_shf_merge" >&6; }
 
+
 if test $gcc_cv_as_shf_merge = no; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for section merging support" >&5
 $as_echo_n "checking assembler for section merging support... " >&6; }
@@ -23508,6 +23527,7 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_shf_merge" >&5
 $as_echo "$gcc_cv_as_shf_merge" >&6; }
 
+
 fi
 
 cat >>confdefs.h <<_ACEOF
@@ -23546,6 +23566,7 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_comdat_group" >&5
 $as_echo "$gcc_cv_as_comdat_group" >&6; }
 
+
 if test $gcc_cv_as_comdat_group = yes; then
   gcc_cv_as_comdat_group_percent=no
   gcc_cv_as_comdat_group_group=no
@@ -23581,6 +23602,7 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_comdat_group_percent" >&5
 $as_echo "$gcc_cv_as_comdat_group_percent" >&6; }
 
+
  if test $gcc_cv_as_comdat_group_percent = yes; then
    gcc_cv_as_comdat_group_group=no
  else
@@ -23631,6 +23653,7 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_comdat_group_group" >&5
 $as_echo "$gcc_cv_as_comdat_group_group" >&6; }
 
+
        ;;
    esac
    if test -z "${gcc_cv_as_comdat_group_group+set}"; then
@@ -23738,6 +23761,7 @@ $as_echo "#define HAVE_GAS_DISCRIMINATOR 1" >>confdefs.h
 
 fi
 
+
 # Thread-local storage - the check is heavily parameterized.
 conftest_s=
 tls_first_major=
@@ -24229,6 +24253,7 @@ $as_echo "$gcc_cv_as_tls" >&6; }
 if test $gcc_cv_as_tls = yes; then
   set_have_as_tls=yes
 fi
+
 fi
 if test $set_have_as_tls = yes ; then
 
@@ -24402,6 +24427,7 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_aarch64_mabi" >&5
 $as_echo "$gcc_cv_as_aarch64_mabi" >&6; }
 
+
     if test x$gcc_cv_as_aarch64_mabi = xyes; then
 
 $as_echo "#define HAVE_AS_MABI_OPTION 1" >>confdefs.h
@@ -24461,6 +24487,7 @@ if test $gcc_cv_as_aarch64_picreloc = yes; then
 $as_echo "#define HAVE_AS_SMALL_PIC_RELOCS 1" >>confdefs.h
 
 fi
+
     # Enable default workaround for AArch64 Cortex-A53 erratum 835769.
     # Check whether --enable-fix-cortex-a53-835769 was given.
 if test "${enable_fix_cortex_a53_835769+set}" = set; then :
@@ -24549,6 +24576,7 @@ if test $gcc_cv_as_alpha_explicit_relocs = yes; then
 $as_echo "#define HAVE_AS_EXPLICIT_RELOCS 1" >>confdefs.h
 
 fi
+
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for jsrdirect relocation support" >&5
 $as_echo_n "checking assembler for jsrdirect relocation support... " >&6; }
 if test "${gcc_cv_as_alpha_jsrdirect_relocs+set}" = set; then :
@@ -24586,6 +24614,7 @@ if test $gcc_cv_as_alpha_jsrdirect_relocs = yes; then
 $as_echo "#define HAVE_AS_JSRDIRECT_RELOCS 1" >>confdefs.h
 
 fi
+
     ;;
 
   avr-*-*)
@@ -24620,6 +24649,7 @@ $as_echo "#define HAVE_AS_AVR_MLINK_RELAX_OPTION 1" >>confdefs.h
 
 fi
 
+
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for -mrmw option" >&5
 $as_echo_n "checking assembler for -mrmw option... " >&6; }
 if test "${gcc_cv_as_avr_mrmw+set}" = set; then :
@@ -24650,6 +24680,7 @@ if test $gcc_cv_as_avr_mrmw = yes; then
 $as_echo "#define HAVE_AS_AVR_MRMW_OPTION 1" >>confdefs.h
 
 fi
+
     ;;
 
   cris-*-*)
@@ -24687,6 +24718,7 @@ if test $gcc_cv_as_cris_no_mul_bug = yes; then
 $as_echo "#define HAVE_AS_NO_MUL_BUG_ABORT_OPTION 1" >>confdefs.h
 
 fi
+
     ;;
 
   sparc*-*-*)
@@ -24721,6 +24753,7 @@ $as_echo "#define HAVE_AS_REGISTER_PSEUDO_OP 1" >>confdefs.h
 
 fi
 
+
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for -relax option" >&5
 $as_echo_n "checking assembler for -relax option... " >&6; }
 if test "${gcc_cv_as_sparc_relax+set}" = set; then :
@@ -24752,6 +24785,7 @@ $as_echo "#define HAVE_AS_RELAX_OPTION 1" >>confdefs.h
 
 fi
 
+
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for GOTDATA_OP relocs" >&5
 $as_echo_n "checking assembler for GOTDATA_OP relocs... " >&6; }
 if test "${gcc_cv_as_sparc_gotdata_op+set}" = set; then :
@@ -24801,6 +24835,7 @@ $as_echo "#define HAVE_AS_SPARC_GOTDATA_OP 1" >>confdefs.h
 
 fi
 
+
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for unaligned pcrel relocs" >&5
 $as_echo_n "checking assembler for unaligned pcrel relocs... " >&6; }
 if test "${gcc_cv_as_sparc_ua_pcrel+set}" = set; then :
@@ -24891,7 +24926,9 @@ $as_echo "#define HAVE_AS_SPARC_UA_PCREL_HIDDEN 1" >>confdefs.h
 
 fi
 
-fi # unaligned pcrel relocs
+
+fi
+ # unaligned pcrel relocs
 
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for offsetable %lo()" >&5
 $as_echo_n "checking assembler for offsetable %lo()... " >&6; }
@@ -24930,6 +24967,7 @@ $as_echo "#define HAVE_AS_OFFSETABLE_LO10 1" >>confdefs.h
 
 fi
 
+
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for FMAF, HPC, and VIS 3.0 instructions" >&5
 $as_echo_n "checking assembler for FMAF, HPC, and VIS 3.0 instructions... " >&6; }
 if test "${gcc_cv_as_sparc_fmaf+set}" = set; then :
@@ -24968,6 +25006,7 @@ $as_echo "#define HAVE_AS_FMAF_HPC_VIS3 1" >>confdefs.h
 
 fi
 
+
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for SPARC4 instructions" >&5
 $as_echo_n "checking assembler for SPARC4 instructions... " >&6; }
 if test "${gcc_cv_as_sparc_sparc4+set}" = set; then :
@@ -25010,6 +25049,7 @@ $as_echo "#define HAVE_AS_SPARC4 1" >>confdefs.h
 
 fi
 
+
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for LEON instructions" >&5
 $as_echo_n "checking assembler for LEON instructions... " >&6; }
 if test "${gcc_cv_as_sparc_leon+set}" = set; then :
@@ -25046,6 +25086,7 @@ if test $gcc_cv_as_sparc_leon = yes; then
 $as_echo "#define HAVE_AS_LEON 1" >>confdefs.h
 
 fi
+
     ;;
 
   i[34567]86-*-* | x86_64-*-*)
@@ -25111,6 +25152,7 @@ fi
 $as_echo "$gcc_cv_as_comm_has_align" >&6; }
 
 
+
 cat >>confdefs.h <<_ACEOF
 #define HAVE_GAS_ALIGNED_COMM `if test $gcc_cv_as_comm_has_align = yes; then echo 1; else echo 0; fi`
 _ACEOF
@@ -25157,6 +25199,7 @@ if test $gcc_cv_as_ix86_pe_secrel32 = yes; then
 $as_echo "#define HAVE_GAS_PE_SECREL32_RELOC 1" >>confdefs.h
 
 fi
+
 	# Test if the assembler supports the extended form of the .section
 	# directive that specifies section alignment.  LTO support uses this,
 	# but normally only after installation, so we warn but don't fail the
@@ -25191,6 +25234,7 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_section_has_align" >&5
 $as_echo "$gcc_cv_as_section_has_align" >&6; }
 
+
 	if test x$gcc_cv_as_section_has_align != xyes; then
 	  case ",$enable_languages," in
 	    *,lto,*)
@@ -25236,6 +25280,7 @@ fi
 $as_echo "$gcc_cv_as_section_has_e" >&6; }
 
 
+
 cat >>confdefs.h <<_ACEOF
 #define HAVE_GAS_SECTION_EXCLUDE `if test $gcc_cv_as_section_has_e = yes; then echo 1; else echo 0; fi`
 _ACEOF
@@ -25272,6 +25317,7 @@ $as_echo "#define HAVE_AS_IX86_FILDS 1" >>confdefs.h
 
 fi
 
+
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for fildq and fistpq mnemonics" >&5
 $as_echo_n "checking assembler for fildq and fistpq mnemonics... " >&6; }
 if test "${gcc_cv_as_ix86_fildq+set}" = set; then :
@@ -25303,6 +25349,7 @@ $as_echo "#define HAVE_AS_IX86_FILDQ 1" >>confdefs.h
 
 fi
 
+
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for cmov syntax" >&5
 $as_echo_n "checking assembler for cmov syntax... " >&6; }
 if test "${gcc_cv_as_ix86_cmov_sun_syntax+set}" = set; then :
@@ -25334,6 +25381,7 @@ $as_echo "#define HAVE_AS_IX86_CMOV_SUN_SYNTAX 1" >>confdefs.h
 
 fi
 
+
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for ffreep mnemonic" >&5
 $as_echo_n "checking assembler for ffreep mnemonic... " >&6; }
 if test "${gcc_cv_as_ix86_ffreep+set}" = set; then :
@@ -25365,6 +25413,7 @@ $as_echo "#define HAVE_AS_IX86_FFREEP 1" >>confdefs.h
 
 fi
 
+
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .quad directive" >&5
 $as_echo_n "checking assembler for .quad directive... " >&6; }
 if test "${gcc_cv_as_ix86_quad+set}" = set; then :
@@ -25396,6 +25445,7 @@ $as_echo "#define HAVE_AS_IX86_QUAD 1" >>confdefs.h
 
 fi
 
+
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for sahf mnemonic" >&5
 $as_echo_n "checking assembler for sahf mnemonic... " >&6; }
 if test "${gcc_cv_as_ix86_sahf+set}" = set; then :
@@ -25428,6 +25478,7 @@ $as_echo "#define HAVE_AS_IX86_SAHF 1" >>confdefs.h
 
 fi
 
+
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for interunit movq mnemonic" >&5
 $as_echo_n "checking assembler for interunit movq mnemonic... " >&6; }
 if test "${gcc_cv_as_ix86_interunit_movq+set}" = set; then :
@@ -25457,6 +25508,7 @@ fi
 $as_echo "$gcc_cv_as_ix86_interunit_movq" >&6; }
 
 
+
 cat >>confdefs.h <<_ACEOF
 #define HAVE_AS_IX86_INTERUNIT_MOVQ `if test $gcc_cv_as_ix86_interunit_movq = yes; then echo 1; else echo 0; fi`
 _ACEOF
@@ -25493,6 +25545,7 @@ $as_echo "#define HAVE_AS_IX86_HLE 1" >>confdefs.h
 
 fi
 
+
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for swap suffix" >&5
 $as_echo_n "checking assembler for swap suffix... " >&6; }
 if test "${gcc_cv_as_ix86_swap+set}" = set; then :
@@ -25524,6 +25577,7 @@ $as_echo "#define HAVE_AS_IX86_SWAP 1" >>confdefs.h
 
 fi
 
+
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for different section symbol subtraction" >&5
 $as_echo_n "checking assembler for different section symbol subtraction... " >&6; }
 if test "${gcc_cv_as_ix86_diff_sect_delta+set}" = set; then :
@@ -25561,6 +25615,7 @@ $as_echo "#define HAVE_AS_IX86_DIFF_SECT_DELTA 1" >>confdefs.h
 
 fi
 
+
     # These two are used unconditionally by i386.[ch]; it is to be defined
     # to 1 if the feature is present, 0 otherwise.
     as_ix86_gotoff_in_data_opt=
@@ -25602,6 +25657,7 @@ fi
 $as_echo "$gcc_cv_as_ix86_gotoff_in_data" >&6; }
 
 
+
 cat >>confdefs.h <<_ACEOF
 #define HAVE_AS_GOTOFF_IN_DATA `if test $gcc_cv_as_ix86_gotoff_in_data = yes; then echo 1; else echo 0; fi`
 _ACEOF
@@ -25644,6 +25700,7 @@ $as_echo "#define HAVE_AS_IX86_REP_LOCK_PREFIX 1" >>confdefs.h
 
 fi
 
+
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for ud2 mnemonic" >&5
 $as_echo_n "checking assembler for ud2 mnemonic... " >&6; }
 if test "${gcc_cv_as_ix86_ud2+set}" = set; then :
@@ -25675,6 +25732,7 @@ $as_echo "#define HAVE_AS_IX86_UD2 1" >>confdefs.h
 
 fi
 
+
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for R_386_TLS_GD_PLT reloc" >&5
 $as_echo_n "checking assembler for R_386_TLS_GD_PLT reloc... " >&6; }
 if test "${gcc_cv_as_ix86_tlsgdplt+set}" = set; then :
@@ -25710,6 +25768,7 @@ $as_echo "#define HAVE_AS_IX86_TLSGDPLT 1" >>confdefs.h
 
 fi
 
+
     conftest_s='
 	.section .tdata,"aw'$tls_section_flag'",@progbits
 tls_ld:
@@ -25746,6 +25805,7 @@ fi
 $as_echo "$gcc_cv_as_ix86_tlsldmplt" >&6; }
 
 
+
 cat >>confdefs.h <<_ACEOF
 #define HAVE_AS_IX86_TLSLDMPLT `if test $gcc_cv_as_ix86_tlsldmplt = yes; then echo 1; else echo 0; fi`
 _ACEOF
@@ -25807,6 +25867,7 @@ fi
 $as_echo "$gcc_cv_as_ix86_tlsldm" >&6; }
 
 
+
 cat >>confdefs.h <<_ACEOF
 #define HAVE_AS_IX86_TLSLDM `if test $gcc_cv_as_ix86_tlsldm = yes; then echo 1; else echo 0; fi`
 _ACEOF
@@ -25853,6 +25914,7 @@ $as_echo "#define HAVE_AS_LTOFFX_LDXMOV_RELOCS 1" >>confdefs.h
 
 fi
 
+
     ;;
 
   powerpc*-*-*)
@@ -25887,6 +25949,7 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_machine_directive" >&5
 $as_echo "$gcc_cv_as_machine_directive" >&6; }
 
+
 	if test x$gcc_cv_as_machine_directive != xyes; then
 	  echo "*** This target requires an assembler supporting \".machine\"" >&2
 	  echo you can get it from: ftp://gcc.gnu.org/pub/gcc/infrastructure/cctools-528.5.dmg >&2
@@ -25934,6 +25997,7 @@ $as_echo "#define HAVE_AS_MFCRF 1" >>confdefs.h
 
 fi
 
+
     case $target in
       *-*-aix*) conftest_s='	.machine "pwr5"
 	.csect .text[PR]
@@ -25978,6 +26042,7 @@ $as_echo "#define HAVE_AS_POPCNTB 1" >>confdefs.h
 
 fi
 
+
     case $target in
       *-*-aix*) conftest_s='	.machine "pwr5x"
 	.csect .text[PR]
@@ -26022,6 +26087,7 @@ $as_echo "#define HAVE_AS_FPRND 1" >>confdefs.h
 
 fi
 
+
     case $target in
       *-*-aix*) conftest_s='	.machine "pwr6"
 	.csect .text[PR]
@@ -26066,6 +26132,7 @@ $as_echo "#define HAVE_AS_MFPGPR 1" >>confdefs.h
 
 fi
 
+
     case $target in
       *-*-aix*) conftest_s='	.csect .text[PR]
 LCF..0:
@@ -26114,6 +26181,7 @@ $as_echo "#define HAVE_AS_REL16 1" >>confdefs.h
 
 fi
 
+
     case $target in
       *-*-aix*) conftest_s='	.machine "pwr6"
 	.csect .text[PR]
@@ -26158,6 +26226,7 @@ $as_echo "#define HAVE_AS_CMPB 1" >>confdefs.h
 
 fi
 
+
     case $target in
       *-*-aix*) conftest_s='	.machine "pwr6"
 	.csect .text[PR]
@@ -26202,6 +26271,7 @@ $as_echo "#define HAVE_AS_DFP 1" >>confdefs.h
 
 fi
 
+
     case $target in
       *-*-aix*) conftest_s='	.machine "pwr7"
 	.csect .text[PR]
@@ -26246,6 +26316,7 @@ $as_echo "#define HAVE_AS_VSX 1" >>confdefs.h
 
 fi
 
+
     case $target in
       *-*-aix*) conftest_s='	.machine "pwr7"
 	.csect .text[PR]
@@ -26290,6 +26361,7 @@ $as_echo "#define HAVE_AS_POPCNTD 1" >>confdefs.h
 
 fi
 
+
     case $target in
       *-*-aix*) conftest_s='	.machine "pwr8"
 	.csect .text[PR]';;
@@ -26332,6 +26404,7 @@ $as_echo "#define HAVE_AS_POWER8 1" >>confdefs.h
 
 fi
 
+
     case $target in
       *-*-aix*) conftest_s='	.csect .text[PR]
 	lwsync';;
@@ -26374,6 +26447,7 @@ $as_echo "#define HAVE_AS_LWSYNC 1" >>confdefs.h
 
 fi
 
+
     case $target in
       *-*-aix*) conftest_s='	.machine "476"
 	.csect .text[PR]
@@ -26418,6 +26492,7 @@ $as_echo "#define HAVE_AS_DCI 1" >>confdefs.h
 
 fi
 
+
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .gnu_attribute support" >&5
 $as_echo_n "checking assembler for .gnu_attribute support... " >&6; }
 if test "${gcc_cv_as_powerpc_gnu_attribute+set}" = set; then :
@@ -26453,6 +26528,7 @@ $as_echo "#define HAVE_AS_GNU_ATTRIBUTE 1" >>confdefs.h
 
 fi
 
+
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for tls marker support" >&5
 $as_echo_n "checking assembler for tls marker support... " >&6; }
 if test "${gcc_cv_as_powerpc_tls_markers+set}" = set; then :
@@ -26488,6 +26564,7 @@ $as_echo "#define HAVE_AS_TLS_MARKERS 1" >>confdefs.h
 
 fi
 
+
     case $target in
       *-*-aix*)
 	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .ref support" >&5
@@ -26529,6 +26606,7 @@ if test $gcc_cv_as_aix_ref = yes; then
 $as_echo "#define HAVE_AS_REF 1" >>confdefs.h
 
 fi
+
 	;;
     esac
 
@@ -26569,6 +26647,7 @@ if test $gcc_cv_as_aix_dwloc = yes; then
 $as_echo "#define HAVE_XCOFF_DWARF_EXTRAS 1" >>confdefs.h
 
 fi
+
 	;;
     esac
     ;;
@@ -26610,6 +26689,7 @@ if test $gcc_cv_as_mips_explicit_relocs = yes; then
        fi
 fi
 
+
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for -mno-shared support" >&5
 $as_echo_n "checking assembler for -mno-shared support... " >&6; }
 if test "${gcc_cv_as_mips_no_shared+set}" = set; then :
@@ -26645,6 +26725,7 @@ $as_echo "#define HAVE_AS_NO_SHARED 1" >>confdefs.h
 
 fi
 
+
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .gnu_attribute support" >&5
 $as_echo_n "checking assembler for .gnu_attribute support... " >&6; }
 if test "${gcc_cv_as_mips_gnu_attribute+set}" = set; then :
@@ -26680,6 +26761,7 @@ $as_echo "#define HAVE_AS_GNU_ATTRIBUTE 1" >>confdefs.h
 
 fi
 
+
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .module support" >&5
 $as_echo_n "checking assembler for .module support... " >&6; }
 if test "${gcc_cv_as_mips_dot_module+set}" = set; then :
@@ -26711,6 +26793,7 @@ if test $gcc_cv_as_mips_dot_module = yes; then
 $as_echo "#define HAVE_AS_DOT_MODULE 1" >>confdefs.h
 
 fi
+
     if test x$gcc_cv_as_mips_dot_module = xno \
        && test x$with_fp_32 != x; then
       as_fn_error "Requesting --with-fp-32= requires assembler support for .module." "$LINENO" 5
@@ -26747,6 +26830,7 @@ $as_echo "#define HAVE_GAS_MICROMIPS 1" >>confdefs.h
 
 fi
 
+
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .dtprelword support" >&5
 $as_echo_n "checking assembler for .dtprelword support... " >&6; }
 if test "${gcc_cv_as_mips_dtprelword+set}" = set; then :
@@ -26786,6 +26870,7 @@ $as_echo "#define HAVE_AS_DTPRELWORD 1" >>confdefs.h
 
 fi
 
+
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for DSPR1 mult with four accumulators support" >&5
 $as_echo_n "checking assembler for DSPR1 mult with four accumulators support... " >&6; }
 if test "${gcc_cv_as_mips_dspr1_mult+set}" = set; then :
@@ -26825,6 +26910,7 @@ $as_echo "#define HAVE_AS_DSPR1_MULT 1" >>confdefs.h
 
 fi
 
+
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler and linker for explicit JALR relocation" >&5
 $as_echo_n "checking assembler and linker for explicit JALR relocation... " >&6; }
     gcc_cv_as_ld_jalr_reloc=no
@@ -26944,6 +27030,7 @@ if test $gcc_cv_as_mips_nan = yes; then
 $as_echo "#define HAVE_AS_NAN 1" >>confdefs.h
 
 fi
+
     if test x$gcc_cv_as_mips_nan = xno \
        && test x$with_nan != x; then
       as_fn_error "Requesting --with-nan= requires assembler support for -mnan=" "$LINENO" 5
@@ -26984,6 +27071,7 @@ if test $gcc_cv_as_s390_gnu_attribute = yes; then
 $as_echo "#define HAVE_AS_GNU_ATTRIBUTE 1" >>confdefs.h
 
 fi
+
     ;;
 esac
 
@@ -27064,6 +27152,7 @@ fi
 $as_echo "$gcc_cv_as_dwarf2_debug_line" >&6; }
 
 
+
 # The .debug_line file table must be in the exact order that
 # we specified the files, since these indices are also used
 # by DW_AT_decl_file.  Approximate this test by testing if
@@ -27096,6 +27185,7 @@ fi
 $as_echo "$gcc_cv_as_dwarf2_file_buggy" >&6; }
 
 
+
  if test $gcc_cv_as_dwarf2_debug_line = yes \
  && test $gcc_cv_as_dwarf2_file_buggy = no; then
 
@@ -27139,6 +27229,7 @@ $as_echo "#define HAVE_AS_GDWARF2_DEBUG_FLAG 1" >>confdefs.h
 
 fi
 
+
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for --gstabs option" >&5
 $as_echo_n "checking assembler for --gstabs option... " >&6; }
 if test "${gcc_cv_as_gstabs_flag+set}" = set; then :
@@ -27175,6 +27266,7 @@ $as_echo "#define HAVE_AS_GSTABS_DEBUG_FLAG 1" >>confdefs.h
 
 fi
 
+
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for --debug-prefix-map option" >&5
 $as_echo_n "checking assembler for --debug-prefix-map option... " >&6; }
 if test "${gcc_cv_as_debug_prefix_map_flag+set}" = set; then :
@@ -27209,6 +27301,7 @@ if test $gcc_cv_as_debug_prefix_map_flag = yes; then
 $as_echo "#define HAVE_AS_DEBUG_PREFIX_MAP 1" >>confdefs.h
 
 fi
+
 fi
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for compressed debug sections" >&5
@@ -27252,6 +27345,7 @@ fi
 $as_echo "$gcc_cv_as_compress_debug" >&6; }
 
 
+
 cat >>confdefs.h <<_ACEOF
 #define HAVE_AS_COMPRESS_DEBUG $gcc_cv_as_compress_debug
 _ACEOF
@@ -27298,6 +27392,7 @@ $as_echo "#define HAVE_GAS_LCOMM_WITH_ALIGNMENT 1" >>confdefs.h
 
 fi
 
+
 if test x$with_sysroot = x && test x$host = x$target \
    && test "$prefix" != "/usr" && test "x$prefix" != "x$local_prefix" \
    && test "$prefix" != "NONE"; then
@@ -27394,6 +27489,7 @@ if test $glibc_version_major -gt 2 \
 fi
 
 fi
+
 fi
 
 if test x$enable_gnu_unique_object = xyes; then
diff --git a/gcc/configure.ac b/gcc/configure.ac
index 7670824..626eea2 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -2700,6 +2700,8 @@ L2:],
     fi
   fi]],
   [AC_DEFINE(HAVE_AS_LEB128, 1,
+    [Define if your assembler supports .sleb128 and .uleb128.])],
+  [AC_DEFINE(HAVE_AS_LEB128, 0,
     [Define if your assembler supports .sleb128 and .uleb128.])])
 
 # Check if we have assembler support for unwind directives.
diff --git a/gcc/dwarf2asm.c b/gcc/dwarf2asm.c
index d16827b..eecb8c6 100644
--- a/gcc/dwarf2asm.c
+++ b/gcc/dwarf2asm.c
@@ -588,7 +588,7 @@ dw2_asm_output_data_uleb128 (unsigned HOST_WIDE_INT value,
 
   va_start (ap, comment);
 
-#ifdef HAVE_AS_LEB128
+#if HAVE_AS_LEB128
   fputs ("\t.uleb128 ", asm_out_file);
   fprint_whex (asm_out_file, value);
 
@@ -673,7 +673,7 @@ dw2_asm_output_data_sleb128 (HOST_WIDE_INT value,
 
   va_start (ap, comment);
 
-#ifdef HAVE_AS_LEB128
+#if HAVE_AS_LEB128
   fprintf (asm_out_file, "\t.sleb128 " HOST_WIDE_INT_PRINT_DEC, value);
 
   if (flag_debug_asm && comment)
@@ -736,7 +736,7 @@ dw2_asm_output_delta_uleb128 (const char *lab1 ATTRIBUTE_UNUSED,
 
   va_start (ap, comment);
 
-#ifdef HAVE_AS_LEB128
+#if HAVE_AS_LEB128
   fputs ("\t.uleb128 ", asm_out_file);
   assemble_name (asm_out_file, lab1);
   putc ('-', asm_out_file);
@@ -766,7 +766,7 @@ dw2_asm_output_delta_sleb128 (const char *lab1 ATTRIBUTE_UNUSED,
 
   va_start (ap, comment);
 
-#ifdef HAVE_AS_LEB128
+#if HAVE_AS_LEB128
   fputs ("\t.sleb128 ", asm_out_file);
   assemble_name (asm_out_file, lab1);
   putc ('-', asm_out_file);
diff --git a/gcc/except.c b/gcc/except.c
index 1a41a34..e24a9f5 100644
--- a/gcc/except.c
+++ b/gcc/except.c
@@ -214,7 +214,7 @@ static int add_call_site (rtx, int, int);
 
 static void push_uleb128 (vec<uchar, va_gc> **, unsigned int);
 static void push_sleb128 (vec<uchar, va_gc> **, int);
-#ifndef HAVE_AS_LEB128
+#if !HAVE_AS_LEB128
 static int dw2_size_of_call_site_table (int);
 static int sjlj_size_of_call_site_table (void);
 #endif
@@ -2696,7 +2696,7 @@ push_sleb128 (vec<uchar, va_gc> **data_area, int value)
 }
 
 \f
-#ifndef HAVE_AS_LEB128
+#if !HAVE_AS_LEB128
 static int
 dw2_size_of_call_site_table (int section)
 {
@@ -2921,7 +2921,7 @@ static void
 output_one_function_exception_table (int section)
 {
   int tt_format, cs_format, lp_format, i;
-#ifdef HAVE_AS_LEB128
+#if HAVE_AS_LEB128
   char ttype_label[32];
   char cs_after_size_label[32];
   char cs_end_label[32];
@@ -2942,7 +2942,7 @@ output_one_function_exception_table (int section)
   else
     {
       tt_format = ASM_PREFERRED_EH_DATA_FORMAT (/*code=*/0, /*global=*/1);
-#ifdef HAVE_AS_LEB128
+#if HAVE_AS_LEB128
       ASM_GENERATE_INTERNAL_LABEL (ttype_label,
 				   section ? "LLSDATTC" : "LLSDATT",
 				   current_function_funcdef_no);
@@ -2972,7 +2972,7 @@ output_one_function_exception_table (int section)
   dw2_asm_output_data (1, tt_format, "@TType format (%s)",
 		       eh_data_format_name (tt_format));
 
-#ifndef HAVE_AS_LEB128
+#if !HAVE_AS_LEB128
   if (targetm_common.except_unwind_info (&global_options) == UI_SJLJ)
     call_site_len = sjlj_size_of_call_site_table ();
   else
@@ -2982,7 +2982,7 @@ output_one_function_exception_table (int section)
   /* A pc-relative 4-byte displacement to the @TType data.  */
   if (have_tt_data)
     {
-#ifdef HAVE_AS_LEB128
+#if HAVE_AS_LEB128
       char ttype_after_disp_label[32];
       ASM_GENERATE_INTERNAL_LABEL (ttype_after_disp_label,
 				   section ? "LLSDATTDC" : "LLSDATTD",
@@ -3022,7 +3022,7 @@ output_one_function_exception_table (int section)
     }
 
   /* Indicate the format of the call-site offsets.  */
-#ifdef HAVE_AS_LEB128
+#if HAVE_AS_LEB128
   cs_format = DW_EH_PE_uleb128;
 #else
   cs_format = DW_EH_PE_udata4;
@@ -3030,7 +3030,7 @@ output_one_function_exception_table (int section)
   dw2_asm_output_data (1, cs_format, "call-site format (%s)",
 		       eh_data_format_name (cs_format));
 
-#ifdef HAVE_AS_LEB128
+#if HAVE_AS_LEB128
   ASM_GENERATE_INTERNAL_LABEL (cs_after_size_label,
 			       section ? "LLSDACSBC" : "LLSDACSB",
 			       current_function_funcdef_no);
@@ -3070,7 +3070,7 @@ output_one_function_exception_table (int section)
       output_ttype (type, tt_format, tt_format_size);
     }
 
-#ifdef HAVE_AS_LEB128
+#if HAVE_AS_LEB128
   if (have_tt_data)
       ASM_OUTPUT_LABEL (asm_out_file, ttype_label);
 #endif
-- 
2.5.0.rc1.5.gc07173f

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

* [PATCH 06/12] always define DWARF2_DEBUGGING_INFO
  2015-11-09 16:45 [PATCH 00/12] misc conditional compilation work tbsaunde+gcc
                   ` (4 preceding siblings ...)
  2015-11-09 16:46 ` [PATCH 12/12] always define ENABLE_OFFLOADING tbsaunde+gcc
@ 2015-11-09 16:46 ` tbsaunde+gcc
  2015-11-09 16:46 ` [PATCH 04/12] always define XCOFF_DEBUGGING_INFO tbsaunde+gcc
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 44+ messages in thread
From: tbsaunde+gcc @ 2015-11-09 16:46 UTC (permalink / raw)
  To: gcc-patches

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

gcc/ChangeLog:

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

	* config/arc/arc.h: Define DWARF2_DEBUGGING_INFO to 1.
	* config/microblaze/microblaze.h: Likewise.
	* defaults.h (DWARF2_DEBUGGING_INFO): New default definition.
	* doc/tm.texi: Regenerate.
	* doc/tm.texi.in: Adjust.
	* dwarf2out.c (dwarf2out_begin_prologue): Likewise.
	(output_loc_operands): Likewise.
	* gcc.c: Likewise.
	* opts.c (set_debug_level): Likewise.
	* targhooks.c (default_debug_unwind_info): Likewise.
	* toplev.c (compile_file): Likewise.
	(process_options): Likewise.
---
 gcc/config/arc/arc.h               | 2 +-
 gcc/config/microblaze/microblaze.h | 2 +-
 gcc/defaults.h                     | 8 ++++++--
 gcc/doc/tm.texi                    | 2 +-
 gcc/doc/tm.texi.in                 | 2 +-
 gcc/dwarf2out.c                    | 6 +++---
 gcc/gcc.c                          | 4 ++--
 gcc/opts.c                         | 2 +-
 gcc/targhooks.c                    | 6 +++---
 gcc/toplev.c                       | 6 ++----
 10 files changed, 21 insertions(+), 19 deletions(-)

diff --git a/gcc/config/arc/arc.h b/gcc/config/arc/arc.h
index e8baf5b..cb98bda 100644
--- a/gcc/config/arc/arc.h
+++ b/gcc/config/arc/arc.h
@@ -1446,7 +1446,7 @@ extern int arc_return_address_regs[4];
 #ifdef DWARF2_DEBUGGING_INFO
 #undef DWARF2_DEBUGGING_INFO
 #endif
-#define DWARF2_DEBUGGING_INFO
+#define DWARF2_DEBUGGING_INFO 1
 
 /* Prefer STABS (for now).  */
 #undef PREFERRED_DEBUGGING_TYPE
diff --git a/gcc/config/microblaze/microblaze.h b/gcc/config/microblaze/microblaze.h
index 482c4a2..fbe4761 100644
--- a/gcc/config/microblaze/microblaze.h
+++ b/gcc/config/microblaze/microblaze.h
@@ -185,7 +185,7 @@ extern enum pipeline_type microblaze_pipe;
   gen_rtx_REG (VOIDmode, GP_REG_FIRST + MB_ABI_SUB_RETURN_ADDR_REGNUM)
 
 /* Use DWARF 2 debugging information by default.  */
-#define DWARF2_DEBUGGING_INFO
+#define DWARF2_DEBUGGING_INFO 1
 #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
 
 /* Target machine storage layout */
diff --git a/gcc/defaults.h b/gcc/defaults.h
index 0de7899..dddf796 100644
--- a/gcc/defaults.h
+++ b/gcc/defaults.h
@@ -918,6 +918,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 #define SDB_DEBUGGING_INFO 0
 #endif
 
+#ifndef DWARF2_DEBUGGING_INFO
+#define DWARF2_DEBUGGING_INFO 0
+#endif
+
 #ifndef XCOFF_DEBUGGING_INFO
 #define XCOFF_DEBUGGING_INFO 0
 #endif
@@ -930,7 +934,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
    PREFERRED_DEBUGGING_TYPE to choose the default.  */
 
 #if 1 < (defined (DBX_DEBUGGING_INFO) + (SDB_DEBUGGING_INFO) \
-	 + defined (DWARF2_DEBUGGING_INFO) + (XCOFF_DEBUGGING_INFO) \
+	 + (DWARF2_DEBUGGING_INFO) + (XCOFF_DEBUGGING_INFO) \
 	 + (VMS_DEBUGGING_INFO))
 #ifndef PREFERRED_DEBUGGING_TYPE
 #error You must define PREFERRED_DEBUGGING_TYPE
@@ -944,7 +948,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 #elif SDB_DEBUGGING_INFO
 #define PREFERRED_DEBUGGING_TYPE SDB_DEBUG
 
-#elif defined DWARF2_DEBUGGING_INFO || defined DWARF2_LINENO_DEBUGGING_INFO
+#elif DWARF2_DEBUGGING_INFO || defined DWARF2_LINENO_DEBUGGING_INFO
 #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
 
 #elif VMS_DEBUGGING_INFO
diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi
index b3b684a..88c89be 100644
--- a/gcc/doc/tm.texi
+++ b/gcc/doc/tm.texi
@@ -9572,7 +9572,7 @@ for SDB in response to the @option{-g} option.
 @end defmac
 
 @defmac DWARF2_DEBUGGING_INFO
-Define this macro if GCC should produce dwarf version 2 format
+Define this macro to 1 if GCC should produce dwarf version 2 format
 debugging output in response to the @option{-g} option.
 
 @deftypefn {Target Hook} int TARGET_DWARF_CALLING_CONVENTION (const_tree @var{function})
diff --git a/gcc/doc/tm.texi.in b/gcc/doc/tm.texi.in
index 0f0a4f2..4b46a45 100644
--- a/gcc/doc/tm.texi.in
+++ b/gcc/doc/tm.texi.in
@@ -6997,7 +6997,7 @@ for SDB in response to the @option{-g} option.
 @end defmac
 
 @defmac DWARF2_DEBUGGING_INFO
-Define this macro if GCC should produce dwarf version 2 format
+Define this macro to 1 if GCC should produce dwarf version 2 format
 debugging output in response to the @option{-g} option.
 
 @hook TARGET_DWARF_CALLING_CONVENTION
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 88c931c..cb6acc6 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -1075,7 +1075,7 @@ dwarf2out_begin_prologue (unsigned int line ATTRIBUTE_UNUSED,
 
   /* We only want to output line number information for the genuine dwarf2
      prologue case, not the eh frame case.  */
-#ifdef DWARF2_DEBUGGING_INFO
+#if DWARF2_DEBUGGING_INFO
   if (file)
     dwarf2out_source_line (line, file, 0, true);
 #endif
@@ -1755,7 +1755,7 @@ output_loc_operands (dw_loc_descr_ref loc, int for_eh_or_skip)
 
   switch (loc->dw_loc_opc)
     {
-#ifdef DWARF2_DEBUGGING_INFO
+#if DWARF2_DEBUGGING_INFO
     case DW_OP_const2u:
     case DW_OP_const2s:
       dw2_asm_output_data (2, val1->v.val_int, NULL);
@@ -1983,7 +1983,7 @@ output_loc_operands (dw_loc_descr_ref loc, int for_eh_or_skip)
 	}
       else
 	{
-#ifdef DWARF2_DEBUGGING_INFO
+#if DWARF2_DEBUGGING_INFO
 	  dw2_asm_output_addr_rtx (DWARF2_ADDR_SIZE, val1->v.val_addr, NULL);
 #else
 	  gcc_unreachable ();
diff --git a/gcc/gcc.c b/gcc/gcc.c
index bbc9b23..2600b83 100644
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -828,7 +828,7 @@ proper position among the other output files.  */
 /* Define ASM_DEBUG_SPEC to be a spec suitable for translating '-g'
    to the assembler.  */
 #ifndef ASM_DEBUG_SPEC
-# if defined(DBX_DEBUGGING_INFO) && defined(DWARF2_DEBUGGING_INFO) \
+# if defined(DBX_DEBUGGING_INFO) && (DWARF2_DEBUGGING_INFO) \
      && defined(HAVE_AS_GDWARF2_DEBUG_FLAG) && defined(HAVE_AS_GSTABS_DEBUG_FLAG)
 #  define ASM_DEBUG_SPEC						\
       (PREFERRED_DEBUGGING_TYPE == DBX_DEBUG				\
@@ -838,7 +838,7 @@ proper position among the other output files.  */
 #  if defined(DBX_DEBUGGING_INFO) && defined(HAVE_AS_GSTABS_DEBUG_FLAG)
 #   define ASM_DEBUG_SPEC "%{g*:%{!g0:--gstabs}}" ASM_MAP
 #  endif
-#  if defined(DWARF2_DEBUGGING_INFO) && defined(HAVE_AS_GDWARF2_DEBUG_FLAG)
+#  if (DWARF2_DEBUGGING_INFO) && defined(HAVE_AS_GDWARF2_DEBUG_FLAG)
 #   define ASM_DEBUG_SPEC "%{g*:%{!g0:--gdwarf2}}" ASM_MAP
 #  endif
 # endif
diff --git a/gcc/opts.c b/gcc/opts.c
index 9a3fbb3..1ae7d75 100644
--- a/gcc/opts.c
+++ b/gcc/opts.c
@@ -2287,7 +2287,7 @@ set_debug_level (enum debug_info_type type, int extended, const char *arg,
 
 	  if (extended == 2)
 	    {
-#if defined DWARF2_DEBUGGING_INFO || defined DWARF2_LINENO_DEBUGGING_INFO
+#if DWARF2_DEBUGGING_INFO || defined DWARF2_LINENO_DEBUGGING_INFO
 	      opts->x_write_symbols = DWARF2_DEBUG;
 #elif defined DBX_DEBUGGING_INFO
 	      opts->x_write_symbols = DBX_DEBUG;
diff --git a/gcc/targhooks.c b/gcc/targhooks.c
index c34b4e9..a75cbc3 100644
--- a/gcc/targhooks.c
+++ b/gcc/targhooks.c
@@ -1568,10 +1568,10 @@ default_debug_unwind_info (void)
 #endif
 
   /* Otherwise, only turn it on if dwarf2 debugging is enabled.  */
-#ifdef DWARF2_DEBUGGING_INFO
-  if (write_symbols == DWARF2_DEBUG || write_symbols == VMS_AND_DWARF2_DEBUG)
+  if (DWARF2_DEBUGGING_INFO
+      && (write_symbols == DWARF2_DEBUG
+	  || write_symbols == VMS_AND_DWARF2_DEBUG))
     return UI_DWARF2;
-#endif
 
   return UI_NONE;
 }
diff --git a/gcc/toplev.c b/gcc/toplev.c
index 15b8e54..b12571b 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -532,7 +532,7 @@ compile_file (void)
       /* Do dbx symbols.  */
       timevar_push (TV_SYMOUT);
 
-    #if defined DWARF2_DEBUGGING_INFO || defined DWARF2_UNWIND_INFO
+    #if DWARF2_DEBUGGING_INFO || defined DWARF2_UNWIND_INFO
       if (dwarf2out_do_frame ())
 	dwarf2out_frame_finish ();
     #endif
@@ -1376,10 +1376,8 @@ process_options (void)
     debug_hooks = &xcoff_debug_hooks;
   else if (SDB_DEBUGGING_INFO && write_symbols == SDB_DEBUG)
     debug_hooks = &sdb_debug_hooks;
-#ifdef DWARF2_DEBUGGING_INFO
-  else if (write_symbols == DWARF2_DEBUG)
+  else if (DWARF2_DEBUGGING_INFO && write_symbols == DWARF2_DEBUG)
     debug_hooks = &dwarf2_debug_hooks;
-#endif
   else if (VMS_DEBUGGING_INFO
 	   && (write_symbols == VMS_DEBUG
 	       || write_symbols == VMS_AND_DWARF2_DEBUG))
-- 
2.5.0.rc1.5.gc07173f

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

* [PATCH 09/12] always define TARGET_PECOFF
  2015-11-09 16:45 [PATCH 00/12] misc conditional compilation work tbsaunde+gcc
                   ` (6 preceding siblings ...)
  2015-11-09 16:46 ` [PATCH 04/12] always define XCOFF_DEBUGGING_INFO tbsaunde+gcc
@ 2015-11-09 16:46 ` tbsaunde+gcc
  2015-11-09 16:46 ` [PATCH 07/12] always define DBX_DEBUGGING_INFO tbsaunde+gcc
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 44+ messages in thread
From: tbsaunde+gcc @ 2015-11-09 16:46 UTC (permalink / raw)
  To: gcc-patches

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

gcc/ChangeLog:

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

	* config/i386/i386.h (TARGET_PECOFF): Remove define.
	* defaults.h (TARGET_PECOFF): New default definition.
	* varasm.c (handle_vtv_comdat_section): Adjust.

gcc/cp/ChangeLog:

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

	* vtable-class-hierarchy.c (vtv_generate_init_routine): Adjust.
---
 gcc/config/i386/i386.h          | 3 ---
 gcc/cp/vtable-class-hierarchy.c | 8 --------
 gcc/defaults.h                  | 4 ++++
 gcc/varasm.c                    | 6 +++---
 4 files changed, 7 insertions(+), 14 deletions(-)

diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h
index 3d5b2b2..829c3f4 100644
--- a/gcc/config/i386/i386.h
+++ b/gcc/config/i386/i386.h
@@ -595,9 +595,6 @@ extern tree x86_mfence;
 /* This is re-defined by cygming.h.  */
 #define TARGET_SEH 0
 
-/* This is re-defined by cygming.h.  */
-#define TARGET_PECOFF 0
-
 /* The default abi used by target.  */
 #define DEFAULT_ABI SYSV_ABI
 
diff --git a/gcc/cp/vtable-class-hierarchy.c b/gcc/cp/vtable-class-hierarchy.c
index d5c31e8..ab308fd 100644
--- a/gcc/cp/vtable-class-hierarchy.c
+++ b/gcc/cp/vtable-class-hierarchy.c
@@ -1183,11 +1183,7 @@ vtv_generate_init_routine (void)
       TREE_STATIC (vtv_fndecl) = 1;
       TREE_USED (vtv_fndecl) = 1;
       DECL_PRESERVE_P (vtv_fndecl) = 1;
-#if defined (TARGET_PECOFF)
       if (flag_vtable_verify == VTV_PREINIT_PRIORITY && !TARGET_PECOFF)
-#else
-      if (flag_vtable_verify == VTV_PREINIT_PRIORITY)
-#endif
         DECL_STATIC_CONSTRUCTOR (vtv_fndecl) = 0;
 
       gimplify_function_tree (vtv_fndecl);
@@ -1195,11 +1191,7 @@ vtv_generate_init_routine (void)
 
       symtab->process_new_functions ();
 
-#if defined (TARGET_PECOFF)
       if (flag_vtable_verify == VTV_PREINIT_PRIORITY && !TARGET_PECOFF)
-#else
-      if (flag_vtable_verify == VTV_PREINIT_PRIORITY)
-#endif
         assemble_vtv_preinit_initializer (vtv_fndecl);
 
     }
diff --git a/gcc/defaults.h b/gcc/defaults.h
index 65ffe59..c20de44 100644
--- a/gcc/defaults.h
+++ b/gcc/defaults.h
@@ -1321,6 +1321,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 #define REVERSE_CONDITION(code, mode) reverse_condition (code)
 #endif
 
+#ifndef TARGET_PECOFF
+#define TARGET_PECOFF 0
+#endif
+
 #ifdef GCC_INSN_FLAGS_H
 /* Dependent default target macro definitions
 
diff --git a/gcc/varasm.c b/gcc/varasm.c
index 75cef25..aa26e02 100644
--- a/gcc/varasm.c
+++ b/gcc/varasm.c
@@ -7793,7 +7793,7 @@ handle_vtv_comdat_section (section *sect, const_tree decl ATTRIBUTE_UNUSED)
 				 | SECTION_LINKONCE,
 				 DECL_NAME (decl));
   in_section = sect;
-#elif defined (TARGET_PECOFF)
+#else
   /* Neither OBJECT_FORMAT_PE, nor OBJECT_FORMAT_COFF is set here.
      Therefore the following check is used.
      In case a the target is PE or COFF a comdat group section
@@ -7820,8 +7820,8 @@ handle_vtv_comdat_section (section *sect, const_tree decl ATTRIBUTE_UNUSED)
 				     DECL_NAME (decl));
       in_section = sect;
     }
-#else
-  switch_to_section (sect);
+  else
+    switch_to_section (sect);
 #endif
 }
 
-- 
2.5.0.rc1.5.gc07173f

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

* [PATCH 12/12] always define ENABLE_OFFLOADING
  2015-11-09 16:45 [PATCH 00/12] misc conditional compilation work tbsaunde+gcc
                   ` (3 preceding siblings ...)
  2015-11-09 16:46 ` [PATCH 03/12] remove conditional compilation of sdb debug info tbsaunde+gcc
@ 2015-11-09 16:46 ` tbsaunde+gcc
  2015-11-09 18:41   ` Bernd Schmidt
  2015-11-09 16:46 ` [PATCH 06/12] always define DWARF2_DEBUGGING_INFO tbsaunde+gcc
                   ` (7 subsequent siblings)
  12 siblings, 1 reply; 44+ messages in thread
From: tbsaunde+gcc @ 2015-11-09 16:46 UTC (permalink / raw)
  To: gcc-patches

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

gcc/cp/ChangeLog:

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

	* parser.c (cp_parser_omp_declare_target): Adjust.

gcc/ChangeLog:

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

	* configure: Regenerate.
	* configure.ac: Always define ENABLE_OFFLOADING.
	* cgraph.c (cgraph_node::create): Adjust.
	* gcc.c (process_command): Likewise.
	* omp-low.c (create_omp_child_function): Likewise.
	(expand_omp_target): Likewise.
	* varpool.c (varpool_node::get_create): Likewise.

gcc/c/ChangeLog:

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

	* c-parser.c (c_parser_omp_declare_target): Adjust.
---
 gcc/c/c-parser.c | 13 +++++++------
 gcc/cgraph.c     |  5 ++---
 gcc/configure    |  8 ++++++--
 gcc/configure.ac |  3 +++
 gcc/cp/parser.c  | 13 +++++++------
 gcc/gcc.c        |  2 --
 gcc/omp-low.c    | 16 +++++++---------
 gcc/varpool.c    | 13 +++++++------
 8 files changed, 39 insertions(+), 34 deletions(-)

diff --git a/gcc/c/c-parser.c b/gcc/c/c-parser.c
index 23d0107..d7633be 100644
--- a/gcc/c/c-parser.c
+++ b/gcc/c/c-parser.c
@@ -15891,14 +15891,15 @@ c_parser_omp_declare_target (c_parser *parser)
 	  if (node != NULL)
 	    {
 	      node->offloadable = 1;
-#ifdef ENABLE_OFFLOADING
-	      g->have_offload = true;
-	      if (is_a <varpool_node *> (node))
+	      if (ENABLE_OFFLOADING)
 		{
-		  vec_safe_push (offload_vars, t);
-		  node->force_output = 1;
+		  g->have_offload = true;
+		  if (is_a <varpool_node *> (node))
+		    {
+		      vec_safe_push (offload_vars, t);
+		      node->force_output = 1;
+		    }
 		}
-#endif
 	    }
 	}
     }
diff --git a/gcc/cgraph.c b/gcc/cgraph.c
index 7839c72..b1228a2 100644
--- a/gcc/cgraph.c
+++ b/gcc/cgraph.c
@@ -499,9 +499,8 @@ cgraph_node::create (tree decl)
       && lookup_attribute ("omp declare target", DECL_ATTRIBUTES (decl)))
     {
       node->offloadable = 1;
-#ifdef ENABLE_OFFLOADING
-      g->have_offload = true;
-#endif
+      if (ENABLE_OFFLOADING)
+	g->have_offload = true;
     }
 
   node->register_symbol ();
diff --git a/gcc/configure b/gcc/configure
index 14d828c..c18c1fe 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -7715,6 +7715,10 @@ if test x"$offload_targets" != x; then
 
 $as_echo "#define ENABLE_OFFLOADING 1" >>confdefs.h
 
+else
+
+$as_echo "#define ENABLE_OFFLOADING 0" >>confdefs.h
+
 fi
 
 
@@ -18402,7 +18406,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 18405 "configure"
+#line 18409 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -18508,7 +18512,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 18511 "configure"
+#line 18515 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
diff --git a/gcc/configure.ac b/gcc/configure.ac
index 626eea2..d0cece5 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -951,6 +951,9 @@ AC_DEFINE_UNQUOTED(OFFLOAD_TARGETS, "$offload_targets",
 if test x"$offload_targets" != x; then
   AC_DEFINE(ENABLE_OFFLOADING, 1,
     [Define this to enable support for offloading.])
+else
+  AC_DEFINE(ENABLE_OFFLOADING, 0,
+    [Define this to enable support for offloading.])
 fi
 
 AC_ARG_WITH(multilib-list,
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index d1f4970..b747563 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -34995,14 +34995,15 @@ cp_parser_omp_declare_target (cp_parser *parser, cp_token *pragma_tok)
 	  if (node != NULL)
 	    {
 	      node->offloadable = 1;
-#ifdef ENABLE_OFFLOADING
-	      g->have_offload = true;
-	      if (is_a <varpool_node *> (node))
+	      if (ENABLE_OFFLOADING)
 		{
-		  vec_safe_push (offload_vars, t);
-		  node->force_output = 1;
+		  g->have_offload = true;
+		  if (is_a <varpool_node *> (node))
+		    {
+		      vec_safe_push (offload_vars, t);
+		      node->force_output = 1;
+		    }
 		}
-#endif
 	    }
 	}
     }
diff --git a/gcc/gcc.c b/gcc/gcc.c
index bdd64a6..979c539 100644
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -4382,12 +4382,10 @@ process_command (unsigned int decoded_options_count,
 			   CL_DRIVER, &handlers, global_dc);
     }
 
-#ifdef ENABLE_OFFLOADING
   /* If the user didn't specify any, default to all configured offload
      targets.  */
   if (offload_targets == NULL)
     handle_foffload_option (OFFLOAD_TARGETS);
-#endif
 
   if (output_file
       && strcmp (output_file, "-") != 0
diff --git a/gcc/omp-low.c b/gcc/omp-low.c
index 45d1927..d58c98b 100644
--- a/gcc/omp-low.c
+++ b/gcc/omp-low.c
@@ -2436,9 +2436,9 @@ create_omp_child_function (omp_context *ctx, bool task_copy)
 	if (is_gimple_omp_offloaded (octx->stmt))
 	  {
 	    cgraph_node::get_create (decl)->offloadable = 1;
-#ifdef ENABLE_OFFLOADING
-	    g->have_offload = true;
-#endif
+	    if (ENABLE_OFFLOADING)
+	      g->have_offload = true;
+
 	    break;
 	  }
     }
@@ -12591,10 +12591,9 @@ expand_omp_target (struct omp_region *region)
       node->parallelized_function = 1;
       cgraph_node::add_new_function (child_fn, true);
 
-#ifdef ENABLE_OFFLOADING
       /* Add the new function to the offload table.  */
-      vec_safe_push (offload_funcs, child_fn);
-#endif
+      if (ENABLE_OFFLOADING)
+	vec_safe_push (offload_funcs, child_fn);
 
       bool need_asm = DECL_ASSEMBLER_NAME_SET_P (current_function_decl)
 		      && !DECL_ASSEMBLER_NAME_SET_P (child_fn);
@@ -12606,11 +12605,10 @@ expand_omp_target (struct omp_region *region)
 	assign_assembler_name_if_neeeded (child_fn);
       cgraph_edge::rebuild_edges ();
 
-#ifdef ENABLE_OFFLOADING
       /* Prevent IPA from removing child_fn as unreachable, since there are no
 	 refs from the parent function to child_fn in offload LTO mode.  */
-      cgraph_node::get (child_fn)->mark_force_output ();
-#endif
+      if (ENABLE_OFFLOADING)
+	cgraph_node::get (child_fn)->mark_force_output ();
 
       /* Some EH regions might become dead, see PR34608.  If
 	 pass_cleanup_cfg isn't the first pass to happen with the
diff --git a/gcc/varpool.c b/gcc/varpool.c
index 478f365..36f19a6 100644
--- a/gcc/varpool.c
+++ b/gcc/varpool.c
@@ -153,12 +153,13 @@ varpool_node::get_create (tree decl)
       && lookup_attribute ("omp declare target", DECL_ATTRIBUTES (decl)))
     {
       node->offloadable = 1;
-#ifdef ENABLE_OFFLOADING
-      g->have_offload = true;
-      if (!in_lto_p)
-	vec_safe_push (offload_vars, decl);
-      node->force_output = 1;
-#endif
+      if (ENABLE_OFFLOADING)
+	{
+	  g->have_offload = true;
+	  if (!in_lto_p)
+	    vec_safe_push (offload_vars, decl);
+	  node->force_output = 1;
+	}
     }
 
   node->register_symbol ();
-- 
2.5.0.rc1.5.gc07173f

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

* [PATCH 03/12] remove conditional compilation of sdb debug info
  2015-11-09 16:45 [PATCH 00/12] misc conditional compilation work tbsaunde+gcc
                   ` (2 preceding siblings ...)
  2015-11-09 16:46 ` [PATCH 02/12] remove EXTENDED_SDB_BASIC_TYPES tbsaunde+gcc
@ 2015-11-09 16:46 ` tbsaunde+gcc
  2015-11-09 16:46 ` [PATCH 12/12] always define ENABLE_OFFLOADING tbsaunde+gcc
                   ` (8 subsequent siblings)
  12 siblings, 0 replies; 44+ messages in thread
From: tbsaunde+gcc @ 2015-11-09 16:46 UTC (permalink / raw)
  To: gcc-patches

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

We need to include gsyms.h before tm.h because some targets (rl78 iirc) define
macros that conflict with identifiers in gsyms.h.  This means sdbout.c won't
produce correct output for those targets, but it previously couldn't either
because it wasn't compiled at all.

gcc/ChangeLog:

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

	* defaults.h: New definition of SDB_DEBUGGING_INFO.
	* doc/tm.texi: Regenerate.
	* doc/tm.texi.in: Adjust.
	* final.c (rest_of_clean_state): Remove check if
	SDB_DEBUGGING_INFO is defined.
	* function.c (number_blocks): Likewise.
	* output.h: Likewise.
	* sdbout.c: Likewise.
	* toplev.c (process_options): Likewise.
---
 gcc/defaults.h     | 8 ++++++--
 gcc/doc/tm.texi    | 2 +-
 gcc/doc/tm.texi.in | 2 +-
 gcc/final.c        | 6 +-----
 gcc/function.c     | 2 +-
 gcc/output.h       | 2 --
 gcc/sdbout.c       | 6 +-----
 gcc/toplev.c       | 6 +-----
 8 files changed, 12 insertions(+), 22 deletions(-)

diff --git a/gcc/defaults.h b/gcc/defaults.h
index cee799d..ddda89a 100644
--- a/gcc/defaults.h
+++ b/gcc/defaults.h
@@ -914,10 +914,14 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 #define DEFAULT_GDB_EXTENSIONS 1
 #endif
 
+#ifndef SDB_DEBUGGING_INFO
+#define SDB_DEBUGGING_INFO 0
+#endif
+
 /* If more than one debugging type is supported, you must define
    PREFERRED_DEBUGGING_TYPE to choose the default.  */
 
-#if 1 < (defined (DBX_DEBUGGING_INFO) + defined (SDB_DEBUGGING_INFO) \
+#if 1 < (defined (DBX_DEBUGGING_INFO) + (SDB_DEBUGGING_INFO) \
          + defined (DWARF2_DEBUGGING_INFO) + defined (XCOFF_DEBUGGING_INFO) \
          + defined (VMS_DEBUGGING_INFO))
 #ifndef PREFERRED_DEBUGGING_TYPE
@@ -929,7 +933,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 #elif defined DBX_DEBUGGING_INFO
 #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
 
-#elif defined SDB_DEBUGGING_INFO
+#elif SDB_DEBUGGING_INFO
 #define PREFERRED_DEBUGGING_TYPE SDB_DEBUG
 
 #elif defined DWARF2_DEBUGGING_INFO || defined DWARF2_LINENO_DEBUGGING_INFO
diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi
index 5609a98..a174e21 100644
--- a/gcc/doc/tm.texi
+++ b/gcc/doc/tm.texi
@@ -9567,7 +9567,7 @@ whose value is the highest absolute text address in the file.
 Here are macros for SDB and DWARF output.
 
 @defmac SDB_DEBUGGING_INFO
-Define this macro if GCC should produce COFF-style debugging output
+Define this macro to 1 if GCC should produce COFF-style debugging output
 for SDB in response to the @option{-g} option.
 @end defmac
 
diff --git a/gcc/doc/tm.texi.in b/gcc/doc/tm.texi.in
index 96ca063a..9c13e9b 100644
--- a/gcc/doc/tm.texi.in
+++ b/gcc/doc/tm.texi.in
@@ -6992,7 +6992,7 @@ whose value is the highest absolute text address in the file.
 Here are macros for SDB and DWARF output.
 
 @defmac SDB_DEBUGGING_INFO
-Define this macro if GCC should produce COFF-style debugging output
+Define this macro to 1 if GCC should produce COFF-style debugging output
 for SDB in response to the @option{-g} option.
 @end defmac
 
diff --git a/gcc/final.c b/gcc/final.c
index 30b3826..2f57b1b 100644
--- a/gcc/final.c
+++ b/gcc/final.c
@@ -88,9 +88,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "dbxout.h"
 #endif
 
-#ifdef SDB_DEBUGGING_INFO
 #include "sdbout.h"
-#endif
 
 /* Most ports that aren't using cc0 don't need to define CC_STATUS_INIT.
    So define a null default for it to save conditionalization later.  */
@@ -4644,10 +4642,8 @@ rest_of_clean_state (void)
   /* In case the function was not output,
      don't leave any temporary anonymous types
      queued up for sdb output.  */
-#ifdef SDB_DEBUGGING_INFO
-  if (write_symbols == SDB_DEBUG)
+  if (SDB_DEBUGGING_INFO && write_symbols == SDB_DEBUG)
     sdbout_types (NULL_TREE);
-#endif
 
   flag_rerun_cse_after_global_opts = 0;
   reload_completed = 0;
diff --git a/gcc/function.c b/gcc/function.c
index a637cb3..afc2c87 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -4671,7 +4671,7 @@ number_blocks (tree fn)
   /* For SDB and XCOFF debugging output, we start numbering the blocks
      from 1 within each function, rather than keeping a running
      count.  */
-#if defined (SDB_DEBUGGING_INFO) || defined (XCOFF_DEBUGGING_INFO)
+#if SDB_DEBUGGING_INFO || defined (XCOFF_DEBUGGING_INFO)
   if (write_symbols == SDB_DEBUG || write_symbols == XCOFF_DEBUG)
     next_block_index = 1;
 #endif
diff --git a/gcc/output.h b/gcc/output.h
index f6a576c..d485cd6 100644
--- a/gcc/output.h
+++ b/gcc/output.h
@@ -309,9 +309,7 @@ extern rtx_sequence *final_sequence;
 /* The line number of the beginning of the current function.  Various
    md code needs this so that it can output relative linenumbers.  */
 
-#ifdef SDB_DEBUGGING_INFO /* Avoid undef sym in certain broken linkers.  */
 extern int sdb_begin_function_line;
-#endif
 
 /* File in which assembler code is being written.  */
 
diff --git a/gcc/sdbout.c b/gcc/sdbout.c
index e495a8a..f22bc7c 100644
--- a/gcc/sdbout.c
+++ b/gcc/sdbout.c
@@ -42,6 +42,7 @@ AT&T C compiler.  From the example below I would conclude the following:
 #include "config.h"
 #include "system.h"
 #include "coretypes.h"
+#include "gsyms.h"
 #include "tm.h"
 #include "debug.h"
 #include "tree.h"
@@ -65,8 +66,6 @@ static GTY(()) vec<tree, va_gc> *deferred_global_decls;
 static GTY(()) tree preinit_symbols;
 static GTY(()) bool sdbout_initialized;
 
-#ifdef SDB_DEBUGGING_INFO
-
 #include "rtl.h"
 #include "regs.h"
 #include "flags.h"
@@ -75,7 +74,6 @@ static GTY(()) bool sdbout_initialized;
 #include "output.h"
 #include "diagnostic-core.h"
 #include "tm_p.h"
-#include "gsyms.h"
 #include "langhooks.h"
 #include "target.h"
 
@@ -1648,6 +1646,4 @@ sdbout_init (const char *input_file_name ATTRIBUTE_UNUSED)
   preinit_symbols = 0;
 }
 
-#endif /* SDB_DEBUGGING_INFO */
-
 #include "gt-sdbout.h"
diff --git a/gcc/toplev.c b/gcc/toplev.c
index 140e36f..b18d93e 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -80,9 +80,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "dbxout.h"
 #endif
 
-#ifdef SDB_DEBUGGING_INFO
 #include "sdbout.h"
-#endif
 
 #ifdef XCOFF_DEBUGGING_INFO
 #include "xcoffout.h"		/* Needed for external data declarations. */
@@ -1378,10 +1376,8 @@ process_options (void)
   else if (write_symbols == XCOFF_DEBUG)
     debug_hooks = &xcoff_debug_hooks;
 #endif
-#ifdef SDB_DEBUGGING_INFO
-  else if (write_symbols == SDB_DEBUG)
+  else if (SDB_DEBUGGING_INFO && write_symbols == SDB_DEBUG)
     debug_hooks = &sdb_debug_hooks;
-#endif
 #ifdef DWARF2_DEBUGGING_INFO
   else if (write_symbols == DWARF2_DEBUG)
     debug_hooks = &dwarf2_debug_hooks;
-- 
2.5.0.rc1.5.gc07173f

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

* [PATCH 01/12] reduce conditional compilation for HARD_FRAME_POINTER_IS_ARG_POINTER
  2015-11-09 16:45 [PATCH 00/12] misc conditional compilation work tbsaunde+gcc
                   ` (8 preceding siblings ...)
  2015-11-09 16:46 ` [PATCH 07/12] always define DBX_DEBUGGING_INFO tbsaunde+gcc
@ 2015-11-09 16:46 ` tbsaunde+gcc
  2015-11-09 19:01   ` Bernd Schmidt
  2015-11-09 16:46 ` [PATCH 05/12] always define VMS_DEBUGGING_INFO tbsaunde+gcc
                   ` (2 subsequent siblings)
  12 siblings, 1 reply; 44+ messages in thread
From: tbsaunde+gcc @ 2015-11-09 16:46 UTC (permalink / raw)
  To: gcc-patches

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

gcc/ChangeLog:

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

	* dbxout.c (dbxout_symbol_location): Remove #if for
	HARD_FRAME_POINTER_IS_ARG_POINTER.
	(dbxout_parms): Likewise.
	* dwarf2out.c (rtl_for_decl_location): Likewise.
	* emit-rtl.c (gen_rtx_REG): Likewise.
---
 gcc/dbxout.c    | 13 +++++--------
 gcc/dwarf2out.c |  6 ++----
 gcc/emit-rtl.c  |  7 ++++---
 3 files changed, 11 insertions(+), 15 deletions(-)

diff --git a/gcc/dbxout.c b/gcc/dbxout.c
index 1b4a5ea..5f4ea77 100644
--- a/gcc/dbxout.c
+++ b/gcc/dbxout.c
@@ -3076,10 +3076,8 @@ dbxout_symbol_location (tree decl, tree type, const char *suffix, rtx home)
 	       || (REG_P (XEXP (home, 0))
 		   && REGNO (XEXP (home, 0)) != HARD_FRAME_POINTER_REGNUM
 		   && REGNO (XEXP (home, 0)) != STACK_POINTER_REGNUM
-#if !HARD_FRAME_POINTER_IS_ARG_POINTER
-		   && REGNO (XEXP (home, 0)) != ARG_POINTER_REGNUM
-#endif
-		   )))
+		   && (HARD_FRAME_POINTER_IS_ARG_POINTER
+		       || REGNO (XEXP (home, 0)) != ARG_POINTER_REGNUM))))
     /* If the value is indirect by memory or by a register
        that isn't the frame pointer
        then it means the object is variable-sized and address through
@@ -3490,10 +3488,9 @@ dbxout_parms (tree parms)
 		 && REG_P (XEXP (DECL_RTL (parms), 0))
 		 && REGNO (XEXP (DECL_RTL (parms), 0)) != HARD_FRAME_POINTER_REGNUM
 		 && REGNO (XEXP (DECL_RTL (parms), 0)) != STACK_POINTER_REGNUM
-#if !HARD_FRAME_POINTER_IS_ARG_POINTER
-		 && REGNO (XEXP (DECL_RTL (parms), 0)) != ARG_POINTER_REGNUM
-#endif
-		 )
+		 && (HARD_FRAME_POINTER_IS_ARG_POINTER
+		     || REGNO (XEXP (DECL_RTL (parms), 0))
+		       != ARG_POINTER_REGNUM))
 	  {
 	    /* Parm was passed via invisible reference.
 	       That is, its address was passed in a register.
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index f184750..c42da7e 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -16026,10 +16026,8 @@ rtl_for_decl_location (tree decl)
 	       && (!REG_P (XEXP (rtl, 0))
 		   || REGNO (XEXP (rtl, 0)) == HARD_FRAME_POINTER_REGNUM
 		   || REGNO (XEXP (rtl, 0)) == STACK_POINTER_REGNUM
-#if !HARD_FRAME_POINTER_IS_ARG_POINTER
-		   || REGNO (XEXP (rtl, 0)) == ARG_POINTER_REGNUM
-#endif
-		     )
+		   || (!HARD_FRAME_POINTER_IS_ARG_POINTER
+		       && REGNO (XEXP (rtl, 0)) == ARG_POINTER_REGNUM))
 	       /* Big endian correction check.  */
 	       && BYTES_BIG_ENDIAN
 	       && TYPE_MODE (TREE_TYPE (decl)) != GET_MODE (rtl)
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c
index c6a37e1..3d2c6d9 100644
--- a/gcc/emit-rtl.c
+++ b/gcc/emit-rtl.c
@@ -716,11 +716,12 @@ gen_rtx_REG (machine_mode mode, unsigned int regno)
 	  && regno == HARD_FRAME_POINTER_REGNUM
 	  && (!reload_completed || frame_pointer_needed))
 	return hard_frame_pointer_rtx;
-#if !HARD_FRAME_POINTER_IS_ARG_POINTER
-      if (FRAME_POINTER_REGNUM != ARG_POINTER_REGNUM
+
+      if (!HARD_FRAME_POINTER_IS_ARG_POINTER
+	  && FRAME_POINTER_REGNUM != ARG_POINTER_REGNUM
 	  && regno == ARG_POINTER_REGNUM)
 	return arg_pointer_rtx;
-#endif
+
 #ifdef RETURN_ADDRESS_POINTER_REGNUM
       if (regno == RETURN_ADDRESS_POINTER_REGNUM)
 	return return_address_pointer_rtx;
-- 
2.5.0.rc1.5.gc07173f

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

* [PATCH 04/12] always define XCOFF_DEBUGGING_INFO
  2015-11-09 16:45 [PATCH 00/12] misc conditional compilation work tbsaunde+gcc
                   ` (5 preceding siblings ...)
  2015-11-09 16:46 ` [PATCH 06/12] always define DWARF2_DEBUGGING_INFO tbsaunde+gcc
@ 2015-11-09 16:46 ` tbsaunde+gcc
  2015-11-09 16:46 ` [PATCH 09/12] always define TARGET_PECOFF tbsaunde+gcc
                   ` (5 subsequent siblings)
  12 siblings, 0 replies; 44+ messages in thread
From: tbsaunde+gcc @ 2015-11-09 16:46 UTC (permalink / raw)
  To: gcc-patches

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

gcc/ChangeLog:

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

	* collect2.c (scan_prog_file): Remove check if
	XCOFF_DEBUGGING_INFO is defined.
	* config/rs6000/rs6000.c (macho_branch_islands): Likewise.
	* dbxout.c (struct dbx_file): Likewise.
	(default_stabs_asm_out_destructor): Likewise.
	(default_stabs_asm_out_constructor): Likewise.
	* dbxout.h: Likewise.
	* defaults.h: New definition of XCOFF_DEBUGGING_INFO.
	* doc/tm.texi: Regenerate.
	* doc/tm.texi.in: Adjust.
	* dwarf2asm.c: Likewise.
	* dwarf2out.c: Likewise.
	* final.c: Likewise.
	* function.c (number_blocks): Likewise.
	* toplev.c (process_options): Likewise.
	* varasm.c: Likewise.
	* xcoffout.c: Likewise.
---
 gcc/collect2.c             |  4 +---
 gcc/config/rs6000/rs6000.c |  4 ++--
 gcc/dbxout.c               | 16 ++++++++--------
 gcc/dbxout.h               |  2 +-
 gcc/defaults.h             |  8 ++++++--
 gcc/doc/tm.texi            |  2 +-
 gcc/doc/tm.texi.in         |  2 +-
 gcc/dwarf2asm.c            |  4 ----
 gcc/dwarf2out.c            |  4 ----
 gcc/final.c                |  2 +-
 gcc/function.c             |  2 +-
 gcc/toplev.c               |  8 +++-----
 gcc/varasm.c               |  2 +-
 gcc/xcoffout.c             |  2 +-
 14 files changed, 27 insertions(+), 35 deletions(-)

diff --git a/gcc/collect2.c b/gcc/collect2.c
index 20c2533..e03c978 100644
--- a/gcc/collect2.c
+++ b/gcc/collect2.c
@@ -2799,12 +2799,10 @@ scan_prog_file (const char *prog_name, scanpass which_pass,
 		      if ((name = ldgetname (ldptr, &symbol)) == NULL)
 			continue;		/* Should never happen.  */
 
-#ifdef XCOFF_DEBUGGING_INFO
 		      /* All AIX function names have a duplicate entry
 			 beginning with a dot.  */
-		      if (*name == '.')
+		      if (XCOFF_DEBUGGING_INFO && *name == '.')
 			++name;
-#endif
 
 		      switch (is_ctor_dtor (name))
 			{
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index 13d0193..6ed82cb 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -30455,7 +30455,7 @@ macho_branch_islands (void)
 	}
       strcpy (tmp_buf, "\n");
       strcat (tmp_buf, label);
-#if defined (DBX_DEBUGGING_INFO) || defined (XCOFF_DEBUGGING_INFO)
+#if defined (DBX_DEBUGGING_INFO) || (XCOFF_DEBUGGING_INFO)
       if (write_symbols == DBX_DEBUG || write_symbols == XCOFF_DEBUG)
 	dbxout_stabd (N_SLINE, bi->line_number);
 #endif /* DBX_DEBUGGING_INFO || XCOFF_DEBUGGING_INFO */
@@ -30505,7 +30505,7 @@ macho_branch_islands (void)
 	  strcat (tmp_buf, ")\n\tmtctr r12\n\tbctr");
 	}
       output_asm_insn (tmp_buf, 0);
-#if defined (DBX_DEBUGGING_INFO) || defined (XCOFF_DEBUGGING_INFO)
+#if defined (DBX_DEBUGGING_INFO) || (XCOFF_DEBUGGING_INFO)
       if (write_symbols == DBX_DEBUG || write_symbols == XCOFF_DEBUG)
 	dbxout_stabd (N_SLINE, bi->line_number);
 #endif /* DBX_DEBUGGING_INFO || XCOFF_DEBUGGING_INFO */
diff --git a/gcc/dbxout.c b/gcc/dbxout.c
index 5f4ea77..d9bd59f 100644
--- a/gcc/dbxout.c
+++ b/gcc/dbxout.c
@@ -91,12 +91,12 @@ along with GCC; see the file COPYING3.  If not see
 #include "langhooks.h"
 #include "expr.h"
 
-#ifdef XCOFF_DEBUGGING_INFO
+#if XCOFF_DEBUGGING_INFO
 #include "xcoffout.h"
 #endif
 
 #ifndef ASM_STABS_OP
-# ifdef XCOFF_DEBUGGING_INFO
+# if XCOFF_DEBUGGING_INFO
 #  define ASM_STABS_OP "\t.stabx\t"
 # else
 #  define ASM_STABS_OP "\t.stabs\t"
@@ -217,7 +217,7 @@ struct dbx_file
    should always be 0 because we should not have needed any file numbers
    yet.  */
 
-#if (defined (DBX_DEBUGGING_INFO) || defined (XCOFF_DEBUGGING_INFO)) \
+#if (defined (DBX_DEBUGGING_INFO) || (XCOFF_DEBUGGING_INFO)) \
     && defined (DBX_USE_BINCL)
 static struct dbx_file *current_file;
 #endif
@@ -250,7 +250,7 @@ static GTY(()) int lastfile_is_base;
 /* Typical USG systems don't have stab.h, and they also have
    no use for DBX-format debugging info.  */
 
-#if defined (DBX_DEBUGGING_INFO) || defined (XCOFF_DEBUGGING_INFO)
+#if defined (DBX_DEBUGGING_INFO) || (XCOFF_DEBUGGING_INFO)
 
 #ifdef DBX_USE_BINCL
 /* If zero then there is no pending BINCL.  */
@@ -382,7 +382,7 @@ const struct gcc_debug_hooks dbx_debug_hooks =
 };
 #endif /* DBX_DEBUGGING_INFO  */
 
-#if defined (XCOFF_DEBUGGING_INFO)
+#if (XCOFF_DEBUGGING_INFO)
 const struct gcc_debug_hooks xcoff_debug_hooks =
 {
   dbxout_init,
@@ -860,7 +860,7 @@ dbxout_finish_complex_stabs (tree sym, stab_code_type code,
   obstack_free (&stabstr_ob, str);
 }
 
-#if defined (DBX_DEBUGGING_INFO) || defined (XCOFF_DEBUGGING_INFO)
+#if defined (DBX_DEBUGGING_INFO) || (XCOFF_DEBUGGING_INFO)
 
 /* When -gused is used, emit debug info for only used symbols. But in
    addition to the standard intercepted debug_hooks there are some
@@ -3788,7 +3788,7 @@ void
 default_stabs_asm_out_destructor (rtx symbol ATTRIBUTE_UNUSED,
 				  int priority ATTRIBUTE_UNUSED)
 {
-#if defined DBX_DEBUGGING_INFO || defined XCOFF_DEBUGGING_INFO
+#if defined DBX_DEBUGGING_INFO || XCOFF_DEBUGGING_INFO
   /* Tell GNU LD that this is part of the static destructor set.
      This will work for any system that uses stabs, most usefully
      aout systems.  */
@@ -3805,7 +3805,7 @@ void
 default_stabs_asm_out_constructor (rtx symbol ATTRIBUTE_UNUSED,
 				   int priority ATTRIBUTE_UNUSED)
 {
-#if defined DBX_DEBUGGING_INFO || defined XCOFF_DEBUGGING_INFO
+#if defined DBX_DEBUGGING_INFO || XCOFF_DEBUGGING_INFO
   /* Tell GNU LD that this is part of the static destructor set.
      This will work for any system that uses stabs, most usefully
      aout systems.  */
diff --git a/gcc/dbxout.h b/gcc/dbxout.h
index 098213f..954e138 100644
--- a/gcc/dbxout.h
+++ b/gcc/dbxout.h
@@ -29,7 +29,7 @@ extern void default_stabs_asm_out_destructor (rtx, int);
 extern void default_stabs_asm_out_constructor (rtx, int);
 
 /* dbxout helper functions */
-#if defined DBX_DEBUGGING_INFO || defined XCOFF_DEBUGGING_INFO
+#if defined DBX_DEBUGGING_INFO || XCOFF_DEBUGGING_INFO
 
 extern void dbxout_int (int);
 extern void dbxout_stabd (int, int);
diff --git a/gcc/defaults.h b/gcc/defaults.h
index ddda89a..b518863 100644
--- a/gcc/defaults.h
+++ b/gcc/defaults.h
@@ -918,11 +918,15 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 #define SDB_DEBUGGING_INFO 0
 #endif
 
+#ifndef XCOFF_DEBUGGING_INFO
+#define XCOFF_DEBUGGING_INFO 0
+#endif
+
 /* If more than one debugging type is supported, you must define
    PREFERRED_DEBUGGING_TYPE to choose the default.  */
 
 #if 1 < (defined (DBX_DEBUGGING_INFO) + (SDB_DEBUGGING_INFO) \
-         + defined (DWARF2_DEBUGGING_INFO) + defined (XCOFF_DEBUGGING_INFO) \
+	 + defined (DWARF2_DEBUGGING_INFO) + (XCOFF_DEBUGGING_INFO) \
          + defined (VMS_DEBUGGING_INFO))
 #ifndef PREFERRED_DEBUGGING_TYPE
 #error You must define PREFERRED_DEBUGGING_TYPE
@@ -942,7 +946,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 #elif defined VMS_DEBUGGING_INFO
 #define PREFERRED_DEBUGGING_TYPE VMS_AND_DWARF2_DEBUG
 
-#elif defined XCOFF_DEBUGGING_INFO
+#elif XCOFF_DEBUGGING_INFO
 #define PREFERRED_DEBUGGING_TYPE XCOFF_DEBUG
 
 #else
diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi
index a174e21..0399248 100644
--- a/gcc/doc/tm.texi
+++ b/gcc/doc/tm.texi
@@ -9357,7 +9357,7 @@ in response to the @option{-g} option.
 @end defmac
 
 @defmac XCOFF_DEBUGGING_INFO
-Define this macro if GCC should produce XCOFF format debugging output
+Define this macro to 1 if GCC should produce XCOFF format debugging output
 in response to the @option{-g} option.  This is a variant of DBX format.
 @end defmac
 
diff --git a/gcc/doc/tm.texi.in b/gcc/doc/tm.texi.in
index 9c13e9b..84e8383 100644
--- a/gcc/doc/tm.texi.in
+++ b/gcc/doc/tm.texi.in
@@ -6782,7 +6782,7 @@ in response to the @option{-g} option.
 @end defmac
 
 @defmac XCOFF_DEBUGGING_INFO
-Define this macro if GCC should produce XCOFF format debugging output
+Define this macro to 1 if GCC should produce XCOFF format debugging output
 in response to the @option{-g} option.  This is a variant of DBX format.
 @end defmac
 
diff --git a/gcc/dwarf2asm.c b/gcc/dwarf2asm.c
index ac89ce0..d16827b 100644
--- a/gcc/dwarf2asm.c
+++ b/gcc/dwarf2asm.c
@@ -31,10 +31,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "dwarf2asm.h"
 #include "dwarf2.h"
 
-#ifndef XCOFF_DEBUGGING_INFO
-#define XCOFF_DEBUGGING_INFO 0
-#endif
-
 \f
 /* Output an unaligned integer with the given value and size.  Prefer not
    to print a newline, since the caller may want to add a comment.  */
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index c42da7e..072e485 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -97,10 +97,6 @@ static rtx_insn *last_var_location_insn;
 static rtx_insn *cached_next_real_insn;
 static void dwarf2out_decl (tree);
 
-#ifndef XCOFF_DEBUGGING_INFO
-#define XCOFF_DEBUGGING_INFO 0
-#endif
-
 #ifndef HAVE_XCOFF_DWARF_EXTRAS
 #define HAVE_XCOFF_DWARF_EXTRAS 0
 #endif
diff --git a/gcc/final.c b/gcc/final.c
index 2f57b1b..a4b66c2 100644
--- a/gcc/final.c
+++ b/gcc/final.c
@@ -78,7 +78,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "rtl-iter.h"
 #include "print-rtl.h"
 
-#ifdef XCOFF_DEBUGGING_INFO
+#if XCOFF_DEBUGGING_INFO
 #include "xcoffout.h"		/* Needed for external data declarations.  */
 #endif
 
diff --git a/gcc/function.c b/gcc/function.c
index afc2c87..e598af8 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -4671,7 +4671,7 @@ number_blocks (tree fn)
   /* For SDB and XCOFF debugging output, we start numbering the blocks
      from 1 within each function, rather than keeping a running
      count.  */
-#if SDB_DEBUGGING_INFO || defined (XCOFF_DEBUGGING_INFO)
+#if SDB_DEBUGGING_INFO || XCOFF_DEBUGGING_INFO
   if (write_symbols == SDB_DEBUG || write_symbols == XCOFF_DEBUG)
     next_block_index = 1;
 #endif
diff --git a/gcc/toplev.c b/gcc/toplev.c
index b18d93e..420ae3d 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -76,13 +76,13 @@ along with GCC; see the file COPYING3.  If not see
 #include "tree-chkp.h"
 #include "omp-low.h"
 
-#if defined(DBX_DEBUGGING_INFO) || defined(XCOFF_DEBUGGING_INFO)
+#if defined(DBX_DEBUGGING_INFO) || (XCOFF_DEBUGGING_INFO)
 #include "dbxout.h"
 #endif
 
 #include "sdbout.h"
 
-#ifdef XCOFF_DEBUGGING_INFO
+#if XCOFF_DEBUGGING_INFO
 #include "xcoffout.h"		/* Needed for external data declarations. */
 #endif
 
@@ -1372,10 +1372,8 @@ process_options (void)
   else if (write_symbols == DBX_DEBUG)
     debug_hooks = &dbx_debug_hooks;
 #endif
-#if defined(XCOFF_DEBUGGING_INFO)
-  else if (write_symbols == XCOFF_DEBUG)
+  else if (XCOFF_DEBUGGING_INFO && write_symbols == XCOFF_DEBUG)
     debug_hooks = &xcoff_debug_hooks;
-#endif
   else if (SDB_DEBUGGING_INFO && write_symbols == SDB_DEBUG)
     debug_hooks = &sdb_debug_hooks;
 #ifdef DWARF2_DEBUGGING_INFO
diff --git a/gcc/varasm.c b/gcc/varasm.c
index ec6aabf..75cef25 100644
--- a/gcc/varasm.c
+++ b/gcc/varasm.c
@@ -53,7 +53,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "asan.h"
 #include "rtl-iter.h"
 
-#ifdef XCOFF_DEBUGGING_INFO
+#if XCOFF_DEBUGGING_INFO
 #include "xcoffout.h"		/* Needed for external data declarations.  */
 #endif
 
diff --git a/gcc/xcoffout.c b/gcc/xcoffout.c
index 0e9c65f..5d19f0c 100644
--- a/gcc/xcoffout.c
+++ b/gcc/xcoffout.c
@@ -33,7 +33,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "output.h"
 #include "debug.h"
 
-#ifdef XCOFF_DEBUGGING_INFO
+#if XCOFF_DEBUGGING_INFO
 
 /* This defines the C_* storage classes.  */
 #include "xcoff.h"
-- 
2.5.0.rc1.5.gc07173f

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

* Re: [PATCH 10/12] always define EH_RETURN_HANDLER_RTX
  2015-11-09 16:45 ` [PATCH 10/12] always define EH_RETURN_HANDLER_RTX tbsaunde+gcc
@ 2015-11-09 17:42   ` David Malcolm
  2015-11-09 18:27   ` Bernd Schmidt
  1 sibling, 0 replies; 44+ messages in thread
From: David Malcolm @ 2015-11-09 17:42 UTC (permalink / raw)
  To: tbsaunde+gcc; +Cc: gcc-patches

On Mon, 2015-11-09 at 11:47 -0500, tbsaunde+gcc@tbsaunde.org wrote:
> From: Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
> 
> gcc/ChangeLog:
> 
> 2015-11-09  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
> 
> 	* defaults.h (EH_RETURN_HANDLER_RTX): New default definition.
> 	* df-scan.c (df_get_exit_block_use_set): Adjust.
> 	* except.c (expand_eh_return): Likewise.
> ---
>  gcc/defaults.h | 4 ++++
>  gcc/df-scan.c  | 2 --
>  gcc/except.c   | 9 ++++-----
>  3 files changed, 8 insertions(+), 7 deletions(-)
> 
> diff --git a/gcc/defaults.h b/gcc/defaults.h
> index c20de44..047a0db 100644
> --- a/gcc/defaults.h
> +++ b/gcc/defaults.h
> @@ -1325,6 +1325,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
>  #define TARGET_PECOFF 0
>  #endif
>  
> +#ifndef EH_RETURN_HANDLER_RTX
> +#define EH_RETURN_HANDLER_RTX NULL
> +#endif
> +
>  #ifdef GCC_INSN_FLAGS_H
>  /* Dependent default target macro definitions
>  
> diff --git a/gcc/df-scan.c b/gcc/df-scan.c
> index 2e5fe97..a735925 100644
> --- a/gcc/df-scan.c
> +++ b/gcc/df-scan.c
> @@ -3714,7 +3714,6 @@ df_get_exit_block_use_set (bitmap exit_block_uses)
>      }
>  #endif
>  
> -#ifdef EH_RETURN_HANDLER_RTX
>    if ((!targetm.have_epilogue () || ! epilogue_completed)
>        && crtl->calls_eh_return)
>      {
> @@ -3722,7 +3721,6 @@ df_get_exit_block_use_set (bitmap exit_block_uses)
>        if (tmp && REG_P (tmp))
>  	df_mark_reg (tmp, exit_block_uses);
>      }
> -#endif
>  
>    /* Mark function return value.  */
>    diddle_return_value (df_mark_reg, (void*) exit_block_uses);
> diff --git a/gcc/except.c b/gcc/except.c
> index 1801fe7..1a41a34 100644
> --- a/gcc/except.c
> +++ b/gcc/except.c
> @@ -2255,11 +2255,10 @@ expand_eh_return (void)
>      emit_insn (targetm.gen_eh_return (crtl->eh.ehr_handler));
>    else
>      {
> -#ifdef EH_RETURN_HANDLER_RTX
> -      emit_move_insn (EH_RETURN_HANDLER_RTX, crtl->eh.ehr_handler);
> -#else
> -      error ("__builtin_eh_return not supported on this target");
> -#endif
> +      if (rtx handler = EH_RETURN_HANDLER_RTX)

Would this be clearer as

         rtx handler = EH_RETURN_HANDLER_RTX;
         if (handler)

?  (to avoid an assignment inside a conditional)

> +	emit_move_insn (handler, crtl->eh.ehr_handler);
> +      else
> +	error ("__builtin_eh_return not supported on this target");
>      }
>  
>    emit_label (around_label);


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

* Re: [PATCH 00/12] misc conditional compilation work
  2015-11-09 16:45 [PATCH 00/12] misc conditional compilation work tbsaunde+gcc
                   ` (11 preceding siblings ...)
  2015-11-09 16:46 ` [PATCH 11/12] always define HAVE_AS_LEB128 tbsaunde+gcc
@ 2015-11-09 17:57 ` Jeff Law
  2015-11-09 19:01   ` Trevor Saunders
  12 siblings, 1 reply; 44+ messages in thread
From: Jeff Law @ 2015-11-09 17:57 UTC (permalink / raw)
  To: tbsaunde+gcc, gcc-patches

On 11/09/2015 09:47 AM, tbsaunde+gcc@tbsaunde.org wrote:
> From: Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
>
> Hi,
>
> basically $subject, making some code unconditionally compiled, and changing
> other things from #ifdef to #if so they can be made unconditional
> incrementally.
>
> patches individually bootstrapped + regtested on x86_64-linux-gnu, and a
> slightly earlier version of the series ran through config-list.mk.  I think
> everything here is either preapproved, or obvious so I'll commit it later
> today if nobody complains.
Are these the last patches of this nature planned for GCC6?  While the 
window was left slightly open by Richi this morning, I think that's more 
to allow the queues to drain rather than to allow more new work to go 
into the tree :-)

jeff

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

* Re: [PATCH 10/12] always define EH_RETURN_HANDLER_RTX
  2015-11-09 16:45 ` [PATCH 10/12] always define EH_RETURN_HANDLER_RTX tbsaunde+gcc
  2015-11-09 17:42   ` David Malcolm
@ 2015-11-09 18:27   ` Bernd Schmidt
  2015-11-09 18:42     ` Jeff Law
  1 sibling, 1 reply; 44+ messages in thread
From: Bernd Schmidt @ 2015-11-09 18:27 UTC (permalink / raw)
  To: tbsaunde+gcc, gcc-patches

On 11/09/2015 05:47 PM, tbsaunde+gcc@tbsaunde.org wrote:
> From: Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
>
> gcc/ChangeLog:
>
> 2015-11-09  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
>
> 	* defaults.h (EH_RETURN_HANDLER_RTX): New default definition.
> 	* df-scan.c (df_get_exit_block_use_set): Adjust.
> 	* except.c (expand_eh_return): Likewise.

As I said for a previous patch series, if we go to the trouble of fixing 
up stuff like this, we might as well do it properly and turn things like 
this into a target hook.


Bernd

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

* Re: [PATCH 05/12] always define VMS_DEBUGGING_INFO
  2015-11-09 16:46 ` [PATCH 05/12] always define VMS_DEBUGGING_INFO tbsaunde+gcc
@ 2015-11-09 18:34   ` Bernd Schmidt
  2015-11-09 18:44     ` Jeff Law
  0 siblings, 1 reply; 44+ messages in thread
From: Bernd Schmidt @ 2015-11-09 18:34 UTC (permalink / raw)
  To: tbsaunde+gcc, gcc-patches

In general I think the _DEBUGGING_INFO patches are going to be OK, 
modulo Jeff's comment about stage 1. I think they shouldn't have been 
split - it causes numerous unnecessary extra changes, and the 
intermediate stages look very inconsistent.

> -#ifdef VMS_DEBUGGING_INFO
> -  else if (write_symbols == VMS_DEBUG || write_symbols == VMS_AND_DWARF2_DEBUG)
> +  else if (VMS_DEBUGGING_INFO
> +	   && (write_symbols == VMS_DEBUG
> +	       || write_symbols == VMS_AND_DWARF2_DEBUG))
>       debug_hooks = &vmsdbg_debug_hooks;
> -#endif
>   #ifdef DWARF2_LINENO_DEBUGGING_INFO
>     else if (write_symbols == DWARF2_DEBUG)
>       debug_hooks = &dwarf2_lineno_debug_hooks;
> diff --git a/gcc/vmsdbgout.c b/gcc/vmsdbgout.c
> index d41d4b2..6dd6878 100644
> --- a/gcc/vmsdbgout.c
> +++ b/gcc/vmsdbgout.c
> @@ -24,7 +24,7 @@ along with GCC; see the file COPYING3.  If not see
>   #include "coretypes.h"
>   #include "tm.h"
>
> -#ifdef VMS_DEBUGGING_INFO
> +#if VMS_DEBUGGING_INFO
>   #include "alias.h"
>   #include "tree.h"
>   #include "varasm.h"

This seems to reference vmsdbg_debug_hooks unconditionally, but as far 
as I can tell the definition is still guarded by an #if? Does this compile?


Bernd

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

* Re: [PATCH 12/12] always define ENABLE_OFFLOADING
  2015-11-09 16:46 ` [PATCH 12/12] always define ENABLE_OFFLOADING tbsaunde+gcc
@ 2015-11-09 18:41   ` Bernd Schmidt
  2015-11-23 16:53     ` Ilya Verbin
  0 siblings, 1 reply; 44+ messages in thread
From: Bernd Schmidt @ 2015-11-09 18:41 UTC (permalink / raw)
  To: tbsaunde+gcc, gcc-patches

On 11/09/2015 05:47 PM, tbsaunde+gcc@tbsaunde.org wrote:
> -#ifdef ENABLE_OFFLOADING
>     /* If the user didn't specify any, default to all configured offload
>        targets.  */
>     if (offload_targets == NULL)
>       handle_foffload_option (OFFLOAD_TARGETS);
> -#endif

This one I would keep guarded with an if.

Otherwise ok modulo stage 1 end.


Bernd

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

* Re: [PATCH 11/12] always define HAVE_AS_LEB128
  2015-11-09 16:46 ` [PATCH 11/12] always define HAVE_AS_LEB128 tbsaunde+gcc
@ 2015-11-09 18:42   ` Bernd Schmidt
  2015-11-09 21:04     ` Trevor Saunders
  0 siblings, 1 reply; 44+ messages in thread
From: Bernd Schmidt @ 2015-11-09 18:42 UTC (permalink / raw)
  To: tbsaunde+gcc, gcc-patches

> -#ifdef HAVE_AS_LEB128
> +#if HAVE_AS_LEB128

This patch doesn't seem to actually remove any conditional compilation?


Bernd

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

* Re: [PATCH 10/12] always define EH_RETURN_HANDLER_RTX
  2015-11-09 18:27   ` Bernd Schmidt
@ 2015-11-09 18:42     ` Jeff Law
  2015-11-09 18:50       ` Bernd Schmidt
  2015-11-09 18:52       ` Trevor Saunders
  0 siblings, 2 replies; 44+ messages in thread
From: Jeff Law @ 2015-11-09 18:42 UTC (permalink / raw)
  To: Bernd Schmidt, tbsaunde+gcc, gcc-patches

On 11/09/2015 11:27 AM, Bernd Schmidt wrote:
> On 11/09/2015 05:47 PM, tbsaunde+gcc@tbsaunde.org wrote:
>> From: Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
>>
>> gcc/ChangeLog:
>>
>> 2015-11-09  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
>>
>>     * defaults.h (EH_RETURN_HANDLER_RTX): New default definition.
>>     * df-scan.c (df_get_exit_block_use_set): Adjust.
>>     * except.c (expand_eh_return): Likewise.
>
> As I said for a previous patch series, if we go to the trouble of fixing
> up stuff like this, we might as well do it properly and turn things like
> this into a target hook.
I agree that pushing hookization further is good as well.  I still think 
the patch in and of itself is a step forward, even if it doesn't hookize 
EH_RETURN_HANDLER_RTX.

jeff

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

* Re: [PATCH 05/12] always define VMS_DEBUGGING_INFO
  2015-11-09 18:34   ` Bernd Schmidt
@ 2015-11-09 18:44     ` Jeff Law
  2015-11-09 19:29       ` Trevor Saunders
  0 siblings, 1 reply; 44+ messages in thread
From: Jeff Law @ 2015-11-09 18:44 UTC (permalink / raw)
  To: Bernd Schmidt, tbsaunde+gcc, gcc-patches

On 11/09/2015 11:34 AM, Bernd Schmidt wrote:
> In general I think the _DEBUGGING_INFO patches are going to be OK,
> modulo Jeff's comment about stage 1. I think they shouldn't have been
> split - it causes numerous unnecessary extra changes, and the
> intermediate stages look very inconsistent.
>
>> -#ifdef VMS_DEBUGGING_INFO
>> -  else if (write_symbols == VMS_DEBUG || write_symbols ==
>> VMS_AND_DWARF2_DEBUG)
>> +  else if (VMS_DEBUGGING_INFO
>> +       && (write_symbols == VMS_DEBUG
>> +           || write_symbols == VMS_AND_DWARF2_DEBUG))
>>       debug_hooks = &vmsdbg_debug_hooks;
>> -#endif
>>   #ifdef DWARF2_LINENO_DEBUGGING_INFO
>>     else if (write_symbols == DWARF2_DEBUG)
>>       debug_hooks = &dwarf2_lineno_debug_hooks;
>> diff --git a/gcc/vmsdbgout.c b/gcc/vmsdbgout.c
>> index d41d4b2..6dd6878 100644
>> --- a/gcc/vmsdbgout.c
>> +++ b/gcc/vmsdbgout.c
>> @@ -24,7 +24,7 @@ along with GCC; see the file COPYING3.  If not see
>>   #include "coretypes.h"
>>   #include "tm.h"
>>
>> -#ifdef VMS_DEBUGGING_INFO
>> +#if VMS_DEBUGGING_INFO
>>   #include "alias.h"
>>   #include "tree.h"
>>   #include "varasm.h"
>
> This seems to reference vmsdbg_debug_hooks unconditionally, but as far
> as I can tell the definition is still guarded by an #if? Does this compile?
There's an easy way for Trevor to find out.  Build a cross for one of 
the VMS targets (there's 3 defined in config-list.mk) :-)

jeff

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

* Re: [PATCH 02/12] remove EXTENDED_SDB_BASIC_TYPES
  2015-11-09 16:46 ` [PATCH 02/12] remove EXTENDED_SDB_BASIC_TYPES tbsaunde+gcc
@ 2015-11-09 18:49   ` Bernd Schmidt
  0 siblings, 0 replies; 44+ messages in thread
From: Bernd Schmidt @ 2015-11-09 18:49 UTC (permalink / raw)
  To: tbsaunde+gcc, gcc-patches

>
> The last target using this was i960, which was removed many years ago,
> so there's no reason to keep it.
>
> gcc/ChangeLog:
>
> 2015-11-09  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
>
> 	* gsyms.h (enum sdb_type): Remove code for
> 	EXTENDED_SDB_BASIC_TYPES.
> 	(enum sdb_masks): Likewise.
> 	* sdbout.c (plain_type_1): Likewise.

Ok if you also poison the macro name as usual.


Bernd

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

* Re: [PATCH 10/12] always define EH_RETURN_HANDLER_RTX
  2015-11-09 18:42     ` Jeff Law
@ 2015-11-09 18:50       ` Bernd Schmidt
  2015-11-09 18:52       ` Trevor Saunders
  1 sibling, 0 replies; 44+ messages in thread
From: Bernd Schmidt @ 2015-11-09 18:50 UTC (permalink / raw)
  To: Jeff Law, tbsaunde+gcc, gcc-patches

On 11/09/2015 07:42 PM, Jeff Law wrote:
> On 11/09/2015 11:27 AM, Bernd Schmidt wrote:
>> On 11/09/2015 05:47 PM, tbsaunde+gcc@tbsaunde.org wrote:
>>> From: Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
>>>
>>> gcc/ChangeLog:
>>>
>>> 2015-11-09  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
>>>
>>>     * defaults.h (EH_RETURN_HANDLER_RTX): New default definition.
>>>     * df-scan.c (df_get_exit_block_use_set): Adjust.
>>>     * except.c (expand_eh_return): Likewise.
>>
>> As I said for a previous patch series, if we go to the trouble of fixing
>> up stuff like this, we might as well do it properly and turn things like
>> this into a target hook.
> I agree that pushing hookization further is good as well.  I still think
> the patch in and of itself is a step forward, even if it doesn't hookize
> EH_RETURN_HANDLER_RTX.

Well, I was hoping that, by pointing out the issue for the last patch 
set, the next set of patches would get things right. We really shouldn't 
make sideways steps when there's a simple way to go forward.


Bernd

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

* Re: [PATCH 10/12] always define EH_RETURN_HANDLER_RTX
  2015-11-09 18:42     ` Jeff Law
  2015-11-09 18:50       ` Bernd Schmidt
@ 2015-11-09 18:52       ` Trevor Saunders
  2015-11-09 19:38         ` Bernd Schmidt
  1 sibling, 1 reply; 44+ messages in thread
From: Trevor Saunders @ 2015-11-09 18:52 UTC (permalink / raw)
  To: Jeff Law; +Cc: Bernd Schmidt, tbsaunde+gcc, gcc-patches

On Mon, Nov 09, 2015 at 11:42:19AM -0700, Jeff Law wrote:
> On 11/09/2015 11:27 AM, Bernd Schmidt wrote:
> >On 11/09/2015 05:47 PM, tbsaunde+gcc@tbsaunde.org wrote:
> >>From: Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
> >>
> >>gcc/ChangeLog:
> >>
> >>2015-11-09  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
> >>
> >>    * defaults.h (EH_RETURN_HANDLER_RTX): New default definition.
> >>    * df-scan.c (df_get_exit_block_use_set): Adjust.
> >>    * except.c (expand_eh_return): Likewise.
> >
> >As I said for a previous patch series, if we go to the trouble of fixing
> >up stuff like this, we might as well do it properly and turn things like
> >this into a target hook.
> I agree that pushing hookization further is good as well.  I still think the
> patch in and of itself is a step forward, even if it doesn't hookize
> EH_RETURN_HANDLER_RTX.

yeah, that's more or less my thought, and this makes hookization easier
since you can now mechanically add a hook for each thing in defaults.h
that invokes the macro.  Then for each target you can go through and
replace the macro with an override of the hooks.  That ends up with the
macros replaced by hooks without writing a lot of patches that need to
go through config-list.mk, and testing on multiple targets which imho is
a giant pain, and rather slow.

Trev

> 
> jeff

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

* Re: [PATCH 01/12] reduce conditional compilation for HARD_FRAME_POINTER_IS_ARG_POINTER
  2015-11-09 16:46 ` [PATCH 01/12] reduce conditional compilation for HARD_FRAME_POINTER_IS_ARG_POINTER tbsaunde+gcc
@ 2015-11-09 19:01   ` Bernd Schmidt
  2015-11-09 20:58     ` Trevor Saunders
  0 siblings, 1 reply; 44+ messages in thread
From: Bernd Schmidt @ 2015-11-09 19:01 UTC (permalink / raw)
  To: tbsaunde+gcc, gcc-patches

On 11/09/2015 05:47 PM, tbsaunde+gcc@tbsaunde.org wrote:
> +++ b/gcc/dbxout.c
> @@ -3076,10 +3076,8 @@ dbxout_symbol_location (tree decl, tree type, const char *suffix, rtx home)
>   	       || (REG_P (XEXP (home, 0))
>   		   && REGNO (XEXP (home, 0)) != HARD_FRAME_POINTER_REGNUM
>   		   && REGNO (XEXP (home, 0)) != STACK_POINTER_REGNUM
> -#if !HARD_FRAME_POINTER_IS_ARG_POINTER
> -		   && REGNO (XEXP (home, 0)) != ARG_POINTER_REGNUM
> -#endif
> -		   )))
> +		   && (HARD_FRAME_POINTER_IS_ARG_POINTER
> +		       || REGNO (XEXP (home, 0)) != ARG_POINTER_REGNUM))))

This used to be

#if ARG_POINTER_REGNUM != HARD_FRAME_POINTER_REGNUM

and the whole macro seems kind of pointless - why not just make the 
ARG_POINTER_REGNUM test unconditional? I think the conditional 
compilation was originally just a "performance optimization", avoiding 
unnecessary tests - which means the reason to have the tests goes away 
if we move away from the conditional compilation.


Bernd

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

* Re: [PATCH 00/12] misc conditional compilation work
  2015-11-09 17:57 ` [PATCH 00/12] misc conditional compilation work Jeff Law
@ 2015-11-09 19:01   ` Trevor Saunders
  0 siblings, 0 replies; 44+ messages in thread
From: Trevor Saunders @ 2015-11-09 19:01 UTC (permalink / raw)
  To: Jeff Law; +Cc: tbsaunde+gcc, gcc-patches

On Mon, Nov 09, 2015 at 10:57:10AM -0700, Jeff Law wrote:
> On 11/09/2015 09:47 AM, tbsaunde+gcc@tbsaunde.org wrote:
> >From: Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
> >
> >Hi,
> >
> >basically $subject, making some code unconditionally compiled, and changing
> >other things from #ifdef to #if so they can be made unconditional
> >incrementally.
> >
> >patches individually bootstrapped + regtested on x86_64-linux-gnu, and a
> >slightly earlier version of the series ran through config-list.mk.  I think
> >everything here is either preapproved, or obvious so I'll commit it later
> >today if nobody complains.
> Are these the last patches of this nature planned for GCC6?  While the
> window was left slightly open by Richi this morning, I think that's more to
> allow the queues to drain rather than to allow more new work to go into the
> tree :-)

yeah, I guess I misread, I thought the end was tonight not last night (I
could easily have sent this out a day or so earlier).  Given my in
correct assumption about timing I was considering trying to sneak in a
little more around reg-stack.c, but I suspect that isn't going to work
out anyway (turns out even after the macros reg-stack.c uses x86
specific variables).

Trev

> 
> jeff
> 

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

* Re: [PATCH 05/12] always define VMS_DEBUGGING_INFO
  2015-11-09 18:44     ` Jeff Law
@ 2015-11-09 19:29       ` Trevor Saunders
  2015-11-09 19:37         ` Bernd Schmidt
  0 siblings, 1 reply; 44+ messages in thread
From: Trevor Saunders @ 2015-11-09 19:29 UTC (permalink / raw)
  To: Jeff Law; +Cc: Bernd Schmidt, tbsaunde+gcc, gcc-patches

On Mon, Nov 09, 2015 at 11:44:30AM -0700, Jeff Law wrote:
> On 11/09/2015 11:34 AM, Bernd Schmidt wrote:
> >In general I think the _DEBUGGING_INFO patches are going to be OK,
> >modulo Jeff's comment about stage 1. I think they shouldn't have been
> >split - it causes numerous unnecessary extra changes, and the
> >intermediate stages look very inconsistent.

I'd actually really rather review them, or really deal with them in any
way, the way they are.  Smaller simpler patches that only deal with one
thing are much better.  I think the most macros that appear on one line
are 2, so at most you could lower that to 1 change instead of 2, but who
really cares anyway?  I guess its not the greatest thing for blame, but
good blame tools should make that a tiny issue since uninteresting changes
are a fact of life, and I'd much rather skip uninteresting changes than
look at a giant change doing many things and wonder why it did one of
them.

> >>-#ifdef VMS_DEBUGGING_INFO
> >>-  else if (write_symbols == VMS_DEBUG || write_symbols ==
> >>VMS_AND_DWARF2_DEBUG)
> >>+  else if (VMS_DEBUGGING_INFO
> >>+       && (write_symbols == VMS_DEBUG
> >>+           || write_symbols == VMS_AND_DWARF2_DEBUG))
> >>      debug_hooks = &vmsdbg_debug_hooks;
> >>-#endif
> >>  #ifdef DWARF2_LINENO_DEBUGGING_INFO
> >>    else if (write_symbols == DWARF2_DEBUG)
> >>      debug_hooks = &dwarf2_lineno_debug_hooks;
> >>diff --git a/gcc/vmsdbgout.c b/gcc/vmsdbgout.c
> >>index d41d4b2..6dd6878 100644
> >>--- a/gcc/vmsdbgout.c
> >>+++ b/gcc/vmsdbgout.c
> >>@@ -24,7 +24,7 @@ along with GCC; see the file COPYING3.  If not see
> >>  #include "coretypes.h"
> >>  #include "tm.h"
> >>
> >>-#ifdef VMS_DEBUGGING_INFO
> >>+#if VMS_DEBUGGING_INFO
> >>  #include "alias.h"
> >>  #include "tree.h"
> >>  #include "varasm.h"
> >
> >This seems to reference vmsdbg_debug_hooks unconditionally, but as far
> >as I can tell the definition is still guarded by an #if? Does this compile?
> There's an easy way for Trevor to find out.  Build a cross for one of the
> VMS targets (there's 3 defined in config-list.mk) :-)

as I said in 0/12 this did go through config-list.mk, and checking again
this does build on alpha-dec-vms.

Trev

> 
> jeff

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

* Re: [PATCH 05/12] always define VMS_DEBUGGING_INFO
  2015-11-09 19:29       ` Trevor Saunders
@ 2015-11-09 19:37         ` Bernd Schmidt
  2015-11-09 21:56           ` Trevor Saunders
  0 siblings, 1 reply; 44+ messages in thread
From: Bernd Schmidt @ 2015-11-09 19:37 UTC (permalink / raw)
  To: Trevor Saunders, Jeff Law; +Cc: tbsaunde+gcc, gcc-patches

On 11/09/2015 08:29 PM, Trevor Saunders wrote:
> as I said in 0/12 this did go through config-list.mk, and checking again
> this does build on alpha-dec-vms.

The question I have is - why does it build on any other target? It's the 
reference that's unconditional, not the definition. Do we have enough 
DCE at -O0 to eliminate the reference? It's still incorrect IMO (and 
should be fixed in the other patches as well.

>
> I'd actually really rather review them, or really deal with them in any
> way, the way they are.  Smaller simpler patches that only deal with one
> thing are much better.  I think the most macros that appear on one line
> are 2, so at most you could lower that to 1 change instead of 2, but who
> really cares anyway?

Well, I do, because I get to see this stuff:

-#if 1 < (defined (DBX_DEBUGGING_INFO) + defined (SDB_DEBUGGING_INFO) \
+#if 1 < (defined (DBX_DEBUGGING_INFO) + (SDB_DEBUGGING_INFO) \
           + defined (DWARF2_DEBUGGING_INFO) + defined 
(XCOFF_DEBUGGING_INFO) \
           + defined (VMS_DEBUGGING_INFO))

  #if 1 < (defined (DBX_DEBUGGING_INFO) + (SDB_DEBUGGING_INFO) \
-         + defined (DWARF2_DEBUGGING_INFO) + defined 
(XCOFF_DEBUGGING_INFO) \
+	 + defined (DWARF2_DEBUGGING_INFO) + (XCOFF_DEBUGGING_INFO) \
           + defined (VMS_DEBUGGING_INFO))

  #if 1 < (defined (DBX_DEBUGGING_INFO) + (SDB_DEBUGGING_INFO) \
  	 + defined (DWARF2_DEBUGGING_INFO) + (XCOFF_DEBUGGING_INFO) \
-         + defined (VMS_DEBUGGING_INFO))
+	 + (VMS_DEBUGGING_INFO))

  #if 1 < (defined (DBX_DEBUGGING_INFO) + (SDB_DEBUGGING_INFO) \
-	 + defined (DWARF2_DEBUGGING_INFO) + (XCOFF_DEBUGGING_INFO) \
+	 + (DWARF2_DEBUGGING_INFO) + (XCOFF_DEBUGGING_INFO) \
  	 + (VMS_DEBUGGING_INFO))

-#if 1 < (defined (DBX_DEBUGGING_INFO) + (SDB_DEBUGGING_INFO) \
+#if 1 < ((DBX_DEBUGGING_INFO) + (SDB_DEBUGGING_INFO) \
  	 + (DWARF2_DEBUGGING_INFO) + (XCOFF_DEBUGGING_INFO) \
  	 + (VMS_DEBUGGING_INFO))

etc.


Bernd

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

* Re: [PATCH 10/12] always define EH_RETURN_HANDLER_RTX
  2015-11-09 18:52       ` Trevor Saunders
@ 2015-11-09 19:38         ` Bernd Schmidt
  2015-11-09 19:46           ` Jeff Law
  0 siblings, 1 reply; 44+ messages in thread
From: Bernd Schmidt @ 2015-11-09 19:38 UTC (permalink / raw)
  To: Trevor Saunders, Jeff Law; +Cc: tbsaunde+gcc, gcc-patches

On 11/09/2015 07:52 PM, Trevor Saunders wrote:

> yeah, that's more or less my thought, and this makes hookization easier
> since you can now mechanically add a hook for each thing in defaults.h
> that invokes the macro.  Then for each target you can go through and
> replace the macro with an override of the hooks.  That ends up with the
> macros replaced by hooks without writing a lot of patches that need to
> go through config-list.mk, and testing on multiple targets which imho is
> a giant pain, and rather slow.

We might want to think about making a policy decision to try waiving 
some of the testing requirements for target macro -> hook conversions. 
Maybe try only a "build to cc1" requirement and see whether that causes 
too much breakage.


Bernd

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

* Re: [PATCH 10/12] always define EH_RETURN_HANDLER_RTX
  2015-11-09 19:38         ` Bernd Schmidt
@ 2015-11-09 19:46           ` Jeff Law
  2015-11-09 21:07             ` Mike Stump
  2015-11-09 21:30             ` Trevor Saunders
  0 siblings, 2 replies; 44+ messages in thread
From: Jeff Law @ 2015-11-09 19:46 UTC (permalink / raw)
  To: Bernd Schmidt, Trevor Saunders; +Cc: tbsaunde+gcc, gcc-patches

On 11/09/2015 12:38 PM, Bernd Schmidt wrote:
> On 11/09/2015 07:52 PM, Trevor Saunders wrote:
>
>> yeah, that's more or less my thought, and this makes hookization easier
>> since you can now mechanically add a hook for each thing in defaults.h
>> that invokes the macro.  Then for each target you can go through and
>> replace the macro with an override of the hooks.  That ends up with the
>> macros replaced by hooks without writing a lot of patches that need to
>> go through config-list.mk, and testing on multiple targets which imho is
>> a giant pain, and rather slow.
>
> We might want to think about making a policy decision to try waiving
> some of the testing requirements for target macro -> hook conversions.
> Maybe try only a "build to cc1" requirement and see whether that causes
> too much breakage.
A config-list.mk build is a build to cc1*, f951, gnat1, so we're not 
requiring deep tests on the affected targets.  Not sure how much we're 
getting by forcing a bootstrap & regression test of that kind of change.

I'm certainly open to this kind of relaxed testing to help this stuff 
move forward an complete before we're all retired :-)

Jeff

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

* Re: [PATCH 01/12] reduce conditional compilation for HARD_FRAME_POINTER_IS_ARG_POINTER
  2015-11-09 19:01   ` Bernd Schmidt
@ 2015-11-09 20:58     ` Trevor Saunders
  2015-11-09 21:09       ` Bernd Schmidt
  0 siblings, 1 reply; 44+ messages in thread
From: Trevor Saunders @ 2015-11-09 20:58 UTC (permalink / raw)
  To: Bernd Schmidt; +Cc: tbsaunde+gcc, gcc-patches

On Mon, Nov 09, 2015 at 08:01:28PM +0100, Bernd Schmidt wrote:
> On 11/09/2015 05:47 PM, tbsaunde+gcc@tbsaunde.org wrote:
> >+++ b/gcc/dbxout.c
> >@@ -3076,10 +3076,8 @@ dbxout_symbol_location (tree decl, tree type, const char *suffix, rtx home)
> >  	       || (REG_P (XEXP (home, 0))
> >  		   && REGNO (XEXP (home, 0)) != HARD_FRAME_POINTER_REGNUM
> >  		   && REGNO (XEXP (home, 0)) != STACK_POINTER_REGNUM
> >-#if !HARD_FRAME_POINTER_IS_ARG_POINTER
> >-		   && REGNO (XEXP (home, 0)) != ARG_POINTER_REGNUM
> >-#endif
> >-		   )))
> >+		   && (HARD_FRAME_POINTER_IS_ARG_POINTER
> >+		       || REGNO (XEXP (home, 0)) != ARG_POINTER_REGNUM))))
> 
> This used to be
> 
> #if ARG_POINTER_REGNUM != HARD_FRAME_POINTER_REGNUM
> 
> and the whole macro seems kind of pointless - why not just make the
> ARG_POINTER_REGNUM test unconditional? I think the conditional compilation

With the exception of the emit-rtl.c hunk I think I've correctly
convinced myself this macro is just an optimization.

> was originally just a "performance optimization", avoiding unnecessary tests
> - which means the reason to have the tests goes away if we move away from
> the conditional compilation.

Well, with this patch the test should still get optimized away when
appropriate, but if you want to go to supporting multiple targets then
yeah it might as well go away.

Trev

> 
> 
> Bernd

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

* Re: [PATCH 11/12] always define HAVE_AS_LEB128
  2015-11-09 18:42   ` Bernd Schmidt
@ 2015-11-09 21:04     ` Trevor Saunders
  0 siblings, 0 replies; 44+ messages in thread
From: Trevor Saunders @ 2015-11-09 21:04 UTC (permalink / raw)
  To: Bernd Schmidt; +Cc: tbsaunde+gcc, gcc-patches

On Mon, Nov 09, 2015 at 07:42:32PM +0100, Bernd Schmidt wrote:
> >-#ifdef HAVE_AS_LEB128
> >+#if HAVE_AS_LEB128
> 
> This patch doesn't seem to actually remove any conditional compilation?

I guess, but it does make it possible to incrementally do that which
wasn't possible before, and imo is an improvement.

Trev

> 
> 
> Bernd

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

* Re: [PATCH 10/12] always define EH_RETURN_HANDLER_RTX
  2015-11-09 19:46           ` Jeff Law
@ 2015-11-09 21:07             ` Mike Stump
  2015-11-09 21:30             ` Trevor Saunders
  1 sibling, 0 replies; 44+ messages in thread
From: Mike Stump @ 2015-11-09 21:07 UTC (permalink / raw)
  To: Jeff Law; +Cc: Bernd Schmidt, Trevor Saunders, tbsaunde+gcc, gcc-patches

On Nov 9, 2015, at 11:46 AM, Jeff Law <law@redhat.com> wrote:
On 11/09/2015 12:38 PM, Bernd Schmidt wrote:
>> We might want to think about making a policy decision to try waiving
>> some of the testing requirements for target macro -> hook conversions.
>> Maybe try only a "build to cc1" requirement and see whether that causes
>> too much breakage.
> A config-list.mk build is a build to cc1*, f951, gnat1, so we're not requiring deep tests on the affected targets.  Not sure how much we're getting by forcing a bootstrap & regression test of that kind of change.
> 
> I'm certainly open to this kind of relaxed testing to help this stuff move forward an complete before we're all retired :-)

Testing is a cornerstone of gcc quality.  I like it.  It is useful.  That said, I don’t think we should always be fanatical about it.  How and when we accept less that a standard bootstrap and regression test run I’ve sure would be a big topic, but rather than make a ton of rules, I’d rather let small handful of reviewers decide when and how to accept less, and let them do what they want.  We can give them negative feedback if it impacts too many people, too often and they can adjust.

The other way, would be to have an integration branch that is tested and merged post testing on a regular basis and let people contribute less than well tested things on it, the idea being that it still won’t hit trunk until after a bootstrap and tests suite run, but that we can bundle 2-100 patches into one test suite run.  This strikes me as more scalable, easier for developers and removes the requirement of test suite + bootstrap before checkin while retaining the useful quality of everything merged to trunk is tested.  Hardest part about this would be ChangeLogs, merge resolution and svn blame.  git handles this gracefully.  svn as I recall, a little less so.  [ quick check ] Ah, seems svn blame -g TARGET ca n handle this graceful (in theory).

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

* Re: [PATCH 01/12] reduce conditional compilation for HARD_FRAME_POINTER_IS_ARG_POINTER
  2015-11-09 20:58     ` Trevor Saunders
@ 2015-11-09 21:09       ` Bernd Schmidt
  0 siblings, 0 replies; 44+ messages in thread
From: Bernd Schmidt @ 2015-11-09 21:09 UTC (permalink / raw)
  To: Trevor Saunders; +Cc: tbsaunde+gcc, gcc-patches

On 11/09/2015 09:58 PM, Trevor Saunders wrote:
> With the exception of the emit-rtl.c hunk I think I've correctly
> convinced myself this macro is just an optimization.

I also looked at that one and initially thought that it can simply go 
away, but the earlier test for FRAME_POINTER_REGNUM also has some extra 
reload_completed etc. conditions.

So I think this:

!      if (!HARD_FRAME_POINTER_IS_FRAME_POINTER
           && regno == HARD_FRAME_POINTER_REGNUM
           && (!reload_completed || frame_pointer_needed))
         return hard_frame_pointer_rtx;
-#if !HARD_FRAME_POINTER_IS_ARG_POINTER
       if (FRAME_POINTER_REGNUM != ARG_POINTER_REGNUM
           && regno == ARG_POINTER_REGNUM)
         return arg_pointer_rtx;
-#endif

should become

!     if (HARD_FRAME_POINTER_REGNUM != FRAME_POINTER_REGNUM
           && regno == HARD_FRAME_POINTER_REGNUM
           && (!reload_completed || frame_pointer_needed))
         return hard_frame_pointer_rtx;
       if (FRAME_POINTER_REGNUM != ARG_POINTER_REGNUM
+         && HARD_FRAME_POINTER_REGNUM != ARG_POINTER_REGNUM
	  && regno == ARG_POINTER_REGNUM)
         return arg_pointer_rtx;
#endif

and then it should be possible to eliminate the two X_IS_Y macros.


Bernd

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

* Re: [PATCH 10/12] always define EH_RETURN_HANDLER_RTX
  2015-11-09 19:46           ` Jeff Law
  2015-11-09 21:07             ` Mike Stump
@ 2015-11-09 21:30             ` Trevor Saunders
  2015-11-09 22:07               ` Jeff Law
  2015-11-10  1:32               ` Joseph Myers
  1 sibling, 2 replies; 44+ messages in thread
From: Trevor Saunders @ 2015-11-09 21:30 UTC (permalink / raw)
  To: Jeff Law; +Cc: Bernd Schmidt, tbsaunde+gcc, gcc-patches

On Mon, Nov 09, 2015 at 12:46:33PM -0700, Jeff Law wrote:
> On 11/09/2015 12:38 PM, Bernd Schmidt wrote:
> >On 11/09/2015 07:52 PM, Trevor Saunders wrote:
> >
> >>yeah, that's more or less my thought, and this makes hookization easier
> >>since you can now mechanically add a hook for each thing in defaults.h
> >>that invokes the macro.  Then for each target you can go through and
> >>replace the macro with an override of the hooks.  That ends up with the
> >>macros replaced by hooks without writing a lot of patches that need to
> >>go through config-list.mk, and testing on multiple targets which imho is
> >>a giant pain, and rather slow.
> >
> >We might want to think about making a policy decision to try waiving
> >some of the testing requirements for target macro -> hook conversions.
> >Maybe try only a "build to cc1" requirement and see whether that causes
> >too much breakage.
> A config-list.mk build is a build to cc1*, f951, gnat1, so we're not
> requiring deep tests on the affected targets.  Not sure how much we're
> getting by forcing a bootstrap & regression test of that kind of change.

So in general when I've done cross target things I think I've found more
bugs with config-list.mk than with a regtest, but the regtest has found
some things I think.

However I actually don't mind bootstrapping and regtesting that much,
its more or less a few hours for the control and then another few for
each patch.  On the other hand config-list.mk takes on the order of 12
hours, and setting up a cross for a quick test isn't really that quick.
Which means that if you have a patch touching a number of targets you
end up not checking it compiles at all until you run config-list.mk, and
then its a heavy weight operation.

So at least for the way I work I'd really rather write series that I can
incrementally test on just one target and be reasonably confident they
won't break other targets.

The add default macro definitions then wrap those with hooks, then
target by target replace the macro by hook overrides approach seems to
provide that you can incrementally test and fiind most of the issues,
but the change a macro every where approach doesn't really.

Trev

The add default macros then use those in hooks, and finally add overides
> 
> I'm certainly open to this kind of relaxed testing to help this stuff move
> forward an complete before we're all retired :-)
> 
> Jeff
> 

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

* Re: [PATCH 05/12] always define VMS_DEBUGGING_INFO
  2015-11-09 19:37         ` Bernd Schmidt
@ 2015-11-09 21:56           ` Trevor Saunders
  0 siblings, 0 replies; 44+ messages in thread
From: Trevor Saunders @ 2015-11-09 21:56 UTC (permalink / raw)
  To: Bernd Schmidt; +Cc: Jeff Law, tbsaunde+gcc, gcc-patches

On Mon, Nov 09, 2015 at 08:37:19PM +0100, Bernd Schmidt wrote:
> On 11/09/2015 08:29 PM, Trevor Saunders wrote:
> >as I said in 0/12 this did go through config-list.mk, and checking again
> >this does build on alpha-dec-vms.
> 
> The question I have is - why does it build on any other target? It's the
> reference that's unconditional, not the definition. Do we have enough DCE at
> -O0 to eliminate the reference? It's still incorrect IMO (and should be
> fixed in the other patches as well.

dce would be my guess.  I guess going back to #if ing the bits that
reference it, and then incrementally removing the #ifs starting with the
ones defining the functions used in the structs, but given you seem to
be against patches that only change ifdef to #if you might not likethat
:(

> >
> >I'd actually really rather review them, or really deal with them in any
> >way, the way they are.  Smaller simpler patches that only deal with one
> >thing are much better.  I think the most macros that appear on one line
> >are 2, so at most you could lower that to 1 change instead of 2, but who
> >really cares anyway?
> 
> Well, I do, because I get to see this stuff:
> 
> -#if 1 < (defined (DBX_DEBUGGING_INFO) + defined (SDB_DEBUGGING_INFO) \
> +#if 1 < (defined (DBX_DEBUGGING_INFO) + (SDB_DEBUGGING_INFO) \
>           + defined (DWARF2_DEBUGGING_INFO) + defined (XCOFF_DEBUGGING_INFO)
> \
>           + defined (VMS_DEBUGGING_INFO))
> 
>  #if 1 < (defined (DBX_DEBUGGING_INFO) + (SDB_DEBUGGING_INFO) \
> -         + defined (DWARF2_DEBUGGING_INFO) + defined (XCOFF_DEBUGGING_INFO)
> \
> +	 + defined (DWARF2_DEBUGGING_INFO) + (XCOFF_DEBUGGING_INFO) \
>           + defined (VMS_DEBUGGING_INFO))
> 
>  #if 1 < (defined (DBX_DEBUGGING_INFO) + (SDB_DEBUGGING_INFO) \
>  	 + defined (DWARF2_DEBUGGING_INFO) + (XCOFF_DEBUGGING_INFO) \
> -         + defined (VMS_DEBUGGING_INFO))
> +	 + (VMS_DEBUGGING_INFO))
> 
>  #if 1 < (defined (DBX_DEBUGGING_INFO) + (SDB_DEBUGGING_INFO) \
> -	 + defined (DWARF2_DEBUGGING_INFO) + (XCOFF_DEBUGGING_INFO) \
> +	 + (DWARF2_DEBUGGING_INFO) + (XCOFF_DEBUGGING_INFO) \
>  	 + (VMS_DEBUGGING_INFO))
> 
> -#if 1 < (defined (DBX_DEBUGGING_INFO) + (SDB_DEBUGGING_INFO) \
> +#if 1 < ((DBX_DEBUGGING_INFO) + (SDB_DEBUGGING_INFO) \
>  	 + (DWARF2_DEBUGGING_INFO) + (XCOFF_DEBUGGING_INFO) \
>  	 + (VMS_DEBUGGING_INFO))
> 
> etc.

other than reading this now I'm not sure what the context would be, but
either way personally I really don't mind reading that, and think its
simpler to reason about the correctness of one thing at a time.

Trev

> 
> 
> Bernd

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

* Re: [PATCH 10/12] always define EH_RETURN_HANDLER_RTX
  2015-11-09 21:30             ` Trevor Saunders
@ 2015-11-09 22:07               ` Jeff Law
  2015-11-09 22:53                 ` Trevor Saunders
  2015-11-10  1:32               ` Joseph Myers
  1 sibling, 1 reply; 44+ messages in thread
From: Jeff Law @ 2015-11-09 22:07 UTC (permalink / raw)
  To: Trevor Saunders; +Cc: Bernd Schmidt, tbsaunde+gcc, gcc-patches

On 11/09/2015 02:30 PM, Trevor Saunders wrote:
>
> So in general when I've done cross target things I think I've found more
> bugs with config-list.mk than with a regtest, but the regtest has found
> some things I think.
I'm finding config-list.mk fairly reliable, with the notable exception 
of the avr-rtems issue and interix.  But that may simply be function of 
running it regularly.

>
> However I actually don't mind bootstrapping and regtesting that much,
> its more or less a few hours for the control and then another few for
> each patch.
I usually save my results and only go back for a control build if 
something goes wrong.  Of course I'm usually stepping forward at least 
once a day, so the number of new tests is usually manageable and allows 
me to compare the first run of the day with the last run of the prior day.



   On the other hand config-list.mk takes on the order of 12
> hours, and setting up a cross for a quick test isn't really that quick.
> Which means that if you have a patch touching a number of targets you
> end up not checking it compiles at all until you run config-list.mk, and
> then its a heavy weight operation.
FWIW, If we know what ports a particular patch would hit, I'd fully 
support folks doing builds that didn't hit all of config-list.mk.

In case it's not obvious I do hope that we'll get to a point where the 
class of bugs like "X is unused on port PDQ because it defines/does not 
define FROBIT" just go away and we can get good first level coverage 
with a native and perhaps a very small number of crosses (instead of the 
200+ in config-list.mk now).

At some point I also want to see config-list.mk extended to do things 
like "build the crosses and run test tree-ssa/ssa-dom-thread-11.c on all 
of them".  I've got hacks to do that locally, but they're strictly 
hacks.  I think this selectively deeper testing will become more 
important as we put the first level coverage behind us.


>
> So at least for the way I work I'd really rather write series that I can
> incrementally test on just one target and be reasonably confident they
> won't break other targets.
That generally works for me.

>
> The add default macro definitions then wrap those with hooks, then
> target by target replace the macro by hook overrides approach seems to
> provide that you can incrementally test and fiind most of the issues,
> but the change a macro every where approach doesn't really.
I think Bernd and I just have different approaches, preferences and 
priorities on some stuff which results in slightly different priorities 
or approaches to certain issues.

I've known Bernd a long time and will say he's very reasonable and his 
concerns/objections are well thought out and carry a ton of weight with me.

Jeff

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

* Re: [PATCH 10/12] always define EH_RETURN_HANDLER_RTX
  2015-11-09 22:07               ` Jeff Law
@ 2015-11-09 22:53                 ` Trevor Saunders
  2015-11-10 22:02                   ` Bernd Schmidt
  0 siblings, 1 reply; 44+ messages in thread
From: Trevor Saunders @ 2015-11-09 22:53 UTC (permalink / raw)
  To: Jeff Law; +Cc: Bernd Schmidt, tbsaunde+gcc, gcc-patches

On Mon, Nov 09, 2015 at 03:07:21PM -0700, Jeff Law wrote:
> On 11/09/2015 02:30 PM, Trevor Saunders wrote:
> >
> >So in general when I've done cross target things I think I've found more
> >bugs with config-list.mk than with a regtest, but the regtest has found
> >some things I think.
> I'm finding config-list.mk fairly reliable, with the notable exception of
> the avr-rtems issue and interix.  But that may simply be function of running
> it regularly.

yeah, its reliable although I tend to find needing to have an installed
trunk compiler a little painful.  What I meant was that sometimes I've
made mistakes and introduced testsuite failures or the like.

> >
> >However I actually don't mind bootstrapping and regtesting that much,
> >its more or less a few hours for the control and then another few for
> >each patch.
> I usually save my results and only go back for a control build if something
> goes wrong.  Of course I'm usually stepping forward at least once a day, so
> the number of new tests is usually manageable and allows me to compare the
> first run of the day with the last run of the prior day.

SO my usual mode is to build up a branch just checking that a default
build works, and then at the end run a script that regtests all the
patches.  That can suffer from intermitant tests, but its low human
input so I like it.

>   On the other hand config-list.mk takes on the order of 12
> >hours, and setting up a cross for a quick test isn't really that quick.
> >Which means that if you have a patch touching a number of targets you
> >end up not checking it compiles at all until you run config-list.mk, and
> >then its a heavy weight operation.
> FWIW, If we know what ports a particular patch would hit, I'd fully support
> folks doing builds that didn't hit all of config-list.mk.

sure

> In case it's not obvious I do hope that we'll get to a point where the class
> of bugs like "X is unused on port PDQ because it defines/does not define
> FROBIT" just go away and we can get good first level coverage with a native
> and perhaps a very small number of crosses (instead of the 200+ in
> config-list.mk now).
> 
> At some point I also want to see config-list.mk extended to do things like
> "build the crosses and run test tree-ssa/ssa-dom-thread-11.c on all of
> them".  I've got hacks to do that locally, but they're strictly hacks.  I
> think this selectively deeper testing will become more important as we put
> the first level coverage behind us.

yeah, I'd actually like to see config-list.mk become part of the "real"
build system at some point and you could do something like ./configure
--target=i686-linux-gnu,ppc64-linux-gnu,alpha-dec-vms and stuff.

> >So at least for the way I work I'd really rather write series that I can
> >incrementally test on just one target and be reasonably confident they
> >won't break other targets.
> That generally works for me.
> 
> >
> >The add default macro definitions then wrap those with hooks, then
> >target by target replace the macro by hook overrides approach seems to
> >provide that you can incrementally test and fiind most of the issues,
> >but the change a macro every where approach doesn't really.
> I think Bernd and I just have different approaches, preferences and
> priorities on some stuff which results in slightly different priorities or
> approaches to certain issues.

Sure, we're all different ;)

> I've known Bernd a long time and will say he's very reasonable and his
> concerns/objections are well thought out and carry a ton of weight with me.

I don't really know him, but I don't really disagree with where he wants
to get to.  However I think we work fairly different ways, and review
things differently.  When I review patches (mostly for stuff more
directly related to Mozilla my standards are basically it needs to be an
improvement, and it needs to not introduce bugs.  So I find the it might
improve things, but it doesn't  also accomplish X to berather odd, and
hard to work with if I think getting directly to X might be hard.

Trev

> 
> Jeff

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

* Re: [PATCH 10/12] always define EH_RETURN_HANDLER_RTX
  2015-11-09 21:30             ` Trevor Saunders
  2015-11-09 22:07               ` Jeff Law
@ 2015-11-10  1:32               ` Joseph Myers
  1 sibling, 0 replies; 44+ messages in thread
From: Joseph Myers @ 2015-11-10  1:32 UTC (permalink / raw)
  To: Trevor Saunders; +Cc: Jeff Law, Bernd Schmidt, tbsaunde+gcc, gcc-patches

On Mon, 9 Nov 2015, Trevor Saunders wrote:

> The add default macro definitions then wrap those with hooks, then
> target by target replace the macro by hook overrides approach seems to
> provide that you can incrementally test and fiind most of the issues,
> but the change a macro every where approach doesn't really.

I have this notion that once a target macro is "regular" enough - not used 
in code built for the target, not used in driver code, not used directly 
or indirectly in #if conditions except for the single default definition 
in defaults.h, target definitions only depend on the target architecture 
and not OS or other variations - it ought to be possible to do the 
conversion to a hook with some kind of automated refactoring tool 
(possibly with a little editing of its results).  And so this sort of 
regularizing of target macros is helpful because it increases the number 
of target macros that could be converted in an automated manner.

-- 
Joseph S. Myers
joseph@codesourcery.com

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

* Re: [PATCH 10/12] always define EH_RETURN_HANDLER_RTX
  2015-11-09 22:53                 ` Trevor Saunders
@ 2015-11-10 22:02                   ` Bernd Schmidt
  2015-11-11  0:43                     ` Trevor Saunders
  0 siblings, 1 reply; 44+ messages in thread
From: Bernd Schmidt @ 2015-11-10 22:02 UTC (permalink / raw)
  To: Trevor Saunders, Jeff Law; +Cc: tbsaunde+gcc, gcc-patches

On 11/09/2015 11:53 PM, Trevor Saunders wrote:
> I don't really know him, but I don't really disagree with where he wants
> to get to.  However I think we work fairly different ways, and review
> things differently.  When I review patches (mostly for stuff more
> directly related to Mozilla my standards are basically it needs to be an
> improvement, and it needs to not introduce bugs.

What I like to ask for is to not just make mechanical changes, but to 
apply a bit of thought while doing so. Often something better can be 
done with the same amount of effort (e.g. if one notices that the 
X_POINTER_IS_Y_POINTER macros are pointless). Such small oddities in the 
code add up over time, and it is better to eliminate them when making a 
change anyway.

>  So I find the it might
> improve things, but it doesn't  also accomplish X to berather odd, and
> hard to work with if I think getting directly to X might be hard.

In cases where getting to X is hard I'd agree, and the 
EH_RETURN_HANDLER_RTX thing isn't the best example since it's defined by 
many ports. What disappointed me in the previous patch series were cases 
like INITIAL_FRAME_ADDRESS_RTX which is used by only one port. In such a 
case I don't think it's unreasonable to point out that we actually want 
to get rid of these macros rather than going through an intermediate stage.

Since EH_RETURN_HANDLER_RTX is a slightly different case, and Joseph 
said he sees value in the patch, it is OK.


Bernd

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

* Re: [PATCH 10/12] always define EH_RETURN_HANDLER_RTX
  2015-11-10 22:02                   ` Bernd Schmidt
@ 2015-11-11  0:43                     ` Trevor Saunders
  0 siblings, 0 replies; 44+ messages in thread
From: Trevor Saunders @ 2015-11-11  0:43 UTC (permalink / raw)
  To: Bernd Schmidt; +Cc: Jeff Law, tbsaunde+gcc, gcc-patches

On Tue, Nov 10, 2015 at 11:02:04PM +0100, Bernd Schmidt wrote:
> On 11/09/2015 11:53 PM, Trevor Saunders wrote:
> >I don't really know him, but I don't really disagree with where he wants
> >to get to.  However I think we work fairly different ways, and review
> >things differently.  When I review patches (mostly for stuff more
> >directly related to Mozilla my standards are basically it needs to be an
> >improvement, and it needs to not introduce bugs.
> 
> What I like to ask for is to not just make mechanical changes, but to apply
> a bit of thought while doing so. Often something better can be done with the
> same amount of effort (e.g. if one notices that the X_POINTER_IS_Y_POINTER
> macros are pointless). Such small oddities in the code add up over time, and
> it is better to eliminate them when making a change anyway.

yeah, I kind of have mixed feelings about that, on one hand its
stuff that really should be cleaned up.  ON the other hand making it non
mechanical makes it more work than it would be as a mechanical
replacement.  I guess it depends how much you value computer time
testing vs human time thinking or something.  Also "that seems fine, but
I see we could clean up X" seems nicer to me than "there's
nothing wrong with this, but you might as well do X while your there",
but maybe that's just habbit or something silly.

> > So I find the it might
> >improve things, but it doesn't  also accomplish X to berather odd, and
> >hard to work with if I think getting directly to X might be hard.
> 
> In cases where getting to X is hard I'd agree, and the EH_RETURN_HANDLER_RTX
> thing isn't the best example since it's defined by many ports. What
> disappointed me in the previous patch series were cases like
> INITIAL_FRAME_ADDRESS_RTX which is used by only one port. In such a case I
> don't think it's unreasonable to point out that we actually want to get rid
> of these macros rather than going through an intermediate stage.
> 
> Since EH_RETURN_HANDLER_RTX is a slightly different case, and Joseph said he
> sees value in the patch, it is OK.

Well, I guess if you believe Joseph is right about automating
conversion from macros to hooks there's an argument to be made that the
intermediate stage is just fine even for macros with one definition,
because it'll just be two totally mechanical steps.  I'm not totally
convinced it'll be easy to automate, but even if its a human making the
work mechanical in my mind makes it easier.  On the other hand for
something like BIGGEST_FIELD_ALIGNMENT and ADJUST_FIELD_ALIGN it seems
worth while to take a look at merging those into one hook (of course
after the libojbc stuff is sorted).

Trev

> 
> 
> Bernd

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

* Re: [PATCH 12/12] always define ENABLE_OFFLOADING
  2015-11-09 18:41   ` Bernd Schmidt
@ 2015-11-23 16:53     ` Ilya Verbin
  2015-11-24 12:51       ` Bernd Schmidt
  2015-11-24 18:14       ` Thomas Schwinge
  0 siblings, 2 replies; 44+ messages in thread
From: Ilya Verbin @ 2015-11-23 16:53 UTC (permalink / raw)
  To: Bernd Schmidt, James Norris; +Cc: tbsaunde+gcc, gcc-patches

On Mon, Nov 09, 2015 at 19:41:21 +0100, Bernd Schmidt wrote:
> On 11/09/2015 05:47 PM, tbsaunde+gcc@tbsaunde.org wrote:
> >-#ifdef ENABLE_OFFLOADING
> >    /* If the user didn't specify any, default to all configured offload
> >       targets.  */
> >    if (offload_targets == NULL)
> >      handle_foffload_option (OFFLOAD_TARGETS);
> >-#endif
> 
> This one I would keep guarded with an if.
> 
> Otherwise ok modulo stage 1 end.

There are 2 new uses of "#ifdef ENABLE_OFFLOADING" in c_parser_oacc_declare and
cp_parser_oacc_declare.
I don't know how to properly test OpenACC, so here is untested patch.


diff --git a/gcc/c/c-parser.c b/gcc/c/c-parser.c
index 7b10764..1dc0bd5 100644
--- a/gcc/c/c-parser.c
+++ b/gcc/c/c-parser.c
@@ -13473,14 +13473,15 @@ c_parser_oacc_declare (c_parser *parser)
 	      if (node != NULL)
 		{
 		  node->offloadable = 1;
-#ifdef ENABLE_OFFLOADING
-		  g->have_offload = true;
-		  if (is_a <varpool_node *> (node))
+		  if (ENABLE_OFFLOADING)
 		    {
-		      vec_safe_push (offload_vars, decl);
-		      node->force_output = 1;
+		      g->have_offload = true;
+		      if (is_a <varpool_node *> (node))
+			{
+			  vec_safe_push (offload_vars, decl);
+			  node->force_output = 1;
+			}
 		    }
-#endif
 		}
 	    }
 	}
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index 24ed404..a9c0a45 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -34633,14 +34633,15 @@ cp_parser_oacc_declare (cp_parser *parser, cp_token *pragma_tok)
 	      if (node != NULL)
 		{
 		  node->offloadable = 1;
-#ifdef ENABLE_OFFLOADING
-		  g->have_offload = true;
-		  if (is_a <varpool_node *> (node))
+		  if (ENABLE_OFFLOADING)
 		    {
-		      vec_safe_push (offload_vars, decl);
-		      node->force_output = 1;
+		      g->have_offload = true;
+		      if (is_a <varpool_node *> (node))
+			{
+			  vec_safe_push (offload_vars, decl);
+			  node->force_output = 1;
+			}
 		    }
-#endif
 		}
 	    }
 	}

  -- Ilya

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

* Re: [PATCH 12/12] always define ENABLE_OFFLOADING
  2015-11-23 16:53     ` Ilya Verbin
@ 2015-11-24 12:51       ` Bernd Schmidt
  2015-11-24 18:14       ` Thomas Schwinge
  1 sibling, 0 replies; 44+ messages in thread
From: Bernd Schmidt @ 2015-11-24 12:51 UTC (permalink / raw)
  To: Ilya Verbin, James Norris; +Cc: tbsaunde+gcc, gcc-patches, Thomas Schwinge

On 11/23/2015 05:52 PM, Ilya Verbin wrote:
>
> There are 2 new uses of "#ifdef ENABLE_OFFLOADING" in c_parser_oacc_declare and
> cp_parser_oacc_declare.
> I don't know how to properly test OpenACC, so here is untested patch.

It's documented on the Offloading wiki page, but this patch is good 
enough if it passes normal testing.

Cc'ing Thomas for any extra testing/fixes that may be needed.


Bernd

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

* Re: [PATCH 12/12] always define ENABLE_OFFLOADING
  2015-11-23 16:53     ` Ilya Verbin
  2015-11-24 12:51       ` Bernd Schmidt
@ 2015-11-24 18:14       ` Thomas Schwinge
  1 sibling, 0 replies; 44+ messages in thread
From: Thomas Schwinge @ 2015-11-24 18:14 UTC (permalink / raw)
  To: tbsaunde+gcc, Ilya Verbin, Bernd Schmidt, James Norris; +Cc: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 1939 bytes --]

Hi!

On Mon, 23 Nov 2015 19:52:08 +0300, Ilya Verbin <iverbin@gmail.com> wrote:
> There are 2 new uses of "#ifdef ENABLE_OFFLOADING" in c_parser_oacc_declare and
> cp_parser_oacc_declare.
> I don't know how to properly test OpenACC, so here is untested patch.

"make check"?  ;-) (Offloading currently will happen for OpenACC only if
a nvptx offload target has been configured, though.)

Thanks for the patch -- please commit this as an obvious fixup for the
trunk commit transforming ENABLE_OFFLOADING.

> --- a/gcc/c/c-parser.c
> +++ b/gcc/c/c-parser.c
> @@ -13473,14 +13473,15 @@ c_parser_oacc_declare (c_parser *parser)
>  	      if (node != NULL)
>  		{
>  		  node->offloadable = 1;
> -#ifdef ENABLE_OFFLOADING
> -		  g->have_offload = true;
> -		  if (is_a <varpool_node *> (node))
> +		  if (ENABLE_OFFLOADING)
>  		    {
> -		      vec_safe_push (offload_vars, decl);
> -		      node->force_output = 1;
> +		      g->have_offload = true;
> +		      if (is_a <varpool_node *> (node))
> +			{
> +			  vec_safe_push (offload_vars, decl);
> +			  node->force_output = 1;
> +			}
>  		    }
> -#endif
>  		}
>  	    }
>  	}
> diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
> index 24ed404..a9c0a45 100644
> --- a/gcc/cp/parser.c
> +++ b/gcc/cp/parser.c
> @@ -34633,14 +34633,15 @@ cp_parser_oacc_declare (cp_parser *parser, cp_token *pragma_tok)
>  	      if (node != NULL)
>  		{
>  		  node->offloadable = 1;
> -#ifdef ENABLE_OFFLOADING
> -		  g->have_offload = true;
> -		  if (is_a <varpool_node *> (node))
> +		  if (ENABLE_OFFLOADING)
>  		    {
> -		      vec_safe_push (offload_vars, decl);
> -		      node->force_output = 1;
> +		      g->have_offload = true;
> +		      if (is_a <varpool_node *> (node))
> +			{
> +			  vec_safe_push (offload_vars, decl);
> +			  node->force_output = 1;
> +			}
>  		    }
> -#endif
>  		}
>  	    }
>  	}


Grüße
 Thomas

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 472 bytes --]

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

end of thread, other threads:[~2015-11-24 18:08 UTC | newest]

Thread overview: 44+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-09 16:45 [PATCH 00/12] misc conditional compilation work tbsaunde+gcc
2015-11-09 16:45 ` [PATCH 08/12] always define DWARF2_LINENO_DEBUGGING_INFO tbsaunde+gcc
2015-11-09 16:45 ` [PATCH 10/12] always define EH_RETURN_HANDLER_RTX tbsaunde+gcc
2015-11-09 17:42   ` David Malcolm
2015-11-09 18:27   ` Bernd Schmidt
2015-11-09 18:42     ` Jeff Law
2015-11-09 18:50       ` Bernd Schmidt
2015-11-09 18:52       ` Trevor Saunders
2015-11-09 19:38         ` Bernd Schmidt
2015-11-09 19:46           ` Jeff Law
2015-11-09 21:07             ` Mike Stump
2015-11-09 21:30             ` Trevor Saunders
2015-11-09 22:07               ` Jeff Law
2015-11-09 22:53                 ` Trevor Saunders
2015-11-10 22:02                   ` Bernd Schmidt
2015-11-11  0:43                     ` Trevor Saunders
2015-11-10  1:32               ` Joseph Myers
2015-11-09 16:46 ` [PATCH 02/12] remove EXTENDED_SDB_BASIC_TYPES tbsaunde+gcc
2015-11-09 18:49   ` Bernd Schmidt
2015-11-09 16:46 ` [PATCH 03/12] remove conditional compilation of sdb debug info tbsaunde+gcc
2015-11-09 16:46 ` [PATCH 12/12] always define ENABLE_OFFLOADING tbsaunde+gcc
2015-11-09 18:41   ` Bernd Schmidt
2015-11-23 16:53     ` Ilya Verbin
2015-11-24 12:51       ` Bernd Schmidt
2015-11-24 18:14       ` Thomas Schwinge
2015-11-09 16:46 ` [PATCH 06/12] always define DWARF2_DEBUGGING_INFO tbsaunde+gcc
2015-11-09 16:46 ` [PATCH 04/12] always define XCOFF_DEBUGGING_INFO tbsaunde+gcc
2015-11-09 16:46 ` [PATCH 09/12] always define TARGET_PECOFF tbsaunde+gcc
2015-11-09 16:46 ` [PATCH 07/12] always define DBX_DEBUGGING_INFO tbsaunde+gcc
2015-11-09 16:46 ` [PATCH 01/12] reduce conditional compilation for HARD_FRAME_POINTER_IS_ARG_POINTER tbsaunde+gcc
2015-11-09 19:01   ` Bernd Schmidt
2015-11-09 20:58     ` Trevor Saunders
2015-11-09 21:09       ` Bernd Schmidt
2015-11-09 16:46 ` [PATCH 05/12] always define VMS_DEBUGGING_INFO tbsaunde+gcc
2015-11-09 18:34   ` Bernd Schmidt
2015-11-09 18:44     ` Jeff Law
2015-11-09 19:29       ` Trevor Saunders
2015-11-09 19:37         ` Bernd Schmidt
2015-11-09 21:56           ` Trevor Saunders
2015-11-09 16:46 ` [PATCH 11/12] always define HAVE_AS_LEB128 tbsaunde+gcc
2015-11-09 18:42   ` Bernd Schmidt
2015-11-09 21:04     ` Trevor Saunders
2015-11-09 17:57 ` [PATCH 00/12] misc conditional compilation work Jeff Law
2015-11-09 19:01   ` Trevor Saunders

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