[llvm] [AMDGPU] Move `AMDGPUAttributorPass` to full LTO post link stage (PR #102086)

Shilei Tian via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 9 05:32:28 PDT 2024


================
@@ -734,21 +739,15 @@ void AMDGPUTargetMachine::registerPassBuilderCallbacks(PassBuilder &PB) {
         PM.addPass(createCGSCCToFunctionPassAdaptor(std::move(FPM)));
       });
 
-  // FIXME: Why is AMDGPUAttributor not in CGSCC?
-  PB.registerOptimizerLastEPCallback(
-      [this](ModulePassManager &MPM, OptimizationLevel Level) {
----------------
shiltian wrote:

That is correct. For HIP (w/ or w/o rdc) and OpenMP, we always run LTO. Need to check OpenCL. If not, we probably want to run it as well.

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


More information about the llvm-commits mailing list