summaryrefslogtreecommitdiff
path: root/gcc/gimple-low.c
diff options
context:
space:
mode:
authordavidxl <davidxl@138bc75d-0d04-0410-961f-82ee72b054a4>2009-08-12 16:51:41 +0000
committerdavidxl <davidxl@138bc75d-0d04-0410-961f-82ee72b054a4>2009-08-12 16:51:41 +0000
commit19bcf5214614bfc4322ffbe3d93c2fbcf6c22c26 (patch)
tree169e66302796b1a698328523a598d07c824939db /gcc/gimple-low.c
parentf44e3dd1108813524120827780a45f23196a4802 (diff)
downloadgcc-19bcf5214614bfc4322ffbe3d93c2fbcf6c22c26.tar.gz
Fix to PR41012
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@150703 138bc75d-0d04-0410-961f-82ee72b054a4
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;