[PATCH] D140373: [WebAssembly][LiveDebugValues] Handle target index defs

Derek Schuff via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 20 15:45:36 PST 2022


dschuff added a comment.

In D140373#4008491 <https://reviews.llvm.org/D140373#4008491>, @aheejin wrote:

> And another thing, I didn't add anything to copy handling because Wasm doesn't have copy instructions. (This COPY instruction <https://github.com/llvm/llvm-project/blob/41dd02e8575144e576e9ad111bbdc3f856c58445/llvm/lib/Target/WebAssembly/WebAssemblyInstrInfo.td#L286-L293> is a pseudo instruction and should have been lowered into other instructions at this phase.)

Regarding the latter bit, I think that's fine for wasm. My understanding is that COPY instructions are mostly the product of register allocation (and a few other random special cases in backends) but because wasm doesn't do register allocation the way other targets do (and in any case the set of locals is basically an infinite virtual register file we leave the part of regalloc that typically requires copies to the engine).
I think a similar explanation applies to the discussion on D138943 <https://reviews.llvm.org/D138943> about memory because Wasm likewise has no spills (no callee-saved or caller-saved registers, etc)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D140373/new/

https://reviews.llvm.org/D140373



More information about the llvm-commits mailing list