diff options
Diffstat (limited to 'llvm/lib/Target/WebAssembly/WebAssemblyExplicitLocals.cpp')
-rw-r--r-- | llvm/lib/Target/WebAssembly/WebAssemblyExplicitLocals.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyExplicitLocals.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyExplicitLocals.cpp index a933d1a..da8b742 100644 --- a/llvm/lib/Target/WebAssembly/WebAssemblyExplicitLocals.cpp +++ b/llvm/lib/Target/WebAssembly/WebAssemblyExplicitLocals.cpp @@ -379,8 +379,13 @@ bool WebAssemblyExplicitLocals::runOnMachineFunction(MachineFunction &MF) { const TargetRegisterClass *RC = MRI.getRegClass(OldReg); Register NewReg = MRI.createVirtualRegister(RC); unsigned Opc = getLocalGetOpcode(RC); + // Use a blank DebugLoc, because InsertPt may be discontinuous from + // the usage of this value, causing non-linear stepping in the + // debugger or function entry points where variables aren't live yet. + // See crbug.com/1251909, crbug.com/1249745 + DebugLoc DL; InsertPt = - BuildMI(MBB, InsertPt, MI.getDebugLoc(), TII->get(Opc), NewReg) + BuildMI(MBB, InsertPt, DL, TII->get(Opc), NewReg) .addImm(LocalId); MO.setReg(NewReg); MFI.stackifyVReg(MRI, NewReg); |