summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2016-02-23 02:28:40 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2016-02-23 02:28:40 +0000
commitb3613fce19b0fd154d38b044196357afdc335f8d (patch)
treedc9f0db960338b827777b42e5a14238e4782ebcb /llvm/lib
parent4e796d0c9f404d080548665857f9c569534b239a (diff)
downloadbcm5719-llvm-b3613fce19b0fd154d38b044196357afdc335f8d.tar.gz
bcm5719-llvm-b3613fce19b0fd154d38b044196357afdc335f8d.zip
Revert "Add prefix based function layout when profile is available."
This reverts commit r261582, since this bot has been broken for four hours: http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA-incremental_check/19399/ llvm-svn: 261604
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp16
-rw-r--r--llvm/lib/ProfileData/ProfileSummary.cpp21
2 files changed, 0 insertions, 37 deletions
diff --git a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
index 4229741cf5a..6756e9df384 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,
@@ -302,16 +296,6 @@ selectELFSectionForGlobal(MCContext &Ctx, const GlobalValue *GV,
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();
- }
- }
- }
-
if (EmitUniqueSection && UniqueSectionNames) {
Name.push_back('.');
TM.getNameWithPrefix(Name, GV, Mang, true);
diff --git a/llvm/lib/ProfileData/ProfileSummary.cpp b/llvm/lib/ProfileData/ProfileSummary.cpp
index 0363fbfe42d..0e2c43e5e91 100644
--- a/llvm/lib/ProfileData/ProfileSummary.cpp
+++ b/llvm/lib/ProfileData/ProfileSummary.cpp
@@ -11,9 +11,6 @@
//
//===----------------------------------------------------------------------===//
-#include "llvm/IR/Attributes.h"
-#include "llvm/IR/Function.h"
-#include "llvm/IR/Module.h"
#include "llvm/ProfileData/InstrProf.h"
#include "llvm/ProfileData/ProfileCommon.h"
#include "llvm/ProfileData/SampleProf.h"
@@ -78,24 +75,6 @@ void ProfileSummary::computeDetailedSummary() {
}
}
-// Returns true if the function is a hot function.
-bool ProfileSummary::isFunctionHot(const Function *F) {
- // FIXME: update when summary data is stored in module's metadata.
- return false;
-}
-
-// Returns true if the function is a cold function.
-bool ProfileSummary::isFunctionUnlikely(const Function *F) {
- if (F->hasFnAttribute(Attribute::Cold)) {
- return true;
- }
- if (!F->getEntryCount()) {
- return false;
- }
- // FIXME: update when summary data is stored in module's metadata.
- return (*F->getEntryCount()) == 0;
-}
-
InstrProfSummary::InstrProfSummary(const IndexedInstrProf::Summary &S)
: ProfileSummary(), MaxInternalBlockCount(S.get(
IndexedInstrProf::Summary::MaxInternalBlockCount)),
OpenPOWER on IntegriCloud