Speed up use-after-scope (v2): rewrite into SSA
authorMartin Liska <mliska@suse.cz>
Mon, 23 Jan 2017 12:02:13 +0000 (13:02 +0100)
committerMartin Liska <marxin@gcc.gnu.org>
Mon, 23 Jan 2017 12:02:13 +0000 (12:02 +0000)
commitc7775327e8cf214872b3d179bfaa1b441759ab5a
tree1ab9205a738735b127304a898b222670154c0f01
parent913e4b3617fe7f46fbdbb72b010cf6cf7201d329
Speed up use-after-scope (v2): rewrite into SSA

2017-01-23  Martin Liska  <mliska@suse.cz>

* asan.c (create_asan_shadow_var): New function.
(asan_expand_poison_ifn): Likewise.
* asan.h (asan_expand_poison_ifn): New declaration.
* internal-fn.c (expand_ASAN_POISON): Likewise.
* internal-fn.def (ASAN_POISON): New builtin.
* sanopt.c (pass_sanopt::execute): Expand
asan_expand_poison_ifn.
* tree-inline.c (copy_decl_for_dup_finish): Make function
external.
* tree-inline.h (copy_decl_for_dup_finish): Likewise.
* tree-ssa.c (is_asan_mark_p): New function.
(execute_update_addresses_taken): Rewrite local variables
(identified just by use-after-scope as addressable) into SSA.
2017-01-23  Martin Liska  <mliska@suse.cz>

* gcc.dg/asan/use-after-scope-3.c: Add additional flags.
* gcc.dg/asan/use-after-scope-9.c: Likewise and grep for
sanopt optimization for ASAN_POISON.

From-SVN: r244791
12 files changed:
gcc/ChangeLog
gcc/asan.c
gcc/asan.h
gcc/internal-fn.c
gcc/internal-fn.def
gcc/sanopt.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/asan/use-after-scope-3.c
gcc/testsuite/gcc.dg/asan/use-after-scope-9.c
gcc/tree-inline.c
gcc/tree-inline.h
gcc/tree-ssa.c