FLANG
Public Types | Public Member Functions | Protected Member Functions | List of all members
fir::factory::Complex Class Reference

Helper to facilitate lowering of COMPLEX manipulations in FIR. More...

#include <flang/Optimizer/Builder/Complex.h>

Public Types

enum class  Part { Real = 0 , Imag = 1 }
 

Public Member Functions

 Complex (FirOpBuilder &builder, mlir::Location loc)
 
 Complex (const Complex &)=delete
 
mlir::Type getComplexPartType (mlir::Value cplx) const
 Get the Complex Type. Determine the type. Do not create MLIR operations.
 
mlir::Type getComplexPartType (mlir::Type complexType) const
 
mlir::Value createComplex (mlir::Type complexType, mlir::Value real, mlir::Value imag)
 Create a complex value.
 
mlir::Value createComplex (mlir::Value real, mlir::Value imag)
 
mlir::Value extractComplexPart (mlir::Value cplx, bool isImagPart)
 Returns the Real/Imag part of cplx.
 
std::pair< mlir::Value, mlir::Value > extractParts (mlir::Value cplx)
 Returns (Real, Imag) pair of cplx.
 
mlir::Value insertComplexPart (mlir::Value cplx, mlir::Value part, bool isImagPart)
 

Protected Member Functions

template<Part partId>
mlir::Value extract (mlir::Value cplx)
 
template<Part partId>
mlir::Value insert (mlir::Value cplx, mlir::Value part)
 
template<Part partId>
mlir::Value createPartId ()
 

Detailed Description

Helper to facilitate lowering of COMPLEX manipulations in FIR.

Member Function Documentation

◆ createComplex()

mlir::Value fir::factory::Complex::createComplex ( mlir::Value  real,
mlir::Value  imag 
)

Create a complex value given the real and imag parts real type (which must be the same).


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