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

Andy Wingo via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri May 28 06:19:30 PDT 2021


wingo added a comment.

In D101140#2786777 <https://reviews.llvm.org/D101140#2786777>, @jrtc27 wrote:

> Is it just me or does having a backend-specific type in target-independent code feel wrong? It feels like there should be a space for target-specific TargetStackIDs...

Hoo, good question.  More support for target-specific handling of stack IDs would be great.  However in this case the concept is not purely wasm-specific; I can imagine other targets that might have a similar treatment of locals (if we had a .net target, or a jvm target, or so).  The idea is that there is a separate stack consisting of named locals that may not be addressable by pointers to main memory.  In earlier drafts of this patch the name was more generic ("Object", then "Managed") but you know, our words in this area are quite overloaded.  So instead I went with something quite specific (WasmLocal) to avoid the general question -- but I do think the concept is not specific, even if it doesn't apply to any other target currently in tree.  WDYT?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D101140



More information about the cfe-commits mailing list