summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-exegesis/lib/Assembler.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Move CodeGenFileType enum to Support/CodeGen.hReid Kleckner2019-11-131-1/+1
| | | | | | | Avoids the need to include TargetMachine.h from various places just for an enum. Various other enums live here, such as the optimization level, TLS model, etc. Data suggests that this change probably doesn't matter, but it seems nice to have anyway.
* llvm-exegesis - fix shadow variable warnings. NFCI.Simon Pilgrim2019-11-091-2/+2
|
* Prune two MachineInstr.h includes, fix up depsReid Kleckner2019-10-191-0/+1
| | | | | | | | | | MachineInstr.h included AliasAnalysis.h, which includes a world of IR constructs mostly unneeded in CodeGen. Prune it. Same for DebugInfoMetadata.h. Noticed with -ftime-trace. llvm-svn: 375311
* [Mips][llvm-exegesis] Add a Mips targetSimon Atanasyan2019-10-111-1/+3
| | | | | | | | | | | The target does just enough to be able to run llvm-exegesis in latency mode for at least some opcodes. Patch by Miloš Stojanović. Differential Revision: https://reviews.llvm.org/D68649 llvm-svn: 374590
* [llvm-exegesis] Ensure that ExecutableFunction are aligned.Clement Courbet2019-10-091-6/+10
| | | | | | | | | | | | | | Summary: Experiments show that this is the alignment we get (for ELF+Linux), but let's ensure that we have it. Reviewers: gchatelet Subscribers: tschuett, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D68703 llvm-svn: 374170
* [llvm-exegesis][NFC] Remove extra `llvm::` qualifications.Clement Courbet2019-10-091-104/+92
| | | | | | | | | | | | | | 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
* [NewPM] Port MachineModuleInfo to the new pass manager.Yuanfang Chen2019-09-301-11/+11
| | | | | | | | | | | | | Existing clients are converted to use MachineModuleInfoWrapperPass. The new interface is for defining a new pass manager API in CodeGen. Reviewers: fedor.sergeev, philip.pfaffe, chandlerc, arsenm Reviewed By: arsenm, fedor.sergeev Differential Revision: https://reviews.llvm.org/D64183 llvm-svn: 373240
* [llvm-exegesis] Add loop mode for repeating the snippet.Clement Courbet2019-09-271-47/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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] Migrate llvm::make_unique to std::make_uniqueJonas Devlieghere2019-08-151-7/+7
| | | | | | | | Now that we've moved to C++14, we no longer need the llvm::make_unique implementation from STLExtras.h. This patch is a mechanical replacement of (hopefully) all the llvm::make_unique instances across the monorepo. llvm-svn: 369013
* 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/+2
| | | | | | | | 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-2/+12
| | | | | | sizes. llvm-svn: 346394
* MachineModuleInfo: Store more specific reference to LLVMTargetMachine; NFCMatthias Braun2018-11-051-1/+3
| | | | | | | | MachineModuleInfo can only be used in code using lib/CodeGen, hence we can keep a more specific reference to LLVMTargetMachine rather than just TargetMachine around. llvm-svn: 346182
* [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] Crash when assembling invalid OperandGuillaume Chatelet2018-10-221-0/+2
| | | | llvm-svn: 344907
* [llvm-exegesis] Re-enable liveliness tracker.Clement Courbet2018-10-191-1/+2
| | | | | | | | | | Reviewers: gchatelet Subscribers: tschuett, llvm-commits Differential Revision: https://reviews.llvm.org/D53429 llvm-svn: 344780
* [llvm-exegesis] Fix function return generation so it doesn't return register 0John Brawn2018-10-101-1/+1
| | | | | | | | | | When fillMachineFunction generates a return on targets without a return opcode (such as AArch64) it should pass an empty set of registers as the return registers, not 0 which means register number zero. Differential Revision: https://reviews.llvm.org/D53074 llvm-svn: 344139
* [llvm-exegesis] Improve Register Setup (roll forward of D51856).Guillaume Chatelet2018-09-201-18/+17
| | | | | | | | | | | | | | 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-7/+7
| | | | | | rL342465 is breaking the MSVC buildbots. llvm-svn: 342490
* Revert rL342466: [llvm-exegesis] Improve Register Setup.Simon Pilgrim2018-09-181-19/+20
| | | | | | | | | | | | | | | | 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-20/+19
| | | | | | | | | | | | | | 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-7/+7
| | | | llvm-svn: 342465
* [llvm-exegesis] Provide a way to handle memory instructions.Guillaume Chatelet2018-08-011-7/+19
| | | | | | | | | | | | | | | | | 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-3/+4
| | | | | | | | | | | | | | 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-10/+7
| | | | | | | | | | | | | | | 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] Fix warning in r22752: Initialize IsSnippetSetupComplete.Clement Courbet2018-06-251-1/+1
| | | | llvm-svn: 335467
* [llvm-exegesis] Generate snippet setup code.Clement Courbet2018-06-251-5/+33
| | | | | | | | | | | | | | | 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] Add mechanism to add target-specific passes.Clement Courbet2018-06-201-0/+8
| | | | | | | | | | | | | | 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
* 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
* reland r332579: [llvm-exegesis] Update to cover latency through another opcode.Clement Courbet2018-05-171-0/+249
| | | | | | | | | | | | | | 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-171-249/+0
| | | | | | The revision failed to update the ARM tests. llvm-svn: 332580
* [llvm-exegesis] Update to cover latency through another opcode.Clement Courbet2018-05-171-0/+249
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
OpenPOWER on IntegriCloud