aboutsummaryrefslogtreecommitdiff
path: root/gcc/gcse.c
AgeCommit message (Collapse)AuthorFilesLines
2003-01-17et-forest.c: Fix comment typos.Kazu Hirata1-14/+14
* et-forest.c: Fix comment typos. * et-forest.h: Likewise. * except.c: Likewise. * expr.c: Likewise. * flags.h: Likewise. * flow.c: Likewise. * gcc.c: Likewise. * gcse.c: Likewise. * genattrtab.c: Likewise. * genautomata.c: Likewise. * gengtype.c: Likewise. * genrecog.c: Likewise. * global.c: Likewise. * gthr-rtems.h: Likewise. From-SVN: r61443
2003-01-16gcse.c (one_cprop_pass): Change function arguments to take both cprop_jumps ↵Roger Sayle1-11/+118
and bypass_jumps flags... * gcse.c (one_cprop_pass): Change function arguments to take both cprop_jumps and bypass_jumps flags instead of just alter_jumps. (gcse_main): Update calls to one_cprop_pass, disabling bypassing. (bypass_jumps): New function to perform separate jump bypassing pass. * rtl.h (bypass_jumps): Add function prototype. * timevar.def (TV_BYPASS): New timing variable. * toplev.c (enum dump_file_index): Add new entry DFI_bypass. (dump_file): New entry for the bypass RTL dump file. (rest_of_compilation): Insert new jump bypassing optimization pass after loop. * doc/passes.texi: Document new pass. From-SVN: r61374
2003-01-07cselib.c (cselib_current_insn_in_libcall): New static variable.Jan Hubicka1-0/+3
* cselib.c (cselib_current_insn_in_libcall): New static variable. (new_elt_loc_list, cselib_process_insn, cselib_init): Keep track on whether we are inside libcall. * cselib.h (elt_loc_list): Add in_libcall. * gcse.c (do_local_cprop): Do not copy propagate using insns in libcalls. From-SVN: r61023
2002-12-16Merge basic-improvements-branch to trunkZack Weinberg1-6/+2
From-SVN: r60174
2002-11-19* gcse.c (gcse_emit_move_after): Correct typo in REG_EQUAL note.Roger Sayle1-1/+1
From-SVN: r59271
2002-10-14re PR rtl-optimization/8165 (builtin string functions SEGV on ↵Richard Henderson1-10/+4
alpha-pc-linux-gnu at -O2) PR opt/8165 * gcse.c (adjust_libcall_notes): Revert last change. * simplify-rtx.c (simplify_replace_rtx): Handle LO_SUM. From-SVN: r58130
2002-10-11re PR rtl-optimization/8165 (builtin string functions SEGV on ↵Richard Henderson1-6/+15
alpha-pc-linux-gnu at -O2) PR opt/8165 * gcse.c (adjust_libcall_notes): Also adjust notes for INSN. * gcc.c-torture/execute/20021011-1.c: New. From-SVN: r58071
2002-09-30i386.h (TARGET_CPP_CPU_BUILTINS): Define __SSE_MATH__.Jan Hubicka1-2/+9
* i386.h (TARGET_CPP_CPU_BUILTINS): Define __SSE_MATH__. * gcse.c (cprop_jump): Check that the register has not been modified (cprop_jump): Likewise. From-SVN: r57648
2002-09-22dbxout.c: Follow spelling conventions.Kazu Hirata1-31/+31
* 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-08-13gcse.c (adjust_libcall_notes): New function.J"orn Rennecke1-6/+72
* gcse.c (adjust_libcall_notes): New function. (do_local_cprop): Use it. Add fourth parameter. Changed caller. From-SVN: r56252
2002-08-01gcse.c (expr_hash_table_size, [...]): Removed.Zdenek Dvorak1-234/+191
* gcse.c (expr_hash_table_size, n_exprs, set_hash_table_size, n_sets): Removed. (expr_hash_table, set_hash_table): Type changed to ... (struct hash_table): New type. (hash_scan_insn, hash_scan_set, hash_scan_clobber, hash_scan_call, insert_expr_in_table, insert_set_in_table, compute_hash_table, dump_hash_table, lookup_expr, lookup_set, compute_local_properties, compute_ae_gen, compute_ae_kill): Modified to pass the table explicitly. (alloc_set_hash_table, alloc_expr_hash_table): Merged to ... (alloc_hash_table): New. (free_set_hash_table, free_expr_hash_table): Merged to ... (free_hash_table): New. (compute_set_hash_table, compute_expr_hash_table): Merged to ... (compute_hash_table_work): New. (classic_gcse, one_classic_gcse_pass, compute_cprop_data, find_avail_set, one_cprop_pass, find_bypass_set, compute_pre_data, pre_edge_insert, pre_insert_copies, pre_delete, pre_gcse, one_pre_gcse_pass, compute_transpout, compute_code_hoist_vbeinout, hoist_code, one_code_hoisting_pass, trim_ld_motion_mems): Altered due to changed type of hash tables. From-SVN: r55940
2002-07-30fold-const.c: Fix comment typos.Kazu Hirata1-1/+1
* fold-const.c: Fix comment typos. * gcse.c: Likewise. * reload1.c: Likewise. From-SVN: r55876
2002-07-25collect2.c (SYMBOL__MAIN): Remove.Neil Booth1-7/+2
* collect2.c (SYMBOL__MAIN): Remove. * gcse.c (obstack_chunk_alloc): Remove. (gcse_alloc): Fix to count allocated bytes. From-SVN: r55755
2002-07-23genautomata.c (VLA_HWINT_SHORTEN, [...]): Remove.Neil Booth1-5/+0
* genautomata.c (VLA_HWINT_SHORTEN, VLA_HWINT_LAST): Remove. * df.c (HANDLE_SUBREG, FOR_EACH_BB_IN_BITMAP_REV, FOR_EACH_BB_IN_SBITMAP): Remove. * gcse.c (NEVER_SET, FOLLOW_BACK_EDGES): Remove. * haifa-sched.c (DONE_PRIORITY, MAX_PRIORITY, TAIL_PRIORITY, LAUNCH_PRIORITY, DONE_PRIORITY_P, LOW_PRIORITY_P): Remove. * loop.c (PREFETCH_BLOACK_IN_LOOP_MIN, PREFETCH_LIMIT_TO_SIMULTANEOUS): Remove. * regrename.c (REGNO_MODE_OK_FOR_BASE_P): Remove. From-SVN: r55685
2002-07-23gcse.c (try_replace_reg): Use num_changes_pending.Jan Hubicka1-4/+3
2002-07-23 Jan Hubicka <jh@suse.cz> * gcse.c (try_replace_reg): Use num_changes_pending. * recog.c (num_changes_pending): New function. (validate_replace_src): Use validate_repalce_src_group. (validate_replace_src_group): New. * recog.h (validate_repalce_src_group): New. (num_changes_pending): Likewise. From-SVN: r55677
2002-07-23defaults.h (obstack_chunk_alloc, [...]): Default definition.Neil Booth1-1/+3
* 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-07-21gcse.c (do_local_cprop): Do not extend lifetimes of registers set by ↵Jan Hubicka1-1/+10
do_local_cprop. * gcse.c (do_local_cprop): Do not extend lifetimes of registers set by do_local_cprop. From-SVN: r55626
2002-07-20gcse.c: Include cselib.hJan Hubicka1-46/+140
* gcse.c: Include cselib.h (constptop_register): Break out from ... (cprop_insn): ... here; kill basic_block argument. (do_local_cprop, local_cprop_pass): New functions. (one_cprop_pass): Call local_cprop_pass. From-SVN: r55615
2002-07-18gcse.c (hoist_expr_reaches_here_p): Stop once expr_bb is reached.Jan Hubicka1-10/+15
* gcse.c (hoist_expr_reaches_here_p): Stop once expr_bb is reached. * gcse.c (try_replace_reg): Do not return false positives. From-SVN: r55553
2002-06-28* gcse.c (gcse_emit_move_after): Use gen_move_insn to produce the move.Jan Hubicka1-7/+5
From-SVN: r55087
2002-06-27gcse.c (hoist_code): Rewrite to only get list of dominated blocks once per BB.Daniel Berlin1-10/+16
* gcse.c (hoist_code): Rewrite to only get list of dominated blocks once per BB. Also fix reversed test (by removing need for the test at all). From-SVN: r55031
2002-06-20Mon Jun 10 20:42:34 CEST 2002 Jan Hubicka <jh@suse.cz>Jan Hubicka1-7/+5
* basic-block.h: Do not include et-forest.h (dominance_info): Declare as struct dominance-info. * cfglayout.c (cleanup_unconditional_jumps): Remove the edge before deleting block. * dominance.c (struct dominance_info): Define. (BB_NODE, SET_BB_NODE): New macros. (bb_hash_func, bb_eq_func): Kill. (calculate_dominace_info, free_dominacne_info, set_immediate_dominator, nearest_common_dominator, dominated_by_p, recount_dominator, add_to_dominance_info, delete_from_dominance_info): update for new representation. (get_dominated_by, redirect_immediate_dominators): Rewrite using enumerate_sons. * ifcvt.c (process_double_test_block, merge_if_block, find_cond_trap, find_if_case_1, find_if_case_2): Remove killed blocks from dominance structure. * et-forest.h: Update copyright; revamp all function to operate on nodes (et_forest_value): Kill. (et_forest_enumerate_sons, et_forest_node_value): New. * et-forest.c: Update copyright. * et-forest.h: Update copyright; revamp all function to operate on nodes (et_forest_value): Kill. (et_forest_enumerate_sons, et_forest_node_value): New. Thu Jun 6 22:43:43 CEST 2002 Jan Hubicka <jh@suse.cz> * basic-block.h: Inlude et-forest.h (basic_block_def): Kill dominator. (dominance_info): New type. (loops): Use dominace_info. (dominace handling functions): Take dominace_info as argument instead of bitmaps. (create_preheader): Likewise. * cfg.c (entry_exit_blocks): Kill dominator. (dump_flow_info): Do not dump dominators. * cfglayout.c (cleanup_unconditonal_jumps): Delete deleted block from dominators. * cfgloop.c (flow_pre_header_find): Use dominacne_info. (flow_loops_pre_header_scan, make_forwarder_block, canonicale_loop_headers, flow_loops_find): Likewise. * dominance.c: Include error.h (idoms_to_doms): Kill. (bb_hash_func, bb_eq_func): New static functions. (debug_dominace_info): New global function. (calculate_dominance_info): Use new et forest structure. (free_dominace_info, get_immediate_dominator, set_immediate_dominator, get_dominated_by, redirect_immediate_dominators, nearest_common_dominator, dominated_by_p, verify_dominators, recount_dominator, iterate_fix_dominators, add_to_dominace_info, delete_from_dominance_info): New global functions. * gcse.c (domnators): CHange to dominance_info. (alloc_hoist_mem): Do not alloc dominators (free_code_hoist_mem): Use free_dominance_info. (compute_code_hoist_data): Use dominance_info. (hoist_code): Likewise. * ifcvt.c (post_dominators): Likewise. (find_if_case_2, if_convert): Likewise. * predict.c (process_note_predictions, process_note_prediction, estimate-probability): Likewise. * sched-rgn.c (find_rgns, init_regions): Likewise. * ssa-dce.c (find_all_control_dependences, fint_control_depemndence, find_pdom, delete_insn_bb, ssa_eliminate_dead_code): Likewise. * ssa.c (compute_dominance_frontiers_1, rename_block, rename_registers, find_evaluations, convert_to_ssa): Likewise. * ssa.h (compute_dominance_frontiers): Likewise. Thu Jun 6 22:57:34 CEST 2002 Pavel Nejedly <bim@atrey.karlin.mff.cuni.cz> * Makefile.in (et-forest.c): Add. * et-forest.c: New file. * at-forest.h: New file. Co-Authored-By: Pavel Nejedly <bim@atrey.karlin.mff.cuni.cz> From-SVN: r54843
2002-06-14gcse.c (delete_null_pointer_checks_1): Inform caller if any null pointer ↵Jeff Law1-7/+16
checks were eliminated. * gcse.c (delete_null_pointer_checks_1): Inform caller if any null pointer checks were eliminated. Update prototype. (delete_null_pointer_checks): Similarly. * rtl.h (delete_null_pointer_checks): Update prototype. * toplev.c (rest_of_compilation): Only run cleanup_cfg if delete_null_pointer_checks deletes one or more null pointer checks. Do not run cleanup_cfg before gcse, the CFG is accurate and optimized at that point.. From-SVN: r54617
2002-06-11i386.c (x86_promote_QImode): Set for AthlonJan Hubicka1-0/+5
* i386.c (x86_promote_QImode): Set for Athlon (x86_fast_prefix): New global variable. (x86_arch_always_fancy_math_387): Fix formating. * i386.h (x86_fast_prefix): Declare (TARGET_FAST_PREFIX): define. * i386.md (and to strict_low_part, HI to SI promoting splitter): Use new macro. * i386.h (RTX_COSTS): float_extend is not for free for SSE. From-SVN: r54521
2002-06-11Delete SEQUENCE rtl usage outside of reorg and ssa passes.David S. Miller1-20/+15
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-10toplev.c (rest_of_compilation): Disable early if-conversion pass.Roger Sayle1-1/+1
* toplev.c (rest_of_compilation): Disable early if-conversion pass. * gcse.c (bypass_conditional_jumps): Fix typo in setcc test. From-SVN: r54475
2002-06-04gbl-ctors.h: Fix formatting.Kazu Hirata1-175/+175
* gbl-ctors.h: Fix formatting. * gcc.c: Likewise. * gccspec.c: Likewise. * gcov.c: Likewise. * gcov-io.h: Likewise. * gcse.c: Likewise. * ggc-common.c: Likewise. * ggc.h: Likewise. * ggc-page.c: Likewise. * ggc-simple.c: Likewise. * global.c: Likewise. * graph.h: Likewise. * gthr-dce.h: Likewise. * gthr.h: Likewise. * gthr-posix.h: Likewise. * gthr-rtems.h: Likewise. * gthr-solaris.h: Likewise. * gthr-win32.h: Likewise. From-SVN: r54240
2002-06-04Merge from pch-branch up to tag pch-commit-20020603.Geoffrey Keating1-2/+3
From-SVN: r54232
2002-06-04gcse.c (cprop_jump): Use single_set to get the pattern from the setcc argument.Roger Sayle1-3/+6
* gcse.c (cprop_jump): Use single_set to get the pattern from the setcc argument. From-SVN: r54221
2002-06-02* gcse.c (bypass_conditional_jumps): Fix typo last change.Richard Henderson1-1/+1
From-SVN: r54189
2002-06-02loop.c (emit_prefetch_instructions): Properly place the address computation.Jan Hubicka1-2/+2
* 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-06-02rtl.h (CC0_P): New.Richard Henderson1-31/+24
* rtl.h (CC0_P): New. * gcse.c (cprop_jump): Use it with single_set. Tweak dump text. (cprop_insn): Allow any mode register; use CC0_P. CSE out single_set. (bypass_block): Save old dest block for dump text. (bypass_conditional_jumps): Allow any mode register; use CC0_P. Allow only true SET insns, not single_set. From-SVN: r54178
2002-06-02cfgrtl.c (commit_one_edge_insertion): Fix warning.Jan Hubicka1-1/+1
* cfgrtl.c (commit_one_edge_insertion): Fix warning. * gcse.c (bypass_conditional_jumps): CSE out single_set call. From-SVN: r54175
2002-06-02* gcse.c (bypass_conditional_jumps): Use single set to obtain set.Jan Hubicka1-1/+2
From-SVN: r54165
2002-06-01gcse.c (cprop_cc0_jump): Function deleted.Roger Sayle1-68/+265
* gcse.c (cprop_cc0_jump): Function deleted. (cprop_jump): Take an additional argument which is the possibly NULL cc setting insn immediately before the conditional jump. When a MODE_CC set is present, substitute it into the JUMP_INSN before attempting the constant propagation. (cprop_insn): Recognize cc setters followed by conditional jumps as a special case. Use cprop_jump instead of cprop_cc0_jump. (cprop_one_pass): Call bypass_conditional_jumps if altering jumps. (find_bypass_set): New function based upon find_avail_set used by cprop, but finds constant expressions available at the end of basic blocks. (bypass_block): New function. Given a basic block that begins with a conditional jump and multiple incoming edges, perform the jump bypass optimization. (bypass_conditional_jumps): New function. Call bypass_block with each suitable basic block in the CFG using a simple single pass. From-SVN: r54152
2002-05-31gcse.c (gcse_emit_move_after): New.Jan Hubicka1-31/+40
* gcse.c (gcse_emit_move_after): New. (pre_delete, hoist_store): Use it. * reload1.c (emit_input_reload_insns): Use constrain_operands instead of constraint_accepts_reg_p to verify optimization. (constraint_accepts_reg_p): Kill * reload1.c (reload_cse_delete_noop_set): Kill. (reload_cse_simplify): use delte_insn_and_edges. From-SVN: r54105
2002-05-27basic-block.h (last_basic_block): Defined as synonym for n_basic_blocks.Zdenek Dvorak1-57/+57
* 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-23bb-reorder.c (make_reorder_chain, [...]): Use FOR_EACH_BB macros to iterate ↵Zdenek Dvorak1-128/+140
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-23* gcse.c (hash_expr): Do not use alias set for hashing.Jan Hubicka1-1/+3
From-SVN: r53772
2002-05-21bb-reorder.c (make_reorder_chain_1): Modified.Zdenek Dvorak1-1/+1
* 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-16Revert "Basic block renumbering removal", and two followup patches.Richard Henderson1-241/+237
From-SVN: r53537
2002-05-16Basic block renumbering removal.Zdenek Dvorak1-237/+241
From-SVN: r53522
2002-05-15PR optimization/5172, optimization/5200Jakub Jelinek1-1/+2
2002-03-09 Jakub Jelinek <jakub@redhat.com> PR optimization/5172, optimization/5200 * gcse.c (gcse_main): Disable store_motion. From-SVN: r53477
2002-04-22alias.c (canon_true_dependence): Special case (mem:blk (scratch)).Richard Henderson1-17/+41
* alias.c (canon_true_dependence): Special case (mem:blk (scratch)). * gcse.c (free_insn_expr_list_list): New. (clear_modify_mem_tables): Use it. Fix bit set usage. (canon_list_insert): Use EXPR_LISTs for expressions. (record_last_mem_set_info): Factor BLOCK_NUM (insn). From-SVN: r52624
2002-04-10re PR rtl-optimization/6233 (simple loop miscompilation)Alan Modra1-15/+1
PR optimization/6233 * rtlanal.c (pure_call_p): New function. * rtl.h (pure_call_p): Declare. * loop.c (prescan_loop): Use it to set has_nonconst_call. * gcse.c (store_killed_in_insn): Use pure_call_p here too. From-SVN: r52110
2002-04-09sbitmap.c (sbitmap_union_of_diff, [...]): Do not return changed status.Richard Henderson1-4/+4
* sbitmap.c (sbitmap_union_of_diff, sbitmap_a_and_b, sbitmap_a_xor_b, sbitmap_a_or_b, sbitmap_a_or_b_and_c, sbitmap_a_and_b_or_c): Do not return changed status. (sbitmap_union_of_diff_cg, sbitmap_a_and_b_cg, sbitmap_a_xor_b_cg, sbitmap_a_or_b_cg, sbitmap_a_or_b_and_c_cg, sbitmap_a_and_b_or_c_cg): New functions that do return changed status. * sbitmap.h: Update decls. * gcse.c, lcm.c: Use _cg functions as needed. From-SVN: r52094
2002-03-24gcse.c: Include except.h.Richard Henderson1-0/+1
* gcse.c: Include except.h. * Makefile.in (gcse.o): Update. From-SVN: r51297
2002-03-08* gcse.c (insert_insn_end_bb): Fix typo in last change.Kaveh R. Ghazi1-1/+1
From-SVN: r50453
2002-03-07basic-block.h (fixup_abnormal_edges): Declare.Jan Hubicka1-3/+18
* basic-block.h (fixup_abnormal_edges): Declare. * reload1.c (fixup_abnormal_edges): New function. * reg-stack.c (convert_regs): Use it. * gcse.c (insert_insn_end_bb): Handle trapping insns. * gcse.c (hash_scan_set): Refuse instructions with EH edges. From-SVN: r50405
2002-02-28basic-block.h (BB_REACHABLE): Renumber.Jan Hubicka1-2/+2
* 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