Index: usr.bin/clang/bugpoint/bugpoint.1 =================================================================== --- usr.bin/clang/bugpoint/bugpoint.1 +++ usr.bin/clang/bugpoint/bugpoint.1 @@ -1,4 +1,3 @@ -.\" $FreeBSD$ .\" Man page generated from reStructuredText. . . @@ -28,7 +27,7 @@ .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BUGPOINT" "1" "2021-06-07" "12" "LLVM" +.TH "BUGPOINT" "1" "2021-12-22" "13" "LLVM" .SH NAME bugpoint \- automatic test case reduction tool .SH SYNOPSIS Index: usr.bin/clang/clang/clang.1 =================================================================== --- usr.bin/clang/clang/clang.1 +++ usr.bin/clang/clang/clang.1 @@ -1,4 +1,3 @@ -.\" $FreeBSD$ .\" Man page generated from reStructuredText. . . @@ -28,7 +27,7 @@ .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "CLANG" "1" "2021-06-07" "12" "Clang" +.TH "CLANG" "1" "Dec 22, 2021" "13" "Clang" .SH NAME clang \- the Clang C, C++, and Objective-C compiler .SH SYNOPSIS Index: usr.bin/clang/llc/llc.1 =================================================================== --- usr.bin/clang/llc/llc.1 +++ usr.bin/clang/llc/llc.1 @@ -1,4 +1,3 @@ -.\" $FreeBSD$ .\" Man page generated from reStructuredText. . . @@ -28,7 +27,7 @@ .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "LLC" "1" "2021-06-07" "12" "LLVM" +.TH "LLC" "1" "2021-12-22" "13" "LLVM" .SH NAME llc \- LLVM static compiler .SH SYNOPSIS Index: usr.bin/clang/lldb-server/lldb-server.1 =================================================================== --- usr.bin/clang/lldb-server/lldb-server.1 +++ usr.bin/clang/lldb-server/lldb-server.1 @@ -1,4 +1,3 @@ -.\" $FreeBSD$ .\" Man page generated from reStructuredText. . . @@ -28,7 +27,7 @@ .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "LLDB-SERVER" "1" "2021-06-07" "12" "LLDB" +.TH "LLDB-SERVER" "1" "Dec 22, 2021" "" "LLDB" .SH NAME lldb-server \- LLDB Documentation .SH SYNOPSIS Index: usr.bin/clang/lldb/lldb.1 =================================================================== --- usr.bin/clang/lldb/lldb.1 +++ usr.bin/clang/lldb/lldb.1 @@ -1,4 +1,3 @@ -.\" $FreeBSD$ .\" Man page generated from reStructuredText. . . @@ -28,7 +27,7 @@ .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "LLDB" "1" "2021-06-07" "12" "LLDB" +.TH "LLDB" "1" "Dec 22, 2021" "" "LLDB" .SH NAME lldb \- LLDB Documentation .SH SYNOPSIS @@ -322,14 +321,14 @@ after \-\-. .INDENT 0.0 .INDENT 3.5 -lldb \-\-arch x86_64 /path/to/program program argument \-\- \-\-arch arvm7 +lldb \-\-arch x86_64 /path/to/program program argument \-\- \-\-arch armv7 .UNINDENT .UNINDENT .sp For convenience, passing the executable after \-\- is also supported. .INDENT 0.0 .INDENT 3.5 -lldb \-\-arch x86_64 \-\- /path/to/program program argument \-\-arch arvm7 +lldb \-\-arch x86_64 \-\- /path/to/program program argument \-\-arch armv7 .UNINDENT .UNINDENT .sp Index: usr.bin/clang/lli/lli.1 =================================================================== --- usr.bin/clang/lli/lli.1 +++ usr.bin/clang/lli/lli.1 @@ -1,4 +1,3 @@ -.\" $FreeBSD$ .\" Man page generated from reStructuredText. . . @@ -28,7 +27,7 @@ .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "LLI" "1" "2021-06-07" "12" "LLVM" +.TH "LLI" "1" "2021-12-22" "13" "LLVM" .SH NAME lli \- directly execute programs from LLVM bitcode .SH SYNOPSIS Index: usr.bin/clang/llvm-ar/llvm-ar.1 =================================================================== --- usr.bin/clang/llvm-ar/llvm-ar.1 +++ usr.bin/clang/llvm-ar/llvm-ar.1 @@ -1,4 +1,3 @@ -.\" $FreeBSD$ .\" Man page generated from reStructuredText. . . @@ -28,7 +27,7 @@ .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "LLVM-AR" "1" "2021-06-07" "12" "LLVM" +.TH "LLVM-AR" "1" "2021-12-22" "13" "LLVM" .SH NAME llvm-ar \- LLVM archiver .SH SYNOPSIS @@ -338,6 +337,16 @@ .UNINDENT .INDENT 0.0 .TP +.B \-\-rsp\-quoting= +.TP +.B This option selects the quoting style \(ga\(ga\(ga\(ga for response files, either +.TP +.B \(ga\(gaposix\(ga\(ga or \(ga\(gawindows\(ga\(ga. The default when on Windows is \(ga\(gawindows\(ga\(ga, otherwise the +.TP +.B default is \(ga\(gaposix\(ga\(ga. +.UNINDENT +.INDENT 0.0 +.TP .B \-\-version Display the version of the \fBllvm\-ar\fP executable. .UNINDENT Index: usr.bin/clang/llvm-ar/llvm-ranlib.1 =================================================================== --- usr.bin/clang/llvm-ar/llvm-ranlib.1 +++ usr.bin/clang/llvm-ar/llvm-ranlib.1 @@ -1,4 +1,3 @@ -.\" $FreeBSD$ .\" Man page generated from reStructuredText. . . @@ -28,7 +27,7 @@ .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "LLVM-RANLIB" "1" "2021-06-07" "12" "LLVM" +.TH "LLVM-RANLIB" "1" "2021-12-22" "13" "LLVM" .SH NAME llvm-ranlib \- generates an archive index .SH SYNOPSIS Index: usr.bin/clang/llvm-as/llvm-as.1 =================================================================== --- usr.bin/clang/llvm-as/llvm-as.1 +++ usr.bin/clang/llvm-as/llvm-as.1 @@ -1,4 +1,3 @@ -.\" $FreeBSD$ .\" Man page generated from reStructuredText. . . @@ -28,7 +27,7 @@ .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "LLVM-AS" "1" "2021-06-07" "12" "LLVM" +.TH "LLVM-AS" "1" "2021-12-22" "13" "LLVM" .SH NAME llvm-as \- LLVM assembler .SH SYNOPSIS Index: usr.bin/clang/llvm-bcanalyzer/llvm-bcanalyzer.1 =================================================================== --- usr.bin/clang/llvm-bcanalyzer/llvm-bcanalyzer.1 +++ usr.bin/clang/llvm-bcanalyzer/llvm-bcanalyzer.1 @@ -1,4 +1,3 @@ -.\" $FreeBSD$ .\" Man page generated from reStructuredText. . . @@ -28,7 +27,7 @@ .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "LLVM-BCANALYZER" "1" "2021-06-07" "12" "LLVM" +.TH "LLVM-BCANALYZER" "1" "2021-12-22" "13" "LLVM" .SH NAME llvm-bcanalyzer \- LLVM bitcode analyzer .SH SYNOPSIS Index: usr.bin/clang/llvm-cov/llvm-cov.1 =================================================================== --- usr.bin/clang/llvm-cov/llvm-cov.1 +++ usr.bin/clang/llvm-cov/llvm-cov.1 @@ -1,4 +1,3 @@ -.\" $FreeBSD$ .\" Man page generated from reStructuredText. . . @@ -28,7 +27,7 @@ .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "LLVM-COV" "1" "2021-06-07" "12" "LLVM" +.TH "LLVM-COV" "1" "2021-12-22" "13" "LLVM" .SH NAME llvm-cov \- emit coverage information .SH SYNOPSIS @@ -70,9 +69,7 @@ of your application that collects coverage data as it runs. Compile with the \fB\-fprofile\-arcs\fP and \fB\-ftest\-coverage\fP options to add the instrumentation. (Alternatively, you can use the \fB\-\-coverage\fP option, which -includes both of those other options.) You should compile with debugging -information (\fB\-g\fP) and without optimization (\fB\-O0\fP); otherwise, the -coverage data cannot be accurately mapped back to the source code. +includes both of those other options.) .sp At the time you compile the instrumented code, a \fB\&.gcno\fP data file will be generated for each object file. These \fB\&.gcno\fP files contain half of the @@ -125,6 +122,11 @@ .UNINDENT .INDENT 0.0 .TP +.B \-m, \-\-demangled\-names +Demangle function names. +.UNINDENT +.INDENT 0.0 +.TP .B \-f, \-\-function\-summaries Show a summary of coverage for each function instead of just one summary for an entire source file. @@ -169,6 +171,22 @@ .UNINDENT .INDENT 0.0 .TP +.B \-r +Only dump files with relative paths or absolute paths with the prefix specified +by \fB\-s\fP\&. +.UNINDENT +.INDENT 0.0 +.TP +.B \-s= +Source prefix to elide. +.UNINDENT +.INDENT 0.0 +.TP +.B \-t, \-\-stdout +Print to stdout instead of producing \fB\&.gcov\fP files. +.UNINDENT +.INDENT 0.0 +.TP .B \-u, \-\-unconditional\-branches Include unconditional branches in the output for the \-\-branch\-probabilities option. @@ -327,6 +345,13 @@ .UNINDENT .INDENT 0.0 .TP +.B \-compilation\-dir= +Directory used as a base for relative coverage mapping paths. Only applicable +when binaries have been compiled with one of \fI\-fcoverage\-prefix\-map\fP +\fI\-fcoverage\-compilation\-dir\fP, or \fI\-ffile\-compilation\-dir\fP\&. +.UNINDENT +.INDENT 0.0 +.TP .B \-line\-coverage\-gt= Show code coverage only for functions with line coverage greater than the given threshold. @@ -391,6 +416,11 @@ .UNINDENT .INDENT 0.0 .TP +.B \-show\-region\-summary +Show statistics for all regions. Defaults to true. +.UNINDENT +.INDENT 0.0 +.TP .B \-show\-branch\-summary Show statistics for all branch conditions. Defaults to true. .UNINDENT @@ -409,6 +439,13 @@ .B \-ignore\-filename\-regex= Skip source code files with file paths that match the given regular expression. .UNINDENT +.INDENT 0.0 +.TP +.B \-compilation\-dir= +Directory used as a base for relative coverage mapping paths. Only applicable +when binaries have been compiled with one of \fI\-fcoverage\-prefix\-map\fP +\fI\-fcoverage\-compilation\-dir\fP, or \fI\-ffile\-compilation\-dir\fP\&. +.UNINDENT .SH EXPORT COMMAND .SS SYNOPSIS .sp @@ -476,6 +513,13 @@ Use N threads to export coverage data. When N=0, llvm\-cov auto\-detects an appropriate number of threads to use. This is the default. .UNINDENT +.INDENT 0.0 +.TP +.B \-compilation\-dir= +Directory used as a base for relative coverage mapping paths. Only applicable +when binaries have been compiled with one of \fI\-fcoverage\-prefix\-map\fP +\fI\-fcoverage\-compilation\-dir\fP, or \fI\-ffile\-compilation\-dir\fP\&. +.UNINDENT .SH AUTHOR Maintained by the LLVM Team (https://llvm.org/). .SH COPYRIGHT Index: usr.bin/clang/llvm-cxxfilt/llvm-cxxfilt.1 =================================================================== --- usr.bin/clang/llvm-cxxfilt/llvm-cxxfilt.1 +++ usr.bin/clang/llvm-cxxfilt/llvm-cxxfilt.1 @@ -1,4 +1,3 @@ -.\" $FreeBSD$ .\" Man page generated from reStructuredText. . . @@ -28,7 +27,7 @@ .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "LLVM-CXXFILT" "1" "2021-06-07" "12" "LLVM" +.TH "LLVM-CXXFILT" "1" "2021-12-22" "13" "LLVM" .SH NAME llvm-cxxfilt \- LLVM symbol name demangler .SH SYNOPSIS @@ -78,11 +77,6 @@ .UNINDENT .INDENT 0.0 .TP -.B \-\-help\-list -Print an uncategorized summary of command line options. -.UNINDENT -.INDENT 0.0 -.TP .B \-\-no\-strip\-underscore, \-n Do not strip a leading underscore. This is the default for all platforms except Mach\-O based hosts. Index: usr.bin/clang/llvm-diff/llvm-diff.1 =================================================================== --- usr.bin/clang/llvm-diff/llvm-diff.1 +++ usr.bin/clang/llvm-diff/llvm-diff.1 @@ -1,4 +1,3 @@ -.\" $FreeBSD$ .\" Man page generated from reStructuredText. . . @@ -28,7 +27,7 @@ .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "LLVM-DIFF" "1" "2021-06-07" "12" "LLVM" +.TH "LLVM-DIFF" "1" "2021-12-22" "13" "LLVM" .SH NAME llvm-diff \- LLVM structural 'diff' .SH SYNOPSIS Index: usr.bin/clang/llvm-dis/llvm-dis.1 =================================================================== --- usr.bin/clang/llvm-dis/llvm-dis.1 +++ usr.bin/clang/llvm-dis/llvm-dis.1 @@ -1,4 +1,3 @@ -.\" $FreeBSD$ .\" Man page generated from reStructuredText. . . @@ -28,7 +27,7 @@ .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "LLVM-DIS" "1" "2021-06-07" "12" "LLVM" +.TH "LLVM-DIS" "1" "2021-12-22" "13" "LLVM" .SH NAME llvm-dis \- LLVM disassembler .SH SYNOPSIS Index: usr.bin/clang/llvm-dwarfdump/llvm-dwarfdump.1 =================================================================== --- usr.bin/clang/llvm-dwarfdump/llvm-dwarfdump.1 +++ usr.bin/clang/llvm-dwarfdump/llvm-dwarfdump.1 @@ -1,4 +1,3 @@ -.\" $FreeBSD$ .\" Man page generated from reStructuredText. . . @@ -28,7 +27,7 @@ .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "LLVM-DWARFDUMP" "1" "2021-06-07" "12" "LLVM" +.TH "LLVM-DWARFDUMP" "1" "2021-12-22" "13" "LLVM" .SH NAME llvm-dwarfdump \- dump and verify DWARF debug information .SH SYNOPSIS Index: usr.bin/clang/llvm-extract/llvm-extract.1 =================================================================== --- usr.bin/clang/llvm-extract/llvm-extract.1 +++ usr.bin/clang/llvm-extract/llvm-extract.1 @@ -1,4 +1,3 @@ -.\" $FreeBSD$ .\" Man page generated from reStructuredText. . . @@ -28,7 +27,7 @@ .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "LLVM-EXTRACT" "1" "2021-06-07" "12" "LLVM" +.TH "LLVM-EXTRACT" "1" "2021-12-22" "13" "LLVM" .SH NAME llvm-extract \- extract a function from an LLVM module .SH SYNOPSIS Index: usr.bin/clang/llvm-link/llvm-link.1 =================================================================== --- usr.bin/clang/llvm-link/llvm-link.1 +++ usr.bin/clang/llvm-link/llvm-link.1 @@ -1,4 +1,3 @@ -.\" $FreeBSD$ .\" Man page generated from reStructuredText. . . @@ -28,7 +27,7 @@ .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "LLVM-LINK" "1" "2021-06-07" "12" "LLVM" +.TH "LLVM-LINK" "1" "2021-12-22" "13" "LLVM" .SH NAME llvm-link \- LLVM bitcode linker .SH SYNOPSIS Index: usr.bin/clang/llvm-mca/llvm-mca.1 =================================================================== --- usr.bin/clang/llvm-mca/llvm-mca.1 +++ usr.bin/clang/llvm-mca/llvm-mca.1 @@ -1,4 +1,3 @@ -.\" $FreeBSD$ .\" Man page generated from reStructuredText. . . @@ -28,7 +27,7 @@ .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "LLVM-MCA" "1" "2021-06-07" "12" "LLVM" +.TH "LLVM-MCA" "1" "2021-12-22" "13" "LLVM" .SH NAME llvm-mca \- LLVM Machine Code Analyzer .SH SYNOPSIS @@ -41,8 +40,8 @@ of machine code in a specific CPU. .sp 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. +consumption. The tool currently works for processors with a backend for which +there is a scheduling model available in LLVM. .sp 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 @@ -197,8 +196,8 @@ .INDENT 0.0 .TP .B \-timeline\-max\-cycles= -Limit the number of cycles in the timeline view. By default, the number of -cycles is set to 80. +Limit the number of cycles in the timeline view, or use 0 for no limit. By +default, the number of cycles is set to 80. .UNINDENT .INDENT 0.0 .TP @@ -263,15 +262,24 @@ .TP .B \-bottleneck\-analysis Print information about bottlenecks that affect the throughput. This analysis -can be expensive, and it is disabled by default. Bottlenecks are highlighted -in the summary view. +can be expensive, and it is disabled by default. Bottlenecks are highlighted +in the summary view. Bottleneck analysis is currently not supported for +processors with an in\-order backend. .UNINDENT .INDENT 0.0 .TP .B \-json -Print the requested views in JSON format. The instructions and the processor -resources are printed as members of special top level JSON objects. The -individual views refer to them by index. +Print the requested views in valid JSON format. The instructions and the +processor resources are printed as members of special top level JSON objects. +The individual views refer to them by index. However, not all views are +currently supported. For example, the report from the bottleneck analysis is +not printed out in JSON. All the default views are currently supported. +.UNINDENT +.INDENT 0.0 +.TP +.B \-disable\-cb +Force usage of the generic CustomBehaviour class rather than using the target +specific class. The generic class never detects any custom hazards. .UNINDENT .SH EXIT STATUS .sp @@ -486,7 +494,9 @@ Throughput). .sp Field \fIDispatchWidth\fP is the maximum number of micro opcodes that are dispatched -to the out\-of\-order backend every simulated cycle. +to the out\-of\-order backend every simulated cycle. For processors with an +in\-order backend, \fIDispatchWidth\fP is the maximum number of micro opcodes issued +to the backend every simulated cycle. .sp IPC is computed dividing the total number of simulated instructions by the total number of cycles. @@ -782,6 +792,9 @@ performance. By construction, the accuracy of this analysis is strongly dependent on the simulation and (as always) by the quality of the processor model in llvm. +.sp +Bottleneck analysis is currently not supported for processors with an in\-order +backend. .SS Extra Statistics to Further Diagnose Performance Issues .sp The \fB\-all\-stats\fP command line option enables extra statistics and performance @@ -939,11 +952,14 @@ Retire (Instruction is retired; writes are architecturally committed). .UNINDENT .sp -The default pipeline only models the out\-of\-order portion of a processor. -Therefore, the instruction fetch and decode stages are not modeled. Performance -bottlenecks in the frontend are not diagnosed. \fBllvm\-mca\fP assumes that -instructions have all been decoded and placed into a queue before the simulation -start. Also, \fBllvm\-mca\fP does not model branch prediction. +The in\-order pipeline implements the following sequence of stages: +* InOrderIssue (Instruction is issued to the processor pipelines). +* Retire (Instruction is retired; writes are architecturally committed). +.sp +\fBllvm\-mca\fP assumes that instructions have all been decoded and placed +into a queue before the simulation start. Therefore, the instruction fetch and +decode stages are not modeled. Performance bottlenecks in the frontend are not +diagnosed. Also, \fBllvm\-mca\fP does not model branch prediction. .SS Instruction Dispatch .sp During the dispatch stage, instructions are picked in program order from a @@ -1120,6 +1136,46 @@ .IP 6. 3 A load has to wait until an older load barrier is fully executed. .UNINDENT +.SS In\-order Issue and Execute +.sp +In\-order processors are modelled as a single \fBInOrderIssueStage\fP stage. It +bypasses Dispatch, Scheduler and Load/Store unit. Instructions are issued as +soon as their operand registers are available and resource requirements are +met. Multiple instructions can be issued in one cycle according to the value of +the \fBIssueWidth\fP parameter in LLVM\(aqs scheduling model. +.sp +Once issued, an instruction is moved to \fBIssuedInst\fP set until it is ready to +retire. \fBllvm\-mca\fP ensures that writes are committed in\-order. However, +an instruction is allowed to commit writes and retire out\-of\-order if +\fBRetireOOO\fP property is true for at least one of its writes. +.SS Custom Behaviour +.sp +Due to certain instructions not being expressed perfectly within their +scheduling model, \fBllvm\-mca\fP isn\(aqt always able to simulate them +perfectly. Modifying the scheduling model isn\(aqt always a viable +option though (maybe because the instruction is modeled incorrectly on +purpose or the instruction\(aqs behaviour is quite complex). The +CustomBehaviour class can be used in these cases to enforce proper +instruction modeling (often by customizing data dependencies and detecting +hazards that \fBllvm\-ma\fP has no way of knowing about). +.sp +\fBllvm\-mca\fP comes with one generic and multiple target specific +CustomBehaviour classes. The generic class will be used if the \fB\-disable\-cb\fP +flag is used or if a target specific CustomBehaviour class doesn\(aqt exist for +that target. (The generic class does nothing.) Currently, the CustomBehaviour +class is only a part of the in\-order pipeline, but there are plans to add it +to the out\-of\-order pipeline in the future. +.sp +CustomBehaviour\(aqs main method is \fIcheckCustomHazard()\fP which uses the +current instruction and a list of all instructions still executing within +the pipeline to determine if the current instruction should be dispatched. +As output, the method returns an integer representing the number of cycles +that the current instruction must stall for (this can be an underestimate +if you don\(aqt know the exact number and a value of 0 represents no stall). +.sp +If you\(aqd like to add a CustomBehaviour class for a target that doesn\(aqt +already have one, refer to an existing implementation to see how to set it +up. Remember to look at (and add to) \fI/llvm\-mca/lib/CMakeLists.txt\fP\&. .SH AUTHOR Maintained by the LLVM Team (https://llvm.org/). .SH COPYRIGHT Index: usr.bin/clang/llvm-nm/llvm-nm.1 =================================================================== --- usr.bin/clang/llvm-nm/llvm-nm.1 +++ usr.bin/clang/llvm-nm/llvm-nm.1 @@ -1,4 +1,3 @@ -.\" $FreeBSD$ .\" Man page generated from reStructuredText. . . @@ -28,7 +27,7 @@ .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "LLVM-NM" "1" "2021-06-07" "12" "LLVM" +.TH "LLVM-NM" "1" "2021-12-22" "13" "LLVM" .SH NAME llvm-nm \- list LLVM bitcode and object file's symbol table .SH SYNOPSIS @@ -208,7 +207,7 @@ .UNINDENT .INDENT 0.0 .TP -.B \-\-defined\-only, \-U +.B \-\-defined\-only Print only symbols defined in this file. .UNINDENT .INDENT 0.0 @@ -230,7 +229,8 @@ .INDENT 0.0 .TP .B \-\-format=, \-f -Select an output format; \fIformat\fP may be \fIsysv\fP, \fIposix\fP, \fIdarwin\fP, or \fIbsd\fP\&. +Select an output format; \fIformat\fP may be \fIsysv\fP, \fIposix\fP, \fIdarwin\fP, \fIbsd\fP or +\fIjust\-symbols\fP\&. The default is \fIbsd\fP\&. .UNINDENT .INDENT 0.0 @@ -240,13 +240,8 @@ .UNINDENT .INDENT 0.0 .TP -.B \-\-help\-list -Print an uncategorized summary of command\-line options and their meanings. -.UNINDENT -.INDENT 0.0 -.TP -.B \-\-just\-symbol\-name, \-j -Print just the symbol names. +.B \-j +Print just the symbol names. Alias for \fI\-\-format=just\-symbols\(ga\fP\&. .UNINDENT .INDENT 0.0 .TP @@ -270,7 +265,7 @@ .UNINDENT .INDENT 0.0 .TP -.B \-\-no\-weak, \-W +.B \-\-no\-weak Don\(aqt print weak symbols. .UNINDENT .INDENT 0.0 @@ -285,7 +280,7 @@ .UNINDENT .INDENT 0.0 .TP -.B \-\-print\-armap, \-M +.B \-\-print\-armap Print the archive symbol table, in addition to the symbols. .UNINDENT .INDENT 0.0 @@ -300,6 +295,11 @@ .UNINDENT .INDENT 0.0 .TP +.B \-\-quiet +Suppress \(aqno symbols\(aq diagnostic. +.UNINDENT +.INDENT 0.0 +.TP .B \-\-radix=, \-t Specify the radix of the symbol address(es). Values accepted are \fId\fP (decimal), \fIx\fP (hexadecimal) and \fIo\fP (octal). @@ -326,14 +326,9 @@ .UNINDENT .INDENT 0.0 .TP -.B \-\-version -Display the version of the \fBllvm\-nm\fP executable. Does not stack with -other commands. -.UNINDENT -.INDENT 0.0 -.TP -.B \-\-without\-aliases -Exclude aliases from the output. +.B \-\-version, \-V +Display the version of the \fBllvm\-nm\fP executable, then exit. Does not +stack with other commands. .UNINDENT .INDENT 0.0 .TP @@ -369,7 +364,7 @@ .UNINDENT .INDENT 0.0 .TP -.B \-s= +.B \-s
Dump only symbols from this segment and section name. .UNINDENT .INDENT 0.0 Index: usr.bin/clang/llvm-objcopy/Makefile =================================================================== --- usr.bin/clang/llvm-objcopy/Makefile +++ usr.bin/clang/llvm-objcopy/Makefile @@ -3,6 +3,7 @@ .include PROG_CXX= llvm-objcopy +MAN= llvm-objcopy.1 llvm-strip.1 SRCDIR= llvm/tools/llvm-objcopy SRCS+= COFF/COFFObjcopy.cpp @@ -47,7 +48,8 @@ .if ${MK_LLVM_BINUTILS} != "no" LINKS+= ${BINDIR}/llvm-objcopy ${BINDIR}/objcopy \ ${BINDIR}/llvm-strip ${BINDIR}/strip -MLINKS= llvm-objcopy.1 objcopy.1 +MLINKS= llvm-objcopy.1 objcopy.1 \ + llvm-strip.1 strip.1 .endif .include "../llvm.prog.mk" Index: usr.bin/clang/llvm-objcopy/llvm-objcopy.1 =================================================================== --- usr.bin/clang/llvm-objcopy/llvm-objcopy.1 +++ usr.bin/clang/llvm-objcopy/llvm-objcopy.1 @@ -1,4 +1,3 @@ -.\" $FreeBSD$ .\" Man page generated from reStructuredText. . . @@ -28,7 +27,7 @@ .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "LLVM-OBJCOPY" "1" "2021-06-07" "12" "LLVM" +.TH "LLVM-OBJCOPY" "1" "2021-12-22" "13" "LLVM" .SH NAME llvm-objcopy \- object copying and editing tool .SH SYNOPSIS @@ -86,7 +85,7 @@ .B \-\-discard\-all, \-x Remove most local symbols from the output. Different file formats may limit this to a subset of the local symbols. For example, file and section symbols in -ELF objects will not be discarded. +ELF objects will not be discarded. Additionally, remove all debug sections. .UNINDENT .INDENT 0.0 .TP @@ -409,26 +408,6 @@ .UNINDENT .INDENT 0.0 .TP -.B \-\-build\-id\-link\-dir -Set the directory used by \fI\%\-\-build\-id\-link\-input\fP and -\fI\%\-\-build\-id\-link\-output\fP\&. -.UNINDENT -.INDENT 0.0 -.TP -.B \-\-build\-id\-link\-input -Hard\-link the input to \fB/xx/xxx\fP, where \fB\fP is the directory -specified by \fI\%\-\-build\-id\-link\-dir\fP\&. The path used is derived from the -hex build ID. -.UNINDENT -.INDENT 0.0 -.TP -.B \-\-build\-id\-link\-output -Hard\-link the output to \fB/xx/xxx\fP, where \fB\fP is the directory -specified by \fI\%\-\-build\-id\-link\-dir\fP\&. The path used is derived from the -hex build ID. -.UNINDENT -.INDENT 0.0 -.TP .B \-\-change\-start , \-\-adjust\-start Add \fB\fP to the program\(aqs start address. Can be specified multiple times, in which case the values will be applied cumulatively. @@ -651,6 +630,12 @@ .B \-\-weaken Mark all defined global symbols as weak in the output. .UNINDENT +.SH MACH-O-SPECIFIC OPTIONS +.INDENT 0.0 +.TP +.B \-\-keep\-undefined +Keep undefined symbols, even if they would otherwise be stripped. +.UNINDENT .SH SUPPORTED FORMATS .sp The following values are currently supported by \fBllvm\-objcopy\fP for the Index: usr.bin/clang/llvm-objcopy/llvm-strip.1 =================================================================== --- /dev/null +++ usr.bin/clang/llvm-objcopy/llvm-strip.1 @@ -0,0 +1,288 @@ +.\" Man page generated from reStructuredText. +. +. +.nr rst2man-indent-level 0 +. +.de1 rstReportMargin +\\$1 \\n[an-margin] +level \\n[rst2man-indent-level] +level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] +- +\\n[rst2man-indent0] +\\n[rst2man-indent1] +\\n[rst2man-indent2] +.. +.de1 INDENT +.\" .rstReportMargin pre: +. RS \\$1 +. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] +. nr rst2man-indent-level +1 +.\" .rstReportMargin post: +.. +.de UNINDENT +. RE +.\" indent \\n[an-margin] +.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] +.nr rst2man-indent-level -1 +.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] +.in \\n[rst2man-indent\\n[rst2man-indent-level]]u +.. +.TH "LLVM-STRIP" "1" "2021-12-22" "13" "LLVM" +.SH NAME +llvm-strip \- object stripping tool +.SH SYNOPSIS +.sp +\fBllvm\-strip\fP [\fIoptions\fP] \fIinputs...\fP +.SH DESCRIPTION +.sp +\fBllvm\-strip\fP is a tool to strip sections and symbols from object files. +If no other stripping or remove options are specified, \fI\%\-\-strip\-all\fP +will be enabled. +.sp +By default, the input files are modified in\-place. If "\-" is specified for the +input file, the input is read from the program\(aqs standard input stream. +.sp +If the input is an archive, any requested operations will be applied to each +archive member individually. +.sp +The tool is still in active development, but in most scenarios it works as a +drop\-in replacement for GNU\(aqs \fBstrip\fP\&. +.SH GENERIC AND CROSS-PLATFORM OPTIONS +.sp +The following options are either agnostic of the file format, or apply to +multiple file formats. +.INDENT 0.0 +.TP +.B \-\-disable\-deterministic\-archives, \-U +Use real values for UIDs, GIDs and timestamps when updating archive member +headers. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-discard\-all, \-x +Remove most local symbols from the output. Different file formats may limit +this to a subset of the local symbols. For example, file and section symbols in +ELF objects will not be discarded. Additionally, remove all debug sections. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-enable\-deterministic\-archives, \-D +Enable deterministic mode when stripping archives, i.e. use 0 for archive member +header UIDs, GIDs and timestamp fields. On by default. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-help, \-h +Print a summary of command line options. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-no\-strip\-all +Disable \fI\%\-\-strip\-all\fP\&. +.UNINDENT +.INDENT 0.0 +.TP +.B \-o +Write output to . Multiple input files cannot be used in combination +with \-o. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-regex +If specified, symbol and section names specified by other switches are treated +as extended POSIX regular expression patterns. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-remove\-section
, \-R +Remove the specified section from the output. Can be specified multiple times +to remove multiple sections simultaneously. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-strip\-all\-gnu +Remove all symbols, debug sections and relocations from the output. This option +is equivalent to GNU \fBstrip\fP\(aqs \fB\-\-strip\-all\fP switch. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-strip\-all, \-s +For ELF objects, remove from the output all symbols and non\-alloc sections not +within segments, except for .gnu.warning, .ARM.attribute sections and the +section name table. +.sp +For COFF objects, remove all symbols, debug sections, and relocations from the +output. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-strip\-debug, \-d, \-g, \-S +Remove all debug sections from the output. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-strip\-symbol , \-N +Remove all symbols named \fB\fP from the output. Can be specified +multiple times to remove multiple symbols. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-strip\-unneeded +Remove from the output all local or undefined symbols that are not required by +relocations. Also remove all debug sections. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-version, \-V +Display the version of the \fBllvm\-strip\fP executable. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-wildcard, \-w +Allow wildcard syntax for symbol\-related flags. On by default for +section\-related flags. Incompatible with \-\-regex. +.sp +Wildcard syntax allows the following special symbols: +.TS +center; +|l|l|l|. +_ +T{ +Character +T} T{ +Meaning +T} T{ +Equivalent +T} +_ +T{ +\fB*\fP +T} T{ +Any number of characters +T} T{ +\fB\&.*\fP +T} +_ +T{ +\fB?\fP +T} T{ +Any single character +T} T{ +\fB\&.\fP +T} +_ +T{ +\fB\e\fP +T} T{ +Escape the next character +T} T{ +\fB\e\fP +T} +_ +T{ +\fB[a\-z]\fP +T} T{ +Character class +T} T{ +\fB[a\-z]\fP +T} +_ +T{ +\fB[!a\-z]\fP, \fB[^a\-z]\fP +T} T{ +Negated character class +T} T{ +\fB[^a\-z]\fP +T} +_ +.TE +.sp +Additionally, starting a wildcard with \(aq!\(aq will prevent a match, even if +another flag matches. For example \fB\-w \-N \(aq*\(aq \-N \(aq!x\(aq\fP will strip all symbols +except for \fBx\fP\&. +.sp +The order of wildcards does not matter. For example, \fB\-w \-N \(aq*\(aq \-N \(aq!x\(aq\fP is +the same as \fB\-w \-N \(aq!x\(aq \-N \(aq*\(aq\fP\&. +.UNINDENT +.INDENT 0.0 +.TP +.B @ +Read command\-line options and commands from response file \fI\fP\&. +.UNINDENT +.SH COFF-SPECIFIC OPTIONS +.sp +The following options are implemented only for COFF objects. If used with other +objects, \fBllvm\-strip\fP will either emit an error or silently ignore +them. +.INDENT 0.0 +.TP +.B \-\-only\-keep\-debug +Remove the contents of non\-debug sections from the output, but keep the section +headers. +.UNINDENT +.SH ELF-SPECIFIC OPTIONS +.sp +The following options are implemented only for ELF objects. If used with other +objects, \fBllvm\-strip\fP will either emit an error or silently ignore +them. +.INDENT 0.0 +.TP +.B \-\-allow\-broken\-links +Allow \fBllvm\-strip\fP to remove sections even if it would leave invalid +section references. Any invalid sh_link fields will be set to zero. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-discard\-locals, \-X +Remove local symbols starting with ".L" from the output. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-keep\-file\-symbols +Keep symbols of type \fISTT_FILE\fP, even if they would otherwise be stripped. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-keep\-section
+When removing sections from the output, do not remove sections named +\fB
\fP\&. Can be specified multiple times to keep multiple sections. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-keep\-symbol , \-K +When removing symbols from the output, do not remove symbols named +\fB\fP\&. Can be specified multiple times to keep multiple symbols. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-preserve\-dates, \-p +Preserve access and modification timestamps in the output. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-strip\-sections +Remove from the output all section headers and all section data not within +segments. Note that many tools will not be able to use an object without +section headers. +.UNINDENT +.INDENT 0.0 +.TP +.B \-T +Remove Swift symbols. +.UNINDENT +.SH EXIT STATUS +.sp +\fBllvm\-strip\fP exits with a non\-zero exit code if there is an error. +Otherwise, it exits with code 0. +.SH BUGS +.sp +To report bugs, please visit <\fI\%https://bugs.llvm.org/\fP>. +.SH SEE ALSO +.sp +\fBllvm\-objcopy(1)\fP +.SH AUTHOR +Maintained by the LLVM Team (https://llvm.org/). +.SH COPYRIGHT +2003-2021, LLVM Project +.\" Generated by docutils manpage writer. +. Index: usr.bin/clang/llvm-objdump/llvm-objdump.1 =================================================================== --- usr.bin/clang/llvm-objdump/llvm-objdump.1 +++ usr.bin/clang/llvm-objdump/llvm-objdump.1 @@ -1,4 +1,3 @@ -.\" $FreeBSD$ .\" Man page generated from reStructuredText. . . @@ -28,7 +27,7 @@ .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "LLVM-OBJDUMP" "1" "2021-06-07" "12" "LLVM" +.TH "LLVM-OBJDUMP" "1" "2021-12-22" "13" "LLVM" .SH NAME llvm-objdump \- LLVM's object file dumper .SH SYNOPSIS @@ -136,7 +135,7 @@ .UNINDENT .INDENT 0.0 .TP -.B \-\-version +.B \-v, \-\-version Display the version of the \fBllvm\-objdump\fP executable. Does not stack with other commands. .UNINDENT @@ -179,7 +178,7 @@ .TP .B \-\-debug\-vars\-indent= Distance to indent the source\-level variable display, relative to the start -of the disassembly. Defaults to 40 characters. +of the disassembly. Defaults to 52 characters. .UNINDENT .INDENT 0.0 .TP @@ -196,8 +195,21 @@ .INDENT 0.0 .TP .B \-M, \-\-disassembler\-options= -Pass target\-specific disassembler options. Currently supported for ARM targets -only. Available options are \fBreg\-names\-std\fP and \fBreg\-names\-raw\fP\&. +Pass target\-specific disassembler options. Available options: +.INDENT 7.0 +.IP \(bu 2 +\fBreg\-names\-std\fP: ARM only (default). Print in ARM \(aqs instruction set documentation, with r13/r14/r15 replaced by sp/lr/pc. +.IP \(bu 2 +\fBreg\-names\-raw\fP: ARM only. Use r followed by the register number. +.IP \(bu 2 +\fBno\-aliases\fP: AArch64 and RISC\-V only. Print raw instruction mnemonic instead of pesudo instruction mnemonic. +.IP \(bu 2 +\fBnumeric\fP: RISC\-V only. Print raw register names instead of ABI mnemonic. (e.g. print x1 instead of ra) +.IP \(bu 2 +\fBatt\fP: x86 only (default). Print in the AT&T syntax. +.IP \(bu 2 +\fBintel\fP: x86 only. Print in the intel syntax. +.UNINDENT .UNINDENT .INDENT 0.0 .TP @@ -218,6 +230,11 @@ .UNINDENT .INDENT 0.0 .TP +.B \-\-no\-print\-imm\-hex +Do not use hex format for immediate values in disassembly output (default). +.UNINDENT +.INDENT 0.0 +.TP .B \-\-no\-show\-raw\-insn When disassembling, do not print the raw bytes of each instruction. .UNINDENT @@ -229,6 +246,13 @@ .UNINDENT .INDENT 0.0 .TP +.B \-\-prefix\-strip= +When disassembling with the \fI\%\-\-source\fP option, strip out \fBlevel\fP +initial directories from absolute paths. This option has no effect without +\fI\%\-\-prefix\fP\&. +.UNINDENT +.INDENT 0.0 +.TP .B \-\-print\-imm\-hex Use hex format when printing immediate values in disassembly output. .UNINDENT @@ -314,6 +338,7 @@ .INDENT 0.0 .TP .B \-\-x86\-asm\-syntax=