summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-exegesis/lib
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/tools/llvm-exegesis/lib')
-rw-r--r--llvm/tools/llvm-exegesis/lib/BenchmarkRunner.cpp12
-rw-r--r--llvm/tools/llvm-exegesis/lib/MCInstrDescView.cpp6
-rw-r--r--llvm/tools/llvm-exegesis/lib/Target.cpp10
-rw-r--r--llvm/tools/llvm-exegesis/lib/Target.h4
-rw-r--r--llvm/tools/llvm-exegesis/lib/Uops.cpp3
-rw-r--r--llvm/tools/llvm-exegesis/lib/X86/Target.cpp4
6 files changed, 19 insertions, 20 deletions
diff --git a/llvm/tools/llvm-exegesis/lib/BenchmarkRunner.cpp b/llvm/tools/llvm-exegesis/lib/BenchmarkRunner.cpp
index f9ecbae060d..59f954b8e93 100644
--- a/llvm/tools/llvm-exegesis/lib/BenchmarkRunner.cpp
+++ b/llvm/tools/llvm-exegesis/lib/BenchmarkRunner.cpp
@@ -91,22 +91,22 @@ BenchmarkRunner::runOne(const BenchmarkConfiguration &Configuration,
// that the inside instructions are repeated.
constexpr const int kMinInstructionsForSnippet = 16;
{
- auto ObjectFilePath = writeObjectFile(
- GenerateInstructions(kMinInstructionsForSnippet));
+ auto ObjectFilePath =
+ writeObjectFile(GenerateInstructions(kMinInstructionsForSnippet));
if (llvm::Error E = ObjectFilePath.takeError()) {
InstrBenchmark.Error = llvm::toString(std::move(E));
return InstrBenchmark;
}
const ExecutableFunction EF(State.createTargetMachine(),
- getObjectFromFile(*ObjectFilePath));
+ getObjectFromFile(*ObjectFilePath));
const auto FnBytes = EF.getFunctionBytes();
InstrBenchmark.AssembledSnippet.assign(FnBytes.begin(), FnBytes.end());
}
// Assemble NumRepetitions instructions repetitions of the snippet for
// measurements.
- auto ObjectFilePath = writeObjectFile(
- GenerateInstructions(InstrBenchmark.NumRepetitions));
+ auto ObjectFilePath =
+ writeObjectFile(GenerateInstructions(InstrBenchmark.NumRepetitions));
if (llvm::Error E = ObjectFilePath.takeError()) {
InstrBenchmark.Error = llvm::toString(std::move(E));
return InstrBenchmark;
@@ -114,7 +114,7 @@ BenchmarkRunner::runOne(const BenchmarkConfiguration &Configuration,
llvm::outs() << "Check generated assembly with: /usr/bin/objdump -d "
<< *ObjectFilePath << "\n";
const ExecutableFunction EF(State.createTargetMachine(),
- getObjectFromFile(*ObjectFilePath));
+ getObjectFromFile(*ObjectFilePath));
InstrBenchmark.Measurements = runMeasurements(EF, NumRepetitions);
return InstrBenchmark;
diff --git a/llvm/tools/llvm-exegesis/lib/MCInstrDescView.cpp b/llvm/tools/llvm-exegesis/lib/MCInstrDescView.cpp
index acfa82565ea..5678fcea94d 100644
--- a/llvm/tools/llvm-exegesis/lib/MCInstrDescView.cpp
+++ b/llvm/tools/llvm-exegesis/lib/MCInstrDescView.cpp
@@ -86,8 +86,7 @@ Instruction::Instruction(const llvm::MCInstrDesc &MCInstrDesc,
InstructionInstance::InstructionInstance(const Instruction &Instr)
: Instr(Instr), VariableValues(Instr.Variables.size()) {}
-InstructionInstance::InstructionInstance(InstructionInstance &&) =
- default;
+InstructionInstance::InstructionInstance(InstructionInstance &&) = default;
InstructionInstance &InstructionInstance::
operator=(InstructionInstance &&) = default;
@@ -135,8 +134,7 @@ llvm::MCInst InstructionInstance::randomizeUnsetVariablesAndBuild() {
SnippetPrototype::SnippetPrototype(SnippetPrototype &&) = default;
-SnippetPrototype &SnippetPrototype::
-operator=(SnippetPrototype &&) = default;
+SnippetPrototype &SnippetPrototype::operator=(SnippetPrototype &&) = default;
bool RegisterOperandAssignment::
operator==(const RegisterOperandAssignment &Other) const {
diff --git a/llvm/tools/llvm-exegesis/lib/Target.cpp b/llvm/tools/llvm-exegesis/lib/Target.cpp
index a69ab0c3225..92e3e46f831 100644
--- a/llvm/tools/llvm-exegesis/lib/Target.cpp
+++ b/llvm/tools/llvm-exegesis/lib/Target.cpp
@@ -10,19 +10,19 @@
namespace exegesis {
-ExegesisTarget::~ExegesisTarget() {} // anchor.
+ExegesisTarget::~ExegesisTarget() {} // anchor.
-static ExegesisTarget* FirstTarget = nullptr;
+static ExegesisTarget *FirstTarget = nullptr;
const ExegesisTarget *ExegesisTarget::lookup(llvm::Triple TT) {
- for (const ExegesisTarget* T = FirstTarget; T != nullptr; T = T->Next) {
+ for (const ExegesisTarget *T = FirstTarget; T != nullptr; T = T->Next) {
if (T->matchesArch(TT.getArch()))
return T;
}
return nullptr;
}
-void ExegesisTarget::registerTarget(ExegesisTarget *Target){
+void ExegesisTarget::registerTarget(ExegesisTarget *Target) {
if (FirstTarget == nullptr) {
FirstTarget = Target;
return;
@@ -33,4 +33,4 @@ void ExegesisTarget::registerTarget(ExegesisTarget *Target){
Target->Next = FirstTarget;
FirstTarget = Target;
}
-} // namespace exegesis
+} // namespace exegesis
diff --git a/llvm/tools/llvm-exegesis/lib/Target.h b/llvm/tools/llvm-exegesis/lib/Target.h
index ba91afd82d6..73426797ab6 100644
--- a/llvm/tools/llvm-exegesis/lib/Target.h
+++ b/llvm/tools/llvm-exegesis/lib/Target.h
@@ -38,9 +38,9 @@ public:
private:
virtual bool matchesArch(llvm::Triple::ArchType Arch) const = 0;
- const ExegesisTarget* Next = nullptr;
+ const ExegesisTarget *Next = nullptr;
};
-} // namespace exegesis
+} // namespace exegesis
#endif // LLVM_TOOLS_LLVM_EXEGESIS_TARGET_H
diff --git a/llvm/tools/llvm-exegesis/lib/Uops.cpp b/llvm/tools/llvm-exegesis/lib/Uops.cpp
index a64bc9531f4..349f5f4eaa4 100644
--- a/llvm/tools/llvm-exegesis/lib/Uops.cpp
+++ b/llvm/tools/llvm-exegesis/lib/Uops.cpp
@@ -97,7 +97,8 @@ UopsBenchmarkRunner::isInfeasible(const llvm::MCInstrDesc &MCInstrDesc) const {
return llvm::make_error<BenchmarkFailure>(
"Infeasible : has unknown operands");
if (llvm::any_of(MCInstrDesc.operands(), hasMemoryOperand))
- return llvm::make_error<BenchmarkFailure>("Infeasible : has memory operands");
+ return llvm::make_error<BenchmarkFailure>(
+ "Infeasible : has memory operands");
return llvm::Error::success();
}
diff --git a/llvm/tools/llvm-exegesis/lib/X86/Target.cpp b/llvm/tools/llvm-exegesis/lib/X86/Target.cpp
index 557588b2d9b..26a54591fb0 100644
--- a/llvm/tools/llvm-exegesis/lib/X86/Target.cpp
+++ b/llvm/tools/llvm-exegesis/lib/X86/Target.cpp
@@ -29,7 +29,7 @@ class ExegesisX86Target : public ExegesisTarget {
} // namespace
-static ExegesisTarget* getTheExegesisX86Target() {
+static ExegesisTarget *getTheExegesisX86Target() {
static ExegesisX86Target Target;
return &Target;
}
@@ -38,4 +38,4 @@ void InitializeX86ExegesisTarget() {
ExegesisTarget::registerTarget(getTheExegesisX86Target());
}
-} // namespace exegesis
+} // namespace exegesis
OpenPOWER on IntegriCloud