diff options
author | amylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-01-27 15:45:50 +0000 |
---|---|---|
committer | amylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-01-27 15:45:50 +0000 |
commit | 8bd88b6883b641538011236292921dc243034205 (patch) | |
tree | 40543c10fc8ef8193cefb6be07456d72f2575894 /gcc/rtlanal.c | |
parent | 30a027d91e60897301fb652b689da757cf6157f6 (diff) | |
download | gcc-8bd88b6883b641538011236292921dc243034205.tar.gz |
* 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 .
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@24889 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/rtlanal.c')
-rw-r--r-- | gcc/rtlanal.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/gcc/rtlanal.c b/gcc/rtlanal.c index 645946da492..8983b5e2afd 100644 --- a/gcc/rtlanal.c +++ b/gcc/rtlanal.c @@ -326,6 +326,20 @@ no_labels_between_p (beg, end) return 1; } +/* Return 1 if in between BEG and END, exclusive of BEG and END, there is + no JUMP_INSN insn. */ + +int +no_jumps_between_p (beg, end) + rtx beg, end; +{ + register rtx p; + for (p = NEXT_INSN (beg); p != end; p = NEXT_INSN (p)) + if (GET_CODE (p) == JUMP_INSN) + return 0; + return 1; +} + /* Nonzero if register REG is used in an insn between FROM_INSN and TO_INSN (exclusive of those two). */ @@ -2187,3 +2201,20 @@ for_each_rtx (x, f, data) return 0; } + +/* INSN and REFERENCE are instructions in the same insn chain. + Return non-zero if INSN is first. */ +int +insn_first_p (insn, reference) + rtx insn, reference; +{ + rtx p, q; + + for (p = insn, q = reference; ; p = NEXT_INSN (p), q = NEXT_INSN (q)) + { + if (p == reference || ! q) + return 1; + if (q == insn || ! p) + return 0; + } +} |