Artem-B wrote:

> I'm not sure why the option isn't enabled by default, personally

While it does indeed help with generating better code, using this option while 
compiling CUDA code may be problematic.
Front-end is not aware of address spaces and all pointers are generic, so 
`sizeof(any pointer) == 8`. If we enable short pointers, then, after inferring 
AS some pointers become 32-bit and this discrepancy may lead to interesting 
bugs.

IMO short pointers are currently are only safe to use on IR level. You *may* 
get by using them from CUDA, but I do not think that enabling them by default 
is a good idea.

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

Reply via email to