Lines Matching refs:blocks
27 static bool dominates(const zend_basic_block *blocks, int a, int b) { in dominates() argument
28 while (blocks[b].level > blocks[a].level) { in dominates()
29 b = blocks[b].idom; in dominates()
53 if (dominates(cfg->blocks, other_successor, predecessor)) { in will_rejoin()
72 from_block = &ssa->cfg.blocks[from]; in needs_pi()
78 to_block = &ssa->cfg.blocks[to]; in needs_pi()
103 ZEND_MM_ALIGNED_SIZE(sizeof(int) * ssa->cfg.blocks[to].predecessors_count) + in add_pi()
104 sizeof(void*) * ssa->cfg.blocks[to].predecessors_count); in add_pi()
106 memset(phi->sources, 0xff, sizeof(int) * ssa->cfg.blocks[to].predecessors_count); in add_pi()
107 …i**)(((char*)phi->sources) + ZEND_MM_ALIGNED_SIZE(sizeof(int) * ssa->cfg.blocks[to].predecessors_c… in add_pi()
112 phi->next = ssa->blocks[to].phis; in add_pi()
113 ssa->blocks[to].phis = phi; in add_pi()
123 if (ssa->cfg.blocks[to].predecessors_count > 1) { in add_pi()
244 zend_basic_block *blocks = ssa->cfg.blocks; in place_essa_pis() local
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()
821 zend_basic_block *blocks = ssa->cfg.blocks; in zend_ssa_rename() local
822 zend_ssa_block *ssa_blocks = ssa->blocks; in zend_ssa_rename()
831 if (blocks[n].next_child >= 0) { in zend_ssa_rename()
851 opline = op_array->opcodes + blocks[n].start; in zend_ssa_rename()
852 end = opline + blocks[n].len; in zend_ssa_rename()
860 zend_ssa_op *fe_fetch_ssa_op = blocks[n].len != 0 in zend_ssa_rename()
863 ? &ssa_ops[blocks[n].start + blocks[n].len - 1] : NULL; in zend_ssa_rename()
864 for (i = 0; i < blocks[n].successors_count; i++) { in zend_ssa_rename()
865 int succ = blocks[n].successors[i]; in zend_ssa_rename()
878 for (j = 0; j < blocks[succ].predecessors_count; j++) { in zend_ssa_rename()
887 for (j = 0; j < blocks[succ].predecessors_count; j++) in zend_ssa_rename()
888 if (ssa->cfg.predecessors[blocks[succ].predecessor_offset + j] == n) { in zend_ssa_rename()
891 ZEND_ASSERT(j < blocks[succ].predecessors_count); in zend_ssa_rename()
904 for (j = 0; j < blocks[succ].predecessors_count; j++) { in zend_ssa_rename()
905 if (ssa->cfg.predecessors[blocks[succ].predecessor_offset + j] == n) { in zend_ssa_rename()
909 ZEND_ASSERT(j < blocks[succ].predecessors_count); in zend_ssa_rename()
920 j = blocks[n].children; in zend_ssa_rename()
925 j = blocks[j].next_child; in zend_ssa_rename()
938 zend_basic_block *blocks = ssa->cfg.blocks; in zend_build_ssa() local
955 ssa->blocks = ssa_blocks; in zend_build_ssa()
989 if ((blocks[j].flags & ZEND_BB_REACHABLE) == 0) { in zend_build_ssa()
992 if (blocks[j].predecessors_count > 1) { in zend_build_ssa()
993 if (blocks[j].flags & ZEND_BB_IRREDUCIBLE_LOOP) { in zend_build_ssa()
999 for (k = 0; k < blocks[j].predecessors_count; k++) { in zend_build_ssa()
1000 i = ssa->cfg.predecessors[blocks[j].predecessor_offset + k]; in zend_build_ssa()
1001 while (i != -1 && i != blocks[j].idom) { in zend_build_ssa()
1004 i = blocks[i].idom; in zend_build_ssa()
1024 if ((blocks[j].flags & ZEND_BB_REACHABLE) == 0) { in zend_build_ssa()
1031 ZEND_MM_ALIGNED_SIZE(sizeof(int) * blocks[j].predecessors_count) + in zend_build_ssa()
1032 sizeof(void*) * blocks[j].predecessors_count); in zend_build_ssa()
1035 memset(phi->sources, 0xff, sizeof(int) * blocks[j].predecessors_count); in zend_build_ssa()
1036 …i**)(((char*)phi->sources) + ZEND_MM_ALIGNED_SIZE(sizeof(int) * ssa->cfg.blocks[j].predecessors_co… in zend_build_ssa()
1137 zend_ssa_phi *phi = ssa->blocks[i].phis; in zend_ssa_compute_use_def_chains()
1168 for (j = 0; j < ssa->cfg.blocks[i].predecessors_count; j++) { in zend_ssa_compute_use_def_chains()
1318 for (j = 0; j < ssa->cfg.blocks[p->block].predecessors_count; j++) { in zend_ssa_next_use_phi_ptr()
1354 zend_ssa_block *block = &ssa->blocks[phi->block]; in zend_ssa_remove_phi_from_block()
1457 zend_basic_block *next_block = &ssa->cfg.blocks[to]; in zend_ssa_remove_predecessor()
1458 zend_ssa_block *next_ssa_block = &ssa->blocks[to]; in zend_ssa_remove_predecessor()
1503 zend_basic_block *block = &ssa->cfg.blocks[i]; in zend_ssa_remove_block()
1504 zend_ssa_block *ssa_block = &ssa->blocks[i]; in zend_ssa_remove_block()
1532 zend_basic_block *block = &ssa->cfg.blocks[i]; in zend_ssa_remove_block_from_cfg()
1544 zend_basic_block *prev_block = &ssa->cfg.blocks[predecessors[j]]; in zend_ssa_remove_block_from_cfg()
1563 j = ssa->cfg.blocks[block->idom].children; in zend_ssa_remove_block_from_cfg()
1565 ssa->cfg.blocks[block->idom].children = block->next_child; in zend_ssa_remove_block_from_cfg()
1567 while (ssa->cfg.blocks[j].next_child >= 0) { in zend_ssa_remove_block_from_cfg()
1568 if (ssa->cfg.blocks[j].next_child == i) { in zend_ssa_remove_block_from_cfg()
1569 ssa->cfg.blocks[j].next_child = block->next_child; in zend_ssa_remove_block_from_cfg()
1572 j = ssa->cfg.blocks[j].next_child; in zend_ssa_remove_block_from_cfg()
1671 for (j = 0; j < ssa->cfg.blocks[phi->block].predecessors_count; j++) { in zend_ssa_rename_var_uses()
1678 for (j = 0; j < ssa->cfg.blocks[phi->block].predecessors_count; j++) { in zend_ssa_rename_var_uses()