MLIR  19.0.0git
Namespaces | Functions
CommonFolders.h File Reference
#include "mlir/IR/BuiltinAttributes.h"
#include "mlir/IR/BuiltinTypes.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/STLExtras.h"
#include <optional>

Go to the source code of this file.

Namespaces

 mlir
 Include the generated interface declarations.
 
 mlir::ub
 

Functions

template<class AttrElementT , class ElementValueT = typename AttrElementT::ValueType, class PoisonAttr = ub::PoisonAttr, class CalculationT = function_ref< std::optional<ElementValueT>(ElementValueT, ElementValueT)>>
Attribute mlir::constFoldBinaryOpConditional (ArrayRef< Attribute > operands, Type resultType, CalculationT &&calculate)
 Performs constant folding calculate with element-wise behavior on the two attributes in operands and returns the result if possible. More...
 
template<class AttrElementT , class ElementValueT = typename AttrElementT::ValueType, class PoisonAttr = ub::PoisonAttr, class CalculationT = function_ref< std::optional<ElementValueT>(ElementValueT, ElementValueT)>>
Attribute mlir::constFoldBinaryOpConditional (ArrayRef< Attribute > operands, CalculationT &&calculate)
 Performs constant folding calculate with element-wise behavior on the two attributes in operands and returns the result if possible. More...
 
template<class AttrElementT , class ElementValueT = typename AttrElementT::ValueType, class PoisonAttr = void, class CalculationT = function_ref<ElementValueT(ElementValueT, ElementValueT)>>
Attribute mlir::constFoldBinaryOp (ArrayRef< Attribute > operands, Type resultType, CalculationT &&calculate)
 
template<class AttrElementT , class ElementValueT = typename AttrElementT::ValueType, class PoisonAttr = ub::PoisonAttr, class CalculationT = function_ref<ElementValueT(ElementValueT, ElementValueT)>>
Attribute mlir::constFoldBinaryOp (ArrayRef< Attribute > operands, CalculationT &&calculate)
 
template<class AttrElementT , class ElementValueT = typename AttrElementT::ValueType, class PoisonAttr = ub::PoisonAttr, class CalculationT = function_ref<std::optional<ElementValueT>(ElementValueT)>>
Attribute mlir::constFoldUnaryOpConditional (ArrayRef< Attribute > operands, CalculationT &&calculate)
 Performs constant folding calculate with element-wise behavior on the one attributes in operands and returns the result if possible. More...
 
template<class AttrElementT , class ElementValueT = typename AttrElementT::ValueType, class PoisonAttr = ub::PoisonAttr, class CalculationT = function_ref<ElementValueT(ElementValueT)>>
Attribute mlir::constFoldUnaryOp (ArrayRef< Attribute > operands, CalculationT &&calculate)
 
template<class AttrElementT , class TargetAttrElementT , class ElementValueT = typename AttrElementT::ValueType, class TargetElementValueT = typename TargetAttrElementT::ValueType, class PoisonAttr = ub::PoisonAttr, class CalculationT = function_ref<TargetElementValueT(ElementValueT, bool)>>
Attribute mlir::constFoldCastOp (ArrayRef< Attribute > operands, Type resType, CalculationT &&calculate)