diff options
author | Jan Hubicka <jh@suse.cz> | 2009-05-25 23:59:24 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2009-05-25 21:59:24 +0000 |
commit | 85057983ac31039dff4e0963b789ee6684351868 (patch) | |
tree | cd788cef35d8a937c0812e48a90dc01d40ef1a51 /gcc/except.c | |
parent | 01df5c8ae2b0d8b2bf7cfa4623b31866141e4ad1 (diff) | |
download | gcc-85057983ac31039dff4e0963b789ee6684351868.tar.gz |
cgraph.c (dump_cgraph_node): Dump size/time/benefit.
* cgraph.c (dump_cgraph_node): Dump size/time/benefit.
* cgraph.h (struct inline_summary): New filed self_wize,
size_inlining_benefit, self_time and time_inlining_benefit.
(struct cgraph_global_info): Replace insns by time ans size fields.
* ipa-cp (ipcp_cloning_candidate_p): Base estimate on size
(ipcp_estimate_growth, ipcp_insert_stage): Likewise.
(ipcp_update_callgraph): Do not touch function bodies.
* ipa-inline.c: Include except.h
(MAX_TIME): New constant.
(overall_insns): Remove.
(leaf_node_p): New.
(overall_size, max_benefit): New static variables.
(cgraph_estimate_time_after_inlining): New function.
(cgraph_estimate_size_after_inlining): Rewrite using benefits.
(cgraph_clone_inlined_nodes): Update size.
(cgraph_mark_inline_edge): Update size.
(cgraph_estimate_growth): Use size info.
(cgraph_check_inline_limits): Check size.
(cgraph_default_inline_p): Likewise.
(cgraph_edge_badness): Compute badness based on benefit and size cost.
(cgraph_decide_recursive_inlining): Check size.
(cgraph_decide_inlining_of_small_function): Update size; dump sizes and
times.
(cgraph_decide_inlining): Likewise.
(cgraph_decide_inlining_incrementally): Likewise; honor
PARAM_EARLY_INLINING_INSNS.
(likely_eliminated_by_inlining_p): New predicate.
(estimate_function_body_sizes): New function.
(compute_inline_parameters): Use it.
* except.c (must_not_throw_labels): New function.
* except.h (must_not_throw_labels): Declare.
* tree-inline.c (init_inline_once): Kill inlining_weigths
* tree-ssa-structalias.c: Avoid uninitialized warning.
* params.def (PARAM_MAX_INLINE_INSNS_SINGLE): Reduce to 300.
(PARAM_MAX_INLINE_INSNS_AUTO): Reduce to 60.
(PARAM_INLINE_CALL_COST): Remove.
(PARAM_EARLY_INLINING_INSNS): New.
From-SVN: r147852
Diffstat (limited to 'gcc/except.c')
-rw-r--r-- | gcc/except.c | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/gcc/except.c b/gcc/except.c index a698e8f1c5b..ff45a7e6d72 100644 --- a/gcc/except.c +++ b/gcc/except.c @@ -1039,6 +1039,43 @@ get_next_region_sharing_label (int region) return r->next_region_sharing_label->region_number; } +/* Return bitmap of all labels that are handlers of must not throw regions. */ + +bitmap +must_not_throw_labels (void) +{ + struct eh_region_d *i; + bitmap labels = BITMAP_ALLOC (NULL); + + i = cfun->eh->region_tree; + if (! i) + return labels; + + while (1) + { + if (i->type == ERT_MUST_NOT_THROW && i->tree_label + && LABEL_DECL_UID (i->tree_label) >= 0) + bitmap_set_bit (labels, LABEL_DECL_UID (i->tree_label)); + + /* If there are sub-regions, process them. */ + if (i->inner) + i = i->inner; + /* If there are peers, process them. */ + else if (i->next_peer) + i = i->next_peer; + /* Otherwise, step back up the tree to the next peer. */ + else + { + do { + i = i->outer; + if (i == NULL) + return labels; + } while (i->next_peer == NULL); + i = i->next_peer; + } + } +} + /* Set up EH labels for RTL. */ void |