diff options
author | Diego Novillo <dnovillo@google.com> | 2011-12-01 16:05:10 -0500 |
---|---|---|
committer | Diego Novillo <dnovillo@gcc.gnu.org> | 2011-12-01 16:05:10 -0500 |
commit | c21e80b889640098c26d0352fc179bc022cd45ff (patch) | |
tree | 365a238dcb8c0cf6ff5134062c6b10dbe07ec254 /gcc | |
parent | d4e5417a2f653e768ea15d22aabb99b9fd1e31a4 (diff) | |
download | gcc-c21e80b889640098c26d0352fc179bc022cd45ff.zip gcc-c21e80b889640098c26d0352fc179bc022cd45ff.tar.gz gcc-c21e80b889640098c26d0352fc179bc022cd45ff.tar.bz2 |
re PR bootstrap/51346 (LTO bootstrap failed with bootstrap-profiled)
PR bootstrap/51346
* ipa-inline.c (can_inline_edge_p): If the edge E has a
statement, use the statement's inline indicator instead
of E's.
Remove consistency check.
From-SVN: r181894
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 9 | ||||
-rw-r--r-- | gcc/ipa-inline.c | 18 |
2 files changed, 18 insertions, 9 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f2d1bc2..000fdc0 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,14 @@ 2011-12-01 Diego Novillo <dnovillo@google.com> + PR bootstrap/51346 + * ipa-inline.c (can_inline_edge_p): If the edge E has a + statement, use the statement's inline indicator instead + of E's. + Remove consistency check. + +2011-12-01 Diego Novillo <dnovillo@google.com> + + PR bootstrap/51346 Revert 2011-11-29 Diego Novillo <dnovillo@google.com> diff --git a/gcc/ipa-inline.c b/gcc/ipa-inline.c index 3dadf8d..e3c6b3c 100644 --- a/gcc/ipa-inline.c +++ b/gcc/ipa-inline.c @@ -246,6 +246,14 @@ can_inline_edge_p (struct cgraph_edge *e, bool report) struct function *caller_cfun = DECL_STRUCT_FUNCTION (e->caller->decl); struct function *callee_cfun = callee ? DECL_STRUCT_FUNCTION (callee->decl) : NULL; + bool call_stmt_cannot_inline_p; + + /* If E has a call statement in it, use the inline attribute from + the statement, otherwise use the inline attribute in E. Edges + will not have statements when working in WPA mode. */ + call_stmt_cannot_inline_p = (e->call_stmt) + ? gimple_call_cannot_inline_p (e->call_stmt) + : e->call_stmt_cannot_inline_p; if (!caller_cfun && e->caller->clone_of) caller_cfun = DECL_STRUCT_FUNCTION (e->caller->clone_of->decl); @@ -270,7 +278,7 @@ can_inline_edge_p (struct cgraph_edge *e, bool report) e->inline_failed = CIF_OVERWRITABLE; return false; } - else if (e->call_stmt_cannot_inline_p) + else if (call_stmt_cannot_inline_p) { e->inline_failed = CIF_MISMATCHED_ARGUMENTS; inlinable = false; @@ -343,14 +351,6 @@ can_inline_edge_p (struct cgraph_edge *e, bool report) } } - /* Be sure that the cannot_inline_p flag is up to date. */ - gcc_checking_assert (!e->call_stmt - || (gimple_call_cannot_inline_p (e->call_stmt) - == e->call_stmt_cannot_inline_p) - /* In -flto-partition=none mode we really keep things out of - sync because call_stmt_cannot_inline_p is set at cgraph - merging when function bodies are not there yet. */ - || (in_lto_p && !gimple_call_cannot_inline_p (e->call_stmt))); if (!inlinable && report) report_inline_failed_reason (e); return inlinable; |