aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Hubicka <hubicka@freesoft.cz>1999-12-17 13:19:41 +0000
committerJan Hubicka <hubicka@gcc.gnu.org>1999-12-17 13:19:41 +0000
commit1f01879e43f387d04e0b64fa5dd2689289cd6531 (patch)
tree91324cc0ede5677115953753d29cbf89cbce4862
parent833fc3ad2371e77287a7c2456b11d7da43f11d7c (diff)
downloadgcc-1f01879e43f387d04e0b64fa5dd2689289cd6531.zip
gcc-1f01879e43f387d04e0b64fa5dd2689289cd6531.tar.gz
gcc-1f01879e43f387d04e0b64fa5dd2689289cd6531.tar.bz2
* regclass.c (regclass): Do not use flowgraph when not optimizing.
From-SVN: r30993
-rw-r--r--gcc/ChangeLog2
-rw-r--r--gcc/regclass.c43
2 files changed, 26 insertions, 19 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 1728e84..8c3831e 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,7 @@
Fri Dec 17 12:08:11 MET 1999 Jan Hubicka <hubicka@freesoftr.cz>
+ * regclass.c (regclass): Do not use flowgraph when not optimizing.
+
* gcse.c (try_replace_reg): Do replacements in REG_EQUAL/REG_EQUIV
notes too, create one when replacement failed, attempt to simplify
resulting notes.
diff --git a/gcc/regclass.c b/gcc/regclass.c
index 3c28580..1ae876a 100644
--- a/gcc/regclass.c
+++ b/gcc/regclass.c
@@ -1070,30 +1070,35 @@ regclass (f, nregs, dump)
bzero (in_inc_dec, nregs);
#endif
- loop_cost = 1;
-
/* Scan the instructions and record each time it would
save code to put a certain register in a certain class. */
- for (index = 0; index < n_basic_blocks; index++)
+ if (!optimize)
{
- basic_block bb = BASIC_BLOCK (index);
-
- /* Show that an insn inside a loop is likely to be executed three
- times more than insns outside a loop. This is much more aggressive
- than the assumptions made elsewhere and is being tried as an
- experiment. */
- if (optimize_size)
- loop_cost = 1;
- else
- loop_cost = 1 << (2 * MIN (bb->loop_depth - 1, 5));
- for (insn = bb->head; ; insn = NEXT_INSN (insn))
- {
- insn = scan_one_insn (insn, pass);
- if (insn == bb->end)
- break;
- }
+ loop_cost = 1;
+ for (insn = f; insn; insn = NEXT_INSN (insn))
+ insn = scan_one_insn (insn, pass);
}
+ else
+ for (index = 0; index < n_basic_blocks; index++)
+ {
+ basic_block bb = BASIC_BLOCK (index);
+
+ /* Show that an insn inside a loop is likely to be executed three
+ times more than insns outside a loop. This is much more aggressive
+ than the assumptions made elsewhere and is being tried as an
+ experiment. */
+ if (optimize_size)
+ loop_cost = 1;
+ else
+ loop_cost = 1 << (2 * MIN (bb->loop_depth - 1, 5));
+ for (insn = bb->head; ; insn = NEXT_INSN (insn))
+ {
+ insn = scan_one_insn (insn, pass);
+ if (insn == bb->end)
+ break;
+ }
+ }
/* Now for each register look at how desirable each class is
and find which class is preferred. Store that in