[PATCH] D62210: [WebAssembly] Implement __builtin_return_address for emscripten

Guanzhong Chen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 21 13:15:12 PDT 2019


quantum added a comment.

In D62210#1510838 <https://reviews.llvm.org/D62210#1510838>, @sunfish wrote:

> Would it make sense to take this opportunity to rename the library function, from `emscripten_return_address` to something more general, like `__wasm_return_address` or `__wasm_callsite_identifier` or something, so that non-Emscripten environments could implement it too if they wished?


I think we can always check the subtarget before calling `setLibcallName` to accommodate alternative names for this function, if other targets decide to implement return address with a library call.

It is not yet clear how non-Emscripten environments will implement `__builtin_return_address` at all. It would be premature to declare a function for them to implement.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D62210





More information about the llvm-commits mailing list