diff options
author | Andrew Pinski <andrew_pinski@playstation.sony.com> | 2006-12-12 22:45:25 +0000 |
---|---|---|
committer | Andrew Pinski <pinskia@gcc.gnu.org> | 2006-12-12 14:45:25 -0800 |
commit | 1f70491b9910eaa7dda71bb6e6d58cd6f212ec9e (patch) | |
tree | c9ee45c247f883b9ab539f9271bf2a207a589001 | |
parent | 0890b981c9051f9b94d9a481dcf5bfd0d80d2313 (diff) | |
download | gcc-1f70491b9910eaa7dda71bb6e6d58cd6f212ec9e.zip gcc-1f70491b9910eaa7dda71bb6e6d58cd6f212ec9e.tar.gz gcc-1f70491b9910eaa7dda71bb6e6d58cd6f212ec9e.tar.bz2 |
re PR tree-optimization/28624 (latent segfault in remove_phi_node)
2006-12-12 Andrew Pinski <andrew_pinski@playstation.sony.com>
PR tree-opt/28624
* tree-ssa-dom.c (eliminate_degenerate_phis): Use a temporary
bitmap for EXECUTE_IF_SET_IN_BITMAP.
From-SVN: r119802
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/tree-ssa-dom.c | 10 |
2 files changed, 15 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 531a1f9..0e5e595 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,11 @@ 2006-12-12 Andrew Pinski <andrew_pinski@playstation.sony.com> + PR tree-opt/28624 + * tree-ssa-dom.c (eliminate_degenerate_phis): Use a temporary + bitmap for EXECUTE_IF_SET_IN_BITMAP. + +2006-12-12 Andrew Pinski <andrew_pinski@playstation.sony.com> + PR tree-opt/28436 * tree.h (DECL_COMPLEX_GIMPLE_REG_P): Rename to ... (DECL_GIMPLE_REG_P): This. diff --git a/gcc/tree-ssa-dom.c b/gcc/tree-ssa-dom.c index 7bae33f..73ddc0a 100644 --- a/gcc/tree-ssa-dom.c +++ b/gcc/tree-ssa-dom.c @@ -2466,6 +2466,7 @@ static unsigned int eliminate_degenerate_phis (void) { bitmap interesting_names; + bitmap interesting_names1; /* Bitmap of blocks which need EH information updated. We can not update it on-the-fly as doing so invalidates the dominator tree. */ @@ -2482,6 +2483,7 @@ eliminate_degenerate_phis (void) Experiments have show we generally get better compilation time behavior with bitmaps rather than sbitmaps. */ interesting_names = BITMAP_ALLOC (NULL); + interesting_names1 = BITMAP_ALLOC (NULL); /* First phase. Eliminate degenerate PHIs via a dominator walk of the CFG. @@ -2503,7 +2505,12 @@ eliminate_degenerate_phis (void) unsigned int i; bitmap_iterator bi; - EXECUTE_IF_SET_IN_BITMAP (interesting_names, 0, i, bi) + /* EXECUTE_IF_SET_IN_BITMAP does not like its bitmap + changed during the loop. Copy it to another bitmap and + use that. */ + bitmap_copy (interesting_names1, interesting_names); + + EXECUTE_IF_SET_IN_BITMAP (interesting_names1, 0, i, bi) { tree name = ssa_name (i); @@ -2524,6 +2531,7 @@ eliminate_degenerate_phis (void) } BITMAP_FREE (interesting_names); + BITMAP_FREE (interesting_names1); if (cfg_altered) free_dominance_info (CDI_DOMINATORS); return 0; |