class CodeGenOptions

Declaration

class CodeGenOptions : public CodeGenOptionsBase { /* full declaration omitted */ };

Description

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

Declared at: clang/include/clang/Basic/CodeGenOptions.h:49

Inherits from: CodeGenOptionsBase

Member Variables

public std::string BBSections
public std::string BinutilsVersion
public std::string CodeModel
The code model to use (-mcmodel).
public std::string CoverageDataFile
The filename with path we use for coverage data files. The runtime allows further manipulation with the GCOV_PREFIX and GCOV_PREFIX_STRIP environment variables.
public std::string CoverageNotesFile
The filename with path we use for coverage notes files.
public std::string ProfileFilterFiles
Regexes separated by a semi-colon to filter the files to instrument.
public std::string ProfileExcludeFiles
Regexes separated by a semi-colon to filter the files to not instrument.
public char[4] CoverageVersion
The version string to put into coverage files.
public std::string DebugPass
Enable additional debugging information.
public std::string DebugCompilationDir
The string to embed in debug information as the current working directory.
public std::string CoverageCompilationDir
The string to embed in coverage mapping as the current working directory.
public std::string DwarfDebugFlags
The string to embed in the debug information for the compile unit, if non-empty.
public std::string RecordCommandLine
The string containing the commandline for the llvm.commandline metadata, if non-empty.
public std::map<std::string, std::string> DebugPrefixMap
public std::map<std::string, std::string> CoveragePrefixMap
public std::string FloatABI
The ABI to use for passing floating point arguments.
public std::string DIBugsReportFilePath
The file to use for dumping bug report by `Debugify` for original debug info.
public llvm::DenormalMode FPDenormalMode = llvm::DenormalMode::getIEEE()
The floating-point denormal mode to use.
public llvm::DenormalMode FP32DenormalMode = llvm::DenormalMode::getIEEE()
The floating-point denormal mode to use, for float.
public std::string LimitFloatPrecision
The float precision limit to use, if non-empty.
public std::vector<BitcodeFileToLink> LinkBitcodeFiles
The files specified here are linked in to the module before optimizations.
public std::string 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.
public std::string SplitDwarfFile
The name for the split debug info file used for the DW_AT_[GNU_]dwo_name attribute in the skeleton CU.
public std::string SplitDwarfOutput
Output filename for the split debug info, not used in the skeleton CU.
public std::string ObjectFilenameForDebug
Output filename used in the COFF debug information.
public llvm::Reloc::Model RelocationModel
The name of the relocation model to use.
public std::string TrapFuncName
If not an empty string, trap intrinsics are lowered to calls to this function instead of to trap instructions.
public std::vector<std::string> DependentLibraries
A list of dependent libraries.
public std::vector<std::string> LinkerOptions
A list of linker options to embed in the object file.
public std::string InstrProfileOutput
Name of the profile file to use as output for -fprofile-instr-generate, -fprofile-generate, and -fcs-profile-generate.
public std::string SampleProfileFile
Name of the profile file to use with -fprofile-sample-use.
public std::string MemoryProfileOutput
Name of the profile file to use as output for with -fmemory-profile.
public std::string ProfileInstrumentUsePath
Name of the profile file to use as input for -fprofile-instr-use
public std::string ProfileRemappingFile
Name of the profile remapping file to apply to the profile data supplied by -fprofile-sample-use or -fprofile-instr-use.
public std::string ThinLTOIndexFile
Name of the function summary index file to use for ThinLTO function importing.
public std::string ThinLinkBitcodeFile
Name of a file that can optionally be written with minimized bitcode to be used as input for the ThinLTO thin link step, which only needs the summary and module symbol table (and not, e.g. any debug metadata).
public std::string SaveTempsFilePrefix
Prefix to use for -save-temps output.
public std::string CudaGpuBinaryFileName
Name of file passed with -fcuda-include-gpubinary option to forward to CUDA runtime back-end for incorporating them into host-side object file.
public std::vector<std::string> OffloadObjects
List of filenames passed in using the -fembed-offload-object option. These are offloading binaries containing device images and metadata.
public std::string OptRecordFile
The name of the file to which the backend should save YAML optimization records.
public std::string OptRecordPasses
The regex that filters the passes that should be saved to the optimization records.
public std::string OptRecordFormat
The format used for serializing remarks (default: YAML)
public std::string SymbolPartition
The name of the partition that symbols are assigned to, specified with -fsymbol-partition (see https://lld.llvm.org/Partitions.html).
public clang::CodeGenOptions::OptRemark OptimizationRemark
Selected optimizations for which we should enable optimization remarks. Transformation passes whose name matches the contained (optional) regular expression (and support this feature), will emit a diagnostic whenever they perform a transformation.
public clang::CodeGenOptions::OptRemark OptimizationRemarkMissed
Selected optimizations for which we should enable missed optimization remarks. Transformation passes whose name matches the contained (optional) regular expression (and support this feature), will emit a diagnostic whenever they tried but failed to perform a transformation.
public clang::CodeGenOptions::OptRemark OptimizationRemarkAnalysis
Selected optimizations for which we should enable optimization analyses. Transformation passes whose name matches the contained (optional) regular 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.
public std::vector<std::string> RewriteMapFiles
Set of files defining the rules for the symbol rewriting.
public clang::SanitizerSet SanitizeRecover
Set of sanitizer checks that are non-fatal (i.e. execution should be continued when possible).
public clang::SanitizerSet SanitizeTrap
Set of sanitizer checks that trap rather than diagnose.
public std::vector<uint8_t> CmdArgs
List of backend command-line options for -fembed-bitcode.
public std::vector<std::string> NoBuiltinFuncs
A list of all -fno-builtin-* function names (e.g., memset).
public std::vector<std::string> Reciprocals
public std::string PreferVectorWidth
The preferred width for auto-vectorization transforms. This is intended to override default transforms based on the width of the architected vector registers.
public clang::XRayInstrSet XRayInstrumentationBundle
Set of XRay instrumentation kinds to emit.
public std::vector<std::string> DefaultFunctionAttrs
public std::vector<std::string> PassPlugins
List of dynamic shared object files to be loaded as pass plugins.
public std::vector<std::string> SanitizeCoverageAllowlistFiles
Path to allowlist file specifying which objects (files, functions) should exclusively be instrumented by sanitizer coverage pass.
public std::string StackProtectorGuard
The guard style used for stack protector to get a initial value, this value usually be gotten from TLS or get from __stack_chk_guard, or some other styles we may implement in the future.
public std::string StackProtectorGuardReg
The TLS base register when StackProtectorGuard is "tls", or register used to store the stack canary for "sysreg". On x86 this can be "fs" or "gs". On AArch64 this can only be "sp_el0".
public std::string StackProtectorGuardSymbol
Specify a symbol to be the guard value.
public std::vector<std::string> SanitizeCoverageIgnorelistFiles
Path to ignorelist file specifying which objects (files, functions) listed for instrumentation by sanitizer coverage pass should actually not be instrumented.
public std::string StackUsageOutput
Name of the stack usage file (i.e., .su file) if user passes -fstack-usage. If empty, it can be implied that -fstack-usage is not passed on the command line.
public const char* Argv0 = nullptr
Executable and command-line used to create a given CompilerInvocation. Most of the time this will be the full -cc1 command.
public std::vector<std::string> CommandLineArgs
public Optional<uint64_t> DiagnosticsHotnessThreshold = 0
If threshold option is not specified, it is disabled by default.
public Optional<uint64_t> DiagnosticsMisExpectTolerance = 0
The maximum percentage profiling weights can deviate from the expected values in order to be included in misexpect diagnostics.

Inherited from CodeGenOptionsBase:

public DisableIntegratedAS
public RelaxELFRelocations
public AsmVerbose
public Dwarf64
public Dwarf32
public PreserveAsmComments
public AssumeSaneOperatorNew
public Autolink
public ObjCAutoRefCountExceptions
public Backchain
public ControlFlowGuardNoChecks
public ControlFlowGuard
public EHContGuard
public CXAAtExit
public RegisterGlobalDtorsWithAtExit
public CXXCtorDtorAliases
public DataSections
public UniqueSectionNames
public UniqueBasicBlockSectionNames
public EnableAIXExtendedAltivecABI
public ClearASTBeforeBackend
public DisableFree
public DiscardValueNames
public DisableLLVMPasses
public DisableLifetimeMarkers
public DisableO0ImplyOptNone
public ExperimentalStrictFloatingPoint
public EnableNoundefAttrs
public DebugPassManager
public DisableRedZone
public EmitCallSiteInfo
public EnableDIPreservationVerify
public IndirectTlsSegRefs
public DisableTailCalls
public NoEscapingBlockTailCalls
public EmitDeclMetadata
public EmitVersionIdentMetadata
public EmitGcovArcs
public EmitGcovNotes
public EmitOpenCLArgMetadata
public EmulatedTLS
public ExplicitEmulatedTLS
public ForbidGuardVariables
public FunctionSections
public InstrumentFunctions
public InstrumentFunctionsAfterInlining
public InstrumentFunctionEntryBare
public CFProtectionReturn
public CFProtectionBranch
public IBTSeal
public FunctionReturnThunks
public XRayInstrumentFunctions
public StackSizeSection
public ForceDwarfFrameSection
public XRayAlwaysEmitCustomEvents
public XRayAlwaysEmitTypedEvents
public XRayIgnoreLoops
public XRayOmitFunctionIndex
public XRayInstructionThreshold
public XRayTotalFunctionGroups
public XRaySelectedFunctionGroup
public PatchableFunctionEntryCount
public PatchableFunctionEntryOffset
public HotPatch
public JMCInstrument
public InstrumentForProfiling
public CallFEntry
public MNopMCount
public RecordMCount
public PackedStack
public LessPreciseFPMAD
public PrepareForLTO
public PrepareForThinLTO
public LTOUnit
public EnableSplitLTOUnit
public IncrementalLinkerCompatible
public MergeAllConstants
public MergeFunctions
public MSVolatile
public NoCommon
public NoDwarfDirectoryAsm
public NoExecStack
public FatalWarnings
public NoWarn
public MisExpect
public EnableSegmentedStacks
public NoInlineLineTables
public StackClashProtector
public NoImplicitFloat
public NullPointerIsValid
public OpenCLCorrectlyRoundedDivSqrt
public HIPCorrectlyRoundedDivSqrt
public HIPSaveKernelArgName
public UniqueInternalLinkageNames
public SplitMachineFunctions
public StrictFloatCastOverflow
public UniformWGSize
public NoZeroInitializedInBSS
public ObjCConvertMessagesToRuntimeCalls
public ObjCAvoidHeapifyLocalBlocks
public OptimizationLevel
public OptimizeSize
public AtomicProfileUpdate
public ProfileTotalFunctionGroups
public ProfileSelectedFunctionGroup
public CoverageMapping
public DumpCoverageMapping
public RelaxAll
public RelaxedAliasing
public StructPathTBAA
public NewStructPathTBAA
public SaveTempLabels
public SanitizeAddressUseAfterScope
public SanitizeAddressPoisonCustomArrayCookie
public SanitizeAddressGlobalsDeadStripping
public SanitizeAddressUseOdrIndicator
public SanitizeMemoryTrackOrigins
public SanitizeMemoryParamRetval
public SanitizeMemoryUseAfterDtor
public SanitizeCfiCrossDso
public SanitizeMinimalRuntime
public SanitizeCfiICallGeneralizePointers
public SanitizeCfiCanonicalJumpTables
public SanitizeCoverageType
public SanitizeCoverageIndirectCalls
public SanitizeCoverageTraceBB
public SanitizeCoverageTraceCmp
public SanitizeCoverageTraceDiv
public SanitizeCoverageTraceGep
public SanitizeCoverage8bitCounters
public SanitizeCoverageTracePC
public SanitizeCoverageTracePCGuard
public SanitizeCoverageInline8bitCounters
public SanitizeCoverageInlineBoolFlag
public SanitizeCoveragePCTable
public SanitizeCoverageNoPrune
public SanitizeCoverageStackDepth
public SanitizeCoverageTraceLoads
public SanitizeCoverageTraceStores
public SanitizeStats
public SimplifyLibCalls
public SoftFloat
public SpeculativeLoadHardening
public FineGrainedBitfieldAccesses
public StrictEnums
public StrictVTablePointers
public TimePasses
public TimePassesPerRun
public TimeTrace
public TimeTraceGranularity
public UnrollLoops
public RerollLoops
public NoUseJumpTables
public UnwindTables
public VectorizeLoop
public VectorizeSLP
public ProfileSampleAccurate
public UseRegisterSizedBitfieldAccess
public VerifyModule
public StackRealignment
public UseInitArray
public LoopAlignment
public StackAlignment
public StackProbeSize
public WarnStackSize
public NoStackArgProbe
public DebugStrictDwarf
public DebugColumnInfo
public DebugTypeExtRefs
public DebugExplicitImport
public SplitDwarfInlining
public DebugFwdTemplateParams
public EmitLLVMUseLists
public WholeProgramVTables
public VirtualFunctionElimination
public LTOVisibilityPublicStd
public NumRegisterParameters
public SmallDataLimit
public SSPBufferSize
public MacroDebugInfo
public DwarfVersion
public EmitCodeView
public CodeViewGHash
public TLSSize
public StackProtectorGuardOffset
public EmitCheckPathComponentsToStrip
public DiagnosticsWithHotness
public DirectAccessExternalData
public StrictReturn
public DebugInfoForProfiling
public PseudoProbeForProfiling
public PreserveVec3Type
public DebugNameTable
public DebugRangesBaseAddress
public NoPLT
public EmbedSource
public ForceEmitVTables
public Addrsig
public KeepStaticConsts
public ForceAAPCSBitfieldLoad
public PassByValueIsNoAlias
public AAPCSBitfieldWidth
public EmitIEEENaNCompliantInsts
public SkipRaxSetup
public OpaquePointers
protected CompressDebugSections
protected FramePointer
protected EmbedBitcode
protected InlineAsmDialect
protected EmitDwarfUnwind
protected ObjCDispatchMethod
protected ProfileInstr
protected ProfileUse
protected StructReturnConvention
protected SanitizeAddressUseAfterReturn
protected SanitizeAddressDtor
protected FiniteLoops
protected DebugSimpleTemplateNames
protected DebugInfo
protected DebuggerTuning
protected Inlining
protected VecLib
protected DefaultTLSModel
protected SwiftAsyncFramePointer
protected ZeroCallUsedRegs

Method Overview

Methods

CodeGenOptions()

Declared at: clang/include/clang/Basic/CodeGenOptions.h:437

const std::vector<std::string>&
getNoBuiltinFuncs() const

Declared at: clang/include/clang/Basic/CodeGenOptions.h:439

bool hasMaybeUnusedDebugInfo() const

Description

Check if maybe unused type info should be emitted.

Declared at: clang/include/clang/Basic/CodeGenOptions.h:478

bool hasProfileCSIRInstr() const

Description

Check if CS IR level profile instrumentation is on.

Declared at: clang/include/clang/Basic/CodeGenOptions.h:454

bool hasProfileCSIRUse() const

Description

Check if CSIR profile use is on.

Declared at: clang/include/clang/Basic/CodeGenOptions.h:470

bool hasProfileClangInstr() const

Description

Check if Clang profile instrumenation is on.

Declared at: clang/include/clang/Basic/CodeGenOptions.h:444

bool hasProfileClangUse() const

Description

Check if Clang profile use is on.

Declared at: clang/include/clang/Basic/CodeGenOptions.h:459

bool hasProfileIRInstr() const

Description

Check if IR level profile instrumentation is on.

Declared at: clang/include/clang/Basic/CodeGenOptions.h:449

bool hasProfileIRUse() const

Description

Check if IR level profile use is on.

Declared at: clang/include/clang/Basic/CodeGenOptions.h:464

bool hasReducedDebugInfo() const

Description

Check if type and variable info should be emitted.

Declared at: clang/include/clang/Basic/CodeGenOptions.h:473

bool hasSanitizeCoverage() const

Declared at: clang/include/clang/Basic/CodeGenOptions.h:483