[PATCH] D148921: [llvm-exegesis] Use MCJIT only for execution
Pavel Kosov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 21 05:56:22 PDT 2023
kpdev42 created this revision.
kpdev42 added reviewers: courbet, tstellar.
kpdev42 added a project: LLVM.
Herald added subscribers: mstojanovic, atanasyan, jrtc27, nemanjai, sdardis.
Herald added a project: All.
kpdev42 requested review of this revision.
Initially, llvm-exegesis was generating the benchmark code for the
host CPU to execute it inside its own process. Thus, MCJIT was reused
for fetching function's bytes to fill the assembled_snippet field in
the benchmark report.
Later, the --mtriple and --benchmark-phase command line options were
introduced that are handy for testing snippet generation even if
snippet execution is not possible. In that setup, MCJIT is asked to
parse an object file for a foreign CPU or operating system that is
probably not guaranteed to succeed and was actually observed to fail
in https://reviews.llvm.org/D145763.
This commit implements a much simplified function's code fetching,
assuming the benchmark function is the only function in the object file
and it spans across the entire text section (note that MCJIT-based code
has more or less the same assumption - see TrackingSectionMemoryManager
class).
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D148921
Files:
llvm/test/tools/llvm-exegesis/AArch64/print-assembled-snippet.s
llvm/test/tools/llvm-exegesis/Mips/print-assembled-snippet.s
llvm/test/tools/llvm-exegesis/PowerPC/lit.local.cfg
llvm/test/tools/llvm-exegesis/PowerPC/print-assembled-snippet.s
llvm/test/tools/llvm-exegesis/X86/print-assembled-snippet.s
llvm/tools/llvm-exegesis/lib/Assembler.cpp
llvm/tools/llvm-exegesis/lib/Assembler.h
llvm/tools/llvm-exegesis/lib/BenchmarkRunner.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D148921.515705.patch
Type: text/x-patch
Size: 10463 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230421/7f56944f/attachment.bin>
More information about the llvm-commits
mailing list