From 798321d8eb5630cd4a8f490a4f25e32ef195fb07 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Tue, 9 Jun 2015 19:08:19 +0000 Subject: Vendor import of clang trunk r239412: https://llvm.org/svn/llvm-project/cfe/trunk@239412 --- lib/CodeGen/CodeGenPGO.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/CodeGen/CodeGenPGO.cpp') diff --git a/lib/CodeGen/CodeGenPGO.cpp b/lib/CodeGen/CodeGenPGO.cpp index c97244328d37..f182a469b3a4 100644 --- a/lib/CodeGen/CodeGenPGO.cpp +++ b/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) { -- cgit v1.3