diff options
Diffstat (limited to 'llvm/tools/llvm-exegesis')
| -rw-r--r-- | llvm/tools/llvm-exegesis/lib/AArch64/Target.cpp | 2 | ||||
| -rw-r--r-- | llvm/tools/llvm-exegesis/lib/Analysis.cpp | 2 | ||||
| -rw-r--r-- | llvm/tools/llvm-exegesis/lib/Assembler.cpp | 4 | ||||
| -rw-r--r-- | llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp | 12 | ||||
| -rw-r--r-- | llvm/tools/llvm-exegesis/lib/BenchmarkRunner.cpp | 4 | ||||
| -rw-r--r-- | llvm/tools/llvm-exegesis/lib/BenchmarkRunner.h | 4 | ||||
| -rw-r--r-- | llvm/tools/llvm-exegesis/lib/Clustering.h | 8 | ||||
| -rw-r--r-- | llvm/tools/llvm-exegesis/lib/Error.h | 2 | ||||
| -rw-r--r-- | llvm/tools/llvm-exegesis/lib/ParallelSnippetGenerator.cpp | 2 | ||||
| -rw-r--r-- | llvm/tools/llvm-exegesis/lib/ParallelSnippetGenerator.h | 2 | ||||
| -rw-r--r-- | llvm/tools/llvm-exegesis/lib/SnippetRepetitor.cpp | 2 | ||||
| -rw-r--r-- | llvm/tools/llvm-exegesis/lib/SubprocessMemory.h | 4 | ||||
| -rw-r--r-- | llvm/tools/llvm-exegesis/lib/Target.cpp | 4 | ||||
| -rw-r--r-- | llvm/tools/llvm-exegesis/lib/UopsBenchmarkRunner.h | 2 | ||||
| -rw-r--r-- | llvm/tools/llvm-exegesis/lib/X86/Target.cpp | 14 |
15 files changed, 33 insertions, 35 deletions
diff --git a/llvm/tools/llvm-exegesis/lib/AArch64/Target.cpp b/llvm/tools/llvm-exegesis/lib/AArch64/Target.cpp index 2c13dd5..0e73ada 100644 --- a/llvm/tools/llvm-exegesis/lib/AArch64/Target.cpp +++ b/llvm/tools/llvm-exegesis/lib/AArch64/Target.cpp @@ -112,7 +112,7 @@ namespace { // Use X19 as the loop counter register since it's a callee-saved register // that's available for temporary use. -constexpr const MCPhysReg kDefaultLoopCounterReg = AArch64::X19; +constexpr MCPhysReg kDefaultLoopCounterReg = AArch64::X19; class ExegesisAArch64Target : public ExegesisTarget { public: diff --git a/llvm/tools/llvm-exegesis/lib/Analysis.cpp b/llvm/tools/llvm-exegesis/lib/Analysis.cpp index fb84328..f3bf9690 100644 --- a/llvm/tools/llvm-exegesis/lib/Analysis.cpp +++ b/llvm/tools/llvm-exegesis/lib/Analysis.cpp @@ -446,7 +446,7 @@ void Analysis::printClusterRawHtml(const BenchmarkClustering::ClusterId &Id, } // namespace exegesis -static constexpr const char kHtmlHead[] = R"( +static constexpr char kHtmlHead[] = R"( <head> <title>llvm-exegesis Analysis Results</title> <style> diff --git a/llvm/tools/llvm-exegesis/lib/Assembler.cpp b/llvm/tools/llvm-exegesis/lib/Assembler.cpp index fd7924d..163f141 100644 --- a/llvm/tools/llvm-exegesis/lib/Assembler.cpp +++ b/llvm/tools/llvm-exegesis/lib/Assembler.cpp @@ -44,8 +44,8 @@ namespace llvm { namespace exegesis { -static constexpr const char ModuleID[] = "ExegesisInfoTest"; -static constexpr const char FunctionID[] = "foo"; +static constexpr char ModuleID[] = "ExegesisInfoTest"; +static constexpr char FunctionID[] = "foo"; static const Align kFunctionAlignment(4096); // Fills the given basic block with register setup code, and returns true if diff --git a/llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp b/llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp index 1823a53..c6164b6 100644 --- a/llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp +++ b/llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp @@ -21,9 +21,9 @@ #include "llvm/Support/Format.h" #include "llvm/Support/raw_ostream.h" -static constexpr const char kIntegerPrefix[] = "i_0x"; -static constexpr const char kDoublePrefix[] = "f_"; -static constexpr const char kInvalidOperand[] = "INVALID"; +static constexpr char kIntegerPrefix[] = "i_0x"; +static constexpr char kDoublePrefix[] = "f_"; +static constexpr char kInvalidOperand[] = "INVALID"; namespace llvm { @@ -202,7 +202,7 @@ struct CustomMappingTraits<std::map<exegesis::ValidationEvent, int64_t>> { Io.setError("Key is not a valid validation event"); return; } - Io.mapRequired(KeyStr.str().c_str(), VI[*Key]); + Io.mapRequired(KeyStr, VI[*Key]); } static void output(IO &Io, std::map<exegesis::ValidationEvent, int64_t> &VI) { @@ -245,8 +245,8 @@ template <> struct SequenceElementTraits<exegesis::RegisterValue> { }; template <> struct ScalarTraits<exegesis::RegisterValue> { - static constexpr const unsigned kRadix = 16; - static constexpr const bool kSigned = false; + static constexpr unsigned kRadix = 16; + static constexpr bool kSigned = false; static void output(const exegesis::RegisterValue &RV, void *Ctx, raw_ostream &Out) { diff --git a/llvm/tools/llvm-exegesis/lib/BenchmarkRunner.cpp b/llvm/tools/llvm-exegesis/lib/BenchmarkRunner.cpp index 1fd0a15..12fad7d 100644 --- a/llvm/tools/llvm-exegesis/lib/BenchmarkRunner.cpp +++ b/llvm/tools/llvm-exegesis/lib/BenchmarkRunner.cpp @@ -155,7 +155,7 @@ private: #ifdef LLVM_ON_UNIX // See "Exit Status for Commands": // https://pubs.opengroup.org/onlinepubs/9699919799/xrat/V4_xcu_chap02.html - constexpr const int kSigOffset = 128; + constexpr int kSigOffset = 128; return make_error<SnippetSignal>(CRC.RetCode - kSigOffset); #else // The exit code of the process on windows is not meaningful as a @@ -877,7 +877,7 @@ Error BenchmarkRunner::getValidationCountersToRun( return Error::success(); } -BenchmarkRunner::FunctionExecutor::~FunctionExecutor() {} +BenchmarkRunner::FunctionExecutor::~FunctionExecutor() = default; } // namespace exegesis } // namespace llvm diff --git a/llvm/tools/llvm-exegesis/lib/BenchmarkRunner.h b/llvm/tools/llvm-exegesis/lib/BenchmarkRunner.h index e688b81..16d3c9c 100644 --- a/llvm/tools/llvm-exegesis/lib/BenchmarkRunner.h +++ b/llvm/tools/llvm-exegesis/lib/BenchmarkRunner.h @@ -73,8 +73,8 @@ public: // Scratch space to run instructions that touch memory. struct ScratchSpace { - static constexpr const size_t kAlignment = 1024; - static constexpr const size_t kSize = 1 << 20; // 1MB. + static constexpr size_t kAlignment = 1024; + static constexpr size_t kSize = 1 << 20; // 1MB. ScratchSpace() : UnalignedPtr(std::make_unique<char[]>(kSize + kAlignment)), AlignedPtr( diff --git a/llvm/tools/llvm-exegesis/lib/Clustering.h b/llvm/tools/llvm-exegesis/lib/Clustering.h index 9d6c110..2b0f5b4 100644 --- a/llvm/tools/llvm-exegesis/lib/Clustering.h +++ b/llvm/tools/llvm-exegesis/lib/Clustering.h @@ -67,11 +67,11 @@ public: ClusterId(size_t Id, bool IsUnstable = false) : Id_(Id), IsUnstable_(IsUnstable) {} - static constexpr const size_t kMaxValid = + static constexpr size_t kMaxValid = (std::numeric_limits<size_t>::max() >> 1) - 4; - static constexpr const size_t kNoise = kMaxValid + 1; - static constexpr const size_t kError = kMaxValid + 2; - static constexpr const size_t kUndef = kMaxValid + 3; + static constexpr size_t kNoise = kMaxValid + 1; + static constexpr size_t kError = kMaxValid + 2; + static constexpr size_t kUndef = kMaxValid + 3; size_t Id_ : (std::numeric_limits<size_t>::digits - 1); size_t IsUnstable_ : 1; diff --git a/llvm/tools/llvm-exegesis/lib/Error.h b/llvm/tools/llvm-exegesis/lib/Error.h index 9b71fe8..c899023 100644 --- a/llvm/tools/llvm-exegesis/lib/Error.h +++ b/llvm/tools/llvm-exegesis/lib/Error.h @@ -81,7 +81,7 @@ private: struct PerfCounterNotFullyEnabled : public ErrorInfo<PerfCounterNotFullyEnabled> { static char ID; - PerfCounterNotFullyEnabled() {} + PerfCounterNotFullyEnabled() = default; void log(raw_ostream &OS) const override; diff --git a/llvm/tools/llvm-exegesis/lib/ParallelSnippetGenerator.cpp b/llvm/tools/llvm-exegesis/lib/ParallelSnippetGenerator.cpp index 79a585e..aa40913 100644 --- a/llvm/tools/llvm-exegesis/lib/ParallelSnippetGenerator.cpp +++ b/llvm/tools/llvm-exegesis/lib/ParallelSnippetGenerator.cpp @@ -350,7 +350,5 @@ ParallelSnippetGenerator::generateCodeTemplates( return Result; } -constexpr const size_t ParallelSnippetGenerator::kMinNumDifferentAddresses; - } // namespace exegesis } // namespace llvm diff --git a/llvm/tools/llvm-exegesis/lib/ParallelSnippetGenerator.h b/llvm/tools/llvm-exegesis/lib/ParallelSnippetGenerator.h index 8a6b856..d3c85c0 100644 --- a/llvm/tools/llvm-exegesis/lib/ParallelSnippetGenerator.h +++ b/llvm/tools/llvm-exegesis/lib/ParallelSnippetGenerator.h @@ -28,7 +28,7 @@ public: generateCodeTemplates(InstructionTemplate Variant, const BitVector &ForbiddenRegisters) const override; - static constexpr const size_t kMinNumDifferentAddresses = 6; + static constexpr size_t kMinNumDifferentAddresses = 6; private: // Instantiates memory operands within a snippet. diff --git a/llvm/tools/llvm-exegesis/lib/SnippetRepetitor.cpp b/llvm/tools/llvm-exegesis/lib/SnippetRepetitor.cpp index 80f5ce4..37dcc7c 100644 --- a/llvm/tools/llvm-exegesis/lib/SnippetRepetitor.cpp +++ b/llvm/tools/llvm-exegesis/lib/SnippetRepetitor.cpp @@ -131,7 +131,7 @@ private: } // namespace -SnippetRepetitor::~SnippetRepetitor() {} +SnippetRepetitor::~SnippetRepetitor() = default; std::unique_ptr<const SnippetRepetitor> SnippetRepetitor::Create(Benchmark::RepetitionModeE Mode, diff --git a/llvm/tools/llvm-exegesis/lib/SubprocessMemory.h b/llvm/tools/llvm-exegesis/lib/SubprocessMemory.h index 572d108..52ee980 100644 --- a/llvm/tools/llvm-exegesis/lib/SubprocessMemory.h +++ b/llvm/tools/llvm-exegesis/lib/SubprocessMemory.h @@ -32,8 +32,8 @@ namespace exegesis { class SubprocessMemory { public: - static constexpr const size_t AuxiliaryMemoryOffset = 1; - static constexpr const size_t AuxiliaryMemorySize = 4096; + static constexpr size_t AuxiliaryMemoryOffset = 1; + static constexpr size_t AuxiliaryMemorySize = 4096; // Gets the thread ID for the calling thread. static long getCurrentTID(); diff --git a/llvm/tools/llvm-exegesis/lib/Target.cpp b/llvm/tools/llvm-exegesis/lib/Target.cpp index fc5f82f..2ad6c5a 100644 --- a/llvm/tools/llvm-exegesis/lib/Target.cpp +++ b/llvm/tools/llvm-exegesis/lib/Target.cpp @@ -23,7 +23,7 @@ cl::OptionCategory Options("llvm-exegesis options"); cl::OptionCategory BenchmarkOptions("llvm-exegesis benchmark options"); cl::OptionCategory AnalysisOptions("llvm-exegesis analysis options"); -ExegesisTarget::~ExegesisTarget() {} // anchor. +ExegesisTarget::~ExegesisTarget() = default; // anchor. static ExegesisTarget *FirstTarget = nullptr; @@ -215,7 +215,7 @@ const PfmCountersInfo &ExegesisTarget::getDummyPfmCounters() const { return PfmCountersInfo::Dummy; } -ExegesisTarget::SavedState::~SavedState() {} // anchor. +ExegesisTarget::SavedState::~SavedState() = default; // anchor. namespace { diff --git a/llvm/tools/llvm-exegesis/lib/UopsBenchmarkRunner.h b/llvm/tools/llvm-exegesis/lib/UopsBenchmarkRunner.h index ef47b7f..74a18da 100644 --- a/llvm/tools/llvm-exegesis/lib/UopsBenchmarkRunner.h +++ b/llvm/tools/llvm-exegesis/lib/UopsBenchmarkRunner.h @@ -30,7 +30,7 @@ public: ExecutionMode, ValCounters) {} ~UopsBenchmarkRunner() override; - static constexpr const size_t kMinNumDifferentAddresses = 6; + static constexpr size_t kMinNumDifferentAddresses = 6; private: Expected<std::vector<BenchmarkMeasure>> diff --git a/llvm/tools/llvm-exegesis/lib/X86/Target.cpp b/llvm/tools/llvm-exegesis/lib/X86/Target.cpp index b4437f7..6dc64765 100644 --- a/llvm/tools/llvm-exegesis/lib/X86/Target.cpp +++ b/llvm/tools/llvm-exegesis/lib/X86/Target.cpp @@ -278,9 +278,9 @@ static Expected<std::vector<CodeTemplate>> generateLEATemplatesCommon( assert(X86II::getMemoryOperandNo(Instr.Description.TSFlags) == 1 && "invalid LEA"); - constexpr const int kDestOp = 0; - constexpr const int kBaseOp = 1; - constexpr const int kIndexOp = 3; + constexpr int kDestOp = 0; + constexpr int kBaseOp = 1; + constexpr int kIndexOp = 3; auto PossibleDestRegs = Instr.Operands[kDestOp].getRegisterAliasing().sourceBits(); remove(PossibleDestRegs, ForbiddenRegisters); @@ -548,7 +548,7 @@ private: void initStack(unsigned Bytes); - static constexpr const unsigned kF80Bytes = 10; // 80 bits. + static constexpr unsigned kF80Bytes = 10; // 80 bits. APInt Constant_; std::vector<MCInst> Instructions; @@ -864,7 +864,7 @@ const MCPhysReg ExegesisX86Target::kUnavailableRegistersSSE[12] = { // We're using one of R8-R15 because these registers are never hardcoded in // instructions (e.g. MOVS writes to EDI, ESI, EDX), so they have less // conflicts. -constexpr const MCPhysReg kDefaultLoopCounterReg = X86::R8; +constexpr MCPhysReg kDefaultLoopCounterReg = X86::R8; } // namespace @@ -1110,9 +1110,9 @@ std::vector<MCInst> ExegesisX86Target::setRegTo(const MCSubtargetInfo &STI, #ifdef __linux__ #ifdef __arm__ -static constexpr const uintptr_t VAddressSpaceCeiling = 0xC0000000; +static constexpr uintptr_t VAddressSpaceCeiling = 0xC0000000; #else -static constexpr const uintptr_t VAddressSpaceCeiling = 0x0000800000000000; +static constexpr uintptr_t VAddressSpaceCeiling = 0x0000800000000000; #endif void generateRoundToNearestPage(unsigned int Register, |
