summaryrefslogtreecommitdiff
path: root/gcc/gimple-low.c
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2009-08-29 19:26:47 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2009-08-29 19:26:47 +0000
commitc4aa078796bd9c7237e0ac5ea4ab7553106f199d (patch)
tree98a5e7f47a887d71b7ce051eac4583deee5a6dac /gcc/gimple-low.c
parente34f5cd313173ac0144aeb70ab96e50fc36605ba (diff)
downloadgcc-c4aa078796bd9c7237e0ac5ea4ab7553106f199d.tar.gz
2009-08-29 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 151199 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@151206 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;