diff options
author | Easwaran Raman <eraman@google.com> | 2016-05-10 23:26:04 +0000 |
---|---|---|
committer | Easwaran Raman <eraman@google.com> | 2016-05-10 23:26:04 +0000 |
commit | 9b792923d0188c73e9612eb1d964414ae1e139c5 (patch) | |
tree | 17489c24048653fe1bd79c712735fcc4b97093b5 /llvm/lib/ProfileData | |
parent | b76e5d948a74edfb0c50efd3d4d419787a830d03 (diff) | |
download | bcm5719-llvm-9b792923d0188c73e9612eb1d964414ae1e139c5.tar.gz bcm5719-llvm-9b792923d0188c73e9612eb1d964414ae1e139c5.zip |
Revert r269131
llvm-svn: 269138
Diffstat (limited to 'llvm/lib/ProfileData')
-rw-r--r-- | llvm/lib/ProfileData/ProfileSummary.cpp | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/llvm/lib/ProfileData/ProfileSummary.cpp b/llvm/lib/ProfileData/ProfileSummary.cpp index 4e94138f0bf..dfe44e32bbe 100644 --- a/llvm/lib/ProfileData/ProfileSummary.cpp +++ b/llvm/lib/ProfileData/ProfileSummary.cpp @@ -15,7 +15,6 @@ #include "llvm/IR/Constants.h" #include "llvm/IR/Function.h" #include "llvm/IR/Metadata.h" -#include "llvm/IR/Module.h" #include "llvm/IR/Type.h" #include "llvm/ProfileData/InstrProf.h" #include "llvm/ProfileData/ProfileCommon.h" @@ -33,10 +32,6 @@ const std::vector<uint32_t> ProfileSummary::DefaultCutoffs( 900000, 950000, 990000, 999000, 999900, 999990, 999999}); const char *ProfileSummary::KindStr[2] = {"InstrProf", "SampleProfile"}; -ManagedStatic<std::pair<Module *, std::unique_ptr<ProfileSummary>>> - ProfileSummary::CachedSummary; -ManagedStatic<sys::SmartMutex<true>> ProfileSummary::CacheMutex; - void InstrProfSummary::addRecord(const InstrProfRecord &R) { // The first counter is not necessarily an entry count for IR // instrumentation profiles. @@ -91,39 +86,6 @@ void ProfileSummary::computeDetailedSummary() { } } -bool ProfileSummary::operator==(ProfileSummary &Other) { - if (getKind() != Other.getKind()) - return false; - if (TotalCount != Other.TotalCount) - return false; - if (MaxCount != Other.MaxCount) - return false; - if (MaxFunctionCount != Other.MaxFunctionCount) - return false; - if (NumFunctions != Other.NumFunctions) - return false; - if (NumCounts != Other.NumCounts) - return false; - std::vector<ProfileSummaryEntry> DS1 = getDetailedSummary(); - std::vector<ProfileSummaryEntry> DS2 = Other.getDetailedSummary(); - auto CompareSummaryEntry = [](ProfileSummaryEntry &E1, - ProfileSummaryEntry &E2) { - return E1.Cutoff == E2.Cutoff && E1.MinCount == E2.MinCount && - E1.NumCounts == E2.NumCounts; - }; - if (!std::equal(DS1.begin(), DS1.end(), DS2.begin(), CompareSummaryEntry)) - return false; - return true; -} - -bool InstrProfSummary::operator==(ProfileSummary &Other) { - InstrProfSummary *OtherIPS = dyn_cast<InstrProfSummary>(&Other); - if (!OtherIPS) - return false; - return MaxInternalBlockCount == OtherIPS->MaxInternalBlockCount && - ProfileSummary::operator==(Other); -} - // 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. @@ -404,9 +366,3 @@ ProfileSummary *ProfileSummary::getFromMD(Metadata *MD) { else return nullptr; } - -ProfileSummary *ProfileSummary::computeProfileSummary(Module *M) { - if (Metadata *MD = M->getProfileSummary()) - return getFromMD(MD); - return nullptr; -} |