Skip to content

Unused function not being optimized out by spirv-opt #4003

@sugoi1

Description

@sugoi1

The behavior we're seeing is that when the only call site of a function gets removed, the function itself doesn't necessarily get removed from the SPIR-V code, which can cause some unexpected opcodes to stay in the final optimized SPIR-V code.

Here's an example:
unoptimized_spirv_with_used_function.txt
optimized_spirv_with_unused_function.txt

In this example, the function at %35 goes from used to unused, but isn't removed.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions