[PATCH] D76049: [WebAssembly] Support swiftself and swifterror for WebAssembly target

Derek Schuff via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 18 11:57:38 PDT 2020


dschuff added a comment.

I think the way you have it written here, it means that *all* swiftcc functions will end up with the extra parameters at the wasm level, and direct calls will also have the extra arguments. I think the test should also cover that (not just indirect calls), and I think the calling convention should be documented since it is basically the core of the swift ABI (even if you don't want to consider it stable yet). So at minimum there should be more explanation in the commit message and there should probably be a doc about the Swift ABI in https://github.com/WebAssembly/tool-conventions/ like there is for C.

Fortunately for functions that are not public or exported, I believe Binaryen should be able to optimize away the extra arguments after linking, so if you're not using it in your toolchain yet, you should.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D76049





More information about the llvm-commits mailing list