[PATCH] D101140: [WebAssembly][CodeGen] IR support for WebAssembly local variables

Andy Wingo via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 28 02:05:59 PDT 2021


wingo added inline comments.


================
Comment at: llvm/test/CodeGen/WebAssembly/ir-locals.ll:17-20
+ ; The DAG combiner infers that %reloaded is the same as %arg and
+ ; ultimately causes "local.get 0" to be emitted instead of
+ ; "local.get 1".
+ ; CHECK-NEXT: local.get 0
----------------
tlively wrote:
> It might be good to get the value from an external function call rather than from an argument to prevent this transformation from happening.
Tx for feedback.  Actually it doesn't really matter where the value comes from; store-to-load forwarding happens regardless.  If it came from a call it would be allocated a local via the explicit locals pass, as a value with more than one use.

However I was able to inhibit this transformation with an opaque call, so I'll do that.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D101140



More information about the llvm-commits mailing list