Lines Matching defs:lvalue
247 // FIXME: This function should take an LValue as an argument.
265 LValue LV = MakeAddrLValue(Location, E->getType());
441 LValue CodeGenFunction::
472 LValue RefTempDst = MakeAddrLValue(Object, M->getType(),
595 LValue LV = MakeAddrLValue(Object, E->getType(), AlignmentSource::Decl);
598 "materialized temporary field is not a simple lvalue");
617 // Emit the expression as an lvalue.
618 LValue LV = EmitLValue(E);
1021 EmitComplexPrePostIncDec(const UnaryOperator *E, LValue LV,
1045 // Store the updated result through the lvalue.
1067 // LValue Expression Emission
1164 LValue LV = EmitLValue(UO->getSubExpr());
1218 LValue CodeGenFunction::EmitUnsupportedLValue(const Expr *E,
1249 LValue CodeGenFunction::EmitCheckedLValue(const Expr *E, TypeCheckKind TCK) {
1250 LValue LV;
1274 /// In either case, the LLVM Value* in the LValue structure is guaranteed to be
1280 /// If this returns a normal address, and if the lvalue's C type is fixed size,
1282 /// type of the same size of the lvalue's type. If the lvalue has a variable
1285 LValue CodeGenFunction::EmitLValue(const Expr *E) {
1354 LValue LV = EmitLValue(cleanups->getSubExpr());
1360 return LValue::MakeAddr(Address(V, LV.getAlignment()), LV.getType(),
1364 // bitfield lvalue or some other non-simple lvalue?
1598 llvm::Value *CodeGenFunction::EmitLoadOfScalar(LValue lvalue,
1600 return EmitLoadOfScalar(lvalue.getAddress(*this), lvalue.isVolatile(),
1601 lvalue.getType(), Loc, lvalue.getBaseInfo(),
1602 lvalue.getTBAAInfo(), lvalue.isNontemporal());
1739 LValue AtomicLValue =
1740 LValue::MakeAddr(Addr, Ty, getContext(), BaseInfo, TBAAInfo);
1814 // Emit a store of a matrix LValue. This may require casting the original
1817 static void EmitStoreOfMatrixScalar(llvm::Value *value, LValue lvalue,
1819 Address Addr = MaybeConvertMatrixAddress(lvalue.getAddress(CGF), CGF,
1821 CGF.EmitStoreOfScalar(value, Addr, lvalue.isVolatile(), lvalue.getType(),
1822 lvalue.getBaseInfo(), lvalue.getTBAAInfo(), isInit,
1823 lvalue.isNontemporal());
1851 LValue AtomicLValue =
1852 LValue::MakeAddr(Addr, Ty, getContext(), BaseInfo, TBAAInfo);
1870 void CodeGenFunction::EmitStoreOfScalar(llvm::Value *value, LValue lvalue,
1872 if (lvalue.getType()->isConstantMatrixType()) {
1873 EmitStoreOfMatrixScalar(value, lvalue, isInit, *this);
1877 EmitStoreOfScalar(value, lvalue.getAddress(*this), lvalue.isVolatile(),
1878 lvalue.getType(), lvalue.getBaseInfo(),
1879 lvalue.getTBAAInfo(), isInit, lvalue.isNontemporal());
1882 // Emit a load of a LValue of matrix type. This may require casting the pointer
1884 static RValue EmitLoadOfMatrixLValue(LValue LV, SourceLocation Loc,
1892 /// EmitLoadOfLValue - Given an expression that represents a value lvalue, this
1893 /// method emits the address of the lvalue, then loads the result as an rvalue,
1895 RValue CodeGenFunction::EmitLoadOfLValue(LValue LV, SourceLocation Loc) {
1948 assert(LV.isBitField() && "Unknown LValue type!");
1952 RValue CodeGenFunction::EmitLoadOfBitfieldLValue(LValue LV,
1989 RValue CodeGenFunction::EmitLoadOfExtVectorElementLValue(LValue LV) {
2015 /// Generates lvalue for partial ext_vector access.
2016 Address CodeGenFunction::EmitExtVectorElementLValue(LValue LV) {
2036 RValue CodeGenFunction::EmitLoadOfGlobalRegLValue(LValue LV) {
2058 /// lvalue, where both are guaranteed to the have the same type, and that type
2060 void CodeGenFunction::EmitStoreThroughLValue(RValue Src, LValue Dst,
2091 assert(Dst.isBitField() && "Unknown LValue type");
2167 void CodeGenFunction::EmitStoreThroughBitfieldLValue(RValue Src, LValue Dst,
2246 LValue Dst) {
2309 void CodeGenFunction::EmitStoreThroughGlobalRegLValue(RValue Src, LValue Dst) {
2314 assert(RegName && "Register LValue is not metadata");
2331 // setObjCGCLValueClass - sets class of the lvalue for the purpose of
2335 LValue &LV,
2439 static LValue
2473 CodeGenFunction::EmitLoadOfReference(LValue RefLVal,
2486 LValue CodeGenFunction::EmitLoadOfReferenceLValue(LValue RefLVal) {
2505 LValue CodeGenFunction::EmitLoadOfPointerLValue(Address PtrAddr,
2513 static LValue EmitGlobalVarDeclLValue(CodeGenFunction &CGF,
2541 LValue LV = VD->getType()->isReferenceType() ?
2574 static LValue EmitFunctionDeclLValue(CodeGenFunction &CGF, const Expr *E,
2583 static LValue EmitCapturedFieldLValue(CodeGenFunction &CGF, const FieldDecl *FD,
2586 LValue LV = CGF.MakeNaturalAlignAddrLValue(ThisValue, TagType);
2596 static LValue EmitGlobalNamedRegister(const VarDecl *VD, CodeGenModule &CGM) {
2615 return LValue::MakeGlobalReg(Address(Ptr, Alignment), VD->getType());
2669 LValue CodeGenFunction::EmitDeclRefLValue(const DeclRefExpr *E) {
2726 LValue CapLVal;
2732 // Mark lvalue as nontemporal if the variable is marked as nontemporal
2739 LValue CapLVal =
2746 // Mark lvalue as nontemporal if the variable is marked as nontemporal
2813 LValue LV = VD->getType()->isReferenceType() ?
2836 LValue LV = EmitFunctionDeclLValue(*this, E, FD);
2870 LValue CodeGenFunction::EmitUnaryOpLValue(const UnaryOperator *E) {
2871 // __extension__ doesn't affect lvalue-ness.
2877 default: llvm_unreachable("Unknown unary operator lvalue!");
2886 LValue LV = MakeAddrLValue(Addr, T, BaseInfo, TBAAInfo);
2901 LValue LV = EmitLValue(E->getSubExpr());
2918 LValue ElemLV = MakeAddrLValue(Component, T, LV.getBaseInfo(),
2925 LValue LV = EmitLValue(E->getSubExpr());
2937 LValue CodeGenFunction::EmitStringLiteralLValue(const StringLiteral *E) {
2942 LValue CodeGenFunction::EmitObjCEncodeExprLValue(const ObjCEncodeExpr *E) {
2947 LValue CodeGenFunction::EmitPredefinedLValue(const PredefinedExpr *E) {
3538 LValue LV = EmitLValue(E);
3555 // base lvalue. However, since TBAA currently does not support representing
3557 // to the pointee object as if it had no any base lvalue specified.
3706 LValue CodeGenFunction::EmitArraySubscriptExpr(const ArraySubscriptExpr *E,
3735 // If the base is a vector type, then we are forming a vector element lvalue
3739 // Emit the vector as an lvalue to get its address.
3740 LValue LHS = EmitLValue(E->getBase());
3742 assert(LHS.isSimple() && "Can only subscript lvalue vectors here!");
3743 return LValue::MakeVectorElt(LHS.getAddress(*this), Idx,
3752 LValue LV = EmitLValue(E->getBase());
3828 LValue ArrayLV;
3856 LValue LV = MakeAddrLValue(Addr, E->getType(), EltBaseInfo, EltTBAAInfo);
3866 LValue CodeGenFunction::EmitMatrixSubscriptExpr(const MatrixSubscriptExpr *E) {
3870 LValue Base = EmitLValue(E->getBase());
3878 return LValue::MakeMatrixElt(
3888 LValue BaseLVal;
3922 LValue CodeGenFunction::EmitOMPArraySectionExpr(const OMPArraySectionExpr *E,
4052 LValue ArrayLV;
4079 LValue CodeGenFunction::
4082 LValue Base;
4086 // If it is a pointer to a vector, emit the address and form an lvalue with
4095 // Otherwise, if the base is an lvalue ( as in the case of foo.x.x),
4096 // emit the base as an lvalue.
4105 // Store the vector to memory (because LValue wants an address).
4122 return LValue::MakeExtVectorElt(Base.getAddress(*this), CV, type,
4125 assert(Base.isExtVectorElt() && "Can only subscript lvalue vec elts here!");
4133 return LValue::MakeExtVectorElt(Base.getExtVectorAddress(), CV, type,
4137 LValue CodeGenFunction::EmitMemberExpr(const MemberExpr *E) {
4144 // If this is s.x, emit s as an lvalue. If it is s->x, emit s as a scalar.
4145 LValue BaseLV;
4165 LValue LV = EmitLValueForField(BaseLV, Field);
4169 // nontemporal. If the base lvalue is marked as nontemporal, mark access
4187 LValue CodeGenFunction::EmitLValueForLambdaField(const FieldDecl *Field) {
4194 LValue LambdaLV = MakeNaturalAlignAddrLValue(CXXABIThisValue, LambdaTagType);
4244 static Address emitPreserveStructAccess(CodeGenFunction &CGF, LValue base,
4276 LValue CodeGenFunction::EmitLValueForField(LValue base,
4323 return LValue::MakeBitfield(Addr, Info, fieldType, FieldBaseInfo,
4343 // one for this base lvalue.
4414 LValue RefLVal =
4435 LValue LV = MakeAddrLValue(addr, FieldType, FieldBaseInfo, FieldTBAAInfo);
4445 LValue
4446 CodeGenFunction::EmitLValueForFieldInitialization(LValue Base,
4469 LValue CodeGenFunction::EmitCompoundLiteralLValue(const CompoundLiteralExpr *E){
4480 LValue Result = MakeAddrLValue(DeclPtr, E->getType(), AlignmentSource::Decl);
4496 LValue CodeGenFunction::EmitInitListLValue(const InitListExpr *E) {
4501 // An lvalue initializer list must be initializing a reference.
4508 /// LValue is returned and the current block has been terminated.
4509 static Optional<LValue> EmitLValueOrThrowExpression(CodeGenFunction &CGF,
4519 LValue CodeGenFunction::
4540 // If a throw expression we emit it and return an undefined lvalue
4565 Optional<LValue> lhs =
4579 Optional<LValue> rhs =
4590 Builder.CreatePHI(lhs->getPointer(*this)->getType(), 2, "cond-lvalue");
4609 /// type. If the cast is to a reference, we can have the usual lvalue result,
4610 /// otherwise if a cast is needed by the code generator in an lvalue context,
4615 LValue CodeGenFunction::EmitCastLValue(const CastExpr *E) {
4663 return EmitUnsupportedLValue(E, "unexpected cast lvalue");
4677 LValue LV = EmitLValue(E->getSubExpr());
4697 LValue LV = EmitLValue(E->getSubExpr());
4717 LValue LV = EmitLValue(E->getSubExpr());
4743 LValue LV = EmitLValue(E->getSubExpr());
4756 LValue LV = EmitLValue(E->getSubExpr());
4766 LValue LV = EmitLValue(E->getSubExpr());
4773 llvm_unreachable("NULL to OpenCL opaque type lvalue cast is not valid");
4776 llvm_unreachable("Unhandled lvalue cast kind?");
4779 LValue CodeGenFunction::EmitOpaqueValueLValue(const OpaqueValueExpr *e) {
4784 LValue
4788 llvm::DenseMap<const OpaqueValueExpr*,LValue>::iterator
4794 assert(e->isUnique() && "LValue for a nonunique OVE hasn't been emitted");
4812 RValue CodeGenFunction::EmitRValueForField(LValue LV,
4816 LValue FieldLV = EmitLValueForField(LV, FD);
4827 // Call EmitLoadOfScalar except when the lvalue is a bitfield to emit a
4951 LValue CodeGenFunction::EmitBinaryOperatorLValue(const BinaryOperator *E) {
4985 LValue LV = EmitCheckedLValue(E->getLHS(), TCK_Store);
5004 LValue CodeGenFunction::EmitCallExprLValue(const CallExpr *E) {
5018 LValue CodeGenFunction::EmitVAArgExprLValue(const VAArgExpr *E) {
5023 LValue CodeGenFunction::EmitCXXConstructLValue(const CXXConstructExpr *E) {
5031 LValue
5041 LValue CodeGenFunction::EmitCXXUuidofLValue(const CXXUuidofExpr *E) {
5046 LValue
5048 AggValueSlot Slot = CreateAggTemp(E->getType(), "temp.lvalue");
5055 LValue CodeGenFunction::EmitObjCMessageExprLValue(const ObjCMessageExpr *E) {
5069 LValue CodeGenFunction::EmitObjCSelectorLValue(const ObjCSelectorExpr *E) {
5080 LValue CodeGenFunction::EmitLValueForIvar(QualType ObjectTy,
5088 LValue CodeGenFunction::EmitObjCIvarRefLValue(const ObjCIvarRefExpr *E) {
5099 LValue BaseLV = EmitLValue(BaseExpr);
5105 LValue LV =
5112 LValue CodeGenFunction::EmitStmtExprLValue(const StmtExpr *E) {
5317 LValue CodeGenFunction::
5343 LValue lvalue = MakeAddrLValue(addr, type, AlignmentSource::Decl);
5346 return RValue::getComplex(EmitLoadOfComplex(lvalue, loc));
5348 return lvalue.asAggregateRValue(*this);
5350 return RValue::get(EmitLoadOfScalar(lvalue, loc));
5368 LValue LV;
5404 LValue LV = CGF.MakeAddrLValue(slot.getAddress(), ov->getType(),
5450 LValue CodeGenFunction::EmitPseudoObjectLValue(const PseudoObjectExpr *E) {