[PATCH] D74162: [Inliner] Inlining should honor nobuiltin attributes
Teresa Johnson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 6 13:38:12 PST 2020
tejohnson created this revision.
tejohnson added reviewers: hfinkel, gchatelet, chandlerc, davidxl.
Herald added subscribers: kerbowa, dexonsmith, haicheng, hiraditya, eraman, mehdi_amini, nhaehnle, jvesely, arsenm.
Herald added a project: LLVM.
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 <https://reviews.llvm.org/D61634> for background.
The prior patch in this series (D67923 <https://reviews.llvm.org/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.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D74162
Files:
llvm/include/llvm/Analysis/InlineCost.h
llvm/include/llvm/Analysis/TargetLibraryInfo.h
llvm/include/llvm/Transforms/IPO/Inliner.h
llvm/lib/Analysis/InlineCost.cpp
llvm/lib/Target/AMDGPU/AMDGPUInline.cpp
llvm/lib/Transforms/IPO/InlineSimple.cpp
llvm/lib/Transforms/IPO/Inliner.cpp
llvm/lib/Transforms/IPO/PartialInlining.cpp
llvm/lib/Transforms/IPO/SampleProfile.cpp
llvm/test/Transforms/Inline/X86/inline-no-builtin-compatible.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D74162.242994.patch
Type: text/x-patch
Size: 20768 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200206/d301b30d/attachment.bin>
More information about the llvm-commits
mailing list