1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00

[llvm-exegesis] Add missing initializer.

This is a better fix than rL345245.

llvm-svn: 345246
This commit is contained in:
Clement Courbet 2018-10-25 08:11:35 +00:00
parent 1254a557a0
commit 7cebc3fa8d
2 changed files with 9 additions and 9 deletions

View File

@ -87,7 +87,7 @@ ExegesisTarget::createUopsBenchmarkRunner(const LLVMState &State) const {
static_assert(std::is_pod<PfmCountersInfo>::value,
"We shouldn't have dynamic initialization here");
const PfmCountersInfo PfmCountersInfo::Default = {nullptr, nullptr, nullptr};
const PfmCountersInfo PfmCountersInfo::Default = {nullptr, nullptr, nullptr, 0u};
const PfmCountersInfo &
ExegesisTarget::getPfmCounters(llvm::StringRef CpuName) const {

View File

@ -34,29 +34,29 @@ namespace exegesis {
struct PfmCountersInfo {
// An optional name of a performance counter that can be used to measure
// cycles.
const char * CycleCounter;
const char *const CycleCounter;
// An optional name of a performance counter that can be used to measure
// uops.
const char * UopsCounter;
const char *const UopsCounter;
// An IssueCounter specifies how to measure uops issued to specific proc
// resources.
struct IssueCounter {
const char * Counter;
const char *const Counter;
// The name of the ProcResource that this counter measures.
const char * ProcResName;
const char *const ProcResName;
};
// An optional list of IssueCounters.
const IssueCounter * IssueCounters;
unsigned NumIssueCounters;
const IssueCounter *const IssueCounters;
const unsigned NumIssueCounters;
static const PfmCountersInfo Default;
};
struct CpuAndPfmCounters {
const char * CpuName;
const PfmCountersInfo * PCI;
const char *const CpuName;
const PfmCountersInfo *const PCI;
bool operator<(llvm::StringRef S) const {
return llvm::StringRef(CpuName) < S;
}