[llvm-exegesis] Refactor common parts out of FunctionExecutorImpl
authorAiden Grossman <agrossman154@yahoo.com>
Fri, 14 Apr 2023 07:19:10 +0000 (07:19 +0000)
committerAiden Grossman <agrossman154@yahoo.com>
Fri, 14 Apr 2023 07:37:28 +0000 (07:37 +0000)
commitd22805940a8ba42f6ff3b1cd2e549e9d54e40248
treea307bc3ef0376546866b9e6732ad4c63be1cbe30
parent28575f41cd7df98012fb15f18434411a941ec228
[llvm-exegesis] Refactor common parts out of FunctionExecutorImpl

This patch refactors some code out of FunctionExecutorImpl into the base
class that should be common across all implementations of
FunctionExecutor. Particularly, this patch factors out
accumulateCounterValues, and also factors out runAndSample, moving
implementation specific code into a new runWithCounter function. This
makes adding new implementations of FunctinExecutor easier.

Reviewed By: gchatelet

Differential Revision: https://reviews.llvm.org/D148079
llvm/tools/llvm-exegesis/lib/BenchmarkRunner.cpp
llvm/tools/llvm-exegesis/lib/BenchmarkRunner.h