|
| FirOpBuilder (mlir::Operation *op, fir::KindMapping kindMap, mlir::SymbolTable *symbolTable=nullptr) |
|
| FirOpBuilder (mlir::OpBuilder &builder, fir::KindMapping kindMap, mlir::SymbolTable *symbolTable=nullptr) |
|
| FirOpBuilder (mlir::OpBuilder &builder, mlir::ModuleOp mod) |
|
| FirOpBuilder (mlir::OpBuilder &builder, fir::KindMapping kindMap, mlir::Operation *op) |
|
| FirOpBuilder (mlir::OpBuilder &builder, mlir::Operation *op) |
|
| FirOpBuilder (const FirOpBuilder &other) |
|
| FirOpBuilder (FirOpBuilder &&other) |
|
mlir::Region & | getRegion () |
| Get the current Region of the insertion point.
|
|
mlir::ModuleOp | getModule () |
| Get the current Module.
|
|
mlir::func::FuncOp | getFunction () |
| Get the current Function.
|
|
const fir::KindMapping & | getKindMap () |
| Get a reference to the kind map.
|
|
mlir::SymbolTable * | getMLIRSymbolTable () |
| Get func.func/fir.global symbol table attached to this builder if any.
|
|
mlir::IntegerType | getDefaultIntegerType () |
| Get the default integer type.
|
|
mlir::Value | convertWithSemantics (mlir::Location loc, mlir::Type toTy, mlir::Value val, bool allowCharacterConversion=false, bool allowRebox=false) |
|
mlir::Block * | getEntryBlock () |
| Get the entry block of the current Function.
|
|
mlir::Block * | getAllocaBlock () |
| Get the block for adding Allocas.
|
|
mlir::Type | getRefType (mlir::Type eleTy) |
| Safely create a reference type to the type eleTy .
|
|
mlir::Type | getVarLenSeqTy (mlir::Type eleTy, unsigned rank=1) |
| Create a sequence of eleTy with rank dimensions of unknown size.
|
|
mlir::Type | getCharacterLengthType () |
| Get character length type.
|
|
mlir::Type | getIntPtrType () |
|
mlir::SymbolRefAttr | getSymbolRefAttr (llvm::StringRef str) |
| Wrap str to a SymbolRefAttr.
|
|
mlir::Type | getRealType (int kind) |
| Get the mlir float type that implements Fortran REAL(kind).
|
|
fir::BoxProcType | getBoxProcType (mlir::FunctionType funcTy) |
|
mlir::Value | createNullConstant (mlir::Location loc, mlir::Type ptrType={}) |
|
mlir::Value | createIntegerConstant (mlir::Location loc, mlir::Type integerType, std::int64_t i) |
|
mlir::Value | createAllOnesInteger (mlir::Location loc, mlir::Type integerType) |
|
mlir::Value | createMinusOneInteger (mlir::Location loc, mlir::Type integerType) |
|
mlir::Value | createRealConstant (mlir::Location loc, mlir::Type realType, llvm::APFloat::integerPart val) |
| Create a real constant from an integer value.
|
|
mlir::Value | createRealConstant (mlir::Location loc, mlir::Type realType, const llvm::APFloat &val) |
| Create a real constant from an APFloat value.
|
|
mlir::Value | createRealZeroConstant (mlir::Location loc, mlir::Type realType) |
| Create a real constant of type realType with a value zero.
|
|
mlir::Value | allocateLocal (mlir::Location loc, mlir::Type ty, llvm::StringRef uniqName, llvm::StringRef name, bool pinned, llvm::ArrayRef< mlir::Value > shape, llvm::ArrayRef< mlir::Value > lenParams, bool asTarget=false) |
|
mlir::Value | allocateLocal (mlir::Location loc, mlir::Type ty, llvm::StringRef uniqName, llvm::StringRef name, llvm::ArrayRef< mlir::Value > shape, llvm::ArrayRef< mlir::Value > lenParams, bool asTarget=false) |
|
mlir::ArrayAttr | create2DI64ArrayAttr (llvm::SmallVectorImpl< llvm::SmallVector< int64_t > > &intData) |
|
mlir::Value | createTemporaryAlloc (mlir::Location loc, mlir::Type type, llvm::StringRef name, mlir::ValueRange lenParams={}, mlir::ValueRange shape={}, llvm::ArrayRef< mlir::NamedAttribute > attrs={}, std::optional< Fortran::common::CUDADataAttr > cudaAttr=std::nullopt) |
|
mlir::Value | createTemporary (mlir::Location loc, mlir::Type type, llvm::StringRef name={}, mlir::ValueRange shape={}, mlir::ValueRange lenParams={}, llvm::ArrayRef< mlir::NamedAttribute > attrs={}, std::optional< Fortran::common::CUDADataAttr > cudaAttr=std::nullopt) |
|
mlir::Value | createTemporary (mlir::Location loc, mlir::Type type, mlir::ValueRange shape) |
| Create an unnamed and untracked temporary on the stack.
|
|
mlir::Value | createTemporary (mlir::Location loc, mlir::Type type, llvm::ArrayRef< mlir::NamedAttribute > attrs) |
|
mlir::Value | createTemporary (mlir::Location loc, mlir::Type type, llvm::StringRef name, llvm::ArrayRef< mlir::NamedAttribute > attrs) |
|
mlir::Value | createHeapTemporary (mlir::Location loc, mlir::Type type, llvm::StringRef name={}, mlir::ValueRange shape={}, mlir::ValueRange lenParams={}, llvm::ArrayRef< mlir::NamedAttribute > attrs={}) |
| Create a temporary on the heap.
|
|
mlir::Value | genStackSave (mlir::Location loc) |
|
void | genStackRestore (mlir::Location loc, mlir::Value stackPointer) |
|
fir::GlobalOp | createGlobal (mlir::Location loc, mlir::Type type, llvm::StringRef name, mlir::StringAttr linkage={}, mlir::Attribute value={}, bool isConst=false, bool isTarget=false, cuf::DataAttributeAttr dataAttr={}) |
| Create a global value.
|
|
fir::GlobalOp | createGlobal (mlir::Location loc, mlir::Type type, llvm::StringRef name, bool isConst, bool isTarget, std::function< void(FirOpBuilder &)> bodyBuilder, mlir::StringAttr linkage={}, cuf::DataAttributeAttr dataAttr={}) |
|
fir::GlobalOp | createGlobalConstant (mlir::Location loc, mlir::Type type, llvm::StringRef name, mlir::StringAttr linkage={}, mlir::Attribute value={}) |
| Create a global constant (read-only) value.
|
|
fir::GlobalOp | createGlobalConstant (mlir::Location loc, mlir::Type type, llvm::StringRef name, std::function< void(FirOpBuilder &)> bodyBuilder, mlir::StringAttr linkage={}) |
|
fir::StringLitOp | createStringLitOp (mlir::Location loc, llvm::StringRef string) |
| Convert a StringRef string into a fir::StringLitOp.
|
|
std::pair< fir::TypeInfoOp, mlir::OpBuilder::InsertPoint > | createTypeInfoOp (mlir::Location loc, fir::RecordType recordType, fir::RecordType parentType) |
|
mlir::StringAttr | createCommonLinkage () |
|
mlir::StringAttr | createInternalLinkage () |
|
mlir::StringAttr | createLinkOnceLinkage () |
|
mlir::StringAttr | createLinkOnceODRLinkage () |
|
mlir::StringAttr | createWeakLinkage () |
|
mlir::func::FuncOp | getNamedFunction (llvm::StringRef name) |
|
mlir::func::FuncOp | getNamedFunction (mlir::SymbolRefAttr symbol) |
|
fir::GlobalOp | getNamedGlobal (llvm::StringRef name) |
|
mlir::Value | createConvert (mlir::Location loc, mlir::Type toTy, mlir::Value val) |
| Lazy creation of fir.convert op.
|
|
void | createStoreWithConvert (mlir::Location loc, mlir::Value val, mlir::Value addr) |
|
mlir::Value | loadIfRef (mlir::Location loc, mlir::Value val) |
|
mlir::func::FuncOp | createFunction (mlir::Location loc, llvm::StringRef name, mlir::FunctionType ty) |
|
mlir::Value | convertToIndexType (mlir::Location loc, mlir::Value val) |
| Cast the input value to IndexType.
|
|
mlir::Value | genShape (mlir::Location loc, const fir::AbstractArrayBox &arr) |
| Construct one of the two forms of shape op from an array box.
|
|
mlir::Value | genShape (mlir::Location loc, llvm::ArrayRef< mlir::Value > shift, llvm::ArrayRef< mlir::Value > exts) |
|
mlir::Value | genShape (mlir::Location loc, llvm::ArrayRef< mlir::Value > exts) |
|
mlir::Value | genShift (mlir::Location loc, llvm::ArrayRef< mlir::Value > shift) |
|
mlir::Value | createShape (mlir::Location loc, const fir::ExtendedValue &exv) |
|
mlir::Value | createSlice (mlir::Location loc, const fir::ExtendedValue &exv, mlir::ValueRange triples, mlir::ValueRange path) |
|
mlir::Value | createBox (mlir::Location loc, const fir::ExtendedValue &exv, bool isPolymorphic=false, bool isAssumedType=false) |
|
mlir::Value | createBox (mlir::Location loc, mlir::Type boxType, mlir::Value addr, mlir::Value shape, mlir::Value slice, llvm::ArrayRef< mlir::Value > lengths, mlir::Value tdesc) |
|
mlir::Value | createBool (mlir::Location loc, bool b) |
| Create constant i1 with value 1. if b is true or 0. otherwise.
|
|
IfBuilder | genIfOp (mlir::Location loc, mlir::TypeRange results, mlir::Value cdt, bool withElseRegion) |
|
IfBuilder | genIfThen (mlir::Location loc, mlir::Value cdt) |
|
IfBuilder | genIfThenElse (mlir::Location loc, mlir::Value cdt) |
|
mlir::Value | genNot (mlir::Location loc, mlir::Value boolean) |
|
mlir::Value | genIsNotNullAddr (mlir::Location loc, mlir::Value addr) |
| Generate code testing addr is not a null address.
|
|
mlir::Value | genIsNullAddr (mlir::Location loc, mlir::Value addr) |
| Generate code testing addr is a null address.
|
|
mlir::Value | genExtentFromTriplet (mlir::Location loc, mlir::Value lb, mlir::Value ub, mlir::Value step, mlir::Type type) |
|
mlir::Value | genAbsentOp (mlir::Location loc, mlir::Type argTy) |
|
void | setFastMathFlags (mlir::arith::FastMathFlags flags) |
|
void | setFastMathFlags (Fortran::common::MathOptionsBase options) |
|
mlir::arith::FastMathFlags | getFastMathFlags () const |
| Get current FastMathFlags value.
|
|
std::string | getFastMathFlagsString () |
|
void | setIntegerOverflowFlags (mlir::arith::IntegerOverflowFlags flags) |
|
mlir::arith::IntegerOverflowFlags | getIntegerOverflowFlags () const |
| Get current IntegerOverflowFlags value.
|
|
LLVM_DUMP_METHOD void | dumpFunc () |
| Dump the current function. (debug)
|
|
void | notifyOperationInserted (mlir::Operation *op, mlir::OpBuilder::InsertPoint previous) override |
| FirOpBuilder hook for creating new operation.
|
|
mlir::DataLayout & | getDataLayout () |
| Construct a data layout on demand and return it.
|
|
template<typename OpTy > |
mlir::Value | createUnsigned (mlir::Location loc, mlir::Type resultType, mlir::Value left, mlir::Value right) |
|