Jlm
Public Types | Public Member Functions | Static Public Member Functions | Static Private Member Functions | Private Attributes | List of all members
jlm::tooling::JlmOptCommandLineOptions Class Referencefinal

#include <CommandLine.hpp>

Inheritance diagram for jlm::tooling::JlmOptCommandLineOptions:
Inheritance graph
[legend]
Collaboration diagram for jlm::tooling::JlmOptCommandLineOptions:
Collaboration graph
[legend]

Public Types

enum class  InputFormat { Llvm , Mlir }
 
enum class  OutputFormat {
  FirstEnumValue , Ascii , Dot , Llvm ,
  Mlir , Tree , Xml , LastEnumValue
}
 
enum class  OptimizationId {
  FirstEnumValue , AAAndersenAgnostic , AAAndersenRegionAware , CommonNodeElimination ,
  DeadNodeElimination , FunctionInlining , IfConversion , InvariantValueRedirection ,
  LoadChainSeparation , LoopUnrolling , LoopUnswitching , NodePullIn ,
  NodePushOut , NodeReduction , PredicateCorrelation , RvsdgTreePrinter ,
  ScalarEvolution , LastEnumValue
}
 

Public Member Functions

 JlmOptCommandLineOptions (util::FilePath inputFile, InputFormat inputFormat, util::FilePath outputFile, OutputFormat outputFormat, util::StatisticsCollectorSettings statisticsCollectorSettings, llvm::RvsdgTreePrinter::Configuration rvsdgTreePrinterConfiguration, std::vector< OptimizationId > optimizations, const bool dumpRvsdgDotGraphs)
 
void Reset () noexcept override
 
const util::FilePathGetInputFile () const noexcept
 
InputFormat GetInputFormat () const noexcept
 
const util::FilePathGetOutputFile () const noexcept
 
OutputFormat GetOutputFormat () const noexcept
 
const util::StatisticsCollectorSettingsGetStatisticsCollectorSettings () const noexcept
 
const std::vector< OptimizationId > & GetOptimizationIds () const noexcept
 
const llvm::RvsdgTreePrinter::ConfigurationGetRvsdgTreePrinterConfiguration () const noexcept
 
bool DumpRvsdgDotGraphs () const noexcept
 
- Public Member Functions inherited from jlm::tooling::CommandLineOptions
virtual ~CommandLineOptions ()
 
 CommandLineOptions ()=default
 

Static Public Member Functions

static OptimizationId FromCommandLineArgumentToOptimizationId (std::string_view commandLineArgument)
 
static util::Statistics::Id FromCommandLineArgumentToStatisticsId (std::string_view commandLineArgument)
 
static std::string_view ToCommandLineArgument (OptimizationId optimizationId)
 
static std::string_view ToCommandLineArgument (util::Statistics::Id statisticsId)
 
static std::string_view ToCommandLineArgument (InputFormat inputFormat)
 
static std::string_view ToCommandLineArgument (OutputFormat outputFormat)
 
static std::unique_ptr< JlmOptCommandLineOptionsCreate (util::FilePath inputFile, InputFormat inputFormat, util::FilePath outputFile, OutputFormat outputFormat, util::StatisticsCollectorSettings statisticsCollectorSettings, llvm::RvsdgTreePrinter::Configuration rvsdgTreePrinterConfiguration, std::vector< OptimizationId > optimizations, bool dumpRvsdgDotGraphs)
 

Static Private Member Functions

static const util::BijectiveMap< util::Statistics::Id, std::string_view > & GetStatisticsIdCommandLineArguments ()
 
static const std::unordered_map< OutputFormat, std::string_view > & GetOutputFormatCommandLineArguments ()
 
static const util::BijectiveMap< OptimizationId, std::string_view > & GetOptimizationIdCommandLineMap ()
 

Private Attributes

util::FilePath InputFile_
 
InputFormat InputFormat_
 
util::FilePath OutputFile_
 
OutputFormat OutputFormat_
 
util::StatisticsCollectorSettings StatisticsCollectorSettings_
 
std::vector< OptimizationIdOptimizationIds_
 
llvm::RvsdgTreePrinter::Configuration RvsdgTreePrinterConfiguration_
 
bool DumpRvsdgDotGraphs_
 

Detailed Description

