summaryrefslogtreecommitdiff
path: root/src/passes/PostEmscripten.cpp
diff options
context:
space:
mode:
authorHeejin Ahn <aheejin@gmail.com>2020-10-10 20:01:06 -0700
committerGitHub <noreply@github.com>2020-10-10 20:01:06 -0700
commitf4d074fc3ee8184cd89c870612fc316adaeb8e1a (patch)
tree5bb0565151952fc3d42be8f23b297a8ba688de50 /src/passes/PostEmscripten.cpp
parentcaf624d0b1b81cf93cfb66dfdb50f49c5cc51578 (diff)
downloadbinaryen-f4d074fc3ee8184cd89c870612fc316adaeb8e1a.tar.gz
binaryen-f4d074fc3ee8184cd89c870612fc316adaeb8e1a.tar.bz2
binaryen-f4d074fc3ee8184cd89c870612fc316adaeb8e1a.zip
Rename Emscripten EHSjLj functions in wasm backend (#3191)
Now that we are renaming invoke wrappers and `emscripten_longjmp_jmpbuf` in the wasm backend, this deletes all related renaming routines and relevant tests. Depends on #3192. Addresses: #3043 and #3081 Companions: https://reviews.llvm.org/D88697 emscripten-core/emscripten#12399
Diffstat (limited to 'src/passes/PostEmscripten.cpp')
-rw-r--r--src/passes/PostEmscripten.cpp18
1 files changed, 0 insertions, 18 deletions
diff --git a/src/passes/PostEmscripten.cpp b/src/passes/PostEmscripten.cpp
index 0c7521afc..eea7a1a34 100644
--- a/src/passes/PostEmscripten.cpp
+++ b/src/passes/PostEmscripten.cpp
@@ -78,9 +78,6 @@ struct OptimizeCalls : public WalkerPass<PostWalker<OptimizeCalls>> {
struct PostEmscripten : public Pass {
void run(PassRunner* runner, Module* module) override {
- // Optimize imports
- optimizeImports(runner, module);
-
// Optimize calls
OptimizeCalls().run(runner, module);
@@ -88,21 +85,6 @@ struct PostEmscripten : public Pass {
optimizeExceptions(runner, module);
}
- void optimizeImports(PassRunner* runner, Module* module) {
- // Calling emscripten_longjmp_jmpbuf is the same as emscripten_longjmp.
- Name EMSCRIPTEN_LONGJMP("emscripten_longjmp");
- Name EMSCRIPTEN_LONGJMP_JMPBUF("emscripten_longjmp_jmpbuf");
- ImportInfo info(*module);
- auto* emscripten_longjmp =
- info.getImportedFunction(ENV, EMSCRIPTEN_LONGJMP);
- auto* emscripten_longjmp_jmpbuf =
- info.getImportedFunction(ENV, EMSCRIPTEN_LONGJMP_JMPBUF);
- if (emscripten_longjmp && emscripten_longjmp_jmpbuf) {
- // Both exist, so it is worth renaming so that we have only one.
- emscripten_longjmp_jmpbuf->base = EMSCRIPTEN_LONGJMP;
- }
- }
-
// Optimize exceptions (and setjmp) by removing unnecessary invoke* calls.
// An invoke is a call to JS with a function pointer; JS does a try-catch
// and calls the pointer, catching and reporting any error. If we know no