diff options
author | Eric Christopher <echristo@gcc.gnu.org> | 2004-09-09 23:57:19 +0000 |
---|---|---|
committer | Eric Christopher <echristo@gcc.gnu.org> | 2004-09-09 23:57:19 +0000 |
commit | 1aee688e8a8973f17bb6f8e742ce42dc5c3c3316 (patch) | |
tree | 4b0cedb76131b1bdddcf9ce9906afb2c55e18908 /gcc | |
parent | 693ff889740046f8fc820993b89eab1589be65d7 (diff) | |
download | gcc-1aee688e8a8973f17bb6f8e742ce42dc5c3c3316.zip gcc-1aee688e8a8973f17bb6f8e742ce42dc5c3c3316.tar.gz gcc-1aee688e8a8973f17bb6f8e742ce42dc5c3c3316.tar.bz2 |
ra-colorize.c (reset_lists): Move variable declaration inside ENABLE_CHECKING to avoid unused variable...
2004-09-09 Eric Christopher <echristo@redhat.com>
* ra-colorize.c (reset_lists): Move variable declaration inside
ENABLE_CHECKING to avoid unused variable warnings when
not --enable-checking.
(check_colors): Ditto.
From-SVN: r87262
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 11 | ||||
-rw-r--r-- | gcc/ra-colorize.c | 34 |
2 files changed, 29 insertions, 16 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e1aa6e7..e1d5834 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2004-09-09 Eric Christopher <echristo@redhat.com> + + * ra-colorize.c (reset_lists): Move variable declaration inside + ENABLE_CHECKING to avoid unused variable warnings when + not --enable-checking. + (check_colors): Ditto. + 2004-09-09 Mike Stump <mrs@apple.com> * version.c (version_string): Bump to 4.0.0. @@ -25,7 +32,7 @@ 2004-09-09 Ulrich Weigand <uweigand@de.ibm.com> - * reload.c (find_reloads_address): Pass correct operand to + * reload.c (find_reloads_address): Pass correct operand to maybe_memory_address_p. 2004-09-09 Daniel Berlin <dberlin@dberlin.org> @@ -55,7 +62,7 @@ (dump_alias_stats): Ditto. * doc/passes.texi: Remove blurb about points-to analysis. * fortran/Make-lang.in: Remove tree-alias-*.o. - + 2004-09-09 Richard Sandiford <rsandifo@redhat.com> * genattrtab.c (write_insn_cases): New function, split out from diff --git a/gcc/ra-colorize.c b/gcc/ra-colorize.c index 829a2b7..fe963e4 100644 --- a/gcc/ra-colorize.c +++ b/gcc/ra-colorize.c @@ -210,7 +210,6 @@ void reset_lists (void) { struct dlist *d; - unsigned int i; gcc_assert (!WEBS(SIMPLIFY)); gcc_assert (!WEBS(SIMPLIFY_SPILL)); @@ -249,13 +248,17 @@ reset_lists (void) #ifdef ENABLE_CHECKING /* Sanity check, that we only have free, initial or precolored webs. */ - for (i = 0; i < num_webs; i++) - { - struct web *web = ID2WEB (i); - - gcc_assert (web->type == INITIAL || web->type == FREE - || web->type == PRECOLORED); - } + { + unsigned int i; + + for (i = 0; i < num_webs; i++) + { + struct web *web = ID2WEB (i); + + gcc_assert (web->type == INITIAL || web->type == FREE + || web->type == PRECOLORED); + } + } #endif free_dlist (&mv_worklist); free_dlist (&mv_coalesced); @@ -1260,7 +1263,7 @@ colorize_one_web (struct web *web, int hard) HARD_REG_SET bias; CLEAR_HARD_REG_SET (fat_colors); - + if (web->regno >= max_normal_pseudo) hard = 0; @@ -1973,11 +1976,11 @@ check_colors (void) struct web *web = id2web[i]; struct web *aweb = alias (web); struct conflict_link *wl; - int nregs, c; + int nregs; if (web->regno >= max_normal_pseudo) continue; - + switch (aweb->type) { case SPILLED: @@ -1996,9 +1999,12 @@ check_colors (void) } #ifdef ENABLE_CHECKING - /* The color must be valid for the original usable_regs. */ - for (c = 0; c < nregs; c++) - gcc_assert (TEST_HARD_REG_BIT (web->usable_regs, aweb->color + c)); + /* The color must be valid for the original usable_regs. */ + { + int c; + for (c = 0; c < nregs; c++) + gcc_assert (TEST_HARD_REG_BIT (web->usable_regs, aweb->color + c)); + } #endif /* Search the original (pre-coalesce) conflict list. In the current one some imprecise conflicts may be noted (due to combine() or |