MLIR 24.0.0git
ArithToLLVM.cpp File Reference

Go to the source code of this file.

Classes

class  mlir::impl::ArithToLLVMConversionPassBase< DerivedT >

Namespaces

namespace  mlir
 Include the generated interface declarations.
namespace  mlir::impl
 Attribute collections provide a dictionary-like interface.

Macros

#define GEN_PASS_DEF_ARITHTOLLVMCONVERSIONPASS

Functions

std::unique_ptr<::mlir::Passmlir::impl::createArithToLLVMConversionPass ()
std::unique_ptr<::mlir::Passmlir::impl::createArithToLLVMConversionPass (ArithToLLVMConversionPassOptions options)
std::unique_ptr<::mlir::Passmlir::createArithToLLVMConversionPass ()
std::unique_ptr<::mlir::Passmlir::createArithToLLVMConversionPass (ArithToLLVMConversionPassOptions options)
static TypedAttr convertConstantValue (TypedAttr attr, Type resultType)
 Retypes attr for a llvm.mlir.constant of resultType.
template<typename LLVMPredType, typename PredType>
static LLVMPredType convertCmpPredicate (PredType pred)

Macro Definition Documentation

◆ GEN_PASS_DEF_ARITHTOLLVMCONVERSIONPASS

#define GEN_PASS_DEF_ARITHTOLLVMCONVERSIONPASS

Definition at line 25 of file ArithToLLVM.cpp.

Function Documentation

◆ convertCmpPredicate()

template<typename LLVMPredType, typename PredType>
LLVMPredType convertCmpPredicate ( PredType pred)
static

Definition at line 689 of file ArithToLLVM.cpp.

◆ convertConstantValue()

TypedAttr convertConstantValue ( TypedAttr attr,
Type resultType )
static

Retypes attr for a llvm.mlir.constant of resultType.

arith.constant requires the value attribute and the result to have the same type, but the type converter may map the element type to a different one, e.g. index to i32 or i64 depending on the configured index bitwidth. Build the attribute from the converted type so that the two agree wherever that is representable. Returns a null attribute if attr cannot be used for resultType.

Definition at line 383 of file ArithToLLVM.cpp.