+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-03 Diego Novillo <dnovillo@google.com>
* cgraph.c (cgraph_node_for_decl): New.
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))
return insn;
}
+/* Return the previous insn before INSN that is not a NOTE, but stop
+ the search before we enter another basic block. This routine does
+ not look inside SEQUENCEs. */
+
+rtx
+prev_nonnote_insn_bb (rtx insn)
+{
+ while (insn)
+ {
+ insn = PREV_INSN (insn);
+ if (insn == 0 || !NOTE_P (insn))
+ break;
+ if (NOTE_INSN_BASIC_BLOCK_P (insn))
+ return NULL_RTX;
+ }
+
+ return insn;
+}
+
/* Return the next insn after INSN that is not a DEBUG_INSN. This
routine does not look inside SEQUENCEs. */
extern rtx previous_insn (rtx);
extern rtx next_insn (rtx);
extern rtx prev_nonnote_insn (rtx);
+extern rtx prev_nonnote_insn_bb (rtx);
extern rtx next_nonnote_insn (rtx);
extern rtx next_nonnote_insn_bb (rtx);
extern rtx prev_nondebug_insn (rtx);
+2009-09-02 David Daney <ddaney@caviumnetworks.com>
+
+ * gcc.c-torture/compile/builtin_unreachable-1.c: New testcase.
+
2009-09-03 Diego Novillo <dnovillo@google.com>
* gcc.dg/gomp/combined-1.c: Adjust expected pattern.
--- /dev/null
+void bar (const char *);
+void foo (void)
+{
+ bar ("foo");
+ __builtin_unreachable ();
+}