On Sat, Mar 1, 2008 at 11:13 AM, Jan Hubicka <[EMAIL PROTECTED]> wrote: > > Diego, > > > > I am leaning to just adding noop moves at the birthpoints (dominance > > frontiers) as real noop move insns in the streams in the passes that use > > ud or du chains. The back end is tolerant of noop moves and without > > Hi, > while I am with Diego that would preffer PHI nodes on side especially in > FUD chain where rest of your SSA is on side too. But if we go with the > extra instruction scheme, I think you are much better to use RTL USE > instruction. The moves are generated by target machinery and can do > funny things, like clobbering flags or whatever. USEs are transparent > this way.
I think that without the extra instruction it will be difficult to keep the FUD chains up to date. One of the nice features of the extra instruction (be it a PHI, trivial move, or a USE) is that it explicitly gives you a new location for a DEF. That makes updating things a lot easier, I suspect. Consider e.g. replacing an operand in an insn. Because you know only the DEF of operand in the the extra instruction will reach, you can update UD chains right away. This is harder if there are more reaching defs. The most trivial example I can think of is e.g. 1 if (c) 2 x = ...; D1(x) 3 else 4 x = ...; D2(x) 5 6 y = x; D4(y), U2(x), UD(U2,D1), UD(U2,D2) 7 z = y; D5(z), U3(y), UD(U3,D4) If you copy propagate x to z, you have to add an extra UD chain. With the extra instruction, you don't: 1 if (c) 2 x = ...; D1(x) 3 else 4 x = ...; D2(x) 5 6 x = x; D3(x), U1(x), UD(U1,D1|D2) 6 y = x; D4(y), U2(x), UD(U2,D3) 7 z = y; D5(z), U3(y), UD(U3,D4) For the location of the extra instructions, I would *not* keep them on the side. If you have something special going on, my motto is: "Make it explicit". Gr. Steven