FLANG
Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
fir::CodeGenSpecifics Class Referenceabstract

#include <flang/Optimizer/CodeGen/Target.h>

Public Types

using Attributes = details::Attributes
 
using TypeAndAttr = std::tuple< mlir::Type, Attributes >
 
using Marshalling = std::vector< TypeAndAttr >
 

Public Member Functions

 CodeGenSpecifics (mlir::MLIRContext *ctx, llvm::Triple &&trp, KindMapping &&kindMap, llvm::StringRef targetCPU, mlir::LLVM::TargetFeaturesAttr targetFeatures, const mlir::DataLayout &dl)
 
 CodeGenSpecifics (mlir::MLIRContext *ctx, llvm::Triple &&trp, KindMapping &&kindMap, llvm::StringRef targetCPU, mlir::LLVM::TargetFeaturesAttr targetFeatures, const mlir::DataLayout &dl, llvm::StringRef tuneCPU)
 
virtual mlir::Type complexMemoryType (mlir::Type eleTy) const =0
 Type presentation of a complex<ele> type value in memory.
 
virtual Marshalling complexArgumentType (mlir::Location loc, mlir::Type eleTy) const =0
 
virtual Marshalling complexReturnType (mlir::Location loc, mlir::Type eleTy) const =0
 
virtual mlir::Type boxcharMemoryType (mlir::Type eleTy) const =0
 Type presentation of a boxchar<n> type value in memory.
 
virtual Marshalling structArgumentType (mlir::Location loc, fir::RecordType recTy, const Marshalling &previousArguments) const =0
 
virtual Marshalling structReturnType (mlir::Location loc, fir::RecordType eleTy) const =0
 
virtual Marshalling boxcharArgumentType (mlir::Type eleTy) const =0
 
virtual Marshalling integerArgumentType (mlir::Location loc, mlir::IntegerType argTy) const =0
 
virtual Marshalling integerReturnType (mlir::Location loc, mlir::IntegerType argTy) const =0
 
virtual unsigned char getCIntTypeWidth () const =0
 
llvm::StringRef getTargetCPU () const
 
llvm::StringRef getTuneCPU () const
 
mlir::LLVM::TargetFeaturesAttr getTargetFeatures () const
 
const mlir::DataLayout & getDataLayout () const
 

Static Public Member Functions

static std::unique_ptr< CodeGenSpecificsget (mlir::MLIRContext *ctx, llvm::Triple &&trp, KindMapping &&kindMap, llvm::StringRef targetCPU, mlir::LLVM::TargetFeaturesAttr targetFeatures, const mlir::DataLayout &dl)
 
static std::unique_ptr< CodeGenSpecificsget (mlir::MLIRContext *ctx, llvm::Triple &&trp, KindMapping &&kindMap, llvm::StringRef targetCPU, mlir::LLVM::TargetFeaturesAttr targetFeatures, const mlir::DataLayout &dl, llvm::StringRef tuneCPU)
 
static TypeAndAttr getTypeAndAttr (mlir::Type t)
 

Protected Attributes

mlir::MLIRContext & context
 
llvm::Triple triple
 
KindMapping kindMap
 
llvm::StringRef targetCPU
 
mlir::LLVM::TargetFeaturesAttr targetFeatures
 
const mlir::DataLayout * dataLayout = nullptr
 
llvm::StringRef tuneCPU
 

Detailed Description

Some details of how to represent certain features depend on the target and ABI that is being used. These specifics are captured here and guide the lowering of FIR to LLVM-IR dialect.

Member Function Documentation

◆ boxcharArgumentType()

virtual Marshalling fir::CodeGenSpecifics::boxcharArgumentType ( mlir::Type  eleTy) const
pure virtual

Type representation of a boxchar<n> type argument when passed by value. An argument value may need to be passed as a (safe) reference argument.

◆ complexArgumentType()

virtual Marshalling fir::CodeGenSpecifics::complexArgumentType ( mlir::Location  loc,
mlir::Type  eleTy 
) const
pure virtual

Type representation of a complex<eleTy> type argument when passed by value. An argument value may need to be passed as a (safe) reference argument.

◆ complexReturnType()

virtual Marshalling fir::CodeGenSpecifics::complexReturnType ( mlir::Location  loc,
mlir::Type  eleTy 
) const
pure virtual

Type representation of a complex<eleTy> type return value. Such a return value may need to be converted to a hidden reference argument.

◆ structArgumentType()

virtual Marshalling fir::CodeGenSpecifics::structArgumentType ( mlir::Location  loc,
fir::RecordType  recTy,
const Marshalling &  previousArguments 
) const
pure virtual

Type representation of a fir.type<T> type argument when passed by value. It may have to be split into several arguments, or be passed as a byval reference argument (on the stack).

◆ structReturnType()

virtual Marshalling fir::CodeGenSpecifics::structReturnType ( mlir::Location  loc,
fir::RecordType  eleTy 
) const
pure virtual

Type representation of a fir.type<T> type argument when returned by value. Such value may need to be converted to a hidden reference argument.


The documentation for this class was generated from the following files: