From 580607928bc87fa22ad5a71a16e0025722b339ea Mon Sep 17 00:00:00 2001 From: Owen Anderson Date: Thu, 24 Jan 2008 01:10:07 +0000 Subject: Move some functionality for adding flags to MachineInstr's into methods on MachineInstr rather than LiveVariables. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46295 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/CodeGen/LiveVariables.h | 25 ++----------------------- 1 file changed, 2 insertions(+), 23 deletions(-) (limited to 'include/llvm/CodeGen/LiveVariables.h') diff --git a/include/llvm/CodeGen/LiveVariables.h b/include/llvm/CodeGen/LiveVariables.h index a392cdaffb..5c714e308a 100644 --- a/include/llvm/CodeGen/LiveVariables.h +++ b/include/llvm/CodeGen/LiveVariables.h @@ -196,26 +196,13 @@ public: /// the records for NewMI. void instructionChanged(MachineInstr *OldMI, MachineInstr *NewMI); - /// transferKillDeadInfo - Similar to instructionChanged except it does not - /// update live variables internal data structures. - static void transferKillDeadInfo(MachineInstr *OldMI, MachineInstr *NewMI, - const MRegisterInfo *RegInfo); - - /// addRegisterKilled - We have determined MI kills a register. Look for the - /// 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. - static bool addRegisterKilled(unsigned IncomingReg, MachineInstr *MI, - const MRegisterInfo *RegInfo, - bool AddIfNotFound = false); - /// addVirtualRegisterKilled - Add information about the fact that the /// specified register is killed after being used by the specified /// 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, RegInfo, AddIfNotFound)) + if (MI->addRegisterKilled(IncomingReg, RegInfo, AddIfNotFound)) getVarInfo(IncomingReg).Kills.push_back(MI); } @@ -246,21 +233,13 @@ public: /// removeVirtualRegistersKilled - Remove all killed info for the specified /// instruction. void removeVirtualRegistersKilled(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. If - /// AddIfNotFound is true, add a implicit operand if it's not found. Returns - /// true if the operand exists / is added. - static bool addRegisterDead(unsigned IncomingReg, MachineInstr *MI, - const MRegisterInfo *RegInfo, - bool AddIfNotFound = false); /// addVirtualRegisterDead - Add information about the fact that the specified /// 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, RegInfo, AddIfNotFound)) + if (MI->addRegisterDead(IncomingReg, RegInfo, AddIfNotFound)) getVarInfo(IncomingReg).Kills.push_back(MI); } -- cgit v1.2.3