Lines Matching refs:j
245 int j, blocks_count = ssa->cfg.blocks_count; in place_essa_pis() local
246 for (j = 0; j < blocks_count; j++) { in place_essa_pis()
248 zend_op *opline = op_array->opcodes + blocks[j].start + blocks[j].len - 1; in place_essa_pis()
252 if ((blocks[j].flags & ZEND_BB_REACHABLE) == 0 || blocks[j].len == 0) { in place_essa_pis()
260 bf = blocks[j].successors[0]; in place_essa_pis()
261 bt = blocks[j].successors[1]; in place_essa_pis()
264 bt = blocks[j].successors[0]; in place_essa_pis()
265 bf = blocks[j].successors[1]; in place_essa_pis()
270 if ((pi = add_pi(arena, op_array, dfg, ssa, j, blocks[j].successors[0], var))) { in place_essa_pis()
278 if ((pi = add_pi(arena, op_array, dfg, ssa, j, blocks[j].successors[1], var))) { in place_essa_pis()
290 if (blocks[j].len == 1) { in place_essa_pis()
368 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bt, var1))) { in place_essa_pis()
371 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bf, var1))) { in place_essa_pis()
375 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bf, var1))) { in place_essa_pis()
378 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bt, var1))) { in place_essa_pis()
383 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bt, var1))) { in place_essa_pis()
387 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bf, var1))) { in place_essa_pis()
391 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bt, var1))) { in place_essa_pis()
395 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bf, var1))) { in place_essa_pis()
403 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bt, var2))) { in place_essa_pis()
406 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bf, var2))) { in place_essa_pis()
410 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bf, var2))) { in place_essa_pis()
413 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bt, var2))) { in place_essa_pis()
418 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bt, var2))) { in place_essa_pis()
422 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bf, var2))) { in place_essa_pis()
426 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bt, var2))) { in place_essa_pis()
430 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bf, var2))) { in place_essa_pis()
444 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bf, var))) { in place_essa_pis()
447 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bt, var))) { in place_essa_pis()
451 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bf, var))) { in place_essa_pis()
454 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bt, var))) { in place_essa_pis()
465 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bf, var))) { in place_essa_pis()
469 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bt, var))) { in place_essa_pis()
476 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bt, var))) { in place_essa_pis()
481 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bf, var))) { in place_essa_pis()
510 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bt, var))) { in place_essa_pis()
513 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bf, var))) { in place_essa_pis()
517 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bf, var))) { in place_essa_pis()
520 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bt, var))) { in place_essa_pis()
534 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bt, var))) { in place_essa_pis()
795 int i, j; in zend_ssa_rename() local
848 for (j = 0; j < blocks[succ].predecessors_count; j++) { in zend_ssa_rename()
849 p->sources[j] = var[p->var]; in zend_ssa_rename()
857 for (j = 0; j < blocks[succ].predecessors_count; j++) in zend_ssa_rename()
858 if (ssa->cfg.predecessors[blocks[succ].predecessor_offset + j] == n) { in zend_ssa_rename()
861 ZEND_ASSERT(j < blocks[succ].predecessors_count); in zend_ssa_rename()
862 p->sources[j] = var[p->var]; in zend_ssa_rename()
863 if (fe_fetch_ssa_op && i == 0 && p->sources[j] == fe_fetch_ssa_op->op2_def) { in zend_ssa_rename()
865 p->sources[j] = fe_fetch_ssa_op->op2_use; in zend_ssa_rename()
874 for (j = 0; j < blocks[succ].predecessors_count; j++) { in zend_ssa_rename()
875 if (ssa->cfg.predecessors[blocks[succ].predecessor_offset + j] == n) { in zend_ssa_rename()
879 ZEND_ASSERT(j < blocks[succ].predecessors_count); in zend_ssa_rename()
880 q->sources[j] = p->ssa_var; in zend_ssa_rename()
890 j = blocks[n].children; in zend_ssa_rename()
891 while (j >= 0) { in zend_ssa_rename()
893 if (zend_ssa_rename(op_array, build_flags, ssa, var, j) == FAILURE) in zend_ssa_rename()
895 j = blocks[j].next_child; in zend_ssa_rename()
914 int i, j, k, changed; in zend_build_ssa() local
957 for (j = 0; j < blocks_count; j++) { in zend_build_ssa()
958 zend_bitset def_j = def + j * set_size, phi_j = phi + j * set_size; in zend_build_ssa()
959 if ((blocks[j].flags & ZEND_BB_REACHABLE) == 0) { in zend_build_ssa()
962 if (blocks[j].predecessors_count > 1) { in zend_build_ssa()
963 if (blocks[j].flags & ZEND_BB_IRREDUCIBLE_LOOP) { in zend_build_ssa()
967 zend_bitset_union(phi_j, in + (j * set_size), set_size); in zend_build_ssa()
969 for (k = 0; k < blocks[j].predecessors_count; k++) { in zend_build_ssa()
970 i = ssa->cfg.predecessors[blocks[j].predecessor_offset + k]; in zend_build_ssa()
971 while (i != -1 && i != blocks[j].idom) { in zend_build_ssa()
973 phi_j, phi_j, def + (i * set_size), in + (j * set_size), set_size); in zend_build_ssa()
993 for (j = 0; j < blocks_count; j++) { in zend_build_ssa()
994 if ((blocks[j].flags & ZEND_BB_REACHABLE) == 0) { in zend_build_ssa()
997 if (!zend_bitset_empty(phi + j * set_size, set_size)) { in zend_build_ssa()
998 ZEND_BITSET_REVERSE_FOREACH(phi + j * set_size, set_size, i) { in zend_build_ssa()
1001 ZEND_MM_ALIGNED_SIZE(sizeof(int) * blocks[j].predecessors_count) + in zend_build_ssa()
1002 sizeof(void*) * blocks[j].predecessors_count); in zend_build_ssa()
1005 memset(phi->sources, 0xff, sizeof(int) * blocks[j].predecessors_count); in zend_build_ssa()
1006 …(((char*)phi->sources) + ZEND_MM_ALIGNED_SIZE(sizeof(int) * ssa->cfg.blocks[j].predecessors_count)… in zend_build_ssa()
1014 zend_ssa_phi **pp = &ssa_blocks[j].phis; in zend_build_ssa()
1037 for (j = 0; j < op_array->last_var; j++) { in zend_build_ssa()
1038 var[j] = j; in zend_build_ssa()
1136 int j; in zend_ssa_compute_use_def_chains() local
1138 for (j = 0; j < ssa->cfg.blocks[i].predecessors_count; j++) { in zend_ssa_compute_use_def_chains()
1141 ZEND_ASSERT(phi->sources[j] >= 0); in zend_ssa_compute_use_def_chains()
1142 p = ssa_vars[phi->sources[j]].phi_use_chain; in zend_ssa_compute_use_def_chains()
1144 p = zend_ssa_next_use_phi(ssa, phi->sources[j], p); in zend_ssa_compute_use_def_chains()
1147 phi->use_chains[j] = ssa_vars[phi->sources[j]].phi_use_chain; in zend_ssa_compute_use_def_chains()
1148 ssa_vars[phi->sources[j]].phi_use_chain = phi; in zend_ssa_compute_use_def_chains()
1287 int j; in zend_ssa_next_use_phi_ptr() local
1288 for (j = 0; j < ssa->cfg.blocks[p->block].predecessors_count; j++) { in zend_ssa_next_use_phi_ptr()
1289 if (p->sources[j] == var) { in zend_ssa_next_use_phi_ptr()
1290 return &p->use_chains[j]; in zend_ssa_next_use_phi_ptr()
1353 int j, var_num = phi->sources[pred_offset]; in zend_ssa_remove_phi_source() local
1364 for (j = 0; j < predecessors_count; j++) { in zend_ssa_remove_phi_source()
1365 if (phi->sources[j] == var_num) { in zend_ssa_remove_phi_source()
1366 if (j < pred_offset) { in zend_ssa_remove_phi_source()
1368 } else if (j >= pred_offset) { in zend_ssa_remove_phi_source()
1369 phi->use_chains[j] = next_phi; in zend_ssa_remove_phi_source()
1430 int j; in zend_ssa_remove_predecessor() local
1436 for (j = 0; j < next_block->predecessors_count; j++) { in zend_ssa_remove_predecessor()
1437 if (predecessors[j] == from) { in zend_ssa_remove_predecessor()
1438 pred_offset = j; in zend_ssa_remove_predecessor()
1476 int j; in zend_ssa_remove_block() local
1487 for (j = block->start; j < block->start + block->len; j++) { in zend_ssa_remove_block()
1488 if (op_array->opcodes[j].opcode == ZEND_NOP) { in zend_ssa_remove_block()
1492 zend_ssa_remove_defs_of_instr(ssa, &ssa->ops[j]); in zend_ssa_remove_block()
1493 zend_ssa_remove_instr(ssa, &op_array->opcodes[j], &ssa->ops[j]); in zend_ssa_remove_block()
1504 int j, s; in zend_ssa_remove_block_from_cfg() local
1512 for (j = 0; j < block->predecessors_count; j++) { in zend_ssa_remove_block_from_cfg()
1513 if (predecessors[j] >= 0) { in zend_ssa_remove_block_from_cfg()
1514 zend_basic_block *prev_block = &ssa->cfg.blocks[predecessors[j]]; in zend_ssa_remove_block_from_cfg()
1533 j = ssa->cfg.blocks[block->idom].children; in zend_ssa_remove_block_from_cfg()
1534 if (j == i) { in zend_ssa_remove_block_from_cfg()
1536 } else if (j >= 0) { in zend_ssa_remove_block_from_cfg()
1537 while (ssa->cfg.blocks[j].next_child >= 0) { in zend_ssa_remove_block_from_cfg()
1538 if (ssa->cfg.blocks[j].next_child == i) { in zend_ssa_remove_block_from_cfg()
1539 ssa->cfg.blocks[j].next_child = block->next_child; in zend_ssa_remove_block_from_cfg()
1542 j = ssa->cfg.blocks[j].next_child; in zend_ssa_remove_block_from_cfg()
1635 int j; in zend_ssa_rename_var_uses() local
1641 for (j = 0; j < ssa->cfg.blocks[phi->block].predecessors_count; j++) { in zend_ssa_rename_var_uses()
1642 if (phi->sources[j] == new) { in zend_ssa_rename_var_uses()
1643 existing_use_chain_ptr = &phi->use_chains[j]; in zend_ssa_rename_var_uses()
1648 for (j = 0; j < ssa->cfg.blocks[phi->block].predecessors_count; j++) { in zend_ssa_rename_var_uses()
1649 if (phi->sources[j] == new) { in zend_ssa_rename_var_uses()
1651 } else if (phi->sources[j] == old) { in zend_ssa_rename_var_uses()
1652 phi->sources[j] = new; in zend_ssa_rename_var_uses()
1658 phi->use_chains[j] = *existing_use_chain_ptr; in zend_ssa_rename_var_uses()
1661 phi->use_chains[j] = new_var->phi_use_chain; in zend_ssa_rename_var_uses()
1666 phi->use_chains[j] = NULL; in zend_ssa_rename_var_uses()