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 | bd88ee06427b87e0455997b74ba6b0dac7778e29 (patch) | |
tree | e0cbe419c5e3169ab4cd5dff874f70190e33eaae /lib | |
parent | 66fb0eb4108bcf73ed37537ef213625ca1529d8c (diff) | |
download | external_llvm-bd88ee06427b87e0455997b74ba6b0dac7778e29.tar.gz external_llvm-bd88ee06427b87e0455997b74ba6b0dac7778e29.tar.bz2 external_llvm-bd88ee06427b87e0455997b74ba6b0dac7778e29.zip |
Improve some comments explaining the "handle kills" stuff better.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47395 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/CodeGen/LiveVariables.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/CodeGen/LiveVariables.cpp b/lib/CodeGen/LiveVariables.cpp index ea27b2e08e..809048e8ef 100644 --- a/lib/CodeGen/LiveVariables.cpp +++ b/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; |