diff --git a/ext/opcache/jit/ir/ir.c b/ext/opcache/jit/ir/ir.c index b21f8ce7d9519..c45b1efc21eeb 100644 --- a/ext/opcache/jit/ir/ir.c +++ b/ext/opcache/jit/ir/ir.c @@ -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) diff --git a/ext/opcache/jit/ir/ir.h b/ext/opcache/jit/ir/ir.h index 86e6dd51a9865..c4f0926e08589 100644 --- a/ext/opcache/jit/ir/ir.h +++ b/ext/opcache/jit/ir/ir.h @@ -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); diff --git a/ext/opcache/jit/ir/ir_private.h b/ext/opcache/jit/ir/ir_private.h index f88a1574a286e..fe4a79426862f 100644 --- a/ext/opcache/jit/ir/ir_private.h +++ b/ext/opcache/jit/ir/ir_private.h @@ -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 */