if (ssa->ops[line].op1_def == current->ssa_var ||
ssa->ops[line].op2_def == current->ssa_var ||
ssa->ops[line].result_def == current->ssa_var) {
+ regset = zend_jit_get_def_scratch_regset(
+ ssa_opcodes ? ssa_opcodes[line] : op_array->opcodes + line,
+ ssa->ops + line,
+ op_array, ssa, current->ssa_var, line == last_use_line);
+ ZEND_REGSET_FOREACH(regset, reg) {
+ if (line < freeUntilPos[reg]) {
+ freeUntilPos[reg] = line;
+ }
+ } ZEND_REGSET_FOREACH_END();
line++;
}
while (line <= range->end) {
return 0;
}
+static zend_regset zend_jit_get_def_scratch_regset(const zend_op *opline, const zend_ssa_op *ssa_op, const zend_op_array *op_array, zend_ssa *ssa, int current_var, zend_bool last_use)
+{
+ uint32_t op1_info, op2_info;
+
+ switch (opline->opcode) {
+ case ZEND_FETCH_DIM_R:
+ op1_info = OP1_INFO();
+ op2_info = OP2_INFO();
+ if (((opline->op1_type & (IS_TMP_VAR|IS_VAR)) &&
+ (op1_info & (MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_OBJECT|MAY_BE_RESOURCE))) ||
+ ((opline->op2_type & (IS_TMP_VAR|IS_VAR)) &&
+ (op2_info & (MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_OBJECT|MAY_BE_RESOURCE)))) {
+ return ZEND_REGSET(ZREG_FCARG1a);
+ }
+ break;
+ default:
+ break;
+ }
+
+ return ZEND_REGSET_EMPTY;
+}
+
static zend_regset zend_jit_get_scratch_regset(const zend_op *opline, const zend_ssa_op *ssa_op, const zend_op_array *op_array, zend_ssa *ssa, int current_var, zend_bool last_use)
{
uint32_t op1_info, op2_info, res_info;