aboutsummaryrefslogtreecommitdiff
path: root/gcc/ifcvt.c
AgeCommit message (Collapse)AuthorFilesLines
2000-12-27Handle jump insns that are PARALLEL.Nick Clifton1-1/+1
From-SVN: r38501
2000-11-27While building global lifetime information, keep track of which registers ↵Bernd Schmidt1-2/+3
are only conditionally set. While building global lifetime information, keep track of which registers are only conditionally set. Use this to force rescans in more cases where they are needed. From-SVN: r37801
2000-11-14Michael Matz <matzmich@cs.tu-berlin.de>Michael Matz1-1/+1
* dominance.c: New file. * Makefile.in (OBJS): Add dominance.o. * flow.c (compute_flow_dominators): Remove. (compute_immediate_dominators): Remove. (compute_immediate_postdominators): Remove. * basic-block.h: Remove their prototypes. (calculate_dominance_info): Add prototype. * dce.c (eliminate_dead_code): Change calls to above functions. Don't compute dominators but only immediate dominators. * flow.c (flow_loops_find): Change callers. * gcse.c (compute_code_hoist_data): Likewise. * haifa-sched.c (schedule_insns): Likewise. * ifcvt.c (if_convert): Likewise. * ssa.c (convert_to_ssa): Likewise, and only compute immediate dominators. From-SVN: r37449
2000-09-12Fix ia64-linux glibc intl/loadmsgcat.c miscompilation.Jim Wilson1-0/+5
* ifcvt.c (noce_process_if_block): If A and B are the same, and no else block, and X has side-effects, then fail. From-SVN: r36373
2000-08-20Make sure THEN block has any insns at before testing for indirect jumpMichael Meissner1-3/+6
From-SVN: r35813
2000-08-19Do not consider a THEN block ending in an indirect jump for conditional ↵Michael Meissner1-1/+13
compilation; Fix d30v warning From-SVN: r35812
2000-06-14ifcvt.c (EDGE_COMPLEX): Move definition ...John Wehle1-2/+0
* ifcvt.c (EDGE_COMPLEX): Move definition ... * basic-block.h (EDGE_COMPLEX): ... here. * loop.c (check_dbra_loop): Specify the register when generating REG_NONNEG notes and don't generate duplicates. From-SVN: r34542
2000-06-13Do not handle dead code via conditional execution if special handling is neededMichael Meissner1-0/+4
From-SVN: r34512
2000-06-11Warning fixes:Kaveh R. Ghazi1-2/+2
* bb-reorder.c (build_scope_forest): Initialize variable `curr_scope'. * calls.c (expand_call): Likewise for variables `save_pending_stack_adjust' and `save_stack_pointer_delta'. * i386.c (function_arg_advance, function_arg): Cast to avoid signed/unsigned warnings. * i386.h (MEMORY_MOVE_COST): Likewise. * ifcvt.c (cond_exec_process_if_block): Initialize variables `else_start' and `else_end'. * libgcc2.h (__eh_alloc, __eh_free): Prototype. * regrename.c (rr_replace_reg): Initialize variable `dest_subregno'. ch: * Makefile.in (EXPR_H): New dependency variable. (actions.o, expr.o): Use EXPR_H. (lang.o): Depend on RTL_H and EXPR_H. * lang.c: Include rtl.h and expr.h. (lang_get_alias_set): Mark parameter with ATTRIBUTE_UNUSED. cp: * decl2.c (compare_options): Don't needlessly cast away const-ness. f: * com.c (lang_get_alias_set): Mark parameter with ATTRIBUTE_UNUSED. java: * decl.c (create_primitive_vtable): Prototype. * jcf-write.c (generate_bytecode_insns): Initialize variable `saved_context'. * lang.c (lang_get_alias_set): Mark parameter with ATTRIBUTE_UNUSED. From-SVN: r34490
2000-06-04add IFCVT_MODIFY macros for the MD file to tweak the conditional execution ↵Michael Meissner1-1/+34
support. From-SVN: r34386
2000-05-31ifcvt.c (merge_if_block): Be prepared for JOIN to have no remaining edges.Richard Henderson1-7/+23
* ifcvt.c (merge_if_block): Be prepared for JOIN to have no remaining edges. (find_if_block): Allow THEN with no outgoing edges. * flow.c (merge_blocks_nomove): Remove a barrier not following a jump as well. From-SVN: r34317
2000-05-31* ifcvt.c (cond_exec_process_insns): Don't ever ignore clobbers.Richard Henderson1-4/+2
From-SVN: r34316
2000-05-31ifcvt.c (cond_exec_process_if_block): Do nothing if the last insn in the ↵Jeffrey A Law1-0/+10
block is more than just a simple conditional... * ifcvt.c (cond_exec_process_if_block): Do nothing if the last insn in the block is more than just a simple conditional branch. (noce_process_if_block): Similarly. From-SVN: r34287
2000-05-26ifcvt.c (cond_exec_get_condition): Set test_if to the SET_SRC of get_pc.Richard Earnshaw1-1/+1
* ifcvt.c (cond_exec_get_condition): Set test_if to the SET_SRC of get_pc. From-SVN: r34192
2000-05-25ifcvt.c (seq_contains_jump): New.Richard Henderson1-0/+31
* ifcvt.c (seq_contains_jump): New. (noce_try_store_flag_constants): Use it to fail conversion. (noce_try_store_flag_inc, noce_try_store_flag_mask): Likewise. From-SVN: r34179
2000-05-25combine.c (try_combine): Use any_condjump_p...Jan Hubicka1-9/+10
* combine.c (try_combine): Use any_condjump_p, any_uncondjump_p and pc_set at the place of simplejump_p and condjump_p. * cse.c (record_jump_equiv): Likewise. * emit-rtl.c (emit): Likewise. * explow.c (find_next_ref): Likewise. * flow.c (tidy_fallthru_edge): Likewise. (init_propagate_block_info): Likewise. * gcse.c (delete_null_pointer_checks): Likewise. * ifcvt.c (cond_exec_get_condition, noce_get_condition, dead_or_predicable): Likewise. * integrate.c (copy_insn_list): Likewise. * loop.c (scan_loop, verify_dominator, find_and_verify_loops, for_each_insn_in_loop, check_dbra_loop, get_condition, insert_bct, load_mems): Likewise. * resource.c (find_dead_or_set_registers): Likewise. * sibcalls.c (simplejump_p): Likewise. * unroll.c (copy_loop_body, reg_dead_after_loop): Likewise. From-SVN: r34175
2000-05-24* ifcvt.c (if_convert): Update life info globally.Jakub Jelinek1-1/+3
From-SVN: r34119
2000-05-20Oops, checked in verify-flow.patch by mistake, revertingAlexandre Oliva1-2/+1
From-SVN: r34063
2000-05-20* ifcvt.c (if_convert): Scan and kill dead code.Alexandre Oliva1-2/+4
From-SVN: r34057
2000-05-19cse.c (cse_basic_block): Only call find_reg_note if REG_NOTES not 0.Richard Kenner1-1/+1
* cse.c (cse_basic_block): Only call find_reg_note if REG_NOTES not 0. * reload.c (find_equiv_reg): Likewise. * alias.c (init_alias_analysis): Likewise. Only call prologue_epilogue_contains on insns. * basic-block.h (REG_SET_TO_HARD_REG_SET): Call new function. * bb-reorder.c (hard-reg-set.h): Include earlier. * haifa-sched.c (hard-reg-set.h): Likewise. * ifcvt.c (hard-reg-set.h): Likewise. * local-alloc.c (hard-reg-set.h): Likewise. * loop.c (hard-reg-set.h): Likewise. * predict.c (hard-reg-set.h): Likewise. * regrename.c (hard-reg-set.h): Likewise. * flow.c (hard-reg-set.h): Likewise. (reg_set_to_hard_reg_set): New function. * bitmap.c (regs.h, basic-block.h): No longer include. (bitmap.h): Now include. * conflict.c (hard-reg-set.h): Include. * profile.c (hard-reg-set.h): Likewise. * print-rtl.c (hard-reg-set.h): Likewise. * sbitmap.c (hard-reg-set.h): Likewise. * toplev.c (hard-reg-set.h): Likewise. * unroll.c (hard-reg-set.h, basic-block.h): Likewise. * hard-reg-set.h (reg_names): Now constant. * regs.h (reg_names): Likewise. * regclass.c (reg_names): Likewise. * loop.h (basic-block.h): No longer include. (bitmap.h): Now include. * reload1.c (order_regs_for_reload): Avoid loop over reg sets. * Makefile.in (LOOP_H, sbitmap.o, profile.o): Reflect above changes. (toplev.o, print-rtl.o, conflict.o, unroll.o, bitmap.o): Likewise. From-SVN: r34039
2000-05-19* ifcvt.c (find_if_case_2): Don't allow THEN to be EXIT.Richard Henderson1-3/+6
From-SVN: r34036
2000-05-15ifcvt.c (cond_exec_process_insns): Drop USE and CLOBBER insns that get in ↵Richard Henderson1-0/+17
the way after reload. * ifcvt.c (cond_exec_process_insns): Drop USE and CLOBBER insns that get in the way after reload. (cond_exec_process_if_block): Skip a label heading THEN block. From-SVN: r33923
2000-05-13* ifcvt.c (if_convert): Do not free NULL.Philippe De Muyter1-1/+2
From-SVN: r33888
2000-05-12Makefile.in (final.o): Depend on BASIC_BLOCK_H.Richard Henderson1-52/+7
* Makefile.in (final.o): Depend on BASIC_BLOCK_H. * final.c (final_end_function): Use app_disable. Rearrange note handling into a switch. Emit deleted labels. (output_asm_label): Generate label strings for deleted labels. * flow.c (tail_recursion_label_list): New. (find_basic_blocks_1): Set label_value_list directly. Collect list of tail recursion labels from call_placeholders. Don't add deleted labels to the label value list. (cleanup_cfg): Use free_EXPR_LIST_list. (flow_delete_insn_chain): Turn non-removable labels into notes. (flow_delete_block): Don't disable deleting the block because of a non-removable label. (tail_recursion_label_p): New. (merge_blocks_move_predecessor_nojumps): Don't disable the merge because of a label. (merge_blocks_move_successor_nojumps): Likewise. Also move a jump table. (merge_blocks): Disable a merge because of tail recursion labels. * ifcvt.c (merge_if_block): Don't disable a merge because of a label. Use a more accurate measure of not merging the join block. (find_if_block): Don't disable conversion because of a label. (find_if_case_1, find_if_case_2): Likewise. * jump.c (duplicate_loop_exit_test): Preserve the kind of list element when copying. (squeeze_notes): Also leave EH notes. (mark_jump_label): Ignore deleted labels. Use an INSN_LIST for REG_LABEL notes. (delete_insn): Preserve LABEL_NAME in NOTE_SOURCE_FILE when deleting a label. * print-rtl.c (print_rtx): Print NOTE_SOURCE_FILE for NOTE_INSN_DELETED_LABEL. Print `[# deleted]' for a label_ref referring to a deleted label. Convert tail handling to a switch. * rtl.def (CODE_LABEL): Rearrange elements to be compatible with NOTE for NOTE_INSN_DELETED_LABEL. (NOTE): Fix commentary. * rtl.h (REG_LABEL): Update commentary wrt INSN_LIST. (REG_CC_SETTER, REG_CC_USER, REG_LIBCALL): Likewise. (CODE_LABEL_NUMBER, LABEL_NAME): Update index. (LABEL_NUSES, LABEL_REFS): Likewise. * unroll.c (copy_loop_body): Don't copy NOTE_INSN_DELETED_LABEL. From-SVN: r33876
2000-05-08ifcvt.c (cond_exec_process_insns): New argument prob_val.Richard Henderson1-9/+35
* ifcvt.c (cond_exec_process_insns): New argument prob_val. Attach it to call insns. (cond_exec_process_if_block): Track probability for true and false branches. (dead_or_predicable): Likewise. From-SVN: r33791
2000-05-06ifcvt.c (noce_process_if_block): Don't use an insn_b from test_bb if a or b ↵Richard Henderson1-1/+2
uses x. * ifcvt.c (noce_process_if_block): Don't use an insn_b from test_bb if a or b uses x. From-SVN: r33738
2000-05-06ifcvt.c (noce_process_if_block): Don't use an insn_b from test_bb if insn_a ↵Richard Henderson1-1/+2
uses x. * ifcvt.c (noce_process_if_block): Don't use an insn_b from test_bb if insn_a uses x. From-SVN: r33737
2000-05-04* ifcvt.c (noce_process_if_block): Always reset X in the A == B case.Richard Henderson1-1/+1
From-SVN: r33690
2000-05-04ifcvt.c (noce_process_if_block): Fail if A or B modified between condition ↵Richard Henderson1-5/+11
and jump. * ifcvt.c (noce_process_if_block): Fail if A or B modified between condition and jump. From-SVN: r33689
2000-05-03ifcvt.c (noce_try_cmove_arith): Use may_trap_p to thest whether address may ↵Jan Hubicka1-2/+2
trap. * ifcvt.c (noce_try_cmove_arith): Use may_trap_p to thest whether address may trap. From-SVN: r33627
2000-05-01ifcvt.c (dead_or_predicable): Set merge_bb->end to the insn before the ↵Richard Henderson1-2/+3
sequence we're moving... * ifcvt.c (dead_or_predicable): Set merge_bb->end to the insn before the sequence we're moving, not to merge_bb->head. From-SVN: r33605
2000-05-01* ifcvt.c (if_convert): Only verify_flow_info if ENABLE_CHECKING.Richard Henderson1-0/+2
From-SVN: r33590
2000-05-01ifcvt.c (noce_emit_cmove): Conditionally compile call to emit_conditional_move.Richard Henderson1-0/+8
* ifcvt.c (noce_emit_cmove): Conditionally compile call to emit_conditional_move. From-SVN: r33585
2000-04-30ifcvt.c (noce_process_if_block): Fail the conversion if X is referenced ↵Richard Henderson1-6/+11
bewteen the condition and the jump. * ifcvt.c (noce_process_if_block): Fail the conversion if X is referenced bewteen the condition and the jump. Don't delete anything but the jump. From-SVN: r33563
2000-04-30ifcvt.c (dead_or_predicable): Manually squeeze non-movable notes from the ↵Richard Henderson1-0/+13
last insn in the sequence. * ifcvt.c (dead_or_predicable): Manually squeeze non-movable notes from the last insn in the sequence. From-SVN: r33555
2000-04-30ifcvt.c: New file.Richard Henderson1-0/+2024
* ifcvt.c: New file. * Makefile.in (OBJS): Add it. (ifcvt.o): New target. * jump.c (jump_optimize_1): Remove all code related to if-conversion, and conditional arithmetic. (find_insert_position): Remove. * timevar.def (TV_IFCVT, TV_IFCVT2): New. * toplev.c (DFI_ce, DFI_ce2): New. (dump_file): Add ce and ce2 dumps. (rest_of_compilation): Run if_convert a couple o times. Set cse_not_expected after cse2. Don't set no_new_pseudos until after sched1 or recompute_reg_usage. From-SVN: r33547