aboutsummaryrefslogtreecommitdiff
path: root/gcc/loop.h
AgeCommit message (Collapse)AuthorFilesLines
2000-07-30Makefile.in (OBJS): Add doloop.o.Richard Henderson1-0/+2
* Makefile.in (OBJS): Add doloop.o. * doloop.c: New file. * final.c (insn_current_reference_address): Return 0 before final. * flags.h (flag_branch_on_count_reg): Fix typos in commentary. * jump.c (any_uncondjump_p): Likewise. * loop.c (indirect_jump_in_function): Make static. (strength_reduce): Call doloop_optimize. (insert_bct, instrument_loop_bct): Remove. * loop.h (doloop_optimize): Prototype. * recog.c (split_all_insns): Split all INSN_P. * toplev.c (flag_branch_on_count_reg): Default on. * config/c4x/c4x.c (c4x_optimization_options): Don't set flag_branch_on_count_reg. * config/i386/i386.c (override_options): Likewise. * config/rs6000/rs6000.c (optimization_options): Likewise. * config/i386/i386.md (decrement_and_branch_on_count): Remove. (doloop_end): New. (dbra_ge): Remove, as well as all it's splitters. * config/rs6000/rs6000.md (decrement_and_branch_on_count): Remove. (doloop_end): New. * config/ia64/ia64-protos.h (ar_lc_reg_operand): Declare. (ia64_register_move_cost): Declare. * config/ia64/ia64.c (ar_lc_reg_operand): New. (struct ia64_frame_info): Add ar_size. (ia64_compute_frame_size): Set it. (save_restore_insns): Save and restore ar.lc. (ia64_register_move_cost): New, moved from header file. Handle application registers. (REG_AR_PFS, REG_AR_EC): Remove. Replace with AR_*_REGNUM numbers. (emit_insn_group_barriers): Special case doloop_end_internal. (ia64_epilogue_uses): Mark ar.lc live at end. * config/ia64/ia64.h (AR_CCV_REGNUM, AR_LC_REGNUM): New registers. (AR_EC_REGNUM, AR_PFS_REGNUM): New registers. (FIRST_PSEUDO_REGISTER): Make room. (AR_M_REGNO_P, AR_I_REGNO_P, AR_REGNO_P): New. (FIXED_REGISTERS, CALL_USED_REGISTERS): Update. (REG_ALLOC_ORDER): Update. (HARD_REGNO_MODE_OK): Update. (REGISTER_NAMES): Update. (enum reg_class): Add AR_M_REGS and AR_I_REGS. (REG_CLASS_NAMES, REG_CLASS_CONTENTS): Update. (REGNO_REG_CLASS): Update. (LEGITIMATE_ADDRESS_DISP): Displacement range is 9 bits, not 10. (REGISTER_MOVE_COST): Move out of line. (PREDICATE_CODES): Update. * config/ia64/ia64.md (movdi patterns): Handle ar register classes. (addsi3_plus1_alt, adddi3_plus1_alt): New. (shladd_elim splitter): Allow constants in the predicate. (doloop_end, doloop_end_internal): New. From-SVN: r35358
2000-05-25revert: loop.h (struct induction): Add multi_insn_incr.J"orn Rennecke1-1/+0
* Back out this patch: Tue Dec 7 19:22:06 1999 Richard Henderson <rth@cygnus.com> * loop.h (struct induction): Add multi_insn_incr. * loop.c (basic_induction_var): New multi_insn_incr argument. Set it if we search back through previous insns for the biv. (record_biv): New multi_insn_incr argument; fill in struct induction. (strength_reduce): Discard an iv with multiple bivs, any of which require multiple insns to increment. * loop.c (check_insn_for_bivs): Remove bits copied from above patch. From-SVN: r34151
2000-05-19cse.c (cse_basic_block): Only call find_reg_note if REG_NOTES not 0.Richard Kenner1-1/+2
* cse.c (cse_basic_block): Only call find_reg_note if REG_NOTES not 0. * reload.c (find_equiv_reg): Likewise. * alias.c (init_alias_analysis): Likewise. Only call prologue_epilogue_contains on insns. * basic-block.h (REG_SET_TO_HARD_REG_SET): Call new function. * bb-reorder.c (hard-reg-set.h): Include earlier. * haifa-sched.c (hard-reg-set.h): Likewise. * ifcvt.c (hard-reg-set.h): Likewise. * local-alloc.c (hard-reg-set.h): Likewise. * loop.c (hard-reg-set.h): Likewise. * predict.c (hard-reg-set.h): Likewise. * regrename.c (hard-reg-set.h): Likewise. * flow.c (hard-reg-set.h): Likewise. (reg_set_to_hard_reg_set): New function. * bitmap.c (regs.h, basic-block.h): No longer include. (bitmap.h): Now include. * conflict.c (hard-reg-set.h): Include. * profile.c (hard-reg-set.h): Likewise. * print-rtl.c (hard-reg-set.h): Likewise. * sbitmap.c (hard-reg-set.h): Likewise. * toplev.c (hard-reg-set.h): Likewise. * unroll.c (hard-reg-set.h, basic-block.h): Likewise. * hard-reg-set.h (reg_names): Now constant. * regs.h (reg_names): Likewise. * regclass.c (reg_names): Likewise. * loop.h (basic-block.h): No longer include. (bitmap.h): Now include. * reload1.c (order_regs_for_reload): Avoid loop over reg sets. * Makefile.in (LOOP_H, sbitmap.o, profile.o): Reflect above changes. (toplev.o, print-rtl.o, conflict.o, unroll.o, bitmap.o): Likewise. From-SVN: r34039
2000-05-15loop.c (scan_loop, [...]): Change unroll_p and bct_p parameters to flags.Jan Hubicka1-0/+4
* loop.c (scan_loop, strength_reduce, loop_optimize): Change unroll_p and bct_p parameters to flags. * loop.h (LOOP_UNROLL, LOOP_BCT): New constants. * rtl.h (loop_optimize): Update prototype. * toplev.c (rest_of_compilation): Update call of loop_optimize. From-SVN: r33912
2000-04-19Fix lossage caused by applying old version of my previous patch.Jan Hubicka1-1/+1
From-SVN: r33254
2000-04-19loop.c (check_insn_for_bivs, [...]): Break out from ...Jan Hubicka1-0/+2
* loop.c (check_insn_for_bivs, for_every_insn_in_loop, check_insn_for_givs): Break out from ... (strength_reduce) ... here; use for_every_insn_in_loop to call check_insn_for_givs. * loop.h (for_every_insn_in_loop): Declare. (loop_insn_callback): New type. From-SVN: r33250
2000-03-25* Rework fields used to describe positions of bitfields andRichard Kenner1-3/+3
modify sizes to be unsigned and use HOST_WIDE_INT. * alias.c (reg_known_value_size): Now unsigned. * c-typeck.c (build_unary_op, case ADDR_EXPR): Use byte_position. (really_start_incremental_init): Use bitsize_zero_node. (push_init_level, pop_init_level, output_init_element): Likewise. Use bitsize_unit_node and bitsize_one_node. (output_pending_init_elements, process_init_element): Likewise. * combine.c (combine_max_regno, reg_sign_bit_copies): Now unsigned. (make_extraction): Position and length HOST_WIDE_INT and unsigned HOST_WIDE_INT, respectively. (get_pos_from_mask): Passed in value is unsigned HOST_WIDE_INT. (num_sign_bit_copies): Returns unsigned. BITWIDTH now unsigned; rework arithmetic. Remove recursive call from arg to MAX. (combine_instructions, init_reg_last_arrays): NREGS now unsigned. (setup_incoming_promotions, can_combine_p, try_combine, simplify_set): REGNO now unsigned. (set_nonzero_bit_and_sign_copies): NUM now unsigned. (find_split_point, expand_compound_operation, make_extraction): LEN now unsigned HOST_WIDE_INT, POS now HOST_WIDE_INT. (make_field_assignment): Likewise. (combine_simplify_rtx): Add cast. (expand_compound_operation): MODEWIDTH now unsigned; rework arithmetic. (force_to_mode): WIDTH now unsigned; add cast. (if_then_else_cond): SIZE now unsigned. (nonzero_bits): MODE_WIDTH, RESULT_WIDTH, and WIDTH now unsigned. (extended_count): Now returns unsigned. (simplify_shift_const): COUNT unsigned; arg is now INPUT_COUNT. Add SIGNED_COUNT variable; MODE_WORDS and FIRST_COUNT now unsigned. (simplify_comparison): MODE_WIDTH now unsigned. (update_table_tick): REGNO and ENDREGNO now unsigned; new var R. (mark_used_regs_combine): Likewise; rework arithmetic. (record_value_for_reg): REGNO, ENDREGNO, and I now unsigned. (record_dead_and_set_regs, reg_dead_at_p, distribute_notes): Likewise. (record_promoted_value): REGNO now unsigned. (get_last_value_validate): REGNO, ENDREGNO, and J now unsigned. (get_last_value): REGNO now unsigned. (use_crosses_set_p): REGNO and ENDREGNO now unsigned. (reg_dead_regno, reg_dead_endregno): Now unsigned. (remove_death): Arg REGNO now unsigned. (move_deaths): REGNO, DEADREGNO, DEADEND, OUREND, and I now unsigned. (reg_bitfield_target_p): REGNO, REGNO, ENDREGNO, and ENDTREGNO now unsigned. * convert.c (convert_to_integer): INPREC and OUTPREC now unsigned. * cse.c (struct qty_table_elem): FIRST_REG and LAST_REG now unsigned. (struct cse_reg_info): REGNO now unsigned. (cached_regno): Now unsigned. (REGNO_QTY_VALID_P): Add cast. (make_new_qty, make_regs_eqv, delete_reg_eqiv): Regno args unsigned. (remove_invalid_regs): Likewise. (remove_invalid_subreg_refs): Likewise; arg WORD also unsigned as are variables END and I. (get_cse_reg_info, insert): Likewise. (mention_regs, invalidate_for_call): REGNO, ENDREGNO, and I unsigned. (canon_hash): Likewise. (insert_regs, lookup_for_remove): REGNO now unsigned. (invalidate): REGNO, ENDREGNO, TREGNO, and TENDREGNO now unsigned. New variable RN. * dbxout.c (dbxout_parms, dbxout_reg_parms): Don't check for REGNO < 0. * dwarf2out.c (dwarf2ou_frame_debug_expr): Remove cast. * emit-rtl.c (subreg_realpart_p): Add cast. (operand_subword): Arg I is now unsigned as is var PARTWORDS. (operand_subword_force): Arg I is now unsigned. * except.c (eh_regs): Variable I is now unsigned. * explow.c (hard_function_value): BYTES is unsigned HOST_WIDE_INT. * expmed.c (store_fixed_bit_field): Position is HOST_WIDE_INT; length is unsigned HOST_WIDE_INT; likewise for internal variables. (store_split_bit_field, extract_fixed_bit_field): Likewise. (extract_split_bit_field, store_bit_field, extract_bit_field): Likewise. * expr.c (store_constructor_fields, store_constructor, store_field): Positions are HOST_WIDE_INT and lengths are unsigned HOST_WIDE_INT. (expand_assignment, expand_expr, expand_expr_unaligned): Likewise. (do_jump): Likewise. (move_by_pieces, move_by_pieces_ninsns, clear_by_pieces): MAX_SIZE is now unsigned. (emit_group_load): BYTEPOS is HOST_WIDE_INT; BYTELEN is unsigned. (emit_group_store): Likewise. (emit_move_insn): I now unsigned. (store_constructor): Use host_integerp, tree_low_cst, and bitsize_unit_node. (get_inner_reference): Return bitpos and bitsize as HOST_WIDE_INT. Rework all calculations to use trees and new fields. * expr.h (promoted_input_arg): Regno now unsigned. (store_bit_field, extract_bit_field): Adjust types of pos and size. (mark_seen_cases): Arg is HOST_WIDE_INT. * flow.c (verify_wide_reg_1): REGNO now unsigned. * fold-const.c (decode_field_reference): Size and pos HOST_WIDE_INT; precisions and alignments are unsigned. (optimize_bit_field_compare, fold_truthop): Likewise. (int_const_binop): Adjust threshold for size_int_type_wide call. (fold_convert): Likewise. (size_int_type_wide): Make table larger and fix thinko that only had half of table used. (all_ones_mask_p, fold): Precisions are unsigned. * function.c (put_reg_info_stack): REGNO is unsigned. (instantiate_decl): Size is HOST_WIDE_INT. (instantiate_virtual_regs): I is unsigned. (assign_parms): REGNO, REGNOI, and REGNOR are unsigned. (promoted_input_arg): REGNO is unsigned. * function.h (struct function): x_max_parm_reg is now unsigned. * gcse.c (max_gcse_regno): Now unsigned. (struct null_pointer_info): min_reg and max_reg now unsigned. (lookup_set, next_set): REGNO arg now unsigned. (compute_hash_table): REGNO and I now unsigned. (handle_avail_expr): regnum_for_replacing now unsigned. (cprop_insn): REGNO now unsigned. (delete_null_pointer_checks_1): BLOCK_REG now pointer to unsigned. * ggc-common.c (ggc_mark_tree_children, case FIELD_DECL): New case. * global.c (set_preference): SRC_REGNO, DEST_REGNO, and I now unsigned. * hard-reg-set.h (reg_class_size): Now unsigned. * integrate.c (mark_stores): LAST_REG and I now unsigned; new UREGNO. * jump.c (mark_modified_reg): I now unsigned; add cast. (rtx_equal_for_thread_p): Add cast. * loop.c (max_reg_before_loop): Now unsigned. (struct_movable): REGNO now unsigned. (try_copy_prop): REGNO arg unsigned. (regs_match_p): XN and YN now unsigned. (consec_sets_invariant_p, maybe_eliminate_biv): REGNO now unsigned. (strength_reduce): Likewise; NREGS also unsigned. (first_increment_giv, last_increment_giv unsigned): Now unsigned. * loop.h (struct iv_class): REGNO now unsigned. (max_reg_before_loop, first_increment_giv, last_increment_giv): Now unsigned. * machmode.h (mode_size, mode_unit_size): Now unsigned. (mode_for_size, smallest_mode_for_size): Pass size as unsigned. * optabs.c (expand_binop): I and NWORDS now unsigned. (expand_unop): I now unsigned. * print-tree.c (print_node): Don't print DECL_FIELD_BITPOS, but do print DECL_FIELD_OFFSET and DECL_FIELD_BIT_OFFSET. * real.c (significand_size): Now returns unsigned. * real.h (significand_size): Likewise. * regclass.c (reg_class_size): Now unsigned. (choose_hard_reg_mode): Both operands now unsigned. (record_reg_classes): REGNO and NR now unsigned. (reg_scan): NREGS now unsigned. (reg_scan_update): old_max_regno now unsigned. (reg_scan_mark_refs): Arg MIN_REGNO and var REGNO now unsigned. * reload.c (find_valid_class): BEST_SIZE now unsigned. (find_dummy_reload): REGNO, NWORDS, and I now unsigned. (hard_reg_set_here_p): Args BEG_REGNO and END_REGNO now unsigned. Likewise for variable R. (refers_to_regno_for_reload_p): Args REGNO and END_REGNO now unsigned, as are variables INNER_REGNO and INNER_ENDREGNO; add new variable R. (find_equiv_reg): Add casts. (regno_clobbered_p): Arg REGNO now unsigned. * reload.h (struct reload): NREGS now unsigned. (refers_to_regno_for_reload_p): Regno args are unsigned. (regno_clobbered_p): Likewise. * reload1.c (reg_max_ref_width, spill_stack_slot_width): Now unsigned. (compute_use_by_pseudos): REGNO now unsigned. (find_reg): I and J now unsigned, new variable K, and change loop variables accordingly; THIS_NREGS now unsigned. (alter_reg): INHERENT_SIZE and TOTAL_SIZE now unsigned. (spill_hard_reg): REGNO arg now unsigned; add casts. (forget_old_reloads_1): REGNO, NR, and I now unsigned. (mark_reload_reg_in_use): Arg REGNO and vars NREGS and I now unsigned. (clear_reload_reg_in_use): Arg REGNO and vars NREGS, START_REGNO, END_REGNO, CONFLICT_START, and CONFLICT_END now unsigned. (reload_reg_free_p, reload_reg_reaches_end_p): Arg REGNO now unsigned. (choose_reload_regs): MAX_GROUP_SIZE now unsigned. (emit_reload_insns): REGNO now unsigned. (reload_cse_move2add): Add cast. (move2add_note_store): REGNO and I now unsigned; new variable ENDREGNO and rework loop. * resource.c (mark_referenced_resources, mark_set_resources): New variable R; REGNO and LAST_REGNO now unsigned. (mark_target_live_regs): J and REGNO now unsigned. * rtl.c (mode_size, mode_unit_size): Now unsigned. * rtl.h (union rtunion_def): New field rtuint. (XCUINT): New macro. (ADDRESSOF_REGNO, REGNO, SUBREG_WORD): New XCUINT. (operand_subword, operand_subword_force): Word number is unsigned. (choose_hard_reg_mode): Operands are unsigned. (refers_to-regno_p, dead_or_set_regno_p): Regno arg is unsigned. (find_regno_note, find_regno_fusage, replace_regs): Likewise. (regno_use_in, combine_instructions, remove_death): Likewise. (reg_scan, reg_scan_update): Likewise. (extended_count): Return is unsigned. * rtlanal.c (refers_to_regno_p): Args REGNO and ENDREGNO and vars I, INNER_REGNO, and INNER_ENDREGNO now unsigned; new variable X_REGNO. (reg_overlap_mentioned_p): REGNO and ENDREGNO now unsigned. (reg_set_last_first_regno, reg_set_last_last_regno): Now unsigned. (reg_reg_last_1): FIRS and LAST now unsigned. (dead_or_set_p): REGNO, LAST_REGNO, and I now unsigned. (dead_or_set_regno_p): Arg TEST_REGNO and vars REGNO and ENDREGNO now unsigned. (find_regno_note, regno_use_in): Arg REGNO now unsigned. (find_regno_fusage): Likewise; also var REGNOTE now unsigned. (find_reg_fusage): Variables REGNO, END_REGNO, and I now unsigned. (replace_regs): Arg NREGS now unsigned. * sdbout.c (sdbout_parms, sdbout_reg_parms): Don't check REGNO < 0. * simplify-rtx.c (simplify_unary_operation): WIDTH now unsigned. (simplify_binary_operation): Likewise. (cselib_invalidate_regno): Arg REGNO and variables ENDREGNO, I, and THIS_LAST now unsigned. (cselib_record_set): Add cast. * ssa.c (ssa_max_reg_num): Now unsigned. (rename_block): REGNO now unsigned. * stmt.c (expand_return): Bit positions unsigned HOST_WIDE_INT; sizes now unsigned. (all_cases_count): Just return -1 not -2. COUNT, MINVAL, and LASTVAL now HOST_WIDE_INT. Rework tests to use trees whenever possible. Use host_integerp and tree_low_cst. (mark_seen_cases): COUNT arg now HOST_WIDE_INT; Likewise variable NEXT_NODE_OFFSET; XLO now unsigned. (check_for_full_enumeration_handing): BYTES_NEEDED, I to HOST_WIDE_INT. * stor-layout.c (mode_for_size): SIZE arg now unsigned. (smallest_mode_for_size): Likewise. (layout_decl): Simplify handing of a specified DECL_SIZE_UNIT. KNOWN_ALIGN is now an alignment, so simplify code. Don't turn off DECL_BIT_FIELD if field is BLKmode, but not type. (start_record_layout): Renamed from new_record_layout_info. Update to new fields. (debug_rli, normalize_rli, rli_size_unit_so_far, rli_size_so_far): New functions. (place_union_field): Renamed from layout_union_field. Update to use new fields in rli. (place_field): Renamed from layout_field. Major rewrite to use new fields in rli; pass alignment to layout_decl. (finalize_record_size): Rework to use new fields in rli and handle union. (compute_record_mode): Rework to simplify and to use new DECL fields. (finalize_type_size): Make rounding more consistent. (finish_union_layout): Deleted. (layout_type, case VOID_TYPE): Don't set TYPE_SIZE_UNIT either. (layout_type, case RECORD_TYPE): Call new function names. (initialize_sizetypes): Set TYPE_IS_SIZETYPE. (set_sizetype): Set TYPE_IS_SIZETYPE earlier. (get_best_mode): UNIT is now unsigned; remove casts. * tree.c (bit_position): Compute from new fields. (byte_position, int_byte_position): New functions. (print_type_hash_statistics): Cast to remove warning. (build_range_type): Use host_integerp and tree_low_cst to try to hash. (build_index_type): Likewise; make subtype of sizetype. (build_index_2_type): Pass sizetype to build_range_type. (build_common_tree_nodes): Use size_int and bitsize_int to initialize nodes; add bitsize_{zero,one,unit}_node. * tree.h (DECL_FIELD_CONTEXT): Use FIELD_DECL_CHECK. (DECL_BIT_FIELD_TYPE, DECL_QUALIFIER, DECL_FCONTEXT): Likewise. (DECL_PACKED, DECL_BIT_FIELD): Likewise. (DECL_FIELD_BITPOS): Deleted. (DECL_FIELD_OFFSET, DECL_FIELD_BIT_OFFSET): New fields. (DECL_RESULT, DECL_SAVED_INSNS): Use FUNCTION_DECL_CHECK. (DECL_FRAME_SIZE, DECL_FUNCTION_CODE, DECL_NO_STATIC_CHAIN): Likewise. (DECL_INLINE, DECL_BUILT_IN_NONANSI, DECL_IS_MALLOC): Likewise. (DECL_BUILT_IN_CLASS, DECL_STATIC_CONSTRUCTOR): Likewise. (DECL_STATIC_DESTRUCTOR, DECL_NO_CHECK_MEMORY_USAGE): Likewise. (DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT, DECL_NO_LIMIT_STACK) Likewise. (DECL_ORIGINAL_TYPE, TYPE_DECL_SUPPRESS_DEBUG): Use TYPE_DECL_CHECK. (DECL_ARG_TYPE_AS_WRITEN, DECL_ARG_TYPE): Use PARM_DECL_CHECK. (DECL_INCOMING_RTL, DECL_TRANSPARENT_UNION): Likewise. (DECL_ALIGN): Adjust to new field in union. (DECL_OFFSET_ALIGN): New field. (DECL_ERROR_ISSUED, DECL_TOO_LATE): Use LABEL_DECL_CHECK. (DECL_IN_TEXT_SECTION): Use VAR_DECL_CHECK. (union tree_decl): Add struct for both aligns. (enum tree_index): Add TI_BITSIZE_{ZERO,ONE,UNIT}. (bitsize_zero_node, bitsize_one_node, bitsize_unit_node): Added. (struct record_layout_info): Rework fields to have offset alignment and byte and bit position. (start_record_layout, place_field): Renamed from old names. (rli_size_so_far, rli_size_unit_so_far, normalize_rli): New decls. (byte_position, int_byte_position): Likewise. (get_inner_reference): Change types of position and length. * unroll.c (unroll_loop): New variable R; use for some loops. MAX_LOCAL_REGNUM and MAXREGNUM now unsigned. (calculate_giv_inc): Arg REGNO now unsigned. (copy_loop_body): REGNO and SRC_REGNO now unsigned. * varasm.c (assemble_variable): Clean up handling of size using host_integerp and tree_low_cst. (decode_addr_const): Use byte, not bit, position. (output_constructor): bitpos and offsets are HOST_WIDE_INT; use tree_low_cst and int_bit_position. * objc/objc-act.c (build_ivar_list_initializer): Use byte_position. * ch/actions.c (check_missing_cases): BYTES_NEEDED is HOST_WIDE_INT. * ch/typeck.c (expand_constant_to_buffer): Use int_byte_position. (extract_constant_from_buffer): Likewise. * cp/class.c (build_vbase_pointer_fields): layout_field now place_field. (get_vfield_offset): Use byte_position. (set_rtti_entry): Set OFFSET to ssizetype zero. (get_binfo_offset_as_int): Deleted. (dfs_record_base_offsets): Use tree_low_cst. (dfs_search_base_offsets): Likewise. (layout_nonempty_base_or_field): Reflect changes in RLI format and call byte_position. (layout_empty_base): Convert offset to ssizetype. (build_base_field): use rli_size_unit_so_far. (dfs_propagate_binfo_offsets): Do computation in proper type. (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets. (layout_class_type): Reflect changes in RLI names and fields. (finish_struct_1): Set DECL_FIELD_OFFSET. * cp/dump.c (dequeue_and_dump): Call bit_position. * cp/expr.c (cplus_expand_constant): Use byte_position. * cp/rtti.c (expand_class_desc): Use bitsize_one_node. * cp/typeck.c (build_component_addr): Use byte_position and don't special case for zero offset. * f/com.c (ffecom_tree_canonize_ptr_): Use bitsize_zero_node. (ffecom_tree_canonize_ref_): Likewise. * java/class.c (make_field_value): Use byte_position. * java/expr.c (JAVA_ARRAY_LENGTH_OFFSET): Use byte_position. (java_array_data_offset): Likewise. * java/java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Add case to bzero call. From-SVN: r32742
2000-03-19emit-rtl.c (remove_unncessary_notes): Check that all NOTE_INSN_BLOCK_BEG and ↵Mark Mitchell1-3/+0
NOTE_INSN_BLOCK_END notes have an... * emit-rtl.c (remove_unncessary_notes): Check that all NOTE_INSN_BLOCK_BEG and NOTE_INSN_BLOCK_END notes have an associated NOTE_BLOCK. * function.h (identify_blocks): Update comments. (reorder_blocks): Declare. * function.c (identify_blocks): Don't take paramters. (reorder_blocks): Don't take parameters. * loop.h (find_loop_tree_blocks): Remove. (unroll_block_trees): Likewise. * loop.c (loop_optimize): Don't call find_loop_tree_blocks. Use reorder_blocks instead of unroll_block_trees.h * sibcall.c (optimize_sibling_and_tail_recursive_calls): Likewise. * stmt.c (find_loop_tree_blocks): Remove. (unroll_block_trees): Likewise. * toplev.c (rest_of_compilation): Don't call find_loop_tree_blocks in whole-function mode. * tree.h (reorder_blocks): Remove declaration. From-SVN: r32632
2000-01-25loop.c (current_loop_info): Delete.Michael Hayes1-9/+7
2000-01-26 Michael Hayes <m.hayes@elec.canterbury.ac.nz> * loop.c (current_loop_info): Delete. (consec_sets_invariant_p): Add loop argument, update callers. (get_condition_for_loop): Likewise. (count_nonfixed_reads, update_giv_derive): Likewise. (simplify_giv_expr, general_induction_var): Likewise. (consec_sets_giv, recombine_givs): Likewise. (move_movables): Delete loop_start and loop_end arguments, add loop argument, and update callers. (find_mem_givs, check_final_value): Likewise. (record_giv, maybe_eliminate_biv, maybe_eliminate_biv_1): Likewise. (loop_invariant_p): Rename from invariant_p, add loop argument, and update callers. (basic_induction_var): Add loop argument, delete loop_level argument, and update callers. * unroll.c (iteration_info): Delete loop_start and loop_end arguments, add loop argument, and update callers. (find_splittable_regs, find_splittable_givs): Likewise. (reg_dead_after_loop, loop_find_equiv_value): Likewise. (final_biv_value, final_giv_value, back_branch_in_range_p): Likewise. (biv_total_increment): Delete loop_start and loop_end arguments; update callers. (precondition_loop_p): Delete loop_start and loop_info arguments; update callers. * loop.h (get_condition_for_loop): Add loop argument. (biv_total_increment): Delete loop_start and loop_end arguments. (precondition_loop_p): Delete loop_start and loop_info arguments; add loop argument. (final_biv_value): Delete loop_start and loop_end arguments; add loop argument. (final_giv_value, back_branch_in_range_p): Likewise. From-SVN: r31618
2000-01-25loop.h (LOOP_INFO): New accessor macro.Michael Hayes1-0/+3
2000-01-25 Michael Hayes <m.hayes@elec.canterbury.ac.nz> * loop.h (LOOP_INFO): New accessor macro. * basic-block.h (struct loop): Rename field `info' to `aux'. * loop.c (scan_loop): Replace loop->info with LOOP_INFO (loop). (prescan_loop, strength_reduce, check_dbra_loop, insert_bct): Likewise. * unroll.c (loop_iterations, unroll_loop): Likewise. From-SVN: r31596
2000-01-17Update copyrightsKaveh Ghazi1-1/+1
From-SVN: r31465
2000-01-17ggc-common.c: PROTO -> PARAMS.Kaveh R. Ghazi1-16/+16
* ggc-common.c: PROTO -> PARAMS. * ggc-page.c: Likewise. * ggc-simple.c: Likewise. * ggc.h: Likewise. * global.c: Likewise. * graph.c: Likewise. * gthr-win32.h: Likewise. * haifa-sched.c: Likewise. * halfpic.h: Likewise. * integrate.c: Likewise. * integrate.h: Likewise. * jump.c: Likewise. * lcm.c: Likewise. * local-alloc.c: Likewise. * loop.c: Likewise. * loop.h: Likewise. From-SVN: r31458
2000-01-15loop.c (this_loop_info): Delete.Michael Hayes1-17/+5
* loop.c (this_loop_info): Delete. (uid_loop): Add in place of uid_loop_num. All uses updated. (loop_number_exit_count): Delete and replace with entry in loop structure. All uses updated. (loop_number_loop_starts, loop_number_loop_ends): Likewise. (loop_number_loop_cont, loop_number_cont_dominator): Likewise. (loop_outer_loop): Likewise. (loop_invalid, loop_number_exit_labels): Likewise. (loop_used_count_register): Delete and replace with entry in loop_info structure. (find_and_verify_loops): Add loops argument. (verify_dominator, mark_loop_jump, prescan_loop): Replace loop_start, loop_end, etc. arguments with loop structure pointer. All callers changed. (loop_reg_used_before_p, scan_loop, strength_reduce): Likewise. (check_dbra_loop, next_insn_in_loop, try_copy_prop): Likewise. (load_mems_and_recount_loop_regs_set, load_mems): Likewise. (insert_bct): Likewise. (basic_induction_var): New argument level. * loop.h (struct loop_info): Delete fields num, loops_enclosed, vtop, and cont. Add used_count_register. (uid_loop): Delete declaration. (loop_number_exit_count): Likewise. (loop_number_loop_starts, loop_number_loop_ends): Likewise. (loop_number_loop_cont, loop_number_cont_dominator): Likewise. (loop_outer_loop, loop_used_count_register): Likewise. (loop_invalid, loop_number_exit_labels): Likewise. (unroll_loop): Replace loop_start and loop_end arguments with loop structure pointer. (loop_precondition_p, loop_iterations): Likewise. Include basic-block.h. * unroll.c: (unroll_loop): Replace loop_start and loop_end arguments with loop structure pointer. (loop_precondition_p, loop_iterations): Likewise. * basic-block.h (struct loop): New entries vtop, cont, cont_dominator, start, end, top, scan_start, exit_labels, exit_count. * Makefile.in (LOOP_H): Add basic-block.h to dependencies. From-SVN: r31434
1999-12-07loop.h (struct induction): Add multi_insn_incr.Richard Henderson1-0/+1
* loop.h (struct induction): Add multi_insn_incr. * loop.c (basic_induction_var): New multi_insn_incr argument. Set it if we search back through previous insns for the biv. (record_biv): New multi_insn_incr argument; fill in struct induction. (strength_reduce): Discard an iv with multiple bivs, any of which require multiple insns to increment. From-SVN: r30820
1999-08-29loop.c (this_loop_info): New variable.Michael Hayes1-8/+22
* loop.c (this_loop_info): New variable. (loop_has_call, loop_has_volatile, loop_has_tablejump, loop_continue, loops_enclosed): Replace with fields in this_loop_info. All uses updated. (prescan_loop, strength_reduce): New argument loop_info. All callers updated. (scan_loop): New variable loop_info, initialise to address of this_loop_info. (prescan_loop): Set loop_info->vtop if find NOTE_INSN_LOOP_VTOP. Delete variable loop_has_multiple_exit targets and replace with field in this_loop_info. (find_and_verify_loops): Rename this_loop to this_loop_num. (strength_reduce): Delete loop_iteration_info. Replace variable loop_info with function argument of same name. (insert_bct): Rework test for loop being completely unrolled. * loop.h (struct loop_info): New fields num, loops_enclosed, has_call, has_volatile, has_tablejump, has_multiple_exit_targets, has_indirect_jump, and cont. Redefine use of unroll_number. (loop_unroll_number): Delete. * unroll.c (unroll_loop): Store loop unroll count in unroll_number field of loop_info. (loop_iterations): Delete variable vtop and instead use loop_info->vtop computed in prescan_loop. From-SVN: r28961
1999-02-24loop.h (loop_insn_first_p): Declare.J"orn Rennecke1-5/+4
* loop.h (loop_insn_first_p): Declare. * loop.c (loop_insn_first_p): No longer static. * unroll.c (iteration_info) Fix comparison to reg_iv_type->num_elements. Before accessing reg_biv_class, check index against max_reg_before_loop. Fix and enable code for giv iterators. (loop_iterations): Compare with reg_iv_type->num_elements instead of with max_reg_before_loop. From-SVN: r25401
1999-02-03loop.h (express_from): Declare.J"orn Rennecke1-2/+3
* loop.h (express_from): Declare. (struct induction): Replace derived flag with derived_from pointer. * loop.c (strength_reduce, record_giv, recombine_givs): Likewise. (express_from): No longer static. * unroll.c (find_splittable_givs): Replace derived with derived_from. When processing an address giv with which another giv has been combined that has also been derived from a third giv, handle like having combined with the third giv. Set splittable_regs_updates appropriately for derived givs. From-SVN: r25007
1999-01-28Happy new year.Joern Rennecke1-1/+1
From-SVN: r24896
1999-01-27rtl.h (insn_first_p): Declare.J"orn Rennecke1-4/+23
* rtl.h (insn_first_p): Declare. * rtlanal.c (insn_first_p): New function. * loop.h (varray.h): Include. (struct induction): Change combined_with to unsigned. New members derived, ix and last_use. (reg_iv_type, reg_iv_info): Now varray_type. All references changed. (REG_IV_TYPE, REG_IV_INFO): Define. (first_increment_giv, last_increment_giv): Declare. * loop.c (loop_number_loop_cont): New static variable. (loop_number_cont_dominator): Likewise. (reg_iv_type, reg_iv_info): Now varray_type. (first_increment_giv, last_increment_giv): New variables. (compute_luids, verify_dominator, find_life_end): New functions. (cmp_recombine_givs_stats, recombine_givs): Likewise. (loop_optimize): Allocate loop_number_loop_cont and loop_number_cont_dominator. Use compute_luids. (find_and_verify_loops): Initialize loop_number_loop_cont and loop_number_cont_dominator. (strength_reduce): Try to find bivs that can be expressed as givs of another biv, and to convert biv increments into givs. Call recombine_givs. Handle derived givs. (record_biv): New argument location. All callers changed. (record_giv): Initialize derived and last_use fields. (basic_induction_var): New argument location. All callers changed. (combine_givs): Don't combine a DEST_REG giv with a DEST_ADDR giv. Increment combined_with instead of setting to 1. * unroll.c (derived_regs): New static variable. (unroll_loop): Initialize it. Allocate local_regno according to max_reg_num. (copy_loop_body): Cope with derived givs. (find_splittable_givs): Check for Givs made from biv increments. Set derived_regs for givs. * Makefile.in (stmt.o, loop.o, unroll.o): Depend on loop.h . From-SVN: r24889
1998-12-15loop.h (loop_info): New field 'vtop'.Michael Hayes1-1/+3
* loop.h (loop_info): New field 'vtop'. * loop.c (check_dbra_loop): Use loop_info->vtop rather than scanning loop for vtop. * unroll.c (subtract_reg_term, find_common_reg_term): New functions. (loop_iterations): Use them to determine if loop has a constant number of iterations. Set loop_info->vtop. Don't subtract common reg term from initial_value and final_value if have a do-while loop. From-SVN: r24333
1998-12-15loop.h (struct induction): Delete times_used member.J"orn Rennecke1-1/+0
* loop.h (struct induction): Delete times_used member. * loop.c (n_times_set): Rename to set_in_loop. Changed all users. (n_times_used): Rename to n_times_set. Changed all users. (scan_loop): Free reg_single_usage before strength reduction. (record_giv, combine_givs): Remove handling of times_used member. (combine_givs_used_once): Rename to: (combine_givs_used_by_other) . Changed all callers. From-SVN: r24324
1998-11-25loop.h (precondition_loop_p): Added new mode argument.Michael Hayes1-1/+2
* loop.h (precondition_loop_p): Added new mode argument. * unroll.c (precondition_loop_p): Likewise. (approx_final_value): Function deleted and subsumed into loop_iterations. (loop_find_equiv_value): New function. (loop_iterations): Use loop_find_equiv_value to find increments too large to be immediate constants. Also use it to find terms common to initial and final iteration values that can be removed. From-SVN: r23885
1998-11-25loop.h (struct loop_info): Define new structure.Michael Hayes1-13/+46
* loop.h (struct loop_info): Define new structure. (precondition_loop_p): Added prototype. (unroll_loop): Added new argument loop_info to prototype. (final_biv_value, final_giv_value): Added new argument n_iterations to prototype. * loop.c (strength_reduce): Declare new structure loop_iteration_info and new pointer loop_info. (loop_n_iterations): Replace global variable by element in loop_info structure. (check_final_value): New argument n_iterations. (insert_bct): New argument loop_info. (loop_unroll_factor): Replace global array by element in loop_info structure. (loop_optimize): Remove code to allocate and initialise loop_unroll_factor_array. * unroll.c (precondition_loop_p): No longer static since used by branch on count optimization. (precondition_loop_p, unroll_loop): New argument loop_info. (final_biv_value, final_giv_value, find_splittable_regs): New argument n_iterations. (loop_iteration_var, loop_initial_value, loop_increment, loop_final_value, loop_comparison_code, loop_unroll_factor): Replaced global variables by loop_info structure. (loop_unroll_factor): Replace global array by element in loop_info structure. From-SVN: r23884
1998-10-05unroll.c (loop_iteration_var, [...]): No longer static.David Edelsohn1-6/+9
* unroll.c (loop_iteration_var, loop_initial_value, loop_increment loop_final_value, loop_comparison_code): No longer static. (unroll_loop): Delete loop_start_value update. * loop.h (loop_iteration_var, loop_initial_value, loop_increment, loop_final_value, loop_comparison_code): Extern. (loop_start_value): Delete extern. * loop.c (loop_can_insert_bct, loop_increment, loop_start_value, loop_comparison_value, loop_comparison_code): Delete. (loop_optimize): Remove initialization for deleted variables. (strength_reduce): Delete analyze_loop_iterations call. Only call insert_bct if flag_branch_count_on_reg set. (analyze_loop_iterations): Delete. (insert_bct): Remove iteration count calculation. Move checks for viable BCT optimization to here. Obtain iteration count from loop_iterations and correct for unrolling. Check for enough iteration to be beneficial. Comment out runtime iteration count case. (insert_bct): Print iteration count in dump file. Remove loop_var_mode and use word_mode directly. * rs6000.h (processor_type): Add PROCESSOR_PPC604e. * rs6000.c (rs6000_override_options): Use it. (optimization_options): Enable use of flag_branch_on_count_reg. * rs6000.md (define_function_unit): Describe 604e. From-SVN: r22852
1998-07-17loop.h (struct induction): Add no_const_addval.Richard Henderson1-0/+1
* loop.h (struct induction): Add no_const_addval. * loop.c (the_movables, reg_address_cost): New variables. (init_loop): Init reg_address_cost. (loop_optimize): Call end_alias_analysis. (scan_loop): Init the_movables. (record_giv): Init induction->no_const_addval. (basic_induction_var) [PLUS]: Use rtx_equal_p instead of ==. [REG]: Rearrange loop search test to catch more cases. (general_induction_var): Return success not benefit; take an extra argument for that. Change all callers. (simplify_giv_expr) [PLUS]: Always combine invariants. Use sge_plus. [MULT]: Use rtx_equal_p instead of ==. Combine simple invariants. [default]: Search the_movables for additional combinations. (sge_plus_constant, sge_plus): New functions. (express_from_1): New function. (express_from): Always define. Rewrite using express_from_1. (combine_givs_p): Handle more cases. Ignore address cost. (cmp_combine_givs_stats): New function. (combine_givs_used_once, combine_givs_benefit_from): New functions. (combine_givs): Rewrite to do best-fit combination. * fold-const.c (operand_equal_p): Handle RTL_EXPR. (fold): Do a complete (A*C)+(B*C) association check. From-SVN: r21263
1998-06-19Fix hpux loop unrolling bug reported by Tim Prince.Jim Wilson1-2/+2
* loop.h (struct induction): Clarify comment for unrolled field. * unroll.c (find_splittable_givs): Move set of unrolled field after address validity check. From-SVN: r20598
1997-09-21loop.c (loop_number): Delete function.Jeffrey A Law1-1/+0
* loop.c (loop_number): Delete function. Change all references to use uid_loop_num array. * loop.h (loop_number): Delete declaration. * unroll.c (unroll_loop): Change "loop_number" references to use uid_loop_num instead. Still cleaning up haifa. From-SVN: r15623
1997-09-21loop.c (loop_unroll_factor): Move outside #ifdef HAIFA conditional.Jeff Law1-2/+1
* loop.c (loop_unroll_factor): Move outside #ifdef HAIFA conditional. (loop_unroll_iter): Remove unused variable and all references. (loop_optimize): Always allocate and clear space for loop_unroll_factor. (insert_bct): Fix minor formatting problems. * loop.h (loop_unroll_factor): Move decl outside #ifdef HAIFA. (loop_unroll_iter): Removed unused decl. * unroll.c (unroll_loop): Remove code to set loop_unroll_iter. Always record the unrolling factor. More haifa cleanup From-SVN: r15621
1997-08-11* Integrate Haifa instruction scheduler.Jeffrey A Law1-0/+10
* Integrate regmove pass. See ChangeLog for deatils. From-SVN: r14770
1997-08-11* Integrate alias analysis changes from jfc@mit.eduJeffrey A Law1-0/+3
* 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
1996-01-24(struct induction): New fields always_executed andJim Wilson1-1/+5
auto_inc_opt. From-SVN: r11089
1995-07-14(loop_number_exit_count): Declare it.Richard Kenner1-1/+2
From-SVN: r10129
1995-06-15Update FSF address.Richard Kenner1-1/+2
From-SVN: r9961
1995-05-13(back_branch_in_range_p): Declare.Jim Wilson1-0/+1
From-SVN: r9676
1995-01-20(structure induction): Add new field same_insn.Jim Wilson1-0/+4
From-SVN: r8784
1993-03-19Add prototypes.Jim Wilson1-12/+12
From-SVN: r3794
1992-08-11(loop_number_first_block, loop_number_last_block,Jim Wilson1-6/+0
loop_number_block_level): Delete declarations. From-SVN: r1800
1992-07-06entered into RCSCharles Hannum1-3/+3
From-SVN: r1466
1992-05-07*** empty log message ***Richard Stallman1-1/+1
From-SVN: r930
1992-03-27*** empty log message ***Richard Kenner1-0/+3
From-SVN: r601
1992-03-14Initial revisionRichard Stallman1-0/+172
From-SVN: r471