clang  3.8.0
Public Types | Public Member Functions | Public Attributes | List of all members
clang::CodeGenOptions Class Reference

CodeGenOptions - Track various options which control how the code is optimized and passed to the backend. More...

#include <CodeGenOptions.h>

Inheritance diagram for clang::CodeGenOptions:
[legend]
Collaboration diagram for clang::CodeGenOptions:
[legend]

Public Types

enum  InliningMethod { NoInlining, NormalInlining, OnlyAlwaysInlining }
 
enum  VectorLibrary { NoLibrary, Accelerate }
 
enum  ObjCDispatchMethodKind { Legacy = 0, NonLegacy = 1, Mixed = 2 }
 
enum  DebugInfoKind {
  NoDebugInfo, LocTrackingOnly, DebugLineTablesOnly, LimitedDebugInfo,
  FullDebugInfo
}
 
enum  DebuggerKind { DebuggerKindDefault, DebuggerKindGDB, DebuggerKindLLDB, DebuggerKindSCE }
 
enum  TLSModel { GeneralDynamicTLSModel, LocalDynamicTLSModel, InitialExecTLSModel, LocalExecTLSModel }
 
enum  FPContractModeKind { FPC_Off, FPC_On, FPC_Fast }
 
enum  StructReturnConventionKind { SRCK_Default, SRCK_OnStack, SRCK_InRegs }
 

Public Member Functions

 CodeGenOptions ()
 
bool isNoBuiltinFunc (const char *Name) const
 Is this a libc/libm function that is no longer recognized as a builtin because a -fno-builtin-* option has been specified? More...
 
const std::vector< std::string > & getNoBuiltinFuncs () const
 

Public Attributes

std::string CodeModel
 The code model to use (-mcmodel). More...
 
std::string CoverageFile
 The filename with path we use for coverage files. More...
 
char CoverageVersion [4]
 The version string to put into coverage files. More...
 
std::string DebugPass
 Enable additional debugging information. More...
 
std::string DebugCompilationDir
 The string to embed in debug information as the current working directory. More...
 
std::string DwarfDebugFlags
 The string to embed in the debug information for the compile unit, if non-empty. More...
 
std::map< std::string,
std::string > 
DebugPrefixMap
 
std::string FloatABI
 The ABI to use for passing floating point arguments. More...
 
std::string LimitFloatPrecision
 The float precision limit to use, if non-empty. More...
 
std::vector< std::pair
< unsigned, std::string > > 
LinkBitcodeFiles
 The name of the bitcode file to link before optzns. More...
 
std::string MainFileName
 The user provided name for the "main file", if non-empty. More...
 
std::string SplitDwarfFile
 The name for the split debug info file that we'll break out. More...
 
std::string RelocationModel
 The name of the relocation model to use. More...
 
std::string ThreadModel
 The thread model to use. More...
 
std::string TrapFuncName
 If not an empty string, trap intrinsics are lowered to calls to this function instead of to trap instructions. More...
 
std::vector< std::string > BackendOptions
 A list of command-line options to forward to the LLVM backend. More...
 
std::vector< std::string > DependentLibraries
 A list of dependent libraries. More...
 
std::string InstrProfileOutput
 Name of the profile file to use as output for -fprofile-instr-generate and -fprofile-generate. More...
 
std::string SampleProfileFile
 Name of the profile file to use with -fprofile-sample-use. More...
 
std::string InstrProfileInput
 Name of the profile file to use as input for -fprofile-instr-use. More...
 
std::string ThinLTOIndexFile
 Name of the function summary index file to use for ThinLTO function importing. More...
 
std::string EABIVersion
 The EABI version to use. More...
 
std::vector< std::string > CudaGpuBinaryFileNames
 A list of file names passed with -fcuda-include-gpubinary options to forward to CUDA runtime back-end for incorporating them into host-side object file. More...
 
std::shared_ptr< llvm::Regex > OptimizationRemarkPattern
 Regular expression to select optimizations for which we should enable optimization remarks. More...
 
std::shared_ptr< llvm::Regex > OptimizationRemarkMissedPattern
 Regular expression to select optimizations for which we should enable missed optimization remarks. More...
 
std::shared_ptr< llvm::Regex > OptimizationRemarkAnalysisPattern
 Regular expression to select optimizations for which we should enable optimization analyses. More...
 
std::vector< std::string > RewriteMapFiles
 Set of files definining the rules for the symbol rewriting. More...
 
