From 8115f0afdaff380da01d555b0584cd0fceb789b8 Mon Sep 17 00:00:00 2001 From: rguenth Date: Mon, 29 Jun 2009 12:20:39 +0000 Subject: 2009-06-29 Richard Guenther PR middle-end/38212 * alias.c (find_base_decl): Remove. (get_deref_alias_set_1): Remove restrict handling. * c-common.c (c_apply_type_quals_to_decl): Do not set DECL_POINTER_ALIAS_SET. * gimplify.c (find_single_pointer_decl_1): Remove. (find_single_pointer_decl): Likewise. (internal_get_tmp_var): Remove restrict handling. (gimple_regimplify_operands): Likewise. * omp-low.c (expand_omp_atomic_pipeline): Do not set DECL_POINTER_ALIAS_SET. Use ref-all pointers. * print-tree.c (print_node): Do not print DECL_POINTER_ALIAS_SET. * tree.c (restrict_base_for_decl): Remove. (init_ttree): Do not allocate it. (make_node_stat): Do not set DECL_POINTER_ALIAS_SET. Set LABEL_DECL_UID for label decls. (copy_node_stat): Do not copy restrict information. (decl_restrict_base_lookup): Remove. (decl_restrict_base_insert): Likewise. (print_restrict_base_statistics): Likewise. (dump_tree_statistics): Do not call print_restrict_base_statistics. * tree.h (DECL_POINTER_ALIAS_SET): Remove. (DECL_POINTER_ALIAS_SET_KNOWN_P): Likewise. (struct tree_decl_common): Rename pointer_alias_set to label_decl_uid. (LABEL_DECL_UID): Adjust. (DECL_BASED_ON_RESTRICT_P): Remove. (DECL_GET_RESTRICT_BASE): Likewise. (SET_DECL_RESTRICT_BASE): Likewise. (struct tree_decl_with_vis): Remove based_on_restrict_p flag. * config/i386/i386.c (ix86_gimplify_va_arg): Use ref-all pointers instead of DECL_POINTER_ALIAS_SET. * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Likewise. * config/s390/s390.c (s390_gimplify_va_arg): Likewise. * config/spu/spu.c (spu_gimplify_va_arg_expr): Likewise. * gcc.c-torture/execute/pr38212.c: New testcase. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@149047 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 50 ++++++++++++-------------------------------------- 1 file changed, 12 insertions(+), 38 deletions(-) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index 8aabf79cebe..3a748a7fefa 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -2565,16 +2565,6 @@ struct GTY(()) tree_decl_minimal { #define DECL_LANG_FLAG_6(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.lang_flag_6) #define DECL_LANG_FLAG_7(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.lang_flag_7) -/* Used to indicate an alias set for the memory pointed to by this - particular FIELD_DECL, PARM_DECL, or VAR_DECL, which must have - pointer (or reference) type. */ -#define DECL_POINTER_ALIAS_SET(NODE) \ - (DECL_COMMON_CHECK (NODE)->decl_common.pointer_alias_set) - -/* Nonzero if an alias set has been assigned to this declaration. */ -#define DECL_POINTER_ALIAS_SET_KNOWN_P(NODE) \ - (DECL_POINTER_ALIAS_SET (NODE) != - 1) - /* Nonzero for a decl which is at file scope. */ #define DECL_FILE_SCOPE_P(EXP) \ (! DECL_CONTEXT (EXP) \ @@ -2646,7 +2636,7 @@ struct GTY(()) tree_decl_common { /* DECL_ALIGN. It should have the same size as TYPE_ALIGN. */ unsigned int align; - alias_set_type pointer_alias_set; + int label_decl_uid; /* Points to a structure whose details depend on the language in use. */ struct lang_decl *lang_specific; }; @@ -2776,7 +2766,7 @@ struct GTY(()) tree_field_decl { dense, unique within any one function, and may be used to index arrays. If the value is -1, then no UID has been assigned. */ #define LABEL_DECL_UID(NODE) \ - (LABEL_DECL_CHECK (NODE)->decl_common.pointer_alias_set) + (LABEL_DECL_CHECK (NODE)->decl_common.label_decl_uid) /* In LABEL_DECL nodes, nonzero means that an error message about jumping into such a binding contour has been printed for this label. */ @@ -2828,21 +2818,6 @@ struct GTY(()) tree_parm_decl { /* Used to indicate that the DECL is a dllimport. */ #define DECL_DLLIMPORT_P(NODE) (DECL_WITH_VIS_CHECK (NODE)->decl_with_vis.dllimport_flag) -/* DECL_BASED_ON_RESTRICT_P records whether a VAR_DECL is a temporary - based on a variable with a restrict qualified type. If it is, - DECL_RESTRICT_BASE returns the restrict qualified variable on which - it is based. */ - -#define DECL_BASED_ON_RESTRICT_P(NODE) \ - (VAR_DECL_CHECK (NODE)->decl_with_vis.based_on_restrict_p) -#define DECL_GET_RESTRICT_BASE(NODE) \ - (decl_restrict_base_lookup (VAR_DECL_CHECK (NODE))) -#define SET_DECL_RESTRICT_BASE(NODE, VAL) \ - (decl_restrict_base_insert (VAR_DECL_CHECK (NODE), (VAL))) - -extern tree decl_restrict_base_lookup (tree); -extern void decl_restrict_base_insert (tree, tree); - /* Used in a DECL to indicate that, even if it TREE_PUBLIC, it need not be put out unless it is needed in this translation unit. Entities like this are shared across translation units (like weak @@ -2933,28 +2908,27 @@ struct GTY(()) tree_decl_with_vis { tree comdat_group; /* Belong to VAR_DECL exclusively. */ - unsigned defer_output:1; - unsigned hard_register:1; - unsigned thread_local:1; - unsigned common_flag:1; + unsigned defer_output : 1; + unsigned hard_register : 1; + unsigned thread_local : 1; + unsigned common_flag : 1; unsigned in_text_section : 1; unsigned dllimport_flag : 1; - unsigned based_on_restrict_p : 1; /* Used by C++. Might become a generic decl flag. */ unsigned shadowed_for_var_p : 1; - /* Don't belong to VAR_DECL exclusively. */ - unsigned weak_flag:1; + unsigned weak_flag : 1; + unsigned seen_in_bind_expr : 1; unsigned comdat_flag : 1; ENUM_BITFIELD(symbol_visibility) visibility : 2; unsigned visibility_specified : 1; - /* Belong to FUNCTION_DECL exclusively. */ - unsigned init_priority_p:1; - /* Belongs to VAR_DECL exclusively. */ ENUM_BITFIELD(tls_model) tls_model : 3; - /* 14 unused bits. */ + + /* Belong to FUNCTION_DECL exclusively. */ + unsigned init_priority_p : 1; + /* 15 unused bits. */ }; /* In a VAR_DECL that's static, -- cgit v1.2.1 From 4189e6771feda58eeb5859eb78adaeb1ce9729e1 Mon Sep 17 00:00:00 2001 From: ebotcazou Date: Tue, 30 Jun 2009 17:26:32 +0000 Subject: * cgraphunit.c (cgraph_finalize_compilation_unit): Call finalize_size_functions before further processing. * stor-layout.c: Include cgraph.h, tree-inline.h and tree-dump.h. (variable_size): Call self_referential_size on size expressions that contain a PLACEHOLDER_EXPR. (size_functions): New static variable. (copy_self_referential_tree_r): New static function. (self_referential_size): Likewise. (finalize_size_functions): New global function. * tree.c: Include tree-inline.h. (push_without_duplicates): New static function. (find_placeholder_in_expr): New global function. (substitute_in_expr) : Return the replacement object on equality. : Likewise. : If the replacement object is a constant, try to inline the call in the expression. * tree.h (finalize_size_functions): Declare. (find_placeholder_in_expr): Likewise. (FIND_PLACEHOLDER_IN_EXPR): New macro. (substitute_placeholder_in_expr): Update comment. * tree-inline.c (remap_decl): Do not unshare trees if do_not_unshare is true. (copy_tree_body_r): Likewise. (copy_tree_body): New static function. (maybe_inline_call_in_expr): New global function. * tree-inline.h (struct copy_body_data): Add do_not_unshare field. (maybe_inline_call_in_expr): Declare. * Makefile.in (tree.o): Depend on TREE_INLINE_H. (stor-layout.o): Depend on CGRAPH_H, TREE_INLINE_H, TREE_DUMP_H and GIMPLE_H. ada/ * gcc-interface/decl.c: Include tree-inline.h. (annotate_value) : Try to inline the call in the expression. * gcc-interface/utils.c (max_size) : Likewise. * gcc-interface/utils2.c: Include tree-inline. (known_alignment) : Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@149112 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index 3a748a7fefa..e2eb76e8021 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -4216,6 +4216,7 @@ extern tree round_down (tree, int); extern tree get_pending_sizes (void); extern void put_pending_size (tree); extern void put_pending_sizes (tree); +extern void finalize_size_functions (void); /* Type for sizes of data-type. */ @@ -4361,10 +4362,30 @@ extern bool contains_placeholder_p (const_tree); extern bool type_contains_placeholder_p (tree); +/* Given a tree EXP, find all occurences of references to fields + in a PLACEHOLDER_EXPR and place them in vector REFS without + duplicates. Also record VAR_DECLs and CONST_DECLs. Note that + we assume here that EXP contains only arithmetic expressions + or CALL_EXPRs with PLACEHOLDER_EXPRs occurring only in their + argument list. */ + +extern void find_placeholder_in_expr (tree, VEC (tree, heap) **); + +/* This macro calls the above function but short-circuits the common + case of a constant to save time and also checks for NULL. */ + +#define FIND_PLACEHOLDER_IN_EXPR(EXP, V) \ +do { \ + if((EXP) && !TREE_CONSTANT (EXP)) \ + find_placeholder_in_expr (EXP, V); \ +} while (0) + /* Given a tree EXP, a FIELD_DECL F, and a replacement value R, return a tree with all occurrences of references to F in a - PLACEHOLDER_EXPR replaced by R. Note that we assume here that EXP - contains only arithmetic expressions. */ + PLACEHOLDER_EXPR replaced by R. Also handle VAR_DECLs and + CONST_DECLs. Note that we assume here that EXP contains only + arithmetic expressions or CALL_EXPRs with PLACEHOLDER_EXPRs + occurring only in their argument list. */ extern tree substitute_in_expr (tree, tree, tree); -- cgit v1.2.1 From 1cf1742e4834f67465fd29068ec87ac427940a6c Mon Sep 17 00:00:00 2001 From: manu Date: Tue, 7 Jul 2009 21:52:01 +0000 Subject: =?UTF-8?q?2009-07-07=20=20Manuel=20L=C3=B3pez-Ib=C3=A1=C3=B1ez=20?= =?UTF-8?q?=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * tree.c (set_expr_locus): Remove. * tree.h (EXPR_LOCUS,SET_EXPR_LOCUS,set_expr_locus): Remove. * c-typeck.c (c_finish_stmt_expr): Replace EXPR_LOCUS by EXPR_LOCATION. * gimplify.c (internal_get_tmp_var): Likewise. (gimplify_call_expr): Likewise. (gimplify_one_sizepos): Likewise. objc/ * objc-act.c (next_sjlj_build_catch_list): Replace EXPR_LOCUS by EXPR_LOCATION. cp/ * semantics.c (finalize_nrv_r): Replace EXPR_LOCUS by EXPR_LOCATION. ada/ * gcc-interface/trans.c (gnat_gimplify_expr): Replace EXPR_LOCUS by EXPR_LOCATION. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@149350 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 6 ------ 1 file changed, 6 deletions(-) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index e2eb76e8021..cc00c6d31fe 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -1540,10 +1540,6 @@ struct GTY(()) tree_constructor { #define EXPR_LOCATION(NODE) (EXPR_P ((NODE)) ? (NODE)->exp.locus : UNKNOWN_LOCATION) #define SET_EXPR_LOCATION(NODE, LOCUS) EXPR_CHECK ((NODE))->exp.locus = (LOCUS) #define EXPR_HAS_LOCATION(NODE) (EXPR_LOCATION (NODE) != UNKNOWN_LOCATION) -#define EXPR_LOCUS(NODE) (EXPR_P (NODE) \ - ? CONST_CAST (source_location *, &(NODE)->exp.locus) \ - : (source_location *) NULL) -#define SET_EXPR_LOCUS(NODE, FROM) set_expr_locus ((NODE), (FROM)) #define EXPR_FILENAME(NODE) LOCATION_FILE (EXPR_CHECK ((NODE))->exp.locus) #define EXPR_LINENO(NODE) LOCATION_LINE (EXPR_CHECK (NODE)->exp.locus) @@ -4858,8 +4854,6 @@ extern HOST_WIDEST_INT widest_int_cst_value (const_tree); extern bool fields_compatible_p (const_tree, const_tree); extern tree find_compatible_field (tree, tree); -extern void set_expr_locus (tree, source_location *); - extern tree *tree_block (tree); extern location_t *block_nonartificial_location (tree); extern location_t tree_nonartificial_location (tree); -- cgit v1.2.1 From 10230637c08834fadc222f87c2949f9c749d0f80 Mon Sep 17 00:00:00 2001 From: paolo Date: Wed, 8 Jul 2009 11:35:18 +0000 Subject: 2009-07-08 Shujing Zhao * basic-block.h (dump_regset, debug_regset): Remove duplicate prototypes. * c-objc-common.h (c_initialize_diagnostics): Ditto. * ebitmap.h (dump_ebitmap): Ditto. * optabs.h (optab_libfunc): Ditto. * tree.h (tree_expr_nonzero_warnv_p): Ditto. * tree-flow.h (vect_can_force_dr_alignment_p, get_vectype_for_scalar_type): Ditto. (vectorize_loops): Move prototype to ... * tree-vectorizer.h: ... here. Also, adjust comment. (vect_set_verbosity_level): Remove duplicate prototype. * tree-ssa-loop.c: Include tree-vectorizer.h. * Makefile.in (tree-ssa-loop.o): Depend on tree-vectorizer.h. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@149364 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 1 - 1 file changed, 1 deletion(-) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index cc00c6d31fe..2f2a65aedee 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -4749,7 +4749,6 @@ extern bool tree_unary_nonzero_warnv_p (enum tree_code, tree, tree, bool *); extern bool tree_binary_nonzero_warnv_p (enum tree_code, tree, tree, tree op1, bool *); extern bool tree_single_nonzero_warnv_p (tree, bool *); -extern bool tree_expr_nonzero_warnv_p (tree, bool *); extern bool tree_unary_nonnegative_warnv_p (enum tree_code, tree, tree, bool *); extern bool tree_binary_nonnegative_warnv_p (enum tree_code, tree, tree, tree, bool *); -- cgit v1.2.1 From 7abca321b6cf84e08125e8ebc2f56b4b6292d133 Mon Sep 17 00:00:00 2001 From: jason Date: Tue, 14 Jul 2009 18:15:22 +0000 Subject: * builtins.c (can_trust_pointer_alignment): New fn. (get_pointer_alignment): Factor it out from here. * tree.h: Declare it. * cp/call.c (build_over_call): Use it. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@149635 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 1 + 1 file changed, 1 insertion(+) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index 2f2a65aedee..809c6e68ab8 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -4797,6 +4797,7 @@ extern tree build_va_arg_indirect_ref (tree); extern tree build_string_literal (int, const char *); extern bool validate_arglist (const_tree, ...); extern rtx builtin_memset_read_str (void *, HOST_WIDE_INT, enum machine_mode); +extern bool can_trust_pointer_alignment (void); extern int get_pointer_alignment (tree, unsigned int); extern bool is_builtin_name (const char*); extern int get_object_alignment (tree, unsigned int, unsigned int); -- cgit v1.2.1 From 389dd41bd043170e7dc7660304f14a5f16af3562 Mon Sep 17 00:00:00 2001 From: manu Date: Thu, 16 Jul 2009 22:29:52 +0000 Subject: =?UTF-8?q?2009-07-17=20=20Aldy=20Hernandez=20=20=20=09=20=20=20=20Manuel=20L=C3=B3pez-Ib=C3=A1=C3=B1ez=20=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR 40435 * tree-complex.c, tree-loop-distribution.c, tree.c, tree.h, builtins.c, fold-const.c, omp-low.c, cgraphunit.c, tree-ssa-ccp.c, tree-ssa-dom.c, gimple-low.c, expr.c, tree-ssa-ifcombine.c, c-decl.c, stor-layout.c, tree-if-conv.c, c-typeck.c, gimplify.c, calls.c, tree-sra.c, tree-mudflap.c, tree-ssa-copy.c, tree-ssa-forwprop.c, c-convert.c, c-omp.c, varasm.c, tree-inline.c, c-common.c, c-common.h, gimple.c, tree-switch-conversion.c, gimple.h, tree-cfg.c, c-parser.c, convert.c: Add location argument to fold_{unary,binary,ternary}, fold_build[123], build_call_expr, build_size_arg, build_fold_addr_expr, build_call_array, non_lvalue, size_diffop, fold_build1_initializer, fold_build2_initializer, fold_build3_initializer, fold_build_call_array, fold_build_call_array_initializer, fold_single_bit_test, omit_one_operand, omit_two_operands, invert_truthvalue, fold_truth_not_expr, build_fold_indirect_ref, fold_indirect_ref, combine_comparisons, fold_builtin_*, fold_call_expr, build_range_check, maybe_fold_offset_to_address, round_up, round_down. objc/ * objc-act.c: Add location argument to all calls to build_fold_addr_expr. testsuite/ * gcc.dg/pr36902.c: Add column info. * g++.dg/gcov/gcov-2.C: Change count for definition. cp/ * typeck.c, init.c, class.c, method.c, rtti.c, except.c, error.c, tree.c, cp-gimplify.c, cxx-pretty-print.c, pt.c, semantics.c, call.c, cvt.c, mangle.c: Add location argument to fold_{unary,binary,ternary}, fold_build[123], build_call_expr, build_size_arg, build_fold_addr_expr, build_call_array, non_lvalue, size_diffop, fold_build1_initializer, fold_build2_initializer, fold_build3_initializer, fold_build_call_array, fold_build_call_array_initializer, fold_single_bit_test, omit_one_operand, omit_two_operands, invert_truthvalue, fold_truth_not_expr, build_fold_indirect_ref, fold_indirect_ref, combine_comparisons, fold_builtin_*, fold_call_expr, build_range_check, maybe_fold_offset_to_address, round_up, round_down. fortran/ * trans-expr.c, trans-array.c, trans-openmp.c, trans-stmt.c, trans.c, trans-io.c, trans-decl.c, trans-intrinsic.c: Add location argument to fold_{unary,binary,ternary}, fold_build[123], build_call_expr, build_size_arg, build_fold_addr_expr, build_call_array, non_lvalue, size_diffop, fold_build1_initializer, fold_build2_initializer, fold_build3_initializer, fold_build_call_array, fold_build_call_array_initializer, fold_single_bit_test, omit_one_operand, omit_two_operands, invert_truthvalue, fold_truth_not_expr, build_fold_indirect_ref, fold_indirect_ref, combine_comparisons, fold_builtin_*, fold_call_expr, build_range_check, maybe_fold_offset_to_address, round_up, round_down. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@149722 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 141 +++++++++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 96 insertions(+), 45 deletions(-) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index 809c6e68ab8..fbae2080c04 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -3838,7 +3838,9 @@ extern tree build_vl_exp_stat (enum tree_code, int MEM_STAT_DECL); extern tree build_call_list (tree, tree, tree); extern tree build_call_nary (tree, tree, int, ...); extern tree build_call_valist (tree, tree, int, va_list); -extern tree build_call_array (tree, tree, int, const tree *); +#define build_call_array(T1,T2,N,T3)\ + build_call_array_loc (UNKNOWN_LOCATION, T1, T2, N, T3) +extern tree build_call_array_loc (location_t, tree, tree, int, const tree *); extern tree build_call_vec (tree, tree, VEC(tree,gc) *); /* Construct various nodes representing data types. */ @@ -4166,7 +4168,8 @@ extern enum machine_mode mode_for_size_tree (const_tree, enum mode_class, int); /* Return an expr equal to X but certainly not valid as an lvalue. */ -extern tree non_lvalue (tree); +#define non_lvalue(T) non_lvalue_loc (UNKNOWN_LOCATION, T) +extern tree non_lvalue_loc (location_t, tree); extern tree convert (tree, tree); extern unsigned int expr_align (const_tree); @@ -4199,16 +4202,22 @@ extern GTY(()) tree sizetype_tab[(int) TYPE_KIND_LAST]; #define sbitsizetype sizetype_tab[(int) SBITSIZETYPE] extern tree size_int_kind (HOST_WIDE_INT, enum size_type_kind); -extern tree size_binop (enum tree_code, tree, tree); -extern tree size_diffop (tree, tree); +#define size_binop(CODE,T1,T2)\ + size_binop_loc (UNKNOWN_LOCATION, CODE, T1, T2) +extern tree size_binop_loc (location_t, enum tree_code, tree, tree); +#define size_diffop(T1,T2)\ + size_diffop_loc (UNKNOWN_LOCATION, T1, T2) +extern tree size_diffop_loc (location_t, tree, tree); #define size_int(L) size_int_kind (L, SIZETYPE) #define ssize_int(L) size_int_kind (L, SSIZETYPE) #define bitsize_int(L) size_int_kind (L, BITSIZETYPE) #define sbitsize_int(L) size_int_kind (L, SBITSIZETYPE) -extern tree round_up (tree, int); -extern tree round_down (tree, int); +#define round_up(T,N) round_up_loc (UNKNOWN_LOCATION, T, N) +extern tree round_up_loc (location_t, tree, int); +#define round_down(T,N) round_down_loc (UNKNOWN_LOCATION, T, N) +extern tree round_down_loc (location_t, tree, int); extern tree get_pending_sizes (void); extern void put_pending_size (tree); extern void put_pending_sizes (tree); @@ -4649,27 +4658,53 @@ extern tree native_interpret_expr (tree, const unsigned char *, int); subexpressions are not changed. */ extern tree fold (tree); -extern tree fold_unary (enum tree_code, tree, tree); -extern tree fold_unary_ignore_overflow (enum tree_code, tree, tree); -extern tree fold_binary (enum tree_code, tree, tree, tree); -extern tree fold_ternary (enum tree_code, tree, tree, tree, tree); -extern tree fold_build1_stat (enum tree_code, tree, tree MEM_STAT_DECL); -#define fold_build1(c,t1,t2) fold_build1_stat (c, t1, t2 MEM_STAT_INFO) -extern tree fold_build2_stat (enum tree_code, tree, tree, tree MEM_STAT_DECL); -#define fold_build2(c,t1,t2,t3) fold_build2_stat (c, t1, t2, t3 MEM_STAT_INFO) -extern tree fold_build3_stat (enum tree_code, tree, tree, tree, tree MEM_STAT_DECL); -#define fold_build3(c,t1,t2,t3,t4) fold_build3_stat (c, t1, t2, t3, t4 MEM_STAT_INFO) -extern tree fold_build1_initializer (enum tree_code, tree, tree); -extern tree fold_build2_initializer (enum tree_code, tree, tree, tree); -extern tree fold_build3_initializer (enum tree_code, tree, tree, tree, tree); -extern tree fold_build_call_array (tree, tree, int, tree *); -extern tree fold_build_call_array_initializer (tree, tree, int, tree *); +#define fold_unary(CODE,T1,T2)\ + fold_unary_loc (UNKNOWN_LOCATION, CODE, T1, T2) +extern tree fold_unary_loc (location_t, enum tree_code, tree, tree); +#define fold_unary_ignore_overflow(CODE,T1,T2)\ + fold_unary_ignore_overflow_loc (UNKNOWN_LOCATION, CODE, T1, T2) +extern tree fold_unary_ignore_overflow_loc (location_t, enum tree_code, tree, tree); +#define fold_binary(CODE,T1,T2,T3)\ + fold_binary_loc (UNKNOWN_LOCATION, CODE, T1, T2, T3) +extern tree fold_binary_loc (location_t, enum tree_code, tree, tree, tree); +#define fold_ternary(CODE,T1,T2,T3,T4)\ + fold_ternary_loc (UNKNOWN_LOCATION, CODE, T1, T2, T3, T4) +extern tree fold_ternary_loc (location_t, enum tree_code, tree, tree, tree, tree); +#define fold_build1(c,t1,t2)\ + fold_build1_stat_loc (UNKNOWN_LOCATION, c, t1, t2 MEM_STAT_INFO) +#define fold_build1_loc(l,c,t1,t2)\ + fold_build1_stat_loc (l, c, t1, t2 MEM_STAT_INFO) +extern tree fold_build1_stat_loc (location_t, enum tree_code, tree, + tree MEM_STAT_DECL); +#define fold_build2(c,t1,t2,t3)\ + fold_build2_stat_loc (UNKNOWN_LOCATION, c, t1, t2, t3 MEM_STAT_INFO) +#define fold_build2_loc(l,c,t1,t2,t3)\ + fold_build2_stat_loc (l, c, t1, t2, t3 MEM_STAT_INFO) +extern tree fold_build2_stat_loc (location_t, enum tree_code, tree, tree, + tree MEM_STAT_DECL); +#define fold_build3(c,t1,t2,t3,t4)\ + fold_build3_stat_loc (UNKNOWN_LOCATION, c, t1, t2, t3, t4 MEM_STAT_INFO) +#define fold_build3_loc(l,c,t1,t2,t3,t4)\ + fold_build3_stat_loc (l, c, t1, t2, t3, t4 MEM_STAT_INFO) +extern tree fold_build3_stat_loc (location_t, enum tree_code, tree, tree, tree, + tree MEM_STAT_DECL); +extern tree fold_build1_initializer_loc (location_t, enum tree_code, tree, tree); +extern tree fold_build2_initializer_loc (location_t, enum tree_code, tree, tree, tree); +extern tree fold_build3_initializer_loc (location_t, enum tree_code, tree, tree, tree, tree); +#define fold_build_call_array(T1,T2,N,T4)\ + fold_build_call_array_loc (UNKNOWN_LOCATION, T1, T2, N, T4) +extern tree fold_build_call_array_loc (location_t, tree, tree, int, tree *); +#define fold_build_call_array_initializer(T1,T2,N,T4)\ + fold_build_call_array_initializer_loc (UNKNOWN_LOCATION, T1, T2, N, T4) +extern tree fold_build_call_array_initializer_loc (location_t, tree, tree, int, tree *); extern bool fold_convertible_p (const_tree, const_tree); -extern tree fold_convert (tree, tree); -extern tree fold_single_bit_test (enum tree_code, tree, tree, tree); +#define fold_convert(T1,T2)\ + fold_convert_loc(UNKNOWN_LOCATION, T1, T2) +extern tree fold_convert_loc (location_t, tree, tree); +extern tree fold_single_bit_test (location_t, enum tree_code, tree, tree, tree); extern tree fold_ignored_result (tree); extern tree fold_abs_const (tree, tree); -extern tree fold_indirect_ref_1 (tree, tree); +extern tree fold_indirect_ref_1 (location_t, tree, tree); extern void fold_defer_overflow_warnings (void); extern void fold_undefer_overflow_warnings (bool, const_gimple, int); extern void fold_undefer_and_ignore_overflow_warnings (void); @@ -4721,20 +4756,34 @@ enum operand_equal_flag extern int operand_equal_p (const_tree, const_tree, unsigned int); extern int multiple_of_p (tree, const_tree, const_tree); -extern tree omit_one_operand (tree, tree, tree); -extern tree omit_two_operands (tree, tree, tree, tree); -extern tree invert_truthvalue (tree); -extern tree fold_truth_not_expr (tree); +#define omit_one_operand(T1,T2,T3)\ + omit_one_operand_loc (UNKNOWN_LOCATION, T1, T2, T3) +extern tree omit_one_operand_loc (location_t, tree, tree, tree); +#define omit_two_operands(T1,T2,T3,T4)\ + omit_two_operands_loc (UNKNOWN_LOCATION, T1, T2, T3, T4) +extern tree omit_two_operands_loc (location_t, tree, tree, tree, tree); +#define invert_truthvalue(T)\ + invert_truthvalue_loc(UNKNOWN_LOCATION, T) +extern tree invert_truthvalue_loc (location_t, tree); +extern tree fold_truth_not_expr (location_t, tree); extern tree fold_unary_to_constant (enum tree_code, tree, tree); extern tree fold_binary_to_constant (enum tree_code, tree, tree, tree); extern tree fold_read_from_constant_string (tree); extern tree int_const_binop (enum tree_code, const_tree, const_tree, int); -extern tree build_fold_addr_expr (tree); +#define build_fold_addr_expr(T)\ + build_fold_addr_expr_loc (UNKNOWN_LOCATION, (T)) +extern tree build_fold_addr_expr_loc (location_t, tree); +#define build_fold_addr_expr_with_type(T,TYPE)\ + build_fold_addr_expr_with_type_loc (UNKNOWN_LOCATION, (T), TYPE) +extern tree build_fold_addr_expr_with_type_loc (location_t, tree, tree); extern tree fold_build_cleanup_point_expr (tree type, tree expr); extern tree fold_strip_sign_ops (tree); -extern tree build_fold_addr_expr_with_type (tree, tree); -extern tree build_fold_indirect_ref (tree); -extern tree fold_indirect_ref (tree); +#define build_fold_indirect_ref(T)\ + build_fold_indirect_ref_loc (UNKNOWN_LOCATION, T) +extern tree build_fold_indirect_ref_loc (location_t, tree); +#define fold_indirect_ref(T)\ + fold_indirect_ref_loc (UNKNOWN_LOCATION, T) +extern tree fold_indirect_ref_loc (location_t, tree); extern tree constant_boolean_node (int, tree); extern tree div_if_zero_remainder (enum tree_code, const_tree, const_tree); @@ -4759,7 +4808,7 @@ extern bool tree_call_nonnegative_warnv_p (tree, tree, tree, tree, bool *); extern bool tree_expr_nonzero_warnv_p (tree, bool *); extern bool fold_real_zero_addition_p (const_tree, const_tree, int); -extern tree combine_comparisons (enum tree_code, enum tree_code, +extern tree combine_comparisons (location_t, enum tree_code, enum tree_code, enum tree_code, tree, tree, tree); extern void debug_fold_checksum (const_tree); @@ -4775,21 +4824,23 @@ truth_value_p (enum tree_code code) /* In builtins.c */ -extern tree fold_call_expr (tree, bool); -extern tree fold_builtin_fputs (tree, tree, bool, bool, tree); -extern tree fold_builtin_strcpy (tree, tree, tree, tree); -extern tree fold_builtin_strncpy (tree, tree, tree, tree, tree); -extern tree fold_builtin_memory_chk (tree, tree, tree, tree, tree, tree, bool, +extern tree fold_call_expr (location_t, tree, bool); +extern tree fold_builtin_fputs (location_t, tree, tree, bool, bool, tree); +extern tree fold_builtin_strcpy (location_t, tree, tree, tree, tree); +extern tree fold_builtin_strncpy (location_t, tree, tree, tree, tree, tree); +extern tree fold_builtin_memory_chk (location_t, tree, tree, tree, tree, tree, tree, bool, enum built_in_function); -extern tree fold_builtin_stxcpy_chk (tree, tree, tree, tree, tree, bool, +extern tree fold_builtin_stxcpy_chk (location_t, tree, tree, tree, tree, tree, bool, enum built_in_function); -extern tree fold_builtin_strncpy_chk (tree, tree, tree, tree, tree); -extern tree fold_builtin_snprintf_chk (tree, tree, enum built_in_function); +extern tree fold_builtin_strncpy_chk (location_t, tree, tree, tree, tree, tree); +extern tree fold_builtin_snprintf_chk (location_t, tree, tree, enum built_in_function); extern bool fold_builtin_next_arg (tree, bool); 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 tree build_call_expr (tree, int, ...); +extern tree build_function_call_expr (location_t, tree, tree); +extern tree fold_builtin_call_array (location_t, tree, tree, int, tree *); +#define build_call_expr(...)\ + build_call_expr_loc (UNKNOWN_LOCATION, __VA_ARGS__) +extern tree build_call_expr_loc (location_t, tree, int, ...); extern tree mathfn_built_in (tree, enum built_in_function fn); extern tree c_strlen (tree, int); extern tree std_gimplify_va_arg_expr (tree, tree, gimple_seq *, gimple_seq *); @@ -4804,7 +4855,7 @@ 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); extern tree make_range (tree, int *, tree *, tree *, bool *); -extern tree build_range_check (tree, tree, int, tree, tree); +extern tree build_range_check (location_t, tree, tree, int, tree, tree); extern bool merge_ranges (int *, tree *, tree *, int, tree, tree, int, tree, tree); -- cgit v1.2.1 From e0213eccbecb4e864d4a8662597afe5433212c0f Mon Sep 17 00:00:00 2001 From: dj Date: Tue, 28 Jul 2009 21:40:24 +0000 Subject: 2009-07-28 Paolo Bonzini * tree.h (TREE_DEPRECATED): Document it is used for types too. (TYPE_VECTOR_OPAQUE): Use default_def_flag git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@150181 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index fbae2080c04..d972cfe334e 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -577,6 +577,7 @@ struct GTY(()) tree_common { TREE_DEPRECATED in all decls + all types IDENTIFIER_TRANSPARENT_ALIAS in IDENTIFIER_NODE @@ -584,9 +585,6 @@ struct GTY(()) tree_common { STMT_IN_SSA_EDGE_WORKLIST in all expressions (tree-ssa-propagate.c) - TYPE_VECTOR_OPAQUE in - VECTOR_TYPE - visited: TREE_VISITED in @@ -605,6 +603,9 @@ struct GTY(()) tree_common { default_def_flag: + TYPE_VECTOR_OPAQUE in + VECTOR_TYPE + SSA_NAME_IS_DEFAULT_DEF in SSA_NAME */ @@ -2187,7 +2188,7 @@ extern enum machine_mode vector_type_mode (const_tree); /* Nonzero in a VECTOR_TYPE if the frontends should not emit warnings about missing conversions to other vector types of the same size. */ #define TYPE_VECTOR_OPAQUE(NODE) \ - (VECTOR_TYPE_CHECK (NODE)->base.deprecated_flag) + (VECTOR_TYPE_CHECK (NODE)->base.default_def_flag) /* Indicates that objects of this type must be initialized by calling a function when they are created. */ -- cgit v1.2.1 From efbcb6defd4842cee3bc73eec195fe425457ea13 Mon Sep 17 00:00:00 2001 From: amacleod Date: Thu, 30 Jul 2009 18:36:30 +0000 Subject: Add source_location support to PHI arguments. 2009-07-29 Andrew MacLeod PR debug 26475 * tree-into-ssa.c (insert_phi_nodes_for, rewrite_add_phi_arguments): Set location for phi arguments. (rewrite_update_phi_arguments): Find locations for reaching defs. * tree-ssa-threadupdate.c (create_edge_and_update_destination_phis): Add location to add_phi_arg calls. * tree-loop-districbution.c (update_phis_for_loop_copy): Add locations. * tree-ssa-loop-manip.c (create_iv, add_exit_phis_edge, split_loop_exit_edge, tree_transform_and_unroll_loop): Add locations. * tree-tailcall.c (add_successor_phi_arg, eliminate_tail_call, create_tailcall_accumulator, tree_optimize_tail_calls_1): Add locations. * tree.h (struct phi_arg_d): Add location_t to PHI arguments. * tree-phinodes.c (make_phi_node): Initialize location. (resize_phi_node): Initialize location to UNKNOWN_LOCATION. (add_phi_arg): Add location parameter. (remove_phi_arg_num): Move location when moving phi argument. * omp-low.c (expand_parallel_call, expand_omp_for_static_chunk): Set location. * tree-vect-loop-manip.c (slpeel_update_phis_for_duplicate_loop, slpeel_update_phi_nodes_for_guard1, slpeel_update_phi_nodes_for_guard2, slpeel_tree_duplicate_loop_to_edge_cfg, set_prologue_iterations, vect_loop_versioning): Set locations. * tree-parloops.c (create_phi_for_local_result, transform_to_exit_first_loop, create_parallel_loop): Add locations. * gimple-pretty-print.c (dump_gimple_phi): Dump lineno's if present. * tree-vect-loop.c (get_initial_def_for_induction, vect_create_epilog_for_reduction, vect_finalize_reduction): Add locations. * tree-flow-inline.h (gimple_phi_arg_location): New. Return locus. (gimple_phi_arg_location_from_edge): New. Return locus from an edge. (gimple_phi_arg_set_location): New. Set locus. (gimple_phi_arg_has_location): New. Check for locus. (redirect_edge_var_map_location): New. Return locus from var_map. * tree-vect-data-refs.c (vect_setup_realignment): Set location. * tree-ssa-phiopt.c (conditional_replacement): Set locus when combining PHI arguments. (cond_store_replacement): Set location. * cfgexpand.c (gimple_assign_rhs_to_tree): Transfer locus if possible. * grpahite.c (add_loop_exit_phis, add_guard_exit_phis, scop_add_exit_phis_edge): Add locations. * tree-cfgcleanup.c (remove_forwarder_block, remove_forwarder_block_with_phi): Add locations. * tree-ssa-pre.c (insert_into_preds_of_block): Add locations. * tree-predcom.c (initialize_root_vars, initialize_root_vars_lm): Add locations. * tree-ssa-dce.c (forward_edge_to_pdom): Add locations. * tree-ssa.c (redirect_edge_var_map_add, ssa_redirect_edge, flush_pending_stmts): Add source location. * lambda-code.c (perfect_nestify): Maintain location stack with argument stack to preserve locations. * tree-vect-stmts.c (vectorizable_load): Add location. * tree-inline.c (copy_phis_for_bb): Copy locus. (setup_one_parameter): Add call locus to inlined parameter stmts. (initialize_inlined_parameters): Pass in call location as parameter assignment locus. (tree_function_versioning): Pass location to setup_one_parameter. * tree-ssa-phiprop.c (phiprop_insert_phi): Set locations. * tree-outof-ssa.c (struct _elim_graph): Add source_location vecs for copy and edge lists. (insert_partition_copy_on_edge, insert_value_copy_on_edge, insert_rtx_to_part_on_edge, insert_part_to_rtx_on_edge): Provide a locus parameter and override the stmt default if provided. (new_elim_graph, clear_elim_graph, delete_elim_graph, elim_graph_add_edge, elim_graph_remove_succ_edge, FOR_EACH_ELIM_GRAPH_SUCC, FOR_EACH_ELIM_GRAPH_PRED, eliminate_build, elim_forward, elim_unvisited_predecessor, elim_backward, elim_create, eliminate_phi): Add locus info in elimination graph for each edge and value copy. (insert_backedge_copies): Copy locus if present. * tree-flow.h (struct _edge_var_map): Add locus field. * tree-switch_conversions.c (fix_phi_nodes): Add locations. * tree-cfg.c (reinstall_phi_args, gimple_make_forwarder_block, add_phi_args_after_copy_edge, gimple_lv_adjust_loop_header_phi): Add locations. * ipa-struct-reorg.c (make_edge_and_fix_phis_of_dest): Add locations. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@150267 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 1 + 1 file changed, 1 insertion(+) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index d972cfe334e..a1370fa5e55 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -1888,6 +1888,7 @@ struct GTY(()) phi_arg_d { pointer arithmetic with it. See phi_arg_index_from_use. */ struct ssa_use_operand_d imm_use; tree def; + location_t locus; }; -- cgit v1.2.1 From 591f01a88746408467315ee4cc759664f729820e Mon Sep 17 00:00:00 2001 From: rguenth Date: Thu, 6 Aug 2009 11:29:13 +0000 Subject: 2009-08-06 Richard Guenther PR tree-optimization/40964 * tree.c (iterative_hash_host_wide_int): Export. * tree.h (iterative_hash_host_wide_int): Declare. * tree-ssa-structalias.c (heapvar_map): New struct. (heapvar_map_eq): New function. (heapvar_map_hash): Likewise. (heapvar_lookup): Adjust. (heapvar_insert): Likewise. (make_constraint_from_heapvar): Allow multiple heap variables per decl at different offsets. (init_alias_heapvars): Adjust. * gcc.c-torture/compile/pr40964.c: New testcase. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@150517 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 1 + 1 file changed, 1 insertion(+) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index a1370fa5e55..27918309f60 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -4879,6 +4879,7 @@ extern int simple_cst_equal (const_tree, const_tree); extern hashval_t iterative_hash_expr (const_tree, hashval_t); extern hashval_t iterative_hash_exprs_commutative (const_tree, const_tree, hashval_t); +extern hashval_t iterative_hash_host_wide_int (HOST_WIDE_INT, hashval_t); extern hashval_t iterative_hash_hashval_t (hashval_t, hashval_t); extern int compare_tree_int (const_tree, unsigned HOST_WIDE_INT); extern int type_list_equal (const_tree, const_tree); -- cgit v1.2.1 From f639fdbff97b434f0ee9d6d2f03b6c5483efbed2 Mon Sep 17 00:00:00 2001 From: rguenth Date: Tue, 1 Sep 2009 08:38:10 +0000 Subject: 2009-09-01 Richard Guenther * tree-flow.h (mark_addressable): Move declaration ... * tree.h (mark_addressable): ... here. * stmt.c (expand_asm_operands): Use mark_addressable, not lang_hooks.mark_addressable. * langhooks-def.h (LANG_HOOKS_INITIALIZER): Remove LANG_HOOKS_MARK_ADDRESSABLE. * langhooks.h (struct lang_hooks): Remove mark_addressable langhook. * c-objc-common.h (LANG_HOOKS_MARK_ADDRESSABLE): Remove. ada/ * gcc-interface/misc.c (LANG_HOOKS_MARK_ADDRESSABLE): Remove. cp/ * cp-objcp-common.h (LANG_HOOKS_MARK_ADDRESSABLE): Remove. fortran/ * f95-lang.c (gfc_mark_addressable): Remove. (LANG_HOOKS_MARK_ADDRESSABLE): Likewise. java/ * lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Remove. * java-tree.h (java_mark_addressable): Likewise. * typeck.c (java_mark_addressable): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@151260 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 1 + 1 file changed, 1 insertion(+) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index 27918309f60..441612afc71 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -5157,6 +5157,7 @@ extern bool in_gimple_form; /* In gimple.c. */ extern tree get_base_address (tree t); +extern void mark_addressable (tree); /* In tree-vectorizer.c. */ extern void vect_set_verbosity_level (const char *); -- cgit v1.2.1 From 92ddcd9701b4dd0fde3d3c640cdb6a1f49c0f7a2 Mon Sep 17 00:00:00 2001 From: rguenth Date: Tue, 1 Sep 2009 08:41:53 +0000 Subject: 2009-09-01 Richard Guenther * tree.c (tree_expr_size): New function. * tree.h (tree_expr_size): Declare. * rtlanal.c (rtx_addr_can_trap_p_1): Adjust comment. * builtins.c (fold_builtin_memory_op): Use tree_expr_size. * langhooks.c (lhd_expr_size): Remove. * langhooks.h (struct lang_hooks): Remove expr_size. * explow.c (expr_size): Use tree_expr_size. (int_expr_size): Likewise. * langhooks-def.h (lhd_expr_size): Remove. (LANG_HOOKS_EXPR_SIZE): Likewise. (LANG_HOOKS_INITIALIZER): Adjust. cp/ * cp-objcp-common.c (cp_expr_size): Use tree_expr_size. * cp-objcp-common.h (LANG_HOOKS_EXPR_SIZE): Do not define. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@151261 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 1 + 1 file changed, 1 insertion(+) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index 441612afc71..110beb10099 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -4180,6 +4180,7 @@ extern tree expr_last (tree); extern tree size_in_bytes (const_tree); extern HOST_WIDE_INT int_size_in_bytes (const_tree); extern HOST_WIDE_INT max_int_size_in_bytes (const_tree); +extern tree tree_expr_size (const_tree); extern tree bit_position (const_tree); extern HOST_WIDE_INT int_bit_position (const_tree); extern tree byte_position (const_tree); -- cgit v1.2.1 From 9845d1202fec65574ca05d780859eb8c25489566 Mon Sep 17 00:00:00 2001 From: aoliva Date: Wed, 2 Sep 2009 02:42:21 +0000 Subject: gcc/ChangeLog: * doc/invoke.texi (-fvar-tracking-assignments): New. (-fvar-tracking-assignments-toggle): New. (-fdump-final-insns=file): Mark filename as optional. (--param min-nondebug-insn-uid): New. (-gdwarf-@{version}): Mention version 4. * opts.c (common_handle_option): Accept it. * tree-vrp.c (find_assert_locations_1): Skip debug stmts. * regrename.c (regrename_optimize): Drop last. Don't count debug insns as uses. Don't reject change because of debug insn. (do_replace): Reject DEBUG_INSN as chain starter. Take base_regno from the chain starter, and check for inexact matches in DEBUG_INSNS. (scan_rtx_reg): Accept inexact matches in DEBUG_INSNs. (build_def_use): Simplify and fix the marking of DEBUG_INSNs. * sched-ebb.c (schedule_ebbs): Skip boundary debug insns. * fwprop.c (forward_propagate_and_simplify): ...into debug insns. * doc/gimple.texi (is_gimple_debug): New. (gimple_debug_bind_p): New. (is_gimple_call, gimple_assign_cast_p): End sentence with period. * doc/install.texi (bootstrap-debug): More details. (bootstrap-debug-big, bootstrap-debug-lean): Document. (bootstrap-debug-lib): More details. (bootstrap-debug-ckovw): Update. (bootstrap-time): New. * tree-into-ssa.c (mark_def_sites): Skip debug stmts. (insert_phi_nodes_for): Insert debug stmts. (rewrite_stmt): Take iterator. Insert debug stmts. (rewrite_enter_block): Adjust. (maybe_replace_use_in_debug_stmt): New. (rewrite_update_stmt): Use it. (mark_use_interesting): Return early for debug stmts. * tree-ssa-loop-im.c (rewrite_bittest): Propagate DEFs into debug stmts before replacing stmt. (move_computations_stmt): Likewise. * ira-conflicts.c (add_copies): Skip debug insns. * regstat.c (regstat_init_n_sets_and_refs): Discount debug insns. (regstat_bb_compute_ri): Skip debug insns. * tree-ssa-threadupdate.c (redirection_block_p): Skip debug stmts. * tree-ssa-loop-manip.c (find_uses_to_rename_stmt, check_loop_closed_ssa_stmt): Skip debug stmts. * tree-tailcall.c (find_tail_calls): Likewise. * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): Likewise. * tree.h (MAY_HAVE_DEBUG_STMTS): New. (build_var_debug_value_stat): Declare. (build_var_debug_value): Define. (target_for_debug_bind): Declare. * reload.c (find_equiv_reg): Skip debug insns. * rtlanal.c (reg_used_between_p): Skip debug insns. (side_effects_p): Likewise. (canonicalize_condition): Likewise. * ddg.c (create_ddg_dep_from_intra_loop_link): Check that non-debug insns never depend on debug insns. (create_ddg_dep_no_link): Likewise. (add_cross_iteration_register_deps): Use ANTI_DEP for debug insns. Don't add inter-loop dependencies for debug insns. (build_intra_loop_deps): Likewise. (create_ddg): Count debug insns. * ddg.h (struct ddg::num_debug): New. (num_backargs): Pair up with previous int field. * diagnostic.c (diagnostic_report_diagnostic): Skip notes on -fcompare-debug-second. * final.c (get_attr_length_1): Skip debug insns. (rest_of_clean-state): Don't dump CFA_RESTORE_STATE. * gcc.c (invoke_as): Call compare-debug-dump-opt. (driver_self_specs): Map -fdump-final-insns to -fdump-final-insns=.. (get_local_tick): New. (compare_debug_dump_opt_spec_function): Test for . argument and compute output name. Compute temp output spec without flag name. Compute -frandom-seed. (OPT): Undef after use. * cfgloopanal.c (num_loop_insns): Skip debug insns. (average_num_loop_insns): Likewise. * params.h (MIN_NONDEBUG_INSN_UID): New. * gimple.def (GIMPLE_DEBUG): New. * ipa-reference.c (scan_stmt_for_static_refs): Skip debug stmts. * auto-inc-dec.c (merge_in_block): Skip debug insns. (merge_in_block): Fix whitespace. * toplev.c (flag_var_tracking): Update comment. (flag_var_tracking_assignments): New. (flag_var_tracking_assignments_toggle): New. (process_options): Don't open final insns dump file if we're not going to write to it. Compute defaults for var_tracking. * df-scan.c (df_insn_rescan_debug_internal): New. (df_uses_record): Handle debug insns. * haifa-sched.c (ready): Initialize n_debug. (contributes_to_priority): Skip debug insns. (dep_list_size): New. (priority): Use it. (rank_for_schedule): Likewise. Schedule debug insns as soon as they're ready. Disregard previous debug insns to make decisions. (queue_insn): Never queue debug insns. (ready_add, ready_remove_first, ready_remove): Count debug insns. (schedule_insn): Don't reject debug insns because of issue rate. (get_ebb_head_tail, no_real_insns_p): Skip boundary debug insns. (queue_to_ready): Skip and discount debug insns. (choose_ready): Let debug insns through. (schedule_block): Check boundary debug insns. Discount debug insns, schedule them early. Adjust whitespace. (set_priorities): Check for boundary debug insns. (add_jump_dependencies): Use dep_list_size. (prev_non_location_insn): New. (check_cfg): Use it. * tree-ssa-loop-ivopts.c (find-interesting_users): Skip debug stmts. (remove_unused_ivs): Reset debug stmts. * modulo-sched.c (const_iteration_count): Skip debug insns. (res_MII): Discount debug insns. (loop_single_full_bb_p): Skip debug insns. (sms_schedule): Likewise. (sms_schedule_by_order): Likewise. (ps_has_conflicts): Likewise. * caller-save.c (refmarker_fn): New. (save_call_clobbered_regs): Replace regs with saved mem in debug insns. (mark_referenced_regs): Take pointer, mark and arg. Adjust. Call refmarker_fn mark for hardregnos. (mark_reg_as_referenced): New. (replace_reg_with_saved_mem): New. * ipa-pure-const.c (check_stmt): Skip debug stmts. * cse.c (cse_insn): Canonicalize debug insns. Skip them when searching back. (cse_extended_basic_block): Skip debug insns. (count_reg_usage): Likewise. (is_dead_reg): New, split out of... (set_live_p): ... here. (insn_live_p): Use it for debug insns. * tree-stdarg.c (check_all_va_list_escapes): Skip debug stmts. (execute_optimize_stdarg): Likewise. * tree-ssa-dom.c (propagate_rhs_into_lhs): Likewise. * tree-ssa-propagate.c (substitute_and_fold): Don't regard changes in debug stmts as changes. * sel-sched.c (moving_insn_creates_bookkeeping_block_p): New. (moveup_expr): Don't move across debug insns. Don't move debug insn if it would create a bookkeeping block. (moveup_expr_cached): Don't use cache for debug insns that are heads of blocks. (compute_av_set_inside_bb): Skip debug insns. (sel_rank_for_schedule): Schedule debug insns first. Remove dead code. (block_valid_for_bookkeeping_p); Support lax searches. (create_block_for_bookkeeping): Adjust block numbers when encountering debug-only blocks. (find_place_for_bookkeeping): Deal with debug-only blocks. (generate_bookkeeping_insn): Accept no place to insert. (remove_temp_moveop_nops): New argument full_tidying. (prepare_place_to_insert): Deal with debug insns. (advance_state_on_fence): Debug insns don't start cycles. (update_boundaries): Take fence as argument. Deal with debug insns. (schedule_expr_on_boundary): No full_tidying on debug insns. (fill_insns): Deal with debug insns. (track_scheduled_insns_and_blocks): Don't count debug insns. (need_nop_to_preserve_insn_bb): New, split out of... (remove_insn_from_stream): ... this. (fur_orig_expr_not_found): Skip debug insns. * rtl.def (VALUE): Move up. (DEBUG_INSN): New. * tree-ssa-sink.c (all_immediate_uses_same_place): Skip debug stmts. (nearest_common_dominator_of_uses): Take debug_stmts argument. Set it if debug stmts are found. (statement_sink_location): Skip debug stmts. Propagate moving defs into debug stmts. * ifcvt.c (first_active_insn): Skip debug insns. (last_active_insns): Likewise. (cond_exec_process_insns): Likewise. (noce_process_if_block): Likewise. (check_cond_move_block): Likewise. (cond_move_convert_if_block): Likewise. (block_jumps_and_fallthru_p): Likewise. (dead_or_predicable): Likewise. * dwarf2out.c (debug_str_hash_forced): New. (find_AT_string): Add comment. (gen_label_for_indirect_string): New. (get_debug_string_label): New. (AT_string_form): Use it. (mem_loc_descriptor): Handle non-TLS symbols. Handle MINUS , DIV, MOD, AND, IOR, XOR, NOT, ABS, NEG, and CONST_STRING. Accept but discard COMPARE, IF_THEN_ELSE, ROTATE, ROTATERT, TRUNCATE and several operations that cannot be represented with DWARF opcodes. (loc_descriptor): Ignore SIGN_EXTEND and ZERO_EXTEND. Require dwarf_version 4 for DW_OP_implicit_value and DW_OP_stack_value. (dwarf2out_var_location): Take during-call mark into account. (output_indirect_string): Update comment. Output if there are label and references. (prune_indirect_string): New. (prune_unused_types): Call it if debug_str_hash_forced. More in dwarf2out.c, from Jakub Jelinek : (dw_long_long_const): Remove. (struct dw_val_struct): Change val_long_long type to rtx. (print_die, attr_checksum, same_dw_val_p, loc_descriptor): Adjust for val_long_long change to CONST_DOUBLE rtx from a long hi/lo pair. (output_die): Likewise. Use HOST_BITS_PER_WIDE_INT size of each component instead of HOST_BITS_PER_LONG. (output_loc_operands): Likewise. For const8* assert HOST_BITS_PER_WIDE_INT rather than HOST_BITS_PER_LONG is >= 64. (output_loc_operands_raw): For const8* assert HOST_BITS_PER_WIDE_INT rather than HOST_BITS_PER_LONG is >= 64. (add_AT_long_long): Remove val_hi and val_lo arguments, add val_const_double. (size_of_die): Use HOST_BITS_PER_WIDE_INT size multiplier instead of HOST_BITS_PER_LONG for dw_val_class_long_long. (add_const_value_attribute): Adjust add_AT_long_long caller. Don't handle TLS SYMBOL_REFs. If CONST wraps a constant, tail recurse. (dwarf_stack_op_name): Handle DW_OP_implicit_value and DW_OP_stack_value. (size_of_loc_descr, output_loc_operands, output_loc_operands_raw): Handle DW_OP_implicit_value. (extract_int): Move prototype earlier. (mem_loc_descriptor): For SUBREG punt if inner mode size is wider than DWARF2_ADDR_SIZE. Handle SIGN_EXTEND and ZERO_EXTEND by DW_OP_shl and DW_OP_shr{a,}. Handle EQ, NE, GT, GE, LT, LE, GTU, GEU, LTU, LEU, SMIN, SMAX, UMIN, UMAX, SIGN_EXTRACT, ZERO_EXTRACT. (loc_descriptor): Compare mode size with DWARF2_ADDR_SIZE instead of Pmode size. (loc_descriptor): Add MODE argument. Handle CONST_INT, CONST_DOUBLE, CONST_VECTOR, CONST, LABEL_REF and SYMBOL_REF if mode != VOIDmode, attempt to handle other expressions. Don't handle TLS SYMBOL_REFs. (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor_from_tree_1): Adjust loc_descriptor callers. (add_location_or_const_value_attribute): Likewise. For single location loc_lists attempt to use add_const_value_attribute for constant decls. Add DW_AT_const_value even if NOTE_VAR_LOCATION is VAR_LOCATION with CONSTANT_P or CONST_STRING in its expression. * cfgbuild.c (inside_basic_block_p): Handle debug insns. (control_flow_insn_p): Likewise. * tree-parloops.c (eliminate_local_variables_stmt): Handle debug stmt. (separate_decls_in_region_debug_bind): New. (separate_decls_in_region): Process debug bind stmts afterwards. * recog.c (verify_changes): Handle debug insns. (extract_insn): Likewise. (peephole2_optimize): Skip debug insns. * dse.c (scan_insn): Skip debug insns. * sel-sched-ir.c (return_nop_to_pool): Take full_tidying argument. Pass it on. (setup_id_for_insn): Handle debug insns. (maybe_tidy_empty_bb): Adjust whitespace. (tidy_control_flow): Skip debug insns. (sel_remove_insn): Adjust for debug insns. (sel_estimate_number_of_insns): Skip debug insns. (create_insn_rtx_from_pattern): Handle debug insns. (create_copy_of_insn_rtx): Likewise. * sel-sched-.h (sel_bb_end): Declare. (sel_bb_empty_or_nop_p): New. (get_all_loop_exits): Use it. (_eligible_successor_edge_p): Likewise. (return_nop_to_pool): Adjust. * tree-eh.c (tre_empty_eh_handler_p): Skip debug stmts. * ira-lives.c (process_bb_node_lives): Skip debug insns. * gimple-pretty-print.c (dump_gimple_debug): New. (dump_gimple_stmt): Use it. (dump_bb_header): Skip gimple debug stmts. * regmove.c (optimize_reg_copy_1): Discount debug insns. (fixup_match_2): Likewise. (regmove_backward_pass): Likewise. Simplify combined replacement. Handle debug insns. * function.c (instantiate_virtual_regs): Handle debug insns. * function.h (struct emit_status): Add x_cur_debug_insn_uid. * print-rtl.h: Include cselib.h. (print_rtx): Print VALUEs. Split out and recurse for VAR_LOCATIONs. * df.h (df_inns_rescan_debug_internal): Declare. * gcse.c (alloc_hash_table): Estimate n_insns. (cprop_insn): Don't regard debug insns as changes. (bypass_conditional_jumps): Skip debug insns. (one_pre_gcse_pass): Adjust. (one_code_hoisting_pass): Likewise. (compute_ld_motion_mems): Skip debug insns. (one_cprop_pass): Adjust. * tree-if-conv.c (tree_if_convert_stmt): Reset debug stmts. (if_convertible_stmt_p): Handle debug stmts. * init-regs.c (initialize_uninitialized_regs): Skip debug insns. * tree-vect-loop.c (vect_is_simple_reduction): Skip debug stmts. * ira-build.c (create_bb_allocnos): Skip debug insns. * tree-flow-inline.h (has_zero_uses): Discount debug stmts. (has_single_use): Likewise. (single_imm_use): Likewise. (num_imm_uses): Likewise. * tree-ssa-phiopt.c (empty_block_p): Skip debug stmts. * tree-ssa-coalesce.c (build_ssa_conflict_graph): Skip debug stmts. (create_outofssa_var_map): Likewise. * lower-subreg.c (adjust_decomposed_uses): New. (resolve_debug): New. (decompose_multiword_subregs): Use it. * tree-dfa.c (find_referenced_vars): Skip debug stmts. * emit-rtl.c: Include params.h. (cur_debug_insn_uid): Define. (set_new_first_and_last_insn): Set cur_debug_insn_uid too. (copy_rtx_if_shared_1): Handle debug insns. (reset_used_flags): Likewise. (set_used_flags): LIkewise. (get_max_insn_count): New. (next_nondebug_insn): New. (prev_nondebug_insn): New. (make_debug_insn_raw): New. (emit_insn_before_noloc): Handle debug insns. (emit_jump_insn_before_noloc): Likewise. (emit_call_insn_before_noloc): Likewise. (emit_debug_insn_before_noloc): New. (emit_insn_after_noloc): Handle debug insns. (emit_jump_insn_after_noloc): Likewise. (emit_call_insn_after_noloc): Likewise. (emit_debug_insn_after_noloc): Likewise. (emit_insn_after): Take loc from earlier non-debug insn. (emit_jump_insn_after): Likewise. (emit_call_insn_after): Likewise. (emit_debug_insn_after_setloc): New. (emit_debug_insn_after): New. (emit_insn_before): Take loc from later non-debug insn. (emit_jump_insn_before): Likewise. (emit_call_insn_before): Likewise. (emit_debug_insn_before_setloc): New. (emit_debug_insn_before): New. (emit_insn): Handle debug insns. (emit_debug_insn): New. (emit_jump_insn): Handle debug insns. (emit_call_insn): Likewise. (emit): Likewise. (init_emit): Take min-nondebug-insn-uid into account. Initialize cur_debug_insn_uid. (emit_copy_of_insn_after): Handle debug insns. * cfgexpand.c (gimple_assign_rhs_to_tree): Do not overwrite location of single rhs in place. (maybe_dump_rtl_for_gimple_stmt): Dump lineno. (floor_sdiv_adjust): New. (cell_sdiv_adjust): New. (cell_udiv_adjust): New. (round_sdiv_adjust): New. (round_udiv_adjust): New. (wrap_constant): Moved from cselib. (unwrap_constant): New. (expand_debug_expr): New. (expand_debug_locations): New. (expand_gimple_basic_block): Drop hiding redeclaration. Expand debug bind stmts. (gimple_expand_cfg): Expand debug locations. * cselib.c: Include tree-pass.h. (struct expand_value_data): New. (cselib_record_sets_hook): New. (PRESERVED_VALUE_P, LONG_TERM_PRESERVED_VALUE_P): New. (cselib_clear_table): Move, and implemnet in terms of... (cselib_reset_table_with_next_value): ... this. (cselib_get_next_unknown_value): New. (discard_useless_locs): Don't discard preserved values. (cselib_preserve_value): New. (cselib_preserved_value_p): New. (cselib_preserve_definitely): New. (cselib_clear_preserve): New. (cselib_preserve_only_values): New. (new_cselib_val): Take rtx argument. Dump it in details. (cselib_lookup_mem): Adjust. (expand_loc): Take regs_active in struct. Adjust. Silence dumps unless details are requested. (cselib_expand_value_rtx_cb): New. (cselib_expand_value_rtx): Rename and reimplment in terms of... (cselib_expand_value_rtx_1): ... this. Adjust. Silence dumps without details. Copy more subregs. Try to resolve values using a callback. Wrap constants. (cselib_subst_to_values): Adjust. (cselib_log_lookup): New. (cselib_lookup): Call it. (cselib_invalidate_regno): Don't count preserved values as useless. (cselib_invalidate_mem): Likewise. (cselib_record_set): Likewise. (struct set): Renamed to cselib_set, moved to cselib.h. (cselib_record_sets): Adjust. Call hook. (cselib_process_insn): Reset table when it would be cleared. (dump_cselib_val): New. (dump_cselib_table): New. * tree-cfgcleanup.c (tree_forwarded_block_p): Skip debug stmts. (remove_forwarder_block): Support moving debug stmts. * cselib.h (cselib_record_sets_hook): Declare. (cselib_expand_callback): New type. (cselib_expand_value_rtx_cb): Declare. (cselib_reset_table_with_next_value): Declare. (cselib_get_next_unknown_value): Declare. (cselib_preserve_value): Declare. (cselib_preserved_value_p): Declare. (cselib_preserve_only_values): Declare. (dump_cselib_table): Declare. * cfgcleanup.c (flow_find_cross_jump): Skip debug insns. (try_crossjump_to_edge): Likewise. (delete_unreachable_blocks): Remove dominant GIMPLE blocks after dominated blocks when debug stmts are present. * simplify-rtx.c (delegitimize_mem_from_attrs): New. * tree-ssa-live.c (remove_unused_locals): Skip debug stmts. (set_var_live_on_entry): Likewise. * loop-invariant.c (find_invariants_bb): Skip debug insns. * cfglayout.c (curr_location, last_location): Make static. (set_curr_insn_source_location): Don't avoid bouncing. (get_curr_insn_source_location): New. (get_curr_insn_block): New. (duplicate_insn_chain): Handle debug insns. * tree-ssa-forwprop.c (forward_propagate_addr_expr): Propagate into debug stmts. * common.opt (fcompare-debug): Move to sort order. (fdump-unnumbered-links): Likewise. (fvar-tracking-assignments): New. (fvar-tracking-assignments-toggle): New. * tree-ssa-dce.c (mark_stmt_necessary): Don't mark blocks because of debug stmts. (mark_stmt_if_obviously_necessary): Mark debug stmts. (eliminate_unnecessary_stmts): Walk dominated blocks before dominators. * tree-ssa-ter.c (find_replaceable_in_bb): Skip debug stmts. * ira.c (memref_used_between_p): Skip debug insns. (update_equiv_regs): Likewise. * sched-deps.c (sd_lists_size): Accept empty list. (sd_init_insn): Mark debug insns. (sd_finish_insn): Unmark them. (sd_add_dep): Reject non-debug deps on debug insns. (fixup_sched_groups): Give debug insns group treatment. Skip debug insns. (sched_analyze_reg): Don't mark debug insns for sched before call. (sched_analyze_2): Handle debug insns. (sched_analyze_insn): Compute next non-debug insn. Handle debug insns. (deps_analyze_insn): Handle debug insns. (deps_start_bb): Skip debug insns. (init_deps): Initialize last_debug_insn. * tree-ssa.c (target_for_debug_bind): New. (find_released_ssa_name): New. (propagate_var_def_into_debug_stmts): New. (propagate_defs_into_debug_stmts): New. (verify_ssa): Skip debug bind stmts without values. (warn_uninialized_vars): Skip debug stmts. * target-def.h (TARGET_DELEGITIMIZE_ADDRESS): Set default. * rtl.c (rtx_equal_p_cb): Handle VALUEs. (rtx_equal_p): Likewise. * ira-costs.c (scan_one_insn): Skip debug insns. (process_bb_node_for_hard_reg_moves): Likewise. * rtl.h (DEBUG_INSN_P): New. (NONDEBUG_INSN_P): New. (MAY_HAVE_DEBUG_INSNS): New. (INSN_P): Accept debug insns. (RTX_FRAME_RELATED_P): Likewise. (INSN_DELETED_P): Likewise (PAT_VAR_LOCATION_DECL): New. (PAT_VAR_LOCATION_LOC): New. (PAT_VAR_OCATION_STATUS): New. (NOTE_VAR_LOCATION_DECL): Reimplement. (NOTE_VAR_LOCATION_LOC): Likewise. (NOTE_VAR_LOCATION_STATUS): Likewise. (INSN_VAR_LOCATION): New. (INSN_VAR_LOCATION_DECL): New. (INSN_VAR_LOCATION_LOC): New. (INSN_VAR_LOCATION_STATUS): New. (gen_rtx_UNKNOWN_VAR_LOC): New. (VAR_LOC_UNKNOWN_P): New. (NOTE_DURING_CALL_P): New. (SCHED_GROUP_P): Accept debug insns. (emit_debug_insn_before): Declare. (emit_debug_insn_before_noloc): Declare. (emit_debug_insn_beore_setloc): Declare. (emit_debug_insn_after): Declare. (emit_debug_insn_after_noloc): Declare. (emit_debug_insn_after_setloc): Declare. (emit_debug_insn): Declare. (make_debug_insn_raw): Declare. (prev_nondebug_insn): Declare. (next_nondebug_insn): Declare. (delegitimize_mem_from_attrs): Declare. (get_max_insn_count): Declare. (wrap_constant): Declare. (unwrap_constant): Declare. (get_curr_insn_source_location): Declare. (get_curr_insn_block): Declare. * tree-inline.c (insert_debug_decl_map): New. (processing_debug_stmt): New. (remap_decl): Don't create new mappings in debug stmts. (remap_gimple_op_r): Don't add references in debug stmts. (copy_tree_body_r): Likewise. (remap_gimple_stmt): Handle debug bind stmts. (copy_bb): Skip debug stmts. (copy_edges_for_bb): Likewise. (copy_debug_stmt): New. (copy_debug_stmts): New. (copy_body): Copy debug stmts at the end. (insert_init_debug_bind): New. (insert_init_stmt): Take id. Skip and emit debug stmts. (setup_one_parameter): Remap variable earlier, register debug mapping. (estimate_num_insns): Skip debug stmts. (expand_call_inline): Preserve debug_map. (optimize_inline_calls): Check for no debug_stmts left-overs. (unsave_expr_now): Preserve debug_map. (copy_gimple_seq_and_replace_locals): Likewise. (tree_function_versioning): Check for no debug_stmts left-overs. Init and destroy debug_map as needed. Split edges unconditionally. (build_duplicate_type): Init and destroy debug_map as needed. * tree-inline.h: Include gimple.h instead of pointer-set.h. (struct copy_body_data): Add debug_stmts and debug_map. * sched-int.h (struct ready_list): Add n_debug. (struct deps): Add last_debug_insn. (DEBUG_INSN_SCHED_P): New. (BOUNDARY_DEBUG_INSN_P): New. (SCHEDULE_DEBUG_INSN_P): New. (sd_iterator_cond): Accept empty list. * combine.c (create_log_links): Skip debug insns. (combine_instructions): Likewise. (cleanup_auto_inc_dec): New. From Jakub Jelinek: Make sure the return value is always unshared. (struct rtx_subst_pair): New. (auto_adjust_pair): New. (propagate_for_debug_subst): New. (propagate_for_debug): New. (try_combine): Skip debug insns. Propagate removed defs into debug insns. (next_nonnote_nondebug_insn): New. (distribute_notes): Use it. Skip debug insns. (distribute_links): Skip debug insns. * tree-outof-ssa.c (set_location_for_edge): Likewise. * resource.c (mark_target_live_regs): Likewise. * var-tracking.c: Include cselib.h and target.h. (enum micro_operation_type): Add MO_VAL_USE, MO_VAL_LOC, and MO_VAL_SET. (micro_operation_type_name): New. (enum emit_note_where): Add EMIT_NOTE_AFTER_CALL_INSN. (struct micro_operation_def): Update comments. (decl_or_value): New type. Use instead of decls. (struct emit_note_data_def): Add vars. (struct attrs_def): Use decl_or_value. (struct variable_tracking_info_def): Add permp, flooded. (struct location_chain_def): Update comment. (struct variable_part_def): Use decl_or_value. (struct variable_def): Make var_part a variable length array. (valvar_pool): New. (scratch_regs): New. (cselib_hook_called): New. (dv_is_decl_p): New. (dv_is_value_p): New. (dv_as_decl): New. (dv_as_value): New. (dv_as_opaque): New. (dv_onepart_p): New. (dv_pool): New. (IS_DECL_CODE): New. (check_value_is_not_decl): New. (dv_from_decl): New. (dv_from_value): New. (dv_htab_hash): New. (variable_htab_hash): Use it. (variable_htab_eq): Support values. (variable_htab_free): Free from the right pool. (attrs_list_member, attrs_list_insert): Use decl_or_value. (attrs_list_union): Adjust. (attrs_list_mpdv_union): New. (tie_break_pointers): New. (canon_value_cmp): New. (unshare_variable): Return possibly-modified slot. (vars_copy_1): Adjust. (var_reg_decl_set): Adjust. Split out of... (var_reg_set): ... this. (get_init_value): Adjust. (var_reg_delete_and_set): Adjust. (var_reg_delete): Adjust. (var_regno_delete): Adjust. (var_mem_decl_set): Split out of... (var_mem_set): ... this. (var_mem_delete_and_set): Adjust. (var_mem_delete): Adjust. (val_store): New. (val_reset): New. (val_resolve): New. (variable_union): Adjust. Speed up merge of 1-part vars. (variable_canonicalize): Use unshared slot. (VALUED_RECURSED_INTO): New. (find_loc_in_1pdv): New. (struct dfset_merge): New. (insert_into_intersection): New. (intersect_loc_chains): New. (loc_cmp): New. (canonicalize_loc_order_check): New. (canonicalize_values_mark): New. (canonicalize_values_star): New. (variable_merge_over_cur): New. (variable_merge_over_src): New. (dataflow_set_merge): New. (dataflow_set_equiv_regs): New. (remove_duplicate_values): New. (struct dfset_post_merge): New. (variable_post_merge_new_vals): New. (variable_post_merge_perm_vals): New. (dataflow_post_merge_adjust): New. (find_mem_expr_in_1pdv): New. (dataflow_set_preserve_mem_locs): New. (dataflow_set_remove_mem_locs): New. (dataflow_set_clear_at_call): New. (onepart_variable_different_p): New. (variable_different_p): Use it. (dataflow_set_different_1): Adjust. Make detailed dump more verbose. (track_expr_p): Add need_rtl parameter. Don't generate rtl if not needed. (track_loc_p): Pass it true. (struct count_use_info): New. (find_use_val): New. (replace_expr_with_values): New. (log_op_type): New. (use_type): New, partially split out of... (count_uses): ... this. Count new micro-ops. (count_uses_1): Adjust. (count_stores): Adjust. (count_with_sets): New. (VAL_NEEDS_RESOLUTION): New. (VAL_HOLDS_TRACK_EXPR): New. (VAL_EXPR_IS_COPIED): New. (VAL_EXPR_IS_CLOBBERED): New. (add_uses): Adjust. Generate new micro-ops. (add_uses_1): Adjust. (add_stores): Generate new micro-ops. (add_with_sets): New. (find_src_status): Adjust. (find_src_set_src): Adjust. (compute_bb_dataflow): Use dataflow_set_clear_at_call. Handle new micro-ops. Canonicalize value equivalances. (vt_find_locations): Compute total size of hash tables for dumping. Perform merge for var-tracking-assignments. Don't disregard single-block loops. (dump_attrs_list): Handle decl_or_value. (dump_variable): Take variable. Deal with decl_or_value. (dump_variable_slot): New. (dump_vars): Use it. (dump_dataflow_sets): Adjust. (set_slot_part): New, extended to support one-part variables after splitting out of... (set_variable_part): ... this. (clobber_slot_part): New, split out of... (clobber_variable_part): ... this. (delete_slot_part): New, split out of... (delete_variable_part): .... this. (check_wrap_constant): New. (vt_expand_loc_callback): New. (vt_expand_loc): New. (emit_note_insn_var_location): Adjust. Handle values. Handle EMIT_NOTE_AFTER_CALL_INSN. (emit_notes_for_differences_1): Adjust. Handle values. (emit_notes_for_differences_2): Likewise. (emit_notes_for_differences): Adjust. (emit_notes_in_bb): Take pointer to set. Emit AFTER_CALL_INSN notes. Adjust. Handle new micro-ops. (vt_add_function_parameters): Adjust. Create and bind values. (vt_initialize): Adjust. Initialize scratch_regs and valvar_pool, flooded and perm.. Initialize and use cselib. Log operations. Move some code to count_with_sets and add_with_sets. (delete_debug_insns): New. (vt_debug_insns_local): New. (vt_finalize): Release permp, valvar_pool, scratch_regs. Finish cselib. (var_tracking_main): If var-tracking-assignments is enabled but var-tracking isn't, delete debug insns and leave. Likewise if we exceed limits or fail the stack adjustments tests, and after all var-tracking processing. More in var-tracking, from Jakub Jelinek : (dataflow_set): Add traversed_vars. (value_chain, const_value_chain): New typedefs. (value_chain_pool, value_chains): New variables. (value_chain_htab_hash, value_chain_htab_eq, add_value_chain, add_value_chains, add_cselib_value_chains, remove_value_chain, remove_value_chains, remove_cselib_value_chains): New functions. (shared_hash_find_slot_unshare_1, shared_hash_find_slot_1, shared_hash_find_slot_noinsert_1, shared_hash_find_1): New static inlines. (shared_hash_find_slot_unshare, shared_hash_find_slot, shared_hash_find_slot_noinsert, shared_hash_find): Update. (dst_can_be_shared): New variable. (unshare_variable): Unshare set->vars if shared, use shared_hash_*. Clear dst_can_be_shared. If set->traversed_vars is non-NULL and different from set->vars, look up slot again instead of using the passed in slot. (dataflow_set_init): Initialize traversed_vars. (variable_union): Use shared_hash_*. Use initially NO_INSERT lookup if set->vars is shared. Don't keep slot cleared before calling unshare_variable. Unshare set->vars if needed. Adjust unshare_variable callers. Clear dst_can_be_shared if needed. Even ->refcount == 1 vars must be unshared if set->vars is shared and var needs to be modified. (dataflow_set_union): Set traversed_vars during canonicalization. (VALUE_CHANGED, DECL_CHANGED): Define. (set_dv_changed, dv_changed_p): New static inlines. (track_expr_p): Clear DECL_CHANGED. (dump_dataflow_sets): Set it. (variable_was_changed): Call set_dv_changed. (emit_note_insn_var_location): Likewise. (changed_variables_stack): New variable. (check_changed_vars_1, check_changed_vars_2): New functions. (emit_notes_for_changes): Do nothing if changed_variables is empty. Traverse changed_variables with check_changed_vars_1, call check_changed_vars_2 on each changed_variables_stack entry. (emit_notes_in_bb): Add SET argument. Just clear it at the beginning, use it instead of local &set, don't destroy it at the end. (vt_emit_notes): Call dataflow_set_clear early on all VTI(bb)->out sets, never use them, instead use emit_notes_in_bb computed set, dataflow_set_clear also VTI(bb)->in when we are done with the basic block. Initialize changed_variables_stack, free it afterwards. If ENABLE_CHECKING verify that after noting differences to an empty set value_chains hash table is empty. (vt_initialize): Initialize value_chains and value_chain_pool. (vt_finalize): Delete value_chains htab, free value_chain_pool. (variable_tracking_main): Call dump_dataflow_sets before calling vt_emit_notes, not after it. * tree-flow.h (propagate_defs_into_debug_stmts): Declare. (propagate_var_def_into_debug_stmts): Declare. * df-problems.c (df_lr_bb_local_compute): Skip debug insns. (df_set_note): Reject debug insns. (df_whole_mw_reg_dead_p): Take added_notes_p argument. Don't add notes to debug insns. (df_note_bb_compute): Adjust. Likewise. (df_simulate_uses): Skip debug insns. (df_simulate_initialize_backwards): Likewise. * reg-stack.c (subst_stack_regs_in_debug_insn): New. (subst_stack_regs_pat): Reject debug insns. (convert_regs_1): Handle debug insns. * Makefile.in (TREE_INLINE_H): Take pointer-set.h from GIMPLE_H. (print-rtl.o): Depend on cselib.h. (cselib.o): Depend on TREE_PASS_H. (var-tracking.o): Depend on cselib.h and TARGET_H. * sched-rgn.c (rgn_estimate_number_of_insns): Discount debug insns. (init_ready_list): Skip boundary debug insns. (add_branch_dependences): Skip debug insns. (free_block_dependencies): Check for blocks with only debug insns. (compute_priorities): Likewise. * gimple.c (gss_for_code): Handle GIMPLE_DEBUG. (gimple_build_with_ops_stat): Take subcode as unsigned. Adjust all callers. (gimple_build_debug_bind_stat): New. (empty_body_p): Skip debug stmts. (gimple_has_side_effects): Likewise. (gimple_rhs_has_side_effects): Likewise. * gimple.h (enum gimple_debug_subcode, GIMPLE_DEBUG_BIND): New. (gimple_build_debug_bind_stat): Declare. (gimple_build_debug_bind): Define. (is_gimple_debug): New. (gimple_debug_bind_p): New. (gimple_debug_bind_get_var): New. (gimple_debug_bind_get_value): New. (gimple_debug_bind_get_value_ptr): New. (gimple_debug_bind_set_var): New. (gimple_debug_bind_set_value): New. (GIMPLE_DEBUG_BIND_NOVALUE): New internal temporary macro. (gimple_debug_bind_reset_value): New. (gimple_debug_bind_has_value_p): New. (gsi_next_nondebug): New. (gsi_prev_nondebug): New. (gsi_start_nondebug_bb): New. (gsi_last_nondebug_bb): New. * sched-vis.c (print_pattern): Handle VAR_LOCATION. (print_insn): Handle DEBUG_INSN. * tree-cfg.c (remove_bb): Walk stmts backwards. Let loc of first insn prevail. (first_stmt): Skip debug stmts. (first_non_label_stmt): Likewise. (last_stmt): Likewise. (has_zero_uses_1): New. (single_imm_use_1): New. (verify_gimple_debug): New. (verify_types_in_gimple_stmt): Handle debug stmts. (verify_stmt): Likewise. (debug_loop_num): Skip debug stmts. (remove_edge_and_dominated_blocks): Remove dominators last. * tree-ssa-reasssoc.c (rewrite_expr_tree): Propagate into debug stmts. (linearize_expr): Likewise. * config/i386/i386.c (ix86_delegitimize_address): Call default implementation. * config/ia64/ia64.c (ia64_safe_itanium_class): Handle debug insns. (group_barrier_needed): Skip debug insns. (emit_insn_group_barriers): Likewise. (emit_all_insn_group_barriers): Likewise. (ia64_variable_issue): Handle debug insns. (ia64_dfa_new_cycle): Likewise. (final_emit_insn_group_barriers): Skip debug insns. (ia64_dwarf2out_def_steady_cfa): Take frame argument. Don't def cfa without frame. (process_set): Likewise. (process_for_unwind_directive): Pass frame on. * config/rs6000/rs6000.c (TARGET_DELEGITIMIZE_ADDRESS): Define. (rs6000_delegitimize_address): New. (rs6000_debug_adjust_cost): Handle debug insns. (is_microcoded_insn): Likewise. (is_cracked_insn): Likewise. (is_nonpipeline_insn): Likewise. (insn_must_be_first_in_group): Likewise. (insn_must_be_last_in_group): Likewise. (force_new_group): Likewise. * cfgrtl.c (rtl_split_block): Emit INSN_DELETED note if block contains only debug insns. (rtl_merge_blocks): Skip debug insns. (purge_dead_edges): Likewise. (rtl_block_ends_with_call_p): Skip debug insns. * dce.c (deletable_insn_p): Handle VAR_LOCATION. (mark_reg_dependencies): Skip debug insns. * params.def (PARAM_MIN_NONDEBUG_INSN_UID): New. * tree-ssanames.c (release_ssa_name): Propagate def into debug stmts. * tree-ssa-threadedge.c (record_temporary_equivalences_from_stmts): Skip debug stmts. * regcprop.c (replace_oldest_value_addr): Skip debug insns. (replace_oldest_value_mem): Use ALL_REGS for debug insns. (copyprop_hardreg_forward_1): Handle debug insns. * reload1.c (reload): Skip debug insns. Replace unassigned pseudos in debug insns with their equivalences. (eliminate_regs_in_insn): Skip debug insns. (emit_input_reload_insns): Skip debug insns at first, adjust them later. * tree-ssa-operands.c (add_virtual_operand): Reject debug stmts. (get_indirect_ref_operands): Pass opf_no_vops on. (get_expr_operands): Likewise. Skip debug stmts. (parse_ssa_operands): Scan debug insns with opf_no_vops. gcc/testsuite/ChangeLog: * gcc.dg/guality/guality.c: New. * gcc.dg/guality/guality.h: New. * gcc.dg/guality/guality.exp: New. * gcc.dg/guality/example.c: New. * lib/gcc-dg.exp (cleanup-dump): Remove .gk files. (cleanup-saved-temps): Likewise, .gkd files too. gcc/cp/ChangeLog: * cp-tree.h (TFF_NO_OMIT_DEFAULT_TEMPLATE_ARGUMENTS): New. * cp-lang.c (cxx_dwarf_name): Pass it. * error.c (count_non_default_template_args): Take flags as argument. Adjust all callers. Skip counting of default arguments if the new flag is given. ChangeLog: * Makefile.tpl (BUILD_CONFIG): Default to bootstrap-debug. * Makefile.in: Rebuilt. contrib/ChangeLog: * compare-debug: Look for .gkd files and compare them. config/ChangeLog: * bootstrap-debug.mk: Add comments. * bootstrap-debug-big.mk: New. * bootstrap-debug-lean.mk: New. * bootstrap-debug-ckovw.mk: Add comments. * bootstrap-debug-lib.mk: Drop CFLAGS for stages. Use -g0 for TFLAGS in stage1. Drop -fvar-tracking-assignments-toggle. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@151312 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index 110beb10099..4121af74ccc 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -1532,6 +1532,9 @@ struct GTY(()) tree_constructor { #define VL_EXP_OPERAND_LENGTH(NODE) \ ((int)TREE_INT_CST_LOW (VL_EXP_CHECK (NODE)->exp.operands[0])) +/* Nonzero if is_gimple_debug() may possibly hold. */ +#define MAY_HAVE_DEBUG_STMTS (flag_var_tracking_assignments) + /* In a LOOP_EXPR node. */ #define LOOP_EXPR_BODY(NODE) TREE_OPERAND_CHECK_CODE (NODE, LOOP_EXPR, 0) @@ -3807,6 +3810,10 @@ extern tree build6_stat (enum tree_code, tree, tree, tree, tree, tree, #define build6(c,t1,t2,t3,t4,t5,t6,t7) \ build6_stat (c,t1,t2,t3,t4,t5,t6,t7 MEM_STAT_INFO) +extern tree build_var_debug_value_stat (tree, tree MEM_STAT_DECL); +#define build_var_debug_value(t1,t2) \ + build_var_debug_value_stat (t1,t2 MEM_STAT_INFO) + extern tree build_int_cst (tree, HOST_WIDE_INT); extern tree build_int_cst_type (tree, HOST_WIDE_INT); extern tree build_int_cstu (tree, unsigned HOST_WIDE_INT); @@ -5209,6 +5216,10 @@ 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.c */ + +tree target_for_debug_bind (tree); + /* In tree-ssa-ccp.c */ extern tree maybe_fold_offset_to_reference (location_t, tree, tree, tree); extern tree maybe_fold_offset_to_address (location_t, tree, tree, tree); -- cgit v1.2.1 From 16c9337cf8172108f7c4230803c6aa0370807a94 Mon Sep 17 00:00:00 2001 From: matz Date: Wed, 2 Sep 2009 21:13:34 +0000 Subject: * expr.h (emit_storent_insn, expand_expr_real_1, expand_expr_real_2): Declare. * expr.c (emit_storent_insn, expand_expr_real_1, expand_expr_real_2): Export. (store_expr): Setting and evaluating dont_return_target is useless. (expand_expr_real_1, ): Move to gcc_unreachable. * except.c (expand_resx_expr): Rename to ... (expand_resx_stmt): ... this. Rewrite to take gimple statement. * except.h (expand_resx_stmt): Declare. * stmt.c: Add include gimple.h (expand_asm_expr): Rename to ... (expand_asm_stmt): ... this. Rewrite to take gimple statement. (expand_case): Rewrite to take gimple statement. * tree.h (expand_asm_stmt): Declare. (expand_case): Change prototype. * Makefile.in (stmt.o): Depend on gimple.h. * builtins.c (expand_builtin_synchronize): Build gimple asm statement, not an ASM_EXPR. * cfgexpand.c (gimple_cond_pred_to_tree, set_expr_location_r, gimple_to_tree, release_stmt_tree): Remove. (expand_gimple_cond): Don't call gimple_cond_pred_to_tree or ggc_free, but hold comparison code and operands separately. Call jumpif_1 and jumpifnot_1 instead of jumpif and jumpifnot. (expand_call_stmt, expand_gimple_stmt_1, expand_gimple_stmt): New helpers. (expand_gimple_tailcall): Don't call gimple_to_tree, expand_expr_stmt, release_stmt_tree. Call expand_gimple_stmt instead. (expand_gimple_basic_block): Ditto. * calls.c (emit_call_1): Don't look at EH regions here, make fntree parameter useless. (expand_call): New local rettype for TREE_TYPE(exp), use it throughout. Remove local p, use addr instead. Don't look at EH regions here. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@151350 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index 4121af74ccc..4d0cfd34671 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -5054,9 +5054,9 @@ extern bool parse_output_constraint (const char **, int, int, int, bool *, bool *, bool *); extern bool parse_input_constraint (const char **, int, int, int, int, const char * const *, bool *, bool *); -extern void expand_asm_expr (tree); +extern void expand_asm_stmt (gimple); extern tree resolve_asm_operand_names (tree, tree, tree); -extern void expand_case (tree); +extern void expand_case (gimple); extern void expand_decl (tree); #ifdef HARD_CONST /* Silly ifdef to avoid having all includers depend on hard-reg-set.h. */ -- cgit v1.2.1 From 34e5cced0545b23499caed535a6566a4026b9558 Mon Sep 17 00:00:00 2001 From: dnovillo Date: Thu, 3 Sep 2009 04:07:12 +0000 Subject: 2009-09-01 Diego Novillo * c-lang.c (lang_hooks): Remove const qualifier. java/ChangeLog * lang.c (lang_hooks): Remove const qualifier. objc/ChangeLog * objc-lang.c (lang_hooks): Remove const qualifier. objcp/ChangeLog * objcp-lang.c (lang_hooks): Remove const qualifier. ada/ChangeLog * gcc-interface/misc.c (lang_hooks): Remove const qualifier. fortran/ChangeLog * f95-lang.c (lang_hooks): Remove const qualifier. cp/ChangeLog * cp-lang.c (lang_hooks): Remove const qualifier. 2009-09-01 Diego Novillo * cgraph.c (cgraph_node_for_decl): New. * cgraph.h (cgraph_node_for_decl): Declare. * tree.c (host_integerp): Return 0 if T is NULL. 2009-09-01 Diego Novillo * tree.h (struct alias_pair): Move from varasm.c. (alias_pairs): Likewise. (TYPE_MAXVAL): Define. (TYPE_MINVAL): Define. (iterative_hash_host_wide_int): Declare. (remove_unreachable_alias_pairs): Declare. * tree-pass.h (pass_ipa_free_lang_data): Declare. * diagnostic.c (default_diagnostic_starter): Make extern. (default_diagnostic_finalizer): Make extern. * diagnostic.h (default_diagnostic_starter): Declare. (default_diagnostic_finalizer): Declare. (default_tree_printer): Declare. * toplev.c (default_tree_printer): Make extern. 2009-09-01 Richard Guenther Diego Novillo * cgraph.c (cgraph_add_new_function): Remove gimplification. * cgraphunit.c (cgraph_expand_function): Do not emit associated thunks from here. (cgraph_emit_thunks): New. (cgraph_optimize): Call it. Return if any IPA pass finds an error. * varasm.c (finish_aliases_1): Ignore errorneous aliases used by thunks. 2009-09-01 Simon Baldwin Rafael Espindola Richard Guenther Doug Kwan Diego Novillo * tree.c: Include tree-pass.h, langhooks-def.h, diagnostic.h, cgraph.h, timevar.h, except.h and debug.h. (free_lang_data_in_type): New. (need_assembler_name_p): New. (free_lang_data_in_block): New. (free_lang_data_in_decl): New. (struct free_lang_data_d): New. (add_tree_to_fld_list): New. (find_decls_types_r): New. (get_eh_types_for_runtime): New. (find_decls_types_in_eh_region): New. (find_decls_types_in_node): New. (find_decls_types_in_var): New. (free_lang_data_in_cgraph): New. (free_lang_data): New. (gate_free_lang_data): New. (pass_ipa_free_lang_data): New. 2009-09-01 Diego Novillo * timevar.def (TV_IPA_FREE_LANG_DATA): Define. * langhooks.h (struct lang_hooks): Add field free_lang_data. (lang_hooks): Remove const qualifier. * ipa.c (cgraph_remove_unreachable_nodes): Call remove_unreachable_alias_pairs. * except.c (add_type_for_runtime): Check if TYPE has already been converted. (lookup_type_for_runtime): Likewise. (check_handled): Handle converted types. * varasm.c (remove_unreachable_alias_pairs): New. * gimple.c: Include demangle.h. (gimple_decl_printable_name): New. (gimple_fold_obj_type_ref): New. * gimple.h (gimple_decl_printable_name): Declare. (gimple_fold_obj_type_ref): Declare. * passes.c (init_optimization_passes): Add pass pass_ipa_free_lang_data. * langhooks-def.h (LANG_HOOKS_FREE_LANG_DATA): Define. (LANG_HOOKS_INITIALIZER): Add LANG_HOOKS_FREE_LANG_DATA. testsuite/ChangeLog 2009-09-01 Diego Novillo * gcc.dg/gomp/combined-1.c: Adjust expected pattern. * g++.dg/tree-prof/inline_mismatch_args.C: Likewise. * g++.dg/warn/unit-1.C: Likewise. * g++.dg/ipa/iinline-1.C: Likewise. * g++.dg/template/cond2.C: Adjust expected line location for the error. * g++.dg/template/pr35240.C: Likewise. cp/ChangeLog 2009-09-01 Doug Kwan * tree.c (cp_fix_function_decl_p): New. (cp_free_lang_data): New. 2009-09-01 Diego Novillo * Make-lang.in (decl2.o): Add dependency on $(POINTER_SET_H). * decl2.c: Include pointer-set.h. (collect_candidates_for_java_method_aliases): New. (cp_write_global_declarations): Call it. Add local variable CANDIDATES. If set, call build_java_method_aliases. (build_java_method_aliases): Add argument CANDIDATES. Use it to determine if FNDECL should get a hidden alias. * cp-objcp-common.h (LANG_HOOKS_FREE_LANG_DATA): Define. * cp-tree.h (cp_free_lang_data): Declare. 2009-09-03 Richard Guenther * method.c (use_thunk): Use cgraph_finalize_function to hand off thunks to the cgraph. * semantics.c (emit_associated_thunks): Do not emit thunks for really extern functions. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@151360 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index 4d0cfd34671..880f71d9f17 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -183,6 +183,22 @@ DEF_VEC_P(tree); DEF_VEC_ALLOC_P(tree,gc); DEF_VEC_ALLOC_P(tree,heap); +/* We have to be able to tell cgraph about the needed-ness of the target + of an alias. This requires that the decl have been defined. Aliases + that precede their definition have to be queued for later processing. */ + +typedef struct GTY(()) alias_pair +{ + tree decl; + tree target; +} alias_pair; + +/* Define gc'd vector type. */ +DEF_VEC_O(alias_pair); +DEF_VEC_ALLOC_O(alias_pair,gc); + +extern GTY(()) VEC(alias_pair,gc) * alias_pairs; + /* Classify which part of the compiler has defined a given builtin function. Note that we assume below that this is no more than two bits. */ @@ -1259,7 +1275,7 @@ extern void omp_clause_range_check_failed (const_tree, const char *, int, This is interesting in an inline function, since it might not need to be compiled separately. Nonzero in a RECORD_TYPE, UNION_TYPE, QUAL_UNION_TYPE or ENUMERAL_TYPE - if the sdb debugging info for the type has been written. + if the debugging info for the type has been written. In a BLOCK node, nonzero if reorder_blocks has already seen this block. In an SSA_NAME node, nonzero if the SSA_NAME occurs in an abnormal PHI node. */ @@ -2035,6 +2051,8 @@ struct GTY(()) tree_block { #define TYPE_NEXT_VARIANT(NODE) (TYPE_CHECK (NODE)->type.next_variant) #define TYPE_MAIN_VARIANT(NODE) (TYPE_CHECK (NODE)->type.main_variant) #define TYPE_CONTEXT(NODE) (TYPE_CHECK (NODE)->type.context) +#define TYPE_MAXVAL(NODE) (TYPE_CHECK (NODE)->type.maxval) +#define TYPE_MINVAL(NODE) (TYPE_CHECK (NODE)->type.minval) /* Vector types need to check target flags to determine type. */ extern enum machine_mode vector_type_mode (const_tree); @@ -2439,9 +2457,9 @@ struct function; /* For FIELD_DECLs, this is the RECORD_TYPE, UNION_TYPE, or QUAL_UNION_TYPE node that the field is a member of. For VAR_DECL, - PARM_DECL, FUNCTION_DECL, LABEL_DECL, and CONST_DECL nodes, this - points to either the FUNCTION_DECL for the containing function, - the RECORD_TYPE or UNION_TYPE for the containing type, or + PARM_DECL, FUNCTION_DECL, LABEL_DECL, RESULT_DECL, and CONST_DECL + nodes, this points to either the FUNCTION_DECL for the containing + function, the RECORD_TYPE or UNION_TYPE for the containing type, or NULL_TREE or a TRANSLATION_UNIT_DECL if the given decl has "file scope". */ #define DECL_CONTEXT(NODE) (DECL_MINIMAL_CHECK (NODE)->decl_minimal.context) @@ -4889,6 +4907,7 @@ extern hashval_t iterative_hash_exprs_commutative (const_tree, const_tree, hashval_t); extern hashval_t iterative_hash_host_wide_int (HOST_WIDE_INT, hashval_t); extern hashval_t iterative_hash_hashval_t (hashval_t, hashval_t); +extern hashval_t iterative_hash_host_wide_int (HOST_WIDE_INT, hashval_t); extern int compare_tree_int (const_tree, unsigned HOST_WIDE_INT); extern int type_list_equal (const_tree, const_tree); extern int chain_member (const_tree, const_tree); @@ -5047,6 +5066,7 @@ extern void process_pending_assemble_externals (void); extern void finish_aliases_1 (void); extern void finish_aliases_2 (void); extern tree emutls_decl (tree); +extern void remove_unreachable_alias_pairs (void); /* In stmt.c */ extern void expand_computed_goto (tree); -- cgit v1.2.1 From f4a9ca14121de19969490f6540653d9c8269c65e Mon Sep 17 00:00:00 2001 From: jason Date: Tue, 8 Sep 2009 19:26:06 +0000 Subject: * tree.c (tree_find_value): Remove. * tree.h: Remove prototype. * varasm.c (assemble_external): Use value_member instead. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@151534 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index 880f71d9f17..59251b58d14 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -4278,10 +4278,6 @@ extern tree tree_cons_stat (tree, tree, tree MEM_STAT_DECL); extern tree tree_last (tree); -/* Return the node in a chain whose TREE_VALUE is x, NULL if not found. */ - -extern tree tree_find_value (tree, tree); - /* Reverse the order of elements in a chain, and return the new head. */ extern tree nreverse (tree); -- cgit v1.2.1 From 969443c44523194ff4a6759420190e16ff130563 Mon Sep 17 00:00:00 2001 From: rguenth Date: Thu, 10 Sep 2009 08:52:36 +0000 Subject: 2009-09-10 Richard Guenther PR middle-end/41254 * tree.c (struct free_lang_data_d): Add worklist member. (find_decls_types_r): Push onto the worklist instead of recursing. Handle TREE_BINFOs properly. (find_decls_types): New function wrapped around find_decls_types_r to process the worklist. (find_decls_types_in_eh_region): Use it. (find_decls_types_in_node): Likewise. (find_decls_types_in_var): Likewise. (free_lang_data_in_cgraph): Likewise. Free the worklist. * tree.h (RECORD_OR_UNION_TYPE_P): New. (AGGREGATE_TYPE_P): Adjust. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@151590 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index 59251b58d14..c44b95b5bbd 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -1065,12 +1065,17 @@ extern void omp_clause_range_check_failed (const_tree, const char *, int, (SCALAR_FLOAT_TYPE_P (TYPE) \ && DECIMAL_FLOAT_MODE_P (TYPE_MODE (TYPE))) +/* Nonzero if TYPE is a record or union type. */ +#define RECORD_OR_UNION_TYPE_P(TYPE) \ + (TREE_CODE (TYPE) == RECORD_TYPE \ + || TREE_CODE (TYPE) == UNION_TYPE \ + || TREE_CODE (TYPE) == QUAL_UNION_TYPE) + /* Nonzero if TYPE represents an aggregate (multi-component) type. Keep these checks in ascending code order. */ #define AGGREGATE_TYPE_P(TYPE) \ - (TREE_CODE (TYPE) == ARRAY_TYPE || TREE_CODE (TYPE) == RECORD_TYPE \ - || TREE_CODE (TYPE) == UNION_TYPE || TREE_CODE (TYPE) == QUAL_UNION_TYPE) + (TREE_CODE (TYPE) == ARRAY_TYPE || RECORD_OR_UNION_TYPE_P (TYPE)) /* Nonzero if TYPE represents a pointer or reference type. (It should be renamed to INDIRECT_TYPE_P.) Keep these checks in -- cgit v1.2.1 From 313b1a2eae915afa4f9f29ecf89c629d7fd34425 Mon Sep 17 00:00:00 2001 From: rth Date: Thu, 10 Sep 2009 18:46:07 +0000 Subject: * tree.h (struct tree_decl_common): Move align member earlier; move label_decl_uid member ... (struct tree_label_decl): ... here. (LABEL_DECL_UID): Update to match. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@151610 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index c44b95b5bbd..98810900ab5 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -2652,15 +2652,16 @@ struct GTY(()) tree_decl_common { /* DECL_OFFSET_ALIGN, used only for FIELD_DECLs. */ unsigned int off_align : 8; + /* 24-bits unused. */ + + /* DECL_ALIGN. It should have the same size as TYPE_ALIGN. */ + unsigned int align; + tree size_unit; tree initial; tree attributes; tree abstract_origin; - /* DECL_ALIGN. It should have the same size as TYPE_ALIGN. */ - unsigned int align; - - int label_decl_uid; /* Points to a structure whose details depend on the language in use. */ struct lang_decl *lang_specific; }; @@ -2783,21 +2784,22 @@ struct GTY(()) tree_field_decl { tree qualifier; tree bit_offset; tree fcontext; - }; /* A numeric unique identifier for a LABEL_DECL. The UID allocation is dense, unique within any one function, and may be used to index arrays. If the value is -1, then no UID has been assigned. */ #define LABEL_DECL_UID(NODE) \ - (LABEL_DECL_CHECK (NODE)->decl_common.label_decl_uid) + (LABEL_DECL_CHECK (NODE)->label_decl.label_decl_uid) /* In LABEL_DECL nodes, nonzero means that an error message about jumping into such a binding contour has been printed for this label. */ -#define DECL_ERROR_ISSUED(NODE) (LABEL_DECL_CHECK (NODE)->decl_common.decl_flag_0) +#define DECL_ERROR_ISSUED(NODE) \ + (LABEL_DECL_CHECK (NODE)->decl_common.decl_flag_0) struct GTY(()) tree_label_decl { struct tree_decl_with_rtl common; + int label_decl_uid; }; struct GTY(()) tree_result_decl { -- cgit v1.2.1 From 7616de9318924405c384cf6a2d451abbb42f521c Mon Sep 17 00:00:00 2001 From: jason Date: Thu, 10 Sep 2009 21:40:06 +0000 Subject: * tree.c (chain_index): New fn. * tree.h: Declare it. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@151618 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 1 + 1 file changed, 1 insertion(+) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index 98810900ab5..7b431af6199 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -3914,6 +3914,7 @@ extern bool range_in_array_bounds_p (tree); extern tree value_member (tree, tree); extern tree purpose_member (const_tree, tree); +extern tree chain_index (int, tree); extern int attribute_list_equal (const_tree, const_tree); extern int attribute_list_contained (const_tree, const_tree); -- cgit v1.2.1 From 888bd5c2dee816d01c760fa49d2a615507e3d606 Mon Sep 17 00:00:00 2001 From: ebotcazou Date: Sun, 13 Sep 2009 10:46:11 +0000 Subject: * tree.h (DECL_IGNORED_P): Document further effect for FUNCTION_DECL. * dbxout.c (dbxout_function_end): Do not test DECL_IGNORED_P. (dbxout_begin_function): Likewise. * final.c (dwarf2_debug_info_emitted_p): New predicate. (final_start_function): Do not emit debug info if DECL_IGNORED_P is set on the function. (final_end_function): Likewise. (final_scan_insn): Likewise. (rest_of_handle_final): Likewise. * varasm.c (assemble_start_function): Likewise. * config/rs6000/xcoff.h (ASM_DECLARE_FUNCTION_NAME): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@151670 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index 7b431af6199..45391d3fb94 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -2539,7 +2539,8 @@ struct GTY(()) tree_decl_minimal { (DECL_COMMON_CHECK (NODE)->decl_common.debug_expr_is_from) /* Nonzero for a given ..._DECL node means that the name of this node should - be ignored for symbolic debug purposes. */ + be ignored for symbolic debug purposes. Moreover, for a FUNCTION_DECL, + the body of the function should also be ignored. */ #define DECL_IGNORED_P(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.ignored_flag) /* Nonzero for a given ..._DECL node means that this node represents an -- cgit v1.2.1 From 58d82cd04d30e16e38e5fcac6d2d120fa55d64ed Mon Sep 17 00:00:00 2001 From: rguenth Date: Sun, 13 Sep 2009 19:40:33 +0000 Subject: 2009-09-13 Richard Guenther Rafael Avila de Espindola * langhooks-def.h (LANG_HOOKS_EH_RUNTIME_TYPE): Define. (LANG_HOOKS_EH_PERSONALITY): Likewise. (LANG_HOOKS_INITIALIZER): Adjust. (lhd_pass_through_t): Declare. * langhooks.h (struct lang_hooks): Add eh_runtime_type and eh_personality. * langhooks.c (lhd_pass_through_t): New function. * dwarf2out.c (output_call_frame_info, dwarf2out_do_cfi_startproc, dwarf2out_begin_prologue): Use personality from current_function_decl. * expr.h (get_personality_function): Declare. * expr.c (get_personality_function): New function. (build_personality_function): Likewise. * libfuncs.h (libfunc_index): Remove LTI_eh_personality. (eh_personality_libfunc): Remove. * optabs.c (build_libfunc_function): New function split out from ... (init_one_libfunc): ... here. * tree.h (DECL_FUNCTION_PERSONALITY): New. (tree_function_decl): Add personality. (lhd_gcc_personality): Declare. (build_personality_function): Likewise. * tree.c (gcc_eh_personality_decl): New. (lhd_gcc_personality): New function. * except.h (lang_eh_runtime_type): Remove. (enum eh_personality_kind): New. (build_personality_function): Declare. (function_needs_eh_personality): Declare. * except.c (lang_eh_runtime_type): Remove. (function_needs_eh_personality): New function. (add_type_for_runtime): Call lang_hooks.type_for_runtime instead. (sjlj_emit_function_enter, output_function_exception_table): Use personality from current_function_decl. * tree-eh.c (lower_eh_constructs): Set DECL_FUNCTION_PERSONALITY. * tree-inline.c (tree_can_inline_p): Do not inline across different EH personalities. (expand_call_inline): Likewise. Adjust the callers EH personality. (tree_function_versioning): Copy DECL_FUNCTION_PERSONALITY. * cgraph.c (cgraph_add_new_function): Set DECL_FUNCTION_PERSONALITY. * Makefile.in (cgraph.o): Add $(EXCEPT_H) dependency. (c-parser.o): Likewise * c-tree.h (c_eh_initialized_p): Remove. (c_maybe_initialize_eh): Likewise. * c-decl.c (finish_decl): Don't call c_maybe_initialize_eh. (finish_decl): Don't call c_maybe_initialize_eh. (c_eh_initialized_p): Remove. (c_maybe_initialize_eh): Likewise. * c-parser.c (c_parser_omp_construct): Likewise. (c_parse_file): Initialize exception handling. objc/ * objc-act.c (objc_eh_runtime_type): Export. (objc_init_exceptions): Remove. Move warning code ... (objc_begin_try_stmt): ... here (objc_build_throw_stmt): ... and here. (objc_eh_personality_decl): New. (objc_eh_personality): New function. * objc-act.h (objc_eh_runtime_type): Declare. (objc_eh_personality): Likewise. * objc-lang.c (LANG_HOOKS_EH_RUNTIME_TYPE): Define. (LANG_HOOKS_EH_PERSONALITY): Likewise. cp/ * except.c (init_exception_processing): Do not set lang_eh_runtime_type. (choose_personality_routine): Do not set eh_personality_decl, set pragma_java_exceptions. * cp-lang.c (LANG_HOOKS_EH_RUNTIME_TYPE): Define. (LANG_HOOKS_EH_PERSONALITY): Likewise. (cp_eh_personality_decl): New. (cp_eh_personality): Likewise. * Make-lang.in (cp-lang.o): Add $(EXPR_H) and $(EXCEPT_H) dependencies. java/ * decl.c (do_nothing): Remove. (java_init_decl_processing): Do not set lang_eh_runtime_type. * Make-lang.in (lang.o): Add $(EXCEPT_H) dependency. * lang.c (java_eh_personality): New. (java_eh_personality_decl): Likewise. (LANG_HOOKS_EH_PERSONALITY): Define. ada/ * gcc-interface/misc.c (gnat_init_gcc_eh): Do not set lang_eh_runtime_type. (LANG_HOOKS_EH_PERSONALITY): Define. (gnat_eh_personality_decl): New. (gnat_eh_personality): Likewise. * Make-lang.in (misc.o): Add gt-ada-misc.h dependency. * config-lang.in (gtfiles): Add misc.c. fortran/ * f95-lang.c (gfc_maybe_initialize_eh): Do not init eh_personality_libfunc. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@151676 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index 45391d3fb94..5884b55a0b6 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -2538,6 +2538,9 @@ struct GTY(()) tree_decl_minimal { #define DECL_DEBUG_EXPR_IS_FROM(NODE) \ (DECL_COMMON_CHECK (NODE)->decl_common.debug_expr_is_from) +#define DECL_FUNCTION_PERSONALITY(NODE) \ + (FUNCTION_DECL_CHECK (NODE)->function_decl.personality) + /* Nonzero for a given ..._DECL node means that the name of this node should be ignored for symbolic debug purposes. Moreover, for a FUNCTION_DECL, the body of the function should also be ignored. */ @@ -3191,6 +3194,9 @@ struct GTY(()) tree_function_decl { struct function *f; + /* The personality function. Used for stack unwinding. */ + tree personality; + /* Function specific options that are used by this function. */ tree function_specific_target; /* target options */ tree function_specific_optimization; /* optimization options */ @@ -4653,6 +4659,7 @@ extern bool auto_var_in_fn_p (const_tree, const_tree); extern tree build_low_bits_mask (tree, unsigned); extern tree tree_strip_nop_conversions (tree); extern tree tree_strip_sign_nop_conversions (tree); +extern tree lhd_gcc_personality (void); /* In cgraph.c */ extern void change_decl_assembler_name (tree, tree); @@ -5264,6 +5271,7 @@ extern unsigned HOST_WIDE_INT compute_builtin_object_size (tree, int); /* In expr.c. */ extern unsigned HOST_WIDE_INT highest_pow2_factor (const_tree); +extern tree build_personality_function (const char *); /* In tree-inline.c. */ -- cgit v1.2.1 From e38def9ca7953bb5611d08ce8617249516ba5a99 Mon Sep 17 00:00:00 2001 From: rth Date: Mon, 14 Sep 2009 19:18:58 +0000 Subject: Squash commit of EH in gimple git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@151696 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index 5884b55a0b6..b9404c7da18 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -444,9 +444,6 @@ struct GTY(()) tree_common { ASM_INPUT_P in ASM_EXPR - EH_FILTER_MUST_NOT_THROW in - EH_FILTER_EXPR - TYPE_REF_CAN_ALIAS_ALL in POINTER_TYPE, REFERENCE_TYPE @@ -1659,8 +1656,6 @@ extern void protected_set_expr_location (tree, location_t); /* EH_FILTER_EXPR accessors. */ #define EH_FILTER_TYPES(NODE) TREE_OPERAND (EH_FILTER_EXPR_CHECK (NODE), 0) #define EH_FILTER_FAILURE(NODE) TREE_OPERAND (EH_FILTER_EXPR_CHECK (NODE), 1) -#define EH_FILTER_MUST_NOT_THROW(NODE) \ - (EH_FILTER_EXPR_CHECK (NODE)->base.static_flag) /* OBJ_TYPE_REF accessors. */ #define OBJ_TYPE_REF_EXPR(NODE) TREE_OPERAND (OBJ_TYPE_REF_CHECK (NODE), 0) @@ -2796,6 +2791,11 @@ struct GTY(()) tree_field_decl { #define LABEL_DECL_UID(NODE) \ (LABEL_DECL_CHECK (NODE)->label_decl.label_decl_uid) +/* In a LABEL_DECL, the EH region number for which the label is the + post_landing_pad. */ +#define EH_LANDING_PAD_NR(NODE) \ + (LABEL_DECL_CHECK (NODE)->label_decl.eh_landing_pad_nr) + /* In LABEL_DECL nodes, nonzero means that an error message about jumping into such a binding contour has been printed for this label. */ #define DECL_ERROR_ISSUED(NODE) \ @@ -2804,6 +2804,7 @@ struct GTY(()) tree_field_decl { struct GTY(()) tree_label_decl { struct tree_decl_with_rtl common; int label_decl_uid; + int eh_landing_pad_nr; }; struct GTY(()) tree_result_decl { @@ -3914,7 +3915,6 @@ extern tree build_method_type_directly (tree, tree, tree); extern tree build_method_type (tree, tree); extern tree build_offset_type (tree, tree); extern tree build_complex_type (tree); -extern tree build_resx (int); extern tree array_type_nelts (const_tree); extern bool in_array_bounds_p (tree); extern bool range_in_array_bounds_p (tree); @@ -4937,7 +4937,7 @@ extern int real_minus_onep (const_tree); extern void init_ttree (void); extern void build_common_tree_nodes (bool, bool); extern void build_common_tree_nodes_2 (int); -extern void build_common_builtin_nodes (void); +extern void build_common_builtin_nodes (bool); extern tree build_nonstandard_integer_type (unsigned HOST_WIDE_INT, int); extern tree build_range_type (tree, tree, tree); extern bool subrange_type_for_debug_p (const_tree, tree *, tree *); -- cgit v1.2.1 From 78f55ca8366d5fc6a1547b4ab5998397e7618216 Mon Sep 17 00:00:00 2001 From: rth Date: Mon, 14 Sep 2009 20:17:24 +0000 Subject: * builtins.c (expand_builtin_synchronize): Use gimple_build_asm_vec. * cfgbuild.c (make_edges): Handle asm goto. * cfglayout.c (fixup_reorder_chain): Likewise. * cfgrtl.c (patch_jump_insn): Likewise. * gimple-pretty-print.c (dump_gimple_asm): Likewise. * gimple.c (gimple_build_asm_1): Add and use nlabels parameter. (gimple_build_asm_vec): Add and use labels parameter. (gimple_build_asm): Remove. (walk_gimple_asm): Walk labels too. * gimple.def (GIMPLE_ASM): Update docs. * gimple.h: Update decls. (struct gimple_statement_asm): Change nc to use unsigned char; add nl member. (gimple_asm_nlabels): New. (gimple_asm_label_op, gimple_asm_set_label_op): New. * gimplify.c (gimplify_asm_expr): Copy labels from ASM_EXPR into gimple_build_asm_vec. * jump.c (mark_jump_label_asm): New. (mark_jump_label): Use it. (redirect_jump_1): Handle asm goto. (invert_jump_1): Soft fail if X is null. * recog.c (extract_asm_operands): New. (asm_noperands): Use it; handle asm labels. (decode_asm_operands): Use extract_asm_operands. (asm_operand_ok): Properly handle empty string. * reg-stack.c (get_asm_operands_in_out): Rename from get_asm_operand_n_inputs; use extract_asm_operands; return both inputs and outputs by reference; update all callers. * rtl.def (ASM_OPERANDS): Add label vector as operand 6. * rtl.h (ASM_OPERANDS_LABEL_VEC): New. (ASM_OPERANDS_LABEL_LENGTH, ASM_OPERANDS_LABEL): New. (ASM_OPERANDS_SOURCE_LOCATION): Renumber. (extract_asm_operands): Declare. * stmt.c (expand_asm_operands): Add and use labels parameter. (check_unique_operand_names): Likewise. (resolve_asm_operand_names, resolve_operand_name_1): Likewise. (expand_asm_stmt): Handle asm labels. * tree-cfg.c (make_gimple_asm_edges): New. (make_edges): Use it. (cleanup_dead_labels): Handle asm labels. (is_ctrl_altering_stmt): Likewise. (gimple_redirect_edge_and_branch): Likewise. * tree.def (ASM_EXPR): Add 5th operand. * tree.h (ASM_LABELS): New. (resolve_asm_operand_names): Update decl. * c-parser.c (c_parser_asm_statement): Parse asm goto. (c_parser_asm_goto_operands): New. * c-tree.h (build_asm_expr): Update decl. * c-typeck.c (build_asm_expr): Add and use labels parameter. * doc/extend.texi: Document asm goto. gcc/ada/ * gcc-interface/trans.c (Pragma_to_gnu): Use build5 for ASM_EXPR. gcc/cp/ * cp-tree.h (finish_asm_stmt): Update decl. * parser.c (cp_parser_asm_definition): Parse asm goto. (cp_parser_asm_label_list): New. * pt.c (tsubst_copy_asm_operands): Don't recurse on labels. (tsubst_expr): Handle asm labels. * semantics.c (finish_asm_stmt): Add and use labels parameter. gcc/testsuite/ * c-c++-common/asmgoto-1.c, c-c++-common/asmgoto-2.c, c-c++-common/asmgoto-3.c, gcc.c-torture/compile/asmgoto-1.c, gcc.dg/tree-ssa/asmgoto-1.c: New files. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@151701 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index b9404c7da18..70650489dd9 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -1626,6 +1626,7 @@ extern void protected_set_expr_location (tree, location_t); #define ASM_OUTPUTS(NODE) TREE_OPERAND (ASM_EXPR_CHECK (NODE), 1) #define ASM_INPUTS(NODE) TREE_OPERAND (ASM_EXPR_CHECK (NODE), 2) #define ASM_CLOBBERS(NODE) TREE_OPERAND (ASM_EXPR_CHECK (NODE), 3) +#define ASM_LABELS(NODE) TREE_OPERAND (ASM_EXPR_CHECK (NODE), 4) /* Nonzero if we want to create an ASM_INPUT instead of an ASM_OPERAND with no operands. */ #define ASM_INPUT_P(NODE) (ASM_EXPR_CHECK (NODE)->base.static_flag) @@ -5087,7 +5088,7 @@ extern bool parse_output_constraint (const char **, int, int, int, extern bool parse_input_constraint (const char **, int, int, int, int, const char * const *, bool *, bool *); extern void expand_asm_stmt (gimple); -extern tree resolve_asm_operand_names (tree, tree, tree); +extern tree resolve_asm_operand_names (tree, tree, tree, tree); extern void expand_case (gimple); extern void expand_decl (tree); #ifdef HARD_CONST -- cgit v1.2.1 From 8bb76364adb500f539b7bbd329b83e4602bf839b Mon Sep 17 00:00:00 2001 From: matz Date: Wed, 16 Sep 2009 16:12:18 +0000 Subject: PR fortran/41212 * tree.h (struct tree_decl_common): Add decl_restricted_flag, shorten decl_common_unused. (DECL_RESTRICTED_P): New accessor. * tree-ssa-alias.c (ptr_deref_may_alias_decl_p): Use it to disambiguate marked decls and restrict pointers. fortran/ * trans.h (struct lang_type): Remove nontarget_type member. * trans.c (gfc_add_modify): Don't access it. * trans-decl.c (gfc_finish_var_decl): Don't allocate and set it, instead set DECL_RESTRICTED_P on affected decls. testsuite/ * gfortran.dg/pr41212.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@151761 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index 70650489dd9..09ce8fa125c 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -1306,6 +1306,15 @@ extern void omp_clause_range_check_failed (const_tree, const char *, int, (TREE_CHECK3 (NODE, VAR_DECL, PARM_DECL, \ RESULT_DECL)->decl_common.decl_by_reference_flag) +/* In a RESULT_DECL, PARM_DECL and VAR_DECL, means that this decl + can be used as restricted tag to disambiguate against other restrict + pointers. Used by fortran to capture something like non-addressability + (which it isn't really because the middle-end does take addresses of + such variables). */ +#define DECL_RESTRICTED_P(NODE) \ + (TREE_CHECK3 (NODE, VAR_DECL, PARM_DECL, \ + RESULT_DECL)->decl_common.decl_restricted_flag) + /* In a CALL_EXPR, means that the call is the jump from a thunk to the thunked-to function. */ #define CALL_FROM_THUNK_P(NODE) (CALL_EXPR_CHECK (NODE)->base.protected_flag) @@ -2646,8 +2655,10 @@ struct GTY(()) tree_decl_common { unsigned gimple_reg_flag : 1; /* In VAR_DECL, PARM_DECL and RESULT_DECL, this is DECL_BY_REFERENCE. */ unsigned decl_by_reference_flag : 1; + /* In VAR_DECL, PARM_DECL and RESULT_DECL, this is DECL_RESTRICTED_P. */ + unsigned decl_restricted_flag : 1; /* Padding so that 'off_align' can be on a 32-bit boundary. */ - unsigned decl_common_unused : 4; + unsigned decl_common_unused : 3; /* DECL_OFFSET_ALIGN, used only for FIELD_DECLs. */ unsigned int off_align : 8; -- cgit v1.2.1 From e1f1071ca8bd74cc6fa80e5cc024360ced018d9a Mon Sep 17 00:00:00 2001 From: matz Date: Thu, 17 Sep 2009 11:11:58 +0000 Subject: PR middle-end/41347 * tree.c (build_type_attribute_qual_variant): Export. * tree.h (build_type_attribute_qual_variant): Declare. * tree-inline.c (remap_type_1): Use it to build variants with the original qualifiers and attributes. testsuite/ * gfortran.dg/pr41347.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@151799 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 1 + 1 file changed, 1 insertion(+) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index 09ce8fa125c..afb1d4260a0 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -3997,6 +3997,7 @@ extern tree make_tree (tree, rtx); extern tree build_type_attribute_variant (tree, tree); extern tree build_decl_attribute_variant (tree, tree); +extern tree build_type_attribute_qual_variant (tree, tree, int); /* Structure describing an attribute and a function to handle it. */ struct attribute_spec -- cgit v1.2.1 From 3bb63aebd8060e2baf8baf687c1a320e81ebba91 Mon Sep 17 00:00:00 2001 From: jakub Date: Thu, 24 Sep 2009 09:21:39 +0000 Subject: * cgraphunit.c (cgraph_lower_function): Revert last change. * targhooks.c (default_static_chain): Use !DECL_STATIC_CHAIN instead of DECL_NO_STATIC_CHAIN. * tree-cfg.c (verify_gimple_call): Likewise. * tree-nested.c (get_chain_decl, get_chain_field, convert_tramp_reference_op, convert_gimple_call): Likewise. (convert_all_function_calls): Likewise. Always set or clear DECL_STATIC_CHAIN initially, for !n->outer clear it. (lower_nested_functions): Remove DECL_NO_STATIC_CHAIN checking code. * c-parser.c (c_parser_declaration_or_fndef): Set DECL_STATIC_CHAIN if nested. * print-tree.c (print_node): Handle DECL_STATIC_CHAIN instead of DECL_NO_STATIC_CHAIN. * config/i386/i386.c (ix86_static_chain): Use !DECL_STATIC_CHAIN instead of DECL_NO_STATIC_CHAIN. (ix86_function_regparm, find_drap_reg): Likewise. Don't test decl_function_context. * varasm.c (initializer_constant_valid_p): Likewise. * tree.h (DECL_NO_STATIC_CHAIN): Renamed to ... (DECL_STATIC_CHAIN): ... this. * config/moxie/moxie.c (moxie_static_chain): Use !DECL_STATIC_CHAIN instead of DECL_NO_STATIC_CHAIN. * method.c (make_thunk, make_alias_for): Don't set DECL_NO_STATIC_CHAIN. * decl.c (builtin_function_1, grokfndecl): Likewise. * lex.c (build_lang_decl): Likewise. * gcc-interface/utils.c (gnat_pushdecl): Don't set DECL_NO_STATIC_CHAIN, set DECL_STATIC_CHAIN for nested functions. * testsuite/gcc.target/i386/pr12329.c: Adjust. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@152114 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index afb1d4260a0..4f4fd309b6e 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -3141,9 +3141,8 @@ struct GTY(()) #define DECL_NO_LIMIT_STACK(NODE) \ (FUNCTION_DECL_CHECK (NODE)->function_decl.no_limit_stack) -/* In a FUNCTION_DECL with a nonzero DECL_CONTEXT, indicates that a - static chain is not needed. */ -#define DECL_NO_STATIC_CHAIN(NODE) \ +/* In a FUNCTION_DECL indicates that a static chain is needed. */ +#define DECL_STATIC_CHAIN(NODE) \ (FUNCTION_DECL_CHECK (NODE)->function_decl.regdecl_flag) /* Nonzero for a decl that cgraph has decided should be inlined into -- cgit v1.2.1 From 471eff3649c0d9383213b2dfef646d0496d43e28 Mon Sep 17 00:00:00 2001 From: rth Date: Mon, 28 Sep 2009 16:44:32 +0000 Subject: * except.h (struct eh_region_d): Add use_cxa_end_cleanup. * except.c (gen_eh_region): Set it. (duplicate_eh_regions_1): Copy it. * tree-eh.c (lower_resx): Use it to determine which function to call to resume. * langhooks.h (struct lang_hooks): Add eh_use_cxa_end_cleanup. * langhooks-def.h (LANG_HOOKS_EH_USE_CXA_END_CLEANUP): New. * builtins.def (BUILT_IN_CXA_END_CLEANUP): New. * tree.c (build_common_builtin_nodes): Remove parameter. Build BUILT_IN_CXA_END_CLEANUP if necessary. * tree.h (build_common_builtin_nodes): Update decl. * c-common.c (c_define_builtins): Update call to build_common_builtin_nodes. gcc/ada/ * gcc-interface/utils.c (gnat_install_builtins): Update call to build_common_builtin_nodes. gcc/cp/ * cp-objcp-common.h (LANG_HOOKS_EH_USE_CXA_END_CLEANUP): New. gcc/fortran/ * f95-lang.c (gfc_init_builtin_functions): Update call to build_common_builtin_nodes. gcc/java/ * builtins.c (initialize_builtins): Update call to build_common_builtin_nodes. * lang.c (LANG_HOOKS_EH_USE_CXA_END_CLEANUP): New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@152241 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index 4f4fd309b6e..a5a22f45643 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -4949,7 +4949,7 @@ extern int real_minus_onep (const_tree); extern void init_ttree (void); extern void build_common_tree_nodes (bool, bool); extern void build_common_tree_nodes_2 (int); -extern void build_common_builtin_nodes (bool); +extern void build_common_builtin_nodes (void); extern tree build_nonstandard_integer_type (unsigned HOST_WIDE_INT, int); extern tree build_range_type (tree, tree, tree); extern bool subrange_type_for_debug_p (const_tree, tree *, tree *); -- cgit v1.2.1 From 17814acad9a3e3e11971c7f6a01c32e6e1ce26bf Mon Sep 17 00:00:00 2001 From: gdr Date: Thu, 1 Oct 2009 05:13:56 +0000 Subject: gcc/ * tree.h (tree_decl_common::lang_flag_8): New. * c-common.c (c_common_reswords): Include "constexpr" as C++0x keyword. * c-common.h (RID_CONSTEXPR): New. gcc/cp/ * decl.c (check_for_uninitialized_const_var): Check constexpr variables too. (build_ptrmemfunc_type): Make the result a literal type. (build_ptrmem_type): Likewise. (grokdeclarator): Handle `constexpr'. (check_tag_decl): Reject `constexpr'. (check_function_type): Check constexpr functions. * cp-tree.h (ds_constexpr): New cp_decl_spec enumerator. (CLASSTYPE_LITERAL_P): New. (lang_type_class::is_literal): New. (lang_type_class::dummy): Adjust width. (literal_type_p): Declare. * parser.c (cp_parser_check_decl_spec): Print it. (cp_parser_decl_specifier_seq): Accept "constexpr". * semantics.c (validate_constexpr_fundecl): Define. (literal_type_p): Define. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@152358 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index a5a22f45643..ce841d548eb 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -2597,6 +2597,7 @@ struct GTY(()) tree_decl_minimal { #define DECL_LANG_FLAG_5(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.lang_flag_5) #define DECL_LANG_FLAG_6(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.lang_flag_6) #define DECL_LANG_FLAG_7(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.lang_flag_7) +#define DECL_LANG_FLAG_8(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.lang_flag_8) /* Nonzero for a decl which is at file scope. */ #define DECL_FILE_SCOPE_P(EXP) \ @@ -2639,6 +2640,7 @@ struct GTY(()) tree_decl_common { unsigned lang_flag_5 : 1; unsigned lang_flag_6 : 1; unsigned lang_flag_7 : 1; + unsigned lang_flag_8 : 1; /* In LABEL_DECL, this is DECL_ERROR_ISSUED. In VAR_DECL and PARM_DECL, this is DECL_REGISTER. */ @@ -2657,8 +2659,9 @@ struct GTY(()) tree_decl_common { unsigned decl_by_reference_flag : 1; /* In VAR_DECL, PARM_DECL and RESULT_DECL, this is DECL_RESTRICTED_P. */ unsigned decl_restricted_flag : 1; + /* Padding so that 'off_align' can be on a 32-bit boundary. */ - unsigned decl_common_unused : 3; + unsigned decl_common_unused : 2; /* DECL_OFFSET_ALIGN, used only for FIELD_DECLs. */ unsigned int off_align : 8; -- cgit v1.2.1 From 16e43d96afb52c6fb8aaa449d562987862913699 Mon Sep 17 00:00:00 2001 From: jason Date: Fri, 2 Oct 2009 15:32:58 +0000 Subject: improve DECL_ABSTRACT_ORIGIN comment git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@152404 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index ce841d548eb..7e2e88b2a42 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -2484,10 +2484,11 @@ struct GTY(()) tree_decl_minimal { /* For any sort of a ..._DECL node, this points to the original (abstract) - decl node which this decl is an instance of, or else it is NULL indicating - that this decl is not an instance of some other decl. For example, - in a nested declaration of an inline function, this points back to the - definition. */ + decl node which this decl is an inlined/cloned instance of, or else it + is NULL indicating that this decl is not an instance of some other decl. + + The C front-end also uses this in a nested declaration of an inline + function, to point back to the definition. */ #define DECL_ABSTRACT_ORIGIN(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.abstract_origin) /* Like DECL_ABSTRACT_ORIGIN, but returns NODE if there's no abstract -- cgit v1.2.1 From 7bfefa9d2c82e804ef4e59772f4060ac325bf99a Mon Sep 17 00:00:00 2001 From: dnovillo Date: Sat, 3 Oct 2009 21:10:11 +0000 Subject: Merge lto branch into trunk. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@152434 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index 7e2e88b2a42..20463b4a18b 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -4906,7 +4906,8 @@ extern bool validate_arglist (const_tree, ...); extern rtx builtin_memset_read_str (void *, HOST_WIDE_INT, enum machine_mode); extern bool can_trust_pointer_alignment (void); extern int get_pointer_alignment (tree, unsigned int); -extern bool is_builtin_name (const char*); +extern bool is_builtin_name (const char *); +extern bool is_builtin_fn (tree); 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); @@ -4914,6 +4915,7 @@ extern tree make_range (tree, int *, tree *, tree *, bool *); extern tree build_range_check (location_t, tree, tree, int, tree, tree); extern bool merge_ranges (int *, tree *, tree *, int, tree, tree, int, tree, tree); +extern void set_builtin_user_assembler_name (tree decl, const char *asmspec); /* In convert.c */ extern tree strip_float_extensions (tree); @@ -5409,4 +5411,11 @@ more_const_call_expr_args_p (const const_call_expr_arg_iterator *iter) for ((arg) = first_const_call_expr_arg ((call), &(iter)); (arg); \ (arg) = next_const_call_expr_arg (&(iter))) +/* Return true if tree node T is a language-specific node. */ +static inline bool +is_lang_specific (tree t) +{ + return TREE_CODE (t) == LANG_TYPE || TREE_CODE (t) >= NUM_TREE_CODES; +} + #endif /* GCC_TREE_H */ -- cgit v1.2.1 From 688ff29b2a2ea29629307f2a0d444059391dee7b Mon Sep 17 00:00:00 2001 From: aoliva Date: Mon, 12 Oct 2009 18:58:38 +0000 Subject: gcc/ChangeLog: PR debug/41343 PR debug/41447 PR debug/41264 PR debug/41338 * tree.def (DEBUG_EXPR_DECL): New. * rtl.def (DEBUG_EXPR): New. * gengtype.c (adjust_field_rtx_def): Handle it. * tree-ssa.c (propagate_var_def_into_debug_stmts): Rename to... (insert_debug_temp_for_var_def): ... this. Drop support for moving. Take iterator for def stmt; insert debug stmt before it. Scan early for use count and kind in debug stmts. (propagate_defs_into_debug_stmts): Rename to... (insert_debug_temps_for_defs): ... this. Likewise. * tree.h (DEBUG_TEMP_UID): New. * tree.c (next_debug_decl_uid): New. (make_node_stat): Count debug decls separately. (copy_node_stat): Likewise. * cfgexpand.c (expand_debug_expr): Handle DEBUG_EXPR_DECL. * var-tracking.c (dv_is_decl_p): Recognize it. (VALUE_RECURSED_INTO): Apply to DEBUG_EXPRs too. (track_expr_p): Track expanded DEBUG_EXPR_DECLs. (vt_expand_loc_callback): Expand DEBUG_EXPRs. (emit_note_insn_var_location): Don't emit notes for DEBUG_EXPR_DECLs. * cselib.c (rtx_equal_for_cselib_p): Handle DEBUG_EXPR. (cselib_hash_rtx): Likewise. (cselib_expand_value_rtx_1): Use callback for DEBUG_EXPR. * tree-ssa-operands.c (get_expr_operands): Skip DEBUG_EXPR_DECLs in debug bind stmts. * emit-rtl.c (verify_rtx_sharing): Handle DEBUG_EXPR and VALUE. (copy_rtx_if_shared_1, reset_used_flags, set_used_flags): Likewise. * rtl.c (copy_rtx): Likewise. (rtx_equal_p_cb, rtx_equal_p): Handle DEBUG_EXPR. * print-rtl.c (print_rtx): Likewise. * sched-vis.c (print_value): Likewise. (print_insn): Handle DEBUG_EXPR_DECL. * tree-dump.c (dequeue_and_dump): Likewise. * tree-pretty-print.c (dump_decl_name, dump_generic_node): Likewise. * gimple-iterator (gsi_replace): Check for same lhs. (gsi_remove): Insert debug temps. * tree-ssa-loop-im.c (rewrite_reciprocal): Replace with same lhs. (move_computations_stmt): Drop explicit propagation into debug stmts. (rewrite_bittest): Likewise. Use gsi_remove for propagation. * tree-ssa-reassoc.c (rewrite_expr_tree, linearize_expr): Likewise. * tree-ssa-sink.c (statement_sink_location): Likewise. * tree-ssa-forwprop (forward_propagate_addr_expr): Likewise. * tree-ssanames.c (release_ssa_name): Adjust for rename. * tree-flow.h: Likewise. * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Don't mark debug temps without values. (eliminate_unnecessary_stmts): Don't discard just-inserted debug stmts. gcc/testsuite/ChangeLog: PR debug/41343 PR debug/41447 PR debug/41264 PR debug/41338 * gcc.dg/guality/pr41447-1.c: New. * gcc.dg/debug/pr41264-1.c: New. * gcc.dg/debug/pr41343-1.c: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@152681 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index 20463b4a18b..2487a1ce9fe 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -2455,6 +2455,10 @@ struct function; /* Every ..._DECL node gets a unique number. */ #define DECL_UID(NODE) (DECL_MINIMAL_CHECK (NODE)->decl_minimal.uid) +/* DEBUG_EXPR_DECLs get negative UID numbers, to catch erroneous + uses. */ +#define DEBUG_TEMP_UID(NODE) (-DECL_UID (TREE_CHECK ((NODE), DEBUG_EXPR_DECL))) + /* These two fields describe where in the source code the declaration was. If the declaration appears in several places (as for a C function that is declared first and then defined later), this -- cgit v1.2.1 From bd1a81f7e1665d2e33cc824dd05dd7988da9f1a8 Mon Sep 17 00:00:00 2001 From: uweigand Date: Mon, 26 Oct 2009 21:55:59 +0000 Subject: 2009-10-26 Ben Elliston Michael Meissner Ulrich Weigand * doc/extend.texi (Named Address Spaces): New section. * coretypes.h (addr_space_t): New type. (ADDR_SPACE_GENERIC): New define. (ADDR_SPACE_GENERIC_P): New macro. * doc/tm.texi (Named Address Spaces): New section. (TARGET_ADDR_SPACE_LEGITIMATE_ADDRESS_P): Document. (TARGET_ADDR_SPACE_LEGITIMIZE_ADDRESS): Document. (TARGET_ADDR_SPACE_SUBSET_P): Document. (TARGET_ADDR_SPACE_CONVERT): Document. * target.h (struct gcc_target): Add addr_space substructure. * target-def.h (TARGET_ADDR_SPACE_LEGITIMATE_ADDRESS_P): Define. (TARGET_ADDR_SPACE_LEGITIMIZE_ADDRESS): Likewise. (TARGET_ADDR_SPACE_SUBSET_P): Likewise. (TARGET_ADDR_SPACE_CONVERT): Likewise. (TARGET_ADDR_SPACE_HOOKS): Likewise. (TARGET_INITIALIZER): Initialize addr_space hooks. * targhooks.c (default_addr_space_legitimate_address_p): New function. (default_addr_space_legitimize_address): Likewise. (default_addr_space_subset_p): Likewise. (default_addr_space_convert): Likewise. * targhooks.h (default_addr_space_legitimate_address_p): Add prototype. (default_addr_space_legitimize_address): Likewise. (default_addr_space_subset_p): Likewise. (default_addr_space_convert): Likewise. * doc/rtl.texi (MEM_ADDR_SPACE): Document. * rtl.h (mem_attrs): Add ADDRSPACE memory attribute. (MEM_ADDR_SPACE): New macro. * emit-rtl.c (get_mem_attrs): Add ADDRSPACE argument and set address space memory attribute. (mem_attrs_htab_hash): Handle address space memory attribute. (mem_attrs_htab_eq): Likewise. (set_mem_attributes_minus_bitpos): Likewise. (set_mem_alias_set): Likewise. (set_mem_align): Likewise. (set_mem_expr): Likewise. (set_mem_offset): Likewise. (set_mem_size): Likewise. (adjust_address_1): Likewise. (offset_address): Likewise. (widen_memoy_address): Likewise. (get_spill_slot_decl): Likewise. (set_mem_attrs_for_spill): Likewise. (set_mem_addr_space): New function. * emit-rtl.h (set_mem_addr_space): Add prototype. * print-rtl.c (print_rtx): Print address space memory attribute. * expr.c (expand_assignment): Set address space memory attribute of generated MEM RTXes as appropriate. (expand_expr_real_1): Likewise. * cfgexpand.c (expand_debug_expr): Likewise. * tree-ssa-loop-ivopts.c (produce_memory_decl_rtl): Likewise. * tree.h (struct tree_base): Add address_space bitfield. Reduce size of "spare" bitfield. (TYPE_ADDR_SPACE): New macro. (ENCODE_QUAL_ADDR_SPACE): Likewise. (DECODE_QUAL_ADDR_SPACE): Likewise. (CLEAR_QUAL_ADDR_SPACE): Likewise. (KEEP_QUAL_ADDR_SPACE): Likewise. (TYPE_QUALS): Encode type address space. (TYPE_QUALS_NO_ADDR_SPACE): New macro. * tree.c (set_type_quals): Set type address space. (build_array_type): Inherit array address space from element type. * print-tree.c (print_node_brief): Print type address space. (print_node): Likewise. * tree-pretty-print.c (dump_generic_node): Likewise. * explow.c (memory_address): Rename to ... (memory_address_addr_space): ... this. Add ADDRSPACE argument. Use address-space aware variants of memory address routines. * recog.c (memory_address_p): Rename to ... (memory_address_addr_space_p): ... this. Add ADDSPACE argument. Use address-space aware variants of memory address routines. (offsettable_address_p): Rename to ... (offsettable_address_addr_space_p): ... this. Add ADDRSPACE argument. Use address-space aware variants of memory address routines. * reload.c (strict_memory_address_p): Rename to ... (strict_memory_address_addr_space_p): ... this. Add ADDSPACE argument. Use address-space aware variants of memory address routines. (maybe_memory_address_p): Rename to ... (maybe_memory_address_addr_space_p): ... this. Add ADDSPACE argument. Use address-space aware variants of memory address routines. * expr.h (memory_address_addr_space): Add prototype. (memory_address): Define as macro. * recog.h (memory_address_addr_space_p): Add prototype. (memory_address_p): Define as macro. (offsettable_address_addr_space_p): Add prototype. (offsettable_address_p): Define as macro. (strict_memory_address_addr_space_p): Add prototype. (strict_memory_address_p): Define as macro. * combine.c (find_split_point): Use address-space aware variants of memory address routines. * emit-rtl.c (operand_subword): Likewise. (change_address_1): Likewise. (adjust_address_1): Likewise. (offset_address): Likewise. * expr.c (emit_move_insn): Likewise. (expand_assignment): Likewise. (expand_expr_real_1): Likewise. * recog.c (verify_changes): Likewise. (general_operand): Likewise. (offsettable_memref_p): Likewise. (offsettable_nonstrict_memref_p): Likewise. (constrain_operands): Likewise. * reload.c (get_secondary_mem): Likewise. (find_reloads_toplev): Likewise. (find_reloads_address): Likewise. (find_reloads_subreg_address): Likewise. * reload1.c (reload): Likewise. * rtlhooks.c (gen_lowpart_if_possible): Likewise. * rtl.h (address_cost): Add ADDRSPACE argument. * rtlanal.c (address_cost): Add ADDRSPACE argument. Use address-space aware variant of memory address routines. * loop-invariant.c (create_new_invariant): Update address_cost call. * tree-ssa-loop-ivopts.c (computation_cost): Likewise. * fwprop.c (should_replace_address): Add ADDRSPACE argument. Use address-space aware variant of memory address routines. (propagate_rtx_1): Update call to should_replace_address. * tree-flow.h (multiplier_allowed_in_address_p): Add ADDRSPACE argument. * tree-ssa-loop-ivopts.c (multiplier_allowed_in_address_p): Add ADDRSPACE argument. Use per-address-space instead of global cache. Use address-space aware variant of memory address routines. (get_address_cost): Likewise. (get_computation_cost_at): Update calls. * tree-ssa-address.c (valid_mem_ref_p): Add ADDRSPACE argument. Use address-space aware variant of memory address routines. (create_mem_ref_raw): Update call to valid_mem_ref_p. (most_expensive_mult_to_index): Update call to multiplier_allowed_in_address_p. * dwarf2out.c (modified_type_die): Output DW_AT_address_class attribute to indicate named address spaces. * varasm.c (get_variable_section): DECLs in named address spaces cannot be "common". * reload.c (find_reloads_address): Do not use LEGITIMIZE_RELOAD_ADDRESS for addresses in a non-generic address space. * expr.c (emit_block_move_hints): Do not use libcalls for memory in non-generic address spaces. (clear_storage_hints): Likewise. (expand_assignment): Likewise. * fold-const.c (operand_equal_p): Expressions refering to different address spaces are not equivalent. * rtl.c (rtx_equal_p_cb): MEMs refering to different address spaces are not equivalent. (rtx_equal_p): Likewise. * cse.c (exp_equiv_p): Likewise. * jump.c (rtx_renumbered_equal_p): Likewise. * reload.c (operands_match_p): Likewise. * alias.c (nonoverlapping_memrefs_p): MEMs refering to different address spaces may alias. (true_dependence): Likewise. (canon_true_dependence): Likewise. (write_dependence_p): Likewise. * dse.c (canon_address): Handle named address spaces. * ifcvt.c (noce_try_cmove_arith): Likewise. * tree.def (ADDR_SPACE_CONVERT_EXPR): New tree code. * expr.c (expand_expr_real_2): Expand ADDR_SPACE_CONVERT_EXPR. * convert.c (convert_to_pointer): Generate ADDR_SPACE_CONVERT_EXPR to handle conversions between different address spaces. * fold-const.c (fold_convert_loc): Likewise. (fold_unary_loc): Handle ADDR_SPACE_CONVERT_EXPR. * tree-pretty-print.c (dump_generic_node): Likewise. * gimple-pretty-print.c (dump_unary_rhs): Likewise. * tree-cfg.c (verify_gimple_assign_unary): Likewise. * tree-inline.c (estimate_operator_cost): Likewise. * tree-ssa.c (useless_type_conversion_p): Conversions between pointers to different address spaces are not useless. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@153572 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index 2487a1ce9fe..ad810b040c5 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -392,7 +392,12 @@ struct GTY(()) tree_base { unsigned packed_flag : 1; unsigned user_align : 1; - unsigned spare : 21; + unsigned spare : 13; + + /* This field is only used with type nodes; the only reason it is present + in tree_base instead of tree_type is to save space. The size of the + field must be large enough to hold addr_space_t values. */ + unsigned address_space : 8; union tree_ann_d *ann; }; @@ -2169,6 +2174,9 @@ extern enum machine_mode vector_type_mode (const_tree); the term. */ #define TYPE_RESTRICT(NODE) (TYPE_CHECK (NODE)->type.restrict_flag) +/* The address space the type is in. */ +#define TYPE_ADDR_SPACE(NODE) (TYPE_CHECK (NODE)->base.address_space) + /* There is a TYPE_QUAL value for each type qualifier. They can be combined by bitwise-or to form the complete set of qualifiers for a type. */ @@ -2178,8 +2186,27 @@ extern enum machine_mode vector_type_mode (const_tree); #define TYPE_QUAL_VOLATILE 0x2 #define TYPE_QUAL_RESTRICT 0x4 +/* Encode/decode the named memory support as part of the qualifier. If more + than 8 qualifiers are added, these macros need to be adjusted. */ +#define ENCODE_QUAL_ADDR_SPACE(NUM) ((NUM & 0xFF) << 8) +#define DECODE_QUAL_ADDR_SPACE(X) (((X) >> 8) & 0xFF) + +/* Return all qualifiers except for the address space qualifiers. */ +#define CLEAR_QUAL_ADDR_SPACE(X) ((X) & ~0xFF00) + +/* Only keep the address space out of the qualifiers and discard the other + qualifiers. */ +#define KEEP_QUAL_ADDR_SPACE(X) ((X) & 0xFF00) + /* The set of type qualifiers for this type. */ #define TYPE_QUALS(NODE) \ + ((TYPE_READONLY (NODE) * TYPE_QUAL_CONST) \ + | (TYPE_VOLATILE (NODE) * TYPE_QUAL_VOLATILE) \ + | (TYPE_RESTRICT (NODE) * TYPE_QUAL_RESTRICT) \ + | (ENCODE_QUAL_ADDR_SPACE (TYPE_ADDR_SPACE (NODE)))) + +/* The same as TYPE_QUALS without the address space qualifications. */ +#define TYPE_QUALS_NO_ADDR_SPACE(NODE) \ ((TYPE_READONLY (NODE) * TYPE_QUAL_CONST) \ | (TYPE_VOLATILE (NODE) * TYPE_QUAL_VOLATILE) \ | (TYPE_RESTRICT (NODE) * TYPE_QUAL_RESTRICT)) -- cgit v1.2.1 From 98155838dbd82b97bb7bb16dfcbf98fa2ab27ca9 Mon Sep 17 00:00:00 2001 From: uweigand Date: Mon, 26 Oct 2009 21:57:10 +0000 Subject: 2009-10-26 Ben Elliston Michael Meissner Ulrich Weigand * doc/tm.texi (TARGET_ADDR_SPACE_POINTER_MODE): Document. (TARGET_ADDR_SPACE_ADDRESS_MODE): Likewise. (TARGET_ADDR_SPACE_VALID_POINTER_MODE): Likewise. * target.h (struct target_def): Add pointer_mode, address_mode, and valid_pointer_mode to addr_space substructure. * target-def.h (TARGET_ADDR_SPACE_POINTER_MODE): Define. (TARGET_ADDR_SPACE_ADDRESS_MODE): Likewise. (TARGET_ADDR_SPACE_VALID_POINTER_MODE): Likewise. (TARGET_ADDR_SPACE_HOOKS): Add them. * targhooks.c (target_default_pointer_address_modes_p): New function. * target.h (target_default_pointer_address_modes_p): Add prototype. * targhooks.c (default_addr_space_pointer_mode): New function. (default_addr_space_address_mode): Likewise. (default_addr_space_valid_pointer_mode): Likewise. * targhooks.h (default_addr_space_pointer_mode): Add prototype. (default_addr_space_address_mode): Likewise. (default_addr_space_valid_pointer_mode): Likewise. * output.h (default_valid_pointer_mode): Move to ... * targhooks.h (default_valid_pointer_mode): ... here. * varasm.c (default_valid_pointer_mode): Move to ... * targhooks.c (default_valid_pointer_mode): ... here. * varasm.c (output_constant): Use targetm.addr_space.valid_pointer_mode instead of targetm.valid_pointer_mode. * fold-const.c (fit_double_type): Use int_or_pointer_precision. * tree.c (integer_pow2p): Likewise. (tree_log2): Likewise. (tree_floor_log2): Likewise. (signed_or_unsigned_type_for): Support pointer type of different size. (int_or_pointer_precision): New function. * tree.h (int_or_pointer_precision): Add prototype. * stor-layout.c (layout_type): Set TYPE_PRECISION for offset types. * varasm.c (initializer_constant_valid_p): Use TYPE_PRECISION of incoming pointer type instead of POINTER_SIZE. * tree.c (build_pointer_type): Use appropriate pointer mode instead of ptr_mode. (build_reference_type): Likewise. * expr.c (store_expr): Likewise. (expand_expr_addr_expr): Likewise. * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise. * cfgexpand.c (expand_debug_expr): Likewise. * auto-inc-dec.c: Include "target.h". (try_merge): Use appropriate address mode instead of Pmode. (find_inc): Likewise. * combine.c (find_split_point): Likewise. * cselib.c (cselib_record_sets): Likewise. * dse.c (replace_inc_dec): Likewise. (canon_address): Likewise. * var-tracking.c (replace_expr_with_values): Likewise. (count_uses): Likewise. (add_uses): Likewise. (add_stores): Likewise. * emit-rtl.c: Include "target.h". (adjust_address_1): Use appropriate address mode instead of Pmode. (offset_address): Likewise. * explow.c (break_out_memory_refs): Likewise. (memory_address_addr_space): Likewise. (promote_mode): Likewise. * expr.c (move_by_pieces): Likewise. (emit_block_move_via_loop): Likewise. (store_by_pieces): Likewise. (store_by_pieces_1): Likewise. (expand_assignment): Likewise. (store_constructor): Likewise. (expand_expr_addr_expr): Likewise. (expand_expr_real_1): Likewise. * cfgexpand.c (expand_debug_expr): Likewise. * ifcvt.c (noce_try_cmove_arith): Likewise. * regcprop.c (kill_autoinc_value): Likewise. * regmove.c (try_auto_increment): Likewise. * reload.c (find_reloads): Likewise. (find_reloads_address): Likewise. (find_reloads_address_1): Likewise. * sched-deps.c: Include "target.h". (sched_analyze_1): Use appropriate address mode instead of Pmode. (sched_analyze_2): Likewise. * sel-sched-dump.c: Include "target.h". (debug_mem_addr_value): Use appropriate address mode instead of Pmode. * stor-layout.c (layout_type): Likewise. * tree-ssa-loop-ivopts.c (produce_memory_decl_rtl): Likewise. (multiplier_allowed_in_address_p): Likewise. (get_address_cost): Likewise. * varasm.c (make_decl_rtl): Likewise. * expr.c (expand_assignment): Always convert offsets to appropriate address mode. (store_expr): Likewise. (store_constructor): Likewise. (expand_expr_real_1): Likewise. * reload.h (form_sum): Add MODE argument. * reload.c (form_sum): Add MODE argument, use it instead of Pmode. Update recursive calls. (subst_indexed_address): Update calls to form_sum. * tree-flow.h (addr_for_mem_ref): Add ADDRSPACE argument. * tree-ssa-address.c: Include "target.h". (templates): Replace by ... (mem_addr_template_list): ... this new vector. (TEMPL_IDX): Handle address space numbers. (gen_addr_rtx): Add address mode argument, use it instead of Pmode. (addr_for_mem_ref): Add ADDRSPACE argument. Use per-address-space instead of global cache. Update call to gen_addr_rtx. (valid_mem_ref_p): Update call to addr_for_mem_ref. * expr.c (expand_expr_real_1): Update call to addr_for_mem_ref. * rtl.h (convert_memory_address_addr_space): Add prototype. (convert_memory_address): Define as macro. * explow.c (convert_memory_address): Rename to ... (convert_memory_address_addr_space): ... this. Add ADDRSPACE argument. Use appropriate pointer and address modes instead of ptr_mode / Pmode. Update recursive calls. (memory_address_addr_space): Call convert_memory_address_addr_space. * expmed.c (make_tree): Likewise. * expr.c (expand_assignment): Likewise. (expand_expr_addr_expr_1): Likewise. Also, add ADDRSPACE argument. (expand_expr_addr_expr): Likewise. Also, update call. * alias.c (find_base_value): Guard pointer size optimizations. (find_base_term): Likewise. * rtlanal.c (nonzero_bits1): Likewise. (num_sign_bit_copies1): Likewise. * simplify-rtx.c (simplify_unary_operation_1): Likewise. * Makefile.in (tree-ssa-address.o): Add $(TARGET_H) dependency. (emit-rtl.o): Likewise. (auto-inc-dec.o): Likewise. (sched-deps.o): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@153573 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 1 + 1 file changed, 1 insertion(+) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index ad810b040c5..36deb0d51e5 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -4703,6 +4703,7 @@ 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 unsigned int int_or_pointer_precision (const_tree); extern tree build_low_bits_mask (tree, unsigned); extern tree tree_strip_nop_conversions (tree); extern tree tree_strip_sign_nop_conversions (tree); -- cgit v1.2.1 From d1b9226497e79115b89c6dc54ea8d5bb6cb077c8 Mon Sep 17 00:00:00 2001 From: ebotcazou Date: Tue, 10 Nov 2009 20:45:25 +0000 Subject: PR target/10127 PR ada/20548 * expr.h (anti_adjust_stack_and_probe): Declare. * explow.c (anti_adjust_stack_and_probe): Make global, add ADJUST_BACK parameter and rewrite head comment. (allocate_dynamic_stack_space): Adjust call to above function. * function.c (expand_function_end): Handle STACK_CHECK_MOVING_SP. * tree.h (dwarf2out_args_size): Delete. * dwarf2out.c (dwarf2out_args_size): Make static and move around. (dwarf2out_args_size_adjust): Delete prototype and move around. (dwarf2out_frame_debug_expr): Do not record arg size adjustments for ACCUMULATE_OUTGOING_ARGS targets. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@154079 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 5 ----- 1 file changed, 5 deletions(-) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index 36deb0d51e5..f4d1e275520 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -5161,11 +5161,6 @@ extern void dwarf2out_def_cfa (const char *, unsigned, HOST_WIDE_INT); extern void dwarf2out_window_save (const char *); -/* Add a CFI to update the running total of the size of arguments pushed - onto the stack. */ - -extern void dwarf2out_args_size (const char *, HOST_WIDE_INT); - /* Entry point for saving a register to the stack. */ extern void dwarf2out_reg_save (const char *, unsigned, HOST_WIDE_INT); -- cgit v1.2.1 From 8cee8dc0e0c993d62de992c0b1acdd962232c48d Mon Sep 17 00:00:00 2001 From: matz Date: Tue, 24 Nov 2009 15:37:32 +0000 Subject: * tree.h (union tree_ann_d): Don't declare. (tree_base): Remove ann field. (struct var_ann_d): Declare forward. (tree_result_decl, tree_parm_decl, tree_var_decl): Add ann field. (DECL_VAR_ANN_PTR): New macro. * tree-dfa.c (create_var_ann): Rewrite in terms of above macro, accept only VAR, PARM or RESULT decls. (create_tree_common_ann): Remove. (remove_referenced_var): Use DECL_VAR_ANN_PTR. * tree-eh.c (lookup_expr_eh_lp): Remove. * tree-flow-inline.h (var_ann, get_var_ann): Rewrite in terms of DECL_VAR_ANN_PTR. (ann_type, tree_common_ann, get_tree_common_ann): Remove. * tree-flow.h (enum tree_ann_type): Remove. (struct tree_ann_common_d): Remove. (struct var_ann_d): Remove common field. (union tree_ann_d): Remove. (tree_ann_t, tree_ann_common_t): Remove typedefs. (tree_common_ann, get_tree_common_ann, ann_type, create_tree_common_ann, lookup_expr_eh_lp): Don't declare. * tree-ssa.c (delete_tree_ssa): Use DECL_VAR_ANN_PTR. * tree.c (copy_node_stat): Use DECL_VAR_ANN_PTR. * builtins.c (expand_builtin_memcpy): Use currently_expanding_gimple_stmt instead of tree annotation. (expand_builtin_memset_args): Ditto. * cfgexpand.c (currently_expanding_gimple_stmt): Add global variable. (expand_call_stmt): Don't set tree annotation. (expand_gimple_basic_block): Set currently_expanding_gimple_stmt. * expr.c (expand_expr_real): Don't call lookup_expr_eh_lp. * gimple.h (currently_expanding_gimple_stmt): Declare. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@154502 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index f4d1e275520..6fbac3aa2c7 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -356,7 +356,6 @@ enum omp_clause_code See the accessor macros, defined below, for documentation of the fields. */ -union tree_ann_d; struct GTY(()) tree_base { ENUM_BITFIELD(tree_code) code : 16; @@ -398,8 +397,6 @@ struct GTY(()) tree_base { in tree_base instead of tree_type is to save space. The size of the field must be large enough to hold addr_space_t values. */ unsigned address_space : 8; - - union tree_ann_d *ann; }; struct GTY(()) tree_common { @@ -2854,8 +2851,10 @@ struct GTY(()) tree_label_decl { int eh_landing_pad_nr; }; +struct var_ann_d; struct GTY(()) tree_result_decl { struct tree_decl_with_rtl common; + struct var_ann_d *ann; }; struct GTY(()) tree_const_decl { @@ -2873,6 +2872,7 @@ struct GTY(()) tree_const_decl { struct GTY(()) tree_parm_decl { struct tree_decl_with_rtl common; rtx incoming_rtl; + struct var_ann_d *ann; }; @@ -3082,8 +3082,15 @@ extern void decl_fini_priority_insert (tree, priority_type); #define DECL_THREAD_LOCAL_P(NODE) \ (VAR_DECL_CHECK (NODE)->decl_with_vis.tls_model >= TLS_MODEL_REAL) +#define DECL_VAR_ANN_PTR(NODE) \ + (TREE_CODE (NODE) == VAR_DECL ? &(NODE)->var_decl.ann \ + : TREE_CODE (NODE) == PARM_DECL ? &(NODE)->parm_decl.ann \ + : TREE_CODE (NODE) == RESULT_DECL ? &(NODE)->result_decl.ann \ + : NULL) + struct GTY(()) tree_var_decl { struct tree_decl_with_vis common; + struct var_ann_d *ann; }; -- cgit v1.2.1 From 48e1416a24d50cacbb2a5e06a9ee61dd8cbee313 Mon Sep 17 00:00:00 2001 From: hjl Date: Wed, 25 Nov 2009 10:55:54 +0000 Subject: Remove trailing white spaces. 2009-11-25 H.J. Lu * alias.c: Remove trailing white spaces. * alloc-pool.c: Likewise. * alloc-pool.h: Likewise. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * basic-block.h: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * builtins.c: Likewise. * builtins.def: Likewise. * c-common.c: Likewise. * c-common.h: Likewise. * c-cppbuiltin.c: Likewise. * c-decl.c: Likewise. * c-format.c: Likewise. * c-lex.c: Likewise. * c-omp.c: Likewise. * c-opts.c: Likewise. * c-parser.c: Likewise. * c-pretty-print.c: Likewise. * c-tree.h: Likewise. * c-typeck.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfghooks.h: Likewise. * cfglayout.c: Likewise. * cfgloop.c: Likewise. * cfgloop.h: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.c: Likewise. * cgraph.h: Likewise. * cgraphbuild.c: Likewise. * cgraphunit.c: Likewise. * cif-code.def: Likewise. * collect2.c: Likewise. * combine.c: Likewise. * convert.c: Likewise. * coverage.c: Likewise. * crtstuff.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * dbgcnt.c: Likewise. * dbgcnt.def: Likewise. * dbgcnt.h: Likewise. * dbxout.c: Likewise. * dce.c: Likewise. * ddg.c: Likewise. * ddg.h: Likewise. * defaults.h: Likewise. * df-byte-scan.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * df.h: Likewise. * dfp.c: Likewise. * diagnostic.c: Likewise. * diagnostic.h: Likewise. * dominance.c: Likewise. * domwalk.c: Likewise. * double-int.c: Likewise. * double-int.h: Likewise. * dse.c: Likewise. * dwarf2asm.c: Likewise. * dwarf2asm.h: Likewise. * dwarf2out.c: Likewise. * ebitmap.c: Likewise. * ebitmap.h: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * except.c: Likewise. * except.h: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * expr.h: Likewise. * final.c: Likewise. * flags.h: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * function.h: Likewise. * fwprop.c: Likewise. * gcc.c: Likewise. * gcov-dump.c: Likewise. * gcov-io.c: Likewise. * gcov-io.h: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * genattr.c: Likewise. * genattrtab.c: Likewise. * genautomata.c: Likewise. * genchecksum.c: Likewise. * genconfig.c: Likewise. * genflags.c: Likewise. * gengtype-parse.c: Likewise. * gengtype.c: Likewise. * gengtype.h: Likewise. * genmddeps.c: Likewise. * genmodes.c: Likewise. * genopinit.c: Likewise. * genpreds.c: Likewise. * gensupport.c: Likewise. * ggc-common.c: Likewise. * ggc-page.c: Likewise. * ggc-zone.c: Likewise. * ggc.h: Likewise. * gimple-iterator.c: Likewise. * gimple-low.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple.c: Likewise. * gimple.def: Likewise. * gimple.h: Likewise. * gimplify.c: Likewise. * graphds.c: Likewise. * graphite-clast-to-gimple.c: Likewise. * gthr-nks.h: Likewise. * gthr-posix.c: Likewise. * gthr-posix.h: Likewise. * gthr-posix95.h: Likewise. * gthr-single.h: Likewise. * gthr-tpf.h: Likewise. * gthr-vxworks.h: Likewise. * gthr.h: Likewise. * haifa-sched.c: Likewise. * hard-reg-set.h: Likewise. * hooks.c: Likewise. * hooks.h: Likewise. * hosthooks.h: Likewise. * hwint.h: Likewise. * ifcvt.c: Likewise. * incpath.c: Likewise. * init-regs.c: Likewise. * integrate.c: Likewise. * ipa-cp.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-reference.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * ipa-type-escape.c: Likewise. * ipa-type-escape.h: Likewise. * ipa-utils.c: Likewise. * ipa-utils.h: Likewise. * ipa.c: Likewise. * ira-build.c: Likewise. * ira-color.c: Likewise. * ira-conflicts.c: Likewise. * ira-costs.c: Likewise. * ira-emit.c: Likewise. * ira-int.h: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * jump.c: Likewise. * lambda-code.c: Likewise. * lambda-mat.c: Likewise. * lambda-trans.c: Likewise. * lambda.h: Likewise. * langhooks.c: Likewise. * lcm.c: Likewise. * libgcov.c: Likewise. * lists.c: Likewise. * loop-doloop.c: Likewise. * loop-init.c: Likewise. * loop-invariant.c: Likewise. * loop-iv.c: Likewise. * loop-unroll.c: Likewise. * lower-subreg.c: Likewise. * lto-cgraph.c: Likewise. * lto-compress.c: Likewise. * lto-opts.c: Likewise. * lto-section-in.c: Likewise. * lto-section-out.c: Likewise. * lto-streamer-in.c: Likewise. * lto-streamer-out.c: Likewise. * lto-streamer.c: Likewise. * lto-streamer.h: Likewise. * lto-symtab.c: Likewise. * lto-wpa-fixup.c: Likewise. * matrix-reorg.c: Likewise. * mcf.c: Likewise. * mode-switching.c: Likewise. * modulo-sched.c: Likewise. * omega.c: Likewise. * omega.h: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * optabs.h: Likewise. * opts-common.c: Likewise. * opts.c: Likewise. * params.def: Likewise. * params.h: Likewise. * passes.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * predict.def: Likewise. * pretty-print.c: Likewise. * pretty-print.h: Likewise. * print-rtl.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * read-rtl.c: Likewise. * real.c: Likewise. * recog.c: Likewise. * reg-stack.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regmove.c: Likewise. * regrename.c: Likewise. * regs.h: Likewise. * regstat.c: Likewise. * reload.c: Likewise. * reload1.c: Likewise. * resource.c: Likewise. * rtl.c: Likewise. * rtl.def: Likewise. * rtl.h: Likewise. * rtlanal.c: Likewise. * sbitmap.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-int.h: Likewise. * sched-rgn.c: Likewise. * sched-vis.c: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-dump.h: Likewise. * sel-sched-ir.c: Likewise. * sel-sched-ir.h: Likewise. * sel-sched.c: Likewise. * sel-sched.h: Likewise. * sese.c: Likewise. * sese.h: Likewise. * simplify-rtx.c: Likewise. * stack-ptr-mod.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * stringpool.c: Likewise. * stub-objc.c: Likewise. * sync-builtins.def: Likewise. * target-def.h: Likewise. * target.h: Likewise. * targhooks.c: Likewise. * targhooks.h: Likewise. * timevar.c: Likewise. * tlink.c: Likewise. * toplev.c: Likewise. * toplev.h: Likewise. * tracer.c: Likewise. * tree-affine.c: Likewise. * tree-affine.h: Likewise. * tree-browser.def: Likewise. * tree-call-cdce.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-chrec.c: Likewise. * tree-chrec.h: Likewise. * tree-complex.c: Likewise. * tree-data-ref.c: Likewise. * tree-data-ref.h: Likewise. * tree-dfa.c: Likewise. * tree-dump.c: Likewise. * tree-dump.h: Likewise. * tree-eh.c: Likewise. * tree-flow-inline.h: Likewise. * tree-flow.h: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-loop-linear.c: Likewise. * tree-mudflap.c: Likewise. * tree-nested.c: Likewise. * tree-nomudflap.c: Likewise. * tree-nrv.c: Likewise. * tree-object-size.c: Likewise. * tree-optimize.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-pass.h: Likewise. * tree-phinodes.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-alias.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-copy.c: Likewise. * tree-ssa-copyrename.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-dse.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-live.h: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-operands.c: Likewise. * tree-ssa-operands.h: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-sink.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa.c: Likewise. * tree-ssanames.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-tailcall.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-generic.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-slp.c: Likewise. * tree-vect-stmts.c: Likewise. * tree-vectorizer.c: Likewise. * tree-vectorizer.h: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tree.def: Likewise. * tree.h: Likewise. * treestruct.def: Likewise. * unwind-compat.c: Likewise. * unwind-dw2-fde-glibc.c: Likewise. * unwind-dw2.c: Likewise. * value-prof.c: Likewise. * value-prof.h: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * varpool.c: Likewise. * vec.c: Likewise. * vec.h: Likewise. * vmsdbgout.c: Likewise. * web.c: Likewise. * xcoffout.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@154645 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index 6fbac3aa2c7..8656a3c672b 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -1254,7 +1254,7 @@ extern void omp_clause_range_check_failed (const_tree, const char *, int, #define TREE_THIS_NOTRAP(NODE) ((NODE)->base.nothrow_flag) /* In a VAR_DECL, PARM_DECL or FIELD_DECL, or any kind of ..._REF node, - nonzero means it may not be the lhs of an assignment. + nonzero means it may not be the lhs of an assignment. Nonzero in a FUNCTION_DECL means this function should be treated as "const" function (can only read its arguments). */ #define TREE_READONLY(NODE) (NON_TYPE_CHECK (NODE)->base.readonly_flag) @@ -2077,7 +2077,7 @@ extern enum machine_mode vector_type_mode (const_tree); /* The "canonical" type for this type node, which can be used to compare the type for equality with another type. If two types are equal (based on the semantics of the language), then they will have - equivalent TYPE_CANONICAL entries. + equivalent TYPE_CANONICAL entries. As a special case, if TYPE_CANONICAL is NULL_TREE, then it cannot be used for comparison against other types. Instead, the type is @@ -2912,12 +2912,12 @@ struct GTY(()) tree_parm_decl { /* A replaceable function is one which may be replaced at link-time with an entirely different definition, provided that the replacement has the same type. For example, functions declared - with __attribute__((weak)) on most systems are replaceable. + with __attribute__((weak)) on most systems are replaceable. COMDAT functions are not replaceable, since all definitions of the function must be equivalent. It is important that COMDAT functions not be treated as replaceable so that use of C++ template - instantiations is not penalized. + instantiations is not penalized. For example, DECL_REPLACEABLE is used to determine whether or not a function (including a template instantiation) which is not @@ -3048,7 +3048,7 @@ extern void decl_fini_priority_insert (tree, priority_type); (VAR_DECL_CHECK (NODE)->decl_with_vis.init_priority_p) /* For a VAR_DECL or FUNCTION_DECL the initialization priority of - NODE. */ + NODE. */ #define DECL_INIT_PRIORITY(NODE) \ (decl_init_priority_lookup (NODE)) /* Set the initialization priority for NODE to VAL. */ @@ -4952,7 +4952,7 @@ extern tree fold_call_stmt (gimple, bool); extern tree gimple_fold_builtin_snprintf_chk (gimple, tree, enum built_in_function); extern tree make_range (tree, int *, tree *, tree *, bool *); extern tree build_range_check (location_t, tree, tree, int, tree, tree); -extern bool merge_ranges (int *, tree *, tree *, int, tree, tree, int, +extern bool merge_ranges (int *, tree *, tree *, int, tree, tree, int, tree, tree); extern void set_builtin_user_assembler_name (tree decl, const char *asmspec); @@ -5332,7 +5332,7 @@ void init_inline_once (void); /* In ipa-reference.c. Used for parsing attributes of asm code. */ extern GTY(()) tree memory_identifier_string; -/* Compute the number of operands in an expression node NODE. For +/* Compute the number of operands in an expression node NODE. For tcc_vl_exp nodes like CALL_EXPRs, this is stored in the node itself, otherwise it is looked up from the node's code. */ static inline int -- cgit v1.2.1 From aaf45dfea47c5442092b42425f2997f679ad8593 Mon Sep 17 00:00:00 2001 From: uweigand Date: Wed, 2 Dec 2009 13:50:52 +0000 Subject: gcc/ PR middle-end/42224 * tree.h (int_or_pointer_precision): Remove. * tree.c (int_or_pointer_precision): Remove. (integer_pow2p): Use TYPE_PRECISION instead. (tree_log2): Likewise. (tree_floor_log2): Likewise. (signed_or_unsigned_type_for): Likewise. * fold-const.c (fit_double_type): Likewise. * varasm.c (initializer_constant_valid_p): Likewise. gcc/testsuite/ PR middle-end/42224 * gcc.target/s390/pr42224.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@154908 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 1 - 1 file changed, 1 deletion(-) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index 8656a3c672b..a0e1f677761 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -4710,7 +4710,6 @@ 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 unsigned int int_or_pointer_precision (const_tree); extern tree build_low_bits_mask (tree, unsigned); extern tree tree_strip_nop_conversions (tree); extern tree tree_strip_sign_nop_conversions (tree); -- cgit v1.2.1 From 8df5a43d64487d03b55a5799f17a6c465e019062 Mon Sep 17 00:00:00 2001 From: jason Date: Thu, 21 Jan 2010 05:49:35 +0000 Subject: * tree.h (TYPE_TRANSPARENT_UNION): Replace with ... (TYPE_TRANSPARENT_AGGR): this, for union and record. * calls.c (initialize argument_information): Handle it. * c-common.c (handle_transparent_union_attribute): Use new name. * c-decl.c (finish_struct): Ditto. * c-typeck.c (type_lists_compatible_p): Ditto. (convert_for_assignment): Use new name and also handle record. * function.c (aggregate_value_p): Handle it. (pass_by_reference): Ditto. (assign_parm_data_types): Ditto. * print-tree.c (print_node): Ditto. * lto-streamer-in.c (unpack_ts_type_value_fields): Ditto. * lto-streamer-out.c (pack_ts_type_value_fields): Ditto. * tree.c (first_field): New fn. gcc/cp/ * mangle.c (write_type): Mangle transparent record as member type. * semantics.c (begin_class_definition): Recognize decimal classes and set TYPE_TRANSPARENT_AGGR. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@156106 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index a0e1f677761..f5827d59f89 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -2251,16 +2251,18 @@ extern enum machine_mode vector_type_mode (const_tree); #define TYPE_NEEDS_CONSTRUCTING(NODE) \ (TYPE_CHECK (NODE)->type.needs_constructing_flag) -/* Indicates that objects of this type (a UNION_TYPE), should be passed - the same way that the first union alternative would be passed. */ -#define TYPE_TRANSPARENT_UNION(NODE) \ - (UNION_TYPE_CHECK (NODE)->type.transparent_union_flag) +/* Indicates that a UNION_TYPE object should be passed the same way that + the first union alternative would be passed, or that a RECORD_TYPE + object should be passed the same way that the first (and only) member + would be passed. */ +#define TYPE_TRANSPARENT_AGGR(NODE) \ + (RECORD_OR_UNION_CHECK (NODE)->type.transparent_aggr_flag) /* For an ARRAY_TYPE, indicates that it is not permitted to take the address of a component of the type. This is the counterpart of DECL_NONADDRESSABLE_P for arrays, see the definition of this flag. */ #define TYPE_NONALIASED_COMPONENT(NODE) \ - (ARRAY_TYPE_CHECK (NODE)->type.transparent_union_flag) + (ARRAY_TYPE_CHECK (NODE)->type.transparent_aggr_flag) /* Indicated that objects of this type should be laid out in as compact a way as possible. */ @@ -2285,7 +2287,7 @@ struct GTY(()) tree_type { unsigned int precision : 10; unsigned no_force_blk_flag : 1; unsigned needs_constructing_flag : 1; - unsigned transparent_union_flag : 1; + unsigned transparent_aggr_flag : 1; unsigned restrict_flag : 1; unsigned contains_placeholder_bits : 2; @@ -4360,6 +4362,10 @@ extern int list_length (const_tree); extern int fields_length (const_tree); +/* Returns the first FIELD_DECL in a type. */ + +extern tree first_field (const_tree); + /* Given an initializer INIT, return TRUE if INIT is zero or some aggregate of zeros. Otherwise return FALSE. */ -- cgit v1.2.1 From b636e057eec6cbd8eb856333e16b6dcb95fd976f Mon Sep 17 00:00:00 2001 From: mrs Date: Thu, 18 Feb 2010 21:04:40 +0000 Subject: Improve wording.. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@156875 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index f5827d59f89..f9fa00ff983 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -2636,7 +2636,7 @@ struct GTY(()) tree_decl_minimal { || TREE_CODE (DECL_CONTEXT (EXP)) == TRANSLATION_UNIT_DECL) /* Nonzero for a decl that is decorated using attribute used. - This indicates compiler tools that this decl needs to be preserved. */ + This indicates to compiler tools that this decl needs to be preserved. */ #define DECL_PRESERVE_P(DECL) \ DECL_COMMON_CHECK (DECL)->decl_common.preserve_flag -- cgit v1.2.1 From 6816d0c461d2fa52bffa30e4a7901091d134ac3c Mon Sep 17 00:00:00 2001 From: jamborm Date: Thu, 11 Mar 2010 22:27:26 +0000 Subject: 2010-03-11 Martin Jambor PR tree-optimization/43257 * tree.c (assign_assembler_name_if_neeeded): New function. (free_lang_data_in_cgraph): Assembler name assignment moved to the above new function. * tree.h (assign_assembler_name_if_neeeded): Declare. * cgraphunit.c (cgraph_analyze_function): Create an assembler name for the function if needed. * testsuite/g++.dg/torture/pr43257.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@157393 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index f9fa00ff983..7e51ea624ae 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -4720,6 +4720,8 @@ extern tree build_low_bits_mask (tree, unsigned); extern tree tree_strip_nop_conversions (tree); extern tree tree_strip_sign_nop_conversions (tree); extern tree lhd_gcc_personality (void); +extern void assign_assembler_name_if_neeeded (tree); + /* In cgraph.c */ extern void change_decl_assembler_name (tree, tree); -- cgit v1.2.1 From e6db644e168e952eba485ba7727808b3d24d4335 Mon Sep 17 00:00:00 2001 From: aldyh Date: Thu, 18 Mar 2010 20:41:40 +0000 Subject: * tree.h: Declare make_decl_rtl_for_debug. * varasm.c (make_decl_rtl_for_debug): New. * dwarf2out.c (rtl_for_decl_location): Call it. * cfgexpand.c (expand_debug_expr): Call it. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@157551 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 1 + 1 file changed, 1 insertion(+) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index 7e51ea624ae..bc3cd29453e 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -5131,6 +5131,7 @@ extern unsigned int update_alignment_for_field (record_layout_info, tree, unsigned int); /* varasm.c */ extern void make_decl_rtl (tree); +extern rtx make_decl_rtl_for_debug (tree); extern void make_decl_one_only (tree, tree); extern int supports_one_only (void); extern void resolve_unique_section (tree, int, int); -- cgit v1.2.1 From 7cf0dbf3e5eee1286c76c26a836622c9c9974736 Mon Sep 17 00:00:00 2001 From: steven Date: Fri, 2 Apr 2010 19:54:46 +0000 Subject: * ada/gcc-interface/Make-lang.in, alias.c, attribs.c, auto-inc-dec.c, basic-block.h, bb-reorder.c, calls.c, c-common.c, cgraph.h, collect2.h, config/alpha/alpha.c, config/alpha/alpha.md, config/alpha/predicates.md, config/arm/arm.md, config/arm/lib1funcs.asm, config/arm/neon-schedgen.ml, config/avr/avr.c, config/avr/avr.md, config/bfin/bfin.c, config/darwin9.h, config/darwin.c, config/darwin.h, config/h8300/h8300.c, config/i386/cpuid.h, config/i386/cygming.h, config/i386/cygwin.h, config/i386/mingw32.h, config/i386/msformat-c.c, config/i386/sol2-10.h, config/i386/xopintrin.h, config/ia64/ia64.c, config/ia64/ia64.md, config/ia64/sync.md, config/mep/mep.c, config/mips/mips.md, config/mn10300/mn10300.c, config/mn10300/mn10300.h, config/pa/pa.c, config/pa/pa.md, config/rs6000/aix.h, config/rs6000/dfp.md, config/rs6000/rs6000-builtin.def, config/rs6000/rs6000-c.c, config/rs6000/vector.md, config/rtems.h, config/rx/rx.md, config/s390/s390.md, config/sol2-c.c, config/sparc/sol2-bi.h, config/sparc/sol2-gas.h, config/sparc/sparc.h, config/sparc/sparc.md, config/sparc/sparc-protos.h, config/spu/spu.c, config/spu/spu-c.c, config/t-darwin, convert.c, c.opt, c-opts.c, cp/Make-lang.in, c-pretty-print.c, c-typeck.c, df-core.c, df-scan.c, diagnostic.c, diagnostic.h, doc/cppopts.texi, doc/cpp.texi, doc/extend.texi, doc/gimple.texi, doc/languages.texi, doc/plugins.texi, doc/rtl.texi, doc/standards.texi, doc/tree-ssa.texi, doc/trouble.texi, dominance.c, fold-const.c, fortran/Make-lang.in, fwprop.c, gcc-plugin.h, gensupport.c, gimple.h, gimple-iterator.c, graphite.c, graphite-clast-to-gimple.c, graphite-clast-to-gimple.h, graphite-dependences.c, graphite-poly.c, graphite-poly.h, graphite-ppl.c, graphite-ppl.h, graphite-scop-detection.c, graphite-sese-to-poly.c, graphite-sese-to-poly.h, ifcvt.c, intl.c, intl.h, ipa.c, ipa-cp.c, ipa-inline.c, ipa-prop.c, ipa-prop.h, ipa-pure-const.c, ipa-reference.c, ipa-type-escape.c, ira-color.c, ira-conflicts.c, ira-lives.c, java/Make-lang.in, lambda-code.c, loop-invariant.c, lto/Make-lang.in, lto-streamer.h, lto-streamer-in.c, objc/Make-lang.in, objcp/Make-lang.in, omp-low.c, optc-gen.awk, opt-functions.awk, opth-gen.awk, params.def, passes.c, postreload-gcse.c, print-tree.c, recog.c, regrename.c, reload.h, rtl.def, sched-int.h, sched-rgn.c, sel-sched-dump.c, sese.c, sese.h, store-motion.c, stor-layout.c, tree-cfgcleanup.c, tree-chrec.c, tree-complex.c, tree-data-ref.c, tree.def, tree-eh.c, tree-flow.h, tree-flow-inline.h, tree.h, tree-loop-distribution.c, tree-outof-ssa.c, tree-parloops.c, tree-pass.h, tree-predcom.c, tree-profile.c, tree-scalar-evolution.c, tree-ssa-address.c, tree-ssa-alias.c, tree-ssa-coalesce.c, tree-ssa-copy.c, tree-ssa-dce.c, tree-ssa-dom.c, tree-ssa-dse.c, tree-ssa-loop-im.c, tree-ssa-loop-ivcanon.c, tree-ssa-loop-manip.c, tree-ssa-math-opts.c, tree-ssa-operands.c, tree-ssa-pre.c, tree-ssa-sccvn.c, tree-ssa-structalias.c, tree-ssa-uncprop.c, tree-tailcall.c, tree-vect-data-refs.c, tree-vect-loop.c, tree-vectorizer.h, tree-vect-slp.c, tree-vrp.c, unwind-dw2-fde-darwin.c, varpool.c: Update copyright years. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@157950 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index bc3cd29453e..c5c7b01e2e5 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -1,6 +1,6 @@ /* Front-end tree definitions for GNU compiler. Copyright (C) 1989, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, - 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 + 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. This file is part of GCC. -- cgit v1.2.1 From 4081d362fba108e17784f385774bfae44e2dcee2 Mon Sep 17 00:00:00 2001 From: jakub Date: Wed, 7 Apr 2010 20:27:37 +0000 Subject: * tree-ssa-pre.c (my_rev_post_order_compute): Remove set but not used count variable. * genemit.c (gen_expand, gen_split): Avoid set but not used warnings when operandN variables aren't used in the body of the expander or splitter. * tree-outof-ssa.c (FOR_EACH_ELIM_GRAPH_SUCC, FOR_EACH_ELIM_GRAPH_PRED): Avoid set but not used warnings. * tree-ssa-operands.h (FOR_EACH_SSA_TREE_OPERAND): Likewise. * tree-flow.h (FOR_EACH_IMM_USE_FAST, FOR_EACH_IMM_USE_STMT, FOR_EACH_IMM_USE_ON_STMT): Likewise. * tree.h (FOR_EACH_CONSTRUCTOR_ELT): Likewise. * tree.c (PROCESS_ARG): Likewise. fortran/ * parse.c (parse_derived, parse_enum): Avoid set but not used warning. java/ * expr.c (process_jvm_instruction): Avoid set but not used warning. * builtins.c (compareAndSwapInt_builtin, compareAndSwapLong_builtin, getVolatile_builtin): Likewise. libjava/ * exception.cc (_Jv_Throw): Avoid set but not used warning. * include/java-assert.h (JvAssertMessage, JvAssert): Use argument in sizeof to avoid set but not used warnings. libjava/classpath/ * native/jni/midi-alsa/gnu_javax_sound_midi_alsa_AlsaPortDevice.c (Java_gnu_javax_sound_midi_alsa_AlsaPortDevice_run_1receiver_1thread_1): Avoid set but not used warning. libiberty/ * regex.c (byte_re_match_2_internal): Avoid set but not used warning. gcc/testsuite/ * gcc.dg/builtin-choose-expr.c: Avoid set but not used warnings. * gcc.dg/trunc-1.c: Likewise. * gcc.dg/vla-9.c: Likewise. * gcc.dg/dfp/composite-type.c: Likewise. libffi/ * testsuite/libffi.call/err_bad_abi.c: Remove unused args variable. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@158084 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index c5c7b01e2e5..4a0fb5e6405 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -1507,9 +1507,9 @@ struct GTY(()) tree_vec { #define FOR_EACH_CONSTRUCTOR_ELT(V, IX, INDEX, VAL) \ for (IX = 0; (IX >= VEC_length (constructor_elt, V)) \ ? false \ - : ((VAL = VEC_index (constructor_elt, V, IX)->value), \ + : (((void) (VAL = VEC_index (constructor_elt, V, IX)->value)), \ (INDEX = VEC_index (constructor_elt, V, IX)->index), \ - true); \ + true); \ (IX)++) /* Append a new constructor element to V, with the specified INDEX and VAL. */ -- cgit v1.2.1 From abc6c64fb2e068f6dab7035c99168fbca347a353 Mon Sep 17 00:00:00 2001 From: jakub Date: Wed, 7 Apr 2010 20:33:36 +0000 Subject: PR c/18624 * tree.h (DECL_READ_P): Define. (struct tree_decl_common): Add decl_read_flag. * c-decl.c (pop_scope): If TREE_USED but !DECL_READ_P, issue a set but not used warning. (merge_decls): Merge DECL_READ_P flag. (finish_decl, build_compound_literal): Set DECL_READ_P flag. (finish_function): Issue -Wunused-but-set-parameter diagnostics. * c-common.c (handle_used_attribute, handle_unused_attribute): Likewise. * c-tree.h (default_function_array_read_conversion, mark_exp_read): New prototypes. * c-typeck.c (default_function_array_read_conversion, mark_exp_read): New functions. (default_conversion, c_process_expr_stmt): Call mark_exp_read. * c-parser.c (c_parser_initializer, c_parser_expr_no_commas, c_parser_binary_expression, c_parser_cast_expression, c_parser_expr_list, c_parser_omp_atomic, c_parser_omp_for_loop): Call default_function_array_read_conversion instead of default_function_array_conversion where needed. (c_parser_unary_expression, c_parser_conditional_expression, c_parser_postfix_expression_after_primary, c_parser_initelt): Likewise. Call mark_exp_read where needed. (c_parser_statement_after_labels, c_parser_asm_operands, c_parser_typeof_specifier, c_parser_sizeof_expression, c_parser_alignof_expression, c_parser_initval): Call mark_exp_read where needed. * common.opt (Wunused-but-set-variable, Wunused-but-set-parameter): New. * toplev.c (warn_unused_but_set_variable): Default to warn_unused. (warn_unused_but_set_parameter): Default to warn_unused && extra_warnings. * doc/invoke.texi: Document -Wunused-but-set-variable and -Wunused-but-set-parameter. * objc-act.c (finish_var_decl, objc_begin_catch_clause, really_start_method, get_super_receiver, handle_class_ref): Set DECL_READ_P in addition to TREE_USED. * gcc.dg/Wunused-var-1.c: New test. * gcc.dg/Wunused-var-2.c: New test. * gcc.dg/Wunused-var-3.c: New test. * gcc.dg/Wunused-var-4.c: New test. * gcc.dg/Wunused-var-5.c: New test. * gcc.dg/Wunused-var-6.c: New test. * gcc.dg/Wunused-parm-1.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@158086 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index 4a0fb5e6405..96c95758dd9 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -1317,6 +1317,9 @@ extern void omp_clause_range_check_failed (const_tree, const char *, int, (TREE_CHECK3 (NODE, VAR_DECL, PARM_DECL, \ RESULT_DECL)->decl_common.decl_restricted_flag) +#define DECL_READ_P(NODE) \ + (TREE_CHECK2 (NODE, VAR_DECL, PARM_DECL)->decl_common.decl_read_flag) + /* In a CALL_EXPR, means that the call is the jump from a thunk to the thunked-to function. */ #define CALL_FROM_THUNK_P(NODE) (CALL_EXPR_CHECK (NODE)->base.protected_flag) @@ -2691,8 +2694,12 @@ struct GTY(()) tree_decl_common { /* In VAR_DECL, PARM_DECL and RESULT_DECL, this is DECL_RESTRICTED_P. */ unsigned decl_restricted_flag : 1; + /* In VAR_DECL and PARM_DECL set when the decl has been used except for + being set. */ + unsigned decl_read_flag : 1; + /* Padding so that 'off_align' can be on a 32-bit boundary. */ - unsigned decl_common_unused : 2; + unsigned decl_common_unused : 1; /* DECL_OFFSET_ALIGN, used only for FIELD_DECLs. */ unsigned int off_align : 8; -- cgit v1.2.1 From 4cd5bb613c816cf996ca11a356cff1c7870806b0 Mon Sep 17 00:00:00 2001 From: ebotcazou Date: Thu, 8 Apr 2010 20:16:36 +0000 Subject: * tree.h (TREE_ADDRESSABLE): Document its effect for function types. * calls.c (expand_call): Pass the function type to aggregate_value_p. * function.c (aggregate_value_p): Do not honor DECL_BY_REFERENCE on the target function of a CALL_EXPR. Honor TREE_ADDRESSABLE on the function type instead. Reorder and simplify checks. * gimplify.c (gimplify_modify_expr_rhs) : New case. ada/ * gcc-interface/ada-tree.h (TYPE_RETURNS_UNCONSTRAINED_P): Rename into. (TYPE_RETURN_UNCONSTRAINED_P): ...this. (TYPE_RETURNS_BY_REF_P): Rename into. (TYPE_RETURN_BY_DIRECT_REF_P): ...this. (TYPE_RETURNS_BY_TARGET_PTR_P): Delete. * gcc-interface/gigi.h (create_subprog_type): Adjust parameter names. (build_return_expr): Likewise. * gcc-interface/decl.c (gnat_to_gnu_entity) : Rename local variables. If the return Mechanism is By_Reference, pass return_by_invisible_ref_p to create_subprog_type instead of toggling TREE_ADDRESSABLE. Test return_by_invisible_ref_p in order to annotate the mechanism. Use regular return for contrained types with non-static size and return by invisible reference for unconstrained return types with default discriminants. Update comment. * gcc-interface/trans.c (Subprogram_Body_to_gnu): If the function returns by invisible reference, turn the RESULT_DECL into a pointer. Do not handle DECL_BY_REF_P in the CICO case here. (call_to_gnu): Remove code handling return by target pointer. For a function call, if the return type has non-constant size, generate the assignment with an INIT_EXPR. (gnat_to_gnu) : Remove dead code in the CICO case. If the function returns by invisible reference, build the copy return operation manually. (add_decl_expr): Initialize the variable with an INIT_EXPR. * gcc-interface/utils.c (create_subprog_type): Adjust parameter names. Adjust for renaming of macros. Copy the node only when necessary. (create_subprog_decl): Do not toggle TREE_ADDRESSABLE on the return type, only change DECL_BY_REFERENCE on the RETURN_DECL. (convert_from_reference): Delete. (is_byref_result): Likewise. (gnat_genericize_r): Likewise. (gnat_genericize): Likewise. (end_subprog_body): Do not call gnat_genericize. * gcc-interface/utils2.c (build_binary_op) : New case. (build_return_expr): Adjust parameter names, logic and comment. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@158139 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index 96c95758dd9..1c7c3b3ca41 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -1110,9 +1110,10 @@ extern void omp_clause_range_check_failed (const_tree, const char *, int, In CONSTRUCTOR nodes, it means object constructed must be in memory. In LABEL_DECL nodes, it means a goto for this label has been seen from a place outside all binding contours that restore stack levels. - In ..._TYPE nodes, it means that objects of this type must - be fully addressable. This means that pieces of this - object cannot go into register parameters, for example. + In ..._TYPE nodes, it means that objects of this type must be fully + addressable. This means that pieces of this object cannot go into + register parameters, for example. If this a function type, this + means that the value must be returned in memory. In IDENTIFIER_NODEs, this means that some extern decl for this name had its address taken. That matters for inline functions. */ #define TREE_ADDRESSABLE(NODE) ((NODE)->base.addressable_flag) -- cgit v1.2.1 From 412839221276fd0a251ba61296262b09352c5927 Mon Sep 17 00:00:00 2001 From: aesok Date: Wed, 14 Apr 2010 22:05:32 +0000 Subject: * double-int.h (HOST_BITS_PER_DOUBLE_INT): Define. (double_int_not, double_int_lshift, double_int_rshift): Declare. (double_int_negative_p): Convert to static inline function. * double-int.c (double_int_lshift, double_int_lshift): Add new function. (double_int_negative_p): Remove. * tree.h (lshift_double, rshift_double): * tree.c (build_low_bits_mask): Clean up, use double_int_* functions. * fold-const.c (fold_convert_const_int_from_real, fold_convert_const_int_from_fixed, div_if_zero_remainder): (Ditto.). (lshift_double): Change type of arith argument to bool. (rshift_double): Change type of arith argument to bool. Correct comment. * expmed.c (mask_rtx, lshift_value): (Ditto.). git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@158360 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index 1c7c3b3ca41..e30981ef0dd 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -4841,10 +4841,10 @@ extern int mul_double_with_sign (unsigned HOST_WIDE_INT, HOST_WIDE_INT, mul_double_with_sign (l1, h1, l2, h2, lv, hv, false) extern void lshift_double (unsigned HOST_WIDE_INT, HOST_WIDE_INT, HOST_WIDE_INT, unsigned int, - unsigned HOST_WIDE_INT *, HOST_WIDE_INT *, int); + unsigned HOST_WIDE_INT *, HOST_WIDE_INT *, bool); extern void rshift_double (unsigned HOST_WIDE_INT, HOST_WIDE_INT, HOST_WIDE_INT, unsigned int, - unsigned HOST_WIDE_INT *, HOST_WIDE_INT *, int); + unsigned HOST_WIDE_INT *, HOST_WIDE_INT *, bool); extern void lrotate_double (unsigned HOST_WIDE_INT, HOST_WIDE_INT, HOST_WIDE_INT, unsigned int, unsigned HOST_WIDE_INT *, HOST_WIDE_INT *); -- cgit v1.2.1 From b2afff2d97f09cb4c4921f5af82ea52f26b74adb Mon Sep 17 00:00:00 2001 From: rguenth Date: Thu, 15 Apr 2010 12:45:58 +0000 Subject: 2010-04-15 Richard Guenther * fold-const.c (LOWPART, HIGHPART, BASE, encode, decode, fit_double_type, force_fit_type_double, add_double_with_sign, neg_double, mul_double_with_sign, lshift_double, rshift_double, lrotate_double, rrotate_double, div_and_round_double): Move ... * double-int.c: ... here. * tree.h (force_fit_type_double, fit_double_type, add_double_with_sign, add_double, neg_double, mul_double_with_sign, mul_double, lshift_double, rshift_double, lrotate_double, rrotate_double, div_and_round_double): Move prototypes ... * double-int.h: ... here. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@158372 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 38 -------------------------------------- 1 file changed, 38 deletions(-) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index e30981ef0dd..447451254f4 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -4820,44 +4820,6 @@ 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 force_fit_type_double (tree, unsigned HOST_WIDE_INT, HOST_WIDE_INT, - int, bool); - -extern int fit_double_type (unsigned HOST_WIDE_INT, HOST_WIDE_INT, - unsigned HOST_WIDE_INT *, HOST_WIDE_INT *, const_tree); -extern int add_double_with_sign (unsigned HOST_WIDE_INT, HOST_WIDE_INT, - unsigned HOST_WIDE_INT, HOST_WIDE_INT, - unsigned HOST_WIDE_INT *, HOST_WIDE_INT *, - bool); -#define add_double(l1,h1,l2,h2,lv,hv) \ - add_double_with_sign (l1, h1, l2, h2, lv, hv, false) -extern int neg_double (unsigned HOST_WIDE_INT, HOST_WIDE_INT, - unsigned HOST_WIDE_INT *, HOST_WIDE_INT *); -extern int mul_double_with_sign (unsigned HOST_WIDE_INT, HOST_WIDE_INT, - unsigned HOST_WIDE_INT, HOST_WIDE_INT, - unsigned HOST_WIDE_INT *, HOST_WIDE_INT *, - bool); -#define mul_double(l1,h1,l2,h2,lv,hv) \ - mul_double_with_sign (l1, h1, l2, h2, lv, hv, false) -extern void lshift_double (unsigned HOST_WIDE_INT, HOST_WIDE_INT, - HOST_WIDE_INT, unsigned int, - unsigned HOST_WIDE_INT *, HOST_WIDE_INT *, bool); -extern void rshift_double (unsigned HOST_WIDE_INT, HOST_WIDE_INT, - HOST_WIDE_INT, unsigned int, - unsigned HOST_WIDE_INT *, HOST_WIDE_INT *, bool); -extern void lrotate_double (unsigned HOST_WIDE_INT, HOST_WIDE_INT, - HOST_WIDE_INT, unsigned int, - unsigned HOST_WIDE_INT *, HOST_WIDE_INT *); -extern void rrotate_double (unsigned HOST_WIDE_INT, HOST_WIDE_INT, - HOST_WIDE_INT, unsigned int, - unsigned HOST_WIDE_INT *, HOST_WIDE_INT *); - -extern int div_and_round_double (enum tree_code, int, unsigned HOST_WIDE_INT, - HOST_WIDE_INT, unsigned HOST_WIDE_INT, - HOST_WIDE_INT, unsigned HOST_WIDE_INT *, - HOST_WIDE_INT *, unsigned HOST_WIDE_INT *, - HOST_WIDE_INT *); - enum operand_equal_flag { OEP_ONLY_CONST = 1, -- cgit v1.2.1 From 2d18b16deada5c2be61ffbaef3a39df85849f680 Mon Sep 17 00:00:00 2001 From: rguenth Date: Thu, 15 Apr 2010 12:58:05 +0000 Subject: 2010-04-15 Richard Guenther * Makefile.in (OBJS-common): Add gimple-fold.o. (gimple-fold.o): New rule. * tree.h (maybe_fold_offset_to_reference, maybe_fold_offset_to_address, maybe_fold_stmt_addition): Move prototypes ... * gimple.h: ... here. * tree-flow.h (fold_stmt, fold_stmt_inplace, get_symbol_constant_value, may_propagate_address_into_dereference): Move prototypes ... * gimple.h: ... here. * tree-ssa-ccp.c (get_symbol_constant_value, may_propagate_address_into_dereference, maybe_fold_offset_to_array_ref, maybe_fold_offset_to_component_ref, maybe_fold_offset_to_reference, maybe_fold_offset_to_address, maybe_fold_stmt_indirect, maybe_fold_stmt_addition, maybe_fold_reference, get_maxval_strlen, ccp_fold_builtin, fold_gimple_assign, fold_gimple_cond, fold_gimple_call, fold_stmt_1, fold_stmt, fold_stmt_inplace, gimplify_and_update_call_from_tree): Move ... * gimple-fold.c: ... here. New file. (ccp_fold_builtin): Rename to ... (gimple_fold_builtin): ... this. * tree-ssa-ccp.c (execute_fold_all_builtins): Adjust. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@158373 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 5 ----- 1 file changed, 5 deletions(-) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index 447451254f4..8c979c066be 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -5282,11 +5282,6 @@ struct GTY(()) tree_priority_map { tree target_for_debug_bind (tree); -/* In tree-ssa-ccp.c */ -extern tree maybe_fold_offset_to_reference (location_t, tree, tree, tree); -extern tree maybe_fold_offset_to_address (location_t, tree, tree, tree); -extern tree maybe_fold_stmt_addition (location_t, tree, tree, tree); - /* In tree-ssa-address.c. */ extern tree tree_mem_ref_addr (tree, tree); extern void copy_mem_ref_info (tree, tree); -- cgit v1.2.1 From 1a981e1a975098bd537556d2b36f275f3bc075c7 Mon Sep 17 00:00:00 2001 From: rguenth Date: Thu, 15 Apr 2010 13:16:44 +0000 Subject: 2010-04-15 Richard Guenther * tree-ssa-structalias.c (struct variable_info): Add is_fn_info flag. (new_var_info): Initialize it. (dump_constraints): Support printing last added constraints. (debug_constraints): Adjust. (dump_constraint_graph): Likewise. (make_heapvar_for): Check for NULL cfun. (get_function_part_constraint): New function. (get_fi_for_callee): Likewise. (find_func_aliases): Properly implement IPA PTA constraints. (process_ipa_clobber): New function. (find_func_clobbers): Likewise. (insert_into_field_list_sorted): Remove. (create_function_info_for): Properly allocate vars for IPA mode. Do not use insert_into_field_list_sorted. (create_variable_info_for): Properly generate constraints for global vars in IPA mode. (dump_solution_for_var): Always dump the solution. (set_uids_in_ptset): Initialize DECL_PT_UID if in ipa-mode. (find_what_var_points_to): Adjust. (pt_solution_set): Change. (pt_solution_ior_into): New function. (pt_solution_empty_p): Export. (pt_solution_includes_global): Adjust. (pt_solution_includes_1): Likewise. (pt_solutions_intersect_1): Likewise. (dump_sa_points_to_info): Check some invariants. (solve_constraints): Move constraint dumping ... (compute_points_to_sets): ... here. (ipa_pta_execute): ... and here. (compute_may_aliases): Do not re-compute points-to info locally if IPA info is available. (ipa_escaped_pt): New global var. (ipa_pta_execute): Properly implement IPA PTA. * tree-into-ssa.c (dump_decl_set): Support dumping decls not in referenced-vars. * tree-flow.h (struct gimple_df): Add ipa_pta flag. * tree-ssa-alias.c (ptr_deref_may_alias_decl_p): Adjust. (dump_points_to_solution): Likewise. * tree-dfa.c (dump_variable): Also dump DECL_PT_UID. * tree-inline.c (remap_ssa_name): Copy IPA points-to solution. (remap_gimple_stmt): Reset call clobber/use information if necessary. (copy_decl_to_var): Copy DECL_PT_UID. (copy_result_decl_to_var): Likewise. * tree.c (make_node_stat): Initialize DECL_PT_UID. (copy_node_stat): Copy it. * tree.h (DECL_PT_UID): New macro. (SET_DECL_PT_UID): Likewise. (DECL_PT_UID_SET_P): Likewise. (struct tree_decl_minimal): Add pt_uid member. * tree-ssa-alias.h (struct pt_solution): Add ipa_escaped flag. (pt_solution_empty_p): Declare. (pt_solution_set): Adjust. (ipa_escaped_pt): Declare. * cfgexpand.c (update_alias_info_with_stack_vars): Adjust. * gimple-pretty-print.c (pp_points_to_solution): New function. (dump_gimple_call): Dump call clobber/use information. * tree-dump.c (dump_option_value_in): Add TDF_ALIAS entry. * tree-pass.h (TDF_ALIAS): New dump option. * tree-pretty-print.c (dump_decl_name): Dump DECL_PT_UID if asked to. * doc/invoke.texi (-fipa-pta): Update documentation. * gcc.dg/ipa/ipa-pta-1.c: New testcase. * gcc.dg/ipa/ipa-pta-2.c: Likewise. * gcc.dg/ipa/ipa-pta-3.c: Likewise. * gcc.dg/ipa/ipa-pta-4.c: Likewise. * gcc.dg/ipa/ipa-pta-5.c: Likewise. * gcc.dg/ipa/ipa-pta-6.c: Likewise. * gcc.dg/ipa/ipa-pta-7.c: Likewise. * gcc.dg/ipa/ipa-pta-8.c: Likewise. * gcc.dg/ipa/ipa-pta-9.c: Likewise. * gcc.dg/ipa/ipa-pta-10.c: Likewise. * gcc.dg/ipa/ipa-pta-11.c: Likewise. * gcc.dg/ipa/ipa-pta-12.c: Likewise. * gcc.dg/ipa/ipa-pta-13.c: Likewise. * gcc.dg/torture/ipa-pta-2.c: Likewise. * gcc.dg/torture/ipa-pta-1.c: Adjust. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@158374 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index 8c979c066be..ad958119a22 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -2489,6 +2489,15 @@ struct function; uses. */ #define DEBUG_TEMP_UID(NODE) (-DECL_UID (TREE_CHECK ((NODE), DEBUG_EXPR_DECL))) +/* Every ..._DECL node gets a unique number that stays the same even + when the decl is copied by the inliner once it is set. */ +#define DECL_PT_UID(NODE) (DECL_MINIMAL_CHECK (NODE)->decl_minimal.pt_uid == -1u ? (NODE)->decl_minimal.uid : (NODE)->decl_minimal.pt_uid) +/* Initialize the ..._DECL node pt-uid to the decls uid. */ +#define SET_DECL_PT_UID(NODE, UID) (DECL_MINIMAL_CHECK (NODE)->decl_minimal.pt_uid = (UID)) +/* Whether the ..._DECL node pt-uid has been initialized and thus needs to + be preserved when copyin the decl. */ +#define DECL_PT_UID_SET_P(NODE) (DECL_MINIMAL_CHECK (NODE)->decl_minimal.pt_uid != -1u) + /* These two fields describe where in the source code the declaration was. If the declaration appears in several places (as for a C function that is declared first and then defined later), this @@ -2512,6 +2521,7 @@ struct GTY(()) tree_decl_minimal { struct tree_common common; location_t locus; unsigned int uid; + unsigned int pt_uid; tree name; tree context; }; -- cgit v1.2.1 From a44dc11544d24e159da34f774c93f4383131486e Mon Sep 17 00:00:00 2001 From: rguenth Date: Fri, 16 Apr 2010 13:33:31 +0000 Subject: 2010-04-16 Richard Guenther * tree.h (struct tree_decl_minimal): Move pt_uid ... (struct tree_decl_common): ... here. (DECL_PT_UID): Adjust. (SET_DECL_PT_UID): Likewise. (DECL_PT_UID_SET_P): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@158421 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index ad958119a22..ee6f1a4f598 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -2491,12 +2491,12 @@ struct function; /* Every ..._DECL node gets a unique number that stays the same even when the decl is copied by the inliner once it is set. */ -#define DECL_PT_UID(NODE) (DECL_MINIMAL_CHECK (NODE)->decl_minimal.pt_uid == -1u ? (NODE)->decl_minimal.uid : (NODE)->decl_minimal.pt_uid) +#define DECL_PT_UID(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.pt_uid == -1u ? (NODE)->decl_minimal.uid : (NODE)->decl_common.pt_uid) /* Initialize the ..._DECL node pt-uid to the decls uid. */ -#define SET_DECL_PT_UID(NODE, UID) (DECL_MINIMAL_CHECK (NODE)->decl_minimal.pt_uid = (UID)) +#define SET_DECL_PT_UID(NODE, UID) (DECL_COMMON_CHECK (NODE)->decl_common.pt_uid = (UID)) /* Whether the ..._DECL node pt-uid has been initialized and thus needs to be preserved when copyin the decl. */ -#define DECL_PT_UID_SET_P(NODE) (DECL_MINIMAL_CHECK (NODE)->decl_minimal.pt_uid != -1u) +#define DECL_PT_UID_SET_P(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.pt_uid != -1u) /* These two fields describe where in the source code the declaration was. If the declaration appears in several places (as for a C @@ -2521,7 +2521,6 @@ struct GTY(()) tree_decl_minimal { struct tree_common common; location_t locus; unsigned int uid; - unsigned int pt_uid; tree name; tree context; }; @@ -2720,6 +2719,9 @@ struct GTY(()) tree_decl_common { /* DECL_ALIGN. It should have the same size as TYPE_ALIGN. */ unsigned int align; + /* UID for points-to sets, stable over copying from inlining. */ + unsigned int pt_uid; + tree size_unit; tree initial; tree attributes; -- cgit v1.2.1 From ad086ed471d513856fff3cf8325b8d5e0ee571a4 Mon Sep 17 00:00:00 2001 From: ebotcazou Date: Sun, 18 Apr 2010 21:49:29 +0000 Subject: =?UTF-8?q?2010-04-18=20=C2=A0Eric=20Botcazou=20=C2=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fold-const.c (fold_comparison): Use ssizetype. * gimple-fold.c (maybe_fold_offset_to_array_ref): Likewise. * ipa-prop.c (ipa_modify_call_arguments): Use sizetype. * tree-loop-distribution.c (build_size_arg_loc): Likewise. * tree-object-size.c (compute_object_sizes): Use size_type_node. * tree.h (initialize_sizetypes): Remove parameter. (build_common_tree_nodes): Remove second parameter. * stor-layout.c (initialize_sizetypes): Remove parameter. Always create an unsigned type. (set_sizetype): Assert that the passed type is unsigned and simplify. * tree.c (build_common_tree_nodes): Remove second parameter. Adjust call to initialize_sizetypes. * c-decl.c (c_init_decl_processing): Remove second argument in call to build_common_tree_nodes. cp/ * decl.c (cxx_init_decl_processing): Remove second argument in call to build_common_tree_nodes. java/ * decl.c (java_init_decl_processing): Remove argument in call to initialize_sizetypes fortran/ * f95-lang.c (gfc_init_decl_processing): Remove second argument in call to build_common_tree_nodes. ada/ * gcc-interface/misc.c (gnat_init): Remove second argument in call to build_common_tree_nodes. lto/ * lto-lang.c (lto_init): Remove second argument in call to build_common_tree_nodes. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@158496 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index ee6f1a4f598..d900dc08638 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -3967,7 +3967,7 @@ extern tree make_unsigned_type (int); extern tree signed_or_unsigned_type_for (int, tree); extern tree signed_type_for (tree); extern tree unsigned_type_for (tree); -extern void initialize_sizetypes (bool); +extern void initialize_sizetypes (void); extern void set_sizetype (tree); extern void fixup_unsigned_type (tree); extern tree build_pointer_type_for_mode (tree, enum machine_mode, bool); @@ -4981,7 +4981,7 @@ extern int real_onep (const_tree); extern int real_twop (const_tree); extern int real_minus_onep (const_tree); extern void init_ttree (void); -extern void build_common_tree_nodes (bool, bool); +extern void build_common_tree_nodes (bool); extern void build_common_tree_nodes_2 (int); extern void build_common_builtin_nodes (void); extern tree build_nonstandard_integer_type (unsigned HOST_WIDE_INT, int); -- cgit v1.2.1 From 7765d0dbc2566112b60c627e41b02a13dd943b43 Mon Sep 17 00:00:00 2001 From: jakub Date: Mon, 19 Apr 2010 07:48:46 +0000 Subject: * tree.h (ENUM_IS_SCOPED): Define. * dwarf2out.c (gen_enumeration_type_die): Add DW_AT_enum_class for ENUM_IS_SCOPED enums. cp/ * cp-tree.h (SCOPED_ENUM_P, UNSCOPED_ENUM_P, SET_SCOPED_ENUM_P): Use ENUM_IS_SCOPED bit instead of TYPE_LANG_FLAG_5. testsuite/ * g++.dg/debug/dwarf2/enum1.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@158505 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index d900dc08638..7d8725639a0 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -457,6 +457,9 @@ struct GTY(()) tree_common { CALL_CANNOT_INLINE_P in CALL_EXPR + + ENUM_IS_SCOPED in + ENUMERAL_TYPE public_flag: @@ -1162,6 +1165,9 @@ extern void omp_clause_range_check_failed (const_tree, const char *, int, /* Used to mark a CALL_EXPR as not suitable for inlining. */ #define CALL_CANNOT_INLINE_P(NODE) (CALL_EXPR_CHECK (NODE)->base.static_flag) +/* Used to mark scoped enums. */ +#define ENUM_IS_SCOPED(NODE) (ENUMERAL_TYPE_CHECK (NODE)->base.static_flag) + /* In an expr node (usually a conversion) this means the node was made implicitly and should not lead to any sort of warning. In a decl node, warnings concerning the decl should be suppressed. This is used at -- cgit v1.2.1 From 678b5e9bbb2c33395faf6f506e4940dba1e978c4 Mon Sep 17 00:00:00 2001 From: jakub Date: Tue, 20 Apr 2010 08:33:47 +0000 Subject: * tree.h (TYPE_REF_IS_RVALUE): Define. * dwarf2out.c (attr_checksum_ordered, is_type_die, is_comdat_die, should_move_die_to_comdat, prune_unused_types_walk): Handle DW_TAG_rvalue_reference_type like DW_TAG_reference_type. (modified_type_die, gen_reference_type_die): Emit DW_TAG_rvalue_reference_type instead of DW_TAG_reference_type if TYPE_REF_IS_RVALUE and -gdwarf-4. * cp-tree.h (TYPE_REF_IS_RVALUE): Remove. * g++.dg/debug/dwarf2/rv1.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@158542 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index 7d8725639a0..f73be797eef 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -504,6 +504,9 @@ struct GTY(()) tree_common { OMP_CLAUSE_PRIVATE_OUTER_REF in OMP_CLAUSE_PRIVATE + TYPE_REF_IS_RVALUE in + REFERENCE_TYPE + protected_flag: TREE_PROTECTED in @@ -1347,6 +1350,10 @@ extern void omp_clause_range_check_failed (const_tree, const char *, int, /* Used in classes in C++. */ #define TREE_PROTECTED(NODE) ((NODE)->base.protected_flag) +/* True if reference type NODE is a C++ rvalue reference. */ +#define TYPE_REF_IS_RVALUE(NODE) \ + (REFERENCE_TYPE_CHECK (NODE)->base.private_flag) + /* Nonzero in a _DECL if the use of the name is defined as a deprecated feature by __attribute__((deprecated)). */ #define TREE_DEPRECATED(NODE) \ -- cgit v1.2.1 From eb65426ae34d082127b3466ca80b78bebf704be6 Mon Sep 17 00:00:00 2001 From: ebotcazou Date: Tue, 27 Apr 2010 17:56:52 +0000 Subject: * tree.h: Fix truncated long macros. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@158792 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 254 ++++++++++++++++++++++++++++++++++++++----------------------- 1 file changed, 157 insertions(+), 97 deletions(-) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index f73be797eef..5aa994add19 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -1419,7 +1419,8 @@ struct GTY(()) tree_real_cst { /* In a FIXED_CST node. */ struct fixed_value; -#define TREE_FIXED_CST_PTR(NODE) (FIXED_CST_CHECK (NODE)->fixed_cst.fixed_cst_ptr) +#define TREE_FIXED_CST_PTR(NODE) \ + (FIXED_CST_CHECK (NODE)->fixed_cst.fixed_cst_ptr) #define TREE_FIXED_CST(NODE) (*TREE_FIXED_CST_PTR (NODE)) struct GTY(()) tree_fixed_cst { @@ -1506,7 +1507,8 @@ struct GTY(()) tree_vec { #define CONSTRUCTOR_ELTS(NODE) (CONSTRUCTOR_CHECK (NODE)->constructor.elts) #define CONSTRUCTOR_ELT(NODE,IDX) \ (VEC_index (constructor_elt, CONSTRUCTOR_ELTS (NODE), IDX)) -#define CONSTRUCTOR_NELTS(NODE) (VEC_length (constructor_elt, CONSTRUCTOR_ELTS (NODE))) +#define CONSTRUCTOR_NELTS(NODE) \ + (VEC_length (constructor_elt, CONSTRUCTOR_ELTS (NODE))) /* Iterate through the vector V of CONSTRUCTOR_ELT elements, yielding the value of each element (stored within VAL). IX must be a scratch variable @@ -1587,7 +1589,8 @@ struct GTY(()) tree_constructor { /* The source location of this expression. Non-tree_exp nodes such as decls and constants can be shared among multiple locations, so return nothing. */ -#define EXPR_LOCATION(NODE) (EXPR_P ((NODE)) ? (NODE)->exp.locus : UNKNOWN_LOCATION) +#define EXPR_LOCATION(NODE) \ + (EXPR_P ((NODE)) ? (NODE)->exp.locus : UNKNOWN_LOCATION) #define SET_EXPR_LOCATION(NODE, LOCUS) EXPR_CHECK ((NODE))->exp.locus = (LOCUS) #define EXPR_HAS_LOCATION(NODE) (EXPR_LOCATION (NODE) != UNKNOWN_LOCATION) #define EXPR_FILENAME(NODE) LOCATION_FILE (EXPR_CHECK ((NODE))->exp.locus) @@ -1882,7 +1885,7 @@ struct GTY(()) tree_exp { the very first reference to S in the function is a read operation. Default definitions are always created by an empty statement and belong to no basic block. */ -#define SSA_NAME_IS_DEFAULT_DEF(NODE) \ +#define SSA_NAME_IS_DEFAULT_DEF(NODE) \ SSA_NAME_CHECK (NODE)->base.default_def_flag /* Attributes for SSA_NAMEs for pointer-type variables. */ @@ -1975,9 +1978,12 @@ struct varray_head_tag; /* In a BLOCK node. */ #define BLOCK_VARS(NODE) (BLOCK_CHECK (NODE)->block.vars) -#define BLOCK_NONLOCALIZED_VARS(NODE) (BLOCK_CHECK (NODE)->block.nonlocalized_vars) -#define BLOCK_NUM_NONLOCALIZED_VARS(NODE) VEC_length (tree, BLOCK_NONLOCALIZED_VARS (NODE)) -#define BLOCK_NONLOCALIZED_VAR(NODE,N) VEC_index (tree, BLOCK_NONLOCALIZED_VARS (NODE), N) +#define BLOCK_NONLOCALIZED_VARS(NODE) \ + (BLOCK_CHECK (NODE)->block.nonlocalized_vars) +#define BLOCK_NUM_NONLOCALIZED_VARS(NODE) \ + VEC_length (tree, BLOCK_NONLOCALIZED_VARS (NODE)) +#define BLOCK_NONLOCALIZED_VAR(NODE,N) \ + VEC_index (tree, BLOCK_NONLOCALIZED_VARS (NODE), N) #define BLOCK_SUBBLOCKS(NODE) (BLOCK_CHECK (NODE)->block.subblocks) #define BLOCK_SUPERCONTEXT(NODE) (BLOCK_CHECK (NODE)->block.supercontext) /* Note: when changing this, make sure to find the places @@ -2118,7 +2124,8 @@ extern enum machine_mode vector_type_mode (const_tree); /* For a VECTOR_TYPE node, this describes a different type which is emitted in the debugging output. We use this to describe a vector as a structure containing an array. */ -#define TYPE_DEBUG_REPRESENTATION_TYPE(NODE) (VECTOR_TYPE_CHECK (NODE)->type.values) +#define TYPE_DEBUG_REPRESENTATION_TYPE(NODE) \ + (VECTOR_TYPE_CHECK (NODE)->type.values) /* For record and union types, information about this type, as a base type for itself. */ @@ -2504,18 +2511,23 @@ struct function; /* Every ..._DECL node gets a unique number that stays the same even when the decl is copied by the inliner once it is set. */ -#define DECL_PT_UID(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.pt_uid == -1u ? (NODE)->decl_minimal.uid : (NODE)->decl_common.pt_uid) +#define DECL_PT_UID(NODE) \ + (DECL_COMMON_CHECK (NODE)->decl_common.pt_uid == -1u \ + ? (NODE)->decl_minimal.uid : (NODE)->decl_common.pt_uid) /* Initialize the ..._DECL node pt-uid to the decls uid. */ -#define SET_DECL_PT_UID(NODE, UID) (DECL_COMMON_CHECK (NODE)->decl_common.pt_uid = (UID)) +#define SET_DECL_PT_UID(NODE, UID) \ + (DECL_COMMON_CHECK (NODE)->decl_common.pt_uid = (UID)) /* Whether the ..._DECL node pt-uid has been initialized and thus needs to be preserved when copyin the decl. */ -#define DECL_PT_UID_SET_P(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.pt_uid != -1u) +#define DECL_PT_UID_SET_P(NODE) \ + (DECL_COMMON_CHECK (NODE)->decl_common.pt_uid != -1u) /* These two fields describe where in the source code the declaration was. If the declaration appears in several places (as for a C function that is declared first and then defined later), this information should refer to the definition. */ -#define DECL_SOURCE_LOCATION(NODE) (DECL_MINIMAL_CHECK (NODE)->decl_minimal.locus) +#define DECL_SOURCE_LOCATION(NODE) \ + (DECL_MINIMAL_CHECK (NODE)->decl_minimal.locus) #define DECL_SOURCE_FILE(NODE) LOCATION_FILE (DECL_SOURCE_LOCATION (NODE)) #define DECL_SOURCE_LINE(NODE) LOCATION_LINE (DECL_SOURCE_LOCATION (NODE)) #define DECL_IS_BUILTIN(DECL) \ @@ -2529,7 +2541,8 @@ struct function; NULL_TREE or a TRANSLATION_UNIT_DECL if the given decl has "file scope". */ #define DECL_CONTEXT(NODE) (DECL_MINIMAL_CHECK (NODE)->decl_minimal.context) -#define DECL_FIELD_CONTEXT(NODE) (FIELD_DECL_CHECK (NODE)->decl_minimal.context) +#define DECL_FIELD_CONTEXT(NODE) \ + (FIELD_DECL_CHECK (NODE)->decl_minimal.context) struct GTY(()) tree_decl_minimal { struct tree_common common; location_t locus; @@ -2545,7 +2558,8 @@ struct GTY(()) tree_decl_minimal { The C front-end also uses this in a nested declaration of an inline function, to point back to the definition. */ -#define DECL_ABSTRACT_ORIGIN(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.abstract_origin) +#define DECL_ABSTRACT_ORIGIN(NODE) \ + (DECL_COMMON_CHECK (NODE)->decl_common.abstract_origin) /* Like DECL_ABSTRACT_ORIGIN, but returns NODE if there's no abstract origin. This is useful when setting the DECL_ABSTRACT_ORIGIN. */ @@ -2556,11 +2570,13 @@ struct GTY(()) tree_decl_minimal { inline instance of some original (abstract) decl from an inline function; suppress any warnings about shadowing some other variable. FUNCTION_DECL nodes can also have their abstract origin set to themselves. */ -#define DECL_FROM_INLINE(NODE) (DECL_ABSTRACT_ORIGIN (NODE) != NULL_TREE \ - && DECL_ABSTRACT_ORIGIN (NODE) != (NODE)) +#define DECL_FROM_INLINE(NODE) \ + (DECL_ABSTRACT_ORIGIN (NODE) != NULL_TREE \ + && DECL_ABSTRACT_ORIGIN (NODE) != (NODE)) /* In a DECL this is the field where attributes are stored. */ -#define DECL_ATTRIBUTES(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.attributes) +#define DECL_ATTRIBUTES(NODE) \ + (DECL_COMMON_CHECK (NODE)->decl_common.attributes) /* For a FUNCTION_DECL, holds the tree of BINDINGs. For a TRANSLATION_UNIT_DECL, holds the namespace's BLOCK. @@ -2585,7 +2601,8 @@ struct GTY(()) tree_decl_minimal { #define DECL_ALIGN_UNIT(NODE) (DECL_ALIGN (NODE) / BITS_PER_UNIT) /* Set if the alignment of this DECL has been set by the user, for example with an 'aligned' attribute. */ -#define DECL_USER_ALIGN(NODE) (DECL_COMMON_CHECK (NODE)->common.base.user_align) +#define DECL_USER_ALIGN(NODE) \ + (DECL_COMMON_CHECK (NODE)->common.base.user_align) /* Holds the machine mode corresponding to the declaration of a variable or field. Always equal to TYPE_MODE (TREE_TYPE (decl)) except for a FIELD_DECL. */ @@ -2606,7 +2623,8 @@ struct GTY(()) tree_decl_minimal { /* Nonzero for a given ..._DECL node means that the name of this node should be ignored for symbolic debug purposes. Moreover, for a FUNCTION_DECL, the body of the function should also be ignored. */ -#define DECL_IGNORED_P(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.ignored_flag) +#define DECL_IGNORED_P(NODE) \ + (DECL_COMMON_CHECK (NODE)->decl_common.ignored_flag) /* Nonzero for a given ..._DECL node means that this node represents an "abstract instance" of the given declaration (e.g. in the original @@ -2614,10 +2632,12 @@ struct GTY(()) tree_decl_minimal { information, we mustn't try to generate any address information for nodes marked as "abstract instances" because we don't actually generate any code or allocate any data space for such instances. */ -#define DECL_ABSTRACT(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.abstract_flag) +#define DECL_ABSTRACT(NODE) \ + (DECL_COMMON_CHECK (NODE)->decl_common.abstract_flag) /* Language-specific decl information. */ -#define DECL_LANG_SPECIFIC(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.lang_specific) +#define DECL_LANG_SPECIFIC(NODE) \ + (DECL_COMMON_CHECK (NODE)->decl_common.lang_specific) /* In a VAR_DECL or FUNCTION_DECL, nonzero means external reference: do not allocate storage, and refer to a definition elsewhere. Note that @@ -2635,26 +2655,38 @@ struct GTY(()) tree_decl_minimal { Also set in some languages for variables, etc., outside the normal lexical scope, such as class instance variables. */ -#define DECL_NONLOCAL(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.nonlocal_flag) +#define DECL_NONLOCAL(NODE) \ + (DECL_COMMON_CHECK (NODE)->decl_common.nonlocal_flag) /* Used in VAR_DECLs to indicate that the variable is a vtable. Used in FIELD_DECLs for vtable pointers. Used in FUNCTION_DECLs to indicate that the function is virtual. */ -#define DECL_VIRTUAL_P(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.virtual_flag) +#define DECL_VIRTUAL_P(NODE) \ + (DECL_COMMON_CHECK (NODE)->decl_common.virtual_flag) /* Used to indicate that this DECL represents a compiler-generated entity. */ -#define DECL_ARTIFICIAL(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.artificial_flag) +#define DECL_ARTIFICIAL(NODE) \ + (DECL_COMMON_CHECK (NODE)->decl_common.artificial_flag) /* Additional flags for language-specific uses. */ -#define DECL_LANG_FLAG_0(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.lang_flag_0) -#define DECL_LANG_FLAG_1(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.lang_flag_1) -#define DECL_LANG_FLAG_2(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.lang_flag_2) -#define DECL_LANG_FLAG_3(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.lang_flag_3) -#define DECL_LANG_FLAG_4(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.lang_flag_4) -#define DECL_LANG_FLAG_5(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.lang_flag_5) -#define DECL_LANG_FLAG_6(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.lang_flag_6) -#define DECL_LANG_FLAG_7(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.lang_flag_7) -#define DECL_LANG_FLAG_8(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.lang_flag_8) +#define DECL_LANG_FLAG_0(NODE) \ + (DECL_COMMON_CHECK (NODE)->decl_common.lang_flag_0) +#define DECL_LANG_FLAG_1(NODE) \ + (DECL_COMMON_CHECK (NODE)->decl_common.lang_flag_1) +#define DECL_LANG_FLAG_2(NODE) \ + (DECL_COMMON_CHECK (NODE)->decl_common.lang_flag_2) +#define DECL_LANG_FLAG_3(NODE) \ + (DECL_COMMON_CHECK (NODE)->decl_common.lang_flag_3) +#define DECL_LANG_FLAG_4(NODE) \ + (DECL_COMMON_CHECK (NODE)->decl_common.lang_flag_4) +#define DECL_LANG_FLAG_5(NODE) \ + (DECL_COMMON_CHECK (NODE)->decl_common.lang_flag_5) +#define DECL_LANG_FLAG_6(NODE) \ + (DECL_COMMON_CHECK (NODE)->decl_common.lang_flag_6) +#define DECL_LANG_FLAG_7(NODE) \ + (DECL_COMMON_CHECK (NODE)->decl_common.lang_flag_7) +#define DECL_LANG_FLAG_8(NODE) \ + (DECL_COMMON_CHECK (NODE)->decl_common.lang_flag_8) /* Nonzero for a decl which is at file scope. */ #define DECL_FILE_SCOPE_P(EXP) \ @@ -2755,7 +2787,7 @@ extern void decl_value_expr_insert (tree, tree); (TREE_CHECK2 (NODE, VAR_DECL, PARM_DECL)->decl_common.decl_flag_2) #define DECL_VALUE_EXPR(NODE) \ (decl_value_expr_lookup (DECL_WRTL_CHECK (NODE))) -#define SET_DECL_VALUE_EXPR(NODE, VAL) \ +#define SET_DECL_VALUE_EXPR(NODE, VAL) \ (decl_value_expr_insert (DECL_WRTL_CHECK (NODE), VAL)) /* Holds the RTL expression for the value of a variable or function. @@ -2773,12 +2805,14 @@ extern void decl_value_expr_insert (tree, tree); #define HAS_RTL_P(NODE) (CODE_CONTAINS_STRUCT (TREE_CODE (NODE), TS_DECL_WRTL)) /* Returns nonzero if the DECL_RTL for NODE has already been set. */ -#define DECL_RTL_SET_P(NODE) (HAS_RTL_P (NODE) && DECL_WRTL_CHECK (NODE)->decl_with_rtl.rtl != NULL) +#define DECL_RTL_SET_P(NODE) \ + (HAS_RTL_P (NODE) && DECL_WRTL_CHECK (NODE)->decl_with_rtl.rtl != NULL) /* Copy the RTL from NODE1 to NODE2. If the RTL was not set for NODE1, it will not be set for NODE2; this is a lazy copy. */ #define COPY_DECL_RTL(NODE1, NODE2) \ - (DECL_WRTL_CHECK (NODE2)->decl_with_rtl.rtl = DECL_WRTL_CHECK (NODE1)->decl_with_rtl.rtl) + (DECL_WRTL_CHECK (NODE2)->decl_with_rtl.rtl \ + = DECL_WRTL_CHECK (NODE1)->decl_with_rtl.rtl) /* The DECL_RTL for NODE, if it is set, or NULL, if it is not set. */ #define DECL_RTL_IF_SET(NODE) (DECL_RTL_SET_P (NODE) ? DECL_RTL (NODE) : NULL) @@ -2800,12 +2834,14 @@ struct GTY(()) tree_decl_with_rtl { field from DECL_FIELD_OFFSET. This field may be nonzero even for fields that are not bit fields (since DECL_OFFSET_ALIGN may be larger than the natural alignment of the field's type). */ -#define DECL_FIELD_BIT_OFFSET(NODE) (FIELD_DECL_CHECK (NODE)->field_decl.bit_offset) +#define DECL_FIELD_BIT_OFFSET(NODE) \ + (FIELD_DECL_CHECK (NODE)->field_decl.bit_offset) /* In a FIELD_DECL, this indicates whether the field was a bit-field and if so, the type that was originally specified for it. TREE_TYPE may have been modified (in finish_struct). */ -#define DECL_BIT_FIELD_TYPE(NODE) (FIELD_DECL_CHECK (NODE)->field_decl.bit_field_type) +#define DECL_BIT_FIELD_TYPE(NODE) \ + (FIELD_DECL_CHECK (NODE)->field_decl.bit_field_type) /* For a FIELD_DECL in a QUAL_UNION_TYPE, records the expression, which if nonzero, indicates that the field occupies the type. */ @@ -2902,7 +2938,8 @@ struct GTY(()) tree_const_decl { /* For PARM_DECL, holds an RTL for the stack slot or register where the data was actually passed. */ -#define DECL_INCOMING_RTL(NODE) (PARM_DECL_CHECK (NODE)->parm_decl.incoming_rtl) +#define DECL_INCOMING_RTL(NODE) \ + (PARM_DECL_CHECK (NODE)->parm_decl.incoming_rtl) struct GTY(()) tree_parm_decl { struct tree_decl_with_rtl common; @@ -2911,25 +2948,38 @@ struct GTY(()) tree_parm_decl { }; -/* Nonzero in a decl means that the gimplifier has seen (or placed) - this variable in a BIND_EXPR. */ -#define DECL_SEEN_IN_BIND_EXPR_P(NODE) \ - (DECL_WITH_VIS_CHECK (NODE)->decl_with_vis.seen_in_bind_expr) - -/* Used to indicate that the linkage status of this DECL is not yet known, - so it should not be output now. */ -#define DECL_DEFER_OUTPUT(NODE) (DECL_WITH_VIS_CHECK (NODE)->decl_with_vis.defer_output) - /* Nonzero for a given ..._DECL node means that no warnings should be generated just because this node is unused. */ #define DECL_IN_SYSTEM_HEADER(NODE) \ (in_system_header_at (DECL_SOURCE_LOCATION (NODE))) +/* Used to indicate that the linkage status of this DECL is not yet known, + so it should not be output now. */ +#define DECL_DEFER_OUTPUT(NODE) \ + (DECL_WITH_VIS_CHECK (NODE)->decl_with_vis.defer_output) + +/* In a VAR_DECL that's static, + nonzero if the space is in the text section. */ +#define DECL_IN_TEXT_SECTION(NODE) \ + (VAR_DECL_CHECK (NODE)->decl_with_vis.in_text_section) + +/* Nonzero for a given ..._DECL node means that this node should be + put in .common, if possible. If a DECL_INITIAL is given, and it + is not error_mark_node, then the decl cannot be put in .common. */ +#define DECL_COMMON(NODE) \ + (DECL_WITH_VIS_CHECK (NODE)->decl_with_vis.common_flag) + +/* In a VAR_DECL, nonzero if the decl is a register variable with + an explicit asm specification. */ +#define DECL_HARD_REGISTER(NODE) \ + (VAR_DECL_CHECK (NODE)->decl_with_vis.hard_register) + /* Used to indicate that this DECL has weak linkage. */ #define DECL_WEAK(NODE) (DECL_WITH_VIS_CHECK (NODE)->decl_with_vis.weak_flag) /* Used to indicate that the DECL is a dllimport. */ -#define DECL_DLLIMPORT_P(NODE) (DECL_WITH_VIS_CHECK (NODE)->decl_with_vis.dllimport_flag) +#define DECL_DLLIMPORT_P(NODE) \ + (DECL_WITH_VIS_CHECK (NODE)->decl_with_vis.dllimport_flag) /* Used in a DECL to indicate that, even if it TREE_PUBLIC, it need not be put out unless it is needed in this translation unit. @@ -2940,9 +2990,15 @@ struct GTY(()) tree_parm_decl { back-end; it is up to front-ends which set this flag to ensure that there will never be any harm, other than bloat, in putting out something which is DECL_COMDAT. */ -#define DECL_COMDAT(NODE) (DECL_WITH_VIS_CHECK (NODE)->decl_with_vis.comdat_flag) +#define DECL_COMDAT(NODE) \ + (DECL_WITH_VIS_CHECK (NODE)->decl_with_vis.comdat_flag) -#define DECL_COMDAT_GROUP(NODE) (DECL_WITH_VIS_CHECK (NODE)->decl_with_vis.comdat_group) +#define DECL_COMDAT_GROUP(NODE) \ + (DECL_WITH_VIS_CHECK (NODE)->decl_with_vis.comdat_group) + +/* Used in TREE_PUBLIC decls to indicate that copies of this DECL in + multiple translation units should be merged. */ +#define DECL_ONE_ONLY(NODE) (DECL_COMDAT_GROUP (NODE) != NULL_TREE) /* A replaceable function is one which may be replaced at link-time with an entirely different definition, provided that the @@ -2978,7 +3034,8 @@ struct GTY(()) tree_parm_decl { the NODE might still have a DECL_ASSEMBLER_NAME -- it just hasn't been set yet. */ #define DECL_ASSEMBLER_NAME_SET_P(NODE) \ - (HAS_DECL_ASSEMBLER_NAME_P (NODE) && DECL_WITH_VIS_CHECK (NODE)->decl_with_vis.assembler_name != NULL_TREE) + (HAS_DECL_ASSEMBLER_NAME_P (NODE) \ + && DECL_WITH_VIS_CHECK (NODE)->decl_with_vis.assembler_name != NULL_TREE) /* Set the DECL_ASSEMBLER_NAME for NODE to NAME. */ #define SET_DECL_ASSEMBLER_NAME(NODE, NAME) \ @@ -3001,18 +3058,37 @@ struct GTY(()) tree_parm_decl { /* Records the section name in a section attribute. Used to pass the name from decl_attributes to make_function_rtl and make_decl_rtl. */ -#define DECL_SECTION_NAME(NODE) (DECL_WITH_VIS_CHECK (NODE)->decl_with_vis.section_name) +#define DECL_SECTION_NAME(NODE) \ + (DECL_WITH_VIS_CHECK (NODE)->decl_with_vis.section_name) + +/* Nonzero in a decl means that the gimplifier has seen (or placed) + this variable in a BIND_EXPR. */ +#define DECL_SEEN_IN_BIND_EXPR_P(NODE) \ + (DECL_WITH_VIS_CHECK (NODE)->decl_with_vis.seen_in_bind_expr) /* Value of the decls's visibility attribute */ -#define DECL_VISIBILITY(NODE) (DECL_WITH_VIS_CHECK (NODE)->decl_with_vis.visibility) +#define DECL_VISIBILITY(NODE) \ + (DECL_WITH_VIS_CHECK (NODE)->decl_with_vis.visibility) /* Nonzero means that the decl had its visibility specified rather than being inferred. */ -#define DECL_VISIBILITY_SPECIFIED(NODE) (DECL_WITH_VIS_CHECK (NODE)->decl_with_vis.visibility_specified) +#define DECL_VISIBILITY_SPECIFIED(NODE) \ + (DECL_WITH_VIS_CHECK (NODE)->decl_with_vis.visibility_specified) -/* Used in TREE_PUBLIC decls to indicate that copies of this DECL in - multiple translation units should be merged. */ -#define DECL_ONE_ONLY(NODE) (DECL_COMDAT_GROUP (NODE) != NULL_TREE) +/* In a VAR_DECL, the model to use if the data should be allocated from + thread-local storage. */ +#define DECL_TLS_MODEL(NODE) (VAR_DECL_CHECK (NODE)->decl_with_vis.tls_model) + +/* In a VAR_DECL, nonzero if the data should be allocated from + thread-local storage. */ +#define DECL_THREAD_LOCAL_P(NODE) \ + (VAR_DECL_CHECK (NODE)->decl_with_vis.tls_model >= TLS_MODEL_REAL) + +/* In a non-local VAR_DECL with static storage duration, true if the + variable has an initialization priority. If false, the variable + will be initialized at the DEFAULT_INIT_PRIORITY. */ +#define DECL_HAS_INIT_PRIORITY_P(NODE) \ + (VAR_DECL_CHECK (NODE)->decl_with_vis.init_priority_p) struct GTY(()) tree_decl_with_vis { struct tree_decl_with_rtl common; @@ -3044,19 +3120,6 @@ struct GTY(()) tree_decl_with_vis { /* 15 unused bits. */ }; -/* In a VAR_DECL that's static, - nonzero if the space is in the text section. */ -#define DECL_IN_TEXT_SECTION(NODE) (VAR_DECL_CHECK (NODE)->decl_with_vis.in_text_section) - -/* Nonzero for a given ..._DECL node means that this node should be - put in .common, if possible. If a DECL_INITIAL is given, and it - is not error_mark_node, then the decl cannot be put in .common. */ -#define DECL_COMMON(NODE) (DECL_WITH_VIS_CHECK (NODE)->decl_with_vis.common_flag) - -/* In a VAR_DECL, nonzero if the decl is a register variable with - an explicit asm specification. */ -#define DECL_HARD_REGISTER(NODE) (VAR_DECL_CHECK (NODE)->decl_with_vis.hard_register) - extern tree decl_debug_expr_lookup (tree); extern void decl_debug_expr_insert (tree, tree); /* For VAR_DECL, this is set to either an expression that it was split @@ -3076,12 +3139,6 @@ extern priority_type decl_fini_priority_lookup (tree); extern void decl_init_priority_insert (tree, priority_type); extern void decl_fini_priority_insert (tree, priority_type); -/* In a non-local VAR_DECL with static storage duration, true if the - variable has an initialization priority. If false, the variable - will be initialized at the DEFAULT_INIT_PRIORITY. */ -#define DECL_HAS_INIT_PRIORITY_P(NODE) \ - (VAR_DECL_CHECK (NODE)->decl_with_vis.init_priority_p) - /* For a VAR_DECL or FUNCTION_DECL the initialization priority of NODE. */ #define DECL_INIT_PRIORITY(NODE) \ @@ -3108,15 +3165,6 @@ extern void decl_fini_priority_insert (tree, priority_type); libraries. */ #define MAX_RESERVED_INIT_PRIORITY 100 -/* In a VAR_DECL, the model to use if the data should be allocated from - thread-local storage. */ -#define DECL_TLS_MODEL(NODE) (VAR_DECL_CHECK (NODE)->decl_with_vis.tls_model) - -/* In a VAR_DECL, nonzero if the data should be allocated from - thread-local storage. */ -#define DECL_THREAD_LOCAL_P(NODE) \ - (VAR_DECL_CHECK (NODE)->decl_with_vis.tls_model >= TLS_MODEL_REAL) - #define DECL_VAR_ANN_PTR(NODE) \ (TREE_CODE (NODE) == VAR_DECL ? &(NODE)->var_decl.ann \ : TREE_CODE (NODE) == PARM_DECL ? &(NODE)->parm_decl.ann \ @@ -3131,7 +3179,8 @@ struct GTY(()) tree_var_decl { /* This field is used to reference anything in decl.result and is meant only for use by the garbage collector. */ -#define DECL_RESULT_FLD(NODE) (DECL_NON_COMMON_CHECK (NODE)->decl_non_common.result) +#define DECL_RESULT_FLD(NODE) \ + (DECL_NON_COMMON_CHECK (NODE)->decl_non_common.result) /* The DECL_VINDEX is used for FUNCTION_DECLS in two different ways. Before the struct containing the FUNCTION_DECL is laid out, @@ -3141,7 +3190,8 @@ struct GTY(()) tree_var_decl { to an INTEGER_CST node which is suitable for use as an index into the virtual function table. C++ also uses this field in namespaces, hence the DECL_NON_COMMON_CHECK. */ -#define DECL_VINDEX(NODE) (DECL_NON_COMMON_CHECK (NODE)->decl_non_common.vindex) +#define DECL_VINDEX(NODE) \ + (DECL_NON_COMMON_CHECK (NODE)->decl_non_common.vindex) struct GTY(()) tree_decl_non_common { @@ -3160,16 +3210,19 @@ struct GTY(()) #define DECL_RESULT(NODE) (FUNCTION_DECL_CHECK (NODE)->decl_non_common.result) /* In a FUNCTION_DECL, nonzero if the function cannot be inlined. */ -#define DECL_UNINLINABLE(NODE) (FUNCTION_DECL_CHECK (NODE)->function_decl.uninlinable) +#define DECL_UNINLINABLE(NODE) \ + (FUNCTION_DECL_CHECK (NODE)->function_decl.uninlinable) /* In a FUNCTION_DECL, the saved representation of the body of the entire function. */ -#define DECL_SAVED_TREE(NODE) (FUNCTION_DECL_CHECK (NODE)->decl_non_common.saved_tree) +#define DECL_SAVED_TREE(NODE) \ + (FUNCTION_DECL_CHECK (NODE)->decl_non_common.saved_tree) /* Nonzero in a FUNCTION_DECL means this function should be treated as if it were a malloc, meaning it returns a pointer that is not an alias. */ -#define DECL_IS_MALLOC(NODE) (FUNCTION_DECL_CHECK (NODE)->function_decl.malloc_flag) +#define DECL_IS_MALLOC(NODE) \ + (FUNCTION_DECL_CHECK (NODE)->function_decl.malloc_flag) /* Nonzero in a FUNCTION_DECL means this function should be treated as C++ operator new, meaning that it returns a pointer for which we @@ -3198,7 +3251,8 @@ struct GTY(()) /* Nonzero in a FUNCTION_DECL means this function should be treated as "novops" function (function that does not read global memory, but may have arbitrary side effects). */ -#define DECL_IS_NOVOPS(NODE) (FUNCTION_DECL_CHECK (NODE)->function_decl.novops_flag) +#define DECL_IS_NOVOPS(NODE) \ + (FUNCTION_DECL_CHECK (NODE)->function_decl.novops_flag) /* Used in FUNCTION_DECLs to indicate that they should be run automatically at the beginning or end of execution. */ @@ -3248,7 +3302,8 @@ struct GTY(()) /* For FUNCTION_DECL, this holds a pointer to a structure ("struct function") that describes the status of this function. */ -#define DECL_STRUCT_FUNCTION(NODE) (FUNCTION_DECL_CHECK (NODE)->function_decl.f) +#define DECL_STRUCT_FUNCTION(NODE) \ + (FUNCTION_DECL_CHECK (NODE)->function_decl.f) /* In a FUNCTION_DECL, nonzero means a built in function. */ #define DECL_BUILT_IN(NODE) (DECL_BUILT_IN_CLASS (NODE) != NOT_BUILT_IN) @@ -3260,8 +3315,10 @@ struct GTY(()) /* In FUNCTION_DECL, a chain of ..._DECL nodes. VAR_DECL and PARM_DECL reserve the arguments slot for language-specific uses. */ -#define DECL_ARGUMENTS(NODE) (FUNCTION_DECL_CHECK (NODE)->decl_non_common.arguments) -#define DECL_ARGUMENT_FLD(NODE) (DECL_NON_COMMON_CHECK (NODE)->decl_non_common.arguments) +#define DECL_ARGUMENTS(NODE) \ + (FUNCTION_DECL_CHECK (NODE)->decl_non_common.arguments) +#define DECL_ARGUMENT_FLD(NODE) \ + (DECL_NON_COMMON_CHECK (NODE)->decl_non_common.arguments) /* In FUNCTION_DECL, the function specific target options to use when compiling this function. */ @@ -3321,7 +3378,8 @@ struct GTY(()) tree_function_decl { }; /* For a TYPE_DECL, holds the "original" type. (TREE_TYPE has the copy.) */ -#define DECL_ORIGINAL_TYPE(NODE) (TYPE_DECL_CHECK (NODE)->decl_non_common.result) +#define DECL_ORIGINAL_TYPE(NODE) \ + (TYPE_DECL_CHECK (NODE)->decl_non_common.result) /* In a TYPE_DECL nonzero means the detail info about this type is not dumped into stabs. Instead it will generate cross reference ('x') of names. @@ -3755,7 +3813,8 @@ extern GTY(()) tree global_trees[TI_MAX]; #define void_list_node global_trees[TI_VOID_LIST_NODE] #define main_identifier_node global_trees[TI_MAIN_IDENTIFIER] -#define MAIN_NAME_P(NODE) (IDENTIFIER_NODE_CHECK (NODE) == main_identifier_node) +#define MAIN_NAME_P(NODE) \ + (IDENTIFIER_NODE_CHECK (NODE) == main_identifier_node) /* Optimization options (OPTIMIZATION_NODE) to use for default and current functions. */ @@ -5125,6 +5184,7 @@ extern void internal_reference_types (void); extern unsigned int update_alignment_for_field (record_layout_info, tree, unsigned int); /* varasm.c */ +extern tree tree_output_constant_def (tree); extern void make_decl_rtl (tree); extern rtx make_decl_rtl_for_debug (tree); extern void make_decl_one_only (tree, tree); -- cgit v1.2.1 From c656204de4997844c21dc837d5d06423671d59f3 Mon Sep 17 00:00:00 2001 From: ebotcazou Date: Tue, 27 Apr 2010 22:02:36 +0000 Subject: Remove bogus hunk in previous commit git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@158811 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 1 - 1 file changed, 1 deletion(-) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index 5aa994add19..6954e5a1263 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -5184,7 +5184,6 @@ extern void internal_reference_types (void); extern unsigned int update_alignment_for_field (record_layout_info, tree, unsigned int); /* varasm.c */ -extern tree tree_output_constant_def (tree); extern void make_decl_rtl (tree); extern rtx make_decl_rtl_for_debug (tree); extern void make_decl_one_only (tree, tree); -- cgit v1.2.1 From ecba073ffa9d08ce731cd306ccebac9ca57af69b Mon Sep 17 00:00:00 2001 From: ebotcazou Date: Wed, 28 Apr 2010 19:11:50 +0000 Subject: Uniquization of constants at the Tree level * tree.h (DECL_IN_CONSTANT_POOL): New macro (tree_decl_with_vis): Add in_constant_pool bit, move shadowed_for_var_p bit to the end. (tree_output_constant_def): Declare. * gimplify.c (gimplify_init_constructor): When using block copy, uniquize the constant constructor on the RHS. * lto-streamer-in.c (unpack_ts_decl_with_vis_value_fields): Deal with DECL_IN_CONSTANT_POOL flag. * lto-streamer-out.c (pack_ts_decl_with_vis_value_fields): Likewise. * varasm.c (make_decl_rtl): Deal with variables belonging to the global constant pool. (assemble_variable): Deal with symbols belonging to the tree constant pool. (get_constant_section): Add ALIGN parameter and simplify. (build_constant_desc): Build a VAR_DECL and attach it to the symbol. (assemble_constant_contents): Use the expression of the VAR_DECL. (output_constant_def_contents): Use the alignment of the VAR_DECL. (tree_output_constant_def): New global function. (mark_constant): Use the expression of the VAR_DECL. (place_block_symbol): Use the alignment of the VAR_DECL and the size of its expression. (output_object_block): Likewise and assemble the expression. ada/ * gcc-interface/trans.c (gnat_gimplify_expr) : Uniquize constant constructors before taking their address. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@158838 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index 6954e5a1263..99bf29b9eb2 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -2963,6 +2963,11 @@ struct GTY(()) tree_parm_decl { #define DECL_IN_TEXT_SECTION(NODE) \ (VAR_DECL_CHECK (NODE)->decl_with_vis.in_text_section) +/* In a VAR_DECL that's static, + nonzero if it belongs to the global constant pool. */ +#define DECL_IN_CONSTANT_POOL(NODE) \ + (VAR_DECL_CHECK (NODE)->decl_with_vis.in_constant_pool) + /* Nonzero for a given ..._DECL node means that this node should be put in .common, if possible. If a DECL_INITIAL is given, and it is not error_mark_node, then the decl cannot be put in .common. */ @@ -3102,9 +3107,8 @@ struct GTY(()) tree_decl_with_vis { unsigned thread_local : 1; unsigned common_flag : 1; unsigned in_text_section : 1; + unsigned in_constant_pool : 1; unsigned dllimport_flag : 1; - /* Used by C++. Might become a generic decl flag. */ - unsigned shadowed_for_var_p : 1; /* Don't belong to VAR_DECL exclusively. */ unsigned weak_flag : 1; @@ -3117,7 +3121,9 @@ struct GTY(()) tree_decl_with_vis { /* Belong to FUNCTION_DECL exclusively. */ unsigned init_priority_p : 1; - /* 15 unused bits. */ + /* Used by C++ only. Might become a generic decl flag. */ + unsigned shadowed_for_var_p : 1; + /* 14 unused bits. */ }; extern tree decl_debug_expr_lookup (tree); @@ -5184,6 +5190,7 @@ extern void internal_reference_types (void); extern unsigned int update_alignment_for_field (record_layout_info, tree, unsigned int); /* varasm.c */ +extern tree tree_output_constant_def (tree); extern void make_decl_rtl (tree); extern rtx make_decl_rtl_for_debug (tree); extern void make_decl_one_only (tree, tree); -- cgit v1.2.1 From 3f9da5596a39ec1c557502bf3f559aaeaf48fc0d Mon Sep 17 00:00:00 2001 From: steven Date: Fri, 30 Apr 2010 11:58:49 +0000 Subject: gcc/ChangeLog: * toplev.c: Include varray.h for statistics dumping. * tree.h: Do not declare varray_head_tag. * tree-into-ssa.c, tree-ssa-uninit.c, tree-phinodes.c, omega.c, regs.h, lto-cgraph.c, tree-ssa-loop-ivopts.c, tree-nomudflap.c, c-objc-common.c, lto-streamer-out.c, tree-ssa-propagate.c, gimple-low.c, c-semantics.c, dwarf2out.c, lto-streamer-in.c, lto-section-in.c, alias.c, tree-if-conv.c, gimplify.c, ggc-zone.c, tree-ssa.c, tree-ssa-loop-prefetch.c, integrate.h, c-gimplify.c, c-common.c, c-common.h, reg-stack.c, basic-block.h, tree-ssa-structalias.c, lto-section-out.c, tree-ssanames.c: Do not include varray.h. * Makefile.in: Update for abovementioned changes. objc/ChangeLog: * objc-act.c: Do not include varray.h. objcp/ChangeLog: * objcp-decl.c: Do not include varray.h. cp/ChangeLog: * optimize.c, parser.c,mangle.c, cp-tree.h: DO not include varray.h. * Make-lang.in: Don't include varray.h dependency in CXX_TREE_H. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@158933 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index 99bf29b9eb2..0cfdcad224b 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -1974,8 +1974,6 @@ struct GTY(()) tree_omp_clause { }; -struct varray_head_tag; - /* In a BLOCK node. */ #define BLOCK_VARS(NODE) (BLOCK_CHECK (NODE)->block.vars) #define BLOCK_NONLOCALIZED_VARS(NODE) \ -- cgit v1.2.1 From b79dc18ae87999996a7b365f056c73011f2b3388 Mon Sep 17 00:00:00 2001 From: aesok Date: Mon, 3 May 2010 16:21:15 +0000 Subject: * double-int.h (tree_to_double_int): Remove macro. (double_int_to_tree, double_int_fits_to_tree_p): Move prototypes ... * tree.h (double_int_to_tree, double_int_fits_to_tree_p): ... here. (tree_to_double_int): New function. * double-int.c (double_int_to_tree, double_int_fits_to_tree_p): Move ... * tree.c (double_int_to_tree, double_int_fits_to_tree_p): ... here. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@158993 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index 0cfdcad224b..0a16c0df004 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -3998,6 +3998,17 @@ extern tree build_var_debug_value_stat (tree, tree MEM_STAT_DECL); #define build_var_debug_value(t1,t2) \ build_var_debug_value_stat (t1,t2 MEM_STAT_INFO) +/* Constructs double_int from tree CST. */ + +static inline double_int +tree_to_double_int (const_tree cst) +{ + return TREE_INT_CST (cst); +} + +extern tree double_int_to_tree (tree, double_int); +extern bool double_int_fits_to_tree_p (const_tree, double_int); + extern tree build_int_cst (tree, HOST_WIDE_INT); extern tree build_int_cst_type (tree, HOST_WIDE_INT); extern tree build_int_cstu (tree, unsigned HOST_WIDE_INT); -- cgit v1.2.1 From dcff3217c8608480cbe20b16ccef7da39cec1966 Mon Sep 17 00:00:00 2001 From: steven Date: Wed, 5 May 2010 21:32:44 +0000 Subject: * stor-layout.c (pending_sizes): Change the type to VEC(tree,gc) *. (get_pending_sizes, put_pending_size, put_pending_sizes): Update the uses of pending_sizes. * c-decl.c (store_parm_decls): Likewise. * c-tree.h (struct c_arg_info): Likewise. * tree.h: Update the prototype for get_pending_sizes and put_pending_sizes. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159085 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index 0a16c0df004..4e5ef70da8b 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -4424,9 +4424,9 @@ extern tree size_diffop_loc (location_t, tree, tree); extern tree round_up_loc (location_t, tree, int); #define round_down(T,N) round_down_loc (UNKNOWN_LOCATION, T, N) extern tree round_down_loc (location_t, tree, int); -extern tree get_pending_sizes (void); +extern VEC(tree,gc) *get_pending_sizes (void); extern void put_pending_size (tree); -extern void put_pending_sizes (tree); +extern void put_pending_sizes (VEC(tree,gc) *); extern void finalize_size_functions (void); /* Type for sizes of data-type. */ -- cgit v1.2.1 From a353dfef5b833a7694826d6312b4aafea4576667 Mon Sep 17 00:00:00 2001 From: jakub Date: Fri, 7 May 2010 15:47:52 +0000 Subject: * tree.h (TREE_ADDRESSABLE): Adjust comment to say that this is also meaningful on PARM_DECLs and RESULT_DECLs. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159156 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index 4e5ef70da8b..a03ede5781c 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -411,7 +411,8 @@ struct GTY(()) tree_common { addressable_flag: TREE_ADDRESSABLE in - VAR_DECL, FUNCTION_DECL, FIELD_DECL, LABEL_DECL + VAR_DECL, PARM_DECL, RESULT_DECL, FUNCTION_DECL, FIELD_DECL + LABEL_DECL all types CONSTRUCTOR, IDENTIFIER_NODE STMT_EXPR, it means we want the result of the enclosed expression @@ -1106,8 +1107,8 @@ extern void omp_clause_range_check_failed (const_tree, const char *, int, /* Define many boolean fields that all tree nodes have. */ -/* In VAR_DECL nodes, nonzero means address of this is needed. - So it cannot be in a register. +/* In VAR_DECL, PARM_DECL and RESULT_DECL nodes, nonzero means address + of this is needed. So it cannot be in a register. In a FUNCTION_DECL, nonzero means its address is needed. So it must be compiled even if it is an inline function. In a FIELD_DECL node, it means that the programmer is permitted to -- cgit v1.2.1 From 8ce860079ffd104495b86756bd5c7729e69ff06f Mon Sep 17 00:00:00 2001 From: rguenth Date: Mon, 10 May 2010 09:43:17 +0000 Subject: 2010-05-10 Richard Guenther * c-common.c (struct c_common_attributes): Add fnspec attribute. (handle_fnspec_attribute): New function. * gimple.h (gimple_call_return_flags): Declare. (gimple_call_arg_flags): Likewise. * gimple.c (gimple_call_arg_flags): New function. (gimple_call_return_flags): Likewise. * tree.h (EAF_DIRECT, EAF_NOCLOBBER, EAF_NOESCAPE, EAF_UNUSED): New argument flags. (ERF_RETURN_ARG_MASK, ERF_RETURNS_ARG, ERF_NOALIAS): New function return value flags. * tree-ssa-alias.c (ref_maybe_used_by_call_p_1): Skip unused args. * tree-ssa-structalias.c (make_constraint_from_heapvar): Split main work to ... (make_heapvar_for): ... this new function. (handle_rhs_call): Handle fnspec attribute argument specifiers. (handle_lhs_call): Likewise. (find_func_aliases): Adjust. fortran/ * trans-decl.c (gfc_build_library_function_decl): Split out worker to ... (build_library_function_decl_1): ... this new function. Set a fnspec attribute if a specification was provided. (gfc_build_library_function_decl_with_spec): New function. (gfc_build_intrinsic_function_decls): Annotate internal_pack and internal_unpack. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159215 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index a03ede5781c..7eed68fc1b7 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -5169,6 +5169,30 @@ extern tree build_duplicate_type (tree); extern int flags_from_decl_or_type (const_tree); extern int call_expr_flags (const_tree); +/* Call argument flags. */ + +/* Nonzero if the argument is not dereferenced recursively, thus only + directly reachable memory is read or written. */ +#define EAF_DIRECT (1 << 0) +/* Nonzero if memory reached by the argument is not clobbered. */ +#define EAF_NOCLOBBER (1 << 1) +/* Nonzero if the argument does not escape. */ +#define EAF_NOESCAPE (1 << 2) +/* Nonzero if the argument is not used by the function. */ +#define EAF_UNUSED (1 << 3) + +/* Call return flags. */ + +/* Mask for the argument number that is returned. Lower two bits of + the return flags, encodes argument slots zero to three. */ +#define ERF_RETURN_ARG_MASK (3) +/* Nonzero if the return value is equal to the argument number + flags & ERF_RETURN_ARG_MASK. */ +#define ERF_RETURNS_ARG (1 << 2) +/* Nonzero if the return value does not alias with anything. Functions + with the malloc attribute have this set on their return value. */ +#define ERF_NOALIAS (1 << 3) + extern int setjmp_call_p (const_tree); extern bool gimple_alloca_call_p (const_gimple); extern bool alloca_call_p (const_tree); -- cgit v1.2.1 From f8b3db21c5103bc5202d4ec1b4a410dba84ba119 Mon Sep 17 00:00:00 2001 From: ebotcazou Date: Fri, 14 May 2010 19:27:14 +0000 Subject: * tree.h (TREE_ADDRESSABLE): Remove bogus usage for FIELD_DECL. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159409 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index 7eed68fc1b7..a1ce99f913a 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -411,8 +411,7 @@ struct GTY(()) tree_common { addressable_flag: TREE_ADDRESSABLE in - VAR_DECL, PARM_DECL, RESULT_DECL, FUNCTION_DECL, FIELD_DECL - LABEL_DECL + VAR_DECL, PARM_DECL, RESULT_DECL, FUNCTION_DECL, LABEL_DECL all types CONSTRUCTOR, IDENTIFIER_NODE STMT_EXPR, it means we want the result of the enclosed expression @@ -1111,9 +1110,6 @@ extern void omp_clause_range_check_failed (const_tree, const char *, int, of this is needed. So it cannot be in a register. In a FUNCTION_DECL, nonzero means its address is needed. So it must be compiled even if it is an inline function. - In a FIELD_DECL node, it means that the programmer is permitted to - construct the address of this field. This is used for aliasing - purposes: see record_component_aliases. In CONSTRUCTOR nodes, it means object constructed must be in memory. In LABEL_DECL nodes, it means a goto for this label has been seen from a place outside all binding contours that restore stack levels. -- cgit v1.2.1 From db5a36931d0f9f33bd4938107010f0c155f742b1 Mon Sep 17 00:00:00 2001 From: hubicka Date: Sat, 15 May 2010 09:46:55 +0000 Subject: * tree.h (memory_identifier_string): Remove. * ipa-reference.c: Update comment; do not include gt-ipa-reference.h (ipa_reference_global_vars_info_d): Remove statics_not_read and statics_not_written. (ipa_reference_optimization_summary_d): New structure. (ipa_reference_optimization_summary_t): New type and vector. (ipa_reference_vars_info_d): Embedd structures instead of using pointers. (reference_vars_to_consider): Remove out of GGC space. (module_statics_escape): Remove. (global_info_obstack): Rename to ... (optimization_summary_obstack): ... this one. (initialization_status_t): Remove. (memory_identifier_string): Remove. (get_reference_vars_info): Fix indenting. (set_reference_vars_info): Likewise. (get_reference_optimization_summary): New. (set_reference_optimization_summary): New. (get_global_reference_vars_info): Remove. (ipa_reference_get_read_global): Remove. (ipa_reference_get_written_global): Remove. (ipa_reference_get_not_read_global): Update. (ipa_reference_get_not_written_global): Update. (is_proper_for_analysis): Outlaw addressable. (propagate_bits): Update for new datastructures. (analyze_variable): Remove. (init_function_info): Update for new datastructures. (clean_function_local_data): Remove. (clean_function): Remove. (copy_global_bitmap): Use optimizations_summary_obstack. (duplicate_node_data): Duplicate optimization summary only. (remove_node_data): Remove optimization summary only. (generate_summary): Do not analyze variables; do not compute module_statics_escape; do not prune solutions by it. (read_write_all_from_decl): Fix typos in comments. (propagate): Doscover readonly and nonaddressable first; update for new datastructures; share global bitmaps. * ipa-reference.h (ipa_reference_get_read_global, ipa_reference_get_written_global): Remove. * ipa-pure-const.c (check_stmt): Do not use memory_identifier_string. * Makefile.in: Remove ipa-refereference from GT files. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159430 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index a1ce99f913a..7f9a54c1bf6 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -5423,9 +5423,6 @@ extern tree build_personality_function (const char *); void init_inline_once (void); -/* In ipa-reference.c. Used for parsing attributes of asm code. */ -extern GTY(()) tree memory_identifier_string; - /* Compute the number of operands in an expression node NODE. For tcc_vl_exp nodes like CALL_EXPRs, this is stored in the node itself, otherwise it is looked up from the node's code. */ -- cgit v1.2.1 From 7858b562839bc05caf0e0586bcae129b022dff5f Mon Sep 17 00:00:00 2001 From: froydnj Date: Sat, 15 May 2010 18:41:11 +0000 Subject: * tree.h (ctor_to_list): Delete. * tree.c (ctor_to_list): Delete. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159437 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index 7f9a54c1bf6..c5747b59541 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -4475,10 +4475,6 @@ extern tree first_field (const_tree); extern bool initializer_zerop (const_tree); -/* Given a CONSTRUCTOR CTOR, return the elements as a TREE_LIST. */ - -extern tree ctor_to_list (tree); - /* Given a CONSTRUCTOR CTOR, return the element values as a vector. */ extern VEC(tree,gc) *ctor_to_vec (tree); -- cgit v1.2.1 From 115133dd5f44ff1bfd39b8186874f43b5c39e370 Mon Sep 17 00:00:00 2001 From: steven Date: Sat, 15 May 2010 20:02:11 +0000 Subject: gcc/ChangeLog * vecir.h: New file with VEC primitives for tree, gimple, and rtl. * Makefile.in: Add it. Fix all other Makefile dependencies for changes below. * tree.h: Include it instead of defining VEC primitives here. * gimple.h: Likewise. * rtl.h: Likewise. * tree-inline.h: Inlclude vecir.h instead of gimple.h. * except.h: Include vecir.h, break dependence on tree.h. * gimplify.c (append_to_statement_list_1, append_to_statement_list): Move from here... * tree-iterator.c: ...to here. * tree-iterator.h: Fix file introduction comment. Add extern markers. * c-lex.c: Include fixed-value.h instead of rtl.h. Do not include tm_p.h. * c-cppbuiltin.c: Explain why debug.h and tm_p.h are included. * c-objc-common.h: Do not include tm.h, rtl.h, insn-config.h, integrate.h, function.h, toplev.h, tree-inline.h, ggc.h, tree-mudflap.h, and target.h. * c-semantics.c: Do not include except.h, ggc.h, rtl.h, timevar.h, predict.h, tree-inline.h, gimple.h, and langhooks.h. * c-decl.c: Do not include expr.h, ggc.h, libfuncs.h, except.h. Add FIXME for why gimple.h is still included (should be unnecessary since GCC 4.5 gimplification unit-at-a-time). * c-typeck.c: Do not include rtl.h, tm_p.h, ggc.h, and gimple.h. * c-pragma.c: Add FIXME for why function.h needs to be included just for cfun, at front-end level. Add note that REGISTER_TARGET_PRAGMAS should probably be a target hook. Do not include ggc.h, but include vecprim.h for VEC(char). * c-opts.c: Do not include tm.h, tree-inline.h, and tm_p.h. Explain why target.h is included. * c-omp.h: Do not include tm.h, function.h, and bitmap.h. Explain why gimple.h is included. * c-ppoutput.c: Do not include tm.h. * c-common.c: Do not include gimple.h. Explain why expr.h is included. * c-parses.c: Explain why rtl.h is included, and that this (and only this) is also why tm.h must be included. Do not include except.h. * c-lang.c: Do not include ggc.h. cp/ChangeLog * decl.c: Include tree-iterator.h, as fixup for tree-inline.h changes. * Make-lang.in: Fix dependencies accordingly. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159442 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index c5747b59541..a37d81a2b12 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -27,6 +27,7 @@ along with GCC; see the file COPYING3. If not see #include "input.h" #include "statistics.h" #include "vec.h" +#include "vecir.h" #include "double-int.h" #include "alias.h" #include "options.h" @@ -178,11 +179,6 @@ extern const unsigned char tree_code_length[]; extern const char *const tree_code_name[]; -/* A vectors of trees. */ -DEF_VEC_P(tree); -DEF_VEC_ALLOC_P(tree,gc); -DEF_VEC_ALLOC_P(tree,heap); - /* We have to be able to tell cgraph about the needed-ness of the target of an alias. This requires that the decl have been defined. Aliases that precede their definition have to be queued for later processing. */ -- cgit v1.2.1 From 432093e542b0d6e13fbfcc8ddeda63d322db551c Mon Sep 17 00:00:00 2001 From: froydnj Date: Mon, 17 May 2010 18:16:27 +0000 Subject: * tree.h (CALL_EXPR_ARGS): Delete. (call_expr_arglist): Delete. * tree.c (call_expr_arglist): Delete. * builtins.c (fold_call_expr): Pass the whole CALL_EXPR to targetm.fold_builtin. * config/alpha/alpha.c (alpha_fold_builtin): Rename arglist parameter. Rewrite iteration to work on call_expr_nargs rather than TREE_CHAIN. * config/picochip/picochip.c (picochip_expand_builtin_2op): Rename arglist parameter. Use CALL_EXPR_ARG. (picochip_expand_builtin_3op): Likewise. (picochip_expand_builtin_2opvoid): Likewise. (picochip_expand_array_get): Likewise. (picochip_expand_array_put): Likewise. (picochip_expand_array_testport): Likewise. (picochip_expand_builtin): Don't call CALL_EXPR_ARGS. Pass exp rather than arglist. * config/rx/rx.c (rx_expand_builtin): Call call_expr_nargs instead of CALL_EXPR_ARGS. * config/sparc/sparc.c (sparc_fold_builtin): Use CALL_EXPR_ARG rather than TREE_VALUE and TREE_CHAIN. * config/xtensa/xtensa.c (xtensa_fold_builtin): Likewise. * doc/tm.texi (TARGET_FOLD_BUILTIN): Pass CALL_EXPR tree instead of the arglist. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159502 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index a37d81a2b12..2b10d9a407b 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -1695,7 +1695,6 @@ extern void protected_set_expr_location (tree, location_t); */ #define CALL_EXPR_FN(NODE) TREE_OPERAND (CALL_EXPR_CHECK (NODE), 1) #define CALL_EXPR_STATIC_CHAIN(NODE) TREE_OPERAND (CALL_EXPR_CHECK (NODE), 2) -#define CALL_EXPR_ARGS(NODE) call_expr_arglist (NODE) #define CALL_EXPR_ARG(NODE, I) TREE_OPERAND (CALL_EXPR_CHECK (NODE), (I) + 3) #define call_expr_nargs(NODE) (VL_EXP_OPERAND_LENGTH(NODE) - 3) @@ -4806,7 +4805,6 @@ extern tree lower_bound_in_type (tree, tree); extern int operand_equal_for_phi_arg_p (const_tree, const_tree); extern tree call_expr_arg (tree, int); extern tree *call_expr_argp (tree, int); -extern tree call_expr_arglist (tree); extern tree create_artificial_label (location_t); extern const char *get_name (tree); extern bool stdarg_p (tree); -- cgit v1.2.1 From 6378ffb3e243f7ec668341240c3771873da4b8d2 Mon Sep 17 00:00:00 2001 From: jamborm Date: Mon, 17 May 2010 19:43:40 +0000 Subject: 2010-05-17 Martin Jambor * cgraph.h (cgraph_indirect_call_info): New fields anc_offset, otr_token and polymorphic. * cgraph.c (cgraph_create_indirect_edge): Inilialize the above fields. (cgraph_clone_edge): Copy the above fields. * tree.c (get_binfo_at_offset): New function. * tree.h (get_binfo_at_offset): Declare. * ipa-prop.h (enum jump_func_type): Added known_type jump function type, reordered items, updated comments. (union jump_func_value): Added base_type field, reordered fields. (enum ipa_lattice_type): Moved down in the file. (struct ipa_param_descriptor): New field polymorphic. (ipa_is_param_polymorphic): New function. * ipa-prop.c: Include gimple.h and gimple-fold.h. (ipa_print_node_jump_functions): Print known type jump functions. (compute_complex_pass_through): Renamed to... (compute_complex_assign_jump_func): this. (compute_complex_ancestor_jump_func): New function. (compute_known_type_jump_func): Likewise. (compute_scalar_jump_functions): Create known type and complex ancestor jump functions. (ipa_note_param_call): New parameter polymorphic, set the corresponding flag in the call note accordingly. (ipa_analyze_call_uses): Renamed to... (ipa_analyze_indirect_call_uses): this. New parameter target, define variable var only in the block where it is used. (ipa_analyze_virtual_call_uses): New function. (ipa_analyze_call_uses): Likewise. (combine_known_type_and_ancestor_jfs): Likewise. (update_jump_functions_after_inlining): Implemented handling of a number of new jump function types combination. (print_edge_addition_message): Removed. (make_edge_direct_to_target): New function. (try_make_edge_direct_simple_call): Likewise. (try_make_edge_direct_virtual_call): Likewise. (update_call_notes_after_inlining): Renamed to... (update_indirect_edges_after_inlining): this. Moved edge creation for indirect calls to try_make_edge_direct_simple_call, also calls try_make_edge_direct_virtual_call for virtual calls. (ipa_print_node_params): Changed the header message. (ipa_write_jump_function): Stream also known type jump functions. (ipa_read_jump_function): Likewise. (ipa_write_indirect_edge_info): Stream new fields in cgraph_indirect_call_info. (ipa_read_indirect_edge_info): Likewise. * Makefile.in (ipa-prop.o): Add dependency to GIMPLE_H and GIMPLE_FOLD_H. * testsuite/g++.dg/ipa/ivinline-1.C: New test. * testsuite/g++.dg/ipa/ivinline-2.C: New test. * testsuite/g++.dg/ipa/ivinline-3.C: New test. * testsuite/g++.dg/ipa/ivinline-4.C: New test. * testsuite/g++.dg/ipa/ivinline-5.C: New test. * testsuite/g++.dg/ipa/ivinline-6.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159507 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index 2b10d9a407b..58088271c46 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -5073,6 +5073,8 @@ extern location_t tree_nonartificial_location (tree); extern tree block_ultimate_origin (const_tree); +extern tree get_binfo_at_offset (tree, HOST_WIDE_INT, tree); + /* In tree-nested.c */ extern tree build_addr (tree, tree); -- cgit v1.2.1 From d3bd87c3760f14f27c84634420b10713acc95653 Mon Sep 17 00:00:00 2001 From: aesok Date: Tue, 18 May 2010 20:54:59 +0000 Subject: * tree.h (build_int_cstu): Implement as static inline. * tree.c (build_int_cstu): Remove function. (double_int_to_tree, double_int_fits_to_tree_p): Handle size types as sign extended. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159544 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index 58088271c46..e2f54a3f08f 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -4001,9 +4001,16 @@ tree_to_double_int (const_tree cst) extern tree double_int_to_tree (tree, double_int); extern bool double_int_fits_to_tree_p (const_tree, double_int); +/* Create an INT_CST node with a CST value zero extended. */ + +static inline tree +build_int_cstu (tree type, unsigned HOST_WIDE_INT cst) +{ + return double_int_to_tree (type, uhwi_to_double_int (cst)); +} + extern tree build_int_cst (tree, HOST_WIDE_INT); extern tree build_int_cst_type (tree, HOST_WIDE_INT); -extern tree build_int_cstu (tree, unsigned HOST_WIDE_INT); extern tree build_int_cst_wide (tree, unsigned HOST_WIDE_INT, HOST_WIDE_INT); extern tree build_int_cst_wide_type (tree, unsigned HOST_WIDE_INT, HOST_WIDE_INT); -- cgit v1.2.1 From 8ce390427438cd93ede36ccf2bc1db8288d22cce Mon Sep 17 00:00:00 2001 From: froydnj Date: Tue, 18 May 2010 23:45:21 +0000 Subject: gcc/ * tree.h (build_call_list): Remove. * tree.c (build_call_list): Remove. gcc/ada/ * gcc-interface/trans.c (call_to_gnu): Use build_call_vec instead of build_call_list. * gcc-interface/utils.c (build_function_stub): Likewise. gcc/cp/ * tree.c (build_min_non_dep_call_vec): Update comment. gcc/java/ * expr.c (expand_java_multianewarray): Use build_call_vec instead of build_call_list. (pop_arguments): Return a VEC instead of a tree. Take a method type rather than a list of argument types. (rewrite_rule): Change signature. of rewrite_arglist member. (rewrite_arglist_getcaller): Update signature. (rewrite_arglist_getclass): Likewise. (maybe_rewrite_invocation): Update for rewrite_arglist change. (build_known_method_ref): Take a VEC instead of a tree. (invoke_build_dtable): Likewise. (expand_invoke): Update calls to pop_arguments. Use build_call_vec instead of build_call_list. (build_jni_stub): Use build_call_vec instead of build_call_list. * java-tree.h (maybe_rewrite_invocation): Update declaration. (build_known_method_ref): Likewise. (invoke_build_dtable): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159548 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 1 - 1 file changed, 1 deletion(-) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index e2f54a3f08f..0f099587c02 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -4038,7 +4038,6 @@ extern tree build_omp_clause (location_t, enum omp_clause_code); extern tree build_vl_exp_stat (enum tree_code, int MEM_STAT_DECL); #define build_vl_exp(c,n) build_vl_exp_stat (c,n MEM_STAT_INFO) -extern tree build_call_list (tree, tree, tree); extern tree build_call_nary (tree, tree, int, ...); extern tree build_call_valist (tree, tree, int, va_list); #define build_call_array(T1,T2,N,T3)\ -- cgit v1.2.1 From 578fcce9dee02ac2ac2a7f76634d8befccc51ef3 Mon Sep 17 00:00:00 2001 From: froydnj Date: Wed, 19 May 2010 00:43:27 +0000 Subject: Revert: 2010-05-18 Nathan Froyd * tree.h (build_call_list): Remove. * tree.c (build_call_list): Remove. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159554 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 1 + 1 file changed, 1 insertion(+) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index 0f099587c02..e2f54a3f08f 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -4038,6 +4038,7 @@ extern tree build_omp_clause (location_t, enum omp_clause_code); extern tree build_vl_exp_stat (enum tree_code, int MEM_STAT_DECL); #define build_vl_exp(c,n) build_vl_exp_stat (c,n MEM_STAT_INFO) +extern tree build_call_list (tree, tree, tree); extern tree build_call_nary (tree, tree, int, ...); extern tree build_call_valist (tree, tree, int, va_list); #define build_call_array(T1,T2,N,T3)\ -- cgit v1.2.1 From c5083e8b59f188c155a36a3335d803220428f7a9 Mon Sep 17 00:00:00 2001 From: aesok Date: Wed, 19 May 2010 20:09:57 +0000 Subject: * double-int.h (double_int_ior): New function. * tree.h (build_int_cst_wide_type): Remove. * tree.c (build_int_cst_wide_type): Remove. * fold-const.c (native_interpret_int): Use double_int_to_tree instead of build_int_cst_wide_type. * stor-layout.c (set_sizetype): (Ditto.). * dojump.c (do_jump): Use build_int_cstu instead of build_int_cst_wide_type. /java * jcf-parse.c (get_constant): Use double_int_to_tree instead of build_int_cst_wide_type. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159595 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index e2f54a3f08f..8d7ab6dd5b5 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -4012,8 +4012,6 @@ build_int_cstu (tree type, unsigned HOST_WIDE_INT cst) extern tree build_int_cst (tree, HOST_WIDE_INT); extern tree build_int_cst_type (tree, HOST_WIDE_INT); extern tree build_int_cst_wide (tree, unsigned HOST_WIDE_INT, HOST_WIDE_INT); -extern tree build_int_cst_wide_type (tree, - unsigned HOST_WIDE_INT, HOST_WIDE_INT); extern tree build_vector (tree, tree); extern tree build_vector_from_ctor (tree, VEC(constructor_elt,gc) *); extern tree build_constructor (tree, VEC(constructor_elt,gc) *); -- cgit v1.2.1 From a7a4626828090600459358ca745c4482cf9551a1 Mon Sep 17 00:00:00 2001 From: steven Date: Fri, 21 May 2010 13:53:22 +0000 Subject: gcc/ChangeLog: * tree.h: Include real.h and fixed-value.h as basic datatypes. * dfp.c, convert.c, reload1.c, reginfo.c, tree-flow.h, tree-ssa-threadedge.c, tree-ssanames.c, tree-loop-linear.c, tree-into-ssa.c, tree-vect-generic.c, tree-ssa-structalias.c, tree-ssa-loop-im.c, tree-dump.c, tree-complex.c, tree-ssa-uninit.c, genrecog.c, tree-ssa-threadupdate.c, tree-ssa-loop-niter.c, tree-pretty-print.c, tree-loop-distribution.c, tree-ssa-loop-unswitch.c, c-lex.c, optabs.c, postreload-gcse.c, tree-ssa-loop-manip.c, postreload.c, tree-ssa-loop-ch.c, tree-tailcall.c, tree.c, reload.c, tree-scalar-evolution.c, rtlanal.c, tree-phinodes.c, builtins.c, final.c, genoutput.c, fold-const.c, tree-ssa-dse.c, genautomata.c, tree-ssa-uncprop.c, toplev.c, tree-chrec.c, genemit.c, c-cppbuiltin.c, tree-ssa-sccvn.c, tree-ssa-ccp.c, tree-ssa-loop-ivopts.c, mode-switching.c, tree-call-cdce.c, cse.c, genpeep.c, tree-ssa-math-opts.c, tree-ssa-dom.c, tree-nrv.c, tree-ssa-propagate.c, tree-ssa-alias.c, tree-ssa-sink.c, jump.c, ifcvt.c, dwarf2out.c, expr.c, genattrtab.c, genconditions.c, tree-ssa-loop-ivcanon.c, tree-ssa-loop.c, tree-parloops.c, recog.c, tree-ssa-address.c, lcm.c, tree-eh.c, gimple-pretty-print.c, c-pretty-print.c, print-rtl.c, gcse.c, tree-if-conv.c, tree-data-ref.c, tree-affine.c, gimplify.c, tree-ssa-phiopt.c, implicit-zee.c, expmed.c, tree-dfa.c, emit-rtl.c, store-motion.c, cselib.c, tree-cfgcleanup.c, simplify-rtx.c, tree-ssa-pre.c, genpreds.c, tree-mudflap.c, print-tree.c, tree-ssa-copy.c, tree-ssa-forwprop.c, tree-ssa-dce.c, varasm.c, tree-nested.c, tree-ssa.c, tree-ssa-loop-prefetch.c, rtl.c, tree-inline.c, integrate.c, tree-optimize.c, tree-ssa-phiprop.c, fixed-value.c, combine.c, tree-profile.c, c-common.c, sched-vis.c, tree-cfg.c, passes.c, tree-ssa-reassoc.c, config/alpha/alpha.c, config/frv/frv.c, config/s390/s390.c, config/m32c/m32c.c, config/spu/spu.c, config/sparc/sparc.c, config/mep/mep.c, config/m32r/m32r.c, config/rx/rx.c, config/i386/i386.c, config/sh/sh.c, config/pdp11/pdp11.c, config/avr/avr.c, config/crx/crx.c, config/xtensa/xtensa.c, config/stormy16/stormy16.c, config/fr30/fr30.c, config/lm32/lm32.c, config/moxie/moxie.c, config/m68hc11/m68hc11.c, config/cris/cris.c, config/iq2000/iq2000.c, config/mn10300/mn10300.c, config/ia64/ia64.c, config/m68k/m68k.c, config/rs6000/rs6000.c, config/picochip/picochip.c, config/darwin.c, config/arc/arc.c, config/mcore/mcore.c, config/score/score3.c, config/score/score7.c, config/score/score.c, config/arm/arm.c, config/pa/pa.c, config/mips/mips.c, config/vax/vax.c, config/h8300/h8300.c, config/v850/v850.c, config/mmix/mmix.c, config/bfin/bfin.c: Clean up redundant includes. * Makefile.in: Update accordingly. java/ChangeLog: * typeck.c, decl.c, jcf-parse.c, except.c, expr.c: cp/Changelog: * error.c, tree.c, typeck2.c, cxx-pretty-print.c, mangle.c: Clean up redundant includes. fortran/ChangeLog: * trans-const.c, trans-types.c, trans-intrinsic.c: Clean up redundant includes. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159663 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index 8d7ab6dd5b5..e196579967a 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -29,6 +29,8 @@ along with GCC; see the file COPYING3. If not see #include "vec.h" #include "vecir.h" #include "double-int.h" +#include "real.h" +#include "fixed-value.h" #include "alias.h" #include "options.h" -- cgit v1.2.1 From 6388cfe24f7ecbdc2ba2d4c80638ea6c95ba07c2 Mon Sep 17 00:00:00 2001 From: ktietz Date: Wed, 26 May 2010 16:13:55 +0000 Subject: libiberty/ 2010-05-26 Kai Tietz * testsuite/demangle-expected: Add tests for __int128 and unsigned __int128 types. gcc/testsuite 2010-05-26 Kai Tietz * lib/target-supports.exp (check_effective_target_int128): New function to check if __int128 types are available for target. * testsuite/c-c++-common/int128-types-1.c: New. * testsuite/c-c++-common/int128-1.c: New. * testsuite/c-c++-common/int128-2.c: New. * g++.dg/abi/mangle43.C: New. * g++.dg/init/enum1.C: Handle __int128 case and add -Wno-overflow. * g++.dg/cpp0x/nullptr04.C: Use __SIZE_TYPE__ for getting pointer-wide scalar. * g++.dg/other/pr25632.C: Likewise. * g++.dg/other/large-size-array.C (DIM): Use ULLONG_MAX for win64 case. * g++.dg/warn/pr13358-2.C: Add llp64 for check of special overflow warnings. * g++.dg/warn/pr13358-4.C: Likewise. * g++.dg/warn/Wconversion-null-2.C: Add 'long long' case. * g++.dg/warn/Wconversion-null.C: Likewise. gcc/ 2010-05-26 Kai Tietz * builtin-types.def (BT_INT128): New primitive type. (BT_UINT128): Likewise. * c-common.c (c_common_r): Add __int128 keyword. (c_common_type_for_size): Handle __int128. (c_common_type_for_mode): Likewise. (c_common_signed_or_unsigned_type): Likewise. (c_common_nodes_and_builtins): Add builtin type if target supports 128-bit integer scalar. * c-common.h (enum rid): Add RID_INT128. * c-cppbuiltin.c (c_cpp_builtins): Define __SIZEOF_INT128__ if target supports 128-bit integer scalar. * c-decl.c (declspecs_add_type): Handle new keyword __int128. (finish_declspecs): Likewise. * c-parser.c (c_token_starts_typename): Handle RID_INT128. (c_token_starts_declspecs): Likewise. (c_parser_declspecs): Likewise. (c_parser_attributes): Likewise. (c_parser_objc_selector): Likewise. * c-pretty-print.c (pp_c_integer_constant): Handle __int128. * c-tree.h (enum c_typespec_keyword): Add cts_int128. * gimple.c (gimple_signed_or_unsigned_type): Handle int128 types. * tree.c (make_or_reuse_type): Likewise. (make_unsigned_type): Likewise. (build_common_tree_nodes_2): Likewise. * tree.h (enum integer_type_kind): Add itk_int128 and itk_unsigned_int128. (int128_integer_type_node): New define.. (int128_unsigned_type_node): New define. * cp/cp-tree.h (cp_decl_specifier_seq): Add new bifield explicit_int128_p. * cp/decl.c (grokdeclarator): Handle __int128. * cp/parser.c (cp_lexer_next_token_is_decl_specifier_ke): Likewise. (cp_parser_simple_type_specifier): Likewise. * cp/rtti.c (emit_support_tinfos): Add int128 nodes for rtti. * cp/typeck.c (cp_common_type): Handle __int128. * cp/mangle.c (integer_type_codes): Add itk_int128 and itk_unsigned_int128. * doc/extend.texi: Add documentation about __int128 type. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159879 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index e196579967a..5f0098c481f 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -3845,6 +3845,8 @@ enum integer_type_kind itk_unsigned_long, itk_long_long, itk_unsigned_long_long, + itk_int128, + itk_unsigned_int128, itk_none }; @@ -3865,6 +3867,8 @@ extern GTY(()) tree integer_types[itk_none]; #define long_unsigned_type_node integer_types[itk_unsigned_long] #define long_long_integer_type_node integer_types[itk_long_long] #define long_long_unsigned_type_node integer_types[itk_unsigned_long_long] +#define int128_integer_type_node integer_types[itk_int128] +#define int128_unsigned_type_node integer_types[itk_unsigned_int128] /* Set to the default thread-local storage (tls) model to use. */ -- cgit v1.2.1 From 8ee76a8d4bc70282a00eb456d70adbcef2f02c38 Mon Sep 17 00:00:00 2001 From: jason Date: Thu, 27 May 2010 18:39:56 +0000 Subject: * print-tree.c (debug_vec_tree): New fn. (print_vec_tree): New fn. * tree.h: Declare them. * gdbinit.in (ptv): New command. * print-tree.c (print_node) [TREE_VEC]: Print elements normally. * gdbinit.in (pdd): New command. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159941 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index 5f0098c481f..5acadb499cb 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -5120,9 +5120,11 @@ extern void print_rtl (FILE *, const_rtx); /* In print-tree.c */ extern void debug_tree (tree); +extern void debug_vec_tree (VEC(tree,gc) *); #ifdef BUFSIZ extern void dump_addr (FILE*, const char *, const void *); extern void print_node (FILE *, const char *, tree, int); +extern void print_vec_tree (FILE *, const char *, VEC(tree,gc) *, int); extern void print_node_brief (FILE *, const char *, const_tree, int); extern void indent_to (FILE *, int); #endif -- cgit v1.2.1 From 15a007df5edd3e7f2c80d11b4d01d1ff66c63f3a Mon Sep 17 00:00:00 2001 From: dodji Date: Thu, 27 May 2010 19:29:53 +0000 Subject: Fix PR c++/44188 gcc/ChangeLog: PR c++/44188 * c-common.c (is_typedef_decl): Move this definition ... * tree.c (is_typedef_decl): ... here. (typdef_variant_p): Move definition here from gcc/cp/tree.c. * c-common.h (is_typedef_decl): Move this declaration ... * tree.h (is_typedef_decl): ... here. (typedef_variant_p): Move declaration here from gcc/cp/cp-tree.h * dwarf2out.c (is_naming_typedef_decl): New function. (gen_tagged_type_die): Split out of ... (gen_type_die_with_usage): ... this function. When an anonymous tagged type is named by a typedef, make sure a DW_TAG_typedef DIE is emitted for the typedef. (gen_typedef_die): Emit DW_TAG_typedef also for typedefs naming anonymous tagged types. gcc/cp/ChangeLog: PR c++/44188 * cp-tree.h (typedef_variant_p): Move this declaration to gcc/tree.h. * tree.c (typedef_variant_p): Move this definition to gcc/tree.c. * decl.c (grokdeclarator): Do not rename debug info of an anonymous tagged type named by a typedef. gcc/testsuite/ChangeLog: PR c++/44188 * g++.dg/debug/dwarf2/typedef3.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159943 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index 5acadb499cb..94379fe4dcf 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -4820,6 +4820,8 @@ extern tree create_artificial_label (location_t); extern const char *get_name (tree); extern bool stdarg_p (tree); extern bool prototype_p (tree); +extern bool is_typedef_decl (tree x); +extern bool typedef_variant_p (tree); extern bool auto_var_in_fn_p (const_tree, const_tree); extern tree build_low_bits_mask (tree, unsigned); extern tree tree_strip_nop_conversions (tree); -- cgit v1.2.1 From bcf72c8bad93b0284cfcbea57a57b56df8587935 Mon Sep 17 00:00:00 2001 From: dodji Date: Fri, 28 May 2010 00:03:19 +0000 Subject: Revert "Fix PR c++/44188" gcc/ChangeLog: revert fix for PR c++/44188 * c-common.c (is_typedef_decl): Revert the moving of this definition ... * tree.c (is_typedef_decl): ... here. (typdef_variant_p): Revert the moving of this definition here from gcc/cp/tree.c. * c-common.h (is_typedef_decl): Revert the moving of this declaration ... * tree.h (is_typedef_decl): ... here. (typedef_variant_p): Revert the moving of this declaration here from gcc/cp/cp-tree.h * dwarf2out.c (is_naming_typedef_decl): Revert this new function. (gen_tagged_type_die): Revert the splitting out of ... (gen_type_die_with_usage): ... this function. Revert the anonymous tagged type handling. (gen_typedef_die): Revert emitting DW_TAG_typedef for typedefs naming anonymous tagged types. gcc/cp/ChangeLog: Revert fix of PR c++/44188 * cp-tree.h (typedef_variant_p): Revert moving this declaration to gcc/tree.h. * tree.c (typedef_variant_p): Revert moving this definition to gcc/tree.c. * decl.c (grokdeclarator): Revert naming typedef handling. gcc/testsuite/ChangeLog: Revert fix for PR c++/44188 * g++.dg/debug/dwarf2/typedef3.C: Revert new test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159955 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index 94379fe4dcf..5acadb499cb 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -4820,8 +4820,6 @@ extern tree create_artificial_label (location_t); extern const char *get_name (tree); extern bool stdarg_p (tree); extern bool prototype_p (tree); -extern bool is_typedef_decl (tree x); -extern bool typedef_variant_p (tree); extern bool auto_var_in_fn_p (const_tree, const_tree); extern tree build_low_bits_mask (tree, unsigned); extern tree tree_strip_nop_conversions (tree); -- cgit v1.2.1 From cded957cb1744f358266b0ed6b2608193ead7d49 Mon Sep 17 00:00:00 2001 From: hubicka Date: Mon, 31 May 2010 16:57:03 +0000 Subject: * tree.h (tree_range_check_failed): Declare noreturn. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@160081 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index 5acadb499cb..214575c68cc 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -885,7 +885,8 @@ extern void tree_class_check_failed (const_tree, const enum tree_code_class, ATTRIBUTE_NORETURN; extern void tree_range_check_failed (const_tree, const char *, int, const char *, enum tree_code, - enum tree_code); + enum tree_code) + ATTRIBUTE_NORETURN; extern void tree_not_class_check_failed (const_tree, const enum tree_code_class, const char *, int, const char *) -- cgit v1.2.1 From 5d8c393e1dc0b8df0a62eb3df1c68cb5082ab121 Mon Sep 17 00:00:00 2001 From: froydnj Date: Tue, 1 Jun 2010 19:34:57 +0000 Subject: * tree.h (build_nt_call_list): Delete. * tree.c (build_nt_call_list): Delete. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@160120 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 1 - 1 file changed, 1 deletion(-) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index 214575c68cc..e94bdc84f47 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -3971,7 +3971,6 @@ extern tree maybe_get_identifier (const char *); /* Construct various types of nodes. */ extern tree build_nt (enum tree_code, ...); -extern tree build_nt_call_list (tree, tree); extern tree build_nt_call_vec (tree, VEC(tree,gc) *); extern tree build0_stat (enum tree_code, tree MEM_STAT_DECL); -- cgit v1.2.1 From cc194b6e3a0bb9be324e211b2f5011ba34653d1e Mon Sep 17 00:00:00 2001 From: jakub Date: Wed, 2 Jun 2010 19:49:21 +0000 Subject: * tree.h (struct tree_decl_map): New type. (tree_decl_map_eq, tree_decl_map_marked_p): Define. (tree_decl_map_hash): New prototype. (debug_expr_for_decl, value_expr_for_decl): Change into tree_decl_map hashtab from tree_map. (init_ttree): Adjust initialization. (tree_decl_map_hash): New function. (decl_debug_expr_lookup, decl_debug_expr_insert, decl_value_expr_lookup, decl_value_expr_insert): Adjust. cp/ * cp-objcp-common.c (shadowed_var_for_decl): Change into tree_decl_map hashtab from tree_map. (decl_shadowed_for_var_lookup, decl_shadowed_for_var_insert): Adjust. (init_shadowed_var_for_decl): Adjust initialization. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@160185 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index e94bdc84f47..13c684af37a 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -5381,6 +5381,17 @@ struct GTY(()) tree_map { extern unsigned int tree_map_hash (const void *); #define tree_map_marked_p tree_map_base_marked_p +/* Map from a decl tree to another tree. */ + +struct GTY(()) tree_decl_map { + struct tree_map_base base; + tree to; +}; + +#define tree_decl_map_eq tree_map_base_eq +extern unsigned int tree_decl_map_hash (const void *); +#define tree_decl_map_marked_p tree_map_base_marked_p + /* Map from a tree to an int. */ struct GTY(()) tree_int_map { -- cgit v1.2.1 From a8891ab12879a8d2f8421492c85a1b409144cea4 Mon Sep 17 00:00:00 2001 From: dodji Date: Sun, 6 Jun 2010 18:24:27 +0000 Subject: Fix PR c++/44188 gcc/ChangeLog: PR c++/44188 * c-common.c (is_typedef_decl): Move this definition ... * tree.c (is_typedef_decl): ... here. (typdef_variant_p): Move definition here from gcc/cp/tree.c. * c-common.h (is_typedef_decl): Move this declaration ... * tree.h (is_typedef_decl): ... here. (typedef_variant_p): Move declaration here from gcc/cp/cp-tree.h * dwarf2out.c (is_naming_typedef_decl): New function. (gen_tagged_type_die): Split out of ... (gen_type_die_with_usage): ... this function. When an anonymous tagged type is named by a typedef, make sure a DW_TAG_typedef DIE is emitted for the typedef. (gen_typedef_die): Emit DW_TAG_typedef also for typedefs naming anonymous tagged types. gcc/cp/ChangeLog: PR c++/44188 * cp-tree.h (typedef_variant_p): Move this declaration to gcc/tree.h. * tree.c (typedef_variant_p): Move this definition to gcc/tree.c. * decl.c (grokdeclarator): Do not rename debug info of an anonymous tagged type named by a typedef. gcc/testsuite/ChangeLog: PR c++/44188 * g++.dg/debug/dwarf2/typedef3.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@160347 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index 13c684af37a..31d80dfa7e2 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -4820,6 +4820,8 @@ extern tree create_artificial_label (location_t); extern const char *get_name (tree); extern bool stdarg_p (tree); extern bool prototype_p (tree); +extern bool is_typedef_decl (tree x); +extern bool typedef_variant_p (tree); extern bool auto_var_in_fn_p (const_tree, const_tree); extern tree build_low_bits_mask (tree, unsigned); extern tree tree_strip_nop_conversions (tree); -- cgit v1.2.1 From ba72912a012b97cad825eebee3f5f22253d0afe4 Mon Sep 17 00:00:00 2001 From: lauras Date: Tue, 8 Jun 2010 07:25:24 +0000 Subject: gcc/ada: 2010-06-08 Laurynas Biveinis * gcc-interface/utils.c (init_gnat_to_gnu): Use typed GC allocation. (init_dummy_type): Likewise. (gnat_pushlevel): Likewise. * gcc-interface/trans.c (Attribute_to_gnu): Likewise. (Subprogram_Body_to_gnu): Likewise. (Compilation_Unit_to_gnu): Likewise. (start_stmt_group): Likewise. (extract_encoding): Likewise. (decode_name): Likewise. * gcc-interface/misc.c (gnat_printable_name): Likewise. * gcc-interface/decl.c (annotate_value): Likewise. * gcc-interface/ada-tree.h (struct lang_type): Add variable_size GTY option. (struct lang_decl): Likewise. (SET_TYPE_LANG_SPECIFIC): Use typed GC allocation. (SET_DECL_LANG_SPECIFIC): Likewise. gcc/c-family: 2010-06-08 Laurynas Biveinis * c-pragma.c (push_alignment): Use typed GC allocation. (handle_pragma_push_options): Likewise. * c-common.c (parse_optimize_options): Likewise. * c-common.h (struct sorted_fields_type): Add variable_size GTY option. gcc/cp: 2010-06-08 Laurynas Biveinis * typeck2.c (abstract_virtuals_error): Likewise. * pt.c (maybe_process_partial_specialization): Likewise. (register_specialization): Likewise. (add_pending_template): Likewise. (lookup_template_class): Likewise. (push_tinst_level): Likewise. * parser.c (cp_lexer_new_main): Likewise. (cp_lexer_new_from_tokens): Likewise. (cp_token_cache_new): Likewise. (cp_parser_context_new): Likewise. (cp_parser_new): Likewise. (cp_parser_nested_name_specifier_opt): Likewise. (cp_parser_template_id): Likewise. * name-lookup.c (binding_entry_make): Likewise. (binding_table_construct): Likewise. (binding_table_new): Likewise. (cxx_binding_make): Likewise. (pushdecl_maybe_friend): Likewise. (begin_scope): Likewise. (push_to_top_level): Likewise. * lex.c (init_reswords): Likewise. (retrofit_lang_decl): Likewise. (cxx_dup_lang_specific_decl): Likewise. (copy_lang_type): Likewise. (cxx_make_type): Likewise. * decl.c (make_label_decl): Likewise. (check_goto): Likewise. (start_preparsed_function): Likewise. (save_function_data): Likewise. * cp-tree.h (TYPE_SET_PTRMEMFUNC_TYPE): Likewise. * cp-objcp-common.c (decl_shadowed_for_var_insert): Likewise. * class.c (finish_struct_1): Likewise. * cp-tree.h (struct lang_type): Add variable_size GTY option. (struct lang_decl): Likewise. * parser.c (cp_parser_new): Update comment to not reference ggc_alloc. gcc/fortran: 2010-06-08 Laurynas Biveinis * trans-types.c (gfc_get_nodesc_array_type): Use typed GC allocation. (gfc_get_array_type_bounds): Likewise. * trans-decl.c (gfc_allocate_lang_decl): Likewise. (gfc_find_module): Likewise. * f95-lang.c (pushlevel): Likewise. * trans.h (struct lang_type): Add variable_size GTY option. (struct lang_decl): Likewise. gcc/java: 2010-06-08 Laurynas Biveinis * jcf-reader.c (jcf_parse_constant_pool): Use typed GC allocation. * jcf-parse.c (java_parse_file): Likewise. (process_zip_dir): Likewise. * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Likewise. (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Likewise. * expr.c (add_type_assertion): Likewise. * decl.c (make_binding_level): Likewise. (java_dup_lang_specific_decl): Likewise. * constants.c (set_constant_entry): Likewise. (cpool_for_class): Likewise. * class.c (add_method_1): Likewise. (java_treetreehash_new): Likewise. * java-tree.h (struct lang_type): Add variable_size GTY option. (struct lang_decl): Likewise. * jch.h (struct cpool_entry): Likewise. * java-tree.h (java_treetreehash_create): Remove parameter ggc. * except.c (prepare_eh_table_type): Update java_treetreehash_create call. * class.c (add_method_1): Update java_treetreehash_create call. (java_treetreehash_create): Remove parameter gc. Use htab_create_ggc. gcc/lto: 2010-06-08 Laurynas Biveinis * lto.c (lto_read_in_decl_state): Use typed GC allocation. (lto_file_read): Likewise. (new_partition): Likewise. (read_cgraph_and_symbols): Likewise. gcc/objc: 2010-06-08 Laurynas Biveinis * objc-act.h (ALLOC_OBJC_TYPE_LANG_SPECIFIC): Use typed GC allocation. * objc-act.c (objc_volatilize_decl): Likewise. (objc_build_string_object): Likewise. (hash_init): Likewise. (hash_enter): Likewise. (hash_add_attr): Likewise. (add_class): Likewise. (start_class): Likewise. gcc/objcp: 2010-06-08 Laurynas Biveinis * objcp-decl.h (ALLOC_OBJC_TYPE_LANG_SPECIFIC): Use typed GC allocation. gcc: 2010-06-08 Laurynas Biveinis * doc/tm.texi (Per-Function Data): Do not reference ggc_alloc. * doc/gty.texi (GTY Options): Document typed GC allocation and variable_size GTY option. * ggc-internal.h: New. * ggc.h: Update copyright year. (digit_string): Move to stringpool.c. (ggc_mark_stringpool, ggc_purge_stringpool, ggc_mark_roots) (gt_pch_save_stringpool, gt_pch_fixup_stringpool) (gt_pach_restore_stringpool, gt_pch_p_S, gt_pch_note_object) (init_ggc_pch, ggc_pch_count_object, ggc_pch_total_size) (ggc_pch_this_base, ggc_pch_alloc_object, ggc_pch_prepare_write) (ggc_pch_write_object, ggc_pch_finish, ggc_pch_read) (ggc_force_collect, ggc_get_size, ggc_statistics) (ggc_print_common_statistics): Move to ggc-internal.h. (digit_vector, new_ggc_zone, destroy_ggc_zone, ggc_alloc_stat) (ggc_alloc, ggc_alloc_cleared, ggc_realloc, ggc_calloc, GGC_NEW) (GGC_CNEW, GGC_NEWVEC, GGC_CNEWVEC, GGC_NEWVAR, ggc_alloc_rtvec) (ggc_alloc_tree, gt_pch_save, ggc_min_expand_heuristic) (ggc_min_heapsize_heuristic, ggc_alloc_zone) (ggc_alloc_zone_pass_stat): Remove. (ggc_internal_alloc_stat, ggc_internal_alloc) (ggc_internal_cleared_alloc_stat): New. (GGC_RESIZEVEC, GGC_RESIZEVAR): Redefine. (ggc_internal_vec_alloc_stat) (ggc_internal_cleared_vec_alloc_stat) (ggc_internal_vec_alloc_stat, ggc_internal_cleared_vec_alloc) (ggc_alloc_atomic_stat, ggc_alloc_atomic) (ggc_alloc_cleared_atomic, ggc_cleared_alloc_htab_ignore_args) (ggc_cleared_alloc_ptr_array_two_args): New. (htab_create_ggc, splay_tree_new_ggc): Redefine. (ggc_splay_alloc): Change the type of the first argument to enum gt_types_enum. (ggc_alloc_string): Make macro. (ggc_alloc_string_stat): New. (ggc_strdup): Redefine. (rtl_zone, tree_zone, tree_id_zone): Declare unconditionally. (ggc_alloc_rtvec_sized): New. (ggc_alloc_zone_stat): Rename to ggc_internal_alloc_zone_stat. (ggc_internal_alloc_zone_pass_stat, ggc_internal_alloc_zone_stat) (ggc_internal_cleared_alloc_zone_stat) (ggc_internal_zone_alloc_stat) (ggc_internal_zone_cleared_alloc_stat) (ggc_internal_zone_vec_alloc_stat) (ggc_alloc_zone_rtx_def_stat) (ggc_alloc_zone_tree_node_stat) (ggc_alloc_zone_cleared_tree_node_stat) (ggc_alloc_cleared_gimple_statement_d_stat): New. * ggc-common.c: Include ggc-internal.h. (ggc_internal_cleared_alloc_stat): Rename from ggc_alloc_cleared_stat. (ggc_realloc_stat): Use ggc_internal_alloc_stat. (ggc_calloc): Remove. (ggc_cleared_alloc_htab_ignore_args): New. (ggc_cleared_alloc_ptr_array_two_args): New. (ggc_splay_alloc): Add obj_type parameter. (init_ggc_heuristics): Formatting fixes. * ggc-none.c: Update copyright year. (ggc_alloc_stat): Rename to ggc_alloc_stat. (ggc_alloc_cleared_stat): Rename to ggc_internal_cleared_alloc_stat. (struct alloc_zone, rtl_zone, tree_zone, tree_id_zone): New. * ggc-page.c: Update copyright year. Include ggc-internal.h. Remove references to ggc_alloc in comments. (ggc_alloc_typed_stat): Call ggc_internal_alloc_stat. (ggc_alloc_stat): Rename to ggc_internal_alloc_stat. (new_ggc_zone, destroy_ggc_zone): Remove. (struct alloc_zone, rtl_zone, tree_zone, tree_id_zone): New. * ggc-zone.c: Include ggc-internal.h. Remove references to ggc_alloc in comments. (ggc_alloc_zone_stat): ggc_internal_alloc_zone_stat. (ggc_internal_alloc_zone_pass_stat): New. (ggc_internal_cleared_alloc_zone_stat): New. (ggc_alloc_typed_stat): Use ggc_internal_alloc_zone_pass_stat. (ggc_alloc_stat): Rename ggc_internal_alloc_stat. (new_ggc_zone, destroy_ggc_zone): Remove. * stringpool.c: Update copyright year. Include ggc-internal.h (digit_vector): Make static. (digit_string): Moved from ggc.h. (stringpool_ggc_alloc): Use ggc_alloc_atomic. (ggc_alloc_string): Rename to ggc_alloc_string_stat. * Makefile.in (GGC_INTERNAL_H): New. (ggc_common.o, ggc-page.o, ggc-zone.o, stringpool.o): Add $(GGC_INTERNAL_H) to dependencies. * gentype.c: Update copyright year. (walk_type): Accept variable_size GTY option. (USED_BY_TYPED_GC_P): New macro. (write_enum_defn): Use USED_BY_TYPED_GC_P. Do not output whitespace at the end of strings. (get_type_specifier, variable_size_p): New functions. (alloc_quantity, alloc_zone): New enums. (write_typed_alloc_def): New function. (write_typed_struct_alloc_def): Likewise. (write_typed_typed_typedef_alloc_def): Likewise. (write_typed_alloc_defns): Likewise. (output_typename, write_splay_tree_allocator_def): Likewise. (write_splay_tree_allocators): Likewise. (main): Call write_typed_alloc_defns and write_splay_tree_allocators. * lto-streamer.h (lto_file_decl_data_ptr): New. * passes.c (order): Define using cgraph_node_ptr. * strinpool.c (struct string_pool_data): Declare nested_ptr using ht_identifier_ptr. * gimple.h (union gimple_statement_d): Likewise. * rtl.h (struct rtx_def): Likewise. (struct rtvec_def): Likewise. * tree.h (union tree_node): Likewise. * tree-ssa-operands.h (struct ssa_operand_memory_d): Likewise. * cfgloop.c (record_loop_exits): Use htab_create_ggc. * tree-scalar-evolution.c (scev_initialize): Likewise. * alias.c (record_alias_subset): Update splay_tree_new_ggc call. * dwarf2asm.c (dw2_force_const_mem): Likewise. * omp-low.c (lower_omp_critical): Likewise. * bitmap.h (struct bitmap_head_def): Update comment to not reference ggc_alloc. * config/pa/pa.c (get_deferred_label): Use GGC_RESIZEVEC. * ira.c (fix_reg_equiv_init): Use GGC_RESIZEVEC. * ipa-prop.c (duplicate_ggc_array): Rename to duplicate_ipa_jump_func_array. Use typed GC allocation. (ipa_edge_duplication_hook): Call duplicate_ipa_jump_func_array. * gimple.c (gimple_alloc_stat): Use ggc_alloc_cleared_gimple_statement_d_stat. * varasm.c (create_block_symbol): Use ggc_alloc_zone_rtx_def. * tree.c (make_node_stat): Use ggc_alloc_zone_cleared_tree_node_stat. (make_tree_vec_stat): Likewise. (build_vl_exp_stat): Likewise. (copy_node_stat): Use ggc_alloc_zone_tree_node_stat. (make_tree_binfo_stat): Likewise. (tree_cons_stat): Likewise. * rtl.c (rtx_alloc_stat): Use ggc_alloc_zone_rtx_def_stat. (shallow_copy_rtx_stat): Likewise. (make_node_stat): Likewise. * lto-symtab.c: Fix comment. * tree-cfg.c (create_bb): Update comment to not reference ggc_alloc_cleared. * tree-ssa-structalias.c (struct heapvar_for_stmt): Fix param_is value. * varpool.c (varpool_node): Use typed GC allocation. (varpool_extra_name_alias): Likewise. * varasm.c (emutls_decl): Likewise. (get_unnamed_section): Likewise. (get_noswitch_section): Likewise. (get_section): Likewise. (get_block_for_section): Likewise. (build_constant_desc): Likewise. (create_constant_pool): Likewise. (force_const_mem): Likewise. * tree.c (build_vl_exp_stat): Likewise. (build_real): Likewise. (build_string): Likewise. (decl_debug_expr_insert): Likewise. (decl_value_expr_insert): Likewise. (type_hash_add): Likewise. (build_omp_clause): Likewise. * tree-ssanames.c (duplicate_ssa_name_ptr_info): Likewise. * tree-ssa.c (init_tree_ssa): Likewise. * tree-ssa-structalias.c (heapvar_insert): Likewise. * tree-ssa-operands.c (ssa_operand_alloc): Likewise. * tree-ssa-loop-niter.c (record_estimate): Likewise. * tree-ssa-alias.c (get_ptr_info): Likewise. * tree-scalar-evolution.c (new_scev_info_str): Likewise. * tree-phinodes.c (allocate_phi_node): Likewise. * tree-iterator.c (tsi_link_before): Likewise. (tsi_link_after): Likewise. * tree-eh.c (add_stmt_to_eh_lp_fn): Likewise. * tree-dfa.c (create_var_ann): Likewise. * tree-cfg.c (create_bb): Likewise. * toplev.c (alloc_for_identifier_to_locale): Likewise. (general_init): Likewise. * stringpool.c (stringpool_ggc_alloc): Likewise. (gt_pch_save_stringpool): Likewise. * sese.c (if_region_set_false_region): Likewise. * passes.c (do_per_function_toporder): Likewise. * optabs.c (set_optab_libfunc): Likewise. (set_conv_libfunc): Likewise. * lto-symtab.c (lto_symtab_register_decl): Likewise. * lto-streamer-in.c (lto_input_eh_catch_list): Likewise. (input_eh_region): Likewise. (input_eh_lp): Likewise. (make_new_block): Likewise. (unpack_ts_real_cst_value_fields): Likewise. * lto-section-in.c (lto_new_in_decl_state): Likewise. * lto-cgraph.c (input_node_opt_summary): Likewise. * loop-init.c (loop_optimizer_init): Likewise. * lambda.h (lambda_vector_new): Likewise. * lambda-code.c (replace_uses_equiv_to_x_with_y): Likewise. * ira.c (update_equiv_regs): Likewise. * ipa.c (cgraph_node_set_new): Likewise. (cgraph_node_set_add): Likewise. (varpool_node_set_new): Likewise. (varpool_node_set_add): Likewise. * ipa-prop.c (ipa_compute_jump_functions_for_edge): Likewise. (duplicate_ipa_jump_func_array): Likewise. (ipa_read_node_info): Likewise. * ipa-cp.c (ipcp_create_replace_map): Likewise. * integrate.c (get_hard_reg_initial_val): Likewise. * gimple.c (gimple_alloc_stat): Likewise. (gimple_build_omp_for): Likewise. (gimple_seq_alloc): Likewise. (gimple_copy): Likewise. * gimple-iterator.c (gsi_insert_before_without_update): Likewise. (gsi_insert_after_without_update): Likewise. * function.c (add_frame_space): Likewise. (insert_temp_slot_address): Likewise. (assign_stack_temp_for_type): Likewise. (allocate_struct_function): Likewise. (types_used_by_var_decl_insert): Likewise. * except.c (init_eh_for_function): Likewise. (gen_eh_region): Likewise. (gen_eh_region_catch): Likewise. (gen_eh_landing_pad): Likewise. (add_call_site): Likewise. * emit-rtl.c (get_mem_attrs): Likewise. (get_reg_attrs): Likewise. (start_sequence): Likewise. (init_emit): Likewise. * dwarf2out.c (new_cfi): Likewise. (queue_reg_save): Likewise. (dwarf2out_frame_init): Likewise. (new_loc_descr): Likewise. (find_AT_string): Likewise. (new_die): Likewise. (add_var_loc_to_decl): Likewise. (clone_die): Likewise. (clone_as_declaration): Likewise. (break_out_comdat_types): Likewise. (new_loc_list): Likewise. (loc_descriptor): Likewise. (add_loc_descr_to_each): Likewise. (add_const_value_attribute): Likewise. (tree_add_const_value_attribute): Likewise. (add_comp_dir_attribute): Likewise. (add_name_and_src_coords_attributes): Likewise. (lookup_filename): Likewise. (store_vcall_insn): Likewise. (dwarf2out_init): Likewise. * dbxout.c (dbxout_init): Likewise. * config/xtensa/xtensa.c (xtensa_init_machine_status): Likewise. * config/sparc/sparc.c (sparc_init_machine_status): Likewise. * config/score/score7.c (score7_output_external): Likewise. * config/score/score3.c (score3_output_external): Likewise. * config/s390/s390.c (s390_init_machine_status): Likewise. * config/rs6000/rs6000.c (builtin_function_type): Likewise. (rs6000_init_machine_status): Likewise. (output_toc): Likewise. * config/pa/pa.c (pa_init_machine_status): Likewise. (get_deferred_plabel): Likewise. * config/moxie/moxie.c (moxie_init_machine_status): Likewise. * config/mmix/mmix.c (mmix_init_machine_status): Likewise. * config/mips/mips.c (mflip_mips16_use_mips16_p): Likewise. * config/mep/mep.c (mep_init_machine_status): Likewise. (mep_note_pragma_flag): Likewise. * config/m32c/m32c.c (m32c_init_machine_status): Likewise. * config/iq2000/iq2000.c (iq2000_init_machine_status): Likewise. * config/ia64/ia64.c (ia64_init_machine_status): Likewise. * config/i386/winnt.c (i386_pe_record_external_function): Likewise. (i386_pe_maybe_record_exported_symbol): Likewise. * config/i386/i386.c (get_dllimport_decl): Likewise. (ix86_init_machine_status): Likewise. (assign_386_stack_local): Likewise. * config/frv/frv.c (frv_init_machine_status): Likewise. * config/darwin.c (machopic_indirection_name): Likewise. * config/cris/cris.c (cris_init_machine_status): Likewise. * config/bfin/bfin.c (bfin_init_machine_status): Likewise. * config/avr/avr.c (avr_init_machine_status): Likewise. * config/arm/arm.c (arm_init_machine_status): Likewise. * config/alpha/alpha.c (alpha_init_machine_status): Likewise. (alpha_need_linkage): Likewise. (alpha_use_linkage): Likewise. * cgraph.c (cgraph_allocate_node): Likewise. (cgraph_create_edge_1): Likewise. (cgraph_create_indirect_edge): Likewise. (cgraph_add_asm_node): Likewise. * cfgrtl.c (init_rtl_bb_info): Likewise. * cfgloop.c (alloc_loop): Likewise. (rescan_loop_exit): Likewise. * cfg.c (init_flow): Likewise. (alloc_block): Likewise. (unchecked_make_edge): Likewise. * c-parser.c (c_parse_init): Likewise. (c_parse_file): Likewise. * c-decl.c (bind): Likewise. (record_inline_static): Likewise. (push_scope): Likewise. (make_label): Likewise. (lookup_label_for_goto): Likewise. (finish_struct): Likewise. (finish_enum): Likewise. (c_push_function_context): Likewise. * bitmap.c (bitmap_element_allocate): Likewise. (bitmap_gc_alloc_stat): Likewise. * alias.c (record_alias_subset): Likewise. (init_alias_analysis): Likewise. include: 2010-06-08 Laurynas Biveinis * splay-tree.h: Update copyright years. (splay_tree_s): Document fields. (splay_tree_new_typed_alloc): New. * hashtab.h: Update copyright years. (htab_create_typed_alloc): New. libcpp: 2010-06-08 Laurynas Biveinis * include/symtab.h (ht_identifier_ptr): New. libiberty: 2010-06-08 Laurynas Biveinis * splay-tree.c: Update copyright years. (splay_tree_new_typed_alloc): New. (splay_tree_new_with_allocator): Use it. * hashtab.c: Update copyright years. (htab_create_typed_alloc): New. (htab_create_alloc): Use it. * functions.texi: Regenerate. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@160425 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index 31d80dfa7e2..683eaea4da9 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -3458,7 +3458,7 @@ extern tree build_target_option_node (void); for various types of node. */ union GTY ((ptr_alias (union lang_tree_node), - desc ("tree_node_structure (&%h)"))) tree_node { + desc ("tree_node_structure (&%h)"), variable_size)) tree_node { struct tree_base GTY ((tag ("TS_BASE"))) base; struct tree_common GTY ((tag ("TS_COMMON"))) common; struct tree_int_cst GTY ((tag ("TS_INT_CST"))) int_cst; -- cgit v1.2.1 From 09eb10edf9eb3f69a4337a4f4793b6f20feea37e Mon Sep 17 00:00:00 2001 From: rguenth Date: Sun, 13 Jun 2010 14:14:17 +0000 Subject: 2010-06-13 Richard Guenther * lto-streamer-in.c (lto_input_ts_type_tree_pointers): Do not stream but initialize TYPE_CANONICAL to NULL. (lto_output_ts_type_tree_pointers): Do not stream TYPE_CANONICAL. * gimple.c (gimple_types_compatible_p): Disregard TYPE_STRUCTURAL_EQUALITY_P. (gimple_register_type): Use TYPE_CANONICAL as cache. * lto-streamer.c (lto_record_common_node): Zero TYPE_CANONICAL before registering common types. * config/i386/i386.c (ix86_function_arg_boundary): Do not use TYPE_CANONICAL, instead use TYPE_MAIN_VARIANT. * tree.h (TYPE_CANONICAL): Clarify documentation. lto/ * lto.c (lto_fixup_type): Do not register or fixup TYPE_CANONICAL. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@160679 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index 683eaea4da9..bd86f44e1e0 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -2090,26 +2090,34 @@ extern enum machine_mode vector_type_mode (const_tree); #define SET_TYPE_MODE(NODE, MODE) \ (TYPE_CHECK (NODE)->type.mode = (MODE)) -/* The "canonical" type for this type node, which can be used to - compare the type for equality with another type. If two types are +/* The "canonical" type for this type node, which is used by frontends to + compare the type for equality with another type. If two types are equal (based on the semantics of the language), then they will have equivalent TYPE_CANONICAL entries. - As a special case, if TYPE_CANONICAL is NULL_TREE, then it cannot - be used for comparison against other types. Instead, the type is + As a special case, if TYPE_CANONICAL is NULL_TREE, and thus + TYPE_STRUCTURAL_EQUALITY_P is true, then it cannot + be used for comparison against other types. Instead, the type is said to require structural equality checks, described in - TYPE_STRUCTURAL_EQUALITY_P. */ + TYPE_STRUCTURAL_EQUALITY_P. + + For unqualified aggregate and function types the middle-end relies on + TYPE_CANONICAL to tell whether two variables can be assigned + to each other without a conversion. The middle-end also makes sure + to assign the same alias-sets to the type partition with equal + TYPE_CANONICAL of their unqualified variants. */ #define TYPE_CANONICAL(NODE) (TYPE_CHECK (NODE)->type.canonical) /* Indicates that the type node requires structural equality - checks. The compiler will need to look at the composition of the + checks. The compiler will need to look at the composition of the type to determine whether it is equal to another type, rather than - just comparing canonical type pointers. For instance, we would need + just comparing canonical type pointers. For instance, we would need to look at the return and parameter types of a FUNCTION_TYPE - node. */ + node. */ #define TYPE_STRUCTURAL_EQUALITY_P(NODE) (TYPE_CANONICAL (NODE) == NULL_TREE) /* Sets the TYPE_CANONICAL field to NULL_TREE, indicating that the - type node requires structural equality. */ + type node requires structural equality. */ #define SET_TYPE_STRUCTURAL_EQUALITY(NODE) (TYPE_CANONICAL (NODE) = NULL_TREE) + #define TYPE_LANG_SPECIFIC(NODE) (TYPE_CHECK (NODE)->type.lang_specific) #define TYPE_IBIT(NODE) (GET_MODE_IBIT (TYPE_MODE (NODE))) #define TYPE_FBIT(NODE) (GET_MODE_FBIT (TYPE_MODE (NODE))) -- cgit v1.2.1 From 0568e9c16484ed26e6c1e3bca77f78ab8c3485cb Mon Sep 17 00:00:00 2001 From: jakub Date: Mon, 14 Jun 2010 15:53:38 +0000 Subject: PR bootstrap/44426 * tree.h (build_call_expr): Don't define as vararg macro, instead add a prototype. * builtins.c (build_call_nofold): Remove. (expand_builtin_int_roundingfn, expand_builtin_pow, expand_builtin_mempcpy_args, expand_builtin_stpcpy, expand_builtin_memset_args, expand_builtin_strcmp, expand_builtin_strncmp, expand_builtin_memory_chk): Use build_call_nofold_loc instead of build_call_nofold. (build_call_expr): New function. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@160754 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index bd86f44e1e0..1a2ac3a06f0 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -5017,9 +5017,8 @@ extern bool fold_builtin_next_arg (tree, bool); extern enum built_in_function builtin_mathfn_code (const_tree); extern tree build_function_call_expr (location_t, tree, tree); extern tree fold_builtin_call_array (location_t, tree, tree, int, tree *); -#define build_call_expr(...)\ - build_call_expr_loc (UNKNOWN_LOCATION, __VA_ARGS__) extern tree build_call_expr_loc (location_t, tree, int, ...); +extern tree build_call_expr (tree, int, ...); extern tree mathfn_built_in (tree, enum built_in_function fn); extern tree c_strlen (tree, int); extern tree std_gimplify_va_arg_expr (tree, tree, gimple_seq *, gimple_seq *); -- cgit v1.2.1 From 1df3c246147fc1bf3ec6e6dad58701dbc6858a33 Mon Sep 17 00:00:00 2001 From: froydnj Date: Thu, 17 Jun 2010 17:26:28 +0000 Subject: gcc/ * tree.h (vec_member): Declare. * tree.c (vec_member): Define. gcc/cp/ * name-lookup.c (struct arg_lookup): Convert namespaces and classes fields to VEC. (arg_assoc_namespace): Adjust for new type of namespaces. (arg_assoc_class): Adjust for new type of classes. (lookup_arg_dependent): Use make_tree_vector and release_tree_vector. * typeck2.c (build_x_arrow): Use vec_member. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@160936 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 1 + 1 file changed, 1 insertion(+) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index 1a2ac3a06f0..0d8eefaedef 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -4094,6 +4094,7 @@ extern bool range_in_array_bounds_p (tree); extern tree value_member (tree, tree); extern tree purpose_member (const_tree, tree); +extern bool vec_member (const_tree, VEC(tree,gc) *); extern tree chain_index (int, tree); extern int attribute_list_equal (const_tree, const_tree); -- cgit v1.2.1 From 364ba361d5a653953f2ba9fda4b5e5fdf276903f Mon Sep 17 00:00:00 2001 From: froydnj Date: Fri, 18 Jun 2010 15:49:55 +0000 Subject: * tree.h (record_layout_info): Change type of pending_statics field to a VEC. * stor-layout.c (start_record_layout): Store NULL into pending_statics. (debug_rli): Call debug_vec_tree instead of debug_tree. (place_field): Likewise. (finish_record_layout): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@161000 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index 0d8eefaedef..80f97eeb46f 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -4334,7 +4334,7 @@ typedef struct record_layout_info_s tree prev_field; /* The static variables (i.e., class variables, as opposed to instance variables) encountered in T. */ - tree pending_statics; + VEC(tree,gc) *pending_statics; /* Bits remaining in the current alignment group */ int remaining_in_alignment; /* True if we've seen a packed field that didn't have normal -- cgit v1.2.1 From 00f4f70565fa903b89c2f1be5059898ddb069db0 Mon Sep 17 00:00:00 2001 From: bernds Date: Fri, 25 Jun 2010 08:56:24 +0000 Subject: With large parts from Jim Wilson: PR target/43902 * tree-pretty-print.c (dump_generic_node, op_code_prio): Add WIDEN_MULT_PLUS_EXPR and WIDEN_MULT_MINUS_EXPR. * optabs.c (optab_for_tree_code): Likewise. (expand_widen_pattern_expr): Likewise. * tree-ssa-math-opts.c (convert_mult_to_widen): New function, broken out of execute_optimize_widening_mul. (convert_plusminus_to_widen): New function. (execute_optimize_widening_mul): Use the two new functions. * expr.c (expand_expr_real_2): Add support for GIMPLE_TERNARY_RHS. Remove code to generate widening multiply-accumulate. Add support for WIDEN_MULT_PLUS_EXPR and WIDEN_MULT_MINUS_EXPR. * gimple-pretty-print.c (dump_ternary_rhs): New function. (dump_gimple_assign): Call it when appropriate. * tree.def (WIDEN_MULT_PLUS_EXPR, WIDEN_MULT_MINUS_EXPR): New codes. * cfgexpand.c (gimple_assign_rhs_to_tree): Likewise. (expand_gimple_stmt_1): Likewise. (expand_debug_expr): Support WIDEN_MULT_PLUS_EXPR and WIDEN_MULT_MINUS_EXPR. * tree-ssa-operands.c (get_expr_operands): Likewise. * tree-inline.c (estimate_operator_cost): Likewise. * gimple.c (extract_ops_from_tree_1): Renamed from extract_ops_from_tree. Add new arg for a third operand; fill it. (gimple_build_assign_stat): Support operations with three operands. (gimple_build_assign_with_ops_stat): Likewise. (gimple_assign_set_rhs_from_tree): Likewise. (gimple_assign_set_rhs_with_ops_1): Renamed from gimple_assign_set_rhs_with_ops. Add new arg for a third operand. (get_gimple_rhs_num_ops): Support GIMPLE_TERNARY_RHS. (get_gimple_rhs_num_ops): Handle WIDEN_MULT_PLUS_EXPR and WIDEN_MULT_MINUS_EXPR. * gimple.h (enum gimple_rhs_class): Add GIMPLE_TERNARY_RHS. (extract_ops_from_tree_1): Adjust declaration. (gimple_assign_set_rhs_with_ops_1): Likewise. (gimple_build_assign_with_ops): Pass NULL for last operand. (gimple_build_assign_with_ops3): New macro. (gimple_assign_rhs3, gimple_assign_rhs3_ptr, gimple_assign_set_rhs3, gimple_assign_set_rhs_with_ops, extract_ops_from_tree): New inline functions. * tree-cfg.c (verify_gimple_assign_ternary): New static function. (verify_gimple_assign): Call it. * doc/gimple.texi (Manipulating operands): Document GIMPLE_TERNARY_RHS. (Tuple specific accessors, subsection GIMPLE_ASSIGN): Document new functions for dealing with three-operand statements. * tree.c (commutative_ternary_tree_code): New function. * tree.h (commutative_ternary_tree_code): Declare it. * tree-vrp.c (gimple_assign_nonnegative_warnv_p): Return false for ternary statements. (gimple_assign_nonzero_warnv_p): Likewise. * tree-ssa-sccvn.c (stmt_has_constants): Handle GIMPLE_TERNARY_RHS. * tree-ssa-ccp.c (get_rhs_assign_op_for_ccp): New static function. (ccp_fold): Use it. Handle GIMPLE_TERNARY_RHS. * tree-ssa-dom.c (enum expr_kind): Add EXPR_TERNARY. (struct hashtable_expr): New member ternary in the union. (initialize_hash_element): Handle GIMPLE_TERNARY_RHS. (hashable_expr_equal_p): Fix indentation. Handle EXPR_TERNARY. (iterative_hash_hashable_expr): Likewise. (print_expr_hash_elt): Handle EXPR_TERNARY. * gimple-fold.c (fold_gimple_assign): Handle GIMPLE_TERNARY_RHS. * tree-ssa-threadedge.c (fold_assignment_stmt): Remove useless break statements. Handle GIMPLE_TERNARY_RHS. testsuite/ PR target/43902 * gcc.target/mips/madd-9.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@161366 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 1 + 1 file changed, 1 insertion(+) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index 80f97eeb46f..967b4b27372 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -4820,6 +4820,7 @@ extern tree get_callee_fndecl (const_tree); extern int type_num_arguments (const_tree); extern bool associative_tree_code (enum tree_code); extern bool commutative_tree_code (enum tree_code); +extern bool commutative_ternary_tree_code (enum tree_code); extern tree upper_bound_in_type (tree, tree); extern tree lower_bound_in_type (tree, tree); extern int operand_equal_for_phi_arg_p (const_tree, const_tree); -- cgit v1.2.1 From d3237426929c302bcab9d683353b041667b22488 Mon Sep 17 00:00:00 2001 From: aesok Date: Mon, 28 Jun 2010 18:23:16 +0000 Subject: * double-int.h (force_fit_type_double): Remove declaration. * double-int.c (force_fit_type_double): Move to tree.c. * tree.h (force_fit_type_double): Declare. * tree.h (force_fit_type_double): Moved from double-int.c. Use double_int type for 'cst' argument. Use double_int_fits_to_tree_p and double_int_to_tree instead of fit_double_type and build_int_cst_wide. * convert.c (convert_to_pointer): Adjust call to force_fit_type_double. * tree-vrp.c (extract_range_from_assert, extract_range_from_unary_expr): Adjust call to force_fit_type_double. * fold-const.c: Update comment. (int_const_binop, fold_convert_const_int_from_int, fold_convert_const_int_from_real, fold_convert_const_int_from_fixed, extract_muldiv_1, fold_div_compare, fold_sign_changed_comparison, fold_unary_loc, fold_negate_const, fold_abs_const, fold_not_const, round_up_loc): Adjust call to force_fit_type_double. /c-family * c-common.c (shorten_compare): Adjust call to force_fit_type_double. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@161509 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 1 + 1 file changed, 1 insertion(+) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index 967b4b27372..b3ba5493fd4 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -4014,6 +4014,7 @@ tree_to_double_int (const_tree cst) extern tree double_int_to_tree (tree, double_int); extern bool double_int_fits_to_tree_p (const_tree, double_int); +extern tree force_fit_type_double (tree, double_int, int, bool); /* Create an INT_CST node with a CST value zero extended. */ -- cgit v1.2.1 From 9b40bfbf8ea234b65a27e59b608dd1f6c830c9f8 Mon Sep 17 00:00:00 2001 From: manu Date: Wed, 30 Jun 2010 07:39:21 +0000 Subject: =?UTF-8?q?2010-06-30=20=20Manuel=20L=C3=B3pez-Ib=C3=A1=C3=B1ez=20?= =?UTF-8?q?=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * tree.h (block_may_fallthru): Declare here. * tree-flow.h (block_may_fallthru): Do not declare here. * c-typeck.c: Do not include tree-flow.h. Include gimple.h and bitmap.h * Makefile.in (c-typeck.o): Update dependencies. c-family/ * c-gimplify.c: Do not include tree-flow.h cp/ * tree.c: Include gimple.h. Do not include tree-flow.h * decl.c: Do not include tree-flow.h * Make-lang.in: Adjust dependencies. ada/ * gcc-interface/trans.c: Do not include tree-flow.h. * gcc-interface/Make-lang.in: Adjust dependencies. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@161591 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index b3ba5493fd4..5253bf9a50a 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -1887,11 +1887,8 @@ struct GTY(()) tree_exp { #define SSA_NAME_PTR_INFO(N) \ SSA_NAME_CHECK (N)->ssa_name.ptr_info -#ifndef _TREE_FLOW_H +/* Defined in tree-flow.h. */ struct ptr_info_def; -#endif - - /* Immediate use linking structure. This structure is used for maintaining a doubly linked list of uses of an SSA_NAME. */ @@ -5571,4 +5568,7 @@ is_lang_specific (tree t) return TREE_CODE (t) == LANG_TYPE || TREE_CODE (t) >= NUM_TREE_CODES; } +/* In gimple-low.c. */ +extern bool block_may_fallthru (const_tree); + #endif /* GCC_TREE_H */ -- cgit v1.2.1 From 182cf5a9a415f31df0f9a10e46faed1221484a35 Mon Sep 17 00:00:00 2001 From: rguenth Date: Thu, 1 Jul 2010 08:49:19 +0000 Subject: 2010-07-01 Richard Guenther PR middle-end/42834 PR middle-end/44468 * doc/gimple.texi (is_gimple_mem_ref_addr): Document. * doc/generic.texi (References to storage): Document MEM_REF. * tree-pretty-print.c (dump_generic_node): Handle MEM_REF. (print_call_name): Likewise. * tree.c (recompute_tree_invariant_for_addr_expr): Handle MEM_REF. (build_simple_mem_ref_loc): New function. (mem_ref_offset): Likewise. * tree.h (build_simple_mem_ref_loc): Declare. (build_simple_mem_ref): Define. (mem_ref_offset): Declare. * fold-const.c: Include tree-flow.h. (operand_equal_p): Handle MEM_REF. (build_fold_addr_expr_with_type_loc): Likewise. (fold_comparison): Likewise. (fold_unary_loc): Fold VIEW_CONVERT_EXPR > to MEM_REF . (fold_binary_loc): Fold MEM[&MEM[p, CST1], CST2] to MEM[p, CST1 + CST2], fold MEM[&a.b, CST2] to MEM[&a, offsetof (a, b) + CST2]. * tree-ssa-alias.c (ptr_deref_may_alias_decl_p): Handle MEM_REF. (ptr_deref_may_alias_ref_p_1): Likewise. (ao_ref_base_alias_set): Properly differentiate base object for offset and TBAA. (ao_ref_init_from_ptr_and_size): Use MEM_REF. (indirect_ref_may_alias_decl_p): Handle MEM_REFs properly. (indirect_refs_may_alias_p): Likewise. (refs_may_alias_p_1): Likewise. Remove pointer SSA name def chasing code. (ref_maybe_used_by_call_p_1): Handle MEM_REF. (call_may_clobber_ref_p_1): Likewise. * dwarf2out.c (loc_list_from_tree): Handle MEM_REF. * expr.c (expand_assignment): Handle MEM_REF. (store_expr): Handle MEM_REFs from STRING_CSTs. (store_field): If expanding a MEM_REF of a non-addressable decl use bitfield operations. (get_inner_reference): Handle MEM_REF. (expand_expr_addr_expr_1): Likewise. (expand_expr_real_1): Likewise. * tree-eh.c (tree_could_trap_p): Handle MEM_REF. * alias.c (ao_ref_from_mem): Handle MEM_REF. (get_alias_set): Likewise. Properly handle VIEW_CONVERT_EXPRs. * tree-data-ref.c (dr_analyze_innermost): Handle MEM_REF. (dr_analyze_indices): Likewise. (dr_analyze_alias): Likewise. (object_address_invariant_in_loop_p): Likewise. * gimplify.c (mark_addressable): Handle MEM_REF. (gimplify_cond_expr): Build MEM_REFs. (gimplify_modify_expr_to_memcpy): Likewise. (gimplify_init_ctor_preeval_1): Handle MEM_REF. (gimple_fold_indirect_ref): Adjust. (gimplify_expr): Handle MEM_REF. Gimplify INDIRECT_REF to MEM_REF. * tree.def (MEM_REF): New tree code. * tree-dfa.c: Include toplev.h. (get_ref_base_and_extent): Handle MEM_REF. (get_addr_base_and_unit_offset): New function. * emit-rtl.c (set_mem_attributes_minus_bitpos): Handle MEM_REF. * gimple-fold.c (may_propagate_address_into_dereference): Handle MEM_REF. (maybe_fold_offset_to_array_ref): Allow possibly out-of bounds accesses if the array has just one dimension. Remove always true parameter. Do not require type compatibility here. (maybe_fold_offset_to_component_ref): Remove. (maybe_fold_stmt_indirect): Remove. (maybe_fold_reference): Remove INDIRECT_REF handling. Fold back to non-MEM_REF. (maybe_fold_offset_to_address): Simplify. Deal with type mismatches here. (maybe_fold_reference): Likewise. (maybe_fold_stmt_addition): Likewise. Also handle &ARRAY + I in addition to &ARRAY[0] + I. (fold_gimple_assign): Handle ADDR_EXPR of MEM_REFs. (gimple_get_relevant_ref_binfo): Handle MEM_REF. * cfgexpand.c (expand_debug_expr): Handle MEM_REF. * tree-ssa.c (useless_type_conversion_p): Make most pointer conversions useless. (warn_uninitialized_var): Handle MEM_REF. (maybe_rewrite_mem_ref_base): New function. (execute_update_addresses_taken): Implement re-writing of MEM_REFs to SSA form. * tree-inline.c (remap_gimple_op_r): Handle MEM_REF, remove INDIRECT_REF handling. (copy_tree_body_r): Handle MEM_REF. * gimple.c (is_gimple_addressable): Adjust. (is_gimple_address): Likewise. (is_gimple_invariant_address): ADDR_EXPRs of MEM_REFs with invariant base are invariant. (is_gimple_min_lval): Adjust. (is_gimple_mem_ref_addr): New function. (get_base_address): Handle MEM_REF. (count_ptr_derefs): Likewise. (get_base_loadstore): Likewise. * gimple.h (is_gimple_mem_ref_addr): Declare. (gimple_call_fndecl): Handle invariant MEM_REF addresses. * tree-cfg.c (verify_address): New function, split out from ... (verify_expr): ... here. Use for verifying ADDR_EXPRs and the address operand of MEM_REFs. Verify MEM_REFs. Reject INDIRECT_REFs. (verify_types_in_gimple_min_lval): Handle MEM_REF. Disallow INDIRECT_REF. Allow conversions. (verify_types_in_gimple_reference): Verify VIEW_CONVERT_EXPR of a register does not change its size. (verify_types_in_gimple_reference): Verify MEM_REF. (verify_gimple_assign_single): Disallow INDIRECT_REF. Handle MEM_REF. * tree-ssa-operands.c (opf_non_addressable, opf_not_non_addressable): New. (mark_address_taken): Handle MEM_REF. (get_indirect_ref_operands): Pass through opf_not_non_addressable. (get_asm_expr_operands): Pass opf_not_non_addressable. (get_expr_operands): Handle opf_[not_]non_addressable. Handle MEM_REF. Remove INDIRECT_REF handling. * tree-vrp.c: (check_array_ref): Handle MEM_REF. (search_for_addr_array): Likewise. (check_array_bounds): Likewise. (vrp_stmt_computes_nonzero): Adjust for MEM_REF. * tree-ssa-loop-im.c (for_each_index): Handle MEM_REF. (ref_always_accessed_p): Likewise. (gen_lsm_tmp_name): Likewise. Handle ADDR_EXPR. * tree-complex.c (extract_component): Do not handle INDIRECT_REF. Handle MEM_REF. * cgraphbuild.c (mark_load): Properly check for NULL result from get_base_address. (mark_store): Likewise. * tree-ssa-loop-niter.c (array_at_struct_end_p): Handle MEM_REF. * tree-loop-distribution.c (generate_builtin): Exchange INDIRECT_REF handling for MEM_REF. * tree-scalar-evolution.c (follow_ssa_edge_expr): Handle &MEM[ptr + CST] similar to POINTER_PLUS_EXPR. * builtins.c (stabilize_va_list_loc): Use the function ABI valist type if we couldn't canonicalize the argument type. Always dereference with the canonical va-list type. (maybe_emit_free_warning): Handle MEM_REF. (fold_builtin_memory_op): Simplify and handle MEM_REFs in folding memmove to memcpy. * builtins.c (fold_builtin_memory_op): Use ref-all types for all memcpy foldings. * omp-low.c (build_receiver_ref): Adjust for MEM_REF. (build_outer_var_ref): Likewise. (scan_omp_1_op): Likewise. (lower_rec_input_clauses): Likewise. (lower_lastprivate_clauses): Likewise. (lower_reduction_clauses): Likewise. (lower_copyprivate_clauses): Likewise. (expand_omp_atomic_pipeline): Likewise. (expand_omp_atomic_mutex): Likewise. (create_task_copyfn): Likewise. * tree-ssa-sccvn.c (copy_reference_ops_from_ref): Handle MEM_REF. Remove old union trick. Initialize constant offsets. (ao_ref_init_from_vn_reference): Likewise. Do not handle INDIRECT_REF. Init base_alias_set properly. (vn_reference_lookup_3): Replace INDIRECT_REF handling with MEM_REF. (vn_reference_fold_indirect): Adjust for MEM_REFs. (valueize_refs): Fold MEM_REFs. Re-evaluate constant offset for ARRAY_REFs. (may_insert): Remove. (visit_reference_op_load): Do not test may_insert. (run_scc_vn): Remove parameter, do not fiddle with may_insert. * tree-ssa-sccvn.h (struct vn_reference_op_struct): Add a field to store the constant offset this op applies. (run_scc_vn): Adjust prototype. * cgraphunit.c (thunk_adjust): Adjust for MEM_REF. * tree-ssa-ccp.c (ccp_fold): Replace INDIRECT_REF folding with MEM_REF. Propagate &foo + CST as &MEM[&foo, CST]. Do not bother about volatile qualifiers on pointers. (fold_const_aggregate_ref): Handle MEM_REF, do not handle INDIRECT_REF. * tree-ssa-loop-ivopts.c * tree-ssa-loop-ivopts.c (determine_base_object): Adjust for MEM_REF. (strip_offset_1): Likewise. (find_interesting_uses_address): Replace INDIRECT_REF handling with MEM_REF handling. (get_computation_cost_at): Likewise. * ipa-pure-const.c (check_op): Handle MEM_REF. * tree-stdarg.c (check_all_va_list_escapes): Adjust for MEM_REF. * tree-ssa-sink.c (is_hidden_global_store): Handle MEM_REF and constants. * ipa-inline.c (likely_eliminated_by_inlining_p): Handle MEM_REF. * tree-parloops.c (take_address_of): Adjust for MEM_REF. (eliminate_local_variables_1): Likewise. (create_call_for_reduction_1): Likewise. (create_loads_for_reductions): Likewise. (create_loads_and_stores_for_name): Likewise. * matrix-reorg.c (may_flatten_matrices_1): Sanitize. (ssa_accessed_in_tree): Handle MEM_REF. (ssa_accessed_in_assign_rhs): Likewise. (update_type_size): Likewise. (analyze_accesses_for_call_stmt): Likewise. (analyze_accesses_for_assign_stmt): Likewise. (transform_access_sites): Likewise. (transform_allocation_sites): Likewise. * tree-affine.c (tree_to_aff_combination): Handle MEM_REF. * tree-vect-data-refs.c (vect_create_addr_base_for_vector_ref): Do not handle INDIRECT_REF. * tree-ssa-phiopt.c (add_or_mark_expr): Handle MEM_REF. (cond_store_replacement): Likewise. * tree-ssa-pre.c (create_component_ref_by_pieces_1): Handle MEM_REF, no not handle INDIRECT_REFs. (insert_into_preds_of_block): Properly initialize avail. (phi_translate_1): Fold MEM_REFs. Re-evaluate constant offset for ARRAY_REFs. Properly handle reference lookups that require a bit re-interpretation. (can_PRE_operation): Do not handle INDIRECT_REF. Handle MEM_REF. * tree-sra.c * tree-sra.c (build_access_from_expr_1): Handle MEM_REF. (build_ref_for_offset_1): Remove. (build_ref_for_offset): Build MEM_REFs. (gate_intra_sra): Disable for now. (sra_ipa_modify_expr): Handle MEM_REF. (ipa_early_sra_gate): Disable for now. * tree-sra.c (create_access): Swap INDIRECT_REF handling for MEM_REF handling. (disqualify_base_of_expr): Likewise. (ptr_parm_has_direct_uses): Swap INDIRECT_REF handling for MEM_REF handling. (sra_ipa_modify_expr): Remove INDIRECT_REF handling. Use mem_ref_offset. Remove bogus folding. (build_access_from_expr_1): Properly handle MEM_REF for non IPA-SRA. (make_fancy_name_1): Add support for MEM_REF. * tree-predcom.c (ref_at_iteration): Handle MEM_REFs. * tree-mudflap.c (mf_xform_derefs_1): Adjust for MEM_REF. * ipa-prop.c (compute_complex_assign_jump_func): Handle MEM_REF. (compute_complex_ancestor_jump_func): Likewise. (ipa_analyze_virtual_call_uses): Likewise. * tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Replace INDIRECT_REF folding with more generalized MEM_REF folding. (tree_ssa_forward_propagate_single_use_vars): Adjust accordingly. (forward_propagate_addr_into_variable_array_index): Also handle &ARRAY + I in addition to &ARRAY[0] + I. * tree-ssa-dce.c (ref_may_be_aliased): Handle MEM_REF. * tree-ssa-ter.c (find_replaceable_in_bb): Avoid TER if that creates assignments with overlap. * tree-nested.c (get_static_chain): Adjust for MEM_REF. (get_frame_field): Likewise. (get_nonlocal_debug_decl): Likewise. (convert_nonlocal_reference_op): Likewise. (struct nesting_info): Add mem_refs pointer-set. (create_nesting_tree): Allocate it. (convert_local_reference_op): Insert to be folded mem-refs. (fold_mem_refs): New function. (finalize_nesting_tree_1): Perform defered folding of mem-refs (free_nesting_tree): Free the pointer-set. * tree-vect-stmts.c (vectorizable_store): Adjust for MEM_REF. (vectorizable_load): Likewise. * tree-ssa-phiprop.c (phiprop_insert_phi): Adjust for MEM_REF. (propagate_with_phi): Likewise. * tree-object-size.c (addr_object_size): Handle MEM_REFs instead of INDIRECT_REFs. (compute_object_offset): Handle MEM_REF. (plus_stmt_object_size): Handle MEM_REF. (collect_object_sizes_for): Dispatch to plus_stmt_object_size for &MEM_REF. * tree-flow.h (get_addr_base_and_unit_offset): Declare. (symbol_marked_for_renaming): Likewise. * Makefile.in (tree-dfa.o): Add $(TOPLEV_H). (fold-const.o): Add $(TREE_FLOW_H). * tree-ssa-structalias.c (get_constraint_for_1): Handle MEM_REF. (find_func_clobbers): Likewise. * ipa-struct-reorg.c (decompose_indirect_ref_acc): Handle MEM_REF. (decompose_access): Likewise. (replace_field_acc): Likewise. (replace_field_access_stmt): Likewise. (insert_new_var_in_stmt): Likewise. (get_stmt_accesses): Likewise. (reorg_structs_drive): Disable. * config/i386/i386.c (ix86_va_start): Adjust for MEM_REF. (ix86_canonical_va_list_type): Likewise. cp/ * cp-gimplify.c (cp_gimplify_expr): Open-code the rhs predicate we are looking for, allow non-gimplified INDIRECT_REFs. testsuite/ * gcc.c-torture/execute/20100316-1.c: New testcase. * gcc.c-torture/execute/pr44468.c: Likewise. * gcc.c-torture/compile/20100609-1.c: Likewise. * gcc.dg/volatile2.c: Adjust. * gcc.dg/plugin/selfassign.c: Likewise. * gcc.dg/pr36902.c: Likewise. * gcc.dg/tree-ssa/foldaddr-2.c: Remove. * gcc.dg/tree-ssa/foldaddr-3.c: Likewise. * gcc.dg/tree-ssa/forwprop-8.c: Adjust. * gcc.dg/tree-ssa/pr17141-1.c: Likewise. * gcc.dg/tree-ssa/ssa-fre-13.c: Likewise. * gcc.dg/tree-ssa/ssa-fre-14.c: Likewise. * gcc.dg/tree-ssa/ssa-ccp-21.c: Likewise. * gcc.dg/tree-ssa/pta-ptrarith-1.c: Likewise. * gcc.dg/tree-ssa/20030807-7.c: Likewise. * gcc.dg/tree-ssa/forwprop-10.c: Likewise. * gcc.dg/tree-ssa/ssa-fre-1.c: Likewise. * gcc.dg/tree-ssa/pta-ptrarith-2.c: Likewise. * gcc.dg/tree-ssa/ssa-ccp-23.c: Likewise. * gcc.dg/tree-ssa/forwprop-1.c: Likewise. * gcc.dg/tree-ssa/forwprop-2.c: Likewise. * gcc.dg/tree-ssa/struct-aliasing-1.c: Likewise. * gcc.dg/tree-ssa/ssa-ccp-25.c: Likewise. * gcc.dg/tree-ssa/ssa-pre-26.c: Likewise. * gcc.dg/tree-ssa/struct-aliasing-2.c: Likewise. * gcc.dg/tree-ssa/ssa-ccp-26.c: Likewise. * gcc.dg/tree-ssa/ssa-sccvn-4.c: Likewise. * gcc.dg/tree-ssa/ssa-pre-7.c: Likewise. * gcc.dg/tree-ssa/forwprop-5.c: Likewise. * gcc.dg/struct/w_prof_two_strs.c: XFAIL. * gcc.dg/struct/wo_prof_escape_arg_to_local.c: Likewise. * gcc.dg/struct/wo_prof_global_var.c: Likewise. * gcc.dg/struct/wo_prof_malloc_size_var.c: Likewise. * gcc.dg/struct/w_prof_local_array.c: Likewise. * gcc.dg/struct/w_prof_single_str_global.c: Likewise. * gcc.dg/struct/wo_prof_escape_str_init.c: Likewise. * gcc.dg/struct/wo_prof_array_through_pointer.c: Likewise. * gcc.dg/struct/w_prof_global_array.c: Likewise. * gcc.dg/struct/wo_prof_array_field.c: Likewise. * gcc.dg/struct/wo_prof_single_str_local.c: Likewise. * gcc.dg/struct/w_prof_local_var.c: Likewise. * gcc.dg/struct/wo_prof_two_strs.c: Likewise. * gcc.dg/struct/wo_prof_empty_str.c: Likewise. * gcc.dg/struct/wo_prof_local_array.c: Likewise. * gcc.dg/struct/w_prof_global_var.c: Likewise. * gcc.dg/struct/wo_prof_single_str_global.c: Likewise. * gcc.dg/struct/wo_prof_escape_substr_value.c: Likewise. * gcc.dg/struct/wo_prof_global_array.c: Likewise. * gcc.dg/struct/wo_prof_escape_return.c: Likewise. * gcc.dg/struct/wo_prof_escape_substr_array.c: Likewise. * gcc.dg/struct/wo_prof_double_malloc.c: Likewise. * gcc.dg/struct/w_ratio_cold_str.c: Likewise. * gcc.dg/struct/wo_prof_escape_substr_pointer.c: Likewise. * gcc.dg/struct/wo_prof_local_var.c: Likewise. * gcc.dg/tree-prof/stringop-1.c: Adjust. * g++.dg/tree-ssa/pr31146.C: Likewise. * g++.dg/tree-ssa/copyprop-1.C: Likewise. * g++.dg/tree-ssa/pr33604.C: Likewise. * g++.dg/plugin/selfassign.c: Likewise. * gfortran.dg/array_memcpy_3.f90: Likewise. * gfortran.dg/array_memcpy_4.f90: Likewise. * c-c++-common/torture/pr42834.c: New testcase. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@161655 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index 5253bf9a50a..75b3dcfccf1 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -4963,6 +4963,10 @@ extern tree build_fold_indirect_ref_loc (location_t, tree); #define fold_indirect_ref(T)\ fold_indirect_ref_loc (UNKNOWN_LOCATION, T) extern tree fold_indirect_ref_loc (location_t, tree); +extern tree build_simple_mem_ref_loc (location_t, tree); +#define build_simple_mem_ref(T)\ + build_simple_mem_ref_loc (UNKNOWN_LOCATION, T) +extern double_int mem_ref_offset (const_tree); extern tree constant_boolean_node (int, tree); extern tree div_if_zero_remainder (enum tree_code, const_tree, const_tree); -- cgit v1.2.1 From 86638c2ef3b5ed40e2c8f19e5ce0cdbf86593413 Mon Sep 17 00:00:00 2001 From: rguenth Date: Mon, 5 Jul 2010 12:25:20 +0000 Subject: 2010-07-05 Richard Guenther * tree-ssa-loop-im.c (for_each_index): Do not handle ALIGN_INDIRECT_REF. (gen_lsm_tmp_name): Likewise. * tree-dump.c (dequeue_and_dump): Likewise. * tree-pretty-print.c (dump_generic_node): Likewise. (op_code_prio): Likewise. (op_symbol_code): Likewise. * tree.c (staticp): Likewise. (build1_stat): Likewise. * tree.h (INDIRECT_REF_P): Likewise. * fold-const.c (maybe_lvalue_p): Likewise. (operand_equal_p): Likewise. * tree-ssa-sccvn.c (copy_reference_ops_from_ref): Likewise. (ao_ref_init_from_vn_reference): Likewise. * tree-ssa-loop-ivopts.c (idx_find_step): Likewise. (find_interesting_uses_address): Likewise. * dwarf2out.c (loc_list_from_tree): Likewise. * gimplify.c (gimplify_expr): Likewise. * tree-eh.c (tree_could_trap_p): Likewise. * emit-rtl.c (set_mem_attributes_minus_bitpos): Likewise. * cfgexpand.c (expand_debug_expr): Likewise. * tree-ssa-pre.c (create_component_ref_by_pieces_1): Likewise. * tree-ssa-loop-prefetch.c (idx_analyze_ref): Likewise. * tree-cfg.c (verify_types_in_gimple_min_lval): Likewise. * config/rs6000/rs6000 (rs6000_check_sdmode): Likewise. * tree-ssa-operands.c (get_expr_operands): Likewise. * expr.c (safe_from_p): Likewise. (expand_expr_real_1): Likewise. TER BIT_AND_EXPRs into MEM_REFs. * tree-vect-data-refs.c (vect_setup_realignment): Build BIT_AND_EXPR and MEM_REF instead of ALIGN_INDIRECT_REF. * tree-vect-stmts.c (vectorizable_load): Likewise. * tree.def (ALIGN_INDIRECT_REF): Remove. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@161830 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index 75b3dcfccf1..c92833c8a94 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -118,7 +118,6 @@ extern const enum tree_code_class tree_code_type[]; #define INDIRECT_REF_P(CODE)\ (TREE_CODE (CODE) == INDIRECT_REF \ - || TREE_CODE (CODE) == ALIGN_INDIRECT_REF \ || TREE_CODE (CODE) == MISALIGNED_INDIRECT_REF) /* Nonzero if CODE represents a reference. */ @@ -1251,7 +1250,7 @@ extern void omp_clause_range_check_failed (const_tree, const char *, int, accessing the memory pointed to won't generate a trap. However, this only applies to an object when used appropriately: it doesn't mean that writing a READONLY mem won't trap. Similarly for - ALIGN_INDIRECT_REF and MISALIGNED_INDIRECT_REF. + MISALIGNED_INDIRECT_REF. In ARRAY_REF and ARRAY_RANGE_REF means that we know that the index (or slice of the array) always belongs to the range of the array. -- cgit v1.2.1 From beec9a6ace9f4f45bffb4025f013812584ab4f21 Mon Sep 17 00:00:00 2001 From: froydnj Date: Mon, 5 Jul 2010 13:15:31 +0000 Subject: * tree.h (build_call_list): Remove. * tree.c (build_call_list): Remove. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@161837 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 1 - 1 file changed, 1 deletion(-) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index c92833c8a94..ca4ec2ab854 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -4047,7 +4047,6 @@ extern tree build_omp_clause (location_t, enum omp_clause_code); extern tree build_vl_exp_stat (enum tree_code, int MEM_STAT_DECL); #define build_vl_exp(c,n) build_vl_exp_stat (c,n MEM_STAT_INFO) -extern tree build_call_list (tree, tree, tree); extern tree build_call_nary (tree, tree, int, ...); extern tree build_call_valist (tree, tree, int, va_list); #define build_call_array(T1,T2,N,T3)\ -- cgit v1.2.1 From 9614eeffe73081e7a1048f8e6dfd9cd2b80d607e Mon Sep 17 00:00:00 2001 From: rguenth Date: Mon, 5 Jul 2010 14:51:16 +0000 Subject: 2010-07-05 Richard Guenther * tree.c (reference_alias_ptr_type): New function. * tree.h (reference_alias_ptr_type): Declare. * tree-ssa-loop-ivopts.c (copy_ref_info): Restructure to allow non-TARGET_MEM_REF new refs. (rewrite_use_address): Pass old alias pointer type to create_mem_ref. * tree-ssa-address.c (create_mem_ref_raw): Get alias pointer type. Build a MEM_REF instead of a TARGET_MEM_REF if possible. (create_mem_ref): Get alias pointer type. Adjust calls to create_mem_ref_raw. (maybe_fold_tmr): Likewise. * tree-flow.h (create_mem_ref): Adjust prototype. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@161840 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 1 + 1 file changed, 1 insertion(+) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index ca4ec2ab854..934de7de68e 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -4965,6 +4965,7 @@ extern tree build_simple_mem_ref_loc (location_t, tree); #define build_simple_mem_ref(T)\ build_simple_mem_ref_loc (UNKNOWN_LOCATION, T) extern double_int mem_ref_offset (const_tree); +extern tree reference_alias_ptr_type (const_tree); extern tree constant_boolean_node (int, tree); extern tree div_if_zero_remainder (enum tree_code, const_tree, const_tree); -- cgit v1.2.1 From a6caa15fd850657e54b7503695521137c0d55dff Mon Sep 17 00:00:00 2001 From: aesok Date: Mon, 5 Jul 2010 18:45:40 +0000 Subject: * double-int.h (fit_double_type): Remove declaration. * double-int.c (fit_double_type): Remove function. * tree.h (int_fits_type_p): Adjust prototype. * tree.c (int_fits_type_p): Return bool. Use double_int_fits_to_tree_p instead of fit_double_type. (build_int_cst_type): Use double_int_to_tree and shwi_to_double_int instead of fit_double_type and build_int_cst_wide. * builtins.c (): Use double_int_fits_to_tree_p and double_int_to_tree instead of fit_double_type and build_int_cst_wide. (fold_builtin_object_size): Use double_int_fits_to_tree_p instead of fit_double_type. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@161847 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index 934de7de68e..59f6b3a96b8 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -5049,7 +5049,7 @@ extern tree strip_float_extensions (tree); extern int really_constant_p (const_tree); extern bool decl_address_invariant_p (const_tree); extern bool decl_address_ip_invariant_p (const_tree); -extern int int_fits_type_p (const_tree, const_tree); +extern bool int_fits_type_p (const_tree, const_tree); #ifndef GENERATOR_FILE extern void get_type_static_bounds (const_tree, mpz_t, mpz_t); #endif -- cgit v1.2.1 From 96fbe9dde2cd3dc9e6e5cea6905f8f98fdda1b4d Mon Sep 17 00:00:00 2001 From: rsandifo Date: Sat, 10 Jul 2010 08:35:58 +0000 Subject: gcc/ * tree.h (DECL_REPLACEABLE_P): Strengthen check for weak symbols. gcc/testsuite/ * gcc.dg/attr-weak-hidden-1.c, gcc.dg/attr-weak-hidden-1a.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@162031 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index 59f6b3a96b8..e749d696ec4 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -3012,6 +3012,11 @@ struct GTY(()) tree_parm_decl { not be treated as replaceable so that use of C++ template instantiations is not penalized. + In other respects, the condition is usually equivalent to whether + the function binds to the current module (shared library or executable). + However, weak functions can always be overridden by earlier TUs + in the same module, even if they bind locally to that module. + For example, DECL_REPLACEABLE is used to determine whether or not a function (including a template instantiation) which is not explicitly declared "inline" can be inlined. If the function is @@ -3020,7 +3025,7 @@ struct GTY(()) tree_parm_decl { function that is not DECL_REPLACEABLE can be inlined, since all versions of the function will be functionally identical. */ #define DECL_REPLACEABLE_P(NODE) \ - (!DECL_COMDAT (NODE) && !targetm.binds_local_p (NODE)) + (!DECL_COMDAT (NODE) && (DECL_WEAK (NODE) || !targetm.binds_local_p (NODE))) /* The name of the object as the assembler will see it (but before any translations made by ASM_OUTPUT_LABELREF). Often this is the same -- cgit v1.2.1 From a6b74a67c831c6d371d91dbbeda762fb01ff180c Mon Sep 17 00:00:00 2001 From: sandra Date: Sat, 10 Jul 2010 18:43:29 +0000 Subject: 2010-07-10 Sandra Loosemore PR middle-end/42505 gcc/ * tree-inline.c (estimate_num_insns): Refactor builtin complexity lookup code into.... * builtins.c (is_simple_builtin, is_inexpensive_builtin): ...these new functions. * tree.h (is_simple_builtin, is_inexpensive_builtin): Declare. * cfgloopanal.c (target_clobbered_regs): Define. (init_set_costs): Initialize target_clobbered_regs. (estimate_reg_pressure_cost): Add call_p argument. When true, adjust the number of available registers to exclude the call-clobbered registers. * cfgloop.h (target_clobbered_regs): Declare. (estimate_reg_pressure_cost): Adjust declaration. * tree-ssa-loop-ivopts.c (struct ivopts_data): Add body_includes_call. (ivopts_global_cost_for_size): Pass it to estimate_reg_pressure_cost. (determine_set_costs): Dump target_clobbered_regs. (loop_body_includes_call): New function. (tree_ssa_iv_optimize_loop): Use it to initialize new field. * loop-invariant.c (gain_for_invariant): Adjust arguments to pass call_p flag through. (best_gain_for_invariant): Likewise. (find_invariants_to_move): Likewise. (move_single_loop_invariants): Likewise, using already-computed has_call field. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@162043 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index e749d696ec4..960ee7d8e76 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -5046,6 +5046,8 @@ extern tree build_range_check (location_t, tree, tree, int, tree, tree); extern bool merge_ranges (int *, tree *, tree *, int, tree, tree, int, tree, tree); extern void set_builtin_user_assembler_name (tree decl, const char *asmspec); +extern bool is_simple_builtin (tree); +extern bool is_inexpensive_builtin (tree); /* In convert.c */ extern tree strip_float_extensions (tree); -- cgit v1.2.1 From 414c3a2c02971657abc9539eb7db6c7a7c03d9b5 Mon Sep 17 00:00:00 2001 From: froydnj Date: Tue, 13 Jul 2010 18:46:25 +0000 Subject: gcc/ * tree.h (build_function_call_expr): Delete. (build_call_expr_loc_array): New function. (build_call_expr_loc_vec): New function. * tree-flow.h (struct omp_region): Change type of ws_args field to a VEC. * builtins.c (build_function_call_expr): Delete. (build_call_expr_loc_array): New function. (build_call_expr_loc): Call it. Use XALLOCAVEC. (build_call_expr): Likewise. (build_call_expr_loc_vec): New function. * cgraphunit.c (build_cdtor): Call build_call_expr instead of build_function_call_expr. * expr.c (emutls_var_address): Likewise. * varasm.c (emutls_common_1): Likewise. * omp-low.c (expand_omp_atomic_mutex): Likewise. (expand_omp_taskreg): Adjust for new type of region->ws_args. (get_ws_args_for): Return a VEC instead of a tree. (expand_parallel_call): Call build_call_expr_loc_vec instead of build_function_call_expr. * stor-layout.c (self_referential_size): Likewise. gcc/fortran/ * trans-decl.c (build_entry_thunks): Call build_call_expr_loc_vec instead of build_function_call_expr. * trans-intrinsic.c (gfc_conv_intrinsic_sr_kind): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@162148 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index 960ee7d8e76..be70d2bb850 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -5023,8 +5023,9 @@ extern tree fold_builtin_strncpy_chk (location_t, tree, tree, tree, tree, tree); extern tree fold_builtin_snprintf_chk (location_t, tree, tree, enum built_in_function); extern bool fold_builtin_next_arg (tree, bool); extern enum built_in_function builtin_mathfn_code (const_tree); -extern tree build_function_call_expr (location_t, tree, tree); extern tree fold_builtin_call_array (location_t, tree, tree, int, tree *); +extern tree build_call_expr_loc_array (location_t, tree, int, tree *); +extern tree build_call_expr_loc_vec (location_t, tree, VEC(tree,gc) *); extern tree build_call_expr_loc (location_t, tree, int, ...); extern tree build_call_expr (tree, int, ...); extern tree mathfn_built_in (tree, enum built_in_function fn); -- cgit v1.2.1 From 1767a056f10a2ccbc900df04d01193da73a3d272 Mon Sep 17 00:00:00 2001 From: froydnj Date: Thu, 15 Jul 2010 14:31:28 +0000 Subject: gcc/ * tree.h (DECL_CHAIN): Define. * alias.c: Carefully replace TREE_CHAIN with DECL_CHAIN. * c-decl.c: Likewise. * c-parser.c: Likewise. * c-typeck.c: Likewise. * cfgexpand.c: Likewise. * cgraph.c: Likewise. * cgraphunit.c: Likewise. * combine.c: Likewise. * config/alpha/alpha.c: Likewise. * config/arm/arm.c: Likewise. * config/frv/frv.c: Likewise. * config/i386/i386.c: Likewise. * config/i386/winnt-cxx.c: Likewise. * config/ia64/ia64.c: Likewise. * config/iq2000/iq2000.c: Likewise. * config/mep/mep.c: Likewise. * config/mips/mips.c: Likewise. * config/pa/som.h: Likewise. * config/rs6000/rs6000.c: Likewise. * config/s390/s390.c: Likewise. * config/sh/sh.c: Likewise. * config/sh/symbian-cxx.c: Likewise. * config/sparc/sparc.c: Likewise. * config/spu/spu.c: Likewise. * config/stormy16/stormy16.c: Likewise. * config/vxworks.c: Likewise. * config/xtensa/xtensa.c: Likewise. * coverage.c: Likewise. * dbxout.c: Likewise. * dwarf2out.c: Likewise. * emit-rtl.c: Likewise. * expr.c: Likewise. * function.c: Likewise. * gimple-low.c: Likewise. * gimple-pretty-print.c: Likewise. * gimplify.c: Likewise. * integrate.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.c: Likewise. * ipa-split.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-type-escape.c: Likewise. * langhooks.c: Likewise. * lto-cgraph.c: Likewise. * omp-low.c: Likewise. * stor-layout.c: Likewise. * tree-cfg.c: Likewise. * tree-complex.c: Likewise. * tree-dfa.c: Likewise. * tree-dump.c: Likewise. * tree-inline.c: Likewise. * tree-mudflap.c: Likewise. * tree-nested.c: Likewise. * tree-object-size.c: Likewise. * tree-pretty-print.c: Likewise. * tree-sra.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-tailcall.c: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. gcc/ada/ * gcc-interface/decl.c: Carefully replace TREE_CHAIN with DECL_CHAIN. * gcc-interface/trans.c: Likewise. * gcc-interface/utils.c: Likewise. * gcc-interface/utils2.c: Likewise. gcc/c-family/ * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN. * c-format.c: Likewise. gcc/cp/ * cp-tree.h: Carefully replace TREE_CHAIN with DECL_CHAIN. * call.c: Likewise. * class.c: Likewise. * cp-gimplify.c: Likewise. * decl.c: Likewise. * decl2.c: Likewise. * init.c: Likewise. * mangle.c: Likewise. * name-lookup.c: Likewise. * optimize.c: Likewise. * parser.c: Likewise. * pt.c: Likewise. * rtti.c: Likewise. * search.c: Likewise. * semantics.c: Likewise. * typeck.c: Likewise. * typeck2.c: Likewise. gcc/fortran/ * f95-lang.c: Carefully replace TREE_CHAIN with DECL_CHAIN. * trans-common.c: Likewise. * trans-decl.c: Likewise. * trans-types.c: Likewise. * trans.c: Likewise. gcc/java/ * java-tree.h: Carefully replace TREE_CHAIN with DECL_CHAIN. * boehm.c: Likewise. * class.c: Likewise. * decl.c: Likewise. * expr.c: Likewise. * jcf-parse.c: Likewise. * typeck.c: Likewise. * verify-glue.c: Likewise. gcc/objc/ * objc-act.c: Carefully replace TREE_CHAIN with DECL_CHAIN. gcc/testsuite/ * g++.dg/plugin/attribute_plugin.c: Carefully replace TREE_CHAIN with DECL_CHAIN. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@162223 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 1 + 1 file changed, 1 insertion(+) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index be70d2bb850..daf6c2bf4c4 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -2494,6 +2494,7 @@ enum symbol_visibility struct function; +#define DECL_CHAIN(NODE) (TREE_CHAIN (DECL_MINIMAL_CHECK (NODE))) /* This is the name of the object as written by the user. It is an IDENTIFIER_NODE. */ -- cgit v1.2.1 From b3db561dc0f8b5099a7d8811cf3f87bdc0624882 Mon Sep 17 00:00:00 2001 From: froydnj Date: Thu, 15 Jul 2010 15:57:23 +0000 Subject: * tree.h (TREE_RTL_OPERAND_CHECK): Delete. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@162224 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index daf6c2bf4c4..326950c5c6d 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -838,17 +838,6 @@ enum tree_node_structure_enum { __FILE__, __LINE__, __FUNCTION__); \ &__t->exp.operands[__i]; })) -#define TREE_RTL_OPERAND_CHECK(T, CODE, I) __extension__ \ -(*(rtx *) \ - ({__typeof (T) const __t = (T); \ - const int __i = (I); \ - if (TREE_CODE (__t) != (CODE)) \ - tree_check_failed (__t, __FILE__, __LINE__, __FUNCTION__, (CODE), 0); \ - if (__i < 0 || __i >= TREE_OPERAND_LENGTH (__t)) \ - tree_operand_check_failed (__i, __t, \ - __FILE__, __LINE__, __FUNCTION__); \ - &__t->exp.operands[__i]; })) - /* Nodes are chained together for many purposes. Types are chained together to record them for being output to the debugger (see the function `chain_type'). @@ -930,7 +919,6 @@ extern void omp_clause_range_check_failed (const_tree, const char *, int, #define TREE_VEC_ELT_CHECK(T, I) ((T)->vec.a[I]) #define TREE_OPERAND_CHECK(T, I) ((T)->exp.operands[I]) #define TREE_OPERAND_CHECK_CODE(T, CODE, I) ((T)->exp.operands[I]) -#define TREE_RTL_OPERAND_CHECK(T, CODE, I) (*(rtx *) &((T)->exp.operands[I])) #define OMP_CLAUSE_ELT_CHECK(T, i) ((T)->omp_clause.ops[i]) #define OMP_CLAUSE_RANGE_CHECK(T, CODE1, CODE2) (T) #define OMP_CLAUSE_SUBCODE_CHECK(T, CODE) (T) -- cgit v1.2.1 From 2512209b236017dc6514906a6f6cf624a490d680 Mon Sep 17 00:00:00 2001 From: aesok Date: Thu, 15 Jul 2010 18:47:23 +0000 Subject: * tree.h (enum tree_index): Add TI_INTEGER_THREE. (integer_three_node): Add. * tree.c (build_common_tree_nodes_2): Use integer_type_node insead of NULL_TREE in build_int_cst calls. Initialize the integer_three_node. * builtins.c (expand_builtin_prefetch): Use common tree nodes instead of call build_int_cst. * tree-ssa-sccvn.c (copy_reference_ops_from_ref): Ditto. * tree-ssa-loop-ivopts.c (idx_find_step): Ditto. (find_interesting_uses_address): Ditto. * tree-ssa-alias.c (ao_ref_init_from_ptr_and_size): Ditto. * tree-eh.c (lower_eh_constructs_2): Ditto. * tree-vect-loop.c (get_initial_def_for_induction): Ditto. * c-typeck.c (really_start_incremental_init, push_init_level): Ditto. * expmed.c (expand_divmod): Ditto. * tree-mudflap.c (mx_register_decls): Ditto. * varasm.c (array_size_for_constructor): Ditto. * tree-ssa-loop-prefetch.c (issue_prefetch_ref): Ditto. * c-parser.c (c_parser_postfix_expression): Ditto. /cp * decl.c (integer_three_node): Remove. (cxx_init_decl_processing): Do not initialize the integer_three_node. * cp-tree.h (integer_three_node): Remove. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@162230 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index 326950c5c6d..3c0806e4e3a 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -3515,6 +3515,7 @@ enum tree_index TI_INTEGER_ZERO, TI_INTEGER_ONE, + TI_INTEGER_THREE, TI_INTEGER_MINUS_ONE, TI_NULL_POINTER, @@ -3669,6 +3670,7 @@ extern GTY(()) tree global_trees[TI_MAX]; #define integer_zero_node global_trees[TI_INTEGER_ZERO] #define integer_one_node global_trees[TI_INTEGER_ONE] +#define integer_three_node global_trees[TI_INTEGER_THREE] #define integer_minus_one_node global_trees[TI_INTEGER_MINUS_ONE] #define size_zero_node global_trees[TI_SIZE_ZERO] #define size_one_node global_trees[TI_SIZE_ONE] -- cgit v1.2.1 From 84bfaaebbe4a0f0e0299752da56415a9756430c1 Mon Sep 17 00:00:00 2001 From: jakub Date: Fri, 23 Jul 2010 17:04:35 +0000 Subject: * tree.h (struct tree_base): Add nameless_flag bitfield. (TYPE_NAMELESS, DECL_NAMELESS): Define. * omp-low.c (create_omp_child_function, scan_omp_parallel, scan_omp_task, lower_omp_taskreg): Set DECL_NAMELESS and/or DECL_ARTIFICIAL where needed. * dwarf2out.c (dwarf2_name): Return NULL if DECL_NAMELESS. (type_tag): Return NULL if TYPE_NAMELESS or if TYPE_DECL has DECL_NAMELESS set. * trans-types.c (gfc_get_array_descriptor_base, gfc_get_array_type_bounds): Set TYPE_NAMELESS. * trans-decl.c (gfc_build_qualified_array): Set DECL_NAMELESS instead of clearing DECL_NAME. (gfc_build_dummy_array_decl): Set DECL_NAMELESS. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@162476 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index 3c0806e4e3a..32b15384f68 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -387,8 +387,9 @@ struct GTY(()) tree_base { unsigned visited : 1; unsigned packed_flag : 1; unsigned user_align : 1; + unsigned nameless_flag : 1; - unsigned spare : 13; + unsigned spare : 12; /* This field is only used with type nodes; the only reason it is present in tree_base instead of tree_type is to save space. The size of the @@ -2180,6 +2181,9 @@ extern enum machine_mode vector_type_mode (const_tree); the term. */ #define TYPE_RESTRICT(NODE) (TYPE_CHECK (NODE)->type.restrict_flag) +/* If nonzero, type's name shouldn't be emitted into debug info. */ +#define TYPE_NAMELESS(NODE) (TYPE_CHECK (NODE)->base.nameless_flag) + /* The address space the type is in. */ #define TYPE_ADDR_SPACE(NODE) (TYPE_CHECK (NODE)->base.address_space) @@ -2529,6 +2533,10 @@ struct function; #define DECL_CONTEXT(NODE) (DECL_MINIMAL_CHECK (NODE)->decl_minimal.context) #define DECL_FIELD_CONTEXT(NODE) \ (FIELD_DECL_CHECK (NODE)->decl_minimal.context) + +/* If nonzero, decl's name shouldn't be emitted into debug info. */ +#define DECL_NAMELESS(NODE) (DECL_MINIMAL_CHECK (NODE)->base.nameless_flag) + struct GTY(()) tree_decl_minimal { struct tree_common common; location_t locus; -- cgit v1.2.1