Skip to content

Commit

Permalink
Do some repeated optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
voltrevo committed Jul 1, 2023
1 parent 0f9c10f commit edecfee
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions valuescript_compiler/src/optimization/optimize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,12 @@ use super::simplify::simplify;
pub fn optimize(module: &mut Module, pointer_allocator: &mut NameAllocator) {
collapse_pointers_of_pointers(module);
shake_tree(module);
simplify(module);
simplify(module);
remove_noops(module);

for _ in 0..2 {
simplify(module);
remove_noops(module);
}

remove_meta_lines(module);
extract_constants(module, pointer_allocator);

Expand Down

0 comments on commit edecfee

Please sign in to comment.