MLIR  16.0.0git
Classes | Public Types | Public Member Functions | List of all members
mlir::tblgen::Operator Class Reference

#include "mlir/TableGen/Operator.h"

Classes

struct  ArgOrType
 
struct  OperandOrAttribute
 
struct  VariableDecorator
 A class used to represent the decorators of an operator variable, i.e. More...
 
struct  VariableDecoratorIterator
 

Public Types

using var_decorator_iterator = VariableDecoratorIterator
 
using var_decorator_range = llvm::iterator_range< VariableDecoratorIterator >
 
using value_iterator = NamedTypeConstraint *
 
using const_value_iterator = const NamedTypeConstraint *
 
using value_range = llvm::iterator_range< value_iterator >
 
using const_value_range = llvm::iterator_range< const_value_iterator >
 
using attribute_iterator = const NamedAttribute *
 
using arg_iterator = const Argument *
 
using arg_range = llvm::iterator_range< arg_iterator >
 
using const_region_iterator = const NamedRegion *
 
using const_successor_iterator = const NamedSuccessor *
 
using const_trait_iterator = const Trait *
 

Public Member Functions

 Operator (const llvm::Record &def)
 
 Operator (const llvm::Record *def)
 
StringRef getDialectName () const
 
std::string getOperationName () const
 
StringRef getCppClassName () const
 
std::string getQualCppClassName () const
 
StringRef getCppNamespace () const
 
std::string getAdaptorName () const
 
void assertInvariants () const
 
bool isVariadic () const
 
bool skipDefaultBuilders () const
 
const_value_iterator result_begin () const
 
const_value_iterator result_end () const
 
const_value_range getResults () const
 
int getNumResults () const
 
NamedTypeConstraintgetResult (int index)
 
const NamedTypeConstraintgetResult (int index) const
 
TypeConstraint getResultTypeConstraint (int index) const
 
StringRef getResultName (int index) const
 
var_decorator_range getResultDecorators (int index) const
 
unsigned getNumVariableLengthResults () const
 
attribute_iterator attribute_begin () const
 
attribute_iterator attribute_end () const
 
llvm::iterator_range< attribute_iteratorgetAttributes () const
 
int getNumAttributes () const
 
int getNumNativeAttributes () const
 
NamedAttributegetAttribute (int index)
 
const NamedAttributegetAttribute (int index) const
 
const_value_iterator operand_begin () const
 
const_value_iterator operand_end () const
 
const_value_range getOperands () const
 
int getNumOperands () const
 
NamedTypeConstraintgetOperand (int index)
 
const NamedTypeConstraintgetOperand (int index) const
 
unsigned getNumVariableLengthOperands () const
 
int getNumArgs () const
 
bool hasSingleVariadicArg () const
 
bool hasSingleVariadicResult () const
 
bool hasNoVariadicRegions () const
 
arg_iterator arg_begin () const
 
arg_iterator arg_end () const
 
arg_range getArgs () const
 
Argument getArg (int index) const
 
StringRef getArgName (int index) const
 
var_decorator_range getArgDecorators (int index) const
 
const TraitgetTrait (llvm::StringRef trait) const
 
const_region_iterator region_begin () const
 
const_region_iterator region_end () const
 
llvm::iterator_range< const_region_iteratorgetRegions () const
 
unsigned getNumRegions () const
 
const NamedRegiongetRegion (unsigned index) const
 
unsigned getNumVariadicRegions () const
 
const_successor_iterator successor_begin () const
 
const_successor_iterator successor_end () const
 
llvm::iterator_range< const_successor_iteratorgetSuccessors () const
 
unsigned getNumSuccessors () const
 
const NamedSuccessorgetSuccessor (unsigned index) const
 
unsigned getNumVariadicSuccessors () const
 
const_trait_iterator trait_begin () const
 
const_trait_iterator trait_end () const
 
llvm::iterator_range< const_trait_iteratorgetTraits () const
 
ArrayRef< SMLoc > getLoc () const
 
bool hasDescription () const
 
StringRef getDescription () const
 
bool hasSummary () const
 
StringRef getSummary () const
 
bool hasAssemblyFormat () const
 
StringRef getAssemblyFormat () const
 
StringRef getExtraClassDeclaration () const
 
StringRef getExtraClassDefinition () const
 
const llvm::Record & getDef () const
 
const DialectgetDialect () const
 
void print (llvm::raw_ostream &os) const
 
bool allResultTypesKnown () const
 
ArrayRef< ArgOrTypegetSameTypeAsResult (int index) const
 
OperandOrAttribute getArgToOperandOrAttribute (int index) const
 
