Lines Matching refs:j
243 int j, blocks_count = ssa->cfg.blocks_count; in place_essa_pis() local
244 for (j = 0; j < blocks_count; j++) { in place_essa_pis()
246 zend_op *opline = op_array->opcodes + blocks[j].start + blocks[j].len - 1; in place_essa_pis()
250 if ((blocks[j].flags & ZEND_BB_REACHABLE) == 0 || blocks[j].len == 0) { in place_essa_pis()
259 bf = blocks[j].successors[0]; in place_essa_pis()
260 bt = blocks[j].successors[1]; in place_essa_pis()
263 bt = blocks[j].successors[0]; in place_essa_pis()
264 bf = blocks[j].successors[1]; in place_essa_pis()
351 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bt, var1))) { in place_essa_pis()
354 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bf, var1))) { in place_essa_pis()
358 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bf, var1))) { in place_essa_pis()
361 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bt, var1))) { in place_essa_pis()
366 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bt, var1))) { in place_essa_pis()
370 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bf, var1))) { in place_essa_pis()
374 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bt, var1))) { in place_essa_pis()
378 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bf, var1))) { in place_essa_pis()
386 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bt, var2))) { in place_essa_pis()
389 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bf, var2))) { in place_essa_pis()
393 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bf, var2))) { in place_essa_pis()
396 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bt, var2))) { in place_essa_pis()
401 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bt, var2))) { in place_essa_pis()
405 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bf, var2))) { in place_essa_pis()
409 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bt, var2))) { in place_essa_pis()
413 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bf, var2))) { in place_essa_pis()
427 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bf, var))) { in place_essa_pis()
430 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bt, var))) { in place_essa_pis()
434 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bf, var))) { in place_essa_pis()
437 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bt, var))) { in place_essa_pis()
448 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bf, var))) { in place_essa_pis()
452 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bt, var))) { in place_essa_pis()
459 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bt, var))) { in place_essa_pis()
464 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bf, var))) { in place_essa_pis()
493 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bt, var))) { in place_essa_pis()
496 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bf, var))) { in place_essa_pis()
500 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bf, var))) { in place_essa_pis()
503 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bt, var))) { in place_essa_pis()
520 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bt, var))) { in place_essa_pis()
535 int i, j; in zend_ssa_rename() local
803 for (j = 0; j < blocks[succ].predecessors_count; j++) { in zend_ssa_rename()
804 p->sources[j] = var[p->var]; in zend_ssa_rename()
812 for (j = 0; j < blocks[succ].predecessors_count; j++) in zend_ssa_rename()
813 if (ssa->cfg.predecessors[blocks[succ].predecessor_offset + j] == n) { in zend_ssa_rename()
816 ZEND_ASSERT(j < blocks[succ].predecessors_count); in zend_ssa_rename()
817 p->sources[j] = var[p->var]; in zend_ssa_rename()
825 for (j = 0; j < blocks[succ].predecessors_count; j++) { in zend_ssa_rename()
826 if (ssa->cfg.predecessors[blocks[succ].predecessor_offset + j] == n) { in zend_ssa_rename()
830 ZEND_ASSERT(j < blocks[succ].predecessors_count); in zend_ssa_rename()
831 q->sources[j] = p->ssa_var; in zend_ssa_rename()
841 j = blocks[n].children; in zend_ssa_rename()
842 while (j >= 0) { in zend_ssa_rename()
844 if (zend_ssa_rename(op_array, build_flags, ssa, var, j) != SUCCESS) in zend_ssa_rename()
846 j = blocks[j].next_child; in zend_ssa_rename()
865 int i, j, k, changed; in zend_build_ssa() local
912 for (j = 0; j < blocks_count; j++) { in zend_build_ssa()
913 zend_bitset def_j = def + j * set_size, phi_j = phi + j * set_size; in zend_build_ssa()
914 if ((blocks[j].flags & ZEND_BB_REACHABLE) == 0) { in zend_build_ssa()
917 if (blocks[j].predecessors_count > 1) { in zend_build_ssa()
918 if (blocks[j].flags & ZEND_BB_IRREDUCIBLE_LOOP) { in zend_build_ssa()
922 zend_bitset_union(phi_j, in + (j * set_size), set_size); in zend_build_ssa()
924 for (k = 0; k < blocks[j].predecessors_count; k++) { in zend_build_ssa()
925 i = ssa->cfg.predecessors[blocks[j].predecessor_offset + k]; in zend_build_ssa()
926 while (i != -1 && i != blocks[j].idom) { in zend_build_ssa()
928 phi_j, phi_j, def + (i * set_size), in + (j * set_size), set_size); in zend_build_ssa()
948 for (j = 0; j < blocks_count; j++) { in zend_build_ssa()
949 if ((blocks[j].flags & ZEND_BB_REACHABLE) == 0) { in zend_build_ssa()
952 if (!zend_bitset_empty(phi + j * set_size, set_size)) { in zend_build_ssa()
953 ZEND_BITSET_REVERSE_FOREACH(phi + j * set_size, set_size, i) { in zend_build_ssa()
956 ZEND_MM_ALIGNED_SIZE(sizeof(int) * blocks[j].predecessors_count) + in zend_build_ssa()
957 sizeof(void*) * blocks[j].predecessors_count); in zend_build_ssa()
960 memset(phi->sources, 0xff, sizeof(int) * blocks[j].predecessors_count); in zend_build_ssa()
961 …(((char*)phi->sources) + ZEND_MM_ALIGNED_SIZE(sizeof(int) * ssa->cfg.blocks[j].predecessors_count)… in zend_build_ssa()
969 zend_ssa_phi **pp = &ssa_blocks[j].phis; in zend_build_ssa()
992 for (j = 0; j < op_array->last_var; j++) { in zend_build_ssa()
993 var[j] = j; in zend_build_ssa()
1091 int j; in zend_ssa_compute_use_def_chains() local
1093 for (j = 0; j < ssa->cfg.blocks[i].predecessors_count; j++) { in zend_ssa_compute_use_def_chains()
1096 ZEND_ASSERT(phi->sources[j] >= 0); in zend_ssa_compute_use_def_chains()
1097 p = ssa_vars[phi->sources[j]].phi_use_chain; in zend_ssa_compute_use_def_chains()
1099 p = zend_ssa_next_use_phi(ssa, phi->sources[j], p); in zend_ssa_compute_use_def_chains()
1102 phi->use_chains[j] = ssa_vars[phi->sources[j]].phi_use_chain; in zend_ssa_compute_use_def_chains()
1103 ssa_vars[phi->sources[j]].phi_use_chain = phi; in zend_ssa_compute_use_def_chains()
1208 int j; in zend_ssa_next_use_phi_ptr() local
1209 for (j = 0; j < ssa->cfg.blocks[p->block].predecessors_count; j++) { in zend_ssa_next_use_phi_ptr()
1210 if (p->sources[j] == var) { in zend_ssa_next_use_phi_ptr()
1211 return &p->use_chains[j]; in zend_ssa_next_use_phi_ptr()
1274 int j, var_num = phi->sources[pred_offset]; in zend_ssa_remove_phi_source() local
1285 for (j = 0; j < predecessors_count; j++) { in zend_ssa_remove_phi_source()
1286 if (phi->sources[j] == var_num) { in zend_ssa_remove_phi_source()
1287 if (j < pred_offset) { in zend_ssa_remove_phi_source()
1293 } else if (j >= pred_offset) { in zend_ssa_remove_phi_source()
1294 phi->use_chains[j] = next_phi; in zend_ssa_remove_phi_source()
1355 int j; in zend_ssa_remove_predecessor() local
1361 for (j = 0; j < next_block->predecessors_count; j++) { in zend_ssa_remove_predecessor()
1362 if (predecessors[j] == from) { in zend_ssa_remove_predecessor()
1363 pred_offset = j; in zend_ssa_remove_predecessor()
1402 int j, s; in zend_ssa_remove_block() local
1413 for (j = block->start; j < block->start + block->len; j++) { in zend_ssa_remove_block()
1414 if (op_array->opcodes[j].opcode == ZEND_NOP) { in zend_ssa_remove_block()
1418 if (op_array->opcodes[j].result_type & (IS_TMP_VAR|IS_VAR)) { in zend_ssa_remove_block()
1419 zend_optimizer_remove_live_range_ex(op_array, op_array->opcodes[j].result.var, j); in zend_ssa_remove_block()
1421 zend_ssa_remove_defs_of_instr(ssa, &ssa->ops[j]); in zend_ssa_remove_block()
1422 zend_ssa_remove_instr(ssa, &op_array->opcodes[j], &ssa->ops[j]); in zend_ssa_remove_block()
1431 for (j = 0; j < block->predecessors_count; j++) { in zend_ssa_remove_block()
1432 if (predecessors[j] >= 0) { in zend_ssa_remove_block()
1433 zend_basic_block *prev_block = &ssa->cfg.blocks[predecessors[j]]; in zend_ssa_remove_block()
1452 j = ssa->cfg.blocks[block->idom].children; in zend_ssa_remove_block()
1453 if (j == i) { in zend_ssa_remove_block()
1455 } else if (j >= 0) { in zend_ssa_remove_block()
1456 while (ssa->cfg.blocks[j].next_child >= 0) { in zend_ssa_remove_block()
1457 if (ssa->cfg.blocks[j].next_child == i) { in zend_ssa_remove_block()
1458 ssa->cfg.blocks[j].next_child = block->next_child; in zend_ssa_remove_block()
1461 j = ssa->cfg.blocks[j].next_child; in zend_ssa_remove_block()
1554 int j; in zend_ssa_rename_var_uses() local
1560 for (j = 0; j < ssa->cfg.blocks[phi->block].predecessors_count; j++) { in zend_ssa_rename_var_uses()
1561 if (phi->sources[j] == new) { in zend_ssa_rename_var_uses()
1562 existing_use_chain_ptr = &phi->use_chains[j]; in zend_ssa_rename_var_uses()
1567 for (j = 0; j < ssa->cfg.blocks[phi->block].predecessors_count; j++) { in zend_ssa_rename_var_uses()
1568 if (phi->sources[j] == new) { in zend_ssa_rename_var_uses()
1570 } else if (phi->sources[j] == old) { in zend_ssa_rename_var_uses()
1571 phi->sources[j] = new; in zend_ssa_rename_var_uses()
1577 phi->use_chains[j] = *existing_use_chain_ptr; in zend_ssa_rename_var_uses()
1580 phi->use_chains[j] = new_var->phi_use_chain; in zend_ssa_rename_var_uses()