Lines Matching refs:j
241 int j, blocks_count = ssa->cfg.blocks_count; in place_essa_pis() local
242 for (j = 0; j < blocks_count; j++) { in place_essa_pis()
244 zend_op *opline = op_array->opcodes + blocks[j].start + blocks[j].len - 1; in place_essa_pis()
248 if ((blocks[j].flags & ZEND_BB_REACHABLE) == 0 || blocks[j].len == 0) { in place_essa_pis()
257 bf = blocks[j].successors[0]; in place_essa_pis()
258 bt = blocks[j].successors[1]; in place_essa_pis()
261 bt = blocks[j].successors[0]; in place_essa_pis()
262 bf = blocks[j].successors[1]; in place_essa_pis()
349 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bt, var1))) { in place_essa_pis()
352 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bf, var1))) { in place_essa_pis()
356 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bf, var1))) { in place_essa_pis()
359 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bt, var1))) { in place_essa_pis()
364 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bt, var1))) { in place_essa_pis()
368 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bf, var1))) { in place_essa_pis()
372 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bt, var1))) { in place_essa_pis()
376 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bf, var1))) { in place_essa_pis()
384 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bt, var2))) { in place_essa_pis()
387 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bf, var2))) { in place_essa_pis()
391 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bf, var2))) { in place_essa_pis()
394 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bt, var2))) { in place_essa_pis()
399 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bt, var2))) { in place_essa_pis()
403 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bf, var2))) { in place_essa_pis()
407 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bt, var2))) { in place_essa_pis()
411 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bf, var2))) { in place_essa_pis()
425 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bf, var))) { in place_essa_pis()
428 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bt, var))) { in place_essa_pis()
432 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bf, var))) { in place_essa_pis()
435 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bt, var))) { in place_essa_pis()
446 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bf, var))) { in place_essa_pis()
450 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bt, var))) { in place_essa_pis()
457 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bt, var))) { in place_essa_pis()
462 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bf, var))) { in place_essa_pis()
491 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bt, var))) { in place_essa_pis()
494 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bf, var))) { in place_essa_pis()
498 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bf, var))) { in place_essa_pis()
501 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bt, var))) { in place_essa_pis()
518 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bt, var))) { in place_essa_pis()
533 int i, j; in zend_ssa_rename() local
814 for (j = 0; j < blocks[succ].predecessors_count; j++) { in zend_ssa_rename()
815 p->sources[j] = var[p->var]; in zend_ssa_rename()
823 for (j = 0; j < blocks[succ].predecessors_count; j++) in zend_ssa_rename()
824 if (ssa->cfg.predecessors[blocks[succ].predecessor_offset + j] == n) { in zend_ssa_rename()
827 ZEND_ASSERT(j < blocks[succ].predecessors_count); in zend_ssa_rename()
828 p->sources[j] = var[p->var]; in zend_ssa_rename()
836 for (j = 0; j < blocks[succ].predecessors_count; j++) { in zend_ssa_rename()
837 if (ssa->cfg.predecessors[blocks[succ].predecessor_offset + j] == n) { in zend_ssa_rename()
841 ZEND_ASSERT(j < blocks[succ].predecessors_count); in zend_ssa_rename()
842 q->sources[j] = p->ssa_var; in zend_ssa_rename()
852 j = blocks[n].children; in zend_ssa_rename()
853 while (j >= 0) { in zend_ssa_rename()
855 if (zend_ssa_rename(op_array, build_flags, ssa, var, j) != SUCCESS) in zend_ssa_rename()
857 j = blocks[j].next_child; in zend_ssa_rename()
876 int i, j, k, changed; in zend_build_ssa() local
923 for (j = 0; j < blocks_count; j++) { in zend_build_ssa()
924 zend_bitset def_j = def + j * set_size, phi_j = phi + j * set_size; in zend_build_ssa()
925 if ((blocks[j].flags & ZEND_BB_REACHABLE) == 0) { in zend_build_ssa()
928 if (blocks[j].predecessors_count > 1) { in zend_build_ssa()
929 if (blocks[j].flags & ZEND_BB_IRREDUCIBLE_LOOP) { in zend_build_ssa()
933 zend_bitset_union(phi_j, in + (j * set_size), set_size); in zend_build_ssa()
935 for (k = 0; k < blocks[j].predecessors_count; k++) { in zend_build_ssa()
936 i = ssa->cfg.predecessors[blocks[j].predecessor_offset + k]; in zend_build_ssa()
937 while (i != -1 && i != blocks[j].idom) { in zend_build_ssa()
939 phi_j, phi_j, def + (i * set_size), in + (j * set_size), set_size); in zend_build_ssa()
959 for (j = 0; j < blocks_count; j++) { in zend_build_ssa()
960 if ((blocks[j].flags & ZEND_BB_REACHABLE) == 0) { in zend_build_ssa()
963 if (!zend_bitset_empty(phi + j * set_size, set_size)) { in zend_build_ssa()
964 ZEND_BITSET_REVERSE_FOREACH(phi + j * set_size, set_size, i) { in zend_build_ssa()
967 ZEND_MM_ALIGNED_SIZE(sizeof(int) * blocks[j].predecessors_count) + in zend_build_ssa()
968 sizeof(void*) * blocks[j].predecessors_count); in zend_build_ssa()
971 memset(phi->sources, 0xff, sizeof(int) * blocks[j].predecessors_count); in zend_build_ssa()
972 …(((char*)phi->sources) + ZEND_MM_ALIGNED_SIZE(sizeof(int) * ssa->cfg.blocks[j].predecessors_count)… in zend_build_ssa()
980 zend_ssa_phi **pp = &ssa_blocks[j].phis; in zend_build_ssa()
1003 for (j = 0; j < op_array->last_var; j++) { in zend_build_ssa()
1004 var[j] = j; in zend_build_ssa()
1102 int j; in zend_ssa_compute_use_def_chains() local
1104 for (j = 0; j < ssa->cfg.blocks[i].predecessors_count; j++) { in zend_ssa_compute_use_def_chains()
1107 ZEND_ASSERT(phi->sources[j] >= 0); in zend_ssa_compute_use_def_chains()
1108 p = ssa_vars[phi->sources[j]].phi_use_chain; in zend_ssa_compute_use_def_chains()
1110 p = zend_ssa_next_use_phi(ssa, phi->sources[j], p); in zend_ssa_compute_use_def_chains()
1113 phi->use_chains[j] = ssa_vars[phi->sources[j]].phi_use_chain; in zend_ssa_compute_use_def_chains()
1114 ssa_vars[phi->sources[j]].phi_use_chain = phi; in zend_ssa_compute_use_def_chains()
1219 int j; in zend_ssa_next_use_phi_ptr() local
1220 for (j = 0; j < ssa->cfg.blocks[p->block].predecessors_count; j++) { in zend_ssa_next_use_phi_ptr()
1221 if (p->sources[j] == var) { in zend_ssa_next_use_phi_ptr()
1222 return &p->use_chains[j]; in zend_ssa_next_use_phi_ptr()
1285 int j, var_num = phi->sources[pred_offset]; in zend_ssa_remove_phi_source() local
1296 for (j = 0; j < predecessors_count; j++) { in zend_ssa_remove_phi_source()
1297 if (phi->sources[j] == var_num) { in zend_ssa_remove_phi_source()
1298 if (j < pred_offset) { in zend_ssa_remove_phi_source()
1304 } else if (j >= pred_offset) { in zend_ssa_remove_phi_source()
1305 phi->use_chains[j] = next_phi; in zend_ssa_remove_phi_source()
1366 int j; in zend_ssa_remove_predecessor() local
1372 for (j = 0; j < next_block->predecessors_count; j++) { in zend_ssa_remove_predecessor()
1373 if (predecessors[j] == from) { in zend_ssa_remove_predecessor()
1374 pred_offset = j; in zend_ssa_remove_predecessor()
1413 int j, s; in zend_ssa_remove_block() local
1424 for (j = block->start; j < block->start + block->len; j++) { in zend_ssa_remove_block()
1425 if (op_array->opcodes[j].opcode == ZEND_NOP) { in zend_ssa_remove_block()
1429 if (op_array->opcodes[j].result_type & (IS_TMP_VAR|IS_VAR)) { in zend_ssa_remove_block()
1430 zend_optimizer_remove_live_range_ex(op_array, op_array->opcodes[j].result.var, j); in zend_ssa_remove_block()
1432 zend_ssa_remove_defs_of_instr(ssa, &ssa->ops[j]); in zend_ssa_remove_block()
1433 zend_ssa_remove_instr(ssa, &op_array->opcodes[j], &ssa->ops[j]); in zend_ssa_remove_block()
1442 for (j = 0; j < block->predecessors_count; j++) { in zend_ssa_remove_block()
1443 if (predecessors[j] >= 0) { in zend_ssa_remove_block()
1444 zend_basic_block *prev_block = &ssa->cfg.blocks[predecessors[j]]; in zend_ssa_remove_block()
1463 j = ssa->cfg.blocks[block->idom].children; in zend_ssa_remove_block()
1464 if (j == i) { in zend_ssa_remove_block()
1466 } else if (j >= 0) { in zend_ssa_remove_block()
1467 while (ssa->cfg.blocks[j].next_child >= 0) { in zend_ssa_remove_block()
1468 if (ssa->cfg.blocks[j].next_child == i) { in zend_ssa_remove_block()
1469 ssa->cfg.blocks[j].next_child = block->next_child; in zend_ssa_remove_block()
1472 j = ssa->cfg.blocks[j].next_child; in zend_ssa_remove_block()
1565 int j; in zend_ssa_rename_var_uses() local
1571 for (j = 0; j < ssa->cfg.blocks[phi->block].predecessors_count; j++) { in zend_ssa_rename_var_uses()
1572 if (phi->sources[j] == new) { in zend_ssa_rename_var_uses()
1573 existing_use_chain_ptr = &phi->use_chains[j]; in zend_ssa_rename_var_uses()
1578 for (j = 0; j < ssa->cfg.blocks[phi->block].predecessors_count; j++) { in zend_ssa_rename_var_uses()
1579 if (phi->sources[j] == new) { in zend_ssa_rename_var_uses()
1581 } else if (phi->sources[j] == old) { in zend_ssa_rename_var_uses()
1582 phi->sources[j] = new; in zend_ssa_rename_var_uses()
1588 phi->use_chains[j] = *existing_use_chain_ptr; in zend_ssa_rename_var_uses()
1591 phi->use_chains[j] = new_var->phi_use_chain; in zend_ssa_rename_var_uses()