ArrayRef< BuildergetBuilders () const
 
std::string getGetterName (StringRef name) const
 
SmallVector< std::string, 2 > getGetterNames (StringRef name) const
 
SmallVector< std::string, 2 > getSetterNames (StringRef name) const
 

Detailed Description

Definition at line 43 of file Operator.h.

Member Typedef Documentation

◆ arg_iterator

Definition at line 175 of file Operator.h.

◆ arg_range

Definition at line 176 of file Operator.h.

◆ attribute_iterator

Definition at line 133 of file Operator.h.

◆ const_region_iterator

Definition at line 192 of file Operator.h.

◆ const_successor_iterator

Definition at line 206 of file Operator.h.

◆ const_trait_iterator

Definition at line 220 of file Operator.h.

◆ const_value_iterator

Definition at line 98 of file Operator.h.

◆ const_value_range

Definition at line 100 of file Operator.h.

◆ value_iterator

Definition at line 97 of file Operator.h.

◆ value_range

Definition at line 99 of file Operator.h.

◆ var_decorator_iterator

Definition at line 94 of file Operator.h.

◆ var_decorator_range

Definition at line 95 of file Operator.h.

Constructor & Destructor Documentation

◆ Operator() [1/2]

Operator::Operator ( const llvm::Record &  def)
explicit

Definition at line 38 of file Operator.cpp.

References assertInvariants().

◆ Operator() [2/2]

mlir::tblgen::Operator::Operator ( const llvm::Record *  def)
inlineexplicit

Definition at line 46 of file Operator.h.

Member Function Documentation

◆ allResultTypesKnown()

bool mlir::tblgen::Operator::allResultTypesKnown ( ) const
inline

Definition at line 257 of file Operator.h.

Referenced by getSameTypeAsResult().

◆ arg_begin()

Operator::arg_iterator Operator::arg_begin ( ) const

Definition at line 191 of file Operator.cpp.

Referenced by getArgs().

◆ arg_end()

Operator::arg_iterator Operator::arg_end ( ) const

Definition at line 193 of file Operator.cpp.

Referenced by getArgs().

◆ assertInvariants()

void Operator::assertInvariants ( ) const

◆ attribute_begin()

auto Operator::attribute_begin ( ) const

Definition at line 282 of file Operator.cpp.

Referenced by getAttributes().

◆ attribute_end()

auto Operator::attribute_end ( ) const

Definition at line 285 of file Operator.cpp.

Referenced by getAttributes().

◆ getAdaptorName()

std::string Operator::getAdaptorName ( ) const

Definition at line 68 of file Operator.cpp.

References getCppClassName().

◆ getArg()

auto Operator::getArg ( int  index) const

◆ getArgDecorators()

auto Operator::getArgDecorators ( int  index) const

Definition at line 204 of file Operator.cpp.

References getDef().

◆ getArgName()

StringRef Operator::getArgName ( int  index) const

Definition at line 199 of file Operator.cpp.

◆ getArgs()

Operator::arg_range Operator::getArgs ( ) const

Definition at line 195 of file Operator.cpp.

References arg_begin(), and arg_end().

◆ getArgToOperandOrAttribute()

auto Operator::getArgToOperandOrAttribute ( int  index) const

Definition at line 690 of file Operator.cpp.

◆ getAssemblyFormat()

StringRef Operator::getAssemblyFormat ( ) const

Definition at line 670 of file Operator.cpp.

◆ getAttribute() [1/2]

NamedAttribute& mlir::tblgen::Operator::getAttribute ( int  index)
inline

Definition at line 142 of file Operator.h.

◆ getAttribute() [2/2]

const NamedAttribute& mlir::tblgen::Operator::getAttribute ( int  index) const
inline

Definition at line 143 of file Operator.h.

◆ getAttributes()

auto Operator::getAttributes ( ) const

Definition at line 288 of file Operator.cpp.

References attribute_begin(), and attribute_end().

◆ getBuilders()

ArrayRef<Builder> mlir::tblgen::Operator::getBuilders ( ) const
inline

Definition at line 303 of file Operator.h.

◆ getCppClassName()

StringRef Operator::getCppClassName ( ) const

Definition at line 109 of file Operator.cpp.

Referenced by getAdaptorName().

◆ getCppNamespace()

StringRef Operator::getCppNamespace ( ) const

Definition at line 117 of file Operator.cpp.

◆ getDef()

const llvm::Record & Operator::getDef ( ) const

◆ getDescription()

StringRef Operator::getDescription ( ) const

Definition at line 655 of file Operator.cpp.

◆ getDialect()

const Dialect& mlir::tblgen::Operator::getDialect ( ) const
inline

Definition at line 250 of file Operator.h.

References print().

Referenced by getGetterOrSetterNames().

◆ getDialectName()

StringRef Operator::getDialectName ( ) const

Definition at line 107 of file Operator.cpp.

References mlir::tblgen::Dialect::getName().

◆ getExtraClassDeclaration()

StringRef Operator::getExtraClassDeclaration ( ) const

Definition at line 124 of file Operator.cpp.

◆ getExtraClassDefinition()

StringRef Operator::getExtraClassDefinition ( ) const

Definition at line 131 of file Operator.cpp.

◆ getGetterName()

std::string mlir::tblgen::Operator::getGetterName ( StringRef  name) const
inline

Definition at line 306 of file Operator.h.

◆ getGetterNames()

SmallVector< std::string, 2 > Operator::getGetterNames ( StringRef  name) const

Definition at line 767 of file Operator.cpp.

References getGetterOrSetterNames().

◆ getLoc()

ArrayRef< SMLoc > Operator::getLoc ( ) const

Definition at line 649 of file Operator.cpp.

Referenced by assertInvariants(), and getGetterOrSetterNames().

◆ getNumArgs()

int mlir::tblgen::Operator::getNumArgs ( ) const
inline

Definition at line 162 of file Operator.h.

Referenced by mlir::tblgen::Pattern::collectBoundSymbols(), and hasSingleVariadicArg().

◆ getNumAttributes()

int mlir::tblgen::Operator::getNumAttributes ( ) const
inline

Definition at line 138 of file Operator.h.

◆ getNumNativeAttributes()

int mlir::tblgen::Operator::getNumNativeAttributes ( ) const
inline

Definition at line 139 of file Operator.h.

◆ getNumOperands()

int mlir::tblgen::Operator::getNumOperands ( ) const
inline

Definition at line 152 of file Operator.h.

Referenced by assertInvariants(), and getGetterOrSetterNames().

◆ getNumRegions()

unsigned Operator::getNumRegions ( ) const

Definition at line 239 of file Operator.cpp.

Referenced by assertInvariants(), and getGetterOrSetterNames().

◆ getNumResults()

int Operator::getNumResults ( ) const

Definition at line 119 of file Operator.cpp.

Referenced by assertInvariants(), getGetterOrSetterNames(), and isVariadic().

◆ getNumSuccessors()

unsigned Operator::getNumSuccessors ( ) const

Definition at line 261 of file Operator.cpp.

Referenced by assertInvariants().

◆ getNumVariableLengthOperands()

unsigned Operator::getNumVariableLengthOperands ( ) const

◆ getNumVariableLengthResults()

unsigned Operator::getNumVariableLengthResults ( ) const

◆ getNumVariadicRegions()

unsigned Operator::getNumVariadicRegions ( ) const

Definition at line 245 of file Operator.cpp.

References mlir::tblgen::NamedRegion::isVariadic().

Referenced by getGetterOrSetterNames().

◆ getNumVariadicSuccessors()

unsigned Operator::getNumVariadicSuccessors ( ) const

Definition at line 267 of file Operator.cpp.

References mlir::tblgen::NamedSuccessor::isVariadic().

◆ getOperand() [1/2]

NamedTypeConstraint& mlir::tblgen::Operator::getOperand ( int  index)
inline

Definition at line 153 of file Operator.h.

Referenced by assertInvariants(), and hasSingleVariadicArg().

◆ getOperand() [2/2]

const NamedTypeConstraint& mlir::tblgen::Operator::getOperand ( int  index) const
inline

Definition at line 154 of file Operator.h.

◆ getOperands()

auto Operator::getOperands ( ) const

Definition at line 299 of file Operator.cpp.

References operand_begin(), and operand_end().

◆ getOperationName()

std::string Operator::getOperationName ( ) const

Definition at line 60 of file Operator.cpp.

References mlir::tblgen::Dialect::getName().

Referenced by mlir::tblgen::Pattern::collectBoundSymbols(), and print().

◆ getQualCppClassName()

std::string Operator::getQualCppClassName ( ) const

Definition at line 111 of file Operator.cpp.

Referenced by getGetterOrSetterNames().

◆ getRegion()

const NamedRegion & Operator::getRegion ( unsigned  index) const

Definition at line 241 of file Operator.cpp.

Referenced by assertInvariants().

◆ getRegions()

auto Operator::getRegions ( ) const

Definition at line 234 of file Operator.cpp.

References region_begin(), and region_end().

◆ getResult() [1/2]

NamedTypeConstraint& mlir::tblgen::Operator::getResult ( int  index)
inline

