MLIR 22.0.0git
AttrTypeSubElements.h File Reference
#include "mlir/IR/MLIRContext.h"
#include "mlir/IR/Visitors.h"
#include "mlir/Support/CyclicReplacerCache.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/DenseMap.h"
#include <optional>

Go to the source code of this file.

Classes

class  mlir::AttrTypeWalker
 AttrTypeWalker. More...
class  mlir::detail::AttrTypeReplacerBase< Concrete >
 This class provides a base utility for replacing attributes/types, and their sub elements. More...
class  mlir::AttrTypeReplacer
 This is an attribute/type replacer that is naively cached. More...
class  mlir::CyclicAttrTypeReplacer
 This is an attribute/type replacer that supports custom handling of cycles in the replacer logic. More...
class  mlir::AttrTypeImmediateSubElementWalker
 AttrTypeSubElementHandler. More...
class  mlir::AttrTypeSubElementReplacements< T >
 This class is used by AttrTypeSubElementHandler instances to process sub element replacements. More...
struct  mlir::AttrTypeSubElementHandler< T, Enable >
 This class provides support for interacting with the SubElementInterfaces for different types of parameters. More...
struct  mlir::AttrTypeSubElementHandler< T, std::enable_if_t< std::is_base_of_v< Attribute, T >||std::is_base_of_v< Type, T > > >
 Implementation for derived Attributes and Types. More...
struct  mlir::AttrTypeSubElementHandler< ArrayRef< T >, std::enable_if_t< has_sub_attr_or_type_v< T > > >
 Implementation for derived ArrayRef. More...
struct  mlir::AttrTypeSubElementHandler< std::tuple< Ts... >, std::enable_if_t< has_sub_attr_or_type_v< Ts... > > >
 Implementation for Tuple. More...
struct  mlir::detail::is_tuple< T >
struct  mlir::detail::is_tuple< std::tuple< Ts... > >
struct  mlir::detail::is_pair< T >
struct  mlir::detail::is_pair< std::pair< Ts... > >

Namespaces

namespace  mlir
 Include the generated interface declarations.
namespace  mlir::detail
 AttrTypeReplacer.

Typedefs

using mlir::AttrSubElementReplacements = AttrTypeSubElementReplacements<Attribute>
using mlir::TypeSubElementReplacements = AttrTypeSubElementReplacements<Type>
template<typename T>
using mlir::detail::has_default_sub_element_handler_t = decltype(T::DefaultHandlerTag)
template<typename T, typename... Ts>
using mlir::detail::has_get_method = decltype(T::get(std::declval<Ts>()...))
template<typename T, typename... Ts>
using mlir::detail::has_get_as_key = decltype(std::declval<T>().getAsKey())

Functions

template<typename T>
void mlir::detail::walkImmediateSubElementsImpl (T derived, function_ref< void(Attribute)> walkAttrsFn, function_ref< void(Type)> walkTypesFn)
 This function provides the underlying implementation for the SubElementInterface walk method, using the key type of the derived attribute/type to interact with the individual parameters.
template<typename T, typename... Ts>
auto mlir::detail::constructSubElementReplacement (MLIRContext *ctx, Ts &&...params)
 This function invokes the proper get method for a type T with the given values.
template<typename T>
auto mlir::detail::replaceImmediateSubElementsImpl (T derived, ArrayRef< Attribute > &replAttrs, ArrayRef< Type > &replTypes)
 This function provides the underlying implementation for the SubElementInterface replace method, using the key type of the derived attribute/type to interact with the individual parameters.

Variables

template<typename... Ts>
constexpr bool mlir::has_sub_attr_or_type_v