aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-flow.h
AgeCommit message (Collapse)AuthorFilesLines
2004-08-17tree-vectorizer.c: New File: loop vectorization on SSAed GIMPLE trees.Dorit Naishlos1-0/+6
* tree-vectorizer.c: New File: loop vectorization on SSAed GIMPLE trees. * tree-vectorizer.h: New File: Same. * Makefile.in (tree-vectorizer.c, tree-vectorizer.h): Add new files. * common.opt (ftree-vectorize): New flag to enable vectorization. * timevar.def (TV_TREE_VECTORIZATION): New dump file for vectorization pass. * tree-data-ref.h (init_data_ref): Additional argument. (array_base_name_differ_p): Moved to tree-data-ref.c. * tree-data-ref.c (array_base_name_differ_p): Revised. (initialize_data_dependence_relation): Call array_base_name_differ_p with an extra argument. (analyze_all_data_dependences): Same. (init_data_ref): Additional argument is_read to set DR_IS_READ. * tree-ssa-phiopt.c (empty_block_p): Expose for usage out of this file. * tree-flow.h (vectorize_loops, empty_block_p): Add declaration. * tree-optimize.c (pass_vectorize): Schedule the vectorization pass. * tree-pass.h (tree_opt_pass pass_vectorize): Declare the new vectorization pass. * tree-ssa-loop.c (tree_ssa_loop_init): Call scev_initialize. (tree_ssa_loop_done): Call scev_finalize. (tree_vectorize): Define the new vectorization pass. * defaults.h (UNITS_PER_SIMD_WORD): Allow targets to specify the size of the vector they support (until support for multiple vector sizes is added to the vectorizer). * config/i386/i386.h (UNITS_PER_SIMD_WORD): Define. * config/rs6000/rs6000.h (UNITS_PER_SIMD_WORD): Define. * invoke.texi (fdump-tree-vect, ftree-vectorize): Add documentation. From-SVN: r86131
2004-08-11tree-flow-inline.h (get_def_ops, [...]): Add operand structure reference.Andrew MacLeod1-8/+5
2004-08-11 Andrew MacLeod <amacleod@redhat.com> * tree-flow-inline.h (get_def_ops, get_use_ops, get_v_may_def_ops, get_vuse_ops,get_v_must_def_ops): Add operand structure reference. (get_v_may_def_result_ptr, get_v_may_def_op_ptr): New access struct. (start_ssa_stmt_operands): Delete. * tree-flow.h (struct stmt_ann_d): Replace operand vectors with new struct stmt_operands_d. (build_ssa_operands): New extern entry point. * tree-ssa-dom.c (record_equivalences_from_stmt): Remove operand building code, replace with create_ssa_artficial_load_stmt(). * tree-ssa-operands.c (struct voperands_d): Delete. (allocate_v_may_def_optype): Allocate v_may_def_operand_type_t vector. (allocate_v_must_def_optype): Use sizeof (tree), not sizeof (tree *). (free_uses, free_defs, free_vuses, free_v_may_defs, free_v_must_defs): Remove dealloc parameter. (remove_vuses, remove_v_may_def, remove_v_must_defs): Delete. (finalize_ssa_defs, finalize_ssa_uses, finalize_ssa_v_may_defs, finalize_ssa_vuses, finalize_ssa_v_must_defs): Perform all operand vector comparisons, ssa_name reuse, and allocations here. (verify_start_operands): Delete. (finalize_ssa_stmt_operands): Set new operands by calling finalize routines. (start_ssa_stmt_operands): Move from tree-flow-inline.h. (append_def, append_usei): Simplify to simple accumulation. (append_v_may_def, append_vuse, append_v_must_def): Simplify to avoiding duplicates and simple accumulation. (free_ssa_operands): Free vectors in a stmt_operand structure. (build_ssa_operands): New. Create a new stmt_operand structure from a stmt and an old set of stmt_operands. (get_stmt_operands): Simplify and call build_ssa_operands. (get_expr_operands, get_asm_expr_operands, get_indirect_ref_operands, get_call_expr_operands, add_stmt_operand, add_call_clobber_ops, add_call_read_ops): Don't pass prev_vops around anymore. (note_addressable): Return if no stmt annotation. (copy_virtual_operands): Access v_may_def operands through a struct. (create_ssa_artficial_load_stmt): New. Create a load stmt for DOM's hash tables without treating the stmt as a real stmt. * tree-ssa-operands.h (struct v_may_def_operand_type): New. Access v_may_def def and use through a struct instead of 2 array elements. (struct v_may_def_optype_d): Use v_may_def_operand_type. (struct stmt_operands_d): New. Struct for storing all operand vectors. From-SVN: r85807
2004-08-09Makefile.in (OBJC-common): Add tree-ssa-threadupdate.cJeff Law1-2/+5
* Makefile.in (OBJC-common): Add tree-ssa-threadupdate.c (tree-ssa-threadupdate.o): Add dependencies. * tree-ssa-threadupdate.c: New file. * tree-flow.h (incoming_edge_threaded): New flag in block annotation. (rewrite_vars_out_of_ssa): Remove prototype. (cleanup_tree_cfg): Returns a bool. * tree.h (thread_through_all_blocks): Prototype. * tree-outof-ssa.c (SSANORM_*): Move into here. (remove_ssa_form): Now static. (rewrite_vars_out_of_ssa): Kill. * tree-ssa-live.c (register_ssa_partitions_for_vars): Kill. * tree-ssa-live.h (SSANORM_*): Moved into tree-outof-ssa.c. (remove_ssa_form, register_partitions_for_vars): Kill declarations. * tree-cfg.c (cleanup_tree_cfg): Return a value indicating if anything was changed. * tree-phinodes.c (add_phi_arg): Get the block for the PHI from the PHI's annotation rather than the edge associated with the new argument. * tree-ssa-dom.c (redirection_edges): Kill. (redirect_edges_and_update_ssa_graph): Kill. (tree_ssa_dominator_optimize): Do not reset forwardable flag for blocks anymore. Do not initialize redirection_edges. Call thread_through_all_blocks. Simplify code for cleanup of the CFG and iterating. No longer call cleanup_tree_cfg outside the iteration loop. (thread_across_edge): No longer mess with forwardable blocks. From-SVN: r85721
2004-08-05tree-ssa-loop-manip.c: New file.Zdenek Dvorak1-0/+2
* tree-ssa-loop-manip.c: New file. * Makefile.in (tree-ssa-loop-manip.o): Add. * tree-flow.h (rewrite_into_loop_closed_ssa, verify_loop_closed_ssa): Declare. * tree-ssa-loop.c (tree_loop_optimizer_init): Create loop closed ssa form. (tree_ssa_loop_done): Verify loop closed ssa form. * tree-ssa-loop-im.c (move_computations): Update loop closed ssa form. From-SVN: r85613
2004-08-04tree-cfg.c (tree_duplicate_bb): Mark duplicated definitions.Zdenek Dvorak1-1/+1
* tree-cfg.c (tree_duplicate_bb): Mark duplicated definitions. * tree-flow.h (rewrite_ssa_into_ssa): Declaration changed. * tree-into-ssa.c (rewrite_ssa_into_ssa): Use new interface to manipulate the duplicated ssa names. * tree-ssanames.c (ssa_names_to_rewrite): New variable. (marked_for_rewrite_p, any_marked_for_rewrite_p, mark_for_rewrite, unmark_all_for_rewrite, marked_ssa_names, release_ssa_name_force): New functions. (release_ssa_name): Do not release ssa names that may have multiple definitions. * tree.h (release_ssa_name_force, mark_for_rewrite, unmark_all_for_rewrite, marked_for_rewrite_p, any_marked_for_rewrite_p, marked_ssa_names): Declare. * tree-ssa-loop-ch.c (mark_defs_for_rewrite): Remove. (duplicate_blocks): Remove call to mark_defs_for_rewrite. Update call to rewrite_ssa_into_ssa. Co-Authored-By: Jeff Law <law@redhat.com> From-SVN: r85572
2004-07-23expr.c (expand_expr_real_1): Don't handle non-local variables.Richard Henderson1-1/+1
* expr.c (expand_expr_real_1): Don't handle non-local variables. * expr.h (fix_lexical_addr): Remove. * function.c (NEED_SEPARATE_AP): Remove. (fix_lexical_addr): Remove. * tree-alias-common.c (get_alias_var_decl): Check TREE_STATIC, not null decl_function_context. (create_alias_vars): Likewise. * tree-cfg.c (make_ctrl_stmt_edges): Don't check for non-local labels. (simple_goto_p): Likewise. * tree-dfa.c (add_referenced_var): Don't check for non-local variables. * tree-ssa-ccp.c (get_default_value): Likewise. * tree-tailcall.c (suitable_for_tail_opt_p): Likewise. * tree.c (needs_to_live_in_memory): Likewise. * tree-flow-inline.h (may_be_aliased): Move... * tree-ssa-alias.c (may_be_aliased): ... here. Enhance check for when TREE_STATIC variables may be addressable. From-SVN: r85099
2004-07-22tree-into-ssa.c (set_livein_block): Fix typo in comment.Diego Novillo1-1/+1
* tree-into-ssa.c (set_livein_block): Fix typo in comment. (rewrite_ssa_into_ssa): Start iterating over SSA names at 1. Release SSA names that have been re-renamed. * tree-phinodes.c (make_phi_node): Set same TREE_TYPE as the variable. * tree-ssa-alias.c (init_alias_info): If aliases have been computed before, clear existing alias information. (create_name_tags): Do no fixup PT_ANYTHING pointers. If the new name tag for a pointer is different than the one it had before, mark the old tag for renaming. (replace_may_alias): New function. (group_aliases): Call it. (setup_pointers_and_addressables): Always call get_tmt_for. (maybe_create_global_var): Don't create .GLOBAL_VAR more than once. (set_pt_anything): New local function. (set_pt_malloc): New local function. (merge_pointed_to_info): Don't merge pointed-to variables from the original pointer if the destination is pointing to an unknown location. (add_pointed_to_expr): Call set_pt_anything and set_pt_malloc. (add_pointed_to_var): Do not add a variable to the points-to set if the pointer is already pointing to anywhere. (collect_points_to_info_r): If the defining statement is a PHI node, only merge pointed-to information if the argument has already been visited. (get_tmt_for): Only create a new tag if the pointer didn't have one already. (dump_alias_info): Emit more information. (dump_points_to_info_for): Likewise. * tree-ssa-dom.c (redirect_edges_and_update_ssa_graph): Don't try to get the annotation of an SSA_NAME. * tree-ssa-operands.c (add_stmt_operand): Only check for empty alias sets when checking is enabled. * tree-ssa-pre.c (need_eh_cleanup): New local variable. (eliminate): Mark basic blocks that will need EH information cleaned up. (init_pre): Split ENTRY_BLOCK->0 if block 0 has more than one predecessor. Initialize need_eh_cleanup. (fini_pre): Call tree_purge_all_dead_eh_edges and cleanup_tree_cfg if needed. Free need_eh_cleanup. * tree-ssa.c (verify_ssa_name): New function. (verify_def): Call it. Re-arrange to avoid printing too many error messages. (verify_use): Likewise. (verify_phi_args): Likewise. (verify_flow_insensitive_alias_info): New function. (verify_flow_sensitive_alias_info): New function. (verify_alias_info): New function. (verify_ssa): Call verify_alias_info. Clear TREE_VISITED on all the SSA_NAMEs before scanning the program. Re-arrange to avoid printing too many error messages. * tree-ssanames.c (make_ssa_name): Clear SSA_NAME_IN_FREE_LIST. (release_ssa_name): Never release a default definition. (release_defs): New function. * tree.h: Declare it. * tree-ssa-dce.c (remove_dead_stmt): Call it. * tree-ssa.c (walk_use_def_chains_1): Add new argument IS_DFS. If true, do a depth-first search. Do a breadht-first search, otherwise. (walk_use_def_chains): Add new argument IS_DFS. Update all users. * tree-flow.h (walk_use_def_chains): Update prototype. From-SVN: r85052
2004-07-22tree-cfg.c (gimplify_val): Move from tree-complex.c.Paolo Bonzini1-0/+7
2004-07-22 Paolo Bonzini <bonzini@gnu.org> * tree-cfg.c (gimplify_val): Move from tree-complex.c. (gimplify_build1): Move from tree-complex.c do_unop. (gimplify_build2): Move from tree-complex.c do_binop. (gimplify_build3): New. * tree-complex.c (gimplify_val, do_unop, do_binop): Remove. Adjust throughout to call the functions above. * tree-flow.h: Declare the functions above. * tree-nested.c (gimplify_val): Rename to... (tsi_gimplify_val): ... this. * Makefile.in (tree_complex.o): Update dependencies. (stor-layout.o): Depend on regs.h. * c-common.c (handle_vector_size_attribute): Update for vector types without corresponding vector modes. * expr.c (expand_expr): Treat VECTOR_CST's like CONSTRUCTORS if a corresponding vector mode is not available. * print-tree.c (print_node): Print nunits for vector types * regclass.c (have_regs_of_mode): New. (init_reg_sets_1): Initialize it and use it instead of allocatable_regs_of_mode. * regs.h (have_regs_of_mode): Declare it. * stor-layout.c (layout_type): Pick a mode for vector types. * tree-complex.c (build_word_mode_vector_type, tree_vec_extract, build_replicated_const, do_unop, do_binop, do_plus_minus, do_negate, expand_vector_piecewise, expand_vector_parallel, expand_vector_addition, expand_vector_operations_1, expand_vector_operations, tree_lower_operations, pass_lower_vector_ssa, pass_pre_expand): New. (expand_complex_operations, pass_lower_complex): Remove. * tree-optimize.c (init_tree_optimization_passes): Adjust pass ordering for changes in tree-complex.c. * tree-pass.h: Declare new passes. * tree.c (finish_vector_type): Remove. (make_vector_type): New. (build_vector_type_for_mode, build_vector_type): Rewritten. * tree.def (VECTOR_TYPE): Document where the number of subparts is stored. * tree.h (TYPE_VECTOR_SUBPARTS): Use TYPE_PRECISION field. (make_vector): Remove declaration. From-SVN: r85039
2004-07-21gimple-low.c (expand_var_p): Don't look at TREE_ADDRESSABLE...Richard Henderson1-2/+1
* gimple-low.c (expand_var_p): Don't look at TREE_ADDRESSABLE, TREE_THIS_VOLATILE, may_aliases, or optimization level. (remove_useless_vars): Dump debugging info. (expand_used_vars): Move ... * cfgexpand.c (expand_used_vars): ... here. Make static. * tree-flow-inline.h (set_is_used): New. (set_default_def): Use get_var_ann. * tree-flow.h: Update decls. * tree-ssa-live.c (mark_all_vars_used_1, mark_all_vars_used): New. (create_ssa_var_map): Use it. * tree-ssa.c (set_is_used): Remove. From-SVN: r85034
2004-07-17cfgcleanup.c (try_simplify_condjump): Don't remove line notes to avoid ↵Steven Bosscher1-0/+2
unreachable code warnings. * cfgcleanup.c (try_simplify_condjump): Don't remove line notes to avoid unreachable code warnings. * toplev.c (backend_init): Don't emit line notes for unreachable code warnings. * combine.c (distribute_notes): Don't distribute a REG_VTABLE_REF note. * final.c (final_scan_insn): Don't handle it. * rtl.c (reg_note_name): Remove it. * rtl.h (enum reg_node): Dito. * emit-rtl.c (force_line_numbers, restore_line_number_status): Remove. * rtl.h (force_line_numbers, restore_line_number_status): Remove prototypes. * stmt.c (using_eh_for_cleanups_p, using_eh_for_cleanups): Move... * tree-eh.c (using_eh_for_cleanups_p): ...here. Make static. (using_eh_for_cleanups): Also moved here. * expr.c (expand_expr_real_1) <CASE_LABEL_EXPR>: Die if we see one. <SWITCH_EXPR>: Die if we have a non-NULL SWITCH_BODY. Update calls to expand_start_case and add_case_node. * stmt.c (struct nesting): Cleanup unused fields condition_code, last_unconditional_cleanup, nominal_type, printname, and line_number_status. (struct fixup_goto): Remove. (struct stmt_status): Remove x_goto_fixup_chain field. (goto_fixup_chain): Remove. (strip_default_case_nodes, group_case_nodes, emit_jump_if_reachable, pushcase, pushcase_range): Remove. (expand_start_bindings_and_block): Don't set unused fields in the nesting stack. (expand_start_case, add_case_node): Cleanup unused formal arguments. (expand_end_case_type): Don't simplify the case-list. Use emit_jump instead of emit_jump_if_reachable. (emit_case_nodes): Likewise. * tree-cfg.c (group_case_labels, cleanup_dead_labels): No longer static. (update_eh_label): Work around left-over exception handing regions. * tree-flow.h (group_case_labels, cleanup_dead_labels): Add protos. * tree-optimize.c (execute_cleanup_cfg_post_optimizing): New function. (pass_cleanup_cfg_post_optimizing): New pass. (init_tree_optimization_passes): Run the new pass after all optimizations. * tree.h (pushcase, pushcase_range): Remove prototypes. (expand_start_case, add_case_node): Update prototypes. cp/ * cp-tree.h (struct lang_type): Don't have three GTY options on a single bit GTY desc. java/ * parse.y (java_complete_expand_methods, java_expand_classes): Don't abuse restore_line_number_status. From-SVN: r84849
2004-07-16tree-flow.h (struct var_ann_d): Remove has_hidden_use.Richard Henderson1-13/+0
* tree-flow.h (struct var_ann_d): Remove has_hidden_use. * gimple-low.c (expand_var_p): Don't check it. * tree-ssa-alias.c (setup_pointers_and_addressables): Likewise. * tree-ssa-copyrename.c (rename_ssa_copies): Likewise. * tree-ssa-operands.c (add_stmt_operand): Likewise. * tree-dfa.c (find_hidden_use_vars, find_hidden_use_vars_r): Kill. (find_referenced_vars): Don't call them. * tree-flow-inline.h (has_hidden_use, set_has_hidden_use): Kill. From-SVN: r84830
2004-07-10tree-ssa-loop-im.c: New file.Zdenek Dvorak1-0/+8
* tree-ssa-loop-im.c: New file. * Makefile.in (tree-ssa-loop-im.o): Add. * cfgloop.c (superloop_at_depth): New function. * cfgloop.h (superloop_at_depth): Declare. * common.opt (ftree-lim): New flag. * expr.c (array_ref_up_bound): New function. * params.def (PARAM_LIM_EXPENSIVE): New parameter. * timevar.def (TV_LIM): New timevar. * tree-dfa.c (compute_immediate_uses): Respect TDFA_USE flags when computing immediate uses of a phi node. * tree-flow.h (struct tree_ann_common_d): Add aux field. (loop_commit_inserts, for_each_index, tree_ssa_lim): Declare. * tree-optimize.c (init_tree_optimization_passes): Add pass_lim. * tree-pass.h (pass_lim): Declare. * tree-ssa-loop.c (tree_ssa_loop_im, gate_tree_ssa_loop_im): New functions. (pass_lim): New pass structure. * tree-eh.c (tree_could_trap_p): Handle ARRAY_REFs correctly. * tree.c (in_array_bounds_p): New function. * tree.h (TREE_THIS_NOTRAP): Define also for ARRAY_REFs. (in_array_bounds_p, array_ref_up_bound): Declare. * doc/invoke.texi (-ftree-lim, --param lim-expensive): Document. * doc/passes.texi (tree-ssa-loop-im.c): Document. From-SVN: r84441
2004-07-09tree-dfa.c (dump_variable): If the variable is a pointer SSA_NAME, also dump ↵Diego Novillo1-0/+5
its points-to information. * tree-dfa.c (dump_variable): If the variable is a pointer SSA_NAME, also dump its points-to information. * tree-flow.h (struct ptr_info_def): Add field is_dereferenced. (dump_points_to_info_for): Declare. (debug_points_to_info_for): Declare. * tree-optimize.c (init_tree_optimization_passes): Add a second alias analysis pass after DOM2. Move pass_del_pta to a later spot. * tree-ssa-alias.c (compute_points_to_and_addr_escape): Do not create a name tags when we find a dereferenced pointer. Just mark the pointer dereferenced. (collect_points_to_info_for): Move code to clear points-to information to create_name_tags. (create_name_tags): New function. (compute_flow_sensitive_aliasing): Call it. (setup_pointers_and_addressables): Mark type tags for renaming here instead of ... (create_memory_tag): ... here. (merge_pointed_to_info): Do not merge PT_MALLOC attributes. (dump_points_to_info_for): Declare extern. (debug_points_to_info_for): New function. From-SVN: r84377
2004-07-09tree-scalar-evolution.c: New file.Zdenek Dvorak1-0/+44
* tree-scalar-evolution.c: New file. * tree-scalar-evolution.h: New file. * tree-ssa-loop-niter.c: New file. * Makefile.in (SCEV_H): New. (tree-scalar-evolution.o, tree-ssa-loop-niter.o): Add new files. * cfgloop.h (struct loop): Add bounds field. * tree-flow.h (struct tree_niter_desc): New type. (number_of_iterations_cond, number_of_iterations_exit, loop_niter_by_eval, find_loop_niter_by_eval, estimate_numbers_of_iterations, can_count_iv_in_wider_type, free_numbers_of_iterations_estimates): Declare. * tree.h (lower_bound_in_type, upper_bound_in_type): Declare. * params.def (PARAM_MAX_ITERATIONS_TO_TRACK): New parameter. * doc/invoke.texi (max-iterations-to-track): Document. From-SVN: r84340
2004-07-08tree-flow.h (addressable_vars): Declare.Diego Novillo1-0/+4
* tree-flow.h (addressable_vars): Declare. * tree-ssa-alias.c (addressable_vars): Define. (setup_pointers_and_addressables): Add addressable variables to addressable_vars. * tree-ssa-operands.c (get_stmt_operands): Move handling of ASM_EXPRs ... (get_asm_expr_operands): ... here. When the ASM_EXPR clobbers memory, also clobber addressable variables. * tree-ssa.c (init_tree_ssa): Initialize addressable_vars. (delete_tree_ssa): Reset addressable_vars. From-SVN: r84272
2004-07-07tree-flow-inline.h (may_propagate_copy): Move...Richard Henderson1-1/+1
* tree-flow-inline.h (may_propagate_copy): Move... * tree-ssa-copy.c (may_propagate_copy): ... here. Fail if we attempt to copy between types requiring conversion. * tree-flow.h (may_propagate_copy): Update decl. * tree-ssa-dom.c (cprop_operand): Tidy redundant tests. From-SVN: r84225
2004-07-02* tree-flow.h (bb_ann_d): Remove ephi_nodes field.Steven Bosscher1-3/+0
From-SVN: r84016
2004-06-30common.opt (ftree-loop-optimize): New flag.Zdenek Dvorak1-0/+1
* common.opt (ftree-loop-optimize): New flag. * tree-flow.h (kill_redundant_phi_nodes): Declare. * tree-optimize.c (init_tree_optimization_passes): Add pass_loop. * tree-pass.h (pass_loop_init, pass_loop_done): Declare. * tree-ssa-loop.c (current_loops): New variable. (tree_loop_optimizer_init, gate_loop, tree_ssa_loop_init, tree_ssa_loop_done): New functions. (pass_loop, pass_loop_init, pass_loop_done): New passes. * tree-ssa.c (kill_redundant_phi_nodes): Export. * doc/invoke.texi (-ftree-loop-optimize): Document. From-SVN: r83933
2004-06-30tree-ssa-loop-ch.c: New file.Zdenek Dvorak1-1/+5
* tree-ssa-loop-ch.c: New file. * Makefile.in (tree-ssa-loop-ch.o): Add. (tree-into-ssa.o): Add GGC_H dependency. * tree-cfg.c (tree_duplicate_bb): Copy virtual arguments. * tree-flow.h (rewrite_into_ssa): Declaration changed. (rewrite_ssa_into_ssa, compute_global_livein, duplicate_ssa_name): Declare. * tree-into-ssa.c: Include ggc.h. (struct def_blocks_d): Add phi_blocks field. (struct mark_def_sites_global_data): Add names_to_rename field. (struct ssa_name_info): New. (compute_global_livein): Export. (set_def_block, insert_phi_nodes, mark_def_sites, set_livein_block, insert_phi_nodes_1, rewrite_finalize_block, insert_phi_nodes_for, register_new_def, get_reaching_def, def_blocks_free, get_def_blocks_for, rewrite_into_ssa): Modified to work with rewrite_ssa_into_ssa. (get_ssa_name_ann, get_phi_state, set_phi_state, get_current_def, set_current_def, ssa_mark_def_sites_initialize_block, ssa_mark_phi_uses, ssa_mark_def_sites, duplicate_ssa_name, ssa_register_new_def, ssa_rewrite_initialize_block, ssa_rewrite_phi_arguments, ssa_rewrite_finalize_block, ssa_rewrite_stmt, rewrite_ssa_into_ssa, rewrite_all_into_ssa): New functions. (pass_build_ssa): Call rewrite_all_into_ssa. * tree-optimize.c (execute_todo, execute_one_pass, tree_rest_of_compilation): Allocate vars_to_rename only once. * tree-ssa-dom.c (tree_ssa_dominator_optimize): Provide parameter to rewrite_into_ssa. * tree-ssa-loop.c (should_duplicate_loop_header_p, mark_defs_for_rewrite, duplicate_blocks, do_while_loop_p, copy_loop_headers, gate_ch, pass_ch): Moved to tree-ssa-loop-ch.c. Use rewrite_ssa_into_ssa. * tree-ssa-operands.c (copy_virtual_operands): New function. * tree-ssa-operands.h (copy_virtual_operands): Declare. * tree.h (struct tree_ssa_name): Add aux field. (SSA_NAME_AUX): New macro to access it. From-SVN: r83932
2004-06-28tree-cfg.c (verify_stmt): Add last_in_block parameter.Richard Henderson1-0/+5
* tree-cfg.c (verify_stmt): Add last_in_block parameter. Verify that eh stmts can throw. (verify_stmts): Update verify_stmt call. (tree_purge_dead_eh_edges, tree_purge_all_dead_eh_edges): New. * tree-eh.c (remove_stmt_from_eh_region): New. (lower_eh_constructs): Fix throw_stmt_table delete routine. (tree_could_trap_p): Match may_trap_p. (maybe_clean_eh_stmt): New. * tree-flow.h: Update decls. * tree-ssa-ccp.c (pass_ccp): Add TODO_verify_stmts. (substitute_and_fold): Clean eh edges. * tree-ssa-dce.c (mark_control_dependent_edges_necessary): Handle empty basic blocks. * tree-ssa-dom.c (need_eh_cleanup): New. (tree_ssa_dominator_optimize): Allocate it. Cleanup eh edges. (optimize_stmt): Cleanup eh stmts; set need_eh_cleanup. From-SVN: r83843
2004-06-28common.opt (ftree-fre): New flag.Diego Novillo1-7/+38
* common.opt (ftree-fre): New flag. * flags.h (flag_tree_fre): Declare. * opts.c (decode_options): Set. * timevar.def (TV_TREE_FRE): Define. * tree-flow-inline.h (may_propagate_copy): Re-arrange for readability. Handle destinations that are not SSA_NAMEs. * tree-flow.h (struct ptr_info_def): Move from tree.h (cprop_into_stmt, cprop_into_successor_phis): Remove. (vn_compute, vn_lookup_or_add, vn_add, vn_lookup): Add vuse_optype parameter. * tree-pass.h (pass_fre): Declare. * tree-ssa-copy.c (cprop_operand): Move to tree-ssa-dom.c (cprop_into_stmt): Likewise. (cprop_into_successor_phis): Likewise. * tree-ssa-dom.c (eliminate_redundant_computations): Fix argument ordering in call to may_propagate_copy. * tree-ssa-pre.c (is_undefined_value): Assume hard registers to be always defined. (add_to_sets): New local function. (create_value_expr_from): New local function. (compute_avail): Call them. (eliminate): Don't ignore statements with virtual operands. (init_pre): New local function. (fini_pre): New local function. (execute_pre): Call them. Add argument DO_FRE. Don't do insertion if DO_FRE is true. (do_pre): New function. (do_fre): New function. (gate_fre): New function. (pass_fre): Declare. * tree-ssa.c (init_tree_ssa): Don't call vn_init. (delete_tree_ssa): Don't call vn_delete. * tree-vn.c (val_expr_pair_d): Add documentation. (vn_compute): Add VUSES argument to incorporate in computing hash values. Update all callers. (expressions_equal_p): Call operand_equal_p with OEP_PURE_SAME. (vn_add): Add VUSES argument. Update all callers. (vn_lookup): Likewise. (vn_lookup_or_add): Likewise. * doc/invoke.texi: Document -ftree-fre and -fdump-tree-fre. From-SVN: r83837
2004-06-23Makefile.in (tree-vn.o): New.Diego Novillo1-8/+14
* Makefile.in (tree-vn.o): New. (tree-ssa-pre.o): Don't depend on RTL_H. * tree-dfa.c (find_referenced_vars): Don't call init_tree_ssa. * tree-flow.h (struct var_ann_d): Remove field expr_set. (add_to_value, expressions_equal_p, get_value_handle, vn_compute, vn_lookup_or_add, vn_add, vn_lookup, vn_init, vn_delete): Declare. * tree-optimize.c (execute_init_datastructures): New local function. (pass_init_datastructures): New local variable. (init_tree_optimization_passes): Sequence pass_init_datastructures. * tree-pretty-print.c (MASK_POINTER): Remove. (dump_generic_node): Handle VALUE_HANDLE. * tree-ssa-pre.c: Move all value numbering routines to tree-vn.c. Update callers to use new function names. Use VALUE_HANDLE_ID and VALUE_HANDLE_EXPR_SET instead of variable annotations. * tree-ssa.c (init_tree_ssa): Call vn_init. (delete_tree_ssa): Call vn_delete. * tree-vn.c: New file. * tree.c (tree_size): Handle VALUE_HANDLE. (tree_node_structure): Likewise. (iterative_hash_expr): Likewise. * tree.def (VALUE_HANDLE): New code. * tree.h (struct tree_value_handle): New. (VALUE_HANDLE_ID): Define. (VALUE_HANDLE_EXPR_SET): Define. (enum tree_node_structure_enum): Add TS_VALUE_HANDLE. (union tree_node): Add struct tree_value_handle. From-SVN: r83564
2004-06-19CFG transparent RTL expansion:Jan Hubicka1-1/+4
* Makefile.in (cfgexpand.o): New object file. (builtins.o): Add dependency on basic-block.h * builtins.c: Include basic-block.h (entry_of_function): New function. (expand_builtin_apply_args, expand_builtin_saveargs): Use it. * cfgexpand.c: New file. * expr.c (execute_expand, pass_expand): Kill. * pass.c (rest_of_compilation): Do not build CFG unless called from coverage code. * tree-cfg.c (delete_tree_cfg): Rename to.. (delete_tree_cfg_annotations): ... this one; Do not remove the CFG itself. * tree-flow.h (delete_tree_cfg_annotations): Declare. (dleete_tree_cfg): Kill. * tree-optimize.c (execute_rebuild_bind, pass_rebuild_bind): Kill. (execute_del_cfg): Rename to... (execute_free_datastructures): This one... (pass_del_cfg): Rename to... (pass_free_datastructures): ... this one; Do not kill PROP_cfg. (init_tree_optimization_passes): Make cfg build and profiling to happen unconditionally. * tree-mudflap.c (mf_decl_cache_locals): Skip labels before inserting the cache variables. * tree-mudflap.c: Include headers to make basic_block available. Move functions around such that related functions are near each other. Add prototypes for all static functions. Add comments briefly explaining what IR the mudflap1 and mudflap2 work on and what they do. (mudflap_function_decls): Rename to execute_mudflap_function_decls. (mudflap_function_ops): Rename to execute_mudflap_function_ops. (pass_mudflap_1, pass_mudflap_2): Update. (mf_decl_cache_locals): Make it work on the CFG instead of the saved function tree. (mf_build_check_statement_for): Make it work on the CFG. (mf_xform_derefs_1): Likewise. Cleanup code style. (mf_xform_derefs): Likewise. * tree-cfg.c (label_to_block): Invent the label destination for undefined labels. (cleanup_dead_labels): Update table in the case label_to_block added new label. From-SVN: r83385
2004-06-18tree-dfa.c (create_var_ann): tree_ann -> tree_ann_t.Daniel Berlin1-31/+7
2004-06-18 Daniel Berlin <dberlin@dberlin.org> Diego Novillo <dnovillo@redhat.com> * tree-dfa.c (create_var_ann): tree_ann -> tree_ann_t. (create_stmt_ann): Ditto. (create_tree_ann): New function. (create_cst_ann): Remove. (create_expr_ann): Ditto. * tree-flow-inline.h (cst_ann): Remove. (get_cst_ann): Ditto. (get_expr_ann): Ditto. (expr_ann): Ditto. (get_tree_ann): New function. (tree_ann): Ditto. (ann_type): tree_ann -> tree_ann_t. * tree-flow.h (tree_ann_type): CST_ANN, EXPR_ANN removed. (struct cst_ann_d): Removed. (struct expr_ann_d): Ditto. (union tree_ann_d): Removed cst and expr. (tree_ann): Renamed to tree_ann_t. * tree-ssa-ccp.c (set_rhs): tree_ann -> tree_ann_t. * tree-ssa-pre.c (get_value_handle): Rewrite for single common annotation. (set_value_handle): Ditto. (phi_translate): Ditto. * tree-tailcall.c (adjust_return_value): tree_ann -> tree_ann_t. Co-Authored-By: Diego Novillo <dnovillo@redhat.com> From-SVN: r83349
2004-06-17tree-cfg.c (tree_make_forwarder_block): Use SET_PHI_RESULT.Andrew MacLeod1-3/+3
2004-06-16 Andrew MacLeod <amacleod@redhat.com> * tree-cfg.c (tree_make_forwarder_block): Use SET_PHI_RESULT. * tree-flow-inline.h (get_use_op_ptr): Return a use_operand_p. (get_use_from_ptr, get_def_from_ptr): New. Return operand pointers. (get_def_op_ptr): Return a def_operand_p instead of a 'tree *'. (get_v_may_def_result_ptr): Return a def_operand_p. (get_v_may_def_op_ptr, get_vuse_op_ptr): Return a use_operand_p. (get_v_must_def_op_ptr): Return a def_operand_p. (get_phi_result_ptr): New. Return a pointer to the result of a PHI. (get_phi_arg_def_ptr): New. Return a pointer to an argument of a PHI. (phi_element_for_edge): Remove. * tree-flow.h (propagate_value, replace_exp): Change prototype. (propagate_tree_value): Add new prototype. (phi_element_for_edge): Remove prototype. * tree-into-ssa.c (mark_def_sites): Use new operand types. (prepare_operand_for_rename): Split into two functions. (prepare_use_operand_for_rename): Prepare use operands. (prepare_def_operand_for_rename): Prepare def operands. (rewrite_stmt): Use new operand types. (rewrite_operand): Use new operand types, change parameter type. * tree-outof-ssa.c (replace_variable): Split into two functions. (replace_use_variable): Rewrite uses. (replace_def_variable): Rewrite defs. (rewrite_trees, rewrite_vars_out_of_ssa): Use new operand types. * tree-phinodes.c (make_phi_node, resize_phi_node): Use new types. (add_phi_arg, remove_phi_arg_num): Use new operand types. * tree-ssa-ccp.c (substitute_and_fold): Use new operand types. (ccp_fold, replace_uses_in): Use new operand types. * tree-ssa-copy.c (replace_ssa_names): Rename to replace_ssa_names_ann and no longer set the value, change parameter type. (replace_exp_1): Use new operand types. (propagate_value): Change parameter type, use new operand types. (propagate_tree_value): Propagate_value without SSA operands. (replace_exp, cprop_operand, cprop_into_stmt): Use new operand types. (cprop_into_successor_phis): Use new operand types. * tree-ssa-dom.c (thread_across_edge): Use new operand types. (eliminate_redundant_computations): Use new operand types. * tree-ssa-dse.c (fix_phi_uses): Use new operand_types. (fix_stmt_v_may_defs): Use new operand_types. * tree-ssa-live.c (create_ssa_var_map): Use new operand_types. (build_tree_conflict_graph): Use new operand_types. * tree-ssa-loop.c (duplicate_blocks): Use PHI_ARG_DEF_FROM_EDGE. * tree-ssa-operands.c (struct freelist_d): Remove. (check_optype_freelist, add_optype_freelist): Remove. (allocate_def_optype, allocate_use_optype, allocate_v_may_def_optype, allocate_vuse_optype, allocate_v_must_def_optype): Call ggc_alloc. (free_uses, free_defs, free_vuses, free_v_may_defs, free_v_must_defs): Call ggc_free instead of add_optype_freelist. (init_ssa_operands, fini_ssa_operands): Remove free list code. (finalize_ssa_defs, finalize_ssa_uses): Set new use/def operands. * tree-ssa-operands.h (struct def_optype_d): Change underlying type. (struct use_optype_d): Change underlying type. (def_operand_p, use_operand_p): New types for pointers to operands. (USE_OP, DEF_OP, V_MAY_DEF_RESULT, V_MAY_DEF_OP, VUSE_OP, V_MUST_DEF_OP): Use new pointer type instead of dereferencing directly. (USE_FROM_PTR, DEF_FROM_PTR): New macros to "dereference" operand pointer types. (SET_USE, SET_DEF): New macros to set operands from their pointer. (SET_USE_OP, SET_DEF_OP, SET_V_MAY_DEF_RESULT, SET_V_MAY_DEF_OP, SET_VUSE_OP, SET_V_MUST_DEF_OP): New SET routines for operands. (PHI_RESULT_PTR, PHI_RESULT, SET_PHI_RESULT): Macros to manage the PHI result as an operand. (PHI_ARG_DEF_PTR, PHI_ARG_DEF, SET_PHI_ARG_DEF, PHI_ARG_DEF_FROM_EDGE, PHI_ARG_DEF_PTR_FROM_EDGE): Macros to manage the PHI arguments. * tree-ssa-pre.c (eliminate): Call propagate_tree_value. * tree-tailcall.c (independent_of_stmt_p, propagate_through_phis): Use PHI_ARG_DEF_FROM_EDGE. * tree.h (PHI_RESULT): Renamed to PHI_RESULT_TREE. (PHI_ARG_DEF): Renamed to PHI_ARG_DEF_TREE. From-SVN: r83298
2004-06-17re PR tree-optimization/15991 (phi nodes with identical arguments still ↵Zdenek Dvorak1-0/+2
remain at t50.tailc) PR tree-optimization/15991 * tree-cfg.c (tree_block_label): Export. * tree-flow-inline.h (bsi_after_labels): New function. * tree-flow.h (bsi_after_labels, tree_block_label): Declare. * tree-ssa.c (propagate_into_addr): New function. (replace_immediate_uses): Handle propagation of pointer constants. (raise_value): Do not restrict propagation of pointer constants. * tree-ssanames.c (duplicate_ssa_name): New function. * tree.h (duplicate_ssa_name): Declare. From-SVN: r83297
2004-06-12[multiple changes]Daniel Berlin1-1/+38
2004-06-11 Steven Bosscher <stevenb@suse.de> * tree-ssa-dce.c (mark_control_dependent_edges_necessary): Don't try to mark anything control dependent on the entry or exit blocks. 2004-06-11 Daniel Berlin <dberlin@dberlin.org> Fix Bug 15899 Fix Bug 15460 * tree.h (SSA_NAME_VALUE): New macro. (struct tree_ssa_name): Add value_handle member. * tree-ssa-pre.c: Replaced. * tree-flow.h (tree_ann_type): Add CST_ANN, EXPR_ANN. (struct cst_ann_d): New. (struct expr_ann_d): New. (union tree_ann_d): Add cst_ann, expr_ann. * tree-dfa.c (create_cst_ann): New function. (create_expr_ann): Ditto. * tree-flow-inline.h (cst_ann): New function. (expr_ann): Ditto. (get_cst_ann): Ditto. (get_expr_ann): Ditto.. From-SVN: r83010
2004-06-10Makefile.in (tree-ssanames.o): Depend on TREE_FLOW_H.Diego Novillo1-2/+6
* Makefile.in (tree-ssanames.o): Depend on TREE_FLOW_H. * tree-flow.h (ssa_names, num_ssa_names, ssa_name): Declare. (highest_ssa_version): Remove. * tree-outof-ssa.c (new_temp_expr_table): Replace highest_ssa_version with num_ssa_names. (dump_replaceable_exprs): Likewise. (rewrite_vars_out_of_ssa): Likewise. * tree-ssa-ccp.c (initialize): Likewise * tree-ssa-copyrename.c (rename_ssa_copies): Likewise. * tree-ssa-dce.c (tree_dce_init): Likewise. * tree-ssa-dom.c (tree_ssa_dominator_optimize): Likewise. * tree-ssa-live.c (create_ssa_var_map): Likewise. (dump_var_map): Likewise. * tree-ssa.c (verify_ssa): Likewise. (kill_redundant_phi_nodes): Likewise. Do not build a local array of SSA_NAMEs. Use the ssa_names table. * tree-ssanames.c: Include tree-flow.h (ssa_names): New varray. (init_ssa_names): Initialize ssa_names. Reserve the first slot of the ssa_names table. (make_ssa_name): Push the newly created SSA_NAME into ssa_names. Assign version numbers using num_ssa_names. From-SVN: r82950
2004-06-10tree-ssa.texi: Remove references to VDEF and add descriptions of V_MAY_DEF ↵Brian Booth1-3/+4
and V_MUST_DEF. * doc/tree-ssa.texi: Remove references to VDEF and add descriptions of V_MAY_DEF and V_MUST_DEF. * tree-dfa.c (dfa_stats_d): Add num_v_must_defs and rename num_vdefs to num_v_may_defs. (compute_immediate_uses_for_stmt): Rename occurences of vdef to v_may_def. (redirect_immediate_uses): Ditto. (dump_dfa_stats): Ditto. Also added code to dump num_v_must_defs. (collect_dfa_stats_r): Rename occurences of vdef to v_may_def. Also add code to sum up the number of v_must_defs. (vdefs_disappeared_p): Replace with... (v_may_defs_disappeared_p): This. (v_must_defs_disappeared_p): New function. (mark_new_vars_to_rename): Rename occurences of vdef to v_may_def. Also add code to mark new variables found in V_MUST_DEFs for renameing. * tree-flow.h (stmt_ann_d): Add v_must_def_ops and replace vdef_ops to v_may_def_ops. (get_vdef_ops): Replace with... (get_v_may_def_ops): This. * tree-flow-inline.h (get_vdef_ops): Replace with... (get_v_may_def_ops): This. (get_v_must_def_ops): New function. (get_vdef_result_ptr): Replace with... (get_v_may_def_result_ptr): This. (get_vdef_op_ptr): Ditto with... (get_v_may_def_op_ptr); This. (get_v_must_def_op_ptr): New function. * tree-into-ssa.c (mark_def_sites): Rename occurences of vdef to v_may_def. Also add code to mark statements with V_MUST_DEFs as definition sites. (rewrite_stmt): Rename occurences of vdef to v_may_def. Also add code to register new V_MUST_DEFs made by the statement. * tree-outof-ssa.c (VIRTUAL_PARTITION): Update comments. (check_replaceable): Rename occurences of vdef to v_may_def. Also add check for V_MUST_DEFs. (find_replaceable_in_bb): Ditto. * tree-pretty-print.c (dump_vops): Rename occurences of vdef to v_may_def. Also add code to dump V_MUST_DEFs. * tree-sra.c (mark_all_vdefs): Replace with... (mark_all_v_may_defs): This. (mark_all_v_must_defs): New function. (create_scalar_copies): Replace call to mark_all_vdefs with calls to mark_all_v_may_defs and mark_all_v_must_defs. (scalarize_structures): Rename occurences of vdef to v_may_def. Also add a check for V_MUST_DEFs. (scalarize_modify_expr): Rename occurences of vdef to v_may_def. * tree-ssa-alias.c (global_var): Update comment. (compute_may_aliases): Ditto. (compute_points_to_and_addr_escape): Rename occurences of vdef to v_may_def. Also add code to mark variables in V_MUST_DEF operands as being written to. (group_aliases): Update comment. (maybe_create_global_var): Ditto. * tree-ssa.c (verify_ssa): Rename occurences of vdef to v_may_def. Also add a check for V_MUST_DEFs on GIMPLE registers. (replace_immediate_uses): Rename occurences of vdef to v_may_def. * tree-ssa-ccp.c (visit_stmt): Rename occurences of vdef to v_may_def. Also add code to mark all V_MUST_DEF operands VARYING. (initialize): Ditto. (set_rhs): Rename occurences of vdef to v_may_def. Also add code to update SSA_NAMEs in V_MUST_DEFs. * tree-ssa-copy.c (cprop_into_stmt): Rename occurences of vdef to v_may_def. * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Rename occurences of vdef to v_may_def. Also add code to mark statements with V_MUST_DEFs as necessary. (propagate_necessity): Rename occurences of vdef to v_may_def. * tree-ssa-dom.c (redirect_edges_and_update_ssa_graph): Rename occurences of vdef to v_may_def. Also add code to mark operands in V_MUST_DEFs for renaming. (eliminate_redundant_computations): Rename occurences of vdef to v_may_def. (record_equivalences_from_stmt): Rename occurences of vdef to v_may_def. Also add code to record VUSEs for V_MUST_DEFs. (optimize_stmt): Remove unnesessary variable vdefs. Update comment. (register_definitions_for_stmt): Rename occurences of vdef to v_may_def. Also add code to register definitions made with V_MUST_DEFs. * tree-ssa-dse.c (fix_stmt_vdefs): Replace with... (fix_stmt_v_may_defs): This. (fix_phi_uses): Rename occurences of vdef to v_may_def. (dse_optimize_stmt): Ditto. * tree-ssa-live.c (create_ssa_var_map): Rename occurences of vdef to v_may_def. Also add code to mark V_MUST_DEF operands as being used in virtual operators. * tree-ssa-loop.c (mark_defs_for_rewrite): Rename occurences of vdef to v_may_def. Also add code to mark V_MUST_DEF operands for renaming. * tree-ssa-operands.c (opf_kill_def): New flag for killing definitions. (build_vdefs): Renamed to... (build_v_may_defs): This. (build_v_must_defs): New variable. (voperands_d): Add v_must_def_ops and replace vdef_ops with v_may_def_ops. (append_vdef): Replace with... (append_v_may_def): This. (append_v_must_def): New function. (NUM_FREE): Increment for V_MUST_DEF (optype_freelist): Increment its size for V_MUST_DEF (allocate_vdef_optype): Replace with... (allocate_v_may_def_optype): This. (allocate_v_must_def_optype): New function. (free_vdefs): Replace with... (free_v_may_defs): This. (free_v_must_defs): New function. (remove_vdefs): Replace with... (remove_v_may_defs): This. (remove_v_must_defs): New function. (init_ssa_operands): Rename occurences of vdef to v_may_def. Also add code to initialize build_v_must_defs. (finalize_ssa_vdefs): Replace with... (finalize_ssa_v_may_defs): This. (finalize_ssa_vuses): Rename occurences of vdef to v_may_def. (finalize_ssa_v_must_defs): New function. (finalize_ssa_stmt_operands): Replace call to finalize_ssa_vdefs with calls to finalize_ssa_v_may_defs and finalize_ssa_v_must_defs. (verify_start_operands): Rename occurences of vdef to v_may_def. Also add check for build_v_must_defs. (get_stmt_operands): Rename occurences of vdef to v_may_def. Also add code to handle V_MUST_DEFs and to use opf_kill_def for killing definitions. (get_expr_operands): Update comment and use opf_kill_def for killing definitions. (add_stmt_operand): Replace code that appends VDEFs with code that appends V_MUST_DEFs when opf_kill_def is set and V_MAY_DEFs otherwise. (add_call_clobber_ops): Update comments. * tree-ssa-operands.h (vdef_optype_d): Replace with... (v_may_def_optype_d): This. (v_must_def_optype_d): New structure. (VDEF_OPS): Replace with... (V_MAY_DEF_OPS): This. (STMT_VDEF_OPS): Same with... (STMT_V_MAY_DEF_OPS): This. (NUM_VDEFS): And... (NUM_V_MAY_DEFS): This. (VDEF_RESULT_PTR): As well as... (V_MAY_DEF_RESULT_PTR): This. (VDEF_RESULT): Same goes for... (V_MAY_DEF_RESULT): This. (VDEF_OP_PTR): And... (V_MAY_DEF_OP_PTR): This. (VDEF_OP): And... (V_MAY_DEF_OP): This. (V_MUST_DEF_OPS): New macro. (STMT_V_MUST_DEF_OPS): Ditto. (NUM_V_MUST_DEFS): Ditto. (V_MUST_DEF_OP_PTR): Ditto. (V_MUST_DEF_OP): Ditto. (remove_vdefs): Replace signature with... (remove_v_may_defs): This. (remove_v_must_defs): New function signature. * tree-ssa-pre.c (subst_phis): Replace call to remove_vdefs with calls to remove_v_may_defs and remove_v_must_defs. (process_left_occs_and_kills): Rename occurences of vdef to v_may_def. Also add code that marks left occurences of operands in V_MUST_DEFs. * tree-tailcall.c (find_tail_calls): Rename occurences of vdef to v_may_def. Also add check for V_MUST_DEFs. (eliminate_tail_call):Rename occurences of vdef to v_may_def. testsuite: * gcc.dg/tree-ssa/20031015-1.c: Scan for V_MAY_DEF instead of VDEF. * gcc.dg/tree-ssa/20040517-1.c: Ditto. From-SVN: r82947
2004-06-09Move SSA_NAME annotations into tree_ssa_name.Diego Novillo1-31/+1
* tree-dfa.c (create_ssa_name_ann): Remove. * tree-flow-inline.h (ssa_name_ann, get_ssa_name_ann): Remove. * tree-flow.h (enum tree_ann_type): Remove SSA_NAME_ANN. (struct ssa_name_ann_d): Remove. (union tree_ann_d): Update. (ssa_name_ann_t): Remove. * tree-ssa-alias.c: (get_ptr_info): New local function. Replace references to ssa_name_ann_t with struct ptr_info_def. * tree-ssa-operands.c (get_expr_operands): Likewise. * tree.h (SSA_NAME_PTR_INFO): Define. (struct ptr_info_def): Declare. (struct tree_ssa_name): Add field 'ptr_info'. From-SVN: r82864
2004-05-17toplev.h (flag_delete_null_pointer_checks): Move from here to...Jeff Law1-1/+1
* toplev.h (flag_delete_null_pointer_checks): Move from here to... * flags.h (flag_delete_null_pointer_checks): Here. * tree-flow.h (cprop_into_successor_phis): Add argument to prototype. * tree-phinodes.c (resize_phi_node): Initialize PHI_ARG_NONZERO. (add_phi_arg, remove_phi_arg_num): Similarly. * tree-ssa-copy.c (cprop_into_successor_phis): Propagate nonzero property into PHI nodes. * tree-ssa-dom.c: Remove redundant inclusion of flags.h. (record_equivalences_from_phis): If all PHI arguments are known to be nonzero, then the result must be nonzero as well. (cprop_into_phis): Pass nonzero_vars bitmap to cprop_into_successor_phis (record_equivalences_from_stmt): Check flag_delete_null_pointer_checks appropriately. Walk the USE-DEF chains and propagate nonzero property as appropriate. * tree.h (PHI_ARG_NONZERO): Define. (phi_arg_d): Add nonzero flag. From-SVN: r81968
2004-05-14re PR tree-optimization/14466 (missed PHI optimization (different types))Andrew Pinski1-0/+1
2004-05-14 Andrew Pinski <pinskia@physics.uc.edu> PR optimization/14466 * tree-complex.c (make_temp): Remove. (gimplify_val): Replace make_temp with make_rename_temp and add NULL as the second argument. (expand_complex_div_wide): Likewise. * tree-dfa.c (make_rename_temp): New function. * tree-flow.h (make_rename_temp): Declare. * tree-sra.c (make_temp): Remove. (lookup_scalar): Replace make_temp with make_rename_temp. (create_scalar_copies): Likewise. * tree-ssa-phiopt.c (conditional_replacement): When we get non gimple create a temporary variable to hold the casted expression. 2004-05-14 Andrew Pinski <pinskia@physics.uc.edu> PR optimization/14466 * gcc.dg/tree-ssa/20040514-1.c: New test. From-SVN: r81847
2004-05-13tree-gimple.c: Rename from tree-simple.c.Diego Novillo1-1/+1
* tree-gimple.c: Rename from tree-simple.c. * tree-gimple.h: Rename from tree-simple.h. * c-gimplify.c: Rename from c-simplify.c * Makefile.in, c-decl.c, gimple-low.c, gimplify.c, langhooks.c, tree-alias-ander.c, tree-alias-common.c, tree-complex.c, tree-dfa.c, tree-flow.h, tree-inline.c, tree-into-ssa.c, tree-iterator.c, tree-mudflap.c, tree-nested.c, tree-nomudflap.c, tree-outof-ssa.c, tree-sra.c, tree-ssa-alias.c, tree-ssa-ccp.c, tree-ssa-copyrename.c, tree-ssa-dce.c, tree-ssa-live.c, tree-ssa-pre.c, tree-ssa.c: Update. cp/ChangeLog * cp-gimplify.c: Rename from cp-simplify.c. * Make-lang.in, optimize.c: Update. fortran/ChangeLog * Make-lang.in, f95-lang.c, trans-array.c, trans-decl.c, trans-expr.c, trans-intrinsic.c, trans-io.c, trans-stmt.c, trans.c: Rename tree-simple.[ch] to tree-gimple.[ch]. java/ChangeLog * Make-lang.in, expr.c, java-gimplify.c: Rename tree-simple.[ch] to tree-gimple.[ch]. From-SVN: r81829
2004-05-13Merge tree-ssa-20020619-branch into mainline.Diego Novillo1-0/+596
From-SVN: r81764