[llvm] dd90c72 - AMDGPU: Temporarily stop adding AtomicExpand to new PM passes

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 20 13:19:42 PDT 2024


Author: Matt Arsenault
Date: 2024-08-21T00:19:37+04:00
New Revision: dd90c72b05822927bf62724759f73c491166248c

URL: https://github.com/llvm/llvm-project/commit/dd90c72b05822927bf62724759f73c491166248c
DIFF: https://github.com/llvm/llvm-project/commit/dd90c72b05822927bf62724759f73c491166248c.diff

LOG: AMDGPU: Temporarily stop adding AtomicExpand to new PM passes

This breaks using -passes=atomic-expand (but only sometimes?).
Somehow an AtomicExpand pass ends up running without a TargetMachine,
despite always being constructed with one.

Added: 
    

Modified: 
    llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp b/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
index c89d9ff906d145..2b9e431e86f893 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
@@ -1806,7 +1806,8 @@ void AMDGPUCodeGenPassBuilder::addIRPasses(AddIRPass &addPass) const {
       (AMDGPUAtomicOptimizerStrategy != ScanOptions::None))
     addPass(AMDGPUAtomicOptimizerPass(TM, AMDGPUAtomicOptimizerStrategy));
 
-  addPass(AtomicExpandPass());
+  // FIXME: Adding atomic-expand manages to break -passes=atomic-expand
+  // addPass(AtomicExpandPass(TM));
 
   if (TM.getOptLevel() > CodeGenOptLevel::None) {
     addPass(AMDGPUPromoteAllocaPass(TM));


        


More information about the llvm-commits mailing list