[PATCH] D60167: [WebAssembly] Add Emscripten OS definition + small_printf

Alon Zakai via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 2 17:27:56 PDT 2019


kripken created this revision.
Herald added subscribers: llvm-commits, dexonsmith, hiraditya.
Herald added a project: LLVM.

The Emscripten OS provides a definition of __EMSCRIPTEN__, and also that it
supports iprintf optimizations.

Also define small_printf optimizations, which is a printf with float support
but not long double (which in wasm can be useful since long doubles are 128
bit and force linking of float128 emulation code). This part is based on
sunfish's https://reviews.llvm.org/D57620 (which can't land yet since
the WASI integration isn't ready yet).

Emscripten side: https://github.com/emscripten-core/emscripten/pull/8348


https://reviews.llvm.org/D60167

Files:
  clang/lib/Basic/Targets.cpp
  clang/lib/Basic/Targets/OSTargets.h
  llvm/include/llvm/ADT/Triple.h
  llvm/include/llvm/Analysis/TargetLibraryInfo.def
  llvm/lib/Analysis/TargetLibraryInfo.cpp
  llvm/lib/Support/Triple.cpp
  llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D60167.193399.patch
Type: text/x-patch
Size: 8702 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190403/634acb72/attachment.bin>


More information about the llvm-commits mailing list