}
/* }}} */
-static inline zend_bool is_no_val_use(const zend_op *opline, const zend_ssa_op *ssa_op, int var)
-{
- if (opline->opcode == ZEND_ASSIGN ||
- (opline->opcode == ZEND_UNSET_VAR && (opline->extended_value & ZEND_QUICK_SET))) {
- return ssa_op->op1_use == var && ssa_op->op2_use != var;
- }
- if (opline->opcode == ZEND_FE_FETCH_R) {
- return ssa_op->op2_use == var && ssa_op->op1_use != var;
- }
- if (ssa_op->result_use == var && opline->opcode != ZEND_ADD_ARRAY_ELEMENT) {
- return 1;
- }
- return 0;
-}
-
int zend_ssa_find_false_dependencies(const zend_op_array *op_array, zend_ssa *ssa) /* {{{ */
{
zend_ssa_var *ssa_vars = ssa->vars;
ssa_vars[i].no_val = 1; /* mark as unused */
use = ssa->vars[i].use_chain;
while (use >= 0) {
- if (!is_no_val_use(&op_array->opcodes[use], &ssa->ops[use], i)) {
+ if (!zend_ssa_is_no_val_use(&op_array->opcodes[use], &ssa->ops[use], i)) {
ssa_vars[i].no_val = 0; /* used directly */
zend_bitset_incl(worklist, i);
break;
zend_op *opline = &op_array->opcodes[use];
zend_ssa_op *ssa_op = &ssa->ops[use];
- if (is_no_val_use(opline, ssa_op, var_num)) {
+ if (zend_ssa_is_no_val_use(opline, ssa_op, var_num)) {
continue;
}
return NULL;
}
+static zend_always_inline zend_bool zend_ssa_is_no_val_use(const zend_op *opline, const zend_ssa_op *ssa_op, int var)
+{
+ if (opline->opcode == ZEND_ASSIGN ||
+ (opline->opcode == ZEND_UNSET_VAR && (opline->extended_value & ZEND_QUICK_SET))) {
+ return ssa_op->op1_use == var && ssa_op->op2_use != var;
+ }
+ if (opline->opcode == ZEND_FE_FETCH_R) {
+ return ssa_op->op2_use == var && ssa_op->op1_use != var;
+ }
+ if (ssa_op->result_use == var && opline->opcode != ZEND_ADD_ARRAY_ELEMENT) {
+ return 1;
+ }
+ return 0;
+}
+
#endif /* ZEND_SSA_H */
/*