php-internal-docs 8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
ir_sccp.c File Reference
#include "ir.h"
#include "ir_private.h"

Go to the source code of this file.

Macros

#define IR_COMBO_COPY_PROPAGATION   1
 
#define IR_TOP   IR_UNUSED
 
#define IR_BOTTOM   IR_LAST_OP
 
#define IR_MAKE_TOP(ref)
 
#define IR_MAKE_BOTTOM(ref)
 
#define IR_IS_TOP(ref)
 
#define IR_IS_BOTTOM(ref)
 
#define IR_IS_REACHABLE(ref)
 
#define IR_IS_CONST(ref)
 
#define CHECK_LIST(_values, ref)
 
#define IR_MAKE_BOTTOM_EX(ref)
 
#define ir_sccp_trace_start(c, v, i)
 
#define ir_sccp_trace_end(c, v, i)
 

Functions

IR_ALWAYS_INLINE bool _ir_is_reachable_ctrl (ir_ctx *ctx, ir_insn *_values, ir_ref ref)
 
IR_ALWAYS_INLINE void ir_sccp_add_uses (ir_ctx *ctx, ir_insn *_values, ir_bitqueue *worklist, ir_ref ref)
 
IR_ALWAYS_INLINE void ir_sccp_add_input (ir_ctx *ctx, ir_insn *_values, ir_bitqueue *worklist, ir_ref ref)
 
IR_ALWAYS_INLINE ir_ref ir_sccp_identity (ir_ctx *ctx, ir_insn *_values, ir_ref a)
 
IR_ALWAYS_INLINE void ir_sccp_make_bottom_ex (ir_ctx *ctx, ir_insn *_values, ir_bitqueue *worklist, ir_ref ref)
 
IR_ALWAYS_INLINE bool ir_sccp_meet_const (ir_ctx *ctx, ir_insn *_values, ir_bitqueue *worklist, ir_ref ref, ir_insn *val_insn)
 
IR_ALWAYS_INLINE bool ir_sccp_meet (ir_ctx *ctx, ir_insn *_values, ir_bitqueue *worklist, ir_ref ref, ir_ref val)
 
void ir_iter_replace (ir_ctx *ctx, ir_ref ref, ir_ref new_ref, ir_bitqueue *worklist)
 
void ir_iter_update_op (ir_ctx *ctx, ir_ref ref, uint32_t idx, ir_ref new_val, ir_bitqueue *worklist)
 
void ir_iter_opt (ir_ctx *ctx, ir_bitqueue *worklist)
 
int ir_sccp (ir_ctx *ctx)
 

Macro Definition Documentation

◆ CHECK_LIST

#define CHECK_LIST ( _values,
ref )

Definition at line 86 of file ir_sccp.c.

◆ IR_BOTTOM

#define IR_BOTTOM   IR_LAST_OP

Definition at line 18 of file ir_sccp.c.

◆ IR_COMBO_COPY_PROPAGATION

#define IR_COMBO_COPY_PROPAGATION   1

Definition at line 15 of file ir_sccp.c.

◆ IR_IS_BOTTOM

#define IR_IS_BOTTOM ( ref)
Value:
(ref >= 0 && _values[ref].op == IR_BOTTOM)
#define IR_BOTTOM
Definition ir_sccp.c:18

Definition at line 24 of file ir_sccp.c.

◆ IR_IS_CONST

#define IR_IS_CONST ( ref)
Value:
(IR_IS_CONST_REF(ref) || IR_IS_CONST_OP(_values[ref].op))
#define IR_IS_CONST_REF(ref)
Definition ir.h:392
#define IR_IS_CONST_OP(op)
Definition ir_private.h:887

Definition at line 26 of file ir_sccp.c.

◆ IR_IS_REACHABLE

#define IR_IS_REACHABLE ( ref)
Value:
_ir_is_reachable_ctrl(ctx, _values, ref)
IR_ALWAYS_INLINE bool _ir_is_reachable_ctrl(ir_ctx *ctx, ir_insn *_values, ir_ref ref)
Definition ir_sccp.c:28

Definition at line 25 of file ir_sccp.c.

◆ IR_IS_TOP

#define IR_IS_TOP ( ref)
Value:
(ref >= 0 && _values[ref].op == IR_TOP)
#define IR_TOP
Definition ir_sccp.c:17

