Clean-up EH after strlen transformation (PR tree-optimization/83593).
authorMartin Liska <mliska@suse.cz>
Wed, 3 Jan 2018 14:53:39 +0000 (15:53 +0100)
committerMartin Liska <marxin@gcc.gnu.org>
Wed, 3 Jan 2018 14:53:39 +0000 (14:53 +0000)
commitfa9544ab4df0e88946488fb82f4b994bf36a97ff
tree492c3269956564477d25ff7f41e7c18a26b09745
parentca04a532f3fcf91939ec03da628aa94207eaa067
Clean-up EH after strlen transformation (PR tree-optimization/83593).

2018-01-03  Martin Liska  <mliska@suse.cz>

PR tree-optimization/83593
* tree-ssa-strlen.c: Include tree-cfg.h.
(strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
(strlen_dom_walker): Add new member variable m_cleanup_cfg.
(strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
to false.
(strlen_dom_walker::before_dom_children): Call
gimple_purge_dead_eh_edges. Dump tranformation with details
dump flags.
(strlen_dom_walker::before_dom_children): Update call by adding
new argument cleanup_eh.
(pass_strlen::execute): Return TODO_cleanup_cfg if needed.
2018-01-03  Martin Liska  <mliska@suse.cz>

PR tree-optimization/83593
* gcc.dg/pr83593.c: New test.

From-SVN: r256178
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr83593.c [new file with mode: 0644]
gcc/tree-ssa-strlen.c