[PATCH] Add a case to LiveIntervalAnalysis::HandleMoveUp
Jakob Stoklund Olesen
stoklund at 2pi.dk
Tue Mar 5 11:00:18 PST 2013
On Feb 23, 2013, at 9:46 AM, Vincent Lejeune <vljn at ovi.com> wrote:
> A sequence of move :80B -> 8B:
> %vreg16: [48r,64r:2)[64r,80r:3)[80r,96B:4)[96B,336r:0)[448B,640r:0)[640r,672r:1)[672r,688r:5)[688r,704r:6)[704r,816B:7) 0 at 96B-phi 1 at 640r 2 at 48r 3 at 64r 4 at 80r 5 at 672r 6 at 688r 7 at 704r
> --> [8r,48r:4)[48r,64r:2)[64r,96B:3)[96B,336r:0)[448B,640r:0)[640r,672r:1)[672r,688r:5)[688r,704r:6)[704r,816B:7) 0 at 96B-phi 1 at 640r 2 at 48r 3 at 64r 4 at 8r 5 at 672r 6 at 688r 7 at 704r
This illustrates the problem I was worried about. Before the change, value number 4 is live-out at 96B, after the change value number 3 is live-out.
In this case it looks like the live-out value number only reaches a PHI, but I didn't see anything in the patch checking for that. What if value number 4 were used in other blocks? You would have value number 3 live out of one block, and value number 4 live in to a successor.
As Andy pointed out, it is important to update the undef flags as well when you're reordering defs.
/jakob
More information about the llvm-commits
mailing list