diff options
author | Jakub Jelinek <jakub@redhat.com> | 2014-11-14 18:28:11 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2014-11-14 18:28:11 +0100 |
commit | ab9a4330370dccbb9559c4edf032f49e925e951c (patch) | |
tree | 1b257a63c484c45a3351c726bc7041b331cff4ad /gcc/gimple.c | |
parent | 18d11814af15e35f3cb103919585bceb5c470dc7 (diff) | |
download | gcc-ab9a4330370dccbb9559c4edf032f49e925e951c.zip gcc-ab9a4330370dccbb9559c4edf032f49e925e951c.tar.gz gcc-ab9a4330370dccbb9559c4edf032f49e925e951c.tar.bz2 |
sanopt.c: Include tree-ssa-operands.h.
* sanopt.c: Include tree-ssa-operands.h.
(struct sanopt_info): Add has_freeing_call_p,
has_freeing_call_computed_p, imm_dom_path_with_freeing_call_p,
imm_dom_path_with_freeing_call_computed_p, freeing_call_events,
being_visited_p fields.
(struct sanopt_ctx): Add asan_check_map field.
(imm_dom_path_with_freeing_call, maybe_optimize_ubsan_null_ifn,
maybe_optimize_asan_check_ifn): New functions.
(sanopt_optimize_walker): Use them, optimize even ASAN_CHECK
internal calls.
(pass_sanopt::execute): Call sanopt_optimize even for
-fsanitize=address.
* gimple.c (nonfreeing_call_p): Return true for non-ECF_LEAF
internal calls.
Co-Authored-By: Marek Polacek <polacek@redhat.com>
From-SVN: r217581
Diffstat (limited to 'gcc/gimple.c')
-rw-r--r-- | gcc/gimple.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/gimple.c b/gcc/gimple.c index 62f172b..ac75365 100644 --- a/gcc/gimple.c +++ b/gcc/gimple.c @@ -2538,6 +2538,9 @@ nonfreeing_call_p (gimple call) default: return true; } + else if (gimple_call_internal_p (call) + && gimple_call_flags (call) & ECF_LEAF) + return true; return false; } |