aboutsummaryrefslogtreecommitdiff
path: root/gcc/ipa-cp.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2012-04-14 10:24:59 +0000
committerJan Hubicka <jh@suse.cz>2012-04-14 10:24:59 +0000
commit669d1af4410224f510752156f391a747de9d5b5d (patch)
tree7b0127a94d4c70c75f4d133c7806c59bc61566c2 /gcc/ipa-cp.c
parent43b644476aa75eff6e2bbf65cd9e8546b482dc6a (diff)
* cgraph.h: Update copyrights;
(symtab_node): Turn to union typedef. (symtab_node_base): New structure. (symtab_type): Add SYMTAB_SYMBOL tag. * cgraph.c: Update references to fields (cgraph_hash, assembler_name_hash): Turn into symtab_node. (cgraph_local_info): Remove lto_file_data and externally_visible. (cgraph_node): Remove decl; same_comdat_group list; aux; ref_list; order; address_taken; reachable_from_other_parittion, in_other_partition; resolution. (varpool_node): Remove decl; same_comdat_group; ref_list; lto_file_data; aux; order; resolution; externally_visible; used_from_other_partition; in_other_partition. (symtab_node_def); New union. (cgraph, varpool): Update. (varpool_first_static_initializer, varpool_next_static_initializer, cgraph_only_called_directly_or_aliased_p, varpool_can_remove_if_no_refs, varpool_can_remove_if_no_refs, varpool_all_refs_explicit_p, cgraph_alias_aliased_node, varpool_alias_aliased_node, cgraph_edge_recursive_p): Update field references. * cgraph.c: Likewise. * cgraphbuild.c: Likewise. * lto-symtab.c: Likewise. * c-gimplify.c: Likewise. * value-prof.c: Likewise. * tree.c: Likewise. * ipa-cp.c: Likewise. * tree-emutls.c: Likewise. * ipa-inline-transform.c: Likwise. * ipa-reference.c: Likewise. * cgraphunit.c: Likewise. * ipa-ref.c: Likewise. * lto-cgraph.c: Likewise. * ipa-ref-inline.h: Likewise. * ipa-pure-const.c: Likewise. * lto-streamer-out.c: Likewise. * ipa-utils.c: Likewise. * ipa-inline.c: Likewise. * matrix-reorg.c: Likewise. * tree-eh.c: Likewise. * tree-vectorizer.c: Likewise. * ipa-split.c: Likewise. * ipa.c: Likewise. * trans-mem.c: Likewise. * ipa-inline-analysis.c: Likewise. * gimplify.c: Likewise. * cfgexpand.c: Likewise. * tree-sra.c: Likewise. * ipa-prop.c: Likewise. * varasm.c: Likewise. * tree-nested.c: Likewise. * tree-inline.c: Likewise. * tree-profile.c: Likewise. * tree-ssa-structalias.c: Likewise. * passes.c: Likewise. * varpool.c: Likewise. * tree.c: Update field referenced for new cgraph/varpool layout. * decl2.c: Likewise. * gcc-interface/trans.c (finalize_nrv): Update field referenced for new cgraph/varpool layout. * lto.c: Update field referenced for new cgraph/varpool layout. * lto-partition.c: Likewise. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@186450 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ipa-cp.c')
-rw-r--r--gcc/ipa-cp.c27
1 files changed, 14 insertions, 13 deletions
diff --git a/gcc/ipa-cp.c b/gcc/ipa-cp.c
index bb008c03878..cd9afb86370 100644
--- a/gcc/ipa-cp.c
+++ b/gcc/ipa-cp.c
@@ -247,11 +247,11 @@ ipa_lat_is_single_const (struct ipcp_lattice *lat)
static inline bool
edge_within_scc (struct cgraph_edge *cs)
{
- struct ipa_dfs_info *caller_dfs = (struct ipa_dfs_info *) cs->caller->aux;
+ struct ipa_dfs_info *caller_dfs = (struct ipa_dfs_info *) cs->caller->symbol.aux;
struct ipa_dfs_info *callee_dfs;
struct cgraph_node *callee = cgraph_function_node (cs->callee, NULL);
- callee_dfs = (struct ipa_dfs_info *) callee->aux;
+ callee_dfs = (struct ipa_dfs_info *) callee->symbol.aux;
return (caller_dfs
&& callee_dfs
&& caller_dfs->scc_no == callee_dfs->scc_no);
@@ -450,7 +450,7 @@ ipcp_cloning_candidate_p (struct cgraph_node *node)
return false;
}
- if (!optimize_function_for_speed_p (DECL_STRUCT_FUNCTION (node->decl)))
+ if (!optimize_function_for_speed_p (DECL_STRUCT_FUNCTION (node->symbol.decl)))
{
if (dump_file)
fprintf (dump_file, "Not considering %s for cloning; "
@@ -1192,7 +1192,7 @@ devirtualization_time_bonus (struct cgraph_node *node,
else if (isummary->size <= MAX_INLINE_INSNS_AUTO / 2)
res += 15;
else if (isummary->size <= MAX_INLINE_INSNS_AUTO
- || DECL_DECLARED_INLINE_P (callee->decl))
+ || DECL_DECLARED_INLINE_P (callee->symbol.decl))
res += 7;
}
@@ -1209,7 +1209,7 @@ good_cloning_opportunity_p (struct cgraph_node *node, int time_benefit,
{
if (time_benefit == 0
|| !flag_ipa_cp_clone
- || !optimize_function_for_speed_p (DECL_STRUCT_FUNCTION (node->decl)))
+ || !optimize_function_for_speed_p (DECL_STRUCT_FUNCTION (node->symbol.decl)))
return false;
gcc_assert (size_cost > 0);
@@ -1532,14 +1532,14 @@ propagate_constants_topo (struct topo_info *topo)
if (!cgraph_function_with_gimple_body_p (node))
continue;
- node_dfs_info = (struct ipa_dfs_info *) node->aux;
+ node_dfs_info = (struct ipa_dfs_info *) node->symbol.aux;
/* First, iteratively propagate within the strongly connected component
until all lattices stabilize. */
v = node_dfs_info->next_cycle;
while (v)
{
push_node_to_stack (topo, v);
- v = ((struct ipa_dfs_info *) v->aux)->next_cycle;
+ v = ((struct ipa_dfs_info *) v->symbol.aux)->next_cycle;
}
v = node;
@@ -1568,7 +1568,7 @@ propagate_constants_topo (struct topo_info *topo)
if (!edge_within_scc (cs))
propagate_constants_accross_call (cs);
- v = ((struct ipa_dfs_info *) v->aux)->next_cycle;
+ v = ((struct ipa_dfs_info *) v->symbol.aux)->next_cycle;
}
}
}
@@ -2384,20 +2384,20 @@ static void
identify_dead_nodes (struct cgraph_node *node)
{
struct cgraph_node *v;
- for (v = node; v ; v = ((struct ipa_dfs_info *) v->aux)->next_cycle)
+ for (v = node; v ; v = ((struct ipa_dfs_info *) v->symbol.aux)->next_cycle)
if (cgraph_will_be_removed_from_program_if_no_direct_calls (v)
&& !cgraph_for_node_and_aliases (v,
has_undead_caller_from_outside_scc_p,
NULL, true))
IPA_NODE_REF (v)->node_dead = 1;
- for (v = node; v ; v = ((struct ipa_dfs_info *) v->aux)->next_cycle)
+ for (v = node; v ; v = ((struct ipa_dfs_info *) v->symbol.aux)->next_cycle)
if (!IPA_NODE_REF (v)->node_dead)
spread_undeadness (v);
if (dump_file && (dump_flags & TDF_DETAILS))
{
- for (v = node; v ; v = ((struct ipa_dfs_info *) v->aux)->next_cycle)
+ for (v = node; v ; v = ((struct ipa_dfs_info *) v->symbol.aux)->next_cycle)
if (IPA_NODE_REF (v)->node_dead)
fprintf (dump_file, " Marking node as dead: %s/%i.\n",
cgraph_node_name (v), v->uid);
@@ -2424,7 +2424,7 @@ ipcp_decision_stage (struct topo_info *topo)
{
struct cgraph_node *v;
iterate = false;
- for (v = node; v ; v = ((struct ipa_dfs_info *) v->aux)->next_cycle)
+ for (v = node; v ; v = ((struct ipa_dfs_info *) v->symbol.aux)->next_cycle)
if (cgraph_function_with_gimple_body_p (v)
&& ipcp_versionable_function_p (v))
iterate |= decide_whether_version_node (v);
@@ -2496,7 +2496,8 @@ ipcp_generate_summary (void)
{
/* Unreachable nodes should have been eliminated before ipcp. */
gcc_assert (node->needed || node->reachable);
- node->local.versionable = tree_versionable_function_p (node->decl);
+ node->local.versionable
+ = tree_versionable_function_p (node->symbol.decl);
ipa_analyze_node (node);
}
}