aboutsummaryrefslogtreecommitdiff
path: root/gcc/ipa-inline-analysis.c
diff options
context:
space:
mode:
authorMartin Jambor <mjambor@suse.cz>2012-06-04 00:10:19 +0200
committerMartin Jambor <jamborm@gcc.gnu.org>2012-06-04 00:10:19 +0200
commit7b872d9e653928f1fbdc65310fa5cf8ee7b00f95 (patch)
treef93c114daf03955a690d8f6f80c567c720ca9874 /gcc/ipa-inline-analysis.c
parent7ac6a832c3122846bcd0aa81af47f0e62519da92 (diff)
downloadgcc-7b872d9e653928f1fbdc65310fa5cf8ee7b00f95.zip
gcc-7b872d9e653928f1fbdc65310fa5cf8ee7b00f95.tar.gz
gcc-7b872d9e653928f1fbdc65310fa5cf8ee7b00f95.tar.bz2
ipa-prop.h (ipa_get_jf_known_type_offset): New function.
2012-06-03 Martin Jambor <mjambor@suse.cz> * ipa-prop.h (ipa_get_jf_known_type_offset): New function. (ipa_get_jf_known_type_base_type): Likewise. (ipa_get_jf_known_type_component_type): Likewise. (ipa_get_jf_constant): Likewise. (ipa_get_jf_pass_through_formal_id): Likewise. (ipa_get_jf_pass_through_operation): Likewise. (ipa_get_jf_ancestor_offset): Likewise. (ipa_get_jf_ancestor_type): Likewise. (ipa_get_jf_ancestor_formal_id): Likewise. (ipa_get_jf_member_ptr_pfn): Likewise. * ipa-prop.c (ipa_set_jf_known_type): New function. (ipa_set_jf_constant): Likewise. (ipa_set_jf_simple_pass_through): Likewise. (ipa_set_jf_arith_pass_through): Likewise. (ipa_set_ancestor_jf): Likewise. (fill_member_ptr_cst_jump_function): Moved up and renamed to ipa_set_jf_member_ptr_cst. (detect_type_change_1): Use the new jump function creation functions. (compute_complex_assign_jump_func): Likewise. (compute_complex_ancestor_jump_func): Likewise. (compute_known_type_jump_func): Likewise. (compute_scalar_jump_functions): Likewise. (compute_pass_through_member_ptrs): Likewise. (determine_cst_member_ptr): Likewise. (combine_known_type_and_ancestor_jfs): Likewise. (try_make_edge_direct_simple_call): Likewise. (try_make_edge_direct_virtual_call): Likewise. (update_indirect_edges_after_inlining): Likewise. * ipa-cp.c (ipa_get_jf_pass_through_result): Use jump function access functions. Incorporat NOP_EXPR and BINFO handling from its callers. (ipa_get_jf_ancestor_result): Likewise. Incorporate handling BINFOs which was in its callers. (ipa_value_from_jfunc): Use jump function access functions. Some functionality moved to functions above. (propagate_vals_accross_ancestor): Likewise. (propagate_vals_accross_pass_through): Use jump function access functions. (propagate_accross_jump_function): Likewise. * ipa-inline-analysis.c (remap_edge_change_prob): Use jump function access functions. (inline_merge_summary): Likewise. From-SVN: r188156
Diffstat (limited to 'gcc/ipa-inline-analysis.c')
-rw-r--r--gcc/ipa-inline-analysis.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/gcc/ipa-inline-analysis.c b/gcc/ipa-inline-analysis.c
index f0111cb..a38d260 100644
--- a/gcc/ipa-inline-analysis.c
+++ b/gcc/ipa-inline-analysis.c
@@ -2514,16 +2514,16 @@ remap_edge_change_prob (struct cgraph_edge *inlined_edge,
{
struct ipa_jump_func *jfunc = ipa_get_ith_jump_func (args, i);
if (jfunc->type == IPA_JF_PASS_THROUGH
- && (jfunc->value.pass_through.formal_id
+ && (ipa_get_jf_pass_through_formal_id (jfunc)
< (int) VEC_length (inline_param_summary_t,
- inlined_es->param)))
+ inlined_es->param)))
{
+ int jf_formal_id = ipa_get_jf_pass_through_formal_id (jfunc);
int prob1 = VEC_index (inline_param_summary_t,
es->param, i)->change_prob;
int prob2 = VEC_index
(inline_param_summary_t,
- inlined_es->param,
- jfunc->value.pass_through.formal_id)->change_prob;
+ inlined_es->param, jf_formal_id)->change_prob;
int prob = ((prob1 * prob2 + REG_BR_PROB_BASE / 2)
/ REG_BR_PROB_BASE);
@@ -2649,8 +2649,8 @@ inline_merge_summary (struct cgraph_edge *edge)
int map = -1;
/* TODO: handle non-NOPs when merging. */
if (jfunc->type == IPA_JF_PASS_THROUGH
- && jfunc->value.pass_through.operation == NOP_EXPR)
- map = jfunc->value.pass_through.formal_id;
+ && ipa_get_jf_pass_through_operation (jfunc) == NOP_EXPR)
+ map = ipa_get_jf_pass_through_formal_id (jfunc);
VEC_replace (int, operand_map, i, map);
gcc_assert (map < ipa_get_param_count (IPA_NODE_REF (to)));
}