[llvm-commits] CVS: llvm/include/llvm/CodeGen/LiveVariables.h
Changes in directory llvm/include/llvm/CodeGen: LiveVariables.h updated: 1.46 - 1.47 --- Log message: Properly handle kills of a physical register which has sub-registers that are read by later instructions. --- Diffs of the changes: (+10 -0) LiveVariables.h | 10 ++ 1 files changed, 10 insertions(+) Index: llvm/include/llvm/CodeGen/LiveVariables.h diff -u llvm/include/llvm/CodeGen/LiveVariables.h:1.46 llvm/include/llvm/CodeGen/LiveVariables.h:1.47 --- llvm/include/llvm/CodeGen/LiveVariables.h:1.46 Tue May 8 14:00:00 2007 +++ llvm/include/llvm/CodeGen/LiveVariables.h Tue Jun 26 16:02:59 2007 @@ -31,6 +31,7 @@ #include llvm/CodeGen/MachineFunctionPass.h #include llvm/ADT/BitVector.h +#include llvm/ADT/SmallSet.h #include llvm/ADT/SmallVector.h #include map @@ -163,6 +164,15 @@ bool addRegisterDead(unsigned IncomingReg, MachineInstr *MI, bool AddIfNotFound = false); + void addRegisterKills(unsigned Reg, MachineInstr *MI, +SmallSetunsigned, 4 SubKills); + + /// HandlePhysRegKill - Add kills of Reg and its sub-registers to the + /// uses. Pay special attention to the sub-register uses which may come below + /// the last use of the whole register. + bool HandlePhysRegKill(unsigned Reg, MachineInstr *MI, + SmallSetunsigned, 4 SubKills); + bool HandlePhysRegKill(unsigned Reg, MachineInstr *MI); void HandlePhysRegUse(unsigned Reg, MachineInstr *MI); void HandlePhysRegDef(unsigned Reg, MachineInstr *MI); ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/include/llvm/CodeGen/LiveVariables.h
Changes in directory llvm/include/llvm/CodeGen: LiveVariables.h updated: 1.45 - 1.46 --- Log message: Eliminate MarkVirtRegAliveInBlock recursion. --- Diffs of the changes: (+2 -0) LiveVariables.h |2 ++ 1 files changed, 2 insertions(+) Index: llvm/include/llvm/CodeGen/LiveVariables.h diff -u llvm/include/llvm/CodeGen/LiveVariables.h:1.45 llvm/include/llvm/CodeGen/LiveVariables.h:1.46 --- llvm/include/llvm/CodeGen/LiveVariables.h:1.45 Sun May 6 08:37:16 2007 +++ llvm/include/llvm/CodeGen/LiveVariables.h Tue May 8 14:00:00 2007 @@ -283,6 +283,8 @@ VarInfo getVarInfo(unsigned RegIdx); void MarkVirtRegAliveInBlock(VarInfo VRInfo, MachineBasicBlock *BB); + void MarkVirtRegAliveInBlock(VarInfo VRInfo, MachineBasicBlock *BB, + std::vectorMachineBasicBlock* WorkList); void HandleVirtRegUse(VarInfo VRInfo, MachineBasicBlock *MBB, MachineInstr *MI); }; ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/include/llvm/CodeGen/LiveVariables.h
Changes in directory llvm/include/llvm/CodeGen: LiveVariables.h updated: 1.39 - 1.40 --- Log message: Data structure change to improve compile time (especially in debug mode). --- Diffs of the changes: (+10 -14) LiveVariables.h | 24 ++-- 1 files changed, 10 insertions(+), 14 deletions(-) Index: llvm/include/llvm/CodeGen/LiveVariables.h diff -u llvm/include/llvm/CodeGen/LiveVariables.h:1.39 llvm/include/llvm/CodeGen/LiveVariables.h:1.40 --- llvm/include/llvm/CodeGen/LiveVariables.h:1.39 Wed Apr 25 02:30:23 2007 +++ llvm/include/llvm/CodeGen/LiveVariables.h Wed Apr 25 14:34:00 2007 @@ -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 @@ // 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::vectorMachineInstr* 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::vectorstd::vectorMachineInstr* 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::vectorMachineInstr* PhysRegPartUse; + MachineInstr **PhysRegPartUse; - typedef std::mapconst MachineBasicBlock*, - std::vectorunsigned 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. + SmallVectorMachineInstr*, 4 *PhysRegPartDef; + SmallVectorunsigned, 4 *PHIVarInfo; /// addRegisterKilled - We have determined MI kills a register. Look for the /// operand that uses it and mark it as IsKill. ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/include/llvm/CodeGen/LiveVariables.h
Changes in directory llvm/include/llvm/CodeGen: LiveVariables.h updated: 1.40 - 1.41 --- Log message: Be careful when to add implicit kill / dead operands. Don't add them during / post reg-allocation. --- Diffs of the changes: (+22 -14) LiveVariables.h | 36 ++-- 1 files changed, 22 insertions(+), 14 deletions(-) Index: llvm/include/llvm/CodeGen/LiveVariables.h diff -u llvm/include/llvm/CodeGen/LiveVariables.h:1.40 llvm/include/llvm/CodeGen/LiveVariables.h:1.41 --- llvm/include/llvm/CodeGen/LiveVariables.h:1.40 Wed Apr 25 14:34:00 2007 +++ llvm/include/llvm/CodeGen/LiveVariables.h Wed Apr 25 20:40:09 2007 @@ -147,12 +147,18 @@ SmallVectorunsigned, 4 *PHIVarInfo; /// addRegisterKilled - We have determined MI kills a register. Look for the - /// operand that uses it and mark it as IsKill. - void addRegisterKilled(unsigned IncomingReg, MachineInstr *MI); + /// operand that uses it and mark it as IsKill. If AddIfNotFound is true, + /// add a implicit operand if it's not found. Returns true if the operand + /// exists / is added. + bool addRegisterKilled(unsigned IncomingReg, MachineInstr *MI, + bool AddIfNotFound = false); /// addRegisterDead - We have determined MI defined a register without a use. - /// Look for the operand that defines it and mark it as IsDead. - void addRegisterDead(unsigned IncomingReg, MachineInstr *MI); + /// Look for the operand that defines it and mark it as IsDead. If + /// AddIfNotFound is true, add a implicit operand if it's not found. Returns + /// true if the operand exists / is added. + bool addRegisterDead(unsigned IncomingReg, MachineInstr *MI, + bool AddIfNotFound = false); void HandlePhysRegUse(unsigned Reg, MachineInstr *MI); void HandlePhysRegDef(unsigned Reg, MachineInstr *MI); @@ -189,11 +195,12 @@ /// addVirtualRegisterKilled - Add information about the fact that the /// specified register is killed after being used by the specified - /// instruction. - /// - void addVirtualRegisterKilled(unsigned IncomingReg, MachineInstr *MI) { -addRegisterKilled(IncomingReg, MI); -getVarInfo(IncomingReg).Kills.push_back(MI); + /// instruction. If AddIfNotFound is true, add a implicit operand if it's + /// not found. + void addVirtualRegisterKilled(unsigned IncomingReg, MachineInstr *MI, +bool AddIfNotFound = false) { +if (addRegisterKilled(IncomingReg, MI, AddIfNotFound)) + getVarInfo(IncomingReg).Kills.push_back(MI); } /// removeVirtualRegisterKilled - Remove the specified virtual @@ -225,11 +232,12 @@ void removeVirtualRegistersKilled(MachineInstr *MI); /// addVirtualRegisterDead - Add information about the fact that the specified - /// register is dead after being used by the specified instruction. - /// - void addVirtualRegisterDead(unsigned IncomingReg, MachineInstr *MI) { -addRegisterDead(IncomingReg, MI); -getVarInfo(IncomingReg).Kills.push_back(MI); + /// register is dead after being used by the specified instruction. If + /// AddIfNotFound is true, add a implicit operand if it's not found. + void addVirtualRegisterDead(unsigned IncomingReg, MachineInstr *MI, + bool AddIfNotFound = false) { +if (addRegisterDead(IncomingReg, MI, AddIfNotFound)) +getVarInfo(IncomingReg).Kills.push_back(MI); } /// removeVirtualRegisterDead - Remove the specified virtual ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/include/llvm/CodeGen/LiveVariables.h
Changes in directory llvm/include/llvm/CodeGen: LiveVariables.h updated: 1.36 - 1.37 --- Log message: Keep track of number of uses within the function per virtual register. --- Diffs of the changes: (+5 -1) LiveVariables.h |6 +- 1 files changed, 5 insertions(+), 1 deletion(-) Index: llvm/include/llvm/CodeGen/LiveVariables.h diff -u llvm/include/llvm/CodeGen/LiveVariables.h:1.36 llvm/include/llvm/CodeGen/LiveVariables.h:1.37 --- llvm/include/llvm/CodeGen/LiveVariables.h:1.36 Sat Mar 17 04:29:54 2007 +++ llvm/include/llvm/CodeGen/LiveVariables.h Tue Apr 17 15:22:11 2007 @@ -83,12 +83,16 @@ /// is a bit set which uses the basic block number as an index. BitVector UsedBlocks; +/// NumUses - Number of uses of this register across the entire function. +/// +unsigned NumUses; + /// Kills - List of MachineInstruction's which are the last use of this /// virtual register (kill it) in their basic block. /// std::vectorMachineInstr* Kills; -VarInfo() : DefInst(0) {} +VarInfo() : DefInst(0), NumUses(0) {} /// removeKill - Delete a kill corresponding to the specified /// machine instruction. Returns true if there was a kill ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/include/llvm/CodeGen/LiveVariables.h
Changes in directory llvm/include/llvm/CodeGen: LiveVariables.h updated: 1.37 - 1.38 --- Log message: VarInfo::UsedBlocks is no longer used. Remove. --- Diffs of the changes: (+0 -4) LiveVariables.h |4 1 files changed, 4 deletions(-) Index: llvm/include/llvm/CodeGen/LiveVariables.h diff -u llvm/include/llvm/CodeGen/LiveVariables.h:1.37 llvm/include/llvm/CodeGen/LiveVariables.h:1.38 --- llvm/include/llvm/CodeGen/LiveVariables.h:1.37 Tue Apr 17 15:22:11 2007 +++ llvm/include/llvm/CodeGen/LiveVariables.h Wed Apr 18 00:04:38 2007 @@ -79,10 +79,6 @@ /// BitVector AliveBlocks; -/// UsedBlocks - Set of blocks of which this value is actually used. This -/// is a bit set which uses the basic block number as an index. -BitVector UsedBlocks; - /// NumUses - Number of uses of this register across the entire function. /// unsigned NumUses; ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/include/llvm/CodeGen/LiveVariables.h
Changes in directory llvm/include/llvm/CodeGen: LiveVariables.h updated: 1.35 - 1.36 --- Log message: Track the BB's where each virtual register is used. --- Diffs of the changes: (+6 -0) LiveVariables.h |6 ++ 1 files changed, 6 insertions(+) Index: llvm/include/llvm/CodeGen/LiveVariables.h diff -u llvm/include/llvm/CodeGen/LiveVariables.h:1.35 llvm/include/llvm/CodeGen/LiveVariables.h:1.36 --- llvm/include/llvm/CodeGen/LiveVariables.h:1.35 Mon Feb 19 15:49:53 2007 +++ llvm/include/llvm/CodeGen/LiveVariables.h Sat Mar 17 04:29:54 2007 @@ -79,6 +79,10 @@ /// BitVector AliveBlocks; +/// UsedBlocks - Set of blocks of which this value is actually used. This +/// is a bit set which uses the basic block number as an index. +BitVector UsedBlocks; + /// Kills - List of MachineInstruction's which are the last use of this /// virtual register (kill it) in their basic block. /// @@ -116,6 +120,8 @@ BitVector ReservedRegisters; private: // Intermediate data structures + MachineFunction *MF; + const MRegisterInfo *RegInfo; MachineInstr **PhysRegInfo; ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/include/llvm/CodeGen/LiveVariables.h
Changes in directory llvm/include/llvm/CodeGen: LiveVariables.h updated: 1.32 - 1.33 --- Log message: Allow LiveVariables to track liveness of more registers. --- Diffs of the changes: (+5 -4) LiveVariables.h |9 + 1 files changed, 5 insertions(+), 4 deletions(-) Index: llvm/include/llvm/CodeGen/LiveVariables.h diff -u llvm/include/llvm/CodeGen/LiveVariables.h:1.32 llvm/include/llvm/CodeGen/LiveVariables.h:1.33 --- llvm/include/llvm/CodeGen/LiveVariables.h:1.32 Wed Feb 14 23:57:14 2007 +++ llvm/include/llvm/CodeGen/LiveVariables.h Sat Feb 17 05:07:08 2007 @@ -36,6 +36,7 @@ namespace llvm { class MRegisterInfo; +class BitVector; class LiveVariables : public MachineFunctionPass { public: @@ -108,11 +109,11 @@ /// std::vectorVarInfo VirtRegInfo; - /// AllocatablePhysicalRegisters - This vector keeps track of which registers - /// are actually register allocatable by the target machine. We can not track - /// liveness for values that are not in this set. + /// ReservedRegisters - This vector keeps track of which registers + /// are reserved register which are not allocatable by the target machine. + /// We can not track liveness for values that are in this set. /// - BitVector AllocatablePhysicalRegisters; + BitVector ReservedRegisters; private: // Intermediate data structures const MRegisterInfo *RegInfo; ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/include/llvm/CodeGen/LiveVariables.h
Changes in directory llvm/include/llvm/CodeGen: LiveVariables.h updated: 1.30 - 1.31 --- Log message: Do away with kill / dead maps. Move kill / dead info onto MI's. --- Diffs of the changes: (+36 -95) LiveVariables.h | 131 +++- 1 files changed, 36 insertions(+), 95 deletions(-) Index: llvm/include/llvm/CodeGen/LiveVariables.h diff -u llvm/include/llvm/CodeGen/LiveVariables.h:1.30 llvm/include/llvm/CodeGen/LiveVariables.h:1.31 --- llvm/include/llvm/CodeGen/LiveVariables.h:1.30 Tue Oct 3 02:20:20 2006 +++ llvm/include/llvm/CodeGen/LiveVariables.h Wed Nov 15 14:47:31 2006 @@ -107,23 +107,6 @@ /// std::vectorVarInfo VirtRegInfo; - /// RegistersKilled - This map keeps track of all of the registers that - /// are dead immediately after an instruction reads its operands. If an - /// instruction does not have an entry in this map, it kills no registers. - /// - std::mapMachineInstr*, std::vectorunsigned RegistersKilled; - - /// RegistersDead - This map keeps track of all of the registers that are - /// dead immediately after an instruction executes, which are not dead after - /// the operands are evaluated. In practice, this only contains registers - /// which are defined by an instruction, but never used. - /// - std::mapMachineInstr*, std::vectorunsigned RegistersDead; - - /// Dummy - An always empty vector used for instructions without dead or - /// killed operands. - std::vectorunsigned Dummy; - /// AllocatablePhysicalRegisters - This vector keeps track of which registers /// are actually register allocatable by the target machine. We can not track /// liveness for values that are not in this set. @@ -141,6 +124,15 @@ PHIVarInfoMap PHIVarInfo; + + /// addRegisterKilled - We have determined MI kills a register. Look for the + /// operand that uses it and mark it as IsKill. + void addRegisterKilled(unsigned IncomingReg, MachineInstr *MI); + + /// addRegisterDead - We have determined MI defined a register without a use. + /// Look for the operand that defines it and mark it as IsDead. + void addRegisterDead(unsigned IncomingReg, MachineInstr *MI); + void HandlePhysRegUse(unsigned Reg, MachineInstr *MI); void HandlePhysRegDef(unsigned Reg, MachineInstr *MI); @@ -153,55 +145,17 @@ virtual bool runOnMachineFunction(MachineFunction MF); - /// killed_iterator - Iterate over registers killed by a machine instruction - /// - typedef std::vectorunsigned::iterator killed_iterator; - - std::vectorunsigned getKillsVector(MachineInstr *MI) { -std::mapMachineInstr*, std::vectorunsigned ::iterator I = - RegistersKilled.find(MI); -return I != RegistersKilled.end() ? I-second : Dummy; - } - std::vectorunsigned getDeadDefsVector(MachineInstr *MI) { -std::mapMachineInstr*, std::vectorunsigned ::iterator I = - RegistersDead.find(MI); -return I != RegistersDead.end() ? I-second : Dummy; - } - - - /// killed_begin/end - Get access to the range of registers killed by a - /// machine instruction. - killed_iterator killed_begin(MachineInstr *MI) { -return getKillsVector(MI).begin(); - } - killed_iterator killed_end(MachineInstr *MI) { -return getKillsVector(MI).end(); - } - std::pairkilled_iterator, killed_iterator - killed_range(MachineInstr *MI) { -std::vectorunsigned V = getKillsVector(MI); -return std::make_pair(V.begin(), V.end()); - } - /// KillsRegister - Return true if the specified instruction kills the /// specified register. bool KillsRegister(MachineInstr *MI, unsigned Reg) const; - killed_iterator dead_begin(MachineInstr *MI) { -return getDeadDefsVector(MI).begin(); - } - killed_iterator dead_end(MachineInstr *MI) { -return getDeadDefsVector(MI).end(); - } - std::pairkilled_iterator, killed_iterator - dead_range(MachineInstr *MI) { -std::vectorunsigned V = getDeadDefsVector(MI); -return std::make_pair(V.begin(), V.end()); - } - /// RegisterDefIsDead - Return true if the specified instruction defines the /// specified register, but that definition is dead. bool RegisterDefIsDead(MachineInstr *MI, unsigned Reg) const; + + /// ModifiesRegister - Return true if the specified instruction modifies the + /// specified register. + bool ModifiesRegister(MachineInstr *MI, unsigned Reg) const; //======// // API to update live variable information @@ -217,19 +171,9 @@ /// instruction. /// void addVirtualRegisterKilled(unsigned IncomingReg, MachineInstr *MI) { -std::vectorunsigned V = RegistersKilled[MI]; -// Insert in a sorted order. -if (V.empty() || IncomingReg V.back()) { - V.push_back(IncomingReg); -} else { - std::vectorunsigned::iterator I = V.begin(); - for (; *I IncomingReg; ++I) -/*empty*/; - if (*I != IncomingReg) // Don't insert
[llvm-commits] CVS: llvm/include/llvm/CodeGen/LiveVariables.h
Changes in directory llvm/include/llvm/CodeGen: LiveVariables.h updated: 1.29 - 1.30 --- Log message: Fix for PR929: http://llvm.org/PR929 . The PHI nodes were being gone through for each instruction in a successor block for every block...resulting in some O(N^k) algorithm which wasn't very good for performance. Calculating this information up front and keeping it in a map made it much faster. --- Diffs of the changes: (+11 -1) LiveVariables.h | 12 +++- 1 files changed, 11 insertions(+), 1 deletion(-) Index: llvm/include/llvm/CodeGen/LiveVariables.h diff -u llvm/include/llvm/CodeGen/LiveVariables.h:1.29 llvm/include/llvm/CodeGen/LiveVariables.h:1.30 --- llvm/include/llvm/CodeGen/LiveVariables.h:1.29 Sat Sep 2 19:05:09 2006 +++ llvm/include/llvm/CodeGen/LiveVariables.h Tue Oct 3 02:20:20 2006 @@ -39,7 +39,7 @@ class LiveVariables : public MachineFunctionPass { public: /// VarInfo - This represents the regions where a virtual register is live in - /// the program. We represent this with three difference pieces of + /// the program. We represent this with three different pieces of /// information: the instruction that uniquely defines the value, the set of /// blocks the instruction is live into and live out of, and the set of /// non-phi instructions that are the last users of the value. @@ -136,9 +136,19 @@ MachineInstr **PhysRegInfo; bool *PhysRegUsed; + typedef std::mapconst MachineBasicBlock*, + std::vectorunsigned PHIVarInfoMap; + + PHIVarInfoMap PHIVarInfo; + void HandlePhysRegUse(unsigned Reg, MachineInstr *MI); void HandlePhysRegDef(unsigned Reg, MachineInstr *MI); + /// analyzePHINodes - Gather information about the PHI nodes in here. In + /// particular, we want to map the variable information of a virtual + /// register which is used in a PHI node. We map that to the BB the vreg + /// is coming from. + void analyzePHINodes(const MachineFunction Fn); public: virtual bool runOnMachineFunction(MachineFunction MF); ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/include/llvm/CodeGen/LiveVariables.h
Changes in directory llvm/include/llvm/CodeGen: LiveVariables.h updated: 1.28 - 1.29 --- Log message: Move two methods out of line, make them work when the record for a machine instruction includes physregs. --- Diffs of the changes: (+6 -28) LiveVariables.h | 34 ++ 1 files changed, 6 insertions(+), 28 deletions(-) Index: llvm/include/llvm/CodeGen/LiveVariables.h diff -u llvm/include/llvm/CodeGen/LiveVariables.h:1.28 llvm/include/llvm/CodeGen/LiveVariables.h:1.29 --- llvm/include/llvm/CodeGen/LiveVariables.h:1.28 Wed Jan 4 01:29:33 2006 +++ llvm/include/llvm/CodeGen/LiveVariables.h Sat Sep 2 19:05:09 2006 @@ -242,19 +242,8 @@ /// removeVirtualRegistersKilled - Remove all killed info for the specified /// instruction. - void removeVirtualRegistersKilled(MachineInstr *MI) { -std::mapMachineInstr*, std::vectorunsigned ::iterator I = - RegistersKilled.find(MI); -if (I != RegistersKilled.end()) { - std::vectorunsigned Regs = I-second; - for (unsigned i = 0, e = Regs.size(); i != e; ++i) { -bool removed = getVarInfo(Regs[i]).removeKill(MI); -assert(removed kill not in register's VarInfo?); - } - RegistersKilled.erase(I); -} - } - + void removeVirtualRegistersKilled(MachineInstr *MI); + /// addVirtualRegisterDead - Add information about the fact that the specified /// register is dead after being used by the specified instruction. /// @@ -292,21 +281,10 @@ return true; } - /// removeVirtualRegistersDead - Remove all of the specified dead - /// registers from the live variable information. - void removeVirtualRegistersDead(MachineInstr *MI) { -std::mapMachineInstr*, std::vectorunsigned ::iterator I = - RegistersDead.find(MI); -if (I != RegistersDead.end()) { - std::vectorunsigned Regs = I-second; - for (unsigned i = 0, e = Regs.size(); i != e; ++i) { -bool removed = getVarInfo(Regs[i]).removeKill(MI); -assert(removed kill not in register's VarInfo?); - } - RegistersDead.erase(I); -} - } - + /// removeVirtualRegistersDead - Remove all of the dead registers for the + /// specified instruction from the live variable information. + void removeVirtualRegistersDead(MachineInstr *MI); + virtual void getAnalysisUsage(AnalysisUsage AU) const { AU.setPreservesAll(); } ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits