diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2020-07-31 21:22:58 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2020-07-31 21:22:58 +0000 |
commit | 5ffd83dbcc34f10e07f6d3e968ae6365869615f4 (patch) | |
tree | 0e9f5cf729dde39f949698fddef45a34e2bc7f44 /contrib/llvm-project/llvm/include/llvm/Transforms/Utils/Cloning.h | |
parent | 1799696096df87b52968b8996d00c91e0a5de8d9 (diff) | |
parent | cfca06d7963fa0909f90483b42a6d7d194d01e08 (diff) | |
download | src-5ffd83dbcc34f10e07f6d3e968ae6365869615f4.tar.gz src-5ffd83dbcc34f10e07f6d3e968ae6365869615f4.zip |
Notes
Diffstat (limited to 'contrib/llvm-project/llvm/include/llvm/Transforms/Utils/Cloning.h')
-rw-r--r-- | contrib/llvm-project/llvm/include/llvm/Transforms/Utils/Cloning.h | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/contrib/llvm-project/llvm/include/llvm/Transforms/Utils/Cloning.h b/contrib/llvm-project/llvm/include/llvm/Transforms/Utils/Cloning.h index 872ab9cab85c..dffb7801bc8e 100644 --- a/contrib/llvm-project/llvm/include/llvm/Transforms/Utils/Cloning.h +++ b/contrib/llvm-project/llvm/include/llvm/Transforms/Utils/Cloning.h @@ -19,10 +19,8 @@ #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/Twine.h" -#include "llvm/Analysis/AliasAnalysis.h" #include "llvm/Analysis/AssumptionCache.h" #include "llvm/Analysis/InlineCost.h" -#include "llvm/IR/CallSite.h" #include "llvm/IR/ValueHandle.h" #include "llvm/Transforms/Utils/ValueMapper.h" #include <functional> @@ -31,6 +29,7 @@ namespace llvm { +class AAResults; class AllocaInst; class BasicBlock; class BlockFrequencyInfo; @@ -172,19 +171,19 @@ void CloneAndPruneFunctionInto(Function *NewFunc, const Function *OldFunc, /// the auxiliary results produced by it. class InlineFunctionInfo { public: - explicit InlineFunctionInfo(CallGraph *cg = nullptr, - std::function<AssumptionCache &(Function &)> - *GetAssumptionCache = nullptr, - ProfileSummaryInfo *PSI = nullptr, - BlockFrequencyInfo *CallerBFI = nullptr, - BlockFrequencyInfo *CalleeBFI = nullptr) + explicit InlineFunctionInfo( + CallGraph *cg = nullptr, + function_ref<AssumptionCache &(Function &)> GetAssumptionCache = nullptr, + ProfileSummaryInfo *PSI = nullptr, + BlockFrequencyInfo *CallerBFI = nullptr, + BlockFrequencyInfo *CalleeBFI = nullptr) : CG(cg), GetAssumptionCache(GetAssumptionCache), PSI(PSI), CallerBFI(CallerBFI), CalleeBFI(CalleeBFI) {} /// If non-null, InlineFunction will update the callgraph to reflect the /// changes it makes. CallGraph *CG; - std::function<AssumptionCache &(Function &)> *GetAssumptionCache; + function_ref<AssumptionCache &(Function &)> GetAssumptionCache; ProfileSummaryInfo *PSI; BlockFrequencyInfo *CallerBFI, *CalleeBFI; @@ -201,7 +200,7 @@ public: /// 'InlineFunction' fills this in by scanning the inlined instructions, and /// only if CG is null. If CG is non-null, instead the value handle /// `InlinedCalls` above is used. - SmallVector<CallSite, 8> InlinedCallSites; + SmallVector<CallBase *, 8> InlinedCallSites; void reset() { StaticAllocas.clear(); @@ -229,10 +228,7 @@ public: /// and all varargs at the callsite will be passed to any calls to /// ForwardVarArgsTo. The caller of InlineFunction has to make sure any varargs /// are only used by ForwardVarArgsTo. -InlineResult InlineFunction(CallBase *CB, InlineFunctionInfo &IFI, - AAResults *CalleeAAR = nullptr, - bool InsertLifetime = true); -InlineResult InlineFunction(CallSite CS, InlineFunctionInfo &IFI, +InlineResult InlineFunction(CallBase &CB, InlineFunctionInfo &IFI, AAResults *CalleeAAR = nullptr, bool InsertLifetime = true, Function *ForwardVarArgsTo = nullptr); |