[PATCH] D38190: Partial Inlining with multi-region outlining based on PGO information

Graham Yiu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 25 05:03:46 PDT 2017


gyiu created this revision.
Herald added a subscriber: eraman.

With PGO information, we can do more aggressive outlining of cold regions in the inline candidate function.  This contrasts with the scheme of keeping only the 'early return' portion of the inline candidate and outlining the rest of the function as a single function call.

Support for outlining multiple regions of each function is added, as well as some basic heuristics to determine which regions are good to outline.  Outline candidates limited to regions that are single-entry & single-exit.  Also we don't account for live-ranges we may be killing across the region with a function.  These are enhancements we can consider in another patch.

Fallback to the regular partial inlining scheme is retained when either i) no regions are identified for outlining in the function, or ii) the outlined function could not be inlined in any of its callers.


Repository:
  rL LLVM

https://reviews.llvm.org/D38190

Files:
  include/llvm/Analysis/ProfileSummaryInfo.h
  lib/Transforms/IPO/PartialInlining.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D38190.116397.patch
Type: text/x-patch
Size: 28206 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170925/0c4b4230/attachment-0001.bin>


More information about the llvm-commits mailing list