summaryrefslogtreecommitdiff
path: root/gcc/haifa-sched.c
Commit message (Collapse)AuthorAgeFilesLines
* * alias.c (mark_constant_function): Use INSN_P.law2000-08-041-20/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@35494 138bc75d-0d04-0410-961f-82ee72b054a4
* * cse.c (canon_hash): Handle PRE_MODIFY/POST_MODIFY.rth2000-07-281-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (cse_insn): Likewise. (addr_affects_sp_p): Likewise. * expr.c (move_by_pieces): Likewise. (clear_by_pieces): Likewise. * gcse.c (oprs_unchanged_p): Likewise. * haifa-sched.c (sched_analyze_2): Likewise. * recog.c (offsettable_address_p): Likewise. * regclass.c (record_address_regs): Likewise. * reload.c (find_reusable_reload): Likewise. (push_reload): Likewise. (operands_match_p): Likewise. (decompose): Likewise. (find_reloads_address_1): Likewise. (find_inc_amount): Likewise. * reload1.c (elimination_effects): Likewise. * resource.c (mark_set_resources): Likewise. * flow.c (attempt_auto_inc): New function; mostly broken out of find_auto_inc. (find_auto_inc): Split into two functions and enhanced to generate POST_MODIFY. * rtl.def (PRE_MODIFY, POST_MODIFY): Adjust comment. * rtl.h (count_all_occurrences): Declare. (HAVE_{PRE,POST}_MODIFY_{DISP,REG}): Provide default of 0 if not defined. * rtlanal.c (count_all_occurrences): New function. * tm.texi (HAVE_POST_MODIFY_DISP, HAVE_PRE_MODIFY_DISP, HAVE_POST_MODIFY_REG, HAVE_PRE_MODIFY_REG): Document. * config/ia64/ia64-protos.h (destination_operand): Declare. * config/ia64/ia64.c (destination_operand): New function. (ia64_print_operand): Handle POST_MODIFY. (rtx_needs_barrier): Likewise. * config/ia64/ia64.h (HAVE_POST_MODIFY_DISP): Define to 1. (HAVE_POST_MODIFY_REG): Define to 1. (MAX_REGS_PER_ADDRESS): Change to 2. (GO_IF_LEGITIMATE_ADDRESS): Accept POST_MODIFY too. (LEGITIMATE_ADDRESS_REG): New helper macro. (LEGITIMATE_ADDRESS_DISP): Likewise. (PREDICATE_CODES): Add entry for destination_operand. * config/ia64/ia64.md (all mov patterns): Use destination_operand predicate for operand 0. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@35321 138bc75d-0d04-0410-961f-82ee72b054a4
* * flow.c (insn_dead_p): Keep sets to PIC_OFFSET_TABLE_REGNUMrth2000-06-131-91/+116
| | | | | | | | | | | | | | | | | alive before reload. * haifa-sched.c (struct deps): Add in_post_call_group_p. (add_dependence): Handle notes between SCHED_GROUP_P insns. (remove_dependence): Always define. (set_sched_group_p): New. (sched_analyze_2): Use it. (sched_analyze_insn): Don't special-case naked uses. Look for and extend in_post_call_group_p. (sched_analyze): Clear stale SCHED_GROUP_P. Set in_post_call_group_p. (init_deps): Clear in_post_call_group_p. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@34529 138bc75d-0d04-0410-961f-82ee72b054a4
* * cse.c (cse_basic_block): Only call find_reg_note if REG_NOTES not 0.kenner2000-05-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@34039 138bc75d-0d04-0410-961f-82ee72b054a4
* * haifa-sched.c (schedule_insns): Free the flow edge list when itlaw2000-05-041-0/+3
| | | | | | | is no longer needed git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@33673 138bc75d-0d04-0410-961f-82ee72b054a4
* * flow.c (struct reg_cond_life_info): New.rth2000-04-301-1/+6
| | | | | | | | | | | | | | | | | | (struct propagate_block_info): Add reg_cond_dead and reg_cond_reg. (init_propagate_block_info): Initialize them. (free_propagate_block_info): Destruct them. (mark_set_1): Consider conditional life before killing a register. (mark_regno_cond_dead): New. (free_reg_cond_life_info): New. (flush_reg_cond_reg_1, flush_reg_cond_reg): New. (ior_reg_cond, not_reg_cond, nand_reg_cond): New. (mark_used_reg): Record conditional life. * haifa-sched.c (schedule_insns): Disable death counting sanity check for HAVE_conditional_execution. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@33544 138bc75d-0d04-0410-961f-82ee72b054a4
* * rtl.c: Use NOTE_INSN_REPEATED_LINE_NUMBER and NOTE_INSN_RANGE_BEG.kenner2000-04-211-4/+5
| | | | | | | | | | | | | | | * rtl.h: Likewise. * rtl.def: Update comment. * function.c (expand_function): Use NOTE_INSN_REPEATED_LINE_NUMBER. * integrate.c (expand_inline_function): Likewise. * profile.c (branch_prob): Likewise. * ggc-common.c (ggc_mark_rtx_children): Use NOTE_INSN_RANGE_BEG. * print-rtl.c (print_rtx): Likewise. * haifa-sched.c (sched_analyze, unlink_other_notes): Likewise. (reemit_notes): Likewise; also use enum insn_note. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@33314 138bc75d-0d04-0410-961f-82ee72b054a4
* Fix copuyright noticekenner2000-04-201-16/+16
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@33278 138bc75d-0d04-0410-961f-82ee72b054a4
* * toplev.c (display_help): Prefix "f" to "sched-verbose=".dje2000-04-151-4/+4
| | | | | | | * haifa-sched.c: Update -fsched-verbose comments to use "=". git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@33172 138bc75d-0d04-0410-961f-82ee72b054a4
* Add missing blankkenner2000-04-101-1/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@33055 138bc75d-0d04-0410-961f-82ee72b054a4
* * rtl.def (COND_EXEC): New.rth2000-04-071-3/+27
| | | | | | | | | | | | | | | | | | | | * rtl.h (COND_EXEC_TEST, COND_EXEC_CODE): New. * tm.texi (MAX_CONDITIONAL_EXECUTE): Document. * genconfig.c (have_cond_arith_flag): Remove. (have_cond_exec_flag): New. (walk_insn_part): Detect COND_EXEC, not arithmetic in IF_THEN_ELSE. (main): Print HAVE_conditional_execution. * haifa-sched.c (haifa_classify_insn): Recognize COND_EXEC. (sched_analyze_insn, print_pattern): Likewise. * reload.c (find_equiv_reg): Likewise. * rtlanal.c (reg_referenced_p): Likewise. (note_stores, dead_or_set_regno_p): Likewise. (reg_overlap_mentioned_p): Rewrite to use a switch. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@32997 138bc75d-0d04-0410-961f-82ee72b054a4
* * basic-block.h (ALLOCA_REG_SET): Remove.mmitchel2000-03-051-2/+4
| | | | | | | | | | | | (INITIALIZE_REG_SET): New macro. * flow.c (update_life_info): Use it. (calculate_global_regs_live): Likewise. (propagate_block): Likewise. * global.c (build_insn_chain): Likewise. * haifa-sched.c (schedule_region): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@32350 138bc75d-0d04-0410-961f-82ee72b054a4
* Fix copyrights.law2000-02-261-1/+2
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@32178 138bc75d-0d04-0410-961f-82ee72b054a4
* * haifa-sched.c (schedule_block): Explain the real reasongeoffk2000-02-251-10/+19
| | | | | | | | | | we delete REG_SAVE_NOTEs on the first insn of a block. Don't delete REG_SAVE_NOTES for NOTE_INSN_SETJMP. * compile/20000224-1.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@32150 138bc75d-0d04-0410-961f-82ee72b054a4
* * defaults.h (ASM_OUTPUT_ASCII): Constify a char*.ghazi2000-02-211-2/+2
| | | | | | | | | | | | | | | | | | | | * flow.c (get_common_dest, chain_reorder_blocks, make_reorder_chain, fixup_reorder_chain, skip_insns_between_block): Add static prototypes. (life_analysis): Wrap variable `i' with macro ELIMINABLE_REGS. * haifa-sched.c (rank_for_schedule): Don't cast away const-ness. * integrate.c (compare_blocks, find_block): Likewise. * rtl.c (fatal_with_file_and_line): Add ATTRIBUTE_PRINTF_2. * rtl.h (set_file_and_line_for_stmt): Constify a char*. * stmt.c (stmt_status, set_file_and_line_for_stmt, expand_asm_operands): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@32094 138bc75d-0d04-0410-961f-82ee72b054a4
* * haifa-sched.c (BUF_LEN): Increase a lot.geoffk2000-02-111-1/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@31927 138bc75d-0d04-0410-961f-82ee72b054a4
* * Makefile.in (c-common.o): Depend on $(EXPR_H).ghazi2000-02-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * c-common.c: Include expr.h. * c-pragma.c (mark_align_stack): Add prototype. * caller-save.c (add_stored_regs): Likewise. * combine.c (record_promoted_value): Likewise. * i386.c (ix86_sched_reorder_pentium, ix86_sched_reorder_ppro): Likewise. * cppinit.c (new_pending_define): Likewise. * cpplib.c (skip_block_comment, skip_line_comment): Likewise. * dwarf2out.c (save_rtx, splice_child_die, reverse_die_lists, AT_class, AT_flag, AT_int, AT_unsigned, AT_string, AT_ref, AT_loc, AT_addr, AT_lbl, get_AT_ref, free_AT, free_die, local_scope_p, class_scope_p): Likewise. * dwarf2out.h (dwarf2out_set_demangle_name_func, dwarf2out_add_library_unit_info): Likewise. * ggc.h (ggc_page_print_statistics): Likewise. * haifa-sched.c (propagate_deps): Likewise. * reg-stack.c (next_flags_user, record_label_references): Likewise. * rtl.h (set_stack_check_libfunc): Likewise. * toplev.h (set_fatal_function): Likewise. * toplev.c (set_fatal_function): Delete prototype. * diagnostic.c: Deconstify functions returning malloc'ed ptrs. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@31810 138bc75d-0d04-0410-961f-82ee72b054a4
* * haifa-sched.c (schedule_insns): Don't recompute reg inforth2000-01-281-1/+4
| | | | | | | after reload. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@31675 138bc75d-0d04-0410-961f-82ee72b054a4
* * ggc-common.c: PROTO -> PARAMS.ghazi2000-01-171-96/+96
| | | | | | | | | | | | | | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@31458 138bc75d-0d04-0410-961f-82ee72b054a4
* * haifa-sched.c (split_edges): Pass edgeset_size as second arg torearnsha2000-01-121-1/+2
| | | | | | | | extract_bitlst. (extract_bitlist): Declare bitlen. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@31357 138bc75d-0d04-0410-961f-82ee72b054a4
* * Band-aid until haifa's bitset implementation is nuked.law2000-01-111-5/+13
| | | | | | | | | | | * haifa-sched.c (extract_bitlst): New parameter for size of the bitset in bits. All callers changed. Avoid looking at undefined bits in the bitset. (edgeset_bitsize): New variable. (schedule_region): Initialize edgeset_bitsize. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@31322 138bc75d-0d04-0410-961f-82ee72b054a4
* * Makefile.in (optabs.o): Depend on real.hghazi2000-01-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (resource.o): Depend on insn-attr.h * builtins.c (result_vector): Wrap prototype in macro conditions governing definition and use. * c-common.c: Include tm_p.h. * c-lex.c: Likewise. * elfos.h: Constify a char*. * final.c (align_fuzz): Wrap prototype in macro HAVE_ATTR_length. (get_attr_length, shorten_branches, profile_after_prologue): Mark parameter with ATTRIBUTE_UNUSED. * fold-const.c (exact_real_inverse): Wrap variable `i' in CHECK_FLOAT_VALUE. * haifa-sched.c (schedule_insns): Mark parameter with ATTRIBUTE_UNUSED. * optabs.c: Include real.h. * real.h (ereal_atof): Add prototype arguments. * resource.c: Include insn-attr.h. * sdbout.c (sdbout_queue_anonymous_type, sdbout_dequeue_anonymous_types): Wrap in macro SDB_ALLOW_FORWARD_REFERENCES. (sdbout_init, sdbout_start_new_source_file): Mark parameter with ATTRIBUTE_UNUSED. * stmt.c (expand_return): Wrap variable `op0' in macro HAVE_return. * stupid.c: Include tm_p.h. * tree.c (real_value_from_int_cst): Mark parameter with ATTRIBUTE_UNUSED. cp: * lex.c: Include tm_p.h. ch: * lex.c: Include tm_p.h. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@31308 138bc75d-0d04-0410-961f-82ee72b054a4
* Copyright datelaw2000-01-051-1/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@31228 138bc75d-0d04-0410-961f-82ee72b054a4
* 2000-01-04 Stan Cox <scox@cygnus.com>scox2000-01-041-3/+5
| | | | | | | | | * haifa-sched.c (build_control_flow): Change unreachable simple loop test to check if current block has only one predecessor. (find_rgns): Initialize degree. Use dest as degree index, not src. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@31208 138bc75d-0d04-0410-961f-82ee72b054a4
* Clean up parts of the schedulercrux1999-11-291-534/+407
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@30700 138bc75d-0d04-0410-961f-82ee72b054a4
* * basic-block.h: Remove all #defines and prototypes related tolaw1999-11-151-81/+67
| | | | | | | | | | | | | | | | | | | integer lists. (free_bb_mem, compute_preds_succs): Remove prototype. * rtl.h (free_bb_mem): Remove prototype. * flow.c (alloc_int_list_node); Remove function. (add_inst_list_node, free_int_list, add_pred_succ): Likewise. (compute_preds_succs, free_bb_mem): Likewise. * gcse.c (gcse_main): Do not call free_bb_mem anymore. * toplev.c (rest_of_compilation): Likewise. * haifa-sched.c (build_control_flow): Use flow generated edge list to build the haifa specific edge list. (find_rgns): Use new CFG data structures instead of pred/succ lists. (schedule_insns): Do not build pred/succ lists anymore. Instead build the edge table. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@30531 138bc75d-0d04-0410-961f-82ee72b054a4
* * gcse.c (post_dominators): Kill.law1999-11-071-4/+2
| | | | | | | | | | | | | | | (alloc_code_hoist_mem, free_code_hoist_mem); Kill post_dominators. (compute_code_hoist_data): Use compute_flow_dominators. Do not pass in a pdom array since we do not need pdoms. * haifa-sched.c (schedule_insns): Similarly. * flow.c (compute_dominators): Remove dead function. (compute_flow_dominators): Do not compute doms or pdoms if the caller does not request them. Split up loop to build doms and pdoms. Use a worklist to compute doms and pdoms. * basic-block.h (compute_dominators): Remove prototype. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@30437 138bc75d-0d04-0410-961f-82ee72b054a4
* * haifa-sched.c (struct haifa_insn_data, h_i_d): New.rth1999-11-061-117/+82
| | | | | | | | | | | | (insn_luid, insn_priority, insn_costs, insn_units): Remove. (insn_reg_weight, insn_depend, insn_dep_count): Remove. (insn_blockage, insn_ref_count, line_note, insn_tick): Remove. (cant_move, fed_by_spec_load, is_load_insn): Remove. (schedule_region): Remove unused variable. (schedule_insns): Allocate h_i_d, and not all the separate arrays. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@30435 138bc75d-0d04-0410-961f-82ee72b054a4
* * haifa-sched.c (schedule_block): Don't crash if there's north1999-11-051-7/+9
| | | | | | | | next insn for an interblock movement. (add_branch_dependences): Don't allow clobber insns to move either. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@30422 138bc75d-0d04-0410-961f-82ee72b054a4
* * haifa-sched.c (init_rgn_data_dependences): Correctlyrth1999-11-051-1/+1
| | | | | | | size bb_pending_lists_length when zeroing. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@30403 138bc75d-0d04-0410-961f-82ee72b054a4
* * haifa-sched.c (schedule_block): Fix thinko.law1999-11-041-1/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@30390 138bc75d-0d04-0410-961f-82ee72b054a4
* * haifa-sched.c (find_rgns): Replace uses of alloca with xmalloc.mmitchel1999-11-031-88/+138
| | | | | | | | | | | (split_edges): Likewise. (schedule_block): Likewise. (compute_block_backward_dependencies): Likewise. (schedule_region): Likewise. (schedule_insns): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@30383 138bc75d-0d04-0410-961f-82ee72b054a4
* * alias.c (init_alias_analysis): Allocate reg_known_value andmmitchel1999-10-271-0/+3
| | | | | | | | | | | | | reg_known_equiv_p on the heap. Likewise for new_reg_base_value and reg_seen. (end_alias_analysis): Free reg_known_value and reg_known_equiv_p. * cse.c (cse_main): Call end_alias_analysis. * haifa-sched.c (schedule_insns): Likewise. * local-alloc. (update_equiv_regs): Likewise. * reload1.c (reload_cse_regs): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@30217 138bc75d-0d04-0410-961f-82ee72b054a4
* * haifa-sched.c (add_dependence): Update the true dependencylaw1999-10-261-0/+7
| | | | | | | cache the first time we add a true dependence to the LOG_LINKS chain. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@30176 138bc75d-0d04-0410-961f-82ee72b054a4
* * haifa-sched.c (schedule_insns): Don't assign LUIDs differentlymmitchel1999-10-251-1/+10
| | | | | | | depending on whether or not line-number notes are present. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@30151 138bc75d-0d04-0410-961f-82ee72b054a4
* * basic-block.h (PROP_*): Move constants from ...rth1999-10-201-56/+98
| | | | | | | | | | | | | | | | | | | | | | | | * flow.c: ... here. (compute_bb_for_insn): Free the array before reallocating. (update_life_info): New arg PROP_FLAGS; pass on to propagate_block. (allocate_reg_life_data): Reset all reg variables collected by propagate_block. (get_block_head_tail): Don't convert from bb to block. (get_bb_head_tail): New. Update all callers of get_block_head_tail. (find_insn_reg_weight): Take block not bb. (schedule_block): Don't set block num for moved insns. (schedule_region): Don't update_life_info or find_insn_reg_weight. (schedule_insns): Do it here instead. * combine.c (combine_instructions): Invoke compute_bb_for_insn before update_life_info. * recog.c (split_all_insns, peephole2_optimize): Update for new arg to update_life_info. * rtlanal.c (remove_note): Cope with NULL note. * toplev.c (rest_of_compilation): Don't invoke recompute_reg_usage if we did sched1. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@30103 138bc75d-0d04-0410-961f-82ee72b054a4
* * haifa-sched.c (add_dependence): Protect references to thelaw1999-10-181-1/+5
| | | | | | | | true dependency cache with #ifdef INSN_SCHEDULING. (remove_dependence): Similarly. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@30074 138bc75d-0d04-0410-961f-82ee72b054a4
* * basic-block.h (set_block_num): Declare.rth1999-10-181-37/+40
| | | | | | | | | | | | | | | * flow.c (update_life_info): Don't call compute_bb_for_insn or free_basic_block_vars. * haifa-sched.c (remove_dependence): Conditionalize on HAVE_cc0. (insn_orig_block): Remove. (INSN_BLOCK): Remove. Update all callers to use BLOCK_NUM. (schedule_block): Keep BLOCK_NUM up-to-date. (schedule_insns): Use compute_bb_for_insn. * recog.c (split_all_insns): Likewise. (peephole2_optimize): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@30073 138bc75d-0d04-0410-961f-82ee72b054a4
* Typo.law1999-10-171-1/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@30059 138bc75d-0d04-0410-961f-82ee72b054a4
* * haifa-sched.c (add_dependence): Only check/update the cachelaw1999-10-171-8/+25
| | | | | | | | | | if it exists. (remove_dependence): Likewise. (schedule_insns): Only create the true_dependency_cache if the average number of instructions in a basic block is very large. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@30058 138bc75d-0d04-0410-961f-82ee72b054a4
* * haifa-sched.c (true_dependency_cache): New.law1999-10-171-1/+37
| | | | | | | | | | | | | (add_dependence): Use the true dependency cache to avoid expensive walks down the LOG_LINKS dependency list. Add entries to the cache as necessary. (remove_dependence): Remove entries from the true dependency cache as needed. (schedule_insns): Allocate and initialize and free the true dependency cache. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@30050 138bc75d-0d04-0410-961f-82ee72b054a4
* * haifa-sched.c (schedule_insns): Do not remove inter-blocklaw1999-10-171-34/+0
| | | | | | | dependencies anymore. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@30049 138bc75d-0d04-0410-961f-82ee72b054a4
* * haifa-sched.c (compute_block_forward_dependencies): Only checklaw1999-10-161-5/+12
| | | | | | | for notes, deleted insns and duplicates if ENABLE_CHECKING is defined. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@30042 138bc75d-0d04-0410-961f-82ee72b054a4
* * haifa-sched.c (sched_reg_n_calls_crossed): Delete.rth1999-10-101-1059/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | (sched_reg_live_length, sched_reg_basic_block): Delete. (current_block_num, bb_live_regs, old_live_regs): Delete. (dead_notes, struct sometimes): Delete. (sched_note_set, birthing_insn_p): Delete. (adjust_priority): Gut useless reg lifetime code. (create_reg_dead_note, attach_deaths): Delete. (attach_deaths_insn, new_sometimes_live): Delete. (finish_sometimes_live): Delete. (find_pre_sched_live, find_post_sched_live): Delete. (update_reg_usage): Delete. (find_insn_reg_weight): New, from corpse of find_pre_sched_live. (schedule_insns): Delete reg lifetime code. (sched_analyze): Use REG_SAVE_NOTE to stuff NOTE_INSN notes away. (unlink_other_notes): Adjust REG_NOTE commentary. (reemit_notes): Use REG_SAVE_NOTE. (schedule_block): Likewise. (schedule_region): Allocate bitmap of blocks in region. Use count_or_remove_death_notes. Use update_life_info. * rtl.h (REG_SAVE_NOTE): New. * rtl.c (reg_note_name): Update. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29894 138bc75d-0d04-0410-961f-82ee72b054a4
* * Makefile.in (flow.o): Depend on TREE_H.rth1999-10-091-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * basic-block.h (REG_SET_EQUAL_P): New. (XOR_REG_SET): New. (n_edges): Declare. (free_regset_vector): Remove declaration. (flow_delete_insn_chain): Declare. (enum update_life_extent): New. (update_life_info, count_or_remove_death_notes): Declare. * combine.c (distribute_notes) [REG_DEAD]: Stop search at bb->head. Verify register live at bb->global_live_at_start before adding USE. * flow.c (HAVE_epilogue, HAVE_prologue): Provide default. (CLEAN_ALLOCA): New. (n_edges): New. (PROP_*): New flags. (find_basic_blocks_1): Use alloc_EXPR_LIST. (clear_edges): Zero n_edges. (make_edge): Increment n_edges. (split_edge): Don't allocate bb->local_set. Increment n_edges. (flow_delete_insn_chain): Export. (delete_block): Decrement n_edges. (merge_blocks_nomove): Likewise. (life_analysis): Give life_analysis_1 PROP flags. (verify_wide_reg_1, verify_wide_reg): New. (verify_local_live_at_start): New. (update_life_info): Rewrite to call into propogate_block. (mark_reg): New. (mark_regs_live_at_end): After reload, if epilogue as rtl, always mark stack pointer. Conditionally mark PIC register. After reload, mark call-saved registers, return regsiters. (life_analysis_1): Accept PROP flags not remove_dead_code. Call mark_regs_live_at_end before zeroing regs_ever_live. Use calculate_global_regs_live. Copy global_live_at_end before calling final propagate_block. Zero reg_next_use on exit. (calculate_global_regs_live): New. (allocate_bb_life_data): Don't allocate bb->local_set. (init_regset_vector, free_regset_vector): Remove. (propagate_block): Accept FLAGS not FINAL or REMOVE_DEAD_CODE. Test flags before every operation. Warn if prologue/epilogue insn would have been deleted. (mark_set_regs, mark_set_1): Accept and use FLAGS. Use alloc_EXPR_LIST. (mark_used_regs): Accept and use FLAGS, not FINAL. Remove special handling for RETURN. (try_pre_increment): Use alloc_EXPR_LIST. (dump_flow_info): Dump n_edges. (unlink_insn_chain, split_hard_reg_notes): Remove. (maybe_add_dead_note, maybe_add_dead_note_use): Remove. (find_insn_with_note, new_insn_dead_notes): Remove. (update_n_sets, sets_reg_or_subreg_1, sets_reg_or_subreg): Remove. (maybe_remove_dead_notes, prepend_reg_notes): Remove. (replace_insns): Remove. (count_or_remove_death_notes): New. (verify_flow_info): Abort on error after all checks. (remove_edge): Decrement n_edges. (remove_fake_edges): Tweek format. * haifa-sched.c (schedule_insns): Use split_all_insns. * output.h (update_life_info): Remove declaration. * recog.c (split_all_insns): From the corpse of split_block_insns, do the whole function block by block. Use update_life_info. (recog_last_allowed_insn): New. (recog_next_insn): Mind it. (peephole2_optimize): Set it. Walk backwards through blocks. Use update_life_info. * rtl.h (update_flow_info, replace_insns): Remove declarations. (split_all_insns): Declare. * toplev.c (rest_of_compilation): Thread prologue before flow2. Use split_all_insns. * i386.md (or -1 peep2s): Disable. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29877 138bc75d-0d04-0410-961f-82ee72b054a4
* * haifa-sched.c (sched_analyze): Rename local variable `region' toghazi1999-09-211-4/+4
| | | | | | | avoid conflicts with typedef struct `region' at the top level scope. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29567 138bc75d-0d04-0410-961f-82ee72b054a4
* Make it possible to prototype port-specific functions (and convert i386 to ↵crux1999-09-201-0/+1
| | | | | | use this) git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29514 138bc75d-0d04-0410-961f-82ee72b054a4
* * haifa-sched.c (sched_analyze): Use free_INSN_LIST_list instead oflaw1999-09-181-1/+1
| | | | | | | zapping the LOG_LINKS of sched_before_next_call. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29496 138bc75d-0d04-0410-961f-82ee72b054a4
* * haifa-sched.c (sched_analyze): Keep the list of notes organizedmmitchel1999-09-161-9/+14
| | | | | | | | in pairs. (reemit_notes): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29462 138bc75d-0d04-0410-961f-82ee72b054a4
* * rtl.h (NOTE_BLOCK_NUMBER): Replace with ...mmitchel1999-09-151-9/+14
| | | | | | | | | | | | | | | | | | | | | | | | | (NOTE_BLOCK): New macro. (NOTE_BLOCK_LIVE_RANGE_BLOCK): Remove. * function.h (identify_blocks): CHange prototype. * function.c (identify_blocks): Simplify. (reorder_blocks): Likewise. * ggc-common.c (ggc_mark_rtx): Mark the BLOCK associated with a NOTE_INSN_BLOCK_{BEG,END}. * haifa-sched.c (sched_analyze): Don't put NOTE_BLOCK_NUMBER on the list of saved notes if the note isn't a NOTE_INSN_BLOCK_{BEG,END}. (move_insn1): Use NOTE_EH_HANDLER in comment, rather than NOTE_BLOCK_NUMBER. (reemit_notes): Adjust recreation of notes to reflect new saved note structure. * print-rtl.c (print_rtx): Print the address of the BLOCK when printing a block note. * stmt.c (block_vector): Remove. (find_loop_tree_blocks): Simplify. (unroll_block_trees): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29441 138bc75d-0d04-0410-961f-82ee72b054a4