ggc.h, [...]: Use `rtx' instead of `struct rtx_def *'...
authorSteven Bosscher <steven@gcc.gnu.org>
Thu, 10 Jul 2003 11:38:18 +0000 (11:38 +0000)
committerSteven Bosscher <steven@gcc.gnu.org>
Thu, 10 Jul 2003 11:38:18 +0000 (11:38 +0000)
2003-07-10  Steven Bosscher  <steven@gcc.gnu.org>

* ggc.h, integrate.h, langhooks.h, real.h, toplev.h:
Use `rtx' instead of `struct rtx_def *', `rtvec' instead of
`struct rtvec_dev *' and `tree' instead of `union tree_node *'
in function prototypes.
* varray.h (const_equiv_data): Likewise for fields.
(varray_data_tag): Likewise.
* output.h: Likewise, and don't forward declare union tree_node.
* emit_rtl.c (const_int_htab_hash): Cast to `rtx' instead of
`struct rtxvec *'.
* print-tree.c (print_node): Likewise.
* reload1.c: Don't redeclare current_function_decl, tree.h is
included in this file.

From-SVN: r69183

gcc/emit-rtl.c
gcc/ggc.h
gcc/integrate.h
gcc/langhooks.h
gcc/output.h
gcc/print-tree.c
gcc/real.h
gcc/reload1.c
gcc/toplev.h
gcc/varray.h

index cb05ea8daadba00fdbebd1a26558216044ad97d4..6a1f7c570927f5aa950b28377c8d87dc2f6ee0fe 100644 (file)
@@ -206,7 +206,7 @@ int split_branch_probability = -1;
 static hashval_t
 const_int_htab_hash (const void *x)
 {
-  return (hashval_t) INTVAL ((struct rtx_def *) x);
+  return (hashval_t) INTVAL ((rtx) x);
 }
 
 /* Returns nonzero if the value represented by X (which is really a
index b1391a80457b26aa960cece0f87b9022d8408d77..2c56a3c525efdab43410565466f31f1c54a05aaa 100644 (file)
--- a/gcc/ggc.h
+++ b/gcc/ggc.h
@@ -197,14 +197,14 @@ extern void *ggc_realloc (void *, size_t);
 extern void *ggc_calloc (size_t, size_t);
 
 #define ggc_alloc_rtx(NSLOTS)                                            \
-  ((struct rtx_def *) ggc_alloc (sizeof (struct rtx_def)                 \
-                                + ((NSLOTS) - 1) * sizeof (rtunion)))
+  ((rtx) ggc_alloc (sizeof (struct rtx_def)                              \
+                   + ((NSLOTS) - 1) * sizeof (rtunion)))
 
 #define ggc_alloc_rtvec(NELT)                                            \
-  ((struct rtvec_def *) ggc_alloc (sizeof (struct rtvec_def)             \
-                                  + ((NELT) - 1) * sizeof (rtx)))
+  ((rtvec) ggc_alloc (sizeof (struct rtvec_def)                                  \
+                     + ((NELT) - 1) * sizeof (rtx)))
 
-#define ggc_alloc_tree(LENGTH) ((union tree_node *) ggc_alloc (LENGTH))
+#define ggc_alloc_tree(LENGTH) ((tree) ggc_alloc (LENGTH))
 
 #define htab_create_ggc(SIZE, HASH, EQ, DEL) \
   htab_create_alloc (SIZE, HASH, EQ, DEL, ggc_calloc, NULL)
index f5fbaabba13bd433a77d1457eef18f8a7377dfb8..94bf2e738d4791b1f50f91240a9a0affbf98135a 100644 (file)
@@ -40,7 +40,7 @@ struct inline_remap
      copy_rtx_and_substitute.  */
   int integrating;
   /* Definition of function be inlined.  */
-  union tree_node *fndecl;
+  tree fndecl;
   /* Place to put insns needed at start of function.  */
   rtx insns_at_start;
   /* Mapping from old BLOCKs to new BLOCKs.  */
