summaryrefslogtreecommitdiff
path: root/src/ir/module-splitting.h
diff options
context:
space:
mode:
authorThomas Lively <tlively@google.com>2024-09-17 13:59:17 -0700
committerGitHub <noreply@github.com>2024-09-17 13:59:17 -0700
commitda5646961c61f21dbb1d6218e370325ba43be9f0 (patch)
tree915c2853c377e6214199cb8e06997618518a7036 /src/ir/module-splitting.h
parentf9b64c8c5d9ad720304e101dc58790f3bbfdfc3c (diff)
downloadbinaryen-da5646961c61f21dbb1d6218e370325ba43be9f0.tar.gz
binaryen-da5646961c61f21dbb1d6218e370325ba43be9f0.tar.bz2
binaryen-da5646961c61f21dbb1d6218e370325ba43be9f0.zip
[wasm-split] Configure split functions rather than kept functions (#6949)
The configuration for the module splitting utility previous took a set of functions to keep in the primary module. Change it to take a list of functions to split into the secondary module instead. This improves the code quality in multi-split mode because it keeps stub functions generated by previous splits from being moved into secondary modules during later splits.
Diffstat (limited to 'src/ir/module-splitting.h')
-rw-r--r--src/ir/module-splitting.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ir/module-splitting.h b/src/ir/module-splitting.h
index 620993d2d..89e4dd2bb 100644
--- a/src/ir/module-splitting.h
+++ b/src/ir/module-splitting.h
@@ -47,11 +47,11 @@ namespace wasm::ModuleSplitting {
static const Name LOAD_SECONDARY_MODULE("__load_secondary_module");
struct Config {
- // The set of functions to keep in the primary module. All others are split
- // out into the new secondary module. Must include the start function if it
+ // The set of functions to split into the secondary module. All others are
+ // kept in the primary module. Must not include the start function if it
// exists. May or may not include imported functions, which are always kept in
// the primary module regardless.
- std::set<Name> primaryFuncs;
+ std::set<Name> secondaryFuncs;
// Whether to import placeholder functions into the primary module that will
// be called when a secondary function is called before the secondary module
// has been loaded.