diff options
author | bernds <bernds@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-09-15 12:35:43 +0000 |
---|---|---|
committer | bernds <bernds@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-09-15 12:35:43 +0000 |
commit | aa02fa1963ef7df326187a587503acd2e295281b (patch) | |
tree | d8379f7b3521123e3720bfa6fc21522b1fbdfddd /gcc/cfgrtl.c | |
parent | ff7e43ad7bf2ff340b3c889250262a4d617b7dee (diff) | |
download | ppe42-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.c | 14 |
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 |