[all-commits] [llvm/llvm-project] f9ca75: [Inliner] Inlining should honor nobuiltin attributes

Teresa Johnson via All-commits all-commits at lists.llvm.org
Fri Feb 28 07:34:48 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: f9ca75f19bab639988ebbe68c81d07babd952afb
      https://github.com/llvm/llvm-project/commit/f9ca75f19bab639988ebbe68c81d07babd952afb
  Author: Teresa Johnson <tejohnson at google.com>
  Date:   2020-02-28 (Fri, 28 Feb 2020)

  Changed paths:
    M llvm/include/llvm/Analysis/InlineCost.h
    M llvm/include/llvm/Analysis/TargetLibraryInfo.h
    M llvm/include/llvm/Transforms/IPO/Inliner.h
    M llvm/lib/Analysis/InlineCost.cpp
    M llvm/lib/Target/AMDGPU/AMDGPUInline.cpp
    M llvm/lib/Transforms/IPO/InlineSimple.cpp
    M llvm/lib/Transforms/IPO/Inliner.cpp
    M llvm/lib/Transforms/IPO/PartialInlining.cpp
    M llvm/lib/Transforms/IPO/SampleProfile.cpp
    A llvm/test/Transforms/Inline/inline-no-builtin-compatible.ll

  Log Message:
  -----------
  [Inliner] Inlining should honor nobuiltin attributes

Summary:
Final patch in series to fix inlining between functions with different
nobuiltin attributes/options, which was specifically an issue in LTO.
See discussion on D61634 for background.

The prior patch in this series (D67923) enabled per-Function TLI
construction that identified the nobuiltin attributes.

Here I have allowed inlining to proceed if the callee's nobuiltins are a
subset of the caller's nobuiltins, but not in the reverse case, which
should be conservatively correct. This is controlled by a new option,
-inline-caller-superset-nobuiltin, which is enabled by default.

Reviewers: hfinkel, gchatelet, chandlerc, davidxl

Subscribers: arsenm, jvesely, nhaehnle, mehdi_amini, eraman, hiraditya, haicheng, dexonsmith, kerbowa, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D74162




More information about the All-commits mailing list