[llvm-commits] [llvm] r120841 - /llvm/trunk/lib/CodeGen/LiveDebugVariables.cpp
Evan Cheng
evan.cheng at apple.com
Fri Dec 3 13:52:26 PST 2010
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?
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