MLIR 23.0.0git
ArithToAPFloat.cpp File Reference

Go to the source code of this file.

Classes

struct  BinaryArithOpToAPFloatConversion< OpTy >
 Rewrite a binary arithmetic operation to an APFloat function call. More...
struct  FpToFpConversion< OpTy >
struct  FpToIntConversion< OpTy >
struct  IntToFpConversion< OpTy >
struct  CmpFOpToAPFloatConversion
struct  NegFOpToAPFloatConversion

Namespaces

namespace  mlir
 Include the generated interface declarations.

Macros

#define GEN_PASS_DEF_ARITHTOAPFLOATCONVERSIONPASS

Functions

static FailureOr< FuncOp > lookupOrCreateBinaryFn (OpBuilder &b, SymbolOpInterface symTable, StringRef name, SymbolTableCollection *symbolTables=nullptr)
 Helper function to look up or create the symbol for a runtime library function for a binary arithmetic operation.

Macro Definition Documentation

◆ GEN_PASS_DEF_ARITHTOAPFLOATCONVERSIONPASS

#define GEN_PASS_DEF_ARITHTOAPFLOATCONVERSIONPASS

Definition at line 22 of file ArithToAPFloat.cpp.

Function Documentation

◆ lookupOrCreateBinaryFn()

FailureOr< FuncOp > lookupOrCreateBinaryFn ( OpBuilder & b,
SymbolOpInterface symTable,
StringRef name,
SymbolTableCollection * symbolTables = nullptr )
static

Helper function to look up or create the symbol for a runtime library function for a binary arithmetic operation.

Parameter 1: APFloat semantics Parameter 2: Left-hand side operand Parameter 3: Right-hand side operand

This function will return a failure if the function is found but has an unexpected signature.

Definition at line 40 of file ArithToAPFloat.cpp.

References b, and mlir::func::lookupOrCreateFnDecl().

Referenced by BinaryArithOpToAPFloatConversion< OpTy >::matchAndRewrite().