Re: RFA: Fix dse / postreload not to bypass add expanders

2011-11-04 Thread amylaar
Quoting Paolo Bonzini : Unless I'm missing something, this is going all the way down to the end of the function, bypassing the CFG, so it is neither efficient nor correct. new_insn hasn't been emitted yet, hence it is a single insn or a short chain of insn to implement a no-op move (for a post

Re: RFA: Fix dse / postreload not to bypass add expanders

2011-11-04 Thread Eric Botcazou
> Unless I'm missing something, this is going all the way down to the end > of the function, bypassing the CFG, so it is neither efficient nor correct. No, gen_ functions doesn't emit the instructions. > For DSE you should set up backwards liveness simulation, and use that > instead of note_store

Re: RFA: Fix dse / postreload not to bypass add expanders

2011-11-04 Thread Paolo Bonzini
On 11/03/2011 08:01 PM, Eric Botcazou wrote: + info.insert_before = insn; + info.first = new_insn; + info.fixed_regs_live = insn_info->fixed_regs_live; + info.failure = false; + for (cur = new_insn; cur; cur = NEXT_INSN (cur)) +{ + info.current = cur; + note_stores (PATTERN (cu

Re: RFA: Fix dse / postreload not to bypass add expanders

2011-11-03 Thread Eric Botcazou
> This patch makes emit_inc_dec_insn_before use add3_insn / gen_move_insn > so that the appropriate expanders are used to create the new instructions, > and for dse it use the available register liveness information to check > that no live fixed hard register, like a flags register, is clobbered in