if-to-switch: remove memory leaks
authorMartin Liska <mliska@suse.cz>
Fri, 8 Jan 2021 13:28:29 +0000 (14:28 +0100)
committerMartin Liska <mliska@suse.cz>
Mon, 11 Jan 2021 08:18:28 +0000 (09:18 +0100)
commitfa4586d8545f9730f9acdba8978b69f7cc026bb6
tree99001aa04b3bab35cf46e64cf92debd6890046f4
parentbcb3065b2ba6efb967c3a34fc34b09726f7579d1
if-to-switch: remove memory leaks

gcc/ChangeLog:

* gimple-if-to-switch.cc (struct condition_info): Use auto_var.
(if_chain::is_beneficial): Delete clusters
(find_conditions): Make second argument of conditions_in_bbs a
pointer so that we control over it's lifetime.
(pass_if_to_switch::execute): Delete them.
gcc/gimple-if-to-switch.cc