add killing of non-volatile loads
commitc3420f1e8ad7af77c03c2946e826b5ad4692601e
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>
Thu, 16 Feb 2017 04:57:03 +0000 (16 05:57 +0100)
committerChristopher Li <sparse@chrisli.org>
Thu, 16 Feb 2017 12:43:09 +0000 (16 20:43 +0800)
tree62f262bb397997fb17f2585df97157ec90086054
parentc17cd10a6a94640575c551fa8d72097cc7626e83
add killing of non-volatile loads

OP_LOADs were ignored by kill_instruction() but there are two cases
were something can or must be done:
1) if the is not a volatile one, it is free of side-effects and can thus
   be optimized away like others instructions.
2) if force-killed then we need to adjust the usage of its operand.

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