Definition at line 23 of file ir_sccp.c.

◆ IR_MAKE_BOTTOM

#define IR_MAKE_BOTTOM ( ref)
Value:
do {IR_ASSERT(ref > 0); _values[ref].optx = IR_BOTTOM;} while (0)
#define IR_ASSERT(x)
Definition ir_private.h:17

Definition at line 21 of file ir_sccp.c.

◆ IR_MAKE_BOTTOM_EX

#define IR_MAKE_BOTTOM_EX ( ref)
Value:
ir_sccp_make_bottom_ex(ctx, _values, worklist, ref)
IR_ALWAYS_INLINE void ir_sccp_make_bottom_ex(ir_ctx *ctx, ir_insn *_values, ir_bitqueue *worklist, ir_ref ref)
Definition ir_sccp.c:173

Definition at line 182 of file ir_sccp.c.

◆ IR_MAKE_TOP

#define IR_MAKE_TOP ( ref)
Value:
do {IR_ASSERT(ref > 0); _values[ref].optx = IR_TOP;} while (0)

Definition at line 20 of file ir_sccp.c.

◆ ir_sccp_trace_end

#define ir_sccp_trace_end ( c,
v,
i )

Definition at line 499 of file ir_sccp.c.

◆ ir_sccp_trace_start

#define ir_sccp_trace_start ( c,
v,
i )

Definition at line 498 of file ir_sccp.c.

◆ IR_TOP

#define IR_TOP   IR_UNUSED

Definition at line 17 of file ir_sccp.c.

Function Documentation

◆ _ir_is_reachable_ctrl()

IR_ALWAYS_INLINE bool _ir_is_reachable_ctrl ( ir_ctx * ctx,
ir_insn * _values,
ir_ref ref )

Definition at line 28 of file ir_sccp.c.

◆ ir_iter_opt()

void ir_iter_opt ( ir_ctx * ctx,
ir_bitqueue * worklist )

Definition at line 3466 of file ir_sccp.c.

◆ ir_iter_replace()

void ir_iter_replace ( ir_ctx * ctx,
ir_ref ref,
ir_ref new_ref,
ir_bitqueue * worklist )

Definition at line 1165 of file ir_sccp.c.

◆ ir_iter_update_op()

void ir_iter_update_op ( ir_ctx * ctx,
ir_ref ref,
uint32_t idx,
ir_ref new_val,
ir_bitqueue * worklist )

Definition at line 1237 of file ir_sccp.c.

◆ ir_sccp()

int ir_sccp ( ir_ctx * ctx)

Definition at line 3638 of file ir_sccp.c.

◆ ir_sccp_add_input()

IR_ALWAYS_INLINE void ir_sccp_add_input ( ir_ctx * ctx,
ir_insn * _values,
ir_bitqueue * worklist,
ir_ref ref )

Definition at line 51 of file ir_sccp.c.

◆ ir_sccp_add_uses()

IR_ALWAYS_INLINE void ir_sccp_add_uses ( ir_ctx * ctx,
ir_insn * _values,
ir_bitqueue * worklist,
ir_ref ref )

Definition at line 35 of file ir_sccp.c.

◆ ir_sccp_identity()

IR_ALWAYS_INLINE ir_ref ir_sccp_identity ( ir_ctx * ctx,
ir_insn * _values,
ir_ref a )

Definition at line 63 of file ir_sccp.c.

◆ ir_sccp_make_bottom_ex()

IR_ALWAYS_INLINE void ir_sccp_make_bottom_ex ( ir_ctx * ctx,
ir_insn * _values,
ir_bitqueue * worklist,
ir_ref ref )

Definition at line 173 of file ir_sccp.c.

◆ ir_sccp_meet()

IR_ALWAYS_INLINE bool ir_sccp_meet ( ir_ctx * ctx,
ir_insn * _values,
ir_bitqueue * worklist,
ir_ref ref,
ir_ref val )

Definition at line 208 of file ir_sccp.c.

◆ ir_sccp_meet_const()

IR_ALWAYS_INLINE bool ir_sccp_meet_const ( ir_ctx * ctx,
ir_insn * _values,
ir_bitqueue * worklist,
ir_ref ref,
ir_insn * val_insn )

Definition at line 188 of file ir_sccp.c.