diff --git a/source/opt/optimizer.cpp b/source/opt/optimizer.cpp index bc1441114..1ded2ee9b 100644 --- a/source/opt/optimizer.cpp +++ b/source/opt/optimizer.cpp @@ -161,6 +161,7 @@ Optimizer& Optimizer::RegisterPerformancePasses() { .RegisterPass(CreateDeadBranchElimPass()) .RegisterPass(CreateMergeReturnPass()) .RegisterPass(CreateInlineExhaustivePass()) + .RegisterPass(CreateEliminateDeadFunctionsPass()) .RegisterPass(CreateAggressiveDCEPass()) .RegisterPass(CreatePrivateToLocalPass()) .RegisterPass(CreateLocalSingleBlockLoadStoreElimPass()) diff --git a/test/tools/opt/flags.py b/test/tools/opt/flags.py index f7dc64ce9..f8117d9dc 100644 --- a/test/tools/opt/flags.py +++ b/test/tools/opt/flags.py @@ -149,6 +149,7 @@ class TestPerformanceOptimizationPasses(expect.ValidObjectFile1_5, 'eliminate-dead-branches', 'merge-return', 'inline-entry-points-exhaustive', + 'eliminate-dead-functions', 'eliminate-dead-code-aggressive', 'private-to-local', 'eliminate-local-single-block',