Skip to content

Commit

Permalink
Merge branch 'PHP-8.4'
Browse files Browse the repository at this point in the history
* PHP-8.4:
  Update IR
  • Loading branch information
dstogov committed Dec 3, 2024
2 parents 01093b7 + f04a9f4 commit bcb7f9b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
6 changes: 6 additions & 0 deletions ext/opcache/jit/ir/ir.c
Original file line number Diff line number Diff line change
Expand Up @@ -1139,6 +1139,12 @@ ir_ref ir_bind(ir_ctx *ctx, ir_ref var, ir_ref def)
return def;
}

ir_ref ir_binding_find(const ir_ctx *ctx, ir_ref ref)
{
ir_ref var = ir_hashtab_find(ctx->binding, ref);
return (var != (ir_ref)IR_INVALID_VAL) ? var : 0;
}

/* Batch construction of def->use edges */
#if 0
void ir_build_def_use_lists(ir_ctx *ctx)
Expand Down
3 changes: 3 additions & 0 deletions ext/opcache/jit/ir/ir.h
Original file line number Diff line number Diff line change
Expand Up @@ -743,7 +743,10 @@ ir_ref ir_fold3(ir_ctx *ctx, uint32_t opt, ir_ref op1, ir_ref op2, ir_ref op3);

ir_ref ir_param(ir_ctx *ctx, ir_type type, ir_ref region, const char *name, int pos);
ir_ref ir_var(ir_ctx *ctx, ir_type type, ir_ref region, const char *name);

/* IR Binding */
ir_ref ir_bind(ir_ctx *ctx, ir_ref var, ir_ref def);
ir_ref ir_binding_find(const ir_ctx *ctx, ir_ref ref);

/* Def -> Use lists */
void ir_build_def_use_lists(ir_ctx *ctx);
Expand Down
7 changes: 0 additions & 7 deletions ext/opcache/jit/ir/ir_private.h
Original file line number Diff line number Diff line change
Expand Up @@ -1013,13 +1013,6 @@ IR_ALWAYS_INLINE uint32_t ir_insn_len(const ir_insn *insn)

#define IR_RESERVED_FLAG_1 (1U<<31)

/*** IR Binding ***/
IR_ALWAYS_INLINE ir_ref ir_binding_find(const ir_ctx *ctx, ir_ref ref)
{
ir_ref var = ir_hashtab_find(ctx->binding, ref);
return (var != (ir_ref)IR_INVALID_VAL) ? var : 0;
}

/*** IR Use Lists ***/
struct _ir_use_list {
ir_ref refs; /* index in ir_ctx->use_edges[] array */
Expand Down

0 comments on commit bcb7f9b

Please sign in to comment.