<div dir="ltr"><div dir="ltr">On Mon, Apr 13, 2020 at 8:43 AM Matt Arsenault via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:</div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
These are the definitions, and the standard place for targets to define intrinsics. NVPTX is odd in defining intrinsics in the backend. These are usable like any other IR intrinsic, through the generated Intrinsic::amdgcn_workitem_id_* enums. <br></blockquote><div><br></div><div>This is slightly off topic, but I wanted to point out that intrinsics are now generated into separate headers (IntrinsicsARM.h, IntrinsicsAMDGPU.h, ...). This opens the door to moving the intrinsics into the backends and compiling them out when a particular target is disabled. There is obviously a lot more work to do since there are many mid-level IR transforms that depend on these headers, but we could sink that logic into targets if we were motivated to do it.</div></div></div>