@@ -150,14 +150,12 @@ extern void allocate_initial_values (rtx *);
 
 /* Copy a declaration when one function is substituted inline into
    another.  */
-extern union tree_node *copy_decl_for_inlining (union tree_node *,
-                                               union tree_node *,
-                                               union tree_node *);
+extern tree copy_decl_for_inlining (tree, tree, tree);
 
 /* Check whether there's any attribute in a function declaration that
    makes the function uninlinable.  Returns false if it finds any,
    true otherwise.  */
-extern bool function_attribute_inlinable_p (union tree_node *);
+extern bool function_attribute_inlinable_p (tree);
 
 extern void try_constants (rtx, struct inline_remap *);
 
index 0ab10e05cbceded89cc41f80d9a7497b4d40faa5..398ad55c8027323facff290a849b300a5bde554d 100644 (file)
@@ -33,36 +33,31 @@ typedef void (*lang_print_tree_hook) (FILE *, tree, int indent);
 
 struct lang_hooks_for_tree_inlining
 {
-  union tree_node *(*walk_subtrees) (union tree_node **, int *,
-                                    union tree_node *(*)
-                                    (union tree_node **, int *, void *),
-                                    void *, void *);
-  int (*cannot_inline_tree_fn) (union tree_node **);
-  int (*disregard_inline_limits) (union tree_node *);
-  union tree_node *(*add_pending_fn_decls) (void *, union tree_node *);
-  int (*tree_chain_matters_p) (union tree_node *);
-  int (*auto_var_in_fn_p) (union tree_node *, union tree_node *);
-  union tree_node *(*copy_res_decl_for_inlining) (union tree_node *,
-                                                 union tree_node *,
-                                                 union tree_node *,
-                                                 void *, int *, tree);
-  int (*anon_aggr_type_p) (union tree_node *);
-  bool (*var_mod_type_p) (union tree_node *);
-  int (*start_inlining) (union tree_node *);
-  void (*end_inlining) (union tree_node *);
-  union tree_node *(*convert_parm_for_inlining) (union tree_node *,
-                                                union tree_node *,
-                                                union tree_node *);
-  int (*estimate_num_insns) (union tree_node *);
+  tree (*walk_subtrees) (tree *, int *,
+                        tree (*) (tree *, int *, void *),
+                        void *, void *);
+  int (*cannot_inline_tree_fn) (tree *);
+  int (*disregard_inline_limits) (tree);
+  tree (*add_pending_fn_decls) (void *, tree);
+  int (*tree_chain_matters_p) (tree);
+  int (*auto_var_in_fn_p) (tree, tree);
+  tree (*copy_res_decl_for_inlining) (tree, tree, tree,
+                                     void *, int *, tree);
+  int (*anon_aggr_type_p) (tree);
+  bool (*var_mod_type_p) (tree);
+  int (*start_inlining) (tree);
+  void (*end_inlining) (tree);
+  tree (*convert_parm_for_inlining) (tree, tree, tree);
+  int (*estimate_num_insns) (tree);
 };
 
 struct lang_hooks_for_callgraph
 {
   /* Function passed as argument is needed and will be compiled.
      Lower the representation so the calls are explicit.  */
-  void (*lower_function) (union tree_node *);
+  void (*lower_function) (tree);
   /* Produce RTL for function passed as argument.  */
-  void (*expand_function) (union tree_node *);
+  void (*expand_function) (tree);
 };
 
 /* Lang hooks for management of language-specific data or status
index ac24c4b36a67deaf8b99c036a1c93fb2562d4e84..fc674502765c3d3735c1e382dced6890076f1a91 100644 (file)
@@ -422,10 +422,10 @@ extern FILE *rtl_dump_file;
 #endif
 
 /* Nonnull if the insn currently being emitted was a COND_EXEC pattern.  */
