summaryrefslogtreecommitdiffstats
path: root/llvm/docs/CommandGuide
Commit message (Collapse)AuthorAgeFilesLines
...
* [docs][llvm-readelf][llvm-readobj] Improve --stack-sizes documentationJames Henderson2019-09-132-1/+8
| | | | | | | | | | | | | llvm-readobj's document was missing --stack-sizes entirely from its document, so this patch adds it. It also adds a note to the llvm-readelf description that the switch is only implemented for GNU style output currently. For reference, --stack-sizes was added in r367942. Reviewed by: MaskRay Differential Revision: https://reviews.llvm.org/D67548 llvm-svn: 371862
* Fix a few spellos in docs.Nico Weber2019-09-131-3/+3
| | | | | | (Trying to debug an incremental build thing on a bot...) llvm-svn: 371860
* [docs][llvm-objcopy][llvm-strip] Improve --strip-unneeded descriptionJames Henderson2019-09-132-2/+3
| | | | | | | | | | | | | | Behaviour was recently added to this switch to strip debug sections too. See r369761. This change also makes the description for the --strip-unneeded switch consistent between the two docs. Reviewed by: MaskRay Differential Revision: https://reviews.llvm.org/D67546 llvm-svn: 371855
* [docs][llvm-strip] Remove unnecessary whitespace for consistencyJames Henderson2019-09-121-2/+1
| | | | llvm-svn: 371739
* Revert "[utils] Implement the llvm-locstats tool"Djordje Todorovic2019-09-102-80/+0
| | | | | | This reverts commit rL371520. llvm-svn: 371527
* [utils] Implement the llvm-locstats toolDjordje Todorovic2019-09-102-0/+80
| | | | | | | | | | | | | | | | | | | The tool reports verbose output for the DWARF debug location coverage. The llvm-locstats for each variable or formal parameter DIE computes what percentage from the code section bytes, where it is in scope, it has location description. The line 0 shows the number (and the percentage) of DIEs with no location information, but the line 100 shows the number (and the percentage) of DIEs where there is location information in all code section bytes (where the variable or parameter is in the scope). The line 50..59 shows the number (and the percentage) of DIEs where the location information is in between 50 and 59 percentage of its scope covered. The tool will be very useful for tracking improvements regarding the "debugging optimized code" support with LLVM ecosystem. Differential Revision: https://reviews.llvm.org/D66526 llvm-svn: 371520
* [llvm-profdata] Add mode to recover from profile read failuresVedant Kumar2019-09-031-0/+8
| | | | | | | | | | Add a mode in which profile read errors are not immediately treated as fatal. In this mode, merging makes forward progress and reports failure only if no inputs can be read. Differential Revision: https://reviews.llvm.org/D66985 llvm-svn: 370827
* [FileCheck] Forbid using var defined on same lineThomas Preud'homme2019-09-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Commit r366897 introduced the possibility to set a variable from an expression, such as [[#VAR2:VAR1+3]]. While introducing this feature, it introduced extra logic to allow using such a variable on the same line later on. Unfortunately that extra logic is flawed as it relies on a mapping from variable to expression defining it when the mapping is from variable definition to expression. This flaw causes among other issues PR42896. This commit avoids the problem by forbidding all use of a variable defined on the same line, and removes the now useless logic. Redesign will be done in a later commit because it will require some amount of refactoring first for the solution to be clean. One example is the need for some sort of transaction mechanism to set a variable temporarily and from an expression and rollback if the CHECK pattern does not match so that diagnostics show the right variable values. Reviewers: jhenderson, chandlerc, jdenny, probinson, grimar, arichardson, rnk Subscribers: JonChesterfield, rogfer01, hfinkel, kristina, rnk, tra, arichardson, grimar, dblaikie, probinson, llvm-commits, hiraditya Tags: #llvm Differential Revision: https://reviews.llvm.org/D66141 llvm-svn: 370663
* [llvm-objcopy] Allow the visibility of symbols created by --binary andChris Jackson2019-08-301-0/+12
| | | | | | --add-symbol to be specified with --new-symbol-visibility llvm-svn: 370458
* Fix some regressions caused by r369553 on old versions of Debian and UbuntuSylvestre Ledru2019-08-223-3/+3
| | | | | | | | | | It was causing some errors like: Encoding error: 'ascii' codec can't decode byte 0xe2 in position 341: ordinal not in range(128) The full traceback has been saved in /tmp/sphinx-err-y2fq4dtb.log, if you want to report the issue to the developers. llvm-svn: 369644
* [docs] Convert remaining command guide entries from md to rst.Jordan Rupprecht2019-08-218-65/+91
| | | | | | | | | | | | | | | | | | | Summary: Linking between markdown and rst files is currently not supported very well, e.g. the current llvm-addr2line docs [1] link to "llvm-symbolizer" instead of "llvm-symbolizer.html". This is weirdly broken in different ways depending on which versions of sphinx and recommonmark are being used, so workaround the bug by using rst everywhere. [1] http://llvm.org/docs/CommandGuide/llvm-addr2line.html Reviewers: jhenderson Reviewed By: jhenderson Subscribers: lebedev.ri, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66305 llvm-svn: 369553
* [llvm-objcopy] Allow 'protected' visibility to be set when usingChris Jackson2019-08-151-0/+1
| | | | | | | | | | add-symbol Reviewers: Maskray, rupprecht Differential Revision: https://reviews.llvm.org/D65891 llvm-svn: 368982
* [Docs][llvm-strip] Fix an indentation issue.Michael Pozulp2019-08-091-1/+1
| | | | llvm-svn: 368473
* [Docs][llvm-strip] Add help text to llvm-strip rst docMichael Pozulp2019-08-092-16/+167
| | | | | | | | | | | | | | | | Summary: Addresses https://bugs.llvm.org/show_bug.cgi?id=42383 Reviewers: jhenderson, alexshap, rupprecht Reviewed By: jhenderson Subscribers: wolfgangp, jakehehrlich, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D65384 llvm-svn: 368464
* [MCA] Add flag -show-encoding to llvm-mca.Andrea Di Biagio2019-08-091-4/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Flag -show-encoding enables the printing of instruction encodings as part of the the instruction info view. Example (with flags -mtriple=x86_64-- -mcpu=btver2): Instruction Info: [1]: #uOps [2]: Latency [3]: RThroughput [4]: MayLoad [5]: MayStore [6]: HasSideEffects (U) [7]: Encoding Size [1] [2] [3] [4] [5] [6] [7] Encodings: Instructions: 1 2 1.00 4 c5 f0 59 d0 vmulps %xmm0, %xmm1, %xmm2 1 4 1.00 4 c5 eb 7c da vhaddps %xmm2, %xmm2, %xmm3 1 4 1.00 4 c5 e3 7c e3 vhaddps %xmm3, %xmm3, %xmm4 In this example, column Encoding Size is the size in bytes of the instruction encoding. Column Encodings reports the actual instruction encodings as byte sequences in hex (objdump style). The computation of encodings is done by a utility class named mca::CodeEmitter. In future, I plan to expose the CodeEmitter to the instruction builder, so that information about instruction encoding sizes can be used by the simulator. That would be a first step towards simulating the throughput from the decoders in the hardware frontend. Differential Revision: https://reviews.llvm.org/D65948 llvm-svn: 368432
* [llvm-lipo] Update llvm-lipo docs for -info -thin -create -replace -segalign ↵Anusha Basana2019-08-071-3/+35
| | | | | | | | | | | | | | | | | | | flags Summary: The information for -info -thin -create -replace and -segalign flags are added to llvm-lipo.rst Test Plan: Reviewers: smeenai, alexshap, compnerd, mtrent Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D65676 llvm-svn: 368235
* [llvm-readelf] Support dumping of stack sizes sections with readelf ↵Wolfgang Pieb2019-08-051-0/+5
| | | | | | | | | | --stack-sizes Reviewers: jhenderson, grimar, rupprecht Differential Revision: https://reviews.llvm.org/D65313 llvm-svn: 367942
* [MCA][doc] Add a section for the 'Bottleneck Analysis'.Andrea Di Biagio2019-08-051-6/+79
| | | | | | Also clarify the meaning of 'Block RThroughput' and 'RThroughput'. llvm-svn: 367853
* [doc] Give a workaround for a FileCheck regex that ends in a brace.Paul Robinson2019-08-021-1/+4
| | | | | | Addresses PR42864. llvm-svn: 367689
* [MCA] Add support for printing immedate values as hex. Also enable lexing of ↵Andrea Di Biagio2019-08-021-0/+5
| | | | | | | | | | | | | | | | | | masm binary and hex literals. This patch adds a new llvm-mca flag named -print-imm-hex. By default, the instruction printer prints immediate operands as decimals. Flag -print-imm-hex enables the instruction printer to print those operands in hex. This patch also adds support for MASM binary and hex literal numbers (example 0FFh, 101b). Added tests to verify the behavior of the new flag. Tests also verify that masm numeric literal operands are now recognized. Differential Revision: https://reviews.llvm.org/D65588 llvm-svn: 367671
* [llvm-objcopy] Add support for --add-section for COFFSergey Dmitriev2019-07-261-7/+7
| | | | | | | | This patch enables support for --add-section=... option for COFF objects. Differential Revision: https://reviews.llvm.org/D65040 llvm-svn: 367130
* FileCheck [8/12]: Define numeric var from exprThomas Preud'homme2019-07-241-5/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch is part of a patch series to add support for FileCheck numeric expressions. This specific patch lift the restriction for a numeric expression to either be a variable definition or a numeric expression to try to match. This commit allows a numeric variable to be set to the result of the evaluation of a numeric expression after it has been matched successfully. When it happens, the variable is allowed to be used on the same line since its value is known at match time. It also makes use of this possibility to reuse the parsing code to parse a command-line definition by crafting a mirror string of the -D option with the equal sign replaced by a colon sign, e.g. for option '-D#NUMVAL=10' it creates the string '-D#NUMVAL=10 (parsed as [[#NUMVAL:10]])' where the numeric expression is parsed to define NUMVAL. This result in a few tests needing updating for the location diagnostics on top of the tests for the new feature. It also enables empty numeric expression which match any number without defining a variable. This is done here rather than in commit #5 of the patch series because it requires to dissociate automatic regex insertion in RegExStr from variable definition which would make commit #5 even bigger than it already is. Copyright: - Linaro (changes up to diff 183612 of revision D55940) - GraphCore (changes in later versions of revision D55940 and in new revision created off D55940) Reviewers: jhenderson, chandlerc, jdenny, probinson, grimar, arichardson, rnk Subscribers: hiraditya, llvm-commits, probinson, dblaikie, grimar, arichardson, tra, rnk, kristina, hfinkel, rogfer01, JonChesterfield Tags: #llvm Differential Revision: https://reviews.llvm.org/D60388 > llvm-svn: 366860 llvm-svn: 366897
* Revert "FileCheck [8/12]: Define numeric var from expr"Thomas Preud'homme2019-07-241-21/+5
| | | | | | This reverts commit 1b05977538d9487aa845ee2f3bec8b89c63c4f29. llvm-svn: 366872
* FileCheck [8/12]: Define numeric var from exprThomas Preud'homme2019-07-231-5/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch is part of a patch series to add support for FileCheck numeric expressions. This specific patch lift the restriction for a numeric expression to either be a variable definition or a numeric expression to try to match. This commit allows a numeric variable to be set to the result of the evaluation of a numeric expression after it has been matched successfully. When it happens, the variable is allowed to be used on the same line since its value is known at match time. It also makes use of this possibility to reuse the parsing code to parse a command-line definition by crafting a mirror string of the -D option with the equal sign replaced by a colon sign, e.g. for option '-D#NUMVAL=10' it creates the string '-D#NUMVAL=10 (parsed as [[#NUMVAL:10]])' where the numeric expression is parsed to define NUMVAL. This result in a few tests needing updating for the location diagnostics on top of the tests for the new feature. It also enables empty numeric expression which match any number without defining a variable. This is done here rather than in commit #5 of the patch series because it requires to dissociate automatic regex insertion in RegExStr from variable definition which would make commit #5 even bigger than it already is. Copyright: - Linaro (changes up to diff 183612 of revision D55940) - GraphCore (changes in later versions of revision D55940 and in new revision created off D55940) Reviewers: jhenderson, chandlerc, jdenny, probinson, grimar, arichardson, rnk Subscribers: hiraditya, llvm-commits, probinson, dblaikie, grimar, arichardson, tra, rnk, kristina, hfinkel, rogfer01, JonChesterfield Tags: #llvm Differential Revision: https://reviews.llvm.org/D60388 llvm-svn: 366860
* Revert [tools] [llvm-nm] Default to reading from stdin not a.outAlex Brachet2019-07-161-2/+3
| | | | | | This reverts r365889 (git commit 60c81354b1d3fced1bd284d334f118d2d792ab4b) llvm-svn: 366219
* [docs][llvm-nm] Fix inconsistent grammarJames Henderson2019-07-151-1/+1
| | | | llvm-svn: 366080
* FileCheck [7/12]: Arbitrary long numeric expressionsThomas Preud'homme2019-07-131-13/+12
| | | | | | | | | | | | | | | | | | | | | | Summary: This patch is part of a patch series to add support for FileCheck numeric expressions. This specific patch extend numeric expression to support an arbitrary number of operands, either variable or literals. Copyright: - Linaro (changes up to diff 183612 of revision D55940) - GraphCore (changes in later versions of revision D55940 and in new revision created off D55940) Reviewers: jhenderson, chandlerc, jdenny, probinson, grimar, arichardson, rnk Subscribers: hiraditya, llvm-commits, probinson, dblaikie, grimar, arichardson, tra, rnk, kristina, hfinkel, rogfer01, JonChesterfield Tags: #llvm Differential Revision: https://reviews.llvm.org/D60387 llvm-svn: 366001
* [tools] [llvm-nm] Default to reading from stdin not a.outAlex Brachet2019-07-121-3/+2
| | | | | | | | | | | | | | | | Summary: This moves away from defaulting to a.out and uses stdin only if stdin has a file redirected to it. This has been discussed on the llvm-dev mailing list [[ https://lists.llvm.org/pipermail/llvm-dev/2019-July/133642.html | here ]]. Reviewers: jhenderson, rupprecht, MaskRay, chrisjackson Reviewed By: jhenderson, MaskRay Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D64290 llvm-svn: 365889
* [docs][llvm-symbolizer] Fix grammarJames Henderson2019-07-101-1/+1
| | | | llvm-svn: 365630
* [docs][llvm-dwarfdump] Normalise some wordingJames Henderson2019-07-101-1/+1
| | | | llvm-svn: 365603
* [docs][llvm-dwarfdump] Fix wordingJames Henderson2019-07-091-1/+1
| | | | llvm-svn: 365489
* [docs][llvm-objdump] Make some wording improvements/simplifications.James Henderson2019-07-091-13/+9
| | | | llvm-svn: 365474
* [docs][llvm-nm] Improve some wordingJames Henderson2019-07-091-15/+13
| | | | | | | In particular, the --debug-syms switch really doesn't have anything to do with debuggers, so I've updated the document accordingly. llvm-svn: 365461
* [docs][llvm-dwarfdump] Make some option descriptions clearer and more preciseJames Henderson2019-07-091-12/+10
| | | | | | | | | | | | Some of the wording in the doc (taken largely from the help text), was a little imprecise in some cases, so this patch makes it a little more precise. Reviewed by: JDevlieghere, probinson Differential Revision: https://reviews.llvm.org/D64332 llvm-svn: 365451
* [docs][llvm-readobj][llvm-readelf] Improve wordingJames Henderson2019-07-082-4/+4
| | | | llvm-svn: 365335
* [lit] Parse command-line options from LIT_OPTSJoel E. Denny2019-07-081-0/+5
| | | | | | | | | | | | | | | | | Similar to `FILECHECK_OPTS` for FileCheck, `LIT_OPTS` makes it easy to adjust lit behavior when running the test suite via ninja. For example: ``` $ LIT_OPTS='--time-tests -vv --filter=threadprivate' \ ninja check-clang-openmp ``` Reviewed By: probinson Differential Revision: https://reviews.llvm.org/D64135 llvm-svn: 365313
* [docs][llvm-objcopy] Add description of binary input/output to docJames Henderson2019-07-081-2/+17
| | | | | | | | | | | | We briefly referred to being able to specify --target=binary without explaining what binary input/output meant. This change adds a section on this. Reviewed by: MaskRay, abrachet Differential Revision: https://reviews.llvm.org/D64245 llvm-svn: 365312
* [docs][llvm-readobj] Add a note to options that do nothing in GNU outputJames Henderson2019-07-052-4/+10
| | | | | | | | | | --section-data, --section-relocations and --section-symbols have no effect for GNU style ouput. This patch changes the docs to point this out, as it has caught me out on a couple of occasions. See also https://bugs.llvm.org/show_bug.cgi?id=42522. llvm-svn: 365221
* [docs][llvm-objcopy] Improve some wording.James Henderson2019-07-051-4/+4
| | | | llvm-svn: 365187
* [docs] [tools] Fix see also linksAlex Brachet2019-07-047-7/+7
| | | | | | | | | | | | | | | | Summary: Changes "see also" links to use :manpage: instead of plain text or the form `name|name` which was being treated literally, not as a link. Reviewers: jhenderson, rupprecht Reviewed By: jhenderson Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D63970 llvm-svn: 365159
* [docs][llvm-dwarfdump] Remove unnecessary reference to --show-childrenJames Henderson2019-07-041-3/+1
| | | | | | | | | | | | | The --show-children option description describes what it does, and references the =<offset> parameter of section dump switches. I don't think it needs to be explained again in the documentation of the section dump switches too. Reviewed by: JDevlieghere Differential Revision: https://reviews.llvm.org/D64132 llvm-svn: 365115
* [docs] [NFC] Removed excess spacingAlex Brachet2019-07-0417-189/+0
| | | | | | | | | | | | | | | | Summary: Removed excess new lines from documentations. As far as I can tell, it seems as though restructured text is agnostic to new lines, the use of new lines was inconsistent and had no effect on how the files were being displayed. Reviewers: jhenderson, rupprecht, JDevlieghere Reviewed By: jhenderson Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D63971 llvm-svn: 365105
* [docs][llvm-objcopy] Write documentation for llvm-objcopyJames Henderson2019-07-032-16/+482
| | | | | | | | | | | | This patch addresses https://bugs.llvm.org/show_bug.cgi?id=42183 by replacing the stub markdown doc for llvm-objcopy with a full one describing the current options available in llvm-objcopy. Reviewed by: jakehehrlich, MaskRay Differential Revision: https://reviews.llvm.org/D63820 llvm-svn: 365042
* [docs][llvm-readelf] Delete old llvm-readelf.mdJames Henderson2019-07-021-28/+0
| | | | | | This was accidentally missed when committing r364800. llvm-svn: 364918
* [docs][llvm-readelf] Expand llvm-readelf documentationJames Henderson2019-07-012-0/+218
| | | | | | | | | | | | | | | | | | Previously, the llvm-readelf documentation was essentially just a list of differences to llvm-readobj. Since llvm-readelf is the more likely goto tool for many people migrating to the LLVM toolchain, it seems like it would be helpful to document all the switches in the llvm-readelf document too. This change expands the options listed accordingly. Additionally, they are unlikely to care what the differences are to llvm-readobj, since they won't be familiar with the latter as there is no GNU equivalent, so this change moves the "differences" section to llvm-readobj's documentation. Reviewed by: peter.smith Differential Revision: https://reviews.llvm.org/D63826 llvm-svn: 364800
* [llvm-objdump] Update the doc for --disassemble-functions.Yuanfang Chen2019-06-271-4/+6
| | | | | | | | | | | | | | Update the doc after llvm-svn: 364121 is landed. With two more trivial fixes that are not related to --disassemble-functions but still about llvm-objdump. Reviewers: jhenderson, grimar, MaskRay, rupprecht, peter.smith Reviewed by: jhenderson, MaskRay Differential Revision: https://reviews.llvm.org/D63787 llvm-svn: 364573
* [docs][llvm-nm][llvm-objdump] Improve "See Also" sectionJames Henderson2019-06-272-2/+3
| | | | | | | | | | | | | The "See Also" section for llvm-nm didn't actually contain any links, and the tools referred to didn't make much sense (referring to non-LLVM tools, when we have equivalents, or tools that aren't really to do with symbol dumping). llvm-objdump's didn't refer to llvm-readelf. Reviewed by: grimar Differential Revision: https://reviews.llvm.org/D63875 llvm-svn: 364552
* [docs][tools] Add missing "program" tags to rst filesJames Henderson2019-06-2732-0/+68
| | | | | | | | | | | | | | | | | | | | | | Sphinx allows for definitions of command-line options using `.. option <name>` and references to those options via `:option:<name>`. However, it looks like there is no scoping of these options by default, meaning that links can end up pointing to incorrect documents. See for example the llvm-mca document, which contains references to -o that, prior to this patch, pointed to a different document. What's worse is that these links appear to be non-deterministic in which one is picked (on my machine, some references end up pointing to opt, whereas on the live docs, they point to llvm-dwarfdump, for example). The fix is to add the .. program <name> tag. This essentially namespaces the options (definitions and references) to the named program, ensuring that the links are kept correct. Reviwed by: andreadb Differential Revision: https://reviews.llvm.org/D63873 llvm-svn: 364538
* [docs][llvm-symbolizer] Improve llvm-symbolizer documentationJames Henderson2019-06-261-99/+271
| | | | | | | | | | | | | | | | | | | | | | | | | As detailed in https://bugs.llvm.org/show_bug.cgi?id=42253, there were a number of issues in the llvm-symbolizer documentation. This patch fixes them by: 1. Adding [addresses...] to the synopsis, and matching the formatting of other tools. 2. Rewriting the description to fix grammar issues and mention other usage options. 3. Rewriting the examples to be easier to read. 4. Re-ordering the options into alphabetical order. 5. Improving the text of some of the option descriptions, and adding some examples to individual options. 6. Splitting the Mach-O options into a separate section of the document. 7. Standardizing on double dashes for long options throughout the file. 8. Adding a reference to the llvm-addr2line document. Reviewed by: mtrent, ikudrin Differential Revision: https://reviews.llvm.org/D63651 llvm-svn: 364410
* [docs][llvm-readobj] Improve llvm-readobj documentationJames Henderson2019-06-251-39/+220
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There were a number of issues with the llvm-readobj documentation. The following points were raised in https://bugs.llvm.org/show_bug.cgi?id=42255, and have been fixed in this patch: 1. The description section claimed "The tool and its output is primarily designed for use in FileCheck-based tests" which is not really the case any more. 2. The documentation used single-dash long options for option names, but references in the help text to other options exclusively used double-dashes. Fixed by standardising on double-dashes for all long-form options. 3. The majority of options available and in the help text were not present in the documentation. This patch adds them. 4. Several aliases, both long and short, were missing, e.g. --relocs. Additionally, this patch improves the documentation by: 1. Splitting the options into categories based on the file format they are specific to. 2. Updating the Exit Status section to correctly mention that errors lead to a non-zero exit code. 3. Adding a See Also section referencing other similar LLVM tools. 4. Improving/correcting some of the descriptions of options that did not quite match up with what llvm-readobj does. Reviewed by: peter.smith, MaskRay, mtrent Differential Revision: https://reviews.llvm.org/D63719 llvm-svn: 364306
OpenPOWER on IntegriCloud