summaryrefslogtreecommitdiff
path: root/src/passes/pass.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/passes/pass.cpp')
-rw-r--r--src/passes/pass.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/passes/pass.cpp b/src/passes/pass.cpp
index 3b0faa6c3..2c7199781 100644
--- a/src/passes/pass.cpp
+++ b/src/passes/pass.cpp
@@ -156,6 +156,9 @@ void PassRegistry::registerPasses() {
"generate-stack-ir", "generate Stack IR", createGenerateStackIRPass);
registerPass(
"gto", "globally optimize GC types", createGlobalTypeOptimizationPass);
+ registerPass("global-subtyping",
+ "apply more specific subtypes to type fields where possible",
+ createGlobalSubtypingPass);
registerPass(
"heap2local", "replace GC allocations with locals", createHeap2LocalPass);
registerPass(
@@ -524,6 +527,7 @@ void PassRunner::addDefaultGlobalOptimizationPrePasses() {
}
if (wasm->features.hasGC() && getTypeSystem() == TypeSystem::Nominal &&
options.optimizeLevel >= 2) {
+ addIfNoDWARFIssues("global-subtyping");
// Global type optimization can remove fields that are not needed, which can
// remove ref.funcs that were once assigned to vtables but are no longer
// needed, which can allow more code to be removed globally. After those,