Optimize after removing unused labels

This commit is contained in:
Andrew Morris
2023-07-03 10:48:57 +10:00
parent b7d5101bf4
commit d89103de79

View File

@@ -16,10 +16,10 @@ pub fn optimize(module: &mut Module, pointer_allocator: &mut NameAllocator) {
for _ in 0..2 {
simplify(module);
reduce_instructions(module);
remove_unused_labels(module);
}
remove_meta_lines(module);
remove_unused_labels(module);
extract_constants(module, pointer_allocator);
// After possibly repeated optimization, this ensures that the pointers are ordered correctly.