mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-09 02:46:44 +08:00
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
This commit is contained in:
parent
3dbb446ebd
commit
bcda12f4f4
@ -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
|
||||
|
10
gcc/ggc.h
10
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)
|
||||
|
@ -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 *);
|
||||
|
||||
|
@ -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
|
||||
|
29
gcc/output.h
29
gcc/output.h
@ -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);
|
||||
|
||||
|
@ -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");
|
||||
|
@ -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) \
|
||||
|
@ -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;
|
||||
|
||||
|
62
gcc/toplev.h
62
gcc/toplev.h
@ -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 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 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 (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 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 (union tree_node *);
|
||||
extern void announce_function (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 *);
|
||||
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;
|
||||
|
@ -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];
|
||||
|
Loading…
Reference in New Issue
Block a user