summaryrefslogtreecommitdiffstats
path: root/llvm/docs/CommandGuide/llvm-mca.rst
Commit message (Collapse)AuthorAgeFilesLines
* [llvm-mca][docs] Replace "temporary" with "physical registers". NFC.Matt Davis2018-07-311-4/+4
| | | | llvm-svn: 338415
* [llvm-mca][docs] Improve the "How LLVM-MCA works" section.Andrea Di Biagio2018-07-311-4/+24
| | | | llvm-svn: 338410
* [llvm-mca][docs] Always use `llvm-mca` in place of `MCA`.Andrea Di Biagio2018-07-311-50/+47
| | | | llvm-svn: 338394
* [llvm-mca][docs] Add instruction flow documentation. NFC.Matt Davis2018-07-301-0/+177
| | | | | | | | | | | | | | | | | | | | Summary: This patch mostly copies the existing Instruction Flow, and stage descriptions from the mca README. I made a few text tweaks, but no semantic changes, and made reference to the "default pipeline." I also removed the internals references (e.g., reference to class names and header files). I did leave the LSUnit name around, but only as an abbreviated word for the load-store unit. Reviewers: andreadb, courbet, RKSimon, gbedwell, filcab Reviewed By: andreadb Subscribers: tschuett, jfb, llvm-commits Differential Revision: https://reviews.llvm.org/D49692 llvm-svn: 338319
* [llvm-mca][docs] Define IPC where it is first mentioned. NFC.Matt Davis2018-07-231-7/+7
| | | | | | Expand the abbreviation where it is first used, and use IPC elsewhere. llvm-svn: 337739
* [llvm-mca][docs] Add documentation for the statistic outputs from mca. NFCMatt Davis2018-07-211-3/+125
| | | | | | | | | | | | | | Summary: The original text was lifted from the MCA README. I re-ran the dot-product example and updated the output seen in the docs. I also added a few paragraphs discussing the instruction issued and retired histograms, as well as discussing the register file stats. Reviewers: andreadb, RKSimon, courbet, gbedwell, filcab Reviewed By: andreadb Subscribers: tschuett Differential Revision: https://reviews.llvm.org/D49614 llvm-svn: 337648
* [llvm-mca][docs] Add Timeline and How MCA works.Matt Davis2018-07-191-3/+223
| | | | | | | | | | For the most part, these changes were from the RFC. I made a few minor word/structure changes, but nothing significant. I also regenerated the example output, and adjusted the text accordingly. Differential Revision: https://reviews.llvm.org/D49527 llvm-svn: 337496
* [llvm-mca][docs] Revert mca internals docs.Matt Davis2018-07-171-98/+3
| | | | | | | | | We're going to work on this in a separate review focusing more on documenting the View and probably removing some of the less-interesting/less-useful pieces. This reverts r337219,337225 llvm-svn: 337295
* [llvm-mca][docs] Add notes about cycle and resource callbacks. NFC.Matt Davis2018-07-161-0/+8
| | | | llvm-svn: 337225
* [llvm-mca][docs] Initial description of mca internals. NFCMatt Davis2018-07-161-3/+90
| | | | | | | | | | | | This patch introduces a brief description of the components of MCA. The main focus is on Views. This is a work in progress, and more descriptions will be introduced later. I want to flesh-out the Views section more and provide a detailed description of eventing in MCA. Eventually a brief code example of a View should accompany the description. Also, we should consider moving the MCA internals guide elsewhere at some point. llvm-svn: 337219
* Fix typo in declaring code-block snippetSimon Pilgrim2018-05-171-1/+1
| | | | llvm-svn: 332630
* [llvm-mca] Add an example showing how to get Intel assembly syntaxAndrea Di Biagio2018-05-171-0/+6
| | | | | | Patch by Jeff Muizelaar. llvm-svn: 332627
* [llvm-mca] add flag -all-views and flag -all-stats.Andrea Di Biagio2018-05-171-0/+10
| | | | | | | Flag -all-views enables all the views. Flag -all-stats enables all the views that print hardware statistics. llvm-svn: 332602
* [llvm-mca] Default to the native host cpu if flag -mcpu is not specified.Andrea Di Biagio2018-04-251-3/+2
| | | | llvm-svn: 330809
* [llvm-mca][CommandGuide] Fix typo in example.Andrea Di Biagio2018-04-241-1/+1
| | | | llvm-svn: 330703
* [llvm-mca] Renamed BackendStatistics to RetireControlUnitStatistics.Andrea Di Biagio2018-04-111-6/+5
| | | | | | Also, removed flag -verbose in favor of flag -retire-stats. llvm-svn: 329794
* [llvm-mca] Move the logic that prints scheduler statistics from ↵Andrea Di Biagio2018-04-111-2/+6
| | | | | | | | BackendStatistics to its own view. Added flag -scheduler-stats to print scheduler related statistics. llvm-svn: 329792
* [llvm-mca] reorder textSanjay Patel2018-04-101-9/+9
| | | | | | | On 2nd reading, putting the C example after the bit about multiple regions makes this flow better. llvm-svn: 329732
* [llvm-mca] fix formattingSanjay Patel2018-04-101-8/+8
| | | | llvm-svn: 329729
* [llvm-mca] add example workflow for source codeSanjay Patel2018-04-101-0/+20
| | | | | | | | | | | | This is copied from Andrea's text in PR36875: https://bugs.llvm.org/show_bug.cgi?id=36875 As noted there, this is a hack...but it's a good one! It's important to show potential workflows up-front with examples, so customers can copy and experiment with them. llvm-svn: 329726
* [llvm-mca] Move the logic that prints dispatch unit statistics from ↵Andrea Di Biagio2018-04-101-0/+6
| | | | | | | | | | | BackendStatistics to its own view. This patch moves the logic that collects and analyzes dispatch events to the DispatchStatistics view. Added flag -dispatch-stats to print statistics related to the dispatch logic. llvm-svn: 329708
* [llvm-mca] Increase the default number of iterations to 100.Andrea Di Biagio2018-04-101-1/+1
| | | | llvm-svn: 329694
* [llvm-mca] Add the ability to mark regions of code for analysis (PR36875)Andrea Di Biagio2018-04-091-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch teaches llvm-mca how to parse code comments in search for special "markers" used to select regions of code. Example: # LLVM-MCA-BEGIN My Code Region .... # LLVM-MCA-END The MCAsmLexer now delegates to an object of class MCACommentParser (i.e. an AsmCommentConsumer) the parsing of code comments to search for begin/end code region markers. A comment starting with substring "LLVM-MCA-BEGIN" marks the beginning of a new region of code. A comment starting with substring "LLVM-MCA-END" marks the end of the last region. This implementation doesn't allow regions to overlap. Each region can have a optional description; internally, each region is identified by a range of source code locations (SMLoc). MCInst objects are added to a region R only if the source location for the MCInst is in the range of locations specified by R. By default, the tool allocates an implicit "Default" code region which contains every source location. See new tests llvm-mca-marker-*.s for a few examples. A new Backend object is created for every region. So, the analysis is conducted on every parsed code region. The final report is the union of the reports generated for every code region. Note that empty regions are skipped. Special "[#] Code Region - ..." strings are used in the report to mark the portion which is specific to a code region only. For example, see llvm-mca-markers-5.s. Differential Revision: https://reviews.llvm.org/D45433 llvm-svn: 329590
* [documentation][llvm-mca] Update the documentation.Andrea Di Biagio2018-04-051-6/+5
| | | | | | | Scheduling models can now describe processor register files and retire control units. This updates the existing documentation and the README file. llvm-svn: 329311
* [llvm-mca] Remove flag -max-retire-per-cycle, and update the docs.Andrea Di Biagio2018-04-051-5/+0
| | | | | | | | This is done in preparation for D45259. With D45259, models can specify the size of the reorder buffer, and the retire throughput directly via tablegen. llvm-svn: 329274
* [llvm-mca] Move the logic that prints register file statistics to its own ↵Andrea Di Biagio2018-04-031-0/+4
| | | | | | | | | | | | | view. NFCI Before this patch, the "BackendStatistics" view was responsible for printing the register file usage (as well as many other statistics). Now users can enable register file usage statistics using the command line flag `-register-file-stats`. By default, the tool doesn't print register file statistics. llvm-svn: 329083
* [llvm-mca] Add a flag -instruction-info to enable/disable the instruction ↵Andrea Di Biagio2018-03-261-0/+4
| | | | | | info view. llvm-svn: 328493
* [llvm-mca] Update the commandline docs after r328305.Andrea Di Biagio2018-03-261-0/+4
| | | | | | | Document that flag -resource-pressure can be used to enable/disable the resource pressure view. This change should have been part of r328305. llvm-svn: 328492
* [llvm-mca] Add flag -instruction-tables to print the theoretical resource ↵Andrea Di Biagio2018-03-261-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | pressure distribution for instructions (PR36874) The goal of this patch is to address most of PR36874. To fully fix PR36874 we need to split the "InstructionInfo" view from the "SummaryView". That would make easy to check the latency and rthroughput as well. The patch reuses all the logic from ResourcePressureView to print out the "instruction tables". We have an entry for every instruction in the input sequence. Each entry reports the theoretical resource pressure distribution. Resource pressure is uniformly distributed across all the processor resource units of a group. At the moment, the backend pipeline is not configurable, so the only way to fix this is by creating a different driver that simply sends instruction events to the resource pressure view. That means, we don't use the Backend interface. Instead, it is simpler to just have a different code-path for when flag -instruction-tables is specified. Once Clement addresses bug 36663, then we can port the "instruction tables" logic into a stage of our configurable pipeline. Updated the BtVer2 test cases (thanks Simon for the help). Now we pass flag -instruction-tables to each modified test. Differential Revision: https://reviews.llvm.org/D44839 llvm-svn: 328487
* [llvm-mca] LLVM Machine Code Analyzer.Andrea Di Biagio2018-03-081-0/+133
llvm-mca is an LLVM based performance analysis tool that can be used to statically measure the performance of code, and to help triage potential problems with target scheduling models. llvm-mca uses information which is already available in LLVM (e.g. scheduling models) to statically measure the performance of machine code in a specific cpu. Performance is measured in terms of throughput as well as processor resource consumption. The tool currently works for processors with an out-of-order backend, for which there is a scheduling model available in LLVM. The main goal of this tool is not just to predict the performance of the code when run on the target, but also help with diagnosing potential performance issues. Given an assembly code sequence, llvm-mca estimates the IPC (instructions per cycle), as well as hardware resources pressure. The analysis and reporting style were mostly inspired by the IACA tool from Intel. This patch is related to the RFC on llvm-dev visible at this link: http://lists.llvm.org/pipermail/llvm-dev/2018-March/121490.html Differential Revision: https://reviews.llvm.org/D43951 llvm-svn: 326998
OpenPOWER on IntegriCloud