summaryrefslogtreecommitdiff
path: root/gcc/bb-reorder.c
diff options
context:
space:
mode:
authorkkojima <kkojima@138bc75d-0d04-0410-961f-82ee72b054a4>2005-02-25 07:13:25 +0000
committerkkojima <kkojima@138bc75d-0d04-0410-961f-82ee72b054a4>2005-02-25 07:13:25 +0000
commitc249682abe113009bb2474ceb8212cbc59866edd (patch)
tree39c9ee1d5ea2b7c1775d477f89697282ae1cd77f /gcc/bb-reorder.c
parent7965079c602337756f37c5c82d6043d686b4700e (diff)
downloadgcc-c249682abe113009bb2474ceb8212cbc59866edd.tar.gz
PR rtl-optimization/20117
* bb-reorder.c (duplicate_computed_gotos): Don't duplicate the block including noncopyable insn. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@95533 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/bb-reorder.c')
-rw-r--r--gcc/bb-reorder.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/gcc/bb-reorder.c b/gcc/bb-reorder.c
index 23cdf095396..44a501161ab 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;
}