Commit Graph

63 Commits

Author SHA1 Message Date
Catherine Moore c92293e702 haifa-sched.c (alloc_EXPR_LIST): Change to use unused_expr_list.
* haifa-sched.c (alloc_EXPR_LIST):  Change to use
        unused_expr_list.

From-SVN: r20889
1998-07-02 02:26:36 -04:00
Kaveh R. Ghazi 4f70758f37 Warning fixes:
* Makefile.in (fix-header): Don't needlessly depend on cpperror.o.
        * alias.c (CHECK_ALIAS_SETS_FOR_CONSISTENCY): Cast expansion to
        void since it is evaluated in a comma list.
        * mips.h (ASM_GENERATE_INTERNAL_LABEL): Always sprintf `NUM'
        argument as a long and cast `NUM' to long to ensure it is of the
        proper width.  Wrap macro arguments in parens when they appear in
        the expansion.
        * sol2.h (ASM_GENERATE_INTERNAL_LABEL): Likewise.
        * sparc.h (ASM_GENERATE_INTERNAL_LABEL): Likewise.
        (ASM_DECLARE_RESULT): Fix fprintf format specifier to match
        function argument return type.
        (REGNO_OK_FOR_INDEX_P, REGNO_OK_FOR_BASE_P, REGNO_OK_FOR_FP_P,
        REGNO_OK_FOR_CCFP_P): Use `(unsigned)' not `U'.
        * cpplib.c (cpp_message_from_errno): Remove unneeded argument to
        cpp_message.
        * dbxout.c: Fix the comments after an #endif to reflect the actual
        condition tested in the preceding #if.
        * except.c (find_all_handler_type_matches): Switch to old-style
        function definition.
        * expr.c (expand_builtin): Remove unused variable `type' twice.
        * gbl-ctors.h (DO_GLOBAL_CTORS_BODY): Cast -1 before comparing it
        to an unsigned long.
        * haifa-sched.c (print_insn_chain): Remove unused function.
        * objc/objc-act.c (build_msg_pool_reference): Hide prototype and
        definition.
        * toplev.c: When testing whether to include dbxout.h, also include
        it when XCOFF_DEBUGGING_INFO is defined.
        * unroll.c (unroll_loop): Add parentheses around assignment used
        as truth value.

From-SVN: r20801
1998-06-29 17:36:07 +00:00
Michael Meissner e4da5f6da4 Add hooks for the machine to override the sorting of the ready list and variable issue rates
From-SVN: r20740
1998-06-26 13:09:01 +00:00
H.J. Lu cc4fe0e2a4 haifa-sched.c (insn_issue_delay, [...]): New declaration.
* haifa-sched.c (insn_issue_delay, birthing_insn_p,
        adjust_priority, print_insn_chaino): New declaration.
        (schedule_insns): Remove declaration.
        (init_target_units, get_visual_tbl_length,
        init_block_visualization): Add prototype.

From-SVN: r20642
1998-06-21 12:03:21 -06:00
Jeff Law 9a8b0889eb haifa-sched.c (debug_ready_list): Make static.
* haifa-sched.c (debug_ready_list): Make static.
        * toplev.h (fancy_abort): Declare.
        * rtl.h (expand_expr): Remove declaration.

From-SVN: r20640
1998-06-21 11:59:03 -06:00
Jim Wilson 7c74b010d7 Fix stack overflow found by glibc compile with max optimizations.
* sched.c (schedule_insns): Use xmalloc not alloca for max_uid
	indexed arrays.  Call free at the end of the function for them.
	* haifa-sched.c (schedule_insns): Likewise.

From-SVN: r20563
1998-06-18 13:17:26 -07:00
John Carr e0cd077072 haifa-sched.c (haifa_classify_insn): TRAP_IF is risky.
* haifa-sched.c (haifa_classify_insn): TRAP_IF is risky.
	(sched_analyze_2): Allow scheduling TRAP_IF.
	* reorg.c (mark_referenced_resources): Examine operands of TRAP_IF.
	* rtl.h (TRAP_CODE): New macro.
	* rtl.def (TRAP_IF): Change second operand type to rtx.
	* optabs.c (gen_cond_trap): New function.
	(init_traps): New function.
	(init_optabs): Call init_traps.
	* expr.h: Declare gen_cond_trap.
	* jump.c (jump_optimize): Optimize jumps to and around traps.
	* sparc.md: Define trap instructions.
	* rs6000.md: Define trap instructions.
	* rs6000.c (print_operand): New code 'V' for trap condition.
	(trap_comparison_operator): New function.
	* m88k.md: Update use of TRAP_IF.
	* tree.h (enum built_in_function): New function code BUILT_IN_TRAP.
	* c-decl.c (init_decl_processing): New builtin __builtin_trap.
	* expr.c (expand_builtin): Handle BUILT_IN_TRAP.
	* expr.c (expand_builtin): Error if __builtin_longjmp second argument
	is not 1.

From-SVN: r20543
1998-06-17 16:14:09 +00:00
John Carr 9ae4ec4602 haifa-sched.c (update_flow_info): Use UNITS_PER_WORD...
* haifa-sched.c (update_flow_info): Use UNITS_PER_WORD, not MOVE_MAX,
        as the threshold to permit splitting memory operations.

From-SVN: r20374
1998-06-09 05:10:02 -07:00
Jeffrey A Law 2db4599393 haifa-sched.c (rank_for_schedule): For "equally good insns", prefer the insn which has the most insns dependent on it.
* haifa-sched.c (rank_for_schedule): For "equally good insns", prefer
        the insn which has the most insns dependent on it.

From-SVN: r20243
1998-06-05 05:32:28 -06:00
Kaveh R. Ghazi 487a6e06ce Warning Fixes:
* Makefile.in (print-rtl.o): Depend on bitmap.h.
        (dbxout.o): Depend on toplev.h.
        ($(SCHED_PREFIX)sched.o): Likewise.
        ($(out_object_file)): Likewise for system.h and toplev.h.
        (cppmain.o): Depend on gansidecl.h.
        (cpplib.o): Likewise.
        (cpperror.o): Likewise.
        (cppexp.o): Likewise.
        (cpphash.o): Likewise.
        (cppalloc.o): Likewise.
        (fix-header.o): Depend on cpplib.h and cpphash.h.
        (scan-decls.o): Depend on gansidecl.h.
        * basic-block.h (free_regset_vector): Add prototype.
        * cccp.c (check_precompiled): Mark parameter `fname' with
        ATTRIBUTE_UNUSED.
        (do_assert): Likewise for `op' and `keyword'.
        (do_unassert): Likewise.
        (do_line): Likewise for `keyword'.
        (do_error): Likewise for `op' and `keyword'.
        (do_warning): Likewise.
        (do_ident): Likewise for `keyword'.
        (do_pragma): Likewise for `limit', `op' and `keyword'.
        (do_sccs): Likewise.
        (do_if): Likewise for `keyword'.
        (do_elif): Likewise.
        (do_else): Likewise.
        (do_endif): Likewise.
        * collect2.c (getenv): Remove redundant prototype.
        (collect_exit, collect_execute, dump_file): Likewise.
        (dump_list): Wrap prototype and definition in COLLECT_EXPORT_LIST.
        (dump_prefix_list): Hide prototype and definition.
        * sparc.c: Include toplev.h.
        (intreg_operand): Mark parameter `mode' with ATTRIBUTE_UNUSED.
        (symbolic_memory_operand): Likewise.
        (sp64_medium_pic_operand): Likewise.
        (data_segment_operand): Likewise.
        (text_segment_operand): Likewise.
        (splittable_symbolic_memory_operand): Likewise.
        (splittable_immediate_memory_operand): Likewise.
        (eq_or_neq): Likewise.
        (normal_comp_operator): Likewise.
        (noov_compare_op): Likewise.
        (v9_regcmp_op): Likewise.
        (v8plus_regcmp_op): Likewise.
        (extend_op): Likewise.
        (cc_arithop): Likewise.
        (cc_arithopn): Likewise.
        (small_int): Likewise.
        (uns_small_int): Likewise.
        (clobbered_register): Likewise.
        (legitimize_pic_address): Likewise.
        (delay_operand): Likewise.
        (sparc_builtin_saveregs): Remove unused variable `stdarg'.
        * sparc.h (order_regs_for_local_alloc, eligible_for_return_delay,
        sparc_issue_rate, v8plus_regcmp_p): Add prototypes.
        * sparc.md (cmpdi_v8plus): Add abort for default case in switch.
        * cppalloc.c: Include gansidecl.h.
        * cpperror.c: Include stdarg.h/varargs.h and gansidecl.h.
        (cpp_file_line_for_message): Mark parameter `pfile' with
        ATTRIBUTE_UNUSED.
        (v_cpp_message): New function.
        (cpp_message): Use it.  Also convert to variable arguments.
        (cpp_fatal): Likewise.
        (cpp_pfatal_with_name): Constify parameter `name'.
        * cppexp.c: Move gansidecl.h before cpplib.h.
        * cpphash.c: Likewise.
        * cpphash.h (hashf, delete_macro): Add prototypes.
        * cpplib.c: Include stdarg.h/varargs.h and move gansidecl.h before
        cpplib.h.  Don't include errno.h.
        (update_path): Add arguments to prototype.
        (cpp_fatal, cpp_file_line_for_message, cpp_message, delete_macro,
        cpp_print_containing_files): Remove redundant prototypes.
        (cpp_hash_cleanup, add_import, append_include_chain,
        make_assertion, path_include, initialize_builtins,
        initialize_char_syntax, finclude, validate_else, comp_def_part,
        lookup_import, redundant_include_p, is_system_include,
        read_name_map, read_filename_string, open_include_file,
        check_macro_name, compare_defs, compare_token_lists,
        eval_if_expression, change_newlines): Add prototype arguments.
        (hashf): Remove redundant prototype.
        (read_token_list, free_token_list, safe_read, xcalloc, savestring,
        conditional_skip, skip_if_group): Add prototype arguments.
        (fdopen): Remove redundant prototype.
        (do_define, do_line, do_include, do_undef, do_error, do_pragma,
        do_ident, do_if, do_xifdef, do_else, do_elif, do_endif, do_sccs,
        do_once, do_assert, do_unassert, do_warning): Add prototype arguments.
        (struct directive): Add prototype arguments to function pointer
        member `func'.
        (handle_directive): Add missing arguments to call to `do_line'.
        (do_include): Mark parameters `unused1' and `unused2' with
        ATTRIBUTE_UNUSED.
        (do_line): Likewise for `keyword' and new parameters `unused1' and
        `unused2'.
        (do_error): Likewise for `keyword'.
        (do_warning): Likewise.  Also add missing argument `pfile' in call
        to cpp_pedwarn.
        (do_once): Mark parameter `keyword', `unused1' and `unused2' with
        ATTRIBUTE_UNUSED.
        (do_ident): Likewise for `keyword', `buf' and `limit'.
        (do_pragma): Likewise.  Also add missing arguments in call to do_once.
        (do_sccs): Mark parameter `keyword', `buf' and `limit' with
        ATTRIBUTE_UNUSED.
        (do_if): Likewise for `keyword'.
        (do_elif): Likewise.
        (eval_if_expression): Likewise for `buf' and `length'.
        (do_xifdef): Likewise for `unused1' and `unused2'.
        (do_else): Likewise for `keyword', `buf' and `limit'.
        (do_endif): Likewise.
        (parse_name): Add missing argument `pfile' in call to cpp_pedwarn.
        (cpp_handle_options): Remove superfluous NULL argument in call to
        cpp_fatal.
        (cpp_handle_options): Likewise.
        (do_assert): Mark parameter `keyword', `buf' and `limit' with
        ATTRIBUTE_UNUSED.
        (do_unassert): Likewise.
        (cpp_print_file_and_line): Add missing argument `pfile' in call to
        cpp_file_line_for_message.
        (v_cpp_error): New function.
        (cpp_error): Use it. Also accept variable arguments.
        (v_cpp_warning): New function.
        (cpp_warning): Use it. Also accept variable arguments.
        (cpp_pedwarn): Accept variable arguments.
        (v_cpp_error_with_line): New function
        (cpp_error_with_line): Use it.  Accept variable arguments.
        (v_cpp_warning_with_line): New function.
        (cpp_warning_with_line): Use it.  Accept variable arguments.  Hide
        definition.
        (cpp_pedwarn_with_line): Accept variable arguments.
        (cpp_pedwarn_with_file_and_line): Likewise.
        (cpp_error_from_errno): Constify parameter `name'.  Add missing
        argument `pfile' in call to cpp_file_line_for_message.
        (cpp_perror_with_name): Constify parameter `name'.
        * cpplib.h: Define PARAMS() in terms of PROTO().
        (fatal): Remove redundant prototype.
        (cpp_error, cpp_warning, cpp_pedwarn, cpp_error_with_line,
        cpp_pedwarn_with_line, cpp_pedwarn_with_file_and_line,
        cpp_error_from_errno, cpp_perror_with_name, cpp_pfatal_with_name,
        cpp_fatal, cpp_message, cpp_pfatal_with_name,
        cpp_file_line_for_message, cpp_print_containing_files): Add
        arguments to prototypes.
        (scan_decls, cpp_finish): Add prototypes.
        * cppmain.c: Include gansidecl.h.
        (main): Remove unused variable `i'.
        * dbxout.c: Include toplev.h.
        * demangle.h (do_tlink, collect_execute, collect_exit,
        collect_wait, dump_file, file_exists): Add prototype.
        * dwarf2out.c (dwarf_type_encoding_name, decl_start_label): Hide
        prototype and definition.
        (gen_unspecified_parameters_die): Don't assign results of call to
        function new_die() to unused variable `parm_die'.
        (dwarf2out_line): Mark parameter `filename' with ATTRIBUTE_UNUSED.
        (dwarf2out_define): Likewise for `lineno' and `buffer'.
        * dwarfout.c (output_unsigned_leb128, output_signed_leb128): Hide
        prototype and definition.
        (output_die): Add prototype arguments to function pointer arg.
        (output_unspecified_parameters_die): Mark parameter `arg' with
        ATTRIBUTE_UNUSED.
        * except.c (output_exception_table_entry): Remove unused variable
        `eh_entry'.
        * except.h (expand_fixup_region_start, expand_fixup_region_end):
        Add prototypes.
        * expr.c (do_jump_by_parts_equality_rtx): Remove prototype.
        * expr.h (do_jump_by_parts_equality_rtx): Add prototype.
        * fix-header.c: Include stdarg.h/varargs.h, move gansidecl.h
        before cpplib.h, include cpphash.h, remove redundant prototype of
        cpp_fatal, don't define `const', add a prototype for `fatal'.
        (cpp_file_line_for_message): Add missing arguments `pfile'.
        (v_cpp_message): New function.
        (cpp_message): Use it.
        (v_fatal): New function.
        (fatal, cpp_fatal): Use it.
        (cpp_pfatal_with_name): Constify parameter `name'.
        * flow.c (free_regset_vector): Remove redundant prototype.
        * function.c (round_down): Wrap prototype and definition with
        macro ARGS_GROW_DOWNWARD.
        (record_insns): Wrap prototype and definition with
        defined (HAVE_prologue) || defined (HAVE_epilogue).
        * gansidecl.h (ATTRIBUTE_PRINTF_4, ATTRIBUTE_PRINTF_5): New macros.
        * gen-protos.c: Include gansidecl.h.
        (hashf): Don't make it static, constify parameter `name'.
        * genattrtab.c (check_attr_test): Change XEXP() to XSTR() to match
        specifier %s in calls to function `fatal'.
        * haifa-sched.c: Include toplev.h.
        (find_rgns): Remove unused variable `j'.
        * integrate.c (note_modified_parmregs): Mark parameter `x' with
        ATTRIBUTE_UNUSED.
        (mark_stores): Likewise.
        * jump.c (mark_modified_reg): Likewise.
        * output.h (insn_current_reference_address): Add prototype.
        (eh_frame_section): Likewise.
        * print-rtl.c: Include bitmap.h.
        * reload1.c (reload): Wrap variables `note' and `next' in macro
        PRESERVE_DEATH_INFO_REGNO_P.
        (forget_old_reloads_1): Mark parameter `ignored' with
        ATTRIBUTE_UNUSED.
        (choose_reload_regs): Remove unused variable `in'.
        (reload_cse_invalidate_mem): Mark parameter `ignore' with
        ATTRIBUTE_UNUSED.
        (reload_cse_check_clobber): Likewise.
        * rtl.h (expand_null_return, reg_classes_intersect_p): Add prototype.
        (mark_elimination): Fix typo in prototype.
        * scan-decls.c: Include gansidecl.h.
        * tree.h (using_eh_for_cleanups, supports_one_only): Add prototype.

From-SVN: r19867
1998-05-19 08:42:48 +00:00
Michael Meissner 0dfa18604b Makefile.in (HOST_RTL): Add $(HOST_PREFIX)bitmap.o.
* Makefile.in (HOST_RTL): Add $(HOST_PREFIX)bitmap.o.
        (rtl.o, emit-rtl.o): Add dependency on bitmap.h.
        ($(HOST_PREFIX_1)rtl.o): Likewise.
        ($(HOST_PREFIX_1)bitmap.o): New host object.
        * emit-rtl.c (toplevel): Include bitmap.h.
        (gen_rtx): Handle 't' and 'b' nodes.
        * print-rtl.c (print_rtx): Handle printing NOTE_INSN_LIVE notes.
        Print block number for block begin/end notes.  Print 't' type
        nodes as a pointer.  Know that the 3rd argument of live range
        start/stop notes is really a range_info rtx.  If type is 'b', print
        out argument as a bitmap.
        * rtl.c: Include bitmap.c.
        (copy_rtx): Copy tree nodes as is.  Copy bitmaps if type is 'b'.
        (note_insn_name): Add NOTE_INSN_RANGE_{START,END}, NOTE_INSN_LIVE.
        * rtl.def (RANGE_LIVE): New node to hold live information while we
        recalculate the basic blocks.
        (RANGE_REG, RANGE_INFO): New rtl types for live range splitting.
        (RANGE_VAR): New node, to hold information saved in symbol node for New
        communicating live range information to the debug output functions.
        * rtl.h (rtunion_def): Add rttree and rtbit fields.
        (XBITMAP, XTREE): New accessor macros.
        (NOTE_LIVE_INFO): Overload NOTE_SOURCE_FILE for NOTE_INSN_LIVE notes.
        (NOTE_RANGE_INFO): Similarly for NOTE_INSN_RANGE_{START,END} notes.
        (NOTE_BLOCK_LIVE_RANGE_BLOCK): Define.
        (NOTE_INSN_RANGE_START, NOTE_INSN_RANGE_END, NOTE_INSN_LIVE): New notes.
        (RANGE_LIVE_{BITMAP,ORIG_BLOCK}): New accessor macros.
        (RANGE_REG_{SYMBOL,BLOCK}_NODE, RANGE_VAR_*): New accessor macros.
        (RANGE_INFO_*): Likewise.
        * sched.c (sched_analyze): Keep live range start/stop notes.
        (unlink_other_notes): Likewise.
        * haifa-sched.c (sched_analyze): Keep live range start/stop notes.
        (unlink_other_notes): Likewise.
        * tree.h (BLOCK_LIVE_RANGE_{START,END,VAR_FLAG}): New accessor macros.
        (BLOCK_LIVE_RANGE_FLAG): Likewise.
        (DECL_LIVE_RANGE_RTL): Likewise.
        (struct tree_block): Add live_range_flag, live_range_var_flag,
        live_range_start and live_range_end.
        (struct tree_decl): Add live_range_rtl field.
        * gengenrtl.c (type_from_format): Handle 'b' and 't'.
        (accessor_from_format): Likewise.

Co-Authored-By: Jeffrey A Law <law@cygnus.com>

From-SVN: r19727
1998-05-13 15:13:47 -06:00
Jeffrey A Law 5d27de7d00 * haifa-sched.c (schedule_insns): Fix merge goof.
From-SVN: r19725
1998-05-13 10:52:15 -06:00
Michael Meissner 47312d8401 Add a blank line in verbose debug output
From-SVN: r19724
1998-05-13 15:32:22 +00:00
Michael Meissner 6d3352d918 align debug output
From-SVN: r19721
1998-05-13 12:55:38 +00:00
Michael Meissner cbb1345779 Use HAIFA_INLINE for inlining functions instead of __inline directly
From-SVN: r19700
1998-05-12 12:20:18 +00:00
Richard Henderson 53c0919dd9 * haifa-sched.c (print_exp): Fix typo.
From-SVN: r19643
1998-05-08 18:53:01 -07:00
Jeff Law a59bfd78eb Fix typo.
From-SVN: r19606
1998-05-06 16:51:38 -06:00
Jeff Law 38e012594e typo typo fixes fixes
From-SVN: r19601
1998-05-06 15:09:07 -06:00
Jeffrey A Law 6b879bcc3b * haifa-sched.c (print_value, case SUBREG): Fix typo.
From-SVN: r19593
1998-05-06 12:00:20 -06:00
Jeffrey A Law cc1328655c toplev.c (-fsched-max): Delete flag.
* toplev.c (-fsched-max): Delete flag.
        (-fsched-interblock-max-blocks,-fsched-interblock-max-insns): Likewise.
        * haifa-sched.c: Remove -fsched-max-N, -fsched-interblock-max-blocks-N
        and -fsched-interblock-max-insns-N support.  Remove INTERBLOCK_DEBUG
        conditionals.
        * haifa-sched.c (find_rgns): Correctly handle reducible loops with
        inner loops which are not reducible.

From-SVN: r19586
1998-05-06 10:32:40 -06:00
Jeffrey A Law 15ebe47d89 haifa-sched.c (find_rgns): In no_loops case, fix test for leaf blocks.
* haifa-sched.c (find_rgns): In no_loops case, fix test for leaf
        blocks.  Check for 1 successor which is the EXIT_BLOCK.
        * haifa-sched.c (find_rgns): Detect unreachable blocks, including
        unreachable loops with more than one block.

Co-Authored-By: Jim Wilson <wilson@cygnus.com>

From-SVN: r19558
1998-05-05 18:12:15 -06:00
Michael Meissner 459b382548 Prevent buffer overrun in debug output; Make alloc_{INSN,EXPR}_LIST static
From-SVN: r19503
1998-04-30 16:25:19 +00:00
J"orn Rennecke 93da030f63 sched.c (new_insn_dead_notes): Check if the register was used in the original instruction.
* sched.c (new_insn_dead_notes): Check if the register was
	used in the original instruction.
	* haifa-sched.c (new_insn_dead_notes): Likewise.

From-SVN: r19494
1998-04-29 14:53:20 +01:00
Richard Henderson c6a754f2d7 * haifa-sched.c (queue_to_ready): Fix typo in prototype.
From-SVN: r19293
1998-04-18 19:45:34 -07:00
Jeff Law e009aaf31f loop.c (regs_patch_p): Add prototype.
* loop.c (regs_patch_p): Add prototype.
        (add_label_notes, count_nonfixed_reads): Likewise.
        (find_single_use_in_loop): Likewise.
        (express_from): Surround prototype with #ifdef.
        (giv_sort): Similarly.
        * jump.c (mark_modified_reg): Add prototype.
        * haifa-sched.c (is_prisky): Add prototype.
        (queue_to_ready): Likewise.
        * genextract.c (gen_insn): Add prototype.
        * genemit.c (max_operand_1): Add prototype.
        (max_operand_vec, print_code, gen_exp, gen_insn): Likewise.
        (gen_expand, gen_explit, output_add_clobbers): Likewise.
        (output_init_mov_optab): Likewise.
        * genattrtab.c (attr_hash_add_rtx): Add prototype.
        (attr_hash_add_string, write_length_unit_log): Likewise.
        * genattr.c (init_range): Add prototype.
        * combine.c (sets_function_arg_p): Add prototype.

From-SVN: r19251
1998-04-16 17:56:12 -06:00
Jeffrey A Law a2e687765a haifa-sched.c (build_control_flow): Accept raw data as inputs instead of computing it locally.
* haifa-sched.c (build_control_flow): Accept raw data as inputs
        instead of computing it locally.  Callers changed.
        (find_rgns): Several new arguments.  Callers changed.
        Generally clean up and comment better.  Use dominators to
        identify reducible loops.  Convert some flag arrays to bitmaps.
        Convert most of the code to work on pred/succ lists instead of
        an edge table.  Add comments for future improvements.
        (schedule_insns): Allocate temporary tables for flow data, call
        routines to compute flow data and pass it along to children as
        arguments.
        (debug_control_flow): Delete.  Use dump_bb_data instead.
General cleanup + fix a bug or two.

From-SVN: r19244
1998-04-16 16:00:09 -06:00
Jim Wilson a8afd67b01 Fix solaris2 loop-2d.c failure reported by Manfred Hollstein.
* haifa-sched.c (build_control_flow): Set unreachable for block whose
	only predecessor is itself.

From-SVN: r19021
1998-04-06 10:50:13 -07:00
Richard Henderson 4ed43ff85a haifa-sched.c (split_block_insns): Don't supress insn splitting on subsequent passes.
* haifa-sched.c (split_block_insns): Don't supress insn splitting
on subsequent passes.
* alpha.c (hard_fp_register_operand): New function.
* alpha.h (PREDICATE_CODES): Add it.
* alpha.md (extendsidi2): Kill bogus f<-f cvtql+cvtlq case.  Add an
f<-m case and accompanying define_split.
(trapb): Use a unique unspec_volatile number.

From-SVN: r18992
1998-04-04 05:54:32 -08:00
Jeff Law d6df9efb6d * Check in merge from gcc2. See ChangeLog.11 and ChangeLog.12
for details.

        * haifa-sched.c: Mirror recent changes from gcc2.

From-SVN: r18988
1998-04-04 06:54:26 -07:00
Jeffrey A Law c4fa346037 * haifa-sched.c (print_pattern): Correct arg to sprintf.
From-SVN: r18884
1998-03-28 16:45:08 -07:00
Bernd Schmidt 4d1d804584 basic-block.h (basic_block_computed_jump_target): Declare.
* basic-block.h (basic_block_computed_jump_target): Declare.
	* flags.h: (current_function_has_computed_jump): Declare.
	* flow.c: (basic_block_computed_jump_target): Define.
	(flow_analysis): Allocate it. Set current_function_has_computed_jump
	to 0.
	(find_basic_blocks): Set current_function_has_computed_jump and
	elements of basic_block_computed_jump_target to 1 as appropriate.
	* function.c: (current_function_has_computed_jump): Define.
	* global.c (global_conflicts): Don't allocate pseudos into stack regs
	at the start of a block that is reachable by a computed jump.
	* reg-stack.c (stack_reg_life_analysis): If must restart, do so
	immediately.
	(subst_stack_regs): Undo change from Sep 4 1997.
	(uses_reg_or_mem): Now unused, deleted.
	* stupid.c (stupid_life_analysis): Compute
	current_function_has_computed_jump.
	(stupid_find_reg): Don't allocate stack regs if the function has a
	computed goto.
        * haifa-sched.c (is_cfg_nonregular): Delete code to determine if
        the current function has a computed jump.  Use the global value
        instead.

Co-Authored-By: Jeffrey A Law <law@cygnus.com>

From-SVN: r18860
1998-03-27 17:12:41 -07:00
Jeff Law 7eea64437a haifa-sched.c (find_post_sched_live): Use EXECUTE_IF_SET_IN_REG_SET instead of calling REGNO_REG_SET_P for each pseudo.
* haifa-sched.c (find_post_sched_live): Use EXECUTE_IF_SET_IN_REG_SET
        instead of calling REGNO_REG_SET_P for each pseudo.
        (update_reg_usage): Likewise.
        (compute_block_backward)dependences): Do not call "free_list" for
        an empty list.
Improves compile times by about 7% on average on my PAs.

From-SVN: r18835
1998-03-25 15:58:40 -07:00
Kaveh R. Ghazi 081f5e7e66 Fix more warnings...
* c-lang.c (finish_file): Wrap variable `void_list_node' with macro
        test !ASM_OUTPUT_CONSTRUCTOR || !ASM_OUTPUT_DESTRUCTOR.
        * calls.c (emit_call_1): Wrap variable `already_popped' with macro
        test !ACCUMULATE_OUTGOING_ARGS.
        * collect2.c (write_c_file_glob): Wrap function definition in
        macro test !LD_INIT_SWITCH.
        * combine.c (try_combine): Wrap variables `cc_use' and
        `compare_mode' in macro test EXTRA_CC_MODES.
        * cpplib.c (do_ident): Remove unused variable `len'.
        (skip_if_group): Remove unused variables `at_beg_of_line' and
        `after_ident'.
        (cpp_get_token): Remove unused variable `dummy'.
        * dbxout.c (scope_labelno): Move static variable definition inside
        the one function scope where it is used.
        (dbxout_function_end): Wrap prototype and definition in
        macro test !NO_DBX_FUNCTION_END.
        * dwarf2out.c (add_subscript_info): Wrap variable `dimension_number'
        in macro test !MIPS_DEBUGGING_INFO.
        * expr.c (expand_builtin_setjmp): Move declaration of variable `i'
        into the scope where it is used.  Wrap empty else-statement body
        in braces.
        * fix-header.c: Fix typo in comment.
        (inf_skip_spaces): Cast results of INF_UNGET to (void).
        (check_protection, main): Likewise.
        * flow.c (find_basic_blocks_1): Remove dangling comment text.
        * function.c (contains): Wrap prototype and definition in macro
        test HAVE_prologue || HAVE_epilogue.
        (fixup_var_refs_1): Remove unused variable `width'.
        * gen-protos.c (main): Remove unused variable `optr'.
        * haifa-sched.c (debug_control_flow): Remove unused variable `j'.
        * libgcc2.c (__udiv_w_sdiv): Provide dummy return value of 0.
        (__sjpopnthrow): Remove unused variable `jmpbuf'.
        (__throw): Remove unused variable `val'.
        * protoize.c: Check for a previously existing definition before
        defining *_OK macros.
        * scan-decls.c (scan_decls): Remove unused variable `old_written'.

From-SVN: r18654
1998-03-18 07:18:06 +00:00
Michael Meissner 01c7f3501b Make qsort compare function type correct
From-SVN: r18483
1998-03-11 13:18:30 +00:00
Jeffrey A Law 168cbdf99b haifa-sched.c (is_cfg_nonregular): Change return type to an int.
* haifa-sched.c (is_cfg_nonregular): Change return type to
        an int.  No longer compute "estimated" number of edges.  Use
        computed_jump_p instead of duplicating the code.  Fixup/add
        some comments.
        (build_control_flow): Returns a value indicating an irregularity
        in the cfg was detected.  Count the number of edges in the cfg.
        allocate various edge tables.
        (find_rgns): No longer look for unreachable blocks.
        (schedule_insns): Do not allocate memory for edge tables here.
        Free memory for edge tables before returning.  Do not perform
        cross block scheduling if build_control_flow returns nonzero.
        * flow.c (compute_preds_succs): More accurately determine when
        a block drops in.
Fixes various compile hangs after haifa cleanup.

From-SVN: r18439
1998-03-07 19:15:26 -07:00
Jeffrey A Law 5ece974606 haifa-sched.c (build_jmp_edges): Delete dead function.
* haifa-sched.c (build_jmp_edges): Delete dead function.
        (build_control_flow): Use cfg routines from flow.c
        (schedule_insns): Remove debugging code accidentally checked
        in earlier today.
        * basic-block.h: Add external integer list structures, typdefs,
        accessor macros and function declarations.  Simlarly for
        basic block pred/succ support and simple bitmap stuff.
        * flow.c: Add functions for integer list, basic block pred/succ
        support and simple bitmap support.
        (compute_dominators): New function to compute dominators and
        post dominators.
        (find_basic_blocks): Split into two functions.
        (life_analysis): Likewise.
        (flow_analysis): Removed.  Now handled by calling find_basic_blocks,
        the life_analysis from toplev.c
        * toplev.c (rest_of_compilation): Call find_basic_blocks, then
        life_analysis instead of flow_analysis.

Co-Authored-By: Doug Evans <devans@cygnus.com>

From-SVN: r18421
1998-03-05 15:31:51 -07:00
Richard Henderson ebb7b10b6d haifa-sched.c (free_list): Rename from free_pnd_lst.
* haifa-sched.c (free_list): Rename from free_pnd_lst.
(free_pending_lists): Rename free_pnd_lst uses.
(remove_dependence): Place expunged element on unused_insn_list.
(alloc_INSN_LIST, alloc_EXPR_LIST): New.  Change all callers of
gen_rtx_*_LIST and alloc_rtx to use them.
(compute_block_backward_dependences): Free the reg_last_* lists.

From-SVN: r18415
1998-03-04 18:15:23 -08:00
Kaveh R. Ghazi 5835e573cd haifa-sched.c: Include "system.h" to get <stdlib.h> and <stdio.h>.
* haifa-sched.c: Include "system.h" to get <stdlib.h> and <stdio.h>.
        (BLOCKAGE_RANGE): Add parentheses around arithmetic in operand of |.
        (sched_note_set): Remove unused parameter `b', all callers changed.
        (schedule_block): Likewise for `rgn'.
        (split_hard_reg_notes): Likewise for `orig_insn'.
        (check_live): Likewise for `trg'.
        (update_live): Likewise.
        (check_live_1): Explcitly declare variable `i' as int.
        (update_live_1): Likewise.
        (insn_issue_delay): Remove unused variable `link'.
        (sched_analyze_2): Add default case in enumeration switch.
        (schedule_insns): Remove unused variable `i'.
	* Makefile.in ($(SCHED_PREFIX)sched.o): Depend on system.h.

