diff options
author | Yury Gribov <y.gribov@samsung.com> | 2014-08-11 06:06:29 +0000 |
---|---|---|
committer | Yury Gribov <ygribov@gcc.gnu.org> | 2014-08-11 06:06:29 +0000 |
commit | b78475cf7322cdce66bae717ee5768baabe8f8d6 (patch) | |
tree | cc507b413e35529d1cebf6d68425ef2f41fa5366 /gcc/gimple.c | |
parent | f473c082d8c9ddbc0d310160f12fad3f11a229e0 (diff) | |
download | gcc-b78475cf7322cdce66bae717ee5768baabe8f8d6.zip gcc-b78475cf7322cdce66bae717ee5768baabe8f8d6.tar.gz gcc-b78475cf7322cdce66bae717ee5768baabe8f8d6.tar.bz2 |
Added fnspec to internal functions.
2014-08-11 Yury Gribov <y.gribov@samsung.com>
gcc/
* gimple.c (gimple_call_fnspec): Support internal functions.
(gimple_call_return_flags): Use const.
* Makefile.in (GTFILES): Add internal-fn.h to list of GC files.
* internal-fn.def: Add fnspec information.
* internal-fn.h (internal_fn_fnspec): New function.
(init_internal_fns): Declare new function.
* internal-fn.c (internal_fn_fnspec_array): New global variable.
(init_internal_fns): New function.
* tree-core.h: Update macro call.
* tree.c (build_common_builtin_nodes): Initialize internal fns.
From-SVN: r213806
Diffstat (limited to 'gcc/gimple.c')
-rw-r--r-- | gcc/gimple.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/gcc/gimple.c b/gcc/gimple.c index 2104dd6..db76174 100644 --- a/gcc/gimple.c +++ b/gcc/gimple.c @@ -1342,11 +1342,14 @@ gimple_call_flags (const_gimple stmt) /* Return the "fn spec" string for call STMT. */ -static tree +static const_tree gimple_call_fnspec (const_gimple stmt) { tree type, attr; + if (gimple_call_internal_p (stmt)) + return internal_fn_fnspec (gimple_call_internal_fn (stmt)); + type = gimple_call_fntype (stmt); if (!type) return NULL_TREE; @@ -1363,7 +1366,7 @@ gimple_call_fnspec (const_gimple stmt) int gimple_call_arg_flags (const_gimple stmt, unsigned arg) { - tree attr = gimple_call_fnspec (stmt); + const_tree attr = gimple_call_fnspec (stmt); if (!attr || 1 + arg >= (unsigned) TREE_STRING_LENGTH (attr)) return 0; @@ -1397,7 +1400,7 @@ gimple_call_arg_flags (const_gimple stmt, unsigned arg) int gimple_call_return_flags (const_gimple stmt) { - tree attr; + const_tree attr; if (gimple_call_flags (stmt) & ECF_MALLOC) return ERF_NOALIAS; |