-extern struct rtx_def *current_insn_predicate;
+extern rtx current_insn_predicate;
 
 /* Last insn processed by final_scan_insn.  */
-extern struct rtx_def *current_output_insn;
+extern rtx current_output_insn;
 
 /* Nonzero while outputting an `asm' with operands.
    This means that inconsistencies are the user's fault, so don't abort.
@@ -473,25 +473,20 @@ extern unsigned int get_named_section_flags (const char *);
 extern bool set_named_section_flags (const char *, unsigned int);
 extern void named_section_flags (const char *, unsigned int);
 extern bool named_section_first_declaration (const char *);
-
-union tree_node;
-extern unsigned int default_section_type_flags (union tree_node *,
-                                               const char *, int);
-extern unsigned int default_section_type_flags_1 (union tree_node *,
-                                                 const char *, int, int);
+extern unsigned int default_section_type_flags (tree, const char *, int);
+extern unsigned int default_section_type_flags_1 (tree, const char *, int, int);
 
 extern void default_no_named_section (const char *, unsigned int);
 extern void default_elf_asm_named_section (const char *, unsigned int);
 extern void default_coff_asm_named_section (const char *, unsigned int);
 extern void default_pe_asm_named_section (const char *, unsigned int);
 
-extern void default_stabs_asm_out_destructor (struct rtx_def *, int);
-extern void default_named_section_asm_out_destructor (struct rtx_def *, int);
-extern void default_dtor_section_asm_out_destructor (struct rtx_def *, int);
-extern void default_stabs_asm_out_constructor (struct rtx_def *, int);
-extern void default_named_section_asm_out_constructor (struct rtx_def *,
-                                                      int);
-extern void default_ctor_section_asm_out_constructor (struct rtx_def *, int);
+extern void default_stabs_asm_out_destructor (rtx, int);
+extern void default_named_section_asm_out_destructor (rtx, int);
+extern void default_dtor_section_asm_out_destructor (rtx, int);
+extern void default_stabs_asm_out_constructor (rtx, int);
+extern void default_named_section_asm_out_constructor (rtx, int);
+extern void default_ctor_section_asm_out_constructor (rtx, int);
 
 extern void default_select_section (tree, int, unsigned HOST_WIDE_INT);
 extern void default_elf_select_section (tree, int, unsigned HOST_WIDE_INT);
@@ -514,8 +509,8 @@ extern void file_end_indicate_exec_stack (void);
 extern bool default_valid_pointer_mode (enum machine_mode);
 
 /* Emit data for vtable gc for GNU binutils.  */
-extern void assemble_vtable_entry (struct rtx_def *, HOST_WIDE_INT);
-extern void assemble_vtable_inherit (struct rtx_def *, struct rtx_def *);
+extern void assemble_vtable_entry (rtx, HOST_WIDE_INT);
+extern void assemble_vtable_inherit (rtx, rtx);
 
 extern int default_address_cost (rtx);
 
index ebf1a70f8a419b51c82c16c8075f902eea049bd8..6d56d7e62fb89c3b1201bc818c072b40e5e959e3 100644 (file)
@@ -599,7 +599,7 @@ print_node (FILE *file, const char *prefix, tree node, int indent)
              indent_to (file, indent + 4);
              fprintf (file, "rtl %d ", i);
              if (TREE_OPERAND (node, i))
-               print_rtl (file, (struct rtx_def *) TREE_OPERAND (node, i));
+               print_rtl (file, (rtx) TREE_OPERAND (node, i));
              else
                fprintf (file, "(nil)");
              fprintf (file, "\n");
index 2b9a371f73ece13efbac253fc038d331d4f5c507..dbce7bb54f40e4ca6a82009568390e891cc790b2 100644 (file)
@@ -333,7 +333,7 @@ extern REAL_VALUE_TYPE dconsthalf;
 
 /* Function to return a real value (not a tree node)
    from a given integer constant.  */
