[PATCH] D139933: [InlineOrder] Add TopDownInlineOrder

IBricchi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Dec 17 11:25:43 PST 2022


IBricchi added inline comments.


================
Comment at: llvm/lib/Analysis/InlineOrder.cpp:302
+/// With the top-down inliner, we can explore all possible inlining decisions.
+class TopDownInlineOrder : public InlineOrder<std::pair<CallBase *, int>> {
+  using T = std::pair<CallBase *, int>;
----------------
kazu wrote:
> Are you duplicating much of `InlineOrder` because you use `NodeCallCount` as cache and do not care about updating the priority while the priority queue is consumed?  I'm wondering if there is a good way for you to take what you need without duplicating the rest.
Do you mean duplication from PriorityInlineOrder?

Most of the duplication is to keep track of InlineHistory, and managing what CallBases are corrently being considered (heap). I'm not sure which parts we would be able to remove.

We could replace the Heap with a vector or set and not worry about the orider but I'm not sure if that's the kind of change you were suggesting.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D139933/new/

https://reviews.llvm.org/D139933



More information about the llvm-commits mailing list