summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-exegesis/lib/Target.h
Commit message (Collapse)AuthorAgeFilesLines
* [llvm-exegesis][NFC] Remove extra `llvm::` qualifications.Clement Courbet2019-10-091-22/+15
| | | | | | | | | | | | | | Summary: Second patch: in the lib. Reviewers: gchatelet Subscribers: nemanjai, tschuett, MaskRay, mgrang, jsji, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D68692 llvm-svn: 374158
* [llvm-exegesis] Add options to SnippetGenerator.Clement Courbet2019-10-081-3/+4
| | | | | | | | | | | | | | | | Summary: This adds a `-max-configs-per-opcode` option to limit the number of configs per opcode. Reviewers: gchatelet Subscribers: tschuett, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D68642 llvm-svn: 374054
* [llvm-exegesis][NFC] Rename ExegesisTarget::decrementLoopCounterAndLoop()Clement Courbet2019-10-031-1/+2
| | | | | | | | | | | | | | Summary: To decrementLoopCounterAndJump, and explicitely take the jump target. Reviewers: gchatelet Subscribers: tschuett, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D68375 llvm-svn: 373571
* [llvm-exegesis] Add loop mode for repeating the snippet.Clement Courbet2019-09-271-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Before this change the Executable function was made by duplicating the snippet. This change adds a --repetion-mode={loop|duplicate} flag that allows choosing between this behaviour and wrapping the snippet instructions in a loop. The new mode can help measurements when the snippet fits in the DSB by short-cirtcuiting decoding. The loop adds a dec + jmp to the measurements, but since these are not part of the critical path, they execute in parallel with the measured code and do not impact measurements in practice. Overview of the change: - New SnippetRepetitor abstraction that handles repeating the snippet. The assembler delegates repeating the instructions to this class. - ExegesisTarget learns how to decrement loop counter and jump. - Some refactoring of the assembler into FunctionFiller/BasicBlockFiller. Reviewers: gchatelet Subscribers: mgorny, tschuett, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D68125 llvm-svn: 373083
* [llvm-exegesis][X86] Handle CMOVcc/SETcc OPERAND_COND_CODE OperandTypeRoman Lebedev2019-04-061-0/+8
| | | | | | | | | | | | | | | | | | | | | | Summary: D60041 / D60138 refactoring changed how CMOV/SETcc opcodes are handled. concode is now an immediate, with it's own operand type. This at least allows to not crash on the opcode. However, this still won't generate all the snippets with all the condcode enumerators. D60066 does that. Reviewers: courbet, gchatelet Reviewed By: gchatelet Subscribers: tschuett, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D60057 llvm-svn: 357841
* [llvm-exegesis] Allow the target to disable the selection of some registers.Clement Courbet2019-03-261-0/+5
| | | | | | | | | | | | | | | | | | | | Summary: This prevents "Cannot encode high byte register in REX-prefixed instruction" from happening on instructions that require REX encoding when AH & co get selected. On the down side, these 4 registers can no longer be selected automatically, but this avoids having to expose all the X86 encoding complexity. Reviewers: gchatelet Subscribers: tschuett, jdoerfert, llvm-commits, bdb Tags: #llvm Differential Revision: https://reviews.llvm.org/D59821 llvm-svn: 357003
* [llvm-exegesis] Add throughput mode.Clement Courbet2019-01-301-1/+1
| | | | | | | | | | | | | | | | Summary: This just uses the latency benchmark runner on the parallel uops snippet generator. Fixes PR37698. Reviewers: gchatelet Subscribers: tschuett, RKSimon, llvm-commits Differential Revision: https://reviews.llvm.org/D57000 llvm-svn: 352632
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* Revert "[llvm-exegesis] Add a snippet generator to generate snippets to ↵Clement Courbet2018-11-081-12/+1
| | | | | | | | compute ROB sizes." This reverts accidental commit rL346394. llvm-svn: 346398
* [llvm-exegesis] Add a snippet generator to generate snippets to compute ROB ↵Clement Courbet2018-11-081-1/+12
| | | | | | sizes. llvm-svn: 346394
* Fix MSVC llvm-exegesis build. NFCI.Simon Pilgrim2018-10-251-8/+8
| | | | | | MSVC is a bit funny about is_pod..... llvm-svn: 345252
* [llvm-exegesis] Add missing initializer.Clement Courbet2018-10-251-8/+8
| | | | | | This is a better fix than rL345245. llvm-svn: 345246
* [llvm-exegesis] Fix VC build of r345243.Clement Courbet2018-10-251-8/+8
| | | | | | | | "const members cannot be default initialized unless their type has a user defined default constructor" Make members non-const. llvm-svn: 345245
* [MCSched] Bind PFM Counters to the CPUs instead of the SchedModel.Clement Courbet2018-10-251-0/+39
| | | | | | | | | | | | | | | | Summary: The pfm counters are now in the ExegesisTarget rather than the MCSchedModel (PR39165). This also compresses the pfm counter tables (PR37068). Reviewers: RKSimon, gchatelet Subscribers: mgrang, llvm-commits Differential Revision: https://reviews.llvm.org/D52932 llvm-svn: 345243
* [llvm-exegesis] Move namespace exegesis inside llvm::Fangrui Song2018-10-221-0/+2
| | | | | | | | | | | | | | | | Summary: This allows simplifying references of llvm::foo with foo when the needs come in the future. Reviewers: courbet, gchatelet Reviewed By: gchatelet Subscribers: javed.absar, tschuett, llvm-commits Differential Revision: https://reviews.llvm.org/D53455 llvm-svn: 344922
* [llvm-exegesis][NFC] moving code around.Guillaume Chatelet2018-09-271-1/+1
| | | | | | | | | | | | Summary: Renaming InstructionBuilder into InstructionTemplate and moving code generation tools from MCInstrDescView to CodeTemplate. Reviewers: courbet Subscribers: tschuett, llvm-commits Differential Revision: https://reviews.llvm.org/D52592 llvm-svn: 343188
* [llvm-exegesis] Improve Register Setup (roll forward of D51856).Guillaume Chatelet2018-09-201-9/+12
| | | | | | | | | | | | | | Summary: Added function to set a register to a particular value + tests. Add EFLAGS test, use new setRegTo instead of setRegToConstant. Reviewers: courbet, javed.absar Subscribers: llvm-commits, tschuett, mgorny Differential Revision: https://reviews.llvm.org/D52297 llvm-svn: 342644
* Revert rL342465: Added function to set a register to a particular value + tests.Simon Pilgrim2018-09-181-0/+4
| | | | | | rL342465 is breaking the MSVC buildbots. llvm-svn: 342490
* Revert rL342466: [llvm-exegesis] Improve Register Setup.Simon Pilgrim2018-09-181-12/+6
| | | | | | | | | | | | | | | | rL342465 is breaking the MSVC buildbots, but I need to revert this dependent revision as well. Summary: Added function to set a register to a particular value + tests. Add EFLAGS test, use new setRegTo instead of setRegToConstant. Reviewers: courbet, javed.absar Subscribers: mgorny, tschuett, llvm-commits Differential Revision: https://reviews.llvm.org/D51856 llvm-svn: 342489
* [llvm-exegesis] Improve Register Setup.Guillaume Chatelet2018-09-181-6/+12
| | | | | | | | | | | | | | Summary: Added function to set a register to a particular value + tests. Add EFLAGS test, use new setRegTo instead of setRegToConstant. Reviewers: courbet, javed.absar Subscribers: mgorny, tschuett, llvm-commits Differential Revision: https://reviews.llvm.org/D51856 llvm-svn: 342466
* Added function to set a register to a particular value + tests.Guillaume Chatelet2018-09-181-4/+0
| | | | llvm-svn: 342465
* Improve Register SetupGuillaume Chatelet2018-09-181-14/+12
| | | | llvm-svn: 342464
* [llvm-exegesis][NFC] Split BenchmarkRunner classClement Courbet2018-09-131-1/+10
| | | | | | | | | | | | | | | Summary: The snippet-generation part goes to the SnippetGenerator class. This will allow benchmarking arbitrary code (see PR38437). Reviewers: gchatelet Subscribers: mgorny, tschuett, llvm-commits Differential Revision: https://reviews.llvm.org/D51979 llvm-svn: 342117
* [llvm-exegesis] Rename InstructionInstance into InstructionBuilder.Guillaume Chatelet2018-08-021-1/+1
| | | | | | | | | | Summary: Non functional change. Subscribers: tschuett, courbet, llvm-commits Differential Revision: https://reviews.llvm.org/D50176 llvm-svn: 338701
* [llvm-exegesis] Provide a way to handle memory instructions.Guillaume Chatelet2018-08-011-0/+22
| | | | | | | | | | | | | | | | | Summary: And implement memory instructions on X86. This fixes PR36906. Reviewers: gchatelet Reviewed By: gchatelet Subscribers: lebedev.ri, filcab, mgorny, tschuett, RKSimon, llvm-commits Differential Revision: https://reviews.llvm.org/D48935 llvm-svn: 338567
* [llvm-exegesis] ExegisX86Target::setRegToConstant() should depend on the ↵Clement Courbet2018-07-031-1/+2
| | | | | | | | | | | | | | 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] Get the BenchmarkRunner from the ExegesisTarget.Clement Courbet2018-06-261-0/+18
| | | | | | | | | | | | | | | 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] Generate snippet setup code.Clement Courbet2018-06-251-0/+7
| | | | | | | | | | | | | | | 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] clang-formatClement Courbet2018-06-251-2/+2
| | | | llvm-svn: 335452
* [llvm-exegesis] Add mechanism to add target-specific passes.Clement Courbet2018-06-201-1/+6
| | | | | | | | | | | | | | 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: 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-191-0/+41
| | | | | | | | 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-191-41/+0
| | | | | | | | functionality." Breaks buildbots. llvm-svn: 335040
* [llvm-exegesis] A mechanism to add target-specific functionality.Clement Courbet2018-06-191-0/+41
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
OpenPOWER on IntegriCloud