9 #ifndef MLIR_CONVERSION_ARITHCOMMON_ATTRTOLLVMCONVERTER_H
10 #define MLIR_CONVERSION_ARITHCOMMON_ATTRTOLLVMCONVERTER_H
26 LLVM::FastmathFlagsAttr
32 template <
typename SourceOp,
typename TargetOp>
39 llvm::StringRef arithFMFAttrName = SourceOp::getFastMathAttrName();
41 auto arithFMFAttr = dyn_cast_or_null<arith::FastMathFlagsAttr>(
42 convertedAttr.
erase(arithFMFAttrName));
44 llvm::StringRef targetAttrName = TargetOp::getFastmathAttrName();
45 convertedAttr.
set(targetAttrName,
NamedAttrList is array of NamedAttributes that tracks whether it is sorted and does some basic work t...
ArrayRef< NamedAttribute > getAttrs() const
Return all of the attributes on this operation.
Attribute erase(StringAttr name)
Erase the attribute with the given name from the list.
Attribute set(StringAttr name, Attribute value)
If the an attribute exists with the specified name, change it to the new value.
ArrayRef< NamedAttribute > getAttrs() const
AttrConvertFastMathToLLVM(SourceOp srcOp)
LLVM::FastmathFlagsAttr convertArithFastMathAttrToLLVM(arith::FastMathFlagsAttr fmfAttr)
LLVM::FastmathFlags convertArithFastMathFlagsToLLVM(arith::FastMathFlags arithFMF)
Include the generated interface declarations.