Command line options for the jlm-opt command line tool.

Definition at line 41 of file CommandLine.hpp.

Member Enumeration Documentation

◆ InputFormat

Enumerator
Llvm 
Mlir 

Definition at line 44 of file CommandLine.hpp.

◆ OptimizationId

Enumerator
FirstEnumValue 
AAAndersenAgnostic 
AAAndersenRegionAware 
CommonNodeElimination 
DeadNodeElimination 
FunctionInlining 
IfConversion 
InvariantValueRedirection 
LoadChainSeparation 
LoopUnrolling 
LoopUnswitching 
NodePullIn 
NodePushOut 
NodeReduction 
PredicateCorrelation 
RvsdgTreePrinter 
ScalarEvolution 
LastEnumValue 

Definition at line 64 of file CommandLine.hpp.

◆ OutputFormat

Enumerator
FirstEnumValue 
Ascii 
Dot 
Llvm 
Mlir 
Tree 
Xml 
LastEnumValue 

Definition at line 50 of file CommandLine.hpp.

Constructor & Destructor Documentation

◆ JlmOptCommandLineOptions()

jlm::tooling::JlmOptCommandLineOptions::JlmOptCommandLineOptions ( util::FilePath  inputFile,
InputFormat  inputFormat,
util::FilePath  outputFile,
OutputFormat  outputFormat,
util::StatisticsCollectorSettings  statisticsCollectorSettings,
llvm::RvsdgTreePrinter::Configuration  rvsdgTreePrinterConfiguration,
std::vector< OptimizationId optimizations,
const bool  dumpRvsdgDotGraphs 
)
inline

Definition at line 88 of file CommandLine.hpp.

Member Function Documentation

◆ Create()

static std::unique_ptr<JlmOptCommandLineOptions> jlm::tooling::JlmOptCommandLineOptions::Create ( util::FilePath  inputFile,
InputFormat  inputFormat,
util::FilePath  outputFile,
OutputFormat  outputFormat,
util::StatisticsCollectorSettings  statisticsCollectorSettings,
llvm::RvsdgTreePrinter::Configuration  rvsdgTreePrinterConfiguration,
std::vector< OptimizationId optimizations,
bool  dumpRvsdgDotGraphs 
)
inlinestatic

Definition at line 177 of file CommandLine.hpp.

◆ DumpRvsdgDotGraphs()

bool jlm::tooling::JlmOptCommandLineOptions::DumpRvsdgDotGraphs ( ) const
inlinenoexcept

Definition at line 153 of file CommandLine.hpp.

◆ FromCommandLineArgumentToOptimizationId()

JlmOptCommandLineOptions::OptimizationId jlm::tooling::JlmOptCommandLineOptions::FromCommandLineArgumentToOptimizationId ( std::string_view  commandLineArgument)
static

Definition at line 120 of file CommandLine.cpp.

◆ FromCommandLineArgumentToStatisticsId()

util::Statistics::Id jlm::tooling::JlmOptCommandLineOptions::FromCommandLineArgumentToStatisticsId ( std::string_view  commandLineArgument)
static

Definition at line 147 of file CommandLine.cpp.

◆ GetInputFile()

const util::FilePath& jlm::tooling::JlmOptCommandLineOptions::GetInputFile ( ) const
inlinenoexcept

Definition at line 111 of file CommandLine.hpp.

◆ GetInputFormat()

InputFormat jlm::tooling::JlmOptCommandLineOptions::GetInputFormat ( ) const
inlinenoexcept

Definition at line 117 of file CommandLine.hpp.

◆ GetOptimizationIdCommandLineMap()

const util::BijectiveMap< JlmOptCommandLineOptions::OptimizationId, std::string_view > & jlm::tooling::JlmOptCommandLineOptions::GetOptimizationIdCommandLineMap ( )
staticprivate

Definition at line 92 of file CommandLine.cpp.

◆ GetOptimizationIds()

const std::vector<OptimizationId>& jlm::tooling::JlmOptCommandLineOptions::GetOptimizationIds ( ) const
inlinenoexcept

Definition at line 141 of file CommandLine.hpp.

◆ GetOutputFile()

const util::FilePath& jlm::tooling::JlmOptCommandLineOptions::GetOutputFile ( ) const
inlinenoexcept

