[llvm] [AMDGPU] Skip lowerNonKernelLDSAccesses if function is declaration. (PR #106975)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 2 05:08:13 PDT 2024
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff e5a5ac0c2355df9911953260aaf519185efa369e c0356634af0a5d7b78f16fd07144fa941c93d6f5 --extensions cpp -- llvm/lib/Target/AMDGPU/AMDGPUSwLowerLDS.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUSwLowerLDS.cpp b/llvm/lib/Target/AMDGPU/AMDGPUSwLowerLDS.cpp
index b85cc9cbbc..ca796200ee 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUSwLowerLDS.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUSwLowerLDS.cpp
@@ -1218,7 +1218,8 @@ bool AMDGPUSwLowerLDS::run() {
for (auto &K : FuncLDSAccessInfo.NonKernelToLDSAccessMap) {
Function *Func = K.first;
DenseSet<GlobalVariable *> &LDSGlobals = K.second;
- if (Func->isDeclaration() || LDSGlobals.empty()) continue;
+ if (Func->isDeclaration() || LDSGlobals.empty())
+ continue;
SetVector<GlobalVariable *> OrderedLDSGlobals = sortByName(
std::vector<GlobalVariable *>(LDSGlobals.begin(), LDSGlobals.end()));
lowerNonKernelLDSAccesses(Func, OrderedLDSGlobals, NKLDSParams);
@@ -1227,7 +1228,8 @@ bool AMDGPUSwLowerLDS::run() {
auto &K = FuncLDSAccessInfo.NonKernelToLDSAccessMap;
if (K.find(Func) != K.end())
continue;
- if (Func->isDeclaration()) continue;
+ if (Func->isDeclaration())
+ continue;
SetVector<llvm::GlobalVariable *> Vec;
lowerNonKernelLDSAccesses(Func, Vec, NKLDSParams);
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/106975
More information about the llvm-commits
mailing list