[WebAssembly] Add comments on local.tee transformation
authorHeejin Ahn <aheejin@gmail.com>
Tue, 14 Mar 2023 07:32:43 +0000 (00:32 -0700)
committerHeejin Ahn <aheejin@gmail.com>
Sat, 18 Mar 2023 03:16:16 +0000 (20:16 -0700)
commit6d33affac05a7f30f8b3761a66f81fe63b9f44e1
tree442cce288f566c5489cddb0b97d625650fdb0acd
parent4f2401f4f9074548b6de3952a6858aeac2f6950f
[WebAssembly] Add comments on local.tee transformation

We have a good comment on `TEE` transformation in `RegStackify`:
https://github.com/llvm/llvm-project/blob/547e3456660000a16fc5c2a2f819f1a2b5d35b5d/llvm/lib/Target/WebAssembly/WebAssemblyRegStackify.cpp#L613-L632

And I think it can be helpful to have some more comments on how the
`TEE`s created in `RegStackify` are converted into `LOCAL_TEE`s.

Variable `OldReg` is changed to `DefReg` to be consistent with
`RegStackify`'s comment.

Reviewed By: tlively

Differential Revision: https://reviews.llvm.org/D146084
llvm/lib/Target/WebAssembly/WebAssemblyExplicitLocals.cpp