-REAL_VALUE_TYPE real_value_from_int_cst (union tree_node *, union tree_node *);
+REAL_VALUE_TYPE real_value_from_int_cst (tree, tree);
 
 /* Given a CONST_DOUBLE in FROM, store into TO the value it represents.  */
 #define REAL_VALUE_FROM_CONST_DOUBLE(to, from) \
index fadc6d302814bad8977d31c44e2a210a6798d1f7..2e152de2d28c67396b4a75ec5e2ef2f8b57658ea 100644 (file)
@@ -281,12 +281,6 @@ static char *reload_insn_firstobj;
    examine.  */
 struct insn_chain *reload_insn_chain;
 
-#ifdef TREE_CODE
-extern tree current_function_decl;
-#else
-extern union tree_node *current_function_decl;
-#endif
-
 /* List of all insns needing reloads.  */
 static struct insn_chain *insns_need_reload;
 \f
index e9c7e0dec5584b1ad5d89e54fa296dd199261bcb..a36f9eb16705a04fb85f05597410d6c0eea71612 100644 (file)
@@ -26,19 +26,13 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 #define skip_leading_substring(whole,  part) \
    (strncmp (whole, part, strlen (part)) ? NULL : whole + strlen (part))
 
-extern int toplev_main                 (unsigned int, const char **);
-extern int read_integral_parameter     (const char *, const char *,
-                                        const int);
-extern void strip_off_ending           (char *, int);
-extern const char *trim_filename       (const char *);
-extern void _fatal_insn_not_found      (struct rtx_def *,
-                                        const char *, int,
-                                        const char *)
+extern int toplev_main (unsigned int, const char **);
+extern int read_integral_parameter (const char *, const char *, const int);
+extern void strip_off_ending (char *, int);
+extern const char *trim_filename (const char *);
+extern void _fatal_insn_not_found (rtx, const char *, int, const char *)
      ATTRIBUTE_NORETURN;
-extern void _fatal_insn                        (const char *,
-                                        struct rtx_def *,
-                                        const char *, int,
-                                        const char *)
+extern void _fatal_insn (const char *, rtx, const char *, int, const char *)
      ATTRIBUTE_NORETURN;
 
 #define fatal_insn(msgid, insn) \
