diff options
author | Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz> | 2004-09-14 10:05:46 +0200 |
---|---|---|
committer | Zdenek Dvorak <rakdver@gcc.gnu.org> | 2004-09-14 08:05:46 +0000 |
commit | 113d659afd84f30c2baff7da16adc4d56602f895 (patch) | |
tree | 5c0e5b9524b1674de9c53a236c486fe4455d642b /gcc/loop-iv.c | |
parent | d840495b15862ef5d62af317e76be37d71948540 (diff) | |
download | gcc-113d659afd84f30c2baff7da16adc4d56602f895.zip gcc-113d659afd84f30c2baff7da16adc4d56602f895.tar.gz gcc-113d659afd84f30c2baff7da16adc4d56602f895.tar.bz2 |
Makefile.in (loop-unroll.o): Add HASHTAB_H and RECOG_H dependency.
* Makefile.in (loop-unroll.o): Add HASHTAB_H and RECOG_H dependency.
* basic-block.h (struct reorder_block_def): Add copy_number field.
* cfgloop.h (biv_p): Declare.
* cfgloopmanip.c (duplicate_loop_to_header_edge): Set copy_number.
* common.opt (fsplit-ivs-in-unroller): New flag.
* loop-iv.c (biv_p): New function.
* loop-unroll.c: Include hashtab.h and recog.h.
(struct iv_to_split, struct split_ivs_info): New types.
(analyze_ivs_to_split, si_info_start_duplication, split_ivs_in_copies,
free_si_info, si_info_hash, si_info_eq, analyze_iv_to_split_insn,
determine_split_iv_delta, get_ivts_expr, allocate_basic_variable,
insert_base_initialization, split_iv): New functions.
(peel_loop_completely, unroll_loop_constant_iterations,
unroll_loop_runtime_iterations, peel_loop_simple, unroll_loop_stupid):
Use them.
* doc/invoke.texi (-fsplit-ivs-in-unroller): Document.
Co-Authored-By: Steven Bosscher <stevenb@suse.de>
From-SVN: r87487
Diffstat (limited to 'gcc/loop-iv.c')
-rw-r--r-- | gcc/loop-iv.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/loop-iv.c b/gcc/loop-iv.c index a7c43e3..ed06d1d 100644 --- a/gcc/loop-iv.c +++ b/gcc/loop-iv.c @@ -1183,6 +1183,24 @@ iv_analyze (rtx insn, rtx def, struct rtx_iv *iv) return iv->base != NULL_RTX; } +/* Checks whether definition of register REG in INSN a basic induction + variable. IV analysis must have been initialized (via a call to + iv_analysis_loop_init) for this function to produce a result. */ + +bool +biv_p (rtx insn, rtx reg) +{ + struct rtx_iv iv; + + if (!REG_P (reg)) + return false; + + if (last_def[REGNO (reg)] != insn) + return false; + + return iv_analyze_biv (reg, &iv); +} + /* Calculates value of IV at ITERATION-th iteration. */ rtx |