Definition at line 123 of file CommandLine.hpp.

◆ GetOutputFormat()

OutputFormat jlm::tooling::JlmOptCommandLineOptions::GetOutputFormat ( ) const
inlinenoexcept

Definition at line 129 of file CommandLine.hpp.

◆ GetOutputFormatCommandLineArguments()

const std::unordered_map< JlmOptCommandLineOptions::OutputFormat, std::string_view > & jlm::tooling::JlmOptCommandLineOptions::GetOutputFormatCommandLineArguments ( )
staticprivate

Definition at line 230 of file CommandLine.cpp.

◆ GetRvsdgTreePrinterConfiguration()

const llvm::RvsdgTreePrinter::Configuration& jlm::tooling::JlmOptCommandLineOptions::GetRvsdgTreePrinterConfiguration ( ) const
inlinenoexcept

Definition at line 147 of file CommandLine.hpp.

◆ GetStatisticsCollectorSettings()

const util::StatisticsCollectorSettings& jlm::tooling::JlmOptCommandLineOptions::GetStatisticsCollectorSettings ( ) const
inlinenoexcept

Definition at line 135 of file CommandLine.hpp.

◆ GetStatisticsIdCommandLineArguments()

const util::BijectiveMap< util::Statistics::Id, std::string_view > & jlm::tooling::JlmOptCommandLineOptions::GetStatisticsIdCommandLineArguments ( )
staticprivate

Definition at line 193 of file CommandLine.cpp.

◆ Reset()

void jlm::tooling::JlmOptCommandLineOptions::Reset ( )
overridevirtualnoexcept

Resets the state of the instance.

Implements jlm::tooling::CommandLineOptions.

Definition at line 82 of file CommandLine.cpp.

◆ ToCommandLineArgument() [1/4]

std::string_view jlm::tooling::JlmOptCommandLineOptions::ToCommandLineArgument ( InputFormat  inputFormat)
static

Definition at line 174 of file CommandLine.cpp.

◆ ToCommandLineArgument() [2/4]

std::string_view jlm::tooling::JlmOptCommandLineOptions::ToCommandLineArgument ( OptimizationId  optimizationId)
static

Definition at line 136 of file CommandLine.cpp.

◆ ToCommandLineArgument() [3/4]

std::string_view jlm::tooling::JlmOptCommandLineOptions::ToCommandLineArgument ( OutputFormat  outputFormat)
static

Definition at line 186 of file CommandLine.cpp.

◆ ToCommandLineArgument() [4/4]

std::string_view jlm::tooling::JlmOptCommandLineOptions::ToCommandLineArgument ( util::Statistics::Id  statisticsId)
static

Definition at line 161 of file CommandLine.cpp.

Member Data Documentation

◆ DumpRvsdgDotGraphs_

bool jlm::tooling::JlmOptCommandLineOptions::DumpRvsdgDotGraphs_
private

Definition at line 206 of file CommandLine.hpp.

◆ InputFile_

util::FilePath jlm::tooling::JlmOptCommandLineOptions::InputFile_
private

Definition at line 199 of file CommandLine.hpp.

◆ InputFormat_

InputFormat jlm::tooling::JlmOptCommandLineOptions::InputFormat_
private

Definition at line 200 of file CommandLine.hpp.

◆ OptimizationIds_

std::vector<OptimizationId> jlm::tooling::JlmOptCommandLineOptions::OptimizationIds_
private

Definition at line 204 of file CommandLine.hpp.

◆ OutputFile_

util::FilePath jlm::tooling::JlmOptCommandLineOptions::OutputFile_
private

Definition at line 201 of file CommandLine.hpp.

◆ OutputFormat_

OutputFormat jlm::tooling::JlmOptCommandLineOptions::OutputFormat_
private

Definition at line 202 of file CommandLine.hpp.

◆ RvsdgTreePrinterConfiguration_

llvm::RvsdgTreePrinter::Configuration jlm::tooling::JlmOptCommandLineOptions::RvsdgTreePrinterConfiguration_
private

Definition at line 205 of file CommandLine.hpp.

◆ StatisticsCollectorSettings_

util::StatisticsCollectorSettings jlm::tooling::JlmOptCommandLineOptions::StatisticsCollectorSettings_
private

Definition at line 203 of file CommandLine.hpp.


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