This is an archive of the discontinued LLVM Phabricator instance.

[llvm][ModuleInliner] Add inline cost priority for module inliner
ClosedPublic

Authored by taolq on Jul 18 2022, 7:50 AM.

Details

Summary

This patch introduces the inline cost priority into the
module inliner, which uses the same computation as
InlineCost.

Diff Detail

Event Timeline

taolq created this revision.Jul 18 2022, 7:50 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 18 2022, 7:50 AM
taolq requested review of this revision.Jul 18 2022, 7:50 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 18 2022, 7:50 AM
taolq retitled this revision from Add inline cost priority for module inliner to [llvm][ModuleInliner] Add inline cost priority for module inliner.Jul 18 2022, 7:54 AM
taolq edited the summary of this revision. (Show Details)
taolq added reviewers: kazu, mtrofin.
kazu accepted this revision.Jul 18 2022, 2:52 PM

LGTM modulo some comments. Thanks!

llvm/lib/Analysis/InlineOrder.cpp
2

Could you put the standard file header here?

//===- InlineOrder.cpp - Inlining order abstraction -*- C++ ---*-----------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
llvm/lib/Transforms/IPO/ModuleInliner.cpp
153–154

I'd suggest:

auto Calls = getInlineOrder(UseInlinePriority, FAM, Params);
This revision is now accepted and ready to land.Jul 18 2022, 2:52 PM
taolq updated this revision to Diff 448046.Jul 27 2022, 8:09 AM
  • rebase to main
  • resolve reviews
taolq marked 2 inline comments as done.Jul 27 2022, 8:09 AM
This revision was landed with ongoing or failed builds.Jul 28 2022, 6:29 AM
This revision was automatically updated to reflect the committed changes.