diff options
author | Jan Hubicka <jh@suse.cz> | 2010-08-21 12:36:19 +0000 |
---|---|---|
committer | Jan Hubicka <jh@suse.cz> | 2010-08-21 12:36:19 +0000 |
commit | 2cef8ac23dab41fa008e890a222dd5410bb43761 (patch) | |
tree | a5bb59f19d8d091599bf4239efb438a415ce4c98 /gcc/ipa-pure-const.c | |
parent | 87307b646b86884f0f547b6403dbaec66df6fc36 (diff) |
* 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.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@163443 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ipa-pure-const.c')
-rw-r--r-- | gcc/ipa-pure-const.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/ipa-pure-const.c b/gcc/ipa-pure-const.c index 0e07e448295..e1d2f7eb3f2 100644 --- a/gcc/ipa-pure-const.c +++ b/gcc/ipa-pure-const.c @@ -427,7 +427,7 @@ worse_state (enum pure_const_state_e *state, bool *looping, /* Recognize special cases of builtins that are by themself not pure or const but function using them is. */ static bool -special_builtlin_state (enum pure_const_state_e *state, bool *looping, +special_builtin_state (enum pure_const_state_e *state, bool *looping, tree callee) { if (DECL_BUILT_IN_CLASS (callee) == BUILT_IN_NORMAL) @@ -510,7 +510,7 @@ check_call (funct_state local, gimple call, bool ipa) enum pure_const_state_e call_state; bool call_looping; - if (special_builtlin_state (&call_state, &call_looping, callee_t)) + if (special_builtin_state (&call_state, &call_looping, callee_t)) { worse_state (&local->pure_const_state, &local->looping, call_state, call_looping); @@ -1203,7 +1203,7 @@ propagate_pure_const (void) edge_looping = y_l->looping; } } - else if (special_builtlin_state (&edge_state, &edge_looping, + else if (special_builtin_state (&edge_state, &edge_looping, y->decl)) ; else |