summaryrefslogtreecommitdiff
path: root/gcc/ipa-inline.h
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ipa-inline.h')
-rw-r--r--gcc/ipa-inline.h33
1 files changed, 29 insertions, 4 deletions
diff --git a/gcc/ipa-inline.h b/gcc/ipa-inline.h
index e9a7db21043..58bcdd968b9 100644
--- a/gcc/ipa-inline.h
+++ b/gcc/ipa-inline.h
@@ -23,9 +23,10 @@ along with GCC; see the file COPYING3. If not see
struct inline_summary
{
+ /* Information about the function body itself. */
+
/* Estimated stack frame consumption by the function. */
HOST_WIDE_INT estimated_self_stack_size;
-
/* Size of the function body. */
int self_size;
/* How many instructions are likely going to disappear after inlining. */
@@ -34,6 +35,29 @@ struct inline_summary
int self_time;
/* How much time is going to be saved by inlining. */
int time_inlining_benefit;
+
+ /* False when there something makes inlining impossible (such as va_arg). */
+ unsigned inlinable : 1;
+ /* False when there something makes versioning impossible.
+ Currently computed and used only by ipa-cp. */
+ unsigned versionable : 1;
+ /* True when function should be inlined independently on its size. */
+ unsigned disregard_inline_limits : 1;
+
+ /* Information about function that will result after applying all the
+ inline decisions present in the callgraph. Generally kept up to
+ date only for functions that are not inline clones. */
+
+ /* Estimated stack frame consumption by the function. */
+ HOST_WIDE_INT estimated_stack_size;
+ /* Expected offset of the stack frame of inlined function. */
+ HOST_WIDE_INT stack_frame_offset;
+ /* Estimated size of the function after inlining. */
+ int time;
+ int size;
+ /* Cached estimated growth after inlining.
+ INT_MIN if not computed. */
+ int estimated_growth;
};
typedef struct inline_summary inline_summary_t;
@@ -47,6 +71,7 @@ void inline_generate_summary (void);
void inline_read_summary (void);
void inline_write_summary (cgraph_node_set, varpool_node_set);
void inline_free_summary (void);
+void initialize_inline_failed (struct cgraph_edge *);
int estimate_time_after_inlining (struct cgraph_node *, struct cgraph_edge *);
int estimate_size_after_inlining (struct cgraph_node *, struct cgraph_edge *);
int estimate_growth (struct cgraph_node *);
@@ -63,10 +88,10 @@ static inline int
estimate_edge_growth (struct cgraph_edge *edge)
{
int call_stmt_size;
+ struct inline_summary *info = inline_summary (edge->callee);
call_stmt_size = edge->call_stmt_size;
gcc_checking_assert (call_stmt_size);
- return (edge->callee->global.size
- - inline_summary (edge->callee)->size_inlining_benefit
+ return (info->size
+ - info->size_inlining_benefit
- call_stmt_size);
}
-