use kill_instruction() when killing any instructions during CSE
commit9d88dc64ceefc36c23ce89917a8d2f72d2419b3c
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>
Thu, 16 Feb 2017 04:57:07 +0000 (16 05:57 +0100)
committerChristopher Li <sparse@chrisli.org>
Thu, 16 Feb 2017 12:43:12 +0000 (16 20:43 +0800)
tree9d063ce3a25b9c9a3739c4a83f1eba0d29709582
parent75d548d5b14d492432fcac1a6dc29c07f57faaac
use kill_instruction() when killing any instructions during CSE

Instructions removed during CSE had their ->bb simply set to NULL
and the usage of their operand was not adjusted.

Fix that by calling kill_instruction().

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Signed-off-by: Christopher Li <sparse@chrisli.org>
cse.c
validation/kill-cse.c [new file with mode: 0644]