aboutsummaryrefslogtreecommitdiff
path: root/gcc/loop.c
AgeCommit message (Collapse)AuthorFilesLines
2001-01-12loop.h (total_biv_increment): Constify iv_class pointer.Michael Hayes1-6/+116
* loop.h (total_biv_increment): Constify iv_class pointer. (struct induction): Replace `mem_mode' with `mem' rtx. * unroll.c (total_biv_increment): Constify iv_class pointer. * loop.c (loop_giv_reduce_benefit): Derive mem mode from mem rtx. (find_mem_givs, combine_givs_p): Likewise. (debug_ivs, debug_iv_class, loop_ivs_dump, loop_iv_class_dump): New. From-SVN: r38933
2001-01-07hard-reg-set.h: Add multiple include guard.Michael Hayes1-102/+221
* hard-reg-set.h: Add multiple include guard. * basic-block.h (struct loop): Add `sink' field. * loop.h: Include sbitmap.h, hard-reg-set.h, and basic-block.h. (emit_iv_add_mult): Delete. (loop_iv_add_mult_hoist, loop_iv_add_mult_sink): Define. (loop_iv_add_mult_emit_before, loop_insn_sink): Define. (unroll_loop): Remove end_insert_before argument. * loop.c (loop_givs_rescan): Remove end_insert_before argument. (maybe_eliminate_biv_1): Likewise. (emit_iv_add_mult): Delete. (gen_add_mult, loop_regs_update): New. (loop_insn_emit_after, loop_insn_emit_before): New. (loop_insn_sink, loop_insn_sink_or_swim): New. (emit_iv_add_mult): Delete. (scan_loop): Set loop->sink. (loop_givs_reduce): Use loop_insn_sink and its ilk. (loop_givs_rescan, strength_reduce, check_dbra_loop): Likewise. (maybe_eliminate_biv_1): Likewise. (maybe_eliminate_biv_1): Add basic block argument. * unroll.c (unroll_loop): Remove end_insert_before argument. (find_splittable_regs): Likewise. (find_splittable_regs): Use loop_insn_sink and its ilk. (find_splittable_givs, final_biv_value, final_giv_value): Likewise. From-SVN: r38766
2001-01-07loop.h (loop_insn_hoist): New prototype.Michael Hayes1-22/+51
* loop.h (loop_insn_hoist): New prototype. * loop.c (loop_insn_hoist, loop_insn_emit_before): New. (move_movables, loop_givs_rescan): Use loop_insn_hoist. (check_dbra_loop, load_mems): Likewise. * unroll.c (unroll_loop, find_splittable_regs): Likewise. (find_splittable_givs): Likewise. From-SVN: r38765
2001-01-07* loop.c (emit_iv_add_mult): Use single_set to examine new insn.Michael Hayes1-3/+6
From-SVN: r38764
2001-01-07loop.c (count_loop_regs_set): Delete.Michael Hayes1-140/+101
* loop.c (count_loop_regs_set): Delete. (load_mems_and_recount_loop_regs_set): Delete. (loop_regs_scan): Merge common code from count_loop_regs_set, scan_loop, and load_mems_and_recount_loop_regs_set. (scan_loop): Call load_mems directly and loop_regs_scan again if new registers created. From-SVN: r38758
2001-01-06loop.c (scan_loop): Use xcalloc for the regs array.Richard Henderson1-9/+5
* loop.c (scan_loop): Use xcalloc for the regs array. (load_mems_and_recount_loop_regs_set): Zero the new memory received from xrealloc. From-SVN: r38752
2001-01-06loop.c (debug_biv, debug_giv): New.Michael Hayes1-95/+118
* loop.c (debug_biv, debug_giv): New. (loop_biv_dump): Break out from ... (record_biv): ... here. (loop_giv_dump): Break out from ... (record_giv): ... here. (loop_bivs_check): Use print_simple_rtl. * unroll.c (loop_iterations): Use print_simple_rtl. From-SVN: r38744
2001-01-05loop.h (struct loop_reg): New.Michael Hayes1-169/+147
* loop.h (struct loop_reg): New. (struct loop_regs): Change to use array of `struct loop_reg'. * loop.c: Replace assortment of varrays with single regs array. (count_one_set): Delete may_not_move array argument and use regs array instead. All caller's changed. (count_loop_regs_set): Delete may_not_move and single_usage arguments and use regs array instead. All caller's changed. (find_single_use_in_loop): Replace usage array argument with pointer to regs structure. All caller's changed. (loop_optimize): Delete `moved_once' array. From-SVN: r38700
2001-01-05loop.c (prescan_loop): Set loop_info->has_nonconst_call.Michael Hayes1-4/+8
* loop.c (prescan_loop): Set loop_info->has_nonconst_call. Use it instead of loop_info->has_call for scanning loop mems. (check_dbra_loop): Replace loop_info->has_call test with loop_info->has_nonconst_call. From-SVN: r38699
2001-01-01loop.c (add_label_notes): Increment the label usage count when a note is ↵John David Anglin1-3/+8
added to an insn which refers to... * loop.c (add_label_notes): Increment the label usage count when a note is added to an insn which refers to a CODE_LABEL. * gcse.c (add_label_notes): Likewise. From-SVN: r38603
2001-01-01* loop.c (scan_loop): Use xmalloc to allocate movables.Andreas Jaeger1-2/+2
From-SVN: r38598
2001-01-01loop.c (check_insn_for_bivs): Use ivs->n_regs to check array bounds.Michael Hayes1-3/+3
* loop.c (check_insn_for_bivs): Use ivs->n_regs to check array bounds. (find_mem_givs, record_biv, maybe_eliminate_biv): Likewise. (record_initial): Likewise. * unroll.c (copy_loop_body, loop_iterations): Likewise. (remap_split_bivs): Likewise. From-SVN: r38584
2001-01-01loop.c (loop_ivs_free): New function.Michael Hayes1-26/+38
* loop.c (loop_ivs_free): New function. (strength_reduce): Break out from... From-SVN: r38583
2001-01-01loop.h (struct iv): New.Michael Hayes1-35/+24
* loop.h (struct iv): New. (REG_IV_TYPE, REG_IV_CLASS, REG_INFO): Modify to use 'struct iv'. (struct loop_ivs): Replace 'reg_iv_type', 'reg_iv_info', 'reg_biv_class' fields with 'regs' and 'n_regs'. (struct ivs): Rename 'loop_iv_list' field to 'list'. * loop.c (loop_bivs_find, strength_reduce): Use ivs->regs array. * unroll.c (loop_iterations): Check array bounds with ivs->n_regs. From-SVN: r38582
2001-01-01loop.h (REG_IV_CLASS): New accessor macro.Michael Hayes1-7/+8
* loop.h (REG_IV_CLASS): New accessor macro. * loop.c (REG_IV_CLASS): Use it instead of reg_iv_class array. * unroll.c (REG_IV_CLASS): Likewise. From-SVN: r38580
2001-01-01loop.c (loop_giv_reduce_benefit): Break out from strength_reduce.Michael Hayes1-423/+448
* loop.c (loop_giv_reduce_benefit): Break out from strength_reduce. (loop_givs_dead_check, loop_givs_reduce, loop_givs_rescan): Likewise. (prescan_loop): Set pre_header_has_call in loop_info. * loop.h (struct_iv_class): Add `final_value' and `all_reduced'. (struct loop_info): Add `pre_header_has_call'. From-SVN: r38578
2001-01-01loop.c (loop_bivs_find): Break out from strength_reduce.Michael Hayes1-102/+202
* loop.c (loop_bivs_find): Break out from strength_reduce. (loop_bivs_init_find, loop_bivs_check, loop_givs_find): Likewise. (loop_givs_check, loop_biv_eliminable_p): Likewise. From-SVN: r38577
2001-01-01loop.c (LOOP_REG_LIFETIME, [...]): Define.Michael Hayes1-13/+12
* loop.c (LOOP_REG_LIFETIME, LOOP_REG_GLOBAL_P): Define. (scan_loop, record_giv): Use LOOP_REG_LIFETIME and LOOP_REG_GLOBAL_P. From-SVN: r38576
2001-01-01loop.h (REGNO_FIRST_LUID, [...]): Define.Michael Hayes1-25/+26
* loop.h (REGNO_FIRST_LUID, REGNO_LAST_LUID): Define. * loop.c (REGNO_FIRST_LUID, REGNO_LAST_LUID): Use in place of direct access to uid_luid array. * unroll.c (REGNO_FIRST_LUID, REGNO_LAST_LUID): Likewise. From-SVN: r38575
2001-01-01loop.h (struct loop_movables): New.Michael Hayes1-37/+55
* loop.h (struct loop_movables): New. (LOOP_MOVABLES): New. (struct loop_info): Add movables field. * loop.c (struct movables): Delete. Replace all uses with struct loop_movables. (the_movables): Delete. Replace all uses with movables field in loop_info. (loop_movables_add, loop_movables_free): New functions. (scan_loop): Use xmalloc instead of alloca for movables. Call loop_movables_free. From-SVN: r38573
2000-12-31* loop.c (debug_loops): New.Michael Hayes1-0/+10
From-SVN: r38572
2000-11-29function.h (emit_status): Delete member regno_pointer_flag and rename ↵John David Anglin1-5/+5
regno_pointer_flag_length to... * function.h (emit_status): Delete member regno_pointer_flag and rename regno_pointer_flag_length to regno_pointer_align_length. Delete define for REGNO_POINTER_FLAG. * integrate.h (inline_remap): Delete member regno_pointer_flag. Add member x_regno_reg_rtx. * rtl.h (rtx_def): Use frame_related bit to indicate register is a pointer in REG expressions. Define REG_POINTER macro. * alias.c (find_base_value, find_base_term): Use REG_POINTER instead of REGNO_POINTER_FLAG. * combine.c (nonzero_bits, num_sign_bit_copies): Likewise. * emit-rtl.c (gen_reg_rtx): Use regno_pointer_align_length instead of regno_pointer_flag_length. Remove code which refers to regno_pointer_flag. (mark_reg_pointer): Use REG_POINTER. (free_emit_status): Remove code which refers to regno_pointer_flag. (init_emit, mark_emit_status): Likewise. * flow.c (dump_flow_info): Likewise. * function.c (preserve_temp_slots): Likewise. * integrate.c (expand_inline_function, copy_rtx_and_substitute): Use x_regno_reg_rtx instead of regno_pointer_flag for function pointer determination in map. * loop.c (strength_reduce, maybe_eliminate_biv_1): Use REG_POINTER. * predict.c (estimate_probability): Likewise. * regclass.c (record_address_regs, reg_scan_mark_refs): Likewise. * unroll.c (unroll_loop): Use x_regno_reg_rtx instead of regno_pointer_flag for function pointer determination in map. * convex.h (RTX_COSTS): Don't test regno_pointer_flag and use REG_POINTER. * pa.c (hppa_legitimize_address, emit_move_sequence, basereg_operand): Use REG_POINTER. (restore_unscaled_index_insn_codes): Revise comment. From-SVN: r37863
2000-11-28loop.c (load_mems): Avoid using next_label to find end_label.Jakub Jelinek1-20/+31
* loop.c (load_mems): Avoid using next_label to find end_label. If jumping outside of the loop (other than loop end), don't hoist MEMs out of loop. * gcc.c-torture/execute/loop-8.c: New test. From-SVN: r37823
2000-11-27Re-apply an earlier fix, with a small updateBernd Schmidt1-15/+21
From-SVN: r37794
2000-11-21Fix consec_sets_giv bug.Bernd Schmidt1-2/+7
From-SVN: r37619
2000-11-13loop.c (basic_induction_var): Revert accidental checkin.Franz Sirl1-7/+8
2000-11-13 Franz Sirl <Franz.Sirl-kernel@lauterbach.com> * loop.c (basic_induction_var): Revert accidental checkin. From-SVN: r37440
2000-11-07alias.c [...] (init_alias_analysis, [...]): Use memset () instead of bzero ().Joseph Myers1-5/+5
* alias.c (init_alias_analysis), calls.c (expand_call, emit_library_call_value_1), combine.c (init_reg_last_arrays), cse.c (new_basic_block), dbxout.c (dbxout_type), diagnostic.c (init_output_buffer, set_diagnostic_context), dwarf2out.c (equate_decl_number_to_die, build_abbrev_table), emit-rtl.c (init_emit_once), fold-const.c (mul_double, div_and_round_double), function.c (assign_parms), gcse.c (compute_can_copy, alloc_gcse_mem, alloc_reg_set_mem, record_one_set, compute_hash_table, compute_set_hash_table, compute_expr_hash_table), genattrtab.c (optimize_attrs), global.c (global_alloc, global_conflicts), haifa-sched.c (compute_trg_info, clear_units, schedule_block), integrate.c (initialize_for_inline, expand_inline_function), jump.c (thread_jumps), local-alloc.c (local_alloc), loop.c (combine_movables, count_loop_regs_set, load_mems_and_recount_loop_regs_set), print-tree.c (debug_tree), regclass.c (init_reg_sets, init_reg_sets_1, regclass, record_reg_classes, allocate_reg_info), reload.c (get_secondary_mem, remove_address_replacements, find_reloads), reload1.c (reload, set_initial_label_offsets, finish_spills, reload_as_needed, choose_reload_regs_init, reload_cse_simplify_operands), reorg.c (dbr_schedule), sbitmap.c (sbitmap_zero), simplify-rtx.c (simplify_plus_minus), ssa.c (rename_registers), stmt.c (expand_end_case), unroll.c (unroll_loop), varray.c (varray_grow), objc/objc-act.c: Use memset () instead of bzero (). ch: * actions.c (check_missing_cases), typeck.c (build_chill_slice, build_chill_cast): Use memset () instead of bzero (). cp: * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c (push_binding_level), error.c (cp_tree_printer), pt.c (process_partial_specialization, tsubst_template_arg_vector), search.c (lookup_member): Use memset () instead of bzero (). java: * expr.c (note_instructions), jcf-io.c (find_class), jcf-parse.c (init_outgoing_cpool), lex.c (java_init_lex): Use memset () instead of bzero (). From-SVN: r37303
2000-10-21* loop.c (strength_reduce): Fix error in last change.Richard Kenner1-1/+1
From-SVN: r36993
2000-10-20loop.c (strength_reduce): Show when new register made for giv is known to be ↵Richard Kenner1-1/+40
a pointer and its aligment if... * loop.c (strength_reduce): Show when new register made for giv is known to be a pointer and its aligment if so and known. (loop_dump_aux): Show VERBOSE parameter unused. From-SVN: r36975
2000-10-18Adding new option -ftrapv.Chandrakala Chavva1-2/+2
From-SVN: r36942
2000-10-13Remove obstacks.Mark Mitchell1-38/+28
* Makefile.in (ggc-callbacks.o): Remove target. (flow.o): Depend on GGC_H. * alias.c (init_alias_analysis): Remove ggc_p conditionals. (end_alias_analysis): Likewise. * basic-block.h (init_flow): New function. (allocate_reg_life_data): Declare. * bb-reorder.c (function_obstack): Replace with ... (flow_obstack): ... new variable. (fixup_reorder_chain): Use it. * c-decl.c (ggc_p): Remove. (caller-save.c): Don't call oballoc/obfree. * combine.c (struct undobuf): Remove storage. (try_combine): Don't call oballoc. (undo_all): Don't call obfree. * cse.c (insert): Use xmalloc, not oballoc. (cse_main): Adjust accordingly. * dwarf2out.c (save_rtx): Remove obstack code. (dwarf2out_init): Remove ggc_p conditionals. * emit-rtl.c (rtl_obstack): Remove. (gen_rtx_CONST_INT): Remove ggc_p conditionals. (make_insn_raw): Likewise. (emit_insn_before): Likewise. (emit_insn_after): Likewise. (emit_insn): Likewise. (gen_sequence): Likewise. (copy_insn_1): Remove handling of `b' RTL components. (init_emit_once): Remove ggc_p conditionals. * except.c (create_rethrow_ref): Don't fool with obstacks. (add_partial_entry): Likewise. (call_get_eh_context): Likewise. (begin_protect_partials): Likewise. (protect_with_terminate): Likewise. * explow.c (plus_constant_wide): Likewise. * expr.c (init_expr_once): Likewise. (emit_block_move): Likewise. (clear_storage): Likewise. (expand_expr): Likewise. * flow.c (function_obstack): Remove. (flow_obstack): New variable. (flow_firstobj): Likewise. (create_base_block): Use the flow_obstack. (split_block): Likewise. (split_edge): Likewise. (calculate_global_regs_live): Likewise. (allocate_bb_life_data): Make it static. Likewiwse. (init_flow): New function. (size_int_type_wide): Remove ggc_p conditionals. * function.c (push_function_context_to): Don't call save_tree_status. (pop_function_context_from): Or restore_tree_status. (assign_stack_local_1): Don't call push_obstacks. (find_fixup_replacement): Use xmalloc. (fixup_var_refs_insns): Free the storage. (insns_for_mem_walk): Don't mess with obstacks. (instantiate_decls): Likewise. (trampoline_address): Likewise. (expand_function_end): Likewise. * function.h (sturct function): Remove obstack-related variables. (save_tree_status): Don't declare. (restore_tree_status): Likewise. * gcse.c (compute_can_copy): Don't call oballoc/obfree. * genattrtab.c (operate_exp): Remove ggc_p conditionals. (simplify_cond): Likewise. (simplify_test_exp): Don't mess with obstacks. (optimize_attrs): Likewise. * gengenrtl.c (gendef): Don't include ggc_p conditionals. * ggc-callbacks.c (ggc_p): Remove. * ggc-none.c (ggc_p): Remove. * ggc.h (ggc_p): Don't declare. * integrate.c (save_for_inline): Don't mess with obstacks. (integrate_decl_tree): Likewise. (output_inline_function): Likewise. * lists.c (init_EXPR_INSN_LIST_cache): Likewise. * loop.c (temp_obstack): Remove. (rtl_obstack): Likewise. (init_loop): Don't mess with obstacks. (reg_address_cost): Free BIVs and GIVs. (check_insns_for_bivs): Use xmalloc, not oballoc. (find_mem_givs): Likewise. (record_biv): Likewise. (general_induction_var): Likewise. (product_cheap_p): Likewse. * optabs.c (init_one_libfunc): Remove ggc_p conditional. * print-tree.c (debug_tree): Don't use oballoc/obfree. (print_node): Likewise. * profile.c (output_func_start_profiler): Remove call to temporary_allocation. * reload1.c (eliminate_regs_in_insn): Don't mess with obstacks. * resource.c (mark_target_live_regs): Use xmalloc. (free_resource_info): Free the memory. * rtl.c (rtl_obstack): Remove. (rtvec_alloc): Don't mess with obstacks. (rtx_alloc): Likewise. (rtx_free): Remove. (copy_rtx): Don't handle `b' cases. (read_rtx): Use a local rtl_obstack. * rtl.h (oballoc): Remove. (obfree): Likewise. (pop_obstacks): Likewise. (push_obstacks): Likewise. (allocate_bb_life_data): Likewise. (allocate_reg_life_data): Likewise. (rtx_free): Likewise. * sdbout.c (sdbout_queue_anonymous_type): Use tree_cons, not saveable_tree_cons. * simplify-rtx.c (cselib_init): Don't mess with obstacks. * stmt.c (mark_block_nesting): Mark the label_chain. (epxand_label): Use ggc_alloc, not oballoc. (clear_last_expr): Don't mess with obstacks. (expand_decl_cleanup): Likewise. (expand_dcc_cleanup): Likewise. (expand_dhc_cleanup): Likewise. (expand_anon_union_decl): Likewise. (add_case_node): Use xmalloc, not oballoc. (free_case_nodes): New function. (expand_end_case): Call it. * stor-layout.c (layout_type): Don't mess with obstacks. (layout_type): Likewise. * toplev.c (wrapup_global_declarations): Likewise. (compile_file): Remove ggc_p conditionals. (rest_of_compilation): Call init_flow. Remove ggc_p conditionals. (decode_f_option): Remove ggc_p conditionals. * tree.c (function_maybepermanent_obstack): Remove. (maybepermanent_obstack): Likewise. (function_obstack): Likewise. (tmeporary_obstack): Likewise. (momentary_obstack): Likewise. (temp_decl_obstack): Likewise. (saveable_obstack): Likewise. (rtl_obstack): Likewise. (current_obstack): Likewise. (expression_obstack): Likewise. (struct obstack_stack): Likewise. (obstack_stack): Likewise. (obstack_stack_obstack): Likewise. (maybepermanent_firstobj): Likewise. (temporary_firstobj): Likewise. (momentary_firstobj): Likewise. (temp_decl_firstobj): Likewise. (momentary_function_firstobj): Likewise. (all_types_permanent): Likewise. (struct momentary_level): Likewise. (momentary_stack): Likewise. (init_obstacks): Remove initialization of removed obstacks. (save_tree_status): Remove. (restore_tree_status): Likewise. (temporary_allocation): Liekwise. (end_temporary_allocation): Liekwise. (resume_temporary_allocation): Likewise. (saveable_allocation): Likewise. (push_obstacks): Likewise. (push_obstacks_nochange): Likewise. (pop_obstacks): Likewise. (allocation_temporary_p): Likewise. (permanent_allocation): Likewise. (preserve_data): Likewise. (preserve_initializer): Likewise. (rtl_in_current_obstack): Likewise. (rtl_in_saveable_obstack): Likewise. (oballoc): Likewise. (obfree): Likewise. (savealloc): Likewise. (expralloc): Likewise. (print_obstack_name): Likewise. (debug_obstack): Likewise. (object_permanent_p): Likewise. (push_momentary): Likewise. (perserve_momentary): Likewise. (clear_momentary): Likewise. (pop_momentary): Likewise. (pop_momentary_nofree): Likewise. (suspend_momentary): Likewise. (resume_momentary): Likewise. (make_node): Don't set TREE_PERMANENT. (copy_node): Remove ggc_p conditionals. Don't set TYPE_OBSTACK. Don't set TREE_PERMANENT. (get_identifier): Remove ggc_p conditionals. (build_string): Likewise. (make_tree_vec): Likewise. (build_decl_list): Remove. (build_expr_list): Likewise. (tree_cons): Remove ggc_p conditionals. (decl_tree_cons): Remove. (expr_tree_cons): Likewise. (perm_tree_cons): Likewise. (temp_tree_cons): Likewise. (saveable_tree_cons): Likewise. (build1): Remove ggc_p conditionals. (build_parse_node): Likewise. (build_type_attribute_variant): Don't mess with obstacks. (build_type_copy): Likewise. (type_hash_canon): Likewise. (build_pointer_type): Likewise. (build_reference_type): Likewise. (build_index_type): Likewise. (build_range_type): Likewise. (dump_tree_statistics): Don't print obstack information. * tree.h (struct tree_common): Remove permanent_flag. (TREE_PERMANENT): Remove. (TREE_SET_PERMANENT): Likewise. (TYPE_OBSTACK): Likewise. (struct tree_type): Remove obstack. (oballoc): Remove. (savealloc): Likewise. (build_decl_list): Likewise. (build_expr_list): Likewise. (perm_tree_cons): Likewise. (temp_tree_cons): Likewise. (saveable_tree_cons): Likewise. (decl_tree_cons): Likewise. (expr_tree_cons): Likewise. (suspend_momentary): Likewise. (allocation_temporary_p): Likewise. (resume_momentary): Likewise. (push_obstacks_nochange): Likewise. (permanent_allocation): Likewise. (push_momentary): Likewise. (clear_momentary): Likewise. (pop_momentary): Likewise. (end_temporary_allocation): Likewise. (pop_obstacks): Likewise. (push_obstacks): Likewise. (pop_momentary_nofree): LIkewise. (preserve_momentary): Likewise. (saveable_allocation): Likewise. (temporary_allocation): Likewise. (resume_temporary_allocation): Likewise. (perserve_initializer): Likewise. (debug_obstack): Likewise. (rtl_in_current_obstack): Likewise. (rtl_in_saveable_obstack): Likewise. (obfree): Likewise. * varasm.c (current_obstack): Remove. (saveable_obstack): Remove. (rtl_obstack): Remove. (immed_double_const): Don't mess with obstacks. (immed_real_cons): Likewise. (output_constant_def): Likewise. (init_varasm_status): Use xcalloc. (mark_pool_constant): Mark the pool constant itself. (free_varasm_status): Free memory. (decode_rtx_const): Call bzero directly, rather than expanding it inline. (record_rtx_const): Don't mess with obstacks. (force_const_mem): Likewise. * config/arm/arm.c (arm_encode_call_attribute): Remove ggc_p conditionals. (aof_pic_entry): Likewise. * config/ia64/ia64.c (ia64_encode_section_info): Likewise. * config/m32r/m32r.c (m32r_encode_section_info): Likewise. * config/pa/pa.c (saveable_obstack): Remove. (rtl_obstack): Likewise. (current_obstack): Likewise. (output_call): Don't mess with obstacks. (hppa_encode_label): Remove ggc_p conditionals. * config/romp/romp.c (get_symref): Don't mess with obstacks. * config/rs6000/rs6000.c (output_toc): Remove ggc_p conditional. (rs6000_encode_section_info): Likewise. * config/sh/sh.c (get_fpscr_rtx): Likewise. From-SVN: r36856
2000-09-29loop.c (check_final_value): A GIV is not replaceable if used before set.Franz Sirl1-11/+14
2000-09-29 Franz Sirl <Franz.Sirl-kernel@lauterbach.com> * loop.c (check_final_value): A GIV is not replaceable if used before set. From-SVN: r36668
2000-09-19Kill recombine_givs.Bernd Schmidt1-985/+11
From-SVN: r36536
2000-09-13loop.c: Fix formatting.Kazu Hirata1-87/+83
* loop.c: Fix formatting. * loop.h: Likewise. From-SVN: r36400
2000-09-12* loop.c (note_set_pseudo_multiple_uses): Correct.Michael Hayes1-3/+2
From-SVN: r36375
2000-09-12Fix hard reg cost calculations in CSE; some minor cleanupsBernd Schmidt1-1/+1
From-SVN: r36354
2000-09-11loop.h (LOOP_IVS): New macro.Michael Hayes1-128/+122
* loop.h (LOOP_IVS): New macro. (REG_IV_TYPE, REG_IV_INFO): Add ivs argument. (struct loop_ivs): New. (struct loop_info): Add ivs field. (reg_iv_type, reg_iv_info): Delete prototype. (reg_biv_class, loop_iv_list): Likewise. * loop.c (record_biv, find_life_end): Pass loop argument. (reg_iv_type): Remove global array and use field in loop_regs structure within loop_ivs structure. (reg_iv_info, reg_biv_class, loop_iv_list): Likewise. (first_increment_giv, last_increment_giv): Use entry in loop_ivs structure. (record_initial): Pass ivs pointer. * unroll.c (copy_loop_body, remap_split_bivs): Add loop argument. From-SVN: r36336
2000-09-11loop.h (LOOP_REGS): New macro.Michael Hayes1-167/+167
* loop.h (LOOP_REGS): New macro. (struct loop_regs): New. (struct loop_info): Add regs field. * loop.c (set_in_loop): Remove global array and store in loop_regs structure as part of loop_info structure. (n_times_set, may_not_optimize): Likewise. (reg_single_usage, moved_once): Likewise. (count_one_set): Add regs argument. (combine_movables, rtx_equal_for_loop_p, combine_givs): Likewise. (set_pseudo_multiple_uses): Pass regs pointer. From-SVN: r36335
2000-09-09loop.h (struct loop_mem_info): Move from loop.c (struct loop_info): Add ↵Michael Hayes1-148/+137
fields store_mems... * loop.h (struct loop_mem_info): Move from loop.c (struct loop_info): Add fields store_mems, mems, mems_idx, mems_allocated, unknown_address_altered, unknown_constant_address_altered, num_mem_sets, and first_loop_store_insn. * loop.c (loop_store_mems): Replace with field in loop_info struct. (loop_mems, loop_mems_idx, loop_mems_allocated): Likewise. (unknown_address_altered, unknown_constant_address_altered): Likewise. (num_mem_sets): Likewise. (replace_loop_mems, replace_loop_regs): New. (struct loop_replace_args): New. (load_mems): Use replace_loop_mems. (try_copy_prop): Use replace_loop_regs. (replace_loop_reg, replace_loop_mem): Use loop_replace_args structure. From-SVN: r36284
2000-09-09loop.c (struct movables): New.Michael Hayes1-44/+52
* loop.c (struct movables): New. (num_movables): Move into struct movables. (the_movables): Change type to struct movables. (ignore_some_movables): Change struct movable arg to struct movables. (force_movables, combine_movables, regs_match_p): Likewise. (rtx_equal_for_loop_p, move_movables): Likewise. (scan_loop): Change movables to be of type struct movables. Replace last_movable with field in movables structure. From-SVN: r36278
2000-09-07loop.c (strength_reduce): Call check_ext_dependant_givs.Richard Henderson1-56/+321
* loop.c (strength_reduce): Call check_ext_dependant_givs. Properly extend the biv initial value for the giv. (record_biv): Zero ext_dependant. (record_giv): New argument ext_val. Update all callers. (general_induction_var): Likewise. (consec_sets_giv): Likewise. (simplify_giv_expr): Likewise. Fill in ext_val if we find a sign-extend, zero-extend, or truncate. (combine_givs_p): Make sure modes are compatible. (check_ext_dependant_givs): New. (extend_value_for_giv): New. * loop.h (struct induction): Add ext_dependant. * unroll.c (iteration_info): Extend the biv initial value for the giv. (find_splittable_givs): Likewise. (final_giv_value): Likewise. From-SVN: r36250
2000-09-06Changes in cse.c/loop.c cost calculationsBernd Schmidt1-19/+65
From-SVN: r36192
2000-09-01Fix ia64-linux miscompilation or tcl/generic/tclCompExpr.cJim Wilson1-6/+12
Fix ia64-linux miscompilation or tcl/generic/tclCompExpr.c * loop.c (check_final_value): Check for biv use before checking for giv use. Check for both biv and giv uses. Always set last_giv_use if there is a giv use. From-SVN: r36104
2000-08-29loop.c (prescan_loop): Don't check unknown_address_altered when deciding if ↵John Wehle1-15/+21
insert_loop_mem is safe. * loop.c (prescan_loop): Don't check unknown_address_altered when deciding if insert_loop_mem is safe. Add BLKmode MEMs to loop_store_mems as necessary. (loop_invariant_p): Don't check unknown_address_altered or unknown_constant_address_altered. From-SVN: r36045
2000-08-28cpplex.c (parse_string): Don't look for backslash before first char in ↵Greg McGary1-2/+3
`namebuf'. * cpplex.c (parse_string): Don't look for backslash before first char in `namebuf'. * loop.c (strength_reduce): Skip NOTEs. From-SVN: r36015
2000-08-25loop.c (loop_dump_aux, debug_loop): New functions.Michael Hayes1-0/+89
* loop.c (loop_dump_aux, debug_loop): New functions. (LOOP_BLOCK_NUM_1, LOOP_BLOCK_NUM, LOOP_INSN_UID): New macros. * flow.c (flow_loops_dump): Add callback parameter. (flow_loop_dump): Add callback parameter and call it. Move loop note debugging code to loop_dump_aux. * basic-block.h (flow_loop_dump): Add callback parameter (flow_loops_dump): Likewise. * toplev.c (rest_of_compilation): Add NULL callback function pointer to call to flow_loops_dump. From-SVN: r35979
2000-08-25loop.c (count_loop_regs_set): Replace start and end arguments with loop ↵Michael Hayes1-8/+9
argument. * loop.c (count_loop_regs_set): Replace start and end arguments with loop argument. All callers udated. From-SVN: r35978
2000-08-25* loop.c (constant_high_bytes): Delete.Michael Hayes1-42/+0
From-SVN: r35977
2000-08-25loop.c (prescan_loop): Move checks for NOTE_INSN_LOOP_CONT and ↵Michael Hayes1-24/+8
NOTE_INSN_LOOP_VTOP to... * loop.c (prescan_loop): Move checks for NOTE_INSN_LOOP_CONT and NOTE_INSN_LOOP_VTOP to... (find_and_verify_loops) ...here. From-SVN: r35976
2000-08-19loop.c (scan_loop): Use CONST_CALL_P instead of checking for REG_LIBCALL / ↵John Wehle1-9/+2
REG_RETVAL. * loop.c (scan_loop): Use CONST_CALL_P instead of checking for REG_LIBCALL / REG_RETVAL. From-SVN: r35808