diff options
author | David Daney <ddaney@caviumnetworks.com> | 2009-09-03 05:01:40 +0000 |
---|---|---|
committer | David Daney <daney@gcc.gnu.org> | 2009-09-03 05:01:40 +0000 |
commit | 896aa4eae3cd9f463597e8717ac8722ff7050965 (patch) | |
tree | bcd50e973902119516f03bdc0a265a1b5dc16135 /gcc/cfgbuild.c | |
parent | 4537ec0c8652889bc6decbcf5647f889d2a14733 (diff) | |
download | gcc-896aa4eae3cd9f463597e8717ac8722ff7050965.zip gcc-896aa4eae3cd9f463597e8717ac8722ff7050965.tar.gz gcc-896aa4eae3cd9f463597e8717ac8722ff7050965.tar.bz2 |
cfgbuild.c (find_bb_boundaries): Split blocks containing a barrier.
2009-09-02 David Daney <ddaney@caviumnetworks.com>
* cfgbuild.c (find_bb_boundaries): Split blocks containing a
barrier.
* emit-rtl.c (prev_nonnote_insn_bb): New function.
* rtl.h (prev_nonnote_insn_bb): Declare it.
2009-09-02 David Daney <ddaney@caviumnetworks.com>
* gcc.c-torture/compile/builtin_unreachable-1.c: New testcase.
From-SVN: r151361
Diffstat (limited to 'gcc/cfgbuild.c')
-rw-r--r-- | gcc/cfgbuild.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/cfgbuild.c b/gcc/cfgbuild.c index 012bd0b..6e941bf 100644 --- a/gcc/cfgbuild.c +++ b/gcc/cfgbuild.c @@ -469,6 +469,13 @@ find_bb_boundaries (basic_block bb) make_edge (ENTRY_BLOCK_PTR, bb, 0); } + /* __builtin_unreachable () may cause a barrier to be emitted in + the middle of a BB. We need to split it in the same manner + as if the barrier were preceded by a control_flow_insn_p + insn. */ + if (code == BARRIER && !flow_transfer_insn) + flow_transfer_insn = prev_nonnote_insn_bb (insn); + /* In case we've previously seen an insn that effects a control flow transfer, split the block. */ if (flow_transfer_insn && inside_basic_block_p (insn)) |