diff --git a/contrib/llvm-project/clang/lib/AST/TypePrinter.cpp b/contrib/llvm-project/clang/lib/AST/TypePrinter.cpp index 5c246490448..2d06faeca18 100644 --- a/contrib/llvm-project/clang/lib/AST/TypePrinter.cpp +++ b/contrib/llvm-project/clang/lib/AST/TypePrinter.cpp @@ -1812,7 +1812,7 @@ void TypePrinter::printAttributedAfter(const AttributedType *T, void TypePrinter::printBTFTagAttributedBefore(const BTFTagAttributedType *T, raw_ostream &OS) { printBefore(T->getWrappedType(), OS); - OS << " btf_type_tag(" << T->getAttr()->getBTFTypeTag() << ")"; + OS << " __attribute__((btf_type_tag(\"" << T->getAttr()->getBTFTypeTag() << "\")))"; } void TypePrinter::printBTFTagAttributedAfter(const BTFTagAttributedType *T, diff --git a/contrib/llvm-project/clang/lib/Driver/ToolChains/Clang.cpp b/contrib/llvm-project/clang/lib/Driver/ToolChains/Clang.cpp index ec6860113b7..238507e0633 100644 --- a/contrib/llvm-project/clang/lib/Driver/ToolChains/Clang.cpp +++ b/contrib/llvm-project/clang/lib/Driver/ToolChains/Clang.cpp @@ -7782,7 +7782,7 @@ void Clang::AddClangCLArgs(const ArgList &Args, types::ID InputType, if (Args.hasArg(options::OPT__SLASH_kernel)) CmdArgs.push_back("-fms-kernel"); - if (Arg *A = Args.getLastArg(options::OPT__SLASH_guard)) { + for (const Arg *A : Args.filtered(options::OPT__SLASH_guard)) { StringRef GuardArgs = A->getValue(); // The only valid options are "cf", "cf,nochecks", "cf-", "ehcont" and // "ehcont-". diff --git a/contrib/llvm-project/clang/lib/Driver/ToolChains/MSVC.cpp b/contrib/llvm-project/clang/lib/Driver/ToolChains/MSVC.cpp index 8ad67ca3e13..b8aa21b7a76 100644 --- a/contrib/llvm-project/clang/lib/Driver/ToolChains/MSVC.cpp +++ b/contrib/llvm-project/clang/lib/Driver/ToolChains/MSVC.cpp @@ -227,7 +227,7 @@ void visualstudio::Linker::ConstructJob(Compilation &C, const JobAction &JA, Args.AddAllArgValues(CmdArgs, options::OPT__SLASH_link); // Control Flow Guard checks - if (Arg *A = Args.getLastArg(options::OPT__SLASH_guard)) { + for (const Arg *A : Args.filtered(options::OPT__SLASH_guard)) { StringRef GuardArgs = A->getValue(); if (GuardArgs.equals_insensitive("cf") || GuardArgs.equals_insensitive("cf,nochecks")) { diff --git a/contrib/llvm-project/clang/lib/Sema/SemaInit.cpp b/contrib/llvm-project/clang/lib/Sema/SemaInit.cpp index 99801a88e3e..44adb167dcc 100644 --- a/contrib/llvm-project/clang/lib/Sema/SemaInit.cpp +++ b/contrib/llvm-project/clang/lib/Sema/SemaInit.cpp @@ -5348,14 +5348,16 @@ static void TryOrBuildParenListInitialization( // The remaining elements are initialized with their default member // initializers, if any auto *FD = cast(SubEntity.getDecl()); - if (Expr *ICE = FD->getInClassInitializer(); ICE && !VerifyOnly) { - ExprResult DIE = S.BuildCXXDefaultInitExpr(FD->getLocation(), FD); - if (DIE.isInvalid()) - return false; - S.checkInitializerLifetime(SubEntity, DIE.get()); - InitExprs.push_back(DIE.get()); + if (FD->hasInClassInitializer()) { + if (!VerifyOnly) { + ExprResult DIE = S.BuildCXXDefaultInitExpr(FD->getLocation(), FD); + if (DIE.isInvalid()) + return false; + S.checkInitializerLifetime(SubEntity, DIE.get()); + InitExprs.push_back(DIE.get()); + } continue; - }; + } } // Remaining class elements without default member initializers and // array elements are value initialized: diff --git a/contrib/llvm-project/libcxx/include/__config b/contrib/llvm-project/libcxx/include/__config index 36bdbd8680d..9009b9014ab 100644 --- a/contrib/llvm-project/libcxx/include/__config +++ b/contrib/llvm-project/libcxx/include/__config @@ -38,7 +38,7 @@ // _LIBCPP_VERSION represents the version of libc++, which matches the version of LLVM. // Given a LLVM release LLVM XX.YY.ZZ (e.g. LLVM 16.0.1 == 16.00.01), _LIBCPP_VERSION is // defined to XXYYZZ. -# define _LIBCPP_VERSION 160003 +# define _LIBCPP_VERSION 160004 # define _LIBCPP_CONCAT_IMPL(_X, _Y) _X##_Y # define _LIBCPP_CONCAT(_X, _Y) _LIBCPP_CONCAT_IMPL(_X, _Y) diff --git a/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp b/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp index 8d4c8802f71..3de4efb5ba2 100644 --- a/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp +++ b/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp @@ -1724,12 +1724,9 @@ bool TargetLowering::SimplifyDemandedBits( unsigned InnerBits = InnerVT.getScalarSizeInBits(); if (ShAmt < InnerBits && DemandedBits.getActiveBits() <= InnerBits && isTypeDesirableForOp(ISD::SHL, InnerVT)) { - EVT ShTy = getShiftAmountTy(InnerVT, DL); - if (!APInt(BitWidth, ShAmt).isIntN(ShTy.getSizeInBits())) - ShTy = InnerVT; - SDValue NarrowShl = - TLO.DAG.getNode(ISD::SHL, dl, InnerVT, InnerOp, - TLO.DAG.getConstant(ShAmt, dl, ShTy)); + SDValue NarrowShl = TLO.DAG.getNode( + ISD::SHL, dl, InnerVT, InnerOp, + TLO.DAG.getShiftAmountConstant(ShAmt, InnerVT, dl)); return TLO.CombineTo( Op, TLO.DAG.getNode(ISD::ANY_EXTEND, dl, VT, NarrowShl)); } diff --git a/contrib/llvm-project/llvm/lib/Target/SystemZ/SystemZISelLowering.cpp b/contrib/llvm-project/llvm/lib/Target/SystemZ/SystemZISelLowering.cpp index 5dca792dc89..0b3059df124 100644 --- a/contrib/llvm-project/llvm/lib/Target/SystemZ/SystemZISelLowering.cpp +++ b/contrib/llvm-project/llvm/lib/Target/SystemZ/SystemZISelLowering.cpp @@ -8488,11 +8488,13 @@ SystemZTargetLowering::emitMemMemWrapper(MachineInstr &MI, .addReg(RemSrcReg).addImm(SrcDisp); MBB->addSuccessor(AllDoneMBB); MBB = AllDoneMBB; - if (EndMBB) { + if (Opcode != SystemZ::MVC) { EXRL_MIB.addReg(SystemZ::CC, RegState::ImplicitDefine); - MBB->addLiveIn(SystemZ::CC); + if (EndMBB) + MBB->addLiveIn(SystemZ::CC); } } + MF.getProperties().reset(MachineFunctionProperties::Property::NoPHIs); } // Handle any remaining bytes with straight-line code. diff --git a/contrib/llvm-project/llvm/lib/Target/X86/X86FrameLowering.cpp b/contrib/llvm-project/llvm/lib/Target/X86/X86FrameLowering.cpp index 1606413c382..df9aaddd572 100644 --- a/contrib/llvm-project/llvm/lib/Target/X86/X86FrameLowering.cpp +++ b/contrib/llvm-project/llvm/lib/Target/X86/X86FrameLowering.cpp @@ -1557,7 +1557,19 @@ void X86FrameLowering::emitPrologue(MachineFunction &MF, Fn.arg_size() == 2) { StackSize += 8; MFI.setStackSize(StackSize); - emitSPUpdate(MBB, MBBI, DL, -8, /*InEpilogue=*/false); + + // Update the stack pointer by pushing a register. This is the instruction + // emitted that would be end up being emitted by a call to `emitSPUpdate`. + // Hard-coding the update to a push avoids emitting a second + // `STACKALLOC_W_PROBING` instruction in the save block: We know that stack + // probing isn't needed anyways for an 8-byte update. + // Pushing a register leaves us in a similar situation to a regular + // function call where we know that the address at (rsp-8) is writeable. + // That way we avoid any off-by-ones with stack probing for additional + // stack pointer updates later on. + BuildMI(MBB, MBBI, DL, TII.get(X86::PUSH64r)) + .addReg(X86::RAX, RegState::Undef) + .setMIFlag(MachineInstr::FrameSetup); } // If this is x86-64 and the Red Zone is not disabled, if we are a leaf diff --git a/lib/clang/include/VCSVersion.inc b/lib/clang/include/VCSVersion.inc index 466b5ce7ecf..514717a358f 100644 --- a/lib/clang/include/VCSVersion.inc +++ b/lib/clang/include/VCSVersion.inc @@ -1,10 +1,10 @@ // $FreeBSD$ -#define LLVM_REVISION "llvmorg-16.0.3-0-gda3cd333bea5" +#define LLVM_REVISION "llvmorg-16.0.4-0-gae42196bc493" #define LLVM_REPOSITORY "https://github.com/llvm/llvm-project.git" -#define CLANG_REVISION "llvmorg-16.0.3-0-gda3cd333bea5" +#define CLANG_REVISION "llvmorg-16.0.4-0-gae42196bc493" #define CLANG_REPOSITORY "https://github.com/llvm/llvm-project.git" -#define LLDB_REVISION "llvmorg-16.0.3-0-gda3cd333bea5" +#define LLDB_REVISION "llvmorg-16.0.4-0-gae42196bc493" #define LLDB_REPOSITORY "https://github.com/llvm/llvm-project.git" diff --git a/lib/clang/include/clang/Basic/Version.inc b/lib/clang/include/clang/Basic/Version.inc index 13d7baf6473..301f49bfd08 100644 --- a/lib/clang/include/clang/Basic/Version.inc +++ b/lib/clang/include/clang/Basic/Version.inc @@ -1,10 +1,10 @@ /* $FreeBSD$ */ -#define CLANG_VERSION 16.0.3 -#define CLANG_VERSION_STRING "16.0.3" +#define CLANG_VERSION 16.0.4 +#define CLANG_VERSION_STRING "16.0.4" #define CLANG_VERSION_MAJOR 16 #define CLANG_VERSION_MAJOR_STRING "16" #define CLANG_VERSION_MINOR 0 -#define CLANG_VERSION_PATCHLEVEL 3 +#define CLANG_VERSION_PATCHLEVEL 4 #define CLANG_VENDOR "FreeBSD " diff --git a/lib/clang/include/lld/Common/Version.inc b/lib/clang/include/lld/Common/Version.inc index 8f4dd4a4b55..61598755e16 100644 --- a/lib/clang/include/lld/Common/Version.inc +++ b/lib/clang/include/lld/Common/Version.inc @@ -1,4 +1,4 @@ // Local identifier in __FreeBSD_version style #define LLD_FREEBSD_VERSION 1400006 -#define LLD_VERSION_STRING "16.0.3 (FreeBSD llvmorg-16.0.3-0-gda3cd333bea5-" __XSTRING(LLD_FREEBSD_VERSION) ")" +#define LLD_VERSION_STRING "16.0.4 (FreeBSD llvmorg-16.0.4-0-gae42196bc493-" __XSTRING(LLD_FREEBSD_VERSION) ")" diff --git a/lib/clang/include/lldb/Version/Version.inc b/lib/clang/include/lldb/Version/Version.inc index 4434036b81e..cdc1a2c63f7 100644 --- a/lib/clang/include/lldb/Version/Version.inc +++ b/lib/clang/include/lldb/Version/Version.inc @@ -1,6 +1,6 @@ -#define LLDB_VERSION 16.0.3 -#define LLDB_VERSION_STRING "16.0.3" +#define LLDB_VERSION 16.0.4 +#define LLDB_VERSION_STRING "16.0.4" #define LLDB_VERSION_MAJOR 16 #define LLDB_VERSION_MINOR 0 -#define LLDB_VERSION_PATCH 3 +#define LLDB_VERSION_PATCH 4 /* #undef LLDB_FULL_VERSION_STRING */ diff --git a/lib/clang/include/llvm/Config/config.h b/lib/clang/include/llvm/Config/config.h index 57914743328..105378ec0dc 100644 --- a/lib/clang/include/llvm/Config/config.h +++ b/lib/clang/include/llvm/Config/config.h @@ -348,10 +348,10 @@ #define PACKAGE_NAME "LLVM" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "LLVM 16.0.3" +#define PACKAGE_STRING "LLVM 16.0.4" /* Define to the version of this package. */ -#define PACKAGE_VERSION "16.0.3" +#define PACKAGE_VERSION "16.0.4" /* Define to the vendor of this package. */ /* #undef PACKAGE_VENDOR */ diff --git a/lib/clang/include/llvm/Config/llvm-config.h b/lib/clang/include/llvm/Config/llvm-config.h index 3932cfc4d1c..956e1414236 100644 --- a/lib/clang/include/llvm/Config/llvm-config.h +++ b/lib/clang/include/llvm/Config/llvm-config.h @@ -74,10 +74,10 @@ #define LLVM_VERSION_MINOR 0 /* Patch version of the LLVM API */ -#define LLVM_VERSION_PATCH 3 +#define LLVM_VERSION_PATCH 4 /* LLVM version string */ -#define LLVM_VERSION_STRING "16.0.3" +#define LLVM_VERSION_STRING "16.0.4" /* Whether LLVM records statistics for use with GetStatistics(), * PrintStatistics() or PrintStatisticsJSON() diff --git a/lib/clang/include/llvm/Support/VCSRevision.h b/lib/clang/include/llvm/Support/VCSRevision.h index 4fa56888d33..ca9915b70f6 100644 --- a/lib/clang/include/llvm/Support/VCSRevision.h +++ b/lib/clang/include/llvm/Support/VCSRevision.h @@ -1,3 +1,3 @@ /* $FreeBSD$ */ -#define LLVM_REVISION "llvmorg-16.0.3-0-gda3cd333bea5" +#define LLVM_REVISION "llvmorg-16.0.4-0-gae42196bc493" #define LLVM_REPOSITORY "https://github.com/llvm/llvm-project.git" diff --git a/usr.bin/clang/bugpoint/bugpoint.1 b/usr.bin/clang/bugpoint/bugpoint.1 index 97b227ea82d..efbecd28e17 100644 --- a/usr.bin/clang/bugpoint/bugpoint.1 +++ b/usr.bin/clang/bugpoint/bugpoint.1 @@ -1,4 +1,3 @@ -.\" $FreeBSD$ .\" Man page generated from reStructuredText. . . @@ -28,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" 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" "2023-05-24" "16" "LLVM" .SH NAME bugpoint \- automatic test case reduction tool .SH SYNOPSIS @@ -42,7 +41,7 @@ can be used to debug three types of failures: optimizer crashes, miscompilations by optimizers, or bad native code generation (including problems in the static and JIT compilers). It aims to reduce large test cases to small, useful ones. For more information on the design and inner workings of \fBbugpoint\fP, as well as -advice for using bugpoint, see /Bugpoint in the LLVM +advice for using bugpoint, see \fI\%LLVM bugpoint tool: design and usage\fP in the LLVM distribution. .SH OPTIONS .sp @@ -67,7 +66,7 @@ code is considered a test failure. Defaults to false. .INDENT 0.0 .INDENT 3.5 Pass all arguments specified after \fB\-\-args\fP to the test program whenever it runs. -Note that if any of the \fIprogram args\fP start with a "\fB\-\fP", you should use: +Note that if any of the \fIprogram args\fP start with a \(dq\fB\-\fP\(dq, you should use: .INDENT 0.0 .INDENT 3.5 .sp @@ -79,8 +78,8 @@ bugpoint [bugpoint args] \-\-args \-\- [program args] .UNINDENT .UNINDENT .sp -The "\fB\-\-\fP" right after the \fB\-\-args\fP option tells \fBbugpoint\fP to consider -any options starting with "\fB\-\fP" to be part of the \fB\-\-args\fP option, not as +The \(dq\fB\-\-\fP\(dq right after the \fB\-\-args\fP option tells \fBbugpoint\fP to consider +any options starting with \(dq\fB\-\fP\(dq to be part of the \fB\-\-args\fP option, not as options to \fBbugpoint\fP itself. .UNINDENT .UNINDENT @@ -102,8 +101,8 @@ bugpoint [bugpoint args] \-\-tool\-args \-\- [tool args] .UNINDENT .UNINDENT .sp -The "\fB\-\-\fP" right after the \fB\-\-tool\-args\fP option tells \fBbugpoint\fP to -consider any options starting with "\fB\-\fP" to be part of the \fB\-\-tool\-args\fP +The \(dq\fB\-\-\fP\(dq right after the \fB\-\-tool\-args\fP option tells \fBbugpoint\fP to +consider any options starting with \(dq\fB\-\fP\(dq to be part of the \fB\-\-tool\-args\fP option, not as options to \fBbugpoint\fP itself. (See \fB\-\-args\fP, above.) .UNINDENT .UNINDENT @@ -111,7 +110,7 @@ option, not as options to \fBbugpoint\fP itself. (See \fB\-\-args\fP, above.) \fB\-\-safe\-tool\-args\fP \fItool args\fP .INDENT 0.0 .INDENT 3.5 -Pass all arguments specified after \fB\-\-safe\-tool\-args\fP to the "safe" execution +Pass all arguments specified after \fB\-\-safe\-tool\-args\fP to the \(dqsafe\(dq execution tool. .UNINDENT .UNINDENT @@ -205,9 +204,9 @@ to zero to disable the limit. .INDENT 0.0 .INDENT 3.5 Whenever the test program produces output on its standard output stream, it -should match the contents of \fIfilename\fP (the "reference output"). If you +should match the contents of \fIfilename\fP (the \(dqreference output\(dq). If you do not use this option, \fBbugpoint\fP will attempt to generate a reference output -by compiling the program with the "safe" backend and running it. +by compiling the program with the \(dqsafe\(dq backend and running it. .UNINDENT .UNINDENT .sp @@ -225,13 +224,13 @@ custom command (see \fB\-\-exec\-command\fP) respectively. .INDENT 0.0 .INDENT 3.5 When debugging a code generator, \fBbugpoint\fP should use the specified code -generator as the "safe" code generator. This is a known\-good code generator -used to generate the "reference output" if it has not been provided, and to +generator as the \(dqsafe\(dq code generator. This is a known\-good code generator +used to generate the \(dqreference output\(dq if it has not been provided, and to compile portions of the program that as they are excluded from the testcase. These options allow you to choose the static native code compiler, or a custom command, (see \fB\-\-exec\-command\fP) respectively. The interpreter and the JIT backends cannot currently -be used as the "safe" backends. +be used as the \(dqsafe\(dq backends. .UNINDENT .UNINDENT .sp @@ -249,9 +248,9 @@ be useful for cross\-compilation. .INDENT 3.5 This option defines the command to use with the \fB\-\-compile\-custom\fP option to compile the bitcode testcase. The command should exit with a -failure exit code if the file is "interesting" and should exit with a +failure exit code if the file is \(dqinteresting\(dq and should exit with a success exit code (i.e. 0) otherwise (this is the same as if it crashed on -"interesting" inputs). +\(dqinteresting\(dq inputs). .sp This can be useful for testing compiler output without running any link or execute stages. To @@ -263,14 +262,14 @@ testcase and pass the name of an executable compile\-command script in this form .nf .ft C #!/bin/sh -llc "$@" +llc \(dq$@\(dq not FileCheck [bugpoint input file].ll < bugpoint\-test\-program.s .ft P .fi .UNINDENT .UNINDENT .sp -This script will "fail" as long as FileCheck passes. So the result +This script will \(dqfail\(dq as long as FileCheck passes. So the result will be the minimum bitcode that passes FileCheck. .UNINDENT .UNINDENT @@ -287,7 +286,7 @@ option. \fB\-\-verbose\-errors\fP=\fI{true,false}\fP .INDENT 0.0 .INDENT 3.5 -The default behavior of bugpoint is to print "" when it finds a reduced +The default behavior of bugpoint is to print \(dq\(dq when it finds a reduced test that crashes compilation. This flag prints the output of the crashing program to stderr. This is useful to make sure it is the same error being tracked down and not a different error that happens to crash the compiler as @@ -304,6 +303,6 @@ if an error occurs, it will exit with a non\-zero value. .SH AUTHOR Maintained by the LLVM Team (https://llvm.org/). .SH COPYRIGHT -2003-2021, LLVM Project +2003-2023, LLVM Project .\" Generated by docutils manpage writer. . diff --git a/usr.bin/clang/clang/clang.1 b/usr.bin/clang/clang/clang.1 index 10e78ebe16d..8099bd22879 100644 --- a/usr.bin/clang/clang/clang.1 +++ b/usr.bin/clang/clang/clang.1 @@ -1,4 +1,3 @@ -.\" $FreeBSD$ .\" Man page generated from reStructuredText. . . @@ -28,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" 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" "2023-05-24" "16" "Clang" .SH NAME clang \- the Clang C, C++, and Objective-C compiler .SH SYNOPSIS @@ -53,8 +52,8 @@ transparently use it to run the other tools. .B Preprocessing This stage handles tokenization of the input source file, macro expansion, #include expansion and handling of other preprocessor directives. The -output of this stage is typically called a ".i" (for C), ".ii" (for C++), -".mi" (for Objective\-C), or ".mii" (for Objective\-C++) file. +output of this stage is typically called a \(dq.i\(dq (for C), \(dq.ii\(dq (for C++), +\(dq.mi\(dq (for Objective\-C), or \(dq.mii\(dq (for Objective\-C++) file. .TP .B Parsing and Semantic Analysis This stage parses the input file, translating preprocessor tokens into a @@ -62,27 +61,27 @@ parse tree. Once in the form of a parse tree, it applies semantic analysis to compute types for expressions as well and determine whether the code is well formed. This stage is responsible for generating most of the compiler warnings as well as parse errors. The output of this stage is -an "Abstract Syntax Tree" (AST). +an \(dqAbstract Syntax Tree\(dq (AST). .TP .B Code Generation and Optimization This stage translates an AST into low\-level intermediate code (known as -"LLVM IR") and ultimately to machine code. This phase is responsible for +\(dqLLVM IR\(dq) and ultimately to machine code. This phase is responsible for optimizing the generated code and handling target\-specific code generation. -The output of this stage is typically called a ".s" file or "assembly" file. +The output of this stage is typically called a \(dq.s\(dq file or \(dqassembly\(dq file. .sp Clang also supports the use of an integrated assembler, in which the code generator produces object files directly. This avoids the overhead of -generating the ".s" file and of calling the target assembler. +generating the \(dq.s\(dq file and of calling the target assembler. .TP .B Assembler This stage runs the target assembler to translate the output of the compiler into a target object file. The output of this stage is typically -called a ".o" file or "object" file. +called a \(dq.o\(dq file or \(dqobject\(dq file. .TP .B Linker This stage runs the target linker to merge multiple object files into an executable or dynamic library. The output of this stage is typically called -an "a.out", ".dylib" or ".so" file. +an \(dqa.out\(dq, \(dq.dylib\(dq or \(dq.so\(dq file. .UNINDENT .sp \fBClang Static Analyzer\fP @@ -101,7 +100,7 @@ Run the preprocessor stage. .INDENT 0.0 .TP .B \-fsyntax\-only -Run the preprocessor, parser and type checking stages. +Run the preprocessor, parser and semantic analysis stages. .UNINDENT .INDENT 0.0 .TP @@ -112,7 +111,7 @@ and target\-specific code generation, producing an assembly file. .INDENT 0.0 .TP .B \-c -Run all of the above, plus the assembler, generating a target ".o" object file. +Run all of the above, plus the assembler, generating a target \(dq.o\(dq object file. .UNINDENT .INDENT 0.0 .TP @@ -305,27 +304,45 @@ ISO C++ 2017 with amendments and GNU extensions .UNINDENT .UNINDENT .nf -\fBc++2a\fP +\fBc++20\fP .fi .sp .INDENT 0.0 .INDENT 3.5 -Working draft for ISO C++ 2020 +ISO C++ 2020 with amendments .UNINDENT .UNINDENT .nf -\fBgnu++2a\fP +\fBgnu++20\fP .fi .sp .INDENT 0.0 .INDENT 3.5 -Working draft for ISO C++ 2020 with GNU extensions +ISO C++ 2020 with amendments and GNU extensions +.UNINDENT +.UNINDENT +.nf +\fBc++2b\fP +.fi +.sp +.INDENT 0.0 +.INDENT 3.5 +Working draft for ISO C++ 2023 +.UNINDENT +.UNINDENT +.nf +\fBgnu++2b\fP +.fi +.sp +.INDENT 0.0 +.INDENT 3.5 +Working draft for ISO C++ 2023 with GNU extensions .UNINDENT .UNINDENT .UNINDENT .UNINDENT .sp -The default C++ language standard is \fBgnu++14\fP\&. +The default C++ language standard is \fBgnu++17\fP\&. .sp Supported values for the OpenCL language are: .INDENT 7.0 @@ -424,8 +441,26 @@ implementations, as these are needed for efficient codegen for many programs. .INDENT 0.0 .TP .B \-fno\-builtin -Disable special handling and optimizations of builtin functions like -\fBstrlen()\fP and \fBmalloc()\fP\&. +Disable special handling and optimizations of well\-known library functions, +like \fBstrlen()\fP and \fBmalloc()\fP\&. +.UNINDENT +.INDENT 0.0 +.TP +.B \-fno\-builtin\- +Disable special handling and optimizations for the specific library function. +For example, \fB\-fno\-builtin\-strlen\fP removes any special handling for the +\fBstrlen()\fP library function. +.UNINDENT +.INDENT 0.0 +.TP +.B \-fno\-builtin\-std\- +Disable special handling and optimizations for the specific C++ standard +library function in namespace \fBstd\fP\&. For example, +\fB\-fno\-builtin\-std\-move_if_noexcept\fP removes any special handling for the +\fBstd::move_if_noexcept()\fP library function. +.sp +For C standard library functions that the C++ standard library also provides +in namespace \fBstd\fP, use \fI\%\-fno\-builtin\-\fP instead. .UNINDENT .INDENT 0.0 .TP @@ -435,7 +470,7 @@ Indicate that math functions should be treated as updating \fBerrno\fP\&. .INDENT 0.0 .TP .B \-fpascal\-strings -Enable support for Pascal\-style strings with "\epfoo". +Enable support for Pascal\-style strings with \(dq\epfoo\(dq. .UNINDENT .INDENT 0.0 .TP @@ -479,13 +514,13 @@ overall bit\-width .INDENT 0.0 .TP .B \-fblocks -Enable the "Blocks" language feature. +Enable the \(dqBlocks\(dq language feature. .UNINDENT .INDENT 0.0 .TP .B \-fobjc\-abi\-version=version Select the Objective\-C ABI version to use. Available versions are 1 (legacy -"fragile" ABI), 2 (non\-fragile ABI 1), and 3 (non\-fragile ABI 2). +\(dqfragile\(dq ABI), 2 (non\-fragile ABI 1), and 3 (non\-fragile ABI 2). .UNINDENT .INDENT 0.0 .TP @@ -509,7 +544,12 @@ number of cross compilers, or may only support a native target. .INDENT 0.0 .TP .B \-arch -Specify the architecture to build for. +Specify the architecture to build for (Mac OS X specific). +.UNINDENT +.INDENT 0.0 +.TP +.B \-target +Specify the architecture to build for (all platforms). .UNINDENT .INDENT 0.0 .TP @@ -550,7 +590,7 @@ but which may not exist on earlier ones. Specify which optimization level to use: .INDENT 7.0 .INDENT 3.5 -\fI\%\-O0\fP Means "no optimization": this level compiles the fastest and +\fI\%\-O0\fP Means \(dqno optimization\(dq: this level compiles the fastest and generates the most debuggable code. .sp \fI\%\-O1\fP Somewhere between \fI\%\-O0\fP and \fI\%\-O2\fP\&. @@ -594,9 +634,9 @@ best at \fI\%\-O0\fP\&. When more than one option starting with \fI\-g\fP is specified, the last one wins: .INDENT 7.0 .INDENT 3.5 -\fB\-g\fP Generate debug information. +\fI\%\-g\fP Generate debug information. .sp -\fB\-gline\-tables\-only\fP Generate only line table debug information. This +\fI\%\-gline\-tables\-only\fP Generate only line table debug information. This allows for symbolicated backtraces with inlining information, but does not include any information about variables, their locations or types. .sp @@ -627,7 +667,7 @@ needed by a module and could be replaced with a forward declaration. Further, Clang will only emit type info for a dynamic C++ class in the module that contains the vtable for the class. .sp -The \fB\-fstandalone\-debug\fP option turns off these optimizations. +The \fI\%\-fstandalone\-debug\fP option turns off these optimizations. This is useful when working with 3rd\-party libraries that don\(aqt come with debug information. This is the default on Darwin. Note that Clang will never emit type information for types that are not referenced at all by the @@ -668,8 +708,8 @@ It can be disabled with \fI\%\-fno\-common\fP\&. .TP .B \-ftls\-model= Set the default thread\-local storage (TLS) model to use for thread\-local -variables. Valid values are: "global\-dynamic", "local\-dynamic", -"initial\-exec" and "local\-exec". The default is "global\-dynamic". The default +variables. Valid values are: \(dqglobal\-dynamic\(dq, \(dqlocal\-dynamic\(dq, +\(dqinitial\-exec\(dq and \(dqlocal\-exec\(dq. The default is \(dqglobal\-dynamic\(dq. The default model can be overridden with the tls_model attribute. The compiler will try to choose a more efficient model if possible. .UNINDENT @@ -681,16 +721,16 @@ When used with \fI\%\-S\fP this generates LLVM intermediate language assembly files, otherwise this generates LLVM bitcode format object files (which may be passed to the linker depending on the stage selection options). .sp -The default for \fI\%\-flto\fP is "full", in which the +The default for \fI\%\-flto\fP is \(dqfull\(dq, in which the LLVM bitcode is suitable for monolithic Link Time Optimization (LTO), where the linker merges all such modules into a single combined module for -optimization. With "thin", ThinLTO +optimization. With \(dqthin\(dq, \fI\%ThinLTO\fP compilation is invoked instead. .sp \fBNOTE:\fP .INDENT 7.0 .INDENT 3.5 -On Darwin, when using \fI\%\-flto\fP along with \fB\-g\fP and +On Darwin, when using \fI\%\-flto\fP along with \fI\%\-g\fP and compiling and linking in separate steps, you also need to pass \fB\-Wl,\-object_path_lto,.o\fP at the linking step to instruct the ld64 linker not to delete the temporary object file generated during Link @@ -765,7 +805,7 @@ Print the full library path of file. .TP .B \-print\-libgcc\-file\-name Print the library path for the currently used compiler runtime library -("libgcc.a" or "libclang_rt.builtins.*.a"). +(\(dqlibgcc.a\(dq or \(dqlibclang_rt.builtins.*.a\(dq). .UNINDENT .INDENT 0.0 .TP @@ -786,8 +826,8 @@ Save intermediate compilation results. .TP .B \-save\-stats, \-save\-stats=cwd, \-save\-stats=obj Save internal code generation (LLVM) statistics to a file in the current -directory (\fI\%\-save\-stats\fP/"\-save\-stats=cwd") or the directory -of the output file ("\-save\-state=obj"). +directory (\fI\%\-save\-stats\fP/\(dq\-save\-stats=cwd\(dq) or the directory +of the output file (\(dq\-save\-state=obj\(dq). .UNINDENT .INDENT 0.0 .TP @@ -895,15 +935,15 @@ Darwin targets. .UNINDENT .SH BUGS .sp -To report bugs, please visit <\fI\%https://bugs.llvm.org/\fP>. Most bug reports should +To report bugs, please visit <\fI\%https://github.com/llvm/llvm\-project/issues/\fP>. Most bug reports should include preprocessed source files (use the \fI\%\-E\fP option) and the full output of the compiler, along with information to reproduce. .SH SEE ALSO .sp -\fBld(1)\fP +\fBas(1)\fP, \fBld(1)\fP .SH AUTHOR Maintained by the Clang / LLVM Team () .SH COPYRIGHT -2007-2021, The Clang Team +2007-2023, The Clang Team .\" Generated by docutils manpage writer. . diff --git a/usr.bin/clang/llc/llc.1 b/usr.bin/clang/llc/llc.1 index 0fb50f43ed9..1dfef564fcd 100644 --- a/usr.bin/clang/llc/llc.1 +++ b/usr.bin/clang/llc/llc.1 @@ -1,4 +1,3 @@ -.\" $FreeBSD$ .\" Man page generated from reStructuredText. . . @@ -28,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" 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" "2023-05-24" "16" "LLVM" .SH NAME llc \- LLVM static compiler .SH SYNOPSIS @@ -45,15 +44,15 @@ determined from the input file, unless the \fI\%\-march\fP option is used to override the default. .SH OPTIONS .sp -If \fBfilename\fP is "\fB\-\fP" or omitted, \fBllc\fP reads from standard input. -Otherwise, it will from \fBfilename\fP\&. Inputs can be in either the LLVM assembly -language format (\fB\&.ll\fP) or the LLVM bitcode format (\fB\&.bc\fP). +If \fBfilename\fP is \(dq\fB\-\fP\(dq or omitted, \fBllc\fP reads from standard input. +Otherwise, it will read from \fBfilename\fP\&. Inputs can be in either the LLVM +assembly language format (\fB\&.ll\fP) or the LLVM bitcode format (\fB\&.bc\fP). .sp If the \fI\%\-o\fP option is omitted, then \fBllc\fP will send its output to standard output if the input is from standard input. If the \fI\%\-o\fP -option specifies "\fB\-\fP", then the output will also be sent to standard output. +option specifies \(dq\fB\-\fP\(dq, then the output will also be sent to standard output. .sp -If no \fI\%\-o\fP option is specified and an input file other than "\fB\-\fP" is +If no \fI\%\-o\fP option is specified and an input file other than \(dq\fB\-\fP\(dq is specified, then \fBllc\fP creates the output filename by taking the input filename, removing any existing \fB\&.bc\fP extension, and adding a \fB\&.s\fP suffix. .sp @@ -291,6 +290,6 @@ occurs, it will exit with a non\-zero value. .SH AUTHOR Maintained by the LLVM Team (https://llvm.org/). .SH COPYRIGHT -2003-2021, LLVM Project +2003-2023, LLVM Project .\" Generated by docutils manpage writer. . diff --git a/usr.bin/clang/lli/lli.1 b/usr.bin/clang/lli/lli.1 index 6684ab4411b..b82e6a903a1 100644 --- a/usr.bin/clang/lli/lli.1 +++ b/usr.bin/clang/lli/lli.1 @@ -1,4 +1,3 @@ -.\" $FreeBSD$ .\" Man page generated from reStructuredText. . . @@ -28,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" 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" "2023-05-24" "16" "LLVM" .SH NAME lli \- directly execute programs from LLVM bitcode .SH SYNOPSIS @@ -228,7 +227,8 @@ Register allocator to use (default=linearscan) .nf .ft C =bigblock: Big\-block register allocator -=linearscan: linear scan register allocator =local \- local register allocator +=linearscan: linear scan register allocator +=local: local register allocator =simple: simple register allocator .ft P .fi @@ -245,7 +245,8 @@ Choose relocation model from: .nf .ft C =default: Target default relocation model -=static: Non\-relocatable code =pic \- Fully relocatable, position independent code +=static: Non\-relocatable code +=pic: Fully relocatable, position independent code =dynamic\-no\-pic: Relocatable external references, non\-relocatable code .ft P .fi @@ -294,6 +295,6 @@ Otherwise, it will return the exit code of the program it executes. .SH AUTHOR Maintained by the LLVM Team (https://llvm.org/). .SH COPYRIGHT -2003-2021, LLVM Project +2003-2023, LLVM Project .\" Generated by docutils manpage writer. . diff --git a/usr.bin/clang/llvm-ar/llvm-ar.1 b/usr.bin/clang/llvm-ar/llvm-ar.1 index d386e6bcc6f..9f2be0c401c 100644 --- a/usr.bin/clang/llvm-ar/llvm-ar.1 +++ b/usr.bin/clang/llvm-ar/llvm-ar.1 @@ -1,4 +1,3 @@ -.\" $FreeBSD$ .\" Man page generated from reStructuredText. . . @@ -28,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" 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" "2023-05-24" "16" "LLVM" .SH NAME llvm-ar \- LLVM archiver .SH SYNOPSIS @@ -43,9 +42,9 @@ the archive can contain any kind of file. By default, \fBllvm\-ar\fP generates a symbol table that makes linking faster because only the symbol table needs to be consulted, not each individual file member of the archive. .sp -The \fBllvm\-ar\fP command can be used to \fIread\fP archive files in SVR4, -GNU, BSD and Darwin format, and \fIwrite\fP in the GNU, BSD, and Darwin style -archive files. If an SVR4 format archive is used with the \fI\%r\fP +The \fBllvm\-ar\fP command can be used to \fIread\fP archive files in SVR4, GNU, +BSD , Big Archive, and Darwin format, and \fIwrite\fP in the GNU, BSD, Big Archive, and +Darwin style archive files. If an SVR4 format archive is used with the \fI\%r\fP (replace), \fI\%d\fP (delete), \fI\%m\fP (move) or \fI\%q\fP (quick update) operations, the archive will be reconstructed in the format defined by \fI\%\-\-format\fP\&. @@ -104,7 +103,7 @@ found in other \fBar\fP implementations. The options for \fBllvm\-ar\fP specify a single basic Operation to perform on the archive, a variety of Modifiers for that Operation, the name of the archive file, and an optional list of file names. If the \fIfiles\fP option is not specified, it -generally means either "none" or "all" members, depending on the operation. The +generally means either \(dqnone\(dq or \(dqall\(dq members, depending on the operation. The Options, Operations and Modifiers are explained in the sections below. .sp The minimal set of options is at least one operator and the name of the @@ -235,7 +234,7 @@ is a feature for \fBllvm\-ar\fP that is not found in gnu\-ar. .B N When extracting or deleting a member that shares its name with another member, the \fIcount\fP parameter allows you to supply a positive whole number that -selects the instance of the given name, with "1" indicating the first +selects the instance of the given name, with \(dq1\(dq indicating the first instance. If \fI\%N\fP is not specified the first member of that name will be selected. If \fIcount\fP is not supplied, the operation fails.*count* cannot be .UNINDENT @@ -254,10 +253,8 @@ Display member offsets inside the archive. .INDENT 0.0 .TP .B T -When creating or modifying an archive, this option specifies that the -\fBarchive\fP will be thin. By default, archives are not created as thin -archives and when modifying a thin archive, it will be converted to a regular -archive. +Alias for \fB\-\-thin\fP\&. In many ar implementations \fBT\fP has a different +meaning, as specified by X/Open System interface. .UNINDENT .INDENT 0.0 .TP @@ -338,11 +335,63 @@ stream. No other options are compatible with this option. .UNINDENT .INDENT 0.0 .TP +.B \-\-output= +Specify a directory where archive members should be extracted to. By default the +current working directory is used. +.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 \-\-thin +When creating or modifying an archive, this option specifies that the +\fBarchive\fP will be thin. By default, archives are not created as thin archives +and when modifying a thin archive, it will be converted to a regular archive. +.UNINDENT +.INDENT 0.0 +.TP .B \-\-version Display the version of the \fBllvm\-ar\fP executable. .UNINDENT .INDENT 0.0 .TP +.B \-X mode +Specifies the type of object file \fBllvm\-ar\fP will recognise. The mode must be +one of the following: +.INDENT 7.0 +.INDENT 3.5 +.INDENT 0.0 +.TP +.B 32 +Process only 32\-bit object files. +.TP +.B 64 +Process only 64\-bit object files. +.TP +.B 32_64 +Process both 32\-bit and 64\-bit object files. +.TP +.B any +Process all object files. +.UNINDENT +.UNINDENT +.UNINDENT +.sp +The default is to process 32\-bit object files (ignore 64\-bit objects). The mode can also +be set with the OBJECT_MODE environment variable. For example, OBJECT_MODE=64 causes ar to +process any 64\-bit objects and ignore 32\-bit objects. The \-X flag overrides the OBJECT_MODE +variable. +.UNINDENT +.INDENT 0.0 +.TP .B @ Read command\-line options and commands from response file \fB\fP\&. .UNINDENT @@ -415,6 +464,6 @@ will exit with a non\-zero value. .SH AUTHOR Maintained by the LLVM Team (https://llvm.org/). .SH COPYRIGHT -2003-2021, LLVM Project +2003-2023, LLVM Project .\" Generated by docutils manpage writer. . diff --git a/usr.bin/clang/llvm-ar/llvm-ranlib.1 b/usr.bin/clang/llvm-ar/llvm-ranlib.1 index 3fd6e6618dd..36c715546fa 100644 --- a/usr.bin/clang/llvm-ar/llvm-ranlib.1 +++ b/usr.bin/clang/llvm-ar/llvm-ranlib.1 @@ -1,4 +1,3 @@ -.\" $FreeBSD$ .\" Man page generated from reStructuredText. . . @@ -28,16 +27,16 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" 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" "2023-05-24" "16" "LLVM" .SH NAME llvm-ranlib \- generates an archive index .SH SYNOPSIS .sp -\fBllvm\-ranlib\fP [\fIoptions\fP] +\fBllvm\-ranlib\fP [\fIoptions\fP] \fIarchive...\fP .SH DESCRIPTION .sp -\fBllvm\-ranlib\fP is an alias for the llvm\-ar tool that -generates an index for an archive. It can be used as a replacement for GNU\(aqs +\fBllvm\-ranlib\fP is an alias for the \fI\%llvm\-ar\fP tool that +generates an index for one or more archives. It can be used as a replacement for GNU\(aqs \fBranlib\fP tool. .sp Running \fBllvm\-ranlib\fP is equivalent to running \fBllvm\-ar s\fP\&. @@ -47,6 +46,6 @@ Running \fBllvm\-ranlib\fP is equivalent to running \fBllvm\-ar s\fP\&. .SH AUTHOR Maintained by the LLVM Team (https://llvm.org/). .SH COPYRIGHT -2003-2021, LLVM Project +2003-2023, LLVM Project .\" Generated by docutils manpage writer. . diff --git a/usr.bin/clang/llvm-as/llvm-as.1 b/usr.bin/clang/llvm-as/llvm-as.1 index e6e7be2ad85..897f2a28a97 100644 --- a/usr.bin/clang/llvm-as/llvm-as.1 +++ b/usr.bin/clang/llvm-as/llvm-as.1 @@ -1,4 +1,3 @@ -.\" $FreeBSD$ .\" Man page generated from reStructuredText. . . @@ -28,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" 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" "2023-05-24" "16" "LLVM" .SH NAME llvm-as \- LLVM assembler .SH SYNOPSIS @@ -82,6 +81,6 @@ will exit with a non\-zero value. .SH AUTHOR Maintained by the LLVM Team (https://llvm.org/). .SH COPYRIGHT -2003-2021, LLVM Project +2003-2023, LLVM Project .\" Generated by docutils manpage writer. . diff --git a/usr.bin/clang/llvm-bcanalyzer/llvm-bcanalyzer.1 b/usr.bin/clang/llvm-bcanalyzer/llvm-bcanalyzer.1 index edf11f29b7d..016298a7711 100644 --- a/usr.bin/clang/llvm-bcanalyzer/llvm-bcanalyzer.1 +++ b/usr.bin/clang/llvm-bcanalyzer/llvm-bcanalyzer.1 @@ -1,4 +1,3 @@ -.\" $FreeBSD$ .\" Man page generated from reStructuredText. . . @@ -28,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" 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" "2023-05-24" "16" "LLVM" .SH NAME llvm-bcanalyzer \- LLVM bitcode analyzer .SH SYNOPSIS @@ -50,28 +49,14 @@ pipeline. Output is written to the standard output. .SH OPTIONS .INDENT 0.0 .TP -.B \-nodetails -Causes \fBllvm\-bcanalyzer\fP to abbreviate its output by writing out only -a module level summary. The details for individual functions are not -displayed. -.UNINDENT -.INDENT 0.0 -.TP -.B \-dump +.B \-\-dump Causes \fBllvm\-bcanalyzer\fP to dump the bitcode in a human readable format. This format is significantly different from LLVM assembly and provides details about the encoding of the bitcode file. .UNINDENT .INDENT 0.0 .TP -.B \-verify -Causes \fBllvm\-bcanalyzer\fP to verify the module produced by reading the -bitcode. This ensures that the statistics generated are based on a consistent -module. -.UNINDENT -.INDENT 0.0 -.TP -.B \-help +.B \-\-help Print a summary of command line options. .UNINDENT .SH EXIT STATUS @@ -467,10 +452,10 @@ Rate encoding scheme. The percentage is relative to # of VBR Expanded Bytes. .UNINDENT .SH SEE ALSO .sp -\fBllvm\-dis(1)\fP, /BitCodeFormat +\fBllvm\-dis(1)\fP, \fI\%LLVM Bitcode File Format\fP .SH AUTHOR Maintained by the LLVM Team (https://llvm.org/). .SH COPYRIGHT -2003-2021, LLVM Project +2003-2023, LLVM Project .\" Generated by docutils manpage writer. . diff --git a/usr.bin/clang/llvm-cov/llvm-cov.1 b/usr.bin/clang/llvm-cov/llvm-cov.1 index fb1006d4ea9..e2546147776 100644 --- a/usr.bin/clang/llvm-cov/llvm-cov.1 +++ b/usr.bin/clang/llvm-cov/llvm-cov.1 @@ -1,4 +1,3 @@ -.\" $FreeBSD$ .\" Man page generated from reStructuredText. . . @@ -28,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" 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" "2023-05-24" "16" "LLVM" .SH NAME llvm-cov \- emit coverage information .SH SYNOPSIS @@ -70,9 +69,7 @@ To use \fBllvm\-cov gcov\fP, you must first build an instrumented version 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 @@ Display branch counts instead of probabilities (requires \-b). .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. @@ -150,7 +152,7 @@ displayed. .UNINDENT .INDENT 0.0 .TP -.B \-o=, \-\-object\-directory=, \-\-object\-file= +.B \-o , \-\-object\-directory=, \-\-object\-file= Find objects in DIR or based on FILE\(aqs path. If you specify a particular object file, the coverage data files are expected to have the same base name with \fB\&.gcno\fP and \fB\&.gcda\fP extensions. If you specify a directory, the @@ -169,6 +171,22 @@ included file name. .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. @@ -191,12 +209,12 @@ it exits with zero. .SH SHOW COMMAND .SS SYNOPSIS .sp -\fBllvm\-cov show\fP [\fIoptions\fP] \-instr\-profile \fIPROFILE\fP \fIBIN\fP [\fI\-object BIN,...\fP] [[\fI\-object BIN\fP]] [\fISOURCES\fP] +\fBllvm\-cov show\fP [\fIoptions\fP] \-instr\-profile \fIPROFILE\fP [\fIBIN\fP] [\fI\-object BIN\fP]... [\fI\-sources\fP] [\fISOURCE\fP]... .SS DESCRIPTION .sp The \fBllvm\-cov show\fP command shows line by line coverage of the -binaries \fIBIN\fP,... using the profile data \fIPROFILE\fP\&. It can optionally be -filtered to only show the coverage for the files listed in \fISOURCES\fP\&. +binaries \fIBIN\fP\&... using the profile data \fIPROFILE\fP\&. It can optionally be +filtered to only show the coverage for the files listed in \fISOURCE\fP\&.... .sp \fIBIN\fP may be an executable, object file, dynamic library, or archive (thin or otherwise). @@ -219,7 +237,7 @@ tool. .TP .B \-show\-branches= Show coverage for branch conditions in terms of either count or percentage. -The supported views are: "count", "percent". +The supported views are: \(dqcount\(dq, \(dqpercent\(dq. .UNINDENT .INDENT 0.0 .TP @@ -274,9 +292,9 @@ Show code coverage only for functions with the given name. .UNINDENT .INDENT 0.0 .TP -.B \-name\-whitelist= +.B \-name\-allowlist= Show code coverage only for functions listed in the given file. Each line in -the file should start with \fIwhitelist_fun:\fP, immediately followed by the name +the file should start with \fIallowlist_fun:\fP, immediately followed by the name of the function to accept. This name can be a wildcard expression. .UNINDENT .INDENT 0.0 @@ -292,7 +310,7 @@ Skip source code files with file paths that match the given regular expression. .INDENT 0.0 .TP .B \-format= -Use the specified output format. The supported formats are: "text", "html". +Use the specified output format. The supported formats are: \(dqtext\(dq, \(dqhtml\(dq. .UNINDENT .INDENT 0.0 .TP @@ -327,6 +345,13 @@ 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 +.INDENT 0.0 +.TP .B \-line\-coverage\-gt= Show code coverage only for functions with line coverage greater than the given threshold. @@ -356,15 +381,38 @@ Map the paths in the coverage data to local source file paths. This allows you to generate the coverage data on one machine, and then use llvm\-cov on a different machine where you have the same files on a different path. .UNINDENT +.INDENT 0.0 +.TP +.B \-coverage\-watermark=, +Set high and low watermarks for coverage in html format output. This allows you +to set the high and low watermark of coverage as desired, green when +coverage >= high, red when coverage < low, and yellow otherwise. Both high and +low should be between 0\-100 and high > low. +.UNINDENT +.INDENT 0.0 +.TP +.B \-debuginfod +.UNINDENT +.sp +Use debuginfod to look up coverage mapping for binary IDs present in the profile +but not in any object given on the command line. Defaults to true if debuginfod +is compiled in and configured via the DEBUGINFOD_URLS environment variable. +.INDENT 0.0 +.TP +.B \-debug\-file\-directory= +.UNINDENT +.sp +Provides local directories to search for objects corresponding to binary IDs in +the profile (as with debuginfod). Defaults to system build ID directories. .SH REPORT COMMAND .SS SYNOPSIS .sp -\fBllvm\-cov report\fP [\fIoptions\fP] \-instr\-profile \fIPROFILE\fP \fIBIN\fP [\fI\-object BIN,...\fP] [[\fI\-object BIN\fP]] [\fISOURCES\fP] +\fBllvm\-cov report\fP [\fIoptions\fP] \-instr\-profile \fIPROFILE\fP [\fIBIN\fP] [\fI\-object BIN\fP]... [\fI\-sources\fP] [\fISOURCE\fP]... .SS DESCRIPTION .sp The \fBllvm\-cov report\fP command displays a summary of the coverage of -the binaries \fIBIN\fP,... using the profile data \fIPROFILE\fP\&. It can optionally be -filtered to only show the coverage for the files listed in \fISOURCES\fP\&. +the binaries \fIBIN\fP\&... using the profile data \fIPROFILE\fP\&. It can optionally be +filtered to only show the coverage for the files listed in \fISOURCE\fP\&.... .sp \fIBIN\fP may be an executable, object file, dynamic library, or archive (thin or otherwise). @@ -391,6 +439,11 @@ non\-universal binary. .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,14 +462,37 @@ Show statistics for all function instantiations. Defaults to false. .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 +.INDENT 0.0 +.TP +.B \-debuginfod +.UNINDENT +.sp +Attempt to look up coverage mapping from objects using debuginfod. This is +attempted by default for binary IDs present in the profile but not provided on +the command line, so long as debuginfod is compiled in and configured via +DEBUGINFOD_URLS. +.INDENT 0.0 +.TP +.B \-debug\-file\-directory= +.UNINDENT +.sp +Provides a directory to search for objects corresponding to binary IDs in the +profile. .SH EXPORT COMMAND .SS SYNOPSIS .sp -\fBllvm\-cov export\fP [\fIoptions\fP] \-instr\-profile \fIPROFILE\fP \fIBIN\fP [\fI\-object BIN,...\fP] [[\fI\-object BIN\fP]] [\fISOURCES\fP] +\fBllvm\-cov export\fP [\fIoptions\fP] \-instr\-profile \fIPROFILE\fP [\fIBIN\fP] [\fI\-object BIN\fP]... [\fI\-sources\fP] [\fISOURCE\fP]... .SS DESCRIPTION .sp The \fBllvm\-cov export\fP command exports coverage data of the binaries -\fIBIN\fP,... using the profile data \fIPROFILE\fP in either JSON or lcov trace file +\fIBIN\fP\&... using the profile data \fIPROFILE\fP in either JSON or lcov trace file format. .sp When exporting JSON, the regions, functions, branches, expansions, and @@ -424,7 +500,7 @@ summaries of the coverage data will be exported. When exporting an lcov trace file, the line\-based coverage, branch coverage, and summaries will be exported. .sp The exported data can optionally be filtered to only export the coverage -for the files listed in \fISOURCES\fP\&. +for the files listed in \fISOURCE\fP\&.... .sp For information on compiling programs for coverage and generating profile data, see \fI\%SHOW COMMAND\fP\&. @@ -440,8 +516,8 @@ non\-universal binary. .INDENT 0.0 .TP .B \-format= -Use the specified output format. The supported formats are: "text" (JSON), -"lcov". +Use the specified output format. The supported formats are: \(dqtext\(dq (JSON), +\(dqlcov\(dq. .UNINDENT .INDENT 0.0 .TP @@ -476,9 +552,32 @@ Skip exporting per\-function coverage data. 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 +.INDENT 0.0 +.TP +.B \-debuginfod +.UNINDENT +.sp +Attempt to look up coverage mapping from objects using debuginfod. This is +attempted by default for binary IDs present in the profile but not provided on +the command line, so long as debuginfod is compiled in and configured via +DEBUGINFOD_URLS. +.INDENT 0.0 +.TP +.B \-debug\-file\-directory= +.UNINDENT +.sp +Provides a directory to search for objects corresponding to binary IDs in the +profile. .SH AUTHOR Maintained by the LLVM Team (https://llvm.org/). .SH COPYRIGHT -2003-2021, LLVM Project +2003-2023, LLVM Project .\" Generated by docutils manpage writer. . diff --git a/usr.bin/clang/llvm-cxxfilt/llvm-cxxfilt.1 b/usr.bin/clang/llvm-cxxfilt/llvm-cxxfilt.1 index 8b8cb10f8b8..133ed151f0a 100644 --- a/usr.bin/clang/llvm-cxxfilt/llvm-cxxfilt.1 +++ b/usr.bin/clang/llvm-cxxfilt/llvm-cxxfilt.1 @@ -1,4 +1,3 @@ -.\" $FreeBSD$ .\" Man page generated from reStructuredText. . . @@ -28,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" 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" "2023-05-24" "16" "LLVM" .SH NAME llvm-cxxfilt \- LLVM symbol name demangler .SH SYNOPSIS @@ -78,11 +77,6 @@ Print a summary of command line options. .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. @@ -118,6 +112,6 @@ case a non\-zero exit code is returned. .SH AUTHOR Maintained by the LLVM Team (https://llvm.org/). .SH COPYRIGHT -2003-2021, LLVM Project +2003-2023, LLVM Project .\" Generated by docutils manpage writer. . diff --git a/usr.bin/clang/llvm-diff/llvm-diff.1 b/usr.bin/clang/llvm-diff/llvm-diff.1 index c5478cde341..93439bd08da 100644 --- a/usr.bin/clang/llvm-diff/llvm-diff.1 +++ b/usr.bin/clang/llvm-diff/llvm-diff.1 @@ -1,4 +1,3 @@ -.\" $FreeBSD$ .\" Man page generated from reStructuredText. . . @@ -28,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" 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" "2023-05-24" "16" "LLVM" .SH NAME llvm-diff \- LLVM structural 'diff' .SH SYNOPSIS @@ -72,6 +71,6 @@ massive detected differences in blocks. .SH AUTHOR Maintained by the LLVM Team (https://llvm.org/). .SH COPYRIGHT -2003-2021, LLVM Project +2003-2023, LLVM Project .\" Generated by docutils manpage writer. . diff --git a/usr.bin/clang/llvm-dis/llvm-dis.1 b/usr.bin/clang/llvm-dis/llvm-dis.1 index eccb1900c1b..9a0580d8c2c 100644 --- a/usr.bin/clang/llvm-dis/llvm-dis.1 +++ b/usr.bin/clang/llvm-dis/llvm-dis.1 @@ -1,4 +1,3 @@ -.\" $FreeBSD$ .\" Man page generated from reStructuredText. . . @@ -28,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" 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" "2023-05-24" "16" "LLVM" .SH NAME llvm-dis \- LLVM disassembler .SH SYNOPSIS @@ -83,6 +82,6 @@ occurs, it will exit with a non\-zero value. .SH AUTHOR Maintained by the LLVM Team (https://llvm.org/). .SH COPYRIGHT -2003-2021, LLVM Project +2003-2023, LLVM Project .\" Generated by docutils manpage writer. . diff --git a/usr.bin/clang/llvm-dwarfdump/llvm-dwarfdump.1 b/usr.bin/clang/llvm-dwarfdump/llvm-dwarfdump.1 index c3c9db66a5d..7e3c9b6fb6e 100644 --- a/usr.bin/clang/llvm-dwarfdump/llvm-dwarfdump.1 +++ b/usr.bin/clang/llvm-dwarfdump/llvm-dwarfdump.1 @@ -1,4 +1,3 @@ -.\" $FreeBSD$ .\" Man page generated from reStructuredText. . . @@ -28,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" 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" "2023-05-24" "16" "LLVM" .SH NAME llvm-dwarfdump \- dump and verify DWARF debug information .SH SYNOPSIS @@ -150,6 +149,12 @@ Show the sizes of all debug sections, expressed in bytes. .UNINDENT .INDENT 0.0 .TP +.B \-\-show\-sources +Print all source files mentioned in the debug information. Absolute +paths are given whenever possible. +.UNINDENT +.INDENT 0.0 +.TP .B \-\-statistics Collect debug info quality metrics and print the results as machine\-readable single\-line JSON output. The output @@ -198,7 +203,7 @@ Display the version of the tool. .UNINDENT .INDENT 0.0 .TP -.B \-\-debug\-abbrev, \-\-debug\-addr, \-\-debug\-aranges, \-\-debug\-cu\-index, \-\-debug\-frame[=], \-\-debug\-gnu\-pubnames, \-\-debug\-gnu\-pubtypes, \-\-debug\-info [=], \-\-debug\-line [=], \-\-debug\-line\-str, \-\-debug\-loc [=], \-\-debug\-loclists [=], \-\-debug\-macro, \-\-debug\-names, \-\-debug\-pubnames, \-\-debug\-pubtypes, \-\-debug\-ranges, \-\-debug\-rnglists, \-\-debug\-str, \-\-debug\-str\-offsets, \-\-debug\-tu\-index, \-\-debug\-types [=], \-\-eh\-frame [=], \-\-gdb\-index, \-\-apple\-names, \-\-apple\-types, \-\-apple\-namespaces, \-\-apple\-objc +.B \-\-debug\-abbrev, \-\-debug\-addr, \-\-debug\-aranges, \-\-debug\-cu\-index, \-\-debug\-frame [=], \-\-debug\-gnu\-pubnames, \-\-debug\-gnu\-pubtypes, \-\-debug\-info [=], \-\-debug\-line [=], \-\-debug\-line\-str, \-\-debug\-loc [=], \-\-debug\-loclists [=], \-\-debug\-macro, \-\-debug\-names, \-\-debug\-pubnames, \-\-debug\-pubtypes, \-\-debug\-ranges, \-\-debug\-rnglists, \-\-debug\-str, \-\-debug\-str\-offsets, \-\-debug\-tu\-index, \-\-debug\-types [=], \-\-eh\-frame [=], \-\-gdb\-index, \-\-apple\-names, \-\-apple\-types, \-\-apple\-namespaces, \-\-apple\-objc Dump the specified DWARF section by name. Only the \fI\&.debug_info\fP section is shown by default. Some entries support adding an \fI=\fP as a way to provide an @@ -206,6 +211,10 @@ optional offset of the exact entry to dump within the respective section. When an offset is provided, only the entry at that offset will be dumped, else the entire section will be dumped. +.sp +The \fI\%\-\-debug\-macro\fP option prints both the .debug_macro and the .debug_macinfo sections. +.sp +The \fI\%\-\-debug\-frame\fP and \fI\%\-\-eh\-frame\fP options are aliases, in cases where both sections are present one command outputs both. .UNINDENT .INDENT 0.0 .TP @@ -214,7 +223,7 @@ Read command\-line options from \fI\fP\&. .UNINDENT .SH FORMAT OF STATISTICS OUTPUT .sp -The :\fI\%\-\-statistics\fP option generates single\-line JSON output +The \fI\%\-\-statistics\fP option generates single\-line JSON output representing quality metrics of the processed debug info. These metrics are useful to compare changes between two compilers, particularly for judging the effect that a change to the compiler has on the debug info quality. @@ -258,6 +267,6 @@ successfully. Otherwise, it returns 1. .SH AUTHOR Maintained by the LLVM Team (https://llvm.org/). .SH COPYRIGHT -2003-2021, LLVM Project +2003-2023, LLVM Project .\" Generated by docutils manpage writer. . diff --git a/usr.bin/clang/llvm-dwarfutil/llvm-dwarfutil.1 b/usr.bin/clang/llvm-dwarfutil/llvm-dwarfutil.1 index 1d14486b0d2..15015e96f5a 100644 --- a/usr.bin/clang/llvm-dwarfutil/llvm-dwarfutil.1 +++ b/usr.bin/clang/llvm-dwarfutil/llvm-dwarfutil.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "LLVM-DWARFUTIL" "1" "2022-07-24" "15" "LLVM" +.TH "LLVM-DWARFUTIL" "1" "2023-05-24" "16" "LLVM" .SH NAME llvm-dwarfutil \- A tool to copy and manipulate debug info .SH SYNOPSIS @@ -41,8 +41,8 @@ In basic usage, it makes a semantic copy of the input to the output. If any options are specified, the output may be modified along the way, e.g. by removing unused debug info. .sp -If "\-" is specified for the input file, the input is read from the program\(aqs -standard input stream. If "\-" is specified for the output file, the output +If \(dq\-\(dq is specified for the input file, the input is read from the program\(aqs +standard input stream. If \(dq\-\(dq is specified for the output file, the output is written to the standard output stream of the program. .sp The tool is still in active development. @@ -61,7 +61,7 @@ That option is enabled by default. .INDENT 0.0 .TP .B \-\-odr\-deduplication -Remove duplicated types (if "One Definition Rule" is supported by source +Remove duplicated types (if \(dqOne Definition Rule\(dq is supported by source language). Keeps first type definition and removes other definitions, potentially significantly reducing the size of output debug info. .sp @@ -163,6 +163,6 @@ To report bugs, please visit <\fI\%https://github.com/llvm/llvm\-project/labels/ .SH AUTHOR Maintained by the LLVM Team (https://llvm.org/). .SH COPYRIGHT -2003-2022, LLVM Project +2003-2023, LLVM Project .\" Generated by docutils manpage writer. . diff --git a/usr.bin/clang/llvm-extract/llvm-extract.1 b/usr.bin/clang/llvm-extract/llvm-extract.1 index e0c6f3d32ba..b5f3550e8f7 100644 --- a/usr.bin/clang/llvm-extract/llvm-extract.1 +++ b/usr.bin/clang/llvm-extract/llvm-extract.1 @@ -1,4 +1,3 @@ -.\" $FreeBSD$ .\" Man page generated from reStructuredText. . . @@ -28,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" 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" "2023-05-24" "16" "LLVM" .SH NAME llvm-extract \- extract a function from an LLVM module .SH SYNOPSIS @@ -151,7 +150,7 @@ Print a summary of command line options. \fB\-o\fP \fIfilename\fP .INDENT 0.0 .INDENT 3.5 -Specify the output filename. If filename is "\-" (the default), then +Specify the output filename. If filename is \(dq\-\(dq (the default), then \fBllvm\-extract\fP sends its output to standard output. .UNINDENT .UNINDENT @@ -172,6 +171,6 @@ occurs, it will exit with a non\-zero value. .SH AUTHOR Maintained by the LLVM Team (https://llvm.org/). .SH COPYRIGHT -2003-2021, LLVM Project +2003-2023, LLVM Project .\" Generated by docutils manpage writer. . diff --git a/usr.bin/clang/llvm-link/llvm-link.1 b/usr.bin/clang/llvm-link/llvm-link.1 index dffceb9d29d..3fcc85ba1eb 100644 --- a/usr.bin/clang/llvm-link/llvm-link.1 +++ b/usr.bin/clang/llvm-link/llvm-link.1 @@ -1,4 +1,3 @@ -.\" $FreeBSD$ .\" Man page generated from reStructuredText. . . @@ -28,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" 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" "2023-05-24" "16" "LLVM" .SH NAME llvm-link \- LLVM bitcode linker .SH SYNOPSIS @@ -51,7 +50,7 @@ device. .INDENT 0.0 .TP .B \-o filename -Specify the output file name. If \fBfilename\fP is "\fB\-\fP", then +Specify the output file name. If \fBfilename\fP is \(dq\fB\-\fP\(dq, then \fBllvm\-link\fP will write its output to standard output. .UNINDENT .INDENT 0.0 @@ -84,6 +83,6 @@ occurs, it will exit with a non\-zero value. .SH AUTHOR Maintained by the LLVM Team (https://llvm.org/). .SH COPYRIGHT -2003-2021, LLVM Project +2003-2023, LLVM Project .\" Generated by docutils manpage writer. . diff --git a/usr.bin/clang/llvm-mca/llvm-mca.1 b/usr.bin/clang/llvm-mca/llvm-mca.1 index d837c1c558b..7c30c5e9533 100644 --- a/usr.bin/clang/llvm-mca/llvm-mca.1 +++ b/usr.bin/clang/llvm-mca/llvm-mca.1 @@ -1,4 +1,3 @@ -.\" $FreeBSD$ .\" Man page generated from reStructuredText. . . @@ -28,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" 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" "2023-05-24" "16" "LLVM" .SH NAME llvm-mca \- LLVM Machine Code Analyzer .SH SYNOPSIS @@ -41,8 +40,8 @@ available in LLVM (e.g. scheduling models) to statically measure the performance 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 @@ -93,12 +92,12 @@ please \fI\%file a bug\fP against the appropriate backend. .SH OPTIONS .sp -If \fBinput\fP is "\fB\-\fP" or omitted, \fBllvm\-mca\fP reads from standard +If \fBinput\fP is \(dq\fB\-\fP\(dq or omitted, \fBllvm\-mca\fP reads from standard input. Otherwise, it will read from the specified filename. .sp If the \fI\%\-o\fP option is omitted, then \fBllvm\-mca\fP will send its output to standard output if the input is from standard input. If the \fI\%\-o\fP -option specifies "\fB\-\fP", then the output will also be sent to standard output. +option specifies \(dq\fB\-\fP\(dq, then the output will also be sent to standard output. .INDENT 0.0 .TP .B \-help @@ -153,7 +152,7 @@ zero, then the default dispatch width is used. .B \-register\-file\-size= Specify the size of the register file. When specified, this flag limits how many physical registers are available for register renaming purposes. A value -of zero for this flag means "unlimited number of physical registers". +of zero for this flag means \(dqunlimited number of physical registers\(dq. .UNINDENT .INDENT 0.0 .TP @@ -197,8 +196,8 @@ timeline view prints information for up to 10 iterations. .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 @@ -240,6 +239,12 @@ Enable the printing of instruction encodings within the instruction info view. .UNINDENT .INDENT 0.0 .TP +.B \-show\-barriers +Enable the printing of LoadBarrier and StoreBarrier flags within the +instruction info view. +.UNINDENT +.INDENT 0.0 +.TP .B \-all\-stats Print all hardware statistics. This enables extra statistics related to the dispatch logic, the hardware schedulers, the register file(s), and the retire @@ -263,15 +268,34 @@ instruction in sequence. .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 and InstrPostProcess classes rather +than using the target specific implementation. The generic classes never +detect any custom hazards or make any post processing modifications to +instructions. +.UNINDENT +.INDENT 0.0 +.TP +.B \-disable\-im +Force usage of the generic InstrumentManager rather than using the target +specific implementation. The generic class creates Instruments that provide +no extra information, and InstrumentManager never overrides the default +schedule class for a given instruction. .UNINDENT .SH EXIT STATUS .sp @@ -281,9 +305,9 @@ to standard error, and the tool returns 1. .sp \fBllvm\-mca\fP allows for the optional usage of special code comments to mark regions of the assembly code to be analyzed. A comment starting with -substring \fBLLVM\-MCA\-BEGIN\fP marks the beginning of a code region. A comment -starting with substring \fBLLVM\-MCA\-END\fP marks the end of a code region. For -example: +substring \fBLLVM\-MCA\-BEGIN\fP marks the beginning of an analysis region. A +comment starting with substring \fBLLVM\-MCA\-END\fP marks the end of a region. +For example: .INDENT 0.0 .INDENT 3.5 .sp @@ -300,9 +324,9 @@ example: If no user\-defined region is specified, then \fBllvm\-mca\fP assumes a default region which contains every instruction in the input file. Every region is analyzed in isolation, and the final performance report is the union of all -the reports generated for every code region. +the reports generated for every analysis region. .sp -Code regions can have names. For example: +Analysis regions can have names. For example: .INDENT 0.0 .INDENT 3.5 .sp @@ -316,7 +340,7 @@ Code regions can have names. For example: .UNINDENT .UNINDENT .sp -The code from the example above defines a region named "A simple example" with a +The code from the example above defines a region named \(dqA simple example\(dq with a single instruction in it. Note how the region name doesn\(aqt have to be repeated in the \fBLLVM\-MCA\-END\fP directive. In the absence of overlapping regions, an anonymous \fBLLVM\-MCA\-END\fP directive always ends the currently active user @@ -368,9 +392,9 @@ C++. As a workaround, inline assembly directives may be used: .nf .ft C int foo(int a, int b) { - __asm volatile("# LLVM\-MCA\-BEGIN foo"); + __asm volatile(\(dq# LLVM\-MCA\-BEGIN foo\(dq:::\(dqmemory\(dq); a += 42; - __asm volatile("# LLVM\-MCA\-END"); + __asm volatile(\(dq# LLVM\-MCA\-END\(dq:::\(dqmemory\(dq); a *= b; return a; } @@ -387,6 +411,125 @@ to emit markers, then the recommendation is to always verify that the output assembly is equivalent to the assembly generated in the absence of markers. The \fI\%Clang options to emit optimization reports\fP can also help in detecting missed optimizations. +.SH INSTRUMENT REGIONS +.sp +An InstrumentRegion describes a region of assembly code guarded by +special LLVM\-MCA comment directives. +.INDENT 0.0 +.INDENT 3.5 +.sp +.nf +.ft C +# LLVM\-MCA\- + ... ## asm +.ft P +.fi +.UNINDENT +.UNINDENT +.sp +where \fIINSTRUMENT_TYPE\fP is a type defined by the target and expects +to use \fIdata\fP\&. +.sp +A comment starting with substring \fILLVM\-MCA\-\fP +brings data into scope for llvm\-mca to use in its analysis for +all following instructions. +.sp +If a comment with the same \fIINSTRUMENT_TYPE\fP is found later in the +instruction list, then the original InstrumentRegion will be +automatically ended, and a new InstrumentRegion will begin. +.sp +If there are comments containing the different \fIINSTRUMENT_TYPE\fP, +then both data sets remain available. In contrast with an AnalysisRegion, +an InstrumentRegion does not need a comment to end the region. +.sp +Comments that are prefixed with \fILLVM\-MCA\-\fP but do not correspond to +a valid \fIINSTRUMENT_TYPE\fP for the target cause an error, except for +\fIBEGIN\fP and \fIEND\fP, since those correspond to AnalysisRegions. Comments +that do not start with \fILLVM\-MCA\-\fP are ignored by :program \fIllvm\-mca\fP\&. +.sp +An instruction (a MCInst) is added to an InstrumentRegion R only +if its location is in range [R.RangeStart, R.RangeEnd]. +.sp +On RISCV targets, vector instructions have different behaviour depending +on the LMUL. Code can be instrumented with a comment that takes the +following form: +.INDENT 0.0 +.INDENT 3.5 +.sp +.nf +.ft C +# LLVM\-MCA\-RISCV\-LMUL +.ft P +.fi +.UNINDENT +.UNINDENT +.sp +The RISCV InstrumentManager will override the schedule class for vector +instructions to use the scheduling behaviour of its pseudo\-instruction +which is LMUL dependent. It makes sense to place RISCV instrument +comments directly after \fIvset{i}vl{i}\fP instructions, although +they can be placed anywhere in the program. +.sp +Example of program with no call to \fIvset{i}vl{i}\fP: +.INDENT 0.0 +.INDENT 3.5 +.sp +.nf +.ft C +# LLVM\-MCA\-RISCV\-LMUL M2 +vadd.vv v2, v2, v2 +.ft P +.fi +.UNINDENT +.UNINDENT +.sp +Example of program with call to \fIvset{i}vl{i}\fP: +.INDENT 0.0 +.INDENT 3.5 +.sp +.nf +.ft C +vsetvli zero, a0, e8, m1, tu, mu +# LLVM\-MCA\-RISCV\-LMUL M1 +vadd.vv v2, v2, v2 +.ft P +.fi +.UNINDENT +.UNINDENT +.sp +Example of program with multiple calls to \fIvset{i}vl{i}\fP: +.INDENT 0.0 +.INDENT 3.5 +.sp +.nf +.ft C +vsetvli zero, a0, e8, m1, tu, mu +# LLVM\-MCA\-RISCV\-LMUL M1 +vadd.vv v2, v2, v2 +vsetvli zero, a0, e8, m8, tu, mu +# LLVM\-MCA\-RISCV\-LMUL M8 +vadd.vv v2, v2, v2 +.ft P +.fi +.UNINDENT +.UNINDENT +.sp +Example of program with call to \fIvsetvl\fP: +.INDENT 0.0 +.INDENT 3.5 +.sp +.nf +.ft C +vsetvl rd, rs1, rs2 +# LLVM\-MCA\-RISCV\-LMUL M1 +vadd.vv v12, v12, v12 +vsetvl rd, rs1, rs2 +# LLVM\-MCA\-RISCV\-LMUL M4 +vadd.vv v12, v12, v12 +.ft P +.fi +.UNINDENT +.UNINDENT .SH HOW LLVM-MCA WORKS .sp \fBllvm\-mca\fP takes assembly code as input. The assembly code is parsed @@ -486,7 +629,9 @@ overview of the performance throughput. Important performance indicators are 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 +927,9 @@ Instructions from the critical sequence are expected to significantly impact 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 +1087,14 @@ Write Back (Instruction is executed, and results are written back). 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 @@ -977,7 +1128,7 @@ dispatch stalls caused by the lack of physical registers. The number of reorder buffer entries consumed by an instruction depends on the number of micro\-opcodes specified for that instruction by the target scheduling model. The reorder buffer is responsible for tracking the progress of -instructions that are "in\-flight", and retiring them in program order. The +instructions that are \(dqin\-flight\(dq, and retiring them in program order. The number of entries in the reorder buffer defaults to the value specified by field \fIMicroOpBufferSize\fP in the target scheduling model. .sp @@ -1029,7 +1180,7 @@ instructions wait until they reach the write\-back stage. At that point, they get removed from the queue and the retire control unit is notified. .sp When instructions are executed, the retire control unit flags the instruction as -"ready to retire." +\(dqready to retire.\(dq .sp Instructions are retired in program order. The register file is notified of the retirement so that it can free the physical registers that were allocated for @@ -1084,25 +1235,26 @@ fences. .UNINDENT .sp The LSUnit does not attempt to predict if a load or store hits or misses the L1 -cache. It only knows if an instruction "MayLoad" and/or "MayStore." For -loads, the scheduling model provides an "optimistic" load\-to\-use latency (which +cache. It only knows if an instruction \(dqMayLoad\(dq and/or \(dqMayStore.\(dq For +loads, the scheduling model provides an \(dqoptimistic\(dq load\-to\-use latency (which usually matches the load\-to\-use latency for when there is a hit in the L1D). .sp -\fBllvm\-mca\fP does not know about serializing operations or memory\-barrier -like instructions. The LSUnit conservatively assumes that an instruction which -has both "MayLoad" and unmodeled side effects behaves like a "soft" -load\-barrier. That means, it serializes loads without forcing a flush of the -load queue. Similarly, instructions that "MayStore" and have unmodeled side -effects are treated like store barriers. A full memory barrier is a "MayLoad" -and "MayStore" instruction with unmodeled side effects. This is inaccurate, but -it is the best that we can do at the moment with the current information -available in LLVM. +\fBllvm\-mca\fP does not (on its own) know about serializing operations or +memory\-barrier like instructions. The LSUnit used to conservatively use an +instruction\(aqs \(dqMayLoad\(dq, \(dqMayStore\(dq, and unmodeled side effects flags to +determine whether an instruction should be treated as a memory\-barrier. This was +inaccurate in general and was changed so that now each instruction has an +IsAStoreBarrier and IsALoadBarrier flag. These flags are mca specific and +default to false for every instruction. If any instruction should have either of +these flags set, it should be done within the target\(aqs InstrPostProcess class. +For an example, look at the \fIX86InstrPostProcess::postProcessInstruction\fP method +within \fIllvm/lib/Target/X86/MCA/X86CustomBehaviour.cpp\fP\&. .sp A load/store barrier consumes one entry of the load/store queue. A load/store barrier enforces ordering of loads/stores. A younger load cannot pass a load barrier. Also, a younger store cannot pass a store barrier. A younger load has to wait for the memory/load barrier to execute. A load/store barrier is -"executed" when it becomes the oldest entry in the load/store queue(s). That +\(dqexecuted\(dq when it becomes the oldest entry in the load/store queue(s). That also means, by construction, all of the older loads/stores have been executed. .sp In conclusion, the full set of load/store consistency rules are: @@ -1120,9 +1272,97 @@ A load may not pass a previous store unless \fB\-noalias\fP is set. .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\-mca\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. The classes are implemented within the target specific backend (for +example \fI/llvm/lib/Target/AMDGPU/MCA/\fP) so that they can access backend symbols. +.SS Instrument Manager +.sp +On certain architectures, scheduling information for certain instructions +do not contain all of the information required to identify the most precise +schedule class. For example, data that can have an impact on scheduling can +be stored in CSR registers. +.sp +One example of this is on RISCV, where values in registers such as \fIvtype\fP +and \fIvl\fP change the scheduling behaviour of vector instructions. Since MCA +does not keep track of the values in registers, instrument comments can +be used to specify these values. +.sp +InstrumentManager\(aqs main function is \fIgetSchedClassID()\fP which has access +to the MCInst and all of the instruments that are active for that MCInst. +This function can use the instruments to override the schedule class of +the MCInst. +.sp +On RISCV, instrument comments containing LMUL information are used +by \fIgetSchedClassID()\fP to map a vector instruction and the active +LMUL to the scheduling class of the pseudo\-instruction that describes +that base instruction and the active LMUL. +.SS Custom Views +.sp +\fBllvm\-mca\fP comes with several Views such as the Timeline View and +Summary View. These Views are generic and can work with most (if not all) +targets. If you wish to add a new View to \fBllvm\-mca\fP and it does not +require any backend functionality that is not already exposed through MC layer +classes (MCSubtargetInfo, MCInstrInfo, etc.), please add it to the +\fI/tools/llvm\-mca/View/\fP directory. However, if your new View is target specific +AND requires unexposed backend symbols or functionality, you can define it in +the \fI/lib/Target//MCA/\fP directory. +.sp +To enable this target specific View, you will have to use this target\(aqs +CustomBehaviour class to override the \fICustomBehaviour::getViews()\fP methods. +There are 3 variations of these methods based on where you want your View to +appear in the output: \fIgetStartViews()\fP, \fIgetPostInstrInfoViews()\fP, and +\fIgetEndViews()\fP\&. These methods returns a vector of Views so you will want to +return a vector containing all of the target specific Views for the target in +question. +.sp +Because these target specific (and backend dependent) Views require the +\fICustomBehaviour::getViews()\fP variants, these Views will not be enabled if +the \fI\-disable\-cb\fP flag is used. +.sp +Enabling these custom Views does not affect the non\-custom (generic) Views. +Continue to use the usual command line arguments to enable / disable those +Views. .SH AUTHOR Maintained by the LLVM Team (https://llvm.org/). .SH COPYRIGHT -2003-2021, LLVM Project +2003-2023, LLVM Project .\" Generated by docutils manpage writer. . diff --git a/usr.bin/clang/llvm-nm/llvm-nm.1 b/usr.bin/clang/llvm-nm/llvm-nm.1 index 2ae1470e2dc..b6dd910cc6c 100644 --- a/usr.bin/clang/llvm-nm/llvm-nm.1 +++ b/usr.bin/clang/llvm-nm/llvm-nm.1 @@ -1,4 +1,3 @@ -.\" $FreeBSD$ .\" Man page generated from reStructuredText. . . @@ -28,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" 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" "2023-05-24" "16" "LLVM" .SH NAME llvm-nm \- list LLVM bitcode and object file's symbol table .SH SYNOPSIS @@ -192,7 +191,7 @@ Something unrecognizable. .sp Because LLVM bitcode files typically contain objects that are not considered to have addresses until they are linked into an executable image or dynamically -compiled "just\-in\-time", \fBllvm\-nm\fP does not print an address for any +compiled \(dqjust\-in\-time\(dq, \fBllvm\-nm\fP does not print an address for any symbol in an LLVM bitcode file, even symbols which are defined in the bitcode file. .SH OPTIONS @@ -203,6 +202,44 @@ Use BSD output format. Alias for \fB\-\-format=bsd\fP\&. .UNINDENT .INDENT 0.0 .TP +.B \-X +Specify the type of XCOFF object file, ELF object file, or IR object file input +from command line or from archive files that llvm\-nm should examine. The +mode must be one of the following: +.INDENT 7.0 +.INDENT 3.5 +.INDENT 0.0 +.INDENT 3.5 +.INDENT 0.0 +.TP +.B 32 +Process only 32\-bit object files. +.TP +.B 64 +Process only 64\-bit object files. +.TP +.B 32_64 +Process both 32\-bit and 64\-bit object files. +.TP +.B any +Process all the supported object files. +.UNINDENT +.UNINDENT +.UNINDENT +.sp +On AIX OS, the default is to process 32\-bit object files only and to ignore +64\-bit objects. The can be changed by setting the OBJECT_MODE environment +variable. For example, OBJECT_MODE=64 causes \fBllvm\-nm\fP to process +64\-bit objects and ignore 32\-bit objects. The \-X flag overrides the OBJECT_MODE +variable. +.sp +On other operating systems, the default is to process all object files: the +OBJECT_MODE environment variable is not supported. +.UNINDENT +.UNINDENT +.UNINDENT +.INDENT 0.0 +.TP .B \-\-debug\-syms, \-a Show all symbols, even those usually suppressed. .UNINDENT @@ -223,6 +260,12 @@ Display dynamic symbols instead of normal symbols. .UNINDENT .INDENT 0.0 .TP +.B \-\-export\-symbols +Print sorted symbols with their visibility (if applicable), with duplicates +removed. +.UNINDENT +.INDENT 0.0 +.TP .B \-\-extern\-only, \-g Print only symbols whose definitions are external; that is, accessible from other files. @@ -230,7 +273,8 @@ other files. .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 +284,8 @@ Print a summary of command\-line options and their meanings. .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 @@ -285,7 +324,7 @@ Use POSIX.2 output format. Alias for \fB\-\-format=posix\fP\&. .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 +339,11 @@ Show symbol size as well as address (not applicable for Mach\-O). .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 +370,9 @@ Print only undefined symbols. .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 +408,7 @@ Do not add any symbols from the dyldinfo. .UNINDENT .INDENT 0.0 .TP -.B \-s= +.B \-s
Dump only symbols from this segment and section name. .UNINDENT .INDENT 0.0 @@ -377,6 +416,12 @@ Dump only symbols from this segment and section name. .B \-x Print symbol entry in hex. .UNINDENT +.SH XCOFF SPECIFIC OPTIONS +.INDENT 0.0 +.TP +.B \-\-no\-rsrc +Exclude resource file symbols (\fB__rsrc\fP) from export symbol list. +.UNINDENT .SH BUGS .INDENT 0.0 .INDENT 3.5 @@ -397,6 +442,6 @@ Print symbol entry in hex. .SH AUTHOR Maintained by the LLVM Team (https://llvm.org/). .SH COPYRIGHT -2003-2021, LLVM Project +2003-2023, LLVM Project .\" Generated by docutils manpage writer. . diff --git a/usr.bin/clang/llvm-objcopy/llvm-objcopy.1 b/usr.bin/clang/llvm-objcopy/llvm-objcopy.1 index 3a014940202..34f8f9c7774 100644 --- a/usr.bin/clang/llvm-objcopy/llvm-objcopy.1 +++ b/usr.bin/clang/llvm-objcopy/llvm-objcopy.1 @@ -1,4 +1,3 @@ -.\" $FreeBSD$ .\" Man page generated from reStructuredText. . . @@ -28,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" 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" "2023-05-24" "16" "LLVM" .SH NAME llvm-objcopy \- object copying and editing tool .SH SYNOPSIS @@ -40,9 +39,9 @@ llvm-objcopy \- object copying and editing tool usage, it makes a semantic copy of the input to the output. If any options are specified, the output may be modified along the way, e.g. by removing sections. .sp -If no output file is specified, the input file is modified in\-place. If "\-" is +If no output file is specified, the input file is modified in\-place. If \(dq\-\(dq is specified for the input file, the input is read from the program\(aqs standard -input stream. If "\-" is specified for the output file, the output is written to +input stream. If \(dq\-\(dq is specified for the output file, the output is written to the standard output stream of the program. .sp If the input is an archive, any requested operations will be applied to each @@ -64,7 +63,7 @@ Add a .gnu_debuglink section for \fB\fP to the output. .B \-\-add\-section Add a section named \fB
\fP with the contents of \fB\fP to the output. For ELF objects the section will be of type \fISHT_NOTE\fP, if the name -starts with ".note". Otherwise, it will have type \fISHT_PROGBITS\fP\&. Can be +starts with \(dq.note\(dq. Otherwise, it will have type \fISHT_PROGBITS\fP\&. Can be specified multiple times to add multiple sections. .sp For MachO objects, \fB
\fP must be formatted as @@ -86,7 +85,7 @@ headers. .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 @@ -164,7 +163,7 @@ For MachO objects, \fB
\fP must be formatted as .INDENT 0.0 .TP .B \-\-set\-section\-alignment
= -Set the alignment of section \fB
\fP to \fI\(ga\fP\&. Can be specified +Set the alignment of section \fB
\fP to \fB\fP\&. Can be specified multiple times to update multiple sections. .UNINDENT .INDENT 0.0 @@ -283,6 +282,13 @@ relocations. Also remove all debug sections. .UNINDENT .INDENT 0.0 .TP +.B \-\-update\-section = +Replace the contents of the section \fB\fP with contents from the file +\fB\fP\&. If the section \fB\fP is part of a segment, the new contents +cannot be larger than the existing section. +.UNINDENT +.INDENT 0.0 +.TP .B \-\-version, \-V Display the version of the \fBllvm\-objcopy\fP executable. .UNINDENT @@ -409,36 +415,15 @@ section references. Any invalid sh_link fields will be set to zero. .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. .UNINDENT .INDENT 0.0 .TP -.B \-\-compress\-debug\-sections [