aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2000-04-27 12:57:35 +0000
committerJan Hubicka <hubicka@gcc.gnu.org>2000-04-27 12:57:35 +0000
commit28b6b9b2d3a5141d5e9055ed884d5ddc5e5dc335 (patch)
tree172d402a32e47ad7c82ca5132277d43782e4df26 /gcc
parentaf4464eb46fd1fcec3a8f69b320fa069f3d179a0 (diff)
downloadgcc-28b6b9b2d3a5141d5e9055ed884d5ddc5e5dc335.zip
gcc-28b6b9b2d3a5141d5e9055ed884d5ddc5e5dc335.tar.gz
gcc-28b6b9b2d3a5141d5e9055ed884d5ddc5e5dc335.tar.bz2
* loop.c (load_mems) Don't use hard registers for the hoisting.
* unroll.c (unroll_loop): Avoid overflow in the n_iterations calculation; rename const_equiv array in the preconditioning code from loop_unroll to loop_unroll_precondition From-SVN: r33480
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/loop.c8
-rw-r--r--gcc/unroll.c4
3 files changed, 18 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index fc50eb9..5268b8f 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,11 @@
+Thu Apr 27 14:54:22 MET DST 2000 Jan Hubicka <jh@suse.cz>
+
+ * loop.c (load_mems) Don't use hard registers for the hoisting.
+
+ * unroll.c (unroll_loop): Avoid overflow in the n_iterations
+ calculation; rename const_equiv array in the preconditioning code
+ from loop_unroll to loop_unroll_precondition
+
2000-04-27 Richard Henderson <rth@cygnus.com>
* flow.c (struct propagate_block_info): Remove new_dead, new_live;
diff --git a/gcc/loop.c b/gcc/loop.c
index fe77b6b..02ac5d7 100644
--- a/gcc/loop.c
+++ b/gcc/loop.c
@@ -9887,7 +9887,13 @@ load_mems (loop)
{
if (CONSTANT_P (equiv->loc))
const_equiv = equiv;
- else if (GET_CODE (equiv->loc) == REG)
+ else if (GET_CODE (equiv->loc) == REG
+ /* Extending hard register lifetimes cuases crash
+ on SRC targets. Doing so on non-SRC is
+ probably also not good idea, since we most
+ probably have pseudoregister equivalence as
+ well. */
+ && REGNO (equiv->loc) >= FIRST_PSEUDO_REGISTER)
best_equiv = equiv;
}
/* Use the constant equivalence if that is cheap enough. */
diff --git a/gcc/unroll.c b/gcc/unroll.c
index aa8f3ee..6ecef32 100644
--- a/gcc/unroll.c
+++ b/gcc/unroll.c
@@ -385,6 +385,8 @@ unroll_loop (loop, insn_count, end_insert_before, strength_reduce_p)
return;
}
else if (loop_info->n_iterations > 0
+ /* Avoid overflow in the next expression. */
+ && loop_info->n_iterations < MAX_UNROLLED_INSNS
&& loop_info->n_iterations * insn_count < MAX_UNROLLED_INSNS)
{
unroll_number = loop_info->n_iterations;
@@ -906,7 +908,7 @@ unroll_loop (loop, insn_count, end_insert_before, strength_reduce_p)
map->reg_map = (rtx *) xmalloc (maxregnum * sizeof (rtx));
VARRAY_CONST_EQUIV_INIT (map->const_equiv_varray, maxregnum,
- "unroll_loop");
+ "unroll_loop_precondition");
global_const_equiv_varray = map->const_equiv_varray;
init_reg_map (map, maxregnum);