@@ -59,35 +53,29 @@ extern void _fatal_insn                     (const char *,
 #else
 #define ATTRIBUTE_GCC_DIAG(m, n) ATTRIBUTE_NONNULL(m)
 #endif
-extern void internal_error             (const char *, ...) ATTRIBUTE_GCC_DIAG(1,2)
+extern void internal_error (const char *, ...) ATTRIBUTE_GCC_DIAG(1,2)
      ATTRIBUTE_NORETURN;
-extern void warning                    (const char *, ...) ATTRIBUTE_GCC_DIAG(1,2);
-extern void error                      (const char *, ...) ATTRIBUTE_GCC_DIAG(1,2);
-extern void fatal_error                        (const char *, ...) ATTRIBUTE_GCC_DIAG(1,2)
+extern void warning (const char *, ...) ATTRIBUTE_GCC_DIAG(1,2);
+extern void error (const char *, ...) ATTRIBUTE_GCC_DIAG(1,2);
+extern void fatal_error (const char *, ...) ATTRIBUTE_GCC_DIAG(1,2)
      ATTRIBUTE_NORETURN;
-extern void pedwarn                    (const char *, ...) ATTRIBUTE_GCC_DIAG(1,2);
-extern void sorry                      (const char *, ...) ATTRIBUTE_GCC_DIAG(1,2);
-extern void inform                      (const char *, ...) ATTRIBUTE_GCC_DIAG(1,2);
-
-extern void rest_of_decl_compilation   (union tree_node *,
-                                        const char *, int, int);
-extern void rest_of_type_compilation   (union tree_node *, int);
-extern void rest_of_compilation                (union tree_node *);
-
-extern void pedwarn_with_decl          (union tree_node *,
-                                        const char *, ...);
-extern void warning_with_decl          (union tree_node *,
-                                        const char *, ...);
-extern void error_with_decl            (union tree_node *,
-                                        const char *, ...);
-
-extern void announce_function          (union tree_node *);
-
-extern void error_for_asm              (struct rtx_def *,
-                                        const char *, ...) ATTRIBUTE_GCC_DIAG(2,3);
-extern void warning_for_asm            (struct rtx_def *,
-                                        const char *, ...) ATTRIBUTE_GCC_DIAG(2,3);
-extern void warn_deprecated_use                (union tree_node *);
+extern void pedwarn (const char *, ...) ATTRIBUTE_GCC_DIAG(1,2);
+extern void sorry (const char *, ...) ATTRIBUTE_GCC_DIAG(1,2);
+extern void inform (const char *, ...) ATTRIBUTE_GCC_DIAG(1,2);
+
+extern void rest_of_decl_compilation (tree, const char *, int, int);
+extern void rest_of_type_compilation (tree, int);
+extern void rest_of_compilation (tree);
+
+extern void pedwarn_with_decl (tree, const char *, ...);
+extern void warning_with_decl (tree, const char *, ...);
+extern void error_with_decl (tree, const char *, ...);
+
+extern void announce_function (tree);
+
+extern void error_for_asm (rtx, const char *, ...) ATTRIBUTE_GCC_DIAG(2,3);
+extern void warning_for_asm (rtx, const char *, ...) ATTRIBUTE_GCC_DIAG(2,3);
+extern void warn_deprecated_use (tree);
 
 #ifdef BUFSIZ
 extern void output_quoted_string       (FILE *, const char *);
@@ -101,8 +89,8 @@ extern void fnotice                  (FILE *, const char *, ...)
      ATTRIBUTE_PRINTF_2;
 #endif
 
-extern int wrapup_global_declarations   (union tree_node **, int);
-extern void check_global_declarations   (union tree_node **, int);
+extern int wrapup_global_declarations (tree *, int);
+extern void check_global_declarations (tree *, int);
 
 /* A unique local time stamp, might be zero if none is available.  */
 extern unsigned local_tick;
index ef5c6eef032f938c8fbe9f1173a4e9f143b62d5d..7cb9ff09855c6c16a736e4f5864132789fae4b93 100644 (file)
@@ -50,7 +50,7 @@ struct const_equiv_data GTY(()) {
      pseudos that contain pointers into the replacement area allocated for
      this inline instance.  These pseudos are then marked as being equivalent
      to the appropriate address and substituted if valid.  */
-  struct rtx_def *rtx;
+  rtx rtx;
 
   /* Record the valid age for each entry.  The entry is invalid if its
      age is less than const_age.  */
@@ -110,11 +110,11 @@ typedef union varray_data_tag GTY (()) {
                                tag ("VARRAY_DATA_GENERIC")))   generic[1];
   char                  *GTY ((length ("%0.num_elements"),
                                tag ("VARRAY_DATA_CPTR")))      cptr[1];
-  struct rtx_def        *GTY ((length ("%0.num_elements"),
+  rtx                    GTY ((length ("%0.num_elements"),
                                tag ("VARRAY_DATA_RTX")))       rtx[1];
-  struct rtvec_def      *GTY ((length ("%0.num_elements"),
+  rtvec                          GTY ((length ("%0.num_elements"),
                                tag ("VARRAY_DATA_RTVEC")))     rtvec[1];
-  union tree_node       *GTY ((length ("%0.num_elements"),
+  tree                   GTY ((length ("%0.num_elements"),
                                tag ("VARRAY_DATA_TREE")))      tree[1];
   struct bitmap_head_def *GTY ((length ("%0.num_elements"),
                                tag ("VARRAY_DATA_BITMAP")))    bitmap[1];