[llvm] [AMDGPU] Split struct kernel arguments (PR #133786)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 31 12:59:51 PDT 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 HEAD~1 HEAD --extensions cpp,h -- llvm/lib/Target/AMDGPU/AMDGPUSplitKernelArguments.cpp llvm/lib/Target/AMDGPU/AMDGPU.h llvm/lib/Target/AMDGPU/AMDGPUHSAMetadataStreamer.cpp llvm/lib/Target/AMDGPU/AMDGPUHSAMetadataStreamer.h llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUHSAMetadataStreamer.cpp b/llvm/lib/Target/AMDGPU/AMDGPUHSAMetadataStreamer.cpp
index d54828e22..bc49a62aa 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUHSAMetadataStreamer.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUHSAMetadataStreamer.cpp
@@ -362,7 +362,8 @@ void MetadataStreamerMsgPackV4::emitKernelArg(const Argument &Arg,
unsigned OriginalArgIndex = ~0U;
uint64_t OriginalArgOffset = 0;
if (Func->hasFnAttribute("amdgpu-argument-mapping")) {
- StringRef MappingStr = Func->getFnAttribute("amdgpu-argument-mapping").getValueAsString();
+ StringRef MappingStr =
+ Func->getFnAttribute("amdgpu-argument-mapping").getValueAsString();
SmallVector<StringRef, 8> Mappings;
MappingStr.split(Mappings, ',');
for (const StringRef &Mapping : Mappings) {
@@ -391,8 +392,8 @@ void MetadataStreamerMsgPackV4::emitKernelArg(const Argument &Arg,
emitKernelArg(DL, ArgTy, ArgAlign,
getValueKind(ArgTy, TypeQual, BaseTypeName), Offset, Args,
- PointeeAlign, Name, TypeName, BaseTypeName, ActAccQual,
- AccQual, TypeQual, OriginalArgIndex, OriginalArgOffset);
+ PointeeAlign, Name, TypeName, BaseTypeName, ActAccQual, AccQual,
+ TypeQual, OriginalArgIndex, OriginalArgOffset);
}
void MetadataStreamerMsgPackV4::emitKernelArg(
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUHSAMetadataStreamer.h b/llvm/lib/Target/AMDGPU/AMDGPUHSAMetadataStreamer.h
index 312a1747f..edf31ad0d 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUHSAMetadataStreamer.h
+++ b/llvm/lib/Target/AMDGPU/AMDGPUHSAMetadataStreamer.h
@@ -117,7 +117,8 @@ protected:
StringRef Name = "", StringRef TypeName = "",
StringRef BaseTypeName = "", StringRef ActAccQual = "",
StringRef AccQual = "", StringRef TypeQual = "",
- unsigned OriginalArgIndex = ~0U, uint64_t OriginalArgOffset = 0);
+ unsigned OriginalArgIndex = ~0U,
+ uint64_t OriginalArgOffset = 0);
void emitHiddenKernelArgs(const MachineFunction &MF, unsigned &Offset,
msgpack::ArrayDocNode Args) override;
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUSplitKernelArguments.cpp b/llvm/lib/Target/AMDGPU/AMDGPUSplitKernelArguments.cpp
index 4a025e180..732ab10a7 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUSplitKernelArguments.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUSplitKernelArguments.cpp
@@ -361,7 +361,8 @@ ModulePass *llvm::createAMDGPUSplitKernelArgumentsPass() {
return new AMDGPUSplitKernelArguments();
}
-PreservedAnalyses AMDGPUSplitKernelArgumentsPass::run(Module &M, ModuleAnalysisManager &AM) {
+PreservedAnalyses
+AMDGPUSplitKernelArgumentsPass::run(Module &M, ModuleAnalysisManager &AM) {
AMDGPUSplitKernelArguments Splitter;
bool Changed = Splitter.runOnModule(M);
``````````
</details>
https://github.com/llvm/llvm-project/pull/133786
More information about the llvm-commits
mailing list