OSDN Git Service

[WebAssembly] Add Emscripten OS definition + small_printf
authorAlon Zakai <azakai@google.com>
Wed, 3 Apr 2019 01:08:35 +0000 (01:08 +0000)
committerAlon Zakai <azakai@google.com>
Wed, 3 Apr 2019 01:08:35 +0000 (01:08 +0000)
commit683212b71c52ec4d9cdc8382237706a7fa13ba52
tree9e49a41b1f4c1283a241262d5c53c60b1c57de0a
parent45c5050e9025cc351b6421f60b412cedf421ef99
[WebAssembly] Add Emscripten OS definition + small_printf

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).

Differential Revision: https://reviews.llvm.org/D60167

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357552 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/ADT/Triple.h
include/llvm/Analysis/TargetLibraryInfo.def
lib/Analysis/TargetLibraryInfo.cpp
lib/Support/Triple.cpp
lib/Transforms/Utils/SimplifyLibCalls.cpp