The patch introduces reading the attributes of kernel arguments from both function-attached and module-level metadata, during kernel arguments lowering. The test demonstrating the improvement will be attached later.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Target/SPIRV/SPIRVCallLowering.cpp | ||
---|---|---|
152 | Right, good catch! Will change this. | |
187 | Yes, in the future patch I will add a possibility of returning multiple decorations. For example there could be an argument decorated with both Decoration::Restrict and Decoration::Constant and there could be an argument not decorated with any qualifier. So I think vector works here best. |
I don't think dyn_cast_or_null helps here, it wouldn't prevent segfault anyway. dyn_cast should work just as fine while keeping the code more uniform.