SanitizerSet SanitizeRecover
 Set of sanitizer checks that are non-fatal (i.e. More...
 
SanitizerSet SanitizeTrap
 Set of sanitizer checks that trap rather than diagnose. More...
 
std::vector< std::string > NoBuiltinFuncs
 A list of all -fno-builtin-* function names (e.g., memset). More...
 

Detailed Description

CodeGenOptions - Track various options which control how the code is optimized and passed to the backend.

Definition at line 42 of file CodeGenOptions.h.

Member Enumeration Documentation

Enumerator
DebuggerKindDefault 
DebuggerKindGDB 
DebuggerKindLLDB 
DebuggerKindSCE 

Definition at line 85 of file CodeGenOptions.h.

Enumerator
NoDebugInfo 
LocTrackingOnly 

Don't generate debug info.

DebugLineTablesOnly 

Emit location information but do not generate debug info in the output.

This is useful in cases where the backend wants to track source locations for instructions without actually emitting debug info for them (e.g., when -Rpass is used).

LimitedDebugInfo 

Emit only debug info necessary for generating line number tables (-gline-tables-only).

FullDebugInfo 

Limit generated debug info to reduce size (-fno-standalone-debug).

This emits forward decls for types that could be replaced with forward decls in the source code. For dynamic C++ classes type info is only emitted int the module that contains the classe's vtable. Generate complete debug info.

Definition at line 61 of file CodeGenOptions.h.

Enumerator
FPC_Off 
FPC_On 
FPC_Fast 

Definition at line 99 of file CodeGenOptions.h.

Enumerator
NoInlining 
NormalInlining 
OnlyAlwaysInlining 

Definition at line 44 of file CodeGenOptions.h.

Enumerator
Legacy 
NonLegacy 
Mixed 

Definition at line 55 of file CodeGenOptions.h.

Enumerator
SRCK_Default 
SRCK_OnStack 
SRCK_InRegs 

Definition at line 105 of file CodeGenOptions.h.

Enumerator
GeneralDynamicTLSModel 
LocalDynamicTLSModel 
InitialExecTLSModel 
LocalExecTLSModel 

Definition at line 92 of file CodeGenOptions.h.

Enumerator
NoLibrary 
Accelerate 

Definition at line 50 of file CodeGenOptions.h.

Constructor & Destructor Documentation

clang::CodeGenOptions::CodeGenOptions ( )

Definition at line 15 of file CodeGenOptions.cpp.

References CoverageVersion, and RelocationModel.

Member Function Documentation

const std::vector<std::string>& clang::CodeGenOptions::getNoBuiltinFuncs ( ) const
inline

Definition at line 238 of file CodeGenOptions.h.

References NoBuiltinFuncs.

Referenced by createTLII().

bool clang::CodeGenOptions::isNoBuiltinFunc ( const char *  Name) const

Is this a libc/libm function that is no longer recognized as a builtin because a -fno-builtin-* option has been specified?

Definition at line 24 of file CodeGenOptions.cpp.

References NoBuiltinFuncs.

Member Data Documentation

std::vector<std::string> clang::CodeGenOptions::BackendOptions

A list of command-line options to forward to the LLVM backend.

Definition at line 162 of file CodeGenOptions.h.

Referenced by ParseCodeGenArgs().

std::string clang::CodeGenOptions::CodeModel

The code model to use (-mcmodel).

Definition at line 112 of file CodeGenOptions.h.

Referenced by ParseCodeGenArgs().

std::string clang::CodeGenOptions::CoverageFile

The filename with path we use for coverage files.

The extension will be replaced.

Definition at line 116 of file CodeGenOptions.h.

Referenced by ParseCodeGenArgs().

char clang::CodeGenOptions::CoverageVersion[4]

The version string to put into coverage files.

Definition at line 119 of file CodeGenOptions.h.

Referenced by CodeGenOptions(), and ParseCodeGenArgs().

std::vector<std::string> clang::CodeGenOptions::CudaGpuBinaryFileNames

A list of file names passed with -fcuda-include-gpubinary options to forward to CUDA runtime back-end for incorporating them into host-side object file.

Definition at line 187 of file CodeGenOptions.h.

Referenced by ParseCodeGenArgs().

std::string clang::CodeGenOptions::DebugCompilationDir

The string to embed in debug information as the current working directory.

Definition at line 125 of file CodeGenOptions.h.

Referenced by ParseCodeGenArgs().

std::string clang::CodeGenOptions::DebugPass

Enable additional debugging information.

Definition at line 122 of file CodeGenOptions.h.

Referenced by ParseCodeGenArgs().

std::map<std::string, std::string> clang::CodeGenOptions::DebugPrefixMap

Definition at line 131 of file CodeGenOptions.h.

Referenced by clang::CodeGen::CGDebugInfo::CGDebugInfo(), and ParseCodeGenArgs().

std::vector<std::string> clang::CodeGenOptions::DependentLibraries

A list of dependent libraries.

Definition at line 165 of file CodeGenOptions.h.

Referenced by ParseCodeGenArgs().

std::string clang::CodeGenOptions::DwarfDebugFlags

The string to embed in the debug information for the compile unit, if non-empty.

Definition at line 129 of file CodeGenOptions.h.

Referenced by ParseCodeGenArgs(), and SetUpDiagnosticLog().

std::string clang::CodeGenOptions::EABIVersion

The EABI version to use.

Definition at line 182 of file CodeGenOptions.h.

Referenced by ParseCodeGenArgs().

std::string clang::CodeGenOptions::FloatABI

The ABI to use for passing floating point arguments.

Definition at line 134 of file CodeGenOptions.h.

Referenced by clang::CodeGen::CodeGenModule::getTargetCodeGenInfo(), and ParseCodeGenArgs().

std::string clang::CodeGenOptions::InstrProfileInput

Name of the profile file to use as input for -fprofile-instr-use.

Definition at line 175 of file CodeGenOptions.h.

Referenced by clang::CodeGen::CodeGenModule::CodeGenModule(), and ParseCodeGenArgs().

std::string clang::CodeGenOptions::InstrProfileOutput

Name of the profile file to use as output for -fprofile-instr-generate and -fprofile-generate.

Definition at line 169 of file CodeGenOptions.h.

Referenced by ParseCodeGenArgs().

std::string clang::CodeGenOptions::LimitFloatPrecision

The float precision limit to use, if non-empty.

Definition at line 137 of file CodeGenOptions.h.

Referenced by ParseCodeGenArgs().

std::vector<std::pair<unsigned, std::string> > clang::CodeGenOptions::LinkBitcodeFiles

The name of the bitcode file to link before optzns.

Definition at line 140 of file CodeGenOptions.h.

Referenced by clang::CodeGenAction::CreateASTConsumer(), and ParseCodeGenArgs().

std::string clang::CodeGenOptions::MainFileName

The user provided name for the "main file", if non-empty.

This is useful in situations where the input file name does not match the original input file, for example with -save-temps.

Definition at line 145 of file CodeGenOptions.h.

Referenced by ParseCodeGenArgs().

std::vector<std::string> clang::CodeGenOptions::NoBuiltinFuncs

A list of all -fno-builtin-* function names (e.g., memset).

Definition at line 222 of file CodeGenOptions.h.

Referenced by getNoBuiltinFuncs(), isNoBuiltinFunc(), and ParseCodeGenArgs().

std::shared_ptr<llvm::Regex> clang::CodeGenOptions::OptimizationRemarkAnalysisPattern

Regular expression to select optimizations for which we should enable optimization analyses.

Transformation passes whose name matches this expression (and support this feature), will emit a diagnostic whenever they want to explain why they decided to apply or not apply a given transformation. This is enabled by the -Rpass-analysis=regexp flag.

Definition at line 209 of file CodeGenOptions.h.

Referenced by ParseCodeGenArgs().

std::shared_ptr<llvm::Regex> clang::CodeGenOptions::OptimizationRemarkMissedPattern

Regular expression to select optimizations for which we should enable missed optimization remarks.

Transformation passes whose name matches this expression (and support this feature), will emit a diagnostic whenever they tried but failed to perform a transformation. This is enabled by the -Rpass-missed=regexp flag.

Definition at line 201 of file CodeGenOptions.h.

Referenced by ParseCodeGenArgs().

std::shared_ptr<llvm::Regex> clang::CodeGenOptions::OptimizationRemarkPattern

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 whenever they perform a transformation. This is enabled by the -Rpass=regexp flag.

Definition at line 194 of file CodeGenOptions.h.

Referenced by ParseCodeGenArgs().

std::string clang::CodeGenOptions::RelocationModel

The name of the relocation model to use.

Definition at line 152 of file CodeGenOptions.h.

Referenced by CodeGenOptions(), and ParseCodeGenArgs().

std::vector<std::string> clang::CodeGenOptions::RewriteMapFiles

Set of files definining the rules for the symbol rewriting.

Definition at line 212 of file CodeGenOptions.h.

Referenced by addSymbolRewriterPass(), and ParseCodeGenArgs().

std::string clang::CodeGenOptions::SampleProfileFile

Name of the profile file to use with -fprofile-sample-use.

Definition at line 172 of file CodeGenOptions.h.

Referenced by ParseCodeGenArgs().

SanitizerSet clang::CodeGenOptions::SanitizeRecover

Set of sanitizer checks that are non-fatal (i.e.

execution should be continued when possible).

Definition at line 216 of file CodeGenOptions.h.

Referenced by addAddressSanitizerPasses(), and ParseCodeGenArgs().

SanitizerSet clang::CodeGenOptions::SanitizeTrap

Set of sanitizer checks that trap rather than diagnose.

Definition at line 219 of file CodeGenOptions.h.

Referenced by ParseCodeGenArgs().

std::string clang::CodeGenOptions::SplitDwarfFile

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.

Definition at line 149 of file CodeGenOptions.h.

Referenced by ParseCodeGenArgs().

std::string clang::CodeGenOptions::ThinLTOIndexFile

Name of the function summary index file to use for ThinLTO function importing.

Definition at line 179 of file CodeGenOptions.h.

Referenced by ParseCodeGenArgs().

std::string clang::CodeGenOptions::ThreadModel

The thread model to use.

Definition at line 155 of file CodeGenOptions.h.

Referenced by ParseCodeGenArgs().

std::string clang::CodeGenOptions::TrapFuncName

If not an empty string, trap intrinsics are lowered to calls to this function instead of to trap instructions.

Definition at line 159 of file CodeGenOptions.h.

Referenced by ParseCodeGenArgs().


The documentation for this class was generated from the following files: