[PATCH] D66035: [WebAssembly] WIP: Add support for reference types
Paulo Matos via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 29 05:47:24 PDT 2020
pmatos updated this revision to Diff 281540.
pmatos added a comment.
Update patch to compile against current master branch
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D66035/new/
https://reviews.llvm.org/D66035
Files:
.gitlab-ci.yml
lld/wasm/WriterUtils.cpp
llvm/include/llvm/BinaryFormat/Wasm.h
llvm/lib/Target/WebAssembly/WebAssemblyFastISel.cpp
llvm/lib/Target/WebAssembly/WebAssemblyInstrInfo.td
llvm/test/CodeGen/WebAssembly/externref.ll
Index: llvm/test/CodeGen/WebAssembly/externref.ll
===================================================================
--- llvm/test/CodeGen/WebAssembly/externref.ll
+++ llvm/test/CodeGen/WebAssembly/externref.ll
@@ -9,7 +9,7 @@
; CHECK-LABEL: call_test:
; CHECK: .functype call_test (externref) -> (externref)
define i8 addrspace(256)* @call_test(i8 addrspace(256)*) {
-; CHECK: externref.call $push0=, test, $0
+; CHECK: call $push0=, test, $0
%a = call i8 addrspace(256)* @test(i8 addrspace(256)* %0)
ret i8 addrspace(256)* %a
}
Index: llvm/lib/Target/WebAssembly/WebAssemblyInstrInfo.td
===================================================================
--- llvm/lib/Target/WebAssembly/WebAssemblyInstrInfo.td
+++ llvm/lib/Target/WebAssembly/WebAssemblyInstrInfo.td
@@ -66,10 +66,6 @@
Predicate<"Subtarget->hasReferenceTypes()">,
AssemblerPredicate<(all_of FeatureReferenceTypes), "reference-types">;
-def HasReferenceTypes :
- Predicate<"Subtarget->hasReferenceTypes()">,
- AssemblerPredicate<"FeatureReferenceTypes", "reference-types">;
-
//===----------------------------------------------------------------------===//
// WebAssembly-specific DAG Node Types.
//===----------------------------------------------------------------------===//
Index: llvm/lib/Target/WebAssembly/WebAssemblyFastISel.cpp
===================================================================
--- llvm/lib/Target/WebAssembly/WebAssemblyFastISel.cpp
+++ llvm/lib/Target/WebAssembly/WebAssemblyFastISel.cpp
@@ -816,8 +816,6 @@
ResultReg = createResultReg(&WebAssembly::EXNREFRegClass);
break;
case MVT::externref:
- Opc = IsDirect ? WebAssembly::CALL_externref
- : WebAssembly::PCALL_INDIRECT_externref;
ResultReg = createResultReg(&WebAssembly::EXTERNREFRegClass);
break;
default:
Index: llvm/include/llvm/BinaryFormat/Wasm.h
===================================================================
--- llvm/include/llvm/BinaryFormat/Wasm.h
+++ llvm/include/llvm/BinaryFormat/Wasm.h
@@ -231,7 +231,6 @@
WASM_TYPE_F64 = 0x7C,
WASM_TYPE_V128 = 0x7B,
WASM_TYPE_FUNCREF = 0x70,
- WASM_TYPE_EXTERNREF = 0x6F,
WASM_TYPE_EXNREF = 0x68,
WASM_TYPE_EXTERNREF = 0x6F,
WASM_TYPE_FUNC = 0x60,
@@ -365,7 +364,6 @@
FUNCREF = WASM_TYPE_FUNCREF,
EXTERNREF = WASM_TYPE_EXTERNREF,
EXNREF = WASM_TYPE_EXNREF,
- EXTERNREF = WASM_TYPE_EXTERNREF,
};
struct WasmSignature {
Index: lld/wasm/WriterUtils.cpp
===================================================================
--- lld/wasm/WriterUtils.cpp
+++ lld/wasm/WriterUtils.cpp
@@ -36,8 +36,6 @@
return "externref";
case ValType::EXNREF:
return "exnref";
- case ValType::EXTERNREF:
- return "externref";
}
llvm_unreachable("Invalid wasm::ValType");
}
Index: .gitlab-ci.yml
===================================================================
--- .gitlab-ci.yml
+++ /dev/null
@@ -1,17 +0,0 @@
-default:
- image: debian:sid
- before_script:
- - apt-get update
- - apt-get install -y git gcc cmake wget unzip g++ python libxml2-dev ninja-build python ruby python3-pip python3-psutil libz3-dev valgrind
-
-build-llvm:
- tags:
- - linux
- - x86_64
- script:
- - mkdir build
- - cd build
- - cmake -G 'Unix Makefiles' -DLLVM_TARGETS_TO_BUILD='X86;WebAssembly' -DLLVM_ENABLE_PROJECTS="clang;lld" -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_ASSERTIONS=On -DLLVM_BUILD_32_BITS=Off -DLLVM_ENABLE_BINDINGS=Off ../llvm/
- - make -j$(nproc) -l$(nproc)
- - make -j$(nproc) -l$(nproc) check-llvm-unit
- - make -j$(nproc) -l$(nproc) check-llvm
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D66035.281540.patch
Type: text/x-patch
Size: 3630 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200729/d5d12adf/attachment.bin>
More information about the cfe-commits
mailing list