diff options
author | Easwaran Raman <eraman@google.com> | 2016-03-03 18:26:33 +0000 |
---|---|---|
committer | Easwaran Raman <eraman@google.com> | 2016-03-03 18:26:33 +0000 |
commit | 3035719c86812d83e0bf9320ba5153a219f4635c (patch) | |
tree | dfe3444c2a1d041a5841fa8642cb5d76f76b4166 /llvm/lib/Transforms/Utils/InlineFunction.cpp | |
parent | abcee45b7ad3a07359ac92cc2954f4ef489367ae (diff) | |
download | bcm5719-llvm-3035719c86812d83e0bf9320ba5153a219f4635c.tar.gz bcm5719-llvm-3035719c86812d83e0bf9320ba5153a219f4635c.zip |
Infrastructure for PGO enhancements in inliner
This patch provides the following infrastructure for PGO enhancements in inliner:
Enable the use of block level profile information in inliner
Incremental update of block frequency information during inlining
Update the function entry counts of callees when they get inlined into callers.
Differential Revision: http://reviews.llvm.org/D16381
llvm-svn: 262636
Diffstat (limited to 'llvm/lib/Transforms/Utils/InlineFunction.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/InlineFunction.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Utils/InlineFunction.cpp b/llvm/lib/Transforms/Utils/InlineFunction.cpp index 491b18e6fc7..923e5b231c4 100644 --- a/llvm/lib/Transforms/Utils/InlineFunction.cpp +++ b/llvm/lib/Transforms/Utils/InlineFunction.cpp @@ -1319,7 +1319,7 @@ bool llvm::InlineFunction(CallSite CS, InlineFunctionInfo &IFI, // If IFI has any state in it, zap it before we fill it in. IFI.reset(); - + const Function *CalledFunc = CS.getCalledFunction(); if (!CalledFunc || // Can't inline external function or indirect CalledFunc->isDeclaration() || // call, or call to a vararg function! @@ -1486,7 +1486,7 @@ bool llvm::InlineFunction(CallSite CS, InlineFunctionInfo &IFI, // happy with whatever the cloner can do. CloneAndPruneFunctionInto(Caller, CalledFunc, VMap, /*ModuleLevelChanges=*/false, Returns, ".i", - &InlinedFunctionInfo, TheCall); + &InlinedFunctionInfo, TheCall, IFI.Ftor); // Remember the first block that is newly cloned over. FirstNewBlock = LastBlock; ++FirstNewBlock; |