Lines Matching refs:ival

204 static bool zend_ival_is_last_use(const zend_lifetime_interval *ival, int use)  in zend_ival_is_last_use()  argument
206 if (ival->flags & ZREG_LAST_USE) { in zend_ival_is_last_use()
207 const zend_life_range *range = &ival->range; in zend_ival_is_last_use()
924 zend_lifetime_interval *ival; in dasm_link_and_encode() local
929 ival = ra[i]; in dasm_link_and_encode()
931 if (ival && ival->reg != ZREG_NONE) { in dasm_link_and_encode()
932 range = &ival->range; in dasm_link_and_encode()
935 if (!zend_jit_load_var(dasm_state, ssa->var_info[i].type, ssa->vars[i].var, ival->reg)) { in dasm_link_and_encode()
1360 zend_lifetime_interval *ival = intervals[var]; in zend_jit_add_range() local
1362 if (!ival) { in zend_jit_add_range()
1363 ival = zend_arena_alloc(&CG(arena), sizeof(zend_lifetime_interval)); in zend_jit_add_range()
1364 if (!ival) { in zend_jit_add_range()
1367 ival->ssa_var = var; in zend_jit_add_range()
1368 ival->reg = ZREG_NONE; in zend_jit_add_range()
1369 ival->flags = 0; in zend_jit_add_range()
1370 ival->range.start = from; in zend_jit_add_range()
1371 ival->range.end = to; in zend_jit_add_range()
1372 ival->range.next = NULL; in zend_jit_add_range()
1373 ival->hint = NULL; in zend_jit_add_range()
1374 ival->used_as_hint = NULL; in zend_jit_add_range()
1375 intervals[var] = ival; in zend_jit_add_range()
1376 } else if (ival->range.start > to + 1) { in zend_jit_add_range()
1382 range->start = ival->range.start; in zend_jit_add_range()
1383 range->end = ival->range.end; in zend_jit_add_range()
1384 range->next = ival->range.next; in zend_jit_add_range()
1385 ival->range.start = from; in zend_jit_add_range()
1386 ival->range.end = to; in zend_jit_add_range()
1387 ival->range.next = range; in zend_jit_add_range()
1388 } else if (ival->range.start == to + 1) { in zend_jit_add_range()
1389 ival->range.start = from; in zend_jit_add_range()
1391 zend_life_range *range = &ival->range; in zend_jit_add_range()
1463 static void zend_jit_insert_interval(zend_lifetime_interval **list, zend_lifetime_interval *ival) in zend_jit_insert_interval() argument
1467 *list = ival; in zend_jit_insert_interval()
1468 ival->list_next = NULL; in zend_jit_insert_interval()
1470 } else if (ival->range.start < (*list)->range.start) { in zend_jit_insert_interval()
1471 ival->list_next = *list; in zend_jit_insert_interval()
1472 *list = ival; in zend_jit_insert_interval()
1481 zend_lifetime_interval *ival; in zend_jit_split_interval() local
1486 ival = *free; in zend_jit_split_interval()
1487 *free = ival->list_next; in zend_jit_split_interval()
1489 ival = zend_arena_alloc(&CG(arena), sizeof(zend_lifetime_interval)); in zend_jit_split_interval()
1491 if (!ival) { in zend_jit_split_interval()
1498 ival->ssa_var = current->ssa_var; in zend_jit_split_interval()
1499 ival->reg = ZREG_NONE; in zend_jit_split_interval()
1500 ival->flags |= ZREG_SPLIT | ZREG_LOAD; in zend_jit_split_interval()
1501 ival->flags &= ~ZREG_STORE; in zend_jit_split_interval()
1502 ival->hint = NULL; in zend_jit_split_interval()
1514 ival->range.start = pos; in zend_jit_split_interval()
1515 ival->range.end = range->end; in zend_jit_split_interval()
1516 ival->range.next = range->next; in zend_jit_split_interval()
1525 zend_jit_insert_interval(list, ival); in zend_jit_split_interval()
1548 zend_lifetime_interval *ival = intervals[i]; in zend_jit_sort_intervals() local
1551 if (ival) { in zend_jit_sort_intervals()
1552 if ((ival->range.start > last->range.start) || in zend_jit_sort_intervals()
1553 (ival->range.start == last->range.start && in zend_jit_sort_intervals()
1554 ((!ival->hint && last->hint && last->hint != ival) || in zend_jit_sort_intervals()
1555 ival->range.end > last->range.end))) { in zend_jit_sort_intervals()
1556 last->list_next = ival; in zend_jit_sort_intervals()
1557 last = ival; in zend_jit_sort_intervals()
1558 ival->list_next = NULL; in zend_jit_sort_intervals()
1564 *p = last = ival; in zend_jit_sort_intervals()
1565 ival->list_next = NULL; in zend_jit_sort_intervals()
1567 } else if ((ival->range.start < (*p)->range.start) || in zend_jit_sort_intervals()
1568 (ival->range.start == (*p)->range.start && in zend_jit_sort_intervals()
1569 ((ival->hint && !(*p)->hint && ival->hint != *p) || in zend_jit_sort_intervals()
1570 ival->range.end < (*p)->range.end))) { in zend_jit_sort_intervals()
1571 ival->list_next = *p; in zend_jit_sort_intervals()
1572 *p = ival; in zend_jit_sort_intervals()
1990 zend_lifetime_interval *ival = *list; in zend_jit_compute_liveness() local
1991 while (ival) { in zend_jit_compute_liveness()
1992 if (ival->hint) { in zend_jit_compute_liveness()
1993 ival->hint->used_as_hint = ival; in zend_jit_compute_liveness()
1995 ival = ival->list_next; in zend_jit_compute_liveness()
2008 static uint32_t zend_interval_end(zend_lifetime_interval *ival) in zend_interval_end() argument
2010 zend_life_range *range = &ival->range; in zend_interval_end()
2018 static bool zend_interval_covers(zend_lifetime_interval *ival, uint32_t position) in zend_interval_covers() argument
2020 zend_life_range *range = &ival->range; in zend_interval_covers()
2381 …me_interval(const zend_op_array *op_array, const zend_ssa *ssa, const zend_lifetime_interval *ival) in zend_jit_dump_lifetime_interval() argument
2384 int var_num = ssa->vars[ival->ssa_var].var; in zend_jit_dump_lifetime_interval()
2386 fprintf(stderr, "#%d.", ival->ssa_var); in zend_jit_dump_lifetime_interval()
2388 fprintf(stderr, ": %u-%u", ival->range.start, ival->range.end); in zend_jit_dump_lifetime_interval()
2389 range = ival->range.next; in zend_jit_dump_lifetime_interval()
2394 if (ival->reg != ZREG_NONE) { in zend_jit_dump_lifetime_interval()
2395 fprintf(stderr, " (%s)", zend_reg_name[ival->reg]); in zend_jit_dump_lifetime_interval()
2397 if (ival->flags & ZREG_LAST_USE) { in zend_jit_dump_lifetime_interval()
2400 if (ival->flags & ZREG_LOAD) { in zend_jit_dump_lifetime_interval()
2403 if (ival->flags & ZREG_STORE) { in zend_jit_dump_lifetime_interval()
2406 if (ival->hint) { in zend_jit_dump_lifetime_interval()
2408 if (ival->hint->ssa_var >= 0) { in zend_jit_dump_lifetime_interval()
2409 var_num = ssa->vars[ival->hint->ssa_var].var; in zend_jit_dump_lifetime_interval()
2410 fprintf(stderr, "=#%d.", ival->hint->ssa_var); in zend_jit_dump_lifetime_interval()
2413 if (ival->hint->reg != ZREG_NONE) { in zend_jit_dump_lifetime_interval()
2414 fprintf(stderr, " (%s)", zend_reg_name[ival->hint->reg]); in zend_jit_dump_lifetime_interval()
2425 zend_lifetime_interval *list, *ival; in zend_jit_allocate_registers() local
2461 ival = list; in zend_jit_allocate_registers()
2462 while (ival) { in zend_jit_allocate_registers()
2463 zend_life_range *range = &ival->range; in zend_jit_allocate_registers()
2468 if (zend_ssa_is_last_use(op_array, ssa, ival->ssa_var, range->end)) { in zend_jit_allocate_registers()
2469 ival->flags |= ZREG_LAST_USE; in zend_jit_allocate_registers()
2471 ival = ival->list_next; in zend_jit_allocate_registers()
2478 ival = list; in zend_jit_allocate_registers()
2479 while (ival) { in zend_jit_allocate_registers()
2480 zend_jit_dump_lifetime_interval(op_array, ssa, ival); in zend_jit_allocate_registers()
2481 ival = ival->list_next; in zend_jit_allocate_registers()
2495 ival = list; in zend_jit_allocate_registers()
2496 while (ival != NULL) { in zend_jit_allocate_registers()
2497 zend_lifetime_interval *next = ival->list_next; in zend_jit_allocate_registers()
2499 ival->list_next = intervals[ival->ssa_var]; in zend_jit_allocate_registers()
2500 intervals[ival->ssa_var] = ival; in zend_jit_allocate_registers()
2501 ival = next; in zend_jit_allocate_registers()
2621 ival = intervals[i]; in zend_jit_allocate_registers()
2622 while (ival) { in zend_jit_allocate_registers()
2623 zend_jit_dump_lifetime_interval(op_array, ssa, ival); in zend_jit_allocate_registers()
2624 ival = ival->list_next; in zend_jit_allocate_registers()
2874 zend_lifetime_interval *ival = ra[phi->ssa_var]; in zend_jit() local
2876 if (ival) { in zend_jit()
2877 if (ival->flags & ZREG_LOAD) { in zend_jit()
2878 ZEND_ASSERT(ival->reg != ZREG_NONE); in zend_jit()
2880 …_load_var(&dasm_state, ssa->var_info[phi->ssa_var].type, ssa->vars[phi->ssa_var].var, ival->reg)) { in zend_jit()
2883 } else if (ival->flags & ZREG_STORE) { in zend_jit()
2884 ZEND_ASSERT(ival->reg != ZREG_NONE); in zend_jit()
2886 …re_var(&dasm_state, ssa->var_info[phi->ssa_var].type, ssa->vars[phi->ssa_var].var, ival->reg, 1)) { in zend_jit()