summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-exegesis/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* [llvm-exegesis] Cleaner design without mutable data.Guillaume Chatelet2018-06-1310-213/+267
| | | | | | | | | | | | Summary: Previous design was relying on the 'mutate' keyword and was quite confusing. This version separate mutable from immutable data and makes it clearer what changes and what doesn't. Reviewers: courbet Subscribers: tschuett, llvm-commits Differential Revision: https://reviews.llvm.org/D48020 llvm-svn: 334596
* [llvm-exegesis] Sum counter values when several counters are specified for a ↵Clement Courbet2018-06-121-10/+16
| | | | | | | | | | | | | | ProcRes. Summary: This allows handling memory ports on SNB. Reviewers: gchatelet Subscribers: tschuett, llvm-commits Differential Revision: https://reviews.llvm.org/D48076 llvm-svn: 334502
* [llvm-exegesis] Move libpfm linking to LLVMExegesis.Guillaume Chatelet2018-06-121-0/+4
| | | | | | | | | | | | Summary: This patch moves linking of libpfm from different places to a single one. Reviewers: courbet Subscribers: mgorny, tschuett, llvm-commits Differential Revision: https://reviews.llvm.org/D48075 llvm-svn: 334499
* [FileSystem] Split up the OpenFlags enumeration.Zachary Turner2018-06-071-1/+2
| | | | | | | | | | | | | | | | | This breaks the OpenFlags enumeration into two separate enumerations: OpenFlags and CreationDisposition. The first controls the behavior of the API depending on whether or not the target file already exists, and is not a flags-based enum. The second controls more flags-like values. This yields a more easy to understand API, while also allowing flags to be passed to the openForRead api, where most of the values didn't make sense before. This also makes the apis more testable as it becomes easy to enumerate all the configurations which make sense, so I've added many new tests to exercise all the different values. llvm-svn: 334221
* [llvm-exegesis] Make BenchmarkRunner handle multiple configurations.Guillaume Chatelet2018-06-076-95/+95
| | | | | | | | | | | | Summary: BenchmarkRunner subclasses can now create many configurations - although this patch still generates one. Reviewers: courbet Subscribers: tschuett, llvm-commits Differential Revision: https://reviews.llvm.org/D47877 llvm-svn: 334197
* [llvm-exegesis] Add a Configuration object for Benchmark.Guillaume Chatelet2018-06-076-29/+43
| | | | | | | | | | | | Summary: This is the first step to have the BenchmarkRunner create and measure many different configurations (different initial values for instance). Reviewers: courbet Subscribers: tschuett, llvm-commits Differential Revision: https://reviews.llvm.org/D47826 llvm-svn: 334169
* [llvm-exegesis] Improve error reporting.Guillaume Chatelet2018-06-072-30/+36
| | | | | | | | | | | | Summary: BenchmarkResult IO functions now return an Error or Expected so caller can deal take proper action. Reviewers: courbet Subscribers: tschuett, llvm-commits Differential Revision: https://reviews.llvm.org/D47868 llvm-svn: 334167
* [llvm-exegesis] Serializes instruction's operand in BenchmarkResult's key.Guillaume Chatelet2018-06-072-26/+81
| | | | | | | | | | | | Summary: Follow up patch to https://reviews.llvm.org/D47764. Reviewers: courbet Subscribers: tschuett, llvm-commits Differential Revision: https://reviews.llvm.org/D47785 llvm-svn: 334165
* [llvm-exegesis] move Mode from Key to BenchmarResult.Clement Courbet2018-06-069-20/+19
| | | | | | | | | | | | | | | | | | Moves the Mode field out of the Key. The existing yaml benchmark results can be fixed with the following script: ``` readonly FILE=$1 readonly MODE=latency # Change to uops to fix a uops benchmark. cat $FILE | \ sed "/^\ \+mode:\ \+$MODE$/d" | \ sed "/^cpu_name.*$/i mode: $MODE" ``` Differential Revision: https://reviews.llvm.org/D47813 Authored by: Guillaume Chatelet llvm-svn: 334079
* [llvm-exegesis] Add instructions to BenchmarkResult Key.Clement Courbet2018-06-052-20/+158
| | | | | | | | | | 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. https://reviews.llvm.org/D47764 Authored by: Guilluame Chatelet llvm-svn: 334008
* [llvm-exegesis][NFC] Use an enum instead of a string for benchmark mode.Clement Courbet2018-06-049-13/+28
| | | | | | | | | | | | Summary: YAML encoding is backwards-compatible. Reviewers: gchatelet Subscribers: tschuett, llvm-commits Differential Revision: https://reviews.llvm.org/D47705 llvm-svn: 333886
* [llvm-exegesis] Analysis: Show inconsistencies between checked-in and ↵Clement Courbet2018-06-045-93/+241
| | | | | | | | | | | | | | | | | | measured data. Summary: We now highlight any sched classes whose measurements do not match the LLVM SchedModel. "bad" clusters are marked in red. Screenshot in phabricator diff. Reviewers: gchatelet Subscribers: tschuett, mgrang, RKSimon, llvm-commits Differential Revision: https://reviews.llvm.org/D47639 llvm-svn: 333884
* [llvm-exegesis] Analysis: Display idealized sched class port pressure.Clement Courbet2018-06-012-10/+146
| | | | | | | | | | | | Summary: Screenshot in phabricator diff. Reviewers: gchatelet Subscribers: mgorny, tschuett, mgrang, llvm-commits Differential Revision: https://reviews.llvm.org/D47329 llvm-svn: 333753
* [llvm-exegesis][NFCI] Counter::Counter(): more useful msg on event open errorRoman Lebedev2018-05-311-3/+6
| | | | | | | | | | | | | | | | | | | | Summary: I'm slowly looking into a new X86 scheduler model, for AMD Bulldozer CPU, model 2 (bdver2, Piledriver). And naturally, i have hit that assert :) I happened to know what it meant, and how to fix it, but that is not too common knowledge. Reviewers: courbet, RKSimon Reviewed By: courbet Subscribers: tschuett, llvm-commits, craig.topper Differential Revision: https://reviews.llvm.org/D47572 llvm-svn: 333632
* [llvm-exegesis] Analysis: Show value extents.Clement Courbet2018-05-243-9/+57
| | | | | | | | | | | | Summary: Screenshot attached in phabricator. Reviewers: gchatelet Subscribers: tschuett, llvm-commits Differential Revision: https://reviews.llvm.org/D47318 llvm-svn: 333181
* [llvm-exegesis] Analysis: show debug string instead of raw key if provided.Clement Courbet2018-05-241-1/+4
| | | | | | | | | | Reviewers: gchatelet Subscribers: tschuett, llvm-commits Differential Revision: https://reviews.llvm.org/D47315 llvm-svn: 333175
* [llvm-exegesis] Show sched class details in analysis.Clement Courbet2018-05-242-16/+142
| | | | | | | | | | | | Summary: And update docs. Reviewers: gchatelet Subscribers: tschuett, craig.topper, RKSimon, llvm-commits Differential Revision: https://reviews.llvm.org/D47254 llvm-svn: 333169
* [llvm-exegesis] Analysis output uses HTML.Clement Courbet2018-05-223-45/+183
| | | | | | | | | | | | Summary: This makes the report much more readable. Reviewers: gchatelet Subscribers: tschuett, mgrang, craig.topper, RKSimon, llvm-commits Differential Revision: https://reviews.llvm.org/D47189 llvm-svn: 332979
* CodeGen: Add a dwo output file argument to addPassesToEmitFile and hook it ↵Peter Collingbourne2018-05-211-2/+2
| | | | | | | | | | up to dwo output. Part of PR37466. Differential Revision: https://reviews.llvm.org/D47089 llvm-svn: 332881
* [llvm-exegesis] Remove redudant explicit template instantiations.Clement Courbet2018-05-171-5/+0
| | | | llvm-svn: 332611
* [llvm-exegesis] Write out inconsistencies to a file.Clement Courbet2018-05-172-6/+15
| | | | | | | | | | Reviewers: gchatelet Subscribers: tschuett, llvm-commits Differential Revision: https://reviews.llvm.org/D47013 llvm-svn: 332608
* [llvm-exegesis] Analysis: detect clustering inconsistencies.Clement Courbet2018-05-172-25/+97
| | | | | | | | | | | | | | | | | Summary: Warn on instructions that should have the same performance characteristics according to the sched model but actually differ in their benchmarks. Next step: Make the display nicer to browse, I was thinking maybe html. Reviewers: gchatelet Subscribers: tschuett, llvm-commits Differential Revision: https://reviews.llvm.org/D46945 llvm-svn: 332601
* reland r332579: [llvm-exegesis] Update to cover latency through another opcode.Clement Courbet2018-05-1721-1115/+1188
| | | | | | | | | | | | | | Restructuring the code to measure latency and uops. The end goal is to have this program spawn another process to deal with SIGILL and other malformed programs. It is not yet the case in this redesign, it is still the main program that runs the code (and may crash). It now uses BitVector instead of Graph for performance reasons. https://reviews.llvm.org/D46821 (with fixed ARM tests) Authored by Guillaume Chatelet llvm-svn: 332592
* Revert r332579 "[llvm-exegesis] Update to cover latency through another opcode."Clement Courbet2018-05-1721-1188/+1115
| | | | | | The revision failed to update the ARM tests. llvm-svn: 332580
* [llvm-exegesis] Update to cover latency through another opcode.Clement Courbet2018-05-1721-1115/+1188
| | | | | | | | | | | | Restructuring the code to measure latency and uops. The end goal is to have this program spawn another process to deal with SIGILL and other malformed programs. It is not yet the case in this redesign, it is still the main program that runs the code (and may crash). It now uses BitVector instead of Graph for performance reasons. https://reviews.llvm.org/D46821 Authored by Guillaume Chatelet llvm-svn: 332579
* [llvm-exegesis] Fix unused variable warning in release mode.Clement Courbet2018-05-161-1/+1
| | | | llvm-svn: 332455
* Fix unused variable warning in r332437.Clement Courbet2018-05-161-2/+2
| | | | llvm-svn: 332441
* [llvm-exegesis] Analysis: Display sched class for instructions.Clement Courbet2018-05-162-24/+60
| | | | | | | | | | Reviewers: gchatelet Subscribers: tschuett, llvm-commits Differential Revision: https://reviews.llvm.org/D46883 llvm-svn: 332437
* [llvm-exegesis] Split AsmTemplate.Name into components.Clement Courbet2018-05-154-21/+32
| | | | | | | | | | | | | | Summary: AsmTemplate becomes IntructionBenchmarkKey, which has three components. This allows retreiving the opcode for analysis. Reviewers: gchatelet Subscribers: tschuett, llvm-commits Differential Revision: https://reviews.llvm.org/D46873 llvm-svn: 332348
* Fix compilation under pre-c++14 gccs.Clement Courbet2018-05-151-1/+1
| | | | llvm-svn: 332346
* [llvm-exegesis] Add an analysis mode.Clement Courbet2018-05-155-22/+142
| | | | | | | | | | | | | | | | Summary: The analysis mode gives the user a clustered view of the measurement results. Next steps are (requires the split ok AsmTemplate.Name into {mnemonic, mode}): - Show the sched class. - Highlight any inconsistencies with the checked-in data. Reviewers: gchatelet Subscribers: mgorny, llvm-commits, tschuett Differential Revision: https://reviews.llvm.org/D46865 llvm-svn: 332344
* [llvm-exegesis] InMemoryAssembler: handle return-less targets (e.g. arm).Clement Courbet2018-05-152-2/+11
| | | | | | | | | | | | Summary: Arm does not have a ret code per se. Reviewers: gchatelet Subscribers: mgorny, javed.absar, kristof.beyls, tschuett, llvm-commits Differential Revision: https://reviews.llvm.org/D45672 llvm-svn: 332331
* [llvm-exegesis] Check perf event validity.Clement Courbet2018-05-151-1/+5
| | | | | | | | This was part of https://reviews.llvm.org/D46821. Authored by Guillaume Chatelet llvm-svn: 332330
* [llvm-exegesis] Revert accidentally commited code.Clement Courbet2018-05-145-115/+22
| | | | llvm-svn: 332231
* [llvm-exegesis] Fix a warning in r332221Clement Courbet2018-05-141-16/+9
| | | | | | | | | comparison of integers of different signs: 'const unsigned long' and 'const int' [-Werror,-Wsign-compare] unittests/tools/llvm-exegesis/BenchmarkResultTest.cpp:60:5: note: in instantiation of function template specialization 'testing::internal::EqHelper<false>::Compare<unsigned long, int>' requested here ASSERT_EQ(FromDiskVector.size(), 1); llvm-svn: 332230
* [llvm-exegesis] Add an analysis mode.Clement Courbet2018-05-145-22/+122
| | | | | | | The analysis mode gives the user a clustered view of the measurement results and highlights any inconsistencies with the checked-in data. llvm-svn: 332229
* [llvm-exegesis] Allow lists of BenchmarkResults to be parsed as ↵Clement Courbet2018-05-142-3/+20
| | | | | | std::vector<BenchmarkResult>. llvm-svn: 332221
* Re-land r331622 "[llvm-exegesis] Add a library to cluster benchmark results."Clement Courbet2018-05-073-0/+274
| | | | | | Add missing move. llvm-svn: 331624
* Revert r331622 "[llvm-exegesis] Add a library to cluster benchmark results."Clement Courbet2018-05-073-274/+0
| | | | | | Breaks build over llvm::Error copy construction. llvm-svn: 331623
* [llvm-exegesis] Add a library to cluster benchmark results.Clement Courbet2018-05-073-0/+274
| | | | | | | | | | Reviewers: gchatelet Subscribers: mgorny, tschuett, llvm-commits Differential Revision: https://reviews.llvm.org/D46432 llvm-svn: 331622
* [llvm-exegesis] Use LLVMTargetMachine pointer everywhere. NFCI.Simon Pilgrim2018-04-181-1/+1
| | | | | | Avoid calling the unique_ptr multiple times. llvm-svn: 330260
* [llvm-exegesis] Put a newline at the end of each error report.Simon Pilgrim2018-04-181-2/+2
| | | | | | Makes multiple error messages much easier to read. llvm-svn: 330258
* [llvm-exegesis] Pull out LLVMTargetMachine to simplify debugging. NFCI.Simon Pilgrim2018-04-181-1/+2
| | | | | | Has been useful while trying to get around all the error reporting issues mentioned on PR37049. llvm-svn: 330255
* [llvm-exegesis] Fix use after free.Clement Courbet2018-04-131-1/+1
| | | | | | | | | | Reviewers: gchatelet Subscribers: tschuett, llvm-commits Differential Revision: https://reviews.llvm.org/D45625 llvm-svn: 330026
* [MC][TableGen] Add optional libpfm counter names for ProcResUnits.Clement Courbet2018-04-102-47/+15
| | | | | | | | | | | | | | | | Summary: Subtargets can define the libpfm counter names that can be used to measure cycles and uops issued on ProcResUnits. This allows making llvm-exegesis available on more targets. Fixes PR36984. Reviewers: gchatelet, RKSimon, andreadb, craig.topper Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D45360 llvm-svn: 329675
* [llvm-exegesis] Fix unused return value warning and add a useful error ↵Simon Pilgrim2018-04-071-1/+3
| | | | | | message for event counter reads. llvm-svn: 329496
* [llvm-exegesis] Suppress a warning.Clement Courbet2018-04-051-1/+2
| | | | llvm-svn: 329257
* [llvm-exegesis] Add missing link libraries.Clement Courbet2018-04-041-0/+3
| | | | llvm-svn: 329185
* [llvm-exegesis] Do not initialize FileDescriptor when libpfm is notClement Courbet2018-04-041-1/+1
| | | | | | available. llvm-svn: 329177
* [llvm-exegesis] Fix compilation on lld-x86_64-darwin13Clement Courbet2018-04-041-1/+1
| | | | | | | YAMLTraits does not know how to serialize `size_t` portably. Use `int` instead. llvm-svn: 329176
OpenPOWER on IntegriCloud