summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-exegesis/lib
Commit message (Collapse)AuthorAgeFilesLines
* Merging r342865:Tom Stellard2018-11-281-2/+6
| | | | | | | | | | | | | | | | | | | | ------------------------------------------------------------------------ r342865 | courbet | 2018-09-24 01:39:48 -0700 (Mon, 24 Sep 2018) | 11 lines [llvm-exegesis] Fix PR39021. Summary: The `set` statements was incorrectly reading the value of the local variable and setting the value of the parent variable. Reviewers: tycho, gchatelet, john.brawn Subscribers: mgorny, tschuett, llvm-commits Differential Revision: https://reviews.llvm.org/D52343 ------------------------------------------------------------------------ llvm-svn: 347811
* [llvm-exegesis] Add uop computation for more X87 instruction classes.Clement Courbet2018-07-054-70/+85
| | | | | | | | | | | | | | Summary: This allows measuring comparisons (UCOM_FpIr32,UCOM_Fpr32,...), conditional moves (CMOVBE_Fp32,...) Reviewers: gchatelet Subscribers: tschuett, llvm-commits Differential Revision: https://reviews.llvm.org/D48713 llvm-svn: 336352
* [llvm-exegesis][NFC]clang-formatClement Courbet2018-07-051-7/+7
| | | | llvm-svn: 336343
* [llvm-exegesis] Remove dead comment.Clement Courbet2018-07-041-2/+0
| | | | llvm-svn: 336266
* [llvm-exegesis] Add an AArch64 targetJohn Brawn2018-07-034-0/+98
| | | | | | | | | The target does just enough to be able to run llvm-exegesis in latency mode for at least some opcodes. Differential Revision: https://reviews.llvm.org/D48780 llvm-svn: 336187
* [llvm-exegesis] ExegisX86Target::setRegToConstant() should depend on the ↵Clement Courbet2018-07-033-12/+28
| | | | | | | | | | | | | | subtarget features. Summary: This fixes PR38008. Reviewers: gchatelet, RKSimon Subscribers: tschuett, craig.topper, llvm-commits Differential Revision: https://reviews.llvm.org/D48820 llvm-svn: 336171
* [llvm-exegesis] Change how the native architecture is determinedJohn Brawn2018-07-021-0/+1
| | | | | | | | | | | | Currently the llvm-exegesis native architecture is determined by comparing the llvm native architecture with X86, so to add a new target would mean adding a new check. Change this to building up a list of the targets llvm-exegesis supports then using that, as this means that when adding a new target you just add the target to the list of supported targets. Differential Revision: https://reviews.llvm.org/D48778 llvm-svn: 336105
* [llvm-exegesis] Delegate the decision of cycle counter name to the targetJohn Brawn2018-07-022-5/+16
| | | | | | | | | | | Currently the cycle counter is taken from the subtarget schedule model, which isn't any use if the subtarget doesn't have one. Delegate the decision to the target benchmark runner, as it may know better what to do in that case, with the default being the current behaviour. Differential Revision: https://reviews.llvm.org/D48779 llvm-svn: 336099
* [llvm-exegesis][NFC] Cleanup useless braces.Clement Courbet2018-07-021-16/+8
| | | | llvm-svn: 336076
* [llvm-exegesis] Add partial X87 support.Clement Courbet2018-06-285-69/+135
| | | | | | | | | | | | | | Summary: This enables the X86-specific X86FloatingPointStackifierPass, and allow llvm-exegesis to generate and measure X87 latency/uops for some FP ops. Reviewers: gchatelet Subscribers: tschuett, llvm-commits Differential Revision: https://reviews.llvm.org/D48592 llvm-svn: 335815
* [llvm-exegesis][NFC] Fix windows warning in rL335465.Clement Courbet2018-06-261-1/+1
| | | | llvm-svn: 335591
* [llvm-exegesis] Get the BenchmarkRunner from the ExegesisTarget.Clement Courbet2018-06-2616-138/+161
| | | | | | | | | | | | | | | Summary: This allows targets to override code generation for some instructions. As an example of override, this also moves ad-hoc instruction filtering for X86 into the X86 ExegesisTarget. Reviewers: gchatelet Subscribers: mgorny, tschuett, llvm-commits Differential Revision: https://reviews.llvm.org/D48587 llvm-svn: 335582
* [llvm-exegesis][NFC] Remove unnecessary member variables.Clement Courbet2018-06-254-12/+9
| | | | llvm-svn: 335470
* [llvm-exegesis] Fix warning in r22752: Initialize IsSnippetSetupComplete.Clement Courbet2018-06-251-1/+1
| | | | llvm-svn: 335467
* [llvm-exegesis] Generate snippet setup code.Clement Courbet2018-06-2510-23/+220
| | | | | | | | | | | | | | | Summary: This ensures that the snippet always sees the same values for registers, making measurements reproducible. This will also allow exploring different values. Reviewers: gchatelet Subscribers: tschuett, llvm-commits Differential Revision: https://reviews.llvm.org/D48542 llvm-svn: 335465
* [llvm-exegesis][NFC] Simplify BenchmarkRunner ctor.Clement Courbet2018-06-251-2/+1
| | | | llvm-svn: 335456
* [llvm-exegesis][NFC] clang-formatClement Courbet2018-06-256-20/+19
| | | | llvm-svn: 335452
* [llvm-exegesis][NFC] Fix `Operand` class comments.Clement Courbet2018-06-251-2/+2
| | | | llvm-svn: 335450
* [llvm-exegesis][NFC] Simplify BenchmarkRunner.Clement Courbet2018-06-211-21/+12
| | | | | | Get rid of createExecutableFunction(). llvm-svn: 335240
* [llvm-exegesis][NFC] Simplify LLVMState.Clement Courbet2018-06-213-34/+39
| | | | | | | | | | | | Summary: Pretty much everything we need is in llvm::TargetMachine. Reviewers: gchatelet Subscribers: llvm-commits, tschuett Differential Revision: https://reviews.llvm.org/D48428 llvm-svn: 335237
* [llvm-exegesis] Add mechanism to add target-specific passes.Clement Courbet2018-06-205-5/+31
| | | | | | | | | | | | | | Summary: createX86FloatingPointStackifierPass is disabled until we handle TracksLiveness correctly. Reviewers: gchatelet Subscribers: mgorny, tschuett, llvm-commits Differential Revision: https://reviews.llvm.org/D48360 llvm-svn: 335117
* [llvm-exegesis] Remove noexcept in r335105.Clement Courbet2018-06-202-7/+8
| | | | | | gcc checks for transitivity (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53903) llvm-svn: 335109
* [llvm-exegesis] Fix missing move in r335105.Clement Courbet2018-06-202-6/+6
| | | | llvm-svn: 335108
* [llvm-exegesis] Use a Prototype to defer picking a value for free vars.Guillaume Chatelet2018-06-208-93/+146
| | | | | | | | | | | | Summary: Introducing a Prototype object to capture Variables that must be set but keeps degrees of freedom as Invalid. This allows exploring non constraint variables later on. Reviewers: courbet Subscribers: tschuett, llvm-commits Differential Revision: https://reviews.llvm.org/D48316 llvm-svn: 335105
* llvm-exegesis: mark ~ExegesisTarget() as virtual. Fixes build.Roman Lebedev2018-06-191-1/+1
| | | | | | | | | | | /build/llvm/tools/llvm-exegesis/lib/X86/../Target.h:32:3: error: 'exegesis::ExegesisTarget' has virtual functions but non-virtual destructor [-Werror,-Wnon-virtual-dtor] ~ExegesisTarget(); ^ /build/llvm/tools/llvm-exegesis/lib/X86/Target.cpp:15:7: error: 'exegesis::(anonymous namespace)::ExegesisX86Target' has virtual functions but non-virtual destructor [-Werror,-Wnon-virtual-dtor] class ExegesisX86Target : public ExegesisTarget { ^ llvm-svn: 335042
* Re-land r335038 "[llvm-exegesis] A mechanism to add target-specific ↵Clement Courbet2018-06-197-2/+151
| | | | | | | | functionality."" Fix typo: LLVM_NATIVE_ARCH -> LLVM_EXEGESIS_NATIVE_ARCH. llvm-svn: 335041
* Revert r335038 "[llvm-exegesis] A mechanism to add target-specific ↵Clement Courbet2018-06-197-151/+2
| | | | | | | | functionality." Breaks buildbots. llvm-svn: 335040
* [llvm-exegesis] A mechanism to add target-specific functionality.Clement Courbet2018-06-197-2/+151
| | | | | | | | | | | | Summary: This is a step towards implementing memory operands and X87. Reviewers: gchatelet Subscribers: mgorny, tschuett, llvm-commits Differential Revision: https://reviews.llvm.org/D48210 llvm-svn: 335038
* [llvm-exegesis][NFC] Remove dead variable.Clement Courbet2018-06-151-1/+0
| | | | llvm-svn: 334813
* [llvm-exegesis][NFC] Add more comments.Clement Courbet2018-06-151-0/+3
| | | | llvm-svn: 334811
* [llvm-exegesis] Print the whole snippet in analysis.Clement Courbet2018-06-158-50/+151
| | | | | | | | | | | | | | | | | Summary: On hover, the whole asm snippet is displayed, including operands. This requires the actual assembly output instead of just the MCInsts: This is because some pseudo-instructions get lowered to actual target instructions during codegen (e.g. ABS_Fp32 -> SSE or X87). Reviewers: gchatelet Subscribers: mgorny, tschuett, llvm-commits Differential Revision: https://reviews.llvm.org/D48164 llvm-svn: 334805
* [llvm-exegesis] Use BenchmarkResult::Instructions instead of OpcodeNameClement Courbet2018-06-144-30/+80
| | | | | | | | | | | | | | | | | | Summary: Get rid of OpcodeName. To remove the opcode name from an old file: ``` cat old_file | sed '/opcode_name.*/d' ``` Reviewers: gchatelet Subscribers: tschuett, llvm-commits Differential Revision: https://reviews.llvm.org/D48121 llvm-svn: 334691
* [llvm-exegesis] Fix buildbot - power was using native target for X86.Guillaume Chatelet2018-06-132-3/+9
| | | | | | | | | | | | Reviewers: courbet Reviewed By: courbet Subscribers: tschuett, llvm-commits Differential Revision: https://reviews.llvm.org/D48125 llvm-svn: 334601
* [llvm-exegesis] Fix failing assert when creating Snippet for LAHF.Guillaume Chatelet2018-06-131-6/+10
| | | | | | | | | | Reviewers: courbet Subscribers: tschuett, llvm-commits Differential Revision: https://reviews.llvm.org/D48123 llvm-svn: 334599
* [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
OpenPOWER on IntegriCloud