MLIR  20.0.0git
Namespaces | Functions
Parser.h File Reference
#include "mlir/IR/AsmState.h"
#include "mlir/IR/Builders.h"
#include "mlir/IR/OwningOpRef.h"
#include <cstddef>

Go to the source code of this file.

Namespaces

 llvm
 The OpAsmOpInterface, see OpAsmInterface.td for more details.
 
 mlir
 Include the generated interface declarations.
 
 mlir::detail
 AttrTypeReplacer.
 

Functions

template<typename ContainerOpT >
OwningOpRef< ContainerOpT > mlir::detail::constructContainerOpForParserIfNecessary (Block *parsedBlock, MLIRContext *context, Location sourceFileLoc)
 Given a block containing operations that have just been parsed, if the block contains a single operation of ContainerOpT type then remove it from the block and return it. More...
 
LogicalResult mlir::parseSourceFile (const llvm::SourceMgr &sourceMgr, Block *block, const ParserConfig &config, LocationAttr *sourceFileLoc=nullptr)
 This parses the file specified by the indicated SourceMgr and appends parsed operations to the given block. More...
 
LogicalResult mlir::parseSourceFile (const std::shared_ptr< llvm::SourceMgr > &sourceMgr, Block *block, const ParserConfig &config, LocationAttr *sourceFileLoc=nullptr)
 An overload with a source manager that may have references taken during the parsing process, and whose lifetime can be freely extended (such that the source manager is not destroyed before the parsed IR). More...
 
LogicalResult mlir::parseSourceFile (llvm::StringRef filename, Block *block, const ParserConfig &config, LocationAttr *sourceFileLoc=nullptr)
 This parses the file specified by the indicated filename and appends parsed operations to the given block. More...
 
LogicalResult mlir::parseSourceFile (llvm::StringRef filename, llvm::SourceMgr &sourceMgr, Block *block, const ParserConfig &config, LocationAttr *sourceFileLoc=nullptr)
 This parses the file specified by the indicated filename using the provided SourceMgr and appends parsed operations to the given block. More...
 
LogicalResult mlir::parseSourceFile (llvm::StringRef filename, const std::shared_ptr< llvm::SourceMgr > &sourceMgr, Block *block, const ParserConfig &config, LocationAttr *sourceFileLoc=nullptr)
 An overload with a source manager that may have references taken during the parsing process, and whose lifetime can be freely extended (such that the source manager is not destroyed before the parsed IR). More...
 
LogicalResult mlir::parseSourceString (llvm::StringRef sourceStr, Block *block, const ParserConfig &config, StringRef sourceName="", LocationAttr *sourceFileLoc=nullptr)
 This parses the IR string and appends parsed operations to the given block. More...
 
template<typename ContainerOpT , typename... ParserArgs>
OwningOpRef< ContainerOpT > mlir::detail::parseSourceFile (const ParserConfig &config, ParserArgs &&...args)
 The internal implementation of the templated parseSourceFile methods below, that simply forwards to the non-templated version. More...
 
template<typename ContainerOpT = Operation *>
OwningOpRef< ContainerOpT > mlir::parseSourceFile (const llvm::SourceMgr &sourceMgr, const ParserConfig &config)
 This parses the file specified by the indicated SourceMgr. More...
 
template<typename ContainerOpT = Operation *>
OwningOpRef< ContainerOpT > mlir::parseSourceFile (const std::shared_ptr< llvm::SourceMgr > &sourceMgr, const ParserConfig &config)
 An overload with a source manager that may have references taken during the parsing process, and whose lifetime can be freely extended (such that the source manager is not destroyed before the parsed IR). More...
 
template<typename ContainerOpT = Operation *>
OwningOpRef< ContainerOpT > mlir::parseSourceFile (StringRef filename, const ParserConfig &config)
 This parses the file specified by the indicated filename. More...
 
template<typename ContainerOpT = Operation *>
OwningOpRef< ContainerOpT > mlir::parseSourceFile (llvm::StringRef filename, llvm::SourceMgr &sourceMgr, const ParserConfig &config)
 This parses the file specified by the indicated filename using the provided SourceMgr. More...
 
template<typename ContainerOpT = Operation *>
OwningOpRef< ContainerOpT > mlir::parseSourceFile (llvm::StringRef filename, const std::shared_ptr< llvm::SourceMgr > &sourceMgr, const ParserConfig &config)
 An overload with a source manager that may have references taken during the parsing process, and whose lifetime can be freely extended (such that the source manager is not destroyed before the parsed IR). More...
 
template<typename ContainerOpT = Operation *>
OwningOpRef< ContainerOpT > mlir::parseSourceString (llvm::StringRef sourceStr, const ParserConfig &config, StringRef sourceName="")
 This parses the provided string containing MLIR. More...