diff options
author | Easwaran Raman <eraman@google.com> | 2016-01-04 23:32:28 +0000 |
---|---|---|
committer | Easwaran Raman <eraman@google.com> | 2016-01-04 23:32:28 +0000 |
commit | eed30e5a81a5d40f3c1330a379b8fc8077315bd9 (patch) | |
tree | 541ddb546da579c7ef8678c02d5396f3d74af792 /clang/lib/CodeGen/CodeGenPGO.cpp | |
parent | c6021038f65a577ed255b624ada4c255726b8d0c (diff) | |
download | bcm5719-llvm-eed30e5a81a5d40f3c1330a379b8fc8077315bd9.tar.gz bcm5719-llvm-eed30e5a81a5d40f3c1330a379b8fc8077315bd9.zip |
Remove setting of inlinehint and cold attributes based on profile data
NFC. These hints are only used for inlining and the inliner now uses
the same criteria to identify hot and cold callees and set appropriate
thresholds without relying on these hints. Hence this removed code is
superfluous.
Differential Revision: http://reviews.llvm.org/D15726
llvm-svn: 256793
Diffstat (limited to 'clang/lib/CodeGen/CodeGenPGO.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenPGO.cpp | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/clang/lib/CodeGen/CodeGenPGO.cpp b/clang/lib/CodeGen/CodeGenPGO.cpp index 38774332f31..5ae861eab0d 100644 --- a/clang/lib/CodeGen/CodeGenPGO.cpp +++ b/clang/lib/CodeGen/CodeGenPGO.cpp @@ -721,17 +721,7 @@ CodeGenPGO::applyFunctionAttributes(llvm::IndexedInstrProfReader *PGOReader, if (!haveRegionCounts()) return; - uint64_t MaxFunctionCount = PGOReader->getMaximumFunctionCount(); uint64_t FunctionCount = getRegionCount(nullptr); - if (FunctionCount >= (uint64_t)(0.3 * (double)MaxFunctionCount)) - // Turn on InlineHint attribute for hot functions. - // FIXME: 30% is from preliminary tuning on SPEC, it may not be optimal. - Fn->addFnAttr(llvm::Attribute::InlineHint); - else if (FunctionCount <= (uint64_t)(0.01 * (double)MaxFunctionCount)) - // 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); } |