[PATCH] D147878: [llvm-exegesis][NFC] remove runAndMeasure
Aiden Grossman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 14 00:16:50 PDT 2023
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG999a8b8ce927: [llvm-exegesis][NFC] remove runAndMeasure (authored by aidengrossman).
Changed prior to commit:
https://reviews.llvm.org/D147878?vs=511980&id=513459#toc
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D147878/new/
https://reviews.llvm.org/D147878
Files:
llvm/tools/llvm-exegesis/lib/BenchmarkRunner.cpp
llvm/tools/llvm-exegesis/lib/BenchmarkRunner.h
llvm/tools/llvm-exegesis/lib/UopsBenchmarkRunner.cpp
Index: llvm/tools/llvm-exegesis/lib/UopsBenchmarkRunner.cpp
===================================================================
--- llvm/tools/llvm-exegesis/lib/UopsBenchmarkRunner.cpp
+++ llvm/tools/llvm-exegesis/lib/UopsBenchmarkRunner.cpp
@@ -25,19 +25,19 @@
IssueCounter != IssueCounterEnd; ++IssueCounter) {
if (!IssueCounter->Counter)
continue;
- auto ExpectedCounterValue = Executor.runAndMeasure(IssueCounter->Counter);
+ auto ExpectedCounterValue = Executor.runAndSample(IssueCounter->Counter);
if (!ExpectedCounterValue)
return ExpectedCounterValue.takeError();
Result.push_back(BenchmarkMeasure::Create(IssueCounter->ProcResName,
- *ExpectedCounterValue));
+ (*ExpectedCounterValue)[0]));
}
// NumMicroOps.
if (const char *const UopsCounter = PCI.UopsCounter) {
- auto ExpectedCounterValue = Executor.runAndMeasure(UopsCounter);
+ auto ExpectedCounterValue = Executor.runAndSample(UopsCounter);
if (!ExpectedCounterValue)
return ExpectedCounterValue.takeError();
Result.push_back(
- BenchmarkMeasure::Create("NumMicroOps", *ExpectedCounterValue));
+ BenchmarkMeasure::Create("NumMicroOps", (*ExpectedCounterValue)[0]));
}
return std::move(Result);
}
Index: llvm/tools/llvm-exegesis/lib/BenchmarkRunner.h
===================================================================
--- llvm/tools/llvm-exegesis/lib/BenchmarkRunner.h
+++ llvm/tools/llvm-exegesis/lib/BenchmarkRunner.h
@@ -88,8 +88,6 @@
class FunctionExecutor {
public:
virtual ~FunctionExecutor();
- // FIXME deprecate this.
- virtual Expected<int64_t> runAndMeasure(const char *Counters) const = 0;
virtual Expected<llvm::SmallVector<int64_t, 4>>
runAndSample(const char *Counters) const = 0;
Index: llvm/tools/llvm-exegesis/lib/BenchmarkRunner.cpp
===================================================================
--- llvm/tools/llvm-exegesis/lib/BenchmarkRunner.cpp
+++ llvm/tools/llvm-exegesis/lib/BenchmarkRunner.cpp
@@ -47,13 +47,6 @@
Scratch(Scratch) {}
private:
- Expected<int64_t> runAndMeasure(const char *Counters) const override {
- auto ResultOrError = runAndSample(Counters);
- if (ResultOrError)
- return ResultOrError.get()[0];
- return ResultOrError.takeError();
- }
-
static void
accumulateCounterValues(const llvm::SmallVector<int64_t, 4> &NewValues,
llvm::SmallVector<int64_t, 4> *Result) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D147878.513459.patch
Type: text/x-patch
Size: 2556 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230414/816ab48b/attachment.bin>
More information about the llvm-commits
mailing list