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)
commitcc58005885cb4bc048a5ea68e44e30f3f954fe8c
tree61d2930317a724a48fddbdf895e690d90a5997d5
parentd5004e1c69a0aef3199f11f3b2670282e52f86b9
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

llvm-svn: 247170
llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
llvm/include/llvm/CodeGen/SlotIndexes.h
llvm/lib/CodeGen/VirtRegMap.cpp