This patch abstract Calls in Inliner:run to InlineOrder.
With this patch, we could customize the inlining order.
Now this patch is a minimal refactoring,
some works are still needed to be done.
Paths
| Differential D103315
Add interface to order inlining ClosedPublic Authored by taolq on May 28 2021, 6:29 AM.
Details Summary This patch abstract Calls in Inliner:run to InlineOrder. Now this patch is a minimal refactoring,
Diff Detail
Event Timelinetaolq retitled this revision from add InlineOrder to abstract Calls to Add interface to order inlining.May 28 2021, 6:35 AM Comment Actions I believe this is in the right direction. I recommend informing the nuances of the API by trying first to replace all the uses of Calls (and the adjustment of the index iterating through Calls, line 906) Please note the linter notes (virtual dtor, etc)
Comment Actions I also agree this is in the right direction. I've left some minor comments.
taolq marked an inline comment as done. Comment Actionschange impl of DefaultInlineOrder: SmallVector -> std::deque Comment Actions Thanks for the update. I'd generalize the code around Call.erase a little bit more to accommodate other underlying data structures. See the comments below for details.
This revision is now accepted and ready to land.Jun 3 2021, 9:33 AM Closed by commit rG478dc47292b2: [llvm] Add interface to order inlining (authored by taolq). · Explain WhyJun 5 2021, 9:04 PM This revision was automatically updated to reflect the committed changes. taolq marked 7 inline comments as done. Comment Actions This change appears to be causing 6 or 7 lit tests to hang. Can you take a look and fix or revert? https://lab.llvm.org/buildbot/#/builders/139/builds/5158 (7 tests hanging) Comment Actions
Thanks for reminding. I will tentatively revert it soon. This revision is now accepted and ready to land.Jun 7 2021, 2:06 AM This revision was landed with ongoing or failed builds.Jun 7 2021, 3:36 AM Closed by commit rG4a0de622c34e: [llvm] Add interface to order inlining (authored by taolq). · Explain Why This revision was automatically updated to reflect the committed changes. Comment Actions
Now it's fixed and landed.
Revision Contents
Diff 350202 llvm/lib/Transforms/IPO/Inliner.cpp
|
Remove this if you use SmallVector. See below.