spirv: do not generate unnecessary forward pointer
Co-authored-by: Robin Voetter <robin@voetter.nl>
This commit is contained in:
committed by
Robin Voetter
parent
181a89e728
commit
94af47d28c
@@ -1300,6 +1300,8 @@ const NavGen = struct {
|
||||
.type = child_ty_id,
|
||||
});
|
||||
|
||||
self.ptr_types.getPtr(key).?.fwd_emitted = true;
|
||||
|
||||
return result_id;
|
||||
}
|
||||
|
||||
|
||||
@@ -39,6 +39,7 @@ fn canPrune(op: Opcode) bool {
|
||||
.Arithmetic,
|
||||
.RelationalAndLogical,
|
||||
.Bit,
|
||||
.Annotation,
|
||||
=> true,
|
||||
else => switch (op) {
|
||||
.OpFunction,
|
||||
@@ -273,7 +274,7 @@ pub fn run(parser: *BinaryModule.Parser, binary: *BinaryModule, progress: std.Pr
|
||||
.alive = try std.DynamicBitSetUnmanaged.initEmpty(a, info.result_id_to_code_offset.count()),
|
||||
};
|
||||
|
||||
// Mark initial stuff as slive
|
||||
// Mark initial stuff as alive
|
||||
{
|
||||
var it = binary.iterateInstructions();
|
||||
while (it.next()) |inst| {
|
||||
|
||||
Reference in New Issue
Block a user