[clang] [llvm] [opt][AMDGPU] Add pass to handle AMDGCN pseudo-intrinsics target specific info), start with `llvm.amdgcn.wavefrontsize` (PR #114481)

Joseph Huber via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 31 17:48:01 PDT 2024


jhuber6 wrote:

> Faux "generic" IR sounds like a problematic concept, do you have an example?

It's what `libc` and the ROCm DeviceLibs do, compile without `-mcpu` and don't use any target specific attributes or intrinsics, then link it into a TU later when the target is known. It's find in principle if you hold it right, but the wavefrontsize is the one sticking issue, hence why Matt would suggest having two builds of `libc`, one for `amdgcn-amd-amdhsa-wave32` and `amdgcn-amd-amdhsa-wave64` or something.


https://github.com/llvm/llvm-project/pull/114481


More information about the cfe-commits mailing list