[clang] [clang][CGCUDANV] Unify PointerType members of CGNVCUDARuntime (NFC) (PR #75668)

Björn Pettersson via cfe-commits cfe-commits at lists.llvm.org
Fri Dec 15 16:36:36 PST 2023


bjope wrote:

I don't know much about this code, so I can't really judge if this is good and wanted etc.

When I did opaque pointer cleanups myself earlier (removing some no-op bitcasts and using PointerType::get etc) I did leave lots of things like this around on purpose, as even if the types are opaque internal to LLVM it might be nice to see which kind of types that actually are used and derefenced in the API:s. So the differently named variables helps identifying which arguments that points to what kind of data.

Anyway, the type cache in CGNVCUDARuntime probably shouldn't store three copies of the same unqualified pointer type. One idea, if one still want to keep the names, is to use a union like it is done in CodeGenTypeCache.h.

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


More information about the cfe-commits mailing list