Rename llvm::Optional<T>::Reset to 'reset' as per LLVM naming conventions.

Code review feedback on r175580 from Jordan Rose.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175595 91177308-0d34-0410-b5e6-96231b3b80d8
Add preservation of SlotIndexes to PHIElimination.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175596 91177308-0d34-0410-b5e6-96231b3b80d8
Avoid recomputing an inserted instruction's SlotIndex.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175597 91177308-0d34-0410-b5e6-96231b3b80d8
Remove verification after PHIElimination when using LiveIntervals, and move it
after the two-address pass. The remaining problems in 'make check' are occurring
later.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175598 91177308-0d34-0410-b5e6-96231b3b80d8
Fix a misunderstanding about how RegMaskBlocks works. This was caught by
assertions in the register allocator when running 'make check' without
LiveVariables.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175599 91177308-0d34-0410-b5e6-96231b3b80d8
Make SlotIndex::getEntry() return unsigned to match IndexListEntry.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175600 91177308-0d34-0410-b5e6-96231b3b80d8
Add SlotIndexes::repairIndexesInRange(), which repairs SlotIndexes after adding
and removing instructions. The implementation seems more complicated than it
needs to be, but I couldn't find something simpler that dealt with all of the
corner cases.

Also add a call to repairIndexesInRange() from repairIntervalsInRange().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175601 91177308-0d34-0410-b5e6-96231b3b80d8
Modify LiveInterval::addRange() to match the comment about what it returns.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175602 91177308-0d34-0410-b5e6-96231b3b80d8
Move the computation of the IsEarlyClobber flag into its own loop, since the
correct value is needed in every iteration of the loop for updating
LiveIntervals.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175603 91177308-0d34-0410-b5e6-96231b3b80d8
Add support to the two-address pass for updating LiveIntervals in many of the
common transformations. This includes updating repairIntervalsInRange() to
handle more cases.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175604 91177308-0d34-0410-b5e6-96231b3b80d8