summaryrefslogtreecommitdiff
path: root/gcc/gimple-low.c
diff options
context:
space:
mode:
authorXinliang David Li <davidxl@google.com>2009-08-12 16:51:41 +0000
committerXinliang David Li <davidxl@gcc.gnu.org>2009-08-12 16:51:41 +0000
commit6eb29714e4e42bb0ce53759b2567a71b96cd5c8e (patch)
tree169e66302796b1a698328523a598d07c824939db /gcc/gimple-low.c
parente8e76230ed27bb3a942c0db135089f905c43684f (diff)
downloadgcc-6eb29714e4e42bb0ce53759b2567a71b96cd5c8e.tar.gz
Fix to PR41012
From-SVN: r150703
Diffstat (limited to 'gcc/gimple-low.c')
-rw-r--r--gcc/gimple-low.c25
1 files changed, 8 insertions, 17 deletions
diff --git a/gcc/gimple-low.c b/gcc/gimple-low.c
index 8d7ead680ce..eba86727a05 100644
--- a/gcc/gimple-low.c
+++ b/gcc/gimple-low.c
@@ -221,17 +221,14 @@ struct gimple_opt_pass pass_lower_cf =
/* Verify if the type of the argument matches that of the function
declaration. If we cannot verify this or there is a mismatch,
- mark the call expression so it doesn't get inlined later. */
+ return false. */
-static void
-check_call_args (gimple stmt)
+bool
+gimple_check_call_args (gimple stmt)
{
tree fndecl, parms, p;
unsigned int i, nargs;
- if (gimple_call_cannot_inline_p (stmt))
- return;
-
nargs = gimple_call_num_args (stmt);
/* Get argument types for verification. */
@@ -244,7 +241,7 @@ check_call_args (gimple stmt)
/* Verify if the type of the argument matches that of the function
declaration. If we cannot verify this or there is a mismatch,
- mark the call expression so it doesn't get inlined later. */
+ return false. */
if (fndecl && DECL_ARGUMENTS (fndecl))
{
for (i = 0, p = DECL_ARGUMENTS (fndecl);
@@ -260,10 +257,7 @@ check_call_args (gimple stmt)
|| gimple_call_arg (stmt, i) == error_mark_node
|| !fold_convertible_p (DECL_ARG_TYPE (p),
gimple_call_arg (stmt, i)))
- {
- gimple_call_set_cannot_inline (stmt, true);
- break;
- }
+ return false;
}
}
else if (parms)
@@ -279,17 +273,15 @@ check_call_args (gimple stmt)
|| TREE_CODE (TREE_VALUE (p)) == VOID_TYPE
|| !fold_convertible_p (TREE_VALUE (p),
gimple_call_arg (stmt, i)))
- {
- gimple_call_set_cannot_inline (stmt, true);
- break;
- }
+ return false;
}
}
else
{
if (nargs != 0)
- gimple_call_set_cannot_inline (stmt, true);
+ return false;
}
+ return true;
}
@@ -394,7 +386,6 @@ lower_stmt (gimple_stmt_iterator *gsi, struct lower_data *data)
lower_builtin_setjmp (gsi);
return;
}
- check_call_args (stmt);
}
break;