VirtRegMap: Improve addMBBLiveIns() using SlotIndex::MBBIndexIterator; NFC
authorMatthias Braun <matze@braunis.de>
Wed, 9 Sep 2015 18:07:54 +0000 (18:07 +0000)
committerMatthias Braun <matze@braunis.de>
Wed, 9 Sep 2015 18:07:54 +0000 (18:07 +0000)
commit6111cd8660c5fca74db6f3ee68d2581037bd60b3
treeb905e82ddbd4a82bf19d8967077263d4bd34dc26
parent9146833fa313fb0339355f9ca8b63122dd73ba88
VirtRegMap: Improve addMBBLiveIns() using SlotIndex::MBBIndexIterator; NFC

Now that we have an explicit iterator over the idx2MBBMap in SlotIndices
we can use the fact that segments and the idx2MBBMap is sorted by
SlotIndex position so can advance both simultaneously instead of
starting from the beginning for each segment.

This complicates the code for the subregister case somewhat but should
be more efficient and has the advantage that we get the final lanemask
for each block immediately which will be important for a subsequent
change.

Removes the now unused SlotIndexes::findMBBLiveIns function.

Differential Revision: http://reviews.llvm.org/D12443

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247170 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/CodeGen/LiveIntervalAnalysis.h
include/llvm/CodeGen/SlotIndexes.h
lib/CodeGen/VirtRegMap.cpp