[llvm] Make `IntrinsicLowering` external function call lowering configurable (PR #102148)

via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 8 01:46:08 PDT 2024


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 daf4a06e5c5531005b275b72681e04bd08e58fe4 c879f2e838fe225e74280f3906ddb5cc69f615d2 --extensions cpp,h -- llvm/include/llvm/CodeGen/IntrinsicLowering.h llvm/lib/CodeGen/IntrinsicLowering.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/llvm/include/llvm/CodeGen/IntrinsicLowering.h b/llvm/include/llvm/CodeGen/IntrinsicLowering.h
index 43f264eb48..63848dd3f2 100644
--- a/llvm/include/llvm/CodeGen/IntrinsicLowering.h
+++ b/llvm/include/llvm/CodeGen/IntrinsicLowering.h
@@ -25,7 +25,8 @@ class Value;
 
 class IntrinsicLowering {
   const DataLayout &DL;
-  /// This controls if some intrinsics are lowered to calls to external functions. 
+  /// This controls if some intrinsics are lowered to calls to external
+  /// functions.
   bool AllowLibraryFunctionCalls;
 
   bool Warned = false;
diff --git a/llvm/lib/CodeGen/IntrinsicLowering.cpp b/llvm/lib/CodeGen/IntrinsicLowering.cpp
index 0defb731c7..2315dc2f88 100644
--- a/llvm/lib/CodeGen/IntrinsicLowering.cpp
+++ b/llvm/lib/CodeGen/IntrinsicLowering.cpp
@@ -356,7 +356,8 @@ void IntrinsicLowering::LowerIntrinsicCall(CallInst *CI) {
     Ops[0] = CI->getArgOperand(0);
     Ops[1] = CI->getArgOperand(1);
     Ops[2] = Size;
-    ReplaceCallWith("memcpy", CI, {Ops, Ops + 3}, CI->getArgOperand(0)->getType());
+    ReplaceCallWith("memcpy", CI, {Ops, Ops + 3},
+                    CI->getArgOperand(0)->getType());
     break;
   }
   case Intrinsic::memmove: {
@@ -367,7 +368,8 @@ void IntrinsicLowering::LowerIntrinsicCall(CallInst *CI) {
     Ops[0] = CI->getArgOperand(0);
     Ops[1] = CI->getArgOperand(1);
     Ops[2] = Size;
-    ReplaceCallWith("memmove", CI, {Ops, Ops + 3}, CI->getArgOperand(0)->getType());
+    ReplaceCallWith("memmove", CI, {Ops, Ops + 3},
+                    CI->getArgOperand(0)->getType());
     break;
   }
   case Intrinsic::memset: {
@@ -382,7 +384,8 @@ void IntrinsicLowering::LowerIntrinsicCall(CallInst *CI) {
                                    Type::getInt32Ty(Context),
                                    /* isSigned */ false);
     Ops[2] = Size;
-    ReplaceCallWith("memset", CI, {Ops, Ops + 3}, CI->getArgOperand(0)->getType());
+    ReplaceCallWith("memset", CI, {Ops, Ops + 3},
+                    CI->getArgOperand(0)->getType());
     break;
   }
   case Intrinsic::sqrt: {

``````````

</details>


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


More information about the llvm-commits mailing list