[llvm] [AMDGPU] Enable "amdgpu-sw-lower-lds" pass in pipeline. (PR #89206)

via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 18 03:35:07 PDT 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-backend-amdgpu

Author: Chaitanya (skc7)

<details>
<summary>Changes</summary>

If AddressSanitizer feature is enabled, 
"amdgpu-sw-lower-lds" pass will be enabled in the pipeline,
"amdgpu-lower-module-lds" pass will be disabled with this PR.

---
Full diff: https://github.com/llvm/llvm-project/pull/89206.diff


1 Files Affected:

- (modified) llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp (+5) 


``````````diff
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp b/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
index 305a6c8c3b9262..7684cf8f15b59c 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
@@ -676,6 +676,11 @@ void AMDGPUTargetMachine::registerPassBuilderCallbacks(
 
         if (EarlyInlineAll && !EnableFunctionCalls)
           PM.addPass(AMDGPUAlwaysInlinePass());
+
+#if __has_feature(address_sanitizer)
+        EnableLowerModuleLDS = false;
+        PM.addPass(AMDGPUSwLowerLDSPass());
+#endif
       });
 
   PB.registerPeepholeEPCallback(

``````````

</details>


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


More information about the llvm-commits mailing list