[llvm-branch-commits] [llvm] [NFC][AMDGPU] Reformat code for creating AA (PR #101591)
Shilei Tian via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Thu Aug 1 17:25:34 PDT 2024
https://github.com/shiltian created https://github.com/llvm/llvm-project/pull/101591
None
>From 806563cbb89fea64b9c289ad39a4520ce72f0ebc Mon Sep 17 00:00:00 2001
From: Shilei Tian <i at tianshilei.me>
Date: Thu, 1 Aug 2024 20:24:49 -0400
Subject: [PATCH] [NFC][AMDGPU] Reformat code for creating AA
---
llvm/lib/Target/AMDGPU/AMDGPUAttributor.cpp | 23 +++++++++++----------
1 file changed, 12 insertions(+), 11 deletions(-)
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUAttributor.cpp b/llvm/lib/Target/AMDGPU/AMDGPUAttributor.cpp
index 9d3c9e1e2ef9f..de1f3421cce4e 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUAttributor.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUAttributor.cpp
@@ -1051,17 +1051,18 @@ static bool runImpl(Module &M, AnalysisGetter &AG, TargetMachine &TM) {
Attributor A(Functions, InfoCache, AC);
for (Function &F : M) {
- if (!F.isIntrinsic()) {
- A.getOrCreateAAFor<AAAMDAttributes>(IRPosition::function(F));
- A.getOrCreateAAFor<AAUniformWorkGroupSize>(IRPosition::function(F));
- A.getOrCreateAAFor<AAAMDGPUNoAGPR>(IRPosition::function(F));
- CallingConv::ID CC = F.getCallingConv();
- if (!AMDGPU::isEntryFunctionCC(CC)) {
- A.getOrCreateAAFor<AAAMDFlatWorkGroupSize>(IRPosition::function(F));
- A.getOrCreateAAFor<AAAMDWavesPerEU>(IRPosition::function(F));
- } else if (CC == CallingConv::AMDGPU_KERNEL) {
- addPreloadKernArgHint(F, TM);
- }
+ if (F.isIntrinsic())
+ continue;
+
+ A.getOrCreateAAFor<AAAMDAttributes>(IRPosition::function(F));
+ A.getOrCreateAAFor<AAUniformWorkGroupSize>(IRPosition::function(F));
+ A.getOrCreateAAFor<AAAMDGPUNoAGPR>(IRPosition::function(F));
+ CallingConv::ID CC = F.getCallingConv();
+ if (!AMDGPU::isEntryFunctionCC(CC)) {
+ A.getOrCreateAAFor<AAAMDFlatWorkGroupSize>(IRPosition::function(F));
+ A.getOrCreateAAFor<AAAMDWavesPerEU>(IRPosition::function(F));
+ } else if (CC == CallingConv::AMDGPU_KERNEL) {
+ addPreloadKernArgHint(F, TM);
}
}
More information about the llvm-branch-commits
mailing list