summaryrefslogtreecommitdiff
path: root/lib/CodeGen/MachineFunction.cpp
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2011-01-31 21:38:14 +0000
committerDevang Patel <dpatel@apple.com>2011-01-31 21:38:14 +0000
commite9a7ea68653689966417443b8ac2528c1d9d3ccf (patch)
tree34407700e2758bb5353a5ad1a0b2960b9514aafa /lib/CodeGen/MachineFunction.cpp
parent97f6d5b24136ac19d5f83c1ee9541b05f0eccebd (diff)
downloadllvm-e9a7ea68653689966417443b8ac2528c1d9d3ccf.tar.gz
llvm-e9a7ea68653689966417443b8ac2528c1d9d3ccf.tar.bz2
llvm-e9a7ea68653689966417443b8ac2528c1d9d3ccf.tar.xz
Keep track of incoming argument's location while emitting LiveIns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124611 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/MachineFunction.cpp')
-rw-r--r--lib/CodeGen/MachineFunction.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/CodeGen/MachineFunction.cpp b/lib/CodeGen/MachineFunction.cpp
index 962362761f..85532407ca 100644
--- a/lib/CodeGen/MachineFunction.cpp
+++ b/lib/CodeGen/MachineFunction.cpp
@@ -396,7 +396,8 @@ void MachineFunction::viewCFGOnly() const
/// addLiveIn - Add the specified physical register as a live-in value and
/// create a corresponding virtual register for it.
unsigned MachineFunction::addLiveIn(unsigned PReg,
- const TargetRegisterClass *RC) {
+ const TargetRegisterClass *RC,
+ DebugLoc DL) {
MachineRegisterInfo &MRI = getRegInfo();
unsigned VReg = MRI.getLiveInVirtReg(PReg);
if (VReg) {
@@ -405,6 +406,7 @@ unsigned MachineFunction::addLiveIn(unsigned PReg,
}
VReg = MRI.createVirtualRegister(RC);
MRI.addLiveIn(PReg, VReg);
+ MRI.addLiveInLoc(VReg, DL);
return VReg;
}