r175673 changed repairIntervalsInRange to find anchoring end points for
ranges automatically, but the calculation of Begin included the first
instruction found that already had an index. This patch changes it to
exclude that instruction:
- For symmetry, so that the half open range [Begin,End) only includes instructions that do not already have indexes.
- As a possible performance improvement, since repairOldRegInRange will scan fewer instructions.
- Because repairOldRegInRange hits assertion failures in some cases when it sees a def that already has a live interval.
(3) fixes about ten tests in the CodeGen lit test suite when
-early-live-intervals is forced on.
I haven't given this code an in-depth look, but the first thing I noticed is that it gets the preceding iterator: how do we know that std::prev(Begin) is actually valid?