diff options
author | Kaz Kojima <kkojima@gcc.gnu.org> | 2005-02-25 07:13:25 +0000 |
---|---|---|
committer | Kaz Kojima <kkojima@gcc.gnu.org> | 2005-02-25 07:13:25 +0000 |
commit | bd182be84e9c8ae8485ac7c392fa0b6678969e3c (patch) | |
tree | 39c9ee1d5ea2b7c1775d477f89697282ae1cd77f | |
parent | 2b5936fd6163727b4be123ac730457a2d752aa77 (diff) | |
download | gcc-bd182be84e9c8ae8485ac7c392fa0b6678969e3c.zip gcc-bd182be84e9c8ae8485ac7c392fa0b6678969e3c.tar.gz gcc-bd182be84e9c8ae8485ac7c392fa0b6678969e3c.tar.bz2 |
re PR rtl-optimization/20117 (duplicated labels in PIC)
PR rtl-optimization/20117
* bb-reorder.c (duplicate_computed_gotos): Don't duplicate
the block including noncopyable insn.
From-SVN: r95533
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/bb-reorder.c | 12 |
2 files changed, 17 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 436f078..a41808c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2005-02-25 Kaz Kojima <kkojima@gcc.gnu.org> + + PR rtl-optimization/20117 + * bb-reorder.c (duplicate_computed_gotos): Don't duplicate + the block including noncopyable insn. + 2005-02-24 Kazu Hirata <kazu@cs.umass.edu> * cse.c (delete_trivially_dead_insns): Speed up by minimizing diff --git a/gcc/bb-reorder.c b/gcc/bb-reorder.c index 23cdf09..44a5011 100644 --- a/gcc/bb-reorder.c +++ b/gcc/bb-reorder.c @@ -2050,7 +2050,17 @@ duplicate_computed_gotos (void) FOR_BB_INSNS (bb, insn) { if (INSN_P (insn)) - size += get_attr_length (insn); + { + /* If the insn isn't copyable, don't duplicate + the block. */ + if (targetm.cannot_copy_insn_p + && targetm.cannot_copy_insn_p (insn)) + { + size = max_size + 1; + break; + } + size += get_attr_length (insn); + } if (size > max_size) break; } |