Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions llvm/lib/Analysis/InlineOrder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -219,13 +219,12 @@ 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, an updated one would be
// pushed right back into the 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::pop_heap(Heap.begin(), Heap.end(), isLess);
std::push_heap(Heap.begin(), Heap.end(), isLess);
std::make_heap(Heap.begin(), Heap.end(), isLess);
}
}

Expand Down