Index: lib/IR/Verifier.cpp =================================================================== --- lib/IR/Verifier.cpp +++ lib/IR/Verifier.cpp @@ -187,6 +187,12 @@ *OS << *C; } + void Write(const APInt *AI) { + if (!AI) + return; + *OS << *AI; + } + template void Write(ArrayRef Vs) { for (const T &V : Vs) Write(V); @@ -285,6 +291,17 @@ // constant expressions, we can arrive at a particular user many times. SmallPtrSet GlobalValueVisited; + /// Cache of TBAA base nodes that have already been visited. This cachce maps + /// a node that has been visited to a pair (IsInvalid, BitWidth) where + /// + /// \c IsInvalid is true iff the node is invalid. + /// \c BitWidth, if non-zero, is the bitwidth of the integer used to denoting + /// the offset of the access. If zero, only a zero offset is allowed. + /// + /// \c BitWidth has no meaning if \c IsInvalid is true. + typedef std::pair TBAABaseNodeSummary; + DenseMap TBAABaseNodes; + void checkAtomicMemAccessSize(Type *Ty, const Instruction *I); public: @@ -390,9 +407,17 @@ void visitFunction(const Function &F); void visitBasicBlock(BasicBlock &BB); void visitRangeMetadata(Instruction& I, MDNode* Range, Type* Ty); - void visitDereferenceableMetadata(Instruction& I, MDNode* MD); + void visitDereferenceableMetadata(Instruction &I, MDNode *MD); void visitTBAAMetadata(Instruction &I, MDNode *MD); + /// \name Helper functions used by \c visitTBAAMetadata. + /// @{ + MDNode *getFieldNodeFromTBAABaseNode(Instruction &I, MDNode *BaseNode, + APInt &Offset); + TBAABaseNodeSummary verifyTBAABaseNode(Instruction &I, MDNode *BaseNode); + TBAABaseNodeSummary verifyTBAABaseNodeImpl(Instruction &I, MDNode *BaseNode); + /// @} + template bool isValidMetadataArray(const MDTuple &N); #define HANDLE_SPECIALIZED_MDNODE_LEAF(CLASS) void visit##CLASS(const CLASS &N); #include "llvm/IR/Metadata.def" @@ -3018,6 +3043,232 @@ } } +/// Verify that \p BaseNode can be used as the "base type" in the struct-path +/// TBAA scheme. This means \p BaseNode is either a scalar node, or a +/// struct-type node describing an aggregate data structure (like a struct). +Verifier::TBAABaseNodeSummary Verifier::verifyTBAABaseNode(Instruction &I, + MDNode *BaseNode) { + if (BaseNode->getNumOperands() < 2) { + CheckFailed("Base nodes must have at least two operands", &I, BaseNode); + return {true, ~0u}; + } + + auto Itr = TBAABaseNodes.find(BaseNode); + if (Itr != TBAABaseNodes.end()) + return Itr->second; + + auto Result = verifyTBAABaseNodeImpl(I, BaseNode); + auto InsertResult = TBAABaseNodes.insert({BaseNode, Result}); + (void)InsertResult; + assert(InsertResult.second && "We just checked!"); + return Result; +} + +Verifier::TBAABaseNodeSummary +Verifier::verifyTBAABaseNodeImpl(Instruction &I, MDNode *BaseNode) { + const Verifier::TBAABaseNodeSummary InvalidNode = {true, ~0u}; + + if (BaseNode->getNumOperands() == 2) { + // This is a scalar base node. + if (!BaseNode->getOperand(0) || !BaseNode->getOperand(1)) { + CheckFailed("Null operands in scalar type nodes!", &I, BaseNode); + return InvalidNode; + } + if (!isa(BaseNode->getOperand(1))) { + CheckFailed("Invalid parent operand in scalar TBAA node", &I, BaseNode); + return InvalidNode; + } + if (!isa(BaseNode->getOperand(0))) { + CheckFailed("Invalid name operand in scalar TBAA node", &I, BaseNode); + return InvalidNode; + } + + // Scalar nodes can only be accessed at offset 0. + return {false, 0}; + } + + if (BaseNode->getNumOperands() % 2 != 1) { + CheckFailed("Struct tag nodes must have an odd number of operands!", + BaseNode); + return InvalidNode; + } + + bool Failed = false; + + Optional PrevOffset; + unsigned BitWidth = ~0u; + + // We've already checked that BaseNode is not a degenerate root node with one + // operand in \c verifyTBAABaseNode, so this loop should run at least once. + for (unsigned Idx = 1; Idx < BaseNode->getNumOperands(); Idx += 2) { + const MDOperand &FieldTy = BaseNode->getOperand(Idx); + const MDOperand &FieldOffset = BaseNode->getOperand(Idx + 1); + if (!isa(FieldTy)) { + CheckFailed("Incorrect field entry in struct type node!", &I, BaseNode); + Failed = true; + continue; + } + + auto *OffsetEntryCI = + mdconst::dyn_extract_or_null(FieldOffset); + if (!OffsetEntryCI) { + CheckFailed("Offset entries must be constants!", &I, BaseNode); + Failed = true; + continue; + } + + if (BitWidth == ~0u) + BitWidth = OffsetEntryCI->getBitWidth(); + + if (OffsetEntryCI->getBitWidth() != BitWidth) { + CheckFailed( + "Bitwidth between the offsets and struct type entries must match", &I, + BaseNode); + Failed = true; + continue; + } + + // NB! As far as I can tell, we generate a non-strictly increasing offset + // sequence only from structs that have zero size bit fields. When + // recursing into a contained struct in \c getFieldNodeFromTBAABaseNode we + // pick the field lexically the latest in struct type metadata node. This + // mirrors the actual behavior of the alias analysis implementation. + bool IsAscending = + !PrevOffset || PrevOffset->ule(OffsetEntryCI->getValue()); + + if (!IsAscending) { + CheckFailed("Offsets must be increasing!", &I, BaseNode); + Failed = true; + } + + PrevOffset = OffsetEntryCI->getValue(); + } + + return Failed ? InvalidNode : Verifier::TBAABaseNodeSummary(false, BitWidth); +} + +/// Returns the field node at the offset \p Offset in \p BaseNode. Update \p +/// Offset in place to be the offset within the field node returned. +/// +/// We assume we've okayed \p BaseNode via \c verifyTBAABaseNode. +MDNode *Verifier::getFieldNodeFromTBAABaseNode(Instruction &I, MDNode *BaseNode, + APInt &Offset) { + assert(BaseNode->getNumOperands() >= 2 && "Invalid base node!"); + + // Scalar nodes have only one possible "field" -- their parent in the access + // hierarchy. Offset must be zero at this point, but our caller is supposed + // to Assert that. + if (BaseNode->getNumOperands() == 2) + return cast(BaseNode->getOperand(1)); + + for (unsigned Idx = 1; Idx < BaseNode->getNumOperands(); Idx += 2) { + auto *OffsetEntryCI = + mdconst::extract(BaseNode->getOperand(Idx + 1)); + if (OffsetEntryCI->getValue().ugt(Offset)) { + if (Idx == 1) { + CheckFailed("Could not TBAA parent in struct type node", &I, BaseNode, + &Offset); + return nullptr; + } + + auto *PrevOffsetEntryCI = + mdconst::extract(BaseNode->getOperand(Idx - 1)); + Offset -= PrevOffsetEntryCI->getValue(); + return cast(BaseNode->getOperand(Idx - 2)); + } + } + + auto *LastOffsetEntryCI = mdconst::extract( + BaseNode->getOperand(BaseNode->getNumOperands() - 1)); + + Offset -= LastOffsetEntryCI->getValue(); + return cast(BaseNode->getOperand(BaseNode->getNumOperands() - 2)); +} + +void Verifier::visitTBAAMetadata(Instruction &I, MDNode *MD) { + bool IsStructPathTBAA = + isa(MD->getOperand(0)) && MD->getNumOperands() >= 3; + + Assert(IsStructPathTBAA, + "Old-style TBAA is no longer allowed, use struct-path TBAA instead", + &I); + + Assert(MD->getNumOperands() < 5, + "Struct tag metadata must have either 3 or 4 operands", &I, MD); + + MDNode *BaseNode = dyn_cast_or_null(MD->getOperand(0)); + MDNode *AccessType = dyn_cast_or_null(MD->getOperand(1)); + + if (MD->getNumOperands() == 4) { + auto *IsImmutableCI = + mdconst::dyn_extract_or_null(MD->getOperand(3)); + Assert(IsImmutableCI, + "Immutability tag on struct tag metadata must be a constant", &I, + MD); + Assert(IsImmutableCI->isZero() || IsImmutableCI->isOne(), + "Immutability part of the struct tag metadata must be either 0 or 1", + &I, MD); + } + + Assert(BaseNode && AccessType, + "Malformed struct tag metadata: base and access-type " + "should be non-null and point to Metadata nodes", + &I, MD, BaseNode, AccessType); + + auto *OffsetCI = mdconst::dyn_extract_or_null(MD->getOperand(2)); + Assert(OffsetCI, "Offset must be constant integer", &I, MD); + + APInt Offset = OffsetCI->getValue(); + + auto IsScalarOrRootNode = + [&](const MDNode *MD) { return MD->getNumOperands() <= 2; }; + + auto IsRootNode = [&](const MDNode *MD) { return MD->getNumOperands() < 2; }; + + bool SeenAccessTypeInPath = false; + + SmallPtrSet StructPath; + StructPath.insert(BaseNode); + + while (!IsRootNode(BaseNode)) { + bool Invalid; + unsigned BaseNodeBitWidth; + std::tie(Invalid, BaseNodeBitWidth) = verifyTBAABaseNode(I, BaseNode); + + // If the base node is invalid in itself, then we've already printed all the + // errors we wanted to print. + if (Invalid) + return; + + Assert(BaseNodeBitWidth == Offset.getBitWidth() || + (BaseNodeBitWidth == 0 && Offset == 0), + "Access bit-width not the same as description bit-width", &I, MD); + + SeenAccessTypeInPath |= BaseNode == AccessType; + BaseNode = getFieldNodeFromTBAABaseNode(I, BaseNode, Offset); + if (!StructPath.insert(BaseNode).second) { + CheckFailed("Cycle detected in struct path!", &I, MD); + return; + } + + if (IsScalarOrRootNode(BaseNode) || BaseNode == AccessType) { + // Ideally we should have been able to guard this clause just under + // IsScalarOrRootNode(BaseNode), but unfortunately we have an ambiguity in + // TBAA metadata today -- we don't have a way to tell a scalar node + // explicitly denoting its non-constness (resp. constness) and a struct + // node with only one field at offset 0 (resp. offset 1). This means we + // can have "access type" nodes for which IsScalarOrRootNode returns + // false. + Assert(Offset == 0, "Offset not zero at the point of scalar access", &I, + MD, &Offset); + } + } + + SeenAccessTypeInPath |= BaseNode == AccessType; + Assert(SeenAccessTypeInPath, "Did not see access type in access path!", &I, + MD); +} + void Verifier::checkAtomicMemAccessSize(Type *Ty, const Instruction *I) { unsigned Size = DL.getTypeSizeInBits(Ty); Assert(Size >= 8, "atomic memory access' size must be byte-sized", Ty, I); @@ -3659,15 +3910,6 @@ "dereferenceable_or_null metadata value must be an i64!", &I); } -void Verifier::visitTBAAMetadata(Instruction &I, MDNode *MD) { - bool IsStructPathTBAA = - isa(MD->getOperand(0)) && MD->getNumOperands() >= 3; - - Assert(IsStructPathTBAA, - "Old-style TBAA is no longer allowed, use struct-path TBAA instead", - &I); -} - /// verifyInstruction - Verify that an instruction is well formed. /// void Verifier::visitInstruction(Instruction &I) { @@ -3800,12 +4042,16 @@ if (MDNode *MD = I.getMetadata(LLVMContext::MD_dereferenceable)) visitDereferenceableMetadata(I, MD); + if (MDNode *TBAA = I.getMetadata(LLVMContext::MD_tbaa)) { + Assert(isa(I) || isa(I) || isa(I) || + isa(I), + "TBAA is only for loads, stores and calls!", &I); + visitTBAAMetadata(I, TBAA); + } + if (MDNode *MD = I.getMetadata(LLVMContext::MD_dereferenceable_or_null)) visitDereferenceableMetadata(I, MD); - if (MDNode *MD = I.getMetadata(LLVMContext::MD_tbaa)) - visitTBAAMetadata(I, MD); - if (MDNode *AlignMD = I.getMetadata(LLVMContext::MD_align)) { Assert(I.getType()->isPointerTy(), "align applies only to pointer types", &I); Index: test/Analysis/BasicAA/full-store-partial-alias.ll =================================================================== --- test/Analysis/BasicAA/full-store-partial-alias.ll +++ test/Analysis/BasicAA/full-store-partial-alias.ll @@ -31,7 +31,7 @@ !0 = !{!4, !4, i64 0} !1 = !{!"omnipotent char", !2} -!2 = !{!"Simple C/C++ TBAA", null} +!2 = !{!"Simple C/C++ TBAA"} !3 = !{!5, !5, i64 0} !4 = !{!"double", !1} !5 = !{!"int", !1} Index: test/Analysis/CFLAliasAnalysis/Steensgaard/full-store-partial-alias.ll =================================================================== --- test/Analysis/CFLAliasAnalysis/Steensgaard/full-store-partial-alias.ll +++ test/Analysis/CFLAliasAnalysis/Steensgaard/full-store-partial-alias.ll @@ -33,7 +33,7 @@ !0 = !{!4, !4, i64 0} !1 = !{!"omnipotent char", !2} -!2 = !{!"Simple C/C++ TBAA", null} +!2 = !{!"Simple C/C++ TBAA"} !3 = !{!5, !5, i64 0} !4 = !{!"double", !1} !5 = !{!"int", !1} Index: test/Analysis/TypeBasedAliasAnalysis/aliastest.ll =================================================================== --- test/Analysis/TypeBasedAliasAnalysis/aliastest.ll +++ test/Analysis/TypeBasedAliasAnalysis/aliastest.ll @@ -63,5 +63,6 @@ !7 = !{ !"foo", !0 } !8 = !{ !"bar", !0 } !9 = !{ !"foo", !0 } -!10 = !{ !"bar", !"different" } +!10 = !{ !"bar", !12 } !11 = !{ !"qux", !0} +!12 = !{!"different"} Index: test/Analysis/TypeBasedAliasAnalysis/cyclic.ll =================================================================== --- test/Analysis/TypeBasedAliasAnalysis/cyclic.ll +++ test/Analysis/TypeBasedAliasAnalysis/cyclic.ll @@ -1,5 +1,5 @@ ; RUN: not opt -instcombine < %s 2>&1 | FileCheck %s -; CHECK: Cycle found in TBAA metadata. +; CHECK: Did not see access type in access path! define void @test6(i32* %gi) #0 { entry: Index: test/Analysis/TypeBasedAliasAnalysis/dse.ll =================================================================== --- test/Analysis/TypeBasedAliasAnalysis/dse.ll +++ test/Analysis/TypeBasedAliasAnalysis/dse.ll @@ -68,5 +68,6 @@ !7 = !{ !"foo", !0 } !8 = !{ !"bar", !0 } !9 = !{ !"foo", !0 } -!10 = !{ !"bar", !"different" } +!10 = !{ !"bar", !12} !11 = !{ !"qux", !0} +!12 = !{!"different"} Index: test/Analysis/TypeBasedAliasAnalysis/dynamic-indices.ll =================================================================== --- test/Analysis/TypeBasedAliasAnalysis/dynamic-indices.ll +++ test/Analysis/TypeBasedAliasAnalysis/dynamic-indices.ll @@ -127,7 +127,7 @@ ; CHECK: [[TYPE_LL]] = !{!"long long", {{!.*}}} !0 = !{!6, !6, i64 0} !1 = !{!"omnipotent char", !2} -!2 = !{!"Simple C/C++ TBAA", null} +!2 = !{!"Simple C/C++ TBAA"} !3 = !{!7, !7, i64 0} !4 = !{!8, !8, i64 0} !5 = !{!9, !9, i64 0} Index: test/Analysis/TypeBasedAliasAnalysis/intrinsics.ll =================================================================== --- test/Analysis/TypeBasedAliasAnalysis/intrinsics.ll +++ test/Analysis/TypeBasedAliasAnalysis/intrinsics.ll @@ -26,7 +26,7 @@ ; CHECK: attributes #1 = { argmemonly nounwind } ; CHECK: attributes [[NUW]] = { nounwind } -!0 = !{!"tbaa root", null} +!0 = !{!"tbaa root"} !1 = !{!3, !3, i64 0} !2 = !{!4, !4, i64 0} !3 = !{!"A", !0} Index: test/Analysis/TypeBasedAliasAnalysis/licm.ll =================================================================== --- test/Analysis/TypeBasedAliasAnalysis/licm.ll +++ test/Analysis/TypeBasedAliasAnalysis/licm.ll @@ -29,7 +29,7 @@ ret void } -!0 = !{!"root", null} +!0 = !{!"root"} !1 = !{!6, !6, i64 0} !2 = !{!7, !7, i64 0} @@ -62,4 +62,4 @@ !6 = !{!"pointer", !0} !7 = !{!"double", !0} !8 = !{!"char", !9} -!9 = !{!"root", null} +!9 = !{!"root"} Index: test/Analysis/TypeBasedAliasAnalysis/memcpyopt.ll =================================================================== --- test/Analysis/TypeBasedAliasAnalysis/memcpyopt.ll +++ test/Analysis/TypeBasedAliasAnalysis/memcpyopt.ll @@ -20,7 +20,7 @@ ; CHECK: [[TAGA]] = !{[[TYPEA:!.*]], [[TYPEA]], i64 0} ; CHECK: [[TYPEA]] = !{!"A", !{{.*}}} -!0 = !{!"tbaa root", null} +!0 = !{!"tbaa root"} !1 = !{!3, !3, i64 0} !2 = !{!4, !4, i64 0} !3 = !{!"A", !0} Index: test/CodeGen/ARM/2011-05-04-MultipleLandingPadSuccs.ll =================================================================== --- test/CodeGen/ARM/2011-05-04-MultipleLandingPadSuccs.ll +++ test/CodeGen/ARM/2011-05-04-MultipleLandingPadSuccs.ll @@ -83,6 +83,6 @@ !0 = !{!"any pointer", !1} !1 = !{!"omnipotent char", !2} -!2 = !{!"Simple C/C++ TBAA", null} +!2 = !{!"Simple C/C++ TBAA"} !3 = !{!"bool", !1} !4 = !{!"int", !1} Index: test/Instrumentation/AddressSanitizer/X86/bug_11395.ll =================================================================== --- test/Instrumentation/AddressSanitizer/X86/bug_11395.ll +++ test/Instrumentation/AddressSanitizer/X86/bug_11395.ll @@ -66,7 +66,7 @@ !0 = !{!5, !5, i64 0} !1 = !{!"omnipotent char", !2} -!2 = !{!"Simple C/C++ TBAA", null} +!2 = !{!"Simple C/C++ TBAA"} !3 = !{!6, !6, i64 0} !4 = !{i32 156132, i32 156164, i32 156205, i32 156238, i32 156282, i32 156332, i32 156370, i32 156408, i32 156447, i32 156486, i32 156536, i32 156574, i32 156612, i32 156651, i32 156690, i32 156740, i32 156778, i32 156816, i32 156855, i32 156894, i32 156944, i32 156982, i32 157020, i32 157059, i32 157098, i32 157148, i32 157186, i32 157224, i32 157263, i32 157302, i32 157352, i32 157390, i32 157428, i32 157467, i32 157506, i32 157556, i32 157594, i32 157632, i32 157671, i32 157710, i32 157760, i32 157798, i32 157836, i32 157875, i32 157914, i32 157952, i32 157996, i32 158046, i32 158099, i32 158140, i32 158179, i32 158218, i32 158268, i32 158321, i32 158362, i32 158401, i32 158440, i32 158490, i32 158543, i32 158584, i32 158623, i32 158662, i32 158712, i32 158765, i32 158806, i32 158845, i32 158884, i32 158922, i32 158963, i32 158996, i32 159029, i32 159062, i32 159109, i32 159154, i32 159199, i32 159243, i32 159286, i32 159329, i32 159375, i32 159422, i32 159478, i32 159522, i32 159566} !5 = !{!"any pointer", !1} Index: test/Instrumentation/ThreadSanitizer/read_from_global.ll =================================================================== --- test/Instrumentation/ThreadSanitizer/read_from_global.ll +++ test/Instrumentation/ThreadSanitizer/read_from_global.ll @@ -54,6 +54,6 @@ ; CHECK: = load ; CHECK: ret void -!0 = !{!"Simple C/C++ TBAA", null} +!0 = !{!"Simple C/C++ TBAA"} !1 = !{!"vtable pointer", !0} !2 = !{!1, !1, i64 0} Index: test/Instrumentation/ThreadSanitizer/vptr_read.ll =================================================================== --- test/Instrumentation/ThreadSanitizer/vptr_read.ll +++ test/Instrumentation/ThreadSanitizer/vptr_read.ll @@ -9,5 +9,5 @@ ret i8 %0 } !0 = !{!2, !2, i64 0} -!1 = !{!"Simple C/C++ TBAA", null} +!1 = !{!"Simple C/C++ TBAA"} !2 = !{!"vtable pointer", !1} Index: test/Instrumentation/ThreadSanitizer/vptr_update.ll =================================================================== --- test/Instrumentation/ThreadSanitizer/vptr_update.ll +++ test/Instrumentation/ThreadSanitizer/vptr_update.ll @@ -36,5 +36,5 @@ } !0 = !{!2, !2, i64 0} -!1 = !{!"Simple C/C++ TBAA", null} +!1 = !{!"Simple C/C++ TBAA"} !2 = !{!"vtable pointer", !1} Index: test/Transforms/GVN/PRE/preserve-tbaa.ll =================================================================== --- test/Transforms/GVN/PRE/preserve-tbaa.ll +++ test/Transforms/GVN/PRE/preserve-tbaa.ll @@ -27,5 +27,5 @@ !0 = !{!3, !3, i64 0} !1 = !{!"omnipotent char", !2} -!2 = !{!"Simple C/C++ TBAA", null} +!2 = !{!"Simple C/C++ TBAA"} !3 = !{!"short", !1} Index: test/Transforms/GVN/tbaa.ll =================================================================== --- test/Transforms/GVN/tbaa.ll +++ test/Transforms/GVN/tbaa.ll @@ -113,13 +113,13 @@ ; CHECK: [[TAGA]] = !{[[TYPEA]], [[TYPEA]], i64 0} !0 = !{!5, !5, i64 0} !1 = !{!6, !6, i64 0} -!2 = !{!"tbaa root", null} +!2 = !{!"tbaa root"} !3 = !{!7, !7, i64 0} !4 = !{!8, !8, i64 0} !5 = !{!"C", !6} !6 = !{!"A", !2} !7 = !{!"B", !6} -!8 = !{!"another root", null} +!8 = !{!"another root"} ;; A TBAA structure who's only point is to have a constant location Index: test/Transforms/JumpThreading/thread-loads.ll =================================================================== --- test/Transforms/JumpThreading/thread-loads.ll +++ test/Transforms/JumpThreading/thread-loads.ll @@ -304,7 +304,7 @@ !0 = !{!3, !3, i64 0} !1 = !{!"omnipotent char", !2} -!2 = !{!"Simple C/C++ TBAA", null} +!2 = !{!"Simple C/C++ TBAA"} !3 = !{!"int", !1} !4 = !{ i32 0, i32 1 } !5 = !{ i32 8, i32 10 } Index: test/Transforms/LICM/2011-04-06-PromoteResultOfPromotion.ll =================================================================== --- test/Transforms/LICM/2011-04-06-PromoteResultOfPromotion.ll +++ test/Transforms/LICM/2011-04-06-PromoteResultOfPromotion.ll @@ -32,7 +32,7 @@ !0 = !{!5, !5, i64 0} !1 = !{!"omnipotent char", !2} -!2 = !{!"Simple C/C++ TBAA", null} +!2 = !{!"Simple C/C++ TBAA"} !3 = !{!"short", !1} !4 = !{!6, !6, i64 0} !5 = !{!"any pointer", !1} Index: test/Transforms/SLPVectorizer/X86/crash_scheduling.ll =================================================================== --- test/Transforms/SLPVectorizer/X86/crash_scheduling.ll +++ test/Transforms/SLPVectorizer/X86/crash_scheduling.ll @@ -1,4 +1,4 @@ -; RUN: opt < %s -basicaa -slp-vectorizer -S -mtriple=x86_64-apple-macosx10.8.0 -mcpu=corei7 +; RUN: opt < %s -basicaa -disable-verify -slp-vectorizer -S -mtriple=x86_64-apple-macosx10.8.0 -mcpu=corei7 target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-apple-darwin13.3.0"