[llvm][NFC] Cleanup uses of std::function in Inlining-related APIs
authorMircea Trofin <mtrofin@google.com>
Thu, 14 May 2020 00:40:07 +0000 (17:40 -0700)
committerMircea Trofin <mtrofin@google.com>
Fri, 15 May 2020 05:13:53 +0000 (22:13 -0700)
commit767db5be67cab5aa04d81227725765cad9620611
tree5219e191b655a7f9357bd30bebebba5be2158b8e
parent0b3e478b10e233460073d24df527253ab5edac2a
[llvm][NFC] Cleanup uses of std::function in Inlining-related APIs

Summary:
Replacing uses of std::function pointers or refs, or Optional, to
function_ref, since the usage pattern allows that. If the function is
optional, using a default parameter value (nullptr). This led to a few
parameter reshufles, to push all optionals to the end of the parameter
list.

Reviewers: davidxl, dblaikie

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

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D79917
llvm/include/llvm/Analysis/InlineCost.h
llvm/include/llvm/Transforms/Utils/Cloning.h
llvm/lib/Analysis/InlineAdvisor.cpp
llvm/lib/Analysis/InlineCost.cpp
llvm/lib/Target/AMDGPU/AMDGPUInline.cpp
llvm/lib/Transforms/IPO/AlwaysInliner.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/lib/Transforms/Utils/InlineFunction.cpp