Lines Matching refs:mlir
29 return [](mlir::MLIRContext *ctx) { in getTypeModel()
30 auto fltTy = mlir::FloatType::getF80(ctx); in getTypeModel()
31 auto intTy = mlir::IntegerType::get(ctx, 32); in getTypeModel()
32 return mlir::FunctionType::get(ctx, fltTy, intTy); in getTypeModel()
40 return [](mlir::MLIRContext *ctx) { in getTypeModel()
41 auto fltTy = mlir::FloatType::getF80(ctx); in getTypeModel()
42 auto intTy = mlir::IntegerType::get(ctx, 64); in getTypeModel()
43 return mlir::FunctionType::get(ctx, fltTy, intTy); in getTypeModel()
52 return [](mlir::MLIRContext *ctx) { in getTypeModel()
53 auto fltTy = mlir::FloatType::getF128(ctx); in getTypeModel()
54 auto intTy = mlir::IntegerType::get(ctx, 32); in getTypeModel()
55 return mlir::FunctionType::get(ctx, fltTy, intTy); in getTypeModel()
63 return [](mlir::MLIRContext *ctx) { in getTypeModel()
64 auto fltTy = mlir::FloatType::getF128(ctx); in getTypeModel()
65 auto intTy = mlir::IntegerType::get(ctx, 64); in getTypeModel()
66 return mlir::FunctionType::get(ctx, fltTy, intTy); in getTypeModel()
75 return [](mlir::MLIRContext *ctx) { in getTypeModel()
76 auto ty = mlir::FloatType::getF80(ctx); in getTypeModel()
77 return mlir::FunctionType::get(ctx, {ty}, {ty}); in getTypeModel()
86 return [](mlir::MLIRContext *ctx) { in getTypeModel()
87 auto ty = mlir::FloatType::getF128(ctx); in getTypeModel()
88 return mlir::FunctionType::get(ctx, {ty}, {ty}); in getTypeModel()
97 return [](mlir::MLIRContext *ctx) { in getTypeModel()
98 auto fltTy = mlir::FloatType::getF80(ctx); in getTypeModel()
99 auto boolTy = mlir::IntegerType::get(ctx, 1); in getTypeModel()
100 return mlir::FunctionType::get(ctx, {fltTy, boolTy}, {fltTy}); in getTypeModel()
109 return [](mlir::MLIRContext *ctx) { in getTypeModel()
110 auto fltTy = mlir::FloatType::getF128(ctx); in getTypeModel()
111 auto boolTy = mlir::IntegerType::get(ctx, 1); in getTypeModel()
112 return mlir::FunctionType::get(ctx, {fltTy, boolTy}, {fltTy}); in getTypeModel()
121 return [](mlir::MLIRContext *ctx) { in getTypeModel()
122 auto ty = mlir::FloatType::getF80(ctx); in getTypeModel()
123 return mlir::FunctionType::get(ctx, {ty}, {ty}); in getTypeModel()
132 return [](mlir::MLIRContext *ctx) { in getTypeModel()
133 auto ty = mlir::FloatType::getF128(ctx); in getTypeModel()
134 return mlir::FunctionType::get(ctx, {ty}, {ty}); in getTypeModel()
143 return [](mlir::MLIRContext *ctx) { in getTypeModel()
144 auto fltTy = mlir::FloatType::getF80(ctx); in getTypeModel()
145 auto intTy = mlir::IntegerType::get(ctx, 64); in getTypeModel()
146 return mlir::FunctionType::get(ctx, {fltTy, intTy}, {fltTy}); in getTypeModel()
155 return [](mlir::MLIRContext *ctx) { in getTypeModel()
156 auto fltTy = mlir::FloatType::getF128(ctx); in getTypeModel()
157 auto intTy = mlir::IntegerType::get(ctx, 64); in getTypeModel()
158 return mlir::FunctionType::get(ctx, {fltTy, intTy}, {fltTy}); in getTypeModel()
167 return [](mlir::MLIRContext *ctx) { in getTypeModel()
168 auto fltTy = mlir::FloatType::getF80(ctx); in getTypeModel()
169 auto intTy = mlir::IntegerType::get(ctx, 64); in getTypeModel()
170 return mlir::FunctionType::get(ctx, {fltTy, intTy}, {fltTy}); in getTypeModel()
179 return [](mlir::MLIRContext *ctx) { in getTypeModel()
180 auto fltTy = mlir::FloatType::getF128(ctx); in getTypeModel()
181 auto intTy = mlir::IntegerType::get(ctx, 64); in getTypeModel()
182 return mlir::FunctionType::get(ctx, {fltTy, intTy}, {fltTy}); in getTypeModel()
191 return [](mlir::MLIRContext *ctx) { in getTypeModel()
192 auto ty = mlir::FloatType::getF80(ctx); in getTypeModel()
193 return mlir::FunctionType::get(ctx, {ty}, {ty}); in getTypeModel()
202 return [](mlir::MLIRContext *ctx) { in getTypeModel()
203 auto ty = mlir::FloatType::getF128(ctx); in getTypeModel()
204 return mlir::FunctionType::get(ctx, {ty}, {ty}); in getTypeModel()
210 mlir::Value fir::runtime::genExponent(fir::FirOpBuilder &builder, in genExponent()
211 mlir::Location loc, mlir::Type resultType, in genExponent()
212 mlir::Value x) { in genExponent()
213 mlir::func::FuncOp func; in genExponent()
214 mlir::Type fltTy = x.getType(); in genExponent()
242 llvm::SmallVector<mlir::Value> args = { in genExponent()
249 mlir::Value fir::runtime::genFraction(fir::FirOpBuilder &builder, in genFraction()
250 mlir::Location loc, mlir::Value x) { in genFraction()
251 mlir::func::FuncOp func; in genFraction()
252 mlir::Type fltTy = x.getType(); in genFraction()
267 llvm::SmallVector<mlir::Value> args = { in genFraction()
274 mlir::Value fir::runtime::genNearest(fir::FirOpBuilder &builder, in genNearest()
275 mlir::Location loc, mlir::Value x, in genNearest()
276 mlir::Value s) { in genNearest()
277 mlir::func::FuncOp func; in genNearest()
278 mlir::Type fltTy = x.getType(); in genNearest()
295 mlir::Type sTy = s.getType(); in genNearest()
296 mlir::Value zero = builder.createRealZeroConstant(loc, sTy); in genNearest()
297 auto cmp = builder.create<mlir::arith::CmpFOp>( in genNearest()
298 loc, mlir::arith::CmpFPredicate::OGT, s, zero); in genNearest()
300 mlir::Type boolTy = mlir::IntegerType::get(builder.getContext(), 1); in genNearest()
301 mlir::Value False = builder.createIntegerConstant(loc, boolTy, 0); in genNearest()
302 mlir::Value True = builder.createIntegerConstant(loc, boolTy, 1); in genNearest()
304 mlir::Value positive = in genNearest()
305 builder.create<mlir::arith::SelectOp>(loc, cmp, True, False); in genNearest()
312 mlir::Value fir::runtime::genRRSpacing(fir::FirOpBuilder &builder, in genRRSpacing()
313 mlir::Location loc, mlir::Value x) { in genRRSpacing()
314 mlir::func::FuncOp func; in genRRSpacing()
315 mlir::Type fltTy = x.getType(); in genRRSpacing()
331 llvm::SmallVector<mlir::Value> args = { in genRRSpacing()
338 mlir::Value fir::runtime::genScale(fir::FirOpBuilder &builder, in genScale()
339 mlir::Location loc, mlir::Value x, in genScale()
340 mlir::Value i) { in genScale()
341 mlir::func::FuncOp func; in genScale()
342 mlir::Type fltTy = x.getType(); in genScale()
364 mlir::Value fir::runtime::genSelectedIntKind(fir::FirOpBuilder &builder, in genSelectedIntKind()
365 mlir::Location loc, in genSelectedIntKind()
366 mlir::Value x) { in genSelectedIntKind()
367 mlir::func::FuncOp func = in genSelectedIntKind()
375 mlir::Type eleTy = fir::unwrapRefType(x.getType()); in genSelectedIntKind()
376 mlir::Value xKind = builder.createIntegerConstant( in genSelectedIntKind()
385 mlir::Value fir::runtime::genSelectedRealKind(fir::FirOpBuilder &builder, in genSelectedRealKind()
386 mlir::Location loc, in genSelectedRealKind()
387 mlir::Value precision, in genSelectedRealKind()
388 mlir::Value range, in genSelectedRealKind()
389 mlir::Value radix) { in genSelectedRealKind()
390 mlir::func::FuncOp func = in genSelectedRealKind()
393 auto getArgKinds = [&](mlir::Value arg, int argKindIndex) -> mlir::Value { in genSelectedRealKind()
395 mlir::Type eleTy = fir::unwrapRefType(arg.getType()); in genSelectedRealKind()
406 mlir::Value pKind = getArgKinds(precision, 3); in genSelectedRealKind()
407 mlir::Value rKind = getArgKinds(range, 5); in genSelectedRealKind()
408 mlir::Value dKind = getArgKinds(radix, 7); in genSelectedRealKind()
417 mlir::Value fir::runtime::genSetExponent(fir::FirOpBuilder &builder, in genSetExponent()
418 mlir::Location loc, mlir::Value x, in genSetExponent()
419 mlir::Value i) { in genSetExponent()
420 mlir::func::FuncOp func; in genSetExponent()
421 mlir::Type fltTy = x.getType(); in genSetExponent()
443 mlir::Value fir::runtime::genSpacing(fir::FirOpBuilder &builder, in genSpacing()
444 mlir::Location loc, mlir::Value x) { in genSpacing()
445 mlir::func::FuncOp func; in genSpacing()
446 mlir::Type fltTy = x.getType(); in genSpacing()
462 llvm::SmallVector<mlir::Value> args = { in genSpacing()