[PATCH] D101608: [WebAssembly] Support for WebAssembly globals in LLVM IR
Andy Wingo via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 30 02:34:56 PDT 2021
wingo created this revision.
wingo added reviewers: tlively, pmatos.
Herald added subscribers: ecnelises, sunfish, hiraditya, jgravelle-google, sbc100, dschuff.
wingo requested review of this revision.
Herald added subscribers: llvm-commits, aheejin.
Herald added a project: LLVM.
This patch adds support for WebAssembly globals in LLVM IR, representing
them as pointers to global values, in a non-default, non-integral
address space. Instruction selection legalizes loads and stores to
these pointers to new WebAssemblyISD nodes GLOBAL_GET and GLOBAL_SET.
Once the lowering creates the new nodes, tablegen pattern matches those
and converts them to Wasm global.get/set of the appropriate type.
Based on work by Paulo Matos in https://reviews.llvm.org/D95425.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D101608
Files:
llvm/lib/Target/WebAssembly/WebAssemblyISD.def
llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.h
llvm/lib/Target/WebAssembly/WebAssemblyInstrInfo.td
llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp
llvm/test/CodeGen/WebAssembly/global-get.ll
llvm/test/CodeGen/WebAssembly/global-set.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D101608.341816.patch
Type: text/x-patch
Size: 17957 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210430/a0728bc3/attachment.bin>
More information about the llvm-commits
mailing list