diff options
author | Evan Cheng <evan.cheng@apple.com> | 2007-04-25 19:34:00 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2007-04-25 19:34:00 +0000 |
commit | e96f50142e8d12a2e12c3329bffb372e09731dd2 (patch) | |
tree | d03b5675ec1c8081eefebdfc46fb4739a3b2fbc7 /include | |
parent | c20a64d2bb8c60599f8f4fce755323273f0c84cc (diff) | |
download | llvm-e96f50142e8d12a2e12c3329bffb372e09731dd2.tar.gz llvm-e96f50142e8d12a2e12c3329bffb372e09731dd2.tar.bz2 llvm-e96f50142e8d12a2e12c3329bffb372e09731dd2.tar.xz |
Data structure change to improve compile time (especially in debug mode).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36447 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/CodeGen/LiveVariables.h | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/include/llvm/CodeGen/LiveVariables.h b/include/llvm/CodeGen/LiveVariables.h index da267c5ddd..5b42a71318 100644 --- a/include/llvm/CodeGen/LiveVariables.h +++ b/include/llvm/CodeGen/LiveVariables.h @@ -31,12 +31,12 @@ #include "llvm/CodeGen/MachineFunctionPass.h" #include "llvm/ADT/BitVector.h" +#include "llvm/ADT/SmallVector.h" #include <map> namespace llvm { class MRegisterInfo; -class BitVector; class LiveVariables : public MachineFunctionPass { public: @@ -127,28 +127,24 @@ private: // Intermediate data structures // PhysRegInfo - Keep track of which instruction was the last def/use of a // physical register. This is a purely local property, because all physical // register references as presumed dead across basic blocks. - std::vector<MachineInstr*> PhysRegInfo; + MachineInstr **PhysRegInfo; // PhysRegUsed - Keep track whether the physical register has been used after // its last definition. This is local property. - BitVector PhysRegUsed; - - // PhysRegPartDef - Keep track of a list of instructions which "partially" - // defined the physical register (e.g. on X86 AX partially defines EAX). - // These are turned into use/mod/write if there is a use of the register - // later in the same block. This is local property. - std::vector<std::vector<MachineInstr*> > PhysRegPartDef; + bool *PhysRegUsed; // PhysRegPartUse - Keep track of which instruction was the last partial use // of a physical register (e.g. on X86 a def of EAX followed by a use of AX). // This is a purely local property. - std::vector<MachineInstr*> PhysRegPartUse; + MachineInstr **PhysRegPartUse; - typedef std::map<const MachineBasicBlock*, - std::vector<unsigned> > PHIVarInfoMap; - - PHIVarInfoMap PHIVarInfo; + // PhysRegPartDef - Keep track of a list of instructions which "partially" + // defined the physical register (e.g. on X86 AX partially defines EAX). + // These are turned into use/mod/write if there is a use of the register + // later in the same block. This is local property. + SmallVector<MachineInstr*, 4> *PhysRegPartDef; + SmallVector<unsigned, 4> *PHIVarInfo; /// addRegisterKilled - We have determined MI kills a register. Look for the /// operand that uses it and mark it as IsKill. |