aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.h
AgeCommit message (Collapse)AuthorFilesLines
2004-12-09tree.def (SET_TYPE): Remove.Nathan Sidwell1-6/+2
* tree.def (SET_TYPE): Remove. (CONSTRUCTOR): Update description. * builtins.c (type_to_class) Remove SET_TYPE case. * dbxout.c (dbxout_type): Likewise. * dwarf2out.c (is_base_type): Likewise. (gen_set_type_die): Remove. (gen_type_die): Remove SET_TYPE case. * expr.c (count_type_elements): Likewise. (mostly_zeroes_p): Likewise. (store_constructor): Likewise. * print_tree.c (print_node): Likewise. * stor-layout.c (layout_type): Likewise. * tree-browser.c (browse_tree): Likewise. * tree-inline.c (remap_type): Likewise. * tree-pretty-print.c (dump_generic_node): Likewise. * tree.c (type_contains_plaeholder_1, type_hash_eq, variably_modified_type_p, initializer_zerop): Likewise. * tree.h (SET_OR_ARRAY_CHECK): Remove. (AGGREGATE_TYPE_P): Remove SET_TYPE check. (TYPE_DOMAIN): Use ARRAY_TYPE_CHECK. * typeclass.h (enum type_class): Remove set_type_class. * varasm.c (const_hash_1): Remove SET_TYPE case. (compare_constant, copy_constant, output_constant): Likewise. * config/i386/i386.c (classify_argument): Likewise. * config/ia64/ia64.c (hfa_element_mode): Likewise. * config/sparc/sparc.c (sparc_type_code): Likewise. * ada/decl.c (gnat_substitute_in_type): Remove SET_TYPE case. From-SVN: r91931
2004-12-08re PR middle-end/17982 (stop calling assemble_external before final assembly ↵Zack Weinberg1-0/+1
output time) PR 17982 * varasm.c (pending_assemble_externals): New static. (assemble_external_real): Meat of assemble_external split out to this new function. (process_pending_assemble_externals): New function. (assemble_external): Use gcc_assert. If flag_unit_at_a_time is true and the basic test passes, merely cons the decl onto the pending list to be handled later. * tree.h: Declare process_pending_assemble_externals. * cgraphunit.c (cgraph_optimize): Call it. * config/h8300/h8300.h: Do not define ASM_OUTPUT_EXTERNAL. From-SVN: r91914
2004-12-07c-common.c, [...]: Replace uses of first_rtl_op with TREE_CODE_LENGTH.Kazu Hirata1-5/+0
gcc/ * c-common.c, expr.c, fold-const.c, print-tree.c, tree-gimple.c, tree-inline.c, tree-pretty-print.c, tree-ssa-loop-im.c, tree-ssa-loop-ivopts.c: Replace uses of first_rtl_op with TREE_CODE_LENGTH. * tree.c (first_rtl_op): Remove. Replace uses of first_rtl_op with TREE_CODE_LENGTH. * tree.h: Remove the prototype for first_rtl_op. gcc/cp/ * pt.c: Replace a use of first_rtl_op with TREE_CODE_LENGTH. From-SVN: r91818
2004-12-04re PR middle-end/17909 (ICE: verifiy_stms failed)Andrew Pinski1-0/+1
2004-12-04 Andrew Pinski <pinskia@physics.uc.edu> PR middle-end/17909 * builtins.c (fold_builtin_next_arg): Export and return true when there is a warning or an error. (expand_builtin_va_start): When fold_builtin_next_arg returns true, return const0_rtx. (expand_builtin): Likewise. * gimplify.c (gimplify_call_expr): Error out if there is not enough arguments to va_start. Call fold_builtin_next_arg also on the second argument. * tree.h (fold_builtin_next_arg): Prototype. From-SVN: r91727
2004-11-27tree.c (operand_equal_for_phi_arg_p): New.Kazu Hirata1-0/+1
* tree.c (operand_equal_for_phi_arg_p): New. * tree.h: Add a prototype for operand_equal_for_phi_arg_p. * tree-cfg.c, tree-ssa-dom.c, tree-ssa-phiopt.c, tree-ssa.c: Replace operand_equal_p with operand_for_phi_arg_p appropriately. From-SVN: r91385
2004-11-24expr.c (expand_expr_real_1): Remove cases for EXIT_BLOCK_EXPR and ↵Steven Bosscher1-11/+0
LABELED_BLOCK_EXPR. gcc/ * expr.c (expand_expr_real_1): Remove cases for EXIT_BLOCK_EXPR and LABELED_BLOCK_EXPR. * gimplify.c (gimplify_labeled_block_expr): Remove. (gimplify_exit_block_expr): Remove. (gimplify_expr): Don't call them. * tree-inline.c (copy_body_r): Don't handle EXIT_BLOCK_EXPR and LABELED_BLOCK_EXPR. (estimate_num_insns_1): Likewise. (walk_tree): Likewise. * tree-pretty-print.c (dump_generic_node): Don't handle EXIT_BLOCK_EXPR and LABELED_BLOCK_EXPR. * tree.def (EXIT_BLOCK_EXPR): Moved to java-tree.def. (LABELED_BLOCK_EXPR): Likewise. * tree.h (LABELED_BLOCK_LABEL): Moved to java-tree.h. (LABELED_BLOCK_BODY): Likewise. (EXIT_BLOCK_LABELED_BLOCK): Likewise. (EXIT_BLOCK_RETURN): Removed. java/ * java-gimplify.c (java_gimplify_labeled_block_expr): New function. (java_gimplify_exit_block_expr): New function. (java_gimplify_expr): Use them to gimplify EXIT_BLOCK_EXPR and LABELED_BLOCK_EXPR. * java-tree.def (LABELED_BLOCK_EXPR): Moved from tree.def. (EXIT_BLOCK_EXPR): Likewise. * java-tree.h (LABELED_BLOCK_LABEL): Moved from tree.h. (LABELED_BLOCK_BODY): Likewise. (EXIT_BLOCK_LABELED_BLOCK): Likewise. * jcf-write.c (generate_bytecode_insns): Don't handle the unused EXIT_BLOCK_RETURN operand. Use EXIT_BLOCK_LABELED_BLOCK instead of TREE_OPERAND. * lang.c (java_tree_inlining_walk_subtrees): Handle EXIT_BLOCK_EXPR. (java_dump_tree): Use LABELED_BLOCK_LABEL, LABELED_BLOCK_BODY, and EXIT_BLOCK_LABELED_BLOCK instead of TREE_OPERAND. Don't handle the second operand of EXIT_BLOCK_EXPR. * parse.y (find_expr_with_wfl): Use LABELED_BLOCK_BODY instead of TREE_OPERAND. (build_bc_statement): Use build1 to build EXIT_BLOCK_EXPR nodes. From-SVN: r91149
2004-11-23function.h (struct function): Remove calls_longjmp.Zack Weinberg1-11/+10
* function.h (struct function): Remove calls_longjmp. (current_function_calls_longjmp): Delete. * tree.h (ECF_LONGJMP): Delete. (ECF_SIBCALL, ECF_PURE, ECF_SP_DEPRESSED, ECF_ALWAYS_RETURN) (ECF_LIBCALL_BLOCK): Everybody slide down one. (ECF_CONST, ECF_NORETURN, ECF_SIBCALL): Clarify comments. * builtins.c (expand_builtin_longjmp): Don't set current_function_calls_longjmp. * calls.c (special_function_p): Mark longjmp and siglongjmp with ECF_NORETURN, not ECF_LONGJMP. (emit_call_1, expand_call, emit_library_call_value_1): Don't check for ECF_LONGJMP. * tree-cfg.c (make_exit_edges, is_ctrl_altering_stmt) (need_fake_edge_p): Likewise. * config/avr/avr.h, config/ip2k/ip2k.h: Don't define NON_SAVING_SETJMP. * system.h: Poison NON_SAVING_SETJMP. * function.c (use_register_for_decl) * gcse.c (compute_hash_table_work, compute_store_table) * postreload-gcse.c (record_opr_changes) * reload.c (find_equiv_reg) * reload1.c (reload) * config/i386/i386.c (ix86_can_use_return_insn_p): Remove code conditional on NON_SAVING_SETJMP. * doc/tm.texi: Delete documentation of NON_SAVING_SETJMP. * config/i386/sysv3.h: Delete file. * config/i386/i386.c (ix86_svr3_asm_out_constructor): Delete. From-SVN: r91101
2004-11-23tree-phinode.c (resize_phi_node): Abort when LEN is strictly greater than ↵Kazu Hirata1-2/+1
PHI_ARG_CAPACITY. * tree-phinode.c (resize_phi_node): Abort when LEN is strictly greater than PHI_ARG_CAPACITY. (reserve_phi_args_for_new_edge): Initialize the new PHI argument to NULL_TREE. Increment PHI_NUM_ARGS. (add_phi_arg): Add a PHI argument to the slot given by E->dest_idx. (remove_phi_arg_num): Do not write to PHI_ARG_EDGE. * tree-flow-inline (phi_arg_from_edge): Return E->dest_idx. * tree-ssa.c (ssa_redirect_edge): Check for a missing PHI argument by looking at PHI_ARG_DEF. (verify_phi_args): Check for a missing PHI argument. Remove the check for duplicate PHI arguments. * tree.h (PHI_ARG_EDGE): Redefine in terms of EDGE_PRED. (phi_arg_d): Remove e. From-SVN: r91097
2004-11-23fold-const.c (nondestructive_fold_binary_to_constant): Rename to ↵Roger Sayle1-2/+2
fold_binary_to_constant. * fold-const.c (nondestructive_fold_binary_to_constant): Rename to fold_binary_to_constant. (nondestructive_fold_unary_to_constant): Likewise, rename to fold_unary_to_constant. (fold_relational_hi_lo): Update call to fold_binary_to_constant. * tree.h (nondestructive_fold_binary_to_constant): Update prototype. (nondestructive_fold_unary_to_constant): Likewise. * tree-ssa-ccp.c (ccp_fold): Update calls to fold_unary_to_constant and fold_binary_to_constant. * tree-ssa-loop-niter.c (EXEC_BINARY, EXEC_UNARY): Delete macros. (inverse, number_of_iterations_cond): Replace uses of EXEC_BINARY and EXEC_UNARY with calls to fold_*nary_to_constant. * tree-ssa-loop-ivopts.c (EXEC_BINARY, EXEC_UNARY): Delete macros. (idx_find_step): Replace uses of EXEC_BINARY with calls to fold_binary_to_constant. From-SVN: r91063
2004-11-17basic-block.h, [...]: Remove unused prototypes.Kazu Hirata1-6/+0
* basic-block.h, c-common.h, df.h, expr.h, output.h, rtl.h, tree-chrec.h, tree-flow.h, tree-scalar-evolution.h, tree-ssa-live.h, tree.h: Remove unused prototypes. From-SVN: r90821
2004-11-17tree-cfg.c (edge_to_cases): Renamed from edge_to_case_leader.Jeff Law1-9/+1
* tree-cfg.c (edge_to_cases): Renamed from edge_to_case_leader. (edge_to_cases_elt): Renamed from edge_to_case_leader. (edge_to_cases_hash): Renamed from edge_to_case_leader_hash. (edge_to_cases_eq): Renamed from edge_to_case_leader_eq. (edge_to_cases_cleanup, recording_case_labels_p): New functions. (get_cases_for_edge): New function. (start_recording_case_labels, end_recording_case_labels): Similarly. (record_switch_edge): Don't muck with the CASE_LABEL. Instead chain equivalent CASE_LABEL_EXPRs together. (get_case_leader_for_edge, get_case_leader_for_edge_hash): Kill. (make_switch_expr_edges): Do not record edge/cases here. (cleanup_tree_cfg): Record cases around the call to thread_jumps. (split_critical_edges): Record cases around the edge splitting code. (cleanup_dead_labels): Use CASE_LABEL again. (tree_redirect_edge_and_branch): If we have a mapping from edge to cases, use it to handle redirections. Else do it the slow way. * tree.h (CASE_LEADER_OR_LABEL): Kill. (CASE_LABEL): Revert to just looking at the tree's second operand. * tree.c (get_case_label): Kill. From-SVN: r90817
2004-11-15re PR tree-optimization/18431 (Code for arrays and pointers are not the same)Zdenek Dvorak1-1/+2
PR tree-optimization/18431 * fold-const.c (associate_trees): Do not produce x + 0. (fold_widened_comparison, fold_sign_changed_comparison): New functions. (fold): Use them. * tree-ssa-loop-niter.c (upper_bound_in_type, lower_bound_in_type): Moved ... * tree.c (upper_bound_in_type, lower_bound_in_type): Here. * tree.h (upper_bound_in_type, lower_bound_in_type): Declare. * testsuite/gcc.c-torture/execute/20041114-1.c: New test. From-SVN: r90646
2004-11-13* tree.h: Fix a comment typo.Kazu Hirata1-1/+1
From-SVN: r90582
2004-11-13* tree.h: Fix a comment typo.Kazu Hirata1-1/+1
From-SVN: r90581
2004-11-12tree-cfg.c (hashtab.h): Include.Jeff Law1-3/+12
* tree-cfg.c (hashtab.h): Include. (struct edge_to_case_leader_elt): New structure. (edge_to_case_leader): New. (edge_to_case_leader_hash): New hashtable hasing function. (edge_to_case_leader_eq): New hashtable equality function. (record_switch_edge): New function. (get_case_leader_for_edge, get_case_leader_for_edge): New functions. (make_switch_expr_edges): Build the edge-to-case-leader hash table. Tear down the hash table when we're done. (cleanup_dead_labels): Use CASE_LEADER_OR_LABEL instead of CASE_LABEL. (tree_node_can_be_shared): Allow sharing of CASE_LABEL_EXPR nodes. (tree_redirect_edge_and_branch, case SWITCH_EXPR): Update to use new concept of case leaders to reduce overhead of redirecting outgoing edges from switch statements. * tree.c (get_case_label): New function. * tree.h (CASE_LABEL): Define in terms of get_case_label. (CASE_LEADER_OR_LABEL): Define. From-SVN: r90570
2004-11-11varasm.c (get_named_section_flags, [...]): Make them static.Kazu Hirata1-1/+0
* varasm.c (get_named_section_flags, decl_tls_model): Make them static. * output.h: Remove the prototype for get_named_section_flags. * tree.h: Remove the prototype for decl_tls_model. From-SVN: r90506
2004-11-09function.c (combine_temp_slots, [...]): Make them static.Kazu Hirata1-3/+0
* function.c (combine_temp_slots, assign_parms, expand_pending_sizes): Make them static. * tree.h: Remove the corresponding prototypes. From-SVN: r90357
2004-11-09fold-const.c (pedantic_non_lvalue): Make it static.Kazu Hirata1-1/+0
* fold-const.c (pedantic_non_lvalue): Make it static. * tree.h: Remove the corresponding prototype. From-SVN: r90352
2004-11-08tree-ssa-loop-niter.c (upper_bound_in_type, [...]): Make them static.Kazu Hirata1-4/+0
* tree-ssa-loop-niter.c (upper_bound_in_type, lower_bound_in_type): Make them static. * tree.h: Remove the corresponding prototypes. From-SVN: r90312
2004-11-04tree-phinodes.c (make_phi_node): Make it static.Kazu Hirata1-1/+0
* tree-phinodes.c (make_phi_node): Make it static. * tree.h: Remove the prototypes for make_phi_node. From-SVN: r90093
2004-11-04stmt.c (expand_asm, [...]): Make them static.Kazu Hirata1-2/+0
* stmt.c (expand_asm, expand_asm_operands): Make them static. * tree.h: Remove the prototypes for expand_asm and expand_asm_operands. From-SVN: r90092
2004-11-04expr.c (mostly_zero_p): Make it static.Kazu Hirata1-1/+0
* expr.c (mostly_zero_p): Make it static. * tree.h: Remove the prototype for mostly_zeros_p. From-SVN: r90089
2004-11-04builtins.c (expand_builtin_return_addr, [...]): Make them static.Kazu Hirata1-1/+0
* builtins.c (expand_builtin_return_addr, expand_builtin_longjmp, expand_builtin_trap): Make them static. * expr.h: Remove the prototypes for expand_builtin_longjmp and expand_builtin_trap. * tree.h: Remove the prototype for expand_builtin_return_addr. From-SVN: r90087
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