aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2007-02-15 05:59:24 +0000
committerEvan Cheng <evan.cheng@apple.com>2007-02-15 05:59:24 +0000
commit61de82d8853a02fe39c47302432abb70a586704f (patch)
tree87756c0f1a5d6d7be522071cbb055acae26278dd /include/llvm/CodeGen
parentad1d5c3bc55249b3291338288c90773ce80df11a (diff)
Use BitVector instead of vector<bool> which can be extremely slow.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34302 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen')
-rw-r--r--include/llvm/CodeGen/LiveIntervalAnalysis.h3
-rw-r--r--include/llvm/CodeGen/LiveVariables.h5
2 files changed, 5 insertions, 3 deletions
diff --git a/include/llvm/CodeGen/LiveIntervalAnalysis.h b/include/llvm/CodeGen/LiveIntervalAnalysis.h
index 70c189df78..362b3545fb 100644
--- a/include/llvm/CodeGen/LiveIntervalAnalysis.h
+++ b/include/llvm/CodeGen/LiveIntervalAnalysis.h
@@ -22,6 +22,7 @@
#include "llvm/CodeGen/MachineFunctionPass.h"
#include "llvm/CodeGen/LiveInterval.h"
+#include "llvm/ADT/BitVector.h"
#include "llvm/ADT/IndexedMap.h"
namespace llvm {
@@ -54,7 +55,7 @@ namespace llvm {
typedef IndexedMap<unsigned> Reg2RegMap;
Reg2RegMap r2rMap_;
- std::vector<bool> allocatableRegs_;
+ BitVector allocatableRegs_;
public:
struct CopyRec {
diff --git a/include/llvm/CodeGen/LiveVariables.h b/include/llvm/CodeGen/LiveVariables.h
index 47801a9472..6e7e23d495 100644
--- a/include/llvm/CodeGen/LiveVariables.h
+++ b/include/llvm/CodeGen/LiveVariables.h
@@ -30,6 +30,7 @@
#define LLVM_CODEGEN_LIVEVARIABLES_H
#include "llvm/CodeGen/MachineFunctionPass.h"
+#include "llvm/ADT/BitVector.h"
#include <map>
namespace llvm {
@@ -75,7 +76,7 @@ public:
/// through. This is a bit set which uses the basic block number as an
/// index.
///
- std::vector<bool> AliveBlocks;
+ BitVector AliveBlocks;
/// Kills - List of MachineInstruction's which are the last use of this
/// virtual register (kill it) in their basic block.
@@ -111,7 +112,7 @@ private:
/// are actually register allocatable by the target machine. We can not track
/// liveness for values that are not in this set.
///
- std::vector<bool> AllocatablePhysicalRegisters;
+ BitVector AllocatablePhysicalRegisters;
private: // Intermediate data structures
const MRegisterInfo *RegInfo;