MLIR  16.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 dependency graph for CommonFolders.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 mlir
 Include the generated interface declarations.
 

Functions

template<class AttrElementT , class ElementValueT = typename AttrElementT::ValueType, class CalculationT = function_ref<Optional<ElementValueT>(ElementValueT, ElementValueT)>>
Attribute mlir::constFoldBinaryOpConditional (ArrayRef< Attribute > operands, const 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 CalculationT = function_ref<ElementValueT(ElementValueT, ElementValueT)>>
Attribute mlir::constFoldBinaryOp (ArrayRef< Attribute > operands, const CalculationT &calculate)
 
template<class AttrElementT , class ElementValueT = typename AttrElementT::ValueType, class CalculationT = function_ref<Optional<ElementValueT>(ElementValueT)>>
Attribute mlir::constFoldUnaryOpConditional (ArrayRef< Attribute > operands, const 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 CalculationT = function_ref<ElementValueT(ElementValueT)>>
Attribute mlir::constFoldUnaryOp (ArrayRef< Attribute > operands, const CalculationT &&calculate)
 
template<class AttrElementT , class TargetAttrElementT , class ElementValueT = typename AttrElementT::ValueType, class TargetElementValueT = typename TargetAttrElementT::ValueType, class CalculationT = function_ref<TargetElementValueT(ElementValueT, bool)>>
Attribute mlir::constFoldCastOp (ArrayRef< Attribute > operands, Type resType, const CalculationT &calculate)