@@ -71,8 +71,7 @@ void scdf_mark_edge_feasible(scdf_ctx *scdf, int from, int to) {
7171 /* Block is already executable, only a new edge became feasible.
7272 * Reevaluate phi nodes to account for changed source operands. */
7373 const zend_ssa_block * ssa_block = & scdf -> ssa -> blocks [to ];
74- zend_ssa_phi * phi ;
75- for (phi = ssa_block -> phis ; phi ; phi = phi -> next ) {
74+ for (const zend_ssa_phi * phi = ssa_block -> phis ; phi ; phi = phi -> next ) {
7675 zend_bitset_excl (scdf -> phi_var_worklist , phi -> ssa_var );
7776 scdf -> handlers .visit_phi (scdf , phi );
7877 }
@@ -109,7 +108,7 @@ void scdf_solve(scdf_ctx *scdf, const char *name) {
109108 ) {
110109 int i ;
111110 while ((i = zend_bitset_pop_first (scdf -> phi_var_worklist , scdf -> phi_var_worklist_len )) >= 0 ) {
112- zend_ssa_phi * phi = ssa -> vars [i ].definition_phi ;
111+ const zend_ssa_phi * phi = ssa -> vars [i ].definition_phi ;
113112 ZEND_ASSERT (phi );
114113 if (zend_bitset_in (scdf -> executable_blocks , phi -> block )) {
115114 scdf -> handlers .visit_phi (scdf , phi );
@@ -145,12 +144,9 @@ void scdf_solve(scdf_ctx *scdf, const char *name) {
145144 DEBUG_PRINT ("Pop block %d from worklist\n" , i );
146145 zend_bitset_incl (scdf -> executable_blocks , i );
147146
148- {
149- zend_ssa_phi * phi ;
150- for (phi = ssa_block -> phis ; phi ; phi = phi -> next ) {
151- zend_bitset_excl (scdf -> phi_var_worklist , phi -> ssa_var );
152- scdf -> handlers .visit_phi (scdf , phi );
153- }
147+ for (const zend_ssa_phi * phi = ssa_block -> phis ; phi ; phi = phi -> next ) {
148+ zend_bitset_excl (scdf -> phi_var_worklist , phi -> ssa_var );
149+ scdf -> handlers .visit_phi (scdf , phi );
154150 }
155151
156152 if (block -> len == 0 ) {
0 commit comments