diff options
author | Easwaran Raman <eraman@google.com> | 2016-05-16 23:59:04 +0000 |
---|---|---|
committer | Easwaran Raman <eraman@google.com> | 2016-05-16 23:59:04 +0000 |
commit | 01d98ba0b22bfb152a3db85cac7fcb23d9cb5c85 (patch) | |
tree | 8bd42953eedde2f8f4fa2c3510fc3dbde7cc85c7 /llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp | |
parent | 687ca8df18a3d2bac411cc29fd1abcbd281ddf54 (diff) | |
download | bcm5719-llvm-01d98ba0b22bfb152a3db85cac7fcb23d9cb5c85.tar.gz bcm5719-llvm-01d98ba0b22bfb152a3db85cac7fcb23d9cb5c85.zip |
Remove .hot and .unlikely prefixes from function section names.
This code currently relies on static methods in ProfileSummary to determine whether a function is hot or unlikley. I am refactoring the ProfileSummary code and these methods will be removed. As discussed offline, the right way to re-introduce this is to add a pass to annotate functions with unlikely/hot hints and use the hints to determine the prefix here.
llvm-svn: 269726
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp')
-rw-r--r-- | llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp index bcede80b236..6664fb366ca 100644 --- a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp +++ b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp @@ -34,7 +34,6 @@ #include "llvm/MC/MCSymbolELF.h" #include "llvm/MC/MCValue.h" #include "llvm/ProfileData/InstrProf.h" -#include "llvm/ProfileData/ProfileCommon.h" #include "llvm/Support/COFF.h" #include "llvm/Support/Dwarf.h" #include "llvm/Support/ELF.h" @@ -245,11 +244,6 @@ static StringRef getSectionPrefixForGlobal(SectionKind Kind) { return ".data.rel.ro"; } -static cl::opt<bool> GroupFunctionsByHotness( - "group-functions-by-hotness", - llvm::cl::desc("Partition hot/cold functions by sections prefix"), - cl::init(false)); - static MCSectionELF * selectELFSectionForGlobal(MCContext &Ctx, const GlobalValue *GV, SectionKind Kind, Mangler &Mang, @@ -301,16 +295,8 @@ selectELFSectionForGlobal(MCContext &Ctx, const GlobalValue *GV, } else { Name = getSectionPrefixForGlobal(Kind); } - - if (GroupFunctionsByHotness) { - if (const Function *F = dyn_cast<Function>(GV)) { - if (ProfileSummary::isFunctionHot(F)) { - Name += getHotSectionPrefix(); - } else if (ProfileSummary::isFunctionUnlikely(F)) { - Name += getUnlikelySectionPrefix(); - } - } - } + // FIXME: Extend the section prefix to include hotness catagories such as .hot + // or .unlikely for functions. if (EmitUniqueSection && UniqueSectionNames) { Name.push_back('.'); |