aboutsummaryrefslogtreecommitdiff
path: root/gcc/flow.c
AgeCommit message (Collapse)AuthorFilesLines
2002-11-04hard-reg-set.h (REG_CANNOT_CHANGE_MODE_P): New.Aldy Hernandez1-11/+16
2002-11-04 Aldy Hernandez <aldyh@redhat.com> * hard-reg-set.h (REG_CANNOT_CHANGE_MODE_P): New. * config/rs6000/rs6000.h (CLASS_CANNOT_CHANGE_MODE_P): Remove. (CLASS_CANNOT_CHANGE_MODE): Remove. (CANNOT_CHANGE_MODE_CLASS): New. * config/alpha/alpha.h: Same. * config/ia64/ia64.h: Same. * config/mips/mips.h: Same. * config/s390/s390.h: Same. * config/sh/sh.h: Same. * config/pa/pa64-regs.h: Same. * config/sh/sh-protos.h (sh_cannot_change_mode_class): Add prototype. * config/sh/sh.c (sh_cannot_change_mode_class): New. * config/mips/mips-protos.h (mips_cannot_change_mode_class): Add prototype. * config/mips/mips.c (mips_cannot_change_mode_class): New. * doc/tm.texi (Register Classes): Remove CLASS_CANNOT_CHANGE_MODE and CLASS_CANNOT_CHANGE_MODE_P. Document CANNOT_CHANGE_MODE_CLASS. * reload.c (push_reload): Use CANNOT_CHANGE_MODE_CLASS. (push_reload): Same. * simplify-rtx.c (simplify_subreg): Same. * reload1.c (choose_reload_regs): Same. * recog.c (register_operand): Same. * regrename.c (mode_change_ok): Change to use new CANNOT_CHANGE_MODE_CLASS infrastructure. * regclass.c (cannot_change_mode_set_regs): New. Declare subregs_of_mode. (regclass): Use subregs_of_mode. Remove references to reg_changes_mode. (init_reg_sets_1): Remove class_can_change_mode and reg_changes_mode code. (invalid_mode_change_p): New. (dump_regclass): Use invalid_mode_change_p instead of class_can_change_mode. (regclass): Same. (record_operand_costs): Do not set reg_changes_mode. * local-alloc.c (struct qty): Remove changes_mode field. (alloc_qty): Remove changes_mode initialization. (update_qty_class): Remove set of changes_mode. (find_free_reg): Use subregs_of_mode. * global.c (find_reg): Use subregs_of_mode info. * rtl.h (cannot_change_mode_set_regs): New prototype. (invalid_mode_change_p): Same. (REG_CANNOT_CHANGE_MODE_P): New macro. * flow.c (mark_used_regs): Calculate subregs_of_mode. Remove REG_CHANGES_MODE. (life_analysis): Clear subregs_of_mode. * combine.c (subst): Pass class to CLASS_CANNOT_CHANGE_MODE_P. Remove use of CLASS_CANNOT_CHANGE_MODE. (simplify_set): Same. (gen_lowpart_for_combine): Calculate subregs_of_mode. Remove REG_CHANGES_MODE. * regs.h: Add extern for subregs_of_mode; Include hard-reg-set and basic-block. (REG_CHANGES_MODE): Delete. From-SVN: r58794
2002-10-01flow.c (insn_dead_p): When using non-call-exceptions, don't eliminate insns ↵Andrew Haley1-0/+4
that may trap. 2002-09-30 Andrew Haley <aph@redhat.com> * flow.c (insn_dead_p): When using non-call-exceptions, don't eliminate insns that may trap. * cse.c (insn_live_p): Likewise. From-SVN: r57688
2002-09-22dbxout.c: Follow spelling conventions.Kazu Hirata1-4/+4
* dbxout.c: Follow spelling conventions. * defaults.h: Likewise. * df.c: Likewise. * diagnostic.h: Likewise. * doloop.c: Likewise. * dwarf2out.c: Likewise. * dwarfout.c: Likewise. * emit-rtl.c: Likewise. * except.c: Likewise. * explow.c: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * expr.h: Likewise. * flags.h: Likewise. * flow.c: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * function.h: Likewise. * gcc.c: Likewise. * gcov-io.h: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * genattrtab.c: Likewise. * genconfig.c: Likewise. * genrecog.c: Likewise. * ggc-page.c: Likewise. * ggc.h: Likewise. * global.c: Likewise. * gthr-win32.h: Likewise. * integrate.c: Likewise. * jump.c: Likewise. * langhooks.c: Likewise. * langhooks.h: Likewise. * line-map.h: Likewise. * local-alloc.c: Likewise. * longlong.h: Likewise. * loop.c: Likewise. * loop.h: Likewise. From-SVN: r57406
2002-09-16ABOUT-NLS: Follow spelling conventions.Kazu Hirata1-1/+1
* ABOUT-NLS: Follow spelling conventions. * ChangeLog: Likewise. * ChangeLog.1: Likewise. * ChangeLog.2: Likewise. * ChangeLog.3: Likewise. * ChangeLog.4: Likewise. * ChangeLog.5: Likewise. * ChangeLog.6: Likewise. * FSFChangeLog.10: Likewise. * FSFChangeLog.11: Likewise. * c-common.c: Likewise. * c-lex.c: Likewise. * c-objc-common.c: Likewise. * cppexp.c: Likewise. * cppinit.c: Likewise. * cpplex.c: Likewise. * doloop.c: Likewise. * flow.c: Likewise. * function.c: Likewise. * integrate.c: Likewise. * loop.c: Likewise. * reg-stack.c: Likewise. * reload.h: Likewise. * ssa.c: Likewise. From-SVN: r57188
2002-07-23defaults.h (obstack_chunk_alloc, [...]): Default definition.Neil Booth1-3/+0
* defaults.h (obstack_chunk_alloc, obstack_chunk_free): Default definition. * gcse.c: Don't define obstack_chunk_free. * collect2.c, conflict.c, df.c, diagnostic.c, fix-header.c, flow.c, gcc.c, genattrtab.c, genautomata.c, genflags.c, gensupport.c, integrate.c, loop.c, ra.c, read-rtl.c, regrename.c, reload1.c, reorg.c, tlink.c, tree.c, config/arm/arm.c, objc/objc-act.c: Don't define obstack macros. cp: * class.c, method.c, pt.c, search.c: Similarly. From-SVN: r55665
2002-06-24flow.c (propagate_one_insn): When removing an insn with a REG_LIBCALL note ↵Jeff Law1-8/+24
but not the entire libcall... * flow.c (propagate_one_insn): When removing an insn with a REG_LIBCALL note but not the entire libcall sequence, delete the associated REG_RETVAL note. From-SVN: r54966
2002-06-11Delete SEQUENCE rtl usage outside of reorg and ssa passes.David S. Miller1-1/+1
2002-06-05 David S. Miller <davem@redhat.com> Delete SEQUENCE rtl usage outside of reorg and ssa passes. * rtl.h (gen_sequence, emit_insns, emit_insns_before, emit_insns_before_scope, emit_insns_after, emit_insns_after_scope): Delete declaration. * ada/misc.c (insert_code_for): Use emit_insn* instead of emit_insns_foo. * config/alpha/alpha.c (alpha_set_memflags_1): Abort on SEQUENCE. (alpha_set_memflags): Fix comment. (set_frame_related_p): Use get_insns instead of gen_sequence. * config/alpha/alpha.md (setjmp receiver splitter): Avoid emitting no insns. * config/arm/arm.c (arm_finalize_pic): Use get_insns instead of gen_sequence. (arm_gen_load_multiple, arm_gen_store_multiple): Likewise. * config/fr30/fr30.c (fr30_move_double): Likewise. * config/i386/i386.c (ix86_expand_int_movcc, ix86_expand_movstr): Likewise. * config/ia64/ia64.c (spill_restore_mem): Likewise. * config/ia64/ia64.md (conditional move spliiter): Avoid emitting no insns. * config/m32r/m32r.c (gen_split_move_double): Use get_insns instead of gen_sequence. * config/mips/mips.c (embedded_pic_fnaddr_reg): Likewise. (mips_expand_prologue, mips16_gp_pseudo_reg): Likewise. * config/sh/sh.c (sh_need_epilogue): Likewise. * config/sparc/sparc.md (current_function_calls_alloca, flat): New attributes. (setjmp pattern and split): Use them to avoid splitter which emits no RTL. * genattrtab.c (main): Emit include of function.h * config/stormy16/stormy16.c (xstormy16_split_cbranch): Use get_insns instead of gen_sequence. * config/cris/cris.c (cris_split_movdx): Likewise. * emit-rtl.c (emit_insns*): Kill. (try_split): Expect insn list instead of SEQUENCE. (make_jump_insn_raw, make_call_insn_raw): Fix comments. (emit_*insn*): Reimplement to work with INSN lists and PATTERNs. Make them abort if a SEQUENCE is given and RTL checking is enabled. (emit_*_scope): Don't forget to set scope on final insn. (gen_sequence): Move from here... * ssa.c (gen_sequence): To here as private function. * builtins.c (expand_builtin_apply_args): Use emit_insn_foo, fix comments. (expand_builtin_return, expand_builtin_mathfn): Likewise. (expand_builtin_strlen): Use get_insns instead of gen_sequence. (expand_builtin_saveregs): Use emit_insn_foo, fix comments. (expand_builtin_expect_jump): Use get_insns and fix comments. * calls.c (try_to_integrate): Use emit_insn_foo. (expand_call, emit_library_call_value_1): Likewise. * expr.c (emit_queue): Handle insn lists instead of SEQUENCE. (emit_move_insn_1): Use get_insns instead of gen_sequence. (expand_expr): Use emit_insn_foo. * cfgrtl.c (commit_one_edge_insertion): Use emit_insn_foo. * except.c (build_post_landing_pads): Likewise. * flow.c (attempt_auto_inc): Likewise. * stmt.c (expand_fixup, fixup_gotos, expand_nl_handler_label, expand_nl_goto_receivers, expand_decl_cleanup): Likewise. * function.c (fixup_var_refs_insn): Use get_insns instead of gen_sequence. (fixup_var_refs_1): Likewise and expect insn list from gen_foo. (fixup_memory_subreg): Use get_insns instead of gen_sequence. (fixup_stack_1, purge_addressof_1, expand_main_function, get_arg_pointer_save_area): Likewise. (optimize_bit_field, instantiate_virtual_regs_1, assign_parms, expand_function_end): Use emit_insn_foo. (record_insns, keep_stack_depressed): Work with insn list instead of SEQUENCE, fix comments. * ifcvt.c (noce_emit_store_flag, noce_try_store_flag, noce_try_store_flag_constants, noce_try_store_flag_inc, noce_try_store_flag_mask, noce_emit_cmove, noce_try_cmove_arith, noce_try_minmax, noce_try_abs): Use emit_insn_foo. (noce_process_if_block): Use get_insns instead of gen_sequence. * optabs.c (add_equal_note): Work with insn list, fix comments. (expand_binop): Expect insn list from GEN_FCN(), use emit_insn_foo. (expand_unop, expand_complex_abs, expand_unop_insn, expand_no_conflict_block): Likewise. (gen_move_insn): Use get_insns instead of gen_sequence. (gen_cond_trap): Likewise. * integrate.c (copy_rtx_and_substitute): Likewise. (emit_initial_value_sets): Use emit_insn_foo. * reload1.c (emit_output_reload_insns, emit_reload_insns): Likewise. (fixup_abnormal_edges): Avoid losing REG_NOTES more intelligently now that RTL generators give insn lists. * sibcall.c (replace_call_placeholder): Use emit_insn_foo. * doloop.c (doloop_modify, doloop_modify_runtime): Use get_insns instead of gen_sequence. (doloop_optimize): Work with insn lists instead of SEQUENCE rtl. * explow.c (emit_stack_save, emit_stack_restore): Use get_insns instead of gen_sequence. * loop.c (move_movables, emit_prefetch_instructions, gen_add_mult, check_dbra_loop, gen_load_of_final_value): Likewise. (loop_regs_update): Work with insn list instead of SEQUENCE rtl. (product_cheap_p): Likewise, and add commentary about RTL wastage here. * lcm.c (optimize_mode_switching): Use get_insns instead of gen_sequence. * profile.c (gen_edge_profiler): Likewise. * regmove.c (copy_src_to_dest): Likewise. * reg-stack.c (compensate_edge): Likewise and fix comment. * gcse.c (process_insert_insn): Likewise. (insert_insn_end_bb): Work with insn list instead of SEQUENCE rtl. * jump.c (delete_prior_computation): Update comment. * genemit.c (gen_expand, gen_split, main): Use get_insns instead of gen_sequence, update comments to match. * recog.c (peephole2_optimize): Work with insn lists instead of SEQUENCE rtl. * sched-vis.c (print_pattern): Abort on SEQUENCE. * unroll.c (unroll_loop, find_splittable_givs, final_giv_value): Use get_insns instead of gen_sequence. (copy_loop_body): Likewise and don't emit dummy NOTE. * genrecog.c: Don't mention SEQUENCE rtl in comments. * combine.c (try_combine): Expect insn lists from split generator. * reorg.c (relax_delay_slots): Emit SEQUENCE into insn list by hand. From-SVN: r54497
2002-06-07emit-rtl.c (init_emit): Add hard registers to regno_reg_rtx.Jeff Law1-6/+4
* emit-rtl.c (init_emit): Add hard registers to regno_reg_rtx. * combine.c (move_deaths): Use regno_reg_rtx for hard regs rather than creating a new register. (distribute_notes): Likewise. * df.c (df_reg_use_gen): Likewise. (df_reg_clobber_gen): Likewise. (df_ref_record): Likewise. * expr.c (use_regs): Likewise. * flow.c (propagate_one_insn): Likewise. (mark_set_1): Likewise. (mark_used_reg): Likewise. * reload.c (emit_reload_insns): Likewise. From-SVN: r54358
2002-06-02loop.c (emit_prefetch_instructions): Properly place the address computation.Jan Hubicka1-4/+8
* loop.c (emit_prefetch_instructions): Properly place the address computation. * basic-block.h (basic_block_for_insn, BLOCK_FOR_INSN): Kill. (set_block_for_insn): Turn into macro. * cfgbuild.c (find_basic_block): Do not clear basic_block_for_insn. * cfglayout.c (insn_scopes): Kill. (scope_to_insns_initialize): Do not use insn_scopes. (scope_to_insns_finalize): Likewise. (duplicate_insn_chain): Likewise. (cfg_layout_initialize, cfg_layout_finalize): Do not turn scopes to notes. * cfgrtl.c (basic_block_for_insn): Kill. (delete_insn_and_edges, delete_insn_chain_and_edges): Simplify. (create_basic_block_structure): Use reorder_insns. (compute_bb_for_insn): Do not use basic_block_for_insn. (merge_blocks_nomove): Likewise. (update_bb_for_insn): Likewise. (verify_flow_info): Likewise. (set_block_for_insn): Kill. * combine.c (try_combine): Update gen_rtx_INSN call. * emit-rtl.c (gen_label_rtx): Update gen_rtx_CODE_LABEL call. (mark_insn_raw, make_jump_insn_raw, make_call_insn_raw): Clear scopes and BBs. (add_insn_after, add_insn_before, remove_insn, reorder_insns): Simplify. (emit_note_before, emit_note_after, emit_line_note_after, emit_note): Clear BB. (emit_insns_after): Simplify. (emit_copy_of_insn_after): Copy scope. * final.c (final_start_function): Lower scopes. * flow.c (check_function_return_warnings): Do not rely on deleted insn. * integrate.c (copy_insn_list): Cope scopes. * jump.c (duplicate_loop_exit_test): LIkewise; simplify. * loop.c (loop_optimize): Do not care block notes. * print-rtl.c (print_rtx): Print BB. * recog.c (apply_change_group): Simplify. * rtl.c (copy_rtx): Handle 'B'. * rtl.def (INSN, CALL_INSN, JUMP_INSN, NOTE): Add extra fields. * rtl.h (Field accessors): Update indexes. * sched-ebb.c (schedule_ebbs): Do not lower notes. * sched-rgn.c (schedule_insns): Likewise. * toplev.c (rest_of_compilation): Lower notes. * unroll.c (unroll_loop): Do not care scoping notes. (copy_loop_body): Copy scopes. From-SVN: r54188
2002-05-30flow.c (propagate_one_insn): Revise yesterday's patch.Jeff Law1-2/+21
* flow.c (propagate_one_insn): Revise yesterday's patch. Delete a dead insn with a REG_RETVAL note when the entire libcall is not dead and remove the associated REG_LIBCALL note at the same time. From-SVN: r54065
2002-05-29flow.c (propagate_one_insn): Do not remove a dead insn if it contains a ↵Jeff Law1-1/+1
REG_RETVAL note. * flow.c (propagate_one_insn): Do not remove a dead insn if it contains a REG_RETVAL note. From-SVN: r54028
2002-05-28flow.c (update_life_info_in_dirty_blocks): Only do a partial update if ↵Richard Henderson1-5/+18
UPDATE_LIFE_LOCAL. * flow.c (update_life_info_in_dirty_blocks): Only do a partial update if UPDATE_LIFE_LOCAL. From-SVN: r53978
2002-05-28flow.c (calculate_global_regs_live): Rename call_used to invalidated_by_call.Richard Henderson1-7/+7
* flow.c (calculate_global_regs_live): Rename call_used to invalidated_by_call. Initialize from regs_invalidated_by_call instead of call_used_regs. From-SVN: r53962
2002-05-28basic-block.h (last_basic_block): Declare.Zdenek Dvorak1-2/+1
* basic-block.h (last_basic_block): Declare. (expunge_block_nocompact): Declaration removed. (compact_blocks): Declare. * cfg.c (last_basic_block): New variable. (expunge_block_nocompact): Removed. (expunge_block): Do not compact basic blocks. (compact_blocks): New. * cfganal.c (flow_call_edges_add): Use the fact that bb indices no longer change. * cfgbuild.c (find_basic_blocks_1, find_basic_blocks): Set last_basic_block. * cfgcleanup.c (merge_blocks_move_predecessor_nojumps): Do not change real positions of blocks. (delete_unreachable_blocks): Simplified -- quadratic behavior now cannot occur. (cleanup_cfg): Compact blocks. * cfgrtl.c (create_basic_block): Insert basic blocks to the end of basic_block_info varray. (flow_delete_block): Comment update. (back_edge_of_syntactic_loop_p): Modify position check code. (verify_flow_info): Update checking. * flow.c (calculate_global_regs_live): Use FOR_EACH_BB. * ifcvt.c (SET_ORIG_INDEX, ORIG_INDEX): Removed. (find_if_case_1, find_if_case_2, if_convert): Use the fact that bb indices no longer change. * lcm.c (optimize_mode_switching): Replace n_basic_blocks with last_basic_block. * predict.c (estimate_bb_frequencies): Remove unneccessary code. * profile.c (branch_prob): Compact blocks. * sched-rgn.c (find_rgns): Replace n_basic_blocks with last_basic_block. From-SVN: r53957
2002-05-27basic-block.h (last_basic_block): Defined as synonym for n_basic_blocks.Zdenek Dvorak1-1/+2
* basic-block.h (last_basic_block): Defined as synonym for n_basic_blocks. * cfganal.c (mark_dfs_back_edges, flow_reverse_top_sort_order_compute, flow_depth_first_order_compute, flow_preorder_transversal_compute, flow_dfs_compute_reverse_init): Replaced relevant occurences of n_basic_blocks with last_basic_block. * cfgbuild.c (make_edges): Likewise. * cfgloop.c (flow_loop_scan, flow_loops_find): Likewise. * cfgrtl.c (verify_flow_info, purge_all_dead_edges): Likewise. * combine.c (combine_instructions): Likewise. * df.c (df_alloc, df_analyse_1, df_analyse, iterative_dataflow_sbitmap, iterative_dataflow_bitmap): Likewise. * dominance.c (init_dom_info, calc_dfs_tree_nonrec, calc_dfs_tree, calc_idoms, idoms_to_doms): Likewise. * flow.c (update_life_info_in_dirty_blocks, free_basic_block_vars): Likewise. * gcse.c (gcse_main, alloc_gcse_mem, compute_local_properties, compute_hash_table, expr_reaches_here_p, one_classic_gcse_pass, one_cprop_pass, compute_pre_data, pre_expr_reaches_here_p, one_pre_gcse_pass, compute_transpout, delete_null_pointer_checks_1, delete_null_pointer_checks, compute_code_hoist_vbeinout, hoist_expr_reaches_here_p, hoist_code, one_code_hoisting_pass, compute_store_table, build_store_vectors): Likewise. * haifa-sched.c (sched_init): Likewise. * ifcvt.c (if_convert): Likewise. * lcm.c (compute_antinout_edge, compute_laterin, compute_insert_delete, pre_edge_lcm, compute_available, compute_nearerout, compute_rev_insert_delete, pre_edge_rev_lcm, optimize_mode_switching): Likewise. * predict.c (estimate_probability, process_note_prediction, note_prediction_to_br_prob): Likewise. * profile.c (GCOV_INDEX_TO_BB, BB_TO_GCOV_INDEX): Likewise. * recog.c (split_all_insns, peephole2_optimize): Likewise. * regrename.c (copyprop_hardreg_forward): Likewise. * resource.c (init_resource_info): Likewise. * sched-rgn.c (build_control_flow, find_rgns, compute_trg_info, init_regions, schedule_insns): Likewise. * ssa-ccp.c (ssa_const_prop): Likewise. * ssa-dce.c (ssa_eliminate_dead_code): Likewise. * ssa.c (compute_dominance_frontiers, compute_iterated_dominance_frontiers, convert_to_ssa): Likewise. * df.c (df_refs_unlink): Fix FOR_EACH_BB usage (in #if 0'ed code) * gcse.c (alloc_rd_mem, alloc_avail_expr_mem): Use n_blocks for vector sizes consistently. From-SVN: r53924
2002-05-27basic-block.h (PEOP_SCAN_DEAD_STORES): New.Jan Hubicka1-6/+9
* basic-block.h (PEOP_SCAN_DEAD_STORES): New. (PROP_FINAL): Include. * flow.c (life_analysis, update_life_info, init_propagate_block_info, mark_set_1, mark_used_rgs): Support SCAN_DEAD_STORE. From-SVN: r53920
2002-05-23bb-reorder.c (make_reorder_chain, [...]): Use FOR_EACH_BB macros to iterate ↵Zdenek Dvorak1-46/+25
over basic block chain. * bb-reorder.c (make_reorder_chain, make_reorder_chain_1): Use FOR_EACH_BB macros to iterate over basic block chain. * cfg.c (clear_edges, clear_bb_flags, dump_flow_info, alloc_aux_for_blocks, clear_aux_for_blocks, alloc_aux_for_edges): Likewise. * cfganal.c (set_edge_can_fallthru_flag, flow_call_edges_add, find_unreachable_blocks, create_edge_list, verify_edge_list, remove_fake_edges, add_noreturn_fake_exit_edges, flow_preorder_transversal_compute, flow_dfs_compute_reverse_execute): Likewise. * cfgbuild.c (make_edges, find_basic_blocks, find_many_sub_basic_blocks, find_sub_basic_blocks): Likewise. * cfgcleanup.c (try_optimize_cfg, delete_unreachable_blocks): Likewise. * cfglayout.c (record_effective_endpoints, cleanup_unconditional_jumps): Likewise. * cfgloop.c (flow_loops_cfg_dump, flow_loops_find): Likewise. * cfgrtl.c (compute_bb_for_insn, tidy_fallthru_edges, commit_edge_insertions, commit_edge_insertions_watch_calls, print_rtl_with_bb, verify_flow_info, purge_all_dead_edges): Likewise. * combine.c (combine_instructions, reg_dead_at_p): Likewise. * conflict.c (conflict_graph_compute): Likewise. * df.c (df_bitmaps_alloc, df_bitmaps_free, df_alloc, df_analyse_1, df_modified_p, df_refs_unlink, df_dump): Likewise. * dominance.c (calc_dfs_tree, calculate_dominance_info): Likewise. * final.c (compute_alignments): Likewise. * flow.c (update_life_info, update_life_info_in_dirty_blocks, delete_noop_moves, calculate_global_regs_live, allocate_bb_life_data, count_or_remove_death_notes): Likewise. * gcse.c (oprs_unchanged_p, record_last_reg_set_info, compute_hash_table, compute_kill_rd, compute_rd, compute_ae_kill, classic_gcse, compute_transp, cprop, compute_pre_data, compute_transpout, invalidate_nonnull_info, delete_null_pointer_checks_1, delete_null_pointer_checks, compute_code_hoist_vbeinout, hoist_code, compute_ld_motion_mems, compute_store_table, build_store_vectors, store_motion): Likewise. * global.c (global_conflicts, mark_elimination): Likewise. * graph.c (print_rtl_graph_with_bb): Likewise. * haifa-sched.c (sched_init): Likewise. * ifcvt.c (if_convert): Likewise. * lcm.c (compute_antinout_edge, compute_laterin, compute_insert_delete, compute_available, compute_nearerout, compute_rev_insert_delete, optimize_mode_switching): Likewise. * local-alloc.c (local_alloc, update_equiv_regs): Likewise. * predict.c (estimate_probability, note_prediction_to_br_prob, propagate_freq, counts_to_freqs, expensive_function_p, estimate_bb_frequencies): Likewise. * profile.c (instrument_edges, get_exec_counts, compute_branch_probabilities, compute_checksum, branch_prob, find_spanning_tree): Likewise. * recog.c (split_all_insns, peephole2_optimize): Likewise. * reg-stack.c (reg_to_stack, convert_regs_entry, convert_regs): Likewise. * regclass.c (scan_one_insn, regclass): Likewise. * regmove.c (mark_flags_life_zones, regmove_optimize, record_stack_memrefs): Likewise. * regrename.c (regrename_optimize, copyprop_hardreg_forward): Likewise. * reload1.c (reload, reload_combine, fixup_abnormal_edges): Likewise. * resource.c (find_basic_block): Likewise. * sched-ebb.c (schedule_ebbs): Likewise. * sched-rgn.c (is_cfg_nonregular, build_control_flow, find_single_block_region, find_rgns, schedule_insns) * sibcall.c (optimize_sibling_and_tail_recursive_call) * ssa-ccp.c (optimize_unexecutable_edges, ssa_ccp_df_delete_unreachable_insns): Likewise. * ssa-dce.c (ssa_eliminate_dead_code): Likewise. * ssa.c (find_evaluations, compute_dominance_frontiers_1, rename_block, convert_to_ssa, compute_conservative_reg_partition, compute_coalesced_reg_partition, rename_equivalent_regs, convert_from_ssa): Likewise. * config/ia64/ia64.c (emit_predicate_relation_info, process_epilogue, process_for_unwind_directive): Likewise. * df.c (FOR_ALL_BBS): Removed. * gcse.c (struct null_pointer_info): Type of current_block field changed. (struct reg_avail_info): Type of last_bb field changed. * config/ia64/ia64.c (block_num): Removed. (need_copy_state): Type changed. (last_block): New. From-SVN: r53804
2002-05-22* flow.c (life_analysis): Delete broken reg_label check.Richard Henderson1-19/+1
From-SVN: r53746
2002-05-21* flow.c (life_analysis): Fix test for deleted label.Richard Henderson1-2/+2
From-SVN: r53705
2002-05-21bb-reorder.c (make_reorder_chain_1): Modified.Zdenek Dvorak1-2/+2
* bb-reorder.c (make_reorder_chain_1): Modified. * cfganal.c (can_fallthru, flow_call_edges_add, flow_preorder_transversal_compute): Modified. * cfgbuild.c (make_edges, find_basic_blocks, find_many_sub_basic_blocks, find_sub_basic_blocks): Modified. * cfgcleanup.c (try_simplify_condjump, try_optimize_cfg): Modified. * cfglayout.c (skip_insns_after_block, fixup_reorder_chain, fixup_fallthru_exit_predecessor, cfg_layout_redirect_edge): Modified. * cfgrtl.c (tidy_fallthru_edges, verify_flow_info): Modified. * combine.c (this_basic_block): Type changed to basic_block. (combine_instructions, set_nonzero_bits_and_sign_copies, try_combine, nonzero_bits, num_sign_bit_copies, get_last_value_validate, get_last_value, distribute_notes, distribute_links): Modified. * final.c (compute_alignments): Modified. * flow.c (regno_uninitialized, regno_clobbered_at_setjmp): Modified. * function.c (thread_prologue_and_epilogue_insns): Modified. * gcse.c (compute_code_hoist_vbeinout): Modified. * global.c (build_insn_chain): Modified. * ifcvt.c (find_if_block, find_cond_trap): Modified. * predict.c (last_basic_block_p, note_prediction_to_br_prob): Modified. * regmove.c (regmove_optimize): Modified. * resource.c (find_basic_block): Modified. * sched-ebb.c (schedule_ebbs): Modified. * ssa-dce.c (find_control_dependence, find_pdom): Modified. From-SVN: r53695
2002-05-17final.c: Fix formatting.Kazu Hirata1-6/+6
* final.c: Fix formatting. * fix-header.c: Likewise. * flow.c: Likewise. * fold-const.c: Likewise. * function.c: Likewise. From-SVN: r53563
2002-05-16Revert "Basic block renumbering removal", and two followup patches.Richard Henderson1-43/+54
From-SVN: r53537
2002-05-16* flow.c (calculate_global_regs_live): Queue blocks in program order.Zdenek Dvorak1-9/+7
From-SVN: r53533
2002-05-16Basic block renumbering removal.Zdenek Dvorak1-47/+38
From-SVN: r53522
2002-05-13flow.c (invalidate_mems_from_autoinc): Rewrite to use for_each_rtx.Jeff Law1-20/+26
* flow.c (invalidate_mems_from_autoinc): Rewrite to use for_each_rtx. Update prototype and callers. (propagate_one_insn): Stack pointer adjustments kill MEMs on the mem_set_list which reference the stack pointer, as do calls to constant functions as they may clobber outgoing argument space. From-SVN: r53442
2002-04-18flow.c (update_life_info): Ignore return value of cleanup_cfg.Hans-Peter Nilsson1-3/+18
* flow.c (update_life_info): Ignore return value of cleanup_cfg. Mask out PROP_SCAN_DEAD_CODE | PROP_KILL_DEAD_CODE in propagate_block calls after relaxation loop using new variable stabilized_prop_flags. From-SVN: r52498
2002-04-12re PR bootstrap/4191 (GCC does not build for d30v-elf - needs tweaking for ↵Richard Henderson1-2/+6
crtstuff.c changes) PR bootstrap/4191 * config/d30v/d30v.h (INIT_SECTION_ASM_OP): Don't undef. * flow.c (mark_used_reg): Manage reg_cond_dead properly for modes spanning multiple hard regs. * recog.c (peephole2_optimize): Rebuild jump labels as needed. From-SVN: r52205
2002-03-30local-alloc.c (local_alloc): Avoid call of update_equiv_regs when not ↵Jan Hubicka1-0/+10
optimizing. * local-alloc.c (local_alloc): Avoid call of update_equiv_regs when not optimizing. * toplev.c (rest_of_compilation): Cann mark_constant_function only when optimizing. * flow.c (calculate_global_regs_live): Ensure that all AUX fields are NULL. * cfgcleanup.c (bb_flags): Add BB_NONTHREADABLE_BLOCK. (thread_jump): Set BB_NONTHREADABLE_BLOCK, check it. (try_optimize_cfg): clear all AUX fields. * i386.c (aligned_operand): Be prepared for SUBREGed registers. (ix86_decompose_address): Use REG_P instead of GET_CODE (...) == REG. (ix86_address_cost): Be prepared for SUBREGed registers. (legitimate_address_p): Accept SUBREGed registers. From-SVN: r51604
2002-03-22flow.c (calculate_global_regs_live): Clear aux fields of ENTRY and EXIT.Alexandre Oliva1-0/+5
* flow.c (calculate_global_regs_live): Clear aux fields of ENTRY and EXIT. From-SVN: r51183
2002-03-22cfgcleanup.c (outgoing_edges_math): Fix condition; relax frequencies match; ↵Jan Hubicka1-3/+3
avoid match on different loop depths. * cfgcleanup.c (outgoing_edges_math): Fix condition; relax frequencies match; avoid match on different loop depths. (try_crossjump_to_bb): Kill tests that no longer brings time savings. * cfgrtl.c (force_nonfallthru_and_redirect): Fix loop_depth updating code. (split_edge): Likewise. * flow.c (update_life_info_in_dirty_blocks): Fix uninitialized variable. * Makefile.in (cfgrtl): Add insn-config.h depenendency. * cfgrtl.c: Include insn-config.h (split_block) Dirtify block in presence of conditional execution From-SVN: r51168
2002-03-19flow.c (EH_USES): Provide default.Richard Henderson1-14/+36
* flow.c (EH_USES): Provide default. (calculate_global_regs_live): Use it for EH edges and noreturn calls. * doc/tm.texi (EH_USES): New. * config/ia64/ia64.c (ia64_eh_uses): New. * config/ia64/ia64-protos.h: Update. * config/ia64/ia64.h (EH_USES): New. From-SVN: r51060
2002-03-08* flow.c (propagate_block_delete_insn): Remove unused variable.Andreas Jaeger1-2/+1
From-SVN: r50446
2002-03-06cfgrtl.c (delete_insn_and_edges, [...]): New.Jan Hubicka1-23/+30
* cfgrtl.c (delete_insn_and_edges, delete_insn_chain_and_edges): New. * rtl.h (delete_insn_and_edges, delete_insn_chain_and_edges): Declare * basic-block.h (update_life_info, update_life_info_in_dirty_blocks, delete_noop_moves): Return indeger. * flow.c (ndead): New variable. (propagate_block_delete_insn): Use delete_insn_and_edges; remove BB argument; update callers. (propagate_block_delete_libcall): Use delete_insn_chain_and_edges. (life_analysis): Do not call purge_all_dead_edges. (update_life_info): Return number of deleted insns; print statistics. (update_life_info_in_dirty_blocks): likewise. (delete_noop_moves): Use delete_insn_and_edges; print statistics; return number of insns deleted. * cse.c: Include timevar.h (delete_trivially_dead_insns): Kill preserve_basic_blocks argument; iterate until stabilizes; print statistics; return number of killed insns. * Makefile.in: (cse.o): Add timevar.h dependency * rtl.h (delete_trivially_dead_insns): New. * timever.def: Add TV_DELETE_TRIVIALLY_DEAD timer. * toplev.c (rest_of_compilation): Update callers. * cfgcleanup.c (try_optimize_cfg): Kill blocks. (try_optimize_cfg): Do not update liveness. (cleanup-cfg): Loop until try_optimize_cfg and dead code removal stabilizes; use delete_trivially_dead_insns. * cfgrtl.c (verify_flow_info): Sanity check outgoing edges. From-SVN: r50355
2002-03-01toplev.c (rest_of_compilation): Delete dead jumptables before loop.Jan Hubicka1-2/+1
* toplev.c (rest_of_compilation): Delete dead jumptables before loop. * flow.c (delete_dead_jumptables): Make global. * rtl.h (delete_dead_jumptables): Declare. From-SVN: r50205
2002-02-28basic-block.h (BB_REACHABLE): Renumber.Jan Hubicka1-4/+29
* basic-block.h (BB_REACHABLE): Renumber. (BB_DIRTY, BB_NEW): New flags. (clear_bb_flags): Declare. (update_life_info_in_dirty_blocks): Declare. * cfg.c (clear_bb_flags): New function. * cfgrtl.c (create_basic_block_structure): Set flags to BB_NEW. * emit-rtl.c (add_insn_after, add_insn_before, remove_insn, reorder_insns, emit_insn_after): Mark block as dirty. * flow.c (update_life_info): Fix clearing of PROP_LOG_LINKS. (update_life_info_in_dirty_blocks): New function. * recog.c (apply_change_group): Dirtify block. * cse.c (cse_insn): Reorder emitting of jump insn to keep cfg consistent. * gcse.c (delete_null_pointer_checks): Likewise. * toplev.c (dump_file_index): Move cse2 after bp, add DFI_null (dump_file_info): Similary. (rest_of_compilation): Avoid most of CFG rebuilds; do first if converision after null pointer checks, do cse2 after branch prediction; avoid full liveness rebuild after initializing subregs. * invoke.texi (-d options): Document -du, renumber. * cfgcleanup.c (bb_flags): Remove BB_UPDATE_LIFE. (notice_new_block): Do not set BB_UPDATE_LIFE. (try_forward_edges, merge_blocks_move_predecessor_nojumps, merge_blocks_move_successor_nojumps, merge_blocks, try_crossjump_to_edge): Likewise. (try_optimize_cfg): Likewise; use update_life_info_in_dirty_blocks. * cfgrtl.c (merge_blocks_nomove): Copy b's flags to a. * ifcvt.c (SET_UPDATE_LIFE, UPDATE_LIFE): Kill. (merge_of_block): Do not use life_data_ok. (find_if_case_1): Do not use SET_UPDATE_LIFE. (if_convert): Use BB_DIRTY mechanizm to update life. * lcm.c (optimize_mode_switching): Update update_life_info_in_dirty_blocks From-SVN: r50127
2002-02-19i386.md ("mmx_uavgv8qi3"): Use const_vector.Aldy Hernandez1-0/+1
2002-02-19 Aldy Hernandez <aldyh@redhat.com> * config/i386/i386.md ("mmx_uavgv8qi3"): Use const_vector. ("mmx_uavgv4hi3"): Same. ("pmulhrwv4hi3"): Same. * tree-inline.c (walk_tree): Handle vectors. * c-common.c (constant_expression_warning): Handle vectors. (overflow_warning): Same. * sched-deps.c (sched_analyze_2): Handle vectors. * rtlanal.c (rtx_unstable_p): Handle vectors. (rtx_varies_p): Same. (count_occurrences): Same. (regs_set_between_p): Same. (modified_between_p): Same. (modified_in_p): Same. (volatile_insn_p): Same. (volatile_refs_p): Same. (side_effects_p): Same. (may_trap_p): Same. (inequality_comparisons_p): Same. (replace_regs): Same. (computed_jump_p_1): Same. * rtl.c (DEF_MACHMODE): Change all definitions to accept 8th argument. (inner_mode_array): New. (copy_rtx): Handle vectors. (copy_most_rtx): Same. (rtx_equal_p): Same. (get_mode_alignment): Adjust for vectors. * resource.c (mark_referenced_resources): Handle vectors. (mark_set_resources): Same. * reload1.c (eliminate_regs): Handle vectors. (elimination_effects): Same. (scan_paradoxical_subregs): Same. * reload.c (subst_reg_equivs): Handle vectors. * regrename.c (scan_rtx): Handle vectors. * regclass.c (reg_scan_mark_refs): Handle vectors. * recog.c (find_single_use_1): Handle vectors. * local-alloc.c (equiv_init_varies_p): Handle vectors. (contains_replace_regs): Same. (memref_referenced_p): Same. * integrate.c (copy_rtx_and_substitute): Handle vectors. (subst_constants): Same. * genattrtab.c (attr_copy_rtx): Handle vectors. (encode_units_mask): Same. (clear_struct_flag): Same. (count_sub_rtxs): Same. * gcse.c (want_to_gcse_p): Handle vectors. (oprs_unchanged_p): Same. (hash_expr_1): Same. (oprs_not_set_p): Same. (expr_killed_p): Same. (compute_transp): Same. (store_ops_ok): Same. * function.c (purge_addressof_1): Do not allow paradoxical subregs of vectors. (fixup_var_refs_1): Same. (instantiate_virtual_regs_1): Same. * fold-const.c (operand_equal_p): Handle vectors. (fold): Same. (rtl_expr_nonnegative_p): Same. * flow.c (mark_used_regs): Handle vectors. * df.c (df_uses_record): Handle vectors. * cselib.c (cselib_subst_to_values): Handle vectors. (cselib_mem_conflict_p): Same. (hash_rtx): Same. * cse.c (canon_reg): Handle vectors. (fold_rt): Same. (cse_process_notes): Same. (count_reg_usage): Same. (canon_hash): Same. * alias.c (nonlocal_mentioned_p): Add case for CONST_VECTOR. * combine.c (mark_used_regs_combine): Add case for CONST_VECTOR. * emit-rtl.c (init_emit_once): Generate const0_rtx for vectors. (gen_rtx): Handle CONST_VECTOR. (gen_const_vector_0): New. (copy_rtx_if_shared): CONST_VECTORs can be shared. (reset_used_flags): Same. (copy_insn_1): Same. (initializer_constant_valid_p): Handle VECTOR_CST. * doc/c-tree.texi (Expression trees): Document VECTOR_CST. * doc/rtl.texi (Constants): Document const_vector. (CONST0_RTX): Update for vectors. (RTL sharing): Same. * print-tree.c (print_node): Add case for VECTOR_CST. * tree.h (TREE_VECTOR_CST_ELTS): New. (struct tree_vector): New. (union tree_node): Add vector node. (build_vector): Add prototype. * tree.def (VECTOR_CST): New. * tree.c (build_vector): New. * expmed.c (make_tree): Handle CONST_VECTOR. * rtl.h (CONSTANT_P): CONST_VECTORs are constants too. (CONST_VECTOR_ELT): New. (CONST_VECTOR_NUNITS): New. * machmode.h (GET_MODE_INNER): New. (DEF_MACHMODE): Accept 8th arg. * machmode.def: Add 8th argument for vector inner mode. Add inner vector modes for vectors. * rtl.def (VEC_CONST): Remove. (CONST_VECTOR): New. * expr.c (clear_storage): Allow vectors. (is_zeros_p): Handle VECTOR_CST. * varasm.c (output_constant_pool): Handle vectors. (rtx_const): Add veclo and vechi fields. (kind): Add RTX_VECTOR. (decode_rtx_const): Add case for vector. * config/rs6000/rs6000-protos.h: Add zero_constant. * config/rs6000/rs6000.c (rs6000_emit_move): Handle vector constants. Force easy vector constants into memory. (easy_vector_constant): New. (emit_easy_vector_constant): New. (rs6000_legitimize_reload_address): Do not generate bad reloads on darwin. * config/rs6000/rs6000.md ("altivec_lvx"): Reflect what instruction does. ("altivec_lvxl"): Same. (altivec_lvebx): Same. (altivec_lvehx): Same. (altivec_lvewx): Same. ("*movv4si_const0"): New. ("*movv4sf_const0"): New. ("*movv8hi_const0"): New. ("*movv16qi_const0"): New. From-SVN: r49853
2002-01-29flow.c (print_rtl_and_abort): Remove.Richard Henderson1-46/+33
* flow.c (print_rtl_and_abort): Remove. (print_rtl_and_abort_fcn): Remove. (verify_local_live_at_start): Use dump_bb instead. (verify_wide_reg): Likewise. Take a basic_block, not rtl endpoints. (verify_wide_reg_1): Return 2 on mode test failure. From-SVN: r49323
2002-01-25df.c (df_ref_create, [...]): Kill BB argument.Jan Hubicka1-0/+7
* df.c (df_ref_create, df_ref_record_1, df_ref_record): Kill BB argument. * df.h (struct ref): Kill B. (DF_REF_BB, DF_REF_BBNO): Use BLOCK_FOR_INSN. * basic-block.h (PROP_EQUAL_NOTES): New flag. * flow.c (propagate_one_insn): Use it. (mark_used_regs): Handle NIL. From-SVN: r49220
2002-01-16calls.c (try_to_integrate): Use "(size_t)" intermediate cast and when ↵Graham Stott1-7/+7
casting an integer literal to "rtx"... * calls.c (try_to_integrate): Use "(size_t)" intermediate cast and when casting an integer literal to "rtx" pointer. (expand_call): Likewise. * flow.c (try_pre_increment): Likewise. (find_use_as_address): Likewise. * integrate.c (expand_iline_function): Likewise. * regmove.c (try_auto_increment): Likewise. From-SVN: r48906
2002-01-16flow.c (propagate_one_insn): Change to use fatal_insn.Eric Christopher1-5/+1
2002-01-15 Eric Christopher <echristo@redhat.com> * flow.c (propagate_one_insn): Change to use fatal_insn. From-SVN: r48899
2002-01-15flow.c (propagate_one_insn): Add error message and print out insn for debugging.Eric Christopher1-13/+17
2002-01-15 Eric Christopher <echristo@redhat.com> * flow.c (propagate_one_insn): Add error message and print out insn for debugging. From-SVN: r48878
2001-12-28except.c: Fix comment formatting.Kazu Hirata1-1/+1
* except.c: Fix comment formatting. * flags.h: Likewise. * flow.c: Likewise. * predict.c: Likewise. * simplify-rtx.c: Likewise. * system.h: Likewise. * vmsdbg.h: Likewise. * vmsdbgout.c: Likewise. From-SVN: r48349
2001-12-12output.h (regno_uninitialized): Make argument unsigned.Aldy Hernandez1-1/+1
2001-12-11 Aldy Hernandez <aldyh@redhat.com> * output.h (regno_uninitialized): Make argument unsigned. * flow.c (regno_uninitialized): Make regno unsigned. From-SVN: r47910
2001-12-11flow.c (find_regno_partial): Indent properly.Aldy Hernandez1-17/+20
2001-12-11 Aldy Hernandez <aldyh@redhat.com> * flow.c (find_regno_partial): Indent properly. Add a default to switch. From-SVN: r47892
2001-12-09ChangeLog.2, [...]: Fix spelling errors.Joseph Myers1-4/+4
* ChangeLog.2, ChangeLog.3, ChangeLog.5, ChangeLog, alias.c, cfgbuild.c, expmed.c, expr.c, final.c, flow.c, fold-const.c, function.c, config/alpha/alpha.md, config/alpha/vms-ld.c, config/arm/arm.c, config/arm/arm.h, config/c4x/libgcc.S, config/i370/i370.c, config/i386/i386.c, config/i386/i386-interix.h, config/i386/i386.md, config/i386/i386.h, config/i386/netbsd-elf.h, config/ia64/ia64.c, config/m32r/m32r-protos.h, config/mcore/mcore.h, config/rs6000/rs6000.h, config/sparc/linux64.h, config/sparc/sparc.c, config/v850/v850-protos.h, config/cris/cris.h, config/s390/s390.md, config/elfos.h: Fix spelling errors. From-SVN: r47815
2001-12-06flow.c (find_regno_partial): Return register, not the expression the ↵Andrew MacLeod1-2/+2
register is in. 2001-12-06 Andrew MacLeod <amacleod@redhat.com> * flow.c (find_regno_partial): Return register, not the expression the register is in. From-SVN: r47720
2001-12-05rtl.h (initialize_uninitialized_subregs): New prototype.Andrew MacLeod1-0/+108
2001-12-04 Andrew MacLeod <amacleod@redhat.com> * rtl.h (initialize_uninitialized_subregs): New prototype. * toplev.c (rest_of_compilation): Call initialize_uninitialized_subregs when optimization is on. * flow.c (find_regno_partial): Find subregs within an expression. (initialize_uninitialized_subregs): Initialize live on entry registers which are used in subreg expressions. From-SVN: r47644
2001-12-04flow.c (ior_reg_cond): Return NULL if ! add and rtx wasn't optimized.Jakub Jelinek1-50/+63
* flow.c (ior_reg_cond): Return NULL if ! add and rtx wasn't optimized. Return correct value if one of the subexpressions was optimized to 0 resp. 1. Optimize (x | A) | x and (x & A) | x. (and_reg_cond): Similarly. * gcc.c-torture/compile/20011130-2.c: New test. From-SVN: r47602
2001-11-27aix.h (REG_SIZE): Don't #undef.Kaveh R. Ghazi1-1/+4
* ia64/aix.h (REG_SIZE): Don't #undef. * sparc.h (REG_SIZE): Delete. * flow.c (mark_used_regs): Don't use REG_SIZE. * regs.h (REG_SIZE): Delete. From-SVN: r47378
2001-11-11ChangeLog.2, [...]: Fix spelling errors.Joseph Myers1-1/+1
* ChangeLog.2, ChangeLog.3, ChangeLog.4, ChangeLog.5, ChangeLog, cfg.c, cfganal.c, cfgcleanup.c, cfglayout.c, cfgloop.c, cfgrtl.c, collect2.c, combine.c, config.in, configure, configure.in, conflict.c, dwarf2out.c, dwarfout.c, except.c, final.c, flow.c, genattrtab.c, ggc-page.c, jump.c, lcm.c, predict.c, reg-stack.c, reload1.c, rtlanal.c, sched-rgn.c, toplev.c, unwind-dw2-fde.h: Fix spelling errors. From-SVN: r46928