clang 22.0.0git
Functions
LoweringPrepare.cpp File Reference
#include "PassDetail.h"
#include "clang/AST/ASTContext.h"
#include "clang/Basic/TargetInfo.h"
#include "clang/CIR/Dialect/Builder/CIRBaseBuilder.h"
#include "clang/CIR/Dialect/IR/CIRDialect.h"
#include "clang/CIR/Dialect/IR/CIROpsEnums.h"
#include "clang/CIR/Dialect/Passes.h"
#include "clang/CIR/MissingFeatures.h"
#include <memory>

Go to the source code of this file.

Functions

static mlir::Value lowerScalarToComplexCast (mlir::MLIRContext &ctx, cir::CastOp op)
 
static mlir::Value lowerComplexToScalarCast (mlir::MLIRContext &ctx, cir::CastOp op, cir::CastKind elemToBoolKind)
 
static mlir::Value lowerComplexToComplexCast (mlir::MLIRContext &ctx, cir::CastOp op, cir::CastKind scalarCastKind)
 
static mlir::Value buildComplexBinOpLibCall (LoweringPreparePass &pass, CIRBaseBuilderTy &builder, llvm::StringRef(*libFuncNameGetter)(llvm::APFloat::Semantics), mlir::Location loc, cir::ComplexType ty, mlir::Value lhsReal, mlir::Value lhsImag, mlir::Value rhsReal, mlir::Value rhsImag)
 
static llvm::StringRef getComplexDivLibCallName (llvm::APFloat::Semantics semantics)
 
static mlir::Value buildAlgebraicComplexDiv (CIRBaseBuilderTy &builder, mlir::Location loc, mlir::Value lhsReal, mlir::Value lhsImag, mlir::Value rhsReal, mlir::Value rhsImag)
 
static mlir::Value buildRangeReductionComplexDiv (CIRBaseBuilderTy &builder, mlir::Location loc, mlir::Value lhsReal, mlir::Value lhsImag, mlir::Value rhsReal, mlir::Value rhsImag)
 
static mlir::Type higherPrecisionElementTypeForComplexArithmetic (mlir::MLIRContext &context, clang::ASTContext &cc, CIRBaseBuilderTy &builder, mlir::Type elementType)
 
static mlir::Value lowerComplexDiv (LoweringPreparePass &pass, CIRBaseBuilderTy &builder, mlir::Location loc, cir::ComplexDivOp op, mlir::Value lhsReal, mlir::Value lhsImag, mlir::Value rhsReal, mlir::Value rhsImag, mlir::MLIRContext &mlirCx, clang::ASTContext &cc)
 
static llvm::StringRef getComplexMulLibCallName (llvm::APFloat::Semantics semantics)
 
static mlir::Value lowerComplexMul (LoweringPreparePass &pass, CIRBaseBuilderTy &builder, mlir::Location loc, cir::ComplexMulOp op, mlir::Value lhsReal, mlir::Value lhsImag, mlir::Value rhsReal, mlir::Value rhsImag)
 
static void lowerArrayDtorCtorIntoLoop (cir::CIRBaseBuilderTy &builder, clang::ASTContext *astCtx, mlir::Operation *op, mlir::Type eltTy, mlir::Value arrayAddr, uint64_t arrayLen, bool isCtor)
 

Function Documentation

◆ buildAlgebraicComplexDiv()

static mlir::Value buildAlgebraicComplexDiv ( CIRBaseBuilderTy builder,
mlir::Location  loc,
mlir::Value  lhsReal,
mlir::Value  lhsImag,
mlir::Value  rhsReal,
mlir::Value  rhsImag 
)
static

◆ buildComplexBinOpLibCall()

static mlir::Value buildComplexBinOpLibCall ( LoweringPreparePass &  pass,
CIRBaseBuilderTy builder,
llvm::StringRef(*)(llvm::APFloat::Semantics)  libFuncNameGetter,
mlir::Location  loc,
cir::ComplexType  ty,
mlir::Value  lhsReal,
mlir::Value  lhsImag,
mlir::Value  rhsReal,
mlir::Value  rhsImag 
)
static

Definition at line 157 of file LoweringPrepare.cpp.

References cir::CIRBaseBuilderTy::createCallOp().

Referenced by lowerComplexDiv(), and lowerComplexMul().

◆ buildRangeReductionComplexDiv()

static mlir::Value buildRangeReductionComplexDiv ( CIRBaseBuilderTy builder,
mlir::Location  loc,
mlir::Value  lhsReal,
mlir::Value  lhsImag,
mlir::Value  rhsReal,
mlir::Value  rhsImag 
)
static

◆ getComplexDivLibCallName()

static llvm::StringRef getComplexDivLibCallName ( llvm::APFloat::Semantics  semantics)
static

Definition at line 186 of file LoweringPrepare.cpp.

Referenced by lowerComplexDiv().

◆ getComplexMulLibCallName()

static llvm::StringRef getComplexMulLibCallName ( llvm::APFloat::Semantics  semantics)
static

Definition at line 460 of file LoweringPrepare.cpp.

Referenced by lowerComplexMul().

◆ higherPrecisionElementTypeForComplexArithmetic()

static mlir::Type higherPrecisionElementTypeForComplexArithmetic ( mlir::MLIRContext &  context,
clang::ASTContext cc,
CIRBaseBuilderTy builder,
mlir::Type  elementType 
)
static

◆ lowerArrayDtorCtorIntoLoop()

static void lowerArrayDtorCtorIntoLoop ( cir::CIRBaseBuilderTy builder,
clang::ASTContext astCtx,
mlir::Operation *  op,
mlir::Type  eltTy,
mlir::Value  arrayAddr,
uint64_t  arrayLen,
bool  isCtor 
)
static

◆ lowerComplexDiv()

static mlir::Value lowerComplexDiv ( LoweringPreparePass &  pass,
CIRBaseBuilderTy builder,
mlir::Location  loc,
cir::ComplexDivOp  op,
mlir::Value  lhsReal,
mlir::Value  lhsImag,
mlir::Value  rhsReal,
mlir::Value  rhsImag,
mlir::MLIRContext &  mlirCx,
clang::ASTContext cc 
)
static

◆ lowerComplexMul()

static mlir::Value lowerComplexMul ( LoweringPreparePass &  pass,
CIRBaseBuilderTy builder,
mlir::Location  loc,
cir::ComplexMulOp  op,
mlir::Value  lhsReal,
mlir::Value  lhsImag,
mlir::Value  rhsReal,
mlir::Value  rhsImag 
)
static

◆ lowerComplexToComplexCast()

static mlir::Value lowerComplexToComplexCast ( mlir::MLIRContext &  ctx,
cir::CastOp  op,
cir::CastKind  scalarCastKind 
)
static

◆ lowerComplexToScalarCast()

static mlir::Value lowerComplexToScalarCast ( mlir::MLIRContext &  ctx,
cir::CastOp  op,
cir::CastKind  elemToBoolKind 
)
static

◆ lowerScalarToComplexCast()

static mlir::Value lowerScalarToComplexCast ( mlir::MLIRContext &  ctx,
cir::CastOp  op 
)
static