aboutsummaryrefslogtreecommitdiff
path: root/llvm/docs/CommandGuide
AgeCommit message (Collapse)AuthorFilesLines
2020-03-09[llvm-objdump] Rename --disassemble-functions to --disassemble-symbolsFangrui Song1-1/+1
https://bugs.llvm.org/show_bug.cgi?id=41910 The feature can disassemble data and the new option name reflects its more generic usage. Reviewed By: jhenderson Differential Revision: https://reviews.llvm.org/D75816
2020-02-26[docs][llvm-objcopy][llvm-strip] Move --wildcard description earlierJames Henderson2-8/+8
This moves it above the response file description, which should be at the end.
2020-02-26[docs][llvm-symbolizer] Fix indentation of inline option examplesJames Henderson1-42/+42
The examples for different options were inconsistently indented in the HTML display. As they are tied to the options, this change normalises to indent them the same as the option description body.
2020-02-26[docs][llvm-symbolizer] Fix --functions descriptionJames Henderson1-1/+1
"--functions none" and "--functions=none" are not the same. One is the option "--functions" with its default value of "linkage", followed by an input address of "none", and the other is "--functions" with the value "none". This patch fixes the doc to match the actual behaviour by adding an extra '=' sign in the allowed values description.
2020-02-13[NFC][llvm-exegesis] Docs/help: opcode-index=-1 means measure everythingRoman Lebedev1-1/+2
2020-02-06Clarify how llvm-mca detects att vs intel syntax.Justin Lebar1-0/+4
Reviewers: andreadb Subscribers: tschuett, gbedwell, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D72385
2020-02-06[llvm-exegesis] Document `repetition-mode`.Clement Courbet1-3/+12
Reviewers: gchatelet Subscribers: tschuett, mstojanovic, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D74114
2020-02-03[llvm-extract] Add -keep-const-init commandline optionJuneyoung Lee1-0/+4
Summary: This adds -keep-const-init option to llvm-extract which preserves initializers of used global constants. For example: ``` $ cat a.ll @g = constant i32 0 define i32 @f() { %v = load i32, i32* @g ret i32 %v } $ llvm-extract --func=f a.ll -S -o - @g = external constant i32 define i32 @f() { .. } $ llvm-extract --func=f a.ll -keep-const-init -S -o - @g = constant i32 0 define i32 @f() { .. } ``` This option is useful in checking whether a function that uses a constant global is optimized correctly. Reviewers: jsji, MaskRay, david2050 Reviewed By: MaskRay Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D73833
2020-01-29Print discriminators when printing .debug_line in GNU style.Sterling Augustine1-0/+7
Summary: gnu addr2line prints DWARF line table discriminators like so: <file>:<line> (discriminator <Number>) This matches that behavior. Document how and when --output-style=GNU prints discriminators Add test for new GNU-style discriminator printing. Reviewers: rupprecht, labath, jhenderson Subscribers: aprantl, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D73318
2020-01-24[llvm-objcopy][COFF] Add support for --set-section-flagsSergey Dmitriev1-22/+39
Reviewers: jhenderson, MaskRay, alexshap, rupprecht, mstorsjo Reviewed By: jhenderson Subscribers: abrachet, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D73107
2020-01-24FileCheck [9/12]: Add support for matching formatsThomas Preud'homme1-18/+53
Summary: This patch is part of a patch series to add support for FileCheck numeric expressions. This specific patch adds support for selecting a matching format to match a numeric value against (ie. decimal, hex lower case letters or hex upper case letters). This commit allows to select what format a numeric value should be matched against. The following formats are supported: decimal value, lower case hex value and upper case hex value. Matching formats impact both the format of numeric value to be matched as well as the format of accepted numbers in a definition with empty numeric expression constraint. Default for absence of format is decimal value unless the numeric expression constraint is non null and use a variable in which case the format is the one used to define that variable. Conclict of format in case of several variable being used is diagnosed and forces the user to select a matching format explicitely. This commit also enables immediates in numeric expressions to be in any radix known to StringRef's GetAsInteger method, except for legacy numeric expressions (ie [[@LINE+<offset>]] which only support decimal immediates. 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 Reviewed By: jhenderson, arichardson Subscribers: daltenty, MaskRay, hiraditya, llvm-commits, probinson, dblaikie, grimar, arichardson, kristina, hfinkel, rogfer01, JonChesterfield Tags: #llvm Differential Revision: https://reviews.llvm.org/D60389
2020-01-24[doc][llvm-objcopy] Remove redundant COFF-specific sub-headingJames Henderson1-7/+0
The sub-heading used to contain the --only-keep-debug switch as that switch wasn't implemented for ELF at one point. Since the switch is now in the generic options section, and there are no other options in this sub-heading, it is pointless and can be deleted.
2020-01-22[llvm] NFC: fix trivial typos in documentsKazuaki Ishizaki2-2/+2
Reviewers: hans, Jim Reviewed By: Jim Subscribers: jvesely, nhaehnle, mgorny, arphaman, bmahjour, kerbowa, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D73017
2020-01-20[llvm-objcopy][ELF] Allow setting SHF_EXCLUDE flag for ELF sectionsSergey Dmitriev1-0/+1
Summary: This patch adds support for setting SHF_EXCLUDE flag for ELF sections. Reviewers: jhenderson, grimar, MaskRay, mstorsjo, espindola, alexshap, rupprecht Reviewed By: jhenderson, MaskRay Subscribers: emaste, abrachet, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D72128
2020-01-15[llvm-locstats] Add the --compare optionDjordje Todorovic2-0/+18
Draw a plot showing the difference in debug loc coverage on two files provided. Differential Revision: https://reviews.llvm.org/D71870
2020-01-15[llvm-locstats] Fix the docsDjordje Todorovic1-0/+0
Add the missing picture for the documentation.
2020-01-15[llvm-locstats] Add the --draw-plot optionDjordje Todorovic1-24/+45
When using the option, draw the histogram representing the debug location buckets. The resulting histogram will be saved in a png file. Differential Revision: https://reviews.llvm.org/D71869
2020-01-15[llvm-locstats][NFC] Support OOP conceptDjordje Todorovic1-7/+7
Making these changes, the code becomes more robust and easier for adding the new features. -Introduce the LocationStats class representing the statistics -Add the pretty_print() method in the LocationStats class -Add additional '-' for the program options -Add the verify_program_inputs() function -Add the parse_locstats() function -Rename 'results' => 'opts' -Add more comments Differential Revision: https://reviews.llvm.org/D71868
2019-12-20[llvm-symbolizer] Support reading options from environmentPetr Hosek2-0/+8
llvm-symbolizer is used by sanitizers to symbolize errors discovered by sanitizer, but there's no way to pass options to llvm-symbolizer since the tool is invoked directly by the sanitizer runtime. Therefore, we don't have a way to pass options needed to find debug symbols such as -dsym-hint or -debug-file-directory. This change enables reading options from the LLVM_SYMBOLIZER_OPTS in addition to command line which can be used to pass those additional options to llvm-symbolizer invocations made by sanitizer runtime. Differential Revision: https://reviews.llvm.org/D71668
2019-12-18llvm-cxxmap: fix support for remapping non-mangled names.Richard Smith1-0/+8
Remappings involving extern "C" names were already supported in the context of <local-name>s, but this support didn't work for remapping the complete mangling itself. (Eg, we would remap X<foo> but not foo itself, if foo is an extern "C" function.)
2019-12-16[llvm-objcopy][MachO] Implement --add-sectionSeiya Nuta1-0/+3
Reviewers: alexshap, rupprecht, jhenderson Reviewed By: alexshap, jhenderson Subscribers: mgorny, jakehehrlich, abrachet, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66283
2019-12-13[llvm-dwarfdump][Statistics] Don't count coverage less than 1% as 0%Kristina Bessonova1-1/+1
Summary: This is a follow up for D70548. Currently, variables with debug info coverage between 0% and 1% are put into zero-bucket. D70548 changed the way statistics calculate a variable's coverage: we began to use enclosing scope rather than a possible variable life range. Thus more variables might be moved to zero-bucket despite they have some debug info coverage. The patch is to distinguish between a variable that has location info but it's significantly less than its enclosing scope and a variable that doesn't have it at all. Reviewers: djtodoro, aprantl, dblaikie, avl Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D71070
2019-12-13[llvm-dwarfdump][Statistics] Change the coverage buckets representation. NFCKristina Bessonova1-12/+12
Summary: This changes the representation of 'coverage buckets' in llvm-dwarfdump and llvm-locstats to one that makes more clear what the buckets contain. See some related details in D71070. Reviewers: djtodoro, aprantl, cmtice, jhenderson Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D71366
2019-12-06[llvm-readobj] - Implement --dependent-libraries flag.Georgii Rymar1-0/+4
There is no way to dump SHT_LLVM_DEPENDENT_LIBRARIES sections currently. This patch implements this. The section is described here: https://llvm.org/docs/Extensions.html#sht-llvm-dependent-libraries-section-dependent-libraries Differential revision: https://reviews.llvm.org/D70665
2019-12-04[lit] Document the undocumented pre-defined substitutionsDaniel Sanders1-11/+32
2019-11-25[llvm-objcopy][MachO] Implement --dump-sectionSeiya Nuta1-9/+12
Reviewers: alexshap, rupprecht, jhenderson Reviewed By: alexshap, rupprecht, jhenderson Subscribers: MaskRay, jakehehrlich, abrachet, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66408
2019-11-15[llvm-objcopy][MachO] Implement --remove-sectionSeiya Nuta1-0/+3
Reviewers: alexshap, rupprecht, jhenderson Reviewed By: rupprecht, jhenderson Subscribers: jakehehrlich, abrachet, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66282
2019-11-12[llvm-objcopy][COFF] Implement --redefine-sym and --redefine-symsFangrui Song1-13/+13
The parsing error tests in ELF/redefine-symbols.test are not specific to ELF. Move them to redefine-symbols.test. Add COFF/redefine-symbols.test for COFF specific tests. Also fix the documentation regarding --redefine-syms: the old and new names are separated by whitespace, not an equals sign. Reviewed By: mstorsjo Differential Revision: https://reviews.llvm.org/D70036
2019-11-05[llvm-objcopy][ELF] Implement --only-keep-debugFangrui Song1-5/+9
--only-keep-debug produces a debug file as the output that only preserves contents of sections useful for debugging purposes (the binutils implementation preserves SHT_NOTE and non-SHF_ALLOC sections), by changing their section types to SHT_NOBITS and rewritting file offsets. See https://sourceware.org/gdb/onlinedocs/gdb/Separate-Debug-Files.html The intended use case is: ``` llvm-objcopy --only-keep-debug a a.dbg llvm-objcopy --strip-debug a b llvm-objcopy --add-gnu-debuglink=a.dbg b ``` The current layout algorithm is incapable of deleting contents and shrinking segments, so it is not suitable for implementing the functionality. This patch adds a new algorithm which assigns sh_offset to sections first, then modifies p_offset/p_filesz of program headers. It bears a resemblance to lld/ELF/Writer.cpp. Reviewed By: jhenderson, jakehehrlich Differential Revision: https://reviews.llvm.org/D67137
2019-10-31[llvm-objcopy] Preserve .ARM.attributes section when stripping filesJames Henderson2-2/+4
This works around a bug in Debian's patchset for glibc. The bug is described in detail in the upstream debian bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=943798, but the short version of it is that glibc on any Debian based distro don't load libraries unless it has a .ARM.attribute section. Reviewed by: jhenderson, rupprecht, MaskRay, jakehehrlich Differential Revision: https://reviews.llvm.org/D69188 Patch by Tobias Hieta.
2019-10-31[llvm-objcopy][MachO] Implement --strip-allSeiya Nuta1-2/+2
Reviewers: alexshap, rupprecht, jdoerfert, jhenderson Reviewed By: alexshap Subscribers: jakehehrlich, abrachet, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66281
2019-10-29Revert "[llvm-cov] Add option to whitelist filenames"Vlad Tsyrklevich1-4/+0
This reverts commit bfed824b57d14e2ba98ddbaf1a1410cf04a3e279, the included test fails on many bots including the sanitier bots, e.g. in http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/36140
2019-10-29[llvm-cov] Add option to whitelist filenamesVedant Kumar1-0/+4
Add the `-whitelist-filename-regex` option to restrict coverage reporting to file paths that match a whitelist regex. Patch by Michael Daniels! rdar://56720320
2019-10-28[Remarks] Remove references to ELF supportFrancis Visoiu Mistrih1-2/+2
There is no ELF support at the moment. Remove all the references to the `.remarks` section.
2019-10-28[llvm-objcopy][MachO] Implement --only-sectionSeiya Nuta1-0/+3
Reviewers: alexshap, rupprecht, jdoerfert, jhenderson Reviewed By: alexshap, rupprecht, jhenderson Subscribers: mgorny, jakehehrlich, abrachet, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D65541
2019-10-21[docs][llvm-ar] Update llvm-ar command guideOwen Reynolds1-193/+238
The llvm-ar command guide had not been updated in some time, it was missing current functionality and contained information that was out of date. This change: - Updates the use of reStructuredText directives, as seen in other tools command guides. - Updates the command synopsis. - Updates the descriptions of the tool behaviour. - Updates the options section. - Adds details of MRI script functionality. - Removes the sections "Standards" and "File Format" Differential Revision: https://reviews.llvm.org/D68998 llvm-svn: 375412
2019-10-17[llvm-objcopy] Add support for shell wildcardsJordan Rupprecht2-0/+48
Summary: GNU objcopy accepts the --wildcard flag to allow wildcard matching on symbol-related flags. (Note: it's implicitly true for section flags). The basic syntax is to allow *, ?, \, and [] which work similarly to how they work in a shell. Additionally, starting a wildcard with ! causes that wildcard to prevent it from matching a flag. Use an updated GlobPattern in libSupport to handle these patterns. It does not fully match the `fnmatch` used by GNU objcopy since named character classes (e.g. `[[:digit:]]`) are not supported, but this should support most existing use cases (mostly just `*` is what's used anyway). Reviewers: jhenderson, MaskRay, evgeny777, espindola, alexshap Reviewed By: MaskRay Subscribers: nickdesaulniers, emaste, arichardson, hiraditya, jakehehrlich, abrachet, seiya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66613 llvm-svn: 375169
2019-10-17[docs][llvm-ar] Fix option:: O after r375106Fangrui Song1-1/+1
docs-llvm-html fails => unknown option: O There are lots of formatting issues in the file but they will be fixed by D68998. llvm-svn: 375107
2019-10-17[llvm-ar] Implement the O modifier: display member offsets inside the archiveFangrui Song1-4/+8
Since GNU ar 2.31, the 't' operation prints member offsets beside file names if the 'O' modifier is specified. 'O' is ignored for thin archives. Reviewed By: gbreynoo, ruiu Differential Revision: https://reviews.llvm.org/D69087 llvm-svn: 375106
2019-10-16[llvm-ar] Make paths case insensitive when on windowsOwen Reynolds1-0/+6
When on windows gnu-ar treats member names as case insensitive. This commit implements the same behaviour. Differential Revision: https://reviews.llvm.org/D68033 llvm-svn: 375002
2019-10-11[FileCheck] Implement --ignore-case option.Kai Nacke1-0/+5
The FileCheck utility is enhanced to support a `--ignore-case` option. This is useful in cases where the output of Unix tools differs in case (e.g. case not specified by Posix). Reviewers: Bigcheese, jakehehrlich, rupprecht, espindola, alexshap, jhenderson, MaskRay Differential Revision: https://reviews.llvm.org/D68146 llvm-svn: 374538
2019-10-10[lit] Bring back `--threads` option aliasJulian Lettner1-1/+1
Bring back `--threads` option which was lost in the move of the command line argument parsing code to cl_arguments.py. Update docs since `--workers` is preferred. llvm-svn: 374432
2019-10-10[MCA] Show aggregate over Average Wait times for the whole snippet (PR43219)Roman Lebedev1-1/+3
Summary: As disscused in https://bugs.llvm.org/show_bug.cgi?id=43219, i believe it may be somewhat useful to show //some// aggregates over all the sea of statistics provided. Example: ``` Average Wait times (based on the timeline view): [0]: Executions [1]: Average time spent waiting in a scheduler's queue [2]: Average time spent waiting in a scheduler's queue while ready [3]: Average time elapsed from WB until retire stage [0] [1] [2] [3] 0. 3 1.0 1.0 4.7 vmulps %xmm0, %xmm1, %xmm2 1. 3 2.7 0.0 2.3 vhaddps %xmm2, %xmm2, %xmm3 2. 3 6.0 0.0 0.0 vhaddps %xmm3, %xmm3, %xmm4 3 3.2 0.3 2.3 <total> ``` I.e. we average the averages. Reviewers: andreadb, mattd, RKSimon Reviewed By: andreadb Subscribers: gbedwell, arphaman, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D68714 llvm-svn: 374361
2019-10-10Revert "[FileCheck] Implement --ignore-case option."Dmitri Gribenko1-706/+701
This reverts commit r374339. It broke tests: http://lab.llvm.org:8011/builders/clang-x86_64-debian-fast/builds/19066 llvm-svn: 374359
2019-10-10[FileCheck] Implement --ignore-case option.Kai Nacke1-701/+706
The FileCheck utility is enhanced to support a `--ignore-case` option. This is useful in cases where the output of Unix tools differs in case (e.g. case not specified by Posix). Reviewers: Bigcheese, jakehehrlich, rupprecht, espindola, alexshap, jhenderson, MaskRay Differential Revision: https://reviews.llvm.org/D68146 llvm-svn: 374339
2019-10-08[llvm-exegesis] Add options to SnippetGenerator.Clement Courbet1-1/+13
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
2019-10-07[llvm-locstats] Fix a typo in the documentation; NFCDjordje Todorovic1-1/+1
llvm-svn: 373880
2019-10-02[llvm-objcopy] Add --set-section-alignmentFangrui Song1-0/+5
Fixes PR43181. This option was recently added to GNU objcopy (binutils PR24942). `llvm-objcopy -I binary -O elf64-x86-64 --set-section-alignment .data=8` can set the alignment of .data. Reviewed By: grimar, jhenderson, rupprecht Differential Revision: https://reviews.llvm.org/D67656 llvm-svn: 373461
2019-10-02Reland "[utils] Implement the llvm-locstats tool"Djordje Todorovic2-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. Differential Revision: https://reviews.llvm.org/D66526 The cause of the test failure was resolved. llvm-svn: 373427
2019-10-01Revert "Reland "[utils] Implement the llvm-locstats tool""Djordje Todorovic2-80/+0
This reverts commit rL373317 due to test failure on the clang-s390x-linux build bot. llvm-svn: 373336