From e96f50142e8d12a2e12c3329bffb372e09731dd2 Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Wed, 25 Apr 2007 19:34:00 +0000 Subject: 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 --- include/llvm/CodeGen/LiveVariables.h | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) (limited to 'include') 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 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 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 > 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 PhysRegPartUse; + MachineInstr **PhysRegPartUse; - typedef std::map > 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 *PhysRegPartDef; + SmallVector *PHIVarInfo; /// addRegisterKilled - We have determined MI kills a register. Look for the /// operand that uses it and mark it as IsKill. -- cgit v1.2.3