aboutsummaryrefslogtreecommitdiff
path: root/gcc/lcm.c
AgeCommit message (Collapse)AuthorFilesLines
2000-08-04alias.c (mark_constant_function): Use INSN_P.Rodney Brown1-1/+1
* alias.c (mark_constant_function): Use INSN_P. (init_alias_analysis): Likewise. * combine.c (combine_instructions): Use INSN_P. (can_combine_p): Likewise. (try_combine): Likewise. (distribute_notes): Likewise. (distribute_links): Likewise. * cse.c (cse_around_loop): Use INSN_P. (invalidate_skipped_block): Likewise. (cse_set_around_loop): Likewise. (cse_end_of_basic_block): Likewise. (delete_trivially_dead_insns): Likewise. * emit-rtl.c (unshare_all_rtl_again): Use INSN_P. (unshare_all_rtl_1): Likewise. (next_cc0_user): Likewise. (try_split make_insn_raw): Likewise. (remove_unnecessary_notes): Likewise. * final.c (shorten_branches): Use INSN_P. (leaf_renumber_regs): Likewise. (leaf_renumber_regs_insn): Likewise. * flow.c (find_label_refs): Use INSN_P. (verify_wide_reg): Likewise. (notice_stack_pointer_modification): Likewise. (count_or_remove_death_notes): Likewise. (verify_flow_info): Likewise. (clear_log_links): Likewise. * function.c (fixup_var_refs_insns): Use INSN_P. (compute_insns_for_mem): Likewise. * gcse.c (alloc_gcse_mem): Use INSN_P. (compute_sets): Likewise. (compute_hash_table): Likewise. (classic_gcse): Likewise. (cprop): Likewise. (insert_insn_end_bb): Likewise. (delete_null_pointer_checks_1): Likewise. * global.c (expand_preferences): Use INSN_P. (build_insn_chain): Likewise. * graph.c (node_data): Use INSN_P. * haifa-sched.c (priority): Use INSN_P. (rm_line_notes): Likewise. (rm_other_notes): Likewise. (find_insn_reg_weight): Likewise. (init_target_units): Likewise. (schedule_block): Likewise. (compute_block_forward_dependences): Likewise. (debug_dependencies): Likewise. (set_priorities): Likewise. * integrate.c (function_cannot_inline_p): Use INSN_P. (save_parm_insns): Likewise. (copy_insn_list): Likewise. * jump.c (mark_all_labels): Use INSN_P. (never_reached_warning): Likewise. * lcm.c (optimize_mode_switching): Use INSN_P. * local-alloc.c (validate_equiv_mem): Use INSN_P. (memref_used_between_p): Likewise. (update_equiv_regs): Likewise. (block_alloc): Likewise. (no_conflict_p): Likewise. * loop.c (scan_loop): Use INSN_P. (find_and_verify_loops): Likewise. (count_loop_regs_set): Likewise. (loop_reg_used_before_p): Likewise. (strength_reduce): Likewise. (recombine_givs): Likewise. (check_dbra_loop): Likewise. (load_mems): Likewise. (try_copy_prop): Likewise. * print-rtl.c (print_rtx): Use INSN_P. * recog.c (find_single_use): Use INSN_P. * reg-stack.c (stack_regs_mentioned): Use INSN_P. (next_flags_user): Likewise. (swap_rtx_condition): Likewise. * regmove.c (mark_flags_life_zones): Use INSN_P. (optimize_reg_copy_1): Likewise. (optimize_reg_copy_2): Likewise. (optimize_reg_copy_3): Likewise. (reg_is_remote_constant_p): Likewise. (fixup_match_2): Likewise. (regmove_optimize): Likewise. (fixup_match_1): Likewise. * regrename.c (build_def_use): Use INSN_P. (replace_reg_in_block): Likewise. (consider_use): Likewise. * reload.c (find_equiv_reg): Use INSN_P. * reload1.c (reload): Use INSN_P. (maybe_fix_stack_asms): Likewise. (calculate_needs_all_insns): Likewise. (reload_as_needed): Likewise. (emit_output_reload_insns): Likewise. (delete_address_reloads_1): Likewise. (reload_cse_regs_1): Likewise. (reload_combine): Likewise. (reload_cse_move2add): Likewise. * reorg.c (redundant_insn): Use INSN_P. (dbr_schedule): Likewise. * resource.c (find_dead_or_set_registers): Use INSN_P. (mark_target_live_regs): Likewise. * rtlanal.c (reg_used_between_p): Use INSN_P. (reg_referenced_between_p): Likewise. (reg_set_between_p): Likewise. (reg_set_p): Likewise. (single_set): Likewise. (multiple_sets): Likewise. (find_last_value): Likewise. (reg_set_last): Likewise. (find_reg_note): Likewise. (find_regno_note): Likewise. * sibcall.c (sequence_uses_addressof): Use INSN_P. * simplify-rtx.c (cselib_process_insn): Use INSN_P. * ssa.c (find_evaluations): Use INSN_P. (rename_block): Likewise. (rename_equivalent_regs): Likewise. * unroll.c (loop_find_equiv_value): Use INSN_P. (set_dominates_use): Likewise. * varasm.c (mark_constant_pool): Use INSN_P. (mark_constants): Likewise. * config/alpha/alpha.c (alpha_does_function_need_gp): Use INSN_P. (alphaev4_next_group): Likewise. (alphaev5_next_group): Likewise. * config/c4x/c4x.c (c4x_process_after_reload): Use INSN_P. (c4x_rptb_rpts_p): Likewise. * config/mips/mips.c (mips16_optimize_gp): Use INSN_P. * config/rs6000/rs6000.c (uses_TOC): Use INSN_P. (rs6000_adjust_priority): Likewise. * config/sh/sh.c (sh_loop_align): Use INSN_P. (machine_dependent_reorg): Likewise. (split_branches): Likewise. * config/tahoe/tahoe.c (tahoe_cmp_check): Use INSN_P. From-SVN: r35494
2000-07-20gcse.c (record_one_set): Prepend instead of append onto reg_set_table, ↵Michael Matz1-24/+62
making it O(n) instead O(n^2). * gcse.c (record_one_set): Prepend instead of append onto reg_set_table, making it O(n) instead O(n^2). * lcm.c (compute_antinout_edge,compute_laterin,compute_available): Use a queue instead of a stack as worklist. From-SVN: r35158
2000-05-28lcm.c (make_preds_opaque): Fix comment.Clinton Popetz1-31/+37
* lcm.c (make_preds_opaque): Fix comment. (optimize_mode_switching): Use NORMAL_MODE instead of MODE_USES_IN_EXIT_BLOCK. Change leftover instance of FP_MODE_NONE to no_mode. Rename MODE_AT_ENTRY to NORMAL_MODE. Handle insertions before an existing NOTE_INSN_BASIC_BLOCK. * tm.texi (OPTIMIZE_MODE_SWITCHING): Refer to NORMAL_MODE. (MODE_USES_IN_EXIT_BLOCK): Delete. (MODE_AT_ENTRY) Rename to NORMAL_MODE. * sh.h (MODE_USES_IN_EXIT_BLOCK): Delete. (MODE_AT_ENTRY): Rename to NORMAL_MODE. (MODE_NEEDED): Don't look for USE. (EPILOGUE_USES): Define. From-SVN: r34243
2000-05-17toplev.c (rest_of_compilation): Don't call optimize_mode_switching unless ↵Richard Henderson1-10/+21
OPTIMIZE_MODE_SWITCHING. * toplev.c (rest_of_compilation): Don't call optimize_mode_switching unless OPTIMIZE_MODE_SWITCHING. Conditionally set no_new_pseudos. Don't call recompute_reg_usage if no_new_pseudos is true. * lcm.c (optimize_mode_switching): Move ifdefs outside function. Return true if we did work; update global life information. * basic-block.h (optimize_mode_switching): Update decl. From-SVN: r33965
2000-02-28lcm.c: Minor reformatting throughout.Richard Kenner1-159/+151
* lcm.c: Minor reformatting throughout. (reg_dies, reg_becomes_live): Properly handle multiple hard regs. From-SVN: r32234
2000-02-18bitmap.c (bitmap_operation): Avoid using -1 for index since unsigned.Richard Kenner1-1/+11
* bitmap.c (bitmap_operation): Avoid using -1 for index since unsigned. * cppinit.c (new_pending_define): Add cast to avoid warning. * expmed.c (extract_bit_field): Likewise. * flow.c (enum reorder_skip_type): New type. (skip_insns_between_blcok): New it. Rework to avoid warning about possibly undefined variable. * function.c (assign_parms): Make thisparm_boundary unsigned. * genrecog.c (write_switch): Cast XWINT result to int. * lcm.c: Many static fcns and vars now #ifdef OPTIMIZE_MODE_SWITCHING. * mips-tfile.c (init_file): Make two versions of FDR intializer: one for MIPS and one for Alpha. (get_tag, copy_object): Add casts to avoid warnings. * optabs.c (init_one_libfunc): Cast NAME to (char *). * reload.c (find_reloads): Make TYPE enum reload_type. * sbitmap.c (dump_sbitmap): J is unsigned; don't use "1L". * unroll.c (unroll_loop): Initialize UNROLL_NUMBER. * varasm.c (compare_constant_1): Add cast to avoid warning. * config/alpha/alpha.c (alpha_emit_xfloating_libcall): Cast FUNC to (char *). (alpha_expand_unaligned_load, alpha_expand_unaligned_store): Cast switch operand of size to int. (alpha_expand_epilogue): Always initialize fp_offset and sa_reg. * config/alpha/alpha.h (INITIAL_ELIMINATION_OFFSET): Add abort in unhandled case. From-SVN: r32060
2000-02-15Makefile.in (lcm.o): Depend on insn-attr.h.J"orn Rennecke1-0/+459
* Makefile.in (lcm.o): Depend on insn-attr.h. * basic-block.h (optimize_mode_switching): Declare. * lcm.c (tm_p.h, insn-attr.h): #include. (seginfo, bb_info): New structs. (antic, transp, comp, delete, insert) : New file-scope static variables. (new_seginfo, add_seginfo, make_preds_opaque, reg_dies): New functions. (reg_becomes_live, optimize_mode_switching): Likewise. * tm.texi: Add description of mode switching macros. * toplev.c (rest_of_compilation): Call optimize_mode_switching. * sh-protos.h (remove_dead_before_cse): Remove prototype. (fldi_ok, fpscr_set_from_mem): New prototypes. * sh.h (OPTIMIZATION_OPTION): Remove sh_flag_remove_dead_before_cse set. (CONST_DOUBLE_OK_FOR_LETTER_P, SECONDARY_INPUT_RELOAD_CLASS): Disable fldi for (TARGET_SH4 && ! TARGET_FMOVD). (sh_flag_remove_dead_before_cse): Remove declaration. (NUM_MODES_FOR_MODE_SWITCHING, OPTIMIZE_MODE_SWITCHING): New macros. (MODE_USES_IN_EXIT_BLOCK, MODE_NEEDED, MODE_AT_ENTRY): Likewise. (MODE_PRIORITY_TO_MODE, EMIT_MODE_SET): Likewise. * sh.c (broken_move): Disable fldi for (TARGET_SH4 && ! TARGET_FMOVD). (barrier_align): Allow for JUMP_INSNS containing a parallel. (machine_dependent_reorg): Remove sh_flag_remove_dead_before_cse set. (fldi_ok): New function. (get_fpscr_rtx): Add fpscr_rtx as GC root. (emit_sf_insn): Only generate fpu switches when optimize < 1. (emit_df_insn): Likewise. (expand_fp_branch, emit_fpscr_use, remove_dead_before_cse): Delete. (sh_flag_remove_dead_before_cse): Delete. (get_free_reg, fpscr_set_from_mem): New functions. * sh.md (movdf, movsf): Remove no_new_pseudos code. (return): Remove emit_fpscr_use / remove_dead_before_cse calls. Co-Authored-By: Andrew MacLeod <amacleod@cygnus.com> From-SVN: r31990
2000-01-17Update copyrightsKaveh Ghazi1-1/+1
From-SVN: r31465
2000-01-17ggc-common.c: PROTO -> PARAMS.Kaveh R. Ghazi1-7/+7
* ggc-common.c: PROTO -> PARAMS. * ggc-page.c: Likewise. * ggc-simple.c: Likewise. * ggc.h: Likewise. * global.c: Likewise. * graph.c: Likewise. * gthr-win32.h: Likewise. * haifa-sched.c: Likewise. * halfpic.h: Likewise. * integrate.c: Likewise. * integrate.h: Likewise. * jump.c: Likewise. * lcm.c: Likewise. * local-alloc.c: Likewise. * loop.c: Likewise. * loop.h: Likewise. From-SVN: r31458
1999-11-30lcm.c (compute_laterin): Cast bb->aux to size_t not int.Richard Henderson1-2/+2
* lcm.c (compute_laterin): Cast bb->aux to size_t not int. (compute_nearerout): Likewise. * ggc-page.c (ggc_page_print_statistics): Explicitly cast size_t to unsigned long for formatting. From-SVN: r30728
1999-11-15ggc-common.c (ggc_print_statistics): Cast size_t to unsigned long for printing.Richard Henderson1-10/+11
* ggc-common.c (ggc_print_statistics): Cast size_t to unsigned long for printing. * ggc.h (struct ggc_statistics): Rearrange elements for better packing on 64-bit hosts. * lcm.c (compute_laterin): Store a size_t not an int in bb->aux. (compute_nearerout): Likewise. From-SVN: r30547
1999-11-14gcse.c (pre_expr_reaches_here_p): Kill CHECK_PRE_COM argument.Jeffrey A Law1-0/+14
* gcse.c (pre_expr_reaches_here_p): Kill CHECK_PRE_COM argument. All callers changed. (pre_expr_reaches_here_p_work): Likewise. (pre_edge_insert): No longer call pre_expr_reaches_here_p. * lcm.c (compute_laterin): Fix initialization of LATER. (compute_nearerout): Similarly for NEARER. From-SVN: r30528
1999-11-11flow.c (compute_flow_dominators): Initially put all blocks on the worklist.Jeffrey A Law1-16/+20
* flow.c (compute_flow_dominators): Initially put all blocks on the worklist. * lcm.c (compute_antinout_edge, compute_available): Similarly. * gcse.c (compute_cprop_avinout): Remove. (compute_cprop_data): Use compute_available. (delete_null_pointer_checks_1): Use compute_available. From-SVN: r30484
1999-11-10basic-block.h (compute_available): Returns a void now.Jeffrey A Law1-184/+280
* basic-block.h (compute_available): Returns a void now. * gcse.c (one_classic_gcse_pass): Do not expect compute_available to return a value anymore. * lcm.c (compute_available, compute_antinout_edge): Revamp to use worklists. Fix boundary cases. Compute maximal solutions. (compute_laterin, compute_nearerout): Similarly. From-SVN: r30482
1999-11-03fix-header.c (recognized_extern, [...]): Constify a char*.Kaveh R. Ghazi1-6/+5
* fix-header.c (recognized_extern, recognized_function): Constify a char*. * lcm.c (compute_laterin): Remove unused variable `temp_bitmap'. (pre_edge_lcm): Mark parameter `file' with ATTRIBUTE_UNUSED. (compute_available): Remove unused variable `last'. (compute_nearerout): Remove unused variable `temp_bitmap'. (pre_edge_rev_lcm): Mark parameter `file' with ATTRIBUTE_UNUSED. Remove unused variable `x'. * scan.h (recognized_function, recognized_extern): Constify a char*. * simplify-rtx.c (simplify_rtx): Remove unused variable `new'. From-SVN: r30380
1999-10-17basic-block.h (pre_edge_lcm, [...]): Prototype for exported functions.Andrew MacLeod1-578/+461
* basic-block.h (pre_edge_lcm, pre_edge_rev_lcm, compute_available): Prototype for exported functions. (pre_lcm, pre_rev_lcm): Remove prototypes. * gcse.c (compute_ae_kill): Add ae_gen and ae_kill as parameters. (compute_available): Move to lcm.c, and change parameter order. (one_classic_gcse_pass): Call compute_ae_kill with parameters. (pre_insert, s_preds, s_succs, num_preds, num_succs): Delete. (gcse_main): No longer call compute_preds_succs. Rebuild the set table after reach pre pass. (pre_insert_map, pre_delete_map, edge_list): New. (alloc_pre_mem): Allocate edge vectors. (free_pre_mem): Delete edge vectors. (compute_pre_data): Call new edge based lcm routines. (process_insert_insn): New function. (insert_insn_end_bb): Use it. (pre_edge_insert): New function. (pre_insert_copy_insn): Formatting fixes. Update BLOCK_END as needed. (pre_insert_copies): Revamp using new edge based lcm outputs. (pre_delete): Likewise. (one_pre_gcse_pass): Insert & remove fake edges to the exit block. (compute_code_hoist_vbeinout): New new edge based routines. * lcm.c: Remove all the old LCM functions. Replace with new ones that work with the new cfg datastructures and work with edges instead of blocks. From-SVN: r30055
1999-03-10lcm.c: New file.Jeffrey A Law1-0/+799
* lcm.c: New file. * Makefile.in (OBJS): Add lcm.o (lcm.o): Add dependencies. From-SVN: r25679