summaryrefslogtreecommitdiffstats
path: root/llvm/docs/CommandGuide
Commit message (Collapse)AuthorAgeFilesLines
...
* [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
* [FileCheck] Provide an option for FileCheck to dump original input to stderr ↵George Karpenkov2018-07-201-0/+4
| | | | | | | | | | | | | | | | on failure The option can be either set using environment variable (e.g. env FILECHECK_DUMP_INPUT_ON_FAILURE=1 ninja check-fuzzer) or with a FileCheck flag. This can be extremely useful for debugging, cf. https://groups.google.com/forum/#!topic/llvm-dev/kLrzg8OM_h8 for discussion. Differential Revision: https://reviews.llvm.org/D49328 llvm-svn: 337609
* [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
* [docs] Update usage directive for llvm-cov report -show-functionsVedant Kumar2018-07-131-2/+2
| | | | llvm-svn: 337062
* [FileCheck] Implement -v and -vv for tracing matchesJoel E. Denny2018-07-131-0/+10
| | | | | | | | | | | | | | | | | | -v prints all directive pattern matches. -vv additionally prints info that might be noise to users but that can be helpful to FileCheck developers. To maximize code reuse and to make diagnostics more consistent, this patch also adjusts and extends some of the existing diagnostics. CHECK-NOT failures now report variables uses. Many more diagnostics now report the check prefix and kind of directive. Reviewed By: probinson Differential Revision: https://reviews.llvm.org/D47114 llvm-svn: 336967
* [FileCheck] Don't permit overlapping CHECK-DAGJoel E. Denny2018-07-111-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | That is, make CHECK-DAG skip matches that overlap the matches of any preceding consecutive CHECK-DAG directives. This change makes CHECK-DAG more consistent with other directives, and there is evidence it makes CHECK-DAG more intuitive and less error-prone. See the RFC discussion starting at: http://lists.llvm.org/pipermail/llvm-dev/2018-May/123010.html Moreover, this behavior enables CHECK-DAG groups for unordered, non-unique strings or patterns. For example, it is useful for verifying output or logs from a parallel program, such as the OpenMP runtime. This patch also implements the command-line option -allow-deprecated-dag-overlap, which reverts CHECK-DAG to the old overlapping behavior. This option should not be used in new tests. It is meant only for the existing tests that are broken by this change and that need time to update. See the following bugzilla issue for tracking of such tests: https://bugs.llvm.org/show_bug.cgi?id=37532 Patches to add -allow-deprecated-dag-overlap to those tests will follow immediately. Reviewed By: probinson Differential Revision: https://reviews.llvm.org/D47106 llvm-svn: 336847
* Revert r336830: [FileCheck] Don't permit overlapping CHECK-DAGJoel E. Denny2018-07-111-26/+0
| | | | | | | Companion patches are failing to commit, and this patch alone breaks many tests. llvm-svn: 336833
* [FileCheck] Don't permit overlapping CHECK-DAGJoel E. Denny2018-07-111-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | That is, make CHECK-DAG skip matches that overlap the matches of any preceding consecutive CHECK-DAG directives. This change makes CHECK-DAG more consistent with other directives, and there is evidence it makes CHECK-DAG more intuitive and less error-prone. See the RFC discussion starting at: http://lists.llvm.org/pipermail/llvm-dev/2018-May/123010.html Moreover, this behavior enables CHECK-DAG groups for unordered, non-unique strings or patterns. For example, it is useful for verifying output or logs from a parallel program, such as the OpenMP runtime. This patch also implements the command-line option -allow-deprecated-dag-overlap, which reverts CHECK-DAG to the old overlapping behavior. This option should not be used in new tests. It is meant only for the existing tests that are broken by this change and that need time to update. See the following bugzilla issue for tracking of such tests: https://bugs.llvm.org/show_bug.cgi?id=37532 Patches to add -allow-deprecated-dag-overlap to those tests will follow immediately. Reviewed By: probinson Differential Revision: https://reviews.llvm.org/D47106 llvm-svn: 336830
* [TableGen] Add a general-purpose JSON backend.Simon Tatham2018-07-111-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The aim of this backend is to output everything TableGen knows about the record set, similarly to the default -print-records backend. But where -print-records produces output in TableGen's input syntax (convenient for humans to read), this backend produces it as structured JSON data, which is convenient for loading into standard scripting languages such as Python, in order to extract information from the data set in an automated way. The output data contains a JSON representation of the variable definitions in output 'def' records, and a few pieces of metadata such as which of those definitions are tagged with the 'field' prefix and which defs are derived from which classes. It doesn't dump out absolutely every piece of knowledge it _could_ produce, such as type information and complicated arithmetic operator nodes in abstract superclasses; the main aim is to allow consumers of this JSON dump to essentially act as new backends, and backends don't generally need to depend on that kind of data. The new backend is implemented as an EmitJSON() function similar to all of llvm-tblgen's other EmitFoo functions, except that it lives in lib/TableGen instead of utils/TableGen on the basis that I'm expecting to add it to clang-tblgen too in a future patch. To test it, I've written a Python script that loads the JSON output and tests properties of it based on comments in the .td source - more or less like FileCheck, except that the CHECK: lines have Python expressions after them instead of textual pattern matches. Reviewers: nhaehnle Reviewed By: nhaehnle Subscribers: arichardson, labath, mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D46054 llvm-svn: 336771
* nm: Add -no-weak flag for hiding weak symbolsDave Lee2018-07-021-0/+4
| | | | | | | | | | | | | | | | | | Summary: This adds a new -no-weak flag to nm to hide weak symbols in its output. This also adds a -W alias for this which is analogous to -U. Patch by Keith Smiley Reviewers: kastiglione, enderby, compnerd Reviewed By: kastiglione Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D48751 llvm-svn: 336126
* Fix doc title underlining.James Henderson2018-06-261-1/+1
| | | | llvm-svn: 335615
* [FileCheck] Add CHECK-EMPTY directive for checking for blank linesJames Henderson2018-06-261-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prior to this change, there was no clean way of getting FileCheck to check that a line is completely empty. The expected way of using "CHECK: {{^$}}" does not work because the '^' matches the end of the previous match (this behaviour may be desirable in certain instances). For the same reason, "CHECK-NEXT: {{^$}}" will fail when the previous match was at the end of the line, as the pattern will match there. Using the recommended [[:space:]] to match an explicit new line could also match a space, and thus is not always desired. Literal '\n' matches also do not work. A workaround was suggested in the review, but it is a little clunky. This change adds a new directive that behaves the same as CHECK-NEXT, except that it only matches against empty lines (nothing, not even whitespace, is allowed). As with CHECK-NEXT, it will fail if more than one newline occurs before the next blank line. Example usage: ; test.txt foo bar ; CHECK: foo ; CHECK-EMPTY: ; CHECK-NEXT: bar Differential Revision: https://reviews.llvm.org/D28896 Reviewed by: probinson llvm-svn: 335613
* [docs] Update doc after split of -gen-intrinsic in r335407Fangrui Song2018-06-251-2/+6
| | | | llvm-svn: 335515
* [docs] Fix indentation of llvm-exegesis command line argumentsSimon Pilgrim2018-06-181-3/+3
| | | | llvm-svn: 334976
* [llvm-exegesis] Optionally ignore instructions without a sched class.Clement Courbet2018-06-181-0/+4
| | | | | | | | | | | | Summary: See PR37602. Reviewers: RKSimon Subscribers: llvm-commits, tschuett Differential Revision: https://reviews.llvm.org/D48267 llvm-svn: 334932
* [llvm-exegesis] Fix off-by-one in llvm-exegesis documentation.Clement Courbet2018-06-011-1/+1
| | | | llvm-svn: 333759
* [lit] Report line number for failed RUN commandJoel E. Denny2018-05-311-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | (Relands r333584, reverted in 333592.) When debugging test failures with -vv (or -v in the case of the internal shell), this makes it easier to locate the RUN line that failed. For example, clang's test/Driver/linux-ld.c has 892 total RUN lines, and clang's test/Driver/arm-cortex-cpus.c has 424 RUN lines after concatenation for line continuations. When reading the generated shell script, this also makes it easier to locate the RUN line that produced each command. To support reporting RUN line numbers in the case of the internal shell, this patch extends the internal shell to support the null command, ":", except pipelines are not supported. To support reporting RUN line numbers in the case of windows cmd.exe as the external shell, this patch extends -vv to set "echo on" instead of "echo off" in bat files. (Support for windows cmd.exe as a lit external shell will likely be dropped later, but I found out too late.) Reviewed By: delcypher, asmith, stella.stamenova, jmorse, lebedev.ri, rnk Differential Revision: https://reviews.llvm.org/D44598 llvm-svn: 333614
* Revert r333584: [lit] Report line number for failed RUN commandJoel E. Denny2018-05-301-4/+0
| | | | | | It breaks test-suite. llvm-svn: 333592
* [lit] Report line number for failed RUN commandJoel E. Denny2018-05-301-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | (Relands r330755 (reverted in r330848) with fix for PR37239.) When debugging test failures with -vv (or -v in the case of the internal shell), this makes it easier to locate the RUN line that failed. For example, clang's test/Driver/linux-ld.c has 892 total RUN lines, and clang's test/Driver/arm-cortex-cpus.c has 424 RUN lines after concatenation for line continuations. When reading the generated shell script, this also makes it easier to locate the RUN line that produced each command. To support reporting RUN line numbers in the case of the internal shell, this patch extends the internal shell to support the null command, ":", except pipelines are not supported. To support reporting RUN line numbers in the case of windows cmd.exe as the external shell, this patch extends -vv to set "echo on" instead of "echo off" in bat files. (Support for windows cmd.exe as a lit external shell will likely be dropped later, but I found out too late.) Reviewed By: delcypher, asmith, stella.stamenova, jmorse, lebedev.ri, rnk Differential Revision: https://reviews.llvm.org/D44598 llvm-svn: 333584
* [llvm-exegesis] Show sched class details in analysis.Clement Courbet2018-05-242-13/+3
| | | | | | | | | | | | 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] Update doc to mention that the output is in html.Clement Courbet2018-05-221-2/+2
| | | | llvm-svn: 332980
* [llvm-exegesis] Improve documentation.Clement Courbet2018-05-181-3/+137
| | | | | | | | | | | | | | | | | Summary: - Better flag names. - Fix flag reference in doc. - Add usage examples in doc. Fixes PR37497. Reviewers: gchatelet Subscribers: llvm-commits, tschuett Differential Revision: https://reviews.llvm.org/D47015 llvm-svn: 332708
* 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
* Rename DEBUG macro to LLVM_DEBUG.Nicola Zaghen2018-05-141-1/+1
| | | | | | | | | | | | | | | | The DEBUG() macro is very generic so it might clash with other projects. The renaming was done as follows: - git grep -l 'DEBUG' | xargs sed -i 's/\bDEBUG\s\?(/LLVM_DEBUG(/g' - git diff -U0 master | ../clang/tools/clang-format/clang-format-diff.py -i -p1 -style LLVM - Manual change to APInt - Manually chage DOCS as regex doesn't match it. In the transition period the DEBUG() macro is still present and aliased to the LLVM_DEBUG() one. Differential Revision: https://reviews.llvm.org/D43624 llvm-svn: 332240
* Revert r330755 "[lit] Report line number for failed RUN command"Reid Kleckner2018-04-251-2/+0
| | | | | | | It is causing many tests to fail on Windows buildbots: http://lab.llvm.org:8011/builders/clang-x64-ninja-win7/builds/10211 llvm-svn: 330848
* [llvm-mca] Default to the native host cpu if flag -mcpu is not specified.Andrea Di Biagio2018-04-251-3/+2
| | | | llvm-svn: 330809
* [lit] Report line number for failed RUN commandJoel E. Denny2018-04-241-0/+2
| | | | | | | | | | | | | | | | | | | | | When debugging test failures with -vv (or -v in the case of the internal shell), this makes it easier to locate the RUN line that failed. For example, clang's test/Driver/linux-ld.c has 892 total RUN lines, and clang's test/Driver/arm-cortex-cpus.c has 424 RUN lines after concatenation for line continuations. When reading the generated shell script, this also makes it easier to locate the RUN line that produced each command. To support reporting RUN line numbers in the case of the internal shell, this patch extends the internal shell to support the null command, ":", except pipelines are not supported. Reviewed By: asmith, delcypher Differential Revision: https://reviews.llvm.org/D44598 llvm-svn: 330755
* [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
* [llvm-cov] Implement -ignore-filename-regex= option for excluding source files.Max Moroz2018-04-091-0/+12
| | | | | | | | | | | | | | | | | | | Summary: The option is helpful for large projects where it's not feasible to specify sources which user would like to see in the report. Instead, it allows to black-list specific sources via regular expressions (e.g. now it's possible to skip all files that have "test" in its name). This also partially fixes https://bugs.llvm.org/show_bug.cgi?id=34277 Reviewers: vsk, morehouse, liaoyuke Reviewed By: vsk Subscribers: kcc, mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D43907 llvm-svn: 329581
* [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
* Re-land r329156 "Add llvm-exegesis tool."Clement Courbet2018-04-042-0/+59
| | | | | | Fixed to depend on and initialize the native target instead of X86. llvm-svn: 329169
* Revert r329156 "Add llvm-exegesis tool."Clement Courbet2018-04-042-59/+0
| | | | | | Breaks a bunch of bots. llvm-svn: 329157
* Add llvm-exegesis tool.Clement Courbet2018-04-042-0/+59
| | | | | | | | | | | | | | | | | Summary: [llvm-exegesis][RFC] Automatic Measurement of Instruction Latency/Uops This is the code corresponding to the RFC "llvm-exegesis Automatic Measurement of Instruction Latency/Uops". The RFC is available on the LLVM mailing lists as well as the following document for easier reading: https://docs.google.com/document/d/1QidaJMJUyQdRrFKD66vE1_N55whe0coQ3h1GpFzz27M/edit?usp=sharing Subscribers: mgorny, gchatelet, orwant, llvm-commits Differential Revision: https://reviews.llvm.org/D44519 llvm-svn: 329156
* [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
* [dsymutil] Upstream emitting of papertrail warnings.Jonas Devlieghere2018-04-021-0/+7
| | | | | | | | | | When running dsymutil as part of your build system, it can be desirable for warnings to be part of the end product, rather than just being emitted to the output stream. This patch upstreams that functionality. Differential revision: https://reviews.llvm.org/D44639 llvm-svn: 328965
OpenPOWER on IntegriCloud