[llvm] r345246 - [llvm-exegesis] Add missing initializer.
Clement Courbet via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 25 01:11:35 PDT 2018
Author: courbet
Date: Thu Oct 25 01:11:35 2018
New Revision: 345246
URL: http://llvm.org/viewvc/llvm-project?rev=345246&view=rev
Log:
[llvm-exegesis] Add missing initializer.
This is a better fix than rL345245.
Modified:
llvm/trunk/tools/llvm-exegesis/lib/Target.cpp
llvm/trunk/tools/llvm-exegesis/lib/Target.h
Modified: llvm/trunk/tools/llvm-exegesis/lib/Target.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-exegesis/lib/Target.cpp?rev=345246&r1=345245&r2=345246&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-exegesis/lib/Target.cpp (original)
+++ llvm/trunk/tools/llvm-exegesis/lib/Target.cpp Thu Oct 25 01:11:35 2018
@@ -87,7 +87,7 @@ ExegesisTarget::createUopsBenchmarkRunne
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 {
Modified: llvm/trunk/tools/llvm-exegesis/lib/Target.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-exegesis/lib/Target.h?rev=345246&r1=345245&r2=345246&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-exegesis/lib/Target.h (original)
+++ llvm/trunk/tools/llvm-exegesis/lib/Target.h Thu Oct 25 01:11:35 2018
@@ -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;
}
More information about the llvm-commits
mailing list