Home | History | Annotate | Download | only in CodeGen

Lines Matching full:cgf

48   CodeGenFunction &CGF;
53 ComplexExprEmitter(CodeGenFunction &cgf, bool ir=false, bool ii=false)
54 : CGF(cgf), Builder(CGF.Builder), IgnoreReal(ir), IgnoreImag(ii) {
77 return EmitLoadOfLValue(CGF.EmitLValue(E), E->getExprLoc());
98 ApplyDebugLocation DL(CGF, E);
103 S->dump(CGF.getContext().getSourceManager());
119 if (CodeGenFunction::ConstantEmission result = CGF.tryEmitAsConstant(E)) {
121 return EmitLoadOfLValue(result.getReferenceLValue(CGF, E),
134 return CGF.EmitObjCMessageExpr(E).getComplexVal();
140 return EmitLoadOfLValue(CGF.getOpaqueLValueMapping(E), E->getExprLoc());
141 return CGF.getOpaqueRValueMapping(E).getComplexVal();
145 return CGF.EmitPseudoObjectRValue(E).getComplexVal();
158 CGF.CGM.EmitExplicitCastExprType(ECE, &CGF);
167 LValue LV = CGF.EmitLValue(E->getSubExpr());
168 return CGF.EmitComplexPrePostIncDec(E, LV, isInc, isPre);
198 CodeGenFunction::CXXDefaultInitExprScope Scope(CGF);
202 CGF.enterFullExpression(E);
203 CodeGenFunction::RunCleanupsScope Scope(CGF);
209 llvm::Constant *Null = llvm::Constant::getNullValue(CGF.ConvertType(Elem));
216 llvm::Constant::getNullValue(CGF.ConvertType(Elem));
294 return CGF.EmitAtomicExpr(E).getComplexVal();
322 return CGF.EmitAtomicLoad(lvalue, loc).getComplexVal();
330 Address RealP = CGF.emitAddrOfRealComponent(SrcPtr, lvalue.getType());
335 Address ImagP = CGF.emitAddrOfImagComponent(SrcPtr, lvalue.getType());
347 (!isInit && CGF.LValueIsSuitableForInlineAtomic(lvalue)))
348 return CGF.EmitAtomicStore(RValue::getComplex(Val), lvalue, isInit);
351 Address RealPtr = CGF.emitAddrOfRealComponent(Ptr, lvalue.getType());
352 Address ImagPtr = CGF.emitAddrOfImagComponent(Ptr, lvalue.getType());
365 CGF.ErrorUnsupported(E, "complex expression");
367 CGF.ConvertType(getComplexType(E->getType())->getElementType());
374 llvm::Value *Imag = CGF.EmitScalarExpr(IL->getSubExpr());
380 if (E->getCallReturnType(CGF.getContext())->isReferenceType())
383 return CGF.EmitCallExpr(E).getComplexVal();
387 CodeGenFunction::StmtExprEvaluation eval(CGF);
388 Address RetAlloca = CGF.EmitCompoundStmt(*E->getSubStmt(), true);
390 return EmitLoadOfLValue(CGF.MakeAddrLValue(RetAlloca, E->getType()),
406 Val.first = CGF.EmitScalarConversion(Val.first, SrcType, DestType, Loc);
407 Val.second = CGF.EmitScalarConversion(Val.second, SrcType, DestType, Loc);
417 Val = CGF.EmitScalarConversion(Val, SrcType, DestType, Loc);
438 LValue origLV = CGF.EmitLValue(Op);
440 V = Builder.CreateElementBitCast(V, CGF.ConvertType(DestTy));
441 return EmitLoadOfLValue(CGF.MakeAddrLValue(V, DestTy), Op->getExprLoc());
491 return EmitScalarToComplexCast(CGF.EmitScalarExpr(Op), Op->getType(),
597 QualType FQTy = CGF.getContext().getFunctionType(Op.Ty, ArgsQTys, EPI);
598 const CGFunctionInfo &FuncInfo = CGF.CGM.getTypes().arrangeFreeFunctionCall(
601 llvm::FunctionType *FTy = CGF.CGM.getTypes().GetFunctionType(FuncInfo);
602 llvm::Constant *Func = CGF.CGM.CreateBuiltinFunction(FTy, LibCallName);
605 RValue Res = CGF.EmitCall(FuncInfo, Func, ReturnValueSlot(), Args,
607 cast<llvm::CallInst>(Call)->setCallingConv(CGF.CGM.getBuiltinCC());
637 llvm::MDBuilder MDHelper(CGF.getLLVMContext());
672 llvm::BasicBlock *ContBB = CGF.createBasicBlock("complex_mul_cont");
673 llvm::BasicBlock *INaNBB = CGF.createBasicBlock("complex_mul_imag_nan");
683 CGF.EmitBlock(INaNBB);
685 llvm::BasicBlock *LibCallBB = CGF.createBasicBlock("complex_mul_libcall");
690 CGF.EmitBlock(LibCallBB);
698 CGF.EmitBlock(ContBB);
810 Ops.LHS = ComplexPairTy(CGF.EmitScalarExpr(E->getLHS()), nullptr);
814 Ops.RHS = ComplexPairTy(CGF.EmitScalarExpr(E->getRHS()), nullptr);
844 CGF.getContext()
846 OpInfo.RHS = ComplexPairTy(CGF.EmitScalarExpr(E->getRHS()), nullptr);
848 assert(CGF.getContext()
853 LValue LHS = CGF.EmitLValue(E->getLHS());
861 llvm::Value *LHSVal = CGF.EmitLoadOfScalar(LHS, Loc);
865 if (!CGF.getContext().hasSameUnqualifiedType(ComplexElementTy, LHSTy))
866 LHSVal = CGF.EmitScalarConversion(LHSVal, LHSTy, ComplexElementTy, Loc);
884 CGF.EmitComplexToScalarConversion(Result, OpInfo.Ty, LHSTy, Loc);
885 CGF.EmitStoreOfScalar(ResVal, LHS, /*isInit*/ false);
900 if (!CGF.getLangOpts().CPlusPlus)
912 assert(CGF.getContext().hasSameUnqualifiedType(E->getLHS()->getType(),
922 LValue LHS = CGF.EmitLValue(E->getLHS());
935 if (!CGF.getLangOpts().CPlusPlus)
946 CGF.EmitIgnoredExpr(E->getLHS());
954 llvm::BasicBlock *LHSBlock = CGF.createBasicBlock("cond.true");
955 llvm::BasicBlock *RHSBlock = CGF.createBasicBlock("cond.false");
956 llvm::BasicBlock *ContBlock = CGF.createBasicBlock("cond.end");
959 CodeGenFunction::OpaqueValueMapping binding(CGF, E);
962 CodeGenFunction::ConditionalEvaluation eval(CGF);
963 CGF.EmitBranchOnBoolExpr(E->getCond(), LHSBlock, RHSBlock,
964 CGF.getProfileCount(E));
966 eval.begin(CGF);
967 CGF.EmitBlock(LHSBlock);
968 CGF.incrementProfileCounter(E);
971 CGF.EmitBranch(ContBlock);
972 eval.end(CGF);
974 eval.begin(CGF);
975 CGF.EmitBlock(RHSBlock);
978 CGF.EmitBlock(ContBlock);
979 eval.end(CGF);
1007 llvm::Value *Real = CGF.EmitScalarExpr(E->getInit(0));
1008 llvm::Value *Imag = CGF.EmitScalarExpr(E->getInit(1));
1017 llvm::Type* LTy = CGF.ConvertType(Ty);
1024 Address ArgPtr = CGF.EmitVAArg(E, ArgValue);
1027 CGF.ErrorUnsupported(E, "complex va_arg expression");
1029 CGF.ConvertType(E->getType()->castAs<ComplexType>()->getElementType());
1034 return EmitLoadOfLValue(CGF.MakeAddrLValue(ArgPtr, E->getType()),