diff options
| author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2020-10-23 23:05:34 +0200 |
|---|---|---|
| committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2020-10-25 13:50:19 +0100 |
| commit | 90b4b36dc834a8f53638bd84036da4c2c2f841f1 (patch) | |
| tree | 319aec17515a8305ca2d56283abcdc011ad2ea61 /validation | |
| parent | cfca7b4c6cb48283cb554fc91dc859ff669f2547 (diff) | |
| download | sparse-dev-90b4b36dc834a8f53638bd84036da4c2c2f841f1.tar.gz | |
kill dead instructions before any other simplifications
Dead instructions are removed when simplify_instruction() is
called but this is done in various places, depending on the kind
of instructions, sometimes after other simplifications.
Change this by using the instruction's flag OPF_TARGET at the very
beginning of simplify_instruction() to test which instructions are
dead and thus can be removed.
Note: OP_CALLs are special here as they're considered as always
returning a value but only calls to pure functions are
removed. This is OK since pure functions should always
return a value.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'validation')
0 files changed, 0 insertions, 0 deletions
