[all-commits] [llvm/llvm-project] 50de7f: [llvm][ModuleInliner] Refactor InlineSizePriority ...

Liqiang TAO via All-commits all-commits at lists.llvm.org
Thu Jun 2 07:29:22 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 50de7f1e7787bf327d1d04c4daab97c1c180b58c
      https://github.com/llvm/llvm-project/commit/50de7f1e7787bf327d1d04c4daab97c1c180b58c
  Author: Liqiang Tao <taolq at outlook.com>
  Date:   2022-06-02 (Thu, 02 Jun 2022)

  Changed paths:
    M llvm/include/llvm/Analysis/InlineOrder.h
    M llvm/lib/Transforms/IPO/ModuleInliner.cpp

  Log Message:
  -----------
  [llvm][ModuleInliner] Refactor InlineSizePriority and PriorityInlineOrder

This patch introduces the abstract base class InlinePriority to serve as
the comparison function for the priority queue.  A derived class, such
as SizePriority, may choose to cache the priorities for different
functions for performance reasons.

This design shields the type used for the priority away from classes
outside InlinePriority and classes derived from it.  In turn,
PriorityInlineOrder no longer needs to be a template class.

Reviewed By: kazu

Differential Revision: https://reviews.llvm.org/D126300




More information about the All-commits mailing list