[llvm-commits] [llvm] r120841 - /llvm/trunk/lib/CodeGen/LiveDebugVariables.cpp
Jakob Stoklund Olesen
stoklund at 2pi.dk
Fri Dec 3 14:06:50 PST 2010
On Dec 3, 2010, at 1:52 PM, Evan Cheng wrote:
> When does this happen? Would this affect codegen in the presence of debug info? Or are these virtual registers only used to track debug info liveness?
I think this is just a badly named variable. It is not an llvm::VirtRegMap instance, it maps virtual registers to the debug variables that use it.
It won't affect codegen, and no extra virtual registers are created.
I wil rename it to virtRegToUserValue.
>
> Evan
>
> On Dec 3, 2010, at 1:47 PM, Jakob Stoklund Olesen wrote:
>
>> Author: stoklund
>> Date: Fri Dec 3 15:47:08 2010
>> New Revision: 120841
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=120841&view=rev
>> Log:
>> Also update virtRegMap when renaming virtual registers.
>>
>> Modified:
>> llvm/trunk/lib/CodeGen/LiveDebugVariables.cpp
>>
>> Modified: llvm/trunk/lib/CodeGen/LiveDebugVariables.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LiveDebugVariables.cpp?rev=120841&r1=120840&r2=120841&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/CodeGen/LiveDebugVariables.cpp (original)
>> +++ llvm/trunk/lib/CodeGen/LiveDebugVariables.cpp Fri Dec 3 15:47:08 2010
>> @@ -583,8 +583,18 @@
>>
>> void LDVImpl::
>> renameRegister(unsigned OldReg, unsigned NewReg, unsigned SubIdx) {
>> - for (UserValue *UV = lookupVirtReg(OldReg); UV; UV = UV->getNext())
>> + UserValue *UV = lookupVirtReg(OldReg);
>> + if (!UV)
>> + return;
>> +
>> + if (TargetRegisterInfo::isVirtualRegister(NewReg))
>> + mapVirtReg(NewReg, UV);
>> + virtRegMap.erase(OldReg);
>> +
>> + do {
>> UV->renameRegister(OldReg, NewReg, SubIdx, TRI);
>> + UV = UV->getNext();
>> + } while (UV);
>> }
>>
>> void LiveDebugVariables::
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
More information about the llvm-commits
mailing list