On functions with large number of basic block live-in virtual register set computation on every BB in the scheduler takes very long time. Currently it has complexity:
C1 = O(NumVirtRegs * lg(averageLiveRangeSegmentsPerReg) * BBNumber).
This patch changes the complexity to:
C2 = O(NumVirtRegs * averageLiveRangeSegmentsPerReg * lg(BBNumber)).
For this purpose live-ins are calculated all at once for all BBs. BB's starting SlotIndexes are collected and sorted and then searched using binary seach from within LiveRange segments giving logarithm on BB number. This gives almost 3 times speedup on luxmark hotel scene.