Skip to content

Commit 6cc61b8

Browse files
authored
Cleanups after renaming Bysyncify to Asyncify (#2228)
* Clarify the difference between old and new Asyncify. * Remove the old --bysyncify pass option.
1 parent f6ca382 commit 6cc61b8

2 files changed

Lines changed: 7 additions & 8 deletions

File tree

src/passes/Asyncify.cpp

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@
2727
// The approach here is a third-generation design after Emscripten's original
2828
// Asyncify and then Emterpreter-Async approaches:
2929
//
30-
// * Asyncify rewrote control flow in LLVM IR. A problem is that this needs
31-
// to save all SSA registers as part of the local state, which can be
30+
// * Old Asyncify rewrote control flow in LLVM IR. A problem is that this
31+
// needs to save all SSA registers as part of the local state, which can be
3232
// very costly. A further increase can happen because of phis that are
3333
// added because of control flow transformations. As a result we saw
3434
// pathological cases where the code size increase was unacceptable.
@@ -40,7 +40,7 @@
4040
// high-speed code that it calls, and in which cannot be an async operation,
4141
// remain at full speed.
4242
//
43-
// Asyncify's design learns from both of those:
43+
// New Asyncify's design learns from both of those:
4444
//
4545
// * The code rewrite is done in Binaryen, that is, at the wasm level. At
4646
// this level we will only need to save wasm locals, which is a much smaller
@@ -49,9 +49,10 @@
4949
// for obvious reasons, while Emterpreter-Async proved it is tolerable to
5050
// have *some* overhead, if the transform can be applied selectively.
5151
//
52-
// The specific transform implemented here is simpler than Asyncify but should
53-
// still have low overhead when properly optimized. Asyncify worked at the CFG
54-
// level and added branches there; Asyncify on the other hand works on the
52+
// The specific transform implemented here is nicknamed "Bysyncify" (as it is
53+
// in BinarYen, and "B" comes after "A"). It is simpler than old Asyncify but
54+
// has low overhead when properly optimized. Old Asyncify worked at the CFG
55+
// level and added branches there; new Asyncify on the other hand works on the
5556
// structured control flow of wasm and simply "skips over" code when rewinding
5657
// the stack, and jumps out when unwinding. The transformed code looks
5758
// conceptually like this:

src/passes/pass.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,6 @@ void PassRegistry::registerPasses() {
7777
registerPass("asyncify",
7878
"async/await style transform, allowing pausing and resuming",
7979
createAsyncifyPass);
80-
registerPass(
81-
"bysyncify", "(temporary alias for asyncify)", createAsyncifyPass);
8280
registerPass("avoid-reinterprets",
8381
"Tries to avoid reinterpret operations via more loads",
8482
createAvoidReinterpretsPass);

0 commit comments

Comments
 (0)