From-SVN: r18048
1998-02-17 14:35:43 -07:00
Jeffrey A Law 8e7336f849 toplev.c (flag_schedule_reverse_before_reload): Delete variable.
* toplev.c (flag_schedule_reverse_before_reload): Delete variable.
        (flag_schedule_reverse_after_reload): Likewise.
        (f_options): Remove reverse scheduling support.
        * flags.h (flag_schedule_reverse_before_reload): Delete declaration.
        (flag_schedule_reverse_after_reload): Likewise.
        * haifa-sched.c (rank_for_schedule): Remove support for reverse
        scheduling.
Trivial cleanup.

From-SVN: r18020
1998-02-15 15:28:33 -07:00
J"orn Rennecke fcdc0d6e61 sched.c (update_flow_info, REG_WAS_0): Ignore if setting insn was deleted.
* sched.c (update_flow_info, REG_WAS_0): Ignore if setting insn
	was deleted.
	* haifa-sched.c (update_flow_info, REG_WAS_0): Likewise.

From-SVN: r17963
1998-02-13 12:40:29 +00:00
Richard Henderson 38a448ca5d alias.c: Change all uses of gen_rtx(FOO...) to gen_rtx_FOO...
* alias.c: Change all uses of gen_rtx(FOO...) to gen_rtx_FOO;
change gen_rtx(expr...) to gen_rtx_fmt_foo(expr...).
* caller-save.c, calls.c, combine.c, cse.c: Likewise.
* dwarf2out.c, except.c, explow.c, expmed.c, expr.c: Likewise.
* final.c, flow.c, function.c, genpeep.c, haifa-sched.c: Likewise.
* halfpic.c, integrate.c, jump.c, local-alloc.c, loop.c: Likewise.
* profile.c, recog.c, reg-stack.c, regclass.c, regmove.c: Likewise.
* reload.c, reload1.c, reorg.c, sched.c, stmt.c, stupid.c: Likewise.
* unroll.c, varasm.c: Likewise.
* config/alpha/alpha.c, config/alpha/alpha.md: Likewise.

