My Project
Public Member Functions | List of all members
mlir::PassPipelineCLParser Class Reference

#include <PassRegistry.h>

Public Member Functions

 PassPipelineCLParser (StringRef arg, StringRef description)
 Construct a pass pipeline parser with the given command line description. More...
 
 ~PassPipelineCLParser ()
 
bool hasAnyOccurrences () const
 Returns true if this parser contains any valid options to add. More...
 
bool contains (const PassRegistryEntry *entry) const
 
LogicalResult addToPipeline (OpPassManager &pm) const
 Adds the passes defined by this parser entry to the given pass manager. More...
 

Detailed Description

This class implements a command-line parser for MLIR passes. It registers a cl option with a given argument and description. This parser will register options for each of the passes and pipelines that have been registered with the pass registry; Meaning that -cse will refer to the CSE pass in MLIR. It also registers an argument, pass-pipeline, that supports parsing a textual description of a pipeline.

Constructor & Destructor Documentation

◆ PassPipelineCLParser()

PassPipelineCLParser::PassPipelineCLParser ( StringRef  arg,
StringRef  description 
)

Construct a pass pipeline parser with the given command line description.

◆ ~PassPipelineCLParser()

PassPipelineCLParser::~PassPipelineCLParser ( )

Member Function Documentation

◆ addToPipeline()

LogicalResult PassPipelineCLParser::addToPipeline ( OpPassManager pm) const

Adds the passes defined by this parser entry to the given pass manager.

Adds the passes defined by this parser entry to the given pass manager. Returns failure() if the pass could not be properly constructed due to options parsing.

◆ contains()

bool PassPipelineCLParser::contains ( const PassRegistryEntry entry) const

Returns true if the given pass registry entry was registered at the top-level of the parser, i.e. not within an explicit textual pipeline.

◆ hasAnyOccurrences()

bool PassPipelineCLParser::hasAnyOccurrences ( ) const

Returns true if this parser contains any valid options to add.


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