summaryrefslogtreecommitdiffstats
path: root/gcc/cfgbuild.c
diff options
context:
space:
mode:
authordaney <daney@138bc75d-0d04-0410-961f-82ee72b054a4>2009-09-03 05:01:40 +0000
committerdaney <daney@138bc75d-0d04-0410-961f-82ee72b054a4>2009-09-03 05:01:40 +0000
commitbcc66782af23a6a40efd513ec5b7b1d6f6f6e44a (patch)
treebcd50e973902119516f03bdc0a265a1b5dc16135 /gcc/cfgbuild.c
parent34e5cced0545b23499caed535a6566a4026b9558 (diff)
downloadppe42-gcc-bcc66782af23a6a40efd513ec5b7b1d6f6f6e44a.tar.gz
ppe42-gcc-bcc66782af23a6a40efd513ec5b7b1d6f6f6e44a.zip
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@151361 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cfgbuild.c')
-rw-r--r--gcc/cfgbuild.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/cfgbuild.c b/gcc/cfgbuild.c
index 012bd0b6be7..6e941bf55e9 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))
OpenPOWER on IntegriCloud