summaryrefslogtreecommitdiff
path: root/gcc/cgraph.c
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2011-04-16 09:13:08 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2011-04-16 09:13:08 +0000
commitcbd7f5a00aba19d118dcc101792eadc82462da26 (patch)
treebc526e252532d488b8afaaa3574faf2363fc5fde /gcc/cgraph.c
parente5f53f2a62eaf93d266de50ff4370c3cec6c82a9 (diff)
downloadgcc-cbd7f5a00aba19d118dcc101792eadc82462da26.tar.gz
* cgraphbuild.c: Include ipa-inline.h.
(reset_inline_failed): Use initialize_inline_failed. * cgraph.c: Include ipa-inline.h. (cgraph_create_node_1): Do not initialize estimated_growth. (initialize_inline_failed): More to ipa-inline-analysis.c (dump_cgraph_node): Do not dump inline flags. * cgraph.h (cgraph_local_info): Remove inlineable, versionable and disregard_inline_limits flags. (cgrpah_global_info): Remove estimated_stack_size, stack_frame_offset, time, size, estimated_growth. * ipa-cp.c (ipcp_versionable_function_p, ipcp_generate_summary): Update. * cgraphunit.c (cgraph_decide_is_function_needed): Use DECL_DISREGARD_INLINE_LIMITS. (cgraph_analyze_function): Do not initialize node->local.disregard_inline_limits. * lto-cgraph.c (lto_output_node, input_overwrite_node): Do not stream inlinable, versionable and disregard_inline_limits. * ipa-inline.c (cgraph_clone_inlined_nodes, cgraph_mark_inline_edge, cgraph_check_inline_limits, cgraph_default_inline_p, cgraph_edge_badness, update_caller_keys, update_callee_keys, add_new_edges_to_heap): Update. (cgraph_decide_inlining_of_small_function): Update; set CIF_FUNCTION_NOT_INLINABLE for uninlinable functions. (cgraph_decide_inlining, cgraph_edge_early_inlinable_p, cgraph_decide_inlining_incrementally): Update. * ipa-inline.h (inline_summary): Add inlinable, versionable, disregard_inline_limits, estimated_stack_size, stack_frame_offset, time, size and estimated_growth parameters. (estimate_edge_growth): Update. (initialize_inline_failed): Declare. * ipa-split.c: Include ipa-inline.h (execute_split_functions): Update. * ipa.c (cgraph_postorder): Use DECL_DISREGARD_INLINE_LIMITS. (cgraph_remove_unreachable_nodes): Do not clear inlinable flag. (record_cdtor_fn): Use DECL_DISREGARD_INLINE_LIMITS. * ipa-inline-analysis.c (inline_node_removal_hook): Update; set estimated_growth to INT_MIN. (inline_node_duplication_hook): Likewise. (dump_inline_summary): Dump new fields. (compute_inline_parameters): Update. (estimate_edge_time, estimate_time_after_inlining, estimate_size_after_inlining, estimate_growth, inline_read_summary, inline_write_summary): (initialize_inline_failed): Move here from cgraph.c. * tree-sra.c: Include ipa-inline.h. (ipa_sra_preliminary_function_checks): Update. * lto/lto.c (lto_balanced_map): Update. Update. * Makefile.in: (cgraph.o, cgraphbuild.o): Add dependency on ipa-inline.h git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@172581 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cgraph.c')
-rw-r--r--gcc/cgraph.c30
1 files changed, 1 insertions, 29 deletions
diff --git a/gcc/cgraph.c b/gcc/cgraph.c
index 09436c7cfb5..31c5b59960a 100644
--- a/gcc/cgraph.c
+++ b/gcc/cgraph.c
@@ -98,6 +98,7 @@ The callgraph:
#include "rtl.h"
#include "ipa-utils.h"
#include "lto-streamer.h"
+#include "ipa-inline.h"
const char * const ld_plugin_symbol_resolution_names[]=
{
@@ -476,7 +477,6 @@ cgraph_create_node_1 (void)
if (cgraph_nodes)
cgraph_nodes->previous = node;
node->previous = NULL;
- node->global.estimated_growth = INT_MIN;
node->frequency = NODE_FREQUENCY_NORMAL;
node->count_materialization_scale = REG_BR_PROB_BASE;
ipa_empty_ref_list (&node->ref_list);
@@ -970,28 +970,6 @@ cgraph_create_edge_including_clones (struct cgraph_node *orig,
}
}
-/* Give initial reasons why inlining would fail on EDGE. This gets either
- nullified or usually overwritten by more precise reasons later. */
-
-static void
-initialize_inline_failed (struct cgraph_edge *e)
-{
- struct cgraph_node *callee = e->callee;
-
- if (e->indirect_unknown_callee)
- e->inline_failed = CIF_INDIRECT_UNKNOWN_CALL;
- else if (!callee->analyzed)
- e->inline_failed = CIF_BODY_NOT_AVAILABLE;
- else if (callee->local.redefined_extern_inline)
- e->inline_failed = CIF_REDEFINED_EXTERN_INLINE;
- else if (!callee->local.inlinable)
- e->inline_failed = CIF_FUNCTION_NOT_INLINABLE;
- else if (e->call_stmt && gimple_call_cannot_inline_p (e->call_stmt))
- e->inline_failed = CIF_MISMATCHED_ARGUMENTS;
- else
- e->inline_failed = CIF_FUNCTION_NOT_CONSIDERED;
-}
-
/* Allocate a cgraph_edge structure and fill it with data according to the
parameters of which only CALLEE can be NULL (when creating an indirect call
edge). */
@@ -1899,12 +1877,6 @@ dump_cgraph_node (FILE *f, struct cgraph_node *node)
ld_plugin_symbol_resolution_names[(int)node->resolution]);
if (node->local.finalized)
fprintf (f, " finalized");
- if (node->local.disregard_inline_limits)
- fprintf (f, " always_inline");
- else if (node->local.inlinable)
- fprintf (f, " inlinable");
- else if (node->local.versionable)
- fprintf (f, " versionable");
if (node->local.redefined_extern_inline)
fprintf (f, " redefined_extern_inline");
if (TREE_ASM_WRITTEN (node->decl))