forked from OSchip/llvm-project
[ProfData] Remove global constructor from ProfileSummaryBuilder.
No functionality change intended. llvm-svn: 271021
This commit is contained in:
parent
34a7a945b0
commit
10049250c5
|
@ -63,7 +63,7 @@ protected:
|
|||
|
||||
public:
|
||||
/// \brief A vector of useful cutoff values for detailed summary.
|
||||
static const std::vector<uint32_t> DefaultCutoffs;
|
||||
static const ArrayRef<uint32_t> DefaultCutoffs;
|
||||
};
|
||||
|
||||
class InstrProfSummaryBuilder final : public ProfileSummaryBuilder {
|
||||
|
@ -73,7 +73,7 @@ class InstrProfSummaryBuilder final : public ProfileSummaryBuilder {
|
|||
|
||||
public:
|
||||
InstrProfSummaryBuilder(std::vector<uint32_t> Cutoffs)
|
||||
: ProfileSummaryBuilder(Cutoffs), MaxInternalBlockCount(0) {}
|
||||
: ProfileSummaryBuilder(std::move(Cutoffs)), MaxInternalBlockCount(0) {}
|
||||
void addRecord(const InstrProfRecord &);
|
||||
std::unique_ptr<ProfileSummary> getSummary();
|
||||
};
|
||||
|
@ -83,7 +83,7 @@ class SampleProfileSummaryBuilder final : public ProfileSummaryBuilder {
|
|||
public:
|
||||
void addRecord(const sampleprof::FunctionSamples &FS);
|
||||
SampleProfileSummaryBuilder(std::vector<uint32_t> Cutoffs)
|
||||
: ProfileSummaryBuilder(Cutoffs) {}
|
||||
: ProfileSummaryBuilder(std::move(Cutoffs)) {}
|
||||
std::unique_ptr<ProfileSummary> getSummary();
|
||||
};
|
||||
|
||||
|
|
|
@ -25,11 +25,13 @@ using namespace llvm;
|
|||
|
||||
// A set of cutoff values. Each value, when divided by ProfileSummary::Scale
|
||||
// (which is 1000000) is a desired percentile of total counts.
|
||||
const std::vector<uint32_t> ProfileSummaryBuilder::DefaultCutoffs(
|
||||
{10000, /* 1% */
|
||||
100000, /* 10% */
|
||||
200000, 300000, 400000, 500000, 600000, 500000, 600000, 700000, 800000,
|
||||
900000, 950000, 990000, 999000, 999900, 999990, 999999});
|
||||
static const uint32_t DefaultCutoffsData[] = {
|
||||
10000, /* 1% */
|
||||
100000, /* 10% */
|
||||
200000, 300000, 400000, 500000, 600000, 500000, 600000, 700000,
|
||||
800000, 900000, 950000, 990000, 999000, 999900, 999990, 999999};
|
||||
const ArrayRef<uint32_t> ProfileSummaryBuilder::DefaultCutoffs =
|
||||
DefaultCutoffsData;
|
||||
|
||||
void InstrProfSummaryBuilder::addRecord(const InstrProfRecord &R) {
|
||||
// The first counter is not necessarily an entry count for IR
|
||||
|
|
Loading…
Reference in New Issue