OSDN Git Service

[WebAssembly] Remove duplicated RTLIB names
authorDerek Schuff <dschuff@google.com>
Thu, 18 Jan 2018 01:15:45 +0000 (01:15 +0000)
committerDerek Schuff <dschuff@google.com>
Thu, 18 Jan 2018 01:15:45 +0000 (01:15 +0000)
commitd1bf46631c6ff5db9597d215bfd5d1ac6cdcdf68
tree5d6d0159f35240dcd462cab68fcbac33f989281e
parent3b5a174ad0fe10e1bc2328f168d1be6cd4d57757
[WebAssembly] Remove duplicated RTLIB names

Remove the tight coupling between llvm/CodeGenRuntimeLibcalls.def and
the table of supported singatures for wasm. This will allow adding new libcalls
without changing wasm's signature table.

Also, some cleanup:
Use ManagedStatics instead of const tables to avoid memory/binary bloat.
Use a StringMap instead of a linear search for name lookup.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322802 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/WebAssembly/WebAssemblyRuntimeLibcallSignatures.cpp