[llvm] [MemProf] Fix assert when exists direct recursion (PR #78264)

via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 24 18:28:26 PST 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 480cc413b7f7e73f90646e5feeb598e36e4e9565 e382bda8f438faef33af2fd8432eecd23e8a52ca -- llvm/lib/Transforms/IPO/MemProfContextDisambiguation.cpp
``````````

</details>

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

``````````diff
diff --git a/llvm/lib/Transforms/IPO/MemProfContextDisambiguation.cpp b/llvm/lib/Transforms/IPO/MemProfContextDisambiguation.cpp
index 664a4000bd..20c6ff5e5a 100644
--- a/llvm/lib/Transforms/IPO/MemProfContextDisambiguation.cpp
+++ b/llvm/lib/Transforms/IPO/MemProfContextDisambiguation.cpp
@@ -3475,8 +3475,8 @@ bool MemProfContextDisambiguation::applyImport(Module &M) {
             auto ContextIterBegin =
                 StackContext.beginAfterSharedPrefix(CallsiteContext);
             uint64_t LastStackContextId = *ContextIterBegin == UINT64_MAX
-                                ? *ContextIterBegin - 1
-                                : *ContextIterBegin + 1;
+                                              ? *ContextIterBegin - 1
+                                              : *ContextIterBegin + 1;
             for (auto ContextIter = ContextIterBegin;
                  ContextIter != StackContext.end(); ++ContextIter) {
               // If this is a direct recursion, simply skip the duplicate

``````````

</details>


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


More information about the llvm-commits mailing list