| ... | @@ -2733,6 +2733,33 @@ pub fn analyze(isel: *Select, air_body: []const Air.Inst.Index) !void { | ... | @@ -2733,6 +2733,33 @@ pub fn analyze(isel: *Select, air_body: []const Air.Inst.Index) !void { |
| 2733 | try isel.analyzeUse(arg); | 2733 | try isel.analyzeUse(arg); |
| 2734 | } | 2734 | } |
| 2735 | }, | 2735 | }, |
| | 2736 | .legalize_compiler_rt_call => { |
| | 2737 | const compiler_rt_call = isel.air.unwrapCompilerRtCall(air_inst_index); |
| | 2738 | |
| | 2739 | for (compiler_rt_call.args) |arg| |
| | 2740 | try isel.analyzeUse(arg); |
| | 2741 | |
| | 2742 | var cc_it: CallAbiIterator = .{ |
| | 2743 | .isel = isel, |
| | 2744 | .cc = &compiler_rt_call.func.@"callconv"(isel.target), |
| | 2745 | }; |
| | 2746 | if (try cc_it.resolve(compiler_rt_call.func.returnType(), true)) |ret_vi| { |
| | 2747 | tracking_log.debug("{f} <- %{d} (call return)", .{ ret_vi, @backingInt(air_inst_index) }); |
| | 2748 | switch (ret_vi.parent(isel)) { |
| | 2749 | .none => {}, |
| | 2750 | .value, .constant => unreachable, |
| | 2751 | .address => |address_vi| { |
| | 2752 | defer address_vi.deref(isel); |
| | 2753 | const ret_value = ret_vi.get(isel); |
| | 2754 | ret_value.flags.parent_tag = .none; |
| | 2755 | ret_value.parent_payload = .{ .none = {} }; |
| | 2756 | }, |
| | 2757 | } |
| | 2758 | try isel.live_values.putNoClobber(gpa, air_inst_index, ret_vi); |
| | 2759 | |
| | 2760 | try isel.def_order.putNoClobber(gpa, air_inst_index, {}); |
| | 2761 | } |
| | 2762 | }, |
| 2736 | .cond_br => { | 2763 | .cond_br => { |
| 2737 | const pl_op = air_data[@backingInt(air_inst_index)].pl_op; | 2764 | const pl_op = air_data[@backingInt(air_inst_index)].pl_op; |
| 2738 | const extra = isel.air.extraData(Air.CondBr, pl_op.payload); | 2765 | const extra = isel.air.extraData(Air.CondBr, pl_op.payload); |