https://github.com/llvm-beanz commented:

I think we need to think a bit about the IR metadata in the middle of the 
compiler and how it will be used in various scenarios.

DXIL and SPIR-V both have branch hints that indicate to the GPU backends if a 
branch should be profitable to flatten or preserve.

1) We shouldn't use a DirectX-named metadata field to drive behaviors in the 
SPIR-V backend.
2) In the case where we load SPIR-V or DXIL into LLVM and then lower to a GPU 
ISA (like AMDGPU), we'll want to translate SPIR-V and DXIL's annotations into a 
generic LLVM annotation that backends can broadly accept. This same case comes 
into play if we ever support direct from HLSL -> ISA compiling where we'll want 
the backends to respect the metadata.
 

https://github.com/llvm/llvm-project/pull/116331
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to