[InlineOrder] Plugin Inline Order
authorKazu Hirata <kazu@google.com>
Tue, 14 Mar 2023 20:13:56 +0000 (13:13 -0700)
committerKazu Hirata <kazu@google.com>
Tue, 14 Mar 2023 20:13:56 +0000 (13:13 -0700)
commite46d8a731535afcf0c5c2a2f6cf3c5d4fb69cd5b
treec1ee1eef79ce601b6e353cfa5e37bc0fc9e90aa6
parenta1e39f35c50a5292f464cf59aa63b8ed0107dfce
[InlineOrder] Plugin Inline Order

This allows developing and distributing inlining heuristics
outside of tree. And together with the inline advisor plugins
allows for fine grained control of the inliner.

The PluginInlineOrderAnalysis class serves as the entry point
for dynamic advisors. Plugins must register instances of this
class to provide their own InlineOrder.

I'm checking in this patch on behalf of ibricchi
<ibricchi@student.ethz.ch>.

Differential Revision: https://reviews.llvm.org/D140637
llvm/include/llvm/Analysis/InlineOrder.h
llvm/lib/Analysis/InlineOrder.cpp
llvm/lib/Transforms/IPO/ModuleInliner.cpp
llvm/unittests/Analysis/CMakeLists.txt
llvm/unittests/Analysis/InlineOrderPlugin/CMakeLists.txt [new file with mode: 0644]
llvm/unittests/Analysis/InlineOrderPlugin/InlineOrderPlugin.cpp [new file with mode: 0644]
llvm/unittests/Analysis/PluginInlineAdvisorAnalysisTest.cpp
llvm/unittests/Analysis/PluginInlineOrderAnalysisTest.cpp [new file with mode: 0644]