From 14edd1989b06ed7cc7f933d691b56e0a67fa76ce Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Thu, 15 Feb 2007 05:59:24 +0000 Subject: Use BitVector instead of vector which can be extremely slow. llvm-svn: 34302 --- llvm/lib/CodeGen/LiveIntervalAnalysis.cpp | 2 +- llvm/lib/CodeGen/RegAllocLocal.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'llvm/lib/CodeGen') diff --git a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp b/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp index 83852ca8b9c..57a73d2642b 100644 --- a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp +++ b/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp @@ -461,7 +461,7 @@ void LiveIntervals::handleVirtualRegisterDef(MachineBasicBlock *mbb, // If the kill happens after the definition, we have an intra-block // live range. if (killIdx > defIndex) { - assert(vi.AliveBlocks.empty() && + assert(vi.AliveBlocks.none() && "Shouldn't be alive across any blocks!"); LiveRange LR(defIndex, killIdx, ValNum); interval.addRange(LR); diff --git a/llvm/lib/CodeGen/RegAllocLocal.cpp b/llvm/lib/CodeGen/RegAllocLocal.cpp index 74d76c14fc4..f862023e8f8 100644 --- a/llvm/lib/CodeGen/RegAllocLocal.cpp +++ b/llvm/lib/CodeGen/RegAllocLocal.cpp @@ -789,7 +789,7 @@ bool RA::runOnMachineFunction(MachineFunction &Fn) { // is allocatable. To handle this, we mark all unallocatable registers as // being pinned down, permanently. { - std::vector Allocable = RegInfo->getAllocatableSet(Fn); + BitVector Allocable = RegInfo->getAllocatableSet(Fn); for (unsigned i = 0, e = Allocable.size(); i != e; ++i) if (!Allocable[i]) PhysRegsUsed[i] = -2; // Mark the reg unallocable. -- cgit v1.2.3