Hi again, sorry for the delay, On Fri, Jun 23, 2017 at 11:01:12PM -0300, Alexandre Oliva wrote: > > Things should probably be restructured a bit so we keep the sets count > > correct, if that is possible? > > I'll have to think a bit to figure out the exact conditions in which to > decrement the sets count, and reset the recorded value. I was thinking > the conditions were the same; am I missing something? > > Or are you getting at cases in which we should do both and don't, or > vice-versa? E.g., if reg_referenced_p holds but the subsequent test > doesn't? I guess we do, but don't we have to distinguish the cases of > an original unused set remaining from that of reusing the pseudo for a > new set? > > Do we have to test whether from_insn still reg_sets_p the REG_UNUSED > operand, when from_insn is not i3? (e.g., it could be something that > remains set in i1 as a side effect, but that's not used in either i2 or > i3) > > Am I overdoing this? The situations I had to analyze in the patch I > posted before were much simpler, and even then I now think I missed a > number of them :-)
Yeah you're overdoing it ;-) I meant, just double check if your new code does the correct thing for the set count. It wasn't obvious to me (this code is horribly complicated). Whether all existing code is correct... it's probably best not to look too closely :-/ If you have a patch you feel confident in, could you post it again please? Segher p.s. What I still want to do is never reuse a set pseudo, always create a new pseudo instead. This will get rid of many existing bugs, and a lot of the complications in existing code. Unfortunately not everything is set up yet for creating new pseudos during combine.