This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Patch] Clean-up tree.h declarations


This patch rearranges some declarations line so that the declarations match the comment that indicates the .c file which the functions are defined.
It also adjusts or adds some comments to clarify the .c file indications.
The duplicate strip_float_extensions is removed.


It is tested on i686-pc-linux-gnu with all languages.

Cheers,
Pearly.

2009-05-05 Shujing Zhao <pearly.zhao@oracle.com>

* tree.h (strip_float_extensions): Remove duplicate declaration.
(build_low_bits_mask, debug_fold_checksum, expand_function_end,
expand_function_start, stack_protect_prologue, stack_protect_epilogue,
block_ultimate_origin): Rearrange the declarations line to match the
comment that indicates the .c file which the functions are defined.
(dwarf2out_*, set_decl_rtl): Add comment.
(get_base_address): Adjust comment.
(change_decl_assembler_name, maybe_fold_*, build_addr): Rearrange the
declarations line and add comment.
(is_builtin_name): Add blank after function name, for clarity.


Index: gcc/tree.h
===================================================================
--- gcc/tree.h  (revision 147115)
+++ gcc/tree.h  (working copy)
@@ -4611,7 +4611,6 @@ extern unsigned crc32_string (unsigned,
extern void clean_symbol_name (char *);
extern tree get_file_function_name (const char *);
extern tree get_callee_fndecl (const_tree);
-extern void change_decl_assembler_name (tree, tree);
extern int type_num_arguments (const_tree);
extern bool associative_tree_code (enum tree_code);
extern bool commutative_tree_code (enum tree_code);
@@ -4626,6 +4625,10 @@ extern const char *get_name (tree);
extern bool stdarg_p (tree);
extern bool prototype_p (tree);
extern bool auto_var_in_fn_p (const_tree, const_tree);
+extern tree build_low_bits_mask (tree, unsigned);
+

+/* In cgraph.c */
+extern void change_decl_assembler_name (tree, tree);


/* In gimplify.c */ extern tree unshare_expr (tree); @@ -4686,9 +4689,6 @@ extern void fold_defer_overflow_warnings extern void fold_undefer_overflow_warnings (bool, const_gimple, int); extern void fold_undefer_and_ignore_overflow_warnings (void); extern bool fold_deferring_overflow_warnings_p (void); -extern tree maybe_fold_offset_to_reference (tree, tree, tree); -extern tree maybe_fold_offset_to_address (tree, tree, tree); -extern tree maybe_fold_stmt_addition (tree, tree, tree);

extern tree force_fit_type_double (tree, unsigned HOST_WIDE_INT, HOST_WIDE_INT,
int, bool);
@@ -4751,7 +4751,6 @@ extern tree build_fold_addr_expr_with_ty
extern tree build_fold_indirect_ref (tree);
extern tree fold_indirect_ref (tree);
extern tree constant_boolean_node (int, tree);
-extern tree build_low_bits_mask (tree, unsigned);
extern tree div_if_zero_remainder (enum tree_code, const_tree, const_tree);


extern bool tree_swap_operands_p (const_tree, const_tree, bool);
@@ -4778,6 +4777,7 @@ extern bool tree_expr_nonzero_warnv_p (t
extern bool fold_real_zero_addition_p (const_tree, const_tree, int);
extern tree combine_comparisons (enum tree_code, enum tree_code,
                                enum tree_code, tree, tree, tree);
+extern void debug_fold_checksum (const_tree);

/* Return nonzero if CODE is a tree code that represents a truth value. */
static inline bool
@@ -4805,10 +4805,8 @@ extern bool fold_builtin_next_arg (tree,
extern enum built_in_function builtin_mathfn_code (const_tree);
extern tree build_function_call_expr (tree, tree);
extern tree fold_builtin_call_array (tree, tree, int, tree *);
-extern void debug_fold_checksum (const_tree);
extern tree build_call_expr (tree, int, ...);
extern tree mathfn_built_in (tree, enum built_in_function fn);
-extern tree strip_float_extensions (tree);
extern tree c_strlen (tree, int);
extern tree std_gimplify_va_arg_expr (tree, tree, gimple_seq *, gimple_seq *);
extern tree build_va_arg_indirect_ref (tree);
@@ -4816,7 +4814,7 @@ extern tree build_string_literal (int, c
extern bool validate_arglist (const_tree, ...);
extern rtx builtin_memset_read_str (void *, HOST_WIDE_INT, enum machine_mode);
extern int get_pointer_alignment (tree, unsigned int);
-extern bool is_builtin_name(const char*);
+extern bool is_builtin_name (const char*);
extern int get_object_alignment (tree, unsigned int, unsigned int);
extern tree fold_call_stmt (gimple, bool);
extern tree gimple_fold_builtin_snprintf_chk (gimple, tree, enum built_in_function);
@@ -4847,10 +4845,6 @@ extern tree type_hash_lookup (unsigned i
extern void type_hash_add (unsigned int, tree);
extern int simple_cst_list_equal (const_tree, const_tree);
extern void dump_tree_statistics (void);
-extern void expand_function_end (void);
-extern void expand_function_start (tree);
-extern void stack_protect_prologue (void);
-extern void stack_protect_epilogue (void);
extern void recompute_tree_invariant_for_addr_expr (tree);
extern bool needs_to_live_in_memory (const_tree);
extern tree reconstruct_complex_type (tree, tree);
@@ -4865,7 +4859,6 @@ extern void build_common_builtin_nodes (
extern tree build_nonstandard_integer_type (unsigned HOST_WIDE_INT, int);
extern tree build_range_type (tree, tree, tree);
extern HOST_WIDE_INT int_cst_value (const_tree);
-extern tree build_addr (tree, tree);


extern bool fields_compatible_p (const_tree, const_tree);
extern tree find_compatible_field (tree, tree);
@@ -4876,8 +4869,17 @@ extern tree *tree_block (tree);
extern location_t *block_nonartificial_location (tree);
extern location_t tree_nonartificial_location (tree);

+extern tree block_ultimate_origin (const_tree);
+
+/* In tree-nested.c */
+extern tree build_addr (tree, tree);
+
/* In function.c */
extern void expand_main_function (void);
+extern void expand_function_end (void);
+extern void expand_function_start (tree);
+extern void stack_protect_prologue (void);
+extern void stack_protect_epilogue (void);
extern void init_dummy_function_start (void);
extern void expand_dummy_function_end (void);
extern unsigned int init_function_for_compilation (void);
@@ -4956,7 +4958,6 @@ extern bool gimple_alloca_call_p (const_
extern bool alloca_call_p (const_tree);
extern bool must_pass_in_stack_var_size (enum machine_mode, const_tree);
extern bool must_pass_in_stack_var_size_or_pad (enum machine_mode, const_tree);
-extern tree block_ultimate_origin (const_tree);


/* In attribs.c. */

@@ -5012,6 +5013,7 @@ extern tree tree_overlaps_hard_reg_set (
#endif



+/* In dwarf2out.c */
/* Interface of the DWARF2 unwind info support.  */

/* Generate a new label for the CFI info to refer to.  */
@@ -5071,6 +5073,7 @@ extern tree walk_tree_without_duplicates
#define walk_tree_without_duplicates(a,b,c) \
       walk_tree_without_duplicates_1 (a, b, c, NULL)

+/* In emit-rtl.c */
/* Assign the RTX to declaration.  */

extern void set_decl_rtl (tree, rtx);
@@ -5109,7 +5112,7 @@ extern int tree_node_sizes[];
   restricted to creating gimple expressions.  */
extern bool in_gimple_form;

-/* In tree-gimple.c.  */
+/* In gimple.c.  */
extern tree get_base_address (tree t);

/* In tree-vectorizer.c.  */
@@ -5161,6 +5164,11 @@ struct GTY(()) tree_priority_map {
#define tree_priority_map_hash tree_map_base_hash
#define tree_priority_map_marked_p tree_map_base_marked_p

+/* In tree-ssa-ccp.c */
+extern tree maybe_fold_offset_to_reference (tree, tree, tree);
+extern tree maybe_fold_offset_to_address (tree, tree, tree);
+extern tree maybe_fold_stmt_addition (tree, tree, tree);
+
/* In tree-ssa-address.c.  */
extern tree tree_mem_ref_addr (tree, tree);
extern void copy_mem_ref_info (tree, tree);


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]