aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/VirtRegMap.h
diff options
context:
space:
mode:
authorMike Stump <mrs@apple.com>2009-05-04 18:40:41 +0000
committerMike Stump <mrs@apple.com>2009-05-04 18:40:41 +0000
commitfe095f39e7009c51d1c86769792ccbcad8cdd2ec (patch)
treec9883b04cd8a1416361a0b29a6a91bf2417bbf3e /lib/CodeGen/VirtRegMap.h
parent04fa35ab13afbbc5b2f12437a256db84a27485d2 (diff)
downloadexternal_llvm-fe095f39e7009c51d1c86769792ccbcad8cdd2ec.zip
external_llvm-fe095f39e7009c51d1c86769792ccbcad8cdd2ec.tar.gz
external_llvm-fe095f39e7009c51d1c86769792ccbcad8cdd2ec.tar.bz2
Restore minor deletion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70892 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/VirtRegMap.h')
-rw-r--r--lib/CodeGen/VirtRegMap.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/CodeGen/VirtRegMap.h b/lib/CodeGen/VirtRegMap.h
index 91c8322..507557d 100644
--- a/lib/CodeGen/VirtRegMap.h
+++ b/lib/CodeGen/VirtRegMap.h
@@ -32,6 +32,7 @@ namespace llvm {
class MachineInstr;
class MachineFunction;
class TargetInstrInfo;
+ class TargetRegisterInfo;
class VirtRegMap : public MachineFunctionPass {
public:
@@ -47,8 +48,11 @@ namespace llvm {
private:
const TargetInstrInfo *TII;
-
+ const TargetRegisterInfo *TRI;
MachineFunction *MF;
+
+ DenseMap<const TargetRegisterClass*, BitVector> allocatableRCRegs;
+
/// Virt2PhysMap - This is a virtual to physical register
/// mapping. Each virtual register is required to have an entry in
/// it; even spilled virtual registers (the register mapped to a
@@ -466,7 +470,7 @@ namespace llvm {
unsigned getFirstUnusedRegister(const TargetRegisterClass *RC) {
int Reg = UnusedRegs.find_first();
while (Reg != -1) {
- if (RC->contains(Reg))
+ if (allocatableRCRegs[RC][Reg])
return (unsigned)Reg;
Reg = UnusedRegs.find_next(Reg);
}