aboutsummaryrefslogtreecommitdiff
path: root/gcc/sched.c
AgeCommit message (Collapse)AuthorFilesLines
1998-10-29Fix sched REG_DEAD note handling bug found by post-reload-flow pass.Jim Wilson1-2/+22
* sched.c (update_flow_info): Add code to ! found_orig_dest case to handle deleted no-op moves of hard registers. * haifa-sched.c (update_flow_info): Likewise. From-SVN: r23431
1998-10-23sched.c (update_flow_info): Revert Oct 19, 1998 change.Jeffrey A Law1-15/+1
* sched.c (update_flow_info): Revert Oct 19, 1998 change. Brings back Oct 15, 1998 change. * haifa-sched.c (update_flow_info): Likewise. * flow.c (life_analysis_1): Delete CLOBBER insns after reload. Real fix was in flow.c... From-SVN: r23261
1998-10-19sched.c (update_flow_info): Handle death notes made invalid by instruction ↵Jeff Law1-1/+15
splitting. � * sched.c (update_flow_info): Handle death notes made invalid by instruction splitting. Partially reverts Oct 15, 1998 patch. * haifa-sched.c (update_flow_info): Likewise. From-SVN: r23171
1998-10-15flow.c (life_analysis_1): Do not clobber regs_ever_live after reload.Bernd Schmidt1-31/+1
* flow.c (life_analysis_1): Do not clobber regs_ever_live after reload. Never perform rescans of the insn chain after reload. (propagate_block): Do not delete insn or create new autoinc addressing modes after reload. * jump.c (jump_optimize): Unconditionally use the code that was previously conditional on PRESERVE_DEATH_INFO_REGNO_P. * reload1.c (reload): When reloading is finished, delete all REG_DEAD and REG_UNUSED notes. (emit_reload_insns): Delete all code that was conditional on PRESERVE_DEATH_INFO_REGNO_P. (no_longer_dead_regs): Delete variable. (reload_cse_delete_death_notes): Delete function. (reload_cse_no_longer_dead): Delete function. (reload_cse_regs_1): Delete all code to handle deletion of death notes. (reload_cse_noop_set_p): Likewise. (reload_cse_simplify_set): Likewise. (reload_cse_simplify_operands): Likewise. (reload_cse_move2add): Likewise. * reorg.c (used_spill_regs): Delete declaration. (max_label_num_after_reload): Delete declaration. (find_dead_or_set_registers): Don't assume that spill regs are dead at a CODE_LABEL. * rtlanal.c (dead_or_set_regno_p): Death notes are always accurate, even after reload. * sched.c (sched_analyze_insn): Likewise. (update_flow_info): Likewise. * haifa-sched.c (sched_analyze_insn): Likewise. (update_flow_info): Likewise. * tm.texi (PRESERVE_DEATH_INFO_REGNO_P): Delete documentation. * toplev.c (max_label_num_after_reload): Delete variable. (rest_of_compilation): Don't set max_label_num_after_reload. Call life_analysis after reload_cse_regs if optimizing. * config/gmicro/gmicro.h: Delete comment referring to PRESERVE_DEATH_INFO_REGNO_P. * config/i386/i386.h: Likewise. * config/m88k/m88k.h: Likewise. * config/m32r/m32r.h (PRESERVE_DEATH_INFO_REGNO_P): Delete definition. * config/sh/sh.h: Likewise. Accurate REG_DEAD notes after reload. Co-Authored-By: Jeffrey A Law <law@cygnus.com> From-SVN: r23120
1998-10-14Warning fixes:Kaveh R. Ghazi1-16/+16
* Makefile.in (sched.o): Depend on recog.h. * alias.c (REG_BASE_VALUE): Cast the result of REGNO() macro to (unsigned) when comparing against one. (find_base_value): Likewise. (record_base_value): Cast variable `regno' to (unsigned) when comparing against one. Cast the result of REGNO() macro to (unsigned) when comparing against one. (memrefs_conflict_p): Change type of variables `r_x' and `r_y' to unsigned. (init_alias_analysis): Add unsigned variable `ui'. Use it as loop variable where an unsigned index is needed. * caller-save.c (init_caller_save): Cast `-1' to (enum insn_code) before comparing against one. * collect2.c: Add prototypes for functions `error', `fatal' and `fatal_perror'. Make these functions take variable arguments instead of faking it with a fixed number of args. (write_c_file_stat): Cast the argument of ctype macro to (unsigned char). * combine.c (can_combine_p): Mark parameter `pred' with ATTRIBUTE_UNUSED. (find_split_point): Cast variable `src' to (unsigned HOST_WIDE_INT) when comparing against one. HOST_WIDE_INT) when comparing against one. (simplify_rtx): Cast 1 to (unsigned HOST_WIDE_INT) in shift. (simplify_logical): Likewise. (force_to_mode): Cast result of INTVAL() macro to (unsigned HOST_WIDE_INT) when comparing against one. Cast 1 to (unsigned HOST_WIDE_INT) in shift. (simplify_and_const_int): Cast result of INTVAL() macro to `unsigned HOST_WIDE_INT' when comparing against one. (merge_outer_ops): Cast variable const0 to `unsigned HOST_WIDE_INT' when comparing against the result of GET_MODE_MASK() macro. (simplify_comparison): Likewise for variable `c0'. Cast variable `const_op' to `unsigned HOST_WIDE_INT' when comparing against one. Cast `1' to `unsigned HOST_WIDE_INT' in shift. Cast the result of `GET_MODE_MASK()/2' to `HOST_WIDE_INT' when comparing against one. Cast `1' to `unsigned HOST_WIDE_INT' in shift. Cast result of INTVAL() macro to `unsigned HOST_WIDE_INT' when comparing against one. (distribute_notes): Wrap variable `cc0_setter' in macro `HAVE_cc0'. config/mips/mips.c (gen_int_relational): Cast result of INTVAL() macro to `unsigned HOST_WIDE_INT' when comparing against one. (output_block_move): Cast `sizeof' expression to (int) when comparing against one. (function_arg): Cast BITS_PER_WORD to `unsigned' when comparing against one. (save_restore_insns): Cast `base_offset' to `long' to match format specifier in fprintf. * config/mips/mips.h (Pmode): Cast the result of `Pmode' macro to `enum machine_mode'. * flow.c (life_analysis_1): Remove unused variable `insn'. * gcc.c (translate_options): Move variables `j' and `k' into the scope in which they are used. Change their types to `size_t'. (set_spec): Cast the argument of ctype macro to `unsigned char'. (read_specs): Likewise. (process_command): Cast `sizeof' to (int) when comparing against one. (do_spec_1): Cast the argument of ctype macro to `unsigned char'. (handle_braces): Cast both sides of `==' expression to `long' to ensure sign matching. (main): Cast variable `i' to `int' when comparing against one. * gcov-io.h (__fetch_long): Change type of parameter `bytes' from int to size_t. Cast variable `i' to size_t when comparing against one. * genattrtab.c (convert_set_attr_alternative): Remove unused parameter `insn_code'. All callers changed. (convert_set_attr): Likewise. * genrecog.c (add_to_sequence): Cast result of XVECLEN() macro to size_t when comparing against one. Likewise for variable `len'. * global.c (global_alloc): Cast variable `max_regno' to size_t when comparing against one. Likewise for variable `max_allocno'. * jump.c (sets_cc0_p): Mark parameter `x' with ATTRIBUTE_UNUSED. * local-alloc.c (validate_equiv_mem_from_store): Mark parameter `set' with ATTRIBUTE_UNUSED. (find_free_reg): Cast `sizeof' expression to (int) when comparing against one. * loop.c (count_loop_regs_set): Remove unused variable `dest'. (strength_reduce): Mark parameter `bct_p' with ATTRIBUTE_UNUSED. (get_condition): Cast variable `const_val' to `unsigned HOST_WIDE_INT' when comparing against one. Cast unsigned expression to HOST_WIDE_INT when comparing against one. (insert_loop_mem): Mark parameter `data' with ATTRIBUTE_UNUSED. (load_mems_and_recount_loop_regs_set): Cast variable `nregs' to `unsigned' when comparing against one. * protoize.c (is_id_char): Change type of parameter `ch' to unsigned char. (munge_compile_params): Cast argument of ctype macro to (const unsigned char). (process_aux_info_file): Cast variable `aux_info_size' to int when comparing against one. (forward_to_next_token_char): Cast argument of ctype macro to `const unsigned char'. (edit_formals_lists): Likewise. (find_rightmost_formals_list): Likewise. (add_local_decl): Likewise. (add_global_decls): Likewise. (edit_fn_definition): Likewise. (do_cleaning): Likewise. (scan_for_missed_items): Likewise. (edit_file): Cast variable `orig_size' to (int) when comparing against one. (main): Cast argument of ctype macro to `const unsigned char'. * recog.c (const_int_operand): Mark parameter `mode' with ATTRIBUTE_UNUSED. * regclass.c (record_reg_classes): Change type of variable `c' to `unsigned char'. Cast `char' array index to `unsigned char'. * reload.c (push_secondary_reload): Cast argument to REG_CLASS_FROM_LETTER() macro to `unsigned char'. * reload1.c (calculate_needs): Cast `char' array index to `unsigned char'. (set_label_offsets): Change type of variable `i' to unsigned int. Cast result of XVECLEN() macro to unsigned when comparing against one. (mark_not_eliminable): Change type of variable `i' to unsigned. (order_regs_for_reload): Likewise. Cast `max_regno' to unsigned when comparing against one. (reload_as_needed): Cast macro NUM_ELIMINABLE_REGS to (int) when comparing against one. (choose_reload_regs): Hide unused label `fail'. (reload_cse_simplify_operands): Cast `char' array index to `unsigned char'. (reload_combine_note_store): Mark parameter `set' with ATTRIBUTE_UNUSED. Cast UNITS_PER_WORD to unsigned when comparing against one. (reload_cse_move2add): Remove unused variable `src2'. * sched.c: Include recog.h. (sched_note_set): Remove unused parameter `b'. All callers changed. (split_hard_reg_notes): Likewise for parameter `orig_insn'. (blockage_range): Cast result of UNIT_BLOCKED() macro to (int) when comparing against one. * stupid.c (stupid_find_reg): Mark parameter `changes_size' with ATTRIBUTE_UNUSED. Cast `sizeof' expression to (int) when comparing against one. * unroll.c (precondition_loop_p): Remove unused parameter `loop_end'. All callers changed. From-SVN: r23079
1998-08-17m68k.c: Include "system.h" instead of <stdio.h>.Andreas Schwab1-10/+8
* config/m68k/m68k.c: Include "system.h" instead of <stdio.h>. Include "toplev.h". (valid_dbcc_comparison_p): Mark mode argument as unused. (symbolic_operand): Likewise. (legitimize_pic_address): Likewise. (const_uint32_operand): Likewise. (const_sint32_operand): Likewise. * sched.c [!INSN_SCHEDULING]: Define only dummy function schedule_insns and comment out rest of file. From-SVN: r21779
1998-06-18Fix stack overflow found by glibc compile with max optimizations.Jim Wilson1-9/+24
* 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-05-13Makefile.in (HOST_RTL): Add $(HOST_PREFIX)bitmap.o.Michael Meissner1-0/+4
* 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-06typo typo fixes fixesJeff Law1-2/+2
From-SVN: r19601
1998-04-29sched.c (new_insn_dead_notes): Check if the register was used in the ↵J"orn Rennecke1-0/+7
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-04* Check in merge from gcc2. See ChangeLog.11 and ChangeLog.12Jeff Law1-12/+10
for details. * haifa-sched.c: Mirror recent changes from gcc2. From-SVN: r18984
1998-03-20Major cutover to using system.h:Kaveh R. Ghazi1-4/+1
* Makefile.in (alias.o, bitmap.o, c-aux-info.o, c-common.o, c-decl.o, c-iterate.o, c-lang.o, c-lex.o, c-pragma.o, c-typeck.o, caller-save.o, calls.o, collect2.o, combine.o, cse.o, dbxout.o, dwarf2out.o, dwarfout.o, emit-rtl.o, except.o, explow.o, expmed.o, expr.o, final.o, flow.o, function.o, getpwd.o, global.o, integrate.o, jump.o, local-alloc.o, loop.o, optabs.o, pexecute.o, prefix.o, print-rtl.o, print-tree.o, profile.o, real.o, recog.o, reg-stack.o, regclass.o, regmove.o, reload.o, reload1.o, reorg.o, rtl.o, rtlanal.o, sdbout.o, stmt.o, stor-layout.o, stupid.o, tlink.o, toplev.o, tree.o, unroll.o, varasm.o, xcoffout.o): Depend on system.h. * alias.c, bitmap.c, c-aux-info.c, c-common.c, c-decl.c, c-iterate.c, c-lang.c, c-lex.c, c-pragma.c, c-typeck.c, caller-save.c, calls.c, collect2.c, combine.c, cse.c, dbxout.c, dwarf2out.c, dwarfout.c, emit-rtl.c, except.c, explow.c, expmed.c, expr.c, final.c, flow.c, function.c, gcc.c, getpwd.c, global.c, integrate.c, jump.c, local-alloc.c, loop.c, optabs.c, pexecute.c, prefix.c, print-rtl.c, print-tree.c, profile.c, real.c, recog.c, reg-stack.c, regclass.c, regmove.c, reload.c, reload1.c, reorg.c, rtl.c, rtlanal.c, sched.c, sdbout.c, stmt.c, stor-layout.c, stupid.c, tlink.c, toplev.c, tree.c, unroll.c, varasm.c, xcoffout.c: Include system.h. Organize include ordering so that stdarg/varargs comes before other system headers. Remove spurious casts of functions assured of a prototype in system.h. From-SVN: r18726
1998-03-11Make qsort compare function type correctMichael Meissner1-4/+5
From-SVN: r18483
1998-02-20Remove old code to get arguments in regs into pseudos early.Michael Meissner1-0/+9
From-SVN: r18148
1998-02-13sched.c (update_flow_info, REG_WAS_0): Ignore if setting insn was deleted.J"orn Rennecke1-0/+8
* 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-13Rats. Forgot to change copyrights on the first commit.Robert Lipe1-1/+1
From-SVN: r17902
1998-02-13c-lang.c (finish_file): Bracket declaration of static_ctors, static_dtors.Robert Lipe1-1/+1
* c-lang.c (finish_file): Bracket declaration of static_ctors, static_dtors. * calls.c (expand_call): Bracket declaration of 'rtx_before_call', 'old_stack_arg_under_construction' (emit_library_call): Bracket declaration of 'upper_bound', 'lower_bound', 'i', 'reg_parm_stack_space' (emit_library_call_value): Likewise. (store_one_arg): * collect2.c: include <unistd.h> when appropriate. Bracket declaration of 'exportf' and 'full_real_ld_suffix'. * emit-rtl.c (prev_cc0_setter): Remove unused variable 'link'. * explow.c (plus_constant_for_output_wide): Remove unused variable 'code'. (memory_address): Remove unused variable 'orig_x'. * genattrtab.c (make_canonical): Remove unreferenced label 'cond:'. (write_const_num_delay_slots): Remove unused variable 'i'. * genopinit.c (main): Remove unused variables 'dummy', 'insn_ptr'. (gen_insn): Remove unused variable 'obstack_ptr'. * libgcc2.c (__bb_exit_func): Remove unused variables 'ret', 'j', 'tmp', 'i'. (__bb_exit_trace_func): Remove unused variable 'e'. * optabs.c (expand_binop): remove unused variables 'lhs', 'rhs', 'funexp'. (expand_unop): Remove unused variable 'funexp'. (expand_complex_abs): Remove unused variable 'funexp'. (init_optabs): Bracket declaration of 'j'. (init_complex_libfuncs): Deleted. Dead static function. * profile.c (branch_prob): Remove unused variables 'insn', 'dest'. * reg-stack.c: Fix typo in proto for 'get_asm_operand_lengths' (reg_to_stack): 'initialized', 'before_function_beg' explictly type as ints instead of defaulting. (emit_swap_insn): Remove unused variable 'i2'. (compare_for_stack_reg): Remove unused variable 'src_note'. * rtlanal.c (computed_jump_p): Remove unused variable 'computed_jump'. * sched.c (actual_hazard): Bracket declaration of 'this_cost'. * stmt.c (add_case_node): Add parens for assignment used as truth. (all_cases_count): Remove unused variable 'count_high'. (mark_seen_cases): Remove unused variable 'i'. (check_for_full_enumeration_handling): Remove unused variable 't'. Bracket declaration of 'all_values', 'l'. * tlink.c: Include <stdlib.h>, <unistd.h>, <string.h>/<strings.h>. * varasm.c (assemble_string): Remove unused variable 'i'. (immed_double_const): Remove unused variable 'in_current_obstack'. (immed_real_const_1): Likewise. (output_constant_pool): Remove unreferenced label 'done'. (output_constant): Remove unused variable 'x'. * i386/i386.h (ENCODE_SECTION_INFO): TREE_PUBLIC is an int, not a string. * i386/sco5.h (ASM_OUTPUT_ASCII): Add parens for assignment used as truth. From-SVN: r17901
1998-01-27c-lex.c: Include <stdlib.h> and <string.h>/<strings.h>.Kaveh R. Ghazi1-7/+9
d * c-lex.c: Include <stdlib.h> and <string.h>/<strings.h>. Add prototype for `handle_sysv_pragma', and make it static. Add parentheses around assignment used as truth value. * combine.c (combine_instructions): Protect variable `prev' with macro HAVE_cc0. (can_combine_p): Protect variable `link' with AUTO_INC_DEC. (extract_left_shift): Add parentheses around operand of &. (merge_outer_ops): Avoid an empty body in an else-statement. (gen_rtx_combine): Remove unused variable `i'. * sparc/gmon-sol2.c: Include <fcntl.h>. Make return type of function monstartup `void'. Likewise for internal_mcount. Add `static void' prototype for moncontrol. Reconcile sprintf format vs. args. * sparc/sparc.c: Include <stdlib.h> and <string.h>/<strings.h>. Make return type of function_arg_slotno explicitly `int'. (reg_unused_after): Add parentheses around assignment used as truth value. (save_regs): Add explicit braces to avoid ambiguous `else'. (function_arg_slotno): Add parentheses around && within ||. (function_arg_pass_by_reference): Likewise. (sparc_flat_output_function_prologue): Reconcile fprintf format vs. args. * svr4.h (ASM_OUTPUT_LIMITED_STRING): Add parentheses around assignment used as truth value. * cplus-dem.c: Include <stdlib.h>. (demangle_signature): Avoid an empty body in an else-statement. (do_type): Remove unused variable `lvl'. * cppexp.c: Don't have <stdlib.h> depend on MULTIBYTE_CHARS. Include <string.h>/<strings.h>. (cpp_lex): Remove unused variable `namelen'. (cpp_lex): Explicitly declare `num_chars' as an int. * cpplib.c: Avoid duplicate inclusion of <stdlib.h>, include <unistd.h> instead. Explicitly declare is_system_include returning int. (make_assertion): Remove unused variable `kt'. (cpp_expand_to_buffer): Hide variable `obuf'. (output_line_command): Remove unused variables, `line_end', `line_cmd_buf' and `len'. (macarg): Remove unused variable `arg_start'. (special_symbol): Remove unused variable `i'. Add parentheses around assignment used as truth value. (do_include): Remove unused variables `pcfname' and `retried', hide `pcf' and `pcfbuflimit'. (do_line): Remove unused variable `i'. (finclude): Hide variable `missing_newline'. (cpp_handle_options): Remove unused variable `j'. (read_token_list): Remove unused variable `eofp'. (cpp_error_with_line): Remove unused variable `i'. (cpp_warning_with_line): Likewise. (cpp_pedwarn_with_line): Explicitly declare `column' as int. (cpp_error_from_errno): Remove unused variable `i'. * cse.c (invalidate): Add parentheses around assignment used as truth value. (find_best_addr): Move declaration of variable `our_cost' inside the conditional macro where its used. (fold_rtx): Avoid an empty body in an if-statement. (cse_insn): Wrap variables `this_insn_cc0_mode' and `this_insn_cc0' in macro HAVE_cc0. * dwarf2out.c: Include <stdlib.h> and <string.h>/<string.h>. (ASM_OUTPUT_DWARF_DATA8): Reconcile format vs. args in fprintf's. (output_uleb128): Likewise. (output_sleb128): Likewise. (output_cfi): Likewise. (output_call_frame_info): Remove unused variables `j', `fde_size' and `fde_pad'. (comp_unit_has_inlines): Hide declaration as per rest of file. (size_of_line_prolog): Correct typo in prototype. (add_arange): Likewise. (output_aranges): Likewise. (add_name_and_src_coords_attributes): Likewise. (gen_array_type_die): Likewise. (gen_inlined_subroutine_die): Likewise. (equate_decl_number_to_die): Remove unused variable `i'. (print_die): Reconcile format vs. args in fprintf's. (print_dwarf_line_table): Likewise. (output_die): Likewise. (output_line_info): Likewise. (add_subscript_info): Avoid an empty body in an else-statement. (gen_subprogram_die): Remove unused variable `fp_loc'. * dwarfout.c: Explicitly declare `next_pubname_number' as int. Protect `ordering_attribute' prototype with USE_ORDERING_ATTRIBUTE macro. Protect `src_coords_attribute' prototype with DWARF_DECL_COORDINATES macro. Hide `output_entry_point_die' prototype as in the rest of the file. Likewise for `output_pointer_type_die' and `output_reference_type_die'. Remove prototype for `type_of_for_scope'. (output_unsigned_leb128): Reconcile format vs. args in fprintf. (type_attribute): Add explicit braces to avoid ambiguous `else'. * final.c: Include <stdlib.h> and <string.h>/<strings.h>. (shorten_branches): Protect declaration of tmp_length with SHORTEN_WITH_ADJUST_INSN_LENGTH and ADJUST_INSN_LENGTH macros. (profile_function): Protect declaration of `sval' and `cxt' variables with appropriate macros. (final_scan_insn): Likewise for `note' variable. Add explicit braces to avoid empty body in an if-statement. (output_asm_insn): Move variable `i' inside macro conditional where it is used. Add parentheses around assignment used as truth value. (asm_fprintf) Likewise, likewise. * fix-header.c (main): Remove unused variable `done'. Protect declaration of `i' with FIXPROTO_IGNORE_LIST. * pexecute.c: Include <unistd.h>. Prototype `my_strerror'. * print-rtl.c (print_inline_rtx): Explicitly declare the parameter `ind'. * profile.c: Include <string.h>/<strings.h>. (instrument_arcs): Remove unused variables `note', `inverted', `zero' and `neg_one'. (branch_prob): Avoid empty body in an if-statement. * regclass.c: Include <stdlib.h>. (reg_alternate_class): Explicitly declare parameter `regno'. * regmove.c (regmove_optimize): Remove unused variable `p'. Add parentheses around assignment used as truth value. (find_matches): Remove unused variables `output_operand' and `matching_operand'. (fixup_match_1): Remove statement with no effect: "if (0) ;". * scan.c (sstring_append): Explicitly declare `count' as int. (scan_string): Explicitly declare parameter `init' as int. * sched.c: Include <stdlib.h>. (BLOCKAGE_RANGE): Add parentheses around arithmetic in operand of |. (rank_for_schedule): Add parentheses around assignment used as truth value. (schedule_block): Likewise. (regno_use_in): Likewise. (schedule_insns): Remove unused variable `i'. * toplev.c: Include <stdlib.h> and <string.h>/<strings.h>. (v_message_with_decl): Remove unused variable `n'. (botch): Explicitly declare parameter `s' as char *. (main): Add parentheses around assignment used as truth value. * tree.c (make_node): Protect the variable `kind' with the GATHER_STATISTICS macro. (real_value_from_int_cst): Move variable `e' inside conditional macro area where it is used. (tree_last): Add parentheses around assignment used as truth value. (build1): Protect the variable `kind' with the GATHER_STATISTICS macro. (print_obstack_statistics): Reconcile format vs. args in fprintf. Protect variables `i', `total_nodes', and `total_bytes' with the GATHER_STATISTICS macro. Lots more -W -Wall warnings disappear. From-SVN: r17518
1998-01-14alias.c: Change all uses of gen_rtx(FOO...) to gen_rtx_FOO...Richard Henderson1-21/+23
* 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
1997-12-22haifa-sched.c (create_reg_dead_note): Detect and handle another case where ↵Jeff Law1-0/+6
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-15Bring over changes from latest gcc-2.8 pre-release.Jeff Law1-2/+9
Mirror sched.c change into haifa-sched.c From-SVN: r17097
1997-11-02Update mainline egcs to gcc2 snapshot 971021.Jeff Law1-11/+7
From-SVN: r16278
1997-09-22combine.c (try_combine): Use NULL_RTX instead of '0' where appropriate in ↵David S. Miller1-1/+1
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-19sched.c (update_flow_info): Don't pass SCRATCH to dead_or_set_p.J"orn Rennecke1-0/+1
* sched.c (update_flow_info): Don't pass SCRATCH to dead_or_set_p. * haifa-sched.c (update_flow_info): Likewise. From-SVN: r15589
1997-09-05* sched.c (update_flow_info) When looking if to set found_split_destJ"orn Rennecke1-12/+27
or found_orig_dest, look at all parts of a PARALLEL. * haifa-sched.c (update_flow_info): Likewise. From-SVN: r15115
1997-08-11Remove gratuitous changes from the alias analysis patches.Jeff Law1-5/+5
From-SVN: r14771
1997-08-11* Integrate alias analysis changes from jfc@mit.eduJeffrey A Law1-575/+11
* Makefile.in (OBJS): Add alias.o (alias.o): Add dependencies. * alias.c: New file. * sched.c: Remove alias analysis code. It lives in alias.c now. (reg_last_uses_size): Declare. (sched_analyze_2): Add new arguments to true_dependence. (sched_analyze_insn): Use reg_last_uses_size instead of max_reg. (schedule_block): Initialize reg_last_uses_size. (schedule_insns): Always call init_alias_analysis. * calls.c (expand_call): Note calls to malloc, calloc, and realloc; mark return value from such functions as a pointer and keep track of them for alias analysis. If a return value from a function is a pointer, mark it as such. * combine.c (distribute_notes): Handle REG_NOALIAS. * cse.c (struct write_data): Delete. No longer needed. (invalidate): Don't call set_nonvarying_address_components anymore. Use true_dependence to decide if an entry should be removed from the hash table. (invalidate_memory): Remove WRITES argument, simplify appropriately. Fix all callers. (note_mem_written): Similarly for WRITE_PTR argument. (invalidate_from_clobbers): Similarly for W argument. (invalidate_for_call): Remove memory elements from the hash table. (refers_to_mem_p, cse_rtx_addr_varies_p): Deleted. (cse_rtx_varies_p): New function. Derived from old cse_rtx_addr_varies_p. (cse_insn): Remove WRITES_MEMORY and INIT variables and all references. Don't call note_mem_written anymore. Stack pushes invalidate the stack pointer if PUSH_ROUNDING is defined. No longer need to call cse_rtx_addr_varies_p to decide if a MEM should be invalidated. (skipped_writes_memory): Remove variable. (invalidate_skipped_set): Simplify and wewrite to use invalidate_memory. (invalidate_skipped_block): Simplify for new alias analysis code. (cse_set_around_loop): Likewise. (cse_main): Call init_alias_analysis. * flags.h (flag_alias_check, flag_argument_noalias): Declare. * toplev.c (flag_alias_check, flag_argument_noalias): Define. (f_options): Add new alias checking arguments. (main): Set flag_alias_check when optimizing. * local_alloc (validate_equiv_mem_from_store): Add new arguments to true_dependence. (memref_referenced_p): Likewise. * loop.c (NUM_STORES): Increase to 30. (prescan_loop): Only non-constant calls set unknown_address_altered. (invariant_p): Add new arguments to true_dependence. (record_giv): Initialize unrolled and shared fields. (emit_iv_add_mult): Call record_base_value as needed. * loop.h (struct induction): Add unrolled and shared fields. * unroll.c (unroll_loop): Call record_base_value as needed. (copy_loop_body): Likewise. (final_biv_value): Likewise. (final_giv_value): Likewise. (find_splittable_regs): Likewise. Only create one new pseudo if we have multiple address GIVs that were combined with the same dst_reg GIV. Note when a new register is created due to unrolling. * rtl.c (reg_note_name): Add REG_NOALIAS. * rtl.h (enum reg_note): Similarly. (rtx_varies_p, may_trap_p, side_effects_p): Declare. (volatile_refs_p, volatile_insn_p, remove_note): Likewise. (note_stores, refers_to_regno_p, reg_overlap_mentioned_p): Likewise. (true_dependence, read_dependence, anti_dependence): Likewise. (output_dependence, init_alias_analysis, end_alias_analysis): Likewise. (mark_user_reg, mark_reg_pointer): Likewise. jfc's alias analysis code. From-SVN: r14768
1997-07-14(schedule_block): Free space associated with reg_pending_sets and old_live_regs.Richard Kenner1-8/+20
(schedule_block): Free space associated with reg_pending_sets and old_live_regs. (schedule_insns): Free bb_{dead,live}_regs on first pass. (sched_analyze_insn): Use EXECUTE_IF_SET_IN_REG_SET and then clear. From-SVN: r14426
1997-06-16Use REG_SET macrosMichael Meissner1-3/+2
From-SVN: r14250
1997-06-09(attach_deaths): Fix typo in Jun 4 change.Jim Wilson1-1/+1
From-SVN: r14187
1997-06-06(update_flow_info): When add extra REG_DEAD note for original dest...Jim Wilson1-9/+25
(update_flow_info): When add extra REG_DEAD note for original dest, handle case where last insn both uses and sets dest. From-SVN: r14163
1997-06-05Fix urgent bugMichael Meissner1-7/+8
From-SVN: r14150
1997-06-05abstract regset stuff into macrosMichael Meissner1-153/+72
From-SVN: r14147
1997-06-02Widen some short fields to int; Use allocate_reg_info to allocate the ↵Michael Meissner1-7/+4
reg_renumber array From-SVN: r14142
1997-05-30Use accessor macros to access arrays based on regno; move many of the arrays ↵Michael Meissner1-20/+21
into a single structure. From-SVN: r14140
1997-05-06reformat a little to match GNU coding standards.Mike Stump1-2/+2
From-SVN: r14024
1997-03-28sched.c (update_flow_info): Handle REG_EXEC_COUNT and REG_BR_PROB notes.Doug Evans1-1/+8
* sched.c (update_flow_info): Handle REG_EXEC_COUNT and REG_BR_PROB notes. From-SVN: r13822
1997-02-19(schedule_insns): If there was no first scheduling pass,Jim Wilson1-2/+41
split instructions after reload. (update_flow_info): Tolerate some idiosyncrasies after reload. From-SVN: r13666
1996-12-17(update_flow_info): When add REG_DEAD notes for dest ofJim Wilson1-0/+4
last insn, add check for global_regs. From-SVN: r13318
1996-10-07(schedule_block): Before scheduling...Jim Wilson1-5/+45
(schedule_block): Before scheduling, add code to make all call used regs that are not fixed or global live when we see a CALL_INSN. During scheduling, change existing code to use same test. From-SVN: r12913
1996-07-23install EH codeMike Stump1-17/+43
From-SVN: r12549
1996-07-08(true_dependence, anti_dependence, output_dependence):Jim Wilson1-2/+11
Likewise. From-SVN: r12416
1996-07-03formatting tweaksMike Stump1-2/+2
From-SVN: r12390
1996-03-31(schedule_block): CALL_INSNs don't affect fixed regs.Richard Kenner1-1/+2
From-SVN: r11648
1996-02-23(sched_analyze): Record NOTE_INSN_SETJMP if no CALL_INSN as prev;Richard Kenner1-4/+10
preserve CONST_CALL_P bit. (reemit_notes): Restore CONST_CALL_P. From-SVN: r11342
1996-02-10(flush_pending_lists): Add new arg, ONLY_WRITE.Richard Kenner1-16/+14
(sched_analyze_{1,2,insn}): Add new arg to flush_pending_lists. (sched_analyze): Always flush pending write list for call, even const. From-SVN: r11200
1996-02-10(add_dependence): Add test for next != CODE_LABEL.Doug Evans1-1/+2
From-SVN: r11192
1996-01-15sched.c (reemit_notes): Add prototype.Doug Evans1-40/+40
* sched.c (reemit_notes): Add prototype. (sched_analyze_2): Reorganize comments. Call prev_nonnote_insn. (sched_analyze): Add abort call. (schedule_block): Undo last patch. Call prev_nonnote_insn. Move call of reemit_notes to after SCHED_GROUP_P scheduling. Set `head' to `last'. From-SVN: r10998
1996-01-14(schedule_block): Copy RTX_INTEGRATE_P bit when create a new note.Jim Wilson1-0/+1
From-SVN: r10975
1996-01-12sched.c (schedule_block): Maintain a valid chain so emit_note_before works.Doug Evans1-1/+17
* sched.c (schedule_block): Maintain a valid chain so emit_note_before works. From-SVN: r10970