aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimple.c
diff options
context:
space:
mode:
authorJan Hubicka <hubicka@gcc.gnu.org>2010-05-31 16:25:35 +0000
committerJan Hubicka <hubicka@gcc.gnu.org>2010-05-31 16:25:35 +0000
commitc54c785d41ae9a2c59288939a08f0051f05b7a6f (patch)
tree7abd6b17d74d7f3258b196f10f26ef8e74c4a1bc /gcc/gimple.c
parent4892422a064e6f5d633123afecf6e95e4fca0f48 (diff)
downloadgcc-c54c785d41ae9a2c59288939a08f0051f05b7a6f.zip
gcc-c54c785d41ae9a2c59288939a08f0051f05b7a6f.tar.gz
gcc-c54c785d41ae9a2c59288939a08f0051f05b7a6f.tar.bz2
gimple.c (gimple_call_builtin_p): New function.
* gimple.c (gimple_call_builtin_p): New function. * gimple.h (gimple_call_builtin_p): Declare. * tree-cfg.c (make_edges): Produce edge from BUILT_IN_RETURN to exit. (execute_warn_function_return): BUILT_IN_RETURN is return. (split_critical_edges): Return edges are not critical. (is_ctrl_altering_stmt): Builtin_in_return is altering. (gimple_verify_flow_info): Handle built_in_return. (execute_warn_function_return): Handle built_in_return. * ipa-pure-const.c (check_call): Ignore builtin_return. * gcc.dg/builtin-apply4.c: Compile with -Wmissing-return. From-SVN: r160079
Diffstat (limited to 'gcc/gimple.c')
-rw-r--r--gcc/gimple.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/gimple.c b/gcc/gimple.c
index 759caf2..f4c57b2 100644
--- a/gcc/gimple.c
+++ b/gcc/gimple.c
@@ -4732,4 +4732,16 @@ gimple_decl_printable_name (tree decl, int verbosity)
return IDENTIFIER_POINTER (DECL_NAME (decl));
}
+/* Return true when STMT is builtins call to CODE. */
+
+bool
+gimple_call_builtin_p (gimple stmt, enum built_in_function code)
+{
+ tree fndecl;
+ return (is_gimple_call (stmt)
+ && (fndecl = gimple_call_fndecl (stmt)) != NULL
+ && DECL_BUILT_IN_CLASS (fndecl) == BUILT_IN_NORMAL
+ && DECL_FUNCTION_CODE (fndecl) == code);
+}
+
#include "gt-gimple.h"