FLANG
Fortran::frontend::CodeGenOptions Class Reference

#include <flang/Frontend/CodeGenOptions.h>

Inheritance diagram for Fortran::frontend::CodeGenOptions:
Fortran::frontend::CodeGenOptionsBase

Classes

struct  OptRemark
 Optimization remark with an optional regular expression pattern. More...

Public Types

enum class  RemarkKind { RK_Missing , RK_Enabled , RK_Disabled , RK_WithPattern }
enum  ComplexRangeKind { CX_Full , CX_Improved , CX_Basic , CX_None }
 Controls the various implementations for complex division. More...
using DoConcurrentMappingKind = flangomp::DoConcurrentMappingKind

Public Member Functions

bool hasProfileClangInstr () const
 Check if Clang profile instrumenation is on.
bool hasProfileIRInstr () const
 Check if IR level profile instrumentation is on.
bool hasProfileCSIRInstr () const
 Check if CS IR level profile instrumentation is on.
bool hasProfileIRUse () const
 Check if IR level profile use is on.
bool hasProfileCSIRUse () const
 Check if CSIR profile use is on.

Public Attributes

std::vector< std::string > LLVMPassPlugins
 The paths to the pass plugins that were registered using -fpass-plugin.
std::string PreferVectorWidth
 The prefered vector width, if requested by -mprefer-vector-width.
std::string Reciprocals
 List of reciprocal estimate sub-options.
std::vector< std::string > OffloadObjects
std::vector< std::string > BuiltinBCLibs
std::optional< std::string > SaveTempsDir
 The directory where temp files are stored if specified by -save-temps.
std::optional< std::string > RecordCommandLine
 The string containing the commandline for the llvm.commandline metadata.
std::string OptRecordFile
std::string OptRecordPasses
std::string OptRecordFormat
 The format used for serializing remarks (default: YAML)
std::vector< std::string > DependentLibs
 Options to add to the linker for the object file.
llvm::CodeObjectVersionKind CodeObjectVersion
 Code object version for AMDGPU.
OptRemark OptimizationRemark
OptRemark OptimizationRemarkMissed
OptRemark OptimizationRemarkAnalysis
std::string CodeModel
 The code model to use (-mcmodel).
uint64_t LargeDataThreshold
std::string InstrProfileOutput
std::string MemoryProfileUsePath
 Name of the profile file to use as input for -fmemory-profile-use.
std::string ProfileInstrumentUsePath
 Name of the profile file to use as input for -fprofile-instr-use.
std::string ProfileRemappingFile
std::string SplitDwarfFile
std::string SplitDwarfOutput
 Output filename for the split debug info, not used in the skeleton CU.

Detailed Description

Tracks various options which control how the code is optimized and passed to the LLVM backend.

Member Typedef Documentation

◆ DoConcurrentMappingKind

using Fortran::frontend::CodeGenOptions::DoConcurrentMappingKind = flangomp::DoConcurrentMappingKind

Optionally map do concurrent loops to OpenMP. This is only valid of OpenMP is enabled.

Member Enumeration Documentation

◆ ComplexRangeKind

Controls the various implementations for complex division.

Enumerator
CX_Full 

Implementation of complex division using a call to runtime library functions. Overflow and non-finite values are handled by the library implementation. This is the default value.

CX_Improved 

Implementation of complex division offering an improved handling for overflow in intermediate calculations. Overflow and non-finite values are handled by MLIR's implementation of "complex.div", but this may change in the future.

CX_Basic 

Implementation of complex division using algebraic formulas at source precision. No special handling to avoid overflow. NaN and infinite values are not handled.

CX_None 

No range rule is enabled.

TODO: Implemention of other values as needed. In Clang, "CX_Promoted" is implemented. (See clang/Basic/LangOptions.h)

Member Data Documentation

◆ BuiltinBCLibs

std::vector<std::string> Fortran::frontend::CodeGenOptions::BuiltinBCLibs

List of filenames passed in using the -mlink-builtin-bitcode. These are bc libraries that should be linked in and internalized;

◆ CodeObjectVersion

llvm::CodeObjectVersionKind Fortran::frontend::CodeGenOptions::CodeObjectVersion
Initial value:
=
llvm::CodeObjectVersionKind::COV_None

Code object version for AMDGPU.

◆ InstrProfileOutput

std::string Fortran::frontend::CodeGenOptions::InstrProfileOutput

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

◆ LargeDataThreshold

uint64_t Fortran::frontend::CodeGenOptions::LargeDataThreshold

The code model-specific large data threshold to use (-mlarge-data-threshold).

◆ OffloadObjects

std::vector<std::string> Fortran::frontend::CodeGenOptions::OffloadObjects

List of filenames passed in using the -fembed-offload-object option. These are offloading binaries containing device images and metadata.

◆ OptimizationRemark

OptRemark Fortran::frontend::CodeGenOptions::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.

◆ OptimizationRemarkAnalysis

OptRemark Fortran::frontend::CodeGenOptions::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.

◆ OptimizationRemarkMissed

OptRemark Fortran::frontend::CodeGenOptions::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.

◆ OptRecordFile

std::string Fortran::frontend::CodeGenOptions::OptRecordFile

The name of the file to which the backend should save YAML optimization records.

◆ OptRecordPasses

std::string Fortran::frontend::CodeGenOptions::OptRecordPasses

The regex that filters the passes that should be saved to the optimization records.

◆ ProfileRemappingFile

std::string Fortran::frontend::CodeGenOptions::ProfileRemappingFile

Name of the profile remapping file to apply to the profile data supplied by -fprofile-sample-use or -fprofile-instr-use.

◆ SplitDwarfFile

std::string Fortran::frontend::CodeGenOptions::SplitDwarfFile

The name for the split debug info file used for the DW_AT_[GNU_]dwo_name attribute in the skeleton CU.


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