feat: Add dead code elimination and improve optimization
Integrates dead code elimination (DCE) into the optimizer. This phase removes expressions that have no side effects and are not the result of the block. Also includes several improvements to the existing optimization passes: - DCE now correctly handles assignments to variables that are never used or captured. - Explicitly tracks captured slots in the `SubstitutionMap` to prevent premature inlining. - Introduces a `is_side_effect_free` helper function for more robust purity checks. - Updates dependencies to include `insta` for snapshot testing.
This commit is contained in:
@@ -9,3 +9,6 @@ eframe = "0.33.3"
|
||||
clap = { version = "4.5", features = ["derive"] }
|
||||
chrono = "0.4"
|
||||
regex = "1.10"
|
||||
|
||||
[dev-dependencies]
|
||||
insta = { version = "1.39", features = ["yaml"] }
|
||||
|
||||
Reference in New Issue
Block a user