[llvm] [AMDGPU] Enable serializing of allocated preload kernarg SGPRs info (PR #168374)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 17 06:18:17 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 origin/main HEAD --extensions h,cpp -- llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.h --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp b/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
index 354113dfb..d835eb6f1 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
@@ -2034,11 +2034,11 @@ bool GCNTargetMachine::parseMachineFunctionInfo(
if (!A.IsRegister) {
const MemoryBuffer &Buffer =
- *PFS.SM->getMemoryBuffer(PFS.SM->getMainFileID());
- Error = SMDiagnostic(*PFS.SM, SMLoc(), Buffer.getBufferIdentifier(), 1, 0,
- SourceMgr::DK_Error,
- "firstKernArgPreloadReg must be a register", "", {},
- {});
+ *PFS.SM->getMemoryBuffer(PFS.SM->getMainFileID());
+ Error =
+ SMDiagnostic(*PFS.SM, SMLoc(), Buffer.getBufferIdentifier(), 1, 0,
+ SourceMgr::DK_Error,
+ "firstKernArgPreloadReg must be a register", "", {}, {});
return true;
}
diff --git a/llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp b/llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp
index 55a01ce97..a716a99ee 100644
--- a/llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp
+++ b/llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp
@@ -764,7 +764,7 @@ yaml::SIMachineFunctionInfo::SIMachineFunctionInfo(
IsWholeWaveFunction(MFI.isWholeWaveFunction()),
DynamicVGPRBlockSize(MFI.getDynamicVGPRBlockSize()),
ScratchReservedForDynamicVGPRs(MFI.getScratchReservedForDynamicVGPRs()),
- NumKernargPreloadSGPRs(MFI.getNumKernargPreloadedSGPRs()) {
+ NumKernargPreloadSGPRs(MFI.getNumKernargPreloadedSGPRs()) {
for (Register Reg : MFI.getSGPRSpillPhysVGPRs())
SpillPhysVGPRS.push_back(regToString(Reg, TRI));
``````````
</details>
https://github.com/llvm/llvm-project/pull/168374
More information about the llvm-commits
mailing list