diff options
author | Jan Hubicka <jh@suse.cz> | 2010-08-21 14:36:19 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2010-08-21 12:36:19 +0000 |
commit | 9e97ff6183dd75e8d0cd2831e87646f01d3b4171 (patch) | |
tree | a5bb59f19d8d091599bf4239efb438a415ce4c98 /gcc/ipa-prop.c | |
parent | 000eef232bb6480f70b68c48c7d689e958ee5059 (diff) | |
download | gcc-9e97ff6183dd75e8d0cd2831e87646f01d3b4171.zip gcc-9e97ff6183dd75e8d0cd2831e87646f01d3b4171.tar.gz gcc-9e97ff6183dd75e8d0cd2831e87646f01d3b4171.tar.bz2 |
tree-pass.h (pass_ipa_cdtor_merge): New function.
* tree-pass.h (pass_ipa_cdtor_merge): New function.
* cgraphunit.c (static_ctors, static_dtors): Move to ipa.c; make
heap allocated.
(record_cdtor_fn): Move to ipa.c; do not test for
have_ctors_dtors.
(build_cdtor): Move to ipa.c; add code avoiding construction
when target have ctors/dtors and there is only one ctor/dtor at given
priority.
(compare_ctor, compare_dtor): Move to ipa.c; use DECL_UID to stabilize sort;
reverse order of constructors.
(cgraph_build_cdtor_fns):Move to ipa.c; rename to build_cdtor_fns.
(cgraph_finalize_function): Do not call record_cdtor_fn.
(cgraph_finalize_compilation_unit): Do not call cgraph_build_cdtor_fns.
(cgraph_build_static_cdtor): Move to ipa.c.
* ipa.c: Include target.h and tree-iterator.h.
(cgraph_build_static_cdtor, static_ctors, static_dtors,
record_cdtor_fn, build_cdtor, compare_ctor, compare_dtor,
build_cdtor_fns, ipa_cdtor_merge, gate_ipa_cdtor_merge,
pass_ipa_cdtor_merge): New.
* passes.c (init_optimization_passes): Enqueue pass_ipa_cdtor_merge.
* ipa-prop.c (update_indirect_edges_after_inlining): Avoid out of bounds access.
From-SVN: r163443
Diffstat (limited to 'gcc/ipa-prop.c')
-rw-r--r-- | gcc/ipa-prop.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/ipa-prop.c b/gcc/ipa-prop.c index 83fdeae..99e59b0 100644 --- a/gcc/ipa-prop.c +++ b/gcc/ipa-prop.c @@ -1541,11 +1541,12 @@ update_indirect_edges_after_inlining (struct cgraph_edge *cs, struct cgraph_node *node, VEC (cgraph_edge_p, heap) **new_edges) { - struct ipa_edge_args *top = IPA_EDGE_REF (cs); + struct ipa_edge_args *top; struct cgraph_edge *ie, *next_ie, *new_direct_edge; bool res = false; ipa_check_create_edge_args (); + top = IPA_EDGE_REF (cs); for (ie = node->indirect_calls; ie; ie = next_ie) { |