[PATCH] D130806: [InstrProf] Allow noprofile functions to be inlined

Ellis Hoag via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 29 16:52:35 PDT 2022


ellis created this revision.
Herald added subscribers: jdoerfert, hiraditya.
Herald added a project: All.
ellis edited the summary of this revision.
ellis added reviewers: phosek, davidxl, nickdesaulniers, MaskRay.
Herald added a subscriber: StephenFan.
ellis published this revision for review.
ellis added a comment.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Please let me know if there is a reason for preventing `noprofile` functions from being inlined into profiled functions. If there is one I'd like to understand it.


As discussed in [0], when a function `foo` had the `noprofile` attribute
before this change, profiled functions were not allowed to be inlined
into `foo` and `foo` could not be inlined into profiled functions.

This relaxes the restriction to allow `foo`  to be inlined into profiled
functions.

Also, remove the `areOutlineCompatible()` function which appears to be
unused.

[0] https://discourse.llvm.org/t/why-does-the-noprofile-attribute-restrict-inlining/64108


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D130806

Files:
  llvm/docs/LangRef.rst
  llvm/include/llvm/IR/Attributes.h
  llvm/include/llvm/IR/Attributes.td
  llvm/lib/IR/Attributes.cpp
  llvm/test/Transforms/Inline/inline_noprofile.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D130806.448739.patch
Type: text/x-patch
Size: 5175 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220729/9d396ac2/attachment.bin>


More information about the llvm-commits mailing list