diff options
author | Ilya Enkovich <enkovich.gnu@gmail.com> | 2015-12-10 16:01:42 +0000 |
---|---|---|
committer | Ilya Enkovich <ienkovich@gcc.gnu.org> | 2015-12-10 16:01:42 +0000 |
commit | 64a948e9c2c34aea10e5a995f9e67bb6325ca7e8 (patch) | |
tree | 933bb83d196ac3eeaa156a457f6a2b08e24ee50a /gcc/tree-stdarg.c | |
parent | da8006f341fc2a30d32fe7a1d9d540617ff5f8b6 (diff) | |
download | gcc-64a948e9c2c34aea10e5a995f9e67bb6325ca7e8.zip gcc-64a948e9c2c34aea10e5a995f9e67bb6325ca7e8.tar.gz gcc-64a948e9c2c34aea10e5a995f9e67bb6325ca7e8.tar.bz2 |
tree-chkp.c (chkp_call_returns_bounds_p): Return true for VA_ARG call.
gcc/
* tree-chkp.c (chkp_call_returns_bounds_p): Return true
for VA_ARG call.
(chkp_fixup_inlined_call): New.
* tree-chkp.h (chkp_fixup_inlined_call): New.
* tree-stdarg.c: Include tree-chkp.h.
(expand_ifn_va_arg_1): Fixup bndret calls for removed
VA_ARG calls.
From-SVN: r231525
Diffstat (limited to 'gcc/tree-stdarg.c')
-rw-r--r-- | gcc/tree-stdarg.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/tree-stdarg.c b/gcc/tree-stdarg.c index f205ccb..ea2ef1c 100644 --- a/gcc/tree-stdarg.c +++ b/gcc/tree-stdarg.c @@ -36,6 +36,7 @@ along with GCC; see the file COPYING3. If not see #include "tree-into-ssa.h" #include "tree-cfg.h" #include "tree-stdarg.h" +#include "tree-chkp.h" /* A simple pass that attempts to optimize stdarg functions on architectures that need to save register arguments to stack on entry to stdarg functions. @@ -1047,6 +1048,11 @@ expand_ifn_va_arg_1 (function *fun) unsigned int nargs = gimple_call_num_args (stmt); gcc_assert (useless_type_conversion_p (TREE_TYPE (lhs), type)); + /* We replace call with a new expr. This may require + corresponding bndret call fixup. */ + if (chkp_function_instrumented_p (fun->decl)) + chkp_fixup_inlined_call (lhs, expr); + if (nargs == 3) { /* We've transported the size of with WITH_SIZE_EXPR here as |