Go to the source code of this file.
|
| namespace | mlir |
| | Include the generated interface declarations.
|
|
| 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) |
◆ GEN_PASS_DEF_ARITHTOLLVMCONVERSIONPASS
| #define GEN_PASS_DEF_ARITHTOLLVMCONVERSIONPASS |
◆ convertCmpPredicate()
template<typename LLVMPredType, typename PredType>
| LLVMPredType convertCmpPredicate |
( |
PredType | pred | ) |
|
|
static |
◆ 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.
References mlir::LLVM::getConstantElementType().