diff options
author | H.J. Lu <hjl@gcc.gnu.org> | 2010-05-10 07:02:43 -0700 |
---|---|---|
committer | H.J. Lu <hjl@gcc.gnu.org> | 2010-05-10 07:02:43 -0700 |
commit | 46044dd988812b122ba11b1d517f936eaeec4a52 (patch) | |
tree | 2fda4aa4952632a4263d4074b76f5bf5b41f4506 /gcc | |
parent | 6aaf13579feca751fe5dfffcca429b80a8170233 (diff) | |
download | gcc-46044dd988812b122ba11b1d517f936eaeec4a52.zip gcc-46044dd988812b122ba11b1d517f936eaeec4a52.tar.gz gcc-46044dd988812b122ba11b1d517f936eaeec4a52.tar.bz2 |
Nullify regno_allocno_map of the removed allocno.
gcc/
2010-05-10 H.J. Lu<hongjiu.lu@intel.com>
Vladimir Makarov<vmakarov@redhat.com>
PR rtl-optimization/44012
* ira-build.c (remove_unnecessary_allocnos): Nullify
regno_allocno_map of the removed allocno.
gcc/testsuite/
2010-05-10 H.J. Lu <hongjiu.lu@intel.com>
PR rtl-optimization/44012
* gcc.dg/pr44012.c: New.
From-SVN: r159223
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/ira-build.c | 4 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/pr44012.c | 58 |
4 files changed, 74 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7a03e15..86156f7 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2010-05-10 H.J. Lu<hongjiu.lu@intel.com> + Vladimir Makarov<vmakarov@redhat.com> + + PR rtl-optimization/44012 + * ira-build.c (remove_unnecessary_allocnos): Nullify + regno_allocno_map of the removed allocno. + 2010-05-10 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> * configure.ac (gcc_cv_ld_eh_gc_sections): Redirect objdump errors diff --git a/gcc/ira-build.c b/gcc/ira-build.c index 16909a9..c879efa 100644 --- a/gcc/ira-build.c +++ b/gcc/ira-build.c @@ -1978,6 +1978,10 @@ remove_unnecessary_allocnos (void) merged_p = true; ALLOCNO_LIVE_RANGES (a) = NULL; propagate_some_info_from_allocno (parent_a, a); + /* Remove it from the corresponding regno allocno + map to avoid info propagation of subsequent + allocno into this already removed allocno. */ + a_node->regno_allocno_map[regno] = NULL; finish_allocno (a); } } diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index b15c23fb..3208c84 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2010-05-10 H.J. Lu <hongjiu.lu@intel.com> + + PR rtl-optimization/44012 + * gcc.dg/pr44012.c: New. + 2010-05-10 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> * lib/lto.exp (lto_prune_vis_warns): Renamed to lto_prune_warns. diff --git a/gcc/testsuite/gcc.dg/pr44012.c b/gcc/testsuite/gcc.dg/pr44012.c new file mode 100644 index 0000000..bd255ba --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr44012.c @@ -0,0 +1,58 @@ +/* { dg-do compile } */ +/* { dg-options "-O -fgcse" } */ + +extern void fe (); + +extern int i; + +static inline void +FX (void (*f) ()) +{ + fe (); + (*f) (); +} + +static inline void +f4 () +{ + for (;;) + switch (i) + { + case 306: + FX (&fe); + break; + default: + return; + } +} + +static inline void +f3 () +{ + f4 (); + for (;;) + switch (i) + { + case 267: + FX (&f4); + break; + default: + return; + } +} + +static inline void +f2 () +{ + f3 (); + while (i) + FX (&f3); +} + +void +f1 () +{ + f2 (); + while (1) + FX (&f2); +} |