diff options
Diffstat (limited to 'include/clang/Basic/CodeGenOptions.h')
-rw-r--r-- | include/clang/Basic/CodeGenOptions.h | 46 |
1 files changed, 35 insertions, 11 deletions
diff --git a/include/clang/Basic/CodeGenOptions.h b/include/clang/Basic/CodeGenOptions.h index ec6eda7fb7881..4e9025d2fea9d 100644 --- a/include/clang/Basic/CodeGenOptions.h +++ b/include/clang/Basic/CodeGenOptions.h @@ -1,9 +1,8 @@ //===--- CodeGenOptions.h ---------------------------------------*- C++ -*-===// // -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // @@ -54,6 +53,7 @@ public: enum VectorLibrary { NoLibrary, // Don't use any vector library. Accelerate, // Use the Accelerate framework. + MASSV, // IBM MASS vector library. SVML // Intel short vector math library. }; @@ -71,8 +71,6 @@ public: LocalExecTLSModel }; - enum DwarfFissionKind { NoFission, SplitFileFission, SingleFileFission }; - /// Clang versions with different platform ABI conformance. enum class ClangABI { /// Attempt to be ABI-compatible with code generated by Clang 3.8.x @@ -101,6 +99,7 @@ public: ProfileClangInstr, // Clang instrumentation to generate execution counts // to use with PGO. ProfileIRInstr, // IR level PGO instrumentation in LLVM. + ProfileCSIRInstr, // IR level PGO context sensitive instrumentation in LLVM. }; enum EmbedBitcodeKind { @@ -184,10 +183,13 @@ public: /// file, for example with -save-temps. std::string MainFileName; - /// The name for the split debug info file that we'll break out. This is used - /// in the backend for setting the name in the skeleton cu. + /// The name for the split debug info file used for the DW_AT_[GNU_]dwo_name + /// attribute in the skeleton CU. std::string SplitDwarfFile; + /// Output filename for the split debug info, not used in the skeleton CU. + std::string SplitDwarfOutput; + /// The name of the relocation model to use. llvm::Reloc::Model RelocationModel; @@ -204,8 +206,8 @@ public: /// A list of linker options to embed in the object file. std::vector<std::string> LinkerOptions; - /// Name of the profile file to use as output for -fprofile-instr-generate - /// and -fprofile-generate. + /// Name of the profile file to use as output for -fprofile-instr-generate, + /// -fprofile-generate, and -fcs-profile-generate. std::string InstrProfileOutput; /// Name of the profile file to use with -fprofile-sample-use. @@ -238,6 +240,17 @@ public: /// records. std::string OptRecordFile; + /// The regex that filters the passes that should be saved to the optimization + /// records. + std::string OptRecordPasses; + + /// The format used for serializing remarks (default: YAML) + std::string OptRecordFormat; + + /// The name of the partition that symbols are assigned to, specified with + /// -fsymbol-partition (see https://lld.llvm.org/Partitions.html). + std::string SymbolPartition; + /// Regular expression to select optimizations for which we should enable /// optimization remarks. Transformation passes whose name matches this /// expression (and support this feature), will emit a diagnostic @@ -288,6 +301,9 @@ public: std::vector<std::string> DefaultFunctionAttrs; + /// List of dynamic shared object files to be loaded as pass plugins. + std::vector<std::string> PassPlugins; + public: // Define accessors/mutators for code generation options of enumeration type. #define CODEGENOPT(Name, Bits, Default) @@ -316,6 +332,11 @@ public: return getProfileInstr() == ProfileIRInstr; } + /// Check if CS IR level profile instrumentation is on. + bool hasProfileCSIRInstr() const { + return getProfileInstr() == ProfileCSIRInstr; + } + /// Check if Clang profile use is on. bool hasProfileClangUse() const { return getProfileUse() == ProfileClangInstr; @@ -323,9 +344,12 @@ public: /// Check if IR level profile use is on. bool hasProfileIRUse() const { - return getProfileUse() == ProfileIRInstr; + return getProfileUse() == ProfileIRInstr || + getProfileUse() == ProfileCSIRInstr; } + /// Check if CSIR profile use is on. + bool hasProfileCSIRUse() const { return getProfileUse() == ProfileCSIRInstr; } }; } // end namespace clang |