[all-commits] [llvm/llvm-project] d7086a: [WebAssembly] Support for WebAssembly globals in L...

Paulo Matos via All-commits all-commits at lists.llvm.org
Tue May 11 02:24:35 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d7086af2143d58a6535e0837c4d8789c69c6985f
      https://github.com/llvm/llvm-project/commit/d7086af2143d58a6535e0837c4d8789c69c6985f
  Author: Paulo Matos <pmatos at igalia.com>
  Date:   2021-05-11 (Tue, 11 May 2021)

  Changed paths:
    M clang/lib/Basic/Targets/WebAssembly.h
    M clang/test/CodeGen/target-data.c
    M llvm/lib/Target/WebAssembly/Utils/WebAssemblyUtilities.h
    M llvm/lib/Target/WebAssembly/WebAssemblyFastISel.cpp
    M llvm/lib/Target/WebAssembly/WebAssemblyISD.def
    M llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
    M llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.h
    M llvm/lib/Target/WebAssembly/WebAssemblyInstrInfo.td
    M llvm/lib/Target/WebAssembly/WebAssemblyInstrRef.td
    M llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp
    A llvm/test/CodeGen/WebAssembly/global-get.ll
    A llvm/test/CodeGen/WebAssembly/global-set.ll

  Log Message:
  -----------
  [WebAssembly] Support for WebAssembly globals in LLVM IR

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.

Reviewed By: pmatos

Differential Revision: https://reviews.llvm.org/D101608




More information about the All-commits mailing list