BasicAA knows how to analyze phis, but to control compile time, we're fairly limited in doing so. This patch looses that restriction when there is exactly one phi input (after discounting induction variable increments). The result of this is that we can handle more cases around nested and sibling loops with pointer induction variables.
A few points to note.
- I could be even more restrictive here and restrict this to exactly one incoming value. (Right now, I allow one phi, and an arbitrary number of other values.) I don't have a strong preference here, reviewer comments welcome.
- As seen in the test file, we're still missing cases which aren't *directly* based on phis (e.g. using the indvar increment). I believe this to be a separate problem and am going to explore this in another patch once this one lands.
- As seen in the test file, this results in the unfortunate fact that using phivalues sometimes results in worse quality results. I believe this comes down to an oversight in how recursive phi detection was implemented for phivalues. I'm happy to tackle this in a follow up change.