Lines Matching defs:CGF
61 CodeGenFunction &CGF;
67 ScalarExprEmitter(CodeGenFunction &cgf, bool ira=false)
68 : CGF(cgf), Builder(CGF.Builder), IgnoreResultAssign(ira),
69 VMContext(cgf.getLLVMContext()) {
82 llvm::Type *ConvertType(QualType T) { return CGF.ConvertType(T); }
83 LValue EmitLValue(const Expr *E) { return CGF.EmitLValue(E); }
85 return CGF.EmitCheckedLValue(E, TCK);
91 return CGF.EmitLoadOfLValue(LV).getScalarVal();
166 S->dump(CGF.getContext().getSourceManager());
206 llvm::Value *V = CGF.GetAddrOfLabel(E->getLabel());
215 return CGF.EmitPseudoObjectRValue(E).getScalarVal();
220 return EmitLoadOfLValue(CGF.getOpaqueLValueMapping(E));
223 return CGF.getOpaqueRValueMapping(E).getScalarVal();
228 if (CodeGenFunction::ConstantEmission result = CGF.tryEmitAsConstant(E)) {
230 return EmitLoadOfLValue(result.getReferenceLValue(CGF, E));
237 return CGF.EmitObjCSelectorExpr(E);
240 return CGF.EmitObjCProtocolExpr(E);
249 return CGF.EmitObjCMessageExpr(E).getScalarVal();
253 LValue LV = CGF.EmitObjCIsaExpr(E);
254 Value *V = CGF.EmitLoadOfLValue(LV).getScalarVal();
273 CGF.EmitVariablyModifiedType(E->getType());
282 return CGF.EmitCallExpr(E).getScalarVal();
316 return CGF.CGM.getMemberPointerConstant(E);
348 CodeGenFunction::CXXDefaultInitExprScope Scope(CGF);
352 return CGF.LoadCXXThis();
356 CGF.enterFullExpression(E);
357 CodeGenFunction::RunCleanupsScope Scope(CGF);
361 return CGF.EmitCXXNewExpr(E);
364 CGF.EmitCXXDeleteExpr(E);
389 CGF.EmitScalarExpr(E->getBase());
398 CGF.EmitCXXThrowExpr(E);
409 switch (CGF.getLangOpts().getSignedOverflowBehavior()) {
413 if (!CGF.SanOpts->SignedIntegerOverflow)
421 if (Ops.Ty->isUnsignedIntegerType() && CGF.SanOpts->UnsignedIntegerOverflow)
511 return CGF.EmitObjCStringLiteral(E);
514 return CGF.EmitObjCBoxedExpr(E);
517 return CGF.EmitObjCArrayLiteral(E);
520 return CGF.EmitObjCDictionaryLiteral(E);
540 return CGF.CGM.getCXXABI().EmitMemberPointerIsNotNull(CGF, Src, MPT);
570 APFloat::getLargest(CGF.getContext().getFloatTypeSemantics(DstType));
591 CGF.getContext().getFloatTypeSemantics(OrigSrcType);
596 unsigned Width = CGF.getContext().getIntWidth(DstType);
627 CGF.getContext().getFloatTypeSemantics(SrcType);
654 if (CGF.getContext().getFloatingTypeOrder(OrigSrcType, DstType) != 1)
661 CGF.getContext().getFloatTypeSemantics(DstType);
669 Value *AbsSrc = CGF.EmitNounwindRuntimeCall(
670 CGF.CGM.getIntrinsic(llvm::Intrinsic::fabs, Src->getType()), Src);
681 CGF.EmitCheckTypeDescriptor(OrigSrcType),
682 CGF.EmitCheckTypeDescriptor(DstType)
684 CGF.EmitCheck(Check, "float_cast_overflow", StaticArgs, OrigSrc,
692 SrcType = CGF.getContext().getCanonicalType(SrcType);
693 DstType = CGF.getContext().getCanonicalType(DstType);
703 if (SrcType->isHalfType() && !CGF.getContext().getLangOpts().NativeHalfType) {
704 Src = Builder.CreateCall(CGF.CGM.getIntrinsic(llvm::Intrinsic::convert_from_fp16), Src);
705 SrcType = CGF.getContext().FloatTy;
706 SrcTy = CGF.FloatTy;
730 llvm::Type *MiddleTy = CGF.IntPtrTy;
766 if (CGF.SanOpts->FloatCastOverflow &&
772 if (DstType->isHalfType() && !CGF.getContext().getLangOpts().NativeHalfType)
773 DstTy = CGF.FloatTy;
800 Res = Builder.CreateCall(CGF.CGM.getIntrinsic(llvm::Intrinsic::convert_to_fp16), Res);
831 return CGF.EmitFromMemory(CGF.CGM.EmitNullConstant(Ty), Ty);
846 StaticData.push_back(CGF.EmitCheckSourceLocation(Info.E->getExprLoc()));
850 StaticData.push_back(CGF.EmitCheckTypeDescriptor(UO->getType()));
858 CGF.EmitCheckTypeDescriptor(BO->getLHS()->getType()));
860 CGF.EmitCheckTypeDescriptor(BO->getRHS()->getType()));
864 StaticData.push_back(CGF.EmitCheckTypeDescriptor(Info.Ty));
873 StaticData.push_back(CGF.EmitCheckTypeDescriptor(Info.Ty));
879 CGF.EmitCheck(Check, CheckName, StaticData, DynamicData,
888 CGF.ErrorUnsupported(E, "scalar expression");
891 return llvm::UndefValue::get(CGF.ConvertType(E->getType()));
898 Value *LHS = CGF.EmitScalarExpr(E->getExpr(0));
899 Value *RHS = CGF.EmitScalarExpr(E->getExpr(1));
906 Mask = CGF.EmitScalarExpr(E->getExpr(2));
945 Indx = Builder.CreateZExt(Indx, CGF.Int32Ty, "idx_zext");
953 Value* V1 = CGF.EmitScalarExpr(E->getExpr(0));
954 Value* V2 = CGF.EmitScalarExpr(E->getExpr(1));
958 llvm::APSInt Idx = E->getShuffleMaskIdx(CGF.getContext(), i-2);
961 indices.push_back(llvm::UndefValue::get(CGF.Int32Ty));
971 if (E->EvaluateAsInt(Value, CGF.getContext(), Expr::SE_AllowSideEffects)) {
973 CGF.EmitScalarExpr(E->getBase());
998 if (CGF.SanOpts->Bounds)
999 CGF.EmitBoundsCheck(E, E->getBase(), Idx, IdxTy, /*Accessed*/true);
1002 Idx = Builder.CreateIntCast(Idx, CGF.Int32Ty, IdxSigned, "vecidxcast");
1021 CGF.ErrorUnsupported(E, "GNU array range designator extension");
1065 Args.resize(ResElts, llvm::UndefValue::get(CGF.Int32Ty));
1074 Args.push_back(getMaskElt(SVV, j, 0, CGF.Int32Ty));
1076 Args.resize(ResElts, llvm::UndefValue::get(CGF.Int32Ty));
1114 CGF.Int32Ty));
1120 Args.push_back(getMaskElt(SVI, j, Offset, CGF.Int32Ty));
1121 Args.resize(ResElts, llvm::UndefValue::get(CGF.Int32Ty));
1135 Args.resize(ResElts, llvm::UndefValue::get(CGF.Int32Ty));
1145 Args.resize(ResElts, llvm::UndefValue::get(CGF.Int32Ty));
1214 ConvertType(CGF.getContext().getPointerType(DestTy)));
1215 return EmitLoadOfLValue(CGF.MakeNaturalAlignAddrLValue(V, DestTy));
1239 if (CGF.SanitizePerformTypeCheck)
1240 CGF.EmitTypeCheck(CodeGenFunction::TCK_DowncastPointer, CE->getExprLoc(),
1243 return CGF.GetAddressOfDerivedClass(V, DerivedClassDecl,
1253 return CGF.GetAddressOfBaseClass(Visit(E), DerivedClassDecl,
1260 return CGF.EmitDynamicCast(V, DCE);
1281 return CGF.Builder.CreateBitCast(V, ConvertType(CE->getType()));
1298 return CGF.CGM.getCXXABI().EmitNullMemberPointer(MPT);
1312 return CGF.CGM.getCXXABI().EmitMemberPointerConversion(CGF, CE, Src);
1316 return CGF.EmitARCRetainScalarExpr(E);
1318 return CGF.EmitObjCConsumeObject(E->getType(), Visit(E));
1321 value = CGF.EmitARCRetainAutoreleasedReturnValue(value);
1322 return CGF.EmitObjCConsumeObject(E->getType(), value);
1325 return CGF.EmitARCExtendBlockObject(E);
1328 return CGF.EmitBlockCopyAndAutorelease(Visit(E), E->getType());
1341 assert(CGF.getContext().hasSameUnqualifiedType(E->getType(), DestTy));
1350 llvm::Type *MiddleTy = CGF.IntPtrTy;
1362 CGF.EmitIgnoredExpr(E);
1390 return CGF.CGM.getCXXABI().EmitMemberPointerIsNotNull(CGF, MemPtr, MPT);
1395 return CGF.EmitComplexExpr(E, false, true).first;
1399 CodeGenFunction::ComplexPairTy V = CGF.EmitComplexExpr(E);
1416 CodeGenFunction::StmtExprEvaluation eval(CGF);
1417 llvm::Value *RetAlloca = CGF.EmitCompoundStmt(*E->getSubStmt(),
1421 return CGF.EmitLoadOfScalar(CGF.MakeAddrLValue(RetAlloca, E->getType()));
1433 switch (CGF.getLangOpts().getSignedOverflowBehavior()) {
1437 if (!CGF.SanOpts->SignedIntegerOverflow)
1467 llvm::Value *True = CGF.EmitToMemory(Builder.getTrue(), type);
1485 CGF.SanOpts->UnsignedIntegerOverflow) &&
1486 CGF.getLangOpts().getSignedOverflowBehavior() !=
1492 llvm::Value *amt = CGF.EmitToMemory(
1502 llvm::BasicBlock *opBB = CGF.createBasicBlock("atomic_op", CGF.CurFn);
1503 value = CGF.EmitToMemory(value, type);
1532 CGF.IntTy->getBitWidth() &&
1536 CGF.IntTy->getBitWidth() && type->isUnsignedIntegerType() &&
1537 CGF.SanOpts->UnsignedIntegerOverflow) {
1555 = CGF.getContext().getAsVariableArrayType(type)) {
1556 llvm::Value *numElts = CGF.getVLASize(vla).first;
1558 if (CGF.getLangOpts().isSignedOverflowDefined())
1567 value = CGF.EmitCastToVoidPtr(value);
1568 if (CGF.getLangOpts().isSignedOverflowDefined())
1577 if (CGF.getLangOpts().isSignedOverflowDefined())
1601 if (type->isHalfType() && !CGF.getContext().getLangOpts().NativeHalfType) {
1604 Builder.CreateCall(CGF.CGM.getIntrinsic(llvm::Intrinsic::convert_from_fp16),
1617 F.convert(CGF.getTarget().getLongDoubleFormat(),
1623 if (type->isHalfType() && !CGF.getContext().getLangOpts().NativeHalfType)
1625 Builder.CreateCall(CGF.CGM.getIntrinsic(llvm::Intrinsic::convert_to_fp16),
1631 value = CGF.EmitCastToVoidPtr(value);
1633 CharUnits size = CGF.getContext().getTypeSizeInChars(OPT->getObjectType());
1636 llvm::ConstantInt::get(CGF.SizeTy, size.getQuantity());
1638 if (CGF.getLangOpts().isSignedOverflowDefined())
1647 llvm::BasicBlock *contBB = CGF.createBasicBlock("atomic_cont", CGF.CurFn);
1649 CGF.EmitToMemory(value, type), llvm::SequentiallyConsistent);
1659 CGF.EmitStoreThroughBitfieldLValue(RValue::get(value), LV, &value);
1661 CGF.EmitStoreThroughLValue(RValue::get(value), LV);
1707 Value *BoolVal = CGF.EvaluateExprAsBool(E->getSubExpr());
1721 if (E->EvaluateAsInt(Value, CGF.getContext()))
1736 llvm::Value* Idx = CGF.EmitScalarExpr(IdxExpr);
1742 CGF.getContext().getAsArrayType(CurrentType)->getElementType();
1746 CGF.getContext().getTypeSizeInChars(CurrentType).getQuantity());
1756 const ASTRecordLayout &RL = CGF.getContext().getASTRecordLayout(RD);
1771 CGF.getContext().getCharWidth();
1784 CGF.ErrorUnsupported(E, "virtual base in offsetof");
1789 const ASTRecordLayout &RL = CGF.getContext().getASTRecordLayout(RD);
1815 CGF.getContext().getAsVariableArrayType(TypeToSize)) {
1818 CGF.EmitVariablyModifiedType(TypeToSize);
1822 CGF.EmitIgnoredExpr(E->getArgumentExpr());
1827 llvm::tie(numElts, eltType) = CGF.getVLASize(VAT);
1832 CharUnits eltSize = CGF.getContext().getTypeSizeInChars(eltType);
1834 size = CGF.Builder.CreateNUWMul(CGF.CGM.getSize(eltSize), numElts);
1842 return Builder.getInt(E->EvaluateKnownConstInt(CGF.getContext()));
1852 return CGF.EmitLoadOfLValue(CGF.EmitLValue(E)).getScalarVal();
1855 return CGF.EmitComplexExpr(Op, false, true).first;
1868 return CGF.EmitLoadOfLValue(CGF.EmitLValue(E)).getScalarVal();
1871 return CGF.EmitComplexExpr(Op, true, false).second;
1877 CGF.EmitLValue(Op);
1879 CGF.EmitScalarExpr(Op, true);
1907 return CGF.EmitScalarCompooundAssignWithComplex(E, Result);
1924 CGF.SanOpts->UnsignedIntegerOverflow) &&
1925 CGF.getLangOpts().getSignedOverflowBehavior() !=
1954 llvm::Value *amt = CGF.EmitToMemory(EmitScalarConversion(OpInfo.RHS,
1964 llvm::BasicBlock *opBB = CGF.createBasicBlock("atomic_op", CGF.CurFn);
1966 OpInfo.LHS = CGF.EmitToMemory(OpInfo.LHS, type);
1987 llvm::BasicBlock *contBB = CGF.createBasicBlock("atomic_cont", CGF.CurFn);
1989 CGF.EmitToMemory(Result, LHSTy), llvm::SequentiallyConsistent);
2002 CGF.EmitStoreThroughBitfieldLValue(RValue::get(Result), LHSLV, &Result);
2004 CGF.EmitStoreThroughLValue(RValue::get(Result), LHSLV);
2020 if (!CGF.getLangOpts().CPlusPlus)
2035 if (CGF.SanOpts->IntegerDivideByZero)
2038 if (CGF.SanOpts->SignedIntegerOverflow &&
2057 if ((CGF.SanOpts->IntegerDivideByZero ||
2058 CGF.SanOpts->SignedIntegerOverflow) &&
2062 } else if (CGF.SanOpts->FloatDivideByZero &&
2070 if (CGF.getLangOpts().OpenCL) {
2076 CGF.SetFPAccuracy(Val, 2.5);
2088 if (CGF.SanOpts->IntegerDivideByZero) {
2132 llvm::Type *opTy = CGF.CGM.getTypes().ConvertType(Ops.Ty);
2134 llvm::Function *intrinsic = CGF.CGM.getIntrinsic(IID, opTy);
2142 &CGF.getLangOpts().OverflowHandler;
2146 if (!isSigned || CGF.SanOpts->SignedIntegerOverflow)
2149 CGF.EmitTrapCheck(Builder.CreateNot(overflow));
2156 llvm::BasicBlock *continueBB = CGF.createBasicBlock("nooverflow", CGF.CurFn,
2158 llvm::BasicBlock *overflowBB = CGF.createBasicBlock("overflow", CGF.CurFn);
2167 llvm::Type *Int8Ty = CGF.Int8Ty;
2168 llvm::Type *argTypes[] = { CGF.Int64Ty, CGF.Int64Ty, Int8Ty, Int8Ty };
2170 llvm::FunctionType::get(CGF.Int64Ty, argTypes, true);
2171 llvm::Value *handler = CGF.CGM.CreateRuntimeFunction(handlerTy, *handlerName);
2175 llvm::Value *lhs = Builder.CreateSExt(Ops.LHS, CGF.Int64Ty);
2176 llvm::Value *rhs = Builder.CreateSExt(Ops.RHS, CGF.Int64Ty);
2187 CGF.EmitNounwindRuntimeCall(handler, handlerArgs);
2202 static Value *emitPointerArithmetic(CodeGenFunction &CGF,
2221 if (width != CGF.PointerWidthInBits) {
2225 index = CGF.Builder.CreateIntCast(index, CGF.PtrDiffTy, isSigned,
2231 index = CGF.Builder.CreateNeg(index, "idx.neg");
2233 if (CGF.SanOpts->Bounds)
2234 CGF.EmitBoundsCheck(op.E, pointerOperand, index, indexOperand->getType(),
2244 = CGF.CGM.getSize(CGF.getContext().getTypeSizeInChars(objectType));
2246 index = CGF.Builder.CreateMul(index, objectSize);
2248 Value *result = CGF.Builder.CreateBitCast(pointer, CGF.VoidPtrTy);
2249 result = CGF.Builder.CreateGEP(result, index, "add.ptr");
2250 return CGF.Builder.CreateBitCast(result, pointer->getType());
2255 = CGF.getContext().getAsVariableArrayType(elementType)) {
2257 llvm::Value *numElements = CGF.getVLASize(vla).first;
2263 if (CGF.getLangOpts().isSignedOverflowDefined()) {
2264 index = CGF.Builder.CreateMul(index, numElements, "vla.index");
2265 pointer = CGF.Builder.CreateGEP(pointer, index, "add.ptr");
2267 index = CGF.Builder.CreateNSWMul(index, numElements, "vla.index");
2268 pointer = CGF.Builder.CreateInBoundsGEP(pointer, index, "add.ptr");
2277 Value *result = CGF.Builder.CreateBitCast(pointer, CGF.VoidPtrTy);
2278 result = CGF.Builder.CreateGEP(result, index, "add.ptr");
2279 return CGF.Builder.CreateBitCast(result, pointer->getType());
2282 if (CGF.getLangOpts().isSignedOverflowDefined())
2283 return CGF.Builder.CreateGEP(pointer, index, "add.ptr");
2285 return CGF.Builder.CreateInBoundsGEP(pointer, index, "add.ptr");
2294 const CodeGenFunction &CGF, CGBuilderTy &Builder,
2314 CGF.CGM.getIntrinsic(llvm::Intrinsic::fmuladd, Addend->getType()),
2328 const CodeGenFunction &CGF, CGBuilderTy &Builder,
2341 if (CGF.CGM.getCodeGenOpts().getFPContractMode() != CodeGenOptions::FPC_On)
2349 return buildFMulAdd(LHSBinOp, op.RHS, CGF, Builder, false, isSub);
2356 return buildFMulAdd(RHSBinOp, op.LHS, CGF, Builder, isSub, false);
2366 return emitPointerArithmetic(CGF, op, /*subtraction*/ false);
2369 switch (CGF.getLangOpts().getSignedOverflowBehavior()) {
2373 if (!CGF.SanOpts->SignedIntegerOverflow)
2381 if (op.Ty->isUnsignedIntegerType() && CGF.SanOpts->UnsignedIntegerOverflow)
2386 if (Value *FMulAdd = tryEmitFMulAdd(op, CGF, Builder))
2399 switch (CGF.getLangOpts().getSignedOverflowBehavior()) {
2403 if (!CGF.SanOpts->SignedIntegerOverflow)
2411 if (op.Ty->isUnsignedIntegerType() && CGF.SanOpts->UnsignedIntegerOverflow)
2416 if (Value *FMulAdd = tryEmitFMulAdd(op, CGF, Builder, true))
2427 return emitPointerArithmetic(CGF, op, /*subtraction*/ true);
2433 = Builder.CreatePtrToInt(op.LHS, CGF.PtrDiffTy, "sub.ptr.lhs.cast");
2435 = Builder.CreatePtrToInt(op.RHS, CGF.PtrDiffTy, "sub.ptr.rhs.cast");
2446 = CGF.getContext().getAsVariableArrayType(elementType)) {
2448 llvm::tie(numElements, elementType) = CGF.getVLASize(vla);
2453 CharUnits eltSize = CGF.getContext().getTypeSizeInChars(elementType);
2455 divisor = CGF.Builder.CreateNUWMul(CGF.CGM.getSize(eltSize), divisor);
2467 elementSize = CGF.getContext().getTypeSizeInChars(elementType);
2473 divisor = CGF.CGM.getSize(elementSize);
2498 if (CGF.SanOpts->Shift && !CGF.getLangOpts().OpenCL &&
2505 llvm::BasicBlock *Cont = CGF.createBasicBlock("cont");
2506 llvm::BasicBlock *CheckBitsShifted = CGF.createBasicBlock("check");
2511 CGF.EmitBlock(CheckBitsShifted);
2517 if (CGF.getLangOpts().CPlusPlus) {
2527 CGF.EmitBlock(Cont);
2537 if (CGF.getLangOpts().OpenCL)
2550 if (CGF.SanOpts->Shift && !CGF.getLangOpts().OpenCL &&
2555 if (CGF.getLangOpts().OpenCL)
2605 Value *LHS = CGF.EmitScalarExpr(E->getLHS());
2606 Value *RHS = CGF.EmitScalarExpr(E->getRHS());
2607 Result = CGF.CGM.getCXXABI().EmitMemberPointerComparison(
2608 CGF, LHS, RHS, MPT, E->getOpcode() == BO_NE);
2673 llvm::Function *F = CGF.CGM.getIntrinsic(ID);
2675 return EmitScalarConversion(Result, CGF.getContext().BoolTy, E->getType());
2697 CodeGenFunction::ComplexPairTy LHS = CGF.EmitComplexExpr(E->getLHS());
2698 CodeGenFunction::ComplexPairTy RHS = CGF.EmitComplexExpr(E->getRHS());
2726 return EmitScalarConversion(Result, CGF.getContext().BoolTy, E->getType());
2737 llvm::tie(LHS, RHS) = CGF.EmitARCStoreStrong(E, Ignore);
2741 llvm::tie(LHS,RHS) = CGF.EmitARCStoreAutoreleasing(E);
2747 RHS = CGF.EmitARCStoreWeak(LHS.getAddress(), RHS, Ignore);
2763 CGF.EmitStoreThroughBitfieldLValue(RValue::get(RHS), LHS, &RHS);
2765 CGF.EmitStoreThroughLValue(RValue::get(RHS), LHS);
2773 if (!CGF.getLangOpts().CPlusPlus)
2806 if (CGF.ConstantFoldsToSimpleInteger(E->getLHS(), LHSCondVal)) {
2808 Value *RHSCond = CGF.EvaluateExprAsBool(E->getRHS());
2814 if (!CGF.ContainsLabel(E->getRHS()))
2818 llvm::BasicBlock *ContBlock = CGF.createBasicBlock("land.end");
2819 llvm::BasicBlock *RHSBlock = CGF.createBasicBlock("land.rhs");
2821 CodeGenFunction::ConditionalEvaluation eval(CGF);
2824 CGF.EmitBranchOnBoolExpr(E->getLHS(), RHSBlock, ContBlock);
2835 eval.begin(CGF);
2836 CGF.EmitBlock(RHSBlock);
2837 Value *RHSCond = CGF.EvaluateExprAsBool(E->getRHS());
2838 eval.end(CGF);
2845 if (CGF.getDebugInfo())
2848 CGF.EmitBlock(ContBlock);
2877 if (CGF.ConstantFoldsToSimpleInteger(E->getLHS(), LHSCondVal)) {
2879 Value *RHSCond = CGF.EvaluateExprAsBool(E->getRHS());
2885 if (!CGF.ContainsLabel(E->getRHS()))
2889 llvm::BasicBlock *ContBlock = CGF.createBasicBlock("lor.end");
2890 llvm::BasicBlock *RHSBlock = CGF.createBasicBlock("lor.rhs");
2892 CodeGenFunction::ConditionalEvaluation eval(CGF);
2895 CGF.EmitBranchOnBoolExpr(E->getLHS(), ContBlock, RHSBlock);
2906 eval.begin(CGF);
2909 CGF.EmitBlock(RHSBlock);
2910 Value *RHSCond = CGF.EvaluateExprAsBool(E->getRHS());
2912 eval.end(CGF);
2919 CGF.EmitBlock(ContBlock);
2927 CGF.EmitIgnoredExpr(E->getLHS());
2928 CGF.EnsureInsertPoint();
2941 CodeGenFunction &CGF) {
2945 if (E->isEvaluatable(CGF.getContext()))
2952 if (VD->hasLocalStorage() && !(CGF.getContext()
2966 CodeGenFunction::OpaqueValueMapping binding(CGF, E);
2975 if (CGF.ConstantFoldsToSimpleInteger(condExpr, CondExprBool)) {
2980 if (!CGF.ContainsLabel(dead)) {
2987 Result = llvm::UndefValue::get(CGF.ConvertType(E->getType()));
2995 if (CGF.getLangOpts().OpenCL
2997 llvm::Value *CondV = CGF.EmitScalarExpr(condExpr);
3038 if (isCheapEnoughToEvaluateUnconditionally(lhsExpr, CGF) &&
3039 isCheapEnoughToEvaluateUnconditionally(rhsExpr, CGF)) {
3040 llvm::Value *CondV = CGF.EvaluateExprAsBool(condExpr);
3051 llvm::BasicBlock *LHSBlock = CGF.createBasicBlock("cond.true");
3052 llvm::BasicBlock *RHSBlock = CGF.createBasicBlock("cond.false");
3053 llvm::BasicBlock *ContBlock = CGF.createBasicBlock("cond.end");
3055 CodeGenFunction::ConditionalEvaluation eval(CGF);
3056 CGF.EmitBranchOnBoolExpr(condExpr, LHSBlock, RHSBlock);
3058 CGF.EmitBlock(LHSBlock);
3059 eval.begin(CGF);
3061 eval.end(CGF);
3066 CGF.EmitBlock(RHSBlock);
3067 eval.begin(CGF);
3069 eval.end(CGF);
3072 CGF.EmitBlock(ContBlock);
3092 llvm::Value *ArgValue = CGF.EmitVAListRef(VE->getSubExpr());
3093 llvm::Value *ArgPtr = CGF.EmitVAArg(ArgValue, VE->getType());
3104 return CGF.EmitBlockLiteral(block);
3108 Value *Src = CGF.EmitScalarExpr(E->getSrcExpr());
3145 Args.push_back(llvm::UndefValue::get(CGF.Int32Ty));
3157 return CGF.EmitAtomicExpr(E).getScalarVal();