diff options
author | jamborm <jamborm@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-05-20 10:18:10 +0000 |
---|---|---|
committer | jamborm <jamborm@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-05-20 10:18:10 +0000 |
commit | b39bfa08a41158d4b9151c5f0c856620f329ab62 (patch) | |
tree | c7a89b4084761b0c88e079e93dac65e6158c5343 /gcc/tree-mudflap.c | |
parent | cfe8c0c72af348722ac4fa7417a4632cc6ed7cdd (diff) | |
download | gcc-b39bfa08a41158d4b9151c5f0c856620f329ab62.tar.gz |
2009-05-20 Martin Jambor <mjambor@suse.cz>
* tree-flow.h (insert_edge_copies_seq): Undeclare.
(sra_insert_before): Likewise.
(sra_insert_after): Likewise.
(sra_init_cache): Likewise.
(sra_type_can_be_decomposed_p): Likewise.
* tree-mudflap.c (insert_edge_copies_seq): Copied here from tree-sra.c
* tree-sra.c (sra_type_can_be_decomposed_p): Made static.
(sra_insert_before): Likewise.
(sra_insert_after): Likewise.
(sra_init_cache): Likewise.
(insert_edge_copies_seq): Made static and moved upwards.
* tree-complex.c (extract_component): Added VIEW_CONVERT_EXPR switch
case.
* tree-flow-inline.h (contains_view_convert_expr_p): New function.
* ipa-prop.c (get_ssa_def_if_simple_copy): New function.
(determine_cst_member_ptr): Call get_ssa_def_if_simple_copy to skip
simple copies.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@147733 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-mudflap.c')
-rw-r--r-- | gcc/tree-mudflap.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/tree-mudflap.c b/gcc/tree-mudflap.c index 0c07b97c873..5f4f5ac0b29 100644 --- a/gcc/tree-mudflap.c +++ b/gcc/tree-mudflap.c @@ -447,6 +447,26 @@ execute_mudflap_function_ops (void) return 0; } +/* Insert a gimple_seq SEQ on all the outgoing edges out of BB. Note that + if BB has more than one edge, STMT will be replicated for each edge. + Also, abnormal edges will be ignored. */ + +static void +insert_edge_copies_seq (gimple_seq seq, basic_block bb) +{ + edge e; + edge_iterator ei; + unsigned n_copies = -1; + + FOR_EACH_EDGE (e, ei, bb->succs) + if (!(e->flags & EDGE_ABNORMAL)) + n_copies++; + + FOR_EACH_EDGE (e, ei, bb->succs) + if (!(e->flags & EDGE_ABNORMAL)) + gsi_insert_seq_on_edge (e, n_copies-- > 0 ? gimple_seq_copy (seq) : seq); +} + /* Create and initialize local shadow variables for the lookup cache globals. Put their decls in the *_l globals for use by mf_build_check_statement_for. */ |