aboutsummaryrefslogtreecommitdiff
path: root/gcc/cgraphbuild.c
diff options
context:
space:
mode:
authorDiego Novillo <dnovillo@google.com>2009-10-03 21:10:11 +0000
committerDiego Novillo <dnovillo@google.com>2009-10-03 21:10:11 +0000
commit93fcd3075033a94fc3e0db811c9aa26a52dd5895 (patch)
tree3a9882bd235e5026410e5397a5e46a97ece50b48 /gcc/cgraphbuild.c
parenta3155ed62fc4ef247ff1b43fca26e5e8222611cc (diff)
Merge lto branch into trunk.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@152434 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cgraphbuild.c')
-rw-r--r--gcc/cgraphbuild.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/gcc/cgraphbuild.c b/gcc/cgraphbuild.c
index a7a8bd2b314..d61def279ad 100644
--- a/gcc/cgraphbuild.c
+++ b/gcc/cgraphbuild.c
@@ -78,6 +78,29 @@ record_reference (tree *tp, int *walk_subtrees, void *data ATTRIBUTE_UNUSED)
return NULL_TREE;
}
+/* Reset inlining information of all incoming call edges of NODE. */
+
+void
+reset_inline_failed (struct cgraph_node *node)
+{
+ struct cgraph_edge *e;
+
+ for (e = node->callers; e; e = e->next_caller)
+ {
+ e->callee->global.inlined_to = NULL;
+ if (!node->analyzed)
+ e->inline_failed = CIF_BODY_NOT_AVAILABLE;
+ else if (node->local.redefined_extern_inline)
+ e->inline_failed = CIF_REDEFINED_EXTERN_INLINE;
+ else if (!node->local.inlinable)
+ e->inline_failed = CIF_FUNCTION_NOT_INLINABLE;
+ else if (e->call_stmt_cannot_inline_p)
+ e->inline_failed = CIF_MISMATCHED_ARGUMENTS;
+ else
+ e->inline_failed = CIF_FUNCTION_NOT_CONSIDERED;
+ }
+}
+
/* Computes the frequency of the call statement so that it can be stored in
cgraph_edge. BB is the basic block of the call statement. */
int