diff options
author | Owen Anderson <resistor@mac.com> | 2008-01-24 01:10:07 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2008-01-24 01:10:07 +0000 |
commit | b487e7215c4f70f3d98f8fbc0a11eb119afc1f37 (patch) | |
tree | c707073b206365f8422c7ae4d64d3e02b802c910 /include/llvm/CodeGen/LiveVariables.h | |
parent | 3ae054385cfe9f2fcef2d77f26839615b1d3e48b (diff) | |
download | external_llvm-b487e7215c4f70f3d98f8fbc0a11eb119afc1f37.zip external_llvm-b487e7215c4f70f3d98f8fbc0a11eb119afc1f37.tar.gz external_llvm-b487e7215c4f70f3d98f8fbc0a11eb119afc1f37.tar.bz2 |
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
Diffstat (limited to 'include/llvm/CodeGen/LiveVariables.h')
-rw-r--r-- | include/llvm/CodeGen/LiveVariables.h | 25 |
1 files changed, 2 insertions, 23 deletions
diff --git a/include/llvm/CodeGen/LiveVariables.h b/include/llvm/CodeGen/LiveVariables.h index a392cda..5c714e3 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); } |