From 6a51af5d858b6d3378749d17065c44cf50b62a26 Mon Sep 17 00:00:00 2001 From: Sam Clegg Date: Fri, 10 Apr 2020 01:01:23 -0400 Subject: Remove writes to globals that are never written to (#2741) Since the global is never read, we know that any write operation will be unobservable. --- src/passes/pass.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/passes/pass.cpp') diff --git a/src/passes/pass.cpp b/src/passes/pass.cpp index 733b61467..4da870ae9 100644 --- a/src/passes/pass.cpp +++ b/src/passes/pass.cpp @@ -483,6 +483,7 @@ void PassRunner::addDefaultGlobalOptimizationPostPasses() { } else { add("simplify-globals"); } + add("vacuum"); // simplify-globals can generate extra nops add("remove-unused-module-elements"); // may allow more inlining/dae/etc., need --converge for that add("directize"); -- cgit v1.2.3