Skip to content

Commit e460cd3

Browse files
committed
Drop memset
1 parent a1ef3e4 commit e460cd3

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

Zend/Optimizer/dce.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -540,18 +540,13 @@ int dce_optimize_op_array(zend_op_array *op_array, zend_optimizer_ctx *optimizer
540540
/* We have no dedicated phi vector, so we use the whole ssa var vector instead */
541541
ctx.instr_worklist_len = zend_bitset_len(op_array->last);
542542
ctx.instr_worklist = zend_arena_calloc(&optimizer_ctx->arena, ctx.instr_worklist_len, sizeof(zend_ulong));
543-
memset(ctx.instr_worklist, 0, sizeof(zend_ulong) * ctx.instr_worklist_len);
544543
ctx.phi_worklist_len = zend_bitset_len(ssa->vars_count);
545544
ctx.phi_worklist = zend_arena_calloc(&optimizer_ctx->arena, ctx.phi_worklist_len, sizeof(zend_ulong));
546-
memset(ctx.phi_worklist, 0, sizeof(zend_ulong) * ctx.phi_worklist_len);
547545
ctx.phi_worklist_no_val = zend_arena_calloc(&optimizer_ctx->arena, ctx.phi_worklist_len, sizeof(zend_ulong));
548-
memset(ctx.phi_worklist_no_val, 0, sizeof(zend_ulong) * ctx.phi_worklist_len);
549546

550547
/* Optimistically assume all instructions and phis to be dead */
551548
ctx.instr_dead = zend_arena_calloc(&optimizer_ctx->arena, ctx.instr_worklist_len, sizeof(zend_ulong));
552-
memset(ctx.instr_dead, 0, sizeof(zend_ulong) * ctx.instr_worklist_len);
553549
ctx.phi_dead = zend_arena_calloc(&optimizer_ctx->arena, ctx.phi_worklist_len, sizeof(zend_ulong));
554-
memset(ctx.phi_dead, 0xff, sizeof(zend_ulong) * ctx.phi_worklist_len);
555550

556551
/* Mark non-CV phis as live. Even if the result is unused, we generally cannot remove one
557552
* of the producing instructions, as it combines producing the result with control flow.

0 commit comments

Comments
 (0)