Definition at line 117 of file Operator.h.

Referenced by assertInvariants().

◆ getResult() [2/2]

const NamedTypeConstraint& mlir::tblgen::Operator::getResult ( int  index) const
inline

Definition at line 118 of file Operator.h.

◆ getResultDecorators()

auto Operator::getResultDecorators ( int  index) const

Definition at line 166 of file Operator.cpp.

References getDef().

◆ getResultName()

StringRef Operator::getResultName ( int  index) const

Definition at line 161 of file Operator.cpp.

◆ getResults()

auto Operator::getResults ( ) const

Definition at line 152 of file Operator.cpp.

References result_begin(), and result_end().

◆ getResultTypeConstraint()

TypeConstraint Operator::getResultTypeConstraint ( int  index) const

Definition at line 156 of file Operator.cpp.

Referenced by isVariadic().

◆ getSameTypeAsResult()

auto Operator::getSameTypeAsResult ( int  index) const

Definition at line 644 of file Operator.cpp.

References allResultTypesKnown().

◆ getSetterNames()

SmallVector< std::string, 2 > Operator::getSetterNames ( StringRef  name) const

Definition at line 771 of file Operator.cpp.

References getGetterOrSetterNames().

◆ getSuccessor()

const NamedSuccessor & Operator::getSuccessor ( unsigned  index) const

Definition at line 263 of file Operator.cpp.

Referenced by assertInvariants().

◆ getSuccessors()

auto Operator::getSuccessors ( ) const

Definition at line 256 of file Operator.cpp.

References successor_begin(), and successor_end().

◆ getSummary()

StringRef Operator::getSummary ( ) const

Definition at line 661 of file Operator.cpp.

◆ getTrait()

const Trait * Operator::getTrait ( llvm::StringRef  trait) const

Definition at line 212 of file Operator.cpp.

Referenced by isVariadic().

◆ getTraits()

auto Operator::getTraits ( ) const

Definition at line 278 of file Operator.cpp.

References trait_begin(), and trait_end().

◆ hasAssemblyFormat()

bool Operator::hasAssemblyFormat ( ) const

Definition at line 665 of file Operator.cpp.

◆ hasDescription()

bool Operator::hasDescription ( ) const

Definition at line 651 of file Operator.cpp.

◆ hasNoVariadicRegions()

bool mlir::tblgen::Operator::hasNoVariadicRegions ( ) const
inline

Definition at line 173 of file Operator.h.

◆ hasSingleVariadicArg()

bool Operator::hasSingleVariadicArg ( ) const

◆ hasSingleVariadicResult()

bool mlir::tblgen::Operator::hasSingleVariadicResult ( ) const
inline

Definition at line 168 of file Operator.h.

◆ hasSummary()

bool Operator::hasSummary ( ) const

Definition at line 659 of file Operator.cpp.

◆ isVariadic()

bool Operator::isVariadic ( ) const

◆ operand_begin()

auto Operator::operand_begin ( ) const

Definition at line 293 of file Operator.cpp.

Referenced by getOperands().

◆ operand_end()

auto Operator::operand_end ( ) const

Definition at line 296 of file Operator.cpp.

Referenced by getOperands().

◆ print()

void Operator::print ( llvm::raw_ostream &  os) const

Definition at line 675 of file Operator.cpp.

References getOperationName().

Referenced by isVariadic().

◆ region_begin()

auto Operator::region_begin ( ) const

Definition at line 228 of file Operator.cpp.

Referenced by getRegions().

◆ region_end()

auto Operator::region_end ( ) const

Definition at line 231 of file Operator.cpp.

Referenced by getRegions().

◆ result_begin()

auto Operator::result_begin ( ) const

Definition at line 144 of file Operator.cpp.

Referenced by getResults().

◆ result_end()

auto Operator::result_end ( ) const

Definition at line 148 of file Operator.cpp.

Referenced by getResults().

◆ skipDefaultBuilders()

bool Operator::skipDefaultBuilders ( ) const

Definition at line 140 of file Operator.cpp.

Referenced by isVariadic().

◆ successor_begin()

auto Operator::successor_begin ( ) const

Definition at line 250 of file Operator.cpp.

Referenced by getSuccessors().

◆ successor_end()

auto Operator::successor_end ( ) const

Definition at line 253 of file Operator.cpp.

Referenced by getSuccessors().

◆ trait_begin()

auto Operator::trait_begin ( ) const

Definition at line 272 of file Operator.cpp.

Referenced by getTraits().

◆ trait_end()

auto Operator::trait_end ( ) const

Definition at line 275 of file Operator.cpp.

Referenced by getTraits().


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