[llvm] [ModuleInliner] use std::make_heap to construct the heap after element updated (PR #69206)

via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 16 07:02:39 PDT 2023


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 f41ec27f7eba34548a280a4a4d7de2ef32837210 8ba49949cfbeda7ad9bccd7231f8154c5281603a -- llvm/lib/Analysis/InlineOrder.cpp
``````````

</details>

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

``````````diff
diff --git a/llvm/lib/Analysis/InlineOrder.cpp b/llvm/lib/Analysis/InlineOrder.cpp
index 98dea4846..5280f100e 100644
--- a/llvm/lib/Analysis/InlineOrder.cpp
+++ b/llvm/lib/Analysis/InlineOrder.cpp
@@ -219,9 +219,9 @@ class PriorityInlineOrder : public InlineOrder<std::pair<CallBase *, int>> {
   // growth from prior inlining into the callee. This method is used to lazily
   // update the desirability of a call site if it's decreasing. It is only
   // called on pop() or front(), not every time the desirability changes. When
-  // the desirability of the front call site decreases, the heap is re-constructed
-  // by std::make_heap. For simplicity, those cases where the desirability of
-  // a call site increases are ignored here.
+  // the desirability of the front call site decreases, the heap is
+  // re-constructed by std::make_heap. For simplicity, those cases where the
+  // desirability of a call site increases are ignored here.
   void adjust() {
     while (updateAndCheckDecreased(Heap.front())) {
       std::make_heap(Heap.begin(), Heap.end(), isLess);

``````````

</details>


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


More information about the llvm-commits mailing list