GCC Middle and Back End API Reference
ipa-inline-analysis.cc File Reference
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "backend.h"
#include "tree.h"
#include "gimple.h"
#include "alloc-pool.h"
#include "tree-pass.h"
#include "ssa.h"
#include "tree-streamer.h"
#include "cgraph.h"
#include "diagnostic.h"
#include "fold-const.h"
#include "print-tree.h"
#include "tree-inline.h"
#include "gimple-pretty-print.h"
#include "cfganal.h"
#include "gimple-iterator.h"
#include "tree-cfg.h"
#include "tree-ssa-loop-niter.h"
#include "tree-ssa-loop.h"
#include "symbol-summary.h"
#include "sreal.h"
#include "ipa-cp.h"
#include "ipa-prop.h"
#include "ipa-fnsummary.h"
#include "ipa-inline.h"
#include "cfgloop.h"
#include "tree-scalar-evolution.h"
#include "ipa-utils.h"
#include "cfgexpand.h"
#include "gimplify.h"
#include "attribs.h"
Include dependency graph for ipa-inline-analysis.cc:

Data Structures

class  node_context_cache_entry
class  node_context_summary
struct  growth_data


void initialize_inline_failed (struct cgraph_edge *e)
void initialize_growth_caches ()
void free_growth_caches (void)
int simple_edge_hints (struct cgraph_edge *edge)
sreal do_estimate_edge_time (struct cgraph_edge *edge, sreal *ret_nonspec_time)
void reset_node_cache (struct cgraph_node *node)
void ipa_remove_from_growth_caches (struct cgraph_edge *edge)
int do_estimate_edge_size (struct cgraph_edge *edge)
ipa_hints do_estimate_edge_hints (struct cgraph_edge *edge)
int estimate_size_after_inlining (struct cgraph_node *node, struct cgraph_edge *edge)
static bool do_estimate_growth_1 (struct cgraph_node *node, void *data)
static int offline_size (struct cgraph_node *node, ipa_size_summary *info)
int estimate_growth (struct cgraph_node *node)
static bool check_callers (cgraph_node *node, int *growth, int *n, int offline, int min_size, struct cgraph_edge *known_edge)
bool growth_positive_p (struct cgraph_node *node, struct cgraph_edge *known_edge, int edge_growth)


fast_call_summary< edge_growth_cache_entry *, va_heap > * edge_growth_cache = NULL
static fast_function_summary< node_context_summary *, va_heap > * node_context_cache = NULL
static long node_context_cache_hit
static long node_context_cache_miss
static long node_context_cache_clear

Function Documentation

◆ check_callers()

◆ do_estimate_edge_hints()

ipa_hints do_estimate_edge_hints ( struct cgraph_edge * edge)

◆ do_estimate_edge_size()

int do_estimate_edge_size ( struct cgraph_edge * edge)

◆ do_estimate_edge_time()

sreal do_estimate_edge_time ( struct cgraph_edge * edge,
sreal * ret_nonspec_time )

◆ do_estimate_growth_1()

◆ estimate_growth()

◆ estimate_size_after_inlining()

int estimate_size_after_inlining ( struct cgraph_node * node,
struct cgraph_edge * edge )
Estimate the size of NODE after inlining EDGE which should be an
edge to either NODE or a call inlined into NODE.   

References estimate_edge_growth(), gcc_assert, ipa_call_summaries, ipa_size_summaries, ipa_call_summary::predicate, and ipa_size_summary::size.

Referenced by caller_growth_limits(), check_callers(), and recursive_inlining().

◆ free_growth_caches()

void free_growth_caches ( void )

◆ growth_positive_p()

◆ initialize_growth_caches()

void initialize_growth_caches ( )
Allocate edge growth caches.   

References edge_growth_cache, node_context_cache, and symtab.

Referenced by inline_small_functions().

◆ initialize_inline_failed()

◆ ipa_remove_from_growth_caches()

void ipa_remove_from_growth_caches ( struct cgraph_edge * edge)
Remove EDGE from caches once it was inlined.   

References edge_growth_cache, and node_context_cache.

Referenced by ipa_merge_fn_summary_after_inlining().

◆ offline_size()

static int offline_size ( struct cgraph_node * node,
ipa_size_summary * info )

◆ reset_node_cache()

void reset_node_cache ( struct cgraph_node * node)
Reset cache for NODE.
This must be done each time NODE body is modified.   

References node_context_cache.

Referenced by inline_small_functions(), recursive_inlining(), and reset_edge_caches().

◆ simple_edge_hints()

int simple_edge_hints ( struct cgraph_edge * edge)

Variable Documentation

◆ edge_growth_cache

Analysis used by inlining decision heuristics.
   Copyright (C) 2003-2024 Free Software Foundation, Inc.
   Contributed by Jan Hubicka

This file is part of GCC.

GCC is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 3, or (at your option) any later

GCC is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
for more details.

You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3.  If not see
Cached node/edge growths.   

Referenced by check_callers(), do_estimate_edge_hints(), do_estimate_edge_size(), do_estimate_edge_time(), estimate_edge_hints(), estimate_edge_size(), estimate_edge_time(), free_growth_caches(), growth_positive_p(), initialize_growth_caches(), inline_small_functions(), ipa_remove_from_growth_caches(), recursive_inlining(), and reset_edge_caches().

◆ node_context_cache

◆ node_context_cache_clear

long node_context_cache_clear

◆ node_context_cache_hit

long node_context_cache_hit
Statistics about the context cache effectivity.   

Referenced by do_estimate_edge_time(), and free_growth_caches().

◆ node_context_cache_miss

long node_context_cache_miss