[llvm-exegesis] Refactor FunctionExecutorImpl and create factory
authorAiden Grossman <agrossman154@yahoo.com>
Wed, 21 Jun 2023 00:04:48 +0000 (00:04 +0000)
committerAiden Grossman <agrossman154@yahoo.com>
Wed, 21 Jun 2023 00:04:48 +0000 (00:04 +0000)
commit72df12cce226e1ed47e9dbd6e2fc461229947b85
tree69d94ba2e3d9718c5e116891ddfb8199cee5e41f
parentfabd16c7460e6cfae3106155ec79142bfa54db2e
[llvm-exegesis] Refactor FunctionExecutorImpl and create factory

In order to better support adding in new implementations of
FunctionExecutor, this patch makes some small changes so that it is
easier to add new ones in. FunctionExecutorImpl is renamed to
InProcessFunctionExecutorImpl to better reflect how it will be placed
relative to the soon-to-be introduced subprocess executor and a new
function is created to create executors so selection can be done more
easily. In addition, a new CLI flag, -execution-mode, which can be used
to select between the different executors.

Reviewed By: courbet

Differential Revision: https://reviews.llvm.org/D151019
llvm/tools/llvm-exegesis/lib/BenchmarkRunner.cpp
llvm/tools/llvm-exegesis/lib/BenchmarkRunner.h
llvm/tools/llvm-exegesis/lib/LatencyBenchmarkRunner.cpp
llvm/tools/llvm-exegesis/lib/LatencyBenchmarkRunner.h
llvm/tools/llvm-exegesis/lib/Target.cpp
llvm/tools/llvm-exegesis/lib/Target.h
llvm/tools/llvm-exegesis/lib/UopsBenchmarkRunner.h
llvm/tools/llvm-exegesis/llvm-exegesis.cpp