aboutsummaryrefslogtreecommitdiff
path: root/gcc/regmove.c
AgeCommit message (Collapse)AuthorFilesLines
2000-08-18regmove.c (perhaps_ends_bb_p): New function.Richard Kenner1-115/+69
* regmove.c (perhaps_ends_bb_p): New function. (optimize_reg_copy_1, optimize_reg_copy_2): Call it. (optimize_reg_copy_3, fixup_match_2, regmove_optimize): Likewise. (fixup_match_1): Likewise. (fixup_match_1, combine_stack_adjustments_for_block): Add casts to avoid signed/unsigned warnings. From-SVN: r35791
2000-08-04alias.c (mark_constant_function): Use INSN_P.Rodney Brown1-18/+17
* alias.c (mark_constant_function): Use INSN_P. (init_alias_analysis): Likewise. * combine.c (combine_instructions): Use INSN_P. (can_combine_p): Likewise. (try_combine): Likewise. (distribute_notes): Likewise. (distribute_links): Likewise. * cse.c (cse_around_loop): Use INSN_P. (invalidate_skipped_block): Likewise. (cse_set_around_loop): Likewise. (cse_end_of_basic_block): Likewise. (delete_trivially_dead_insns): Likewise. * emit-rtl.c (unshare_all_rtl_again): Use INSN_P. (unshare_all_rtl_1): Likewise. (next_cc0_user): Likewise. (try_split make_insn_raw): Likewise. (remove_unnecessary_notes): Likewise. * final.c (shorten_branches): Use INSN_P. (leaf_renumber_regs): Likewise. (leaf_renumber_regs_insn): Likewise. * flow.c (find_label_refs): Use INSN_P. (verify_wide_reg): Likewise. (notice_stack_pointer_modification): Likewise. (count_or_remove_death_notes): Likewise. (verify_flow_info): Likewise. (clear_log_links): Likewise. * function.c (fixup_var_refs_insns): Use INSN_P. (compute_insns_for_mem): Likewise. * gcse.c (alloc_gcse_mem): Use INSN_P. (compute_sets): Likewise. (compute_hash_table): Likewise. (classic_gcse): Likewise. (cprop): Likewise. (insert_insn_end_bb): Likewise. (delete_null_pointer_checks_1): Likewise. * global.c (expand_preferences): Use INSN_P. (build_insn_chain): Likewise. * graph.c (node_data): Use INSN_P. * haifa-sched.c (priority): Use INSN_P. (rm_line_notes): Likewise. (rm_other_notes): Likewise. (find_insn_reg_weight): Likewise. (init_target_units): Likewise. (schedule_block): Likewise. (compute_block_forward_dependences): Likewise. (debug_dependencies): Likewise. (set_priorities): Likewise. * integrate.c (function_cannot_inline_p): Use INSN_P. (save_parm_insns): Likewise. (copy_insn_list): Likewise. * jump.c (mark_all_labels): Use INSN_P. (never_reached_warning): Likewise. * lcm.c (optimize_mode_switching): Use INSN_P. * local-alloc.c (validate_equiv_mem): Use INSN_P. (memref_used_between_p): Likewise. (update_equiv_regs): Likewise. (block_alloc): Likewise. (no_conflict_p): Likewise. * loop.c (scan_loop): Use INSN_P. (find_and_verify_loops): Likewise. (count_loop_regs_set): Likewise. (loop_reg_used_before_p): Likewise. (strength_reduce): Likewise. (recombine_givs): Likewise. (check_dbra_loop): Likewise. (load_mems): Likewise. (try_copy_prop): Likewise. * print-rtl.c (print_rtx): Use INSN_P. * recog.c (find_single_use): Use INSN_P. * reg-stack.c (stack_regs_mentioned): Use INSN_P. (next_flags_user): Likewise. (swap_rtx_condition): Likewise. * regmove.c (mark_flags_life_zones): Use INSN_P. (optimize_reg_copy_1): Likewise. (optimize_reg_copy_2): Likewise. (optimize_reg_copy_3): Likewise. (reg_is_remote_constant_p): Likewise. (fixup_match_2): Likewise. (regmove_optimize): Likewise. (fixup_match_1): Likewise. * regrename.c (build_def_use): Use INSN_P. (replace_reg_in_block): Likewise. (consider_use): Likewise. * reload.c (find_equiv_reg): Use INSN_P. * reload1.c (reload): Use INSN_P. (maybe_fix_stack_asms): Likewise. (calculate_needs_all_insns): Likewise. (reload_as_needed): Likewise. (emit_output_reload_insns): Likewise. (delete_address_reloads_1): Likewise. (reload_cse_regs_1): Likewise. (reload_combine): Likewise. (reload_cse_move2add): Likewise. * reorg.c (redundant_insn): Use INSN_P. (dbr_schedule): Likewise. * resource.c (find_dead_or_set_registers): Use INSN_P. (mark_target_live_regs): Likewise. * rtlanal.c (reg_used_between_p): Use INSN_P. (reg_referenced_between_p): Likewise. (reg_set_between_p): Likewise. (reg_set_p): Likewise. (single_set): Likewise. (multiple_sets): Likewise. (find_last_value): Likewise. (reg_set_last): Likewise. (find_reg_note): Likewise. (find_regno_note): Likewise. * sibcall.c (sequence_uses_addressof): Use INSN_P. * simplify-rtx.c (cselib_process_insn): Use INSN_P. * ssa.c (find_evaluations): Use INSN_P. (rename_block): Likewise. (rename_equivalent_regs): Likewise. * unroll.c (loop_find_equiv_value): Use INSN_P. (set_dominates_use): Likewise. * varasm.c (mark_constant_pool): Use INSN_P. (mark_constants): Likewise. * config/alpha/alpha.c (alpha_does_function_need_gp): Use INSN_P. (alphaev4_next_group): Likewise. (alphaev5_next_group): Likewise. * config/c4x/c4x.c (c4x_process_after_reload): Use INSN_P. (c4x_rptb_rpts_p): Likewise. * config/mips/mips.c (mips16_optimize_gp): Use INSN_P. * config/rs6000/rs6000.c (uses_TOC): Use INSN_P. (rs6000_adjust_priority): Likewise. * config/sh/sh.c (sh_loop_align): Use INSN_P. (machine_dependent_reorg): Likewise. (split_branches): Likewise. * config/tahoe/tahoe.c (tahoe_cmp_check): Use INSN_P. From-SVN: r35494
2000-07-28cse.c (canon_hash): Handle PRE_MODIFY/POST_MODIFY.Richard Henderson1-3/+2
* cse.c (canon_hash): Handle PRE_MODIFY/POST_MODIFY. (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. From-SVN: r35321
2000-05-31Makefile.in (c-decl.o): Depend on rtl.h and expr.h.Richard Kenner1-3/+4
* Makefile.in (c-decl.o): Depend on rtl.h and expr.h. * alias.c (struct alias_entry): alias_set is HOST_WIDE_INT. (REG_BASE_VALUE): Remove unneeded cast to unsigned. (get_alias_set_entry): ALIAS_SET arg is HOST_WIDE_INT. (find_base_decl): New function, from c_find_base_decl in c-common.c. (new_alias_set): Moved from tree.c; return is HOST_WIDE_INT. (get_alias_set): Likewise. Major rework to do more things and allow language-specific code to just handle special-cases. (record_alias_subset): Args are HOST_WIDE_INT. (record_component_alias): Local vars are HOST_WIDE_INT. Don't handle COMPLEX_EXPR. (get_varargs_alias_set): Moved from builtins.c. (get_frame_alias_set): New function. * builtins.c (expand_builtin_return_address): Use frame alias set. (expand_builtin_setjmp, expand_builtin_longjmp): Use alias set for setjmp buffer. (get_memory_rtx): Rework to use set_mem_attributes. (get_varargs_alias_set): Deleted from here. * c-common.c (c_apply_type_quals_to_decl): Alias sets now HOST_WIDE_INT. (c_find_base_decl): Deleted from here. (c_get_alias_set): Remove many cases and rework to just handle C-specific cases. * c-common.h (c_get_alias_set): Returns HOST_WIDE_INT. * c-decl.c (rtl.h, expr.h): Now included. (init_decl_processing): Call record_component_aliases on array types. (grokdeclarator): Likewise. Set TREE_ADDRESSABLE for all fields that are not bitfields. * c-typeck.c (common_type): Call record_component_aliases for array. * caller-save.c (setup_save_areas): Rework register loop for unsigned. Set all save areas to the frame alias set. * calls.c (initialie_argument_information): Call set_mem_attributes. (compute_argument_addresses, expand_call): Likewise. * explow.c (set_mem_attributes): New function. (stabilize): Use MEM_COPY_ATTRIBUTES and force_reg. * expr.c (struct move_by_pieces): Remove {to,from}_{struct,readonly}. LEN and OFFSET now HOST_WIDE_INT. (clear_by_pieces): Similar changes. (move_by_pieces): LEN now HOST_WIDE_INT; don't set deleted fields. (move_by_pieces_ninsns): Now returns unsigned HOST_WIDE_INT. (move_by_pieces_1): Don't use deleted fields, use MEM_COPY_ATTRIBUTES. (clear_by_pieces_1): Likewise. (emit_push_insn): Call set_mem_attributes. (expand_expr, case INDIRECT_REF): Likewise. (expand_expr, case VAR_DECL): Call change_address. * expr.h (ADD_PARM_SIZE, SUB_PARM_SIZE): Use host_integerp and tree_low_cst. (get_varargs_alias_set, get_frame_alias_set): New decls. (record_base_value, record_alias_subset, lang_get_alias_set): Likewise. (new_alias_set, set_mem_attributes): Likewse. * function.c (struct temp_slot): ALIAS_SET is HOST_WIDE_INT. (assign_stack_temp_for_type): Likewise. Can split slot even if alias set since can copy. Set MEM_ALIAS_SET and MEM_SET_IN_STRUCT_P. (assign_temp): Use host_integerp and tree_low_cst. (put_var_into_stack): Properly handle SAVE_EXPR. (put_addressof_into_stack): Likewise. (assign_parms): Call set_mem_attributes. Delete #if 0 code. (fix_lexical_address): Put reference to chain into frame alias set. (expand_function_start): Call set_mem_attributes. * integrate.c (expand_inline_function): Likewise. * recog.c (adj_offsettable_operand): Use MEM_COPY_ATTRIBUTES. * regmove.c (try_apply_stack_adjustment): Likewise. * reload.c (push_reload, make_memloc): Likewise. * reload1.c (alter_reg): Make alias sets for spilled pseudos. * rtl.def (MEM): Update comment. * rtl.h (MEM_ALIAS_SET): Now uses XCWINT. (move_by_pieces): Change length to HOST_WIDE_INT. (record_base_value, record_alias_subset): Delete from here. * stmt.c (expand_decl): Call set_mem_attributes. * stor-layout.c (finish_record_layout): Call record_component_aliases.i * toplev.c (compile_file): Call init_alias_once earlier. * tree.c (lang_get_alias_set, get_alias_set, new_alias_set): Deleted from here: now in alias.c. * tree.h (struct tree_type): alias_set is HOST_WIDE_INT. (struct tree_decl): Likewise. (get_alias_set, new_alias_set, lang_get_alias_set): Deleted from here. * varasm.c (make_function_rtl, make_decl_rtl): Call set_mem_attributes. (output_constant_def, force_const_mem): Likewise. * cp/Makefile.in (decl.o): Include ../expr.h. * cp/decl.c (expr.h): Include. (init_decl_processing): Call record_component_aliases for arrays. (grokdeclarator): Likewise. Set TREE_ADDRESSABLE for fields that aren't bitfields. * cp/tree.c (build_cplus_array_type_1): Call record_component_aliases. From-SVN: r34305
2000-04-28regmove.c (struct record_stack_memrefs_data): New.Jan Hubicka1-18/+58
* regmove.c (struct record_stack_memrefs_data): New. (record_stack_memrefs): New function. (combine_stack_adjustments_for_block): Use it. From-SVN: r33529
2000-03-28regmove.c (struct csa_memlist): Make mem field rtx *.Jan Hubicka1-9/+11
* regmove.c (struct csa_memlist): Make mem field rtx *. (record_one_stack_ref): Accept rtx * instead of rtx as parameter. (try_apply_stack_adjustment): Replace whole MEM rtx. (combine_stack_adjustments_for_block): Update calls to record_one_stack_ref. From-SVN: r32782
2000-03-22regmove.c (combine_stack_adjustments_for_block): Check that the stack ↵Stephane Carrez1-0/+1
pointer is a valid memory address. * regmove.c (combine_stack_adjustments_for_block): Check that the stack pointer is a valid memory address. From-SVN: r32691
2000-03-20regmove.c (stack_memref_p): Fix typo, reorg for readability.Richard Henderson1-9/+19
* regmove.c (stack_memref_p): Fix typo, reorg for readability. (combine_stack_adjustments_for_block): Don't allow sp references in the side of a set we're not fixing up. * toplev.c (rest_of_compilation): Run combine_stack_adjustments after life_analysis. From-SVN: r32654
2000-03-14regmove.c (combine_stack_adjustments): New.Richard Henderson1-0/+333
* regmove.c (combine_stack_adjustments): New. (stack_memref_p, single_set_for_csa): New. (free_csa_memlist, record_one_stack_memref): New. (try_apply_stack_adjustment): New. (combine_stack_adjustments_for_block): New. * rtl.h (combine_stack_adjustments): Declare. * toplev.c (rest_of_compilation): Call it. * i386.md: Revert 2000-01-16 change. From-SVN: r32526
2000-03-05* regmove.c (copy_src_to_dest) Do not create src->dest moveThomas Schuster1-0/+1
for unchanging destination. From-SVN: r32334
2000-02-26Fix copyrights.Jeff Law1-1/+2
From-SVN: r32179
2000-01-17machmode.h: PROTO -> PARAMS.Kaveh R. Ghazi1-16/+16
* machmode.h: PROTO -> PARAMS. * mbchar.h: Likewise. * mips-tdump.c: Likewise. * mips-tfile.c: Likewise. * optabs.c: Likewise. * output.h: Likewise. * prefix.c: Likewise. * profile.c: Likewise. * protoize.c: Likewise. * real.h: Likewise. * recog.c: Likewise. * recog.h: Likewise. * regclass.c: Likewise. * regmove.c: Likewise. * regs.h: Likewise. From-SVN: r31459
2000-01-04builtins.c (expand_builtin_strlen): Initialize variable `icode'.Kaveh R. Ghazi1-5/+5
* builtins.c (expand_builtin_strlen): Initialize variable `icode'. * calls.c (expand_call): Likewise for `old_stack_arg_under_construction'. * cpphash.c (macroexpand): Likewise for `args' and `rest_zero'. * function.c (pad_to_arg_alignment): Likewise for `save_var' and `save_constant'. * gcc.c (execute): Likewise for `ut' and `st'. * genattrtab.c (attr_rtx): Likewise for `rt_val'. * genopinit.c (gen_insn): Likewise for `m1', `m2' and `op'. * jump.c (jump_optimize_1): Likewise for `temp2'. * local-alloc.c (block_alloc): Likewise for `r1'. * loop.c (recombine_givs): Likewise for `life_start' and `life_end'. * reg-stack.c (check_asm_stack_operands): Likewise for `clobber_reg'. (subst_asm_stack_regs): Likewise for `clobber_reg' and `clobber_loc'. * regmove.c (fixup_match_1): Likewise for `insn_const', `dst_node' and `set2'. * reload.c (find_reloads): Likewise for `goal_alternative_number' and `goal_earlyclobber'. * scan-decls.c (scan_decls): Likewise for `prev_id_end'. * sdbout.c (sdbout_one_type): Likewise for `member_scl'. * stupid.c (stupid_life_analysis): Likewise for `chain'. * unroll.c (copy_loop_body): Likewise for `copy'. * varasm.c (output_constructor): Likewise for `byte'. ch: * actions.c (update_else_range_for_int_const): Initialize variables `lowval' and `highval'. (update_else_range_for_range): Likewise for `low_range_val' and `high_range_val'. cp: * class.c (warn_hidden): Initialize variable `fndecl'. From-SVN: r31207
1999-12-17regmove.c (copy_src_to_dest): Remove loop_depth parameter.Jan Hubicka1-44/+11
* regmove.c (copy_src_to_dest): Remove loop_depth parameter. (optimize_reg_copy_1): Remove REG_N_REFS updating code. (optimize_reg_copy_2, copy_src_to_dest, fixup_match_2): Likewise. (regmove_optimize, fixup_match_1): Likewise. From-SVN: r30986
1999-12-06Fix ia64 abort while compiling gcc.c-torture/unsorted/logic.c.Jim Wilson1-0/+8
* regmove.c (optimize_reg_copy_1): If no REG_DEAD note, check for and handle REG_UNUSED note on insn. From-SVN: r30813
1999-12-04regmove.c (copy_src_to_dest): Remove loop_depth parameter.Jan Hubicka1-91/+7
* regmove.c (copy_src_to_dest): Remove loop_depth parameter. (optimize_reg_copy_1): Remove REG_N_REFS updating code. (optimize_reg_copy_2, copy_src_to_dest, fixup_match_2): Likewise. (regmove_optimize, fixup_match_1): Likewise. From-SVN: r30774
1999-11-08cse.c (delete_trivially_dead_insns): Replace alloca with xmalloc/xcalloc.Mark Mitchell1-3/+8
* cse.c (delete_trivially_dead_insns): Replace alloca with xmalloc/xcalloc. * except.c (update_rethrow_references): Likewise. (init_eh_nesting_info): Likewise. * function.c (identify_blocks): Likewise. * gcse.c (dump_hash_table): Likewise. * graph.c (print_rtl_graph_with_bb): Likewise. * loop.c (combine_movables): Likewise. (move_movables): Likewise. (count_loop_regs_set): Likewise. (strength_reduce): Likewise. * profile.c (compute_branch_probabilities): New function, split out from ... (branch_prob): Here. Replace alloca with xmalloc/xcalloc. * regclass.c (regclass): Likewise. * regmove.c (regmove_optimize): Likewise. * toplev.c (compile_file): Likewise. (main): Don't mess with the stack rlimit. From-SVN: r30445
1999-10-27rtl.h (note_stores): Add additional paramter.Mark Mitchell1-3/+4
* rtl.h (note_stores): Add additional paramter. * rtlanal.c (reg_set_p_1): Take additional paramter. (reg_set_last_1): Likewise. (reg_set_p): Adjust call to note_stores. (reg_set_last): Likewise. (note_stores): Pass data parameter to worker function. * alias.c (record_set): Take additional parameter. (init_alias_analysis): Pass it. * caller-save.c (mark_set_regs): Take additional parameter. (save_call_clobbered_regs): Pass NULL to note_stores. * combine.c (set_nonzero_bits_and_sign_copies): Take additional parameter. (record_dead_and_set_regs_1): Likewise. (reg_dead_at_p_1): Likewise. (combine_instructions): Adjust calls to note_stores. (try_combine): Likewise. (record_dead_insn): Remove. (record_dead_and_set_regs): Adjust calls to note_stores. (reg_dead_at_p): Likewise. * cse.c (invalidate_skipped_set): Take additional parameter. (cse_check_loop_start): Likewise. (cse_check_loop_start_value): Remove. (cse_set_around_loop): Adjust calls to note_stores. * flow.c (notice_stack_pointer_modification): Take additional parameter. Remove duplicate declaration. (record_volatile_insns): Adjust calls to note_stores. * gcse.c (record_set_info): Take additional parameter. (record_last_set_info): Likewise. (invalidate_nonnull_info): Likewise. (record_set_insn): Remove. (compute_sets): Adjust calls to note_stores. (last_set_insn): Remove. (compute_hash_table): Adjust calls to note_stores. (insert_insn_end_bb): Likewise. (delete_null_pointer_checks): Likewise. * global.c (mark_reg_store): Take additional parameter. (mark_reg_clobber): Likewise. (reg_becomes_live): Likewise. (global_conflicts): Adjust calls to note_stores. (build_insn_chain): Likewise. * integrate.c (note_modified_parmregs): Take additional parameter. (mark_stores): Likewise. Make it static. (save_for_inline_nocopy): Adjust calls to note_stores. (try_constants): Likewise. * integrate.h (mark_stores): Remove declaration. * jump.c (mark_modified_reg): Take additional parameter. (thread_jumps): Adjust calls to note_stores. * local-alloc.c (validate_equiv_mem_from_store): Take additional parameter. (no_equiv): Likewise. (reg_is_set): Likewise. (validate_equiv_mem): Adjust calls to note_stores. (update_equiv_regs): Likewise. (block_alloc): Likewise. * loop.c (note_set_pseudo_multiple_uses_retval): Remove. (note_addr_stored): Take additional parameter. (note_set_pseudo_multiple_uses): Likewise. (record_initial): Likewise. (prescan_loop): Adjust calls to note_stores. (strength_reduce): Likewise. (check_dbra_loop): Likewise. * regmove.c (flags_set_1): Take additional paramter. (mark_flags_life_zones): Adjust calls to note_stores. * reload1.c (mark_not_eliminable): Take additional parameter. (forget_old_reloads_1): Likewise. (reload_cse_invalidate_rtx): Likewise. (reload_cse_check_clobber): Likewise. (reload_combine_note_store): Likewise. (move2add_note_store): Likewise. (reload): Adjust calls to note_stores. (reload_as_needed): Likewise. (emit_reload_insns): Likewise. (reload_cse_regs_1): Likewise. (reload_cse_record_set): Adjust calls to reload_cse_invalidate_rtx. (reload_combine): Adjust calls to note_stores. * resource.c (update_live_status): Take additional paramter. (mark_target_live_regs): Adjust calls to note_stores. * stupid.c (find_clobbered_regs): Take additional parameter. (stupid_life_analysis): Adjust calls to note_stores. From-SVN: r30221
1999-10-13regmove.c (optimize_reg_copy_3): Make sure P is non-nil as we climb up the ↵Brendan Kehoe1-1/+4
chain of insns. * regmove.c (optimize_reg_copy_3): Make sure P is non-nil as we climb up the chain of insns. From-SVN: r29949
1999-10-03print-tree.c (print_node, indent_to): Remove redundant prototypes.Kaveh R. Ghazi1-2/+4
* print-tree.c (print_node, indent_to): Remove redundant prototypes. * profile.c (instrument_arcs, output_gcov_string, tablejump_entry_p): Add static prototypes. (output_gcov_string): Constify a char*. * regmove.c (replacement_quality, fixup_match_2): Add static prototypes. * resource.h (reg_dead_p): Add extern prototype. * rtl.c (trim_filename): Add static prototype. * scan-decls.c (skip_to_closing_brace): Likewise. * stmt.c (expand_decl_cleanup_no_eh): Hide definition. (expand_end_case): Initialize variable `range'. (emit_case_nodes): Remove unused prototype `rtx_fn'. * varasm.c (asm_emit_uninitialised): Add static prototype. (asm_emit_uninitialised, assemble_variable): Mark parameter with ATTRIBUTE_UNUSED. From-SVN: r29784
1999-10-01Delete !REGISTER_CONSTRAINTS codeBernd Schmidt1-2/+0
From-SVN: r29753
1999-09-20Make it possible to prototype port-specific functions (and convert i386 to ↵Bernd Schmidt1-0/+1
use this) From-SVN: r29514
1999-09-14regmove.c (fixup_match_1): Don't change an unchanging register.J"orn Rennecke1-8/+26
* regmove.c (fixup_match_1): Don't change an unchanging register. (stable_but_for_p): Renamed to: (stable_and_no_regs_but_for_p). Reject unchanging registers too. Changed all callers. From-SVN: r29394
1999-09-12Replace insn_foo with insn_data.foo.Richard Henderson1-3/+6
From-SVN: r29358
1999-09-11Replace recog_foo with recog_data.foo.Richard Henderson1-26/+34
From-SVN: r29349
1999-09-06Merge in gcc2-ss-010999Jeff Law1-55/+0
From-SVN: r29150
1999-09-01regmove.c (fixup_match_1): Don't move INSN in front of P if it would end up ↵J"orn Rennecke1-2/+12
in the shadow of a live flags... * regmove.c (fixup_match_1): Don't move INSN in front of P if it would end up in the shadow of a live flags regsiter. From-SVN: r29034
1999-08-31Fix typo in comment.Jeff Law1-1/+1
From-SVN: r29019
1999-08-31rtl.h (RTL_CHECK1, RTL_CHECK2): New macros which type- and bounds- check RTL ↵Zack Weinberg1-1/+3
accesses if --enable-checking. 1999-08-31 12:20 -0700 Zack Weinberg <zack@bitmover.com> * rtl.h (RTL_CHECK1, RTL_CHECK2): New macros which type- and bounds- check RTL accesses if --enable-checking. (RTVEC_ELT): Bounds check if --enable-checking. (XWINT, XINT, XSTR, XEXP, XVEC, XMODE, XBITMAP, XTREE, XBBDEF): Use RTL_CHECK1/RTL_CHECK2 as appropriate. (XVECEXP, XVECLEN): Define in terms of XVEC, RTVEC_ELT, and GET_NUM_ELEM. (X0WINT, X0INT, X0STR, X0EXP, X0VEC, X0MODE, X0BITMAP, X0TREE, X0BBDEF, X0ADVFLAGS): New macros for accessing '0' slots of RTXes. (ADDR_DIFF_VEC_FLAGS): Use X0ADVFLAGS. (NOTE_SOURCE_FILE): Use X0STR. (NOTE_BLOCK_NUMBER, NOTE_EH_HANDLER, LABEL_NUSES, MEM_ALIAS_SET): Use X0INT. (NOTE_RANGE_INFO, NOTE_LIVE_INFO, NOTE_BASIC_BLOCK, JUMP_LABEL, LABEL_REFS, LABEL_NEXTREF, CONTAINING_INSN): Use X0EXP. * real.h (CONST_DOUBLE_CHAIN): Use X0EXP. * rtl.c (copy_rtx, copy_most_rtx): Copy '0' slots with X0WINT. (rtl_check_failed_bounds, rtl_check_failed_type1, rtl_check_failed_type2, rtvec_check_failed_bounds): New functions. (fancy_abort): Fix comment. * cse.c (canon_hash): Read CONST_DOUBLE data slots with XWINT. (cse_insn): Decrement LABEL_NUSES for jump target before deleting jump insn. * emit-rtl.c (gen_rtx_CONST_DOUBLE): Use X0EXP for slot 1. * final.c (alter_subreg): Compute regno before changing x to REG; set REGNO(x) after changing it. * flow.c (count_basic_blocks): Use XWINT to inspect EH_REGION notes containing CONST_INTs. (delete_eh_regions): Use NOTE_EH_HANDLER. * function.c (put_reg_into_stack): Make reg a MEM before initializing it. (fixup_var_refs_insns): Save REG_NOTES (insn) in case we delete insn. (gen_mem_addressof): Make reg a MEM before initializing it. * integrate.c (copy_rtx_and_substitute): Copy '0' slots with X0WINT. * local-alloc.c (update_equiv_regs): Zap REG_NOTES before deleting an insn, not after. (block_alloc): Only look at PATTERN(insn) if we have to, and only if it's format class 'i'. * loop.c (check_dbra_loop): Check bl->biv->add_val is a CONST_INT before using its INTVAL. * print-rtl.c (print_rtx): Use X0STR. * regmove.c (fixup_match_1): Don't look at PATTERN of non-class-'i' insn chain elements. * reload.c (loc_mentioned_in_p): Take address of in->fld[1].rtx directly. * reload1.c (reload): Change reg to a MEM before initializing it. * varasm.c (mark_constant_pool): Skip CONST_DOUBLES, which have no names. * config/i386/i386.md (decrement_and_branch_if_zero): Fix typo. From-SVN: r29008
1999-08-20rtl.h (rtx_format): Constify a char*.Kaveh R. Ghazi1-1/+1
* rtl.h (rtx_format): Constify a char*. * rtl.c (rtx_format): Likewise. (copy_rtx, copy_most_rtx, read_rtx): Likewise. (init_rtl): Use accessor macro, not `rtx_format'. * alias.c (rtx_equal_for_memref_p, find_symbolic_term): Constify a char*. * caller-save.c (mark_referenced_regs): Likewise. * combine.c (subst, make_compound_operation, known_cond, gen_rtx_combine, update_table_tick, get_last_value_validate, use_crosses_set_p, mark_used_regs_combine, move_deaths): Likewise. * cse.c (rtx_cost, mention_regs, canon_hash, exp_equiv_p, refers_to_p, canon_reg, fold_rtx, cse_process_notes, count_reg_usage): Likewise. * emit-rtl.c (gen_rtx, copy_rtx_if_shared, reset_used_flags): Likewise. * final.c (leaf_renumber_regs_insn): Likewise. * flow.c (mark_used_regs, find_use_as_address, dump_flow_info, dump_edge_info, count_reg_references): Likewise. * function.c (fixup_var_refs_1, walk_fixup_memory_subreg, fixup_stack_1, purge_addressof_1, instantiate_virtual_regs_1): Likewise. * gcse.c (oprs_unchanged_p, hash_expr_1, expr_equiv_p, oprs_not_set_p, expr_killed_p, compute_transp, find_used_regs, add_label_notes): Likewise. * genattrtab.c (attr_rtx, attr_copy_rtx, encode_units_mask, clear_struct_flag, count_sub_rtxs, count_alternatives, compares_alternatives_p, contained_in_p, walk_attr_value, write_expr_attr_cache): Likewise. * genconfig.c (walk_insn_part): Likewise. * genemit.c (max_operand_1, gen_exp): Likewise. * genextract.c (walk_rtx): Likewise. * genflags.c (num_operands): Likewise. * genoutput.c (scan_operands): Likewise. * genpeep.c (match_rtx): Likewise. * genrecog.c (add_to_sequence): Likewise. * haifa-sched.c (may_trap_exp, sched_analyze_2, attach_deaths): Likewise. * integrate.c (save_constants, copy_for_inline, copy_rtx_and_substitute, subst_constants, restore_constants): Likewise. * jump.c (mark_jump_label, invert_exp, redirect_exp, rtx_renumbered_equal_p, rtx_equal_for_thread_p): Likewise. * local-alloc.c (contains_replace_regs, memref_referenced_p): Likewise. * loop.c (record_excess_regs, rtx_equal_for_loop_p, add_label_notes, replace_call_address, count_nonfixed_reads, invariant_p, find_single_use_in_loop, find_mem_givs, find_life_end, maybe_eliminate_biv_1, update_reg_last_use): Likewise. * print-rtl.c (reg_names, print_rtx): Likewise. * recog.c (validate_replace_rtx_1, find_single_use_1): Likewise. * reg-stack.c (stack_regs_mentioned_p, record_label_references, record_reg_life_pat, swap_rtx_condition, goto_block_pat, print_blocks): Likewise. * regclass.c (fix_register, record_address_regs, reg_scan_mark_refs): Likewise. * regmove.c (stable_but_for_p): Likewise. * reload.c (loc_mentioned_in_p, operands_match_p, find_reloads_toplevsubst_reg_equivs, find_reloads_address_1, copy_replacements, refers_to_regno_for_reload_p, refers_to_mem_for_reload_p, find_inc_amount, regno_clobbered_p, reload_when_needed_name, reg_class_names, debug_reload_to_stream): Likewise. * reload1.c (eliminate_regs, scan_paradoxical_subregs, delete_address_reloads_1, count_occurrences, reload_cse_mem_conflict_p, reload_combine_note_use, add_auto_inc_notes): Likewise. * resource.c (mark_referenced_resources, mark_set_resources): Likewise. * rtlanal.c (rtx_unstable_p, rtx_varies_p, rtx_addr_varies_p, reg_mentioned_p, regs_set_between_p, modified_between_p, modified_in_p, refers_to_regno_p, reg_overlap_mentioned_p, rtx_equal_p, volatile_insn_p, volatile_refs_p, side_effects_p, may_trap_p, inequality_comparisons_p, replace_rtx, replace_regs, jmp_uses_reg_or_mem, for_each_rtx, regno_use_in): Likewise. * sched.c (sched_analyze_2, attach_deaths): Likewise. * stupid.c (stupid_mark_refs): Likewise. * unroll.c (remap_split_bivs): Likewise. * varasm.c (mark_constants): Likewise. * a29k/a29k.c (uses_local_reg_p): Likewise. * alpha/alpha.c (summarize_insn): Likewise. * arm/arm.c (symbol_mentioned_p, label_mentioned_p, eliminate_lr2ip): Likewise. * arm/thumb.c (symbol_mentioned_p, label_mentioned_p): Likewise. * i386/i386.c (symbolic_reference_mentioned_p, copy_all_rtx, reg_mentioned_in_mem): Likewise. * ns32k/ns32k.c (global_symbolic_reference_mentioned_p, symbolic_reference_mentioned_p): Likewise. * romp/romp.c (unsigned_comparisons_p, hash_rtx): Likewise. * sh/sh.c (regs_used, mark_use): Likewise. * vax/vax.c (vax_rtx_cost): Likewise. From-SVN: r28784
1999-08-09Include function.h in most files.Bernd Schmidt1-0/+1
Include function.h in most files. Remove most of the global variables duplicated in function.h. Add accessor macros for them which access current_function. Delete INLINE_HEADER rtx and related code, replace with code using struct function to store inlining related data. From-SVN: r28626
1999-04-03regmove.c (fixup_match_1): Consistently evaluate HAVE_POST_INCREMENT and ↵Toshiyasu Morita1-3/+2
HAVE_POST_DECREMENT. * regmove.c (fixup_match_1): Consistently evaluate HAVE_POST_INCREMENT and HAVE_POST_DECREMENT. From-SVN: r26159
1999-04-02* regmove.c (fixup_match_1): Remove now useless if (0).Toshiyasu Morita1-5/+1
From-SVN: r26139
1999-03-08* regmove.c (copy_src_to_dest): New argument max_old_uid.J"orn Rennecke1-7/+12
From-SVN: r25639
1999-02-25Flow rewrite to use basic block structures and edge lists.Richard Henderson1-1/+1
From-SVN: r25450
1999-02-21Michael Hayes <m.hayes@elec.canterbury.ac.nz>Michael Hayes1-1/+1
Michael Hayes <m.hayes@elec.canterbury.ac.nz> * regmove.c (discover_flags_reg): Use word_mode instead of SImode. From-SVN: r25342
1999-02-21regmove.c (discover_flags_reg): Remove cc0 code.Richard Henderson1-5/+8
* regmove.c (discover_flags_reg): Remove cc0 code. (mark_flags_life_zones) [HAVE_cc0]: Force use of cc0; bail if a potential flags register was identified. From-SVN: r25341
1999-02-19regmove.c (discover_flags_reg): New function.Richard Henderson1-7/+176
* regmove.c (discover_flags_reg): New function. (flags_set_1, mark_flags_life_zones): New functions. (regmove_optimize): Call them. (fixup_match_1): Use insn modes rather than sets_cc0_p. From-SVN: r25332
1999-01-23final.c (bb_str): Qualify a char* with the keyword `const'.Kaveh R. Ghazi1-1/+2
* final.c (bb_str): Qualify a char* with the keyword `const'. (add_bb_string, final_scan_insn, output_asm_insn): Likewise. * fix-header.c (read_scan_file): Likewise. * genoutput.c (output_epilogue, process_template): Likewise. * local-alloc.c (requires_inout, block_alloc): Likewise. * output.h (output_asm_insn, assemble_string): Likewise. * recog.c (recog_constraints, check_asm_operands, decode_asm_operands, extract_insn, preprocess_constraints, constrain_operands): Likewise. * recog.h (operand_alternative, recog_constraints, insn_template, insn_outfun, insn_operand_constraint, insn_name): Likewise. * regclass.c (record_reg_classes, scan_one_insn): Likewise. * regmove.c (find_matches): Likewise. * reload.c (alternative_allows_memconst): Likewise. * reload1.c (constraint_accepts_reg_p, reload_cse_simplify_operands): Likewise. * rtl.h (decode_asm_operands): Likewise. * scan.h (fn_decl): Likewise. * varasm.c (assemble_string): Likewise. From-SVN: r24834
1999-01-17regmove.c (optimize_reg_copy_1): Undo Aug 18 change.Jeff Law1-49/+27
* regmove.c (optimize_reg_copy_1): Undo Aug 18 change. Update REG_N_CALLS_CROSSED and REG_LIVE_LENGH if and only if we change where a register is live. From-SVN: r24718
1999-01-11Update copyrights.Richard Henderson1-1/+1
From-SVN: r24624
1999-01-11basic-block.h (basic_block_head): Rename to x_basic_block_head.Richard Henderson1-5/+5
* basic-block.h (basic_block_head): Rename to x_basic_block_head. (basic_block_end): Rename to x_basic_block_end. (BLOCK_HEAD, BLOCK_END): Update. * caller-save.c: Change basic_block_head/end references to BLOCK_HEAD/END. * combine.c, flow.c, function.c, gcse.c, global.c: Likewise. * graph.c, haifa-sched.c, local-alloc.c, regclass.c: Likewise. * regmove.c, reload1.c, reorg.c, sched.c: Likewise. From-SVN: r24622
1999-01-11Update FSF address in copyright header.Jeff Law1-1/+2
From-SVN: r24614
1998-12-23Warning fixes:Kaveh R. Ghazi1-1/+1
* alias.c (record_alias_subset): Remove ignored `&'. (init_alias_once): Likewise. * c-lex.c (UNGETC): Cast first argument of comma expression to void. * config/mips/mips.c (mips_asm_file_end): Cast the result of fwrite to `int' when comparing against one. * config/mips/mips.h (CAN_ELIMINATE): Add parens around && within ||. (INITIAL_ELIMINATION_OFFSET): Add braces to avoid ambiguous `else'. * cse.c (rehash_using_reg): Change type of variable `i' to unsigned int. * dwarf2out.c (initial_return_save): Cast -1 to unsigned before assigning it to one. * except.c (duplicate_eh_handlers): Remove unused variable `tmp'. * final.c (final_scan_insn): Likewise for variable `i'. (output_asm_insn): Cast a char to unsigned char when used as an array index. * gcse.c (compute_pre_ppinout): Cast -1 to SBITMAP_ELT_TYPE when assigning it to one. * loop.c (strength_reduce): Remove unused variables `count' and `temp'. * recog.c (preprocess_constraints): Cast a char to unsigned char when used as an array index. * regmove.c (find_matches): Likewise. * reload1.c (calculate_needs): Add default case in switch. (eliminate_regs_in_insn): Initialize variable `offset'. (set_offsets_for_label): Change type of variable `i' to unsigned. (reload_as_needed): Wrap variable `i' in macro check on AUTO_INC_DEC || INSN_CLOBBERS_REGNO_P. * scan-decls.c (scan_decls): Mark parameters `argc' and `argv' with ATTRIBUTE_UNUSED. Cast variable `start_written' to size_t when comparing against one. * stor-layout.c (layout_decl): Cast maximum_field_alignment to unsigned when comparing against one. Likewise for GET_MODE_ALIGNMENT(). (layout_record): Cast record_align to int when comparing against a signed value. (layout_type): Cast TYPE_ALIGN() to int when comparing against a signed value. * tree.c (get_identifier): Cast variable `len' to unsigned when comparing against one. (maybe_get_identifier): Likewise From-SVN: r24403
1998-11-24cse.c (fold_rtx): Make autoincrement addressing mode tests be runtime ↵Jeffrey A Law1-35/+17
selectable. * cse.c (fold_rtx): Make autoincrement addressing mode tests be runtime selectable. * expr.c (move_by_pieces): Similarly. (move_by_pieces_1, clear_by_pieces, clear_by_pieces_1): Similarly. * flow.c (find_auto_inc): Similarly. (try_pre_increment): Similarly. * loop.c (strength_reduce): Similarly. * regclass.c (auto_inc_dec_reg_p): Similarly. * regmove.c (try_auto_increment): Similarly. (fixup_match_1): Similarly. * rtl.h (HAVE_PRE_INCREMENT): Define if not already defined. (HAVE_PRE_DECREMENT): Similarly. (HAVE_POST_INCREMENT, HAVE_POST_DECREMENT): Similarly. sponding changes to all target header files. From-SVN: r23837
1998-11-22regmove.c (regmove_profitable_p): Use return value of find_matches properly.Bernd Schmidt1-1/+1
* regmove.c (regmove_profitable_p): Use return value of find_matches properly. From-SVN: r23750
1998-11-15regmove.c (regmove_optimize): Don't do anything but optimize_reg_copy[123] ↵J"orn Rennecke1-0/+2
when flag_regmove is not set. * regmove.c (regmove_optimize): Don't do anything but optimize_reg_copy[123] when flag_regmove is not set. From-SVN: r23669
1998-11-09[multiple changes]Jeff Law1-2/+2
1998-11-09 Andreas Schwab <schwab@issan.cs.uni-dortmund.de> * dbxout.c: Check HAVE_STAB_H instead of HAVE_STABS_H. Mon Nov 9 20:15:19 1998 Bernd Schmidt <crux@pool.informatik.rwth-aachen.de> * regmove.c (regmove_optimize): Fix error in last change. From-SVN: r23587
1998-11-04recog.h (enum op_type): Define.Bernd Schmidt1-77/+63
* recog.h (enum op_type): Define. (constrain_operands): Adjust prototype. (recog_op_type): Declare new variable. * recog.c (recog_op_type): New variable. (insn_invalid_p): Allow modifying an asm statement after reload. (extract_insn): Set up recog_op_type. (constrain_operands): Lose INSN_CODE_NUM arg. All callers changed. Don't compute operand types, use recog_op_type. Use the information computed by extract_insn instead of the previous method of finding it by insn code number. * caller-save.c (init_caller_save): Use extract_insn, not insn_extract. * reorg.c (fill_slots_from_thread): Likewise. * reload1.c (reload_as_needed): Likewise. (gen_reload): Likewise. (inc_for_reload): Likewise. (reload_cse_simplify_operands): Likewise. Use the information computed by extract_insn instead of the previous method of finding it by insn code number. * genattrtab.c (write_attr_case): Generate call to extract_insn, not insn_extract. * final.c (final_scan_insn): Use extract_insn, not insn_extract. (cleanup_operand_subregs): Use extract_insn, not insn_extract. Use the information computed by extract_insn instead of the previous method of finding it by insn code number. * regmove.c (find_matches): Likewise. Change meaning of the return value to be nonzero if the optimization can be performed, zero if not. All callers changed. Shorten some variable names to fix formatting problems. (regmove_optimize): Shorten some variable names to fix formatting problems. Use the information computed by extract_insn instead of the previous method of finding it by insn code number. * regclass.c (scan_one_insn): Likewise. (record_reg_classes): Don't compute operand types, use recog_op_type. * reload.c (find_reloads): Lose CONSTRAINTS1 variable; use recog_constraints instead. From-SVN: r23529
1998-10-14combine.c (combine_instructions): When finished, call init_recog.J"orn Rennecke1-0/+5
8 * combine.c (combine_instructions): When finished, call init_recog. * regmove.c (optimize_reg_copy_3): Reject volatile MEMs. From-SVN: r23094