Skip to content

Commit f04a9f4

Browse files
committed
Update IR
IR commit: 1a41bddcf0a41b9a3866d00b57591b3684c88443
1 parent 50264b0 commit f04a9f4

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

ext/opcache/jit/ir/ir.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1139,6 +1139,12 @@ ir_ref ir_bind(ir_ctx *ctx, ir_ref var, ir_ref def)
11391139
return def;
11401140
}
11411141

1142+
ir_ref ir_binding_find(const ir_ctx *ctx, ir_ref ref)
1143+
{
1144+
ir_ref var = ir_hashtab_find(ctx->binding, ref);
1145+
return (var != (ir_ref)IR_INVALID_VAL) ? var : 0;
1146+
}
1147+
11421148
/* Batch construction of def->use edges */
11431149
#if 0
11441150
void ir_build_def_use_lists(ir_ctx *ctx)

ext/opcache/jit/ir/ir.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -743,7 +743,10 @@ ir_ref ir_fold3(ir_ctx *ctx, uint32_t opt, ir_ref op1, ir_ref op2, ir_ref op3);
743743

744744
ir_ref ir_param(ir_ctx *ctx, ir_type type, ir_ref region, const char *name, int pos);
745745
ir_ref ir_var(ir_ctx *ctx, ir_type type, ir_ref region, const char *name);
746+
747+
/* IR Binding */
746748
ir_ref ir_bind(ir_ctx *ctx, ir_ref var, ir_ref def);
749+
ir_ref ir_binding_find(const ir_ctx *ctx, ir_ref ref);
747750

748751
/* Def -> Use lists */
749752
void ir_build_def_use_lists(ir_ctx *ctx);

ext/opcache/jit/ir/ir_private.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1013,13 +1013,6 @@ IR_ALWAYS_INLINE uint32_t ir_insn_len(const ir_insn *insn)
10131013

10141014
#define IR_RESERVED_FLAG_1 (1U<<31)
10151015

1016-
/*** IR Binding ***/
1017-
IR_ALWAYS_INLINE ir_ref ir_binding_find(const ir_ctx *ctx, ir_ref ref)
1018-
{
1019-
ir_ref var = ir_hashtab_find(ctx->binding, ref);
1020-
return (var != (ir_ref)IR_INVALID_VAL) ? var : 0;
1021-
}
1022-
10231016
/*** IR Use Lists ***/
10241017
struct _ir_use_list {
10251018
ir_ref refs; /* index in ir_ctx->use_edges[] array */

0 commit comments

Comments
 (0)