@@ -115,14 +115,12 @@ class TranslationPipeline:
115115 """Controls which non-literal passes run after raw model construction."""
116116
117117 name : str
118- elide_zero_assignments : bool
119118 hoist_repeated_calls : bool
120119 prune_dead_assignments : bool
121120
122121
123122RAW_TRANSLATION_PIPELINE = TranslationPipeline (
124123 name = "raw" ,
125- elide_zero_assignments = False ,
126124 hoist_repeated_calls = False ,
127125 prune_dead_assignments = False ,
128126)
@@ -131,7 +129,6 @@ class TranslationPipeline:
131129 name = "optimized" ,
132130 # Zero-assignment elision is not semantics-preserving in general. Keep the
133131 # optimized default limited to passes with direct equivalence tests.
134- elide_zero_assignments = False ,
135132 hoist_repeated_calls = True ,
136133 prune_dead_assignments = True ,
137134)
@@ -1509,8 +1506,6 @@ def yul_function_to_model(
15091506 sol_fn_name : str ,
15101507 fn_map : dict [str , str ],
15111508 keep_solidity_locals : bool = False ,
1512- * ,
1513- elide_zero_assignments : bool = True ,
15141509) -> FunctionModel :
15151510 """Convert a parsed YulFunction into a FunctionModel.
15161511
@@ -1521,8 +1516,6 @@ def yul_function_to_model(
15211516 - Multi-assigned compiler temporaries are rejected.
15221517 - The return variable is recognized and assigned in the model.
15231518 - Distinct Yul signature binders must demangle to distinct IR names.
1524- - ``elide_zero_assignments`` controls whether literal zero-initializations
1525- are dropped during model construction.
15261519 - Memory use must stay within the explicit supported subset:
15271520 straight-line constant-address, 32-byte-aligned ``mstore``/``mload``
15281521 with no aliasing.
@@ -1722,13 +1715,6 @@ def _process_assignment_into(
17221715 subst_state [target ] = expr
17231716 return None
17241717
1725- # Rename the RHS expression BEFORE updating var_map so that
1726- # self-references (e.g. ``x := f(x)``) resolve to the
1727- # *previous* binding, not the one being created.
1728- skip_zero = (
1729- elide_zero_assignments and isinstance (expr , IntLit ) and expr .value == 0
1730- )
1731-
17321718 # SSA: compute the Lean target name. Inside conditional
17331719 # blocks, Lean's scoped ``let`` handles shadowing, so we
17341720 # use the base clean name directly.
@@ -1762,9 +1748,6 @@ def _process_assignment_into(
17621748 else :
17631749 const_locals_state .pop (ssa_name , None )
17641750
1765- if skip_zero :
1766- return None
1767-
17681751 return Assignment (target = ssa_name , expr = expr )
17691752
17701753 for stmt in yf .assignments :
@@ -2883,7 +2866,6 @@ def build_restricted_ir_models(
28832866 fn ,
28842867 preparation .fn_map ,
28852868 keep_solidity_locals = config .keep_solidity_locals ,
2886- elide_zero_assignments = pipeline .elide_zero_assignments ,
28872869 )
28882870 for fn in preparation .selected_functions
28892871 ]
0 commit comments