aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp
diff options
context:
space:
mode:
authorHeejin Ahn <aheejin@gmail.com>2022-09-21 14:48:34 -0700
committerHeejin Ahn <aheejin@gmail.com>2023-01-10 09:54:59 -0800
commite9ea7a0e20c27dc080dc16dc4b7c5c104801fe69 (patch)
treee7c0d3b404ca116eccae575a45c92b0818b7bf55 /llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp
parentbc21af6a43db45bf0d0192afab0a079ecf400aa2 (diff)
downloadllvm-e9ea7a0e20c27dc080dc16dc4b7c5c104801fe69.zip
llvm-e9ea7a0e20c27dc080dc16dc4b7c5c104801fe69.tar.gz
llvm-e9ea7a0e20c27dc080dc16dc4b7c5c104801fe69.tar.bz2
[WebAssembly] Use LiveDebugValues analysis
This enables `LiveDebugValues` analysis for Wasm. `DBG_VALUE`s expire at the end of a BB, and this is the analysis extends their lifetime when possible, greatly increasing the coverage of variable debug info. Specifically, this removes the current constraint that this analysis is only used with physical registers, which was first introduced in D18421, because Wasm uses only virtual registers. I don't think there's anything inherent in this analysis that only applies to physical registers; it was just because all targets using this analysis ran this at the end of their compiliation pipeline, at which point all their vregs had been allocated, and Wasm's debug info infrastructure was not really set up yet, so it was not using it. This adds supports to Wasm-specific target-index operands, defined in https://github.com/llvm/llvm-project/blob/2166d9529a60d1cdedb733d2e4134c971f0969ec/llvm/lib/Target/WebAssembly/WebAssembly.h#L87-L100. Among these, `TI_LOCAL`, `TI_LOCAL_INDIRECT`, and `TI_OPERAND_STACK` are used by Wasm `DBG_VALUE` instructions. This does not yet handle mutable target indices, i.e., this does not terminate a `DBG_VALUE` for a local index when we encounter a new `local.set` or `local.tee`. It will be implemented as a follow-up. Reviewed By: dschuff, jmorse Differential Revision: https://reviews.llvm.org/D138943
Diffstat (limited to 'llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp')
0 files changed, 0 insertions, 0 deletions