Lines Matching refs:pred_idx
229 unsigned pred_idx = in next_uses_per_block() local
232 auto insert_result = ctx.next_use_distances_end[pred_idx].insert( in next_uses_per_block()
237 worklist = std::max(worklist, pred_idx + 1); in next_uses_per_block()
253 for (unsigned pred_idx : preds) { in next_uses_per_block() local
254 if (ctx.program->blocks[pred_idx].loop_nest_depth > block->loop_nest_depth) in next_uses_per_block()
256 auto insert_result = ctx.next_use_distances_end[pred_idx].insert( in next_uses_per_block()
266 worklist = std::max(worklist, pred_idx + 1); in next_uses_per_block()
603 unsigned pred_idx = block->linear_preds[0]; in init_live_in_vars() local
604 for (std::pair<Temp, uint32_t> pair : ctx.spills_exit[pred_idx]) { in init_live_in_vars()
616 pred_idx = block->logical_preds[0]; in init_live_in_vars()
617 for (std::pair<Temp, uint32_t> pair : ctx.spills_exit[pred_idx]) { in init_live_in_vars()
633 pred_idx = block->linear_preds[0]; in init_live_in_vars()
634 for (std::pair<Temp, uint32_t> pair : ctx.spills_exit[pred_idx]) { in init_live_in_vars()
643 pred_idx = block->logical_preds[0]; in init_live_in_vars()
644 for (std::pair<Temp, uint32_t> pair : ctx.spills_exit[pred_idx]) { in init_live_in_vars()
671 for (unsigned pred_idx : preds) { in init_live_in_vars() local
673 if (!ctx.next_use_distances_end[pred_idx].count(pair.first)) { in init_live_in_vars()
677 if (!ctx.spills_exit[pred_idx].count(pair.first)) { in init_live_in_vars()
684 spill_id = ctx.spills_exit[pred_idx][pair.first]; in init_live_in_vars()
774 const unsigned pred_idx = block->linear_preds[0]; in add_coupling_code() local
783 auto spills_exit_it = ctx.spills_exit[pred_idx].find(live.first); in add_coupling_code()
784 if (spills_exit_it == ctx.spills_exit[pred_idx].end()) { in add_coupling_code()
785 std::map<Temp, Temp>::iterator it = ctx.renames[pred_idx].find(live.first); in add_coupling_code()
786 if (it != ctx.renames[pred_idx].end()) in add_coupling_code()
807 unsigned pred_idx = block->logical_preds[0]; in add_coupling_code() local
817 auto spills_exit_it = ctx.spills_exit[pred_idx].find(live.first); in add_coupling_code()
818 if (spills_exit_it == ctx.spills_exit[pred_idx].end()) { in add_coupling_code()
819 std::map<Temp, Temp>::iterator it = ctx.renames[pred_idx].find(live.first); in add_coupling_code()
820 if (it != ctx.renames[pred_idx].end()) in add_coupling_code()
876 unsigned pred_idx = preds[i]; in add_coupling_code() local
883 std::map<Temp, Temp>::iterator rename_it = ctx.renames[pred_idx].find(var); in add_coupling_code()
889 auto spilled = ctx.spills_exit[pred_idx].find(var); in add_coupling_code()
890 if (spilled != ctx.spills_exit[pred_idx].end()) { in add_coupling_code()
897 if (rename_it != ctx.renames[pred_idx].end()) { in add_coupling_code()
899 ctx.renames[pred_idx].erase(rename_it); in add_coupling_code()
906 for (std::pair<Temp, uint32_t> pair : ctx.spills_exit[pred_idx]) in add_coupling_code()
914 Block& pred = ctx.program->blocks[pred_idx]; in add_coupling_code()
926 ctx.spills_exit[pred_idx][phi->operands[i].getTemp()] = spill_id; in add_coupling_code()
939 for (unsigned pred_idx : preds) { in add_coupling_code() local
941 auto spilled = ctx.spills_exit[pred_idx].find(pair.first); in add_coupling_code()
942 if (spilled != ctx.spills_exit[pred_idx].end()) { in add_coupling_code()
949 if (!ctx.next_use_distances_end[pred_idx].count(pair.first)) in add_coupling_code()
953 for (std::pair<Temp, uint32_t> exit_spill : ctx.spills_exit[pred_idx]) { in add_coupling_code()
962 std::map<Temp, Temp>::iterator rename_it = ctx.renames[pred_idx].find(var); in add_coupling_code()
963 if (rename_it != ctx.renames[pred_idx].end()) { in add_coupling_code()
965 ctx.renames[pred_idx].erase(rename_it); in add_coupling_code()
972 Block& pred = ctx.program->blocks[pred_idx]; in add_coupling_code()
996 unsigned pred_idx = preds[i]; in add_coupling_code() local
999 if (!ctx.spills_exit[pred_idx].count(phi->operands[i].getTemp())) { in add_coupling_code()
1001 ctx.renames[pred_idx].find(phi->operands[i].getTemp()); in add_coupling_code()
1002 if (it != ctx.renames[pred_idx].end()) { in add_coupling_code()
1018 Block& pred = ctx.program->blocks[pred_idx]; in add_coupling_code()
1027 do_reload(ctx, tmp, new_name, ctx.spills_exit[pred_idx][tmp]); in add_coupling_code()
1035 ctx.spills_exit[pred_idx].erase(tmp); in add_coupling_code()
1036 ctx.renames[pred_idx][tmp] = new_name; in add_coupling_code()
1056 for (unsigned pred_idx : preds) { in add_coupling_code() local
1057 if (!ctx.next_use_distances_end[pred_idx].count(pair.first)) in add_coupling_code()
1062 for (unsigned pred_idx : preds) { in add_coupling_code() local
1064 if (!ctx.spills_exit[pred_idx].count(pair.first)) in add_coupling_code()
1069 Block& pred = ctx.program->blocks[pred_idx]; in add_coupling_code()
1089 for (unsigned pred_idx : preds) { in add_coupling_code() local
1090 if (!ctx.renames[pred_idx].count(pair.first)) { in add_coupling_code()
1097 rename = ctx.renames[pred_idx][pair.first]; in add_coupling_code()
1099 is_same = rename == ctx.renames[pred_idx][pair.first]; in add_coupling_code()
1886 for (unsigned pred_idx : block.logical_preds) { in assign_spill_slots() local
1887 Block& pred = ctx.program->blocks[pred_idx]; in assign_spill_slots()