7 Commits

Author SHA1 Message Date
ibricchi
65f7ebe72e [InlineOrder] Plugin Inline Order
Adds the ability to load a plugin to control the 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.

Reviewed By: kazu

Differential Revision: https://reviews.llvm.org/D140637
2023-03-15 13:15:14 -04:00
Jake Egan
1628a5695e Revert "[InlineOrder] Plugin Inline Order"
This commit is causing a CMake error on AIX. Will recommit with
a fix.

This reverts commit e46d8a731535afcf0c5c2a2f6cf3c5d4fb69cd5b.
2023-03-15 13:12:04 -04:00
Kazu Hirata
e46d8a7315 [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
2023-03-14 13:13:56 -07:00
Paul Robinson
7fc871591f [unittests] Use GTEST_SKIP() instead of return when appropriate
Basically NFC: A TEST/TEST_F/etc that bails out early (usually because
setup failed or some other runtime condition wasn't met) generally
should use GTEST_SKIP() to report its status correctly, unless it
takes steps to report another status (e.g., FAIL()).

I did see a handful of tests show up as SKIPPED after this change,
which is not unexpected. The status seemed appropriate in all the new
cases.
2023-01-25 13:59:01 -08:00
ibricchi
07af0e2d3e Reapply "[InlineAdvisor] Allow loading advisors as plugins"
This reverts commit 8d22a63e2c8b4931113ca9d1ee8b17f7ff453e81.

Fix was missing dependency.
2022-12-17 10:35:14 -08:00
Mircea Trofin
8d22a63e2c Revert "[InlineAdvisor] Allow loading advisors as plugins"
This reverts commit a00aaf2b1317fbc224dc6606ef7c2a10d617f28f.

Example failures:
    https://lab.llvm.org/buildbot#builders/68/builds/44933
    https://lab.llvm.org/buildbot#builders/230/builds/6938
2022-12-16 16:10:22 -08:00
ibricchi
a00aaf2b13 [InlineAdvisor] Allow loading advisors as plugins
Adds the ability to load InlineAdvisors as plugins. This allows developing and distributing inlining heuristics outside of tree.

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

Reviewed By: mtrofin

Differential Revision: https://reviews.llvm.org/D139644
2022-12-16 16:00:37 -08:00