varasm.c (output_constant_def): Do not consult CONSTANT_AFTER_FUNCTION_P.
authorZack Weinberg <zack@gcc.gnu.org>
Tue, 15 Apr 2003 20:57:12 +0000 (20:57 +0000)
committerZack Weinberg <zack@gcc.gnu.org>
Tue, 15 Apr 2003 20:57:12 +0000 (20:57 +0000)
* varasm.c (output_constant_def): Do not consult
CONSTANT_AFTER_FUNCTION_P.  Remove all code predicated on it.
(after_function_constants, output_after_function_constants): Delete.
* doc/tm.texi: Delete documentation of CONSTANT_AFTER_FUNCTION_P.
* config/mips/mips-protos.h, config/mips/mips.c
(mips16_constant_after_function_p): Delete.
* config/mips/mips.h: Delete #if-0-ed definition of
CONSTANT_AFTER_FUNCTION_P.
* config/d30v/d30v.h, config/stormy16/stormy16.h: Remove
mention of CONSTANT_AFTER_FUNCTION_P in comment.

From-SVN: r65663

gcc/ChangeLog
gcc/config/d30v/d30v.h
gcc/config/mips/mips-protos.h
gcc/config/mips/mips.c
gcc/config/mips/mips.h
gcc/config/stormy16/stormy16.h
gcc/doc/tm.texi
gcc/varasm.c

index 67ef69e3656603504a8aeac92094f407d31103f3..f444a970d2503c4332f2c14caeca9032331f0d2a 100644 (file)
@@ -1,3 +1,16 @@
+2003-04-15  Zack Weinberg  <zack@codesourcery.com>
+
+       * varasm.c (output_constant_def): Do not consult
+       CONSTANT_AFTER_FUNCTION_P.  Remove all code predicated on it.
+       (after_function_constants, output_after_function_constants): Delete.
+       * doc/tm.texi: Delete documentation of CONSTANT_AFTER_FUNCTION_P.
+       * config/mips/mips-protos.h, config/mips/mips.c
+       (mips16_constant_after_function_p): Delete.
+       * config/mips/mips.h: Delete #if-0-ed definition of
+       CONSTANT_AFTER_FUNCTION_P.
+       * config/d30v/d30v.h, config/stormy16/stormy16.h: Remove
+       mention of CONSTANT_AFTER_FUNCTION_P in comment.
+
 2003-04-15  Geoffrey Keating  <geoffk@apple.com>
 
        * tree.c (next_decl_uid): Mark with GTY.
@@ -28,7 +41,7 @@
 2003-04-14  Jason Merrill  <jason@redhat.com>
 
        PR middle-end/10336, c++/10401
-       * jump.c (never_reached_warning): Also stop looking if we reach the 
+       * jump.c (never_reached_warning): Also stop looking if we reach the
        beginning of the function.
 
 2003-04-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
        (dbxout_type): Replace extracted code by call to
        print_int_cst_bounds_in_octal_p.
 
-        * dwarf2out.c (gen_compile_unit_die): Emit DW_LANG_Ada95 instead
-        of DW_LANG_Ada83 for Ada units.
+       * dwarf2out.c (gen_compile_unit_die): Emit DW_LANG_Ada95 instead
+       of DW_LANG_Ada83 for Ada units.
 
 2003-04-14  Olivier Hainque <hainque@act-europe.fr>
 
        hard regs to pseudos live across abnormal edges, as later passes are
        not ready to handle them.
 
-        * fold-const.c (fold): Reorder tests for conditional expressions.
+       * fold-const.c (fold): Reorder tests for conditional expressions.
+
+       * expr.c (highest_pow2_factor): Return unsigned.
+       * expr.h (offset_address): Likewise.
+       * emit-rtl.c (offset_address): POW2 argument now unsigned.
 
-        * expr.c (highest_pow2_factor): Return unsigned.
-        * expr.h (offset_address): Likewise.
-        * emit-rtl.c (offset_address): POW2 argument now unsigned.
-        
 2003-04-14  Roger Sayle  <roger@eyesopen.com>
 
        * builtins.c (expand_builtin_strlen):  Evaluate the lengths of
@@ -225,7 +238,7 @@ Mon Apr 14 16:18:37 CEST 2003  Jan Hubicka  <jh@suse.cz>
        config/rs6000/rs64.md, config/rs6000/rtems.h, config/rs6000/spe.h,
        config/rs6000/spe.md, config/rs6000/sysv4.h,
        config/rs6000/sysv4le.h, config/rs6000/vxworks.h,
-       config/rs6000/windiss.h, config/rs6000/xcoff.h: Likewise.       
+       config/rs6000/windiss.h, config/rs6000/xcoff.h: Likewise.
 
 2003-04-13  Nick Clifton  <nickc@redhat.com>
 
