6bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89 |
|
29-May-2014 |
Stephen Hines <srhines@google.com> |
Update Clang for 3.5 rebase (r209713). Change-Id: I8c9133b0f8f776dc915f270b60f94962e771bc83
/external/clang/lib/CodeGen/CGValue.h
|
336d9df5e628279425344d754dc68047fa5b00a7 |
|
11-Jul-2013 |
Eli Friedman <eli.friedman@gmail.com> |
Simplify atomic load/store IRGen. Also fixes a couple minor bugs along the way; see testcases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186049 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGValue.h
|
b37a73d5c6a0c8bb1f6e363d3b53980e4fa0cead |
|
04-Apr-2013 |
Manman Ren <mren@apple.com> |
Initial support for struct-path aware TBAA. Added TBAABaseType and TBAAOffset in LValue. These two fields are initialized to the actual type and 0, and are updated in EmitLValueForField. Path-aware TBAA tags are enabled for EmitLoadOfScalar and EmitStoreOfScalar. Added command line option -struct-path-tbaa. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178797 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGValue.h
|
7cc0a110bcf3fe9c4d1269ea2ae7e72aa7f37531 |
|
04-Apr-2013 |
Manman Ren <mren@apple.com> |
revert r178784 since it does not have a commit message git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178796 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGValue.h
|
ab4ffe242935ae0dd66fbe0dcc792c1ad38b00c1 |
|
04-Apr-2013 |
Manman Ren <mren@apple.com> |
Index: include/clang/Driver/CC1Options.td =================================================================== --- include/clang/Driver/CC1Options.td (revision 178718) +++ include/clang/Driver/CC1Options.td (working copy) @@ -161,6 +161,8 @@ HelpText<"Use register sized accesses to bit-fields, when possible.">; def relaxed_aliasing : Flag<["-"], "relaxed-aliasing">, HelpText<"Turn off Type Based Alias Analysis">; +def struct_path_tbaa : Flag<["-"], "struct-path-tbaa">, + HelpText<"Turn on struct-path aware Type Based Alias Analysis">; def masm_verbose : Flag<["-"], "masm-verbose">, HelpText<"Generate verbose assembly output">; def mcode_model : Separate<["-"], "mcode-model">, Index: include/clang/Driver/Options.td =================================================================== --- include/clang/Driver/Options.td (revision 178718) +++ include/clang/Driver/Options.td (working copy) @@ -587,6 +587,7 @@ Flags<[CC1Option]>, HelpText<"Disable spell-checking">; def fno_stack_protector : Flag<["-"], "fno-stack-protector">, Group<f_Group>; def fno_strict_aliasing : Flag<["-"], "fno-strict-aliasing">, Group<f_Group>; +def fstruct_path_tbaa : Flag<["-"], "fstruct-path-tbaa">, Group<f_Group>; def fno_strict_enums : Flag<["-"], "fno-strict-enums">, Group<f_Group>; def fno_strict_overflow : Flag<["-"], "fno-strict-overflow">, Group<f_Group>; def fno_threadsafe_statics : Flag<["-"], "fno-threadsafe-statics">, Group<f_Group>, Index: include/clang/Frontend/CodeGenOptions.def =================================================================== --- include/clang/Frontend/CodeGenOptions.def (revision 178718) +++ include/clang/Frontend/CodeGenOptions.def (working copy) @@ -85,6 +85,7 @@ VALUE_CODEGENOPT(OptimizeSize, 2, 0) ///< If -Os (==1) or -Oz (==2) is specified. CODEGENOPT(RelaxAll , 1, 0) ///< Relax all machine code instructions. CODEGENOPT(RelaxedAliasing , 1, 0) ///< Set when -fno-strict-aliasing is enabled. +CODEGENOPT(StructPathTBAA , 1, 0) ///< Whether or not to use struct-path TBAA. CODEGENOPT(SaveTempLabels , 1, 0) ///< Save temporary labels. CODEGENOPT(SanitizeAddressZeroBaseShadow , 1, 0) ///< Map shadow memory at zero ///< offset in AddressSanitizer. Index: lib/CodeGen/CGExpr.cpp =================================================================== --- lib/CodeGen/CGExpr.cpp (revision 178718) +++ lib/CodeGen/CGExpr.cpp (working copy) @@ -1044,7 +1044,8 @@ llvm::Value *CodeGenFunction::EmitLoadOfScalar(LValue lvalue) { return EmitLoadOfScalar(lvalue.getAddress(), lvalue.isVolatile(), lvalue.getAlignment().getQuantity(), - lvalue.getType(), lvalue.getTBAAInfo()); + lvalue.getType(), lvalue.getTBAAInfo(), + lvalue.getTBAABaseType(), lvalue.getTBAAOffset()); } static bool hasBooleanRepresentation(QualType Ty) { @@ -1106,7 +1107,9 @@ llvm::Value *CodeGenFunction::EmitLoadOfScalar(llvm::Value *Addr, bool Volatile, unsigned Alignment, QualType Ty, - llvm::MDNode *TBAAInfo) { + llvm::MDNode *TBAAInfo, + QualType TBAABaseType, + uint64_t TBAAOffset) { // For better performance, handle vector loads differently. if (Ty->isVectorType()) { llvm::Value *V; @@ -1158,8 +1161,11 @@ Load->setVolatile(true); if (Alignment) Load->setAlignment(Alignment); - if (TBAAInfo) - CGM.DecorateInstruction(Load, TBAAInfo); + if (TBAAInfo) { + llvm::MDNode *TBAAPath = CGM.getTBAAStructTagInfo(TBAABaseType, TBAAInfo, + TBAAOffset); + CGM.DecorateInstruction(Load, TBAAPath); + } if ((SanOpts->Bool && hasBooleanRepresentation(Ty)) || (SanOpts->Enum && Ty->getAs<EnumType>())) { @@ -1217,7 +1223,8 @@ bool Volatile, unsigned Alignment, QualType Ty, llvm::MDNode *TBAAInfo, - bool isInit) { + bool isInit, QualType TBAABaseType, + uint64_t TBAAOffset) { // Handle vectors differently to get better performance. if (Ty->isVectorType()) { @@ -1268,15 +1275,19 @@ llvm::StoreInst *Store = Builder.CreateStore(Value, Addr, Volatile); if (Alignment) Store->setAlignment(Alignment); - if (TBAAInfo) - CGM.DecorateInstruction(Store, TBAAInfo); + if (TBAAInfo) { + llvm::MDNode *TBAAPath = CGM.getTBAAStructTagInfo(TBAABaseType, TBAAInfo, + TBAAOffset); + CGM.DecorateInstruction(Store, TBAAPath); + } } void CodeGenFunction::EmitStoreOfScalar(llvm::Value *value, LValue lvalue, bool isInit) { EmitStoreOfScalar(value, lvalue.getAddress(), lvalue.isVolatile(), lvalue.getAlignment().getQuantity(), lvalue.getType(), - lvalue.getTBAAInfo(), isInit); + lvalue.getTBAAInfo(), isInit, lvalue.getTBAABaseType(), + lvalue.getTBAAOffset()); } /// EmitLoadOfLValue - Given an expression that represents a value lvalue, this @@ -2494,9 +2505,12 @@ llvm::Value *addr = base.getAddress(); unsigned cvr = base.getVRQualifiers(); + bool TBAAPath = CGM.getCodeGenOpts().StructPathTBAA; if (rec->isUnion()) { // For unions, there is no pointer adjustment. assert(!type->isReferenceType() && "union has reference member"); + // TODO: handle path-aware TBAA for union. + TBAAPath = false; } else { // For structs, we GEP to the field that the record layout suggests. unsigned idx = CGM.getTypes().getCGRecordLayout(rec).getLLVMFieldNo(field); @@ -2508,6 +2522,8 @@ if (cvr & Qualifiers::Volatile) load->setVolatile(true); load->setAlignment(alignment.getQuantity()); + // Loading the reference will disable path-aware TBAA. + TBAAPath = false; if (CGM.shouldUseTBAA()) { llvm::MDNode *tbaa; if (mayAlias) @@ -2541,6 +2557,16 @@ LValue LV = MakeAddrLValue(addr, type, alignment); LV.getQuals().addCVRQualifiers(cvr); + if (TBAAPath) { + const ASTRecordLayout &Layout = + getContext().getASTRecordLayout(field->getParent()); + // Set the base type to be the base type of the base LValue and + // update offset to be relative to the base type. + LV.setTBAABaseType(base.getTBAABaseType()); + LV.setTBAAOffset(base.getTBAAOffset() + + Layout.getFieldOffset(field->getFieldIndex()) / + getContext().getCharWidth()); + } // __weak attribute on a field is ignored. if (LV.getQuals().getObjCGCAttr() == Qualifiers::Weak) Index: lib/CodeGen/CGValue.h =================================================================== --- lib/CodeGen/CGValue.h (revision 178718) +++ lib/CodeGen/CGValue.h (working copy) @@ -157,6 +157,11 @@ Expr *BaseIvarExp; + /// Used by struct-path-aware TBAA. + QualType TBAABaseType; + /// Offset relative to the base type. + uint64_t TBAAOffset; + /// TBAAInfo - TBAA information to attach to dereferences of this LValue. llvm::MDNode *TBAAInfo; @@ -175,6 +180,10 @@ this->ImpreciseLifetime = false; this->ThreadLocalRef = false; this->BaseIvarExp = 0; + + // Initialize fields for TBAA. + this->TBAABaseType = Type; + this->TBAAOffset = 0; this->TBAAInfo = TBAAInfo; } @@ -232,6 +241,12 @@ Expr *getBaseIvarExp() const { return BaseIvarExp; } void setBaseIvarExp(Expr *V) { BaseIvarExp = V; } + QualType getTBAABaseType() const { return TBAABaseType; } + void setTBAABaseType(QualType T) { TBAABaseType = T; } + + uint64_t getTBAAOffset() const { return TBAAOffset; } + void setTBAAOffset(uint64_t O) { TBAAOffset = O; } + llvm::MDNode *getTBAAInfo() const { return TBAAInfo; } void setTBAAInfo(llvm::MDNode *N) { TBAAInfo = N; } Index: lib/CodeGen/CodeGenFunction.h =================================================================== --- lib/CodeGen/CodeGenFunction.h (revision 178718) +++ lib/CodeGen/CodeGenFunction.h (working copy) @@ -2211,7 +2211,9 @@ /// the LLVM value representation. llvm::Value *EmitLoadOfScalar(llvm::Value *Addr, bool Volatile, unsigned Alignment, QualType Ty, - llvm::MDNode *TBAAInfo = 0); + llvm::MDNode *TBAAInfo = 0, + QualType TBAABaseTy = QualType(), + uint64_t TBAAOffset = 0); /// EmitLoadOfScalar - Load a scalar value from an address, taking /// care to appropriately convert from the memory representation to @@ -2224,7 +2226,9 @@ /// the LLVM value representation. void EmitStoreOfScalar(llvm::Value *Value, llvm::Value *Addr, bool Volatile, unsigned Alignment, QualType Ty, - llvm::MDNode *TBAAInfo = 0, bool isInit=false); + llvm::MDNode *TBAAInfo = 0, bool isInit = false, + QualType TBAABaseTy = QualType(), + uint64_t TBAAOffset = 0); /// EmitStoreOfScalar - Store a scalar value to an address, taking /// care to appropriately convert from the memory representation to Index: lib/CodeGen/CodeGenModule.cpp =================================================================== --- lib/CodeGen/CodeGenModule.cpp (revision 178718) +++ lib/CodeGen/CodeGenModule.cpp (working copy) @@ -227,6 +227,20 @@ return TBAA->getTBAAStructInfo(QTy); } +llvm::MDNode *CodeGenModule::getTBAAStructTypeInfo(QualType QTy) { + if (!TBAA) + return 0; + return TBAA->getTBAAStructTypeInfo(QTy); +} + +llvm::MDNode *CodeGenModule::getTBAAStructTagInfo(QualType BaseTy, + llvm::MDNode *AccessN, + uint64_t O) { + if (!TBAA) + return 0; + return TBAA->getTBAAStructTagInfo(BaseTy, AccessN, O); +} + void CodeGenModule::DecorateInstruction(llvm::Instruction *Inst, llvm::MDNode *TBAAInfo) { Inst->setMetadata(llvm::LLVMContext::MD_tbaa, TBAAInfo); Index: lib/CodeGen/CodeGenModule.h =================================================================== --- lib/CodeGen/CodeGenModule.h (revision 178718) +++ lib/CodeGen/CodeGenModule.h (working copy) @@ -501,6 +501,11 @@ llvm::MDNode *getTBAAInfo(QualType QTy); llvm::MDNode *getTBAAInfoForVTablePtr(); llvm::MDNode *getTBAAStructInfo(QualType QTy); + /// Return the MDNode in the type DAG for the given struct type. + llvm::MDNode *getTBAAStructTypeInfo(QualType QTy); + /// Return the path-aware tag for given base type, access node and offset. + llvm::MDNode *getTBAAStructTagInfo(QualType BaseTy, llvm::MDNode *AccessN, + uint64_t O); bool isTypeConstant(QualType QTy, bool ExcludeCtorDtor); Index: lib/CodeGen/CodeGenTBAA.cpp =================================================================== --- lib/CodeGen/CodeGenTBAA.cpp (revision 178718) +++ lib/CodeGen/CodeGenTBAA.cpp (working copy) @@ -21,6 +21,7 @@ #include "clang/AST/Mangle.h" #include "clang/AST/RecordLayout.h" #include "clang/Frontend/CodeGenOptions.h" +#include "llvm/ADT/SmallSet.h" #include "llvm/IR/Constants.h" #include "llvm/IR/LLVMContext.h" #include "llvm/IR/Metadata.h" @@ -225,3 +226,87 @@ // For now, handle any other kind of type conservatively. return StructMetadataCache[Ty] = NULL; } + +/// Check if the given type can be handled by path-aware TBAA. +static bool isTBAAPathStruct(QualType QTy) { + if (const RecordType *TTy = QTy->getAs<RecordType>()) { + const RecordDecl *RD = TTy->getDecl()->getDefinition(); + // RD can be struct, union, class, interface or enum. + // For now, we only handle struct. + if (RD->isStruct() && !RD->hasFlexibleArrayMember()) + return true; + } + return false; +} + +llvm::MDNode * +CodeGenTBAA::getTBAAStructTypeInfo(QualType QTy) { + const Type *Ty = Context.getCanonicalType(QTy).getTypePtr(); + assert(isTBAAPathStruct(QTy)); + + if (llvm::MDNode *N = StructTypeMetadataCache[Ty]) + return N; + + if (const RecordType *TTy = QTy->getAs<RecordType>()) { + const RecordDecl *RD = TTy->getDecl()->getDefinition(); + + const ASTRecordLayout &Layout = Context.getASTRecordLayout(RD); + SmallVector <std::pair<uint64_t, llvm::MDNode*>, 4> Fields; + // To reduce the size of MDNode for a given struct type, we only output + // once for all the fields with the same scalar types. + // Offsets for scalar fields in the type DAG are not used. + llvm::SmallSet <llvm::MDNode*, 4> ScalarFieldTypes; + unsigned idx = 0; + for (RecordDecl::field_iterator i = RD->field_begin(), + e = RD->field_end(); i != e; ++i, ++idx) { + QualType FieldQTy = i->getType(); + llvm::MDNode *FieldNode; + if (isTBAAPathStruct(FieldQTy)) + FieldNode = getTBAAStructTypeInfo(FieldQTy); + else { + FieldNode = getTBAAInfo(FieldQTy); + // Ignore this field if the type already exists. + if (ScalarFieldTypes.count(FieldNode)) + continue; + ScalarFieldTypes.insert(FieldNode); + } + if (!FieldNode) + return StructTypeMetadataCache[Ty] = NULL; + Fields.push_back(std::make_pair( + Layout.getFieldOffset(idx) / Context.getCharWidth(), FieldNode)); + } + + // TODO: This is using the RTTI name. Is there a better way to get + // a unique string for a type? + SmallString<256> OutName; + llvm::raw_svector_ostream Out(OutName); + MContext.mangleCXXRTTIName(QualType(Ty, 0), Out); + Out.flush(); + // Create the struct type node with a vector of pairs (offset, type). + return StructTypeMetadataCache[Ty] = + MDHelper.createTBAAStructTypeNode(OutName, Fields); + } + + return StructMetadataCache[Ty] = NULL; +} + +llvm::MDNode * +CodeGenTBAA::getTBAAStructTagInfo(QualType BaseQTy, llvm::MDNode *AccessNode, + uint64_t Offset) { + if (!CodeGenOpts.StructPathTBAA) + return AccessNode; + + const Type *BTy = Context.getCanonicalType(BaseQTy).getTypePtr(); + TBAAPathTag PathTag = TBAAPathTag(BTy, AccessNode, Offset); + if (llvm::MDNode *N = StructTagMetadataCache[PathTag]) + return N; + + llvm::MDNode *BNode = 0; + if (isTBAAPathStruct(BaseQTy)) + BNode = getTBAAStructTypeInfo(BaseQTy); + if (!BNode) + return StructTagMetadataCache[PathTag] = AccessNode; + + return StructTagMetadataCache[PathTag] = + MDHelper.createTBAAStructTagNode(BNode, AccessNode, Offset); +} Index: lib/CodeGen/CodeGenTBAA.h =================================================================== --- lib/CodeGen/CodeGenTBAA.h (revision 178718) +++ lib/CodeGen/CodeGenTBAA.h (working copy) @@ -35,6 +35,14 @@ namespace CodeGen { class CGRecordLayout; + struct TBAAPathTag { + TBAAPathTag(const Type *B, const llvm::MDNode *A, uint64_t O) + : BaseT(B), AccessN(A), Offset(O) {} + const Type *BaseT; + const llvm::MDNode *AccessN; + uint64_t Offset; + }; + /// CodeGenTBAA - This class organizes the cross-module state that is used /// while lowering AST types to LLVM types. class CodeGenTBAA { @@ -46,8 +54,13 @@ // MDHelper - Helper for creating metadata. llvm::MDBuilder MDHelper; - /// MetadataCache - This maps clang::Types to llvm::MDNodes describing them. + /// MetadataCache - This maps clang::Types to scalar llvm::MDNodes describing + /// them. llvm::DenseMap<const Type *, llvm::MDNode *> MetadataCache; + /// This maps clang::Types to a struct node in the type DAG. + llvm::DenseMap<const Type *, llvm::MDNode *> StructTypeMetadataCache; + /// This maps TBAAPathTags to a tag node. + llvm::DenseMap<TBAAPathTag, llvm::MDNode *> StructTagMetadataCache; /// StructMetadataCache - This maps clang::Types to llvm::MDNodes describing /// them for struct assignments. @@ -89,9 +102,49 @@ /// getTBAAStructInfo - Get the TBAAStruct MDNode to be used for a memcpy of /// the given type. llvm::MDNode *getTBAAStructInfo(QualType QTy); + + /// Get the MDNode in the type DAG for given struct type QType. + llvm::MDNode *getTBAAStructTypeInfo(QualType QType); + /// Get the tag MDNode for a given base type, the actual sclar access MDNode + /// and offset into the base type. + llvm::MDNode *getTBAAStructTagInfo(QualType BaseQType, + llvm::MDNode *AccessNode, uint64_t Offset); }; } // end namespace CodeGen } // end namespace clang +namespace llvm { + +template<> struct DenseMapInfo<clang::CodeGen::TBAAPathTag> { + static clang::CodeGen::TBAAPathTag getEmptyKey() { + return clang::CodeGen::TBAAPathTag( + DenseMapInfo<const clang::Type *>::getEmptyKey(), + DenseMapInfo<const MDNode *>::getEmptyKey(), + DenseMapInfo<uint64_t>::getEmptyKey()); + } + + static clang::CodeGen::TBAAPathTag getTombstoneKey() { + return clang::CodeGen::TBAAPathTag( + DenseMapInfo<const clang::Type *>::getTombstoneKey(), + DenseMapInfo<const MDNode *>::getTombstoneKey(), + DenseMapInfo<uint64_t>::getTombstoneKey()); + } + + static unsigned getHashValue(const clang::CodeGen::TBAAPathTag &Val) { + return DenseMapInfo<const clang::Type *>::getHashValue(Val.BaseT) ^ + DenseMapInfo<const MDNode *>::getHashValue(Val.AccessN) ^ + DenseMapInfo<uint64_t>::getHashValue(Val.Offset); + } + + static bool isEqual(const clang::CodeGen::TBAAPathTag &LHS, + const clang::CodeGen::TBAAPathTag &RHS) { + return LHS.BaseT == RHS.BaseT && + LHS.AccessN == RHS.AccessN && + LHS.Offset == RHS.Offset; + } +}; + +} // end namespace llvm + #endif Index: lib/Driver/Tools.cpp =================================================================== --- lib/Driver/Tools.cpp (revision 178718) +++ lib/Driver/Tools.cpp (working copy) @@ -2105,6 +2105,8 @@ options::OPT_fno_strict_aliasing, getToolChain().IsStrictAliasingDefault())) CmdArgs.push_back("-relaxed-aliasing"); + if (Args.hasArg(options::OPT_fstruct_path_tbaa)) + CmdArgs.push_back("-struct-path-tbaa"); if (Args.hasFlag(options::OPT_fstrict_enums, options::OPT_fno_strict_enums, false)) CmdArgs.push_back("-fstrict-enums"); Index: lib/Frontend/CompilerInvocation.cpp =================================================================== --- lib/Frontend/CompilerInvocation.cpp (revision 178718) +++ lib/Frontend/CompilerInvocation.cpp (working copy) @@ -324,6 +324,7 @@ Opts.UseRegisterSizedBitfieldAccess = Args.hasArg( OPT_fuse_register_sized_bitfield_access); Opts.RelaxedAliasing = Args.hasArg(OPT_relaxed_aliasing); + Opts.StructPathTBAA = Args.hasArg(OPT_struct_path_tbaa); Opts.DwarfDebugFlags = Args.getLastArgValue(OPT_dwarf_debug_flags); Opts.MergeAllConstants = !Args.hasArg(OPT_fno_merge_all_constants); Opts.NoCommon = Args.hasArg(OPT_fno_common); Index: test/CodeGen/tbaa.cpp =================================================================== --- test/CodeGen/tbaa.cpp (revision 0) +++ test/CodeGen/tbaa.cpp (working copy) @@ -0,0 +1,217 @@ +// RUN: %clang_cc1 -O1 -disable-llvm-optzns %s -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 -O1 -struct-path-tbaa -disable-llvm-optzns %s -emit-llvm -o - | FileCheck %s -check-prefix=PATH +// Test TBAA metadata generated by front-end. + +#include <stdint.h> +typedef struct +{ + uint16_t f16; + uint32_t f32; + uint16_t f16_2; + uint32_t f32_2; +} StructA; +typedef struct +{ + uint16_t f16; + StructA a; + uint32_t f32; +} StructB; +typedef struct +{ + uint16_t f16; + StructB b; + uint32_t f32; +} StructC; +typedef struct +{ + uint16_t f16; + StructB b; + uint32_t f32; + uint8_t f8; +} StructD; + +typedef struct +{ + uint16_t f16; + uint32_t f32; +} StructS; +typedef struct +{ + uint16_t f16; + uint32_t f32; +} StructS2; + +uint32_t g(uint32_t *s, StructA *A, uint64_t count) { +// CHECK: define i32 @{{.*}}( +// CHECK: store i32 1, i32* %{{.*}}, align 4, !tbaa !4 +// CHECK: store i32 4, i32* %{{.*}}, align 4, !tbaa !4 +// PATH: define i32 @{{.*}}( +// PATH: store i32 1, i32* %{{.*}}, align 4, !tbaa !4 +// PATH: store i32 4, i32* %{{.*}}, align 4, !tbaa !5 + *s = 1; + A->f32 = 4; + return *s; +} + +uint32_t g2(uint32_t *s, StructA *A, uint64_t count) { +// CHECK: define i32 @{{.*}}( +// CHECK: store i32 1, i32* %{{.*}}, align 4, !tbaa !4 +// CHECK: store i16 4, i16* %{{.*}}, align 2, !tbaa !5 +// PATH: define i32 @{{.*}}( +// PATH: store i32 1, i32* %{{.*}}, align 4, !tbaa !4 +// PATH: store i16 4, i16* %{{.*}}, align 2, !tbaa !8 + *s = 1; + A->f16 = 4; + return *s; +} + +uint32_t g3(StructA *A, StructB *B, uint64_t count) { +// CHECK: define i32 @{{.*}}( +// CHECK: store i32 1, i32* %{{.*}}, align 4, !tbaa !4 +// CHECK: store i32 4, i32* %{{.*}}, align 4, !tbaa !4 +// PATH: define i32 @{{.*}}( +// PATH: store i32 1, i32* %{{.*}}, align 4, !tbaa !5 +// PATH: store i32 4, i32* %{{.*}}, align 4, !tbaa !9 + A->f32 = 1; + B->a.f32 = 4; + return A->f32; +} + +uint32_t g4(StructA *A, StructB *B, uint64_t count) { +// CHECK: define i32 @{{.*}}( +// CHECK: store i32 1, i32* %{{.*}}, align 4, !tbaa !4 +// CHECK: store i16 4, i16* %{{.*}}, align 2, !tbaa !5 +// PATH: define i32 @{{.*}}( +// PATH: store i32 1, i32* %{{.*}}, align 4, !tbaa !5 +// PATH: store i16 4, i16* %{{.*}}, align 2, !tbaa !11 + A->f32 = 1; + B->a.f16 = 4; + return A->f32; +} + +uint32_t g5(StructA *A, StructB *B, uint64_t count) { +// CHECK: define i32 @{{.*}}( +// CHECK: store i32 1, i32* %{{.*}}, align 4, !tbaa !4 +// CHECK: store i32 4, i32* %{{.*}}, align 4, !tbaa !4 +// PATH: define i32 @{{.*}}( +// PATH: store i32 1, i32* %{{.*}}, align 4, !tbaa !5 +// PATH: store i32 4, i32* %{{.*}}, align 4, !tbaa !12 + A->f32 = 1; + B->f32 = 4; + return A->f32; +} + +uint32_t g6(StructA *A, StructB *B, uint64_t count) { +// CHECK: define i32 @{{.*}}( +// CHECK: store i32 1, i32* %{{.*}}, align 4, !tbaa !4 +// CHECK: store i32 4, i32* %{{.*}}, align 4, !tbaa !4 +// PATH: define i32 @{{.*}}( +// PATH: store i32 1, i32* %{{.*}}, align 4, !tbaa !5 +// PATH: store i32 4, i32* %{{.*}}, align 4, !tbaa !13 + A->f32 = 1; + B->a.f32_2 = 4; + return A->f32; +} + +uint32_t g7(StructA *A, StructS *S, uint64_t count) { +// CHECK: define i32 @{{.*}}( +// CHECK: store i32 1, i32* %{{.*}}, align 4, !tbaa !4 +// CHECK: store i32 4, i32* %{{.*}}, align 4, !tbaa !4 +// PATH: define i32 @{{.*}}( +// PATH: store i32 1, i32* %{{.*}}, align 4, !tbaa !5 +// PATH: store i32 4, i32* %{{.*}}, align 4, !tbaa !14 + A->f32 = 1; + S->f32 = 4; + return A->f32; +} + +uint32_t g8(StructA *A, StructS *S, uint64_t count) { +// CHECK: define i32 @{{.*}}( +// CHECK: store i32 1, i32* %{{.*}}, align 4, !tbaa !4 +// CHECK: store i16 4, i16* %{{.*}}, align 2, !tbaa !5 +// PATH: define i32 @{{.*}}( +// PATH: store i32 1, i32* %{{.*}}, align 4, !tbaa !5 +// PATH: store i16 4, i16* %{{.*}}, align 2, !tbaa !16 + A->f32 = 1; + S->f16 = 4; + return A->f32; +} + +uint32_t g9(StructS *S, StructS2 *S2, uint64_t count) { +// CHECK: define i32 @{{.*}}( +// CHECK: store i32 1, i32* %{{.*}}, align 4, !tbaa !4 +// CHECK: store i32 4, i32* %{{.*}}, align 4, !tbaa !4 +// PATH: define i32 @{{.*}}( +// PATH: store i32 1, i32* %{{.*}}, align 4, !tbaa !14 +// PATH: store i32 4, i32* %{{.*}}, align 4, !tbaa !17 + S->f32 = 1; + S2->f32 = 4; + return S->f32; +} + +uint32_t g10(StructS *S, StructS2 *S2, uint64_t count) { +// CHECK: define i32 @{{.*}}( +// CHECK: store i32 1, i32* %{{.*}}, align 4, !tbaa !4 +// CHECK: store i16 4, i16* %{{.*}}, align 2, !tbaa !5 +// PATH: define i32 @{{.*}}( +// PATH: store i32 1, i32* %{{.*}}, align 4, !tbaa !14 +// PATH: store i16 4, i16* %{{.*}}, align 2, !tbaa !19 + S->f32 = 1; + S2->f16 = 4; + return S->f32; +} + +uint32_t g11(StructC *C, StructD *D, uint64_t count) { +// CHECK: define i32 @{{.*}}( +// CHECK: store i32 1, i32* %{{.*}}, align 4, !tbaa !4 +// CHECK: store i32 4, i32* %{{.*}}, align 4, !tbaa !4 +// PATH: define i32 @{{.*}}( +// PATH: store i32 1, i32* %{{.*}}, align 4, !tbaa !20 +// PATH: store i32 4, i32* %{{.*}}, align 4, !tbaa !22 + C->b.a.f32 = 1; + D->b.a.f32 = 4; + return C->b.a.f32; +} + +uint32_t g12(StructC *C, StructD *D, uint64_t count) { +// CHECK: define i32 @{{.*}}( +// CHECK: store i32 1, i32* %{{.*}}, align 4, !tbaa !4 +// CHECK: store i32 4, i32* %{{.*}}, align 4, !tbaa !4 +// TODO: differentiate the two accesses. +// PATH: define i32 @{{.*}}( +// PATH: store i32 1, i32* %{{.*}}, align 4, !tbaa !9 +// PATH: store i32 4, i32* %{{.*}}, align 4, !tbaa !9 + StructB *b1 = &(C->b); + StructB *b2 = &(D->b); + // b1, b2 have different context. + b1->a.f32 = 1; + b2->a.f32 = 4; + return b1->a.f32; +} + +// CHECK: !1 = metadata !{metadata !"omnipotent char", metadata !2} +// CHECK: !2 = metadata !{metadata !"Simple C/C++ TBAA"} +// CHECK: !4 = metadata !{metadata !"int", metadata !1} +// CHECK: !5 = metadata !{metadata !"short", metadata !1} + +// PATH: !1 = metadata !{metadata !"omnipotent char", metadata !2} +// PATH: !4 = metadata !{metadata !"int", metadata !1} +// PATH: !5 = metadata !{metadata !6, metadata !4, i64 4} +// PATH: !6 = metadata !{metadata !"_ZTS7StructA", i64 0, metadata !7, i64 4, metadata !4} +// PATH: !7 = metadata !{metadata !"short", metadata !1} +// PATH: !8 = metadata !{metadata !6, metadata !7, i64 0} +// PATH: !9 = metadata !{metadata !10, metadata !4, i64 8} +// PATH: !10 = metadata !{metadata !"_ZTS7StructB", i64 0, metadata !7, i64 4, metadata !6, i64 20, metadata !4} +// PATH: !11 = metadata !{metadata !10, metadata !7, i64 4} +// PATH: !12 = metadata !{metadata !10, metadata !4, i64 20} +// PATH: !13 = metadata !{metadata !10, metadata !4, i64 16} +// PATH: !14 = metadata !{metadata !15, metadata !4, i64 4} +// PATH: !15 = metadata !{metadata !"_ZTS7StructS", i64 0, metadata !7, i64 4, metadata !4} +// PATH: !16 = metadata !{metadata !15, metadata !7, i64 0} +// PATH: !17 = metadata !{metadata !18, metadata !4, i64 4} +// PATH: !18 = metadata !{metadata !"_ZTS8StructS2", i64 0, metadata !7, i64 4, metadata !4} +// PATH: !19 = metadata !{metadata !18, metadata !7, i64 0} +// PATH: !20 = metadata !{metadata !21, metadata !4, i64 12} +// PATH: !21 = metadata !{metadata !"_ZTS7StructC", i64 0, metadata !7, i64 4, metadata !10, i64 28, metadata !4} +// PATH: !22 = metadata !{metadata !23, metadata !4, i64 12} +// PATH: !23 = metadata !{metadata !"_ZTS7StructD", i64 0, metadata !7, i64 4, metadata !10, i64 28, metadata !4, i64 32, metadata !1} git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178784 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGValue.h
|
99c6418e37380abbc7042ea82634bb4f7f674e15 |
|
13-Mar-2013 |
John McCall <rjmccall@apple.com> |
Remove trailing comma in enum list. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176926 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGValue.h
|
5b07e8077a20b80fee90bd76c43c6150c676e4a8 |
|
13-Mar-2013 |
John McCall <rjmccall@apple.com> |
Tighten up the rules for precise lifetime and document the requirements on the ARC optimizer. rdar://13407451 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176924 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGValue.h
|
9eda3abe7e183b05834947391c0cdc291f4ee0d8 |
|
07-Mar-2013 |
John McCall <rjmccall@apple.com> |
Promote atomic type sizes up to a power of two, capped by MaxAtomicPromoteWidth. Fix a ton of terrible bugs with _Atomic types and (non-intrinsic-mediated) loads and stores thereto. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176658 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGValue.h
|
9d232c884ea9872d6555df0fd7359699819bc1f1 |
|
07-Mar-2013 |
John McCall <rjmccall@apple.com> |
Change hasAggregateLLVMType, which conflates complex and aggregate types in a profoundly wrong way that has to be worked around in every call site, to getEvaluationKind, which classifies and distinguishes between all of these cases. Also, normalize the API for loading and storing complexes. I'm working on a larger patch and wanted to pull these changes out, but it would have be annoying to detangle them from each other. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176656 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGValue.h
|
3ac83d69c61238cd0d38e90fcdd03390530ab2fb |
|
26-Jan-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
patch for PR9027 and // rdar://11861085 Title: [PR9027] volatile struct bug: member is not loaded at -O; This is caused by last flag passed to @llvm.memcpy being false, not honoring that aggregate has at least one 'volatile' data member (even though aggregate itself has not been qualified as 'volatile'. As a result, optimization optimizes away the memcpy altogether. Patch review by John MaCall (I still need to fix up a test though). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173535 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGValue.h
|
3b844ba7d5be205a9b4f5f0b0d1b7978977f4b8c |
|
02-Jan-2013 |
Chandler Carruth <chandlerc@gmail.com> |
Rewrite #includes for llvm/Foo.h to llvm/IR/Foo.h as appropriate to reflect the migration in r171366. Re-sort the #include lines to reflect the new paths. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171369 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGValue.h
|
0481e54c1a181049d306224161bf43d1976a47e9 |
|
24-Dec-2012 |
NAKAMURA Takumi <geek4civic@gmail.com> |
CGValue.h: Update one \param to Addr in MakeBitfield(). [-Wdocumentation] git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171011 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGValue.h
|
72d2dab6058467036df73a5f668036a519043e5b |
|
06-Dec-2012 |
Chandler Carruth <chandlerc@gmail.com> |
Rework the bitfield access IR generation to address PR13619 and generally support the C++11 memory model requirements for bitfield accesses by relying more heavily on LLVM's memory model. The primary change this introduces is to move from a manually aligned and strided access pattern across the bits of the bitfield to a much simpler lump access of all bits in the bitfield followed by math to extract the bits relevant for the particular field. This simplifies the code significantly, but relies on LLVM to intelligently lowering these integers. I have tested LLVM's lowering both synthetically and in benchmarks. The lowering appears to be functional, and there are no really significant performance regressions. Different code patterns accessing bitfields will vary in how this impacts them. The only real regressions I'm seeing are a few patterns where the LLVM code generation for loads that feed directly into a mask operation don't take advantage of the x86 ability to do a smaller load and a cheap zero-extension. This doesn't regress any benchmark in the nightly test suite on my box past the noise threshold, but my box is quite noisy. I'll be watching the LNT numbers, and will look into further improvements to the LLVM lowering as needed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169489 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGValue.h
|
55fc873017f10f6f566b182b70f6fc22aefa3464 |
|
04-Dec-2012 |
Chandler Carruth <chandlerc@gmail.com> |
Sort all of Clang's files under 'lib', and fix up the broken headers uncovered. This required manually correcting all of the incorrect main-module headers I could find, and running the new llvm/utils/sort_includes.py script over the files. I also manually added quite a few missing headers that were uncovered by shuffling the order or moving headers up to be main-module-headers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169237 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGValue.h
|
9e4abb4aa90c9785dcbaf4e69a320e6a2983b526 |
|
15-Aug-2012 |
John Criswell <criswell@uiuc.edu> |
Fix for PR#13606: http://llvm.org/bugs/show_bug.cgi?id=13606 Changed the alignment of an LValue to be 64 bits so that we can handle alignment values up to half of a 64-bit address space. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161971 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGValue.h
|
e0c1168ec7910a1a7ed08df4d4f0c58c2fa2ecd1 |
|
03-Jul-2012 |
John McCall <rjmccall@apple.com> |
Significantly simplify CGExprAgg's logic about ignored results: if we want to ignore a result, the Dest will be null. Otherwise, we must copy into it. This means we need to ensure a slot when loading from a volatile l-value. With all that in place, fix a bug with chained assignments into __block variables of aggregate type where we were losing insight into the actual source of the value during the second assignment. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159630 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGValue.h
|
f4bcfa1b1850711d5eb092f2b0639331ef9f09f1 |
|
27-Jun-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Propagate lvalue alignment into bitfields. Per report on cfe-dev. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159295 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGValue.h
|
649b4a1a9b5e6f768ca0cb84bd97b00f51083e15 |
|
29-Mar-2012 |
Chad Rosier <mcrosier@apple.com> |
Revert r153613 as it's causing large compile-time regressions on the nightly testers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153660 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGValue.h
|
57cd1b89cd91433ce1991a5bff36fe776a263796 |
|
29-Mar-2012 |
John McCall <rjmccall@apple.com> |
When we can't prove that the target of an aggregate copy is a complete object, the memcpy needs to use the data size of the structure instead of its sizeof() value. Fixes PR12204. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153613 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGValue.h
|
e5a8aeb4ad762b9383f9e9544c619dc386951e18 |
|
22-Mar-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Make sure we correctly set the alignment for vector loads and stores associated with vector element lvalues. Patch by Kevin Schoedel (with some minor modifications by me). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153285 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGValue.h
|
9f32a920c6f21a2719e220cd50d708ab4e5543fd |
|
11-Dec-2011 |
Benjamin Kramer <benny.kra@googlemail.com> |
Reuse forAddr to create ignored AggValueSlots. Silences valgrind warnings about uninitalized alignment values. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146342 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGValue.h
|
6da2c716017d5c8530ec99779524491ebc5dadb8 |
|
03-Dec-2011 |
Eli Friedman <eli.friedman@gmail.com> |
Switch LValue so that it exposes alignment in CharUnits. (No functional change.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145753 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGValue.h
|
51f512090530807e2c80f9411cc262025820c859 |
|
03-Dec-2011 |
Eli Friedman <eli.friedman@gmail.com> |
Add a utility to get a RValue for a given LValue for an aggregate; switch a few places over to it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145747 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGValue.h
|
d7722d9d76a851e7897f4127626616d3b1b8e530 |
|
03-Dec-2011 |
Eli Friedman <eli.friedman@gmail.com> |
Switch the Alignment argument on AggValueSlot over to CharUnits, per John's review comment. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145741 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGValue.h
|
f394078fde147dcf27e9b6a7965517388d64dcb6 |
|
03-Dec-2011 |
Eli Friedman <eli.friedman@gmail.com> |
Track alignment in AggValueSlot. No functional change in this patch, but I'll be introducing uses of the specified alignment soon. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145736 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGValue.h
|
db45806b991013280a03057025c9538de64d5dfb |
|
07-Nov-2011 |
John McCall <rjmccall@apple.com> |
Rip the ObjCPropertyRef l-value kind out of IR-generation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143908 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGValue.h
|
4b9c2d235fb9449e249d74f48ecfec601650de93 |
|
06-Nov-2011 |
John McCall <rjmccall@apple.com> |
Change the AST representation of operations on Objective-C property references to use a new PseudoObjectExpr expression which pairs a syntactic form of the expression with a set of semantic expressions implementing it. This should significantly reduce the complexity required elsewhere in the compiler to deal with these kinds of expressions (e.g. IR generation's special l-value kind, the static analyzer's Message abstraction), at the lower cost of specifically dealing with the odd AST structure of these expressions. It should also greatly simplify efforts to implement similar language features in the future, most notably Managed C++'s properties and indexed properties. Most of the effort here is in dealing with the various clients of the AST. I've gone ahead and simplified the ObjC rewriter's use of properties; other clients, like IR-gen and the static analyzer, have all the old complexity *and* all the new complexity, at least temporarily. Many thanks to Ted for writing and advising on the necessary changes to the static analyzer. I've xfailed a small diagnostics regression in the static analyzer at Ted's request. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143867 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGValue.h
|
fd71fb81c5f9382caf0131946e890b133e12ceb5 |
|
26-Aug-2011 |
John McCall <rjmccall@apple.com> |
What say we document some of these AggValueSlot flags a bit better. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138628 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGValue.h
|
4418439220a8f8e0b1deffdccce2354854c702f5 |
|
26-Aug-2011 |
John McCall <rjmccall@apple.com> |
Since the 'is aliased' bit is critical for correctness in C++, it really shouldn't be optional. Fix the remaining place where a temporary was being passed as potentially-aliased memory. Fixes PR10756. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138627 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGValue.h
|
410ffb2bc5f072d58a73c14560345bcf77dec1cc |
|
26-Aug-2011 |
John McCall <rjmccall@apple.com> |
Track whether an AggValueSlot is potentially aliased, and do not emit call results into potentially aliased slots. This allows us to properly mark indirect return slots as noalias, at the cost of requiring an extra memcpy when assigning an aggregate call result into a l-value. It also brings us into compliance with the x86-64 ABI. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138599 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGValue.h
|
7c2349be2d11143a2e59a167fd43362a3bf4585e |
|
25-Aug-2011 |
John McCall <rjmccall@apple.com> |
Use stronger typing for the flags on AggValueSlot and require creators to tell us whether something needs GC barriers. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138581 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGValue.h
|
a07398ed98ea2b55ad7a505a3aab18aed93b149f |
|
16-Jun-2011 |
John McCall <rjmccall@apple.com> |
Restore correct use of GC barriers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133144 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGValue.h
|
f85e193739c953358c865005855253af4f68a497 |
|
16-Jun-2011 |
John McCall <rjmccall@apple.com> |
Automatic Reference Counting. Language-design credit goes to a lot of people, but I particularly want to single out Blaine Garst and Patrick Beard for their contributions. Compiler implementation credit goes to Argyrios, Doug, Fariborz, and myself, in no particular order. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133103 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGValue.h
|
5808ce43f8d7e71f5acacc9ca320268c4f37565a |
|
03-Feb-2011 |
John McCall <rjmccall@apple.com> |
More capturing of 'this': implicit member expressions. Getting that right for anonymous struct/union members led to me discovering some seemingly broken code in that area of Sema, which I fixed, partly by changing the representation of member pointer constants so that IndirectFieldDecls aren't expanded. This led to assorted cleanups with member pointers in CodeGen, and while I was doing that I saw some random other things to clean up. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124785 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGValue.h
|
119a1c6c4029d30cae7b31a2826aa0ff70d01668 |
|
04-Dec-2010 |
John McCall <rjmccall@apple.com> |
Kill the KVC l-value kind and calculate the base expression when emitting the l-value. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120884 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGValue.h
|
1b726771d00762fb5c4c2638e60d134c385493ae |
|
02-Dec-2010 |
Chris Lattner <sabre@nondot.org> |
Improve codegen for initializer lists to use memset more aggressively when an initializer is variable (I handled the constant case in a previous patch). This has three pieces: 1. Enhance AggValueSlot to have a 'isZeroed' bit to tell CGExprAgg that the memory being stored into has previously been memset to zero. 2. Teach CGExprAgg to not emit stores of zero to isZeroed memory. 3. Teach CodeGenFunction::EmitAggExpr to scan initializers to determine whether they are profitable to emit a memset + inividual stores vs stores for everything. The heuristic used is that a global has to be more than 16 bytes and has to be 3/4 zero to be candidate for this xform. The two testcases are illustrative of the scenarios this catches. We now codegen test9 into: call void @llvm.memset.p0i8.i64(i8* %0, i8 0, i64 400, i32 4, i1 false) %.array = getelementptr inbounds [100 x i32]* %Arr, i32 0, i32 0 %tmp = load i32* %X.addr, align 4 store i32 %tmp, i32* %.array and test10 into: call void @llvm.memset.p0i8.i64(i8* %0, i8 0, i64 392, i32 8, i1 false) %tmp = getelementptr inbounds %struct.b* %S, i32 0, i32 0 %tmp1 = getelementptr inbounds %struct.a* %tmp, i32 0, i32 0 %tmp2 = load i32* %X.addr, align 4 store i32 %tmp2, i32* %tmp1, align 4 %tmp5 = getelementptr inbounds %struct.b* %S, i32 0, i32 3 %tmp10 = getelementptr inbounds %struct.a* %tmp5, i32 0, i32 4 %tmp11 = load i32* %X.addr, align 4 store i32 %tmp11, i32* %tmp10, align 4 Previously we produced 99 stores of zero for test9 and also tons for test10. This xforms should substantially speed up -O0 builds when it kicks in as well as reducing code size and optimizer heartburn on insane cases. This resolves PR279. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120692 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGValue.h
|
12f78a6741a4cb3d904340f8d3d2714568b50e7a |
|
02-Dec-2010 |
John McCall <rjmccall@apple.com> |
Simplify the ASTs by consolidating ObjCImplicitGetterSetterExpr and ObjCPropertyRefExpr into the latter. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120643 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGValue.h
|
74fb0edb44b7ed52af9b8053032ccaab29b5c0cc |
|
17-Nov-2010 |
John McCall <rjmccall@apple.com> |
Reset the lifetime-managed flag between emission of the agg conditional branches. Fixes PR8623. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119408 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGValue.h
|
8a97005f97a2a93fc2cd942c040668c5d4df7537 |
|
23-Oct-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
After discussion with Doug and John, I am reverting the patch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117159 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGValue.h
|
07ed93f378a8868c9a7c04ca7ae685b85c55e5ea |
|
22-Oct-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch fixes miscompile with non-trivial copy constructors and statement expressions, //rdar: //8540501 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117146 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGValue.h
|
3d5aff5d3036b0ff09d114857cd2276134b3d8c9 |
|
15-Oct-2010 |
Dan Gohman <gohman@apple.com> |
Experimental TBAA support. This enables metadata generation by default, however the TBAA pass in the optimizer is still disabled for now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116536 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGValue.h
|
da531344723a0533230a7551dd12d6b7e464dc82 |
|
16-Sep-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Removes unused setter. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114085 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGValue.h
|
6fa291673f1a9f3e72a26caa39f6e9d7562a9754 |
|
16-Sep-2010 |
John McCall <rjmccall@apple.com> |
Further beautification: this pointer can now be typed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114061 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGValue.h
|
d1a5f13140a5bfcf9107b28de906518d2313fdf0 |
|
16-Sep-2010 |
John McCall <rjmccall@apple.com> |
Initialize AggValueSlot's flags along all paths, plus minor beautification. Prospective fix for broken commit in r114045. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114060 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGValue.h
|
474e2fe4957e6e72cee36ed189eaf21878ad0e91 |
|
16-Sep-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to move RequiresGCollection bit to AggValueSlot slot. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114045 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGValue.h
|
558d2abc7f9fd6801cc7677200992313ae90b5d8 |
|
15-Sep-2010 |
John McCall <rjmccall@apple.com> |
one piece of code is responsible for the lifetime of every aggregate slot. The easiest way to do that was to bundle up the information we care about for aggregate slots into a new structure which demands that its creators at least consider the question. I could probably be convinced that the ObjC 'needs GC' bit should be rolled into this structure. Implement generalized copy elision. The main obstacle here is that IR-generation must be much more careful about making sure that exactly git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113962 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGValue.h
|
77c059060f9c8c121d5e8b76957d187223677558 |
|
26-Aug-2010 |
Daniel Dunbar <daniel@zuster.org> |
CGValue: Increase width of allowed alignment. We could switch to log2, but we don't currently need the bits anyway. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112173 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGValue.h
|
f1fbda380b200923ea6275c61cd22cc99d4d75c0 |
|
21-Aug-2010 |
Daniel Dunbar <daniel@zuster.org> |
IRgen/CGValue: Give MakeAddrLValue() an alignment argument, and eliminate old form of MakeAddr(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111723 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGValue.h
|
3491b3d38b9569ab19f417ed2c3c8a86885345a2 |
|
21-Aug-2010 |
Daniel Dunbar <daniel@zuster.org> |
IRgen: Move remaining LValue::Set... methods to LValue::set... (non-static) methods. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111722 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGValue.h
|
99ad7df957b2dc24df55ceff3e05a07ab5959fbd |
|
21-Aug-2010 |
Daniel Dunbar <daniel@zuster.org> |
IRgen/CGValue: Add getQuals(), so qualifiers can be modified on an LValue. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111719 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGValue.h
|
ea619177353e0a9f35b7d926a92df0e103515dbe |
|
21-Aug-2010 |
Daniel Dunbar <daniel@zuster.org> |
IRgen/LValue: Add LValue::setNonGC instead of SetObjCNonGC, for consistency with isNonGC(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111718 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGValue.h
|
5cf8bfec711116b3c4acc70a00717b2e119e7550 |
|
21-Aug-2010 |
Daniel Dunbar <daniel@zuster.org> |
IRgen: Add an LValue::MakeAddr variant which takes a type and uses that to build the qualifiers. Also, add CodeGenFunction::MakeAddrLValue() helper function which passes in the ASTContext. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111714 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGValue.h
|
9f4f7cfe40edd5ed9d8ea7b8ce7c3dd988c7e310 |
|
21-Aug-2010 |
Daniel Dunbar <daniel@zuster.org> |
IRgen/CGValue: Add alignment to LValue, and use that alignment when generating lvalue load/stores. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111710 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGValue.h
|
de988818f4960cae954c6727cb1251142a03d750 |
|
21-Aug-2010 |
Daniel Dunbar <daniel@zuster.org> |
IRgen/LValue: Rename SetQualifiers() to Initialize(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111708 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGValue.h
|
021a7a63984f0f912dc9e9dae2a1b3e1509a40ce |
|
20-Jul-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Adopt objc_assign_threadlocal() for __thread variables of GC types. Implements radar 8203301. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108917 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGValue.h
|
81bf3b35667cb2a241b5157784f28ee9bd3928b2 |
|
02-May-2010 |
Benjamin Kramer <benny.kra@googlemail.com> |
CodeGen: Shrink RValue. 4 words -> 2 words. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102863 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGValue.h
|
7f2896406c8f14bf123578610043a919ba1a1c8a |
|
08-Apr-2010 |
Daniel Dunbar <daniel@zuster.org> |
IRgen: Move the bit-field access type into CGBitFieldInfo, and change bit-field LValues to just store the base address of object containing the bit-field. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100745 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGValue.h
|
efbf487da83883c2da81181cac6f040928aa4289 |
|
06-Apr-2010 |
Daniel Dunbar <daniel@zuster.org> |
IRgen: Move BitFieldIsSigned bit into CGBitFieldInfo. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100513 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGValue.h
|
f0fe5bc0e46038dc79cdd27fcf0c77ad4789fdff |
|
05-Apr-2010 |
Daniel Dunbar <daniel@zuster.org> |
IRgen: Move BitField LValues to just hold a reference to the CGBitFieldInfo. - Unfortunately, this requires some horrible code in CGObjCMac which always allocats a CGBitFieldInfo because we don't currently build a proper layout for Objective-C classes. It needs to be cleaned up, but I don't want the bit-field cleanups to be blocked on that. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100474 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGValue.h
|
519202d315e3f74f42d8a1dea7b2f23dee1a66f0 |
|
03-Nov-2009 |
Mike Stump <mrs@apple.com> |
Fix documentation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85901 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGValue.h
|
6c7a1f364796ce1acb988714e9e42076d1ce332e |
|
25-Sep-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch fixes a code gen. bug in generation of objc_assign_ivar (objc GC's API). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82724 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGValue.h
|
0953e767ff7817f97b3ab20896b229891eeff45b |
|
24-Sep-2009 |
John McCall <rjmccall@apple.com> |
Refactor the representation of qualifiers to bring ExtQualType out of the Type hierarchy. Demote 'volatile' to extended-qualifier status. Audit our use of qualifiers and fix a few places that weren't dealing with qualifiers quite right; many more remain. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82705 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGValue.h
|
fd02ed702e754f8dd0b4c979325ba99c2234f270 |
|
21-Sep-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Miscellanous fixes in generatation of objc gc's write-barriers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82472 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGValue.h
|
1c1afc4ed3ec30fc99e172220c8bb74a13b117b0 |
|
18-Sep-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Fixed a bug in generation of the new write-barriers when array syntax is used to derefernce and assign to ivar pointee. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82183 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGValue.h
|
1eb4433ac451dc16f4133a88af2d002ac26c58ef |
|
09-Sep-2009 |
Mike Stump <mrs@apple.com> |
Remove tabs, and whitespace cleanups. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81346 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGValue.h
|
09105f52b1f28cbb1374c27c3c70f5517e2c465d |
|
20-Aug-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Using "ObjCImplicitSetterGetterRefExpr" instead of "ObjCImplctSetterGetterRefExpr". A field rename and more comments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79537 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGValue.h
|
154440e6a8fa6ac5bca395876d79b530b39a2c1c |
|
18-Aug-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Renamed ObjCKVCRefExpr to ObjCImplctSetterGetterRefExpr. Removed an unnecessary loop to get to setters incoming argument. Added DoxyGen comments. Still more work to do in this area (WIP). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79365 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGValue.h
|
c6a38a47bf3908ab2183d7946498138d8b07c886 |
|
22-Jul-2009 |
Mon P Wang <wangmp@apple.com> |
Preserve address space information through member accesses, e.g., __attribute__((address_space(1))) struct {int arr[ 3 ]; } *p1; ... = p1->arr[2]; // load from address space 1 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76717 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGValue.h
|
6b73568bc3d44ac6e6d62437cba0e307cf8900d6 |
|
28-May-2009 |
Mike Stump <mrs@apple.com> |
Not setting all the fields is confusing... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72506 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGValue.h
|
8b3d93a5947981baa1fc21ad3a6e1220aa953e00 |
|
23-May-2009 |
Mike Stump <mrs@apple.com> |
Add support for volatile RValues. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72341 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGValue.h
|
f5408fe484495ee4efbdd709c8a2c2fdbbbdb328 |
|
16-May-2009 |
Mike Stump <mrs@apple.com> |
Reflow some comments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71937 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGValue.h
|
bf63b87ecf1e62ab8871a81325978377c84e1835 |
|
05-May-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Provide basic support for generation of objc2's objc_assign_global API when assigning to global objective-c object pointer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70939 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGValue.h
|
4f676edd08bf1f1281b162107424141afe143055 |
|
21-Feb-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Handle case of none gc'able objects regardless of their type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65205 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGValue.h
|
c1debf333186f1307cd7d086c3db3e39d7da0a12 |
|
19-Feb-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Some code simplification. ir gen for gc'able array of objects in objc. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64992 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGValue.h
|
1bd885efe4bfeadb1980b39315b026cefe2795c3 |
|
16-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
fix volatile handling with ExtVectorElementExpr, so that we emit two volatile loads for: typedef __attribute__(( ext_vector_type(4) )) float float4; float test(volatile float4 *P) { return P->x+P->y; } git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64683 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGValue.h
|
fea8685bf3036b199c573e70b03affde2583fc44 |
|
16-Dec-2008 |
Nate Begeman <natebegeman@mac.com> |
Remove tabs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61097 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGValue.h
|
43f447098d5e6162fbfb97ed38365284207a7fbe |
|
22-Nov-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
Implemented ir-gen for 'implicit' properties using the new AST nodes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59886 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGValue.h
|
2ab1968eb400331ffe47c560583326e4034aed4a |
|
21-Nov-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
Fields of ivars of struct types are considered ivars themselves for gc API generation purposes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59828 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGValue.h
|
d1cc8040ea57775e52d23765a9a6c1fa4b75526f |
|
20-Nov-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
Support generation of objc_assign_ivar for ivar write-barriers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59748 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGValue.h
|
0c43f2681b13e32171f883b6e874da1a6ae340e9 |
|
19-Nov-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
More of objective-c's gc code-gen. Treat objective-c objects as __strong when attribute unspecified. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59654 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGValue.h
|
dbd32c20c529430fe1d22d87317f039849b8b0bb |
|
19-Nov-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
Few more changes due to Daniel's feedback. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59645 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGValue.h
|
58626500527695865683d1d65053743de8770b60 |
|
19-Nov-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
Generate strong write barriers for __strong objects. Also, took care of Daniel's commments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59575 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGValue.h
|
6dc2317b59cb1180a59f6c283d96b7a5dfeb5307 |
|
18-Nov-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
Generate objc_read_weak for __weak objc loads. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59553 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGValue.h
|
6d657c4809d9128be88705d32768de007b988212 |
|
18-Nov-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
Some basic support toward objective-c's GC code gen. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59543 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGValue.h
|
f951719f81a8eebd1fa6c80ccde843888dfd5d64 |
|
18-Oct-2008 |
Daniel Dunbar <daniel@zuster.org> |
Add FIXME about potential problem in how property ref lvalues are handled. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57743 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGValue.h
|
46f45b9bec4a265ad8400a538e5ec3a5683617f1 |
|
09-Sep-2008 |
Daniel Dunbar <daniel@zuster.org> |
Change CodeGen to emit calls using (RValue,Type) list: - Add CodeGenFunction::EmitAnyExprToTemp o Like EmitAnyExpr, but emits aggregates to a temporary location if none is available. Seems like this should be simpler (even aside from using first class aggregates). - Killed CodeGenFunction::EmitCallArg (just append the pair) - Conversion of RValues to actual call arguments is now isolated in CodeGenFunction::EmitCall. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55970 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGValue.h
|
85c59edda02df48fae8dc85049743319bc6e7e89 |
|
29-Aug-2008 |
Daniel Dunbar <daniel@zuster.org> |
Add special "property reference" CodeGen::LValue type for emitting Objective-C property references. - This handles property references "more correctly" but setters still don't work. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55534 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGValue.h
|
2eecaab0fa5f569c3de82a7f04c5dc39298f472d |
|
23-Aug-2008 |
Daniel Dunbar <daniel@zuster.org> |
Move [LR]Value into CGValue.h - No (intended) functional change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55221 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGValue.h
|