diff options
author | Teresa Johnson <tejohnson@google.com> | 2017-05-09 01:43:24 +0000 |
---|---|---|
committer | Teresa Johnson <tejohnson@google.com> | 2017-05-09 01:43:24 +0000 |
commit | 720d9b4111443ecfa4adc2de6cfb9d9750b05e78 (patch) | |
tree | ad457747a0e6f8ae935ffb5be379bed8136c5622 /llvm/lib/CodeGen/CodeGenPrepare.cpp | |
parent | 9cd629a251e8383cd03e6ca07ede4d05747948ad (diff) | |
download | bcm5719-llvm-720d9b4111443ecfa4adc2de6cfb9d9750b05e78.tar.gz bcm5719-llvm-720d9b4111443ecfa4adc2de6cfb9d9750b05e78.zip |
Fix code section prefix for proper layout
Summary:
r284533 added hot and cold section prefixes based on profile
information, to enable grouping of hot/cold functions at link time.
However, it used "cold" as the prefix for cold sections, but gold only
recognizes "unlikely" (which is used by gcc for cold sections).
Therefore, cold sections were not properly being grouped. Switch to
using "unlikely"
Reviewers: danielcdh, davidxl
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D32983
llvm-svn: 302502
Diffstat (limited to 'llvm/lib/CodeGen/CodeGenPrepare.cpp')
-rw-r--r-- | llvm/lib/CodeGen/CodeGenPrepare.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/CodeGenPrepare.cpp b/llvm/lib/CodeGen/CodeGenPrepare.cpp index c6c93811a0f..5651db8ed95 100644 --- a/llvm/lib/CodeGen/CodeGenPrepare.cpp +++ b/llvm/lib/CodeGen/CodeGenPrepare.cpp @@ -295,7 +295,7 @@ bool CodeGenPrepare::runOnFunction(Function &F) { if (PSI->isFunctionHotInCallGraph(&F)) F.setSectionPrefix(".hot"); else if (PSI->isFunctionColdInCallGraph(&F)) - F.setSectionPrefix(".cold"); + F.setSectionPrefix(".unlikely"); } /// This optimization identifies DIV instructions that can be |