[WebAssembly] Preserve debug frame base information through register coloring
authorDerek Schuff <dschuff@chromium.org>
Tue, 28 Jan 2020 21:46:03 +0000 (13:46 -0800)
committerDerek Schuff <dschuff@chromium.org>
Wed, 29 Jan 2020 00:58:15 +0000 (16:58 -0800)
commitd966bf830fe1625e0037e8b59e918f1c49ace3f3
tree39851ad7f018fff4bd2448c33c0f9b24724a8e27
parent735f90fe42e55935035d842752e01361b5216c11
[WebAssembly] Preserve debug frame base information through register coloring

2 fixes:

Register coloring can re-assign virtual registers. When the frame base register
is colored, update the DwarfFrameBase accordingly When the frame base register
is stackified, do not attempt to encode DW_AT_frame_base as a local In the
future we will presumably want to handle this case better but for now we can
emit worse debug info rather than crashing.

Differential Revision: https://reviews.llvm.org/D73581
llvm/lib/Target/WebAssembly/WebAssemblyExplicitLocals.cpp
llvm/lib/Target/WebAssembly/WebAssemblyFrameLowering.cpp
llvm/lib/Target/WebAssembly/WebAssemblyMachineFunctionInfo.h
llvm/lib/Target/WebAssembly/WebAssemblyRegColoring.cpp
llvm/lib/Target/WebAssembly/WebAssemblyRegStackify.cpp
llvm/test/CodeGen/WebAssembly/debugtest-opt.ll [new file with mode: 0644]