llvm-project
eaff67c9 - [HIP][AMDGPU] Use non-LTO pipeline for non-RDC in the linker wrapper (#201135)

Commit
89 days ago
[HIP][AMDGPU] Use non-LTO pipeline for non-RDC in the linker wrapper (#201135) Non-RDC HIP does not need LTO, but the new offload driver compiles all AMDGPU device code through the LTO pipeline. That makes non-RDC builds pay full LTO codegen cost for no benefit. Fix this in clang-linker-wrapper instead of the driver, so device codegen still runs in the wrapper's parallel device-link step (kept fast by --offload-jobs) rather than being serialized back in the driver. The driver passes a new --no-lto flag for the non-RDC fat-binary job (unless the user asked for -foffload-lto). With it, the wrapper drops -flto and, because the device images are bitcode stored in object-extension files, also passes -x ir so clang actually compiles them (cc1 -emit-obj) instead of handing the bitcode to lld for an LTO link.
Author
Parents
Loading