This is an archive of the discontinued LLVM Phabricator instance.

[llvm-exegesis] Add instructions to BenchmarkResult Key.
ClosedPublic

Authored by gchatelet on Jun 5 2018, 1:54 AM.

Details

Reviewers
courbet
Summary

We want llvm-exegesis to explore instructions (effect of initial register values, effect of operand selection). To enable this a BenchmarkResult muststore all the relevant data in its key. This patch starts adding such data. Here we simply allow to store the generated instructions, following patches will add operands and initial values for registers.

Diff Detail

Event Timeline

gchatelet created this revision.Jun 5 2018, 1:54 AM
courbet added inline comments.Jun 5 2018, 2:08 AM
tools/llvm-exegesis/lib/BenchmarkResult.h
31

nit: move the class definition to the end of the header as this is more an artifact and therefore less important than the schema..

54

Can you mention that we're not directly getting the name from the sched model to avoid creating a dependency to make testing easier ?

tools/llvm-exegesis/llvm-exegesis.cpp
143

writeYamlOrDie(getBenchmarkResultContext(State), BenchmarkFile); ?

175

ditto

gchatelet updated this revision to Diff 149921.Jun 5 2018, 2:28 AM

Updating D47764: [llvm-exegesis] Add instructions to BenchmarkResult Key.

gchatelet marked 3 inline comments as done.Jun 5 2018, 2:30 AM
gchatelet added inline comments.
tools/llvm-exegesis/llvm-exegesis.cpp
143

As discussed offline, I had to make the reference const and const_cast.

courbet accepted this revision.Jun 5 2018, 2:33 AM
This revision is now accepted and ready to land.Jun 5 2018, 2:33 AM
gchatelet marked an inline comment as done.Jun 6 2018, 2:46 AM
courbet closed this revision.Jun 6 2018, 11:26 PM

This was submitted.