diff options
author | Ilya Enkovich <ilya.enkovich@intel.com> | 2013-11-18 12:30:52 +0000 |
---|---|---|
committer | Kirill Yukhin <kyukhin@gcc.gnu.org> | 2013-11-18 12:30:52 +0000 |
commit | 01156003a987af28c1432f247471b2192566612a (patch) | |
tree | c33b65ba49a84fb08a5cd31eafd59e6001a95d59 /gcc/cfgexpand.c | |
parent | fec39fa6b010bb0a37c93412e8f147668c558f98 (diff) | |
download | gcc-01156003a987af28c1432f247471b2192566612a.zip gcc-01156003a987af28c1432f247471b2192566612a.tar.gz gcc-01156003a987af28c1432f247471b2192566612a.tar.bz2 |
builtin-types.def (BT_FN_PTR_CONST_PTR_VAR): New.
* builtin-types.def (BT_FN_PTR_CONST_PTR_VAR): New.
* chkp-builtins.def (BUILT_IN_CHKP_BIND_BOUNDS): New.
* cfgexpand.c (expand_call_stmt): Expand BUILT_IN_CHKP_BIND_BOUNDS.
* gimple.c (gimple_call_get_nobnd_arg_index): Remove.
* gimple.h (gf_mask): Add GF_CALL_WITH_BOUNDS.
(gimple_call_with_bounds_p): New.
(gimple_call_set_with_bounds): New.
(gimple_call_num_nobnd_args): Remove.
(gimple_call_nobnd_arg): Remove.
* tree.h (CALL_WITH_BOUNDS_P): New.
* rtl.h (CALL_EXPR_WITH_BOUNDS_P): New.
From-SVN: r204947
Diffstat (limited to 'gcc/cfgexpand.c')
-rw-r--r-- | gcc/cfgexpand.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c index 3100688..124a4b8 100644 --- a/gcc/cfgexpand.c +++ b/gcc/cfgexpand.c @@ -2154,12 +2154,22 @@ expand_call_stmt (gimple stmt) return; } - exp = build_vl_exp (CALL_EXPR, gimple_call_num_args (stmt) + 3); - - CALL_EXPR_FN (exp) = gimple_call_fn (stmt); decl = gimple_call_fndecl (stmt); builtin_p = decl && DECL_BUILT_IN (decl); + /* Bind bounds call is expanded as assignment. */ + if (builtin_p + && DECL_BUILT_IN_CLASS (decl) == BUILT_IN_NORMAL + && DECL_FUNCTION_CODE (decl) == BUILT_IN_CHKP_BIND_BOUNDS) + { + expand_assignment (gimple_call_lhs (stmt), + gimple_call_arg (stmt, 0), false); + return; + } + + exp = build_vl_exp (CALL_EXPR, gimple_call_num_args (stmt) + 3); + CALL_EXPR_FN (exp) = gimple_call_fn (stmt); + /* If this is not a builtin function, the function type through which the call is made may be different from the type of the function. */ if (!builtin_p) |