[llvm-branch-commits] [llvm] TableGen: Add intrinsic property for norecurse (PR #125015)

via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Wed Jan 29 18:57:36 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 804a16d9c8555f3926d75dbd09c4762c565fe56e 020be08e35a852c6d1d70cd8da295270f2ed758b --extensions h,cpp -- llvm/utils/TableGen/Basic/CodeGenIntrinsics.cpp llvm/utils/TableGen/Basic/CodeGenIntrinsics.h llvm/utils/TableGen/Basic/IntrinsicEmitter.cpp
``````````

</details>

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

``````````diff
diff --git a/llvm/utils/TableGen/Basic/IntrinsicEmitter.cpp b/llvm/utils/TableGen/Basic/IntrinsicEmitter.cpp
index aa49e400be..a8abce711d 100644
--- a/llvm/utils/TableGen/Basic/IntrinsicEmitter.cpp
+++ b/llvm/utils/TableGen/Basic/IntrinsicEmitter.cpp
@@ -415,10 +415,10 @@ static bool compareFnAttributes(const CodeGenIntrinsic *L,
                                 const CodeGenIntrinsic *R) {
   auto TieBoolAttributes = [](const CodeGenIntrinsic *I) -> auto {
     // Sort throwing intrinsics after non-throwing intrinsics.
-    return std::tie(I->canThrow, I->isNoDuplicate, I->isNoMerge, I->isNoReturn, I->isNoRecurse,
-                    I->isNoCallback, I->isNoSync, I->isNoFree, I->isWillReturn,
-                    I->isCold, I->isConvergent, I->isSpeculatable,
-                    I->hasSideEffects, I->isStrictFP);
+    return std::tie(I->canThrow, I->isNoDuplicate, I->isNoMerge, I->isNoReturn,
+                    I->isNoRecurse, I->isNoCallback, I->isNoSync, I->isNoFree,
+                    I->isWillReturn, I->isCold, I->isConvergent,
+                    I->isSpeculatable, I->hasSideEffects, I->isStrictFP);
   };
 
   auto TieL = TieBoolAttributes(L);
@@ -440,10 +440,11 @@ static bool compareFnAttributes(const CodeGenIntrinsic *L,
 /// NoUnwind = !canThrow, so we need to negate it's sense to test if the
 // intrinsic has NoUnwind attribute.
 static bool hasFnAttributes(const CodeGenIntrinsic &Int) {
-  return !Int.canThrow || Int.isNoReturn || Int.isNoRecurse || Int.isNoCallback || Int.isNoSync ||
-         Int.isNoFree || Int.isWillReturn || Int.isCold || Int.isNoDuplicate ||
-         Int.isNoMerge || Int.isConvergent || Int.isSpeculatable ||
-         Int.isStrictFP || getEffectiveME(Int) != MemoryEffects::unknown();
+  return !Int.canThrow || Int.isNoReturn || Int.isNoRecurse ||
+         Int.isNoCallback || Int.isNoSync || Int.isNoFree || Int.isWillReturn ||
+         Int.isCold || Int.isNoDuplicate || Int.isNoMerge || Int.isConvergent ||
+         Int.isSpeculatable || Int.isStrictFP ||
+         getEffectiveME(Int) != MemoryEffects::unknown();
 }
 
 namespace {

``````````

</details>


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


More information about the llvm-branch-commits mailing list