diff options
author | Bill Wendling <isanbard@gmail.com> | 2008-02-20 19:35:34 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2008-02-20 19:35:34 +0000 |
commit | cf2d1aa485e1164e28eb1aa2e258659f69b6b173 (patch) | |
tree | 9cdf77e31d1327eb5f3a353a9a72013c8dc70cfa /llvm/lib/CodeGen/LiveVariables.cpp | |
parent | 6b30fd310d75784b979afff6c96c558d97616670 (diff) | |
download | bcm5719-llvm-cf2d1aa485e1164e28eb1aa2e258659f69b6b173.tar.gz bcm5719-llvm-cf2d1aa485e1164e28eb1aa2e258659f69b6b173.zip |
Improve some comments explaining the "handle kills" stuff better.
llvm-svn: 47395
Diffstat (limited to 'llvm/lib/CodeGen/LiveVariables.cpp')
-rw-r--r-- | llvm/lib/CodeGen/LiveVariables.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/LiveVariables.cpp b/llvm/lib/CodeGen/LiveVariables.cpp index ea27b2e08e0..809048e8ef7 100644 --- a/llvm/lib/CodeGen/LiveVariables.cpp +++ b/llvm/lib/CodeGen/LiveVariables.cpp @@ -296,6 +296,7 @@ void LiveVariables::addRegisterKills(unsigned Reg, MachineInstr *MI, /// last def/use of the register, or /// - The register has sub-registers and none of them are killed elsewhere. /// +/// SubKills is filled with the set of sub-registers that are killed elsewhere. bool LiveVariables::HandlePhysRegKill(unsigned Reg, const MachineInstr *RefMI, SmallSet<unsigned, 4> &SubKills) { const unsigned *SubRegs = RegInfo->getImmediateSubRegisters(Reg); @@ -320,8 +321,9 @@ bool LiveVariables::HandlePhysRegKill(unsigned Reg, const MachineInstr *RefMI, return false; } -/// HandlePhysRegKill - Calls the recursive version of HandlePhysRegKill. (See -/// above for details.) +/// HandlePhysRegKill - Returns true if the whole register is killed in the +/// machine instruction. If only some of its sub-registers are killed in this +/// machine instruction, then mark those as killed and return false. bool LiveVariables::HandlePhysRegKill(unsigned Reg, MachineInstr *RefMI) { SmallSet<unsigned, 4> SubKills; |