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 {...@@ -92,9 +92,7 @@ pub fn run(parser: *BinaryModule.Parser, binary: *BinaryModule) !void {
92 }92 }
9393
94 // mark operands of alive function contents94 // mark operands of alive function contents
95 if (!canPrune(inst.opcode)) {95 try markAlive(parser, binary.*, inst, &alive, &id_to_index, &code_offsets, &id_offset_buf);
96 try markAlive(parser, binary.*, inst, &alive, &id_to_index, &code_offsets, &id_offset_buf);
97 }
98 }96 }
9997
100 // rewrite98 // rewrite
test/cases/spirv_mergable_pointers.zig+1-1
...@@ -14,4 +14,4 @@ export fn a() void {...@@ -14,4 +14,4 @@ export fn a() void {
14// output_mode=Obj14// output_mode=Obj
15// backend=selfhosted15// backend=selfhosted
16// target=spirv64-vulkan16// target=spirv64-vulkan
17// emit_bin=false17// emit_bin=true