[llvm] [WIP] [llvm] The sysV ABI (PR #194718)

via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 29 00:09:53 PDT 2026


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 cpp,h -- llvm/lib/ABI/Targets/X86.cpp llvm/include/llvm/ABI/TargetInfo.h llvm/include/llvm/ABI/Types.h llvm/lib/ABI/Types.cpp --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/include/llvm/ABI/TargetInfo.h b/llvm/include/llvm/ABI/TargetInfo.h
index 8a916cd02..c09f4a153 100644
--- a/llvm/include/llvm/ABI/TargetInfo.h
+++ b/llvm/include/llvm/ABI/TargetInfo.h
@@ -92,10 +92,11 @@ enum class X86AVXABILevel {
   AVX512,
 };
 
-std::unique_ptr<TargetInfo>
-createX8664TargetInfo(TypeBuilder &TB, const Triple &TargetTriple,
-                      X86AVXABILevel AVXLevel, bool Has64BitPointers,
-                      const ABICompatInfo &Compat);
+std::unique_ptr<TargetInfo> createX8664TargetInfo(TypeBuilder &TB,
+                                                  const Triple &TargetTriple,
+                                                  X86AVXABILevel AVXLevel,
+                                                  bool Has64BitPointers,
+                                                  const ABICompatInfo &Compat);
 
 } // namespace abi
 } // namespace llvm
diff --git a/llvm/lib/ABI/Targets/X86.cpp b/llvm/lib/ABI/Targets/X86.cpp
index b21464660..62d4489f9 100644
--- a/llvm/lib/ABI/Targets/X86.cpp
+++ b/llvm/lib/ABI/Targets/X86.cpp
@@ -550,12 +550,10 @@ X86_64TargetInfo::useFirstFieldIfTransparentUnion(const Type *Ty) const {
   return Ty;
 }
 
-ArgInfo X86_64TargetInfo::classifyArgumentType(const Type *Ty,
-                                               unsigned FreeIntRegs,
-                                               unsigned &NeededInt,
-                                               unsigned &NeededSSE,
-                                               bool IsNamedArg,
-                                               bool IsRegCall) const {
+ArgInfo
+X86_64TargetInfo::classifyArgumentType(const Type *Ty, unsigned FreeIntRegs,
+                                       unsigned &NeededInt, unsigned &NeededSSE,
+                                       bool IsNamedArg, bool IsRegCall) const {
 
   Ty = useFirstFieldIfTransparentUnion(Ty);
 
@@ -1302,8 +1300,7 @@ ArgInfo X86_64TargetInfo::getIndirectResult(const Type *Ty,
 
   // Compute the byval alignment. We specify the alignment of the byval in all
   // cases so that the mid-level optimizer knows the alignment of the byval.
-  uint64_t AlignVal =
-      std::max<uint64_t>(Ty->getAlignment().value(), 8u);
+  uint64_t AlignVal = std::max<uint64_t>(Ty->getAlignment().value(), 8u);
 
   // Attempt to avoid passing indirect results using byval when possible. This
   // is important for good codegen.
@@ -1419,10 +1416,11 @@ void X86_64TargetInfo::computeInfo(FunctionInfo &FI) const {
   }
 }
 
-std::unique_ptr<TargetInfo>
-createX8664TargetInfo(TypeBuilder &TB, const Triple &TargetTriple,
-                      X86AVXABILevel AVXLevel, bool Has64BitPointers,
-                      const ABICompatInfo &Compat) {
+std::unique_ptr<TargetInfo> createX8664TargetInfo(TypeBuilder &TB,
+                                                  const Triple &TargetTriple,
+                                                  X86AVXABILevel AVXLevel,
+                                                  bool Has64BitPointers,
+                                                  const ABICompatInfo &Compat) {
   return std::make_unique<X86_64TargetInfo>(TB, TargetTriple, AVXLevel,
                                             Has64BitPointers, Compat);
 }

``````````

</details>


https://github.com/llvm/llvm-project/pull/194718


More information about the llvm-commits mailing list