Lines Matching refs:j
246 int j, blocks_count = ssa->cfg.blocks_count; in place_essa_pis() local
247 for (j = 0; j < blocks_count; j++) { in place_essa_pis()
249 zend_op *opline = op_array->opcodes + blocks[j].start + blocks[j].len - 1; in place_essa_pis()
253 if ((blocks[j].flags & ZEND_BB_REACHABLE) == 0 || blocks[j].len == 0) { in place_essa_pis()
262 bf = blocks[j].successors[0]; in place_essa_pis()
263 bt = blocks[j].successors[1]; in place_essa_pis()
266 bt = blocks[j].successors[0]; in place_essa_pis()
267 bf = blocks[j].successors[1]; in place_essa_pis()
272 if ((pi = add_pi(arena, op_array, dfg, ssa, j, blocks[j].successors[0], var))) { in place_essa_pis()
280 if ((pi = add_pi(arena, op_array, dfg, ssa, j, blocks[j].successors[1], var))) { in place_essa_pis()
292 if (blocks[j].len == 1) { in place_essa_pis()
370 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bt, var1))) { in place_essa_pis()
373 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bf, var1))) { in place_essa_pis()
377 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bf, var1))) { in place_essa_pis()
380 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bt, var1))) { in place_essa_pis()
385 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bt, var1))) { in place_essa_pis()
389 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bf, var1))) { in place_essa_pis()
393 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bt, var1))) { in place_essa_pis()
397 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bf, var1))) { in place_essa_pis()
405 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bt, var2))) { in place_essa_pis()
408 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bf, var2))) { in place_essa_pis()
412 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bf, var2))) { in place_essa_pis()
415 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bt, var2))) { in place_essa_pis()
420 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bt, var2))) { in place_essa_pis()
424 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bf, var2))) { in place_essa_pis()
428 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bt, var2))) { in place_essa_pis()
432 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bf, var2))) { in place_essa_pis()
446 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bf, var))) { in place_essa_pis()
449 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bt, var))) { in place_essa_pis()
453 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bf, var))) { in place_essa_pis()
456 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bt, var))) { in place_essa_pis()
467 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bf, var))) { in place_essa_pis()
471 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bt, var))) { in place_essa_pis()
478 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bt, var))) { in place_essa_pis()
483 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bf, var))) { in place_essa_pis()
512 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bt, var))) { in place_essa_pis()
515 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bf, var))) { in place_essa_pis()
519 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bf, var))) { in place_essa_pis()
522 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bt, var))) { in place_essa_pis()
539 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bt, var))) { in place_essa_pis()
800 int i, j; in zend_ssa_rename() local
853 for (j = 0; j < blocks[succ].predecessors_count; j++) { in zend_ssa_rename()
854 p->sources[j] = var[p->var]; in zend_ssa_rename()
862 for (j = 0; j < blocks[succ].predecessors_count; j++) in zend_ssa_rename()
863 if (ssa->cfg.predecessors[blocks[succ].predecessor_offset + j] == n) { in zend_ssa_rename()
866 ZEND_ASSERT(j < blocks[succ].predecessors_count); in zend_ssa_rename()
867 p->sources[j] = var[p->var]; in zend_ssa_rename()
868 if (fe_fetch_ssa_op && i == 0 && p->sources[j] == fe_fetch_ssa_op->op2_def) { in zend_ssa_rename()
870 p->sources[j] = fe_fetch_ssa_op->op2_use; in zend_ssa_rename()
879 for (j = 0; j < blocks[succ].predecessors_count; j++) { in zend_ssa_rename()
880 if (ssa->cfg.predecessors[blocks[succ].predecessor_offset + j] == n) { in zend_ssa_rename()
884 ZEND_ASSERT(j < blocks[succ].predecessors_count); in zend_ssa_rename()
885 q->sources[j] = p->ssa_var; in zend_ssa_rename()
895 j = blocks[n].children; in zend_ssa_rename()
896 while (j >= 0) { in zend_ssa_rename()
898 if (zend_ssa_rename(op_array, build_flags, ssa, var, j) != SUCCESS) in zend_ssa_rename()
900 j = blocks[j].next_child; in zend_ssa_rename()
919 int i, j, k, changed; in zend_build_ssa() local
965 for (j = 0; j < blocks_count; j++) { in zend_build_ssa()
966 zend_bitset def_j = def + j * set_size, phi_j = phi + j * set_size; in zend_build_ssa()
967 if ((blocks[j].flags & ZEND_BB_REACHABLE) == 0) { in zend_build_ssa()
970 if (blocks[j].predecessors_count > 1) { in zend_build_ssa()
971 if (blocks[j].flags & ZEND_BB_IRREDUCIBLE_LOOP) { in zend_build_ssa()
975 zend_bitset_union(phi_j, in + (j * set_size), set_size); in zend_build_ssa()
977 for (k = 0; k < blocks[j].predecessors_count; k++) { in zend_build_ssa()
978 i = ssa->cfg.predecessors[blocks[j].predecessor_offset + k]; in zend_build_ssa()
979 while (i != -1 && i != blocks[j].idom) { in zend_build_ssa()
981 phi_j, phi_j, def + (i * set_size), in + (j * set_size), set_size); in zend_build_ssa()
1001 for (j = 0; j < blocks_count; j++) { in zend_build_ssa()
1002 if ((blocks[j].flags & ZEND_BB_REACHABLE) == 0) { in zend_build_ssa()
1005 if (!zend_bitset_empty(phi + j * set_size, set_size)) { in zend_build_ssa()
1006 ZEND_BITSET_REVERSE_FOREACH(phi + j * set_size, set_size, i) { in zend_build_ssa()
1009 ZEND_MM_ALIGNED_SIZE(sizeof(int) * blocks[j].predecessors_count) + in zend_build_ssa()
1010 sizeof(void*) * blocks[j].predecessors_count); in zend_build_ssa()
1013 memset(phi->sources, 0xff, sizeof(int) * blocks[j].predecessors_count); in zend_build_ssa()
1014 …(((char*)phi->sources) + ZEND_MM_ALIGNED_SIZE(sizeof(int) * ssa->cfg.blocks[j].predecessors_count)… in zend_build_ssa()
1022 zend_ssa_phi **pp = &ssa_blocks[j].phis; in zend_build_ssa()
1045 for (j = 0; j < op_array->last_var; j++) { in zend_build_ssa()
1046 var[j] = j; in zend_build_ssa()
1144 int j; in zend_ssa_compute_use_def_chains() local
1146 for (j = 0; j < ssa->cfg.blocks[i].predecessors_count; j++) { in zend_ssa_compute_use_def_chains()
1149 ZEND_ASSERT(phi->sources[j] >= 0); in zend_ssa_compute_use_def_chains()
1150 p = ssa_vars[phi->sources[j]].phi_use_chain; in zend_ssa_compute_use_def_chains()
1152 p = zend_ssa_next_use_phi(ssa, phi->sources[j], p); in zend_ssa_compute_use_def_chains()
1155 phi->use_chains[j] = ssa_vars[phi->sources[j]].phi_use_chain; in zend_ssa_compute_use_def_chains()
1156 ssa_vars[phi->sources[j]].phi_use_chain = phi; in zend_ssa_compute_use_def_chains()
1259 int j; in zend_ssa_next_use_phi_ptr() local
1260 for (j = 0; j < ssa->cfg.blocks[p->block].predecessors_count; j++) { in zend_ssa_next_use_phi_ptr()
1261 if (p->sources[j] == var) { in zend_ssa_next_use_phi_ptr()
1262 return &p->use_chains[j]; in zend_ssa_next_use_phi_ptr()
1325 int j, var_num = phi->sources[pred_offset]; in zend_ssa_remove_phi_source() local
1336 for (j = 0; j < predecessors_count; j++) { in zend_ssa_remove_phi_source()
1337 if (phi->sources[j] == var_num) { in zend_ssa_remove_phi_source()
1338 if (j < pred_offset) { in zend_ssa_remove_phi_source()
1340 } else if (j >= pred_offset) { in zend_ssa_remove_phi_source()
1341 phi->use_chains[j] = next_phi; in zend_ssa_remove_phi_source()
1402 int j; in zend_ssa_remove_predecessor() local
1408 for (j = 0; j < next_block->predecessors_count; j++) { in zend_ssa_remove_predecessor()
1409 if (predecessors[j] == from) { in zend_ssa_remove_predecessor()
1410 pred_offset = j; in zend_ssa_remove_predecessor()
1449 int j, s; in zend_ssa_remove_block() local
1460 for (j = block->start; j < block->start + block->len; j++) { in zend_ssa_remove_block()
1461 if (op_array->opcodes[j].opcode == ZEND_NOP) { in zend_ssa_remove_block()
1465 zend_ssa_remove_defs_of_instr(ssa, &ssa->ops[j]); in zend_ssa_remove_block()
1466 zend_ssa_remove_instr(ssa, &op_array->opcodes[j], &ssa->ops[j]); in zend_ssa_remove_block()
1475 for (j = 0; j < block->predecessors_count; j++) { in zend_ssa_remove_block()
1476 if (predecessors[j] >= 0) { in zend_ssa_remove_block()
1477 zend_basic_block *prev_block = &ssa->cfg.blocks[predecessors[j]]; in zend_ssa_remove_block()
1496 j = ssa->cfg.blocks[block->idom].children; in zend_ssa_remove_block()
1497 if (j == i) { in zend_ssa_remove_block()
1499 } else if (j >= 0) { in zend_ssa_remove_block()
1500 while (ssa->cfg.blocks[j].next_child >= 0) { in zend_ssa_remove_block()
1501 if (ssa->cfg.blocks[j].next_child == i) { in zend_ssa_remove_block()
1502 ssa->cfg.blocks[j].next_child = block->next_child; in zend_ssa_remove_block()
1505 j = ssa->cfg.blocks[j].next_child; in zend_ssa_remove_block()
1598 int j; in zend_ssa_rename_var_uses() local
1604 for (j = 0; j < ssa->cfg.blocks[phi->block].predecessors_count; j++) { in zend_ssa_rename_var_uses()
1605 if (phi->sources[j] == new) { in zend_ssa_rename_var_uses()
1606 existing_use_chain_ptr = &phi->use_chains[j]; in zend_ssa_rename_var_uses()
1611 for (j = 0; j < ssa->cfg.blocks[phi->block].predecessors_count; j++) { in zend_ssa_rename_var_uses()
1612 if (phi->sources[j] == new) { in zend_ssa_rename_var_uses()
1614 } else if (phi->sources[j] == old) { in zend_ssa_rename_var_uses()
1615 phi->sources[j] = new; in zend_ssa_rename_var_uses()
1621 phi->use_chains[j] = *existing_use_chain_ptr; in zend_ssa_rename_var_uses()
1624 phi->use_chains[j] = new_var->phi_use_chain; in zend_ssa_rename_var_uses()
1629 phi->use_chains[j] = NULL; in zend_ssa_rename_var_uses()