summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/VirtRegRewriter.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-05-06 20:33:48 +0000
committerDan Gohman <gohman@apple.com>2010-05-06 20:33:48 +0000
commit779c69bbc56a0bb907d204233c6fb42305208392 (patch)
treecb2cc3a26190557e10219dd3f233d9546bcdb9cb /llvm/lib/CodeGen/VirtRegRewriter.cpp
parentefb126a665e0d3f6b4dfbcfc5d909bf0f4145198 (diff)
downloadbcm5719-llvm-779c69bbc56a0bb907d204233c6fb42305208392.tar.gz
bcm5719-llvm-779c69bbc56a0bb907d204233c6fb42305208392.zip
Add a DebugLoc argument to TargetInstrInfo::copyRegToReg, so that it
doesn't have to guess. llvm-svn: 103194
Diffstat (limited to 'llvm/lib/CodeGen/VirtRegRewriter.cpp')
-rw-r--r--llvm/lib/CodeGen/VirtRegRewriter.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/VirtRegRewriter.cpp b/llvm/lib/CodeGen/VirtRegRewriter.cpp
index 235db399b27..9b46273455a 100644
--- a/llvm/lib/CodeGen/VirtRegRewriter.cpp
+++ b/llvm/lib/CodeGen/VirtRegRewriter.cpp
@@ -1794,7 +1794,8 @@ bool LocalRewriter::InsertRestores(MachineInstr *MI,
ComputeReloadLoc(MII, MBB->begin(), Phys, TRI, DoReMat, SSorRMId, TII,
*MBB->getParent());
- TII->copyRegToReg(*MBB, InsertLoc, Phys, InReg, RC, RC);
+ TII->copyRegToReg(*MBB, InsertLoc, Phys, InReg, RC, RC,
+ MI->getDebugLoc());
// This invalidates Phys.
Spills.ClobberPhysReg(Phys);
@@ -2139,7 +2140,8 @@ LocalRewriter::RewriteMBB(LiveIntervals *LIs,
ComputeReloadLoc(&MI, MBB->begin(), PhysReg, TRI, DoReMat,
SSorRMId, TII, MF);
- TII->copyRegToReg(*MBB, InsertLoc, DesignatedReg, PhysReg, RC, RC);
+ TII->copyRegToReg(*MBB, InsertLoc, DesignatedReg, PhysReg, RC, RC,
+ MI.getDebugLoc());
MachineInstr *CopyMI = prior(InsertLoc);
CopyMI->setAsmPrinterFlag(MachineInstr::ReloadReuse);
@@ -2263,7 +2265,8 @@ LocalRewriter::RewriteMBB(LiveIntervals *LIs,
DEBUG(dbgs() << "Promoted Load To Copy: " << MI);
if (DestReg != InReg) {
const TargetRegisterClass *RC = MRI->getRegClass(VirtReg);
- TII->copyRegToReg(*MBB, &MI, DestReg, InReg, RC, RC);
+ TII->copyRegToReg(*MBB, &MI, DestReg, InReg, RC, RC,
+ MI.getDebugLoc());
MachineOperand *DefMO = MI.findRegisterDefOperand(DestReg);
unsigned SubIdx = DefMO->getSubReg();
// Revisit the copy so we make sure to notice the effects of the
OpenPOWER on IntegriCloud