index 313842976434676cd064a26149ce45dbb7853040..d6a0b42278638c776db57115948df51a9eb694b9 100644 (file)
@@ -2738,12 +2738,6 @@ extern const char *d30v_branch_cost_string;
    You need not define this macro if it would do nothing.  */
 /* #define ASM_OUTPUT_SPECIAL_POOL_ENTRY(FILE, X, MODE, ALIGN, LABELNO, JUMPTO) */
 
-/* Define this macro as a C expression which is nonzero if the constant EXP, of
-   type `tree', should be output after the code for a function.  The compiler
-   will normally output all constants before the function; you need not define
-   this macro if this is OK.  */
-/* #define CONSTANT_AFTER_FUNCTION_P(EXP) */
-
 /* A C statement to output assembler commands to at the end of the constant
    pool for a function.  FUNNAME is a string giving the name of the function.
    Should the return type of the function be required, you can obtain it via
index 75489de623bd102f0e8d18f4d62f98317f2a5204..bec42ffb5888760ba2d56b706d1366015247ee09 100644 (file)
@@ -74,7 +74,6 @@ extern int            mips_setup_incoming_varargs
 extern int             function_arg_pass_by_reference
                                PARAMS ((const CUMULATIVE_ARGS *,
                                         enum machine_mode, tree, int));
-extern int             mips16_constant_after_function_p PARAMS ((tree));
 extern int             mips_output_external PARAMS ((FILE *, tree,
                                                      const char *));
 extern tree            mips_build_va_list PARAMS ((void));
index 6425f2322039892d37b581c7b11bc0dad51d4623..5ef92f03651d194c8de2012dc33cc9041a307828 100644 (file)
@@ -9128,46 +9128,6 @@ mips16_output_gp_offset (file, x)
   output_addr_const (file, x);
 }
 
-/* Return nonzero if a constant should not be output until after the
-   function.  This is true of most string constants, so that we can
-   use a more efficient PC relative reference.  However, a static
-   inline function may never call assemble_function_end to write out
-   the constant pool, so don't try to postpone the constant in that
-   case.
-
-   ??? It's really a bug that a static inline function can put stuff
-   in the constant pool even if the function itself is not output.
-
-   We record which string constants we've seen, so that we know which
-   ones might use the more efficient reference.  */
-
-int
-mips16_constant_after_function_p (x)
-     tree x;
-{
-  if (TREE_CODE (x) == STRING_CST
-      && ! flag_writable_strings
-      && current_function_decl != 0
-      && ! DECL_DEFER_OUTPUT (current_function_decl)
-      && ! (DECL_INLINE (current_function_decl)
-           && ((! TREE_PUBLIC (current_function_decl)
-                && ! TREE_ADDRESSABLE (current_function_decl)
-                && ! flag_keep_inline_functions)
-               || DECL_EXTERNAL (current_function_decl))))
-    {
-      struct string_constant *n;
-
-      n = (struct string_constant *) xmalloc (sizeof *n);
-      n->label = XSTR (XEXP (TREE_CST_RTL (x), 0), 0);
-      n->next = string_constants;
-      string_constants = n;
-
-      return 1;
-    }
-
-  return 0;
-}
-
 /* Validate a constant for the mips16.  This rejects general symbolic
    addresses, which must be loaded from memory.  If ADDR is nonzero,
    this should reject anything which is not a legal address.  If
index dcacea341b79d635b16d139bdbf1f0bd04547af0..a52e7b67bcf4b7ab97fdfe4b4d91fa5ad90eb7fd 100644 (file)
@@ -3312,11 +3312,6 @@ typedef struct mips_args {
 #define ASM_OUTPUT_POOL_EPILOGUE(FILE, FNNAME, FNDECL, SIZE)   \
   mips_string_length = 0;
 
-#if 0
-/* In mips16 mode, put most string constants after the function.  */
-#define CONSTANT_AFTER_FUNCTION_P(tree)                                \
-  (TARGET_MIPS16 && mips16_constant_after_function_p (tree))
-#endif
 \f
 /* Specify the machine mode that this machine uses
    for the index in the tablejump instruction.
index da131a4af8e3db656caa2b78b5dbe763bb4383d5..55da1749ab07eb567f2273d6524f3a00a3300568 100644 (file)
@@ -2538,12 +2538,6 @@ do {                                                     \
    You need not define this macro if it would do nothing.  */
 /* #define ASM_OUTPUT_SPECIAL_POOL_ENTRY(FILE, X, MODE, ALIGN, LABELNO, JUMPTO) */
 
