summaryrefslogtreecommitdiffstats
path: root/gcc/cfgrtl.c
diff options
context:
space:
mode:
authorbernds <bernds@138bc75d-0d04-0410-961f-82ee72b054a4>2006-09-15 12:35:43 +0000
committerbernds <bernds@138bc75d-0d04-0410-961f-82ee72b054a4>2006-09-15 12:35:43 +0000
commitaa02fa1963ef7df326187a587503acd2e295281b (patch)
treed8379f7b3521123e3720bfa6fc21522b1fbdfddd /gcc/cfgrtl.c
parentff7e43ad7bf2ff340b3c889250262a4d617b7dee (diff)
downloadppe42-gcc-aa02fa1963ef7df326187a587503acd2e295281b.tar.gz
ppe42-gcc-aa02fa1963ef7df326187a587503acd2e295281b.zip
* cfgrtl.c (emit_insn_at_entry): New function.
* rtl.h (emit_insn_at_entry): Declare it. * integrate.c (emit_initial_value_sets): Use it. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@116968 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cfgrtl.c')
-rw-r--r--gcc/cfgrtl.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/cfgrtl.c b/gcc/cfgrtl.c
index b07bb9467eb..df281cb2d89 100644
--- a/gcc/cfgrtl.c
+++ b/gcc/cfgrtl.c
@@ -453,6 +453,20 @@ entry_of_function (void)
BB_HEAD (ENTRY_BLOCK_PTR->next_bb) : get_insns ());
}
+/* Emit INSN at the entry point of the function, ensuring that it is only
+ executed once per function. */
+void
+emit_insn_at_entry (rtx insn)
+{
+ edge_iterator ei = ei_start (ENTRY_BLOCK_PTR->succs);
+ edge e = ei_safe_edge (ei);
+ if (!(e->flags & EDGE_FALLTHRU))
+ abort ();
+
+ insert_insn_on_edge (insn, e);
+ commit_edge_insertions ();
+}
+
/* Update insns block within BB. */
void
OpenPOWER on IntegriCloud