diff options
| author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2018-03-09 14:17:21 +0100 |
|---|---|---|
| committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2018-03-14 23:19:54 +0100 |
| commit | fee392ffe3d680b0a8df9ca1960998e8677e744a (patch) | |
| tree | 3d9b961bcb3af242567e2f8745c5ec28fcb4fd8f /flow.c | |
| parent | 5744e177de56c2dd560af3e3eb551e61182dd9fa (diff) | |
| download | sparse-dev-fee392ffe3d680b0a8df9ca1960998e8677e744a.tar.gz | |
optim: load simplification should repeat optimization
convert_load_instrcution() & rewrite_load_instruction() remove
a load instruction and as such should retrigger optimization of
symbols.
Do this by setting REPEAT_SYMBOL_CLEANUP at the end of these
two functions.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'flow.c')
| -rw-r--r-- | flow.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -306,6 +306,7 @@ void convert_load_instruction(struct instruction *insn, pseudo_t src) { convert_instruction_target(insn, src); kill_instruction(insn); + repeat_phase |= REPEAT_SYMBOL_CLEANUP; } static int overlapping_memop(struct instruction *a, struct instruction *b) @@ -459,7 +460,7 @@ void rewrite_load_instruction(struct instruction *insn, struct pseudo_list *domi FOR_EACH_PTR(dominators, phi) { kill_instruction(phi->def); } END_FOR_EACH_PTR(phi); - return; + goto end; complex_phi: /* We leave symbol pseudos with a bogus usage list here */ @@ -467,6 +468,9 @@ complex_phi: kill_use(&insn->src); insn->opcode = OP_PHI; insn->phi_list = dominators; + +end: + repeat_phase |= REPEAT_SYMBOL_CLEANUP; } static int find_dominating_stores(pseudo_t pseudo, struct instruction *insn, |
