summaryrefslogtreecommitdiff
path: root/gcc/loop.c
Commit message (Collapse)AuthorAgeFilesLines
* * loop.c (loop_optimize): Fix value max_uid_for_loop is resetamylaar1999-02-021-2/+3
| | | | | | | to after find_and_verify_loops call. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@24973 138bc75d-0d04-0410-961f-82ee72b054a4
* * (recombine_givs): Don't use a giv that's likely to be dead toamylaar1999-02-021-5/+21
| | | | | | | | | derive others. * loop.c (recombine_givs): Fix test for lifetime overlaps / loop wrap around when deriving givs. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@24967 138bc75d-0d04-0410-961f-82ee72b054a4
* * loop.c (recombine_givs): Dump recombination and derivation data.rth1999-01-311-0/+18
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@24948 138bc75d-0d04-0410-961f-82ee72b054a4
* * loop.c: Disable recent loop changes. Temporary as Joernlaw1999-01-301-1/+5
| | | | | | | continues to fix problems. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@24916 138bc75d-0d04-0410-961f-82ee72b054a4
* * loop.c (strength_reduce): Size reg_map according to reg_iv_type.amylaar1999-01-291-5/+9
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@24910 138bc75d-0d04-0410-961f-82ee72b054a4
* * loop.c (recombine_givs): Don't try to derive givs that have combined.amylaar1999-01-291-7/+4
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@24906 138bc75d-0d04-0410-961f-82ee72b054a4
* * toplev.c (notice, fnotice): Check ANSI_PROTOTYPES, not __STDC__,ghazi1999-01-291-1/+1
| | | | | | | | | when declaring arguments and calling va_arg() to initialize them. * collect2.c (notice): Likewise. * loop.c (find_life_end): Use PROTO() macro in the prototype. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@24905 138bc75d-0d04-0410-961f-82ee72b054a4
* * loop.c (strength_reduce): Fix HAVE_cc0 handling when scanningamylaar1999-01-291-3/+2
| | | | | | | forward from cont dominator. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@24903 138bc75d-0d04-0410-961f-82ee72b054a4
* * loop.c (strength_reduce): Grow set_in_loop / n_times_set /amylaar1999-01-281-4/+22
| | | | | | | | | | may_not_optimize to proper size when converting biv increments into givs. If necessary, reallocate reg_iv_type / reg_iv_info before calling recombine_givs. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@24898 138bc75d-0d04-0410-961f-82ee72b054a4
* * loop.c (recombine_givs): New parameter unroll_p. If set, don'tamylaar1999-01-281-5/+16
| | | | | | | | | generate complex adds. Changed caller. Don't generate adds that cost more than the original one. (strength_reduce): Warning fixes. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@24895 138bc75d-0d04-0410-961f-82ee72b054a4
* * rtl.h (insn_first_p): Declare.amylaar1999-01-271-65/+893
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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 . git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@24889 138bc75d-0d04-0410-961f-82ee72b054a4
* * loop.c (NUM_STORES): Delete.law1999-01-201-37/+23
| | | | | | | | | | | (loop_store_mems): Turn into an EXPR_LIST of MEMs. (prescan_loop): Properly initialize loop_mems_idx. (note_addr_stored): Simplify using list structure instead of fixed sized array. (invariant_p, check_dbra_loop, load_mems): Similarly. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@24782 138bc75d-0d04-0410-961f-82ee72b054a4
* * rtl.h (rtx_def): Update documentation.mmitchel1999-01-191-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (MEM_IN_STRUCT_P): Likewise. (MEM_SCALAR_P): New macro. (MEM_COPY_ATTRIBUTES): Likewise. (MEM_SET_IN_STRUCT_P): Likewise. * rtl.texi (MEM_SCALAR_P): Document. * alias.c (canon_rtx): Use MEM_COPY_ATTRIBUTES. (fixed_scalar_and_varying_struct_p): New function. Use MEM_SCALAR_P rather than !MEM_IN_STRUCT_P. (aliases_everything_p): Likewise. (true_dependence): Use them. (write_dependence_p): New function, containing code common to anti_dependence and output_dependence. (anti_dependence): Use it. (output_dependence): Likewise. * calls.c (save_fixed_argument_area): Don't clear MEM_IN_STRUCT_P. (expand_call): Use MEM_SET_IN_STRUCT_P. (emit_library_call): Don't clear MEM_IN_STRUCT_P. (emit_library_call_value): Likewise. (store_one_arg): Use MEM_SET_IN_STRUCT_P. * combine.c (simplify_rtx): Use MEM_COPY_ATTRIBUTES. (make_extraction): Likewise. (simplify_shift_const): Likewise. (gen_lowpart_for_combine): Likewise. * cse.c (gen_lowpart_if_possible): Use MEM_COPY_ATTRIBUTES. * emit-rtl.c (operand_subword): Likewise. (change_address): Likewise. * explow.c (stabilize): Use MEM_COPY_ATTRIBUTES. * expr.c (protect_from_queue): Use MEM_COPY_ATTRIBUTES. (emit_group_store): Use MEM_SET_IN_STRUCT_P. (copy_blkmode_from_reg): Likewise. (store_field): Likewise. (expand_expr): Remove bogus guesswork setting MEM_IN_STRUCT_P heuristically. Use MEM_SET_IN_STRUCT_P. (get_memory_rtx): Likewise. * final.c (alter_subreg): Use MEM_COPY_ATTRIBUTES. * function.c (assign_stack_temp): Clear MEM_SCALAR_P and MEM_ALIAS_SET on newly returned MEMs. (assign_temp): Use MEM_SET_IN_STRUCT_P. (put_reg_into_stack): Likewise. (fixup_var_refs1): Use MEM_COPY_ATTRIBUTES. (gen_mem_addressof): Use MEM_SET_IN_STRUCT_P. (assign_parms): Likewise. (expand_function): Likewise. * integrate.c (expand_inline_function): Likewise. (copy_rtx_and_substitute): Use MEM_COPY_ATTRIBUTES. * loop.c (note_addr_stored): Remove check on MEM_IN_STRUCT_P. * optabs.c (gen_move_insn): Use MEM_COPY_ATTRIBUTES. * print-rtl.c (print_rtx): Print /f for frame_related. * recog.c (validate_replace_rtx_1): Use MEM_COPY_ATTRIBUTES. * reload1.c (reload): Copy MEM_SCALAR_P as well. * stmt.c (expand_decl): Use MEM_SET_IN_STRUCT_P. (expand_anon_union_decl): Use MEM_COPY_ATTRIBUTES. * varasm.c (make_decl_rtl): Use MEM_SET_IN_STRUCT_P. (output_constant_def): Likewise. * a29k.c (a29k_set_memflags_1): Take scalar_p. Set MEM_SCALAR_P. (a29k_set_memflags): Use it. * alpha.c (get_aligned_mem): Use MEM_COPY_ATTRIBUTES. * c4x.c (c4x_scan_for_ld): Likewise. * h8300.c (fix_bit_operand): Likewise. * m88k.c (legitimize_address): Likewise. (block_move_loop): Likewise. (block_move_no_loop): Likewise. (block_move_sequence): Likewise. (m88k_builtin_saveregs): Use MEM_SET_IN_STRUCT_P. * mips/abi64.h (SETUP_INCOMING_VARARGS): Likewise. * rs6000.c (expand_block_move_insn): Use MEM_COPY_ATTRIBUTES. * sh.c (sh_builtin_saveregs): Use MEM_SET_IN_STRUCT_P. * arm.h (arm_gen_load_multiple): Take scalar_p. (arm_store_load_multiple): Likewise. * arm.c (arm_gen_load_multiple): Likewise. (arm_gen_store_multiple): Likewise. (arm_gen_movstrqi): Treat MEM_SCALAR_P like MEM_IN_STRUCT_P. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@24759 138bc75d-0d04-0410-961f-82ee72b054a4
* Warning fixes:ghazi1999-01-181-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | * loop.c (insert_bct): Hide the definition of variables `increment_direction', `compare_direction', `add_iteration' and `loop_var_mode'. * recog.c (mode_dependent_address_p): Mark parameter `addr' with ATTRIBUTE_UNUSED. Mark label `win' with ATTRIBUTE_UNUSED_LABEL. (mode_independent_operand): Mark label `lose' with ATTRIBUTE_UNUSED_LABEL. * regclass.c (n_occurrences): Remove prototype and definition. * reload.c (find_reloads_address_1): Mark variable `tem' with ATTRIBUTE_UNUSED. * reload1.c (reload): Cast the first two arguments of `bcopy' to PTR. * sbitmap.c (sbitmap_copy): Likewise. * scan-decls.c (scan_decls): Hide label `handle_comma'. * toplev.c (output_lang_identify): Mark prototype with ATTRIBUTE_UNUSED. * tree.c (make_node): Cast the first argument of `bzero' to PTR. (make_tree_vec): Likewise. (build1): Likewise. * varasm.c (assemble_static_space): Mark variable `tem' with ATTRIBUTE_UNUSED. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@24740 138bc75d-0d04-0410-961f-82ee72b054a4
* Fix copyrights.law1999-01-061-1/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@24529 138bc75d-0d04-0410-961f-82ee72b054a4
* * optabs.c (emit_cmp_insn): Abort if asked to emit non-canonical RTLlaw1999-01-031-4/+3
| | | | | | | | | | | | | for a target with HAVE_cc0 defined. (emit_cmp_and_jump_insns): New function. * expr.h (emit_cmp_and_jump_insns): Prototype it. * loop.c (check_dbra_loop): Use it to replace calls to emit_cmp_insn and emit_jump_insn and to canonicalise the comparison if necessary. * unroll.c (unroll_loop): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@24471 138bc75d-0d04-0410-961f-82ee72b054a4
* * loop.c (check_dbra_loop): While reversing the loop, if thelaw1998-12-301-2/+6
| | | | | | | | comparison value has a VOID mode use the mode of the other operand to compute the mask. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@24444 138bc75d-0d04-0410-961f-82ee72b054a4
* Warning fixes:ghazi1998-12-231-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@24403 138bc75d-0d04-0410-961f-82ee72b054a4
* * loop.c (combine_givs_used_by_other): Don't depend on n_times_set.amylaar1998-12-171-4/+0
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@24351 138bc75d-0d04-0410-961f-82ee72b054a4
* * loop.c (consec_sets_giv): New argument last_consec_insn.amylaar1998-12-151-16/+9
| | | | | | | (strength_reduce): Provide / use it. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@24335 138bc75d-0d04-0410-961f-82ee72b054a4
* * loop.h (loop_info): New field 'vtop'.m.hayes1998-12-151-22/+2
| | | | | | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@24333 138bc75d-0d04-0410-961f-82ee72b054a4
* * loop.h (struct induction): Delete times_used member.amylaar1998-12-151-63/+62
| | | | | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@24324 138bc75d-0d04-0410-961f-82ee72b054a4
* * loop.c (strength_reduce): If scan_start points to the loop exitamylaar1998-12-081-5/+13
| | | | | | | | | | test, be wary of subversive use of gotos inside expression statements. Don't set maybe_multiple for a backward jump that does not include the label under consideration into its range. * unroll.c (biv_total_increment): Make use of maybe_multiple field. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@24196 138bc75d-0d04-0410-961f-82ee72b054a4
* * loop.c (check_dbra_loop): Fix initial_value and initial_equiv_valuelaw1998-12-071-2/+2
| | | | | | | | in the loop_info structure. Should fix -O1 -funroll-loops bootstrap problems. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@24146 138bc75d-0d04-0410-961f-82ee72b054a4
* * loop.c (check_dbra_loop): New argument loop_info. Update fieldslaw1998-12-061-3/+13
| | | | | | | as needed. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@24131 138bc75d-0d04-0410-961f-82ee72b054a4
* * loop.h (struct loop_info): Define new structure.m.hayes1998-11-251-41/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@23884 138bc75d-0d04-0410-961f-82ee72b054a4
* * loop.c (check_dbra_loop): Update JUMP_LABEL field of jump insnm.hayes1998-11-251-6/+8
| | | | | | | | | when loop reversed. * unroll.c (precondition_loop_p): Return loop_initial_value for initial_value instead of loop_iteration_var. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@23881 138bc75d-0d04-0410-961f-82ee72b054a4
* * cse.c (fold_rtx): Make autoincrement addressing mode tests belaw1998-11-241-6/+10
| | | | | | | | | | | | | | | | | | | 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@23837 138bc75d-0d04-0410-961f-82ee72b054a4
* law1998-11-211-4/+8
| | | | | | | * loop.c (check_dbra_loop): Avoid using gen_add2_insn. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@23745 138bc75d-0d04-0410-961f-82ee72b054a4
* * loop.c (move_movables): Start of libcall might be new loop start.amylaar1998-11-201-0/+2
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@23738 138bc75d-0d04-0410-961f-82ee72b054a4
* * loop.c (loop_has_tablejump): New variable.dje1998-10-231-17/+21
| | | | | | | | | | | | (prescan_loop): Scan for it. (insert_bct): Replace explicit scan with use of it. * regclass.c (regclass): Restore loop variable j. (record_reg_classes): Deterine op_types modifiers and initialize classes[i] before matching constraints. Handle matching constraints 5-9. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@23263 138bc75d-0d04-0410-961f-82ee72b054a4
* * loop.c (express_from): Make sure that when generating a PLUS oflaw1998-10-221-1/+12
| | | | | | | a PLUS, any constant expression appears on the outermost PLUS. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@23226 138bc75d-0d04-0410-961f-82ee72b054a4
* Fix dumb thinko.law1998-10-191-3/+3
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@23181 138bc75d-0d04-0410-961f-82ee72b054a4
* * loop.c (scan_loop): Be more selective about what invariants arelaw1998-10-191-15/+6
| | | | | | | moved out of a loop. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@23178 138bc75d-0d04-0410-961f-82ee72b054a4
* - recommit bct_p ATTRIBUTE_UNUSED change which somehow failed.dje1998-10-151-1/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@23116 138bc75d-0d04-0410-961f-82ee72b054a4
* * loop.c (strength_reduce): Undo Oct 14 change marking bct_pdje1998-10-151-1/+1
| | | | | | | ATTRIBUTE_UNUSED. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@23107 138bc75d-0d04-0410-961f-82ee72b054a4
* Warning fixes:ghazi1998-10-141-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Makefile.in (sched.o): Depend on recog.h. * alias.c (REG_BASE_VALUE): Cast the result of REGNO() macro to (unsigned) when comparing against one. (find_base_value): Likewise. (record_base_value): Cast variable `regno' to (unsigned) when comparing against one. Cast the result of REGNO() macro to (unsigned) when comparing against one. (memrefs_conflict_p): Change type of variables `r_x' and `r_y' to unsigned. (init_alias_analysis): Add unsigned variable `ui'. Use it as loop variable where an unsigned index is needed. * caller-save.c (init_caller_save): Cast `-1' to (enum insn_code) before comparing against one. * collect2.c: Add prototypes for functions `error', `fatal' and `fatal_perror'. Make these functions take variable arguments instead of faking it with a fixed number of args. (write_c_file_stat): Cast the argument of ctype macro to (unsigned char). * combine.c (can_combine_p): Mark parameter `pred' with ATTRIBUTE_UNUSED. (find_split_point): Cast variable `src' to (unsigned HOST_WIDE_INT) when comparing against one. HOST_WIDE_INT) when comparing against one. (simplify_rtx): Cast 1 to (unsigned HOST_WIDE_INT) in shift. (simplify_logical): Likewise. (force_to_mode): Cast result of INTVAL() macro to (unsigned HOST_WIDE_INT) when comparing against one. Cast 1 to (unsigned HOST_WIDE_INT) in shift. (simplify_and_const_int): Cast result of INTVAL() macro to `unsigned HOST_WIDE_INT' when comparing against one. (merge_outer_ops): Cast variable const0 to `unsigned HOST_WIDE_INT' when comparing against the result of GET_MODE_MASK() macro. (simplify_comparison): Likewise for variable `c0'. Cast variable `const_op' to `unsigned HOST_WIDE_INT' when comparing against one. Cast `1' to `unsigned HOST_WIDE_INT' in shift. Cast the result of `GET_MODE_MASK()/2' to `HOST_WIDE_INT' when comparing against one. Cast `1' to `unsigned HOST_WIDE_INT' in shift. Cast result of INTVAL() macro to `unsigned HOST_WIDE_INT' when comparing against one. (distribute_notes): Wrap variable `cc0_setter' in macro `HAVE_cc0'. config/mips/mips.c (gen_int_relational): Cast result of INTVAL() macro to `unsigned HOST_WIDE_INT' when comparing against one. (output_block_move): Cast `sizeof' expression to (int) when comparing against one. (function_arg): Cast BITS_PER_WORD to `unsigned' when comparing against one. (save_restore_insns): Cast `base_offset' to `long' to match format specifier in fprintf. * config/mips/mips.h (Pmode): Cast the result of `Pmode' macro to `enum machine_mode'. * flow.c (life_analysis_1): Remove unused variable `insn'. * gcc.c (translate_options): Move variables `j' and `k' into the scope in which they are used. Change their types to `size_t'. (set_spec): Cast the argument of ctype macro to `unsigned char'. (read_specs): Likewise. (process_command): Cast `sizeof' to (int) when comparing against one. (do_spec_1): Cast the argument of ctype macro to `unsigned char'. (handle_braces): Cast both sides of `==' expression to `long' to ensure sign matching. (main): Cast variable `i' to `int' when comparing against one. * gcov-io.h (__fetch_long): Change type of parameter `bytes' from int to size_t. Cast variable `i' to size_t when comparing against one. * genattrtab.c (convert_set_attr_alternative): Remove unused parameter `insn_code'. All callers changed. (convert_set_attr): Likewise. * genrecog.c (add_to_sequence): Cast result of XVECLEN() macro to size_t when comparing against one. Likewise for variable `len'. * global.c (global_alloc): Cast variable `max_regno' to size_t when comparing against one. Likewise for variable `max_allocno'. * jump.c (sets_cc0_p): Mark parameter `x' with ATTRIBUTE_UNUSED. * local-alloc.c (validate_equiv_mem_from_store): Mark parameter `set' with ATTRIBUTE_UNUSED. (find_free_reg): Cast `sizeof' expression to (int) when comparing against one. * loop.c (count_loop_regs_set): Remove unused variable `dest'. (strength_reduce): Mark parameter `bct_p' with ATTRIBUTE_UNUSED. (get_condition): Cast variable `const_val' to `unsigned HOST_WIDE_INT' when comparing against one. Cast unsigned expression to HOST_WIDE_INT when comparing against one. (insert_loop_mem): Mark parameter `data' with ATTRIBUTE_UNUSED. (load_mems_and_recount_loop_regs_set): Cast variable `nregs' to `unsigned' when comparing against one. * protoize.c (is_id_char): Change type of parameter `ch' to unsigned char. (munge_compile_params): Cast argument of ctype macro to (const unsigned char). (process_aux_info_file): Cast variable `aux_info_size' to int when comparing against one. (forward_to_next_token_char): Cast argument of ctype macro to `const unsigned char'. (edit_formals_lists): Likewise. (find_rightmost_formals_list): Likewise. (add_local_decl): Likewise. (add_global_decls): Likewise. (edit_fn_definition): Likewise. (do_cleaning): Likewise. (scan_for_missed_items): Likewise. (edit_file): Cast variable `orig_size' to (int) when comparing against one. (main): Cast argument of ctype macro to `const unsigned char'. * recog.c (const_int_operand): Mark parameter `mode' with ATTRIBUTE_UNUSED. * regclass.c (record_reg_classes): Change type of variable `c' to `unsigned char'. Cast `char' array index to `unsigned char'. * reload.c (push_secondary_reload): Cast argument to REG_CLASS_FROM_LETTER() macro to `unsigned char'. * reload1.c (calculate_needs): Cast `char' array index to `unsigned char'. (set_label_offsets): Change type of variable `i' to unsigned int. Cast result of XVECLEN() macro to unsigned when comparing against one. (mark_not_eliminable): Change type of variable `i' to unsigned. (order_regs_for_reload): Likewise. Cast `max_regno' to unsigned when comparing against one. (reload_as_needed): Cast macro NUM_ELIMINABLE_REGS to (int) when comparing against one. (choose_reload_regs): Hide unused label `fail'. (reload_cse_simplify_operands): Cast `char' array index to `unsigned char'. (reload_combine_note_store): Mark parameter `set' with ATTRIBUTE_UNUSED. Cast UNITS_PER_WORD to unsigned when comparing against one. (reload_cse_move2add): Remove unused variable `src2'. * sched.c: Include recog.h. (sched_note_set): Remove unused parameter `b'. All callers changed. (split_hard_reg_notes): Likewise for parameter `orig_insn'. (blockage_range): Cast result of UNIT_BLOCKED() macro to (int) when comparing against one. * stupid.c (stupid_find_reg): Mark parameter `changes_size' with ATTRIBUTE_UNUSED. Cast `sizeof' expression to (int) when comparing against one. * unroll.c (precondition_loop_p): Remove unused parameter `loop_end'. All callers changed. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@23079 138bc75d-0d04-0410-961f-82ee72b054a4
* Fri Oct 9 16:03:19 1998 Graham <grahams@rcp.co.uk>rth1998-10-091-2/+2
| | | | | | | | | | | | | | | | | | * flow.c (print_rtl_with_bb): Changed type of in_bb_p to match use. * gcc.c (add_preprocessor_option): Correct typo when allocating memory, sizeof() argument had one too many `*'. (add_assembler_option): Likewise. (add_linker_option): Likewise. * gcov.c (output_data): Likewise. * local-alloc.c (memref_used_between_p): Likewise. (update_equiv_regs): Likewise. * loop.c (strength_reduce): Likewise. * reg-stack.c (record_asm_reg_life): Likewise. (subst_asm_stack_reg): Likewise. * reorg.c (dbr_schedule): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@22964 138bc75d-0d04-0410-961f-82ee72b054a4
* * loop.c (insert_bct): Ensure loop_iteration_var non-zero before use.dje1998-10-091-2/+11
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@22955 138bc75d-0d04-0410-961f-82ee72b054a4
* Fix for powerpc/c4x problem with missed loop optimizations.wilson1998-10-081-5/+15
| | | | | | | | * loop.c (get_condition): Allow combine when either compare is VOIDmode. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@22922 138bc75d-0d04-0410-961f-82ee72b054a4
* * loop.c (count_one_set): Add prototype.law1998-10-071-0/+2
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@22886 138bc75d-0d04-0410-961f-82ee72b054a4
* * loop.c (count_one_set): New static function, broken out oflaw1998-10-061-64/+48
| | | | | | | | | | | | | | | count_loop_regs_set (count_loop_regs_set): Call it. * global.c (mark_reg_store): Handle clobbers here by not calling set_preference. (mark_reg_clobber): Just call mark_reg_store after ensuring SETTER is in fact a clobber. * integrate.c (process_reg_param): New function, broken out of expand_inline_function. (expand_inline_function): Call it. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@22875 138bc75d-0d04-0410-961f-82ee72b054a4
* * unroll.c (loop_iteration_var, loop_initial_value, loop_incrementdje1998-10-051-504/+205
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@22852 138bc75d-0d04-0410-961f-82ee72b054a4
* * loop.c (move_movables): Corrected threshold calculation forlaw1998-10-051-8/+4
| | | | | | | moved_once registers. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@22847 138bc75d-0d04-0410-961f-82ee72b054a4
* * loop.c (combine_givs_p): Fix test for identical givs.law1998-10-051-5/+5
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@22845 138bc75d-0d04-0410-961f-82ee72b054a4
* * loop.c (check_dbra_loop): Use a vanilla loop reversal if the biv islaw1998-09-301-3/+9
| | | | | | | used to compute a giv or as some other non-counting use. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@22684 138bc75d-0d04-0410-961f-82ee72b054a4
* * function.c (gen_mem_addressof): If the address REG ismmitchel1998-09-301-13/+25
| | | | | | | | | REG_USERVAR_P make the new REG be so also. * loop.c (scan_loop): Apply DeMorgan's laws and add documentation in an attempt to clarify slightly. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@22667 138bc75d-0d04-0410-961f-82ee72b054a4
* Fix typo that disabled loop unrolling for many targets.wilson1998-09-291-2/+2
| | | | | | | * loop.c (get_condition): Fix typo in May 9 change. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@22650 138bc75d-0d04-0410-961f-82ee72b054a4
* * toplev.c (rest_of_compilation): Set bct_p on second call todje1998-09-181-21/+22
| | | | | | | | | | | | | | | | | | | | | | | | loop_optimize. * loop.c (loop_optimize, scan_loop, strength_reduce): New argument bct_p. (strength_reduce): Only call analyze_loop_iterations and insert_bct if bct_p set. (check_dbra_loop): Fix typo. (insert_bct): Use word_mode instead of SImode. (instrument_loop_bct): Likewise. Do not delete iteration count condition code generation insn. Initialize iteration count before loop start. * rtl.h (loop_optimize): Update prototype. * ginclude/va-ppc.h (va_arg): longlong types in overflow area are not doubleword aligned. * rs6000.c (optimization_options): New function. (secondary_reload_class): Only call true_regnum for PSEUDO_REGs. * rs6000.h (OPTIMIZATION_OPTIONS): Define. (REG_ALLOC_ORDER): Allocate highest numbered condition regsiters first; cr1 can be used for FP record condition insns. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@22471 138bc75d-0d04-0410-961f-82ee72b054a4
* * loop.c (move_movables): While removing insn sequences, preservedavem1998-09-131-3/+20
| | | | | | | | the next pointer of the most recently deleted insn when we skip over a NOTE. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@22402 138bc75d-0d04-0410-961f-82ee72b054a4