Commit bcda12f4 by Steven Bosscher

ggc.h, [...]: Use `rtx' instead of `struct rtx_def *'...

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