IntervalMap iterators are heavyweight, so avoid copying them around and use
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Thu, 9 Dec 2010 01:06:52 +0000 (01:06 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Thu, 9 Dec 2010 01:06:52 +0000 (01:06 +0000)
commita35cce1a14d8eee7e250e02b03903a5096d22c2f
treed5cc5f0114d22c6c37bb427536188e6393a3ca3d
parent0a29c270b53f15723811783c572d06b9500a7e8f
IntervalMap iterators are heavyweight, so avoid copying them around and use
references instead.

Similarly, IntervalMap::begin() is almost as expensive as find(), so use find(x)
instead of begin().advanceTo(x);

This makes RegAllocBasic run another 5% faster.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121344 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/LiveIntervalUnion.cpp
lib/CodeGen/LiveIntervalUnion.h