[PATCH] D104654: [llvm][Inliner] Make PriorityInlineOrder lazily updated

Chuanqi Xu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 21 19:54:38 PDT 2021


ChuanqiXu added a comment.

How do you think about:

  T pop() {
      if (!initialized) {
          make_heap ...
          initialized = true;
      }
  }
  // same as front

It seems simple and cheaper.

Another option is:

  SmallVector<CallBase*> CallSites;
  // Fill CallSites
  if (InlineEnablePriorityOrder)
      Calls = std::make_unique<PriorityInlineOrder>(CallSites); // Do make heap here
  else
      Calls = std::make_unique<InlinerOrder>(CallSites);

It looks good too.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D104654



More information about the llvm-commits mailing list