• Home
  • Raw
  • Download

Lines Matching refs:mlir

18 mlir::FuncOp Fortran::lower::FirOpBuilder::createFunction(  in createFunction()
19 mlir::Location loc, mlir::ModuleOp module, llvm::StringRef name, in createFunction()
20 mlir::FunctionType ty) { in createFunction()
24 mlir::FuncOp
25 Fortran::lower::FirOpBuilder::getNamedFunction(mlir::ModuleOp modOp, in getNamedFunction()
27 return modOp.lookupSymbol<mlir::FuncOp>(name); in getNamedFunction()
31 Fortran::lower::FirOpBuilder::getNamedGlobal(mlir::ModuleOp modOp, in getNamedGlobal()
36 mlir::Type Fortran::lower::FirOpBuilder::getRefType(mlir::Type eleTy) { in getRefType()
41 mlir::Value
42 Fortran::lower::FirOpBuilder::createNullConstant(mlir::Location loc) { in createNullConstant()
49 mlir::Value Fortran::lower::FirOpBuilder::createIntegerConstant( in createIntegerConstant()
50 mlir::Location loc, mlir::Type ty, std::int64_t cst) { in createIntegerConstant()
51 return create<mlir::ConstantOp>(loc, ty, getIntegerAttr(ty, cst)); in createIntegerConstant()
54 mlir::Value Fortran::lower::FirOpBuilder::createRealConstant( in createRealConstant()
55 mlir::Location loc, mlir::Type realType, const llvm::APFloat &val) { in createRealConstant()
56 return create<mlir::ConstantOp>(loc, realType, getFloatAttr(realType, val)); in createRealConstant()
59 mlir::Value
60 Fortran::lower::FirOpBuilder::createRealZeroConstant(mlir::Location loc, in createRealZeroConstant()
61 mlir::Type realType) { in createRealZeroConstant()
62 mlir::Attribute attr; in createRealZeroConstant()
70 return create<mlir::ConstantOp>(loc, realType, attr); in createRealZeroConstant()
73 mlir::Value Fortran::lower::FirOpBuilder::allocateLocal( in allocateLocal()
74 mlir::Location loc, mlir::Type ty, llvm::StringRef nm, in allocateLocal()
75 llvm::ArrayRef<mlir::Value> shape, bool asTarget) { in allocateLocal()
76 llvm::SmallVector<mlir::Value, 8> indices; in allocateLocal()
78 llvm::for_each(shape, [&](mlir::Value sh) { in allocateLocal()
81 llvm::SmallVector<mlir::NamedAttribute, 2> attrs; in allocateLocal()
83 attrs.emplace_back(mlir::Identifier::get("target", getContext()), in allocateLocal()
90 mlir::Value Fortran::lower::FirOpBuilder::createTemporary( in createTemporary()
91 mlir::Location loc, mlir::Type type, llvm::StringRef name, in createTemporary()
92 llvm::ArrayRef<mlir::Value> shape) { in createTemporary()
107 mlir::Location loc, mlir::Type type, llvm::StringRef name, in createGlobal()
108 mlir::StringAttr linkage, mlir::Attribute value, bool isConst) { in createGlobal()
120 mlir::Location loc, mlir::Type type, llvm::StringRef name, bool isConst, in createGlobal()
121 std::function<void(FirOpBuilder &)> bodyBuilder, mlir::StringAttr linkage) { in createGlobal()
127 auto glob = create<fir::GlobalOp>(loc, name, isConst, type, mlir::Attribute{}, in createGlobal()
130 region.push_back(new mlir::Block); in createGlobal()
138 mlir::Value Fortran::lower::FirOpBuilder::convertWithSemantics( in convertWithSemantics()
139 mlir::Location loc, mlir::Type toTy, mlir::Value val) { in convertWithSemantics()
166 mlir::Value Fortran::lower::FirOpBuilder::createConvert(mlir::Location loc, in createConvert()
167 mlir::Type toTy, in createConvert()
168 mlir::Value val) { in createConvert()
175 mlir::Location loc, mlir::Type eleTy, llvm::StringRef data) { in createStringLit()
176 auto strAttr = mlir::StringAttr::get(data, getContext()); in createStringLit()
177 auto valTag = mlir::Identifier::get(fir::StringLitOp::value(), getContext()); in createStringLit()
178 mlir::NamedAttribute dataAttr(valTag, strAttr); in createStringLit()
179 auto sizeTag = mlir::Identifier::get(fir::StringLitOp::size(), getContext()); in createStringLit()
180 mlir::NamedAttribute sizeAttr(sizeTag, getI64IntegerAttr(data.size())); in createStringLit()
181 llvm::SmallVector<mlir::NamedAttribute, 2> attrs{dataAttr, sizeAttr}; in createStringLit()
184 return create<fir::StringLitOp>(loc, llvm::ArrayRef<mlir::Type>{arrTy}, in createStringLit()