[llvm][Inliner] Add an optional PriorityInlineOrder
authorLiqiang Tao <taolq@outlook.com>
Sat, 19 Jun 2021 02:17:19 +0000 (10:17 +0800)
committerLiqiang Tao <taolq@outlook.com>
Sat, 19 Jun 2021 02:17:32 +0000 (10:17 +0800)
commit671a87104b8132e45718a9584cbb7ed97916683f
tree8655077c544b4dad1f6481bed33fe0bf0a250967
parent80f30a6b855b7aa96b99205c986972483d75822e
[llvm][Inliner] Add an optional PriorityInlineOrder

This patch adds an optional PriorityInlineOrder, which uses the heap to order inlining.
The callsite which size is smaller would have a higher priority.

Reviewed By: mtrofin

Differential Revision: https://reviews.llvm.org/D104028
llvm/lib/Transforms/IPO/Inliner.cpp
llvm/test/Transforms/Inline/inline_call.ll
llvm/test/Transforms/Inline/inline_invoke.ll
llvm/test/Transforms/Inline/last-callsite.ll