diff options
author | sayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-03-21 22:11:11 +0000 |
---|---|---|
committer | sayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-03-21 22:11:11 +0000 |
commit | 5856543033ba7dc29cd9480a656e113389d413ff (patch) | |
tree | 28720a371b03ceef348c0a3e1f86dde7d551ed90 /gcc/bb-reorder.c | |
parent | 236ee1fdf721e568e7480e94cb3162bb25b6364f (diff) | |
download | gcc-5856543033ba7dc29cd9480a656e113389d413ff.tar.gz |
PR middle-end/20557
* bb-reorder.c (duplicate_computed_gotos): Use can_duplicate_block_p
to determine whether a block can be duplicated, rather than test
whether the block contains noncopyable insns ourselves.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@96836 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/bb-reorder.c')
-rw-r--r-- | gcc/bb-reorder.c | 25 |
1 files changed, 8 insertions, 17 deletions
diff --git a/gcc/bb-reorder.c b/gcc/bb-reorder.c index a94c9e4e468..b7223d7d1aa 100644 --- a/gcc/bb-reorder.c +++ b/gcc/bb-reorder.c @@ -2047,24 +2047,15 @@ duplicate_computed_gotos (void) int size = 0; FOR_BB_INSNS (bb, insn) - { - if (INSN_P (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; - } + if (INSN_P (insn)) + { + size += get_attr_length (insn); + if (size > max_size) + break; + } - if (size <= max_size) + if (size <= max_size + && can_duplicate_block_p (bb)) bitmap_set_bit (candidates, bb->index); } } |