[llvm] [AMDGPU] Store resource analysis result into SIMachineFunctionInfo (PR #124040)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 22 16:58:23 PST 2025
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 98de5dfe6a8cbb70f21de545acec4710a77294ed 1c8b0c78d612a99e52e831842b0a0bbaf5d5a358 --extensions h,cpp -- llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp llvm/lib/Target/AMDGPU/AMDGPUMCResourceInfo.cpp llvm/lib/Target/AMDGPU/AMDGPUMCResourceInfo.h llvm/lib/Target/AMDGPU/AMDGPUResourceUsageAnalysis.cpp llvm/lib/Target/AMDGPU/AMDGPUResourceUsageAnalysis.h llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.h
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUMCResourceInfo.h b/llvm/lib/Target/AMDGPU/AMDGPUMCResourceInfo.h
index d450bec46e..8d3a555652 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUMCResourceInfo.h
+++ b/llvm/lib/Target/AMDGPU/AMDGPUMCResourceInfo.h
@@ -90,10 +90,10 @@ public:
/// transitive maximum or accumulative. For example, if A calls B and B's VGPR
/// usage exceeds A's, A should be assigned B's VGPR usage. Furthermore,
/// functions with indirect calls should be assigned the module level maximum.
- void gatherResourceInfo(
- const MachineFunction &MF,
- const SIMachineFunctionInfo::SIFunctionResourceInfo &FRI,
- MCContext &OutContext);
+ void
+ gatherResourceInfo(const MachineFunction &MF,
+ const SIMachineFunctionInfo::SIFunctionResourceInfo &FRI,
+ MCContext &OutContext);
const MCExpr *createTotalNumVGPRs(const MachineFunction &MF, MCContext &Ctx);
const MCExpr *createTotalNumSGPRs(const MachineFunction &MF, bool hasXnack,
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUResourceUsageAnalysis.h b/llvm/lib/Target/AMDGPU/AMDGPUResourceUsageAnalysis.h
index 8716e48cb2..37659e4c41 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUResourceUsageAnalysis.h
+++ b/llvm/lib/Target/AMDGPU/AMDGPUResourceUsageAnalysis.h
@@ -15,9 +15,9 @@
#ifndef LLVM_LIB_TARGET_AMDGPU_AMDGPURESOURCEUSAGEANALYSIS_H
#define LLVM_LIB_TARGET_AMDGPU_AMDGPURESOURCEUSAGEANALYSIS_H
+#include "SIMachineFunctionInfo.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
-#include "SIMachineFunctionInfo.h"
namespace llvm {
``````````
</details>
https://github.com/llvm/llvm-project/pull/124040
More information about the llvm-commits
mailing list