[PATCH] D72972: [WebAssembly] Add experimental multivalue calling ABI

Heejin Ahn via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 21 18:02:15 PST 2020


aheejin added inline comments.


================
Comment at: clang/lib/CodeGen/TargetInfo.cpp:741
+  explicit WebAssemblyABIInfo(CodeGen::CodeGenTypes &CGT, ABIKind _Kind)
+      : SwiftABIInfo(CGT), defaultInfo(CGT), Kind(_Kind) {}
 
----------------
Nit: Do we need `_`?


================
Comment at: clang/test/CodeGen/wasm-arguments.c:19
+
 // Structs should be passed byval and not split up.
+// WEBASSEMBLY32: define void @struct_arg(%struct.s1* byval(%struct.s1) align 4 %i)
----------------
The comment here includes only the MVP case. Shouldn't we update this? Ditto for the other comments below. 


================
Comment at: clang/test/CodeGen/wasm-arguments.c:98
+// WEBASSEMBLY64: define void @union_arg(%union.simple_union* byval(%union.simple_union) align 4 %s)
+// EXPERIMENTAL-MV: define void @union_arg(i32 %s.0)
+void union_arg(union simple_union s) {}
----------------
Why is the union passed as an int for MV?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D72972





More information about the cfe-commits mailing list