*/
available = ZEND_REGSET_DIFFERENCE(available, ZEND_REGSET_PRESERVED);
- if (ZEND_REGSET_IS_EMPTY(available)) {
- return 0;
- }
-
/* Set freeUntilPos of all physical registers to maxInt */
for (i = 0; i < ZREG_NUM; i++) {
freeUntilPos[i] = 0xffffffff;
}
}
+ if (hint == ZREG_NONE && ZEND_REGSET_IS_EMPTY(available)) {
+ return 0;
+ }
+
/* See "Linear Scan Register Allocation on SSA Form", Christian Wimmer and
Michael Franz, CGO'10 (2010), Figure 6. */
if (current->flags & ZREG_SPLIT) {
return 1;
}
+ if (ZEND_REGSET_IS_EMPTY(available)) {
+ return 0;
+ }
+
pos = 0; reg = ZREG_NONE;
pos2 = 0; reg2 = ZREG_NONE;
low_priority_regs = *hints;
static zend_bool zend_jit_may_reuse_reg(const zend_op *opline, const zend_ssa_op *ssa_op, zend_ssa *ssa, int def_var, int use_var)
{
- if (ssa->var_info[def_var].type != ssa->var_info[use_var].type) {
+ if ((ssa->var_info[def_var].type & ~MAY_BE_GUARD) != (ssa->var_info[use_var].type & ~MAY_BE_GUARD)) {
return 0;
}