mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-04-12 07:37:34 +00:00
Skip a binary search when possible.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129293 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
6d73c7dad1
commit
3d32202748
@ -545,6 +545,8 @@ namespace llvm {
|
||||
|
||||
/// Returns the basic block which the given index falls in.
|
||||
MachineBasicBlock* getMBBFromIndex(SlotIndex index) const {
|
||||
if (MachineInstr *MI = getInstructionFromIndex(index))
|
||||
return MI->getParent();
|
||||
SmallVectorImpl<IdxMBBPair>::const_iterator I =
|
||||
std::lower_bound(idx2MBBMap.begin(), idx2MBBMap.end(), index);
|
||||
// Take the pair containing the index
|
||||
|
Loading…
x
Reference in New Issue
Block a user