Uros Bizjak <ubiz...@gmail.com> writes: > On Fri, Jan 13, 2012 at 10:00 AM, Eric Botcazou <ebotca...@adacore.com> wrote: >>> The problem my patch solves is the answer to the question "Is the >>> choosen non-live temporary register untouched over the insn >>> sequence?". The answer: "Yes, if it was not set or clobbered by any >>> insn in the sequence". >> >> Are you sure that you don't need to do this in addition to the existing test, >> instead of in lieu of the existing test? > > Yes, because new test ALWAYS includes the registers that were wrongly > marked as dead by previous test due to REG_UNUSED and noclobber > processing.
Yeah, the patch looks like the right fix to me FWIW. Being able to use DF_INSN_DEFS in this way is part of the point of having df: when going from one insn to the next within the same bb, there are no "hidden" influences that would cause a register to become live outside of DF_INSN_DEFS. The only requirement is that we call df_insn_rescan on new instructions, and we do (in peep2_update_life, where we need it for df_simulate_one_insn_backwards). Or to put it another way: the insn-to-insn changes in the current liveness sets are all produced by df_simulate_one_insn_{backwards,forwards}, which uses the same information. So I don't think there's any reason why we need to keep the current code as well. Richard