Split out optimization dir

This commit is contained in:
Andrew Morris
2023-06-29 15:22:06 +10:00
parent f5fa17ed25
commit 76995eaf2d
7 changed files with 187 additions and 161 deletions

View File

@@ -0,0 +1,12 @@
use crate::asm::Module;
use crate::name_allocator::NameAllocator;
use super::collapse_pointers_of_pointers::collapse_pointers_of_pointers;
use super::extract_constants::extract_constants;
use super::shake_tree::shake_tree;
pub fn optimize(module: &mut Module, pointer_allocator: &mut NameAllocator) {
collapse_pointers_of_pointers(module);
extract_constants(module, pointer_allocator);
shake_tree(module);
}