-/* Define this macro as a C expression which is nonzero if the constant EXP, of
-   type `tree', should be output after the code for a function.  The compiler
-   will normally output all constants before the function; you need not define
-   this macro if this is OK.  */
-/* #define CONSTANT_AFTER_FUNCTION_P(EXP) */
-
 /* A C statement to output assembler commands to at the end of the constant
    pool for a function.  FUNNAME is a string giving the name of the function.
    Should the return type of the function be required, you can obtain it via
index 84643b549beadd1d230ee9d3c0620d75a0aedc4d..e17d5a167d36be332c2e0a8a2254eb2bbceba23a 100644 (file)
@@ -6386,13 +6386,6 @@ entry from being output a second time in the usual manner.
 
 You need not define this macro if it would do nothing.
 
-@findex CONSTANT_AFTER_FUNCTION_P
-@item CONSTANT_AFTER_FUNCTION_P (@var{exp})
-Define this macro as a C expression which is nonzero if the constant
-@var{exp}, of type @code{tree}, should be output after the code for a
-function.  The compiler will normally output all constants before the
-function; you need not define this macro if this is OK@.
-
 @findex ASM_OUTPUT_POOL_EPILOGUE
 @item ASM_OUTPUT_POOL_EPILOGUE (@var{file} @var{funname} @var{fundecl} @var{size})
 A C statement to output assembler commands to at the end of the constant
index 04df7ae02b48d008403aad95f2a9e04237ede58c..684a824c844d2d51bad6c5197e9bc7785ab41b3a 100644 (file)
@@ -155,7 +155,6 @@ static void mark_constant_pool              PARAMS ((void));
 static void mark_constants             PARAMS ((rtx));
 static int mark_constant               PARAMS ((rtx *current_rtx, void *data));
 static int output_addressed_constants  PARAMS ((tree));
-static void output_after_function_constants PARAMS ((void));
 static unsigned HOST_WIDE_INT array_size_for_constructor PARAMS ((tree));
 static unsigned min_align              PARAMS ((unsigned, unsigned));
 static void output_constructor         PARAMS ((tree, HOST_WIDE_INT,
@@ -1199,9 +1198,6 @@ assemble_end_function (decl, fnname)
       output_constant_pool (fnname, decl);
       function_section (decl); /* need to switch back */
     }
-
-  /* Output any constants which should appear after the function.  */
-  output_after_function_constants ();
 }
 \f
 /* Assemble code to leave SIZE bytes of zeros.  */
@@ -2482,10 +2478,6 @@ struct deferred_constant
 
 static struct deferred_constant *deferred_constants;
 
-/* Another list of constants which should be output after the
-   function.  */
-static struct deferred_constant *after_function_constants;
-
 /* Nonzero means defer output of addressed subconstants
    (i.e., those for which output_constant_def is called.)  */
 static int defer_addressed_constants_flag;
@@ -2521,23 +2513,6 @@ output_deferred_addressed_constants ()
   deferred_constants = 0;
 }
 
-/* Output any constants which should appear after a function.  */
-
-static void
-output_after_function_constants ()
-{
-  struct deferred_constant *p, *next;
-
-  for (p = after_function_constants; p; p = next)
-    {
-      output_constant_def_contents (p->exp, p->reloc, p->labelno);
-      next = p->next;
-      free (p);
-    }
-
-  after_function_constants = 0;
-}
-
 /* Make a copy of the whole tree structure for a constant.  This
    handles the same types of nodes that compare_constant handles.  */
 
@@ -2631,7 +2606,6 @@ output_constant_def (exp, defer)
   char label[256];
   int reloc;
   int found = 1;
-  int after_function = 0;
   int labelno = -1;
   rtx rtl;
 
@@ -2709,15 +2683,9 @@ output_constant_def (exp, defer)
       desc->label = XSTR (XEXP (desc->rtl, 0), 0);
     }
 
-#ifdef CONSTANT_AFTER_FUNCTION_P
-  if (current_function_decl != 0
-      && CONSTANT_AFTER_FUNCTION_P (exp))
-    after_function = 1;
-#endif
-
   if (found
       && STRING_POOL_ADDRESS_P (XEXP (rtl, 0))
-      && (!defer || defer_addressed_constants_flag || after_function))
+      && (!defer || defer_addressed_constants_flag))
     {
       defstr = (struct deferred_string **)
        htab_find_slot_with_hash (const_str_htab, desc->label,
@@ -2737,7 +2705,7 @@ output_constant_def (exp, defer)
      output it (or defer its output for later).  */
   if (! found)
     {
-      if (defer_addressed_constants_flag || after_function)
+      if (defer_addressed_constants_flag)
        {
          struct deferred_constant *p
            = (struct deferred_constant *)
@@ -2746,16 +2714,8 @@ output_constant_def (exp, defer)
          p->exp = desc->value;
          p->reloc = reloc;
          p->labelno = labelno;
-         if (after_function)
-           {
-             p->next = after_function_constants;
-             after_function_constants = p;
-           }
-         else
-           {
-             p->next = deferred_constants;
-             deferred_constants = p;
-           }
+         p->next = deferred_constants;
+         deferred_constants = p;
        }
       else
        {