Improve optimization of ASan checks.
authorYury Gribov <y.gribov@samsung.com>
Wed, 3 Dec 2014 09:23:28 +0000 (09:23 +0000)
committerYury Gribov <ygribov@gcc.gnu.org>
Wed, 3 Dec 2014 09:23:28 +0000 (09:23 +0000)
commite28f2090dbbb50728e9c0933df59e1788307f59b
tree1c2d2b5bc2b0c7ac4b2506c7c626622a96199bd0
parent45392c76508048665ea5ad3269b59894724d5cb5
Improve optimization of ASan checks.

2014-12-03  Yury Gribov  <y.gribov@samsung.com>

gcc/
* sanopt.c (maybe_get_single_definition): New function.
(maybe_get_dominating_check): Ditto.
(can_remove_asan_check): Ditto.
(struct tree_map_traits): New struct.
(struct sanopt_ctx): Use custom traits for asan_check_map.
(maybe_optimize_ubsan_null_ifn): Move code to
maybe_get_dominating_check.
(maybe_optimize_asan_check_ifn): Move code and take non-SSA expressions
into account when optimizing.
(sanopt_optimize_walker): Optimize ASan checks even when
recovering.

From-SVN: r218304
gcc/ChangeLog
gcc/sanopt.c