diff options
| author | Diego Novillo <dnovillo@google.com> | 2015-05-27 21:58:42 +0000 |
|---|---|---|
| committer | Diego Novillo <dnovillo@google.com> | 2015-05-27 21:58:42 +0000 |
| commit | aa8b1cb8a4949501c0c9a098cf07eb62b0a85c05 (patch) | |
| tree | 184db68d15ae334e0defd6be4c5dfdaba2823e5b /clang/lib/CodeGen/CodeGenPGO.cpp | |
| parent | ff18927c5828896ee9a511c46e6b9acef8ab37e3 (diff) | |
| download | bcm5719-llvm-aa8b1cb8a4949501c0c9a098cf07eb62b0a85c05.tar.gz bcm5719-llvm-aa8b1cb8a4949501c0c9a098cf07eb62b0a85c05.zip | |
Set function entry counts with -fprofile-instr-use.
This generates function entry counts from instrumentation profiles.
llvm-svn: 238360
Diffstat (limited to 'clang/lib/CodeGen/CodeGenPGO.cpp')
| -rw-r--r-- | clang/lib/CodeGen/CodeGenPGO.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CodeGenPGO.cpp b/clang/lib/CodeGen/CodeGenPGO.cpp index c97244328d3..f182a469b3a 100644 --- a/clang/lib/CodeGen/CodeGenPGO.cpp +++ b/clang/lib/CodeGen/CodeGenPGO.cpp @@ -773,6 +773,8 @@ CodeGenPGO::applyFunctionAttributes(llvm::IndexedInstrProfReader *PGOReader, // Turn on Cold attribute for cold functions. // FIXME: 1% is from preliminary tuning on SPEC, it may not be optimal. Fn->addFnAttr(llvm::Attribute::Cold); + + Fn->setEntryCount(FunctionCount); } void CodeGenPGO::emitCounterIncrement(CGBuilderTy &Builder, const Stmt *S) { |

