| ... | ... | @@ -236,26 +236,12 @@ const CallMCValues = struct { |
| 236 | 236 | const BigTomb = struct { |
| 237 | 237 | function: *Self, |
| 238 | 238 | inst: Air.Inst.Index, |
| 239 | | tomb_bits: Liveness.Bpi, |
| 240 | | big_tomb_bits: u32, |
| 241 | | bit_index: usize, |
| 239 | lbt: Liveness.BigTomb, |
| 242 | 240 | |
| 243 | 241 | fn feed(bt: *BigTomb, op_ref: Air.Inst.Ref) void { |
| 244 | | const this_bit_index = bt.bit_index; |
| 245 | | bt.bit_index += 1; |
| 246 | | |
| 247 | | const op_int = @enumToInt(op_ref); |
| 248 | | if (op_int < Air.Inst.Ref.typed_value_map.len) return; |
| 249 | | const op_index = @intCast(Air.Inst.Index, op_int - Air.Inst.Ref.typed_value_map.len); |
| 250 | | |
| 251 | | if (this_bit_index < Liveness.bpi - 1) { |
| 252 | | const dies = @truncate(u1, bt.tomb_bits >> @intCast(Liveness.OperandInt, this_bit_index)) != 0; |
| 253 | | if (!dies) return; |
| 254 | | } else { |
| 255 | | const big_bit_index = @intCast(u5, this_bit_index - (Liveness.bpi - 1)); |
| 256 | | const dies = @truncate(u1, bt.big_tomb_bits >> big_bit_index) != 0; |
| 257 | | if (!dies) return; |
| 258 | | } |
| 242 | const dies = bt.lbt.feed(); |
| 243 | const op_index = Air.refToIndex(op_ref) orelse return; |
| 244 | if (!dies) return; |
| 259 | 245 | bt.function.processDeath(op_index); |
| 260 | 246 | } |
| 261 | 247 | |
| ... | ... | @@ -3360,9 +3346,7 @@ fn iterateBigTomb(self: *Self, inst: Air.Inst.Index, operand_count: usize) !BigT |
| 3360 | 3346 | return BigTomb{ |
| 3361 | 3347 | .function = self, |
| 3362 | 3348 | .inst = inst, |
| 3363 | | .tomb_bits = self.liveness.getTombBits(inst), |
| 3364 | | .big_tomb_bits = self.liveness.special.get(inst) orelse 0, |
| 3365 | | .bit_index = 0, |
| 3349 | .lbt = self.liveness.iterateBigTomb(inst), |
| 3366 | 3350 | }; |
| 3367 | 3351 | } |
| 3368 | 3352 | |