aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.c
AgeCommit message (Collapse)AuthorFilesLines
2011-01-01ChangeLog gcc/Kai Tietz1-9/+10
2011-01-01 Kai Tietz <kai.tietz@onevision.com> PR target/38662 * tree.c (type_hash_eq): Call language hook for METHOD_TYPEs, too. ChangeLog gcc/cp 2011-01-01 Kai Tietz <kai.tietz@onevision.com> PR target/38662 * tree.c (cxx_type_hash_eq): Allow METHOD_TYPE, too. ChangeLog gcc/testsuite 2011-01-01 Kai Tietz <kai.tietz@onevision.com> PR target/38662 * g++.dg/eh/pr38662.C: New testcase. From-SVN: r168389
2010-12-26tree.c (get_binfo_at_offset): Use BINFO_TYPE instead of TREE_TYPE, compare ↵Martin Jambor1-2/+2
TYPE_MAIN_VARIANTs of types. 2010-12-26 Martin Jambor <mjambor@suse.cz> * tree.c (get_binfo_at_offset): Use BINFO_TYPE instead of TREE_TYPE, compare TYPE_MAIN_VARIANTs of types. From-SVN: r168255
2010-12-22re PR tree-optimization/45934 (g++.old-deja/g++.other/dtor5.C FAILs with ↵Martin Jambor1-4/+9
-finline-small-functions) 2010-12-22 Martin Jambor <mjambor@suse.cz> PR tree-optimization/45934 PR tree-optimization/46302 PR tree-optimization/46987 * gimple-fold.c (get_base_binfo_for_type): Removed. (gimple_get_relevant_ref_binfo): Likewise. (gimple_fold_obj_type_ref_call): Dumb down to 4.5 functionality, removed parameter inplace, updated the caller. * gimple.h (gimple_get_relevant_ref_binfo): Remove declaration. * ipa-cp.c (ipcp_propagate_types): Do not derive types from constants. (ipcp_discover_new_direct_edges): Do not do devirtualization based on constants. * ipa-prop.c (compute_known_type_jump_func): Use get_ref_base_and_extent and get_binfo_at_offset instead of gimple_get_relevant_ref_binfo. (compute_known_type_jump_func): Likewise. (update_jump_functions_after_inlining): Do not derive types from constants. (try_make_edge_direct_virtual_call): Likewise. * tree.c (get_binfo_at_offset): Get type from non-artificial fields. * testsuite/g++.dg/ipa/ipcp-ivi-1.C: Removed. * testsuite/g++.dg/ipa/ivinline-6.C: Likewise. * testsuite/g++.dg/otr-fold-1.C: Likewise. * testsuite/g++.dg/otr-fold-2.C: Likewise. * testsuite/g++.dg/tree-ssa/pr43411.C: Xfail dump scan. * testsuite/g++.dg/tree-ssa/pr45605.C: Likewise. * testsuite/g++.dg/tree-ssa/pr46987.C: New test. From-SVN: r168168
2010-12-15tree.c (get_file_function_name): Avoid using random seed on GLOBAL_sub_I and ↵Jan Hubicka1-2/+6
GLOBAL_sub_D. * tree.c (get_file_function_name): Avoid using random seed on GLOBAL_sub_I and GLOBAL_sub_D. From-SVN: r167858
2010-12-02tree.c (build_range_type_1): Do not SET_TYPE_STRUCTURAL_EQUALITY for a ↵Eric Botcazou1-7/+8
non-shared type. * tree.c (build_range_type_1): Do not SET_TYPE_STRUCTURAL_EQUALITY for a non-shared type. From-SVN: r167393
2010-12-01tree.c (build_common_builtin_nodes): Do not initialize ↵Jan Hubicka1-6/+0
BUILT_IN_PROFILE_FUNC_ENTER and BUILT_IN_PROFILE_FUNC_EXIT. * tree.c (build_common_builtin_nodes): Do not initialize BUILT_IN_PROFILE_FUNC_ENTER and BUILT_IN_PROFILE_FUNC_EXIT. * builtins.c (expand_builtin_profile_func): Remove. (expand_builtin): Do not handle BUILT_IN_PROFILE_FUNC_ENTER and BUILT_IN_PROFILE_FUNC_EXIT. * builtins.def (profile_func_enter, profile_func_exit): Remove stubs. (__cyg_profile_func_enter, __cyg_profile_func_exit): New. * gimplify.c (gimplify_function_tree): Reorganize code calling profiling functions. From-SVN: r167342
2010-12-01common.opt (main_input_filename, [...]): New Variable entries.Joseph Myers1-0/+105
* common.opt (main_input_filename, main_input_basename, main_input_baselength): New Variable entries. From toplev.c. * final.c (output_quoted_string): Move from toplev.c. * output.h (output_quoted_string): Move from toplev.h. * opts-global.c (read_cmdline_options): Use gcc_options pointer to access main_input_filename, main_input_baselength and main_input_basename. * targhooks.c: Include intl.h and opts.h. (option_affects_pch_p, default_get_pch_validity): Move from toplev.c. * targhooks.h (option_affects_pch_p, default_get_pch_validity): Move from toplev.h. * toplev.c (main_input_filename, main_input_basename, main_input_baselength): Move to common.opt. (output_quoted_string): Move to final.c. (warn_deprecated_use): Move to tree.c. (option_affects_pch_p, default_get_pch_validity, pch_option_mismatch, default_pch_valid_p): Move to targhooks.c. * toplev.h (skip_leading_substring): Move to tree-dump.c. (warn_deprecated_use): Move to tree.h. (output_quoted_string): Move to output.h. (main_input_filename, main_input_basename, main_input_baselength): Move to common.opt. (default_get_pch_validity, default_pch_valid_p): Move to targhooks.c. * tree-dump.c (skip_leading_substring): Move from toplev.h. * tree.c (warn_deprecated_use): Move from toplev.c. * tree.h (warn_deprecated_use): Move from toplev.h. * c-typeck.c, config/alpha/alpha.c, config/arc/arc.c, config/arm/arm.c, config/avr/avr.c, config/bfin/bfin.c, config/cris/cris.c, config/crx/crx.c, config/fr30/fr30.c, config/frv/frv.c, config/h8300/h8300.c, config/ia64/ia64.c, config/iq2000/iq2000.c, config/lm32/lm32.c, config/m32c/m32c.c, config/m32r/m32r.c, config/m68hc11/m68hc11.c, config/m68k/m68k.c, config/mcore/mcore.c, config/mep/mep.c, config/microblaze/microblaze.c, config/mips/mips.c, config/mmix/mmix.c, config/mn10300/mn10300.c, config/moxie/moxie.c, config/pa/pa.c, config/pdp11/pdp11.c, config/picochip/picochip.c, config/s390/s390.c, config/score/score.c, config/sh/sh.c, config/sparc/sparc.c, config/spu/spu.c, config/stormy16/stormy16.c, config/v850/v850.c, config/vax/vax.c, config/xtensa/xtensa.c, gimple-low.c, graphite-sese-to-poly.c, plugin.c, tree-cfg.c, tree-inline.c, varasm.c, xcoffout.c: Don't include toplev.h. * Makefile.in (c-typeck.o, tree-inline.o, tree-cfg.o, gimple-low.o, graphite-sese-to-poly.o, targhooks.o, plugin.o, varasm.o, xcoffout.o): Update dependencies. * config/arm/t-arm (arm.o): Update dependencies. * config/spu/t-spu-elf (spu.o): Update dependencies. cp: * cp-objcp-common.c, lex.c, typeck.c: Don't include toplev.h. * Make-lang.in (cp/lex.o, cp/cp-objcp-common.o, cp/typeck2.o): Update dependencies. java: * jcf-parse.c: Don't include toplev.h. * Make-lang.in (java/jcf-parse.o): Don't depend on toplev.h. From-SVN: r167329
2010-11-30re PR middle-end/46725 (ICE when compiling ↵Eric Botcazou1-4/+2
libstdc++-v3/include/precompiled/stdc++.h) PR middle-end/46725 Revert 2010-11-30 Eric Botcazou <ebotcazou@adacore.com> * tree.c (build_range_type_1): Do not set TYPE_STRUCTURAL_EQUALITY_P because of self-referential bounds. From-SVN: r167300
2010-11-30tree.c (build_range_type_1): Do not set TYPE_STRUCTURAL_EQUALITY_P because ↵Eric Botcazou1-2/+4
of self-referential bounds. * tree.c (build_range_type_1): Do not set TYPE_STRUCTURAL_EQUALITY_P because of self-referential bounds. From-SVN: r167297
2010-11-25target.def (supports_split_stack, [...]): Take gcc_options parameters.Joseph Myers1-1/+2
* target.def (supports_split_stack, except_unwind_info): Take gcc_options parameters. * targhooks.c (default_except_unwind_info, dwarf2_except_unwind_info, sjlj_except_unwind_info): Take gcc_options parameters. * targhooks.h (default_except_unwind_info, dwarf2_except_unwind_info, sjlj_except_unwind_info): Update prototypes. * doc/tm.texi.in (TARGET_IRA_COVER_CLASSES, TARGET_HAVE_NAMED_SECTIONS, TARGET_UNWIND_TABLES_DEFAULT): Document that hooks must not be modified. (TARGET_EXCEPT_UNWIND_INFO): Refer to opts argument. * doc/tm.texi: Regenerate. * defaults.h (STACK_OLD_CHECK_PROTECT, STACK_CHECK_PROTECT): Pass &global_options to targetm.except_unwind_info. * dwarf2out.c (dwarf2out_do_frame, dwarf2out_do_cfi_asm, dwarf2out_begin_prologue, dwarf2out_frame_init, dwarf2out_frame_finish, dwarf2out_assembly_start): Pass &global_options to targetm.except_unwind_info. * except.c (init_eh, finish_eh_generation, gate_convert_to_eh_region_ranges, output_one_function_exception_table): Pass &global_options to targetm.except_unwind_info. * expr.c (build_personality_function): Pass &global_options to targetm.except_unwind_info. * function.c (expand_function_end): Pass &global_options to targetm.except_unwind_info. * hooks.c (hook_bool_bool_gcc_optionsp_false): New. * hooks.h (hook_bool_bool_gcc_optionsp_false): Declare. * opts.c (finish_options): Pass opts to targetm.except_unwind_info and targetm.supports_split_stack. Remove assertions about opts and opts_set. (common_handle_option): Remove assertions about opts, opts_set and dc. * tree-tailcall.c (suitable_for_tail_call_opt_p): Pass &global_options to targetm.except_unwind_info. * tree.c (build_common_builtin_nodes: Pass &global_options to targetm.except_unwind_info. * config/arm/arm.c (arm_except_unwind_info): Add gcc_options parameter. (arm_compute_func_type, arm_expand_prologue, thumb_pushpop, thumb1_expand_prologue, thumb1_output_function_prologue, arm_unwind_emit, arm_output_fn_unwind): Update calls to arm_except_unwind_info. * config/i386/i386.c (ix86_supports_split_stack): Add gcc_options parameter. * config/ia64/ia64.c (ia64_except_unwind_info): Add gcc_options parameter. (ia64_output_function_prologue, ia64_add_bundle_selector_before, ia64_reorg, ia64_asm_unwind_emit): Update calls to ia64_except_unwind_info. * config/pa/pa.c (pa_option_override): Pass &global_options to targetm.except_unwind_info. * config/picochip/picochip-protos.h (picochip_except_unwind_info): Remove prototype. c-family: * c-cppbuiltin.c (c_cpp_builtins): Pass &global_options to targetm.except_unwind_info. From-SVN: r167145
2010-11-11re PR tree-optimization/46383 (ICE: in get_binfo_at_offset, at tree.c:10947)Martin Jambor1-2/+2
2010-11-11 Martin Jambor <mjambor@suse.cz> PR tree-optimization/46383 * ipa-prop.c (compute_complex_assign_jump_func): Ignore negative offsets. (compute_complex_ancestor_jump_func): Likewise. * tree.c (get_binfo_at_offset): Return NULL_TREE if offset is negative. * testsuite/g++.dg/torture/pr46383.C: New test. From-SVN: r166598
2010-11-09tree.h (contains_placeholder_p): Fix comment.Eric Botcazou1-8/+11
* tree.h (contains_placeholder_p): Fix comment. (type_contains_placeholder_p): Adjust comment. * tree.c (contains_placeholder_p): Fix comment. (type_contains_placeholder_1): Do not recurse on pointed-to types and adjust comment. (type_contains_placeholder_p): Add comment. ada/ * gcc-interface/decl.c (finish_fat_pointer_type): New function. (gnat_to_gnu_entity) <E_Array_Type>: Use it to build the fat pointer type. <E_Access_Type>: Likewise. From-SVN: r166484
2010-11-03builtins.c (fold_builtin_signbit): Use build_zero_cst instead of fold_convert.Nathan Froyd1-7/+37
gcc/ * builtins.c (fold_builtin_signbit): Use build_zero_cst instead of fold_convert. * c-typeck.c (build_function_call_vec): Likewise. * cfgexpand.c (expand_debug_expr): Likewise. * cgraphunit.c (assemble_thunk): Likewise. * config/sparc/sparc.c (sparc_fold_builtin): Likewise. * fold-const.c (fold_unary_loc, fold_mult_zconjz): Likewise. (fold_binary_loc, fold_ternary_loc): Likewise. * gimple-fold.c (get_symbol_constant_value): Likewise. * gimple-low.c (lower_builtin_setjmp): Likewise. * gimple.c (gimple_cond_get_ops_from_tree): Likewise. * gimplify.c (gimplify_init_constructor): Likewise. * lambda.h (build_linear_expr): Likewise. * omp-low.c (omp_reduction_init): Likewise. * tree-inline.c (remap_ssa_name): Likewise. * tree-object-size.c (compute_object_sizes): Likewise. * tree-sra.c (init_subtree_with_zero): Likewise. (sra_ipa_modify_assign): Likewise. * tree-ssa-copy.c (propagate_tree_value_into_stmt): Likewise. * tree-ssa-reassoc.c (eliminate_duplicate_pair): Likewise. (eliminate_plus_minus_pair, eliminate_not_pairs): Likewise. (undistribute_ops_list): Likewise. * tree-ssa-sccvn.c (vn_reference_lookup_3): Likewise. * tree-vect-stmts.c (vectorizable_call): Likewise. * tree.c (build_vector_from_ctor, build_one_cst): Likewise. (build_zero_cst): Handle more cases directly. Update comment. gcc/cp/ * class.c (build_base_path, add_vcall_offset): Use build_zero_cst instead of fold_convert. * init.c (build_zero_init): Likewise. * typeck.c (cp_build_binary_op): Likewise. gcc/fortran/ * trans-decl.c (add_argument_checking): Use build_zero_cst instead of fold_convert. * trans-expr.c (gfc_conv_missing_dummy, fill_with_spaces): Likewise. * trans-stmt.c (gfc_trans_do): Likewise. From-SVN: r166227
2010-11-02re PR middle-end/46120 (g++.dg/ipa/ivinline-?.C)Martin Jambor1-19/+21
2010-11-02 Martin Jambor <mjambor@suse.cz> PR middle-end/46120 * tree.c (get_binfo_at_offset): Bail out on artificial fields. Identify primary bases according to their offsets. * testsuite/g++.dg/ipa/ivinline-9.C: New test. From-SVN: r166192
2010-11-01* tree.c (build_vector_from_val): Use useless_type_conversion_p.Nathan Froyd1-2/+2
From-SVN: r166136
2010-10-31fold-const.c (build_zero_vector): Use build_vector_from_val.Nathan Froyd1-11/+4
* fold-const.c (build_zero_vector): Use build_vector_from_val. * tree-vect-loop.c (get_initial_def_for_induction): Likewise. (get_initial_def_for_reduction): Likewise. * tree-vect-slp.c (vect_get_constant_vectors): Likewise. * tree-vect-stmts.c (vect_get_vec_def_for_operand): Likewise. * tree.c (build_one_cst): Likewise. (build_vector_from_val): Use types_compatible_p for assert. From-SVN: r166102
2010-10-29tree.h (build_vector_from_val): Declare.Artjoms Sinkarovs1-0/+22
2010-10-29 Artjoms Sinkarovs <artyom.shinakroff@gmail.com> Andrew Pinski <pinskia@gmail.com> * tree.h (build_vector_from_val): Declare. * tree.c (build_vector_from_val): New function. * c-typeck.c (build_binary_op): Handle vector shifting. * doc/extend.texi: Description of the vector shifting operation. testsuite/ * gcc.c-torture/execute/vector-shift.c: New testcase. * gcc.c-torture/execute/vector-shift1.c: Likewise. * gcc.c-torture/execute/vector-shift2.c: Likewise. * gcc.dg/vector-shift.c: Likewise. * gcc.dg/vector-shift1.c: Likewise. * gcc.dg/torture/vector-shift2.c: Likewise. * gcc.dg/vector-shift3.c: Likewise. * gcc.dg/simd-1b.c: Adjust. Co-Authored-By: Andrew Pinski <pinskia@gmail.com> From-SVN: r166061
2010-10-21re PR tree-optimization/45875 (ice in gimple_fold_obj_type_ref_known_binfo ↵Martin Jambor1-3/+0
with -O2) 2010-10-21 Martin Jambor <mjambor@suse.cz> PR tree-optimization/45875 * tree.c (get_binfo_at_offset): Remove initial zero offset test. * testsuite/g++.dg/ipa/pr45875.C: New test. From-SVN: r165780
2010-10-18re PR lto/44950 (ICE in dwarf2out_finish, at dwarf2out.c:22271)Richard Guenther1-0/+9
2010-10-18 Richard Guenther <rguenther@suse.de> PR lto/44950 * tree.c (free_lang_data_in_decl): As we clear TYPE_METHODS also clear references to entries of it. * g++.dg/lto/20101015-2_0.C: New testcase. From-SVN: r165629
2010-10-15tree.c (free_lang_data_in_decl): Clear DECL_INITIAL for automatic variables ↵Richard Guenther1-2/+3
again. 2010-10-15 Richard Guenther <rguenther@suse.de> * tree.c (free_lang_data_in_decl): Clear DECL_INITIAL for automatic variables again. * g++.dg/lto/20101015-1_0.C: New testcase. From-SVN: r165511
2010-10-15re PR tree-optimization/45957 (g++.dg/ext/fnname3.C FAILs with -flto/-fwhopr)Richard Guenther1-16/+0
2010-10-15 Richard Guenther <rguenther@suse.de> PR lto/45957 * tree.c (free_lang_data_in_decl): Do not clear DECL_INITIAL of vars. * g++.dg/lto/20101014-1_0.C: New testcase. From-SVN: r165502
2010-10-14sched-deps.c (sched_insn_is_legitimate_for_speculation): Invoke ↵Eric Botcazou1-0/+8
may_trap_or_fault_p instead of may_trap_p predicate. * sched-deps.c (sched_insn_is_legitimate_for_speculation): Invoke may_trap_or_fault_p instead of may_trap_p predicate. * tree.c (substitute_in_expr): Propagate the TREE_THIS_NOTRAP flag. (substitute_placeholder_in_expr): Likewise. * tree-inline.c (remap_gimple_op_r): Propagate the TREE_THIS_NOTRAP flag on MEM_REF nodes. (copy_tree_body_r): Propagate the TREE_READONLY and TREE_THIS_NOTRAP flags on INDIRECT_REF nodes. ada/ * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Set TREE_THIS_NOTRAP on the INDIRECT_REF node built for the template. * gcc-interface/trans.c (Identifier_to_gnu): Set TREE_THIS_NOTRAP on the INDIRECT_REF node built for objects used by reference. * gcc-interface/utils2.c (build_binary_op): Add short-circuit for constant result. Set TREE_THIS_NOTRAP on ARRAY_REF and ARRAY_RANGE_REF. (gnat_stabilize_reference_1): Propagate the TREE_THIS_NOTRAP flag. From-SVN: r165468
2010-10-14re PR c++/44561 (using nullptr_t with -flto/-fwhopr causes ICE: tree code ↵Richard Guenther1-0/+4
'lang_type' is not supported in gimple streams) 2010-10-14 Richard Guenther <rguenther@suse.de> PR lto/44561 * tree.def (NULLPTR_TYPE): New tree code. * dbxout.c (dbxout_type): Handle NULLPTR_TYPE. * dwarf2out.c (is_base_type): Likewise. (gen_type_die_with_usage): Likewise. * sdbout.c (plain_type_1): Likewise. * tree.c (build_int_cst_wide): Likewise. * gimple.c (gimple_types_compatible_p_1): NULLPTR_TYPE types are equal. cp/ * cp-tree.h (NULLPTR_TYPE_P): Adjust. * decl.c (cxx_init_decl_processing): Build a NULLPTR_TYPE node, use build_int_cst. * error.c (dump_type): Handle NULLPTR_TYPE. (dump_type_prefix): Likewise. (dump_type_suffix): Likewise. * mangle.c (write_type): Likewise. * name-lookup.c (arg_assoc_type): Likewise. * rtti.c (typeinfo_in_lib_p): Likewise. * pt.c (tsubst): Likewise. * g++.dg/lto/20101010-3_0.C: New testcase. * g++.dg/lto/20101010-4_0.C: Likewise. From-SVN: r165462
2010-10-13Centralize knowledge of eh personality routines.Richard Henderson1-5/+1
From-SVN: r165433
2010-10-09re PR lto/45947 (ICE: tree code 'template_decl' is not supported in gimple ↵Richard Guenther1-1/+1
streams with -flto/-fwhopr) 2010-10-09 Richard Guenther <rguenther@suse.de> PR lto/45947 * tree.c (free_lang_data_in_cgraph): Properly walk the varpool. * g++.dg/lto/20101009-1_0.C: New testcase. From-SVN: r165234
2010-10-08lto-streamer-in.c (lto_input_ts_decl_minimal_tree_pointers): Re-construct ↵Richard Guenther1-63/+1
BLOCK_VARS. 2010-10-08 Richard Guenther <rguenther@suse.de> * lto-streamer-in.c (lto_input_ts_decl_minimal_tree_pointers): Re-construct BLOCK_VARS. (lto_input_ts_block_tree_pointers): Do not stream BLOCK_VARS. * lto-streamer-out.c (lto_output_ts_block_tree_pointers): Likewise. * tree.c (free_lang_data_in_block): Remove. (free_lang_data_in_decl): Do not touch DECL_CONTEXT of non-PARM_DECLs. Do not touch the BLOCK tree. * expr.c (expand_expr_real_1): Allow externals. From-SVN: r165191
2010-09-30opt-functions.awk (static_var): Update comment.Joseph Myers1-2/+4
* opt-functions.awk (static_var): Update comment. (var_ref): Return offsetof expression or -1, not variable address. * optc-gen.awk: Generate structure field initializers instead of static variables. Expect -1 for missing variables instead of null pointer. Add gcc_options parameters to generated functions. * opth-gen.awk: Generate structure fields for static variables. Add gcc_options parameters to generated functions. * common.opt (optimize, optimize_size): Add variables. * config/i386/i386-c.c (ix86_pragma_target_parse): Pass &global_options to cl_target_option_restore. * config/i386/i386.c (ix86_valid_target_attribute_p): Pass &global_options to cl_optimization_restore, cl_target_option_save and cl_target_option_restore. (ix86_set_current_function): Pass &global_options to cl_target_option_restore. * config/pdp11/pdp11.h (optimize): Remove. * config/rs6000/rs6000.h (optimize): Remove. * config/sh/sh.h (optimize): Remove. * config/xtensa/xtensa.h (optimize): Remove. * coretypes.h (struct gcc_options): Declare. * diagnostic.c (diagnostic_initialize): Initialize context->option_state. (diagnostic_report_diagnostic): Pass option_state to option_enabled hook. * diagnostic.h (diagnostic_context.option_enabled): Add void * parameter. (diagnostic_context.option_state): New field. * final.c (final_start_function, final, final_scan_insn): Rename optimize parameter to optimize_p. * flags.h (optimize, optimize_size): Remove. * function.c (invoke_set_current_function_hook): Pass &global_options to cl_optimization_restore. * gcc.c (driver_handle_option): Take gcc_options parameter. Assert that it is &global_options. (process_command): Pass &global_options to read_cmdline_option. * ipa-pure-const.c (suggest_attribute): Pass &global_options to option_enabled. * lto-opts.c (lto_reissue_options): Use option_flag_var. Pass &global_options to set_option. * opts-common.c (handle_option, handle_generated_option, read_cmdline_option, set_option): Take explicit gcc_options parameters. Use option_flag_var. (option_flag_var): New. * opts.c (common_handle_option, lang_handle_option, target_handle_option): Take gcc_options parameter. Assert that it is &global_options. (read_cmdline_options): Pass &global_options to read_cmdline_option. (print_filtered_help): Use option_flag_var. Pass &global_options to option_enabled. (common_handle_option): Use option_flag_var. (option_enabled): Take opts parameter. Use option_flag_var. (get_option_state): Take gcc_options parameter. Use option_flag_var. Pass gcc_options parameter to option_enabled. (enable_warning_as_error): Pass &global_options to handle_generated_option. * opts.h (struct cl_option): Change flag_var to flag_var_offset. (cl_option_handler_func.handler): Take gcc_options parameter. (option_enabled, get_option_state, set_option, handle_option, handle_generated_option, read_cmdline_option): Take gcc_options parameters. * toplev.c (optimize, optimize_size): Remove. (print_switch_values): Pass &global_options to option_enabled. (option_affects_pch_p): Use option_flag_var. Pass &global_options to get_option_state. (general_init): Initialize global_dc->option_state. * tree.c (build_optimization_node): Pass &global_options to cl_optimization_save. (build_target_option_node): Pass &global_options to cl_target_option_save. c-family: * c-common.c (handle_optimize_attribute): Pass &global_options to cl_optimization_save and cl_optimization_restore. * c-opts.c (c_common_handle_option): Pass &global_options to handle_generated_option. * c-pragma.c (handle_pragma_diagnostic): Use option_flag_var. (handle_pragma_pop_options, handle_pragma_reset_options): Pass &global_options to cl_optimization_restore. From-SVN: r164751
2010-09-28Hookize TARGET_UNWIND_INFO et al.Richard Henderson1-2/+2
From-SVN: r164701
2010-09-24extend.texi: (attribute leaf): Document.Jan Hubicka1-13/+16
* doc/extend.texi: (attribute leaf): Document. * tree.c (local_define_builtin): Handle ECF_LEAF. (build_common_builtin_nodes): Set ECF_LEAF where needed. * tree.h (ECF_LEAF): New. * ipa-reference.c (propagate_bits): For leaf calls propagate ever overwrittable and unavailable functions. (ipa_init): Put all_module_statics into optimization_summary_obstack. (copy_global_bitmap): Do not copy all_module_statics. (read_write_all_from_decl): Use cgraph_node argument; handle ECF_LEAF. (propagate): Handle overwritable and unavailable leaf functions; initialize global info for overwritable and unavailable leaf functions; do not free all module statics. (ipa_reference_get_not_read_global, ipa_reference_get_not_written_global): leaf calls don't clobber local statics. * calls.c (flags_from_decl_or_type): Handle leaf. * tree-cfg.c (stmt_can_make_abnormal_goto): Leaf functions can't do abnormal gotos. * c-common.c (handle_leaf_attribute): New function. (struct attribute_spec c_common_att): Add leaf. * gcc.dg/tree-ssa/leaf.c: New testcase. From-SVN: r164606
2010-09-20langhooks.h (struct lang_hooks_for_types): Remove hash_types field.Eric Botcazou1-24/+62
* langhooks.h (struct lang_hooks_for_types): Remove hash_types field. * langhooks-def.h (LANG_HOOKS_HASH_TYPES): Delete. (LANG_HOOKS_FOR_TYPES_INITIALIZER): Remove LANG_HOOKS_HASH_TYPES. * system.h (LANG_HOOKS_HASH_TYPES): Poison. * tree.c (type_hash_canon): Do not test lang_hooks.types.hash_types. (build_nonstandard_integer_type): Likewise. (build_range_type_1): New function, built from... (build_range_type): ...this. Call build_range_type_1. (build_nonshared_range_type): New function. (build_array_type_1): New function, built from... (build_array_type: ...this. Call build_array_type_1. (build_nonshared_array_type): New function. * tree.h (build_nonshared_range_type): Declare. (build_nonshared_array_type): Likewise. ada/ * gcc-interface/decl.c (gnat_to_gnu_entity): Replace calls to build_array_type with calls to build_nonshared_array_type. (substitute_in_type): Likewise. * gcc-interface/misc.c (LANG_HOOKS_HASH_TYPES): Delete. (LANG_HOOKS_TYPE_HASH_EQ): Define. (gnat_post_options): Add 'static' keyword. (gnat_type_hash_eq): New static function. * gcc-interface/utils.c (fntype_same_flags_p): New function. (create_subprog_type): Call it. (create_index_type): Call build_nonshared_range_type and tidy up. (create_range_type): Likewise. * gcc-interface/gigi.h (fntype_same_flags_p): Declare. From-SVN: r164452
2010-09-16tree.c (tree_node_structure_for_code): TRANSLATION_UNIT_DECL is ↵Richard Guenther1-2/+21
TS_TRANSLATION_UNIT_DECL. 2010-09-16 Richard Guenther <rguenther@suse.de> * tree.c (tree_node_structure_for_code): TRANSLATION_UNIT_DECL is TS_TRANSLATION_UNIT_DECL. (initialize_tree_contains_struct): Adjust. (all_translation_units): New global vector. (build_translation_unit_decl): New function. * tree.h (TRANSLATION_UNIT_LANGUAGE): New macro. (struct tree_translation_unit_decl): New. (all_translation_units): Declare. (union tree_node): Add translation_unit_decl member. (build_translation_unit_decl): Declare. * treestruct.def (TS_TRANSLATION_UNIT_DECL): New. * lto-streamer-out.c (pack_ts_translation_unit_decl_value_fields): New function. (pack_value_fields): Call it. (lto_output_tree_ref): Handle references to TRANSLATION_UNIT_DECL. (lto_output_ts_translation_unit_decl_tree_pointers): New function. (lto_output_tree_pointers): Call it. * lto-streamer-in.c (lto_input_tree_ref): Handle references to TRANSLATION_UNIT_DECL. (unpack_ts_translation_unit_decl_value_fields): New function. (unpack_value_fields): Call it. (lto_input_ts_translation_unit_decl_tree_pointers): New function. (lto_input_tree_pointers): Call it. * lto-streamer.c (check_handled_ts_structures): Adjust. * lto-streamer.h (enum LTO_tags): Add LTO_translation_unit_decl_ref. * c-decl.c (all_translation_units): Remove. (pop_scope): Use build_translation_unit_decl. (collect_all_refs): Adjust. (for_each_global_decl): Likewise. (c_write_global_declarations): Likewise. java/ * jcf-parse.c (current_file_list): Remove. (java_parse_file): Use build_translation_unit_decl. Adjust. From-SVN: r164331
2010-09-13tree.c (build_zero_cst): New.Jan Hubicka1-0/+12
* tree.c (build_zero_cst): New. * tree.h (build_zero_cst): Declare. * tree-ssa-ccp.c (get_constant_value): Accept general operands. (get_base_constructor): Break out from ... (fold_const_aggregate_ref): Here; handle empty constructors. * gcc.dg/torture/pr23821.c: Drop static keyword. * gcc.dg/tree-ssa/loop-19.c: Likewise. * gcc.dg/tree-ssa/foldconst-4.c: New. From-SVN: r164250
2010-09-10tree.c (make_vector_type): Do not set TYPE_DEBUG_REPRESENTATION_TYPE.Richard Guenther1-18/+0
2010-09-10 Richard Guenther <rguenther@suse.de> * tree.c (make_vector_type): Do not set TYPE_DEBUG_REPRESENTATION_TYPE. * tree.h (TYPE_DEBUG_REPRESENTATION_TYPE): Remove. * lto-streamer-out.c (lto_output_ts_type_tree_pointers): Do not stream TYPE_DEBUG_REPRESENTATION_TYPE. * lto-streamer-in.c (lto_input_ts_type_tree_pointers): Likewise. From-SVN: r164193
2010-09-10re PR debug/44115 (gcc.dg/guality/sra-1.c failure)Richard Guenther1-6/+0
2010-09-10 Richard Guenther <rguenther@suse.de> PR debug/44115 * tree.c (free_lang_data_in_decl): Do not clear DECL_DEBUG_EXPR. * lto-streamer-out.c (lto_output_ts_decl_common_tree_pointers): Output DECL_DEBUG_EXPR. * lto-streamer-in.c (lto_input_ts_decl_common_tree_pointers): Input DECL_DEBUG_EXPR. From-SVN: r164179
2010-09-10tree.c (type_hash_eq): For ARRAY_TYPEs also compare TYPE_SIZE.Richard Guenther1-44/+31
2010-09-10 Richard Guenther <rguenther@suse.de> * tree.c (type_hash_eq): For ARRAY_TYPEs also compare TYPE_SIZE. (build_index_type): Implement in terms of build_range_type. (build_range_type): Do not allow NULL_TREE type, improve hashing to cover more cases. Set TYPE_STRUCTURAL_EQUALITY_P if we didn't hash. * c-decl.c (grokdeclarator): When modifying TYPE_SIZE manually create a distinct copy of the type. From-SVN: r164174
2010-09-10tree.h (build_index_2_type): Remove.Richard Guenther1-9/+0
2010-09-10 Richard Guenther <rguenther@suse.de> * tree.h (build_index_2_type): Remove. * tree.c (build_index_2_type): Remove. ada/gcc-interface/ * utils.c (create_index_type): Use build_range_type. From-SVN: r164164
2010-09-08re PR debug/45419 (-fcompare-debug failure at -O3)Alexandre Oliva1-0/+15
PR debug/45419 PR debug/45408 * tree-pretty-print.c (dump_generic_node): Disregard top-level qualifiers in otherwise equal MEM_REF pointer types. * fold-const.c (operand_equal_p): Compare pointer type of MEM_REFs. * tree.c (iterative_hash_expr): Hash the pointer type of MEM_REFs. From-SVN: r164031
2010-09-06tree.def (MISALIGNED_INDIRECT_REF): Remove.Richard Guenther1-4/+38
2010-09-06 Richard Guenther <rguenther@suse.de> * tree.def (MISALIGNED_INDIRECT_REF): Remove. * tree.h (INDIRECT_REF_P): Only check for INDIRECT_REF. (build_aligned_type): Declare. * tree.c (check_qualified_type): Also compare TYPE_ALIGN. (check_aligned_type): New function. (build_aligned_type): Likewise. * expr.c (expand_assignment): Handle misaligned stores via TARGET_MEM_REF and MEM_REF using movmisalign_optab. (expand_expr_real_1): Likewise. (safe_from_p): Remove MISALIGNED_INDIRECT_REF handling. * tree-vect-stmts.c (vectorizable_store): Do not build MISALIGNED_INDIRECT_REF but initialize alignment information. (vectorizable_load): Likewise. * builtins.c (get_object_alignment): Remove MISALIGNED_INDIRECT_REF handling. * cfgexpand.c (expand_debug_expr): Likewise. * dwarf2out.c (loc_list_from_tree): Likewise. * fold-const.c (maybe_lvalue_p): Likewise. (operand_equal_p): Likewise. (build_fold_addr_expr_with_type_loc): Likewise. * gimplify.c (gimplify_addr_expr): Likewise. (gimplify_expr): Likewise. * tree-cfg.c (verify_types_in_gimple_min_lval): Likewise. (verify_gimple_assign_single): Likewise. * tree-dump.c (dequeue_and_dump): Likewise. (tree_could_trap_p): Likewise. * tree-predcom.c (ref_at_iteration): Likewise. * tree-pretty-print.c (dump_generic_node): Likewise. (op_code_prio): Likewise. (op_symbol_code): Likewise. * tree-ssa-ccp.c (get_value_from_alignment): Likewise. * tree-ssa-loop-im.c (for_each_index): Likewise. (gen_lsm_tmp_name): Likewise. * tree-ssa-loop-ivopts.c (idx_find_step): Likewise. (find_interesting_uses_address): Likewise. * tree-ssa-loop-prefetch.c (idx_analyze_ref): Likewise. * tree-ssa-operands.c (get_expr_operands): Likewise. * tree-ssa-pre.c (create_component_ref_by_pieces_1): Likewise. * tree-ssa-sccvn.c (copy_reference_ops_from_ref): Likewise. (ao_ref_init_from_vn_reference): Likewise. * tree.c (staticp): Likewise. (build1_stat): Likewise. (reference_alias_ptr_type): Likewise. * emit-rtl.c (set_mem_attributes_minus_bitpos): Likewise. * config/rs6000/rs6000.c (rs6000_check_sdmode): Remove MISALIGNED_INDIRECT_REF handling. From-SVN: r163915
2010-09-03tree.def (TARGET_MEM_REF): Merge TMR_SYMBOL and TMR_BASE.Richard Guenther1-1/+1
2010-09-03 Richard Guenther <rguenther@suse.de> * tree.def (TARGET_MEM_REF): Merge TMR_SYMBOL and TMR_BASE. Move TMR_OFFSET to second operand. Add TMR_INDEX2. * tree.h (TMR_SYMBOL): Remove. (TMR_BASE, TMR_OFFSET): Adjust. (TMR_INDEX2): New. * alias.c (ao_ref_from_mem): Use TMR_BASE. * builtins.c (get_object_alignment): Merge TMR_BASE and TMR_SYMBOL handling. * cfgexpand.c (expand_debug_expr): Use TMR_BASE. * gimple.c (get_base_address): Merge MEM_REF and TARGET_MEM_REF handling. Also allow TARGET_MEM_REF as base address. (walk_stmt_load_store_addr_ops): TMR_BASE is always non-NULL. * gimplify.c (gimplify_expr): Gimplify TMR_BASE like MEM_REF base. Gimplify TMR_INDEX2. * tree-cfg.c (verify_types_in_gimple_reference): Adjust. * tree-dfa.c (get_ref_base_and_extent): Likewise. (get_addr_base_and_unit_offset): Likewise. * tree-eh.c (tree_could_trap_p): Likewise. * tree-pretty-print.c (dump_generic_node): Likewise. * tree-ssa-address.c (tree_mem_ref_addr): Simplify. Handle TMR_INDEX2. (create_mem_ref_raw): Merge symbol and base. Move 2ndary base to index2. (get_address_description): Reconstruct addres description from merged TMR_BASE and TMR_INDEX2. (maybe_fold_tmr): Fold propagated addresses. * tree-ssa-alias.c (indirect_ref_may_alias_decl_p): Merge MEM_REF and TARGET_MEM_REF paths. (indirect_refs_may_alias_p): Likewise. * tree-ssa-live.c (mark_all_vars_used_1): Handle TMR_INDEX2 instead of TMR_SYMBOL. * tree-ssa-operands.c (get_tmr_operands): Simplify. * tree-ssa-pre.c (create_component_ref_by_pieces_1): Adjust according to changes ... * tree-ssa-sccvn.c (copy_reference_ops_from_ref): ... here. Split TARGET_MEM_REF into two fields plus the base. * tree.c (mem_ref_offset): Simplify. * tree-ssa-loop-im.c (for_each_index): Handle TMR_INDEX2. * tree-ssa-loop-ivopts.c (find_interesting_uses_address): Likewise. Strip NOPs when folding MEM_REF addresses. * tree-ssa-sink.c (is_hidden_global_store): Handle TARGET_MEM_REF. * gimple-fold.c (maybe_fold_reference): Fold TARGET_MEM_REF here ... (fold_gimple_assign): ... not here. From-SVN: r163802
2010-09-01re PR bootstrap/45321 (ARM bootstrap failure due to stdarg_p change)Mikael Pettersson1-1/+1
2010-09-01 Mikael Pettersson <mikpe@it.uu.se> PR bootstrap/45321 * tree.c (stdarg_p): Make fntype parameter const. * tree.h (stdarg_p): Likewise. (function_args_iterator): Remove unused fntype field. (function_args_iter_init): Do not initialize fntype field. Make fntype parameter const. From-SVN: r163726
2010-08-26re PR tree-optimization/45255 (internal compiler error: verify_stmts failed ↵Richard Guenther1-2/+1
with -fwhopr) 2010-08-26 Richard Guenther <rguenther@suse.de> PR tree-optimization/45255 * tree.c (decl_address_invariant_p): DECL_DLLIMPORT_P statics and externals are also invariant. From-SVN: r163565
2010-08-20vec.h (FOR_EACH_VEC_ELT): Define.Nathan Froyd1-11/+11
gcc/ * vec.h (FOR_EACH_VEC_ELT): Define. * c-decl.c: Use it. * cfgloop.c: Likewise. * cfgloopmanip.c: Likewise. * cgraph.c: Likewise. * cgraphunit.c: Likewise. * combine.c: Likewise. * config/bfin/bfin.c: Likewise. * config/mips/mips.c: Likewise. * config/rs6000/rs6000.c: Likewise. * dbxout.c: Likewise. * df-scan.c: Likewise. * dominance.c: Likewise. * dse.c: Likewise. * dwarf2out.c: Likewise. * except.c: Likewise. * expr.c: Likewise. * function.c: Likewise. * gcse.c: Likewise. * genattr.c: Likewise. * ggc-common.c: Likewise. * gimplify.c: Likewise. * graphite-blocking.c: Likewise. * graphite-clast-to-gimple.c: Likewise. * graphite-dependences.c: Likewise. * graphite-interchange.c: Likewise. * graphite-poly.c: Likewise. * graphite-scop-detection.c: Likewise. * graphite-sese-to-poly.c: Likewise. * graphite.c: Likewise. * haifa-sched.c: Likewise. * ifcvt.c: Likewise. * implicit-zee.c: Likewise. * ipa-prop.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa.c: Likewise. * ira-build.c: Likewise. * ira-color.c: Likewise. * ira-emit.c: Likewise. * lambda-code.c: Likewise. * loop-invariant.c: Likewise. * loop-unroll.c: Likewise. * lower-subreg.c: Likewise. * lto-cgraph.c: Likewise. * lto-opts.c: Likewise. * lto-streamer-in.c: Likewise. * lto-streamer-out.c: Likewise. * lto-streamer.c: Likewise. * lto-symtab.c: Likewise. * matrix-reorg.c: Likewise. * opts.c: Likewise. * predict.c: Likewise. * print-tree.c: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-ir.c: Likewise. * sel-sched.c: Likewise. * sese.c: Likewise. * stor-layout.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-chrec.c: Likewise. * tree-data-ref.c: Likewise. * tree-emutls.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-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-ssa-live.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-phiprop.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa.c: Likewise. * tree-vect-data-refs.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-vrp.c: Likewise. * tree.c: Likewise. * value-prof.c: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * vmsdbgout.c: Likewise. gcc/ada/ * gcc-interface/decl.c: Use FOR_EACH_VEC_ELT. * gcc-interface/trans.c: Likewise. * gcc-interface/utils.c: Likewise. gcc/c-family/ * c-common.c: Use FOR_EACH_VEC_ELT. * c-gimplify.c: Likewise. * c-pragma.c: Likewise. gcc/cp/ * call.c: Use FOR_EACH_VEC_ELT. * class.c: Likewise. * decl.c: Likewise. * decl2.c: Likewise. * error.c: Likewise. * except.c: Likewise. * mangle.c: Likewise. * method.c: Likewise. * name-lookup.c: Likewise. * parser.c: Likewise. * pt.c: Likewise. * repo.c: Likewise. * semantics.c: Likewise. * typeck2.c: Likewise. gcc/fortran/ * trans-openmp.c: Use FOR_EACH_VEC_ELT. gcc/java/ * class.c: Use FOR_EACH_VEC_ELT. * expr.c: Likewise. * jcf-parse.c: Likewise. * resource.c: Likewise. gcc/lto/ * lto.c: Use FOR_EACH_VEC_ELT. From-SVN: r163401
2010-08-16tree-cfg.c (verify_types_in_gimple_reference): Verify TARGET_MEM_REF a bit.Richard Guenther1-4/+5
2010-08-16 Richard Guenther <rguenther@suse.de> * tree-cfg.c (verify_types_in_gimple_reference): Verify TARGET_MEM_REF a bit. * tree-ssa-address.c (addr_for_mem_ref): Adjust. (create_mem_ref_raw): Always create TMR_OFFSET, store the alias pointer type via it. (copy_mem_ref_info): Adjust. (maybe_fold_tmr): Likewise. * tree.c (mem_ref_offset): Also handle TARGET_MEM_REF. (reference_alias_ptr_type): Likewise. * tree.def (TARGET_MEM_REF): Remove TMR_ORIGINAL operand, adjust documentation of TMR_OFFSET operand. * alias.c (get_alias_set): Do not look at TMR_ORIGINAL but use the alias pointer type. * expr.c (expand_expr_real_1): Do not use TMR_ORIGINAL to initialize mem attrs but the TMR itself. * tree-eh.c (tree_could_trap_p): Handle TARGET_MEM_REF similar to MEM_REF. * tree-pretty-print.c (dump_generic_node): Do not dump TMR_ORIGINAL. * tree-ssa-loop-ivopts.c (idx_remove_ssa_names): Remove. (unshare_and_remove_ssa_names): Likewise. (copy_ref_info): Adjust. * tree-ssa-pre.c (create_component_ref_by_pieces_1): Simplify TARGET_MEM_REF case. * tree-ssa-sccvn.c (copy_reference_ops_from_ref): Do not look at TMR_ORIGINAL. * tree.h (TMR_ORIGINAL): Remove. * gimple.c (get_base_address): For TARGET_MEM_REF with a symbol return that. * tree-dfa.c (get_ref_base_and_extent): Handle TARGET_MEM_REF with a symbol. (get_addr_base_and_unit_offset): Likewise. * tree-ssa-alias.c (indirect_ref_may_alias_decl_p): Handle TARGET_MEM_REFs. (indirect_ref_may_alias_decl_p): Likewise. (refs_may_alias_p_1): Do not bail out for TARGET_MEM_REFs. From-SVN: r163278
2010-08-10tree.h (tree_node_kind): Delete.Nathan Froyd1-2/+0
* tree.h (tree_node_kind) [perm_list_kind,temp_list_kind]: Delete. * tree.c (tree_node_kind): Delete corresponding entries. From-SVN: r163047
2010-08-09tree.c (nreverse): Assert that we don't have a BLOCK.Nathan Froyd1-0/+3
gcc/ * tree.c (nreverse): Assert that we don't have a BLOCK. gcc/ada/ * gcc-interface/utils.c (gnat_poplevel): Use blocks_nreverse. From-SVN: r163036
2010-07-29tree.c (build_vector): Assert that the vector constant has enough elements.Richard Guenther1-0/+7
2010-07-29 Richard Guenther <rguenther@suse.de> * tree.c (build_vector): Assert that the vector constant has enough elements. (build_vector_from_ctor): Pad with trailing zeros. From-SVN: r162677
2010-07-21re PR lto/45018 (ICE: tree check: did not expect class 'type', have 'type' ↵Richard Guenther1-4/+11
(record_type) in contains_placeholder_p, at tree.c:2749) 2010-07-21 Richard Guenther <rguenther@suse.de> PR lto/45018 * tree.c (find_decls_types_r): Do not follow TREE_CHAIN of TYPE_DECLs. Do not follow TYPE_NEXT_VARIANT, TYPE_NEXT_PTR_TO, nor TYPE_NEXT_REF_TO or TYPE_CANONICAL. * g++.dg/lto/20100721-1_0.C: New testcase. From-SVN: r162380
2010-07-16tree.c (build_common_builtin_nodes): Use build_function_type_list instead of ↵Nathan Froyd1-50/+36
build_function_type. * tree.c (build_common_builtin_nodes): Use build_function_type_list instead of build_function_type. * tree-ssa-loop-prefetch.c (tree_ssa_prefetch_arrays): Likewise. * cgraphunit.c (cgraph_build_static_cdtor): Likewise. From-SVN: r162264
2010-07-15tree.h (enum tree_index): Add TI_INTEGER_THREE.Anatoly Sokolov1-3/+4
* 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. From-SVN: r162230
2010-07-15tree.h (DECL_CHAIN): Define.Nathan Froyd1-7/+7
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. From-SVN: r162223