diff options
author | Zdenek Dvorak <dvorakz@suse.cz> | 2005-03-22 23:08:53 +0100 |
---|---|---|
committer | Zdenek Dvorak <rakdver@gcc.gnu.org> | 2005-03-22 22:08:53 +0000 |
commit | cf5d1802f0e52e5216305f820310c65d03d27e14 (patch) | |
tree | 5448de2804cc76994e55daf1afdcd5fa16c6bbf3 /gcc/tree-ssa-loop-ivopts.c | |
parent | f77b6ca3da8ff2f43a31ef3ec15ab7428827a691 (diff) | |
download | gcc-cf5d1802f0e52e5216305f820310c65d03d27e14.zip gcc-cf5d1802f0e52e5216305f820310c65d03d27e14.tar.gz gcc-cf5d1802f0e52e5216305f820310c65d03d27e14.tar.bz2 |
tree-ssa-loop-ivopts.c (determine_iv_cost): Do not try to preserve artificial original candidates.
* tree-ssa-loop-ivopts.c (determine_iv_cost): Do not try to preserve
artificial original candidates.
From-SVN: r96894
Diffstat (limited to 'gcc/tree-ssa-loop-ivopts.c')
-rw-r--r-- | gcc/tree-ssa-loop-ivopts.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/tree-ssa-loop-ivopts.c b/gcc/tree-ssa-loop-ivopts.c index 877f5e4..2544fbc 100644 --- a/gcc/tree-ssa-loop-ivopts.c +++ b/gcc/tree-ssa-loop-ivopts.c @@ -3681,8 +3681,11 @@ determine_iv_cost (struct ivopts_data *data, struct iv_cand *cand) cand->cost = cost_step + cost_base / AVG_LOOP_NITER (current_loop); - /* Prefer the original iv unless we may gain something by replacing it. */ - if (cand->pos == IP_ORIGINAL) + /* Prefer the original iv unless we may gain something by replacing it; + this is not really relevant for artificial ivs created by other + passes. */ + if (cand->pos == IP_ORIGINAL + && !DECL_ARTIFICIAL (SSA_NAME_VAR (cand->var_before))) cand->cost--; /* Prefer not to insert statements into latch unless there are some |