SPIR-V specification does not require a function to have a name
if it is an entry point. Adjust deserializer to allow those kinds
of SPIR-V binaries.
Details
Details
- Reviewers
antiagainst - Commits
- rGe59cdcd07024: [mlir][spirv] Allow unnamed entry point functions
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/lib/Target/SPIRV/Deserialization/DeserializeOps.cpp | ||
---|---|---|
350–358 | Hmm, this is actually an arbitrary implementation detail inside the deserializer for unnamed functions. Actually the input model can have the function names with this prefix too. So I'm wondering whether we should instead use an attribute like unnamed on the function to indicate it's unnamed, rather than relying on the naming implementation detail here.. Anyway, I guess it's fine now; I'll approve this. Could you put a comment in the above? // The deserializer uses "spirv_fn_<id>" as the function name if the input SPIR-V blob does not contain a name for it. We should use a more clear indication for such case rather than relying on naming details. |
Hmm, this is actually an arbitrary implementation detail inside the deserializer for unnamed functions. Actually the input model can have the function names with this prefix too. So I'm wondering whether we should instead use an attribute like unnamed on the function to indicate it's unnamed, rather than relying on the naming implementation detail here.. Anyway, I guess it's fine now; I'll approve this. Could you put a comment in the above?