From-SVN: r17357
1998-01-14 15:10:50 -08:00
Jeff Law a4fc4b2d12 Update copyrights.
From-SVN: r17348
1998-01-13 14:42:33 -07:00
Richard Henderson c995fea195 haifa-sched.c (schedule_insns): Correctly remove inter-block dependencies after reload.
* haifa-sched.c (schedule_insns): Correctly remove inter-block
        dependencies after reload.

From-SVN: r17346
1998-01-13 14:38:31 -07:00
Jeff Law 04029ca245 haifa-sched.c (create_reg_dead_note): Detect and handle another case where we kill more regs after sched than were...
* haifa-sched.c (create_reg_dead_note): Detect and handle another
        case where we kill more regs after sched than were killed before
        sched.
        * sched.c (create_reg_dead_note): Similarly.

From-SVN: r17183
1997-12-22 01:55:49 -07:00
Jeff Law 6d8ccdbbb2 Bring over changes from latest gcc-2.8 pre-release.
Mirror sched.c change into haifa-sched.c

From-SVN: r17097
1997-12-15 00:05:04 -07:00
Jeffrey A Law ac957f1381 * Partially cleaned up prototyping code from HJ.
* haifa-sched.c (haifa_classify_insn): Renamed from classify_insn.
        All references changed.
        * rtl.h: Protect from multiple inclusions.  Add many prototypes.

        * libgcc2.c (string.h): Hoist inclusion to occur before first use of
        string functions like strlen.
More pending patches.

From-SVN: r17024
1997-12-09 01:20:07 -07:00
Richard Henderson 2f308fec0e haifa-sched.c (print_block_visualization): Call fprintf directly, don't sprintf through an alloca'ed buffer.
* haifa-sched.c (print_block_visualization): Call fprintf directly,
        don't sprintf through an alloca'ed buffer.

From-SVN: r15859
1997-10-07 10:53:16 -06:00
Jeffrey A Law 1447b516d2 haifa-sched.c (schedule_block): If the first real insn in a block has any special notes attached to it, remove them.
* haifa-sched.c (schedule_block): If the first real insn in a
        block has any special notes attached to it, remove them.
Fixes bug reported by Weiwen Liu.

From-SVN: r15853
1997-10-07 09:52:32 -06:00
Thomas Koenig 55d8971965 * haifa-sched.c: (get_block_head_tail) Remove unneeded initialization.
From-SVN: r15815
1997-09-30 23:08:31 -06:00
David S. Miller 9524f769a7 combine.c (try_combine): Use NULL_RTX instead of '0' where appropriate in calls to gen_rtx().
* combine.c (try_combine): Use NULL_RTX instead of '0' where
        appropriate in calls to gen_rtx().
        * cse.c (cse_main): Likewise.
        * emit-rtl.c (gen_label_rtx): Likewise.
        * expr.c (init_expr_once): Likewise.
        * haifa-sched.c (flush_pending_lists, sched_analyze_insn,
        sched_analyze, init_rgn_data_dependences,
        compute_block_backward_dependences): Likewise.
        * sched.c (schedule_insns): Likewise.
        * varasm.c (immed_double_const): Likewise.

From-SVN: r15630
1997-09-22 11:41:48 -06:00