Naghasan wrote:

> all built-ins are represented using global variables in a specific AS with 
> the associated metadata to generate the decoration.

For the HLSL FE, there are already a few ids represented using intrinsics 
(unfortunately they use the DXIL naming rather than the SPIR-V but that's 
another point). I extended on that, were there reasons to not pursue this ?

> The reason for this is we wanted to make sure the final load/store to be 
> explicit, and possibly optimized-out.

The intrinsic model will achieve the same thing for Inputs: they are modeled as 
pure, so 2 calls with the same parameters will be folded into 1 call and unused 
will be removed. For Outputs, I don't know (out of scope of what I'm trying to 
achieve).

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

Reply via email to