authorgravatar for alichraghi@proton.meAli Chraghi <alichraghi@proton.me> 2026-06-21 08:56:39+03:30
committergravatar for alichraghi@noreply.codeberg.orgAli Cheraghi <alichraghi@noreply.codeberg.org> 2026-06-25 15:47:10+02:00
log6754fc8af277e65827ae531ca4d114df0576398c
tree9c09a79f7d30b75c1c8f7b55dcc99b2c879aebcd
parent14d5da916447f10bb812c3c6a199ab4ab76f61ec

spirv: prune_unused: mark operands of all live function-body instructions


2 files changed, 2 insertions(+), 4 deletions(-)

src/link/SpirV/prune_unused.zig+1-3
......@@ -92,9 +92,7 @@ pub fn run(parser: *BinaryModule.Parser, binary: *BinaryModule) !void {
9292 }
9393
9494 // mark operands of alive function contents
95 if (!canPrune(inst.opcode)) {
96 try markAlive(parser, binary.*, inst, &alive, &id_to_index, &code_offsets, &id_offset_buf);
97 }
95 try markAlive(parser, binary.*, inst, &alive, &id_to_index, &code_offsets, &id_offset_buf);
9896 }
9997
10098 // rewrite
test/cases/spirv_mergable_pointers.zig+1-1
......@@ -14,4 +14,4 @@ export fn a() void {
1414// output_mode=Obj
1515// backend=selfhosted
1616// target=spirv64-vulkan
17// emit_bin=false
17// emit_bin=true