aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.h
AgeCommit message (Collapse)AuthorFilesLines
2004-10-29tree-phinodes.c (make_phi_node, [...]): Don't zero the whole PHI node.Kazu Hirata1-1/+1
* tree-phinodes.c (make_phi_node, resize_phi_node): Don't zero the whole PHI node. * tree.h (tree_phi_node): Tell the garbage collector to chase num_args arguments. From-SVN: r89844
2004-10-29* tree.h (struct tree_ssa_name): Remove field 'equiv'.Diego Novillo1-2/+0
From-SVN: r89832
2004-10-27re PR tree-optimization/18048 (mgrid loop performance regression with ivopts ↵Zdenek Dvorak1-0/+1
(register pressure)) PR tree-optimization/18048 * fold-const.c (try_move_mult_to_index): New function. (fold): Use try_move_mult_to_index. * tree-ssa-loop-ivopts.c (try_add_cand_for): Prefer common candidates. * tree-ssa-loop-niter.c (number_of_iterations_cond): Produce an all-ones unsigned constant without extra bits. * tree.c (build_low_bits_mask): New function. * tree.h (build_low_bits_mask): Declare. From-SVN: r89708
2004-10-22stmt.c (asm_op_is_mem_input): Remove.Kazu Hirata1-1/+0
* stmt.c (asm_op_is_mem_input): Remove. * tree.h: Remove the corresponding prototype. From-SVN: r89467
2004-10-14Speed up walk_tree by introducing a special-purpose hash table.Matt Austern1-1/+5
* pointer-set.c: New file, special-purpose hash table. * pointer-set.h: New file. * tree.h (struct pointer_set_t): Declare as opaque type. (tree_walk): Last argument is pointer_set_t* now. * tree-inline.c (WALK_SUBTREE): Convert from htab to pset. (walk_type_fields): (walk_tree): Convert from htab_t to pointer_set_t for keeping track of which nodes have already been visited. (walk_tree_without_duplicates): Convert from htab_t to pointer_set_t. * cgraphunit.c (cgraph_create_edges): Likewise. (cgraph_characterize_statics_local): Likewise. * tree-dfa.c (collect_dfa_stats): Likewise. * langhooks-def.h (lhd_tree_inlining_walk_subtrees): Last arg is pointer_set_t* now. * langhooks.c (lhd_tree_inlining_walk_subtrees): Likewise. * langhooks.h (struct lang_hooks_for_tree_inlining): Last arg type of walk_subtrees is pointer_set_t* now. * Makefile.in (OBJS-common): add pointer-set.o (tree-inline.o): Depends on pointer-set.h (tree-dfa.o): Likewise (cgraphunit.o): Likewise * cp/Make-lang.in (pt.o): depends on pointer-set.h * cp/cp-tree.h (cp_walk_subtrees): Last argument is pointer_set_t* now. * cp/pt.c (struct pair_fn_data): Use pointer_set_t, not htab_t (for_each_template_parm): Convert from htab_t to pointer_set_t. * cp/tree.c (cp_walk_subtrees): Last argument is pointer_set_t* now. * java/lang.c (java_tree_inlining_walk_subtrees): Last arg is struct pointer_set_t* now. From-SVN: r89062
2004-10-14tree.h (TREE_STRING_POINTER): Wrap in "const char *".Ranjit Mathew1-2/+3
* tree.h (TREE_STRING_POINTER): Wrap in "const char *". (struct tree_string): Remove "const" qualifier for "str". From-SVN: r89039
2004-10-10re PR c++/17554 (crashes in on kopete build (KDE's kdenetwork))Andrew Pinski1-0/+1
2004-10-10 Andrew Pinski <pinskia@physics.uc.edu> PR c++/17554 part of c++/17657 middle-end/17703 * semantics.c (maybe_cleanup_point_expr): Call fold_build_cleanup_point_expr. (maybe_cleanup_point_expr_void): New function. (add_decl_expr): Call maybe_cleanup_point_expr_void. (finish_expr_stmt): Likewise. (finish_return_stmt): Likewise. (finish_for_expr): Likewise. (finish_asm_stmt): Likewise. * typeck.c (condition_conversion): Call fold_build_cleanup_point_expr. 2004-10-10 Andrew Pinski <pinskia@physics.uc.edu> PR middle-end/17703 part of PR c++/17657 * fold-const.c (fold_build_cleanup_point_expr): New function. * tree.h (fold_build_cleanup_point_expr): Prototype. 2004-10-10 Andrew Pinski <pinskia@physics.uc.edu> PR c++/17554 * g++.dg/init/for3.C: New test. PR c++/17657 * g++.dg/opt/switch2.C: New test. PR middle-end/17703 * g++.dg/warn/Wreturn-2.C: New test. From-SVN: r88869
2004-10-08stmt.c (expand_decl_init): Remove.Kazu Hirata1-1/+0
* stmt.c (expand_decl_init): Remove. * tree.h: Remove the corresponding prototype. From-SVN: r88788
2004-10-01revert: tree.h (enum tree_index): Add TI_VA_LIST_GPR_COUNTER_FIELD and ↵Jakub Jelinek1-4/+0
TI_VA_LIST_FPR_COUNTER_FIELD. 2004-10-01 Jakub Jelinek <jakub@redhat.com> Revert 2004-09-29 Jakub Jelinek <jakub@redhat.com> * tree.h (enum tree_index): Add TI_VA_LIST_GPR_COUNTER_FIELD and TI_VA_LIST_FPR_COUNTER_FIELD. (va_list_gpr_counter_field, va_list_fpr_counter_field): Define. * tree-pass.h (pass_stdarg): Add. * tree-optimize.c (init_tree_optimization_passes): Add pass_stdarg. * tree-stdarg.c: New file. * Makefile.in (OBJS-common): Add tree-stdarg.o. (tree-stdarg.o): Add dependencies. * function.h (struct function): Add va_list_gpr_size and va_list_fpr_size fields. * function.c (allocate_struct_function): Initialize them. * config/i386/i386.c (ix86_build_builtin_va_list): Initialize va_list_{g,f}pr_counter_field. (ix86_setup_incoming_varargs): Don't do anything if reg_save area will not be used. Only save registers that tree-stdarg.c detected they need saving. (ix86_va_start): Don't set up fields that won't be used. * config/rs6000/rs6000.c (rs6000_build_builtin_va_list): Initialize va_list_{g,f}pr_counter_field. (setup_incoming_varargs): Don't do anything if reg_save area will not be used. Only save registers that tree-stdarg.c detected they need saving. (rs6000_va_start): Don't set up fields that won't be used. * gcc.dg/tree-ssa/stdarg-1.c: Removed. * gcc.dg/tree-ssa/stdarg-2.c: Removed. * gcc.dg/tree-ssa/stdarg-3.c: Removed. * gcc.dg/tree-ssa/stdarg-4.c: Removed. * gcc.dg/tree-ssa/stdarg-5.c: Removed. From-SVN: r88383
2004-09-29re PR tree-optimization/17739 (tree-optimizers extend the lifetime of a hard ↵Richard Henderson1-1/+1
register variable) PR 17739 * tree-gimple.c (is_gimple_reg): Reject hard registers. (is_gimple_asm_val): New. * tree-gimple.h (is_gimple_asm_val): Declare. * gimplify.c (gimplify_asm_expr): Use it. * tree-pretty-print.c (print_declaration): Dump hard regs. * tree-outof-ssa.c (check_replaceable): Don't check for hard regs. * tree-ssa-copyrename.c (copy_rename_partition_coalesce): Likewise. * tree-ssa-pre.c (is_undefined_value): Likewise. * tree-ssa-copy.c (may_propagate_copy): Likewise. (may_propagate_copy_into_asm): Protect DECL_HARD_REGISTER. * tree-ssa.c (warn_uninit): Likewise. * tree.h (DECL_HARD_REGISTER): Check for VAR_DECL. From-SVN: r88321
2004-09-29tree.h (INDIRECT_REF_P): New macro.Daniel Berlin1-0/+6
2004-09-29 Daniel Berlin <dberlin@dberlin.org> * tree.h (INDIRECT_REF_P): New macro. * alias.c (get_alias_set): Use it (nonoverlapping_memrefs_p): Ditto. * emit-rtl.c (mem_expr_equal_p): Ditto. (set_mem_attributes_minus_bitpos): Ditto. (is_gimple_addressable): Ditto. (get_base_address): Ditto. * tree-ssa-alias.c (find_ptr_derefernece): Ditto. * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Ditto. * tree-ssa-dom.c (record_equivalences_from_stmt): Ditto. * tree-ssa-loop-im.c (is_call_clobbered_ref): Ditto. * tree-ssa-loop-ivopts.c (find_interesting_uses_address): Ditto. (add_address_candidates): Ditto. (rewrite_address_base): Ditto. From-SVN: r88309
2004-09-29tree.h (enum tree_index): Add TI_VA_LIST_GPR_COUNTER_FIELD and ↵Jakub Jelinek1-0/+4
TI_VA_LIST_FPR_COUNTER_FIELD. * tree.h (enum tree_index): Add TI_VA_LIST_GPR_COUNTER_FIELD and TI_VA_LIST_FPR_COUNTER_FIELD. (va_list_gpr_counter_field, va_list_fpr_counter_field): Define. * tree-pass.h (pass_stdarg): Add. * tree-optimize.c (init_tree_optimization_passes): Add pass_stdarg. * tree-stdarg.c: New file. * Makefile.in (OBJS-common): Add tree-stdarg.o. (tree-stdarg.o): Add dependencies. * function.h (struct function): Add va_list_gpr_size and va_list_fpr_size fields. * function.c (allocate_struct_function): Initialize them. * config/i386/i386.c (ix86_build_builtin_va_list): Initialize va_list_{g,f}pr_counter_field. (ix86_setup_incoming_varargs): Don't do anything if reg_save area will not be used. Only save registers that tree-stdarg.c detected they need saving. (ix86_va_start): Don't set up fields that won't be used. * config/rs6000/rs6000.c (rs6000_build_builtin_va_list): Initialize va_list_{g,f}pr_counter_field. (setup_incoming_varargs): Don't do anything if reg_save area will not be used. Only save registers that tree-stdarg.c detected they need saving. (rs6000_va_start): Don't set up fields that won't be used. * gcc.c-torture/execute/stdarg-1.c: New test. * gcc.c-torture/execute/stdarg-2.c: New test. * gcc.c-torture/execute/stdarg-3.c: New test. * gcc.dg/tree-ssa/stdarg-1.c: New test. * gcc.dg/tree-ssa/stdarg-2.c: New test. * gcc.dg/tree-ssa/stdarg-3.c: New test. * gcc.dg/tree-ssa/stdarg-4.c: New test. * gcc.dg/tree-ssa/stdarg-5.c: New test. From-SVN: r88279
2004-09-25c-typeck.c, [...]: Fix comment formatting.Kazu Hirata1-2/+2
* c-typeck.c, defaults.h, dwarf.h, dwarf2out.c, fold-const.c, gthr-dce.h, gthr-posix.h, gthr-solaris.h, gthr-win32.h, lambda-code.c, lambda-mat.c, libgcc2.c, stmt.c, tree-ssa-pre.c, tree-vn.c, tree.h: Fix comment formatting. From-SVN: r88102
2004-09-23tree-ssa-ccp.c (get_default_value): Use SSA_NAME_VALUE rather than ↵Jeff Law1-16/+6
SSA_NAME_EQUIV and SET_SSA_NAME_EQUIV. * tree-ssa-ccp.c (get_default_value): Use SSA_NAME_VALUE rather than SSA_NAME_EQUIV and SET_SSA_NAME_EQUIV. (substitute_and_fold): Likewise. * tree-ssa-dom.c (tree_ssa_dominator_optimize): Remove everything except invariants from SSA_NAME_VALUE. (thread_across_edge): Use SSA_NAME_VALUE rather than SSA_NAME_EQUIV and SET_SSA_NAME_EQUIV. (restore_vars_to_original_value, record_const_or_copy): Likewise. (record_equivalences_from_phis, record_const_or_copy_1): Likewise. (record_equality, cprop_into_successor_phis): Likewise. (record_equivalences_from_stmt, cprop_operand): Likewise. (lookup_avail_expr): Likewise. * tree-ssa-pre.c (fini_pre): Remove everything except invariants from SSA_NAME_VALUE. * tree.h (SSA_NAME_EQUIV, SET_SSA_NAME_EQUIV): Kill. (struct tree_ssa_name): Kill EQUIV field. Remove GGC skip annotation from the VALUE_HANDLE field. From-SVN: r87979
2004-09-23tree.def (ALIGN_INDIRECT_REF, [...]): New tree-codes.Dorit Naishlos1-4/+6
2004-09-23 Dorit Naishlos <dorit@il.ibm.com> * tree.def (ALIGN_INDIRECT_REF, MISALIGNED_INDIRECT_REF): New tree-codes. * tree.h (REF_ORIGINAL): Consider ALIGN_INDIRECT_REF and MISALIGNED_INDIRECT_REF. * alias.c (get_alias_set, nonoverlapping_memrefs_p): Likewise. * emit-rtl.c (mem_expr_equal_p, set_mem_attributes_minus_bitpos): Likewise. * expr.c (safe_from_p, expand_expr_real_1, rewrite_address_base) (find_interesting_uses_address): Likewise. * fold-const.c (non_lvalue, operand_equal_p): Likewise. (build_fold_addr_expr_with_type): Likewise. * gimplify.c (gimplify_addr_expr, gimplify_expr): Likewise. * print-rtl.c (print_mem_expr): Likewise. * tree-dump.c (dequeue_and_dump): Likewise. * tree-eh.c (tree_could_trap_p): Likewise. * tree-gimple.c (is_gimple_addressable, get_base_address): Likewise. * tree-pretty-print.c (op_prio, op_symbol, dump_generic_node): Likewise. * tree-ssa-alias.c (find_ptr_dereference, ptr_is_dereferenced_by): Likewise. * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise. * tree-ssa-dom.c (record_equivalences_from_stmt): Likewise. * tree-ssa-loop-im.c (for_each_index, is_call_clobbered_ref): Likewise. * tree-ssa-loop-ivopts.c (find_interesting_uses_address): Likewise. (add_address_candidates, rewrite_address_base): Likewise. * tree-ssa-operands.c (get_expr_operands, get_indirect_ref_operands): Likewise. * tree.c (staticp, build1_stat): Likewise. * tree.def (REALIGN_LOAD_EXPR, REALIGN_STORE_EXPR): New tree-codes. * tree-pretty-print.c (dump_generic_node): Consider REALIGN_LOAD_EXPR. * tree-ssa-operands.c (get_expr_operands): Likewise. * expr.c (expand_expr_real_1): Likewise. * optabs.h (vec_realign_store_optab, vec_realign_load_optab): New optabs. (OTI_vec_realign_store, OTI_vec_realign_load): New optab_index values for the new optabs. (expand_ternary_op): New function. * genopinit.c (optabs): Handle the new optabs. * optabs.c (optab_for_tree_code): Add cases for the new tree-codes. (init_optabs): Initialize vec_realign_load_optab. (expand_ternary_op): New functions. * target-def.h (TARGET_VECTORIZE): New member for struct gcc_target. (TARGET_VECTORIZE_MISALIGNED_MEM_OK): New member for targetm.vectorize. (TARGET_VECTORIZE_BUILTIN_MASK_FOR_LOAD): Likewise. (TARGET_VECTORIZE_BUILTIN_MASK_FOR_STORE): Likewise. * target.h (struct vectorize): New member for struct gcc_target. (misaligned_mem_ok): New member for targetm.vectorize. (builtin_mask_for_load): Likewise. (builtin_mask_for_store): Likewise. * targethooks.c (default_vect_misaligned_mem_ok): New function. * targethooks.h (default_vect_misaligned_mem_ok): New function. * config/rs6000/altivec.md (build_vector_mask_for_load): New define_expand. (vec_realign_load_v4si, vec_realign_load_v4sf, vec_realign_load_v8hi) (vec_realign_load_v16qi): New define_insn. * config/rs6000/rs6000.h (ALTIVEC_BUILTIN_MASK_FOR_LOAD): (ALTIVEC_BUILTIN_MASK_FOR_STORE): New target builtins. * config/rs6000/rs6000.c (altivec_builtin_mask_for_load): (altivec_builtin_mask_for_store): New variables. (rs6000_builtin_mask_for_load): New function. Implements TARGET_VECTORIZE_BUILTIN_MASK_FOR_LOAD. (rs6000_builtin_mask_for_store): New function. Implements TARGET_VECTORIZE_BUILTIN_MASK_FOR_STORE. (rs6000_expand_builtin): Expand the target builtins builtin_mask_for_load and builtin_mask_for_store. (altivec_init_builtins): Initialize the new target builtins. * config/i386/i386.c (ix86_misaligned_mem_ok): New function. Implements the target hook TARGET_VECTORIZE_MISALIGNED_MEM_OK. * tree-vectorizer.c (vect_create_data_ref): Renamed to vect_create_data_ref_ptr. Returns a pointer instead of an array-ref. (vect_create_addr_base_for_vector_ref): Additional argument (offset). (vectorizable_store): Call vect_create_data_ref_ptr with additional arguments, and create an indirect_ref with its return value data_ref. Check aligned_access_p. (vectorizable_load): Handle misaligned loads, using software-pipelined scheme with REALIGN_LOAD_EXPR and ALIGN_INDIRECT_REF if vec_realign_load_optab is supported, or using a scheme without software-pipelining with MISALIGNED_INDIRECT_REF if the target hook misaligned_mem_ok is supported. (vect_finish_stmt_generation): Typo. (vect_enhance_data_refs_alignment): Rename loop_vinfo to loop_info. (vect_analyze_data_refs_alignment): Don't fail vectorization in the presence of misaligned loads. (vect_analyze_data_ref_access): Add check for constant init. (vect_get_symbl_and_dr): Remove duplicate line. * tree-vectorizer.h (DR_MISALIGNMENT): Add comment. From-SVN: r87948
2004-09-23builtins.c (simplify_builtin_va_start): Remove.Eric Christopher1-1/+0
2004-09-22 Eric Christopher <echristo@redhat.com> * builtins.c (simplify_builtin_va_start): Remove. (simplify_builtin): Ditto. (fold_builtin_strchr): Ditto. (simplify_builtin_*): Rename remainders to fold_builtin_*. (expand_builtin): Fix up for above changes. (fold_builtin_1): Add new folders. Change for above. (expand_builtin_va_start): Call fold_builtin_next_arg. * gimplify.c (gimplify_call_expr): Fix calls to simplify_builtin. * tree.h: Remove prototype for simplify_builtin. From-SVN: r87921
2004-09-21tree-ssa-ccp.c (get_default_value): If we have a constant value recorded for ↵Jeff Law1-1/+4
an SSA_NAME... * tree-ssa-ccp.c (get_default_value): If we have a constant value recorded for an SSA_NAME, then use that constant as the initial lattice value. (substitute_and_fold): Transfer equivalences discovered into SSA_NAME_EQUIV. * tree.h (SSA_NAME_EQUIV): Add comments. (SET_SSA_NAME_EQUIV): Similarly. From-SVN: r87844
2004-09-20tree-ssanames.c (make_ssa_name): No longer need to clear, then initialize ↵Jeff Law1-0/+13
key elements here. * tree-ssanames.c (make_ssa_name): No longer need to clear, then initialize key elements here. (release_ssa_name): Zero the released SSA_NAME here. * tree.h (SSA_NAME_EQUIV, SET_SSA_NAME_EQUIV): New macros. (struct tree_ssa_name): Add new "equiv" field. * tree-ssa-dom.c (const_and_copies): Kill the global varray. (tree_ssa_dominator_optimize): No longer allocate, resize or clear CONST_AND_COPIES. (get_value_for, set_value_for): Kill. (thread_across_edge): Get/set the equivalency using SSA_NAME_EQUIV and SET_SSA_NAME_EQUIV. (restore_vars_to_original_value): Likewise. (record_equivalences_from_phis): Likewise. (record_dominating_conditions): Likewise. (record_const_or_copy, record_equality): Likewise. (lookup_avail_expr): Likewise. (record_equivalences_from_stmt, cprop_operand): Likewise. (cprop_into_successor_phis): No longer need to pass around CONST_AND_COPIES. Callers updated. Get equivalences via SSA_NAME_EQUIV. (cprop_into_phis): Likewise. Co-Authored-By: Jan Hubicka <jh@suse.cz> From-SVN: r87787
2004-09-18re PR pch/13361 (const wchar_t * strings not stored in pch)Geoffrey Keating1-2/+2
* tree-inline.c (copy_tree_r): Don't duplicate constants, they're shared anyway. PR pch/13361 * c-typeck.c (constructor_asmspec): Delete. (struct initializer_stack): Delete field 'asmspec'. (start_init): Delete saving of asmspec. (finish_init): Don't update constructor_asmspec. * dwarf2out.c (rtl_for_decl_location): Duplicate string from tree. * stmt.c (expand_asm): Duplicate strings from tree. (expand_asm_operands): Likewise. * tree.c (tree_size): Update computation of size of STRING_CST. (make_node): Don't make STRING_CST nodes. (build_string): Allocate string with tree node. (tree_code_size): Clean up assertions, don't allow requests for "the size of a STRING_CST". * tree.def (STRING_CST): Update comment. * tree.h (TREE_STRING_POINTER): Adjust for change to STRING_CST. (tree_string): Place contents of string in tree node. * config/sh/sh.c (sh_handle_sp_switch_attribute): Duplicate string from tree. From-SVN: r87695
2004-09-18tree.c, tree.h (tree_class_strings): Make array const.Zack Weinberg1-1/+1
* tree.c, tree.h (tree_class_strings): Make array const. Reindent per coding convention. Move asterisk to proper place per coding convention. From-SVN: r87685
2004-09-17alias.c (find_base_decl): Remove unreachable case '3' block.Jeffrey D. Oldham1-32/+99
2004-09-17 Jeffrey D. Oldham <oldham@codesourcery.com> Zack Weinberg <zack@codesourcery.com> * alias.c (find_base_decl): Remove unreachable case '3' block. * expr.c (safe_from_p): Abort if passed a type. * tree-gimple.c (recalculate_side_effects): Abort if passed anything other than an expression. * tree-ssa-pre.c (phi_translate): Return expr immediately if is_gimple_min_invariant is true for it. Reorder cases for clarity. Abort on un-handled tree classes. (valid_in_set): Likewise. * tree.c (tree_code_class_strings): New static data. * tree.h (enum tree_code_class): New. (tree_code_class_strings): Declare. (TREE_CODE_CLASS_STRING, EXCEPTIONAL_CLASS_P, CONSTANT_CLASS_P) (REFERENCE_CLASS_P, COMPARISON_CLASS_P, UNARY_CLASS_P, BINARY_CLASS_P) (STATEMENT_CLASS_P, EXPRESSION_CLASS_P, IS_TYPE_OR_DECL_P): New macros. (TYPE_P, DECL_P, IS_NON_TYPE_CODE_CLASS, IS_EXPR_CODE_CLASS) (checking macros, EXPR_LOCATION, SET_EXPR_LOCATION, EXPR_LOCUS): Update. * tree.def, c-common.def, objc/objc-tree.def: Use tree_code_class enumeration constants instead of code letters. * alias.c, builtins.c, c-common.c, c-format.c, c-lang.c, c-pragma.c * c-typeck.c, cgraphunit.c, convert.c, dbxout.c, dwarf2out.c * emit-rtl.c expr.c, fold-const.c, gimplify.c, lambda-code.c * langhooks.c, langhooks.h, predict.c, print-tree.c, reload1.c, stmt.c * tree-browser.c, tree-cfg.c, tree-chrec.c, tree-complex.c, tree-dfa.c * tree-dump.c, tree-eh.c, tree-gimple.c, tree-inline.c, tree-nested.c * tree-outof-ssa.c, tree-pretty-print.c, tree-sra.c, tree-ssa-ccp.c * tree-ssa-dce.c, tree-ssa-dom.c, tree-ssa-forwprop.c, tree-ssa-live.c * tree-ssa-loop-im.c, tree-ssa-loop-ivopts.c, tree-ssa-operands.c * tree-ssa-phiopt.c, tree-ssa-pre.c, tree-ssa-propagate.c * tree-ssa.c, tree-ssanames.c, tree-tailcall.c, tree.c, varasm.c * config/sol2-c.c, config/arm/arm.c, config/i386/winnt.c * config/pa/pa.c, config/pa/pa.h, config/sh/sh.c, objc/objc-lang.c Update to match. * LANGUAGES: Add note about change. ada: * ada-tree.def: Use tree_code_class enumeration constants instead of code letters. * ada-tree.h, decl.c, misc.c, trans.c, utils.c, utils2.c: Update for new tree-class enumeration constants. cp: * cp-tree.def: Use tree_code_class enumeration constants instead of code letters. * call.c, class.c, cp-gimplify.c, cp-lang.c, cxx-pretty-print.c * mangle.c, pt.c, semantics.c, tree.c, typeck.c: Update for new tree-class enumeration constants. fortran: * f95-lang.c, trans-expr.c, trans.c: Update for new tree-class enumeration constants. java: * java-tree.def: Use tree_code_class enumeration constants instead of code letters. * java-gimplify.c, jcf-write.c, lang.c, parse.y: Update for new tree-class enumeration constants. treelang: * treetree.c: Update for new tree-class enumeration constants. From-SVN: r87675
2004-09-16fold-const.c (fold): Fold difference of addresses.Zdenek Dvorak1-0/+3
* fold-const.c (fold): Fold difference of addresses. (ptr_difference_const): Moved from tree-ssa-loop-ivopts, based on get_inner_reference. * tree-ssa-loop-ivopts.c (peel_address): Removed. (ptr_difference_const): Moved to fold-const.c. (split_address_cost): Use get_inner_reference instead of peel_address. (ptr_difference_cost): Change type of diff to HOST_WIDE_INT. * tree.h (ptr_difference_const): Export. * tree-ssa-loop-ivopts.c (dump_iv, dump_use, dump_cand): Add induction variable type to the dump. Fix indentation. (idx_find_step): Handle nonconstant array_ref_element_size and array_ref_low_bound. (idx_record_use): Handle array_ref_element_size and array_ref_low_bound. (find_interesting_uses_stmt): Handle memory = nontrivial_expression statements correctly. (get_computation_at, iv_value): Do not unshare expressions here. (rewrite_use_outer): Unshare the expression before it is emitted to code. * tree-ssa-loop-niter.c (unsigned_type_for, signed_type_for): Moved to tree.c. * tree.c (unsigned_type_for, signed_type_for): Moved from tree-ssa-loop-niter.c. Use langhooks. * tree.h (signed_type_for): Export. From-SVN: r87601
2004-09-13re PR tree-optimization/17436 (Huge memory use regression)Richard Henderson1-1/+7
PR 17436 * tree.h (TYPE_CONTAINS_PLACEHOLDER_INTERNAL): New. (tree_type): Replace spare with contains_placeholder_bits. (type_contains_placeholder_1): Rename from type_contains_placeholder_p, make static. Remove seen_types list. (type_contains_placeholder_p): New. From-SVN: r87447
2004-09-12re PR c++/16254 (ICE in lower_stmt, at gimple-low.c:205)Richard Henderson1-5/+0
PR c++/16254 * fold-const.c (fold) <case CLEANUP_POINT_EXPR>: Remove. * tree.c, tree.h (has_cleanups): Remove. cp/ * semantics.c (maybe_cleanup_point_expr): Don't call fold. * typeck.c (condition_conversion): Likewise. From-SVN: r87407
2004-09-11tree.c (tree_code_size): New function, bulk of code from tree_size.Zack Weinberg1-0/+5
* tree.c (tree_code_size): New function, bulk of code from tree_size. (tree_size, make_node): Use it. * tree-ssa-pre.c (init_pre): Use it. * tree.h: Prototype it. From-SVN: r87371
2004-09-11tree-cfg.c (set_bb_for_stmt): Use PHI_BB.Zdenek Dvorak1-0/+8
* tree-cfg.c (set_bb_for_stmt): Use PHI_BB. * tree-dfa.c (compute_immediate_uses, add_immediate_use, redirect_immediate_use): Use PHI_DF. * tree-flow-inline.h (stmt_ann): Abort on phi nodes. (bb_for_stmt): Use PHI_BB. (get_immediate_uses): Use PHI_DF. * tree-ssa-dse.c (max_stmt_uid): New variable. (get_stmt_uid): New function. (dse_optimize_stmt, dse_record_phis, tree_ssa_dse): Do not use phi node annotations. * tree-ssa-loop-im.c (LIM_DATA): Do not use phi statement annotations. (max_uid): Renamed to max_stmt_uid. (get_stmt_uid): New function. (maybe_queue_var, single_reachable_address, determine_lsm): Do not use phi node annotations. * tree-ssa.c (replace_immediate_uses): Do not use phi node annotations. * tree.h (PHI_BB, PHI_DF): New accessor functions. (struct tree_phi_node): Add bb and df fields. From-SVN: r87369
2004-09-10dbxout.c (dbxout_block): Update for current_function_func_begin_label a string.Geoffrey Keating1-1/+1
* dbxout.c (dbxout_block): Update for current_function_func_begin_label a string. * dwarf2out.c (dwarf2out_begin_prologue): Likewise. * except.c (dw2_output_call_site_table): Likewise. * toplev.c (current_function_func_begin_label): Likewise. * tree.h (current_function_func_begin_label): Likewise. * config/rs6000/linux64.h (DBX_OUTPUT_BRAC): Likewise. From-SVN: r87317
2004-09-10cgraph.h (cgraph_dump_file): Do not declare.Paolo Bonzini1-1/+4
2004-09-10 Paolo Bonzini <bonzini@gnu.org> * cgraph.h (cgraph_dump_file): Do not declare. * cgraphunit.c (cgraph_dump_file): Declare as static. (init_cgraph): New. * toplev.c (cgraph_dump_file): Do not declare. (compile_file): Call init_cgraph. * tree-dump.c (dump_files): Add IPA dump file, remove XML dump of call graph. (get_dump_file_name): Support IPA dump file naming scheme. * tree.h (enum tree_dump_index): Add IPA dump file, remove XML dump of call graph. * doc/invoke.texi (Debugging Options): Document the new options. From-SVN: r87281
2004-09-09builtins.c (build_va_arg_indirect_ref): New function.Frank Ch. Eigler1-0/+1
2004-09-09 Frank Ch. Eigler <fche@redhat.com> * builtins.c (build_va_arg_indirect_ref): New function. (std_gimplify_va_arg_expr): Call it instead of mudflap check and build_fold_indirect_ref. * config/i386/i386.c (ix86_gimplify_va_arg): Ditto. * config/ia64/ia64.c (ia64_gimplify_va_arg): Ditto. * tree.h: Declare new function. From-SVN: r87242
2004-09-08vec.c (vec_p_reserve, [...]): Rename to ...Nathan Sidwell1-2/+2
* vec.c (vec_p_reserve, vec_o_reserve): Rename to ... (vec_gc_p_reserve, vec_gc_o_reserve): ... here. Clone to (vec_heap_p_reserve, vec_heap_o_reserve): ... here, adjust. (vec_gc_free, vec_heap_free): New. * vec.h (DEF_VEC_GC_P, DEF_VEC_MALLOC_P): New. (DEF_VEC_P): Add allocator argument. Adjust. (DEF_VEC_GC_O, DEF_VEC_MALLOC_O): New. (DEF_VEC_O): Add allocator argument. Adjust. (VEC(free)): New. * tree.h (tree): Define a GC'd vector. * lamba-code.c (lambda_loop): Likewise. * value-prof.h (histogram_value): Likewise. * cp/cp-tree.h (tree_pair_s): Likewise. * cp/name-lookup.h (cxx_saved_binding, cp_class_binding): Likewise. * cp/semantics.c (deferred_access): Likewise. From-SVN: r87179
2004-09-06Unify the management of RTL and tree-level dump files.Paolo Bonzini1-3/+47
2004-09-06 Paolo Bonzini <bonzini@gnu.org> Unify the management of RTL and tree-level dump files. * cfgexpand.c (tree_expand_cfg): Fix incorrect comment. Don't print function name to the dump file, the pass manager would do this for us. Add code from the top of rest_of_compilation, up to the initial RTL dump. * passes.c (rest_of_handle_jump): Call fixup_tail_calls and close the DFI_sibling dump file. (rest_of_compilation): Don't do that here. Remove code up to the initial RTL dump. (init_optimization_passes): Remove. (pass_rest_of_compilation): Change pass name to NULL. * toplev.c (lang_dependent_init): Do not use an empty dump file prefix. Do not call init_optimization_passes. * toplev.h (init_optimization_passes): Remove. * graph.c (print_rtl_graph_with_bb, clean_graph_dump_file, finish_graph_dump_file): Remove SUFFIX parameter. * graph.h (print_rtl_graph_with_bb, clean_graph_dump_file, finish_graph_dump_file): Likewise. * tree-pass.h (struct tree_opt_pass): Add `letter' field. * cfgexpand.c (pass_expand): Adjust. * gimple-low.c (pass_lower_cf, pass_remove_useless_vars): Adjust. * passes.c (pass_rest_of_compilation): Adjust. * predict.c (pass_profile): Adjust. * tree-alias-common.c (pass_build_pta, pass_del_pta): Adjust. * tree-cfg.c (pass_build_cfg, pass_remove_useless_stmts, pass_split_crit_edges, pass_warn_function_return): Adjust. * tree-complex.c (pass_lower_vector_ssa, pass_pre_expand): Adjust. * tree-dfa.c (pass_referenced_vars): Adjust. * tree-eh.c (pass_lower_eh): Adjust. * tree-if-conv.c (pass_build_ssa): Adjust. * tree-into-ssa.c (pass_build_ssa): Adjust. * tree-mudflap.c (pass_mudflap_1, pass_mudflap_2): Adjust. * tree-nomudflap.c (pass_mudflap_1, pass_mudflap_2): Adjust. * tree-nrv.c (pass_nrv): Adjust. * tree-optimize.c (pass_gimple, pass_all_optimizations, pass_cleanup_cfg_post_optimizing, pass_free_datastructures, pass_init_datastructures): Adjust. * tree-outof-ssa.c (pass_del_ssa): Adjust. * tree-profile.c (pass_tree_profile): Adjust. * tree-sra.c (pass_sra): Adjust. * tree-ssa-alias.c (pass_may_alias): Adjust. * tree-ssa-ccp.c (pass_ccp, pass_fold_builtins): Adjust. * tree-ssa-copyrename.c (pass_rename_ssa_copies): Adjust. * tree-ssa-dce.c (pass_dce, pass_cd_dce): Adjust. * tree-ssa-dom.c (pass_dominator): Adjust. * tree-ssa-dse.c (pass_dse): Adjust. * tree-ssa-forwprop.c (pass_forwprop): Adjust. * tree-ssa-if-conv.c (pass_if_conversion): Adjust. * tree-ssa-loop-ch.c (pass_ch): Adjust. * tree-ssa-loop.c (pass_loop, pass_loop_init, pass_lim, pass_loop_done, pass_complete_unroll, pass_iv_canon, pass_iv_optimize, pass_vectorize): Adjust. * tree-ssa-phiopt.c (pass_phiopt): Adjust. * tree-ssa-pre.c (pass_pre, pass_fre): Adjust. * tree-ssa.c (pass_redundant_phi, pass_early_warn_uninitialized, pass_late_warn_uninnitialized): Adjust. * tree-tailcall.c (pass_tail_recursion, pass_tail_calls): Adjust. * Makefile.in (tree-dump.o): Add new dependencies. * cgraph.c (cgraph_remove_node): TDF_all -> TDF_tree_all. * cgraphunit.c (cgraph_preserve_function_body_p, cgraph_optimize): Likewise. * toplev.c (dump_file_name): New. * tree-dump.c (dump_enable_all): Add LETTER parameter. (struct dump_file_info): Add NUM and LETTER fields. (dump_files): Adjust and add RTL dump files. (dump_register): Add NUM and LETTER fields. (get_dump_file_name, dump_initialized_p, enable_rtl_dump_file): New. (dump_begin): Use get_dump_file_name. (dump_switch_p_1): Adjust call to dump_enable_all. * tree-dump.h (dump_register): Adjust prototype. * tree-optimize.c (register_one_dump_file): Take dump file index. Support flags for RTL dumps. (register_dump_files): Fill in NUM field of struct dump_file_info. Track properties both when the gate is executed and when it is not. (execute_todo): Dump RTL. Add PROPERTIES parameter. (execute_one_pass): Pass properties to execute_todo. Handle VCG dumps of RTL. * tree-pass.h (dump_file_name): New. * tree.h (TDF_TREE, TDF_RTL, get_dump_file_name, dump_initialized_p): New. * Makefile.in (passes.o): Add new dependencies. * passes.c (struct dump_file_info, enum dump_file_index, dump_file_tbl, init_optimization_passes): Remove. (open_dump_file, close_dump_file): Use tree-dumping infrastructure. (rest_of_handle_new_regalloc, rest_of_handle_old_regalloc): Use dump_enabled_p. (finish_optimization_passes): Update finish_graph_dump_file loop. (enable_rtl_dump_file): Remove. * tree-dump.c (dump_files): Adjust and add RTL dump files. (enable_rtl_dump_file): Add here. * tree.h (enum tree_dump_index): Add RTL dump file indices. * doc/invoke.texi (Debugging options): Document new RTL debugging options. Update. From-SVN: r87113
2004-09-05c-common.c, [...]: Fix comment formatting.Kazu Hirata1-4/+4
* c-common.c, c-decl.c, combine.c, defaults.h, fold-const.c, gimplify.c, gthr-nks.h, hooks.c, lambda-code.c, lambda-mat.c, stor-layout.c, target.h, tree-cfg.c, tree-chrec.c, tree-if-conv.c, tree-inline.c, tree-into-ssa.c, tree-mudflap.c, tree-optimize.c, tree-scalar-evolution.c, tree-ssa-alias.c, tree-ssa-ccp.c, tree-ssa-dce.c, tree-ssa-pre.c, tree-vectorizer.c, tree-vectorizer.h, tree.h, vec.h: Fix comment formatting. From-SVN: r87105
2004-09-05tree-ssa-loop-ivopts.c: New file.Zdenek Dvorak1-0/+9
* tree-ssa-loop-ivopts.c: New file. * Makefile.in (tree-ssa-loop-ivopts.c): Add. * cfgloop.h (target_avail_regs, target_res_regs, target_small_cost, target_pres_cost, target_spill_cost): Declare. * cfgloopanal.c (avail_regs, res_regs, small_cost, pres_cost, spill_cost): Renamed to ... (target_avail_regs, target_res_regs, target_small_cost, target_pres_cost, target_spill_cost): ... and exported. (init_set_costs, global_cost_for_size): Work with renamed variables. * common.opt (flag_ivopts): New flag. * expr.c (expand_expr_real_1): Handle SSA_NAME case. Handle REF_ORIGINAL. * gimplify.c (struct gimplify_ctx): Add into_ssa field. (internal_get_tmp_var, gimplify_modify_expr, gimplify_expr): Support generating SSA form. (force_gimple_operand): New function. * timevar.def (TV_TREE_LOOP_IVOPTS): New timevar. * tree-cfg.c (stmt_bsi): New function. * params.def (PARAM_IV_CONSIDER_ALL_CANDIDATES_BOUND, PARAM_IV_MAX_CONSIDERED_USES): New. * tree-flow.h (stmt_bsi, tree_ssa_iv_optimize, split_loop_exit_edge, bsi_insert_on_edge_immediate_loop. standard_iv_increment_position, ip_end_pos, ip_normal_pos, force_gimple_operand): Declare. * tree-gimple.c (is_gimple_formal_tmp_var): Accept ssa names. * tree-nested.c (build_addr): Export. * tree-optimize.c (init_tree_optimization_passes): Add pass_iv_optimize. * tree-pass.h (pass_iv_optimize): Declare. * tree-ssa-loop-im.c (for_each_index): Handle REALPART_EXPR and IMAGPART_EXPR. * tree-ssa-loop-manip.c (create_iv): Force the base to be acceptable as a phi node argument. (split_loop_exit_edge, bsi_insert_on_edge_immediate_loop, ip_end_pos, ip_normal_pos, standard_iv_increment_position): New functions. * tree-ssa-loop-niter.c (zero_p, unsigned_type_for): Export. * tree-ssa-loop.c (tree_ssa_loop_ivopts, gate_tree_ssa_loop_ivopts, pass_iv_optimize): New pass. * tree-ssa-operands.c (get_indirect_ref_operands): Handle REF_ORIGINAL. * tree-ssanames.c (release_ssa_name): Allow calling with var = NULL. * tree.c (build_int_cst_type, cst_and_fits_in_hwi): New functions. * tree.h (REF_ORIGINAL): New macro. (build_int_cst_type, unsigned_type_for, zero_p, cst_and_fits_in_hwi, build_addr): Declare. * doc/invoke.texi (-fivopts): Document. (PARAM_IV_CONSIDER_ALL_CANDIDATES_BOUND, PARAM_IV_MAX_CONSIDERED_USES): Document. * doc/passes.texi: Document induction variable optimizations pass. * gcc.dg/tree-ssa/loop-2.c: New test. * gcc.dg/tree-ssa/loop-3.c: New test. * gcc.dg/tree-ssa/loop-4.c: New test. * gcc.dg/tree-ssa/loop-5.c: New test. From-SVN: r87100
2004-09-03re PR c/7054 (#pragma pack handled incorrectly)Jan Beulich1-1/+3
PR c/7054 * defaults.h (TARGET_DEFAULT_PACK_STRUCT): Provide default. * tree.h (initial_max_fld_align): Declare * stor-layout.c (initial_max_fld_align): Define and initialize. (maximum_field_alignment): Initialize to the same value. * common.opt: Add -fpack-struct= variant of switch. * opts.c: Handle -fpack-struct= variant of switch. * c-pragma.c: Change #pragma pack() handling so that it becomes compatible to other compilers: accept individual 'push' argument, make final pop restore (command line) default, correct interaction of push/pop and sole specification of a new alignment (so that the sequence #pragma pack(push) - #pragma pack(<n>) becomes identical to #pragma pack(push, <n>). * doc/extend.texi: New node "Structure-Packing Pragmas" under "Pragmas", describing #pragma pack. * doc/invoke.texi: Document -fpack-struct=<n> variant of switch. * doc/tm.texi: Adjust description for HANDLE_PRAGMA_PACK_PUSH_POP. Document new TARGET_DEFAULT_PACK_STRUCT. testsuite: * gcc.dg/pack-test-2.c: Adjust to permit and check #pragma pack(push). * gcc.dg/c99-flex-array-4.c: Add -fpack-struct=8 to provide a deterministic starting point for the alignment of structure fields. * gcc.dg/Wpadded.c: Dito. * g++.dg/abi/vbase10.C: Dito. From-SVN: r87037
2004-09-01Update TREE_NO_WARNING docs.Richard Henderson1-2/+5
From-SVN: r86937
2004-08-31attribs.c (strip_attrs): Remove.Joseph Myers1-8/+0
* attribs.c (strip_attrs): Remove. (split_specs_attrs): Move ... * c-decl.c: ... to here. * tree.h (split_specs_attrs, strip_attrs): Remove. * c-tree.h (split_specs_attrs): Declare. From-SVN: r86823
2004-08-30tree.h (BINFO_PRIMARY_BASE_OF): Remove.Nathan Sidwell1-8/+2
* tree.h (BINFO_PRIMARY_BASE_OF): Remove. (struct tree_binfo): Remove primary field. * cp/cp-tree.h (BINFO_PRIMARY_P): Use a binfo flag. (BINFO_INDIRECT_PRIMARY_P): Remove. * cp/class.c (determine_primary_base): Rename to ... (determine_primary_bases): ... here. Set all primary bases. (set_primary_base): Remove. (mark_primary_bases): Remove. (build_simple_base_path, walk_subobject_offsets, propagate_binfo_offsets, end_of_class): Adjust. (layout_class_type): Rename determine_primary_base call. (dump_class_hierarchy_r, dump_vtable): Adjust. Don't pass a binfo to type_as_string. (dfs_build_secondary_vptr_vtt_inits, dfs_accumulate_vtbl_inits, build_rtti_vtbl_entries): Adjust. * cp/init.c (build_vtbl_address): Adjust. From-SVN: r86766
2004-08-27tree.h (size_int_type): Remove.Nathan Sidwell1-2/+1
* tree.h (size_int_type): Remove. * fold-const.c: Do not #include gt-fold-const.h. (size_htab_hash, size_htab_eq): Remove. (size_int_kind): Use build_int_cst. (new_const, size_htab): Remove. (size_int_type): Remove. (round_up): Use build_int_cst. (round_down): Likewise. Remove spurious constant build. * ada/utils2.c (build_allocator): Use ssize_int. * cp/class.c (build_vtbl_initializer): Use ssize_int. * cp/decl.c (complete_array_type): Likewise. * cp/method.c (finish_thunk): Likewise. * cp/search.c (get_dynamic_base_type): Likewise. From-SVN: r86667
2004-08-26tree.c (staticp): Return the static object.Richard Henderson1-3/+3
* tree.c (staticp): Return the static object. * tree.h (staticp): Update decl. * langhooks.h (struct lang_hooks): Change staticp return type to tree. * langhooks.c (lhd_staticp): Return NULL_TREE. * langhooks-def.h (lhd_staticp): Update decl. * c-common.c (c_staticp): Return the static object. * c-common.h (c_staticp): Update decl. From-SVN: r86650
2004-08-25tree.h (build_int_cst): New, sign extended constant.Nathan Sidwell1-1/+3
* tree.h (build_int_cst): New, sign extended constant. (build_int_cstu): New, zero extended constant. (build_int_cst_wide): Renamed from build_int_cst. * tree.c (build_int_cst, build_int_cstu): New. (build_int_cst_wide): Renamed from build_int_cst. (make_vector_type, build_common_tree_nodes, build_common_tree_nodes_2): Adjust build_int_cst calls. * builtins.c (expand_builtin_prefetch, expand_builtin_strstr, expand_builtin_strpbrk, expand_builtin_fputs, build_string_literal, expand_builtin_printf, expand_builtin_sprintf, fold_builtin_classify_type, fold_builtin_lround, fold_builtin_bitop, fold_builtin_isascii, fold_builtin_toascii, fold_builtin_isdigit, simplify_builtin_strstr, simplify_builtin_strpbrk, fold_builtin_fputs, simplify_builtin_sprintf): Likewise. * c-common.c (start_fname_decls, fix_string_type, shorten_compare, DEF_ATTR_INT): Likewise. * c-decl.c (complete_array_type, check_bitfield_type_and_width): Likewise. * c-lex.c (interpret_integer, lex_charconst): Likewise. * c-parse.in (primary) <TYPES_COMPATIBLE_P> Likewise. * c-pretty-print.c (pp_c_integer_constant): Likewise. * c-typeck.c (really_start_incremental_init, push_init_level, set_nonincremental_init_from_string): Likewise. * calls.c (load_register_parameters): Likewise. convert.c (convert_to_pointer): Likewise. coverage.c (coverage_counter_alloc, tree_coverage_counter_ref, build_fn_info_type, build_fn_info_value, build_ctr_info_value, build_gcov_info): Likewise. * except.c (init_eh, assign_filter_values): Likewise. * expmed.c (store_fixed_bit_field, extract_bit_field, extract_fixed_bit_field, extract_split_bit_field, expand_shift, expand_mult_const, expand_mult_highpart_adjust, extract_high_half, expand_sdiv_pow2, expand_divmod, make_tree): Likewise. * expr.c (convert_move, emit_group_load, emit_group_store, expand_assignment, store_constructor, store_field, expand_expr_real_1, reduce_to_bit_field_precision): Likewise. fold-const.c (force_fit_type, int_const_binop, fold_convert_const, invert_truthvalue, optimize_bit_field_compare, decode_field_reference, all_ones_mask_p, constant_boolean_node, fold_div_compare, fold, fold_read_from_constant_string, fold_negate_const, fold_abs_const, fold_not_const, round_up, round_down): Likewise. * function.c (assign_parm_setup_block): Likewise. * stmt.c (shift_return_value, expand_case, estimate_case_costs): Likewise. * stor-layout.c (layout_type, initialize_sizetypes, set_min_and_max_values_for_integral_type): Likewise. * tree-chrec.c (chrec_fold_multiply_poly_poly, reset_evolution_in_loop): Likewise. * tree-chrec.h (build_polynomial_chrec): Likewise. * tree-complex.c (build_replicated_const): Likewise. * tree-eh.c (honor_protect_cleanup_actions, lower_try_finally_onedest, lower_try_finally_copy, lower_try_finally_switch): Likewise. * tree-mudflap.c (mf_build_string, mx_register_decls, mudflap_register_call, mudflap_enqueue_constant): Likewise. * tree-nested.c (get_trampoline_type, get_nl_goto_field): Likewise. * tree-pretty-print.c (dump_generic_node): Likewise. * tree-ssa-ccp.c (widen_bitfield, maybe_fold_offset_to_array_ref): Likewise. * tree-ssa-dom.c (simplify_rhs_and_lookup_avail_expr): Likewise. * tree-ssa-loop-niter.c (number_of_iterations_cond, loop_niter_by_eval, upper_bound_in_type, lower_bound_in_type): Likewise. * tree-ssa-loop-ivcanon.c (create_canonical_iv, canonicalize_loop_induction_variables): Likewise. * tree-vectorizer.c (vect_create_index_for_array_ref, vect_transform_loop_bound, vect_compute_data_ref_alignment): Likewise. * config/alpha/alpha.c (alpha_initialize_trampoline, alpha_va_start, alpha_gimplify_va_arg_1): Likewise. * config/arm/arm.c (arm_get_cookie_size): Likewise. * config/c4x/c4x.c (c4x_gimplify_va_arg_expr): Likewise. * config/i386/i386.c (ix86_va_start, ix86_gimplify_va_arg): Likewise. * config/ia64/ia64.c (ia64_gimplify_va_arg): Likewise. * config/mips/mips.c (mips_build_builtin_va_list, mips_va_start, mips_gimplify_va_arg_expr): Likewise. * config/pa/pa.c (hppa_gimplify_va_arg_expr): Likewise. * config/rs6000/rs6000.c (rs6000_va_start, rs6000_gimplify_va_arg, add_compiler_branch_island): Likewise. * config/s390/s390.c (s390_va_start): Likewise. * config/sh/sh.c (sh_va_start): Likewise. * config/stormy16/stormy16.c (xstormy16_expand_builtin_va_start): Likewise. * config/xtensa/xtensa.c (xtensa_va_start, xtensa_gimplify_va_arg_expr): Likewise. * objc/objc-act.c (build_objc_string_object, build_objc_symtab_template, init_def_list, init_objc_symtab, init_module_descriptor, generate_static_references, build_selector_translation_table, get_proto_encoding, build_typed_selector_reference, build_selector_reference, build_next_objc_exception_stuff, build_method_prototype_list_template, generate_descriptor_table, generate_protocols, build_protocol_initializer, build_ivar_list_template, build_method_list_template, build_ivar_list_initializer, generate_ivars_list, generate_dispatch_table, generate_protocol_list, build_category_initializer, build_shared_structure_initializer, generate_shared_structures, handle_impent, generate_objc_image_info): Likewise. 2004-04-25 Paolo Bonzini <bonzini@gnu.org> * cfglayout.c (duplicate_insn_chain): Remove references to NOTE_INSN_LOOP_VTOP and NOTE_INSN_LOOP_CONT. * cfgloop.h (struct loop): Remove fields vtop, cont and cont_dominator. * cfgrtl.c (rtl_delete_block): Remove handling of NOTE_INSN_LOOP_CONT. * final.c (final_scan_insn): Remove references to NOTE_INSN_LOOP_VTOP and NOTE_INSN_LOOP_CONT. * insn-notes.def (NOTE_INSN_LOOP_VTOP, NOTE_INSN_LOOP_CONT): Remove. * jump.c (squeeze_notes): Remove references to NOTE_INSN_LOOP_VTOP and NOTE_INSN_LOOP_CONT. * loop.c (scan_loops, find_and_verify_loops, for_each_insn_in_loop, check_dbra_loop, loop_dump_aux): Remove references to removed notes and fields. * reorg.c (mostly_true_jump): Do not rely on NOTE_INSN_LOOP_VTOPs. * unroll.c (unroll_loop, copy_loop_body, loop_iterations): Remove references to removed notes and fields. (subtract_reg_term, ujump_to_loop_cont): Remove. From-SVN: r86544
2004-08-24tree-ssa-loop-ivcanon.c: New file.Zdenek Dvorak1-0/+1
* tree-ssa-loop-ivcanon.c: New file. * tree-ssa-loop-manip.c (create_iv): New function. * Makefile.in (tree-ssa-loop-ivcanon.o): Add. (tree-ssa-loop.o, tree-ssa-loop-manip.o): Add SCEV_H dependency. * cfgloop.c (mark_single_exit_loops): New function. (verify_loop_structure): Verify single-exit loops. * cfgloop.h (struct loop): Add single_exit field. (LOOPS_HAVE_MARKED_SINGLE_EXITS): New constant. (mark_single_exit_loops): Declare. (tree_num_loop_insns): Declare. * cfgloopmanip.c (update_single_exits_after_duplication): New function. (duplicate_loop_to_header_edge): Use it. * common.opt (fivcanon): New flag. * timevar.def (TV_TREE_LOOP_IVCANON, TV_COMPLETE_UNROLL): New timevars. * tree-cfg.c (tree_find_edge_insert_loc): Return newly created block. (bsi_commit_edge_inserts_1): Pass null to tree_find_edge_insert_loc. (bsi_insert_on_edge_immediate): New function. * tree-flow.h (bsi_insert_on_edge_immediate, canonicalize_induction_variables, tree_unroll_loops_completely, create_iv): Declare. * tree-optimize.c (init_tree_optimization_passes): Add pass_iv_canon and pass_complete_unroll. * tree-pass.h (pass_iv_canon, pass_complete_unroll): Declare. * tree-scalar-evolution.c (get_loop_exit_condition, get_exit_conditions_rec, number_of_iterations_in_loop, scev_initialize): Use single_exit information. * tree-ssa-loop-niter.c (number_of_iterations_cond): Record missing assumptions. (loop_niter_by_eval): Return number of iterations as unsigned int. * tree-ssa-loop.c (tree_ssa_loop_init): Mark single exit loops. (tree_ssa_loop_ivcanon, gate_tree_ssa_loop_ivcanon, pass_iv_canon, tree_complete_unroll, gate_tree_complete_unroll, pass_complete_unroll): New passes. (tree_ssa_loop_done): Call free_numbers_of_iterations_estimates. * tree-ssanames.c (make_ssa_name): Allow creating ssa name before the defining statement is ready. * tree-vectorizer.c (vect_create_iv_simple): Removed. (vect_create_index_for_array_ref, vect_transform_loop_bound): Use create_iv. (vect_transform_loop_bound): Use single_exit information. (vect_analyze_loop_form): Cleanup bogus tests. (vectorize_loops): Do not call flow_loop_scan. * tree.h (may_negate_without_overflow_p): Declare. * fold-const.c (may_negate_without_overflow_p): Split out from ... (negate_expr_p): ... this function. (tree_expr_nonzero_p): Handle overflowed constants correctly. * doc/invoke.texi (-fivcanon): Document. * doc/passes.texi: Document canonical induction variable creation. * gcc.dg/tree-ssa/loop-1.c: New test. From-SVN: r86516
2004-08-24c-decl.c (c_init_decl_processing): Adjust build_common_tree_nodes call.Nathan Sidwell1-2/+2
* c-decl.c (c_init_decl_processing): Adjust build_common_tree_nodes call. * expmed.c (const_mult_add_overflow_p): Use build_distinct_type_copy. * stor-layout.c (early_type_list): Remove. (layout_type): Don't append to early_type_list. (initialize_sizetypes): Add signed_p argument. (set_sizetype): Overwrite the stub type nodes directly. * tree.c (copy_node_stat): Clear a type's value cache here ... (build_distinct_type): ... not here. (build_common_tree_nodes): Add signed_sizetype argument. Adjust. * tree.h (initialize_sizetypes): Add signed_p argument. (build_common_tree_nodes): Likewise. * ada/utils.c (gnat_init_decl_processing): Adjust build_common_tree_nodes call. * cp/decl.c (cxx_init_decl_processing): Adjust build_common_tree_nodes call. * fortran/f95-lang.c (gfc_init_decl_processing): Adjust build_common_tree_nodes call. * java/decl.c (java_init_decl_processing): Adjust initialize_sizetypes call. * objc/objc-act.c (get_static_reference): Use build_variant_type_copy. (get_protocol_reference): Likewise. * objc/objc-act.h (TREE_STATIC_TEMPLATE): Use TREE_PRIVATE. * treelang/treetree.c (treelang_init_decl_processing): Adjust build_common_tree_nodes call. From-SVN: r86493
2004-08-23Makefile.in (BUILD_ERRORS): Set to build-errors.Nathan Sidwell1-10/+0
* Makefile.in (BUILD_ERRORS): Set to build-errors. (errors.o): New target for host. (build-errors.o): New target for build. (genobjs): Replace errors.o with build-errors. (gengenrtl$(buildexeext)): Add $(BUILD_ERRORS). (GCOV_OBJS, GCOV_DUMP_OBJS): Add errors.o. (fix-headers$(build_exeext)): Add $(BUILD_ERRORS). (fix-header.o): Add errors.h * collect2.c (fancy_abort): Add parameters. * collect2.h (fancy_abort): Don't declare. * errors.h (fancy_abort): Don't declare. * errors.c: Include either bconfig.h or config.h. (fancy_abort): Trim filename. * fix-header.c (v_fatal, fatal): Remove. (progname): Remove definition. (main): Set progname here. * gcc.c (fancy_abort): Add parameters. * gcc.h (fancy_abort): Remove declaration. * gcov.c (fancy_abort): Remove. * rtl.h (fancy_abort): Don't declare. (abort): Don't define. * tree.h (fancy_abort): Don't declare. (abort): Don't define. * system.h (fancy_abort): Declare. (abort): Define to fancy_abort. * fixinc/Makefile.in (ALLOBJ): Add ../build-errors.o * java/jv-scan.c (fancy_abort): Add. From-SVN: r86424
2004-08-23tree.h (enum size_type_kind): Remove USIZETYPE, UBITSIZETYPE.Nathan Sidwell1-4/+0
* tree.h (enum size_type_kind): Remove USIZETYPE, UBITSIZETYPE. (usize_type, ubitsizetype): Remove. * stor-layout.c (set_sizetype): Don't initialize usizetype, ubitsizetype. * fold-const.c (size_diffop): TYPE can never be ubitsizetype. From-SVN: r86422
2004-08-23tree.h (build_distinct_type_copy): New.Nathan Sidwell1-1/+2
* tree.h (build_distinct_type_copy): New. (build_type_copy): ... here. Rename to ... (build_variant_type_copy): ... here. * tree.c (build_qualified_type): Rename build_type_copy call. (build_distinct_type_copy): New, broken out of ... (build_type_copy): ... here. Rename to ... (build_variant_type_copy): ... here. Use build_distinct_type_copy. (build_common_tree_nodes_2): Rename build_type_copy call. * c-common.c (c_common_nodes_and_builtins): Rename build_type_copy call. (handle_packed_attribute, handle_unused_attribute, handle_transparanet_union_attribute, handle_aligned_attribute, handle_deprecated_attribute): Likewise. * c-decl.c (clone_underlying_type, store_parm_decls_oldstyle): Likewise. * config/arm/arm.c (arm_handle_isr_attribyte): Likewise. * config/rs6000/rs6000.c (rs6000_init_builtins): Use build_distinct_type_copy. * cp/name-lookup.c (pushdecl): Rename build_type_copy call. * cp/tree.c (cp_build_qualified_type_real, build_exception_variant, handle_java_interface_attribute): Likewise. From-SVN: r86421
2004-08-22tree.h (SAVE_EXPR_RESOLVED_P): New.Richard Henderson1-0/+7
* tree.h (SAVE_EXPR_RESOLVED_P): New. * gimplify.c (gimplify_save_expr): Use it. * expr.c (expand_expr_real_1): Likewise. Also set DECL_IGNORED_P on the temporary variable. From-SVN: r86387
2004-08-22fold-const.c (rtl_expr_nonnegative_p): Delete.Andrew Pinski1-1/+0
2004-08-22 Andrew Pinski <pinskia@physics.uc.edu> * fold-const.c (rtl_expr_nonnegative_p): Delete. * tree.h (rtl_expr_nonnegative_p): Remove. From-SVN: r86381
2004-08-19langhooks-def.h (LANG_HOOKS_UNSAVE_EXPR_NOW): Remove.Eric Christopher1-6/+3
2004-08-19 Eric Christopher <echristo@redhat.com> * langhooks-def.h (LANG_HOOKS_UNSAVE_EXPR_NOW): Remove. * langhooks.h (unsave_expr_now): Ditto. * tree.h (unsave_expr_1): Remove prototype. (lhd_unsave_expr_now): Rename to unsave_expr_now. * tree-inline.c (unsave_expr_1): Move here from tree.c. Make static. (unsave_expr_now): Rename from lhd_unsave_expr_now. * tree-sra.c: Fix up for rename. * tree-ssa-copy.c: Ditto. * tree-eh.c: Ditto. * tree.c (unsave_expr_1): Move to tree-inline.c. 2004-08-19 Eric Christopher <echristo@redhat.com> * cp-tree.h (cxx_unsave_expr_now): Delete prototype. * tree.c (cxx_unsave_expr_now): Delete. (cp_unsave_r): Ditto. From-SVN: r86277
2004-08-19tree.h (TYPE_CACHED_VALUES_P): New.Nathan Sidwell1-1/+10
* tree.h (TYPE_CACHED_VALUES_P): New. (TYPE_CACHED_VALUES): New. (TYPE_ORIG_SIZE_TYPE): Adjust. * tree.def (INTEGER_CST): Update documentation. * tree.c: Inlcude params.h. (build_int_cst): Cache small values. (build_type_copy): Do not copy the value cache. * c-common.c (c_common_nodes_and_builtins): Add comment, remove unneeded zeroing. * c-typeck.c (build_c_cast): Add comment about OVERFLOW setting. * expmed.c (const_mult_add_overflow_p): Clear type copy's value cache. * fold-const.c (force_fit_type): Copy value when setting overflows. (int_const_binop): Likewise. * stor-layout.c: Include params.h (set_sizetype): Create values cache. (fixup_unsigned_type): Set UNSIGNED_P before caching any values. * params.def (PARAM_INTEGER_SHARE_LIMIT): New. * params.h (INTEGER_SHARE_LIMIT): New. * Makefile.in (tree.o, stor-layout.o): Depend on PARAMS_H. * cp/decl.c (finish_enum): Do not copy value node early, copy later. * cp/lex.c (cxx_init): Force null_node to be unique. * java/parse.h (JAVA_RADIX10_FLAG): Rename to ... (JAVA_NOT_RADIX10_FLAG): ... here. Invert meaning. * java/lex.c (do_java_lex): Adjust. (error_if_numeric_overflow): Likewise. From-SVN: r86247
2004-08-18alias.c (readonly_fields_p): Remove.Richard Henderson1-1/+0
* alias.c (readonly_fields_p): Remove. (objects_must_conflict_p): Don't call it. * tree.h (readonly_fields_p): Remove. * langhooks.h (struct lang_hooks): Remove honor_readonly. * langhooks-def.h (LANG_HOOKS_HONOR_READONLY): Remove. ada/ * misc.c (LANG_HOOKS_HONOR_READONLY): Remove. From-SVN: r86200