aboutsummaryrefslogtreecommitdiff
path: root/gcc/cfgexpand.c
AgeCommit message (Collapse)AuthorFilesLines
2004-09-23* cfgexpand.c, config/s390/tpf-eh.c: Fix comment typos.Kazu Hirata1-2/+2
From-SVN: r87939
2004-09-23cfgexpand.c (add_reg_br_prob_note): New function.Jan Hubicka1-3/+47
* cfgexpand.c (add_reg_br_prob_note): New function. (expand_gimple_cond_expr): Use it. (tree_expand_cfg): No longer kill the profile. * cfgrt.c (rtl_verify_flow_info_1): Check profile consistency only if it is present. * passes.c (rest_of_handle_loop_optimize): Kill the profile. * predict.c (combine_predictions_for_insn): Set the probabilities based on REG_BR_PROB note if present. * predict.c (branch_prob): Profile is read only with flag_branch_probabilities. From-SVN: r87910
2004-09-17re PR rtl-optimization/17513 (ICE: verify_flow_info failed after gcse)Steven Bosscher1-4/+14
PR tree-optimization/17513 * cfgexpand.c (construct_init_block): Clear EDGE_EXECUTABLE for successors of the entry block. * gcc.dg/20040916-1.c: New test. From-SVN: r87632
2004-09-11re PR middle-end/17416 (stack variable merging doesn't work)Richard Henderson1-6/+2
PR middle-end/17416 * cfgexpand.c (expand_used_vars_for_block): Fix off-by-one bug in conflict loop. From-SVN: r87366
2004-09-07cfganal.c (flow_depth_first_order_compute, [...]): Use gcc_assert or ↵Nathan Sidwell1-4/+3
gcc_unreachable. * cfganal.c (flow_depth_first_order_compute, dfs_enumerate_from, cfgbuild.c, inside_basic_block_p, control_flow_insn_p, make_label_edge, make_edges, find_basic_blocks_1): Use gcc_assert or gcc_unreachable. * cfg.c (clear_edges, initialize_bb_rbi, compact_blocks, remove_edge, alloc_aux_for_blocks, free_aux_for_blocks, alloc_aux_for_edges, free_aux_for_edges): Likewise. * cfgcleanup.c (try_forward_edges, merge_blocks_move_predecessor_nojumps, merge_blocks_move_successor_nojumps): Likewise. * cfgexpand.c (expand_gimple_cond_expr, expand_gimple_tailcall): Likewise. * cfghooks.c (duplicate_block): Likewise. * cfglayout.c (record_effective_endpoints, insn_locators_initialize, change_scope, fixup_reorder_chain, verify_insn_chain, fixup_fallthru_exit_predecessor, duplicate_insn_chain, cfg_layout_finalize): Likewise. * cfgloopanal.c (check_irred): Likewise. * cfgloop.c (superloop_at_depth, flow_loops_free, flow_loop_entry_edges_find, flow_loops_find, flow_loop_outside_edge_p, get_loop_body, get_loop_body_in_dom_order, get_loop_body_in_bfs_order, get_loop_exit_edges, num_loop_branches, cancel_loop, verify_loop_structure): Likewise. cfgloopmanip.c (find_path, remove_path, loop_delete_branch_edge, duplicate_loop_to_header_edge, create_preheader, create_loop_notes): Likewise. * cfgrtl.c (delete_insn, try_redirect_by_replacing_jump, edirect_branch_edge, force_nonfallthru_and_redirect, rtl_split_edge, insert_insn_on_edge, commit_one_edge_insertion, commit_edge_insertions, commit_edge_insertions_watch_calls, purge_dead_edges, cfg_layout_redirect_edge_and_branch, cfg_layout_redirect_edge_and_branch_force, cfg_layout_merge_blocks, rtl_flow_call_edges_add): Likewise. * cgraph.c (cgraph_node, cgraph_create_edge, cgraph_remove_edge, cgraph_redirect_edge_callee, cgraph_global_info, cgraph_rtl_info, cgraph_varpool_node): Likewise. * cgraphunit.c (cgraph_finalize_function, cgraph_finalize_compilation_unit, cgraph_mark_functions_to_output, cgraph_expand_function, cgraph_remove_unreachable_nodes, cgraph_clone_inlined_nodes, cgraph_mark_inline_edge, cgraph_mark_inline, cgraph_expand_all_functions, cgraph_build_static_cdtor): Likewise. * combine.c (do_SUBST, try_combine, subst, combine_simplify_rtx, simplify_logical, distribute_notes, insn_cuid): Likewise. * conflict.c (conflict_graph_add, print_conflict): Likewise. * coverage.c (rtl_coverage_counter_ref, tree_coverage_counter_ref, coverage_checksum_string): Likewise. * cse.c (make_new_qty, make_regs_eqv, insert, invalidate, hash_rtx, exp_equiv_p, cse_basic_block, count_reg_usage, cse_cc_succs, cse_condition_code_reg): Likewise. * cselib.c (entry_and_rtx_equal_p, remove_useless_values, rtx_equal_for_cselib_p, wrap_constant, cselib_hash_rtx, new_cselib_val, cselib_subst_to_values, cselib_invalidate_regno, cselib_record_set): Likewise. From-SVN: r87145
2004-09-06Unify the management of RTL and tree-level dump files.Paolo Bonzini1-11/+13
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 typos.Kazu Hirata1-1/+1
* c-common.c, cfgexpand.c, cgraphunit.c, defaults.h, et-forest.c, expr.c, gimplify.c, global.c, gthr-lynx.h, hard-reg-set.h, modulo-sched.c, optabs.c, postreload-gcse.c, tree-data-ref.c, tree-flow.h, tree-if-conv.c, tree-inline.c, tree-sra.c, tree-ssa-loop-im.c, tree-ssa-loop-ivopts.c, tree-ssa-loop-niter.c, tree-ssa-operands.c, tree-ssa-operands.h, tree-ssa-propagate.c, tree-ssa-propagate.h, tree-ssa-threadupdate.c, value-prof.c, vec.c, vec.h: Fix comment typos. Follow spelling conventions. From-SVN: r87104
2004-09-03re PR middle-end/9997 (Coelesce stack slots for disjoint scopes.)Richard Henderson1-5/+746
PR middle-end/9997 * cfgexpand.c (LOCAL_ALIGNMENT): Provide default. (STACK_ALIGNMENT_NEEDED, FRAME_GROWS_DOWNWARD): Likewise. (struct stack_var, EOC, stack_vars, stack_vars_alloc, stack_vars_num, stack_vars_sorted, stack_vars_conflict, stack_vars_conflict_alloc, frame_phase, get_decl_align_unit, add_stack_var, triangular_index, resize_stack_vars_conflict, add_stack_var_conflict, stack_var_conflict_p, add_alias_set_conflicts, stack_var_size_cmp, union_stack_vars, partition_stack_vars, dump_stack_var_partition, expand_one_stack_var_at, expand_stack_vars, expand_one_stack_var, expand_one_static_var, expand_one_hard_reg_var, expand_one_register_var, expand_one_error_var, defer_stack_allocation, expand_one_var, expand_used_vars_for_block, clear_tree_used): New. (expand_used_vars): Rewrite. * Makefile.in (cfgexpand.o): Update dependencies. From-SVN: r87064
2004-08-22re PR middle-end/17075 (miscompilation with tail calls in cfgexpand)Richard Henderson1-9/+31
PR 17075 * cfgexpand.c (expand_gimple_tailcall): Detect when we can both create new blocks and fall through. (expand_gimple_basic_block): Update to match. From-SVN: r86389
2004-08-04basic-block.h (profile_staus): New global variable.Jan Hubicka1-0/+2
* basic-block.h (profile_staus): New global variable. * cfg.c (profile_status): Declare. (check_bb_profile): Break out from ....; use profile_status (dump_flow_info): ... here. * cfgbuild.c (find_basic_blocks): Set profile_status. * cfgexpand.c (tree_expand_cfg): Likewise. * predict.c (estimate_probability): Likewise. * profile.c (branch_prob): Likewise. * tree-cfg.c (build_tree_cfg): Likewise. (dump_function_to_file): Use check_bb_profile. * tree-pretty-print (dump_bb_header): Likewise. * tree-profile.c (do_tree_profiling): Cleanup. From-SVN: r85579
2004-07-29rtl.c (currently_expanding_to_rtl): New.Steven Bosscher1-0/+6
* rtl.c (currently_expanding_to_rtl): New. * rtl.h (currently_expanding_to_rtl): Export it. * cfgexpand.c (tree_cfg_expand): Set/clear it at entry/exit. * config/alpha/alpha.c (alpha_expand_mov): Remove old RTL inliner hack. * config/sh/sh.c: Replace rtx_equal_function_value_matters with currently_expanding_to_rtl. * config/sh/sh.md: Likewise. * config/ia64/ia64.c (got_symbolic_operand): Likewise. From-SVN: r85287
2004-07-27cfgexpand.c (tree_expand_cfg): Fix comment.Steven Bosscher1-1/+1
* cfgexpand.c (tree_expand_cfg): Fix comment. * calls.c (expand_call): Ignore rtx_equal_function_value_matters. * function.c (purge_single_hard_subreg_set, purge_hard_subreg_sets): Remove. (prepare_function_start): Don't set rtx_equal_function_value_matters. * integrate.c (copy_rtx_and_substitute): Don't test for it. * passes.c (rest_of_compilation): Don't call purge_hard_subreg_sets. Don't set rtx_equal_function_value_matters. Don't register RTL hooks here again. Update leading comment. * rtl.c (rtx_equal_function_value_matters): Remove. (rtx_equal_p): Don't test for it. * simplify-rtx.c (simplify_binary_operation, simplify_subreg): Likewise. * rtl.h (enum insn_note): Remove NOTE_INSN_LOOP_END_TOP_COND. * rtl.c (note_insn_name): Likewise. * emit-rtl.c (remove_unnecessary_notes): Don't handle it. * final.c (final_scan_insn): Likewise. * except.c (finish_eh_generation): Don't call cfg_cleanup from here. * passes.c (rest_of_handle_eh): Do it here. * stmt.c (struct nesting): Remove struct nesting block member. (struct stmt_status): Remove x_block_start_count field. (current_block_start_count): Remove. From-SVN: r85228
2004-07-21gimple-low.c (expand_var_p): Don't look at TREE_ADDRESSABLE...Richard Henderson1-4/+17
* 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-21cfgexpand.c (expand_gimple_tailcall): Fix case where we need to create a new ↵Richard Henderson1-55/+73
basic block. * cfgexpand.c (expand_gimple_tailcall): Fix case where we need to create a new basic block. From-SVN: r85029
2004-07-21builtins.c (expand_builtin_setjmp_receiver): Fix comment for code removal.Eric Christopher1-7/+3
2004-07-21 Eric Christopher <echristo@redhat.com> * builtins.c (expand_builtin_setjmp_receiver): Fix comment for code removal. * c-decl.c (pop_scope): Ditto. * calls.c (expand_call): Remove call to current_nesting_level, update comment accordingly. Remove calls to expand_start_target_temps and expand_end_target_temps. * cfgexpand.c (construct_init_block): Remove call to expand_start_bindings_and_block. (construct_exit_block): Remove call to expand_end_bindings. * expr.c (safe_from_p): Remove BIND_EXPR handling. (expand_expr_real_1): Ditto. Fix formatting. (expand_vars): Delete. * stmt.c (POPSTACK): Remove block_stack. (stmt_status): Remove x_block_stack. (block_stack): Delete. (expand_start_bindings_and_block): Ditto. (expand_start_target_temps): Ditto. (expand_end_target_temps): Ditto. (current_nesting_level): Ditto. (warn_about_unused_variables): Ditto. (expand_end_bindings): Ditto. * tree.h: Remove declarations for above. 2004-07-21 Eric Christopher <echristo@redhat.com> * decl.c (poplevel): Inline unused variable checking. Change formatting. From-SVN: r85019
2004-07-20cfgexpand.c (expand_gimple_cond_expr, [...]): Split,Richard Henderson1-147/+166
* cfgexpand.c (expand_gimple_cond_expr, expand_gimple_tailcall): Split, (expand_gimple_basic_block): out from here. Renamed from expand_block. From-SVN: r84993
2004-07-09alias.c (nonlocal_mentioned_p, [...]): Use, LABEL_P, JUMP_P, CALL_P, ↵Jerry Quinn1-8/+8
NONJUMP_INSN_P, INSN_P, NOTE_P, BARRIER_P. 2004-07-08 Jerry Quinn <jlquinn@optonline.net> * alias.c (nonlocal_mentioned_p, nonlocal_referenced_p, nonlocal_set_p, init_alias_analysis): Use, LABEL_P, JUMP_P, CALL_P, NONJUMP_INSN_P, INSN_P, NOTE_P, BARRIER_P. * bb-reorder.c (mark_bb_for_unlikely_executed_section, add_labels_and_missing_jumps, find_jump_block, fix_crossing_unconditional_branches, add_reg_crossing_jump_notes): Likewise. * bt-load.c (btr_referenced_p, compute_defs_uses_and_gen, link_btr_uses, move_btr_def): Likewise. * builtins.c (expand_builtin_longjmp, expand_builtin_nonlocal_goto, expand_builtin_expect_jump): Likewise. * caller-save.c (save_call_clobbered_regs, insert_one_insn): Likewise. * calls.c (expand_call, emit_library_call_value_1): Likewise. * cfganal.c (forwarder_block_p): Likewise. * cfgbuild.c (inside_basic_block_p, count_basic_blocks, make_label_edge, rtl_make_eh_edge, make_edges, find_basic_blocks_1, find_bb_boundaries): Likewise. * cfgcleanup.c (try_simplify_condjump, try_forward_edges, merge_blocks_move_predecessor_nojumps, merge_blocks_move_successor_nojumps, insns_match_p, flow_find_cross_jump, outgoing_edges_match, try_crossjump_to_edge, try_optimize_cfg): Likewise. * cfgexpand.c (expand_block, construct_exit_block): Likewise. * cfglayout.c (skip_insns_after_block, label_for_bb, record_effective_endpoints, insn_locators_initialize, fixup_reorder_chain, update_unlikely_executed_notes): Likewise. * cfgmainloop.c (create_loop_notes): Likewise. * cfgrtl.c (delete_insn, delete_insn_chain, create_basic_block_structure, rtl_delete_block, free_bb_for_insn, update_bb_for_insn, rtl_merge_blocks, rtl_can_merge_blocks, block_label, try_redirect_by_replacing_jump, last_loop_beg_note, redirect_branch_edge, force_nonfallthru_and_redirect, rtl_tidy_fallthru_edge, back_edge_of_syntactic_loop_p, rtl_split_edge, commit_one_edge_insertion, print_rtl_with_bb, update_br_prob_note, rtl_verify_flow_info_1, rtl_verify_flow_info, purge_dead_edges, cfg_layout_redirect_edge_and_branch, cfg_layout_delete_block, cfg_layout_can_merge_blocks_p, cfg_layout_merge_blocks, rtl_block_ends_with_call_p, need_fake_edge_p, rtl_flow_call_edges_add): Likewise. * combine.c (combine_instructions, can_combine_p, try_combine, find_split_point, record_dead_and_set_regs, reg_dead_at_p, distribute_notes, distribute_links, insn_cuid): Likewise. * cse.c (fold_rtx, cse_insn, cse_around_loop, invalidate_skipped_block, cse_set_around_loop, cse_end_of_basic_block, cse_main, cse_basic_block, cse_condition_code_reg): Likewise. * cselib.c (cselib_process_insn): Likewise. * ddg.c (create_ddg): Likewise. * df.c (df_insn_refs_record, df_bb_rd_local_compute, df_insns_modify): Likewise. * dwarf2out.c (dwarf2out_stack_adjust, dwarf2out_frame_debug, gen_label_die, dwarf2out_var_location): Likewise. * emit-rtl.c (get_first_nonnote_insn, get_last_nonnote_insn, next_insn, previous_insn, next_nonnote_insn, prev_nonnote_insn, last_call_insn, active_insn_p, next_label, prev_label, link_cc0_insns, next_cc0_user, try_split, add_insn_after, add_insn_before, remove_insn, add_function_usage_to, reorder_insns, find_line_note, remove_unnecessary_notes, emit_insn_after_1, classify_insn): Likewise. * except.c (convert_from_eh_region_ranges_1, emit_to_new_bb_before, connect_post_landing_pads, sjlj_mark_call_sites, sjlj_emit_function_enter, sjlj_emit_function_exit, reachable_handlers, can_throw_internal, can_throw_external, set_nothrow_function_flags, convert_to_eh_region_ranges): Likewise. * explow.c (optimize_save_area_alloca): Likewise. * expr.c (expand_expr_real): Likewise. * final.c (insn_current_reference_address, compute_alignments, shorten_branches, final, scan_ahead_for_unlikely_executed_note, final_scan_insn, output_asm_label, leaf_function_p): Likewise. * flow.c (first_insn_after_basic_block_note, delete_dead_jumptables, propagate_block_delete_insn, propagate_one_insn, init_propagate_block_info, propagate_block, libcall_dead_p, mark_set_1, attempt_auto_inc, find_auto_inc, try_pre_increment): Likewise. * function.c (instantiate_virtual_regs, reorder_blocks_1, expand_function_start, expand_function_end, contains, thread_prologue_and_epilogue_insns, reposition_prologue_and_epilogue_notes): Likewise. * gcse.c (constprop_register, bypass_conditional_jumps, insert_insn_end_bb, gcse_after_reload): Likewise. * genemit.c (gen_expand, gen_split): Likewise. * genpeep.c (gen_peephole, main): Likewise. * global.c (build_insn_chain): Likewise. * graph.c (node_data, print_rtl_graph_with_bb): Likewise. * haifa-sched.c (unlink_other_notes, unlink_line_notes, get_block_head_tail, no_real_insns_p, rm_line_notes, save_line_notes, restore_line_notes, rm_redundant_line_notes, rm_other_notes, ok_for_early_queue_removal, set_priorities, sched_init): Likewise. * ifcvt.c (count_bb_insns, first_active_insn, last_active_insn, cond_exec_process_insns, end_ifcvt_sequence, noce_process_if_block, merge_if_block, block_jumps_and_fallthru_p, find_if_block, dead_or_predicable): Likewise. * integrate.c (try_constants): Likewise. * jump.c (rebuild_jump_labels, cleanup_barriers, purge_line_number_notes, init_label_info, mark_all_labels, squeeze_notes, get_label_before, get_label_after, reversed_comparison_code_parts, simplejump_p, pc_set, returnjump_p, onlyjump_p, follow_jumps, mark_jump_label, delete_barrier, delete_prior_computation, delete_computation, delete_related_insns, delete_for_peephole, redirect_jump): Likewise. * lcm.c (optimize_mode_switching): Likewise. * local-alloc.c (validate_equiv_mem, update_equiv_regs, block_alloc): Likewise. * loop-doloop.c (doloop_valid_p, doloop_optimize): Likewise. * loop-invariant.c (find_exits, find_invariants_bb): Likewise. * loop-iv.c (simplify_using_assignment): Likewise. * loop.c (compute_luids, loop_optimize, scan_loop, libcall_other_reg, libcall_benefit, skip_consec_insns, move_movables, prescan_loop, find_and_verify_loops, labels_in_range_p, for_each_insn_in_loop, loop_bivs_init_find, strength_reduce, check_insn_for_bivs, check_insn_for_givs, check_final_value, update_giv_derive, basic_induction_var, product_cheap_p, check_dbra_loop, loop_insn_first_p, last_use_this_basic_block, canonicalize_condition, get_condition, loop_regs_scan, load_mems, try_copy_prop, LOOP_BLOCK_NUM, loop_dump_aux): Likewise. * modulo-sched.c (doloop_register_get, find_line_note, sms_schedule, sms_schedule_by_order): Likewise. * optabs.c (emit_no_conflict_block, emit_libcall_block): Likewise. * postreload.c (reload_cse_simplify_operands, reload_combine, reload_cse_move2add): Likewise. * predict.c (can_predict_insn_p, estimate_probability, expected_value_to_br_prob, process_note_predictions): Likewise. * print-rtl.c (print_rtx, print_rtl, print_rtl_single): Likewise. * profile.c (branch_prob): Likewise. * ra-build.c (live_out_1, livethrough_conflicts_bb, detect_webs_set_in_cond_jump): Likewise. * ra-debug.c (ra_print_rtx_object, ra_debug_insns, ra_print_rtl_with_bb): Likewise. * ra-rewrite.c (insert_stores, rewrite_program2): Likewise. * recog.c (next_insn_tests_no_inequality, find_single_use, split_all_insns, peephole2_optimize, if_test_bypass_p): Likewise. * reg-stack.c (next_flags_user, record_label_references, emit_swap_insn, swap_rtx_condition, subst_stack_regs, compensate_edge, convert_regs_1): Likewise. * regclass.c (scan_one_insn): Likewise. * regmove.c (optimize_reg_copy_1, optimize_reg_copy_2, fixup_match_2, regmove_optimize, fixup_match_1, single_set_for_csa, combine_stack_adjustments_for_block): Likewise. * regrename.c (build_def_use, copyprop_hardreg_forward_1): Likewise. * reload.c (find_reloads, find_reloads_address_1, subst_reloads, find_equiv_reg): Likewise. * reload1.c (reload, calculate_needs_all_insns, set_label_offsets, reload_as_needed, emit_input_reload_insns, do_output_reload, delete_output_reload, delete_address_reloads_1, fixup_abnormal_edges): Likewise. * reorg.c (find_end_label, emit_delay_sequence, delete_from_delay_slot, delete_scheduled_jump, optimize_skip, get_jump_flags, rare_destination, mostly_true_jump, try_merge_delay_insns, redundant_insn, own_thread_p, fill_simple_delay_slots, fill_slots_from_thread, fill_eager_delay_slots, relax_delay_slots, make_return_insns, dbr_schedule): Likewise. * resource.c (find_basic_block, next_insn_no_annul, find_dead_or_set_registers, mark_target_live_regs): Likewise. * rtl.h (RTX_PREV): Likewise. * rtlanal.c (global_reg_mentioned_p, no_labels_between_p, no_jumps_between_p, reg_used_between_p, reg_referenced_between_p, reg_set_p, find_last_value, dead_or_set_regno_p, find_reg_fusage, find_regno_fusage, pure_call_p, replace_label, rtx_referenced_p_1, tablejump_p, computed_jump_p, insns_safe_to_move_p, find_first_parameter_load, can_hoist_insn_p): Likewise. * sched-deps.c (get_condition, add_dependence, sched_analyze_2, sched_analyze_insn, sched_analyze, add_forward_dependence): Likewise. * sched-ebb.c (fix_basic_block_boundaries, add_deps_for_risky_insns, schedule_ebbs): Likewise. * sched-rgn.c (is_cfg_nonregular, find_conditional_protection, is_conditionally_protected, can_schedule_ready_p, add_branch_dependences, debug_dependencies): Likewise. * stmt.c (emit_nop, expand_start_case, emit_jump_if_reachable): Likewise. * unroll.c (unroll_loop, copy_loop_body, back_branch_in_range_p, reg_dead_after_loop, loop_find_equiv_value, loop_iterations, set_dominates_use, ujump_to_loop_cont): Likewise. * var-tracking.c (prologue_stack_adjust, vt_initialize): Likewise. * varasm.c (output_constant_pool_1): Likewise. From-SVN: r84341
2004-07-02c-decl.c (grokdeclarator): Don't frob current_function_decl around ↵Richard Henderson1-29/+0
variable_size. * c-decl.c (grokdeclarator): Don't frob current_function_decl around variable_size. (set_decl_nonlocal): Remove. (store_parm_decls): Add stmts for pending sizes. * calls.c (calls_function, calls_function_1): Remove. (precompute_arguments): Don't call it. * cfgexpand.c (set_save_expr_context): Remove. (tree_expand_cfg): Don't call it. * dwarf2out.c (add_bound_info): Don't handle SAVE_EXPR. (dwarf2out_finish): Likewise. * expr.c (emit_block_move): Adjust addresses to BLKmode. (store_constructor): Don't pre-evaluate SAVE_EXPR. (safe_from_p): Don't queue SAVE_EXPRs. (expand_expr_real_1 <case SAVE_EXPR>): Rewrite to expect, or build plain VAR_DECLs. * fold-const.c (twoval_comparison_p): Don't look at SAVE_EXPR_RTL. (fold): Likewise. (fold_checksum_tree): Don't special-case SAVE_EXPR. * function.c (free_after_compilation): Don't clear x_save_expr_regs. (put_var_into_stack): Don't handle SAVE_EXPR. (gen_mem_addressof): Likewise. * function.h (struct function): Remove x_save_expr_regs. (save_expr_regs): Remove. * gengtype.c (adjust_field_tree_exp): Don't special-case SAVE_EXPR. * print-tree.c (print_node): Don't dump SAVE_EXPR_NOPLACEHOLDER. * stor-layout.c (variable_size): Don't set it. (force_type_save_exprs, force_type_save_exprs_1): Remove. * tree-inline.c (remap_save_expr): Remove fn argument. Update all callers. Don't set SAVE_EXPR_CONTEXT. * tree-inline.h (remap_save_expr): Update decl. * tree.c (save_expr): Update build size. (first_rtl_op): Don't handle SAVE_EXPR. (unsave_expr_1, contains_placeholder_p): Likewise. (decl_function_context): Likewise. * tree.def (SAVE_EXPR): Remove args 1 and 2. * tree.h (SAVE_EXPR_CONTEXT, SAVE_EXPR_RTL): Remove. (SAVE_EXPR_NOPLACEHOLDER, SAVE_EXPR_PERSISTENT_P): Remove. cp/ * tree.c (cp_unsave_r): Update remap_save_expr call. java/ * jcf-write.c (generate_bytecode_insns <case SAVE_EXPR>): Rewrite. From-SVN: r84036
2004-07-01gimple-low.c (lower_function_body): Don't reset_block_changes here.Richard Henderson1-0/+3
* gimple-low.c (lower_function_body): Don't reset_block_changes here. * cfgexpand.c (tree_expand_cfg): Do it here. * config/alpha/alpha.c (alpha_output_mi_thunk_osf): And here. * config/ia64/ia64.c (ia64_output_mi_thunk): And here. * config/mips/mips.c (mips_output_mi_thunk): And here. * config/rs6000/rs6000.c (rs6000_output_mi_thunk): And here. * config/sh/sh.c (sh_output_mi_thunk): And here. * config/sparc/sparc.c (sparc_output_mi_thunk): And here. From-SVN: r84012
2004-07-01tree.def (RTL_EXPR): Remove.Richard Henderson1-3/+3
* tree.def (RTL_EXPR): Remove. * c-typeck.c (lvalue_p): Don't handle it. * expr.c (safe_from_p): Likewise. (expand_expr_real_1): Likewise. * fold-const.c (non_lvalue, operand_equal_p, fold): Likewise. (fold_checksum_tree, tree_expr_nonnegative_p): Likewise. * gengtype.c (adjust_field_tree_exp): Likewise. * stmt.c (warn_if_unused_value): Likewise. * tree-gimple.c (recalculate_side_effects): Likewise. * tree-pretty-print.c (dump_generic_node): Likewise. * tree.c (make_node_stat, first_rtl_op, unsave_expr_1): Likewise. (unsafe_for_reeval, stabilize_reference, build1_stat): Likewise. * tree.h (RTL_EXPR_SEQUENCE, RTL_EXPR_RTL, RTL_EXPR_ALT_RTL): Remove. * stmt.c (struct stmt_status): Remove x_last_expr_type, x_last_expr_value, x_last_expr_alt_rtl, x_expr_stmts_for_value. (last_expr_type, last_expr_value, last_expr_alt_rtl): Remove. (expand_expr_stmt): Merge with expand_expr_stmt_value. Remove all the bits that tracked last_expr. (expand_end_bindings): Don't track last_expr. (expand_start_stmt_expr, expand_end_stmt_expr): Remove. (clear_last_expr): Remove. (expand_asm): Don't call it. (expand_asm_operands, expand_end_cond): Likewise. (expand_naked_return, expand_null_return_1): Likewise. * c-typeck.c (c_begin_compound_stmt): Likewise. * cfgexpand.c (expand_block): Use expand_expr_stmt. * expr.c (expand_expr_real_1): Likewise. * tree.h: Update prototypes. * function.h (struct sequence_stack): Remove sequence_rtl_expr. (struct emit_status): Remove sequence_rtl_expr. (struct function): Remove x_rtl_expr_chain. (seq_rtl_expr, rtl_expr_chain): Remove. * function.c (struct temp_slot): Remove rtl_expr. (assign_stack_temp_for_type): Don't set it. (free_temp_slots, pop_temp_slots): Don't check it. (free_after_compilation): Don't clear x_rtl_expr_chain. (fixup_var_refs): Don't search it. (preserve_rtl_expr_result, free_temps_for_rtl_expr): Remove. * emit-rtl.c (start_sequence): Don't use sequence_rtl_expr or seq_rtl_expr. (push_topmost_sequence): Likewise. (end_sequence, init_emit): Likewise. (start_sequence_for_rtl_expr): Remove. * expmed.c (make_tree): Build a VAR_DECL instead of an RTL_EXPR. * rtl.h (preserve_rtl_expr_result): Remove. ada/ * trans.c (gnat_stabilize_reference): Don't handle RTL_EXPR. * utils.c (max_size): Likewise. cp/ * class.c (fixed_type_or_null): Don't handle RTL_EXPR. * method.c (synthesize_method): Don't clear_last_expr. * name-lookup.c (maybe_push_cleanup_level): Likewise. From-SVN: r84009
2004-07-01function.h (struct function): Remove x_function_call_count.Richard Henderson1-1/+1
* function.h (struct function): Remove x_function_call_count. (function_call_count): Remove. * calls.c (expand_call): Don't set it. * integrate.c (copy_rtx_and_substitute): Likewise. * function.h (struct function): Remove x_cleanup_label. (cleanup_label): Remove. * stmt.c (expand_value_return): Don't use it. * function.c (free_after_compilation): Don't set it. (expand_function_start): Likewise. Remove parms_have_cleanups arg. * cfgexpand.c (tree_expand_cfg): Update call. * tree.h (expand_function_start): Update decl. From-SVN: r83966
2004-07-01function.h (struct function): Remove dont_emit_block_notes.Richard Henderson1-2/+1
* function.h (struct function): Remove dont_emit_block_notes. * gimple-low.c (lower_function_body): Don't set it. * cfgexpand.c (expand_block): Don't check it. * cfglayout.c (insn_locators_initialize): Likewise. * expr.c (expand_expr_real, expand_expr_real_1): Likewise. * passes.c (rest_of_compilation): Likewise. * stmt.c (expand_start_bindings_and_block): Likewise. (expand_end_bindings): Likewise. From-SVN: r83959
2004-06-30tree.h (immediate_size_expand): Delete.Richard Henderson1-6/+0
* tree.h (immediate_size_expand): Delete. * stor-layout.c (immediate_size_expand): Delete. (variable_size): Don't look at it. * c-decl.c (push_parm_decl): Don't frob immediate_size_expand. (start_function): Likewise. * cfgexpand.c (construct_exit_block): Likewise. * function.c (init_function_start, expand_function_end): Likewise. * tree-optimize.c (tree_rest_of_compilation): Likewise. cp/ * decl.c (start_preparsed_function): Don't set immediate_size_expand. * method.c (use_thunk): Likewise. fortran/ * trans-decl.c (gfc_generate_function_code): Don't set immediate_size_expand. (gfc_generate_constructors): Likewise. From-SVN: r83946
2004-06-30Conditionally compile support for --enable-mapped_location.Per Bothner1-0/+4
* cfgexpand.c: Handle USE_MAPPED_LOCATION case for function_end_locus. * cfglayout.c (insn_locators_initialize): Const cleanup. New macros. * cfgrtl.c (delete_insn): Use new NOTE_DELETED_LABEL_NAME macro. * print-rtl.c (print_rtx): Likewise. * emit-rtl.c: Don't clear NOTE_SOURCE_FILE if USE_MAPPED_LOCATION. * combine.c: Use new SET_INSN_DELETED macro. * flow.c: Likewise. * haifa-sched.c: Likewise. * ifcvt.c: Likewise. * recog.c: Likewise. * reload1.c: Likewise. * diagnostic.c: Use expand_location macro. * pretty-print.c (pp_base_format_text): Likewise. * profile.c: Likewise. * dwarf2out.c: Likewise. Also use expand_location, DECL_IS_BUILTIN. * dwarf2out.c (dwarf2out_decl: Use BUILTINS_LOCATION. * emit-rtl.c (emit_line_note): Simplify if USE_MAPPED_LOCATION. (force_next_line_note, insn_emit): Handle USE_MAPPED_LOCATION case. * final.c (final): Likewise. * haifa-sched.c: Likewise. * integrate.c: Likewise. * jump.c: Likewise. * rtl-error.c: Likewise. * stmt.c (check_seenlabel): Likewise. * tree-pretty-print.c: Likewise. From-SVN: r83921
2004-06-26c-typeck.c, [...]: Fix comment typos.Kazu Hirata1-1/+1
* c-typeck.c, cfgexpand.c, ddg.c, ddg.h, df.c, fold-const.c, gcov.c, gimplify.c, modulo-sched.c, passes.c, tree-cfg.c, tree-mudflap.c, tree-nrv.c, tree-outof-ssa.c, tree-ssa-dom.c, tree-ssa-dse.c, tree-ssa-operands.c, tree-ssa-pre.c, tree-tailcall.c: Fix comment typos. Follow spelling conventions. From-SVN: r83703
2004-06-19CFG transparent RTL expansion:Jan Hubicka1-0/+480
* 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