[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
parent
5c6ed60c
Please register or sign in to comment