jhuber6 wrote:

This means that there won't be any optimizations on these definitions, correct? 
Likely not ideal  to have no inlining even if it saves compilation time.

This "post-op" linking is only required because we emit calls to functions that 
don't exist in the module. The way we solved this in OpenMP is by always 
providing the library at the link step and making the optimization passes not 
emit new calls if we are in "post-link LTO" as determined by module flags.

We could theoretically just force all AMDGPU compilation to go through the LTO 
pass, something like `ld.lld --start-lib ockl.bc ocml.bc --end-lib`. That would 
have the effect of fixing-up any missing definitions as it will only extract if 
needed. Problem is that the device libs have protected visibility until the 
next release cycle so this won't actually internalize.

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

Reply via email to