[HIP] support ThinLTO
Add options -[no-]offload-lto and -foffload-lto=[thin,full] for controlling LTO for offload compilation. Allow LTO for AMDGPU target. AMDGPU target does not support codegen of object files containing call of external functions, therefore the LLVM module passed to AMDGPU backend needs to contain definitions of all the callees. An LLVM option is added to allow function importer to import functions with noinline attribute. HIP toolchain passes proper LLVM options to lld to make sure function importer imports definitions of all the callees. Reviewed by: Teresa Johnson, Artem Belevich Differential Revision: https://reviews.llvm.org/D99683
Loading
Please sign in to comment