#include "CGOpenMPRuntime.h"
#include "CodeGenFunction.h"
#include "CodeGenModule.h"
#include "ConstantEmitter.h"
#include "clang/AST/StmtVisitor.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/MDBuilder.h"
#include "llvm/IR/Metadata.h"
#include <algorithm>
usingnamespaceclang;
usingnamespaceCodeGen;
namespace llvm {
extern cl::opt<bool> EnableSingleByteCoverage;
}
ComplexPairTy;
static const ComplexType *getComplexType(QualType type) { … }
namespace {
class ComplexExprEmitter
: public StmtVisitor<ComplexExprEmitter, ComplexPairTy> { … };
}
Address CodeGenFunction::emitAddrOfRealComponent(Address addr,
QualType complexType) { … }
Address CodeGenFunction::emitAddrOfImagComponent(Address addr,
QualType complexType) { … }
ComplexPairTy ComplexExprEmitter::EmitLoadOfLValue(LValue lvalue,
SourceLocation loc) { … }
void ComplexExprEmitter::EmitStoreOfComplex(ComplexPairTy Val, LValue lvalue,
bool isInit) { … }
ComplexPairTy ComplexExprEmitter::VisitExpr(Expr *E) { … }
ComplexPairTy ComplexExprEmitter::
VisitImaginaryLiteral(const ImaginaryLiteral *IL) { … }
ComplexPairTy ComplexExprEmitter::VisitCallExpr(const CallExpr *E) { … }
ComplexPairTy ComplexExprEmitter::VisitStmtExpr(const StmtExpr *E) { … }
ComplexPairTy ComplexExprEmitter::EmitComplexToComplexCast(ComplexPairTy Val,
QualType SrcType,
QualType DestType,
SourceLocation Loc) { … }
ComplexPairTy ComplexExprEmitter::EmitScalarToComplexCast(llvm::Value *Val,
QualType SrcType,
QualType DestType,
SourceLocation Loc) { … }
ComplexPairTy ComplexExprEmitter::EmitCast(CastKind CK, Expr *Op,
QualType DestTy) { … }
ComplexPairTy ComplexExprEmitter::VisitUnaryPlus(const UnaryOperator *E,
QualType PromotionType) { … }
ComplexPairTy ComplexExprEmitter::VisitPlus(const UnaryOperator *E,
QualType PromotionType) { … }
ComplexPairTy ComplexExprEmitter::VisitUnaryMinus(const UnaryOperator *E,
QualType PromotionType) { … }
ComplexPairTy ComplexExprEmitter::VisitMinus(const UnaryOperator *E,
QualType PromotionType) { … }
ComplexPairTy ComplexExprEmitter::VisitUnaryNot(const UnaryOperator *E) { … }
ComplexPairTy ComplexExprEmitter::EmitBinAdd(const BinOpInfo &Op) { … }
ComplexPairTy ComplexExprEmitter::EmitBinSub(const BinOpInfo &Op) { … }
ComplexPairTy ComplexExprEmitter::EmitComplexBinOpLibCall(StringRef LibCallName,
const BinOpInfo &Op) { … }
static StringRef getComplexMultiplyLibCallName(llvm::Type *Ty) { … }
ComplexPairTy ComplexExprEmitter::EmitBinMul(const BinOpInfo &Op) { … }
ComplexPairTy ComplexExprEmitter::EmitAlgebraicDiv(llvm::Value *LHSr,
llvm::Value *LHSi,
llvm::Value *RHSr,
llvm::Value *RHSi) { … }
static llvm::Value *EmitllvmFAbs(CodeGenFunction &CGF, llvm::Value *Value) { … }
ComplexPairTy ComplexExprEmitter::EmitRangeReductionDiv(llvm::Value *LHSr,
llvm::Value *LHSi,
llvm::Value *RHSr,
llvm::Value *RHSi) { … }
ComplexPairTy ComplexExprEmitter::EmitBinDiv(const BinOpInfo &Op) { … }
ComplexPairTy CodeGenFunction::EmitUnPromotedValue(ComplexPairTy result,
QualType UnPromotionType) { … }
ComplexPairTy CodeGenFunction::EmitPromotedValue(ComplexPairTy result,
QualType PromotionType) { … }
ComplexPairTy ComplexExprEmitter::EmitPromoted(const Expr *E,
QualType PromotionType) { … }
ComplexPairTy CodeGenFunction::EmitPromotedComplexExpr(const Expr *E,
QualType DstTy) { … }
ComplexPairTy
ComplexExprEmitter::EmitPromotedComplexOperand(const Expr *E,
QualType OverallPromotionType) { … }
ComplexExprEmitter::BinOpInfo
ComplexExprEmitter::EmitBinOps(const BinaryOperator *E,
QualType PromotionType) { … }
LValue ComplexExprEmitter::
EmitCompoundAssignLValue(const CompoundAssignOperator *E,
ComplexPairTy (ComplexExprEmitter::*Func)(const BinOpInfo&),
RValue &Val) { … }
ComplexPairTy ComplexExprEmitter::
EmitCompoundAssign(const CompoundAssignOperator *E,
ComplexPairTy (ComplexExprEmitter::*Func)(const BinOpInfo&)){ … }
LValue ComplexExprEmitter::EmitBinAssignLValue(const BinaryOperator *E,
ComplexPairTy &Val) { … }
ComplexPairTy ComplexExprEmitter::VisitBinAssign(const BinaryOperator *E) { … }
ComplexPairTy ComplexExprEmitter::VisitBinComma(const BinaryOperator *E) { … }
ComplexPairTy ComplexExprEmitter::
VisitAbstractConditionalOperator(const AbstractConditionalOperator *E) { … }
ComplexPairTy ComplexExprEmitter::VisitChooseExpr(ChooseExpr *E) { … }
ComplexPairTy ComplexExprEmitter::VisitInitListExpr(InitListExpr *E) { … }
ComplexPairTy ComplexExprEmitter::VisitVAArgExpr(VAArgExpr *E) { … }
ComplexPairTy CodeGenFunction::EmitComplexExpr(const Expr *E, bool IgnoreReal,
bool IgnoreImag) { … }
void CodeGenFunction::EmitComplexExprIntoLValue(const Expr *E, LValue dest,
bool isInit) { … }
void CodeGenFunction::EmitStoreOfComplex(ComplexPairTy V, LValue dest,
bool isInit) { … }
ComplexPairTy CodeGenFunction::EmitLoadOfComplex(LValue src,
SourceLocation loc) { … }
LValue CodeGenFunction::EmitComplexAssignmentLValue(const BinaryOperator *E) { … }
CompoundFunc;
static CompoundFunc getComplexOp(BinaryOperatorKind Op) { … }
LValue CodeGenFunction::
EmitComplexCompoundAssignmentLValue(const CompoundAssignOperator *E) { … }
LValue CodeGenFunction::
EmitScalarCompoundAssignWithComplex(const CompoundAssignOperator *E,
llvm::Value *&Result) { … }