From 00bbde099c0d968ce4ab95eba56d767d534e4094 Mon Sep 17 00:00:00 2001 From: Daniel Wirtz Date: Tue, 19 Nov 2019 19:58:58 +0100 Subject: Add PostAssemblyScript pass (#2407) Adds the AssemblyScript-specific passes post-assemblyscript and post-assemblyscript-finalize, eliminating redundant ARC-style retain/release patterns conservatively emitted by the compiler. --- src/passes/pass.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/passes/pass.cpp') diff --git a/src/passes/pass.cpp b/src/passes/pass.cpp index 0ac70aa59..0f6507d98 100644 --- a/src/passes/pass.cpp +++ b/src/passes/pass.cpp @@ -207,6 +207,12 @@ void PassRegistry::registerPasses() { registerPass("pick-load-signs", "pick load signs based on their uses", createPickLoadSignsPass); + registerPass("post-assemblyscript", + "eliminates redundant ARC patterns in AssemblyScript output", + createPostAssemblyScriptPass); + registerPass("post-assemblyscript-finalize", + "eliminates collapsed ARC patterns after other optimizations", + createPostAssemblyScriptFinalizePass); registerPass("post-emscripten", "miscellaneous optimizations for Emscripten-generated code", createPostEmscriptenPass); -- cgit v1.2.3