Mercurial > hg > CbC > CbC_gcc
changeset 123:ab229f40eab2
fix inline_call
author | mir3636 |
---|---|
date | Fri, 30 Mar 2018 22:58:55 +0900 |
parents | fb3d53c41846 |
children | c3a50d7877e8 |
files | gcc/ipa-inline.c |
diffstat | 1 files changed, 5 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/gcc/ipa-inline.c Thu Mar 22 17:37:58 2018 +0900 +++ b/gcc/ipa-inline.c Fri Mar 30 22:58:55 2018 +0900 @@ -2179,9 +2179,13 @@ { int *num_calls = (int *)data; bool callee_removed = false; - +#ifndef noCbC + while (node->callers && !node->global.inlined_to && !node->callers->call_stmt->vdef) + { +#else while (node->callers && !node->global.inlined_to) { +#endif struct cgraph_node *caller = node->callers->caller; if (!can_inline_edge_p (node->callers, true) @@ -2204,17 +2208,6 @@ node->callers->caller->name (), ipa_fn_summaries->get (node->callers->caller)->size); } -#ifndef noCbC - /* tail call flag is not valid when a code segment is inlined in a normal function. - do not expand the call. */ - tree from = caller->decl; - if (node->callees && node->callees->callee) { - tree to = node->callees->callee->decl; - if (CbC_IS_CODE_SEGMENT (TREE_TYPE (to)) && !CbC_IS_CODE_SEGMENT (TREE_TYPE (from))) - continue; - } -#endif - /* Remember which callers we inlined to, delaying updating the overall summary. */ callers->add (node->callers->caller);