aboutsummaryrefslogtreecommitdiff
path: root/gcc/loop.h
AgeCommit message (Collapse)AuthorFilesLines
2003-04-07loop.h (REGNO_FIRST_LUID, [...]): Provide defaults for insns without luid.Zdenek Dvorak1-3/+8
* loop.h (REGNO_FIRST_LUID, REGNO_LAST_LUID): Provide defaults for insns without luid. From-SVN: r65354
2002-12-13c-decl.c: Fix a comment typo.Kazu Hirata1-1/+1
* c-decl.c: Fix a comment typo. * cfg.c: Likewise. * cfgcleanup.c: Likewise. * cfglayout.c: Likewise. * cfgrtl.c: Likewise. * c-typeck.c: Likewise. * dominance.c: Likewise. * dwarf2asm.c: Likewise. * dwarfout.c: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * final.c: Likewise. * flow.c: Likewise. * function.c: Likewise. * gcc.c: Likewise. * genautomata.c: Likewise. * integrate.c: Likewise. * loop.c: Likewise. * loop.h: Likewise. * output.h: Likewise. * profile.c: Likewise. * ra.h: Likewise. * reload1.c: Likewise. * reload.c: Likewise. * sched-rgn.c: Likewise. * stmt.c: Likewise. * tree.h: Likewise. * vmsdbgout.c: Likewise. From-SVN: r60085
2002-09-22dbxout.c: Follow spelling conventions.Kazu Hirata1-2/+2
* dbxout.c: Follow spelling conventions. * defaults.h: Likewise. * df.c: Likewise. * diagnostic.h: Likewise. * doloop.c: Likewise. * dwarf2out.c: Likewise. * dwarfout.c: Likewise. * emit-rtl.c: Likewise. * except.c: Likewise. * explow.c: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * expr.h: Likewise. * flags.h: Likewise. * flow.c: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * function.h: Likewise. * gcc.c: Likewise. * gcov-io.h: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * genattrtab.c: Likewise. * genconfig.c: Likewise. * genrecog.c: Likewise. * ggc-page.c: Likewise. * ggc.h: Likewise. * global.c: Likewise. * gthr-win32.h: Likewise. * integrate.c: Likewise. * jump.c: Likewise. * langhooks.c: Likewise. * langhooks.h: Likewise. * line-map.h: Likewise. * local-alloc.c: Likewise. * longlong.h: Likewise. * loop.c: Likewise. * loop.h: Likewise. From-SVN: r57406
2002-07-21loop.h (LOOP_AUTO_UNROLL): Rename from LOOP_FIRST_PASS.Richard Henderson1-1/+1
* loop.h (LOOP_AUTO_UNROLL): Rename from LOOP_FIRST_PASS. * loop.c (strength_reduce): Update. * toplev.c (rest_of_compilation): Do unrolling in the first loop pass, not the second. From-SVN: r55634
2002-07-20re PR rtl-optimization/7130 (miscompiled code for gcc-3.1 on ↵Alan Modra1-0/+3
powerpc-unknown-linux-gnu with -funroll-all-loops) PR optimization/7130 * loop.h (struct loop_info): Add "preconditioned". * unroll.c (unroll_loop): Set it. * doloop.c (doloop_modify_runtime): Correct count for unrolled loops. From-SVN: r55598
2002-05-30langhooks.c: Fix formatting.Kazu Hirata1-3/+3
* langhooks.c: Fix formatting. * langhooks.h: Likewise. * lcm.c: Likewise. * libgcc2.c: Likewise. * lists.c: Likewise. * local-alloc.c: Likewise. * loop.c: Likewise. * loop.h: Likewise. From-SVN: r54070
2002-05-16loop.h (struct loop_info): Add member has_prefetch.Janis Johnson1-0/+2
* loop.h (struct loop_info): Add member has_prefetch. * loop.c (PREFETCH_CONDITIONAL): Change default to 1. (prescan_loop): Initialize has_prefetch. (struct prefetch_info): Change prefetch_in_loop and prefetch_before_loop from bit fields to ints. (emit_prefetch_instructions): Several small fixes. (check_dbra_loop): Don't reverse loop that uses prefetch. From-SVN: r53524
2002-04-02re PR rtl-optimization/4311 (unrolling loops creates non-ending loop)Richard Henderson1-0/+1
PR opt/4311 * loop.h (LOOP_FIRST_PASS): New. * loop.c (strength_reduce): Mind it when deciding to unroll. * toplev.c (rest_of_compilation): Set it. From-SVN: r51798
2002-01-03rtl.h: Update copyright date.Graham Stott1-4/+4
* rtl.h: Update copyright date. (LOOP_MOVABLES): Fix typo. (LOOP_REGS): Likewise. (LOOP_IVS): Likewise. From-SVN: r48494
2001-12-13predict.c (estimate_probability): Reorganize opcode heuristics.Jan Hubicka1-0/+1
* predict.c (estimate_probability): Reorganize opcode heuristics. * predict.def (PRED_OPCODE_POSITIVE, PRED_OPCODE_NONEQUAL, PRED_FPOPCODE): New. * i386.c (override_options): Recognize various CPU variants and set SSE/MMX/3dNOW flags accordingly. * i386.h (MASK_MMX_SET, MASK_SSE_SET, MASK_SSE2_SET, MASK_3DNOW_SET, MASK_3DNOW_A_SET): New. (MASK_ACCUMULATE_OUTGOING_ARGS_SET): New. (MASK_NO_ACCUMULATE_OUTGOING_ARGS): Delete. (MASK_*): Renumber. (TARGET_FLAGS): Use new masks. (CPP_CPU_SPECS): Recognize new CPU variants. * invoke.texi (-mcpu): Update documentation. * flags.h (flag_prefetch_loop_arrays): Declare. * loop.h (LOOP_PREFETCH): Define new constant. * loop.c (strength_reduce): Call emit_prefetch_instructions. (MAX_PREFETCHES, PREFETCH_BLOCKS_BEFORE_LOOP_MAX, PREFETCH_BLOCKS_BEFORE_LOOP_MIN, PREFETCH_BLOCKS_IN_LOOP_MIN): New constants. (check_store_data): New structure. (check_store, emit_prefetch_instructions, rtx_equal_for_prefetch_p): New functions. * toplev.c: Include insn-flags.h. (flag_prefetch_loop_arrays): New global variable. (lang_independent_option): Add -fprefetch-loop-arrays. (rest_of_compilation) Pass LOOP_PREFETCH when flag_prefetch_loop_arrays is set. * Makefile.in (toplev.c): Depend on insn-flags.h. * invoke.texi (-fprefetch-loop-arrays): Document. * predict.c (estimate_probability): Distribute the loop exit probability according to number of exit edges. * cfgcleanup.c (insns_match_p): Break out from ...; (flow_find_cross_jump): ... here; (outgoing_edges_match): Add parameter MODE; attempt to match everything except for tablejumps. (try_crossjump_to_edge): Accept complex edges. (try_crossjump_bb): Likewise. From-SVN: r47969
2001-10-29loop.h (struct induction): Rename ext_dependant to ext_dependent.Joseph Myers1-1/+1
* loop.h (struct induction): Rename ext_dependant to ext_dependent. * loop.c: Change all uses. (check_ext_dependant_givs): Rename to check_ext_dependent_givs. All callers changed. * timevar.c (DEFTIMEVAR): Fix spelling of identifier__ parameter. From-SVN: r46620
2001-10-28ChangeLog.0, [...]: Fix spelling errors.Joseph Myers1-1/+1
* ChangeLog.0, ChangeLog.1, ChangeLog.2, ChangeLog.3, ChangeLog.4, ChangeLog.5, ChangeLog, FSFChangeLog.10, FSFChangeLog.11, c-common.c, c-common.h, c-parse.in, c-typeck.c, cfg.c, config.gcc, configure, configure.in, except.c, except.h, flow.c, function.c, gcc.c, gcse.c, genrecog.c, libgcc2.c, loop.c, loop.h, params.def, predict.def, predict.h, reg-stack.c, regmove.c, sched-deps.c, sched-int.h, sibcall.c, ssa.c, stringpool.c, toplev.c, tree.c, unroll.c: Fix spelling errors. From-SVN: r46595
2001-10-09acconfig.h: Fix comment formatting.Kazu Hirata1-1/+1
* acconfig.h: Fix comment formatting. * c-dump.h: Likewise. * c-tree.h: Likewise. * conditions.h: Likewise. * expr.h: Likewise. * function.h: Likewise. * gthr.h: Likewise. * hwint.h: Likewise. * integrate.h: Likewise. * intl.h: Likewise. * loop.h: Likewise. * optabs.h: Likewise. From-SVN: r46131
2001-08-22Makefile.in, [...]: replace "GNU CC" with "GCC".Lars Brinkhoff1-12/+12
* Makefile.in, alias.c, basic-block.h, bb-reorder.c, bitmap.c, bitmap.h, builtin-types.def, builtins.c, builtins.def, c-aux-info.c, c-common.c, c-common.def, c-common.h, c-convert.c, c-decl.c, c-dump.c, c-dump.h, c-errors.c, c-format.c, c-lang.c, c-lex.c, c-lex.h, c-parse.in, c-pragma.c, c-pragma.h, c-semantics.c, c-tree.h, c-typeck.c, caller-save.c, calls.c, collect2.c, collect2.h, combine.c, conditions.h, config.gcc, configure.frag, configure.in, conflict.c, convert.c, convert.h, cppspec.c, crtstuff.c, cse.c, cselib.c, cselib.h, dbxout.c, dbxout.h, defaults.h, dependence.c, df.c, df.h, diagnostic.c, diagnostic.h, doloop.c, dominance.c, dwarf.h, dwarf2.h, dwarf2asm.c, dwarf2asm.h, dwarf2out.c, dwarf2out.h, dwarfout.c, emit-rtl.c, errors.c, errors.h, except.c, except.h, exgettext, explow.c, expmed.c, expr.c, expr.h, final.c, fixproto, flags.h, flow.c, fold-const.c, fp-test.c, function.c, function.h, gbl-ctors.h, gcc.c, gcc.h, gcc.hlp, gccspec.c, gcov-io.h, gcse.c, genattr.c, genattrtab.c, gencheck.c, gencodes.c, genconfig.c, genemit.c, genextract.c, genflags.c, gengenrtl.c, genmultilib, genopinit.c, genoutput.c, genpeep.c, genrecog.c, gensupport.c, gensupport.h, ggc-callbacks.c, ggc-common.c, ggc-none.c, ggc-page.c, ggc-simple.c, ggc.h, global.c, graph.c, graph.h, gthr-aix.h, gthr-dce.h, gthr-posix.h, gthr-rtems.h, gthr-single.h, gthr-solaris.h, gthr-vxworks.h, gthr-win32.h, gthr.h, haifa-sched.c, halfpic.c, halfpic.h, hard-reg-set.h, hwint.h, ifcvt.c, input.h, insn-addr.h, integrate.c, integrate.h, jump.c, lcm.c, libgcc2.c, libgcc2.h, lists.c, local-alloc.c, loop.c, loop.h, machmode.def, machmode.h, main.c, mbchar.c, mbchar.h, mips-tdump.c, mips-tfile.c, mklibgcc.in, mkmap-flat.awk, mkmap-symver.awk, optabs.c, output.h, params.c, params.def, params.h, predict.c, predict.def, predict.h, prefix.c, prefix.h, print-rtl.c, print-tree.c, profile.c, protoize.c, read-rtl.c, real.c, real.h, recog.c, recog.h, reg-stack.c, regclass.c, regmove.c, regrename.c, regs.h, reload.c, reload.h, reload1.c, reorg.c, resource.c, resource.h, rtl.c, rtl.def, rtl.h, rtlanal.c, sbitmap.c, sbitmap.h, sched-deps.c, sched-ebb.c, sched-int.h, sched-rgn.c, sched-vis.c, sdbout.c, sdbout.h, sibcall.c, simplify-rtx.c, ssa-ccp.c, ssa-dce.c, ssa.c, ssa.h, stmt.c, stor-layout.c, stringpool.c, system.h, timevar.c, timevar.def, timevar.h, tlink.c, toplev.c, toplev.h, tree.c, tree.def, tree.h, tsystem.h, unroll.c, unwind-dw2-fde.c, unwind-dw2-fde.h, unwind-dw2.c, unwind-pe.h, unwind-sjlj.c, unwind.h, unwind.inc, varasm.c, varray.c, varray.h, xcoffout.c, xcoffout.h: replace "GNU CC" with "GCC". From-SVN: r45105
2001-05-11loop.h (struct movables): Remove `num'.Mark Mitchell1-2/+0
* loop.h (struct movables): Remove `num'. * loop.c (scan_loop): Don't set it. Use count_insns_in_loop. Adjust call to strength_reduce. (num_unmoved_movables): New function. (move_movables): Don't set movables->num. (strength_reduce): Compute the number of instructions in the loop here, rather than in the caller. (check_dbra_loop): Always clear reversible_mem_store if there are any memory sets. (loop_regs_scan): Don't count instructions here. (count_insn_in_loop): New function. From-SVN: r41966
2001-01-25loop.c (loop_call_insn_emit_before, [...]): New.Michael Hayes1-0/+2
* loop.c (loop_call_insn_emit_before, loop_call_insn_hoist): New. (loop_insn_emit_before): No longer static. (move_movables): Replace emit_insn_after with loop_insn_emit_after. (loop_givs_rescan, load_mems): Likewise. (check_dbra_loop): Replace emit_insn_before with loop_insn_emit_before. (maybe_eliminate_biv_1): (move_movables): Replace emit_call_insn_before with loop_call_insn_hoist. * loop.h (loop_insn_emit_before): Add. * unroll.c (copy_loop_body): Replace emit_insn_before with loop_insn_emit_before. From-SVN: r39260
2001-01-12loop.h: Remove wrong declaration of doloop_condition_get.Andreas Jaeger1-2/+2
* loop.h: Remove wrong declaration of doloop_condition_get. Co-Authored-By: Jan Hubicka <jh@suse.cz> From-SVN: r38952
2001-01-12loop.h (total_biv_increment): Constify iv_class pointer.Michael Hayes1-2/+3
* 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-2/+10
* 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-0/+1
* 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-05loop.h (struct loop_reg): New.Michael Hayes1-21/+26
* 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-01loop.h (struct iv): New.Michael Hayes1-32/+44
* 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-0/+1
* 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-6/+13
* 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.h (REGNO_FIRST_LUID, [...]): Define.Michael Hayes1-0/+4
* 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-0/+21
* 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-09-19Kill recombine_givs.Bernd Schmidt1-10/+0
From-SVN: r36536
2000-09-13loop.c: Fix formatting.Kazu Hirata1-32/+37
* loop.c: Fix formatting. * loop.h: Likewise. From-SVN: r36400
2000-09-11loop.h (LOOP_IVS): New macro.Michael Hayes1-12/+37
* 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-2/+45
* 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-11unroll.c (iteration_info): Subsume into loop_iterations.Michael Hayes1-0/+2
* unroll.c (iteration_info): Subsume into loop_iterations. * loop.h (loop_info): New field iv. From-SVN: r36334
2000-09-09loop.h (struct loop_mem_info): Move from loop.c (struct loop_info): Add ↵Michael Hayes1-0/+33
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-07loop.c (strength_reduce): Call check_ext_dependant_givs.Richard Henderson1-1/+4
* 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-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