Lines Matching refs:worklist
110 …ool ir_sccp_meet_phi(ir_ctx *ctx, ir_insn *_values, ir_ref i, ir_insn *insn, ir_bitqueue *worklist) in ir_sccp_meet_phi() argument
147 ir_bitqueue_add(worklist, input); in ir_sccp_meet_phi()
195 ir_bitqueue_add(worklist, input); in ir_sccp_meet_phi()
338 static void ir_sccp_remove_insn(ir_ctx *ctx, ir_insn *_values, ir_ref ref, ir_bitqueue *worklist) in ir_sccp_remove_insn() argument
355 ir_bitqueue_add(worklist, input); in ir_sccp_remove_insn()
361 static void ir_sccp_remove_insn2(ir_ctx *ctx, ir_ref ref, ir_bitqueue *worklist) in ir_sccp_remove_insn2() argument
377 ir_bitqueue_add(worklist, input); in ir_sccp_remove_insn2()
380 ir_bitqueue_add(worklist, ctx->ir_base[input].op1); in ir_sccp_remove_insn2()
386 …sccp_replace_insn(ir_ctx *ctx, ir_insn *_values, ir_ref ref, ir_ref new_ref, ir_bitqueue *worklist) in ir_sccp_replace_insn() argument
405 ir_bitqueue_add(worklist, input); in ir_sccp_replace_insn()
433 if (worklist && _values[use].op > IR_COPY) { in ir_sccp_replace_insn()
435 ir_bitqueue_add(worklist, use); in ir_sccp_replace_insn()
443 static void ir_sccp_replace_insn2(ir_ctx *ctx, ir_ref ref, ir_ref new_ref, ir_bitqueue *worklist) in ir_sccp_replace_insn2() argument
461 ir_bitqueue_add(worklist, input); in ir_sccp_replace_insn2()
464 ir_bitqueue_add(worklist, input); in ir_sccp_replace_insn2()
491 ir_bitqueue_add(worklist, use); in ir_sccp_replace_insn2()
497 static void ir_sccp_fold2(ir_ctx *ctx, ir_ref ref, ir_bitqueue *worklist) in ir_sccp_fold2() argument
566 ir_bitqueue_add(worklist, use); in ir_sccp_fold2()
572 ir_sccp_replace_insn2(ctx, ref, op1, worklist); in ir_sccp_fold2()
576 ir_sccp_replace_insn2(ctx, ref, op1, worklist); in ir_sccp_fold2()
1071 …ext_ref(ir_ctx *ctx, ir_ref var_ref, ir_ref src_ref, ir_op op, ir_type type, ir_bitqueue *worklist) in ir_ext_ref() argument
1083 ir_bitqueue_add(worklist, ref); in ir_ext_ref()
1096 ir_bitqueue_grow(worklist, ref + 1); in ir_ext_ref()
1097 ir_bitqueue_add(worklist, ref); in ir_ext_ref()
1101 static bool ir_try_promote_ext(ir_ctx *ctx, ir_ref ext_ref, ir_insn *insn, ir_bitqueue *worklist) in ir_try_promote_ext() argument
1169 ctx->ir_base[use].op1 = ir_ext_ref(ctx, use, use_insn->op1, op, type, worklist); in ir_try_promote_ext()
1177 ctx->ir_base[use].op2 = ir_ext_ref(ctx, use, use_insn->op2, op, type, worklist); in ir_try_promote_ext()
1183 ir_sccp_replace_insn2(ctx, ext_ref, ref, worklist); in ir_try_promote_ext()
1190 ctx->ir_base[ref].op2 = ir_ext_ref(ctx, ref, phi_insn->op2, op, type, worklist); in ir_try_promote_ext()
1243 …tic bool ir_try_remove_empty_diamond(ir_ctx *ctx, ir_ref ref, ir_insn *insn, ir_bitqueue *worklist) in ir_try_remove_empty_diamond() argument
1300 ir_bitqueue_add(worklist, root->op2); in ir_try_remove_empty_diamond()
1312 ir_bitqueue_add(worklist, next->op1); in ir_try_remove_empty_diamond()
1356 ir_bitqueue_add(worklist, root->op2); in ir_try_remove_empty_diamond()
1375 ir_bitqueue_add(worklist, next->op1); in ir_try_remove_empty_diamond()
1389 …hi(ir_ctx *ctx, ir_ref merge_ref, ir_insn *merge, ir_ref ref, ir_insn *insn, ir_bitqueue *worklist) in ir_optimize_phi() argument
1492 ir_bitqueue_add(worklist, next->op1); in ir_optimize_phi()
1575 ir_bitqueue_add(worklist, next->op1); in ir_optimize_phi()
1631 ir_bitqueue_add(worklist, next->op1); in ir_optimize_phi()
1742 static bool ir_try_split_if(ir_ctx *ctx, ir_ref ref, ir_insn *insn, ir_bitqueue *worklist) in ir_try_split_if() argument
1814 ir_bitqueue_add(worklist, if_false_ref); in ir_try_split_if()
1815 ir_bitqueue_add(worklist, if_true_ref); in ir_try_split_if()
1853 ir_bitqueue_add(worklist, if_false_ref); in ir_try_split_if()
1905 ir_bitqueue_add(worklist, if_false_ref); in ir_try_split_if()
1907 ir_bitqueue_add(worklist, end2->op1); in ir_try_split_if()
1918 static bool ir_try_split_if_cmp(ir_ctx *ctx, ir_ref ref, ir_insn *insn, ir_bitqueue *worklist) in ir_try_split_if_cmp() argument
2002 ir_bitqueue_add(worklist, if_false_ref); in ir_try_split_if_cmp()
2003 ir_bitqueue_add(worklist, if_true_ref); in ir_try_split_if_cmp()
2045 ir_bitqueue_add(worklist, if_false_ref); in ir_try_split_if_cmp()
2101 ir_bitqueue_add(worklist, if_false_ref); in ir_try_split_if_cmp()
2103 ir_bitqueue_add(worklist, end2->op1); in ir_try_split_if_cmp()
2116 static void ir_optimize_merge(ir_ctx *ctx, ir_ref merge_ref, ir_insn *merge, ir_bitqueue *worklist) in ir_optimize_merge() argument
2121 ir_try_remove_empty_diamond(ctx, merge_ref, merge, worklist); in ir_optimize_merge()
2134 if (ir_try_split_if(ctx, next_ref, next, worklist)) { in ir_optimize_merge()
2145 if (ir_try_split_if_cmp(ctx, next_ref, next, worklist)) { in ir_optimize_merge()
2151 ir_optimize_phi(ctx, merge_ref, merge, phi_ref, phi, worklist); in ir_optimize_merge()
2163 ir_bitqueue worklist, worklist2; in ir_sccp() local
2170 ir_bitqueue_init(&worklist, ctx->insns_count); in ir_sccp()
2171 worklist.pos = 0; in ir_sccp()
2172 ir_bitset_incl(worklist.set, 1); in ir_sccp()
2173 while ((i = ir_bitqueue_pop(&worklist)) >= 0) { in ir_sccp()
2181 if (!ir_sccp_meet_phi(ctx, _values, i, insn, &worklist)) { in ir_sccp()
2198 ir_bitqueue_add(&worklist, input); in ir_sccp()
2275 ir_bitqueue_add(&worklist, insn->op2); in ir_sccp()
2302 ir_bitqueue_add(&worklist, use); in ir_sccp()
2312 ir_bitqueue_add(&worklist, insn->op2); in ir_sccp()
2347 ir_bitqueue_add(&worklist, use_case); in ir_sccp()
2371 ir_bitqueue_add(&worklist, use); in ir_sccp()
2378 ir_bitqueue_add(&worklist, use); in ir_sccp()
2385 ir_bitqueue_add(&worklist, use); in ir_sccp()
2396 ir_bitqueue_add(&worklist, use); in ir_sccp()
2470 ir_bitqueue_add(&worklist, i); in ir_sccp()
2477 while ((i = ir_bitqueue_pop(&worklist)) >= 0) { in ir_sccp()
2568 ir_bitqueue_free(&worklist); in ir_sccp()