Lines Matching refs:ival

172 static zend_bool zend_ival_is_last_use(const zend_lifetime_interval *ival, int use)  in zend_ival_is_last_use()  argument
174 if (ival->flags & ZREG_LAST_USE) { in zend_ival_is_last_use()
175 const zend_life_range *range = &ival->range; in zend_ival_is_last_use()
355 zend_lifetime_interval *ival; in dasm_link_and_encode() local
360 ival = ra[i]; in dasm_link_and_encode()
362 if (ival && ival->reg != ZREG_NONE) { in dasm_link_and_encode()
363 range = &ival->range; in dasm_link_and_encode()
366 if (!zend_jit_load_var(dasm_state, ssa->var_info[i].type, ssa->vars[i].var, ival->reg)) { in dasm_link_and_encode()
791 zend_lifetime_interval *ival = intervals[var]; in zend_jit_add_range() local
793 if (!ival) { in zend_jit_add_range()
794 ival = zend_arena_alloc(&CG(arena), sizeof(zend_lifetime_interval)); in zend_jit_add_range()
795 if (!ival) { in zend_jit_add_range()
798 ival->ssa_var = var; in zend_jit_add_range()
799 ival->reg = ZREG_NONE; in zend_jit_add_range()
800 ival->flags = 0; in zend_jit_add_range()
801 ival->range.start = from; in zend_jit_add_range()
802 ival->range.end = to; in zend_jit_add_range()
803 ival->range.next = NULL; in zend_jit_add_range()
804 ival->hint = NULL; in zend_jit_add_range()
805 ival->used_as_hint = NULL; in zend_jit_add_range()
806 intervals[var] = ival; in zend_jit_add_range()
807 } else if (ival->range.start > to + 1) { in zend_jit_add_range()
813 range->start = ival->range.start; in zend_jit_add_range()
814 range->end = ival->range.end; in zend_jit_add_range()
815 range->next = ival->range.next; in zend_jit_add_range()
816 ival->range.start = from; in zend_jit_add_range()
817 ival->range.end = to; in zend_jit_add_range()
818 ival->range.next = range; in zend_jit_add_range()
819 } else if (ival->range.start == to + 1) { in zend_jit_add_range()
820 ival->range.start = from; in zend_jit_add_range()
822 zend_life_range *range = &ival->range; in zend_jit_add_range()
894 static void zend_jit_insert_interval(zend_lifetime_interval **list, zend_lifetime_interval *ival) in zend_jit_insert_interval() argument
898 *list = ival; in zend_jit_insert_interval()
899 ival->list_next = NULL; in zend_jit_insert_interval()
901 } else if (ival->range.start < (*list)->range.start) { in zend_jit_insert_interval()
902 ival->list_next = *list; in zend_jit_insert_interval()
903 *list = ival; in zend_jit_insert_interval()
912 zend_lifetime_interval *ival; in zend_jit_split_interval() local
917 ival = *free; in zend_jit_split_interval()
918 *free = ival->list_next; in zend_jit_split_interval()
920 ival = zend_arena_alloc(&CG(arena), sizeof(zend_lifetime_interval)); in zend_jit_split_interval()
922 if (!ival) { in zend_jit_split_interval()
929 ival->ssa_var = current->ssa_var; in zend_jit_split_interval()
930 ival->reg = ZREG_NONE; in zend_jit_split_interval()
931 ival->flags |= ZREG_SPLIT | ZREG_LOAD; in zend_jit_split_interval()
932 ival->flags &= ~ZREG_STORE; in zend_jit_split_interval()
933 ival->hint = NULL; in zend_jit_split_interval()
945 ival->range.start = pos; in zend_jit_split_interval()
946 ival->range.end = range->end; in zend_jit_split_interval()
947 ival->range.next = range->next; in zend_jit_split_interval()
956 zend_jit_insert_interval(list, ival); in zend_jit_split_interval()
979 zend_lifetime_interval *ival = intervals[i]; in zend_jit_sort_intervals() local
982 if (ival) { in zend_jit_sort_intervals()
983 if ((ival->range.start > last->range.start) || in zend_jit_sort_intervals()
984 (ival->range.start == last->range.start && in zend_jit_sort_intervals()
985 ((!ival->hint && last->hint && last->hint != ival) || in zend_jit_sort_intervals()
986 ival->range.end > last->range.end))) { in zend_jit_sort_intervals()
987 last->list_next = ival; in zend_jit_sort_intervals()
988 last = ival; in zend_jit_sort_intervals()
989 ival->list_next = NULL; in zend_jit_sort_intervals()
995 *p = last = ival; in zend_jit_sort_intervals()
996 ival->list_next = NULL; in zend_jit_sort_intervals()
998 } else if ((ival->range.start < (*p)->range.start) || in zend_jit_sort_intervals()
999 (ival->range.start == (*p)->range.start && in zend_jit_sort_intervals()
1000 ((ival->hint && !(*p)->hint && ival->hint != *p) || in zend_jit_sort_intervals()
1001 ival->range.end < (*p)->range.end))) { in zend_jit_sort_intervals()
1002 ival->list_next = *p; in zend_jit_sort_intervals()
1003 *p = ival; in zend_jit_sort_intervals()
1421 zend_lifetime_interval *ival = *list; in zend_jit_compute_liveness() local
1422 while (ival) { in zend_jit_compute_liveness()
1423 if (ival->hint) { in zend_jit_compute_liveness()
1424 ival->hint->used_as_hint = ival; in zend_jit_compute_liveness()
1426 ival = ival->list_next; in zend_jit_compute_liveness()
1439 static uint32_t zend_interval_end(zend_lifetime_interval *ival) in zend_interval_end() argument
1441 zend_life_range *range = &ival->range; in zend_interval_end()
1449 static zend_bool zend_interval_covers(zend_lifetime_interval *ival, uint32_t position) in zend_interval_covers() argument
1451 zend_life_range *range = &ival->range; in zend_interval_covers()
1815 …me_interval(const zend_op_array *op_array, const zend_ssa *ssa, const zend_lifetime_interval *ival) in zend_jit_dump_lifetime_interval() argument
1818 int var_num = ssa->vars[ival->ssa_var].var; in zend_jit_dump_lifetime_interval()
1820 fprintf(stderr, "#%d.", ival->ssa_var); in zend_jit_dump_lifetime_interval()
1822 fprintf(stderr, ": %u-%u", ival->range.start, ival->range.end); in zend_jit_dump_lifetime_interval()
1823 range = ival->range.next; in zend_jit_dump_lifetime_interval()
1828 if (ival->reg != ZREG_NONE) { in zend_jit_dump_lifetime_interval()
1829 fprintf(stderr, " (%s)", zend_reg_name[ival->reg]); in zend_jit_dump_lifetime_interval()
1831 if (ival->flags & ZREG_LAST_USE) { in zend_jit_dump_lifetime_interval()
1834 if (ival->flags & ZREG_LOAD) { in zend_jit_dump_lifetime_interval()
1837 if (ival->flags & ZREG_STORE) { in zend_jit_dump_lifetime_interval()
1840 if (ival->hint) { in zend_jit_dump_lifetime_interval()
1842 if (ival->hint->ssa_var >= 0) { in zend_jit_dump_lifetime_interval()
1843 var_num = ssa->vars[ival->hint->ssa_var].var; in zend_jit_dump_lifetime_interval()
1844 fprintf(stderr, "=#%d.", ival->hint->ssa_var); in zend_jit_dump_lifetime_interval()
1847 if (ival->hint->reg != ZREG_NONE) { in zend_jit_dump_lifetime_interval()
1848 fprintf(stderr, " (%s)", zend_reg_name[ival->hint->reg]); in zend_jit_dump_lifetime_interval()
1859 zend_lifetime_interval *list, *ival; in zend_jit_allocate_registers() local
1895 ival = list; in zend_jit_allocate_registers()
1896 while (ival) { in zend_jit_allocate_registers()
1897 zend_life_range *range = &ival->range; in zend_jit_allocate_registers()
1902 if (zend_ssa_is_last_use(op_array, ssa, ival->ssa_var, range->end)) { in zend_jit_allocate_registers()
1903 ival->flags |= ZREG_LAST_USE; in zend_jit_allocate_registers()
1905 ival = ival->list_next; in zend_jit_allocate_registers()
1912 ival = list; in zend_jit_allocate_registers()
1913 while (ival) { in zend_jit_allocate_registers()
1914 zend_jit_dump_lifetime_interval(op_array, ssa, ival); in zend_jit_allocate_registers()
1915 ival = ival->list_next; in zend_jit_allocate_registers()
1929 ival = list; in zend_jit_allocate_registers()
1930 while (ival != NULL) { in zend_jit_allocate_registers()
1931 zend_lifetime_interval *next = ival->list_next; in zend_jit_allocate_registers()
1933 ival->list_next = intervals[ival->ssa_var]; in zend_jit_allocate_registers()
1934 intervals[ival->ssa_var] = ival; in zend_jit_allocate_registers()
1935 ival = next; in zend_jit_allocate_registers()
2055 ival = intervals[i]; in zend_jit_allocate_registers()
2056 while (ival) { in zend_jit_allocate_registers()
2057 zend_jit_dump_lifetime_interval(op_array, ssa, ival); in zend_jit_allocate_registers()
2058 ival = ival->list_next; in zend_jit_allocate_registers()
2296 zend_lifetime_interval *ival = ra[phi->ssa_var]; in zend_jit() local
2298 if (ival) { in zend_jit()
2299 if (ival->flags & ZREG_LOAD) { in zend_jit()
2300 ZEND_ASSERT(ival->reg != ZREG_NONE); in zend_jit()
2302 …_load_var(&dasm_state, ssa->var_info[phi->ssa_var].type, ssa->vars[phi->ssa_var].var, ival->reg)) { in zend_jit()
2305 } else if (ival->flags & ZREG_STORE) { in zend_jit()
2306 ZEND_ASSERT(ival->reg != ZREG_NONE); in zend_jit()
2308 …re_var(&dasm_state, ssa->var_info[phi->ssa_var].type, ssa->vars[phi->ssa_var].var, ival->reg, 1)) { in zend_jit()