From sabre at nondot.org Mon Mar 1 00:59:22 2010 From: sabre at nondot.org (Chris Lattner) Date: Mon, 01 Mar 2010 06:59:22 -0000 Subject: [llvm-commits] [llvm] r97438 - in /llvm/trunk: include/llvm/CodeGen/SelectionDAGISel.h lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp utils/TableGen/DAGISelMatcher.cpp utils/TableGen/DAGISelMatcher.h utils/TableGen/DAGISelMatcherEmitter.cpp utils/TableGen/DAGISelMatcherOpt.cpp Message-ID: <20100301065922.499222A6C12C@llvm.org> Author: lattner Date: Mon Mar 1 00:59:22 2010 New Revision: 97438 URL: http://llvm.org/viewvc/llvm-project?rev=97438&view=rev Log: add a new OPC_SwitchOpcode which is semantically equivalent to a scope where every child starts with a CheckOpcode, but executes more efficiently. Enhance DAGISelMatcherOpt to form it. This also fixes a bug in CheckOpcode: apparently the SDNodeInfo objects are not pointer comparable, we have to compare the enum name. Modified: llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp llvm/trunk/utils/TableGen/DAGISelMatcher.cpp llvm/trunk/utils/TableGen/DAGISelMatcher.h llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp llvm/trunk/utils/TableGen/DAGISelMatcherOpt.cpp Modified: llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h?rev=97438&r1=97437&r2=97438&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h (original) +++ llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h Mon Mar 1 00:59:22 2010 @@ -112,6 +112,7 @@ OPC_CheckPatternPredicate, OPC_CheckPredicate, OPC_CheckOpcode, + OPC_SwitchOpcode, OPC_CheckMultiOpcode, OPC_CheckType, OPC_CheckChild0Type, OPC_CheckChild1Type, OPC_CheckChild2Type, Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp?rev=97438&r1=97437&r2=97438&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Mon Mar 1 00:59:22 2010 @@ -1757,6 +1757,36 @@ if (N->getOpcode() != MatcherTable[MatcherIndex++]) break; continue; + case OPC_SwitchOpcode: { + unsigned CurNodeOpcode = N.getOpcode(); + + unsigned SwitchStart = MatcherIndex-1; + + unsigned CaseSize; + while (1) { + // Get the size of this case. + CaseSize = MatcherTable[MatcherIndex++]; + if (CaseSize & 128) + CaseSize = GetVBR(CaseSize, MatcherTable, MatcherIndex); + if (CaseSize == 0) break; + + // If the opcode matches, then we will execute this case. + if (CurNodeOpcode == MatcherTable[MatcherIndex++]) + break; + + // Otherwise, skip over this case. + MatcherIndex += CaseSize; + } + + // If we failed to match, bail out. + if (CaseSize == 0) break; + + // Otherwise, execute the case we found. + DEBUG(errs() << " OpcodeSwitch from " << SwitchStart + << " to " << MatcherIndex << "\n"); + continue; + } + case OPC_CheckMultiOpcode: { unsigned NumOps = MatcherTable[MatcherIndex++]; bool OpcodeEquals = false; Modified: llvm/trunk/utils/TableGen/DAGISelMatcher.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelMatcher.cpp?rev=97438&r1=97437&r2=97438&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelMatcher.cpp (original) +++ llvm/trunk/utils/TableGen/DAGISelMatcher.cpp Mon Mar 1 00:59:22 2010 @@ -88,6 +88,16 @@ OS.indent(indent) << "CheckOpcode " << Opcode.getEnumName() << '\n'; } +void SwitchOpcodeMatcher::printImpl(raw_ostream &OS, unsigned indent) const { + OS.indent(indent) << "SwitchOpcode: {\n"; + for (unsigned i = 0, e = Cases.size(); i != e; ++i) { + OS.indent(indent) << "case " << Cases[i].first->getEnumName() << ":\n"; + Cases[i].second->print(OS, indent+2); + } + OS.indent(indent) << "}\n"; +} + + void CheckMultiOpcodeMatcher::printImpl(raw_ostream &OS, unsigned indent) const{ OS.indent(indent) << "CheckMultiOpcode \n"; } @@ -242,6 +252,14 @@ return HashUnsigneds(ChainNodes.begin(), ChainNodes.end()); } +bool CheckOpcodeMatcher::isEqualImpl(const Matcher *M) const { + // Note: pointer equality isn't enough here, we have to check the enum names + // to ensure that the nodes are for the same opcode. + return cast(M)->Opcode.getEnumName() == + Opcode.getEnumName(); +} + + bool EmitNodeMatcherCommon::isEqualImpl(const Matcher *m) const { const EmitNodeMatcherCommon *M = cast(m); return M->OpcodeName == OpcodeName && M->VTs == VTs && @@ -288,7 +306,9 @@ bool CheckOpcodeMatcher::isContradictoryImpl(const Matcher *M) const { if (const CheckOpcodeMatcher *COM = dyn_cast(M)) { // One node can't have two different opcodes! - return &COM->getOpcode() != &getOpcode(); + // Note: pointer equality isn't enough here, we have to check the enum names + // to ensure that the nodes are for the same opcode. + return COM->getOpcode().getEnumName() != getOpcode().getEnumName(); } // TODO: CheckMultiOpcodeMatcher? Modified: llvm/trunk/utils/TableGen/DAGISelMatcher.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelMatcher.h?rev=97438&r1=97437&r2=97438&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelMatcher.h (original) +++ llvm/trunk/utils/TableGen/DAGISelMatcher.h Mon Mar 1 00:59:22 2010 @@ -54,6 +54,7 @@ CheckPatternPredicate, CheckPredicate, // Fail if node predicate fails. CheckOpcode, // Fail if not opcode. + SwitchOpcode, // Dispatch based on opcode. CheckMultiOpcode, // Fail if not in opcode list. CheckType, // Fail if not correct type. CheckChildType, // Fail if child has wrong type. @@ -416,12 +417,37 @@ private: virtual void printImpl(raw_ostream &OS, unsigned indent) const; - virtual bool isEqualImpl(const Matcher *M) const { - return &cast(M)->Opcode == &Opcode; - } + virtual bool isEqualImpl(const Matcher *M) const; virtual unsigned getHashImpl() const; virtual bool isContradictoryImpl(const Matcher *M) const; }; + +/// SwitchOpcodeMatcher - Switch based on the current node's opcode, dispatching +/// to one matcher per opcode. If the opcode doesn't match any of the cases, +/// then the match fails. This is semantically equivalent to a Scope node where +/// every child does a CheckOpcode, but is much faster. +class SwitchOpcodeMatcher : public Matcher { + SmallVector, 8> Cases; +public: + SwitchOpcodeMatcher(const std::pair *cases, + unsigned numcases) + : Matcher(SwitchOpcode), Cases(cases, cases+numcases) {} + + static inline bool classof(const Matcher *N) { + return N->getKind() == SwitchOpcode; + } + + unsigned getNumCases() const { return Cases.size(); } + + const SDNodeInfo &getCaseOpcode(unsigned i) const { return *Cases[i].first; } + Matcher *getCaseMatcher(unsigned i) { return Cases[i].second; } + const Matcher *getCaseMatcher(unsigned i) const { return Cases[i].second; } + +private: + virtual void printImpl(raw_ostream &OS, unsigned indent) const; + virtual bool isEqualImpl(const Matcher *M) const { return false; } + virtual unsigned getHashImpl() const { return 4123; } +}; /// CheckMultiOpcodeMatcher - This checks to see if the current node has one /// of the specified opcode, if not it fails to match. Modified: llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp?rev=97438&r1=97437&r2=97438&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp (original) +++ llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp Mon Mar 1 00:59:22 2010 @@ -158,8 +158,8 @@ TmpBuf.clear(); raw_svector_ostream OS(TmpBuf); formatted_raw_ostream FOS(OS); - ChildSize = EmitMatcherList(cast(N)->getChild(i), - Indent+1, CurrentIdx+VBRSize, FOS); + ChildSize = EmitMatcherList(SM->getChild(i), Indent+1, + CurrentIdx+VBRSize, FOS); } while (GetVBRSize(ChildSize) != VBRSize); assert(ChildSize != 0 && "Should not have a zero-sized child!"); @@ -235,6 +235,53 @@ << cast(N)->getOpcode().getEnumName() << ",\n"; return 2; + case Matcher::SwitchOpcode: { + unsigned StartIdx = CurrentIdx; + const SwitchOpcodeMatcher *SOM = cast(N); + OS << "OPC_SwitchOpcode /*" << SOM->getNumCases() << " cases */, "; + ++CurrentIdx; + + // For each case we emit the size, then the opcode, then the matcher. + for (unsigned i = 0, e = SOM->getNumCases(); i != e; ++i) { + // We need to encode the opcode and the offset of the case code before + // emitting the case code. Handle this by buffering the output into a + // string while we get the size. Unfortunately, the offset of the + // children depends on the VBR size of the child, so for large children we + // have to iterate a bit. + SmallString<128> TmpBuf; + unsigned ChildSize = 0; + unsigned VBRSize = 0; + do { + VBRSize = GetVBRSize(ChildSize); + + TmpBuf.clear(); + raw_svector_ostream OS(TmpBuf); + formatted_raw_ostream FOS(OS); + ChildSize = EmitMatcherList(SOM->getCaseMatcher(i), + Indent+1, CurrentIdx+VBRSize+1, FOS); + } while (GetVBRSize(ChildSize) != VBRSize); + + assert(ChildSize != 0 && "Should not have a zero-sized child!"); + + if (i != 0) + OS.PadToColumn(Indent*2) << "/*SwitchOpcode*/ "; + + // Emit the VBR. + CurrentIdx += EmitVBRValue(ChildSize, OS); + + OS << " " << SOM->getCaseOpcode(i).getEnumName() << ","; + OS << "// ->" << CurrentIdx+ChildSize+1 << '\n'; + ++CurrentIdx; + OS << TmpBuf.str(); + CurrentIdx += ChildSize; + } + + // Emit the final zero to terminate the switch. + OS.PadToColumn(Indent*2) << "0, // EndSwitchOpcode\n"; + ++CurrentIdx; + return CurrentIdx-StartIdx; + } + case Matcher::CheckMultiOpcode: { const CheckMultiOpcodeMatcher *CMO = cast(N); OS << "OPC_CheckMultiOpcode, " << CMO->getNumOpcodes() << ", "; @@ -575,6 +622,7 @@ OS << "OPC_CheckPatternPredicate"; break; case Matcher::CheckPredicate: OS << "OPC_CheckPredicate"; break; case Matcher::CheckOpcode: OS << "OPC_CheckOpcode"; break; + case Matcher::SwitchOpcode: OS << "OPC_SwitchOpcode"; break; case Matcher::CheckMultiOpcode: OS << "OPC_CheckMultiOpcode"; break; case Matcher::CheckType: OS << "OPC_CheckType"; break; case Matcher::CheckChildType: OS << "OPC_CheckChildType"; break; Modified: llvm/trunk/utils/TableGen/DAGISelMatcherOpt.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelMatcherOpt.cpp?rev=97438&r1=97437&r2=97438&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelMatcherOpt.cpp (original) +++ llvm/trunk/utils/TableGen/DAGISelMatcherOpt.cpp Mon Mar 1 00:59:22 2010 @@ -15,6 +15,7 @@ #include "DAGISelMatcher.h" #include "CodeGenDAGPatterns.h" #include "llvm/ADT/DenseMap.h" +#include "llvm/ADT/StringSet.h" #include "llvm/Support/Debug.h" #include "llvm/Support/raw_ostream.h" #include @@ -152,7 +153,8 @@ // like X86 where many operations are valid on multiple types. if ((isa(N) || isa(N) || isa(N)) && - isa(N->getNext())) { + (isa(N->getNext()) || + isa(N->getNext()))) { // Unlink the two nodes from the list. Matcher *CheckType = MatcherPtr.take(); Matcher *CheckOpcode = CheckType->takeNext(); @@ -256,7 +258,7 @@ } SmallVector NewOptionsToMatch; - + // Loop over options to match, merging neighboring patterns with identical // starting nodes into a shared matcher. for (unsigned OptionIdx = 0, e = OptionsToMatch.size(); OptionIdx != e;) { @@ -342,13 +344,55 @@ NewOptionsToMatch.push_back(Shared); } + + // If we're down to a single pattern to match, then we don't need this scope + // anymore. + if (NewOptionsToMatch.size() == 1) { + MatcherPtr.reset(NewOptionsToMatch[0]); + return; + } + + // If our factoring failed (didn't achieve anything) see if we can simplify in + // other ways. + + // Check to see if all of the leading entries are now opcode checks. If so, + // we can convert this Scope to be a OpcodeSwitch instead. + bool AllOpcodeChecks = true; + for (unsigned i = 0, e = NewOptionsToMatch.size(); i != e; ++i) { + if (isa(NewOptionsToMatch[i])) continue; + +#if 0 + if (i > 3) { + errs() << "FAILING OPC #" << i << "\n"; + NewOptionsToMatch[i]->dump(); + } +#endif + + AllOpcodeChecks = false; + break; + } + + // If all the options are CheckOpcode's, we can form the SwitchOpcode, woot. + if (AllOpcodeChecks) { + StringSet<> Opcodes; + SmallVector, 8> Cases; + for (unsigned i = 0, e = NewOptionsToMatch.size(); i != e; ++i) { + CheckOpcodeMatcher *COM =cast(NewOptionsToMatch[i]); + assert(Opcodes.insert(COM->getOpcode().getEnumName()) && + "Duplicate opcodes not factored?"); + Cases.push_back(std::make_pair(&COM->getOpcode(), COM->getNext())); + } + + MatcherPtr.reset(new SwitchOpcodeMatcher(&Cases[0], Cases.size())); + return; + } + // Reassemble a new Scope node. - assert(!NewOptionsToMatch.empty() && "where'd all our children go?"); + assert(!NewOptionsToMatch.empty() && + "Where'd all our children go? Did we really factor everything??"); if (NewOptionsToMatch.empty()) MatcherPtr.reset(0); - if (NewOptionsToMatch.size() == 1) - MatcherPtr.reset(NewOptionsToMatch[0]); else { Scope->setNumChildren(NewOptionsToMatch.size()); for (unsigned i = 0, e = NewOptionsToMatch.size(); i != e; ++i) From sabre at nondot.org Mon Mar 1 01:17:40 2010 From: sabre at nondot.org (Chris Lattner) Date: Mon, 01 Mar 2010 07:17:40 -0000 Subject: [llvm-commits] [llvm] r97439 - in /llvm/trunk: include/llvm/CodeGen/SelectionDAGISel.h lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp utils/TableGen/DAGISelEmitter.cpp utils/TableGen/DAGISelMatcher.cpp utils/TableGen/DAGISelMatcher.h utils/TableGen/DAGISelMatcherEmitter.cpp utils/TableGen/DAGISelMatcherGen.cpp utils/TableGen/DAGISelMatcherOpt.cpp Message-ID: <20100301071741.0F05B2A6C12C@llvm.org> Author: lattner Date: Mon Mar 1 01:17:40 2010 New Revision: 97439 URL: http://llvm.org/viewvc/llvm-project?rev=97439&view=rev Log: eliminate the CheckMultiOpcodeMatcher code and have each ComplexPattern at the root be generated multiple times, once for each opcode they are part of. This encourages factoring because the opcode checks get treated just like everything else in the matcher. Modified: llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp llvm/trunk/utils/TableGen/DAGISelEmitter.cpp llvm/trunk/utils/TableGen/DAGISelMatcher.cpp llvm/trunk/utils/TableGen/DAGISelMatcher.h llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp llvm/trunk/utils/TableGen/DAGISelMatcherOpt.cpp Modified: llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h?rev=97439&r1=97438&r2=97439&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h (original) +++ llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h Mon Mar 1 01:17:40 2010 @@ -113,7 +113,6 @@ OPC_CheckPredicate, OPC_CheckOpcode, OPC_SwitchOpcode, - OPC_CheckMultiOpcode, OPC_CheckType, OPC_CheckChild0Type, OPC_CheckChild1Type, OPC_CheckChild2Type, OPC_CheckChild3Type, OPC_CheckChild4Type, OPC_CheckChild5Type, Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp?rev=97439&r1=97438&r2=97439&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Mon Mar 1 01:17:40 2010 @@ -1787,15 +1787,6 @@ continue; } - case OPC_CheckMultiOpcode: { - unsigned NumOps = MatcherTable[MatcherIndex++]; - bool OpcodeEquals = false; - for (unsigned i = 0; i != NumOps; ++i) - OpcodeEquals |= N->getOpcode() == MatcherTable[MatcherIndex++]; - if (!OpcodeEquals) break; - continue; - } - case OPC_CheckType: { MVT::SimpleValueType VT = (MVT::SimpleValueType)MatcherTable[MatcherIndex++]; Modified: llvm/trunk/utils/TableGen/DAGISelEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelEmitter.cpp?rev=97439&r1=97438&r2=97439&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelEmitter.cpp (original) +++ llvm/trunk/utils/TableGen/DAGISelEmitter.cpp Mon Mar 1 01:17:40 2010 @@ -1959,10 +1959,17 @@ PatternSortingPredicate2(CGP)); - // Convert each pattern into Matcher's. + // Convert each variant of each pattern into a Matcher. std::vector PatternMatchers; - for (unsigned i = 0, e = Patterns.size(); i != e; ++i) - PatternMatchers.push_back(ConvertPatternToMatcher(*Patterns[i], CGP)); + for (unsigned i = 0, e = Patterns.size(); i != e; ++i) { + for (unsigned Variant = 0; ; ++Variant) { + if (Matcher *M = ConvertPatternToMatcher(*Patterns[i], Variant, CGP)) + PatternMatchers.push_back(M); + else + break; + } + } + Matcher *TheMatcher = new ScopeMatcher(&PatternMatchers[0], PatternMatchers.size()); Modified: llvm/trunk/utils/TableGen/DAGISelMatcher.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelMatcher.cpp?rev=97439&r1=97438&r2=97439&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelMatcher.cpp (original) +++ llvm/trunk/utils/TableGen/DAGISelMatcher.cpp Mon Mar 1 01:17:40 2010 @@ -98,10 +98,6 @@ } -void CheckMultiOpcodeMatcher::printImpl(raw_ostream &OS, unsigned indent) const{ - OS.indent(indent) << "CheckMultiOpcode \n"; -} - void CheckTypeMatcher::printImpl(raw_ostream &OS, unsigned indent) const { OS.indent(indent) << "CheckType " << getEnumName(Type) << '\n'; } @@ -221,13 +217,6 @@ return HashString(Opcode.getEnumName()); } -unsigned CheckMultiOpcodeMatcher::getHashImpl() const { - unsigned Result = 0; - for (unsigned i = 0, e = Opcodes.size(); i != e; ++i) - Result |= HashString(Opcodes[i]->getEnumName()); - return Result; -} - unsigned CheckCondCodeMatcher::getHashImpl() const { return HashString(CondCodeName); } @@ -311,8 +300,6 @@ return COM->getOpcode().getEnumName() != getOpcode().getEnumName(); } - // TODO: CheckMultiOpcodeMatcher? - // If the node has a known type, and if the type we're checking for is // different, then we know they contradict. For example, a check for // ISD::STORE will never be true at the same time a check for Type i32 is. Modified: llvm/trunk/utils/TableGen/DAGISelMatcher.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelMatcher.h?rev=97439&r1=97438&r2=97439&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelMatcher.h (original) +++ llvm/trunk/utils/TableGen/DAGISelMatcher.h Mon Mar 1 01:17:40 2010 @@ -25,7 +25,7 @@ class Record; class SDNodeInfo; -Matcher *ConvertPatternToMatcher(const PatternToMatch &Pattern, +Matcher *ConvertPatternToMatcher(const PatternToMatch &Pattern,unsigned Variant, const CodeGenDAGPatterns &CGP); Matcher *OptimizeMatcher(Matcher *Matcher, const CodeGenDAGPatterns &CGP); void EmitMatcherTable(const Matcher *Matcher, const CodeGenDAGPatterns &CGP, @@ -449,33 +449,6 @@ virtual unsigned getHashImpl() const { return 4123; } }; -/// CheckMultiOpcodeMatcher - This checks to see if the current node has one -/// of the specified opcode, if not it fails to match. -class CheckMultiOpcodeMatcher : public Matcher { - SmallVector Opcodes; -public: - CheckMultiOpcodeMatcher(const SDNodeInfo * const *opcodes, unsigned numops) - : Matcher(CheckMultiOpcode), Opcodes(opcodes, opcodes+numops) {} - - unsigned getNumOpcodes() const { return Opcodes.size(); } - const SDNodeInfo &getOpcode(unsigned i) const { return *Opcodes[i]; } - - static inline bool classof(const Matcher *N) { - return N->getKind() == CheckMultiOpcode; - } - - virtual bool isSafeToReorderWithPatternPredicate() const { return true; } - -private: - virtual void printImpl(raw_ostream &OS, unsigned indent) const; - virtual bool isEqualImpl(const Matcher *M) const { - return cast(M)->Opcodes == Opcodes; - } - virtual unsigned getHashImpl() const; -}; - - - /// CheckTypeMatcher - This checks to see if the current node has the /// specified type, if not it fails to match. class CheckTypeMatcher : public Matcher { Modified: llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp?rev=97439&r1=97438&r2=97439&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp (original) +++ llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp Mon Mar 1 01:17:40 2010 @@ -282,16 +282,7 @@ return CurrentIdx-StartIdx; } - case Matcher::CheckMultiOpcode: { - const CheckMultiOpcodeMatcher *CMO = cast(N); - OS << "OPC_CheckMultiOpcode, " << CMO->getNumOpcodes() << ", "; - for (unsigned i = 0, e = CMO->getNumOpcodes(); i != e; ++i) - OS << CMO->getOpcode(i).getEnumName() << ", "; - OS << '\n'; - return 2 + CMO->getNumOpcodes(); - } - - case Matcher::CheckType: + case Matcher::CheckType: OS << "OPC_CheckType, " << getEnumName(cast(N)->getType()) << ",\n"; return 2; @@ -623,7 +614,6 @@ case Matcher::CheckPredicate: OS << "OPC_CheckPredicate"; break; case Matcher::CheckOpcode: OS << "OPC_CheckOpcode"; break; case Matcher::SwitchOpcode: OS << "OPC_SwitchOpcode"; break; - case Matcher::CheckMultiOpcode: OS << "OPC_CheckMultiOpcode"; break; case Matcher::CheckType: OS << "OPC_CheckType"; break; case Matcher::CheckChildType: OS << "OPC_CheckChildType"; break; case Matcher::CheckInteger: OS << "OPC_CheckInteger"; break; Modified: llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp?rev=97439&r1=97438&r2=97439&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp (original) +++ llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp Mon Mar 1 01:17:40 2010 @@ -97,7 +97,7 @@ delete PatWithNoTypes; } - void EmitMatcherCode(); + bool EmitMatcherCode(unsigned Variant); void EmitResultCode(); Matcher *GetMatcher() const { return TheMatcher; } @@ -247,20 +247,6 @@ // Handle complex pattern. const ComplexPattern &CP = CGP.getComplexPattern(LeafRec); - - // If we're at the root of the pattern, we have to check that the opcode - // is a one of the ones requested to be matched. - if (N == Pattern.getSrcPattern()) { - const std::vector &OpNodes = CP.getRootNodes(); - if (OpNodes.size() == 1) { - AddMatcher(new CheckOpcodeMatcher(CGP.getSDNodeInfo(OpNodes[0]))); - } else if (!OpNodes.empty()) { - SmallVector OpNames; - for (unsigned i = 0, e = OpNodes.size(); i != e; i++) - OpNames.push_back(&CGP.getSDNodeInfo(OpNodes[i])); - AddMatcher(new CheckMultiOpcodeMatcher(OpNames.data(), OpNames.size())); - } - } // Emit a CheckComplexPat operation, which does the match (aborting if it // fails) and pushes the matched operands onto the recorded nodes list. @@ -495,7 +481,30 @@ EmitOperatorMatchCode(N, NodeNoTypes); } -void MatcherGen::EmitMatcherCode() { +/// EmitMatcherCode - Generate the code that matches the predicate of this +/// pattern for the specified Variant. If the variant is invalid this returns +/// true and does not generate code, if it is valid, it returns false. +bool MatcherGen::EmitMatcherCode(unsigned Variant) { + // If the root of the pattern is a ComplexPattern and if it is specified to + // match some number of root opcodes, these are considered to be our variants. + // Depending on which variant we're generating code for, emit the root opcode + // check. + if (const ComplexPattern *CP = + Pattern.getSrcPattern()->getComplexPatternInfo(CGP)) { + + const std::vector &OpNodes = CP->getRootNodes(); + if (OpNodes.empty()) { + // FIXME: Empty OpNodes runs on everything, is this even valid? + if (Variant != 0) return true; + } else { + if (Variant >= OpNodes.size()) return true; + + AddMatcher(new CheckOpcodeMatcher(CGP.getSDNodeInfo(OpNodes[Variant]))); + } + } else { + if (Variant != 0) return true; + } + // If the pattern has a predicate on it (e.g. only enabled when a subtarget // feature is around, do the check). // FIXME: This should get emitted after the match code below to encourage @@ -503,11 +512,11 @@ // dag combine, eliminating the horrible side-effect-full stuff from // X86's MatchAddress. if (!Pattern.getPredicateCheck().empty()) - AddMatcher(new - CheckPatternPredicateMatcher(Pattern.getPredicateCheck())); - + AddMatcher(new CheckPatternPredicateMatcher(Pattern.getPredicateCheck())); + // Emit the matcher for the pattern structure and types. EmitMatchCode(Pattern.getSrcPattern(), PatWithNoTypes); + return false; } @@ -849,13 +858,16 @@ } +/// ConvertPatternToMatcher - Create the matcher for the specified pattern with +/// the specified variant. If the variant number is invalid, this returns null. Matcher *llvm::ConvertPatternToMatcher(const PatternToMatch &Pattern, + unsigned Variant, const CodeGenDAGPatterns &CGP) { MatcherGen Gen(Pattern, CGP); // Generate the code for the matcher. - Gen.EmitMatcherCode(); - + if (Gen.EmitMatcherCode(Variant)) + return 0; // FIXME2: Kill extra MoveParent commands at the end of the matcher sequence. // FIXME2: Split result code out to another table, and make the matcher end Modified: llvm/trunk/utils/TableGen/DAGISelMatcherOpt.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelMatcherOpt.cpp?rev=97439&r1=97438&r2=97439&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelMatcherOpt.cpp (original) +++ llvm/trunk/utils/TableGen/DAGISelMatcherOpt.cpp Mon Mar 1 01:17:40 2010 @@ -153,8 +153,7 @@ // like X86 where many operations are valid on multiple types. if ((isa(N) || isa(N) || isa(N)) && - (isa(N->getNext()) || - isa(N->getNext()))) { + isa(N->getNext())) { // Unlink the two nodes from the list. Matcher *CheckType = MatcherPtr.take(); Matcher *CheckOpcode = CheckType->takeNext(); From sabre at nondot.org Mon Mar 1 01:27:07 2010 From: sabre at nondot.org (Chris Lattner) Date: Mon, 01 Mar 2010 07:27:07 -0000 Subject: [llvm-commits] [llvm] r97440 - in /llvm/trunk/utils/TableGen: DAGISelMatcher.h DAGISelMatcherGen.cpp Message-ID: <20100301072707.622CF2A6C12C@llvm.org> Author: lattner Date: Mon Mar 1 01:27:07 2010 New Revision: 97440 URL: http://llvm.org/viewvc/llvm-project?rev=97440&view=rev Log: Emit a redundant check for immediates at root context, e.g. (imm 0). This allows formation of OpcodeSwitch for top level patterns, in particular on X86. This saves about 1K of data space in the x86 table and makes the dispatch much more efficient. Modified: llvm/trunk/utils/TableGen/DAGISelMatcher.h llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp Modified: llvm/trunk/utils/TableGen/DAGISelMatcher.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelMatcher.h?rev=97440&r1=97439&r2=97440&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelMatcher.h (original) +++ llvm/trunk/utils/TableGen/DAGISelMatcher.h Mon Mar 1 01:27:07 2010 @@ -55,7 +55,6 @@ CheckPredicate, // Fail if node predicate fails. CheckOpcode, // Fail if not opcode. SwitchOpcode, // Dispatch based on opcode. - CheckMultiOpcode, // Fail if not in opcode list. CheckType, // Fail if not correct type. CheckChildType, // Fail if child has wrong type. CheckInteger, // Fail if wrong val. Modified: llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp?rev=97440&r1=97439&r2=97440&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp (original) +++ llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp Mon Mar 1 01:27:07 2010 @@ -205,8 +205,17 @@ AddMatcher(new CheckPredicateMatcher(N->getPredicateFns()[i])); // Direct match against an integer constant. - if (IntInit *II = dynamic_cast(N->getLeafValue())) + if (IntInit *II = dynamic_cast(N->getLeafValue())) { + // If this is the root of the dag we're matching, we emit a redundant opcode + // check to ensure that this gets folded into the normal top-level + // OpcodeSwitch. + if (N == Pattern.getSrcPattern()) { + const SDNodeInfo &NI = CGP.getSDNodeInfo(CGP.getSDNodeNamed("imm")); + AddMatcher(new CheckOpcodeMatcher(NI)); + } + return AddMatcher(new CheckIntegerMatcher(II->getValue())); + } DefInit *DI = dynamic_cast(N->getLeafValue()); if (DI == 0) { From sabre at nondot.org Mon Mar 1 01:43:08 2010 From: sabre at nondot.org (Chris Lattner) Date: Mon, 01 Mar 2010 07:43:08 -0000 Subject: [llvm-commits] [llvm] r97441 - in /llvm/trunk/lib/CodeGen/SelectionDAG: SelectionDAG.cpp SelectionDAGISel.cpp Message-ID: <20100301074308.AE69C2A6C12C@llvm.org> Author: lattner Date: Mon Mar 1 01:43:08 2010 New Revision: 97441 URL: http://llvm.org/viewvc/llvm-project?rev=97441&view=rev Log: some trivial microoptimizations. Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp?rev=97441&r1=97440&r2=97441&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Mon Mar 1 01:43:08 2010 @@ -4736,12 +4736,14 @@ // Delete any nodes that are still dead after adding the uses for the // new operands. - SmallVector DeadNodes; - for (SmallPtrSet::iterator I = DeadNodeSet.begin(), - E = DeadNodeSet.end(); I != E; ++I) - if ((*I)->use_empty()) - DeadNodes.push_back(*I); - RemoveDeadNodes(DeadNodes); + if (!DeadNodeSet.empty()) { + SmallVector DeadNodes; + for (SmallPtrSet::iterator I = DeadNodeSet.begin(), + E = DeadNodeSet.end(); I != E; ++I) + if ((*I)->use_empty()) + DeadNodes.push_back(*I); + RemoveDeadNodes(DeadNodes); + } if (IP) CSEMap.InsertNode(N, IP); // Memoize the new node. Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp?rev=97441&r1=97440&r2=97441&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Mon Mar 1 01:43:08 2010 @@ -1760,7 +1760,7 @@ case OPC_SwitchOpcode: { unsigned CurNodeOpcode = N.getOpcode(); - unsigned SwitchStart = MatcherIndex-1; + unsigned SwitchStart = MatcherIndex-1; (void)SwitchStart; unsigned CaseSize; while (1) { @@ -2060,8 +2060,15 @@ if (EmitNodeInfo & OPFL_FlagOutput) VTs.push_back(MVT::Flag); - // FIXME: Use faster version for the common 'one VT' case? - SDVTList VTList = CurDAG->getVTList(VTs.data(), VTs.size()); + // This is hot code, so optimize the two most common cases of 1 and 2 + // results. + SDVTList VTList; + if (VTs.size() == 1) + VTList = CurDAG->getVTList(VTs[0]); + else if (VTs.size() == 2) + VTList = CurDAG->getVTList(VTs[0], VTs[1]); + else + VTList = CurDAG->getVTList(VTs.data(), VTs.size()); // Get the operand list. unsigned NumOps = MatcherTable[MatcherIndex++]; From sabre at nondot.org Mon Mar 1 01:54:59 2010 From: sabre at nondot.org (Chris Lattner) Date: Mon, 01 Mar 2010 07:54:59 -0000 Subject: [llvm-commits] [llvm] r97442 - /llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp Message-ID: <20100301075459.CEFBE2A6C12C@llvm.org> Author: lattner Date: Mon Mar 1 01:54:59 2010 New Revision: 97442 URL: http://llvm.org/viewvc/llvm-project?rev=97442&view=rev Log: Emit type checks late instead of early, this encourages structural matching code to be factored and shared this shrinks the X86 isel table from 86537 to 83890 bytes. Modified: llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp Modified: llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp?rev=97442&r1=97441&r2=97442&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp (original) +++ llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp Mon Mar 1 01:54:59 2010 @@ -460,8 +460,9 @@ // If N and NodeNoTypes don't agree on a type, then this is a case where we // need to do a type check. Emit the check, apply the tyep to NodeNoTypes and // reinfer any correlated types. + unsigned NodeType = EEVT::isUnknown; if (NodeNoTypes->getExtTypes() != N->getExtTypes()) { - AddMatcher(new CheckTypeMatcher(N->getTypeNum(0))); + NodeType = N->getTypeNum(0); NodeNoTypes->setTypes(N->getExtTypes()); InferPossibleTypes(); } @@ -488,6 +489,10 @@ EmitLeafMatchCode(N); else EmitOperatorMatchCode(N, NodeNoTypes); + + if (NodeType != EEVT::isUnknown) + AddMatcher(new CheckTypeMatcher((MVT::SimpleValueType)NodeType)); + } /// EmitMatcherCode - Generate the code that matches the predicate of this From gohman at apple.com Mon Mar 1 11:34:28 2010 From: gohman at apple.com (Dan Gohman) Date: Mon, 01 Mar 2010 17:34:28 -0000 Subject: [llvm-commits] [llvm] r97446 - /llvm/trunk/lib/VMCore/PassManager.cpp Message-ID: <20100301173428.450462A6C12C@llvm.org> Author: djg Date: Mon Mar 1 11:34:28 2010 New Revision: 97446 URL: http://llvm.org/viewvc/llvm-project?rev=97446&view=rev Log: Don't print "Modified" for passes which haven't modified anything. Modified: llvm/trunk/lib/VMCore/PassManager.cpp Modified: llvm/trunk/lib/VMCore/PassManager.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/PassManager.cpp?rev=97446&r1=97445&r2=97446&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/PassManager.cpp (original) +++ llvm/trunk/lib/VMCore/PassManager.cpp Mon Mar 1 11:34:28 2010 @@ -1118,6 +1118,7 @@ for (Function::iterator I = F.begin(), E = F.end(); I != E; ++I) for (unsigned Index = 0; Index < getNumContainedPasses(); ++Index) { BasicBlockPass *BP = getContainedPass(Index); + bool LocalChanged = false; dumpPassInfo(BP, EXECUTION_MSG, ON_BASICBLOCK_MSG, I->getName()); dumpRequiredSet(BP); @@ -1129,11 +1130,12 @@ PassManagerPrettyStackEntry X(BP, *I); Timer *T = StartPassTimer(BP); - Changed |= BP->runOnBasicBlock(*I); + LocalChanged |= BP->runOnBasicBlock(*I); StopPassTimer(BP, T); } - if (Changed) + Changed |= LocalChanged; + if (LocalChanged) dumpPassInfo(BP, MODIFICATION_MSG, ON_BASICBLOCK_MSG, I->getName()); dumpPreservedSet(BP); @@ -1334,6 +1336,7 @@ for (unsigned Index = 0; Index < getNumContainedPasses(); ++Index) { FunctionPass *FP = getContainedPass(Index); + bool LocalChanged = false; dumpPassInfo(FP, EXECUTION_MSG, ON_FUNCTION_MSG, F.getName()); dumpRequiredSet(FP); @@ -1344,11 +1347,12 @@ PassManagerPrettyStackEntry X(FP, F); Timer *T = StartPassTimer(FP); - Changed |= FP->runOnFunction(F); + LocalChanged |= FP->runOnFunction(F); StopPassTimer(FP, T); } - if (Changed) + Changed |= LocalChanged; + if (LocalChanged) dumpPassInfo(FP, MODIFICATION_MSG, ON_FUNCTION_MSG, F.getName()); dumpPreservedSet(FP); @@ -1407,6 +1411,7 @@ for (unsigned Index = 0; Index < getNumContainedPasses(); ++Index) { ModulePass *MP = getContainedPass(Index); + bool LocalChanged = false; dumpPassInfo(MP, EXECUTION_MSG, ON_MODULE_MSG, M.getModuleIdentifier()); dumpRequiredSet(MP); @@ -1416,11 +1421,12 @@ { PassManagerPrettyStackEntry X(MP, M); Timer *T = StartPassTimer(MP); - Changed |= MP->runOnModule(M); + LocalChanged |= MP->runOnModule(M); StopPassTimer(MP, T); } - if (Changed) + Changed |= LocalChanged; + if (LocalChanged) dumpPassInfo(MP, MODIFICATION_MSG, ON_MODULE_MSG, M.getModuleIdentifier()); dumpPreservedSet(MP); From gohman at apple.com Mon Mar 1 11:41:39 2010 From: gohman at apple.com (Dan Gohman) Date: Mon, 01 Mar 2010 17:41:39 -0000 Subject: [llvm-commits] [llvm] r97447 - /llvm/trunk/docs/LangRef.html Message-ID: <20100301174140.13AD42A6C12C@llvm.org> Author: djg Date: Mon Mar 1 11:41:39 2010 New Revision: 97447 URL: http://llvm.org/viewvc/llvm-project?rev=97447&view=rev Log: Fix spelling. Modified: llvm/trunk/docs/LangRef.html Modified: llvm/trunk/docs/LangRef.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/LangRef.html?rev=97447&r1=97446&r2=97447&view=diff ============================================================================== --- llvm/trunk/docs/LangRef.html (original) +++ llvm/trunk/docs/LangRef.html Mon Mar 1 11:41:39 2010 @@ -848,7 +848,7 @@
-

LLVM function definitions consist of the "define" keyord, an +

LLVM function definitions consist of the "define" keyword, an optional linkage type, an optional visibility style, an optional calling convention, a return type, an optional @@ -4104,11 +4104,11 @@

The optional !nontemporal metadata must reference a single metatadata name <index> corresponding to a metadata node with - one i32 entry of value 1. The existance of + one i32 entry of value 1. The existence of the !nontemporal metatadata on the instruction tells the optimizer and code generator that this load is not expected to be reused in the cache. The code generator may select special instructions to save cache bandwidth, - such as the MOVNT intruction on x86.

+ such as the MOVNT instruction on x86.

Semantics:

The location of memory pointed to is loaded. If the value being loaded is of @@ -4164,11 +4164,11 @@

The optional !nontemporal metadata must reference a single metatadata name corresponding to a metadata node with one i32 entry of - value 1. The existance of the !nontemporal metatadata on the + value 1. The existence of the !nontemporal metatadata on the instruction tells the optimizer and code generator that this load is not expected to be reused in the cache. The code generator may select special instructions to save cache bandwidth, such as the - MOVNT intruction on x86.

+ MOVNT instruction on x86.

Semantics:
@@ -4964,7 +4964,7 @@ op1 is equal to op2.
  • ogt: yields true if both operands are not a QNAN and - op1 is greather than op2.
  • + op1 is greater than op2.
  • oge: yields true if both operands are not a QNAN and op1 is greater than or equal to op2.
  • @@ -5209,7 +5209,7 @@ standard C99 library as being the C99 library functions, and may perform optimizations or generate code for them under that assumption. This is something we'd like to change in the future to provide better support for -freestanding environments and non-C-based langauges.

    +freestanding environments and non-C-based languages.

    @@ -5765,7 +5765,7 @@
    Semantics:

    This intrinsic does not modify the behavior of the program. Backends that do - not support this intrinisic may ignore it.

    + not support this intrinsic may ignore it.

    @@ -5845,7 +5845,7 @@ number of bytes to copy, and the fourth argument is the alignment of the source and destination locations.

    -

    If the call to this intrinisic has an alignment value that is not 0 or 1, +

    If the call to this intrinsic has an alignment value that is not 0 or 1, then the caller guarantees that both the source and destination pointers are aligned to that boundary.

    @@ -5895,7 +5895,7 @@ number of bytes to copy, and the fourth argument is the alignment of the source and destination locations.

    -

    If the call to this intrinisic has an alignment value that is not 0 or 1, +

    If the call to this intrinsic has an alignment value that is not 0 or 1, then the caller guarantees that the source and destination pointers are aligned to that boundary.

    @@ -5943,7 +5943,7 @@ specifying the number of bytes to fill, and the fourth argument is the known alignment of destination location.

    -

    If the call to this intrinisic has an alignment value that is not 0 or 1, +

    If the call to this intrinsic has an alignment value that is not 0 or 1, then the caller guarantees that the destination pointer is aligned to that boundary.

    @@ -6714,7 +6714,7 @@
    Arguments:

    The llvm.memory.barrier intrinsic requires five boolean arguments. The first four arguments enables a specific barrier as listed below. The - fith argument specifies that the barrier applies to io or device or uncached + fifth argument specifies that the barrier applies to io or device or uncached memory.

      From gohman at apple.com Mon Mar 1 11:42:17 2010 From: gohman at apple.com (Dan Gohman) Date: Mon, 01 Mar 2010 17:42:17 -0000 Subject: [llvm-commits] [llvm] r97448 - /llvm/trunk/lib/Transforms/Hello/Hello.cpp Message-ID: <20100301174217.3CB862A6C12C@llvm.org> Author: djg Date: Mon Mar 1 11:42:17 2010 New Revision: 97448 URL: http://llvm.org/viewvc/llvm-project?rev=97448&view=rev Log: Prune #includes. Modified: llvm/trunk/lib/Transforms/Hello/Hello.cpp Modified: llvm/trunk/lib/Transforms/Hello/Hello.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Hello/Hello.cpp?rev=97448&r1=97447&r2=97448&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Hello/Hello.cpp (original) +++ llvm/trunk/lib/Transforms/Hello/Hello.cpp Mon Mar 1 11:42:17 2010 @@ -15,7 +15,6 @@ #define DEBUG_TYPE "hello" #include "llvm/Pass.h" #include "llvm/Function.h" -#include "llvm/ADT/StringExtras.h" #include "llvm/Support/raw_ostream.h" #include "llvm/ADT/Statistic.h" using namespace llvm; From gohman at apple.com Mon Mar 1 11:43:58 2010 From: gohman at apple.com (Dan Gohman) Date: Mon, 01 Mar 2010 17:43:58 -0000 Subject: [llvm-commits] [llvm] r97450 - /llvm/trunk/lib/Target/X86/README.txt Message-ID: <20100301174358.099852A6C12D@llvm.org> Author: djg Date: Mon Mar 1 11:43:57 2010 New Revision: 97450 URL: http://llvm.org/viewvc/llvm-project?rev=97450&view=rev Log: This is now done. Modified: llvm/trunk/lib/Target/X86/README.txt Modified: llvm/trunk/lib/Target/X86/README.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/README.txt?rev=97450&r1=97449&r2=97450&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/README.txt (original) +++ llvm/trunk/lib/Target/X86/README.txt Mon Mar 1 11:43:57 2010 @@ -227,11 +227,6 @@ //===---------------------------------------------------------------------===// -Teach the coalescer to coalesce vregs of different register classes. e.g. FR32 / -FR64 to VR128. - -//===---------------------------------------------------------------------===// - Adding to the list of cmp / test poor codegen issues: int test(__m128 *A, __m128 *B) { From gohman at apple.com Mon Mar 1 11:45:15 2010 From: gohman at apple.com (Dan Gohman) Date: Mon, 01 Mar 2010 17:45:15 -0000 Subject: [llvm-commits] [llvm] r97451 - /llvm/trunk/include/llvm/Target/TargetOpcodes.h Message-ID: <20100301174515.E2CAE2A6C12D@llvm.org> Author: djg Date: Mon Mar 1 11:45:15 2010 New Revision: 97451 URL: http://llvm.org/viewvc/llvm-project?rev=97451&view=rev Log: Use Doxygen comment syntax. Modified: llvm/trunk/include/llvm/Target/TargetOpcodes.h Modified: llvm/trunk/include/llvm/Target/TargetOpcodes.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetOpcodes.h?rev=97451&r1=97450&r2=97451&view=diff ============================================================================== --- llvm/trunk/include/llvm/Target/TargetOpcodes.h (original) +++ llvm/trunk/include/llvm/Target/TargetOpcodes.h Mon Mar 1 11:45:15 2010 @@ -16,7 +16,7 @@ namespace llvm { -// Invariant opcodes: All instruction sets have these as their low opcodes. +/// Invariant opcodes: All instruction sets have these as their low opcodes. namespace TargetOpcode { enum { PHI = 0, @@ -63,7 +63,7 @@ /// the copy are emitted with the TargetInstrInfo::copyRegToReg hook. COPY_TO_REGCLASS = 10, - // DBG_VALUE - a mapping of the llvm.dbg.value intrinsic + /// DBG_VALUE - a mapping of the llvm.dbg.value intrinsic DBG_VALUE = 11 }; } // end namespace TargetOpcode From gohman at apple.com Mon Mar 1 11:42:55 2010 From: gohman at apple.com (Dan Gohman) Date: Mon, 01 Mar 2010 17:42:55 -0000 Subject: [llvm-commits] [llvm] r97449 - /llvm/trunk/lib/Analysis/AliasAnalysisCounter.cpp Message-ID: <20100301174255.DE59D2A6C12C@llvm.org> Author: djg Date: Mon Mar 1 11:42:55 2010 New Revision: 97449 URL: http://llvm.org/viewvc/llvm-project?rev=97449&view=rev Log: Fix a missing newline in debug output. Modified: llvm/trunk/lib/Analysis/AliasAnalysisCounter.cpp Modified: llvm/trunk/lib/Analysis/AliasAnalysisCounter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/AliasAnalysisCounter.cpp?rev=97449&r1=97448&r2=97449&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/AliasAnalysisCounter.cpp (original) +++ llvm/trunk/lib/Analysis/AliasAnalysisCounter.cpp Mon Mar 1 11:42:55 2010 @@ -162,7 +162,7 @@ errs() << MRString << ": Ptr: "; errs() << "[" << Size << "B] "; WriteAsOperand(errs(), P, true, M); - errs() << "\t<->" << *CS.getInstruction(); + errs() << "\t<->" << *CS.getInstruction() << '\n'; } return R; } From gohman at apple.com Mon Mar 1 11:47:21 2010 From: gohman at apple.com (Dan Gohman) Date: Mon, 01 Mar 2010 17:47:21 -0000 Subject: [llvm-commits] [llvm] r97452 - /llvm/trunk/include/llvm/Analysis/Dominators.h Message-ID: <20100301174721.8C37D2A6C12C@llvm.org> Author: djg Date: Mon Mar 1 11:47:21 2010 New Revision: 97452 URL: http://llvm.org/viewvc/llvm-project?rev=97452&view=rev Log: Whitespace cleanups. Modified: llvm/trunk/include/llvm/Analysis/Dominators.h Modified: llvm/trunk/include/llvm/Analysis/Dominators.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/Dominators.h?rev=97452&r1=97451&r2=97452&view=diff ============================================================================== --- llvm/trunk/include/llvm/Analysis/Dominators.h (original) +++ llvm/trunk/include/llvm/Analysis/Dominators.h Mon Mar 1 11:47:21 2010 @@ -52,7 +52,7 @@ Roots(), IsPostDominators(isPostDom) {} public: - /// getRoots - Return the root blocks of the current CFG. This may include + /// getRoots - Return the root blocks of the current CFG. This may include /// multiple blocks if we are computing post dominators. For forward /// dominators, this will always be a single block (the entry node). /// @@ -225,7 +225,7 @@ DenseMap Info; void reset() { - for (typename DomTreeNodeMapType::iterator I = this->DomTreeNodes.begin(), + for (typename DomTreeNodeMapType::iterator I = this->DomTreeNodes.begin(), E = DomTreeNodes.end(); I != E; ++I) delete I->second; DomTreeNodes.clear(); @@ -248,7 +248,7 @@ for (typename GraphTraits >::ChildIteratorType PI = GraphTraits >::child_begin(NewBB), PE = GraphTraits >::child_end(NewBB); PI != PE; ++PI) - PredBlocks.push_back(*PI); + PredBlocks.push_back(*PI); assert(!PredBlocks.empty() && "No predblocks??"); @@ -310,7 +310,7 @@ if (DomTreeNodes.size() != OtherDomTreeNodes.size()) return true; - for (typename DomTreeNodeMapType::const_iterator + for (typename DomTreeNodeMapType::const_iterator I = this->DomTreeNodes.begin(), E = this->DomTreeNodes.end(); I != E; ++I) { NodeT *BB = I->first; @@ -361,7 +361,7 @@ return properlyDominates(getNode(A), getNode(B)); } - bool dominatedBySlowTreeWalk(const DomTreeNodeBase *A, + bool dominatedBySlowTreeWalk(const DomTreeNodeBase *A, const DomTreeNodeBase *B) const { const DomTreeNodeBase *IDom; if (A == 0 || B == 0) return false; @@ -374,7 +374,7 @@ /// isReachableFromEntry - Return true if A is dominated by the entry /// block of the function containing it. bool isReachableFromEntry(NodeT* A) { - assert (!this->isPostDominator() + assert (!this->isPostDominator() && "This is not implemented for post dominators"); return dominates(&A->getParent()->front(), A); } @@ -384,7 +384,7 @@ /// inline bool dominates(const DomTreeNodeBase *A, const DomTreeNodeBase *B) { - if (B == A) + if (B == A) return true; // A node trivially dominates itself. if (A == 0 || B == 0) @@ -412,7 +412,7 @@ } inline bool dominates(const NodeT *A, const NodeT *B) { - if (A == B) + if (A == B) return true; // Cast away the const qualifiers here. This is ok since @@ -431,9 +431,9 @@ /// for basic block A and B. If there is no such block then return NULL. NodeT *findNearestCommonDominator(NodeT *A, NodeT *B) { - assert (!this->isPostDominator() + assert (!this->isPostDominator() && "This is not implemented for post dominators"); - assert (A->getParent() == B->getParent() + assert (A->getParent() == B->getParent() && "Two blocks are not in same function"); // If either A or B is a entry block then it is nearest common dominator. @@ -478,14 +478,14 @@ // the CFG... /// addNewBlock - Add a new node to the dominator tree information. This - /// creates a new node as a child of DomBB dominator node,linking it into + /// creates a new node as a child of DomBB dominator node,linking it into /// the children list of the immediate dominator. DomTreeNodeBase *addNewBlock(NodeT *BB, NodeT *DomBB) { assert(getNode(BB) == 0 && "Block already in dominator tree!"); DomTreeNodeBase *IDomNode = getNode(DomBB); assert(IDomNode && "Not immediate dominator specified for block!"); DFSInfoValid = false; - return DomTreeNodes[BB] = + return DomTreeNodes[BB] = IDomNode->addChild(new DomTreeNodeBase(BB, IDomNode)); } @@ -503,7 +503,7 @@ changeImmediateDominator(getNode(BB), getNode(NewBB)); } - /// eraseNode - Removes a node from the dominator tree. Block must not + /// eraseNode - Removes a node from the dominator tree. Block must not /// domiante any other blocks. Removes node from its immediate dominator's /// children list. Deletes dominator node associated with basic block BB. void eraseNode(NodeT *BB) { @@ -708,7 +708,7 @@ DominatorTreeBase& getBase() { return *DT; } - /// getRoots - Return the root blocks of the current CFG. This may include + /// getRoots - Return the root blocks of the current CFG. This may include /// multiple blocks if we are computing post dominators. For forward /// dominators, this will always be a single block (the entry node). /// @@ -785,7 +785,7 @@ } /// addNewBlock - Add a new node to the dominator tree information. This - /// creates a new node as a child of DomBB dominator node,linking it into + /// creates a new node as a child of DomBB dominator node,linking it into /// the children list of the immediate dominator. inline DomTreeNode *addNewBlock(BasicBlock *BB, BasicBlock *DomBB) { return DT->addNewBlock(BB, DomBB); @@ -802,7 +802,7 @@ DT->changeImmediateDominator(N, NewIDom); } - /// eraseNode - Removes a node from the dominator tree. Block must not + /// eraseNode - Removes a node from the dominator tree. Block must not /// domiante any other blocks. Removes node from its immediate dominator's /// children list. Deletes dominator node associated with basic block BB. inline void eraseNode(BasicBlock *BB) { @@ -820,7 +820,7 @@ } - virtual void releaseMemory() { + virtual void releaseMemory() { DT->releaseMemory(); } @@ -886,10 +886,10 @@ const bool IsPostDominators; public: - DominanceFrontierBase(void *ID, bool isPostDom) + DominanceFrontierBase(void *ID, bool isPostDom) : FunctionPass(ID), IsPostDominators(isPostDom) {} - /// getRoots - Return the root blocks of the current CFG. This may include + /// getRoots - Return the root blocks of the current CFG. This may include /// multiple blocks if we are computing post dominators. For forward /// dominators, this will always be a single block (the entry node). /// @@ -940,7 +940,7 @@ bool compareDomSet(DomSetType &DS1, const DomSetType &DS2) const { std::set tmpSet; for (DomSetType::const_iterator I = DS2.begin(), - E = DS2.end(); I != E; ++I) + E = DS2.end(); I != E; ++I) tmpSet.insert(*I); for (DomSetType::const_iterator I = DS1.begin(), @@ -965,14 +965,14 @@ bool compare(DominanceFrontierBase &Other) const { DomSetMapType tmpFrontiers; for (DomSetMapType::const_iterator I = Other.begin(), - E = Other.end(); I != E; ++I) + E = Other.end(); I != E; ++I) tmpFrontiers.insert(std::make_pair(I->first, I->second)); for (DomSetMapType::iterator I = tmpFrontiers.begin(), E = tmpFrontiers.end(); I != E; ) { BasicBlock *Node = I->first; const_iterator DFI = find(Node); - if (DFI == end()) + if (DFI == end()) return true; if (compareDomSet(I->second, DFI->second)) @@ -1001,7 +1001,7 @@ class DominanceFrontier : public DominanceFrontierBase { public: static char ID; // Pass ID, replacement for typeid - DominanceFrontier() : + DominanceFrontier() : DominanceFrontierBase(&ID, false) {} BasicBlock *getRoot() const { @@ -1033,7 +1033,7 @@ /// to reflect this change. void changeImmediateDominator(BasicBlock *BB, BasicBlock *NewBB, DominatorTree *DT) { - // NewBB is now dominating BB. Which means BB's dominance + // NewBB is now dominating BB. Which means BB's dominance // frontier is now part of NewBB's dominance frontier. However, BB // itself is not member of NewBB's dominance frontier. DominanceFrontier::iterator NewDFI = find(NewBB); From gohman at apple.com Mon Mar 1 11:49:52 2010 From: gohman at apple.com (Dan Gohman) Date: Mon, 01 Mar 2010 17:49:52 -0000 Subject: [llvm-commits] [llvm] r97453 - in /llvm/trunk: include/llvm/Analysis/IVUsers.h include/llvm/Analysis/ScalarEvolution.h lib/Analysis/IVUsers.cpp lib/Analysis/ScalarEvolution.cpp lib/Analysis/ScalarEvolutionExpander.cpp lib/Transforms/Scalar/IndVarSimplify.cpp lib/Transforms/Scalar/LoopStrengthReduce.cpp Message-ID: <20100301174952.2534F2A6C12C@llvm.org> Author: djg Date: Mon Mar 1 11:49:51 2010 New Revision: 97453 URL: http://llvm.org/viewvc/llvm-project?rev=97453&view=rev Log: Spelling fixes. Modified: llvm/trunk/include/llvm/Analysis/IVUsers.h llvm/trunk/include/llvm/Analysis/ScalarEvolution.h llvm/trunk/lib/Analysis/IVUsers.cpp llvm/trunk/lib/Analysis/ScalarEvolution.cpp llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp Modified: llvm/trunk/include/llvm/Analysis/IVUsers.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/IVUsers.h?rev=97453&r1=97452&r2=97453&view=diff ============================================================================== --- llvm/trunk/include/llvm/Analysis/IVUsers.h (original) +++ llvm/trunk/include/llvm/Analysis/IVUsers.h Mon Mar 1 11:49:51 2010 @@ -61,7 +61,7 @@ Stride = Val; } - /// getOffset - Return the offset to add to a theoeretical induction + /// getOffset - Return the offset to add to a theoretical induction /// variable that starts at zero and counts up by the stride to compute /// the value for the use. This always has the same type as the stride. const SCEV *getOffset() const { return Offset; } @@ -116,7 +116,7 @@ bool IsUseOfPostIncrementedValue; /// Deleted - Implementation of CallbackVH virtual function to - /// recieve notification when the User is deleted. + /// receive notification when the User is deleted. virtual void deleted(); }; Modified: llvm/trunk/include/llvm/Analysis/ScalarEvolution.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/ScalarEvolution.h?rev=97453&r1=97452&r2=97453&view=diff ============================================================================== --- llvm/trunk/include/llvm/Analysis/ScalarEvolution.h (original) +++ llvm/trunk/include/llvm/Analysis/ScalarEvolution.h Mon Mar 1 11:49:51 2010 @@ -8,7 +8,7 @@ //===----------------------------------------------------------------------===// // // The ScalarEvolution class is an LLVM pass which can be used to analyze and -// catagorize scalar expressions in loops. It specializes in recognizing +// categorize scalar expressions in loops. It specializes in recognizing // general induction variables, representing them with the abstract and opaque // SCEV class. Given this analysis, trip counts of loops and other important // properties can be obtained. @@ -55,7 +55,7 @@ protected: /// SubclassData - This field is initialized to zero and may be used in - /// subclasses to store miscelaneous information. + /// subclasses to store miscellaneous information. unsigned short SubclassData; private: @@ -177,7 +177,7 @@ /// LoopInfo *LI; - /// TD - The target data information for the target we are targetting. + /// TD - The target data information for the target we are targeting. /// TargetData *TD; @@ -194,7 +194,7 @@ std::map Scalars; /// BackedgeTakenInfo - Information about the backedge-taken count - /// of a loop. This currently inclues an exact count and a maximum count. + /// of a loop. This currently includes an exact count and a maximum count. /// struct BackedgeTakenInfo { /// Exact - An expression indicating the exact backedge-taken count of @@ -353,14 +353,14 @@ bool Inverse); /// isImpliedCondOperands - Test whether the condition described by Pred, - /// LHS, and RHS is true whenever the condition desribed by Pred, FoundLHS, + /// LHS, and RHS is true whenever the condition described by Pred, FoundLHS, /// and FoundRHS is true. bool isImpliedCondOperands(ICmpInst::Predicate Pred, const SCEV *LHS, const SCEV *RHS, const SCEV *FoundLHS, const SCEV *FoundRHS); /// isImpliedCondOperandsHelper - Test whether the condition described by - /// Pred, LHS, and RHS is true whenever the condition desribed by Pred, + /// Pred, LHS, and RHS is true whenever the condition described by Pred, /// FoundLHS, and FoundRHS is true. bool isImpliedCondOperandsHelper(ICmpInst::Predicate Pred, const SCEV *LHS, const SCEV *RHS, Modified: llvm/trunk/lib/Analysis/IVUsers.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/IVUsers.cpp?rev=97453&r1=97452&r2=97453&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/IVUsers.cpp (original) +++ llvm/trunk/lib/Analysis/IVUsers.cpp Mon Mar 1 11:49:51 2010 @@ -222,7 +222,7 @@ // Descend recursively, but not into PHI nodes outside the current loop. // It's important to see the entire expression outside the loop to get // choices that depend on addressing mode use right, although we won't - // consider references ouside the loop in all cases. + // consider references outside the loop in all cases. // If User is already in Processed, we don't want to recurse into it again, // but do want to record a second reference in the same instruction. bool AddUserToIVUsers = false; @@ -330,7 +330,7 @@ } OS << ":\n"; - // Use a defualt AssemblyAnnotationWriter to suppress the default info + // Use a default AssemblyAnnotationWriter to suppress the default info // comments, which aren't relevant here. AssemblyAnnotationWriter Annotator; for (ilist::const_iterator UI = IVUses.begin(), Modified: llvm/trunk/lib/Analysis/ScalarEvolution.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ScalarEvolution.cpp?rev=97453&r1=97452&r2=97453&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/ScalarEvolution.cpp (original) +++ llvm/trunk/lib/Analysis/ScalarEvolution.cpp Mon Mar 1 11:49:51 2010 @@ -616,7 +616,7 @@ /// When this routine is finished, we know that any duplicates in the vector are /// consecutive and that complexity is monotonically increasing. /// -/// Note that we go take special precautions to ensure that we get determinstic +/// Note that we go take special precautions to ensure that we get deterministic /// results from this routine. In other words, we don't want the results of /// this to depend on where the addresses of various SCEV objects happened to /// land in memory. @@ -744,7 +744,7 @@ // We need at least W + T bits for the multiplication step unsigned CalculationBits = W + T; - // Calcuate 2^T, at width T+W. + // Calculate 2^T, at width T+W. APInt DivFactor = APInt(CalculationBits, 1).shl(T); // Calculate the multiplicative inverse of K! / 2^T; @@ -1410,7 +1410,7 @@ // If we deleted at least one add, we added operands to the end of the list, // and they are not necessarily sorted. Recurse to resort and resimplify - // any operands we just aquired. + // any operands we just acquired. if (DeletedAdd) return getAddExpr(Ops); } @@ -1717,7 +1717,7 @@ // If we deleted at least one mul, we added operands to the end of the list, // and they are not necessarily sorted. Recurse to resort and resimplify - // any operands we just aquired. + // any operands we just acquired. if (DeletedMul) return getMulExpr(Ops); } @@ -2746,7 +2746,7 @@ } else { // For an array, add the element offset, explicitly scaled. const SCEV *LocalOffset = getSCEV(Index); - // Getelementptr indicies are signed. + // Getelementptr indices are signed. LocalOffset = getTruncateOrSignExtend(LocalOffset, IntPtrTy); // Lower "inbounds" GEPs to NSW arithmetic. LocalOffset = getMulExpr(LocalOffset, getSizeOfExpr(*GTI), @@ -3220,7 +3220,7 @@ const Type *Z0Ty = Z0->getType(); unsigned Z0TySize = getTypeSizeInBits(Z0Ty); - // If C is a low-bits mask, the zero extend is zerving to + // If C is a low-bits mask, the zero extend is serving to // mask off the high bits. Complement the operand and // re-apply the zext. if (APIntOps::isMask(Z0TySize, CI->getValue())) @@ -3405,7 +3405,7 @@ const ScalarEvolution::BackedgeTakenInfo & ScalarEvolution::getBackedgeTakenInfo(const Loop *L) { // Initially insert a CouldNotCompute for this loop. If the insertion - // succeeds, procede to actually compute a backedge-taken count and + // succeeds, proceed to actually compute a backedge-taken count and // update the value. The temporary CouldNotCompute value tells SCEV // code elsewhere that it shouldn't attempt to request a new // backedge-taken count, which could result in infinite recursion. @@ -3622,7 +3622,7 @@ return getCouldNotCompute(); } - // Procede to the next level to examine the exit condition expression. + // Proceed to the next level to examine the exit condition expression. return ComputeBackedgeTakenCountFromExitCond(L, ExitBr->getCondition(), ExitBr->getSuccessor(0), ExitBr->getSuccessor(1)); @@ -3711,7 +3711,7 @@ } // With an icmp, it may be feasible to compute an exact backedge-taken count. - // Procede to the next level to examine the icmp. + // Proceed to the next level to examine the icmp. if (ICmpInst *ExitCondICmp = dyn_cast(ExitCond)) return ComputeBackedgeTakenCountFromExitCondICmp(L, ExitCondICmp, TBB, FBB); @@ -4780,7 +4780,7 @@ ICmpInst::Predicate Pred, const SCEV *LHS, const SCEV *RHS, bool Inverse) { - // Recursivly handle And and Or conditions. + // Recursively handle And and Or conditions. if (BinaryOperator *BO = dyn_cast(CondValue)) { if (BO->getOpcode() == Instruction::And) { if (!Inverse) @@ -4983,7 +4983,7 @@ } /// isImpliedCondOperands - Test whether the condition described by Pred, -/// LHS, and RHS is true whenever the condition desribed by Pred, FoundLHS, +/// LHS, and RHS is true whenever the condition described by Pred, FoundLHS, /// and FoundRHS is true. bool ScalarEvolution::isImpliedCondOperands(ICmpInst::Predicate Pred, const SCEV *LHS, const SCEV *RHS, @@ -4998,7 +4998,7 @@ } /// isImpliedCondOperandsHelper - Test whether the condition described by -/// Pred, LHS, and RHS is true whenever the condition desribed by Pred, +/// Pred, LHS, and RHS is true whenever the condition described by Pred, /// FoundLHS, and FoundRHS is true. bool ScalarEvolution::isImpliedCondOperandsHelper(ICmpInst::Predicate Pred, @@ -5156,7 +5156,7 @@ // If MaxEnd is within a step of the maximum integer value in its type, // adjust it down to the minimum value which would produce the same effect. - // This allows the subsequent ceiling divison of (N+(step-1))/step to + // This allows the subsequent ceiling division of (N+(step-1))/step to // compute the correct value. const SCEV *StepMinusOne = getMinusSCEV(Step, getIntegerSCEV(1, Step->getType())); @@ -5433,7 +5433,7 @@ } void ScalarEvolution::print(raw_ostream &OS, const Module *) const { - // ScalarEvolution's implementaiton of the print method is to print + // ScalarEvolution's implementation of the print method is to print // out SCEV values of all instructions that are interesting. Doing // this potentially causes it to create new SCEV objects though, // which technically conflicts with the const qualifier. This isn't Modified: llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp?rev=97453&r1=97452&r2=97453&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp (original) +++ llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp Mon Mar 1 11:49:51 2010 @@ -152,7 +152,7 @@ /// FactorOutConstant - Test if S is divisible by Factor, using signed /// division. If so, update S with Factor divided out and return true. -/// S need not be evenly divisble if a reasonable remainder can be +/// S need not be evenly divisible if a reasonable remainder can be /// computed. /// TODO: When ScalarEvolution gets a SCEVSDivExpr, this can be made /// unnecessary; in its place, just signed-divide Ops[i] by the scale and @@ -462,7 +462,7 @@ break; } - // If none of the operands were convertable to proper GEP indices, cast + // If none of the operands were convertible to proper GEP indices, cast // the base to i8* and do an ugly getelementptr with that. It's still // better than ptrtoint+arithmetic+inttoptr at least. if (!AnyNonZeroIndices) { @@ -820,7 +820,7 @@ const Type *ExpandTy = PostLoopScale ? IntTy : STy; PHINode *PN = getAddRecExprPHILiterally(Normalized, L, ExpandTy, IntTy); - // Accomodate post-inc mode, if necessary. + // Accommodate post-inc mode, if necessary. Value *Result; if (L != PostIncLoop) Result = PN; @@ -1131,7 +1131,7 @@ } void SCEVExpander::restoreInsertPoint(BasicBlock *BB, BasicBlock::iterator I) { - // If we aquired more instructions since the old insert point was saved, + // If we acquired more instructions since the old insert point was saved, // advance past them. while (isInsertedInstruction(I)) ++I; Modified: llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp?rev=97453&r1=97452&r2=97453&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp Mon Mar 1 11:49:51 2010 @@ -594,8 +594,8 @@ } } -/// Return true if it is OK to use SIToFPInst for an inducation variable -/// with given inital and exit values. +/// Return true if it is OK to use SIToFPInst for an induction variable +/// with given initial and exit values. static bool useSIToFPInst(ConstantFP &InitV, ConstantFP &ExitV, uint64_t intIV, uint64_t intEV) { @@ -648,7 +648,7 @@ if (!convertToInt(InitValue->getValueAPF(), &newInitValue)) return; - // Check IV increment. Reject this PH if increement operation is not + // Check IV increment. Reject this PH if increment operation is not // an add or increment value can not be represented by an integer. BinaryOperator *Incr = dyn_cast(PH->getIncomingValue(BackEdge)); @@ -684,7 +684,7 @@ if (BI->getCondition() != EC) return; } - // Find exit value. If exit value can not be represented as an interger then + // Find exit value. If exit value can not be represented as an integer then // do not handle this floating point PH. ConstantFP *EV = NULL; unsigned EVIndex = 1; @@ -746,11 +746,11 @@ ICmpInst *NewEC = new ICmpInst(EC->getParent()->getTerminator(), NewPred, LHS, RHS, EC->getName()); - // In the following deltions, PH may become dead and may be deleted. + // In the following deletions, PH may become dead and may be deleted. // Use a WeakVH to observe whether this happens. WeakVH WeakPH = PH; - // Delete old, floating point, exit comparision instruction. + // Delete old, floating point, exit comparison instruction. NewEC->takeName(EC); EC->replaceAllUsesWith(NewEC); RecursivelyDeleteTriviallyDeadInstructions(EC); Modified: llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp?rev=97453&r1=97452&r2=97453&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp Mon Mar 1 11:49:51 2010 @@ -198,7 +198,7 @@ } -/// DoInitialMatch - Recurrsion helper for InitialMatch. +/// DoInitialMatch - Recursion helper for InitialMatch. static void DoInitialMatch(const SCEV *S, Loop *L, SmallVectorImpl &Good, SmallVectorImpl &Bad, @@ -1246,7 +1246,7 @@ } /// OptimizeShadowIV - If IV is used in a int-to-float cast -/// inside the loop then try to eliminate the cast opeation. +/// inside the loop then try to eliminate the cast operation. void LSRInstance::OptimizeShadowIV() { const SCEV *BackedgeTakenCount = SE.getBackedgeTakenCount(L); if (isa(BackedgeTakenCount)) @@ -1673,7 +1673,7 @@ /// getUse - Return an LSRUse index and an offset value for a fixup which /// needs the given expression, with the given kind and optional access type. -/// Either reuse an exisitng use or create a new one, as needed. +/// Either reuse an existing use or create a new one, as needed. std::pair LSRInstance::getUse(const SCEV *&Expr, LSRUse::KindType Kind, const Type *AccessTy) { @@ -2035,7 +2035,7 @@ /// loop-dominating registers added into a single register. void LSRInstance::GenerateCombinations(LSRUse &LU, unsigned LUIdx, Formula Base) { - // This method is only intersting on a plurality of registers. + // This method is only interesting on a plurality of registers. if (Base.BaseRegs.size() <= 1) return; Formula F = Base; @@ -2054,7 +2054,7 @@ const SCEV *Sum = SE.getAddExpr(Ops); // TODO: If Sum is zero, it probably means ScalarEvolution missed an // opportunity to fold something. For now, just ignore such cases - // rather than procede with zero in a register. + // rather than proceed with zero in a register. if (!Sum->isZero()) { F.BaseRegs.push_back(Sum); (void)InsertFormula(LU, LUIdx, F); @@ -2401,7 +2401,7 @@ const SCEV *NegImmS = SE.getSCEV(ConstantInt::get(IntTy, -(uint64_t)Imm)); unsigned BitWidth = SE.getTypeSizeInBits(IntTy); - // TODO: Use a more targetted data structure. + // TODO: Use a more targeted data structure. for (size_t L = 0, LE = LU.Formulae.size(); L != LE; ++L) { Formula F = LU.Formulae[L]; // Use the immediate in the scaled register. @@ -2569,9 +2569,9 @@ }); } -/// NarrowSearchSpaceUsingHeuristics - If there are an extrordinary number of +/// NarrowSearchSpaceUsingHeuristics - If there are an extraordinary number of /// formulae to choose from, use some rough heuristics to prune down the number -/// of formulae. This keeps the main solver from taking an extrordinary amount +/// of formulae. This keeps the main solver from taking an extraordinary amount /// of time in some worst-case scenarios. void LSRInstance::NarrowSearchSpaceUsingHeuristics() { // This is a rough guess that seems to work fairly well. @@ -2621,7 +2621,7 @@ } DEBUG(dbgs() << "Narrowing the search space by assuming " << *Best - << " will yeild profitable reuse.\n"); + << " will yield profitable reuse.\n"); Taken.insert(Best); // In any use with formulae which references this register, delete formulae @@ -2668,7 +2668,7 @@ // - sort the formula so that the most profitable solutions are found first // - sort the uses too // - search faster: - // - dont compute a cost, and then compare. compare while computing a cost + // - don't compute a cost, and then compare. compare while computing a cost // and bail early. // - track register sets with SmallBitVector @@ -3104,7 +3104,7 @@ dbgs() << ":\n"); /// OptimizeShadowIV - If IV is used in a int-to-float cast - /// inside the loop then try to eliminate the cast opeation. + /// inside the loop then try to eliminate the cast operation. OptimizeShadowIV(); // Change loop terminating condition to use the postinc iv when possible. From gohman at apple.com Mon Mar 1 11:52:16 2010 From: gohman at apple.com (Dan Gohman) Date: Mon, 01 Mar 2010 17:52:16 -0000 Subject: [llvm-commits] [llvm] r97455 - in /llvm/trunk: lib/Target/PIC16/AsmPrinter/ runtime/libprofile/ unittests/ExecutionEngine/ unittests/ExecutionEngine/JIT/ unittests/Support/ unittests/VMCore/ Message-ID: <20100301175216.EB1132A6C12D@llvm.org> Author: djg Date: Mon Mar 1 11:52:16 2010 New Revision: 97455 URL: http://llvm.org/viewvc/llvm-project?rev=97455&view=rev Log: svn:ignore fixes. Modified: llvm/trunk/lib/Target/PIC16/AsmPrinter/ (props changed) llvm/trunk/runtime/libprofile/ (props changed) llvm/trunk/unittests/ExecutionEngine/ (props changed) llvm/trunk/unittests/ExecutionEngine/JIT/ (props changed) llvm/trunk/unittests/Support/ (props changed) llvm/trunk/unittests/VMCore/ (props changed) Propchange: llvm/trunk/lib/Target/PIC16/AsmPrinter/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Mon Mar 1 11:52:16 2010 @@ -1,3 +1,7 @@ Debug -Release-Asserts Release +Release-Asserts +Debug+Coverage-Asserts +Debug+Coverage +Release+Coverage +Debug+Checks Propchange: llvm/trunk/runtime/libprofile/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Mon Mar 1 11:52:16 2010 @@ -1,3 +1,7 @@ Debug -Release-Asserts Release +Release-Asserts +Debug+Coverage-Asserts +Debug+Coverage +Release+Coverage +Debug+Checks Propchange: llvm/trunk/unittests/ExecutionEngine/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Mon Mar 1 11:52:16 2010 @@ -1,3 +1,7 @@ Debug Release Release-Asserts +Debug+Coverage-Asserts +Debug+Coverage +Release+Coverage +Debug+Checks Propchange: llvm/trunk/unittests/ExecutionEngine/JIT/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Mon Mar 1 11:52:16 2010 @@ -1,3 +1,7 @@ Debug Release Release-Asserts +Debug+Coverage-Asserts +Debug+Coverage +Release+Coverage +Debug+Checks Propchange: llvm/trunk/unittests/Support/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Mon Mar 1 11:52:16 2010 @@ -1,4 +1,7 @@ Debug Release Release-Asserts - +Debug+Coverage-Asserts +Debug+Coverage +Release+Coverage +Debug+Checks Propchange: llvm/trunk/unittests/VMCore/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Mon Mar 1 11:52:16 2010 @@ -1,3 +1,7 @@ Debug Release Release-Asserts +Debug+Coverage-Asserts +Debug+Coverage +Release+Coverage +Debug+Checks From gohman at apple.com Mon Mar 1 11:53:15 2010 From: gohman at apple.com (Dan Gohman) Date: Mon, 01 Mar 2010 17:53:15 -0000 Subject: [llvm-commits] [llvm] r97456 - /llvm/trunk/test/Transforms/InstCombine/objsize.ll Message-ID: <20100301175315.AFB9E2A6C12D@llvm.org> Author: djg Date: Mon Mar 1 11:53:15 2010 New Revision: 97456 URL: http://llvm.org/viewvc/llvm-project?rev=97456&view=rev Log: LLVM instruction syntax doesn't have trailing semicolons. Modified: llvm/trunk/test/Transforms/InstCombine/objsize.ll Modified: llvm/trunk/test/Transforms/InstCombine/objsize.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/objsize.ll?rev=97456&r1=97455&r2=97456&view=diff ============================================================================== --- llvm/trunk/test/Transforms/InstCombine/objsize.ll (original) +++ llvm/trunk/test/Transforms/InstCombine/objsize.ll Mon Mar 1 11:53:15 2010 @@ -23,12 +23,12 @@ br i1 %cmp, label %cond.true, label %cond.false cond.true: - %1 = load i8** %retval; - ret i8* %1; + %1 = load i8** %retval + ret i8* %1 cond.false: - %2 = load i8** %retval; - ret i8* %2; + %2 = load i8** %retval + ret i8* %2 } define i32 @f() nounwind { @@ -64,7 +64,7 @@ } @.str5 = private constant [9 x i32] [i32 97, i32 98, i32 99, i32 100, i32 0, i32 - 101, i32 102, i32 103, i32 0], align 4 ; + 101, i32 102, i32 103, i32 0], align 4 define i32 @test2() nounwind { ; CHECK: @test2 ; CHECK-NEXT: ret i32 34 From gohman at apple.com Mon Mar 1 11:53:39 2010 From: gohman at apple.com (Dan Gohman) Date: Mon, 01 Mar 2010 17:53:39 -0000 Subject: [llvm-commits] [llvm] r97457 - /llvm/trunk/utils/llvm.grm Message-ID: <20100301175339.B888C2A6C12D@llvm.org> Author: djg Date: Mon Mar 1 11:53:39 2010 New Revision: 97457 URL: http://llvm.org/viewvc/llvm-project?rev=97457&view=rev Log: Add the alignstack keyword. Modified: llvm/trunk/utils/llvm.grm Modified: llvm/trunk/utils/llvm.grm URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/llvm.grm?rev=97457&r1=97456&r2=97457&view=diff ============================================================================== --- llvm/trunk/utils/llvm.grm (original) +++ llvm/trunk/utils/llvm.grm Mon Mar 1 11:53:39 2010 @@ -162,6 +162,7 @@ | readnone | readonly | inlinehint + | alignstack | noinline | alwaysinline | optsize From gohman at apple.com Mon Mar 1 11:55:27 2010 From: gohman at apple.com (Dan Gohman) Date: Mon, 01 Mar 2010 17:55:27 -0000 Subject: [llvm-commits] [llvm] r97458 - /llvm/trunk/lib/Transforms/Utils/LoopSimplify.cpp Message-ID: <20100301175527.D05802A6C12D@llvm.org> Author: djg Date: Mon Mar 1 11:55:27 2010 New Revision: 97458 URL: http://llvm.org/viewvc/llvm-project?rev=97458&view=rev Log: Add some debug output to LoopSimplify. Modified: llvm/trunk/lib/Transforms/Utils/LoopSimplify.cpp Modified: llvm/trunk/lib/Transforms/Utils/LoopSimplify.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/LoopSimplify.cpp?rev=97458&r1=97457&r2=97458&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Utils/LoopSimplify.cpp (original) +++ llvm/trunk/lib/Transforms/Utils/LoopSimplify.cpp Mon Mar 1 11:55:27 2010 @@ -51,6 +51,7 @@ #include "llvm/Transforms/Utils/BasicBlockUtils.h" #include "llvm/Transforms/Utils/Local.h" #include "llvm/Support/CFG.h" +#include "llvm/Support/Debug.h" #include "llvm/ADT/SetOperations.h" #include "llvm/ADT/SetVector.h" #include "llvm/ADT/Statistic.h" @@ -147,6 +148,11 @@ // Delete each unique out-of-loop (and thus dead) predecessor. for (SmallPtrSet::iterator I = BadPreds.begin(), E = BadPreds.end(); I != E; ++I) { + + DEBUG(dbgs() << "LoopSimplify: Deleting edge from dead predecessor "; + WriteAsOperand(dbgs(), *I, false); + dbgs() << "\n"); + // Inform each successor of each dead pred. for (succ_iterator SI = succ_begin(*I), SE = succ_end(*I); SI != SE; ++SI) (*SI)->removePredecessor(*I); @@ -169,6 +175,11 @@ if (BranchInst *BI = dyn_cast((*I)->getTerminator())) if (BI->isConditional()) { if (UndefValue *Cond = dyn_cast(BI->getCondition())) { + + DEBUG(dbgs() << "LoopSimplify: Resolving \"br i1 undef\" to exit in "; + WriteAsOperand(dbgs(), *I, false); + dbgs() << "\n"); + BI->setCondition(ConstantInt::get(Cond->getType(), !L->contains(BI->getSuccessor(0)))); Changed = true; @@ -296,6 +307,11 @@ // Success. The block is now dead, so remove it from the loop, // update the dominator tree and dominance frontier, and delete it. + + DEBUG(dbgs() << "LoopSimplify: Eliminating exiting block "; + WriteAsOperand(dbgs(), ExitingBlock, false); + dbgs() << "\n"); + assert(pred_begin(ExitingBlock) == pred_end(ExitingBlock)); Changed = true; LI->removeBlock(ExitingBlock); @@ -349,6 +365,10 @@ SplitBlockPredecessors(Header, &OutsideBlocks[0], OutsideBlocks.size(), ".preheader", this); + DEBUG(dbgs() << "LoopSimplify: Creating pre-header "; + WriteAsOperand(dbgs(), NewBB, false); + dbgs() << "\n"); + // Make sure that NewBB is put someplace intelligent, which doesn't mess up // code layout too horribly. PlaceSplitBlockCarefully(NewBB, OutsideBlocks, L); @@ -374,6 +394,10 @@ LoopBlocks.size(), ".loopexit", this); + DEBUG(dbgs() << "LoopSimplify: Creating dedicated exit block "; + WriteAsOperand(dbgs(), NewBB, false); + dbgs() << "\n"); + return NewBB; } @@ -494,6 +518,8 @@ OuterLoopPreds.push_back(PN->getIncomingBlock(i)); } + DEBUG(dbgs() << "LoopSimplify: Splitting out a new outer loop\n"); + BasicBlock *Header = L->getHeader(); BasicBlock *NewBB = SplitBlockPredecessors(Header, &OuterLoopPreds[0], OuterLoopPreds.size(), @@ -588,6 +614,10 @@ Header->getName()+".backedge", F); BranchInst *BETerminator = BranchInst::Create(Header, BEBlock); + DEBUG(dbgs() << "LoopSimplify: Inserting unique backedge block "; + WriteAsOperand(dbgs(), BEBlock, false); + dbgs() << "\n"); + // Move the new backedge block to right after the last backedge block. Function::iterator InsertPos = BackedgeBlocks.back(); ++InsertPos; F->getBasicBlockList().splice(InsertPos, F->getBasicBlockList(), BEBlock); From gohman at apple.com Mon Mar 1 11:56:04 2010 From: gohman at apple.com (Dan Gohman) Date: Mon, 01 Mar 2010 17:56:04 -0000 Subject: [llvm-commits] [llvm] r97459 - /llvm/trunk/lib/Analysis/ScalarEvolutionAliasAnalysis.cpp Message-ID: <20100301175604.30F112A6C12D@llvm.org> Author: djg Date: Mon Mar 1 11:56:04 2010 New Revision: 97459 URL: http://llvm.org/viewvc/llvm-project?rev=97459&view=rev Log: Add a comment. Modified: llvm/trunk/lib/Analysis/ScalarEvolutionAliasAnalysis.cpp Modified: llvm/trunk/lib/Analysis/ScalarEvolutionAliasAnalysis.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ScalarEvolutionAliasAnalysis.cpp?rev=97459&r1=97458&r2=97459&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/ScalarEvolutionAliasAnalysis.cpp (original) +++ llvm/trunk/lib/Analysis/ScalarEvolutionAliasAnalysis.cpp Mon Mar 1 11:56:04 2010 @@ -10,6 +10,10 @@ // This file defines the ScalarEvolutionAliasAnalysis pass, which implements a // simple alias analysis implemented in terms of ScalarEvolution queries. // +// This differs from traditional loop dependence analysis in that it tests +// for dependencies within a single iteration of a loop, rather than +// dependences between different iterations. +// // ScalarEvolution has a more complete understanding of pointer arithmetic // than BasicAliasAnalysis' collection of ad-hoc analyses. // @@ -41,7 +45,7 @@ return (AliasAnalysis*)this; return this; } - + private: virtual void getAnalysisUsage(AnalysisUsage &AU) const; virtual bool runOnFunction(Function &F); From gohman at apple.com Mon Mar 1 11:51:02 2010 From: gohman at apple.com (Dan Gohman) Date: Mon, 01 Mar 2010 17:51:02 -0000 Subject: [llvm-commits] [llvm] r97454 - /llvm/trunk/unittests/Support/AllocatorTest.cpp Message-ID: <20100301175102.7F2422A6C12C@llvm.org> Author: djg Date: Mon Mar 1 11:51:02 2010 New Revision: 97454 URL: http://llvm.org/viewvc/llvm-project?rev=97454&view=rev Log: Spelling fixes. Modified: llvm/trunk/unittests/Support/AllocatorTest.cpp Modified: llvm/trunk/unittests/Support/AllocatorTest.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/Support/AllocatorTest.cpp?rev=97454&r1=97453&r2=97454&view=diff ============================================================================== --- llvm/trunk/unittests/Support/AllocatorTest.cpp (original) +++ llvm/trunk/unittests/Support/AllocatorTest.cpp Mon Mar 1 11:51:02 2010 @@ -88,7 +88,7 @@ Alloc.Allocate(4096 - sizeof(MemSlab), 0); EXPECT_EQ(1U, Alloc.GetNumSlabs()); - // If we dont't allocate a new slab, then we will have overflowed. + // If we don't allocate a new slab, then we will have overflowed. Alloc.Allocate(1, 0); EXPECT_EQ(2U, Alloc.GetNumSlabs()); } From gohman at apple.com Mon Mar 1 11:56:46 2010 From: gohman at apple.com (Dan Gohman) Date: Mon, 01 Mar 2010 17:56:46 -0000 Subject: [llvm-commits] [llvm] r97460 - in /llvm/trunk/lib/Target: Sparc/SparcMachineFunctionInfo.h SystemZ/SystemZMachineFunctionInfo.h Message-ID: <20100301175646.718572A6C12C@llvm.org> Author: djg Date: Mon Mar 1 11:56:46 2010 New Revision: 97460 URL: http://llvm.org/viewvc/llvm-project?rev=97460&view=rev Log: Add explicit keywords. Modified: llvm/trunk/lib/Target/Sparc/SparcMachineFunctionInfo.h llvm/trunk/lib/Target/SystemZ/SystemZMachineFunctionInfo.h Modified: llvm/trunk/lib/Target/Sparc/SparcMachineFunctionInfo.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Sparc/SparcMachineFunctionInfo.h?rev=97460&r1=97459&r2=97460&view=diff ============================================================================== --- llvm/trunk/lib/Target/Sparc/SparcMachineFunctionInfo.h (original) +++ llvm/trunk/lib/Target/Sparc/SparcMachineFunctionInfo.h Mon Mar 1 11:56:46 2010 @@ -22,7 +22,7 @@ unsigned GlobalBaseReg; public: SparcMachineFunctionInfo() : GlobalBaseReg(0) {} - SparcMachineFunctionInfo(MachineFunction &MF) : GlobalBaseReg(0) {} + explicit SparcMachineFunctionInfo(MachineFunction &MF) : GlobalBaseReg(0) {} unsigned getGlobalBaseReg() const { return GlobalBaseReg; } void setGlobalBaseReg(unsigned Reg) { GlobalBaseReg = Reg; } Modified: llvm/trunk/lib/Target/SystemZ/SystemZMachineFunctionInfo.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/SystemZ/SystemZMachineFunctionInfo.h?rev=97460&r1=97459&r2=97460&view=diff ============================================================================== --- llvm/trunk/lib/Target/SystemZ/SystemZMachineFunctionInfo.h (original) +++ llvm/trunk/lib/Target/SystemZ/SystemZMachineFunctionInfo.h Mon Mar 1 11:56:46 2010 @@ -33,7 +33,8 @@ public: SystemZMachineFunctionInfo() : CalleeSavedFrameSize(0) {} - SystemZMachineFunctionInfo(MachineFunction &MF) : CalleeSavedFrameSize(0) {} + explicit SystemZMachineFunctionInfo(MachineFunction &MF) + : CalleeSavedFrameSize(0) {} unsigned getCalleeSavedFrameSize() const { return CalleeSavedFrameSize; } void setCalleeSavedFrameSize(unsigned bytes) { CalleeSavedFrameSize = bytes; } From gohman at apple.com Mon Mar 1 11:59:21 2010 From: gohman at apple.com (Dan Gohman) Date: Mon, 01 Mar 2010 17:59:21 -0000 Subject: [llvm-commits] [llvm] r97461 - /llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp Message-ID: <20100301175921.95EA92A6C12C@llvm.org> Author: djg Date: Mon Mar 1 11:59:21 2010 New Revision: 97461 URL: http://llvm.org/viewvc/llvm-project?rev=97461&view=rev Log: Fix optimization of ISD::TRUNCATE on vector operands. Based on a patch by Micah Villmow for PR6335. Modified: llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp Modified: llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp?rev=97461&r1=97460&r2=97461&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp Mon Mar 1 11:59:21 2010 @@ -1441,8 +1441,10 @@ case ISD::TRUNCATE: { // Simplify the input, using demanded bit information, and compute the known // zero/one bits live out. + unsigned OperandBitWidth = + Op.getOperand(0).getValueType().getScalarType().getSizeInBits(); APInt TruncMask = NewMask; - TruncMask.zext(Op.getOperand(0).getValueSizeInBits()); + TruncMask.zext(OperandBitWidth); if (SimplifyDemandedBits(Op.getOperand(0), TruncMask, KnownZero, KnownOne, TLO, Depth+1)) return true; @@ -1453,15 +1455,14 @@ // on the known demanded bits. if (Op.getOperand(0).getNode()->hasOneUse()) { SDValue In = Op.getOperand(0); - unsigned InBitWidth = In.getValueSizeInBits(); switch (In.getOpcode()) { default: break; case ISD::SRL: // Shrink SRL by a constant if none of the high bits shifted in are // demanded. if (ConstantSDNode *ShAmt = dyn_cast(In.getOperand(1))){ - APInt HighBits = APInt::getHighBitsSet(InBitWidth, - InBitWidth - BitWidth); + APInt HighBits = APInt::getHighBitsSet(OperandBitWidth, + OperandBitWidth - BitWidth); HighBits = HighBits.lshr(ShAmt->getZExtValue()); HighBits.trunc(BitWidth); From dpatel at apple.com Mon Mar 1 12:30:08 2010 From: dpatel at apple.com (Devang Patel) Date: Mon, 01 Mar 2010 18:30:08 -0000 Subject: [llvm-commits] [llvm] r97464 - /llvm/trunk/test/CodeGen/Generic/debug-info.ll Message-ID: <20100301183008.879442A6C12C@llvm.org> Author: dpatel Date: Mon Mar 1 12:30:08 2010 New Revision: 97464 URL: http://llvm.org/viewvc/llvm-project?rev=97464&view=rev Log: Remove this generic debug info intrinsic test. LLVM does not use this llvm.dbg.stoppoint intrinsic anymore. There are tests to check new implementation, which attaches location information directly with an instruction using metadata. Removed: llvm/trunk/test/CodeGen/Generic/debug-info.ll Removed: llvm/trunk/test/CodeGen/Generic/debug-info.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Generic/debug-info.ll?rev=97463&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/Generic/debug-info.ll (original) +++ llvm/trunk/test/CodeGen/Generic/debug-info.ll (removed) @@ -1,19 +0,0 @@ -; RUN: llc < %s - - %lldb.compile_unit = type { i32, i16, i16, i8*, i8*, i8*, { }* } - at d.compile_unit7 = external global %lldb.compile_unit ; <%lldb.compile_unit*> [#uses=1] - -declare void @llvm.dbg.stoppoint(i32, i32, %lldb.compile_unit*) - -define void @rb_raise(i32, ...) { -entry: - br i1 false, label %strlen.exit, label %no_exit.i - -no_exit.i: ; preds = %entry - ret void - -strlen.exit: ; preds = %entry - call void @llvm.dbg.stoppoint( i32 4358, i32 0, %lldb.compile_unit* @d.compile_unit7 ) - unreachable -} - From dpatel at apple.com Mon Mar 1 12:30:58 2010 From: dpatel at apple.com (Devang Patel) Date: Mon, 01 Mar 2010 18:30:58 -0000 Subject: [llvm-commits] [llvm] r97465 - /llvm/trunk/test/CodeGen/X86/2009-02-12-DebugInfoVLA.ll Message-ID: <20100301183058.A92EB2A6C12C@llvm.org> Author: dpatel Date: Mon Mar 1 12:30:58 2010 New Revision: 97465 URL: http://llvm.org/viewvc/llvm-project?rev=97465&view=rev Log: Rewrite test to test VLA using new debug info encoding scheme. Modified: llvm/trunk/test/CodeGen/X86/2009-02-12-DebugInfoVLA.ll Modified: llvm/trunk/test/CodeGen/X86/2009-02-12-DebugInfoVLA.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2009-02-12-DebugInfoVLA.ll?rev=97465&r1=97464&r2=97465&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/2009-02-12-DebugInfoVLA.ll (original) +++ llvm/trunk/test/CodeGen/X86/2009-02-12-DebugInfoVLA.ll Mon Mar 1 12:30:58 2010 @@ -3,74 +3,83 @@ ; PR3538 target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128" target triple = "i386-apple-darwin9" - %llvm.dbg.anchor.type = type { i32, i32 } - %llvm.dbg.basictype.type = type { i32, { }*, i8*, { }*, i32, i64, i64, i64, i32, i32 } - %llvm.dbg.block.type = type { i32, { }* } - %llvm.dbg.compile_unit.type = type { i32, { }*, i32, i8*, i8*, i8*, i1, i1, i8* } - %llvm.dbg.composite.type = type { i32, { }*, i8*, { }*, i32, i64, i64, i64, i32, { }*, { }* } - %llvm.dbg.subprogram.type = type { i32, { }*, { }*, i8*, i8*, i8*, { }*, i32, { }*, i1, i1 } - %llvm.dbg.subrange.type = type { i32, i64, i64 } - %llvm.dbg.variable.type = type { i32, { }*, i8*, { }*, i32, { }* } - at llvm.dbg.compile_units = linkonce constant %llvm.dbg.anchor.type { i32 458752, i32 17 }, section "llvm.metadata" ; <%llvm.dbg.anchor.type*> [#uses=1] - at .str = internal constant [4 x i8] c"t.c\00", section "llvm.metadata" ; <[4 x i8]*> [#uses=1] - at .str1 = internal constant [2 x i8] c".\00", section "llvm.metadata" ; <[2 x i8]*> [#uses=1] - at .str2 = internal constant [6 x i8] c"clang\00", section "llvm.metadata" ; <[6 x i8]*> [#uses=1] - at llvm.dbg.compile_unit = internal constant %llvm.dbg.compile_unit.type { i32 458769, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.compile_units to { }*), i32 1, i8* getelementptr ([4 x i8]* @.str, i32 0, i32 0), i8* getelementptr ([2 x i8]* @.str1, i32 0, i32 0), i8* getelementptr ([6 x i8]* @.str2, i32 0, i32 0), i1 false, i1 false, i8* null }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] - at .str3 = internal constant [4 x i8] c"int\00", section "llvm.metadata" ; <[4 x i8]*> [#uses=1] - at llvm.dbg.basictype = internal constant %llvm.dbg.basictype.type { i32 458788, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([4 x i8]* @.str3, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 32, i64 32, i64 0, i32 0, i32 5 }, section "llvm.metadata" ; <%llvm.dbg.basictype.type*> [#uses=1] - at llvm.dbg.subprograms = linkonce constant %llvm.dbg.anchor.type { i32 458752, i32 46 }, section "llvm.metadata" ; <%llvm.dbg.anchor.type*> [#uses=1] - at .str4 = internal constant [5 x i8] c"test\00", section "llvm.metadata" ; <[5 x i8]*> [#uses=1] - at llvm.dbg.subprogram = internal constant %llvm.dbg.subprogram.type { i32 458798, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to { }*), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([5 x i8]* @.str4, i32 0, i32 0), i8* getelementptr ([5 x i8]* @.str4, i32 0, i32 0), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 3, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*), i1 false, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str5 = internal constant [2 x i8] c"X\00", section "llvm.metadata" ; <[2 x i8]*> [#uses=1] - at llvm.dbg.variable = internal constant %llvm.dbg.variable.type { i32 459009, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram to { }*), i8* getelementptr ([2 x i8]* @.str5, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 3, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] - at llvm.dbg.block = internal constant %llvm.dbg.block.type { i32 458763, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram to { }*) }, section "llvm.metadata" ; <%llvm.dbg.block.type*> [#uses=1] - at llvm.dbg.subrange = internal constant %llvm.dbg.subrange.type { i32 458785, i64 0, i64 0 }, section "llvm.metadata" ; <%llvm.dbg.subrange.type*> [#uses=1] - at llvm.dbg.array = internal constant [1 x { }*] [{ }* bitcast (%llvm.dbg.subrange.type* @llvm.dbg.subrange to { }*)], section "llvm.metadata" ; <[1 x { }*]*> [#uses=1] - at llvm.dbg.composite = internal constant %llvm.dbg.composite.type { i32 458753, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* null, i32 0, i64 0, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*), { }* bitcast ([1 x { }*]* @llvm.dbg.array to { }*) }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str6 = internal constant [2 x i8] c"Y\00", section "llvm.metadata" ; <[2 x i8]*> [#uses=1] - at llvm.dbg.variable7 = internal constant %llvm.dbg.variable.type { i32 459008, { }* bitcast (%llvm.dbg.block.type* @llvm.dbg.block to { }*), i8* getelementptr ([2 x i8]* @.str6, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 4, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] - -define i32 @test(i32 %X) nounwind { +define signext i8 @foo(i8* %s1) nounwind ssp { entry: - %retval = alloca i32 ; [#uses=1] - %X.addr = alloca i32 ; [#uses=3] - %saved_stack = alloca i8* ; [#uses=2] - call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram to { }*)) - store i32 %X, i32* %X.addr - %0 = bitcast i32* %X.addr to { }* ; <{ }*> [#uses=1] - call void @llvm.dbg.declare({ }* %0, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable to { }*)) - call void @llvm.dbg.region.start({ }* bitcast (%llvm.dbg.block.type* @llvm.dbg.block to { }*)) - call void @llvm.dbg.stoppoint(i32 4, i32 3, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %1 = call i8* @llvm.stacksave() ; [#uses=1] - store i8* %1, i8** %saved_stack - %tmp = load i32* %X.addr ; [#uses=1] - %2 = mul i32 4, %tmp ; [#uses=1] - %vla = alloca i8, i32 %2 ; [#uses=1] - %tmp1 = bitcast i8* %vla to i32* ; [#uses=1] - %3 = bitcast i32* %tmp1 to { }* ; <{ }*> [#uses=1] - call void @llvm.dbg.declare({ }* %3, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable7 to { }*)) - call void @llvm.dbg.stoppoint(i32 5, i32 1, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.block.type* @llvm.dbg.block to { }*)) - br label %cleanup - -cleanup: ; preds = %entry - %tmp2 = load i8** %saved_stack ; [#uses=1] - call void @llvm.stackrestore(i8* %tmp2) - call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram to { }*)) - %4 = load i32* %retval ; [#uses=1] - ret i32 %4 + %s1_addr = alloca i8* ; [#uses=2] + %retval = alloca i32 ; [#uses=2] + %saved_stack.1 = alloca i8* ; [#uses=2] + %0 = alloca i32 ; [#uses=2] + %str.0 = alloca [0 x i8]* ; <[0 x i8]**> [#uses=3] + %1 = alloca i64 ; [#uses=2] + %2 = alloca i64 ; [#uses=1] + %3 = alloca i64 ; [#uses=6] + %"alloca point" = bitcast i32 0 to i32 ; [#uses=0] + call void @llvm.dbg.declare(metadata !{i8** %s1_addr}, metadata !0), !dbg !7 + store i8* %s1, i8** %s1_addr + call void @llvm.dbg.declare(metadata !{[0 x i8]** %str.0}, metadata !8), !dbg !7 + %4 = call i8* @llvm.stacksave(), !dbg !7 ; [#uses=1] + store i8* %4, i8** %saved_stack.1, align 8, !dbg !7 + %5 = load i8** %s1_addr, align 8, !dbg !13 ; [#uses=1] + %6 = call i64 @strlen(i8* %5) nounwind readonly, !dbg !13 ; [#uses=1] + %7 = add i64 %6, 1, !dbg !13 ; [#uses=1] + store i64 %7, i64* %3, align 8, !dbg !13 + %8 = load i64* %3, align 8, !dbg !13 ; [#uses=1] + %9 = sub nsw i64 %8, 1, !dbg !13 ; [#uses=0] + %10 = load i64* %3, align 8, !dbg !13 ; [#uses=1] + %11 = mul i64 %10, 8, !dbg !13 ; [#uses=0] + %12 = load i64* %3, align 8, !dbg !13 ; [#uses=1] + store i64 %12, i64* %2, align 8, !dbg !13 + %13 = load i64* %3, align 8, !dbg !13 ; [#uses=1] + %14 = mul i64 %13, 8, !dbg !13 ; [#uses=0] + %15 = load i64* %3, align 8, !dbg !13 ; [#uses=1] + store i64 %15, i64* %1, align 8, !dbg !13 + %16 = load i64* %1, align 8, !dbg !13 ; [#uses=1] + %17 = trunc i64 %16 to i32, !dbg !13 ; [#uses=1] + %18 = alloca i8, i32 %17, !dbg !13 ; [#uses=1] + %19 = bitcast i8* %18 to [0 x i8]*, !dbg !13 ; <[0 x i8]*> [#uses=1] + store [0 x i8]* %19, [0 x i8]** %str.0, align 8, !dbg !13 + %20 = load [0 x i8]** %str.0, align 8, !dbg !15 ; <[0 x i8]*> [#uses=1] + %21 = getelementptr inbounds [0 x i8]* %20, i64 0, i64 0, !dbg !15 ; [#uses=1] + store i8 0, i8* %21, align 1, !dbg !15 + %22 = load [0 x i8]** %str.0, align 8, !dbg !16 ; <[0 x i8]*> [#uses=1] + %23 = getelementptr inbounds [0 x i8]* %22, i64 0, i64 0, !dbg !16 ; [#uses=1] + %24 = load i8* %23, align 1, !dbg !16 ; [#uses=1] + %25 = sext i8 %24 to i32, !dbg !16 ; [#uses=1] + store i32 %25, i32* %0, align 4, !dbg !16 + %26 = load i8** %saved_stack.1, align 8, !dbg !16 ; [#uses=1] + call void @llvm.stackrestore(i8* %26), !dbg !16 + %27 = load i32* %0, align 4, !dbg !16 ; [#uses=1] + store i32 %27, i32* %retval, align 4, !dbg !16 + br label %return, !dbg !16 + +return: ; preds = %entry + %retval1 = load i32* %retval, !dbg !16 ; [#uses=1] + %retval12 = trunc i32 %retval1 to i8, !dbg !16 ; [#uses=1] + ret i8 %retval12, !dbg !16 } -declare void @llvm.dbg.func.start({ }*) nounwind - -declare void @llvm.dbg.declare({ }*, { }*) nounwind - -declare void @llvm.dbg.region.start({ }*) nounwind - -declare void @llvm.dbg.stoppoint(i32, i32, { }*) nounwind +declare void @llvm.dbg.declare(metadata, metadata) nounwind readnone declare i8* @llvm.stacksave() nounwind +declare i64 @strlen(i8*) nounwind readonly + declare void @llvm.stackrestore(i8*) nounwind -declare void @llvm.dbg.region.end({ }*) nounwind +!0 = metadata !{i32 459009, metadata !1, metadata !"s1", metadata !2, i32 2, metadata !6} ; [ DW_TAG_arg_variable ] +!1 = metadata !{i32 458798, i32 0, metadata !2, metadata !"foo", metadata !"foo", metadata !"foo", metadata !2, i32 2, metadata !3, i1 false, i1 true, i32 0, i32 0, null, i1 false} ; [ DW_TAG_subprogram ] +!2 = metadata !{i32 458769, i32 0, i32 1, metadata !"vla.c", metadata !"/tmp/", metadata !"4.2.1 (Based on Apple Inc. build 5658) (LLVM build)", i1 true, i1 false, metadata !"", i32 0} ; [ DW_TAG_compile_unit ] +!3 = metadata !{i32 458773, metadata !2, metadata !"", metadata !2, i32 0, i64 0, i64 0, i64 0, i32 0, null, metadata !4, i32 0, null} ; [ DW_TAG_subroutine_type ] +!4 = metadata !{metadata !5, metadata !6} +!5 = metadata !{i32 458788, metadata !2, metadata !"char", metadata !2, i32 0, i64 8, i64 8, i64 0, i32 0, i32 6} ; [ DW_TAG_base_type ] +!6 = metadata !{i32 458767, metadata !2, metadata !"", metadata !2, i32 0, i64 64, i64 64, i64 0, i32 0, metadata !5} ; [ DW_TAG_pointer_type ] +!7 = metadata !{i32 2, i32 0, metadata !1, null} +!8 = metadata !{i32 459008, metadata !1, metadata !"str.0", metadata !2, i32 3, metadata !9} ; [ DW_TAG_auto_variable ] +!9 = metadata !{i32 458767, metadata !2, metadata !"", metadata !2, i32 0, i64 64, i64 64, i64 0, i32 64, metadata !10} ; [ DW_TAG_pointer_type ] +!10 = metadata !{i32 458753, metadata !2, metadata !"", metadata !2, i32 0, i64 8, i64 8, i64 0, i32 0, metadata !5, metadata !11, i32 0, null} ; [ DW_TAG_array_type ] +!11 = metadata !{metadata !12} +!12 = metadata !{i32 458785, i64 0, i64 0} ; [ DW_TAG_subrange_type ] +!13 = metadata !{i32 3, i32 0, metadata !14, null} +!14 = metadata !{i32 458763, metadata !1, i32 0, i32 0} ; [ DW_TAG_lexical_block ] +!15 = metadata !{i32 4, i32 0, metadata !14, null} +!16 = metadata !{i32 5, i32 0, metadata !14, null} From dpatel at apple.com Mon Mar 1 12:32:27 2010 From: dpatel at apple.com (Devang Patel) Date: Mon, 01 Mar 2010 18:32:27 -0000 Subject: [llvm-commits] [llvm] r97466 - /llvm/trunk/test/DebugInfo/2009-02-27-licm.ll Message-ID: <20100301183227.74EBF2A6C12C@llvm.org> Author: dpatel Date: Mon Mar 1 12:32:27 2010 New Revision: 97466 URL: http://llvm.org/viewvc/llvm-project?rev=97466&view=rev Log: This test checks whether LICM ignores @llvm.dbg.stoppoint intrinsics appropriately or not. Now, llvm does not use this intrinsic. Remove this test. Removed: llvm/trunk/test/DebugInfo/2009-02-27-licm.ll Removed: llvm/trunk/test/DebugInfo/2009-02-27-licm.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/2009-02-27-licm.ll?rev=97465&view=auto ============================================================================== --- llvm/trunk/test/DebugInfo/2009-02-27-licm.ll (original) +++ llvm/trunk/test/DebugInfo/2009-02-27-licm.ll (removed) @@ -1,83 +0,0 @@ -;RUN: opt < %s -licm -S | grep {load } | count 4 -; ModuleID = '2009-02-27-licm.bc' -target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32" -target triple = "i386-pc-linux-gnu" - %llvm.dbg.anchor.type = type { i32, i32 } - %llvm.dbg.basictype.type = type { i32, { }*, i8*, { }*, i32, i64, i64, i64, i32, i32 } - %llvm.dbg.compile_unit.type = type { i32, { }*, i32, i8*, i8*, i8*, i1, i1, i8*, i32 } - %llvm.dbg.composite.type = type { i32, { }*, i8*, { }*, i32, i64, i64, i64, i32, { }*, { }*, i32 } - %llvm.dbg.subprogram.type = type { i32, { }*, { }*, i8*, i8*, i8*, { }*, i32, { }*, i1, i1 } - at llvm.dbg.compile_units = linkonce constant %llvm.dbg.anchor.type { i32 458752, i32 17 }, section "llvm.metadata" ; <%llvm.dbg.anchor.type*> [#uses=1] - at .str = internal constant [12 x i8] c"mt19937ar.c\00", section "llvm.metadata" ; <[12 x i8]*> [#uses=1] - at .str1 = internal constant [58 x i8] c"/developer2/home5/youxiangc/work/project/pr965/test-licm/\00", section "llvm.metadata" ; <[58 x i8]*> [#uses=1] - at .str2 = internal constant [52 x i8] c"4.2.1 (Based on Apple Inc. build 5641) (LLVM build)\00", section "llvm.metadata" ; <[52 x i8]*> [#uses=1] - at llvm.dbg.compile_unit = internal constant %llvm.dbg.compile_unit.type { i32 458769, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.compile_units to { }*), i32 1, i8* getelementptr ([12 x i8]* @.str, i32 0, i32 0), i8* getelementptr ([58 x i8]* @.str1, i32 0, i32 0), i8* getelementptr ([52 x i8]* @.str2, i32 0, i32 0), i1 true, i1 false, i8* null, i32 0 }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] - at mti = internal global i32 625 ; [#uses=7] - at .str5 = internal constant [18 x i8] c"long unsigned int\00", section "llvm.metadata" ; <[18 x i8]*> [#uses=1] - at llvm.dbg.basictype6 = internal constant %llvm.dbg.basictype.type { i32 458788, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([18 x i8]* @.str5, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 32, i64 32, i64 0, i32 0, i32 7 }, section "llvm.metadata" ; <%llvm.dbg.basictype.type*> [#uses=1] - at llvm.dbg.array = internal constant [2 x { }*] [{ }* null, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype6 to { }*)], section "llvm.metadata" ; <[2 x { }*]*> [#uses=1] - at llvm.dbg.composite = internal constant %llvm.dbg.composite.type { i32 458773, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 0, i64 0, i64 0, i32 0, { }* null, { }* bitcast ([2 x { }*]* @llvm.dbg.array to { }*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.subprograms = linkonce constant %llvm.dbg.anchor.type { i32 458752, i32 46 }, section "llvm.metadata" ; <%llvm.dbg.anchor.type*> [#uses=1] - at .str7 = internal constant [13 x i8] c"init_genrand\00", section "llvm.metadata" ; <[13 x i8]*> [#uses=1] - at llvm.dbg.subprogram = internal constant %llvm.dbg.subprogram.type { i32 458798, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to { }*), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([13 x i8]* @.str7, i32 0, i32 0), i8* getelementptr ([13 x i8]* @.str7, i32 0, i32 0), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 13, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite to { }*), i1 false, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at mt = internal global [624 x i32] zeroinitializer, align 32 ; <[624 x i32]*> [#uses=4] - -define void @init_genrand(i32 %s) nounwind { -entry: - tail call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram to { }*)) - tail call void @llvm.dbg.stoppoint(i32 14, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - store i32 %s, i32* getelementptr ([624 x i32]* @mt, i32 0, i32 0), align 32 - tail call void @llvm.dbg.stoppoint(i32 15, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - store i32 1, i32* @mti - tail call void @llvm.dbg.stoppoint(i32 15, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %0 = load i32* @mti, align 4 ; [#uses=1] - %1 = icmp sgt i32 %0, 623 ; [#uses=1] - br i1 %1, label %return, label %bb.nph - -bb.nph: ; preds = %entry - br label %bb - -bb: ; preds = %bb1, %bb.nph - %storemerge1 = phi i32 [ %16, %bb1 ], [ 1, %bb.nph ] ; [#uses=0] - tail call void @llvm.dbg.stoppoint(i32 16, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %2 = load i32* @mti, align 4 ; [#uses=3] - %3 = add i32 %2, -1 ; [#uses=1] - %4 = getelementptr [624 x i32]* @mt, i32 0, i32 %3 ; [#uses=1] - %5 = load i32* %4, align 4 ; [#uses=1] - %6 = add i32 %2, -1 ; [#uses=1] - %7 = getelementptr [624 x i32]* @mt, i32 0, i32 %6 ; [#uses=1] - %8 = load i32* %7, align 4 ; [#uses=1] - %9 = lshr i32 %8, 30 ; [#uses=1] - %10 = xor i32 %9, %5 ; [#uses=1] - %11 = mul i32 %10, 1812433253 ; [#uses=1] - %12 = load i32* @mti, align 4 ; [#uses=1] - %13 = add i32 %11, %12 ; [#uses=1] - %14 = getelementptr [624 x i32]* @mt, i32 0, i32 %2 ; [#uses=1] - store i32 %13, i32* %14, align 4 - tail call void @llvm.dbg.stoppoint(i32 15, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %15 = load i32* @mti, align 4 ; [#uses=1] - %16 = add i32 %15, 1 ; [#uses=2] - br label %bb1 - -bb1: ; preds = %bb - %storemerge = phi i32 [ %16, %bb ] ; [#uses=1] - store i32 %storemerge, i32* @mti - tail call void @llvm.dbg.stoppoint(i32 15, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - %17 = load i32* @mti, align 4 ; [#uses=1] - %18 = icmp sgt i32 %17, 623 ; [#uses=1] - br i1 %18, label %bb1.return_crit_edge, label %bb - -bb1.return_crit_edge: ; preds = %bb1 - br label %return - -return: ; preds = %bb1.return_crit_edge, %entry - tail call void @llvm.dbg.stoppoint(i32 25, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - tail call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram to { }*)) - ret void -} - -declare void @llvm.dbg.func.start({ }*) nounwind - -declare void @llvm.dbg.stoppoint(i32, i32, { }*) nounwind - -declare void @llvm.dbg.region.end({ }*) nounwind From rjmccall at apple.com Mon Mar 1 12:38:46 2010 From: rjmccall at apple.com (John McCall) Date: Mon, 01 Mar 2010 18:38:46 -0000 Subject: [llvm-commits] [llvm] r97467 - /llvm/trunk/lib/Support/APFloat.cpp Message-ID: <20100301183846.255C82A6C12C@llvm.org> Author: rjmccall Date: Mon Mar 1 12:38:45 2010 New Revision: 97467 URL: http://llvm.org/viewvc/llvm-project?rev=97467&view=rev Log: Don't potentially read past the end of the fill data when making a NaN from an APInt. Modified: llvm/trunk/lib/Support/APFloat.cpp Modified: llvm/trunk/lib/Support/APFloat.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/APFloat.cpp?rev=97467&r1=97466&r2=97467&view=diff ============================================================================== --- llvm/trunk/lib/Support/APFloat.cpp (original) +++ llvm/trunk/lib/Support/APFloat.cpp Mon Mar 1 12:38:45 2010 @@ -638,7 +638,8 @@ if (!fill || fill->getNumWords() < numParts) APInt::tcSet(significand, 0, numParts); if (fill) { - APInt::tcAssign(significand, fill->getRawData(), partCount()); + APInt::tcAssign(significand, fill->getRawData(), + std::min(fill->getNumWords(), numParts)); // Zero out the excess bits of the significand. unsigned bitsToPreserve = semantics->precision - 1; From dpatel at apple.com Mon Mar 1 12:45:28 2010 From: dpatel at apple.com (Devang Patel) Date: Mon, 01 Mar 2010 18:45:28 -0000 Subject: [llvm-commits] [llvm] r97468 - in /llvm/trunk/test/DebugInfo: 2009-03-03-cheapdse.ll 2009-03-05-gvn.ll Message-ID: <20100301184528.D4EBF2A6C12C@llvm.org> Author: dpatel Date: Mon Mar 1 12:45:28 2010 New Revision: 97468 URL: http://llvm.org/viewvc/llvm-project?rev=97468&view=rev Log: These two tests check whether oprimizer safely ignores @llvm.dbg.stoppoint intrinsic or not. This intrinsic is not used anymore. Removed: llvm/trunk/test/DebugInfo/2009-03-03-cheapdse.ll llvm/trunk/test/DebugInfo/2009-03-05-gvn.ll Removed: llvm/trunk/test/DebugInfo/2009-03-03-cheapdse.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/2009-03-03-cheapdse.ll?rev=97467&view=auto ============================================================================== --- llvm/trunk/test/DebugInfo/2009-03-03-cheapdse.ll (original) +++ llvm/trunk/test/DebugInfo/2009-03-03-cheapdse.ll (removed) @@ -1,80 +0,0 @@ -; RUN: opt < %s -instcombine -S | grep store | count 5 -; ModuleID = '' -target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128" -target triple = "i386-apple-darwin9.6" - type { } ; type %0 - %llvm.dbg.anchor.type = type { i32, i32 } - %llvm.dbg.basictype.type = type { i32, %0*, i8*, %0*, i32, i64, i64, i64, i32, i32 } - %llvm.dbg.compile_unit.type = type { i32, %0*, i32, i8*, i8*, i8*, i1, i1, i8*, i32 } - %llvm.dbg.composite.type = type { i32, %0*, i8*, %0*, i32, i64, i64, i64, i32, %0*, %0*, i32 } - %llvm.dbg.derivedtype.type = type { i32, %0*, i8*, %0*, i32, i64, i64, i64, i32, %0* } - %llvm.dbg.subprogram.type = type { i32, %0*, %0*, i8*, i8*, i8*, %0*, i32, %0*, i1, i1 } - %struct.Matrix = type { float*, i32, i32, i32, i32 } - at llvm.dbg.compile_units = internal constant %llvm.dbg.anchor.type { i32 458752, i32 17 }, section "llvm.metadata" ; <%llvm.dbg.anchor.type*> [#uses=1] - at .str = internal constant [15 x i8] c"himenobmtxpa.c\00", section "llvm.metadata" ; <[15 x i8]*> [#uses=1] - at .str1 = internal constant [74 x i8] c"/Volumes/MacOS9/gcc/llvm/projects/llvm-test/SingleSource/Benchmarks/Misc/\00", section "llvm.metadata" ; <[74 x i8]*> [#uses=1] - at .str2 = internal constant [52 x i8] c"4.2.1 (Based on Apple Inc. build 5641) (LLVM build)\00", section "llvm.metadata" ; <[52 x i8]*> [#uses=1] - at llvm.dbg.compile_unit = internal constant %llvm.dbg.compile_unit.type { i32 458769, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.compile_units to %0*), i32 1, i8* getelementptr ([15 x i8]* @.str, i32 0, i32 0), i8* getelementptr ([74 x i8]* @.str1, i32 0, i32 0), i8* getelementptr ([52 x i8]* @.str2, i32 0, i32 0), i1 true, i1 false, i8* null, i32 0 }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] - at .str3 = internal constant [6 x i8] c"float\00", section "llvm.metadata" ; <[6 x i8]*> [#uses=1] - at llvm.dbg.basictype = internal constant %llvm.dbg.basictype.type { i32 458788, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([6 x i8]* @.str3, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 32, i64 32, i64 0, i32 0, i32 4 }, section "llvm.metadata" ; <%llvm.dbg.basictype.type*> [#uses=1] - at .str5 = internal constant [4 x i8] c"int\00", section "llvm.metadata" ; <[4 x i8]*> [#uses=1] - at llvm.dbg.basictype6 = internal constant %llvm.dbg.basictype.type { i32 458788, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([4 x i8]* @.str5, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 32, i64 32, i64 0, i32 0, i32 5 }, section "llvm.metadata" ; <%llvm.dbg.basictype.type*> [#uses=1] - at llvm.dbg.subprograms = internal constant %llvm.dbg.anchor.type { i32 458752, i32 46 }, section "llvm.metadata" ; <%llvm.dbg.anchor.type*> [#uses=1] - at .str90 = internal constant [4 x i8] c"Mat\00", section "llvm.metadata" ; <[4 x i8]*> [#uses=1] - at llvm.dbg.derivedtype92 = internal constant %llvm.dbg.derivedtype.type { i32 458767, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 32, i64 32, i64 0, i32 0, %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str93 = internal constant [2 x i8] c"m\00", section "llvm.metadata" ; <[2 x i8]*> [#uses=1] - at llvm.dbg.derivedtype94 = internal constant %llvm.dbg.derivedtype.type { i32 458765, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([2 x i8]* @.str93, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 46, i64 32, i64 32, i64 0, i32 0, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype92 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str95 = internal constant [6 x i8] c"mnums\00", section "llvm.metadata" ; <[6 x i8]*> [#uses=1] - at llvm.dbg.derivedtype96 = internal constant %llvm.dbg.derivedtype.type { i32 458765, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([6 x i8]* @.str95, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 47, i64 32, i64 32, i64 32, i32 0, %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype6 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str97 = internal constant [6 x i8] c"mrows\00", section "llvm.metadata" ; <[6 x i8]*> [#uses=1] - at llvm.dbg.derivedtype98 = internal constant %llvm.dbg.derivedtype.type { i32 458765, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([6 x i8]* @.str97, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 48, i64 32, i64 32, i64 64, i32 0, %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype6 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str99 = internal constant [6 x i8] c"mcols\00", section "llvm.metadata" ; <[6 x i8]*> [#uses=1] - at llvm.dbg.derivedtype100 = internal constant %llvm.dbg.derivedtype.type { i32 458765, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([6 x i8]* @.str99, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 49, i64 32, i64 32, i64 96, i32 0, %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype6 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str101 = internal constant [6 x i8] c"mdeps\00", section "llvm.metadata" ; <[6 x i8]*> [#uses=1] - at llvm.dbg.derivedtype102 = internal constant %llvm.dbg.derivedtype.type { i32 458765, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([6 x i8]* @.str101, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 50, i64 32, i64 32, i64 128, i32 0, %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype6 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array103 = internal constant [5 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype94 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype96 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype98 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype100 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype102 to %0*)], section "llvm.metadata" ; <[5 x %0*]*> [#uses=1] - at llvm.dbg.composite104 = internal constant %llvm.dbg.composite.type { i32 458771, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([4 x i8]* @.str90, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 45, i64 160, i64 32, i64 0, i32 0, %0* null, %0* bitcast ([5 x %0*]* @llvm.dbg.array103 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str105 = internal constant [7 x i8] c"Matrix\00", section "llvm.metadata" ; <[7 x i8]*> [#uses=1] - at llvm.dbg.derivedtype106 = internal constant %llvm.dbg.derivedtype.type { i32 458774, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([7 x i8]* @.str105, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 54, i64 0, i64 0, i64 0, i32 0, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite104 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.derivedtype107 = internal constant %llvm.dbg.derivedtype.type { i32 458767, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 32, i64 32, i64 0, i32 0, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype106 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array108 = internal constant [6 x %0*] [%0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype6 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype107 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype6 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype6 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype6 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype6 to %0*)], section "llvm.metadata" ; <[6 x %0*]*> [#uses=1] - at llvm.dbg.composite109 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([6 x %0*]* @llvm.dbg.array108 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str110 = internal constant [7 x i8] c"newMat\00", section "llvm.metadata" ; <[7 x i8]*> [#uses=1] - at llvm.dbg.subprogram111 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([7 x i8]* @.str110, i32 0, i32 0), i8* getelementptr ([7 x i8]* @.str110, i32 0, i32 0), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 195, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite109 to %0*), i1 false, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.used = appending global [1 x i8*] [i8* bitcast (i32 (%struct.Matrix*, i32, i32, i32, i32)* @newMat to i8*)], section "llvm.metadata" ; <[1 x i8*]*> [#uses=0] - -define i32 @newMat(%struct.Matrix* %Mat, i32 %mnums, i32 %mrows, i32 %mcols, i32 %mdeps) nounwind { -entry: - call void @llvm.dbg.func.start(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram111 to %0*)) - call void @llvm.dbg.stoppoint(i32 196, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %0 = getelementptr %struct.Matrix* %Mat, i32 0, i32 1 ; [#uses=1] - store i32 %mnums, i32* %0, align 4 - call void @llvm.dbg.stoppoint(i32 197, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %1 = getelementptr %struct.Matrix* %Mat, i32 0, i32 2 ; [#uses=1] - store i32 %mrows, i32* %1, align 4 - call void @llvm.dbg.stoppoint(i32 198, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %2 = getelementptr %struct.Matrix* %Mat, i32 0, i32 3 ; [#uses=1] - store i32 %mcols, i32* %2, align 4 - call void @llvm.dbg.stoppoint(i32 199, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %3 = getelementptr %struct.Matrix* %Mat, i32 0, i32 4 ; [#uses=1] - store i32 %mdeps, i32* %3, align 4 - call void @llvm.dbg.stoppoint(i32 201, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %4 = mul i32 %mnums, %mrows ; [#uses=1] - %5 = mul i32 %4, %mcols ; [#uses=1] - %6 = mul i32 %5, %mdeps ; [#uses=1] - %7 = malloc float, i32 %6 ; [#uses=2] - %8 = getelementptr %struct.Matrix* %Mat, i32 0, i32 0 ; [#uses=1] - store float* %7, float** %8, align 4 - call void @llvm.dbg.stoppoint(i32 204, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %9 = icmp ne float* %7, null ; [#uses=1] - %10 = zext i1 %9 to i32 ; [#uses=1] - call void @llvm.dbg.stoppoint(i32 204, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - call void @llvm.dbg.region.end(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram111 to %0*)) - ret i32 %10 -} - -declare void @llvm.dbg.func.start(%0*) nounwind readnone - -declare void @llvm.dbg.stoppoint(i32, i32, %0*) nounwind readnone - -declare void @llvm.dbg.region.end(%0*) nounwind readnone Removed: llvm/trunk/test/DebugInfo/2009-03-05-gvn.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/2009-03-05-gvn.ll?rev=97467&view=auto ============================================================================== --- llvm/trunk/test/DebugInfo/2009-03-05-gvn.ll (original) +++ llvm/trunk/test/DebugInfo/2009-03-05-gvn.ll (removed) @@ -1,125 +0,0 @@ -; RUN: opt < %s -gvn -S | grep {load } | count 1 -; ModuleID = 'db2-before.bc' -target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32" -target triple = "i386-pc-linux-gnu" - type { } ; type %0 - %llvm.dbg.anchor.type = type { i32, i32 } - %llvm.dbg.basictype.type = type { i32, %0*, i8*, %0*, i32, i64, i64, i64, i32, i32 } - %llvm.dbg.compile_unit.type = type { i32, %0*, i32, i8*, i8*, i8*, i1, i1, i8*, i32 } - %llvm.dbg.composite.type = type { i32, %0*, i8*, %0*, i32, i64, i64, i64, i32, %0*, %0*, i32 } - %llvm.dbg.derivedtype.type = type { i32, %0*, i8*, %0*, i32, i64, i64, i64, i32, %0* } - %llvm.dbg.subprogram.type = type { i32, %0*, %0*, i8*, i8*, i8*, %0*, i32, %0*, i1, i1 } - at llvm.dbg.compile_units = linkonce constant %llvm.dbg.anchor.type { i32 458752, i32 17 }, section "llvm.metadata" ; <%llvm.dbg.anchor.type*> [#uses=1] - at .str = internal constant [12 x i8] c"mt19937ar.c\00", section "llvm.metadata" ; <[12 x i8]*> [#uses=1] - at .str1 = internal constant [34 x i8] c"/developer/home2/zsth/test/debug/\00", section "llvm.metadata" ; <[34 x i8]*> [#uses=1] - at .str2 = internal constant [52 x i8] c"4.2.1 (Based on Apple Inc. build 5641) (LLVM build)\00", section "llvm.metadata" ; <[52 x i8]*> [#uses=1] - at llvm.dbg.compile_unit = internal constant %llvm.dbg.compile_unit.type { i32 458769, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.compile_units to %0*), i32 1, i8* getelementptr ([12 x i8]* @.str, i32 0, i32 0), i8* getelementptr ([34 x i8]* @.str1, i32 0, i32 0), i8* getelementptr ([52 x i8]* @.str2, i32 0, i32 0), i1 true, i1 false, i8* null, i32 -1 }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] - at mti = internal global i32 625 ; [#uses=14] - at .str3 = internal constant [4 x i8] c"int\00", section "llvm.metadata" ; <[4 x i8]*> [#uses=1] - at llvm.dbg.basictype = internal constant %llvm.dbg.basictype.type { i32 458788, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([4 x i8]* @.str3, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 32, i64 32, i64 0, i32 0, i32 5 }, section "llvm.metadata" ; <%llvm.dbg.basictype.type*> [#uses=1] - at .str5 = internal constant [18 x i8] c"long unsigned int\00", section "llvm.metadata" ; <[18 x i8]*> [#uses=1] - at llvm.dbg.basictype6 = internal constant %llvm.dbg.basictype.type { i32 458788, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([18 x i8]* @.str5, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 32, i64 32, i64 0, i32 0, i32 7 }, section "llvm.metadata" ; <%llvm.dbg.basictype.type*> [#uses=1] - at llvm.dbg.array = internal constant [2 x %0*] [%0* null, %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype6 to %0*)], section "llvm.metadata" ; <[2 x %0*]*> [#uses=1] - at llvm.dbg.composite = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([2 x %0*]* @llvm.dbg.array to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.subprograms = linkonce constant %llvm.dbg.anchor.type { i32 458752, i32 46 }, section "llvm.metadata" ; <%llvm.dbg.anchor.type*> [#uses=1] - at .str7 = internal constant [13 x i8] c"init_genrand\00", section "llvm.metadata" ; <[13 x i8]*> [#uses=1] - at llvm.dbg.subprogram = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([13 x i8]* @.str7, i32 0, i32 0), i8* getelementptr ([13 x i8]* @.str7, i32 0, i32 0), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 58, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite to %0*), i1 false, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at mt = internal global [624 x i32] zeroinitializer, align 32 ; <[624 x i32]*> [#uses=29] - at llvm.dbg.derivedtype = internal constant %llvm.dbg.derivedtype.type { i32 458767, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 32, i64 32, i64 0, i32 0, %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype6 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array9 = internal constant [3 x %0*] [%0* null, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to %0*)], section "llvm.metadata" ; <[3 x %0*]*> [#uses=1] - at llvm.dbg.composite10 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([3 x %0*]* @llvm.dbg.array9 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str11 = internal constant [14 x i8] c"init_by_array\00", section "llvm.metadata" ; <[14 x i8]*> [#uses=1] - at llvm.dbg.subprogram12 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([14 x i8]* @.str11, i32 0, i32 0), i8* getelementptr ([14 x i8]* @.str11, i32 0, i32 0), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 77, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite10 to %0*), i1 false, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array23 = internal constant [1 x %0*] [%0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype6 to %0*)], section "llvm.metadata" ; <[1 x %0*]*> [#uses=1] - at llvm.dbg.composite24 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([1 x %0*]* @llvm.dbg.array23 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str25 = internal constant [14 x i8] c"genrand_int32\00", section "llvm.metadata" ; <[14 x i8]*> [#uses=1] - at llvm.dbg.subprogram26 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([14 x i8]* @.str25, i32 0, i32 0), i8* getelementptr ([14 x i8]* @.str25, i32 0, i32 0), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 103, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite24 to %0*), i1 false, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at mag01.1661 = internal constant [2 x i32] [i32 0, i32 -1727483681] ; <[2 x i32]*> [#uses=3] - at .str35 = internal constant [9 x i8] c"long int\00", section "llvm.metadata" ; <[9 x i8]*> [#uses=1] - at llvm.dbg.basictype36 = internal constant %llvm.dbg.basictype.type { i32 458788, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([9 x i8]* @.str35, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 32, i64 32, i64 0, i32 0, i32 5 }, section "llvm.metadata" ; <%llvm.dbg.basictype.type*> [#uses=1] - at llvm.dbg.array37 = internal constant [1 x %0*] [%0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype36 to %0*)], section "llvm.metadata" ; <[1 x %0*]*> [#uses=1] - at llvm.dbg.composite38 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([1 x %0*]* @llvm.dbg.array37 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str39 = internal constant [14 x i8] c"genrand_int31\00", section "llvm.metadata" ; <[14 x i8]*> [#uses=1] - at llvm.dbg.subprogram40 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([14 x i8]* @.str39, i32 0, i32 0), i8* getelementptr ([14 x i8]* @.str39, i32 0, i32 0), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 141, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite38 to %0*), i1 false, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str41 = internal constant [7 x i8] c"double\00", section "llvm.metadata" ; <[7 x i8]*> [#uses=1] - at llvm.dbg.basictype42 = internal constant %llvm.dbg.basictype.type { i32 458788, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([7 x i8]* @.str41, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 64, i64 64, i64 0, i32 0, i32 4 }, section "llvm.metadata" ; <%llvm.dbg.basictype.type*> [#uses=1] - at llvm.dbg.array43 = internal constant [1 x %0*] [%0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype42 to %0*)], section "llvm.metadata" ; <[1 x %0*]*> [#uses=1] - at llvm.dbg.composite44 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([1 x %0*]* @llvm.dbg.array43 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str45 = internal constant [14 x i8] c"genrand_real1\00", section "llvm.metadata" ; <[14 x i8]*> [#uses=1] - at llvm.dbg.subprogram46 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([14 x i8]* @.str45, i32 0, i32 0), i8* getelementptr ([14 x i8]* @.str45, i32 0, i32 0), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 147, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite44 to %0*), i1 false, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str47 = internal constant [14 x i8] c"genrand_real2\00", section "llvm.metadata" ; <[14 x i8]*> [#uses=1] - at llvm.dbg.subprogram48 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([14 x i8]* @.str47, i32 0, i32 0), i8* getelementptr ([14 x i8]* @.str47, i32 0, i32 0), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 154, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite44 to %0*), i1 false, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str49 = internal constant [14 x i8] c"genrand_real3\00", section "llvm.metadata" ; <[14 x i8]*> [#uses=1] - at llvm.dbg.subprogram50 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([14 x i8]* @.str49, i32 0, i32 0), i8* getelementptr ([14 x i8]* @.str49, i32 0, i32 0), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 161, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite44 to %0*), i1 false, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str51 = internal constant [14 x i8] c"genrand_res53\00", section "llvm.metadata" ; <[14 x i8]*> [#uses=1] - at llvm.dbg.subprogram52 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([14 x i8]* @.str51, i32 0, i32 0), i8* getelementptr ([14 x i8]* @.str51, i32 0, i32 0), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 168, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite44 to %0*), i1 false, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array57 = internal constant [1 x %0*] [%0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to %0*)], section "llvm.metadata" ; <[1 x %0*]*> [#uses=1] - at llvm.dbg.composite58 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([1 x %0*]* @llvm.dbg.array57 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str59 = internal constant [5 x i8] c"main\00", section "llvm.metadata" ; <[5 x i8]*> [#uses=1] - at llvm.dbg.subprogram60 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([5 x i8]* @.str59, i32 0, i32 0), i8* getelementptr ([5 x i8]* @.str59, i32 0, i32 0), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 175, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite58 to %0*), i1 false, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str69 = internal constant [32 x i8] c"1000 outputs of genrand_int32()\00" ; <[32 x i8]*> [#uses=1] - at .str70 = internal constant [7 x i8] c"%10lu \00" ; <[7 x i8]*> [#uses=1] - at .str71 = internal constant [33 x i8] c"\0A1000 outputs of genrand_real2()\00" ; <[33 x i8]*> [#uses=1] - at .str72 = internal constant [8 x i8] c"%10.8f \00" ; <[8 x i8]*> [#uses=1] - -define void @init_genrand(i32 %s) nounwind { -entry: - tail call void @llvm.dbg.func.start(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram to %0*)) - tail call void @llvm.dbg.stoppoint(i32 59, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - store i32 %s, i32* getelementptr ([624 x i32]* @mt, i32 0, i32 0), align 32 - tail call void @llvm.dbg.stoppoint(i32 60, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - store i32 1, i32* @mti - tail call void @llvm.dbg.stoppoint(i32 60, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - br i1 false, label %return, label %bb.nph - -bb.nph: ; preds = %entry - %mti.promoted = load i32* @mti ; [#uses=1] - br label %bb - -bb: ; preds = %bb1, %bb.nph - %indvar = phi i32 [ 0, %bb.nph ], [ %indvar.next, %bb1 ] ; [#uses=2] - %mti.tmp.0 = add i32 %indvar, %mti.promoted ; [#uses=5] - tail call void @llvm.dbg.stoppoint(i32 61, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %0 = add i32 %mti.tmp.0, -1 ; [#uses=1] - %1 = getelementptr [624 x i32]* @mt, i32 0, i32 %0 ; [#uses=1] - %2 = load i32* %1, align 4 ; [#uses=1] - %3 = add i32 %mti.tmp.0, -1 ; [#uses=1] - %4 = getelementptr [624 x i32]* @mt, i32 0, i32 %3 ; [#uses=1] - %5 = load i32* %4, align 4 ; [#uses=1] - %6 = lshr i32 %5, 30 ; [#uses=1] - %7 = xor i32 %6, %2 ; [#uses=1] - %8 = mul i32 %7, 1812433253 ; [#uses=1] - %9 = add i32 %8, %mti.tmp.0 ; [#uses=1] - %10 = getelementptr [624 x i32]* @mt, i32 0, i32 %mti.tmp.0 ; [#uses=1] - store i32 %9, i32* %10, align 4 - tail call void @llvm.dbg.stoppoint(i32 60, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %11 = add i32 %mti.tmp.0, 1 ; [#uses=2] - br label %bb1 - -bb1: ; preds = %bb - tail call void @llvm.dbg.stoppoint(i32 60, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %12 = icmp sgt i32 %11, 623 ; [#uses=1] - %indvar.next = add i32 %indvar, 1 ; [#uses=1] - br i1 %12, label %bb1.return_crit_edge, label %bb - -bb1.return_crit_edge: ; preds = %bb1 - store i32 %11, i32* @mti - br label %return - -return: ; preds = %bb1.return_crit_edge, %entry - tail call void @llvm.dbg.stoppoint(i32 70, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - tail call void @llvm.dbg.region.end(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram to %0*)) - ret void -} - -declare void @llvm.dbg.func.start(%0*) nounwind - -declare void @llvm.dbg.stoppoint(i32, i32, %0*) nounwind - -declare void @llvm.dbg.region.end(%0*) nounwind - -declare i32 @puts(i8* nocapture) nounwind - -declare i32 @printf(i8* noalias nocapture, ...) nounwind - -declare i32 @putchar(i32) nounwind From sabre at nondot.org Mon Mar 1 12:47:12 2010 From: sabre at nondot.org (Chris Lattner) Date: Mon, 01 Mar 2010 18:47:12 -0000 Subject: [llvm-commits] [llvm] r97469 - in /llvm/trunk: include/llvm/CodeGen/SelectionDAGISel.h lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Message-ID: <20100301184712.0F8272A6C12C@llvm.org> Author: lattner Date: Mon Mar 1 12:47:11 2010 New Revision: 97469 URL: http://llvm.org/viewvc/llvm-project?rev=97469&view=rev Log: Accelerate isel dispatch for tables that start with a top-level OPC_SwitchOpcode to use a table lookup instead of having to go through the interpreter for this. Modified: llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Modified: llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h?rev=97469&r1=97468&r2=97469&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h (original) +++ llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h Mon Mar 1 12:47:11 2010 @@ -245,6 +245,10 @@ /// one preferred by the target. /// ScheduleDAGSDNodes *CreateScheduler(); + + /// OpcodeOffset - This is a cache used to dispatch efficiently into isel + /// state machines that start with a OPC_SwitchOpcode node. + std::vector OpcodeOffset; }; } Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp?rev=97469&r1=97468&r2=97469&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Mon Mar 1 12:47:11 2010 @@ -1665,8 +1665,43 @@ NodeToMatch->dump(CurDAG); errs() << '\n'); - // Interpreter starts at opcode #0. + // Determine where to start the interpreter. Normally we start at opcode #0, + // but if the state machine starts with an OPC_SwitchOpcode, then we + // accelerate the first lookup (which is guaranteed to be hot) with the + // OpcodeOffset table. unsigned MatcherIndex = 0; + + if (!OpcodeOffset.empty()) { + // Already computed the OpcodeOffset table, just index into it. + if (N.getOpcode() < OpcodeOffset.size()) + MatcherIndex = OpcodeOffset[N.getOpcode()]; + DEBUG(errs() << " Initial Opcode index to " << MatcherIndex << "\n"); + + } else if (MatcherTable[0] == OPC_SwitchOpcode) { + // Otherwise, the table isn't computed, but the state machine does start + // with an OPC_SwitchOpcode instruction. Populate the table now, since this + // is the first time we're selecting an instruction. + unsigned Idx = 1; + while (1) { + // Get the size of this case. + unsigned CaseSize = MatcherTable[Idx++]; + if (CaseSize & 128) + CaseSize = GetVBR(CaseSize, MatcherTable, Idx); + if (CaseSize == 0) break; + + // Get the opcode, add the index to the table. + unsigned Opc = MatcherTable[Idx++]; + if (Opc >= OpcodeOffset.size()) + OpcodeOffset.resize((Opc+1)*2); + OpcodeOffset[Opc] = Idx; + Idx += CaseSize; + } + + // Okay, do the lookup for the first opcode. + if (N.getOpcode() < OpcodeOffset.size()) + MatcherIndex = OpcodeOffset[N.getOpcode()]; + } + while (1) { assert(MatcherIndex < TableSize && "Invalid index"); BuiltinOpcodes Opcode = (BuiltinOpcodes)MatcherTable[MatcherIndex++]; From edwintorok at gmail.com Mon Mar 1 12:49:10 2010 From: edwintorok at gmail.com (Torok Edwin) Date: Mon, 01 Mar 2010 18:49:10 -0000 Subject: [llvm-commits] [llvm] r97470 - /llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp Message-ID: <20100301184910.B53712A6C12C@llvm.org> Author: edwin Date: Mon Mar 1 12:49:10 2010 New Revision: 97470 URL: http://llvm.org/viewvc/llvm-project?rev=97470&view=rev Log: Add command-line flag to tblgen to turn off generating comments for the new isel (defaults it to generate comments). This reduces the size of the generated source file. Modified: llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp Modified: llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp?rev=97470&r1=97469&r2=97470&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp (original) +++ llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp Mon Mar 1 12:49:10 2010 @@ -17,6 +17,7 @@ #include "llvm/ADT/DenseMap.h" #include "llvm/ADT/SmallString.h" #include "llvm/ADT/StringMap.h" +#include "llvm/Support/CommandLine.h" #include "llvm/Support/FormattedStream.h" using namespace llvm; @@ -24,6 +25,11 @@ CommentIndent = 30 }; +// To reduce generated source code size. +static cl::opt +OmitComments("omit-comments", cl::desc("Do not generate comments"), + cl::init(false)); + namespace { class MatcherTableEmitter { StringMap NodePredicateMap, PatternPredicateMap; @@ -116,7 +122,10 @@ Val >>= 7; ++NumBytes; } - OS << Val << "/*" << InVal << "*/, "; + OS << Val; + if (!OmitComments) + OS << "/*" << InVal << "*/"; + OS << ", "; return NumBytes+1; } @@ -139,9 +148,12 @@ if (i == 0) { OS << "OPC_Scope, "; ++CurrentIdx; - } else { - OS << "/*" << CurrentIdx << "*/"; - OS.PadToColumn(Indent*2) << "/*Scope*/ "; + } else { + if (!OmitComments) { + OS << "/*" << CurrentIdx << "*/"; + OS.PadToColumn(Indent*2) << "/*Scope*/ "; + } else + OS.PadToColumn(Indent*2); } // We need to encode the child and the offset of the failure code before @@ -165,35 +177,45 @@ assert(ChildSize != 0 && "Should not have a zero-sized child!"); CurrentIdx += EmitVBRValue(ChildSize, OS); - OS << "/*->" << CurrentIdx+ChildSize << "*/"; + if (!OmitComments) { + OS << "/*->" << CurrentIdx+ChildSize << "*/"; - if (i == 0) - OS.PadToColumn(CommentIndent) << "// " << SM->getNumChildren() - << " children in Scope"; + if (i == 0) + OS.PadToColumn(CommentIndent) << "// " << SM->getNumChildren() + << " children in Scope"; + } OS << '\n' << TmpBuf.str(); CurrentIdx += ChildSize; } // Emit a zero as a sentinel indicating end of 'Scope'. - OS << "/*" << CurrentIdx << "*/"; - OS.PadToColumn(Indent*2) << "0, /*End of Scope*/\n"; + if (!OmitComments) + OS << "/*" << CurrentIdx << "*/"; + OS.PadToColumn(Indent*2) << "0, "; + if (!OmitComments) + OS << "/*End of Scope*/"; + OS << '\n'; return CurrentIdx - StartIdx + 1; } case Matcher::RecordNode: OS << "OPC_RecordNode,"; - OS.PadToColumn(CommentIndent) << "// #" - << cast(N)->getResultNo() << " = " - << cast(N)->getWhatFor() << '\n'; + if (!OmitComments) + OS.PadToColumn(CommentIndent) << "// #" + << cast(N)->getResultNo() << " = " + << cast(N)->getWhatFor(); + OS << '\n'; return 1; case Matcher::RecordChild: OS << "OPC_RecordChild" << cast(N)->getChildNo() << ','; - OS.PadToColumn(CommentIndent) << "// #" - << cast(N)->getResultNo() << " = " - << cast(N)->getWhatFor() << '\n'; + if (!OmitComments) + OS.PadToColumn(CommentIndent) << "// #" + << cast(N)->getResultNo() << " = " + << cast(N)->getWhatFor(); + OS << '\n'; return 1; case Matcher::RecordMemRef: @@ -220,13 +242,17 @@ case Matcher::CheckPatternPredicate: { StringRef Pred = cast(N)->getPredicate(); OS << "OPC_CheckPatternPredicate, " << getPatternPredicate(Pred) << ','; - OS.PadToColumn(CommentIndent) << "// " << Pred << '\n'; + if (!OmitComments) + OS.PadToColumn(CommentIndent) << "// " << Pred; + OS << '\n'; return 2; } case Matcher::CheckPredicate: { StringRef Pred = cast(N)->getPredicateName(); OS << "OPC_CheckPredicate, " << getNodePredicate(Pred) << ','; - OS.PadToColumn(CommentIndent) << "// " << Pred << '\n'; + if (!OmitComments) + OS.PadToColumn(CommentIndent) << "// " << Pred; + OS << '\n'; return 2; } @@ -238,7 +264,10 @@ case Matcher::SwitchOpcode: { unsigned StartIdx = CurrentIdx; const SwitchOpcodeMatcher *SOM = cast(N); - OS << "OPC_SwitchOpcode /*" << SOM->getNumCases() << " cases */, "; + OS << "OPC_SwitchOpcode "; + if (!OmitComments) + OS << "/*" << SOM->getNumCases() << " cases */"; + OS << ", "; ++CurrentIdx; // For each case we emit the size, then the opcode, then the matcher. @@ -263,21 +292,28 @@ assert(ChildSize != 0 && "Should not have a zero-sized child!"); - if (i != 0) - OS.PadToColumn(Indent*2) << "/*SwitchOpcode*/ "; + if (i != 0) { + OS.PadToColumn(Indent*2); + if (!OmitComments) + OS << "/*SwitchOpcode*/ "; + } // Emit the VBR. CurrentIdx += EmitVBRValue(ChildSize, OS); OS << " " << SOM->getCaseOpcode(i).getEnumName() << ","; - OS << "// ->" << CurrentIdx+ChildSize+1 << '\n'; + if (!OmitComments) + OS << "// ->" << CurrentIdx+ChildSize+1; + OS << '\n'; ++CurrentIdx; OS << TmpBuf.str(); CurrentIdx += ChildSize; } // Emit the final zero to terminate the switch. - OS.PadToColumn(Indent*2) << "0, // EndSwitchOpcode\n"; + OS.PadToColumn(Indent*2) << "0, "; + if (!OmitComments) + OS << "// EndSwitchOpcode"; ++CurrentIdx; return CurrentIdx-StartIdx; } @@ -309,10 +345,12 @@ const ComplexPattern &Pattern = cast(N)->getPattern(); OS << "OPC_CheckComplexPat, " << getComplexPat(Pattern) << ','; - OS.PadToColumn(CommentIndent) << "// " << Pattern.getSelectFunc(); - OS << ": " << Pattern.getNumOperands() << " operands"; - if (Pattern.hasProperty(SDNPHasChain)) - OS << " + chain result and input"; + if (!OmitComments) { + OS.PadToColumn(CommentIndent) << "// " << Pattern.getSelectFunc(); + OS << ": " << Pattern.getNumOperands() << " operands"; + if (Pattern.hasProperty(SDNPHasChain)) + OS << " + chain result and input"; + } OS << '\n'; return 2; } @@ -353,8 +391,12 @@ << getEnumName(cast(N)->getVT()) << ", "; if (Record *R = cast(N)->getReg()) OS << getQualifiedName(R) << ",\n"; - else - OS << "0 /*zero_reg*/,\n"; + else { + OS << "0 "; + if (!OmitComments) + OS << "/*zero_reg*/"; + OS << ",\n"; + } return 3; case Matcher::EmitConvertToTarget: @@ -381,7 +423,9 @@ const EmitNodeXFormMatcher *XF = cast(N); OS << "OPC_EmitNodeXForm, " << getNodeXFormID(XF->getNodeXForm()) << ", " << XF->getSlot() << ','; - OS.PadToColumn(CommentIndent) << "// "<getNodeXForm()->getName()<<'\n'; + if (!OmitComments) + OS.PadToColumn(CommentIndent) << "// "<getNodeXForm()->getName(); + OS <<'\n'; return 3; } @@ -399,11 +443,17 @@ OS << "|OPFL_Variadic" << EN->getNumFixedArityOperands(); OS << ",\n"; - OS.PadToColumn(Indent*2+4) << EN->getNumVTs() << "/*#VTs*/, "; + OS.PadToColumn(Indent*2+4) << EN->getNumVTs(); + if (!OmitComments) + OS << "/*#VTs*/"; + OS << ", "; for (unsigned i = 0, e = EN->getNumVTs(); i != e; ++i) OS << getEnumName(EN->getVT(i)) << ", "; - OS << EN->getNumOperands() << "/*#Ops*/, "; + OS << EN->getNumOperands(); + if (!OmitComments) + OS << "/*#Ops*/"; + OS << ", "; unsigned NumOperandBytes = 0; for (unsigned i = 0, e = EN->getNumOperands(); i != e; ++i) { // We emit the operand numbers in VBR encoded format, in case the number @@ -411,24 +461,26 @@ NumOperandBytes += EmitVBRValue(EN->getOperand(i), OS); } - // Print the result #'s for EmitNode. - if (const EmitNodeMatcher *E = dyn_cast(EN)) { - if (unsigned NumResults = EN->getNumVTs()) { - OS.PadToColumn(CommentIndent) << "// Results = "; - unsigned First = E->getFirstResultSlot(); - for (unsigned i = 0; i != NumResults; ++i) - OS << "#" << First+i << " "; + if (!OmitComments) { + // Print the result #'s for EmitNode. + if (const EmitNodeMatcher *E = dyn_cast(EN)) { + if (unsigned NumResults = EN->getNumVTs()) { + OS.PadToColumn(CommentIndent) << "// Results = "; + unsigned First = E->getFirstResultSlot(); + for (unsigned i = 0; i != NumResults; ++i) + OS << "#" << First+i << " "; + } } - } - OS << '\n'; - - if (const MorphNodeToMatcher *SNT = dyn_cast(N)) { - OS.PadToColumn(Indent*2) << "// Src: " - << *SNT->getPattern().getSrcPattern() << '\n'; - OS.PadToColumn(Indent*2) << "// Dst: " - << *SNT->getPattern().getDstPattern() << '\n'; - - } + OS << '\n'; + + if (const MorphNodeToMatcher *SNT = dyn_cast(N)) { + OS.PadToColumn(Indent*2) << "// Src: " + << *SNT->getPattern().getSrcPattern() << '\n'; + OS.PadToColumn(Indent*2) << "// Dst: " + << *SNT->getPattern().getDstPattern() << '\n'; + } + } else + OS << '\n'; return 6+EN->getNumVTs()+NumOperandBytes; } @@ -448,10 +500,13 @@ for (unsigned i = 0, e = CM->getNumResults(); i != e; ++i) NumResultBytes += EmitVBRValue(CM->getResult(i), OS); OS << '\n'; - OS.PadToColumn(Indent*2) << "// Src: " - << *CM->getPattern().getSrcPattern() << '\n'; - OS.PadToColumn(Indent*2) << "// Dst: " - << *CM->getPattern().getDstPattern() << '\n'; + if (!OmitComments) { + OS.PadToColumn(Indent*2) << "// Src: " + << *CM->getPattern().getSrcPattern() << '\n'; + OS.PadToColumn(Indent*2) << "// Dst: " + << *CM->getPattern().getDstPattern(); + } + OS << '\n'; return 2 + NumResultBytes; } } @@ -468,8 +523,8 @@ if (unsigned(N->getKind()) >= Histogram.size()) Histogram.resize(N->getKind()+1); Histogram[N->getKind()]++; - - OS << "/*" << CurrentIdx << "*/"; + if (!OmitComments) + OS << "/*" << CurrentIdx << "*/"; unsigned MatcherSize = EmitMatcher(N, Indent, CurrentIdx, OS); Size += MatcherSize; CurrentIdx += MatcherSize; @@ -581,7 +636,10 @@ Record *SDNode = Entry.first; const std::string &Code = Entry.second; - OS << " case " << i << ": { // " << NodeXForms[i]->getName() << '\n'; + OS << " case " << i << ": { "; + if (!OmitComments) + OS << "// " << NodeXForms[i]->getName(); + OS << '\n'; std::string ClassName = CGP.getSDNodeInfo(SDNode).getSDClassName(); if (ClassName == "SDNode") @@ -597,6 +655,8 @@ } void MatcherTableEmitter::EmitHistogram(formatted_raw_ostream &OS) { + if (OmitComments) + return; OS << " // Opcode Histogram:\n"; for (unsigned i = 0, e = Histogram.size(); i != e; ++i) { OS << " // #"; @@ -663,7 +723,7 @@ OS << " #undef TARGET_OPCODE\n"; OS << " return SelectCodeCommon(N, MatcherTable,sizeof(MatcherTable));\n}\n"; - OS << "\n"; + OS << '\n'; // Next up, emit the function for node and pattern predicates: MatcherEmitter.EmitPredicateFunctions(CGP, OS); From edwintorok at gmail.com Mon Mar 1 13:00:55 2010 From: edwintorok at gmail.com (Torok Edwin) Date: Mon, 01 Mar 2010 19:00:55 -0000 Subject: [llvm-commits] [llvm] r97472 - /llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp Message-ID: <20100301190055.490C22A6C12C@llvm.org> Author: edwin Date: Mon Mar 1 13:00:55 2010 New Revision: 97472 URL: http://llvm.org/viewvc/llvm-project?rev=97472&view=rev Log: Missed a \n in previous commit. Modified: llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp Modified: llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp?rev=97472&r1=97471&r2=97472&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp (original) +++ llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp Mon Mar 1 13:00:55 2010 @@ -314,6 +314,7 @@ OS.PadToColumn(Indent*2) << "0, "; if (!OmitComments) OS << "// EndSwitchOpcode"; + OS << '\n'; ++CurrentIdx; return CurrentIdx-StartIdx; } From dpatel at apple.com Mon Mar 1 13:02:51 2010 From: dpatel at apple.com (Devang Patel) Date: Mon, 01 Mar 2010 19:02:51 -0000 Subject: [llvm-commits] [llvm] r97473 - in /llvm/trunk/test/DebugInfo: deaddebuglabel.ll inheritance.ll Message-ID: <20100301190251.CBE6A2A6C12C@llvm.org> Author: dpatel Date: Mon Mar 1 13:02:51 2010 New Revision: 97473 URL: http://llvm.org/viewvc/llvm-project?rev=97473&view=rev Log: Replace test case that uses @llvm.dbg.* intrinsic with a test that uses metadata. Added: llvm/trunk/test/DebugInfo/inheritance.ll Removed: llvm/trunk/test/DebugInfo/deaddebuglabel.ll Removed: llvm/trunk/test/DebugInfo/deaddebuglabel.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/deaddebuglabel.ll?rev=97472&view=auto ============================================================================== --- llvm/trunk/test/DebugInfo/deaddebuglabel.ll (original) +++ llvm/trunk/test/DebugInfo/deaddebuglabel.ll (removed) @@ -1,62 +0,0 @@ -; RUN: llc %s -o - -O0 | grep "label" | count 8 -; PR2614 -; XFAIL: * - -target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-f80:32:32-v64:64:64-v128:128:128-a0:0:64" -target triple = "i686-pc-linux-gnu" - %llvm.dbg.anchor.type = type { i32, i32 } - %llvm.dbg.basictype.type = type { i32, { }*, i8*, { }*, i32, i64, i64, i64, i32, i32 } - %llvm.dbg.compile_unit.type = type { i32, { }*, i32, i8*, i8*, i8* } - %llvm.dbg.compositetype.type = type { i32, { }*, i8*, { }*, i32, i64, i64, i64, i32, { }*, { }* } - %llvm.dbg.derivedtype.type = type { i32, { }*, i8*, { }*, i32, i64, i64, i64, i32, { }* } - %llvm.dbg.global_variable.type = type { i32, { }*, { }*, i8*, i8*, i8*, { }*, i32, { }*, i1, i1, { }* } - %llvm.dbg.subprogram.type = type { i32, { }*, { }*, i8*, i8*, i8*, { }*, i32, { }*, i1, i1 } - %llvm.dbg.variable.type = type { i32, { }*, i8*, { }*, i32, { }* } - at llvm.dbg.compile_units = linkonce constant %llvm.dbg.anchor.type { i32 393216, i32 17 }, section "llvm.metadata" ; <%llvm.dbg.anchor.type*> [#uses=1] - at llvm.dbg.global_variables = linkonce constant %llvm.dbg.anchor.type { i32 393216, i32 52 }, section "llvm.metadata" ; <%llvm.dbg.anchor.type*> [#uses=0] - at llvm.dbg.subprograms = linkonce constant %llvm.dbg.anchor.type { i32 393216, i32 46 }, section "llvm.metadata" ; <%llvm.dbg.anchor.type*> [#uses=1] - at .str = internal constant [17 x i8] c"deaddebuglabel.d\00", section "llvm.metadata" ; <[17 x i8]*> [#uses=1] - at .str1 = internal constant [50 x i8] c"/home/kamm/eigenes/projekte/llvmdc/llvmdc/mytests\00", section "llvm.metadata" ; <[50 x i8]*> [#uses=1] - at .str2 = internal constant [48 x i8] c"LLVMDC (http://www.dsource.org/projects/llvmdc)\00", section "llvm.metadata" ; <[48 x i8]*> [#uses=1] - at llvm.dbg.compile_unit = internal constant %llvm.dbg.compile_unit.type { - i32 393233, - { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.compile_units to { }*), - i32 2, - i8* getelementptr ([17 x i8]* @.str, i32 0, i32 0), - i8* getelementptr ([50 x i8]* @.str1, i32 0, i32 0), - i8* getelementptr ([48 x i8]* @.str2, i32 0, i32 0) }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] - at .str5 = internal constant [20 x i8] c"deaddebuglabel.main\00", section "llvm.metadata" ; <[20 x i8]*> [#uses=1] - at .str6 = internal constant [5 x i8] c"main\00", section "llvm.metadata" ; <[5 x i8]*> [#uses=1] - at llvm.dbg.subprogram7 = internal constant %llvm.dbg.subprogram.type { - i32 393262, - { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to { }*), - { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), - i8* getelementptr ([20 x i8]* @.str5, i32 0, i32 0), - i8* getelementptr ([20 x i8]* @.str5, i32 0, i32 0), - i8* getelementptr ([5 x i8]* @.str6, i32 0, i32 0), - { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), - i32 3, - { }* null, - i1 false, - i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - -declare void @llvm.dbg.func.start({ }*) nounwind - -declare void @llvm.dbg.stoppoint(i32, i32, { }*) nounwind - -declare void @llvm.dbg.region.end({ }*) nounwind - -define fastcc i32 @main() { -entry.main: - call void @llvm.dbg.func.start( { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram7 to { }*) ) - br i1 true, label %reachable, label %unreachable - -reachable: ; preds = %entry.main - call void @llvm.dbg.region.end( { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram7 to { }*) ) - ret i32 1 - -unreachable: ; preds = %entry.main - call void @llvm.dbg.stoppoint( i32 7, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*) ) - call void @llvm.dbg.region.end( { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram7 to { }*) ) - ret i32 0 -} Added: llvm/trunk/test/DebugInfo/inheritance.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/inheritance.ll?rev=97473&view=auto ============================================================================== --- llvm/trunk/test/DebugInfo/inheritance.ll (added) +++ llvm/trunk/test/DebugInfo/inheritance.ll Mon Mar 1 13:02:51 2010 @@ -0,0 +1,151 @@ +; RUN: llc %s -o /dev/null +; PR 2613. + +%struct.__class_type_info_pseudo = type { %struct.__type_info_pseudo } +%struct.__type_info_pseudo = type { i8*, i8* } +%struct.test1 = type { i32 (...)** } + + at _ZTV5test1 = weak_odr constant [4 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__class_type_info_pseudo* @_ZTI5test1 to i32 (...)*), i32 (...)* bitcast (void (%struct.test1*)* @_ZN5test1D1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.test1*)* @_ZN5test1D0Ev to i32 (...)*)], align 32 ; <[4 x i32 (...)*]*> [#uses=1] + at _ZTI5test1 = weak_odr constant %struct.__class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i64 add (i64 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv117__class_type_infoE to i64), i64 16) to i8*), i8* getelementptr inbounds ([7 x i8]* @_ZTS5test1, i64 0, i64 0) } }, align 16 ; <%struct.__class_type_info_pseudo*> [#uses=1] + at _ZTVN10__cxxabiv117__class_type_infoE = external constant [0 x i32 (...)*] ; <[0 x i32 (...)*]*> [#uses=1] + at _ZTS5test1 = weak_odr constant [7 x i8] c"5test1\00" ; <[7 x i8]*> [#uses=2] + +define i32 @main() nounwind ssp { +entry: + %retval = alloca i32 ; [#uses=2] + %0 = alloca i32 ; [#uses=2] + %tst = alloca %struct.test1 ; <%struct.test1*> [#uses=1] + %"alloca point" = bitcast i32 0 to i32 ; [#uses=0] + call void @llvm.dbg.declare(metadata !{%struct.test1* %tst}, metadata !0), !dbg !21 + call void @_ZN5test1C1Ev(%struct.test1* %tst) nounwind, !dbg !22 + store i32 0, i32* %0, align 4, !dbg !23 + %1 = load i32* %0, align 4, !dbg !23 ; [#uses=1] + store i32 %1, i32* %retval, align 4, !dbg !23 + br label %return, !dbg !23 + +return: ; preds = %entry + %retval1 = load i32* %retval, !dbg !23 ; [#uses=1] + ret i32 %retval1, !dbg !23 +} + +define linkonce_odr void @_ZN5test1C1Ev(%struct.test1* %this) nounwind ssp align 2 { +entry: + %this_addr = alloca %struct.test1* ; <%struct.test1**> [#uses=2] + %"alloca point" = bitcast i32 0 to i32 ; [#uses=0] + call void @llvm.dbg.declare(metadata !{%struct.test1** %this_addr}, metadata !24), !dbg !28 + store %struct.test1* %this, %struct.test1** %this_addr + %0 = load %struct.test1** %this_addr, align 8, !dbg !28 ; <%struct.test1*> [#uses=1] + %1 = getelementptr inbounds %struct.test1* %0, i32 0, i32 0, !dbg !28 ; [#uses=1] + store i32 (...)** getelementptr inbounds ([4 x i32 (...)*]* @_ZTV5test1, i64 0, i64 2), i32 (...)*** %1, align 8, !dbg !28 + br label %return, !dbg !28 + +return: ; preds = %entry + ret void, !dbg !29 +} + +declare void @llvm.dbg.declare(metadata, metadata) nounwind readnone + +define linkonce_odr void @_ZN5test1D1Ev(%struct.test1* %this) nounwind ssp align 2 { +entry: + %this_addr = alloca %struct.test1* ; <%struct.test1**> [#uses=3] + %"alloca point" = bitcast i32 0 to i32 ; [#uses=0] + call void @llvm.dbg.declare(metadata !{%struct.test1** %this_addr}, metadata !32), !dbg !34 + store %struct.test1* %this, %struct.test1** %this_addr + %0 = load %struct.test1** %this_addr, align 8, !dbg !35 ; <%struct.test1*> [#uses=1] + %1 = getelementptr inbounds %struct.test1* %0, i32 0, i32 0, !dbg !35 ; [#uses=1] + store i32 (...)** getelementptr inbounds ([4 x i32 (...)*]* @_ZTV5test1, i64 0, i64 2), i32 (...)*** %1, align 8, !dbg !35 + br label %bb, !dbg !37 + +bb: ; preds = %entry + %2 = trunc i32 0 to i8, !dbg !37 ; [#uses=1] + %toBool = icmp ne i8 %2, 0, !dbg !37 ; [#uses=1] + br i1 %toBool, label %bb1, label %bb2, !dbg !37 + +bb1: ; preds = %bb + %3 = load %struct.test1** %this_addr, align 8, !dbg !37 ; <%struct.test1*> [#uses=1] + %4 = bitcast %struct.test1* %3 to i8*, !dbg !37 ; [#uses=1] + call void @_ZdlPv(i8* %4) nounwind, !dbg !37 + br label %bb2, !dbg !37 + +bb2: ; preds = %bb1, %bb + br label %return, !dbg !37 + +return: ; preds = %bb2 + ret void, !dbg !37 +} + +define linkonce_odr void @_ZN5test1D0Ev(%struct.test1* %this) nounwind ssp align 2 { +entry: + %this_addr = alloca %struct.test1* ; <%struct.test1**> [#uses=3] + %"alloca point" = bitcast i32 0 to i32 ; [#uses=0] + call void @llvm.dbg.declare(metadata !{%struct.test1** %this_addr}, metadata !38), !dbg !40 + store %struct.test1* %this, %struct.test1** %this_addr + %0 = load %struct.test1** %this_addr, align 8, !dbg !41 ; <%struct.test1*> [#uses=1] + %1 = getelementptr inbounds %struct.test1* %0, i32 0, i32 0, !dbg !41 ; [#uses=1] + store i32 (...)** getelementptr inbounds ([4 x i32 (...)*]* @_ZTV5test1, i64 0, i64 2), i32 (...)*** %1, align 8, !dbg !41 + br label %bb, !dbg !43 + +bb: ; preds = %entry + %2 = trunc i32 1 to i8, !dbg !43 ; [#uses=1] + %toBool = icmp ne i8 %2, 0, !dbg !43 ; [#uses=1] + br i1 %toBool, label %bb1, label %bb2, !dbg !43 + +bb1: ; preds = %bb + %3 = load %struct.test1** %this_addr, align 8, !dbg !43 ; <%struct.test1*> [#uses=1] + %4 = bitcast %struct.test1* %3 to i8*, !dbg !43 ; [#uses=1] + call void @_ZdlPv(i8* %4) nounwind, !dbg !43 + br label %bb2, !dbg !43 + +bb2: ; preds = %bb1, %bb + br label %return, !dbg !43 + +return: ; preds = %bb2 + ret void, !dbg !43 +} + +declare void @_ZdlPv(i8*) nounwind + +!0 = metadata !{i32 459008, metadata !1, metadata !"tst", metadata !4, i32 13, metadata !8} ; [ DW_TAG_auto_variable ] +!1 = metadata !{i32 458763, metadata !2, i32 0, i32 0} ; [ DW_TAG_lexical_block ] +!2 = metadata !{i32 458763, metadata !3, i32 0, i32 0} ; [ DW_TAG_lexical_block ] +!3 = metadata !{i32 458798, i32 0, metadata !4, metadata !"main", metadata !"main", metadata !"main", metadata !4, i32 11, metadata !5, i1 false, i1 true, i32 0, i32 0, null, i1 false} ; [ DW_TAG_subprogram ] +!4 = metadata !{i32 458769, i32 0, i32 4, metadata !"inheritance.cpp", metadata !"/tmp/", metadata !"4.2.1 (Based on Apple Inc. build 5658) (LLVM build)", i1 true, i1 false, metadata !"", i32 0} ; [ DW_TAG_compile_unit ] +!5 = metadata !{i32 458773, metadata !4, metadata !"", metadata !4, i32 0, i64 0, i64 0, i64 0, i32 0, null, metadata !6, i32 0, null} ; [ DW_TAG_subroutine_type ] +!6 = metadata !{metadata !7} +!7 = metadata !{i32 458788, metadata !4, metadata !"int", metadata !4, i32 0, i64 32, i64 32, i64 0, i32 0, i32 5} ; [ DW_TAG_base_type ] +!8 = metadata !{i32 458771, metadata !4, metadata !"test1", metadata !4, i32 1, i64 64, i64 64, i64 0, i32 0, null, metadata !9, i32 0, metadata !8} ; [ DW_TAG_structure_type ] +!9 = metadata !{metadata !10, metadata !14, metadata !18} +!10 = metadata !{i32 458765, metadata !8, metadata !"_vptr$test1", metadata !4, i32 1, i64 64, i64 64, i64 0, i32 0, metadata !11} ; [ DW_TAG_member ] +!11 = metadata !{i32 458767, metadata !4, metadata !"", metadata !4, i32 0, i64 64, i64 64, i64 0, i32 0, metadata !12} ; [ DW_TAG_pointer_type ] +!12 = metadata !{i32 458767, metadata !4, metadata !"__vtbl_ptr_type", metadata !13, i32 0, i64 0, i64 0, i64 0, i32 0, metadata !5} ; [ DW_TAG_pointer_type ] +!13 = metadata !{i32 458769, i32 0, i32 4, metadata !"", metadata !"/tmp/", metadata !"4.2.1 (Based on Apple Inc. build 5658) (LLVM build)", i1 false, i1 false, metadata !"", i32 0} ; [ DW_TAG_compile_unit ] +!14 = metadata !{i32 458798, i32 0, metadata !8, metadata !"test1", metadata !"test1", metadata !"", metadata !4, i32 1, metadata !15, i1 false, i1 false, i32 0, i32 0, null, i1 true} ; [ DW_TAG_subprogram ] +!15 = metadata !{i32 458773, metadata !4, metadata !"", metadata !4, i32 0, i64 0, i64 0, i64 0, i32 0, null, metadata !16, i32 0, null} ; [ DW_TAG_subroutine_type ] +!16 = metadata !{null, metadata !17} +!17 = metadata !{i32 458767, metadata !4, metadata !"", metadata !4, i32 0, i64 64, i64 64, i64 0, i32 64, metadata !8} ; [ DW_TAG_pointer_type ] +!18 = metadata !{i32 458798, i32 0, metadata !8, metadata !"~test1", metadata !"~test1", metadata !"", metadata !4, i32 4, metadata !19, i1 false, i1 false, i32 1, i32 0, metadata !8, i1 false} ; [ DW_TAG_subprogram ] +!19 = metadata !{i32 458773, metadata !4, metadata !"", metadata !4, i32 0, i64 0, i64 0, i64 0, i32 0, null, metadata !20, i32 0, null} ; [ DW_TAG_subroutine_type ] +!20 = metadata !{null, metadata !17, metadata !7} +!21 = metadata !{i32 11, i32 0, metadata !1, null} +!22 = metadata !{i32 13, i32 0, metadata !1, null} +!23 = metadata !{i32 14, i32 0, metadata !1, null} +!24 = metadata !{i32 459009, metadata !25, metadata !"this", metadata !4, i32 13, metadata !26} ; [ DW_TAG_arg_variable ] +!25 = metadata !{i32 458798, i32 0, metadata !4, metadata !"test1", metadata !"test1", metadata !"_ZN5test1C1Ev", metadata !4, i32 1, metadata !15, i1 false, i1 true, i32 0, i32 0, null, i1 false} ; [ DW_TAG_subprogram ] +!26 = metadata !{i32 458790, metadata !4, metadata !"", metadata !4, i32 0, i64 64, i64 64, i64 0, i32 64, metadata !27} ; [ DW_TAG_const_type ] +!27 = metadata !{i32 458767, metadata !4, metadata !"", metadata !4, i32 0, i64 64, i64 64, i64 0, i32 0, metadata !8} ; [ DW_TAG_pointer_type ] +!28 = metadata !{i32 1, i32 0, metadata !25, null} +!29 = metadata !{i32 1, i32 0, metadata !30, null} +!30 = metadata !{i32 458763, metadata !31, i32 0, i32 0} ; [ DW_TAG_lexical_block ] +!31 = metadata !{i32 458763, metadata !25, i32 0, i32 0} ; [ DW_TAG_lexical_block ] +!32 = metadata !{i32 459009, metadata !33, metadata !"this", metadata !4, i32 4, metadata !26} ; [ DW_TAG_arg_variable ] +!33 = metadata !{i32 458798, i32 0, metadata !8, metadata !"~test1", metadata !"~test1", metadata !"_ZN5test1D1Ev", metadata !4, i32 4, metadata !15, i1 false, i1 true, i32 1, i32 0, metadata !8, i1 false} ; [ DW_TAG_subprogram ] +!34 = metadata !{i32 4, i32 0, metadata !33, null} +!35 = metadata !{i32 5, i32 0, metadata !36, null} +!36 = metadata !{i32 458763, metadata !33, i32 0, i32 0} ; [ DW_TAG_lexical_block ] +!37 = metadata !{i32 6, i32 0, metadata !36, null} +!38 = metadata !{i32 459009, metadata !39, metadata !"this", metadata !4, i32 4, metadata !26} ; [ DW_TAG_arg_variable ] +!39 = metadata !{i32 458798, i32 0, metadata !8, metadata !"~test1", metadata !"~test1", metadata !"_ZN5test1D0Ev", metadata !4, i32 4, metadata !15, i1 false, i1 true, i32 1, i32 1, metadata !8, i1 false} ; [ DW_TAG_subprogram ] +!40 = metadata !{i32 4, i32 0, metadata !39, null} +!41 = metadata !{i32 5, i32 0, metadata !42, null} +!42 = metadata !{i32 458763, metadata !39, i32 0, i32 0} ; [ DW_TAG_lexical_block ] +!43 = metadata !{i32 6, i32 0, metadata !42, null} From dpatel at apple.com Mon Mar 1 13:04:23 2010 From: dpatel at apple.com (Devang Patel) Date: Mon, 01 Mar 2010 19:04:23 -0000 Subject: [llvm-commits] [llvm] r97474 - /llvm/trunk/test/DebugInfo/funccall.ll Message-ID: <20100301190423.7F1632A6C12C@llvm.org> Author: dpatel Date: Mon Mar 1 13:04:23 2010 New Revision: 97474 URL: http://llvm.org/viewvc/llvm-project?rev=97474&view=rev Log: Remove dead test. Removed: llvm/trunk/test/DebugInfo/funccall.ll Removed: llvm/trunk/test/DebugInfo/funccall.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/funccall.ll?rev=97473&view=auto ============================================================================== --- llvm/trunk/test/DebugInfo/funccall.ll (original) +++ llvm/trunk/test/DebugInfo/funccall.ll (removed) @@ -1,147 +0,0 @@ -;; RUN: llc < %s - %llvm.dbg.anchor.type = type { i32, i32 } - %llvm.dbg.basictype.type = type { i32, { }*, i8*, { }*, i32, i64, i64, i64, i32, i32 } - %llvm.dbg.compile_unit.type = type { i32, { }*, i32, i8*, i8*, i8* } - %llvm.dbg.global_variable.type = type { i32, { }*, { }*, i8*, i8*, i8*, { }*, i32, { }*, i1, i1, { }* } - %llvm.dbg.subprogram.type = type { i32, { }*, { }*, i8*, i8*, i8*, { }*, i32, { }*, i1, i1 } - %llvm.dbg.variable.type = type { i32, { }*, i8*, { }*, i32, { }* } - at llvm.dbg.subprograms = linkonce constant %llvm.dbg.anchor.type { i32 393216, i32 46 }, section "llvm.metadata" ; <%llvm.dbg.anchor.type*> [#uses=1] - at llvm.dbg.compile_units = linkonce constant %llvm.dbg.anchor.type { i32 393216, i32 17 }, section "llvm.metadata" ; <%llvm.dbg.anchor.type*> [#uses=1] - at llvm.dbg.global_variables = linkonce constant %llvm.dbg.anchor.type { i32 393216, i32 52 }, section "llvm.metadata" ; <%llvm.dbg.anchor.type*> [#uses=1] - at llvm.dbg.subprogram = internal constant %llvm.dbg.subprogram.type { - i32 393262, - { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to { }*), - { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), - i8* getelementptr ([4 x i8]* @str, i32 0, i32 0), - i8* getelementptr ([4 x i8]* @str, i32 0, i32 0), - i8* null, - { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), - i32 4, - { }* null, - i1 false, - i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at str = internal constant [4 x i8] c"foo\00", section "llvm.metadata" ; <[4 x i8]*> [#uses=1] - at llvm.dbg.compile_unit = internal constant %llvm.dbg.compile_unit.type { - i32 393233, - { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.compile_units to { }*), - i32 1, - i8* getelementptr ([11 x i8]* @str1, i32 0, i32 0), - i8* getelementptr ([50 x i8]* @str2, i32 0, i32 0), - i8* getelementptr ([45 x i8]* @str3, i32 0, i32 0) }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] - at str1 = internal constant [11 x i8] c"funccall.c\00", section "llvm.metadata" ; <[11 x i8]*> [#uses=1] - at str2 = internal constant [50 x i8] c"/Volumes/Big2/llvm/llvm/test/Regression/Debugger/\00", section "llvm.metadata" ; <[50 x i8]*> [#uses=1] - at str3 = internal constant [45 x i8] c"4.0.1 LLVM (Apple Computer, Inc. build 5421)\00", section "llvm.metadata" ; <[45 x i8]*> [#uses=1] - at llvm.dbg.variable = internal constant %llvm.dbg.variable.type { - i32 393472, - { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram to { }*), - i8* getelementptr ([2 x i8]* @str4, i32 0, i32 0), - { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), - i32 5, - { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] - at str4 = internal constant [2 x i8] c"t\00", section "llvm.metadata" ; <[2 x i8]*> [#uses=1] - at llvm.dbg.basictype = internal constant %llvm.dbg.basictype.type { - i32 393252, - { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), - i8* getelementptr ([4 x i8]* @str15, i32 0, i32 0), - { }* null, - i32 0, - i64 32, - i64 32, - i64 0, - i32 0, - i32 5 }, section "llvm.metadata" ; <%llvm.dbg.basictype.type*> [#uses=1] - at str15 = internal constant [4 x i8] c"int\00", section "llvm.metadata" ; <[4 x i8]*> [#uses=1] - at llvm.dbg.subprogram2 = internal constant %llvm.dbg.subprogram.type { - i32 393262, - { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to { }*), - { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), - i8* getelementptr ([5 x i8]* @str6, i32 0, i32 0), - i8* getelementptr ([5 x i8]* @str6, i32 0, i32 0), - i8* null, - { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), - i32 8, - { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*), - i1 false, - i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at str6 = internal constant [5 x i8] c"main\00", section "llvm.metadata" ; <[5 x i8]*> [#uses=1] - at llvm.dbg.variable3 = internal constant %llvm.dbg.variable.type { - i32 393474, - { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram2 to { }*), - i8* getelementptr ([7 x i8]* @str7, i32 0, i32 0), - { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), - i32 8, - { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] - at str7 = internal constant [7 x i8] c"retval\00", section "llvm.metadata" ; <[7 x i8]*> [#uses=1] - at llvm.dbg.global_variable = internal constant %llvm.dbg.global_variable.type { - i32 393268, - { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.global_variables to { }*), - { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), - i8* getelementptr ([2 x i8]* @str4, i32 0, i32 0), - i8* getelementptr ([2 x i8]* @str4, i32 0, i32 0), - i8* null, - { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), - i32 2, - { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*), - i1 true, - i1 true, - { }* bitcast (i32* @q to { }*) }, section "llvm.metadata" ; <%llvm.dbg.global_variable.type*> [#uses=0] - at str4.upgrd.1 = internal constant [2 x i8] c"q\00", section "llvm.metadata" ; <[2 x i8]*> [#uses=0] - at q = internal global i32 0 ; [#uses=7] - -declare void @llvm.dbg.func.start({ }*) - -declare void @llvm.dbg.stoppoint(i32, i32, { }*) - -declare void @llvm.dbg.declare({ }*, { }*) - -declare void @llvm.dbg.region.start({ }*) - -declare void @llvm.dbg.region.end({ }*) - -define void @foo() { -entry: - %t = alloca i32, align 4 ; [#uses=3] - %"alloca point" = bitcast i32 0 to i32 ; [#uses=0] - call void @llvm.dbg.func.start( { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram to { }*) ) - call void @llvm.dbg.stoppoint( i32 4, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*) ) - %t.upgrd.2 = bitcast i32* %t to { }* ; <{ }*> [#uses=1] - call void @llvm.dbg.declare( { }* %t.upgrd.2, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable to { }*) ) - call void @llvm.dbg.stoppoint( i32 5, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*) ) - %tmp = load i32* @q ; [#uses=1] - store i32 %tmp, i32* %t - call void @llvm.dbg.stoppoint( i32 6, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*) ) - %tmp1 = load i32* %t ; [#uses=1] - %tmp2 = add i32 %tmp1, 1 ; [#uses=1] - store i32 %tmp2, i32* @q - call void @llvm.dbg.stoppoint( i32 7, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*) ) - call void @llvm.dbg.region.end( { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram to { }*) ) - ret void -} - -define i32 @main() { -entry: - %retval = alloca i32, align 4 ; [#uses=3] - %tmp = alloca i32, align 4 ; [#uses=2] - %"alloca point" = bitcast i32 0 to i32 ; [#uses=0] - call void @llvm.dbg.func.start( { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram2 to { }*) ) - call void @llvm.dbg.stoppoint( i32 8, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*) ) - %retval.upgrd.3 = bitcast i32* %retval to { }* ; <{ }*> [#uses=1] - call void @llvm.dbg.declare( { }* %retval.upgrd.3, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable3 to { }*) ) - call void @llvm.dbg.stoppoint( i32 9, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*) ) - store i32 0, i32* @q - call void @llvm.dbg.stoppoint( i32 10, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*) ) - call void (...)* bitcast (void ()* @foo to void (...)*)( ) - call void @llvm.dbg.stoppoint( i32 11, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*) ) - %tmp.upgrd.4 = load i32* @q ; [#uses=1] - %tmp1 = sub i32 %tmp.upgrd.4, 1 ; [#uses=1] - store i32 %tmp1, i32* @q - call void @llvm.dbg.stoppoint( i32 13, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*) ) - %tmp2 = load i32* @q ; [#uses=1] - store i32 %tmp2, i32* %tmp - %tmp3 = load i32* %tmp ; [#uses=1] - store i32 %tmp3, i32* %retval - %retval.upgrd.5 = load i32* %retval ; [#uses=1] - call void @llvm.dbg.stoppoint( i32 14, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*) ) - call void @llvm.dbg.region.end( { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram2 to { }*) ) - ret i32 %retval.upgrd.5 -} From sabre at nondot.org Mon Mar 1 13:05:25 2010 From: sabre at nondot.org (Chris Lattner) Date: Mon, 01 Mar 2010 19:05:25 -0000 Subject: [llvm-commits] [llvm] r97475 - /llvm/trunk/utils/TableGen/DAGISelEmitter.cpp Message-ID: <20100301190525.F12082A6C12C@llvm.org> Author: lattner Date: Mon Mar 1 13:05:25 2010 New Revision: 97475 URL: http://llvm.org/viewvc/llvm-project?rev=97475&view=rev Log: Turn on the new isel by default. Here are some fun numbers with a release-asserts build on x86-64-darwin10: LLC Size: Old: 15,426,852 New: 12,759,140 (down 2.7M) LLI Size: Old: 9,926,876 New: 8,864,292 (down 1.1M) X86ISelDAGToDAG.o size: Old: 1,401,232 New: 162,868 (down 1.3M) Time to build X86ISelDAGToDAG.o: Old: 67.147u 2.060s 1:09.78 New: 4.234u 0.387s 0:04.77 Modified: llvm/trunk/utils/TableGen/DAGISelEmitter.cpp Modified: llvm/trunk/utils/TableGen/DAGISelEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelEmitter.cpp?rev=97475&r1=97474&r2=97475&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelEmitter.cpp (original) +++ llvm/trunk/utils/TableGen/DAGISelEmitter.cpp Mon Mar 1 13:05:25 2010 @@ -24,7 +24,7 @@ #include using namespace llvm; -//#define ENABLE_NEW_ISEL +#define ENABLE_NEW_ISEL static cl::opt From dpatel at apple.com Mon Mar 1 13:09:55 2010 From: dpatel at apple.com (Devang Patel) Date: Mon, 01 Mar 2010 19:09:55 -0000 Subject: [llvm-commits] [llvm] r97477 - /llvm/trunk/test/DebugInfo/globalGetElementPtr.ll Message-ID: <20100301190955.91F112A6C12C@llvm.org> Author: dpatel Date: Mon Mar 1 13:09:55 2010 New Revision: 97477 URL: http://llvm.org/viewvc/llvm-project?rev=97477&view=rev Log: Remove test to check bugfix in handing debug info for global variables using intrinsics. Now, debug info for global variable is encoded using metadata. The old code path is now history and there is no need to have a test to check a bug fix in old code path. Removed: llvm/trunk/test/DebugInfo/globalGetElementPtr.ll Removed: llvm/trunk/test/DebugInfo/globalGetElementPtr.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/globalGetElementPtr.ll?rev=97476&view=auto ============================================================================== --- llvm/trunk/test/DebugInfo/globalGetElementPtr.ll (original) +++ llvm/trunk/test/DebugInfo/globalGetElementPtr.ll (removed) @@ -1,264 +0,0 @@ -; RUN: llc < %s -; ModuleID = 'foo.c' -target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128" -target triple = "i686-apple-darwin8" - %llvm.dbg.anchor.type = type { i32, i32 } - %llvm.dbg.basictype.type = type { i32, %struct.anon*, i8*, %struct.anon*, i32, i64, i64, i64, i32, i32 } - %llvm.dbg.compile_unit.type = type { i32, %struct.anon*, i32, i8*, i8*, i8* } - %llvm.dbg.compositetype.type = type { i32, %struct.anon*, i8*, %struct.anon*, i32, i64, i64, i64, i32, %struct.anon*, %struct.anon* } - %llvm.dbg.derivedtype.type = type { i32, %struct.anon*, i8*, %struct.anon*, i32, i64, i64, i64, i32, %struct.anon* } - %llvm.dbg.global_variable.type = type { i32, %struct.anon*, %struct.anon*, i8*, i8*, i8*, %struct.anon*, i32, %struct.anon*, i1, i1, %struct.anon* } - %llvm.dbg.subprogram.type = type { i32, %struct.anon*, %struct.anon*, i8*, i8*, i8*, %struct.anon*, i32, %struct.anon*, i1, i1 } - %llvm.dbg.subrange.type = type { i32, i64, i64 } - %llvm.dbg.variable.type = type { i32, %struct.anon*, i8*, %struct.anon*, i32, %struct.anon* } - %struct.S271 = type { [0 x %struct.anon], %struct.anon } - %struct.anon = type { } - at llvm.dbg.subprogram = internal constant %llvm.dbg.subprogram.type { - i32 393262, - %struct.anon* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %struct.anon*), - %struct.anon* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %struct.anon*), - i8* getelementptr ([4 x i8]* @.str3, i32 0, i32 0), - i8* getelementptr ([4 x i8]* @.str3, i32 0, i32 0), - i8* null, - %struct.anon* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %struct.anon*), - i32 2, - %struct.anon* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype to %struct.anon*), - i1 false, - i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.subprograms = linkonce constant %llvm.dbg.anchor.type { i32 393216, i32 46 }, section "llvm.metadata" ; <%llvm.dbg.anchor.type*> [#uses=1] - at llvm.dbg.compile_unit = internal constant %llvm.dbg.compile_unit.type { - i32 393233, - %struct.anon* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.compile_units to %struct.anon*), - i32 1, - i8* getelementptr ([6 x i8]* @.str, i32 0, i32 0), - i8* getelementptr ([23 x i8]* @.str1, i32 0, i32 0), - i8* getelementptr ([52 x i8]* @.str2, i32 0, i32 0) }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] - at llvm.dbg.compile_units = linkonce constant %llvm.dbg.anchor.type { i32 393216, i32 17 }, section "llvm.metadata" ; <%llvm.dbg.anchor.type*> [#uses=1] - at .str = internal constant [6 x i8] c"foo.c\00", section "llvm.metadata" ; <[6 x i8]*> [#uses=1] - at .str1 = internal constant [23 x i8] c"/Volumes/MacOS9/tests/\00", section "llvm.metadata" ; <[23 x i8]*> [#uses=1] - at .str2 = internal constant [52 x i8] c"4.2.1 (Based on Apple Inc. build 5546) (LLVM build)\00", section "llvm.metadata" ; <[52 x i8]*> [#uses=1] - at .str3 = internal constant [4 x i8] c"var\00", section "llvm.metadata" ; <[4 x i8]*> [#uses=1] - at llvm.dbg.derivedtype = internal constant %llvm.dbg.derivedtype.type { - i32 393231, - %struct.anon* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %struct.anon*), - i8* null, - %struct.anon* null, - i32 0, - i64 32, - i64 32, - i64 0, - i32 0, - %struct.anon* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to %struct.anon*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.basictype = internal constant %llvm.dbg.basictype.type { - i32 393252, - %struct.anon* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %struct.anon*), - i8* getelementptr ([5 x i8]* @.str4, i32 0, i32 0), - %struct.anon* null, - i32 0, - i64 8, - i64 8, - i64 0, - i32 0, - i32 6 }, section "llvm.metadata" ; <%llvm.dbg.basictype.type*> [#uses=1] - at .str4 = internal constant [5 x i8] c"char\00", section "llvm.metadata" ; <[5 x i8]*> [#uses=1] - at llvm.dbg.variable = internal constant %llvm.dbg.variable.type { - i32 393474, - %struct.anon* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram to %struct.anon*), - i8* getelementptr ([7 x i8]* @.str5, i32 0, i32 0), - %struct.anon* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %struct.anon*), - i32 2, - %struct.anon* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype to %struct.anon*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] - at .str5 = internal constant [7 x i8] c"retval\00", section "llvm.metadata" ; <[7 x i8]*> [#uses=1] - at a271 = weak global [0 x %struct.S271] zeroinitializer ; <[0 x %struct.S271]*> [#uses=3] - at llvm.dbg.subprogram6 = internal constant %llvm.dbg.subprogram.type { - i32 393262, - %struct.anon* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %struct.anon*), - %struct.anon* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %struct.anon*), - i8* getelementptr ([5 x i8]* @.str7, i32 0, i32 0), - i8* getelementptr ([5 x i8]* @.str7, i32 0, i32 0), - i8* null, - %struct.anon* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %struct.anon*), - i32 3, - %struct.anon* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype8 to %struct.anon*), - i1 false, - i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str7 = internal constant [5 x i8] c"main\00", section "llvm.metadata" ; <[5 x i8]*> [#uses=1] - at llvm.dbg.basictype8 = internal constant %llvm.dbg.basictype.type { - i32 393252, - %struct.anon* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %struct.anon*), - i8* getelementptr ([4 x i8]* @.str9, i32 0, i32 0), - %struct.anon* null, - i32 0, - i64 32, - i64 32, - i64 0, - i32 0, - i32 5 }, section "llvm.metadata" ; <%llvm.dbg.basictype.type*> [#uses=1] - at .str9 = internal constant [4 x i8] c"int\00", section "llvm.metadata" ; <[4 x i8]*> [#uses=1] - at llvm.dbg.variable10 = internal constant %llvm.dbg.variable.type { - i32 393474, - %struct.anon* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram6 to %struct.anon*), - i8* getelementptr ([7 x i8]* @.str5, i32 0, i32 0), - %struct.anon* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %struct.anon*), - i32 3, - %struct.anon* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype8 to %struct.anon*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] - at llvm.dbg.global_variable = internal constant %llvm.dbg.global_variable.type { - i32 393268, - %struct.anon* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.global_variables to %struct.anon*), - %struct.anon* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %struct.anon*), - i8* getelementptr ([5 x i8]* @.str11, i32 0, i32 0), - i8* getelementptr ([5 x i8]* @.str11, i32 0, i32 0), - i8* null, - %struct.anon* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %struct.anon*), - i32 1, - %struct.anon* bitcast (%llvm.dbg.compositetype.type* @llvm.dbg.compositetype to %struct.anon*), - i1 false, - i1 true, - %struct.anon* getelementptr ([0 x %struct.S271]* @a271, i32 0, i32 0, i32 0, i32 0) }, section "llvm.metadata" ; <%llvm.dbg.global_variable.type*> [#uses=0] - at llvm.dbg.global_variables = linkonce constant %llvm.dbg.anchor.type { i32 393216, i32 52 }, section "llvm.metadata" ; <%llvm.dbg.anchor.type*> [#uses=1] - at .str11 = internal constant [5 x i8] c"a271\00", section "llvm.metadata" ; <[5 x i8]*> [#uses=1] - at llvm.dbg.compositetype = internal constant %llvm.dbg.compositetype.type { - i32 393217, - %struct.anon* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %struct.anon*), - i8* null, - %struct.anon* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %struct.anon*), - i32 0, - i64 0, - i64 8, - i64 0, - i32 0, - %struct.anon* bitcast (%llvm.dbg.compositetype.type* @llvm.dbg.compositetype12 to %struct.anon*), - %struct.anon* bitcast ([1 x %struct.anon*]* @llvm.dbg.array25 to %struct.anon*) }, section "llvm.metadata" ; <%llvm.dbg.compositetype.type*> [#uses=1] - at llvm.dbg.compositetype12 = internal constant %llvm.dbg.compositetype.type { - i32 393235, - %struct.anon* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %struct.anon*), - i8* getelementptr ([5 x i8]* @.str13, i32 0, i32 0), - %struct.anon* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %struct.anon*), - i32 1, - i64 0, - i64 8, - i64 0, - i32 0, - %struct.anon* null, - %struct.anon* bitcast ([2 x %struct.anon*]* @llvm.dbg.array23 to %struct.anon*) }, section "llvm.metadata" ; <%llvm.dbg.compositetype.type*> [#uses=1] - at .str13 = internal constant [5 x i8] c"S271\00", section "llvm.metadata" ; <[5 x i8]*> [#uses=1] - at llvm.dbg.derivedtype14 = internal constant %llvm.dbg.derivedtype.type { - i32 393229, - %struct.anon* null, - i8* getelementptr ([2 x i8]* @.str15, i32 0, i32 0), - %struct.anon* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %struct.anon*), - i32 1, - i64 0, - i64 8, - i64 0, - i32 0, - %struct.anon* bitcast (%llvm.dbg.compositetype.type* @llvm.dbg.compositetype16 to %struct.anon*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str15 = internal constant [2 x i8] c"a\00", section "llvm.metadata" ; <[2 x i8]*> [#uses=1] - at llvm.dbg.compositetype16 = internal constant %llvm.dbg.compositetype.type { - i32 393217, - %struct.anon* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %struct.anon*), - i8* null, - %struct.anon* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %struct.anon*), - i32 0, - i64 0, - i64 8, - i64 0, - i32 0, - %struct.anon* bitcast (%llvm.dbg.compositetype.type* @llvm.dbg.compositetype17 to %struct.anon*), - %struct.anon* bitcast ([1 x %struct.anon*]* @llvm.dbg.array18 to %struct.anon*) }, section "llvm.metadata" ; <%llvm.dbg.compositetype.type*> [#uses=1] - at llvm.dbg.compositetype17 = internal constant %llvm.dbg.compositetype.type { - i32 393235, - %struct.anon* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %struct.anon*), - i8* null, - %struct.anon* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %struct.anon*), - i32 1, - i64 0, - i64 8, - i64 0, - i32 0, - %struct.anon* null, - %struct.anon* bitcast ([0 x %struct.anon*]* @llvm.dbg.array to %struct.anon*) }, section "llvm.metadata" ; <%llvm.dbg.compositetype.type*> [#uses=1] - at llvm.dbg.array = internal constant [0 x %struct.anon*] zeroinitializer, section "llvm.metadata" ; <[0 x %struct.anon*]*> [#uses=1] - at llvm.dbg.subrange = internal constant %llvm.dbg.subrange.type { - i32 393249, - i64 0, - i64 4 }, section "llvm.metadata" ; <%llvm.dbg.subrange.type*> [#uses=1] - at llvm.dbg.array18 = internal constant [1 x %struct.anon*] [ %struct.anon* bitcast (%llvm.dbg.subrange.type* @llvm.dbg.subrange to %struct.anon*) ], section "llvm.metadata" ; <[1 x %struct.anon*]*> [#uses=1] - at llvm.dbg.derivedtype19 = internal constant %llvm.dbg.derivedtype.type { - i32 393229, - %struct.anon* null, - i8* getelementptr ([2 x i8]* @.str20, i32 0, i32 0), - %struct.anon* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %struct.anon*), - i32 1, - i64 0, - i64 8, - i64 0, - i32 0, - %struct.anon* bitcast (%llvm.dbg.compositetype.type* @llvm.dbg.compositetype21 to %struct.anon*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str20 = internal constant [2 x i8] c"b\00", section "llvm.metadata" ; <[2 x i8]*> [#uses=1] - at llvm.dbg.compositetype21 = internal constant %llvm.dbg.compositetype.type { - i32 393235, - %struct.anon* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %struct.anon*), - i8* null, - %struct.anon* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %struct.anon*), - i32 1, - i64 0, - i64 8, - i64 0, - i32 0, - %struct.anon* null, - %struct.anon* bitcast ([0 x %struct.anon*]* @llvm.dbg.array22 to %struct.anon*) }, section "llvm.metadata" ; <%llvm.dbg.compositetype.type*> [#uses=1] - at llvm.dbg.array22 = internal constant [0 x %struct.anon*] zeroinitializer, section "llvm.metadata" ; <[0 x %struct.anon*]*> [#uses=1] - at llvm.dbg.array23 = internal constant [2 x %struct.anon*] [ %struct.anon* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype14 to %struct.anon*), %struct.anon* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype19 to %struct.anon*) ], section "llvm.metadata" ; <[2 x %struct.anon*]*> [#uses=1] - at llvm.dbg.subrange24 = internal constant %llvm.dbg.subrange.type { - i32 393249, - i64 0, - i64 4 }, section "llvm.metadata" ; <%llvm.dbg.subrange.type*> [#uses=1] - at llvm.dbg.array25 = internal constant [1 x %struct.anon*] [ %struct.anon* bitcast (%llvm.dbg.subrange.type* @llvm.dbg.subrange24 to %struct.anon*) ], section "llvm.metadata" ; <[1 x %struct.anon*]*> [#uses=1] - -define i8* @var() { -entry: - %retval = alloca i8* ; [#uses=3] - %tmp = alloca i8* ; [#uses=2] - %"alloca point" = bitcast i32 0 to i32 ; [#uses=0] - call void @llvm.dbg.func.start( %struct.anon* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram to %struct.anon*) ) - call void @llvm.dbg.stoppoint( i32 2, i32 0, %struct.anon* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %struct.anon*) ) - %retval1 = bitcast i8** %retval to %struct.anon* ; <%struct.anon*> [#uses=1] - call void @llvm.dbg.declare( %struct.anon* %retval1, %struct.anon* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable to %struct.anon*) ) - bitcast %struct.S271* getelementptr ([0 x %struct.S271]* @a271, i32 0, i32 0) to i8* ; :0 [#uses=0] - store i8* bitcast ([0 x %struct.S271]* @a271 to i8*), i8** %tmp, align 4 - %tmp2 = load i8** %tmp, align 4 ; [#uses=1] - store i8* %tmp2, i8** %retval, align 4 - br label %return - -return: ; preds = %entry - %retval3 = load i8** %retval ; [#uses=1] - call void @llvm.dbg.stoppoint( i32 2, i32 0, %struct.anon* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %struct.anon*) ) - call void @llvm.dbg.region.end( %struct.anon* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram to %struct.anon*) ) - ret i8* %retval3 -} - -declare void @llvm.dbg.func.start(%struct.anon*) nounwind - -declare void @llvm.dbg.stoppoint(i32, i32, %struct.anon*) nounwind - -declare void @llvm.dbg.declare(%struct.anon*, %struct.anon*) nounwind - -declare void @llvm.dbg.region.end(%struct.anon*) nounwind - -define i32 @main() { -entry: - %retval = alloca i32 ; [#uses=2] - %"alloca point" = bitcast i32 0 to i32 ; [#uses=0] - call void @llvm.dbg.func.start( %struct.anon* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram6 to %struct.anon*) ) - call void @llvm.dbg.stoppoint( i32 3, i32 0, %struct.anon* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %struct.anon*) ) - %retval1 = bitcast i32* %retval to %struct.anon* ; <%struct.anon*> [#uses=1] - call void @llvm.dbg.declare( %struct.anon* %retval1, %struct.anon* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable10 to %struct.anon*) ) - br label %return - -return: ; preds = %entry - %retval2 = load i32* %retval ; [#uses=1] - call void @llvm.dbg.stoppoint( i32 3, i32 0, %struct.anon* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %struct.anon*) ) - call void @llvm.dbg.region.end( %struct.anon* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram6 to %struct.anon*) ) - ret i32 %retval2 -} From dpatel at apple.com Mon Mar 1 13:14:25 2010 From: dpatel at apple.com (Devang Patel) Date: Mon, 01 Mar 2010 19:14:25 -0000 Subject: [llvm-commits] [llvm] r97480 - /llvm/trunk/test/Transforms/GlobalOpt/2009-03-03-dbg.ll Message-ID: <20100301191425.E13DB2A6C12C@llvm.org> Author: dpatel Date: Mon Mar 1 13:14:25 2010 New Revision: 97480 URL: http://llvm.org/viewvc/llvm-project?rev=97480&view=rev Log: Remove this test because it checks wheter optimizer handled @llvm.dbg.global_variable appropriately or not. LLVM does not use this scheme to encode debug info for global variables any more. Removed: llvm/trunk/test/Transforms/GlobalOpt/2009-03-03-dbg.ll Removed: llvm/trunk/test/Transforms/GlobalOpt/2009-03-03-dbg.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/GlobalOpt/2009-03-03-dbg.ll?rev=97479&view=auto ============================================================================== --- llvm/trunk/test/Transforms/GlobalOpt/2009-03-03-dbg.ll (original) +++ llvm/trunk/test/Transforms/GlobalOpt/2009-03-03-dbg.ll (removed) @@ -1,54 +0,0 @@ -; RUN: opt < %s -globalopt -S | not grep global_variable42 -; XFAIL: * - - %llvm.dbg.anchor.type = type { i32, i32 } - %llvm.dbg.basictype.type = type { i32, { }*, i8*, { }*, i32, i64, i64, i64, i32, i32 } - %llvm.dbg.compile_unit.type = type { i32, { }*, i32, i8*, i8*, i8*, i1, i1, i8*, i32 } - %llvm.dbg.composite.type = type { i32, { }*, i8*, { }*, i32, i64, i64, i64, i32, { }*, { }*, i32 } - %llvm.dbg.derivedtype.type = type { i32, { }*, i8*, { }*, i32, i64, i64, i64, i32, { }* } - %llvm.dbg.global_variable.type = type { i32, { }*, { }*, i8*, i8*, i8*, { }*, i32, { }*, i1, i1, { }* } - %llvm.dbg.subprogram.type = type { i32, { }*, { }*, i8*, i8*, i8*, { }*, i32, { }*, i1, i1 } - %llvm.dbg.subrange.type = type { i32, i64, i64 } - %llvm.dbg.variable.type = type { i32, { }*, i8*, { }*, i32, { }* } - at llvm.dbg.compile_units = linkonce constant %llvm.dbg.anchor.type { i32 458752, i32 17 }, section "llvm.metadata" ; <%llvm.dbg.anchor.type*> [#uses=1] - at .str = internal constant [4 x i8] c"a.c\00", section "llvm.metadata" ; <[4 x i8]*> [#uses=1] - at .str1 = internal constant [5 x i8] c"/tmp\00", section "llvm.metadata" ; <[5 x i8]*> [#uses=1] - at .str2 = internal constant [57 x i8] c"4.2.1 (Based on Apple Inc. build 5636) (LLVM build 2099)\00", section "llvm.metadata" ; <[57 x i8]*> [#uses=1] - at llvm.dbg.compile_unit = internal constant %llvm.dbg.compile_unit.type { i32 458769, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.compile_units to { }*), i32 1, i8* getelementptr ([4 x i8]* @.str, i32 0, i32 0), i8* getelementptr ([5 x i8]* @.str1, i32 0, i32 0), i8* getelementptr ([57 x i8]* @.str2, i32 0, i32 0), i1 true, i1 false, i8* null, i32 0 }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] - at .str3 = internal constant [4 x i8] c"int\00", section "llvm.metadata" ; <[4 x i8]*> [#uses=1] - at llvm.dbg.basictype = internal constant %llvm.dbg.basictype.type { i32 458788, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([4 x i8]* @.str3, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 32, i64 32, i64 0, i32 0, i32 5 }, section "llvm.metadata" ; <%llvm.dbg.basictype.type*> [#uses=1] - at llvm.dbg.array = internal constant [1 x { }*] [ { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) ], section "llvm.metadata" ; <[1 x { }*]*> [#uses=1] - at llvm.dbg.composite = internal constant %llvm.dbg.composite.type { i32 458773, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 0, i64 0, i64 0, i32 0, { }* null, { }* bitcast ([1 x { }*]* @llvm.dbg.array to { }*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.subprograms = linkonce constant %llvm.dbg.anchor.type { i32 458752, i32 46 }, section "llvm.metadata" ; <%llvm.dbg.anchor.type*> [#uses=1] - at .str4 = internal constant [5 x i8] c"main\00", section "llvm.metadata" ; <[5 x i8]*> [#uses=1] - at llvm.dbg.subprogram = internal constant %llvm.dbg.subprogram.type { i32 458798, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to { }*), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([5 x i8]* @.str4, i32 0, i32 0), i8* getelementptr ([5 x i8]* @.str4, i32 0, i32 0), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 3, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite to { }*), i1 false, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.derivedtype = internal constant %llvm.dbg.derivedtype.type { i32 458767, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 32, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str5 = internal constant [6 x i8] c"i_ptr\00", section "llvm.metadata" ; <[6 x i8]*> [#uses=1] - at llvm.dbg.variable = internal constant %llvm.dbg.variable.type { i32 459008, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram to { }*), i8* getelementptr ([6 x i8]* @.str5, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 5, { }* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype to { }*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=0] - at sillyArray.1433 = internal global [8 x i32] [ i32 2, i32 3, i32 5, i32 7, i32 11, i32 13, i32 17, i32 19 ] ; <[8 x i32]*> [#uses=1] - at llvm.dbg.subrange = internal constant %llvm.dbg.subrange.type { i32 458785, i64 0, i64 7 }, section "llvm.metadata" ; <%llvm.dbg.subrange.type*> [#uses=1] - at llvm.dbg.array6 = internal constant [1 x { }*] [ { }* bitcast (%llvm.dbg.subrange.type* @llvm.dbg.subrange to { }*) ], section "llvm.metadata" ; <[1 x { }*]*> [#uses=1] - at llvm.dbg.composite7 = internal constant %llvm.dbg.composite.type { i32 458753, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 0, i64 256, i64 32, i64 0, i32 0, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*), { }* bitcast ([1 x { }*]* @llvm.dbg.array6 to { }*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.global_variables = linkonce constant %llvm.dbg.anchor.type { i32 458752, i32 52 }, section "llvm.metadata" ; <%llvm.dbg.anchor.type*> [#uses=1] - at .str8 = internal constant [16 x i8] c"sillyArray.1433\00", section "llvm.metadata" ; <[16 x i8]*> [#uses=1] - at .str9 = internal constant [11 x i8] c"sillyArray\00", section "llvm.metadata" ; <[11 x i8]*> [#uses=1] - at llvm.dbg.global_variable42 = internal constant %llvm.dbg.global_variable.type { i32 458804, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.global_variables to { }*), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([16 x i8]* @.str8, i32 0, i32 0), i8* getelementptr ([11 x i8]* @.str9, i32 0, i32 0), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 4, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite7 to { }*), i1 true, i1 true, { }* bitcast ([8 x i32]* @sillyArray.1433 to { }*) }, section "llvm.metadata" ; <%llvm.dbg.global_variable.type*> [#uses=0] - -define i32 @main() nounwind { -entry: - %"alloca point" = bitcast i32 0 to i32 ; [#uses=0] - call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram to { }*)) - call void @llvm.dbg.stoppoint(i32 5, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - call void @llvm.dbg.stoppoint(i32 6, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - call void @llvm.dbg.stoppoint(i32 6, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - call void @llvm.dbg.region.end({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram to { }*)) - ret i32 0 -} - -declare void @llvm.dbg.func.start({ }*) nounwind - -declare void @llvm.dbg.declare({ }*, { }*) nounwind - -declare void @llvm.dbg.stoppoint(i32, i32, { }*) nounwind - -declare void @llvm.dbg.region.end({ }*) nounwind From johnny.chen at apple.com Mon Mar 1 13:22:00 2010 From: johnny.chen at apple.com (Johnny Chen) Date: Mon, 01 Mar 2010 19:22:00 -0000 Subject: [llvm-commits] [llvm] r97481 - in /llvm/trunk/lib/Target/ARM: ARMInstrFormats.td ARMInstrInfo.td Message-ID: <20100301192200.BC8282A6C12C@llvm.org> Author: johnny Date: Mon Mar 1 13:22:00 2010 New Revision: 97481 URL: http://llvm.org/viewvc/llvm-project?rev=97481&view=rev Log: Added STRHT for disassembly only and fixed a bug in AI3sthpo class where the W bit should be set to 0 instead of 1. Modified: llvm/trunk/lib/Target/ARM/ARMInstrFormats.td llvm/trunk/lib/Target/ARM/ARMInstrInfo.td Modified: llvm/trunk/lib/Target/ARM/ARMInstrFormats.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrFormats.td?rev=97481&r1=97480&r2=97481&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMInstrFormats.td (original) +++ llvm/trunk/lib/Target/ARM/ARMInstrFormats.td Mon Mar 1 13:22:00 2010 @@ -815,7 +815,7 @@ let Inst{6} = 0; // S bit let Inst{7} = 1; let Inst{20} = 0; // L bit - let Inst{21} = 1; // W bit + let Inst{21} = 0; // W bit let Inst{24} = 0; // P bit let Inst{27-25} = 0b000; } Modified: llvm/trunk/lib/Target/ARM/ARMInstrInfo.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrInfo.td?rev=97481&r1=97480&r2=97481&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMInstrInfo.td (original) +++ llvm/trunk/lib/Target/ARM/ARMInstrInfo.td Mon Mar 1 13:22:00 2010 @@ -1260,7 +1260,7 @@ "strd", "\t$src1, $src2, [$base], $offset", "$base = $base_wb", []>; -// STRT and STRBT are for disassembly only. +// STRT, STRBT, and STRHT are for disassembly only. def STRT : AI2stwpo<(outs GPR:$base_wb), (ins GPR:$src, GPR:$base,am2offset:$offset), @@ -1278,6 +1278,14 @@ let Inst{21} = 1; // overwrite } +def STRHT: AI3sthpo<(outs GPR:$base_wb), + (ins GPR:$src, GPR:$base,am3offset:$offset), + StMiscFrm, IIC_iStoreru, + "strht", "\t$src, [$base], $offset", "$base = $base_wb", + [/* For disassembly only; pattern left blank */]> { + let Inst{21} = 1; // overwrite +} + //===----------------------------------------------------------------------===// // Load / store multiple Instructions. // From sabre at nondot.org Mon Mar 1 13:24:18 2010 From: sabre at nondot.org (Chris Lattner) Date: Mon, 01 Mar 2010 19:24:18 -0000 Subject: [llvm-commits] [llvm] r97483 - in /llvm/trunk: docs/AliasAnalysis.html docs/Passes.html docs/ReleaseNotes.html include/llvm/Analysis/Passes.h include/llvm/LinkAllPasses.h lib/Analysis/IPA/Andersens.cpp Message-ID: <20100301192418.388FE2A6C12C@llvm.org> Author: lattner Date: Mon Mar 1 13:24:17 2010 New Revision: 97483 URL: http://llvm.org/viewvc/llvm-project?rev=97483&view=rev Log: remove anders-aa from mainline, it isn't maintained and is tantalyzing enough that people keep trying to use it. Removed: llvm/trunk/lib/Analysis/IPA/Andersens.cpp Modified: llvm/trunk/docs/AliasAnalysis.html llvm/trunk/docs/Passes.html llvm/trunk/docs/ReleaseNotes.html llvm/trunk/include/llvm/Analysis/Passes.h llvm/trunk/include/llvm/LinkAllPasses.h Modified: llvm/trunk/docs/AliasAnalysis.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/AliasAnalysis.html?rev=97483&r1=97482&r2=97483&view=diff ============================================================================== --- llvm/trunk/docs/AliasAnalysis.html (original) +++ llvm/trunk/docs/AliasAnalysis.html Mon Mar 1 13:24:17 2010 @@ -403,7 +403,7 @@ href="#basic-aa">basicaa and no-aa passes) every alias analysis pass chains to another alias analysis implementation (for example, the user can specify "-basicaa -ds-aa --anders-aa -licm" to get the maximum benefit from the three alias +-licm" to get the maximum benefit from both alias analyses). The alias analysis class automatically takes care of most of this for methods that you don't override. For methods that you do override, in code paths that return a conservative MayAlias or Mod/Ref result, simply return @@ -705,25 +705,6 @@ - -
      - -

      The -anders-aa pass implements the well-known "Andersen's algorithm" -for interprocedural alias analysis. This algorithm is a subset-based, -flow-insensitive, context-insensitive, and field-insensitive alias analysis that -is widely believed to be fairly precise. Unfortunately, this algorithm is also -O(N3). The LLVM implementation currently does not implement any of -the refinements (such as "online cycle elimination" or "offline variable -substitution") to improve its efficiency, so it can be quite slow in common -cases. -

      - -
      - - - @@ -855,7 +836,7 @@

      These passes are useful for evaluating the various alias analysis -implementations. You can use them with commands like 'opt -anders-aa -ds-aa +implementations. You can use them with commands like 'opt -ds-aa -aa-eval foo.bc -disable-output -stats'.

      Modified: llvm/trunk/docs/Passes.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/Passes.html?rev=97483&r1=97482&r2=97483&view=diff ============================================================================== --- llvm/trunk/docs/Passes.html (original) +++ llvm/trunk/docs/Passes.html Mon Mar 1 13:24:17 2010 @@ -75,7 +75,6 @@ ANALYSIS PASSES OptionName -aa-evalExhaustive Alias Analysis Precision Evaluator --anders-aaAndersen's Interprocedural Alias Analysis -basicaaBasic Alias Analysis (default AA impl) -basiccgBasic CallGraph Construction -codegenprepareOptimize for code generation @@ -204,80 +203,6 @@ -
      -

      - This is an implementation of Andersen's interprocedural alias - analysis -

      - -

      - In pointer analysis terms, this is a subset-based, flow-insensitive, - field-sensitive, and context-insensitive algorithm pointer algorithm. -

      - -

      - This algorithm is implemented as three stages: -

      - -
        -
      1. Object identification.
      2. -
      3. Inclusion constraint identification.
      4. -
      5. Offline constraint graph optimization.
      6. -
      7. Inclusion constraint solving.
      8. -
      - -

      - The object identification stage identifies all of the memory objects in the - program, which includes globals, heap allocated objects, and stack allocated - objects. -

      - -

      - The inclusion constraint identification stage finds all inclusion constraints - in the program by scanning the program, looking for pointer assignments and - other statements that effect the points-to graph. For a statement like - A = B, this statement is processed to - indicate that A can point to anything that B can point - to. Constraints can handle copies, loads, and stores, and address taking. -

      - -

      - The offline constraint graph optimization portion includes offline variable - substitution algorithms intended to computer pointer and location - equivalences. Pointer equivalences are those pointers that will have the - same points-to sets, and location equivalences are those variables that - always appear together in points-to sets. -

      - -

      - The inclusion constraint solving phase iteratively propagates the inclusion - constraints until a fixed point is reached. This is an O(n??) - algorithm. -

      - -

      - Function constraints are handled as if they were structs with X - fields. Thus, an access to argument X of function Y is - an access to node index getNode(Y) + X. - This representation allows handling of indirect calls without any issues. To - wit, an indirect call Y(a,b) is - equivalent to *(Y + 1) = a, *(Y + 2) = - b. The return node for a function F is always - located at getNode(F) + CallReturnPos. The arguments - start at getNode(F) + CallArgPos. -

      - -

      - Please keep in mind that the current andersen's pass has many known - problems and bugs. It should be considered "research quality". -

      - -
      - - -
      Modified: llvm/trunk/docs/ReleaseNotes.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/ReleaseNotes.html?rev=97483&r1=97482&r2=97483&view=diff ============================================================================== --- llvm/trunk/docs/ReleaseNotes.html (original) +++ llvm/trunk/docs/ReleaseNotes.html Mon Mar 1 13:24:17 2010 @@ -66,7 +66,6 @@ llvm/Analysis/PointerTracking.h => Edwin wants this, consider for 2.8. ABCD, SCCVN, GEPSplitterPass MSIL backend? - AndersAA -> Unsupported, zap after branch. --> @@ -734,7 +733,6 @@ experimental.
    • The llc "-filetype=asm" (the default) is the only supported value for this option. The ELF writer is experimental.
    • -
    • The implementation of Andersen's Alias Analysis has many known bugs.
    Modified: llvm/trunk/include/llvm/Analysis/Passes.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/Passes.h?rev=97483&r1=97482&r2=97483&view=diff ============================================================================== --- llvm/trunk/include/llvm/Analysis/Passes.h (original) +++ llvm/trunk/include/llvm/Analysis/Passes.h Mon Mar 1 13:24:17 2010 @@ -81,13 +81,6 @@ //===--------------------------------------------------------------------===// // - // createAndersensPass - This pass implements Andersen's interprocedural alias - // analysis. - // - ModulePass *createAndersensPass(); - - //===--------------------------------------------------------------------===// - // // createProfileLoaderPass - This pass loads information from a profile dump // file. // Modified: llvm/trunk/include/llvm/LinkAllPasses.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/LinkAllPasses.h?rev=97483&r1=97482&r2=97483&view=diff ============================================================================== --- llvm/trunk/include/llvm/LinkAllPasses.h (original) +++ llvm/trunk/include/llvm/LinkAllPasses.h Mon Mar 1 13:24:17 2010 @@ -46,7 +46,6 @@ (void) llvm::createAggressiveDCEPass(); (void) llvm::createAliasAnalysisCounterPass(); (void) llvm::createAliasDebugger(); - (void) llvm::createAndersensPass(); (void) llvm::createArgumentPromotionPass(); (void) llvm::createStructRetPromotionPass(); (void) llvm::createBasicAliasAnalysisPass(); Removed: llvm/trunk/lib/Analysis/IPA/Andersens.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/IPA/Andersens.cpp?rev=97482&view=auto ============================================================================== --- llvm/trunk/lib/Analysis/IPA/Andersens.cpp (original) +++ llvm/trunk/lib/Analysis/IPA/Andersens.cpp (removed) @@ -1,2868 +0,0 @@ -//===- Andersens.cpp - Andersen's Interprocedural Alias Analysis ----------===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines an implementation of Andersen's interprocedural alias -// analysis -// -// In pointer analysis terms, this is a subset-based, flow-insensitive, -// field-sensitive, and context-insensitive algorithm pointer algorithm. -// -// This algorithm is implemented as three stages: -// 1. Object identification. -// 2. Inclusion constraint identification. -// 3. Offline constraint graph optimization -// 4. Inclusion constraint solving. -// -// The object identification stage identifies all of the memory objects in the -// program, which includes globals, heap allocated objects, and stack allocated -// objects. -// -// The inclusion constraint identification stage finds all inclusion constraints -// in the program by scanning the program, looking for pointer assignments and -// other statements that effect the points-to graph. For a statement like "A = -// B", this statement is processed to indicate that A can point to anything that -// B can point to. Constraints can handle copies, loads, and stores, and -// address taking. -// -// The offline constraint graph optimization portion includes offline variable -// substitution algorithms intended to compute pointer and location -// equivalences. Pointer equivalences are those pointers that will have the -// same points-to sets, and location equivalences are those variables that -// always appear together in points-to sets. It also includes an offline -// cycle detection algorithm that allows cycles to be collapsed sooner -// during solving. -// -// The inclusion constraint solving phase iteratively propagates the inclusion -// constraints until a fixed point is reached. This is an O(N^3) algorithm. -// -// Function constraints are handled as if they were structs with X fields. -// Thus, an access to argument X of function Y is an access to node index -// getNode(Y) + X. This representation allows handling of indirect calls -// without any issues. To wit, an indirect call Y(a,b) is equivalent to -// *(Y + 1) = a, *(Y + 2) = b. -// The return node for a function is always located at getNode(F) + -// CallReturnPos. The arguments start at getNode(F) + CallArgPos. -// -// Future Improvements: -// Use of BDD's. -//===----------------------------------------------------------------------===// - -#define DEBUG_TYPE "anders-aa" -#include "llvm/Constants.h" -#include "llvm/DerivedTypes.h" -#include "llvm/Instructions.h" -#include "llvm/Module.h" -#include "llvm/Pass.h" -#include "llvm/Support/ErrorHandling.h" -#include "llvm/Support/InstIterator.h" -#include "llvm/Support/InstVisitor.h" -#include "llvm/Analysis/AliasAnalysis.h" -#include "llvm/Analysis/MemoryBuiltins.h" -#include "llvm/Analysis/Passes.h" -#include "llvm/Support/Debug.h" -#include "llvm/System/Atomic.h" -#include "llvm/ADT/Statistic.h" -#include "llvm/ADT/SparseBitVector.h" -#include "llvm/ADT/DenseSet.h" -#include -#include -#include -#include -#include -#include -#include - -// Determining the actual set of nodes the universal set can consist of is very -// expensive because it means propagating around very large sets. We rely on -// other analysis being able to determine which nodes can never be pointed to in -// order to disambiguate further than "points-to anything". -#define FULL_UNIVERSAL 0 - -using namespace llvm; -#ifndef NDEBUG -STATISTIC(NumIters , "Number of iterations to reach convergence"); -#endif -STATISTIC(NumConstraints, "Number of constraints"); -STATISTIC(NumNodes , "Number of nodes"); -STATISTIC(NumUnified , "Number of variables unified"); -STATISTIC(NumErased , "Number of redundant constraints erased"); - -static const unsigned SelfRep = (unsigned)-1; -static const unsigned Unvisited = (unsigned)-1; -// Position of the function return node relative to the function node. -static const unsigned CallReturnPos = 1; -// Position of the function call node relative to the function node. -static const unsigned CallFirstArgPos = 2; - -namespace { - struct BitmapKeyInfo { - static inline SparseBitVector<> *getEmptyKey() { - return reinterpret_cast *>(-1); - } - static inline SparseBitVector<> *getTombstoneKey() { - return reinterpret_cast *>(-2); - } - static unsigned getHashValue(const SparseBitVector<> *bitmap) { - return bitmap->getHashValue(); - } - static bool isEqual(const SparseBitVector<> *LHS, - const SparseBitVector<> *RHS) { - if (LHS == RHS) - return true; - else if (LHS == getEmptyKey() || RHS == getEmptyKey() - || LHS == getTombstoneKey() || RHS == getTombstoneKey()) - return false; - - return *LHS == *RHS; - } - }; - - class Andersens : public ModulePass, public AliasAnalysis, - private InstVisitor { - struct Node; - - /// Constraint - Objects of this structure are used to represent the various - /// constraints identified by the algorithm. The constraints are 'copy', - /// for statements like "A = B", 'load' for statements like "A = *B", - /// 'store' for statements like "*A = B", and AddressOf for statements like - /// A = alloca; The Offset is applied as *(A + K) = B for stores, - /// A = *(B + K) for loads, and A = B + K for copies. It is - /// illegal on addressof constraints (because it is statically - /// resolvable to A = &C where C = B + K) - - struct Constraint { - enum ConstraintType { Copy, Load, Store, AddressOf } Type; - unsigned Dest; - unsigned Src; - unsigned Offset; - - Constraint(ConstraintType Ty, unsigned D, unsigned S, unsigned O = 0) - : Type(Ty), Dest(D), Src(S), Offset(O) { - assert((Offset == 0 || Ty != AddressOf) && - "Offset is illegal on addressof constraints"); - } - - bool operator==(const Constraint &RHS) const { - return RHS.Type == Type - && RHS.Dest == Dest - && RHS.Src == Src - && RHS.Offset == Offset; - } - - bool operator!=(const Constraint &RHS) const { - return !(*this == RHS); - } - - bool operator<(const Constraint &RHS) const { - if (RHS.Type != Type) - return RHS.Type < Type; - else if (RHS.Dest != Dest) - return RHS.Dest < Dest; - else if (RHS.Src != Src) - return RHS.Src < Src; - return RHS.Offset < Offset; - } - }; - - // Information DenseSet requires implemented in order to be able to do - // it's thing - struct PairKeyInfo { - static inline std::pair getEmptyKey() { - return std::make_pair(~0U, ~0U); - } - static inline std::pair getTombstoneKey() { - return std::make_pair(~0U - 1, ~0U - 1); - } - static unsigned getHashValue(const std::pair &P) { - return P.first ^ P.second; - } - static unsigned isEqual(const std::pair &LHS, - const std::pair &RHS) { - return LHS == RHS; - } - }; - - struct ConstraintKeyInfo { - static inline Constraint getEmptyKey() { - return Constraint(Constraint::Copy, ~0U, ~0U, ~0U); - } - static inline Constraint getTombstoneKey() { - return Constraint(Constraint::Copy, ~0U - 1, ~0U - 1, ~0U - 1); - } - static unsigned getHashValue(const Constraint &C) { - return C.Src ^ C.Dest ^ C.Type ^ C.Offset; - } - static bool isEqual(const Constraint &LHS, - const Constraint &RHS) { - return LHS.Type == RHS.Type && LHS.Dest == RHS.Dest - && LHS.Src == RHS.Src && LHS.Offset == RHS.Offset; - } - }; - - // Node class - This class is used to represent a node in the constraint - // graph. Due to various optimizations, it is not always the case that - // there is a mapping from a Node to a Value. In particular, we add - // artificial Node's that represent the set of pointed-to variables shared - // for each location equivalent Node. - struct Node { - private: - static volatile sys::cas_flag Counter; - - public: - Value *Val; - SparseBitVector<> *Edges; - SparseBitVector<> *PointsTo; - SparseBitVector<> *OldPointsTo; - std::list Constraints; - - // Pointer and location equivalence labels - unsigned PointerEquivLabel; - unsigned LocationEquivLabel; - // Predecessor edges, both real and implicit - SparseBitVector<> *PredEdges; - SparseBitVector<> *ImplicitPredEdges; - // Set of nodes that point to us, only use for location equivalence. - SparseBitVector<> *PointedToBy; - // Number of incoming edges, used during variable substitution to early - // free the points-to sets - unsigned NumInEdges; - // True if our points-to set is in the Set2PEClass map - bool StoredInHash; - // True if our node has no indirect constraints (complex or otherwise) - bool Direct; - // True if the node is address taken, *or* it is part of a group of nodes - // that must be kept together. This is set to true for functions and - // their arg nodes, which must be kept at the same position relative to - // their base function node. - bool AddressTaken; - - // Nodes in cycles (or in equivalence classes) are united together using a - // standard union-find representation with path compression. NodeRep - // gives the index into GraphNodes for the representative Node. - unsigned NodeRep; - - // Modification timestamp. Assigned from Counter. - // Used for work list prioritization. - unsigned Timestamp; - - explicit Node(bool direct = true) : - Val(0), Edges(0), PointsTo(0), OldPointsTo(0), - PointerEquivLabel(0), LocationEquivLabel(0), PredEdges(0), - ImplicitPredEdges(0), PointedToBy(0), NumInEdges(0), - StoredInHash(false), Direct(direct), AddressTaken(false), - NodeRep(SelfRep), Timestamp(0) { } - - Node *setValue(Value *V) { - assert(Val == 0 && "Value already set for this node!"); - Val = V; - return this; - } - - /// getValue - Return the LLVM value corresponding to this node. - /// - Value *getValue() const { return Val; } - - /// addPointerTo - Add a pointer to the list of pointees of this node, - /// returning true if this caused a new pointer to be added, or false if - /// we already knew about the points-to relation. - bool addPointerTo(unsigned Node) { - return PointsTo->test_and_set(Node); - } - - /// intersects - Return true if the points-to set of this node intersects - /// with the points-to set of the specified node. - bool intersects(Node *N) const; - - /// intersectsIgnoring - Return true if the points-to set of this node - /// intersects with the points-to set of the specified node on any nodes - /// except for the specified node to ignore. - bool intersectsIgnoring(Node *N, unsigned) const; - - // Timestamp a node (used for work list prioritization) - void Stamp() { - Timestamp = sys::AtomicIncrement(&Counter); - --Timestamp; - } - - bool isRep() const { - return( (int) NodeRep < 0 ); - } - }; - - struct WorkListElement { - Node* node; - unsigned Timestamp; - WorkListElement(Node* n, unsigned t) : node(n), Timestamp(t) {} - - // Note that we reverse the sense of the comparison because we - // actually want to give low timestamps the priority over high, - // whereas priority is typically interpreted as a greater value is - // given high priority. - bool operator<(const WorkListElement& that) const { - return( this->Timestamp > that.Timestamp ); - } - }; - - // Priority-queue based work list specialized for Nodes. - class WorkList { - std::priority_queue Q; - - public: - void insert(Node* n) { - Q.push( WorkListElement(n, n->Timestamp) ); - } - - // We automatically discard non-representative nodes and nodes - // that were in the work list twice (we keep a copy of the - // timestamp in the work list so we can detect this situation by - // comparing against the node's current timestamp). - Node* pop() { - while( !Q.empty() ) { - WorkListElement x = Q.top(); Q.pop(); - Node* INode = x.node; - - if( INode->isRep() && - INode->Timestamp == x.Timestamp ) { - return(x.node); - } - } - return(0); - } - - bool empty() { - return Q.empty(); - } - }; - - /// GraphNodes - This vector is populated as part of the object - /// identification stage of the analysis, which populates this vector with a - /// node for each memory object and fills in the ValueNodes map. - std::vector GraphNodes; - - /// ValueNodes - This map indicates the Node that a particular Value* is - /// represented by. This contains entries for all pointers. - DenseMap ValueNodes; - - /// ObjectNodes - This map contains entries for each memory object in the - /// program: globals, alloca's and mallocs. - DenseMap ObjectNodes; - - /// ReturnNodes - This map contains an entry for each function in the - /// program that returns a value. - DenseMap ReturnNodes; - - /// VarargNodes - This map contains the entry used to represent all pointers - /// passed through the varargs portion of a function call for a particular - /// function. An entry is not present in this map for functions that do not - /// take variable arguments. - DenseMap VarargNodes; - - - /// Constraints - This vector contains a list of all of the constraints - /// identified by the program. - std::vector Constraints; - - // Map from graph node to maximum K value that is allowed (for functions, - // this is equivalent to the number of arguments + CallFirstArgPos) - std::map MaxK; - - /// This enum defines the GraphNodes indices that correspond to important - /// fixed sets. - enum { - UniversalSet = 0, - NullPtr = 1, - NullObject = 2, - NumberSpecialNodes - }; - // Stack for Tarjan's - std::stack SCCStack; - // Map from Graph Node to DFS number - std::vector Node2DFS; - // Map from Graph Node to Deleted from graph. - std::vector Node2Deleted; - // Same as Node Maps, but implemented as std::map because it is faster to - // clear - std::map Tarjan2DFS; - std::map Tarjan2Deleted; - // Current DFS number - unsigned DFSNumber; - - // Work lists. - WorkList w1, w2; - WorkList *CurrWL, *NextWL; // "current" and "next" work lists - - // Offline variable substitution related things - - // Temporary rep storage, used because we can't collapse SCC's in the - // predecessor graph by uniting the variables permanently, we can only do so - // for the successor graph. - std::vector VSSCCRep; - // Mapping from node to whether we have visited it during SCC finding yet. - std::vector Node2Visited; - // During variable substitution, we create unknowns to represent the unknown - // value that is a dereference of a variable. These nodes are known as - // "ref" nodes (since they represent the value of dereferences). - unsigned FirstRefNode; - // During HVN, we create represent address taken nodes as if they were - // unknown (since HVN, unlike HU, does not evaluate unions). - unsigned FirstAdrNode; - // Current pointer equivalence class number - unsigned PEClass; - // Mapping from points-to sets to equivalence classes - typedef DenseMap *, unsigned, BitmapKeyInfo> BitVectorMap; - BitVectorMap Set2PEClass; - // Mapping from pointer equivalences to the representative node. -1 if we - // have no representative node for this pointer equivalence class yet. - std::vector PEClass2Node; - // Mapping from pointer equivalences to representative node. This includes - // pointer equivalent but not location equivalent variables. -1 if we have - // no representative node for this pointer equivalence class yet. - std::vector PENLEClass2Node; - // Union/Find for HCD - std::vector HCDSCCRep; - // HCD's offline-detected cycles; "Statically DeTected" - // -1 if not part of such a cycle, otherwise a representative node. - std::vector SDT; - // Whether to use SDT (UniteNodes can use it during solving, but not before) - bool SDTActive; - - public: - static char ID; - Andersens() : ModulePass(&ID) {} - - bool runOnModule(Module &M) { - InitializeAliasAnalysis(this); - IdentifyObjects(M); - CollectConstraints(M); -#undef DEBUG_TYPE -#define DEBUG_TYPE "anders-aa-constraints" - DEBUG(PrintConstraints()); -#undef DEBUG_TYPE -#define DEBUG_TYPE "anders-aa" - SolveConstraints(); - DEBUG(PrintPointsToGraph()); - - // Free the constraints list, as we don't need it to respond to alias - // requests. - std::vector().swap(Constraints); - //These are needed for Print() (-analyze in opt) - //ObjectNodes.clear(); - //ReturnNodes.clear(); - //VarargNodes.clear(); - return false; - } - - void releaseMemory() { - // FIXME: Until we have transitively required passes working correctly, - // this cannot be enabled! Otherwise, using -count-aa with the pass - // causes memory to be freed too early. :( -#if 0 - // The memory objects and ValueNodes data structures at the only ones that - // are still live after construction. - std::vector().swap(GraphNodes); - ValueNodes.clear(); -#endif - } - - virtual void getAnalysisUsage(AnalysisUsage &AU) const { - AliasAnalysis::getAnalysisUsage(AU); - AU.setPreservesAll(); // Does not transform code - } - - /// getAdjustedAnalysisPointer - This method is used when a pass implements - /// an analysis interface through multiple inheritance. If needed, it - /// should override this to adjust the this pointer as needed for the - /// specified pass info. - virtual void *getAdjustedAnalysisPointer(const PassInfo *PI) { - if (PI->isPassID(&AliasAnalysis::ID)) - return (AliasAnalysis*)this; - return this; - } - - //------------------------------------------------ - // Implement the AliasAnalysis API - // - AliasResult alias(const Value *V1, unsigned V1Size, - const Value *V2, unsigned V2Size); - virtual ModRefResult getModRefInfo(CallSite CS, Value *P, unsigned Size); - virtual ModRefResult getModRefInfo(CallSite CS1, CallSite CS2); - bool pointsToConstantMemory(const Value *P); - - virtual void deleteValue(Value *V) { - ValueNodes.erase(V); - getAnalysis().deleteValue(V); - } - - virtual void copyValue(Value *From, Value *To) { - ValueNodes[To] = ValueNodes[From]; - getAnalysis().copyValue(From, To); - } - - private: - /// getNode - Return the node corresponding to the specified pointer scalar. - /// - unsigned getNode(Value *V) { - if (Constant *C = dyn_cast(V)) - if (!isa(C)) - return getNodeForConstantPointer(C); - - DenseMap::iterator I = ValueNodes.find(V); - if (I == ValueNodes.end()) { -#ifndef NDEBUG - V->dump(); -#endif - llvm_unreachable("Value does not have a node in the points-to graph!"); - } - return I->second; - } - - /// getObject - Return the node corresponding to the memory object for the - /// specified global or allocation instruction. - unsigned getObject(Value *V) const { - DenseMap::const_iterator I = ObjectNodes.find(V); - assert(I != ObjectNodes.end() && - "Value does not have an object in the points-to graph!"); - return I->second; - } - - /// getReturnNode - Return the node representing the return value for the - /// specified function. - unsigned getReturnNode(Function *F) const { - DenseMap::const_iterator I = ReturnNodes.find(F); - assert(I != ReturnNodes.end() && "Function does not return a value!"); - return I->second; - } - - /// getVarargNode - Return the node representing the variable arguments - /// formal for the specified function. - unsigned getVarargNode(Function *F) const { - DenseMap::const_iterator I = VarargNodes.find(F); - assert(I != VarargNodes.end() && "Function does not take var args!"); - return I->second; - } - - /// getNodeValue - Get the node for the specified LLVM value and set the - /// value for it to be the specified value. - unsigned getNodeValue(Value &V) { - unsigned Index = getNode(&V); - GraphNodes[Index].setValue(&V); - return Index; - } - - unsigned UniteNodes(unsigned First, unsigned Second, - bool UnionByRank = true); - unsigned FindNode(unsigned Node); - unsigned FindNode(unsigned Node) const; - - void IdentifyObjects(Module &M); - void CollectConstraints(Module &M); - bool AnalyzeUsesOfFunction(Value *); - void CreateConstraintGraph(); - void OptimizeConstraints(); - unsigned FindEquivalentNode(unsigned, unsigned); - void ClumpAddressTaken(); - void RewriteConstraints(); - void HU(); - void HVN(); - void HCD(); - void Search(unsigned Node); - void UnitePointerEquivalences(); - void SolveConstraints(); - bool QueryNode(unsigned Node); - void Condense(unsigned Node); - void HUValNum(unsigned Node); - void HVNValNum(unsigned Node); - unsigned getNodeForConstantPointer(Constant *C); - unsigned getNodeForConstantPointerTarget(Constant *C); - void AddGlobalInitializerConstraints(unsigned, Constant *C); - - void AddConstraintsForNonInternalLinkage(Function *F); - void AddConstraintsForCall(CallSite CS, Function *F); - bool AddConstraintsForExternalCall(CallSite CS, Function *F); - - - void PrintNode(const Node *N) const; - void PrintConstraints() const ; - void PrintConstraint(const Constraint &) const; - void PrintLabels() const; - void PrintPointsToGraph() const; - - //===------------------------------------------------------------------===// - // Instruction visitation methods for adding constraints - // - friend class InstVisitor; - void visitReturnInst(ReturnInst &RI); - void visitInvokeInst(InvokeInst &II) { visitCallSite(CallSite(&II)); } - void visitCallInst(CallInst &CI) { - if (isMalloc(&CI)) visitAlloc(CI); - else visitCallSite(CallSite(&CI)); - } - void visitCallSite(CallSite CS); - void visitAllocaInst(AllocaInst &I); - void visitAlloc(Instruction &I); - void visitLoadInst(LoadInst &LI); - void visitStoreInst(StoreInst &SI); - void visitGetElementPtrInst(GetElementPtrInst &GEP); - void visitPHINode(PHINode &PN); - void visitCastInst(CastInst &CI); - void visitICmpInst(ICmpInst &ICI) {} // NOOP! - void visitFCmpInst(FCmpInst &ICI) {} // NOOP! - void visitSelectInst(SelectInst &SI); - void visitVAArg(VAArgInst &I); - void visitInstruction(Instruction &I); - - //===------------------------------------------------------------------===// - // Implement Analyize interface - // - void print(raw_ostream &O, const Module*) const { - PrintPointsToGraph(); - } - }; -} - -char Andersens::ID = 0; -static RegisterPass -X("anders-aa", "Andersen's Interprocedural Alias Analysis (experimental)", - false, true); -static RegisterAnalysisGroup Y(X); - -// Initialize Timestamp Counter (static). -volatile llvm::sys::cas_flag Andersens::Node::Counter = 0; - -ModulePass *llvm::createAndersensPass() { return new Andersens(); } - -//===----------------------------------------------------------------------===// -// AliasAnalysis Interface Implementation -//===----------------------------------------------------------------------===// - -AliasAnalysis::AliasResult Andersens::alias(const Value *V1, unsigned V1Size, - const Value *V2, unsigned V2Size) { - Node *N1 = &GraphNodes[FindNode(getNode(const_cast(V1)))]; - Node *N2 = &GraphNodes[FindNode(getNode(const_cast(V2)))]; - - // Check to see if the two pointers are known to not alias. They don't alias - // if their points-to sets do not intersect. - if (!N1->intersectsIgnoring(N2, NullObject)) - return NoAlias; - - return AliasAnalysis::alias(V1, V1Size, V2, V2Size); -} - -AliasAnalysis::ModRefResult -Andersens::getModRefInfo(CallSite CS, Value *P, unsigned Size) { - // The only thing useful that we can contribute for mod/ref information is - // when calling external function calls: if we know that memory never escapes - // from the program, it cannot be modified by an external call. - // - // NOTE: This is not really safe, at least not when the entire program is not - // available. The deal is that the external function could call back into the - // program and modify stuff. We ignore this technical niggle for now. This - // is, after all, a "research quality" implementation of Andersen's analysis. - if (Function *F = CS.getCalledFunction()) - if (F->isDeclaration()) { - Node *N1 = &GraphNodes[FindNode(getNode(P))]; - - if (N1->PointsTo->empty()) - return NoModRef; -#if FULL_UNIVERSAL - if (!UniversalSet->PointsTo->test(FindNode(getNode(P)))) - return NoModRef; // Universal set does not contain P -#else - if (!N1->PointsTo->test(UniversalSet)) - return NoModRef; // P doesn't point to the universal set. -#endif - } - - return AliasAnalysis::getModRefInfo(CS, P, Size); -} - -AliasAnalysis::ModRefResult -Andersens::getModRefInfo(CallSite CS1, CallSite CS2) { - return AliasAnalysis::getModRefInfo(CS1,CS2); -} - -/// pointsToConstantMemory - If we can determine that this pointer only points -/// to constant memory, return true. In practice, this means that if the -/// pointer can only point to constant globals, functions, or the null pointer, -/// return true. -/// -bool Andersens::pointsToConstantMemory(const Value *P) { - Node *N = &GraphNodes[FindNode(getNode(const_cast(P)))]; - unsigned i; - - for (SparseBitVector<>::iterator bi = N->PointsTo->begin(); - bi != N->PointsTo->end(); - ++bi) { - i = *bi; - Node *Pointee = &GraphNodes[i]; - if (Value *V = Pointee->getValue()) { - if (!isa(V) || (isa(V) && - !cast(V)->isConstant())) - return AliasAnalysis::pointsToConstantMemory(P); - } else { - if (i != NullObject) - return AliasAnalysis::pointsToConstantMemory(P); - } - } - - return true; -} - -//===----------------------------------------------------------------------===// -// Object Identification Phase -//===----------------------------------------------------------------------===// - -/// IdentifyObjects - This stage scans the program, adding an entry to the -/// GraphNodes list for each memory object in the program (global stack or -/// heap), and populates the ValueNodes and ObjectNodes maps for these objects. -/// -void Andersens::IdentifyObjects(Module &M) { - unsigned NumObjects = 0; - - // Object #0 is always the universal set: the object that we don't know - // anything about. - assert(NumObjects == UniversalSet && "Something changed!"); - ++NumObjects; - - // Object #1 always represents the null pointer. - assert(NumObjects == NullPtr && "Something changed!"); - ++NumObjects; - - // Object #2 always represents the null object (the object pointed to by null) - assert(NumObjects == NullObject && "Something changed!"); - ++NumObjects; - - // Add all the globals first. - for (Module::global_iterator I = M.global_begin(), E = M.global_end(); - I != E; ++I) { - ObjectNodes[I] = NumObjects++; - ValueNodes[I] = NumObjects++; - } - - // Add nodes for all of the functions and the instructions inside of them. - for (Module::iterator F = M.begin(), E = M.end(); F != E; ++F) { - // The function itself is a memory object. - unsigned First = NumObjects; - ValueNodes[F] = NumObjects++; - if (F->getFunctionType()->getReturnType()->isPointerTy()) - ReturnNodes[F] = NumObjects++; - if (F->getFunctionType()->isVarArg()) - VarargNodes[F] = NumObjects++; - - - // Add nodes for all of the incoming pointer arguments. - for (Function::arg_iterator I = F->arg_begin(), E = F->arg_end(); - I != E; ++I) - { - if (I->getType()->isPointerTy()) - ValueNodes[I] = NumObjects++; - } - MaxK[First] = NumObjects - First; - - // Scan the function body, creating a memory object for each heap/stack - // allocation in the body of the function and a node to represent all - // pointer values defined by instructions and used as operands. - for (inst_iterator II = inst_begin(F), E = inst_end(F); II != E; ++II) { - // If this is an heap or stack allocation, create a node for the memory - // object. - if (II->getType()->isPointerTy()) { - ValueNodes[&*II] = NumObjects++; - if (AllocaInst *AI = dyn_cast(&*II)) - ObjectNodes[AI] = NumObjects++; - else if (isMalloc(&*II)) - ObjectNodes[&*II] = NumObjects++; - } - - // Calls to inline asm need to be added as well because the callee isn't - // referenced anywhere else. - if (CallInst *CI = dyn_cast(&*II)) { - Value *Callee = CI->getCalledValue(); - if (isa(Callee)) - ValueNodes[Callee] = NumObjects++; - } - } - } - - // Now that we know how many objects to create, make them all now! - GraphNodes.resize(NumObjects); - NumNodes += NumObjects; -} - -//===----------------------------------------------------------------------===// -// Constraint Identification Phase -//===----------------------------------------------------------------------===// - -/// getNodeForConstantPointer - Return the node corresponding to the constant -/// pointer itself. -unsigned Andersens::getNodeForConstantPointer(Constant *C) { - assert(C->getType()->isPointerTy() && "Not a constant pointer!"); - - if (isa(C) || isa(C)) - return NullPtr; - else if (GlobalValue *GV = dyn_cast(C)) - return getNode(GV); - else if (ConstantExpr *CE = dyn_cast(C)) { - switch (CE->getOpcode()) { - case Instruction::GetElementPtr: - return getNodeForConstantPointer(CE->getOperand(0)); - case Instruction::IntToPtr: - return UniversalSet; - case Instruction::BitCast: - return getNodeForConstantPointer(CE->getOperand(0)); - default: - errs() << "Constant Expr not yet handled: " << *CE << "\n"; - llvm_unreachable(0); - } - } else { - llvm_unreachable("Unknown constant pointer!"); - } - return 0; -} - -/// getNodeForConstantPointerTarget - Return the node POINTED TO by the -/// specified constant pointer. -unsigned Andersens::getNodeForConstantPointerTarget(Constant *C) { - assert(C->getType()->isPointerTy() && "Not a constant pointer!"); - - if (isa(C)) - return NullObject; - else if (GlobalValue *GV = dyn_cast(C)) - return getObject(GV); - else if (ConstantExpr *CE = dyn_cast(C)) { - switch (CE->getOpcode()) { - case Instruction::GetElementPtr: - return getNodeForConstantPointerTarget(CE->getOperand(0)); - case Instruction::IntToPtr: - return UniversalSet; - case Instruction::BitCast: - return getNodeForConstantPointerTarget(CE->getOperand(0)); - default: - errs() << "Constant Expr not yet handled: " << *CE << "\n"; - llvm_unreachable(0); - } - } else { - llvm_unreachable("Unknown constant pointer!"); - } - return 0; -} - -/// AddGlobalInitializerConstraints - Add inclusion constraints for the memory -/// object N, which contains values indicated by C. -void Andersens::AddGlobalInitializerConstraints(unsigned NodeIndex, - Constant *C) { - if (C->getType()->isSingleValueType()) { - if (C->getType()->isPointerTy()) - Constraints.push_back(Constraint(Constraint::Copy, NodeIndex, - getNodeForConstantPointer(C))); - } else if (C->isNullValue()) { - Constraints.push_back(Constraint(Constraint::Copy, NodeIndex, - NullObject)); - return; - } else if (!isa(C)) { - // If this is an array or struct, include constraints for each element. - assert(isa(C) || isa(C)); - for (unsigned i = 0, e = C->getNumOperands(); i != e; ++i) - AddGlobalInitializerConstraints(NodeIndex, - cast(C->getOperand(i))); - } -} - -/// AddConstraintsForNonInternalLinkage - If this function does not have -/// internal linkage, realize that we can't trust anything passed into or -/// returned by this function. -void Andersens::AddConstraintsForNonInternalLinkage(Function *F) { - for (Function::arg_iterator I = F->arg_begin(), E = F->arg_end(); I != E; ++I) - if (I->getType()->isPointerTy()) - // If this is an argument of an externally accessible function, the - // incoming pointer might point to anything. - Constraints.push_back(Constraint(Constraint::Copy, getNode(I), - UniversalSet)); -} - -/// AddConstraintsForCall - If this is a call to a "known" function, add the -/// constraints and return true. If this is a call to an unknown function, -/// return false. -bool Andersens::AddConstraintsForExternalCall(CallSite CS, Function *F) { - assert(F->isDeclaration() && "Not an external function!"); - - // These functions don't induce any points-to constraints. - if (F->getName() == "atoi" || F->getName() == "atof" || - F->getName() == "atol" || F->getName() == "atoll" || - F->getName() == "remove" || F->getName() == "unlink" || - F->getName() == "rename" || F->getName() == "memcmp" || - F->getName() == "llvm.memset" || - F->getName() == "strcmp" || F->getName() == "strncmp" || - F->getName() == "execl" || F->getName() == "execlp" || - F->getName() == "execle" || F->getName() == "execv" || - F->getName() == "execvp" || F->getName() == "chmod" || - F->getName() == "puts" || F->getName() == "write" || - F->getName() == "open" || F->getName() == "create" || - F->getName() == "truncate" || F->getName() == "chdir" || - F->getName() == "mkdir" || F->getName() == "rmdir" || - F->getName() == "read" || F->getName() == "pipe" || - F->getName() == "wait" || F->getName() == "time" || - F->getName() == "stat" || F->getName() == "fstat" || - F->getName() == "lstat" || F->getName() == "strtod" || - F->getName() == "strtof" || F->getName() == "strtold" || - F->getName() == "fopen" || F->getName() == "fdopen" || - F->getName() == "freopen" || - F->getName() == "fflush" || F->getName() == "feof" || - F->getName() == "fileno" || F->getName() == "clearerr" || - F->getName() == "rewind" || F->getName() == "ftell" || - F->getName() == "ferror" || F->getName() == "fgetc" || - F->getName() == "fgetc" || F->getName() == "_IO_getc" || - F->getName() == "fwrite" || F->getName() == "fread" || - F->getName() == "fgets" || F->getName() == "ungetc" || - F->getName() == "fputc" || - F->getName() == "fputs" || F->getName() == "putc" || - F->getName() == "ftell" || F->getName() == "rewind" || - F->getName() == "_IO_putc" || F->getName() == "fseek" || - F->getName() == "fgetpos" || F->getName() == "fsetpos" || - F->getName() == "printf" || F->getName() == "fprintf" || - F->getName() == "sprintf" || F->getName() == "vprintf" || - F->getName() == "vfprintf" || F->getName() == "vsprintf" || - F->getName() == "scanf" || F->getName() == "fscanf" || - F->getName() == "sscanf" || F->getName() == "__assert_fail" || - F->getName() == "modf") - return true; - - - // These functions do induce points-to edges. - if (F->getName() == "llvm.memcpy" || - F->getName() == "llvm.memmove" || - F->getName() == "memmove") { - - const FunctionType *FTy = F->getFunctionType(); - if (FTy->getNumParams() > 1 && - FTy->getParamType(0)->isPointerTy() && - FTy->getParamType(1)->isPointerTy()) { - - // *Dest = *Src, which requires an artificial graph node to represent the - // constraint. It is broken up into *Dest = temp, temp = *Src - unsigned FirstArg = getNode(CS.getArgument(0)); - unsigned SecondArg = getNode(CS.getArgument(1)); - unsigned TempArg = GraphNodes.size(); - GraphNodes.push_back(Node()); - Constraints.push_back(Constraint(Constraint::Store, - FirstArg, TempArg)); - Constraints.push_back(Constraint(Constraint::Load, - TempArg, SecondArg)); - // In addition, Dest = Src - Constraints.push_back(Constraint(Constraint::Copy, - FirstArg, SecondArg)); - return true; - } - } - - // Result = Arg0 - if (F->getName() == "realloc" || F->getName() == "strchr" || - F->getName() == "strrchr" || F->getName() == "strstr" || - F->getName() == "strtok") { - const FunctionType *FTy = F->getFunctionType(); - if (FTy->getNumParams() > 0 && - FTy->getParamType(0)->isPointerTy()) { - Constraints.push_back(Constraint(Constraint::Copy, - getNode(CS.getInstruction()), - getNode(CS.getArgument(0)))); - return true; - } - } - - return false; -} - - - -/// AnalyzeUsesOfFunction - Look at all of the users of the specified function. -/// If this is used by anything complex (i.e., the address escapes), return -/// true. -bool Andersens::AnalyzeUsesOfFunction(Value *V) { - - if (!V->getType()->isPointerTy()) return true; - - for (Value::use_iterator UI = V->use_begin(), E = V->use_end(); UI != E; ++UI) - if (isa(*UI)) { - return false; - } else if (StoreInst *SI = dyn_cast(*UI)) { - if (V == SI->getOperand(1)) { - return false; - } else if (SI->getOperand(1)) { - return true; // Storing the pointer - } - } else if (GetElementPtrInst *GEP = dyn_cast(*UI)) { - if (AnalyzeUsesOfFunction(GEP)) return true; - } else if (isFreeCall(*UI)) { - return false; - } else if (CallInst *CI = dyn_cast(*UI)) { - // Make sure that this is just the function being called, not that it is - // passing into the function. - for (unsigned i = 1, e = CI->getNumOperands(); i != e; ++i) - if (CI->getOperand(i) == V) return true; - } else if (InvokeInst *II = dyn_cast(*UI)) { - // Make sure that this is just the function being called, not that it is - // passing into the function. - for (unsigned i = 3, e = II->getNumOperands(); i != e; ++i) - if (II->getOperand(i) == V) return true; - } else if (ConstantExpr *CE = dyn_cast(*UI)) { - if (CE->getOpcode() == Instruction::GetElementPtr || - CE->getOpcode() == Instruction::BitCast) { - if (AnalyzeUsesOfFunction(CE)) - return true; - } else { - return true; - } - } else if (ICmpInst *ICI = dyn_cast(*UI)) { - if (!isa(ICI->getOperand(1))) - return true; // Allow comparison against null. - } else { - return true; - } - return false; -} - -/// CollectConstraints - This stage scans the program, adding a constraint to -/// the Constraints list for each instruction in the program that induces a -/// constraint, and setting up the initial points-to graph. -/// -void Andersens::CollectConstraints(Module &M) { - // First, the universal set points to itself. - Constraints.push_back(Constraint(Constraint::AddressOf, UniversalSet, - UniversalSet)); - Constraints.push_back(Constraint(Constraint::Store, UniversalSet, - UniversalSet)); - - // Next, the null pointer points to the null object. - Constraints.push_back(Constraint(Constraint::AddressOf, NullPtr, NullObject)); - - // Next, add any constraints on global variables and their initializers. - for (Module::global_iterator I = M.global_begin(), E = M.global_end(); - I != E; ++I) { - // Associate the address of the global object as pointing to the memory for - // the global: &G = - unsigned ObjectIndex = getObject(I); - Node *Object = &GraphNodes[ObjectIndex]; - Object->setValue(I); - Constraints.push_back(Constraint(Constraint::AddressOf, getNodeValue(*I), - ObjectIndex)); - - if (I->hasDefinitiveInitializer()) { - AddGlobalInitializerConstraints(ObjectIndex, I->getInitializer()); - } else { - // If it doesn't have an initializer (i.e. it's defined in another - // translation unit), it points to the universal set. - Constraints.push_back(Constraint(Constraint::Copy, ObjectIndex, - UniversalSet)); - } - } - - for (Module::iterator F = M.begin(), E = M.end(); F != E; ++F) { - // Set up the return value node. - if (F->getFunctionType()->getReturnType()->isPointerTy()) - GraphNodes[getReturnNode(F)].setValue(F); - if (F->getFunctionType()->isVarArg()) - GraphNodes[getVarargNode(F)].setValue(F); - - // Set up incoming argument nodes. - for (Function::arg_iterator I = F->arg_begin(), E = F->arg_end(); - I != E; ++I) - if (I->getType()->isPointerTy()) - getNodeValue(*I); - - // At some point we should just add constraints for the escaping functions - // at solve time, but this slows down solving. For now, we simply mark - // address taken functions as escaping and treat them as external. - if (!F->hasLocalLinkage() || AnalyzeUsesOfFunction(F)) - AddConstraintsForNonInternalLinkage(F); - - if (!F->isDeclaration()) { - // Scan the function body, creating a memory object for each heap/stack - // allocation in the body of the function and a node to represent all - // pointer values defined by instructions and used as operands. - visit(F); - } else { - // External functions that return pointers return the universal set. - if (F->getFunctionType()->getReturnType()->isPointerTy()) - Constraints.push_back(Constraint(Constraint::Copy, - getReturnNode(F), - UniversalSet)); - - // Any pointers that are passed into the function have the universal set - // stored into them. - for (Function::arg_iterator I = F->arg_begin(), E = F->arg_end(); - I != E; ++I) - if (I->getType()->isPointerTy()) { - // Pointers passed into external functions could have anything stored - // through them. - Constraints.push_back(Constraint(Constraint::Store, getNode(I), - UniversalSet)); - // Memory objects passed into external function calls can have the - // universal set point to them. -#if FULL_UNIVERSAL - Constraints.push_back(Constraint(Constraint::Copy, - UniversalSet, - getNode(I))); -#else - Constraints.push_back(Constraint(Constraint::Copy, - getNode(I), - UniversalSet)); -#endif - } - - // If this is an external varargs function, it can also store pointers - // into any pointers passed through the varargs section. - if (F->getFunctionType()->isVarArg()) - Constraints.push_back(Constraint(Constraint::Store, getVarargNode(F), - UniversalSet)); - } - } - NumConstraints += Constraints.size(); -} - - -void Andersens::visitInstruction(Instruction &I) { -#ifdef NDEBUG - return; // This function is just a big assert. -#endif - if (isa(I)) - return; - // Most instructions don't have any effect on pointer values. - switch (I.getOpcode()) { - case Instruction::Br: - case Instruction::Switch: - case Instruction::Unwind: - case Instruction::Unreachable: - case Instruction::ICmp: - case Instruction::FCmp: - return; - default: - // Is this something we aren't handling yet? - errs() << "Unknown instruction: " << I; - llvm_unreachable(0); - } -} - -void Andersens::visitAllocaInst(AllocaInst &I) { - visitAlloc(I); -} - -void Andersens::visitAlloc(Instruction &I) { - unsigned ObjectIndex = getObject(&I); - GraphNodes[ObjectIndex].setValue(&I); - Constraints.push_back(Constraint(Constraint::AddressOf, getNodeValue(I), - ObjectIndex)); -} - -void Andersens::visitReturnInst(ReturnInst &RI) { - if (RI.getNumOperands() && RI.getOperand(0)->getType()->isPointerTy()) - // return V --> - Constraints.push_back(Constraint(Constraint::Copy, - getReturnNode(RI.getParent()->getParent()), - getNode(RI.getOperand(0)))); -} - -void Andersens::visitLoadInst(LoadInst &LI) { - if (LI.getType()->isPointerTy()) - // P1 = load P2 --> - Constraints.push_back(Constraint(Constraint::Load, getNodeValue(LI), - getNode(LI.getOperand(0)))); -} - -void Andersens::visitStoreInst(StoreInst &SI) { - if (SI.getOperand(0)->getType()->isPointerTy()) - // store P1, P2 --> - Constraints.push_back(Constraint(Constraint::Store, - getNode(SI.getOperand(1)), - getNode(SI.getOperand(0)))); -} - -void Andersens::visitGetElementPtrInst(GetElementPtrInst &GEP) { - // P1 = getelementptr P2, ... --> - Constraints.push_back(Constraint(Constraint::Copy, getNodeValue(GEP), - getNode(GEP.getOperand(0)))); -} - -void Andersens::visitPHINode(PHINode &PN) { - if (PN.getType()->isPointerTy()) { - unsigned PNN = getNodeValue(PN); - for (unsigned i = 0, e = PN.getNumIncomingValues(); i != e; ++i) - // P1 = phi P2, P3 --> , , ... - Constraints.push_back(Constraint(Constraint::Copy, PNN, - getNode(PN.getIncomingValue(i)))); - } -} - -void Andersens::visitCastInst(CastInst &CI) { - Value *Op = CI.getOperand(0); - if (CI.getType()->isPointerTy()) { - if (Op->getType()->isPointerTy()) { - // P1 = cast P2 --> - Constraints.push_back(Constraint(Constraint::Copy, getNodeValue(CI), - getNode(CI.getOperand(0)))); - } else { - // P1 = cast int --> -#if 0 - Constraints.push_back(Constraint(Constraint::Copy, getNodeValue(CI), - UniversalSet)); -#else - getNodeValue(CI); -#endif - } - } else if (Op->getType()->isPointerTy()) { - // int = cast P1 --> -#if 0 - Constraints.push_back(Constraint(Constraint::Copy, - UniversalSet, - getNode(CI.getOperand(0)))); -#else - getNode(CI.getOperand(0)); -#endif - } -} - -void Andersens::visitSelectInst(SelectInst &SI) { - if (SI.getType()->isPointerTy()) { - unsigned SIN = getNodeValue(SI); - // P1 = select C, P2, P3 ---> , - Constraints.push_back(Constraint(Constraint::Copy, SIN, - getNode(SI.getOperand(1)))); - Constraints.push_back(Constraint(Constraint::Copy, SIN, - getNode(SI.getOperand(2)))); - } -} - -void Andersens::visitVAArg(VAArgInst &I) { - llvm_unreachable("vaarg not handled yet!"); -} - -/// AddConstraintsForCall - Add constraints for a call with actual arguments -/// specified by CS to the function specified by F. Note that the types of -/// arguments might not match up in the case where this is an indirect call and -/// the function pointer has been casted. If this is the case, do something -/// reasonable. -void Andersens::AddConstraintsForCall(CallSite CS, Function *F) { - Value *CallValue = CS.getCalledValue(); - bool IsDeref = F == NULL; - - // If this is a call to an external function, try to handle it directly to get - // some taste of context sensitivity. - if (F && F->isDeclaration() && AddConstraintsForExternalCall(CS, F)) - return; - - if (CS.getType()->isPointerTy()) { - unsigned CSN = getNode(CS.getInstruction()); - if (!F || F->getFunctionType()->getReturnType()->isPointerTy()) { - if (IsDeref) - Constraints.push_back(Constraint(Constraint::Load, CSN, - getNode(CallValue), CallReturnPos)); - else - Constraints.push_back(Constraint(Constraint::Copy, CSN, - getNode(CallValue) + CallReturnPos)); - } else { - // If the function returns a non-pointer value, handle this just like we - // treat a nonpointer cast to pointer. - Constraints.push_back(Constraint(Constraint::Copy, CSN, - UniversalSet)); - } - } else if (F && F->getFunctionType()->getReturnType()->isPointerTy()) { -#if FULL_UNIVERSAL - Constraints.push_back(Constraint(Constraint::Copy, - UniversalSet, - getNode(CallValue) + CallReturnPos)); -#else - Constraints.push_back(Constraint(Constraint::Copy, - getNode(CallValue) + CallReturnPos, - UniversalSet)); -#endif - - - } - - CallSite::arg_iterator ArgI = CS.arg_begin(), ArgE = CS.arg_end(); - bool external = !F || F->isDeclaration(); - if (F) { - // Direct Call - Function::arg_iterator AI = F->arg_begin(), AE = F->arg_end(); - for (; AI != AE && ArgI != ArgE; ++AI, ++ArgI) - { -#if !FULL_UNIVERSAL - if (external && (*ArgI)->getType()->isPointerTy()) - { - // Add constraint that ArgI can now point to anything due to - // escaping, as can everything it points to. The second portion of - // this should be taken care of by universal = *universal - Constraints.push_back(Constraint(Constraint::Copy, - getNode(*ArgI), - UniversalSet)); - } -#endif - if (AI->getType()->isPointerTy()) { - if ((*ArgI)->getType()->isPointerTy()) { - // Copy the actual argument into the formal argument. - Constraints.push_back(Constraint(Constraint::Copy, getNode(AI), - getNode(*ArgI))); - } else { - Constraints.push_back(Constraint(Constraint::Copy, getNode(AI), - UniversalSet)); - } - } else if ((*ArgI)->getType()->isPointerTy()) { -#if FULL_UNIVERSAL - Constraints.push_back(Constraint(Constraint::Copy, - UniversalSet, - getNode(*ArgI))); -#else - Constraints.push_back(Constraint(Constraint::Copy, - getNode(*ArgI), - UniversalSet)); -#endif - } - } - } else { - //Indirect Call - unsigned ArgPos = CallFirstArgPos; - for (; ArgI != ArgE; ++ArgI) { - if ((*ArgI)->getType()->isPointerTy()) { - // Copy the actual argument into the formal argument. - Constraints.push_back(Constraint(Constraint::Store, - getNode(CallValue), - getNode(*ArgI), ArgPos++)); - } else { - Constraints.push_back(Constraint(Constraint::Store, - getNode (CallValue), - UniversalSet, ArgPos++)); - } - } - } - // Copy all pointers passed through the varargs section to the varargs node. - if (F && F->getFunctionType()->isVarArg()) - for (; ArgI != ArgE; ++ArgI) - if ((*ArgI)->getType()->isPointerTy()) - Constraints.push_back(Constraint(Constraint::Copy, getVarargNode(F), - getNode(*ArgI))); - // If more arguments are passed in than we track, just drop them on the floor. -} - -void Andersens::visitCallSite(CallSite CS) { - if (CS.getType()->isPointerTy()) - getNodeValue(*CS.getInstruction()); - - if (Function *F = CS.getCalledFunction()) { - AddConstraintsForCall(CS, F); - } else { - AddConstraintsForCall(CS, NULL); - } -} - -//===----------------------------------------------------------------------===// -// Constraint Solving Phase -//===----------------------------------------------------------------------===// - -/// intersects - Return true if the points-to set of this node intersects -/// with the points-to set of the specified node. -bool Andersens::Node::intersects(Node *N) const { - return PointsTo->intersects(N->PointsTo); -} - -/// intersectsIgnoring - Return true if the points-to set of this node -/// intersects with the points-to set of the specified node on any nodes -/// except for the specified node to ignore. -bool Andersens::Node::intersectsIgnoring(Node *N, unsigned Ignoring) const { - // TODO: If we are only going to call this with the same value for Ignoring, - // we should move the special values out of the points-to bitmap. - bool WeHadIt = PointsTo->test(Ignoring); - bool NHadIt = N->PointsTo->test(Ignoring); - bool Result = false; - if (WeHadIt) - PointsTo->reset(Ignoring); - if (NHadIt) - N->PointsTo->reset(Ignoring); - Result = PointsTo->intersects(N->PointsTo); - if (WeHadIt) - PointsTo->set(Ignoring); - if (NHadIt) - N->PointsTo->set(Ignoring); - return Result; -} - - -/// Clump together address taken variables so that the points-to sets use up -/// less space and can be operated on faster. - -void Andersens::ClumpAddressTaken() { -#undef DEBUG_TYPE -#define DEBUG_TYPE "anders-aa-renumber" - std::vector Translate; - std::vector NewGraphNodes; - - Translate.resize(GraphNodes.size()); - unsigned NewPos = 0; - - for (unsigned i = 0; i < Constraints.size(); ++i) { - Constraint &C = Constraints[i]; - if (C.Type == Constraint::AddressOf) { - GraphNodes[C.Src].AddressTaken = true; - } - } - for (unsigned i = 0; i < NumberSpecialNodes; ++i) { - unsigned Pos = NewPos++; - Translate[i] = Pos; - NewGraphNodes.push_back(GraphNodes[i]); - DEBUG(dbgs() << "Renumbering node " << i << " to node " << Pos << "\n"); - } - - // I believe this ends up being faster than making two vectors and splicing - // them. - for (unsigned i = NumberSpecialNodes; i < GraphNodes.size(); ++i) { - if (GraphNodes[i].AddressTaken) { - unsigned Pos = NewPos++; - Translate[i] = Pos; - NewGraphNodes.push_back(GraphNodes[i]); - DEBUG(dbgs() << "Renumbering node " << i << " to node " << Pos << "\n"); - } - } - - for (unsigned i = NumberSpecialNodes; i < GraphNodes.size(); ++i) { - if (!GraphNodes[i].AddressTaken) { - unsigned Pos = NewPos++; - Translate[i] = Pos; - NewGraphNodes.push_back(GraphNodes[i]); - DEBUG(dbgs() << "Renumbering node " << i << " to node " << Pos << "\n"); - } - } - - for (DenseMap::iterator Iter = ValueNodes.begin(); - Iter != ValueNodes.end(); - ++Iter) - Iter->second = Translate[Iter->second]; - - for (DenseMap::iterator Iter = ObjectNodes.begin(); - Iter != ObjectNodes.end(); - ++Iter) - Iter->second = Translate[Iter->second]; - - for (DenseMap::iterator Iter = ReturnNodes.begin(); - Iter != ReturnNodes.end(); - ++Iter) - Iter->second = Translate[Iter->second]; - - for (DenseMap::iterator Iter = VarargNodes.begin(); - Iter != VarargNodes.end(); - ++Iter) - Iter->second = Translate[Iter->second]; - - for (unsigned i = 0; i < Constraints.size(); ++i) { - Constraint &C = Constraints[i]; - C.Src = Translate[C.Src]; - C.Dest = Translate[C.Dest]; - } - - GraphNodes.swap(NewGraphNodes); -#undef DEBUG_TYPE -#define DEBUG_TYPE "anders-aa" -} - -/// The technique used here is described in "Exploiting Pointer and Location -/// Equivalence to Optimize Pointer Analysis. In the 14th International Static -/// Analysis Symposium (SAS), August 2007." It is known as the "HVN" algorithm, -/// and is equivalent to value numbering the collapsed constraint graph without -/// evaluating unions. This is used as a pre-pass to HU in order to resolve -/// first order pointer dereferences and speed up/reduce memory usage of HU. -/// Running both is equivalent to HRU without the iteration -/// HVN in more detail: -/// Imagine the set of constraints was simply straight line code with no loops -/// (we eliminate cycles, so there are no loops), such as: -/// E = &D -/// E = &C -/// E = F -/// F = G -/// G = F -/// Applying value numbering to this code tells us: -/// G == F == E -/// -/// For HVN, this is as far as it goes. We assign new value numbers to every -/// "address node", and every "reference node". -/// To get the optimal result for this, we use a DFS + SCC (since all nodes in a -/// cycle must have the same value number since the = operation is really -/// inclusion, not overwrite), and value number nodes we receive points-to sets -/// before we value our own node. -/// The advantage of HU over HVN is that HU considers the inclusion property, so -/// that if you have -/// E = &D -/// E = &C -/// E = F -/// F = G -/// F = &D -/// G = F -/// HU will determine that G == F == E. HVN will not, because it cannot prove -/// that the points to information ends up being the same because they all -/// receive &D from E anyway. - -void Andersens::HVN() { - DEBUG(dbgs() << "Beginning HVN\n"); - // Build a predecessor graph. This is like our constraint graph with the - // edges going in the opposite direction, and there are edges for all the - // constraints, instead of just copy constraints. We also build implicit - // edges for constraints are implied but not explicit. I.E for the constraint - // a = &b, we add implicit edges *a = b. This helps us capture more cycles - for (unsigned i = 0, e = Constraints.size(); i != e; ++i) { - Constraint &C = Constraints[i]; - if (C.Type == Constraint::AddressOf) { - GraphNodes[C.Src].AddressTaken = true; - GraphNodes[C.Src].Direct = false; - - // Dest = &src edge - unsigned AdrNode = C.Src + FirstAdrNode; - if (!GraphNodes[C.Dest].PredEdges) - GraphNodes[C.Dest].PredEdges = new SparseBitVector<>; - GraphNodes[C.Dest].PredEdges->set(AdrNode); - - // *Dest = src edge - unsigned RefNode = C.Dest + FirstRefNode; - if (!GraphNodes[RefNode].ImplicitPredEdges) - GraphNodes[RefNode].ImplicitPredEdges = new SparseBitVector<>; - GraphNodes[RefNode].ImplicitPredEdges->set(C.Src); - } else if (C.Type == Constraint::Load) { - if (C.Offset == 0) { - // dest = *src edge - if (!GraphNodes[C.Dest].PredEdges) - GraphNodes[C.Dest].PredEdges = new SparseBitVector<>; - GraphNodes[C.Dest].PredEdges->set(C.Src + FirstRefNode); - } else { - GraphNodes[C.Dest].Direct = false; - } - } else if (C.Type == Constraint::Store) { - if (C.Offset == 0) { - // *dest = src edge - unsigned RefNode = C.Dest + FirstRefNode; - if (!GraphNodes[RefNode].PredEdges) - GraphNodes[RefNode].PredEdges = new SparseBitVector<>; - GraphNodes[RefNode].PredEdges->set(C.Src); - } - } else { - // Dest = Src edge and *Dest = *Src edge - if (!GraphNodes[C.Dest].PredEdges) - GraphNodes[C.Dest].PredEdges = new SparseBitVector<>; - GraphNodes[C.Dest].PredEdges->set(C.Src); - unsigned RefNode = C.Dest + FirstRefNode; - if (!GraphNodes[RefNode].ImplicitPredEdges) - GraphNodes[RefNode].ImplicitPredEdges = new SparseBitVector<>; - GraphNodes[RefNode].ImplicitPredEdges->set(C.Src + FirstRefNode); - } - } - PEClass = 1; - // Do SCC finding first to condense our predecessor graph - DFSNumber = 0; - Node2DFS.insert(Node2DFS.begin(), GraphNodes.size(), 0); - Node2Deleted.insert(Node2Deleted.begin(), GraphNodes.size(), false); - Node2Visited.insert(Node2Visited.begin(), GraphNodes.size(), false); - - for (unsigned i = 0; i < FirstRefNode; ++i) { - unsigned Node = VSSCCRep[i]; - if (!Node2Visited[Node]) - HVNValNum(Node); - } - for (BitVectorMap::iterator Iter = Set2PEClass.begin(); - Iter != Set2PEClass.end(); - ++Iter) - delete Iter->first; - Set2PEClass.clear(); - Node2DFS.clear(); - Node2Deleted.clear(); - Node2Visited.clear(); - DEBUG(dbgs() << "Finished HVN\n"); - -} - -/// This is the workhorse of HVN value numbering. We combine SCC finding at the -/// same time because it's easy. -void Andersens::HVNValNum(unsigned NodeIndex) { - unsigned MyDFS = DFSNumber++; - Node *N = &GraphNodes[NodeIndex]; - Node2Visited[NodeIndex] = true; - Node2DFS[NodeIndex] = MyDFS; - - // First process all our explicit edges - if (N->PredEdges) - for (SparseBitVector<>::iterator Iter = N->PredEdges->begin(); - Iter != N->PredEdges->end(); - ++Iter) { - unsigned j = VSSCCRep[*Iter]; - if (!Node2Deleted[j]) { - if (!Node2Visited[j]) - HVNValNum(j); - if (Node2DFS[NodeIndex] > Node2DFS[j]) - Node2DFS[NodeIndex] = Node2DFS[j]; - } - } - - // Now process all the implicit edges - if (N->ImplicitPredEdges) - for (SparseBitVector<>::iterator Iter = N->ImplicitPredEdges->begin(); - Iter != N->ImplicitPredEdges->end(); - ++Iter) { - unsigned j = VSSCCRep[*Iter]; - if (!Node2Deleted[j]) { - if (!Node2Visited[j]) - HVNValNum(j); - if (Node2DFS[NodeIndex] > Node2DFS[j]) - Node2DFS[NodeIndex] = Node2DFS[j]; - } - } - - // See if we found any cycles - if (MyDFS == Node2DFS[NodeIndex]) { - while (!SCCStack.empty() && Node2DFS[SCCStack.top()] >= MyDFS) { - unsigned CycleNodeIndex = SCCStack.top(); - Node *CycleNode = &GraphNodes[CycleNodeIndex]; - VSSCCRep[CycleNodeIndex] = NodeIndex; - // Unify the nodes - N->Direct &= CycleNode->Direct; - - if (CycleNode->PredEdges) { - if (!N->PredEdges) - N->PredEdges = new SparseBitVector<>; - *(N->PredEdges) |= CycleNode->PredEdges; - delete CycleNode->PredEdges; - CycleNode->PredEdges = NULL; - } - if (CycleNode->ImplicitPredEdges) { - if (!N->ImplicitPredEdges) - N->ImplicitPredEdges = new SparseBitVector<>; - *(N->ImplicitPredEdges) |= CycleNode->ImplicitPredEdges; - delete CycleNode->ImplicitPredEdges; - CycleNode->ImplicitPredEdges = NULL; - } - - SCCStack.pop(); - } - - Node2Deleted[NodeIndex] = true; - - if (!N->Direct) { - GraphNodes[NodeIndex].PointerEquivLabel = PEClass++; - return; - } - - // Collect labels of successor nodes - bool AllSame = true; - unsigned First = ~0; - SparseBitVector<> *Labels = new SparseBitVector<>; - bool Used = false; - - if (N->PredEdges) - for (SparseBitVector<>::iterator Iter = N->PredEdges->begin(); - Iter != N->PredEdges->end(); - ++Iter) { - unsigned j = VSSCCRep[*Iter]; - unsigned Label = GraphNodes[j].PointerEquivLabel; - // Ignore labels that are equal to us or non-pointers - if (j == NodeIndex || Label == 0) - continue; - if (First == (unsigned)~0) - First = Label; - else if (First != Label) - AllSame = false; - Labels->set(Label); - } - - // We either have a non-pointer, a copy of an existing node, or a new node. - // Assign the appropriate pointer equivalence label. - if (Labels->empty()) { - GraphNodes[NodeIndex].PointerEquivLabel = 0; - } else if (AllSame) { - GraphNodes[NodeIndex].PointerEquivLabel = First; - } else { - GraphNodes[NodeIndex].PointerEquivLabel = Set2PEClass[Labels]; - if (GraphNodes[NodeIndex].PointerEquivLabel == 0) { - unsigned EquivClass = PEClass++; - Set2PEClass[Labels] = EquivClass; - GraphNodes[NodeIndex].PointerEquivLabel = EquivClass; - Used = true; - } - } - if (!Used) - delete Labels; - } else { - SCCStack.push(NodeIndex); - } -} - -/// The technique used here is described in "Exploiting Pointer and Location -/// Equivalence to Optimize Pointer Analysis. In the 14th International Static -/// Analysis Symposium (SAS), August 2007." It is known as the "HU" algorithm, -/// and is equivalent to value numbering the collapsed constraint graph -/// including evaluating unions. -void Andersens::HU() { - DEBUG(dbgs() << "Beginning HU\n"); - // Build a predecessor graph. This is like our constraint graph with the - // edges going in the opposite direction, and there are edges for all the - // constraints, instead of just copy constraints. We also build implicit - // edges for constraints are implied but not explicit. I.E for the constraint - // a = &b, we add implicit edges *a = b. This helps us capture more cycles - for (unsigned i = 0, e = Constraints.size(); i != e; ++i) { - Constraint &C = Constraints[i]; - if (C.Type == Constraint::AddressOf) { - GraphNodes[C.Src].AddressTaken = true; - GraphNodes[C.Src].Direct = false; - - GraphNodes[C.Dest].PointsTo->set(C.Src); - // *Dest = src edge - unsigned RefNode = C.Dest + FirstRefNode; - if (!GraphNodes[RefNode].ImplicitPredEdges) - GraphNodes[RefNode].ImplicitPredEdges = new SparseBitVector<>; - GraphNodes[RefNode].ImplicitPredEdges->set(C.Src); - GraphNodes[C.Src].PointedToBy->set(C.Dest); - } else if (C.Type == Constraint::Load) { - if (C.Offset == 0) { - // dest = *src edge - if (!GraphNodes[C.Dest].PredEdges) - GraphNodes[C.Dest].PredEdges = new SparseBitVector<>; - GraphNodes[C.Dest].PredEdges->set(C.Src + FirstRefNode); - } else { - GraphNodes[C.Dest].Direct = false; - } - } else if (C.Type == Constraint::Store) { - if (C.Offset == 0) { - // *dest = src edge - unsigned RefNode = C.Dest + FirstRefNode; - if (!GraphNodes[RefNode].PredEdges) - GraphNodes[RefNode].PredEdges = new SparseBitVector<>; - GraphNodes[RefNode].PredEdges->set(C.Src); - } - } else { - // Dest = Src edge and *Dest = *Src edg - if (!GraphNodes[C.Dest].PredEdges) - GraphNodes[C.Dest].PredEdges = new SparseBitVector<>; - GraphNodes[C.Dest].PredEdges->set(C.Src); - unsigned RefNode = C.Dest + FirstRefNode; - if (!GraphNodes[RefNode].ImplicitPredEdges) - GraphNodes[RefNode].ImplicitPredEdges = new SparseBitVector<>; - GraphNodes[RefNode].ImplicitPredEdges->set(C.Src + FirstRefNode); - } - } - PEClass = 1; - // Do SCC finding first to condense our predecessor graph - DFSNumber = 0; - Node2DFS.insert(Node2DFS.begin(), GraphNodes.size(), 0); - Node2Deleted.insert(Node2Deleted.begin(), GraphNodes.size(), false); - Node2Visited.insert(Node2Visited.begin(), GraphNodes.size(), false); - - for (unsigned i = 0; i < FirstRefNode; ++i) { - if (FindNode(i) == i) { - unsigned Node = VSSCCRep[i]; - if (!Node2Visited[Node]) - Condense(Node); - } - } - - // Reset tables for actual labeling - Node2DFS.clear(); - Node2Visited.clear(); - Node2Deleted.clear(); - // Pre-grow our densemap so that we don't get really bad behavior - Set2PEClass.resize(GraphNodes.size()); - - // Visit the condensed graph and generate pointer equivalence labels. - Node2Visited.insert(Node2Visited.begin(), GraphNodes.size(), false); - for (unsigned i = 0; i < FirstRefNode; ++i) { - if (FindNode(i) == i) { - unsigned Node = VSSCCRep[i]; - if (!Node2Visited[Node]) - HUValNum(Node); - } - } - // PEClass nodes will be deleted by the deleting of N->PointsTo in our caller. - Set2PEClass.clear(); - DEBUG(dbgs() << "Finished HU\n"); -} - - -/// Implementation of standard Tarjan SCC algorithm as modified by Nuutilla. -void Andersens::Condense(unsigned NodeIndex) { - unsigned MyDFS = DFSNumber++; - Node *N = &GraphNodes[NodeIndex]; - Node2Visited[NodeIndex] = true; - Node2DFS[NodeIndex] = MyDFS; - - // First process all our explicit edges - if (N->PredEdges) - for (SparseBitVector<>::iterator Iter = N->PredEdges->begin(); - Iter != N->PredEdges->end(); - ++Iter) { - unsigned j = VSSCCRep[*Iter]; - if (!Node2Deleted[j]) { - if (!Node2Visited[j]) - Condense(j); - if (Node2DFS[NodeIndex] > Node2DFS[j]) - Node2DFS[NodeIndex] = Node2DFS[j]; - } - } - - // Now process all the implicit edges - if (N->ImplicitPredEdges) - for (SparseBitVector<>::iterator Iter = N->ImplicitPredEdges->begin(); - Iter != N->ImplicitPredEdges->end(); - ++Iter) { - unsigned j = VSSCCRep[*Iter]; - if (!Node2Deleted[j]) { - if (!Node2Visited[j]) - Condense(j); - if (Node2DFS[NodeIndex] > Node2DFS[j]) - Node2DFS[NodeIndex] = Node2DFS[j]; - } - } - - // See if we found any cycles - if (MyDFS == Node2DFS[NodeIndex]) { - while (!SCCStack.empty() && Node2DFS[SCCStack.top()] >= MyDFS) { - unsigned CycleNodeIndex = SCCStack.top(); - Node *CycleNode = &GraphNodes[CycleNodeIndex]; - VSSCCRep[CycleNodeIndex] = NodeIndex; - // Unify the nodes - N->Direct &= CycleNode->Direct; - - *(N->PointsTo) |= CycleNode->PointsTo; - delete CycleNode->PointsTo; - CycleNode->PointsTo = NULL; - if (CycleNode->PredEdges) { - if (!N->PredEdges) - N->PredEdges = new SparseBitVector<>; - *(N->PredEdges) |= CycleNode->PredEdges; - delete CycleNode->PredEdges; - CycleNode->PredEdges = NULL; - } - if (CycleNode->ImplicitPredEdges) { - if (!N->ImplicitPredEdges) - N->ImplicitPredEdges = new SparseBitVector<>; - *(N->ImplicitPredEdges) |= CycleNode->ImplicitPredEdges; - delete CycleNode->ImplicitPredEdges; - CycleNode->ImplicitPredEdges = NULL; - } - SCCStack.pop(); - } - - Node2Deleted[NodeIndex] = true; - - // Set up number of incoming edges for other nodes - if (N->PredEdges) - for (SparseBitVector<>::iterator Iter = N->PredEdges->begin(); - Iter != N->PredEdges->end(); - ++Iter) - ++GraphNodes[VSSCCRep[*Iter]].NumInEdges; - } else { - SCCStack.push(NodeIndex); - } -} - -void Andersens::HUValNum(unsigned NodeIndex) { - Node *N = &GraphNodes[NodeIndex]; - Node2Visited[NodeIndex] = true; - - // Eliminate dereferences of non-pointers for those non-pointers we have - // already identified. These are ref nodes whose non-ref node: - // 1. Has already been visited determined to point to nothing (and thus, a - // dereference of it must point to nothing) - // 2. Any direct node with no predecessor edges in our graph and with no - // points-to set (since it can't point to anything either, being that it - // receives no points-to sets and has none). - if (NodeIndex >= FirstRefNode) { - unsigned j = VSSCCRep[FindNode(NodeIndex - FirstRefNode)]; - if ((Node2Visited[j] && !GraphNodes[j].PointerEquivLabel) - || (GraphNodes[j].Direct && !GraphNodes[j].PredEdges - && GraphNodes[j].PointsTo->empty())){ - return; - } - } - // Process all our explicit edges - if (N->PredEdges) - for (SparseBitVector<>::iterator Iter = N->PredEdges->begin(); - Iter != N->PredEdges->end(); - ++Iter) { - unsigned j = VSSCCRep[*Iter]; - if (!Node2Visited[j]) - HUValNum(j); - - // If this edge turned out to be the same as us, or got no pointer - // equivalence label (and thus points to nothing) , just decrement our - // incoming edges and continue. - if (j == NodeIndex || GraphNodes[j].PointerEquivLabel == 0) { - --GraphNodes[j].NumInEdges; - continue; - } - - *(N->PointsTo) |= GraphNodes[j].PointsTo; - - // If we didn't end up storing this in the hash, and we're done with all - // the edges, we don't need the points-to set anymore. - --GraphNodes[j].NumInEdges; - if (!GraphNodes[j].NumInEdges && !GraphNodes[j].StoredInHash) { - delete GraphNodes[j].PointsTo; - GraphNodes[j].PointsTo = NULL; - } - } - // If this isn't a direct node, generate a fresh variable. - if (!N->Direct) { - N->PointsTo->set(FirstRefNode + NodeIndex); - } - - // See If we have something equivalent to us, if not, generate a new - // equivalence class. - if (N->PointsTo->empty()) { - delete N->PointsTo; - N->PointsTo = NULL; - } else { - if (N->Direct) { - N->PointerEquivLabel = Set2PEClass[N->PointsTo]; - if (N->PointerEquivLabel == 0) { - unsigned EquivClass = PEClass++; - N->StoredInHash = true; - Set2PEClass[N->PointsTo] = EquivClass; - N->PointerEquivLabel = EquivClass; - } - } else { - N->PointerEquivLabel = PEClass++; - } - } -} - -/// Rewrite our list of constraints so that pointer equivalent nodes are -/// replaced by their the pointer equivalence class representative. -void Andersens::RewriteConstraints() { - std::vector NewConstraints; - DenseSet Seen; - - PEClass2Node.clear(); - PENLEClass2Node.clear(); - - // We may have from 1 to Graphnodes + 1 equivalence classes. - PEClass2Node.insert(PEClass2Node.begin(), GraphNodes.size() + 1, -1); - PENLEClass2Node.insert(PENLEClass2Node.begin(), GraphNodes.size() + 1, -1); - - // Rewrite constraints, ignoring non-pointer constraints, uniting equivalent - // nodes, and rewriting constraints to use the representative nodes. - for (unsigned i = 0, e = Constraints.size(); i != e; ++i) { - Constraint &C = Constraints[i]; - unsigned RHSNode = FindNode(C.Src); - unsigned LHSNode = FindNode(C.Dest); - unsigned RHSLabel = GraphNodes[VSSCCRep[RHSNode]].PointerEquivLabel; - unsigned LHSLabel = GraphNodes[VSSCCRep[LHSNode]].PointerEquivLabel; - - // First we try to eliminate constraints for things we can prove don't point - // to anything. - if (LHSLabel == 0) { - DEBUG(PrintNode(&GraphNodes[LHSNode])); - DEBUG(dbgs() << " is a non-pointer, ignoring constraint.\n"); - continue; - } - if (RHSLabel == 0) { - DEBUG(PrintNode(&GraphNodes[RHSNode])); - DEBUG(dbgs() << " is a non-pointer, ignoring constraint.\n"); - continue; - } - // This constraint may be useless, and it may become useless as we translate - // it. - if (C.Src == C.Dest && C.Type == Constraint::Copy) - continue; - - C.Src = FindEquivalentNode(RHSNode, RHSLabel); - C.Dest = FindEquivalentNode(FindNode(LHSNode), LHSLabel); - if ((C.Src == C.Dest && C.Type == Constraint::Copy) - || Seen.count(C)) - continue; - - Seen.insert(C); - NewConstraints.push_back(C); - } - Constraints.swap(NewConstraints); - PEClass2Node.clear(); -} - -/// See if we have a node that is pointer equivalent to the one being asked -/// about, and if so, unite them and return the equivalent node. Otherwise, -/// return the original node. -unsigned Andersens::FindEquivalentNode(unsigned NodeIndex, - unsigned NodeLabel) { - if (!GraphNodes[NodeIndex].AddressTaken) { - if (PEClass2Node[NodeLabel] != -1) { - // We found an existing node with the same pointer label, so unify them. - // We specifically request that Union-By-Rank not be used so that - // PEClass2Node[NodeLabel] U= NodeIndex and not the other way around. - return UniteNodes(PEClass2Node[NodeLabel], NodeIndex, false); - } else { - PEClass2Node[NodeLabel] = NodeIndex; - PENLEClass2Node[NodeLabel] = NodeIndex; - } - } else if (PENLEClass2Node[NodeLabel] == -1) { - PENLEClass2Node[NodeLabel] = NodeIndex; - } - - return NodeIndex; -} - -void Andersens::PrintLabels() const { - for (unsigned i = 0; i < GraphNodes.size(); ++i) { - if (i < FirstRefNode) { - PrintNode(&GraphNodes[i]); - } else if (i < FirstAdrNode) { - DEBUG(dbgs() << "REF("); - PrintNode(&GraphNodes[i-FirstRefNode]); - DEBUG(dbgs() <<")"); - } else { - DEBUG(dbgs() << "ADR("); - PrintNode(&GraphNodes[i-FirstAdrNode]); - DEBUG(dbgs() <<")"); - } - - DEBUG(dbgs() << " has pointer label " << GraphNodes[i].PointerEquivLabel - << " and SCC rep " << VSSCCRep[i] - << " and is " << (GraphNodes[i].Direct ? "Direct" : "Not direct") - << "\n"); - } -} - -/// The technique used here is described in "The Ant and the -/// Grasshopper: Fast and Accurate Pointer Analysis for Millions of -/// Lines of Code. In Programming Language Design and Implementation -/// (PLDI), June 2007." It is known as the "HCD" (Hybrid Cycle -/// Detection) algorithm. It is called a hybrid because it performs an -/// offline analysis and uses its results during the solving (online) -/// phase. This is just the offline portion; the results of this -/// operation are stored in SDT and are later used in SolveContraints() -/// and UniteNodes(). -void Andersens::HCD() { - DEBUG(dbgs() << "Starting HCD.\n"); - HCDSCCRep.resize(GraphNodes.size()); - - for (unsigned i = 0; i < GraphNodes.size(); ++i) { - GraphNodes[i].Edges = new SparseBitVector<>; - HCDSCCRep[i] = i; - } - - for (unsigned i = 0, e = Constraints.size(); i != e; ++i) { - Constraint &C = Constraints[i]; - assert (C.Src < GraphNodes.size() && C.Dest < GraphNodes.size()); - if (C.Type == Constraint::AddressOf) { - continue; - } else if (C.Type == Constraint::Load) { - if( C.Offset == 0 ) - GraphNodes[C.Dest].Edges->set(C.Src + FirstRefNode); - } else if (C.Type == Constraint::Store) { - if( C.Offset == 0 ) - GraphNodes[C.Dest + FirstRefNode].Edges->set(C.Src); - } else { - GraphNodes[C.Dest].Edges->set(C.Src); - } - } - - Node2DFS.insert(Node2DFS.begin(), GraphNodes.size(), 0); - Node2Deleted.insert(Node2Deleted.begin(), GraphNodes.size(), false); - Node2Visited.insert(Node2Visited.begin(), GraphNodes.size(), false); - SDT.insert(SDT.begin(), GraphNodes.size() / 2, -1); - - DFSNumber = 0; - for (unsigned i = 0; i < GraphNodes.size(); ++i) { - unsigned Node = HCDSCCRep[i]; - if (!Node2Deleted[Node]) - Search(Node); - } - - for (unsigned i = 0; i < GraphNodes.size(); ++i) - if (GraphNodes[i].Edges != NULL) { - delete GraphNodes[i].Edges; - GraphNodes[i].Edges = NULL; - } - - while( !SCCStack.empty() ) - SCCStack.pop(); - - Node2DFS.clear(); - Node2Visited.clear(); - Node2Deleted.clear(); - HCDSCCRep.clear(); - DEBUG(dbgs() << "HCD complete.\n"); -} - -// Component of HCD: -// Use Nuutila's variant of Tarjan's algorithm to detect -// Strongly-Connected Components (SCCs). For non-trivial SCCs -// containing ref nodes, insert the appropriate information in SDT. -void Andersens::Search(unsigned Node) { - unsigned MyDFS = DFSNumber++; - - Node2Visited[Node] = true; - Node2DFS[Node] = MyDFS; - - for (SparseBitVector<>::iterator Iter = GraphNodes[Node].Edges->begin(), - End = GraphNodes[Node].Edges->end(); - Iter != End; - ++Iter) { - unsigned J = HCDSCCRep[*Iter]; - assert(GraphNodes[J].isRep() && "Debug check; must be representative"); - if (!Node2Deleted[J]) { - if (!Node2Visited[J]) - Search(J); - if (Node2DFS[Node] > Node2DFS[J]) - Node2DFS[Node] = Node2DFS[J]; - } - } - - if( MyDFS != Node2DFS[Node] ) { - SCCStack.push(Node); - return; - } - - // This node is the root of a SCC, so process it. - // - // If the SCC is "non-trivial" (not a singleton) and contains a reference - // node, we place this SCC into SDT. We unite the nodes in any case. - if (!SCCStack.empty() && Node2DFS[SCCStack.top()] >= MyDFS) { - SparseBitVector<> SCC; - - SCC.set(Node); - - bool Ref = (Node >= FirstRefNode); - - Node2Deleted[Node] = true; - - do { - unsigned P = SCCStack.top(); SCCStack.pop(); - Ref |= (P >= FirstRefNode); - SCC.set(P); - HCDSCCRep[P] = Node; - } while (!SCCStack.empty() && Node2DFS[SCCStack.top()] >= MyDFS); - - if (Ref) { - unsigned Rep = SCC.find_first(); - assert(Rep < FirstRefNode && "The SCC didn't have a non-Ref node!"); - - SparseBitVector<>::iterator i = SCC.begin(); - - // Skip over the non-ref nodes - while( *i < FirstRefNode ) - ++i; - - while( i != SCC.end() ) - SDT[ (*i++) - FirstRefNode ] = Rep; - } - } -} - - -/// Optimize the constraints by performing offline variable substitution and -/// other optimizations. -void Andersens::OptimizeConstraints() { - DEBUG(dbgs() << "Beginning constraint optimization\n"); - - SDTActive = false; - - // Function related nodes need to stay in the same relative position and can't - // be location equivalent. - for (std::map::iterator Iter = MaxK.begin(); - Iter != MaxK.end(); - ++Iter) { - for (unsigned i = Iter->first; - i != Iter->first + Iter->second; - ++i) { - GraphNodes[i].AddressTaken = true; - GraphNodes[i].Direct = false; - } - } - - ClumpAddressTaken(); - FirstRefNode = GraphNodes.size(); - FirstAdrNode = FirstRefNode + GraphNodes.size(); - GraphNodes.insert(GraphNodes.end(), 2 * GraphNodes.size(), - Node(false)); - VSSCCRep.resize(GraphNodes.size()); - for (unsigned i = 0; i < GraphNodes.size(); ++i) { - VSSCCRep[i] = i; - } - HVN(); - for (unsigned i = 0; i < GraphNodes.size(); ++i) { - Node *N = &GraphNodes[i]; - delete N->PredEdges; - N->PredEdges = NULL; - delete N->ImplicitPredEdges; - N->ImplicitPredEdges = NULL; - } -#undef DEBUG_TYPE -#define DEBUG_TYPE "anders-aa-labels" - DEBUG(PrintLabels()); -#undef DEBUG_TYPE -#define DEBUG_TYPE "anders-aa" - RewriteConstraints(); - // Delete the adr nodes. - GraphNodes.resize(FirstRefNode * 2); - - // Now perform HU - for (unsigned i = 0; i < GraphNodes.size(); ++i) { - Node *N = &GraphNodes[i]; - if (FindNode(i) == i) { - N->PointsTo = new SparseBitVector<>; - N->PointedToBy = new SparseBitVector<>; - // Reset our labels - } - VSSCCRep[i] = i; - N->PointerEquivLabel = 0; - } - HU(); -#undef DEBUG_TYPE -#define DEBUG_TYPE "anders-aa-labels" - DEBUG(PrintLabels()); -#undef DEBUG_TYPE -#define DEBUG_TYPE "anders-aa" - RewriteConstraints(); - for (unsigned i = 0; i < GraphNodes.size(); ++i) { - if (FindNode(i) == i) { - Node *N = &GraphNodes[i]; - delete N->PointsTo; - N->PointsTo = NULL; - delete N->PredEdges; - N->PredEdges = NULL; - delete N->ImplicitPredEdges; - N->ImplicitPredEdges = NULL; - delete N->PointedToBy; - N->PointedToBy = NULL; - } - } - - // perform Hybrid Cycle Detection (HCD) - HCD(); - SDTActive = true; - - // No longer any need for the upper half of GraphNodes (for ref nodes). - GraphNodes.erase(GraphNodes.begin() + FirstRefNode, GraphNodes.end()); - - // HCD complete. - - DEBUG(dbgs() << "Finished constraint optimization\n"); - FirstRefNode = 0; - FirstAdrNode = 0; -} - -/// Unite pointer but not location equivalent variables, now that the constraint -/// graph is built. -void Andersens::UnitePointerEquivalences() { - DEBUG(dbgs() << "Uniting remaining pointer equivalences\n"); - for (unsigned i = 0; i < GraphNodes.size(); ++i) { - if (GraphNodes[i].AddressTaken && GraphNodes[i].isRep()) { - unsigned Label = GraphNodes[i].PointerEquivLabel; - - if (Label && PENLEClass2Node[Label] != -1) - UniteNodes(i, PENLEClass2Node[Label]); - } - } - DEBUG(dbgs() << "Finished remaining pointer equivalences\n"); - PENLEClass2Node.clear(); -} - -/// Create the constraint graph used for solving points-to analysis. -/// -void Andersens::CreateConstraintGraph() { - for (unsigned i = 0, e = Constraints.size(); i != e; ++i) { - Constraint &C = Constraints[i]; - assert (C.Src < GraphNodes.size() && C.Dest < GraphNodes.size()); - if (C.Type == Constraint::AddressOf) - GraphNodes[C.Dest].PointsTo->set(C.Src); - else if (C.Type == Constraint::Load) - GraphNodes[C.Src].Constraints.push_back(C); - else if (C.Type == Constraint::Store) - GraphNodes[C.Dest].Constraints.push_back(C); - else if (C.Offset != 0) - GraphNodes[C.Src].Constraints.push_back(C); - else - GraphNodes[C.Src].Edges->set(C.Dest); - } -} - -// Perform DFS and cycle detection. -bool Andersens::QueryNode(unsigned Node) { - assert(GraphNodes[Node].isRep() && "Querying a non-rep node"); - unsigned OurDFS = ++DFSNumber; - SparseBitVector<> ToErase; - SparseBitVector<> NewEdges; - Tarjan2DFS[Node] = OurDFS; - - // Changed denotes a change from a recursive call that we will bubble up. - // Merged is set if we actually merge a node ourselves. - bool Changed = false, Merged = false; - - for (SparseBitVector<>::iterator bi = GraphNodes[Node].Edges->begin(); - bi != GraphNodes[Node].Edges->end(); - ++bi) { - unsigned RepNode = FindNode(*bi); - // If this edge points to a non-representative node but we are - // already planning to add an edge to its representative, we have no - // need for this edge anymore. - if (RepNode != *bi && NewEdges.test(RepNode)){ - ToErase.set(*bi); - continue; - } - - // Continue about our DFS. - if (!Tarjan2Deleted[RepNode]){ - if (Tarjan2DFS[RepNode] == 0) { - Changed |= QueryNode(RepNode); - // May have been changed by QueryNode - RepNode = FindNode(RepNode); - } - if (Tarjan2DFS[RepNode] < Tarjan2DFS[Node]) - Tarjan2DFS[Node] = Tarjan2DFS[RepNode]; - } - - // We may have just discovered that this node is part of a cycle, in - // which case we can also erase it. - if (RepNode != *bi) { - ToErase.set(*bi); - NewEdges.set(RepNode); - } - } - - GraphNodes[Node].Edges->intersectWithComplement(ToErase); - GraphNodes[Node].Edges |= NewEdges; - - // If this node is a root of a non-trivial SCC, place it on our - // worklist to be processed. - if (OurDFS == Tarjan2DFS[Node]) { - while (!SCCStack.empty() && Tarjan2DFS[SCCStack.top()] >= OurDFS) { - Node = UniteNodes(Node, SCCStack.top()); - - SCCStack.pop(); - Merged = true; - } - Tarjan2Deleted[Node] = true; - - if (Merged) - NextWL->insert(&GraphNodes[Node]); - } else { - SCCStack.push(Node); - } - - return(Changed | Merged); -} - -/// SolveConstraints - This stage iteratively processes the constraints list -/// propagating constraints (adding edges to the Nodes in the points-to graph) -/// until a fixed point is reached. -/// -/// We use a variant of the technique called "Lazy Cycle Detection", which is -/// described in "The Ant and the Grasshopper: Fast and Accurate Pointer -/// Analysis for Millions of Lines of Code. In Programming Language Design and -/// Implementation (PLDI), June 2007." -/// The paper describes performing cycle detection one node at a time, which can -/// be expensive if there are no cycles, but there are long chains of nodes that -/// it heuristically believes are cycles (because it will DFS from each node -/// without state from previous nodes). -/// Instead, we use the heuristic to build a worklist of nodes to check, then -/// cycle detect them all at the same time to do this more cheaply. This -/// catches cycles slightly later than the original technique did, but does it -/// make significantly cheaper. - -void Andersens::SolveConstraints() { - CurrWL = &w1; - NextWL = &w2; - - OptimizeConstraints(); -#undef DEBUG_TYPE -#define DEBUG_TYPE "anders-aa-constraints" - DEBUG(PrintConstraints()); -#undef DEBUG_TYPE -#define DEBUG_TYPE "anders-aa" - - for (unsigned i = 0; i < GraphNodes.size(); ++i) { - Node *N = &GraphNodes[i]; - N->PointsTo = new SparseBitVector<>; - N->OldPointsTo = new SparseBitVector<>; - N->Edges = new SparseBitVector<>; - } - CreateConstraintGraph(); - UnitePointerEquivalences(); - assert(SCCStack.empty() && "SCC Stack should be empty by now!"); - Node2DFS.clear(); - Node2Deleted.clear(); - Node2DFS.insert(Node2DFS.begin(), GraphNodes.size(), 0); - Node2Deleted.insert(Node2Deleted.begin(), GraphNodes.size(), false); - DFSNumber = 0; - DenseSet Seen; - DenseSet, PairKeyInfo> EdgesChecked; - - // Order graph and add initial nodes to work list. - for (unsigned i = 0; i < GraphNodes.size(); ++i) { - Node *INode = &GraphNodes[i]; - - // Add to work list if it's a representative and can contribute to the - // calculation right now. - if (INode->isRep() && !INode->PointsTo->empty() - && (!INode->Edges->empty() || !INode->Constraints.empty())) { - INode->Stamp(); - CurrWL->insert(INode); - } - } - std::queue TarjanWL; -#if !FULL_UNIVERSAL - // "Rep and special variables" - in order for HCD to maintain conservative - // results when !FULL_UNIVERSAL, we need to treat the special variables in - // the same way that the !FULL_UNIVERSAL tweak does throughout the rest of - // the analysis - it's ok to add edges from the special nodes, but never - // *to* the special nodes. - std::vector RSV; -#endif - while( !CurrWL->empty() ) { - DEBUG(dbgs() << "Starting iteration #" << ++NumIters << "\n"); - - Node* CurrNode; - unsigned CurrNodeIndex; - - // Actual cycle checking code. We cycle check all of the lazy cycle - // candidates from the last iteration in one go. - if (!TarjanWL.empty()) { - DFSNumber = 0; - - Tarjan2DFS.clear(); - Tarjan2Deleted.clear(); - while (!TarjanWL.empty()) { - unsigned int ToTarjan = TarjanWL.front(); - TarjanWL.pop(); - if (!Tarjan2Deleted[ToTarjan] - && GraphNodes[ToTarjan].isRep() - && Tarjan2DFS[ToTarjan] == 0) - QueryNode(ToTarjan); - } - } - - // Add to work list if it's a representative and can contribute to the - // calculation right now. - while( (CurrNode = CurrWL->pop()) != NULL ) { - CurrNodeIndex = CurrNode - &GraphNodes[0]; - CurrNode->Stamp(); - - - // Figure out the changed points to bits - SparseBitVector<> CurrPointsTo; - CurrPointsTo.intersectWithComplement(CurrNode->PointsTo, - CurrNode->OldPointsTo); - if (CurrPointsTo.empty()) - continue; - - *(CurrNode->OldPointsTo) |= CurrPointsTo; - - // Check the offline-computed equivalencies from HCD. - bool SCC = false; - unsigned Rep; - - if (SDT[CurrNodeIndex] >= 0) { - SCC = true; - Rep = FindNode(SDT[CurrNodeIndex]); - -#if !FULL_UNIVERSAL - RSV.clear(); -#endif - for (SparseBitVector<>::iterator bi = CurrPointsTo.begin(); - bi != CurrPointsTo.end(); ++bi) { - unsigned Node = FindNode(*bi); -#if !FULL_UNIVERSAL - if (Node < NumberSpecialNodes) { - RSV.push_back(Node); - continue; - } -#endif - Rep = UniteNodes(Rep,Node); - } -#if !FULL_UNIVERSAL - RSV.push_back(Rep); -#endif - - NextWL->insert(&GraphNodes[Rep]); - - if ( ! CurrNode->isRep() ) - continue; - } - - Seen.clear(); - - /* Now process the constraints for this node. */ - for (std::list::iterator li = CurrNode->Constraints.begin(); - li != CurrNode->Constraints.end(); ) { - li->Src = FindNode(li->Src); - li->Dest = FindNode(li->Dest); - - // Delete redundant constraints - if( Seen.count(*li) ) { - std::list::iterator lk = li; li++; - - CurrNode->Constraints.erase(lk); - ++NumErased; - continue; - } - Seen.insert(*li); - - // Src and Dest will be the vars we are going to process. - // This may look a bit ugly, but what it does is allow us to process - // both store and load constraints with the same code. - // Load constraints say that every member of our RHS solution has K - // added to it, and that variable gets an edge to LHS. We also union - // RHS+K's solution into the LHS solution. - // Store constraints say that every member of our LHS solution has K - // added to it, and that variable gets an edge from RHS. We also union - // RHS's solution into the LHS+K solution. - unsigned *Src; - unsigned *Dest; - unsigned K = li->Offset; - unsigned CurrMember; - if (li->Type == Constraint::Load) { - Src = &CurrMember; - Dest = &li->Dest; - } else if (li->Type == Constraint::Store) { - Src = &li->Src; - Dest = &CurrMember; - } else { - // TODO Handle offseted copy constraint - li++; - continue; - } - - // See if we can use Hybrid Cycle Detection (that is, check - // if it was a statically detected offline equivalence that - // involves pointers; if so, remove the redundant constraints). - if( SCC && K == 0 ) { -#if FULL_UNIVERSAL - CurrMember = Rep; - - if (GraphNodes[*Src].Edges->test_and_set(*Dest)) - if (GraphNodes[*Dest].PointsTo |= *(GraphNodes[*Src].PointsTo)) - NextWL->insert(&GraphNodes[*Dest]); -#else - for (unsigned i=0; i < RSV.size(); ++i) { - CurrMember = RSV[i]; - - if (*Dest < NumberSpecialNodes) - continue; - if (GraphNodes[*Src].Edges->test_and_set(*Dest)) - if (GraphNodes[*Dest].PointsTo |= *(GraphNodes[*Src].PointsTo)) - NextWL->insert(&GraphNodes[*Dest]); - } -#endif - // since all future elements of the points-to set will be - // equivalent to the current ones, the complex constraints - // become redundant. - // - std::list::iterator lk = li; li++; -#if !FULL_UNIVERSAL - // In this case, we can still erase the constraints when the - // elements of the points-to sets are referenced by *Dest, - // but not when they are referenced by *Src (i.e. for a Load - // constraint). This is because if another special variable is - // put into the points-to set later, we still need to add the - // new edge from that special variable. - if( lk->Type != Constraint::Load) -#endif - GraphNodes[CurrNodeIndex].Constraints.erase(lk); - } else { - const SparseBitVector<> &Solution = CurrPointsTo; - - for (SparseBitVector<>::iterator bi = Solution.begin(); - bi != Solution.end(); - ++bi) { - CurrMember = *bi; - - // Need to increment the member by K since that is where we are - // supposed to copy to/from. Note that in positive weight cycles, - // which occur in address taking of fields, K can go past - // MaxK[CurrMember] elements, even though that is all it could point - // to. - if (K > 0 && K > MaxK[CurrMember]) - continue; - else - CurrMember = FindNode(CurrMember + K); - - // Add an edge to the graph, so we can just do regular - // bitmap ior next time. It may also let us notice a cycle. -#if !FULL_UNIVERSAL - if (*Dest < NumberSpecialNodes) - continue; -#endif - if (GraphNodes[*Src].Edges->test_and_set(*Dest)) - if (GraphNodes[*Dest].PointsTo |= *(GraphNodes[*Src].PointsTo)) - NextWL->insert(&GraphNodes[*Dest]); - - } - li++; - } - } - SparseBitVector<> NewEdges; - SparseBitVector<> ToErase; - - // Now all we have left to do is propagate points-to info along the - // edges, erasing the redundant edges. - for (SparseBitVector<>::iterator bi = CurrNode->Edges->begin(); - bi != CurrNode->Edges->end(); - ++bi) { - - unsigned DestVar = *bi; - unsigned Rep = FindNode(DestVar); - - // If we ended up with this node as our destination, or we've already - // got an edge for the representative, delete the current edge. - if (Rep == CurrNodeIndex || - (Rep != DestVar && NewEdges.test(Rep))) { - ToErase.set(DestVar); - continue; - } - - std::pair edge(CurrNodeIndex,Rep); - - // This is where we do lazy cycle detection. - // If this is a cycle candidate (equal points-to sets and this - // particular edge has not been cycle-checked previously), add to the - // list to check for cycles on the next iteration. - if (!EdgesChecked.count(edge) && - *(GraphNodes[Rep].PointsTo) == *(CurrNode->PointsTo)) { - EdgesChecked.insert(edge); - TarjanWL.push(Rep); - } - // Union the points-to sets into the dest -#if !FULL_UNIVERSAL - if (Rep >= NumberSpecialNodes) -#endif - if (GraphNodes[Rep].PointsTo |= CurrPointsTo) { - NextWL->insert(&GraphNodes[Rep]); - } - // If this edge's destination was collapsed, rewrite the edge. - if (Rep != DestVar) { - ToErase.set(DestVar); - NewEdges.set(Rep); - } - } - CurrNode->Edges->intersectWithComplement(ToErase); - CurrNode->Edges |= NewEdges; - } - - // Switch to other work list. - WorkList* t = CurrWL; CurrWL = NextWL; NextWL = t; - } - - - Node2DFS.clear(); - Node2Deleted.clear(); - for (unsigned i = 0; i < GraphNodes.size(); ++i) { - Node *N = &GraphNodes[i]; - delete N->OldPointsTo; - delete N->Edges; - } - SDTActive = false; - SDT.clear(); -} - -//===----------------------------------------------------------------------===// -// Union-Find -//===----------------------------------------------------------------------===// - -// Unite nodes First and Second, returning the one which is now the -// representative node. First and Second are indexes into GraphNodes -unsigned Andersens::UniteNodes(unsigned First, unsigned Second, - bool UnionByRank) { - assert (First < GraphNodes.size() && Second < GraphNodes.size() && - "Attempting to merge nodes that don't exist"); - - Node *FirstNode = &GraphNodes[First]; - Node *SecondNode = &GraphNodes[Second]; - - assert (SecondNode->isRep() && FirstNode->isRep() && - "Trying to unite two non-representative nodes!"); - if (First == Second) - return First; - - if (UnionByRank) { - int RankFirst = (int) FirstNode ->NodeRep; - int RankSecond = (int) SecondNode->NodeRep; - - // Rank starts at -1 and gets decremented as it increases. - // Translation: higher rank, lower NodeRep value, which is always negative. - if (RankFirst > RankSecond) { - unsigned t = First; First = Second; Second = t; - Node* tp = FirstNode; FirstNode = SecondNode; SecondNode = tp; - } else if (RankFirst == RankSecond) { - FirstNode->NodeRep = (unsigned) (RankFirst - 1); - } - } - - SecondNode->NodeRep = First; -#if !FULL_UNIVERSAL - if (First >= NumberSpecialNodes) -#endif - if (FirstNode->PointsTo && SecondNode->PointsTo) - FirstNode->PointsTo |= *(SecondNode->PointsTo); - if (FirstNode->Edges && SecondNode->Edges) - FirstNode->Edges |= *(SecondNode->Edges); - if (!SecondNode->Constraints.empty()) - FirstNode->Constraints.splice(FirstNode->Constraints.begin(), - SecondNode->Constraints); - if (FirstNode->OldPointsTo) { - delete FirstNode->OldPointsTo; - FirstNode->OldPointsTo = new SparseBitVector<>; - } - - // Destroy interesting parts of the merged-from node. - delete SecondNode->OldPointsTo; - delete SecondNode->Edges; - delete SecondNode->PointsTo; - SecondNode->Edges = NULL; - SecondNode->PointsTo = NULL; - SecondNode->OldPointsTo = NULL; - - NumUnified++; - DEBUG(dbgs() << "Unified Node "); - DEBUG(PrintNode(FirstNode)); - DEBUG(dbgs() << " and Node "); - DEBUG(PrintNode(SecondNode)); - DEBUG(dbgs() << "\n"); - - if (SDTActive) - if (SDT[Second] >= 0) { - if (SDT[First] < 0) - SDT[First] = SDT[Second]; - else { - UniteNodes( FindNode(SDT[First]), FindNode(SDT[Second]) ); - First = FindNode(First); - } - } - - return First; -} - -// Find the index into GraphNodes of the node representing Node, performing -// path compression along the way -unsigned Andersens::FindNode(unsigned NodeIndex) { - assert (NodeIndex < GraphNodes.size() - && "Attempting to find a node that can't exist"); - Node *N = &GraphNodes[NodeIndex]; - if (N->isRep()) - return NodeIndex; - else - return (N->NodeRep = FindNode(N->NodeRep)); -} - -// Find the index into GraphNodes of the node representing Node, -// don't perform path compression along the way (for Print) -unsigned Andersens::FindNode(unsigned NodeIndex) const { - assert (NodeIndex < GraphNodes.size() - && "Attempting to find a node that can't exist"); - const Node *N = &GraphNodes[NodeIndex]; - if (N->isRep()) - return NodeIndex; - else - return FindNode(N->NodeRep); -} - -//===----------------------------------------------------------------------===// -// Debugging Output -//===----------------------------------------------------------------------===// - -void Andersens::PrintNode(const Node *N) const { - if (N == &GraphNodes[UniversalSet]) { - dbgs() << ""; - return; - } else if (N == &GraphNodes[NullPtr]) { - dbgs() << ""; - return; - } else if (N == &GraphNodes[NullObject]) { - dbgs() << ""; - return; - } - if (!N->getValue()) { - dbgs() << "artificial" << (intptr_t) N; - return; - } - - assert(N->getValue() != 0 && "Never set node label!"); - Value *V = N->getValue(); - if (Function *F = dyn_cast(V)) { - if (F->getFunctionType()->getReturnType()->isPointerTy() && - N == &GraphNodes[getReturnNode(F)]) { - dbgs() << F->getName() << ":retval"; - return; - } else if (F->getFunctionType()->isVarArg() && - N == &GraphNodes[getVarargNode(F)]) { - dbgs() << F->getName() << ":vararg"; - return; - } - } - - if (Instruction *I = dyn_cast(V)) - dbgs() << I->getParent()->getParent()->getName() << ":"; - else if (Argument *Arg = dyn_cast(V)) - dbgs() << Arg->getParent()->getName() << ":"; - - if (V->hasName()) - dbgs() << V->getName(); - else - dbgs() << "(unnamed)"; - - if (isa(V) || isa(V) || isMalloc(V)) - if (N == &GraphNodes[getObject(V)]) - dbgs() << ""; -} -void Andersens::PrintConstraint(const Constraint &C) const { - if (C.Type == Constraint::Store) { - dbgs() << "*"; - if (C.Offset != 0) - dbgs() << "("; - } - PrintNode(&GraphNodes[C.Dest]); - if (C.Type == Constraint::Store && C.Offset != 0) - dbgs() << " + " << C.Offset << ")"; - dbgs() << " = "; - if (C.Type == Constraint::Load) { - dbgs() << "*"; - if (C.Offset != 0) - dbgs() << "("; - } - else if (C.Type == Constraint::AddressOf) - dbgs() << "&"; - PrintNode(&GraphNodes[C.Src]); - if (C.Offset != 0 && C.Type != Constraint::Store) - dbgs() << " + " << C.Offset; - if (C.Type == Constraint::Load && C.Offset != 0) - dbgs() << ")"; - dbgs() << "\n"; -} - -void Andersens::PrintConstraints() const { - dbgs() << "Constraints:\n"; - - for (unsigned i = 0, e = Constraints.size(); i != e; ++i) - PrintConstraint(Constraints[i]); -} - -void Andersens::PrintPointsToGraph() const { - dbgs() << "Points-to graph:\n"; - for (unsigned i = 0, e = GraphNodes.size(); i != e; ++i) { - const Node *N = &GraphNodes[i]; - if (FindNode(i) != i) { - PrintNode(N); - dbgs() << "\t--> same as "; - PrintNode(&GraphNodes[FindNode(i)]); - dbgs() << "\n"; - } else { - dbgs() << "[" << (N->PointsTo->count()) << "] "; - PrintNode(N); - dbgs() << "\t--> "; - - bool first = true; - for (SparseBitVector<>::iterator bi = N->PointsTo->begin(); - bi != N->PointsTo->end(); - ++bi) { - if (!first) - dbgs() << ", "; - PrintNode(&GraphNodes[*bi]); - first = false; - } - dbgs() << "\n"; - } - } -} From sabre at nondot.org Mon Mar 1 13:29:18 2010 From: sabre at nondot.org (Chris Lattner) Date: Mon, 01 Mar 2010 19:29:18 -0000 Subject: [llvm-commits] [llvm] r97484 - /llvm/trunk/docs/ReleaseNotes.html Message-ID: <20100301192918.0BD7F2A6C12C@llvm.org> Author: lattner Date: Mon Mar 1 13:29:17 2010 New Revision: 97484 URL: http://llvm.org/viewvc/llvm-project?rev=97484&view=rev Log: note that andersaa was removed in 2.7 Modified: llvm/trunk/docs/ReleaseNotes.html Modified: llvm/trunk/docs/ReleaseNotes.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/ReleaseNotes.html?rev=97484&r1=97483&r2=97484&view=diff ============================================================================== --- llvm/trunk/docs/ReleaseNotes.html (original) +++ llvm/trunk/docs/ReleaseNotes.html Mon Mar 1 13:29:17 2010 @@ -451,6 +451,8 @@ +

    Also, -anders-aa was removed

    + From sabre at nondot.org Mon Mar 1 13:38:53 2010 From: sabre at nondot.org (Chris Lattner) Date: Mon, 01 Mar 2010 19:38:53 -0000 Subject: [llvm-commits] [llvm] r97485 - /llvm/trunk/lib/Target/XCore/XCoreISelDAGToDAG.cpp Message-ID: <20100301193853.75B962A6C12C@llvm.org> Author: lattner Date: Mon Mar 1 13:38:53 2010 New Revision: 97485 URL: http://llvm.org/viewvc/llvm-project?rev=97485&view=rev Log: stop using generated sdnodexforms. Modified: llvm/trunk/lib/Target/XCore/XCoreISelDAGToDAG.cpp Modified: llvm/trunk/lib/Target/XCore/XCoreISelDAGToDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/XCore/XCoreISelDAGToDAG.cpp?rev=97485&r1=97484&r2=97485&view=diff ============================================================================== --- llvm/trunk/lib/Target/XCore/XCoreISelDAGToDAG.cpp (original) +++ llvm/trunk/lib/Target/XCore/XCoreISelDAGToDAG.cpp Mon Mar 1 13:38:53 2010 @@ -164,7 +164,11 @@ default: break; case ISD::Constant: { if (Predicate_immMskBitp(N)) { - SDValue MskSize = Transform_msksize_xform(N); + // Transformation function: get the size of a mask + int64_t MaskVal = cast(N)->getZExtValue(); + assert(isMask_32(MaskVal)); + // Look for the first non-zero bit + SDValue MskSize = getI32Imm(32 - CountLeadingZeros_32(MaskVal)); return CurDAG->getMachineNode(XCore::MKMSK_rus, dl, MVT::i32, MskSize); } From sabre at nondot.org Mon Mar 1 13:39:15 2010 From: sabre at nondot.org (Chris Lattner) Date: Mon, 01 Mar 2010 19:39:15 -0000 Subject: [llvm-commits] [llvm] r97486 - /llvm/trunk/utils/TableGen/DAGISelEmitter.cpp Message-ID: <20100301193915.57E722A6C12C@llvm.org> Author: lattner Date: Mon Mar 1 13:39:15 2010 New Revision: 97486 URL: http://llvm.org/viewvc/llvm-project?rev=97486&view=rev Log: don't emit the old sdnodexform stuff for the new isel. Modified: llvm/trunk/utils/TableGen/DAGISelEmitter.cpp Modified: llvm/trunk/utils/TableGen/DAGISelEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelEmitter.cpp?rev=97486&r1=97485&r2=97486&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelEmitter.cpp (original) +++ llvm/trunk/utils/TableGen/DAGISelEmitter.cpp Mon Mar 1 13:39:15 2010 @@ -1942,7 +1942,6 @@ }); // FIXME: These are being used by hand written code, gross. - EmitNodeTransforms(OS); EmitPredicateFunctions(OS); #ifdef ENABLE_NEW_ISEL @@ -1980,7 +1979,8 @@ delete TheMatcher; #else - + EmitNodeTransforms(OS); + // At this point, we have full information about the 'Patterns' we need to // parse, both implicitly from instructions as well as from explicit pattern // definitions. Emit the resultant instruction selector. From kremenek at apple.com Mon Mar 1 13:42:47 2010 From: kremenek at apple.com (Ted Kremenek) Date: Mon, 01 Mar 2010 19:42:47 -0000 Subject: [llvm-commits] [llvm] r97488 - /llvm/trunk/lib/Analysis/IPA/CMakeLists.txt Message-ID: <20100301194247.A13842A6C12E@llvm.org> Author: kremenek Date: Mon Mar 1 13:42:47 2010 New Revision: 97488 URL: http://llvm.org/viewvc/llvm-project?rev=97488&view=rev Log: Update CMake build. Modified: llvm/trunk/lib/Analysis/IPA/CMakeLists.txt Modified: llvm/trunk/lib/Analysis/IPA/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/IPA/CMakeLists.txt?rev=97488&r1=97487&r2=97488&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/IPA/CMakeLists.txt (original) +++ llvm/trunk/lib/Analysis/IPA/CMakeLists.txt Mon Mar 1 13:42:47 2010 @@ -1,5 +1,4 @@ add_llvm_library(LLVMipa - Andersens.cpp CallGraph.cpp CallGraphSCCPass.cpp FindUsedTypes.cpp From dpatel at apple.com Mon Mar 1 13:46:08 2010 From: dpatel at apple.com (Devang Patel) Date: Mon, 01 Mar 2010 19:46:08 -0000 Subject: [llvm-commits] [llvm] r97489 - /llvm/trunk/test/Transforms/GlobalOpt/ctor-list-opt-dbg.ll Message-ID: <20100301194608.B8DC12A6C12E@llvm.org> Author: dpatel Date: Mon Mar 1 13:46:08 2010 New Revision: 97489 URL: http://llvm.org/viewvc/llvm-project?rev=97489&view=rev Log: @llvm.dbg.stoppoint intrinsic is not used anymore. Delete dead testcase. Removed: llvm/trunk/test/Transforms/GlobalOpt/ctor-list-opt-dbg.ll Removed: llvm/trunk/test/Transforms/GlobalOpt/ctor-list-opt-dbg.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/GlobalOpt/ctor-list-opt-dbg.ll?rev=97488&view=auto ============================================================================== --- llvm/trunk/test/Transforms/GlobalOpt/ctor-list-opt-dbg.ll (original) +++ llvm/trunk/test/Transforms/GlobalOpt/ctor-list-opt-dbg.ll (removed) @@ -1,98 +0,0 @@ -; RUN: opt < %s -globalopt -S | not grep CTOR - at llvm.global_ctors = appending global [10 x { i32, void ()* }] [ { i32, void ()* } { i32 65535, void ()* @CTOR1 }, { i32, void ()* } { i32 65535, void ()* @CTOR1 }, { i32, void ()* } { i32 65535, void ()* @CTOR2 }, { i32, void ()* } { i32 65535, void ()* @CTOR3 }, { i32, void ()* } { i32 65535, void ()* @CTOR4 }, { i32, void ()* } { i32 65535, void ()* @CTOR5 }, { i32, void ()* } { i32 65535, void ()* @CTOR6 }, { i32, void ()* } { i32 65535, void ()* @CTOR7 }, { i32, void ()* } { i32 65535, void ()* @CTOR8 }, { i32, void ()* } { i32 2147483647, void ()* null } ] ; <[10 x { i32, void ()* }]*> [#uses=0] - at G = global i32 0 ; [#uses=1] - at G2 = global i32 0 ; [#uses=1] - at G3 = global i32 -123 ; [#uses=2] - at X = global { i32, [2 x i32] } { i32 0, [2 x i32] [ i32 17, i32 21 ] } ; <{ i32, [2 x i32] }*> [#uses=2] - at Y = global i32 -1 ; [#uses=2] - at Z = global i32 123 ; [#uses=1] - at D = global double 0.000000e+00 ; [#uses=1] - at CTORGV = internal global i1 false ; [#uses=2] - - %llvm.dbg.anchor.type = type { i32, i32 } - %llvm.dbg.compile_unit.type = type { i32, { }*, i32, i8*, i8*, i8*, i1, i1, i8* } - - at llvm.dbg.compile_units = linkonce constant %llvm.dbg.anchor.type { i32 458752, i32 17 }, section "llvm.metadata" - - at .str = internal constant [4 x i8] c"a.c\00", section "llvm.metadata" ; <[4 x i8]*> [#uses=1] - at .str1 = internal constant [6 x i8] c"/tmp/\00", section "llvm.metadata" ; <[6 x i8]*> [#uses=1] - at .str2 = internal constant [55 x i8] c"4.2.1 (Based on Apple Inc. build 5636) (LLVM build 00)\00", section "llvm.metadata" ; <[55 x i8]*> [#uses=1] - at llvm.dbg.compile_unit = internal constant %llvm.dbg.compile_unit.type { i32 458769, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.compile_units to { }*), i32 1, i8* getelementptr ([4 x i8]* @.str, i32 0, i32 0), i8* getelementptr ([6 x i8]* @.str1, i32 0, i32 0), i8* getelementptr ([55 x i8]* @.str2, i32 0, i32 0), i1 true, i1 false, i8* null }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] - -declare void @llvm.dbg.stoppoint(i32, i32, { }*) nounwind - -define internal void @CTOR1() { - ret void -} - -define internal void @CTOR2() { - %A = add i32 1, 23 ; [#uses=1] - call void @llvm.dbg.stoppoint(i32 5, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - store i32 %A, i32* @G - store i1 true, i1* @CTORGV - ret void -} - -define internal void @CTOR3() { - %X = or i1 true, false ; [#uses=1] - br label %Cont - -Cont: ; preds = %0 - br i1 %X, label %S, label %T - -S: ; preds = %Cont - store i32 24, i32* @G2 - ret void - -T: ; preds = %Cont - ret void -} - -define internal void @CTOR4() { - %X = load i32* @G3 ; [#uses=1] - %Y = add i32 %X, 123 ; [#uses=1] - store i32 %Y, i32* @G3 - ret void -} - -define internal void @CTOR5() { - %X.2p = getelementptr inbounds { i32, [2 x i32] }* @X, i32 0, i32 1, i32 0 ; [#uses=2] - %X.2 = load i32* %X.2p ; [#uses=1] - %X.1p = getelementptr inbounds { i32, [2 x i32] }* @X, i32 0, i32 0 ; [#uses=1] - store i32 %X.2, i32* %X.1p - store i32 42, i32* %X.2p - ret void -} - -define internal void @CTOR6() { - %A = alloca i32 ; [#uses=2] - %y = load i32* @Y ; [#uses=1] - store i32 %y, i32* %A - %Av = load i32* %A ; [#uses=1] - %Av1 = add i32 %Av, 1 ; [#uses=1] - store i32 %Av1, i32* @Y - ret void -} - -define internal void @CTOR7() { - call void @setto( i32* @Z, i32 0 ) - ret void -} - -define void @setto(i32* %P, i32 %V) { - store i32 %V, i32* %P - ret void -} - -declare double @cos(double) - -define internal void @CTOR8() { - %X = call double @cos( double 1.000000e+00 ) ; [#uses=1] - store double %X, double* @D - ret void -} - -define i1 @accessor() { - %V = load i1* @CTORGV ; [#uses=1] - ret i1 %V -} From nunoplopes at sapo.pt Mon Mar 1 13:49:44 2010 From: nunoplopes at sapo.pt (Nuno Lopes) Date: Mon, 1 Mar 2010 19:49:44 -0000 Subject: [llvm-commits] [llvm] r97486 -/llvm/trunk/utils/TableGen/DAGISelEmitter.cpp In-Reply-To: <20100301193915.57E722A6C12C@llvm.org> References: <20100301193915.57E722A6C12C@llvm.org> Message-ID: BTW, can we have a blog post about this new isel, and how it differs from the previous one? :) Thanks, Nuno ----- Original Message ----- From: "Chris Lattner" To: Sent: Monday, March 01, 2010 7:39 PM Subject: [llvm-commits] [llvm] r97486 -/llvm/trunk/utils/TableGen/DAGISelEmitter.cpp > Author: lattner > Date: Mon Mar 1 13:39:15 2010 > New Revision: 97486 > > URL: http://llvm.org/viewvc/llvm-project?rev=97486&view=rev > Log: > don't emit the old sdnodexform stuff for the new isel. > > Modified: > llvm/trunk/utils/TableGen/DAGISelEmitter.cpp > > Modified: llvm/trunk/utils/TableGen/DAGISelEmitter.cpp > URL: > http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelEmitter.cpp?rev=97486&r1=97485&r2=97486&view=diff > ============================================================================== > --- llvm/trunk/utils/TableGen/DAGISelEmitter.cpp (original) > +++ llvm/trunk/utils/TableGen/DAGISelEmitter.cpp Mon Mar 1 13:39:15 2010 > @@ -1942,7 +1942,6 @@ > }); > > // FIXME: These are being used by hand written code, gross. > - EmitNodeTransforms(OS); > EmitPredicateFunctions(OS); > > #ifdef ENABLE_NEW_ISEL > @@ -1980,7 +1979,8 @@ > delete TheMatcher; > > #else > - > + EmitNodeTransforms(OS); > + > // At this point, we have full information about the 'Patterns' we need > to > // parse, both implicitly from instructions as well as from explicit > pattern > // definitions. Emit the resultant instruction selector. > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits > From dpatel at apple.com Mon Mar 1 13:41:26 2010 From: dpatel at apple.com (Devang Patel) Date: Mon, 01 Mar 2010 19:41:26 -0000 Subject: [llvm-commits] [llvm] r97487 - /llvm/trunk/test/Transforms/GlobalOpt/2009-03-05-dbg.ll Message-ID: <20100301194126.4DA5E2A6C12C@llvm.org> Author: dpatel Date: Mon Mar 1 13:41:26 2010 New Revision: 97487 URL: http://llvm.org/viewvc/llvm-project?rev=97487&view=rev Log: Update to use new debug info encoding scheme. As a bonus, now the test passes! Modified: llvm/trunk/test/Transforms/GlobalOpt/2009-03-05-dbg.ll Modified: llvm/trunk/test/Transforms/GlobalOpt/2009-03-05-dbg.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/GlobalOpt/2009-03-05-dbg.ll?rev=97487&r1=97486&r2=97487&view=diff ============================================================================== --- llvm/trunk/test/Transforms/GlobalOpt/2009-03-05-dbg.ll (original) +++ llvm/trunk/test/Transforms/GlobalOpt/2009-03-05-dbg.ll Mon Mar 1 13:41:26 2010 @@ -1,67 +1,76 @@ ; RUN: opt < %s -globalopt -stats -disable-output |& grep "1 globalopt - Number of global vars shrunk to booleans" -; XFAIL: * - type { } ; type %0 - %llvm.dbg.anchor.type = type { i32, i32 } - %llvm.dbg.basictype.type = type { i32, %0*, i8*, %0*, i32, i64, i64, i64, i32, i32 } - %llvm.dbg.compile_unit.type = type { i32, %0*, i32, i8*, i8*, i8*, i1, i1, i8*, i32 } - %llvm.dbg.composite.type = type { i32, %0*, i8*, %0*, i32, i64, i64, i64, i32, %0*, %0*, i32 } - %llvm.dbg.global_variable.type = type { i32, %0*, %0*, i8*, i8*, i8*, %0*, i32, %0*, i1, i1, %0* } - %llvm.dbg.subprogram.type = type { i32, %0*, %0*, i8*, i8*, i8*, %0*, i32, %0*, i1, i1 } - %llvm.dbg.variable.type = type { i32, %0*, i8*, %0*, i32, %0* } - at llvm.dbg.compile_units = linkonce constant %llvm.dbg.anchor.type { i32 458752, i32 17 }, section "llvm.metadata" ; <%llvm.dbg.anchor.type*> [#uses=1] - at .str = internal constant [5 x i8] c"gs.c\00", section "llvm.metadata" ; <[5 x i8]*> [#uses=1] - at .str1 = internal constant [6 x i8] c"/tmp/\00", section "llvm.metadata" ; <[6 x i8]*> [#uses=1] - at .str2 = internal constant [55 x i8] c"4.2.1 (Based on Apple Inc. build 5641) (LLVM build 00)\00", section "llvm.metadata" ; <[55 x i8]*> [#uses=1] - at llvm.dbg.compile_unit = internal constant %llvm.dbg.compile_unit.type { i32 458769, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.compile_units to %0*), i32 1, i8* getelementptr ([5 x i8]* @.str, i32 0, i32 0), i8* getelementptr ([6 x i8]* @.str1, i32 0, i32 0), i8* getelementptr ([55 x i8]* @.str2, i32 0, i32 0), i1 true, i1 false, i8* null, i32 0 }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] - at .str3 = internal constant [4 x i8] c"int\00", section "llvm.metadata" ; <[4 x i8]*> [#uses=1] - at llvm.dbg.basictype = internal constant %llvm.dbg.basictype.type { i32 458788, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([4 x i8]* @.str3, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 32, i64 32, i64 0, i32 0, i32 5 }, section "llvm.metadata" ; <%llvm.dbg.basictype.type*> [#uses=1] - at llvm.dbg.array = internal constant [2 x %0*] [%0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to %0*)], section "llvm.metadata" ; <[2 x %0*]*> [#uses=1] - at llvm.dbg.composite = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([2 x %0*]* @llvm.dbg.array to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.subprograms = linkonce constant %llvm.dbg.anchor.type { i32 458752, i32 46 }, section "llvm.metadata" ; <%llvm.dbg.anchor.type*> [#uses=1] - at .str4 = internal constant [4 x i8] c"foo\00", section "llvm.metadata" ; <[4 x i8]*> [#uses=1] - at llvm.dbg.subprogram = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([4 x i8]* @.str4, i32 0, i32 0), i8* getelementptr ([4 x i8]* @.str4, i32 0, i32 0), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 4, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite to %0*), i1 false, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str5 = internal constant [2 x i8] c"i\00", section "llvm.metadata" ; <[2 x i8]*> [#uses=1] - at llvm.dbg.variable = internal constant %llvm.dbg.variable.type { i32 459009, %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram to %0*), i8* getelementptr ([2 x i8]* @.str5, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 4, %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to %0*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] - at Stop = internal global i32 0 ; [#uses=4] - at llvm.dbg.global_variables = linkonce constant %llvm.dbg.anchor.type { i32 458752, i32 52 }, section "llvm.metadata" ; <%llvm.dbg.anchor.type*> [#uses=1] - at .str6 = internal constant [5 x i8] c"Stop\00", section "llvm.metadata" ; <[5 x i8]*> [#uses=1] - at llvm.dbg.global_variable = internal constant %llvm.dbg.global_variable.type { i32 458804, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.global_variables to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([5 x i8]* @.str6, i32 0, i32 0), i8* getelementptr ([5 x i8]* @.str6, i32 0, i32 0), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 2, %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to %0*), i1 true, i1 true, %0* bitcast (i32* @Stop to %0*) }, section "llvm.metadata" ; <%llvm.dbg.global_variable.type*> [#uses=0] + at Stop = internal global i32 0 ; [#uses=3] -define i32 @foo(i32 %i) nounwind { +define i32 @foo(i32 %i) nounwind ssp { entry: - %"alloca point" = bitcast i32 0 to i32 ; [#uses=0] - call void @llvm.dbg.func.start(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram to %0*)) - call void @llvm.dbg.stoppoint(i32 5, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %0 = load i32* @Stop, align 4 ; [#uses=1] - %1 = icmp eq i32 %0, 1 ; [#uses=1] - br i1 %1, label %bb, label %bb1 - -bb: ; preds = %entry - call void @llvm.dbg.stoppoint(i32 6, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - store i32 0, i32* @Stop, align 4 - call void @llvm.dbg.stoppoint(i32 7, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %2 = mul i32 %i, 42 ; [#uses=1] - br label %bb2 - -bb1: ; preds = %entry - call void @llvm.dbg.stoppoint(i32 9, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - store i32 1, i32* @Stop, align 4 - call void @llvm.dbg.stoppoint(i32 10, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - br label %bb2 - -bb2: ; preds = %bb1, %bb - %.0 = phi i32 [ %i, %bb1 ], [ %2, %bb ] ; [#uses=1] - call void @llvm.dbg.stoppoint(i32 10, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - call void @llvm.dbg.stoppoint(i32 10, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - call void @llvm.dbg.region.end(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram to %0*)) - ret i32 %.0 + %"alloca point" = bitcast i32 0 to i32 ; [#uses=0] + call void @llvm.dbg.value(metadata !{i32 %i}, i64 0, metadata !3) + %0 = icmp eq i32 %i, 1, !dbg !7 ; [#uses=1] + br i1 %0, label %bb, label %bb1, !dbg !7 + +bb: ; preds = %entry + store i32 0, i32* @Stop, align 4, !dbg !9 + %1 = mul nsw i32 %i, 42, !dbg !10 ; [#uses=1] + call void @llvm.dbg.value(metadata !{i32 %1}, i64 0, metadata !3), !dbg !10 + br label %bb2, !dbg !10 + +bb1: ; preds = %entry + store i32 1, i32* @Stop, align 4, !dbg !11 + br label %bb2, !dbg !11 + +bb2: ; preds = %bb1, %bb + %i_addr.0 = phi i32 [ %1, %bb ], [ %i, %bb1 ] ; [#uses=1] + br label %return, !dbg !12 + +return: ; preds = %bb2 + ret i32 %i_addr.0, !dbg !12 } -declare void @llvm.dbg.func.start(%0*) nounwind readnone +declare void @llvm.dbg.declare(metadata, metadata) nounwind readnone + +define i32 @bar() nounwind ssp { +entry: + %"alloca point" = bitcast i32 0 to i32 ; [#uses=0] + %0 = load i32* @Stop, align 4, !dbg !13 ; [#uses=1] + %1 = icmp eq i32 %0, 1, !dbg !13 ; [#uses=1] + br i1 %1, label %bb, label %bb1, !dbg !13 + +bb: ; preds = %entry + br label %bb2, !dbg !18 + +bb1: ; preds = %entry + br label %bb2, !dbg !19 + +bb2: ; preds = %bb1, %bb + %.0 = phi i32 [ 0, %bb ], [ 1, %bb1 ] ; [#uses=1] + br label %return, !dbg !19 + +return: ; preds = %bb2 + ret i32 %.0, !dbg !19 +} -declare void @llvm.dbg.declare(%0*, %0*) nounwind readnone +declare void @llvm.dbg.value(metadata, i64, metadata) nounwind readnone -declare void @llvm.dbg.stoppoint(i32, i32, %0*) nounwind readnone +!llvm.dbg.gv = !{!0} -declare void @llvm.dbg.region.end(%0*) nounwind readnone +!0 = metadata !{i32 458804, i32 0, metadata !1, metadata !"Stop", metadata !"Stop", metadata !"", metadata !1, i32 2, metadata !2, i1 true, i1 true, i32* @Stop} ; [ DW_TAG_variable ] +!1 = metadata !{i32 458769, i32 0, i32 1, metadata !"g.c", metadata !"/tmp", metadata !"4.2.1 (Based on Apple Inc. build 5658) (LLVM build)", i1 true, i1 false, metadata !"", i32 0} ; [ DW_TAG_compile_unit ] +!2 = metadata !{i32 458788, metadata !1, metadata !"int", metadata !1, i32 0, i64 32, i64 32, i64 0, i32 0, i32 5} ; [ DW_TAG_base_type ] +!3 = metadata !{i32 459009, metadata !4, metadata !"i", metadata !1, i32 4, metadata !2} ; [ DW_TAG_arg_variable ] +!4 = metadata !{i32 458798, i32 0, metadata !1, metadata !"foo", metadata !"foo", metadata !"foo", metadata !1, i32 4, metadata !5, i1 false, i1 true, i32 0, i32 0, null, i1 false} ; [ DW_TAG_subprogram ] +!5 = metadata !{i32 458773, metadata !1, metadata !"", metadata !1, i32 0, i64 0, i64 0, i64 0, i32 0, null, metadata !6, i32 0, null} ; [ DW_TAG_subroutine_type ] +!6 = metadata !{metadata !2, metadata !2} +!7 = metadata !{i32 5, i32 0, metadata !8, null} +!8 = metadata !{i32 458763, metadata !4, i32 0, i32 0} ; [ DW_TAG_lexical_block ] +!9 = metadata !{i32 6, i32 0, metadata !8, null} +!10 = metadata !{i32 7, i32 0, metadata !8, null} +!11 = metadata !{i32 9, i32 0, metadata !8, null} +!12 = metadata !{i32 11, i32 0, metadata !8, null} +!13 = metadata !{i32 14, i32 0, metadata !14, null} +!14 = metadata !{i32 458763, metadata !15, i32 0, i32 0} ; [ DW_TAG_lexical_block ] +!15 = metadata !{i32 458798, i32 0, metadata !1, metadata !"bar", metadata !"bar", metadata !"bar", metadata !1, i32 13, metadata !16, i1 false, i1 true, i32 0, i32 0, null, i1 false} ; [ DW_TAG_subprogram ] +!16 = metadata !{i32 458773, metadata !1, metadata !"", metadata !1, i32 0, i64 0, i64 0, i64 0, i32 0, null, metadata !17, i32 0, null} ; [ DW_TAG_subroutine_type ] +!17 = metadata !{metadata !2} +!18 = metadata !{i32 15, i32 0, metadata !14, null} +!19 = metadata !{i32 16, i32 0, metadata !14, null} From sabre at nondot.org Mon Mar 1 14:23:15 2010 From: sabre at nondot.org (Chris Lattner) Date: Mon, 01 Mar 2010 20:23:15 -0000 Subject: [llvm-commits] [llvm] r97490 - /llvm/trunk/test/Analysis/Andersens/ Message-ID: <20100301202315.D9F602A6C12C@llvm.org> Author: lattner Date: Mon Mar 1 14:23:15 2010 New Revision: 97490 URL: http://llvm.org/viewvc/llvm-project?rev=97490&view=rev Log: remove andersen's tests. Removed: llvm/trunk/test/Analysis/Andersens/ From espindola at google.com Mon Mar 1 14:23:59 2010 From: espindola at google.com (Rafael Espindola) Date: Mon, 1 Mar 2010 15:23:59 -0500 Subject: [llvm-commits] [llvm] r97475 - /llvm/trunk/utils/TableGen/DAGISelEmitter.cpp In-Reply-To: <20100301190525.F12082A6C12C@llvm.org> References: <20100301190525.F12082A6C12C@llvm.org> Message-ID: <38a0d8451003011223q6dc8016cva3182ce90d034c74@mail.gmail.com> > LLC Size: > Old: 15,426,852 > New: 12,759,140 ?(down 2.7M) Thanks! Cheers, -- Rafael ?vila de Esp?ndola From sabre at nondot.org Mon Mar 1 14:24:06 2010 From: sabre at nondot.org (Chris Lattner) Date: Mon, 01 Mar 2010 20:24:06 -0000 Subject: [llvm-commits] [llvm] r97491 - /llvm/trunk/test/CodeGen/Generic/GC/argpromotion.ll Message-ID: <20100301202406.1DB052A6C12C@llvm.org> Author: lattner Date: Mon Mar 1 14:24:05 2010 New Revision: 97491 URL: http://llvm.org/viewvc/llvm-project?rev=97491&view=rev Log: stop using anders-aa Modified: llvm/trunk/test/CodeGen/Generic/GC/argpromotion.ll Modified: llvm/trunk/test/CodeGen/Generic/GC/argpromotion.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Generic/GC/argpromotion.ll?rev=97491&r1=97490&r2=97491&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/Generic/GC/argpromotion.ll (original) +++ llvm/trunk/test/CodeGen/Generic/GC/argpromotion.ll Mon Mar 1 14:24:05 2010 @@ -1,4 +1,4 @@ -; RUN: opt < %s -anders-aa -argpromotion +; RUN: opt < %s -argpromotion declare void @llvm.gcroot(i8**, i8*) From sabre at nondot.org Mon Mar 1 14:24:50 2010 From: sabre at nondot.org (Chris Lattner) Date: Mon, 01 Mar 2010 20:24:50 -0000 Subject: [llvm-commits] [llvm] r97492 - in /llvm/trunk/test: Other/2008-03-19-PassManager.ll Transforms/GVN/2008-02-13-NewPHI.ll Message-ID: <20100301202450.74B202A6C12C@llvm.org> Author: lattner Date: Mon Mar 1 14:24:50 2010 New Revision: 97492 URL: http://llvm.org/viewvc/llvm-project?rev=97492&view=rev Log: stop using anders-aa Removed: llvm/trunk/test/Other/2008-03-19-PassManager.ll Modified: llvm/trunk/test/Transforms/GVN/2008-02-13-NewPHI.ll Removed: llvm/trunk/test/Other/2008-03-19-PassManager.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Other/2008-03-19-PassManager.ll?rev=97491&view=auto ============================================================================== --- llvm/trunk/test/Other/2008-03-19-PassManager.ll (original) +++ llvm/trunk/test/Other/2008-03-19-PassManager.ll (removed) @@ -1,58 +0,0 @@ -; PR 2034 -; RUN: opt < %s -anders-aa -instcombine -gvn -disable-output - %struct.FULL = type { i32, i32, [1000 x float*] } - -define i32 @sgesl(%struct.FULL* %a, i32* %ipvt, float* %b, i32 %job) { -entry: - %a_addr = alloca %struct.FULL* ; <%struct.FULL**> [#uses=1] - %ipvt_addr = alloca i32* ; [#uses=1] - %b_addr = alloca float* ; [#uses=1] - %job_addr = alloca i32 ; [#uses=1] - %akk = alloca float* ; [#uses=2] - %k = alloca i32 ; [#uses=1] - %l = alloca i32 ; [#uses=1] - %n = alloca i32 ; [#uses=1] - %nm1 = alloca i32 ; [#uses=1] - %tmp5 = load i32* %job_addr, align 4 ; [#uses=1] - %tmp6 = icmp eq i32 %tmp5, 0 ; [#uses=1] - %tmp67 = zext i1 %tmp6 to i8 ; [#uses=1] - %toBool = icmp ne i8 %tmp67, 0 ; [#uses=1] - br i1 %toBool, label %cond_true, label %cond_next137 - -cond_true: ; preds = %entry - %tmp732 = load i32* %nm1, align 4 ; [#uses=1] - %tmp743 = icmp slt i32 0, %tmp732 ; [#uses=1] - %tmp74754 = zext i1 %tmp743 to i8 ; [#uses=1] - %toBool765 = icmp ne i8 %tmp74754, 0 ; [#uses=1] - br i1 %toBool765, label %bb, label %bb77 - -bb: ; preds = %cond_true - %tmp9 = load %struct.FULL** %a_addr, align 4 ; <%struct.FULL*> [#uses=1] - %tmp10 = getelementptr %struct.FULL* %tmp9, i32 0, i32 2 ; <[1000 x float*]*> [#uses=1] - %tmp11 = getelementptr [1000 x float*]* %tmp10, i32 0, i32 0 ; [#uses=1] - %tmp12 = load float** %tmp11, align 4 ; [#uses=1] - %tmp13 = load i32* %k, align 4 ; [#uses=1] - %tmp14 = getelementptr float* %tmp12, i32 %tmp13 ; [#uses=1] - store float* %tmp14, float** %akk, align 4 - %tmp17 = load float** %b_addr, align 4 ; [#uses=0] - %tmp18 = load i32* %l, align 4 ; [#uses=0] - ret i32 0 - -bb77: ; preds = %cond_true - ret i32 0 - -cond_next137: ; preds = %entry - %tmp18922 = load i32* %n, align 4 ; [#uses=1] - %tmp19023 = icmp slt i32 0, %tmp18922 ; [#uses=1] - %tmp19019124 = zext i1 %tmp19023 to i8 ; [#uses=1] - %toBool19225 = icmp ne i8 %tmp19019124, 0 ; [#uses=1] - br i1 %toBool19225, label %bb138, label %bb193 - -bb138: ; preds = %cond_next137 - store float* null, float** %akk, align 4 - ret i32 0 - -bb193: ; preds = %cond_next137 - %tmp196 = load i32** %ipvt_addr, align 4 ; [#uses=0] - ret i32 0 -} Modified: llvm/trunk/test/Transforms/GVN/2008-02-13-NewPHI.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/GVN/2008-02-13-NewPHI.ll?rev=97492&r1=97491&r2=97492&view=diff ============================================================================== --- llvm/trunk/test/Transforms/GVN/2008-02-13-NewPHI.ll (original) +++ llvm/trunk/test/Transforms/GVN/2008-02-13-NewPHI.ll Mon Mar 1 14:24:50 2010 @@ -1,4 +1,4 @@ -; RUN: opt < %s -anders-aa -gvn +; RUN: opt < %s -gvn ; PR2032 define i32 @sscal(i32 %n, double %sa1, float* %sx, i32 %incx) { From dpatel at apple.com Mon Mar 1 14:33:48 2010 From: dpatel at apple.com (Devang Patel) Date: Mon, 01 Mar 2010 20:33:48 -0000 Subject: [llvm-commits] [llvm] r97493 - in /llvm/trunk/test/Transforms: GVN/2009-03-05-dbg.ll LoopIndexSplit/SplitValue-2007-08-24-dbg.ll ScalarRepl/2009-03-17-CleanUp.ll Message-ID: <20100301203348.674312A6C12C@llvm.org> Author: dpatel Date: Mon Mar 1 14:33:48 2010 New Revision: 97493 URL: http://llvm.org/viewvc/llvm-project?rev=97493&view=rev Log: Remove tests that checks @llvm.dbg.stoppoint handling. Removed: llvm/trunk/test/Transforms/GVN/2009-03-05-dbg.ll llvm/trunk/test/Transforms/LoopIndexSplit/SplitValue-2007-08-24-dbg.ll llvm/trunk/test/Transforms/ScalarRepl/2009-03-17-CleanUp.ll Removed: llvm/trunk/test/Transforms/GVN/2009-03-05-dbg.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/GVN/2009-03-05-dbg.ll?rev=97492&view=auto ============================================================================== --- llvm/trunk/test/Transforms/GVN/2009-03-05-dbg.ll (original) +++ llvm/trunk/test/Transforms/GVN/2009-03-05-dbg.ll (removed) @@ -1,66 +0,0 @@ -; RUN: opt < %s -gvn -disable-output - %llvm.dbg.compile_unit.type = type { i32, { }*, i32, i8*, i8*, i8*, i1, i1, i8*, i32 } - at llvm.dbg.compile_unit298 = external constant %llvm.dbg.compile_unit.type ; <%llvm.dbg.compile_unit.type*> [#uses=1] - -declare void @llvm.dbg.stoppoint(i32, i32, { }*) nounwind - -define i8* @__deregister_frame_info_bases(i8* %begin) { -entry: - br i1 false, label %bb17, label %bb - -bb: ; preds = %entry - br i1 false, label %bb17, label %bb6.preheader - -bb6.preheader: ; preds = %bb - br label %bb6 - -bb3: ; preds = %bb6 - br i1 false, label %bb4, label %bb6 - -bb4: ; preds = %bb3 - br label %out - -bb6: ; preds = %bb3, %bb6.preheader - br i1 false, label %bb14.loopexit, label %bb3 - -bb8: ; preds = %bb14 - br i1 false, label %bb9, label %bb11 - -bb9: ; preds = %bb8 - br i1 false, label %bb10, label %bb13 - -bb10: ; preds = %bb9 - br label %out - -bb11: ; preds = %bb8 - br i1 false, label %bb12, label %bb13 - -bb12: ; preds = %bb11 - br label %out - -bb13: ; preds = %bb11, %bb9 - br label %bb14 - -bb14.loopexit: ; preds = %bb6 - br label %bb14 - -bb14: ; preds = %bb14.loopexit, %bb13 - br i1 false, label %bb15.loopexit, label %bb8 - -out: ; preds = %bb12, %bb10, %bb4 - tail call void @llvm.dbg.stoppoint(i32 217, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit298 to { }*)) - br i1 false, label %bb15, label %bb16 - -bb15.loopexit: ; preds = %bb14 - br label %bb15 - -bb15: ; preds = %bb15.loopexit, %out - tail call void @llvm.dbg.stoppoint(i32 217, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit298 to { }*)) - unreachable - -bb16: ; preds = %out - ret i8* null - -bb17: ; preds = %bb, %entry - ret i8* null -} Removed: llvm/trunk/test/Transforms/LoopIndexSplit/SplitValue-2007-08-24-dbg.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/LoopIndexSplit/SplitValue-2007-08-24-dbg.ll?rev=97492&view=auto ============================================================================== --- llvm/trunk/test/Transforms/LoopIndexSplit/SplitValue-2007-08-24-dbg.ll (original) +++ llvm/trunk/test/Transforms/LoopIndexSplit/SplitValue-2007-08-24-dbg.ll (removed) @@ -1,71 +0,0 @@ -; Split loop. Save last value. Split value is off by one in this example. -; RUN: opt < %s -loop-index-split -disable-output -stats |& \ -; RUN: grep "loop-index-split" | count 1 - - %llvm.dbg.anchor.type = type { i32, i32 } - %llvm.dbg.compile_unit.type = type { i32, { }*, i32, i8*, i8*, i8*, i1, i1, i8* } - - at llvm.dbg.compile_units = linkonce constant %llvm.dbg.anchor.type { i32 458752, i32 17 }, section "llvm.metadata" - - at .str = internal constant [4 x i8] c"a.c\00", section "llvm.metadata" ; <[4 x i8]*> [#uses=1] - at .str1 = internal constant [6 x i8] c"/tmp/\00", section "llvm.metadata" ; <[6 x i8]*> [#uses=1] - at .str2 = internal constant [55 x i8] c"4.2.1 (Based on Apple Inc. build 5636) (LLVM build 00)\00", section "llvm.metadata" ; <[55 x i8]*> [#uses=1] - at llvm.dbg.compile_unit = internal constant %llvm.dbg.compile_unit.type { i32 458769, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.compile_units to { }*), i32 1, i8* getelementptr ([4 x i8]* @.str, i32 0, i32 0), i8* getelementptr ([6 x i8]* @.str1, i32 0, i32 0), i8* getelementptr ([55 x i8]* @.str2, i32 0, i32 0), i1 true, i1 false, i8* null }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] - -declare void @llvm.dbg.stoppoint(i32, i32, { }*) nounwind - - - at k = external global i32 ; [#uses=2] - -define void @foobar(i32 %a, i32 %b) { -entry: - br label %bb - -bb: ; preds = %cond_next16, %entry - %i.01.0 = phi i32 [ 0, %entry ], [ %tmp18, %cond_next16 ] ; [#uses=5] - %tsum.18.0 = phi i32 [ 42, %entry ], [ %tsum.013.1, %cond_next16 ] ; [#uses=3] - %tmp1 = icmp sgt i32 %i.01.0, 50 ; [#uses=1] -call void @llvm.dbg.stoppoint(i32 5, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - br i1 %tmp1, label %cond_true, label %cond_false - -cond_true: ; preds = %bb - %tmp4 = tail call i32 @foo( i32 %i.01.0 ) ; [#uses=1] - %tmp6 = add i32 %tmp4, %tsum.18.0 ; [#uses=2] - %tmp914 = load i32* @k, align 4 ; [#uses=1] - %tmp1015 = icmp eq i32 %tmp914, 0 ; [#uses=1] -call void @llvm.dbg.stoppoint(i32 5, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - br i1 %tmp1015, label %cond_next16, label %cond_true13 - -cond_false: ; preds = %bb - %tmp8 = tail call i32 @bar( i32 %i.01.0 ) ; [#uses=0] - %tmp9 = load i32* @k, align 4 ; [#uses=1] - %tmp10 = icmp eq i32 %tmp9, 0 ; [#uses=1] -call void @llvm.dbg.stoppoint(i32 5, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - br i1 %tmp10, label %cond_next16, label %cond_true13 - -cond_true13: ; preds = %cond_false, %cond_true - %tsum.013.0 = phi i32 [ %tmp6, %cond_true ], [ %tsum.18.0, %cond_false ] ; [#uses=1] - %tmp15 = tail call i32 @bar( i32 %i.01.0 ) ; [#uses=0] -call void @llvm.dbg.stoppoint(i32 5, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - br label %cond_next16 - -cond_next16: ; preds = %cond_false, %cond_true, %cond_true13 - %tsum.013.1 = phi i32 [ %tsum.013.0, %cond_true13 ], [ %tmp6, %cond_true ], [ %tsum.18.0, %cond_false ] ; [#uses=2] - %tmp18 = add i32 %i.01.0, 1 ; [#uses=3] - %tmp21 = icmp slt i32 %tmp18, 100 ; [#uses=1] -call void @llvm.dbg.stoppoint(i32 5, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - br i1 %tmp21, label %bb, label %bb24 - -bb24: ; preds = %cond_next16 - %tmp18.lcssa = phi i32 [ %tmp18, %cond_next16 ] ; [#uses=1] - %tsum.013.1.lcssa = phi i32 [ %tsum.013.1, %cond_next16 ] ; [#uses=1] - %tmp27 = tail call i32 @t( i32 %tmp18.lcssa, i32 %tsum.013.1.lcssa ) ; [#uses=0] -call void @llvm.dbg.stoppoint(i32 5, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - ret void -} - -declare i32 @foo(i32) - -declare i32 @bar(i32) - -declare i32 @t(i32, i32) Removed: llvm/trunk/test/Transforms/ScalarRepl/2009-03-17-CleanUp.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/ScalarRepl/2009-03-17-CleanUp.ll?rev=97492&view=auto ============================================================================== --- llvm/trunk/test/Transforms/ScalarRepl/2009-03-17-CleanUp.ll (original) +++ llvm/trunk/test/Transforms/ScalarRepl/2009-03-17-CleanUp.ll (removed) @@ -1,3961 +0,0 @@ -; RUN: opt < %s -scalarrepl -S | grep store | not grep undef - -; ModuleID = '' -target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32" -target triple = "i386-pc-linux-gnu" - type { } ; type %0 - type { double, double } ; type %1 - type { i32, void ()* } ; type %2 - %llvm.dbg.anchor.type = type { i32, i32 } - %llvm.dbg.basictype.type = type { i32, %0*, i8*, %0*, i32, i64, i64, i64, i32, i32 } - %llvm.dbg.compile_unit.type = type { i32, %0*, i32, i8*, i8*, i8*, i1, i1, i8*, i32 } - %llvm.dbg.composite.type = type { i32, %0*, i8*, %0*, i32, i64, i64, i64, i32, %0*, %0*, i32 } - %llvm.dbg.derivedtype.type = type { i32, %0*, i8*, %0*, i32, i64, i64, i64, i32, %0* } - %llvm.dbg.global_variable.type = type { i32, %0*, %0*, i8*, i8*, i8*, %0*, i32, %0*, i1, i1, %0* } - %llvm.dbg.subprogram.type = type { i32, %0*, %0*, i8*, i8*, i8*, %0*, i32, %0*, i1, i1 } - %llvm.dbg.subrange.type = type { i32, i64, i64 } - %llvm.dbg.variable.type = type { i32, %0*, i8*, %0*, i32, %0* } - %struct..0._50 = type { i32 } - %struct..1__pthread_mutex_s = type { i32, i32, i32, i32, i32, %struct..0._50 } - %struct.__class_type_info_pseudo = type { %struct.__type_info_pseudo } - %struct.__locale_struct = type { [13 x %struct.locale_data*], i16*, i32*, i32*, [13 x i8*] } - %struct.__pthread_slist_t = type { %struct.__pthread_slist_t* } - %struct.__si_class_type_info_pseudo = type { %struct.__type_info_pseudo, %"struct.std::type_info"* } - %struct.__type_info_pseudo = type { i8*, i8* } - %struct.locale_data = type opaque - %"struct.polynomial" = type { i32 (...)**, double*, i32 } - %"struct.polynomial >" = type { i32 (...)**, %"struct.std::complex"*, i32 } - %struct.pthread_attr_t = type { i32, [32 x i8] } - %struct.pthread_mutex_t = type { %struct..1__pthread_mutex_s } - %struct.pthread_mutexattr_t = type { i32 } - %"struct.std::allocator" = type <{ i8 }> - %"struct.std::basic_ios >" = type { %"struct.std::ios_base", %"struct.std::basic_ostream >"*, i8, i8, %"struct.std::basic_streambuf >"*, %"struct.std::ctype"*, %"struct.std::num_get > >"*, %"struct.std::num_get > >"* } - %"struct.std::basic_ostream >" = type { i32 (...)**, %"struct.std::basic_ios >" } - %"struct.std::basic_streambuf >" = type { i32 (...)**, i8*, i8*, i8*, i8*, i8*, i8*, %"struct.std::locale" } - %"struct.std::basic_string,std::allocator >::_Alloc_hider" = type { i8* } - %"struct.std::complex" = type { %1 } - %"struct.std::ctype" = type { %"struct.std::locale::facet", %struct.__locale_struct*, i8, i32*, i32*, i16*, i8, [256 x i8], [256 x i8], i8 } - %"struct.std::exception" = type { i32 (...)** } - %"struct.std::ios_base" = type { i32 (...)**, i32, i32, i32, i32, i32, %"struct.std::ios_base::_Callback_list"*, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, %"struct.std::ios_base::_Words"*, %"struct.std::locale" } - %"struct.std::ios_base::Init" = type <{ i8 }> - %"struct.std::ios_base::_Callback_list" = type { %"struct.std::ios_base::_Callback_list"*, void (i32, %"struct.std::ios_base"*, i32)*, i32, i32 } - %"struct.std::ios_base::_Words" = type { i8*, i32 } - %"struct.std::locale" = type { %"struct.std::locale::_Impl"* } - %"struct.std::locale::_Impl" = type { i32, %"struct.std::locale::facet"**, i32, %"struct.std::locale::facet"**, i8** } - %"struct.std::locale::facet" = type { i32 (...)**, i32 } - %"struct.std::num_get > >" = type { %"struct.std::locale::facet" } - %"struct.std::num_put > >" = type { %"struct.std::locale::facet" } - %"struct.std::overflow_error" = type { %"struct.std::runtime_error" } - %"struct.std::runtime_error" = type { %"struct.std::exception", %"struct.std::string" } - %"struct.std::string" = type { %"struct.std::basic_string,std::allocator >::_Alloc_hider" } - %"struct.std::type_info" = type { i32 (...)**, i8* } - at llvm.dbg.compile_units = linkonce constant %llvm.dbg.anchor.type { i32 458752, i32 17 }, section "llvm.metadata" ; <%llvm.dbg.anchor.type*> [#uses=1] - at .str = internal constant [13 x i8] c"fftbench.cpp\00", section "llvm.metadata" ; <[13 x i8]*> [#uses=1] - at .str1 = internal constant [42 x i8] c"/developer/home2/zsth/test/debug/tmp3/X3/\00", section "llvm.metadata" ; <[42 x i8]*> [#uses=1] - at .str2 = internal constant [52 x i8] c"4.2.1 (Based on Apple Inc. build 5641) (LLVM build)\00", section "llvm.metadata" ; <[52 x i8]*> [#uses=1] - at llvm.dbg.compile_unit = internal constant %llvm.dbg.compile_unit.type { i32 458769, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.compile_units to %0*), i32 4, i8* getelementptr ([13 x i8]* @.str, i32 0, i32 0), i8* getelementptr ([42 x i8]* @.str1, i32 0, i32 0), i8* getelementptr ([52 x i8]* @.str2, i32 0, i32 0), i1 true, i1 false, i8* null, i32 -1 }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] - at .str3 = internal constant [8 x i8] c"complex\00", section "llvm.metadata" ; <[8 x i8]*> [#uses=1] - at .str4 = internal constant [110 x i8] c"/developer/home2/zsth/projects/llvm.org/install/lib/gcc/i686-pc-linux-gnu/4.2.1/../../../../include/c++/4.2.1\00", section "llvm.metadata" ; <[110 x i8]*> [#uses=1] - at llvm.dbg.compile_unit5 = internal constant %llvm.dbg.compile_unit.type { i32 458769, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.compile_units to %0*), i32 4, i8* getelementptr ([8 x i8]* @.str3, i32 0, i32 0), i8* getelementptr ([110 x i8]* @.str4, i32 0, i32 0), i8* getelementptr ([52 x i8]* @.str2, i32 0, i32 0), i1 false, i1 false, i8* null, i32 -1 }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] - at .str6 = internal constant [16 x i8] c"complex\00", section "llvm.metadata" ; <[16 x i8]*> [#uses=1] - at .str7 = internal constant [15 x i8] c"complex double\00", section "llvm.metadata" ; <[15 x i8]*> [#uses=1] - at llvm.dbg.basictype = internal constant %llvm.dbg.basictype.type { i32 458788, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([15 x i8]* @.str7, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 128, i64 64, i64 0, i32 0, i32 3 }, section "llvm.metadata" ; <%llvm.dbg.basictype.type*> [#uses=1] - at .str8 = internal constant [9 x i8] c"_M_value\00", section "llvm.metadata" ; <[9 x i8]*> [#uses=1] - at llvm.dbg.derivedtype = internal constant %llvm.dbg.derivedtype.type { i32 458765, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([9 x i8]* @.str8, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*), i32 1195, i64 128, i64 64, i64 0, i32 1, %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.derivedtype9 = internal constant %llvm.dbg.derivedtype.type { i32 458767, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 32, i64 32, i64 0, i32 0, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite223 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array = internal constant [3 x %0*] [%0* null, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype9 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to %0*)], section "llvm.metadata" ; <[3 x %0*]*> [#uses=1] - at llvm.dbg.composite10 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([3 x %0*]* @llvm.dbg.array to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.subprograms = linkonce constant %llvm.dbg.anchor.type { i32 458752, i32 46 }, section "llvm.metadata" ; <%llvm.dbg.anchor.type*> [#uses=1] - at llvm.dbg.subprogram = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([8 x i8]* @.str3, i32 0, i32 0), i8* getelementptr ([8 x i8]* @.str3, i32 0, i32 0), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*), i32 1161, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite10 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str11 = internal constant [7 x i8] c"double\00", section "llvm.metadata" ; <[7 x i8]*> [#uses=1] - at llvm.dbg.basictype12 = internal constant %llvm.dbg.basictype.type { i32 458788, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([7 x i8]* @.str11, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 64, i64 64, i64 0, i32 0, i32 4 }, section "llvm.metadata" ; <%llvm.dbg.basictype.type*> [#uses=1] - at llvm.dbg.array13 = internal constant [4 x %0*] [%0* null, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype9 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype12 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype12 to %0*)], section "llvm.metadata" ; <[4 x %0*]*> [#uses=1] - at llvm.dbg.composite14 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([4 x %0*]* @llvm.dbg.array13 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.subprogram15 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([8 x i8]* @.str3, i32 0, i32 0), i8* getelementptr ([8 x i8]* @.str3, i32 0, i32 0), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*), i32 1215, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite14 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str16 = internal constant [15 x i8] c"complex\00", section "llvm.metadata" ; <[15 x i8]*> [#uses=1] - at .str18 = internal constant [14 x i8] c"complex float\00", section "llvm.metadata" ; <[14 x i8]*> [#uses=1] - at llvm.dbg.basictype19 = internal constant %llvm.dbg.basictype.type { i32 458788, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([14 x i8]* @.str18, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 64, i64 32, i64 0, i32 0, i32 3 }, section "llvm.metadata" ; <%llvm.dbg.basictype.type*> [#uses=1] - at llvm.dbg.derivedtype20 = internal constant %llvm.dbg.derivedtype.type { i32 458765, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([9 x i8]* @.str8, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*), i32 1042, i64 64, i64 32, i64 0, i32 1, %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype19 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.derivedtype21 = internal constant %llvm.dbg.derivedtype.type { i32 458767, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 32, i64 32, i64 0, i32 0, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite171 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array22 = internal constant [3 x %0*] [%0* null, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype21 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype19 to %0*)], section "llvm.metadata" ; <[3 x %0*]*> [#uses=1] - at llvm.dbg.composite23 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([3 x %0*]* @llvm.dbg.array22 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.subprogram24 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([8 x i8]* @.str3, i32 0, i32 0), i8* getelementptr ([8 x i8]* @.str3, i32 0, i32 0), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*), i32 1007, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite23 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str25 = internal constant [6 x i8] c"float\00", section "llvm.metadata" ; <[6 x i8]*> [#uses=1] - at llvm.dbg.basictype26 = internal constant %llvm.dbg.basictype.type { i32 458788, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([6 x i8]* @.str25, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 32, i64 32, i64 0, i32 0, i32 4 }, section "llvm.metadata" ; <%llvm.dbg.basictype.type*> [#uses=1] - at llvm.dbg.array27 = internal constant [4 x %0*] [%0* null, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype21 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype26 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype26 to %0*)], section "llvm.metadata" ; <[4 x %0*]*> [#uses=1] - at llvm.dbg.composite28 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([4 x %0*]* @llvm.dbg.array27 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.subprogram29 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([8 x i8]* @.str3, i32 0, i32 0), i8* getelementptr ([8 x i8]* @.str3, i32 0, i32 0), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*), i32 1062, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite28 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.derivedtype30 = internal constant %llvm.dbg.derivedtype.type { i32 458790, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 128, i64 32, i64 0, i32 0, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite223 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.derivedtype31 = internal constant %llvm.dbg.derivedtype.type { i32 458768, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 32, i64 32, i64 0, i32 0, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype30 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array32 = internal constant [3 x %0*] [%0* null, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype21 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype31 to %0*)], section "llvm.metadata" ; <[3 x %0*]*> [#uses=1] - at llvm.dbg.composite33 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([3 x %0*]* @llvm.dbg.array32 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.subprogram34 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([8 x i8]* @.str3, i32 0, i32 0), i8* getelementptr ([8 x i8]* @.str3, i32 0, i32 0), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*), i32 1464, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite33 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str35 = internal constant [21 x i8] c"complex\00", section "llvm.metadata" ; <[21 x i8]*> [#uses=1] - at .str37 = internal constant [20 x i8] c"complex long double\00", section "llvm.metadata" ; <[20 x i8]*> [#uses=1] - at llvm.dbg.basictype38 = internal constant %llvm.dbg.basictype.type { i32 458788, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([20 x i8]* @.str37, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 192, i64 32, i64 0, i32 0, i32 3 }, section "llvm.metadata" ; <%llvm.dbg.basictype.type*> [#uses=1] - at llvm.dbg.derivedtype39 = internal constant %llvm.dbg.derivedtype.type { i32 458765, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([9 x i8]* @.str8, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*), i32 1348, i64 192, i64 32, i64 0, i32 1, %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype38 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.derivedtype40 = internal constant %llvm.dbg.derivedtype.type { i32 458767, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 32, i64 32, i64 0, i32 0, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite122 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array41 = internal constant [3 x %0*] [%0* null, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype40 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype38 to %0*)], section "llvm.metadata" ; <[3 x %0*]*> [#uses=1] - at llvm.dbg.composite42 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([3 x %0*]* @llvm.dbg.array41 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.subprogram43 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([8 x i8]* @.str3, i32 0, i32 0), i8* getelementptr ([8 x i8]* @.str3, i32 0, i32 0), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*), i32 1314, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite42 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str44 = internal constant [12 x i8] c"long double\00", section "llvm.metadata" ; <[12 x i8]*> [#uses=1] - at llvm.dbg.basictype45 = internal constant %llvm.dbg.basictype.type { i32 458788, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([12 x i8]* @.str44, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 96, i64 32, i64 0, i32 0, i32 4 }, section "llvm.metadata" ; <%llvm.dbg.basictype.type*> [#uses=1] - at llvm.dbg.array46 = internal constant [4 x %0*] [%0* null, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype40 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype45 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype45 to %0*)], section "llvm.metadata" ; <[4 x %0*]*> [#uses=1] - at llvm.dbg.composite47 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([4 x %0*]* @llvm.dbg.array46 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.subprogram48 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([8 x i8]* @.str3, i32 0, i32 0), i8* getelementptr ([8 x i8]* @.str3, i32 0, i32 0), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*), i32 1352, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite47 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.derivedtype49 = internal constant %llvm.dbg.derivedtype.type { i32 458790, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 64, i64 32, i64 0, i32 0, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite171 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.derivedtype50 = internal constant %llvm.dbg.derivedtype.type { i32 458768, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 32, i64 32, i64 0, i32 0, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype49 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array51 = internal constant [3 x %0*] [%0* null, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype40 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype50 to %0*)], section "llvm.metadata" ; <[3 x %0*]*> [#uses=1] - at llvm.dbg.composite52 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([3 x %0*]* @llvm.dbg.array51 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.subprogram53 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([8 x i8]* @.str3, i32 0, i32 0), i8* getelementptr ([8 x i8]* @.str3, i32 0, i32 0), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*), i32 1480, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite52 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array54 = internal constant [3 x %0*] [%0* null, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype40 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype31 to %0*)], section "llvm.metadata" ; <[3 x %0*]*> [#uses=1] - at llvm.dbg.composite55 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([3 x %0*]* @llvm.dbg.array54 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.subprogram56 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([8 x i8]* @.str3, i32 0, i32 0), i8* getelementptr ([8 x i8]* @.str3, i32 0, i32 0), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*), i32 1484, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite55 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.derivedtype57 = internal constant %llvm.dbg.derivedtype.type { i32 458768, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 32, i64 32, i64 0, i32 0, %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype45 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array58 = internal constant [2 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype57 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype40 to %0*)], section "llvm.metadata" ; <[2 x %0*]*> [#uses=1] - at llvm.dbg.composite59 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([2 x %0*]* @llvm.dbg.array58 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str60 = internal constant [5 x i8] c"real\00", section "llvm.metadata" ; <[5 x i8]*> [#uses=1] - at .str61 = internal constant [24 x i8] c"_ZNSt7complexIeE4realEv\00", section "llvm.metadata" ; <[24 x i8]*> [#uses=1] - at llvm.dbg.subprogram62 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([5 x i8]* @.str60, i32 0, i32 0), i8* getelementptr ([5 x i8]* @.str60, i32 0, i32 0), i8* getelementptr ([24 x i8]* @.str61, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*), i32 1359, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite59 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str63 = internal constant [9 x i8] c"stddef.h\00", section "llvm.metadata" ; <[9 x i8]*> [#uses=1] - at .str64 = internal constant [88 x i8] c"/developer/home2/zsth/projects/llvm.org/install/lib/gcc/i686-pc-linux-gnu/4.2.1/include\00", section "llvm.metadata" ; <[88 x i8]*> [#uses=1] - at llvm.dbg.compile_unit65 = internal constant %llvm.dbg.compile_unit.type { i32 458769, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.compile_units to %0*), i32 4, i8* getelementptr ([9 x i8]* @.str63, i32 0, i32 0), i8* getelementptr ([88 x i8]* @.str64, i32 0, i32 0), i8* getelementptr ([52 x i8]* @.str2, i32 0, i32 0), i1 false, i1 false, i8* null, i32 -1 }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] - at .str66 = internal constant [8 x i8] c"float_t\00", section "llvm.metadata" ; <[8 x i8]*> [#uses=1] - at llvm.dbg.derivedtype67 = internal constant %llvm.dbg.derivedtype.type { i32 458774, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([8 x i8]* @.str66, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit65 to %0*), i32 214, i64 0, i64 0, i64 0, i32 0, %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype45 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str68 = internal constant [10 x i8] c"mathdef.h\00", section "llvm.metadata" ; <[10 x i8]*> [#uses=1] - at .str69 = internal constant [18 x i8] c"/usr/include/bits\00", section "llvm.metadata" ; <[18 x i8]*> [#uses=1] - at llvm.dbg.compile_unit70 = internal constant %llvm.dbg.compile_unit.type { i32 458769, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.compile_units to %0*), i32 4, i8* getelementptr ([10 x i8]* @.str68, i32 0, i32 0), i8* getelementptr ([18 x i8]* @.str69, i32 0, i32 0), i8* getelementptr ([52 x i8]* @.str2, i32 0, i32 0), i1 false, i1 false, i8* null, i32 -1 }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] - at .str71 = internal constant [9 x i8] c"double_t\00", section "llvm.metadata" ; <[9 x i8]*> [#uses=1] - at llvm.dbg.derivedtype72 = internal constant %llvm.dbg.derivedtype.type { i32 458774, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([9 x i8]* @.str71, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit70 to %0*), i32 36, i64 0, i64 0, i64 0, i32 0, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype67 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.derivedtype73 = internal constant %llvm.dbg.derivedtype.type { i32 458790, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 96, i64 32, i64 0, i32 0, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype72 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.derivedtype74 = internal constant %llvm.dbg.derivedtype.type { i32 458768, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 32, i64 32, i64 0, i32 0, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype73 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.derivedtype75 = internal constant %llvm.dbg.derivedtype.type { i32 458790, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 192, i64 32, i64 0, i32 0, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite122 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.derivedtype76 = internal constant %llvm.dbg.derivedtype.type { i32 458767, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 32, i64 32, i64 0, i32 0, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype75 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array77 = internal constant [2 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype74 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype76 to %0*)], section "llvm.metadata" ; <[2 x %0*]*> [#uses=1] - at llvm.dbg.composite78 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([2 x %0*]* @llvm.dbg.array77 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str79 = internal constant [25 x i8] c"_ZNKSt7complexIeE4realEv\00", section "llvm.metadata" ; <[25 x i8]*> [#uses=1] - at llvm.dbg.subprogram80 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([5 x i8]* @.str60, i32 0, i32 0), i8* getelementptr ([5 x i8]* @.str60, i32 0, i32 0), i8* getelementptr ([25 x i8]* @.str79, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*), i32 1363, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite78 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str81 = internal constant [5 x i8] c"imag\00", section "llvm.metadata" ; <[5 x i8]*> [#uses=1] - at .str82 = internal constant [24 x i8] c"_ZNSt7complexIeE4imagEv\00", section "llvm.metadata" ; <[24 x i8]*> [#uses=1] - at llvm.dbg.subprogram83 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([5 x i8]* @.str81, i32 0, i32 0), i8* getelementptr ([5 x i8]* @.str81, i32 0, i32 0), i8* getelementptr ([24 x i8]* @.str82, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*), i32 1367, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite59 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str84 = internal constant [25 x i8] c"_ZNKSt7complexIeE4imagEv\00", section "llvm.metadata" ; <[25 x i8]*> [#uses=1] - at llvm.dbg.subprogram85 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([5 x i8]* @.str81, i32 0, i32 0), i8* getelementptr ([5 x i8]* @.str81, i32 0, i32 0), i8* getelementptr ([25 x i8]* @.str84, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*), i32 1371, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite78 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.derivedtype86 = internal constant %llvm.dbg.derivedtype.type { i32 458768, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 32, i64 32, i64 0, i32 0, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite122 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array87 = internal constant [3 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype86 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype40 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype45 to %0*)], section "llvm.metadata" ; <[3 x %0*]*> [#uses=1] - at llvm.dbg.composite88 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([3 x %0*]* @llvm.dbg.array87 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str89 = internal constant [10 x i8] c"operator=\00", section "llvm.metadata" ; <[10 x i8]*> [#uses=1] - at .str90 = internal constant [21 x i8] c"_ZNSt7complexIeEaSEe\00", section "llvm.metadata" ; <[21 x i8]*> [#uses=1] - at llvm.dbg.subprogram91 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([10 x i8]* @.str89, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str89, i32 0, i32 0), i8* getelementptr ([21 x i8]* @.str90, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*), i32 1375, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite88 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str92 = internal constant [11 x i8] c"operator+=\00", section "llvm.metadata" ; <[11 x i8]*> [#uses=1] - at .str93 = internal constant [21 x i8] c"_ZNSt7complexIeEpLEe\00", section "llvm.metadata" ; <[21 x i8]*> [#uses=1] - at llvm.dbg.subprogram94 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([11 x i8]* @.str92, i32 0, i32 0), i8* getelementptr ([11 x i8]* @.str92, i32 0, i32 0), i8* getelementptr ([21 x i8]* @.str93, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*), i32 1383, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite88 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str95 = internal constant [11 x i8] c"operator-=\00", section "llvm.metadata" ; <[11 x i8]*> [#uses=1] - at .str96 = internal constant [21 x i8] c"_ZNSt7complexIeEmIEe\00", section "llvm.metadata" ; <[21 x i8]*> [#uses=1] - at llvm.dbg.subprogram97 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([11 x i8]* @.str95, i32 0, i32 0), i8* getelementptr ([11 x i8]* @.str95, i32 0, i32 0), i8* getelementptr ([21 x i8]* @.str96, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*), i32 1390, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite88 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str98 = internal constant [11 x i8] c"operator*=\00", section "llvm.metadata" ; <[11 x i8]*> [#uses=1] - at .str99 = internal constant [21 x i8] c"_ZNSt7complexIeEmLEe\00", section "llvm.metadata" ; <[21 x i8]*> [#uses=1] - at llvm.dbg.subprogram100 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([11 x i8]* @.str98, i32 0, i32 0), i8* getelementptr ([11 x i8]* @.str98, i32 0, i32 0), i8* getelementptr ([21 x i8]* @.str99, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*), i32 1397, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite88 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str101 = internal constant [11 x i8] c"operator/=\00", section "llvm.metadata" ; <[11 x i8]*> [#uses=1] - at .str102 = internal constant [21 x i8] c"_ZNSt7complexIeEdVEe\00", section "llvm.metadata" ; <[21 x i8]*> [#uses=1] - at llvm.dbg.subprogram103 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([11 x i8]* @.str101, i32 0, i32 0), i8* getelementptr ([11 x i8]* @.str101, i32 0, i32 0), i8* getelementptr ([21 x i8]* @.str102, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*), i32 1404, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite88 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.composite104 = internal constant %llvm.dbg.composite.type { i32 458771, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*), i32 55, i64 0, i64 0, i64 0, i32 4, %0* null, %0* null, i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.derivedtype105 = internal constant %llvm.dbg.derivedtype.type { i32 458790, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 8, i64 0, i32 0, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite104 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.derivedtype106 = internal constant %llvm.dbg.derivedtype.type { i32 458768, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 32, i64 32, i64 0, i32 0, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype105 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array107 = internal constant [3 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype86 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype40 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype106 to %0*)], section "llvm.metadata" ; <[3 x %0*]*> [#uses=1] - at llvm.dbg.composite108 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([3 x %0*]* @llvm.dbg.array107 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.subprogram109 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([10 x i8]* @.str89, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str89, i32 0, i32 0), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*), i32 1335, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite108 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.subprogram110 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([11 x i8]* @.str92, i32 0, i32 0), i8* getelementptr ([11 x i8]* @.str92, i32 0, i32 0), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*), i32 1337, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite108 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.subprogram111 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([11 x i8]* @.str95, i32 0, i32 0), i8* getelementptr ([11 x i8]* @.str95, i32 0, i32 0), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*), i32 1339, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite108 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.subprogram112 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([11 x i8]* @.str98, i32 0, i32 0), i8* getelementptr ([11 x i8]* @.str98, i32 0, i32 0), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*), i32 1341, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite108 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.subprogram113 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([11 x i8]* @.str101, i32 0, i32 0), i8* getelementptr ([11 x i8]* @.str101, i32 0, i32 0), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*), i32 1343, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite108 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.derivedtype114 = internal constant %llvm.dbg.derivedtype.type { i32 458790, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 192, i64 32, i64 0, i32 0, %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype38 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.derivedtype115 = internal constant %llvm.dbg.derivedtype.type { i32 458768, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 32, i64 32, i64 0, i32 0, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype114 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array116 = internal constant [2 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype115 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype76 to %0*)], section "llvm.metadata" ; <[2 x %0*]*> [#uses=1] - at llvm.dbg.composite117 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([2 x %0*]* @llvm.dbg.array116 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str118 = internal constant [6 x i8] c"__rep\00", section "llvm.metadata" ; <[6 x i8]*> [#uses=1] - at .str119 = internal constant [26 x i8] c"_ZNKSt7complexIeE5__repEv\00", section "llvm.metadata" ; <[26 x i8]*> [#uses=1] - at llvm.dbg.subprogram120 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([6 x i8]* @.str118, i32 0, i32 0), i8* getelementptr ([6 x i8]* @.str118, i32 0, i32 0), i8* getelementptr ([26 x i8]* @.str119, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*), i32 1345, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite117 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array121 = internal constant [20 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype39 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram43 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram48 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram53 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram56 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram62 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram80 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram83 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram85 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram91 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram94 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram97 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram100 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram103 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram109 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram110 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram111 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram112 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram113 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram120 to %0*)], section "llvm.metadata" ; <[20 x %0*]*> [#uses=1] - at llvm.dbg.composite122 = internal constant %llvm.dbg.composite.type { i32 458771, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([21 x i8]* @.str35, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*), i32 1310, i64 192, i64 32, i64 0, i32 0, %0* null, %0* bitcast ([20 x %0*]* @llvm.dbg.array121 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.derivedtype123 = internal constant %llvm.dbg.derivedtype.type { i32 458790, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 192, i64 32, i64 0, i32 0, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite122 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.derivedtype124 = internal constant %llvm.dbg.derivedtype.type { i32 458768, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 32, i64 32, i64 0, i32 0, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype123 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array125 = internal constant [3 x %0*] [%0* null, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype21 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype124 to %0*)], section "llvm.metadata" ; <[3 x %0*]*> [#uses=1] - at llvm.dbg.composite126 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([3 x %0*]* @llvm.dbg.array125 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.subprogram127 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([6 x i8]* @.str118, i32 0, i32 0), i8* getelementptr ([6 x i8]* @.str118, i32 0, i32 0), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*), i32 1468, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite126 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.derivedtype128 = internal constant %llvm.dbg.derivedtype.type { i32 458768, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 32, i64 32, i64 0, i32 0, %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype26 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array129 = internal constant [2 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype128 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype21 to %0*)], section "llvm.metadata" ; <[2 x %0*]*> [#uses=1] - at llvm.dbg.composite130 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([2 x %0*]* @llvm.dbg.array129 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str131 = internal constant [24 x i8] c"_ZNSt7complexIfE4realEv\00", section "llvm.metadata" ; <[24 x i8]*> [#uses=1] - at llvm.dbg.subprogram132 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([5 x i8]* @.str60, i32 0, i32 0), i8* getelementptr ([5 x i8]* @.str60, i32 0, i32 0), i8* getelementptr ([24 x i8]* @.str131, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*), i32 1046, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite130 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.derivedtype133 = internal constant %llvm.dbg.derivedtype.type { i32 458790, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 32, i64 32, i64 0, i32 0, %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype26 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.derivedtype134 = internal constant %llvm.dbg.derivedtype.type { i32 458768, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 32, i64 32, i64 0, i32 0, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype133 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.derivedtype135 = internal constant %llvm.dbg.derivedtype.type { i32 458767, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 32, i64 32, i64 0, i32 0, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype49 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array136 = internal constant [2 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype134 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype135 to %0*)], section "llvm.metadata" ; <[2 x %0*]*> [#uses=1] - at llvm.dbg.composite137 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([2 x %0*]* @llvm.dbg.array136 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str138 = internal constant [25 x i8] c"_ZNKSt7complexIfE4realEv\00", section "llvm.metadata" ; <[25 x i8]*> [#uses=1] - at llvm.dbg.subprogram139 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([5 x i8]* @.str60, i32 0, i32 0), i8* getelementptr ([5 x i8]* @.str60, i32 0, i32 0), i8* getelementptr ([25 x i8]* @.str138, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*), i32 1050, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite137 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str140 = internal constant [24 x i8] c"_ZNSt7complexIfE4imagEv\00", section "llvm.metadata" ; <[24 x i8]*> [#uses=1] - at llvm.dbg.subprogram141 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([5 x i8]* @.str81, i32 0, i32 0), i8* getelementptr ([5 x i8]* @.str81, i32 0, i32 0), i8* getelementptr ([24 x i8]* @.str140, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*), i32 1054, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite130 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str142 = internal constant [25 x i8] c"_ZNKSt7complexIfE4imagEv\00", section "llvm.metadata" ; <[25 x i8]*> [#uses=1] - at llvm.dbg.subprogram143 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([5 x i8]* @.str81, i32 0, i32 0), i8* getelementptr ([5 x i8]* @.str81, i32 0, i32 0), i8* getelementptr ([25 x i8]* @.str142, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*), i32 1058, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite137 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.derivedtype144 = internal constant %llvm.dbg.derivedtype.type { i32 458768, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 32, i64 32, i64 0, i32 0, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite171 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array145 = internal constant [3 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype144 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype21 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype26 to %0*)], section "llvm.metadata" ; <[3 x %0*]*> [#uses=1] - at llvm.dbg.composite146 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([3 x %0*]* @llvm.dbg.array145 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str147 = internal constant [21 x i8] c"_ZNSt7complexIfEaSEf\00", section "llvm.metadata" ; <[21 x i8]*> [#uses=1] - at llvm.dbg.subprogram148 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([10 x i8]* @.str89, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str89, i32 0, i32 0), i8* getelementptr ([21 x i8]* @.str147, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*), i32 1069, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite146 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str149 = internal constant [21 x i8] c"_ZNSt7complexIfEpLEf\00", section "llvm.metadata" ; <[21 x i8]*> [#uses=1] - at llvm.dbg.subprogram150 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([11 x i8]* @.str92, i32 0, i32 0), i8* getelementptr ([11 x i8]* @.str92, i32 0, i32 0), i8* getelementptr ([21 x i8]* @.str149, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*), i32 1077, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite146 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str151 = internal constant [21 x i8] c"_ZNSt7complexIfEmIEf\00", section "llvm.metadata" ; <[21 x i8]*> [#uses=1] - at llvm.dbg.subprogram152 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([11 x i8]* @.str95, i32 0, i32 0), i8* getelementptr ([11 x i8]* @.str95, i32 0, i32 0), i8* getelementptr ([21 x i8]* @.str151, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*), i32 1084, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite146 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str153 = internal constant [21 x i8] c"_ZNSt7complexIfEmLEf\00", section "llvm.metadata" ; <[21 x i8]*> [#uses=1] - at llvm.dbg.subprogram154 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([11 x i8]* @.str98, i32 0, i32 0), i8* getelementptr ([11 x i8]* @.str98, i32 0, i32 0), i8* getelementptr ([21 x i8]* @.str153, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*), i32 1091, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite146 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str155 = internal constant [21 x i8] c"_ZNSt7complexIfEdVEf\00", section "llvm.metadata" ; <[21 x i8]*> [#uses=1] - at llvm.dbg.subprogram156 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([11 x i8]* @.str101, i32 0, i32 0), i8* getelementptr ([11 x i8]* @.str101, i32 0, i32 0), i8* getelementptr ([21 x i8]* @.str155, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*), i32 1098, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite146 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array157 = internal constant [3 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype144 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype21 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype106 to %0*)], section "llvm.metadata" ; <[3 x %0*]*> [#uses=1] - at llvm.dbg.composite158 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([3 x %0*]* @llvm.dbg.array157 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.subprogram159 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([10 x i8]* @.str89, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str89, i32 0, i32 0), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*), i32 1029, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite158 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.subprogram160 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([11 x i8]* @.str92, i32 0, i32 0), i8* getelementptr ([11 x i8]* @.str92, i32 0, i32 0), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*), i32 1031, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite158 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.subprogram161 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([11 x i8]* @.str95, i32 0, i32 0), i8* getelementptr ([11 x i8]* @.str95, i32 0, i32 0), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*), i32 1033, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite158 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.subprogram162 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([11 x i8]* @.str98, i32 0, i32 0), i8* getelementptr ([11 x i8]* @.str98, i32 0, i32 0), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*), i32 1035, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite158 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.subprogram163 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([11 x i8]* @.str101, i32 0, i32 0), i8* getelementptr ([11 x i8]* @.str101, i32 0, i32 0), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*), i32 1037, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite158 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.derivedtype164 = internal constant %llvm.dbg.derivedtype.type { i32 458790, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 64, i64 32, i64 0, i32 0, %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype19 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.derivedtype165 = internal constant %llvm.dbg.derivedtype.type { i32 458768, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 32, i64 32, i64 0, i32 0, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype164 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array166 = internal constant [2 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype165 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype135 to %0*)], section "llvm.metadata" ; <[2 x %0*]*> [#uses=1] - at llvm.dbg.composite167 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([2 x %0*]* @llvm.dbg.array166 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str168 = internal constant [26 x i8] c"_ZNKSt7complexIfE5__repEv\00", section "llvm.metadata" ; <[26 x i8]*> [#uses=1] - at llvm.dbg.subprogram169 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([6 x i8]* @.str118, i32 0, i32 0), i8* getelementptr ([6 x i8]* @.str118, i32 0, i32 0), i8* getelementptr ([26 x i8]* @.str168, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*), i32 1039, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite167 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array170 = internal constant [20 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype20 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram24 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram29 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram34 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram127 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram132 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram139 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram141 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram143 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram148 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram150 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram152 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram154 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram156 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram159 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram160 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram161 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram162 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram163 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram169 to %0*)], section "llvm.metadata" ; <[20 x %0*]*> [#uses=1] - at llvm.dbg.composite171 = internal constant %llvm.dbg.composite.type { i32 458771, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([15 x i8]* @.str16, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*), i32 1003, i64 64, i64 32, i64 0, i32 0, %0* null, %0* bitcast ([20 x %0*]* @llvm.dbg.array170 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.derivedtype172 = internal constant %llvm.dbg.derivedtype.type { i32 458790, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 64, i64 32, i64 0, i32 0, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite171 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.derivedtype173 = internal constant %llvm.dbg.derivedtype.type { i32 458768, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 32, i64 32, i64 0, i32 0, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype172 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array174 = internal constant [3 x %0*] [%0* null, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype9 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype173 to %0*)], section "llvm.metadata" ; <[3 x %0*]*> [#uses=1] - at llvm.dbg.composite175 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([3 x %0*]* @llvm.dbg.array174 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.subprogram176 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([6 x i8]* @.str118, i32 0, i32 0), i8* getelementptr ([6 x i8]* @.str118, i32 0, i32 0), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*), i32 1472, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite175 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array177 = internal constant [3 x %0*] [%0* null, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype9 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype124 to %0*)], section "llvm.metadata" ; <[3 x %0*]*> [#uses=1] - at llvm.dbg.composite178 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([3 x %0*]* @llvm.dbg.array177 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.subprogram179 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([8 x i8]* @.str3, i32 0, i32 0), i8* getelementptr ([8 x i8]* @.str3, i32 0, i32 0), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*), i32 1476, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite178 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.derivedtype180 = internal constant %llvm.dbg.derivedtype.type { i32 458768, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 32, i64 32, i64 0, i32 0, %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype12 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array181 = internal constant [2 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype180 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype9 to %0*)], section "llvm.metadata" ; <[2 x %0*]*> [#uses=1] - at llvm.dbg.composite182 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([2 x %0*]* @llvm.dbg.array181 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str183 = internal constant [24 x i8] c"_ZNSt7complexIdE4realEv\00", section "llvm.metadata" ; <[24 x i8]*> [#uses=1] - at llvm.dbg.subprogram184 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([5 x i8]* @.str60, i32 0, i32 0), i8* getelementptr ([5 x i8]* @.str60, i32 0, i32 0), i8* getelementptr ([24 x i8]* @.str183, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*), i32 1199, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite182 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.derivedtype185 = internal constant %llvm.dbg.derivedtype.type { i32 458790, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 64, i64 64, i64 0, i32 0, %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype12 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.derivedtype186 = internal constant %llvm.dbg.derivedtype.type { i32 458768, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 32, i64 32, i64 0, i32 0, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype185 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.derivedtype187 = internal constant %llvm.dbg.derivedtype.type { i32 458767, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 32, i64 32, i64 0, i32 0, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype30 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array188 = internal constant [2 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype186 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype187 to %0*)], section "llvm.metadata" ; <[2 x %0*]*> [#uses=1] - at llvm.dbg.composite189 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([2 x %0*]* @llvm.dbg.array188 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str190 = internal constant [25 x i8] c"_ZNKSt7complexIdE4realEv\00", section "llvm.metadata" ; <[25 x i8]*> [#uses=1] - at llvm.dbg.subprogram191 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([5 x i8]* @.str60, i32 0, i32 0), i8* getelementptr ([5 x i8]* @.str60, i32 0, i32 0), i8* getelementptr ([25 x i8]* @.str190, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*), i32 1203, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite189 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str192 = internal constant [24 x i8] c"_ZNSt7complexIdE4imagEv\00", section "llvm.metadata" ; <[24 x i8]*> [#uses=1] - at llvm.dbg.subprogram193 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([5 x i8]* @.str81, i32 0, i32 0), i8* getelementptr ([5 x i8]* @.str81, i32 0, i32 0), i8* getelementptr ([24 x i8]* @.str192, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*), i32 1207, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite182 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str194 = internal constant [25 x i8] c"_ZNKSt7complexIdE4imagEv\00", section "llvm.metadata" ; <[25 x i8]*> [#uses=1] - at llvm.dbg.subprogram195 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([5 x i8]* @.str81, i32 0, i32 0), i8* getelementptr ([5 x i8]* @.str81, i32 0, i32 0), i8* getelementptr ([25 x i8]* @.str194, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*), i32 1211, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite189 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.derivedtype196 = internal constant %llvm.dbg.derivedtype.type { i32 458768, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 32, i64 32, i64 0, i32 0, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite223 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array197 = internal constant [3 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype196 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype9 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype12 to %0*)], section "llvm.metadata" ; <[3 x %0*]*> [#uses=1] - at llvm.dbg.composite198 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([3 x %0*]* @llvm.dbg.array197 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str199 = internal constant [21 x i8] c"_ZNSt7complexIdEaSEd\00", section "llvm.metadata" ; <[21 x i8]*> [#uses=1] - at llvm.dbg.subprogram200 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([10 x i8]* @.str89, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str89, i32 0, i32 0), i8* getelementptr ([21 x i8]* @.str199, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*), i32 1222, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite198 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str201 = internal constant [21 x i8] c"_ZNSt7complexIdEpLEd\00", section "llvm.metadata" ; <[21 x i8]*> [#uses=1] - at llvm.dbg.subprogram202 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([11 x i8]* @.str92, i32 0, i32 0), i8* getelementptr ([11 x i8]* @.str92, i32 0, i32 0), i8* getelementptr ([21 x i8]* @.str201, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*), i32 1230, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite198 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str203 = internal constant [21 x i8] c"_ZNSt7complexIdEmIEd\00", section "llvm.metadata" ; <[21 x i8]*> [#uses=1] - at llvm.dbg.subprogram204 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([11 x i8]* @.str95, i32 0, i32 0), i8* getelementptr ([11 x i8]* @.str95, i32 0, i32 0), i8* getelementptr ([21 x i8]* @.str203, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*), i32 1237, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite198 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str205 = internal constant [21 x i8] c"_ZNSt7complexIdEmLEd\00", section "llvm.metadata" ; <[21 x i8]*> [#uses=1] - at llvm.dbg.subprogram206 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([11 x i8]* @.str98, i32 0, i32 0), i8* getelementptr ([11 x i8]* @.str98, i32 0, i32 0), i8* getelementptr ([21 x i8]* @.str205, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*), i32 1244, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite198 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str207 = internal constant [21 x i8] c"_ZNSt7complexIdEdVEd\00", section "llvm.metadata" ; <[21 x i8]*> [#uses=1] - at llvm.dbg.subprogram208 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([11 x i8]* @.str101, i32 0, i32 0), i8* getelementptr ([11 x i8]* @.str101, i32 0, i32 0), i8* getelementptr ([21 x i8]* @.str207, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*), i32 1251, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite198 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array209 = internal constant [3 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype196 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype9 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype106 to %0*)], section "llvm.metadata" ; <[3 x %0*]*> [#uses=1] - at llvm.dbg.composite210 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([3 x %0*]* @llvm.dbg.array209 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.subprogram211 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([10 x i8]* @.str89, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str89, i32 0, i32 0), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*), i32 1182, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite210 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.subprogram212 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([11 x i8]* @.str92, i32 0, i32 0), i8* getelementptr ([11 x i8]* @.str92, i32 0, i32 0), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*), i32 1184, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite210 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.subprogram213 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([11 x i8]* @.str95, i32 0, i32 0), i8* getelementptr ([11 x i8]* @.str95, i32 0, i32 0), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*), i32 1186, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite210 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.subprogram214 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([11 x i8]* @.str98, i32 0, i32 0), i8* getelementptr ([11 x i8]* @.str98, i32 0, i32 0), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*), i32 1188, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite210 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.subprogram215 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([11 x i8]* @.str101, i32 0, i32 0), i8* getelementptr ([11 x i8]* @.str101, i32 0, i32 0), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*), i32 1190, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite210 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.derivedtype216 = internal constant %llvm.dbg.derivedtype.type { i32 458790, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 128, i64 64, i64 0, i32 0, %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.derivedtype217 = internal constant %llvm.dbg.derivedtype.type { i32 458768, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 32, i64 32, i64 0, i32 0, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype216 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array218 = internal constant [2 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype217 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype187 to %0*)], section "llvm.metadata" ; <[2 x %0*]*> [#uses=1] - at llvm.dbg.composite219 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([2 x %0*]* @llvm.dbg.array218 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str220 = internal constant [26 x i8] c"_ZNKSt7complexIdE5__repEv\00", section "llvm.metadata" ; <[26 x i8]*> [#uses=1] - at llvm.dbg.subprogram221 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([6 x i8]* @.str118, i32 0, i32 0), i8* getelementptr ([6 x i8]* @.str118, i32 0, i32 0), i8* getelementptr ([26 x i8]* @.str220, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*), i32 1192, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite219 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array222 = internal constant [20 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram15 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram176 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram179 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram184 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram191 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram193 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram195 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram200 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram202 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram204 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram206 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram208 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram211 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram212 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram213 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram214 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram215 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram221 to %0*)], section "llvm.metadata" ; <[20 x %0*]*> [#uses=1] - at llvm.dbg.composite223 = internal constant %llvm.dbg.composite.type { i32 458771, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([16 x i8]* @.str6, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*), i32 1157, i64 128, i64 32, i64 0, i32 0, %0* null, %0* bitcast ([20 x %0*]* @llvm.dbg.array222 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.derivedtype224 = internal constant %llvm.dbg.derivedtype.type { i32 458767, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 32, i64 32, i64 0, i32 0, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite223 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array225 = internal constant [3 x %0*] [%0* null, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype224 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to %0*)], section "llvm.metadata" ; <[3 x %0*]*> [#uses=1] - at llvm.dbg.composite = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([3 x %0*]* @llvm.dbg.array225 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str226 = internal constant [22 x i8] c"_ZNSt7complexIdEC1ECd\00", section "llvm.metadata" ; <[22 x i8]*> [#uses=1] - at llvm.dbg.subprogram227 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([8 x i8]* @.str3, i32 0, i32 0), i8* getelementptr ([8 x i8]* @.str3, i32 0, i32 0), i8* getelementptr ([22 x i8]* @.str226, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*), i32 1161, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite to %0*), i1 false, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str230 = internal constant [4 x i8] c"__z\00", section "llvm.metadata" ; <[4 x i8]*> [#uses=1] - at llvm.dbg.variable231 = internal constant %llvm.dbg.variable.type { i32 459009, %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram227 to %0*), i8* getelementptr ([4 x i8]* @.str230, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*), i32 1161, %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to %0*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] - at llvm.dbg.subprogram232 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([6 x i8]* @.str118, i32 0, i32 0), i8* getelementptr ([6 x i8]* @.str118, i32 0, i32 0), i8* getelementptr ([26 x i8]* @.str220, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*), i32 1192, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite219 to %0*), i1 false, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.subprogram235 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([5 x i8]* @.str60, i32 0, i32 0), i8* getelementptr ([5 x i8]* @.str60, i32 0, i32 0), i8* getelementptr ([24 x i8]* @.str183, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*), i32 1199, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite182 to %0*), i1 false, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.subprogram237 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([5 x i8]* @.str60, i32 0, i32 0), i8* getelementptr ([5 x i8]* @.str60, i32 0, i32 0), i8* getelementptr ([25 x i8]* @.str190, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*), i32 1203, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite189 to %0*), i1 false, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.subprogram239 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([5 x i8]* @.str81, i32 0, i32 0), i8* getelementptr ([5 x i8]* @.str81, i32 0, i32 0), i8* getelementptr ([25 x i8]* @.str194, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*), i32 1211, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite189 to %0*), i1 false, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str241 = internal constant [22 x i8] c"_ZNSt7complexIdEC1Edd\00", section "llvm.metadata" ; <[22 x i8]*> [#uses=1] - at llvm.dbg.subprogram242 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([8 x i8]* @.str3, i32 0, i32 0), i8* getelementptr ([8 x i8]* @.str3, i32 0, i32 0), i8* getelementptr ([22 x i8]* @.str241, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*), i32 1215, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite14 to %0*), i1 false, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str244 = internal constant [4 x i8] c"__r\00", section "llvm.metadata" ; <[4 x i8]*> [#uses=1] - at llvm.dbg.subprogram248 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([10 x i8]* @.str89, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str89, i32 0, i32 0), i8* getelementptr ([21 x i8]* @.str199, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*), i32 1222, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite198 to %0*), i1 false, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.subprogram252 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([11 x i8]* @.str101, i32 0, i32 0), i8* getelementptr ([11 x i8]* @.str101, i32 0, i32 0), i8* getelementptr ([21 x i8]* @.str207, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*), i32 1251, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite198 to %0*), i1 false, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array255 = internal constant [1 x %0*] [%0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype12 to %0*)], section "llvm.metadata" ; <[1 x %0*]*> [#uses=1] - at llvm.dbg.composite256 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([1 x %0*]* @llvm.dbg.array255 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str257 = internal constant [14 x i8] c"random_double\00", section "llvm.metadata" ; <[14 x i8]*> [#uses=1] - at llvm.dbg.subprogram258 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([14 x i8]* @.str257, i32 0, i32 0), i8* getelementptr ([14 x i8]* @.str257, i32 0, i32 0), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 55, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite256 to %0*), i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=0] - at .str259 = internal constant [7 x i8] c"result\00", section "llvm.metadata" ; <[7 x i8]*> [#uses=1] - at _ZZL13random_doublevE4seed = internal global i32 1325 ; [#uses=14] - at .str266 = internal constant [19 x i8] c"polynomial\00", section "llvm.metadata" ; <[19 x i8]*> [#uses=1] - at .str268 = internal constant [4 x i8] c"int\00", section "llvm.metadata" ; <[4 x i8]*> [#uses=1] - at llvm.dbg.basictype269 = internal constant %llvm.dbg.basictype.type { i32 458788, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([4 x i8]* @.str268, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 32, i64 32, i64 0, i32 0, i32 5 }, section "llvm.metadata" ; <%llvm.dbg.basictype.type*> [#uses=1] - at llvm.dbg.array270 = internal constant [1 x %0*] [%0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype269 to %0*)], section "llvm.metadata" ; <[1 x %0*]*> [#uses=1] - at llvm.dbg.composite271 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([1 x %0*]* @llvm.dbg.array270 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.derivedtype272 = internal constant %llvm.dbg.derivedtype.type { i32 458767, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 32, i64 32, i64 0, i32 0, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite271 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.derivedtype273 = internal constant %llvm.dbg.derivedtype.type { i32 458767, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 32, i64 32, i64 0, i32 0, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype272 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str274 = internal constant [17 x i8] c"_vptr.polynomial\00", section "llvm.metadata" ; <[17 x i8]*> [#uses=1] - at llvm.dbg.derivedtype275 = internal constant %llvm.dbg.derivedtype.type { i32 458765, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([17 x i8]* @.str274, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 84, i64 32, i64 32, i64 0, i32 0, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype273 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.derivedtype276 = internal constant %llvm.dbg.derivedtype.type { i32 458767, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 32, i64 32, i64 0, i32 0, %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype12 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str277 = internal constant [8 x i8] c"m_coeff\00", section "llvm.metadata" ; <[8 x i8]*> [#uses=1] - at llvm.dbg.derivedtype278 = internal constant %llvm.dbg.derivedtype.type { i32 458765, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([8 x i8]* @.str277, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 164, i64 32, i64 32, i64 32, i32 2, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype276 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str279 = internal constant [13 x i8] c"unsigned int\00", section "llvm.metadata" ; <[13 x i8]*> [#uses=1] - at llvm.dbg.basictype280 = internal constant %llvm.dbg.basictype.type { i32 458788, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([13 x i8]* @.str279, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 32, i64 32, i64 0, i32 0, i32 7 }, section "llvm.metadata" ; <%llvm.dbg.basictype.type*> [#uses=1] - at .str281 = internal constant [7 x i8] c"size_t\00", section "llvm.metadata" ; <[7 x i8]*> [#uses=1] - at llvm.dbg.derivedtype282 = internal constant %llvm.dbg.derivedtype.type { i32 458774, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([7 x i8]* @.str281, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit65 to %0*), i32 152, i64 0, i64 0, i64 0, i32 0, %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype280 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str283 = internal constant [9 x i8] c"m_degree\00", section "llvm.metadata" ; <[9 x i8]*> [#uses=1] - at llvm.dbg.derivedtype284 = internal constant %llvm.dbg.derivedtype.type { i32 458765, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([9 x i8]* @.str283, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 167, i64 32, i64 32, i64 64, i32 2, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype282 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.derivedtype285 = internal constant %llvm.dbg.derivedtype.type { i32 458767, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 32, i64 32, i64 0, i32 0, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite518 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array286 = internal constant [3 x %0*] [%0* null, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype285 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype280 to %0*)], section "llvm.metadata" ; <[3 x %0*]*> [#uses=1] - at llvm.dbg.composite287 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([3 x %0*]* @llvm.dbg.array286 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str288 = internal constant [11 x i8] c"polynomial\00", section "llvm.metadata" ; <[11 x i8]*> [#uses=1] - at llvm.dbg.subprogram289 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([11 x i8]* @.str288, i32 0, i32 0), i8* getelementptr ([11 x i8]* @.str288, i32 0, i32 0), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 211, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite287 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.derivedtype290 = internal constant %llvm.dbg.derivedtype.type { i32 458767, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 32, i64 32, i64 0, i32 0, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype185 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array291 = internal constant [4 x %0*] [%0* null, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype285 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype280 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype290 to %0*)], section "llvm.metadata" ; <[4 x %0*]*> [#uses=1] - at llvm.dbg.composite292 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([4 x %0*]* @llvm.dbg.array291 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.subprogram293 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([11 x i8]* @.str288, i32 0, i32 0), i8* getelementptr ([11 x i8]* @.str288, i32 0, i32 0), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 220, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite292 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array294 = internal constant [4 x %0*] [%0* null, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype285 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype280 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype186 to %0*)], section "llvm.metadata" ; <[4 x %0*]*> [#uses=1] - at llvm.dbg.composite295 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([4 x %0*]* @llvm.dbg.array294 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.subprogram296 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([11 x i8]* @.str288, i32 0, i32 0), i8* getelementptr ([11 x i8]* @.str288, i32 0, i32 0), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 232, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite295 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.derivedtype297 = internal constant %llvm.dbg.derivedtype.type { i32 458790, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 96, i64 32, i64 0, i32 0, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite518 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.derivedtype298 = internal constant %llvm.dbg.derivedtype.type { i32 458768, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 32, i64 32, i64 0, i32 0, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype297 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array299 = internal constant [3 x %0*] [%0* null, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype285 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype298 to %0*)], section "llvm.metadata" ; <[3 x %0*]*> [#uses=1] - at llvm.dbg.composite300 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([3 x %0*]* @llvm.dbg.array299 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.subprogram301 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([11 x i8]* @.str288, i32 0, i32 0), i8* getelementptr ([11 x i8]* @.str288, i32 0, i32 0), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 242, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite300 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array302 = internal constant [3 x %0*] [%0* null, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype285 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype269 to %0*)], section "llvm.metadata" ; <[3 x %0*]*> [#uses=1] - at llvm.dbg.composite303 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([3 x %0*]* @llvm.dbg.array302 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str304 = internal constant [12 x i8] c"~polynomial\00", section "llvm.metadata" ; <[12 x i8]*> [#uses=1] - at llvm.dbg.subprogram305 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([12 x i8]* @.str304, i32 0, i32 0), i8* getelementptr ([12 x i8]* @.str304, i32 0, i32 0), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 252, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite303 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.derivedtype306 = internal constant %llvm.dbg.derivedtype.type { i32 458768, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 32, i64 32, i64 0, i32 0, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite518 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array307 = internal constant [3 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype306 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype285 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype298 to %0*)], section "llvm.metadata" ; <[3 x %0*]*> [#uses=1] - at llvm.dbg.composite308 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([3 x %0*]* @llvm.dbg.array307 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str309 = internal constant [27 x i8] c"_ZN10polynomialIdEaSERKS0_\00", section "llvm.metadata" ; <[27 x i8]*> [#uses=1] - at llvm.dbg.subprogram310 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([10 x i8]* @.str89, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str89, i32 0, i32 0), i8* getelementptr ([27 x i8]* @.str309, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 259, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite308 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array311 = internal constant [3 x %0*] [%0* null, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype285 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype186 to %0*)], section "llvm.metadata" ; <[3 x %0*]*> [#uses=1] - at llvm.dbg.composite312 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([3 x %0*]* @llvm.dbg.array311 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str313 = internal constant [11 x i8] c"initialize\00", section "llvm.metadata" ; <[11 x i8]*> [#uses=1] - at .str314 = internal constant [35 x i8] c"_ZN10polynomialIdE10initializeERKd\00", section "llvm.metadata" ; <[35 x i8]*> [#uses=1] - at llvm.dbg.subprogram315 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([11 x i8]* @.str313, i32 0, i32 0), i8* getelementptr ([11 x i8]* @.str313, i32 0, i32 0), i8* getelementptr ([35 x i8]* @.str314, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 203, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite312 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array316 = internal constant [3 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype306 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype285 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype280 to %0*)], section "llvm.metadata" ; <[3 x %0*]*> [#uses=1] - at llvm.dbg.composite317 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([3 x %0*]* @llvm.dbg.array316 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str318 = internal constant [8 x i8] c"stretch\00", section "llvm.metadata" ; <[8 x i8]*> [#uses=1] - at .str319 = internal constant [29 x i8] c"_ZN10polynomialIdE7stretchEj\00", section "llvm.metadata" ; <[29 x i8]*> [#uses=1] - at llvm.dbg.subprogram320 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([8 x i8]* @.str318, i32 0, i32 0), i8* getelementptr ([8 x i8]* @.str318, i32 0, i32 0), i8* getelementptr ([29 x i8]* @.str319, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 276, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite317 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.derivedtype321 = internal constant %llvm.dbg.derivedtype.type { i32 458767, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 32, i64 32, i64 0, i32 0, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype297 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array322 = internal constant [2 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype282 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype321 to %0*)], section "llvm.metadata" ; <[2 x %0*]*> [#uses=1] - at llvm.dbg.composite323 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([2 x %0*]* @llvm.dbg.array322 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str324 = internal constant [7 x i8] c"degree\00", section "llvm.metadata" ; <[7 x i8]*> [#uses=1] - at .str325 = internal constant [29 x i8] c"_ZNK10polynomialIdE6degreeEv\00", section "llvm.metadata" ; <[29 x i8]*> [#uses=1] - at llvm.dbg.subprogram326 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([7 x i8]* @.str324, i32 0, i32 0), i8* getelementptr ([7 x i8]* @.str324, i32 0, i32 0), i8* getelementptr ([29 x i8]* @.str325, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 111, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite323 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array327 = internal constant [3 x %0*] [%0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype12 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype321 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype280 to %0*)], section "llvm.metadata" ; <[3 x %0*]*> [#uses=1] - at llvm.dbg.composite328 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([3 x %0*]* @llvm.dbg.array327 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str329 = internal constant [4 x i8] c"get\00", section "llvm.metadata" ; <[4 x i8]*> [#uses=1] - at .str330 = internal constant [26 x i8] c"_ZNK10polynomialIdE3getEj\00", section "llvm.metadata" ; <[26 x i8]*> [#uses=1] - at llvm.dbg.subprogram331 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([4 x i8]* @.str329, i32 0, i32 0), i8* getelementptr ([4 x i8]* @.str329, i32 0, i32 0), i8* getelementptr ([26 x i8]* @.str330, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 300, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite328 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array332 = internal constant [3 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype180 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype285 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype280 to %0*)], section "llvm.metadata" ; <[3 x %0*]*> [#uses=1] - at llvm.dbg.composite333 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([3 x %0*]* @llvm.dbg.array332 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str334 = internal constant [11 x i8] c"operator[]\00", section "llvm.metadata" ; <[11 x i8]*> [#uses=1] - at .str335 = internal constant [23 x i8] c"_ZN10polynomialIdEixEj\00", section "llvm.metadata" ; <[23 x i8]*> [#uses=1] - at llvm.dbg.subprogram336 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([11 x i8]* @.str334, i32 0, i32 0), i8* getelementptr ([11 x i8]* @.str334, i32 0, i32 0), i8* getelementptr ([23 x i8]* @.str335, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 306, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite333 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array337 = internal constant [3 x %0*] [%0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype12 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype321 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype186 to %0*)], section "llvm.metadata" ; <[3 x %0*]*> [#uses=1] - at llvm.dbg.composite338 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([3 x %0*]* @llvm.dbg.array337 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str339 = internal constant [11 x i8] c"operator()\00", section "llvm.metadata" ; <[11 x i8]*> [#uses=1] - at .str340 = internal constant [26 x i8] c"_ZNK10polynomialIdEclERKd\00", section "llvm.metadata" ; <[26 x i8]*> [#uses=1] - at llvm.dbg.subprogram341 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([11 x i8]* @.str339, i32 0, i32 0), i8* getelementptr ([11 x i8]* @.str339, i32 0, i32 0), i8* getelementptr ([26 x i8]* @.str340, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 313, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite338 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array342 = internal constant [2 x %0*] [%0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite518 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype321 to %0*)], section "llvm.metadata" ; <[2 x %0*]*> [#uses=1] - at llvm.dbg.composite343 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([2 x %0*]* @llvm.dbg.array342 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str344 = internal constant [10 x i8] c"operator-\00", section "llvm.metadata" ; <[10 x i8]*> [#uses=1] - at .str345 = internal constant [24 x i8] c"_ZNK10polynomialIdEngEv\00", section "llvm.metadata" ; <[24 x i8]*> [#uses=1] - at llvm.dbg.subprogram346 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([10 x i8]* @.str344, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str344, i32 0, i32 0), i8* getelementptr ([24 x i8]* @.str345, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 335, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite343 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str347 = internal constant [10 x i8] c"operator+\00", section "llvm.metadata" ; <[10 x i8]*> [#uses=1] - at .str348 = internal constant [24 x i8] c"_ZNK10polynomialIdEpsEv\00", section "llvm.metadata" ; <[24 x i8]*> [#uses=1] - at llvm.dbg.subprogram349 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([10 x i8]* @.str347, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str347, i32 0, i32 0), i8* getelementptr ([24 x i8]* @.str348, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 346, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite343 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array350 = internal constant [3 x %0*] [%0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite518 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype321 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype298 to %0*)], section "llvm.metadata" ; <[3 x %0*]*> [#uses=1] - at llvm.dbg.composite351 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([3 x %0*]* @llvm.dbg.array350 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str352 = internal constant [28 x i8] c"_ZNK10polynomialIdEplERKS0_\00", section "llvm.metadata" ; <[28 x i8]*> [#uses=1] - at llvm.dbg.subprogram353 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([10 x i8]* @.str347, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str347, i32 0, i32 0), i8* getelementptr ([28 x i8]* @.str352, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 353, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite351 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str354 = internal constant [28 x i8] c"_ZNK10polynomialIdEmiERKS0_\00", section "llvm.metadata" ; <[28 x i8]*> [#uses=1] - at llvm.dbg.subprogram355 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([10 x i8]* @.str344, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str344, i32 0, i32 0), i8* getelementptr ([28 x i8]* @.str354, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 376, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite351 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array356 = internal constant [2 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype282 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype280 to %0*)], section "llvm.metadata" ; <[2 x %0*]*> [#uses=1] - at llvm.dbg.composite357 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([2 x %0*]* @llvm.dbg.array356 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str358 = internal constant [5 x i8] c"log2\00", section "llvm.metadata" ; <[5 x i8]*> [#uses=1] - at .str359 = internal constant [26 x i8] c"_ZN10polynomialIdE4log2Ej\00", section "llvm.metadata" ; <[26 x i8]*> [#uses=1] - at llvm.dbg.subprogram360 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([5 x i8]* @.str358, i32 0, i32 0), i8* getelementptr ([5 x i8]* @.str358, i32 0, i32 0), i8* getelementptr ([26 x i8]* @.str359, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 404, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite357 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array361 = internal constant [3 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype282 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype280 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype280 to %0*)], section "llvm.metadata" ; <[3 x %0*]*> [#uses=1] - at llvm.dbg.composite362 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([3 x %0*]* @llvm.dbg.array361 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str363 = internal constant [10 x i8] c"flip_bits\00", section "llvm.metadata" ; <[10 x i8]*> [#uses=1] - at .str364 = internal constant [32 x i8] c"_ZN10polynomialIdE9flip_bitsEjj\00", section "llvm.metadata" ; <[32 x i8]*> [#uses=1] - at llvm.dbg.subprogram365 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([10 x i8]* @.str363, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str363, i32 0, i32 0), i8* getelementptr ([32 x i8]* @.str364, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 423, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite362 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array366 = internal constant [2 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype282 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype285 to %0*)], section "llvm.metadata" ; <[2 x %0*]*> [#uses=1] - at llvm.dbg.composite367 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([2 x %0*]* @llvm.dbg.array366 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str368 = internal constant [12 x i8] c"stretch_fft\00", section "llvm.metadata" ; <[12 x i8]*> [#uses=1] - at .str369 = internal constant [34 x i8] c"_ZN10polynomialIdE11stretch_fftEv\00", section "llvm.metadata" ; <[34 x i8]*> [#uses=1] - at llvm.dbg.subprogram370 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([12 x i8]* @.str368, i32 0, i32 0), i8* getelementptr ([12 x i8]* @.str368, i32 0, i32 0), i8* getelementptr ([34 x i8]* @.str369, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 443, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite367 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str371 = internal constant [34 x i8] c"polynomial >\00", section "llvm.metadata" ; <[34 x i8]*> [#uses=1] - at llvm.dbg.derivedtype373 = internal constant %llvm.dbg.derivedtype.type { i32 458765, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([17 x i8]* @.str274, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 84, i64 32, i64 32, i64 0, i32 0, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype273 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.derivedtype374 = internal constant %llvm.dbg.derivedtype.type { i32 458765, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([8 x i8]* @.str277, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 164, i64 32, i64 32, i64 32, i32 2, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype224 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.derivedtype375 = internal constant %llvm.dbg.derivedtype.type { i32 458765, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([9 x i8]* @.str283, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 167, i64 32, i64 32, i64 64, i32 2, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype282 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.derivedtype376 = internal constant %llvm.dbg.derivedtype.type { i32 458767, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 32, i64 32, i64 0, i32 0, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite486 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array377 = internal constant [3 x %0*] [%0* null, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype376 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype280 to %0*)], section "llvm.metadata" ; <[3 x %0*]*> [#uses=1] - at llvm.dbg.composite378 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([3 x %0*]* @llvm.dbg.array377 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.subprogram379 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([11 x i8]* @.str288, i32 0, i32 0), i8* getelementptr ([11 x i8]* @.str288, i32 0, i32 0), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 211, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite378 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array380 = internal constant [4 x %0*] [%0* null, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype376 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype280 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype187 to %0*)], section "llvm.metadata" ; <[4 x %0*]*> [#uses=1] - at llvm.dbg.composite381 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([4 x %0*]* @llvm.dbg.array380 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.subprogram382 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([11 x i8]* @.str288, i32 0, i32 0), i8* getelementptr ([11 x i8]* @.str288, i32 0, i32 0), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 220, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite381 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array383 = internal constant [4 x %0*] [%0* null, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype376 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype280 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype31 to %0*)], section "llvm.metadata" ; <[4 x %0*]*> [#uses=1] - at llvm.dbg.composite384 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([4 x %0*]* @llvm.dbg.array383 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.subprogram385 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([11 x i8]* @.str288, i32 0, i32 0), i8* getelementptr ([11 x i8]* @.str288, i32 0, i32 0), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 232, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite384 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.derivedtype386 = internal constant %llvm.dbg.derivedtype.type { i32 458790, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 96, i64 32, i64 0, i32 0, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite486 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.derivedtype387 = internal constant %llvm.dbg.derivedtype.type { i32 458768, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 32, i64 32, i64 0, i32 0, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype386 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array388 = internal constant [3 x %0*] [%0* null, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype376 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype387 to %0*)], section "llvm.metadata" ; <[3 x %0*]*> [#uses=1] - at llvm.dbg.composite389 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([3 x %0*]* @llvm.dbg.array388 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.subprogram390 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([11 x i8]* @.str288, i32 0, i32 0), i8* getelementptr ([11 x i8]* @.str288, i32 0, i32 0), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 242, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite389 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array391 = internal constant [3 x %0*] [%0* null, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype376 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype269 to %0*)], section "llvm.metadata" ; <[3 x %0*]*> [#uses=1] - at llvm.dbg.composite392 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([3 x %0*]* @llvm.dbg.array391 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.subprogram393 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([12 x i8]* @.str304, i32 0, i32 0), i8* getelementptr ([12 x i8]* @.str304, i32 0, i32 0), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 252, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite392 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.derivedtype394 = internal constant %llvm.dbg.derivedtype.type { i32 458768, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 32, i64 32, i64 0, i32 0, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite486 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array395 = internal constant [3 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype394 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype376 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype387 to %0*)], section "llvm.metadata" ; <[3 x %0*]*> [#uses=1] - at llvm.dbg.composite396 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([3 x %0*]* @llvm.dbg.array395 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str397 = internal constant [39 x i8] c"_ZN10polynomialISt7complexIdEEaSERKS2_\00", section "llvm.metadata" ; <[39 x i8]*> [#uses=1] - at llvm.dbg.subprogram398 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([10 x i8]* @.str89, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str89, i32 0, i32 0), i8* getelementptr ([39 x i8]* @.str397, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 259, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite396 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array399 = internal constant [3 x %0*] [%0* null, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype376 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype31 to %0*)], section "llvm.metadata" ; <[3 x %0*]*> [#uses=1] - at llvm.dbg.composite400 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([3 x %0*]* @llvm.dbg.array399 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str401 = internal constant [49 x i8] c"_ZN10polynomialISt7complexIdEE10initializeERKS1_\00", section "llvm.metadata" ; <[49 x i8]*> [#uses=1] - at llvm.dbg.subprogram402 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([11 x i8]* @.str313, i32 0, i32 0), i8* getelementptr ([11 x i8]* @.str313, i32 0, i32 0), i8* getelementptr ([49 x i8]* @.str401, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 203, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite400 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array403 = internal constant [3 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype394 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype376 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype280 to %0*)], section "llvm.metadata" ; <[3 x %0*]*> [#uses=1] - at llvm.dbg.composite404 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([3 x %0*]* @llvm.dbg.array403 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str405 = internal constant [41 x i8] c"_ZN10polynomialISt7complexIdEE7stretchEj\00", section "llvm.metadata" ; <[41 x i8]*> [#uses=1] - at llvm.dbg.subprogram406 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([8 x i8]* @.str318, i32 0, i32 0), i8* getelementptr ([8 x i8]* @.str318, i32 0, i32 0), i8* getelementptr ([41 x i8]* @.str405, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 276, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite404 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.derivedtype407 = internal constant %llvm.dbg.derivedtype.type { i32 458767, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 32, i64 32, i64 0, i32 0, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype386 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array408 = internal constant [2 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype282 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype407 to %0*)], section "llvm.metadata" ; <[2 x %0*]*> [#uses=1] - at llvm.dbg.composite409 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([2 x %0*]* @llvm.dbg.array408 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str410 = internal constant [41 x i8] c"_ZNK10polynomialISt7complexIdEE6degreeEv\00", section "llvm.metadata" ; <[41 x i8]*> [#uses=1] - at llvm.dbg.subprogram411 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([7 x i8]* @.str324, i32 0, i32 0), i8* getelementptr ([7 x i8]* @.str324, i32 0, i32 0), i8* getelementptr ([41 x i8]* @.str410, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 111, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite409 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array412 = internal constant [3 x %0*] [%0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite223 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype407 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype280 to %0*)], section "llvm.metadata" ; <[3 x %0*]*> [#uses=1] - at llvm.dbg.composite413 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([3 x %0*]* @llvm.dbg.array412 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str414 = internal constant [38 x i8] c"_ZNK10polynomialISt7complexIdEE3getEj\00", section "llvm.metadata" ; <[38 x i8]*> [#uses=1] - at llvm.dbg.subprogram415 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([4 x i8]* @.str329, i32 0, i32 0), i8* getelementptr ([4 x i8]* @.str329, i32 0, i32 0), i8* getelementptr ([38 x i8]* @.str414, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 300, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite413 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array416 = internal constant [3 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype196 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype376 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype280 to %0*)], section "llvm.metadata" ; <[3 x %0*]*> [#uses=1] - at llvm.dbg.composite417 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([3 x %0*]* @llvm.dbg.array416 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str418 = internal constant [35 x i8] c"_ZN10polynomialISt7complexIdEEixEj\00", section "llvm.metadata" ; <[35 x i8]*> [#uses=1] - at llvm.dbg.subprogram419 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([11 x i8]* @.str334, i32 0, i32 0), i8* getelementptr ([11 x i8]* @.str334, i32 0, i32 0), i8* getelementptr ([35 x i8]* @.str418, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 306, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite417 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array420 = internal constant [3 x %0*] [%0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite223 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype407 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype31 to %0*)], section "llvm.metadata" ; <[3 x %0*]*> [#uses=1] - at llvm.dbg.composite421 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([3 x %0*]* @llvm.dbg.array420 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str422 = internal constant [40 x i8] c"_ZNK10polynomialISt7complexIdEEclERKS1_\00", section "llvm.metadata" ; <[40 x i8]*> [#uses=1] - at llvm.dbg.subprogram423 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([11 x i8]* @.str339, i32 0, i32 0), i8* getelementptr ([11 x i8]* @.str339, i32 0, i32 0), i8* getelementptr ([40 x i8]* @.str422, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 313, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite421 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array424 = internal constant [2 x %0*] [%0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite486 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype407 to %0*)], section "llvm.metadata" ; <[2 x %0*]*> [#uses=1] - at llvm.dbg.composite425 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([2 x %0*]* @llvm.dbg.array424 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str426 = internal constant [36 x i8] c"_ZNK10polynomialISt7complexIdEEngEv\00", section "llvm.metadata" ; <[36 x i8]*> [#uses=1] - at llvm.dbg.subprogram427 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([10 x i8]* @.str344, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str344, i32 0, i32 0), i8* getelementptr ([36 x i8]* @.str426, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 335, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite425 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str428 = internal constant [36 x i8] c"_ZNK10polynomialISt7complexIdEEpsEv\00", section "llvm.metadata" ; <[36 x i8]*> [#uses=1] - at llvm.dbg.subprogram429 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([10 x i8]* @.str347, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str347, i32 0, i32 0), i8* getelementptr ([36 x i8]* @.str428, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 346, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite425 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array430 = internal constant [3 x %0*] [%0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite486 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype407 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype387 to %0*)], section "llvm.metadata" ; <[3 x %0*]*> [#uses=1] - at llvm.dbg.composite431 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([3 x %0*]* @llvm.dbg.array430 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str432 = internal constant [40 x i8] c"_ZNK10polynomialISt7complexIdEEplERKS2_\00", section "llvm.metadata" ; <[40 x i8]*> [#uses=1] - at llvm.dbg.subprogram433 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([10 x i8]* @.str347, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str347, i32 0, i32 0), i8* getelementptr ([40 x i8]* @.str432, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 353, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite431 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str434 = internal constant [40 x i8] c"_ZNK10polynomialISt7complexIdEEmiERKS2_\00", section "llvm.metadata" ; <[40 x i8]*> [#uses=1] - at llvm.dbg.subprogram435 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([10 x i8]* @.str344, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str344, i32 0, i32 0), i8* getelementptr ([40 x i8]* @.str434, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 376, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite431 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str436 = internal constant [38 x i8] c"_ZN10polynomialISt7complexIdEE4log2Ej\00", section "llvm.metadata" ; <[38 x i8]*> [#uses=1] - at llvm.dbg.subprogram437 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([5 x i8]* @.str358, i32 0, i32 0), i8* getelementptr ([5 x i8]* @.str358, i32 0, i32 0), i8* getelementptr ([38 x i8]* @.str436, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 404, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite357 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str438 = internal constant [44 x i8] c"_ZN10polynomialISt7complexIdEE9flip_bitsEjj\00", section "llvm.metadata" ; <[44 x i8]*> [#uses=1] - at llvm.dbg.subprogram439 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([10 x i8]* @.str363, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str363, i32 0, i32 0), i8* getelementptr ([44 x i8]* @.str438, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 423, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite362 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array440 = internal constant [2 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype282 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype376 to %0*)], section "llvm.metadata" ; <[2 x %0*]*> [#uses=1] - at llvm.dbg.composite441 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([2 x %0*]* @llvm.dbg.array440 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str442 = internal constant [46 x i8] c"_ZN10polynomialISt7complexIdEE11stretch_fftEv\00", section "llvm.metadata" ; <[46 x i8]*> [#uses=1] - at llvm.dbg.subprogram443 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([12 x i8]* @.str368, i32 0, i32 0), i8* getelementptr ([12 x i8]* @.str368, i32 0, i32 0), i8* getelementptr ([46 x i8]* @.str442, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 443, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite441 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str444 = internal constant [49 x i8] c"polynomial > >\00", section "llvm.metadata" ; <[49 x i8]*> [#uses=1] - at llvm.dbg.composite445 = internal constant %llvm.dbg.composite.type { i32 458771, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([49 x i8]* @.str444, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 84, i64 0, i64 0, i64 0, i32 4, %0* null, %0* null, i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.array446 = internal constant [2 x %0*] [%0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite445 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype387 to %0*)], section "llvm.metadata" ; <[2 x %0*]*> [#uses=1] - at llvm.dbg.composite447 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([2 x %0*]* @llvm.dbg.array446 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str448 = internal constant [12 x i8] c"bit_reverse\00", section "llvm.metadata" ; <[12 x i8]*> [#uses=1] - at .str449 = internal constant [50 x i8] c"_ZN10polynomialISt7complexIdEE11bit_reverseERKS2_\00", section "llvm.metadata" ; <[50 x i8]*> [#uses=1] - at llvm.dbg.subprogram450 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([12 x i8]* @.str448, i32 0, i32 0), i8* getelementptr ([12 x i8]* @.str448, i32 0, i32 0), i8* getelementptr ([50 x i8]* @.str449, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 469, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite447 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.derivedtype451 = internal constant %llvm.dbg.derivedtype.type { i32 458790, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 8, i64 0, i32 0, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite445 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.derivedtype452 = internal constant %llvm.dbg.derivedtype.type { i32 458768, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 32, i64 32, i64 0, i32 0, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype451 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array453 = internal constant [2 x %0*] [%0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite445 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype452 to %0*)], section "llvm.metadata" ; <[2 x %0*]*> [#uses=1] - at llvm.dbg.composite454 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([2 x %0*]* @llvm.dbg.array453 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str455 = internal constant [59 x i8] c"_ZN10polynomialISt7complexIdEE11bit_reverseERKS_IS0_IS1_EE\00", section "llvm.metadata" ; <[59 x i8]*> [#uses=1] - at llvm.dbg.subprogram456 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([12 x i8]* @.str448, i32 0, i32 0), i8* getelementptr ([12 x i8]* @.str448, i32 0, i32 0), i8* getelementptr ([59 x i8]* @.str455, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 483, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite454 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str457 = internal constant [4 x i8] c"fft\00", section "llvm.metadata" ; <[4 x i8]*> [#uses=1] - at .str458 = internal constant [41 x i8] c"_ZN10polynomialISt7complexIdEE3fftERKS2_\00", section "llvm.metadata" ; <[41 x i8]*> [#uses=1] - at llvm.dbg.subprogram459 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([4 x i8]* @.str457, i32 0, i32 0), i8* getelementptr ([4 x i8]* @.str457, i32 0, i32 0), i8* getelementptr ([41 x i8]* @.str458, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 497, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite447 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str460 = internal constant [12 x i8] c"inverse_fft\00", section "llvm.metadata" ; <[12 x i8]*> [#uses=1] - at .str461 = internal constant [59 x i8] c"_ZN10polynomialISt7complexIdEE11inverse_fftERKS_IS0_IS1_EE\00", section "llvm.metadata" ; <[59 x i8]*> [#uses=1] - at llvm.dbg.subprogram462 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([12 x i8]* @.str460, i32 0, i32 0), i8* getelementptr ([12 x i8]* @.str460, i32 0, i32 0), i8* getelementptr ([59 x i8]* @.str461, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 535, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite454 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str463 = internal constant [10 x i8] c"operator*\00", section "llvm.metadata" ; <[10 x i8]*> [#uses=1] - at .str464 = internal constant [40 x i8] c"_ZNK10polynomialISt7complexIdEEmlERKS2_\00", section "llvm.metadata" ; <[40 x i8]*> [#uses=1] - at llvm.dbg.subprogram465 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([10 x i8]* @.str463, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str463, i32 0, i32 0), i8* getelementptr ([40 x i8]* @.str464, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 576, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite431 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str466 = internal constant [39 x i8] c"_ZN10polynomialISt7complexIdEEpLERKS2_\00", section "llvm.metadata" ; <[39 x i8]*> [#uses=1] - at llvm.dbg.subprogram467 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([11 x i8]* @.str92, i32 0, i32 0), i8* getelementptr ([11 x i8]* @.str92, i32 0, i32 0), i8* getelementptr ([39 x i8]* @.str466, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 625, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite396 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str468 = internal constant [39 x i8] c"_ZN10polynomialISt7complexIdEEmIERKS2_\00", section "llvm.metadata" ; <[39 x i8]*> [#uses=1] - at llvm.dbg.subprogram469 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([11 x i8]* @.str95, i32 0, i32 0), i8* getelementptr ([11 x i8]* @.str95, i32 0, i32 0), i8* getelementptr ([39 x i8]* @.str468, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 636, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite396 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str470 = internal constant [39 x i8] c"_ZN10polynomialISt7complexIdEEmLERKS2_\00", section "llvm.metadata" ; <[39 x i8]*> [#uses=1] - at llvm.dbg.subprogram471 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([11 x i8]* @.str98, i32 0, i32 0), i8* getelementptr ([11 x i8]* @.str98, i32 0, i32 0), i8* getelementptr ([39 x i8]* @.str470, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 647, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite396 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array472 = internal constant [2 x %0*] [%0* null, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype376 to %0*)], section "llvm.metadata" ; <[2 x %0*]*> [#uses=1] - at llvm.dbg.composite473 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([2 x %0*]* @llvm.dbg.array472 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str474 = internal constant [8 x i8] c"acquire\00", section "llvm.metadata" ; <[8 x i8]*> [#uses=1] - at .str475 = internal constant [41 x i8] c"_ZN10polynomialISt7complexIdEE7acquireEv\00", section "llvm.metadata" ; <[41 x i8]*> [#uses=1] - at llvm.dbg.subprogram476 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([8 x i8]* @.str474, i32 0, i32 0), i8* getelementptr ([8 x i8]* @.str474, i32 0, i32 0), i8* getelementptr ([41 x i8]* @.str475, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 181, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite473 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str477 = internal constant [8 x i8] c"release\00", section "llvm.metadata" ; <[8 x i8]*> [#uses=1] - at .str478 = internal constant [41 x i8] c"_ZN10polynomialISt7complexIdEE7releaseEv\00", section "llvm.metadata" ; <[41 x i8]*> [#uses=1] - at llvm.dbg.subprogram479 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([8 x i8]* @.str477, i32 0, i32 0), i8* getelementptr ([8 x i8]* @.str477, i32 0, i32 0), i8* getelementptr ([41 x i8]* @.str478, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 188, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite473 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array480 = internal constant [3 x %0*] [%0* null, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype376 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype187 to %0*)], section "llvm.metadata" ; <[3 x %0*]*> [#uses=1] - at llvm.dbg.composite481 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([3 x %0*]* @llvm.dbg.array480 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str482 = internal constant [10 x i8] c"deep_copy\00", section "llvm.metadata" ; <[10 x i8]*> [#uses=1] - at .str483 = internal constant [47 x i8] c"_ZN10polynomialISt7complexIdEE9deep_copyEPKS1_\00", section "llvm.metadata" ; <[47 x i8]*> [#uses=1] - at llvm.dbg.subprogram484 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([10 x i8]* @.str482, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str482, i32 0, i32 0), i8* getelementptr ([47 x i8]* @.str483, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 195, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite481 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array485 = internal constant [33 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype373 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype374 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype375 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram379 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram382 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram385 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram390 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram393 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram398 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram402 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram406 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram411 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subpro gram415 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram419 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram423 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram427 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram429 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram433 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram435 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram437 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram439 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram443 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram450 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram456 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram459 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram462 to %0*), %0* bitcast (%llvm.dbg. subprogram.type* @llvm.dbg.subprogram465 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram467 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram469 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram471 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram476 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram479 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram484 to %0*)], section "llvm.metadata" ; <[33 x %0*]*> [#uses=1] - at llvm.dbg.composite486 = internal constant %llvm.dbg.composite.type { i32 458771, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([34 x i8]* @.str371, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 84, i64 96, i64 32, i64 0, i32 0, %0* null, %0* bitcast ([33 x %0*]* @llvm.dbg.array485 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.array487 = internal constant [2 x %0*] [%0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite486 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype298 to %0*)], section "llvm.metadata" ; <[2 x %0*]*> [#uses=1] - at llvm.dbg.composite488 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([2 x %0*]* @llvm.dbg.array487 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str489 = internal constant [38 x i8] c"_ZN10polynomialIdE11bit_reverseERKS0_\00", section "llvm.metadata" ; <[38 x i8]*> [#uses=1] - at llvm.dbg.subprogram490 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([10 x i8]* @.str482, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str482, i32 0, i32 0), i8* getelementptr ([38 x i8]* @.str489, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 469, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite488 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array491 = internal constant [2 x %0*] [%0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite486 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype387 to %0*)], section "llvm.metadata" ; <[2 x %0*]*> [#uses=1] - at llvm.dbg.composite492 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([2 x %0*]* @llvm.dbg.array491 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str493 = internal constant [52 x i8] c"_ZN10polynomialIdE11bit_reverseERKS_ISt7complexIdEE\00", section "llvm.metadata" ; <[52 x i8]*> [#uses=1] - at llvm.dbg.subprogram494 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([12 x i8]* @.str448, i32 0, i32 0), i8* getelementptr ([12 x i8]* @.str448, i32 0, i32 0), i8* getelementptr ([52 x i8]* @.str493, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 483, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite492 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str495 = internal constant [29 x i8] c"_ZN10polynomialIdE3fftERKS0_\00", section "llvm.metadata" ; <[29 x i8]*> [#uses=1] - at llvm.dbg.subprogram496 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([4 x i8]* @.str457, i32 0, i32 0), i8* getelementptr ([4 x i8]* @.str457, i32 0, i32 0), i8* getelementptr ([29 x i8]* @.str495, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 497, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite488 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str497 = internal constant [52 x i8] c"_ZN10polynomialIdE11inverse_fftERKS_ISt7complexIdEE\00", section "llvm.metadata" ; <[52 x i8]*> [#uses=1] - at llvm.dbg.subprogram498 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([12 x i8]* @.str460, i32 0, i32 0), i8* getelementptr ([12 x i8]* @.str460, i32 0, i32 0), i8* getelementptr ([52 x i8]* @.str497, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 535, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite492 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str499 = internal constant [28 x i8] c"_ZNK10polynomialIdEmlERKS0_\00", section "llvm.metadata" ; <[28 x i8]*> [#uses=1] - at llvm.dbg.subprogram500 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([10 x i8]* @.str463, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str463, i32 0, i32 0), i8* getelementptr ([28 x i8]* @.str499, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 576, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite351 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str501 = internal constant [27 x i8] c"_ZN10polynomialIdEpLERKS0_\00", section "llvm.metadata" ; <[27 x i8]*> [#uses=1] - at llvm.dbg.subprogram502 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([11 x i8]* @.str92, i32 0, i32 0), i8* getelementptr ([11 x i8]* @.str92, i32 0, i32 0), i8* getelementptr ([27 x i8]* @.str501, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 625, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite308 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str503 = internal constant [27 x i8] c"_ZN10polynomialIdEmIERKS0_\00", section "llvm.metadata" ; <[27 x i8]*> [#uses=1] - at llvm.dbg.subprogram504 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([11 x i8]* @.str95, i32 0, i32 0), i8* getelementptr ([11 x i8]* @.str95, i32 0, i32 0), i8* getelementptr ([27 x i8]* @.str503, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 636, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite308 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str505 = internal constant [27 x i8] c"_ZN10polynomialIdEmLERKS0_\00", section "llvm.metadata" ; <[27 x i8]*> [#uses=1] - at llvm.dbg.subprogram506 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([11 x i8]* @.str98, i32 0, i32 0), i8* getelementptr ([11 x i8]* @.str98, i32 0, i32 0), i8* getelementptr ([27 x i8]* @.str505, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 647, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite308 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array507 = internal constant [2 x %0*] [%0* null, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype285 to %0*)], section "llvm.metadata" ; <[2 x %0*]*> [#uses=1] - at llvm.dbg.composite508 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([2 x %0*]* @llvm.dbg.array507 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str509 = internal constant [29 x i8] c"_ZN10polynomialIdE7acquireEv\00", section "llvm.metadata" ; <[29 x i8]*> [#uses=1] - at llvm.dbg.subprogram510 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([8 x i8]* @.str474, i32 0, i32 0), i8* getelementptr ([8 x i8]* @.str474, i32 0, i32 0), i8* getelementptr ([29 x i8]* @.str509, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 181, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite508 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str511 = internal constant [29 x i8] c"_ZN10polynomialIdE7releaseEv\00", section "llvm.metadata" ; <[29 x i8]*> [#uses=1] - at llvm.dbg.subprogram512 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([8 x i8]* @.str477, i32 0, i32 0), i8* getelementptr ([8 x i8]* @.str477, i32 0, i32 0), i8* getelementptr ([29 x i8]* @.str511, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 188, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite508 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array513 = internal constant [3 x %0*] [%0* null, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype285 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype290 to %0*)], section "llvm.metadata" ; <[3 x %0*]*> [#uses=1] - at llvm.dbg.composite514 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([3 x %0*]* @llvm.dbg.array513 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str515 = internal constant [33 x i8] c"_ZN10polynomialIdE9deep_copyEPKd\00", section "llvm.metadata" ; <[33 x i8]*> [#uses=1] - at llvm.dbg.subprogram516 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([10 x i8]* @.str482, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str482, i32 0, i32 0), i8* getelementptr ([33 x i8]* @.str515, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 195, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite514 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array517 = internal constant [33 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype275 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype278 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype284 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram289 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram293 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram296 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram301 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram305 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram310 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram315 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram320 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram326 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subpro gram331 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram336 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram341 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram346 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram349 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram353 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram355 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram360 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram365 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram370 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram490 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram494 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram496 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram498 to %0*), %0* bitcast (%llvm.dbg. subprogram.type* @llvm.dbg.subprogram500 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram502 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram504 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram506 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram510 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram512 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram516 to %0*)], section "llvm.metadata" ; <[33 x %0*]*> [#uses=1] - at llvm.dbg.composite518 = internal constant %llvm.dbg.composite.type { i32 458771, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([19 x i8]* @.str266, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 84, i64 96, i64 32, i64 0, i32 0, %0* null, %0* bitcast ([33 x %0*]* @llvm.dbg.array517 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.derivedtype519 = internal constant %llvm.dbg.derivedtype.type { i32 458767, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 32, i64 32, i64 0, i32 0, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite518 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array520 = internal constant [3 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype180 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype519 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype280 to %0*)], section "llvm.metadata" ; <[3 x %0*]*> [#uses=1] - at llvm.dbg.composite521 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([3 x %0*]* @llvm.dbg.array520 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.subprogram522 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([11 x i8]* @.str334, i32 0, i32 0), i8* getelementptr ([11 x i8]* @.str334, i32 0, i32 0), i8* getelementptr ([23 x i8]* @.str335, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 306, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite521 to %0*), i1 false, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.subprogram527 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([7 x i8]* @.str324, i32 0, i32 0), i8* getelementptr ([7 x i8]* @.str324, i32 0, i32 0), i8* getelementptr ([29 x i8]* @.str325, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 111, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite323 to %0*), i1 false, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.subprogram530 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([11 x i8]* @.str334, i32 0, i32 0), i8* getelementptr ([11 x i8]* @.str334, i32 0, i32 0), i8* getelementptr ([35 x i8]* @.str418, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 306, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite417 to %0*), i1 false, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array534 = internal constant [3 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype196 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype224 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype31 to %0*)], section "llvm.metadata" ; <[3 x %0*]*> [#uses=1] - at llvm.dbg.composite535 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([3 x %0*]* @llvm.dbg.array534 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str536 = internal constant [19 x i8] c"operator*=\00", section "llvm.metadata" ; <[19 x i8]*> [#uses=1] - at .str537 = internal constant [35 x i8] c"_ZNSt7complexIdEmLIdEERS0_RKS_IT_E\00", section "llvm.metadata" ; <[35 x i8]*> [#uses=1] - at llvm.dbg.subprogram538 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([19 x i8]* @.str536, i32 0, i32 0), i8* getelementptr ([19 x i8]* @.str536, i32 0, i32 0), i8* getelementptr ([35 x i8]* @.str537, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*), i32 1286, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite535 to %0*), i1 false, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str541 = internal constant [4 x i8] c"__t\00", section "llvm.metadata" ; <[4 x i8]*> [#uses=1] - at llvm.dbg.variable542 = internal constant %llvm.dbg.variable.type { i32 459008, %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram538 to %0*), i8* getelementptr ([4 x i8]* @.str541, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*), i32 1288, %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to %0*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] - at llvm.dbg.subprogram543 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([10 x i8]* @.str482, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str482, i32 0, i32 0), i8* getelementptr ([33 x i8]* @.str515, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 195, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite514 to %0*), i1 false, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.subprogram549 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([5 x i8]* @.str358, i32 0, i32 0), i8* getelementptr ([5 x i8]* @.str358, i32 0, i32 0), i8* getelementptr ([26 x i8]* @.str359, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 404, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite357 to %0*), i1 false, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array555 = internal constant [3 x %0*] [%0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite223 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype31 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype31 to %0*)], section "llvm.metadata" ; <[3 x %0*]*> [#uses=1] - at llvm.dbg.composite556 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([3 x %0*]* @llvm.dbg.array555 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str557 = internal constant [18 x i8] c"operator*\00", section "llvm.metadata" ; <[18 x i8]*> [#uses=1] - at .str558 = internal constant [32 x i8] c"_ZStmlIdESt7complexIT_ERKS2_S4_\00", section "llvm.metadata" ; <[32 x i8]*> [#uses=1] - at llvm.dbg.subprogram559 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([18 x i8]* @.str557, i32 0, i32 0), i8* getelementptr ([18 x i8]* @.str557, i32 0, i32 0), i8* getelementptr ([32 x i8]* @.str558, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*), i32 378, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite556 to %0*), i1 false, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.variable564 = internal constant %llvm.dbg.variable.type { i32 459008, %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram559 to %0*), i8* getelementptr ([4 x i8]* @.str244, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*), i32 380, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite223 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] - at llvm.dbg.subprogram565 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([10 x i8]* @.str482, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str482, i32 0, i32 0), i8* getelementptr ([47 x i8]* @.str483, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 195, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite481 to %0*), i1 false, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.subprogram569 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([7 x i8]* @.str324, i32 0, i32 0), i8* getelementptr ([7 x i8]* @.str324, i32 0, i32 0), i8* getelementptr ([41 x i8]* @.str410, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 111, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite409 to %0*), i1 false, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array572 = internal constant [2 x %0*] [%0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite223 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype31 to %0*)], section "llvm.metadata" ; <[2 x %0*]*> [#uses=1] - at llvm.dbg.composite573 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([2 x %0*]* @llvm.dbg.array572 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str574 = internal constant [18 x i8] c"operator-\00", section "llvm.metadata" ; <[18 x i8]*> [#uses=1] - at .str575 = internal constant [29 x i8] c"_ZStngIdESt7complexIT_ERKS2_\00", section "llvm.metadata" ; <[29 x i8]*> [#uses=1] - at llvm.dbg.subprogram576 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([18 x i8]* @.str574, i32 0, i32 0), i8* getelementptr ([18 x i8]* @.str574, i32 0, i32 0), i8* getelementptr ([29 x i8]* @.str575, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*), i32 443, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite573 to %0*), i1 false, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.subprogram578 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([4 x i8]* @.str329, i32 0, i32 0), i8* getelementptr ([4 x i8]* @.str329, i32 0, i32 0), i8* getelementptr ([26 x i8]* @.str330, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 300, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite328 to %0*), i1 false, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.subprogram581 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([10 x i8]* @.str363, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str363, i32 0, i32 0), i8* getelementptr ([32 x i8]* @.str364, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 423, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite362 to %0*), i1 false, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str591 = internal constant [19 x i8] c"operator/=\00", section "llvm.metadata" ; <[19 x i8]*> [#uses=1] - at .str592 = internal constant [35 x i8] c"_ZNSt7complexIdEdVIdEERS0_RKS_IT_E\00", section "llvm.metadata" ; <[35 x i8]*> [#uses=1] - at llvm.dbg.subprogram593 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([19 x i8]* @.str591, i32 0, i32 0), i8* getelementptr ([19 x i8]* @.str591, i32 0, i32 0), i8* getelementptr ([35 x i8]* @.str592, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*), i32 1297, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite535 to %0*), i1 false, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.variable596 = internal constant %llvm.dbg.variable.type { i32 459008, %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram593 to %0*), i8* getelementptr ([4 x i8]* @.str541, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*), i32 1299, %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to %0*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] - at .str597 = internal constant [18 x i8] c"operator/\00", section "llvm.metadata" ; <[18 x i8]*> [#uses=1] - at .str598 = internal constant [32 x i8] c"_ZStdvIdESt7complexIT_ERKS2_S4_\00", section "llvm.metadata" ; <[32 x i8]*> [#uses=1] - at llvm.dbg.subprogram599 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([18 x i8]* @.str597, i32 0, i32 0), i8* getelementptr ([18 x i8]* @.str597, i32 0, i32 0), i8* getelementptr ([32 x i8]* @.str598, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*), i32 408, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite556 to %0*), i1 false, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.variable602 = internal constant %llvm.dbg.variable.type { i32 459008, %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram599 to %0*), i8* getelementptr ([4 x i8]* @.str244, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*), i32 410, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite223 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] - at .str603 = internal constant [19 x i8] c"operator+=\00", section "llvm.metadata" ; <[19 x i8]*> [#uses=1] - at .str604 = internal constant [35 x i8] c"_ZNSt7complexIdEpLIdEERS0_RKS_IT_E\00", section "llvm.metadata" ; <[35 x i8]*> [#uses=1] - at llvm.dbg.subprogram605 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([19 x i8]* @.str603, i32 0, i32 0), i8* getelementptr ([19 x i8]* @.str603, i32 0, i32 0), i8* getelementptr ([35 x i8]* @.str604, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*), i32 1268, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite535 to %0*), i1 false, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str608 = internal constant [18 x i8] c"operator+\00", section "llvm.metadata" ; <[18 x i8]*> [#uses=1] - at .str609 = internal constant [32 x i8] c"_ZStplIdESt7complexIT_ERKS2_S4_\00", section "llvm.metadata" ; <[32 x i8]*> [#uses=1] - at llvm.dbg.subprogram610 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([18 x i8]* @.str608, i32 0, i32 0), i8* getelementptr ([18 x i8]* @.str608, i32 0, i32 0), i8* getelementptr ([32 x i8]* @.str609, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*), i32 318, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite556 to %0*), i1 false, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.variable613 = internal constant %llvm.dbg.variable.type { i32 459008, %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram610 to %0*), i8* getelementptr ([4 x i8]* @.str244, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*), i32 320, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite223 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] - at .str614 = internal constant [19 x i8] c"operator-=\00", section "llvm.metadata" ; <[19 x i8]*> [#uses=1] - at .str615 = internal constant [35 x i8] c"_ZNSt7complexIdEmIIdEERS0_RKS_IT_E\00", section "llvm.metadata" ; <[35 x i8]*> [#uses=1] - at llvm.dbg.subprogram616 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([19 x i8]* @.str614, i32 0, i32 0), i8* getelementptr ([19 x i8]* @.str614, i32 0, i32 0), i8* getelementptr ([35 x i8]* @.str615, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*), i32 1277, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite535 to %0*), i1 false, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str619 = internal constant [32 x i8] c"_ZStmiIdESt7complexIT_ERKS2_S4_\00", section "llvm.metadata" ; <[32 x i8]*> [#uses=1] - at llvm.dbg.subprogram620 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([18 x i8]* @.str574, i32 0, i32 0), i8* getelementptr ([18 x i8]* @.str574, i32 0, i32 0), i8* getelementptr ([32 x i8]* @.str619, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*), i32 348, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite556 to %0*), i1 false, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.variable623 = internal constant %llvm.dbg.variable.type { i32 459008, %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram620 to %0*), i8* getelementptr ([4 x i8]* @.str244, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*), i32 350, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite223 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] - at llvm.dbg.subprogram624 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([4 x i8]* @.str329, i32 0, i32 0), i8* getelementptr ([4 x i8]* @.str329, i32 0, i32 0), i8* getelementptr ([38 x i8]* @.str414, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 300, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite413 to %0*), i1 false, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array627 = internal constant [3 x %0*] [%0* null, %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype269 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype269 to %0*)], section "llvm.metadata" ; <[3 x %0*]*> [#uses=1] - at llvm.dbg.composite628 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([3 x %0*]* @llvm.dbg.array627 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str629 = internal constant [42 x i8] c"__static_initialization_and_destruction_0\00", section "llvm.metadata" ; <[42 x i8]*> [#uses=1] - at llvm.dbg.subprogram630 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([42 x i8]* @.str629, i32 0, i32 0), i8* getelementptr ([42 x i8]* @.str629, i32 0, i32 0), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 703, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite628 to %0*), i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=0] - at .str635 = internal constant [9 x i8] c"iostream\00", section "llvm.metadata" ; <[9 x i8]*> [#uses=1] - at llvm.dbg.compile_unit636 = internal constant %llvm.dbg.compile_unit.type { i32 458769, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.compile_units to %0*), i32 4, i8* getelementptr ([9 x i8]* @.str635, i32 0, i32 0), i8* getelementptr ([110 x i8]* @.str4, i32 0, i32 0), i8* getelementptr ([52 x i8]* @.str2, i32 0, i32 0), i1 false, i1 false, i8* null, i32 -1 }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] - at _ZStL8__ioinit = internal global %"struct.std::allocator" zeroinitializer ; <%"struct.std::allocator"*> [#uses=2] - at .str638 = internal constant [115 x i8] c"/developer/home2/zsth/projects/llvm.org/install/lib/gcc/i686-pc-linux-gnu/4.2.1/../../../../include/c++/4.2.1/bits\00", section "llvm.metadata" ; <[115 x i8]*> [#uses=1] - at __dso_handle = external global i8* ; [#uses=1] - at _ZGVN10polynomialIdE4PI2IE = weak global i64 0, align 8 ; [#uses=1] - at _ZN10polynomialIdE4PI2IE = weak global %"struct.std::complex" zeroinitializer ; <%"struct.std::complex"*> [#uses=3] - at llvm.dbg.array654 = internal constant [1 x %0*] zeroinitializer, section "llvm.metadata" ; <[1 x %0*]*> [#uses=1] - at llvm.dbg.composite655 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([1 x %0*]* @llvm.dbg.array654 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str656 = internal constant [16 x i8] c"_GLOBAL__I_main\00", section "llvm.metadata" ; <[16 x i8]*> [#uses=1] - at llvm.dbg.subprogram657 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([16 x i8]* @.str656, i32 0, i32 0), i8* getelementptr ([16 x i8]* @.str656, i32 0, i32 0), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 704, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite655 to %0*), i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.derivedtype658 = internal constant %llvm.dbg.derivedtype.type { i32 458767, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 32, i64 32, i64 0, i32 0, %0* null }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array659 = internal constant [2 x %0*] [%0* null, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype658 to %0*)], section "llvm.metadata" ; <[2 x %0*]*> [#uses=1] - at llvm.dbg.composite660 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([2 x %0*]* @llvm.dbg.array659 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str661 = internal constant [8 x i8] c"__tcf_0\00", section "llvm.metadata" ; <[8 x i8]*> [#uses=1] - at llvm.dbg.subprogram662 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([8 x i8]* @.str661, i32 0, i32 0), i8* getelementptr ([8 x i8]* @.str661, i32 0, i32 0), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit636 to %0*), i32 77, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite660 to %0*), i1 true, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.subprogram665 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([8 x i8]* @.str477, i32 0, i32 0), i8* getelementptr ([8 x i8]* @.str477, i32 0, i32 0), i8* getelementptr ([29 x i8]* @.str511, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 188, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite508 to %0*), i1 false, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str667 = internal constant [23 x i8] c"_ZN10polynomialIdED0Ev\00", section "llvm.metadata" ; <[23 x i8]*> [#uses=1] - at llvm.dbg.subprogram668 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([12 x i8]* @.str304, i32 0, i32 0), i8* getelementptr ([12 x i8]* @.str304, i32 0, i32 0), i8* getelementptr ([23 x i8]* @.str667, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 252, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite508 to %0*), i1 false, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at _ZTV10polynomialIdE = weak constant [4 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__class_type_info_pseudo* @_ZTI10polynomialIdE to i32 (...)*), i32 (...)* bitcast (void (%"struct.polynomial"*)* @_ZN10polynomialIdED1Ev to i32 (...)*), i32 (...)* bitcast (void (%"struct.polynomial"*)* @_ZN10polynomialIdED0Ev to i32 (...)*)], align 8 ; <[4 x i32 (...)*]*> [#uses=1] - at _ZTI10polynomialIdE = weak constant %struct.__class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv117__class_type_infoE to i32), i32 8) to i8*), i8* getelementptr ([16 x i8]* @_ZTS10polynomialIdE, i32 0, i32 0) } } ; <%struct.__class_type_info_pseudo*> [#uses=1] - at _ZTVN10__cxxabiv117__class_type_infoE = external constant [0 x i32 (...)*] ; <[0 x i32 (...)*]*> [#uses=1] - at _ZTS10polynomialIdE = weak constant [16 x i8] c"10polynomialIdE\00" ; <[16 x i8]*> [#uses=1] - at .str671 = internal constant [5 x i8] c"char\00", section "llvm.metadata" ; <[5 x i8]*> [#uses=1] - at llvm.dbg.basictype672 = internal constant %llvm.dbg.basictype.type { i32 458788, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([5 x i8]* @.str671, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 8, i64 8, i64 0, i32 0, i32 6 }, section "llvm.metadata" ; <%llvm.dbg.basictype.type*> [#uses=1] - at .str676 = internal constant [11 x i8] c"\00", section "llvm.metadata" ; <[11 x i8]*> [#uses=1] - at llvm.dbg.compile_unit677 = internal constant %llvm.dbg.compile_unit.type { i32 458769, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.compile_units to %0*), i32 4, i8* getelementptr ([11 x i8]* @.str676, i32 0, i32 0), i8* getelementptr ([42 x i8]* @.str1, i32 0, i32 0), i8* getelementptr ([52 x i8]* @.str2, i32 0, i32 0), i1 false, i1 false, i8* null, i32 -1 }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] - at llvm.dbg.array680 = internal constant [0 x %0*] zeroinitializer, section "llvm.metadata" ; <[0 x %0*]*> [#uses=1] - at .str690 = internal constant [23 x i8] c"_ZN10polynomialIdED1Ev\00", section "llvm.metadata" ; <[23 x i8]*> [#uses=1] - at llvm.dbg.subprogram691 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([12 x i8]* @.str304, i32 0, i32 0), i8* getelementptr ([12 x i8]* @.str304, i32 0, i32 0), i8* getelementptr ([23 x i8]* @.str690, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 252, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite508 to %0*), i1 false, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.subprogram693 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([8 x i8]* @.str477, i32 0, i32 0), i8* getelementptr ([8 x i8]* @.str477, i32 0, i32 0), i8* getelementptr ([41 x i8]* @.str478, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 188, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite473 to %0*), i1 false, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str695 = internal constant [35 x i8] c"_ZN10polynomialISt7complexIdEED0Ev\00", section "llvm.metadata" ; <[35 x i8]*> [#uses=1] - at llvm.dbg.subprogram696 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([12 x i8]* @.str304, i32 0, i32 0), i8* getelementptr ([12 x i8]* @.str304, i32 0, i32 0), i8* getelementptr ([35 x i8]* @.str695, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 252, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite473 to %0*), i1 false, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at _ZTV10polynomialISt7complexIdEE = weak constant [4 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__class_type_info_pseudo* @_ZTI10polynomialISt7complexIdEE to i32 (...)*), i32 (...)* bitcast (void (%"struct.polynomial >"*)* @_ZN10polynomialISt7complexIdEED1Ev to i32 (...)*), i32 (...)* bitcast (void (%"struct.polynomial >"*)* @_ZN10polynomialISt7complexIdEED0Ev to i32 (...)*)], align 8 ; <[4 x i32 (...)*]*> [#uses=1] - at _ZTI10polynomialISt7complexIdEE = weak constant %struct.__class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv117__class_type_infoE to i32), i32 8) to i8*), i8* getelementptr ([28 x i8]* @_ZTS10polynomialISt7complexIdEE, i32 0, i32 0) } } ; <%struct.__class_type_info_pseudo*> [#uses=1] - at _ZTS10polynomialISt7complexIdEE = weak constant [28 x i8] c"10polynomialISt7complexIdEE\00" ; <[28 x i8]*> [#uses=1] - at .str707 = internal constant [35 x i8] c"_ZN10polynomialISt7complexIdEED1Ev\00", section "llvm.metadata" ; <[35 x i8]*> [#uses=1] - at llvm.dbg.subprogram708 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([12 x i8]* @.str304, i32 0, i32 0), i8* getelementptr ([12 x i8]* @.str304, i32 0, i32 0), i8* getelementptr ([35 x i8]* @.str707, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 252, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite473 to %0*), i1 false, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.subprogram710 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([8 x i8]* @.str474, i32 0, i32 0), i8* getelementptr ([8 x i8]* @.str474, i32 0, i32 0), i8* getelementptr ([29 x i8]* @.str509, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 181, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite508 to %0*), i1 false, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str712 = internal constant [23 x i8] c"_ZN10polynomialIdEC1Ej\00", section "llvm.metadata" ; <[23 x i8]*> [#uses=1] - at llvm.dbg.subprogram713 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([11 x i8]* @.str288, i32 0, i32 0), i8* getelementptr ([11 x i8]* @.str288, i32 0, i32 0), i8* getelementptr ([23 x i8]* @.str712, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 211, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite287 to %0*), i1 false, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str716 = internal constant [27 x i8] c"_ZN10polynomialIdEC1ERKS0_\00", section "llvm.metadata" ; <[27 x i8]*> [#uses=1] - at llvm.dbg.subprogram717 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([11 x i8]* @.str288, i32 0, i32 0), i8* getelementptr ([11 x i8]* @.str288, i32 0, i32 0), i8* getelementptr ([27 x i8]* @.str716, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 242, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite300 to %0*), i1 false, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.subprogram720 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([8 x i8]* @.str318, i32 0, i32 0), i8* getelementptr ([8 x i8]* @.str318, i32 0, i32 0), i8* getelementptr ([29 x i8]* @.str319, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 276, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite317 to %0*), i1 false, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.subprogram729 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([10 x i8]* @.str89, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str89, i32 0, i32 0), i8* getelementptr ([27 x i8]* @.str309, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 259, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite308 to %0*), i1 false, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.subprogram732 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([8 x i8]* @.str474, i32 0, i32 0), i8* getelementptr ([8 x i8]* @.str474, i32 0, i32 0), i8* getelementptr ([41 x i8]* @.str475, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 181, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite473 to %0*), i1 false, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str734 = internal constant [35 x i8] c"_ZN10polynomialISt7complexIdEEC1Ej\00", section "llvm.metadata" ; <[35 x i8]*> [#uses=1] - at llvm.dbg.subprogram735 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([11 x i8]* @.str288, i32 0, i32 0), i8* getelementptr ([11 x i8]* @.str288, i32 0, i32 0), i8* getelementptr ([35 x i8]* @.str734, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 211, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite378 to %0*), i1 false, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.subprogram738 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([12 x i8]* @.str448, i32 0, i32 0), i8* getelementptr ([12 x i8]* @.str448, i32 0, i32 0), i8* getelementptr ([38 x i8]* @.str489, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 469, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite488 to %0*), i1 false, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.variable744 = internal constant %llvm.dbg.variable.type { i32 459008, %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram738 to %0*), i8* getelementptr ([7 x i8]* @.str259, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 473, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite486 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] - at llvm.dbg.subprogram747 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([12 x i8]* @.str448, i32 0, i32 0), i8* getelementptr ([12 x i8]* @.str448, i32 0, i32 0), i8* getelementptr ([52 x i8]* @.str493, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 483, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite492 to %0*), i1 false, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.variable751 = internal constant %llvm.dbg.variable.type { i32 459008, %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram747 to %0*), i8* getelementptr ([7 x i8]* @.str259, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 487, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite486 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] - at llvm.dbg.subprogram753 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([10 x i8]* @.str89, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str89, i32 0, i32 0), i8* getelementptr ([39 x i8]* @.str397, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 259, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite396 to %0*), i1 false, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.subprogram756 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([12 x i8]* @.str368, i32 0, i32 0), i8* getelementptr ([12 x i8]* @.str368, i32 0, i32 0), i8* getelementptr ([34 x i8]* @.str369, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 443, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite367 to %0*), i1 false, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str759 = internal constant [35 x i8] c"overflow in fft polynomial stretch\00" ; <[35 x i8]*> [#uses=1] - at _ZTISt14overflow_error = weak constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr ([19 x i8]* @_ZTSSt14overflow_error, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__si_class_type_info_pseudo* @_ZTISt13runtime_error to %"struct.std::type_info"*) } ; <%struct.__si_class_type_info_pseudo*> [#uses=2] - at _ZTVN10__cxxabiv120__si_class_type_infoE = external constant [0 x i32 (...)*] ; <[0 x i32 (...)*]*> [#uses=1] - at _ZTSSt14overflow_error = weak constant [19 x i8] c"St14overflow_error\00" ; <[19 x i8]*> [#uses=1] - at _ZTISt13runtime_error = external constant %struct.__si_class_type_info_pseudo ; <%struct.__si_class_type_info_pseudo*> [#uses=1] - at .str769 = internal constant [10 x i8] c"stdexcept\00", section "llvm.metadata" ; <[10 x i8]*> [#uses=1] - at llvm.dbg.compile_unit770 = internal constant %llvm.dbg.compile_unit.type { i32 458769, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.compile_units to %0*), i32 4, i8* getelementptr ([10 x i8]* @.str769, i32 0, i32 0), i8* getelementptr ([110 x i8]* @.str4, i32 0, i32 0), i8* getelementptr ([52 x i8]* @.str2, i32 0, i32 0), i1 false, i1 false, i8* null, i32 -1 }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] - at .str773 = internal constant [15 x i8] c"overflow_error\00", section "llvm.metadata" ; <[15 x i8]*> [#uses=1] - at .str775 = internal constant [14 x i8] c"runtime_error\00", section "llvm.metadata" ; <[14 x i8]*> [#uses=1] - at .str777 = internal constant [10 x i8] c"exception\00", section "llvm.metadata" ; <[10 x i8]*> [#uses=1] - at llvm.dbg.compile_unit778 = internal constant %llvm.dbg.compile_unit.type { i32 458769, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.compile_units to %0*), i32 4, i8* getelementptr ([10 x i8]* @.str777, i32 0, i32 0), i8* getelementptr ([110 x i8]* @.str4, i32 0, i32 0), i8* getelementptr ([52 x i8]* @.str2, i32 0, i32 0), i1 false, i1 false, i8* null, i32 -1 }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] - at .str780 = internal constant [16 x i8] c"_vptr.exception\00", section "llvm.metadata" ; <[16 x i8]*> [#uses=1] - at llvm.dbg.derivedtype781 = internal constant %llvm.dbg.derivedtype.type { i32 458765, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([16 x i8]* @.str780, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit778 to %0*), i32 57, i64 32, i64 32, i64 0, i32 0, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype273 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.derivedtype782 = internal constant %llvm.dbg.derivedtype.type { i32 458767, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 32, i64 32, i64 0, i32 0, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite800 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array783 = internal constant [2 x %0*] [%0* null, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype782 to %0*)], section "llvm.metadata" ; <[2 x %0*]*> [#uses=1] - at llvm.dbg.composite784 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([2 x %0*]* @llvm.dbg.array783 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.subprogram785 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([10 x i8]* @.str777, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str777, i32 0, i32 0), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit778 to %0*), i32 59, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite784 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array786 = internal constant [3 x %0*] [%0* null, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype782 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype269 to %0*)], section "llvm.metadata" ; <[3 x %0*]*> [#uses=1] - at llvm.dbg.composite787 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([3 x %0*]* @llvm.dbg.array786 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str788 = internal constant [11 x i8] c"~exception\00", section "llvm.metadata" ; <[11 x i8]*> [#uses=1] - at llvm.dbg.subprogram789 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([11 x i8]* @.str788, i32 0, i32 0), i8* getelementptr ([11 x i8]* @.str788, i32 0, i32 0), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit778 to %0*), i32 60, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite787 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.derivedtype790 = internal constant %llvm.dbg.derivedtype.type { i32 458790, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 8, i64 8, i64 0, i32 0, %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype672 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.derivedtype791 = internal constant %llvm.dbg.derivedtype.type { i32 458767, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 32, i64 32, i64 0, i32 0, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype790 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.derivedtype792 = internal constant %llvm.dbg.derivedtype.type { i32 458790, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 32, i64 32, i64 0, i32 0, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite800 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.derivedtype793 = internal constant %llvm.dbg.derivedtype.type { i32 458767, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 32, i64 32, i64 0, i32 0, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype792 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array794 = internal constant [2 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype791 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype793 to %0*)], section "llvm.metadata" ; <[2 x %0*]*> [#uses=1] - at llvm.dbg.composite795 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([2 x %0*]* @llvm.dbg.array794 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str796 = internal constant [5 x i8] c"what\00", section "llvm.metadata" ; <[5 x i8]*> [#uses=1] - at .str797 = internal constant [24 x i8] c"_ZNKSt9exception4whatEv\00", section "llvm.metadata" ; <[24 x i8]*> [#uses=1] - at llvm.dbg.subprogram798 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([5 x i8]* @.str796, i32 0, i32 0), i8* getelementptr ([5 x i8]* @.str796, i32 0, i32 0), i8* getelementptr ([24 x i8]* @.str797, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit778 to %0*), i32 63, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite795 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array799 = internal constant [4 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype781 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram785 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram789 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram798 to %0*)], section "llvm.metadata" ; <[4 x %0*]*> [#uses=1] - at llvm.dbg.composite800 = internal constant %llvm.dbg.composite.type { i32 458771, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([10 x i8]* @.str777, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit778 to %0*), i32 57, i64 32, i64 32, i64 0, i32 0, %0* null, %0* bitcast ([4 x %0*]* @llvm.dbg.array799 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.derivedtype801 = internal constant %llvm.dbg.derivedtype.type { i32 458780, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit770 to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite800 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str802 = internal constant [12 x i8] c"stringfwd.h\00", section "llvm.metadata" ; <[12 x i8]*> [#uses=1] - at llvm.dbg.compile_unit803 = internal constant %llvm.dbg.compile_unit.type { i32 458769, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.compile_units to %0*), i32 4, i8* getelementptr ([12 x i8]* @.str802, i32 0, i32 0), i8* getelementptr ([115 x i8]* @.str638, i32 0, i32 0), i8* getelementptr ([52 x i8]* @.str2, i32 0, i32 0), i1 false, i1 false, i8* null, i32 -1 }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] - at .str804 = internal constant [64 x i8] c"basic_string,std::allocator >\00", section "llvm.metadata" ; <[64 x i8]*> [#uses=1] - at .str806 = internal constant [15 x i8] c"basic_string.h\00", section "llvm.metadata" ; <[15 x i8]*> [#uses=1] - at llvm.dbg.compile_unit807 = internal constant %llvm.dbg.compile_unit.type { i32 458769, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.compile_units to %0*), i32 4, i8* getelementptr ([15 x i8]* @.str806, i32 0, i32 0), i8* getelementptr ([115 x i8]* @.str638, i32 0, i32 0), i8* getelementptr ([52 x i8]* @.str2, i32 0, i32 0), i1 false, i1 false, i8* null, i32 -1 }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] - at .str808 = internal constant [13 x i8] c"_Alloc_hider\00", section "llvm.metadata" ; <[13 x i8]*> [#uses=1] - at .str810 = internal constant [16 x i8] c"allocator\00", section "llvm.metadata" ; <[16 x i8]*> [#uses=1] - at .str812 = internal constant [16 x i8] c"new_allocator.h\00", section "llvm.metadata" ; <[16 x i8]*> [#uses=1] - at .str813 = internal constant [114 x i8] c"/developer/home2/zsth/projects/llvm.org/install/lib/gcc/i686-pc-linux-gnu/4.2.1/../../../../include/c++/4.2.1/ext\00", section "llvm.metadata" ; <[114 x i8]*> [#uses=1] - at llvm.dbg.compile_unit814 = internal constant %llvm.dbg.compile_unit.type { i32 458769, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.compile_units to %0*), i32 4, i8* getelementptr ([16 x i8]* @.str812, i32 0, i32 0), i8* getelementptr ([114 x i8]* @.str813, i32 0, i32 0), i8* getelementptr ([52 x i8]* @.str2, i32 0, i32 0), i1 false, i1 false, i8* null, i32 -1 }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] - at .str815 = internal constant [20 x i8] c"new_allocator\00", section "llvm.metadata" ; <[20 x i8]*> [#uses=1] - at llvm.dbg.derivedtype817 = internal constant %llvm.dbg.derivedtype.type { i32 458767, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 32, i64 32, i64 0, i32 0, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite877 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array818 = internal constant [2 x %0*] [%0* null, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype817 to %0*)], section "llvm.metadata" ; <[2 x %0*]*> [#uses=1] - at llvm.dbg.composite819 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([2 x %0*]* @llvm.dbg.array818 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str820 = internal constant [14 x i8] c"new_allocator\00", section "llvm.metadata" ; <[14 x i8]*> [#uses=1] - at llvm.dbg.subprogram821 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([14 x i8]* @.str820, i32 0, i32 0), i8* getelementptr ([14 x i8]* @.str820, i32 0, i32 0), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit814 to %0*), i32 68, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite819 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.derivedtype822 = internal constant %llvm.dbg.derivedtype.type { i32 458790, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 8, i64 8, i64 0, i32 0, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite877 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.derivedtype823 = internal constant %llvm.dbg.derivedtype.type { i32 458768, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 32, i64 32, i64 0, i32 0, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype822 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array824 = internal constant [3 x %0*] [%0* null, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype817 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype823 to %0*)], section "llvm.metadata" ; <[3 x %0*]*> [#uses=1] - at llvm.dbg.composite825 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([3 x %0*]* @llvm.dbg.array824 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.subprogram826 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([14 x i8]* @.str820, i32 0, i32 0), i8* getelementptr ([14 x i8]* @.str820, i32 0, i32 0), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit814 to %0*), i32 70, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite825 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.composite827 = internal constant %llvm.dbg.composite.type { i32 458771, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit814 to %0*), i32 54, i64 0, i64 0, i64 0, i32 4, %0* null, %0* null, i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.derivedtype828 = internal constant %llvm.dbg.derivedtype.type { i32 458790, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 8, i64 0, i32 0, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite827 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.derivedtype829 = internal constant %llvm.dbg.derivedtype.type { i32 458768, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 32, i64 32, i64 0, i32 0, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype828 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array830 = internal constant [3 x %0*] [%0* null, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype817 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype829 to %0*)], section "llvm.metadata" ; <[3 x %0*]*> [#uses=1] - at llvm.dbg.composite831 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([3 x %0*]* @llvm.dbg.array830 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.subprogram832 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([14 x i8]* @.str820, i32 0, i32 0), i8* getelementptr ([14 x i8]* @.str820, i32 0, i32 0), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit814 to %0*), i32 73, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite831 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array833 = internal constant [3 x %0*] [%0* null, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype817 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype269 to %0*)], section "llvm.metadata" ; <[3 x %0*]*> [#uses=1] - at llvm.dbg.composite834 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([3 x %0*]* @llvm.dbg.array833 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str835 = internal constant [15 x i8] c"~new_allocator\00", section "llvm.metadata" ; <[15 x i8]*> [#uses=1] - at llvm.dbg.subprogram836 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([15 x i8]* @.str835, i32 0, i32 0), i8* getelementptr ([15 x i8]* @.str835, i32 0, i32 0), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit814 to %0*), i32 75, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite834 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.derivedtype837 = internal constant %llvm.dbg.derivedtype.type { i32 458767, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 32, i64 32, i64 0, i32 0, %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype672 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.derivedtype838 = internal constant %llvm.dbg.derivedtype.type { i32 458767, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 32, i64 32, i64 0, i32 0, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype822 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.derivedtype839 = internal constant %llvm.dbg.derivedtype.type { i32 458768, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 32, i64 32, i64 0, i32 0, %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype672 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array840 = internal constant [3 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype837 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype838 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype839 to %0*)], section "llvm.metadata" ; <[3 x %0*]*> [#uses=1] - at llvm.dbg.composite841 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([3 x %0*]* @llvm.dbg.array840 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str842 = internal constant [8 x i8] c"address\00", section "llvm.metadata" ; <[8 x i8]*> [#uses=1] - at .str843 = internal constant [44 x i8] c"_ZNK9__gnu_cxx13new_allocatorIcE7addressERc\00", section "llvm.metadata" ; <[44 x i8]*> [#uses=1] - at llvm.dbg.subprogram844 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([8 x i8]* @.str842, i32 0, i32 0), i8* getelementptr ([8 x i8]* @.str842, i32 0, i32 0), i8* getelementptr ([44 x i8]* @.str843, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit814 to %0*), i32 78, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite841 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.derivedtype845 = internal constant %llvm.dbg.derivedtype.type { i32 458768, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 32, i64 32, i64 0, i32 0, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype790 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array846 = internal constant [3 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype791 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype838 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype845 to %0*)], section "llvm.metadata" ; <[3 x %0*]*> [#uses=1] - at llvm.dbg.composite847 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([3 x %0*]* @llvm.dbg.array846 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str848 = internal constant [45 x i8] c"_ZNK9__gnu_cxx13new_allocatorIcE7addressERKc\00", section "llvm.metadata" ; <[45 x i8]*> [#uses=1] - at llvm.dbg.subprogram849 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([8 x i8]* @.str842, i32 0, i32 0), i8* getelementptr ([8 x i8]* @.str842, i32 0, i32 0), i8* getelementptr ([45 x i8]* @.str848, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit814 to %0*), i32 81, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite847 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.derivedtype850 = internal constant %llvm.dbg.derivedtype.type { i32 458767, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 32, i64 32, i64 0, i32 0, %0* null }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array851 = internal constant [4 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype837 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype817 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype280 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype850 to %0*)], section "llvm.metadata" ; <[4 x %0*]*> [#uses=1] - at llvm.dbg.composite852 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([4 x %0*]* @llvm.dbg.array851 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str853 = internal constant [9 x i8] c"allocate\00", section "llvm.metadata" ; <[9 x i8]*> [#uses=1] - at .str854 = internal constant [46 x i8] c"_ZN9__gnu_cxx13new_allocatorIcE8allocateEjPKv\00", section "llvm.metadata" ; <[46 x i8]*> [#uses=1] - at llvm.dbg.subprogram855 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([9 x i8]* @.str853, i32 0, i32 0), i8* getelementptr ([9 x i8]* @.str853, i32 0, i32 0), i8* getelementptr ([46 x i8]* @.str854, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit814 to %0*), i32 86, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite852 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array856 = internal constant [4 x %0*] [%0* null, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype817 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype837 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype280 to %0*)], section "llvm.metadata" ; <[4 x %0*]*> [#uses=1] - at llvm.dbg.composite857 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([4 x %0*]* @llvm.dbg.array856 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str858 = internal constant [11 x i8] c"deallocate\00", section "llvm.metadata" ; <[11 x i8]*> [#uses=1] - at .str859 = internal constant [48 x i8] c"_ZN9__gnu_cxx13new_allocatorIcE10deallocateEPcj\00", section "llvm.metadata" ; <[48 x i8]*> [#uses=1] - at llvm.dbg.subprogram860 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([11 x i8]* @.str858, i32 0, i32 0), i8* getelementptr ([11 x i8]* @.str858, i32 0, i32 0), i8* getelementptr ([48 x i8]* @.str859, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit814 to %0*), i32 96, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite857 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array861 = internal constant [2 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype282 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype838 to %0*)], section "llvm.metadata" ; <[2 x %0*]*> [#uses=1] - at llvm.dbg.composite862 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([2 x %0*]* @llvm.dbg.array861 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str863 = internal constant [9 x i8] c"max_size\00", section "llvm.metadata" ; <[9 x i8]*> [#uses=1] - at .str864 = internal constant [44 x i8] c"_ZNK9__gnu_cxx13new_allocatorIcE8max_sizeEv\00", section "llvm.metadata" ; <[44 x i8]*> [#uses=1] - at llvm.dbg.subprogram865 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([9 x i8]* @.str863, i32 0, i32 0), i8* getelementptr ([9 x i8]* @.str863, i32 0, i32 0), i8* getelementptr ([44 x i8]* @.str864, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit814 to %0*), i32 100, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite862 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array866 = internal constant [4 x %0*] [%0* null, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype817 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype837 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype845 to %0*)], section "llvm.metadata" ; <[4 x %0*]*> [#uses=1] - at llvm.dbg.composite867 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([4 x %0*]* @llvm.dbg.array866 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str868 = internal constant [10 x i8] c"construct\00", section "llvm.metadata" ; <[10 x i8]*> [#uses=1] - at .str869 = internal constant [48 x i8] c"_ZN9__gnu_cxx13new_allocatorIcE9constructEPcRKc\00", section "llvm.metadata" ; <[48 x i8]*> [#uses=1] - at llvm.dbg.subprogram870 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([10 x i8]* @.str868, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str868, i32 0, i32 0), i8* getelementptr ([48 x i8]* @.str869, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit814 to %0*), i32 106, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite867 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array871 = internal constant [3 x %0*] [%0* null, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype817 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype837 to %0*)], section "llvm.metadata" ; <[3 x %0*]*> [#uses=1] - at llvm.dbg.composite872 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([3 x %0*]* @llvm.dbg.array871 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str873 = internal constant [8 x i8] c"destroy\00", section "llvm.metadata" ; <[8 x i8]*> [#uses=1] - at .str874 = internal constant [43 x i8] c"_ZN9__gnu_cxx13new_allocatorIcE7destroyEPc\00", section "llvm.metadata" ; <[43 x i8]*> [#uses=1] - at llvm.dbg.subprogram875 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([8 x i8]* @.str873, i32 0, i32 0), i8* getelementptr ([8 x i8]* @.str873, i32 0, i32 0), i8* getelementptr ([43 x i8]* @.str874, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit814 to %0*), i32 110, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite872 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array876 = internal constant [11 x %0*] [%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram821 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram826 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram832 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram836 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram844 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram849 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram855 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram860 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram865 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram870 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram875 to %0*)], section "llvm.metadata" ; <[11 x %0*]*> [#uses=1] - at llvm.dbg.composite877 = internal constant %llvm.dbg.composite.type { i32 458771, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([20 x i8]* @.str815, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit814 to %0*), i32 54, i64 8, i64 8, i64 0, i32 0, %0* null, %0* bitcast ([11 x %0*]* @llvm.dbg.array876 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.derivedtype878 = internal constant %llvm.dbg.derivedtype.type { i32 458780, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit803 to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite877 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.derivedtype879 = internal constant %llvm.dbg.derivedtype.type { i32 458767, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 32, i64 32, i64 0, i32 0, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite902 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array880 = internal constant [2 x %0*] [%0* null, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype879 to %0*)], section "llvm.metadata" ; <[2 x %0*]*> [#uses=1] - at llvm.dbg.composite881 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([2 x %0*]* @llvm.dbg.array880 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str882 = internal constant [12 x i8] c"allocator.h\00", section "llvm.metadata" ; <[12 x i8]*> [#uses=1] - at llvm.dbg.compile_unit883 = internal constant %llvm.dbg.compile_unit.type { i32 458769, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.compile_units to %0*), i32 4, i8* getelementptr ([12 x i8]* @.str882, i32 0, i32 0), i8* getelementptr ([115 x i8]* @.str638, i32 0, i32 0), i8* getelementptr ([52 x i8]* @.str2, i32 0, i32 0), i1 false, i1 false, i8* null, i32 -1 }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] - at .str884 = internal constant [10 x i8] c"allocator\00", section "llvm.metadata" ; <[10 x i8]*> [#uses=1] - at llvm.dbg.subprogram885 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([10 x i8]* @.str884, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str884, i32 0, i32 0), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit883 to %0*), i32 100, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite881 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.derivedtype886 = internal constant %llvm.dbg.derivedtype.type { i32 458790, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 8, i64 8, i64 0, i32 0, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite902 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.derivedtype887 = internal constant %llvm.dbg.derivedtype.type { i32 458768, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 32, i64 32, i64 0, i32 0, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype886 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array888 = internal constant [3 x %0*] [%0* null, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype879 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype887 to %0*)], section "llvm.metadata" ; <[3 x %0*]*> [#uses=1] - at llvm.dbg.composite889 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([3 x %0*]* @llvm.dbg.array888 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.subprogram890 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([10 x i8]* @.str884, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str884, i32 0, i32 0), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit883 to %0*), i32 102, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite889 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.composite891 = internal constant %llvm.dbg.composite.type { i32 458771, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit803 to %0*), i32 49, i64 0, i64 0, i64 0, i32 4, %0* null, %0* null, i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.derivedtype892 = internal constant %llvm.dbg.derivedtype.type { i32 458790, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 8, i64 0, i32 0, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite891 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.derivedtype893 = internal constant %llvm.dbg.derivedtype.type { i32 458768, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 32, i64 32, i64 0, i32 0, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype892 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array894 = internal constant [3 x %0*] [%0* null, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype879 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype893 to %0*)], section "llvm.metadata" ; <[3 x %0*]*> [#uses=1] - at llvm.dbg.composite895 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([3 x %0*]* @llvm.dbg.array894 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.subprogram896 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([10 x i8]* @.str884, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str884, i32 0, i32 0), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit883 to %0*), i32 106, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite895 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array897 = internal constant [3 x %0*] [%0* null, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype879 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype269 to %0*)], section "llvm.metadata" ; <[3 x %0*]*> [#uses=1] - at llvm.dbg.composite898 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([3 x %0*]* @llvm.dbg.array897 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str899 = internal constant [11 x i8] c"~allocator\00", section "llvm.metadata" ; <[11 x i8]*> [#uses=1] - at llvm.dbg.subprogram900 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([11 x i8]* @.str899, i32 0, i32 0), i8* getelementptr ([11 x i8]* @.str899, i32 0, i32 0), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit883 to %0*), i32 108, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite898 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array901 = internal constant [5 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype878 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram885 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram890 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram896 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram900 to %0*)], section "llvm.metadata" ; <[5 x %0*]*> [#uses=1] - at llvm.dbg.composite902 = internal constant %llvm.dbg.composite.type { i32 458771, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([16 x i8]* @.str810, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit803 to %0*), i32 49, i64 8, i64 8, i64 0, i32 0, %0* null, %0* bitcast ([5 x %0*]* @llvm.dbg.array901 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.derivedtype903 = internal constant %llvm.dbg.derivedtype.type { i32 458780, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite902 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str904 = internal constant [5 x i8] c"_M_p\00", section "llvm.metadata" ; <[5 x i8]*> [#uses=1] - at llvm.dbg.derivedtype905 = internal constant %llvm.dbg.derivedtype.type { i32 458765, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([5 x i8]* @.str904, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 264, i64 32, i64 32, i64 0, i32 0, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype837 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.derivedtype906 = internal constant %llvm.dbg.derivedtype.type { i32 458767, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 32, i64 32, i64 0, i32 0, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite911 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array907 = internal constant [4 x %0*] [%0* null, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype906 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype837 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype887 to %0*)], section "llvm.metadata" ; <[4 x %0*]*> [#uses=1] - at llvm.dbg.composite908 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([4 x %0*]* @llvm.dbg.array907 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.subprogram909 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([13 x i8]* @.str808, i32 0, i32 0), i8* getelementptr ([13 x i8]* @.str808, i32 0, i32 0), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 261, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite908 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array910 = internal constant [3 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype903 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype905 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram909 to %0*)], section "llvm.metadata" ; <[3 x %0*]*> [#uses=1] - at llvm.dbg.composite911 = internal constant %llvm.dbg.composite.type { i32 458771, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([13 x i8]* @.str808, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 260, i64 32, i64 32, i64 0, i32 0, %0* null, %0* bitcast ([3 x %0*]* @llvm.dbg.array910 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str912 = internal constant [12 x i8] c"_M_dataplus\00", section "llvm.metadata" ; <[12 x i8]*> [#uses=1] - at llvm.dbg.derivedtype913 = internal constant %llvm.dbg.derivedtype.type { i32 458765, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([12 x i8]* @.str912, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 276, i64 32, i64 32, i64 0, i32 1, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite911 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str914 = internal constant [7 x i8] c"string\00", section "llvm.metadata" ; <[7 x i8]*> [#uses=1] - at llvm.dbg.derivedtype915 = internal constant %llvm.dbg.derivedtype.type { i32 458774, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([7 x i8]* @.str914, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit803 to %0*), i32 56, i64 0, i64 0, i64 0, i32 0, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1693 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.derivedtype916 = internal constant %llvm.dbg.derivedtype.type { i32 458790, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 32, i64 32, i64 0, i32 0, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype915 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.derivedtype917 = internal constant %llvm.dbg.derivedtype.type { i32 458767, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 32, i64 32, i64 0, i32 0, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype916 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array918 = internal constant [2 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype837 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype917 to %0*)], section "llvm.metadata" ; <[2 x %0*]*> [#uses=1] - at llvm.dbg.composite919 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([2 x %0*]* @llvm.dbg.array918 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str920 = internal constant [8 x i8] c"_M_data\00", section "llvm.metadata" ; <[8 x i8]*> [#uses=1] - at .str921 = internal constant [17 x i8] c"_ZNKSs7_M_dataEv\00", section "llvm.metadata" ; <[17 x i8]*> [#uses=1] - at llvm.dbg.subprogram922 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([8 x i8]* @.str920, i32 0, i32 0), i8* getelementptr ([8 x i8]* @.str920, i32 0, i32 0), i8* getelementptr ([17 x i8]* @.str921, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 279, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite919 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.derivedtype923 = internal constant %llvm.dbg.derivedtype.type { i32 458767, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 32, i64 32, i64 0, i32 0, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1693 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array924 = internal constant [3 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype837 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype923 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype837 to %0*)], section "llvm.metadata" ; <[3 x %0*]*> [#uses=1] - at llvm.dbg.composite925 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([3 x %0*]* @llvm.dbg.array924 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str926 = internal constant [17 x i8] c"_ZNSs7_M_dataEPc\00", section "llvm.metadata" ; <[17 x i8]*> [#uses=1] - at llvm.dbg.subprogram927 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([8 x i8]* @.str920, i32 0, i32 0), i8* getelementptr ([8 x i8]* @.str920, i32 0, i32 0), i8* getelementptr ([17 x i8]* @.str926, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 283, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite925 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str928 = internal constant [5 x i8] c"_Rep\00", section "llvm.metadata" ; <[5 x i8]*> [#uses=1] - at .str930 = internal constant [10 x i8] c"_Rep_base\00", section "llvm.metadata" ; <[10 x i8]*> [#uses=1] - at .str932 = internal constant [10 x i8] c"_M_length\00", section "llvm.metadata" ; <[10 x i8]*> [#uses=1] - at llvm.dbg.derivedtype933 = internal constant %llvm.dbg.derivedtype.type { i32 458765, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([10 x i8]* @.str932, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 149, i64 32, i64 32, i64 0, i32 0, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype282 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str934 = internal constant [12 x i8] c"_M_capacity\00", section "llvm.metadata" ; <[12 x i8]*> [#uses=1] - at llvm.dbg.derivedtype935 = internal constant %llvm.dbg.derivedtype.type { i32 458765, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([12 x i8]* @.str934, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 150, i64 32, i64 32, i64 32, i32 0, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype282 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str936 = internal constant [10 x i8] c"ptrdiff_t\00", section "llvm.metadata" ; <[10 x i8]*> [#uses=1] - at llvm.dbg.derivedtype937 = internal constant %llvm.dbg.derivedtype.type { i32 458774, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([10 x i8]* @.str936, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit677 to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype269 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.derivedtype938 = internal constant %llvm.dbg.derivedtype.type { i32 458790, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 32, i64 32, i64 0, i32 0, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype937 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str939 = internal constant [8 x i8] c"types.h\00", section "llvm.metadata" ; <[8 x i8]*> [#uses=1] - at llvm.dbg.compile_unit940 = internal constant %llvm.dbg.compile_unit.type { i32 458769, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.compile_units to %0*), i32 4, i8* getelementptr ([8 x i8]* @.str939, i32 0, i32 0), i8* getelementptr ([18 x i8]* @.str69, i32 0, i32 0), i8* getelementptr ([52 x i8]* @.str2, i32 0, i32 0), i1 false, i1 false, i8* null, i32 -1 }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] - at .str941 = internal constant [10 x i8] c"__int32_t\00", section "llvm.metadata" ; <[10 x i8]*> [#uses=1] - at llvm.dbg.derivedtype942 = internal constant %llvm.dbg.derivedtype.type { i32 458774, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([10 x i8]* @.str941, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit940 to %0*), i32 43, i64 0, i64 0, i64 0, i32 0, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype938 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str943 = internal constant [8 x i8] c"__pid_t\00", section "llvm.metadata" ; <[8 x i8]*> [#uses=1] - at llvm.dbg.derivedtype944 = internal constant %llvm.dbg.derivedtype.type { i32 458774, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([8 x i8]* @.str943, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit940 to %0*), i32 145, i64 0, i64 0, i64 0, i32 0, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype942 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str945 = internal constant [10 x i8] c"__daddr_t\00", section "llvm.metadata" ; <[10 x i8]*> [#uses=1] - at llvm.dbg.derivedtype946 = internal constant %llvm.dbg.derivedtype.type { i32 458774, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([10 x i8]* @.str945, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit940 to %0*), i32 154, i64 0, i64 0, i64 0, i32 0, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype944 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str947 = internal constant [8 x i8] c"__key_t\00", section "llvm.metadata" ; <[8 x i8]*> [#uses=1] - at llvm.dbg.derivedtype948 = internal constant %llvm.dbg.derivedtype.type { i32 458774, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([8 x i8]* @.str947, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit940 to %0*), i32 157, i64 0, i64 0, i64 0, i32 0, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype946 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str949 = internal constant [12 x i8] c"__clockid_t\00", section "llvm.metadata" ; <[12 x i8]*> [#uses=1] - at llvm.dbg.derivedtype950 = internal constant %llvm.dbg.derivedtype.type { i32 458774, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([12 x i8]* @.str949, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit940 to %0*), i32 158, i64 0, i64 0, i64 0, i32 0, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype948 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str951 = internal constant [10 x i8] c"__ssize_t\00", section "llvm.metadata" ; <[10 x i8]*> [#uses=1] - at llvm.dbg.derivedtype952 = internal constant %llvm.dbg.derivedtype.type { i32 458774, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([10 x i8]* @.str951, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit940 to %0*), i32 181, i64 0, i64 0, i64 0, i32 0, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype950 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str953 = internal constant [11 x i8] c"__intptr_t\00", section "llvm.metadata" ; <[11 x i8]*> [#uses=1] - at llvm.dbg.derivedtype954 = internal constant %llvm.dbg.derivedtype.type { i32 458774, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([11 x i8]* @.str953, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit940 to %0*), i32 189, i64 0, i64 0, i64 0, i32 0, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype952 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str955 = internal constant [12 x i8] c"_G_config.h\00", section "llvm.metadata" ; <[12 x i8]*> [#uses=1] - at .str956 = internal constant [13 x i8] c"/usr/include\00", section "llvm.metadata" ; <[13 x i8]*> [#uses=1] - at llvm.dbg.compile_unit957 = internal constant %llvm.dbg.compile_unit.type { i32 458769, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.compile_units to %0*), i32 4, i8* getelementptr ([12 x i8]* @.str955, i32 0, i32 0), i8* getelementptr ([13 x i8]* @.str956, i32 0, i32 0), i8* getelementptr ([52 x i8]* @.str2, i32 0, i32 0), i1 false, i1 false, i8* null, i32 -1 }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] - at .str958 = internal constant [11 x i8] c"_G_int32_t\00", section "llvm.metadata" ; <[11 x i8]*> [#uses=1] - at llvm.dbg.derivedtype959 = internal constant %llvm.dbg.derivedtype.type { i32 458774, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([11 x i8]* @.str958, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit957 to %0*), i32 55, i64 0, i64 0, i64 0, i32 0, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype954 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str960 = internal constant [11 x i8] c"nl_types.h\00", section "llvm.metadata" ; <[11 x i8]*> [#uses=1] - at llvm.dbg.compile_unit961 = internal constant %llvm.dbg.compile_unit.type { i32 458769, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.compile_units to %0*), i32 4, i8* getelementptr ([11 x i8]* @.str960, i32 0, i32 0), i8* getelementptr ([13 x i8]* @.str956, i32 0, i32 0), i8* getelementptr ([52 x i8]* @.str2, i32 0, i32 0), i1 false, i1 false, i8* null, i32 -1 }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] - at .str962 = internal constant [8 x i8] c"nl_item\00", section "llvm.metadata" ; <[8 x i8]*> [#uses=1] - at llvm.dbg.derivedtype963 = internal constant %llvm.dbg.derivedtype.type { i32 458774, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([8 x i8]* @.str962, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit961 to %0*), i32 34, i64 0, i64 0, i64 0, i32 0, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype959 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str964 = internal constant [7 x i8] c"time.h\00", section "llvm.metadata" ; <[7 x i8]*> [#uses=1] - at llvm.dbg.compile_unit965 = internal constant %llvm.dbg.compile_unit.type { i32 458769, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.compile_units to %0*), i32 4, i8* getelementptr ([7 x i8]* @.str964, i32 0, i32 0), i8* getelementptr ([13 x i8]* @.str956, i32 0, i32 0), i8* getelementptr ([52 x i8]* @.str2, i32 0, i32 0), i1 false, i1 false, i8* null, i32 -1 }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] - at .str966 = internal constant [10 x i8] c"clockid_t\00", section "llvm.metadata" ; <[10 x i8]*> [#uses=1] - at llvm.dbg.derivedtype967 = internal constant %llvm.dbg.derivedtype.type { i32 458774, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([10 x i8]* @.str966, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit965 to %0*), i32 77, i64 0, i64 0, i64 0, i32 0, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype963 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str968 = internal constant [6 x i8] c"pid_t\00", section "llvm.metadata" ; <[6 x i8]*> [#uses=1] - at llvm.dbg.derivedtype969 = internal constant %llvm.dbg.derivedtype.type { i32 458774, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([6 x i8]* @.str968, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit965 to %0*), i32 105, i64 0, i64 0, i64 0, i32 0, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype967 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str970 = internal constant [15 x i8] c"__sig_atomic_t\00", section "llvm.metadata" ; <[15 x i8]*> [#uses=1] - at llvm.dbg.derivedtype971 = internal constant %llvm.dbg.derivedtype.type { i32 458774, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([15 x i8]* @.str970, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit965 to %0*), i32 413, i64 0, i64 0, i64 0, i32 0, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype969 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str972 = internal constant [15 x i8] c"pthreadtypes.h\00", section "llvm.metadata" ; <[15 x i8]*> [#uses=1] - at llvm.dbg.compile_unit973 = internal constant %llvm.dbg.compile_unit.type { i32 458769, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.compile_units to %0*), i32 4, i8* getelementptr ([15 x i8]* @.str972, i32 0, i32 0), i8* getelementptr ([18 x i8]* @.str69, i32 0, i32 0), i8* getelementptr ([52 x i8]* @.str2, i32 0, i32 0), i1 false, i1 false, i8* null, i32 -1 }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] - at .str974 = internal constant [15 x i8] c"pthread_once_t\00", section "llvm.metadata" ; <[15 x i8]*> [#uses=1] - at llvm.dbg.derivedtype975 = internal constant %llvm.dbg.derivedtype.type { i32 458774, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([15 x i8]* @.str974, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit973 to %0*), i32 109, i64 0, i64 0, i64 0, i32 0, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype971 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.derivedtype976 = internal constant %llvm.dbg.derivedtype.type { i32 458805, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 32, i64 32, i64 0, i32 0, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype975 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str977 = internal constant [19 x i8] c"pthread_spinlock_t\00", section "llvm.metadata" ; <[19 x i8]*> [#uses=1] - at llvm.dbg.derivedtype978 = internal constant %llvm.dbg.derivedtype.type { i32 458774, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([19 x i8]* @.str977, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit973 to %0*), i32 142, i64 0, i64 0, i64 0, i32 0, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype976 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str979 = internal constant [10 x i8] c"pthread.h\00", section "llvm.metadata" ; <[10 x i8]*> [#uses=1] - at llvm.dbg.compile_unit980 = internal constant %llvm.dbg.compile_unit.type { i32 458769, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.compile_units to %0*), i32 4, i8* getelementptr ([10 x i8]* @.str979, i32 0, i32 0), i8* getelementptr ([13 x i8]* @.str956, i32 0, i32 0), i8* getelementptr ([52 x i8]* @.str2, i32 0, i32 0), i1 false, i1 false, i8* null, i32 -1 }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] - at .str981 = internal constant [8 x i8] c"ssize_t\00", section "llvm.metadata" ; <[8 x i8]*> [#uses=1] - at llvm.dbg.derivedtype982 = internal constant %llvm.dbg.derivedtype.type { i32 458774, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([8 x i8]* @.str981, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit980 to %0*), i32 1101, i64 0, i64 0, i64 0, i32 0, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype978 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str983 = internal constant [9 x i8] c"unistd.h\00", section "llvm.metadata" ; <[9 x i8]*> [#uses=1] - at llvm.dbg.compile_unit984 = internal constant %llvm.dbg.compile_unit.type { i32 458769, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.compile_units to %0*), i32 4, i8* getelementptr ([9 x i8]* @.str983, i32 0, i32 0), i8* getelementptr ([13 x i8]* @.str956, i32 0, i32 0), i8* getelementptr ([52 x i8]* @.str2, i32 0, i32 0), i1 false, i1 false, i8* null, i32 -1 }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] - at .str985 = internal constant [9 x i8] c"intptr_t\00", section "llvm.metadata" ; <[9 x i8]*> [#uses=1] - at llvm.dbg.derivedtype986 = internal constant %llvm.dbg.derivedtype.type { i32 458774, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([9 x i8]* @.str985, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit984 to %0*), i32 226, i64 0, i64 0, i64 0, i32 0, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype982 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str987 = internal constant [15 x i8] c"gthr-default.h\00", section "llvm.metadata" ; <[15 x i8]*> [#uses=1] - at .str988 = internal constant [133 x i8] c"/developer/home2/zsth/projects/llvm.org/install/lib/gcc/i686-pc-linux-gnu/4.2.1/../../../../include/c++/4.2.1/i686-pc-linux-gnu/bits\00", section "llvm.metadata" ; <[133 x i8]*> [#uses=1] - at llvm.dbg.compile_unit989 = internal constant %llvm.dbg.compile_unit.type { i32 458769, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.compile_units to %0*), i32 4, i8* getelementptr ([15 x i8]* @.str987, i32 0, i32 0), i8* getelementptr ([133 x i8]* @.str988, i32 0, i32 0), i8* getelementptr ([52 x i8]* @.str2, i32 0, i32 0), i1 false, i1 false, i8* null, i32 -1 }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] - at .str990 = internal constant [17 x i8] c"__gthread_once_t\00", section "llvm.metadata" ; <[17 x i8]*> [#uses=1] - at llvm.dbg.derivedtype991 = internal constant %llvm.dbg.derivedtype.type { i32 458774, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([17 x i8]* @.str990, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit989 to %0*), i32 46, i64 0, i64 0, i64 0, i32 0, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype986 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.derivedtype992 = internal constant %llvm.dbg.derivedtype.type { i32 458774, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([10 x i8]* @.str941, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit940 to %0*), i32 43, i64 0, i64 0, i64 0, i32 0, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype991 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str993 = internal constant [9 x i8] c"stdint.h\00", section "llvm.metadata" ; <[9 x i8]*> [#uses=1] - at llvm.dbg.compile_unit994 = internal constant %llvm.dbg.compile_unit.type { i32 458769, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.compile_units to %0*), i32 4, i8* getelementptr ([9 x i8]* @.str993, i32 0, i32 0), i8* getelementptr ([13 x i8]* @.str956, i32 0, i32 0), i8* getelementptr ([52 x i8]* @.str2, i32 0, i32 0), i1 false, i1 false, i8* null, i32 -1 }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] - at .str995 = internal constant [8 x i8] c"int32_t\00", section "llvm.metadata" ; <[8 x i8]*> [#uses=1] - at llvm.dbg.derivedtype996 = internal constant %llvm.dbg.derivedtype.type { i32 458774, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([8 x i8]* @.str995, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit994 to %0*), i32 38, i64 0, i64 0, i64 0, i32 0, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype992 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str997 = internal constant [14 x i8] c"int_least32_t\00", section "llvm.metadata" ; <[14 x i8]*> [#uses=1] - at llvm.dbg.derivedtype998 = internal constant %llvm.dbg.derivedtype.type { i32 458774, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([14 x i8]* @.str997, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit994 to %0*), i32 67, i64 0, i64 0, i64 0, i32 0, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype996 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str999 = internal constant [13 x i8] c"int_fast16_t\00", section "llvm.metadata" ; <[13 x i8]*> [#uses=1] - at llvm.dbg.derivedtype1000 = internal constant %llvm.dbg.derivedtype.type { i32 458774, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([13 x i8]* @.str999, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit994 to %0*), i32 91, i64 0, i64 0, i64 0, i32 0, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype998 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str1001 = internal constant [13 x i8] c"int_fast32_t\00", section "llvm.metadata" ; <[13 x i8]*> [#uses=1] - at llvm.dbg.derivedtype1002 = internal constant %llvm.dbg.derivedtype.type { i32 458774, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([13 x i8]* @.str1001, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit994 to %0*), i32 97, i64 0, i64 0, i64 0, i32 0, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1000 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str1003 = internal constant [11 x i8] c"postypes.h\00", section "llvm.metadata" ; <[11 x i8]*> [#uses=1] - at llvm.dbg.compile_unit1004 = internal constant %llvm.dbg.compile_unit.type { i32 458769, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.compile_units to %0*), i32 4, i8* getelementptr ([11 x i8]* @.str1003, i32 0, i32 0), i8* getelementptr ([115 x i8]* @.str638, i32 0, i32 0), i8* getelementptr ([52 x i8]* @.str2, i32 0, i32 0), i1 false, i1 false, i8* null, i32 -1 }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] - at .str1005 = internal constant [11 x i8] c"streamsize\00", section "llvm.metadata" ; <[11 x i8]*> [#uses=1] - at llvm.dbg.derivedtype1006 = internal constant %llvm.dbg.derivedtype.type { i32 458774, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([11 x i8]* @.str1005, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit1004 to %0*), i32 72, i64 0, i64 0, i64 0, i32 0, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1002 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str1007 = internal constant [17 x i8] c"/usr/include/sys\00", section "llvm.metadata" ; <[17 x i8]*> [#uses=1] - at llvm.dbg.compile_unit1008 = internal constant %llvm.dbg.compile_unit.type { i32 458769, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.compile_units to %0*), i32 4, i8* getelementptr ([8 x i8]* @.str939, i32 0, i32 0), i8* getelementptr ([17 x i8]* @.str1007, i32 0, i32 0), i8* getelementptr ([52 x i8]* @.str2, i32 0, i32 0), i1 false, i1 false, i8* null, i32 -1 }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] - at .str1009 = internal constant [8 x i8] c"daddr_t\00", section "llvm.metadata" ; <[8 x i8]*> [#uses=1] - at llvm.dbg.derivedtype1010 = internal constant %llvm.dbg.derivedtype.type { i32 458774, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([8 x i8]* @.str1009, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit1008 to %0*), i32 105, i64 0, i64 0, i64 0, i32 0, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1006 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str1011 = internal constant [6 x i8] c"key_t\00", section "llvm.metadata" ; <[6 x i8]*> [#uses=1] - at llvm.dbg.derivedtype1012 = internal constant %llvm.dbg.derivedtype.type { i32 458774, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([6 x i8]* @.str1011, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit1008 to %0*), i32 117, i64 0, i64 0, i64 0, i32 0, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1010 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str1013 = internal constant [11 x i8] c"register_t\00", section "llvm.metadata" ; <[11 x i8]*> [#uses=1] - at llvm.dbg.derivedtype1014 = internal constant %llvm.dbg.derivedtype.type { i32 458774, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([11 x i8]* @.str1013, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit1008 to %0*), i32 204, i64 0, i64 0, i64 0, i32 0, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1012 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.derivedtype1015 = internal constant %llvm.dbg.derivedtype.type { i32 458774, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([10 x i8]* @.str936, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit677 to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1014 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str1016 = internal constant [9 x i8] c"stdlib.h\00", section "llvm.metadata" ; <[9 x i8]*> [#uses=1] - at llvm.dbg.compile_unit1017 = internal constant %llvm.dbg.compile_unit.type { i32 458769, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.compile_units to %0*), i32 4, i8* getelementptr ([9 x i8]* @.str1016, i32 0, i32 0), i8* getelementptr ([13 x i8]* @.str956, i32 0, i32 0), i8* getelementptr ([52 x i8]* @.str2, i32 0, i32 0), i1 false, i1 false, i8* null, i32 -1 }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] - at .str1018 = internal constant [13 x i8] c"_Atomic_word\00", section "llvm.metadata" ; <[13 x i8]*> [#uses=1] - at llvm.dbg.derivedtype1019 = internal constant %llvm.dbg.derivedtype.type { i32 458774, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([13 x i8]* @.str1018, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit1017 to %0*), i32 962, i64 0, i64 0, i64 0, i32 0, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1015 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str1020 = internal constant [12 x i8] c"_M_refcount\00", section "llvm.metadata" ; <[12 x i8]*> [#uses=1] - at llvm.dbg.derivedtype1021 = internal constant %llvm.dbg.derivedtype.type { i32 458765, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([12 x i8]* @.str1020, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 151, i64 32, i64 32, i64 64, i32 0, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1019 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array1022 = internal constant [3 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype933 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype935 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1021 to %0*)], section "llvm.metadata" ; <[3 x %0*]*> [#uses=1] - at llvm.dbg.composite1023 = internal constant %llvm.dbg.composite.type { i32 458771, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([10 x i8]* @.str930, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 148, i64 96, i64 32, i64 0, i32 0, %0* null, %0* bitcast ([3 x %0*]* @llvm.dbg.array1022 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.derivedtype1024 = internal constant %llvm.dbg.derivedtype.type { i32 458780, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1023 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.derivedtype1025 = internal constant %llvm.dbg.derivedtype.type { i32 458768, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 32, i64 32, i64 0, i32 0, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1091 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array1026 = internal constant [1 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1025 to %0*)], section "llvm.metadata" ; <[1 x %0*]*> [#uses=1] - at llvm.dbg.composite1027 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([1 x %0*]* @llvm.dbg.array1026 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str1028 = internal constant [13 x i8] c"_S_empty_rep\00", section "llvm.metadata" ; <[13 x i8]*> [#uses=1] - at .str1029 = internal constant [27 x i8] c"_ZNSs4_Rep12_S_empty_repEv\00", section "llvm.metadata" ; <[27 x i8]*> [#uses=1] - at llvm.dbg.subprogram1030 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([13 x i8]* @.str1028, i32 0, i32 0), i8* getelementptr ([13 x i8]* @.str1028, i32 0, i32 0), i8* getelementptr ([27 x i8]* @.str1029, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 180, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1027 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str1031 = internal constant [5 x i8] c"bool\00", section "llvm.metadata" ; <[5 x i8]*> [#uses=1] - at llvm.dbg.basictype1032 = internal constant %llvm.dbg.basictype.type { i32 458788, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([5 x i8]* @.str1031, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 8, i64 8, i64 0, i32 0, i32 2 }, section "llvm.metadata" ; <%llvm.dbg.basictype.type*> [#uses=1] - at llvm.dbg.derivedtype1033 = internal constant %llvm.dbg.derivedtype.type { i32 458790, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 96, i64 32, i64 0, i32 0, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1091 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.derivedtype1034 = internal constant %llvm.dbg.derivedtype.type { i32 458767, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 32, i64 32, i64 0, i32 0, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1033 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array1035 = internal constant [2 x %0*] [%0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype1032 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1034 to %0*)], section "llvm.metadata" ; <[2 x %0*]*> [#uses=1] - at llvm.dbg.composite1036 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([2 x %0*]* @llvm.dbg.array1035 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str1037 = internal constant [13 x i8] c"_M_is_leaked\00", section "llvm.metadata" ; <[13 x i8]*> [#uses=1] - at .str1038 = internal constant [28 x i8] c"_ZNKSs4_Rep12_M_is_leakedEv\00", section "llvm.metadata" ; <[28 x i8]*> [#uses=1] - at llvm.dbg.subprogram1039 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([13 x i8]* @.str1037, i32 0, i32 0), i8* getelementptr ([13 x i8]* @.str1037, i32 0, i32 0), i8* getelementptr ([28 x i8]* @.str1038, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 190, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1036 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str1040 = internal constant [13 x i8] c"_M_is_shared\00", section "llvm.metadata" ; <[13 x i8]*> [#uses=1] - at .str1041 = internal constant [28 x i8] c"_ZNKSs4_Rep12_M_is_sharedEv\00", section "llvm.metadata" ; <[28 x i8]*> [#uses=1] - at llvm.dbg.subprogram1042 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([13 x i8]* @.str1040, i32 0, i32 0), i8* getelementptr ([13 x i8]* @.str1040, i32 0, i32 0), i8* getelementptr ([28 x i8]* @.str1041, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 194, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1036 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.derivedtype1043 = internal constant %llvm.dbg.derivedtype.type { i32 458767, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 32, i64 32, i64 0, i32 0, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1091 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array1044 = internal constant [2 x %0*] [%0* null, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1043 to %0*)], section "llvm.metadata" ; <[2 x %0*]*> [#uses=1] - at llvm.dbg.composite1045 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([2 x %0*]* @llvm.dbg.array1044 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str1046 = internal constant [14 x i8] c"_M_set_leaked\00", section "llvm.metadata" ; <[14 x i8]*> [#uses=1] - at .str1047 = internal constant [28 x i8] c"_ZNSs4_Rep13_M_set_leakedEv\00", section "llvm.metadata" ; <[28 x i8]*> [#uses=1] - at llvm.dbg.subprogram1048 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([14 x i8]* @.str1046, i32 0, i32 0), i8* getelementptr ([14 x i8]* @.str1046, i32 0, i32 0), i8* getelementptr ([28 x i8]* @.str1047, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 198, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1045 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str1049 = internal constant [16 x i8] c"_M_set_sharable\00", section "llvm.metadata" ; <[16 x i8]*> [#uses=1] - at .str1050 = internal constant [30 x i8] c"_ZNSs4_Rep15_M_set_sharableEv\00", section "llvm.metadata" ; <[30 x i8]*> [#uses=1] - at llvm.dbg.subprogram1051 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([16 x i8]* @.str1049, i32 0, i32 0), i8* getelementptr ([16 x i8]* @.str1049, i32 0, i32 0), i8* getelementptr ([30 x i8]* @.str1050, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 202, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1045 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array1052 = internal constant [3 x %0*] [%0* null, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1043 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype280 to %0*)], section "llvm.metadata" ; <[3 x %0*]*> [#uses=1] - at llvm.dbg.composite1053 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([3 x %0*]* @llvm.dbg.array1052 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str1054 = internal constant [27 x i8] c"_M_set_length_and_sharable\00", section "llvm.metadata" ; <[27 x i8]*> [#uses=1] - at .str1055 = internal constant [41 x i8] c"_ZNSs4_Rep26_M_set_length_and_sharableEj\00", section "llvm.metadata" ; <[41 x i8]*> [#uses=1] - at llvm.dbg.subprogram1056 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([27 x i8]* @.str1054, i32 0, i32 0), i8* getelementptr ([27 x i8]* @.str1054, i32 0, i32 0), i8* getelementptr ([41 x i8]* @.str1055, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 206, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1053 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array1057 = internal constant [2 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype837 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1043 to %0*)], section "llvm.metadata" ; <[2 x %0*]*> [#uses=1] - at llvm.dbg.composite1058 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([2 x %0*]* @llvm.dbg.array1057 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str1059 = internal constant [11 x i8] c"_M_refdata\00", section "llvm.metadata" ; <[11 x i8]*> [#uses=1] - at .str1060 = internal constant [25 x i8] c"_ZNSs4_Rep10_M_refdataEv\00", section "llvm.metadata" ; <[25 x i8]*> [#uses=1] - at llvm.dbg.subprogram1061 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([11 x i8]* @.str1059, i32 0, i32 0), i8* getelementptr ([11 x i8]* @.str1059, i32 0, i32 0), i8* getelementptr ([25 x i8]* @.str1060, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 216, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1058 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array1062 = internal constant [4 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype837 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1043 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype887 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype887 to %0*)], section "llvm.metadata" ; <[4 x %0*]*> [#uses=1] - at llvm.dbg.composite1063 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([4 x %0*]* @llvm.dbg.array1062 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str1064 = internal constant [8 x i8] c"_M_grab\00", section "llvm.metadata" ; <[8 x i8]*> [#uses=1] - at .str1065 = internal constant [30 x i8] c"_ZNSs4_Rep7_M_grabERKSaIcES2_\00", section "llvm.metadata" ; <[30 x i8]*> [#uses=1] - at llvm.dbg.subprogram1066 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([8 x i8]* @.str1064, i32 0, i32 0), i8* getelementptr ([8 x i8]* @.str1064, i32 0, i32 0), i8* getelementptr ([30 x i8]* @.str1065, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 220, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1063 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array1067 = internal constant [4 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1043 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype280 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype280 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype887 to %0*)], section "llvm.metadata" ; <[4 x %0*]*> [#uses=1] - at llvm.dbg.composite1068 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([4 x %0*]* @llvm.dbg.array1067 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str1069 = internal constant [17 x i8] c"basic_string.tcc\00", section "llvm.metadata" ; <[17 x i8]*> [#uses=1] - at llvm.dbg.compile_unit1070 = internal constant %llvm.dbg.compile_unit.type { i32 458769, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.compile_units to %0*), i32 4, i8* getelementptr ([17 x i8]* @.str1069, i32 0, i32 0), i8* getelementptr ([115 x i8]* @.str638, i32 0, i32 0), i8* getelementptr ([52 x i8]* @.str2, i32 0, i32 0), i1 false, i1 false, i8* null, i32 -1 }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] - at .str1071 = internal constant [10 x i8] c"_S_create\00", section "llvm.metadata" ; <[10 x i8]*> [#uses=1] - at .str1072 = internal constant [31 x i8] c"_ZNSs4_Rep9_S_createEjjRKSaIcE\00", section "llvm.metadata" ; <[31 x i8]*> [#uses=1] - at llvm.dbg.subprogram1073 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([10 x i8]* @.str1071, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str1071, i32 0, i32 0), i8* getelementptr ([31 x i8]* @.str1072, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit1070 to %0*), i32 529, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1068 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array1074 = internal constant [3 x %0*] [%0* null, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1043 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype887 to %0*)], section "llvm.metadata" ; <[3 x %0*]*> [#uses=1] - at llvm.dbg.composite1075 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([3 x %0*]* @llvm.dbg.array1074 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str1076 = internal constant [11 x i8] c"_M_dispose\00", section "llvm.metadata" ; <[11 x i8]*> [#uses=1] - at .str1077 = internal constant [31 x i8] c"_ZNSs4_Rep10_M_disposeERKSaIcE\00", section "llvm.metadata" ; <[31 x i8]*> [#uses=1] - at llvm.dbg.subprogram1078 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([11 x i8]* @.str1076, i32 0, i32 0), i8* getelementptr ([11 x i8]* @.str1076, i32 0, i32 0), i8* getelementptr ([31 x i8]* @.str1077, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 231, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1075 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str1079 = internal constant [11 x i8] c"_M_destroy\00", section "llvm.metadata" ; <[11 x i8]*> [#uses=1] - at .str1080 = internal constant [31 x i8] c"_ZNSs4_Rep10_M_destroyERKSaIcE\00", section "llvm.metadata" ; <[31 x i8]*> [#uses=1] - at llvm.dbg.subprogram1081 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([11 x i8]* @.str1079, i32 0, i32 0), i8* getelementptr ([11 x i8]* @.str1079, i32 0, i32 0), i8* getelementptr ([31 x i8]* @.str1080, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit1070 to %0*), i32 427, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1075 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str1082 = internal constant [11 x i8] c"_M_refcopy\00", section "llvm.metadata" ; <[11 x i8]*> [#uses=1] - at .str1083 = internal constant [25 x i8] c"_ZNSs4_Rep10_M_refcopyEv\00", section "llvm.metadata" ; <[25 x i8]*> [#uses=1] - at llvm.dbg.subprogram1084 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([11 x i8]* @.str1082, i32 0, i32 0), i8* getelementptr ([11 x i8]* @.str1082, i32 0, i32 0), i8* getelementptr ([25 x i8]* @.str1083, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 245, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1058 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array1085 = internal constant [4 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype837 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1043 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype887 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype280 to %0*)], section "llvm.metadata" ; <[4 x %0*]*> [#uses=1] - at llvm.dbg.composite1086 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([4 x %0*]* @llvm.dbg.array1085 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str1087 = internal constant [9 x i8] c"_M_clone\00", section "llvm.metadata" ; <[9 x i8]*> [#uses=1] - at .str1088 = internal constant [29 x i8] c"_ZNSs4_Rep8_M_cloneERKSaIcEj\00", section "llvm.metadata" ; <[29 x i8]*> [#uses=1] - at llvm.dbg.subprogram1089 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([9 x i8]* @.str1087, i32 0, i32 0), i8* getelementptr ([9 x i8]* @.str1087, i32 0, i32 0), i8* getelementptr ([29 x i8]* @.str1088, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit1070 to %0*), i32 606, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1086 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array1090 = internal constant [14 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1024 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1030 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1039 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1042 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1048 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1051 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1056 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1061 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1066 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1073 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1078 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1081 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.d bg.subprogram1084 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1089 to %0*)], section "llvm.metadata" ; <[14 x %0*]*> [#uses=1] - at llvm.dbg.composite1091 = internal constant %llvm.dbg.composite.type { i32 458771, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([5 x i8]* @.str928, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 155, i64 96, i64 32, i64 0, i32 0, %0* null, %0* bitcast ([14 x %0*]* @llvm.dbg.array1090 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.derivedtype1092 = internal constant %llvm.dbg.derivedtype.type { i32 458767, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 32, i64 32, i64 0, i32 0, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1091 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array1093 = internal constant [2 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1092 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype917 to %0*)], section "llvm.metadata" ; <[2 x %0*]*> [#uses=1] - at llvm.dbg.composite1094 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([2 x %0*]* @llvm.dbg.array1093 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str1095 = internal constant [16 x i8] c"_ZNKSs6_M_repEv\00", section "llvm.metadata" ; <[16 x i8]*> [#uses=1] - at llvm.dbg.subprogram1096 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([9 x i8]* @.str1087, i32 0, i32 0), i8* getelementptr ([9 x i8]* @.str1087, i32 0, i32 0), i8* getelementptr ([16 x i8]* @.str1095, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 287, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1094 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str1097 = internal constant [15 x i8] c"stl_iterator.h\00", section "llvm.metadata" ; <[15 x i8]*> [#uses=1] - at llvm.dbg.compile_unit1098 = internal constant %llvm.dbg.compile_unit.type { i32 458769, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.compile_units to %0*), i32 4, i8* getelementptr ([15 x i8]* @.str1097, i32 0, i32 0), i8* getelementptr ([115 x i8]* @.str638, i32 0, i32 0), i8* getelementptr ([52 x i8]* @.str2, i32 0, i32 0), i1 false, i1 false, i8* null, i32 -1 }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] - at .str1099 = internal constant [97 x i8] c"__normal_iterator, std::allocator > >\00", section "llvm.metadata" ; <[97 x i8]*> [#uses=1] - at .str1101 = internal constant [11 x i8] c"_M_current\00", section "llvm.metadata" ; <[11 x i8]*> [#uses=1] - at llvm.dbg.derivedtype1102 = internal constant %llvm.dbg.derivedtype.type { i32 458765, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([11 x i8]* @.str1101, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit1098 to %0*), i32 639, i64 32, i64 32, i64 0, i32 2, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype837 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.derivedtype1103 = internal constant %llvm.dbg.derivedtype.type { i32 458767, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 32, i64 32, i64 0, i32 0, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1176 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array1104 = internal constant [2 x %0*] [%0* null, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1103 to %0*)], section "llvm.metadata" ; <[2 x %0*]*> [#uses=1] - at llvm.dbg.composite1105 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([2 x %0*]* @llvm.dbg.array1104 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str1106 = internal constant [18 x i8] c"__normal_iterator\00", section "llvm.metadata" ; <[18 x i8]*> [#uses=1] - at llvm.dbg.subprogram1107 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([18 x i8]* @.str1106, i32 0, i32 0), i8* getelementptr ([18 x i8]* @.str1106, i32 0, i32 0), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit1098 to %0*), i32 650, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1105 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str1108 = internal constant [10 x i8] c"__caddr_t\00", section "llvm.metadata" ; <[10 x i8]*> [#uses=1] - at llvm.dbg.derivedtype1109 = internal constant %llvm.dbg.derivedtype.type { i32 458774, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([10 x i8]* @.str1108, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit940 to %0*), i32 188, i64 0, i64 0, i64 0, i32 0, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype837 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str1110 = internal constant [15 x i8] c"__gnuc_va_list\00", section "llvm.metadata" ; <[15 x i8]*> [#uses=1] - at llvm.dbg.derivedtype1111 = internal constant %llvm.dbg.derivedtype.type { i32 458774, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([15 x i8]* @.str1110, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit957 to %0*), i32 58, i64 0, i64 0, i64 0, i32 0, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1109 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str1112 = internal constant [8 x i8] c"libio.h\00", section "llvm.metadata" ; <[8 x i8]*> [#uses=1] - at llvm.dbg.compile_unit1113 = internal constant %llvm.dbg.compile_unit.type { i32 458769, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.compile_units to %0*), i32 4, i8* getelementptr ([8 x i8]* @.str1112, i32 0, i32 0), i8* getelementptr ([13 x i8]* @.str956, i32 0, i32 0), i8* getelementptr ([52 x i8]* @.str2, i32 0, i32 0), i1 false, i1 false, i8* null, i32 -1 }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] - at .str1114 = internal constant [8 x i8] c"va_list\00", section "llvm.metadata" ; <[8 x i8]*> [#uses=1] - at llvm.dbg.derivedtype1115 = internal constant %llvm.dbg.derivedtype.type { i32 458774, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([8 x i8]* @.str1114, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit1113 to %0*), i32 491, i64 0, i64 0, i64 0, i32 0, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1111 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.derivedtype1116 = internal constant %llvm.dbg.derivedtype.type { i32 458790, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 32, i64 32, i64 0, i32 0, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1115 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.derivedtype1117 = internal constant %llvm.dbg.derivedtype.type { i32 458768, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 32, i64 32, i64 0, i32 0, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1116 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array1118 = internal constant [3 x %0*] [%0* null, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1103 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1117 to %0*)], section "llvm.metadata" ; <[3 x %0*]*> [#uses=1] - at llvm.dbg.composite1119 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([3 x %0*]* @llvm.dbg.array1118 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.subprogram1120 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([18 x i8]* @.str1106, i32 0, i32 0), i8* getelementptr ([18 x i8]* @.str1106, i32 0, i32 0), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit1098 to %0*), i32 653, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1119 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.composite1121 = internal constant %llvm.dbg.composite.type { i32 458771, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit1098 to %0*), i32 637, i64 0, i64 0, i64 0, i32 4, %0* null, %0* null, i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.derivedtype1122 = internal constant %llvm.dbg.derivedtype.type { i32 458790, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 8, i64 0, i32 0, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1121 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.derivedtype1123 = internal constant %llvm.dbg.derivedtype.type { i32 458768, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 32, i64 32, i64 0, i32 0, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1122 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array1124 = internal constant [3 x %0*] [%0* null, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1103 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1123 to %0*)], section "llvm.metadata" ; <[3 x %0*]*> [#uses=1] - at llvm.dbg.composite1125 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([3 x %0*]* @llvm.dbg.array1124 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.subprogram1126 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([18 x i8]* @.str1106, i32 0, i32 0), i8* getelementptr ([18 x i8]* @.str1106, i32 0, i32 0), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit1098 to %0*), i32 660, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1125 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.derivedtype1127 = internal constant %llvm.dbg.derivedtype.type { i32 458790, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 32, i64 32, i64 0, i32 0, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1176 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.derivedtype1128 = internal constant %llvm.dbg.derivedtype.type { i32 458767, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 32, i64 32, i64 0, i32 0, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1127 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array1129 = internal constant [2 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype839 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1128 to %0*)], section "llvm.metadata" ; <[2 x %0*]*> [#uses=1] - at llvm.dbg.composite1130 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([2 x %0*]* @llvm.dbg.array1129 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str1131 = internal constant [44 x i8] c"_ZNK9__gnu_cxx17__normal_iteratorIPcSsEdeEv\00", section "llvm.metadata" ; <[44 x i8]*> [#uses=1] - at llvm.dbg.subprogram1132 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([10 x i8]* @.str463, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str463, i32 0, i32 0), i8* getelementptr ([44 x i8]* @.str1131, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit1098 to %0*), i32 665, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1130 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array1133 = internal constant [2 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype837 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1128 to %0*)], section "llvm.metadata" ; <[2 x %0*]*> [#uses=1] - at llvm.dbg.composite1134 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([2 x %0*]* @llvm.dbg.array1133 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str1135 = internal constant [11 x i8] c"operator->\00", section "llvm.metadata" ; <[11 x i8]*> [#uses=1] - at .str1136 = internal constant [44 x i8] c"_ZNK9__gnu_cxx17__normal_iteratorIPcSsEptEv\00", section "llvm.metadata" ; <[44 x i8]*> [#uses=1] - at llvm.dbg.subprogram1137 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([11 x i8]* @.str1135, i32 0, i32 0), i8* getelementptr ([11 x i8]* @.str1135, i32 0, i32 0), i8* getelementptr ([44 x i8]* @.str1136, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit1098 to %0*), i32 669, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1134 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.derivedtype1138 = internal constant %llvm.dbg.derivedtype.type { i32 458768, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 32, i64 32, i64 0, i32 0, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1176 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array1139 = internal constant [2 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1138 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1103 to %0*)], section "llvm.metadata" ; <[2 x %0*]*> [#uses=1] - at llvm.dbg.composite1140 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([2 x %0*]* @llvm.dbg.array1139 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str1141 = internal constant [11 x i8] c"operator++\00", section "llvm.metadata" ; <[11 x i8]*> [#uses=1] - at .str1142 = internal constant [43 x i8] c"_ZN9__gnu_cxx17__normal_iteratorIPcSsEppEv\00", section "llvm.metadata" ; <[43 x i8]*> [#uses=1] - at llvm.dbg.subprogram1143 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([11 x i8]* @.str1141, i32 0, i32 0), i8* getelementptr ([11 x i8]* @.str1141, i32 0, i32 0), i8* getelementptr ([43 x i8]* @.str1142, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit1098 to %0*), i32 673, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1140 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array1144 = internal constant [3 x %0*] [%0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1176 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1103 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype269 to %0*)], section "llvm.metadata" ; <[3 x %0*]*> [#uses=1] - at llvm.dbg.composite1145 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([3 x %0*]* @llvm.dbg.array1144 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str1146 = internal constant [43 x i8] c"_ZN9__gnu_cxx17__normal_iteratorIPcSsEppEi\00", section "llvm.metadata" ; <[43 x i8]*> [#uses=1] - at llvm.dbg.subprogram1147 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([11 x i8]* @.str1141, i32 0, i32 0), i8* getelementptr ([11 x i8]* @.str1141, i32 0, i32 0), i8* getelementptr ([43 x i8]* @.str1146, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit1098 to %0*), i32 680, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1145 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str1148 = internal constant [11 x i8] c"operator--\00", section "llvm.metadata" ; <[11 x i8]*> [#uses=1] - at .str1149 = internal constant [43 x i8] c"_ZN9__gnu_cxx17__normal_iteratorIPcSsEmmEv\00", section "llvm.metadata" ; <[43 x i8]*> [#uses=1] - at llvm.dbg.subprogram1150 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([11 x i8]* @.str1148, i32 0, i32 0), i8* getelementptr ([11 x i8]* @.str1148, i32 0, i32 0), i8* getelementptr ([43 x i8]* @.str1149, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit1098 to %0*), i32 685, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1140 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str1151 = internal constant [43 x i8] c"_ZN9__gnu_cxx17__normal_iteratorIPcSsEmmEi\00", section "llvm.metadata" ; <[43 x i8]*> [#uses=1] - at llvm.dbg.subprogram1152 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([11 x i8]* @.str1148, i32 0, i32 0), i8* getelementptr ([11 x i8]* @.str1148, i32 0, i32 0), i8* getelementptr ([43 x i8]* @.str1151, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit1098 to %0*), i32 692, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1145 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.derivedtype1153 = internal constant %llvm.dbg.derivedtype.type { i32 458768, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 32, i64 32, i64 0, i32 0, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1015 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array1154 = internal constant [3 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype839 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1128 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1153 to %0*)], section "llvm.metadata" ; <[3 x %0*]*> [#uses=1] - at llvm.dbg.composite1155 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([3 x %0*]* @llvm.dbg.array1154 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str1156 = internal constant [46 x i8] c"_ZNK9__gnu_cxx17__normal_iteratorIPcSsEixERKi\00", section "llvm.metadata" ; <[46 x i8]*> [#uses=1] - at llvm.dbg.subprogram1157 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([11 x i8]* @.str334, i32 0, i32 0), i8* getelementptr ([11 x i8]* @.str334, i32 0, i32 0), i8* getelementptr ([46 x i8]* @.str1156, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit1098 to %0*), i32 697, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1155 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array1158 = internal constant [3 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1138 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1103 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1153 to %0*)], section "llvm.metadata" ; <[3 x %0*]*> [#uses=1] - at llvm.dbg.composite1159 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([3 x %0*]* @llvm.dbg.array1158 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str1160 = internal constant [45 x i8] c"_ZN9__gnu_cxx17__normal_iteratorIPcSsEpLERKi\00", section "llvm.metadata" ; <[45 x i8]*> [#uses=1] - at llvm.dbg.subprogram1161 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([11 x i8]* @.str92, i32 0, i32 0), i8* getelementptr ([11 x i8]* @.str92, i32 0, i32 0), i8* getelementptr ([45 x i8]* @.str1160, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit1098 to %0*), i32 701, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1159 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array1162 = internal constant [3 x %0*] [%0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1176 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1128 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1153 to %0*)], section "llvm.metadata" ; <[3 x %0*]*> [#uses=1] - at llvm.dbg.composite1163 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([3 x %0*]* @llvm.dbg.array1162 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str1164 = internal constant [46 x i8] c"_ZNK9__gnu_cxx17__normal_iteratorIPcSsEplERKi\00", section "llvm.metadata" ; <[46 x i8]*> [#uses=1] - at llvm.dbg.subprogram1165 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([10 x i8]* @.str347, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str347, i32 0, i32 0), i8* getelementptr ([46 x i8]* @.str1164, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit1098 to %0*), i32 705, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1163 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str1166 = internal constant [45 x i8] c"_ZN9__gnu_cxx17__normal_iteratorIPcSsEmIERKi\00", section "llvm.metadata" ; <[45 x i8]*> [#uses=1] - at llvm.dbg.subprogram1167 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([11 x i8]* @.str95, i32 0, i32 0), i8* getelementptr ([11 x i8]* @.str95, i32 0, i32 0), i8* getelementptr ([45 x i8]* @.str1166, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit1098 to %0*), i32 709, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1159 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str1168 = internal constant [46 x i8] c"_ZNK9__gnu_cxx17__normal_iteratorIPcSsEmiERKi\00", section "llvm.metadata" ; <[46 x i8]*> [#uses=1] - at llvm.dbg.subprogram1169 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([10 x i8]* @.str344, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str344, i32 0, i32 0), i8* getelementptr ([46 x i8]* @.str1168, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit1098 to %0*), i32 713, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1163 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array1170 = internal constant [2 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1117 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1128 to %0*)], section "llvm.metadata" ; <[2 x %0*]*> [#uses=1] - at llvm.dbg.composite1171 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([2 x %0*]* @llvm.dbg.array1170 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str1172 = internal constant [5 x i8] c"base\00", section "llvm.metadata" ; <[5 x i8]*> [#uses=1] - at .str1173 = internal constant [47 x i8] c"_ZNK9__gnu_cxx17__normal_iteratorIPcSsE4baseEv\00", section "llvm.metadata" ; <[47 x i8]*> [#uses=1] - at llvm.dbg.subprogram1174 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([5 x i8]* @.str1172, i32 0, i32 0), i8* getelementptr ([5 x i8]* @.str1172, i32 0, i32 0), i8* getelementptr ([47 x i8]* @.str1173, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit1098 to %0*), i32 717, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1171 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array1175 = internal constant [16 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1102 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1107 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1120 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1126 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1132 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1137 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1143 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1147 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1150 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1152 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1157 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1161 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.d bg.subprogram1165 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1167 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1169 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1174 to %0*)], section "llvm.metadata" ; <[16 x %0*]*> [#uses=1] - at llvm.dbg.composite1176 = internal constant %llvm.dbg.composite.type { i32 458771, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([97 x i8]* @.str1099, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit1098 to %0*), i32 637, i64 32, i64 32, i64 0, i32 0, %0* null, %0* bitcast ([16 x %0*]* @llvm.dbg.array1175 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.array1177 = internal constant [2 x %0*] [%0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1176 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype917 to %0*)], section "llvm.metadata" ; <[2 x %0*]*> [#uses=1] - at llvm.dbg.composite1178 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([2 x %0*]* @llvm.dbg.array1177 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str1179 = internal constant [19 x i8] c"_ZNKSs9_M_ibeginEv\00", section "llvm.metadata" ; <[19 x i8]*> [#uses=1] - at llvm.dbg.subprogram1180 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([5 x i8]* @.str1172, i32 0, i32 0), i8* getelementptr ([5 x i8]* @.str1172, i32 0, i32 0), i8* getelementptr ([19 x i8]* @.str1179, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 293, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1178 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str1181 = internal constant [8 x i8] c"_M_iend\00", section "llvm.metadata" ; <[8 x i8]*> [#uses=1] - at .str1182 = internal constant [17 x i8] c"_ZNKSs7_M_iendEv\00", section "llvm.metadata" ; <[17 x i8]*> [#uses=1] - at llvm.dbg.subprogram1183 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([8 x i8]* @.str1181, i32 0, i32 0), i8* getelementptr ([8 x i8]* @.str1181, i32 0, i32 0), i8* getelementptr ([17 x i8]* @.str1182, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 297, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1178 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array1184 = internal constant [2 x %0*] [%0* null, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype923 to %0*)], section "llvm.metadata" ; <[2 x %0*]*> [#uses=1] - at llvm.dbg.composite1185 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([2 x %0*]* @llvm.dbg.array1184 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str1186 = internal constant [8 x i8] c"_M_leak\00", section "llvm.metadata" ; <[8 x i8]*> [#uses=1] - at .str1187 = internal constant [16 x i8] c"_ZNSs7_M_leakEv\00", section "llvm.metadata" ; <[16 x i8]*> [#uses=1] - at llvm.dbg.subprogram1188 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([8 x i8]* @.str1186, i32 0, i32 0), i8* getelementptr ([8 x i8]* @.str1186, i32 0, i32 0), i8* getelementptr ([16 x i8]* @.str1187, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 301, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1185 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array1189 = internal constant [4 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype282 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype917 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype280 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype791 to %0*)], section "llvm.metadata" ; <[4 x %0*]*> [#uses=1] - at llvm.dbg.composite1190 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([4 x %0*]* @llvm.dbg.array1189 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str1191 = internal constant [9 x i8] c"_M_check\00", section "llvm.metadata" ; <[9 x i8]*> [#uses=1] - at .str1192 = internal constant [21 x i8] c"_ZNKSs8_M_checkEjPKc\00", section "llvm.metadata" ; <[21 x i8]*> [#uses=1] - at llvm.dbg.subprogram1193 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([9 x i8]* @.str1191, i32 0, i32 0), i8* getelementptr ([9 x i8]* @.str1191, i32 0, i32 0), i8* getelementptr ([21 x i8]* @.str1192, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 308, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1190 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array1194 = internal constant [5 x %0*] [%0* null, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype917 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype280 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype280 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype791 to %0*)], section "llvm.metadata" ; <[5 x %0*]*> [#uses=1] - at llvm.dbg.composite1195 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([5 x %0*]* @llvm.dbg.array1194 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str1196 = internal constant [16 x i8] c"_M_check_length\00", section "llvm.metadata" ; <[16 x i8]*> [#uses=1] - at .str1197 = internal constant [30 x i8] c"_ZNKSs15_M_check_lengthEjjPKc\00", section "llvm.metadata" ; <[30 x i8]*> [#uses=1] - at llvm.dbg.subprogram1198 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([16 x i8]* @.str1196, i32 0, i32 0), i8* getelementptr ([16 x i8]* @.str1196, i32 0, i32 0), i8* getelementptr ([30 x i8]* @.str1197, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 316, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1195 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array1199 = internal constant [4 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype282 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype917 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype280 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype280 to %0*)], section "llvm.metadata" ; <[4 x %0*]*> [#uses=1] - at llvm.dbg.composite1200 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([4 x %0*]* @llvm.dbg.array1199 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str1201 = internal constant [9 x i8] c"_M_limit\00", section "llvm.metadata" ; <[9 x i8]*> [#uses=1] - at .str1202 = internal constant [19 x i8] c"_ZNKSs8_M_limitEjj\00", section "llvm.metadata" ; <[19 x i8]*> [#uses=1] - at llvm.dbg.subprogram1203 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([9 x i8]* @.str1201, i32 0, i32 0), i8* getelementptr ([9 x i8]* @.str1201, i32 0, i32 0), i8* getelementptr ([19 x i8]* @.str1202, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 324, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1200 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array1204 = internal constant [3 x %0*] [%0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype1032 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype917 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype791 to %0*)], section "llvm.metadata" ; <[3 x %0*]*> [#uses=1] - at llvm.dbg.composite1205 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([3 x %0*]* @llvm.dbg.array1204 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str1206 = internal constant [12 x i8] c"_M_disjunct\00", section "llvm.metadata" ; <[12 x i8]*> [#uses=1] - at .str1207 = internal constant [24 x i8] c"_ZNKSs11_M_disjunctEPKc\00", section "llvm.metadata" ; <[24 x i8]*> [#uses=1] - at llvm.dbg.subprogram1208 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([12 x i8]* @.str1206, i32 0, i32 0), i8* getelementptr ([12 x i8]* @.str1206, i32 0, i32 0), i8* getelementptr ([24 x i8]* @.str1207, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 332, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1205 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array1209 = internal constant [4 x %0*] [%0* null, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype837 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype791 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype280 to %0*)], section "llvm.metadata" ; <[4 x %0*]*> [#uses=1] - at llvm.dbg.composite1210 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([4 x %0*]* @llvm.dbg.array1209 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str1211 = internal constant [8 x i8] c"_M_copy\00", section "llvm.metadata" ; <[8 x i8]*> [#uses=1] - at .str1212 = internal constant [21 x i8] c"_ZNSs7_M_copyEPcPKcj\00", section "llvm.metadata" ; <[21 x i8]*> [#uses=1] - at llvm.dbg.subprogram1213 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([8 x i8]* @.str1211, i32 0, i32 0), i8* getelementptr ([8 x i8]* @.str1211, i32 0, i32 0), i8* getelementptr ([21 x i8]* @.str1212, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 341, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1210 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str1214 = internal constant [8 x i8] c"_M_move\00", section "llvm.metadata" ; <[8 x i8]*> [#uses=1] - at .str1215 = internal constant [21 x i8] c"_ZNSs7_M_moveEPcPKcj\00", section "llvm.metadata" ; <[21 x i8]*> [#uses=1] - at llvm.dbg.subprogram1216 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([8 x i8]* @.str1214, i32 0, i32 0), i8* getelementptr ([8 x i8]* @.str1214, i32 0, i32 0), i8* getelementptr ([21 x i8]* @.str1215, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 350, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1210 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array1217 = internal constant [4 x %0*] [%0* null, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype837 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype280 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype672 to %0*)], section "llvm.metadata" ; <[4 x %0*]*> [#uses=1] - at llvm.dbg.composite1218 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([4 x %0*]* @llvm.dbg.array1217 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str1219 = internal constant [10 x i8] c"_M_assign\00", section "llvm.metadata" ; <[10 x i8]*> [#uses=1] - at .str1220 = internal constant [21 x i8] c"_ZNSs9_M_assignEPcjc\00", section "llvm.metadata" ; <[21 x i8]*> [#uses=1] - at llvm.dbg.subprogram1221 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([10 x i8]* @.str1219, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str1219, i32 0, i32 0), i8* getelementptr ([21 x i8]* @.str1220, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 359, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1218 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array1222 = internal constant [4 x %0*] [%0* null, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype837 to %0*), %0* null, %0* null], section "llvm.metadata" ; <[4 x %0*]*> [#uses=1] - at llvm.dbg.composite1223 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([4 x %0*]* @llvm.dbg.array1222 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str1224 = internal constant [14 x i8] c"_S_copy_chars\00", section "llvm.metadata" ; <[14 x i8]*> [#uses=1] - at llvm.dbg.subprogram1225 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([14 x i8]* @.str1224, i32 0, i32 0), i8* getelementptr ([14 x i8]* @.str1224, i32 0, i32 0), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 371, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1223 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array1226 = internal constant [4 x %0*] [%0* null, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype837 to %0*), %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1176 to %0*), %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1176 to %0*)], section "llvm.metadata" ; <[4 x %0*]*> [#uses=1] - at llvm.dbg.composite1227 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([4 x %0*]* @llvm.dbg.array1226 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str1228 = internal constant [64 x i8] c"_ZNSs13_S_copy_charsEPcN9__gnu_cxx17__normal_iteratorIS_SsEES2_\00", section "llvm.metadata" ; <[64 x i8]*> [#uses=1] - at llvm.dbg.subprogram1229 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([14 x i8]* @.str1224, i32 0, i32 0), i8* getelementptr ([14 x i8]* @.str1224, i32 0, i32 0), i8* getelementptr ([64 x i8]* @.str1228, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 378, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1227 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str1230 = internal constant [103 x i8] c"__normal_iterator, std::allocator > >\00", section "llvm.metadata" ; <[103 x i8]*> [#uses=1] - at llvm.dbg.composite1231 = internal constant %llvm.dbg.composite.type { i32 458771, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([103 x i8]* @.str1230, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit1098 to %0*), i32 637, i64 0, i64 0, i64 0, i32 4, %0* null, %0* null, i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.array1232 = internal constant [4 x %0*] [%0* null, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype837 to %0*), %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1231 to %0*), %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1231 to %0*)], section "llvm.metadata" ; <[4 x %0*]*> [#uses=1] - at llvm.dbg.composite1233 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([4 x %0*]* @llvm.dbg.array1232 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str1234 = internal constant [65 x i8] c"_ZNSs13_S_copy_charsEPcN9__gnu_cxx17__normal_iteratorIPKcSsEES4_\00", section "llvm.metadata" ; <[65 x i8]*> [#uses=1] - at llvm.dbg.subprogram1235 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([14 x i8]* @.str1224, i32 0, i32 0), i8* getelementptr ([14 x i8]* @.str1224, i32 0, i32 0), i8* getelementptr ([65 x i8]* @.str1234, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 382, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1233 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array1236 = internal constant [4 x %0*] [%0* null, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype837 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype837 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype837 to %0*)], section "llvm.metadata" ; <[4 x %0*]*> [#uses=1] - at llvm.dbg.composite1237 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([4 x %0*]* @llvm.dbg.array1236 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str1238 = internal constant [28 x i8] c"_ZNSs13_S_copy_charsEPcS_S_\00", section "llvm.metadata" ; <[28 x i8]*> [#uses=1] - at llvm.dbg.subprogram1239 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([14 x i8]* @.str1224, i32 0, i32 0), i8* getelementptr ([14 x i8]* @.str1224, i32 0, i32 0), i8* getelementptr ([28 x i8]* @.str1238, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 386, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1237 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array1240 = internal constant [4 x %0*] [%0* null, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype837 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype791 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype791 to %0*)], section "llvm.metadata" ; <[4 x %0*]*> [#uses=1] - at llvm.dbg.composite1241 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([4 x %0*]* @llvm.dbg.array1240 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str1242 = internal constant [30 x i8] c"_ZNSs13_S_copy_charsEPcPKcS1_\00", section "llvm.metadata" ; <[30 x i8]*> [#uses=1] - at llvm.dbg.subprogram1243 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([14 x i8]* @.str1224, i32 0, i32 0), i8* getelementptr ([14 x i8]* @.str1224, i32 0, i32 0), i8* getelementptr ([30 x i8]* @.str1242, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 390, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1241 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array1244 = internal constant [5 x %0*] [%0* null, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype923 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype280 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype280 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype280 to %0*)], section "llvm.metadata" ; <[5 x %0*]*> [#uses=1] - at llvm.dbg.composite1245 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([5 x %0*]* @llvm.dbg.array1244 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str1246 = internal constant [10 x i8] c"_M_mutate\00", section "llvm.metadata" ; <[10 x i8]*> [#uses=1] - at .str1247 = internal constant [20 x i8] c"_ZNSs9_M_mutateEjjj\00", section "llvm.metadata" ; <[20 x i8]*> [#uses=1] - at llvm.dbg.subprogram1248 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([10 x i8]* @.str1246, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str1246, i32 0, i32 0), i8* getelementptr ([20 x i8]* @.str1247, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit1070 to %0*), i32 451, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1245 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str1249 = internal constant [13 x i8] c"_M_leak_hard\00", section "llvm.metadata" ; <[13 x i8]*> [#uses=1] - at .str1250 = internal constant [22 x i8] c"_ZNSs12_M_leak_hardEv\00", section "llvm.metadata" ; <[22 x i8]*> [#uses=1] - at llvm.dbg.subprogram1251 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([13 x i8]* @.str1249, i32 0, i32 0), i8* getelementptr ([13 x i8]* @.str1249, i32 0, i32 0), i8* getelementptr ([22 x i8]* @.str1250, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit1070 to %0*), i32 437, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1185 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str1252 = internal constant [22 x i8] c"_ZNSs12_S_empty_repEv\00", section "llvm.metadata" ; <[22 x i8]*> [#uses=1] - at llvm.dbg.subprogram1253 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([13 x i8]* @.str1028, i32 0, i32 0), i8* getelementptr ([13 x i8]* @.str1028, i32 0, i32 0), i8* getelementptr ([22 x i8]* @.str1252, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 400, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1027 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str1254 = internal constant [13 x i8] c"basic_string\00", section "llvm.metadata" ; <[13 x i8]*> [#uses=1] - at llvm.dbg.subprogram1255 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([13 x i8]* @.str1254, i32 0, i32 0), i8* getelementptr ([13 x i8]* @.str1254, i32 0, i32 0), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 2055, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1185 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array1256 = internal constant [3 x %0*] [%0* null, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype923 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype887 to %0*)], section "llvm.metadata" ; <[3 x %0*]*> [#uses=1] - at llvm.dbg.composite1257 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([3 x %0*]* @llvm.dbg.array1256 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.subprogram1258 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([13 x i8]* @.str1254, i32 0, i32 0), i8* getelementptr ([13 x i8]* @.str1254, i32 0, i32 0), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit1070 to %0*), i32 191, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1257 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.derivedtype1259 = internal constant %llvm.dbg.derivedtype.type { i32 458768, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 32, i64 32, i64 0, i32 0, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype916 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array1260 = internal constant [3 x %0*] [%0* null, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype923 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1259 to %0*)], section "llvm.metadata" ; <[3 x %0*]*> [#uses=1] - at llvm.dbg.composite1261 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([3 x %0*]* @llvm.dbg.array1260 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.subprogram1262 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([13 x i8]* @.str1254, i32 0, i32 0), i8* getelementptr ([13 x i8]* @.str1254, i32 0, i32 0), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit1070 to %0*), i32 183, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1261 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array1263 = internal constant [5 x %0*] [%0* null, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype923 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1259 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype280 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype280 to %0*)], section "llvm.metadata" ; <[5 x %0*]*> [#uses=1] - at llvm.dbg.composite1264 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([5 x %0*]* @llvm.dbg.array1263 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.subprogram1265 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([13 x i8]* @.str1254, i32 0, i32 0), i8* getelementptr ([13 x i8]* @.str1254, i32 0, i32 0), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit1070 to %0*), i32 197, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1264 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array1266 = internal constant [6 x %0*] [%0* null, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype923 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1259 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype280 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype280 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype887 to %0*)], section "llvm.metadata" ; <[6 x %0*]*> [#uses=1] - at llvm.dbg.composite1267 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([6 x %0*]* @llvm.dbg.array1266 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.subprogram1268 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([13 x i8]* @.str1254, i32 0, i32 0), i8* getelementptr ([13 x i8]* @.str1254, i32 0, i32 0), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit1070 to %0*), i32 208, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1267 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array1269 = internal constant [5 x %0*] [%0* null, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype923 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype791 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype280 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype887 to %0*)], section "llvm.metadata" ; <[5 x %0*]*> [#uses=1] - at llvm.dbg.composite1270 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([5 x %0*]* @llvm.dbg.array1269 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.subprogram1271 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([13 x i8]* @.str1254, i32 0, i32 0), i8* getelementptr ([13 x i8]* @.str1254, i32 0, i32 0), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit1070 to %0*), i32 219, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1270 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array1272 = internal constant [4 x %0*] [%0* null, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype923 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype791 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype887 to %0*)], section "llvm.metadata" ; <[4 x %0*]*> [#uses=1] - at llvm.dbg.composite1273 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([4 x %0*]* @llvm.dbg.array1272 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.subprogram1274 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([13 x i8]* @.str1254, i32 0, i32 0), i8* getelementptr ([13 x i8]* @.str1254, i32 0, i32 0), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit1070 to %0*), i32 226, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1273 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array1275 = internal constant [5 x %0*] [%0* null, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype923 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype280 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype672 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype887 to %0*)], section "llvm.metadata" ; <[5 x %0*]*> [#uses=1] - at llvm.dbg.composite1276 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([5 x %0*]* @llvm.dbg.array1275 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.subprogram1277 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([13 x i8]* @.str1254, i32 0, i32 0), i8* getelementptr ([13 x i8]* @.str1254, i32 0, i32 0), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit1070 to %0*), i32 233, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1276 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array1278 = internal constant [5 x %0*] [%0* null, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype923 to %0*), %0* null, %0* null, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype887 to %0*)], section "llvm.metadata" ; <[5 x %0*]*> [#uses=1] - at llvm.dbg.composite1279 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([5 x %0*]* @llvm.dbg.array1278 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.subprogram1280 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([13 x i8]* @.str1254, i32 0, i32 0), i8* getelementptr ([13 x i8]* @.str1254, i32 0, i32 0), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 477, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1279 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array1281 = internal constant [3 x %0*] [%0* null, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype923 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype269 to %0*)], section "llvm.metadata" ; <[3 x %0*]*> [#uses=1] - at llvm.dbg.composite1282 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([3 x %0*]* @llvm.dbg.array1281 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str1283 = internal constant [14 x i8] c"~basic_string\00", section "llvm.metadata" ; <[14 x i8]*> [#uses=1] - at llvm.dbg.subprogram1284 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([14 x i8]* @.str1283, i32 0, i32 0), i8* getelementptr ([14 x i8]* @.str1283, i32 0, i32 0), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 482, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1282 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.derivedtype1285 = internal constant %llvm.dbg.derivedtype.type { i32 458768, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 32, i64 32, i64 0, i32 0, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1693 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array1286 = internal constant [3 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1285 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype923 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1259 to %0*)], section "llvm.metadata" ; <[3 x %0*]*> [#uses=1] - at llvm.dbg.composite1287 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([3 x %0*]* @llvm.dbg.array1286 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str1288 = internal constant [13 x i8] c"_ZNSsaSERKSs\00", section "llvm.metadata" ; <[13 x i8]*> [#uses=1] - at llvm.dbg.subprogram1289 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([10 x i8]* @.str89, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str89, i32 0, i32 0), i8* getelementptr ([13 x i8]* @.str1288, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 490, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1287 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array1290 = internal constant [3 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1285 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype923 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype791 to %0*)], section "llvm.metadata" ; <[3 x %0*]*> [#uses=1] - at llvm.dbg.composite1291 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([3 x %0*]* @llvm.dbg.array1290 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str1292 = internal constant [12 x i8] c"_ZNSsaSEPKc\00", section "llvm.metadata" ; <[12 x i8]*> [#uses=1] - at llvm.dbg.subprogram1293 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([10 x i8]* @.str89, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str89, i32 0, i32 0), i8* getelementptr ([12 x i8]* @.str1292, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 498, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1291 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array1294 = internal constant [3 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1285 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype923 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype672 to %0*)], section "llvm.metadata" ; <[3 x %0*]*> [#uses=1] - at llvm.dbg.composite1295 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([3 x %0*]* @llvm.dbg.array1294 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str1296 = internal constant [10 x i8] c"_ZNSsaSEc\00", section "llvm.metadata" ; <[10 x i8]*> [#uses=1] - at llvm.dbg.subprogram1297 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([10 x i8]* @.str89, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str89, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str1296, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 509, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1295 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array1298 = internal constant [2 x %0*] [%0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1176 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype923 to %0*)], section "llvm.metadata" ; <[2 x %0*]*> [#uses=1] - at llvm.dbg.composite1299 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([2 x %0*]* @llvm.dbg.array1298 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str1300 = internal constant [6 x i8] c"begin\00", section "llvm.metadata" ; <[6 x i8]*> [#uses=1] - at .str1301 = internal constant [14 x i8] c"_ZNSs5beginEv\00", section "llvm.metadata" ; <[14 x i8]*> [#uses=1] - at llvm.dbg.subprogram1302 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([6 x i8]* @.str1300, i32 0, i32 0), i8* getelementptr ([6 x i8]* @.str1300, i32 0, i32 0), i8* getelementptr ([14 x i8]* @.str1301, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 521, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1299 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array1303 = internal constant [2 x %0*] [%0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1231 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype917 to %0*)], section "llvm.metadata" ; <[2 x %0*]*> [#uses=1] - at llvm.dbg.composite1304 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([2 x %0*]* @llvm.dbg.array1303 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str1305 = internal constant [15 x i8] c"_ZNKSs5beginEv\00", section "llvm.metadata" ; <[15 x i8]*> [#uses=1] - at llvm.dbg.subprogram1306 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([6 x i8]* @.str1300, i32 0, i32 0), i8* getelementptr ([6 x i8]* @.str1300, i32 0, i32 0), i8* getelementptr ([15 x i8]* @.str1305, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 532, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1304 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str1307 = internal constant [4 x i8] c"end\00", section "llvm.metadata" ; <[4 x i8]*> [#uses=1] - at .str1308 = internal constant [12 x i8] c"_ZNSs3endEv\00", section "llvm.metadata" ; <[12 x i8]*> [#uses=1] - at llvm.dbg.subprogram1309 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([4 x i8]* @.str1307, i32 0, i32 0), i8* getelementptr ([4 x i8]* @.str1307, i32 0, i32 0), i8* getelementptr ([12 x i8]* @.str1308, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 540, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1299 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str1310 = internal constant [13 x i8] c"_ZNKSs3endEv\00", section "llvm.metadata" ; <[13 x i8]*> [#uses=1] - at llvm.dbg.subprogram1311 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([4 x i8]* @.str1307, i32 0, i32 0), i8* getelementptr ([4 x i8]* @.str1307, i32 0, i32 0), i8* getelementptr ([13 x i8]* @.str1310, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 551, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1304 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str1312 = internal constant [128 x i8] c"reverse_iterator<__gnu_cxx::__normal_iterator, std::allocator > > >\00", section "llvm.metadata" ; <[128 x i8]*> [#uses=1] - at llvm.dbg.composite1313 = internal constant %llvm.dbg.composite.type { i32 458771, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([128 x i8]* @.str1312, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit1098 to %0*), i32 100, i64 0, i64 0, i64 0, i32 4, %0* null, %0* null, i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.array1314 = internal constant [2 x %0*] [%0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1313 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype923 to %0*)], section "llvm.metadata" ; <[2 x %0*]*> [#uses=1] - at llvm.dbg.composite1315 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([2 x %0*]* @llvm.dbg.array1314 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str1316 = internal constant [7 x i8] c"rbegin\00", section "llvm.metadata" ; <[7 x i8]*> [#uses=1] - at .str1317 = internal constant [15 x i8] c"_ZNSs6rbeginEv\00", section "llvm.metadata" ; <[15 x i8]*> [#uses=1] - at llvm.dbg.subprogram1318 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([7 x i8]* @.str1316, i32 0, i32 0), i8* getelementptr ([7 x i8]* @.str1316, i32 0, i32 0), i8* getelementptr ([15 x i8]* @.str1317, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 560, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1315 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str1319 = internal constant [134 x i8] c"reverse_iterator<__gnu_cxx::__normal_iterator, std::allocator > > >\00", section "llvm.metadata" ; <[134 x i8]*> [#uses=1] - at llvm.dbg.composite1320 = internal constant %llvm.dbg.composite.type { i32 458771, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([134 x i8]* @.str1319, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit1098 to %0*), i32 100, i64 0, i64 0, i64 0, i32 4, %0* null, %0* null, i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.array1321 = internal constant [2 x %0*] [%0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1320 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype917 to %0*)], section "llvm.metadata" ; <[2 x %0*]*> [#uses=1] - at llvm.dbg.composite1322 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([2 x %0*]* @llvm.dbg.array1321 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str1323 = internal constant [16 x i8] c"_ZNKSs6rbeginEv\00", section "llvm.metadata" ; <[16 x i8]*> [#uses=1] - at llvm.dbg.subprogram1324 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([7 x i8]* @.str1316, i32 0, i32 0), i8* getelementptr ([7 x i8]* @.str1316, i32 0, i32 0), i8* getelementptr ([16 x i8]* @.str1323, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 569, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1322 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str1325 = internal constant [5 x i8] c"rend\00", section "llvm.metadata" ; <[5 x i8]*> [#uses=1] - at .str1326 = internal constant [13 x i8] c"_ZNSs4rendEv\00", section "llvm.metadata" ; <[13 x i8]*> [#uses=1] - at llvm.dbg.subprogram1327 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([5 x i8]* @.str1325, i32 0, i32 0), i8* getelementptr ([5 x i8]* @.str1325, i32 0, i32 0), i8* getelementptr ([13 x i8]* @.str1326, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 578, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1315 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str1328 = internal constant [14 x i8] c"_ZNKSs4rendEv\00", section "llvm.metadata" ; <[14 x i8]*> [#uses=1] - at llvm.dbg.subprogram1329 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([5 x i8]* @.str1325, i32 0, i32 0), i8* getelementptr ([5 x i8]* @.str1325, i32 0, i32 0), i8* getelementptr ([14 x i8]* @.str1328, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 587, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1322 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array1330 = internal constant [2 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype282 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype917 to %0*)], section "llvm.metadata" ; <[2 x %0*]*> [#uses=1] - at llvm.dbg.composite1331 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([2 x %0*]* @llvm.dbg.array1330 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str1332 = internal constant [5 x i8] c"size\00", section "llvm.metadata" ; <[5 x i8]*> [#uses=1] - at .str1333 = internal constant [14 x i8] c"_ZNKSs4sizeEv\00", section "llvm.metadata" ; <[14 x i8]*> [#uses=1] - at llvm.dbg.subprogram1334 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([5 x i8]* @.str1332, i32 0, i32 0), i8* getelementptr ([5 x i8]* @.str1332, i32 0, i32 0), i8* getelementptr ([14 x i8]* @.str1333, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 595, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1331 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str1335 = internal constant [7 x i8] c"length\00", section "llvm.metadata" ; <[7 x i8]*> [#uses=1] - at .str1336 = internal constant [16 x i8] c"_ZNKSs6lengthEv\00", section "llvm.metadata" ; <[16 x i8]*> [#uses=1] - at llvm.dbg.subprogram1337 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([7 x i8]* @.str1335, i32 0, i32 0), i8* getelementptr ([7 x i8]* @.str1335, i32 0, i32 0), i8* getelementptr ([16 x i8]* @.str1336, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 601, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1331 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str1338 = internal constant [18 x i8] c"_ZNKSs8max_sizeEv\00", section "llvm.metadata" ; <[18 x i8]*> [#uses=1] - at llvm.dbg.subprogram1339 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([9 x i8]* @.str863, i32 0, i32 0), i8* getelementptr ([9 x i8]* @.str863, i32 0, i32 0), i8* getelementptr ([18 x i8]* @.str1338, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 606, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1331 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array1340 = internal constant [4 x %0*] [%0* null, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype923 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype280 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype672 to %0*)], section "llvm.metadata" ; <[4 x %0*]*> [#uses=1] - at llvm.dbg.composite1341 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([4 x %0*]* @llvm.dbg.array1340 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str1342 = internal constant [7 x i8] c"resize\00", section "llvm.metadata" ; <[7 x i8]*> [#uses=1] - at .str1343 = internal constant [16 x i8] c"_ZNSs6resizeEjc\00", section "llvm.metadata" ; <[16 x i8]*> [#uses=1] - at llvm.dbg.subprogram1344 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([7 x i8]* @.str1342, i32 0, i32 0), i8* getelementptr ([7 x i8]* @.str1342, i32 0, i32 0), i8* getelementptr ([16 x i8]* @.str1343, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit1070 to %0*), i32 622, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1341 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array1345 = internal constant [3 x %0*] [%0* null, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype923 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype280 to %0*)], section "llvm.metadata" ; <[3 x %0*]*> [#uses=1] - at llvm.dbg.composite1346 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([3 x %0*]* @llvm.dbg.array1345 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str1347 = internal constant [15 x i8] c"_ZNSs6resizeEj\00", section "llvm.metadata" ; <[15 x i8]*> [#uses=1] - at llvm.dbg.subprogram1348 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([7 x i8]* @.str1342, i32 0, i32 0), i8* getelementptr ([7 x i8]* @.str1342, i32 0, i32 0), i8* getelementptr ([15 x i8]* @.str1347, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 633, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1346 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str1349 = internal constant [9 x i8] c"capacity\00", section "llvm.metadata" ; <[9 x i8]*> [#uses=1] - at .str1350 = internal constant [18 x i8] c"_ZNKSs8capacityEv\00", section "llvm.metadata" ; <[18 x i8]*> [#uses=1] - at llvm.dbg.subprogram1351 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([9 x i8]* @.str1349, i32 0, i32 0), i8* getelementptr ([9 x i8]* @.str1349, i32 0, i32 0), i8* getelementptr ([18 x i8]* @.str1350, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 641, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1331 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.composite1352 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([3 x %0*]* @llvm.dbg.array1345 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str1353 = internal constant [8 x i8] c"reserve\00", section "llvm.metadata" ; <[8 x i8]*> [#uses=1] - at .str1354 = internal constant [16 x i8] c"_ZNSs7reserveEj\00", section "llvm.metadata" ; <[16 x i8]*> [#uses=1] - at llvm.dbg.subprogram1355 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([8 x i8]* @.str1353, i32 0, i32 0), i8* getelementptr ([8 x i8]* @.str1353, i32 0, i32 0), i8* getelementptr ([16 x i8]* @.str1354, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit1070 to %0*), i32 484, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1352 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str1356 = internal constant [6 x i8] c"clear\00", section "llvm.metadata" ; <[6 x i8]*> [#uses=1] - at .str1357 = internal constant [14 x i8] c"_ZNSs5clearEv\00", section "llvm.metadata" ; <[14 x i8]*> [#uses=1] - at llvm.dbg.subprogram1358 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([6 x i8]* @.str1356, i32 0, i32 0), i8* getelementptr ([6 x i8]* @.str1356, i32 0, i32 0), i8* getelementptr ([14 x i8]* @.str1357, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 668, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1185 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array1359 = internal constant [2 x %0*] [%0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype1032 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype917 to %0*)], section "llvm.metadata" ; <[2 x %0*]*> [#uses=1] - at llvm.dbg.composite1360 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([2 x %0*]* @llvm.dbg.array1359 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str1361 = internal constant [6 x i8] c"empty\00", section "llvm.metadata" ; <[6 x i8]*> [#uses=1] - at .str1362 = internal constant [15 x i8] c"_ZNKSs5emptyEv\00", section "llvm.metadata" ; <[15 x i8]*> [#uses=1] - at llvm.dbg.subprogram1363 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([6 x i8]* @.str1361, i32 0, i32 0), i8* getelementptr ([6 x i8]* @.str1361, i32 0, i32 0), i8* getelementptr ([15 x i8]* @.str1362, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 675, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1360 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array1364 = internal constant [3 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype845 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype917 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype280 to %0*)], section "llvm.metadata" ; <[3 x %0*]*> [#uses=1] - at llvm.dbg.composite1365 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([3 x %0*]* @llvm.dbg.array1364 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str1366 = internal constant [11 x i8] c"_ZNKSsixEj\00", section "llvm.metadata" ; <[11 x i8]*> [#uses=1] - at llvm.dbg.subprogram1367 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([11 x i8]* @.str334, i32 0, i32 0), i8* getelementptr ([11 x i8]* @.str334, i32 0, i32 0), i8* getelementptr ([11 x i8]* @.str1366, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 690, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1365 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array1368 = internal constant [3 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype839 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype923 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype280 to %0*)], section "llvm.metadata" ; <[3 x %0*]*> [#uses=1] - at llvm.dbg.composite1369 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([3 x %0*]* @llvm.dbg.array1368 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str1370 = internal constant [10 x i8] c"_ZNSsixEj\00", section "llvm.metadata" ; <[10 x i8]*> [#uses=1] - at llvm.dbg.subprogram1371 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([11 x i8]* @.str334, i32 0, i32 0), i8* getelementptr ([11 x i8]* @.str334, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str1370, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 707, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1369 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str1372 = internal constant [3 x i8] c"at\00", section "llvm.metadata" ; <[3 x i8]*> [#uses=1] - at .str1373 = internal constant [12 x i8] c"_ZNKSs2atEj\00", section "llvm.metadata" ; <[12 x i8]*> [#uses=1] - at llvm.dbg.subprogram1374 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([3 x i8]* @.str1372, i32 0, i32 0), i8* getelementptr ([3 x i8]* @.str1372, i32 0, i32 0), i8* getelementptr ([12 x i8]* @.str1373, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 728, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1365 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str1375 = internal constant [11 x i8] c"_ZNSs2atEj\00", section "llvm.metadata" ; <[11 x i8]*> [#uses=1] - at llvm.dbg.subprogram1376 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([3 x i8]* @.str1372, i32 0, i32 0), i8* getelementptr ([3 x i8]* @.str1372, i32 0, i32 0), i8* getelementptr ([11 x i8]* @.str1375, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 747, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1369 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str1377 = internal constant [13 x i8] c"_ZNSspLERKSs\00", section "llvm.metadata" ; <[13 x i8]*> [#uses=1] - at llvm.dbg.subprogram1378 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([11 x i8]* @.str92, i32 0, i32 0), i8* getelementptr ([11 x i8]* @.str92, i32 0, i32 0), i8* getelementptr ([13 x i8]* @.str1377, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 762, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1287 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str1379 = internal constant [12 x i8] c"_ZNSspLEPKc\00", section "llvm.metadata" ; <[12 x i8]*> [#uses=1] - at llvm.dbg.subprogram1380 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([11 x i8]* @.str92, i32 0, i32 0), i8* getelementptr ([11 x i8]* @.str92, i32 0, i32 0), i8* getelementptr ([12 x i8]* @.str1379, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 771, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1291 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str1381 = internal constant [10 x i8] c"_ZNSspLEc\00", section "llvm.metadata" ; <[10 x i8]*> [#uses=1] - at llvm.dbg.subprogram1382 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([11 x i8]* @.str92, i32 0, i32 0), i8* getelementptr ([11 x i8]* @.str92, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str1381, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 780, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1295 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str1383 = internal constant [7 x i8] c"append\00", section "llvm.metadata" ; <[7 x i8]*> [#uses=1] - at .str1384 = internal constant [18 x i8] c"_ZNSs6appendERKSs\00", section "llvm.metadata" ; <[18 x i8]*> [#uses=1] - at llvm.dbg.subprogram1385 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([7 x i8]* @.str1383, i32 0, i32 0), i8* getelementptr ([7 x i8]* @.str1383, i32 0, i32 0), i8* getelementptr ([18 x i8]* @.str1384, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit1070 to %0*), i32 330, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1287 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array1386 = internal constant [5 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1285 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype923 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1259 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype280 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype280 to %0*)], section "llvm.metadata" ; <[5 x %0*]*> [#uses=1] - at llvm.dbg.composite1387 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([5 x %0*]* @llvm.dbg.array1386 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str1388 = internal constant [20 x i8] c"_ZNSs6appendERKSsjj\00", section "llvm.metadata" ; <[20 x i8]*> [#uses=1] - at llvm.dbg.subprogram1389 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([7 x i8]* @.str1383, i32 0, i32 0), i8* getelementptr ([7 x i8]* @.str1383, i32 0, i32 0), i8* getelementptr ([20 x i8]* @.str1388, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit1070 to %0*), i32 347, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1387 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array1390 = internal constant [4 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1285 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype923 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype791 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype280 to %0*)], section "llvm.metadata" ; <[4 x %0*]*> [#uses=1] - at llvm.dbg.composite1391 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([4 x %0*]* @llvm.dbg.array1390 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str1392 = internal constant [18 x i8] c"_ZNSs6appendEPKcj\00", section "llvm.metadata" ; <[18 x i8]*> [#uses=1] - at llvm.dbg.subprogram1393 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([7 x i8]* @.str1383, i32 0, i32 0), i8* getelementptr ([7 x i8]* @.str1383, i32 0, i32 0), i8* getelementptr ([18 x i8]* @.str1392, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit1070 to %0*), i32 303, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1391 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str1394 = internal constant [17 x i8] c"_ZNSs6appendEPKc\00", section "llvm.metadata" ; <[17 x i8]*> [#uses=1] - at llvm.dbg.subprogram1395 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([7 x i8]* @.str1383, i32 0, i32 0), i8* getelementptr ([7 x i8]* @.str1383, i32 0, i32 0), i8* getelementptr ([17 x i8]* @.str1394, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 824, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1291 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array1396 = internal constant [4 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1285 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype923 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype280 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype672 to %0*)], section "llvm.metadata" ; <[4 x %0*]*> [#uses=1] - at llvm.dbg.composite1397 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([4 x %0*]* @llvm.dbg.array1396 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str1398 = internal constant [16 x i8] c"_ZNSs6appendEjc\00", section "llvm.metadata" ; <[16 x i8]*> [#uses=1] - at llvm.dbg.subprogram1399 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([7 x i8]* @.str1383, i32 0, i32 0), i8* getelementptr ([7 x i8]* @.str1383, i32 0, i32 0), i8* getelementptr ([16 x i8]* @.str1398, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit1070 to %0*), i32 286, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1397 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array1400 = internal constant [4 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1285 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype923 to %0*), %0* null, %0* null], section "llvm.metadata" ; <[4 x %0*]*> [#uses=1] - at llvm.dbg.composite1401 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([4 x %0*]* @llvm.dbg.array1400 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.subprogram1402 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([7 x i8]* @.str1383, i32 0, i32 0), i8* getelementptr ([7 x i8]* @.str1383, i32 0, i32 0), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 851, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1401 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array1403 = internal constant [3 x %0*] [%0* null, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype923 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype672 to %0*)], section "llvm.metadata" ; <[3 x %0*]*> [#uses=1] - at llvm.dbg.composite1404 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([3 x %0*]* @llvm.dbg.array1403 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str1405 = internal constant [10 x i8] c"push_back\00", section "llvm.metadata" ; <[10 x i8]*> [#uses=1] - at .str1406 = internal constant [18 x i8] c"_ZNSs9push_backEc\00", section "llvm.metadata" ; <[18 x i8]*> [#uses=1] - at llvm.dbg.subprogram1407 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([10 x i8]* @.str1405, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str1405, i32 0, i32 0), i8* getelementptr ([18 x i8]* @.str1406, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 859, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1404 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str1408 = internal constant [7 x i8] c"assign\00", section "llvm.metadata" ; <[7 x i8]*> [#uses=1] - at .str1409 = internal constant [18 x i8] c"_ZNSs6assignERKSs\00", section "llvm.metadata" ; <[18 x i8]*> [#uses=1] - at llvm.dbg.subprogram1410 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([7 x i8]* @.str1408, i32 0, i32 0), i8* getelementptr ([7 x i8]* @.str1408, i32 0, i32 0), i8* getelementptr ([18 x i8]* @.str1409, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit1070 to %0*), i32 248, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1287 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str1411 = internal constant [20 x i8] c"_ZNSs6assignERKSsjj\00", section "llvm.metadata" ; <[20 x i8]*> [#uses=1] - at llvm.dbg.subprogram1412 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([7 x i8]* @.str1408, i32 0, i32 0), i8* getelementptr ([7 x i8]* @.str1408, i32 0, i32 0), i8* getelementptr ([20 x i8]* @.str1411, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 889, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1387 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str1413 = internal constant [18 x i8] c"_ZNSs6assignEPKcj\00", section "llvm.metadata" ; <[18 x i8]*> [#uses=1] - at llvm.dbg.subprogram1414 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([7 x i8]* @.str1408, i32 0, i32 0), i8* getelementptr ([7 x i8]* @.str1408, i32 0, i32 0), i8* getelementptr ([18 x i8]* @.str1413, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit1070 to %0*), i32 264, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1391 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str1415 = internal constant [17 x i8] c"_ZNSs6assignEPKc\00", section "llvm.metadata" ; <[17 x i8]*> [#uses=1] - at llvm.dbg.subprogram1416 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([7 x i8]* @.str1408, i32 0, i32 0), i8* getelementptr ([7 x i8]* @.str1408, i32 0, i32 0), i8* getelementptr ([17 x i8]* @.str1415, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 917, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1291 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str1417 = internal constant [16 x i8] c"_ZNSs6assignEjc\00", section "llvm.metadata" ; <[16 x i8]*> [#uses=1] - at llvm.dbg.subprogram1418 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([7 x i8]* @.str1408, i32 0, i32 0), i8* getelementptr ([7 x i8]* @.str1408, i32 0, i32 0), i8* getelementptr ([16 x i8]* @.str1417, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 933, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1397 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.composite1419 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([4 x %0*]* @llvm.dbg.array1400 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.subprogram1420 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([7 x i8]* @.str1408, i32 0, i32 0), i8* getelementptr ([7 x i8]* @.str1408, i32 0, i32 0), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 946, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1419 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array1421 = internal constant [5 x %0*] [%0* null, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype923 to %0*), %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1176 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype280 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype672 to %0*)], section "llvm.metadata" ; <[5 x %0*]*> [#uses=1] - at llvm.dbg.composite1422 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([5 x %0*]* @llvm.dbg.array1421 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str1423 = internal constant [7 x i8] c"insert\00", section "llvm.metadata" ; <[7 x i8]*> [#uses=1] - at .str1424 = internal constant [53 x i8] c"_ZNSs6insertEN9__gnu_cxx17__normal_iteratorIPcSsEEjc\00", section "llvm.metadata" ; <[53 x i8]*> [#uses=1] - at llvm.dbg.subprogram1425 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([7 x i8]* @.str1423, i32 0, i32 0), i8* getelementptr ([7 x i8]* @.str1423, i32 0, i32 0), i8* getelementptr ([53 x i8]* @.str1424, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 962, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1422 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array1426 = internal constant [5 x %0*] [%0* null, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype923 to %0*), %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1176 to %0*), %0* null, %0* null], section "llvm.metadata" ; <[5 x %0*]*> [#uses=1] - at llvm.dbg.composite1427 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([5 x %0*]* @llvm.dbg.array1426 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.subprogram1428 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([7 x i8]* @.str1423, i32 0, i32 0), i8* getelementptr ([7 x i8]* @.str1423, i32 0, i32 0), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 978, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1427 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array1429 = internal constant [4 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1285 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype923 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype280 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1259 to %0*)], section "llvm.metadata" ; <[4 x %0*]*> [#uses=1] - at llvm.dbg.composite1430 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([4 x %0*]* @llvm.dbg.array1429 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str1431 = internal constant [19 x i8] c"_ZNSs6insertEjRKSs\00", section "llvm.metadata" ; <[19 x i8]*> [#uses=1] - at llvm.dbg.subprogram1432 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([7 x i8]* @.str1423, i32 0, i32 0), i8* getelementptr ([7 x i8]* @.str1423, i32 0, i32 0), i8* getelementptr ([19 x i8]* @.str1431, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 993, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1430 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array1433 = internal constant [6 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1285 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype923 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype280 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1259 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype280 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype280 to %0*)], section "llvm.metadata" ; <[6 x %0*]*> [#uses=1] - at llvm.dbg.composite1434 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([6 x %0*]* @llvm.dbg.array1433 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str1435 = internal constant [21 x i8] c"_ZNSs6insertEjRKSsjj\00", section "llvm.metadata" ; <[21 x i8]*> [#uses=1] - at llvm.dbg.subprogram1436 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([7 x i8]* @.str1423, i32 0, i32 0), i8* getelementptr ([7 x i8]* @.str1423, i32 0, i32 0), i8* getelementptr ([21 x i8]* @.str1435, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 1016, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1434 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array1437 = internal constant [5 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1285 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype923 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype280 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype791 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype280 to %0*)], section "llvm.metadata" ; <[5 x %0*]*> [#uses=1] - at llvm.dbg.composite1438 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([5 x %0*]* @llvm.dbg.array1437 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str1439 = internal constant [19 x i8] c"_ZNSs6insertEjPKcj\00", section "llvm.metadata" ; <[19 x i8]*> [#uses=1] - at llvm.dbg.subprogram1440 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([7 x i8]* @.str1423, i32 0, i32 0), i8* getelementptr ([7 x i8]* @.str1423, i32 0, i32 0), i8* getelementptr ([19 x i8]* @.str1439, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit1070 to %0*), i32 365, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1438 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array1441 = internal constant [4 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1285 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype923 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype280 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype791 to %0*)], section "llvm.metadata" ; <[4 x %0*]*> [#uses=1] - at llvm.dbg.composite1442 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([4 x %0*]* @llvm.dbg.array1441 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str1443 = internal constant [18 x i8] c"_ZNSs6insertEjPKc\00", section "llvm.metadata" ; <[18 x i8]*> [#uses=1] - at llvm.dbg.subprogram1444 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([7 x i8]* @.str1423, i32 0, i32 0), i8* getelementptr ([7 x i8]* @.str1423, i32 0, i32 0), i8* getelementptr ([18 x i8]* @.str1443, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 1056, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1442 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array1445 = internal constant [5 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1285 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype923 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype280 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype280 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype672 to %0*)], section "llvm.metadata" ; <[5 x %0*]*> [#uses=1] - at llvm.dbg.composite1446 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([5 x %0*]* @llvm.dbg.array1445 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str1447 = internal constant [17 x i8] c"_ZNSs6insertEjjc\00", section "llvm.metadata" ; <[17 x i8]*> [#uses=1] - at llvm.dbg.subprogram1448 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([7 x i8]* @.str1423, i32 0, i32 0), i8* getelementptr ([7 x i8]* @.str1423, i32 0, i32 0), i8* getelementptr ([17 x i8]* @.str1447, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 1079, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1446 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array1449 = internal constant [4 x %0*] [%0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1176 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype923 to %0*), %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1176 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype672 to %0*)], section "llvm.metadata" ; <[4 x %0*]*> [#uses=1] - at llvm.dbg.composite1450 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([4 x %0*]* @llvm.dbg.array1449 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str1451 = internal constant [52 x i8] c"_ZNSs6insertEN9__gnu_cxx17__normal_iteratorIPcSsEEc\00", section "llvm.metadata" ; <[52 x i8]*> [#uses=1] - at llvm.dbg.subprogram1452 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([7 x i8]* @.str1423, i32 0, i32 0), i8* getelementptr ([7 x i8]* @.str1423, i32 0, i32 0), i8* getelementptr ([52 x i8]* @.str1451, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 1096, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1450 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array1453 = internal constant [4 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1285 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype923 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype280 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype280 to %0*)], section "llvm.metadata" ; <[4 x %0*]*> [#uses=1] - at llvm.dbg.composite1454 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([4 x %0*]* @llvm.dbg.array1453 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str1455 = internal constant [6 x i8] c"erase\00", section "llvm.metadata" ; <[6 x i8]*> [#uses=1] - at .str1456 = internal constant [15 x i8] c"_ZNSs5eraseEjj\00", section "llvm.metadata" ; <[15 x i8]*> [#uses=1] - at llvm.dbg.subprogram1457 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([6 x i8]* @.str1455, i32 0, i32 0), i8* getelementptr ([6 x i8]* @.str1455, i32 0, i32 0), i8* getelementptr ([15 x i8]* @.str1456, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 1120, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1454 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array1458 = internal constant [3 x %0*] [%0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1176 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype923 to %0*), %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1176 to %0*)], section "llvm.metadata" ; <[3 x %0*]*> [#uses=1] - at llvm.dbg.composite1459 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([3 x %0*]* @llvm.dbg.array1458 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str1460 = internal constant [50 x i8] c"_ZNSs5eraseEN9__gnu_cxx17__normal_iteratorIPcSsEE\00", section "llvm.metadata" ; <[50 x i8]*> [#uses=1] - at llvm.dbg.subprogram1461 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([6 x i8]* @.str1455, i32 0, i32 0), i8* getelementptr ([6 x i8]* @.str1455, i32 0, i32 0), i8* getelementptr ([50 x i8]* @.str1460, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 1136, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1459 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array1462 = internal constant [4 x %0*] [%0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1176 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype923 to %0*), %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1176 to %0*), %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1176 to %0*)], section "llvm.metadata" ; <[4 x %0*]*> [#uses=1] - at llvm.dbg.composite1463 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([4 x %0*]* @llvm.dbg.array1462 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str1464 = internal constant [53 x i8] c"_ZNSs5eraseEN9__gnu_cxx17__normal_iteratorIPcSsEES2_\00", section "llvm.metadata" ; <[53 x i8]*> [#uses=1] - at llvm.dbg.subprogram1465 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([6 x i8]* @.str1455, i32 0, i32 0), i8* getelementptr ([6 x i8]* @.str1455, i32 0, i32 0), i8* getelementptr ([53 x i8]* @.str1464, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 1156, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1463 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array1466 = internal constant [5 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1285 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype923 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype280 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype280 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1259 to %0*)], section "llvm.metadata" ; <[5 x %0*]*> [#uses=1] - at llvm.dbg.composite1467 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([5 x %0*]* @llvm.dbg.array1466 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str1468 = internal constant [8 x i8] c"replace\00", section "llvm.metadata" ; <[8 x i8]*> [#uses=1] - at .str1469 = internal constant [21 x i8] c"_ZNSs7replaceEjjRKSs\00", section "llvm.metadata" ; <[21 x i8]*> [#uses=1] - at llvm.dbg.subprogram1470 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([8 x i8]* @.str1468, i32 0, i32 0), i8* getelementptr ([8 x i8]* @.str1468, i32 0, i32 0), i8* getelementptr ([21 x i8]* @.str1469, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 1183, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1467 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array1471 = internal constant [7 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1285 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype923 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype280 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype280 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1259 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype280 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype280 to %0*)], section "llvm.metadata" ; <[7 x %0*]*> [#uses=1] - at llvm.dbg.composite1472 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([7 x %0*]* @llvm.dbg.array1471 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str1473 = internal constant [23 x i8] c"_ZNSs7replaceEjjRKSsjj\00", section "llvm.metadata" ; <[23 x i8]*> [#uses=1] - at llvm.dbg.subprogram1474 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([8 x i8]* @.str1468, i32 0, i32 0), i8* getelementptr ([8 x i8]* @.str1468, i32 0, i32 0), i8* getelementptr ([23 x i8]* @.str1473, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 1206, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1472 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array1475 = internal constant [6 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1285 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype923 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype280 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype280 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype791 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype280 to %0*)], section "llvm.metadata" ; <[6 x %0*]*> [#uses=1] - at llvm.dbg.composite1476 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([6 x %0*]* @llvm.dbg.array1475 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str1477 = internal constant [21 x i8] c"_ZNSs7replaceEjjPKcj\00", section "llvm.metadata" ; <[21 x i8]*> [#uses=1] - at llvm.dbg.subprogram1478 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([8 x i8]* @.str1468, i32 0, i32 0), i8* getelementptr ([8 x i8]* @.str1468, i32 0, i32 0), i8* getelementptr ([21 x i8]* @.str1477, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit1070 to %0*), i32 397, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1476 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array1479 = internal constant [5 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1285 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype923 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype280 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype280 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype791 to %0*)], section "llvm.metadata" ; <[5 x %0*]*> [#uses=1] - at llvm.dbg.composite1480 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([5 x %0*]* @llvm.dbg.array1479 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str1481 = internal constant [20 x i8] c"_ZNSs7replaceEjjPKc\00", section "llvm.metadata" ; <[20 x i8]*> [#uses=1] - at llvm.dbg.subprogram1482 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([8 x i8]* @.str1468, i32 0, i32 0), i8* getelementptr ([8 x i8]* @.str1468, i32 0, i32 0), i8* getelementptr ([20 x i8]* @.str1481, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 1248, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1480 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array1483 = internal constant [6 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1285 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype923 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype280 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype280 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype280 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype672 to %0*)], section "llvm.metadata" ; <[6 x %0*]*> [#uses=1] - at llvm.dbg.composite1484 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([6 x %0*]* @llvm.dbg.array1483 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str1485 = internal constant [19 x i8] c"_ZNSs7replaceEjjjc\00", section "llvm.metadata" ; <[19 x i8]*> [#uses=1] - at llvm.dbg.subprogram1486 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([8 x i8]* @.str1468, i32 0, i32 0), i8* getelementptr ([8 x i8]* @.str1468, i32 0, i32 0), i8* getelementptr ([19 x i8]* @.str1485, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 1271, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1484 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array1487 = internal constant [5 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1285 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype923 to %0*), %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1176 to %0*), %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1176 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1259 to %0*)], section "llvm.metadata" ; <[5 x %0*]*> [#uses=1] - at llvm.dbg.composite1488 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([5 x %0*]* @llvm.dbg.array1487 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str1489 = internal constant [59 x i8] c"_ZNSs7replaceEN9__gnu_cxx17__normal_iteratorIPcSsEES2_RKSs\00", section "llvm.metadata" ; <[59 x i8]*> [#uses=1] - at llvm.dbg.subprogram1490 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([8 x i8]* @.str1468, i32 0, i32 0), i8* getelementptr ([8 x i8]* @.str1468, i32 0, i32 0), i8* getelementptr ([59 x i8]* @.str1489, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 1289, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1488 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array1491 = internal constant [6 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1285 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype923 to %0*), %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1176 to %0*), %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1176 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype791 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype280 to %0*)], section "llvm.metadata" ; <[6 x %0*]*> [#uses=1] - at llvm.dbg.composite1492 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([6 x %0*]* @llvm.dbg.array1491 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str1493 = internal constant [59 x i8] c"_ZNSs7replaceEN9__gnu_cxx17__normal_iteratorIPcSsEES2_PKcj\00", section "llvm.metadata" ; <[59 x i8]*> [#uses=1] - at llvm.dbg.subprogram1494 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([8 x i8]* @.str1468, i32 0, i32 0), i8* getelementptr ([8 x i8]* @.str1468, i32 0, i32 0), i8* getelementptr ([59 x i8]* @.str1493, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 1307, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1492 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array1495 = internal constant [5 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1285 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype923 to %0*), %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1176 to %0*), %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1176 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype791 to %0*)], section "llvm.metadata" ; <[5 x %0*]*> [#uses=1] - at llvm.dbg.composite1496 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([5 x %0*]* @llvm.dbg.array1495 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str1497 = internal constant [58 x i8] c"_ZNSs7replaceEN9__gnu_cxx17__normal_iteratorIPcSsEES2_PKc\00", section "llvm.metadata" ; <[58 x i8]*> [#uses=1] - at llvm.dbg.subprogram1498 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([8 x i8]* @.str1468, i32 0, i32 0), i8* getelementptr ([8 x i8]* @.str1468, i32 0, i32 0), i8* getelementptr ([58 x i8]* @.str1497, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 1328, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1496 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array1499 = internal constant [6 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1285 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype923 to %0*), %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1176 to %0*), %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1176 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype280 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype672 to %0*)], section "llvm.metadata" ; <[6 x %0*]*> [#uses=1] - at llvm.dbg.composite1500 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([6 x %0*]* @llvm.dbg.array1499 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str1501 = internal constant [57 x i8] c"_ZNSs7replaceEN9__gnu_cxx17__normal_iteratorIPcSsEES2_jc\00", section "llvm.metadata" ; <[57 x i8]*> [#uses=1] - at llvm.dbg.subprogram1502 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([8 x i8]* @.str1468, i32 0, i32 0), i8* getelementptr ([8 x i8]* @.str1468, i32 0, i32 0), i8* getelementptr ([57 x i8]* @.str1501, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 1349, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1500 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array1503 = internal constant [6 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1285 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype923 to %0*), %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1176 to %0*), %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1176 to %0*), %0* null, %0* null], section "llvm.metadata" ; <[6 x %0*]*> [#uses=1] - at llvm.dbg.composite1504 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([6 x %0*]* @llvm.dbg.array1503 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.subprogram1505 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([8 x i8]* @.str1468, i32 0, i32 0), i8* getelementptr ([8 x i8]* @.str1468, i32 0, i32 0), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 1373, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1504 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array1506 = internal constant [6 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1285 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype923 to %0*), %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1176 to %0*), %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1176 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype837 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype837 to %0*)], section "llvm.metadata" ; <[6 x %0*]*> [#uses=1] - at llvm.dbg.composite1507 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([6 x %0*]* @llvm.dbg.array1506 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str1508 = internal constant [61 x i8] c"_ZNSs7replaceEN9__gnu_cxx17__normal_iteratorIPcSsEES2_S1_S1_\00", section "llvm.metadata" ; <[61 x i8]*> [#uses=1] - at llvm.dbg.subprogram1509 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([8 x i8]* @.str1468, i32 0, i32 0), i8* getelementptr ([8 x i8]* @.str1468, i32 0, i32 0), i8* getelementptr ([61 x i8]* @.str1508, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 1385, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1507 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array1510 = internal constant [6 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1285 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype923 to %0*), %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1176 to %0*), %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1176 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype791 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype791 to %0*)], section "llvm.metadata" ; <[6 x %0*]*> [#uses=1] - at llvm.dbg.composite1511 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([6 x %0*]* @llvm.dbg.array1510 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str1512 = internal constant [61 x i8] c"_ZNSs7replaceEN9__gnu_cxx17__normal_iteratorIPcSsEES2_PKcS4_\00", section "llvm.metadata" ; <[61 x i8]*> [#uses=1] - at llvm.dbg.subprogram1513 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([8 x i8]* @.str1468, i32 0, i32 0), i8* getelementptr ([8 x i8]* @.str1468, i32 0, i32 0), i8* getelementptr ([61 x i8]* @.str1512, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 1396, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1511 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array1514 = internal constant [6 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1285 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype923 to %0*), %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1176 to %0*), %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1176 to %0*), %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1176 to %0*), %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1176 to %0*)], section "llvm.metadata" ; <[6 x %0*]*> [#uses=1] - at llvm.dbg.composite1515 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([6 x %0*]* @llvm.dbg.array1514 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str1516 = internal constant [61 x i8] c"_ZNSs7replaceEN9__gnu_cxx17__normal_iteratorIPcSsEES2_S2_S2_\00", section "llvm.metadata" ; <[61 x i8]*> [#uses=1] - at llvm.dbg.subprogram1517 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([8 x i8]* @.str1468, i32 0, i32 0), i8* getelementptr ([8 x i8]* @.str1468, i32 0, i32 0), i8* getelementptr ([61 x i8]* @.str1516, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 1406, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1515 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array1518 = internal constant [6 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1285 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype923 to %0*), %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1176 to %0*), %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1176 to %0*), %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1231 to %0*), %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1231 to %0*)], section "llvm.metadata" ; <[6 x %0*]*> [#uses=1] - at llvm.dbg.composite1519 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([6 x %0*]* @llvm.dbg.array1518 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str1520 = internal constant [70 x i8] c"_ZNSs7replaceEN9__gnu_cxx17__normal_iteratorIPcSsEES2_NS0_IPKcSsEES5_\00", section "llvm.metadata" ; <[70 x i8]*> [#uses=1] - at llvm.dbg.subprogram1521 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([8 x i8]* @.str1468, i32 0, i32 0), i8* getelementptr ([8 x i8]* @.str1468, i32 0, i32 0), i8* getelementptr ([70 x i8]* @.str1520, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 1417, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1519 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str1522 = internal constant [18 x i8] c"cpp_type_traits.h\00", section "llvm.metadata" ; <[18 x i8]*> [#uses=1] - at llvm.dbg.compile_unit1523 = internal constant %llvm.dbg.compile_unit.type { i32 458769, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.compile_units to %0*), i32 4, i8* getelementptr ([18 x i8]* @.str1522, i32 0, i32 0), i8* getelementptr ([115 x i8]* @.str638, i32 0, i32 0), i8* getelementptr ([52 x i8]* @.str2, i32 0, i32 0), i1 false, i1 false, i8* null, i32 -1 }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] - at .str1524 = internal constant [12 x i8] c"__true_type\00", section "llvm.metadata" ; <[12 x i8]*> [#uses=1] - at llvm.dbg.composite1526 = internal constant %llvm.dbg.composite.type { i32 458771, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([12 x i8]* @.str1524, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit1523 to %0*), i32 97, i64 8, i64 8, i64 0, i32 0, %0* null, %0* bitcast ([0 x %0*]* @llvm.dbg.array680 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.array1527 = internal constant [7 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1285 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype923 to %0*), %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1176 to %0*), %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1176 to %0*), %0* null, %0* null, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1526 to %0*)], section "llvm.metadata" ; <[7 x %0*]*> [#uses=1] - at llvm.dbg.composite1528 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([7 x %0*]* @llvm.dbg.array1527 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str1529 = internal constant [20 x i8] c"_M_replace_dispatch\00", section "llvm.metadata" ; <[20 x i8]*> [#uses=1] - at llvm.dbg.subprogram1530 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([20 x i8]* @.str1529, i32 0, i32 0), i8* getelementptr ([20 x i8]* @.str1529, i32 0, i32 0), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 1430, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1528 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str1531 = internal constant [13 x i8] c"__false_type\00", section "llvm.metadata" ; <[13 x i8]*> [#uses=1] - at llvm.dbg.composite1533 = internal constant %llvm.dbg.composite.type { i32 458771, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([13 x i8]* @.str1531, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit1523 to %0*), i32 98, i64 8, i64 8, i64 0, i32 0, %0* null, %0* bitcast ([0 x %0*]* @llvm.dbg.array680 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.array1534 = internal constant [7 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1285 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype923 to %0*), %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1176 to %0*), %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1176 to %0*), %0* null, %0* null, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1533 to %0*)], section "llvm.metadata" ; <[7 x %0*]*> [#uses=1] - at llvm.dbg.composite1535 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([7 x %0*]* @llvm.dbg.array1534 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.subprogram1536 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([20 x i8]* @.str1529, i32 0, i32 0), i8* getelementptr ([20 x i8]* @.str1529, i32 0, i32 0), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 1436, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1535 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str1537 = internal constant [15 x i8] c"_M_replace_aux\00", section "llvm.metadata" ; <[15 x i8]*> [#uses=1] - at .str1538 = internal constant [27 x i8] c"_ZNSs14_M_replace_auxEjjjc\00", section "llvm.metadata" ; <[27 x i8]*> [#uses=1] - at llvm.dbg.subprogram1539 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([15 x i8]* @.str1537, i32 0, i32 0), i8* getelementptr ([15 x i8]* @.str1537, i32 0, i32 0), i8* getelementptr ([27 x i8]* @.str1538, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit1070 to %0*), i32 651, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1484 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str1540 = internal constant [16 x i8] c"_M_replace_safe\00", section "llvm.metadata" ; <[16 x i8]*> [#uses=1] - at .str1541 = internal constant [30 x i8] c"_ZNSs15_M_replace_safeEjjPKcj\00", section "llvm.metadata" ; <[30 x i8]*> [#uses=1] - at llvm.dbg.subprogram1542 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([16 x i8]* @.str1540, i32 0, i32 0), i8* getelementptr ([16 x i8]* @.str1540, i32 0, i32 0), i8* getelementptr ([30 x i8]* @.str1541, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit1070 to %0*), i32 664, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1476 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array1543 = internal constant [5 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype837 to %0*), %0* null, %0* null, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype887 to %0*), %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1533 to %0*)], section "llvm.metadata" ; <[5 x %0*]*> [#uses=1] - at llvm.dbg.composite1544 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([5 x %0*]* @llvm.dbg.array1543 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str1545 = internal constant [17 x i8] c"_S_construct_aux\00", section "llvm.metadata" ; <[17 x i8]*> [#uses=1] - at llvm.dbg.subprogram1546 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([17 x i8]* @.str1545, i32 0, i32 0), i8* getelementptr ([17 x i8]* @.str1545, i32 0, i32 0), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 1451, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1544 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array1547 = internal constant [5 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype837 to %0*), %0* null, %0* null, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype887 to %0*), %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1526 to %0*)], section "llvm.metadata" ; <[5 x %0*]*> [#uses=1] - at llvm.dbg.composite1548 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([5 x %0*]* @llvm.dbg.array1547 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.subprogram1549 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([17 x i8]* @.str1545, i32 0, i32 0), i8* getelementptr ([17 x i8]* @.str1545, i32 0, i32 0), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 1460, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1548 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array1550 = internal constant [4 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype837 to %0*), %0* null, %0* null, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype887 to %0*)], section "llvm.metadata" ; <[4 x %0*]*> [#uses=1] - at llvm.dbg.composite1551 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([4 x %0*]* @llvm.dbg.array1550 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str1552 = internal constant [13 x i8] c"_S_construct\00", section "llvm.metadata" ; <[13 x i8]*> [#uses=1] - at llvm.dbg.subprogram1553 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([13 x i8]* @.str1552, i32 0, i32 0), i8* getelementptr ([13 x i8]* @.str1552, i32 0, i32 0), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 1466, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1551 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str1554 = internal constant [26 x i8] c"stl_iterator_base_types.h\00", section "llvm.metadata" ; <[26 x i8]*> [#uses=1] - at llvm.dbg.compile_unit1555 = internal constant %llvm.dbg.compile_unit.type { i32 458769, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.compile_units to %0*), i32 4, i8* getelementptr ([26 x i8]* @.str1554, i32 0, i32 0), i8* getelementptr ([115 x i8]* @.str638, i32 0, i32 0), i8* getelementptr ([52 x i8]* @.str2, i32 0, i32 0), i1 false, i1 false, i8* null, i32 -1 }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] - at .str1556 = internal constant [19 x i8] c"input_iterator_tag\00", section "llvm.metadata" ; <[19 x i8]*> [#uses=1] - at llvm.dbg.composite1558 = internal constant %llvm.dbg.composite.type { i32 458771, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([19 x i8]* @.str1556, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit1555 to %0*), i32 80, i64 8, i64 8, i64 0, i32 0, %0* null, %0* bitcast ([0 x %0*]* @llvm.dbg.array680 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.array1559 = internal constant [5 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype837 to %0*), %0* null, %0* null, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype887 to %0*), %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1558 to %0*)], section "llvm.metadata" ; <[5 x %0*]*> [#uses=1] - at llvm.dbg.composite1560 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([5 x %0*]* @llvm.dbg.array1559 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.subprogram1561 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([13 x i8]* @.str1552, i32 0, i32 0), i8* getelementptr ([13 x i8]* @.str1552, i32 0, i32 0), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 1476, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1560 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str1562 = internal constant [21 x i8] c"forward_iterator_tag\00", section "llvm.metadata" ; <[21 x i8]*> [#uses=1] - at llvm.dbg.derivedtype1564 = internal constant %llvm.dbg.derivedtype.type { i32 458780, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit1555 to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1558 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array1565 = internal constant [1 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1564 to %0*)], section "llvm.metadata" ; <[1 x %0*]*> [#uses=1] - at llvm.dbg.composite1566 = internal constant %llvm.dbg.composite.type { i32 458771, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([21 x i8]* @.str1562, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit1555 to %0*), i32 84, i64 8, i64 8, i64 0, i32 0, %0* null, %0* bitcast ([1 x %0*]* @llvm.dbg.array1565 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.array1567 = internal constant [5 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype837 to %0*), %0* null, %0* null, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype887 to %0*), %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1566 to %0*)], section "llvm.metadata" ; <[5 x %0*]*> [#uses=1] - at llvm.dbg.composite1568 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([5 x %0*]* @llvm.dbg.array1567 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.subprogram1569 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([13 x i8]* @.str1552, i32 0, i32 0), i8* getelementptr ([13 x i8]* @.str1552, i32 0, i32 0), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 1483, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1568 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array1570 = internal constant [4 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype837 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype280 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype672 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype887 to %0*)], section "llvm.metadata" ; <[4 x %0*]*> [#uses=1] - at llvm.dbg.composite1571 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([4 x %0*]* @llvm.dbg.array1570 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str1572 = internal constant [30 x i8] c"_ZNSs12_S_constructEjcRKSaIcE\00", section "llvm.metadata" ; <[30 x i8]*> [#uses=1] - at llvm.dbg.subprogram1573 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([13 x i8]* @.str1552, i32 0, i32 0), i8* getelementptr ([13 x i8]* @.str1552, i32 0, i32 0), i8* getelementptr ([30 x i8]* @.str1572, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit1070 to %0*), i32 166, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1571 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array1574 = internal constant [5 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype282 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype917 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype837 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype280 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype280 to %0*)], section "llvm.metadata" ; <[5 x %0*]*> [#uses=1] - at llvm.dbg.composite1575 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([5 x %0*]* @llvm.dbg.array1574 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str1576 = internal constant [5 x i8] c"copy\00", section "llvm.metadata" ; <[5 x i8]*> [#uses=1] - at .str1577 = internal constant [17 x i8] c"_ZNKSs4copyEPcjj\00", section "llvm.metadata" ; <[17 x i8]*> [#uses=1] - at llvm.dbg.subprogram1578 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([5 x i8]* @.str1576, i32 0, i32 0), i8* getelementptr ([5 x i8]* @.str1576, i32 0, i32 0), i8* getelementptr ([17 x i8]* @.str1577, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit1070 to %0*), i32 705, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1575 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array1579 = internal constant [3 x %0*] [%0* null, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype923 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1285 to %0*)], section "llvm.metadata" ; <[3 x %0*]*> [#uses=1] - at llvm.dbg.composite1580 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([3 x %0*]* @llvm.dbg.array1579 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str1581 = internal constant [5 x i8] c"swap\00", section "llvm.metadata" ; <[5 x i8]*> [#uses=1] - at .str1582 = internal constant [15 x i8] c"_ZNSs4swapERSs\00", section "llvm.metadata" ; <[15 x i8]*> [#uses=1] - at llvm.dbg.subprogram1583 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([5 x i8]* @.str1581, i32 0, i32 0), i8* getelementptr ([5 x i8]* @.str1581, i32 0, i32 0), i8* getelementptr ([15 x i8]* @.str1582, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit1070 to %0*), i32 501, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1580 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array1584 = internal constant [2 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype791 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype917 to %0*)], section "llvm.metadata" ; <[2 x %0*]*> [#uses=1] - at llvm.dbg.composite1585 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([2 x %0*]* @llvm.dbg.array1584 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str1586 = internal constant [6 x i8] c"c_str\00", section "llvm.metadata" ; <[6 x i8]*> [#uses=1] - at .str1587 = internal constant [15 x i8] c"_ZNKSs5c_strEv\00", section "llvm.metadata" ; <[15 x i8]*> [#uses=1] - at llvm.dbg.subprogram1588 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([6 x i8]* @.str1586, i32 0, i32 0), i8* getelementptr ([6 x i8]* @.str1586, i32 0, i32 0), i8* getelementptr ([15 x i8]* @.str1587, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 1522, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1585 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str1589 = internal constant [5 x i8] c"data\00", section "llvm.metadata" ; <[5 x i8]*> [#uses=1] - at .str1590 = internal constant [14 x i8] c"_ZNKSs4dataEv\00", section "llvm.metadata" ; <[14 x i8]*> [#uses=1] - at llvm.dbg.subprogram1591 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([5 x i8]* @.str1589, i32 0, i32 0), i8* getelementptr ([5 x i8]* @.str1589, i32 0, i32 0), i8* getelementptr ([14 x i8]* @.str1590, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 1532, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1585 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array1592 = internal constant [2 x %0*] [%0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite902 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype917 to %0*)], section "llvm.metadata" ; <[2 x %0*]*> [#uses=1] - at llvm.dbg.composite1593 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([2 x %0*]* @llvm.dbg.array1592 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str1594 = internal constant [14 x i8] c"get_allocator\00", section "llvm.metadata" ; <[14 x i8]*> [#uses=1] - at .str1595 = internal constant [24 x i8] c"_ZNKSs13get_allocatorEv\00", section "llvm.metadata" ; <[24 x i8]*> [#uses=1] - at llvm.dbg.subprogram1596 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([14 x i8]* @.str1594, i32 0, i32 0), i8* getelementptr ([14 x i8]* @.str1594, i32 0, i32 0), i8* getelementptr ([24 x i8]* @.str1595, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 1539, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1593 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array1597 = internal constant [5 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype282 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype917 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype791 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype280 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype280 to %0*)], section "llvm.metadata" ; <[5 x %0*]*> [#uses=1] - at llvm.dbg.composite1598 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([5 x %0*]* @llvm.dbg.array1597 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str1599 = internal constant [5 x i8] c"find\00", section "llvm.metadata" ; <[5 x i8]*> [#uses=1] - at .str1600 = internal constant [18 x i8] c"_ZNKSs4findEPKcjj\00", section "llvm.metadata" ; <[18 x i8]*> [#uses=1] - at llvm.dbg.subprogram1601 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([5 x i8]* @.str1599, i32 0, i32 0), i8* getelementptr ([5 x i8]* @.str1599, i32 0, i32 0), i8* getelementptr ([18 x i8]* @.str1600, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit1070 to %0*), i32 719, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1598 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array1602 = internal constant [4 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype282 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype917 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1259 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype280 to %0*)], section "llvm.metadata" ; <[4 x %0*]*> [#uses=1] - at llvm.dbg.composite1603 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([4 x %0*]* @llvm.dbg.array1602 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str1604 = internal constant [18 x i8] c"_ZNKSs4findERKSsj\00", section "llvm.metadata" ; <[18 x i8]*> [#uses=1] - at llvm.dbg.subprogram1605 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([5 x i8]* @.str1599, i32 0, i32 0), i8* getelementptr ([5 x i8]* @.str1599, i32 0, i32 0), i8* getelementptr ([18 x i8]* @.str1604, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 1567, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1603 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array1606 = internal constant [4 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype282 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype917 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype791 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype280 to %0*)], section "llvm.metadata" ; <[4 x %0*]*> [#uses=1] - at llvm.dbg.composite1607 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([4 x %0*]* @llvm.dbg.array1606 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str1608 = internal constant [17 x i8] c"_ZNKSs4findEPKcj\00", section "llvm.metadata" ; <[17 x i8]*> [#uses=1] - at llvm.dbg.subprogram1609 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([5 x i8]* @.str1599, i32 0, i32 0), i8* getelementptr ([5 x i8]* @.str1599, i32 0, i32 0), i8* getelementptr ([17 x i8]* @.str1608, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 1581, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1607 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array1610 = internal constant [4 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype282 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype917 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype672 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype280 to %0*)], section "llvm.metadata" ; <[4 x %0*]*> [#uses=1] - at llvm.dbg.composite1611 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([4 x %0*]* @llvm.dbg.array1610 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str1612 = internal constant [15 x i8] c"_ZNKSs4findEcj\00", section "llvm.metadata" ; <[15 x i8]*> [#uses=1] - at llvm.dbg.subprogram1613 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([5 x i8]* @.str1599, i32 0, i32 0), i8* getelementptr ([5 x i8]* @.str1599, i32 0, i32 0), i8* getelementptr ([15 x i8]* @.str1612, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit1070 to %0*), i32 742, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1611 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.composite1614 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([4 x %0*]* @llvm.dbg.array1602 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str1615 = internal constant [6 x i8] c"rfind\00", section "llvm.metadata" ; <[6 x i8]*> [#uses=1] - at .str1616 = internal constant [19 x i8] c"_ZNKSs5rfindERKSsj\00", section "llvm.metadata" ; <[19 x i8]*> [#uses=1] - at llvm.dbg.subprogram1617 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([6 x i8]* @.str1615, i32 0, i32 0), i8* getelementptr ([6 x i8]* @.str1615, i32 0, i32 0), i8* getelementptr ([19 x i8]* @.str1616, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 1611, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1614 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str1618 = internal constant [19 x i8] c"_ZNKSs5rfindEPKcjj\00", section "llvm.metadata" ; <[19 x i8]*> [#uses=1] - at llvm.dbg.subprogram1619 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([6 x i8]* @.str1615, i32 0, i32 0), i8* getelementptr ([6 x i8]* @.str1615, i32 0, i32 0), i8* getelementptr ([19 x i8]* @.str1618, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit1070 to %0*), i32 760, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1598 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.composite1620 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([4 x %0*]* @llvm.dbg.array1606 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str1621 = internal constant [18 x i8] c"_ZNKSs5rfindEPKcj\00", section "llvm.metadata" ; <[18 x i8]*> [#uses=1] - at llvm.dbg.subprogram1622 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([6 x i8]* @.str1615, i32 0, i32 0), i8* getelementptr ([6 x i8]* @.str1615, i32 0, i32 0), i8* getelementptr ([18 x i8]* @.str1621, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 1639, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1620 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.composite1623 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([4 x %0*]* @llvm.dbg.array1610 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str1624 = internal constant [16 x i8] c"_ZNKSs5rfindEcj\00", section "llvm.metadata" ; <[16 x i8]*> [#uses=1] - at llvm.dbg.subprogram1625 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([6 x i8]* @.str1615, i32 0, i32 0), i8* getelementptr ([6 x i8]* @.str1615, i32 0, i32 0), i8* getelementptr ([16 x i8]* @.str1624, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit1070 to %0*), i32 781, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1623 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str1626 = internal constant [14 x i8] c"find_first_of\00", section "llvm.metadata" ; <[14 x i8]*> [#uses=1] - at .str1627 = internal constant [28 x i8] c"_ZNKSs13find_first_ofERKSsj\00", section "llvm.metadata" ; <[28 x i8]*> [#uses=1] - at llvm.dbg.subprogram1628 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([14 x i8]* @.str1626, i32 0, i32 0), i8* getelementptr ([14 x i8]* @.str1626, i32 0, i32 0), i8* getelementptr ([28 x i8]* @.str1627, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 1669, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1603 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str1629 = internal constant [28 x i8] c"_ZNKSs13find_first_ofEPKcjj\00", section "llvm.metadata" ; <[28 x i8]*> [#uses=1] - at llvm.dbg.subprogram1630 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([14 x i8]* @.str1626, i32 0, i32 0), i8* getelementptr ([14 x i8]* @.str1626, i32 0, i32 0), i8* getelementptr ([28 x i8]* @.str1629, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit1070 to %0*), i32 798, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1598 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str1631 = internal constant [27 x i8] c"_ZNKSs13find_first_ofEPKcj\00", section "llvm.metadata" ; <[27 x i8]*> [#uses=1] - at llvm.dbg.subprogram1632 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([14 x i8]* @.str1626, i32 0, i32 0), i8* getelementptr ([14 x i8]* @.str1626, i32 0, i32 0), i8* getelementptr ([27 x i8]* @.str1631, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 1697, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1607 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str1633 = internal constant [25 x i8] c"_ZNKSs13find_first_ofEcj\00", section "llvm.metadata" ; <[25 x i8]*> [#uses=1] - at llvm.dbg.subprogram1634 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([14 x i8]* @.str1626, i32 0, i32 0), i8* getelementptr ([14 x i8]* @.str1626, i32 0, i32 0), i8* getelementptr ([25 x i8]* @.str1633, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 1716, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1611 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str1635 = internal constant [13 x i8] c"find_last_of\00", section "llvm.metadata" ; <[13 x i8]*> [#uses=1] - at .str1636 = internal constant [27 x i8] c"_ZNKSs12find_last_ofERKSsj\00", section "llvm.metadata" ; <[27 x i8]*> [#uses=1] - at llvm.dbg.subprogram1637 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([13 x i8]* @.str1635, i32 0, i32 0), i8* getelementptr ([13 x i8]* @.str1635, i32 0, i32 0), i8* getelementptr ([27 x i8]* @.str1636, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 1730, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1614 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str1638 = internal constant [27 x i8] c"_ZNKSs12find_last_ofEPKcjj\00", section "llvm.metadata" ; <[27 x i8]*> [#uses=1] - at llvm.dbg.subprogram1639 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([13 x i8]* @.str1635, i32 0, i32 0), i8* getelementptr ([13 x i8]* @.str1635, i32 0, i32 0), i8* getelementptr ([27 x i8]* @.str1638, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit1070 to %0*), i32 813, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1598 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str1640 = internal constant [26 x i8] c"_ZNKSs12find_last_ofEPKcj\00", section "llvm.metadata" ; <[26 x i8]*> [#uses=1] - at llvm.dbg.subprogram1641 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([13 x i8]* @.str1635, i32 0, i32 0), i8* getelementptr ([13 x i8]* @.str1635, i32 0, i32 0), i8* getelementptr ([26 x i8]* @.str1640, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 1758, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1620 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str1642 = internal constant [24 x i8] c"_ZNKSs12find_last_ofEcj\00", section "llvm.metadata" ; <[24 x i8]*> [#uses=1] - at llvm.dbg.subprogram1643 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([13 x i8]* @.str1635, i32 0, i32 0), i8* getelementptr ([13 x i8]* @.str1635, i32 0, i32 0), i8* getelementptr ([24 x i8]* @.str1642, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 1777, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1623 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str1644 = internal constant [18 x i8] c"find_first_not_of\00", section "llvm.metadata" ; <[18 x i8]*> [#uses=1] - at .str1645 = internal constant [32 x i8] c"_ZNKSs17find_first_not_ofERKSsj\00", section "llvm.metadata" ; <[32 x i8]*> [#uses=1] - at llvm.dbg.subprogram1646 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([18 x i8]* @.str1644, i32 0, i32 0), i8* getelementptr ([18 x i8]* @.str1644, i32 0, i32 0), i8* getelementptr ([32 x i8]* @.str1645, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 1791, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1603 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str1647 = internal constant [32 x i8] c"_ZNKSs17find_first_not_ofEPKcjj\00", section "llvm.metadata" ; <[32 x i8]*> [#uses=1] - at llvm.dbg.subprogram1648 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([18 x i8]* @.str1644, i32 0, i32 0), i8* getelementptr ([18 x i8]* @.str1644, i32 0, i32 0), i8* getelementptr ([32 x i8]* @.str1647, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit1070 to %0*), i32 834, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1598 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str1649 = internal constant [31 x i8] c"_ZNKSs17find_first_not_ofEPKcj\00", section "llvm.metadata" ; <[31 x i8]*> [#uses=1] - at llvm.dbg.subprogram1650 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([18 x i8]* @.str1644, i32 0, i32 0), i8* getelementptr ([18 x i8]* @.str1644, i32 0, i32 0), i8* getelementptr ([31 x i8]* @.str1649, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 1820, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1607 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str1651 = internal constant [29 x i8] c"_ZNKSs17find_first_not_ofEcj\00", section "llvm.metadata" ; <[29 x i8]*> [#uses=1] - at llvm.dbg.subprogram1652 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([18 x i8]* @.str1644, i32 0, i32 0), i8* getelementptr ([18 x i8]* @.str1644, i32 0, i32 0), i8* getelementptr ([29 x i8]* @.str1651, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit1070 to %0*), i32 846, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1611 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str1653 = internal constant [17 x i8] c"find_last_not_of\00", section "llvm.metadata" ; <[17 x i8]*> [#uses=1] - at .str1654 = internal constant [31 x i8] c"_ZNKSs16find_last_not_ofERKSsj\00", section "llvm.metadata" ; <[31 x i8]*> [#uses=1] - at llvm.dbg.subprogram1655 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([17 x i8]* @.str1653, i32 0, i32 0), i8* getelementptr ([17 x i8]* @.str1653, i32 0, i32 0), i8* getelementptr ([31 x i8]* @.str1654, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 1850, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1614 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str1656 = internal constant [31 x i8] c"_ZNKSs16find_last_not_ofEPKcjj\00", section "llvm.metadata" ; <[31 x i8]*> [#uses=1] - at llvm.dbg.subprogram1657 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([17 x i8]* @.str1653, i32 0, i32 0), i8* getelementptr ([17 x i8]* @.str1653, i32 0, i32 0), i8* getelementptr ([31 x i8]* @.str1656, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit1070 to %0*), i32 857, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1598 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str1658 = internal constant [30 x i8] c"_ZNKSs16find_last_not_ofEPKcj\00", section "llvm.metadata" ; <[30 x i8]*> [#uses=1] - at llvm.dbg.subprogram1659 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([17 x i8]* @.str1653, i32 0, i32 0), i8* getelementptr ([17 x i8]* @.str1653, i32 0, i32 0), i8* getelementptr ([30 x i8]* @.str1658, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 1879, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1620 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str1660 = internal constant [28 x i8] c"_ZNKSs16find_last_not_ofEcj\00", section "llvm.metadata" ; <[28 x i8]*> [#uses=1] - at llvm.dbg.subprogram1661 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([17 x i8]* @.str1653, i32 0, i32 0), i8* getelementptr ([17 x i8]* @.str1653, i32 0, i32 0), i8* getelementptr ([28 x i8]* @.str1660, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit1070 to %0*), i32 878, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1623 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array1662 = internal constant [4 x %0*] [%0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1693 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype917 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype280 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype280 to %0*)], section "llvm.metadata" ; <[4 x %0*]*> [#uses=1] - at llvm.dbg.composite1663 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([4 x %0*]* @llvm.dbg.array1662 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str1664 = internal constant [7 x i8] c"substr\00", section "llvm.metadata" ; <[7 x i8]*> [#uses=1] - at .str1665 = internal constant [17 x i8] c"_ZNKSs6substrEjj\00", section "llvm.metadata" ; <[17 x i8]*> [#uses=1] - at llvm.dbg.subprogram1666 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([7 x i8]* @.str1664, i32 0, i32 0), i8* getelementptr ([7 x i8]* @.str1664, i32 0, i32 0), i8* getelementptr ([17 x i8]* @.str1665, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 1911, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1663 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array1667 = internal constant [3 x %0*] [%0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype269 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype917 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1259 to %0*)], section "llvm.metadata" ; <[3 x %0*]*> [#uses=1] - at llvm.dbg.composite1668 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([3 x %0*]* @llvm.dbg.array1667 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str1669 = internal constant [8 x i8] c"compare\00", section "llvm.metadata" ; <[8 x i8]*> [#uses=1] - at .str1670 = internal constant [20 x i8] c"_ZNKSs7compareERKSs\00", section "llvm.metadata" ; <[20 x i8]*> [#uses=1] - at llvm.dbg.subprogram1671 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([8 x i8]* @.str1669, i32 0, i32 0), i8* getelementptr ([8 x i8]* @.str1669, i32 0, i32 0), i8* getelementptr ([20 x i8]* @.str1670, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit807 to %0*), i32 1929, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1668 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array1672 = internal constant [5 x %0*] [%0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype269 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype917 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype280 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype280 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1259 to %0*)], section "llvm.metadata" ; <[5 x %0*]*> [#uses=1] - at llvm.dbg.composite1673 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([5 x %0*]* @llvm.dbg.array1672 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str1674 = internal constant [22 x i8] c"_ZNKSs7compareEjjRKSs\00", section "llvm.metadata" ; <[22 x i8]*> [#uses=1] - at llvm.dbg.subprogram1675 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([8 x i8]* @.str1669, i32 0, i32 0), i8* getelementptr ([8 x i8]* @.str1669, i32 0, i32 0), i8* getelementptr ([22 x i8]* @.str1674, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit1070 to %0*), i32 898, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1673 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array1676 = internal constant [7 x %0*] [%0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype269 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype917 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype280 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype280 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1259 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype280 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype280 to %0*)], section "llvm.metadata" ; <[7 x %0*]*> [#uses=1] - at llvm.dbg.composite1677 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([7 x %0*]* @llvm.dbg.array1676 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str1678 = internal constant [24 x i8] c"_ZNKSs7compareEjjRKSsjj\00", section "llvm.metadata" ; <[24 x i8]*> [#uses=1] - at llvm.dbg.subprogram1679 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([8 x i8]* @.str1669, i32 0, i32 0), i8* getelementptr ([8 x i8]* @.str1669, i32 0, i32 0), i8* getelementptr ([24 x i8]* @.str1678, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit1070 to %0*), i32 914, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1677 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array1680 = internal constant [3 x %0*] [%0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype269 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype917 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype791 to %0*)], section "llvm.metadata" ; <[3 x %0*]*> [#uses=1] - at llvm.dbg.composite1681 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([3 x %0*]* @llvm.dbg.array1680 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str1682 = internal constant [19 x i8] c"_ZNKSs7compareEPKc\00", section "llvm.metadata" ; <[19 x i8]*> [#uses=1] - at llvm.dbg.subprogram1683 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([8 x i8]* @.str1669, i32 0, i32 0), i8* getelementptr ([8 x i8]* @.str1669, i32 0, i32 0), i8* getelementptr ([19 x i8]* @.str1682, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit1070 to %0*), i32 931, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1681 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array1684 = internal constant [5 x %0*] [%0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype269 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype917 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype280 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype280 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype791 to %0*)], section "llvm.metadata" ; <[5 x %0*]*> [#uses=1] - at llvm.dbg.composite1685 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([5 x %0*]* @llvm.dbg.array1684 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str1686 = internal constant [21 x i8] c"_ZNKSs7compareEjjPKc\00", section "llvm.metadata" ; <[21 x i8]*> [#uses=1] - at llvm.dbg.subprogram1687 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([8 x i8]* @.str1669, i32 0, i32 0), i8* getelementptr ([8 x i8]* @.str1669, i32 0, i32 0), i8* getelementptr ([21 x i8]* @.str1686, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit1070 to %0*), i32 946, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1685 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array1688 = internal constant [6 x %0*] [%0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype269 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype917 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype280 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype280 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype791 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype280 to %0*)], section "llvm.metadata" ; <[6 x %0*]*> [#uses=1] - at llvm.dbg.composite1689 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([6 x %0*]* @llvm.dbg.array1688 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str1690 = internal constant [22 x i8] c"_ZNKSs7compareEjjPKcj\00", section "llvm.metadata" ; <[22 x i8]*> [#uses=1] - at llvm.dbg.subprogram1691 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([8 x i8]* @.str1669, i32 0, i32 0), i8* getelementptr ([8 x i8]* @.str1669, i32 0, i32 0), i8* getelementptr ([22 x i8]* @.str1690, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit1070 to %0*), i32 963, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1689 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array1692 = internal constant [143 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype913 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram922 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram927 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1096 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1180 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1183 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1188 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1193 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1198 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1203 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1208 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1213 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg .subprogram1216 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1221 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1225 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1229 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1235 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1239 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1243 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1248 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1251 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1253 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1255 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1258 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1262 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1265 to %0*), %0 * bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1268 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1271 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1274 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1277 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1280 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1284 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1289 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1293 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1297 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1302 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1306 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1309 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1311 to %0*), %0* bitcast (%llvm.dbg.subpro gram.type* @llvm.dbg.subprogram1318 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1324 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1327 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1329 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1334 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1337 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1339 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1344 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1348 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1351 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1355 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1358 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1363 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subpro gram1367 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1371 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1374 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1376 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1378 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1380 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1382 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1385 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1389 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1393 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1395 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1399 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1402 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1407 to %0*), %0* bitca st (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1410 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1412 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1414 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1416 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1418 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1420 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1425 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1428 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1432 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1436 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1440 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1444 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1448 to %0*), %0* bitcast (%llvm.dbg.subprogram.ty pe* @llvm.dbg.subprogram1452 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1457 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1461 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1465 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1470 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1474 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1478 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1482 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1486 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1490 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1494 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1498 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1502 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram150 5 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1509 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1513 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1517 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1521 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1530 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1536 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1539 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1542 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1546 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1549 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1553 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1561 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1569 to %0*), %0* bitcast (%ll vm.dbg.subprogram.type* @llvm.dbg.subprogram1573 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1578 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1583 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1588 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1591 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1596 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1601 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1605 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1609 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1613 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1617 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1619 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1622 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @ll vm.dbg.subprogram1625 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1628 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1630 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1632 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1634 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1637 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1639 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1641 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1643 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1646 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1648 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1650 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1652 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1655 to %0 *), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1657 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1659 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1661 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1666 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1671 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1675 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1679 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1683 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1687 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1691 to %0*)], section "llvm.metadata" ; <[143 x %0*]*> [#uses=1] - at llvm.dbg.composite1693 = internal constant %llvm.dbg.composite.type { i32 458771, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([64 x i8]* @.str804, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit803 to %0*), i32 56, i64 32, i64 32, i64 0, i32 0, %0* null, %0* bitcast ([143 x %0*]* @llvm.dbg.array1692 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.derivedtype1694 = internal constant %llvm.dbg.derivedtype.type { i32 458774, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([7 x i8]* @.str914, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit803 to %0*), i32 56, i64 0, i64 0, i64 0, i32 0, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1693 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at .str1695 = internal constant [7 x i8] c"_M_msg\00", section "llvm.metadata" ; <[7 x i8]*> [#uses=1] - at llvm.dbg.derivedtype1696 = internal constant %llvm.dbg.derivedtype.type { i32 458765, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([7 x i8]* @.str1695, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit770 to %0*), i32 109, i64 32, i64 32, i64 32, i32 1, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1694 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.derivedtype1697 = internal constant %llvm.dbg.derivedtype.type { i32 458767, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 32, i64 32, i64 0, i32 0, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1714 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.derivedtype1698 = internal constant %llvm.dbg.derivedtype.type { i32 458774, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([7 x i8]* @.str914, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit803 to %0*), i32 56, i64 0, i64 0, i64 0, i32 0, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype916 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.derivedtype1699 = internal constant %llvm.dbg.derivedtype.type { i32 458768, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 32, i64 32, i64 0, i32 0, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1698 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array1700 = internal constant [3 x %0*] [%0* null, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1697 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1699 to %0*)], section "llvm.metadata" ; <[3 x %0*]*> [#uses=1] - at llvm.dbg.composite1701 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([3 x %0*]* @llvm.dbg.array1700 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.subprogram1702 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([14 x i8]* @.str775, i32 0, i32 0), i8* getelementptr ([14 x i8]* @.str775, i32 0, i32 0), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit770 to %0*), i32 114, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1701 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array1703 = internal constant [3 x %0*] [%0* null, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1697 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype269 to %0*)], section "llvm.metadata" ; <[3 x %0*]*> [#uses=1] - at llvm.dbg.composite1704 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([3 x %0*]* @llvm.dbg.array1703 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str1705 = internal constant [15 x i8] c"~runtime_error\00", section "llvm.metadata" ; <[15 x i8]*> [#uses=1] - at llvm.dbg.subprogram1706 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([15 x i8]* @.str1705, i32 0, i32 0), i8* getelementptr ([15 x i8]* @.str1705, i32 0, i32 0), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit770 to %0*), i32 117, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1704 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.derivedtype1707 = internal constant %llvm.dbg.derivedtype.type { i32 458790, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 64, i64 32, i64 0, i32 0, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1714 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.derivedtype1708 = internal constant %llvm.dbg.derivedtype.type { i32 458767, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 32, i64 32, i64 0, i32 0, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1707 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array1709 = internal constant [2 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype791 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1708 to %0*)], section "llvm.metadata" ; <[2 x %0*]*> [#uses=1] - at llvm.dbg.composite1710 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([2 x %0*]* @llvm.dbg.array1709 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str1711 = internal constant [29 x i8] c"_ZNKSt13runtime_error4whatEv\00", section "llvm.metadata" ; <[29 x i8]*> [#uses=1] - at llvm.dbg.subprogram1712 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([5 x i8]* @.str796, i32 0, i32 0), i8* getelementptr ([5 x i8]* @.str796, i32 0, i32 0), i8* getelementptr ([29 x i8]* @.str1711, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit770 to %0*), i32 122, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1710 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array1713 = internal constant [5 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype801 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1696 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1702 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1706 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1712 to %0*)], section "llvm.metadata" ; <[5 x %0*]*> [#uses=1] - at llvm.dbg.composite1714 = internal constant %llvm.dbg.composite.type { i32 458771, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([14 x i8]* @.str775, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit770 to %0*), i32 108, i64 64, i64 32, i64 0, i32 0, %0* null, %0* bitcast ([5 x %0*]* @llvm.dbg.array1713 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.derivedtype1715 = internal constant %llvm.dbg.derivedtype.type { i32 458780, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit770 to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1714 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.derivedtype1716 = internal constant %llvm.dbg.derivedtype.type { i32 458767, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 32, i64 32, i64 0, i32 0, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1721 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array1717 = internal constant [3 x %0*] [%0* null, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1716 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1699 to %0*)], section "llvm.metadata" ; <[3 x %0*]*> [#uses=1] - at llvm.dbg.composite1718 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([3 x %0*]* @llvm.dbg.array1717 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.subprogram1719 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([15 x i8]* @.str773, i32 0, i32 0), i8* getelementptr ([15 x i8]* @.str773, i32 0, i32 0), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit770 to %0*), i32 136, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1718 to %0*), i1 false, i1 false }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array1720 = internal constant [2 x %0*] [%0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1715 to %0*), %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1719 to %0*)], section "llvm.metadata" ; <[2 x %0*]*> [#uses=1] - at llvm.dbg.composite1721 = internal constant %llvm.dbg.composite.type { i32 458771, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([15 x i8]* @.str773, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit770 to %0*), i32 134, i64 64, i64 32, i64 0, i32 0, %0* null, %0* bitcast ([2 x %0*]* @llvm.dbg.array1720 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at llvm.dbg.derivedtype1722 = internal constant %llvm.dbg.derivedtype.type { i32 458767, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 32, i64 32, i64 0, i32 0, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1721 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array1723 = internal constant [2 x %0*] [%0* null, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1722 to %0*)], section "llvm.metadata" ; <[2 x %0*]*> [#uses=1] - at llvm.dbg.composite1724 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([2 x %0*]* @llvm.dbg.array1723 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str1725 = internal constant [16 x i8] c"~overflow_error\00", section "llvm.metadata" ; <[16 x i8]*> [#uses=1] - at .str1726 = internal constant [26 x i8] c"_ZNSt14overflow_errorD1Ev\00", section "llvm.metadata" ; <[26 x i8]*> [#uses=1] - at llvm.dbg.subprogram1727 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([16 x i8]* @.str1725, i32 0, i32 0), i8* getelementptr ([16 x i8]* @.str1725, i32 0, i32 0), i8* getelementptr ([26 x i8]* @.str1726, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit770 to %0*), i32 134, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1724 to %0*), i1 false, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at _ZTVSt14overflow_error = weak constant [5 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTISt14overflow_error to i32 (...)*), i32 (...)* bitcast (void (%"struct.std::overflow_error"*)* @_ZNSt14overflow_errorD1Ev to i32 (...)*), i32 (...)* bitcast (void (%"struct.std::overflow_error"*)* @_ZNSt14overflow_errorD0Ev to i32 (...)*), i32 (...)* bitcast (i8* (%"struct.std::runtime_error"*)* @_ZNKSt13runtime_error4whatEv to i32 (...)*)], align 8 ; <[5 x i32 (...)*]*> [#uses=1] - at .str1735 = internal constant [26 x i8] c"_ZNSt14overflow_errorD0Ev\00", section "llvm.metadata" ; <[26 x i8]*> [#uses=1] - at llvm.dbg.subprogram1736 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([16 x i8]* @.str1725, i32 0, i32 0), i8* getelementptr ([16 x i8]* @.str1725, i32 0, i32 0), i8* getelementptr ([26 x i8]* @.str1735, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 702, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1724 to %0*), i1 false, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.array1738 = internal constant [2 x %0*] [%0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to %0*)], section "llvm.metadata" ; <[2 x %0*]*> [#uses=1] - at llvm.dbg.composite1739 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([2 x %0*]* @llvm.dbg.array1738 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str1740 = internal constant [14 x i8] c"__complex_exp\00", section "llvm.metadata" ; <[14 x i8]*> [#uses=1] - at .str1741 = internal constant [22 x i8] c"_ZSt13__complex_expCd\00", section "llvm.metadata" ; <[22 x i8]*> [#uses=1] - at llvm.dbg.subprogram1742 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([14 x i8]* @.str1740, i32 0, i32 0), i8* getelementptr ([14 x i8]* @.str1740, i32 0, i32 0), i8* getelementptr ([22 x i8]* @.str1741, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*), i32 730, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1739 to %0*), i1 false, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str1744 = internal constant [12 x i8] c"exp\00", section "llvm.metadata" ; <[12 x i8]*> [#uses=1] - at .str1745 = internal constant [31 x i8] c"_ZSt3expIdESt7complexIT_ERKS2_\00", section "llvm.metadata" ; <[31 x i8]*> [#uses=1] - at llvm.dbg.subprogram1746 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([12 x i8]* @.str1744, i32 0, i32 0), i8* getelementptr ([12 x i8]* @.str1744, i32 0, i32 0), i8* getelementptr ([31 x i8]* @.str1745, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*), i32 738, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite573 to %0*), i1 false, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.subprogram1748 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([4 x i8]* @.str457, i32 0, i32 0), i8* getelementptr ([4 x i8]* @.str457, i32 0, i32 0), i8* getelementptr ([29 x i8]* @.str495, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 497, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite488 to %0*), i1 false, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.variable1751 = internal constant %llvm.dbg.variable.type { i32 459008, %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1748 to %0*), i8* getelementptr ([7 x i8]* @.str259, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 503, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite486 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] - at .str1752 = internal constant [2 x i8] c"u\00", section "llvm.metadata" ; <[2 x i8]*> [#uses=1] - at llvm.dbg.variable1753 = internal constant %llvm.dbg.variable.type { i32 459008, %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1748 to %0*), i8* getelementptr ([2 x i8]* @.str1752, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 501, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite223 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] - at .str1754 = internal constant [2 x i8] c"t\00", section "llvm.metadata" ; <[2 x i8]*> [#uses=1] - at llvm.dbg.variable1755 = internal constant %llvm.dbg.variable.type { i32 459008, %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1748 to %0*), i8* getelementptr ([2 x i8]* @.str1754, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 501, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite223 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] - at .str1756 = internal constant [2 x i8] c"w\00", section "llvm.metadata" ; <[2 x i8]*> [#uses=1] - at llvm.dbg.variable1757 = internal constant %llvm.dbg.variable.type { i32 459008, %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1748 to %0*), i8* getelementptr ([2 x i8]* @.str1756, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 501, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite223 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] - at .str1758 = internal constant [3 x i8] c"wm\00", section "llvm.metadata" ; <[3 x i8]*> [#uses=1] - at llvm.dbg.variable1759 = internal constant %llvm.dbg.variable.type { i32 459008, %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1748 to %0*), i8* getelementptr ([3 x i8]* @.str1758, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 501, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite223 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] - at llvm.dbg.subprogram1771 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([12 x i8]* @.str460, i32 0, i32 0), i8* getelementptr ([12 x i8]* @.str460, i32 0, i32 0), i8* getelementptr ([52 x i8]* @.str497, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 535, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite492 to %0*), i1 false, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.variable1774 = internal constant %llvm.dbg.variable.type { i32 459008, %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1771 to %0*), i8* getelementptr ([7 x i8]* @.str259, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 541, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite486 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] - at llvm.dbg.variable1775 = internal constant %llvm.dbg.variable.type { i32 459008, %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1771 to %0*), i8* getelementptr ([2 x i8]* @.str1752, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 539, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite223 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] - at llvm.dbg.variable1776 = internal constant %llvm.dbg.variable.type { i32 459008, %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1771 to %0*), i8* getelementptr ([2 x i8]* @.str1754, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 539, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite223 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] - at llvm.dbg.variable1777 = internal constant %llvm.dbg.variable.type { i32 459008, %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1771 to %0*), i8* getelementptr ([2 x i8]* @.str1756, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 539, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite223 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] - at llvm.dbg.variable1778 = internal constant %llvm.dbg.variable.type { i32 459008, %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1771 to %0*), i8* getelementptr ([3 x i8]* @.str1758, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 539, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite223 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] - at llvm.dbg.subprogram1785 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([10 x i8]* @.str463, i32 0, i32 0), i8* getelementptr ([10 x i8]* @.str463, i32 0, i32 0), i8* getelementptr ([28 x i8]* @.str499, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 576, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite351 to %0*), i1 false, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at llvm.dbg.variable1791 = internal constant %llvm.dbg.variable.type { i32 459008, %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1785 to %0*), i8* getelementptr ([7 x i8]* @.str259, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 614, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite518 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] - at .str1794 = internal constant [5 x i8] c"dft2\00", section "llvm.metadata" ; <[5 x i8]*> [#uses=1] - at llvm.dbg.variable1795 = internal constant %llvm.dbg.variable.type { i32 459008, %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1785 to %0*), i8* getelementptr ([5 x i8]* @.str1794, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 601, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite486 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] - at .str1796 = internal constant [5 x i8] c"dft1\00", section "llvm.metadata" ; <[5 x i8]*> [#uses=1] - at llvm.dbg.variable1797 = internal constant %llvm.dbg.variable.type { i32 459008, %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1785 to %0*), i8* getelementptr ([5 x i8]* @.str1796, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 600, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite486 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] - at .str1798 = internal constant [3 x i8] c"a2\00", section "llvm.metadata" ; <[3 x i8]*> [#uses=1] - at llvm.dbg.variable1799 = internal constant %llvm.dbg.variable.type { i32 459008, %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1785 to %0*), i8* getelementptr ([3 x i8]* @.str1798, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 591, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite518 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] - at .str1800 = internal constant [3 x i8] c"a1\00", section "llvm.metadata" ; <[3 x i8]*> [#uses=1] - at llvm.dbg.variable1801 = internal constant %llvm.dbg.variable.type { i32 459008, %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1785 to %0*), i8* getelementptr ([3 x i8]* @.str1800, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 590, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite518 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] - at llvm.dbg.derivedtype1802 = internal constant %llvm.dbg.derivedtype.type { i32 458767, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 32, i64 32, i64 0, i32 0, %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype837 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1] - at llvm.dbg.array1803 = internal constant [3 x %0*] [%0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype269 to %0*), %0* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype269 to %0*), %0* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype1802 to %0*)], section "llvm.metadata" ; <[3 x %0*]*> [#uses=1] - at llvm.dbg.composite1804 = internal constant %llvm.dbg.composite.type { i32 458773, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 0, i64 0, i64 0, i64 0, i32 0, %0* null, %0* bitcast ([3 x %0*]* @llvm.dbg.array1803 to %0*), i32 0 }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1] - at .str1805 = internal constant [5 x i8] c"main\00", section "llvm.metadata" ; <[5 x i8]*> [#uses=1] - at llvm.dbg.subprogram1806 = internal constant %llvm.dbg.subprogram.type { i32 458798, %0* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %0*), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i8* getelementptr ([5 x i8]* @.str1805, i32 0, i32 0), i8* getelementptr ([5 x i8]* @.str1805, i32 0, i32 0), i8* null, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 654, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite1804 to %0*), i1 false, i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1] - at .str1816 = internal constant [6 x i8] c"poly3\00", section "llvm.metadata" ; <[6 x i8]*> [#uses=1] - at llvm.dbg.variable1817 = internal constant %llvm.dbg.variable.type { i32 459008, %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1806 to %0*), i8* getelementptr ([6 x i8]* @.str1816, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 674, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite518 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] - at .str1818 = internal constant [6 x i8] c"poly2\00", section "llvm.metadata" ; <[6 x i8]*> [#uses=1] - at llvm.dbg.variable1819 = internal constant %llvm.dbg.variable.type { i32 459008, %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1806 to %0*), i8* getelementptr ([6 x i8]* @.str1818, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 673, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite518 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] - at .str1820 = internal constant [6 x i8] c"poly1\00", section "llvm.metadata" ; <[6 x i8]*> [#uses=1] - at llvm.dbg.variable1821 = internal constant %llvm.dbg.variable.type { i32 459008, %0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1806 to %0*), i8* getelementptr ([6 x i8]* @.str1820, i32 0, i32 0), %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*), i32 672, %0* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite518 to %0*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1] - at .str1824 = internal constant [4 x i8] c"-ga\00", align 4 ; <[4 x i8]*> [#uses=0] - at _ZSt4cout = external global %"struct.std::basic_ostream >" ; <%"struct.std::basic_ostream >"*> [#uses=3] - at .str1825 = internal constant [32 x i8] c"\0Afftbench (Std. C++) run time: \00" ; <[32 x i8]*> [#uses=1] - at .str1826 = internal constant [3 x i8] c"\0A\0A\00" ; <[3 x i8]*> [#uses=1] - at llvm.global_ctors = appending global [1 x %2] [%2 { i32 65535, void ()* @_GLOBAL__I_main }] ; <[1 x %2]*> [#uses=0] - - at _ZL20__gthrw_pthread_oncePiPFvvE = alias weak i32 (i32*, void ()*)* @pthread_once ; [#uses=0] - at _ZL27__gthrw_pthread_getspecificj = alias weak i8* (i32)* @pthread_getspecific ; [#uses=0] - at _ZL27__gthrw_pthread_setspecificjPKv = alias weak i32 (i32, i8*)* @pthread_setspecific ; [#uses=0] - at _ZL22__gthrw_pthread_createPmPK14pthread_attr_tPFPvS3_ES3_ = alias weak i32 (i32*, %struct.pthread_attr_t*, i8* (i8*)*, i8*)* @pthread_create ; [#uses=0] - at _ZL22__gthrw_pthread_cancelm = alias weak i32 (i32)* @pthread_cancel ; [#uses=0] - at _ZL26__gthrw_pthread_mutex_lockP15pthread_mutex_t = alias weak i32 (%struct.pthread_mutex_t*)* @pthread_mutex_lock ; [#uses=0] - at _ZL29__gthrw_pthread_mutex_trylockP15pthread_mutex_t = alias weak i32 (%struct.pthread_mutex_t*)* @pthread_mutex_trylock ; [#uses=0] - at _ZL28__gthrw_pthread_mutex_unlockP15pthread_mutex_t = alias weak i32 (%struct.pthread_mutex_t*)* @pthread_mutex_unlock ; [#uses=0] - at _ZL26__gthrw_pthread_mutex_initP15pthread_mutex_tPK19pthread_mutexattr_t = alias weak i32 (%struct.pthread_mutex_t*, %struct..0._50*)* @pthread_mutex_init ; [#uses=0] - at _ZL26__gthrw_pthread_key_createPjPFvPvE = alias weak i32 (i32*, void (i8*)*)* @pthread_key_create ; [#uses=0] - at _ZL26__gthrw_pthread_key_deletej = alias weak i32 (i32)* @pthread_key_delete ; [#uses=0] - at _ZL30__gthrw_pthread_mutexattr_initP19pthread_mutexattr_t = alias weak i32 (%struct..0._50*)* @pthread_mutexattr_init ; [#uses=0] - at _ZL33__gthrw_pthread_mutexattr_settypeP19pthread_mutexattr_ti = alias weak i32 (%struct..0._50*, i32)* @pthread_mutexattr_settype ; [#uses=0] - at _ZL33__gthrw_pthread_mutexattr_destroyP19pthread_mutexattr_t = alias weak i32 (%struct..0._50*)* @pthread_mutexattr_destroy ; [#uses=0] - -define i32 @main(i32 %argc, i8** nocapture %argv) { -entry: - %n.0.reg2mem = alloca i32 ; [#uses=5] - %poly3 = alloca %"struct.polynomial", align 8 ; <%"struct.polynomial"*> [#uses=5] - %poly2 = alloca %"struct.polynomial", align 8 ; <%"struct.polynomial"*> [#uses=6] - %poly1 = alloca %"struct.polynomial", align 8 ; <%"struct.polynomial"*> [#uses=6] - %0 = alloca %"struct.polynomial", align 8 ; <%"struct.polynomial"*> [#uses=4] - call void @llvm.dbg.func.start(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1806 to %0*)) - %1 = bitcast %"struct.polynomial"* %poly3 to %0* ; <%0*> [#uses=1] - call void @llvm.dbg.declare(%0* %1, %0* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable1817 to %0*)) - %2 = bitcast %"struct.polynomial"* %poly2 to %0* ; <%0*> [#uses=1] - call void @llvm.dbg.declare(%0* %2, %0* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable1819 to %0*)) - %3 = bitcast %"struct.polynomial"* %poly1 to %0* ; <%0*> [#uses=1] - call void @llvm.dbg.declare(%0* %3, %0* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable1821 to %0*)) - call void @llvm.dbg.stoppoint(i32 659, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %4 = icmp sgt i32 %argc, 1 ; [#uses=1] - br i1 %4, label %bb4, label %bb5 - -bb1: ; preds = %bb4 - call void @llvm.dbg.stoppoint(i32 663, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %5 = getelementptr i8** %argv, i32 1 ; [#uses=1] - %6 = load i8** %5, align 1 ; [#uses=1] - %tmp = bitcast i8* %6 to i32* ; [#uses=1] - %lhsv = load i32* %tmp, align 1 ; [#uses=1] - %7 = icmp eq i32 %lhsv, 6383405 ; [#uses=1] - br i1 %7, label %bb5, label %bb3 - -bb3: ; preds = %bb1 - call void @llvm.dbg.stoppoint(i32 661, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %8 = add i32 %i.0, 1 ; [#uses=1] - br label %bb4 - -bb4: ; preds = %bb3, %entry - %i.0 = phi i32 [ %8, %bb3 ], [ 1, %entry ] ; [#uses=2] - call void @llvm.dbg.stoppoint(i32 661, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %9 = icmp slt i32 %i.0, %argc ; [#uses=1] - br i1 %9, label %bb1, label %bb5 - -bb5: ; preds = %bb4, %bb1, %entry - %ga_testing.0 = phi i8 [ 0, %entry ], [ 0, %bb4 ], [ 1, %bb1 ] ; [#uses=1] - call void @llvm.dbg.stoppoint(i32 672, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - call void @_ZN10polynomialIdEC1Ej(%"struct.polynomial"* %poly1, i32 524288) - call void @llvm.dbg.stoppoint(i32 673, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - invoke void @_ZN10polynomialIdEC1Ej(%"struct.polynomial"* %poly2, i32 524288) - to label %invcont unwind label %lpad - -invcont: ; preds = %bb5 - call void @llvm.dbg.stoppoint(i32 674, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - invoke void @_ZN10polynomialIdEC1Ej(%"struct.polynomial"* %poly3, i32 1048575) - to label %bb8.thread unwind label %lpad47 - -bb8.thread: ; preds = %invcont - store i32 0, i32* %n.0.reg2mem - call void @llvm.dbg.stoppoint(i32 676, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - br label %bb7 - -bb7: ; preds = %bb8, %bb8.thread - call void @llvm.dbg.stoppoint(i32 678, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %n.0.reload3 = load i32* %n.0.reg2mem ; [#uses=1] - %10 = call double* @_ZN10polynomialIdEixEj(%"struct.polynomial"* %poly1, i32 %n.0.reload3) nounwind ; [#uses=1] - call void @llvm.dbg.stoppoint(i32 68, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %11 = load i32* @_ZZL13random_doublevE4seed, align 4 ; [#uses=1] - %12 = xor i32 %11, 123459876 ; [#uses=3] - store i32 %12, i32* @_ZZL13random_doublevE4seed, align 4 - call void @llvm.dbg.stoppoint(i32 69, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %13 = sdiv i32 %12, 127773 ; [#uses=2] - call void @llvm.dbg.stoppoint(i32 70, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %14 = mul i32 %13, 127773 ; [#uses=1] - %15 = sub i32 %12, %14 ; [#uses=1] - %16 = mul i32 %15, 16807 ; [#uses=1] - %17 = mul i32 %13, 2836 ; [#uses=1] - %18 = sub i32 %16, %17 ; [#uses=2] - store i32 %18, i32* @_ZZL13random_doublevE4seed, align 4 - call void @llvm.dbg.stoppoint(i32 72, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %19 = icmp slt i32 %18, 0 ; [#uses=1] - br i1 %19, label %bb.i, label %_ZL13random_doublev.exit - -bb.i: ; preds = %bb7 - call void @llvm.dbg.stoppoint(i32 73, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %20 = load i32* @_ZZL13random_doublevE4seed, align 4 ; [#uses=1] - %21 = add i32 %20, 2147483647 ; [#uses=1] - store i32 %21, i32* @_ZZL13random_doublevE4seed, align 4 - br label %_ZL13random_doublev.exit - -_ZL13random_doublev.exit: ; preds = %bb.i, %bb7 - call void @llvm.dbg.stoppoint(i32 75, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %22 = load i32* @_ZZL13random_doublevE4seed, align 4 ; [#uses=2] - %23 = sitofp i32 %22 to double ; [#uses=1] - %24 = fmul double %23, 0x3E340000002813D9 ; [#uses=1] - call void @llvm.dbg.stoppoint(i32 76, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %25 = xor i32 %22, 123459876 ; [#uses=1] - store i32 %25, i32* @_ZZL13random_doublevE4seed, align 4 - call void @llvm.dbg.stoppoint(i32 78, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - store double %24, double* %10, align 8 - call void @llvm.dbg.stoppoint(i32 679, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %n.0.reload4 = load i32* %n.0.reg2mem ; [#uses=1] - %26 = call double* @_ZN10polynomialIdEixEj(%"struct.polynomial"* %poly2, i32 %n.0.reload4) nounwind ; [#uses=1] - call void @llvm.dbg.stoppoint(i32 68, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %27 = load i32* @_ZZL13random_doublevE4seed, align 4 ; [#uses=1] - %28 = xor i32 %27, 123459876 ; [#uses=3] - store i32 %28, i32* @_ZZL13random_doublevE4seed, align 4 - call void @llvm.dbg.stoppoint(i32 69, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %29 = sdiv i32 %28, 127773 ; [#uses=2] - call void @llvm.dbg.stoppoint(i32 70, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %30 = mul i32 %29, 127773 ; [#uses=1] - %31 = sub i32 %28, %30 ; [#uses=1] - %32 = mul i32 %31, 16807 ; [#uses=1] - %33 = mul i32 %29, 2836 ; [#uses=1] - %34 = sub i32 %32, %33 ; [#uses=2] - store i32 %34, i32* @_ZZL13random_doublevE4seed, align 4 - call void @llvm.dbg.stoppoint(i32 72, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %35 = icmp slt i32 %34, 0 ; [#uses=1] - br i1 %35, label %bb.i1, label %bb8 - -bb.i1: ; preds = %_ZL13random_doublev.exit - call void @llvm.dbg.stoppoint(i32 73, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %36 = load i32* @_ZZL13random_doublevE4seed, align 4 ; [#uses=1] - %37 = add i32 %36, 2147483647 ; [#uses=1] - store i32 %37, i32* @_ZZL13random_doublevE4seed, align 4 - br label %bb8 - -bb8: ; preds = %bb.i1, %_ZL13random_doublev.exit - call void @llvm.dbg.stoppoint(i32 75, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %38 = load i32* @_ZZL13random_doublevE4seed, align 4 ; [#uses=2] - %39 = sitofp i32 %38 to double ; [#uses=1] - %40 = fmul double %39, 0x3E340000002813D9 ; [#uses=1] - call void @llvm.dbg.stoppoint(i32 76, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %41 = xor i32 %38, 123459876 ; [#uses=1] - store i32 %41, i32* @_ZZL13random_doublevE4seed, align 4 - call void @llvm.dbg.stoppoint(i32 78, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - store double %40, double* %26, align 8 - call void @llvm.dbg.stoppoint(i32 676, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %n.0.reload5 = load i32* %n.0.reg2mem ; [#uses=1] - %42 = add i32 %n.0.reload5, 1 ; [#uses=2] - store i32 %42, i32* %n.0.reg2mem - call void @llvm.dbg.stoppoint(i32 676, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %43 = icmp sgt i32 %42, 524287 ; [#uses=1] - br i1 %43, label %bb9, label %bb7 - -bb9: ; preds = %bb8 - call void @llvm.dbg.stoppoint(i32 687, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - invoke void @_ZNK10polynomialIdEmlERKS0_(%"struct.polynomial"* noalias sret %0, %"struct.polynomial"* %poly1, %"struct.polynomial"* %poly2) - to label %invcont10 unwind label %lpad51 - -invcont10: ; preds = %bb9 - call void @llvm.dbg.stoppoint(i32 687, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %44 = invoke %"struct.polynomial"* @_ZN10polynomialIdEaSERKS0_(%"struct.polynomial"* %poly3, %"struct.polynomial"* %0) - to label %invcont11 unwind label %lpad55 ; <%"struct.polynomial"*> [#uses=0] - -invcont11: ; preds = %invcont10 - call void @llvm.dbg.stoppoint(i32 687, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - invoke void @_ZN10polynomialIdED1Ev(%"struct.polynomial"* %0) - to label %bb16 unwind label %lpad51 - -bb16: ; preds = %invcont11 - call void @llvm.dbg.stoppoint(i32 695, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %toBool = icmp eq i8 %ga_testing.0, 0 ; [#uses=1] - br i1 %toBool, label %bb19, label %bb17 - -bb17: ; preds = %bb16 - call void @llvm.dbg.stoppoint(i32 696, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %45 = invoke %"struct.std::basic_ostream >"* @_ZNSolsEd(%"struct.std::basic_ostream >"* @_ZSt4cout, double 0.000000e+00) - to label %bb23 unwind label %lpad51 ; <%"struct.std::basic_ostream >"*> [#uses=0] - -bb19: ; preds = %bb16 - call void @llvm.dbg.stoppoint(i32 698, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %46 = invoke %"struct.std::basic_ostream >"* @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(%"struct.std::basic_ostream >"* @_ZSt4cout, i8* getelementptr ([32 x i8]* @.str1825, i32 0, i32 0)) - to label %invcont20 unwind label %lpad51 ; <%"struct.std::basic_ostream >"*> [#uses=1] - -invcont20: ; preds = %bb19 - call void @llvm.dbg.stoppoint(i32 698, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %47 = invoke %"struct.std::basic_ostream >"* @_ZNSolsEd(%"struct.std::basic_ostream >"* %46, double 0.000000e+00) - to label %invcont21 unwind label %lpad51 ; <%"struct.std::basic_ostream >"*> [#uses=1] - -invcont21: ; preds = %invcont20 - call void @llvm.dbg.stoppoint(i32 698, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %48 = invoke %"struct.std::basic_ostream >"* @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(%"struct.std::basic_ostream >"* %47, i8* getelementptr ([3 x i8]* @.str1826, i32 0, i32 0)) - to label %bb23 unwind label %lpad51 ; <%"struct.std::basic_ostream >"*> [#uses=0] - -bb23: ; preds = %invcont21, %bb17 - call void @llvm.dbg.stoppoint(i32 700, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %49 = invoke %"struct.std::basic_ostream >"* @_ZNSo5flushEv(%"struct.std::basic_ostream >"* @_ZSt4cout) - to label %invcont24 unwind label %lpad51 ; <%"struct.std::basic_ostream >"*> [#uses=0] - -invcont24: ; preds = %bb23 - call void @llvm.dbg.stoppoint(i32 702, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - invoke void @_ZN10polynomialIdED1Ev(%"struct.polynomial"* %poly3) - to label %bb31 unwind label %lpad47 - -bb31: ; preds = %invcont24 - call void @llvm.dbg.stoppoint(i32 702, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - invoke void @_ZN10polynomialIdED1Ev(%"struct.polynomial"* %poly2) - to label %bb38 unwind label %lpad - -bb38: ; preds = %bb31 - call void @llvm.dbg.stoppoint(i32 702, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - call void @_ZN10polynomialIdED1Ev(%"struct.polynomial"* %poly1) - call void @llvm.dbg.region.end(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1806 to %0*)) - ret i32 0 - -lpad: ; preds = %bb31, %bb5 - %eh_ptr = call i8* @llvm.eh.exception() ; [#uses=2] - %eh_select46 = call i32 (i8*, i8*, ...)* @llvm.eh.selector.i32(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i8* null) ; [#uses=0] - br label %ppad - -lpad47: ; preds = %invcont24, %invcont - %eh_ptr48 = call i8* @llvm.eh.exception() ; [#uses=2] - %eh_select50 = call i32 (i8*, i8*, ...)* @llvm.eh.selector.i32(i8* %eh_ptr48, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i8* null) ; [#uses=0] - br label %ppad75 - -lpad51: ; preds = %bb23, %invcont21, %invcont20, %bb19, %bb17, %invcont11, %bb9 - %eh_ptr52 = call i8* @llvm.eh.exception() ; [#uses=2] - %eh_select54 = call i32 (i8*, i8*, ...)* @llvm.eh.selector.i32(i8* %eh_ptr52, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i8* null) ; [#uses=0] - br label %ppad76 - -lpad55: ; preds = %invcont10 - %eh_ptr56 = call i8* @llvm.eh.exception() ; [#uses=2] - %eh_select58 = call i32 (i8*, i8*, ...)* @llvm.eh.selector.i32(i8* %eh_ptr56, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i8* null) ; [#uses=0] - call void @llvm.dbg.stoppoint(i32 687, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - invoke void @_ZN10polynomialIdED1Ev(%"struct.polynomial"* %0) - to label %ppad76 unwind label %lpad59 - -lpad59: ; preds = %lpad55 - %eh_ptr60 = call i8* @llvm.eh.exception() ; [#uses=1] - %eh_select62 = call i32 (i8*, i8*, ...)* @llvm.eh.selector.i32(i8* %eh_ptr60, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0] - call void @llvm.dbg.stoppoint(i32 687, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - call void @_ZSt9terminatev() noreturn nounwind - unreachable - -lpad63: ; preds = %ppad76 - %eh_ptr64 = call i8* @llvm.eh.exception() ; [#uses=1] - %eh_select66 = call i32 (i8*, i8*, ...)* @llvm.eh.selector.i32(i8* %eh_ptr64, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0] - call void @llvm.dbg.stoppoint(i32 702, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - call void @_ZSt9terminatev() noreturn nounwind - unreachable - -lpad67: ; preds = %ppad75 - %eh_ptr68 = call i8* @llvm.eh.exception() ; [#uses=1] - %eh_select70 = call i32 (i8*, i8*, ...)* @llvm.eh.selector.i32(i8* %eh_ptr68, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0] - call void @llvm.dbg.stoppoint(i32 702, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - call void @_ZSt9terminatev() noreturn nounwind - unreachable - -lpad71: ; preds = %ppad - %eh_ptr72 = call i8* @llvm.eh.exception() ; [#uses=1] - %eh_select74 = call i32 (i8*, i8*, ...)* @llvm.eh.selector.i32(i8* %eh_ptr72, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0] - call void @llvm.dbg.stoppoint(i32 702, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - call void @_ZSt9terminatev() noreturn nounwind - unreachable - -ppad: ; preds = %ppad75, %lpad - %eh_exception.2 = phi i8* [ %eh_ptr, %lpad ], [ %eh_exception.1, %ppad75 ] ; [#uses=1] - call void @llvm.dbg.stoppoint(i32 702, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - invoke void @_ZN10polynomialIdED1Ev(%"struct.polynomial"* %poly1) - to label %Unwind unwind label %lpad71 - -ppad75: ; preds = %ppad76, %lpad47 - %eh_exception.1 = phi i8* [ %eh_ptr48, %lpad47 ], [ %eh_exception.0, %ppad76 ] ; [#uses=1] - call void @llvm.dbg.stoppoint(i32 702, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - invoke void @_ZN10polynomialIdED1Ev(%"struct.polynomial"* %poly2) - to label %ppad unwind label %lpad67 - -ppad76: ; preds = %lpad55, %lpad51 - %eh_exception.0 = phi i8* [ %eh_ptr52, %lpad51 ], [ %eh_ptr56, %lpad55 ] ; [#uses=1] - call void @llvm.dbg.stoppoint(i32 702, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - invoke void @_ZN10polynomialIdED1Ev(%"struct.polynomial"* %poly3) - to label %ppad75 unwind label %lpad63 - -Unwind: ; preds = %ppad - call void @_Unwind_Resume(i8* %eh_exception.2) - unreachable -} - -define internal void @_GLOBAL__I_main() { -entry: - call void @llvm.dbg.func.start(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram657 to %0*)) - call void @llvm.dbg.stoppoint(i32 77, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit636 to %0*)) - call void @_ZNSt8ios_base4InitC1Ev(%"struct.std::allocator"* @_ZStL8__ioinit) - %0 = call i32 @__cxa_atexit(void (i8*)* @__tcf_0, i8* null, i8* bitcast (i8** @__dso_handle to i8*)) nounwind ; [#uses=0] - call void @llvm.dbg.stoppoint(i32 400, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %1 = load i8* bitcast (i64* @_ZGVN10polynomialIdE4PI2IE to i8*), align 8 ; [#uses=1] - %2 = icmp eq i8 %1, 0 ; [#uses=1] - br i1 %2, label %bb2.i, label %_Z41__static_initialization_and_destruction_0ii.exit - -bb2.i: ; preds = %entry - call void @llvm.dbg.stoppoint(i32 400, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - store i8 1, i8* bitcast (i64* @_ZGVN10polynomialIdE4PI2IE to i8*), align 8 - call void @_ZNSt7complexIdEC1Edd(%"struct.std::complex"* @_ZN10polynomialIdE4PI2IE, double 0.000000e+00, double 0x401921FB54442D18) nounwind - call void @llvm.dbg.region.end(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram657 to %0*)) - ret void - -_Z41__static_initialization_and_destruction_0ii.exit: ; preds = %entry - ret void -} - -define linkonce void @_ZNSt7complexIdEC1ECd(%"struct.std::complex"* %this, %1 %__z) nounwind { -entry: - %__z_addr = alloca %1, align 8 ; <%1*> [#uses=4] - call void @llvm.dbg.func.start(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram227 to %0*)) - %0 = bitcast %1* %__z_addr to %0* ; <%0*> [#uses=1] - call void @llvm.dbg.declare(%0* %0, %0* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable231 to %0*)) - store %1 %__z, %1* %__z_addr, align 8 - call void @llvm.dbg.stoppoint(i32 1161, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*)) - %1 = getelementptr %"struct.std::complex"* %this, i32 0, i32 0, i32 0 ; [#uses=1] - %2 = getelementptr %1* %__z_addr, i32 0, i32 0 ; [#uses=1] - %3 = load double* %2, align 8 ; [#uses=1] - store double %3, double* %1, align 4 - %4 = getelementptr %"struct.std::complex"* %this, i32 0, i32 0, i32 1 ; [#uses=1] - %5 = getelementptr %1* %__z_addr, i32 0, i32 1 ; [#uses=1] - %6 = load double* %5, align 8 ; [#uses=1] - store double %6, double* %4, align 4 - call void @llvm.dbg.region.end(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram227 to %0*)) - ret void -} - -declare void @llvm.dbg.func.start(%0*) nounwind readnone - -declare void @llvm.dbg.declare(%0*, %0*) nounwind readnone - -declare void @llvm.dbg.stoppoint(i32, i32, %0*) nounwind readnone - -declare void @llvm.dbg.region.end(%0*) nounwind readnone - -define linkonce %1* @_ZNKSt7complexIdE5__repEv(%"struct.std::complex"* %this) nounwind { -entry: - call void @llvm.dbg.func.start(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram232 to %0*)) - call void @llvm.dbg.stoppoint(i32 1192, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*)) - %0 = getelementptr %"struct.std::complex"* %this, i32 0, i32 0 ; <%1*> [#uses=1] - call void @llvm.dbg.region.end(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram232 to %0*)) - ret %1* %0 -} - -define linkonce double* @_ZNSt7complexIdE4realEv(%"struct.std::complex"* %this) nounwind { -entry: - call void @llvm.dbg.func.start(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram235 to %0*)) - call void @llvm.dbg.stoppoint(i32 1200, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*)) - %0 = getelementptr %"struct.std::complex"* %this, i32 0, i32 0, i32 0 ; [#uses=1] - call void @llvm.dbg.region.end(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram235 to %0*)) - ret double* %0 -} - -define linkonce double* @_ZNKSt7complexIdE4realEv(%"struct.std::complex"* %this) nounwind { -entry: - call void @llvm.dbg.func.start(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram237 to %0*)) - call void @llvm.dbg.stoppoint(i32 1204, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*)) - %0 = getelementptr %"struct.std::complex"* %this, i32 0, i32 0, i32 0 ; [#uses=1] - call void @llvm.dbg.region.end(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram237 to %0*)) - ret double* %0 -} - -define linkonce double* @_ZNKSt7complexIdE4imagEv(%"struct.std::complex"* %this) nounwind { -entry: - call void @llvm.dbg.func.start(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram239 to %0*)) - call void @llvm.dbg.stoppoint(i32 1212, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*)) - %0 = getelementptr %"struct.std::complex"* %this, i32 0, i32 0, i32 1 ; [#uses=1] - call void @llvm.dbg.region.end(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram239 to %0*)) - ret double* %0 -} - -define linkonce void @_ZNSt7complexIdEC1Edd(%"struct.std::complex"* %this, double %__r, double %__i) nounwind { -entry: - call void @llvm.dbg.func.start(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram242 to %0*)) - call void @llvm.dbg.stoppoint(i32 1217, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*)) - %0 = getelementptr %"struct.std::complex"* %this, i32 0, i32 0, i32 0 ; [#uses=1] - store double %__r, double* %0, align 4 - call void @llvm.dbg.stoppoint(i32 1218, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*)) - %1 = getelementptr %"struct.std::complex"* %this, i32 0, i32 0, i32 1 ; [#uses=1] - store double %__i, double* %1, align 4 - call void @llvm.dbg.stoppoint(i32 1219, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*)) - call void @llvm.dbg.region.end(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram242 to %0*)) - ret void -} - -define linkonce %"struct.std::complex"* @_ZNSt7complexIdEaSEd(%"struct.std::complex"* %this, double %__d) nounwind { -entry: - call void @llvm.dbg.func.start(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram248 to %0*)) - call void @llvm.dbg.stoppoint(i32 1224, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*)) - %0 = getelementptr %"struct.std::complex"* %this, i32 0, i32 0, i32 0 ; [#uses=1] - store double %__d, double* %0, align 4 - call void @llvm.dbg.stoppoint(i32 1225, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*)) - %1 = getelementptr %"struct.std::complex"* %this, i32 0, i32 0, i32 1 ; [#uses=1] - store double 0.000000e+00, double* %1, align 4 - call void @llvm.dbg.stoppoint(i32 1226, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*)) - call void @llvm.dbg.region.end(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram248 to %0*)) - ret %"struct.std::complex"* %this -} - -define linkonce %"struct.std::complex"* @_ZNSt7complexIdEdVEd(%"struct.std::complex"* %this, double %__d) nounwind { -entry: - %0 = alloca %1, align 8 ; <%1*> [#uses=4] - %1 = alloca %1, align 8 ; <%1*> [#uses=4] - %2 = alloca %1, align 8 ; <%1*> [#uses=4] - %memtmp = alloca %1, align 8 ; <%1*> [#uses=4] - %memtmp1 = alloca %1, align 8 ; <%1*> [#uses=4] - call void @llvm.dbg.func.start(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram252 to %0*)) - call void @llvm.dbg.stoppoint(i32 1253, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*)) - %3 = getelementptr %1* %2, i32 0, i32 0 ; [#uses=1] - %4 = getelementptr %"struct.std::complex"* %this, i32 0, i32 0, i32 0 ; [#uses=1] - %5 = load double* %4, align 4 ; [#uses=1] - store double %5, double* %3, align 8 - %6 = getelementptr %1* %2, i32 0, i32 1 ; [#uses=1] - %7 = getelementptr %"struct.std::complex"* %this, i32 0, i32 0, i32 1 ; [#uses=1] - %8 = load double* %7, align 4 ; [#uses=1] - store double %8, double* %6, align 8 - %real = getelementptr %1* %1, i32 0, i32 0 ; [#uses=1] - store double %__d, double* %real, align 8 - %imag = getelementptr %1* %1, i32 0, i32 1 ; [#uses=1] - store double 0.000000e+00, double* %imag, align 8 - %9 = getelementptr %1* %memtmp, i32 0, i32 0 ; [#uses=1] - %10 = getelementptr %1* %2, i32 0, i32 0 ; [#uses=1] - %11 = load double* %10, align 8 ; [#uses=1] - store double %11, double* %9, align 8 - %12 = getelementptr %1* %memtmp, i32 0, i32 1 ; [#uses=1] - %13 = getelementptr %1* %2, i32 0, i32 1 ; [#uses=1] - %14 = load double* %13, align 8 ; [#uses=1] - store double %14, double* %12, align 8 - %15 = getelementptr %1* %memtmp1, i32 0, i32 0 ; [#uses=1] - %16 = getelementptr %1* %1, i32 0, i32 0 ; [#uses=1] - %17 = load double* %16, align 8 ; [#uses=1] - store double %17, double* %15, align 8 - %18 = getelementptr %1* %memtmp1, i32 0, i32 1 ; [#uses=1] - %19 = getelementptr %1* %1, i32 0, i32 1 ; [#uses=1] - %20 = load double* %19, align 8 ; [#uses=1] - store double %20, double* %18, align 8 - %real2 = getelementptr %1* %memtmp, i32 0, i32 0 ; [#uses=1] - %real3 = load double* %real2, align 8 ; [#uses=2] - %imag4 = getelementptr %1* %memtmp, i32 0, i32 1 ; [#uses=1] - %imag5 = load double* %imag4, align 8 ; [#uses=2] - %real6 = getelementptr %1* %memtmp1, i32 0, i32 0 ; [#uses=1] - %real7 = load double* %real6, align 8 ; [#uses=4] - %imag8 = getelementptr %1* %memtmp1, i32 0, i32 1 ; [#uses=1] - %imag9 = load double* %imag8, align 8 ; [#uses=4] - %21 = fmul double %real3, %real7 ; [#uses=1] - %22 = fmul double %imag5, %imag9 ; [#uses=1] - %23 = fadd double %21, %22 ; [#uses=1] - %24 = fmul double %real7, %real7 ; [#uses=1] - %25 = fmul double %imag9, %imag9 ; [#uses=1] - %26 = fadd double %24, %25 ; [#uses=2] - %27 = fdiv double %23, %26 ; [#uses=1] - %28 = fmul double %imag5, %real7 ; [#uses=1] - %29 = fmul double %real3, %imag9 ; [#uses=1] - %30 = fsub double %28, %29 ; [#uses=1] - %31 = fdiv double %30, %26 ; [#uses=1] - %real10 = getelementptr %1* %0, i32 0, i32 0 ; [#uses=1] - store double %27, double* %real10, align 8 - %imag11 = getelementptr %1* %0, i32 0, i32 1 ; [#uses=1] - store double %31, double* %imag11, align 8 - %32 = getelementptr %"struct.std::complex"* %this, i32 0, i32 0, i32 0 ; [#uses=1] - %33 = getelementptr %1* %0, i32 0, i32 0 ; [#uses=1] - %34 = load double* %33, align 8 ; [#uses=1] - store double %34, double* %32, align 4 - %35 = getelementptr %"struct.std::complex"* %this, i32 0, i32 0, i32 1 ; [#uses=1] - %36 = getelementptr %1* %0, i32 0, i32 1 ; [#uses=1] - %37 = load double* %36, align 8 ; [#uses=1] - store double %37, double* %35, align 4 - call void @llvm.dbg.stoppoint(i32 1254, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*)) - call void @llvm.dbg.region.end(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram252 to %0*)) - ret %"struct.std::complex"* %this -} - -define linkonce double* @_ZN10polynomialIdEixEj(%"struct.polynomial"* %this, i32 %term) nounwind { -entry: - call void @llvm.dbg.func.start(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram522 to %0*)) - call void @llvm.dbg.stoppoint(i32 308, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %0 = getelementptr %"struct.polynomial"* %this, i32 0, i32 1 ; [#uses=1] - %1 = load double** %0, align 4 ; [#uses=1] - %2 = getelementptr double* %1, i32 %term ; [#uses=1] - call void @llvm.dbg.region.end(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram522 to %0*)) - ret double* %2 -} - -define linkonce i32 @_ZNK10polynomialIdE6degreeEv(%"struct.polynomial"* %this) nounwind { -entry: - call void @llvm.dbg.func.start(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram527 to %0*)) - call void @llvm.dbg.stoppoint(i32 113, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %0 = getelementptr %"struct.polynomial"* %this, i32 0, i32 2 ; [#uses=1] - %1 = load i32* %0, align 4 ; [#uses=1] - call void @llvm.dbg.region.end(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram527 to %0*)) - ret i32 %1 -} - -define linkonce %"struct.std::complex"* @_ZN10polynomialISt7complexIdEEixEj(%"struct.polynomial >"* %this, i32 %term) nounwind { -entry: - call void @llvm.dbg.func.start(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram530 to %0*)) - call void @llvm.dbg.stoppoint(i32 308, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %0 = getelementptr %"struct.polynomial >"* %this, i32 0, i32 1 ; <%"struct.std::complex"**> [#uses=1] - %1 = load %"struct.std::complex"** %0, align 4 ; <%"struct.std::complex"*> [#uses=1] - %2 = getelementptr %"struct.std::complex"* %1, i32 %term ; <%"struct.std::complex"*> [#uses=1] - call void @llvm.dbg.region.end(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram530 to %0*)) - ret %"struct.std::complex"* %2 -} - -define linkonce %"struct.std::complex"* @_ZNSt7complexIdEmLIdEERS0_RKS_IT_E(%"struct.std::complex"* %this, %"struct.std::complex"* %__z) nounwind { -entry: - %__t = alloca %1, align 8 ; <%1*> [#uses=7] - %0 = alloca %1, align 8 ; <%1*> [#uses=4] - %1 = alloca %1, align 8 ; <%1*> [#uses=4] - %memtmp = alloca %1, align 8 ; <%1*> [#uses=4] - %memtmp3 = alloca %1, align 8 ; <%1*> [#uses=4] - call void @llvm.dbg.func.start(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram538 to %0*)) - %2 = bitcast %1* %__t to %0* ; <%0*> [#uses=1] - call void @llvm.dbg.declare(%0* %2, %0* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable542 to %0*)) - call void @llvm.dbg.stoppoint(i32 1289, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*)) - %3 = call double* @_ZNKSt7complexIdE4realEv(%"struct.std::complex"* %__z) nounwind ; [#uses=1] - %4 = load double* %3, align 8 ; [#uses=1] - %5 = getelementptr %1* %__t, i32 0, i32 1 ; [#uses=1] - %6 = load double* %5, align 8 ; [#uses=1] - %real = getelementptr %1* %__t, i32 0, i32 0 ; [#uses=1] - store double %4, double* %real, align 8 - %imag = getelementptr %1* %__t, i32 0, i32 1 ; [#uses=1] - store double %6, double* %imag, align 8 - call void @llvm.dbg.stoppoint(i32 1290, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*)) - %7 = call double* @_ZNKSt7complexIdE4imagEv(%"struct.std::complex"* %__z) nounwind ; [#uses=1] - %8 = load double* %7, align 8 ; [#uses=1] - %imag2 = getelementptr %1* %__t, i32 0, i32 1 ; [#uses=1] - store double %8, double* %imag2, align 8 - call void @llvm.dbg.stoppoint(i32 1291, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*)) - %9 = getelementptr %1* %1, i32 0, i32 0 ; [#uses=1] - %10 = getelementptr %"struct.std::complex"* %this, i32 0, i32 0, i32 0 ; [#uses=1] - %11 = load double* %10, align 4 ; [#uses=1] - store double %11, double* %9, align 8 - %12 = getelementptr %1* %1, i32 0, i32 1 ; [#uses=1] - %13 = getelementptr %"struct.std::complex"* %this, i32 0, i32 0, i32 1 ; [#uses=1] - %14 = load double* %13, align 4 ; [#uses=1] - store double %14, double* %12, align 8 - %15 = getelementptr %1* %memtmp, i32 0, i32 0 ; [#uses=1] - %16 = getelementptr %1* %1, i32 0, i32 0 ; [#uses=1] - %17 = load double* %16, align 8 ; [#uses=1] - store double %17, double* %15, align 8 - %18 = getelementptr %1* %memtmp, i32 0, i32 1 ; [#uses=1] - %19 = getelementptr %1* %1, i32 0, i32 1 ; [#uses=1] - %20 = load double* %19, align 8 ; [#uses=1] - store double %20, double* %18, align 8 - %21 = getelementptr %1* %memtmp3, i32 0, i32 0 ; [#uses=1] - %22 = getelementptr %1* %__t, i32 0, i32 0 ; [#uses=1] - %23 = load double* %22, align 8 ; [#uses=1] - store double %23, double* %21, align 8 - %24 = getelementptr %1* %memtmp3, i32 0, i32 1 ; [#uses=1] - %25 = getelementptr %1* %__t, i32 0, i32 1 ; [#uses=1] - %26 = load double* %25, align 8 ; [#uses=1] - store double %26, double* %24, align 8 - %real4 = getelementptr %1* %memtmp, i32 0, i32 0 ; [#uses=1] - %real5 = load double* %real4, align 8 ; [#uses=2] - %imag6 = getelementptr %1* %memtmp, i32 0, i32 1 ; [#uses=1] - %imag7 = load double* %imag6, align 8 ; [#uses=2] - %real8 = getelementptr %1* %memtmp3, i32 0, i32 0 ; [#uses=1] - %real9 = load double* %real8, align 8 ; [#uses=2] - %imag10 = getelementptr %1* %memtmp3, i32 0, i32 1 ; [#uses=1] - %imag11 = load double* %imag10, align 8 ; [#uses=2] - %27 = fmul double %real5, %real9 ; [#uses=1] - %28 = fmul double %imag7, %imag11 ; [#uses=1] - %29 = fsub double %27, %28 ; [#uses=1] - %30 = fmul double %real5, %imag11 ; [#uses=1] - %31 = fmul double %real9, %imag7 ; [#uses=1] - %32 = fadd double %30, %31 ; [#uses=1] - %real12 = getelementptr %1* %0, i32 0, i32 0 ; [#uses=1] - store double %29, double* %real12, align 8 - %imag13 = getelementptr %1* %0, i32 0, i32 1 ; [#uses=1] - store double %32, double* %imag13, align 8 - %33 = getelementptr %"struct.std::complex"* %this, i32 0, i32 0, i32 0 ; [#uses=1] - %34 = getelementptr %1* %0, i32 0, i32 0 ; [#uses=1] - %35 = load double* %34, align 8 ; [#uses=1] - store double %35, double* %33, align 4 - %36 = getelementptr %"struct.std::complex"* %this, i32 0, i32 0, i32 1 ; [#uses=1] - %37 = getelementptr %1* %0, i32 0, i32 1 ; [#uses=1] - %38 = load double* %37, align 8 ; [#uses=1] - store double %38, double* %36, align 4 - call void @llvm.dbg.stoppoint(i32 1292, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*)) - call void @llvm.dbg.region.end(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram538 to %0*)) - ret %"struct.std::complex"* %this -} - -define linkonce void @_ZN10polynomialIdE9deep_copyEPKd(%"struct.polynomial"* %this, double* %source) nounwind { -entry: - call void @llvm.dbg.func.start(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram543 to %0*)) - call void @llvm.dbg.stoppoint(i32 197, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - br label %bb1 - -bb: ; preds = %bb1 - call void @llvm.dbg.stoppoint(i32 198, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %0 = getelementptr %"struct.polynomial"* %this, i32 0, i32 1 ; [#uses=1] - %1 = load double** %0, align 4 ; [#uses=1] - %2 = getelementptr double* %source, i32 %n.0 ; [#uses=1] - %3 = load double* %2, align 1 ; [#uses=1] - %4 = getelementptr double* %1, i32 %n.0 ; [#uses=1] - store double %3, double* %4, align 1 - call void @llvm.dbg.stoppoint(i32 197, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %5 = add i32 %n.0, 1 ; [#uses=1] - br label %bb1 - -bb1: ; preds = %bb, %entry - %n.0 = phi i32 [ 0, %entry ], [ %5, %bb ] ; [#uses=4] - call void @llvm.dbg.stoppoint(i32 197, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %6 = getelementptr %"struct.polynomial"* %this, i32 0, i32 2 ; [#uses=1] - %7 = load i32* %6, align 4 ; [#uses=1] - %8 = icmp ugt i32 %7, %n.0 ; [#uses=1] - br i1 %8, label %bb, label %return - -return: ; preds = %bb1 - call void @llvm.dbg.stoppoint(i32 198, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - call void @llvm.dbg.region.end(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram543 to %0*)) - ret void -} - -define linkonce i32 @_ZN10polynomialIdE4log2Ej(i32 %n) nounwind { -entry: - call void @llvm.dbg.func.start(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram549 to %0*)) - call void @llvm.dbg.stoppoint(i32 407, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - br label %bb1 - -bb: ; preds = %bb1 - call void @llvm.dbg.stoppoint(i32 411, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %0 = add i32 %c.0, 1 ; [#uses=2] - call void @llvm.dbg.stoppoint(i32 412, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %1 = shl i32 %x.0, 1 ; [#uses=2] - call void @llvm.dbg.stoppoint(i32 414, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %2 = icmp eq i32 %1, 0 ; [#uses=1] - br i1 %2, label %return, label %bb1 - -bb1: ; preds = %bb, %entry - %c.0 = phi i32 [ 0, %entry ], [ %0, %bb ] ; [#uses=2] - %x.0 = phi i32 [ 1, %entry ], [ %1, %bb ] ; [#uses=2] - call void @llvm.dbg.stoppoint(i32 409, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %3 = icmp ult i32 %x.0, %n ; [#uses=1] - br i1 %3, label %bb, label %return - -return: ; preds = %bb1, %bb - %c.1 = phi i32 [ %c.0, %bb1 ], [ %0, %bb ] ; [#uses=1] - call void @llvm.dbg.stoppoint(i32 418, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - call void @llvm.dbg.region.end(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram549 to %0*)) - ret i32 %c.1 -} - -define linkonce void @_ZStmlIdESt7complexIT_ERKS2_S4_(%"struct.std::complex"* noalias sret %agg.result, %"struct.std::complex"* %__x, %"struct.std::complex"* %__y) nounwind { -entry: - %__r = alloca %"struct.std::complex", align 8 ; <%"struct.std::complex"*> [#uses=1] - call void @llvm.dbg.func.start(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram559 to %0*)) - %0 = bitcast %"struct.std::complex"* %__r to %0* ; <%0*> [#uses=1] - call void @llvm.dbg.declare(%0* %0, %0* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable564 to %0*)) - call void @llvm.dbg.stoppoint(i32 380, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*)) - %1 = getelementptr %"struct.std::complex"* %agg.result, i32 0, i32 0, i32 0 ; [#uses=1] - %2 = getelementptr %"struct.std::complex"* %__x, i32 0, i32 0, i32 0 ; [#uses=1] - %3 = load double* %2, align 4 ; [#uses=1] - store double %3, double* %1, align 4 - %4 = getelementptr %"struct.std::complex"* %agg.result, i32 0, i32 0, i32 1 ; [#uses=1] - %5 = getelementptr %"struct.std::complex"* %__x, i32 0, i32 0, i32 1 ; [#uses=1] - %6 = load double* %5, align 4 ; [#uses=1] - store double %6, double* %4, align 4 - call void @llvm.dbg.stoppoint(i32 381, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*)) - %7 = call %"struct.std::complex"* @_ZNSt7complexIdEmLIdEERS0_RKS_IT_E(%"struct.std::complex"* %agg.result, %"struct.std::complex"* %__y) nounwind ; <%"struct.std::complex"*> [#uses=0] - call void @llvm.dbg.region.end(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram559 to %0*)) - ret void -} - -define linkonce void @_ZN10polynomialISt7complexIdEE9deep_copyEPKS1_(%"struct.polynomial >"* %this, %"struct.std::complex"* %source) nounwind { -entry: - call void @llvm.dbg.func.start(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram565 to %0*)) - call void @llvm.dbg.stoppoint(i32 197, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - br label %bb1 - -bb: ; preds = %bb1 - call void @llvm.dbg.stoppoint(i32 198, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %0 = getelementptr %"struct.polynomial >"* %this, i32 0, i32 1 ; <%"struct.std::complex"**> [#uses=1] - %1 = load %"struct.std::complex"** %0, align 4 ; <%"struct.std::complex"*> [#uses=2] - %2 = getelementptr %"struct.std::complex"* %1, i32 %n.0, i32 0, i32 0 ; [#uses=1] - %3 = getelementptr %"struct.std::complex"* %source, i32 %n.0, i32 0, i32 0 ; [#uses=1] - %4 = load double* %3, align 1 ; [#uses=1] - store double %4, double* %2, align 1 - %5 = getelementptr %"struct.std::complex"* %1, i32 %n.0, i32 0, i32 1 ; [#uses=1] - %6 = getelementptr %"struct.std::complex"* %source, i32 %n.0, i32 0, i32 1 ; [#uses=1] - %7 = load double* %6, align 1 ; [#uses=1] - store double %7, double* %5, align 1 - call void @llvm.dbg.stoppoint(i32 197, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %8 = add i32 %n.0, 1 ; [#uses=1] - br label %bb1 - -bb1: ; preds = %bb, %entry - %n.0 = phi i32 [ 0, %entry ], [ %8, %bb ] ; [#uses=6] - call void @llvm.dbg.stoppoint(i32 197, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %9 = getelementptr %"struct.polynomial >"* %this, i32 0, i32 2 ; [#uses=1] - %10 = load i32* %9, align 4 ; [#uses=1] - %11 = icmp ugt i32 %10, %n.0 ; [#uses=1] - br i1 %11, label %bb, label %return - -return: ; preds = %bb1 - call void @llvm.dbg.stoppoint(i32 198, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - call void @llvm.dbg.region.end(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram565 to %0*)) - ret void -} - -define linkonce i32 @_ZNK10polynomialISt7complexIdEE6degreeEv(%"struct.polynomial >"* %this) nounwind { -entry: - call void @llvm.dbg.func.start(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram569 to %0*)) - call void @llvm.dbg.stoppoint(i32 113, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %0 = getelementptr %"struct.polynomial >"* %this, i32 0, i32 2 ; [#uses=1] - %1 = load i32* %0, align 4 ; [#uses=1] - call void @llvm.dbg.region.end(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram569 to %0*)) - ret i32 %1 -} - -define linkonce void @_ZStngIdESt7complexIT_ERKS2_(%"struct.std::complex"* noalias sret %agg.result, %"struct.std::complex"* %__x) nounwind { -entry: - call void @llvm.dbg.func.start(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram576 to %0*)) - call void @llvm.dbg.stoppoint(i32 444, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*)) - %0 = call double* @_ZNKSt7complexIdE4imagEv(%"struct.std::complex"* %__x) nounwind ; [#uses=1] - %1 = load double* %0, align 8 ; [#uses=1] - %2 = fsub double -0.000000e+00, %1 ; [#uses=1] - %3 = call double* @_ZNKSt7complexIdE4realEv(%"struct.std::complex"* %__x) nounwind ; [#uses=1] - %4 = load double* %3, align 8 ; [#uses=1] - %5 = fsub double -0.000000e+00, %4 ; [#uses=1] - call void @_ZNSt7complexIdEC1Edd(%"struct.std::complex"* %agg.result, double %5, double %2) nounwind - call void @llvm.dbg.region.end(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram576 to %0*)) - ret void -} - -define linkonce double @_ZNK10polynomialIdE3getEj(%"struct.polynomial"* %this, i32 %term) nounwind { -entry: - call void @llvm.dbg.func.start(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram578 to %0*)) - call void @llvm.dbg.stoppoint(i32 302, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %0 = getelementptr %"struct.polynomial"* %this, i32 0, i32 1 ; [#uses=1] - %1 = load double** %0, align 4 ; [#uses=1] - %2 = getelementptr double* %1, i32 %term ; [#uses=1] - %3 = load double* %2, align 1 ; [#uses=1] - call void @llvm.dbg.region.end(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram578 to %0*)) - ret double %3 -} - -define linkonce i32 @_ZN10polynomialIdE9flip_bitsEjj(i32 %k, i32 %bits) nounwind { -entry: - call void @llvm.dbg.func.start(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram581 to %0*)) - call void @llvm.dbg.stoppoint(i32 425, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %0 = add i32 %bits, -1 ; [#uses=1] - %1 = shl i32 1, %0 ; [#uses=1] - call void @llvm.dbg.stoppoint(i32 427, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - br label %bb3 - -bb: ; preds = %bb3 - call void @llvm.dbg.stoppoint(i32 431, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %2 = and i32 %rm.0, %k ; [#uses=1] - %3 = icmp ne i32 %2, 0 ; [#uses=1] - %4 = select i1 %3, i32 %lm.0, i32 0 ; [#uses=1] - %.r.1 = or i32 %r.1, %4 ; [#uses=1] - call void @llvm.dbg.stoppoint(i32 434, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %5 = lshr i32 %lm.0, 1 ; [#uses=1] - call void @llvm.dbg.stoppoint(i32 435, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %6 = shl i32 %rm.0, 1 ; [#uses=1] - br label %bb3 - -bb3: ; preds = %bb, %entry - %r.1 = phi i32 [ 0, %entry ], [ %.r.1, %bb ] ; [#uses=2] - %rm.0 = phi i32 [ 1, %entry ], [ %6, %bb ] ; [#uses=2] - %lm.0 = phi i32 [ %1, %entry ], [ %5, %bb ] ; [#uses=3] - call void @llvm.dbg.stoppoint(i32 429, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %7 = icmp eq i32 %lm.0, 0 ; [#uses=1] - br i1 %7, label %return, label %bb - -return: ; preds = %bb3 - call void @llvm.dbg.stoppoint(i32 438, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - call void @llvm.dbg.region.end(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram581 to %0*)) - ret i32 %r.1 -} - -define linkonce %"struct.std::complex"* @_ZNSt7complexIdEdVIdEERS0_RKS_IT_E(%"struct.std::complex"* %this, %"struct.std::complex"* %__z) nounwind { -entry: - %__t = alloca %1, align 8 ; <%1*> [#uses=7] - %0 = alloca %1, align 8 ; <%1*> [#uses=4] - %1 = alloca %1, align 8 ; <%1*> [#uses=4] - %memtmp = alloca %1, align 8 ; <%1*> [#uses=4] - %memtmp3 = alloca %1, align 8 ; <%1*> [#uses=4] - call void @llvm.dbg.func.start(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram593 to %0*)) - %2 = bitcast %1* %__t to %0* ; <%0*> [#uses=1] - call void @llvm.dbg.declare(%0* %2, %0* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable596 to %0*)) - call void @llvm.dbg.stoppoint(i32 1300, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*)) - %3 = call double* @_ZNKSt7complexIdE4realEv(%"struct.std::complex"* %__z) nounwind ; [#uses=1] - %4 = load double* %3, align 8 ; [#uses=1] - %5 = getelementptr %1* %__t, i32 0, i32 1 ; [#uses=1] - %6 = load double* %5, align 8 ; [#uses=1] - %real = getelementptr %1* %__t, i32 0, i32 0 ; [#uses=1] - store double %4, double* %real, align 8 - %imag = getelementptr %1* %__t, i32 0, i32 1 ; [#uses=1] - store double %6, double* %imag, align 8 - call void @llvm.dbg.stoppoint(i32 1301, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*)) - %7 = call double* @_ZNKSt7complexIdE4imagEv(%"struct.std::complex"* %__z) nounwind ; [#uses=1] - %8 = load double* %7, align 8 ; [#uses=1] - %imag2 = getelementptr %1* %__t, i32 0, i32 1 ; [#uses=1] - store double %8, double* %imag2, align 8 - call void @llvm.dbg.stoppoint(i32 1302, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*)) - %9 = getelementptr %1* %1, i32 0, i32 0 ; [#uses=1] - %10 = getelementptr %"struct.std::complex"* %this, i32 0, i32 0, i32 0 ; [#uses=1] - %11 = load double* %10, align 4 ; [#uses=1] - store double %11, double* %9, align 8 - %12 = getelementptr %1* %1, i32 0, i32 1 ; [#uses=1] - %13 = getelementptr %"struct.std::complex"* %this, i32 0, i32 0, i32 1 ; [#uses=1] - %14 = load double* %13, align 4 ; [#uses=1] - store double %14, double* %12, align 8 - %15 = getelementptr %1* %memtmp, i32 0, i32 0 ; [#uses=1] - %16 = getelementptr %1* %1, i32 0, i32 0 ; [#uses=1] - %17 = load double* %16, align 8 ; [#uses=1] - store double %17, double* %15, align 8 - %18 = getelementptr %1* %memtmp, i32 0, i32 1 ; [#uses=1] - %19 = getelementptr %1* %1, i32 0, i32 1 ; [#uses=1] - %20 = load double* %19, align 8 ; [#uses=1] - store double %20, double* %18, align 8 - %21 = getelementptr %1* %memtmp3, i32 0, i32 0 ; [#uses=1] - %22 = getelementptr %1* %__t, i32 0, i32 0 ; [#uses=1] - %23 = load double* %22, align 8 ; [#uses=1] - store double %23, double* %21, align 8 - %24 = getelementptr %1* %memtmp3, i32 0, i32 1 ; [#uses=1] - %25 = getelementptr %1* %__t, i32 0, i32 1 ; [#uses=1] - %26 = load double* %25, align 8 ; [#uses=1] - store double %26, double* %24, align 8 - %real4 = getelementptr %1* %memtmp, i32 0, i32 0 ; [#uses=1] - %real5 = load double* %real4, align 8 ; [#uses=2] - %imag6 = getelementptr %1* %memtmp, i32 0, i32 1 ; [#uses=1] - %imag7 = load double* %imag6, align 8 ; [#uses=2] - %real8 = getelementptr %1* %memtmp3, i32 0, i32 0 ; [#uses=1] - %real9 = load double* %real8, align 8 ; [#uses=4] - %imag10 = getelementptr %1* %memtmp3, i32 0, i32 1 ; [#uses=1] - %imag11 = load double* %imag10, align 8 ; [#uses=4] - %27 = fmul double %real5, %real9 ; [#uses=1] - %28 = fmul double %imag7, %imag11 ; [#uses=1] - %29 = fadd double %27, %28 ; [#uses=1] - %30 = fmul double %real9, %real9 ; [#uses=1] - %31 = fmul double %imag11, %imag11 ; [#uses=1] - %32 = fadd double %30, %31 ; [#uses=2] - %33 = fdiv double %29, %32 ; [#uses=1] - %34 = fmul double %imag7, %real9 ; [#uses=1] - %35 = fmul double %real5, %imag11 ; [#uses=1] - %36 = fsub double %34, %35 ; [#uses=1] - %37 = fdiv double %36, %32 ; [#uses=1] - %real12 = getelementptr %1* %0, i32 0, i32 0 ; [#uses=1] - store double %33, double* %real12, align 8 - %imag13 = getelementptr %1* %0, i32 0, i32 1 ; [#uses=1] - store double %37, double* %imag13, align 8 - %38 = getelementptr %"struct.std::complex"* %this, i32 0, i32 0, i32 0 ; [#uses=1] - %39 = getelementptr %1* %0, i32 0, i32 0 ; [#uses=1] - %40 = load double* %39, align 8 ; [#uses=1] - store double %40, double* %38, align 4 - %41 = getelementptr %"struct.std::complex"* %this, i32 0, i32 0, i32 1 ; [#uses=1] - %42 = getelementptr %1* %0, i32 0, i32 1 ; [#uses=1] - %43 = load double* %42, align 8 ; [#uses=1] - store double %43, double* %41, align 4 - call void @llvm.dbg.stoppoint(i32 1303, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*)) - call void @llvm.dbg.region.end(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram593 to %0*)) - ret %"struct.std::complex"* %this -} - -define linkonce void @_ZStdvIdESt7complexIT_ERKS2_S4_(%"struct.std::complex"* noalias sret %agg.result, %"struct.std::complex"* %__x, %"struct.std::complex"* %__y) { -entry: - %__r = alloca %"struct.std::complex", align 8 ; <%"struct.std::complex"*> [#uses=1] - call void @llvm.dbg.func.start(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram599 to %0*)) - %0 = bitcast %"struct.std::complex"* %__r to %0* ; <%0*> [#uses=1] - call void @llvm.dbg.declare(%0* %0, %0* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable602 to %0*)) - call void @llvm.dbg.stoppoint(i32 410, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*)) - %1 = getelementptr %"struct.std::complex"* %agg.result, i32 0, i32 0, i32 0 ; [#uses=1] - %2 = getelementptr %"struct.std::complex"* %__x, i32 0, i32 0, i32 0 ; [#uses=1] - %3 = load double* %2, align 4 ; [#uses=1] - store double %3, double* %1, align 4 - %4 = getelementptr %"struct.std::complex"* %agg.result, i32 0, i32 0, i32 1 ; [#uses=1] - %5 = getelementptr %"struct.std::complex"* %__x, i32 0, i32 0, i32 1 ; [#uses=1] - %6 = load double* %5, align 4 ; [#uses=1] - store double %6, double* %4, align 4 - call void @llvm.dbg.stoppoint(i32 411, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*)) - %7 = call %"struct.std::complex"* @_ZNSt7complexIdEdVIdEERS0_RKS_IT_E(%"struct.std::complex"* %agg.result, %"struct.std::complex"* %__y) nounwind ; <%"struct.std::complex"*> [#uses=0] - call void @llvm.dbg.region.end(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram599 to %0*)) - ret void -} - -define linkonce %"struct.std::complex"* @_ZNSt7complexIdEpLIdEERS0_RKS_IT_E(%"struct.std::complex"* %this, %"struct.std::complex"* %__z) nounwind { -entry: - call void @llvm.dbg.func.start(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram605 to %0*)) - call void @llvm.dbg.stoppoint(i32 1270, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*)) - %0 = getelementptr %"struct.std::complex"* %this, i32 0, i32 0, i32 0 ; [#uses=1] - %1 = load double* %0, align 4 ; [#uses=1] - %2 = call double* @_ZNKSt7complexIdE4realEv(%"struct.std::complex"* %__z) nounwind ; [#uses=1] - %3 = load double* %2, align 8 ; [#uses=1] - %4 = fadd double %1, %3 ; [#uses=1] - %5 = getelementptr %"struct.std::complex"* %this, i32 0, i32 0, i32 0 ; [#uses=1] - store double %4, double* %5, align 4 - call void @llvm.dbg.stoppoint(i32 1271, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*)) - %6 = getelementptr %"struct.std::complex"* %this, i32 0, i32 0, i32 1 ; [#uses=1] - %7 = load double* %6, align 4 ; [#uses=1] - %8 = call double* @_ZNKSt7complexIdE4imagEv(%"struct.std::complex"* %__z) nounwind ; [#uses=1] - %9 = load double* %8, align 8 ; [#uses=1] - %10 = fadd double %7, %9 ; [#uses=1] - %11 = getelementptr %"struct.std::complex"* %this, i32 0, i32 0, i32 1 ; [#uses=1] - store double %10, double* %11, align 4 - call void @llvm.dbg.stoppoint(i32 1272, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*)) - call void @llvm.dbg.region.end(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram605 to %0*)) - ret %"struct.std::complex"* %this -} - -define linkonce void @_ZStplIdESt7complexIT_ERKS2_S4_(%"struct.std::complex"* noalias sret %agg.result, %"struct.std::complex"* %__x, %"struct.std::complex"* %__y) { -entry: - %__r = alloca %"struct.std::complex", align 8 ; <%"struct.std::complex"*> [#uses=1] - call void @llvm.dbg.func.start(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram610 to %0*)) - %0 = bitcast %"struct.std::complex"* %__r to %0* ; <%0*> [#uses=1] - call void @llvm.dbg.declare(%0* %0, %0* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable613 to %0*)) - call void @llvm.dbg.stoppoint(i32 320, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*)) - %1 = getelementptr %"struct.std::complex"* %agg.result, i32 0, i32 0, i32 0 ; [#uses=1] - %2 = getelementptr %"struct.std::complex"* %__x, i32 0, i32 0, i32 0 ; [#uses=1] - %3 = load double* %2, align 4 ; [#uses=1] - store double %3, double* %1, align 4 - %4 = getelementptr %"struct.std::complex"* %agg.result, i32 0, i32 0, i32 1 ; [#uses=1] - %5 = getelementptr %"struct.std::complex"* %__x, i32 0, i32 0, i32 1 ; [#uses=1] - %6 = load double* %5, align 4 ; [#uses=1] - store double %6, double* %4, align 4 - call void @llvm.dbg.stoppoint(i32 321, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*)) - %7 = call %"struct.std::complex"* @_ZNSt7complexIdEpLIdEERS0_RKS_IT_E(%"struct.std::complex"* %agg.result, %"struct.std::complex"* %__y) nounwind ; <%"struct.std::complex"*> [#uses=0] - call void @llvm.dbg.region.end(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram610 to %0*)) - ret void -} - -define linkonce %"struct.std::complex"* @_ZNSt7complexIdEmIIdEERS0_RKS_IT_E(%"struct.std::complex"* %this, %"struct.std::complex"* %__z) nounwind { -entry: - call void @llvm.dbg.func.start(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram616 to %0*)) - call void @llvm.dbg.stoppoint(i32 1279, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*)) - %0 = getelementptr %"struct.std::complex"* %this, i32 0, i32 0, i32 0 ; [#uses=1] - %1 = load double* %0, align 4 ; [#uses=1] - %2 = call double* @_ZNKSt7complexIdE4realEv(%"struct.std::complex"* %__z) nounwind ; [#uses=1] - %3 = load double* %2, align 8 ; [#uses=1] - %4 = fsub double %1, %3 ; [#uses=1] - %5 = getelementptr %"struct.std::complex"* %this, i32 0, i32 0, i32 0 ; [#uses=1] - store double %4, double* %5, align 4 - call void @llvm.dbg.stoppoint(i32 1280, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*)) - %6 = getelementptr %"struct.std::complex"* %this, i32 0, i32 0, i32 1 ; [#uses=1] - %7 = load double* %6, align 4 ; [#uses=1] - %8 = call double* @_ZNKSt7complexIdE4imagEv(%"struct.std::complex"* %__z) nounwind ; [#uses=1] - %9 = load double* %8, align 8 ; [#uses=1] - %10 = fsub double %7, %9 ; [#uses=1] - %11 = getelementptr %"struct.std::complex"* %this, i32 0, i32 0, i32 1 ; [#uses=1] - store double %10, double* %11, align 4 - call void @llvm.dbg.stoppoint(i32 1281, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*)) - call void @llvm.dbg.region.end(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram616 to %0*)) - ret %"struct.std::complex"* %this -} - -define linkonce void @_ZStmiIdESt7complexIT_ERKS2_S4_(%"struct.std::complex"* noalias sret %agg.result, %"struct.std::complex"* %__x, %"struct.std::complex"* %__y) { -entry: - %__r = alloca %"struct.std::complex", align 8 ; <%"struct.std::complex"*> [#uses=1] - call void @llvm.dbg.func.start(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram620 to %0*)) - %0 = bitcast %"struct.std::complex"* %__r to %0* ; <%0*> [#uses=1] - call void @llvm.dbg.declare(%0* %0, %0* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable623 to %0*)) - call void @llvm.dbg.stoppoint(i32 350, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*)) - %1 = getelementptr %"struct.std::complex"* %agg.result, i32 0, i32 0, i32 0 ; [#uses=1] - %2 = getelementptr %"struct.std::complex"* %__x, i32 0, i32 0, i32 0 ; [#uses=1] - %3 = load double* %2, align 4 ; [#uses=1] - store double %3, double* %1, align 4 - %4 = getelementptr %"struct.std::complex"* %agg.result, i32 0, i32 0, i32 1 ; [#uses=1] - %5 = getelementptr %"struct.std::complex"* %__x, i32 0, i32 0, i32 1 ; [#uses=1] - %6 = load double* %5, align 4 ; [#uses=1] - store double %6, double* %4, align 4 - call void @llvm.dbg.stoppoint(i32 351, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*)) - %7 = call %"struct.std::complex"* @_ZNSt7complexIdEmIIdEERS0_RKS_IT_E(%"struct.std::complex"* %agg.result, %"struct.std::complex"* %__y) nounwind ; <%"struct.std::complex"*> [#uses=0] - call void @llvm.dbg.region.end(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram620 to %0*)) - ret void -} - -define linkonce void @_ZNK10polynomialISt7complexIdEE3getEj(%"struct.std::complex"* noalias sret %agg.result, %"struct.polynomial >"* %this, i32 %term) nounwind { -entry: - call void @llvm.dbg.func.start(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram624 to %0*)) - call void @llvm.dbg.stoppoint(i32 302, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %0 = getelementptr %"struct.polynomial >"* %this, i32 0, i32 1 ; <%"struct.std::complex"**> [#uses=1] - %1 = load %"struct.std::complex"** %0, align 4 ; <%"struct.std::complex"*> [#uses=2] - %2 = getelementptr %"struct.std::complex"* %agg.result, i32 0, i32 0, i32 0 ; [#uses=1] - %3 = getelementptr %"struct.std::complex"* %1, i32 %term, i32 0, i32 0 ; [#uses=1] - %4 = load double* %3, align 1 ; [#uses=1] - store double %4, double* %2, align 1 - %5 = getelementptr %"struct.std::complex"* %agg.result, i32 0, i32 0, i32 1 ; [#uses=1] - %6 = getelementptr %"struct.std::complex"* %1, i32 %term, i32 0, i32 1 ; [#uses=1] - %7 = load double* %6, align 1 ; [#uses=1] - store double %7, double* %5, align 1 - call void @llvm.dbg.region.end(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram624 to %0*)) - ret void -} - -declare void @_ZNSt8ios_base4InitC1Ev(%"struct.std::allocator"*) - -declare i32 @__cxa_atexit(void (i8*)*, i8*, i8*) nounwind - -define internal void @__tcf_0(i8* nocapture %unnamed_arg) { -entry: - call void @llvm.dbg.func.start(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram662 to %0*)) - call void @llvm.dbg.stoppoint(i32 77, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit636 to %0*)) - call void @_ZNSt8ios_base4InitD1Ev(%"struct.std::allocator"* @_ZStL8__ioinit) - call void @llvm.dbg.region.end(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram662 to %0*)) - ret void -} - -declare void @_ZNSt8ios_base4InitD1Ev(%"struct.std::allocator"*) - -define linkonce void @_ZN10polynomialIdE7releaseEv(%"struct.polynomial"* %this) nounwind { -entry: - call void @llvm.dbg.func.start(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram665 to %0*)) - call void @llvm.dbg.stoppoint(i32 190, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %0 = getelementptr %"struct.polynomial"* %this, i32 0, i32 1 ; [#uses=1] - %1 = load double** %0, align 4 ; [#uses=1] - %2 = icmp eq double* %1, null ; [#uses=1] - br i1 %2, label %return, label %bb - -bb: ; preds = %entry - call void @llvm.dbg.stoppoint(i32 190, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %3 = getelementptr %"struct.polynomial"* %this, i32 0, i32 1 ; [#uses=1] - %4 = load double** %3, align 4 ; [#uses=1] - %5 = bitcast double* %4 to i8* ; [#uses=1] - call void @_ZdaPv(i8* %5) nounwind - call void @llvm.dbg.region.end(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram665 to %0*)) - ret void - -return: ; preds = %entry - call void @llvm.dbg.stoppoint(i32 190, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - ret void -} - -declare void @_ZdaPv(i8*) nounwind - -define linkonce void @_ZN10polynomialIdED0Ev(%"struct.polynomial"* %this) { -entry: - call void @llvm.dbg.func.start(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram668 to %0*)) - call void @llvm.dbg.stoppoint(i32 255, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %0 = getelementptr %"struct.polynomial"* %this, i32 0, i32 0 ; [#uses=1] - store i32 (...)** getelementptr ([4 x i32 (...)*]* @_ZTV10polynomialIdE, i32 0, i32 2), i32 (...)*** %0, align 4 - call void @llvm.dbg.stoppoint(i32 254, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - call void @_ZN10polynomialIdE7releaseEv(%"struct.polynomial"* %this) nounwind - call void @llvm.dbg.stoppoint(i32 254, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %1 = bitcast %"struct.polynomial"* %this to i8* ; [#uses=1] - call void @_ZdlPv(i8* %1) nounwind - call void @llvm.dbg.region.end(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram668 to %0*)) - ret void -} - -define linkonce void @_ZN10polynomialIdED1Ev(%"struct.polynomial"* %this) { -entry: - call void @llvm.dbg.func.start(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram691 to %0*)) - call void @llvm.dbg.stoppoint(i32 255, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %0 = getelementptr %"struct.polynomial"* %this, i32 0, i32 0 ; [#uses=1] - store i32 (...)** getelementptr ([4 x i32 (...)*]* @_ZTV10polynomialIdE, i32 0, i32 2), i32 (...)*** %0, align 4 - call void @llvm.dbg.stoppoint(i32 254, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - call void @_ZN10polynomialIdE7releaseEv(%"struct.polynomial"* %this) nounwind - call void @llvm.dbg.stoppoint(i32 254, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - ret void -} - -declare void @_ZdlPv(i8*) nounwind - -define linkonce void @_ZN10polynomialISt7complexIdEE7releaseEv(%"struct.polynomial >"* %this) nounwind { -entry: - call void @llvm.dbg.func.start(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram693 to %0*)) - call void @llvm.dbg.stoppoint(i32 190, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %0 = getelementptr %"struct.polynomial >"* %this, i32 0, i32 1 ; <%"struct.std::complex"**> [#uses=1] - %1 = load %"struct.std::complex"** %0, align 4 ; <%"struct.std::complex"*> [#uses=1] - %2 = icmp eq %"struct.std::complex"* %1, null ; [#uses=1] - br i1 %2, label %return, label %bb - -bb: ; preds = %entry - call void @llvm.dbg.stoppoint(i32 190, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %3 = getelementptr %"struct.polynomial >"* %this, i32 0, i32 1 ; <%"struct.std::complex"**> [#uses=1] - %4 = load %"struct.std::complex"** %3, align 4 ; <%"struct.std::complex"*> [#uses=1] - %5 = bitcast %"struct.std::complex"* %4 to i8* ; [#uses=1] - call void @_ZdaPv(i8* %5) nounwind - call void @llvm.dbg.region.end(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram693 to %0*)) - ret void - -return: ; preds = %entry - call void @llvm.dbg.stoppoint(i32 190, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - ret void -} - -define linkonce void @_ZN10polynomialISt7complexIdEED0Ev(%"struct.polynomial >"* %this) { -entry: - call void @llvm.dbg.func.start(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram696 to %0*)) - call void @llvm.dbg.stoppoint(i32 255, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %0 = getelementptr %"struct.polynomial >"* %this, i32 0, i32 0 ; [#uses=1] - store i32 (...)** getelementptr ([4 x i32 (...)*]* @_ZTV10polynomialISt7complexIdEE, i32 0, i32 2), i32 (...)*** %0, align 4 - call void @llvm.dbg.stoppoint(i32 254, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - call void @_ZN10polynomialISt7complexIdEE7releaseEv(%"struct.polynomial >"* %this) nounwind - call void @llvm.dbg.stoppoint(i32 254, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %1 = bitcast %"struct.polynomial >"* %this to i8* ; [#uses=1] - call void @_ZdlPv(i8* %1) nounwind - call void @llvm.dbg.region.end(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram696 to %0*)) - ret void -} - -define linkonce void @_ZN10polynomialISt7complexIdEED1Ev(%"struct.polynomial >"* %this) { -entry: - call void @llvm.dbg.func.start(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram708 to %0*)) - call void @llvm.dbg.stoppoint(i32 255, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %0 = getelementptr %"struct.polynomial >"* %this, i32 0, i32 0 ; [#uses=1] - store i32 (...)** getelementptr ([4 x i32 (...)*]* @_ZTV10polynomialISt7complexIdEE, i32 0, i32 2), i32 (...)*** %0, align 4 - call void @llvm.dbg.stoppoint(i32 254, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - call void @_ZN10polynomialISt7complexIdEE7releaseEv(%"struct.polynomial >"* %this) nounwind - call void @llvm.dbg.stoppoint(i32 254, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - ret void -} - -define linkonce void @_ZN10polynomialIdE7acquireEv(%"struct.polynomial"* %this) { -entry: - call void @llvm.dbg.func.start(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram710 to %0*)) - call void @llvm.dbg.stoppoint(i32 183, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %0 = getelementptr %"struct.polynomial"* %this, i32 0, i32 2 ; [#uses=1] - %1 = load i32* %0, align 4 ; [#uses=1] - %2 = shl i32 %1, 3 ; [#uses=1] - %3 = call i8* @_Znaj(i32 %2) ; [#uses=1] - %4 = bitcast i8* %3 to double* ; [#uses=1] - %5 = getelementptr %"struct.polynomial"* %this, i32 0, i32 1 ; [#uses=1] - store double* %4, double** %5, align 4 - call void @llvm.dbg.region.end(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram710 to %0*)) - ret void -} - -declare i8* @_Znaj(i32) - -define linkonce void @_ZN10polynomialIdEC1Ej(%"struct.polynomial"* %this, i32 %degree) { -entry: - call void @llvm.dbg.func.start(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram713 to %0*)) - call void @llvm.dbg.stoppoint(i32 213, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %0 = getelementptr %"struct.polynomial"* %this, i32 0, i32 0 ; [#uses=1] - store i32 (...)** getelementptr ([4 x i32 (...)*]* @_ZTV10polynomialIdE, i32 0, i32 2), i32 (...)*** %0, align 4 - %1 = getelementptr %"struct.polynomial"* %this, i32 0, i32 1 ; [#uses=1] - store double* null, double** %1, align 4 - %2 = getelementptr %"struct.polynomial"* %this, i32 0, i32 2 ; [#uses=1] - store i32 %degree, i32* %2, align 4 - call void @llvm.dbg.stoppoint(i32 215, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - call void @_ZN10polynomialIdE7acquireEv(%"struct.polynomial"* %this) - call void @llvm.dbg.region.end(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram713 to %0*)) - ret void -} - -define linkonce void @_ZN10polynomialIdEC1ERKS0_(%"struct.polynomial"* %this, %"struct.polynomial"* %source) { -entry: - call void @llvm.dbg.func.start(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram717 to %0*)) - call void @llvm.dbg.stoppoint(i32 244, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %0 = getelementptr %"struct.polynomial"* %this, i32 0, i32 0 ; [#uses=1] - store i32 (...)** getelementptr ([4 x i32 (...)*]* @_ZTV10polynomialIdE, i32 0, i32 2), i32 (...)*** %0, align 4 - %1 = getelementptr %"struct.polynomial"* %this, i32 0, i32 1 ; [#uses=1] - store double* null, double** %1, align 4 - %2 = getelementptr %"struct.polynomial"* %source, i32 0, i32 2 ; [#uses=1] - %3 = load i32* %2, align 4 ; [#uses=1] - %4 = getelementptr %"struct.polynomial"* %this, i32 0, i32 2 ; [#uses=1] - store i32 %3, i32* %4, align 4 - call void @llvm.dbg.stoppoint(i32 246, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - call void @_ZN10polynomialIdE7acquireEv(%"struct.polynomial"* %this) - call void @llvm.dbg.stoppoint(i32 247, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %5 = getelementptr %"struct.polynomial"* %source, i32 0, i32 1 ; [#uses=1] - %6 = load double** %5, align 4 ; [#uses=1] - call void @_ZN10polynomialIdE9deep_copyEPKd(%"struct.polynomial"* %this, double* %6) nounwind - call void @llvm.dbg.region.end(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram717 to %0*)) - ret void -} - -define linkonce %"struct.polynomial"* @_ZN10polynomialIdE7stretchEj(%"struct.polynomial"* %this, i32 %degrees) { -entry: - call void @llvm.dbg.func.start(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram720 to %0*)) - call void @llvm.dbg.stoppoint(i32 278, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %0 = icmp eq i32 %degrees, 0 ; [#uses=1] - br i1 %0, label %return, label %bb - -bb: ; preds = %entry - call void @llvm.dbg.stoppoint(i32 280, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %1 = getelementptr %"struct.polynomial"* %this, i32 0, i32 1 ; [#uses=1] - %2 = load double** %1, align 4 ; [#uses=1] - call void @llvm.dbg.stoppoint(i32 281, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %3 = getelementptr %"struct.polynomial"* %this, i32 0, i32 2 ; [#uses=1] - %4 = load i32* %3, align 4 ; [#uses=2] - call void @llvm.dbg.stoppoint(i32 283, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %5 = add i32 %4, %degrees ; [#uses=1] - %6 = getelementptr %"struct.polynomial"* %this, i32 0, i32 2 ; [#uses=1] - store i32 %5, i32* %6, align 4 - call void @llvm.dbg.stoppoint(i32 284, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - call void @_ZN10polynomialIdE7acquireEv(%"struct.polynomial"* %this) - call void @llvm.dbg.stoppoint(i32 286, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - br label %bb2 - -bb1: ; preds = %bb2 - call void @llvm.dbg.stoppoint(i32 289, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %7 = getelementptr %"struct.polynomial"* %this, i32 0, i32 1 ; [#uses=1] - %8 = load double** %7, align 4 ; [#uses=1] - %9 = getelementptr double* %2, i32 %n.0 ; [#uses=1] - %10 = load double* %9, align 1 ; [#uses=1] - %11 = getelementptr double* %8, i32 %n.0 ; [#uses=1] - store double %10, double* %11, align 1 - call void @llvm.dbg.stoppoint(i32 288, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %12 = add i32 %n.0, 1 ; [#uses=1] - br label %bb2 - -bb2: ; preds = %bb1, %bb - %n.0 = phi i32 [ 0, %bb ], [ %12, %bb1 ] ; [#uses=5] - call void @llvm.dbg.stoppoint(i32 288, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %13 = icmp ult i32 %n.0, %4 ; [#uses=1] - br i1 %13, label %bb1, label %bb5 - -bb4: ; preds = %bb5 - call void @llvm.dbg.stoppoint(i32 292, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %14 = getelementptr %"struct.polynomial"* %this, i32 0, i32 1 ; [#uses=1] - %15 = load double** %14, align 4 ; [#uses=1] - %16 = getelementptr double* %15, i32 %n.1 ; [#uses=1] - store double 0.000000e+00, double* %16, align 1 - call void @llvm.dbg.stoppoint(i32 291, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %17 = add i32 %n.1, 1 ; [#uses=1] - br label %bb5 - -bb5: ; preds = %bb4, %bb2 - %n.1 = phi i32 [ %17, %bb4 ], [ %n.0, %bb2 ] ; [#uses=3] - call void @llvm.dbg.stoppoint(i32 291, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %18 = getelementptr %"struct.polynomial"* %this, i32 0, i32 2 ; [#uses=1] - %19 = load i32* %18, align 4 ; [#uses=1] - %20 = icmp ugt i32 %19, %n.1 ; [#uses=1] - br i1 %20, label %bb4, label %return - -return: ; preds = %bb5, %entry - call void @llvm.dbg.stoppoint(i32 295, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - call void @llvm.dbg.region.end(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram720 to %0*)) - ret %"struct.polynomial"* %this -} - -define linkonce %"struct.polynomial"* @_ZN10polynomialIdEaSERKS0_(%"struct.polynomial"* %this, %"struct.polynomial"* %source) { -entry: - call void @llvm.dbg.func.start(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram729 to %0*)) - call void @llvm.dbg.stoppoint(i32 261, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %0 = getelementptr %"struct.polynomial"* %this, i32 0, i32 2 ; [#uses=1] - %1 = load i32* %0, align 4 ; [#uses=1] - %2 = getelementptr %"struct.polynomial"* %source, i32 0, i32 2 ; [#uses=1] - %3 = load i32* %2, align 4 ; [#uses=1] - %4 = icmp eq i32 %1, %3 ; [#uses=1] - br i1 %4, label %bb1, label %bb - -bb: ; preds = %entry - call void @llvm.dbg.stoppoint(i32 263, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - call void @_ZN10polynomialIdE7releaseEv(%"struct.polynomial"* %this) nounwind - call void @llvm.dbg.stoppoint(i32 265, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %5 = getelementptr %"struct.polynomial"* %source, i32 0, i32 2 ; [#uses=1] - %6 = load i32* %5, align 4 ; [#uses=1] - %7 = getelementptr %"struct.polynomial"* %this, i32 0, i32 2 ; [#uses=1] - store i32 %6, i32* %7, align 4 - call void @llvm.dbg.stoppoint(i32 266, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - call void @_ZN10polynomialIdE7acquireEv(%"struct.polynomial"* %this) - br label %bb1 - -bb1: ; preds = %bb, %entry - call void @llvm.dbg.stoppoint(i32 269, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %8 = getelementptr %"struct.polynomial"* %source, i32 0, i32 1 ; [#uses=1] - %9 = load double** %8, align 4 ; [#uses=1] - call void @_ZN10polynomialIdE9deep_copyEPKd(%"struct.polynomial"* %this, double* %9) nounwind - call void @llvm.dbg.stoppoint(i32 271, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - call void @llvm.dbg.region.end(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram729 to %0*)) - ret %"struct.polynomial"* %this -} - -define linkonce void @_ZN10polynomialISt7complexIdEE7acquireEv(%"struct.polynomial >"* %this) { -entry: - call void @llvm.dbg.func.start(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram732 to %0*)) - call void @llvm.dbg.stoppoint(i32 183, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %0 = getelementptr %"struct.polynomial >"* %this, i32 0, i32 2 ; [#uses=1] - %1 = load i32* %0, align 4 ; [#uses=2] - %2 = shl i32 %1, 4 ; [#uses=1] - %3 = call i8* @_Znaj(i32 %2) ; [#uses=1] - %4 = bitcast i8* %3 to %"struct.std::complex"* ; <%"struct.std::complex"*> [#uses=2] - br label %bb1 - -bb: ; preds = %bb1 - call void @llvm.dbg.stoppoint(i32 183, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - call void @_ZNSt7complexIdEC1Edd(%"struct.std::complex"* %.0, double 0.000000e+00, double 0.000000e+00) nounwind - %5 = getelementptr %"struct.std::complex"* %.0, i32 1 ; <%"struct.std::complex"*> [#uses=1] - br label %bb1 - -bb1: ; preds = %bb, %entry - %.01.in = phi i32 [ %1, %entry ], [ %.01, %bb ] ; [#uses=1] - %.0 = phi %"struct.std::complex"* [ %4, %entry ], [ %5, %bb ] ; <%"struct.std::complex"*> [#uses=2] - %.01 = add i32 %.01.in, -1 ; [#uses=2] - call void @llvm.dbg.stoppoint(i32 183, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %6 = icmp eq i32 %.01, -1 ; [#uses=1] - br i1 %6, label %bb2, label %bb - -bb2: ; preds = %bb1 - call void @llvm.dbg.stoppoint(i32 183, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %7 = getelementptr %"struct.polynomial >"* %this, i32 0, i32 1 ; <%"struct.std::complex"**> [#uses=1] - store %"struct.std::complex"* %4, %"struct.std::complex"** %7, align 4 - call void @llvm.dbg.region.end(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram732 to %0*)) - ret void -} - -define linkonce void @_ZN10polynomialISt7complexIdEEC1Ej(%"struct.polynomial >"* %this, i32 %degree) { -entry: - call void @llvm.dbg.func.start(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram735 to %0*)) - call void @llvm.dbg.stoppoint(i32 213, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %0 = getelementptr %"struct.polynomial >"* %this, i32 0, i32 0 ; [#uses=1] - store i32 (...)** getelementptr ([4 x i32 (...)*]* @_ZTV10polynomialISt7complexIdEE, i32 0, i32 2), i32 (...)*** %0, align 4 - %1 = getelementptr %"struct.polynomial >"* %this, i32 0, i32 1 ; <%"struct.std::complex"**> [#uses=1] - store %"struct.std::complex"* null, %"struct.std::complex"** %1, align 4 - %2 = getelementptr %"struct.polynomial >"* %this, i32 0, i32 2 ; [#uses=1] - store i32 %degree, i32* %2, align 4 - call void @llvm.dbg.stoppoint(i32 215, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - call void @_ZN10polynomialISt7complexIdEE7acquireEv(%"struct.polynomial >"* %this) - call void @llvm.dbg.region.end(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram735 to %0*)) - ret void -} - -define linkonce void @_ZN10polynomialIdE11bit_reverseERKS0_(%"struct.polynomial >"* noalias sret %agg.result, %"struct.polynomial"* %poly) { -entry: - %result = alloca %"struct.polynomial >", align 8 ; <%"struct.polynomial >"*> [#uses=1] - call void @llvm.dbg.func.start(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram738 to %0*)) - %0 = bitcast %"struct.polynomial >"* %result to %0* ; <%0*> [#uses=1] - call void @llvm.dbg.declare(%0* %0, %0* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable744 to %0*)) - call void @llvm.dbg.stoppoint(i32 471, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %1 = call i32 @_ZNK10polynomialIdE6degreeEv(%"struct.polynomial"* %poly) nounwind ; [#uses=1] - %2 = call i32 @_ZN10polynomialIdE4log2Ej(i32 %1) nounwind ; [#uses=1] - call void @llvm.dbg.stoppoint(i32 473, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %3 = call i32 @_ZNK10polynomialIdE6degreeEv(%"struct.polynomial"* %poly) nounwind ; [#uses=1] - call void @_ZN10polynomialISt7complexIdEEC1Ej(%"struct.polynomial >"* %agg.result, i32 %3) - call void @llvm.dbg.stoppoint(i32 475, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - br label %bb6 - -bb: ; preds = %bb6 - call void @llvm.dbg.stoppoint(i32 476, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %4 = call double @_ZNK10polynomialIdE3getEj(%"struct.polynomial"* %poly, i32 %n.0) nounwind ; [#uses=1] - %5 = call i32 @_ZN10polynomialIdE9flip_bitsEjj(i32 %n.0, i32 %2) nounwind ; [#uses=1] - %6 = call %"struct.std::complex"* @_ZN10polynomialISt7complexIdEEixEj(%"struct.polynomial >"* %agg.result, i32 %5) nounwind ; <%"struct.std::complex"*> [#uses=1] - %7 = call %"struct.std::complex"* @_ZNSt7complexIdEaSEd(%"struct.std::complex"* %6, double %4) nounwind ; <%"struct.std::complex"*> [#uses=0] - call void @llvm.dbg.stoppoint(i32 475, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %8 = add i32 %n.0, 1 ; [#uses=1] - br label %bb6 - -bb6: ; preds = %bb, %entry - %n.0 = phi i32 [ 0, %entry ], [ %8, %bb ] ; [#uses=4] - call void @llvm.dbg.stoppoint(i32 475, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %9 = call i32 @_ZNK10polynomialIdE6degreeEv(%"struct.polynomial"* %poly) nounwind ; [#uses=1] - %10 = icmp ugt i32 %9, %n.0 ; [#uses=1] - br i1 %10, label %bb, label %return - -return: ; preds = %bb6 - call void @llvm.dbg.stoppoint(i32 475, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - call void @llvm.dbg.region.end(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram738 to %0*)) - ret void -} - -define linkonce void @_ZN10polynomialIdE11bit_reverseERKS_ISt7complexIdEE(%"struct.polynomial >"* noalias sret %agg.result, %"struct.polynomial >"* %poly) { -entry: - %result = alloca %"struct.polynomial >", align 8 ; <%"struct.polynomial >"*> [#uses=1] - %memtmp7 = alloca %"struct.std::complex", align 8 ; <%"struct.std::complex"*> [#uses=3] - call void @llvm.dbg.func.start(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram747 to %0*)) - %0 = bitcast %"struct.polynomial >"* %result to %0* ; <%0*> [#uses=1] - call void @llvm.dbg.declare(%0* %0, %0* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable751 to %0*)) - call void @llvm.dbg.stoppoint(i32 485, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %1 = call i32 @_ZNK10polynomialISt7complexIdEE6degreeEv(%"struct.polynomial >"* %poly) nounwind ; [#uses=1] - %2 = call i32 @_ZN10polynomialIdE4log2Ej(i32 %1) nounwind ; [#uses=1] - call void @llvm.dbg.stoppoint(i32 487, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %3 = call i32 @_ZNK10polynomialISt7complexIdEE6degreeEv(%"struct.polynomial >"* %poly) nounwind ; [#uses=1] - call void @_ZN10polynomialISt7complexIdEEC1Ej(%"struct.polynomial >"* %agg.result, i32 %3) - call void @llvm.dbg.stoppoint(i32 489, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - br label %bb8 - -bb: ; preds = %bb8 - call void @llvm.dbg.stoppoint(i32 490, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %4 = call i32 @_ZN10polynomialIdE9flip_bitsEjj(i32 %n.0, i32 %2) nounwind ; [#uses=1] - %5 = call %"struct.std::complex"* @_ZN10polynomialISt7complexIdEEixEj(%"struct.polynomial >"* %agg.result, i32 %4) nounwind ; <%"struct.std::complex"*> [#uses=2] - call void @_ZNK10polynomialISt7complexIdEE3getEj(%"struct.std::complex"* noalias sret %memtmp7, %"struct.polynomial >"* %poly, i32 %n.0) nounwind - %6 = getelementptr %"struct.std::complex"* %5, i32 0, i32 0, i32 0 ; [#uses=1] - %7 = getelementptr %"struct.std::complex"* %memtmp7, i32 0, i32 0, i32 0 ; [#uses=1] - %8 = load double* %7, align 8 ; [#uses=1] - store double %8, double* %6, align 4 - %9 = getelementptr %"struct.std::complex"* %5, i32 0, i32 0, i32 1 ; [#uses=1] - %10 = getelementptr %"struct.std::complex"* %memtmp7, i32 0, i32 0, i32 1 ; [#uses=1] - %11 = load double* %10, align 8 ; [#uses=1] - store double %11, double* %9, align 4 - call void @llvm.dbg.stoppoint(i32 489, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %12 = add i32 %n.0, 1 ; [#uses=1] - br label %bb8 - -bb8: ; preds = %bb, %entry - %n.0 = phi i32 [ 0, %entry ], [ %12, %bb ] ; [#uses=4] - call void @llvm.dbg.stoppoint(i32 489, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %13 = call i32 @_ZNK10polynomialISt7complexIdEE6degreeEv(%"struct.polynomial >"* %poly) nounwind ; [#uses=1] - %14 = icmp ugt i32 %13, %n.0 ; [#uses=1] - br i1 %14, label %bb, label %return - -return: ; preds = %bb8 - call void @llvm.dbg.stoppoint(i32 489, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - call void @llvm.dbg.region.end(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram747 to %0*)) - ret void -} - -define linkonce %"struct.polynomial >"* @_ZN10polynomialISt7complexIdEEaSERKS2_(%"struct.polynomial >"* %this, %"struct.polynomial >"* %source) { -entry: - call void @llvm.dbg.func.start(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram753 to %0*)) - call void @llvm.dbg.stoppoint(i32 261, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %0 = getelementptr %"struct.polynomial >"* %this, i32 0, i32 2 ; [#uses=1] - %1 = load i32* %0, align 4 ; [#uses=1] - %2 = getelementptr %"struct.polynomial >"* %source, i32 0, i32 2 ; [#uses=1] - %3 = load i32* %2, align 4 ; [#uses=1] - %4 = icmp eq i32 %1, %3 ; [#uses=1] - br i1 %4, label %bb1, label %bb - -bb: ; preds = %entry - call void @llvm.dbg.stoppoint(i32 263, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - call void @_ZN10polynomialISt7complexIdEE7releaseEv(%"struct.polynomial >"* %this) nounwind - call void @llvm.dbg.stoppoint(i32 265, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %5 = getelementptr %"struct.polynomial >"* %source, i32 0, i32 2 ; [#uses=1] - %6 = load i32* %5, align 4 ; [#uses=1] - %7 = getelementptr %"struct.polynomial >"* %this, i32 0, i32 2 ; [#uses=1] - store i32 %6, i32* %7, align 4 - call void @llvm.dbg.stoppoint(i32 266, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - call void @_ZN10polynomialISt7complexIdEE7acquireEv(%"struct.polynomial >"* %this) - br label %bb1 - -bb1: ; preds = %bb, %entry - call void @llvm.dbg.stoppoint(i32 269, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %8 = getelementptr %"struct.polynomial >"* %source, i32 0, i32 1 ; <%"struct.std::complex"**> [#uses=1] - %9 = load %"struct.std::complex"** %8, align 4 ; <%"struct.std::complex"*> [#uses=1] - call void @_ZN10polynomialISt7complexIdEE9deep_copyEPKS1_(%"struct.polynomial >"* %this, %"struct.std::complex"* %9) nounwind - call void @llvm.dbg.stoppoint(i32 271, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - call void @llvm.dbg.region.end(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram753 to %0*)) - ret %"struct.polynomial >"* %this -} - -define linkonce i32 @_ZN10polynomialIdE11stretch_fftEv(%"struct.polynomial"* %this) { -entry: - %0 = alloca %"struct.std::allocator", align 8 ; <%"struct.std::allocator"*> [#uses=4] - %1 = alloca %"struct.std::string", align 8 ; <%"struct.std::string"*> [#uses=4] - call void @llvm.dbg.func.start(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram756 to %0*)) - call void @llvm.dbg.stoppoint(i32 445, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - br label %bb - -bb: ; preds = %bb1, %entry - %n.0 = phi i32 [ 1, %entry ], [ %5, %bb1 ] ; [#uses=2] - call void @llvm.dbg.stoppoint(i32 449, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %2 = getelementptr %"struct.polynomial"* %this, i32 0, i32 2 ; [#uses=1] - %3 = load i32* %2, align 4 ; [#uses=1] - %4 = icmp ugt i32 %3, %n.0 ; [#uses=1] - %5 = shl i32 %n.0, 1 ; [#uses=4] - br i1 %4, label %bb1, label %bb17 - -bb1: ; preds = %bb - call void @llvm.dbg.stoppoint(i32 454, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %6 = icmp eq i32 %5, 0 ; [#uses=1] - br i1 %6, label %bb2, label %bb - -bb2: ; preds = %bb1 - call void @llvm.dbg.stoppoint(i32 455, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - call void @_ZNSaIcEC1Ev(%"struct.std::allocator"* %0) nounwind - invoke void @_ZNSsC1EPKcRKSaIcE(%"struct.std::string"* %1, i8* getelementptr ([35 x i8]* @.str759, i32 0, i32 0), %"struct.std::allocator"* %0) - to label %invcont unwind label %lpad - -invcont: ; preds = %bb2 - call void @llvm.dbg.stoppoint(i32 455, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %7 = call i8* @__cxa_allocate_exception(i32 8) nounwind ; [#uses=3] - %8 = bitcast i8* %7 to %"struct.std::overflow_error"* ; <%"struct.std::overflow_error"*> [#uses=1] - invoke void @_ZNSt14overflow_errorC1ERKSs(%"struct.std::overflow_error"* %8, %"struct.std::string"* %1) - to label %invcont3 unwind label %lpad23 - -invcont3: ; preds = %invcont - call void @llvm.dbg.stoppoint(i32 455, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - invoke void @_ZNSsD1Ev(%"struct.std::string"* %1) - to label %bb11 unwind label %lpad31 - -bb11: ; preds = %invcont3 - call void @llvm.dbg.stoppoint(i32 455, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - call void @_ZNSaIcED1Ev(%"struct.std::allocator"* %0) nounwind - call void @__cxa_throw(i8* %7, i8* bitcast (%struct.__si_class_type_info_pseudo* @_ZTISt14overflow_error to i8*), void (i8*)* bitcast (void (%"struct.std::overflow_error"*)* @_ZNSt14overflow_errorD1Ev to void (i8*)*)) noreturn - unreachable - -bb17: ; preds = %bb - call void @llvm.dbg.stoppoint(i32 459, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %9 = getelementptr %"struct.polynomial"* %this, i32 0, i32 2 ; [#uses=1] - %10 = load i32* %9, align 4 ; [#uses=2] - %11 = sub i32 %5, %10 ; [#uses=3] - call void @llvm.dbg.stoppoint(i32 461, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %12 = icmp eq i32 %5, %10 ; [#uses=1] - br i1 %12, label %return, label %bb18 - -bb18: ; preds = %bb17 - call void @llvm.dbg.stoppoint(i32 462, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %13 = call %"struct.polynomial"* @_ZN10polynomialIdE7stretchEj(%"struct.polynomial"* %this, i32 %11) ; <%"struct.polynomial"*> [#uses=0] - call void @llvm.dbg.region.end(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram756 to %0*)) - ret i32 %11 - -return: ; preds = %bb17 - call void @llvm.dbg.stoppoint(i32 464, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - ret i32 %11 - -lpad: ; preds = %bb2 - %eh_ptr = call i8* @llvm.eh.exception() ; [#uses=2] - %eh_select22 = call i32 (i8*, i8*, ...)* @llvm.eh.selector.i32(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i8* null) ; [#uses=0] - br label %ppad - -lpad23: ; preds = %invcont - %eh_ptr24 = call i8* @llvm.eh.exception() ; [#uses=2] - %eh_select26 = call i32 (i8*, i8*, ...)* @llvm.eh.selector.i32(i8* %eh_ptr24, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i8* null) ; [#uses=0] - call void @llvm.dbg.stoppoint(i32 455, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - call void @__cxa_free_exception(i8* %7) nounwind - call void @llvm.dbg.stoppoint(i32 455, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - invoke void @_ZNSsD1Ev(%"struct.std::string"* %1) - to label %ppad unwind label %lpad27 - -lpad27: ; preds = %lpad23 - %eh_ptr28 = call i8* @llvm.eh.exception() ; [#uses=1] - %eh_select30 = call i32 (i8*, i8*, ...)* @llvm.eh.selector.i32(i8* %eh_ptr28, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0] - call void @llvm.dbg.stoppoint(i32 455, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - call void @_ZSt9terminatev() noreturn nounwind - unreachable - -lpad31: ; preds = %invcont3 - %eh_ptr32 = call i8* @llvm.eh.exception() ; [#uses=1] - %eh_select34 = call i32 (i8*, i8*, ...)* @llvm.eh.selector.i32(i8* %eh_ptr32, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0] - call void @llvm.dbg.stoppoint(i32 455, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - call void @_ZSt9terminatev() noreturn nounwind - unreachable - -ppad: ; preds = %lpad23, %lpad - %eh_exception.0 = phi i8* [ %eh_ptr, %lpad ], [ %eh_ptr24, %lpad23 ] ; [#uses=1] - call void @llvm.dbg.stoppoint(i32 455, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - call void @_ZNSaIcED1Ev(%"struct.std::allocator"* %0) nounwind - call void @_Unwind_Resume(i8* %eh_exception.0) - unreachable -} - -declare void @_ZNSaIcEC1Ev(%"struct.std::allocator"*) nounwind - -declare void @_ZNSsC1EPKcRKSaIcE(%"struct.std::string"*, i8*, %"struct.std::allocator"*) - -declare i8* @__cxa_allocate_exception(i32) nounwind - -declare void @_ZNSt14overflow_errorC1ERKSs(%"struct.std::overflow_error"*, %"struct.std::string"*) - -declare void @_ZNSsD1Ev(%"struct.std::string"*) - -declare i8* @llvm.eh.exception() nounwind - -declare i32 @llvm.eh.selector.i32(i8*, i8*, ...) nounwind - -declare void @__cxa_free_exception(i8*) nounwind - -declare void @_ZSt9terminatev() noreturn nounwind - -declare void @_ZNSaIcED1Ev(%"struct.std::allocator"*) nounwind - -declare void @__cxa_throw(i8*, i8*, void (i8*)*) noreturn - -define linkonce void @_ZNSt14overflow_errorD1Ev(%"struct.std::overflow_error"* %this) nounwind { -entry: - call void @llvm.dbg.func.start(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1727 to %0*)) - call void @llvm.dbg.stoppoint(i32 134, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit770 to %0*)) - %0 = getelementptr %"struct.std::overflow_error"* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1] - store i32 (...)** getelementptr ([5 x i32 (...)*]* @_ZTVSt14overflow_error, i32 0, i32 2), i32 (...)*** %0, align 4 - %1 = getelementptr %"struct.std::overflow_error"* %this, i32 0, i32 0 ; <%"struct.std::runtime_error"*> [#uses=1] - call void @_ZNSt13runtime_errorD2Ev(%"struct.std::runtime_error"* %1) nounwind - call void @llvm.dbg.stoppoint(i32 134, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit770 to %0*)) - ret void -} - -declare i32 @__gxx_personality_v0(...) - -declare void @_Unwind_Resume(i8*) - -define linkonce void @_ZNSt14overflow_errorD0Ev(%"struct.std::overflow_error"* %this) nounwind { -entry: - call void @llvm.dbg.func.start(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1736 to %0*)) - call void @llvm.dbg.stoppoint(i32 134, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit770 to %0*)) - %0 = getelementptr %"struct.std::overflow_error"* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1] - store i32 (...)** getelementptr ([5 x i32 (...)*]* @_ZTVSt14overflow_error, i32 0, i32 2), i32 (...)*** %0, align 4 - %1 = getelementptr %"struct.std::overflow_error"* %this, i32 0, i32 0 ; <%"struct.std::runtime_error"*> [#uses=1] - call void @_ZNSt13runtime_errorD2Ev(%"struct.std::runtime_error"* %1) nounwind - call void @llvm.dbg.stoppoint(i32 134, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit770 to %0*)) - %2 = bitcast %"struct.std::overflow_error"* %this to i8* ; [#uses=1] - call void @_ZdlPv(i8* %2) nounwind - call void @llvm.dbg.region.end(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1736 to %0*)) - ret void -} - -declare i8* @_ZNKSt13runtime_error4whatEv(%"struct.std::runtime_error"*) nounwind - -declare void @_ZNSt13runtime_errorD2Ev(%"struct.std::runtime_error"*) nounwind - -define linkonce void @_ZSt13__complex_expCd(%1* noalias sret %agg.result, %1 %__z) nounwind { -entry: - %0 = alloca %1, align 8 ; <%1*> [#uses=4] - %memtmp = alloca %1, align 8 ; <%1*> [#uses=3] - call void @llvm.dbg.func.start(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1742 to %0*)) - call void @llvm.dbg.stoppoint(i32 730, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*)) - call void @cexp(%1* noalias sret %memtmp, %1 %__z) nounwind - %1 = getelementptr %1* %0, i32 0, i32 0 ; [#uses=1] - %2 = getelementptr %1* %memtmp, i32 0, i32 0 ; [#uses=1] - %3 = load double* %2, align 8 ; [#uses=1] - store double %3, double* %1, align 8 - %4 = getelementptr %1* %0, i32 0, i32 1 ; [#uses=1] - %5 = getelementptr %1* %memtmp, i32 0, i32 1 ; [#uses=1] - %6 = load double* %5, align 8 ; [#uses=1] - store double %6, double* %4, align 8 - %7 = getelementptr %1* %agg.result, i32 0, i32 0 ; [#uses=1] - %8 = getelementptr %1* %0, i32 0, i32 0 ; [#uses=1] - %9 = load double* %8, align 8 ; [#uses=1] - store double %9, double* %7, align 8 - %10 = getelementptr %1* %agg.result, i32 0, i32 1 ; [#uses=1] - %11 = getelementptr %1* %0, i32 0, i32 1 ; [#uses=1] - %12 = load double* %11, align 8 ; [#uses=1] - store double %12, double* %10, align 8 - call void @llvm.dbg.region.end(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1742 to %0*)) - ret void -} - -declare void @cexp(%1* noalias sret, %1) nounwind - -define linkonce void @_ZSt3expIdESt7complexIT_ERKS2_(%"struct.std::complex"* noalias sret %agg.result, %"struct.std::complex"* %__z) nounwind { -entry: - %0 = alloca %1, align 8 ; <%1*> [#uses=3] - %1 = alloca %1, align 8 ; <%1*> [#uses=3] - %memtmp = alloca %1, align 8 ; <%1*> [#uses=3] - call void @llvm.dbg.func.start(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1746 to %0*)) - call void @llvm.dbg.stoppoint(i32 738, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit5 to %0*)) - %2 = call %1* @_ZNKSt7complexIdE5__repEv(%"struct.std::complex"* %__z) nounwind ; <%1*> [#uses=2] - %3 = getelementptr %1* %1, i32 0, i32 0 ; [#uses=1] - %4 = getelementptr %1* %2, i32 0, i32 0 ; [#uses=1] - %5 = load double* %4, align 8 ; [#uses=1] - store double %5, double* %3, align 8 - %6 = getelementptr %1* %1, i32 0, i32 1 ; [#uses=1] - %7 = getelementptr %1* %2, i32 0, i32 1 ; [#uses=1] - %8 = load double* %7, align 8 ; [#uses=1] - store double %8, double* %6, align 8 - %9 = load %1* %1, align 8 ; <%1> [#uses=1] - call void @_ZSt13__complex_expCd(%1* noalias sret %memtmp, %1 %9) nounwind - %10 = getelementptr %1* %0, i32 0, i32 0 ; [#uses=1] - %11 = getelementptr %1* %memtmp, i32 0, i32 0 ; [#uses=1] - %12 = load double* %11, align 8 ; [#uses=1] - store double %12, double* %10, align 8 - %13 = getelementptr %1* %0, i32 0, i32 1 ; [#uses=1] - %14 = getelementptr %1* %memtmp, i32 0, i32 1 ; [#uses=1] - %15 = load double* %14, align 8 ; [#uses=1] - store double %15, double* %13, align 8 - %16 = load %1* %0, align 8 ; <%1> [#uses=1] - call void @_ZNSt7complexIdEC1ECd(%"struct.std::complex"* %agg.result, %1 %16) nounwind - call void @llvm.dbg.region.end(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1746 to %0*)) - ret void -} - -define linkonce void @_ZN10polynomialIdE3fftERKS0_(%"struct.polynomial >"* noalias sret %agg.result, %"struct.polynomial"* %poly) { -entry: - %result = alloca %"struct.polynomial >", align 8 ; <%"struct.polynomial >"*> [#uses=1] - %u = alloca %"struct.std::complex", align 8 ; <%"struct.std::complex"*> [#uses=6] - %t = alloca %"struct.std::complex", align 8 ; <%"struct.std::complex"*> [#uses=6] - %w = alloca %"struct.std::complex", align 8 ; <%"struct.std::complex"*> [#uses=5] - %wm = alloca %"struct.std::complex", align 8 ; <%"struct.std::complex"*> [#uses=5] - %0 = alloca %"struct.std::complex", align 8 ; <%"struct.std::complex"*> [#uses=2] - %1 = alloca %"struct.std::complex", align 8 ; <%"struct.std::complex"*> [#uses=2] - %memtmp20 = alloca %"struct.std::complex", align 8 ; <%"struct.std::complex"*> [#uses=3] - %memtmp23 = alloca %"struct.std::complex", align 8 ; <%"struct.std::complex"*> [#uses=3] - %memtmp24 = alloca %"struct.std::complex", align 8 ; <%"struct.std::complex"*> [#uses=3] - %memtmp26 = alloca %"struct.std::complex", align 8 ; <%"struct.std::complex"*> [#uses=3] - call void @llvm.dbg.func.start(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1748 to %0*)) - %2 = bitcast %"struct.polynomial >"* %result to %0* ; <%0*> [#uses=1] - call void @llvm.dbg.declare(%0* %2, %0* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable1751 to %0*)) - %3 = bitcast %"struct.std::complex"* %u to %0* ; <%0*> [#uses=1] - call void @llvm.dbg.declare(%0* %3, %0* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable1753 to %0*)) - %4 = bitcast %"struct.std::complex"* %t to %0* ; <%0*> [#uses=1] - call void @llvm.dbg.declare(%0* %4, %0* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable1755 to %0*)) - %5 = bitcast %"struct.std::complex"* %w to %0* ; <%0*> [#uses=1] - call void @llvm.dbg.declare(%0* %5, %0* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable1757 to %0*)) - %6 = bitcast %"struct.std::complex"* %wm to %0* ; <%0*> [#uses=1] - call void @llvm.dbg.declare(%0* %6, %0* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable1759 to %0*)) - call void @llvm.dbg.stoppoint(i32 499, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %7 = call i32 @_ZNK10polynomialIdE6degreeEv(%"struct.polynomial"* %poly) nounwind ; [#uses=1] - %8 = call i32 @_ZN10polynomialIdE4log2Ej(i32 %7) nounwind ; [#uses=1] - call void @llvm.dbg.stoppoint(i32 501, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - call void @_ZNSt7complexIdEC1Edd(%"struct.std::complex"* %wm, double 0.000000e+00, double 0.000000e+00) nounwind - call void @_ZNSt7complexIdEC1Edd(%"struct.std::complex"* %w, double 0.000000e+00, double 0.000000e+00) nounwind - call void @_ZNSt7complexIdEC1Edd(%"struct.std::complex"* %t, double 0.000000e+00, double 0.000000e+00) nounwind - call void @_ZNSt7complexIdEC1Edd(%"struct.std::complex"* %u, double 0.000000e+00, double 0.000000e+00) nounwind - call void @llvm.dbg.stoppoint(i32 503, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - call void @_ZN10polynomialIdE11bit_reverseERKS0_(%"struct.polynomial >"* noalias sret %agg.result, %"struct.polynomial"* %poly) - call void @llvm.dbg.stoppoint(i32 508, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - br label %bb32 - -bb: ; preds = %bb32 - call void @llvm.dbg.stoppoint(i32 510, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %9 = uitofp i32 %m.0 to double ; [#uses=1] - call void @_ZNSt7complexIdEC1Edd(%"struct.std::complex"* %0, double %9, double 0.000000e+00) nounwind - invoke void @_ZStdvIdESt7complexIT_ERKS2_S4_(%"struct.std::complex"* noalias sret %1, %"struct.std::complex"* @_ZN10polynomialIdE4PI2IE, %"struct.std::complex"* %0) - to label %invcont unwind label %lpad - -invcont: ; preds = %bb - call void @llvm.dbg.stoppoint(i32 510, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - call void @_ZSt3expIdESt7complexIT_ERKS2_(%"struct.std::complex"* noalias sret %memtmp20, %"struct.std::complex"* %1) nounwind - %10 = getelementptr %"struct.std::complex"* %wm, i32 0, i32 0, i32 0 ; [#uses=1] - %11 = getelementptr %"struct.std::complex"* %memtmp20, i32 0, i32 0, i32 0 ; [#uses=1] - %12 = load double* %11, align 8 ; [#uses=1] - store double %12, double* %10, align 8 - %13 = getelementptr %"struct.std::complex"* %wm, i32 0, i32 0, i32 1 ; [#uses=1] - %14 = getelementptr %"struct.std::complex"* %memtmp20, i32 0, i32 0, i32 1 ; [#uses=1] - %15 = load double* %14, align 8 ; [#uses=1] - store double %15, double* %13, align 8 - call void @llvm.dbg.stoppoint(i32 511, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %16 = call %"struct.std::complex"* @_ZNSt7complexIdEaSEd(%"struct.std::complex"* %w, double 1.000000e+00) nounwind ; <%"struct.std::complex"*> [#uses=0] - call void @llvm.dbg.stoppoint(i32 513, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - br label %bb30 - -bb22: ; preds = %bb28 - call void @llvm.dbg.stoppoint(i32 517, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %17 = add i32 %k.0, %m2.0 ; [#uses=1] - %18 = call %"struct.std::complex"* @_ZN10polynomialISt7complexIdEEixEj(%"struct.polynomial >"* %agg.result, i32 %17) nounwind ; <%"struct.std::complex"*> [#uses=1] - call void @_ZStmlIdESt7complexIT_ERKS2_S4_(%"struct.std::complex"* noalias sret %memtmp23, %"struct.std::complex"* %w, %"struct.std::complex"* %18) nounwind - %19 = getelementptr %"struct.std::complex"* %t, i32 0, i32 0, i32 0 ; [#uses=1] - %20 = getelementptr %"struct.std::complex"* %memtmp23, i32 0, i32 0, i32 0 ; [#uses=1] - %21 = load double* %20, align 8 ; [#uses=1] - store double %21, double* %19, align 8 - %22 = getelementptr %"struct.std::complex"* %t, i32 0, i32 0, i32 1 ; [#uses=1] - %23 = getelementptr %"struct.std::complex"* %memtmp23, i32 0, i32 0, i32 1 ; [#uses=1] - %24 = load double* %23, align 8 ; [#uses=1] - store double %24, double* %22, align 8 - call void @llvm.dbg.stoppoint(i32 518, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %25 = call %"struct.std::complex"* @_ZN10polynomialISt7complexIdEEixEj(%"struct.polynomial >"* %agg.result, i32 %k.0) nounwind ; <%"struct.std::complex"*> [#uses=2] - %26 = getelementptr %"struct.std::complex"* %u, i32 0, i32 0, i32 0 ; [#uses=1] - %27 = getelementptr %"struct.std::complex"* %25, i32 0, i32 0, i32 0 ; [#uses=1] - %28 = load double* %27, align 4 ; [#uses=1] - store double %28, double* %26, align 8 - %29 = getelementptr %"struct.std::complex"* %u, i32 0, i32 0, i32 1 ; [#uses=1] - %30 = getelementptr %"struct.std::complex"* %25, i32 0, i32 0, i32 1 ; [#uses=1] - %31 = load double* %30, align 4 ; [#uses=1] - store double %31, double* %29, align 8 - call void @llvm.dbg.stoppoint(i32 519, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %32 = call %"struct.std::complex"* @_ZN10polynomialISt7complexIdEEixEj(%"struct.polynomial >"* %agg.result, i32 %k.0) nounwind ; <%"struct.std::complex"*> [#uses=2] - invoke void @_ZStplIdESt7complexIT_ERKS2_S4_(%"struct.std::complex"* noalias sret %memtmp24, %"struct.std::complex"* %u, %"struct.std::complex"* %t) - to label %invcont25 unwind label %lpad - -invcont25: ; preds = %bb22 - %33 = getelementptr %"struct.std::complex"* %32, i32 0, i32 0, i32 0 ; [#uses=1] - %34 = getelementptr %"struct.std::complex"* %memtmp24, i32 0, i32 0, i32 0 ; [#uses=1] - %35 = load double* %34, align 8 ; [#uses=1] - store double %35, double* %33, align 4 - %36 = getelementptr %"struct.std::complex"* %32, i32 0, i32 0, i32 1 ; [#uses=1] - %37 = getelementptr %"struct.std::complex"* %memtmp24, i32 0, i32 0, i32 1 ; [#uses=1] - %38 = load double* %37, align 8 ; [#uses=1] - store double %38, double* %36, align 4 - call void @llvm.dbg.stoppoint(i32 520, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %39 = add i32 %k.0, %m2.0 ; [#uses=1] - %40 = call %"struct.std::complex"* @_ZN10polynomialISt7complexIdEEixEj(%"struct.polynomial >"* %agg.result, i32 %39) nounwind ; <%"struct.std::complex"*> [#uses=2] - invoke void @_ZStmiIdESt7complexIT_ERKS2_S4_(%"struct.std::complex"* noalias sret %memtmp26, %"struct.std::complex"* %u, %"struct.std::complex"* %t) - to label %invcont27 unwind label %lpad - -invcont27: ; preds = %invcont25 - %41 = getelementptr %"struct.std::complex"* %40, i32 0, i32 0, i32 0 ; [#uses=1] - %42 = getelementptr %"struct.std::complex"* %memtmp26, i32 0, i32 0, i32 0 ; [#uses=1] - %43 = load double* %42, align 8 ; [#uses=1] - store double %43, double* %41, align 4 - %44 = getelementptr %"struct.std::complex"* %40, i32 0, i32 0, i32 1 ; [#uses=1] - %45 = getelementptr %"struct.std::complex"* %memtmp26, i32 0, i32 0, i32 1 ; [#uses=1] - %46 = load double* %45, align 8 ; [#uses=1] - store double %46, double* %44, align 4 - call void @llvm.dbg.stoppoint(i32 515, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %47 = add i32 %k.0, %m.0 ; [#uses=1] - br label %bb28 - -bb28: ; preds = %bb30, %invcont27 - %k.0 = phi i32 [ %47, %invcont27 ], [ %j.0, %bb30 ] ; [#uses=6] - call void @llvm.dbg.stoppoint(i32 515, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %48 = call i32 @_ZNK10polynomialIdE6degreeEv(%"struct.polynomial"* %poly) nounwind ; [#uses=1] - %49 = add i32 %48, -1 ; [#uses=1] - %50 = icmp ult i32 %49, %k.0 ; [#uses=1] - br i1 %50, label %bb29, label %bb22 - -bb29: ; preds = %bb28 - call void @llvm.dbg.stoppoint(i32 523, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %51 = call %"struct.std::complex"* @_ZNSt7complexIdEmLIdEERS0_RKS_IT_E(%"struct.std::complex"* %w, %"struct.std::complex"* %wm) nounwind ; <%"struct.std::complex"*> [#uses=0] - call void @llvm.dbg.stoppoint(i32 513, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %52 = add i32 %j.0, 1 ; [#uses=1] - br label %bb30 - -bb30: ; preds = %bb29, %invcont - %j.0 = phi i32 [ 0, %invcont ], [ %52, %bb29 ] ; [#uses=3] - call void @llvm.dbg.stoppoint(i32 513, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %53 = add i32 %m2.0, -1 ; [#uses=1] - %54 = icmp ult i32 %53, %j.0 ; [#uses=1] - br i1 %54, label %bb31, label %bb28 - -bb31: ; preds = %bb30 - call void @llvm.dbg.stoppoint(i32 526, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %55 = shl i32 %m.0, 1 ; [#uses=1] - call void @llvm.dbg.stoppoint(i32 527, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %56 = shl i32 %m2.0, 1 ; [#uses=1] - call void @llvm.dbg.stoppoint(i32 508, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %57 = add i32 %s.0, 1 ; [#uses=1] - br label %bb32 - -bb32: ; preds = %bb31, %entry - %m.0 = phi i32 [ 2, %entry ], [ %55, %bb31 ] ; [#uses=3] - %m2.0 = phi i32 [ 1, %entry ], [ %56, %bb31 ] ; [#uses=4] - %s.0 = phi i32 [ 0, %entry ], [ %57, %bb31 ] ; [#uses=2] - call void @llvm.dbg.stoppoint(i32 508, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %58 = icmp ult i32 %s.0, %8 ; [#uses=1] - br i1 %58, label %bb, label %return - -return: ; preds = %bb32 - call void @llvm.dbg.stoppoint(i32 530, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - call void @llvm.dbg.region.end(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1748 to %0*)) - ret void - -lpad: ; preds = %invcont25, %bb22, %bb - %eh_ptr = call i8* @llvm.eh.exception() ; [#uses=2] - %eh_select40 = call i32 (i8*, i8*, ...)* @llvm.eh.selector.i32(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i8* null) ; [#uses=0] - call void @llvm.dbg.stoppoint(i32 530, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - invoke void @_ZN10polynomialISt7complexIdEED1Ev(%"struct.polynomial >"* %agg.result) - to label %Unwind unwind label %lpad41 - -lpad41: ; preds = %lpad - %eh_ptr42 = call i8* @llvm.eh.exception() ; [#uses=1] - %eh_select44 = call i32 (i8*, i8*, ...)* @llvm.eh.selector.i32(i8* %eh_ptr42, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0] - call void @llvm.dbg.stoppoint(i32 530, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - call void @_ZSt9terminatev() noreturn nounwind - unreachable - -Unwind: ; preds = %lpad - call void @_Unwind_Resume(i8* %eh_ptr) - unreachable -} - -define linkonce void @_ZN10polynomialIdE11inverse_fftERKS_ISt7complexIdEE(%"struct.polynomial >"* noalias sret %agg.result, %"struct.polynomial >"* %poly) { -entry: - %result = alloca %"struct.polynomial >", align 8 ; <%"struct.polynomial >"*> [#uses=1] - %u = alloca %"struct.std::complex", align 8 ; <%"struct.std::complex"*> [#uses=6] - %t = alloca %"struct.std::complex", align 8 ; <%"struct.std::complex"*> [#uses=6] - %w = alloca %"struct.std::complex", align 8 ; <%"struct.std::complex"*> [#uses=5] - %wm = alloca %"struct.std::complex", align 8 ; <%"struct.std::complex"*> [#uses=5] - %0 = alloca %"struct.std::complex", align 8 ; <%"struct.std::complex"*> [#uses=2] - %1 = alloca %"struct.std::complex", align 8 ; <%"struct.std::complex"*> [#uses=2] - %2 = alloca %"struct.std::complex", align 8 ; <%"struct.std::complex"*> [#uses=2] - %memtmp22 = alloca %"struct.std::complex", align 8 ; <%"struct.std::complex"*> [#uses=3] - %memtmp25 = alloca %"struct.std::complex", align 8 ; <%"struct.std::complex"*> [#uses=3] - %memtmp26 = alloca %"struct.std::complex", align 8 ; <%"struct.std::complex"*> [#uses=3] - %memtmp28 = alloca %"struct.std::complex", align 8 ; <%"struct.std::complex"*> [#uses=3] - call void @llvm.dbg.func.start(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1771 to %0*)) - %3 = bitcast %"struct.polynomial >"* %result to %0* ; <%0*> [#uses=1] - call void @llvm.dbg.declare(%0* %3, %0* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable1774 to %0*)) - %4 = bitcast %"struct.std::complex"* %u to %0* ; <%0*> [#uses=1] - call void @llvm.dbg.declare(%0* %4, %0* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable1775 to %0*)) - %5 = bitcast %"struct.std::complex"* %t to %0* ; <%0*> [#uses=1] - call void @llvm.dbg.declare(%0* %5, %0* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable1776 to %0*)) - %6 = bitcast %"struct.std::complex"* %w to %0* ; <%0*> [#uses=1] - call void @llvm.dbg.declare(%0* %6, %0* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable1777 to %0*)) - %7 = bitcast %"struct.std::complex"* %wm to %0* ; <%0*> [#uses=1] - call void @llvm.dbg.declare(%0* %7, %0* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable1778 to %0*)) - call void @llvm.dbg.stoppoint(i32 537, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %8 = call i32 @_ZNK10polynomialISt7complexIdEE6degreeEv(%"struct.polynomial >"* %poly) nounwind ; [#uses=1] - %9 = call i32 @_ZN10polynomialIdE4log2Ej(i32 %8) nounwind ; [#uses=1] - call void @llvm.dbg.stoppoint(i32 539, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - call void @_ZNSt7complexIdEC1Edd(%"struct.std::complex"* %wm, double 0.000000e+00, double 0.000000e+00) nounwind - call void @_ZNSt7complexIdEC1Edd(%"struct.std::complex"* %w, double 0.000000e+00, double 0.000000e+00) nounwind - call void @_ZNSt7complexIdEC1Edd(%"struct.std::complex"* %t, double 0.000000e+00, double 0.000000e+00) nounwind - call void @_ZNSt7complexIdEC1Edd(%"struct.std::complex"* %u, double 0.000000e+00, double 0.000000e+00) nounwind - call void @llvm.dbg.stoppoint(i32 541, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - call void @_ZN10polynomialIdE11bit_reverseERKS_ISt7complexIdEE(%"struct.polynomial >"* noalias sret %agg.result, %"struct.polynomial >"* %poly) - call void @llvm.dbg.stoppoint(i32 546, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - br label %bb34 - -bb: ; preds = %bb34 - call void @llvm.dbg.stoppoint(i32 548, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %10 = uitofp i32 %m.0 to double ; [#uses=1] - call void @_ZNSt7complexIdEC1Edd(%"struct.std::complex"* %1, double %10, double 0.000000e+00) nounwind - call void @_ZStngIdESt7complexIT_ERKS2_(%"struct.std::complex"* noalias sret %0, %"struct.std::complex"* @_ZN10polynomialIdE4PI2IE) nounwind - invoke void @_ZStdvIdESt7complexIT_ERKS2_S4_(%"struct.std::complex"* noalias sret %2, %"struct.std::complex"* %0, %"struct.std::complex"* %1) - to label %invcont unwind label %lpad - -invcont: ; preds = %bb - call void @llvm.dbg.stoppoint(i32 548, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - call void @_ZSt3expIdESt7complexIT_ERKS2_(%"struct.std::complex"* noalias sret %memtmp22, %"struct.std::complex"* %2) nounwind - %11 = getelementptr %"struct.std::complex"* %wm, i32 0, i32 0, i32 0 ; [#uses=1] - %12 = getelementptr %"struct.std::complex"* %memtmp22, i32 0, i32 0, i32 0 ; [#uses=1] - %13 = load double* %12, align 8 ; [#uses=1] - store double %13, double* %11, align 8 - %14 = getelementptr %"struct.std::complex"* %wm, i32 0, i32 0, i32 1 ; [#uses=1] - %15 = getelementptr %"struct.std::complex"* %memtmp22, i32 0, i32 0, i32 1 ; [#uses=1] - %16 = load double* %15, align 8 ; [#uses=1] - store double %16, double* %14, align 8 - call void @llvm.dbg.stoppoint(i32 549, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %17 = call %"struct.std::complex"* @_ZNSt7complexIdEaSEd(%"struct.std::complex"* %w, double 1.000000e+00) nounwind ; <%"struct.std::complex"*> [#uses=0] - call void @llvm.dbg.stoppoint(i32 551, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - br label %bb32 - -bb24: ; preds = %bb30 - call void @llvm.dbg.stoppoint(i32 555, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %18 = add i32 %k.0, %m2.0 ; [#uses=1] - %19 = call %"struct.std::complex"* @_ZN10polynomialISt7complexIdEEixEj(%"struct.polynomial >"* %agg.result, i32 %18) nounwind ; <%"struct.std::complex"*> [#uses=1] - call void @_ZStmlIdESt7complexIT_ERKS2_S4_(%"struct.std::complex"* noalias sret %memtmp25, %"struct.std::complex"* %w, %"struct.std::complex"* %19) nounwind - %20 = getelementptr %"struct.std::complex"* %t, i32 0, i32 0, i32 0 ; [#uses=1] - %21 = getelementptr %"struct.std::complex"* %memtmp25, i32 0, i32 0, i32 0 ; [#uses=1] - %22 = load double* %21, align 8 ; [#uses=1] - store double %22, double* %20, align 8 - %23 = getelementptr %"struct.std::complex"* %t, i32 0, i32 0, i32 1 ; [#uses=1] - %24 = getelementptr %"struct.std::complex"* %memtmp25, i32 0, i32 0, i32 1 ; [#uses=1] - %25 = load double* %24, align 8 ; [#uses=1] - store double %25, double* %23, align 8 - call void @llvm.dbg.stoppoint(i32 556, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %26 = call %"struct.std::complex"* @_ZN10polynomialISt7complexIdEEixEj(%"struct.polynomial >"* %agg.result, i32 %k.0) nounwind ; <%"struct.std::complex"*> [#uses=2] - %27 = getelementptr %"struct.std::complex"* %u, i32 0, i32 0, i32 0 ; [#uses=1] - %28 = getelementptr %"struct.std::complex"* %26, i32 0, i32 0, i32 0 ; [#uses=1] - %29 = load double* %28, align 4 ; [#uses=1] - store double %29, double* %27, align 8 - %30 = getelementptr %"struct.std::complex"* %u, i32 0, i32 0, i32 1 ; [#uses=1] - %31 = getelementptr %"struct.std::complex"* %26, i32 0, i32 0, i32 1 ; [#uses=1] - %32 = load double* %31, align 4 ; [#uses=1] - store double %32, double* %30, align 8 - call void @llvm.dbg.stoppoint(i32 557, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %33 = call %"struct.std::complex"* @_ZN10polynomialISt7complexIdEEixEj(%"struct.polynomial >"* %agg.result, i32 %k.0) nounwind ; <%"struct.std::complex"*> [#uses=2] - invoke void @_ZStplIdESt7complexIT_ERKS2_S4_(%"struct.std::complex"* noalias sret %memtmp26, %"struct.std::complex"* %u, %"struct.std::complex"* %t) - to label %invcont27 unwind label %lpad - -invcont27: ; preds = %bb24 - %34 = getelementptr %"struct.std::complex"* %33, i32 0, i32 0, i32 0 ; [#uses=1] - %35 = getelementptr %"struct.std::complex"* %memtmp26, i32 0, i32 0, i32 0 ; [#uses=1] - %36 = load double* %35, align 8 ; [#uses=1] - store double %36, double* %34, align 4 - %37 = getelementptr %"struct.std::complex"* %33, i32 0, i32 0, i32 1 ; [#uses=1] - %38 = getelementptr %"struct.std::complex"* %memtmp26, i32 0, i32 0, i32 1 ; [#uses=1] - %39 = load double* %38, align 8 ; [#uses=1] - store double %39, double* %37, align 4 - call void @llvm.dbg.stoppoint(i32 558, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %40 = add i32 %k.0, %m2.0 ; [#uses=1] - %41 = call %"struct.std::complex"* @_ZN10polynomialISt7complexIdEEixEj(%"struct.polynomial >"* %agg.result, i32 %40) nounwind ; <%"struct.std::complex"*> [#uses=2] - invoke void @_ZStmiIdESt7complexIT_ERKS2_S4_(%"struct.std::complex"* noalias sret %memtmp28, %"struct.std::complex"* %u, %"struct.std::complex"* %t) - to label %invcont29 unwind label %lpad - -invcont29: ; preds = %invcont27 - %42 = getelementptr %"struct.std::complex"* %41, i32 0, i32 0, i32 0 ; [#uses=1] - %43 = getelementptr %"struct.std::complex"* %memtmp28, i32 0, i32 0, i32 0 ; [#uses=1] - %44 = load double* %43, align 8 ; [#uses=1] - store double %44, double* %42, align 4 - %45 = getelementptr %"struct.std::complex"* %41, i32 0, i32 0, i32 1 ; [#uses=1] - %46 = getelementptr %"struct.std::complex"* %memtmp28, i32 0, i32 0, i32 1 ; [#uses=1] - %47 = load double* %46, align 8 ; [#uses=1] - store double %47, double* %45, align 4 - call void @llvm.dbg.stoppoint(i32 553, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %48 = add i32 %k.0, %m.0 ; [#uses=1] - br label %bb30 - -bb30: ; preds = %bb32, %invcont29 - %k.0 = phi i32 [ %48, %invcont29 ], [ %j.0, %bb32 ] ; [#uses=6] - call void @llvm.dbg.stoppoint(i32 553, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %49 = call i32 @_ZNK10polynomialISt7complexIdEE6degreeEv(%"struct.polynomial >"* %poly) nounwind ; [#uses=1] - %50 = add i32 %49, -1 ; [#uses=1] - %51 = icmp ult i32 %50, %k.0 ; [#uses=1] - br i1 %51, label %bb31, label %bb24 - -bb31: ; preds = %bb30 - call void @llvm.dbg.stoppoint(i32 561, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %52 = call %"struct.std::complex"* @_ZNSt7complexIdEmLIdEERS0_RKS_IT_E(%"struct.std::complex"* %w, %"struct.std::complex"* %wm) nounwind ; <%"struct.std::complex"*> [#uses=0] - call void @llvm.dbg.stoppoint(i32 551, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %53 = add i32 %j.0, 1 ; [#uses=1] - br label %bb32 - -bb32: ; preds = %bb31, %invcont - %j.0 = phi i32 [ 0, %invcont ], [ %53, %bb31 ] ; [#uses=3] - call void @llvm.dbg.stoppoint(i32 551, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %54 = add i32 %m2.0, -1 ; [#uses=1] - %55 = icmp ult i32 %54, %j.0 ; [#uses=1] - br i1 %55, label %bb33, label %bb30 - -bb33: ; preds = %bb32 - call void @llvm.dbg.stoppoint(i32 564, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %56 = shl i32 %m.0, 1 ; [#uses=1] - call void @llvm.dbg.stoppoint(i32 565, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %57 = shl i32 %m2.0, 1 ; [#uses=1] - call void @llvm.dbg.stoppoint(i32 546, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %58 = add i32 %s.0, 1 ; [#uses=1] - br label %bb34 - -bb34: ; preds = %bb33, %entry - %m.0 = phi i32 [ 2, %entry ], [ %56, %bb33 ] ; [#uses=3] - %m2.0 = phi i32 [ 1, %entry ], [ %57, %bb33 ] ; [#uses=4] - %s.0 = phi i32 [ 0, %entry ], [ %58, %bb33 ] ; [#uses=2] - call void @llvm.dbg.stoppoint(i32 546, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %59 = icmp ult i32 %s.0, %9 ; [#uses=1] - br i1 %59, label %bb, label %bb37 - -bb36: ; preds = %bb37 - call void @llvm.dbg.stoppoint(i32 569, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %60 = call i32 @_ZNK10polynomialISt7complexIdEE6degreeEv(%"struct.polynomial >"* %poly) nounwind ; [#uses=1] - %61 = uitofp i32 %60 to double ; [#uses=1] - %62 = call %"struct.std::complex"* @_ZN10polynomialISt7complexIdEEixEj(%"struct.polynomial >"* %agg.result, i32 %j.1) nounwind ; <%"struct.std::complex"*> [#uses=1] - %63 = call %"struct.std::complex"* @_ZNSt7complexIdEdVEd(%"struct.std::complex"* %62, double %61) nounwind ; <%"struct.std::complex"*> [#uses=0] - call void @llvm.dbg.stoppoint(i32 568, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %64 = add i32 %j.1, 1 ; [#uses=1] - br label %bb37 - -bb37: ; preds = %bb36, %bb34 - %j.1 = phi i32 [ %64, %bb36 ], [ 0, %bb34 ] ; [#uses=3] - call void @llvm.dbg.stoppoint(i32 568, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %65 = call i32 @_ZNK10polynomialISt7complexIdEE6degreeEv(%"struct.polynomial >"* %poly) nounwind ; [#uses=1] - %66 = icmp ugt i32 %65, %j.1 ; [#uses=1] - br i1 %66, label %bb36, label %return - -return: ; preds = %bb37 - call void @llvm.dbg.stoppoint(i32 571, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - call void @llvm.dbg.region.end(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1771 to %0*)) - ret void - -lpad: ; preds = %invcont27, %bb24, %bb - %eh_ptr = call i8* @llvm.eh.exception() ; [#uses=2] - %eh_select46 = call i32 (i8*, i8*, ...)* @llvm.eh.selector.i32(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i8* null) ; [#uses=0] - call void @llvm.dbg.stoppoint(i32 571, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - invoke void @_ZN10polynomialISt7complexIdEED1Ev(%"struct.polynomial >"* %agg.result) - to label %Unwind unwind label %lpad47 - -lpad47: ; preds = %lpad - %eh_ptr48 = call i8* @llvm.eh.exception() ; [#uses=1] - %eh_select50 = call i32 (i8*, i8*, ...)* @llvm.eh.selector.i32(i8* %eh_ptr48, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0] - call void @llvm.dbg.stoppoint(i32 571, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - call void @_ZSt9terminatev() noreturn nounwind - unreachable - -Unwind: ; preds = %lpad - call void @_Unwind_Resume(i8* %eh_ptr) - unreachable -} - -define linkonce void @_ZNK10polynomialIdEmlERKS0_(%"struct.polynomial"* noalias sret %agg.result, %"struct.polynomial"* %this, %"struct.polynomial"* %poly) { -entry: - %result = alloca %"struct.polynomial", align 8 ; <%"struct.polynomial"*> [#uses=1] - %dft2 = alloca %"struct.polynomial >", align 8 ; <%"struct.polynomial >"*> [#uses=7] - %dft1 = alloca %"struct.polynomial >", align 8 ; <%"struct.polynomial >"*> [#uses=6] - %a2 = alloca %"struct.polynomial", align 8 ; <%"struct.polynomial"*> [#uses=8] - %a1 = alloca %"struct.polynomial", align 8 ; <%"struct.polynomial"*> [#uses=9] - %0 = alloca %"struct.polynomial >", align 8 ; <%"struct.polynomial >"*> [#uses=4] - call void @llvm.dbg.func.start(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1785 to %0*)) - %1 = bitcast %"struct.polynomial"* %result to %0* ; <%0*> [#uses=1] - call void @llvm.dbg.declare(%0* %1, %0* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable1791 to %0*)) - %2 = bitcast %"struct.polynomial >"* %dft2 to %0* ; <%0*> [#uses=1] - call void @llvm.dbg.declare(%0* %2, %0* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable1795 to %0*)) - %3 = bitcast %"struct.polynomial >"* %dft1 to %0* ; <%0*> [#uses=1] - call void @llvm.dbg.declare(%0* %3, %0* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable1797 to %0*)) - %4 = bitcast %"struct.polynomial"* %a2 to %0* ; <%0*> [#uses=1] - call void @llvm.dbg.declare(%0* %4, %0* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable1799 to %0*)) - %5 = bitcast %"struct.polynomial"* %a1 to %0* ; <%0*> [#uses=1] - call void @llvm.dbg.declare(%0* %5, %0* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable1801 to %0*)) - call void @llvm.dbg.stoppoint(i32 590, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - call void @_ZN10polynomialIdEC1ERKS0_(%"struct.polynomial"* %a1, %"struct.polynomial"* %this) - call void @llvm.dbg.stoppoint(i32 591, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - invoke void @_ZN10polynomialIdEC1ERKS0_(%"struct.polynomial"* %a2, %"struct.polynomial"* %poly) - to label %invcont unwind label %lpad - -invcont: ; preds = %entry - call void @llvm.dbg.stoppoint(i32 594, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %6 = call i32 @_ZNK10polynomialIdE6degreeEv(%"struct.polynomial"* %a1) nounwind ; [#uses=1] - %7 = call i32 @_ZNK10polynomialIdE6degreeEv(%"struct.polynomial"* %a2) nounwind ; [#uses=1] - %8 = icmp ugt i32 %6, %7 ; [#uses=1] - br i1 %8, label %bb, label %bb26 - -bb: ; preds = %invcont - call void @llvm.dbg.stoppoint(i32 595, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %9 = invoke i32 @_ZN10polynomialIdE11stretch_fftEv(%"struct.polynomial"* %a1) - to label %invcont24 unwind label %lpad76 ; [#uses=1] - -invcont24: ; preds = %bb - call void @llvm.dbg.stoppoint(i32 595, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %10 = invoke %"struct.polynomial"* @_ZN10polynomialIdE7stretchEj(%"struct.polynomial"* %a2, i32 %9) - to label %bb29 unwind label %lpad76 ; <%"struct.polynomial"*> [#uses=0] - -bb26: ; preds = %invcont - call void @llvm.dbg.stoppoint(i32 597, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %11 = invoke i32 @_ZN10polynomialIdE11stretch_fftEv(%"struct.polynomial"* %a2) - to label %invcont27 unwind label %lpad76 ; [#uses=1] - -invcont27: ; preds = %bb26 - call void @llvm.dbg.stoppoint(i32 597, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %12 = invoke %"struct.polynomial"* @_ZN10polynomialIdE7stretchEj(%"struct.polynomial"* %a1, i32 %11) - to label %bb29 unwind label %lpad76 ; <%"struct.polynomial"*> [#uses=0] - -bb29: ; preds = %invcont27, %invcont24 - call void @llvm.dbg.stoppoint(i32 600, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - invoke void @_ZN10polynomialIdE3fftERKS0_(%"struct.polynomial >"* noalias sret %dft1, %"struct.polynomial"* %a1) - to label %invcont30 unwind label %lpad76 - -invcont30: ; preds = %bb29 - call void @llvm.dbg.stoppoint(i32 601, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - invoke void @_ZN10polynomialIdE3fftERKS0_(%"struct.polynomial >"* noalias sret %dft2, %"struct.polynomial"* %a2) - to label %invcont31 unwind label %lpad80 - -invcont31: ; preds = %invcont30 - call void @llvm.dbg.stoppoint(i32 604, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %13 = call i32 @_ZNK10polynomialIdE6degreeEv(%"struct.polynomial"* %a1) nounwind ; [#uses=2] - call void @llvm.dbg.stoppoint(i32 606, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - br label %bb33 - -bb32: ; preds = %bb33 - call void @llvm.dbg.stoppoint(i32 607, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %14 = call %"struct.std::complex"* @_ZN10polynomialISt7complexIdEEixEj(%"struct.polynomial >"* %dft2, i32 %k15.0) nounwind ; <%"struct.std::complex"*> [#uses=1] - %15 = call %"struct.std::complex"* @_ZN10polynomialISt7complexIdEEixEj(%"struct.polynomial >"* %dft1, i32 %k15.0) nounwind ; <%"struct.std::complex"*> [#uses=1] - %16 = call %"struct.std::complex"* @_ZNSt7complexIdEmLIdEERS0_RKS_IT_E(%"struct.std::complex"* %15, %"struct.std::complex"* %14) nounwind ; <%"struct.std::complex"*> [#uses=0] - call void @llvm.dbg.stoppoint(i32 606, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %17 = add i32 %k15.0, 1 ; [#uses=1] - br label %bb33 - -bb33: ; preds = %bb32, %invcont31 - %k15.0 = phi i32 [ 0, %invcont31 ], [ %17, %bb32 ] ; [#uses=4] - call void @llvm.dbg.stoppoint(i32 606, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %18 = icmp ult i32 %k15.0, %13 ; [#uses=1] - br i1 %18, label %bb32, label %bb34 - -bb34: ; preds = %bb33 - call void @llvm.dbg.stoppoint(i32 610, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - invoke void @_ZN10polynomialIdE11inverse_fftERKS_ISt7complexIdEE(%"struct.polynomial >"* noalias sret %0, %"struct.polynomial >"* %dft1) - to label %invcont35 unwind label %lpad84 - -invcont35: ; preds = %bb34 - call void @llvm.dbg.stoppoint(i32 610, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %19 = invoke %"struct.polynomial >"* @_ZN10polynomialISt7complexIdEEaSERKS2_(%"struct.polynomial >"* %dft2, %"struct.polynomial >"* %0) - to label %invcont36 unwind label %lpad88 ; <%"struct.polynomial >"*> [#uses=0] - -invcont36: ; preds = %invcont35 - call void @llvm.dbg.stoppoint(i32 610, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - invoke void @_ZN10polynomialISt7complexIdEED1Ev(%"struct.polynomial >"* %0) - to label %bb43 unwind label %lpad84 - -bb43: ; preds = %invcont36 - call void @llvm.dbg.stoppoint(i32 613, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %20 = add i32 %13, -1 ; [#uses=2] - call void @llvm.dbg.stoppoint(i32 614, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - invoke void @_ZN10polynomialIdEC1Ej(%"struct.polynomial"* %agg.result, i32 %20) - to label %bb46 unwind label %lpad84 - -bb45: ; preds = %bb46 - call void @llvm.dbg.stoppoint(i32 617, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %21 = call double* @_ZN10polynomialIdEixEj(%"struct.polynomial"* %agg.result, i32 %k.0) nounwind ; [#uses=1] - %22 = call %"struct.std::complex"* @_ZN10polynomialISt7complexIdEEixEj(%"struct.polynomial >"* %dft2, i32 %k.0) nounwind ; <%"struct.std::complex"*> [#uses=1] - %23 = call double* @_ZNSt7complexIdE4realEv(%"struct.std::complex"* %22) nounwind ; [#uses=1] - %24 = load double* %23, align 8 ; [#uses=1] - store double %24, double* %21, align 8 - call void @llvm.dbg.stoppoint(i32 616, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %25 = add i32 %k.0, 1 ; [#uses=1] - br label %bb46 - -bb46: ; preds = %bb45, %bb43 - %k.0 = phi i32 [ %25, %bb45 ], [ 0, %bb43 ] ; [#uses=4] - call void @llvm.dbg.stoppoint(i32 616, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - %26 = icmp ult i32 %k.0, %20 ; [#uses=1] - br i1 %26, label %bb45, label %bb47 - -bb47: ; preds = %bb46 - call void @llvm.dbg.stoppoint(i32 620, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - invoke void @_ZN10polynomialISt7complexIdEED1Ev(%"struct.polynomial >"* %dft2) - to label %bb54 unwind label %lpad80 - -bb54: ; preds = %bb47 - call void @llvm.dbg.stoppoint(i32 620, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - invoke void @_ZN10polynomialISt7complexIdEED1Ev(%"struct.polynomial >"* %dft1) - to label %bb61 unwind label %lpad76 - -bb61: ; preds = %bb54 - call void @llvm.dbg.stoppoint(i32 620, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - invoke void @_ZN10polynomialIdED1Ev(%"struct.polynomial"* %a2) - to label %bb68 unwind label %lpad - -bb68: ; preds = %bb61 - call void @llvm.dbg.stoppoint(i32 620, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - call void @_ZN10polynomialIdED1Ev(%"struct.polynomial"* %a1) - call void @llvm.dbg.region.end(%0* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram1785 to %0*)) - ret void - -lpad: ; preds = %bb61, %entry - %eh_ptr = call i8* @llvm.eh.exception() ; [#uses=2] - %eh_select75 = call i32 (i8*, i8*, ...)* @llvm.eh.selector.i32(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i8* null) ; [#uses=0] - br label %ppad - -lpad76: ; preds = %bb54, %bb29, %invcont27, %bb26, %invcont24, %bb - %eh_ptr77 = call i8* @llvm.eh.exception() ; [#uses=2] - %eh_select79 = call i32 (i8*, i8*, ...)* @llvm.eh.selector.i32(i8* %eh_ptr77, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i8* null) ; [#uses=0] - br label %ppad112 - -lpad80: ; preds = %bb47, %invcont30 - %eh_ptr81 = call i8* @llvm.eh.exception() ; [#uses=2] - %eh_select83 = call i32 (i8*, i8*, ...)* @llvm.eh.selector.i32(i8* %eh_ptr81, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i8* null) ; [#uses=0] - br label %ppad113 - -lpad84: ; preds = %bb43, %invcont36, %bb34 - %eh_ptr85 = call i8* @llvm.eh.exception() ; [#uses=2] - %eh_select87 = call i32 (i8*, i8*, ...)* @llvm.eh.selector.i32(i8* %eh_ptr85, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i8* null) ; [#uses=0] - br label %ppad114 - -lpad88: ; preds = %invcont35 - %eh_ptr89 = call i8* @llvm.eh.exception() ; [#uses=2] - %eh_select91 = call i32 (i8*, i8*, ...)* @llvm.eh.selector.i32(i8* %eh_ptr89, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i8* null) ; [#uses=0] - call void @llvm.dbg.stoppoint(i32 610, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - invoke void @_ZN10polynomialISt7complexIdEED1Ev(%"struct.polynomial >"* %0) - to label %ppad114 unwind label %lpad92 - -lpad92: ; preds = %lpad88 - %eh_ptr93 = call i8* @llvm.eh.exception() ; [#uses=1] - %eh_select95 = call i32 (i8*, i8*, ...)* @llvm.eh.selector.i32(i8* %eh_ptr93, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0] - call void @llvm.dbg.stoppoint(i32 610, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - call void @_ZSt9terminatev() noreturn nounwind - unreachable - -lpad96: ; preds = %ppad114 - %eh_ptr97 = call i8* @llvm.eh.exception() ; [#uses=1] - %eh_select99 = call i32 (i8*, i8*, ...)* @llvm.eh.selector.i32(i8* %eh_ptr97, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0] - call void @llvm.dbg.stoppoint(i32 620, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - call void @_ZSt9terminatev() noreturn nounwind - unreachable - -lpad100: ; preds = %ppad113 - %eh_ptr101 = call i8* @llvm.eh.exception() ; [#uses=1] - %eh_select103 = call i32 (i8*, i8*, ...)* @llvm.eh.selector.i32(i8* %eh_ptr101, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0] - call void @llvm.dbg.stoppoint(i32 620, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - call void @_ZSt9terminatev() noreturn nounwind - unreachable - -lpad104: ; preds = %ppad112 - %eh_ptr105 = call i8* @llvm.eh.exception() ; [#uses=1] - %eh_select107 = call i32 (i8*, i8*, ...)* @llvm.eh.selector.i32(i8* %eh_ptr105, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0] - call void @llvm.dbg.stoppoint(i32 620, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - call void @_ZSt9terminatev() noreturn nounwind - unreachable - -lpad108: ; preds = %ppad - %eh_ptr109 = call i8* @llvm.eh.exception() ; [#uses=1] - %eh_select111 = call i32 (i8*, i8*, ...)* @llvm.eh.selector.i32(i8* %eh_ptr109, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0] - call void @llvm.dbg.stoppoint(i32 620, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - call void @_ZSt9terminatev() noreturn nounwind - unreachable - -ppad: ; preds = %ppad112, %lpad - %eh_exception.3 = phi i8* [ %eh_ptr, %lpad ], [ %eh_exception.2, %ppad112 ] ; [#uses=1] - call void @llvm.dbg.stoppoint(i32 620, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - invoke void @_ZN10polynomialIdED1Ev(%"struct.polynomial"* %a1) - to label %Unwind unwind label %lpad108 - -ppad112: ; preds = %ppad113, %lpad76 - %eh_exception.2 = phi i8* [ %eh_ptr77, %lpad76 ], [ %eh_exception.1, %ppad113 ] ; [#uses=1] - call void @llvm.dbg.stoppoint(i32 620, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - invoke void @_ZN10polynomialIdED1Ev(%"struct.polynomial"* %a2) - to label %ppad unwind label %lpad104 - -ppad113: ; preds = %ppad114, %lpad80 - %eh_exception.1 = phi i8* [ %eh_ptr81, %lpad80 ], [ %eh_exception.0, %ppad114 ] ; [#uses=1] - call void @llvm.dbg.stoppoint(i32 620, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - invoke void @_ZN10polynomialISt7complexIdEED1Ev(%"struct.polynomial >"* %dft1) - to label %ppad112 unwind label %lpad100 - -ppad114: ; preds = %lpad88, %lpad84 - %eh_exception.0 = phi i8* [ %eh_ptr85, %lpad84 ], [ %eh_ptr89, %lpad88 ] ; [#uses=1] - call void @llvm.dbg.stoppoint(i32 620, i32 0, %0* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %0*)) - invoke void @_ZN10polynomialISt7complexIdEED1Ev(%"struct.polynomial >"* %dft2) - to label %ppad113 unwind label %lpad96 - -Unwind: ; preds = %ppad - call void @_Unwind_Resume(i8* %eh_exception.3) - unreachable -} - -declare i32 @strcmp(i8* nocapture, i8* nocapture) nounwind readonly - -declare %"struct.std::basic_ostream >"* @_ZNSolsEd(%"struct.std::basic_ostream >"*, double) - -declare %"struct.std::basic_ostream >"* @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(%"struct.std::basic_ostream >"*, i8*) - -declare %"struct.std::basic_ostream >"* @_ZNSo5flushEv(%"struct.std::basic_ostream >"*) - -declare extern_weak i32 @pthread_once(i32*, void ()*) - -declare extern_weak i8* @pthread_getspecific(i32) - -declare extern_weak i32 @pthread_setspecific(i32, i8*) - -declare extern_weak i32 @pthread_create(i32*, %struct.pthread_attr_t*, i8* (i8*)*, i8*) - -declare extern_weak i32 @pthread_cancel(i32) - -declare extern_weak i32 @pthread_mutex_lock(%struct.pthread_mutex_t*) - -declare extern_weak i32 @pthread_mutex_trylock(%struct.pthread_mutex_t*) - -declare extern_weak i32 @pthread_mutex_unlock(%struct.pthread_mutex_t*) - -declare extern_weak i32 @pthread_mutex_init(%struct.pthread_mutex_t*, %struct..0._50*) - -declare extern_weak i32 @pthread_key_create(i32*, void (i8*)*) - -declare extern_weak i32 @pthread_key_delete(i32) - -declare extern_weak i32 @pthread_mutexattr_init(%struct..0._50*) - -declare extern_weak i32 @pthread_mutexattr_settype(%struct..0._50*, i32) - -declare extern_weak i32 @pthread_mutexattr_destroy(%struct..0._50*) - -declare i32 @memcmp(i8* nocapture, i8* nocapture, i32) nounwind readonly From stoklund at 2pi.dk Mon Mar 1 14:59:39 2010 From: stoklund at 2pi.dk (Jakob Stoklund Olesen) Date: Mon, 01 Mar 2010 20:59:39 -0000 Subject: [llvm-commits] [llvm] r97496 - in /llvm/trunk: include/llvm/CodeGen/LiveInterval.h include/llvm/CodeGen/LiveIntervalAnalysis.h lib/CodeGen/LiveIntervalAnalysis.cpp Message-ID: <20100301205939.1948A2A6C12C@llvm.org> Author: stoklund Date: Mon Mar 1 14:59:38 2010 New Revision: 97496 URL: http://llvm.org/viewvc/llvm-project?rev=97496&view=rev Log: Use methods to determine if a LiveInterval is spillable. Don't accidentally produce unspillable intervals for deeply nested loops. Modified: llvm/trunk/include/llvm/CodeGen/LiveInterval.h llvm/trunk/include/llvm/CodeGen/LiveIntervalAnalysis.h llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp Modified: llvm/trunk/include/llvm/CodeGen/LiveInterval.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/LiveInterval.h?rev=97496&r1=97495&r2=97496&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/LiveInterval.h (original) +++ llvm/trunk/include/llvm/CodeGen/LiveInterval.h Mon Mar 1 14:59:38 2010 @@ -569,6 +569,16 @@ /// unsigned getSize() const; + /// isSpillable - Can this interval be spilled? + bool isSpillable() const { + return weight != HUGE_VALF; + } + + /// markNotSpillable - Mark interval as not spillable + void markNotSpillable() { + weight = HUGE_VALF; + } + /// ComputeJoinedWeight - Set the weight of a live interval after /// Other has been merged into it. void ComputeJoinedWeight(const LiveInterval &Other); Modified: llvm/trunk/include/llvm/CodeGen/LiveIntervalAnalysis.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/LiveIntervalAnalysis.h?rev=97496&r1=97495&r2=97496&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/LiveIntervalAnalysis.h (original) +++ llvm/trunk/include/llvm/CodeGen/LiveIntervalAnalysis.h Mon Mar 1 14:59:38 2010 @@ -70,9 +70,8 @@ static char ID; // Pass identification, replacement for typeid LiveIntervals() : MachineFunctionPass(&ID) {} - static float getSpillWeight(bool isDef, bool isUse, unsigned loopDepth) { - return (isDef + isUse) * powf(10.0F, (float)loopDepth); - } + // Calculate the spill weight to assign to a single instruction. + static float getSpillWeight(bool isDef, bool isUse, unsigned loopDepth); // After summing the spill weights of all defs and uses, the final weight // should be normalized, dividing the weight of the interval by its size. Modified: llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp?rev=97496&r1=97495&r2=97496&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp (original) +++ llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp Mon Mar 1 14:59:38 2010 @@ -1340,11 +1340,9 @@ MachineBasicBlock *MBB = MI->getParent(); if (ImpUse && MI != ReMatDefMI) { - // Re-matting an instruction with virtual register use. Update the - // register interval's spill weight to HUGE_VALF to prevent it from - // being spilled. - LiveInterval &ImpLi = getInterval(ImpUse); - ImpLi.weight = HUGE_VALF; + // Re-matting an instruction with virtual register use. Prevent interval + // from being spilled. + getInterval(ImpUse).markNotSpillable(); } unsigned MBBId = MBB->getNumber(); @@ -1396,7 +1394,7 @@ LiveInterval &nI = getOrCreateInterval(NewVReg); if (!TrySplit) { // The spill weight is now infinity as it cannot be spilled again. - nI.weight = HUGE_VALF; + nI.markNotSpillable(); continue; } @@ -1544,6 +1542,22 @@ } } +float +LiveIntervals::getSpillWeight(bool isDef, bool isUse, unsigned loopDepth) { + // Limit the loop depth ridiculousness. + if (loopDepth > 200) + loopDepth = 200; + + // The loop depth is used to roughly estimate the number of times the + // instruction is executed. Something like 10^d is simple, but will quickly + // overflow a float. This expression behaves like 10^d for small d, but is + // more tempered for large d. At d=200 we get 6.7e33 which leaves a bit of + // headroom before overflow. + float lc = powf(1 + (100.0f / (loopDepth+10)), (float)loopDepth); + + return (isDef + isUse) * lc; +} + void LiveIntervals::normalizeSpillWeights(std::vector &NewLIs) { for (unsigned i = 0, e = NewLIs.size(); i != e; ++i) @@ -1558,8 +1572,7 @@ std::vector added; - assert(li.weight != HUGE_VALF && - "attempt to spill already spilled interval!"); + assert(li.isSpillable() && "attempt to spill already spilled interval!"); DEBUG({ dbgs() << "\t\t\t\tadding intervals for spills for interval: "; @@ -1595,10 +1608,7 @@ // create a new register for this spill LiveInterval &nI = getOrCreateInterval(NewVReg); - - // the spill weight is now infinity as it - // cannot be spilled again - nI.weight = HUGE_VALF; + nI.markNotSpillable(); // Rewrite register operands to use the new vreg. for (SmallVectorImpl::iterator I = Indices.begin(), @@ -1652,8 +1662,7 @@ if (EnableFastSpilling) return addIntervalsForSpillsFast(li, loopInfo, vrm); - assert(li.weight != HUGE_VALF && - "attempt to spill already spilled interval!"); + assert(li.isSpillable() && "attempt to spill already spilled interval!"); DEBUG({ dbgs() << "\t\t\t\tadding intervals for spills for interval: "; @@ -1920,11 +1929,10 @@ unsigned ImpUse = getReMatImplicitUse(li, ReMatDefMI); if (ImpUse) { // Re-matting an instruction with virtual register use. Add the - // register as an implicit use on the use MI and update the register - // interval's spill weight to HUGE_VALF to prevent it from being - // spilled. + // register as an implicit use on the use MI and mark the register + // interval as unspillable. LiveInterval &ImpLi = getInterval(ImpUse); - ImpLi.weight = HUGE_VALF; + ImpLi.markNotSpillable(); MI->addOperand(MachineOperand::CreateReg(ImpUse, false, true)); } } From stoklund at 2pi.dk Mon Mar 1 15:12:11 2010 From: stoklund at 2pi.dk (Jakob Stoklund Olesen) Date: Mon, 1 Mar 2010 13:12:11 -0800 Subject: [llvm-commits] [llvm] r97475 - /llvm/trunk/utils/TableGen/DAGISelEmitter.cpp In-Reply-To: <20100301190525.F12082A6C12C@llvm.org> References: <20100301190525.F12082A6C12C@llvm.org> Message-ID: <2C2443EA-65A9-460E-B84D-FD20E54E8E6B@2pi.dk> On Mar 1, 2010, at 11:05 AM, Chris Lattner wrote: > Author: lattner > Date: Mon Mar 1 13:05:25 2010 > New Revision: 97475 > > URL: http://llvm.org/viewvc/llvm-project?rev=97475&view=rev > Log: > Turn on the new isel by default. Here are some fun numbers > with a release-asserts build on x86-64-darwin10: > > LLC Size: > Old: 15,426,852 > New: 12,759,140 (down 2.7M) > > LLI Size: > Old: 9,926,876 > New: 8,864,292 (down 1.1M) > > X86ISelDAGToDAG.o size: > Old: 1,401,232 > New: 162,868 (down 1.3M) > > Time to build X86ISelDAGToDAG.o: > Old: 67.147u 2.060s 1:09.78 > New: 4.234u 0.387s 0:04.77 Nice! How does runtime performance compare? From clattner at apple.com Mon Mar 1 15:14:53 2010 From: clattner at apple.com (Chris Lattner) Date: Mon, 1 Mar 2010 13:14:53 -0800 Subject: [llvm-commits] [llvm] r97486 -/llvm/trunk/utils/TableGen/DAGISelEmitter.cpp In-Reply-To: References: <20100301193915.57E722A6C12C@llvm.org> Message-ID: On Mar 1, 2010, at 11:49 AM, Nuno Lopes wrote: > BTW, can we have a blog post about this new isel, and how it differs from > the previous one? :) Good idea, I'll write something up when I have time. -Chris > > Thanks, > Nuno > > > ----- Original Message ----- > From: "Chris Lattner" > To: > Sent: Monday, March 01, 2010 7:39 PM > Subject: [llvm-commits] [llvm] > r97486 -/llvm/trunk/utils/TableGen/DAGISelEmitter.cpp > > >> Author: lattner >> Date: Mon Mar 1 13:39:15 2010 >> New Revision: 97486 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=97486&view=rev >> Log: >> don't emit the old sdnodexform stuff for the new isel. >> >> Modified: >> llvm/trunk/utils/TableGen/DAGISelEmitter.cpp >> >> Modified: llvm/trunk/utils/TableGen/DAGISelEmitter.cpp >> URL: >> http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelEmitter.cpp?rev=97486&r1=97485&r2=97486&view=diff >> ============================================================================== >> --- llvm/trunk/utils/TableGen/DAGISelEmitter.cpp (original) >> +++ llvm/trunk/utils/TableGen/DAGISelEmitter.cpp Mon Mar 1 13:39:15 2010 >> @@ -1942,7 +1942,6 @@ >> }); >> >> // FIXME: These are being used by hand written code, gross. >> - EmitNodeTransforms(OS); >> EmitPredicateFunctions(OS); >> >> #ifdef ENABLE_NEW_ISEL >> @@ -1980,7 +1979,8 @@ >> delete TheMatcher; >> >> #else >> - >> + EmitNodeTransforms(OS); >> + >> // At this point, we have full information about the 'Patterns' we need >> to >> // parse, both implicitly from instructions as well as from explicit >> pattern >> // definitions. Emit the resultant instruction selector. >> >> >> _______________________________________________ >> llvm-commits mailing list >> llvm-commits at cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits >> > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From clattner at apple.com Mon Mar 1 15:16:59 2010 From: clattner at apple.com (Chris Lattner) Date: Mon, 1 Mar 2010 13:16:59 -0800 Subject: [llvm-commits] [llvm] r97475 - /llvm/trunk/utils/TableGen/DAGISelEmitter.cpp In-Reply-To: <2C2443EA-65A9-460E-B84D-FD20E54E8E6B@2pi.dk> References: <20100301190525.F12082A6C12C@llvm.org> <2C2443EA-65A9-460E-B84D-FD20E54E8E6B@2pi.dk> Message-ID: <9150A198-56D1-428D-A0E6-96E82194D394@apple.com> On Mar 1, 2010, at 1:12 PM, Jakob Stoklund Olesen wrote: >> >> Time to build X86ISelDAGToDAG.o: >> Old: 67.147u 2.060s 1:09.78 >> New: 4.234u 0.387s 0:04.77 > > Nice! > > How does runtime performance compare? It currently generates identical selections to the old isel. It's compile time performance is basically the same as the old one, I have a few minor optimizations to go, but even when it's done it won't be significantly faster than the old one. One of the nice things about this is that PreprocessRMW in the X86 backend is going to die, we might be the ability to write patterns in .td file for nodes with multiple results, etc. -Chris From sabre at nondot.org Mon Mar 1 15:20:46 2010 From: sabre at nondot.org (Chris Lattner) Date: Mon, 01 Mar 2010 21:20:46 -0000 Subject: [llvm-commits] [llvm] r97500 - /llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp Message-ID: <20100301212046.72B772A6C12C@llvm.org> Author: lattner Date: Mon Mar 1 15:20:46 2010 New Revision: 97500 URL: http://llvm.org/viewvc/llvm-project?rev=97500&view=rev Log: remove a terrible hack that disabled assertions from this file because of build time problems. rdar://7697850. Modified: llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp Modified: llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp?rev=97500&r1=97499&r2=97500&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp (original) +++ llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp Mon Mar 1 15:20:46 2010 @@ -12,15 +12,6 @@ // //===----------------------------------------------------------------------===// -// Force NDEBUG on in any optimized build on Darwin. -// -// FIXME: This is a huge hack, to work around ridiculously awful compile times -// on this file with gcc-4.2 on Darwin, in Release mode. -#if (!defined(__llvm__) && defined(__APPLE__) && \ - defined(__OPTIMIZE__) && !defined(NDEBUG)) -#define NDEBUG -#endif - #define DEBUG_TYPE "x86-isel" #include "X86.h" #include "X86InstrBuilder.h" From edwintorok at gmail.com Mon Mar 1 15:24:27 2010 From: edwintorok at gmail.com (=?ISO-8859-1?Q?T=F6r=F6k_Edwin?=) Date: Mon, 01 Mar 2010 23:24:27 +0200 Subject: [llvm-commits] [llvm] r97475 - /llvm/trunk/utils/TableGen/DAGISelEmitter.cpp In-Reply-To: <9150A198-56D1-428D-A0E6-96E82194D394@apple.com> References: <20100301190525.F12082A6C12C@llvm.org> <2C2443EA-65A9-460E-B84D-FD20E54E8E6B@2pi.dk> <9150A198-56D1-428D-A0E6-96E82194D394@apple.com> Message-ID: <4B8C308B.3020002@gmail.com> On 03/01/2010 11:16 PM, Chris Lattner wrote: > On Mar 1, 2010, at 1:12 PM, Jakob Stoklund Olesen wrote: > >>> Time to build X86ISelDAGToDAG.o: >>> Old: 67.147u 2.060s 1:09.78 >>> New: 4.234u 0.387s 0:04.77 >> Nice! >> >> How does runtime performance compare? > > It currently generates identical selections to the old isel. It's compile time performance is basically the same as the old one, I have a few minor optimizations to go, but even when it's done it won't be significantly faster than the old one. One of the nice things about this is that PreprocessRMW in the X86 backend is going to die, we might be the ability to write patterns in .td file for nodes with multiple results, etc. > The build-time and code-size wins are amazing! X86ISelDAGToDAG is something thats always given me troubles during build (especially on slow buildbots, or older gccs that needed gigabytes of memory for that thing). Best regards, --Edwin From gohman at apple.com Mon Mar 1 15:45:21 2010 From: gohman at apple.com (Dan Gohman) Date: Mon, 01 Mar 2010 21:45:21 -0000 Subject: [llvm-commits] [llvm] r97502 - /llvm/trunk/tools/llc/llc.cpp Message-ID: <20100301214521.8D4AC2A6C139@llvm.org> Author: djg Date: Mon Mar 1 15:45:21 2010 New Revision: 97502 URL: http://llvm.org/viewvc/llvm-project?rev=97502&view=rev Log: Make llc opt into the addPassesToEmitFile verify pass. Modified: llvm/trunk/tools/llc/llc.cpp Modified: llvm/trunk/tools/llc/llc.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llc/llc.cpp?rev=97502&r1=97501&r2=97502&view=diff ============================================================================== --- llvm/trunk/tools/llc/llc.cpp (original) +++ llvm/trunk/tools/llc/llc.cpp Mon Mar 1 15:45:21 2010 @@ -305,6 +305,14 @@ case '3': OLvl = CodeGenOpt::Aggressive; break; } + // Request that addPassesToEmitFile run the Verifier after running + // passes which modify the IR. +#ifndef NDEBUG + bool DisableVerify = false; +#else + bool DisableVerify = true; +#endif + // If this target requires addPassesToEmitWholeFile, do it now. This is // used by strange things like the C backend. if (Target.WantsWholeFile()) { @@ -320,7 +328,8 @@ PM.add(createVerifierPass()); // Ask the target to add backend passes as necessary. - if (Target.addPassesToEmitWholeFile(PM, *Out, FileType, OLvl)) { + if (Target.addPassesToEmitWholeFile(PM, *Out, FileType, OLvl, + DisableVerify)) { errs() << argv[0] << ": target does not support generation of this" << " file type!\n"; if (Out != &fouts()) delete Out; @@ -347,7 +356,8 @@ // Override default to generate verbose assembly. Target.setAsmVerbosityDefault(true); - if (Target.addPassesToEmitFile(Passes, *Out, FileType, OLvl)) { + if (Target.addPassesToEmitFile(Passes, *Out, FileType, OLvl, + DisableVerify)) { errs() << argv[0] << ": target does not support generation of this" << " file type!\n"; if (Out != &fouts()) delete Out; From sabre at nondot.org Mon Mar 1 15:49:54 2010 From: sabre at nondot.org (Chris Lattner) Date: Mon, 01 Mar 2010 21:49:54 -0000 Subject: [llvm-commits] [llvm] r97504 - in /llvm/trunk/utils/TableGen: DAGISelEmitter.cpp DAGISelEmitter.h Message-ID: <20100301214954.3B7662A6C139@llvm.org> Author: lattner Date: Mon Mar 1 15:49:54 2010 New Revision: 97504 URL: http://llvm.org/viewvc/llvm-project?rev=97504&view=rev Log: optimize tblgen compile time by eliminating the old isel. Modified: llvm/trunk/utils/TableGen/DAGISelEmitter.cpp llvm/trunk/utils/TableGen/DAGISelEmitter.h Modified: llvm/trunk/utils/TableGen/DAGISelEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelEmitter.cpp?rev=97504&r1=97503&r2=97504&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelEmitter.cpp (original) +++ llvm/trunk/utils/TableGen/DAGISelEmitter.cpp Mon Mar 1 15:49:54 2010 @@ -14,42 +14,13 @@ #include "DAGISelEmitter.h" #include "DAGISelMatcher.h" #include "Record.h" -#include "llvm/ADT/StringExtras.h" -#include "llvm/Support/CommandLine.h" #include "llvm/Support/Debug.h" -#include "llvm/Support/MathExtras.h" -#include "llvm/Support/Debug.h" -#include -#include -#include using namespace llvm; -#define ENABLE_NEW_ISEL - - -static cl::opt -GenDebug("gen-debug", cl::desc("Generate debug code"), cl::init(false)); - //===----------------------------------------------------------------------===// // DAGISelEmitter Helper methods // -/// getNodeName - The top level Select_* functions have an "SDNode* N" -/// argument. When expanding the pattern-matching code, the intermediate -/// variables have type SDValue. This function provides a uniform way to -/// reference the underlying "SDNode *" for both cases. -static std::string getNodeName(const std::string &S) { - if (S == "N") return S; - return S + ".getNode()"; -} - -/// getNodeValue - Similar to getNodeName, except it provides a uniform -/// way to access the SDValue for both cases. -static std::string getValueName(const std::string &S) { - if (S == "N") return "SDValue(N, 0)"; - return S; -} - /// getPatternSize - Return the 'size' of this pattern. We want to match large /// patterns before small ones. This is used to determine the size of a /// pattern. @@ -135,106 +106,6 @@ return Cost; } -// PatternSortingPredicate - return true if we prefer to match LHS before RHS. -// In particular, we want to match maximal patterns first and lowest cost within -// a particular complexity first. -struct PatternSortingPredicate { - PatternSortingPredicate(CodeGenDAGPatterns &cgp) : CGP(cgp) {} - CodeGenDAGPatterns &CGP; - - typedef std::pair CodeLine; - typedef std::vector CodeList; - - bool operator()(const std::pair &LHSPair, - const std::pair &RHSPair) { - const PatternToMatch *LHS = LHSPair.first; - const PatternToMatch *RHS = RHSPair.first; - - unsigned LHSSize = getPatternSize(LHS->getSrcPattern(), CGP); - unsigned RHSSize = getPatternSize(RHS->getSrcPattern(), CGP); - LHSSize += LHS->getAddedComplexity(); - RHSSize += RHS->getAddedComplexity(); - if (LHSSize > RHSSize) return true; // LHS -> bigger -> less cost - if (LHSSize < RHSSize) return false; - - // If the patterns have equal complexity, compare generated instruction cost - unsigned LHSCost = getResultPatternCost(LHS->getDstPattern(), CGP); - unsigned RHSCost = getResultPatternCost(RHS->getDstPattern(), CGP); - if (LHSCost < RHSCost) return true; - if (LHSCost > RHSCost) return false; - - return getResultPatternSize(LHS->getDstPattern(), CGP) < - getResultPatternSize(RHS->getDstPattern(), CGP); - } -}; - -/// getRegisterValueType - Look up and return the ValueType of the specified -/// register. If the register is a member of multiple register classes which -/// have different associated types, return MVT::Other. -static MVT::SimpleValueType getRegisterValueType(Record *R, - const CodeGenTarget &T) { - bool FoundRC = false; - MVT::SimpleValueType VT = MVT::Other; - const std::vector &RCs = T.getRegisterClasses(); - std::vector::const_iterator RC; - std::vector::const_iterator Element; - - for (RC = RCs.begin() ; RC != RCs.end() ; RC++) { - Element = find((*RC).Elements.begin(), (*RC).Elements.end(), R); - if (Element != (*RC).Elements.end()) { - if (!FoundRC) { - FoundRC = true; - VT = (*RC).getValueTypeNum(0); - } else { - // In multiple RC's - if (VT != (*RC).getValueTypeNum(0)) { - // Types of the RC's do not agree. Return MVT::Other. The - // target is responsible for handling this. - return MVT::Other; - } - } - } - } - return VT; -} - -static std::string getOpcodeName(Record *Op, CodeGenDAGPatterns &CGP) { - return CGP.getSDNodeInfo(Op).getEnumName(); -} - -//===----------------------------------------------------------------------===// -// Node Transformation emitter implementation. -// -void DAGISelEmitter::EmitNodeTransforms(raw_ostream &OS) { - // Walk the pattern fragments, adding them to a map, which sorts them by - // name. - typedef std::map NXsByNameTy; - NXsByNameTy NXsByName; - - for (CodeGenDAGPatterns::nx_iterator I = CGP.nx_begin(), E = CGP.nx_end(); - I != E; ++I) - NXsByName.insert(std::make_pair(I->first->getName(), I->second)); - - OS << "\n// Node transformations.\n"; - - for (NXsByNameTy::iterator I = NXsByName.begin(), E = NXsByName.end(); - I != E; ++I) { - Record *SDNode = I->second.first; - std::string Code = I->second.second; - - if (Code.empty()) continue; // Empty code? Skip it. - - std::string ClassName = CGP.getSDNodeInfo(SDNode).getSDClassName(); - const char *C2 = ClassName == "SDNode" ? "N" : "inN"; - - OS << "inline SDValue Transform_" << I->first << "(SDNode *" << C2 - << ") {\n"; - if (ClassName != "SDNode") - OS << " " << ClassName << " *N = cast<" << ClassName << ">(inN);\n"; - OS << Code << "\n}\n"; - } -} - //===----------------------------------------------------------------------===// // Predicate emitter implementation. // @@ -280,1623 +151,12 @@ OS << "\n\n"; } - -//===----------------------------------------------------------------------===// -// PatternCodeEmitter implementation. -// -class PatternCodeEmitter { -private: - CodeGenDAGPatterns &CGP; - - // Predicates. - std::string PredicateCheck; - // Pattern cost. - unsigned Cost; - // Instruction selector pattern. - TreePatternNode *Pattern; - // Matched instruction. - TreePatternNode *Instruction; - - // Node to name mapping - std::map VariableMap; - // Name of the folded node which produces a flag. - std::pair FoldedFlag; - // Names of all the folded nodes which produce chains. - std::vector > FoldedChains; - // Original input chain(s). - std::vector > OrigChains; - std::set Duplicates; - - /// LSI - Load/Store information. - /// Save loads/stores matched by a pattern, and generate a MemOperandSDNode - /// for each memory access. This facilitates the use of AliasAnalysis in - /// the backend. - std::vector LSI; - - /// GeneratedCode - This is the buffer that we emit code to. The first int - /// indicates whether this is an exit predicate (something that should be - /// tested, and if true, the match fails) [when 1], or normal code to emit - /// [when 0], or initialization code to emit [when 2]. - std::vector > &GeneratedCode; - /// GeneratedDecl - This is the set of all SDValue declarations needed for - /// the set of patterns for each top-level opcode. - std::set &GeneratedDecl; - /// TargetOpcodes - The target specific opcodes used by the resulting - /// instructions. - std::vector &TargetOpcodes; - std::vector &TargetVTs; - /// OutputIsVariadic - Records whether the instruction output pattern uses - /// variable_ops. This requires that the Emit function be passed an - /// additional argument to indicate where the input varargs operands - /// begin. - bool &OutputIsVariadic; - /// NumInputRootOps - Records the number of operands the root node of the - /// input pattern has. This information is used in the generated code to - /// pass to Emit functions when variable_ops processing is needed. - unsigned &NumInputRootOps; - - std::string ChainName; - unsigned TmpNo; - unsigned OpcNo; - unsigned VTNo; - - void emitCheck(const std::string &S) { - if (!S.empty()) - GeneratedCode.push_back(std::make_pair(1, S)); - } - void emitCode(const std::string &S) { - if (!S.empty()) - GeneratedCode.push_back(std::make_pair(0, S)); - } - void emitInit(const std::string &S) { - if (!S.empty()) - GeneratedCode.push_back(std::make_pair(2, S)); - } - void emitDecl(const std::string &S) { - assert(!S.empty() && "Invalid declaration"); - GeneratedDecl.insert(S); - } - void emitOpcode(const std::string &Opc) { - TargetOpcodes.push_back(Opc); - OpcNo++; - } - void emitVT(const std::string &VT) { - TargetVTs.push_back(VT); - VTNo++; - } -public: - PatternCodeEmitter(CodeGenDAGPatterns &cgp, std::string predcheck, - TreePatternNode *pattern, TreePatternNode *instr, - std::vector > &gc, - std::set &gd, - std::vector &to, - std::vector &tv, - bool &oiv, - unsigned &niro) - : CGP(cgp), PredicateCheck(predcheck), Pattern(pattern), Instruction(instr), - GeneratedCode(gc), GeneratedDecl(gd), - TargetOpcodes(to), TargetVTs(tv), - OutputIsVariadic(oiv), NumInputRootOps(niro), - TmpNo(0), OpcNo(0), VTNo(0) {} - - /// EmitMatchCode - Emit a matcher for N, going to the label for PatternNo - /// if the match fails. At this point, we already know that the opcode for N - /// matches, and the SDNode for the result has the RootName specified name. - void EmitMatchCode(TreePatternNode *N, TreePatternNode *P, - const std::string &RootName, const std::string &ChainSuffix, - bool &FoundChain); - - void EmitChildMatchCode(TreePatternNode *Child, TreePatternNode *Parent, - const std::string &RootName, - const std::string &ChainSuffix, bool &FoundChain); - - /// EmitResultCode - Emit the action for a pattern. Now that it has matched - /// we actually have to build a DAG! - std::vector - EmitResultCode(TreePatternNode *N, std::vector DstRegs, - bool InFlagDecled, bool ResNodeDecled, - bool LikeLeaf = false, bool isRoot = false); - - /// InsertOneTypeCheck - Insert a type-check for an unresolved type in 'Pat' - /// and add it to the tree. 'Pat' and 'Other' are isomorphic trees except that - /// 'Pat' may be missing types. If we find an unresolved type to add a check - /// for, this returns true otherwise false if Pat has all types. - bool InsertOneTypeCheck(TreePatternNode *Pat, TreePatternNode *Other, - const std::string &Prefix, bool isRoot = false) { - // Did we find one? - if (Pat->getExtTypes() != Other->getExtTypes()) { - // Move a type over from 'other' to 'pat'. - Pat->setTypes(Other->getExtTypes()); - // The top level node type is checked outside of the select function. - if (!isRoot) - emitCheck(Prefix + ".getValueType() == " + - getName(Pat->getTypeNum(0))); - return true; - } - - unsigned OpNo = (unsigned)Pat->NodeHasProperty(SDNPHasChain, CGP); - for (unsigned i = 0, e = Pat->getNumChildren(); i != e; ++i, ++OpNo) - if (InsertOneTypeCheck(Pat->getChild(i), Other->getChild(i), - Prefix + utostr(OpNo))) - return true; - return false; - } - -private: - /// EmitInFlagSelectCode - Emit the flag operands for the DAG that is - /// being built. - void EmitInFlagSelectCode(TreePatternNode *N, const std::string &RootName, - bool &ChainEmitted, bool &InFlagDecled, - bool &ResNodeDecled, bool isRoot = false) { - const CodeGenTarget &T = CGP.getTargetInfo(); - unsigned OpNo = (unsigned)N->NodeHasProperty(SDNPHasChain, CGP); - for (unsigned i = 0, e = N->getNumChildren(); i != e; ++i, ++OpNo) { - TreePatternNode *Child = N->getChild(i); - if (!Child->isLeaf()) { - EmitInFlagSelectCode(Child, RootName + utostr(OpNo), ChainEmitted, - InFlagDecled, ResNodeDecled); - } else { - if (DefInit *DI = dynamic_cast(Child->getLeafValue())) { - if (!Child->getName().empty()) { - std::string Name = RootName + utostr(OpNo); - if (Duplicates.find(Name) != Duplicates.end()) - // A duplicate! Do not emit a copy for this node. - continue; - } - - Record *RR = DI->getDef(); - if (RR->isSubClassOf("Register")) { - MVT::SimpleValueType RVT = getRegisterValueType(RR, T); - if (RVT == MVT::Flag) { - if (!InFlagDecled) { - emitCode("SDValue InFlag = " + - getValueName(RootName + utostr(OpNo)) + ";"); - InFlagDecled = true; - } else - emitCode("InFlag = " + - getValueName(RootName + utostr(OpNo)) + ";"); - } else { - if (!ChainEmitted) { - emitCode("SDValue Chain = CurDAG->getEntryNode();"); - ChainName = "Chain"; - ChainEmitted = true; - } - if (!InFlagDecled) { - emitCode("SDValue InFlag(0, 0);"); - InFlagDecled = true; - } - std::string Decl = (!ResNodeDecled) ? "SDNode *" : ""; - emitCode(Decl + "ResNode = CurDAG->getCopyToReg(" + ChainName + - ", " + getNodeName(RootName) + "->getDebugLoc()" + - ", " + getQualifiedName(RR) + - ", " + getValueName(RootName + utostr(OpNo)) + - ", InFlag).getNode();"); - ResNodeDecled = true; - emitCode(ChainName + " = SDValue(ResNode, 0);"); - emitCode("InFlag = SDValue(ResNode, 1);"); - } - } - } - } - } - - if (N->NodeHasProperty(SDNPInFlag, CGP)) { - if (!InFlagDecled) { - emitCode("SDValue InFlag = " + getNodeName(RootName) + - "->getOperand(" + utostr(OpNo) + ");"); - InFlagDecled = true; - } else - abort(); - emitCode("InFlag = " + getNodeName(RootName) + - "->getOperand(" + utostr(OpNo) + ");"); - } - } -}; - - -/// EmitMatchCode - Emit a matcher for N, going to the label for PatternNo -/// if the match fails. At this point, we already know that the opcode for N -/// matches, and the SDNode for the result has the RootName specified name. -void PatternCodeEmitter::EmitMatchCode(TreePatternNode *N, TreePatternNode *P, - const std::string &RootName, - const std::string &ChainSuffix, - bool &FoundChain) { - // Save loads/stores matched by a pattern. - if (!N->isLeaf() && N->getName().empty()) { - if (N->NodeHasProperty(SDNPMemOperand, CGP)) - LSI.push_back(getNodeName(RootName)); - } - - bool isRoot = (P == NULL); - // Emit instruction predicates. Each predicate is just a string for now. - if (isRoot) { - // Record input varargs info. - NumInputRootOps = N->getNumChildren(); - emitCheck(PredicateCheck); - } - - if (N->isLeaf()) { - if (IntInit *II = dynamic_cast(N->getLeafValue())) { - emitCheck("cast(" + getNodeName(RootName) + - ")->getSExtValue() == INT64_C(" + - itostr(II->getValue()) + ")"); - return; - } - assert(N->getComplexPatternInfo(CGP) != 0 && - "Cannot match this as a leaf value!"); - } - - // If this node has a name associated with it, capture it in VariableMap. If - // we already saw this in the pattern, emit code to verify dagness. - if (!N->getName().empty()) { - std::string &VarMapEntry = VariableMap[N->getName()]; - if (VarMapEntry.empty()) { - VarMapEntry = RootName; - } else { - // If we get here, this is a second reference to a specific name. Since - // we already have checked that the first reference is valid, we don't - // have to recursively match it, just check that it's the same as the - // previously named thing. - emitCheck(VarMapEntry + " == " + RootName); - return; - } - } - - - // Emit code to load the child nodes and match their contents recursively. - unsigned OpNo = 0; - bool NodeHasChain = N->NodeHasProperty(SDNPHasChain, CGP); - bool HasChain = N->TreeHasProperty(SDNPHasChain, CGP); - if (HasChain) { - if (NodeHasChain) - OpNo = 1; - if (!isRoot) { - // Check if it's profitable to fold the node. e.g. Check for multiple uses - // of actual result? - std::string ParentName(RootName.begin(), RootName.end()-1); - if (!NodeHasChain) { - // If this is just an interior node, check to see if it has a single - // use. If the node has multiple uses and the pattern has a load as - // an operand, then we can't fold the load. - emitCheck(getValueName(RootName) + ".hasOneUse()"); - } else if (!N->isLeaf()) { // ComplexPatterns do their own legality check. - // If the immediate use can somehow reach this node through another - // path, then can't fold it either or it will create a cycle. - // e.g. In the following diagram, XX can reach ld through YY. If - // ld is folded into XX, then YY is both a predecessor and a successor - // of XX. - // - // [ld] - // ^ ^ - // | | - // / \--- - // / [YY] - // | ^ - // [XX]-------| - - // We know we need the check if N's parent is not the root. - bool NeedCheck = P != Pattern; - if (!NeedCheck) { - // If the parent is the root and the node has more than one operand, - // we need to check. - const SDNodeInfo &PInfo = CGP.getSDNodeInfo(P->getOperator()); - NeedCheck = - P->getOperator() == CGP.get_intrinsic_void_sdnode() || - P->getOperator() == CGP.get_intrinsic_w_chain_sdnode() || - P->getOperator() == CGP.get_intrinsic_wo_chain_sdnode() || - PInfo.getNumOperands() > 1 || - PInfo.hasProperty(SDNPHasChain) || - PInfo.hasProperty(SDNPInFlag) || - PInfo.hasProperty(SDNPOptInFlag); - } - - if (NeedCheck) { - emitCheck("IsProfitableToFold(" + getValueName(RootName) + - ", " + getNodeName(ParentName) + ", N)"); - emitCheck("IsLegalToFold(" + getValueName(RootName) + - ", " + getNodeName(ParentName) + ", N)"); - } else { - // Otherwise, just verify that the node only has a single use. - emitCheck(getValueName(RootName) + ".hasOneUse()"); - } - } - } - - if (NodeHasChain) { - if (FoundChain) { - emitCheck("IsChainCompatible(" + ChainName + ".getNode(), " + - getNodeName(RootName) + ")"); - OrigChains.push_back(std::make_pair(ChainName, - getValueName(RootName))); - } else - FoundChain = true; - ChainName = "Chain" + ChainSuffix; - - if (!N->getComplexPatternInfo(CGP) || - isRoot) - emitInit("SDValue " + ChainName + " = " + getNodeName(RootName) + - "->getOperand(0);"); - } - } - - // If there are node predicates for this, emit the calls. - for (unsigned i = 0, e = N->getPredicateFns().size(); i != e; ++i) - emitCheck(N->getPredicateFns()[i] + "(" + getNodeName(RootName) + ")"); - - // If this is an 'and R, 1234' where the operation is AND/OR and the RHS is - // a constant without a predicate fn that has more that one bit set, handle - // this as a special case. This is usually for targets that have special - // handling of certain large constants (e.g. alpha with it's 8/16/32-bit - // handling stuff). Using these instructions is often far more efficient - // than materializing the constant. Unfortunately, both the instcombiner - // and the dag combiner can often infer that bits are dead, and thus drop - // them from the mask in the dag. For example, it might turn 'AND X, 255' - // into 'AND X, 254' if it knows the low bit is set. Emit code that checks - // to handle this. - if (!N->isLeaf() && - (N->getOperator()->getName() == "and" || - N->getOperator()->getName() == "or") && - N->getChild(1)->isLeaf() && - N->getChild(1)->getPredicateFns().empty()) { - if (IntInit *II = dynamic_cast(N->getChild(1)->getLeafValue())) { - if (!isPowerOf2_32(II->getValue())) { // Don't bother with single bits. - emitInit("SDValue " + RootName + "0" + " = " + - getNodeName(RootName) + "->getOperand(" + utostr(0) + ");"); - emitInit("SDValue " + RootName + "1" + " = " + - getNodeName(RootName) + "->getOperand(" + utostr(1) + ");"); - - unsigned NTmp = TmpNo++; - emitCode("ConstantSDNode *Tmp" + utostr(NTmp) + - " = dyn_cast(" + - getNodeName(RootName + "1") + ");"); - emitCheck("Tmp" + utostr(NTmp)); - const char *MaskPredicate = N->getOperator()->getName() == "or" - ? "CheckOrMask(" : "CheckAndMask("; - emitCheck(MaskPredicate + getValueName(RootName + "0") + - ", Tmp" + utostr(NTmp) + - ", INT64_C(" + itostr(II->getValue()) + "))"); - - EmitChildMatchCode(N->getChild(0), N, RootName + utostr(0), - ChainSuffix + utostr(0), FoundChain); - return; - } - } - } - - for (unsigned i = 0, e = N->getNumChildren(); i != e; ++i, ++OpNo) { - emitInit("SDValue " + getValueName(RootName + utostr(OpNo)) + " = " + - getNodeName(RootName) + "->getOperand(" + utostr(OpNo) + ");"); - - EmitChildMatchCode(N->getChild(i), N, RootName + utostr(OpNo), - ChainSuffix + utostr(OpNo), FoundChain); - } - - // Handle complex patterns. - if (const ComplexPattern *CP = N->getComplexPatternInfo(CGP)) { - std::string Fn = CP->getSelectFunc(); - unsigned NumOps = CP->getNumOperands(); - for (unsigned i = 0; i < NumOps; ++i) { - emitDecl("CPTmp" + RootName + "_" + utostr(i)); - emitCode("SDValue CPTmp" + RootName + "_" + utostr(i) + ";"); - } - if (CP->hasProperty(SDNPHasChain)) { - emitDecl("CPInChain"); - emitDecl("Chain" + ChainSuffix); - emitCode("SDValue CPInChain;"); - emitCode("SDValue Chain" + ChainSuffix + ";"); - } - - std::string Code = Fn + "(N, "; // always pass in the root. - Code += getValueName(RootName); - for (unsigned i = 0; i < NumOps; i++) - Code += ", CPTmp" + RootName + "_" + utostr(i); - if (CP->hasProperty(SDNPHasChain)) { - ChainName = "Chain" + ChainSuffix; - Code += ", CPInChain, " + ChainName; - } - emitCheck(Code + ")"); - } -} - -void PatternCodeEmitter::EmitChildMatchCode(TreePatternNode *Child, - TreePatternNode *Parent, - const std::string &RootName, - const std::string &ChainSuffix, - bool &FoundChain) { - if (!Child->isLeaf()) { - // If it's not a leaf, recursively match. - const SDNodeInfo &CInfo = CGP.getSDNodeInfo(Child->getOperator()); - emitCheck(getNodeName(RootName) + "->getOpcode() == " + - CInfo.getEnumName()); - EmitMatchCode(Child, Parent, RootName, ChainSuffix, FoundChain); - bool HasChain = false; - if (Child->NodeHasProperty(SDNPHasChain, CGP)) { - HasChain = true; - FoldedChains.push_back(std::make_pair(getValueName(RootName), - CInfo.getNumResults())); - } - if (Child->NodeHasProperty(SDNPOutFlag, CGP)) { - assert(FoldedFlag.first == "" && FoldedFlag.second == 0 && - "Pattern folded multiple nodes which produce flags?"); - FoldedFlag = std::make_pair(getValueName(RootName), - CInfo.getNumResults() + (unsigned)HasChain); - } - return; - } - - if (const ComplexPattern *CP = Child->getComplexPatternInfo(CGP)) { - EmitMatchCode(Child, Parent, RootName, ChainSuffix, FoundChain); - bool HasChain = false; - - if (Child->NodeHasProperty(SDNPHasChain, CGP)) { - HasChain = true; - const SDNodeInfo &PInfo = CGP.getSDNodeInfo(Parent->getOperator()); - FoldedChains.push_back(std::make_pair("CPInChain", - PInfo.getNumResults())); - } - if (Child->NodeHasProperty(SDNPOutFlag, CGP)) { - assert(FoldedFlag.first == "" && FoldedFlag.second == 0 && - "Pattern folded multiple nodes which produce flags?"); - FoldedFlag = std::make_pair(getValueName(RootName), - CP->getNumOperands() + (unsigned)HasChain); - } - return; - } - - // If this child has a name associated with it, capture it in VarMap. If - // we already saw this in the pattern, emit code to verify dagness. - if (!Child->getName().empty()) { - std::string &VarMapEntry = VariableMap[Child->getName()]; - if (VarMapEntry.empty()) { - VarMapEntry = getValueName(RootName); - } else { - // If we get here, this is a second reference to a specific name. - // Since we already have checked that the first reference is valid, - // we don't have to recursively match it, just check that it's the - // same as the previously named thing. - emitCheck(VarMapEntry + " == " + getValueName(RootName)); - Duplicates.insert(getValueName(RootName)); - return; - } - } - - // Handle leaves of various types. - if (DefInit *DI = dynamic_cast(Child->getLeafValue())) { - Record *LeafRec = DI->getDef(); - if (LeafRec->isSubClassOf("RegisterClass") || - LeafRec->isSubClassOf("PointerLikeRegClass")) { - // Handle register references. Nothing to do here. - } else if (LeafRec->isSubClassOf("Register")) { - // Handle register references. - } else if (LeafRec->getName() == "srcvalue") { - // Place holder for SRCVALUE nodes. Nothing to do here. - } else if (LeafRec->isSubClassOf("ValueType")) { - // Make sure this is the specified value type. - emitCheck("cast(" + getNodeName(RootName) + - ")->getVT() == MVT::" + LeafRec->getName()); - } else if (LeafRec->isSubClassOf("CondCode")) { - // Make sure this is the specified cond code. - emitCheck("cast(" + getNodeName(RootName) + - ")->get() == ISD::" + LeafRec->getName()); - } else { -#ifndef NDEBUG - Child->dump(); - errs() << " "; -#endif - assert(0 && "Unknown leaf type!"); - } - - // If there are node predicates for this, emit the calls. - for (unsigned i = 0, e = Child->getPredicateFns().size(); i != e; ++i) - emitCheck(Child->getPredicateFns()[i] + "(" + getNodeName(RootName) + - ")"); - return; - } - - if (IntInit *II = dynamic_cast(Child->getLeafValue())) { - unsigned NTmp = TmpNo++; - emitCode("ConstantSDNode *Tmp"+ utostr(NTmp) + - " = dyn_cast("+ - getNodeName(RootName) + ");"); - emitCheck("Tmp" + utostr(NTmp)); - unsigned CTmp = TmpNo++; - emitCode("int64_t CN"+ utostr(CTmp) + - " = Tmp" + utostr(NTmp) + "->getSExtValue();"); - emitCheck("CN" + utostr(CTmp) + " == " - "INT64_C(" +itostr(II->getValue()) + ")"); - return; - } -#ifndef NDEBUG - Child->dump(); -#endif - assert(0 && "Unknown leaf type!"); -} - -/// EmitResultCode - Emit the action for a pattern. Now that it has matched -/// we actually have to build a DAG! -std::vector -PatternCodeEmitter::EmitResultCode(TreePatternNode *N, - std::vector DstRegs, - bool InFlagDecled, bool ResNodeDecled, - bool LikeLeaf, bool isRoot) { - // List of arguments of getMachineNode() or SelectNodeTo(). - std::vector NodeOps; - // This is something selected from the pattern we matched. - if (!N->getName().empty()) { - const std::string &VarName = N->getName(); - std::string Val = VariableMap[VarName]; - if (Val.empty()) { - errs() << "Variable '" << VarName << " referenced but not defined " - << "and not caught earlier!\n"; - abort(); - } - - unsigned ResNo = TmpNo++; - if (!N->isLeaf() && N->getOperator()->getName() == "imm") { - assert(N->getExtTypes().size() == 1 && "Multiple types not handled!"); - std::string CastType; - std::string TmpVar = "Tmp" + utostr(ResNo); - switch (N->getTypeNum(0)) { - default: - errs() << "Cannot handle " << getEnumName(N->getTypeNum(0)) - << " type as an immediate constant. Aborting\n"; - abort(); - case MVT::i1: CastType = "bool"; break; - case MVT::i8: CastType = "unsigned char"; break; - case MVT::i16: CastType = "unsigned short"; break; - case MVT::i32: CastType = "unsigned"; break; - case MVT::i64: CastType = "uint64_t"; break; - } - emitCode("SDValue " + TmpVar + - " = CurDAG->getTargetConstant(((" + CastType + - ") cast(" + Val + ")->getZExtValue()), " + - getEnumName(N->getTypeNum(0)) + ");"); - NodeOps.push_back(getValueName(TmpVar)); - } else if (!N->isLeaf() && N->getOperator()->getName() == "fpimm") { - assert(N->getExtTypes().size() == 1 && "Multiple types not handled!"); - std::string TmpVar = "Tmp" + utostr(ResNo); - emitCode("SDValue " + TmpVar + - " = CurDAG->getTargetConstantFP(*cast(" + - Val + ")->getConstantFPValue(), cast(" + - Val + ")->getValueType(0));"); - NodeOps.push_back(getValueName(TmpVar)); - } else if (const ComplexPattern *CP = N->getComplexPatternInfo(CGP)) { - for (unsigned i = 0; i < CP->getNumOperands(); ++i) - NodeOps.push_back(getValueName("CPTmp" + Val + "_" + utostr(i))); - } else { - // This node, probably wrapped in a SDNodeXForm, behaves like a leaf - // node even if it isn't one. Don't select it. - if (!LikeLeaf) { - if (isRoot && N->isLeaf()) { - emitCode("ReplaceUses(SDValue(N, 0), " + Val + ");"); - emitCode("return NULL;"); - } - } - NodeOps.push_back(getValueName(Val)); - } - return NodeOps; - } - if (N->isLeaf()) { - // If this is an explicit register reference, handle it. - if (DefInit *DI = dynamic_cast(N->getLeafValue())) { - unsigned ResNo = TmpNo++; - if (DI->getDef()->isSubClassOf("Register")) { - emitCode("SDValue Tmp" + utostr(ResNo) + " = CurDAG->getRegister(" + - getQualifiedName(DI->getDef()) + ", " + - getEnumName(N->getTypeNum(0)) + ");"); - NodeOps.push_back(getValueName("Tmp" + utostr(ResNo))); - return NodeOps; - } else if (DI->getDef()->getName() == "zero_reg") { - emitCode("SDValue Tmp" + utostr(ResNo) + - " = CurDAG->getRegister(0, " + - getEnumName(N->getTypeNum(0)) + ");"); - NodeOps.push_back(getValueName("Tmp" + utostr(ResNo))); - return NodeOps; - } else if (DI->getDef()->isSubClassOf("RegisterClass")) { - // Handle a reference to a register class. This is used - // in COPY_TO_SUBREG instructions. - emitCode("SDValue Tmp" + utostr(ResNo) + - " = CurDAG->getTargetConstant(" + - getQualifiedName(DI->getDef()) + "RegClassID, " + - "MVT::i32);"); - NodeOps.push_back(getValueName("Tmp" + utostr(ResNo))); - return NodeOps; - } - } else if (IntInit *II = dynamic_cast(N->getLeafValue())) { - unsigned ResNo = TmpNo++; - assert(N->getExtTypes().size() == 1 && "Multiple types not handled!"); - emitCode("SDValue Tmp" + utostr(ResNo) + - " = CurDAG->getTargetConstant(0x" + - utohexstr((uint64_t) II->getValue()) + - "ULL, " + getEnumName(N->getTypeNum(0)) + ");"); - NodeOps.push_back(getValueName("Tmp" + utostr(ResNo))); - return NodeOps; - } - -#ifndef NDEBUG - N->dump(); -#endif - assert(0 && "Unknown leaf type!"); - return NodeOps; - } - - Record *Op = N->getOperator(); - if (Op->isSubClassOf("Instruction")) { - const CodeGenTarget &CGT = CGP.getTargetInfo(); - CodeGenInstruction &II = CGT.getInstruction(Op->getName()); - const DAGInstruction &Inst = CGP.getInstruction(Op); - const TreePattern *InstPat = Inst.getPattern(); - // FIXME: Assume actual pattern comes before "implicit". - TreePatternNode *InstPatNode = - isRoot ? (InstPat ? InstPat->getTree(0) : Pattern) - : (InstPat ? InstPat->getTree(0) : NULL); - if (InstPatNode && !InstPatNode->isLeaf() && - InstPatNode->getOperator()->getName() == "set") { - InstPatNode = InstPatNode->getChild(InstPatNode->getNumChildren()-1); - } - bool IsVariadic = isRoot && II.isVariadic; - // FIXME: fix how we deal with physical register operands. - bool HasImpInputs = isRoot && Inst.getNumImpOperands() > 0; - bool HasImpResults = isRoot && DstRegs.size() > 0; - bool NodeHasOptInFlag = isRoot && - Pattern->TreeHasProperty(SDNPOptInFlag, CGP); - bool NodeHasInFlag = isRoot && - Pattern->TreeHasProperty(SDNPInFlag, CGP); - bool NodeHasOutFlag = isRoot && - Pattern->TreeHasProperty(SDNPOutFlag, CGP); - bool NodeHasChain = InstPatNode && - InstPatNode->TreeHasProperty(SDNPHasChain, CGP); - bool InputHasChain = isRoot && Pattern->NodeHasProperty(SDNPHasChain, CGP); - unsigned NumResults = Inst.getNumResults(); - unsigned NumDstRegs = HasImpResults ? DstRegs.size() : 0; - - // Record output varargs info. - OutputIsVariadic = IsVariadic; - - if (NodeHasOptInFlag) { - emitCode("bool HasInFlag = " - "(N->getOperand(N->getNumOperands()-1).getValueType() == " - "MVT::Flag);"); - } - if (IsVariadic) - emitCode("SmallVector Ops" + utostr(OpcNo) + ";"); - - // How many results is this pattern expected to produce? - unsigned NumPatResults = 0; - for (unsigned i = 0, e = Pattern->getExtTypes().size(); i != e; i++) { - MVT::SimpleValueType VT = Pattern->getTypeNum(i); - if (VT != MVT::isVoid && VT != MVT::Flag) - NumPatResults++; - } - - if (OrigChains.size() > 0) { - // The original input chain is being ignored. If it is not just - // pointing to the op that's being folded, we should create a - // TokenFactor with it and the chain of the folded op as the new chain. - // We could potentially be doing multiple levels of folding, in that - // case, the TokenFactor can have more operands. - emitCode("SmallVector InChains;"); - for (unsigned i = 0, e = OrigChains.size(); i < e; ++i) { - emitCode("if (" + OrigChains[i].first + ".getNode() != " + - OrigChains[i].second + ".getNode()) {"); - emitCode(" InChains.push_back(" + OrigChains[i].first + ");"); - emitCode("}"); - } - emitCode("InChains.push_back(" + ChainName + ");"); - emitCode(ChainName + " = CurDAG->getNode(ISD::TokenFactor, " - "N->getDebugLoc(), MVT::Other, " - "&InChains[0], InChains.size());"); - if (GenDebug) { - emitCode("CurDAG->setSubgraphColor(" + ChainName + - ".getNode(), \"yellow\");"); - emitCode("CurDAG->setSubgraphColor(" + ChainName + - ".getNode(), \"black\");"); - } - } - - // Loop over all of the operands of the instruction pattern, emitting code - // to fill them all in. The node 'N' usually has number children equal to - // the number of input operands of the instruction. However, in cases - // where there are predicate operands for an instruction, we need to fill - // in the 'execute always' values. Match up the node operands to the - // instruction operands to do this. - std::vector AllOps; - for (unsigned ChildNo = 0, InstOpNo = NumResults; - InstOpNo != II.OperandList.size(); ++InstOpNo) { - std::vector Ops; - - // Determine what to emit for this operand. - Record *OperandNode = II.OperandList[InstOpNo].Rec; - if ((OperandNode->isSubClassOf("PredicateOperand") || - OperandNode->isSubClassOf("OptionalDefOperand")) && - !CGP.getDefaultOperand(OperandNode).DefaultOps.empty()) { - // This is a predicate or optional def operand; emit the - // 'default ops' operands. - const DAGDefaultOperand &DefaultOp = - CGP.getDefaultOperand(II.OperandList[InstOpNo].Rec); - for (unsigned i = 0, e = DefaultOp.DefaultOps.size(); i != e; ++i) { - Ops = EmitResultCode(DefaultOp.DefaultOps[i], DstRegs, - InFlagDecled, ResNodeDecled); - AllOps.insert(AllOps.end(), Ops.begin(), Ops.end()); - } - } else { - // Otherwise this is a normal operand or a predicate operand without - // 'execute always'; emit it. - Ops = EmitResultCode(N->getChild(ChildNo), DstRegs, - InFlagDecled, ResNodeDecled); - AllOps.insert(AllOps.end(), Ops.begin(), Ops.end()); - ++ChildNo; - } - } - - // Emit all the chain and CopyToReg stuff. - bool ChainEmitted = NodeHasChain; - if (NodeHasInFlag || HasImpInputs) - EmitInFlagSelectCode(Pattern, "N", ChainEmitted, - InFlagDecled, ResNodeDecled, true); - if (NodeHasOptInFlag || NodeHasInFlag || HasImpInputs) { - if (!InFlagDecled) { - emitCode("SDValue InFlag(0, 0);"); - InFlagDecled = true; - } - if (NodeHasOptInFlag) { - emitCode("if (HasInFlag) {"); - emitCode(" InFlag = N->getOperand(N->getNumOperands()-1);"); - emitCode("}"); - } - } - - unsigned ResNo = TmpNo++; - - unsigned OpsNo = OpcNo; - std::string CodePrefix; - bool ChainAssignmentNeeded = NodeHasChain && !isRoot; - std::deque After; - std::string NodeName; - if (!isRoot) { - NodeName = "Tmp" + utostr(ResNo); - CodePrefix = "SDValue " + NodeName + "("; - } else { - NodeName = "ResNode"; - if (!ResNodeDecled) { - CodePrefix = "SDNode *" + NodeName + " = "; - ResNodeDecled = true; - } else - CodePrefix = NodeName + " = "; - } - - std::string Code = "Opc" + utostr(OpcNo); - - if (!isRoot || (InputHasChain && !NodeHasChain)) - // For call to "getMachineNode()". - Code += ", N->getDebugLoc()"; - - emitOpcode(II.Namespace + "::" + II.TheDef->getName()); - - // Output order: results, chain, flags - // Result types. - if (NumResults > 0 && N->getTypeNum(0) != MVT::isVoid) { - Code += ", VT" + utostr(VTNo); - emitVT(getEnumName(N->getTypeNum(0))); - } - // Add types for implicit results in physical registers, scheduler will - // care of adding copyfromreg nodes. - for (unsigned i = 0; i < NumDstRegs; i++) { - Record *RR = DstRegs[i]; - if (RR->isSubClassOf("Register")) { - MVT::SimpleValueType RVT = getRegisterValueType(RR, CGT); - Code += ", " + getEnumName(RVT); - } - } - if (NodeHasChain) - Code += ", MVT::Other"; - if (NodeHasOutFlag) - Code += ", MVT::Flag"; - - // Inputs. - if (IsVariadic) { - for (unsigned i = 0, e = AllOps.size(); i != e; ++i) - emitCode("Ops" + utostr(OpsNo) + ".push_back(" + AllOps[i] + ");"); - AllOps.clear(); - - // Figure out whether any operands at the end of the op list are not - // part of the variable section. - std::string EndAdjust; - if (NodeHasInFlag || HasImpInputs) - EndAdjust = "-1"; // Always has one flag. - else if (NodeHasOptInFlag) - EndAdjust = "-(HasInFlag?1:0)"; // May have a flag. - - emitCode("for (unsigned i = NumInputRootOps + " + utostr(NodeHasChain) + - ", e = N->getNumOperands()" + EndAdjust + "; i != e; ++i) {"); - - emitCode(" Ops" + utostr(OpsNo) + ".push_back(N->getOperand(i));"); - emitCode("}"); - } - - // Populate MemRefs with entries for each memory accesses covered by - // this pattern. - if (isRoot && !LSI.empty()) { - std::string MemRefs = "MemRefs" + utostr(OpsNo); - emitCode("MachineSDNode::mmo_iterator " + MemRefs + " = " - "MF->allocateMemRefsArray(" + utostr(LSI.size()) + ");"); - for (unsigned i = 0, e = LSI.size(); i != e; ++i) - emitCode(MemRefs + "[" + utostr(i) + "] = " - "cast(" + LSI[i] + ")->getMemOperand();"); - After.push_back("cast(ResNode)->setMemRefs(" + - MemRefs + ", " + MemRefs + " + " + utostr(LSI.size()) + - ");"); - } - - if (NodeHasChain) { - if (IsVariadic) - emitCode("Ops" + utostr(OpsNo) + ".push_back(" + ChainName + ");"); - else - AllOps.push_back(ChainName); - } - - if (IsVariadic) { - if (NodeHasInFlag || HasImpInputs) - emitCode("Ops" + utostr(OpsNo) + ".push_back(InFlag);"); - else if (NodeHasOptInFlag) { - emitCode("if (HasInFlag)"); - emitCode(" Ops" + utostr(OpsNo) + ".push_back(InFlag);"); - } - Code += ", &Ops" + utostr(OpsNo) + "[0], Ops" + utostr(OpsNo) + - ".size()"; - } else if (NodeHasInFlag || NodeHasOptInFlag || HasImpInputs) - AllOps.push_back("InFlag"); - - unsigned NumOps = AllOps.size(); - if (NumOps) { - if (!NodeHasOptInFlag && NumOps < 4) { - for (unsigned i = 0; i != NumOps; ++i) - Code += ", " + AllOps[i]; - } else { - std::string OpsCode = "SDValue Ops" + utostr(OpsNo) + "[] = { "; - for (unsigned i = 0; i != NumOps; ++i) { - OpsCode += AllOps[i]; - if (i != NumOps-1) - OpsCode += ", "; - } - emitCode(OpsCode + " };"); - Code += ", Ops" + utostr(OpsNo) + ", "; - if (NodeHasOptInFlag) { - Code += "HasInFlag ? "; - Code += utostr(NumOps) + " : " + utostr(NumOps-1); - } else - Code += utostr(NumOps); - } - } - - if (!isRoot) - Code += "), 0"; - - std::vector ReplaceFroms; - std::vector ReplaceTos; - if (!isRoot) { - NodeOps.push_back("Tmp" + utostr(ResNo)); - } else { - - if (NodeHasOutFlag) { - if (!InFlagDecled) { - After.push_back("SDValue InFlag(ResNode, " + - utostr(NumResults+NumDstRegs+(unsigned)NodeHasChain) + - ");"); - InFlagDecled = true; - } else - After.push_back("InFlag = SDValue(ResNode, " + - utostr(NumResults+NumDstRegs+(unsigned)NodeHasChain) + - ");"); - } - - for (unsigned j = 0, e = FoldedChains.size(); j < e; j++) { - ReplaceFroms.push_back("SDValue(" + - FoldedChains[j].first + ".getNode(), " + - utostr(FoldedChains[j].second) + - ")"); - ReplaceTos.push_back("SDValue(ResNode, " + - utostr(NumResults+NumDstRegs) + ")"); - } - - if (NodeHasOutFlag) { - if (FoldedFlag.first != "") { - ReplaceFroms.push_back("SDValue(" + FoldedFlag.first + ".getNode(), " + - utostr(FoldedFlag.second) + ")"); - ReplaceTos.push_back("InFlag"); - } else { - assert(Pattern->NodeHasProperty(SDNPOutFlag, CGP)); - ReplaceFroms.push_back("SDValue(N, " + - utostr(NumPatResults + (unsigned)InputHasChain) - + ")"); - ReplaceTos.push_back("InFlag"); - } - } - - if (!ReplaceFroms.empty() && InputHasChain) { - ReplaceFroms.push_back("SDValue(N, " + - utostr(NumPatResults) + ")"); - ReplaceTos.push_back("SDValue(" + ChainName + ".getNode(), " + - ChainName + ".getResNo()" + ")"); - ChainAssignmentNeeded |= NodeHasChain; - } - - // User does not expect the instruction would produce a chain! - if ((!InputHasChain && NodeHasChain) && NodeHasOutFlag) { - ; - } else if (InputHasChain && !NodeHasChain) { - // One of the inner node produces a chain. - assert(!NodeHasOutFlag && "Node has flag but not chain!"); - ReplaceFroms.push_back("SDValue(N, " + - utostr(NumPatResults) + ")"); - ReplaceTos.push_back(ChainName); - } - } - - if (ChainAssignmentNeeded) { - // Remember which op produces the chain. - std::string ChainAssign; - if (!isRoot) - ChainAssign = ChainName + " = SDValue(" + NodeName + - ".getNode(), " + utostr(NumResults+NumDstRegs) + ");"; - else - ChainAssign = ChainName + " = SDValue(" + NodeName + - ", " + utostr(NumResults+NumDstRegs) + ");"; - - After.push_front(ChainAssign); - } - - if (ReplaceFroms.size() == 1) { - After.push_back("ReplaceUses(" + ReplaceFroms[0] + ", " + - ReplaceTos[0] + ");"); - } else if (!ReplaceFroms.empty()) { - After.push_back("const SDValue Froms[] = {"); - for (unsigned i = 0, e = ReplaceFroms.size(); i != e; ++i) - After.push_back(" " + ReplaceFroms[i] + (i + 1 != e ? "," : "")); - After.push_back("};"); - After.push_back("const SDValue Tos[] = {"); - for (unsigned i = 0, e = ReplaceFroms.size(); i != e; ++i) - After.push_back(" " + ReplaceTos[i] + (i + 1 != e ? "," : "")); - After.push_back("};"); - After.push_back("ReplaceUses(Froms, Tos, " + - itostr(ReplaceFroms.size()) + ");"); - } - - // We prefer to use SelectNodeTo since it avoids allocation when - // possible and it avoids CSE map recalculation for the node's - // users, however it's tricky to use in a non-root context. - // - // We also don't use SelectNodeTo if the pattern replacement is being - // used to jettison a chain result, since morphing the node in place - // would leave users of the chain dangling. - // - if (!isRoot || (InputHasChain && !NodeHasChain)) { - Code = "CurDAG->getMachineNode(" + Code; - } else { - Code = "CurDAG->SelectNodeTo(N, " + Code; - } - if (isRoot) { - if (After.empty()) - CodePrefix = "return "; - else - After.push_back("return ResNode;"); - } - - emitCode(CodePrefix + Code + ");"); - - if (GenDebug) { - if (!isRoot) { - emitCode("CurDAG->setSubgraphColor(" + - NodeName +".getNode(), \"yellow\");"); - emitCode("CurDAG->setSubgraphColor(" + - NodeName +".getNode(), \"black\");"); - } else { - emitCode("CurDAG->setSubgraphColor(" + NodeName +", \"yellow\");"); - emitCode("CurDAG->setSubgraphColor(" + NodeName +", \"black\");"); - } - } - - for (unsigned i = 0, e = After.size(); i != e; ++i) - emitCode(After[i]); - - return NodeOps; - } - if (Op->isSubClassOf("SDNodeXForm")) { - assert(N->getNumChildren() == 1 && "node xform should have one child!"); - // PatLeaf node - the operand may or may not be a leaf node. But it should - // behave like one. - std::vector Ops = - EmitResultCode(N->getChild(0), DstRegs, InFlagDecled, - ResNodeDecled, true); - unsigned ResNo = TmpNo++; - emitCode("SDValue Tmp" + utostr(ResNo) + " = Transform_" + Op->getName() - + "(" + Ops.back() + ".getNode());"); - NodeOps.push_back("Tmp" + utostr(ResNo)); - if (isRoot) - emitCode("return Tmp" + utostr(ResNo) + ".getNode();"); - return NodeOps; - } - - N->dump(); - errs() << "\n"; - throw std::string("Unknown node in result pattern!"); -} - - -/// EmitCodeForPattern - Given a pattern to match, emit code to the specified -/// stream to match the pattern, and generate the code for the match if it -/// succeeds. Returns true if the pattern is not guaranteed to match. -void DAGISelEmitter::GenerateCodeForPattern(const PatternToMatch &Pattern, - std::vector > &GeneratedCode, - std::set &GeneratedDecl, - std::vector &TargetOpcodes, - std::vector &TargetVTs, - bool &OutputIsVariadic, - unsigned &NumInputRootOps) { - OutputIsVariadic = false; - NumInputRootOps = 0; - - PatternCodeEmitter Emitter(CGP, Pattern.getPredicateCheck(), - Pattern.getSrcPattern(), Pattern.getDstPattern(), - GeneratedCode, GeneratedDecl, - TargetOpcodes, TargetVTs, - OutputIsVariadic, NumInputRootOps); - - // Emit the matcher, capturing named arguments in VariableMap. - bool FoundChain = false; - Emitter.EmitMatchCode(Pattern.getSrcPattern(), NULL, "N", "", FoundChain); - - // TP - Get *SOME* tree pattern, we don't care which. It is only used for - // diagnostics, which we know are impossible at this point. - TreePattern &TP = *CGP.pf_begin()->second; - - // At this point, we know that we structurally match the pattern, but the - // types of the nodes may not match. Figure out the fewest number of type - // comparisons we need to emit. For example, if there is only one integer - // type supported by a target, there should be no type comparisons at all for - // integer patterns! - // - // To figure out the fewest number of type checks needed, clone the pattern, - // remove the types, then perform type inference on the pattern as a whole. - // If there are unresolved types, emit an explicit check for those types, - // apply the type to the tree, then rerun type inference. Iterate until all - // types are resolved. - // - TreePatternNode *Pat = Pattern.getSrcPattern()->clone(); - Pat->RemoveAllTypes(); - - do { - // Resolve/propagate as many types as possible. - try { - bool MadeChange = true; - while (MadeChange) - MadeChange = Pat->ApplyTypeConstraints(TP, - true/*Ignore reg constraints*/); - } catch (...) { - assert(0 && "Error: could not find consistent types for something we" - " already decided was ok!"); - abort(); - } - - // Insert a check for an unresolved type and add it to the tree. If we find - // an unresolved type to add a check for, this returns true and we iterate, - // otherwise we are done. - } while (Emitter.InsertOneTypeCheck(Pat, Pattern.getSrcPattern(), "N", true)); - - Emitter.EmitResultCode(Pattern.getDstPattern(), Pattern.getDstRegs(), - false, false, false, true); - delete Pat; -} - -/// EraseCodeLine - Erase one code line from all of the patterns. If removing -/// a line causes any of them to be empty, remove them and return true when -/// done. -static bool EraseCodeLine(std::vector > > > - &Patterns) { - bool ErasedPatterns = false; - for (unsigned i = 0, e = Patterns.size(); i != e; ++i) { - Patterns[i].second.pop_back(); - if (Patterns[i].second.empty()) { - Patterns.erase(Patterns.begin()+i); - --i; --e; - ErasedPatterns = true; - } - } - return ErasedPatterns; -} - -/// EmitPatterns - Emit code for at least one pattern, but try to group common -/// code together between the patterns. -void DAGISelEmitter::EmitPatterns(std::vector > > > - &Patterns, unsigned Indent, - raw_ostream &OS) { - typedef std::pair CodeLine; - typedef std::vector CodeList; - typedef std::vector > PatternList; - - if (Patterns.empty()) return; - - // Figure out how many patterns share the next code line. Explicitly copy - // FirstCodeLine so that we don't invalidate a reference when changing - // Patterns. - const CodeLine FirstCodeLine = Patterns.back().second.back(); - unsigned LastMatch = Patterns.size()-1; - while (LastMatch != 0 && Patterns[LastMatch-1].second.back() == FirstCodeLine) - --LastMatch; - - // If not all patterns share this line, split the list into two pieces. The - // first chunk will use this line, the second chunk won't. - if (LastMatch != 0) { - PatternList Shared(Patterns.begin()+LastMatch, Patterns.end()); - PatternList Other(Patterns.begin(), Patterns.begin()+LastMatch); - - // FIXME: Emit braces? - if (Shared.size() == 1) { - const PatternToMatch &Pattern = *Shared.back().first; - OS << "\n" << std::string(Indent, ' ') << "// Pattern: "; - Pattern.getSrcPattern()->print(OS); - OS << "\n" << std::string(Indent, ' ') << "// Emits: "; - Pattern.getDstPattern()->print(OS); - OS << "\n"; - unsigned AddedComplexity = Pattern.getAddedComplexity(); - OS << std::string(Indent, ' ') << "// Pattern complexity = " - << getPatternSize(Pattern.getSrcPattern(), CGP) + AddedComplexity - << " cost = " - << getResultPatternCost(Pattern.getDstPattern(), CGP) - << " size = " - << getResultPatternSize(Pattern.getDstPattern(), CGP) << "\n"; - } - if (FirstCodeLine.first != 1) { - OS << std::string(Indent, ' ') << "{\n"; - Indent += 2; - } - EmitPatterns(Shared, Indent, OS); - if (FirstCodeLine.first != 1) { - Indent -= 2; - OS << std::string(Indent, ' ') << "}\n"; - } - - if (Other.size() == 1) { - const PatternToMatch &Pattern = *Other.back().first; - OS << "\n" << std::string(Indent, ' ') << "// Pattern: "; - Pattern.getSrcPattern()->print(OS); - OS << "\n" << std::string(Indent, ' ') << "// Emits: "; - Pattern.getDstPattern()->print(OS); - OS << "\n"; - unsigned AddedComplexity = Pattern.getAddedComplexity(); - OS << std::string(Indent, ' ') << "// Pattern complexity = " - << getPatternSize(Pattern.getSrcPattern(), CGP) + AddedComplexity - << " cost = " - << getResultPatternCost(Pattern.getDstPattern(), CGP) - << " size = " - << getResultPatternSize(Pattern.getDstPattern(), CGP) << "\n"; - } - EmitPatterns(Other, Indent, OS); - return; - } - - // Remove this code from all of the patterns that share it. - bool ErasedPatterns = EraseCodeLine(Patterns); - - bool isPredicate = FirstCodeLine.first == 1; - - // Otherwise, every pattern in the list has this line. Emit it. - if (!isPredicate) { - // Normal code. - OS << std::string(Indent, ' ') << FirstCodeLine.second << "\n"; - } else { - OS << std::string(Indent, ' ') << "if (" << FirstCodeLine.second; - - // If the next code line is another predicate, and if all of the pattern - // in this group share the same next line, emit it inline now. Do this - // until we run out of common predicates. - while (!ErasedPatterns && Patterns.back().second.back().first == 1) { - // Check that all of the patterns in Patterns end with the same predicate. - bool AllEndWithSamePredicate = true; - for (unsigned i = 0, e = Patterns.size(); i != e; ++i) - if (Patterns[i].second.back() != Patterns.back().second.back()) { - AllEndWithSamePredicate = false; - break; - } - // If all of the predicates aren't the same, we can't share them. - if (!AllEndWithSamePredicate) break; - - // Otherwise we can. Emit it shared now. - OS << " &&\n" << std::string(Indent+4, ' ') - << Patterns.back().second.back().second; - ErasedPatterns = EraseCodeLine(Patterns); - } - - OS << ") {\n"; - Indent += 2; - } - - EmitPatterns(Patterns, Indent, OS); - - if (isPredicate) - OS << std::string(Indent-2, ' ') << "}\n"; -} - -static std::string getLegalCName(std::string OpName) { - std::string::size_type pos = OpName.find("::"); - if (pos != std::string::npos) - OpName.replace(pos, 2, "_"); - return OpName; -} - -void DAGISelEmitter::EmitInstructionSelector(raw_ostream &OS) { - const CodeGenTarget &Target = CGP.getTargetInfo(); - - // Get the namespace to insert instructions into. - std::string InstNS = Target.getInstNamespace(); - if (!InstNS.empty()) InstNS += "::"; - - // Group the patterns by their top-level opcodes. - std::map > PatternsByOpcode; - // All unique target node emission functions. - std::map EmitFunctions; - for (CodeGenDAGPatterns::ptm_iterator I = CGP.ptm_begin(), - E = CGP.ptm_end(); I != E; ++I) { - const PatternToMatch &Pattern = *I; - TreePatternNode *Node = Pattern.getSrcPattern(); - if (!Node->isLeaf()) { - PatternsByOpcode[getOpcodeName(Node->getOperator(), CGP)]. - push_back(&Pattern); - } else { - const ComplexPattern *CP; - if (dynamic_cast(Node->getLeafValue())) { - PatternsByOpcode[getOpcodeName(CGP.getSDNodeNamed("imm"), CGP)]. - push_back(&Pattern); - } else if ((CP = Node->getComplexPatternInfo(CGP))) { - std::vector OpNodes = CP->getRootNodes(); - for (unsigned j = 0, e = OpNodes.size(); j != e; j++) { - PatternsByOpcode[getOpcodeName(OpNodes[j], CGP)] - .insert(PatternsByOpcode[getOpcodeName(OpNodes[j], CGP)].begin(), - &Pattern); - } - } else { - errs() << "Unrecognized opcode '"; - Node->dump(); - errs() << "' on tree pattern '"; - errs() << Pattern.getDstPattern()->getOperator()->getName() << "'!\n"; - exit(1); - } - } - } - - // For each opcode, there might be multiple select functions, one per - // ValueType of the node (or its first operand if it doesn't produce a - // non-chain result. - std::map > OpcodeVTMap; - - // Emit one Select_* method for each top-level opcode. We do this instead of - // emitting one giant switch statement to support compilers where this will - // result in the recursive functions taking less stack space. - for (std::map >::iterator - PBOI = PatternsByOpcode.begin(), E = PatternsByOpcode.end(); - PBOI != E; ++PBOI) { - const std::string &OpName = PBOI->first; - std::vector &PatternsOfOp = PBOI->second; - assert(!PatternsOfOp.empty() && "No patterns but map has entry?"); - - // Split them into groups by type. - std::map > PatternsByType; - for (unsigned i = 0, e = PatternsOfOp.size(); i != e; ++i) { - const PatternToMatch *Pat = PatternsOfOp[i]; - TreePatternNode *SrcPat = Pat->getSrcPattern(); - PatternsByType[SrcPat->getTypeNum(0)].push_back(Pat); - } - - for (std::map >::iterator - II = PatternsByType.begin(), EE = PatternsByType.end(); II != EE; - ++II) { - MVT::SimpleValueType OpVT = II->first; - std::vector &Patterns = II->second; - typedef std::pair CodeLine; - typedef std::vector CodeList; - typedef CodeList::iterator CodeListI; - - std::vector > CodeForPatterns; - std::vector > PatternOpcodes; - std::vector > PatternVTs; - std::vector > PatternDecls; - std::vector OutputIsVariadicFlags; - std::vector NumInputRootOpsCounts; - for (unsigned i = 0, e = Patterns.size(); i != e; ++i) { - CodeList GeneratedCode; - std::set GeneratedDecl; - std::vector TargetOpcodes; - std::vector TargetVTs; - bool OutputIsVariadic; - unsigned NumInputRootOps; - GenerateCodeForPattern(*Patterns[i], GeneratedCode, GeneratedDecl, - TargetOpcodes, TargetVTs, - OutputIsVariadic, NumInputRootOps); - CodeForPatterns.push_back(std::make_pair(Patterns[i], GeneratedCode)); - PatternDecls.push_back(GeneratedDecl); - PatternOpcodes.push_back(TargetOpcodes); - PatternVTs.push_back(TargetVTs); - OutputIsVariadicFlags.push_back(OutputIsVariadic); - NumInputRootOpsCounts.push_back(NumInputRootOps); - } - - // Factor target node emission code (emitted by EmitResultCode) into - // separate functions. Uniquing and share them among all instruction - // selection routines. - for (unsigned i = 0, e = CodeForPatterns.size(); i != e; ++i) { - CodeList &GeneratedCode = CodeForPatterns[i].second; - std::vector &TargetOpcodes = PatternOpcodes[i]; - std::vector &TargetVTs = PatternVTs[i]; - std::set Decls = PatternDecls[i]; - bool OutputIsVariadic = OutputIsVariadicFlags[i]; - unsigned NumInputRootOps = NumInputRootOpsCounts[i]; - std::vector AddedInits; - int CodeSize = (int)GeneratedCode.size(); - int LastPred = -1; - for (int j = CodeSize-1; j >= 0; --j) { - if (LastPred == -1 && GeneratedCode[j].first == 1) - LastPred = j; - else if (LastPred != -1 && GeneratedCode[j].first == 2) - AddedInits.push_back(GeneratedCode[j].second); - } - - std::string CalleeCode = "(SDNode *N"; - std::string CallerCode = "(N"; - for (unsigned j = 0, e = TargetOpcodes.size(); j != e; ++j) { - CalleeCode += ", unsigned Opc" + utostr(j); - CallerCode += ", " + TargetOpcodes[j]; - } - for (unsigned j = 0, e = TargetVTs.size(); j != e; ++j) { - CalleeCode += ", MVT::SimpleValueType VT" + utostr(j); - CallerCode += ", " + TargetVTs[j]; - } - for (std::set::iterator - I = Decls.begin(), E = Decls.end(); I != E; ++I) { - std::string Name = *I; - CalleeCode += ", SDValue &" + Name; - CallerCode += ", " + Name; - } - - if (OutputIsVariadic) { - CalleeCode += ", unsigned NumInputRootOps"; - CallerCode += ", " + utostr(NumInputRootOps); - } - - CallerCode += ");"; - CalleeCode += ") {\n"; - - for (std::vector::const_reverse_iterator - I = AddedInits.rbegin(), E = AddedInits.rend(); I != E; ++I) - CalleeCode += " " + *I + "\n"; - - for (int j = LastPred+1; j < CodeSize; ++j) - CalleeCode += " " + GeneratedCode[j].second + "\n"; - for (int j = LastPred+1; j < CodeSize; ++j) - GeneratedCode.pop_back(); - CalleeCode += "}\n"; - - // Uniquing the emission routines. - unsigned EmitFuncNum; - std::map::iterator EFI = - EmitFunctions.find(CalleeCode); - if (EFI != EmitFunctions.end()) { - EmitFuncNum = EFI->second; - } else { - EmitFuncNum = EmitFunctions.size(); - EmitFunctions.insert(std::make_pair(CalleeCode, EmitFuncNum)); - // Prevent emission routines from being inlined to reduce selection - // routines stack frame sizes. - OS << "DISABLE_INLINE "; - OS << "SDNode *Emit_" << utostr(EmitFuncNum) << CalleeCode; - } - - // Replace the emission code within selection routines with calls to the - // emission functions. - if (GenDebug) - GeneratedCode.push_back(std::make_pair(0, - "CurDAG->setSubgraphColor(N, \"red\");")); - CallerCode = "SDNode *Result = Emit_" + utostr(EmitFuncNum) +CallerCode; - GeneratedCode.push_back(std::make_pair(3, CallerCode)); - if (GenDebug) { - GeneratedCode.push_back(std::make_pair(0, "if(Result) {")); - GeneratedCode.push_back(std::make_pair(0, - " CurDAG->setSubgraphColor(Result, \"yellow\");")); - GeneratedCode.push_back(std::make_pair(0, - " CurDAG->setSubgraphColor(Result, \"black\");")); - GeneratedCode.push_back(std::make_pair(0, "}")); - } - GeneratedCode.push_back(std::make_pair(0, "return Result;")); - } - - // Print function. - std::string OpVTStr; - if (OpVT == MVT::iPTR) { - OpVTStr = "_iPTR"; - } else if (OpVT == MVT::iPTRAny) { - OpVTStr = "_iPTRAny"; - } else if (OpVT == MVT::isVoid) { - // Nodes with a void result actually have a first result type of either - // Other (a chain) or Flag. Since there is no one-to-one mapping from - // void to this case, we handle it specially here. - } else { - OpVTStr = "_" + getEnumName(OpVT).substr(5); // Skip 'MVT::' - } - std::map >::iterator OpVTI = - OpcodeVTMap.find(OpName); - if (OpVTI == OpcodeVTMap.end()) { - std::vector VTSet; - VTSet.push_back(OpVTStr); - OpcodeVTMap.insert(std::make_pair(OpName, VTSet)); - } else - OpVTI->second.push_back(OpVTStr); - - // We want to emit all of the matching code now. However, we want to emit - // the matches in order of minimal cost. Sort the patterns so the least - // cost one is at the start. - std::stable_sort(CodeForPatterns.begin(), CodeForPatterns.end(), - PatternSortingPredicate(CGP)); - - // Scan the code to see if all of the patterns are reachable and if it is - // possible that the last one might not match. - bool mightNotMatch = true; - for (unsigned i = 0, e = CodeForPatterns.size(); i != e; ++i) { - CodeList &GeneratedCode = CodeForPatterns[i].second; - mightNotMatch = false; - - for (unsigned j = 0, e = GeneratedCode.size(); j != e; ++j) { - if (GeneratedCode[j].first == 1) { // predicate. - mightNotMatch = true; - break; - } - } - - // If this pattern definitely matches, and if it isn't the last one, the - // patterns after it CANNOT ever match. Error out. - if (mightNotMatch == false && i != CodeForPatterns.size()-1) { - errs() << "Pattern '"; - CodeForPatterns[i].first->getSrcPattern()->print(errs()); - errs() << "' is impossible to select!\n"; - exit(1); - } - } - - // Loop through and reverse all of the CodeList vectors, as we will be - // accessing them from their logical front, but accessing the end of a - // vector is more efficient. - for (unsigned i = 0, e = CodeForPatterns.size(); i != e; ++i) { - CodeList &GeneratedCode = CodeForPatterns[i].second; - std::reverse(GeneratedCode.begin(), GeneratedCode.end()); - } - - // Next, reverse the list of patterns itself for the same reason. - std::reverse(CodeForPatterns.begin(), CodeForPatterns.end()); - - OS << "SDNode *Select_" << getLegalCName(OpName) - << OpVTStr << "(SDNode *N) {\n"; - - // Emit all of the patterns now, grouped together to share code. - EmitPatterns(CodeForPatterns, 2, OS); - - // If the last pattern has predicates (which could fail) emit code to - // catch the case where nothing handles a pattern. - if (mightNotMatch) { - OS << "\n"; - OS << " CannotYetSelect(N);\n"; - OS << " return NULL;\n"; - } - OS << "}\n\n"; - } - } - - OS << "// The main instruction selector code.\n" - << "SDNode *SelectCode(SDNode *N) {\n" - << " MVT::SimpleValueType NVT = N->getValueType(0).getSimpleVT().SimpleTy;\n" - << " switch (N->getOpcode()) {\n" - << " default:\n" - << " assert(!N->isMachineOpcode() && \"Node already selected!\");\n" - << " break;\n" - << " case ISD::EntryToken: // These nodes remain the same.\n" - << " case ISD::BasicBlock:\n" - << " case ISD::Register:\n" - << " case ISD::HANDLENODE:\n" - << " case ISD::TargetConstant:\n" - << " case ISD::TargetConstantFP:\n" - << " case ISD::TargetConstantPool:\n" - << " case ISD::TargetFrameIndex:\n" - << " case ISD::TargetExternalSymbol:\n" - << " case ISD::TargetBlockAddress:\n" - << " case ISD::TargetJumpTable:\n" - << " case ISD::TargetGlobalTLSAddress:\n" - << " case ISD::TargetGlobalAddress:\n" - << " case ISD::TokenFactor:\n" - << " case ISD::CopyFromReg:\n" - << " case ISD::CopyToReg: {\n" - << " return NULL;\n" - << " }\n" - << " case ISD::AssertSext:\n" - << " case ISD::AssertZext: {\n" - << " ReplaceUses(SDValue(N, 0), N->getOperand(0));\n" - << " return NULL;\n" - << " }\n" - << " case ISD::INLINEASM: return Select_INLINEASM(N);\n" - << " case ISD::EH_LABEL: return Select_EH_LABEL(N);\n" - << " case ISD::UNDEF: return Select_UNDEF(N);\n"; - - // Loop over all of the case statements, emiting a call to each method we - // emitted above. - for (std::map >::iterator - PBOI = PatternsByOpcode.begin(), E = PatternsByOpcode.end(); - PBOI != E; ++PBOI) { - const std::string &OpName = PBOI->first; - // Potentially multiple versions of select for this opcode. One for each - // ValueType of the node (or its first true operand if it doesn't produce a - // result. - std::map >::iterator OpVTI = - OpcodeVTMap.find(OpName); - std::vector &OpVTs = OpVTI->second; - OS << " case " << OpName << ": {\n"; - // If we have only one variant and it's the default, elide the - // switch. Marginally faster, and makes MSVC happier. - if (OpVTs.size()==1 && OpVTs[0].empty()) { - OS << " return Select_" << getLegalCName(OpName) << "(N);\n"; - OS << " break;\n"; - OS << " }\n"; - continue; - } - // Keep track of whether we see a pattern that has an iPtr result. - bool HasPtrPattern = false; - bool HasDefaultPattern = false; - - OS << " switch (NVT) {\n"; - for (unsigned i = 0, e = OpVTs.size(); i < e; ++i) { - std::string &VTStr = OpVTs[i]; - if (VTStr.empty()) { - HasDefaultPattern = true; - continue; - } - - // If this is a match on iPTR: don't emit it directly, we need special - // code. - if (VTStr == "_iPTR") { - HasPtrPattern = true; - continue; - } - OS << " case MVT::" << VTStr.substr(1) << ":\n" - << " return Select_" << getLegalCName(OpName) - << VTStr << "(N);\n"; - } - OS << " default:\n"; - - // If there is an iPTR result version of this pattern, emit it here. - if (HasPtrPattern) { - OS << " if (TLI.getPointerTy() == NVT)\n"; - OS << " return Select_" << getLegalCName(OpName) <<"_iPTR(N);\n"; - } - if (HasDefaultPattern) { - OS << " return Select_" << getLegalCName(OpName) << "(N);\n"; - } - OS << " break;\n"; - OS << " }\n"; - OS << " break;\n"; - OS << " }\n"; - } - - OS << " } // end of big switch.\n\n" - << " CannotYetSelect(N);\n" - << " return NULL;\n" - << "}\n\n"; -} - namespace { // PatternSortingPredicate - return true if we prefer to match LHS before RHS. // In particular, we want to match maximal patterns first and lowest cost within // a particular complexity first. -struct PatternSortingPredicate2 { - PatternSortingPredicate2(CodeGenDAGPatterns &cgp) : CGP(cgp) {} +struct PatternSortingPredicate { + PatternSortingPredicate(CodeGenDAGPatterns &cgp) : CGP(cgp) {} CodeGenDAGPatterns &CGP; bool operator()(const PatternToMatch *LHS, @@ -1944,7 +204,6 @@ // FIXME: These are being used by hand written code, gross. EmitPredicateFunctions(OS); -#ifdef ENABLE_NEW_ISEL // Add all the patterns to a temporary list so we can sort them. std::vector Patterns; for (CodeGenDAGPatterns::ptm_iterator I = CGP.ptm_begin(), E = CGP.ptm_end(); @@ -1953,9 +212,8 @@ // We want to process the matches in order of minimal cost. Sort the patterns // so the least cost one is at the start. - // FIXME: Eliminate "PatternSortingPredicate" and rename. std::stable_sort(Patterns.begin(), Patterns.end(), - PatternSortingPredicate2(CGP)); + PatternSortingPredicate(CGP)); // Convert each variant of each pattern into a Matcher. @@ -1977,13 +235,4 @@ //Matcher->dump(); EmitMatcherTable(TheMatcher, CGP, OS); delete TheMatcher; - -#else - EmitNodeTransforms(OS); - - // At this point, we have full information about the 'Patterns' we need to - // parse, both implicitly from instructions as well as from explicit pattern - // definitions. Emit the resultant instruction selector. - EmitInstructionSelector(OS); -#endif } Modified: llvm/trunk/utils/TableGen/DAGISelEmitter.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelEmitter.h?rev=97504&r1=97503&r2=97504&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelEmitter.h (original) +++ llvm/trunk/utils/TableGen/DAGISelEmitter.h Mon Mar 1 15:49:54 2010 @@ -31,24 +31,8 @@ // run - Output the isel, returning true on failure. void run(raw_ostream &OS); - - private: - void EmitNodeTransforms(raw_ostream &OS); void EmitPredicateFunctions(raw_ostream &OS); - - void GenerateCodeForPattern(const PatternToMatch &Pattern, - std::vector > &GeneratedCode, - std::set &GeneratedDecl, - std::vector &TargetOpcodes, - std::vector &TargetVTs, - bool &OutputIsVariadic, - unsigned &NumInputRootOps); - void EmitPatterns(std::vector > > > &Patterns, - unsigned Indent, raw_ostream &OS); - - void EmitInstructionSelector(raw_ostream &OS); }; } // End llvm namespace From evan.cheng at apple.com Mon Mar 1 16:00:11 2010 From: evan.cheng at apple.com (Evan Cheng) Date: Mon, 01 Mar 2010 22:00:11 -0000 Subject: [llvm-commits] [llvm] r97507 - /llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Message-ID: <20100301220011.DE9552A6C135@llvm.org> Author: evancheng Date: Mon Mar 1 16:00:11 2010 New Revision: 97507 URL: http://llvm.org/viewvc/llvm-project?rev=97507&view=rev Log: Remove the optimize for code size limitation on r67917. Optimize 64-bit imul by constants into leas + shl regardless if optimizing for code size. The size saving from using imulq isn't worth it. Also, the lea and shl instructions may expose further optimization. Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=97507&r1=97506&r2=97507&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original) +++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Mon Mar 1 16:00:11 2010 @@ -9233,10 +9233,6 @@ /// LEA + SHL, LEA + LEA. static SDValue PerformMulCombine(SDNode *N, SelectionDAG &DAG, TargetLowering::DAGCombinerInfo &DCI) { - if (DAG.getMachineFunction(). - getFunction()->hasFnAttr(Attribute::OptimizeForSize)) - return SDValue(); - if (DCI.isBeforeLegalize() || DCI.isCalledByLegalizer()) return SDValue(); From sabre at nondot.org Mon Mar 1 16:04:33 2010 From: sabre at nondot.org (Chris Lattner) Date: Mon, 01 Mar 2010 22:04:33 -0000 Subject: [llvm-commits] [llvm] r97508 - /llvm/trunk/utils/TableGen/DAGISelMatcherOpt.cpp Message-ID: <20100301220433.9F9CC2A6C131@llvm.org> Author: lattner Date: Mon Mar 1 16:04:33 2010 New Revision: 97508 URL: http://llvm.org/viewvc/llvm-project?rev=97508&view=rev Log: tolerate factoring the *last* node for CellSPU. Modified: llvm/trunk/utils/TableGen/DAGISelMatcherOpt.cpp Modified: llvm/trunk/utils/TableGen/DAGISelMatcherOpt.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelMatcherOpt.cpp?rev=97508&r1=97507&r2=97508&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelMatcherOpt.cpp (original) +++ llvm/trunk/utils/TableGen/DAGISelMatcherOpt.cpp Mon Mar 1 16:04:33 2010 @@ -351,6 +351,11 @@ return; } + if (NewOptionsToMatch.empty()) { + MatcherPtr.reset(0); + return; + } + // If our factoring failed (didn't achieve anything) see if we can simplify in // other ways. From sabre at nondot.org Mon Mar 1 16:09:11 2010 From: sabre at nondot.org (Chris Lattner) Date: Mon, 01 Mar 2010 22:09:11 -0000 Subject: [llvm-commits] [llvm] r97509 - in /llvm/trunk: test/CodeGen/Alpha/add.ll utils/TableGen/CodeGenDAGPatterns.cpp utils/TableGen/CodeGenDAGPatterns.h utils/TableGen/DAGISelEmitter.cpp utils/TableGen/Record.h Message-ID: <20100301220911.8969B2A6C132@llvm.org> Author: lattner Date: Mon Mar 1 16:09:11 2010 New Revision: 97509 URL: http://llvm.org/viewvc/llvm-project?rev=97509&view=rev Log: Fix PR2590 by making PatternSortingPredicate actually be ordered correctly. Previously it would get in trouble when two patterns were too similar and give them nondet ordering. We force this by using the record ID order as a fallback. The testsuite diff is due to alpha patterns being ordered slightly differently, the change is a semantic noop afaict: < lda $0,-100($16) --- > subq $16,100,$0 Modified: llvm/trunk/test/CodeGen/Alpha/add.ll llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp llvm/trunk/utils/TableGen/CodeGenDAGPatterns.h llvm/trunk/utils/TableGen/DAGISelEmitter.cpp llvm/trunk/utils/TableGen/Record.h Modified: llvm/trunk/test/CodeGen/Alpha/add.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Alpha/add.ll?rev=97509&r1=97508&r2=97509&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/Alpha/add.ll (original) +++ llvm/trunk/test/CodeGen/Alpha/add.ll Mon Mar 1 16:09:11 2010 @@ -4,9 +4,8 @@ ; RUN: grep { addl} %t.s | count 2 ; RUN: grep { addq} %t.s | count 2 ; RUN: grep { subl} %t.s | count 2 -; RUN: grep { subq} %t.s | count 1 +; RUN: grep { subq} %t.s | count 2 ; -; RUN: grep {lda \$0,-100(\$16)} %t.s | count 1 ; RUN: grep {s4addl} %t.s | count 2 ; RUN: grep {s8addl} %t.s | count 2 ; RUN: grep {s4addq} %t.s | count 2 Modified: llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp?rev=97509&r1=97508&r2=97509&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp (original) +++ llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp Mon Mar 1 16:09:11 2010 @@ -2110,7 +2110,8 @@ SrcPattern, TheInst.getResultPattern(), TheInst.getImpResults(), - Instr->getValueAsInt("AddedComplexity"))); + Instr->getValueAsInt("AddedComplexity"), + Instr->getID())); } } @@ -2320,7 +2321,8 @@ PatternToMatch(Patterns[i]->getValueAsListInit("Predicates"), Pattern->getTree(0), Temp.getOnlyTree(), InstImpResults, - Patterns[i]->getValueAsInt("AddedComplexity"))); + Patterns[i]->getValueAsInt("AddedComplexity"), + Patterns[i]->getID())); } } @@ -2614,7 +2616,8 @@ push_back(PatternToMatch(PatternsToMatch[i].getPredicates(), Variant, PatternsToMatch[i].getDstPattern(), PatternsToMatch[i].getDstRegs(), - PatternsToMatch[i].getAddedComplexity())); + PatternsToMatch[i].getAddedComplexity(), + Record::getNewUID())); } DEBUG(errs() << "\n"); Modified: llvm/trunk/utils/TableGen/CodeGenDAGPatterns.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/CodeGenDAGPatterns.h?rev=97509&r1=97508&r2=97509&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/CodeGenDAGPatterns.h (original) +++ llvm/trunk/utils/TableGen/CodeGenDAGPatterns.h Mon Mar 1 16:09:11 2010 @@ -476,15 +476,16 @@ PatternToMatch(ListInit *preds, TreePatternNode *src, TreePatternNode *dst, const std::vector &dstregs, - unsigned complexity): - Predicates(preds), SrcPattern(src), DstPattern(dst), Dstregs(dstregs), - AddedComplexity(complexity) {} + unsigned complexity, unsigned uid) + : Predicates(preds), SrcPattern(src), DstPattern(dst), + Dstregs(dstregs), AddedComplexity(complexity), ID(uid) {} ListInit *Predicates; // Top level predicate conditions to match. TreePatternNode *SrcPattern; // Source pattern to match. TreePatternNode *DstPattern; // Resulting pattern. std::vector Dstregs; // Physical register defs being matched. unsigned AddedComplexity; // Add to matching pattern complexity. + unsigned ID; // Unique ID for the record. ListInit *getPredicates() const { return Predicates; } TreePatternNode *getSrcPattern() const { return SrcPattern; } Modified: llvm/trunk/utils/TableGen/DAGISelEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelEmitter.cpp?rev=97509&r1=97508&r2=97509&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelEmitter.cpp (original) +++ llvm/trunk/utils/TableGen/DAGISelEmitter.cpp Mon Mar 1 16:09:11 2010 @@ -174,8 +174,14 @@ if (LHSCost < RHSCost) return true; if (LHSCost > RHSCost) return false; - return getResultPatternSize(LHS->getDstPattern(), CGP) < - getResultPatternSize(RHS->getDstPattern(), CGP); + unsigned LHSPatSize = getResultPatternSize(LHS->getDstPattern(), CGP); + unsigned RHSPatSize = getResultPatternSize(RHS->getDstPattern(), CGP); + if (LHSPatSize < RHSPatSize) return true; + if (LHSPatSize > RHSPatSize) return false; + + // Sort based on the UID of the pattern, giving us a deterministic ordering. + assert(LHS->ID != RHS->ID); + return LHS->ID < RHS->ID; } }; } Modified: llvm/trunk/utils/TableGen/Record.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/Record.h?rev=97509&r1=97508&r2=97509&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/Record.h (original) +++ llvm/trunk/utils/TableGen/Record.h Mon Mar 1 16:09:11 2010 @@ -1225,6 +1225,10 @@ ID(LastID++), Name(N), Loc(loc) {} ~Record() {} + + static unsigned getNewUID() { return LastID++; } + + unsigned getID() const { return ID; } const std::string &getName() const { return Name; } From sabre at nondot.org Mon Mar 1 16:19:47 2010 From: sabre at nondot.org (Chris Lattner) Date: Mon, 01 Mar 2010 22:19:47 -0000 Subject: [llvm-commits] [llvm] r97510 - /llvm/trunk/utils/TableGen/DAGISelMatcherOpt.cpp Message-ID: <20100301221947.46DBF2A6C12E@llvm.org> Author: lattner Date: Mon Mar 1 16:19:47 2010 New Revision: 97510 URL: http://llvm.org/viewvc/llvm-project?rev=97510&view=rev Log: remove dead code, simplify. Modified: llvm/trunk/utils/TableGen/DAGISelMatcherOpt.cpp Modified: llvm/trunk/utils/TableGen/DAGISelMatcherOpt.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelMatcherOpt.cpp?rev=97510&r1=97509&r2=97510&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelMatcherOpt.cpp (original) +++ llvm/trunk/utils/TableGen/DAGISelMatcherOpt.cpp Mon Mar 1 16:19:47 2010 @@ -392,16 +392,10 @@ } - // Reassemble a new Scope node. - assert(!NewOptionsToMatch.empty() && - "Where'd all our children go? Did we really factor everything??"); - if (NewOptionsToMatch.empty()) - MatcherPtr.reset(0); - else { - Scope->setNumChildren(NewOptionsToMatch.size()); - for (unsigned i = 0, e = NewOptionsToMatch.size(); i != e; ++i) - Scope->resetChild(i, NewOptionsToMatch[i]); - } + // Reassemble the Scope node with the adjusted children. + Scope->setNumChildren(NewOptionsToMatch.size()); + for (unsigned i = 0, e = NewOptionsToMatch.size(); i != e; ++i) + Scope->resetChild(i, NewOptionsToMatch[i]); } Matcher *llvm::OptimizeMatcher(Matcher *TheMatcher, From sabre at nondot.org Mon Mar 1 16:20:05 2010 From: sabre at nondot.org (Chris Lattner) Date: Mon, 01 Mar 2010 22:20:05 -0000 Subject: [llvm-commits] [llvm] r97511 - in /llvm/trunk: include/llvm/CodeGen/SelectionDAG.h lib/CodeGen/SelectionDAG/SelectionDAG.cpp Message-ID: <20100301222005.CD18D2A6C12E@llvm.org> Author: lattner Date: Mon Mar 1 16:20:05 2010 New Revision: 97511 URL: http://llvm.org/viewvc/llvm-project?rev=97511&view=rev Log: remove all but one version of SelectionDAG::MorphNodeTo (the most general) the others are dead. Modified: llvm/trunk/include/llvm/CodeGen/SelectionDAG.h llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Modified: llvm/trunk/include/llvm/CodeGen/SelectionDAG.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/SelectionDAG.h?rev=97511&r1=97510&r2=97511&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/SelectionDAG.h (original) +++ llvm/trunk/include/llvm/CodeGen/SelectionDAG.h Mon Mar 1 16:20:05 2010 @@ -668,27 +668,8 @@ SDNode *SelectNodeTo(SDNode *N, unsigned TargetOpc, SDVTList VTs, const SDValue *Ops, unsigned NumOps); - /// MorphNodeTo - These *mutate* the specified node to have the specified + /// MorphNodeTo - This *mutates* the specified node to have the specified /// return type, opcode, and operands. - SDNode *MorphNodeTo(SDNode *N, unsigned Opc, EVT VT); - SDNode *MorphNodeTo(SDNode *N, unsigned Opc, EVT VT, SDValue Op1); - SDNode *MorphNodeTo(SDNode *N, unsigned Opc, EVT VT, - SDValue Op1, SDValue Op2); - SDNode *MorphNodeTo(SDNode *N, unsigned Opc, EVT VT, - SDValue Op1, SDValue Op2, SDValue Op3); - SDNode *MorphNodeTo(SDNode *N, unsigned Opc, EVT VT, - const SDValue *Ops, unsigned NumOps); - SDNode *MorphNodeTo(SDNode *N, unsigned Opc, EVT VT1, EVT VT2); - SDNode *MorphNodeTo(SDNode *N, unsigned Opc, EVT VT1, - EVT VT2, const SDValue *Ops, unsigned NumOps); - SDNode *MorphNodeTo(SDNode *N, unsigned Opc, EVT VT1, - EVT VT2, EVT VT3, const SDValue *Ops, unsigned NumOps); - SDNode *MorphNodeTo(SDNode *N, unsigned Opc, EVT VT1, - EVT VT2, SDValue Op1); - SDNode *MorphNodeTo(SDNode *N, unsigned Opc, EVT VT1, - EVT VT2, SDValue Op1, SDValue Op2); - SDNode *MorphNodeTo(SDNode *N, unsigned Opc, EVT VT1, - EVT VT2, SDValue Op1, SDValue Op2, SDValue Op3); SDNode *MorphNodeTo(SDNode *N, unsigned Opc, SDVTList VTs, const SDValue *Ops, unsigned NumOps); Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp?rev=97511&r1=97510&r2=97511&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Mon Mar 1 16:20:05 2010 @@ -4579,87 +4579,6 @@ return N; } -SDNode *SelectionDAG::MorphNodeTo(SDNode *N, unsigned Opc, - EVT VT) { - SDVTList VTs = getVTList(VT); - return MorphNodeTo(N, Opc, VTs, 0, 0); -} - -SDNode *SelectionDAG::MorphNodeTo(SDNode *N, unsigned Opc, - EVT VT, SDValue Op1) { - SDVTList VTs = getVTList(VT); - SDValue Ops[] = { Op1 }; - return MorphNodeTo(N, Opc, VTs, Ops, 1); -} - -SDNode *SelectionDAG::MorphNodeTo(SDNode *N, unsigned Opc, - EVT VT, SDValue Op1, - SDValue Op2) { - SDVTList VTs = getVTList(VT); - SDValue Ops[] = { Op1, Op2 }; - return MorphNodeTo(N, Opc, VTs, Ops, 2); -} - -SDNode *SelectionDAG::MorphNodeTo(SDNode *N, unsigned Opc, - EVT VT, SDValue Op1, - SDValue Op2, SDValue Op3) { - SDVTList VTs = getVTList(VT); - SDValue Ops[] = { Op1, Op2, Op3 }; - return MorphNodeTo(N, Opc, VTs, Ops, 3); -} - -SDNode *SelectionDAG::MorphNodeTo(SDNode *N, unsigned Opc, - EVT VT, const SDValue *Ops, - unsigned NumOps) { - SDVTList VTs = getVTList(VT); - return MorphNodeTo(N, Opc, VTs, Ops, NumOps); -} - -SDNode *SelectionDAG::MorphNodeTo(SDNode *N, unsigned Opc, - EVT VT1, EVT VT2, const SDValue *Ops, - unsigned NumOps) { - SDVTList VTs = getVTList(VT1, VT2); - return MorphNodeTo(N, Opc, VTs, Ops, NumOps); -} - -SDNode *SelectionDAG::MorphNodeTo(SDNode *N, unsigned Opc, - EVT VT1, EVT VT2) { - SDVTList VTs = getVTList(VT1, VT2); - return MorphNodeTo(N, Opc, VTs, (SDValue *)0, 0); -} - -SDNode *SelectionDAG::MorphNodeTo(SDNode *N, unsigned Opc, - EVT VT1, EVT VT2, EVT VT3, - const SDValue *Ops, unsigned NumOps) { - SDVTList VTs = getVTList(VT1, VT2, VT3); - return MorphNodeTo(N, Opc, VTs, Ops, NumOps); -} - -SDNode *SelectionDAG::MorphNodeTo(SDNode *N, unsigned Opc, - EVT VT1, EVT VT2, - SDValue Op1) { - SDVTList VTs = getVTList(VT1, VT2); - SDValue Ops[] = { Op1 }; - return MorphNodeTo(N, Opc, VTs, Ops, 1); -} - -SDNode *SelectionDAG::MorphNodeTo(SDNode *N, unsigned Opc, - EVT VT1, EVT VT2, - SDValue Op1, SDValue Op2) { - SDVTList VTs = getVTList(VT1, VT2); - SDValue Ops[] = { Op1, Op2 }; - return MorphNodeTo(N, Opc, VTs, Ops, 2); -} - -SDNode *SelectionDAG::MorphNodeTo(SDNode *N, unsigned Opc, - EVT VT1, EVT VT2, - SDValue Op1, SDValue Op2, - SDValue Op3) { - SDVTList VTs = getVTList(VT1, VT2); - SDValue Ops[] = { Op1, Op2, Op3 }; - return MorphNodeTo(N, Opc, VTs, Ops, 3); -} - /// MorphNodeTo - This *mutates* the specified node to have the specified /// return type, opcode, and operands. /// From evan.cheng at apple.com Mon Mar 1 16:23:12 2010 From: evan.cheng at apple.com (Evan Cheng) Date: Mon, 01 Mar 2010 22:23:12 -0000 Subject: [llvm-commits] [llvm] r97512 - /llvm/trunk/lib/Transforms/Scalar/GVN.cpp Message-ID: <20100301222312.CBB312A6C131@llvm.org> Author: evancheng Date: Mon Mar 1 16:23:12 2010 New Revision: 97512 URL: http://llvm.org/viewvc/llvm-project?rev=97512&view=rev Log: MemoryDepAnalysis is not used if redundant load processing is disabled. Modified: llvm/trunk/lib/Transforms/Scalar/GVN.cpp Modified: llvm/trunk/lib/Transforms/Scalar/GVN.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/GVN.cpp?rev=97512&r1=97511&r2=97512&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/GVN.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/GVN.cpp Mon Mar 1 16:23:12 2010 @@ -2237,7 +2237,7 @@ std::pair Edge = toSplit.pop_back_val(); SplitCriticalEdge(Edge.first, Edge.second, this); } while (!toSplit.empty()); - MD->invalidateCachedPredecessors(); + if (MD) MD->invalidateCachedPredecessors(); return true; } From sabre at nondot.org Mon Mar 1 16:29:19 2010 From: sabre at nondot.org (Chris Lattner) Date: Mon, 01 Mar 2010 22:29:19 -0000 Subject: [llvm-commits] [llvm] r97513 - in /llvm/trunk/utils/TableGen: CodeGenDAGPatterns.cpp DAGISelEmitter.cpp DAGISelMatcherGen.cpp DAGISelMatcherOpt.cpp Message-ID: <20100301222919.4C89B2A6C131@llvm.org> Author: lattner Date: Mon Mar 1 16:29:19 2010 New Revision: 97513 URL: http://llvm.org/viewvc/llvm-project?rev=97513&view=rev Log: resolve a fixme by having the .td file parser reject thigns like (set GPR, somecomplexpattern) if somecomplexpattern doesn't declare what it can match. Modified: llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp llvm/trunk/utils/TableGen/DAGISelEmitter.cpp llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp llvm/trunk/utils/TableGen/DAGISelMatcherOpt.cpp Modified: llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp?rev=97513&r1=97512&r2=97513&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp (original) +++ llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp Mon Mar 1 16:29:19 2010 @@ -1407,7 +1407,6 @@ // CodeGenDAGPatterns implementation // -// FIXME: REMOVE OSTREAM ARGUMENT CodeGenDAGPatterns::CodeGenDAGPatterns(RecordKeeper &R) : Records(R) { Intrinsics = LoadIntrinsics(Records, false); TgtIntrinsics = LoadIntrinsics(Records, true); @@ -2144,6 +2143,15 @@ if (!PTM.getSrcPattern()->canPatternMatch(Reason, *this)) Pattern->error("Pattern can never match: " + Reason); + // If the source pattern's root is a complex pattern, that complex pattern + // must specify the nodes it can potentially match. + if (const ComplexPattern *CP = + PTM.getSrcPattern()->getComplexPatternInfo(*this)) + if (CP->getRootNodes().empty()) + Pattern->error("ComplexPattern at root must specify list of opcodes it" + " could match"); + + // Find all of the named values in the input and output, ensure they have the // same type. std::map SrcNames, DstNames; Modified: llvm/trunk/utils/TableGen/DAGISelEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelEmitter.cpp?rev=97513&r1=97512&r2=97513&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelEmitter.cpp (original) +++ llvm/trunk/utils/TableGen/DAGISelEmitter.cpp Mon Mar 1 16:29:19 2010 @@ -233,7 +233,6 @@ } } - Matcher *TheMatcher = new ScopeMatcher(&PatternMatchers[0], PatternMatchers.size()); Modified: llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp?rev=97513&r1=97512&r2=97513&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp (original) +++ llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp Mon Mar 1 16:29:19 2010 @@ -505,16 +505,11 @@ // check. if (const ComplexPattern *CP = Pattern.getSrcPattern()->getComplexPatternInfo(CGP)) { - const std::vector &OpNodes = CP->getRootNodes(); - if (OpNodes.empty()) { - // FIXME: Empty OpNodes runs on everything, is this even valid? - if (Variant != 0) return true; - } else { - if (Variant >= OpNodes.size()) return true; - - AddMatcher(new CheckOpcodeMatcher(CGP.getSDNodeInfo(OpNodes[Variant]))); - } + assert(!OpNodes.empty() &&"Complex Pattern must specify what it can match"); + if (Variant >= OpNodes.size()) return true; + + AddMatcher(new CheckOpcodeMatcher(CGP.getSDNodeInfo(OpNodes[Variant]))); } else { if (Variant != 0) return true; } Modified: llvm/trunk/utils/TableGen/DAGISelMatcherOpt.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelMatcherOpt.cpp?rev=97513&r1=97512&r2=97513&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelMatcherOpt.cpp (original) +++ llvm/trunk/utils/TableGen/DAGISelMatcherOpt.cpp Mon Mar 1 16:29:19 2010 @@ -140,7 +140,7 @@ return; } - // FIXME2: Kill off all the SelectionDAG::MorphNodeTo and getMachineNode + // FIXME2: Kill off all the SelectionDAG::SelectNodeTo and getMachineNode // variants. } From sabre at nondot.org Mon Mar 1 16:46:42 2010 From: sabre at nondot.org (Chris Lattner) Date: Mon, 01 Mar 2010 22:46:42 -0000 Subject: [llvm-commits] [llvm] r97514 - /llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp Message-ID: <20100301224642.626192A6C12E@llvm.org> Author: lattner Date: Mon Mar 1 16:46:42 2010 New Revision: 97514 URL: http://llvm.org/viewvc/llvm-project?rev=97514&view=rev Log: resolve a fixme and simplify code by moving insertion of the EmitMergeInputChainsMatcher node up into EmitResultCode. This doesn't have much of an effect on the generated code, the X86 table is exactly the same size. Modified: llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp Modified: llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp?rev=97514&r1=97513&r2=97514&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp (original) +++ llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp Mon Mar 1 16:46:42 2010 @@ -80,10 +80,6 @@ /// second is the recorded slot number the input pattern match saved it in. SmallVector, 2> PhysRegInputs; - /// EmittedMergeInputChains - For nodes that match patterns involving - /// chains, is set to true if we emitted the "MergeInputChains" operation. - bool EmittedMergeInputChains; - /// Matcher - This is the top level of the generated matcher, the result. Matcher *TheMatcher; @@ -141,7 +137,7 @@ MatcherGen::MatcherGen(const PatternToMatch &pattern, const CodeGenDAGPatterns &cgp) : Pattern(pattern), CGP(cgp), NextRecordedOperandNo(0), - EmittedMergeInputChains(false), TheMatcher(0), CurPredicate(0) { + TheMatcher(0), CurPredicate(0) { // We need to produce the matcher tree for the patterns source pattern. To do // this we need to match the structure as well as the types. To do the type // matching, we want to figure out the fewest number of type checks we need to @@ -693,19 +689,6 @@ ++ChildNo; } - // Nodes that match patterns with (potentially multiple) chain inputs have to - // merge them together into a token factor. - if (NodeHasChain && !EmittedMergeInputChains) { - // FIXME2: Move this out of emitresult to a top level place. - assert(!MatchedChainNodes.empty() && - "How can this node have chain if no inputs do?"); - // Otherwise, we have to emit an operation to merge the input chains and - // set this as the current input chain. - AddMatcher(new EmitMergeInputChainsMatcher - (MatchedChainNodes.data(), MatchedChainNodes.size())); - EmittedMergeInputChains = true; - } - // If this node has an input flag or explicitly specified input physregs, we // need to add chained and flagged copyfromreg nodes and materialize the flag // input. @@ -819,6 +802,13 @@ } void MatcherGen::EmitResultCode() { + // Patterns that match nodes with (potentially multiple) chain inputs have to + // merge them together into a token factor. This informs the generated code + // what all the chained nodes are. + if (!MatchedChainNodes.empty()) + AddMatcher(new EmitMergeInputChainsMatcher + (MatchedChainNodes.data(), MatchedChainNodes.size())); + // Codegen the root of the result pattern, capturing the resulting values. SmallVector Ops; EmitResultOperand(Pattern.getDstPattern(), Ops); From sabre at nondot.org Mon Mar 1 16:49:06 2010 From: sabre at nondot.org (Chris Lattner) Date: Mon, 01 Mar 2010 22:49:06 -0000 Subject: [llvm-commits] [llvm] r97515 - /llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp Message-ID: <20100301224906.9D7EC2A6C12E@llvm.org> Author: lattner Date: Mon Mar 1 16:49:06 2010 New Revision: 97515 URL: http://llvm.org/viewvc/llvm-project?rev=97515&view=rev Log: resolve some fixmes Modified: llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp Modified: llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp?rev=97515&r1=97514&r2=97515&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp (original) +++ llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp Mon Mar 1 16:49:06 2010 @@ -36,12 +36,9 @@ VT = RC.getValueTypeNum(0); continue; } - - // In multiple RC's. If the Types of the RC's do not agree, return - // MVT::Other. The target is responsible for handling this. - if (VT != RC.getValueTypeNum(0)) - // FIXME2: when does this happen? Abort? - return MVT::Other; + + // If this occurs in multiple register classes, they all have to agree. + assert(VT == RC.getValueTypeNum(0)); } return VT; } @@ -849,10 +846,6 @@ AddMatcher(new MarkFlagResultsMatcher(MatchedFlagResultNodes.data(), MatchedFlagResultNodes.size())); - - // We know that the resulting pattern has exactly one result/ - // FIXME2: why? what about something like (set a,b,c, (complexpat)) - // FIXME2: Implicit results should be pushed here I guess? AddMatcher(new CompleteMatchMatcher(Ops.data(), Ops.size(), Pattern)); } From sabre at nondot.org Mon Mar 1 16:51:11 2010 From: sabre at nondot.org (Chris Lattner) Date: Mon, 01 Mar 2010 22:51:11 -0000 Subject: [llvm-commits] [llvm] r97516 - in /llvm/trunk: lib/Target/X86/X86ISelDAGToDAG.cpp utils/TableGen/DAGISelMatcherEmitter.cpp Message-ID: <20100301225111.E19922A6C12E@llvm.org> Author: lattner Date: Mon Mar 1 16:51:11 2010 New Revision: 97516 URL: http://llvm.org/viewvc/llvm-project?rev=97516&view=rev Log: remove a little hack I did for the old isel, not needed now that it is gone. Modified: llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp Modified: llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp?rev=97516&r1=97515&r2=97516&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp (original) +++ llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp Mon Mar 1 16:51:11 2010 @@ -198,26 +198,12 @@ SDValue &Scale, SDValue &Index, SDValue &Disp); bool SelectTLSADDRAddr(SDNode *Op, SDValue N, SDValue &Base, SDValue &Scale, SDValue &Index, SDValue &Disp); - bool SelectScalarSSELoadXXX(SDNode *Root, SDValue N, + bool SelectScalarSSELoad(SDNode *Root, SDValue N, SDValue &Base, SDValue &Scale, SDValue &Index, SDValue &Disp, SDValue &Segment, SDValue &NodeWithChain); - // FIXME: Remove this hacky wrapper. - bool SelectScalarSSELoad(SDNode *Root, SDValue N, SDValue &Base, - SDValue &Scale, SDValue &Index, - SDValue &Disp, SDValue &Segment, - SDValue &PatternChainResult, - SDValue &PatternInputChain) { - SDValue Tmp; - if (!SelectScalarSSELoadXXX(Root, N, Base, Scale, Index, Disp, Segment, - Tmp)) - return false; - PatternInputChain = Tmp.getOperand(0); - PatternChainResult = Tmp.getValue(1); - return true; - } bool TryFoldLoad(SDNode *P, SDValue N, SDValue &Base, SDValue &Scale, SDValue &Index, SDValue &Disp, @@ -1317,7 +1303,7 @@ /// We also return: /// PatternChainNode: this is the matched node that has a chain input and /// output. -bool X86DAGToDAGISel::SelectScalarSSELoadXXX(SDNode *Root, +bool X86DAGToDAGISel::SelectScalarSSELoad(SDNode *Root, SDValue N, SDValue &Base, SDValue &Scale, SDValue &Index, SDValue &Disp, SDValue &Segment, Modified: llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp?rev=97516&r1=97515&r2=97516&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp (original) +++ llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp Mon Mar 1 16:51:11 2010 @@ -608,10 +608,6 @@ OS << " Result.resize(Result.size()+" << NumOps << ");\n"; OS << " return " << P.getSelectFunc(); - // FIXME: Temporary hack until old isel dies. - if (P.hasProperty(SDNPHasChain)) - OS << "XXX"; - OS << "(Root, N"; for (unsigned i = 0; i != NumOps; ++i) OS << ", Result[Result.size()-" << (NumOps-i) << ']'; From sabre at nondot.org Mon Mar 1 17:08:51 2010 From: sabre at nondot.org (Chris Lattner) Date: Mon, 01 Mar 2010 23:08:51 -0000 Subject: [llvm-commits] [llvm] r97517 - /llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp Message-ID: <20100301230851.640CF2A6C12E@llvm.org> Author: lattner Date: Mon Mar 1 17:08:51 2010 New Revision: 97517 URL: http://llvm.org/viewvc/llvm-project?rev=97517&view=rev Log: fixme resolved. Modified: llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp Modified: llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp?rev=97517&r1=97516&r2=97517&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp (original) +++ llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp Mon Mar 1 17:08:51 2010 @@ -539,9 +539,6 @@ void MatcherTableEmitter::EmitPredicateFunctions(const CodeGenDAGPatterns &CGP, formatted_raw_ostream &OS) { - // FIXME: Don't build off the DAGISelEmitter's predicates, emit them directly - // here into the case stmts. - // Emit pattern predicates. if (!PatternPredicates.empty()) { OS << "bool CheckPatternPredicate(unsigned PredNo) const {\n"; From bob.wilson at apple.com Mon Mar 1 17:37:32 2010 From: bob.wilson at apple.com (Bob Wilson) Date: Mon, 01 Mar 2010 23:37:32 -0000 Subject: [llvm-commits] [llvm] r97521 - /llvm/trunk/lib/Transforms/Scalar/GVN.cpp Message-ID: <20100301233732.95F6C2A6C12E@llvm.org> Author: bwilson Date: Mon Mar 1 17:37:32 2010 New Revision: 97521 URL: http://llvm.org/viewvc/llvm-project?rev=97521&view=rev Log: When GVN needs to split critical edges for load PRE, check all of the predecessors before returning. Otherwise, if multiple predecessor edges need splitting, we only get one of them per iteration. This makes a small but measurable compile time improvement with -enable-full-load-pre. Modified: llvm/trunk/lib/Transforms/Scalar/GVN.cpp Modified: llvm/trunk/lib/Transforms/Scalar/GVN.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/GVN.cpp?rev=97521&r1=97520&r2=97521&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/GVN.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/GVN.cpp Mon Mar 1 17:37:32 2010 @@ -1580,6 +1580,7 @@ for (unsigned i = 0, e = UnavailableBlocks.size(); i != e; ++i) FullyAvailableBlocks[UnavailableBlocks[i]] = false; + bool NeedToSplitEdges = false; for (pred_iterator PI = pred_begin(LoadBB), E = pred_end(LoadBB); PI != E; ++PI) { BasicBlock *Pred = *PI; @@ -1596,9 +1597,11 @@ } unsigned SuccNum = GetSuccessorNumber(Pred, LoadBB); toSplit.push_back(std::make_pair(Pred->getTerminator(), SuccNum)); - return false; + NeedToSplitEdges = true; } } + if (NeedToSplitEdges) + return false; // Decide whether PRE is profitable for this load. unsigned NumUnavailablePreds = PredLoads.size(); From sabre at nondot.org Mon Mar 1 17:40:33 2010 From: sabre at nondot.org (Chris Lattner) Date: Mon, 01 Mar 2010 23:40:33 -0000 Subject: [llvm-commits] [llvm] r97522 - /llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h Message-ID: <20100301234033.A2A0C2A6C12E@llvm.org> Author: lattner Date: Mon Mar 1 17:40:33 2010 New Revision: 97522 URL: http://llvm.org/viewvc/llvm-project?rev=97522&view=rev Log: remove some functions that were only used by the old isel generated code. Modified: llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h Modified: llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h?rev=97522&r1=97521&r2=97522&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h (original) +++ llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h Mon Mar 1 17:40:33 2010 @@ -26,29 +26,6 @@ /// node list. SelectionDAG::allnodes_iterator ISelPosition; -/// ChainNotReachable - Returns true if Chain does not reach Op. -static bool ChainNotReachable(SDNode *Chain, SDNode *Op) { - if (Chain->getOpcode() == ISD::EntryToken) - return true; - if (Chain->getOpcode() == ISD::TokenFactor) - return false; - if (Chain->getNumOperands() > 0) { - SDValue C0 = Chain->getOperand(0); - if (C0.getValueType() == MVT::Other) - return C0.getNode() != Op && ChainNotReachable(C0.getNode(), Op); - } - return true; -} - -/// IsChainCompatible - Returns true if Chain is Op or Chain does not reach Op. -/// This is used to ensure that there are no nodes trapped between Chain, which -/// is the first chain node discovered in a pattern and Op, a later node, that -/// will not be selected into the pattern. -static bool IsChainCompatible(SDNode *Chain, SDNode *Op) { - return Chain == Op || ChainNotReachable(Chain, Op); -} - - /// ISelUpdater - helper class to handle updates of the /// instruciton selection graph. class VISIBILITY_HIDDEN ISelUpdater : public SelectionDAG::DAGUpdateListener { @@ -117,6 +94,7 @@ continue; SDNode *ResNode = Select(Node); + // If node should not be replaced, continue with the next one. if (ResNode == Node) continue; From sabre at nondot.org Mon Mar 1 18:00:04 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 02 Mar 2010 00:00:04 -0000 Subject: [llvm-commits] [llvm] r97525 - /llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Message-ID: <20100302000004.200642A6C12D@llvm.org> Author: lattner Date: Mon Mar 1 18:00:03 2010 New Revision: 97525 URL: http://llvm.org/viewvc/llvm-project?rev=97525&view=rev Log: refactor some code out of OPC_EmitMergeInputChains into a new helper function. Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp?rev=97525&r1=97524&r2=97525&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Mon Mar 1 18:00:03 2010 @@ -1574,7 +1574,34 @@ DEBUG(errs() << "ISEL: Match complete!\n"); } - +/// HandleMergeInputChains - This implements the OPC_EmitMergeInputChains +/// operation for when the pattern matched multiple nodes with chains. +static SDValue +HandleMergeInputChains(const SmallVectorImpl &ChainNodesMatched, + SelectionDAG *CurDAG) { + assert(ChainNodesMatched.size() > 1 && + "Should only happen for multi chain node case"); + + // Walk all the chained nodes, adding the input chains if they are not in + // ChainedNodes (and this, not in the matched pattern). This is an N^2 + // algorithm, but # chains is usually 2 here, at most 3 for MSP430. + SmallVector InputChains; + for (unsigned i = 0, e = ChainNodesMatched.size(); i != e; ++i) { + SDValue InChain = ChainNodesMatched[i]->getOperand(0); + assert(InChain.getValueType() == MVT::Other && "Not a chain"); + bool Invalid = false; + for (unsigned j = 0; j != e; ++j) + Invalid |= ChainNodesMatched[j] == InChain.getNode(); + if (!Invalid) + InputChains.push_back(InChain); + } + + SDValue Res; + if (InputChains.size() == 1) + return InputChains[0]; + return CurDAG->getNode(ISD::TokenFactor, ChainNodesMatched[0]->getDebugLoc(), + MVT::Other, &InputChains[0], InputChains.size()); +} struct MatchScope { /// FailIndex - If this match fails, this is the index to continue with. @@ -2026,28 +2053,17 @@ break; } } + + // If the inner loop broke out, the match fails. + if (ChainNodesMatched.empty()) + break; + + // Merge the input chains if they are not intra-pattern references. + InputChain = HandleMergeInputChains(ChainNodesMatched, CurDAG); + + if (InputChain.getNode() == 0) + break; // Failed to merge. - // Walk all the chained nodes, adding the input chains if they are not in - // ChainedNodes (and this, not in the matched pattern). This is an N^2 - // algorithm, but # chains is usually 2 here, at most 3 for MSP430. - SmallVector InputChains; - for (unsigned i = 0, e = ChainNodesMatched.size(); i != e; ++i) { - SDValue InChain = ChainNodesMatched[i]->getOperand(0); - assert(InChain.getValueType() == MVT::Other && "Not a chain"); - bool Invalid = false; - for (unsigned j = 0; j != e; ++j) - Invalid |= ChainNodesMatched[j] == InChain.getNode(); - if (!Invalid) - InputChains.push_back(InChain); - } - - SDValue Res; - if (InputChains.size() == 1) - InputChain = InputChains[0]; - else - InputChain = CurDAG->getNode(ISD::TokenFactor, - NodeToMatch->getDebugLoc(), MVT::Other, - &InputChains[0], InputChains.size()); continue; } From bob.wilson at apple.com Mon Mar 1 18:09:30 2010 From: bob.wilson at apple.com (Bob Wilson) Date: Tue, 02 Mar 2010 00:09:30 -0000 Subject: [llvm-commits] [llvm] r97526 - /llvm/trunk/lib/Transforms/Scalar/GVN.cpp Message-ID: <20100302000930.1BBA92A6C12D@llvm.org> Author: bwilson Date: Mon Mar 1 18:09:29 2010 New Revision: 97526 URL: http://llvm.org/viewvc/llvm-project?rev=97526&view=rev Log: Don't attempt load PRE when there is no real redundancy (i.e., the load is in a loop and is itself the only dependency). Modified: llvm/trunk/lib/Transforms/Scalar/GVN.cpp Modified: llvm/trunk/lib/Transforms/Scalar/GVN.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/GVN.cpp?rev=97526&r1=97525&r2=97526&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/GVN.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/GVN.cpp Mon Mar 1 18:09:29 2010 @@ -1542,11 +1542,13 @@ // at least one of the values is LI. Since this means that we won't be able // to eliminate LI even if we insert uses in the other predecessors, we will // end up increasing code size. Reject this by scanning for LI. - if (!EnableFullLoadPRE) { - for (unsigned i = 0, e = ValuesPerBlock.size(); i != e; ++i) - if (ValuesPerBlock[i].isSimpleValue() && - ValuesPerBlock[i].getSimpleValue() == LI) + for (unsigned i = 0, e = ValuesPerBlock.size(); i != e; ++i) { + if (ValuesPerBlock[i].isSimpleValue() && + ValuesPerBlock[i].getSimpleValue() == LI) { + // Skip cases where LI is the only definition, even for EnableFullLoadPRE. + if (!EnableFullLoadPRE || e == 1) return false; + } } // FIXME: It is extremely unclear what this loop is doing, other than From sabre at nondot.org Mon Mar 1 18:13:03 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 02 Mar 2010 00:13:03 -0000 Subject: [llvm-commits] [llvm] r97527 - /llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp Message-ID: <20100302001303.E72E12A6C12D@llvm.org> Author: lattner Date: Mon Mar 1 18:13:03 2010 New Revision: 97527 URL: http://llvm.org/viewvc/llvm-project?rev=97527&view=rev Log: add some missing \n's Modified: llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp Modified: llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp?rev=97527&r1=97526&r2=97527&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp (original) +++ llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp Mon Mar 1 18:13:03 2010 @@ -329,9 +329,12 @@ << getEnumName(cast(N)->getType()) << ",\n"; return 2; - case Matcher::CheckInteger: + case Matcher::CheckInteger: { OS << "OPC_CheckInteger, "; - return 1+EmitVBRValue(cast(N)->getValue(), OS); + unsigned Bytes=1+EmitVBRValue(cast(N)->getValue(), OS); + OS << '\n'; + return Bytes; + } case Matcher::CheckCondCode: OS << "OPC_CheckCondCode, ISD::" << cast(N)->getCondCodeName() << ",\n"; @@ -356,13 +359,19 @@ return 2; } - case Matcher::CheckAndImm: + case Matcher::CheckAndImm: { OS << "OPC_CheckAndImm, "; - return 1+EmitVBRValue(cast(N)->getValue(), OS); + unsigned Bytes=1+EmitVBRValue(cast(N)->getValue(), OS); + OS << '\n'; + return Bytes; + } - case Matcher::CheckOrImm: + case Matcher::CheckOrImm: { OS << "OPC_CheckOrImm, "; - return 1+EmitVBRValue(cast(N)->getValue(), OS); + unsigned Bytes = 1+EmitVBRValue(cast(N)->getValue(), OS); + OS << '\n'; + return Bytes; + } case Matcher::CheckFoldableChainNode: OS << "OPC_CheckFoldableChainNode,\n"; @@ -376,7 +385,9 @@ int64_t Val = cast(N)->getValue(); OS << "OPC_EmitInteger, " << getEnumName(cast(N)->getVT()) << ", "; - return 2+EmitVBRValue(Val, OS); + unsigned Bytes = 2+EmitVBRValue(Val, OS); + OS << '\n'; + return Bytes; } case Matcher::EmitStringInteger: { const std::string &Val = cast(N)->getValue(); @@ -456,11 +467,8 @@ OS << "/*#Ops*/"; OS << ", "; unsigned NumOperandBytes = 0; - for (unsigned i = 0, e = EN->getNumOperands(); i != e; ++i) { - // We emit the operand numbers in VBR encoded format, in case the number - // is too large to represent with a byte. + for (unsigned i = 0, e = EN->getNumOperands(); i != e; ++i) NumOperandBytes += EmitVBRValue(EN->getOperand(i), OS); - } if (!OmitComments) { // Print the result #'s for EmitNode. From sabre at nondot.org Mon Mar 1 18:40:26 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 02 Mar 2010 00:40:26 -0000 Subject: [llvm-commits] [llvm] r97529 - /llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Message-ID: <20100302004026.60E882A6C12C@llvm.org> Author: lattner Date: Mon Mar 1 18:40:26 2010 New Revision: 97529 URL: http://llvm.org/viewvc/llvm-project?rev=97529&view=rev Log: remove dead code. Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp?rev=97529&r1=97528&r2=97529&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Mon Mar 1 18:40:26 2010 @@ -1496,37 +1496,6 @@ return Val; } -/// ISelUpdater - helper class to handle updates of the -/// instruciton selection graph. -namespace { -class ISelUpdater : public SelectionDAG::DAGUpdateListener { - SelectionDAG::allnodes_iterator &ISelPosition; -public: - explicit ISelUpdater(SelectionDAG::allnodes_iterator &isp) - : ISelPosition(isp) {} - - /// NodeDeleted - Handle nodes deleted from the graph. If the - /// node being deleted is the current ISelPosition node, update - /// ISelPosition. - /// - virtual void NodeDeleted(SDNode *N, SDNode *E) { - if (ISelPosition == SelectionDAG::allnodes_iterator(N)) - ++ISelPosition; - } - - /// NodeUpdated - Ignore updates for now. - virtual void NodeUpdated(SDNode *N) {} -}; -} - -#if 0 -/// ReplaceUses - replace all uses of the old node F with the use -/// of the new node T. -static void ReplaceUses(SDValue F, SDValue T) { - ISelUpdater ISU(ISelPosition); - CurDAG->ReplaceAllUsesOfValueWith(F, T, &ISU); -} -#endif /// UpdateChainsAndFlags - When a match is complete, this method updates uses of /// interior flag and chain results to use the new flag and chain results. From gohman at apple.com Mon Mar 1 19:11:08 2010 From: gohman at apple.com (Dan Gohman) Date: Tue, 02 Mar 2010 01:11:08 -0000 Subject: [llvm-commits] [llvm] r97531 - in /llvm/trunk: docs/ docs/tutorial/ lib/Target/PowerPC/ lib/Target/X86/ lib/Transforms/InstCombine/ test/ExecutionEngine/ test/Transforms/InstCombine/ test/Transforms/SimplifyCFG/ Message-ID: <20100302011108.EACBD2A6C12D@llvm.org> Author: djg Date: Mon Mar 1 19:11:08 2010 New Revision: 97531 URL: http://llvm.org/viewvc/llvm-project?rev=97531&view=rev Log: Floating-point add, sub, and mul are now spelled fadd, fsub, and fmul, respectively. Modified: llvm/trunk/docs/CodeGenerator.html llvm/trunk/docs/tutorial/LangImpl3.html llvm/trunk/docs/tutorial/LangImpl4.html llvm/trunk/docs/tutorial/LangImpl5.html llvm/trunk/docs/tutorial/LangImpl7.html llvm/trunk/docs/tutorial/OCamlLangImpl3.html llvm/trunk/docs/tutorial/OCamlLangImpl4.html llvm/trunk/docs/tutorial/OCamlLangImpl5.html llvm/trunk/docs/tutorial/OCamlLangImpl7.html llvm/trunk/lib/Target/PowerPC/README.txt llvm/trunk/lib/Target/X86/README-SSE.txt llvm/trunk/lib/Transforms/InstCombine/InstCombineAddSub.cpp llvm/trunk/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp llvm/trunk/test/ExecutionEngine/2010-01-15-UndefValue.ll llvm/trunk/test/Transforms/InstCombine/multi-use-or.ll llvm/trunk/test/Transforms/InstCombine/vec_narrow.ll llvm/trunk/test/Transforms/SimplifyCFG/2009-06-15-InvokeCrash.ll Modified: llvm/trunk/docs/CodeGenerator.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/CodeGenerator.html?rev=97531&r1=97530&r2=97531&view=diff ============================================================================== --- llvm/trunk/docs/CodeGenerator.html (original) +++ llvm/trunk/docs/CodeGenerator.html Mon Mar 1 19:11:08 2010 @@ -1041,9 +1041,9 @@
    -%t1 = add float %W, %X
    -%t2 = mul float %t1, %Y
    -%t3 = add float %t2, %Z
    +%t1 = fadd float %W, %X
    +%t2 = fmul float %t1, %Y
    +%t3 = fadd float %t2, %Z
     
    Modified: llvm/trunk/docs/tutorial/LangImpl3.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/tutorial/LangImpl3.html?rev=97531&r1=97530&r2=97531&view=diff ============================================================================== --- llvm/trunk/docs/tutorial/LangImpl3.html (original) +++ llvm/trunk/docs/tutorial/LangImpl3.html Mon Mar 1 19:11:08 2010 @@ -554,12 +554,12 @@ Read function definition: define double @foo(double %a, double %b) { entry: - %multmp = mul double %a, %a - %multmp1 = mul double 2.000000e+00, %a - %multmp2 = mul double %multmp1, %b - %addtmp = add double %multmp, %multmp2 - %multmp3 = mul double %b, %b - %addtmp4 = add double %addtmp, %multmp3 + %multmp = fmul double %a, %a + %multmp1 = fmul double 2.000000e+00, %a + %multmp2 = fmul double %multmp1, %b + %addtmp = fadd double %multmp, %multmp2 + %multmp3 = fmul double %b, %b + %addtmp4 = fadd double %addtmp, %multmp3 ret double %addtmp4 } @@ -576,7 +576,7 @@ entry: %calltmp = call double @foo( double %a, double 4.000000e+00 ) %calltmp1 = call double @bar( double 3.133700e+04 ) - %addtmp = add double %calltmp, %calltmp1 + %addtmp = fadd double %calltmp, %calltmp1 ret double %addtmp } @@ -612,18 +612,18 @@ define double @""() { entry: - %addtmp = add double 4.000000e+00, 5.000000e+00 + %addtmp = fadd double 4.000000e+00, 5.000000e+00 ret double %addtmp } define double @foo(double %a, double %b) { entry: - %multmp = mul double %a, %a - %multmp1 = mul double 2.000000e+00, %a - %multmp2 = mul double %multmp1, %b - %addtmp = add double %multmp, %multmp2 - %multmp3 = mul double %b, %b - %addtmp4 = add double %addtmp, %multmp3 + %multmp = fmul double %a, %a + %multmp1 = fmul double 2.000000e+00, %a + %multmp2 = fmul double %multmp1, %b + %addtmp = fadd double %multmp, %multmp2 + %multmp3 = fmul double %b, %b + %addtmp4 = fadd double %addtmp, %multmp3 ret double %addtmp4 } @@ -631,7 +631,7 @@ entry: %calltmp = call double @foo( double %a, double 4.000000e+00 ) %calltmp1 = call double @bar( double 3.133700e+04 ) - %addtmp = add double %calltmp, %calltmp1 + %addtmp = fadd double %calltmp, %calltmp1 ret double %addtmp } Modified: llvm/trunk/docs/tutorial/LangImpl4.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/tutorial/LangImpl4.html?rev=97531&r1=97530&r2=97531&view=diff ============================================================================== --- llvm/trunk/docs/tutorial/LangImpl4.html (original) +++ llvm/trunk/docs/tutorial/LangImpl4.html Mon Mar 1 19:11:08 2010 @@ -65,7 +65,7 @@ Read function definition: define double @test(double %x) { entry: - %addtmp = add double 3.000000e+00, %x + %addtmp = fadd double 3.000000e+00, %x ret double %addtmp } @@ -80,8 +80,8 @@ Read function definition: define double @test(double %x) { entry: - %addtmp = add double 2.000000e+00, 1.000000e+00 - %addtmp1 = add double %addtmp, %x + %addtmp = fadd double 2.000000e+00, 1.000000e+00 + %addtmp1 = fadd double %addtmp, %x ret double %addtmp1 } @@ -113,9 +113,9 @@ ready> Read function definition: define double @test(double %x) { entry: - %addtmp = add double 3.000000e+00, %x - %addtmp1 = add double %x, 3.000000e+00 - %multmp = mul double %addtmp, %addtmp1 + %addtmp = fadd double 3.000000e+00, %x + %addtmp1 = fadd double %x, 3.000000e+00 + %multmp = fmul double %addtmp, %addtmp1 ret double %multmp } @@ -240,8 +240,8 @@ ready> Read function definition: define double @test(double %x) { entry: - %addtmp = add double %x, 3.000000e+00 - %multmp = mul double %addtmp, %addtmp + %addtmp = fadd double %x, 3.000000e+00 + %multmp = fmul double %addtmp, %addtmp ret double %multmp } @@ -363,8 +363,8 @@ Read function definition: define double @testfunc(double %x, double %y) { entry: - %multmp = mul double %y, 2.000000e+00 - %addtmp = add double %multmp, %x + %multmp = fmul double %y, 2.000000e+00 + %addtmp = fadd double %multmp, %x ret double %addtmp } @@ -411,10 +411,10 @@ define double @foo(double %x) { entry: %calltmp = call double @sin( double %x ) - %multmp = mul double %calltmp, %calltmp + %multmp = fmul double %calltmp, %calltmp %calltmp2 = call double @cos( double %x ) - %multmp4 = mul double %calltmp2, %calltmp2 - %addtmp = add double %multmp, %multmp4 + %multmp4 = fmul double %calltmp2, %calltmp2 + %addtmp = fadd double %multmp, %multmp4 ret double %addtmp } Modified: llvm/trunk/docs/tutorial/LangImpl5.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/tutorial/LangImpl5.html?rev=97531&r1=97530&r2=97531&view=diff ============================================================================== --- llvm/trunk/docs/tutorial/LangImpl5.html (original) +++ llvm/trunk/docs/tutorial/LangImpl5.html Mon Mar 1 19:11:08 2010 @@ -678,7 +678,7 @@ ; body %calltmp = call double @putchard( double 4.200000e+01 ) ; increment - %nextvar = add double %i, 1.000000e+00 + %nextvar = fadd double %i, 1.000000e+00 ; termination test %cmptmp = fcmp ult double %i, %n Modified: llvm/trunk/docs/tutorial/LangImpl7.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/tutorial/LangImpl7.html?rev=97531&r1=97530&r2=97531&view=diff ============================================================================== --- llvm/trunk/docs/tutorial/LangImpl7.html (original) +++ llvm/trunk/docs/tutorial/LangImpl7.html Mon Mar 1 19:11:08 2010 @@ -557,12 +557,12 @@ else: ; preds = %entry %x3 = load double* %x1 - %subtmp = sub double %x3, 1.000000e+00 + %subtmp = fsub double %x3, 1.000000e+00 %calltmp = call double @fib( double %subtmp ) %x4 = load double* %x1 - %subtmp5 = sub double %x4, 2.000000e+00 + %subtmp5 = fsub double %x4, 2.000000e+00 %calltmp6 = call double @fib( double %subtmp5 ) - %addtmp = add double %calltmp, %calltmp6 + %addtmp = fadd double %calltmp, %calltmp6 br label %ifcont ifcont: ; preds = %else, %then @@ -595,11 +595,11 @@ br label %ifcont else: - %subtmp = sub double %x, 1.000000e+00 + %subtmp = fsub double %x, 1.000000e+00 %calltmp = call double @fib( double %subtmp ) - %subtmp5 = sub double %x, 2.000000e+00 + %subtmp5 = fsub double %x, 2.000000e+00 %calltmp6 = call double @fib( double %subtmp5 ) - %addtmp = add double %calltmp, %calltmp6 + %addtmp = fadd double %calltmp, %calltmp6 br label %ifcont ifcont: ; preds = %else, %then @@ -625,11 +625,11 @@ br i1 %ifcond, label %else, label %ifcont else: - %subtmp = sub double %x, 1.000000e+00 + %subtmp = fsub double %x, 1.000000e+00 %calltmp = call double @fib( double %subtmp ) - %subtmp5 = sub double %x, 2.000000e+00 + %subtmp5 = fsub double %x, 2.000000e+00 %calltmp6 = call double @fib( double %subtmp5 ) - %addtmp = add double %calltmp, %calltmp6 + %addtmp = fadd double %calltmp, %calltmp6 ret double %addtmp ifcont: Modified: llvm/trunk/docs/tutorial/OCamlLangImpl3.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/tutorial/OCamlLangImpl3.html?rev=97531&r1=97530&r2=97531&view=diff ============================================================================== --- llvm/trunk/docs/tutorial/OCamlLangImpl3.html (original) +++ llvm/trunk/docs/tutorial/OCamlLangImpl3.html Mon Mar 1 19:11:08 2010 @@ -484,7 +484,7 @@ Read top-level expression: define double @""() { entry: - %addtmp = add double 4.000000e+00, 5.000000e+00 + %addtmp = fadd double 4.000000e+00, 5.000000e+00 ret double %addtmp } @@ -503,12 +503,12 @@ Read function definition: define double @foo(double %a, double %b) { entry: - %multmp = mul double %a, %a - %multmp1 = mul double 2.000000e+00, %a - %multmp2 = mul double %multmp1, %b - %addtmp = add double %multmp, %multmp2 - %multmp3 = mul double %b, %b - %addtmp4 = add double %addtmp, %multmp3 + %multmp = fmul double %a, %a + %multmp1 = fmul double 2.000000e+00, %a + %multmp2 = fmul double %multmp1, %b + %addtmp = fadd double %multmp, %multmp2 + %multmp3 = fmul double %b, %b + %addtmp4 = fadd double %addtmp, %multmp3 ret double %addtmp4 } @@ -525,7 +525,7 @@ entry: %calltmp = call double @foo( double %a, double 4.000000e+00 ) %calltmp1 = call double @bar( double 3.133700e+04 ) - %addtmp = add double %calltmp, %calltmp1 + %addtmp = fadd double %calltmp, %calltmp1 ret double %addtmp } @@ -561,18 +561,18 @@ define double @""() { entry: - %addtmp = add double 4.000000e+00, 5.000000e+00 + %addtmp = fadd double 4.000000e+00, 5.000000e+00 ret double %addtmp } define double @foo(double %a, double %b) { entry: - %multmp = mul double %a, %a - %multmp1 = mul double 2.000000e+00, %a - %multmp2 = mul double %multmp1, %b - %addtmp = add double %multmp, %multmp2 - %multmp3 = mul double %b, %b - %addtmp4 = add double %addtmp, %multmp3 + %multmp = fmul double %a, %a + %multmp1 = fmul double 2.000000e+00, %a + %multmp2 = fmul double %multmp1, %b + %addtmp = fadd double %multmp, %multmp2 + %multmp3 = fmul double %b, %b + %addtmp4 = fadd double %addtmp, %multmp3 ret double %addtmp4 } @@ -580,7 +580,7 @@ entry: %calltmp = call double @foo( double %a, double 4.000000e+00 ) %calltmp1 = call double @bar( double 3.133700e+04 ) - %addtmp = add double %calltmp, %calltmp1 + %addtmp = fadd double %calltmp, %calltmp1 ret double %addtmp } Modified: llvm/trunk/docs/tutorial/OCamlLangImpl4.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/tutorial/OCamlLangImpl4.html?rev=97531&r1=97530&r2=97531&view=diff ============================================================================== --- llvm/trunk/docs/tutorial/OCamlLangImpl4.html (original) +++ llvm/trunk/docs/tutorial/OCamlLangImpl4.html Mon Mar 1 19:11:08 2010 @@ -72,8 +72,8 @@ Read function definition: define double @test(double %x) { entry: - %addtmp = add double 1.000000e+00, 2.000000e+00 - %addtmp1 = add double %addtmp, %x + %addtmp = fadd double 1.000000e+00, 2.000000e+00 + %addtmp1 = fadd double %addtmp, %x ret double %addtmp1 } @@ -104,7 +104,7 @@ Read function definition: define double @test(double %x) { entry: - %addtmp = add double 3.000000e+00, %x + %addtmp = fadd double 3.000000e+00, %x ret double %addtmp } @@ -127,9 +127,9 @@ ready> Read function definition: define double @test(double %x) { entry: - %addtmp = add double 3.000000e+00, %x - %addtmp1 = add double %x, 3.000000e+00 - %multmp = mul double %addtmp, %addtmp1 + %addtmp = fadd double 3.000000e+00, %x + %addtmp1 = fadd double %x, 3.000000e+00 + %multmp = fmul double %addtmp, %addtmp1 ret double %multmp } @@ -267,8 +267,8 @@ ready> Read function definition: define double @test(double %x) { entry: - %addtmp = add double %x, 3.000000e+00 - %multmp = mul double %addtmp, %addtmp + %addtmp = fadd double %x, 3.000000e+00 + %multmp = fmul double %addtmp, %addtmp ret double %multmp } @@ -388,8 +388,8 @@ Read function definition: define double @testfunc(double %x, double %y) { entry: - %multmp = mul double %y, 2.000000e+00 - %addtmp = add double %multmp, %x + %multmp = fmul double %y, 2.000000e+00 + %addtmp = fadd double %multmp, %x ret double %addtmp } @@ -436,10 +436,10 @@ define double @foo(double %x) { entry: %calltmp = call double @sin( double %x ) - %multmp = mul double %calltmp, %calltmp + %multmp = fmul double %calltmp, %calltmp %calltmp2 = call double @cos( double %x ) - %multmp4 = mul double %calltmp2, %calltmp2 - %addtmp = add double %multmp, %multmp4 + %multmp4 = fmul double %calltmp2, %calltmp2 + %addtmp = fadd double %multmp, %multmp4 ret double %addtmp } Modified: llvm/trunk/docs/tutorial/OCamlLangImpl5.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/tutorial/OCamlLangImpl5.html?rev=97531&r1=97530&r2=97531&view=diff ============================================================================== --- llvm/trunk/docs/tutorial/OCamlLangImpl5.html (original) +++ llvm/trunk/docs/tutorial/OCamlLangImpl5.html Mon Mar 1 19:11:08 2010 @@ -653,7 +653,7 @@ ; body %calltmp = call double @putchard( double 4.200000e+01 ) ; increment - %nextvar = add double %i, 1.000000e+00 + %nextvar = fadd double %i, 1.000000e+00 ; termination test %cmptmp = fcmp ult double %i, %n Modified: llvm/trunk/docs/tutorial/OCamlLangImpl7.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/tutorial/OCamlLangImpl7.html?rev=97531&r1=97530&r2=97531&view=diff ============================================================================== --- llvm/trunk/docs/tutorial/OCamlLangImpl7.html (original) +++ llvm/trunk/docs/tutorial/OCamlLangImpl7.html Mon Mar 1 19:11:08 2010 @@ -581,12 +581,12 @@ else: ; preds = %entry %x3 = load double* %x1 - %subtmp = sub double %x3, 1.000000e+00 + %subtmp = fsub double %x3, 1.000000e+00 %calltmp = call double @fib( double %subtmp ) %x4 = load double* %x1 - %subtmp5 = sub double %x4, 2.000000e+00 + %subtmp5 = fsub double %x4, 2.000000e+00 %calltmp6 = call double @fib( double %subtmp5 ) - %addtmp = add double %calltmp, %calltmp6 + %addtmp = fadd double %calltmp, %calltmp6 br label %ifcont ifcont: ; preds = %else, %then @@ -619,11 +619,11 @@ br label %ifcont else: - %subtmp = sub double %x, 1.000000e+00 + %subtmp = fsub double %x, 1.000000e+00 %calltmp = call double @fib( double %subtmp ) - %subtmp5 = sub double %x, 2.000000e+00 + %subtmp5 = fsub double %x, 2.000000e+00 %calltmp6 = call double @fib( double %subtmp5 ) - %addtmp = add double %calltmp, %calltmp6 + %addtmp = fadd double %calltmp, %calltmp6 br label %ifcont ifcont: ; preds = %else, %then @@ -649,11 +649,11 @@ br i1 %ifcond, label %else, label %ifcont else: - %subtmp = sub double %x, 1.000000e+00 + %subtmp = fsub double %x, 1.000000e+00 %calltmp = call double @fib( double %subtmp ) - %subtmp5 = sub double %x, 2.000000e+00 + %subtmp5 = fsub double %x, 2.000000e+00 %calltmp6 = call double @fib( double %subtmp5 ) - %addtmp = add double %calltmp, %calltmp6 + %addtmp = fadd double %calltmp, %calltmp6 ret double %addtmp ifcont: Modified: llvm/trunk/lib/Target/PowerPC/README.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/README.txt?rev=97531&r1=97530&r2=97531&view=diff ============================================================================== --- llvm/trunk/lib/Target/PowerPC/README.txt (original) +++ llvm/trunk/lib/Target/PowerPC/README.txt Mon Mar 1 19:11:08 2010 @@ -889,7 +889,7 @@ ; recognize a more elaborate tree than a simple SETxx. define double @test_FNEG_sel(double %A, double %B, double %C) { - %D = sub double -0.000000e+00, %A ; [#uses=1] + %D = fsub double -0.000000e+00, %A ; [#uses=1] %Cond = fcmp ugt double %D, -0.000000e+00 ; [#uses=1] %E = select i1 %Cond, double %B, double %C ; [#uses=1] ret double %E Modified: llvm/trunk/lib/Target/X86/README-SSE.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/README-SSE.txt?rev=97531&r1=97530&r2=97531&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/README-SSE.txt (original) +++ llvm/trunk/lib/Target/X86/README-SSE.txt Mon Mar 1 19:11:08 2010 @@ -67,8 +67,8 @@ [ %tmp.34.i18, %no_exit.i7 ] %tmp.0.0.0.i10 = phi double [ 0.000000e+00, %build_tree.exit ], [ %tmp.28.i16, %no_exit.i7 ] - %tmp.28.i16 = add double %tmp.0.0.0.i10, 0.000000e+00 - %tmp.34.i18 = add double %tmp.0.1.0.i9, 0.000000e+00 + %tmp.28.i16 = fadd double %tmp.0.0.0.i10, 0.000000e+00 + %tmp.34.i18 = fadd double %tmp.0.1.0.i9, 0.000000e+00 br i1 false, label %Compute_Tree.exit23, label %no_exit.i7 Compute_Tree.exit23: ; preds = %no_exit.i7 @@ -97,7 +97,7 @@ double %X(double %Y, double %Z, double %A, double %B) { %C = setlt double %A, %B - %z = add double %Z, 0.0 ;; select operand is not a load + %z = fadd double %Z, 0.0 ;; select operand is not a load %D = select bool %C, double %Y, double %z ret double %D } @@ -545,7 +545,7 @@ define i64 @ccosf(float %z.0, float %z.1) nounwind readonly { entry: - %tmp6 = sub float -0.000000e+00, %z.1 ; [#uses=1] + %tmp6 = fsub float -0.000000e+00, %z.1 ; [#uses=1] %tmp20 = tail call i64 @ccoshf( float %tmp6, float %z.0 ) nounwind readonly ret i64 %tmp20 } Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineAddSub.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstCombineAddSub.cpp?rev=97531&r1=97530&r2=97531&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/InstCombine/InstCombineAddSub.cpp (original) +++ llvm/trunk/lib/Transforms/InstCombine/InstCombineAddSub.cpp Mon Mar 1 19:11:08 2010 @@ -373,10 +373,10 @@ if (CFP->getValueAPF().isPosZero() && CannotBeNegativeZero(LHS)) return ReplaceInstUsesWith(I, LHS); - // Check for (add double (sitofp x), y), see if we can merge this into an + // Check for (fadd double (sitofp x), y), see if we can merge this into an // integer add followed by a promotion. if (SIToFPInst *LHSConv = dyn_cast(LHS)) { - // (add double (sitofp x), fpcst) --> (sitofp (add int x, intcst)) + // (fadd double (sitofp x), fpcst) --> (sitofp (add int x, intcst)) // ... if the constant fits in the integer value. This is useful for things // like (double)(x & 1234) + 4.0 -> (double)((X & 1234)+4) which no longer // requires a constant pool load, and generally allows the add to be better @@ -394,7 +394,7 @@ } } - // (add double (sitofp x), (sitofp y)) --> (sitofp (add int x, y)) + // (fadd double (sitofp x), (sitofp y)) --> (sitofp (add int x, y)) if (SIToFPInst *RHSConv = dyn_cast(RHS)) { // Only do this if x/y have the same type, if at last one of them has a // single use (so we don't increase the number of int->fp conversions), Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp?rev=97531&r1=97530&r2=97531&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp (original) +++ llvm/trunk/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp Mon Mar 1 19:11:08 2010 @@ -203,7 +203,7 @@ // "In IEEE floating point, x*1 is not equivalent to x for nans. However, // ANSI says we can drop signals, so we can do this anyway." (from GCC) if (Op1F->isExactlyValue(1.0)) - return ReplaceInstUsesWith(I, Op0); // Eliminate 'mul double %X, 1.0' + return ReplaceInstUsesWith(I, Op0); // Eliminate 'fmul double %X, 1.0' } else if (Op1C->getType()->isVectorTy()) { if (ConstantVector *Op1V = dyn_cast(Op1C)) { // As above, vector X*splat(1.0) -> X in all defined cases. Modified: llvm/trunk/test/ExecutionEngine/2010-01-15-UndefValue.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/ExecutionEngine/2010-01-15-UndefValue.ll?rev=97531&r1=97530&r2=97531&view=diff ============================================================================== --- llvm/trunk/test/ExecutionEngine/2010-01-15-UndefValue.ll (original) +++ llvm/trunk/test/ExecutionEngine/2010-01-15-UndefValue.ll Mon Mar 1 19:11:08 2010 @@ -3,7 +3,7 @@ define i32 @main() { %a = add i32 0, undef - %b = add float 0.0, undef - %c = add double 0.0, undef + %b = fadd float 0.0, undef + %c = fadd double 0.0, undef ret i32 0 } Modified: llvm/trunk/test/Transforms/InstCombine/multi-use-or.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/multi-use-or.ll?rev=97531&r1=97530&r2=97531&view=diff ============================================================================== --- llvm/trunk/test/Transforms/InstCombine/multi-use-or.ll (original) +++ llvm/trunk/test/Transforms/InstCombine/multi-use-or.ll Mon Mar 1 19:11:08 2010 @@ -1,4 +1,4 @@ -; RUN: opt < %s -instcombine -S | grep {add double .sx, .sy} +; RUN: opt < %s -instcombine -S | grep {fadd double .sx, .sy} ; The 'or' has multiple uses, make sure that this doesn't prevent instcombine ; from propagating the extends to the truncs. Modified: llvm/trunk/test/Transforms/InstCombine/vec_narrow.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/vec_narrow.ll?rev=97531&r1=97530&r2=97531&view=diff ============================================================================== --- llvm/trunk/test/Transforms/InstCombine/vec_narrow.ll (original) +++ llvm/trunk/test/Transforms/InstCombine/vec_narrow.ll Mon Mar 1 19:11:08 2010 @@ -1,5 +1,5 @@ ; RUN: opt < %s -instcombine -S | \ -; RUN: grep {add float} +; RUN: grep {fadd float} %V = type <4 x float> Modified: llvm/trunk/test/Transforms/SimplifyCFG/2009-06-15-InvokeCrash.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/SimplifyCFG/2009-06-15-InvokeCrash.ll?rev=97531&r1=97530&r2=97531&view=diff ============================================================================== --- llvm/trunk/test/Transforms/SimplifyCFG/2009-06-15-InvokeCrash.ll (original) +++ llvm/trunk/test/Transforms/SimplifyCFG/2009-06-15-InvokeCrash.ll Mon Mar 1 19:11:08 2010 @@ -144,11 +144,11 @@ store double %tmp64, double* %tmp62 %tmp65 = call double* @_ZN6QSizeF6rwidthEv( %struct.QPointF* %scaledPageSize ) ; [#uses=2] %tmp67 = load double* %tmp65 ; [#uses=1] - %tmp69 = mul double %tmp67, %tmp48 ; [#uses=1] + %tmp69 = fmul double %tmp67, %tmp48 ; [#uses=1] store double %tmp69, double* %tmp65 %tmp71 = call double* @_ZN6QSizeF7rheightEv( %struct.QPointF* %scaledPageSize ) ; [#uses=2] %tmp73 = load double* %tmp71 ; [#uses=1] - %tmp75 = mul double %tmp73, %tmp54 ; [#uses=1] + %tmp75 = fmul double %tmp73, %tmp54 ; [#uses=1] store double %tmp75, double* %tmp71 %tmp78 = getelementptr %struct.QPrinter* %printer, i32 0, i32 0 ; <%struct.QPaintDevice*> [#uses=1] %tmp80 = invoke i32 @_ZNK12QPaintDevice6heightEv( %struct.QPaintDevice* %tmp78 ) @@ -190,7 +190,7 @@ to label %invcont106 unwind label %cleanup329 ; [#uses=1] invcont106: ; preds = %invcont104 %tmp108 = sitofp i32 %tmp107 to double ; [#uses=1] - %tmp109 = mul double %tmp108, 0x3FE93264C993264C ; [#uses=1] + %tmp109 = fmul double %tmp108, 0x3FE93264C993264C ; [#uses=1] %tmp109.upgrd.17 = fptosi double %tmp109 to i32 ; [#uses=3] %tmp.upgrd.18 = call %struct.QTextBlockGroup* @_ZNK13QTextDocument9rootFrameEv( %struct.QAbstractTextDocumentLayout* %tmp95 ) ; <%struct.QTextBlockGroup*> [#uses=1] invoke void @_ZNK10QTextFrame11frameFormatEv( %struct.QTextBlockFormat* sret %fmt, %struct.QTextBlockGroup* %tmp.upgrd.18 ) @@ -237,7 +237,7 @@ store double %tmp137, double* %tmp135 %tmp138 = call double @_ZNK6QRectF6heightEv( %struct.QRectF* %body ) ; [#uses=1] %tmp139 = sitofp i32 %tmp109.upgrd.17 to double ; [#uses=1] - %tmp140 = sub double %tmp138, %tmp139 ; [#uses=1] + %tmp140 = fsub double %tmp138, %tmp139 ; [#uses=1] %tmp142 = invoke %struct.QPaintDevice* @_ZNK8QPainter6deviceEv( %struct.QPainter* %p ) to label %invcont141 unwind label %cleanup192 ; <%struct.QPaintDevice*> [#uses=1] invcont141: ; preds = %invcont124 @@ -251,7 +251,7 @@ to label %invcont148 unwind label %cleanup168 ; [#uses=1] invcont148: ; preds = %invcont146 %tmp149.upgrd.21 = sitofp i32 %tmp149 to double ; [#uses=1] - %tmp150 = add double %tmp140, %tmp149.upgrd.21 ; [#uses=1] + %tmp150 = fadd double %tmp140, %tmp149.upgrd.21 ; [#uses=1] %tmp152 = invoke %struct.QPaintDevice* @_ZNK8QPainter6deviceEv( %struct.QPainter* %p ) to label %invcont151 unwind label %cleanup168 ; <%struct.QPaintDevice*> [#uses=1] invcont151: ; preds = %invcont148 @@ -261,10 +261,10 @@ %tmp155 = mul i32 %tmp154, 5 ; [#uses=1] %tmp156 = sdiv i32 %tmp155, 72 ; [#uses=1] %tmp156.upgrd.22 = sitofp i32 %tmp156 to double ; [#uses=1] - %tmp157 = add double %tmp150, %tmp156.upgrd.22 ; [#uses=1] + %tmp157 = fadd double %tmp150, %tmp156.upgrd.22 ; [#uses=1] %tmp158 = call double @_ZNK6QRectF5widthEv( %struct.QRectF* %body ) ; [#uses=1] %tmp159 = sitofp i32 %tmp109.upgrd.17 to double ; [#uses=1] - %tmp160 = sub double %tmp158, %tmp159 ; [#uses=1] + %tmp160 = fsub double %tmp158, %tmp159 ; [#uses=1] call void @_ZN7QPointFC1Edd( %struct.QPointF* %tmp2, double %tmp160, double %tmp157 ) %tmp161 = getelementptr %struct.QPointF* %pageNumberPos, i32 0, i32 0 ; [#uses=1] %tmp162 = getelementptr %struct.QPointF* %tmp2, i32 0, i32 0 ; [#uses=1] From gohman at apple.com Mon Mar 1 19:08:12 2010 From: gohman at apple.com (Dan Gohman) Date: Tue, 02 Mar 2010 01:08:12 -0000 Subject: [llvm-commits] [llvm] r97530 - /llvm/trunk/docs/LangRef.html Message-ID: <20100302010812.3B6912A6C12C@llvm.org> Author: djg Date: Mon Mar 1 19:08:11 2010 New Revision: 97530 URL: http://llvm.org/viewvc/llvm-project?rev=97530&view=rev Log: PerformTailCallOpt was renamed to GuaranteedTailCallOpt to better reflect its meaning, now that tail call optimizations are done by default in some cases. Modified: llvm/trunk/docs/LangRef.html Modified: llvm/trunk/docs/LangRef.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/LangRef.html?rev=97530&r1=97529&r2=97530&view=diff ============================================================================== --- llvm/trunk/docs/LangRef.html (original) +++ llvm/trunk/docs/LangRef.html Mon Mar 1 19:08:11 2010 @@ -5140,7 +5140,7 @@
  • The call is in tail position (ret immediately follows call and ret uses value of call or is void).
  • Option -tailcallopt is enabled, - or llvm::PerformTailCallOpt is true.
  • + or llvm::GuaranteedTailCallOpt is true.
  • Platform specific constraints are met.
  • From dpatel at apple.com Mon Mar 1 19:26:20 2010 From: dpatel at apple.com (Devang Patel) Date: Tue, 02 Mar 2010 01:26:20 -0000 Subject: [llvm-commits] [llvm] r97533 - /llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Message-ID: <20100302012620.C187B2A6C12C@llvm.org> Author: dpatel Date: Mon Mar 1 19:26:20 2010 New Revision: 97533 URL: http://llvm.org/viewvc/llvm-project?rev=97533&view=rev Log: Constructors and operators for anonymous aggregates does not names. Do not force empty AT_name attribute in such cases. Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=97533&r1=97532&r2=97533&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original) +++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Mon Mar 1 19:26:20 2010 @@ -1177,7 +1177,9 @@ return SPDie; SPDie = new DIE(dwarf::DW_TAG_subprogram); - addString(SPDie, dwarf::DW_AT_name, dwarf::DW_FORM_string, SP.getName()); + // constructors and operators for anonymous aggregates does not names. + if (!SP.getName().empty()) + addString(SPDie, dwarf::DW_AT_name, dwarf::DW_FORM_string, SP.getName()); StringRef LinkageName = SP.getLinkageName(); if (!LinkageName.empty()) From isanbard at gmail.com Mon Mar 1 19:55:18 2010 From: isanbard at gmail.com (Bill Wendling) Date: Tue, 02 Mar 2010 01:55:18 -0000 Subject: [llvm-commits] [llvm] r97536 - in /llvm/trunk: include/llvm/Target/TargetLowering.h lib/CodeGen/SelectionDAG/LegalizeDAG.cpp lib/CodeGen/SelectionDAG/LegalizeTypes.cpp lib/CodeGen/SelectionDAG/SelectionDAG.cpp lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp lib/Target/ARM/ARMISelLowering.cpp lib/Target/CellSPU/SPUISelLowering.cpp lib/Target/PIC16/PIC16ISelLowering.cpp lib/Target/PowerPC/PPCISelLowering.cpp lib/Target/X86/X86ISelLowering.cpp lib/Target/XCore/XCoreISelLowering.cpp Message-ID: <20100302015519.148B82A6C12C@llvm.org> Author: void Date: Mon Mar 1 19:55:18 2010 New Revision: 97536 URL: http://llvm.org/viewvc/llvm-project?rev=97536&view=rev Log: Remove dead parameter passing. Modified: llvm/trunk/include/llvm/Target/TargetLowering.h llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp llvm/trunk/lib/Target/CellSPU/SPUISelLowering.cpp llvm/trunk/lib/Target/PIC16/PIC16ISelLowering.cpp llvm/trunk/lib/Target/PowerPC/PPCISelLowering.cpp llvm/trunk/lib/Target/X86/X86ISelLowering.cpp llvm/trunk/lib/Target/XCore/XCoreISelLowering.cpp Modified: llvm/trunk/include/llvm/Target/TargetLowering.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetLowering.h?rev=97536&r1=97535&r2=97536&view=diff ============================================================================== --- llvm/trunk/include/llvm/Target/TargetLowering.h (original) +++ llvm/trunk/include/llvm/Target/TargetLowering.h Mon Mar 1 19:55:18 2010 @@ -1164,7 +1164,7 @@ bool isVarArg, bool isInreg, unsigned NumFixedArgs, CallingConv::ID CallConv, bool isTailCall, bool isReturnValueUsed, SDValue Callee, ArgListTy &Args, - SelectionDAG &DAG, DebugLoc dl, unsigned Order); + SelectionDAG &DAG, DebugLoc dl); /// LowerCall - This hook must be implemented to lower calls into the /// the specified DAG. The outgoing arguments to the call are described Modified: llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp?rev=97536&r1=97535&r2=97536&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Mon Mar 1 19:55:18 2010 @@ -1899,8 +1899,7 @@ TLI.LowerCallTo(InChain, RetTy, isSigned, !isSigned, false, false, 0, TLI.getLibcallCallingConv(LC), false, /*isReturnValueUsed=*/true, - Callee, Args, DAG, - Node->getDebugLoc(), DAG.GetOrdering(Node)); + Callee, Args, DAG, Node->getDebugLoc()); // Legalize the call sequence, starting with the chain. This will advance // the LastCALLSEQ_END to the legalized version of the CALLSEQ_END node that @@ -2308,7 +2307,7 @@ false, false, false, false, 0, CallingConv::C, false, /*isReturnValueUsed=*/true, DAG.getExternalSymbol("abort", TLI.getPointerTy()), - Args, DAG, dl, DAG.GetOrdering(Node)); + Args, DAG, dl); Results.push_back(CallResult.second); break; } Modified: llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp?rev=97536&r1=97535&r2=97536&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp Mon Mar 1 19:55:18 2010 @@ -1034,8 +1034,7 @@ TLI.LowerCallTo(DAG.getEntryNode(), RetTy, isSigned, !isSigned, false, false, 0, TLI.getLibcallCallingConv(LC), false, /*isReturnValueUsed=*/true, - Callee, Args, DAG, dl, - DAG.GetOrdering(DAG.getEntryNode().getNode())); + Callee, Args, DAG, dl); return CallInfo.first; } Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp?rev=97536&r1=97535&r2=97536&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Mon Mar 1 19:55:18 2010 @@ -3496,7 +3496,7 @@ /*isReturnValueUsed=*/false, getExternalSymbol(TLI.getLibcallName(RTLIB::MEMCPY), TLI.getPointerTy()), - Args, *this, dl, GetOrdering(Chain.getNode())); + Args, *this, dl); return CallResult.second; } @@ -3545,7 +3545,7 @@ /*isReturnValueUsed=*/false, getExternalSymbol(TLI.getLibcallName(RTLIB::MEMMOVE), TLI.getPointerTy()), - Args, *this, dl, GetOrdering(Chain.getNode())); + Args, *this, dl); return CallResult.second; } @@ -3604,7 +3604,7 @@ /*isReturnValueUsed=*/false, getExternalSymbol(TLI.getLibcallName(RTLIB::MEMSET), TLI.getPointerTy()), - Args, *this, dl, GetOrdering(Chain.getNode())); + Args, *this, dl); return CallResult.second; } Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp?rev=97536&r1=97535&r2=97536&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp Mon Mar 1 19:55:18 2010 @@ -155,7 +155,7 @@ /// this value and returns the result as a ValueVTs value. This uses /// Chain/Flag as the input and updates them for the output Chain/Flag. /// If the Flag pointer is NULL, no flag is used. - SDValue getCopyFromRegs(SelectionDAG &DAG, DebugLoc dl, unsigned Order, + SDValue getCopyFromRegs(SelectionDAG &DAG, DebugLoc dl, SDValue &Chain, SDValue *Flag) const; /// getCopyToRegs - Emit a series of CopyToReg nodes that copies the @@ -163,14 +163,14 @@ /// Chain/Flag as the input and updates them for the output Chain/Flag. /// If the Flag pointer is NULL, no flag is used. void getCopyToRegs(SDValue Val, SelectionDAG &DAG, DebugLoc dl, - unsigned Order, SDValue &Chain, SDValue *Flag) const; + SDValue &Chain, SDValue *Flag) const; /// AddInlineAsmOperands - Add this value to the specified inlineasm node /// operand list. This adds the code marker, matching input operand index /// (if applicable), and includes the number of values added into it. void AddInlineAsmOperands(unsigned Code, bool HasMatching, unsigned MatchingIdx, - SelectionDAG &DAG, unsigned Order, + SelectionDAG &DAG, std::vector &Ops) const; }; } @@ -180,7 +180,7 @@ /// larger then ValueVT then AssertOp can be used to specify whether the extra /// bits are known to be zero (ISD::AssertZext) or sign extended from ValueVT /// (ISD::AssertSext). -static SDValue getCopyFromParts(SelectionDAG &DAG, DebugLoc dl, unsigned Order, +static SDValue getCopyFromParts(SelectionDAG &DAG, DebugLoc dl, const SDValue *Parts, unsigned NumParts, EVT PartVT, EVT ValueVT, ISD::NodeType AssertOp = ISD::DELETED_NODE) { @@ -205,9 +205,9 @@ EVT HalfVT = EVT::getIntegerVT(*DAG.getContext(), RoundBits/2); if (RoundParts > 2) { - Lo = getCopyFromParts(DAG, dl, Order, Parts, RoundParts / 2, + Lo = getCopyFromParts(DAG, dl, Parts, RoundParts / 2, PartVT, HalfVT); - Hi = getCopyFromParts(DAG, dl, Order, Parts + RoundParts / 2, + Hi = getCopyFromParts(DAG, dl, Parts + RoundParts / 2, RoundParts / 2, PartVT, HalfVT); } else { Lo = DAG.getNode(ISD::BIT_CONVERT, dl, HalfVT, Parts[0]); @@ -223,7 +223,7 @@ // Assemble the trailing non-power-of-2 part. unsigned OddParts = NumParts - RoundParts; EVT OddVT = EVT::getIntegerVT(*DAG.getContext(), OddParts * PartBits); - Hi = getCopyFromParts(DAG, dl, Order, + Hi = getCopyFromParts(DAG, dl, Parts + RoundParts, OddParts, PartVT, OddVT); // Combine the round and odd parts. @@ -259,7 +259,7 @@ // If the register was not expanded, truncate or copy the value, // as appropriate. for (unsigned i = 0; i != NumParts; ++i) - Ops[i] = getCopyFromParts(DAG, dl, Order, &Parts[i], 1, + Ops[i] = getCopyFromParts(DAG, dl, &Parts[i], 1, PartVT, IntermediateVT); } else if (NumParts > 0) { // If the intermediate type was expanded, build the intermediate @@ -268,7 +268,7 @@ "Must expand into a divisible number of parts!"); unsigned Factor = NumParts / NumIntermediates; for (unsigned i = 0; i != NumIntermediates; ++i) - Ops[i] = getCopyFromParts(DAG, dl, Order, &Parts[i * Factor], Factor, + Ops[i] = getCopyFromParts(DAG, dl, &Parts[i * Factor], Factor, PartVT, IntermediateVT); } @@ -292,7 +292,7 @@ assert(ValueVT.isFloatingPoint() && PartVT.isInteger() && !PartVT.isVector() && "Unexpected split"); EVT IntVT = EVT::getIntegerVT(*DAG.getContext(), ValueVT.getSizeInBits()); - Val = getCopyFromParts(DAG, dl, Order, Parts, NumParts, PartVT, IntVT); + Val = getCopyFromParts(DAG, dl, Parts, NumParts, PartVT, IntVT); } } @@ -349,7 +349,7 @@ /// getCopyToParts - Create a series of nodes that contain the specified value /// split into legal parts. If the parts contain more bits than Val, then, for /// integers, ExtendKind can be used to specify how to generate the extra bits. -static void getCopyToParts(SelectionDAG &DAG, DebugLoc dl, unsigned Order, +static void getCopyToParts(SelectionDAG &DAG, DebugLoc dl, SDValue Val, SDValue *Parts, unsigned NumParts, EVT PartVT, ISD::NodeType ExtendKind = ISD::ANY_EXTEND) { @@ -417,7 +417,7 @@ SDValue OddVal = DAG.getNode(ISD::SRL, dl, ValueVT, Val, DAG.getConstant(RoundBits, TLI.getPointerTy())); - getCopyToParts(DAG, dl, Order, OddVal, Parts + RoundParts, + getCopyToParts(DAG, dl, OddVal, Parts + RoundParts, OddParts, PartVT); if (TLI.isBigEndian()) @@ -514,7 +514,7 @@ // If the register was not expanded, promote or copy the value, // as appropriate. for (unsigned i = 0; i != NumParts; ++i) - getCopyToParts(DAG, dl, Order, Ops[i], &Parts[i], 1, PartVT); + getCopyToParts(DAG, dl, Ops[i], &Parts[i], 1, PartVT); } else if (NumParts > 0) { // If the intermediate type was expanded, split each the value into // legal parts. @@ -522,7 +522,7 @@ "Must expand into a divisible number of parts!"); unsigned Factor = NumParts / NumIntermediates; for (unsigned i = 0; i != NumIntermediates; ++i) - getCopyToParts(DAG, dl, Order, Ops[i], &Parts[i*Factor], Factor, PartVT); + getCopyToParts(DAG, dl, Ops[i], &Parts[i*Factor], Factor, PartVT); } } @@ -747,8 +747,7 @@ RegsForValue RFV(*DAG.getContext(), TLI, InReg, V->getType()); SDValue Chain = DAG.getEntryNode(); - return RFV.getCopyFromRegs(DAG, getCurDebugLoc(), - SDNodeOrder, Chain, NULL); + return RFV.getCopyFromRegs(DAG, getCurDebugLoc(), Chain, NULL); } /// Get the EVTs and ArgFlags collections that represent the legalized return @@ -879,7 +878,7 @@ unsigned NumParts = TLI.getNumRegisters(*DAG.getContext(), VT); EVT PartVT = TLI.getRegisterType(*DAG.getContext(), VT); SmallVector Parts(NumParts); - getCopyToParts(DAG, getCurDebugLoc(), SDNodeOrder, + getCopyToParts(DAG, getCurDebugLoc(), SDValue(RetOp.getNode(), RetOp.getResNo() + j), &Parts[0], NumParts, PartVT, ExtendKind); @@ -2888,7 +2887,7 @@ /// /// where Op is the hexidecimal representation of floating point value. static SDValue -GetSignificand(SelectionDAG &DAG, SDValue Op, DebugLoc dl, unsigned Order) { +GetSignificand(SelectionDAG &DAG, SDValue Op, DebugLoc dl) { SDValue t1 = DAG.getNode(ISD::AND, dl, MVT::i32, Op, DAG.getConstant(0x007fffff, MVT::i32)); SDValue t2 = DAG.getNode(ISD::OR, dl, MVT::i32, t1, @@ -2903,7 +2902,7 @@ /// where Op is the hexidecimal representation of floating point value. static SDValue GetExponent(SelectionDAG &DAG, SDValue Op, const TargetLowering &TLI, - DebugLoc dl, unsigned Order) { + DebugLoc dl) { SDValue t0 = DAG.getNode(ISD::AND, dl, MVT::i32, Op, DAG.getConstant(0x7f800000, MVT::i32)); SDValue t1 = DAG.getNode(ISD::SRL, dl, MVT::i32, t0, @@ -3087,13 +3086,13 @@ SDValue Op1 = DAG.getNode(ISD::BIT_CONVERT, dl, MVT::i32, Op); // Scale the exponent by log(2) [0.69314718f]. - SDValue Exp = GetExponent(DAG, Op1, TLI, dl, SDNodeOrder); + SDValue Exp = GetExponent(DAG, Op1, TLI, dl); SDValue LogOfExponent = DAG.getNode(ISD::FMUL, dl, MVT::f32, Exp, getF32Constant(DAG, 0x3f317218)); // Get the significand and build it into a floating-point number with // exponent of 1. - SDValue X = GetSignificand(DAG, Op1, dl, SDNodeOrder); + SDValue X = GetSignificand(DAG, Op1, dl); if (LimitFloatPrecision <= 6) { // For floating-point precision of 6: @@ -3197,11 +3196,11 @@ SDValue Op1 = DAG.getNode(ISD::BIT_CONVERT, dl, MVT::i32, Op); // Get the exponent. - SDValue LogOfExponent = GetExponent(DAG, Op1, TLI, dl, SDNodeOrder); + SDValue LogOfExponent = GetExponent(DAG, Op1, TLI, dl); // Get the significand and build it into a floating-point number with // exponent of 1. - SDValue X = GetSignificand(DAG, Op1, dl, SDNodeOrder); + SDValue X = GetSignificand(DAG, Op1, dl); // Different possible minimax approximations of significand in // floating-point for various degrees of accuracy over [1,2]. @@ -3306,13 +3305,13 @@ SDValue Op1 = DAG.getNode(ISD::BIT_CONVERT, dl, MVT::i32, Op); // Scale the exponent by log10(2) [0.30102999f]. - SDValue Exp = GetExponent(DAG, Op1, TLI, dl, SDNodeOrder); + SDValue Exp = GetExponent(DAG, Op1, TLI, dl); SDValue LogOfExponent = DAG.getNode(ISD::FMUL, dl, MVT::f32, Exp, getF32Constant(DAG, 0x3e9a209a)); // Get the significand and build it into a floating-point number with // exponent of 1. - SDValue X = GetSignificand(DAG, Op1, dl, SDNodeOrder); + SDValue X = GetSignificand(DAG, Op1, dl); if (LimitFloatPrecision <= 6) { // For floating-point precision of 6: @@ -4394,7 +4393,7 @@ CS.getCallingConv(), isTailCall, !CS.getInstruction()->use_empty(), - Callee, Args, DAG, getCurDebugLoc(), SDNodeOrder); + Callee, Args, DAG, getCurDebugLoc()); assert((isTailCall || Result.second.getNode()) && "Non-null chain expected with non-tail call!"); assert((Result.second.getNode() || !Result.first.getNode()) && @@ -4442,7 +4441,7 @@ unsigned NumRegs = TLI.getNumRegisters(RetTy->getContext(), VT); SDValue ReturnValue = - getCopyFromParts(DAG, getCurDebugLoc(), SDNodeOrder, &Values[CurReg], NumRegs, + getCopyFromParts(DAG, getCurDebugLoc(), &Values[CurReg], NumRegs, RegisterVT, VT, AssertOp); ReturnValues.push_back(ReturnValue); CurReg += NumRegs; @@ -4709,8 +4708,7 @@ /// Chain/Flag as the input and updates them for the output Chain/Flag. /// If the Flag pointer is NULL, no flag is used. SDValue RegsForValue::getCopyFromRegs(SelectionDAG &DAG, DebugLoc dl, - unsigned Order, SDValue &Chain, - SDValue *Flag) const { + SDValue &Chain, SDValue *Flag) const { // Assemble the legal parts into the final values. SmallVector Values(ValueVTs.size()); SmallVector Parts; @@ -4775,7 +4773,7 @@ Parts[i] = P; } - Values[Value] = getCopyFromParts(DAG, dl, Order, Parts.begin(), + Values[Value] = getCopyFromParts(DAG, dl, Parts.begin(), NumRegs, RegisterVT, ValueVT); Part += NumRegs; Parts.clear(); @@ -4791,8 +4789,7 @@ /// Chain/Flag as the input and updates them for the output Chain/Flag. /// If the Flag pointer is NULL, no flag is used. void RegsForValue::getCopyToRegs(SDValue Val, SelectionDAG &DAG, DebugLoc dl, - unsigned Order, SDValue &Chain, - SDValue *Flag) const { + SDValue &Chain, SDValue *Flag) const { // Get the list of the values's legal parts. unsigned NumRegs = Regs.size(); SmallVector Parts(NumRegs); @@ -4801,7 +4798,7 @@ unsigned NumParts = TLI->getNumRegisters(*DAG.getContext(), ValueVT); EVT RegisterVT = RegVTs[Value]; - getCopyToParts(DAG, dl, Order, + getCopyToParts(DAG, dl, Val.getValue(Val.getResNo() + Value), &Parts[Part], NumParts, RegisterVT); Part += NumParts; @@ -4842,7 +4839,7 @@ /// values added into it. void RegsForValue::AddInlineAsmOperands(unsigned Code, bool HasMatching,unsigned MatchingIdx, - SelectionDAG &DAG, unsigned Order, + SelectionDAG &DAG, std::vector &Ops) const { assert(Regs.size() < (1 << 13) && "Too many inline asm outputs!"); unsigned Flag = Code | (Regs.size() << 3); @@ -5432,7 +5429,7 @@ 2 /* REGDEF */ , false, 0, - DAG, SDNodeOrder, + DAG, AsmNodeOperands); break; } @@ -5480,10 +5477,10 @@ // Use the produced MatchedRegs object to MatchedRegs.getCopyToRegs(InOperandVal, DAG, getCurDebugLoc(), - SDNodeOrder, Chain, &Flag); + Chain, &Flag); MatchedRegs.AddInlineAsmOperands(1 /*REGUSE*/, true, OpInfo.getMatchedOperand(), - DAG, SDNodeOrder, AsmNodeOperands); + DAG, AsmNodeOperands); break; } else { assert(((OpFlag & 7) == 4) && "Unknown matching constraint!"); @@ -5544,11 +5541,10 @@ } OpInfo.AssignedRegs.getCopyToRegs(InOperandVal, DAG, getCurDebugLoc(), - SDNodeOrder, Chain, &Flag); + Chain, &Flag); OpInfo.AssignedRegs.AddInlineAsmOperands(1/*REGUSE*/, false, 0, - DAG, SDNodeOrder, - AsmNodeOperands); + DAG, AsmNodeOperands); break; } case InlineAsm::isClobber: { @@ -5556,7 +5552,7 @@ // allocator is aware that the physreg got clobbered. if (!OpInfo.AssignedRegs.Regs.empty()) OpInfo.AssignedRegs.AddInlineAsmOperands(6 /* EARLYCLOBBER REGDEF */, - false, 0, DAG, SDNodeOrder, + false, 0, DAG, AsmNodeOperands); break; } @@ -5576,7 +5572,7 @@ // and set it as the value of the call. if (!RetValRegs.Regs.empty()) { SDValue Val = RetValRegs.getCopyFromRegs(DAG, getCurDebugLoc(), - SDNodeOrder, Chain, &Flag); + Chain, &Flag); // FIXME: Why don't we do this for inline asms with MRVs? if (CS.getType()->isSingleValueType() && CS.getType()->isSized()) { @@ -5616,7 +5612,7 @@ RegsForValue &OutRegs = IndirectStoresToEmit[i].first; Value *Ptr = IndirectStoresToEmit[i].second; SDValue OutVal = OutRegs.getCopyFromRegs(DAG, getCurDebugLoc(), - SDNodeOrder, Chain, &Flag); + Chain, &Flag); StoresToEmit.push_back(std::make_pair(OutVal, Ptr)); } @@ -5681,8 +5677,7 @@ CallingConv::ID CallConv, bool isTailCall, bool isReturnValueUsed, SDValue Callee, - ArgListTy &Args, SelectionDAG &DAG, DebugLoc dl, - unsigned Order) { + ArgListTy &Args, SelectionDAG &DAG, DebugLoc dl) { // Handle all of the outgoing arguments. SmallVector Outs; for (unsigned i = 0, e = Args.size(); i != e; ++i) { @@ -5733,7 +5728,7 @@ else if (Args[i].isZExt) ExtendKind = ISD::ZERO_EXTEND; - getCopyToParts(DAG, dl, Order, Op, &Parts[0], NumParts, + getCopyToParts(DAG, dl, Op, &Parts[0], NumParts, PartVT, ExtendKind); for (unsigned j = 0; j != NumParts; ++j) { @@ -5812,7 +5807,7 @@ EVT RegisterVT = getRegisterType(RetTy->getContext(), VT); unsigned NumRegs = getNumRegisters(RetTy->getContext(), VT); - ReturnValues.push_back(getCopyFromParts(DAG, dl, Order, &InVals[CurReg], + ReturnValues.push_back(getCopyFromParts(DAG, dl, &InVals[CurReg], NumRegs, RegisterVT, VT, AssertOp)); CurReg += NumRegs; @@ -5852,7 +5847,7 @@ RegsForValue RFV(V->getContext(), TLI, Reg, V->getType()); SDValue Chain = DAG.getEntryNode(); - RFV.getCopyToRegs(Op, DAG, getCurDebugLoc(), SDNodeOrder, Chain, 0); + RFV.getCopyToRegs(Op, DAG, getCurDebugLoc(), Chain, 0); PendingExports.push_back(Chain); } @@ -5978,7 +5973,7 @@ EVT VT = ValueVTs[0]; EVT RegVT = TLI.getRegisterType(*CurDAG->getContext(), VT); ISD::NodeType AssertOp = ISD::DELETED_NODE; - SDValue ArgValue = getCopyFromParts(DAG, dl, 0, &InVals[0], 1, + SDValue ArgValue = getCopyFromParts(DAG, dl, &InVals[0], 1, RegVT, VT, AssertOp); MachineFunction& MF = SDB->DAG.getMachineFunction(); @@ -6012,7 +6007,7 @@ else if (F.paramHasAttr(Idx, Attribute::ZExt)) AssertOp = ISD::AssertZext; - ArgValues.push_back(getCopyFromParts(DAG, dl, 0, &InVals[i], + ArgValues.push_back(getCopyFromParts(DAG, dl, &InVals[i], NumParts, PartVT, VT, AssertOp)); } Modified: llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp?rev=97536&r1=97535&r2=97536&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp (original) +++ llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp Mon Mar 1 19:55:18 2010 @@ -1282,8 +1282,7 @@ LowerCallTo(Chain, (const Type *) Type::getInt32Ty(*DAG.getContext()), false, false, false, false, 0, CallingConv::C, false, /*isReturnValueUsed=*/true, - DAG.getExternalSymbol("__tls_get_addr", PtrVT), Args, DAG, dl, - DAG.GetOrdering(Chain.getNode())); + DAG.getExternalSymbol("__tls_get_addr", PtrVT), Args, DAG, dl); return CallResult.first; } Modified: llvm/trunk/lib/Target/CellSPU/SPUISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CellSPU/SPUISelLowering.cpp?rev=97536&r1=97535&r2=97536&view=diff ============================================================================== --- llvm/trunk/lib/Target/CellSPU/SPUISelLowering.cpp (original) +++ llvm/trunk/lib/Target/CellSPU/SPUISelLowering.cpp Mon Mar 1 19:55:18 2010 @@ -118,8 +118,7 @@ TLI.LowerCallTo(InChain, RetTy, isSigned, !isSigned, false, false, 0, TLI.getLibcallCallingConv(LC), false, /*isReturnValueUsed=*/true, - Callee, Args, DAG, Op.getDebugLoc(), - DAG.GetOrdering(InChain.getNode())); + Callee, Args, DAG, Op.getDebugLoc()); return CallInfo.first; } Modified: llvm/trunk/lib/Target/PIC16/PIC16ISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PIC16/PIC16ISelLowering.cpp?rev=97536&r1=97535&r2=97536&view=diff ============================================================================== --- llvm/trunk/lib/Target/PIC16/PIC16ISelLowering.cpp (original) +++ llvm/trunk/lib/Target/PIC16/PIC16ISelLowering.cpp Mon Mar 1 19:55:18 2010 @@ -419,8 +419,7 @@ LowerCallTo(DAG.getEntryNode(), RetTy, isSigned, !isSigned, false, false, 0, CallingConv::C, false, /*isReturnValueUsed=*/true, - Callee, Args, DAG, dl, - DAG.GetOrdering(DAG.getEntryNode().getNode())); + Callee, Args, DAG, dl); return CallInfo.first; } Modified: llvm/trunk/lib/Target/PowerPC/PPCISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCISelLowering.cpp?rev=97536&r1=97535&r2=97536&view=diff ============================================================================== --- llvm/trunk/lib/Target/PowerPC/PPCISelLowering.cpp (original) +++ llvm/trunk/lib/Target/PowerPC/PPCISelLowering.cpp Mon Mar 1 19:55:18 2010 @@ -1334,7 +1334,7 @@ false, false, false, false, 0, CallingConv::C, false, /*isReturnValueUsed=*/true, DAG.getExternalSymbol("__trampoline_setup", PtrVT), - Args, DAG, dl, DAG.GetOrdering(Chain.getNode())); + Args, DAG, dl); SDValue Ops[] = { CallResult.first, CallResult.second }; Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=97536&r1=97535&r2=97536&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original) +++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Mon Mar 1 19:55:18 2010 @@ -6474,8 +6474,7 @@ LowerCallTo(Chain, Type::getVoidTy(*DAG.getContext()), false, false, false, false, 0, CallingConv::C, false, /*isReturnValueUsed=*/false, - DAG.getExternalSymbol(bzeroEntry, IntPtr), Args, DAG, dl, - DAG.GetOrdering(Chain.getNode())); + DAG.getExternalSymbol(bzeroEntry, IntPtr), Args, DAG, dl); return CallResult.second; } Modified: llvm/trunk/lib/Target/XCore/XCoreISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/XCore/XCoreISelLowering.cpp?rev=97536&r1=97535&r2=97536&view=diff ============================================================================== --- llvm/trunk/lib/Target/XCore/XCoreISelLowering.cpp (original) +++ llvm/trunk/lib/Target/XCore/XCoreISelLowering.cpp Mon Mar 1 19:55:18 2010 @@ -473,7 +473,7 @@ false, false, 0, CallingConv::C, false, /*isReturnValueUsed=*/true, DAG.getExternalSymbol("__misaligned_load", getPointerTy()), - Args, DAG, dl, DAG.GetOrdering(Chain.getNode())); + Args, DAG, dl); SDValue Ops[] = { CallResult.first, CallResult.second }; @@ -536,7 +536,7 @@ false, false, 0, CallingConv::C, false, /*isReturnValueUsed=*/true, DAG.getExternalSymbol("__misaligned_store", getPointerTy()), - Args, DAG, dl, DAG.GetOrdering(Chain.getNode())); + Args, DAG, dl); return CallResult.second; } From gohman at apple.com Mon Mar 1 19:59:21 2010 From: gohman at apple.com (Dan Gohman) Date: Tue, 02 Mar 2010 01:59:21 -0000 Subject: [llvm-commits] [llvm] r97537 - in /llvm/trunk: lib/Analysis/ScalarEvolutionExpander.cpp lib/Transforms/Scalar/LoopStrengthReduce.cpp test/Transforms/LoopStrengthReduce/nonlinear-postinc.ll Message-ID: <20100302015921.618D82A6C12C@llvm.org> Author: djg Date: Mon Mar 1 19:59:21 2010 New Revision: 97537 URL: http://llvm.org/viewvc/llvm-project?rev=97537&view=rev Log: Non-affine post-inc SCEV expansions have more code which must be emitted after the increment. Make sure the insert position reflects this. This fixes PR6453. Added: llvm/trunk/test/Transforms/LoopStrengthReduce/nonlinear-postinc.ll Modified: llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp Modified: llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp?rev=97537&r1=97536&r2=97537&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp (original) +++ llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp Mon Mar 1 19:59:21 2010 @@ -1087,7 +1087,7 @@ // If the SCEV is computable at this level, insert it into the header // after the PHIs (and after any other instructions that we've inserted // there) so that it is guaranteed to dominate any user inside the loop. - if (L && S->hasComputableLoopEvolution(L)) + if (L && S->hasComputableLoopEvolution(L) && L != PostIncLoop) InsertPt = L->getHeader()->getFirstNonPHI(); while (isInsertedInstruction(InsertPt)) InsertPt = llvm::next(BasicBlock::iterator(InsertPt)); Modified: llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp?rev=97537&r1=97536&r2=97537&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp Mon Mar 1 19:59:21 2010 @@ -2793,8 +2793,12 @@ if (Instruction *I = dyn_cast(cast(LF.UserInst)->getOperand(1))) Inputs.push_back(I); - if (LF.PostIncLoop && !L->contains(LF.UserInst)) - Inputs.push_back(L->getLoopLatch()->getTerminator()); + if (LF.PostIncLoop) { + if (!L->contains(LF.UserInst)) + Inputs.push_back(L->getLoopLatch()->getTerminator()); + else + Inputs.push_back(IVIncInsertPos); + } // Then, climb up the immediate dominator tree as far as we can go while // still being dominated by the input positions. Added: llvm/trunk/test/Transforms/LoopStrengthReduce/nonlinear-postinc.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/LoopStrengthReduce/nonlinear-postinc.ll?rev=97537&view=auto ============================================================================== --- llvm/trunk/test/Transforms/LoopStrengthReduce/nonlinear-postinc.ll (added) +++ llvm/trunk/test/Transforms/LoopStrengthReduce/nonlinear-postinc.ll Mon Mar 1 19:59:21 2010 @@ -0,0 +1,44 @@ +; RUN: opt < %s -loop-reduce +; PR6453 + +target datalayout = "e-p:64:64:64" + +define void @_ZNK15PolynomialSpaceILi3EE13compute_indexEjRA3_j() nounwind { +entry: + br label %bb6 + +bb6: + %t4 = phi i32 [ 0, %entry ], [ %t3, %bb5 ] + %t16 = sub i32 undef, %t4 + %t25 = sub i32 undef, %t4 + %t26 = add i32 undef, %t25 + br label %bb4 + +bb4: + %t2 = phi i32 [ %t1, %bb3 ], [ 0, %bb6 ] + %t17 = mul i32 %t2, %t16 + %t18 = zext i32 %t2 to i33 + %t19 = add i32 %t2, -1 + %t20 = zext i32 %t19 to i33 + %t21 = mul i33 %t18, %t20 + %t22 = lshr i33 %t21, 1 + %t23 = trunc i33 %t22 to i32 + %t24 = sub i32 %t17, %t23 + %t27 = add i32 %t24, %t26 + br i1 false, label %bb1, label %bb5 + +bb1: + %t = icmp ugt i32 %t27, undef + br i1 %t, label %bb2, label %bb3 + +bb3: + %t1 = add i32 %t2, 1 + br label %bb4 + +bb5: + %t3 = add i32 %t4, 1 + br label %bb6 + +bb2: + ret void +} From gohman at apple.com Mon Mar 1 20:14:38 2010 From: gohman at apple.com (Dan Gohman) Date: Tue, 02 Mar 2010 02:14:38 -0000 Subject: [llvm-commits] [llvm] r97538 - in /llvm/trunk: lib/CodeGen/SelectionDAG/DAGCombiner.cpp lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp lib/CodeGen/SelectionDAG/TargetLowering.cpp test/CodeGen/X86/vec_cast.ll Message-ID: <20100302021439.058972A6C12C@llvm.org> Author: djg Date: Mon Mar 1 20:14:38 2010 New Revision: 97538 URL: http://llvm.org/viewvc/llvm-project?rev=97538&view=rev Log: Fix several places to handle vector operands properly. Based on a patch by Micah Villmow for PR6438. Modified: llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp llvm/trunk/test/CodeGen/X86/vec_cast.ll Modified: llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp?rev=97538&r1=97537&r2=97538&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Mon Mar 1 20:14:38 2010 @@ -1064,7 +1064,7 @@ if (VT.isInteger() && !VT.isVector()) { APInt LHSZero, LHSOne; APInt RHSZero, RHSOne; - APInt Mask = APInt::getAllOnesValue(VT.getSizeInBits()); + APInt Mask = APInt::getAllOnesValue(VT.getScalarType().getSizeInBits()); DAG.ComputeMaskedBits(N0, Mask, LHSZero, LHSOne); if (LHSZero.getBoolValue()) { @@ -1136,7 +1136,7 @@ // fold (addc a, b) -> (or a, b), CARRY_FALSE iff a and b share no bits. APInt LHSZero, LHSOne; APInt RHSZero, RHSOne; - APInt Mask = APInt::getAllOnesValue(VT.getSizeInBits()); + APInt Mask = APInt::getAllOnesValue(VT.getScalarType().getSizeInBits()); DAG.ComputeMaskedBits(N0, Mask, LHSZero, LHSOne); if (LHSZero.getBoolValue()) { @@ -2754,7 +2754,7 @@ if (N1C && N0.getOpcode() == ISD::CTLZ && N1C->getAPIntValue() == Log2_32(VT.getSizeInBits())) { APInt KnownZero, KnownOne; - APInt Mask = APInt::getAllOnesValue(VT.getSizeInBits()); + APInt Mask = APInt::getAllOnesValue(VT.getScalarType().getSizeInBits()); DAG.ComputeMaskedBits(N0.getOperand(0), Mask, KnownZero, KnownOne); // If any of the input bits are KnownOne, then the input couldn't be all Modified: llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp?rev=97538&r1=97537&r2=97538&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp Mon Mar 1 20:14:38 2010 @@ -1080,8 +1080,8 @@ SDValue Amt = N->getOperand(1); EVT NVT = TLI.getTypeToTransformTo(*DAG.getContext(), N->getValueType(0)); EVT ShTy = Amt.getValueType(); - unsigned ShBits = ShTy.getSizeInBits(); - unsigned NVTBits = NVT.getSizeInBits(); + unsigned ShBits = ShTy.getScalarType().getSizeInBits(); + unsigned NVTBits = NVT.getScalarType().getSizeInBits(); assert(isPowerOf2_32(NVTBits) && "Expanded integer type size not a power of two!"); DebugLoc dl = N->getDebugLoc(); Modified: llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp?rev=97538&r1=97537&r2=97538&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp Mon Mar 1 20:14:38 2010 @@ -1608,7 +1608,7 @@ // Fall back to ComputeMaskedBits to catch other known cases. EVT OpVT = Val.getValueType(); - unsigned BitWidth = OpVT.getSizeInBits(); + unsigned BitWidth = OpVT.getScalarType().getSizeInBits(); APInt Mask = APInt::getAllOnesValue(BitWidth); APInt KnownZero, KnownOne; DAG.ComputeMaskedBits(Val, Mask, KnownZero, KnownOne); Modified: llvm/trunk/test/CodeGen/X86/vec_cast.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/vec_cast.ll?rev=97538&r1=97537&r2=97538&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/vec_cast.ll (original) +++ llvm/trunk/test/CodeGen/X86/vec_cast.ll Mon Mar 1 20:14:38 2010 @@ -31,11 +31,10 @@ ret <1 x i32> %c } -; TODO: Legalize doesn't yet handle this. -;define <8 x i16> @g(<8 x i32> %a) nounwind { -; %c = trunc <8 x i32> %a to <8 x i16> -; ret <8 x i16> %c -;} +define <8 x i16> @g(<8 x i32> %a) nounwind { + %c = trunc <8 x i32> %a to <8 x i16> + ret <8 x i16> %c +} define <3 x i16> @h(<3 x i32> %a) nounwind { %c = trunc <3 x i32> %a to <3 x i16> @@ -46,3 +45,12 @@ %c = trunc <1 x i32> %a to <1 x i16> ret <1 x i16> %c } + +; PR6438 +define void @__OpenCL_math_kernel4_kernel() nounwind { + %tmp12.i = and <4 x i32> zeroinitializer, ; <<4 x i32>> [#uses=1] + %cmp13.i = icmp eq <4 x i32> %tmp12.i, ; <<4 x i1>> [#uses=2] + %cmp.ext14.i = sext <4 x i1> %cmp13.i to <4 x i32> ; <<4 x i32>> [#uses=0] + %tmp2110.i = and <4 x i1> %cmp13.i, zeroinitializer ; <<4 x i1>> [#uses=0] + ret void +} From sabre at nondot.org Mon Mar 1 20:22:10 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 02 Mar 2010 02:22:10 -0000 Subject: [llvm-commits] [llvm] r97539 - in /llvm/trunk: include/llvm/CodeGen/SelectionDAGISel.h lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp test/CodeGen/X86/store_op_load_fold2.ll test/CodeGen/X86/vec_shuffle-18.ll utils/TableGen/DAGISelMatcher.cpp utils/TableGen/DAGISelMatcher.h utils/TableGen/DAGISelMatcherEmitter.cpp utils/TableGen/DAGISelMatcherGen.cpp Message-ID: <20100302022210.69A1F2A6C12C@llvm.org> Author: lattner Date: Mon Mar 1 20:22:10 2010 New Revision: 97539 URL: http://llvm.org/viewvc/llvm-project?rev=97539&view=rev Log: Rewrite chain handling validation and input TokenFactor handling stuff now that we don't care about emulating the old broken behavior of the old isel. This eliminates the 'CheckChainCompatible' check (along with IsChainCompatible) which did an incorrect and inefficient scan *up* the chain nodes which happened as the pattern was being formed and does the validation at the end in HandleMergeInputChains when it forms a structural pattern. This scans "down" the graph, which means that it is quickly bounded by nodes already selected. This also handles token factors that get "trapped" in the dag. Removing the CheckChainCompatible nodes also shrinks the generated tables by about 6K for X86 (down to 83K). There are two pieces remaining before I can nuke PreprocessRMW: 1. I xfailed a test because we're now producing worse code in a case that has nothing to do with the change: it turns out that our use of MorphNodeTo will leave dead nodes in the graph which (depending on how the graph is walked) end up causing bogus uses of chains and blocking matches. This is really bad for other reasons, so I'll fix this in a follow-up patch. 2. CheckFoldableChainNode needs to be improved to handle the TF. Modified: llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp llvm/trunk/test/CodeGen/X86/store_op_load_fold2.ll llvm/trunk/test/CodeGen/X86/vec_shuffle-18.ll llvm/trunk/utils/TableGen/DAGISelMatcher.cpp llvm/trunk/utils/TableGen/DAGISelMatcher.h llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp Modified: llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h?rev=97539&r1=97538&r2=97539&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h (original) +++ llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h Mon Mar 1 20:22:10 2010 @@ -123,7 +123,6 @@ OPC_CheckComplexPat, OPC_CheckAndImm, OPC_CheckOrImm, OPC_CheckFoldableChainNode, - OPC_CheckChainCompatible, OPC_EmitInteger, OPC_EmitRegister, Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp?rev=97539&r1=97538&r2=97539&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Mon Mar 1 20:22:10 2010 @@ -1455,30 +1455,6 @@ MVT::Other, Tmp, Chain); } - -/// ChainNotReachable - Returns true if Chain does not reach Op. -static bool ChainNotReachable(SDNode *Chain, SDNode *Op) { - if (Chain->getOpcode() == ISD::EntryToken) - return true; - if (Chain->getOpcode() == ISD::TokenFactor) - return false; - if (Chain->getNumOperands() > 0) { - SDValue C0 = Chain->getOperand(0); - if (C0.getValueType() == MVT::Other) - return C0.getNode() != Op && ChainNotReachable(C0.getNode(), Op); - } - return true; -} - -/// IsChainCompatible - Returns true if Chain is Op or Chain does not reach Op. -/// This is used to ensure that there are no nodes trapped between Chain, which -/// is the first chain node discovered in a pattern and Op, a later node, that -/// will not be selected into the pattern. -static bool IsChainCompatible(SDNode *Chain, SDNode *Op) { - return Chain == Op || ChainNotReachable(Chain, Op); -} - - /// GetVBR - decode a vbr encoding whose top bit is set. ALWAYS_INLINE static uint64_t GetVBR(uint64_t Val, const unsigned char *MatcherTable, unsigned &Idx) { @@ -1543,26 +1519,170 @@ DEBUG(errs() << "ISEL: Match complete!\n"); } +enum ChainResult { + CR_Simple, + CR_InducesCycle, + CR_LeadsToInteriorNode +}; + +/// WalkChainUsers - Walk down the users of the specified chained node that is +/// part of the pattern we're matching, looking at all of the users we find. +/// This determines whether something is an interior node, whether we have a +/// non-pattern node in between two pattern nodes (which prevent folding because +/// it would induce a cycle) and whether we have a TokenFactor node sandwiched +/// between pattern nodes (in which case the TF becomes part of the pattern). +/// +/// The walk we do here is guaranteed to be small because we quickly get down to +/// already selected nodes "below" us. +static ChainResult +WalkChainUsers(SDNode *ChainedNode, + SmallVectorImpl &ChainedNodesInPattern, + SmallVectorImpl &InteriorChainedNodes) { + ChainResult Result = CR_Simple; + + for (SDNode::use_iterator UI = ChainedNode->use_begin(), + E = ChainedNode->use_end(); UI != E; ++UI) { + // Make sure the use is of the chain, not some other value we produce. + if (UI.getUse().getValueType() != MVT::Other) continue; + + SDNode *User = *UI; + + // If we see an already-selected machine node, then we've gone beyond the + // pattern that we're selecting down into the already selected chunk of the + // DAG. + if (User->isMachineOpcode() || + User->getOpcode() == ISD::CopyToReg || + User->getOpcode() == ISD::CopyFromReg || + User->getOpcode() == ISD::INLINEASM || + User->getOpcode() == ISD::HANDLENODE) // Root of the graph. + continue; + + // If we have a TokenFactor, we handle it specially. + if (User->getOpcode() != ISD::TokenFactor) { + // If the node isn't a token factor and isn't part of our pattern, then it + // must be a random chained node in between two nodes we're selecting. + // This happens when we have something like: + // x = load ptr + // call + // y = x+4 + // store y -> ptr + // Because we structurally match the load/store as a read/modify/write, + // but the call is chained between them. We cannot fold in this case + // because it would induce a cycle in the graph. + if (!std::count(ChainedNodesInPattern.begin(), + ChainedNodesInPattern.end(), User)) + return CR_InducesCycle; + + // Otherwise we found a node that is part of our pattern. For example in: + // x = load ptr + // y = x+4 + // store y -> ptr + // This would happen when we're scanning down from the load and see the + // store as a user. Record that there is a use of ChainedNode that is + // part of the pattern and keep scanning uses. + Result = CR_LeadsToInteriorNode; + InteriorChainedNodes.push_back(User); + continue; + } + + // If we found a TokenFactor, there are two cases to consider: first if the + // TokenFactor is just hanging "below" the pattern we're matching (i.e. no + // uses of the TF are in our pattern) we just want to ignore it. Second, + // the TokenFactor can be sandwiched in between two chained nodes, like so: + // [Load chain] + // ^ + // | + // [Load] + // ^ ^ + // | \ DAG's like cheese + // / \ do you? + // / | + // [TokenFactor] [Op] + // ^ ^ + // | | + // \ / + // \ / + // [Store] + // + // In this case, the TokenFactor becomes part of our match and we rewrite it + // as a new TokenFactor. + // + // To distinguish these two cases, do a recursive walk down the uses. + switch (WalkChainUsers(User, ChainedNodesInPattern, InteriorChainedNodes)) { + case CR_Simple: + // If the uses of the TokenFactor are just already-selected nodes, ignore + // it, it is "below" our pattern. + continue; + case CR_InducesCycle: + // If the uses of the TokenFactor lead to nodes that are not part of our + // pattern that are not selected, folding would turn this into a cycle, + // bail out now. + return CR_InducesCycle; + case CR_LeadsToInteriorNode: + break; // Otherwise, keep processing. + } + + // Okay, we know we're in the interesting interior case. The TokenFactor + // is now going to be considered part of the pattern so that we rewrite its + // uses (it may have uses that are not part of the pattern) with the + // ultimate chain result of the generated code. We will also add its chain + // inputs as inputs to the ultimate TokenFactor we create. + Result = CR_LeadsToInteriorNode; + ChainedNodesInPattern.push_back(User); + InteriorChainedNodes.push_back(User); + continue; + } + + return Result; +} + /// HandleMergeInputChains - This implements the OPC_EmitMergeInputChains -/// operation for when the pattern matched multiple nodes with chains. +/// operation for when the pattern matched multiple nodes with chains. The +/// input vector contains a list of all of the chained nodes that we match. We +/// must determine if this is a valid thing to cover (i.e. matching it won't +/// induce cycles in the DAG) and if so, creating a TokenFactor node. that will +/// be used as the input node chain for the generated nodes. static SDValue -HandleMergeInputChains(const SmallVectorImpl &ChainNodesMatched, +HandleMergeInputChains(SmallVectorImpl &ChainNodesMatched, SelectionDAG *CurDAG) { assert(ChainNodesMatched.size() > 1 && "Should only happen for multi chain node case"); + + // Walk all of the chained nodes we've matched, recursively scanning down the + // users of the chain result. This adds any TokenFactor nodes that are caught + // in between chained nodes to the chained and interior nodes list. + SmallVector InteriorChainedNodes; + for (unsigned i = 0, e = ChainNodesMatched.size(); i != e; ++i) { + if (WalkChainUsers(ChainNodesMatched[i], ChainNodesMatched, + InteriorChainedNodes) == CR_InducesCycle) + return SDValue(); // Would induce a cycle. + } - // Walk all the chained nodes, adding the input chains if they are not in - // ChainedNodes (and this, not in the matched pattern). This is an N^2 - // algorithm, but # chains is usually 2 here, at most 3 for MSP430. + // Okay, we have walked all the matched nodes and collected TokenFactor nodes + // that we are interested in. Form our input TokenFactor node. SmallVector InputChains; for (unsigned i = 0, e = ChainNodesMatched.size(); i != e; ++i) { - SDValue InChain = ChainNodesMatched[i]->getOperand(0); - assert(InChain.getValueType() == MVT::Other && "Not a chain"); - bool Invalid = false; - for (unsigned j = 0; j != e; ++j) - Invalid |= ChainNodesMatched[j] == InChain.getNode(); - if (!Invalid) + // Add the input chain of this node to the InputChains list (which will be + // the operands of the generated TokenFactor) if it's not an interior node. + SDNode *N = ChainNodesMatched[i]; + if (N->getOpcode() != ISD::TokenFactor) { + if (std::count(InteriorChainedNodes.begin(),InteriorChainedNodes.end(),N)) + continue; + + // Otherwise, add the input chain. + SDValue InChain = ChainNodesMatched[i]->getOperand(0); + assert(InChain.getValueType() == MVT::Other && "Not a chain"); InputChains.push_back(InChain); + continue; + } + + // If we have a token factor, we want to add all inputs of the token factor + // that are not part of the pattern we're matching. + for (unsigned op = 0, e = N->getNumOperands(); op != e; ++op) { + if (!std::count(ChainNodesMatched.begin(), ChainNodesMatched.end(), + N->getOperand(i).getNode())) + InputChains.push_back(N->getOperand(i)); + } } SDValue Res; @@ -1916,25 +2036,6 @@ continue; } - case OPC_CheckChainCompatible: { - unsigned PrevNode = MatcherTable[MatcherIndex++]; - assert(PrevNode < RecordedNodes.size() && "Invalid CheckChainCompatible"); - SDValue PrevChainedNode = RecordedNodes[PrevNode]; - SDValue ThisChainedNode = RecordedNodes.back(); - - // We have two nodes with chains, verify that their input chains are good. - assert(PrevChainedNode.getOperand(0).getValueType() == MVT::Other && - ThisChainedNode.getOperand(0).getValueType() == MVT::Other && - "Invalid chained nodes"); - - if (!IsChainCompatible(// Input chain of the previous node. - PrevChainedNode.getOperand(0).getNode(), - // Node with chain. - ThisChainedNode.getNode())) - break; - continue; - } - case OPC_EmitInteger: { MVT::SimpleValueType VT = (MVT::SimpleValueType)MatcherTable[MatcherIndex++]; @@ -2157,6 +2258,9 @@ } else if (NodeToMatch->getValueType(NTMNumResults-1) == MVT::Other) OldChainResultNo = NTMNumResults-1; + // FIXME: If this matches multiple nodes it will just leave them here + // dead with noone to love them. These dead nodes can block future + // matches (!). Res = CurDAG->MorphNodeTo(NodeToMatch, ~TargetOpc, VTList, Ops.data(), Ops.size()); Modified: llvm/trunk/test/CodeGen/X86/store_op_load_fold2.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/store_op_load_fold2.ll?rev=97539&r1=97538&r2=97539&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/store_op_load_fold2.ll (original) +++ llvm/trunk/test/CodeGen/X86/store_op_load_fold2.ll Mon Mar 1 20:22:10 2010 @@ -4,7 +4,7 @@ target datalayout = "e-p:32:32" %struct.Macroblock = type { i32, i32, i32, i32, i32, [8 x i32], %struct.Macroblock*, %struct.Macroblock*, i32, [2 x [4 x [4 x [2 x i32]]]], [16 x i8], [16 x i8], i32, i64, [4 x i32], [4 x i32], i64, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i16, double, i32, i32, i32, i32, i32, i32, i32, i32, i32 } -define internal fastcc i32 @dct_chroma(i32 %uv, i32 %cr_cbp) { +define internal fastcc i32 @dct_chroma(i32 %uv, i32 %cr_cbp) nounwind { entry: br i1 true, label %cond_true2732.preheader, label %cond_true129 cond_true129: ; preds = %entry Modified: llvm/trunk/test/CodeGen/X86/vec_shuffle-18.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/vec_shuffle-18.ll?rev=97539&r1=97538&r2=97539&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/vec_shuffle-18.ll (original) +++ llvm/trunk/test/CodeGen/X86/vec_shuffle-18.ll Mon Mar 1 20:22:10 2010 @@ -1,4 +1,5 @@ ; RUN: llc < %s -march=x86 -mattr=+sse2 -mtriple=i686-apple-darwin8.8.0 | grep mov | count 7 +; XFAIL: * %struct.vector4_t = type { <4 x float> } Modified: llvm/trunk/utils/TableGen/DAGISelMatcher.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelMatcher.cpp?rev=97539&r1=97538&r2=97539&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelMatcher.cpp (original) +++ llvm/trunk/utils/TableGen/DAGISelMatcher.cpp Mon Mar 1 20:22:10 2010 @@ -137,11 +137,6 @@ OS.indent(indent) << "CheckFoldableChainNode\n"; } -void CheckChainCompatibleMatcher::printImpl(raw_ostream &OS, - unsigned indent) const { - OS.indent(indent) << "CheckChainCompatible " << PreviousOp << "\n"; -} - void EmitIntegerMatcher::printImpl(raw_ostream &OS, unsigned indent) const { OS.indent(indent) << "EmitInteger " << Val << " VT=" << VT << '\n'; } Modified: llvm/trunk/utils/TableGen/DAGISelMatcher.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelMatcher.h?rev=97539&r1=97538&r2=97539&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelMatcher.h (original) +++ llvm/trunk/utils/TableGen/DAGISelMatcher.h Mon Mar 1 20:22:10 2010 @@ -64,7 +64,6 @@ CheckAndImm, CheckOrImm, CheckFoldableChainNode, - CheckChainCompatible, // Node creation/emisssion. EmitInteger, // Create a TargetConstant @@ -671,30 +670,6 @@ virtual unsigned getHashImpl() const { return 0; } }; -/// CheckChainCompatibleMatcher - Verify that the current node's chain -/// operand is 'compatible' with the specified recorded node's. -class CheckChainCompatibleMatcher : public Matcher { - unsigned PreviousOp; -public: - CheckChainCompatibleMatcher(unsigned previousop) - : Matcher(CheckChainCompatible), PreviousOp(previousop) {} - - unsigned getPreviousOp() const { return PreviousOp; } - - static inline bool classof(const Matcher *N) { - return N->getKind() == CheckChainCompatible; - } - - virtual bool isSafeToReorderWithPatternPredicate() const { return true; } - -private: - virtual void printImpl(raw_ostream &OS, unsigned indent) const; - virtual bool isEqualImpl(const Matcher *M) const { - return cast(M)->PreviousOp == PreviousOp; - } - virtual unsigned getHashImpl() const { return PreviousOp; } -}; - /// EmitIntegerMatcher - This creates a new TargetConstant. class EmitIntegerMatcher : public Matcher { int64_t Val; Modified: llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp?rev=97539&r1=97538&r2=97539&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp (original) +++ llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp Mon Mar 1 20:22:10 2010 @@ -376,10 +376,6 @@ case Matcher::CheckFoldableChainNode: OS << "OPC_CheckFoldableChainNode,\n"; return 1; - case Matcher::CheckChainCompatible: - OS << "OPC_CheckChainCompatible, " - << cast(N)->getPreviousOp() << ",\n"; - return 2; case Matcher::EmitInteger: { int64_t Val = cast(N)->getValue(); @@ -686,7 +682,6 @@ case Matcher::CheckOrImm: OS << "OPC_CheckOrImm"; break; case Matcher::CheckFoldableChainNode: OS << "OPC_CheckFoldableChainNode"; break; - case Matcher::CheckChainCompatible: OS << "OPC_CheckChainCompatible"; break; case Matcher::EmitInteger: OS << "OPC_EmitInteger"; break; case Matcher::EmitStringInteger: OS << "OPC_EmitStringInteger"; break; case Matcher::EmitRegister: OS << "OPC_EmitRegister"; break; Modified: llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp?rev=97539&r1=97538&r2=97539&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp (original) +++ llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp Mon Mar 1 20:22:10 2010 @@ -267,16 +267,6 @@ assert(NextRecordedOperandNo > 1 && "Should have recorded input/result chains at least!"); MatchedChainNodes.push_back(NextRecordedOperandNo-1); - - // If we need to check chains, do so, see comment for - // "NodeHasProperty(SDNPHasChain" below. - if (MatchedChainNodes.size() > 1) { - // FIXME2: This is broken, we should eliminate this nonsense completely, - // but we want to produce the same selections that the old matcher does - // for now. - unsigned PrevOp = MatchedChainNodes[MatchedChainNodes.size()-2]; - AddMatcher(new CheckChainCompatibleMatcher(PrevOp)); - } } // TODO: Complex patterns can't have output flags, if they did, we'd want @@ -354,19 +344,6 @@ // Remember all of the input chains our pattern will match. MatchedChainNodes.push_back(NextRecordedOperandNo++); - // If this is the second (e.g. indbr(load) or store(add(load))) or third - // input chain (e.g. (store (add (load, load))) from msp430) we need to make - // sure that folding the chain won't induce cycles in the DAG. This could - // happen if there were an intermediate node between the indbr and load, for - // example. - if (MatchedChainNodes.size() > 1) { - // FIXME2: This is broken, we should eliminate this nonsense completely, - // but we want to produce the same selections that the old matcher does - // for now. - unsigned PrevOp = MatchedChainNodes[MatchedChainNodes.size()-2]; - AddMatcher(new CheckChainCompatibleMatcher(PrevOp)); - } - // Don't look at the input chain when matching the tree pattern to the // SDNode. OpNo = 1; From sabre at nondot.org Mon Mar 1 20:37:23 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 02 Mar 2010 02:37:23 -0000 Subject: [llvm-commits] [llvm] r97541 - /llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Message-ID: <20100302023723.6F6712A6C12C@llvm.org> Author: lattner Date: Mon Mar 1 20:37:23 2010 New Revision: 97541 URL: http://llvm.org/viewvc/llvm-project?rev=97541&view=rev Log: Use the right induction variable. Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp?rev=97541&r1=97540&r2=97541&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Mon Mar 1 20:37:23 2010 @@ -1680,8 +1680,8 @@ // that are not part of the pattern we're matching. for (unsigned op = 0, e = N->getNumOperands(); op != e; ++op) { if (!std::count(ChainNodesMatched.begin(), ChainNodesMatched.end(), - N->getOperand(i).getNode())) - InputChains.push_back(N->getOperand(i)); + N->getOperand(op).getNode())) + InputChains.push_back(N->getOperand(op)); } } From evan.cheng at apple.com Mon Mar 1 20:37:33 2010 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 02 Mar 2010 02:37:33 -0000 Subject: [llvm-commits] [llvm] r97542 - /llvm/trunk/include/llvm/ADT/ScopedHashTable.h Message-ID: <20100302023733.57B902A6C12C@llvm.org> Author: evancheng Date: Mon Mar 1 20:37:33 2010 New Revision: 97542 URL: http://llvm.org/viewvc/llvm-project?rev=97542&view=rev Log: Add count() and lookup() to ScopedHashTable. It might be useful to get information out of the hash table. Modified: llvm/trunk/include/llvm/ADT/ScopedHashTable.h Modified: llvm/trunk/include/llvm/ADT/ScopedHashTable.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/ScopedHashTable.h?rev=97542&r1=97541&r2=97542&view=diff ============================================================================== --- llvm/trunk/include/llvm/ADT/ScopedHashTable.h (original) +++ llvm/trunk/include/llvm/ADT/ScopedHashTable.h Mon Mar 1 20:37:33 2010 @@ -130,6 +130,14 @@ assert(CurScope == 0 && TopLevelMap.empty() && "Scope imbalance!"); } + bool count(const K &Key) const { + return TopLevelMap.count(Key); + } + + V lookup(const K &Key) { + return TopLevelMap[Key].getValue(); + } + void insert(const K &Key, const V &Val) { assert(CurScope && "No scope active!"); From evan.cheng at apple.com Mon Mar 1 20:38:25 2010 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 02 Mar 2010 02:38:25 -0000 Subject: [llvm-commits] [llvm] r97543 - in /llvm/trunk: include/llvm/CodeGen/Passes.h lib/CodeGen/MachineCSE.cpp Message-ID: <20100302023825.28D642A6C12C@llvm.org> Author: evancheng Date: Mon Mar 1 20:38:24 2010 New Revision: 97543 URL: http://llvm.org/viewvc/llvm-project?rev=97543&view=rev Log: Add skeleton of a machine level cse pass. Added: llvm/trunk/lib/CodeGen/MachineCSE.cpp Modified: llvm/trunk/include/llvm/CodeGen/Passes.h Modified: llvm/trunk/include/llvm/CodeGen/Passes.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/Passes.h?rev=97543&r1=97542&r2=97543&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/Passes.h (original) +++ llvm/trunk/include/llvm/CodeGen/Passes.h Mon Mar 1 20:38:24 2010 @@ -162,6 +162,10 @@ /// FunctionPass *createGCInfoPrinter(raw_ostream &OS); + /// createMachineCSEPass - This pass performs global CSE on machine + /// instructions. + FunctionPass *createMachineCSEPass(); + /// createMachineLICMPass - This pass performs LICM on machine instructions. /// FunctionPass *createMachineLICMPass(); Added: llvm/trunk/lib/CodeGen/MachineCSE.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineCSE.cpp?rev=97543&view=auto ============================================================================== --- llvm/trunk/lib/CodeGen/MachineCSE.cpp (added) +++ llvm/trunk/lib/CodeGen/MachineCSE.cpp Mon Mar 1 20:38:24 2010 @@ -0,0 +1,124 @@ +//===-- MachineCSE.cpp - Machine Common Subexpression Elimination Pass ----===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This pass performs global common subexpression elimination on machine +// instructions using a scoped hash table based value numbering schemem. IT +// must be run while the machine function is still in SSA form. +// +//===----------------------------------------------------------------------===// + +#define DEBUG_TYPE "machine-cse" +#include "llvm/CodeGen/Passes.h" +#include "llvm/CodeGen/MachineDominators.h" +#include "llvm/CodeGen/MachineInstr.h" +#include "llvm/ADT/ScopedHashTable.h" +#include "llvm/ADT/Statistic.h" +#include "llvm/Support/Debug.h" + +using namespace llvm; + +namespace llvm { + template<> struct DenseMapInfo { + static inline MachineInstr *getEmptyKey() { + return 0; + } + + static inline MachineInstr *getTombstoneKey() { + return reinterpret_cast(-1); + } + + static unsigned getHashValue(const MachineInstr* const &MI) { + unsigned Hash = MI->getOpcode() * 37; + for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) { + const MachineOperand &MO = MI->getOperand(i); + uint64_t Key = (uint64_t)MO.getType() << 32; + switch (MO.getType()) { + default: break; + case MachineOperand::MO_Register: + Key |= MO.getReg(); + break; + case MachineOperand::MO_Immediate: + Key |= MO.getImm(); + break; + case MachineOperand::MO_FrameIndex: + case MachineOperand::MO_ConstantPoolIndex: + case MachineOperand::MO_JumpTableIndex: + Key |= MO.getIndex(); + break; + case MachineOperand::MO_MachineBasicBlock: + Key |= DenseMapInfo::getHashValue(MO.getMBB()); + break; + case MachineOperand::MO_GlobalAddress: + Key |= DenseMapInfo::getHashValue(MO.getGlobal()); + break; + case MachineOperand::MO_BlockAddress: + Key |= DenseMapInfo::getHashValue(MO.getBlockAddress()); + break; + } + Key += ~(Key << 32); + Key ^= (Key >> 22); + Key += ~(Key << 13); + Key ^= (Key >> 8); + Key += (Key << 3); + Key ^= (Key >> 15); + Key += ~(Key << 27); + Key ^= (Key >> 31); + Hash = (unsigned)Key + Hash * 37; + } + return Hash; + } + + static bool isEqual(const MachineInstr* const &LHS, + const MachineInstr* const &RHS) { + return LHS->isIdenticalTo(RHS); + } + }; +} // end llvm namespace + +namespace { + class MachineCSE : public MachineFunctionPass { + ScopedHashTable VNT; + MachineDominatorTree *DT; + public: + static char ID; // Pass identification + MachineCSE() : MachineFunctionPass(&ID) {} + + virtual bool runOnMachineFunction(MachineFunction &MF); + + virtual void getAnalysisUsage(AnalysisUsage &AU) const { + AU.setPreservesCFG(); + MachineFunctionPass::getAnalysisUsage(AU); + AU.addRequired(); + AU.addPreserved(); + } + + private: + bool ProcessBlock(MachineDomTreeNode *Node); + }; +} // end anonymous namespace + +char MachineCSE::ID = 0; +static RegisterPass +X("machine-cse", "Machine Common Subexpression Elimination"); + +FunctionPass *llvm::createMachineCSEPass() { return new MachineCSE(); } + +bool MachineCSE::ProcessBlock(MachineDomTreeNode *Node) { + ScopedHashTableScope VNTS(VNT); + MachineBasicBlock *MBB = Node->getBlock(); + for (MachineBasicBlock::iterator I = MBB->begin(), E = MBB->end(); I != E; + ++I) { + } + return false; +} + +bool MachineCSE::runOnMachineFunction(MachineFunction &MF) { + DT = &getAnalysis(); + return ProcessBlock(DT->getRootNode()); +} From echristo at apple.com Mon Mar 1 20:49:43 2010 From: echristo at apple.com (Eric Christopher) Date: Tue, 02 Mar 2010 02:49:43 -0000 Subject: [llvm-commits] [llvm] r97545 - /llvm/trunk/lib/CodeGen/CMakeLists.txt Message-ID: <20100302024943.DBA1D2A6C12C@llvm.org> Author: echristo Date: Mon Mar 1 20:49:43 2010 New Revision: 97545 URL: http://llvm.org/viewvc/llvm-project?rev=97545&view=rev Log: Add file to CMakeLists.txt Modified: llvm/trunk/lib/CodeGen/CMakeLists.txt Modified: llvm/trunk/lib/CodeGen/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/CMakeLists.txt?rev=97545&r1=97544&r2=97545&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/CMakeLists.txt (original) +++ llvm/trunk/lib/CodeGen/CMakeLists.txt Mon Mar 1 20:49:43 2010 @@ -22,6 +22,7 @@ LiveVariables.cpp LowerSubregs.cpp MachineBasicBlock.cpp + MachineCSE.cpp MachineDominators.cpp MachineFunction.cpp MachineFunctionAnalysis.cpp From nlewycky at google.com Mon Mar 1 22:00:40 2010 From: nlewycky at google.com (Nick Lewycky) Date: Mon, 1 Mar 2010 20:00:40 -0800 Subject: [llvm-commits] Fix looking up MD names to not need a module. In-Reply-To: <1267399688-72775-1-git-send-email-idadesub@users.sourceforge.net> References: <1267399688-72775-1-git-send-email-idadesub@users.sourceforge.net> Message-ID: On 28 February 2010 15:28, Erick Tryzelaar wrote: > Nicolas Lewycky asked me to send this in. It changes the AsmWriter to grab > the > mdkind names from the instruction's context instead of from the module, > which > may or may not exist. It look good? > This looks great. Please commit! Nick > > -e > > --- > lib/VMCore/AsmWriter.cpp | 22 ++++++++++++---------- > 1 files changed, 12 insertions(+), 10 deletions(-) > > diff --git lib/VMCore/AsmWriter.cpp lib/VMCore/AsmWriter.cpp > index 361c58e..fd74241 100644 > --- lib/VMCore/AsmWriter.cpp > +++ lib/VMCore/AsmWriter.cpp > @@ -17,6 +17,7 @@ > #include "llvm/Assembly/Writer.h" > #include "llvm/Assembly/PrintModulePass.h" > #include "llvm/Assembly/AsmAnnotationWriter.h" > +#include "llvm/LLVMContext.h" > #include "llvm/CallingConv.h" > #include "llvm/Constants.h" > #include "llvm/DerivedTypes.h" > @@ -1236,7 +1237,6 @@ class AssemblyWriter { > TypePrinting TypePrinter; > AssemblyAnnotationWriter *AnnotationWriter; > std::vector NumberedTypes; > - SmallVector MDNames; > > public: > inline AssemblyWriter(formatted_raw_ostream &o, SlotTracker &Mac, > @@ -1244,8 +1244,6 @@ public: > AssemblyAnnotationWriter *AAW) > : Out(o), Machine(Mac), TheModule(M), AnnotationWriter(AAW) { > AddModuleTypesToPrinter(TypePrinter, NumberedTypes, M); > - if (M) > - M->getMDKindNames(MDNames); > } > > void printMDNodeBody(const MDNode *MD); > @@ -1990,14 +1988,18 @@ void AssemblyWriter::printInstruction(const > Instruction &I) { > // Print Metadata info. > SmallVector, 4> InstMD; > I.getAllMetadata(InstMD); > - for (unsigned i = 0, e = InstMD.size(); i != e; ++i) { > - unsigned Kind = InstMD[i].first; > - if (Kind < MDNames.size()) { > - Out << ", !" << MDNames[Kind]; > - } else { > - Out << ", !"; > + if (!InstMD.empty()) { > + SmallVector MDNames; > + I.getType()->getContext().getMDKindNames(MDNames); > + for (unsigned i = 0, e = InstMD.size(); i != e; ++i) { > + unsigned Kind = InstMD[i].first; > + if (Kind < MDNames.size()) { > + Out << ", !" << MDNames[Kind]; > + } else { > + Out << ", !"; > + } > + Out << " !" << Machine.getMetadataSlot(InstMD[i].second); > } > - Out << " !" << Machine.getMetadataSlot(InstMD[i].second); > } > printInfoComment(I); > } > -- > 1.7.0 > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20100301/5aa36b4d/attachment.html From nkeynes at deadcoderemoval.net Mon Mar 1 04:40:41 2010 From: nkeynes at deadcoderemoval.net (Nathan Keynes) Date: Mon, 01 Mar 2010 10:40:41 -0000 Subject: [llvm-commits] [llvm] r97443 - /llvm/trunk/lib/Target/Sparc/README.txt Message-ID: <20100301104041.9DB1C2A6C12C@llvm.org> Author: nkeynes Date: Mon Mar 1 04:40:41 2010 New Revision: 97443 URL: http://llvm.org/viewvc/llvm-project?rev=97443&view=rev Log: Add JIT support to the TODO list (test commit) Modified: llvm/trunk/lib/Target/Sparc/README.txt Modified: llvm/trunk/lib/Target/Sparc/README.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Sparc/README.txt?rev=97443&r1=97442&r2=97443&view=diff ============================================================================== --- llvm/trunk/lib/Target/Sparc/README.txt (original) +++ llvm/trunk/lib/Target/Sparc/README.txt Mon Mar 1 04:40:41 2010 @@ -56,3 +56,4 @@ leaf fns. * Fill delay slots +* Implement JIT support From echristo at apple.com Mon Mar 1 23:06:54 2010 From: echristo at apple.com (Eric Christopher) Date: Tue, 02 Mar 2010 05:06:54 -0000 Subject: [llvm-commits] [llvm] r97548 - in /llvm/trunk: autoconf/m4/huge_val.m4 configure Message-ID: <20100302050654.D9B502A6C12C@llvm.org> Author: echristo Date: Mon Mar 1 23:06:54 2010 New Revision: 97548 URL: http://llvm.org/viewvc/llvm-project?rev=97548&view=rev Log: Make sure we save CXXFLAGS before setting it as pedantic and regenerate configure. Fixes PR6388. Patch by Yann Droneaud! Modified: llvm/trunk/autoconf/m4/huge_val.m4 llvm/trunk/configure Modified: llvm/trunk/autoconf/m4/huge_val.m4 URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/autoconf/m4/huge_val.m4?rev=97548&r1=97547&r2=97548&view=diff ============================================================================== --- llvm/trunk/autoconf/m4/huge_val.m4 (original) +++ llvm/trunk/autoconf/m4/huge_val.m4 Mon Mar 1 23:06:54 2010 @@ -5,6 +5,7 @@ AC_DEFUN([AC_HUGE_VAL_CHECK],[ AC_CACHE_CHECK([for HUGE_VAL sanity], [ac_cv_huge_val_sanity],[ AC_LANG_PUSH([C++]) + ac_save_CXXFLAGS=$CXXFLAGS CXXFLAGS=-pedantic AC_RUN_IFELSE( AC_LANG_PROGRAM( @@ -12,6 +13,7 @@ [double x = HUGE_VAL; return x != x; ]), [ac_cv_huge_val_sanity=yes],[ac_cv_huge_val_sanity=no], [ac_cv_huge_val_sanity=yes]) + CXXFLAGS=$ac_save_CXXFLAGS AC_LANG_POP([C++]) ]) AC_SUBST(HUGE_VAL_SANITY,$ac_cv_huge_val_sanity) Modified: llvm/trunk/configure URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/configure?rev=97548&r1=97547&r2=97548&view=diff ============================================================================== --- llvm/trunk/configure (original) +++ llvm/trunk/configure Mon Mar 1 23:06:54 2010 @@ -16544,6 +16544,7 @@ ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + ac_save_CXXFLAGS=$CXXFLAGS CXXFLAGS=-pedantic if test "$cross_compiling" = yes; then ac_cv_huge_val_sanity=yes @@ -16596,6 +16597,7 @@ fi + CXXFLAGS=$ac_save_CXXFLAGS ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' From echristo at apple.com Mon Mar 1 23:17:21 2010 From: echristo at apple.com (Eric Christopher) Date: Tue, 02 Mar 2010 05:17:21 -0000 Subject: [llvm-commits] [llvm] r97549 - in /llvm/trunk: autoconf/configure.ac configure Message-ID: <20100302051721.6EAA72A6C12C@llvm.org> Author: echristo Date: Mon Mar 1 23:17:21 2010 New Revision: 97549 URL: http://llvm.org/viewvc/llvm-project?rev=97549&view=rev Log: Move the docsdir to /usr/share/doc/llvm to match other projects. Fixes PR6267. Modified: llvm/trunk/autoconf/configure.ac llvm/trunk/configure Modified: llvm/trunk/autoconf/configure.ac URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/autoconf/configure.ac?rev=97549&r1=97548&r2=97549&view=diff ============================================================================== --- llvm/trunk/autoconf/configure.ac (original) +++ llvm/trunk/autoconf/configure.ac Mon Mar 1 23:17:21 2010 @@ -185,7 +185,7 @@ llvm_cv_link_all_option="-Wl,--whole-archive" llvm_cv_no_link_all_option="-Wl,--no-whole-archive" llvm_cv_os_type="Haiku" - llvm_cv_platform_type="Unix" ;; + llvm_cv_platform_type="Unix" ;; *-unknown-eabi*) llvm_cv_link_all_option="-Wl,--whole-archive" llvm_cv_no_link_all_option="-Wl,--no-whole-archive" @@ -237,7 +237,7 @@ *-*-mingw*) llvm_cv_target_os_type="MingW" ;; *-*-haiku*) - llvm_cv_target_os_type="Haiku" ;; + llvm_cv_target_os_type="Haiku" ;; *-unknown-eabi*) llvm_cv_target_os_type="Freestanding" ;; *) @@ -1084,7 +1084,7 @@ dnl Tool compatibility is okay if we make it here. AC_MSG_RESULT([ok]) -dnl Check optional compiler flags. +dnl Check optional compiler flags. AC_MSG_CHECKING([optional compiler flags]) CXX_FLAG_CHECK(NO_VARIADIC_MACROS, [-Wno-variadic-macros]) CXX_FLAG_CHECK(NO_MISSING_FIELD_INITIALIZERS, [-Wno-missing-field-initializers]) @@ -1363,7 +1363,7 @@ eval LLVM_BINDIR="${prefix}/bin"; eval LLVM_LIBDIR="${prefix}/lib"; eval LLVM_DATADIR="${prefix}/share/llvm"; -eval LLVM_DOCSDIR="${prefix}/docs/llvm"; +eval LLVM_DOCSDIR="${prefix}/share/doc/llvm"; eval LLVM_ETCDIR="${prefix}/etc/llvm"; eval LLVM_INCLUDEDIR="${prefix}/include"; eval LLVM_INFODIR="${prefix}/info"; Modified: llvm/trunk/configure URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/configure?rev=97549&r1=97548&r2=97549&view=diff ============================================================================== --- llvm/trunk/configure (original) +++ llvm/trunk/configure Mon Mar 1 23:17:21 2010 @@ -19732,7 +19732,7 @@ eval LLVM_BINDIR="${prefix}/bin"; eval LLVM_LIBDIR="${prefix}/lib"; eval LLVM_DATADIR="${prefix}/share/llvm"; -eval LLVM_DOCSDIR="${prefix}/docs/llvm"; +eval LLVM_DOCSDIR="${prefix}/share/doc/llvm"; eval LLVM_ETCDIR="${prefix}/etc/llvm"; eval LLVM_INCLUDEDIR="${prefix}/include"; eval LLVM_INFODIR="${prefix}/info"; From idadesub at users.sourceforge.net Mon Mar 1 23:32:52 2010 From: idadesub at users.sourceforge.net (Erick Tryzelaar) Date: Tue, 02 Mar 2010 05:32:52 -0000 Subject: [llvm-commits] [llvm] r97550 - /llvm/trunk/lib/VMCore/AsmWriter.cpp Message-ID: <20100302053253.0844F2A6C12C@llvm.org> Author: erickt Date: Mon Mar 1 23:32:52 2010 New Revision: 97550 URL: http://llvm.org/viewvc/llvm-project?rev=97550&view=rev Log: Fix looking up MD names to not need a module. Modified: llvm/trunk/lib/VMCore/AsmWriter.cpp Modified: llvm/trunk/lib/VMCore/AsmWriter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/AsmWriter.cpp?rev=97550&r1=97549&r2=97550&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/AsmWriter.cpp (original) +++ llvm/trunk/lib/VMCore/AsmWriter.cpp Mon Mar 1 23:32:52 2010 @@ -17,6 +17,7 @@ #include "llvm/Assembly/Writer.h" #include "llvm/Assembly/PrintModulePass.h" #include "llvm/Assembly/AsmAnnotationWriter.h" +#include "llvm/LLVMContext.h" #include "llvm/CallingConv.h" #include "llvm/Constants.h" #include "llvm/DerivedTypes.h" @@ -1236,7 +1237,6 @@ TypePrinting TypePrinter; AssemblyAnnotationWriter *AnnotationWriter; std::vector NumberedTypes; - SmallVector MDNames; public: inline AssemblyWriter(formatted_raw_ostream &o, SlotTracker &Mac, @@ -1244,8 +1244,6 @@ AssemblyAnnotationWriter *AAW) : Out(o), Machine(Mac), TheModule(M), AnnotationWriter(AAW) { AddModuleTypesToPrinter(TypePrinter, NumberedTypes, M); - if (M) - M->getMDKindNames(MDNames); } void printMDNodeBody(const MDNode *MD); @@ -1990,14 +1988,18 @@ // Print Metadata info. SmallVector, 4> InstMD; I.getAllMetadata(InstMD); - for (unsigned i = 0, e = InstMD.size(); i != e; ++i) { - unsigned Kind = InstMD[i].first; - if (Kind < MDNames.size()) { - Out << ", !" << MDNames[Kind]; - } else { - Out << ", !"; + if (!InstMD.empty()) { + SmallVector MDNames; + I.getType()->getContext().getMDKindNames(MDNames); + for (unsigned i = 0, e = InstMD.size(); i != e; ++i) { + unsigned Kind = InstMD[i].first; + if (Kind < MDNames.size()) { + Out << ", !" << MDNames[Kind]; + } else { + Out << ", !"; + } + Out << " !" << Machine.getMetadataSlot(InstMD[i].second); } - Out << " !" << Machine.getMetadataSlot(InstMD[i].second); } printInfoComment(I); } From sabre at nondot.org Mon Mar 1 23:46:42 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 02 Mar 2010 05:46:42 -0000 Subject: [llvm-commits] [www] r97552 - /www/trunk/Users.html Message-ID: <20100302054642.4D9A42A6C12C@llvm.org> Author: lattner Date: Mon Mar 1 23:46:42 2010 New Revision: 97552 URL: http://llvm.org/viewvc/llvm-project?rev=97552&view=rev Log: add real software. Modified: www/trunk/Users.html Modified: www/trunk/Users.html URL: http://llvm.org/viewvc/llvm-project/www/trunk/Users.html?rev=97552&r1=97551&r2=97552&view=diff ============================================================================== --- www/trunk/Users.html (original) +++ www/trunk/Users.html Mon Mar 1 23:46:42 2010 @@ -173,6 +173,12 @@ Compiler platform for their GPGPU, multicore CPU, and OpenCL runtime platforms. + + REAL Software + Optimizer and code generator for RBScript and REAL Studio compiler. + + Siemens Technology-to-Business Center From sabre at nondot.org Tue Mar 2 00:04:13 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 02 Mar 2010 06:04:13 -0000 Subject: [llvm-commits] [llvm] r97553 - /llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h Message-ID: <20100302060413.0D95F2A6C12C@llvm.org> Author: lattner Date: Tue Mar 2 00:04:12 2010 New Revision: 97553 URL: http://llvm.org/viewvc/llvm-project?rev=97553&view=rev Log: move some code out of DAGISelHeader up to SelectionDAGISel.h where it is shared by all targets. Modified: llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h Modified: llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h?rev=97553&r1=97552&r2=97553&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h (original) +++ llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h Tue Mar 2 00:04:12 2010 @@ -165,6 +165,55 @@ /// DAGSize - Size of DAG being instruction selected. /// unsigned DAGSize; + + /// ISelPosition - Node iterator marking the current position of + /// instruction selection as it procedes through the topologically-sorted + /// node list. + SelectionDAG::allnodes_iterator ISelPosition; + + + /// ISelUpdater - helper class to handle updates of the + /// instruction selection graph. + class ISelUpdater : public SelectionDAG::DAGUpdateListener { + SelectionDAG::allnodes_iterator &ISelPosition; + public: + explicit ISelUpdater(SelectionDAG::allnodes_iterator &isp) + : ISelPosition(isp) {} + + /// NodeDeleted - Handle nodes deleted from the graph. If the + /// node being deleted is the current ISelPosition node, update + /// ISelPosition. + /// + virtual void NodeDeleted(SDNode *N, SDNode *E) { + if (ISelPosition == SelectionDAG::allnodes_iterator(N)) + ++ISelPosition; + } + + /// NodeUpdated - Ignore updates for now. + virtual void NodeUpdated(SDNode *N) {} + }; + + /// ReplaceUses - replace all uses of the old node F with the use + /// of the new node T. + void ReplaceUses(SDValue F, SDValue T) { + ISelUpdater ISU(ISelPosition); + CurDAG->ReplaceAllUsesOfValueWith(F, T, &ISU); + } + + /// ReplaceUses - replace all uses of the old nodes F with the use + /// of the new nodes T. + void ReplaceUses(const SDValue *F, const SDValue *T, unsigned Num) { + ISelUpdater ISU(ISelPosition); + CurDAG->ReplaceAllUsesOfValuesWith(F, T, Num, &ISU); + } + + /// ReplaceUses - replace all uses of the old node F with the use + /// of the new node T. + void ReplaceUses(SDNode *F, SDNode *T) { + ISelUpdater ISU(ISelPosition); + CurDAG->ReplaceAllUsesWith(F, T, &ISU); + } + /// SelectInlineAsmMemoryOperands - Calls to this are automatically generated /// by tblgen. Others should not call it. From echristo at apple.com Tue Mar 2 00:25:00 2010 From: echristo at apple.com (Eric Christopher) Date: Tue, 02 Mar 2010 06:25:00 -0000 Subject: [llvm-commits] [llvm] r97554 - /llvm/trunk/lib/Target/ARM/ARMJITInfo.cpp Message-ID: <20100302062500.76FD62A6C12C@llvm.org> Author: echristo Date: Tue Mar 2 00:25:00 2010 New Revision: 97554 URL: http://llvm.org/viewvc/llvm-project?rev=97554&view=rev Log: Only save vector registers if we've defined for the vector registers. Fixes PR5309. Modified: llvm/trunk/lib/Target/ARM/ARMJITInfo.cpp Modified: llvm/trunk/lib/Target/ARM/ARMJITInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMJITInfo.cpp?rev=97554&r1=97553&r2=97554&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMJITInfo.cpp (original) +++ llvm/trunk/lib/Target/ARM/ARMJITInfo.cpp Tue Mar 2 00:25:00 2010 @@ -60,7 +60,7 @@ // whole compilation callback doesn't exist as far as the caller is // concerned, so we can't just preserve the callee saved regs. "stmdb sp!, {r0, r1, r2, r3, lr}\n" -#ifndef __SOFTFP__ +#ifdef __VFP_FP__ "fstmfdd sp!, {d0, d1, d2, d3, d4, d5, d6, d7}\n" #endif // The LR contains the address of the stub function on entry. @@ -83,7 +83,7 @@ // 6-20 | D0..D7 | Saved VFP registers // +--------+ // -#ifndef __SOFTFP__ +#ifdef __VFP_FP__ // Restore VFP caller-saved registers. "fldmfdd sp!, {d0, d1, d2, d3, d4, d5, d6, d7}\n" #endif From sabre at nondot.org Tue Mar 2 00:34:30 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 02 Mar 2010 06:34:30 -0000 Subject: [llvm-commits] [llvm] r97555 - in /llvm/trunk: include/llvm/CodeGen/ lib/CodeGen/SelectionDAG/ lib/Target/ARM/ lib/Target/Alpha/ lib/Target/Blackfin/ lib/Target/CellSPU/ lib/Target/MBlaze/ lib/Target/MSP430/ lib/Target/Mips/ lib/Target/PIC16/ lib/Target/PowerPC/ lib/Target/Sparc/ lib/Target/SystemZ/ lib/Target/X86/ lib/Target/XCore/ Message-ID: <20100302063430.D31A82A6C12C@llvm.org> Author: lattner Date: Tue Mar 2 00:34:30 2010 New Revision: 97555 URL: http://llvm.org/viewvc/llvm-project?rev=97555&view=rev Log: Sink InstructionSelect() out of each target into SDISel, and rename it DoInstructionSelection. Inline "SelectRoot" into it from DAGISelHeader. Sink some other stuff out of DAGISelHeader into SDISel. Eliminate the various 'Indent' stuff from various targets, which dates to when isel was recursive. 17 files changed, 114 insertions(+), 430 deletions(-) Modified: llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp llvm/trunk/lib/Target/ARM/ARMISelDAGToDAG.cpp llvm/trunk/lib/Target/Alpha/AlphaISelDAGToDAG.cpp llvm/trunk/lib/Target/Blackfin/BlackfinISelDAGToDAG.cpp llvm/trunk/lib/Target/CellSPU/SPUISelDAGToDAG.cpp llvm/trunk/lib/Target/MBlaze/MBlazeISelDAGToDAG.cpp llvm/trunk/lib/Target/MSP430/MSP430ISelDAGToDAG.cpp llvm/trunk/lib/Target/Mips/MipsISelDAGToDAG.cpp llvm/trunk/lib/Target/PIC16/PIC16ISelDAGToDAG.cpp llvm/trunk/lib/Target/PIC16/PIC16ISelDAGToDAG.h llvm/trunk/lib/Target/PowerPC/PPCISelDAGToDAG.cpp llvm/trunk/lib/Target/Sparc/SparcISelDAGToDAG.cpp llvm/trunk/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp llvm/trunk/lib/Target/XCore/XCoreISelDAGToDAG.cpp Modified: llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h?rev=97555&r1=97554&r2=97555&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h (original) +++ llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h Tue Mar 2 00:34:30 2010 @@ -21,97 +21,6 @@ #ifndef LLVM_CODEGEN_DAGISEL_HEADER_H #define LLVM_CODEGEN_DAGISEL_HEADER_H -/// ISelPosition - Node iterator marking the current position of -/// instruction selection as it procedes through the topologically-sorted -/// node list. -SelectionDAG::allnodes_iterator ISelPosition; - -/// ISelUpdater - helper class to handle updates of the -/// instruciton selection graph. -class VISIBILITY_HIDDEN ISelUpdater : public SelectionDAG::DAGUpdateListener { - SelectionDAG::allnodes_iterator &ISelPosition; -public: - explicit ISelUpdater(SelectionDAG::allnodes_iterator &isp) - : ISelPosition(isp) {} - - /// NodeDeleted - Handle nodes deleted from the graph. If the - /// node being deleted is the current ISelPosition node, update - /// ISelPosition. - /// - virtual void NodeDeleted(SDNode *N, SDNode *E) { - if (ISelPosition == SelectionDAG::allnodes_iterator(N)) - ++ISelPosition; - } - - /// NodeUpdated - Ignore updates for now. - virtual void NodeUpdated(SDNode *N) {} -}; - -/// ReplaceUses - replace all uses of the old node F with the use -/// of the new node T. -DISABLE_INLINE void ReplaceUses(SDValue F, SDValue T) { - ISelUpdater ISU(ISelPosition); - CurDAG->ReplaceAllUsesOfValueWith(F, T, &ISU); -} - -/// ReplaceUses - replace all uses of the old nodes F with the use -/// of the new nodes T. -DISABLE_INLINE void ReplaceUses(const SDValue *F, const SDValue *T, - unsigned Num) { - ISelUpdater ISU(ISelPosition); - CurDAG->ReplaceAllUsesOfValuesWith(F, T, Num, &ISU); -} - -/// ReplaceUses - replace all uses of the old node F with the use -/// of the new node T. -DISABLE_INLINE void ReplaceUses(SDNode *F, SDNode *T) { - ISelUpdater ISU(ISelPosition); - CurDAG->ReplaceAllUsesWith(F, T, &ISU); -} - -/// SelectRoot - Top level entry to DAG instruction selector. -/// Selects instructions starting at the root of the current DAG. -void SelectRoot(SelectionDAG &DAG) { - SelectRootInit(); - - // Create a dummy node (which is not added to allnodes), that adds - // a reference to the root node, preventing it from being deleted, - // and tracking any changes of the root. - HandleSDNode Dummy(CurDAG->getRoot()); - ISelPosition = SelectionDAG::allnodes_iterator(CurDAG->getRoot().getNode()); - ++ISelPosition; - - // The AllNodes list is now topological-sorted. Visit the - // nodes by starting at the end of the list (the root of the - // graph) and preceding back toward the beginning (the entry - // node). - while (ISelPosition != CurDAG->allnodes_begin()) { - SDNode *Node = --ISelPosition; - // Skip dead nodes. DAGCombiner is expected to eliminate all dead nodes, - // but there are currently some corner cases that it misses. Also, this - // makes it theoretically possible to disable the DAGCombiner. - if (Node->use_empty()) - continue; - - SDNode *ResNode = Select(Node); - - // If node should not be replaced, continue with the next one. - if (ResNode == Node) - continue; - // Replace node. - if (ResNode) - ReplaceUses(Node, ResNode); - - // If after the replacement this node is not used any more, - // remove this dead node. - if (Node->use_empty()) { // Don't delete EntryToken, etc. - ISelUpdater ISU(ISelPosition); - CurDAG->RemoveDeadNode(Node, &ISU); - } - } - - CurDAG->setRoot(Dummy.getValue()); -} #endif /* LLVM_CODEGEN_DAGISEL_HEADER_H */ Modified: llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h?rev=97555&r1=97554&r2=97555&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h (original) +++ llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h Tue Mar 2 00:34:30 2010 @@ -68,12 +68,18 @@ unsigned MakeReg(EVT VT); virtual void EmitFunctionEntryCode(Function &Fn, MachineFunction &MF) {} - virtual void InstructionSelect() = 0; - void SelectRootInit() { - DAGSize = CurDAG->AssignTopologicalOrder(); - } - + /// PreprocessISelDAG - This hook allows targets to hack on the graph before + /// instruction selection starts. + virtual void PreprocessISelDAG() {} + + /// PostprocessISelDAG() - This hook allows the target to hack on the graph + /// right after selection. + virtual void PostprocessISelDAG() {} + + /// Select - Main hook targets implement to select a node. + virtual SDNode *Select(SDNode *N) = 0; + /// SelectInlineAsmMemoryOperand - Select the specified address as a target /// addressing mode, according to the specified constraint code. If this does /// not match or is not implemented, return true. The resultant operands @@ -268,6 +274,8 @@ void CannotYetSelectIntrinsic(SDNode *N); private: + void DoInstructionSelection(); + void SelectAllBasicBlocks(Function &Fn, MachineFunction &MF, MachineModuleInfo *MMI, DwarfWriter *DW, Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp?rev=97555&r1=97554&r2=97555&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Tue Mar 2 00:34:30 2010 @@ -723,9 +723,9 @@ // code to the MachineBasicBlock. if (TimePassesIsEnabled) { NamedRegionTimer T("Instruction Selection", GroupName); - InstructionSelect(); + DoInstructionSelection(); } else { - InstructionSelect(); + DoInstructionSelection(); } DEBUG(dbgs() << "Selected selection DAG:\n"); @@ -765,6 +765,63 @@ DEBUG(BB->dump()); } +void SelectionDAGISel::DoInstructionSelection() { + DEBUG(errs() << "===== Instruction selection begins:\n"); + + PreprocessISelDAG(); + + // Select target instructions for the DAG. + { + // Number all nodes with a topological order and set DAGSize. + DAGSize = CurDAG->AssignTopologicalOrder(); + + // Create a dummy node (which is not added to allnodes), that adds + // a reference to the root node, preventing it from being deleted, + // and tracking any changes of the root. + HandleSDNode Dummy(CurDAG->getRoot()); + ISelPosition = SelectionDAG::allnodes_iterator(CurDAG->getRoot().getNode()); + ++ISelPosition; + + // The AllNodes list is now topological-sorted. Visit the + // nodes by starting at the end of the list (the root of the + // graph) and preceding back toward the beginning (the entry + // node). + while (ISelPosition != CurDAG->allnodes_begin()) { + SDNode *Node = --ISelPosition; + // Skip dead nodes. DAGCombiner is expected to eliminate all dead nodes, + // but there are currently some corner cases that it misses. Also, this + // makes it theoretically possible to disable the DAGCombiner. + if (Node->use_empty()) + continue; + + SDNode *ResNode = Select(Node); + + // If node should not be replaced, continue with the next one. + if (ResNode == Node) + continue; + // Replace node. + if (ResNode) + ReplaceUses(Node, ResNode); + + // If after the replacement this node is not used any more, + // remove this dead node. + if (Node->use_empty()) { // Don't delete EntryToken, etc. + ISelUpdater ISU(ISelPosition); + CurDAG->RemoveDeadNode(Node, &ISU); + } + } + + CurDAG->setRoot(Dummy.getValue()); + } + DEBUG(errs() << "===== Instruction selection ends:\n"); + + PostprocessISelDAG(); + + // FIXME: This shouldn't be needed, remove it. + CurDAG->RemoveDeadNodes(); +} + + void SelectionDAGISel::SelectAllBasicBlocks(Function &Fn, MachineFunction &MF, MachineModuleInfo *MMI, Modified: llvm/trunk/lib/Target/ARM/ARMISelDAGToDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMISelDAGToDAG.cpp?rev=97555&r1=97554&r2=97555&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMISelDAGToDAG.cpp (original) +++ llvm/trunk/lib/Target/ARM/ARMISelDAGToDAG.cpp Tue Mar 2 00:34:30 2010 @@ -58,8 +58,6 @@ return "ARM Instruction Selection"; } - virtual void InstructionSelect(); - /// getI32Imm - Return a target constant of type i32 with the specified /// value. inline SDValue getI32Imm(unsigned Imm) { @@ -203,11 +201,6 @@ } -void ARMDAGToDAGISel::InstructionSelect() { - SelectRoot(*CurDAG); - CurDAG->RemoveDeadNodes(); -} - bool ARMDAGToDAGISel::SelectShifterOperandReg(SDNode *Op, SDValue N, SDValue &BaseReg, Modified: llvm/trunk/lib/Target/Alpha/AlphaISelDAGToDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Alpha/AlphaISelDAGToDAG.cpp?rev=97555&r1=97554&r2=97555&view=diff ============================================================================== --- llvm/trunk/lib/Target/Alpha/AlphaISelDAGToDAG.cpp (original) +++ llvm/trunk/lib/Target/Alpha/AlphaISelDAGToDAG.cpp Tue Mar 2 00:34:30 2010 @@ -159,10 +159,6 @@ // target-specific node if it hasn't already been changed. SDNode *Select(SDNode *N); - /// InstructionSelect - This callback is invoked by - /// SelectionDAGISel when it has created a SelectionDAG for us to codegen. - virtual void InstructionSelect(); - virtual const char *getPassName() const { return "Alpha DAG->DAG Pattern Instruction Selection"; } @@ -222,20 +218,11 @@ return CurDAG->getRegister(GlobalRetAddr, TLI.getPointerTy()).getNode(); } -/// InstructionSelect - This callback is invoked by -/// SelectionDAGISel when it has created a SelectionDAG for us to codegen. -void AlphaDAGToDAGISel::InstructionSelect() { - // Select target instructions for the DAG. - SelectRoot(*CurDAG); - CurDAG->RemoveDeadNodes(); -} - // Select - Convert the specified operand from a target-independent to a // target-specific node if it hasn't already been changed. SDNode *AlphaDAGToDAGISel::Select(SDNode *N) { - if (N->isMachineOpcode()) { + if (N->isMachineOpcode()) return NULL; // Already selected. - } DebugLoc dl = N->getDebugLoc(); switch (N->getOpcode()) { Modified: llvm/trunk/lib/Target/Blackfin/BlackfinISelDAGToDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Blackfin/BlackfinISelDAGToDAG.cpp?rev=97555&r1=97554&r2=97555&view=diff ============================================================================== --- llvm/trunk/lib/Target/Blackfin/BlackfinISelDAGToDAG.cpp (original) +++ llvm/trunk/lib/Target/Blackfin/BlackfinISelDAGToDAG.cpp Tue Mar 2 00:34:30 2010 @@ -41,7 +41,7 @@ BlackfinDAGToDAGISel(BlackfinTargetMachine &TM, CodeGenOpt::Level OptLevel) : SelectionDAGISel(TM, OptLevel) {} - virtual void InstructionSelect(); + virtual void PostprocessISelDAG(); virtual const char *getPassName() const { return "Blackfin DAG->DAG Pattern Instruction Selection"; @@ -72,13 +72,7 @@ return new BlackfinDAGToDAGISel(TM, OptLevel); } -/// InstructionSelect - This callback is invoked by -/// SelectionDAGISel when it has created a SelectionDAG for us to codegen. -void BlackfinDAGToDAGISel::InstructionSelect() { - // Select target instructions for the DAG. - SelectRoot(*CurDAG); - DEBUG(errs() << "Selected selection DAG before regclass fixup:\n"); - DEBUG(CurDAG->dump()); +void BlackfinDAGToDAGISel::PostprocessISelDAG() { FixRegisterClasses(*CurDAG); } Modified: llvm/trunk/lib/Target/CellSPU/SPUISelDAGToDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CellSPU/SPUISelDAGToDAG.cpp?rev=97555&r1=97554&r2=97555&view=diff ============================================================================== --- llvm/trunk/lib/Target/CellSPU/SPUISelDAGToDAG.cpp (original) +++ llvm/trunk/lib/Target/CellSPU/SPUISelDAGToDAG.cpp Tue Mar 2 00:34:30 2010 @@ -399,10 +399,6 @@ return false; } - /// InstructionSelect - This callback is invoked by - /// SelectionDAGISel when it has created a SelectionDAG for us to codegen. - virtual void InstructionSelect(); - virtual const char *getPassName() const { return "Cell SPU DAG->DAG Pattern Instruction Selection"; } @@ -420,16 +416,6 @@ }; } -/// InstructionSelect - This callback is invoked by -/// SelectionDAGISel when it has created a SelectionDAG for us to codegen. -void -SPUDAGToDAGISel::InstructionSelect() -{ - // Select target instructions for the DAG. - SelectRoot(*CurDAG); - CurDAG->RemoveDeadNodes(); -} - /*! \arg Op The ISD instruction operand \arg N The address to be tested Modified: llvm/trunk/lib/Target/MBlaze/MBlazeISelDAGToDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MBlaze/MBlazeISelDAGToDAG.cpp?rev=97555&r1=97554&r2=97555&view=diff ============================================================================== --- llvm/trunk/lib/Target/MBlaze/MBlazeISelDAGToDAG.cpp (original) +++ llvm/trunk/lib/Target/MBlaze/MBlazeISelDAGToDAG.cpp Tue Mar 2 00:34:30 2010 @@ -59,8 +59,6 @@ SelectionDAGISel(tm), TM(tm), Subtarget(tm.getSubtarget()) {} - virtual void InstructionSelect(); - // Pass Name virtual const char *getPassName() const { return "MBlaze DAG->DAG Pattern Instruction Selection"; @@ -96,11 +94,6 @@ inline SDValue getI32Imm(unsigned Imm) { return CurDAG->getTargetConstant(Imm, MVT::i32); } - - - #ifndef NDEBUG - unsigned Indent; - #endif }; } @@ -125,20 +118,6 @@ return isIntS32Immediate(Op.getNode(), Imm); } -/// InstructionSelect - This callback is invoked by -/// SelectionDAGISel when it has created a SelectionDAG for us to codegen. -void MBlazeDAGToDAGISel::InstructionSelect() { - // Codegen the basic block. - DEBUG(errs() << "===== Instruction selection begins:\n"); - DEBUG(Indent = 0); - - // Select target instructions for the DAG. - SelectRoot(*CurDAG); - - DEBUG(errs() << "===== Instruction selection ends:\n"); - - CurDAG->RemoveDeadNodes(); -} /// SelectAddressRegReg - Given the specified addressed, check to see if it /// can be represented as an indexed [r+r] operation. Returns false if it @@ -269,17 +248,11 @@ DebugLoc dl = Node->getDebugLoc(); // Dump information about the Node being selected - DEBUG(errs().indent(Indent) << "Selecting: "; - Node->dump(CurDAG); - errs() << "\n"); - DEBUG(Indent += 2); + DEBUG(errs() << "Selecting: "; Node->dump(CurDAG); errs() << "\n"); // If we have a custom node, we already have selected! if (Node->isMachineOpcode()) { - DEBUG(errs().indent(Indent-2) << "== "; - Node->dump(CurDAG); - errs() << "\n"); - DEBUG(Indent -= 2); + DEBUG(errs() << "== "; Node->dump(CurDAG); errs() << "\n"); return NULL; } @@ -350,14 +323,12 @@ // Select the default instruction SDNode *ResNode = SelectCode(Node); - DEBUG(errs().indent(Indent-2) << "=> "); + DEBUG(errs() << "=> "); if (ResNode == NULL || ResNode == Node) DEBUG(Node->dump(CurDAG)); else DEBUG(ResNode->dump(CurDAG)); DEBUG(errs() << "\n"); - DEBUG(Indent -= 2); - return ResNode; } Modified: llvm/trunk/lib/Target/MSP430/MSP430ISelDAGToDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MSP430/MSP430ISelDAGToDAG.cpp?rev=97555&r1=97554&r2=97555&view=diff ============================================================================== --- llvm/trunk/lib/Target/MSP430/MSP430ISelDAGToDAG.cpp (original) +++ llvm/trunk/lib/Target/MSP430/MSP430ISelDAGToDAG.cpp Tue Mar 2 00:34:30 2010 @@ -26,7 +26,6 @@ #include "llvm/CodeGen/SelectionDAG.h" #include "llvm/CodeGen/SelectionDAGISel.h" #include "llvm/Target/TargetLowering.h" -#include "llvm/Support/CommandLine.h" #include "llvm/Support/Compiler.h" #include "llvm/Support/Debug.h" #include "llvm/Support/ErrorHandling.h" @@ -35,14 +34,6 @@ using namespace llvm; -#ifndef NDEBUG -static cl::opt -ViewRMWDAGs("view-msp430-rmw-dags", cl::Hidden, - cl::desc("Pop up a window to show isel dags after RMW preprocess")); -#else -static const bool ViewRMWDAGs = false; -#endif - STATISTIC(NumLoadMoved, "Number of loads moved below TokenFactor"); @@ -123,7 +114,8 @@ Lowering(*TM.getTargetLowering()), Subtarget(*TM.getSubtargetImpl()) { } - virtual void InstructionSelect(); + virtual void PreprocessISelDAG(); + virtual void PostprocessISelDAG(); virtual const char *getPassName() const { return "MSP430 DAG->DAG Pattern Instruction Selection"; @@ -151,10 +143,6 @@ unsigned Opc8, unsigned Opc16); bool SelectAddr(SDNode *Op, SDValue Addr, SDValue &Base, SDValue &Disp); - - #ifndef NDEBUG - unsigned Indent; - #endif }; } // end anonymous namespace @@ -681,28 +669,11 @@ } -/// InstructionSelect - This callback is invoked by -/// SelectionDAGISel when it has created a SelectionDAG for us to codegen. -void MSP430DAGToDAGISel::InstructionSelect() { - std::string BlockName; - if (ViewRMWDAGs) - BlockName = MF->getFunction()->getNameStr() + ":" + - BB->getBasicBlock()->getNameStr(); - +void MSP430DAGToDAGISel::PreprocessISelDAG() { PreprocessForRMW(); +} - if (ViewRMWDAGs) CurDAG->viewGraph("RMW preprocessed:" + BlockName); - - DEBUG(errs() << "Selection DAG after RMW preprocessing:\n"); - DEBUG(CurDAG->dump()); - - // Codegen the basic block. - DEBUG(errs() << "===== Instruction selection begins:\n"); - DEBUG(Indent = 0); - SelectRoot(*CurDAG); - DEBUG(errs() << "===== Instruction selection ends:\n"); - - CurDAG->RemoveDeadNodes(); +void MSP430DAGToDAGISel::PostprocessISelDAG() { RMWStores.clear(); } @@ -710,17 +681,15 @@ DebugLoc dl = Node->getDebugLoc(); // Dump information about the Node being selected - DEBUG(errs().indent(Indent) << "Selecting: "); + DEBUG(errs() << "Selecting: "); DEBUG(Node->dump(CurDAG)); DEBUG(errs() << "\n"); - DEBUG(Indent += 2); // If we have a custom node, we already have selected! if (Node->isMachineOpcode()) { - DEBUG(errs().indent(Indent-2) << "== "; + DEBUG(errs() << "== "; Node->dump(CurDAG); errs() << "\n"); - DEBUG(Indent -= 2); return NULL; } @@ -808,13 +777,12 @@ // Select the default instruction SDNode *ResNode = SelectCode(Node); - DEBUG(errs() << std::string(Indent-2, ' ') << "=> "); + DEBUG(errs() << "=> "); if (ResNode == NULL || ResNode == Node) DEBUG(Node->dump(CurDAG)); else DEBUG(ResNode->dump(CurDAG)); DEBUG(errs() << "\n"); - DEBUG(Indent -= 2); return ResNode; } Modified: llvm/trunk/lib/Target/Mips/MipsISelDAGToDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsISelDAGToDAG.cpp?rev=97555&r1=97554&r2=97555&view=diff ============================================================================== --- llvm/trunk/lib/Target/Mips/MipsISelDAGToDAG.cpp (original) +++ llvm/trunk/lib/Target/Mips/MipsISelDAGToDAG.cpp Tue Mar 2 00:34:30 2010 @@ -59,8 +59,6 @@ SelectionDAGISel(tm), TM(tm), Subtarget(tm.getSubtarget()) {} - virtual void InstructionSelect(); - // Pass Name virtual const char *getPassName() const { return "MIPS DAG->DAG Pattern Instruction Selection"; @@ -98,29 +96,10 @@ inline SDValue getI32Imm(unsigned Imm) { return CurDAG->getTargetConstant(Imm, MVT::i32); } - - - #ifndef NDEBUG - unsigned Indent; - #endif }; } -/// InstructionSelect - This callback is invoked by -/// SelectionDAGISel when it has created a SelectionDAG for us to codegen. -void MipsDAGToDAGISel::InstructionSelect() { - // Codegen the basic block. - DEBUG(errs() << "===== Instruction selection begins:\n"); - DEBUG(Indent = 0); - - // Select target instructions for the DAG. - SelectRoot(*CurDAG); - - DEBUG(errs() << "===== Instruction selection ends:\n"); - - CurDAG->RemoveDeadNodes(); -} /// getGlobalBaseReg - Output the instructions required to put the /// GOT address into a register. @@ -329,17 +308,11 @@ DebugLoc dl = Node->getDebugLoc(); // Dump information about the Node being selected - DEBUG(errs().indent(Indent) << "Selecting: "; - Node->dump(CurDAG); - errs() << "\n"); - DEBUG(Indent += 2); + DEBUG(errs() << "Selecting: "; Node->dump(CurDAG); errs() << "\n"); // If we have a custom node, we already have selected! if (Node->isMachineOpcode()) { - DEBUG(errs().indent(Indent-2) << "== "; - Node->dump(CurDAG); - errs() << "\n"); - DEBUG(Indent -= 2); + DEBUG(errs() << "== "; Node->dump(CurDAG); errs() << "\n"); return NULL; } @@ -547,14 +520,12 @@ // Select the default instruction SDNode *ResNode = SelectCode(Node); - DEBUG(errs().indent(Indent-2) << "=> "); + DEBUG(errs() << "=> "); if (ResNode == NULL || ResNode == Node) DEBUG(Node->dump(CurDAG)); else DEBUG(ResNode->dump(CurDAG)); DEBUG(errs() << "\n"); - DEBUG(Indent -= 2); - return ResNode; } Modified: llvm/trunk/lib/Target/PIC16/PIC16ISelDAGToDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PIC16/PIC16ISelDAGToDAG.cpp?rev=97555&r1=97554&r2=97555&view=diff ============================================================================== --- llvm/trunk/lib/Target/PIC16/PIC16ISelDAGToDAG.cpp (original) +++ llvm/trunk/lib/Target/PIC16/PIC16ISelDAGToDAG.cpp Tue Mar 2 00:34:30 2010 @@ -24,13 +24,6 @@ } -/// InstructionSelect - This callback is invoked by -/// SelectionDAGISel when it has created a SelectionDAG for us to codegen. -void PIC16DAGToDAGISel::InstructionSelect() { - SelectRoot(*CurDAG); - CurDAG->RemoveDeadNodes(); -} - /// Select - Select instructions not customized! Used for /// expanded, promoted and normal instructions. SDNode* PIC16DAGToDAGISel::Select(SDNode *N) { Modified: llvm/trunk/lib/Target/PIC16/PIC16ISelDAGToDAG.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PIC16/PIC16ISelDAGToDAG.h?rev=97555&r1=97554&r2=97555&view=diff ============================================================================== --- llvm/trunk/lib/Target/PIC16/PIC16ISelDAGToDAG.h (original) +++ llvm/trunk/lib/Target/PIC16/PIC16ISelDAGToDAG.h Tue Mar 2 00:34:30 2010 @@ -48,8 +48,6 @@ return "PIC16 DAG->DAG Pattern Instruction Selection"; } - virtual void InstructionSelect(); - private: // Include the pieces autogenerated from the target description. #include "PIC16GenDAGISel.inc" Modified: llvm/trunk/lib/Target/PowerPC/PPCISelDAGToDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCISelDAGToDAG.cpp?rev=97555&r1=97554&r2=97555&view=diff ============================================================================== --- llvm/trunk/lib/Target/PowerPC/PPCISelDAGToDAG.cpp (original) +++ llvm/trunk/lib/Target/PowerPC/PPCISelDAGToDAG.cpp Tue Mar 2 00:34:30 2010 @@ -156,10 +156,6 @@ SDValue BuildSDIVSequence(SDNode *N); SDValue BuildUDIVSequence(SDNode *N); - /// InstructionSelect - This callback is invoked by - /// SelectionDAGISel when it has created a SelectionDAG for us to codegen. - virtual void InstructionSelect(); - void InsertVRSaveCode(MachineFunction &MF); virtual const char *getPassName() const { @@ -184,14 +180,6 @@ }; } -/// InstructionSelect - This callback is invoked by -/// SelectionDAGISel when it has created a SelectionDAG for us to codegen. -void PPCDAGToDAGISel::InstructionSelect() { - // Select target instructions for the DAG. - SelectRoot(*CurDAG); - CurDAG->RemoveDeadNodes(); -} - /// InsertVRSaveCode - Once the entire function has been instruction selected, /// all virtual registers are created and all machine instructions are built, /// check to see if we need to save/restore VRSAVE. If so, do it. Modified: llvm/trunk/lib/Target/Sparc/SparcISelDAGToDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Sparc/SparcISelDAGToDAG.cpp?rev=97555&r1=97554&r2=97555&view=diff ============================================================================== --- llvm/trunk/lib/Target/Sparc/SparcISelDAGToDAG.cpp (original) +++ llvm/trunk/lib/Target/Sparc/SparcISelDAGToDAG.cpp Tue Mar 2 00:34:30 2010 @@ -35,7 +35,6 @@ /// make the right decision when generating code for different targets. const SparcSubtarget &Subtarget; SparcTargetMachine& TM; - MachineBasicBlock *CurBB; public: explicit SparcDAGToDAGISel(SparcTargetMachine &tm) : SelectionDAGISel(tm), @@ -56,10 +55,6 @@ char ConstraintCode, std::vector &OutOps); - /// InstructionSelect - This callback is invoked by - /// SelectionDAGISel when it has created a SelectionDAG for us to codegen. - virtual void InstructionSelect(); - virtual const char *getPassName() const { return "SPARC DAG->DAG Pattern Instruction Selection"; } @@ -72,17 +67,8 @@ }; } // end anonymous namespace -/// InstructionSelect - This callback is invoked by -/// SelectionDAGISel when it has created a SelectionDAG for us to codegen. -void SparcDAGToDAGISel::InstructionSelect() { - CurBB = BB; - // Select target instructions for the DAG. - SelectRoot(*CurDAG); - CurDAG->RemoveDeadNodes(); -} - SDNode* SparcDAGToDAGISel::getGlobalBaseReg() { - MachineFunction *MF = CurBB->getParent(); + MachineFunction *MF = BB->getParent(); unsigned GlobalBaseReg = TM.getInstrInfo()->getGlobalBaseReg(MF); return CurDAG->getRegister(GlobalBaseReg, TLI.getPointerTy()).getNode(); } Modified: llvm/trunk/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp?rev=97555&r1=97554&r2=97555&view=diff ============================================================================== --- llvm/trunk/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp (original) +++ llvm/trunk/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp Tue Mar 2 00:34:30 2010 @@ -100,8 +100,6 @@ Lowering(*TM.getTargetLowering()), Subtarget(*TM.getSubtargetImpl()) { } - virtual void InstructionSelect(); - virtual const char *getPassName() const { return "SystemZ DAG->DAG Pattern Instruction Selection"; } @@ -152,10 +150,6 @@ bool MatchAddressBase(SDValue N, SystemZRRIAddressMode &AM); bool MatchAddressRI(SDValue N, SystemZRRIAddressMode &AM, bool is12Bit); - - #ifndef NDEBUG - unsigned Indent; - #endif }; } // end anonymous namespace @@ -599,35 +593,17 @@ return false; } -/// InstructionSelect - This callback is invoked by -/// SelectionDAGISel when it has created a SelectionDAG for us to codegen. -void SystemZDAGToDAGISel::InstructionSelect() { - // Codegen the basic block. - DEBUG(errs() << "===== Instruction selection begins:\n"); - DEBUG(Indent = 0); - SelectRoot(*CurDAG); - DEBUG(errs() << "===== Instruction selection ends:\n"); - - CurDAG->RemoveDeadNodes(); -} - SDNode *SystemZDAGToDAGISel::Select(SDNode *Node) { EVT NVT = Node->getValueType(0); DebugLoc dl = Node->getDebugLoc(); unsigned Opcode = Node->getOpcode(); // Dump information about the Node being selected - DEBUG(errs().indent(Indent) << "Selecting: "; - Node->dump(CurDAG); - errs() << "\n"); - DEBUG(Indent += 2); + DEBUG(errs() << "Selecting: "; Node->dump(CurDAG); errs() << "\n"); // If we have a custom node, we already have selected! if (Node->isMachineOpcode()) { - DEBUG(errs().indent(Indent-2) << "== "; - Node->dump(CurDAG); - errs() << "\n"); - DEBUG(Indent -= 2); + DEBUG(errs() << "== "; Node->dump(CurDAG); errs() << "\n"); return NULL; // Already selected. } @@ -693,9 +669,7 @@ MVT::i32)); ReplaceUses(SDValue(Node, 0), SDValue(Div, 0)); - DEBUG(errs().indent(Indent-2) << "=> "; - Result->dump(CurDAG); - errs() << "\n"); + DEBUG(errs() << "=> "; Result->dump(CurDAG); errs() << "\n"); } // Copy the remainder (even subreg) result, if it is needed. @@ -708,15 +682,9 @@ MVT::i32)); ReplaceUses(SDValue(Node, 1), SDValue(Rem, 0)); - DEBUG(errs().indent(Indent-2) << "=> "; - Result->dump(CurDAG); - errs() << "\n"); + DEBUG(errs() << "=> "; Result->dump(CurDAG); errs() << "\n"); } -#ifndef NDEBUG - Indent -= 2; -#endif - return NULL; } case ISD::UDIVREM: { @@ -782,9 +750,7 @@ CurDAG->getTargetConstant(SubRegIdx, MVT::i32)); ReplaceUses(SDValue(Node, 0), SDValue(Div, 0)); - DEBUG(errs().indent(Indent-2) << "=> "; - Result->dump(CurDAG); - errs() << "\n"); + DEBUG(errs() << "=> "; Result->dump(CurDAG); errs() << "\n"); } // Copy the remainder (even subreg) result, if it is needed. @@ -796,15 +762,9 @@ CurDAG->getTargetConstant(SubRegIdx, MVT::i32)); ReplaceUses(SDValue(Node, 1), SDValue(Rem, 0)); - DEBUG(errs().indent(Indent-2) << "=> "; - Result->dump(CurDAG); - errs() << "\n"); + DEBUG(errs() << "=> "; Result->dump(CurDAG); errs() << "\n"); } -#ifndef NDEBUG - Indent -= 2; -#endif - return NULL; } } @@ -812,14 +772,12 @@ // Select the default instruction SDNode *ResNode = SelectCode(Node); - DEBUG(errs().indent(Indent-2) << "=> "; + DEBUG(errs() << "=> "; if (ResNode == NULL || ResNode == Node) Node->dump(CurDAG); else ResNode->dump(CurDAG); errs() << "\n"; ); - DEBUG(Indent -= 2); - return ResNode; } Modified: llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp?rev=97555&r1=97554&r2=97555&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp (original) +++ llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp Tue Mar 2 00:34:30 2010 @@ -168,14 +168,12 @@ return "X86 DAG->DAG Instruction Selection"; } - /// InstructionSelect - This callback is invoked by - /// SelectionDAGISel when it has created a SelectionDAG for us to codegen. - virtual void InstructionSelect(); - virtual void EmitFunctionEntryCode(Function &Fn, MachineFunction &MF); virtual bool IsProfitableToFold(SDValue N, SDNode *U, SDNode *Root) const; + virtual void PreprocessISelDAG(); + // Include the pieces autogenerated from the target description. #include "X86GenDAGISel.inc" @@ -208,6 +206,7 @@ SDValue &Base, SDValue &Scale, SDValue &Index, SDValue &Disp, SDValue &Segment); + void PreprocessForRMW(); void PreprocessForFPConvert(); @@ -286,10 +285,6 @@ const X86InstrInfo *getInstrInfo() { return getTargetMachine().getInstrInfo(); } - -#ifndef NDEBUG - unsigned Indent; -#endif }; } @@ -669,29 +664,14 @@ } } -/// InstructionSelectBasicBlock - This callback is invoked by SelectionDAGISel -/// when it has created a SelectionDAG for us to codegen. -void X86DAGToDAGISel::InstructionSelect() { - const Function *F = MF->getFunction(); - OptForSize = F->hasFnAttr(Attribute::OptimizeForSize); +void X86DAGToDAGISel::PreprocessISelDAG() { + OptForSize = MF->getFunction()->hasFnAttr(Attribute::OptimizeForSize); if (OptLevel != CodeGenOpt::None) PreprocessForRMW(); // FIXME: This should only happen when not compiled with -O0. PreprocessForFPConvert(); - - // Codegen the basic block. -#ifndef NDEBUG - DEBUG(dbgs() << "===== Instruction selection begins:\n"); - Indent = 0; -#endif - SelectRoot(*CurDAG); -#ifndef NDEBUG - DEBUG(dbgs() << "===== Instruction selection ends:\n"); -#endif - - CurDAG->RemoveDeadNodes(); } /// EmitSpecialCodeForMain - Emit any code that needs to be executed only in @@ -1694,24 +1674,10 @@ unsigned Opcode = Node->getOpcode(); DebugLoc dl = Node->getDebugLoc(); -#ifndef NDEBUG - DEBUG({ - dbgs() << std::string(Indent, ' ') << "Selecting: "; - Node->dump(CurDAG); - dbgs() << '\n'; - }); - Indent += 2; -#endif + DEBUG(dbgs() << "Selecting: "; Node->dump(CurDAG); dbgs() << '\n'); if (Node->isMachineOpcode()) { -#ifndef NDEBUG - DEBUG({ - dbgs() << std::string(Indent-2, ' ') << "== "; - Node->dump(CurDAG); - dbgs() << '\n'; - }); - Indent -= 2; -#endif + DEBUG(dbgs() << "== "; Node->dump(CurDAG); dbgs() << '\n'); return NULL; // Already selected. } @@ -1807,13 +1773,7 @@ LoReg, NVT, InFlag); InFlag = Result.getValue(2); ReplaceUses(SDValue(Node, 0), Result); -#ifndef NDEBUG - DEBUG({ - dbgs() << std::string(Indent-2, ' ') << "=> "; - Result.getNode()->dump(CurDAG); - dbgs() << '\n'; - }); -#endif + DEBUG(dbgs() << "=> "; Result.getNode()->dump(CurDAG); dbgs() << '\n'); } // Copy the high half of the result, if it is needed. if (!SDValue(Node, 1).use_empty()) { @@ -1836,19 +1796,9 @@ InFlag = Result.getValue(2); } ReplaceUses(SDValue(Node, 1), Result); -#ifndef NDEBUG - DEBUG({ - dbgs() << std::string(Indent-2, ' ') << "=> "; - Result.getNode()->dump(CurDAG); - dbgs() << '\n'; - }); -#endif + DEBUG(dbgs() << "=> "; Result.getNode()->dump(CurDAG); dbgs() << '\n'); } -#ifndef NDEBUG - Indent -= 2; -#endif - return NULL; } @@ -1963,13 +1913,7 @@ LoReg, NVT, InFlag); InFlag = Result.getValue(2); ReplaceUses(SDValue(Node, 0), Result); -#ifndef NDEBUG - DEBUG({ - dbgs() << std::string(Indent-2, ' ') << "=> "; - Result.getNode()->dump(CurDAG); - dbgs() << '\n'; - }); -#endif + DEBUG(dbgs() << "=> "; Result.getNode()->dump(CurDAG); dbgs() << '\n'); } // Copy the remainder (high) result, if it is needed. if (!SDValue(Node, 1).use_empty()) { @@ -1993,19 +1937,8 @@ InFlag = Result.getValue(2); } ReplaceUses(SDValue(Node, 1), Result); -#ifndef NDEBUG - DEBUG({ - dbgs() << std::string(Indent-2, ' ') << "=> "; - Result.getNode()->dump(CurDAG); - dbgs() << '\n'; - }); -#endif + DEBUG(dbgs() << "=> "; Result.getNode()->dump(CurDAG); dbgs() << '\n'); } - -#ifndef NDEBUG - Indent -= 2; -#endif - return NULL; } @@ -2118,17 +2051,12 @@ SDNode *ResNode = SelectCode(Node); -#ifndef NDEBUG - DEBUG({ - dbgs() << std::string(Indent-2, ' ') << "=> "; - if (ResNode == NULL || ResNode == Node) - Node->dump(CurDAG); - else - ResNode->dump(CurDAG); - dbgs() << '\n'; - }); - Indent -= 2; -#endif + DEBUG(dbgs() << "=> "; + if (ResNode == NULL || ResNode == Node) + Node->dump(CurDAG); + else + ResNode->dump(CurDAG); + dbgs() << '\n'); return ResNode; } Modified: llvm/trunk/lib/Target/XCore/XCoreISelDAGToDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/XCore/XCoreISelDAGToDAG.cpp?rev=97555&r1=97554&r2=97555&view=diff ============================================================================== --- llvm/trunk/lib/Target/XCore/XCoreISelDAGToDAG.cpp (original) +++ llvm/trunk/lib/Target/XCore/XCoreISelDAGToDAG.cpp Tue Mar 2 00:34:30 2010 @@ -65,8 +65,6 @@ bool SelectADDRcpii(SDNode *Op, SDValue Addr, SDValue &Base, SDValue &Offset); - virtual void InstructionSelect(); - virtual const char *getPassName() const { return "XCore DAG->DAG Pattern Instruction Selection"; } @@ -147,15 +145,6 @@ return false; } -/// InstructionSelect - This callback is invoked by -/// SelectionDAGISel when it has created a SelectionDAG for us to codegen. -void XCoreDAGToDAGISel::InstructionSelect() { - // Select target instructions for the DAG. - SelectRoot(*CurDAG); - - CurDAG->RemoveDeadNodes(); -} - SDNode *XCoreDAGToDAGISel::Select(SDNode *N) { DebugLoc dl = N->getDebugLoc(); EVT NVT = N->getValueType(0); From sabre at nondot.org Tue Mar 2 00:36:28 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 02 Mar 2010 06:36:28 -0000 Subject: [llvm-commits] [llvm] r97556 - in /llvm/trunk: include/llvm/CodeGen/DAGISelHeader.h utils/TableGen/DAGISelEmitter.cpp Message-ID: <20100302063628.5AF3C2A6C12C@llvm.org> Author: lattner Date: Tue Mar 2 00:36:28 2010 New Revision: 97556 URL: http://llvm.org/viewvc/llvm-project?rev=97556&view=rev Log: eliminate CodeGen/DAGISelHeader.h, it is empty now. Removed: llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h Modified: llvm/trunk/utils/TableGen/DAGISelEmitter.cpp Removed: llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h?rev=97555&view=auto ============================================================================== --- llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h (original) +++ llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h (removed) @@ -1,26 +0,0 @@ -//==-llvm/CodeGen/DAGISelHeader.h - Common DAG ISel definitions -*- C++ -*-==// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file provides definitions of the common, target-independent methods and -// data, which is used by SelectionDAG-based instruction selectors. -// -// *** NOTE: This file is #included into the middle of the target -// instruction selector class. These functions are really methods. -// This is a little awkward, but it allows this code to be shared -// by all the targets while still being able to call into -// target-specific code without using a virtual function call. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_DAGISEL_HEADER_H -#define LLVM_CODEGEN_DAGISEL_HEADER_H - - - -#endif /* LLVM_CODEGEN_DAGISEL_HEADER_H */ Modified: llvm/trunk/utils/TableGen/DAGISelEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelEmitter.cpp?rev=97556&r1=97555&r2=97556&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelEmitter.cpp (original) +++ llvm/trunk/utils/TableGen/DAGISelEmitter.cpp Tue Mar 2 00:36:28 2010 @@ -195,10 +195,6 @@ << "// *** instruction selector class. These functions are really " << "methods.\n\n"; - OS << "// Include standard, target-independent definitions and methods used\n" - << "// by the instruction selector.\n"; - OS << "#include \"llvm/CodeGen/DAGISelHeader.h\"\n\n"; - DEBUG(errs() << "\n\nALL PATTERNS TO MATCH:\n\n"; for (CodeGenDAGPatterns::ptm_iterator I = CGP.ptm_begin(), E = CGP.ptm_end(); I != E; ++I) { From sabre at nondot.org Tue Mar 2 00:36:51 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 02 Mar 2010 06:36:51 -0000 Subject: [llvm-commits] [llvm] r97557 - /llvm/trunk/docs/LangRef.html Message-ID: <20100302063651.8B4462A6C12C@llvm.org> Author: lattner Date: Tue Mar 2 00:36:51 2010 New Revision: 97557 URL: http://llvm.org/viewvc/llvm-project?rev=97557&view=rev Log: attributes are not part of types anymore, patch by James Woodyatt! Modified: llvm/trunk/docs/LangRef.html Modified: llvm/trunk/docs/LangRef.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/LangRef.html?rev=97557&r1=97556&r2=97557&view=diff ============================================================================== --- llvm/trunk/docs/LangRef.html (original) +++ llvm/trunk/docs/LangRef.html Tue Mar 2 00:36:51 2010 @@ -1664,7 +1664,7 @@ which indicates that the function takes a variable number of arguments. Variable argument functions can access their arguments with the variable argument handling intrinsic - functions. '<returntype>' is a any type except + functions. '<returntype>' is any type except label.

    Examples:
    @@ -1674,12 +1674,11 @@ function taking an i32, returning an i32 - float (i16 signext, i32 *) * + float (i16, i32 *) * Pointer to a function that takes - an i16 that should be sign extended and a - pointer to i32, returning - float. + an i16 and a pointer to i32, + returning float. i32 (i8*, ...) @@ -2888,9 +2887,10 @@ function to be invoked.
  • 'function args': argument list whose types match the function - signature argument types. If the function signature indicates the - function accepts a variable number of arguments, the extra arguments can - be specified.
  • + signature argument types and parameter attributes. All arguments must be + of first class type. If the function + signature indicates the function accepts a variable number of arguments, + the extra arguments can be specified.
  • 'normal label': the label reached when the called function executes a 'ret' instruction.
  • @@ -5171,10 +5171,10 @@ to function value.
  • 'function args': argument list whose types match the function - signature argument types. All arguments must be of - first class type. If the function signature - indicates the function accepts a variable number of arguments, the extra - arguments can be specified.
  • + signature argument types and parameter attributes. All arguments must be + of first class type. If the function + signature indicates the function accepts a variable number of arguments, + the extra arguments can be specified.
  • The optional function attributes list. Only 'noreturn', 'nounwind', 'readonly' and From sabre at nondot.org Tue Mar 2 00:55:04 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 02 Mar 2010 06:55:04 -0000 Subject: [llvm-commits] [llvm] r97558 - in /llvm/trunk: include/llvm/CodeGen/SelectionDAGISel.h lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Message-ID: <20100302065504.D54B42A6C12C@llvm.org> Author: lattner Date: Tue Mar 2 00:55:04 2010 New Revision: 97558 URL: http://llvm.org/viewvc/llvm-project?rev=97558&view=rev Log: factor node morphing out to its own helper method. Modified: llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Modified: llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h?rev=97558&r1=97557&r2=97558&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h (original) +++ llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h Tue Mar 2 00:55:04 2010 @@ -275,6 +275,8 @@ private: void DoInstructionSelection(); + SDNode *MorphNode(SDNode *Node, unsigned TargetOpc, SDVTList VTs, + const SDValue *Ops, unsigned NumOps, unsigned EmitNodeInfo); void SelectAllBasicBlocks(Function &Fn, MachineFunction &MF, MachineModuleInfo *MMI, Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp?rev=97558&r1=97557&r2=97558&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Tue Mar 2 00:55:04 2010 @@ -1749,6 +1749,66 @@ MVT::Other, &InputChains[0], InputChains.size()); } +/// MorphNode - Handle morphing a node in place for the selector. +SDNode *SelectionDAGISel:: +MorphNode(SDNode *Node, unsigned TargetOpc, SDVTList VTList, + const SDValue *Ops, unsigned NumOps, unsigned EmitNodeInfo) { + // It is possible we're using MorphNodeTo to replace a node with no + // normal results with one that has a normal result (or we could be + // adding a chain) and the input could have flags and chains as well. + // In this case we need to shifting the operands down. + // FIXME: This is a horrible hack and broken in obscure cases, no worse + // than the old isel though. We should sink this into MorphNodeTo. + int OldFlagResultNo = -1, OldChainResultNo = -1; + + unsigned NTMNumResults = Node->getNumValues(); + if (Node->getValueType(NTMNumResults-1) == MVT::Flag) { + OldFlagResultNo = NTMNumResults-1; + if (NTMNumResults != 1 && + Node->getValueType(NTMNumResults-2) == MVT::Other) + OldChainResultNo = NTMNumResults-2; + } else if (Node->getValueType(NTMNumResults-1) == MVT::Other) + OldChainResultNo = NTMNumResults-1; + + // FIXME: If this matches multiple nodes it will just leave them here + // dead with noone to love them. These dead nodes can block future + // matches (!). + SDNode *Res = CurDAG->MorphNodeTo(Node, ~TargetOpc, VTList, Ops, NumOps); + + // MorphNodeTo can operate in two ways: if an existing node with the + // specified operands exists, it can just return it. Otherwise, it + // updates the node in place to have the requested operands. + if (Res == Node) { + // If we updated the node in place, reset the node ID. To the isel, + // this should be just like a newly allocated machine node. + Res->setNodeId(-1); + } + + unsigned ResNumResults = Res->getNumValues(); + // Move the flag if needed. + if ((EmitNodeInfo & OPFL_FlagOutput) && OldFlagResultNo != -1 && + (unsigned)OldFlagResultNo != ResNumResults-1) + CurDAG->ReplaceAllUsesOfValueWith(SDValue(Node, OldFlagResultNo), + SDValue(Res, ResNumResults-1)); + + if ((EmitNodeInfo & OPFL_FlagOutput) != 0) + --ResNumResults; + + // Move the chain reference if needed. + if ((EmitNodeInfo & OPFL_Chain) && OldChainResultNo != -1 && + (unsigned)OldChainResultNo != ResNumResults-1) + CurDAG->ReplaceAllUsesOfValueWith(SDValue(Node, OldChainResultNo), + SDValue(Res, ResNumResults-1)); + + // Otherwise, no replacement happened because the node already exists. Replace + // Uses of the old node with the new one. + if (Res != Node) + CurDAG->ReplaceAllUsesWith(Node, Res); + + return Res; +} + + struct MatchScope { /// FailIndex - If this match fails, this is the index to continue with. unsigned FailIndex; @@ -2298,60 +2358,8 @@ } } else { - // It is possible we're using MorphNodeTo to replace a node with no - // normal results with one that has a normal result (or we could be - // adding a chain) and the input could have flags and chains as well. - // In this case we need to shifting the operands down. - // FIXME: This is a horrible hack and broken in obscure cases, no worse - // than the old isel though. We should sink this into MorphNodeTo. - int OldFlagResultNo = -1, OldChainResultNo = -1; - - unsigned NTMNumResults = NodeToMatch->getNumValues(); - if (NodeToMatch->getValueType(NTMNumResults-1) == MVT::Flag) { - OldFlagResultNo = NTMNumResults-1; - if (NTMNumResults != 1 && - NodeToMatch->getValueType(NTMNumResults-2) == MVT::Other) - OldChainResultNo = NTMNumResults-2; - } else if (NodeToMatch->getValueType(NTMNumResults-1) == MVT::Other) - OldChainResultNo = NTMNumResults-1; - - // FIXME: If this matches multiple nodes it will just leave them here - // dead with noone to love them. These dead nodes can block future - // matches (!). - Res = CurDAG->MorphNodeTo(NodeToMatch, ~TargetOpc, VTList, - Ops.data(), Ops.size()); - - // MorphNodeTo can operate in two ways: if an existing node with the - // specified operands exists, it can just return it. Otherwise, it - // updates the node in place to have the requested operands. - if (Res == NodeToMatch) { - // If we updated the node in place, reset the node ID. To the isel, - // this should be just like a newly allocated machine node. - Res->setNodeId(-1); - } - - unsigned ResNumResults = Res->getNumValues(); - // Move the flag if needed. - if ((EmitNodeInfo & OPFL_FlagOutput) && OldFlagResultNo != -1 && - (unsigned)OldFlagResultNo != ResNumResults-1) - CurDAG->ReplaceAllUsesOfValueWith(SDValue(NodeToMatch, - OldFlagResultNo), - SDValue(Res, ResNumResults-1)); - - if ((EmitNodeInfo & OPFL_FlagOutput) != 0) - --ResNumResults; - - // Move the chain reference if needed. - if ((EmitNodeInfo & OPFL_Chain) && OldChainResultNo != -1 && - (unsigned)OldChainResultNo != ResNumResults-1) - CurDAG->ReplaceAllUsesOfValueWith(SDValue(NodeToMatch, - OldChainResultNo), - SDValue(Res, ResNumResults-1)); - - if (Res != NodeToMatch) { - // Otherwise, no replacement happened because the node already exists. - CurDAG->ReplaceAllUsesWith(NodeToMatch, Res); - } + Res = MorphNode(NodeToMatch, TargetOpc, VTList, Ops.data(), Ops.size(), + EmitNodeInfo); } // If the node had chain/flag results, update our notion of the current From sabre at nondot.org Tue Mar 2 01:14:49 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 02 Mar 2010 07:14:49 -0000 Subject: [llvm-commits] [llvm] r97559 - /llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Message-ID: <20100302071449.B462F2A6C12C@llvm.org> Author: lattner Date: Tue Mar 2 01:14:49 2010 New Revision: 97559 URL: http://llvm.org/viewvc/llvm-project?rev=97559&view=rev Log: I was confused about this, it turns out that MorphNodeTo *does* delete ex-operands that become dead. Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp?rev=97559&r1=97558&r2=97559&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Tue Mar 2 01:14:49 2010 @@ -1770,9 +1770,8 @@ } else if (Node->getValueType(NTMNumResults-1) == MVT::Other) OldChainResultNo = NTMNumResults-1; - // FIXME: If this matches multiple nodes it will just leave them here - // dead with noone to love them. These dead nodes can block future - // matches (!). + // Call the underlying SelectionDAG routine to do the transmogrification. Note + // that this deletes operands of the old node that become dead. SDNode *Res = CurDAG->MorphNodeTo(Node, ~TargetOpc, VTList, Ops, NumOps); // MorphNodeTo can operate in two ways: if an existing node with the From sabre at nondot.org Tue Mar 2 01:50:04 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 02 Mar 2010 07:50:04 -0000 Subject: [llvm-commits] [llvm] r97561 - in /llvm/trunk: include/llvm/CodeGen/SelectionDAGISel.h lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp test/CodeGen/X86/vec_shuffle-18.ll Message-ID: <20100302075004.19E0C2A6C12C@llvm.org> Author: lattner Date: Tue Mar 2 01:50:03 2010 New Revision: 97561 URL: http://llvm.org/viewvc/llvm-project?rev=97561&view=rev Log: Fix the xfail I added a couple of patches back. The issue was that we weren't properly handling the case when interior nodes of a matched pattern become dead after updating chain and flag uses. Now we handle this explicitly in UpdateChainsAndFlags. Modified: llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp llvm/trunk/test/CodeGen/X86/vec_shuffle-18.ll Modified: llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h?rev=97561&r1=97560&r2=97561&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h (original) +++ llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h Tue Mar 2 01:50:03 2010 @@ -307,6 +307,12 @@ /// OpcodeOffset - This is a cache used to dispatch efficiently into isel /// state machines that start with a OPC_SwitchOpcode node. std::vector OpcodeOffset; + + void UpdateChainsAndFlags(SDNode *NodeToMatch, SDValue InputChain, + const SmallVectorImpl &ChainNodesMatched, + SDValue InputFlag,const SmallVectorImpl &F, + bool isMorphNodeTo); + }; } Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp?rev=97561&r1=97560&r2=97561&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Tue Mar 2 01:50:03 2010 @@ -796,8 +796,11 @@ SDNode *ResNode = Select(Node); + // FIXME: This is pretty gross. 'Select' should be changed to not return + // anything at all and this code should be nuked with a tactical strike. + // If node should not be replaced, continue with the next one. - if (ResNode == Node) + if (ResNode == Node || Node->getOpcode() == ISD::DELETED_NODE) continue; // Replace node. if (ResNode) @@ -1532,11 +1535,16 @@ /// UpdateChainsAndFlags - When a match is complete, this method updates uses of /// interior flag and chain results to use the new flag and chain results. -static void UpdateChainsAndFlags(SDNode *NodeToMatch, SDValue InputChain, - const SmallVectorImpl &ChainNodesMatched, - SDValue InputFlag, - const SmallVectorImpl &FlagResultNodesMatched, - bool isMorphNodeTo, SelectionDAG *CurDAG) { +void SelectionDAGISel:: +UpdateChainsAndFlags(SDNode *NodeToMatch, SDValue InputChain, + const SmallVectorImpl &ChainNodesMatched, + SDValue InputFlag, + const SmallVectorImpl &FlagResultNodesMatched, + bool isMorphNodeTo) { + SmallVector NowDeadNodes; + + ISelUpdater ISU(ISelPosition); + // Now that all the normal results are replaced, we replace the chain and // flag results if present. if (!ChainNodesMatched.empty()) { @@ -1547,6 +1555,10 @@ for (unsigned i = 0, e = ChainNodesMatched.size(); i != e; ++i) { SDNode *ChainNode = ChainNodesMatched[i]; + // If this node was already deleted, don't look at it. + if (ChainNode->getOpcode() == ISD::DELETED_NODE) + continue; + // Don't replace the results of the root node if we're doing a // MorphNodeTo. if (ChainNode == NodeToMatch && isMorphNodeTo) @@ -1556,7 +1568,11 @@ if (ChainVal.getValueType() == MVT::Flag) ChainVal = ChainVal.getValue(ChainVal->getNumValues()-2); assert(ChainVal.getValueType() == MVT::Other && "Not a chain?"); - CurDAG->ReplaceAllUsesOfValueWith(ChainVal, InputChain); + CurDAG->ReplaceAllUsesOfValueWith(ChainVal, InputChain, &ISU); + + // If the node became dead, delete it. + if (ChainNode->use_empty()) + NowDeadNodes.push_back(ChainNode); } } @@ -1566,13 +1582,25 @@ // Handle any interior nodes explicitly marked. for (unsigned i = 0, e = FlagResultNodesMatched.size(); i != e; ++i) { SDNode *FRN = FlagResultNodesMatched[i]; + + // If this node was already deleted, don't look at it. + if (FRN->getOpcode() == ISD::DELETED_NODE) + continue; + assert(FRN->getValueType(FRN->getNumValues()-1) == MVT::Flag && "Doesn't have a flag result"); CurDAG->ReplaceAllUsesOfValueWith(SDValue(FRN, FRN->getNumValues()-1), - InputFlag); + InputFlag, &ISU); + + // If the node became dead, delete it. + if (FRN->use_empty()) + NowDeadNodes.push_back(FRN); } } + if (!NowDeadNodes.empty()) + CurDAG->RemoveDeadNodes(NowDeadNodes, &ISU); + DEBUG(errs() << "ISEL: Match complete!\n"); } @@ -2363,7 +2391,7 @@ // If the node had chain/flag results, update our notion of the current // chain and flag. - if (VTs.back() == MVT::Flag) { + if (EmitNodeInfo & OPFL_FlagOutput) { InputFlag = SDValue(Res, VTs.size()-1); if (EmitNodeInfo & OPFL_Chain) InputChain = SDValue(Res, VTs.size()-2); @@ -2392,8 +2420,8 @@ if (Opcode == OPC_MorphNodeTo) { // Update chain and flag uses. UpdateChainsAndFlags(NodeToMatch, InputChain, ChainNodesMatched, - InputFlag, FlagResultNodesMatched, true, CurDAG); - return 0; + InputFlag, FlagResultNodesMatched, true); + return Res; } continue; @@ -2452,7 +2480,7 @@ // Update chain and flag uses. UpdateChainsAndFlags(NodeToMatch, InputChain, ChainNodesMatched, - InputFlag, FlagResultNodesMatched, false, CurDAG); + InputFlag, FlagResultNodesMatched, false); assert(NodeToMatch->use_empty() && "Didn't replace all uses of the node?"); Modified: llvm/trunk/test/CodeGen/X86/vec_shuffle-18.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/vec_shuffle-18.ll?rev=97561&r1=97560&r2=97561&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/vec_shuffle-18.ll (original) +++ llvm/trunk/test/CodeGen/X86/vec_shuffle-18.ll Tue Mar 2 01:50:03 2010 @@ -1,5 +1,4 @@ ; RUN: llc < %s -march=x86 -mattr=+sse2 -mtriple=i686-apple-darwin8.8.0 | grep mov | count 7 -; XFAIL: * %struct.vector4_t = type { <4 x float> } From baldrick at free.fr Tue Mar 2 02:59:49 2010 From: baldrick at free.fr (Duncan Sands) Date: Tue, 02 Mar 2010 09:59:49 +0100 Subject: [llvm-commits] [llvm] r97533 - /llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp In-Reply-To: <20100302012620.C187B2A6C12C@llvm.org> References: <20100302012620.C187B2A6C12C@llvm.org> Message-ID: <4B8CD385.9080407@free.fr> Hi Devang, > - addString(SPDie, dwarf::DW_AT_name, dwarf::DW_FORM_string, SP.getName()); > + // constructors and operators for anonymous aggregates does not names. > + if (!SP.getName().empty()) > + addString(SPDie, dwarf::DW_AT_name, dwarf::DW_FORM_string, SP.getName()); I guess constructors and operators for anonymous aggregates does not names -> Constructors and operators for anonymous aggregates do not have names Ciao, Duncan. From baldrick at free.fr Tue Mar 2 03:03:32 2010 From: baldrick at free.fr (Duncan Sands) Date: Tue, 02 Mar 2010 10:03:32 +0100 Subject: [llvm-commits] [llvm] r97543 - in /llvm/trunk: include/llvm/CodeGen/Passes.h lib/CodeGen/MachineCSE.cpp In-Reply-To: <20100302023825.28D642A6C12C@llvm.org> References: <20100302023825.28D642A6C12C@llvm.org> Message-ID: <4B8CD464.2060604@free.fr> Hi Evan, > +// This pass performs global common subexpression elimination on machine > +// instructions using a scoped hash table based value numbering schemem. IT schemem -> scheme IT -> It Ciao, Duncan. From baldrick at free.fr Tue Mar 2 05:18:43 2010 From: baldrick at free.fr (Duncan Sands) Date: Tue, 02 Mar 2010 11:18:43 -0000 Subject: [llvm-commits] [llvm] r97563 - /llvm/trunk/lib/VMCore/Core.cpp Message-ID: <20100302111843.8CF202A6C12C@llvm.org> Author: baldrick Date: Tue Mar 2 05:18:43 2010 New Revision: 97563 URL: http://llvm.org/viewvc/llvm-project?rev=97563&view=rev Log: Rather than passing "false" for InsertBefore, AddressSpace for ThreadLocal, and nothing for AddressSpace, pass 0 for InsertBefore, "false" for ThreadLocal and AddressSpace for AddressSpace. Spotted by gcc-4.5. Modified: llvm/trunk/lib/VMCore/Core.cpp Modified: llvm/trunk/lib/VMCore/Core.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Core.cpp?rev=97563&r1=97562&r2=97563&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/Core.cpp (original) +++ llvm/trunk/lib/VMCore/Core.cpp Tue Mar 2 05:18:43 2010 @@ -1157,8 +1157,8 @@ const char *Name, unsigned AddressSpace) { return wrap(new GlobalVariable(*unwrap(M), unwrap(Ty), false, - GlobalValue::ExternalLinkage, 0, Name, false, - AddressSpace)); + GlobalValue::ExternalLinkage, 0, Name, 0, + false, AddressSpace)); } LLVMValueRef LLVMGetNamedGlobal(LLVMModuleRef M, const char *Name) { From xerxes at zafena.se Tue Mar 2 07:26:18 2010 From: xerxes at zafena.se (Xerxes Ranby) Date: Tue, 02 Mar 2010 13:26:18 -0000 Subject: [llvm-commits] [llvm] r97564 - /llvm/trunk/lib/Target/ARM/ARMJITInfo.cpp Message-ID: <20100302132618.676192A6C12C@llvm.org> Author: xranby Date: Tue Mar 2 07:26:18 2010 New Revision: 97564 URL: http://llvm.org/viewvc/llvm-project?rev=97564&view=rev Log: Unbreak llvm-arm-linux buildbot and fix PR5309. Modified: llvm/trunk/lib/Target/ARM/ARMJITInfo.cpp Modified: llvm/trunk/lib/Target/ARM/ARMJITInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMJITInfo.cpp?rev=97564&r1=97563&r2=97564&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMJITInfo.cpp (original) +++ llvm/trunk/lib/Target/ARM/ARMJITInfo.cpp Tue Mar 2 07:26:18 2010 @@ -60,7 +60,7 @@ // whole compilation callback doesn't exist as far as the caller is // concerned, so we can't just preserve the callee saved regs. "stmdb sp!, {r0, r1, r2, r3, lr}\n" -#ifdef __VFP_FP__ +#if defined(__VFP_FP__) && !defined(__SOFTFP__)) "fstmfdd sp!, {d0, d1, d2, d3, d4, d5, d6, d7}\n" #endif // The LR contains the address of the stub function on entry. @@ -83,7 +83,7 @@ // 6-20 | D0..D7 | Saved VFP registers // +--------+ // -#ifdef __VFP_FP__ +#if defined(__VFP_FP__) && !defined(__SOFTFP__)) // Restore VFP caller-saved registers. "fldmfdd sp!, {d0, d1, d2, d3, d4, d5, d6, d7}\n" #endif From xerxes at zafena.se Tue Mar 2 07:42:03 2010 From: xerxes at zafena.se (Xerxes Ranby) Date: Tue, 02 Mar 2010 13:42:03 -0000 Subject: [llvm-commits] [llvm] r97565 - /llvm/trunk/lib/Target/ARM/ARMJITInfo.cpp Message-ID: <20100302134203.ADF172A6C12C@llvm.org> Author: xranby Date: Tue Mar 2 07:42:03 2010 New Revision: 97565 URL: http://llvm.org/viewvc/llvm-project?rev=97565&view=rev Log: fix typo add missing ( Modified: llvm/trunk/lib/Target/ARM/ARMJITInfo.cpp Modified: llvm/trunk/lib/Target/ARM/ARMJITInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMJITInfo.cpp?rev=97565&r1=97564&r2=97565&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMJITInfo.cpp (original) +++ llvm/trunk/lib/Target/ARM/ARMJITInfo.cpp Tue Mar 2 07:42:03 2010 @@ -60,7 +60,7 @@ // whole compilation callback doesn't exist as far as the caller is // concerned, so we can't just preserve the callee saved regs. "stmdb sp!, {r0, r1, r2, r3, lr}\n" -#if defined(__VFP_FP__) && !defined(__SOFTFP__)) +#if (defined(__VFP_FP__) && !defined(__SOFTFP__)) "fstmfdd sp!, {d0, d1, d2, d3, d4, d5, d6, d7}\n" #endif // The LR contains the address of the stub function on entry. @@ -83,7 +83,7 @@ // 6-20 | D0..D7 | Saved VFP registers // +--------+ // -#if defined(__VFP_FP__) && !defined(__SOFTFP__)) +#if (defined(__VFP_FP__) && !defined(__SOFTFP__)) // Restore VFP caller-saved registers. "fldmfdd sp!, {d0, d1, d2, d3, d4, d5, d6, d7}\n" #endif From echristo at apple.com Tue Mar 2 10:13:49 2010 From: echristo at apple.com (Eric Christopher) Date: Tue, 2 Mar 2010 08:13:49 -0800 Subject: [llvm-commits] [llvm] r97564 - /llvm/trunk/lib/Target/ARM/ARMJITInfo.cpp In-Reply-To: <20100302132618.676192A6C12C@llvm.org> References: <20100302132618.676192A6C12C@llvm.org> Message-ID: On Mar 2, 2010, at 5:26 AM, Xerxes Ranby wrote: > +#if defined(__VFP_FP__) && !defined(__SOFTFP__)) That's arguably a bug in the compiler. Those two should be mutually exclusive. Can anyone comment as to why they're not? Thanks though! -eric From echristo at apple.com Tue Mar 2 10:15:33 2010 From: echristo at apple.com (Eric Christopher) Date: Tue, 2 Mar 2010 08:15:33 -0800 Subject: [llvm-commits] [llvm] r97564 - /llvm/trunk/lib/Target/ARM/ARMJITInfo.cpp In-Reply-To: References: <20100302132618.676192A6C12C@llvm.org> Message-ID: <04590BBE-DEC4-43CB-BBA8-798C13AC587D@apple.com> On Mar 2, 2010, at 8:13 AM, Eric Christopher wrote: > > On Mar 2, 2010, at 5:26 AM, Xerxes Ranby wrote: > >> +#if defined(__VFP_FP__) && !defined(__SOFTFP__)) > > That's arguably a bug in the compiler. Those two should be mutually exclusive. Can anyone comment as to why they're not? Aha. You did in the PR. How utterly bizarre that __VFP_FP__ isn't predicated on hard float. Thanks. -eric From johnny.chen at apple.com Tue Mar 2 11:03:18 2010 From: johnny.chen at apple.com (Johnny Chen) Date: Tue, 02 Mar 2010 17:03:18 -0000 Subject: [llvm-commits] [llvm] r97567 - /llvm/trunk/lib/Target/ARM/ARMInstrInfo.td Message-ID: <20100302170318.9F48C2A6C12C@llvm.org> Author: johnny Date: Tue Mar 2 11:03:18 2010 New Revision: 97567 URL: http://llvm.org/viewvc/llvm-project?rev=97567&view=rev Log: Change some asm shift opcode strings to lowercase. Modified: llvm/trunk/lib/Target/ARM/ARMInstrInfo.td Modified: llvm/trunk/lib/Target/ARM/ARMInstrInfo.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrInfo.td?rev=97567&r1=97566&r2=97567&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMInstrInfo.td (original) +++ llvm/trunk/lib/Target/ARM/ARMInstrInfo.td Tue Mar 2 11:03:18 2010 @@ -1614,14 +1614,14 @@ // Signed/Unsigned saturate -- for disassembly only def SSATlsl : AI<(outs GPR:$dst), (ins i32imm:$bit_pos, GPR:$a, i32imm:$shamt), - DPFrm, NoItinerary, "ssat", "\t$dst, $bit_pos, $a, LSL $shamt", + DPFrm, NoItinerary, "ssat", "\t$dst, $bit_pos, $a, lsl $shamt", [/* For disassembly only; pattern left blank */]> { let Inst{27-21} = 0b0110101; let Inst{6-4} = 0b001; } def SSATasr : AI<(outs GPR:$dst), (ins i32imm:$bit_pos, GPR:$a, i32imm:$shamt), - DPFrm, NoItinerary, "ssat", "\t$dst, $bit_pos, $a, ASR $shamt", + DPFrm, NoItinerary, "ssat", "\t$dst, $bit_pos, $a, asr $shamt", [/* For disassembly only; pattern left blank */]> { let Inst{27-21} = 0b0110101; let Inst{6-4} = 0b101; @@ -1635,14 +1635,14 @@ } def USATlsl : AI<(outs GPR:$dst), (ins i32imm:$bit_pos, GPR:$a, i32imm:$shamt), - DPFrm, NoItinerary, "usat", "\t$dst, $bit_pos, $a, LSL $shamt", + DPFrm, NoItinerary, "usat", "\t$dst, $bit_pos, $a, lsl $shamt", [/* For disassembly only; pattern left blank */]> { let Inst{27-21} = 0b0110111; let Inst{6-4} = 0b001; } def USATasr : AI<(outs GPR:$dst), (ins i32imm:$bit_pos, GPR:$a, i32imm:$shamt), - DPFrm, NoItinerary, "usat", "\t$dst, $bit_pos, $a, ASR $shamt", + DPFrm, NoItinerary, "usat", "\t$dst, $bit_pos, $a, asr $shamt", [/* For disassembly only; pattern left blank */]> { let Inst{27-21} = 0b0110111; let Inst{6-4} = 0b101; @@ -2054,7 +2054,7 @@ def PKHBT : AMiscA1I<0b01101000, (outs GPR:$dst), (ins GPR:$src1, GPR:$src2, i32imm:$shamt), - IIC_iALUsi, "pkhbt", "\t$dst, $src1, $src2, LSL $shamt", + IIC_iALUsi, "pkhbt", "\t$dst, $src1, $src2, lsl $shamt", [(set GPR:$dst, (or (and GPR:$src1, 0xFFFF), (and (shl GPR:$src2, (i32 imm:$shamt)), 0xFFFF0000)))]>, @@ -2071,7 +2071,7 @@ def PKHTB : AMiscA1I<0b01101000, (outs GPR:$dst), (ins GPR:$src1, GPR:$src2, i32imm:$shamt), - IIC_iALUsi, "pkhtb", "\t$dst, $src1, $src2, ASR $shamt", + IIC_iALUsi, "pkhtb", "\t$dst, $src1, $src2, asr $shamt", [(set GPR:$dst, (or (and GPR:$src1, 0xFFFF0000), (and (sra GPR:$src2, imm16_31:$shamt), 0xFFFF)))]>, Requires<[IsARM, HasV6]> { From johnny.chen at apple.com Tue Mar 2 11:57:15 2010 From: johnny.chen at apple.com (Johnny Chen) Date: Tue, 02 Mar 2010 17:57:15 -0000 Subject: [llvm-commits] [llvm] r97571 - in /llvm/trunk/lib/Target/ARM: ARMInstrThumb2.td AsmPrinter/ARMAsmPrinter.cpp AsmPrinter/ARMInstPrinter.cpp AsmPrinter/ARMInstPrinter.h Message-ID: <20100302175715.E16542A6C12C@llvm.org> Author: johnny Date: Tue Mar 2 11:57:15 2010 New Revision: 97571 URL: http://llvm.org/viewvc/llvm-project?rev=97571&view=rev Log: AL is an optional mnemonic extension for always, except in IT instructions. Add printMandatoryPredicateOperand() PrintMethod for IT predicate printing. Ref: A8.3 Conditional execution Modified: llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td llvm/trunk/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp llvm/trunk/lib/Target/ARM/AsmPrinter/ARMInstPrinter.cpp llvm/trunk/lib/Target/ARM/AsmPrinter/ARMInstPrinter.h Modified: llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td?rev=97571&r1=97570&r2=97571&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td (original) +++ llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td Tue Mar 2 11:57:15 2010 @@ -13,7 +13,7 @@ // IT block predicate field def it_pred : Operand { - let PrintMethod = "printPredicateOperand"; + let PrintMethod = "printMandatoryPredicateOperand"; } // IT block condition mask Modified: llvm/trunk/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp?rev=97571&r1=97570&r2=97571&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp Tue Mar 2 11:57:15 2010 @@ -122,6 +122,7 @@ void printT2AddrModeSoRegOperand(const MachineInstr *MI, int OpNum); void printPredicateOperand(const MachineInstr *MI, int OpNum); + void printMandatoryPredicateOperand(const MachineInstr *MI, int OpNum); void printSBitModifierOperand(const MachineInstr *MI, int OpNum); void printPCLabel(const MachineInstr *MI, int OpNum); void printRegisterList(const MachineInstr *MI, int OpNum); @@ -786,6 +787,12 @@ O << ARMCondCodeToString(CC); } +void ARMAsmPrinter::printMandatoryPredicateOperand(const MachineInstr *MI, + int OpNum) { + ARMCC::CondCodes CC = (ARMCC::CondCodes)MI->getOperand(OpNum).getImm(); + O << ARMCondCodeToString(CC); +} + void ARMAsmPrinter::printSBitModifierOperand(const MachineInstr *MI, int OpNum){ unsigned Reg = MI->getOperand(OpNum).getReg(); if (Reg) { Modified: llvm/trunk/lib/Target/ARM/AsmPrinter/ARMInstPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/AsmPrinter/ARMInstPrinter.cpp?rev=97571&r1=97570&r2=97571&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/AsmPrinter/ARMInstPrinter.cpp (original) +++ llvm/trunk/lib/Target/ARM/AsmPrinter/ARMInstPrinter.cpp Tue Mar 2 11:57:15 2010 @@ -325,6 +325,12 @@ O << ARMCondCodeToString(CC); } +void ARMInstPrinter::printMandatoryPredicateOperand(const MCInst *MI, + unsigned OpNum) { + ARMCC::CondCodes CC = (ARMCC::CondCodes)MI->getOperand(OpNum).getImm(); + O << ARMCondCodeToString(CC); +} + void ARMInstPrinter::printSBitModifierOperand(const MCInst *MI, unsigned OpNum){ if (MI->getOperand(OpNum).getReg()) { assert(MI->getOperand(OpNum).getReg() == ARM::CPSR && Modified: llvm/trunk/lib/Target/ARM/AsmPrinter/ARMInstPrinter.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/AsmPrinter/ARMInstPrinter.h?rev=97571&r1=97570&r2=97571&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/AsmPrinter/ARMInstPrinter.h (original) +++ llvm/trunk/lib/Target/ARM/AsmPrinter/ARMInstPrinter.h Tue Mar 2 11:57:15 2010 @@ -71,6 +71,7 @@ void printT2AddrModeSoRegOperand(const MCInst *MI, unsigned OpNum) {} void printPredicateOperand(const MCInst *MI, unsigned OpNum); + void printMandatoryPredicateOperand(const MCInst *MI, unsigned OpNum); void printSBitModifierOperand(const MCInst *MI, unsigned OpNum); void printRegisterList(const MCInst *MI, unsigned OpNum); void printCPInstOperand(const MCInst *MI, unsigned OpNum, From dpatel at apple.com Tue Mar 2 11:58:15 2010 From: dpatel at apple.com (Devang Patel) Date: Tue, 02 Mar 2010 17:58:15 -0000 Subject: [llvm-commits] [llvm] r97572 - /llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Message-ID: <20100302175815.78E1E2A6C12C@llvm.org> Author: dpatel Date: Tue Mar 2 11:58:15 2010 New Revision: 97572 URL: http://llvm.org/viewvc/llvm-project?rev=97572&view=rev Log: Fix grammar. Thanks Duncan! Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=97572&r1=97571&r2=97572&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original) +++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Tue Mar 2 11:58:15 2010 @@ -1177,7 +1177,7 @@ return SPDie; SPDie = new DIE(dwarf::DW_TAG_subprogram); - // constructors and operators for anonymous aggregates does not names. + // Constructors and operators for anonymous aggregates do not have names. if (!SP.getName().empty()) addString(SPDie, dwarf::DW_AT_name, dwarf::DW_FORM_string, SP.getName()); From johnny.chen at apple.com Tue Mar 2 12:14:57 2010 From: johnny.chen at apple.com (Johnny Chen) Date: Tue, 02 Mar 2010 18:14:57 -0000 Subject: [llvm-commits] [llvm] r97573 - in /llvm/trunk/lib/Target/ARM: ARMInstrThumb.td ARMInstrThumb2.td Message-ID: <20100302181457.3C1422A6C12C@llvm.org> Author: johnny Date: Tue Mar 2 12:14:57 2010 New Revision: 97573 URL: http://llvm.org/viewvc/llvm-project?rev=97573&view=rev Log: Added 32-bit Thumb instructions: CPS, SDIV, UDIV, SXTB16, SXTAB16, UXTAB16, SEL, SMMULR, SMMLAR, SMMLSR, TBB, TBH, and 16-bit Thumb instruction CPS for disassembly only. Modified: llvm/trunk/lib/Target/ARM/ARMInstrThumb.td llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td Modified: llvm/trunk/lib/Target/ARM/ARMInstrThumb.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrThumb.td?rev=97573&r1=97572&r2=97573&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMInstrThumb.td (original) +++ llvm/trunk/lib/Target/ARM/ARMInstrThumb.td Tue Mar 2 12:14:57 2010 @@ -192,6 +192,19 @@ let Inst{9-8} = 0b10; } +// Change Processor State is a system instruction -- for disassembly only. +// The singleton $opt operand contains the following information: +// opt{4-0} = mode ==> don't care +// opt{5} = changemode ==> 0 (false for 16-bit Thumb instr) +// opt{8-6} = AIF from Inst{2-0} +// opt{10-9} = 1:imod from Inst{4} with 0b10 as enable and 0b11 as disable +// +// The opt{4-0} and opt{5} sub-fields are to accommodate 32-bit Thumb and ARM +// CPS which has more options. +def tCPS : T1I<(outs), (ins i32imm:$opt), NoItinerary, "cps${opt:cps}", + [/* For disassembly only; pattern left blank */]>, + T1Misc<0b0110011>; + // For both thumb1 and thumb2. let isNotDuplicable = 1 in def tPICADD : TIt<(outs GPR:$dst), (ins GPR:$lhs, pclabel:$cp), IIC_iALUr, Modified: llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td?rev=97573&r1=97572&r2=97573&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td (original) +++ llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td Tue Mar 2 12:14:57 2010 @@ -670,6 +670,31 @@ } } +// DO variant - disassembly only, no pattern + +multiclass T2I_unary_rrot_DO opcod, string opc> { + def r : T2I<(outs GPR:$dst), (ins GPR:$src), IIC_iUNAr, + opc, "\t$dst, $src", []> { + let Inst{31-27} = 0b11111; + let Inst{26-23} = 0b0100; + let Inst{22-20} = opcod; + let Inst{19-16} = 0b1111; // Rn + let Inst{15-12} = 0b1111; + let Inst{7} = 1; + let Inst{5-4} = 0b00; // rotate + } + def r_rot : T2I<(outs GPR:$dst), (ins GPR:$src, i32imm:$rot), IIC_iUNAsi, + opc, "\t$dst, $src, ror $rot", []> { + let Inst{31-27} = 0b11111; + let Inst{26-23} = 0b0100; + let Inst{22-20} = opcod; + let Inst{19-16} = 0b1111; // Rn + let Inst{15-12} = 0b1111; + let Inst{7} = 1; + let Inst{5-4} = {?,?}; // rotate + } +} + /// T2I_bin_rrot - A binary operation with two forms: one whose operand is a /// register and one whose operand is a register rotated by 8/16/24. multiclass T2I_bin_rrot opcod, string opc, PatFrag opnode> { @@ -696,6 +721,29 @@ } } +// DO variant - disassembly only, no pattern + +multiclass T2I_bin_rrot_DO opcod, string opc> { + def rr : T2I<(outs GPR:$dst), (ins GPR:$LHS, GPR:$RHS), IIC_iALUr, + opc, "\t$dst, $LHS, $RHS", []> { + let Inst{31-27} = 0b11111; + let Inst{26-23} = 0b0100; + let Inst{22-20} = opcod; + let Inst{15-12} = 0b1111; + let Inst{7} = 1; + let Inst{5-4} = 0b00; // rotate + } + def rr_rot : T2I<(outs GPR:$dst), (ins GPR:$LHS, GPR:$RHS, i32imm:$rot), + IIC_iALUsr, opc, "\t$dst, $LHS, $RHS, ror $rot", []> { + let Inst{31-27} = 0b11111; + let Inst{26-23} = 0b0100; + let Inst{22-20} = opcod; + let Inst{15-12} = 0b1111; + let Inst{7} = 1; + let Inst{5-4} = {?,?}; // rotate + } +} + //===----------------------------------------------------------------------===// // Instructions //===----------------------------------------------------------------------===// @@ -791,6 +839,25 @@ let Inst{15} = 0; } +// Signed and unsigned division, for disassembly only +def t2SDIV : T2I<(outs GPR:$dst), (ins GPR:$a, GPR:$b), IIC_iALUi, + "sdiv", "\t$dst, $a, $b", []> { + let Inst{31-27} = 0b11111; + let Inst{26-21} = 0b011100; + let Inst{20} = 0b1; + let Inst{15-12} = 0b1111; + let Inst{7-4} = 0b1111; +} + +def t2UDIV : T2I<(outs GPR:$dst), (ins GPR:$a, GPR:$b), IIC_iALUi, + "udiv", "\t$dst, $a, $b", []> { + let Inst{31-27} = 0b11111; + let Inst{26-21} = 0b011101; + let Inst{20} = 0b1; + let Inst{15-12} = 0b1111; + let Inst{7-4} = 0b1111; +} + // Pseudo instruction that will expand into a t2SUBrSPi + a copy. let usesCustomInserter = 1 in { // Expanded after instruction selection. def t2SUBrSPi_ : PseudoInst<(outs GPR:$dst), (ins GPR:$sp, t2_so_imm:$imm), @@ -1078,13 +1145,15 @@ UnOpFrag<(sext_inreg node:$Src, i8)>>; defm t2SXTH : T2I_unary_rrot<0b000, "sxth", UnOpFrag<(sext_inreg node:$Src, i16)>>; +defm t2SXTB16 : T2I_unary_rrot_DO<0b010, "sxtb16">; defm t2SXTAB : T2I_bin_rrot<0b100, "sxtab", BinOpFrag<(add node:$LHS, (sext_inreg node:$RHS, i8))>>; defm t2SXTAH : T2I_bin_rrot<0b000, "sxtah", BinOpFrag<(add node:$LHS, (sext_inreg node:$RHS,i16))>>; +defm t2SXTAB16 : T2I_bin_rrot_DO<0b010, "sxtab16">; -// TODO: SXT(A){B|H}16 +// TODO: SXT(A){B|H}16 - done for disassembly only // Zero extenders @@ -1105,6 +1174,7 @@ BinOpFrag<(add node:$LHS, (and node:$RHS, 0x00FF))>>; defm t2UXTAH : T2I_bin_rrot<0b001, "uxtah", BinOpFrag<(add node:$LHS, (and node:$RHS, 0xFFFF))>>; +defm t2UXTAB16 : T2I_bin_rrot_DO<0b011, "uxtab16">; } //===----------------------------------------------------------------------===// @@ -1146,6 +1216,19 @@ def : T2Pat<(add GPR:$src, imm0_4095_neg:$imm), (t2SUBri12 GPR:$src, imm0_4095_neg:$imm)>; +// Select Bytes -- for disassembly only + +def t2SEL : T2I<(outs GPR:$dst), (ins GPR:$a, GPR:$b), NoItinerary, "sel", + "\t$dst, $a, $b", []> { + let Inst{31-27} = 0b11111; + let Inst{26-24} = 0b010; + let Inst{23} = 0b1; + let Inst{22-20} = 0b010; + let Inst{15-12} = 0b1111; + let Inst{7} = 0b1; + let Inst{6-4} = 0b000; +} + // A6.3.13, A6.3.14, A6.3.15 Parallel addition and subtraction (signed/unsigned) // And Miscellaneous operations -- for disassembly only class T2I_pam op22_20, bits<4> op7_4, string opc> @@ -1220,7 +1303,7 @@ // Signed/Unsigned saturate -- for disassembly only def t2SSATlsl : T2I<(outs GPR:$dst), (ins i32imm:$bit_pos,GPR:$a,i32imm:$shamt), - NoItinerary, "ssat", "\t$dst, $bit_pos, $a, LSL $shamt", + NoItinerary, "ssat", "\t$dst, $bit_pos, $a, lsl $shamt", [/* For disassembly only; pattern left blank */]> { let Inst{31-27} = 0b11110; let Inst{25-22} = 0b1100; @@ -1230,7 +1313,7 @@ } def t2SSATasr : T2I<(outs GPR:$dst), (ins i32imm:$bit_pos,GPR:$a,i32imm:$shamt), - NoItinerary, "ssat", "\t$dst, $bit_pos, $a, ASR $shamt", + NoItinerary, "ssat", "\t$dst, $bit_pos, $a, asr $shamt", [/* For disassembly only; pattern left blank */]> { let Inst{31-27} = 0b11110; let Inst{25-22} = 0b1100; @@ -1252,7 +1335,7 @@ } def t2USATlsl : T2I<(outs GPR:$dst), (ins i32imm:$bit_pos,GPR:$a,i32imm:$shamt), - NoItinerary, "usat", "\t$dst, $bit_pos, $a, LSL $shamt", + NoItinerary, "usat", "\t$dst, $bit_pos, $a, lsl $shamt", [/* For disassembly only; pattern left blank */]> { let Inst{31-27} = 0b11110; let Inst{25-22} = 0b1110; @@ -1262,7 +1345,7 @@ } def t2USATasr : T2I<(outs GPR:$dst), (ins i32imm:$bit_pos,GPR:$a,i32imm:$shamt), - NoItinerary, "usat", "\t$dst, $bit_pos, $a, ASR $shamt", + NoItinerary, "usat", "\t$dst, $bit_pos, $a, asr $shamt", [/* For disassembly only; pattern left blank */]> { let Inst{31-27} = 0b11110; let Inst{25-22} = 0b1110; @@ -1486,6 +1569,8 @@ } } // neverHasSideEffects +// Rounding variants of the below included for disassembly only + // Most significant word multiply def t2SMMUL : T2I<(outs GPR:$dst), (ins GPR:$a, GPR:$b), IIC_iMUL32, "smmul", "\t$dst, $a, $b", @@ -1497,6 +1582,15 @@ let Inst{7-4} = 0b0000; // No Rounding (Inst{4} = 0) } +def t2SMMULR : T2I<(outs GPR:$dst), (ins GPR:$a, GPR:$b), IIC_iMUL32, + "smmulr", "\t$dst, $a, $b", []> { + let Inst{31-27} = 0b11111; + let Inst{26-23} = 0b0110; + let Inst{22-20} = 0b101; + let Inst{15-12} = 0b1111; // Ra = 0b1111 (no accumulate) + let Inst{7-4} = 0b0001; // Rounding (Inst{4} = 1) +} + def t2SMMLA : T2I<(outs GPR:$dst), (ins GPR:$a, GPR:$b, GPR:$c), IIC_iMAC32, "smmla", "\t$dst, $a, $b, $c", [(set GPR:$dst, (add (mulhs GPR:$a, GPR:$b), GPR:$c))]> { @@ -1507,6 +1601,14 @@ let Inst{7-4} = 0b0000; // No Rounding (Inst{4} = 0) } +def t2SMMLAR : T2I<(outs GPR:$dst), (ins GPR:$a, GPR:$b, GPR:$c), IIC_iMAC32, + "smmlar", "\t$dst, $a, $b, $c", []> { + let Inst{31-27} = 0b11111; + let Inst{26-23} = 0b0110; + let Inst{22-20} = 0b101; + let Inst{15-12} = {?, ?, ?, ?}; // Ra + let Inst{7-4} = 0b0001; // Rounding (Inst{4} = 1) +} def t2SMMLS : T2I <(outs GPR:$dst), (ins GPR:$a, GPR:$b, GPR:$c), IIC_iMAC32, "smmls", "\t$dst, $a, $b, $c", @@ -1518,6 +1620,15 @@ let Inst{7-4} = 0b0000; // No Rounding (Inst{4} = 0) } +def t2SMMLSR : T2I <(outs GPR:$dst), (ins GPR:$a, GPR:$b, GPR:$c), IIC_iMAC32, + "smmlsr", "\t$dst, $a, $b, $c", []> { + let Inst{31-27} = 0b11111; + let Inst{26-23} = 0b0110; + let Inst{22-20} = 0b110; + let Inst{15-12} = {?, ?, ?, ?}; // Ra + let Inst{7-4} = 0b0001; // Rounding (Inst{4} = 1) +} + multiclass T2I_smul { def BB : T2I<(outs GPR:$dst), (ins GPR:$a, GPR:$b), IIC_iMUL32, !strconcat(opc, "bb"), "\t$dst, $a, $b", @@ -1770,7 +1881,7 @@ (shl GPR:$src, (i32 8))), i16))]>; def t2PKHBT : T2I<(outs GPR:$dst), (ins GPR:$src1, GPR:$src2, i32imm:$shamt), - IIC_iALUsi, "pkhbt", "\t$dst, $src1, $src2, LSL $shamt", + IIC_iALUsi, "pkhbt", "\t$dst, $src1, $src2, lsl $shamt", [(set GPR:$dst, (or (and GPR:$src1, 0xFFFF), (and (shl GPR:$src2, (i32 imm:$shamt)), 0xFFFF0000)))]> { @@ -1788,7 +1899,7 @@ (t2PKHBT GPR:$src1, GPR:$src2, imm16_31:$shamt)>; def t2PKHTB : T2I<(outs GPR:$dst), (ins GPR:$src1, GPR:$src2, i32imm:$shamt), - IIC_iALUsi, "pkhtb", "\t$dst, $src1, $src2, ASR $shamt", + IIC_iALUsi, "pkhtb", "\t$dst, $src1, $src2, asr $shamt", [(set GPR:$dst, (or (and GPR:$src1, 0xFFFF0000), (and (sra GPR:$src2, imm16_31:$shamt), 0xFFFF)))]> { @@ -2104,6 +2215,24 @@ let Inst{15-8} = 0b11110000; let Inst{7-4} = 0b0001; // H form } + +// Generic versions of the above two instructions, for disassembly only + +def t2TBBgen : T2I<(outs), (ins GPR:$a, GPR:$b), IIC_Br, + "tbb", "\t[$a, $b]", []>{ + let Inst{31-27} = 0b11101; + let Inst{26-20} = 0b0001101; + let Inst{15-8} = 0b11110000; + let Inst{7-4} = 0b0000; // B form +} + +def t2TBHgen : T2I<(outs), (ins GPR:$a, GPR:$b), IIC_Br, + "tbh", "\t[$a, $b, lsl #1]", []> { + let Inst{31-27} = 0b11101; + let Inst{26-20} = 0b0001101; + let Inst{15-8} = 0b11110000; + let Inst{7-4} = 0b0001; // H form +} } // isNotDuplicable, isIndirectBranch } // isBranch, isTerminator, isBarrier @@ -2140,6 +2269,21 @@ let Inst{12} = 0; } +// Change Processor State is a system instruction -- for disassembly only. +// The singleton $opt operand contains the following information: +// opt{4-0} = mode from Inst{4-0} +// opt{5} = changemode from Inst{17} +// opt{8-6} = AIF from Inst{8-6} +// opt{10-9} = imod from Inst{19-18} with 0b10 as enable and 0b11 as disable +def t2CPS : T2XI<(outs),(ins i32imm:$opt), NoItinerary, "cps${opt:cps}", + [/* For disassembly only; pattern left blank */]> { + let Inst{31-27} = 0b11110; + let Inst{26} = 0; + let Inst{25-20} = 0b111010; + let Inst{15-14} = 0b10; + let Inst{12} = 0; +} + // Secure Monitor Call is a system instruction -- for disassembly only // Option = Inst{19-16} def t2SMC : T2I<(outs), (ins i32imm:$opt), NoItinerary, "smc", "\t$opt", From sabre at nondot.org Tue Mar 2 12:15:02 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 02 Mar 2010 18:15:02 -0000 Subject: [llvm-commits] [llvm] r97574 - /llvm/trunk/utils/TableGen/DAGISelEmitter.cpp Message-ID: <20100302181502.E4B202A6C12D@llvm.org> Author: lattner Date: Tue Mar 2 12:15:02 2010 New Revision: 97574 URL: http://llvm.org/viewvc/llvm-project?rev=97574&view=rev Log: the sorting predicate should work for comparing an element to itself, even though this isn't wildly useful. Modified: llvm/trunk/utils/TableGen/DAGISelEmitter.cpp Modified: llvm/trunk/utils/TableGen/DAGISelEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelEmitter.cpp?rev=97574&r1=97573&r2=97574&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelEmitter.cpp (original) +++ llvm/trunk/utils/TableGen/DAGISelEmitter.cpp Tue Mar 2 12:15:02 2010 @@ -180,7 +180,7 @@ if (LHSPatSize > RHSPatSize) return false; // Sort based on the UID of the pattern, giving us a deterministic ordering. - assert(LHS->ID != RHS->ID); + assert(LHS == RHS || LHS->ID != RHS->ID); return LHS->ID < RHS->ID; } }; From sabre at nondot.org Tue Mar 2 12:56:03 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 02 Mar 2010 18:56:03 -0000 Subject: [llvm-commits] [llvm] r97576 - in /llvm/trunk/test/CodeGen/X86: 2005-01-17-CycleInDAG.ll store_op_load_fold2.ll Message-ID: <20100302185603.4DCDA2A6C12E@llvm.org> Author: lattner Date: Tue Mar 2 12:56:03 2010 New Revision: 97576 URL: http://llvm.org/viewvc/llvm-project?rev=97576&view=rev Log: clean up some testcases. Modified: llvm/trunk/test/CodeGen/X86/2005-01-17-CycleInDAG.ll llvm/trunk/test/CodeGen/X86/store_op_load_fold2.ll Modified: llvm/trunk/test/CodeGen/X86/2005-01-17-CycleInDAG.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2005-01-17-CycleInDAG.ll?rev=97576&r1=97575&r2=97576&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/2005-01-17-CycleInDAG.ll (original) +++ llvm/trunk/test/CodeGen/X86/2005-01-17-CycleInDAG.ll Tue Mar 2 12:56:03 2010 @@ -7,7 +7,7 @@ @GLOBAL = external global i32 ; [#uses=1] -define i32 @test(i32* %P1, i32* %P2, i32* %P3) { +define i32 @test(i32* %P1, i32* %P2, i32* %P3) nounwind { %L = load i32* @GLOBAL ; [#uses=1] store i32 12, i32* %P2 %Y = load i32* %P3 ; [#uses=1] Modified: llvm/trunk/test/CodeGen/X86/store_op_load_fold2.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/store_op_load_fold2.ll?rev=97576&r1=97575&r2=97576&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/store_op_load_fold2.ll (original) +++ llvm/trunk/test/CodeGen/X86/store_op_load_fold2.ll Tue Mar 2 12:56:03 2010 @@ -5,17 +5,9 @@ %struct.Macroblock = type { i32, i32, i32, i32, i32, [8 x i32], %struct.Macroblock*, %struct.Macroblock*, i32, [2 x [4 x [4 x [2 x i32]]]], [16 x i8], [16 x i8], i32, i64, [4 x i32], [4 x i32], i64, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i16, double, i32, i32, i32, i32, i32, i32, i32, i32, i32 } define internal fastcc i32 @dct_chroma(i32 %uv, i32 %cr_cbp) nounwind { -entry: - br i1 true, label %cond_true2732.preheader, label %cond_true129 -cond_true129: ; preds = %entry - ret i32 0 cond_true2732.preheader: ; preds = %entry %tmp2666 = getelementptr %struct.Macroblock* null, i32 0, i32 13 ; [#uses=2] %tmp2674 = trunc i32 0 to i8 ; [#uses=1] - br i1 true, label %cond_true2732.preheader.split.us, label %cond_true2732.preheader.split -cond_true2732.preheader.split.us: ; preds = %cond_true2732.preheader - br i1 true, label %cond_true2732.outer.us.us, label %cond_true2732.outer.us -cond_true2732.outer.us.us: ; preds = %cond_true2732.preheader.split.us %tmp2667.us.us = load i64* %tmp2666 ; [#uses=1] %tmp2670.us.us = load i64* null ; [#uses=1] %shift.upgrd.1 = zext i8 %tmp2674 to i64 ; [#uses=1] @@ -24,11 +16,5 @@ %tmp2676.us.us = and i64 %tmp2667.us.us, %tmp2675not.us.us ; [#uses=1] store i64 %tmp2676.us.us, i64* %tmp2666 ret i32 0 -cond_true2732.outer.us: ; preds = %cond_true2732.preheader.split.us - ret i32 0 -cond_true2732.preheader.split: ; preds = %cond_true2732.preheader - ret i32 0 -cond_next2752: ; No predecessors! - ret i32 0 } From evan.cheng at apple.com Tue Mar 2 13:02:28 2010 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 02 Mar 2010 19:02:28 -0000 Subject: [llvm-commits] [llvm] r97577 - /llvm/trunk/lib/CodeGen/MachineCSE.cpp Message-ID: <20100302190228.1C9BE2A6C12C@llvm.org> Author: evancheng Date: Tue Mar 2 13:02:27 2010 New Revision: 97577 URL: http://llvm.org/viewvc/llvm-project?rev=97577&view=rev Log: Fix typo. Modified: llvm/trunk/lib/CodeGen/MachineCSE.cpp Modified: llvm/trunk/lib/CodeGen/MachineCSE.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineCSE.cpp?rev=97577&r1=97576&r2=97577&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/MachineCSE.cpp (original) +++ llvm/trunk/lib/CodeGen/MachineCSE.cpp Tue Mar 2 13:02:27 2010 @@ -8,7 +8,7 @@ //===----------------------------------------------------------------------===// // // This pass performs global common subexpression elimination on machine -// instructions using a scoped hash table based value numbering schemem. IT +// instructions using a scoped hash table based value numbering scheme. It // must be run while the machine function is still in SSA form. // //===----------------------------------------------------------------------===// From evan.cheng at apple.com Tue Mar 2 13:03:01 2010 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 02 Mar 2010 19:03:01 -0000 Subject: [llvm-commits] [llvm] r97578 - in /llvm/trunk: include/llvm/CodeGen/MachineInstr.h lib/CodeGen/DeadMachineInstructionElim.cpp lib/CodeGen/MachineInstr.cpp lib/CodeGen/MachineSink.cpp lib/CodeGen/SimpleRegisterCoalescing.cpp lib/CodeGen/TwoAddressInstructionPass.cpp Message-ID: <20100302190301.D16EF2A6C12C@llvm.org> Author: evancheng Date: Tue Mar 2 13:03:01 2010 New Revision: 97578 URL: http://llvm.org/viewvc/llvm-project?rev=97578&view=rev Log: Swap parameters of isSafeToMove and isSafeToReMat for consistency. Modified: llvm/trunk/include/llvm/CodeGen/MachineInstr.h llvm/trunk/lib/CodeGen/DeadMachineInstructionElim.cpp llvm/trunk/lib/CodeGen/MachineInstr.cpp llvm/trunk/lib/CodeGen/MachineSink.cpp llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp llvm/trunk/lib/CodeGen/TwoAddressInstructionPass.cpp Modified: llvm/trunk/include/llvm/CodeGen/MachineInstr.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineInstr.h?rev=97578&r1=97577&r2=97578&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/MachineInstr.h (original) +++ llvm/trunk/include/llvm/CodeGen/MachineInstr.h Tue Mar 2 13:03:01 2010 @@ -331,13 +331,13 @@ /// isSafeToMove - Return true if it is safe to move this instruction. If /// SawStore is set to true, it means that there is a store (or call) between /// the instruction's location and its intended destination. - bool isSafeToMove(const TargetInstrInfo *TII, bool &SawStore, - AliasAnalysis *AA) const; + bool isSafeToMove(const TargetInstrInfo *TII, AliasAnalysis *AA, + bool &SawStore) const; /// isSafeToReMat - Return true if it's safe to rematerialize the specified /// instruction which defined the specified register instead of copying it. - bool isSafeToReMat(const TargetInstrInfo *TII, unsigned DstReg, - AliasAnalysis *AA) const; + bool isSafeToReMat(const TargetInstrInfo *TII, AliasAnalysis *AA, + unsigned DstReg) const; /// hasVolatileMemoryRef - Return true if this instruction may have a /// volatile memory reference, or if the information describing the Modified: llvm/trunk/lib/CodeGen/DeadMachineInstructionElim.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/DeadMachineInstructionElim.cpp?rev=97578&r1=97577&r2=97578&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/DeadMachineInstructionElim.cpp (original) +++ llvm/trunk/lib/CodeGen/DeadMachineInstructionElim.cpp Tue Mar 2 13:03:01 2010 @@ -55,7 +55,7 @@ bool DeadMachineInstructionElim::isDead(const MachineInstr *MI) const { // Don't delete instructions with side effects. bool SawStore = false; - if (!MI->isSafeToMove(TII, SawStore, 0) && !MI->isPHI()) + if (!MI->isSafeToMove(TII, 0, SawStore) && !MI->isPHI()) return false; // Examine each operand. Modified: llvm/trunk/lib/CodeGen/MachineInstr.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineInstr.cpp?rev=97578&r1=97577&r2=97578&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/MachineInstr.cpp (original) +++ llvm/trunk/lib/CodeGen/MachineInstr.cpp Tue Mar 2 13:03:01 2010 @@ -959,8 +959,8 @@ /// SawStore is set to true, it means that there is a store (or call) between /// the instruction's location and its intended destination. bool MachineInstr::isSafeToMove(const TargetInstrInfo *TII, - bool &SawStore, - AliasAnalysis *AA) const { + AliasAnalysis *AA, + bool &SawStore) const { // Ignore stuff that we obviously can't move. if (TID->mayStore() || TID->isCall()) { SawStore = true; @@ -985,11 +985,11 @@ /// isSafeToReMat - Return true if it's safe to rematerialize the specified /// instruction which defined the specified register instead of copying it. bool MachineInstr::isSafeToReMat(const TargetInstrInfo *TII, - unsigned DstReg, - AliasAnalysis *AA) const { + AliasAnalysis *AA, + unsigned DstReg) const { bool SawStore = false; if (!TII->isTriviallyReMaterializable(this, AA) || - !isSafeToMove(TII, SawStore, AA)) + !isSafeToMove(TII, AA, SawStore)) return false; for (unsigned i = 0, e = getNumOperands(); i != e; ++i) { const MachineOperand &MO = getOperand(i); Modified: llvm/trunk/lib/CodeGen/MachineSink.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineSink.cpp?rev=97578&r1=97577&r2=97578&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/MachineSink.cpp (original) +++ llvm/trunk/lib/CodeGen/MachineSink.cpp Tue Mar 2 13:03:01 2010 @@ -149,7 +149,7 @@ /// instruction out of its current block into a successor. bool MachineSinking::SinkInstruction(MachineInstr *MI, bool &SawStore) { // Check if it's safe to move the instruction. - if (!MI->isSafeToMove(TII, SawStore, AA)) + if (!MI->isSafeToMove(TII, AA, SawStore)) return false; // FIXME: This should include support for sinking instructions within the Modified: llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp?rev=97578&r1=97577&r2=97578&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp (original) +++ llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp Tue Mar 2 13:03:01 2010 @@ -662,7 +662,7 @@ if (!tii_->isTriviallyReMaterializable(DefMI, AA)) return false; bool SawStore = false; - if (!DefMI->isSafeToMove(tii_, SawStore, AA)) + if (!DefMI->isSafeToMove(tii_, AA, SawStore)) return false; if (TID.getNumDefs() != 1) return false; Modified: llvm/trunk/lib/CodeGen/TwoAddressInstructionPass.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/TwoAddressInstructionPass.cpp?rev=97578&r1=97577&r2=97578&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/TwoAddressInstructionPass.cpp (original) +++ llvm/trunk/lib/CodeGen/TwoAddressInstructionPass.cpp Tue Mar 2 13:03:01 2010 @@ -160,7 +160,7 @@ MachineBasicBlock::iterator OldPos) { // Check if it's safe to move this instruction. bool SeenStore = true; // Be conservative. - if (!MI->isSafeToMove(TII, SeenStore, AA)) + if (!MI->isSafeToMove(TII, AA, SeenStore)) return false; unsigned DefReg = 0; @@ -1028,7 +1028,7 @@ // copying it. if (DefMI && DefMI->getDesc().isAsCheapAsAMove() && - DefMI->isSafeToReMat(TII, regB, AA) && + DefMI->isSafeToReMat(TII, AA, regB) && isProfitableToReMat(regB, rc, mi, DefMI, mbbi, Dist)){ DEBUG(dbgs() << "2addr: REMATTING : " << *DefMI << "\n"); unsigned regASubIdx = mi->getOperand(DstIdx).getSubReg(); From gohman at apple.com Tue Mar 2 13:32:21 2010 From: gohman at apple.com (Dan Gohman) Date: Tue, 02 Mar 2010 19:32:21 -0000 Subject: [llvm-commits] [llvm] r97580 - in /llvm/trunk: lib/Analysis/ScalarEvolutionExpander.cpp test/CodeGen/X86/pr3495.ll Message-ID: <20100302193221.AD91F2A6C12C@llvm.org> Author: djg Date: Tue Mar 2 13:32:21 2010 New Revision: 97580 URL: http://llvm.org/viewvc/llvm-project?rev=97580&view=rev Log: When expanding an expression such as (A + B + C + D), sort the operands by loop depth and emit loop-invariant subexpressions outside of loops. This speeds up MultiSource/Applications/viterbi and others. Modified: llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp llvm/trunk/test/CodeGen/X86/pr3495.ll Modified: llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp?rev=97580&r1=97579&r2=97580&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp (original) +++ llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp Tue Mar 2 13:32:21 2010 @@ -528,48 +528,138 @@ return SC->getValue()->getValue().isNegative(); } +/// PickMostRelevantLoop - Given two loops pick the one that's most relevant for +/// SCEV expansion. If they are nested, this is the most nested. If they are +/// neighboring, pick the later. +static const Loop *PickMostRelevantLoop(const Loop *A, const Loop *B, + DominatorTree &DT) { + if (!A) return B; + if (!B) return A; + if (A->contains(B)) return B; + if (B->contains(A)) return A; + if (DT.dominates(A->getHeader(), B->getHeader())) return B; + if (DT.dominates(B->getHeader(), A->getHeader())) return A; + return A; // Arbitrarily break the tie. +} + +/// GetRelevantLoop - Get the most relevant loop associated with the given +/// expression, according to PickMostRelevantLoop. +static const Loop *GetRelevantLoop(const SCEV *S, LoopInfo &LI, + DominatorTree &DT) { + if (isa(S)) + return 0; + if (const SCEVUnknown *U = dyn_cast(S)) { + if (const Instruction *I = dyn_cast(U->getValue())) + return LI.getLoopFor(I->getParent()); + return 0; + } + if (const SCEVNAryExpr *N = dyn_cast(S)) { + const Loop *L = 0; + if (const SCEVAddRecExpr *AR = dyn_cast(S)) + L = AR->getLoop(); + for (SCEVNAryExpr::op_iterator I = N->op_begin(), E = N->op_end(); + I != E; ++I) + L = PickMostRelevantLoop(L, GetRelevantLoop(*I, LI, DT), DT); + return L; + } + if (const SCEVCastExpr *C = dyn_cast(S)) + return GetRelevantLoop(C->getOperand(), LI, DT); + if (const SCEVUDivExpr *D = dyn_cast(S)) + return PickMostRelevantLoop(GetRelevantLoop(D->getLHS(), LI, DT), + GetRelevantLoop(D->getRHS(), LI, DT), + DT); + llvm_unreachable("Unexpected SCEV type!"); +} + +namespace { + +/// LoopCompare - Compare loops by PickMostRelevantLoop. +class LoopCompare { + DominatorTree &DT; +public: + explicit LoopCompare(DominatorTree &dt) : DT(dt) {} + + bool operator()(std::pair LHS, + std::pair RHS) const { + // Compare loops with PickMostRelevantLoop. + if (LHS.first != RHS.first) + return PickMostRelevantLoop(LHS.first, RHS.first, DT) == LHS.first; + + // If one operand is a non-constant negative and the other is not, + // put the non-constant negative on the right so that a sub can + // be used instead of a negate and add. + if (isNonConstantNegative(LHS.second)) { + if (!isNonConstantNegative(RHS.second)) + return false; + } else if (isNonConstantNegative(RHS.second)) + return true; + + // Otherwise they are equivalent according to this comparison. + return false; + } +}; + +} + Value *SCEVExpander::visitAddExpr(const SCEVAddExpr *S) { - int NumOperands = S->getNumOperands(); const Type *Ty = SE.getEffectiveSCEVType(S->getType()); - // Find the index of an operand to start with. Choose the operand with - // pointer type, if there is one, or the last operand otherwise. - int PIdx = 0; - for (; PIdx != NumOperands - 1; ++PIdx) - if (S->getOperand(PIdx)->getType()->isPointerTy()) break; - - // Expand code for the operand that we chose. - Value *V = expand(S->getOperand(PIdx)); - - // Turn things like ptrtoint+arithmetic+inttoptr into GEP. See the - // comments on expandAddToGEP for details. - if (const PointerType *PTy = dyn_cast(V->getType())) { - // Take the operand at PIdx out of the list. - const SmallVectorImpl &Ops = S->getOperands(); - SmallVector NewOps; - NewOps.insert(NewOps.end(), Ops.begin(), Ops.begin() + PIdx); - NewOps.insert(NewOps.end(), Ops.begin() + PIdx + 1, Ops.end()); - // Make a GEP. - return expandAddToGEP(NewOps.begin(), NewOps.end(), PTy, Ty, V); - } - - // Otherwise, we'll expand the rest of the SCEVAddExpr as plain integer - // arithmetic. - V = InsertNoopCastOfTo(V, Ty); - - // Emit a bunch of add instructions - for (int i = NumOperands-1; i >= 0; --i) { - if (i == PIdx) continue; - const SCEV *Op = S->getOperand(i); - if (isNonConstantNegative(Op)) { + // Collect all the add operands in a loop, along with their associated loops. + // Iterate in reverse so that constants are emitted last, all else equal, and + // so that pointer operands are inserted first, which the code below relies on + // to form more involved GEPs. + SmallVector, 8> OpsAndLoops; + for (std::reverse_iterator I(S->op_end()), + E(S->op_begin()); I != E; ++I) + OpsAndLoops.push_back(std::make_pair(GetRelevantLoop(*I, *SE.LI, *SE.DT), + *I)); + + // Sort by loop. Use a stable sort so that constants follow non-constants and + // pointer operands precede non-pointer operands. + std::stable_sort(OpsAndLoops.begin(), OpsAndLoops.end(), LoopCompare(*SE.DT)); + + // Emit instructions to add all the operands. Hoist as much as possible + // out of loops, and form meaningful getelementptrs where possible. + Value *Sum = 0; + for (SmallVectorImpl >::iterator + I = OpsAndLoops.begin(), E = OpsAndLoops.end(); I != E; ) { + const Loop *CurLoop = I->first; + const SCEV *Op = I->second; + if (!Sum) { + // This is the first operand. Just expand it. + Sum = expand(Op); + ++I; + } else if (const PointerType *PTy = dyn_cast(Sum->getType())) { + // The running sum expression is a pointer. Try to form a getelementptr + // at this level with that as the base. + SmallVector NewOps; + for (; I != E && I->first == CurLoop; ++I) + NewOps.push_back(I->second); + Sum = expandAddToGEP(NewOps.begin(), NewOps.end(), PTy, Ty, Sum); + } else if (const PointerType *PTy = dyn_cast(Op->getType())) { + // The running sum is an integer, and there's a pointer at this level. + // Try to form a getelementptr. + SmallVector NewOps; + NewOps.push_back(SE.getUnknown(Sum)); + for (++I; I != E && I->first == CurLoop; ++I) + NewOps.push_back(I->second); + Sum = expandAddToGEP(NewOps.begin(), NewOps.end(), PTy, Ty, expand(Op)); + } else if (isNonConstantNegative(Op)) { + // Instead of doing a negate and add, just do a subtract. Value *W = expandCodeFor(SE.getNegativeSCEV(Op), Ty); - V = InsertBinop(Instruction::Sub, V, W); + Sum = InsertNoopCastOfTo(Sum, Ty); + Sum = InsertBinop(Instruction::Sub, Sum, W); + ++I; } else { + // A simple add. Value *W = expandCodeFor(Op, Ty); - V = InsertBinop(Instruction::Add, V, W); + Sum = InsertNoopCastOfTo(Sum, Ty); + Sum = InsertBinop(Instruction::Add, Sum, W); + ++I; } } - return V; + + return Sum; } Value *SCEVExpander::visitMulExpr(const SCEVMulExpr *S) { Modified: llvm/trunk/test/CodeGen/X86/pr3495.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/pr3495.ll?rev=97580&r1=97579&r2=97580&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/pr3495.ll (original) +++ llvm/trunk/test/CodeGen/X86/pr3495.ll Tue Mar 2 13:32:21 2010 @@ -1,6 +1,6 @@ -; RUN: llc < %s -march=x86 -stats |& grep {Number of loads added} | grep 2 -; RUN: llc < %s -march=x86 -stats |& grep {Number of register spills} | grep 1 -; RUN: llc < %s -march=x86 -stats |& grep {Number of machine instrs printed} | grep 34 +; RUN: llc < %s -march=x86 -stats |& not grep {Number of loads added} +; RUN: llc < %s -march=x86 -stats |& not grep {Number of register spills} +; RUN: llc < %s -march=x86 -stats |& grep {Number of machine instrs printed} | grep 32 ; PR3495 target triple = "i386-pc-linux-gnu" From sabre at nondot.org Tue Mar 2 13:34:59 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 02 Mar 2010 19:34:59 -0000 Subject: [llvm-commits] [llvm] r97581 - /llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Message-ID: <20100302193500.07EB62A6C12C@llvm.org> Author: lattner Date: Tue Mar 2 13:34:59 2010 New Revision: 97581 URL: http://llvm.org/viewvc/llvm-project?rev=97581&view=rev Log: run HandleMergeInputChains even if we only have one input chain. Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp?rev=97581&r1=97580&r2=97581&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Tue Mar 2 13:34:59 2010 @@ -1722,7 +1722,7 @@ } /// HandleMergeInputChains - This implements the OPC_EmitMergeInputChains -/// operation for when the pattern matched multiple nodes with chains. The +/// operation for when the pattern matched at least one node with a chains. The /// input vector contains a list of all of the chained nodes that we match. We /// must determine if this is a valid thing to cover (i.e. matching it won't /// induce cycles in the DAG) and if so, creating a TokenFactor node. that will @@ -1730,9 +1730,6 @@ static SDValue HandleMergeInputChains(SmallVectorImpl &ChainNodesMatched, SelectionDAG *CurDAG) { - assert(ChainNodesMatched.size() > 1 && - "Should only happen for multi chain node case"); - // Walk all of the chained nodes we've matched, recursively scanning down the // users of the chain result. This adds any TokenFactor nodes that are caught // in between chained nodes to the chained and interior nodes list. @@ -2230,32 +2227,9 @@ assert(ChainNodesMatched.empty() && "Should only have one EmitMergeInputChains per match"); - // Handle the first chain. - unsigned RecNo = MatcherTable[MatcherIndex++]; - assert(RecNo < RecordedNodes.size() && "Invalid CheckSame"); - ChainNodesMatched.push_back(RecordedNodes[RecNo].getNode()); - - // If the chained node is not the root, we can't fold it if it has - // multiple uses. - // FIXME: What if other value results of the node have uses not matched by - // this pattern? - if (ChainNodesMatched.back() != NodeToMatch && - !RecordedNodes[RecNo].hasOneUse()) { - ChainNodesMatched.clear(); - break; - } - - // The common case here is that we have exactly one chain, which is really - // cheap to handle, just do it. - if (NumChains == 1) { - InputChain = RecordedNodes[RecNo].getOperand(0); - assert(InputChain.getValueType() == MVT::Other && "Not a chain"); - continue; - } - // Read all of the chained nodes. - for (unsigned i = 1; i != NumChains; ++i) { - RecNo = MatcherTable[MatcherIndex++]; + for (unsigned i = 0; i != NumChains; ++i) { + unsigned RecNo = MatcherTable[MatcherIndex++]; assert(RecNo < RecordedNodes.size() && "Invalid CheckSame"); ChainNodesMatched.push_back(RecordedNodes[RecNo].getNode()); From johnny.chen at apple.com Tue Mar 2 13:38:59 2010 From: johnny.chen at apple.com (Johnny Chen) Date: Tue, 02 Mar 2010 19:38:59 -0000 Subject: [llvm-commits] [llvm] r97582 - /llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td Message-ID: <20100302193859.DE9DB2A6C12D@llvm.org> Author: johnny Date: Tue Mar 2 13:38:59 2010 New Revision: 97582 URL: http://llvm.org/viewvc/llvm-project?rev=97582&view=rev Log: Removed the extra S from the multiclass def T2I_adde_sube_s_irs as well as from the opc string passed in, since it's a given from the class inheritance of T2sI. The fixed the extra 's' in adcss & sbcss when disassembly printing. Modified: llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td Modified: llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td?rev=97582&r1=97581&r2=97582&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td (original) +++ llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td Tue Mar 2 13:38:59 2010 @@ -415,10 +415,10 @@ multiclass T2I_adde_sube_s_irs opcod, string opc, PatFrag opnode, bit Commutable = 0> { // shifted imm - def Sri : T2sI<(outs GPR:$dst), (ins GPR:$lhs, t2_so_imm:$rhs), IIC_iALUi, - opc, "\t$dst, $lhs, $rhs", - [(set GPR:$dst, (opnode GPR:$lhs, t2_so_imm:$rhs))]>, - Requires<[IsThumb2]> { + def ri : T2sI<(outs GPR:$dst), (ins GPR:$lhs, t2_so_imm:$rhs), IIC_iALUi, + opc, "\t$dst, $lhs, $rhs", + [(set GPR:$dst, (opnode GPR:$lhs, t2_so_imm:$rhs))]>, + Requires<[IsThumb2]> { let Inst{31-27} = 0b11110; let Inst{25} = 0; let Inst{24-21} = opcod; @@ -426,10 +426,10 @@ let Inst{15} = 0; } // register - def Srr : T2sI<(outs GPR:$dst), (ins GPR:$lhs, GPR:$rhs), IIC_iALUr, - opc, ".w\t$dst, $lhs, $rhs", - [(set GPR:$dst, (opnode GPR:$lhs, GPR:$rhs))]>, - Requires<[IsThumb2]> { + def rr : T2sI<(outs GPR:$dst), (ins GPR:$lhs, GPR:$rhs), IIC_iALUr, + opc, ".w\t$dst, $lhs, $rhs", + [(set GPR:$dst, (opnode GPR:$lhs, GPR:$rhs))]>, + Requires<[IsThumb2]> { let isCommutable = Commutable; let Inst{31-27} = 0b11101; let Inst{26-25} = 0b01; @@ -440,10 +440,10 @@ let Inst{5-4} = 0b00; // type } // shifted register - def Srs : T2sI<(outs GPR:$dst), (ins GPR:$lhs, t2_so_reg:$rhs), IIC_iALUsi, - opc, ".w\t$dst, $lhs, $rhs", - [(set GPR:$dst, (opnode GPR:$lhs, t2_so_reg:$rhs))]>, - Requires<[IsThumb2]> { + def rs : T2sI<(outs GPR:$dst), (ins GPR:$lhs, t2_so_reg:$rhs), IIC_iALUsi, + opc, ".w\t$dst, $lhs, $rhs", + [(set GPR:$dst, (opnode GPR:$lhs, t2_so_reg:$rhs))]>, + Requires<[IsThumb2]> { let Inst{31-27} = 0b11101; let Inst{26-25} = 0b01; let Inst{24-21} = opcod; @@ -1196,9 +1196,9 @@ BinOpFrag<(adde_dead_carry node:$LHS, node:$RHS)>, 1>; defm t2SBC : T2I_adde_sube_irs<0b1011, "sbc", BinOpFrag<(sube_dead_carry node:$LHS, node:$RHS)>>; -defm t2ADCS : T2I_adde_sube_s_irs<0b1010, "adcs", +defm t2ADCS : T2I_adde_sube_s_irs<0b1010, "adc", BinOpFrag<(adde_live_carry node:$LHS, node:$RHS)>, 1>; -defm t2SBCS : T2I_adde_sube_s_irs<0b1011, "sbcs", +defm t2SBCS : T2I_adde_sube_s_irs<0b1011, "sbc", BinOpFrag<(sube_live_carry node:$LHS, node:$RHS)>>; // RSB From echristo at apple.com Tue Mar 2 13:48:11 2010 From: echristo at apple.com (Eric Christopher) Date: Tue, 02 Mar 2010 19:48:11 -0000 Subject: [llvm-commits] [llvm-gcc-4.2] r97583 - in /llvm-gcc-4.2/trunk/gcc: Makefile.in config.gcc Message-ID: <20100302194811.A67612A6C12D@llvm.org> Author: echristo Date: Tue Mar 2 13:48:11 2010 New Revision: 97583 URL: http://llvm.org/viewvc/llvm-project?rev=97583&view=rev Log: Don't install unwind.h on darwin10 or later. These platforms use libunwind which already installs a header. Modified: llvm-gcc-4.2/trunk/gcc/Makefile.in llvm-gcc-4.2/trunk/gcc/config.gcc Modified: llvm-gcc-4.2/trunk/gcc/Makefile.in URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/Makefile.in?rev=97583&r1=97582&r2=97583&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/Makefile.in (original) +++ llvm-gcc-4.2/trunk/gcc/Makefile.in Tue Mar 2 13:48:11 2010 @@ -476,6 +476,11 @@ # each of $(system_prefix)/usr/include, $(system_prefix)/usr/lib, etc. TARGET_SYSTEM_ROOT = @TARGET_SYSTEM_ROOT@ +# LLVM LOCAL begin +# Whether to install unwind.h +INSTALL_UNWIND_H = @install_unwind_h@ +# LLVM LOCAL end + xmake_file=@xmake_file@ tmake_file=@tmake_file@ out_file=$(srcdir)/config/@out_file@ @@ -3550,8 +3555,10 @@ done rm -f include/limits.h cp xlimits.h include/limits.h - rm -f include/unwind.h - cp $(UNWIND_H) include/unwind.h + if [ $(INSTALL_UNWIND_H) = yes ]; then \ + rm -f include/unwind.h; \ + cp $(UNWIND_H) include/unwind.h; \ + fi; chmod a+r include/limits.h # Install the README rm -f include/README @@ -4308,7 +4315,9 @@ $(DESTDIR)$(itoolsdatadir)/include/$$realfile ; \ done $(INSTALL_DATA) xlimits.h $(DESTDIR)$(itoolsdatadir)/include/limits.h - $(INSTALL_DATA) $(UNWIND_H) $(DESTDIR)$(itoolsdatadir)/include/unwind.h + if [ $(INSTALL_UNWIND_H) = yes ]; then \ + $(INSTALL_DATA) $(UNWIND_H) $(DESTDIR)$(itoolsdatadir)/include/unwind.h; \ + fi $(INSTALL_DATA) $(srcdir)/gsyslimits.h \ $(DESTDIR)$(itoolsdatadir)/gsyslimits.h $(INSTALL_DATA) macro_list $(DESTDIR)$(itoolsdatadir)/macro_list Modified: llvm-gcc-4.2/trunk/gcc/config.gcc URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/config.gcc?rev=97583&r1=97582&r2=97583&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/config.gcc (original) +++ llvm-gcc-4.2/trunk/gcc/config.gcc Tue Mar 2 13:48:11 2010 @@ -146,6 +146,12 @@ # # use_fixproto Set to "yes" if fixproto should be run normally, # "no" if fixproto should never be run. +# LLVM LOCAL begin +# +# install_unwind_h Set to "no" if you are using a libunwind based +# header and already have one installed on the system. +# +# LLVM LOCAL end # The following variables are used in each case-construct to build up the # outgoing variables: @@ -188,6 +194,12 @@ # specifically set this to 'yes'. use_fixproto=no +# LLVM LOCAL begin +# Default to installing unwind.h. Targets which don't want to install +# this header should specifically set this to 'no'. +install_unwind_h=yes +# LLVM LOCAL end + # Don't carry these over build->host->target. Please. xm_file= md_file= @@ -423,6 +435,8 @@ # APPLE LOCAL begin .file/.loc 6349436 *-*-darwin[12][0-9]*) tm_file="${tm_file} darwin9.h darwin10.h" + # LLVM LOCAL + install_unwind_h=no ;; # APPLE LOCAL end .file/.loc 6349436 esac From sabre at nondot.org Tue Mar 2 13:53:26 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 02 Mar 2010 19:53:26 -0000 Subject: [llvm-commits] [llvm] r97584 - /llvm/trunk/test/CodeGen/PIC16/C16-11.ll Message-ID: <20100302195326.1A9962A6C12D@llvm.org> Author: lattner Date: Tue Mar 2 13:53:25 2010 New Revision: 97584 URL: http://llvm.org/viewvc/llvm-project?rev=97584&view=rev Log: xfail this for now. Modified: llvm/trunk/test/CodeGen/PIC16/C16-11.ll Modified: llvm/trunk/test/CodeGen/PIC16/C16-11.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PIC16/C16-11.ll?rev=97584&r1=97583&r2=97584&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/PIC16/C16-11.ll (original) +++ llvm/trunk/test/CodeGen/PIC16/C16-11.ll Tue Mar 2 13:53:25 2010 @@ -1,4 +1,5 @@ ;RUN: llc < %s -march=pic16 +; XFAIL: * @c612.auto.a.b = internal global i1 false ; [#uses=2] @c612.auto.A.b = internal global i1 false ; [#uses=2] From idadesub at users.sourceforge.net Tue Mar 2 14:32:28 2010 From: idadesub at users.sourceforge.net (Erick Tryzelaar) Date: Tue, 02 Mar 2010 20:32:28 -0000 Subject: [llvm-commits] [llvm] r97585 - in /llvm/trunk: include/llvm-c/Core.h lib/VMCore/Core.cpp Message-ID: <20100302203228.8BC982A6C12C@llvm.org> Author: erickt Date: Tue Mar 2 14:32:28 2010 New Revision: 97585 URL: http://llvm.org/viewvc/llvm-project?rev=97585&view=rev Log: Rename LLVMUseIteratorRef to LLVMUseRef since we don't refer to iterators in llvm-c. Modified: llvm/trunk/include/llvm-c/Core.h llvm/trunk/lib/VMCore/Core.cpp Modified: llvm/trunk/include/llvm-c/Core.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm-c/Core.h?rev=97585&r1=97584&r2=97585&view=diff ============================================================================== --- llvm/trunk/include/llvm-c/Core.h (original) +++ llvm/trunk/include/llvm-c/Core.h Tue Mar 2 14:32:28 2010 @@ -92,11 +92,8 @@ /** See the llvm::PassManagerBase class. */ typedef struct LLVMOpaquePassManager *LLVMPassManagerRef; -/** - * Used to iterate through the uses of a Value, allowing access to all Values - * that use this Value. See the llvm::Use and llvm::value_use_iterator classes. - */ -typedef struct LLVMOpaqueUseIterator *LLVMUseIteratorRef; +/** Used to get the users and usees of a Value. See the llvm::Use class. */ +typedef struct LLVMOpaqueUse *LLVMUseRef; typedef enum { LLVMZExtAttribute = 1<<0, @@ -514,10 +511,10 @@ LLVM_FOR_EACH_VALUE_SUBCLASS(LLVM_DECLARE_VALUE_CAST) /* Operations on Uses */ -LLVMUseIteratorRef LLVMGetFirstUse(LLVMValueRef Val); -LLVMUseIteratorRef LLVMGetNextUse(LLVMUseIteratorRef U); -LLVMValueRef LLVMGetUser(LLVMUseIteratorRef U); -LLVMValueRef LLVMGetUsedValue(LLVMUseIteratorRef U); +LLVMUseRef LLVMGetFirstUse(LLVMValueRef Val); +LLVMUseRef LLVMGetNextUse(LLVMUseRef U); +LLVMValueRef LLVMGetUser(LLVMUseRef U); +LLVMValueRef LLVMGetUsedValue(LLVMUseRef U); /* Operations on Users */ LLVMValueRef LLVMGetOperand(LLVMValueRef Val, unsigned Index); @@ -1096,7 +1093,7 @@ DEFINE_SIMPLE_CONVERSION_FUNCTIONS(PATypeHolder, LLVMTypeHandleRef ) DEFINE_SIMPLE_CONVERSION_FUNCTIONS(MemoryBuffer, LLVMMemoryBufferRef ) DEFINE_SIMPLE_CONVERSION_FUNCTIONS(LLVMContext, LLVMContextRef ) - DEFINE_SIMPLE_CONVERSION_FUNCTIONS(Use, LLVMUseIteratorRef ) + DEFINE_SIMPLE_CONVERSION_FUNCTIONS(Use, LLVMUseRef ) DEFINE_STDCXX_CONVERSION_FUNCTIONS(PassManagerBase, LLVMPassManagerRef ) /* LLVMModuleProviderRef exists for historical reasons, but now just holds a * Module. Modified: llvm/trunk/lib/VMCore/Core.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Core.cpp?rev=97585&r1=97584&r2=97585&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/Core.cpp (original) +++ llvm/trunk/lib/VMCore/Core.cpp Tue Mar 2 14:32:28 2010 @@ -456,7 +456,7 @@ LLVM_FOR_EACH_VALUE_SUBCLASS(LLVM_DEFINE_VALUE_CAST) /*--.. Operations on Uses ..................................................--*/ -LLVMUseIteratorRef LLVMGetFirstUse(LLVMValueRef Val) { +LLVMUseRef LLVMGetFirstUse(LLVMValueRef Val) { Value *V = unwrap(Val); Value::use_iterator I = V->use_begin(); if (I == V->use_end()) @@ -464,16 +464,19 @@ return wrap(&(I.getUse())); } -LLVMUseIteratorRef LLVMGetNextUse(LLVMUseIteratorRef UR) { - return wrap(unwrap(UR)->getNext()); +LLVMUseRef LLVMGetNextUse(LLVMUseRef U) { + Use *Next = unwrap(U)->getNext(); + if (Next) + return wrap(Next); + return 0; } -LLVMValueRef LLVMGetUser(LLVMUseIteratorRef UR) { - return wrap(unwrap(UR)->getUser()); +LLVMValueRef LLVMGetUser(LLVMUseRef U) { + return wrap(unwrap(U)->getUser()); } -LLVMValueRef LLVMGetUsedValue(LLVMUseIteratorRef UR) { - return wrap(unwrap(UR)->get()); +LLVMValueRef LLVMGetUsedValue(LLVMUseRef U) { + return wrap(unwrap(U)->get()); } /*--.. Operations on Users .................................................--*/ From idadesub at users.sourceforge.net Tue Mar 2 14:32:32 2010 From: idadesub at users.sourceforge.net (Erick Tryzelaar) Date: Tue, 02 Mar 2010 20:32:32 -0000 Subject: [llvm-commits] [llvm] r97586 - in /llvm/trunk: bindings/ocaml/llvm/llvm.ml bindings/ocaml/llvm/llvm.mli bindings/ocaml/llvm/llvm_ocaml.c test/Bindings/Ocaml/vmcore.ml Message-ID: <20100302203232.59E822A6C12D@llvm.org> Author: erickt Date: Tue Mar 2 14:32:32 2010 New Revision: 97586 URL: http://llvm.org/viewvc/llvm-project?rev=97586&view=rev Log: Add support for use to ocaml. Modified: llvm/trunk/bindings/ocaml/llvm/llvm.ml llvm/trunk/bindings/ocaml/llvm/llvm.mli llvm/trunk/bindings/ocaml/llvm/llvm_ocaml.c llvm/trunk/test/Bindings/Ocaml/vmcore.ml Modified: llvm/trunk/bindings/ocaml/llvm/llvm.ml URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/bindings/ocaml/llvm/llvm.ml?rev=97586&r1=97585&r2=97586&view=diff ============================================================================== --- llvm/trunk/bindings/ocaml/llvm/llvm.ml (original) +++ llvm/trunk/bindings/ocaml/llvm/llvm.ml Tue Mar 2 14:32:32 2010 @@ -13,6 +13,7 @@ type lltype type lltypehandle type llvalue +type lluse type llbasicblock type llbuilder type llmoduleprovider @@ -242,6 +243,38 @@ external replace_all_uses_with : llvalue -> llvalue -> unit = "LLVMReplaceAllUsesWith" +(*--... Operations on uses .................................................--*) +external use_begin : llvalue -> lluse option = "llvm_use_begin" +external use_succ : lluse -> lluse option = "llvm_use_succ" +external user : lluse -> llvalue = "llvm_user" +external used_value : lluse -> llvalue = "llvm_used_value" + +let iter_uses f v = + let rec aux = function + | None -> () + | Some u -> + f u; + aux (use_succ u) + in + aux (use_begin v) + +let fold_left_uses f init v = + let rec aux init u = + match u with + | None -> init + | Some u -> aux (f init u) (use_succ u) + in + aux init (use_begin v) + +let fold_right_uses f v init = + let rec aux u init = + match u with + | None -> init + | Some u -> f u (aux (use_succ u) init) + in + aux (use_begin v) init + + (*--... Operations on users ................................................--*) external operand : llvalue -> int -> llvalue = "llvm_operand" Modified: llvm/trunk/bindings/ocaml/llvm/llvm.mli URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/bindings/ocaml/llvm/llvm.mli?rev=97586&r1=97585&r2=97586&view=diff ============================================================================== --- llvm/trunk/bindings/ocaml/llvm/llvm.mli (original) +++ llvm/trunk/bindings/ocaml/llvm/llvm.mli Tue Mar 2 14:32:32 2010 @@ -39,6 +39,9 @@ This type covers a wide range of subclasses. *) type llvalue +(** Used to store users and usees of values. See the [llvm::Use] class. *) +type lluse + (** A basic block in LLVM IR. See the [llvm::BasicBlock] class. *) type llbasicblock @@ -513,6 +516,38 @@ = "LLVMReplaceAllUsesWith" +(* {6 Uses} *) + +(** [use_begin v] returns the first position in the use list for the value [v]. + [use_begin] and [use_succ] can e used to iterate over the use list in order. + See the method [llvm::Value::use_begin]. *) +external use_begin : llvalue -> lluse option = "llvm_use_begin" + +(** [use_succ u] returns the use list position succeeding [u]. + See the method [llvm::use_value_iterator::operator++]. *) +external use_succ : lluse -> lluse option = "llvm_use_succ" + +(** [user u] returns the user of the use [u]. + See the method [llvm::Use::getUser]. *) +external user : lluse -> llvalue = "llvm_user" + +(** [used_value u] returns the usee of the use [u]. + See the method [llvm::Use::getUsedValue]. *) +external used_value : lluse -> llvalue = "llvm_used_value" + +(** [iter_uses f v] applies function [f] to each of the users of the value [v] + in order. Tail recursive. *) +val iter_uses : (lluse -> unit) -> llvalue -> unit + +(** [fold_left_uses f init v] is [f (... (f init u1) ...) uN] where + [u1,...,uN] are the users of the value [v]. Tail recursive. *) +val fold_left_uses : ('a -> lluse -> 'a) -> 'a -> llvalue -> 'a + +(** [fold_right_uses f v init] is [f u1 (... (f uN init) ...)] where + [u1,...,uN] are the users of the value [v]. Not tail recursive. *) +val fold_right_uses : (lluse -> 'a -> 'a) -> llvalue -> 'a -> 'a + + (* {6 Users} *) (** [operand v i] returns the operand at index [i] for the value [v]. See the Modified: llvm/trunk/bindings/ocaml/llvm/llvm_ocaml.c URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/bindings/ocaml/llvm/llvm_ocaml.c?rev=97586&r1=97585&r2=97586&view=diff ============================================================================== --- llvm/trunk/bindings/ocaml/llvm/llvm_ocaml.c (original) +++ llvm/trunk/bindings/ocaml/llvm/llvm_ocaml.c Tue Mar 2 14:32:32 2010 @@ -707,6 +707,42 @@ return Val_unit; } +/*--... Operations on uses .................................................--*/ + +/* llvalue -> lluse option */ +CAMLprim value llvm_use_begin(LLVMValueRef Val) { + CAMLparam0(); + LLVMUseRef First; + if ((First = LLVMGetFirstUse(Val))) { + value Option = alloc(1, 0); + Field(Option, 0) = (value) First; + CAMLreturn(Option); + } + CAMLreturn(Val_int(0)); +} + +/* lluse -> lluse option */ +CAMLprim value llvm_use_succ(LLVMUseRef U) { + CAMLparam0(); + LLVMUseRef Next; + if ((Next = LLVMGetNextUse(U))) { + value Option = alloc(1, 0); + Field(Option, 0) = (value) Next; + CAMLreturn(Option); + } + CAMLreturn(Val_int(0)); +} + +/* lluse -> llvalue */ +CAMLprim LLVMValueRef llvm_user(LLVMUseRef UR) { + return LLVMGetUser(UR); +} + +/* lluse -> llvalue */ +CAMLprim LLVMValueRef llvm_used_value(LLVMUseRef UR) { + return LLVMGetUsedValue(UR); +} + /*--... Operations on global variables .....................................--*/ DEFINE_ITERATORS(global, Global, LLVMModuleRef, LLVMValueRef, Modified: llvm/trunk/test/Bindings/Ocaml/vmcore.ml URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Bindings/Ocaml/vmcore.ml?rev=97586&r1=97585&r2=97586&view=diff ============================================================================== --- llvm/trunk/test/Bindings/Ocaml/vmcore.ml (original) +++ llvm/trunk/test/Bindings/Ocaml/vmcore.ml Tue Mar 2 14:32:32 2010 @@ -607,6 +607,33 @@ end +(*===-- Uses --------------------------------------------------------------===*) + +let test_uses () = + let ty = function_type i32_type [| i32_type; i32_type |] in + let fn = define_function "use_function" ty m in + let b = builder_at_end context (entry_block fn) in + + let p1 = param fn 0 in + let p2 = param fn 1 in + let v1 = build_add p1 p2 "v1" b in + let v2 = build_add p1 v1 "v2" b in + let _ = build_add v1 v2 "v3" b in + + let lf s u = value_name (user u) ^ "->" ^ s in + insist ("v2->v3->" = fold_left_uses lf "" v1); + let rf u s = value_name (user u) ^ "<-" ^ s in + insist ("v3<-v2<-" = fold_right_uses rf v1 ""); + + let lf s u = value_name (used_value u) ^ "->" ^ s in + insist ("v1->v1->" = fold_left_uses lf "" v1); + + let rf u s = value_name (used_value u) ^ "<-" ^ s in + insist ("v1<-v1<-" = fold_right_uses rf v1 ""); + + ignore (build_unreachable b) + + (*===-- Users -------------------------------------------------------------===*) let test_users () = @@ -1291,6 +1318,7 @@ suite "constants" test_constants; suite "global values" test_global_values; suite "global variables" test_global_variables; + suite "uses" test_uses; suite "users" test_users; suite "aliases" test_aliases; suite "functions" test_functions; From bob.wilson at apple.com Tue Mar 2 14:44:43 2010 From: bob.wilson at apple.com (Bob Wilson) Date: Tue, 2 Mar 2010 12:44:43 -0800 Subject: [llvm-commits] [llvm] r97573 - in /llvm/trunk/lib/Target/ARM: ARMInstrThumb.td ARMInstrThumb2.td In-Reply-To: <20100302181457.3C1422A6C12C@llvm.org> References: <20100302181457.3C1422A6C12C@llvm.org> Message-ID: You had some upper-to-lowercase changes mixed in there. Those should have been committed separately. Please keep that in mind for the future. On Mar 2, 2010, at 10:14 AM, Johnny Chen wrote: > Author: johnny > Date: Tue Mar 2 12:14:57 2010 > New Revision: 97573 > > URL: http://llvm.org/viewvc/llvm-project?rev=97573&view=rev > Log: > Added 32-bit Thumb instructions: CPS, SDIV, UDIV, SXTB16, SXTAB16, UXTAB16, SEL, > SMMULR, SMMLAR, SMMLSR, TBB, TBH, and 16-bit Thumb instruction CPS for > disassembly only. > > Modified: > llvm/trunk/lib/Target/ARM/ARMInstrThumb.td > llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td > > Modified: llvm/trunk/lib/Target/ARM/ARMInstrThumb.td > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrThumb.td?rev=97573&r1=97572&r2=97573&view=diff > ============================================================================== > --- llvm/trunk/lib/Target/ARM/ARMInstrThumb.td (original) > +++ llvm/trunk/lib/Target/ARM/ARMInstrThumb.td Tue Mar 2 12:14:57 2010 > @@ -192,6 +192,19 @@ > let Inst{9-8} = 0b10; > } > > +// Change Processor State is a system instruction -- for disassembly only. > +// The singleton $opt operand contains the following information: > +// opt{4-0} = mode ==> don't care > +// opt{5} = changemode ==> 0 (false for 16-bit Thumb instr) > +// opt{8-6} = AIF from Inst{2-0} > +// opt{10-9} = 1:imod from Inst{4} with 0b10 as enable and 0b11 as disable > +// > +// The opt{4-0} and opt{5} sub-fields are to accommodate 32-bit Thumb and ARM > +// CPS which has more options. > +def tCPS : T1I<(outs), (ins i32imm:$opt), NoItinerary, "cps${opt:cps}", > + [/* For disassembly only; pattern left blank */]>, > + T1Misc<0b0110011>; > + > // For both thumb1 and thumb2. > let isNotDuplicable = 1 in > def tPICADD : TIt<(outs GPR:$dst), (ins GPR:$lhs, pclabel:$cp), IIC_iALUr, > > Modified: llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td?rev=97573&r1=97572&r2=97573&view=diff > ============================================================================== > --- llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td (original) > +++ llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td Tue Mar 2 12:14:57 2010 > @@ -670,6 +670,31 @@ > } > } > > +// DO variant - disassembly only, no pattern > + > +multiclass T2I_unary_rrot_DO opcod, string opc> { > + def r : T2I<(outs GPR:$dst), (ins GPR:$src), IIC_iUNAr, > + opc, "\t$dst, $src", []> { > + let Inst{31-27} = 0b11111; > + let Inst{26-23} = 0b0100; > + let Inst{22-20} = opcod; > + let Inst{19-16} = 0b1111; // Rn > + let Inst{15-12} = 0b1111; > + let Inst{7} = 1; > + let Inst{5-4} = 0b00; // rotate > + } > + def r_rot : T2I<(outs GPR:$dst), (ins GPR:$src, i32imm:$rot), IIC_iUNAsi, > + opc, "\t$dst, $src, ror $rot", []> { > + let Inst{31-27} = 0b11111; > + let Inst{26-23} = 0b0100; > + let Inst{22-20} = opcod; > + let Inst{19-16} = 0b1111; // Rn > + let Inst{15-12} = 0b1111; > + let Inst{7} = 1; > + let Inst{5-4} = {?,?}; // rotate > + } > +} > + > /// T2I_bin_rrot - A binary operation with two forms: one whose operand is a > /// register and one whose operand is a register rotated by 8/16/24. > multiclass T2I_bin_rrot opcod, string opc, PatFrag opnode> { > @@ -696,6 +721,29 @@ > } > } > > +// DO variant - disassembly only, no pattern > + > +multiclass T2I_bin_rrot_DO opcod, string opc> { > + def rr : T2I<(outs GPR:$dst), (ins GPR:$LHS, GPR:$RHS), IIC_iALUr, > + opc, "\t$dst, $LHS, $RHS", []> { > + let Inst{31-27} = 0b11111; > + let Inst{26-23} = 0b0100; > + let Inst{22-20} = opcod; > + let Inst{15-12} = 0b1111; > + let Inst{7} = 1; > + let Inst{5-4} = 0b00; // rotate > + } > + def rr_rot : T2I<(outs GPR:$dst), (ins GPR:$LHS, GPR:$RHS, i32imm:$rot), > + IIC_iALUsr, opc, "\t$dst, $LHS, $RHS, ror $rot", []> { > + let Inst{31-27} = 0b11111; > + let Inst{26-23} = 0b0100; > + let Inst{22-20} = opcod; > + let Inst{15-12} = 0b1111; > + let Inst{7} = 1; > + let Inst{5-4} = {?,?}; // rotate > + } > +} > + > //===----------------------------------------------------------------------===// > // Instructions > //===----------------------------------------------------------------------===// > @@ -791,6 +839,25 @@ > let Inst{15} = 0; > } > > +// Signed and unsigned division, for disassembly only > +def t2SDIV : T2I<(outs GPR:$dst), (ins GPR:$a, GPR:$b), IIC_iALUi, > + "sdiv", "\t$dst, $a, $b", []> { > + let Inst{31-27} = 0b11111; > + let Inst{26-21} = 0b011100; > + let Inst{20} = 0b1; > + let Inst{15-12} = 0b1111; > + let Inst{7-4} = 0b1111; > +} > + > +def t2UDIV : T2I<(outs GPR:$dst), (ins GPR:$a, GPR:$b), IIC_iALUi, > + "udiv", "\t$dst, $a, $b", []> { > + let Inst{31-27} = 0b11111; > + let Inst{26-21} = 0b011101; > + let Inst{20} = 0b1; > + let Inst{15-12} = 0b1111; > + let Inst{7-4} = 0b1111; > +} > + > // Pseudo instruction that will expand into a t2SUBrSPi + a copy. > let usesCustomInserter = 1 in { // Expanded after instruction selection. > def t2SUBrSPi_ : PseudoInst<(outs GPR:$dst), (ins GPR:$sp, t2_so_imm:$imm), > @@ -1078,13 +1145,15 @@ > UnOpFrag<(sext_inreg node:$Src, i8)>>; > defm t2SXTH : T2I_unary_rrot<0b000, "sxth", > UnOpFrag<(sext_inreg node:$Src, i16)>>; > +defm t2SXTB16 : T2I_unary_rrot_DO<0b010, "sxtb16">; > > defm t2SXTAB : T2I_bin_rrot<0b100, "sxtab", > BinOpFrag<(add node:$LHS, (sext_inreg node:$RHS, i8))>>; > defm t2SXTAH : T2I_bin_rrot<0b000, "sxtah", > BinOpFrag<(add node:$LHS, (sext_inreg node:$RHS,i16))>>; > +defm t2SXTAB16 : T2I_bin_rrot_DO<0b010, "sxtab16">; > > -// TODO: SXT(A){B|H}16 > +// TODO: SXT(A){B|H}16 - done for disassembly only > > // Zero extenders > > @@ -1105,6 +1174,7 @@ > BinOpFrag<(add node:$LHS, (and node:$RHS, 0x00FF))>>; > defm t2UXTAH : T2I_bin_rrot<0b001, "uxtah", > BinOpFrag<(add node:$LHS, (and node:$RHS, 0xFFFF))>>; > +defm t2UXTAB16 : T2I_bin_rrot_DO<0b011, "uxtab16">; > } > > //===----------------------------------------------------------------------===// > @@ -1146,6 +1216,19 @@ > def : T2Pat<(add GPR:$src, imm0_4095_neg:$imm), > (t2SUBri12 GPR:$src, imm0_4095_neg:$imm)>; > > +// Select Bytes -- for disassembly only > + > +def t2SEL : T2I<(outs GPR:$dst), (ins GPR:$a, GPR:$b), NoItinerary, "sel", > + "\t$dst, $a, $b", []> { > + let Inst{31-27} = 0b11111; > + let Inst{26-24} = 0b010; > + let Inst{23} = 0b1; > + let Inst{22-20} = 0b010; > + let Inst{15-12} = 0b1111; > + let Inst{7} = 0b1; > + let Inst{6-4} = 0b000; > +} > + > // A6.3.13, A6.3.14, A6.3.15 Parallel addition and subtraction (signed/unsigned) > // And Miscellaneous operations -- for disassembly only > class T2I_pam op22_20, bits<4> op7_4, string opc> > @@ -1220,7 +1303,7 @@ > // Signed/Unsigned saturate -- for disassembly only > > def t2SSATlsl : T2I<(outs GPR:$dst), (ins i32imm:$bit_pos,GPR:$a,i32imm:$shamt), > - NoItinerary, "ssat", "\t$dst, $bit_pos, $a, LSL $shamt", > + NoItinerary, "ssat", "\t$dst, $bit_pos, $a, lsl $shamt", > [/* For disassembly only; pattern left blank */]> { > let Inst{31-27} = 0b11110; > let Inst{25-22} = 0b1100; > @@ -1230,7 +1313,7 @@ > } > > def t2SSATasr : T2I<(outs GPR:$dst), (ins i32imm:$bit_pos,GPR:$a,i32imm:$shamt), > - NoItinerary, "ssat", "\t$dst, $bit_pos, $a, ASR $shamt", > + NoItinerary, "ssat", "\t$dst, $bit_pos, $a, asr $shamt", > [/* For disassembly only; pattern left blank */]> { > let Inst{31-27} = 0b11110; > let Inst{25-22} = 0b1100; > @@ -1252,7 +1335,7 @@ > } > > def t2USATlsl : T2I<(outs GPR:$dst), (ins i32imm:$bit_pos,GPR:$a,i32imm:$shamt), > - NoItinerary, "usat", "\t$dst, $bit_pos, $a, LSL $shamt", > + NoItinerary, "usat", "\t$dst, $bit_pos, $a, lsl $shamt", > [/* For disassembly only; pattern left blank */]> { > let Inst{31-27} = 0b11110; > let Inst{25-22} = 0b1110; > @@ -1262,7 +1345,7 @@ > } > > def t2USATasr : T2I<(outs GPR:$dst), (ins i32imm:$bit_pos,GPR:$a,i32imm:$shamt), > - NoItinerary, "usat", "\t$dst, $bit_pos, $a, ASR $shamt", > + NoItinerary, "usat", "\t$dst, $bit_pos, $a, asr $shamt", > [/* For disassembly only; pattern left blank */]> { > let Inst{31-27} = 0b11110; > let Inst{25-22} = 0b1110; > @@ -1486,6 +1569,8 @@ > } > } // neverHasSideEffects > > +// Rounding variants of the below included for disassembly only > + > // Most significant word multiply > def t2SMMUL : T2I<(outs GPR:$dst), (ins GPR:$a, GPR:$b), IIC_iMUL32, > "smmul", "\t$dst, $a, $b", > @@ -1497,6 +1582,15 @@ > let Inst{7-4} = 0b0000; // No Rounding (Inst{4} = 0) > } > > +def t2SMMULR : T2I<(outs GPR:$dst), (ins GPR:$a, GPR:$b), IIC_iMUL32, > + "smmulr", "\t$dst, $a, $b", []> { > + let Inst{31-27} = 0b11111; > + let Inst{26-23} = 0b0110; > + let Inst{22-20} = 0b101; > + let Inst{15-12} = 0b1111; // Ra = 0b1111 (no accumulate) > + let Inst{7-4} = 0b0001; // Rounding (Inst{4} = 1) > +} > + > def t2SMMLA : T2I<(outs GPR:$dst), (ins GPR:$a, GPR:$b, GPR:$c), IIC_iMAC32, > "smmla", "\t$dst, $a, $b, $c", > [(set GPR:$dst, (add (mulhs GPR:$a, GPR:$b), GPR:$c))]> { > @@ -1507,6 +1601,14 @@ > let Inst{7-4} = 0b0000; // No Rounding (Inst{4} = 0) > } > > +def t2SMMLAR : T2I<(outs GPR:$dst), (ins GPR:$a, GPR:$b, GPR:$c), IIC_iMAC32, > + "smmlar", "\t$dst, $a, $b, $c", []> { > + let Inst{31-27} = 0b11111; > + let Inst{26-23} = 0b0110; > + let Inst{22-20} = 0b101; > + let Inst{15-12} = {?, ?, ?, ?}; // Ra > + let Inst{7-4} = 0b0001; // Rounding (Inst{4} = 1) > +} > > def t2SMMLS : T2I <(outs GPR:$dst), (ins GPR:$a, GPR:$b, GPR:$c), IIC_iMAC32, > "smmls", "\t$dst, $a, $b, $c", > @@ -1518,6 +1620,15 @@ > let Inst{7-4} = 0b0000; // No Rounding (Inst{4} = 0) > } > > +def t2SMMLSR : T2I <(outs GPR:$dst), (ins GPR:$a, GPR:$b, GPR:$c), IIC_iMAC32, > + "smmlsr", "\t$dst, $a, $b, $c", []> { > + let Inst{31-27} = 0b11111; > + let Inst{26-23} = 0b0110; > + let Inst{22-20} = 0b110; > + let Inst{15-12} = {?, ?, ?, ?}; // Ra > + let Inst{7-4} = 0b0001; // Rounding (Inst{4} = 1) > +} > + > multiclass T2I_smul { > def BB : T2I<(outs GPR:$dst), (ins GPR:$a, GPR:$b), IIC_iMUL32, > !strconcat(opc, "bb"), "\t$dst, $a, $b", > @@ -1770,7 +1881,7 @@ > (shl GPR:$src, (i32 8))), i16))]>; > > def t2PKHBT : T2I<(outs GPR:$dst), (ins GPR:$src1, GPR:$src2, i32imm:$shamt), > - IIC_iALUsi, "pkhbt", "\t$dst, $src1, $src2, LSL $shamt", > + IIC_iALUsi, "pkhbt", "\t$dst, $src1, $src2, lsl $shamt", > [(set GPR:$dst, (or (and GPR:$src1, 0xFFFF), > (and (shl GPR:$src2, (i32 imm:$shamt)), > 0xFFFF0000)))]> { > @@ -1788,7 +1899,7 @@ > (t2PKHBT GPR:$src1, GPR:$src2, imm16_31:$shamt)>; > > def t2PKHTB : T2I<(outs GPR:$dst), (ins GPR:$src1, GPR:$src2, i32imm:$shamt), > - IIC_iALUsi, "pkhtb", "\t$dst, $src1, $src2, ASR $shamt", > + IIC_iALUsi, "pkhtb", "\t$dst, $src1, $src2, asr $shamt", > [(set GPR:$dst, (or (and GPR:$src1, 0xFFFF0000), > (and (sra GPR:$src2, imm16_31:$shamt), > 0xFFFF)))]> { > @@ -2104,6 +2215,24 @@ > let Inst{15-8} = 0b11110000; > let Inst{7-4} = 0b0001; // H form > } > + > +// Generic versions of the above two instructions, for disassembly only > + > +def t2TBBgen : T2I<(outs), (ins GPR:$a, GPR:$b), IIC_Br, > + "tbb", "\t[$a, $b]", []>{ > + let Inst{31-27} = 0b11101; > + let Inst{26-20} = 0b0001101; > + let Inst{15-8} = 0b11110000; > + let Inst{7-4} = 0b0000; // B form > +} > + > +def t2TBHgen : T2I<(outs), (ins GPR:$a, GPR:$b), IIC_Br, > + "tbh", "\t[$a, $b, lsl #1]", []> { > + let Inst{31-27} = 0b11101; > + let Inst{26-20} = 0b0001101; > + let Inst{15-8} = 0b11110000; > + let Inst{7-4} = 0b0001; // H form > +} > } // isNotDuplicable, isIndirectBranch > > } // isBranch, isTerminator, isBarrier > @@ -2140,6 +2269,21 @@ > let Inst{12} = 0; > } > > +// Change Processor State is a system instruction -- for disassembly only. > +// The singleton $opt operand contains the following information: > +// opt{4-0} = mode from Inst{4-0} > +// opt{5} = changemode from Inst{17} > +// opt{8-6} = AIF from Inst{8-6} > +// opt{10-9} = imod from Inst{19-18} with 0b10 as enable and 0b11 as disable > +def t2CPS : T2XI<(outs),(ins i32imm:$opt), NoItinerary, "cps${opt:cps}", > + [/* For disassembly only; pattern left blank */]> { > + let Inst{31-27} = 0b11110; > + let Inst{26} = 0; > + let Inst{25-20} = 0b111010; > + let Inst{15-14} = 0b10; > + let Inst{12} = 0; > +} > + > // Secure Monitor Call is a system instruction -- for disassembly only > // Option = Inst{19-16} > def t2SMC : T2I<(outs), (ins i32imm:$opt), NoItinerary, "smc", "\t$opt", > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From sabre at nondot.org Tue Mar 2 14:48:24 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 02 Mar 2010 20:48:24 -0000 Subject: [llvm-commits] [llvm] r97587 - /llvm/trunk/test/CodeGen/PIC16/C16-11.ll Message-ID: <20100302204824.ED2E22A6C12C@llvm.org> Author: lattner Date: Tue Mar 2 14:48:24 2010 New Revision: 97587 URL: http://llvm.org/viewvc/llvm-project?rev=97587&view=rev Log: this testcase is failing because pic16 doesn't define a reg/reg xor pattern. I have no plans to fix this XFAIL. Modified: llvm/trunk/test/CodeGen/PIC16/C16-11.ll Modified: llvm/trunk/test/CodeGen/PIC16/C16-11.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PIC16/C16-11.ll?rev=97587&r1=97586&r2=97587&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/PIC16/C16-11.ll (original) +++ llvm/trunk/test/CodeGen/PIC16/C16-11.ll Tue Mar 2 14:48:24 2010 @@ -1,5 +1,7 @@ -;RUN: llc < %s -march=pic16 +; RUN: llc < %s -march=pic16 ; XFAIL: * +; This fails because PIC16 doesn't define a (xor reg, reg) pattern. +; @c612.auto.a.b = internal global i1 false ; [#uses=2] @c612.auto.A.b = internal global i1 false ; [#uses=2] From clattner at apple.com Tue Mar 2 14:50:09 2010 From: clattner at apple.com (Chris Lattner) Date: Tue, 2 Mar 2010 12:50:09 -0800 Subject: [llvm-commits] [llvm] r97543 - in /llvm/trunk: include/llvm/CodeGen/Passes.h lib/CodeGen/MachineCSE.cpp In-Reply-To: <20100302023825.28D642A6C12C@llvm.org> References: <20100302023825.28D642A6C12C@llvm.org> Message-ID: On Mar 1, 2010, at 6:38 PM, Evan Cheng wrote: > Author: evancheng > Date: Mon Mar 1 20:38:24 2010 > New Revision: 97543 > > URL: http://llvm.org/viewvc/llvm-project?rev=97543&view=rev > Log: > Add skeleton of a machine level cse pass. Looks like a good start, but please move the main logic of the hash function to be a method on MachineInstr. It could be useful for other passes someday. -Chris > > Added: > llvm/trunk/lib/CodeGen/MachineCSE.cpp > Modified: > llvm/trunk/include/llvm/CodeGen/Passes.h > > Modified: llvm/trunk/include/llvm/CodeGen/Passes.h > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/Passes.h?rev=97543&r1=97542&r2=97543&view=diff > ============================================================================== > --- llvm/trunk/include/llvm/CodeGen/Passes.h (original) > +++ llvm/trunk/include/llvm/CodeGen/Passes.h Mon Mar 1 20:38:24 2010 > @@ -162,6 +162,10 @@ > /// > FunctionPass *createGCInfoPrinter(raw_ostream &OS); > > + /// createMachineCSEPass - This pass performs global CSE on machine > + /// instructions. > + FunctionPass *createMachineCSEPass(); > + > /// createMachineLICMPass - This pass performs LICM on machine instructions. > /// > FunctionPass *createMachineLICMPass(); > > Added: llvm/trunk/lib/CodeGen/MachineCSE.cpp > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineCSE.cpp?rev=97543&view=auto > ============================================================================== > --- llvm/trunk/lib/CodeGen/MachineCSE.cpp (added) > +++ llvm/trunk/lib/CodeGen/MachineCSE.cpp Mon Mar 1 20:38:24 2010 > @@ -0,0 +1,124 @@ > +//===-- MachineCSE.cpp - Machine Common Subexpression Elimination Pass ----===// > +// > +// The LLVM Compiler Infrastructure > +// > +// This file is distributed under the University of Illinois Open Source > +// License. See LICENSE.TXT for details. > +// > +//===----------------------------------------------------------------------===// > +// > +// This pass performs global common subexpression elimination on machine > +// instructions using a scoped hash table based value numbering schemem. IT > +// must be run while the machine function is still in SSA form. > +// > +//===----------------------------------------------------------------------===// > + > +#define DEBUG_TYPE "machine-cse" > +#include "llvm/CodeGen/Passes.h" > +#include "llvm/CodeGen/MachineDominators.h" > +#include "llvm/CodeGen/MachineInstr.h" > +#include "llvm/ADT/ScopedHashTable.h" > +#include "llvm/ADT/Statistic.h" > +#include "llvm/Support/Debug.h" > + > +using namespace llvm; > + > +namespace llvm { > + template<> struct DenseMapInfo { > + static inline MachineInstr *getEmptyKey() { > + return 0; > + } > + > + static inline MachineInstr *getTombstoneKey() { > + return reinterpret_cast(-1); > + } > + > + static unsigned getHashValue(const MachineInstr* const &MI) { > + unsigned Hash = MI->getOpcode() * 37; > + for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) { > + const MachineOperand &MO = MI->getOperand(i); > + uint64_t Key = (uint64_t)MO.getType() << 32; > + switch (MO.getType()) { > + default: break; > + case MachineOperand::MO_Register: > + Key |= MO.getReg(); > + break; > + case MachineOperand::MO_Immediate: > + Key |= MO.getImm(); > + break; > + case MachineOperand::MO_FrameIndex: > + case MachineOperand::MO_ConstantPoolIndex: > + case MachineOperand::MO_JumpTableIndex: > + Key |= MO.getIndex(); > + break; > + case MachineOperand::MO_MachineBasicBlock: > + Key |= DenseMapInfo::getHashValue(MO.getMBB()); > + break; > + case MachineOperand::MO_GlobalAddress: > + Key |= DenseMapInfo::getHashValue(MO.getGlobal()); > + break; > + case MachineOperand::MO_BlockAddress: > + Key |= DenseMapInfo::getHashValue(MO.getBlockAddress()); > + break; > + } > + Key += ~(Key << 32); > + Key ^= (Key >> 22); > + Key += ~(Key << 13); > + Key ^= (Key >> 8); > + Key += (Key << 3); > + Key ^= (Key >> 15); > + Key += ~(Key << 27); > + Key ^= (Key >> 31); > + Hash = (unsigned)Key + Hash * 37; > + } > + return Hash; > + } > + > + static bool isEqual(const MachineInstr* const &LHS, > + const MachineInstr* const &RHS) { > + return LHS->isIdenticalTo(RHS); > + } > + }; > +} // end llvm namespace > + > +namespace { > + class MachineCSE : public MachineFunctionPass { > + ScopedHashTable VNT; > + MachineDominatorTree *DT; > + public: > + static char ID; // Pass identification > + MachineCSE() : MachineFunctionPass(&ID) {} > + > + virtual bool runOnMachineFunction(MachineFunction &MF); > + > + virtual void getAnalysisUsage(AnalysisUsage &AU) const { > + AU.setPreservesCFG(); > + MachineFunctionPass::getAnalysisUsage(AU); > + AU.addRequired(); > + AU.addPreserved(); > + } > + > + private: > + bool ProcessBlock(MachineDomTreeNode *Node); > + }; > +} // end anonymous namespace > + > +char MachineCSE::ID = 0; > +static RegisterPass > +X("machine-cse", "Machine Common Subexpression Elimination"); > + > +FunctionPass *llvm::createMachineCSEPass() { return new MachineCSE(); } > + > +bool MachineCSE::ProcessBlock(MachineDomTreeNode *Node) { > + ScopedHashTableScope VNTS(VNT); > + MachineBasicBlock *MBB = Node->getBlock(); > + for (MachineBasicBlock::iterator I = MBB->begin(), E = MBB->end(); I != E; > + ++I) { > + } > + return false; > +} > + > +bool MachineCSE::runOnMachineFunction(MachineFunction &MF) { > + DT = &getAnalysis(); > + return ProcessBlock(DT->getRootNode()); > +} > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From echristo at apple.com Tue Mar 2 15:17:45 2010 From: echristo at apple.com (Eric Christopher) Date: Tue, 02 Mar 2010 21:17:45 -0000 Subject: [llvm-commits] [llvm-gcc-4.2] r97588 - in /llvm-gcc-4.2/trunk/gcc: Makefile.in config.gcc Message-ID: <20100302211745.18A702A6C12C@llvm.org> Author: echristo Date: Tue Mar 2 15:17:44 2010 New Revision: 97588 URL: http://llvm.org/viewvc/llvm-project?rev=97588&view=rev Log: Revert my last patch, it broke self-hosting on darwin10. Modified: llvm-gcc-4.2/trunk/gcc/Makefile.in llvm-gcc-4.2/trunk/gcc/config.gcc Modified: llvm-gcc-4.2/trunk/gcc/Makefile.in URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/Makefile.in?rev=97588&r1=97587&r2=97588&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/Makefile.in (original) +++ llvm-gcc-4.2/trunk/gcc/Makefile.in Tue Mar 2 15:17:44 2010 @@ -476,11 +476,6 @@ # each of $(system_prefix)/usr/include, $(system_prefix)/usr/lib, etc. TARGET_SYSTEM_ROOT = @TARGET_SYSTEM_ROOT@ -# LLVM LOCAL begin -# Whether to install unwind.h -INSTALL_UNWIND_H = @install_unwind_h@ -# LLVM LOCAL end - xmake_file=@xmake_file@ tmake_file=@tmake_file@ out_file=$(srcdir)/config/@out_file@ @@ -3555,10 +3550,8 @@ done rm -f include/limits.h cp xlimits.h include/limits.h - if [ $(INSTALL_UNWIND_H) = yes ]; then \ - rm -f include/unwind.h; \ - cp $(UNWIND_H) include/unwind.h; \ - fi; + rm -f include/unwind.h + cp $(UNWIND_H) include/unwind.h chmod a+r include/limits.h # Install the README rm -f include/README @@ -4315,9 +4308,7 @@ $(DESTDIR)$(itoolsdatadir)/include/$$realfile ; \ done $(INSTALL_DATA) xlimits.h $(DESTDIR)$(itoolsdatadir)/include/limits.h - if [ $(INSTALL_UNWIND_H) = yes ]; then \ - $(INSTALL_DATA) $(UNWIND_H) $(DESTDIR)$(itoolsdatadir)/include/unwind.h; \ - fi + $(INSTALL_DATA) $(UNWIND_H) $(DESTDIR)$(itoolsdatadir)/include/unwind.h $(INSTALL_DATA) $(srcdir)/gsyslimits.h \ $(DESTDIR)$(itoolsdatadir)/gsyslimits.h $(INSTALL_DATA) macro_list $(DESTDIR)$(itoolsdatadir)/macro_list Modified: llvm-gcc-4.2/trunk/gcc/config.gcc URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/config.gcc?rev=97588&r1=97587&r2=97588&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/config.gcc (original) +++ llvm-gcc-4.2/trunk/gcc/config.gcc Tue Mar 2 15:17:44 2010 @@ -146,12 +146,6 @@ # # use_fixproto Set to "yes" if fixproto should be run normally, # "no" if fixproto should never be run. -# LLVM LOCAL begin -# -# install_unwind_h Set to "no" if you are using a libunwind based -# header and already have one installed on the system. -# -# LLVM LOCAL end # The following variables are used in each case-construct to build up the # outgoing variables: @@ -194,12 +188,6 @@ # specifically set this to 'yes'. use_fixproto=no -# LLVM LOCAL begin -# Default to installing unwind.h. Targets which don't want to install -# this header should specifically set this to 'no'. -install_unwind_h=yes -# LLVM LOCAL end - # Don't carry these over build->host->target. Please. xm_file= md_file= @@ -435,8 +423,6 @@ # APPLE LOCAL begin .file/.loc 6349436 *-*-darwin[12][0-9]*) tm_file="${tm_file} darwin9.h darwin10.h" - # LLVM LOCAL - install_unwind_h=no ;; # APPLE LOCAL end .file/.loc 6349436 esac From isanbard at gmail.com Tue Mar 2 15:50:36 2010 From: isanbard at gmail.com (Bill Wendling) Date: Tue, 02 Mar 2010 21:50:36 -0000 Subject: [llvm-commits] [llvm] r97592 - /llvm/trunk/lib/CodeGen/TargetLoweringObjectFileImpl.cpp Message-ID: <20100302215036.142802A6C130@llvm.org> Author: void Date: Tue Mar 2 15:50:35 2010 New Revision: 97592 URL: http://llvm.org/viewvc/llvm-project?rev=97592&view=rev Log: Okay. One last attempt: Place the LSDA into the TEXT section on Mach-O. This saves space. Modified: llvm/trunk/lib/CodeGen/TargetLoweringObjectFileImpl.cpp Modified: llvm/trunk/lib/CodeGen/TargetLoweringObjectFileImpl.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/TargetLoweringObjectFileImpl.cpp?rev=97592&r1=97591&r2=97592&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/TargetLoweringObjectFileImpl.cpp (original) +++ llvm/trunk/lib/CodeGen/TargetLoweringObjectFileImpl.cpp Tue Mar 2 15:50:35 2010 @@ -550,8 +550,8 @@ } // Exception Handling. - LSDASection = getMachOSection("__DATA", "__gcc_except_tab", 0, - SectionKind::getDataRel()); + LSDASection = getMachOSection("__TEXT", "__gcc_except_tab", 0, + SectionKind::getReadOnlyWithRel()); EHFrameSection = getMachOSection("__TEXT", "__eh_frame", MCSectionMachO::S_COALESCED | @@ -779,7 +779,7 @@ } unsigned TargetLoweringObjectFileMachO::getTTypeEncoding() const { - return DW_EH_PE_absptr; + return DW_EH_PE_indirect | DW_EH_PE_pcrel | DW_EH_PE_sdata4; } //===----------------------------------------------------------------------===// From baldrick at free.fr Tue Mar 2 16:09:42 2010 From: baldrick at free.fr (Duncan Sands) Date: Tue, 02 Mar 2010 22:09:42 -0000 Subject: [llvm-commits] [dragonegg] r97593 - /dragonegg/trunk/README Message-ID: <20100302220942.3E1202A6C12C@llvm.org> Author: baldrick Date: Tue Mar 2 16:09:42 2010 New Revision: 97593 URL: http://llvm.org/viewvc/llvm-project?rev=97593&view=rev Log: Don't require the reader of this document to work out just how to patch GCC. Modified: dragonegg/trunk/README Modified: dragonegg/trunk/README URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/README?rev=97593&r1=97592&r2=97593&view=diff ============================================================================== --- dragonegg/trunk/README (original) +++ dragonegg/trunk/README Tue Mar 2 16:09:42 2010 @@ -13,10 +13,12 @@ Check out gcc from the gcc subversion repository: svn checkout svn://gcc.gnu.org/svn/gcc/trunk SomeLocalDir -Apply the patches in the gcc-patches subdirectory, if any. Hopefully one day -the plugin will work with an unpatched gcc, but for the moment a small patch -needs to be applied. Configure gcc with your favorite options and also with ---enable-lto. Build gcc and install it somewhere. +Apply the patches in the gcc-patches subdirectory, if any. The following +command should do the trick ("SomeLocalDir" is where you checked out gcc): + cat gcc-patches/*.diff | patch -d SomeLocalDir -p1 +Hopefully one day the plugin will work with an unpatched gcc, but for the +moment a small patch needs to be applied. Configure gcc with your favorite +options and also with --enable-lto. Build gcc and install it somewhere. Darwin special: the gcc configure script thinks darwin doesn't support dynamic libraries and concludes that plugins won't work. Delete or improve the check. From evan.cheng at apple.com Tue Mar 2 16:10:24 2010 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 02 Mar 2010 22:10:24 -0000 Subject: [llvm-commits] [llvm] r97594 - /llvm/trunk/include/llvm/ADT/ScopedHashTable.h Message-ID: <20100302221024.65FCB2A6C12C@llvm.org> Author: evancheng Date: Tue Mar 2 16:10:24 2010 New Revision: 97594 URL: http://llvm.org/viewvc/llvm-project?rev=97594&view=rev Log: Allow specialization of ScopedHashTable of non-default DenseMapInfo. Modified: llvm/trunk/include/llvm/ADT/ScopedHashTable.h Modified: llvm/trunk/include/llvm/ADT/ScopedHashTable.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/ScopedHashTable.h?rev=97594&r1=97593&r2=97594&view=diff ============================================================================== --- llvm/trunk/include/llvm/ADT/ScopedHashTable.h (original) +++ llvm/trunk/include/llvm/ADT/ScopedHashTable.h Tue Mar 2 16:10:24 2010 @@ -36,10 +36,10 @@ namespace llvm { -template +template > class ScopedHashTable; -template +template > class ScopedHashTableVal { ScopedHashTableVal *NextInScope; ScopedHashTableVal *NextForKey; @@ -61,35 +61,39 @@ ScopedHashTableVal *getNextInScope() { return NextInScope; } }; -template +template > class ScopedHashTableScope { /// HT - The hashtable that we are active for. - ScopedHashTable &HT; + ScopedHashTable &HT; /// PrevScope - This is the scope that we are shadowing in HT. ScopedHashTableScope *PrevScope; /// LastValInScope - This is the last value that was inserted for this scope /// or null if none have been inserted yet. - ScopedHashTableVal *LastValInScope; + ScopedHashTableVal *LastValInScope; void operator=(ScopedHashTableScope&); // DO NOT IMPLEMENT ScopedHashTableScope(ScopedHashTableScope&); // DO NOT IMPLEMENT public: - ScopedHashTableScope(ScopedHashTable &HT); + ScopedHashTableScope(ScopedHashTable &HT); ~ScopedHashTableScope(); private: - friend class ScopedHashTable; - ScopedHashTableVal *getLastValInScope() { return LastValInScope; } - void setLastValInScope(ScopedHashTableVal *Val) { LastValInScope = Val; } + friend class ScopedHashTable; + ScopedHashTableVal *getLastValInScope() { + return LastValInScope; + } + void setLastValInScope(ScopedHashTableVal *Val) { + LastValInScope = Val; + } }; -template +template > class ScopedHashTableIterator { - ScopedHashTableVal *Node; + ScopedHashTableVal *Node; public: - ScopedHashTableIterator(ScopedHashTableVal *node) : Node(node){} + ScopedHashTableIterator(ScopedHashTableVal *node) : Node(node) {} V &operator*() const { assert(Node && "Dereference end()"); @@ -117,13 +121,13 @@ }; -template +template class ScopedHashTable { - DenseMap*> TopLevelMap; - ScopedHashTableScope *CurScope; + DenseMap*, KInfo> TopLevelMap; + ScopedHashTableScope *CurScope; ScopedHashTable(const ScopedHashTable&); // NOT YET IMPLEMENTED void operator=(const ScopedHashTable&); // NOT YET IMPLEMENTED - friend class ScopedHashTableScope; + friend class ScopedHashTableScope; public: ScopedHashTable() : CurScope(0) {} ~ScopedHashTable() { @@ -141,19 +145,19 @@ void insert(const K &Key, const V &Val) { assert(CurScope && "No scope active!"); - ScopedHashTableVal *&KeyEntry = TopLevelMap[Key]; + ScopedHashTableVal *&KeyEntry = TopLevelMap[Key]; - KeyEntry = new ScopedHashTableVal(CurScope->getLastValInScope(), - KeyEntry, Key, Val); + KeyEntry= new ScopedHashTableVal(CurScope->getLastValInScope(), + KeyEntry, Key, Val); CurScope->setLastValInScope(KeyEntry); } - typedef ScopedHashTableIterator iterator; + typedef ScopedHashTableIterator iterator; iterator end() { return iterator(0); } iterator begin(const K &Key) { - typename DenseMap*>::iterator I = + typename DenseMap*, KInfo>::iterator I = TopLevelMap.find(Key); if (I == TopLevelMap.end()) return end(); return iterator(I->second); @@ -162,28 +166,29 @@ /// ScopedHashTableScope ctor - Install this as the current scope for the hash /// table. -template -ScopedHashTableScope::ScopedHashTableScope(ScopedHashTable &ht) - : HT(ht) { +template +ScopedHashTableScope:: + ScopedHashTableScope(ScopedHashTable &ht) : HT(ht) { PrevScope = HT.CurScope; HT.CurScope = this; LastValInScope = 0; } -template -ScopedHashTableScope::~ScopedHashTableScope() { +template +ScopedHashTableScope::~ScopedHashTableScope() { assert(HT.CurScope == this && "Scope imbalance!"); HT.CurScope = PrevScope; // Pop and delete all values corresponding to this scope. - while (ScopedHashTableVal *ThisEntry = LastValInScope) { + while (ScopedHashTableVal *ThisEntry = LastValInScope) { // Pop this value out of the TopLevelMap. if (ThisEntry->getNextForKey() == 0) { assert(HT.TopLevelMap[ThisEntry->getKey()] == ThisEntry && "Scope imbalance!"); HT.TopLevelMap.erase(ThisEntry->getKey()); } else { - ScopedHashTableVal *&KeyEntry = HT.TopLevelMap[ThisEntry->getKey()]; + ScopedHashTableVal *&KeyEntry = + HT.TopLevelMap[ThisEntry->getKey()]; assert(KeyEntry == ThisEntry && "Scope imbalance!"); KeyEntry = ThisEntry->getNextForKey(); } From johnny.chen at apple.com Tue Mar 2 16:11:06 2010 From: johnny.chen at apple.com (Johnny Chen) Date: Tue, 02 Mar 2010 22:11:06 -0000 Subject: [llvm-commits] [llvm] r97595 - /llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td Message-ID: <20100302221106.F09742A6C12C@llvm.org> Author: johnny Date: Tue Mar 2 16:11:06 2010 New Revision: 97595 URL: http://llvm.org/viewvc/llvm-project?rev=97595&view=rev Log: Added 32-bit Thumb instruction CLREX (Clear-Exclusive) for disassembly only. Modified: llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td Modified: llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td?rev=97595&r1=97594&r2=97595&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td (original) +++ llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td Tue Mar 2 16:11:06 2010 @@ -2098,6 +2098,16 @@ {?, ?, ?, ?}>; } +// Clear-Exclusive is for disassembly only. +def t2CLREX : T2I<(outs), (ins), NoItinerary, "clrex", "", + [/* For disassembly only; pattern left blank */]>, + Requires<[IsARM, HasV7]> { + let Inst{31-20} = 0xf3b; + let Inst{15-14} = 0b10; + let Inst{12} = 0; + let Inst{7-4} = 0b0010; +} + //===----------------------------------------------------------------------===// // TLS Instructions // From stoklund at 2pi.dk Tue Mar 2 16:12:44 2010 From: stoklund at 2pi.dk (Jakob Stoklund Olesen) Date: Tue, 2 Mar 2010 14:12:44 -0800 Subject: [llvm-commits] [llvm] r96969 - in /llvm/trunk: ./ autoconf/ include/llvm/ADT/ lib/Support/ lib/Target/MBlaze/ lib/Target/MBlaze/AsmPrinter/ lib/Target/MBlaze/TargetInfo/ test/CodeGen/MBlaze/ In-Reply-To: <20100223191525.1C50E2A6C12C@llvm.org> References: <20100223191525.1C50E2A6C12C@llvm.org> Message-ID: On Feb 23, 2010, at 11:15 AM, Wesley Peck wrote: > +// MBlaze 32-bit (aliased) FPU Registers > +class FPR num, string n, list subregs> > + : MBlazeRegWithSubRegs { > + let Num = num; > +} It is probably better to model "F0 aliases R0" than "R0 is a subreg of F0". I don't think any of the sub-register operations make sense here. Alternatively, you could even stick the same registers in multiple register classes with different types. Look at the PowerPC F8RC and F4RC register classes. /jakob From sabre at nondot.org Tue Mar 2 16:20:06 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 02 Mar 2010 22:20:06 -0000 Subject: [llvm-commits] [llvm] r97596 - in /llvm/trunk: include/llvm/CodeGen/SelectionDAGISel.h lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp lib/Target/MSP430/MSP430ISelDAGToDAG.cpp lib/Target/X86/X86ISelDAGToDAG.cpp test/CodeGen/MSP430/Inst16mm.ll test/CodeGen/X86/sse3.ll test/CodeGen/X86/store_op_load_fold2.ll Message-ID: <20100302222007.079BF2A6C12C@llvm.org> Author: lattner Date: Tue Mar 2 16:20:06 2010 New Revision: 97596 URL: http://llvm.org/viewvc/llvm-project?rev=97596&view=rev Log: Fix some issues in WalkChainUsers dealing with CopyToReg/CopyFromReg/INLINEASM. These are annoying because they have the same opcode before an after isel. Fix this by setting their NodeID to -1 to indicate that they are selected, just like what automatically happens when selecting things that end up being machine nodes. With that done, give IsLegalToFold a new flag that causes it to ignore chains. This lets the HandleMergeInputChains routine be the one place that validates chains after a match is successful, enabling the new hotness in chain processing. This smarter chain processing eliminates the need for "PreprocessRMW" in the X86 and MSP430 backends and enables MSP to start matching it's multiple mem operand instructions more aggressively. I currently #if out the dead code in the X86 backend and MSP backend, I'll remove it for real in a follow-on patch. The testcase changes are: test/CodeGen/X86/sse3.ll: we generate better code test/CodeGen/X86/store_op_load_fold2.ll: PreprocessRMW was miscompiling this before, we now generate correct code Convert it to filecheck while I'm at it. test/CodeGen/MSP430/Inst16mm.ll: Add a testcase for mem/mem folding to make anton happy. :) Modified: llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp llvm/trunk/lib/Target/MSP430/MSP430ISelDAGToDAG.cpp llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp llvm/trunk/test/CodeGen/MSP430/Inst16mm.ll llvm/trunk/test/CodeGen/X86/sse3.ll llvm/trunk/test/CodeGen/X86/store_op_load_fold2.ll Modified: llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h?rev=97596&r1=97595&r2=97596&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h (original) +++ llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h Tue Mar 2 16:20:06 2010 @@ -97,7 +97,8 @@ /// IsLegalToFold - Returns true if the specific operand node N of /// U can be folded during instruction selection that starts at Root. - virtual bool IsLegalToFold(SDValue N, SDNode *U, SDNode *Root) const; + virtual bool IsLegalToFold(SDValue N, SDNode *U, SDNode *Root, + bool IgnoreChains = false) const; /// CreateTargetHazardRecognizer - Return a newly allocated hazard recognizer /// to use for this target when scheduling the DAG. Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp?rev=97596&r1=97595&r2=97596&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Tue Mar 2 16:20:06 2010 @@ -1376,8 +1376,8 @@ /// This function recursively traverses up the operand chain, ignoring /// certain nodes. static bool findNonImmUse(SDNode *Use, SDNode* Def, SDNode *ImmedUse, - SDNode *Root, - SmallPtrSet &Visited) { + SDNode *Root, SmallPtrSet &Visited, + bool IgnoreChains) { // The NodeID's are given uniques ID's where a node ID is guaranteed to be // greater than all of its (recursive) operands. If we scan to a point where // 'use' is smaller than the node we're scanning for, then we know we will @@ -1395,6 +1395,10 @@ return false; for (unsigned i = 0, e = Use->getNumOperands(); i != e; ++i) { + // Ignore chain uses, they are validated by HandleMergeInputChains. + if (Use->getOperand(i).getValueType() == MVT::Other && IgnoreChains) + continue; + SDNode *N = Use->getOperand(i).getNode(); if (N == Def) { if (Use == ImmedUse || Use == Root) @@ -1404,7 +1408,7 @@ } // Traverse up the operand chain. - if (findNonImmUse(N, Def, ImmedUse, Root, Visited)) + if (findNonImmUse(N, Def, ImmedUse, Root, Visited, IgnoreChains)) return true; } return false; @@ -1419,9 +1423,10 @@ /// have one non-chain use, we only need to watch out for load/op/store /// and load/op/cmp case where the root (store / cmp) may reach the load via /// its chain operand. -static inline bool isNonImmUse(SDNode *Root, SDNode *Def, SDNode *ImmedUse) { +static inline bool isNonImmUse(SDNode *Root, SDNode *Def, SDNode *ImmedUse, + bool IgnoreChains) { SmallPtrSet Visited; - return findNonImmUse(Root, Def, ImmedUse, Root, Visited); + return findNonImmUse(Root, Def, ImmedUse, Root, Visited, IgnoreChains); } /// IsProfitableToFold - Returns true if it's profitable to fold the specific @@ -1434,7 +1439,8 @@ /// IsLegalToFold - Returns true if the specific operand node N of /// U can be folded during instruction selection that starts at Root. -bool SelectionDAGISel::IsLegalToFold(SDValue N, SDNode *U, SDNode *Root) const { +bool SelectionDAGISel::IsLegalToFold(SDValue N, SDNode *U, SDNode *Root, + bool IgnoreChains) const { if (OptLevel == CodeGenOpt::None) return false; // If Root use can somehow reach N through a path that that doesn't contain @@ -1488,7 +1494,7 @@ VT = Root->getValueType(Root->getNumValues()-1); } - return !isNonImmUse(Root, N.getNode(), U); + return !isNonImmUse(Root, N.getNode(), U, IgnoreChains); } SDNode *SelectionDAGISel::Select_INLINEASM(SDNode *N) { @@ -1500,6 +1506,7 @@ VTs.push_back(MVT::Flag); SDValue New = CurDAG->getNode(ISD::INLINEASM, N->getDebugLoc(), VTs, &Ops[0], Ops.size()); + New->setNodeId(-1); return New.getNode(); } @@ -1636,11 +1643,17 @@ // pattern that we're selecting down into the already selected chunk of the // DAG. if (User->isMachineOpcode() || - User->getOpcode() == ISD::CopyToReg || - User->getOpcode() == ISD::CopyFromReg || - User->getOpcode() == ISD::INLINEASM || User->getOpcode() == ISD::HANDLENODE) // Root of the graph. continue; + + if (User->getOpcode() == ISD::CopyToReg || + User->getOpcode() == ISD::CopyFromReg || + User->getOpcode() == ISD::INLINEASM) { + // If their node ID got reset to -1 then they've already been selected. + // Treat them like a MachineOpcode. + if (User->getNodeId() == -1) + continue; + } // If we have a TokenFactor, we handle it specially. if (User->getOpcode() != ISD::TokenFactor) { @@ -1876,6 +1889,7 @@ case ISD::TokenFactor: case ISD::CopyFromReg: case ISD::CopyToReg: + NodeToMatch->setNodeId(-1); // Mark selected. return 0; case ISD::AssertSext: case ISD::AssertZext: @@ -2172,7 +2186,7 @@ if (!IsProfitableToFold(N, NodeStack[NodeStack.size()-2].getNode(), NodeToMatch) || !IsLegalToFold(N, NodeStack[NodeStack.size()-2].getNode(), - NodeToMatch)) + NodeToMatch, true/*We validate our own chains*/)) break; continue; Modified: llvm/trunk/lib/Target/MSP430/MSP430ISelDAGToDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MSP430/MSP430ISelDAGToDAG.cpp?rev=97596&r1=97595&r2=97596&view=diff ============================================================================== --- llvm/trunk/lib/Target/MSP430/MSP430ISelDAGToDAG.cpp (original) +++ llvm/trunk/lib/Target/MSP430/MSP430ISelDAGToDAG.cpp Tue Mar 2 16:20:06 2010 @@ -125,7 +125,9 @@ bool MatchWrapper(SDValue N, MSP430ISelAddressMode &AM); bool MatchAddressBase(SDValue N, MSP430ISelAddressMode &AM); +#if 0 bool IsLegalToFold(SDValue N, SDNode *U, SDNode *Root) const; +#endif virtual bool SelectInlineAsmMemoryOperand(const SDValue &Op, char ConstraintCode, @@ -323,6 +325,7 @@ return false; } +#if 0 bool MSP430DAGToDAGISel::IsLegalToFold(SDValue N, SDNode *U, SDNode *Root) const { if (OptLevel == CodeGenOpt::None) return false; @@ -357,6 +360,7 @@ // Proceed to 'generic' cycle finder code return SelectionDAGISel::IsLegalToFold(N, U, Root); } +#endif /// MoveBelowTokenFactor - Replace TokenFactor operand with load's chain operand @@ -516,6 +520,7 @@ /// This allows selection of mem-mem instructions. Yay! void MSP430DAGToDAGISel::PreprocessForRMW() { + return; for (SelectionDAG::allnodes_iterator I = CurDAG->allnodes_begin(), E = CurDAG->allnodes_end(); I != E; ++I) { if (!ISD::isNON_TRUNCStore(I)) Modified: llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp?rev=97596&r1=97595&r2=97596&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp (original) +++ llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp Tue Mar 2 16:20:06 2010 @@ -467,46 +467,6 @@ } -/// PreprocessForRMW - Preprocess the DAG to make instruction selection better. -/// This is only run if not in -O0 mode. -/// This allows the instruction selector to pick more read-modify-write -/// instructions. This is a common case: -/// -/// [Load chain] -/// ^ -/// | -/// [Load] -/// ^ ^ -/// | | -/// / \- -/// / | -/// [TokenFactor] [Op] -/// ^ ^ -/// | | -/// \ / -/// \ / -/// [Store] -/// -/// The fact the store's chain operand != load's chain will prevent the -/// (store (op (load))) instruction from being selected. We can transform it to: -/// -/// [Load chain] -/// ^ -/// | -/// [TokenFactor] -/// ^ -/// | -/// [Load] -/// ^ ^ -/// | | -/// | \- -/// | | -/// | [Op] -/// | ^ -/// | | -/// \ / -/// \ / -/// [Store] void X86DAGToDAGISel::PreprocessForRMW() { for (SelectionDAG::allnodes_iterator I = CurDAG->allnodes_begin(), E = CurDAG->allnodes_end(); I != E; ++I) { @@ -538,6 +498,9 @@ ++NumLoadMoved; continue; } + + continue; + if (!ISD::isNON_TRUNCStore(I)) continue; @@ -1415,11 +1378,12 @@ SDValue &Base, SDValue &Scale, SDValue &Index, SDValue &Disp, SDValue &Segment) { - if (ISD::isNON_EXTLoad(N.getNode()) && - IsProfitableToFold(N, P, P) && - IsLegalToFold(N, P, P)) - return SelectAddr(P, N.getOperand(1), Base, Scale, Index, Disp, Segment); - return false; + if (!ISD::isNON_EXTLoad(N.getNode()) || + !IsProfitableToFold(N, P, P) || + !IsLegalToFold(N, P, P)) + return false; + + return SelectAddr(P, N.getOperand(1), Base, Scale, Index, Disp, Segment); } /// getGlobalBaseReg - Return an SDNode that returns the value of Modified: llvm/trunk/test/CodeGen/MSP430/Inst16mm.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/MSP430/Inst16mm.ll?rev=97596&r1=97595&r2=97596&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/MSP430/Inst16mm.ll (original) +++ llvm/trunk/test/CodeGen/MSP430/Inst16mm.ll Tue Mar 2 16:20:06 2010 @@ -1,4 +1,4 @@ -; RUN: llc -march=msp430 < %s | FileCheck %s +; RUN: llc -march=msp430 -combiner-alias-analysis < %s | FileCheck %s target datalayout = "e-p:16:8:8-i8:8:8-i16:8:8-i32:8:8" target triple = "msp430-generic-generic" @foo = common global i16 0, align 2 @@ -52,3 +52,18 @@ ret void } +define i16 @mov2() nounwind { +entry: + %retval = alloca i16 ; [#uses=3] + %x = alloca i32, align 2 ; [#uses=1] + %y = alloca i32, align 2 ; [#uses=1] + store i16 0, i16* %retval + %tmp = load i32* %y ; [#uses=1] + store i32 %tmp, i32* %x + store i16 0, i16* %retval + %0 = load i16* %retval ; [#uses=1] + ret i16 %0 +; CHECK: mov2: +; CHECK: mov.w 0(r1), 4(r1) +; CHECK: mov.w 2(r1), 6(r1) +} Modified: llvm/trunk/test/CodeGen/X86/sse3.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/sse3.ll?rev=97596&r1=97595&r2=97596&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/sse3.ll (original) +++ llvm/trunk/test/CodeGen/X86/sse3.ll Tue Mar 2 16:20:06 2010 @@ -144,10 +144,9 @@ store <4 x float> %tmp13, <4 x float>* %r ret void ; X64: t9: -; X64: movsd (%rsi), %xmm0 -; X64: movaps (%rdi), %xmm1 -; X64: movlhps %xmm0, %xmm1 -; X64: movaps %xmm1, (%rdi) +; X64: movaps (%rdi), %xmm0 +; X64: movhps (%rsi), %xmm0 +; X64: movaps %xmm0, (%rdi) ; X64: ret } Modified: llvm/trunk/test/CodeGen/X86/store_op_load_fold2.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/store_op_load_fold2.ll?rev=97596&r1=97595&r2=97596&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/store_op_load_fold2.ll (original) +++ llvm/trunk/test/CodeGen/X86/store_op_load_fold2.ll Tue Mar 2 16:20:06 2010 @@ -1,5 +1,4 @@ -; RUN: llc < %s -march=x86 -x86-asm-syntax=intel | \ -; RUN: grep {and DWORD PTR} | count 2 +; RUN: llc < %s -march=x86 -x86-asm-syntax=intel | FileCheck %s target datalayout = "e-p:32:32" %struct.Macroblock = type { i32, i32, i32, i32, i32, [8 x i32], %struct.Macroblock*, %struct.Macroblock*, i32, [2 x [4 x [4 x [2 x i32]]]], [16 x i8], [16 x i8], i32, i64, [4 x i32], [4 x i32], i64, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i16, double, i32, i32, i32, i32, i32, i32, i32, i32, i32 } @@ -16,5 +15,10 @@ %tmp2676.us.us = and i64 %tmp2667.us.us, %tmp2675not.us.us ; [#uses=1] store i64 %tmp2676.us.us, i64* %tmp2666 ret i32 0 + +; CHECK: and {{E..}}, DWORD PTR [360] +; CHECK: and DWORD PTR [356], {{E..}} +; CHECK: mov DWORD PTR [360], {{E..}} + } From sabre at nondot.org Tue Mar 2 16:30:08 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 02 Mar 2010 22:30:08 -0000 Subject: [llvm-commits] [llvm] r97597 - in /llvm/trunk: include/llvm/CodeGen/SelectionDAGISel.h lib/Target/MSP430/MSP430ISelDAGToDAG.cpp Message-ID: <20100302223008.648CB2A6C12C@llvm.org> Author: lattner Date: Tue Mar 2 16:30:08 2010 New Revision: 97597 URL: http://llvm.org/viewvc/llvm-project?rev=97597&view=rev Log: remove 300 lines of code that is now dead in the MSP430 backend now that isel handles chains more aggressively. This also allows us to make isLegalToFold non-virtual. Modified: llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h llvm/trunk/lib/Target/MSP430/MSP430ISelDAGToDAG.cpp Modified: llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h?rev=97597&r1=97596&r2=97597&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h (original) +++ llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h Tue Mar 2 16:30:08 2010 @@ -97,8 +97,8 @@ /// IsLegalToFold - Returns true if the specific operand node N of /// U can be folded during instruction selection that starts at Root. - virtual bool IsLegalToFold(SDValue N, SDNode *U, SDNode *Root, - bool IgnoreChains = false) const; + bool IsLegalToFold(SDValue N, SDNode *U, SDNode *Root, + bool IgnoreChains = false) const; /// CreateTargetHazardRecognizer - Return a newly allocated hazard recognizer /// to use for this target when scheduling the DAG. Modified: llvm/trunk/lib/Target/MSP430/MSP430ISelDAGToDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MSP430/MSP430ISelDAGToDAG.cpp?rev=97597&r1=97596&r2=97597&view=diff ============================================================================== --- llvm/trunk/lib/Target/MSP430/MSP430ISelDAGToDAG.cpp (original) +++ llvm/trunk/lib/Target/MSP430/MSP430ISelDAGToDAG.cpp Tue Mar 2 16:30:08 2010 @@ -30,13 +30,8 @@ #include "llvm/Support/Debug.h" #include "llvm/Support/ErrorHandling.h" #include "llvm/Support/raw_ostream.h" -#include "llvm/ADT/Statistic.h" - using namespace llvm; -STATISTIC(NumLoadMoved, "Number of loads moved below TokenFactor"); - - namespace { struct MSP430ISelAddressMode { enum { @@ -114,9 +109,6 @@ Lowering(*TM.getTargetLowering()), Subtarget(*TM.getSubtargetImpl()) { } - virtual void PreprocessISelDAG(); - virtual void PostprocessISelDAG(); - virtual const char *getPassName() const { return "MSP430 DAG->DAG Pattern Instruction Selection"; } @@ -125,10 +117,6 @@ bool MatchWrapper(SDValue N, MSP430ISelAddressMode &AM); bool MatchAddressBase(SDValue N, MSP430ISelAddressMode &AM); -#if 0 - bool IsLegalToFold(SDValue N, SDNode *U, SDNode *Root) const; -#endif - virtual bool SelectInlineAsmMemoryOperand(const SDValue &Op, char ConstraintCode, std::vector &OutOps); @@ -137,8 +125,6 @@ #include "MSP430GenDAGISel.inc" private: - DenseMap RMWStores; - void PreprocessForRMW(); SDNode *Select(SDNode *N); SDNode *SelectIndexedLoad(SDNode *Op); SDNode *SelectIndexedBinOp(SDNode *Op, SDValue N1, SDValue N2, @@ -206,10 +192,7 @@ } bool MSP430DAGToDAGISel::MatchAddress(SDValue N, MSP430ISelAddressMode &AM) { - DEBUG({ - errs() << "MatchAddress: "; - AM.dump(); - }); + DEBUG(errs() << "MatchAddress: "; AM.dump()); switch (N.getOpcode()) { default: break; @@ -325,273 +308,6 @@ return false; } -#if 0 -bool MSP430DAGToDAGISel::IsLegalToFold(SDValue N, SDNode *U, - SDNode *Root) const { - if (OptLevel == CodeGenOpt::None) return false; - - /// RMW preprocessing creates the following code: - /// [Load1] - /// ^ ^ - /// / | - /// / | - /// [Load2] | - /// ^ ^ | - /// | | | - /// | \-| - /// | | - /// | [Op] - /// | ^ - /// | | - /// \ / - /// \ / - /// [Store] - /// - /// The path Store => Load2 => Load1 is via chain. Note that in general it is - /// not allowed to fold Load1 into Op (and Store) since it will creates a - /// cycle. However, this is perfectly legal for the loads moved below the - /// TokenFactor by PreprocessForRMW. Query the map Store => Load1 (created - /// during preprocessing) to determine whether it's legal to introduce such - /// "cycle" for a moment. - DenseMap::const_iterator I = RMWStores.find(Root); - if (I != RMWStores.end() && I->second == N.getNode()) - return true; - - // Proceed to 'generic' cycle finder code - return SelectionDAGISel::IsLegalToFold(N, U, Root); -} -#endif - - -/// MoveBelowTokenFactor - Replace TokenFactor operand with load's chain operand -/// and move load below the TokenFactor. Replace store's chain operand with -/// load's chain result. -static void MoveBelowTokenFactor(SelectionDAG *CurDAG, SDValue Load, - SDValue Store, SDValue TF) { - SmallVector Ops; - for (unsigned i = 0, e = TF.getNode()->getNumOperands(); i != e; ++i) - if (Load.getNode() == TF.getOperand(i).getNode()) - Ops.push_back(Load.getOperand(0)); - else - Ops.push_back(TF.getOperand(i)); - SDValue NewTF = CurDAG->UpdateNodeOperands(TF, &Ops[0], Ops.size()); - SDValue NewLoad = CurDAG->UpdateNodeOperands(Load, NewTF, - Load.getOperand(1), - Load.getOperand(2)); - CurDAG->UpdateNodeOperands(Store, NewLoad.getValue(1), Store.getOperand(1), - Store.getOperand(2), Store.getOperand(3)); -} - -/// MoveBelowTokenFactor2 - Replace TokenFactor operand with load's chain operand -/// and move load below the TokenFactor. Replace store's chain operand with -/// load's chain result. This a version which sinks two loads below token factor. -/// Look into PreprocessForRMW comments for explanation of transform. -static void MoveBelowTokenFactor2(SelectionDAG *CurDAG, - SDValue Load1, SDValue Load2, - SDValue Store, SDValue TF) { - SmallVector Ops; - for (unsigned i = 0, e = TF.getNode()->getNumOperands(); i != e; ++i) { - SDNode* N = TF.getOperand(i).getNode(); - if (Load2.getNode() == N) - Ops.push_back(Load2.getOperand(0)); - else if (Load1.getNode() != N) - Ops.push_back(TF.getOperand(i)); - } - - SDValue NewTF = SDValue(CurDAG->MorphNodeTo(TF.getNode(), - TF.getOpcode(), - TF.getNode()->getVTList(), - &Ops[0], Ops.size()), TF.getResNo()); - SDValue NewLoad2 = CurDAG->UpdateNodeOperands(Load2, NewTF, - Load2.getOperand(1), - Load2.getOperand(2)); - - SDValue NewLoad1 = CurDAG->UpdateNodeOperands(Load1, NewLoad2.getValue(1), - Load1.getOperand(1), - Load1.getOperand(2)); - - CurDAG->UpdateNodeOperands(Store, - NewLoad1.getValue(1), - Store.getOperand(1), - Store.getOperand(2), Store.getOperand(3)); -} - -/// isAllowedToSink - return true if N a load which can be moved below token -/// factor. Basically, the load should be non-volatile and has single use. -static bool isLoadAllowedToSink(SDValue N, SDValue Chain) { - if (N.getOpcode() == ISD::BIT_CONVERT) - N = N.getOperand(0); - - LoadSDNode *LD = dyn_cast(N); - if (!LD || LD->isVolatile()) - return false; - if (LD->getAddressingMode() != ISD::UNINDEXED) - return false; - - ISD::LoadExtType ExtType = LD->getExtensionType(); - if (ExtType != ISD::NON_EXTLOAD && ExtType != ISD::EXTLOAD) - return false; - - return (N.hasOneUse() && - LD->hasNUsesOfValue(1, 1) && - LD->isOperandOf(Chain.getNode())); -} - - -/// isRMWLoad - Return true if N is a load that's part of RMW sub-DAG. -/// The chain produced by the load must only be used by the store's chain -/// operand, otherwise this may produce a cycle in the DAG. -static bool isRMWLoad(SDValue N, SDValue Chain, SDValue Address, - SDValue &Load) { - if (isLoadAllowedToSink(N, Chain) && - N.getOperand(1) == Address) { - Load = N; - return true; - } - return false; -} - -/// PreprocessForRMW - Preprocess the DAG to make instruction selection better. -/// This is only run if not in -O0 mode. -/// This allows the instruction selector to pick more read-modify-write -/// instructions. This is a common case: -/// -/// [Load chain] -/// ^ -/// | -/// [Load] -/// ^ ^ -/// | | -/// / \- -/// / | -/// [TokenFactor] [Op] -/// ^ ^ -/// | | -/// \ / -/// \ / -/// [Store] -/// -/// The fact the store's chain operand != load's chain will prevent the -/// (store (op (load))) instruction from being selected. We can transform it to: -/// -/// [Load chain] -/// ^ -/// | -/// [TokenFactor] -/// ^ -/// | -/// [Load] -/// ^ ^ -/// | | -/// | \- -/// | | -/// | [Op] -/// | ^ -/// | | -/// \ / -/// \ / -/// [Store] -/// -/// We also recognize the case where second operand of Op is load as well and -/// move it below token factor as well creating DAG as follows: -/// -/// [Load chain] -/// ^ -/// | -/// [TokenFactor] -/// ^ -/// | -/// [Load1] -/// ^ ^ -/// / | -/// / | -/// [Load2] | -/// ^ ^ | -/// | | | -/// | \-| -/// | | -/// | [Op] -/// | ^ -/// | | -/// \ / -/// \ / -/// [Store] -/// -/// This allows selection of mem-mem instructions. Yay! - -void MSP430DAGToDAGISel::PreprocessForRMW() { - return; - for (SelectionDAG::allnodes_iterator I = CurDAG->allnodes_begin(), - E = CurDAG->allnodes_end(); I != E; ++I) { - if (!ISD::isNON_TRUNCStore(I)) - continue; - SDValue Chain = I->getOperand(0); - - if (Chain.getNode()->getOpcode() != ISD::TokenFactor) - continue; - - SDValue N1 = I->getOperand(1); - SDValue N2 = I->getOperand(2); - if ((N1.getValueType().isFloatingPoint() && - !N1.getValueType().isVector()) || - !N1.hasOneUse()) - continue; - - unsigned RModW = 0; - SDValue Load1, Load2; - unsigned Opcode = N1.getNode()->getOpcode(); - switch (Opcode) { - case ISD::ADD: - case ISD::AND: - case ISD::OR: - case ISD::XOR: - case ISD::ADDC: - case ISD::ADDE: { - SDValue N10 = N1.getOperand(0); - SDValue N11 = N1.getOperand(1); - if (isRMWLoad(N10, Chain, N2, Load1)) { - if (isLoadAllowedToSink(N11, Chain)) { - Load2 = N11; - RModW = 2; - } else - RModW = 1; - } else if (isRMWLoad(N11, Chain, N2, Load1)) { - if (isLoadAllowedToSink(N10, Chain)) { - Load2 = N10; - RModW = 2; - } else - RModW = 1; - } - break; - } - case ISD::SUB: - case ISD::SUBC: - case ISD::SUBE: { - SDValue N10 = N1.getOperand(0); - SDValue N11 = N1.getOperand(1); - if (isRMWLoad(N10, Chain, N2, Load1)) { - if (isLoadAllowedToSink(N11, Chain)) { - Load2 = N11; - RModW = 2; - } else - RModW = 1; - } - break; - } - } - - NumLoadMoved += RModW; - if (RModW == 1) - MoveBelowTokenFactor(CurDAG, Load1, SDValue(I, 0), Chain); - else if (RModW == 2) { - MoveBelowTokenFactor2(CurDAG, Load1, Load2, SDValue(I, 0), Chain); - SDNode* Store = I; - RMWStores[Store] = Load2.getNode(); - } - } -} - - static bool isValidIndexedLoad(const LoadSDNode *LD) { ISD::MemIndexedMode AM = LD->getAddressingMode(); if (AM != ISD::POST_INC || LD->getExtensionType() != ISD::NON_EXTLOAD) @@ -674,14 +390,6 @@ } -void MSP430DAGToDAGISel::PreprocessISelDAG() { - PreprocessForRMW(); -} - -void MSP430DAGToDAGISel::PostprocessISelDAG() { - RMWStores.clear(); -} - SDNode *MSP430DAGToDAGISel::Select(SDNode *Node) { DebugLoc dl = Node->getDebugLoc(); From sabre at nondot.org Tue Mar 2 16:33:56 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 02 Mar 2010 22:33:56 -0000 Subject: [llvm-commits] [llvm] r97598 - /llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp Message-ID: <20100302223356.551B82A6C12C@llvm.org> Author: lattner Date: Tue Mar 2 16:33:56 2010 New Revision: 97598 URL: http://llvm.org/viewvc/llvm-project?rev=97598&view=rev Log: eliminate PreprocessForRMW now that isel handles it. We still preprocess calls and fp return stuff. Modified: llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp Modified: llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp?rev=97598&r1=97597&r2=97598&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp (original) +++ llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp Tue Mar 2 16:33:56 2010 @@ -207,7 +207,7 @@ SDValue &Index, SDValue &Disp, SDValue &Segment); - void PreprocessForRMW(); + void PreprocessForCallLoads(); void PreprocessForFPConvert(); /// SelectInlineAsmMemoryOperand - Implement addressing mode selection for @@ -352,57 +352,6 @@ return true; } -/// MoveBelowTokenFactor - Replace TokenFactor operand with load's chain operand -/// and move load below the TokenFactor. Replace store's chain operand with -/// load's chain result. -static void MoveBelowTokenFactor(SelectionDAG *CurDAG, SDValue Load, - SDValue Store, SDValue TF) { - SmallVector Ops; - for (unsigned i = 0, e = TF.getNode()->getNumOperands(); i != e; ++i) - if (Load.getNode() == TF.getOperand(i).getNode()) - Ops.push_back(Load.getOperand(0)); - else - Ops.push_back(TF.getOperand(i)); - SDValue NewTF = CurDAG->UpdateNodeOperands(TF, &Ops[0], Ops.size()); - SDValue NewLoad = CurDAG->UpdateNodeOperands(Load, NewTF, - Load.getOperand(1), - Load.getOperand(2)); - CurDAG->UpdateNodeOperands(Store, NewLoad.getValue(1), Store.getOperand(1), - Store.getOperand(2), Store.getOperand(3)); -} - -/// isRMWLoad - Return true if N is a load that's part of RMW sub-DAG. The -/// chain produced by the load must only be used by the store's chain operand, -/// otherwise this may produce a cycle in the DAG. -/// -static bool isRMWLoad(SDValue N, SDValue Chain, SDValue Address, - SDValue &Load) { - if (N.getOpcode() == ISD::BIT_CONVERT) { - if (!N.hasOneUse()) - return false; - N = N.getOperand(0); - } - - LoadSDNode *LD = dyn_cast(N); - if (!LD || LD->isVolatile()) - return false; - if (LD->getAddressingMode() != ISD::UNINDEXED) - return false; - - ISD::LoadExtType ExtType = LD->getExtensionType(); - if (ExtType != ISD::NON_EXTLOAD && ExtType != ISD::EXTLOAD) - return false; - - if (N.hasOneUse() && - LD->hasNUsesOfValue(1, 1) && - N.getOperand(1) == Address && - LD->isOperandOf(Chain.getNode())) { - Load = N; - return true; - } - return false; -} - /// MoveBelowCallSeqStart - Replace CALLSEQ_START operand with load's chain /// operand and move load below the call's chain operand. static void MoveBelowCallSeqStart(SelectionDAG *CurDAG, SDValue Load, @@ -467,95 +416,37 @@ } -void X86DAGToDAGISel::PreprocessForRMW() { +void X86DAGToDAGISel::PreprocessForCallLoads() { for (SelectionDAG::allnodes_iterator I = CurDAG->allnodes_begin(), E = CurDAG->allnodes_end(); I != E; ++I) { - if (I->getOpcode() == X86ISD::CALL) { - /// Also try moving call address load from outside callseq_start to just - /// before the call to allow it to be folded. - /// - /// [Load chain] - /// ^ - /// | - /// [Load] - /// ^ ^ - /// | | - /// / \-- - /// / | - ///[CALLSEQ_START] | - /// ^ | - /// | | - /// [LOAD/C2Reg] | - /// | | - /// \ / - /// \ / - /// [CALL] - SDValue Chain = I->getOperand(0); - SDValue Load = I->getOperand(1); - if (!isCalleeLoad(Load, Chain)) - continue; - MoveBelowCallSeqStart(CurDAG, Load, SDValue(I, 0), Chain); - ++NumLoadMoved; + if (I->getOpcode() != X86ISD::CALL) continue; - } - continue; - - - if (!ISD::isNON_TRUNCStore(I)) - continue; + /// Also try moving call address load from outside callseq_start to just + /// before the call to allow it to be folded. + /// + /// [Load chain] + /// ^ + /// | + /// [Load] + /// ^ ^ + /// | | + /// / \-- + /// / | + ///[CALLSEQ_START] | + /// ^ | + /// | | + /// [LOAD/C2Reg] | + /// | | + /// \ / + /// \ / + /// [CALL] SDValue Chain = I->getOperand(0); - - if (Chain.getNode()->getOpcode() != ISD::TokenFactor) - continue; - - SDValue N1 = I->getOperand(1); - SDValue N2 = I->getOperand(2); - if ((N1.getValueType().isFloatingPoint() && - !N1.getValueType().isVector()) || - !N1.hasOneUse()) + SDValue Load = I->getOperand(1); + if (!isCalleeLoad(Load, Chain)) continue; - - bool RModW = false; - SDValue Load; - unsigned Opcode = N1.getNode()->getOpcode(); - switch (Opcode) { - case ISD::ADD: - case ISD::MUL: - case ISD::AND: - case ISD::OR: - case ISD::XOR: - case ISD::ADDC: - case ISD::ADDE: - case ISD::VECTOR_SHUFFLE: { - SDValue N10 = N1.getOperand(0); - SDValue N11 = N1.getOperand(1); - RModW = isRMWLoad(N10, Chain, N2, Load); - if (!RModW) - RModW = isRMWLoad(N11, Chain, N2, Load); - break; - } - case ISD::SUB: - case ISD::SHL: - case ISD::SRA: - case ISD::SRL: - case ISD::ROTL: - case ISD::ROTR: - case ISD::SUBC: - case ISD::SUBE: - case X86ISD::SHLD: - case X86ISD::SHRD: { - SDValue N10 = N1.getOperand(0); - RModW = isRMWLoad(N10, Chain, N2, Load); - break; - } - } - - if (RModW) { - MoveBelowTokenFactor(CurDAG, Load, SDValue(I, 0), Chain); - ++NumLoadMoved; - checkForCycles(I); - } + MoveBelowCallSeqStart(CurDAG, Load, SDValue(I, 0), Chain); + ++NumLoadMoved; } } @@ -631,7 +522,7 @@ OptForSize = MF->getFunction()->hasFnAttr(Attribute::OptimizeForSize); if (OptLevel != CodeGenOpt::None) - PreprocessForRMW(); + PreprocessForCallLoads(); // FIXME: This should only happen when not compiled with -O0. PreprocessForFPConvert(); From sabre at nondot.org Tue Mar 2 17:12:51 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 02 Mar 2010 23:12:51 -0000 Subject: [llvm-commits] [llvm] r97606 - /llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp Message-ID: <20100302231251.86F032A6C12E@llvm.org> Author: lattner Date: Tue Mar 2 17:12:51 2010 New Revision: 97606 URL: http://llvm.org/viewvc/llvm-project?rev=97606&view=rev Log: merge two loops over all nodes in the graph into one. Modified: llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp Modified: llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp?rev=97606&r1=97605&r2=97606&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp (original) +++ llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp Tue Mar 2 17:12:51 2010 @@ -207,9 +207,6 @@ SDValue &Index, SDValue &Disp, SDValue &Segment); - void PreprocessForCallLoads(); - void PreprocessForFPConvert(); - /// SelectInlineAsmMemoryOperand - Implement addressing mode selection for /// inline asm expressions. virtual bool SelectInlineAsmMemoryOperand(const SDValue &Op, @@ -415,54 +412,50 @@ return false; } - -void X86DAGToDAGISel::PreprocessForCallLoads() { - for (SelectionDAG::allnodes_iterator I = CurDAG->allnodes_begin(), - E = CurDAG->allnodes_end(); I != E; ++I) { - if (I->getOpcode() != X86ISD::CALL) - continue; - - /// Also try moving call address load from outside callseq_start to just - /// before the call to allow it to be folded. - /// - /// [Load chain] - /// ^ - /// | - /// [Load] - /// ^ ^ - /// | | - /// / \-- - /// / | - ///[CALLSEQ_START] | - /// ^ | - /// | | - /// [LOAD/C2Reg] | - /// | | - /// \ / - /// \ / - /// [CALL] - SDValue Chain = I->getOperand(0); - SDValue Load = I->getOperand(1); - if (!isCalleeLoad(Load, Chain)) - continue; - MoveBelowCallSeqStart(CurDAG, Load, SDValue(I, 0), Chain); - ++NumLoadMoved; - } -} - - -/// PreprocessForFPConvert - Walk over the dag lowering fpround and fpextend -/// nodes that target the FP stack to be store and load to the stack. This is a -/// gross hack. We would like to simply mark these as being illegal, but when -/// we do that, legalize produces these when it expands calls, then expands -/// these in the same legalize pass. We would like dag combine to be able to -/// hack on these between the call expansion and the node legalization. As such -/// this pass basically does "really late" legalization of these inline with the -/// X86 isel pass. -void X86DAGToDAGISel::PreprocessForFPConvert() { +void X86DAGToDAGISel::PreprocessISelDAG() { + OptForSize = MF->getFunction()->hasFnAttr(Attribute::OptimizeForSize); + for (SelectionDAG::allnodes_iterator I = CurDAG->allnodes_begin(), E = CurDAG->allnodes_end(); I != E; ) { SDNode *N = I++; // Preincrement iterator to avoid invalidation issues. + + if (OptLevel != CodeGenOpt::None && N->getOpcode() == X86ISD::CALL) { + /// Also try moving call address load from outside callseq_start to just + /// before the call to allow it to be folded. + /// + /// [Load chain] + /// ^ + /// | + /// [Load] + /// ^ ^ + /// | | + /// / \-- + /// / | + ///[CALLSEQ_START] | + /// ^ | + /// | | + /// [LOAD/C2Reg] | + /// | | + /// \ / + /// \ / + /// [CALL] + SDValue Chain = N->getOperand(0); + SDValue Load = N->getOperand(1); + if (!isCalleeLoad(Load, Chain)) + continue; + MoveBelowCallSeqStart(CurDAG, Load, SDValue(N, 0), Chain); + ++NumLoadMoved; + continue; + } + + // Lower fpround and fpextend nodes that target the FP stack to be store and + // load to the stack. This is a gross hack. We would like to simply mark + // these as being illegal, but when we do that, legalize produces these when + // it expands calls, then expands these in the same legalize pass. We would + // like dag combine to be able to hack on these between the call expansion + // and the node legalization. As such this pass basically does "really + // late" legalization of these inline with the X86 isel pass. + // FIXME: This should only happen when not compiled with -O0. if (N->getOpcode() != ISD::FP_ROUND && N->getOpcode() != ISD::FP_EXTEND) continue; @@ -518,15 +511,6 @@ } } -void X86DAGToDAGISel::PreprocessISelDAG() { - OptForSize = MF->getFunction()->hasFnAttr(Attribute::OptimizeForSize); - - if (OptLevel != CodeGenOpt::None) - PreprocessForCallLoads(); - - // FIXME: This should only happen when not compiled with -O0. - PreprocessForFPConvert(); -} /// EmitSpecialCodeForMain - Emit any code that needs to be executed only in /// the main function. From idadesub at users.sourceforge.net Tue Mar 2 17:58:54 2010 From: idadesub at users.sourceforge.net (Erick Tryzelaar) Date: Tue, 02 Mar 2010 23:58:54 -0000 Subject: [llvm-commits] [llvm] r97608 - in /llvm/trunk: include/llvm-c/BitReader.h include/llvm-c/Core.h include/llvm-c/ExecutionEngine.h lib/Bitcode/Reader/BitReader.cpp lib/ExecutionEngine/ExecutionEngineBindings.cpp lib/VMCore/PassManager.cpp Message-ID: <20100302235855.107C22A6C12C@llvm.org> Author: erickt Date: Tue Mar 2 17:58:54 2010 New Revision: 97608 URL: http://llvm.org/viewvc/llvm-project?rev=97608&view=rev Log: Add Module functions in place of module providers. Modified: llvm/trunk/include/llvm-c/BitReader.h llvm/trunk/include/llvm-c/Core.h llvm/trunk/include/llvm-c/ExecutionEngine.h llvm/trunk/lib/Bitcode/Reader/BitReader.cpp llvm/trunk/lib/ExecutionEngine/ExecutionEngineBindings.cpp llvm/trunk/lib/VMCore/PassManager.cpp Modified: llvm/trunk/include/llvm-c/BitReader.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm-c/BitReader.h?rev=97608&r1=97607&r2=97608&view=diff ============================================================================== --- llvm/trunk/include/llvm-c/BitReader.h (original) +++ llvm/trunk/include/llvm-c/BitReader.h Tue Mar 2 17:58:54 2010 @@ -36,18 +36,28 @@ LLVMMemoryBufferRef MemBuf, LLVMModuleRef *OutModule, char **OutMessage); -/* Reads a module from the specified path, returning via the OutMP parameter - a module provider which performs lazy deserialization. Returns 0 on success. - Optionally returns a human-readable error message via OutMessage. */ -LLVMBool LLVMGetBitcodeModuleProvider(LLVMMemoryBufferRef MemBuf, - LLVMModuleProviderRef *OutMP, - char **OutMessage); +/** Reads a module from the specified path, returning via the OutMP parameter + a module provider which performs lazy deserialization. Returns 0 on success. + Optionally returns a human-readable error message via OutMessage. */ +LLVMBool LLVMGetBitcodeModuleInContext(LLVMContextRef ContextRef, + LLVMMemoryBufferRef MemBuf, + LLVMModuleRef *OutM, + char **OutMessage); + +LLVMBool LLVMGetBitcodeModule(LLVMMemoryBufferRef MemBuf, LLVMModuleRef *OutM, + char **OutMessage); + +/** Deprecated: Use LLVMGetBitcodeModuleInContext instead. */ LLVMBool LLVMGetBitcodeModuleProviderInContext(LLVMContextRef ContextRef, LLVMMemoryBufferRef MemBuf, LLVMModuleProviderRef *OutMP, char **OutMessage); +/** Deprecated: Use LLVMGetBitcodeModule instead. */ +LLVMBool LLVMGetBitcodeModuleProvider(LLVMMemoryBufferRef MemBuf, + LLVMModuleProviderRef *OutMP, + char **OutMessage); #ifdef __cplusplus } Modified: llvm/trunk/include/llvm-c/Core.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm-c/Core.h?rev=97608&r1=97607&r2=97608&view=diff ============================================================================== --- llvm/trunk/include/llvm-c/Core.h (original) +++ llvm/trunk/include/llvm-c/Core.h Tue Mar 2 17:58:54 2010 @@ -1022,6 +1022,9 @@ provider. It does not take ownership of the module provider. This type of pipeline is suitable for code generation and JIT compilation tasks. See llvm::FunctionPassManager::FunctionPassManager. */ +LLVMPassManagerRef LLVMCreateFunctionPassManagerForModule(LLVMModuleRef M); + +/** Deprecated: Use LLVMCreateFunctionPassManagerForModule instead. */ LLVMPassManagerRef LLVMCreateFunctionPassManager(LLVMModuleProviderRef MP); /** Initializes, executes on the provided module, and finalizes all of the Modified: llvm/trunk/include/llvm-c/ExecutionEngine.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm-c/ExecutionEngine.h?rev=97608&r1=97607&r2=97608&view=diff ============================================================================== --- llvm/trunk/include/llvm-c/ExecutionEngine.h (original) +++ llvm/trunk/include/llvm-c/ExecutionEngine.h Tue Mar 2 17:58:54 2010 @@ -55,14 +55,30 @@ /*===-- Operations on execution engines -----------------------------------===*/ +LLVMBool LLVMCreateExecutionEngineForModule(LLVMExecutionEngineRef *OutEE, + LLVMModuleRef M, + char **OutError); + +LLVMBool LLVMCreateInterpreterForModule(LLVMExecutionEngineRef *OutInterp, + LLVMModuleRef M, + char **OutError); + +LLVMBool LLVMCreateJITCompilerForModule(LLVMExecutionEngineRef *OutJIT, + LLVMModuleRef M, + unsigned OptLevel, + char **OutError); + +/** Deprecated: Use LLVMCreateExecutionEngineForModule instead. */ LLVMBool LLVMCreateExecutionEngine(LLVMExecutionEngineRef *OutEE, LLVMModuleProviderRef MP, char **OutError); +/** Deprecated: Use LLVMCreateInterpreterForModule instead. */ LLVMBool LLVMCreateInterpreter(LLVMExecutionEngineRef *OutInterp, LLVMModuleProviderRef MP, char **OutError); +/** Deprecated: Use LLVMCreateJITCompilerForModule instead. */ LLVMBool LLVMCreateJITCompiler(LLVMExecutionEngineRef *OutJIT, LLVMModuleProviderRef MP, unsigned OptLevel, @@ -84,8 +100,15 @@ void LLVMFreeMachineCodeForFunction(LLVMExecutionEngineRef EE, LLVMValueRef F); +void LLVMAddModule(LLVMExecutionEngineRef EE, LLVMModuleRef M); + +/** Deprecated: Use LLVMAddModule instead. */ void LLVMAddModuleProvider(LLVMExecutionEngineRef EE, LLVMModuleProviderRef MP); +LLVMBool LLVMRemoveModule(LLVMExecutionEngineRef EE, LLVMModuleRef M, + LLVMModuleRef *OutMod, char **OutError); + +/** Deprecated: Use LLVMRemoveModule instead. */ LLVMBool LLVMRemoveModuleProvider(LLVMExecutionEngineRef EE, LLVMModuleProviderRef MP, LLVMModuleRef *OutMod, char **OutError); Modified: llvm/trunk/lib/Bitcode/Reader/BitReader.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Bitcode/Reader/BitReader.cpp?rev=97608&r1=97607&r2=97608&view=diff ============================================================================== --- llvm/trunk/lib/Bitcode/Reader/BitReader.cpp (original) +++ llvm/trunk/lib/Bitcode/Reader/BitReader.cpp Tue Mar 2 17:58:54 2010 @@ -45,26 +45,44 @@ /* Reads a module from the specified path, returning via the OutModule parameter a module provider which performs lazy deserialization. Returns 0 on success. Optionally returns a human-readable error message via OutMessage. */ -LLVMBool LLVMGetBitcodeModuleProvider(LLVMMemoryBufferRef MemBuf, - LLVMModuleProviderRef *OutMP, - char **OutMessage) { - return LLVMGetBitcodeModuleProviderInContext(wrap(&getGlobalContext()), - MemBuf, OutMP, OutMessage); -} - -LLVMBool LLVMGetBitcodeModuleProviderInContext(LLVMContextRef ContextRef, - LLVMMemoryBufferRef MemBuf, - LLVMModuleProviderRef *OutMP, - char **OutMessage) { +LLVMBool LLVMGetBitcodeModuleInContext(LLVMContextRef ContextRef, + LLVMMemoryBufferRef MemBuf, + LLVMModuleRef *OutM, + char **OutMessage) { std::string Message; - *OutMP = reinterpret_cast( - getLazyBitcodeModule(unwrap(MemBuf), *unwrap(ContextRef), &Message)); - if (!*OutMP) { + *OutM = wrap(getLazyBitcodeModule(unwrap(MemBuf), *unwrap(ContextRef), + &Message)); + if (!*OutM) { if (OutMessage) *OutMessage = strdup(Message.c_str()); return 1; } return 0; + +} + +LLVMBool LLVMGetBitcodeModule(LLVMMemoryBufferRef MemBuf, LLVMModuleRef *OutM, + char **OutMessage) { + return LLVMGetBitcodeModuleInContext(LLVMGetGlobalContext(), MemBuf, OutM, + OutMessage); +} + +/* Deprecated: Use LLVMGetBitcodeModuleInContext instead. */ +LLVMBool LLVMGetBitcodeModuleProviderInContext(LLVMContextRef ContextRef, + LLVMMemoryBufferRef MemBuf, + LLVMModuleProviderRef *OutMP, + char **OutMessage) { + return LLVMGetBitcodeModuleInContext(ContextRef, MemBuf, + reinterpret_cast(OutMP), + OutMessage); +} + +/* Deprecated: Use LLVMGetBitcodeModule instead. */ +LLVMBool LLVMGetBitcodeModuleProvider(LLVMMemoryBufferRef MemBuf, + LLVMModuleProviderRef *OutMP, + char **OutMessage) { + return LLVMGetBitcodeModuleProviderInContext(LLVMGetGlobalContext(), MemBuf, + OutMP, OutMessage); } Modified: llvm/trunk/lib/ExecutionEngine/ExecutionEngineBindings.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/ExecutionEngineBindings.cpp?rev=97608&r1=97607&r2=97608&view=diff ============================================================================== --- llvm/trunk/lib/ExecutionEngine/ExecutionEngineBindings.cpp (original) +++ llvm/trunk/lib/ExecutionEngine/ExecutionEngineBindings.cpp Tue Mar 2 17:58:54 2010 @@ -87,11 +87,11 @@ /*===-- Operations on execution engines -----------------------------------===*/ -LLVMBool LLVMCreateExecutionEngine(LLVMExecutionEngineRef *OutEE, - LLVMModuleProviderRef MP, - char **OutError) { +LLVMBool LLVMCreateExecutionEngineForModule(LLVMExecutionEngineRef *OutEE, + LLVMModuleRef M, + char **OutError) { std::string Error; - EngineBuilder builder(unwrap(MP)); + EngineBuilder builder(unwrap(M)); builder.setEngineKind(EngineKind::Either) .setErrorStr(&Error); if (ExecutionEngine *EE = builder.create()){ @@ -102,11 +102,11 @@ return 1; } -LLVMBool LLVMCreateInterpreter(LLVMExecutionEngineRef *OutInterp, - LLVMModuleProviderRef MP, - char **OutError) { +LLVMBool LLVMCreateInterpreterForModule(LLVMExecutionEngineRef *OutInterp, + LLVMModuleRef M, + char **OutError) { std::string Error; - EngineBuilder builder(unwrap(MP)); + EngineBuilder builder(unwrap(M)); builder.setEngineKind(EngineKind::Interpreter) .setErrorStr(&Error); if (ExecutionEngine *Interp = builder.create()) { @@ -117,12 +117,12 @@ return 1; } -LLVMBool LLVMCreateJITCompiler(LLVMExecutionEngineRef *OutJIT, - LLVMModuleProviderRef MP, - unsigned OptLevel, - char **OutError) { +LLVMBool LLVMCreateJITCompilerForModule(LLVMExecutionEngineRef *OutJIT, + LLVMModuleRef M, + unsigned OptLevel, + char **OutError) { std::string Error; - EngineBuilder builder(unwrap(MP)); + EngineBuilder builder(unwrap(M)); builder.setEngineKind(EngineKind::JIT) .setErrorStr(&Error) .setOptLevel((CodeGenOpt::Level)OptLevel); @@ -134,6 +134,35 @@ return 1; } +LLVMBool LLVMCreateExecutionEngine(LLVMExecutionEngineRef *OutEE, + LLVMModuleProviderRef MP, + char **OutError) { + /* The module provider is now actually a module. */ + return LLVMCreateExecutionEngineForModule(OutEE, + reinterpret_cast(MP), + OutError); +} + +LLVMBool LLVMCreateInterpreter(LLVMExecutionEngineRef *OutInterp, + LLVMModuleProviderRef MP, + char **OutError) { + /* The module provider is now actually a module. */ + return LLVMCreateInterpreterForModule(OutInterp, + reinterpret_cast(MP), + OutError); +} + +LLVMBool LLVMCreateJITCompiler(LLVMExecutionEngineRef *OutJIT, + LLVMModuleProviderRef MP, + unsigned OptLevel, + char **OutError) { + /* The module provider is now actually a module. */ + return LLVMCreateJITCompilerForModule(OutJIT, + reinterpret_cast(MP), + OptLevel, OutError); +} + + void LLVMDisposeExecutionEngine(LLVMExecutionEngineRef EE) { delete unwrap(EE); } @@ -173,17 +202,29 @@ unwrap(EE)->freeMachineCodeForFunction(unwrap(F)); } +void LLVMAddModule(LLVMExecutionEngineRef EE, LLVMModuleRef M){ + unwrap(EE)->addModule(unwrap(M)); +} + void LLVMAddModuleProvider(LLVMExecutionEngineRef EE, LLVMModuleProviderRef MP){ - unwrap(EE)->addModule(unwrap(MP)); + /* The module provider is now actually a module. */ + LLVMAddModule(EE, reinterpret_cast(MP)); +} + +LLVMBool LLVMRemoveModule(LLVMExecutionEngineRef EE, LLVMModuleRef M, + LLVMModuleRef *OutMod, char **OutError) { + Module *Mod = unwrap(M); + unwrap(EE)->removeModule(Mod); + *OutMod = wrap(Mod); + return 0; } LLVMBool LLVMRemoveModuleProvider(LLVMExecutionEngineRef EE, LLVMModuleProviderRef MP, LLVMModuleRef *OutMod, char **OutError) { - Module *M = unwrap(MP); - unwrap(EE)->removeModule(M); - *OutMod = wrap(M); - return 0; + /* The module provider is now actually a module. */ + return LLVMRemoveModule(EE, reinterpret_cast(MP), OutMod, + OutError); } LLVMBool LLVMFindFunction(LLVMExecutionEngineRef EE, const char *Name, Modified: llvm/trunk/lib/VMCore/PassManager.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/PassManager.cpp?rev=97608&r1=97607&r2=97608&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/PassManager.cpp (original) +++ llvm/trunk/lib/VMCore/PassManager.cpp Tue Mar 2 17:58:54 2010 @@ -1712,8 +1712,13 @@ return wrap(new PassManager()); } +LLVMPassManagerRef LLVMCreateFunctionPassManagerForModule(LLVMModuleRef M) { + return wrap(new FunctionPassManager(unwrap(M))); +} + LLVMPassManagerRef LLVMCreateFunctionPassManager(LLVMModuleProviderRef P) { - return wrap(new FunctionPassManager(unwrap(P))); + return LLVMCreateFunctionPassManagerForModule( + reinterpret_cast(P)); } LLVMBool LLVMRunPassManager(LLVMPassManagerRef PM, LLVMModuleRef M) { From idadesub at users.sourceforge.net Tue Mar 2 17:59:00 2010 From: idadesub at users.sourceforge.net (Erick Tryzelaar) Date: Tue, 02 Mar 2010 23:59:00 -0000 Subject: [llvm-commits] [llvm] r97609 - in /llvm/trunk: bindings/ocaml/bitreader/ bindings/ocaml/executionengine/ bindings/ocaml/llvm/ test/Bindings/Ocaml/ Message-ID: <20100302235900.A591C2A6C12D@llvm.org> Author: erickt Date: Tue Mar 2 17:59:00 2010 New Revision: 97609 URL: http://llvm.org/viewvc/llvm-project?rev=97609&view=rev Log: Remove module providers from ocaml. Modified: llvm/trunk/bindings/ocaml/bitreader/bitreader_ocaml.c llvm/trunk/bindings/ocaml/bitreader/llvm_bitreader.ml llvm/trunk/bindings/ocaml/bitreader/llvm_bitreader.mli llvm/trunk/bindings/ocaml/executionengine/executionengine_ocaml.c llvm/trunk/bindings/ocaml/executionengine/llvm_executionengine.ml llvm/trunk/bindings/ocaml/executionengine/llvm_executionengine.mli llvm/trunk/bindings/ocaml/llvm/llvm.ml llvm/trunk/bindings/ocaml/llvm/llvm.mli llvm/trunk/bindings/ocaml/llvm/llvm_ocaml.c llvm/trunk/test/Bindings/Ocaml/bitreader.ml llvm/trunk/test/Bindings/Ocaml/executionengine.ml llvm/trunk/test/Bindings/Ocaml/scalar_opts.ml llvm/trunk/test/Bindings/Ocaml/vmcore.ml Modified: llvm/trunk/bindings/ocaml/bitreader/bitreader_ocaml.c URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/bindings/ocaml/bitreader/bitreader_ocaml.c?rev=97609&r1=97608&r2=97609&view=diff ============================================================================== --- llvm/trunk/bindings/ocaml/bitreader/bitreader_ocaml.c (original) +++ llvm/trunk/bindings/ocaml/bitreader/bitreader_ocaml.c Tue Mar 2 17:59:00 2010 @@ -46,17 +46,16 @@ /*===-- Modules -----------------------------------------------------------===*/ /* Llvm.llcontext -> Llvm.llmemorybuffer -> Llvm.llmodule */ -CAMLprim value llvm_get_module_provider(LLVMContextRef C, - LLVMMemoryBufferRef MemBuf) { +CAMLprim value llvm_get_module(LLVMContextRef C, LLVMMemoryBufferRef MemBuf) { CAMLparam0(); CAMLlocal2(Variant, MessageVal); char *Message; - LLVMModuleProviderRef MP; - if (LLVMGetBitcodeModuleProviderInContext(C, MemBuf, &MP, &Message)) + LLVMModuleRef M; + if (LLVMGetBitcodeModuleInContext(C, MemBuf, &M, &Message)) llvm_raise(llvm_bitreader_error_exn, Message); - CAMLreturn((value) MP); + CAMLreturn((value) M); } /* Llvm.llcontext -> Llvm.llmemorybuffer -> Llvm.llmodule */ Modified: llvm/trunk/bindings/ocaml/bitreader/llvm_bitreader.ml URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/bindings/ocaml/bitreader/llvm_bitreader.ml?rev=97609&r1=97608&r2=97609&view=diff ============================================================================== --- llvm/trunk/bindings/ocaml/bitreader/llvm_bitreader.ml (original) +++ llvm/trunk/bindings/ocaml/bitreader/llvm_bitreader.ml Tue Mar 2 17:59:00 2010 @@ -13,9 +13,8 @@ external register_exns : exn -> unit = "llvm_register_bitreader_exns" let _ = register_exns (Error "") -external get_module_provider : Llvm.llcontext -> Llvm.llmemorybuffer -> - Llvm.llmoduleprovider - = "llvm_get_module_provider" +external get_module : Llvm.llcontext -> Llvm.llmemorybuffer -> Llvm.llmodule + = "llvm_get_module" external parse_bitcode : Llvm.llcontext -> Llvm.llmemorybuffer -> Llvm.llmodule = "llvm_parse_bitcode" Modified: llvm/trunk/bindings/ocaml/bitreader/llvm_bitreader.mli URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/bindings/ocaml/bitreader/llvm_bitreader.mli?rev=97609&r1=97608&r2=97609&view=diff ============================================================================== --- llvm/trunk/bindings/ocaml/bitreader/llvm_bitreader.mli (original) +++ llvm/trunk/bindings/ocaml/bitreader/llvm_bitreader.mli Tue Mar 2 17:59:00 2010 @@ -14,14 +14,12 @@ exception Error of string -(** [get_module_provider context mb] reads the bitcode for a new - module provider [m] from the memory buffer [mb] in the context [context]. - Returns [m] if successful, or raises [Error msg] otherwise, where [msg] is a - description of the error encountered. See the function - [llvm::getBitcodeModuleProvider]. *) -external get_module_provider : Llvm.llcontext -> Llvm.llmemorybuffer -> - Llvm.llmoduleprovider - = "llvm_get_module_provider" +(** [get_module context mb] reads the bitcode for a new module [m] from the + memory buffer [mb] in the context [context]. Returns [m] if successful, or + raises [Error msg] otherwise, where [msg] is a description of the error + encountered. See the function [llvm::getBitcodeModule]. *) +external get_module : Llvm.llcontext -> Llvm.llmemorybuffer -> Llvm.llmodule + = "llvm_get_module" (** [parse_bitcode context mb] parses the bitcode for a new module [m] from the memory buffer [mb] in the context [context]. Returns [m] if successful, or Modified: llvm/trunk/bindings/ocaml/executionengine/executionengine_ocaml.c URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/bindings/ocaml/executionengine/executionengine_ocaml.c?rev=97609&r1=97608&r2=97609&view=diff ============================================================================== --- llvm/trunk/bindings/ocaml/executionengine/executionengine_ocaml.c (original) +++ llvm/trunk/bindings/ocaml/executionengine/executionengine_ocaml.c Tue Mar 2 17:59:00 2010 @@ -168,41 +168,41 @@ /*--... Operations on execution engines ....................................--*/ -/* llmoduleprovider -> ExecutionEngine.t */ -CAMLprim LLVMExecutionEngineRef llvm_ee_create(LLVMModuleProviderRef MP) { +/* llmodule -> ExecutionEngine.t */ +CAMLprim LLVMExecutionEngineRef llvm_ee_create(LLVMModuleRef M) { LLVMExecutionEngineRef Interp; char *Error; - if (LLVMCreateExecutionEngine(&Interp, MP, &Error)) + if (LLVMCreateExecutionEngineForModule(&Interp, M, &Error)) llvm_raise(llvm_ee_error_exn, Error); return Interp; } -/* llmoduleprovider -> ExecutionEngine.t */ +/* llmodule -> ExecutionEngine.t */ CAMLprim LLVMExecutionEngineRef -llvm_ee_create_interpreter(LLVMModuleProviderRef MP) { +llvm_ee_create_interpreter(LLVMModuleRef M) { LLVMExecutionEngineRef Interp; char *Error; - if (LLVMCreateInterpreter(&Interp, MP, &Error)) + if (LLVMCreateInterpreterForModule(&Interp, M, &Error)) llvm_raise(llvm_ee_error_exn, Error); return Interp; } -/* llmoduleprovider -> ExecutionEngine.t */ +/* llmodule -> ExecutionEngine.t */ CAMLprim LLVMExecutionEngineRef -llvm_ee_create_jit(LLVMModuleProviderRef MP) { +llvm_ee_create_jit(LLVMModuleRef M) { LLVMExecutionEngineRef JIT; char *Error; - if (LLVMCreateJITCompiler(&JIT, MP, 3, &Error)) + if (LLVMCreateJITCompilerForModule(&JIT, M, 3, &Error)) llvm_raise(llvm_ee_error_exn, Error); return JIT; } -/* llmoduleprovider -> ExecutionEngine.t */ +/* llmodule -> ExecutionEngine.t */ CAMLprim LLVMExecutionEngineRef -llvm_ee_create_fast_jit(LLVMModuleProviderRef MP) { +llvm_ee_create_fast_jit(LLVMModuleRef M) { LLVMExecutionEngineRef JIT; char *Error; - if (LLVMCreateJITCompiler(&JIT, MP, 0, &Error)) + if (LLVMCreateJITCompiler(&JIT, M, 0, &Error)) llvm_raise(llvm_ee_error_exn, Error); return JIT; } @@ -213,19 +213,18 @@ return Val_unit; } -/* llmoduleprovider -> ExecutionEngine.t -> unit */ -CAMLprim value llvm_ee_add_mp(LLVMModuleProviderRef MP, - LLVMExecutionEngineRef EE) { - LLVMAddModuleProvider(EE, MP); +/* llmodule -> ExecutionEngine.t -> unit */ +CAMLprim value llvm_ee_add_mp(LLVMModuleRef M, LLVMExecutionEngineRef EE) { + LLVMAddModule(EE, M); return Val_unit; } -/* llmoduleprovider -> ExecutionEngine.t -> llmodule */ -CAMLprim LLVMModuleRef llvm_ee_remove_mp(LLVMModuleProviderRef MP, +/* llmodule -> ExecutionEngine.t -> llmodule */ +CAMLprim LLVMModuleRef llvm_ee_remove_mp(LLVMModuleRef M, LLVMExecutionEngineRef EE) { LLVMModuleRef RemovedModule; char *Error; - if (LLVMRemoveModuleProvider(EE, MP, &RemovedModule, &Error)) + if (LLVMRemoveModule(EE, M, &RemovedModule, &Error)) llvm_raise(llvm_ee_error_exn, Error); return RemovedModule; } Modified: llvm/trunk/bindings/ocaml/executionengine/llvm_executionengine.ml URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/bindings/ocaml/executionengine/llvm_executionengine.ml?rev=97609&r1=97608&r2=97609&view=diff ============================================================================== --- llvm/trunk/bindings/ocaml/executionengine/llvm_executionengine.ml (original) +++ llvm/trunk/bindings/ocaml/executionengine/llvm_executionengine.ml Tue Mar 2 17:59:00 2010 @@ -56,19 +56,19 @@ call into LLVM. *) let _ = register_exns (Error "") - external create: Llvm.llmoduleprovider -> t + external create: Llvm.llmodule -> t = "llvm_ee_create" - external create_interpreter: Llvm.llmoduleprovider -> t + external create_interpreter: Llvm.llmodule -> t = "llvm_ee_create_interpreter" - external create_jit: Llvm.llmoduleprovider -> t + external create_jit: Llvm.llmodule -> t = "llvm_ee_create_jit" - external create_fast_jit: Llvm.llmoduleprovider -> t + external create_fast_jit: Llvm.llmodule -> t = "llvm_ee_create_fast_jit" external dispose: t -> unit = "llvm_ee_dispose" - external add_module_provider: Llvm.llmoduleprovider -> t -> unit + external add_module: Llvm.llmodule -> t -> unit = "llvm_ee_add_mp" - external remove_module_provider: Llvm.llmoduleprovider -> t -> Llvm.llmodule + external remove_module: Llvm.llmodule -> t -> Llvm.llmodule = "llvm_ee_remove_mp" external find_function: string -> t -> Llvm.llvalue option = "llvm_ee_find_function" Modified: llvm/trunk/bindings/ocaml/executionengine/llvm_executionengine.mli URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/bindings/ocaml/executionengine/llvm_executionengine.mli?rev=97609&r1=97608&r2=97609&view=diff ============================================================================== --- llvm/trunk/bindings/ocaml/executionengine/llvm_executionengine.mli (original) +++ llvm/trunk/bindings/ocaml/executionengine/llvm_executionengine.mli Tue Mar 2 17:59:00 2010 @@ -85,48 +85,47 @@ invoking a static compiler and generating a native executable. *) type t - (** [create mp] creates a new execution engine, taking ownership of the - module provider [mp] if successful. Creates a JIT if possible, else falls - back to an interpreter. Raises [Error msg] if an error occurrs. The - execution engine is not garbage collected and must be destroyed with - [dispose ee]. See the function [llvm::EngineBuilder::create]. *) - val create: Llvm.llmoduleprovider -> t + (** [create m] creates a new execution engine, taking ownership of the + module [m] if successful. Creates a JIT if possible, else falls back to an + interpreter. Raises [Error msg] if an error occurrs. The execution engine + is not garbage collected and must be destroyed with [dispose ee]. + See the function [llvm::EngineBuilder::create]. *) + val create: Llvm.llmodule -> t - (** [create_interpreter mp] creates a new interpreter, taking ownership of the - module provider [mp] if successful. Raises [Error msg] if an error - occurrs. The execution engine is not garbage collected and must be - destroyed with [dispose ee]. + (** [create_interpreter m] creates a new interpreter, taking ownership of the + module [m] if successful. Raises [Error msg] if an error occurrs. The + execution engine is not garbage collected and must be destroyed with + [dispose ee]. See the function [llvm::EngineBuilder::create]. *) - val create_interpreter: Llvm.llmoduleprovider -> t + val create_interpreter: Llvm.llmodule -> t - (** [create_jit mp] creates a new JIT (just-in-time compiler), taking - ownership of the module provider [mp] if successful. This function creates - a JIT which favors code quality over compilation speed. Raises [Error msg] - if an error occurrs. The execution engine is not garbage collected and - must be destroyed with [dispose ee]. + (** [create_jit m] creates a new JIT (just-in-time compiler), taking + ownership of the module [m] if successful. This function creates a JIT + which favors code quality over compilation speed. Raises [Error msg] if an + error occurrs. The execution engine is not garbage collected and must be + destroyed with [dispose ee]. See the function [llvm::EngineBuilder::create]. *) - val create_jit: Llvm.llmoduleprovider -> t + val create_jit: Llvm.llmodule -> t - (** [create_fast_jit mp] creates a new JIT (just-in-time compiler) which + (** [create_fast_jit m] creates a new JIT (just-in-time compiler) which favors compilation speed over code quality. It takes ownership of the - module provider [mp] if successful. Raises [Error msg] if an error - occurrs. The execution engine is not garbage collected and must be - destroyed with [dispose ee]. + module [m] if successful. Raises [Error msg] if an error occurrs. The + execution engine is not garbage collected and must be destroyed with + [dispose ee]. See the function [llvm::EngineBuilder::create]. *) - val create_fast_jit: Llvm.llmoduleprovider -> t + val create_fast_jit: Llvm.llmodule -> t (** [dispose ee] releases the memory used by the execution engine and must be invoked to avoid memory leaks. *) val dispose: t -> unit - (** [add_module_provider mp ee] adds the module provider [mp] to the execution - engine [ee]. *) - val add_module_provider: Llvm.llmoduleprovider -> t -> unit - - (** [remove_module_provider mp ee] removes the module provider [mp] from the - execution engine [ee], disposing of [mp] and the module referenced by - [mp]. Raises [Error msg] if an error occurs. *) - val remove_module_provider: Llvm.llmoduleprovider -> t -> Llvm.llmodule + (** [add_module m ee] adds the module [m] to the execution engine [ee]. *) + val add_module: Llvm.llmodule -> t -> unit + + (** [remove_module m ee] removes the module [m] from the execution engine + [ee], disposing of [m] and the module referenced by [mp]. Raises + [Error msg] if an error occurs. *) + val remove_module: Llvm.llmodule -> t -> Llvm.llmodule (** [find_function n ee] finds the function named [n] defined in any of the modules owned by the execution engine [ee]. Returns [None] if the function Modified: llvm/trunk/bindings/ocaml/llvm/llvm.ml URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/bindings/ocaml/llvm/llvm.ml?rev=97609&r1=97608&r2=97609&view=diff ============================================================================== --- llvm/trunk/bindings/ocaml/llvm/llvm.ml (original) +++ llvm/trunk/bindings/ocaml/llvm/llvm.ml Tue Mar 2 17:59:00 2010 @@ -16,7 +16,6 @@ type lluse type llbasicblock type llbuilder -type llmoduleprovider type llmemorybuffer module TypeKind = struct @@ -948,14 +947,6 @@ external build_ptrdiff : llvalue -> llvalue -> string -> llbuilder -> llvalue = "llvm_build_ptrdiff" -(*===-- Module providers --------------------------------------------------===*) - -module ModuleProvider = struct - external create : llmodule -> llmoduleprovider - = "LLVMCreateModuleProviderForExistingModule" - external dispose : llmoduleprovider -> unit = "llvm_dispose_module_provider" -end - (*===-- Memory buffers ----------------------------------------------------===*) @@ -972,7 +963,7 @@ type 'a t type any = [ `Module | `Function ] external create : unit -> [ `Module ] t = "llvm_passmanager_create" - external create_function : llmoduleprovider -> [ `Function ] t + external create_function : llmodule -> [ `Function ] t = "LLVMCreateFunctionPassManager" external run_module : llmodule -> [ `Module ] t -> bool = "llvm_passmanager_run_module" Modified: llvm/trunk/bindings/ocaml/llvm/llvm.mli URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/bindings/ocaml/llvm/llvm.mli?rev=97609&r1=97608&r2=97609&view=diff ============================================================================== --- llvm/trunk/bindings/ocaml/llvm/llvm.mli (original) +++ llvm/trunk/bindings/ocaml/llvm/llvm.mli Tue Mar 2 17:59:00 2010 @@ -49,10 +49,6 @@ class. *) type llbuilder -(** Used to provide a module to JIT or interpreter. - See the [llvm::ModuleProvider] class. *) -type llmoduleprovider - (** Used to efficiently handle large buffers of read-only binary data. See the [llvm::MemoryBuffer] class. *) type llmemorybuffer @@ -2198,20 +2194,6 @@ external build_ptrdiff : llvalue -> llvalue -> string -> llbuilder -> llvalue = "llvm_build_ptrdiff" -(** {6 Module providers} *) - -module ModuleProvider : sig - (** [create_module_provider m] encapsulates [m] in a module provider and takes - ownership of the module. See the constructor - [llvm::ExistingModuleProvider::ExistingModuleProvider]. *) - external create : llmodule -> llmoduleprovider - = "LLVMCreateModuleProviderForExistingModule" - - (** [dispose_module_provider mp] destroys the module provider [mp] as well as - the contained module. *) - external dispose : llmoduleprovider -> unit = "llvm_dispose_module_provider" -end - (** {6 Memory buffers} *) @@ -2243,12 +2225,12 @@ See the constructor of [llvm::PassManager]. *) external create : unit -> [ `Module ] t = "llvm_passmanager_create" - (** [PassManager.create_function mp] constructs a new function-by-function - pass pipeline over the module provider [mp]. It does not take ownership of - [mp]. This type of pipeline is suitable for code generation and JIT - compilation tasks. + (** [PassManager.create_function m] constructs a new function-by-function + pass pipeline over the module [m]. It does not take ownership of [m]. + This type of pipeline is suitable for code generation and JIT compilation + tasks. See the constructor of [llvm::FunctionPassManager]. *) - external create_function : llmoduleprovider -> [ `Function ] t + external create_function : llmodule -> [ `Function ] t = "LLVMCreateFunctionPassManager" (** [run_module m pm] initializes, executes on the module [m], and finalizes @@ -2278,7 +2260,7 @@ external finalize : [ `Function ] t -> bool = "llvm_passmanager_finalize" (** Frees the memory of a pass pipeline. For function pipelines, does not free - the module provider. + the module. See the destructor of [llvm::BasePassManager]. *) external dispose : [< any ] t -> unit = "llvm_passmanager_dispose" end Modified: llvm/trunk/bindings/ocaml/llvm/llvm_ocaml.c URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/bindings/ocaml/llvm/llvm_ocaml.c?rev=97609&r1=97608&r2=97609&view=diff ============================================================================== --- llvm/trunk/bindings/ocaml/llvm/llvm_ocaml.c (original) +++ llvm/trunk/bindings/ocaml/llvm/llvm_ocaml.c Tue Mar 2 17:59:00 2010 @@ -1752,14 +1752,6 @@ return LLVMBuildPtrDiff(Builder_val(B), LHS, RHS, String_val(Name)); } -/*===-- Module Providers --------------------------------------------------===*/ - -/* llmoduleprovider -> unit */ -CAMLprim value llvm_dispose_module_provider(LLVMModuleProviderRef MP) { - LLVMDisposeModuleProvider(MP); - return Val_unit; -} - /*===-- Memory buffers ----------------------------------------------------===*/ Modified: llvm/trunk/test/Bindings/Ocaml/bitreader.ml URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Bindings/Ocaml/bitreader.ml?rev=97609&r1=97608&r2=97609&view=diff ============================================================================== --- llvm/trunk/test/Bindings/Ocaml/bitreader.ml (original) +++ llvm/trunk/test/Bindings/Ocaml/bitreader.ml Tue Mar 2 17:59:00 2010 @@ -41,16 +41,16 @@ true end; - (* get_module_provider *) + (* get_module *) begin let mb = Llvm.MemoryBuffer.of_file fn in - let mp = begin try - Llvm_bitreader.get_module_provider context mb + let m = begin try + Llvm_bitreader.get_module context mb with x -> Llvm.MemoryBuffer.dispose mb; raise x end in - Llvm.ModuleProvider.dispose mp + Llvm.dispose_module m end; (* corrupt the bitcode *) @@ -60,17 +60,17 @@ close_out oc end; - (* test get_module_provider exceptions *) + (* test get_module exceptions *) test begin try let mb = Llvm.MemoryBuffer.of_file fn in - let mp = begin try - Llvm_bitreader.get_module_provider context mb + let m = begin try + Llvm_bitreader.get_module context mb with x -> Llvm.MemoryBuffer.dispose mb; raise x end in - Llvm.ModuleProvider.dispose mp; + Llvm.dispose_module m; false with Llvm_bitreader.Error _ -> true Modified: llvm/trunk/test/Bindings/Ocaml/executionengine.ml URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Bindings/Ocaml/executionengine.ml?rev=97609&r1=97608&r2=97609&view=diff ============================================================================== --- llvm/trunk/test/Bindings/Ocaml/executionengine.ml (original) +++ llvm/trunk/test/Bindings/Ocaml/executionengine.ml Tue Mar 2 17:59:00 2010 @@ -64,9 +64,8 @@ let m2 = create_module (global_context ()) "test_module2" in define_plus m2; - let ee = ExecutionEngine.create (ModuleProvider.create m) in - let mp2 = ModuleProvider.create m2 in - ExecutionEngine.add_module_provider mp2 ee; + let ee = ExecutionEngine.create m in + ExecutionEngine.add_module m2 ee; (* run_static_ctors *) ExecutionEngine.run_static_ctors ee; @@ -94,8 +93,8 @@ ee in if 4 != GenericValue.as_int res then bomb "plus did not work"; - (* remove_module_provider *) - Llvm.dispose_module (ExecutionEngine.remove_module_provider mp2 ee); + (* remove_module *) + Llvm.dispose_module (ExecutionEngine.remove_module m2 ee); (* run_static_dtors *) ExecutionEngine.run_static_dtors ee; Modified: llvm/trunk/test/Bindings/Ocaml/scalar_opts.ml URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Bindings/Ocaml/scalar_opts.ml?rev=97609&r1=97608&r2=97609&view=diff ============================================================================== --- llvm/trunk/test/Bindings/Ocaml/scalar_opts.ml (original) +++ llvm/trunk/test/Bindings/Ocaml/scalar_opts.ml Tue Mar 2 17:59:00 2010 @@ -22,7 +22,6 @@ let filename = Sys.argv.(1) let m = create_module context filename -let mp = ModuleProvider.create m (*===-- Transforms --------------------------------------------------------===*) @@ -36,7 +35,7 @@ let td = TargetData.create (target_triple m) in - ignore (PassManager.create_function mp + ignore (PassManager.create_function m ++ TargetData.add td ++ add_instruction_combining ++ add_reassociation @@ -55,4 +54,4 @@ let _ = suite "transforms" test_transforms; - ModuleProvider.dispose mp + dispose_module m Modified: llvm/trunk/test/Bindings/Ocaml/vmcore.ml URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Bindings/Ocaml/vmcore.ml?rev=97609&r1=97608&r2=97609&view=diff ============================================================================== --- llvm/trunk/test/Bindings/Ocaml/vmcore.ml (original) +++ llvm/trunk/test/Bindings/Ocaml/vmcore.ml Tue Mar 2 17:59:00 2010 @@ -58,7 +58,6 @@ let filename = Sys.argv.(1) let m = create_module context filename -let mp = ModuleProvider.create m (*===-- Target ------------------------------------------------------------===*) @@ -1264,14 +1263,6 @@ end -(*===-- Module Provider ---------------------------------------------------===*) - -let test_module_provider () = - let m = create_module context "test" in - let mp = ModuleProvider.create m in - ModuleProvider.dispose mp - - (*===-- Pass Managers -----------------------------------------------------===*) let test_pass_manager () = @@ -1288,7 +1279,7 @@ let fn = define_function "FunctionPassManager" fty m in ignore (build_ret_void (builder_at_end context (entry_block fn))); - ignore (PassManager.create_function mp + ignore (PassManager.create_function m ++ PassManager.initialize ++ PassManager.run_function fn ++ PassManager.finalize @@ -1307,7 +1298,7 @@ group "writer"; insist (write_bitcode_file m filename); - ModuleProvider.dispose mp + dispose_module m (*===-- Driver ------------------------------------------------------------===*) @@ -1326,7 +1317,6 @@ suite "basic blocks" test_basic_blocks; suite "instructions" test_instructions; suite "builder" test_builder; - suite "module provider" test_module_provider; suite "pass manager" test_pass_manager; suite "writer" test_writer; (* Keep this last; it disposes m. *) exit !exit_status From idadesub at users.sourceforge.net Tue Mar 2 17:59:03 2010 From: idadesub at users.sourceforge.net (Erick Tryzelaar) Date: Tue, 02 Mar 2010 23:59:03 -0000 Subject: [llvm-commits] [llvm] r97610 - in /llvm/trunk/bindings/ocaml/executionengine: executionengine_ocaml.c llvm_executionengine.ml llvm_executionengine.mli Message-ID: <20100302235903.993292A6C12C@llvm.org> Author: erickt Date: Tue Mar 2 17:59:03 2010 New Revision: 97610 URL: http://llvm.org/viewvc/llvm-project?rev=97610&view=rev Log: Expose the optimization level for the jit in ocaml. Modified: llvm/trunk/bindings/ocaml/executionengine/executionengine_ocaml.c llvm/trunk/bindings/ocaml/executionengine/llvm_executionengine.ml llvm/trunk/bindings/ocaml/executionengine/llvm_executionengine.mli Modified: llvm/trunk/bindings/ocaml/executionengine/executionengine_ocaml.c URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/bindings/ocaml/executionengine/executionengine_ocaml.c?rev=97610&r1=97609&r2=97610&view=diff ============================================================================== --- llvm/trunk/bindings/ocaml/executionengine/executionengine_ocaml.c (original) +++ llvm/trunk/bindings/ocaml/executionengine/executionengine_ocaml.c Tue Mar 2 17:59:03 2010 @@ -187,22 +187,12 @@ return Interp; } -/* llmodule -> ExecutionEngine.t */ +/* llmodule -> int -> ExecutionEngine.t */ CAMLprim LLVMExecutionEngineRef -llvm_ee_create_jit(LLVMModuleRef M) { +llvm_ee_create_jit(LLVMModuleRef M, value OptLevel) { LLVMExecutionEngineRef JIT; char *Error; - if (LLVMCreateJITCompilerForModule(&JIT, M, 3, &Error)) - llvm_raise(llvm_ee_error_exn, Error); - return JIT; -} - -/* llmodule -> ExecutionEngine.t */ -CAMLprim LLVMExecutionEngineRef -llvm_ee_create_fast_jit(LLVMModuleRef M) { - LLVMExecutionEngineRef JIT; - char *Error; - if (LLVMCreateJITCompiler(&JIT, M, 0, &Error)) + if (LLVMCreateJITCompilerForModule(&JIT, M, Int_val(OptLevel), &Error)) llvm_raise(llvm_ee_error_exn, Error); return JIT; } Modified: llvm/trunk/bindings/ocaml/executionengine/llvm_executionengine.ml URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/bindings/ocaml/executionengine/llvm_executionengine.ml?rev=97610&r1=97609&r2=97610&view=diff ============================================================================== --- llvm/trunk/bindings/ocaml/executionengine/llvm_executionengine.ml (original) +++ llvm/trunk/bindings/ocaml/executionengine/llvm_executionengine.ml Tue Mar 2 17:59:03 2010 @@ -60,10 +60,8 @@ = "llvm_ee_create" external create_interpreter: Llvm.llmodule -> t = "llvm_ee_create_interpreter" - external create_jit: Llvm.llmodule -> t + external create_jit: Llvm.llmodule -> int -> t = "llvm_ee_create_jit" - external create_fast_jit: Llvm.llmodule -> t - = "llvm_ee_create_fast_jit" external dispose: t -> unit = "llvm_ee_dispose" external add_module: Llvm.llmodule -> t -> unit Modified: llvm/trunk/bindings/ocaml/executionengine/llvm_executionengine.mli URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/bindings/ocaml/executionengine/llvm_executionengine.mli?rev=97610&r1=97609&r2=97610&view=diff ============================================================================== --- llvm/trunk/bindings/ocaml/executionengine/llvm_executionengine.mli (original) +++ llvm/trunk/bindings/ocaml/executionengine/llvm_executionengine.mli Tue Mar 2 17:59:03 2010 @@ -99,22 +99,13 @@ See the function [llvm::EngineBuilder::create]. *) val create_interpreter: Llvm.llmodule -> t - (** [create_jit m] creates a new JIT (just-in-time compiler), taking - ownership of the module [m] if successful. This function creates a JIT - which favors code quality over compilation speed. Raises [Error msg] if an - error occurrs. The execution engine is not garbage collected and must be - destroyed with [dispose ee]. + (** [create_jit m optlevel] creates a new JIT (just-in-time compiler), taking + ownership of the module [m] if successful with the desired optimization + level [optlevel]. Raises [Error msg] if an error occurrs. The execution + engine is not garbage collected and must be destroyed with [dispose ee]. See the function [llvm::EngineBuilder::create]. *) - val create_jit: Llvm.llmodule -> t - - (** [create_fast_jit m] creates a new JIT (just-in-time compiler) which - favors compilation speed over code quality. It takes ownership of the - module [m] if successful. Raises [Error msg] if an error occurrs. The - execution engine is not garbage collected and must be destroyed with - [dispose ee]. - See the function [llvm::EngineBuilder::create]. *) - val create_fast_jit: Llvm.llmodule -> t - + val create_jit : Llvm.llmodule -> int -> t + (** [dispose ee] releases the memory used by the execution engine and must be invoked to avoid memory leaks. *) val dispose: t -> unit From idadesub at users.sourceforge.net Tue Mar 2 17:59:05 2010 From: idadesub at users.sourceforge.net (Erick Tryzelaar) Date: Tue, 02 Mar 2010 23:59:05 -0000 Subject: [llvm-commits] [llvm] r97611 - /llvm/trunk/bindings/ocaml/llvm/llvm.mli Message-ID: <20100302235905.F3A032A6C12E@llvm.org> Author: erickt Date: Tue Mar 2 17:59:05 2010 New Revision: 97611 URL: http://llvm.org/viewvc/llvm-project?rev=97611&view=rev Log: Don't use an ocaml keyword in an ocamldoc comment. Modified: llvm/trunk/bindings/ocaml/llvm/llvm.mli Modified: llvm/trunk/bindings/ocaml/llvm/llvm.mli URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/bindings/ocaml/llvm/llvm.mli?rev=97611&r1=97610&r2=97611&view=diff ============================================================================== --- llvm/trunk/bindings/ocaml/llvm/llvm.mli (original) +++ llvm/trunk/bindings/ocaml/llvm/llvm.mli Tue Mar 2 17:59:05 2010 @@ -1067,10 +1067,11 @@ external declare_global : lltype -> string -> llmodule -> llvalue = "llvm_declare_global" -(** [declare_qualified_global ty name as m] returns a new global variable of - type [ty] and with name [name] in module [m] in the address space [as]. If - such a global variable already exists, it is returned. If the type of the - existing global differs, then a bitcast to [ty] is returned. *) +(** [declare_qualified_global ty name addrspace m] returns a new global variable + of type [ty] and with name [name] in module [m] in the address space + [addrspace]. If such a global variable already exists, it is returned. If + the type of the existing global differs, then a bitcast to [ty] is + returned. *) external declare_qualified_global : lltype -> string -> int -> llmodule -> llvalue = "llvm_declare_qualified_global" @@ -1082,9 +1083,9 @@ external define_global : string -> llvalue -> llmodule -> llvalue = "llvm_define_global" -(** [define_qualified_global name init as m] returns a new global with name - [name] and initializer [init] in module [m] in the address space [as]. If - the named global already exists, it is renamed. +(** [define_qualified_global name init addrspace m] returns a new global with + name [name] and initializer [init] in module [m] in the address space + [addrspace]. If the named global already exists, it is renamed. See the constructor of [llvm::GlobalVariable]. *) external define_qualified_global : string -> llvalue -> int -> llmodule -> llvalue From idadesub at users.sourceforge.net Tue Mar 2 17:59:08 2010 From: idadesub at users.sourceforge.net (Erick Tryzelaar) Date: Tue, 02 Mar 2010 23:59:08 -0000 Subject: [llvm-commits] [llvm] r97612 - /llvm/trunk/bindings/ocaml/executionengine/executionengine_ocaml.c Message-ID: <20100302235908.660632A6C12D@llvm.org> Author: erickt Date: Tue Mar 2 17:59:08 2010 New Revision: 97612 URL: http://llvm.org/viewvc/llvm-project?rev=97612&view=rev Log: Use the ocaml tag 0 since we are just returning an option value. Modified: llvm/trunk/bindings/ocaml/executionengine/executionengine_ocaml.c Modified: llvm/trunk/bindings/ocaml/executionengine/executionengine_ocaml.c URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/bindings/ocaml/executionengine/executionengine_ocaml.c?rev=97612&r1=97611&r2=97612&view=diff ============================================================================== --- llvm/trunk/bindings/ocaml/executionengine/executionengine_ocaml.c (original) +++ llvm/trunk/bindings/ocaml/executionengine/executionengine_ocaml.c Tue Mar 2 17:59:08 2010 @@ -226,7 +226,7 @@ LLVMValueRef Found; if (LLVMFindFunction(EE, String_val(Name), &Found)) CAMLreturn(Val_unit); - Option = alloc(1, 1); + Option = alloc(1, 0); Field(Option, 0) = Val_op(Found); CAMLreturn(Option); } From johnny.chen at apple.com Tue Mar 2 18:16:29 2010 From: johnny.chen at apple.com (Johnny Chen) Date: Wed, 03 Mar 2010 00:16:29 -0000 Subject: [llvm-commits] [llvm] r97614 - /llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td Message-ID: <20100303001629.1B4982A6C12C@llvm.org> Author: johnny Date: Tue Mar 2 18:16:28 2010 New Revision: 97614 URL: http://llvm.org/viewvc/llvm-project?rev=97614&view=rev Log: Added 32-bit Thumb instructions t2DMB variants, t2DSB variants, and t2ISBsy for disassembly only. Modified: llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td Modified: llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td?rev=97614&r1=97613&r2=97614&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td (original) +++ llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td Tue Mar 2 18:16:28 2010 @@ -2032,6 +2032,66 @@ } } +// Helper class for multiclass T2MemB -- for disassembly only +class T2I_memb + : T2I<(outs), (ins), NoItinerary, opc, asm, + [/* For disassembly only; pattern left blank */]>, + Requires<[IsThumb2, HasV7]> { + let Inst{31-20} = 0xf3b; + let Inst{15-14} = 0b10; + let Inst{12} = 0; +} + +multiclass T2MemB op7_4, string opc> { + + def st : T2I_memb { + let Inst{7-4} = op7_4; + let Inst{3-0} = 0b1110; + } + + def ish : T2I_memb { + let Inst{7-4} = op7_4; + let Inst{3-0} = 0b1011; + } + + def ishst : T2I_memb { + let Inst{7-4} = op7_4; + let Inst{3-0} = 0b1010; + } + + def nsh : T2I_memb { + let Inst{7-4} = op7_4; + let Inst{3-0} = 0b0111; + } + + def nshst : T2I_memb { + let Inst{7-4} = op7_4; + let Inst{3-0} = 0b0110; + } + + def osh : T2I_memb { + let Inst{7-4} = op7_4; + let Inst{3-0} = 0b0011; + } + + def oshst : T2I_memb { + let Inst{7-4} = op7_4; + let Inst{3-0} = 0b0010; + } +} + +// These DMB variants are for disassembly only. +defm t2DMB : T2MemB<0b0101, "dmb">; + +// These DSB variants are for disassembly only. +defm t2DSB : T2MemB<0b0100, "dsb">; + +// ISB has only full system option -- for disassembly only +def t2ISBsy : T2I_memb<"isb", ""> { + let Inst{7-4} = 0b0110; + let Inst{3-0} = 0b1111; +} + class T2I_ldrex opcod, dag oops, dag iops, AddrMode am, SizeFlagVal sz, InstrItinClass itin, string opc, string asm, string cstr, list pattern, bits<4> rt2 = 0b1111> From isanbard at gmail.com Tue Mar 2 18:35:57 2010 From: isanbard at gmail.com (Bill Wendling) Date: Wed, 03 Mar 2010 00:35:57 -0000 Subject: [llvm-commits] [llvm] r97616 - in /llvm/trunk: lib/CodeGen/SelectionDAG/DAGCombiner.cpp lib/Transforms/InstCombine/InstCombineAndOrXor.cpp test/CodeGen/X86/and-or-fold.ll test/Transforms/InstCombine/xor2.ll Message-ID: <20100303003557.21AB42A6C12C@llvm.org> Author: void Date: Tue Mar 2 18:35:56 2010 New Revision: 97616 URL: http://llvm.org/viewvc/llvm-project?rev=97616&view=rev Log: This test case: long test(long x) { return (x & 123124) | 3; } Currently compiles to: _test: orl $3, %edi movq %rdi, %rax andq $123127, %rax ret This is because instruction and DAG combiners canonicalize (or (and x, C), D) -> (and (or, D), (C | D)) However, this is only profitable if (C & D) != 0. It gets in the way of the 3-addressification because the input bits are known to be zero. Modified: llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp llvm/trunk/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp llvm/trunk/test/CodeGen/X86/and-or-fold.ll llvm/trunk/test/Transforms/InstCombine/xor2.ll Modified: llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp?rev=97616&r1=97615&r2=97616&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Tue Mar 2 18:35:56 2010 @@ -1786,7 +1786,7 @@ SDValue RAND = ReassociateOps(ISD::AND, N->getDebugLoc(), N0, N1); if (RAND.getNode() != 0) return RAND; - // fold (and (or x, 0xFFFF), 0xFF) -> 0xFF + // fold (and (or x, C), D) -> D if (C & D) == D if (N1C && N0.getOpcode() == ISD::OR) if (ConstantSDNode *ORI = dyn_cast(N0.getOperand(1))) if ((ORI->getAPIntValue() & N1C->getAPIntValue()) == N1C->getAPIntValue()) @@ -2025,13 +2025,15 @@ if (ROR.getNode() != 0) return ROR; // Canonicalize (or (and X, c1), c2) -> (and (or X, c2), c1|c2) + // iff (c1 & c2) == 0. if (N1C && N0.getOpcode() == ISD::AND && N0.getNode()->hasOneUse() && isa(N0.getOperand(1))) { ConstantSDNode *C1 = cast(N0.getOperand(1)); - return DAG.getNode(ISD::AND, N->getDebugLoc(), VT, - DAG.getNode(ISD::OR, N0.getDebugLoc(), VT, - N0.getOperand(0), N1), - DAG.FoldConstantArithmetic(ISD::OR, VT, N1C, C1)); + if ((C1->getZExtValue() & N1C->getZExtValue()) != 0) + return DAG.getNode(ISD::AND, N->getDebugLoc(), VT, + DAG.getNode(ISD::OR, N0.getDebugLoc(), VT, + N0.getOperand(0), N1), + DAG.FoldConstantArithmetic(ISD::OR, VT, N1C, C1)); } // fold (or (setcc x), (setcc y)) -> (setcc (or x, y)) if (isSetCCEquivalent(N0, LL, LR, CC0) && isSetCCEquivalent(N1, RL, RR, CC1)){ Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp?rev=97616&r1=97615&r2=97616&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp (original) +++ llvm/trunk/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp Tue Mar 2 18:35:56 2010 @@ -1464,8 +1464,7 @@ if (Value *V = SimplifyOrInst(Op0, Op1, TD)) return ReplaceInstUsesWith(I, V); - - + // See if we can simplify any instructions used by the instruction whose sole // purpose is to compute bits we don't care about. if (SimplifyDemandedInstructionBits(I)) @@ -1474,7 +1473,9 @@ if (ConstantInt *RHS = dyn_cast(Op1)) { ConstantInt *C1 = 0; Value *X = 0; // (X & C1) | C2 --> (X | C2) & (C1|C2) + // iff (C1 & C2) == 0. if (match(Op0, m_And(m_Value(X), m_ConstantInt(C1))) && + (RHS->getValue() & C1->getValue()) != 0 && Op0->hasOneUse()) { Value *Or = Builder->CreateOr(X, RHS); Or->takeName(Op0); @@ -1497,6 +1498,7 @@ if (SelectInst *SI = dyn_cast(Op0)) if (Instruction *R = FoldOpIntoSelect(I, SI)) return R; + if (isa(Op0)) if (Instruction *NV = FoldOpIntoPhi(I)) return NV; Modified: llvm/trunk/test/CodeGen/X86/and-or-fold.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/and-or-fold.ll?rev=97616&r1=97615&r2=97616&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/and-or-fold.ll (original) +++ llvm/trunk/test/CodeGen/X86/and-or-fold.ll Tue Mar 2 18:35:56 2010 @@ -1,14 +1,26 @@ -; RUN: llc < %s -march=x86 | grep and | count 1 +; RUN: llc < %s -mtriple=i686-apple-darwin | FileCheck -check-prefix=DARWIN %s +; RUN: opt < %s -O2 | llc -mtriple=x86_64-apple-darwin | FileCheck -check-prefix=DARWIN-OPT %s ; The dag combiner should fold together (x&127)|(y&16711680) -> (x|y)&c1 ; in this case. -define i32 @test6(i32 %x, i16 %y) { - %tmp1 = zext i16 %y to i32 ; [#uses=1] - %tmp2 = and i32 %tmp1, 127 ; [#uses=1] - %tmp4 = shl i32 %x, 16 ; [#uses=1] - %tmp5 = and i32 %tmp4, 16711680 ; [#uses=1] - %tmp6 = or i32 %tmp2, %tmp5 ; [#uses=1] - ret i32 %tmp6 +define i32 @test1(i32 %x, i16 %y) { + %tmp1 = zext i16 %y to i32 + %tmp2 = and i32 %tmp1, 127 + %tmp4 = shl i32 %x, 16 + %tmp5 = and i32 %tmp4, 16711680 + %tmp6 = or i32 %tmp2, %tmp5 + ret i32 %tmp6 +; DARWIN: andl $16711807, %eax } +; The optimizer shouldn't fold this into (and (or, C), D) +; if (C & D) == 0 +define i64 @test2(i64 %x) nounwind readnone ssp { +entry: + %tmp1 = and i64 %x, 123127 + %tmp2 = or i64 %tmp1, 3 + ret i64 %tmp2 +; DARWIN-OPT: andq $123124 +; DARWIN-OPT-NEXT: leaq 3 +} Modified: llvm/trunk/test/Transforms/InstCombine/xor2.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/xor2.ll?rev=97616&r1=97615&r2=97616&view=diff ============================================================================== --- llvm/trunk/test/Transforms/InstCombine/xor2.ll (original) +++ llvm/trunk/test/Transforms/InstCombine/xor2.ll Tue Mar 2 18:35:56 2010 @@ -22,8 +22,8 @@ ; PR1014 define i32 @test2(i32 %tmp1) { ; CHECK: @test2 -; CHECK-NEXT: or i32 %tmp1, 8 -; CHECK-NEXT: and i32 +; CHECK-NEXT: and i32 %tmp1, 32 +; CHECK-NEXT: or i32 %ovm, 8 ; CHECK-NEXT: ret i32 %ovm = and i32 %tmp1, 32 %ov3 = add i32 %ovm, 145 @@ -33,8 +33,8 @@ define i32 @test3(i32 %tmp1) { ; CHECK: @test3 -; CHECK-NEXT: or i32 %tmp1, 8 -; CHECK-NEXT: and i32 +; CHECK-NEXT: and i32 %tmp1, 32 +; CHECK-NEXT: or i32 %tmp, 8 ; CHECK-NEXT: ret i32 %ovm = or i32 %tmp1, 145 %ov31 = and i32 %ovm, 177 From evan.cheng at apple.com Tue Mar 2 18:43:15 2010 From: evan.cheng at apple.com (Evan Cheng) Date: Wed, 03 Mar 2010 00:43:15 -0000 Subject: [llvm-commits] [llvm] r97617 - /llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td Message-ID: <20100303004315.33A172A6C12C@llvm.org> Author: evancheng Date: Tue Mar 2 18:43:15 2010 New Revision: 97617 URL: http://llvm.org/viewvc/llvm-project?rev=97617&view=rev Log: Eliminate unused instruction classes. Modified: llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td Modified: llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td?rev=97617&r1=97616&r2=97617&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td (original) +++ llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td Tue Mar 2 18:43:15 2010 @@ -630,19 +630,6 @@ } } -/// T2I_picld - Defines the PIC load pattern. -class T2I_picld : - T2I<(outs GPR:$dst), (ins addrmodepc:$addr), IIC_iLoadi, - !strconcat("\n${addr:label}:\n\t", opc), "\t$dst, $addr", - [(set GPR:$dst, (opnode addrmodepc:$addr))]>; - -/// T2I_picst - Defines the PIC store pattern. -class T2I_picst : - T2I<(outs), (ins GPR:$src, addrmodepc:$addr), IIC_iStorer, - !strconcat("\n${addr:label}:\n\t", opc), "\t$src, $addr", - [(opnode GPR:$src, addrmodepc:$addr)]>; - - /// T2I_unary_rrot - A unary operation with two forms: one whose operand is a /// register and one whose operand is a register rotated by 8/16/24. multiclass T2I_unary_rrot opcod, string opc, PatFrag opnode> { From isanbard at gmail.com Tue Mar 2 19:13:55 2010 From: isanbard at gmail.com (Bill Wendling) Date: Wed, 03 Mar 2010 01:13:55 -0000 Subject: [llvm-commits] [llvm] r97623 - /llvm/trunk/utils/buildit/GNUmakefile Message-ID: <20100303011355.79ACD2A6C12C@llvm.org> Author: void Date: Tue Mar 2 19:13:55 2010 New Revision: 97623 URL: http://llvm.org/viewvc/llvm-project?rev=97623&view=rev Log: Don't turn assertions on by default. Modified: llvm/trunk/utils/buildit/GNUmakefile Modified: llvm/trunk/utils/buildit/GNUmakefile URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/buildit/GNUmakefile?rev=97623&r1=97622&r2=97623&view=diff ============================================================================== --- llvm/trunk/utils/buildit/GNUmakefile (original) +++ llvm/trunk/utils/buildit/GNUmakefile Tue Mar 2 19:13:55 2010 @@ -36,7 +36,7 @@ # Unless assertions are forced on in the GMAKE command line, enable them. ifndef ENABLE_ASSERTIONS -ENABLE_ASSERTIONS := yes +ENABLE_ASSERTIONS := no endif # Default is optimized build. From evan.cheng at apple.com Tue Mar 2 19:37:50 2010 From: evan.cheng at apple.com (Evan Cheng) Date: Wed, 03 Mar 2010 01:37:50 -0000 Subject: [llvm-commits] [llvm] r97626 - /llvm/trunk/include/llvm/CodeGen/MachineOperand.h Message-ID: <20100303013750.8E4492A6C12C@llvm.org> Author: evancheng Date: Tue Mar 2 19:37:50 2010 New Revision: 97626 URL: http://llvm.org/viewvc/llvm-project?rev=97626&view=rev Log: Ordering forward declarations. Modified: llvm/trunk/include/llvm/CodeGen/MachineOperand.h Modified: llvm/trunk/include/llvm/CodeGen/MachineOperand.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineOperand.h?rev=97626&r1=97625&r2=97626&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/MachineOperand.h (original) +++ llvm/trunk/include/llvm/CodeGen/MachineOperand.h Tue Mar 2 19:37:50 2010 @@ -19,14 +19,14 @@ namespace llvm { -class ConstantFP; class BlockAddress; -class MachineBasicBlock; +class ConstantFP; class GlobalValue; +class MachineBasicBlock; class MachineInstr; -class TargetMachine; class MachineRegisterInfo; class MDNode; +class TargetMachine; class raw_ostream; /// MachineOperand class - Representation of each machine instruction operand. From evan.cheng at apple.com Tue Mar 2 19:38:36 2010 From: evan.cheng at apple.com (Evan Cheng) Date: Wed, 03 Mar 2010 01:38:36 -0000 Subject: [llvm-commits] [llvm] r97627 - /llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp Message-ID: <20100303013836.13F722A6C12C@llvm.org> Author: evancheng Date: Tue Mar 2 19:38:35 2010 New Revision: 97627 URL: http://llvm.org/viewvc/llvm-project?rev=97627&view=rev Log: Add an option to enable machine cse (it's not doing anything yet. Modified: llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp Modified: llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp?rev=97627&r1=97626&r2=97627&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp (original) +++ llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp Tue Mar 2 19:38:35 2010 @@ -67,6 +67,9 @@ cl::desc("Verify generated machine code"), cl::init(getenv("LLVM_VERIFY_MACHINEINSTRS")!=NULL)); +static cl::opt EnableMachineCSE("machine-cse", cl::Hidden, + cl::desc("Enable Machine CSE")); + static cl::opt AsmVerbose("asm-verbose", cl::desc("Add comments to directives."), cl::init(cl::BOU_UNSET)); @@ -317,6 +320,8 @@ if (OptLevel != CodeGenOpt::None) { PM.add(createOptimizeExtsPass()); + if (EnableMachineCSE) + PM.add(createMachineCSEPass()); if (!DisableMachineLICM) PM.add(createMachineLICMPass()); if (!DisableMachineSink) From eli.friedman at gmail.com Tue Mar 2 19:43:17 2010 From: eli.friedman at gmail.com (Eli Friedman) Date: Tue, 2 Mar 2010 17:43:17 -0800 Subject: [llvm-commits] [llvm] r97616 - in /llvm/trunk: lib/CodeGen/SelectionDAG/DAGCombiner.cpp lib/Transforms/InstCombine/InstCombineAndOrXor.cpp test/CodeGen/X86/and-or-fold.ll test/Transforms/InstCombine/xor2.ll In-Reply-To: <20100303003557.21AB42A6C12C@llvm.org> References: <20100303003557.21AB42A6C12C@llvm.org> Message-ID: On Tue, Mar 2, 2010 at 4:35 PM, Bill Wendling wrote: > Author: void > Date: Tue Mar ?2 18:35:56 2010 > New Revision: 97616 > > URL: http://llvm.org/viewvc/llvm-project?rev=97616&view=rev > Log: > This test case: > > long test(long x) { return (x & 123124) | 3; } > > Currently compiles to: > > _test: > ? ? ? ?orl ? ? $3, %edi > ? ? ? ?movq ? ?%rdi, %rax > ? ? ? ?andq ? ?$123127, %rax > ? ? ? ?ret > > This is because instruction and DAG combiners canonicalize > > ?(or (and x, C), D) -> (and (or, D), (C | D)) > > However, this is only profitable if (C & D) != 0. It gets in the way of the > 3-addressification because the input bits are known to be zero. To encourage canonicalization, we should transform either ((x&C)|D)->((x|D)&(C|D)), or ((x|C)&D) -> ((X&D)|(C&D)). If it appears the form with the or on the outside is better, we should use it unconditionally. -Eli From evan.cheng at apple.com Tue Mar 2 19:44:33 2010 From: evan.cheng at apple.com (Evan Cheng) Date: Wed, 03 Mar 2010 01:44:33 -0000 Subject: [llvm-commits] [llvm] r97628 - in /llvm/trunk: include/llvm/CodeGen/MachineInstr.h include/llvm/Target/TargetInstrInfo.h lib/CodeGen/MachineInstr.cpp lib/CodeGen/MachineLICM.cpp lib/CodeGen/TargetInstrInfoImpl.cpp lib/Target/ARM/ARMBaseInstrInfo.cpp lib/Target/ARM/ARMBaseInstrInfo.h Message-ID: <20100303014433.DC4BE2A6C12C@llvm.org> Author: evancheng Date: Tue Mar 2 19:44:33 2010 New Revision: 97628 URL: http://llvm.org/viewvc/llvm-project?rev=97628&view=rev Log: - Change MachineInstr::isIdenticalTo to take a new option that determines whether it should skip checking defs or at least virtual register defs. This subsumes part of the TargetInstrInfo::isIdentical functionality. - Eliminate TargetInstrInfo::isIdentical and replace it with produceSameValue. In the default case, produceSameValue just checks whether two machine instructions are identical (except for virtual register defs). But targets may override it to check for unusual cases (e.g. ARM pic loads from constant pools). Modified: llvm/trunk/include/llvm/CodeGen/MachineInstr.h llvm/trunk/include/llvm/Target/TargetInstrInfo.h llvm/trunk/lib/CodeGen/MachineInstr.cpp llvm/trunk/lib/CodeGen/MachineLICM.cpp llvm/trunk/lib/CodeGen/TargetInstrInfoImpl.cpp llvm/trunk/lib/Target/ARM/ARMBaseInstrInfo.cpp llvm/trunk/lib/Target/ARM/ARMBaseInstrInfo.h Modified: llvm/trunk/include/llvm/CodeGen/MachineInstr.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineInstr.h?rev=97628&r1=97627&r2=97628&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/MachineInstr.h (original) +++ llvm/trunk/include/llvm/CodeGen/MachineInstr.h Tue Mar 2 19:44:33 2010 @@ -179,17 +179,16 @@ return MemRefsEnd - MemRefs == 1; } + enum MICheckType { + CheckDefs, // Check all operands for equality + IgnoreDefs, // Ignore all definitions + IgnoreVRegDefs // Ignore virtual register definitions + }; + /// isIdenticalTo - Return true if this instruction is identical to (same /// opcode and same operands as) the specified instruction. - bool isIdenticalTo(const MachineInstr *Other) const { - if (Other->getOpcode() != getOpcode() || - Other->getNumOperands() != getNumOperands()) - return false; - for (unsigned i = 0, e = getNumOperands(); i != e; ++i) - if (!getOperand(i).isIdenticalTo(Other->getOperand(i))) - return false; - return true; - } + bool isIdenticalTo(const MachineInstr *Other, + MICheckType Check = CheckDefs) const; /// removeFromParent - This method unlinks 'this' from the containing basic /// block, and returns it, but does not delete it. Modified: llvm/trunk/include/llvm/Target/TargetInstrInfo.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetInstrInfo.h?rev=97628&r1=97627&r2=97628&view=diff ============================================================================== --- llvm/trunk/include/llvm/Target/TargetInstrInfo.h (original) +++ llvm/trunk/include/llvm/Target/TargetInstrInfo.h Tue Mar 2 19:44:33 2010 @@ -19,14 +19,14 @@ namespace llvm { -class MCAsmInfo; -class TargetRegisterClass; -class TargetRegisterInfo; -class LiveVariables; class CalleeSavedInfo; +class LiveVariables; +class MCAsmInfo; +class MachineMemOperand; class SDNode; class SelectionDAG; -class MachineMemOperand; +class TargetRegisterClass; +class TargetRegisterInfo; template class SmallVectorImpl; @@ -243,13 +243,11 @@ virtual bool findCommutedOpIndices(MachineInstr *MI, unsigned &SrcOpIdx1, unsigned &SrcOpIdx2) const = 0; - /// isIdentical - Return true if two instructions are identical. This differs - /// from MachineInstr::isIdenticalTo() in that it does not require the - /// virtual destination registers to be the same. This is used by MachineLICM - /// and other MI passes to perform CSE. - virtual bool isIdentical(const MachineInstr *MI, - const MachineInstr *Other, - const MachineRegisterInfo *MRI) const = 0; + /// produceSameValue - Return true if two machine instructions would produce + /// identical values. By default, this is only true when the two instructions + /// are deemed identical except for defs. + virtual bool produceSameValue(const MachineInstr *MI0, + const MachineInstr *MI1) const = 0; /// AnalyzeBranch - Analyze the branching code at the end of MBB, returning /// true if it cannot be understood (e.g. it's a switch dispatch or isn't @@ -560,10 +558,8 @@ const TargetRegisterInfo *TRI) const; virtual MachineInstr *duplicate(MachineInstr *Orig, MachineFunction &MF) const; - virtual bool isIdentical(const MachineInstr *MI, - const MachineInstr *Other, - const MachineRegisterInfo *MRI) const; - + virtual bool produceSameValue(const MachineInstr *MI0, + const MachineInstr *MI1) const; virtual unsigned GetFunctionSizeInBytes(const MachineFunction &MF) const; }; Modified: llvm/trunk/lib/CodeGen/MachineInstr.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineInstr.cpp?rev=97628&r1=97627&r2=97628&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/MachineInstr.cpp (original) +++ llvm/trunk/lib/CodeGen/MachineInstr.cpp Tue Mar 2 19:44:33 2010 @@ -18,6 +18,7 @@ #include "llvm/Type.h" #include "llvm/Value.h" #include "llvm/Assembly/Writer.h" +#include "llvm/CodeGen/MachineConstantPool.h" #include "llvm/CodeGen/MachineFunction.h" #include "llvm/CodeGen/MachineMemOperand.h" #include "llvm/CodeGen/MachineRegisterInfo.h" @@ -701,6 +702,28 @@ MemRefsEnd = NewMemRefsEnd; } +bool MachineInstr::isIdenticalTo(const MachineInstr *Other, + MICheckType Check) const { + if (Other->getOpcode() != getOpcode() || + Other->getNumOperands() != getNumOperands()) + return false; + for (unsigned i = 0, e = getNumOperands(); i != e; ++i) { + const MachineOperand &MO = getOperand(i); + const MachineOperand &OMO = Other->getOperand(i); + if (Check != CheckDefs && MO.isReg() && MO.isDef()) { + if (Check == IgnoreDefs) + continue; + // Check == IgnoreVRegDefs + if (TargetRegisterInfo::isPhysicalRegister(MO.getReg()) || + TargetRegisterInfo::isPhysicalRegister(OMO.getReg())) + if (MO.getReg() != OMO.getReg()) + return false; + } else if (!MO.isIdenticalTo(OMO)) + return false; + } + return true; +} + /// removeFromParent - This method unlinks 'this' from the containing basic /// block, and returns it, but does not delete it. MachineInstr *MachineInstr::removeFromParent() { Modified: llvm/trunk/lib/CodeGen/MachineLICM.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineLICM.cpp?rev=97628&r1=97627&r2=97628&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/MachineLICM.cpp (original) +++ llvm/trunk/lib/CodeGen/MachineLICM.cpp Tue Mar 2 19:44:33 2010 @@ -445,7 +445,7 @@ std::vector &PrevMIs) { for (unsigned i = 0, e = PrevMIs.size(); i != e; ++i) { const MachineInstr *PrevMI = PrevMIs[i]; - if (TII->isIdentical(MI, PrevMI, RegInfo)) + if (TII->produceSameValue(MI, PrevMI)) return PrevMI; } return 0; Modified: llvm/trunk/lib/CodeGen/TargetInstrInfoImpl.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/TargetInstrInfoImpl.cpp?rev=97628&r1=97627&r2=97628&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/TargetInstrInfoImpl.cpp (original) +++ llvm/trunk/lib/CodeGen/TargetInstrInfoImpl.cpp Tue Mar 2 19:44:33 2010 @@ -150,6 +150,11 @@ MBB.insert(I, MI); } +bool TargetInstrInfoImpl::produceSameValue(const MachineInstr *MI0, + const MachineInstr *MI1) const { + return MI0->isIdenticalTo(MI1, MachineInstr::IgnoreVRegDefs); +} + MachineInstr *TargetInstrInfoImpl::duplicate(MachineInstr *Orig, MachineFunction &MF) const { assert(!Orig->getDesc().isNotDuplicable() && @@ -157,37 +162,6 @@ return MF.CloneMachineInstr(Orig); } -bool -TargetInstrInfoImpl::isIdentical(const MachineInstr *MI, - const MachineInstr *Other, - const MachineRegisterInfo *MRI) const { - if (MI->getOpcode() != Other->getOpcode() || - MI->getNumOperands() != Other->getNumOperands()) - return false; - - for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) { - const MachineOperand &MO = MI->getOperand(i); - const MachineOperand &OMO = Other->getOperand(i); - if (MO.isReg() && MO.isDef()) { - assert(OMO.isReg() && OMO.isDef()); - unsigned Reg = MO.getReg(); - if (TargetRegisterInfo::isPhysicalRegister(Reg)) { - if (Reg != OMO.getReg()) - return false; - } else if (MRI->getRegClass(MO.getReg()) != - MRI->getRegClass(OMO.getReg())) - return false; - - continue; - } - - if (!MO.isIdenticalTo(OMO)) - return false; - } - - return true; -} - unsigned TargetInstrInfoImpl::GetFunctionSizeInBytes(const MachineFunction &MF) const { unsigned FnSize = 0; Modified: llvm/trunk/lib/Target/ARM/ARMBaseInstrInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMBaseInstrInfo.cpp?rev=97628&r1=97627&r2=97628&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMBaseInstrInfo.cpp (original) +++ llvm/trunk/lib/Target/ARM/ARMBaseInstrInfo.cpp Tue Mar 2 19:44:33 2010 @@ -1037,9 +1037,8 @@ return MI; } -bool ARMBaseInstrInfo::isIdentical(const MachineInstr *MI0, - const MachineInstr *MI1, - const MachineRegisterInfo *MRI) const { +bool ARMBaseInstrInfo::produceSameValue(const MachineInstr *MI0, + const MachineInstr *MI1) const { int Opcode = MI0->getOpcode(); if (Opcode == ARM::t2LDRpci || Opcode == ARM::t2LDRpci_pic || @@ -1068,7 +1067,7 @@ return ACPV0->hasSameValue(ACPV1); } - return TargetInstrInfoImpl::isIdentical(MI0, MI1, MRI); + return MI0->isIdenticalTo(MI1, MachineInstr::IgnoreVRegDefs); } /// getInstrPredicate - If instruction is predicated, returns its predicate Modified: llvm/trunk/lib/Target/ARM/ARMBaseInstrInfo.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMBaseInstrInfo.h?rev=97628&r1=97627&r2=97628&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMBaseInstrInfo.h (original) +++ llvm/trunk/lib/Target/ARM/ARMBaseInstrInfo.h Tue Mar 2 19:44:33 2010 @@ -289,8 +289,8 @@ MachineInstr *duplicate(MachineInstr *Orig, MachineFunction &MF) const; - virtual bool isIdentical(const MachineInstr *MI, const MachineInstr *Other, - const MachineRegisterInfo *MRI) const; + virtual bool produceSameValue(const MachineInstr *MI0, + const MachineInstr *MI1) const; }; static inline From sabre at nondot.org Tue Mar 2 19:45:02 2010 From: sabre at nondot.org (Chris Lattner) Date: Wed, 03 Mar 2010 01:45:02 -0000 Subject: [llvm-commits] [llvm] r97629 - in /llvm/trunk/lib/Target/X86: X86ISelDAGToDAG.cpp X86Instr64bit.td X86InstrInfo.td Message-ID: <20100303014502.2DEF42A6C12C@llvm.org> Author: lattner Date: Tue Mar 2 19:45:01 2010 New Revision: 97629 URL: http://llvm.org/viewvc/llvm-project?rev=97629&view=rev Log: factor the 'sign extended from 8 bit' patterns better so that they are not destination type specific. This allows tblgen to factor them and the type check is redundant with what the isel does anyway. Modified: llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp llvm/trunk/lib/Target/X86/X86Instr64bit.td llvm/trunk/lib/Target/X86/X86InstrInfo.td Modified: llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp?rev=97629&r1=97628&r2=97629&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp (original) +++ llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp Tue Mar 2 19:45:01 2010 @@ -1361,7 +1361,7 @@ Opc = X86::LOCK_DEC16m; else if (isSub) { if (isCN) { - if (Predicate_i16immSExt8(Val.getNode())) + if (Predicate_immSext8(Val.getNode())) Opc = X86::LOCK_SUB16mi8; else Opc = X86::LOCK_SUB16mi; @@ -1369,7 +1369,7 @@ Opc = X86::LOCK_SUB16mr; } else { if (isCN) { - if (Predicate_i16immSExt8(Val.getNode())) + if (Predicate_immSext8(Val.getNode())) Opc = X86::LOCK_ADD16mi8; else Opc = X86::LOCK_ADD16mi; @@ -1384,7 +1384,7 @@ Opc = X86::LOCK_DEC32m; else if (isSub) { if (isCN) { - if (Predicate_i32immSExt8(Val.getNode())) + if (Predicate_immSext8(Val.getNode())) Opc = X86::LOCK_SUB32mi8; else Opc = X86::LOCK_SUB32mi; @@ -1392,7 +1392,7 @@ Opc = X86::LOCK_SUB32mr; } else { if (isCN) { - if (Predicate_i32immSExt8(Val.getNode())) + if (Predicate_immSext8(Val.getNode())) Opc = X86::LOCK_ADD32mi8; else Opc = X86::LOCK_ADD32mi; @@ -1408,7 +1408,7 @@ else if (isSub) { Opc = X86::LOCK_SUB64mr; if (isCN) { - if (Predicate_i64immSExt8(Val.getNode())) + if (Predicate_immSext8(Val.getNode())) Opc = X86::LOCK_SUB64mi8; else if (Predicate_i64immSExt32(Val.getNode())) Opc = X86::LOCK_SUB64mi32; @@ -1416,7 +1416,7 @@ } else { Opc = X86::LOCK_ADD64mr; if (isCN) { - if (Predicate_i64immSExt8(Val.getNode())) + if (Predicate_immSext8(Val.getNode())) Opc = X86::LOCK_ADD64mi8; else if (Predicate_i64immSExt32(Val.getNode())) Opc = X86::LOCK_ADD64mi32; Modified: llvm/trunk/lib/Target/X86/X86Instr64bit.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86Instr64bit.td?rev=97629&r1=97628&r2=97629&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86Instr64bit.td (original) +++ llvm/trunk/lib/Target/X86/X86Instr64bit.td Tue Mar 2 19:45:01 2010 @@ -59,11 +59,7 @@ // Pattern fragments. // -def i64immSExt8 : PatLeaf<(i64 imm), [{ - // i64immSExt8 predicate - True if the 64-bit immediate fits in a 8-bit - // sign extended field. - return (int64_t)N->getZExtValue() == (int8_t)N->getZExtValue(); -}]>; +def i64immSExt8 : PatLeaf<(i64 immSext8)>; def GetLo32XForm : SDNodeXForm; // alt. COND_PE def X86_COND_S : PatLeaf<(i8 15)>; -def i16immSExt8 : PatLeaf<(i16 imm), [{ - // i16immSExt8 predicate - True if the 16-bit immediate fits in a 8-bit - // sign extended field. - return (int16_t)N->getZExtValue() == (int8_t)N->getZExtValue(); +def immSext8 : PatLeaf<(imm), [{ + return N->getSExtValue() == (int8_t)N->getSExtValue(); }]>; -def i32immSExt8 : PatLeaf<(i32 imm), [{ - // i32immSExt8 predicate - True if the 32-bit immediate fits in a 8-bit - // sign extended field. - return (int32_t)N->getZExtValue() == (int8_t)N->getZExtValue(); -}]>; +def i16immSExt8 : PatLeaf<(i16 immSext8)>; +def i32immSExt8 : PatLeaf<(i32 immSext8)>; // Helper fragments for loads. // It's always safe to treat a anyext i16 load as a i32 load if the i16 is From sabre at nondot.org Tue Mar 2 19:52:59 2010 From: sabre at nondot.org (Chris Lattner) Date: Wed, 03 Mar 2010 01:52:59 -0000 Subject: [llvm-commits] [llvm] r97630 - /llvm/trunk/lib/Target/X86/X86InstrInfo.td Message-ID: <20100303015259.D06B12A6C12C@llvm.org> Author: lattner Date: Tue Mar 2 19:52:59 2010 New Revision: 97630 URL: http://llvm.org/viewvc/llvm-project?rev=97630&view=rev Log: factor the 'in the default address space' check out to a single 'dsload' pattern. tblgen doesn't check patterns to see if they're textually identical. This allows better factoring. Modified: llvm/trunk/lib/Target/X86/X86InstrInfo.td Modified: llvm/trunk/lib/Target/X86/X86InstrInfo.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrInfo.td?rev=97630&r1=97629&r2=97630&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86InstrInfo.td (original) +++ llvm/trunk/lib/Target/X86/X86InstrInfo.td Tue Mar 2 19:52:59 2010 @@ -350,6 +350,30 @@ def i16immSExt8 : PatLeaf<(i16 immSext8)>; def i32immSExt8 : PatLeaf<(i32 immSext8)>; +/// Load patterns: these constraint the match to the right address space. +def dsload : PatFrag<(ops node:$ptr), (load node:$ptr), [{ + if (const Value *Src = cast(N)->getSrcValue()) + if (const PointerType *PT = dyn_cast(Src->getType())) + if (PT->getAddressSpace() > 255) + return false; + return true; +}]>; + +def gsload : PatFrag<(ops node:$ptr), (load node:$ptr), [{ + if (const Value *Src = cast(N)->getSrcValue()) + if (const PointerType *PT = dyn_cast(Src->getType())) + return PT->getAddressSpace() == 256; + return false; +}]>; + +def fsload : PatFrag<(ops node:$ptr), (load node:$ptr), [{ + if (const Value *Src = cast(N)->getSrcValue()) + if (const PointerType *PT = dyn_cast(Src->getType())) + return PT->getAddressSpace() == 257; + return false; +}]>; + + // Helper fragments for loads. // It's always safe to treat a anyext i16 load as a i32 load if the i16 is // known to be 32-bit aligned or better. Ditto for i8 to i16. @@ -367,8 +391,7 @@ return false; }]>; -def loadi16_anyext : PatFrag<(ops node:$ptr), (i32 (unindexedload node:$ptr)), -[{ +def loadi16_anyext : PatFrag<(ops node:$ptr), (i32 (unindexedload node:$ptr)),[{ LoadSDNode *LD = cast(N); if (const Value *Src = LD->getSrcValue()) if (const PointerType *PT = dyn_cast(Src->getType())) @@ -410,56 +433,12 @@ return false; }]>; -def gsload : PatFrag<(ops node:$ptr), (load node:$ptr), [{ - if (const Value *Src = cast(N)->getSrcValue()) - if (const PointerType *PT = dyn_cast(Src->getType())) - return PT->getAddressSpace() == 256; - return false; -}]>; - -def fsload : PatFrag<(ops node:$ptr), (load node:$ptr), [{ - if (const Value *Src = cast(N)->getSrcValue()) - if (const PointerType *PT = dyn_cast(Src->getType())) - return PT->getAddressSpace() == 257; - return false; -}]>; - -def loadi8 : PatFrag<(ops node:$ptr), (i8 (load node:$ptr)), [{ - if (const Value *Src = cast(N)->getSrcValue()) - if (const PointerType *PT = dyn_cast(Src->getType())) - if (PT->getAddressSpace() > 255) - return false; - return true; -}]>; -def loadi64 : PatFrag<(ops node:$ptr), (i64 (load node:$ptr)), [{ - if (const Value *Src = cast(N)->getSrcValue()) - if (const PointerType *PT = dyn_cast(Src->getType())) - if (PT->getAddressSpace() > 255) - return false; - return true; -}]>; -def loadf32 : PatFrag<(ops node:$ptr), (f32 (load node:$ptr)), [{ - if (const Value *Src = cast(N)->getSrcValue()) - if (const PointerType *PT = dyn_cast(Src->getType())) - if (PT->getAddressSpace() > 255) - return false; - return true; -}]>; -def loadf64 : PatFrag<(ops node:$ptr), (f64 (load node:$ptr)), [{ - if (const Value *Src = cast(N)->getSrcValue()) - if (const PointerType *PT = dyn_cast(Src->getType())) - if (PT->getAddressSpace() > 255) - return false; - return true; -}]>; -def loadf80 : PatFrag<(ops node:$ptr), (f80 (load node:$ptr)), [{ - if (const Value *Src = cast(N)->getSrcValue()) - if (const PointerType *PT = dyn_cast(Src->getType())) - if (PT->getAddressSpace() > 255) - return false; - return true; -}]>; +def loadi8 : PatFrag<(ops node:$ptr), (i8 (dsload node:$ptr))>; +def loadi64 : PatFrag<(ops node:$ptr), (i64 (dsload node:$ptr))>; +def loadf32 : PatFrag<(ops node:$ptr), (f32 (dsload node:$ptr))>; +def loadf64 : PatFrag<(ops node:$ptr), (f64 (dsload node:$ptr))>; +def loadf80 : PatFrag<(ops node:$ptr), (f80 (dsload node:$ptr))>; def sextloadi16i8 : PatFrag<(ops node:$ptr), (i16 (sextloadi8 node:$ptr))>; def sextloadi32i8 : PatFrag<(ops node:$ptr), (i32 (sextloadi8 node:$ptr))>; From isanbard at gmail.com Tue Mar 2 19:58:01 2010 From: isanbard at gmail.com (Bill Wendling) Date: Wed, 03 Mar 2010 01:58:01 -0000 Subject: [llvm-commits] [llvm] r97631 - /llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Message-ID: <20100303015801.BD63A2A6C12C@llvm.org> Author: void Date: Tue Mar 2 19:58:01 2010 New Revision: 97631 URL: http://llvm.org/viewvc/llvm-project?rev=97631&view=rev Log: Use APInt instead of zext value. Modified: llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Modified: llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp?rev=97631&r1=97630&r2=97631&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Tue Mar 2 19:58:01 2010 @@ -2029,7 +2029,7 @@ if (N1C && N0.getOpcode() == ISD::AND && N0.getNode()->hasOneUse() && isa(N0.getOperand(1))) { ConstantSDNode *C1 = cast(N0.getOperand(1)); - if ((C1->getZExtValue() & N1C->getZExtValue()) != 0) + if ((C1->getAPIntValue() & N1C->getAPIntValue()) != 0) return DAG.getNode(ISD::AND, N->getDebugLoc(), VT, DAG.getNode(ISD::OR, N0.getDebugLoc(), VT, N0.getOperand(0), N1), From johnny.chen at apple.com Tue Mar 2 20:09:43 2010 From: johnny.chen at apple.com (Johnny Chen) Date: Wed, 03 Mar 2010 02:09:43 -0000 Subject: [llvm-commits] [llvm] r97632 - /llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td Message-ID: <20100303020943.C5DC72A6C12C@llvm.org> Author: johnny Date: Tue Mar 2 20:09:43 2010 New Revision: 97632 URL: http://llvm.org/viewvc/llvm-project?rev=97632&view=rev Log: Added 32-bit Thumb instructions t2NOP, t2YIELD, t2WFE, t2WFI, t2SEV, and t2DBG for disassembly only. Modified: llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td Modified: llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td?rev=97632&r1=97631&r2=97632&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td (original) +++ llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td Tue Mar 2 20:09:43 2010 @@ -2341,6 +2341,34 @@ let Inst{12} = 0; } +// A6.3.4 Branches and miscellaneous control +// Table A6-14 Change Processor State, and hint instructions +// Helper class for disassembly only. +class T2I_hint op7_0, string opc, string asm> + : T2I<(outs), (ins), NoItinerary, opc, asm, + [/* For disassembly only; pattern left blank */]> { + let Inst{31-20} = 0xf3a; + let Inst{15-14} = 0b10; + let Inst{12} = 0; + let Inst{10-8} = 0b000; + let Inst{7-0} = op7_0; +} + +def t2NOP : T2I_hint<0b00000000, "nop", ".w">; +def t2YIELD : T2I_hint<0b00000001, "yield", ".w">; +def t2WFE : T2I_hint<0b00000010, "wfe", ".w">; +def t2WFI : T2I_hint<0b00000011, "wfi", ".w">; +def t2SEV : T2I_hint<0b00000100, "sev", ".w">; + +def t2DBG : T2I<(outs),(ins i32imm:$opt), NoItinerary, "dbg", "\t$opt", + [/* For disassembly only; pattern left blank */]> { + let Inst{31-20} = 0xf3a; + let Inst{15-14} = 0b10; + let Inst{12} = 0; + let Inst{10-8} = 0b000; + let Inst{7-4} = 0b1111; +} + // Secure Monitor Call is a system instruction -- for disassembly only // Option = Inst{19-16} def t2SMC : T2I<(outs), (ins i32imm:$opt), NoItinerary, "smc", "\t$opt", From sabre at nondot.org Tue Mar 2 20:14:54 2010 From: sabre at nondot.org (Chris Lattner) Date: Wed, 03 Mar 2010 02:14:54 -0000 Subject: [llvm-commits] [llvm] r97633 - /llvm/trunk/lib/Target/X86/X86InstrInfo.td Message-ID: <20100303021454.8CFB12A6C12C@llvm.org> Author: lattner Date: Tue Mar 2 20:14:54 2010 New Revision: 97633 URL: http://llvm.org/viewvc/llvm-project?rev=97633&view=rev Log: remove nvload and two patterns that use it which are better done by dag combine. Modified: llvm/trunk/lib/Target/X86/X86InstrInfo.td Modified: llvm/trunk/lib/Target/X86/X86InstrInfo.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrInfo.td?rev=97633&r1=97632&r2=97633&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86InstrInfo.td (original) +++ llvm/trunk/lib/Target/X86/X86InstrInfo.td Tue Mar 2 20:14:54 2010 @@ -417,23 +417,6 @@ return false; }]>; -def nvloadi32 : PatFrag<(ops node:$ptr), (i32 (unindexedload node:$ptr)), [{ - LoadSDNode *LD = cast(N); - if (const Value *Src = LD->getSrcValue()) - if (const PointerType *PT = dyn_cast(Src->getType())) - if (PT->getAddressSpace() > 255) - return false; - if (LD->isVolatile()) - return false; - ISD::LoadExtType ExtType = LD->getExtensionType(); - if (ExtType == ISD::NON_EXTLOAD) - return true; - if (ExtType == ISD::EXTLOAD) - return LD->getAlignment() >= 4; - return false; -}]>; - - def loadi8 : PatFrag<(ops node:$ptr), (i8 (dsload node:$ptr))>; def loadi64 : PatFrag<(ops node:$ptr), (i64 (dsload node:$ptr))>; def loadf32 : PatFrag<(ops node:$ptr), (f32 (dsload node:$ptr))>; @@ -4416,12 +4399,6 @@ def : Pat<(i32 (anyext GR8 :$src)), (MOVZX32rr8 GR8 :$src)>; def : Pat<(i32 (anyext GR16:$src)), (MOVZX32rr16 GR16:$src)>; -// (and (i32 load), 255) -> (zextload i8) -def : Pat<(i32 (and (nvloadi32 addr:$src), (i32 255))), - (MOVZX32rm8 addr:$src)>; -def : Pat<(i32 (and (nvloadi32 addr:$src), (i32 65535))), - (MOVZX32rm16 addr:$src)>; - //===----------------------------------------------------------------------===// // Some peepholes //===----------------------------------------------------------------------===// From evan.cheng at apple.com Tue Mar 2 20:48:20 2010 From: evan.cheng at apple.com (Evan Cheng) Date: Wed, 03 Mar 2010 02:48:20 -0000 Subject: [llvm-commits] [llvm] r97635 - /llvm/trunk/lib/CodeGen/MachineCSE.cpp Message-ID: <20100303024820.E4E782A6C12C@llvm.org> Author: evancheng Date: Tue Mar 2 20:48:20 2010 New Revision: 97635 URL: http://llvm.org/viewvc/llvm-project?rev=97635&view=rev Log: Work in progress. Finding some cse now. Modified: llvm/trunk/lib/CodeGen/MachineCSE.cpp Modified: llvm/trunk/lib/CodeGen/MachineCSE.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineCSE.cpp?rev=97635&r1=97634&r2=97635&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/MachineCSE.cpp (original) +++ llvm/trunk/lib/CodeGen/MachineCSE.cpp Tue Mar 2 20:48:20 2010 @@ -17,6 +17,8 @@ #include "llvm/CodeGen/Passes.h" #include "llvm/CodeGen/MachineDominators.h" #include "llvm/CodeGen/MachineInstr.h" +#include "llvm/CodeGen/MachineRegisterInfo.h" +#include "llvm/Target/TargetInstrInfo.h" #include "llvm/ADT/ScopedHashTable.h" #include "llvm/ADT/Statistic.h" #include "llvm/Support/Debug.h" @@ -41,6 +43,8 @@ switch (MO.getType()) { default: break; case MachineOperand::MO_Register: + if (MO.isDef() && TargetRegisterInfo::isVirtualRegister(MO.getReg())) + continue; // Skip virtual register defs. Key |= MO.getReg(); break; case MachineOperand::MO_Immediate: @@ -76,18 +80,24 @@ static bool isEqual(const MachineInstr* const &LHS, const MachineInstr* const &RHS) { - return LHS->isIdenticalTo(RHS); + if (RHS == getEmptyKey() || RHS == getTombstoneKey() || + LHS == getEmptyKey() || LHS == getTombstoneKey()) + return LHS == RHS; + return LHS->isIdenticalTo(RHS, MachineInstr::IgnoreVRegDefs); } }; } // end llvm namespace namespace { class MachineCSE : public MachineFunctionPass { - ScopedHashTable VNT; + const TargetInstrInfo *TII; + MachineRegisterInfo *MRI; MachineDominatorTree *DT; + ScopedHashTable VNT; + unsigned CurrVN; public: static char ID; // Pass identification - MachineCSE() : MachineFunctionPass(&ID) {} + MachineCSE() : MachineFunctionPass(&ID), CurrVN(0) {} virtual bool runOnMachineFunction(MachineFunction &MF); @@ -99,6 +109,7 @@ } private: + bool PerformTrivialCoalescing(MachineInstr *MI, MachineBasicBlock *MBB); bool ProcessBlock(MachineDomTreeNode *Node); }; } // end anonymous namespace @@ -109,16 +120,89 @@ FunctionPass *llvm::createMachineCSEPass() { return new MachineCSE(); } +bool MachineCSE::PerformTrivialCoalescing(MachineInstr *MI, + MachineBasicBlock *MBB) { + bool Changed = false; + for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) { + MachineOperand &MO = MI->getOperand(i); + if (MO.isReg() && MO.isUse()) { + unsigned Reg = MO.getReg(); + if (!Reg || TargetRegisterInfo::isPhysicalRegister(Reg)) + continue; + MachineInstr *DefMI = MRI->getVRegDef(Reg); + if (DefMI->getParent() == MBB) { + unsigned SrcReg, DstReg, SrcSubIdx, DstSubIdx; + if (TII->isMoveInstr(*DefMI, SrcReg, DstReg, SrcSubIdx, DstSubIdx) && + TargetRegisterInfo::isVirtualRegister(SrcReg) && + !SrcSubIdx && !DstSubIdx) { + MO.setReg(SrcReg); + Changed = true; + } + } + } + } + + return Changed; +} + +static bool hasLivePhysRegDefUse(MachineInstr *MI) { + for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) { + MachineOperand &MO = MI->getOperand(i); + if (!MO.isReg()) + continue; + unsigned Reg = MO.getReg(); + if (!Reg) + continue; + if (TargetRegisterInfo::isPhysicalRegister(Reg) && + !(MO.isDef() && MO.isDead())) + return true; + } + return false; +} + bool MachineCSE::ProcessBlock(MachineDomTreeNode *Node) { + bool Changed = false; + ScopedHashTableScope VNTS(VNT); MachineBasicBlock *MBB = Node->getBlock(); for (MachineBasicBlock::iterator I = MBB->begin(), E = MBB->end(); I != E; ++I) { + MachineInstr *MI = &*I; + bool SawStore = false; + if (!MI->isSafeToMove(TII, 0, SawStore)) + continue; + // Ignore copies or instructions that read / write physical registers + // (except for dead defs of physical registers). + unsigned SrcReg, DstReg, SrcSubIdx, DstSubIdx; + if (TII->isMoveInstr(*MI, SrcReg, DstReg, SrcSubIdx, DstSubIdx)) + continue; + if (hasLivePhysRegDefUse(MI)) + continue; + + bool FoundCSE = VNT.count(MI); + if (!FoundCSE) { + // Look for trivial copy coalescing opportunities. + if (PerformTrivialCoalescing(MI, MBB)) + FoundCSE = VNT.count(MI); + } + + if (FoundCSE) + DEBUG(dbgs() << "Found a common subexpression: " << *MI); + else + VNT.insert(MI, ++CurrVN); } - return false; + + // Recursively call ProcessBlock with childred. + const std::vector &Children = Node->getChildren(); + for (unsigned i = 0, e = Children.size(); i != e; ++i) + Changed |= ProcessBlock(Children[i]); + + return Changed; } bool MachineCSE::runOnMachineFunction(MachineFunction &MF) { + TII = MF.getTarget().getInstrInfo(); + MRI = &MF.getRegInfo(); DT = &getAnalysis(); return ProcessBlock(DT->getRootNode()); } From dalej at apple.com Tue Mar 2 21:43:34 2010 From: dalej at apple.com (Dale Johannesen) Date: Tue, 2 Mar 2010 19:43:34 -0800 Subject: [llvm-commits] [llvm] r97623 - /llvm/trunk/utils/buildit/GNUmakefile In-Reply-To: <20100303011355.79ACD2A6C12C@llvm.org> References: <20100303011355.79ACD2A6C12C@llvm.org> Message-ID: <261A91EB-55BE-4969-92DD-4DE9B4A4D00D@apple.com> You should probably fix the comment to match the code. On Mar 2, 2010, at 5:13 PM, Bill Wendling wrote: > Modified: llvm/trunk/utils/buildit/GNUmakefile > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/buildit/GNUmakefile?rev=97623&r1=97622&r2=97623&view=diff > = > = > = > = > = > = > = > = > ====================================================================== > --- llvm/trunk/utils/buildit/GNUmakefile (original) > +++ llvm/trunk/utils/buildit/GNUmakefile Tue Mar 2 19:13:55 2010 > @@ -36,7 +36,7 @@ > > # Unless assertions are forced on in the GMAKE command line, enable > them. > ifndef ENABLE_ASSERTIONS > -ENABLE_ASSERTIONS := yes > +ENABLE_ASSERTIONS := no > endif > > # Default is optimized build. > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From gohman at apple.com Tue Mar 2 22:36:43 2010 From: gohman at apple.com (Dan Gohman) Date: Wed, 03 Mar 2010 04:36:43 -0000 Subject: [llvm-commits] [llvm] r97639 - in /llvm/trunk: lib/Analysis/ScalarEvolutionExpander.cpp test/CodeGen/X86/pr3495.ll Message-ID: <20100303043643.2F16F2A6C12C@llvm.org> Author: djg Date: Tue Mar 2 22:36:42 2010 New Revision: 97639 URL: http://llvm.org/viewvc/llvm-project?rev=97639&view=rev Log: Revert r97580; that's not the right way to fix this. Modified: llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp llvm/trunk/test/CodeGen/X86/pr3495.ll Modified: llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp?rev=97639&r1=97638&r2=97639&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp (original) +++ llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp Tue Mar 2 22:36:42 2010 @@ -528,138 +528,48 @@ return SC->getValue()->getValue().isNegative(); } -/// PickMostRelevantLoop - Given two loops pick the one that's most relevant for -/// SCEV expansion. If they are nested, this is the most nested. If they are -/// neighboring, pick the later. -static const Loop *PickMostRelevantLoop(const Loop *A, const Loop *B, - DominatorTree &DT) { - if (!A) return B; - if (!B) return A; - if (A->contains(B)) return B; - if (B->contains(A)) return A; - if (DT.dominates(A->getHeader(), B->getHeader())) return B; - if (DT.dominates(B->getHeader(), A->getHeader())) return A; - return A; // Arbitrarily break the tie. -} - -/// GetRelevantLoop - Get the most relevant loop associated with the given -/// expression, according to PickMostRelevantLoop. -static const Loop *GetRelevantLoop(const SCEV *S, LoopInfo &LI, - DominatorTree &DT) { - if (isa(S)) - return 0; - if (const SCEVUnknown *U = dyn_cast(S)) { - if (const Instruction *I = dyn_cast(U->getValue())) - return LI.getLoopFor(I->getParent()); - return 0; - } - if (const SCEVNAryExpr *N = dyn_cast(S)) { - const Loop *L = 0; - if (const SCEVAddRecExpr *AR = dyn_cast(S)) - L = AR->getLoop(); - for (SCEVNAryExpr::op_iterator I = N->op_begin(), E = N->op_end(); - I != E; ++I) - L = PickMostRelevantLoop(L, GetRelevantLoop(*I, LI, DT), DT); - return L; - } - if (const SCEVCastExpr *C = dyn_cast(S)) - return GetRelevantLoop(C->getOperand(), LI, DT); - if (const SCEVUDivExpr *D = dyn_cast(S)) - return PickMostRelevantLoop(GetRelevantLoop(D->getLHS(), LI, DT), - GetRelevantLoop(D->getRHS(), LI, DT), - DT); - llvm_unreachable("Unexpected SCEV type!"); -} - -namespace { - -/// LoopCompare - Compare loops by PickMostRelevantLoop. -class LoopCompare { - DominatorTree &DT; -public: - explicit LoopCompare(DominatorTree &dt) : DT(dt) {} - - bool operator()(std::pair LHS, - std::pair RHS) const { - // Compare loops with PickMostRelevantLoop. - if (LHS.first != RHS.first) - return PickMostRelevantLoop(LHS.first, RHS.first, DT) == LHS.first; - - // If one operand is a non-constant negative and the other is not, - // put the non-constant negative on the right so that a sub can - // be used instead of a negate and add. - if (isNonConstantNegative(LHS.second)) { - if (!isNonConstantNegative(RHS.second)) - return false; - } else if (isNonConstantNegative(RHS.second)) - return true; - - // Otherwise they are equivalent according to this comparison. - return false; - } -}; - -} - Value *SCEVExpander::visitAddExpr(const SCEVAddExpr *S) { + int NumOperands = S->getNumOperands(); const Type *Ty = SE.getEffectiveSCEVType(S->getType()); - // Collect all the add operands in a loop, along with their associated loops. - // Iterate in reverse so that constants are emitted last, all else equal, and - // so that pointer operands are inserted first, which the code below relies on - // to form more involved GEPs. - SmallVector, 8> OpsAndLoops; - for (std::reverse_iterator I(S->op_end()), - E(S->op_begin()); I != E; ++I) - OpsAndLoops.push_back(std::make_pair(GetRelevantLoop(*I, *SE.LI, *SE.DT), - *I)); - - // Sort by loop. Use a stable sort so that constants follow non-constants and - // pointer operands precede non-pointer operands. - std::stable_sort(OpsAndLoops.begin(), OpsAndLoops.end(), LoopCompare(*SE.DT)); - - // Emit instructions to add all the operands. Hoist as much as possible - // out of loops, and form meaningful getelementptrs where possible. - Value *Sum = 0; - for (SmallVectorImpl >::iterator - I = OpsAndLoops.begin(), E = OpsAndLoops.end(); I != E; ) { - const Loop *CurLoop = I->first; - const SCEV *Op = I->second; - if (!Sum) { - // This is the first operand. Just expand it. - Sum = expand(Op); - ++I; - } else if (const PointerType *PTy = dyn_cast(Sum->getType())) { - // The running sum expression is a pointer. Try to form a getelementptr - // at this level with that as the base. - SmallVector NewOps; - for (; I != E && I->first == CurLoop; ++I) - NewOps.push_back(I->second); - Sum = expandAddToGEP(NewOps.begin(), NewOps.end(), PTy, Ty, Sum); - } else if (const PointerType *PTy = dyn_cast(Op->getType())) { - // The running sum is an integer, and there's a pointer at this level. - // Try to form a getelementptr. - SmallVector NewOps; - NewOps.push_back(SE.getUnknown(Sum)); - for (++I; I != E && I->first == CurLoop; ++I) - NewOps.push_back(I->second); - Sum = expandAddToGEP(NewOps.begin(), NewOps.end(), PTy, Ty, expand(Op)); - } else if (isNonConstantNegative(Op)) { - // Instead of doing a negate and add, just do a subtract. + // Find the index of an operand to start with. Choose the operand with + // pointer type, if there is one, or the last operand otherwise. + int PIdx = 0; + for (; PIdx != NumOperands - 1; ++PIdx) + if (S->getOperand(PIdx)->getType()->isPointerTy()) break; + + // Expand code for the operand that we chose. + Value *V = expand(S->getOperand(PIdx)); + + // Turn things like ptrtoint+arithmetic+inttoptr into GEP. See the + // comments on expandAddToGEP for details. + if (const PointerType *PTy = dyn_cast(V->getType())) { + // Take the operand at PIdx out of the list. + const SmallVectorImpl &Ops = S->getOperands(); + SmallVector NewOps; + NewOps.insert(NewOps.end(), Ops.begin(), Ops.begin() + PIdx); + NewOps.insert(NewOps.end(), Ops.begin() + PIdx + 1, Ops.end()); + // Make a GEP. + return expandAddToGEP(NewOps.begin(), NewOps.end(), PTy, Ty, V); + } + + // Otherwise, we'll expand the rest of the SCEVAddExpr as plain integer + // arithmetic. + V = InsertNoopCastOfTo(V, Ty); + + // Emit a bunch of add instructions + for (int i = NumOperands-1; i >= 0; --i) { + if (i == PIdx) continue; + const SCEV *Op = S->getOperand(i); + if (isNonConstantNegative(Op)) { Value *W = expandCodeFor(SE.getNegativeSCEV(Op), Ty); - Sum = InsertNoopCastOfTo(Sum, Ty); - Sum = InsertBinop(Instruction::Sub, Sum, W); - ++I; + V = InsertBinop(Instruction::Sub, V, W); } else { - // A simple add. Value *W = expandCodeFor(Op, Ty); - Sum = InsertNoopCastOfTo(Sum, Ty); - Sum = InsertBinop(Instruction::Add, Sum, W); - ++I; + V = InsertBinop(Instruction::Add, V, W); } } - - return Sum; + return V; } Value *SCEVExpander::visitMulExpr(const SCEVMulExpr *S) { Modified: llvm/trunk/test/CodeGen/X86/pr3495.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/pr3495.ll?rev=97639&r1=97638&r2=97639&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/pr3495.ll (original) +++ llvm/trunk/test/CodeGen/X86/pr3495.ll Tue Mar 2 22:36:42 2010 @@ -1,6 +1,6 @@ -; RUN: llc < %s -march=x86 -stats |& not grep {Number of loads added} -; RUN: llc < %s -march=x86 -stats |& not grep {Number of register spills} -; RUN: llc < %s -march=x86 -stats |& grep {Number of machine instrs printed} | grep 32 +; RUN: llc < %s -march=x86 -stats |& grep {Number of loads added} | grep 2 +; RUN: llc < %s -march=x86 -stats |& grep {Number of register spills} | grep 1 +; RUN: llc < %s -march=x86 -stats |& grep {Number of machine instrs printed} | grep 34 ; PR3495 target triple = "i386-pc-linux-gnu" From gohman at apple.com Tue Mar 2 23:29:13 2010 From: gohman at apple.com (Dan Gohman) Date: Wed, 03 Mar 2010 05:29:13 -0000 Subject: [llvm-commits] [llvm] r97642 - in /llvm/trunk/lib: Analysis/ScalarEvolutionExpander.cpp Transforms/Scalar/LoopStrengthReduce.cpp Message-ID: <20100303052913.C53372A6C12C@llvm.org> Author: djg Date: Tue Mar 2 23:29:13 2010 New Revision: 97642 URL: http://llvm.org/viewvc/llvm-project?rev=97642&view=rev Log: Make SCEVExpander and LSR more aggressive about hoisting expressions out of loops. Modified: llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp Modified: llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp?rev=97642&r1=97641&r2=97642&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp (original) +++ llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp Tue Mar 2 23:29:13 2010 @@ -144,9 +144,28 @@ } } + // Save the original insertion point so we can restore it when we're done. + BasicBlock *SaveInsertBB = Builder.GetInsertBlock(); + BasicBlock::iterator SaveInsertPt = Builder.GetInsertPoint(); + + // Move the insertion point out of as many loops as we can. + while (const Loop *L = SE.LI->getLoopFor(Builder.GetInsertBlock())) { + if (!L->isLoopInvariant(LHS) || !L->isLoopInvariant(RHS)) break; + BasicBlock *Preheader = L->getLoopPreheader(); + if (!Preheader) break; + + // Ok, move up a level. + Builder.SetInsertPoint(Preheader, Preheader->getTerminator()); + } + // If we haven't found this binop, insert it. Value *BO = Builder.CreateBinOp(Opcode, LHS, RHS, "tmp"); rememberInstruction(BO); + + // Restore the original insert point. + if (SaveInsertBB) + restoreInsertPoint(SaveInsertBB, SaveInsertPt); + return BO; } @@ -493,12 +512,56 @@ } } + // Save the original insertion point so we can restore it when we're done. + BasicBlock *SaveInsertBB = Builder.GetInsertBlock(); + BasicBlock::iterator SaveInsertPt = Builder.GetInsertPoint(); + + // Move the insertion point out of as many loops as we can. + while (const Loop *L = SE.LI->getLoopFor(Builder.GetInsertBlock())) { + if (!L->isLoopInvariant(V) || !L->isLoopInvariant(Idx)) break; + BasicBlock *Preheader = L->getLoopPreheader(); + if (!Preheader) break; + + // Ok, move up a level. + Builder.SetInsertPoint(Preheader, Preheader->getTerminator()); + } + // Emit a GEP. Value *GEP = Builder.CreateGEP(V, Idx, "uglygep"); rememberInstruction(GEP); + + // Restore the original insert point. + if (SaveInsertBB) + restoreInsertPoint(SaveInsertBB, SaveInsertPt); + return GEP; } + // Save the original insertion point so we can restore it when we're done. + BasicBlock *SaveInsertBB = Builder.GetInsertBlock(); + BasicBlock::iterator SaveInsertPt = Builder.GetInsertPoint(); + + // Move the insertion point out of as many loops as we can. + while (const Loop *L = SE.LI->getLoopFor(Builder.GetInsertBlock())) { + if (!L->isLoopInvariant(V)) break; + + bool AnyIndexNotLoopInvariant = false; + for (SmallVectorImpl::const_iterator I = GepIndices.begin(), + E = GepIndices.end(); I != E; ++I) + if (!L->isLoopInvariant(*I)) { + AnyIndexNotLoopInvariant = true; + break; + } + if (AnyIndexNotLoopInvariant) + break; + + BasicBlock *Preheader = L->getLoopPreheader(); + if (!Preheader) break; + + // Ok, move up a level. + Builder.SetInsertPoint(Preheader, Preheader->getTerminator()); + } + // Insert a pretty getelementptr. Note that this GEP is not marked inbounds, // because ScalarEvolution may have changed the address arithmetic to // compute a value which is beyond the end of the allocated object. @@ -511,6 +574,11 @@ "scevgep"); Ops.push_back(SE.getUnknown(GEP)); rememberInstruction(GEP); + + // Restore the original insert point. + if (SaveInsertBB) + restoreInsertPoint(SaveInsertBB, SaveInsertPt); + return expand(SE.getAddExpr(Ops)); } @@ -528,70 +596,179 @@ return SC->getValue()->getValue().isNegative(); } +/// PickMostRelevantLoop - Given two loops pick the one that's most relevant for +/// SCEV expansion. If they are nested, this is the most nested. If they are +/// neighboring, pick the later. +static const Loop *PickMostRelevantLoop(const Loop *A, const Loop *B, + DominatorTree &DT) { + if (!A) return B; + if (!B) return A; + if (A->contains(B)) return B; + if (B->contains(A)) return A; + if (DT.dominates(A->getHeader(), B->getHeader())) return B; + if (DT.dominates(B->getHeader(), A->getHeader())) return A; + return A; // Arbitrarily break the tie. +} + +/// GetRelevantLoop - Get the most relevant loop associated with the given +/// expression, according to PickMostRelevantLoop. +static const Loop *GetRelevantLoop(const SCEV *S, LoopInfo &LI, + DominatorTree &DT) { + if (isa(S)) + return 0; + if (const SCEVUnknown *U = dyn_cast(S)) { + if (const Instruction *I = dyn_cast(U->getValue())) + return LI.getLoopFor(I->getParent()); + return 0; + } + if (const SCEVNAryExpr *N = dyn_cast(S)) { + const Loop *L = 0; + if (const SCEVAddRecExpr *AR = dyn_cast(S)) + L = AR->getLoop(); + for (SCEVNAryExpr::op_iterator I = N->op_begin(), E = N->op_end(); + I != E; ++I) + L = PickMostRelevantLoop(L, GetRelevantLoop(*I, LI, DT), DT); + return L; + } + if (const SCEVCastExpr *C = dyn_cast(S)) + return GetRelevantLoop(C->getOperand(), LI, DT); + if (const SCEVUDivExpr *D = dyn_cast(S)) + return PickMostRelevantLoop(GetRelevantLoop(D->getLHS(), LI, DT), + GetRelevantLoop(D->getRHS(), LI, DT), + DT); + llvm_unreachable("Unexpected SCEV type!"); +} + +/// LoopCompare - Compare loops by PickMostRelevantLoop. +class LoopCompare { + DominatorTree &DT; +public: + explicit LoopCompare(DominatorTree &dt) : DT(dt) {} + + bool operator()(std::pair LHS, + std::pair RHS) const { + // Compare loops with PickMostRelevantLoop. + if (LHS.first != RHS.first) + return PickMostRelevantLoop(LHS.first, RHS.first, DT) != LHS.first; + + // If one operand is a non-constant negative and the other is not, + // put the non-constant negative on the right so that a sub can + // be used instead of a negate and add. + if (isNonConstantNegative(LHS.second)) { + if (!isNonConstantNegative(RHS.second)) + return false; + } else if (isNonConstantNegative(RHS.second)) + return true; + + // Otherwise they are equivalent according to this comparison. + return false; + } +}; + Value *SCEVExpander::visitAddExpr(const SCEVAddExpr *S) { - int NumOperands = S->getNumOperands(); const Type *Ty = SE.getEffectiveSCEVType(S->getType()); - // Find the index of an operand to start with. Choose the operand with - // pointer type, if there is one, or the last operand otherwise. - int PIdx = 0; - for (; PIdx != NumOperands - 1; ++PIdx) - if (S->getOperand(PIdx)->getType()->isPointerTy()) break; - - // Expand code for the operand that we chose. - Value *V = expand(S->getOperand(PIdx)); - - // Turn things like ptrtoint+arithmetic+inttoptr into GEP. See the - // comments on expandAddToGEP for details. - if (const PointerType *PTy = dyn_cast(V->getType())) { - // Take the operand at PIdx out of the list. - const SmallVectorImpl &Ops = S->getOperands(); - SmallVector NewOps; - NewOps.insert(NewOps.end(), Ops.begin(), Ops.begin() + PIdx); - NewOps.insert(NewOps.end(), Ops.begin() + PIdx + 1, Ops.end()); - // Make a GEP. - return expandAddToGEP(NewOps.begin(), NewOps.end(), PTy, Ty, V); - } - - // Otherwise, we'll expand the rest of the SCEVAddExpr as plain integer - // arithmetic. - V = InsertNoopCastOfTo(V, Ty); - - // Emit a bunch of add instructions - for (int i = NumOperands-1; i >= 0; --i) { - if (i == PIdx) continue; - const SCEV *Op = S->getOperand(i); - if (isNonConstantNegative(Op)) { + // Collect all the add operands in a loop, along with their associated loops. + // Iterate in reverse so that constants are emitted last, all else equal, and + // so that pointer operands are inserted first, which the code below relies on + // to form more involved GEPs. + SmallVector, 8> OpsAndLoops; + for (std::reverse_iterator I(S->op_end()), + E(S->op_begin()); I != E; ++I) + OpsAndLoops.push_back(std::make_pair(GetRelevantLoop(*I, *SE.LI, *SE.DT), + *I)); + + // Sort by loop. Use a stable sort so that constants follow non-constants and + // pointer operands precede non-pointer operands. + std::stable_sort(OpsAndLoops.begin(), OpsAndLoops.end(), LoopCompare(*SE.DT)); + + // Emit instructions to add all the operands. Hoist as much as possible + // out of loops, and form meaningful getelementptrs where possible. + Value *Sum = 0; + for (SmallVectorImpl >::iterator + I = OpsAndLoops.begin(), E = OpsAndLoops.end(); I != E; ) { + const Loop *CurLoop = I->first; + const SCEV *Op = I->second; + if (!Sum) { + // This is the first operand. Just expand it. + Sum = expand(Op); + ++I; + } else if (const PointerType *PTy = dyn_cast(Sum->getType())) { + // The running sum expression is a pointer. Try to form a getelementptr + // at this level with that as the base. + SmallVector NewOps; + for (; I != E && I->first == CurLoop; ++I) + NewOps.push_back(I->second); + Sum = expandAddToGEP(NewOps.begin(), NewOps.end(), PTy, Ty, Sum); + } else if (const PointerType *PTy = dyn_cast(Op->getType())) { + // The running sum is an integer, and there's a pointer at this level. + // Try to form a getelementptr. + SmallVector NewOps; + NewOps.push_back(SE.getUnknown(Sum)); + for (++I; I != E && I->first == CurLoop; ++I) + NewOps.push_back(I->second); + Sum = expandAddToGEP(NewOps.begin(), NewOps.end(), PTy, Ty, expand(Op)); + } else if (isNonConstantNegative(Op)) { + // Instead of doing a negate and add, just do a subtract. Value *W = expandCodeFor(SE.getNegativeSCEV(Op), Ty); - V = InsertBinop(Instruction::Sub, V, W); + Sum = InsertNoopCastOfTo(Sum, Ty); + Sum = InsertBinop(Instruction::Sub, Sum, W); + ++I; } else { + // A simple add. Value *W = expandCodeFor(Op, Ty); - V = InsertBinop(Instruction::Add, V, W); + Sum = InsertNoopCastOfTo(Sum, Ty); + // Canonicalize a constant to the RHS. + if (isa(Sum)) std::swap(Sum, W); + Sum = InsertBinop(Instruction::Add, Sum, W); + ++I; } } - return V; + + return Sum; } Value *SCEVExpander::visitMulExpr(const SCEVMulExpr *S) { const Type *Ty = SE.getEffectiveSCEVType(S->getType()); - int FirstOp = 0; // Set if we should emit a subtract. - if (const SCEVConstant *SC = dyn_cast(S->getOperand(0))) - if (SC->getValue()->isAllOnesValue()) - FirstOp = 1; - - int i = S->getNumOperands()-2; - Value *V = expandCodeFor(S->getOperand(i+1), Ty); - - // Emit a bunch of multiply instructions - for (; i >= FirstOp; --i) { - Value *W = expandCodeFor(S->getOperand(i), Ty); - V = InsertBinop(Instruction::Mul, V, W); - } - - // -1 * ... ---> 0 - ... - if (FirstOp == 1) - V = InsertBinop(Instruction::Sub, Constant::getNullValue(Ty), V); - return V; + + // Collect all the mul operands in a loop, along with their associated loops. + // Iterate in reverse so that constants are emitted last, all else equal. + SmallVector, 8> OpsAndLoops; + for (std::reverse_iterator I(S->op_end()), + E(S->op_begin()); I != E; ++I) + OpsAndLoops.push_back(std::make_pair(GetRelevantLoop(*I, *SE.LI, *SE.DT), + *I)); + + // Sort by loop. Use a stable sort so that constants follow non-constants. + std::stable_sort(OpsAndLoops.begin(), OpsAndLoops.end(), LoopCompare(*SE.DT)); + + // Emit instructions to mul all the operands. Hoist as much as possible + // out of loops. + Value *Prod = 0; + for (SmallVectorImpl >::iterator + I = OpsAndLoops.begin(), E = OpsAndLoops.end(); I != E; ) { + const SCEV *Op = I->second; + if (!Prod) { + // This is the first operand. Just expand it. + Prod = expand(Op); + ++I; + } else if (Op->isAllOnesValue()) { + // Instead of doing a multiply by negative one, just do a negate. + Prod = InsertNoopCastOfTo(Prod, Ty); + Prod = InsertBinop(Instruction::Sub, Constant::getNullValue(Ty), Prod); + ++I; + } else { + // A simple mul. + Value *W = expandCodeFor(Op, Ty); + Prod = InsertNoopCastOfTo(Prod, Ty); + // Canonicalize a constant to the RHS. + if (isa(Prod)) std::swap(Prod, W); + Prod = InsertBinop(Instruction::Mul, Prod, W); + ++I; + } + } + + return Prod; } Value *SCEVExpander::visitUDivExpr(const SCEVUDivExpr *S) { Modified: llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp?rev=97642&r1=97641&r2=97642&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp Tue Mar 2 23:29:13 2010 @@ -2874,6 +2874,13 @@ Ops.push_back(SE.getUnknown(Rewriter.expandCodeFor(Reg, 0, IP))); } + // Flush the operand list to suppress SCEVExpander hoisting. + if (!Ops.empty()) { + Value *FullV = Rewriter.expandCodeFor(SE.getAddExpr(Ops), Ty, IP); + Ops.clear(); + Ops.push_back(SE.getUnknown(FullV)); + } + // Expand the ScaledReg portion. Value *ICmpScaledV = 0; if (F.AM.Scale != 0) { @@ -2900,12 +2907,25 @@ SE.getIntegerSCEV(F.AM.Scale, ScaledS->getType())); Ops.push_back(ScaledS); + + // Flush the operand list to suppress SCEVExpander hoisting. + Value *FullV = Rewriter.expandCodeFor(SE.getAddExpr(Ops), Ty, IP); + Ops.clear(); + Ops.push_back(SE.getUnknown(FullV)); } } - // Expand the immediate portions. - if (F.AM.BaseGV) - Ops.push_back(SE.getSCEV(F.AM.BaseGV)); + // Expand the GV portion. + if (F.AM.BaseGV) { + Ops.push_back(SE.getUnknown(F.AM.BaseGV)); + + // Flush the operand list to suppress SCEVExpander hoisting. + Value *FullV = Rewriter.expandCodeFor(SE.getAddExpr(Ops), Ty, IP); + Ops.clear(); + Ops.push_back(SE.getUnknown(FullV)); + } + + // Expand the immediate portion. int64_t Offset = (uint64_t)F.AM.BaseOffs + LF.Offset; if (Offset != 0) { if (LU.Kind == LSRUse::ICmpZero) { @@ -2920,7 +2940,7 @@ } else { // Just add the immediate values. These again are expected to be matched // as part of the address. - Ops.push_back(SE.getIntegerSCEV(Offset, IntTy)); + Ops.push_back(SE.getUnknown(ConstantInt::getSigned(IntTy, Offset))); } } From isanbard at gmail.com Tue Mar 2 23:40:40 2010 From: isanbard at gmail.com (Bill Wendling) Date: Wed, 03 Mar 2010 05:40:40 -0000 Subject: [llvm-commits] [llvm] r97644 - /llvm/trunk/utils/buildit/GNUmakefile Message-ID: <20100303054040.E1E3E2A6C12C@llvm.org> Author: void Date: Tue Mar 2 23:40:40 2010 New Revision: 97644 URL: http://llvm.org/viewvc/llvm-project?rev=97644&view=rev Log: Fix comment. Modified: llvm/trunk/utils/buildit/GNUmakefile Modified: llvm/trunk/utils/buildit/GNUmakefile URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/buildit/GNUmakefile?rev=97644&r1=97643&r2=97644&view=diff ============================================================================== --- llvm/trunk/utils/buildit/GNUmakefile (original) +++ llvm/trunk/utils/buildit/GNUmakefile Tue Mar 2 23:40:40 2010 @@ -34,7 +34,7 @@ PREFIX = /usr/local -# Unless assertions are forced on in the GMAKE command line, enable them. +# Unless assertions are forced on in the GMAKE command line, disable them. ifndef ENABLE_ASSERTIONS ENABLE_ASSERTIONS := no endif From sabre at nondot.org Wed Mar 3 00:28:15 2010 From: sabre at nondot.org (Chris Lattner) Date: Wed, 03 Mar 2010 06:28:15 -0000 Subject: [llvm-commits] [llvm] r97645 - in /llvm/trunk: include/llvm/CodeGen/SelectionDAGISel.h lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp utils/TableGen/DAGISelMatcher.cpp utils/TableGen/DAGISelMatcher.h utils/TableGen/DAGISelMatcherEmitter.cpp utils/TableGen/DAGISelMatcherOpt.cpp Message-ID: <20100303062815.95A132A6C12C@llvm.org> Author: lattner Date: Wed Mar 3 00:28:15 2010 New Revision: 97645 URL: http://llvm.org/viewvc/llvm-project?rev=97645&view=rev Log: introduce a new SwitchTypeMatcher node (which is analogous to SwitchOpcodeMatcher) and have DAGISelMatcherOpt form it. This speeds up selection, particularly for X86 which has lots of variants of instructions with only type differences. Modified: llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp llvm/trunk/utils/TableGen/DAGISelMatcher.cpp llvm/trunk/utils/TableGen/DAGISelMatcher.h llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp llvm/trunk/utils/TableGen/DAGISelMatcherOpt.cpp Modified: llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h?rev=97645&r1=97644&r2=97645&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h (original) +++ llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h Wed Mar 3 00:28:15 2010 @@ -121,6 +121,7 @@ OPC_CheckOpcode, OPC_SwitchOpcode, OPC_CheckType, + OPC_SwitchType, OPC_CheckChild0Type, OPC_CheckChild1Type, OPC_CheckChild2Type, OPC_CheckChild3Type, OPC_CheckChild4Type, OPC_CheckChild5Type, OPC_CheckChild6Type, OPC_CheckChild7Type, Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp?rev=97645&r1=97644&r2=97645&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Wed Mar 3 00:28:15 2010 @@ -2065,9 +2065,7 @@ case OPC_SwitchOpcode: { unsigned CurNodeOpcode = N.getOpcode(); - unsigned SwitchStart = MatcherIndex-1; (void)SwitchStart; - unsigned CaseSize; while (1) { // Get the size of this case. @@ -2084,7 +2082,7 @@ MatcherIndex += CaseSize; } - // If we failed to match, bail out. + // If no cases matched, bail out. if (CaseSize == 0) break; // Otherwise, execute the case we found. @@ -2103,6 +2101,39 @@ } continue; } + + case OPC_SwitchType: { + MVT::SimpleValueType CurNodeVT = N.getValueType().getSimpleVT().SimpleTy; + unsigned SwitchStart = MatcherIndex-1; (void)SwitchStart; + unsigned CaseSize; + while (1) { + // Get the size of this case. + CaseSize = MatcherTable[MatcherIndex++]; + if (CaseSize & 128) + CaseSize = GetVBR(CaseSize, MatcherTable, MatcherIndex); + if (CaseSize == 0) break; + + MVT::SimpleValueType CaseVT = + (MVT::SimpleValueType)MatcherTable[MatcherIndex++]; + if (CaseVT == MVT::iPTR) + CaseVT = TLI.getPointerTy().SimpleTy; + + // If the VT matches, then we will execute this case. + if (CurNodeVT == CaseVT) + break; + + // Otherwise, skip over this case. + MatcherIndex += CaseSize; + } + + // If no cases matched, bail out. + if (CaseSize == 0) break; + + // Otherwise, execute the case we found. + DEBUG(errs() << " TypeSwitch[" << EVT(CurNodeVT).getEVTString() + << "] from " << SwitchStart << " to " << MatcherIndex<<'\n'); + continue; + } case OPC_CheckChild0Type: case OPC_CheckChild1Type: case OPC_CheckChild2Type: case OPC_CheckChild3Type: case OPC_CheckChild4Type: case OPC_CheckChild5Type: Modified: llvm/trunk/utils/TableGen/DAGISelMatcher.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelMatcher.cpp?rev=97645&r1=97644&r2=97645&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelMatcher.cpp (original) +++ llvm/trunk/utils/TableGen/DAGISelMatcher.cpp Wed Mar 3 00:28:15 2010 @@ -102,6 +102,15 @@ OS.indent(indent) << "CheckType " << getEnumName(Type) << '\n'; } +void SwitchTypeMatcher::printImpl(raw_ostream &OS, unsigned indent) const { + OS.indent(indent) << "SwitchType: {\n"; + for (unsigned i = 0, e = Cases.size(); i != e; ++i) { + OS.indent(indent) << "case " << getEnumName(Cases[i].first) << ":\n"; + Cases[i].second->print(OS, indent+2); + } + OS.indent(indent) << "}\n"; +} + void CheckChildTypeMatcher::printImpl(raw_ostream &OS, unsigned indent) const { OS.indent(indent) << "CheckChildType " << ChildNo << " " << getEnumName(Type) << '\n'; Modified: llvm/trunk/utils/TableGen/DAGISelMatcher.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelMatcher.h?rev=97645&r1=97644&r2=97645&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelMatcher.h (original) +++ llvm/trunk/utils/TableGen/DAGISelMatcher.h Wed Mar 3 00:28:15 2010 @@ -56,6 +56,7 @@ CheckOpcode, // Fail if not opcode. SwitchOpcode, // Dispatch based on opcode. CheckType, // Fail if not correct type. + SwitchType, // Dispatch based on type. CheckChildType, // Fail if child has wrong type. CheckInteger, // Fail if wrong val. CheckCondCode, // Fail if not condcode. @@ -472,6 +473,34 @@ virtual bool isContradictoryImpl(const Matcher *M) const; }; +/// SwitchTypeMatcher - Switch based on the current node's type, dispatching +/// to one matcher per case. If the type doesn't match any of the cases, +/// then the match fails. This is semantically equivalent to a Scope node where +/// every child does a CheckType, but is much faster. +class SwitchTypeMatcher : public Matcher { + SmallVector, 8> Cases; +public: + SwitchTypeMatcher(const std::pair *cases, + unsigned numcases) + : Matcher(SwitchType), Cases(cases, cases+numcases) {} + + static inline bool classof(const Matcher *N) { + return N->getKind() == SwitchType; + } + + unsigned getNumCases() const { return Cases.size(); } + + MVT::SimpleValueType getCaseType(unsigned i) const { return Cases[i].first; } + Matcher *getCaseMatcher(unsigned i) { return Cases[i].second; } + const Matcher *getCaseMatcher(unsigned i) const { return Cases[i].second; } + +private: + virtual void printImpl(raw_ostream &OS, unsigned indent) const; + virtual bool isEqualImpl(const Matcher *M) const { return false; } + virtual unsigned getHashImpl() const { return 4123; } +}; + + /// CheckChildTypeMatcher - This checks to see if a child node has the /// specified type, if not it fails to match. class CheckChildTypeMatcher : public Matcher { Modified: llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp?rev=97645&r1=97644&r2=97645&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp (original) +++ llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp Wed Mar 3 00:28:15 2010 @@ -261,17 +261,32 @@ << cast(N)->getOpcode().getEnumName() << ",\n"; return 2; - case Matcher::SwitchOpcode: { + case Matcher::SwitchOpcode: + case Matcher::SwitchType: { unsigned StartIdx = CurrentIdx; - const SwitchOpcodeMatcher *SOM = cast(N); - OS << "OPC_SwitchOpcode "; + + unsigned NumCases; + if (const SwitchOpcodeMatcher *SOM = dyn_cast(N)) { + OS << "OPC_SwitchOpcode "; + NumCases = SOM->getNumCases(); + } else { + OS << "OPC_SwitchType "; + NumCases = cast(N)->getNumCases(); + } + if (!OmitComments) - OS << "/*" << SOM->getNumCases() << " cases */"; + OS << "/*" << NumCases << " cases */"; OS << ", "; ++CurrentIdx; // For each case we emit the size, then the opcode, then the matcher. - for (unsigned i = 0, e = SOM->getNumCases(); i != e; ++i) { + for (unsigned i = 0, e = NumCases; i != e; ++i) { + const Matcher *Child; + if (const SwitchOpcodeMatcher *SOM = dyn_cast(N)) + Child = SOM->getCaseMatcher(i); + else + Child = cast(N)->getCaseMatcher(i); + // We need to encode the opcode and the offset of the case code before // emitting the case code. Handle this by buffering the output into a // string while we get the size. Unfortunately, the offset of the @@ -286,8 +301,7 @@ TmpBuf.clear(); raw_svector_ostream OS(TmpBuf); formatted_raw_ostream FOS(OS); - ChildSize = EmitMatcherList(SOM->getCaseMatcher(i), - Indent+1, CurrentIdx+VBRSize+1, FOS); + ChildSize = EmitMatcherList(Child, Indent+1, CurrentIdx+VBRSize+1, FOS); } while (GetVBRSize(ChildSize) != VBRSize); assert(ChildSize != 0 && "Should not have a zero-sized child!"); @@ -295,13 +309,20 @@ if (i != 0) { OS.PadToColumn(Indent*2); if (!OmitComments) - OS << "/*SwitchOpcode*/ "; + OS << (isa(N) ? + "/*SwitchOpcode*/ " : "/*SwitchType*/ "); } // Emit the VBR. CurrentIdx += EmitVBRValue(ChildSize, OS); - OS << " " << SOM->getCaseOpcode(i).getEnumName() << ","; + OS << ' '; + if (const SwitchOpcodeMatcher *SOM = dyn_cast(N)) + OS << SOM->getCaseOpcode(i).getEnumName(); + else + OS << getEnumName(cast(N)->getCaseType(i)); + OS << ','; + if (!OmitComments) OS << "// ->" << CurrentIdx+ChildSize+1; OS << '\n'; @@ -313,7 +334,9 @@ // Emit the final zero to terminate the switch. OS.PadToColumn(Indent*2) << "0, "; if (!OmitComments) - OS << "// EndSwitchOpcode"; + OS << (isa(N) ? + "// EndSwitchOpcode" : "// EndSwitchType"); + OS << '\n'; ++CurrentIdx; return CurrentIdx-StartIdx; @@ -323,6 +346,7 @@ OS << "OPC_CheckType, " << getEnumName(cast(N)->getType()) << ",\n"; return 2; + case Matcher::CheckChildType: OS << "OPC_CheckChild" << cast(N)->getChildNo() << "Type, " @@ -673,6 +697,7 @@ case Matcher::CheckOpcode: OS << "OPC_CheckOpcode"; break; case Matcher::SwitchOpcode: OS << "OPC_SwitchOpcode"; break; case Matcher::CheckType: OS << "OPC_CheckType"; break; + case Matcher::SwitchType: OS << "OPC_SwitchType"; break; case Matcher::CheckChildType: OS << "OPC_CheckChildType"; break; case Matcher::CheckInteger: OS << "OPC_CheckInteger"; break; case Matcher::CheckCondCode: OS << "OPC_CheckCondCode"; break; Modified: llvm/trunk/utils/TableGen/DAGISelMatcherOpt.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelMatcherOpt.cpp?rev=97645&r1=97644&r2=97645&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelMatcherOpt.cpp (original) +++ llvm/trunk/utils/TableGen/DAGISelMatcherOpt.cpp Wed Mar 3 00:28:15 2010 @@ -14,7 +14,7 @@ #define DEBUG_TYPE "isel-opt" #include "DAGISelMatcher.h" #include "CodeGenDAGPatterns.h" -#include "llvm/ADT/DenseMap.h" +#include "llvm/ADT/DenseSet.h" #include "llvm/ADT/StringSet.h" #include "llvm/Support/Debug.h" #include "llvm/Support/raw_ostream.h" @@ -361,27 +361,39 @@ // Check to see if all of the leading entries are now opcode checks. If so, // we can convert this Scope to be a OpcodeSwitch instead. - bool AllOpcodeChecks = true; + bool AllOpcodeChecks = true, AllTypeChecks = true; for (unsigned i = 0, e = NewOptionsToMatch.size(); i != e; ++i) { - if (isa(NewOptionsToMatch[i])) continue; - + if (!isa(NewOptionsToMatch[i])) { #if 0 - if (i > 3) { - errs() << "FAILING OPC #" << i << "\n"; - NewOptionsToMatch[i]->dump(); + if (i > 3 && AllOpcodeChecks) { + errs() << "FAILING OPC #" << i << "\n"; + NewOptionsToMatch[i]->dump(); + } +#endif + AllOpcodeChecks = false; } + + if (!isa(NewOptionsToMatch[i]) || + // iPTR checks could alias any other case without us knowing, don't + // bother with them. + cast(NewOptionsToMatch[i])->getType() == MVT::iPTR) { +#if 0 + if (i > 3 && AllTypeChecks) { + errs() << "FAILING TYPE #" << i << "\n"; + NewOptionsToMatch[i]->dump(); + } #endif - - AllOpcodeChecks = false; - break; + AllTypeChecks = false; + } } + // TODO: Can also do CheckChildNType. // If all the options are CheckOpcode's, we can form the SwitchOpcode, woot. if (AllOpcodeChecks) { StringSet<> Opcodes; SmallVector, 8> Cases; for (unsigned i = 0, e = NewOptionsToMatch.size(); i != e; ++i) { - CheckOpcodeMatcher *COM =cast(NewOptionsToMatch[i]); + CheckOpcodeMatcher *COM = cast(NewOptionsToMatch[i]); assert(Opcodes.insert(COM->getOpcode().getEnumName()) && "Duplicate opcodes not factored?"); Cases.push_back(std::make_pair(&COM->getOpcode(), COM->getNext())); @@ -391,6 +403,21 @@ return; } + // If all the options are CheckType's, we can form the SwitchType, woot. + if (AllTypeChecks) { + DenseSet Types; + SmallVector, 8> Cases; + for (unsigned i = 0, e = NewOptionsToMatch.size(); i != e; ++i) { + CheckTypeMatcher *CTM = cast(NewOptionsToMatch[i]); + assert(Types.insert(CTM->getType()).second && + "Duplicate types not factored?"); + Cases.push_back(std::make_pair(CTM->getType(), CTM->getNext())); + } + + MatcherPtr.reset(new SwitchTypeMatcher(&Cases[0], Cases.size())); + return; + } + // Reassemble the Scope node with the adjusted children. Scope->setNumChildren(NewOptionsToMatch.size()); From sabre at nondot.org Wed Mar 3 01:31:15 2010 From: sabre at nondot.org (Chris Lattner) Date: Wed, 03 Mar 2010 07:31:15 -0000 Subject: [llvm-commits] [llvm] r97651 - in /llvm/trunk: include/llvm/CodeGen/SelectionDAGISel.h lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Message-ID: <20100303073115.B645C2A6C12C@llvm.org> Author: lattner Date: Wed Mar 3 01:31:15 2010 New Revision: 97651 URL: http://llvm.org/viewvc/llvm-project?rev=97651&view=rev Log: speed up scope node processing: if the first element of a scope entry we're about to process is obviously going to fail, don't bother pushing a scope only to have it immediately be popped. This avoids a lot of scope stack traffic in common cases. Unfortunately, this requires duplicating some of the predicate dispatch. To avoid duplicating the actual logic I pulled each predicate out to its own static function which gets used in both places. Modified: llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Modified: llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h?rev=97651&r1=97650&r2=97651&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h (original) +++ llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h Wed Mar 3 01:31:15 2010 @@ -227,6 +227,8 @@ /// by tblgen. Others should not call it. void SelectInlineAsmMemoryOperands(std::vector &Ops); + +public: // Calls to these predicates are generated by tblgen. bool CheckAndMask(SDValue LHS, ConstantSDNode *RHS, int64_t DesiredMaskS) const; @@ -263,15 +265,16 @@ return SDValue(); } + SDNode *SelectCodeCommon(SDNode *NodeToMatch, + const unsigned char *MatcherTable, + unsigned TableSize); + +private: // Calls to these functions are generated by tblgen. SDNode *Select_INLINEASM(SDNode *N); SDNode *Select_UNDEF(SDNode *N); SDNode *Select_EH_LABEL(SDNode *N); - - SDNode *SelectCodeCommon(SDNode *NodeToMatch, - const unsigned char *MatcherTable, - unsigned TableSize); void CannotYetSelect(SDNode *N); void CannotYetSelectIntrinsic(SDNode *N); Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp?rev=97651&r1=97650&r2=97651&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Wed Mar 3 01:31:15 2010 @@ -1845,6 +1845,94 @@ return Res; } +/// CheckPatternPredicate - Implements OP_CheckPatternPredicate. +ALWAYS_INLINE static bool +CheckPatternPredicate(const unsigned char *MatcherTable, unsigned &MatcherIndex, + SelectionDAGISel &SDISel) { + return SDISel.CheckPatternPredicate(MatcherTable[MatcherIndex++]); +} + +/// CheckNodePredicate - Implements OP_CheckNodePredicate. +ALWAYS_INLINE static bool +CheckNodePredicate(const unsigned char *MatcherTable, unsigned &MatcherIndex, + SelectionDAGISel &SDISel, SDNode *N) { + return SDISel.CheckNodePredicate(N, MatcherTable[MatcherIndex++]); +} + +ALWAYS_INLINE static bool +CheckOpcode(const unsigned char *MatcherTable, unsigned &MatcherIndex, + SDNode *N) { + return N->getOpcode() == MatcherTable[MatcherIndex++]; +} + +ALWAYS_INLINE static bool +CheckType(const unsigned char *MatcherTable, unsigned &MatcherIndex, + SDValue N, const TargetLowering &TLI) { + MVT::SimpleValueType VT = (MVT::SimpleValueType)MatcherTable[MatcherIndex++]; + if (N.getValueType() == VT) return true; + + // Handle the case when VT is iPTR. + return VT == MVT::iPTR && N.getValueType() == TLI.getPointerTy(); +} + +ALWAYS_INLINE static bool +CheckInteger(const unsigned char *MatcherTable, unsigned &MatcherIndex, + SDValue N) { + int64_t Val = MatcherTable[MatcherIndex++]; + if (Val & 128) + Val = GetVBR(Val, MatcherTable, MatcherIndex); + + ConstantSDNode *C = dyn_cast(N); + return C != 0 && C->getSExtValue() == Val; +} + +/// IsPredicateKnownToFail - If we know how and can do so without pushing a +/// scope, evaluate the current node. If the current predicate is known to +/// fail, set Result=true and return anything. If the current predicate is +/// known to pass, set Result=false and return the MatcherIndex to continue +/// with. If the current predicate is unknown, set Result=false and return the +/// MatcherIndex to continue with. +static unsigned IsPredicateKnownToFail(const unsigned char *Table, + unsigned Index, SDValue N, + bool &Result, SelectionDAGISel &SDISel) { + switch (Table[Index++]) { + default: + Result = false; + return Index-1; // Could not evaluate this predicate. + + case SelectionDAGISel::OPC_CheckPatternPredicate: + Result = !CheckPatternPredicate(Table, Index, SDISel); + return Index; + case SelectionDAGISel::OPC_CheckPredicate: + Result = !CheckNodePredicate(Table, Index, SDISel, N.getNode()); + return Index; + case SelectionDAGISel::OPC_CheckOpcode: + Result = !::CheckOpcode(Table, Index, N.getNode()); + return Index; + case SelectionDAGISel::OPC_CheckType: + Result = !::CheckType(Table, Index, N, SDISel.TLI); + return Index; + case SelectionDAGISel::OPC_CheckChild0Type: + case SelectionDAGISel::OPC_CheckChild1Type: + case SelectionDAGISel::OPC_CheckChild2Type: + case SelectionDAGISel::OPC_CheckChild3Type: + case SelectionDAGISel::OPC_CheckChild4Type: + case SelectionDAGISel::OPC_CheckChild5Type: + case SelectionDAGISel::OPC_CheckChild6Type: + case SelectionDAGISel::OPC_CheckChild7Type: { + unsigned ChildNo = Table[Index-1] - SelectionDAGISel::OPC_CheckChild0Type; + if (ChildNo >= N.getNumOperands()) + Result = true; // Match fails if out of range child #. + else + Result = !::CheckType(Table, Index, N.getOperand(ChildNo), SDISel.TLI); + return Index; + } + case SelectionDAGISel::OPC_CheckInteger: + Result = !::CheckInteger(Table, Index, N); + return Index; + } +} + struct MatchScope { /// FailIndex - If this match fails, this is the index to continue with. @@ -1978,16 +2066,50 @@ BuiltinOpcodes Opcode = (BuiltinOpcodes)MatcherTable[MatcherIndex++]; switch (Opcode) { case OPC_Scope: { - unsigned NumToSkip = MatcherTable[MatcherIndex++]; - if (NumToSkip & 128) - NumToSkip = GetVBR(NumToSkip, MatcherTable, MatcherIndex); - assert(NumToSkip != 0 && - "First entry of OPC_Scope shouldn't be 0, scope has no children?"); + // Okay, the semantics of this operation are that we should push a scope + // then evaluate the first child. However, pushing a scope only to have + // the first check fail (which then pops it) is inefficient. If we can + // determine immediately that the first check (or first several) will + // immediately fail, don't even bother pushing a scope for them. + unsigned FailIndex; + + while (1) { + unsigned NumToSkip = MatcherTable[MatcherIndex++]; + if (NumToSkip & 128) + NumToSkip = GetVBR(NumToSkip, MatcherTable, MatcherIndex); + // Found the end of the scope with no match. + if (NumToSkip == 0) { + FailIndex = 0; + break; + } + + FailIndex = MatcherIndex+NumToSkip; + + // If we can't evaluate this predicate without pushing a scope (e.g. if + // it is a 'MoveParent') or if the predicate succeeds on this node, we + // push the scope and evaluate the full predicate chain. + bool Result; + MatcherIndex = IsPredicateKnownToFail(MatcherTable, MatcherIndex, N, + Result, *this); + if (!Result) + break; + + DEBUG(errs() << " Skipped scope entry at index " << MatcherIndex + << " continuing at " << FailIndex << "\n"); + + // Otherwise, we know that this case of the Scope is guaranteed to fail, + // move to the next case. + MatcherIndex = FailIndex; + } + + // If the whole scope failed to match, bail. + if (FailIndex == 0) break; + // Push a MatchScope which indicates where to go if the first child fails // to match. MatchScope NewEntry; - NewEntry.FailIndex = MatcherIndex+NumToSkip; + NewEntry.FailIndex = FailIndex; NewEntry.NodeStack.append(NodeStack.begin(), NodeStack.end()); NewEntry.NumRecordedNodes = RecordedNodes.size(); NewEntry.NumMatchedMemRefs = MatchedMemRefs.size(); @@ -2049,10 +2171,12 @@ continue; } case OPC_CheckPatternPredicate: - if (!CheckPatternPredicate(MatcherTable[MatcherIndex++])) break; + if (!::CheckPatternPredicate(MatcherTable, MatcherIndex, *this)) break; continue; case OPC_CheckPredicate: - if (!CheckNodePredicate(N.getNode(), MatcherTable[MatcherIndex++])) break; + if (!::CheckNodePredicate(MatcherTable, MatcherIndex, *this, + N.getNode())) + break; continue; case OPC_CheckComplexPat: if (!CheckComplexPattern(NodeToMatch, N, @@ -2060,7 +2184,11 @@ break; continue; case OPC_CheckOpcode: - if (N->getOpcode() != MatcherTable[MatcherIndex++]) break; + if (!::CheckOpcode(MatcherTable, MatcherIndex, N.getNode())) break; + continue; + + case OPC_CheckType: + if (!::CheckType(MatcherTable, MatcherIndex, N, TLI)) break; continue; case OPC_SwitchOpcode: { @@ -2091,17 +2219,6 @@ continue; } - case OPC_CheckType: { - MVT::SimpleValueType VT = - (MVT::SimpleValueType)MatcherTable[MatcherIndex++]; - if (N.getValueType() != VT) { - // Handle the case when VT is iPTR. - if (VT != MVT::iPTR || N.getValueType() != TLI.getPointerTy()) - break; - } - continue; - } - case OPC_SwitchType: { MVT::SimpleValueType CurNodeVT = N.getValueType().getSimpleVT().SimpleTy; unsigned SwitchStart = MatcherIndex-1; (void)SwitchStart; @@ -2141,15 +2258,8 @@ unsigned ChildNo = Opcode-OPC_CheckChild0Type; if (ChildNo >= N.getNumOperands()) break; // Match fails if out of range child #. - - MVT::SimpleValueType VT = - (MVT::SimpleValueType)MatcherTable[MatcherIndex++]; - EVT ChildVT = N.getOperand(ChildNo).getValueType(); - if (ChildVT != VT) { - // Handle the case when VT is iPTR. - if (VT != MVT::iPTR || ChildVT != TLI.getPointerTy()) - break; - } + if (!::CheckType(MatcherTable, MatcherIndex, N.getOperand(ChildNo), TLI)) + break; continue; } case OPC_CheckCondCode: @@ -2166,16 +2276,9 @@ } continue; } - case OPC_CheckInteger: { - int64_t Val = MatcherTable[MatcherIndex++]; - if (Val & 128) - Val = GetVBR(Val, MatcherTable, MatcherIndex); - - ConstantSDNode *C = dyn_cast(N); - if (C == 0 || C->getSExtValue() != Val) - break; + case OPC_CheckInteger: + if (!::CheckInteger(MatcherTable, MatcherIndex, N)) break; continue; - } case OPC_CheckAndImm: { int64_t Val = MatcherTable[MatcherIndex++]; if (Val & 128) From sabre at nondot.org Wed Mar 3 01:46:26 2010 From: sabre at nondot.org (Chris Lattner) Date: Wed, 03 Mar 2010 07:46:26 -0000 Subject: [llvm-commits] [llvm] r97652 - /llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Message-ID: <20100303074626.0CEFD2A6C12C@llvm.org> Author: lattner Date: Wed Mar 3 01:46:25 2010 New Revision: 97652 URL: http://llvm.org/viewvc/llvm-project?rev=97652&view=rev Log: add some of the more obscure predicate types to the Scope accelerator. Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp?rev=97652&r1=97651&r2=97652&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Wed Mar 3 01:46:25 2010 @@ -1847,6 +1847,16 @@ /// CheckPatternPredicate - Implements OP_CheckPatternPredicate. ALWAYS_INLINE static bool +CheckSame(const unsigned char *MatcherTable, unsigned &MatcherIndex, + SDValue N, const SmallVectorImpl &RecordedNodes) { + // Accept if it is exactly the same as a previously recorded node. + unsigned RecNo = MatcherTable[MatcherIndex++]; + assert(RecNo < RecordedNodes.size() && "Invalid CheckSame"); + return N == RecordedNodes[RecNo]; +} + +/// CheckPatternPredicate - Implements OP_CheckPatternPredicate. +ALWAYS_INLINE static bool CheckPatternPredicate(const unsigned char *MatcherTable, unsigned &MatcherIndex, SelectionDAGISel &SDISel) { return SDISel.CheckPatternPredicate(MatcherTable[MatcherIndex++]); @@ -1876,6 +1886,34 @@ } ALWAYS_INLINE static bool +CheckChildType(const unsigned char *MatcherTable, unsigned &MatcherIndex, + SDValue N, const TargetLowering &TLI, + unsigned ChildNo) { + if (ChildNo >= N.getNumOperands()) + return false; // Match fails if out of range child #. + return ::CheckType(MatcherTable, MatcherIndex, N.getOperand(ChildNo), TLI); +} + + +ALWAYS_INLINE static bool +CheckCondCode(const unsigned char *MatcherTable, unsigned &MatcherIndex, + SDValue N) { + return cast(N)->get() == + (ISD::CondCode)MatcherTable[MatcherIndex++]; +} + +ALWAYS_INLINE static bool +CheckValueType(const unsigned char *MatcherTable, unsigned &MatcherIndex, + SDValue N, const TargetLowering &TLI) { + MVT::SimpleValueType VT = (MVT::SimpleValueType)MatcherTable[MatcherIndex++]; + if (cast(N)->getVT() == VT) + return true; + + // Handle the case when VT is iPTR. + return VT == MVT::iPTR && cast(N)->getVT() == TLI.getPointerTy(); +} + +ALWAYS_INLINE static bool CheckInteger(const unsigned char *MatcherTable, unsigned &MatcherIndex, SDValue N) { int64_t Val = MatcherTable[MatcherIndex++]; @@ -1886,6 +1924,32 @@ return C != 0 && C->getSExtValue() == Val; } +ALWAYS_INLINE static bool +CheckAndImm(const unsigned char *MatcherTable, unsigned &MatcherIndex, + SDValue N, SelectionDAGISel &SDISel) { + int64_t Val = MatcherTable[MatcherIndex++]; + if (Val & 128) + Val = GetVBR(Val, MatcherTable, MatcherIndex); + + if (N->getOpcode() != ISD::AND) return false; + + ConstantSDNode *C = dyn_cast(N->getOperand(1)); + return C != 0 && SDISel.CheckAndMask(N.getOperand(0), C, Val); +} + +ALWAYS_INLINE static bool +CheckOrImm(const unsigned char *MatcherTable, unsigned &MatcherIndex, + SDValue N, SelectionDAGISel &SDISel) { + int64_t Val = MatcherTable[MatcherIndex++]; + if (Val & 128) + Val = GetVBR(Val, MatcherTable, MatcherIndex); + + if (N->getOpcode() != ISD::OR) return false; + + ConstantSDNode *C = dyn_cast(N->getOperand(1)); + return C != 0 && SDISel.CheckOrMask(N.getOperand(0), C, Val); +} + /// IsPredicateKnownToFail - If we know how and can do so without pushing a /// scope, evaluate the current node. If the current predicate is known to /// fail, set Result=true and return anything. If the current predicate is @@ -1894,17 +1958,20 @@ /// MatcherIndex to continue with. static unsigned IsPredicateKnownToFail(const unsigned char *Table, unsigned Index, SDValue N, - bool &Result, SelectionDAGISel &SDISel) { + bool &Result, SelectionDAGISel &SDISel, + SmallVectorImpl &RecordedNodes){ switch (Table[Index++]) { default: Result = false; return Index-1; // Could not evaluate this predicate. - + case SelectionDAGISel::OPC_CheckSame: + Result = !::CheckSame(Table, Index, N, RecordedNodes); + return Index; case SelectionDAGISel::OPC_CheckPatternPredicate: - Result = !CheckPatternPredicate(Table, Index, SDISel); + Result = !::CheckPatternPredicate(Table, Index, SDISel); return Index; case SelectionDAGISel::OPC_CheckPredicate: - Result = !CheckNodePredicate(Table, Index, SDISel, N.getNode()); + Result = !::CheckNodePredicate(Table, Index, SDISel, N.getNode()); return Index; case SelectionDAGISel::OPC_CheckOpcode: Result = !::CheckOpcode(Table, Index, N.getNode()); @@ -1919,17 +1986,25 @@ case SelectionDAGISel::OPC_CheckChild4Type: case SelectionDAGISel::OPC_CheckChild5Type: case SelectionDAGISel::OPC_CheckChild6Type: - case SelectionDAGISel::OPC_CheckChild7Type: { - unsigned ChildNo = Table[Index-1] - SelectionDAGISel::OPC_CheckChild0Type; - if (ChildNo >= N.getNumOperands()) - Result = true; // Match fails if out of range child #. - else - Result = !::CheckType(Table, Index, N.getOperand(ChildNo), SDISel.TLI); + case SelectionDAGISel::OPC_CheckChild7Type: + Result = !::CheckChildType(Table, Index, N, SDISel.TLI, + Table[Index-1] - SelectionDAGISel::OPC_CheckChild0Type); + return Index; + case SelectionDAGISel::OPC_CheckCondCode: + Result = !::CheckCondCode(Table, Index, N); + return Index; + case SelectionDAGISel::OPC_CheckValueType: + Result = !::CheckValueType(Table, Index, N, SDISel.TLI); return Index; - } case SelectionDAGISel::OPC_CheckInteger: Result = !::CheckInteger(Table, Index, N); return Index; + case SelectionDAGISel::OPC_CheckAndImm: + Result = !::CheckAndImm(Table, Index, N, SDISel); + return Index; + case SelectionDAGISel::OPC_CheckOrImm: + Result = !::CheckOrImm(Table, Index, N, SDISel); + return Index; } } @@ -2090,7 +2165,7 @@ // push the scope and evaluate the full predicate chain. bool Result; MatcherIndex = IsPredicateKnownToFail(MatcherTable, MatcherIndex, N, - Result, *this); + Result, *this, RecordedNodes); if (!Result) break; @@ -2163,13 +2238,9 @@ N = NodeStack.back(); continue; - case OPC_CheckSame: { - // Accept if it is exactly the same as a previously recorded node. - unsigned RecNo = MatcherTable[MatcherIndex++]; - assert(RecNo < RecordedNodes.size() && "Invalid CheckSame"); - if (N != RecordedNodes[RecNo]) break; + case OPC_CheckSame: + if (!::CheckSame(MatcherTable, MatcherIndex, N, RecordedNodes)) break; continue; - } case OPC_CheckPatternPredicate: if (!::CheckPatternPredicate(MatcherTable, MatcherIndex, *this)) break; continue; @@ -2254,54 +2325,26 @@ case OPC_CheckChild0Type: case OPC_CheckChild1Type: case OPC_CheckChild2Type: case OPC_CheckChild3Type: case OPC_CheckChild4Type: case OPC_CheckChild5Type: - case OPC_CheckChild6Type: case OPC_CheckChild7Type: { - unsigned ChildNo = Opcode-OPC_CheckChild0Type; - if (ChildNo >= N.getNumOperands()) - break; // Match fails if out of range child #. - if (!::CheckType(MatcherTable, MatcherIndex, N.getOperand(ChildNo), TLI)) + case OPC_CheckChild6Type: case OPC_CheckChild7Type: + if (!::CheckChildType(MatcherTable, MatcherIndex, N, TLI, + Opcode-OPC_CheckChild0Type)) break; continue; - } case OPC_CheckCondCode: - if (cast(N)->get() != - (ISD::CondCode)MatcherTable[MatcherIndex++]) break; + if (!::CheckCondCode(MatcherTable, MatcherIndex, N)) break; continue; - case OPC_CheckValueType: { - MVT::SimpleValueType VT = - (MVT::SimpleValueType)MatcherTable[MatcherIndex++]; - if (cast(N)->getVT() != VT) { - // Handle the case when VT is iPTR. - if (VT != MVT::iPTR || cast(N)->getVT() != TLI.getPointerTy()) - break; - } + case OPC_CheckValueType: + if (!::CheckValueType(MatcherTable, MatcherIndex, N, TLI)) break; continue; - } case OPC_CheckInteger: if (!::CheckInteger(MatcherTable, MatcherIndex, N)) break; continue; - case OPC_CheckAndImm: { - int64_t Val = MatcherTable[MatcherIndex++]; - if (Val & 128) - Val = GetVBR(Val, MatcherTable, MatcherIndex); - - if (N->getOpcode() != ISD::AND) break; - ConstantSDNode *C = dyn_cast(N->getOperand(1)); - if (C == 0 || !CheckAndMask(N.getOperand(0), C, Val)) - break; + case OPC_CheckAndImm: + if (!::CheckAndImm(MatcherTable, MatcherIndex, N, *this)) break; continue; - } - case OPC_CheckOrImm: { - int64_t Val = MatcherTable[MatcherIndex++]; - if (Val & 128) - Val = GetVBR(Val, MatcherTable, MatcherIndex); - - if (N->getOpcode() != ISD::OR) break; - - ConstantSDNode *C = dyn_cast(N->getOperand(1)); - if (C == 0 || !CheckOrMask(N.getOperand(0), C, Val)) - break; + case OPC_CheckOrImm: + if (!::CheckOrImm(MatcherTable, MatcherIndex, N, *this)) break; continue; - } case OPC_CheckFoldableChainNode: { assert(NodeStack.size() != 1 && "No parent node"); From johnny.chen at apple.com Wed Mar 3 12:45:36 2010 From: johnny.chen at apple.com (Johnny Chen) Date: Wed, 03 Mar 2010 18:45:36 -0000 Subject: [llvm-commits] [llvm] r97655 - /llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td Message-ID: <20100303184537.0C85D2A6C12C@llvm.org> Author: johnny Date: Wed Mar 3 12:45:36 2010 New Revision: 97655 URL: http://llvm.org/viewvc/llvm-project?rev=97655&view=rev Log: Added 32-bit Thumb instructions LDRT, LDRBT, LDRHT,,LDRSBT, LDRSHT, STRT, STRBT, and STRHT for disassembly only. Modified: llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td Modified: llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td?rev=97655&r1=97654&r2=97655&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td (original) +++ llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td Wed Mar 3 12:45:36 2010 @@ -983,6 +983,28 @@ []>; } +// LDRT, LDRBT, LDRHT, LDRSBT, LDRSHT all have offset mode (PUW=0b110) and are +// for disassembly only. +// Ref: A8.6.57 LDR (immediate, Thumb) Encoding T4 +class T2IldT type, string opc> + : T2Ii8<(outs GPR:$dst), (ins t2addrmode_imm8:$addr), IIC_iLoadi, opc, + "\t$dst, $addr", []> { + let Inst{31-27} = 0b11111; + let Inst{26-25} = 0b00; + let Inst{24} = signed; + let Inst{23} = 0; + let Inst{22-21} = type; + let Inst{20} = 1; // load + let Inst{11} = 1; + let Inst{10-8} = 0b110; // PUW. +} + +def t2LDRT : T2IldT<0, 0b10, "ldrt">; +def t2LDRBT : T2IldT<0, 0b00, "ldrbt">; +def t2LDRHT : T2IldT<0, 0b01, "ldrht">; +def t2LDRSBT : T2IldT<1, 0b00, "ldrsbt">; +def t2LDRSHT : T2IldT<1, 0b01, "ldrsht">; + // Store defm t2STR :T2I_st<0b10,"str", BinOpFrag<(store node:$LHS, node:$RHS)>>; defm t2STRB:T2I_st<0b00,"strb",BinOpFrag<(truncstorei8 node:$LHS, node:$RHS)>>; @@ -1037,6 +1059,25 @@ [(set GPR:$base_wb, (post_truncsti8 GPR:$src, GPR:$base, t2am_imm8_offset:$offset))]>; +// STRT, STRBT, STRHT all have offset mode (PUW=0b110) and are for disassembly +// only. +// Ref: A8.6.193 STR (immediate, Thumb) Encoding T4 +class T2IstT type, string opc> + : T2Ii8<(outs GPR:$src), (ins t2addrmode_imm8:$addr), IIC_iStorei, opc, + "\t$src, $addr", []> { + let Inst{31-27} = 0b11111; + let Inst{26-25} = 0b00; + let Inst{24} = 0; // not signed + let Inst{23} = 0; + let Inst{22-21} = type; + let Inst{20} = 0; // store + let Inst{11} = 1; + let Inst{10-8} = 0b110; // PUW +} + +def t2STRT : T2IstT<0b10, "strt">; +def t2STRBT : T2IstT<0b00, "strbt">; +def t2STRHT : T2IstT<0b01, "strht">; // FIXME: ldrd / strd pre / post variants From isanbard at gmail.com Wed Mar 3 13:31:05 2010 From: isanbard at gmail.com (Bill Wendling) Date: Wed, 03 Mar 2010 19:31:05 -0000 Subject: [llvm-commits] [llvm] r97657 - /llvm/trunk/lib/CodeGen/TargetLoweringObjectFileImpl.cpp Message-ID: <20100303193105.A0B8A2A6C12C@llvm.org> Author: void Date: Wed Mar 3 13:31:05 2010 New Revision: 97657 URL: http://llvm.org/viewvc/llvm-project?rev=97657&view=rev Log: Revert... --- Reverse-merging r97592 into '.': U lib/CodeGen/TargetLoweringObjectFileImpl.cpp Modified: llvm/trunk/lib/CodeGen/TargetLoweringObjectFileImpl.cpp Modified: llvm/trunk/lib/CodeGen/TargetLoweringObjectFileImpl.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/TargetLoweringObjectFileImpl.cpp?rev=97657&r1=97656&r2=97657&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/TargetLoweringObjectFileImpl.cpp (original) +++ llvm/trunk/lib/CodeGen/TargetLoweringObjectFileImpl.cpp Wed Mar 3 13:31:05 2010 @@ -550,8 +550,8 @@ } // Exception Handling. - LSDASection = getMachOSection("__TEXT", "__gcc_except_tab", 0, - SectionKind::getReadOnlyWithRel()); + LSDASection = getMachOSection("__DATA", "__gcc_except_tab", 0, + SectionKind::getDataRel()); EHFrameSection = getMachOSection("__TEXT", "__eh_frame", MCSectionMachO::S_COALESCED | @@ -779,7 +779,7 @@ } unsigned TargetLoweringObjectFileMachO::getTTypeEncoding() const { - return DW_EH_PE_indirect | DW_EH_PE_pcrel | DW_EH_PE_sdata4; + return DW_EH_PE_absptr; } //===----------------------------------------------------------------------===// From sabre at nondot.org Wed Mar 3 13:46:03 2010 From: sabre at nondot.org (Chris Lattner) Date: Wed, 03 Mar 2010 19:46:03 -0000 Subject: [llvm-commits] [llvm] r97659 - in /llvm/trunk: lib/Analysis/InstructionSimplify.cpp lib/VMCore/ConstantFold.cpp test/Transforms/InstCombine/icmp.ll Message-ID: <20100303194603.5FA7C2A6C12C@llvm.org> Author: lattner Date: Wed Mar 3 13:46:03 2010 New Revision: 97659 URL: http://llvm.org/viewvc/llvm-project?rev=97659&view=rev Log: fix incorrect folding of icmp with undef, PR6481. Modified: llvm/trunk/lib/Analysis/InstructionSimplify.cpp llvm/trunk/lib/VMCore/ConstantFold.cpp llvm/trunk/test/Transforms/InstCombine/icmp.ll Modified: llvm/trunk/lib/Analysis/InstructionSimplify.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/InstructionSimplify.cpp?rev=97659&r1=97658&r2=97659&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/InstructionSimplify.cpp (original) +++ llvm/trunk/lib/Analysis/InstructionSimplify.cpp Wed Mar 3 13:46:03 2010 @@ -194,11 +194,10 @@ const Type *ITy = GetCompareTy(LHS); // icmp X, X -> true/false - if (LHS == RHS) + // X icmp undef -> true/false. For example, icmp ugt %X, undef -> false + // because X could be 0. + if (LHS == RHS || isa(RHS)) return ConstantInt::get(ITy, CmpInst::isTrueWhenEqual(Pred)); - - if (isa(RHS)) // X icmp undef -> undef - return UndefValue::get(ITy); // icmp , - Global/Stack value // addresses never equal each other! We already know that Op0 != Op1. Modified: llvm/trunk/lib/VMCore/ConstantFold.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/ConstantFold.cpp?rev=97659&r1=97658&r2=97659&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/ConstantFold.cpp (original) +++ llvm/trunk/lib/VMCore/ConstantFold.cpp Wed Mar 3 13:46:03 2010 @@ -1818,7 +1818,7 @@ // Handle some degenerate cases first if (isa(C1) || isa(C2)) - return UndefValue::get(ResultTy); + return ConstantInt::get(ResultTy, CmpInst::isTrueWhenEqual(pred)); // No compile-time operations on this type yet. if (C1->getType()->isPPC_FP128Ty()) Modified: llvm/trunk/test/Transforms/InstCombine/icmp.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/icmp.ll?rev=97659&r1=97658&r2=97659&view=diff ============================================================================== --- llvm/trunk/test/Transforms/InstCombine/icmp.ll (original) +++ llvm/trunk/test/Transforms/InstCombine/icmp.ll Wed Mar 3 13:46:03 2010 @@ -48,7 +48,7 @@ %V = icmp eq <2 x i64> %x, undef ret <2 x i1> %V ; CHECK: @test5 -; CHECK: ret <2 x i1> undef +; CHECK: ret <2 x i1> } define i32 @test6(i32 %a, i32 %b) { @@ -121,3 +121,13 @@ ; CHECK-NEXT: %B = select i1 ; CHECK-NEXT: ret i1 %B } + +; PR6481 +define i1 @test13(i8 %X) nounwind readnone { +entry: + %cmp = icmp slt i8 undef, %X + ret i1 %cmp +; CHECK: @test13 +; CHECK: ret i1 false +} + From alenhar2 at llvm.org Wed Mar 3 14:15:31 2010 From: alenhar2 at llvm.org (alenhar2 at llvm.org) Date: Wed, 03 Mar 2010 20:15:31 -0000 Subject: [llvm-commits] [llvm] r97660 - /llvm/trunk/lib/Target/Alpha/AlphaCallingConv.td Message-ID: <20100303201531.EDC032A6C12C@llvm.org> Author: alenhar2 Date: Wed Mar 3 14:15:31 2010 New Revision: 97660 URL: http://llvm.org/viewvc/llvm-project?rev=97660&view=rev Log: Fix PR6444, note still doesn't compile libgcc2 all the way, but fixes that error. May not fix it in an ABI complient way. It wasn't clear what gcc does Modified: llvm/trunk/lib/Target/Alpha/AlphaCallingConv.td Modified: llvm/trunk/lib/Target/Alpha/AlphaCallingConv.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Alpha/AlphaCallingConv.td?rev=97660&r1=97659&r2=97660&view=diff ============================================================================== --- llvm/trunk/lib/Target/Alpha/AlphaCallingConv.td (original) +++ llvm/trunk/lib/Target/Alpha/AlphaCallingConv.td Wed Mar 3 14:15:31 2010 @@ -14,7 +14,8 @@ //===----------------------------------------------------------------------===// def RetCC_Alpha : CallingConv<[ // i64 is returned in register R0 - CCIfType<[i64], CCAssignToReg<[R0]>>, + // R1 is an llvm extension, I don't know what gcc does + CCIfType<[i64], CCAssignToReg<[R0,R1]>>, // f32 / f64 are returned in F0/F1 CCIfType<[f32, f64], CCAssignToReg<[F0, F1]>> From evan.cheng at apple.com Wed Mar 3 14:46:48 2010 From: evan.cheng at apple.com (Evan Cheng) Date: Wed, 03 Mar 2010 20:46:48 -0000 Subject: [llvm-commits] [llvm] r97661 - /llvm/trunk/include/llvm/ADT/ScopedHashTable.h Message-ID: <20100303204648.980422A6C12C@llvm.org> Author: evancheng Date: Wed Mar 3 14:46:48 2010 New Revision: 97661 URL: http://llvm.org/viewvc/llvm-project?rev=97661&view=rev Log: TopLevelMap[] reference is a pointer. Modified: llvm/trunk/include/llvm/ADT/ScopedHashTable.h Modified: llvm/trunk/include/llvm/ADT/ScopedHashTable.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/ScopedHashTable.h?rev=97661&r1=97660&r2=97661&view=diff ============================================================================== --- llvm/trunk/include/llvm/ADT/ScopedHashTable.h (original) +++ llvm/trunk/include/llvm/ADT/ScopedHashTable.h Wed Mar 3 14:46:48 2010 @@ -139,7 +139,7 @@ } V lookup(const K &Key) { - return TopLevelMap[Key].getValue(); + return TopLevelMap[Key]->getValue(); } void insert(const K &Key, const V &Val) { From sabre at nondot.org Wed Mar 3 14:47:12 2010 From: sabre at nondot.org (Chris Lattner) Date: Wed, 03 Mar 2010 20:47:12 -0000 Subject: [llvm-commits] [llvm] r97662 - /llvm/trunk/include/llvm/Support/Compiler.h Message-ID: <20100303204712.8132C2A6C12C@llvm.org> Author: lattner Date: Wed Mar 3 14:47:12 2010 New Revision: 97662 URL: http://llvm.org/viewvc/llvm-project?rev=97662&view=rev Log: don't use always_inline with gcc 3.4, it has some unimplemented features and is too old to really care about the performance of the generated compiler. Modified: llvm/trunk/include/llvm/Support/Compiler.h Modified: llvm/trunk/include/llvm/Support/Compiler.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/Compiler.h?rev=97662&r1=97661&r2=97662&view=diff ============================================================================== --- llvm/trunk/include/llvm/Support/Compiler.h (original) +++ llvm/trunk/include/llvm/Support/Compiler.h Wed Mar 3 14:47:12 2010 @@ -78,7 +78,9 @@ // ALWAYS_INLINE - On compilers where we have a directive to do so, mark a // method "always inline" because it is performance sensitive. -#if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) +// GCC 3.4 supported this but is buggy in various cases and produces +// unimplemented errors, just use it in GCC 4.0 and later. +#if __GNUC__ > 3 #define ALWAYS_INLINE __attribute__((always_inline)) #else // TODO: No idea how to do this with MSVC. From evan.cheng at apple.com Wed Mar 3 15:18:38 2010 From: evan.cheng at apple.com (Evan Cheng) Date: Wed, 03 Mar 2010 21:18:38 -0000 Subject: [llvm-commits] [llvm] r97663 - in /llvm/trunk: include/llvm/CodeGen/MachineRegisterInfo.h lib/CodeGen/MachineRegisterInfo.cpp lib/CodeGen/TwoAddressInstructionPass.cpp Message-ID: <20100303211838.9BD012A6C12C@llvm.org> Author: evancheng Date: Wed Mar 3 15:18:38 2010 New Revision: 97663 URL: http://llvm.org/viewvc/llvm-project?rev=97663&view=rev Log: Add MachineRegisterInfo::hasOneUse and hasOneNonDBGUse. Modified: llvm/trunk/include/llvm/CodeGen/MachineRegisterInfo.h llvm/trunk/lib/CodeGen/MachineRegisterInfo.cpp llvm/trunk/lib/CodeGen/TwoAddressInstructionPass.cpp Modified: llvm/trunk/include/llvm/CodeGen/MachineRegisterInfo.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineRegisterInfo.h?rev=97663&r1=97662&r2=97663&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/MachineRegisterInfo.h (original) +++ llvm/trunk/include/llvm/CodeGen/MachineRegisterInfo.h Wed Mar 3 15:18:38 2010 @@ -115,6 +115,10 @@ /// register. bool use_empty(unsigned RegNo) const { return use_begin(RegNo) == use_end(); } + /// hasOneUse - Return true if there is exactly one instruction using the + /// specified register. + bool hasOneUse(unsigned RegNo) const; + /// use_nodbg_iterator/use_nodbg_begin/use_nodbg_end - Walk all uses of the /// specified register, skipping those marked as Debug. typedef defusechain_iterator use_nodbg_iterator; @@ -129,6 +133,10 @@ return use_nodbg_begin(RegNo) == use_nodbg_end(); } + /// hasOneNonDBGUse - Return true if there is exactly one non-Debug + /// instruction using the specified register. + bool hasOneNonDBGUse(unsigned RegNo) const; + /// replaceRegWith - Replace all instances of FromReg with ToReg in the /// machine function. This is like llvm-level X->replaceAllUsesWith(Y), /// except that it also changes any definitions of the register as well. Modified: llvm/trunk/lib/CodeGen/MachineRegisterInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineRegisterInfo.cpp?rev=97663&r1=97662&r2=97663&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/MachineRegisterInfo.cpp (original) +++ llvm/trunk/lib/CodeGen/MachineRegisterInfo.cpp Wed Mar 3 15:18:38 2010 @@ -116,6 +116,19 @@ return 0; } +bool MachineRegisterInfo::hasOneUse(unsigned RegNo) const { + use_iterator UI = use_begin(RegNo); + if (UI == use_end()) + return false; + return ++UI == use_end(); +} + +bool MachineRegisterInfo::hasOneNonDBGUse(unsigned RegNo) const { + use_nodbg_iterator UI = use_nodbg_begin(RegNo); + if (UI == use_nodbg_end()) + return false; + return ++UI == use_nodbg_end(); +} #ifndef NDEBUG void MachineRegisterInfo::dumpUses(unsigned Reg) const { Modified: llvm/trunk/lib/CodeGen/TwoAddressInstructionPass.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/TwoAddressInstructionPass.cpp?rev=97663&r1=97662&r2=97663&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/TwoAddressInstructionPass.cpp (original) +++ llvm/trunk/lib/CodeGen/TwoAddressInstructionPass.cpp Wed Mar 3 15:18:38 2010 @@ -454,13 +454,10 @@ const TargetInstrInfo *TII, bool &IsCopy, unsigned &DstReg, bool &IsDstPhys) { - MachineRegisterInfo::use_nodbg_iterator UI = MRI->use_nodbg_begin(Reg); - if (UI == MRI->use_nodbg_end()) - return 0; - MachineInstr &UseMI = *UI; - if (++UI != MRI->use_nodbg_end()) - // More than one use. + if (!MRI->hasOneNonDBGUse(Reg)) + // None or more than one use. return 0; + MachineInstr &UseMI = *MRI->use_nodbg_begin(Reg); if (UseMI.getParent() != MBB) return 0; unsigned SrcReg; From evan.cheng at apple.com Wed Mar 3 15:20:05 2010 From: evan.cheng at apple.com (Evan Cheng) Date: Wed, 03 Mar 2010 21:20:05 -0000 Subject: [llvm-commits] [llvm] r97664 - /llvm/trunk/lib/CodeGen/MachineCSE.cpp Message-ID: <20100303212005.D3ADB2A6C12C@llvm.org> Author: evancheng Date: Wed Mar 3 15:20:05 2010 New Revision: 97664 URL: http://llvm.org/viewvc/llvm-project?rev=97664&view=rev Log: Machine CSE work in progress. It's doing some CSE now. But implicit def of physical registers are getting in the way. Modified: llvm/trunk/lib/CodeGen/MachineCSE.cpp Modified: llvm/trunk/lib/CodeGen/MachineCSE.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineCSE.cpp?rev=97664&r1=97663&r2=97664&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/MachineCSE.cpp (original) +++ llvm/trunk/lib/CodeGen/MachineCSE.cpp Wed Mar 3 15:20:05 2010 @@ -25,6 +25,9 @@ using namespace llvm; +STATISTIC(NumCoalesces, "Number of copies coalesced"); +STATISTIC(NumCSEs, "Number of common subexpression eliminated"); + namespace llvm { template<> struct DenseMapInfo { static inline MachineInstr *getEmptyKey() { @@ -93,8 +96,6 @@ const TargetInstrInfo *TII; MachineRegisterInfo *MRI; MachineDominatorTree *DT; - ScopedHashTable VNT; - unsigned CurrVN; public: static char ID; // Pass identification MachineCSE() : MachineFunctionPass(&ID), CurrVN(0) {} @@ -109,6 +110,10 @@ } private: + unsigned CurrVN; + ScopedHashTable VNT; + SmallVector Exps; + bool PerformTrivialCoalescing(MachineInstr *MI, MachineBasicBlock *MBB); bool ProcessBlock(MachineDomTreeNode *Node); }; @@ -125,20 +130,26 @@ bool Changed = false; for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) { MachineOperand &MO = MI->getOperand(i); - if (MO.isReg() && MO.isUse()) { - unsigned Reg = MO.getReg(); - if (!Reg || TargetRegisterInfo::isPhysicalRegister(Reg)) - continue; - MachineInstr *DefMI = MRI->getVRegDef(Reg); - if (DefMI->getParent() == MBB) { - unsigned SrcReg, DstReg, SrcSubIdx, DstSubIdx; - if (TII->isMoveInstr(*DefMI, SrcReg, DstReg, SrcSubIdx, DstSubIdx) && - TargetRegisterInfo::isVirtualRegister(SrcReg) && - !SrcSubIdx && !DstSubIdx) { - MO.setReg(SrcReg); - Changed = true; - } - } + if (!MO.isReg() || !MO.isUse()) + continue; + unsigned Reg = MO.getReg(); + if (!Reg || TargetRegisterInfo::isPhysicalRegister(Reg)) + continue; + if (!MRI->hasOneUse(Reg)) + // Only coalesce single use copies. This ensure the copy will be + // deleted. + continue; + MachineInstr *DefMI = MRI->getVRegDef(Reg); + if (DefMI->getParent() != MBB) + continue; + unsigned SrcReg, DstReg, SrcSubIdx, DstSubIdx; + if (TII->isMoveInstr(*DefMI, SrcReg, DstReg, SrcSubIdx, DstSubIdx) && + TargetRegisterInfo::isVirtualRegister(SrcReg) && + !SrcSubIdx && !DstSubIdx) { + MO.setReg(SrcReg); + DefMI->eraseFromParent(); + ++NumCoalesces; + Changed = true; } } @@ -153,6 +164,8 @@ unsigned Reg = MO.getReg(); if (!Reg) continue; + // FIXME: This is obviously overly conservative. On x86 lots of instructions + // will def EFLAGS and they are not marked dead at this point. if (TargetRegisterInfo::isPhysicalRegister(Reg) && !(MO.isDef() && MO.isDead())) return true; @@ -165,17 +178,18 @@ ScopedHashTableScope VNTS(VNT); MachineBasicBlock *MBB = Node->getBlock(); - for (MachineBasicBlock::iterator I = MBB->begin(), E = MBB->end(); I != E; - ++I) { + for (MachineBasicBlock::iterator I = MBB->begin(), E = MBB->end(); I != E; ) { MachineInstr *MI = &*I; + ++I; bool SawStore = false; if (!MI->isSafeToMove(TII, 0, SawStore)) continue; // Ignore copies or instructions that read / write physical registers // (except for dead defs of physical registers). unsigned SrcReg, DstReg, SrcSubIdx, DstSubIdx; - if (TII->isMoveInstr(*MI, SrcReg, DstReg, SrcSubIdx, DstSubIdx)) - continue; + if (TII->isMoveInstr(*MI, SrcReg, DstReg, SrcSubIdx, DstSubIdx) || + MI->isExtractSubreg() || MI->isInsertSubreg() || MI->isSubregToReg()) + continue; if (hasLivePhysRegDefUse(MI)) continue; @@ -186,10 +200,33 @@ FoundCSE = VNT.count(MI); } - if (FoundCSE) - DEBUG(dbgs() << "Found a common subexpression: " << *MI); - else - VNT.insert(MI, ++CurrVN); + if (!FoundCSE) { + VNT.insert(MI, CurrVN++); + Exps.push_back(MI); + continue; + } + + // Found a common subexpression, eliminate it. + unsigned CSVN = VNT.lookup(MI); + MachineInstr *CSMI = Exps[CSVN]; + DEBUG(dbgs() << "Examining: " << *MI); + DEBUG(dbgs() << "*** Found a common subexpression: " << *CSMI); + unsigned NumDefs = MI->getDesc().getNumDefs(); + for (unsigned i = 0, e = MI->getNumOperands(); NumDefs && i != e; ++i) { + MachineOperand &MO = MI->getOperand(i); + if (!MO.isReg() || !MO.isDef()) + continue; + unsigned OldReg = MO.getReg(); + unsigned NewReg = CSMI->getOperand(i).getReg(); + assert(OldReg != NewReg && + TargetRegisterInfo::isVirtualRegister(OldReg) && + TargetRegisterInfo::isVirtualRegister(NewReg) && + "Do not CSE physical register defs!"); + MRI->replaceRegWith(OldReg, NewReg); + --NumDefs; + } + MI->eraseFromParent(); + ++NumCSEs; } // Recursively call ProcessBlock with childred. From gohman at apple.com Wed Mar 3 15:33:38 2010 From: gohman at apple.com (Dan Gohman) Date: Wed, 03 Mar 2010 21:33:38 -0000 Subject: [llvm-commits] [llvm] r97665 - /llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Message-ID: <20100303213338.2C5522A6C12C@llvm.org> Author: djg Date: Wed Mar 3 15:33:37 2010 New Revision: 97665 URL: http://llvm.org/viewvc/llvm-project?rev=97665&view=rev Log: Fix a bug in SelectionDAG's ReplaceAllUsesWith in the case where CSE and recursive RAUW calls delete a node from the use list, invalidating the use list iterator. There's currently no known way to reproduce this in an unmodified LLVM, however there's no fundamental reason why a SelectionDAG couldn't be formed which would trigger this case. Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp?rev=97665&r1=97664&r2=97665&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Wed Mar 3 15:33:37 2010 @@ -4869,6 +4869,43 @@ return NULL; } +namespace { + +/// RAUWUpdateListner - Helper for ReplaceAllUsesWith - When the node +/// pointed to by a use iterator is deleted, increment the use iterator +/// so that it doesn't dangle. +/// +/// This class also manages a "downlink" DAGUpdateListener, to forward +/// messages to ReplaceAllUsesWith's callers. +/// +class RAUWUpdateListener : public SelectionDAG::DAGUpdateListener { + SelectionDAG::DAGUpdateListener *DownLink; + SDNode::use_iterator &UI; + SDNode::use_iterator &UE; + + virtual void NodeDeleted(SDNode *N, SDNode *E) { + // Increment the iterator as needed. + while (UI != UE && N == *UI) + ++UI; + + // Then forward the message. + if (DownLink) DownLink->NodeDeleted(N, E); + } + + virtual void NodeUpdated(SDNode *N) { + // Just forward the message. + if (DownLink) DownLink->NodeUpdated(N); + } + +public: + RAUWUpdateListener(SelectionDAG::DAGUpdateListener *dl, + SDNode::use_iterator &ui, + SDNode::use_iterator &ue) + : DownLink(dl), UI(ui), UE(ue) {} +}; + +} + /// ReplaceAllUsesWith - Modify anything using 'From' to use 'To' instead. /// This can cause recursive merging of nodes in the DAG. /// @@ -4889,6 +4926,7 @@ // is replaced by To, we don't want to replace of all its users with To // too. See PR3018 for more info. SDNode::use_iterator UI = From->use_begin(), UE = From->use_end(); + RAUWUpdateListener Listener(UpdateListener, UI, UE); while (UI != UE) { SDNode *User = *UI; @@ -4907,7 +4945,7 @@ // Now that we have modified User, add it back to the CSE maps. If it // already exists there, recursively merge the results together. - AddModifiedNodeToCSEMaps(User, UpdateListener); + AddModifiedNodeToCSEMaps(User, &Listener); } } @@ -4933,6 +4971,7 @@ // Iterate over just the existing users of From. See the comments in // the ReplaceAllUsesWith above. SDNode::use_iterator UI = From->use_begin(), UE = From->use_end(); + RAUWUpdateListener Listener(UpdateListener, UI, UE); while (UI != UE) { SDNode *User = *UI; @@ -4951,7 +4990,7 @@ // Now that we have modified User, add it back to the CSE maps. If it // already exists there, recursively merge the results together. - AddModifiedNodeToCSEMaps(User, UpdateListener); + AddModifiedNodeToCSEMaps(User, &Listener); } } @@ -4969,6 +5008,7 @@ // Iterate over just the existing users of From. See the comments in // the ReplaceAllUsesWith above. SDNode::use_iterator UI = From->use_begin(), UE = From->use_end(); + RAUWUpdateListener Listener(UpdateListener, UI, UE); while (UI != UE) { SDNode *User = *UI; @@ -4988,7 +5028,7 @@ // Now that we have modified User, add it back to the CSE maps. If it // already exists there, recursively merge the results together. - AddModifiedNodeToCSEMaps(User, UpdateListener); + AddModifiedNodeToCSEMaps(User, &Listener); } } @@ -5010,6 +5050,7 @@ // the ReplaceAllUsesWith above. SDNode::use_iterator UI = From.getNode()->use_begin(), UE = From.getNode()->use_end(); + RAUWUpdateListener Listener(UpdateListener, UI, UE); while (UI != UE) { SDNode *User = *UI; bool UserRemovedFromCSEMaps = false; @@ -5045,7 +5086,7 @@ // Now that we have modified User, add it back to the CSE maps. If it // already exists there, recursively merge the results together. - AddModifiedNodeToCSEMaps(User, UpdateListener); + AddModifiedNodeToCSEMaps(User, &Listener); } } From evan.cheng at apple.com Wed Mar 3 15:47:16 2010 From: evan.cheng at apple.com (Evan Cheng) Date: Wed, 03 Mar 2010 21:47:16 -0000 Subject: [llvm-commits] [llvm] r97667 - in /llvm/trunk: include/llvm/CodeGen/MachineInstr.h lib/CodeGen/MachineCSE.cpp Message-ID: <20100303214716.943C42A6C12C@llvm.org> Author: evancheng Date: Wed Mar 3 15:47:16 2010 New Revision: 97667 URL: http://llvm.org/viewvc/llvm-project?rev=97667&view=rev Log: Move DenseMapInfo for MachineInstr* to MachineInstr.h Modified: llvm/trunk/include/llvm/CodeGen/MachineInstr.h llvm/trunk/lib/CodeGen/MachineCSE.cpp Modified: llvm/trunk/include/llvm/CodeGen/MachineInstr.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineInstr.h?rev=97667&r1=97666&r2=97667&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/MachineInstr.h (original) +++ llvm/trunk/include/llvm/CodeGen/MachineInstr.h Wed Mar 3 15:47:16 2010 @@ -419,6 +419,68 @@ void AddRegOperandsToUseLists(MachineRegisterInfo &RegInfo); }; +/// DenseMapInfo for MachineInstr*. +template<> struct DenseMapInfo { + static inline MachineInstr *getEmptyKey() { + return 0; + } + + static inline MachineInstr *getTombstoneKey() { + return reinterpret_cast(-1); + } + + static unsigned getHashValue(const MachineInstr* const &MI) { + unsigned Hash = MI->getOpcode() * 37; + for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) { + const MachineOperand &MO = MI->getOperand(i); + uint64_t Key = (uint64_t)MO.getType() << 32; + switch (MO.getType()) { + default: break; + case MachineOperand::MO_Register: + if (MO.isDef()) + continue; // Skip defs. + Key |= MO.getReg(); + break; + case MachineOperand::MO_Immediate: + Key |= MO.getImm(); + break; + case MachineOperand::MO_FrameIndex: + case MachineOperand::MO_ConstantPoolIndex: + case MachineOperand::MO_JumpTableIndex: + Key |= MO.getIndex(); + break; + case MachineOperand::MO_MachineBasicBlock: + Key |= DenseMapInfo::getHashValue(MO.getMBB()); + break; + case MachineOperand::MO_GlobalAddress: + Key |= DenseMapInfo::getHashValue(MO.getGlobal()); + break; + case MachineOperand::MO_BlockAddress: + Key |= DenseMapInfo::getHashValue(MO.getBlockAddress()); + break; + } + Key += ~(Key << 32); + Key ^= (Key >> 22); + Key += ~(Key << 13); + Key ^= (Key >> 8); + Key += (Key << 3); + Key ^= (Key >> 15); + Key += ~(Key << 27); + Key ^= (Key >> 31); + Hash = (unsigned)Key + Hash * 37; + } + return Hash; + } + + static bool isEqual(const MachineInstr* const &LHS, + const MachineInstr* const &RHS) { + if (RHS == getEmptyKey() || RHS == getTombstoneKey() || + LHS == getEmptyKey() || LHS == getTombstoneKey()) + return LHS == RHS; + return LHS->isIdenticalTo(RHS, MachineInstr::IgnoreVRegDefs); + } +}; + //===----------------------------------------------------------------------===// // Debugging Support Modified: llvm/trunk/lib/CodeGen/MachineCSE.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineCSE.cpp?rev=97667&r1=97666&r2=97667&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/MachineCSE.cpp (original) +++ llvm/trunk/lib/CodeGen/MachineCSE.cpp Wed Mar 3 15:47:16 2010 @@ -28,69 +28,6 @@ STATISTIC(NumCoalesces, "Number of copies coalesced"); STATISTIC(NumCSEs, "Number of common subexpression eliminated"); -namespace llvm { - template<> struct DenseMapInfo { - static inline MachineInstr *getEmptyKey() { - return 0; - } - - static inline MachineInstr *getTombstoneKey() { - return reinterpret_cast(-1); - } - - static unsigned getHashValue(const MachineInstr* const &MI) { - unsigned Hash = MI->getOpcode() * 37; - for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) { - const MachineOperand &MO = MI->getOperand(i); - uint64_t Key = (uint64_t)MO.getType() << 32; - switch (MO.getType()) { - default: break; - case MachineOperand::MO_Register: - if (MO.isDef() && TargetRegisterInfo::isVirtualRegister(MO.getReg())) - continue; // Skip virtual register defs. - Key |= MO.getReg(); - break; - case MachineOperand::MO_Immediate: - Key |= MO.getImm(); - break; - case MachineOperand::MO_FrameIndex: - case MachineOperand::MO_ConstantPoolIndex: - case MachineOperand::MO_JumpTableIndex: - Key |= MO.getIndex(); - break; - case MachineOperand::MO_MachineBasicBlock: - Key |= DenseMapInfo::getHashValue(MO.getMBB()); - break; - case MachineOperand::MO_GlobalAddress: - Key |= DenseMapInfo::getHashValue(MO.getGlobal()); - break; - case MachineOperand::MO_BlockAddress: - Key |= DenseMapInfo::getHashValue(MO.getBlockAddress()); - break; - } - Key += ~(Key << 32); - Key ^= (Key >> 22); - Key += ~(Key << 13); - Key ^= (Key >> 8); - Key += (Key << 3); - Key ^= (Key >> 15); - Key += ~(Key << 27); - Key ^= (Key >> 31); - Hash = (unsigned)Key + Hash * 37; - } - return Hash; - } - - static bool isEqual(const MachineInstr* const &LHS, - const MachineInstr* const &RHS) { - if (RHS == getEmptyKey() || RHS == getTombstoneKey() || - LHS == getEmptyKey() || LHS == getTombstoneKey()) - return LHS == RHS; - return LHS->isIdenticalTo(RHS, MachineInstr::IgnoreVRegDefs); - } - }; -} // end llvm namespace - namespace { class MachineCSE : public MachineFunctionPass { const TargetInstrInfo *TII; From echristo at apple.com Wed Mar 3 15:47:47 2010 From: echristo at apple.com (Eric Christopher) Date: Wed, 03 Mar 2010 21:47:47 -0000 Subject: [llvm-commits] [llvm-gcc-4.2] r97668 - /llvm-gcc-4.2/trunk/build_gcc Message-ID: <20100303214747.E9D022A6C12C@llvm.org> Author: echristo Date: Wed Mar 3 15:47:47 2010 New Revision: 97668 URL: http://llvm.org/viewvc/llvm-project?rev=97668&view=rev Log: Remove unwind.h a different way - post install. Modified: llvm-gcc-4.2/trunk/build_gcc Modified: llvm-gcc-4.2/trunk/build_gcc URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/build_gcc?rev=97668&r1=97667&r2=97668&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/build_gcc (original) +++ llvm-gcc-4.2/trunk/build_gcc Wed Mar 3 15:47:47 2010 @@ -773,6 +773,12 @@ ln -s /Developer/usr/bin/llvm-g++-4.2 llvm-g++-4.2 fi fi + +# Remove unwind.h from the install directory for > 10.6 +if [ $DARWIN_VERS -gt 10 ]; then + find $DEST_DIR -name "unwind.h" -print | xargs rm || exit 1 +fi + # LLVM LOCAL end find $DEST_DIR -name \*.dSYM -print | xargs rm -r || exit 1 From evan.cheng at apple.com Wed Mar 3 15:54:14 2010 From: evan.cheng at apple.com (Evan Cheng) Date: Wed, 03 Mar 2010 21:54:14 -0000 Subject: [llvm-commits] [llvm] r97670 - /llvm/trunk/lib/CodeGen/MachineInstr.cpp Message-ID: <20100303215414.D90752A6C12C@llvm.org> Author: evancheng Date: Wed Mar 3 15:54:14 2010 New Revision: 97670 URL: http://llvm.org/viewvc/llvm-project?rev=97670&view=rev Log: Fix funky indentation and add comments. Modified: llvm/trunk/lib/CodeGen/MachineInstr.cpp Modified: llvm/trunk/lib/CodeGen/MachineInstr.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineInstr.cpp?rev=97670&r1=97669&r2=97670&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/MachineInstr.cpp (original) +++ llvm/trunk/lib/CodeGen/MachineInstr.cpp Wed Mar 3 15:54:14 2010 @@ -704,24 +704,31 @@ bool MachineInstr::isIdenticalTo(const MachineInstr *Other, MICheckType Check) const { - if (Other->getOpcode() != getOpcode() || - Other->getNumOperands() != getNumOperands()) + // If opcodes or number of operands are not the same then the two + // instructions are obviously not identical. + if (Other->getOpcode() != getOpcode() || + Other->getNumOperands() != getNumOperands()) + return false; + + // Check operands to make sure they match. + for (unsigned i = 0, e = getNumOperands(); i != e; ++i) { + const MachineOperand &MO = getOperand(i); + const MachineOperand &OMO = Other->getOperand(i); + // Clients may or may not want to ignore defs when testing for equality. + // For example, machine CSE pass only cares about finding common + // subexpressions, so it's safe to ignore virtual register defs. + if (Check != CheckDefs && MO.isReg() && MO.isDef()) { + if (Check == IgnoreDefs) + continue; + // Check == IgnoreVRegDefs + if (TargetRegisterInfo::isPhysicalRegister(MO.getReg()) || + TargetRegisterInfo::isPhysicalRegister(OMO.getReg())) + if (MO.getReg() != OMO.getReg()) + return false; + } else if (!MO.isIdenticalTo(OMO)) return false; - for (unsigned i = 0, e = getNumOperands(); i != e; ++i) { - const MachineOperand &MO = getOperand(i); - const MachineOperand &OMO = Other->getOperand(i); - if (Check != CheckDefs && MO.isReg() && MO.isDef()) { - if (Check == IgnoreDefs) - continue; - // Check == IgnoreVRegDefs - if (TargetRegisterInfo::isPhysicalRegister(MO.getReg()) || - TargetRegisterInfo::isPhysicalRegister(OMO.getReg())) - if (MO.getReg() != OMO.getReg()) - return false; - } else if (!MO.isIdenticalTo(OMO)) - return false; - } - return true; + } + return true; } /// removeFromParent - This method unlinks 'this' from the containing basic From stoklund at 2pi.dk Wed Mar 3 16:21:18 2010 From: stoklund at 2pi.dk (Jakob Stoklund Olesen) Date: Wed, 3 Mar 2010 14:21:18 -0800 Subject: [llvm-commits] [llvm] r97667 - in /llvm/trunk: include/llvm/CodeGen/MachineInstr.h lib/CodeGen/MachineCSE.cpp In-Reply-To: <20100303214716.943C42A6C12C@llvm.org> References: <20100303214716.943C42A6C12C@llvm.org> Message-ID: On Mar 3, 2010, at 1:47 PM, Evan Cheng wrote: > Author: evancheng > Date: Wed Mar 3 15:47:16 2010 > New Revision: 97667 > > URL: http://llvm.org/viewvc/llvm-project?rev=97667&view=rev > Log: > Move DenseMapInfo for MachineInstr* to MachineInstr.h Are you sure it is a good idea to change the semantics of all our DenseMap? There is a lot of them around. I think it would be better to implement a Traits class that can be used explicitly when you need your MachineInstrs compared by value instead of by pointer. Also, please replace PHIElimination::PHINodeTraits with whatever you end up with. It serves the same purpose. /jakob From gohman at apple.com Wed Mar 3 16:40:03 2010 From: gohman at apple.com (Dan Gohman) Date: Wed, 03 Mar 2010 22:40:03 -0000 Subject: [llvm-commits] [llvm] r97673 - in /llvm/trunk: include/llvm/CodeGen/MachineInstr.h lib/CodeGen/MachineCSE.cpp Message-ID: <20100303224003.7AC462A6C12C@llvm.org> Author: djg Date: Wed Mar 3 16:40:03 2010 New Revision: 97673 URL: http://llvm.org/viewvc/llvm-project?rev=97673&view=rev Log: Revert 97667. It broke a bunch of tests. Modified: llvm/trunk/include/llvm/CodeGen/MachineInstr.h llvm/trunk/lib/CodeGen/MachineCSE.cpp Modified: llvm/trunk/include/llvm/CodeGen/MachineInstr.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineInstr.h?rev=97673&r1=97672&r2=97673&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/MachineInstr.h (original) +++ llvm/trunk/include/llvm/CodeGen/MachineInstr.h Wed Mar 3 16:40:03 2010 @@ -419,68 +419,6 @@ void AddRegOperandsToUseLists(MachineRegisterInfo &RegInfo); }; -/// DenseMapInfo for MachineInstr*. -template<> struct DenseMapInfo { - static inline MachineInstr *getEmptyKey() { - return 0; - } - - static inline MachineInstr *getTombstoneKey() { - return reinterpret_cast(-1); - } - - static unsigned getHashValue(const MachineInstr* const &MI) { - unsigned Hash = MI->getOpcode() * 37; - for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) { - const MachineOperand &MO = MI->getOperand(i); - uint64_t Key = (uint64_t)MO.getType() << 32; - switch (MO.getType()) { - default: break; - case MachineOperand::MO_Register: - if (MO.isDef()) - continue; // Skip defs. - Key |= MO.getReg(); - break; - case MachineOperand::MO_Immediate: - Key |= MO.getImm(); - break; - case MachineOperand::MO_FrameIndex: - case MachineOperand::MO_ConstantPoolIndex: - case MachineOperand::MO_JumpTableIndex: - Key |= MO.getIndex(); - break; - case MachineOperand::MO_MachineBasicBlock: - Key |= DenseMapInfo::getHashValue(MO.getMBB()); - break; - case MachineOperand::MO_GlobalAddress: - Key |= DenseMapInfo::getHashValue(MO.getGlobal()); - break; - case MachineOperand::MO_BlockAddress: - Key |= DenseMapInfo::getHashValue(MO.getBlockAddress()); - break; - } - Key += ~(Key << 32); - Key ^= (Key >> 22); - Key += ~(Key << 13); - Key ^= (Key >> 8); - Key += (Key << 3); - Key ^= (Key >> 15); - Key += ~(Key << 27); - Key ^= (Key >> 31); - Hash = (unsigned)Key + Hash * 37; - } - return Hash; - } - - static bool isEqual(const MachineInstr* const &LHS, - const MachineInstr* const &RHS) { - if (RHS == getEmptyKey() || RHS == getTombstoneKey() || - LHS == getEmptyKey() || LHS == getTombstoneKey()) - return LHS == RHS; - return LHS->isIdenticalTo(RHS, MachineInstr::IgnoreVRegDefs); - } -}; - //===----------------------------------------------------------------------===// // Debugging Support Modified: llvm/trunk/lib/CodeGen/MachineCSE.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineCSE.cpp?rev=97673&r1=97672&r2=97673&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/MachineCSE.cpp (original) +++ llvm/trunk/lib/CodeGen/MachineCSE.cpp Wed Mar 3 16:40:03 2010 @@ -28,6 +28,69 @@ STATISTIC(NumCoalesces, "Number of copies coalesced"); STATISTIC(NumCSEs, "Number of common subexpression eliminated"); +namespace llvm { + template<> struct DenseMapInfo { + static inline MachineInstr *getEmptyKey() { + return 0; + } + + static inline MachineInstr *getTombstoneKey() { + return reinterpret_cast(-1); + } + + static unsigned getHashValue(const MachineInstr* const &MI) { + unsigned Hash = MI->getOpcode() * 37; + for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) { + const MachineOperand &MO = MI->getOperand(i); + uint64_t Key = (uint64_t)MO.getType() << 32; + switch (MO.getType()) { + default: break; + case MachineOperand::MO_Register: + if (MO.isDef() && TargetRegisterInfo::isVirtualRegister(MO.getReg())) + continue; // Skip virtual register defs. + Key |= MO.getReg(); + break; + case MachineOperand::MO_Immediate: + Key |= MO.getImm(); + break; + case MachineOperand::MO_FrameIndex: + case MachineOperand::MO_ConstantPoolIndex: + case MachineOperand::MO_JumpTableIndex: + Key |= MO.getIndex(); + break; + case MachineOperand::MO_MachineBasicBlock: + Key |= DenseMapInfo::getHashValue(MO.getMBB()); + break; + case MachineOperand::MO_GlobalAddress: + Key |= DenseMapInfo::getHashValue(MO.getGlobal()); + break; + case MachineOperand::MO_BlockAddress: + Key |= DenseMapInfo::getHashValue(MO.getBlockAddress()); + break; + } + Key += ~(Key << 32); + Key ^= (Key >> 22); + Key += ~(Key << 13); + Key ^= (Key >> 8); + Key += (Key << 3); + Key ^= (Key >> 15); + Key += ~(Key << 27); + Key ^= (Key >> 31); + Hash = (unsigned)Key + Hash * 37; + } + return Hash; + } + + static bool isEqual(const MachineInstr* const &LHS, + const MachineInstr* const &RHS) { + if (RHS == getEmptyKey() || RHS == getTombstoneKey() || + LHS == getEmptyKey() || LHS == getTombstoneKey()) + return LHS == RHS; + return LHS->isIdenticalTo(RHS, MachineInstr::IgnoreVRegDefs); + } + }; +} // end llvm namespace + namespace { class MachineCSE : public MachineFunctionPass { const TargetInstrInfo *TII; From gohman at apple.com Wed Mar 3 16:41:28 2010 From: gohman at apple.com (Dan Gohman) Date: Wed, 3 Mar 2010 14:41:28 -0800 Subject: [llvm-commits] [llvm] r97667 - in /llvm/trunk: include/llvm/CodeGen/MachineInstr.h lib/CodeGen/MachineCSE.cpp In-Reply-To: References: <20100303214716.943C42A6C12C@llvm.org> Message-ID: <2CA48452-F572-4273-9916-5DA9E3182EE2@apple.com> On Mar 3, 2010, at 2:21 PM, Jakob Stoklund Olesen wrote: > > On Mar 3, 2010, at 1:47 PM, Evan Cheng wrote: > >> Author: evancheng >> Date: Wed Mar 3 15:47:16 2010 >> New Revision: 97667 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=97667&view=rev >> Log: >> Move DenseMapInfo for MachineInstr* to MachineInstr.h > > Are you sure it is a good idea to change the semantics of all our DenseMap? There is a lot of them around. This appears to be causing trouble. I've reverted the patch. Dan From evan.cheng at apple.com Wed Mar 3 16:59:05 2010 From: evan.cheng at apple.com (Evan Cheng) Date: Wed, 3 Mar 2010 14:59:05 -0800 Subject: [llvm-commits] [llvm] r97667 - in /llvm/trunk: include/llvm/CodeGen/MachineInstr.h lib/CodeGen/MachineCSE.cpp In-Reply-To: <2CA48452-F572-4273-9916-5DA9E3182EE2@apple.com> References: <20100303214716.943C42A6C12C@llvm.org> <2CA48452-F572-4273-9916-5DA9E3182EE2@apple.com> Message-ID: My bad. Sorry. Evan On Mar 3, 2010, at 2:41 PM, Dan Gohman wrote: > > On Mar 3, 2010, at 2:21 PM, Jakob Stoklund Olesen wrote: > >> >> On Mar 3, 2010, at 1:47 PM, Evan Cheng wrote: >> >>> Author: evancheng >>> Date: Wed Mar 3 15:47:16 2010 >>> New Revision: 97667 >>> >>> URL: http://llvm.org/viewvc/llvm-project?rev=97667&view=rev >>> Log: >>> Move DenseMapInfo for MachineInstr* to MachineInstr.h >> >> Are you sure it is a good idea to change the semantics of all our DenseMap? There is a lot of them around. > > > This appears to be causing trouble. I've reverted the patch. > > Dan > From evan.cheng at apple.com Wed Mar 3 17:13:52 2010 From: evan.cheng at apple.com (Evan Cheng) Date: Wed, 3 Mar 2010 15:13:52 -0800 Subject: [llvm-commits] [llvm] r97667 - in /llvm/trunk: include/llvm/CodeGen/MachineInstr.h lib/CodeGen/MachineCSE.cpp In-Reply-To: References: <20100303214716.943C42A6C12C@llvm.org> Message-ID: <5917EF00-6B2C-44D5-8B3C-D39F13C437A0@apple.com> On Mar 3, 2010, at 2:21 PM, Jakob Stoklund Olesen wrote: > > On Mar 3, 2010, at 1:47 PM, Evan Cheng wrote: > >> Author: evancheng >> Date: Wed Mar 3 15:47:16 2010 >> New Revision: 97667 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=97667&view=rev >> Log: >> Move DenseMapInfo for MachineInstr* to MachineInstr.h > > Are you sure it is a good idea to change the semantics of all our DenseMap? There is a lot of them around. I clearly wasn't thinking. What do you expect!? :-) > > I think it would be better to implement a Traits class that can be used explicitly when you need your MachineInstrs compared by value instead of by pointer. > > Also, please replace PHIElimination::PHINodeTraits with whatever you end up with. It serves the same purpose. Yep. Evan > > /jakob > From johnny.chen at apple.com Wed Mar 3 17:15:43 2010 From: johnny.chen at apple.com (Johnny Chen) Date: Wed, 03 Mar 2010 23:15:43 -0000 Subject: [llvm-commits] [llvm] r97675 - /llvm/trunk/lib/Target/ARM/ARMInstrThumb.td Message-ID: <20100303231543.B4F3B2A6C12C@llvm.org> Author: johnny Date: Wed Mar 3 17:15:43 2010 New Revision: 97675 URL: http://llvm.org/viewvc/llvm-project?rev=97675&view=rev Log: Modified the asm string of 16-bit Thumb MUL instruction so that it prints: MULS , , according to A8.6.105 MUL Encoding T1. Modified: llvm/trunk/lib/Target/ARM/ARMInstrThumb.td Modified: llvm/trunk/lib/Target/ARM/ARMInstrThumb.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrThumb.td?rev=97675&r1=97674&r2=97675&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMInstrThumb.td (original) +++ llvm/trunk/lib/Target/ARM/ARMInstrThumb.td Wed Mar 3 17:15:43 2010 @@ -734,7 +734,7 @@ // multiply register let isCommutable = 1 in def tMUL : T1sIt<(outs tGPR:$dst), (ins tGPR:$lhs, tGPR:$rhs), IIC_iMUL32, - "mul", "\t$dst, $rhs", + "mul", "\t$dst, $rhs, $dst", /* A8.6.105 MUL Encoding T1 */ [(set tGPR:$dst, (mul tGPR:$lhs, tGPR:$rhs))]>, T1DataProcessing<0b1101>; From stuart at apple.com Wed Mar 3 17:20:17 2010 From: stuart at apple.com (Stuart Hastings) Date: Wed, 03 Mar 2010 23:20:17 -0000 Subject: [llvm-commits] [llvm-gcc-4.2] r97676 - in /llvm-gcc-4.2/trunk/gcc: llvm-backend.cpp llvm-internal.h llvm-types.cpp tree.c tree.h Message-ID: <20100303232017.C54212A6C12C@llvm.org> Author: stuart Date: Wed Mar 3 17:20:17 2010 New Revision: 97676 URL: http://llvm.org/viewvc/llvm-project?rev=97676&view=rev Log: Preserve TypeRefinementDatabase::TypeUsers in the PCH. Radar 7657755. Modified: llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp llvm-gcc-4.2/trunk/gcc/llvm-internal.h llvm-gcc-4.2/trunk/gcc/llvm-types.cpp llvm-gcc-4.2/trunk/gcc/tree.c llvm-gcc-4.2/trunk/gcc/tree.h Modified: llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp?rev=97676&r1=97675&r2=97676&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp (original) +++ llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp Wed Mar 3 17:20:17 2010 @@ -855,6 +855,7 @@ if (flag_pch_file) { writeLLVMTypesStringTable(); writeLLVMValues(); + writeLLVMTypeUsers(); } // Add an llvm.global_ctors global if needed. @@ -986,6 +987,11 @@ TREE_ASM_WRITTEN(fndecl) = 1; return; // Do not process broken code. } + + // Random initialization of TypeRefinementDatabase if we're using a + // PCH. Won't work until the GCC PCH has been read in and digested. + readLLVMTypeUsers(); + timevar_push(TV_LLVM_FUNCS); // Convert the AST to raw/ugly LLVM code. Modified: llvm-gcc-4.2/trunk/gcc/llvm-internal.h URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-internal.h?rev=97676&r1=97675&r2=97676&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/llvm-internal.h (original) +++ llvm-gcc-4.2/trunk/gcc/llvm-internal.h Wed Mar 3 17:20:17 2010 @@ -102,6 +102,8 @@ void writeLLVMTypesStringTable(); void readLLVMValues(); void writeLLVMValues(); +void readLLVMTypeUsers(); +void writeLLVMTypeUsers(); void eraseLocalLLVMValues(); void clearTargetBuiltinCache(); const char* extractRegisterName(union tree_node*); Modified: llvm-gcc-4.2/trunk/gcc/llvm-types.cpp URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-types.cpp?rev=97676&r1=97675&r2=97676&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/llvm-types.cpp (original) +++ llvm-gcc-4.2/trunk/gcc/llvm-types.cpp Wed Mar 3 17:20:17 2010 @@ -387,10 +387,10 @@ const Type *NewTy); virtual void typeBecameConcrete(const DerivedType *AbsTy); + public: // TypeUsers - For each abstract LLVM type, we keep track of all of the GCC // types that point to it. std::map > TypeUsers; - public: /// setType - call SET_TYPE_LLVM(type, Ty), associating the type with the /// specified tree type. In addition, if the LLVM type is an abstract type, /// we add it to our data structure to track it. @@ -406,6 +406,8 @@ return SET_TYPE_LLVM(type, Ty); } + void friend readLLVMTypeUsers(); + void friend writeLLVMTypeUsers(); void RemoveTypeFromTable(tree type); void dump() const; }; @@ -494,6 +496,31 @@ outs().flush(); } +// We've just read in a PCH; retrieve the set of GCC types that were +// known to TypeUsers[], and re-populate it. Intended to be called +// once, but harmless if called multiple times, or if no PCH is +// present. +void readLLVMTypeUsers() { + tree ty; + while ((ty = llvm_pop_TypeUsers())) { + const Type *NewTy = GET_TYPE_LLVM(ty); + std::vector &NewSlot = TypeDB.TypeUsers[NewTy]; + if (NewSlot.empty()) NewTy->addAbstractTypeUser(&TypeDB); + NewSlot.push_back(ty); + } +} + +// Record the set of GCC types currently known to TypeUsers[] inside +// GCC so they will be preserved in a PCH. Intended to be called +// once, just before the PCH is written. +void writeLLVMTypeUsers() { + std::map >::iterator + I = TypeDB.TypeUsers.begin(), + E = TypeDB.TypeUsers.end(); + for (; I != E; I++) + for (unsigned i = 0, e = I->second.size(); i != e; ++i) + llvm_push_TypeUsers(I->second[i]); +} //===----------------------------------------------------------------------===// // Helper Routines //===----------------------------------------------------------------------===// Modified: llvm-gcc-4.2/trunk/gcc/tree.c URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/tree.c?rev=97676&r1=97675&r2=97676&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/tree.c (original) +++ llvm-gcc-4.2/trunk/gcc/tree.c Wed Mar 3 17:20:17 2010 @@ -7961,6 +7961,28 @@ { VEC_safe_push(tree, gc, llvm_types_used, type); } + +static GTY(()) VEC(tree,gc) *llvm_TypeUsers; + +/* We're about to write a PCH; record the set of GCC types known to + the llvm-types.ccp:TypeRefinementDatabase::TypeUsers[] mapping. */ +void +llvm_push_TypeUsers(tree type) +{ + VEC_safe_push(tree, gc, llvm_TypeUsers, type); +} + +/* We just read in a PCH. Retrieve the set of types recorded here, + used to repopulate the + llvm-types.ccp:TypeRefinementDatabase::TypeUsers[] mapping. */ +tree +llvm_pop_TypeUsers(void) +{ + if (VEC_empty (tree, llvm_TypeUsers)) + return NULL_TREE; + else + return VEC_pop(tree, llvm_TypeUsers); +} /* LLVM LOCAL end */ /* APPLE LOCAL begin weak_import on property 6676828 */ Modified: llvm-gcc-4.2/trunk/gcc/tree.h URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/tree.h?rev=97676&r1=97675&r2=97676&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/tree.h (original) +++ llvm-gcc-4.2/trunk/gcc/tree.h Wed Mar 3 17:20:17 2010 @@ -4433,6 +4433,8 @@ /* LLVM LOCAL begin */ #ifdef ENABLE_LLVM extern void llvm_note_type_used(tree); +extern void llvm_push_TypeUsers(tree); +extern tree llvm_pop_TypeUsers(void); #endif /* LLVM LOCAL begin */ From evan.cheng at apple.com Wed Mar 3 17:27:36 2010 From: evan.cheng at apple.com (Evan Cheng) Date: Wed, 03 Mar 2010 23:27:36 -0000 Subject: [llvm-commits] [llvm] r97678 - in /llvm/trunk: include/llvm/CodeGen/MachineInstr.h lib/CodeGen/MachineCSE.cpp Message-ID: <20100303232736.E4D332A6C12C@llvm.org> Author: evancheng Date: Wed Mar 3 17:27:36 2010 New Revision: 97678 URL: http://llvm.org/viewvc/llvm-project?rev=97678&view=rev Log: Re-apply r97667 but with a little bit of thought put into the patch. This implements a special DenseMapInfo trait for DenseMap that compare the value of the MachineInstr rather than the pointer value. Since the hashing and equality test functions ignore defs it's useful for doing CSE kind optimization. Modified: llvm/trunk/include/llvm/CodeGen/MachineInstr.h llvm/trunk/lib/CodeGen/MachineCSE.cpp Modified: llvm/trunk/include/llvm/CodeGen/MachineInstr.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineInstr.h?rev=97678&r1=97677&r2=97678&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/MachineInstr.h (original) +++ llvm/trunk/include/llvm/CodeGen/MachineInstr.h Wed Mar 3 17:27:36 2010 @@ -419,6 +419,71 @@ void AddRegOperandsToUseLists(MachineRegisterInfo &RegInfo); }; +/// MachineInstrExpressionTrait - Special DenseMapInfo traits to compare +/// MachineInstr* by *value* of the instruction rather than by pointer value. +/// The hashing and equality testing functions ignore definitions so this is +/// useful for CSE, etc. +struct MachineInstrExpressionTrait : DenseMapInfo { + static inline MachineInstr *getEmptyKey() { + return 0; + } + + static inline MachineInstr *getTombstoneKey() { + return reinterpret_cast(-1); + } + + static unsigned getHashValue(const MachineInstr* const &MI) { + unsigned Hash = MI->getOpcode() * 37; + for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) { + const MachineOperand &MO = MI->getOperand(i); + uint64_t Key = (uint64_t)MO.getType() << 32; + switch (MO.getType()) { + default: break; + case MachineOperand::MO_Register: + if (MO.isDef()) + continue; // Skip defs. + Key |= MO.getReg(); + break; + case MachineOperand::MO_Immediate: + Key |= MO.getImm(); + break; + case MachineOperand::MO_FrameIndex: + case MachineOperand::MO_ConstantPoolIndex: + case MachineOperand::MO_JumpTableIndex: + Key |= MO.getIndex(); + break; + case MachineOperand::MO_MachineBasicBlock: + Key |= DenseMapInfo::getHashValue(MO.getMBB()); + break; + case MachineOperand::MO_GlobalAddress: + Key |= DenseMapInfo::getHashValue(MO.getGlobal()); + break; + case MachineOperand::MO_BlockAddress: + Key |= DenseMapInfo::getHashValue(MO.getBlockAddress()); + break; + } + Key += ~(Key << 32); + Key ^= (Key >> 22); + Key += ~(Key << 13); + Key ^= (Key >> 8); + Key += (Key << 3); + Key ^= (Key >> 15); + Key += ~(Key << 27); + Key ^= (Key >> 31); + Hash = (unsigned)Key + Hash * 37; + } + return Hash; + } + + static bool isEqual(const MachineInstr* const &LHS, + const MachineInstr* const &RHS) { + if (RHS == getEmptyKey() || RHS == getTombstoneKey() || + LHS == getEmptyKey() || LHS == getTombstoneKey()) + return LHS == RHS; + return LHS->isIdenticalTo(RHS, MachineInstr::IgnoreVRegDefs); + } +}; + //===----------------------------------------------------------------------===// // Debugging Support Modified: llvm/trunk/lib/CodeGen/MachineCSE.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineCSE.cpp?rev=97678&r1=97677&r2=97678&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/MachineCSE.cpp (original) +++ llvm/trunk/lib/CodeGen/MachineCSE.cpp Wed Mar 3 17:27:36 2010 @@ -28,69 +28,6 @@ STATISTIC(NumCoalesces, "Number of copies coalesced"); STATISTIC(NumCSEs, "Number of common subexpression eliminated"); -namespace llvm { - template<> struct DenseMapInfo { - static inline MachineInstr *getEmptyKey() { - return 0; - } - - static inline MachineInstr *getTombstoneKey() { - return reinterpret_cast(-1); - } - - static unsigned getHashValue(const MachineInstr* const &MI) { - unsigned Hash = MI->getOpcode() * 37; - for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) { - const MachineOperand &MO = MI->getOperand(i); - uint64_t Key = (uint64_t)MO.getType() << 32; - switch (MO.getType()) { - default: break; - case MachineOperand::MO_Register: - if (MO.isDef() && TargetRegisterInfo::isVirtualRegister(MO.getReg())) - continue; // Skip virtual register defs. - Key |= MO.getReg(); - break; - case MachineOperand::MO_Immediate: - Key |= MO.getImm(); - break; - case MachineOperand::MO_FrameIndex: - case MachineOperand::MO_ConstantPoolIndex: - case MachineOperand::MO_JumpTableIndex: - Key |= MO.getIndex(); - break; - case MachineOperand::MO_MachineBasicBlock: - Key |= DenseMapInfo::getHashValue(MO.getMBB()); - break; - case MachineOperand::MO_GlobalAddress: - Key |= DenseMapInfo::getHashValue(MO.getGlobal()); - break; - case MachineOperand::MO_BlockAddress: - Key |= DenseMapInfo::getHashValue(MO.getBlockAddress()); - break; - } - Key += ~(Key << 32); - Key ^= (Key >> 22); - Key += ~(Key << 13); - Key ^= (Key >> 8); - Key += (Key << 3); - Key ^= (Key >> 15); - Key += ~(Key << 27); - Key ^= (Key >> 31); - Hash = (unsigned)Key + Hash * 37; - } - return Hash; - } - - static bool isEqual(const MachineInstr* const &LHS, - const MachineInstr* const &RHS) { - if (RHS == getEmptyKey() || RHS == getTombstoneKey() || - LHS == getEmptyKey() || LHS == getTombstoneKey()) - return LHS == RHS; - return LHS->isIdenticalTo(RHS, MachineInstr::IgnoreVRegDefs); - } - }; -} // end llvm namespace - namespace { class MachineCSE : public MachineFunctionPass { const TargetInstrInfo *TII; @@ -111,7 +48,7 @@ private: unsigned CurrVN; - ScopedHashTable VNT; + ScopedHashTable VNT; SmallVector Exps; bool PerformTrivialCoalescing(MachineInstr *MI, MachineBasicBlock *MBB); @@ -176,7 +113,8 @@ bool MachineCSE::ProcessBlock(MachineDomTreeNode *Node) { bool Changed = false; - ScopedHashTableScope VNTS(VNT); + ScopedHashTableScope VNTS(VNT); MachineBasicBlock *MBB = Node->getBlock(); for (MachineBasicBlock::iterator I = MBB->begin(), E = MBB->end(); I != E; ) { MachineInstr *MI = &*I; From stoklund at 2pi.dk Wed Mar 3 17:34:16 2010 From: stoklund at 2pi.dk (Jakob Stoklund Olesen) Date: Wed, 3 Mar 2010 15:34:16 -0800 Subject: [llvm-commits] [llvm] r97678 - in /llvm/trunk: include/llvm/CodeGen/MachineInstr.h lib/CodeGen/MachineCSE.cpp In-Reply-To: <20100303232736.E4D332A6C12C@llvm.org> References: <20100303232736.E4D332A6C12C@llvm.org> Message-ID: On Mar 3, 2010, at 3:27 PM, Evan Cheng wrote: > Author: evancheng > Date: Wed Mar 3 17:27:36 2010 > New Revision: 97678 > > URL: http://llvm.org/viewvc/llvm-project?rev=97678&view=rev > Log: > Re-apply r97667 but with a little bit of thought put into the patch. This implements a special DenseMapInfo trait for DenseMap that compare the value of the MachineInstr rather than the pointer value. Since the hashing and equality test functions ignore defs it's useful for doing CSE kind optimization. Thanks, I think MachineInstrExpressionTrait is a suitable replacement for PHINodeTraits as well. /jakob From evan.cheng at apple.com Wed Mar 3 17:37:30 2010 From: evan.cheng at apple.com (Evan Cheng) Date: Wed, 03 Mar 2010 23:37:30 -0000 Subject: [llvm-commits] [llvm] r97680 - in /llvm/trunk: include/llvm/CodeGen/MachineInstr.h lib/CodeGen/MachineInstr.cpp Message-ID: <20100303233731.02DC32A6C12C@llvm.org> Author: evancheng Date: Wed Mar 3 17:37:30 2010 New Revision: 97680 URL: http://llvm.org/viewvc/llvm-project?rev=97680&view=rev Log: Move MachineInstrExpressionTrait::getHashValue() out of line so it can skip over only virtual register defs. This matches what isEqual() is doing. Modified: llvm/trunk/include/llvm/CodeGen/MachineInstr.h llvm/trunk/lib/CodeGen/MachineInstr.cpp Modified: llvm/trunk/include/llvm/CodeGen/MachineInstr.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineInstr.h?rev=97680&r1=97679&r2=97680&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/MachineInstr.h (original) +++ llvm/trunk/include/llvm/CodeGen/MachineInstr.h Wed Mar 3 17:37:30 2010 @@ -432,48 +432,7 @@ return reinterpret_cast(-1); } - static unsigned getHashValue(const MachineInstr* const &MI) { - unsigned Hash = MI->getOpcode() * 37; - for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) { - const MachineOperand &MO = MI->getOperand(i); - uint64_t Key = (uint64_t)MO.getType() << 32; - switch (MO.getType()) { - default: break; - case MachineOperand::MO_Register: - if (MO.isDef()) - continue; // Skip defs. - Key |= MO.getReg(); - break; - case MachineOperand::MO_Immediate: - Key |= MO.getImm(); - break; - case MachineOperand::MO_FrameIndex: - case MachineOperand::MO_ConstantPoolIndex: - case MachineOperand::MO_JumpTableIndex: - Key |= MO.getIndex(); - break; - case MachineOperand::MO_MachineBasicBlock: - Key |= DenseMapInfo::getHashValue(MO.getMBB()); - break; - case MachineOperand::MO_GlobalAddress: - Key |= DenseMapInfo::getHashValue(MO.getGlobal()); - break; - case MachineOperand::MO_BlockAddress: - Key |= DenseMapInfo::getHashValue(MO.getBlockAddress()); - break; - } - Key += ~(Key << 32); - Key ^= (Key >> 22); - Key += ~(Key << 13); - Key ^= (Key >> 8); - Key += (Key << 3); - Key ^= (Key >> 15); - Key += ~(Key << 27); - Key ^= (Key >> 31); - Hash = (unsigned)Key + Hash * 37; - } - return Hash; - } + static unsigned getHashValue(const MachineInstr* const &MI); static bool isEqual(const MachineInstr* const &LHS, const MachineInstr* const &RHS) { Modified: llvm/trunk/lib/CodeGen/MachineInstr.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineInstr.cpp?rev=97680&r1=97679&r2=97680&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/MachineInstr.cpp (original) +++ llvm/trunk/lib/CodeGen/MachineInstr.cpp Wed Mar 3 17:37:30 2010 @@ -1355,3 +1355,48 @@ true /*IsDef*/, true /*IsImp*/)); } + +unsigned +MachineInstrExpressionTrait::getHashValue(const MachineInstr* const &MI) { + unsigned Hash = MI->getOpcode() * 37; + for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) { + const MachineOperand &MO = MI->getOperand(i); + uint64_t Key = (uint64_t)MO.getType() << 32; + switch (MO.getType()) { + default: break; + case MachineOperand::MO_Register: + if (MO.isDef() && MO.getReg() && + TargetRegisterInfo::isVirtualRegister(MO.getReg())) + continue; // Skip virtual register defs. + Key |= MO.getReg(); + break; + case MachineOperand::MO_Immediate: + Key |= MO.getImm(); + break; + case MachineOperand::MO_FrameIndex: + case MachineOperand::MO_ConstantPoolIndex: + case MachineOperand::MO_JumpTableIndex: + Key |= MO.getIndex(); + break; + case MachineOperand::MO_MachineBasicBlock: + Key |= DenseMapInfo::getHashValue(MO.getMBB()); + break; + case MachineOperand::MO_GlobalAddress: + Key |= DenseMapInfo::getHashValue(MO.getGlobal()); + break; + case MachineOperand::MO_BlockAddress: + Key |= DenseMapInfo::getHashValue(MO.getBlockAddress()); + break; + } + Key += ~(Key << 32); + Key ^= (Key >> 22); + Key += ~(Key << 13); + Key ^= (Key >> 8); + Key += (Key << 3); + Key ^= (Key >> 15); + Key += ~(Key << 27); + Key ^= (Key >> 31); + Hash = (unsigned)Key + Hash * 37; + } + return Hash; +} From nunoplopes at sapo.pt Wed Mar 3 17:33:20 2010 From: nunoplopes at sapo.pt (Nuno Lopes) Date: Wed, 3 Mar 2010 23:33:20 -0000 Subject: [llvm-commits] [llvm] r97486 -/llvm/trunk/utils/TableGen/DAGISelEmitter.cpp In-Reply-To: References: <20100301193915.57E722A6C12C@llvm.org> Message-ID: <9E44A7CA391F408F957DB36F2474EFE4@pc07654> >> BTW, can we have a blog post about this new isel, and how it differs from >> the previous one? :) > > Good idea, I'll write something up when I have time. Thank you! Nuno >> >> Thanks, >> Nuno >> >> >> ----- Original Message ----- >> From: "Chris Lattner" >> To: >> Sent: Monday, March 01, 2010 7:39 PM >> Subject: [llvm-commits] [llvm] >> r97486 -/llvm/trunk/utils/TableGen/DAGISelEmitter.cpp >> >> >>> Author: lattner >>> Date: Mon Mar 1 13:39:15 2010 >>> New Revision: 97486 >>> >>> URL: http://llvm.org/viewvc/llvm-project?rev=97486&view=rev >>> Log: >>> don't emit the old sdnodexform stuff for the new isel. >>> >>> Modified: >>> llvm/trunk/utils/TableGen/DAGISelEmitter.cpp >>> >>> Modified: llvm/trunk/utils/TableGen/DAGISelEmitter.cpp >>> URL: >>> http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelEmitter.cpp?rev=97486&r1=97485&r2=97486&view=diff >>> ============================================================================== >>> --- llvm/trunk/utils/TableGen/DAGISelEmitter.cpp (original) >>> +++ llvm/trunk/utils/TableGen/DAGISelEmitter.cpp Mon Mar 1 13:39:15 >>> 2010 >>> @@ -1942,7 +1942,6 @@ >>> }); >>> >>> // FIXME: These are being used by hand written code, gross. >>> - EmitNodeTransforms(OS); >>> EmitPredicateFunctions(OS); >>> >>> #ifdef ENABLE_NEW_ISEL >>> @@ -1980,7 +1979,8 @@ >>> delete TheMatcher; >>> >>> #else >>> - >>> + EmitNodeTransforms(OS); >>> + >>> // At this point, we have full information about the 'Patterns' we need >>> to >>> // parse, both implicitly from instructions as well as from explicit >>> pattern >>> // definitions. Emit the resultant instruction selector. From idadesub at users.sourceforge.net Wed Mar 3 17:51:25 2010 From: idadesub at users.sourceforge.net (Erick Tryzelaar) Date: Wed, 03 Mar 2010 23:51:25 -0000 Subject: [llvm-commits] [llvm] r97682 - in /llvm/trunk: bindings/ocaml/llvm/llvm.ml bindings/ocaml/llvm/llvm.mli include/llvm-c/Core.h Message-ID: <20100303235125.E84B82A6C12C@llvm.org> Author: erickt Date: Wed Mar 3 17:51:25 2010 New Revision: 97682 URL: http://llvm.org/viewvc/llvm-project?rev=97682&view=rev Log: Expose alignment and stack alignment attributes to llvm-c and ocaml. Modified: llvm/trunk/bindings/ocaml/llvm/llvm.ml llvm/trunk/bindings/ocaml/llvm/llvm.mli llvm/trunk/include/llvm-c/Core.h Modified: llvm/trunk/bindings/ocaml/llvm/llvm.ml URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/bindings/ocaml/llvm/llvm.ml?rev=97682&r1=97681&r2=97682&view=diff ============================================================================== --- llvm/trunk/bindings/ocaml/llvm/llvm.ml (original) +++ llvm/trunk/bindings/ocaml/llvm/llvm.ml Wed Mar 3 17:51:25 2010 @@ -90,11 +90,13 @@ | Optsize | Ssp | Sspreq + | Alignment | Nocapture | Noredzone | Noimplicitfloat | Naked | Inlinehint + | Stackalignment end module Icmp = struct Modified: llvm/trunk/bindings/ocaml/llvm/llvm.mli URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/bindings/ocaml/llvm/llvm.mli?rev=97682&r1=97681&r2=97682&view=diff ============================================================================== --- llvm/trunk/bindings/ocaml/llvm/llvm.mli (original) +++ llvm/trunk/bindings/ocaml/llvm/llvm.mli Wed Mar 3 17:51:25 2010 @@ -139,11 +139,13 @@ | Optsize | Ssp | Sspreq + | Alignment | Nocapture | Noredzone | Noimplicitfloat | Naked | Inlinehint + | Stackalignment end (** The predicate for an integer comparison ([icmp]) instruction. Modified: llvm/trunk/include/llvm-c/Core.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm-c/Core.h?rev=97682&r1=97681&r2=97682&view=diff ============================================================================== --- llvm/trunk/include/llvm-c/Core.h (original) +++ llvm/trunk/include/llvm-c/Core.h Wed Mar 3 17:51:25 2010 @@ -112,11 +112,13 @@ LLVMOptimizeForSizeAttribute = 1<<13, LLVMStackProtectAttribute = 1<<14, LLVMStackProtectReqAttribute = 1<<15, + LLVMAlignment = 31<<16, LLVMNoCaptureAttribute = 1<<21, LLVMNoRedZoneAttribute = 1<<22, LLVMNoImplicitFloatAttribute = 1<<23, LLVMNakedAttribute = 1<<24, - LLVMInlineHintAttribute = 1<<25 + LLVMInlineHintAttribute = 1<<25, + LLVMStackAlignment = 7<<26 } LLVMAttribute; typedef enum { From idadesub at users.sourceforge.net Wed Mar 3 17:51:30 2010 From: idadesub at users.sourceforge.net (Erick Tryzelaar) Date: Wed, 03 Mar 2010 23:51:30 -0000 Subject: [llvm-commits] [llvm] r97684 - in /llvm/trunk/bindings/ocaml/executionengine: executionengine_ocaml.c llvm_executionengine.ml llvm_executionengine.mli Message-ID: <20100303235130.D37A12A6C12E@llvm.org> Author: erickt Date: Wed Mar 3 17:51:30 2010 New Revision: 97684 URL: http://llvm.org/viewvc/llvm-project?rev=97684&view=rev Log: Rename some ocaml functions. Modified: llvm/trunk/bindings/ocaml/executionengine/executionengine_ocaml.c llvm/trunk/bindings/ocaml/executionengine/llvm_executionengine.ml llvm/trunk/bindings/ocaml/executionengine/llvm_executionengine.mli Modified: llvm/trunk/bindings/ocaml/executionengine/executionengine_ocaml.c URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/bindings/ocaml/executionengine/executionengine_ocaml.c?rev=97684&r1=97683&r2=97684&view=diff ============================================================================== --- llvm/trunk/bindings/ocaml/executionengine/executionengine_ocaml.c (original) +++ llvm/trunk/bindings/ocaml/executionengine/executionengine_ocaml.c Wed Mar 3 17:51:30 2010 @@ -91,7 +91,7 @@ } /* 'a -> t */ -CAMLprim value llvm_genericvalue_of_value(value V) { +CAMLprim value llvm_genericvalue_of_pointer(value V) { CAMLparam1(V); CAMLreturn(alloc_generic_value(LLVMCreateGenericValueOfPointer(Op_val(V)))); } @@ -130,7 +130,7 @@ } /* t -> 'a */ -CAMLprim value llvm_genericvalue_as_value(value GenVal) { +CAMLprim value llvm_genericvalue_as_pointer(value GenVal) { return Val_op(LLVMGenericValueToPointer(Genericvalue_val(GenVal))); } @@ -204,14 +204,14 @@ } /* llmodule -> ExecutionEngine.t -> unit */ -CAMLprim value llvm_ee_add_mp(LLVMModuleRef M, LLVMExecutionEngineRef EE) { +CAMLprim value llvm_ee_add_module(LLVMModuleRef M, LLVMExecutionEngineRef EE) { LLVMAddModule(EE, M); return Val_unit; } /* llmodule -> ExecutionEngine.t -> llmodule */ -CAMLprim LLVMModuleRef llvm_ee_remove_mp(LLVMModuleRef M, - LLVMExecutionEngineRef EE) { +CAMLprim LLVMModuleRef llvm_ee_remove_module(LLVMModuleRef M, + LLVMExecutionEngineRef EE) { LLVMModuleRef RemovedModule; char *Error; if (LLVMRemoveModule(EE, M, &RemovedModule, &Error)) Modified: llvm/trunk/bindings/ocaml/executionengine/llvm_executionengine.ml URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/bindings/ocaml/executionengine/llvm_executionengine.ml?rev=97684&r1=97683&r2=97684&view=diff ============================================================================== --- llvm/trunk/bindings/ocaml/executionengine/llvm_executionengine.ml (original) +++ llvm/trunk/bindings/ocaml/executionengine/llvm_executionengine.ml Wed Mar 3 17:51:30 2010 @@ -20,7 +20,7 @@ external of_float: Llvm.lltype -> float -> t = "llvm_genericvalue_of_float" external of_pointer: 'a -> t - = "llvm_genericvalue_of_value" + = "llvm_genericvalue_of_pointer" external of_int32: Llvm.lltype -> int32 -> t = "llvm_genericvalue_of_int32" external of_int: Llvm.lltype -> int -> t @@ -33,7 +33,7 @@ external as_float: Llvm.lltype -> t -> float = "llvm_genericvalue_as_float" external as_pointer: t -> 'a - = "llvm_genericvalue_as_value" + = "llvm_genericvalue_as_pointer" external as_int32: t -> int32 = "llvm_genericvalue_as_int32" external as_int: t -> int @@ -65,9 +65,9 @@ external dispose: t -> unit = "llvm_ee_dispose" external add_module: Llvm.llmodule -> t -> unit - = "llvm_ee_add_mp" + = "llvm_ee_add_module" external remove_module: Llvm.llmodule -> t -> Llvm.llmodule - = "llvm_ee_remove_mp" + = "llvm_ee_remove_module" external find_function: string -> t -> Llvm.llvalue option = "llvm_ee_find_function" external run_function: Llvm.llvalue -> GenericValue.t array -> t -> Modified: llvm/trunk/bindings/ocaml/executionengine/llvm_executionengine.mli URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/bindings/ocaml/executionengine/llvm_executionengine.mli?rev=97684&r1=97683&r2=97684&view=diff ============================================================================== --- llvm/trunk/bindings/ocaml/executionengine/llvm_executionengine.mli (original) +++ llvm/trunk/bindings/ocaml/executionengine/llvm_executionengine.mli Wed Mar 3 17:51:30 2010 @@ -29,7 +29,7 @@ (** [of_pointer v] boxes the pointer value [v] in a generic value. See the field [llvm::GenericValue::PointerVal]. *) - external of_pointer : 'a -> t = "llvm_genericvalue_of_value" + external of_pointer : 'a -> t = "llvm_genericvalue_of_pointer" (** [of_int32 n w] boxes the int32 [i] in a generic value with the bitwidth [w]. See the field [llvm::GenericValue::IntVal]. *) @@ -55,7 +55,7 @@ (** [as_pointer gv] unboxes the pointer-valued generic value [gv]. See the field [llvm::GenericValue::PointerVal]. *) - external as_pointer : t -> 'a = "llvm_genericvalue_as_value" + external as_pointer : t -> 'a = "llvm_genericvalue_as_pointer" (** [as_int32 gv] unboxes the integer-valued generic value [gv] as an [int32]. Is invalid if [gv] has a bitwidth greater than 32 bits. See the field @@ -71,7 +71,7 @@ (** [as_natint gv] unboxes the integer-valued generic value [gv] as a [nativeint]. Is invalid if [gv] has a bitwidth greater than [nativeint]. See the field [llvm::GenericValue::IntVal]. *) - external as_nativeint : t -> nativeint = "llvm_genericvalue_as_int" + external as_nativeint : t -> nativeint = "llvm_genericvalue_as_nativeint" (** [as_int64 gv] returns the integer-valued generic value [gv] as an [int64]. Is invalid if [gv] has a bitwidth greater than [int64]. See the field @@ -112,7 +112,7 @@ external dispose : t -> unit = "llvm_ee_dispose" (** [add_module m ee] adds the module [m] to the execution engine [ee]. *) - external add_module : Llvm.llmodule -> t -> unit = "llvm_ee_add_mp" + external add_module : Llvm.llmodule -> t -> unit = "llvm_ee_add_module" (** [remove_module m ee] removes the module [m] from the execution engine [ee], disposing of [m] and the module referenced by [mp]. Raises From idadesub at users.sourceforge.net Wed Mar 3 17:51:34 2010 From: idadesub at users.sourceforge.net (Erick Tryzelaar) Date: Wed, 03 Mar 2010 23:51:34 -0000 Subject: [llvm-commits] [llvm] r97685 - in /llvm/trunk: bindings/ocaml/transforms/scalar/llvm_scalar_opts.ml bindings/ocaml/transforms/scalar/llvm_scalar_opts.mli bindings/ocaml/transforms/scalar/scalar_opts_ocaml.c test/Bindings/Ocaml/scalar_opts.ml Message-ID: <20100303235134.CA11E2A6C12C@llvm.org> Author: erickt Date: Wed Mar 3 17:51:34 2010 New Revision: 97685 URL: http://llvm.org/viewvc/llvm-project?rev=97685&view=rev Log: Expose the rest of the llvm-c scalar opts to ocaml. Modified: llvm/trunk/bindings/ocaml/transforms/scalar/llvm_scalar_opts.ml llvm/trunk/bindings/ocaml/transforms/scalar/llvm_scalar_opts.mli llvm/trunk/bindings/ocaml/transforms/scalar/scalar_opts_ocaml.c llvm/trunk/test/Bindings/Ocaml/scalar_opts.ml Modified: llvm/trunk/bindings/ocaml/transforms/scalar/llvm_scalar_opts.ml URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/bindings/ocaml/transforms/scalar/llvm_scalar_opts.ml?rev=97685&r1=97684&r2=97685&view=diff ============================================================================== --- llvm/trunk/bindings/ocaml/transforms/scalar/llvm_scalar_opts.ml (original) +++ llvm/trunk/bindings/ocaml/transforms/scalar/llvm_scalar_opts.ml Wed Mar 3 17:51:34 2010 @@ -10,9 +10,38 @@ external add_constant_propagation : [ unit = "llvm_add_constant_propagation" -external add_instruction_combining : [ unit - = "llvm_add_instruction_combining" +external add_sccp : [ unit + = "llvm_add_sccp" +external add_dead_store_elimination : [ unit + = "llvm_add_dead_store_elimination" +external add_aggressive_dce : [ unit + = "llvm_add_aggressive_dce" +external +add_scalar_repl_aggregation : [ unit + = "llvm_add_scalar_repl_aggregation" +external add_ind_var_simplification : [ unit + = "llvm_add_ind_var_simplification" +external +add_instruction_combination : [ unit + = "llvm_add_instruction_combination" +external add_licm : [ unit + = "llvm_add_licm" +external add_loop_unswitch : [ unit + = "llvm_add_loop_unswitch" +external add_loop_unroll : [ unit + = "llvm_add_loop_unroll" +external add_loop_rotation : [ unit + = "llvm_add_loop_rotation" +external add_loop_index_split : [ unit + = "llvm_add_loop_index_split" external add_memory_to_register_promotion : [ unit @@ -21,12 +50,26 @@ add_memory_to_register_demotion : [ unit = "llvm_add_memory_to_register_demotion" -external add_reassociation : [ unit +external add_reassociation : [ unit = "llvm_add_reassociation" -external add_gvn : [ unit - = "llvm_add_gvn" +external add_jump_threading : [ unit + = "llvm_add_jump_threading" external add_cfg_simplification : [ unit = "llvm_add_cfg_simplification" +external +add_tail_call_elimination : [ unit + = "llvm_add_tail_call_elimination" +external add_gvn : [ unit + = "llvm_add_gvn" +external add_memcpy_opt : [ unit + = "llvm_add_memcpy_opt" +external add_loop_deletion : [ unit + = "llvm_add_loop_deletion" +external +add_lib_call_simplification : [ unit + = "llvm_add_lib_call_simplification" Modified: llvm/trunk/bindings/ocaml/transforms/scalar/llvm_scalar_opts.mli URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/bindings/ocaml/transforms/scalar/llvm_scalar_opts.mli?rev=97685&r1=97684&r2=97685&view=diff ============================================================================== --- llvm/trunk/bindings/ocaml/transforms/scalar/llvm_scalar_opts.mli (original) +++ llvm/trunk/bindings/ocaml/transforms/scalar/llvm_scalar_opts.mli Wed Mar 3 17:51:34 2010 @@ -17,10 +17,59 @@ -> unit = "llvm_add_constant_propagation" +(** See the [llvm::createSCCPPass] function. *) +external add_sccp : [ unit + = "llvm_add_sccp" + +(** See [llvm::createDeadStoreEliminationPass] function. *) +external add_dead_store_elimination : [ unit + = "llvm_add_dead_store_elimination" + +(** See The [llvm::createAggressiveDCEPass] function. *) +external add_aggressive_dce : [ unit + = "llvm_add_aggressive_dce" + +(** See the [llvm::createScalarReplAggregatesPass] function. *) +external +add_scalar_repl_aggregation : [ unit + = "llvm_add_scalar_repl_aggregation" + +(** See the [llvm::createIndVarSimplifyPass] function. *) +external add_ind_var_simplification : [ unit + = "llvm_add_ind_var_simplification" + (** See the [llvm::createInstructionCombiningPass] function. *) -external add_instruction_combining : [ unit - = "llvm_add_instruction_combining" +external +add_instruction_combination : [ unit + = "llvm_add_instruction_combination" + +(** See the [llvm::createLICMPass] function. *) +external add_licm : [ unit + = "llvm_add_licm" + +(** See the [llvm::createLoopUnswitchPass] function. *) +external add_loop_unswitch : [ unit + = "llvm_add_loop_unswitch" + +(** See the [llvm::createLoopUnrollPass] function. *) +external add_loop_unroll : [ unit + = "llvm_add_loop_unroll" + +(** See the [llvm::createLoopRotatePass] function. *) +external add_loop_rotation : [ unit + = "llvm_add_loop_rotation" + +(** See the [llvm::createLoopIndexSplitPass] function. *) +external add_loop_index_split : [ unit + = "llvm_add_loop_index_split" (** See the [llvm::createPromoteMemoryToRegisterPass] function. *) external @@ -35,16 +84,40 @@ = "llvm_add_memory_to_register_demotion" (** See the [llvm::createReassociatePass] function. *) -external add_reassociation : [ unit +external add_reassociation : [ unit = "llvm_add_reassociation" -(** See the [llvm::createGVNPass] function. *) -external add_gvn : [ unit - = "llvm_add_gvn" +(** See the [llvm::createJumpThreadingPass] function. *) +external add_jump_threading : [ unit + = "llvm_add_jump_threading" (** See the [llvm::createCFGSimplificationPass] function. *) external add_cfg_simplification : [ unit = "llvm_add_cfg_simplification" + +(** See the [llvm::createTailCallEliminationPass] function. *) +external +add_tail_call_elimination : [ unit + = "llvm_add_tail_call_elimination" + +(** See the [llvm::createGVNPass] function. *) +external add_gvn : [ unit + = "llvm_add_gvn" + +(** See the [llvm::createMemCpyOptPass] function. *) +external add_memcpy_opt : [ unit + = "llvm_add_memcpy_opt" + +(** See the [llvm::createLoopDeletionPass] function. *) +external add_loop_deletion : [ unit + = "llvm_add_loop_deletion" + +(** See the [llvm::createSimplifyLibCallsPass] function. *) +external +add_lib_call_simplification : [ unit + = "llvm_add_lib_call_simplification" Modified: llvm/trunk/bindings/ocaml/transforms/scalar/scalar_opts_ocaml.c URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/bindings/ocaml/transforms/scalar/scalar_opts_ocaml.c?rev=97685&r1=97684&r2=97685&view=diff ============================================================================== --- llvm/trunk/bindings/ocaml/transforms/scalar/scalar_opts_ocaml.c (original) +++ llvm/trunk/bindings/ocaml/transforms/scalar/scalar_opts_ocaml.c Wed Mar 3 17:51:34 2010 @@ -26,12 +26,72 @@ } /* [ unit */ -CAMLprim value llvm_add_instruction_combining(LLVMPassManagerRef PM) { +CAMLprim value llvm_add_sccp(LLVMPassManagerRef PM) { + LLVMAddSCCPPass(PM); + return Val_unit; +} + +/* [ unit */ +CAMLprim value llvm_add_dead_store_elimination(LLVMPassManagerRef PM) { + LLVMAddDeadStoreEliminationPass(PM); + return Val_unit; +} + +/* [ unit */ +CAMLprim value llvm_add_aggressive_dce(LLVMPassManagerRef PM) { + LLVMAddAggressiveDCEPass(PM); + return Val_unit; +} + +/* [ unit */ +CAMLprim value llvm_add_scalar_repl_aggregation(LLVMPassManagerRef PM) { + LLVMAddScalarReplAggregatesPass(PM); + return Val_unit; +} + +/* [ unit */ +CAMLprim value llvm_add_ind_var_simplification(LLVMPassManagerRef PM) { + LLVMAddIndVarSimplifyPass(PM); + return Val_unit; +} + +/* [ unit */ +CAMLprim value llvm_add_instruction_combination(LLVMPassManagerRef PM) { LLVMAddInstructionCombiningPass(PM); return Val_unit; } /* [ unit */ +CAMLprim value llvm_add_licm(LLVMPassManagerRef PM) { + LLVMAddLICMPass(PM); + return Val_unit; +} + +/* [ unit */ +CAMLprim value llvm_add_loop_unswitch(LLVMPassManagerRef PM) { + LLVMAddLoopUnrollPass(PM); + return Val_unit; +} + +/* [ unit */ +CAMLprim value llvm_add_loop_unroll(LLVMPassManagerRef PM) { + LLVMAddLoopUnrollPass(PM); + return Val_unit; +} + +/* [ unit */ +CAMLprim value llvm_add_loop_rotation(LLVMPassManagerRef PM) { + LLVMAddLoopRotatePass(PM); + return Val_unit; +} + +/* [ unit */ +CAMLprim value llvm_add_loop_index_split(LLVMPassManagerRef PM) { + LLVMAddLoopIndexSplitPass(PM); + return Val_unit; +} + +/* [ unit */ CAMLprim value llvm_add_memory_to_register_promotion(LLVMPassManagerRef PM) { LLVMAddPromoteMemoryToRegisterPass(PM); return Val_unit; @@ -50,8 +110,8 @@ } /* [ unit */ -CAMLprim value llvm_add_gvn(LLVMPassManagerRef PM) { - LLVMAddGVNPass(PM); +CAMLprim value llvm_add_jump_threading(LLVMPassManagerRef PM) { + LLVMAddJumpThreadingPass(PM); return Val_unit; } @@ -60,3 +120,33 @@ LLVMAddCFGSimplificationPass(PM); return Val_unit; } + +/* [ unit */ +CAMLprim value llvm_add_tail_call_elimination(LLVMPassManagerRef PM) { + LLVMAddTailCallEliminationPass(PM); + return Val_unit; +} + +/* [ unit */ +CAMLprim value llvm_add_gvn(LLVMPassManagerRef PM) { + LLVMAddGVNPass(PM); + return Val_unit; +} + +/* [ unit */ +CAMLprim value llvm_add_memcpy_opt(LLVMPassManagerRef PM) { + LLVMAddMemCpyOptPass(PM); + return Val_unit; +} + +/* [ unit */ +CAMLprim value llvm_add_loop_deletion(LLVMPassManagerRef PM) { + LLVMAddLoopDeletionPass(PM); + return Val_unit; +} + +/* [ unit */ +CAMLprim value llvm_add_lib_call_simplification(LLVMPassManagerRef PM) { + LLVMAddSimplifyLibCallsPass(PM); + return Val_unit; +} Modified: llvm/trunk/test/Bindings/Ocaml/scalar_opts.ml URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Bindings/Ocaml/scalar_opts.ml?rev=97685&r1=97684&r2=97685&view=diff ============================================================================== --- llvm/trunk/test/Bindings/Ocaml/scalar_opts.ml (original) +++ llvm/trunk/test/Bindings/Ocaml/scalar_opts.ml Wed Mar 3 17:51:34 2010 @@ -37,11 +37,28 @@ ignore (PassManager.create_function m ++ TargetData.add td - ++ add_instruction_combining + ++ add_constant_propagation + ++ add_sccp + ++ add_dead_store_elimination + ++ add_aggressive_dce + ++ add_scalar_repl_aggregation + ++ add_ind_var_simplification + ++ add_instruction_combination + ++ add_licm + ++ add_loop_unswitch + ++ add_loop_unroll + ++ add_loop_rotation + ++ add_loop_index_split + ++ add_memory_to_register_promotion + ++ add_memory_to_register_demotion ++ add_reassociation - ++ add_gvn + ++ add_jump_threading ++ add_cfg_simplification - ++ add_constant_propagation + ++ add_tail_call_elimination + ++ add_gvn + ++ add_memcpy_opt + ++ add_loop_deletion + ++ add_lib_call_simplification ++ PassManager.initialize ++ PassManager.run_function fn ++ PassManager.finalize From idadesub at users.sourceforge.net Wed Mar 3 17:51:28 2010 From: idadesub at users.sourceforge.net (Erick Tryzelaar) Date: Wed, 03 Mar 2010 23:51:28 -0000 Subject: [llvm-commits] [llvm] r97683 - /llvm/trunk/bindings/ocaml/executionengine/llvm_executionengine.mli Message-ID: <20100303235128.59F212A6C12D@llvm.org> Author: erickt Date: Wed Mar 3 17:51:28 2010 New Revision: 97683 URL: http://llvm.org/viewvc/llvm-project?rev=97683&view=rev Log: Expose the external functions for ocaml's execution engine as an optimization. Modified: llvm/trunk/bindings/ocaml/executionengine/llvm_executionengine.mli Modified: llvm/trunk/bindings/ocaml/executionengine/llvm_executionengine.mli URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/bindings/ocaml/executionengine/llvm_executionengine.mli?rev=97683&r1=97682&r2=97683&view=diff ============================================================================== --- llvm/trunk/bindings/ocaml/executionengine/llvm_executionengine.mli (original) +++ llvm/trunk/bindings/ocaml/executionengine/llvm_executionengine.mli Wed Mar 3 17:51:28 2010 @@ -25,57 +25,58 @@ (** [of_float fpty n] boxes the float [n] in a float-valued generic value according to the floating point type [fpty]. See the fields [llvm::GenericValue::DoubleVal] and [llvm::GenericValue::FloatVal]. *) - val of_float: Llvm.lltype -> float -> t + external of_float : Llvm.lltype -> float -> t = "llvm_genericvalue_of_float" (** [of_pointer v] boxes the pointer value [v] in a generic value. See the field [llvm::GenericValue::PointerVal]. *) - val of_pointer: 'a -> t + external of_pointer : 'a -> t = "llvm_genericvalue_of_value" (** [of_int32 n w] boxes the int32 [i] in a generic value with the bitwidth [w]. See the field [llvm::GenericValue::IntVal]. *) - val of_int32: Llvm.lltype -> int32 -> t + external of_int32 : Llvm.lltype -> int32 -> t = "llvm_genericvalue_of_int32" (** [of_int n w] boxes the int [i] in a generic value with the bitwidth [w]. See the field [llvm::GenericValue::IntVal]. *) - val of_int: Llvm.lltype -> int -> t + external of_int : Llvm.lltype -> int -> t = "llvm_genericvalue_of_int" (** [of_natint n w] boxes the native int [i] in a generic value with the bitwidth [w]. See the field [llvm::GenericValue::IntVal]. *) - val of_nativeint: Llvm.lltype -> nativeint -> t - + external of_nativeint : Llvm.lltype -> nativeint -> t + = "llvm_genericvalue_of_nativeint" + (** [of_int64 n w] boxes the int64 [i] in a generic value with the bitwidth [w]. See the field [llvm::GenericValue::IntVal]. *) - val of_int64: Llvm.lltype -> int64 -> t - + external of_int64 : Llvm.lltype -> int64 -> t = "llvm_genericvalue_of_int64" + (** [as_float fpty gv] unboxes the floating point-valued generic value [gv] of floating point type [fpty]. See the fields [llvm::GenericValue::DoubleVal] and [llvm::GenericValue::FloatVal]. *) - val as_float: Llvm.lltype -> t -> float + external as_float : Llvm.lltype -> t -> float = "llvm_genericvalue_as_float" (** [as_pointer gv] unboxes the pointer-valued generic value [gv]. See the field [llvm::GenericValue::PointerVal]. *) - val as_pointer: t -> 'a + external as_pointer : t -> 'a = "llvm_genericvalue_as_value" (** [as_int32 gv] unboxes the integer-valued generic value [gv] as an [int32]. Is invalid if [gv] has a bitwidth greater than 32 bits. See the field [llvm::GenericValue::IntVal]. *) - val as_int32: t -> int32 + external as_int32 : t -> int32 = "llvm_genericvalue_as_int32" (** [as_int gv] unboxes the integer-valued generic value [gv] as an [int]. Is invalid if [gv] has a bitwidth greater than the host bit width (but the most significant bit may be lost). See the field [llvm::GenericValue::IntVal]. *) - val as_int: t -> int + external as_int : t -> int = "llvm_genericvalue_as_int" (** [as_natint gv] unboxes the integer-valued generic value [gv] as a [nativeint]. Is invalid if [gv] has a bitwidth greater than [nativeint]. See the field [llvm::GenericValue::IntVal]. *) - val as_nativeint: t -> nativeint + external as_nativeint : t -> nativeint = "llvm_genericvalue_as_int" (** [as_int64 gv] returns the integer-valued generic value [gv] as an [int64]. Is invalid if [gv] has a bitwidth greater than [int64]. See the field [llvm::GenericValue::IntVal]. *) - val as_int64: t -> int64 + external as_int64 : t -> int64 = "llvm_genericvalue_as_int64" end @@ -90,66 +91,72 @@ interpreter. Raises [Error msg] if an error occurrs. The execution engine is not garbage collected and must be destroyed with [dispose ee]. See the function [llvm::EngineBuilder::create]. *) - val create: Llvm.llmodule -> t + external create : Llvm.llmodule -> t = "llvm_ee_create" (** [create_interpreter m] creates a new interpreter, taking ownership of the module [m] if successful. Raises [Error msg] if an error occurrs. The execution engine is not garbage collected and must be destroyed with [dispose ee]. See the function [llvm::EngineBuilder::create]. *) - val create_interpreter: Llvm.llmodule -> t + external create_interpreter : Llvm.llmodule -> t = "llvm_ee_create_interpreter" (** [create_jit m optlevel] creates a new JIT (just-in-time compiler), taking ownership of the module [m] if successful with the desired optimization level [optlevel]. Raises [Error msg] if an error occurrs. The execution engine is not garbage collected and must be destroyed with [dispose ee]. See the function [llvm::EngineBuilder::create]. *) - val create_jit : Llvm.llmodule -> int -> t + external create_jit : Llvm.llmodule -> int -> t = "llvm_ee_create_jit" (** [dispose ee] releases the memory used by the execution engine and must be invoked to avoid memory leaks. *) - val dispose: t -> unit + external dispose : t -> unit = "llvm_ee_dispose" (** [add_module m ee] adds the module [m] to the execution engine [ee]. *) - val add_module: Llvm.llmodule -> t -> unit + external add_module : Llvm.llmodule -> t -> unit = "llvm_ee_add_mp" (** [remove_module m ee] removes the module [m] from the execution engine [ee], disposing of [m] and the module referenced by [mp]. Raises [Error msg] if an error occurs. *) - val remove_module: Llvm.llmodule -> t -> Llvm.llmodule + external remove_module : Llvm.llmodule -> t -> Llvm.llmodule + = "llvm_ee_remove_module" (** [find_function n ee] finds the function named [n] defined in any of the modules owned by the execution engine [ee]. Returns [None] if the function is not found and [Some f] otherwise. *) - val find_function: string -> t -> Llvm.llvalue option + external find_function : string -> t -> Llvm.llvalue option + = "llvm_ee_find_function" (** [run_function f args ee] synchronously executes the function [f] with the arguments [args], which must be compatible with the parameter types. *) - val run_function: Llvm.llvalue -> GenericValue.t array -> t -> - GenericValue.t + external run_function : Llvm.llvalue -> GenericValue.t array -> t -> + GenericValue.t + = "llvm_ee_run_function" (** [run_static_ctors ee] executes the static constructors of each module in the execution engine [ee]. *) - val run_static_ctors: t -> unit + external run_static_ctors : t -> unit = "llvm_ee_run_static_ctors" (** [run_static_dtors ee] executes the static destructors of each module in the execution engine [ee]. *) - val run_static_dtors: t -> unit + external run_static_dtors : t -> unit = "llvm_ee_run_static_dtors" (** [run_function_as_main f args env ee] executes the function [f] as a main function, passing it [argv] and [argc] according to the string array [args], and [envp] as specified by the array [env]. Returns the integer return value of the function. *) - val run_function_as_main: Llvm.llvalue -> string array -> - (string * string) array -> t -> int + external run_function_as_main : Llvm.llvalue -> string array -> + (string * string) array -> t -> int + = "llvm_ee_run_function_as_main" (** [free_machine_code f ee] releases the memory in the execution engine [ee] used to store the machine code for the function [f]. *) - val free_machine_code: Llvm.llvalue -> t -> unit + external free_machine_code : Llvm.llvalue -> t -> unit + = "llvm_ee_free_machine_code" (** [target_data ee] is the target data owned by the execution engine [ee]. *) - val target_data: t -> Llvm_target.TargetData.t + external target_data : t -> Llvm_target.TargetData.t + = "LLVMGetExecutionEngineTargetData" end external initialize_native_target : unit -> bool From evan.cheng at apple.com Wed Mar 3 17:55:49 2010 From: evan.cheng at apple.com (Evan Cheng) Date: Wed, 03 Mar 2010 23:55:49 -0000 Subject: [llvm-commits] [llvm] r97687 - in /llvm/trunk/lib/CodeGen: PHIElimination.cpp PHIElimination.h Message-ID: <20100303235549.997D72A6C12C@llvm.org> Author: evancheng Date: Wed Mar 3 17:55:49 2010 New Revision: 97687 URL: http://llvm.org/viewvc/llvm-project?rev=97687&view=rev Log: Remove PHINodeTraits and use MachineInstrExpressionTrait instead. Modified: llvm/trunk/lib/CodeGen/PHIElimination.cpp llvm/trunk/lib/CodeGen/PHIElimination.h Modified: llvm/trunk/lib/CodeGen/PHIElimination.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/PHIElimination.cpp?rev=97687&r1=97686&r2=97687&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/PHIElimination.cpp (original) +++ llvm/trunk/lib/CodeGen/PHIElimination.cpp Wed Mar 3 17:55:49 2010 @@ -443,34 +443,3 @@ return NMBB; } - -unsigned -PHIElimination::PHINodeTraits::getHashValue(const MachineInstr *MI) { - if (!MI || MI==getEmptyKey() || MI==getTombstoneKey()) - return DenseMapInfo::getHashValue(MI); - unsigned hash = 0; - for (unsigned ni = 1, ne = MI->getNumOperands(); ni != ne; ni += 2) - hash = hash*37 + DenseMapInfo:: - getHashValue(BBVRegPair(MI->getOperand(ni+1).getMBB()->getNumber(), - MI->getOperand(ni).getReg())); - return hash; -} - -bool PHIElimination::PHINodeTraits::isEqual(const MachineInstr *LHS, - const MachineInstr *RHS) { - const MachineInstr *EmptyKey = getEmptyKey(); - const MachineInstr *TombstoneKey = getTombstoneKey(); - if (!LHS || !RHS || LHS==EmptyKey || RHS==EmptyKey || - LHS==TombstoneKey || RHS==TombstoneKey) - return LHS==RHS; - - unsigned ne = LHS->getNumOperands(); - if (ne != RHS->getNumOperands()) - return false; - // Ignore operand 0, the defined register. - for (unsigned ni = 1; ni != ne; ni += 2) - if (LHS->getOperand(ni).getReg() != RHS->getOperand(ni).getReg() || - LHS->getOperand(ni+1).getMBB() != RHS->getOperand(ni+1).getMBB()) - return false; - return true; -} Modified: llvm/trunk/lib/CodeGen/PHIElimination.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/PHIElimination.h?rev=97687&r1=97686&r2=97687&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/PHIElimination.h (original) +++ llvm/trunk/lib/CodeGen/PHIElimination.h Wed Mar 3 17:55:49 2010 @@ -102,15 +102,9 @@ // Defs of PHI sources which are implicit_def. SmallPtrSet ImpDefs; - // Lowered PHI nodes may be reused. We provide special DenseMap traits to - // match PHI nodes with identical arguments. - struct PHINodeTraits : public DenseMapInfo { - static unsigned getHashValue(const MachineInstr *PtrVal); - static bool isEqual(const MachineInstr *LHS, const MachineInstr *RHS); - }; - // Map reusable lowered PHI node -> incoming join register. - typedef DenseMap LoweredPHIMap; + typedef DenseMap LoweredPHIMap; LoweredPHIMap LoweredPHIs; }; From evan.cheng at apple.com Wed Mar 3 17:59:08 2010 From: evan.cheng at apple.com (Evan Cheng) Date: Wed, 03 Mar 2010 23:59:08 -0000 Subject: [llvm-commits] [llvm] r97688 - /llvm/trunk/lib/CodeGen/MachineCSE.cpp Message-ID: <20100303235909.02B6C2A6C12C@llvm.org> Author: evancheng Date: Wed Mar 3 17:59:08 2010 New Revision: 97688 URL: http://llvm.org/viewvc/llvm-project?rev=97688&view=rev Log: Fix a logic error. An instruction that has a live physical register def cannot be CSE'ed, but it *can* be used to replace a common subexpression. Modified: llvm/trunk/lib/CodeGen/MachineCSE.cpp Modified: llvm/trunk/lib/CodeGen/MachineCSE.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineCSE.cpp?rev=97688&r1=97687&r2=97688&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/MachineCSE.cpp (original) +++ llvm/trunk/lib/CodeGen/MachineCSE.cpp Wed Mar 3 17:59:08 2010 @@ -128,8 +128,6 @@ if (TII->isMoveInstr(*MI, SrcReg, DstReg, SrcSubIdx, DstSubIdx) || MI->isExtractSubreg() || MI->isInsertSubreg() || MI->isSubregToReg()) continue; - if (hasLivePhysRegDefUse(MI)) - continue; bool FoundCSE = VNT.count(MI); if (!FoundCSE) { @@ -138,6 +136,11 @@ FoundCSE = VNT.count(MI); } + // If the instruction defines a physical register and the value *may* be + // used, then it's not safe to replace it with a common subexpression. + if (FoundCSE && hasLivePhysRegDefUse(MI)) + FoundCSE = false; + if (!FoundCSE) { VNT.insert(MI, CurrVN++); Exps.push_back(MI); From sabre at nondot.org Wed Mar 3 18:21:16 2010 From: sabre at nondot.org (Chris Lattner) Date: Thu, 04 Mar 2010 00:21:16 -0000 Subject: [llvm-commits] [llvm] r97690 - in /llvm/trunk: include/llvm/CodeGen/SelectionDAGISel.h lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Message-ID: <20100304002116.891292A6C12C@llvm.org> Author: lattner Date: Wed Mar 3 18:21:16 2010 New Revision: 97690 URL: http://llvm.org/viewvc/llvm-project?rev=97690&view=rev Log: inline CannotYetSelectIntrinsic into CannotYetSelect and simplify. Modified: llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Modified: llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h?rev=97690&r1=97689&r2=97690&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h (original) +++ llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h Wed Mar 3 18:21:16 2010 @@ -276,7 +276,6 @@ SDNode *Select_UNDEF(SDNode *N); SDNode *Select_EH_LABEL(SDNode *N); void CannotYetSelect(SDNode *N); - void CannotYetSelectIntrinsic(SDNode *N); private: void DoInstructionSelection(); Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp?rev=97690&r1=97689&r2=97690&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Wed Mar 3 18:21:16 2010 @@ -2711,29 +2711,26 @@ void SelectionDAGISel::CannotYetSelect(SDNode *N) { - if (N->getOpcode() == ISD::INTRINSIC_W_CHAIN || - N->getOpcode() == ISD::INTRINSIC_WO_CHAIN || - N->getOpcode() == ISD::INTRINSIC_VOID) - return CannotYetSelectIntrinsic(N); - std::string msg; raw_string_ostream Msg(msg); Msg << "Cannot yet select: "; - N->printrFull(Msg, CurDAG); + + if (N->getOpcode() != ISD::INTRINSIC_W_CHAIN && + N->getOpcode() != ISD::INTRINSIC_WO_CHAIN && + N->getOpcode() != ISD::INTRINSIC_VOID) { + N->printrFull(Msg, CurDAG); + } else { + bool HasInputChain = N->getOperand(0).getValueType() == MVT::Other; + unsigned iid = + cast(N->getOperand(HasInputChain))->getZExtValue(); + if (iid < Intrinsic::num_intrinsics) + Msg << "intrinsic %" << Intrinsic::getName((Intrinsic::ID)iid); + else if (const TargetIntrinsicInfo *TII = TM.getIntrinsicInfo()) + Msg << "target intrinsic %" << TII->getName(iid); + else + Msg << "unknown intrinsic #" << iid; + } llvm_report_error(Msg.str()); } -void SelectionDAGISel::CannotYetSelectIntrinsic(SDNode *N) { - dbgs() << "Cannot yet select: "; - unsigned iid = - cast(N->getOperand(N->getOperand(0).getValueType() == - MVT::Other))->getZExtValue(); - if (iid < Intrinsic::num_intrinsics) - llvm_report_error("Cannot yet select: intrinsic %" + - Intrinsic::getName((Intrinsic::ID)iid)); - else if (const TargetIntrinsicInfo *tii = TM.getIntrinsicInfo()) - llvm_report_error(Twine("Cannot yet select: target intrinsic %") + - tii->getName(iid)); -} - char SelectionDAGISel::ID = 0; From rjmccall at apple.com Wed Mar 3 18:21:48 2010 From: rjmccall at apple.com (John McCall) Date: Thu, 04 Mar 2010 00:21:48 -0000 Subject: [llvm-commits] [llvm] r97691 - /llvm/trunk/lib/Target/PIC16/TargetInfo/PIC16TargetInfo.cpp Message-ID: <20100304002148.22D9A2A6C12C@llvm.org> Author: rjmccall Date: Wed Mar 3 18:21:47 2010 New Revision: 97691 URL: http://llvm.org/viewvc/llvm-project?rev=97691&view=rev Log: Teach the pic16 target to recognize pic16-*-* triples. Modified: llvm/trunk/lib/Target/PIC16/TargetInfo/PIC16TargetInfo.cpp Modified: llvm/trunk/lib/Target/PIC16/TargetInfo/PIC16TargetInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PIC16/TargetInfo/PIC16TargetInfo.cpp?rev=97691&r1=97690&r2=97691&view=diff ============================================================================== --- llvm/trunk/lib/Target/PIC16/TargetInfo/PIC16TargetInfo.cpp (original) +++ llvm/trunk/lib/Target/PIC16/TargetInfo/PIC16TargetInfo.cpp Wed Mar 3 18:21:47 2010 @@ -15,7 +15,8 @@ Target llvm::ThePIC16Target, llvm::TheCooperTarget; extern "C" void LLVMInitializePIC16TargetInfo() { - RegisterTarget<> X(ThePIC16Target, "pic16", "PIC16 14-bit [experimental]"); + RegisterTarget X(ThePIC16Target, "pic16", + "PIC16 14-bit [experimental]"); RegisterTarget<> Y(TheCooperTarget, "cooper", "PIC16 Cooper [experimental]"); } From gohman at apple.com Wed Mar 3 18:23:16 2010 From: gohman at apple.com (Dan Gohman) Date: Thu, 04 Mar 2010 00:23:16 -0000 Subject: [llvm-commits] [llvm] r97692 - /llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Message-ID: <20100304002316.DE5122A6C12C@llvm.org> Author: djg Date: Wed Mar 3 18:23:16 2010 New Revision: 97692 URL: http://llvm.org/viewvc/llvm-project?rev=97692&view=rev Log: Fix more code to work properly with vector operands. Based on a patch my Micah Villmow for PR6465. Modified: llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Modified: llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp?rev=97692&r1=97691&r2=97692&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Wed Mar 3 18:23:16 2010 @@ -1758,7 +1758,7 @@ ConstantSDNode *N0C = dyn_cast(N0); ConstantSDNode *N1C = dyn_cast(N1); EVT VT = N1.getValueType(); - unsigned BitWidth = VT.getSizeInBits(); + unsigned BitWidth = VT.getScalarType().getSizeInBits(); // fold vector ops if (VT.isVector()) { @@ -1872,9 +1872,9 @@ EVT MemVT = LN0->getMemoryVT(); // If we zero all the possible extended bits, then we can turn this into // a zextload if we are running before legalize or the operation is legal. - unsigned BitWidth = N1.getValueSizeInBits(); + unsigned BitWidth = N1.getValueType().getScalarType().getSizeInBits(); if (DAG.MaskedValueIsZero(N1, APInt::getHighBitsSet(BitWidth, - BitWidth - MemVT.getSizeInBits())) && + BitWidth - MemVT.getScalarType().getSizeInBits())) && ((!LegalOperations && !LN0->isVolatile()) || TLI.isLoadExtLegal(ISD::ZEXTLOAD, MemVT))) { SDValue ExtLoad = DAG.getExtLoad(ISD::ZEXTLOAD, N0.getDebugLoc(), VT, @@ -1895,9 +1895,9 @@ EVT MemVT = LN0->getMemoryVT(); // If we zero all the possible extended bits, then we can turn this into // a zextload if we are running before legalize or the operation is legal. - unsigned BitWidth = N1.getValueSizeInBits(); + unsigned BitWidth = N1.getValueType().getScalarType().getSizeInBits(); if (DAG.MaskedValueIsZero(N1, APInt::getHighBitsSet(BitWidth, - BitWidth - MemVT.getSizeInBits())) && + BitWidth - MemVT.getScalarType().getSizeInBits())) && ((!LegalOperations && !LN0->isVolatile()) || TLI.isLoadExtLegal(ISD::ZEXTLOAD, MemVT))) { SDValue ExtLoad = DAG.getExtLoad(ISD::ZEXTLOAD, N0.getDebugLoc(), VT, From sabre at nondot.org Wed Mar 3 18:28:05 2010 From: sabre at nondot.org (Chris Lattner) Date: Thu, 04 Mar 2010 00:28:05 -0000 Subject: [llvm-commits] [llvm] r97696 - in /llvm/trunk/utils/TableGen: DAGISelMatcher.h DAGISelMatcherEmitter.cpp DAGISelMatcherGen.cpp Message-ID: <20100304002805.3A5322A6C12C@llvm.org> Author: lattner Date: Wed Mar 3 18:28:05 2010 New Revision: 97696 URL: http://llvm.org/viewvc/llvm-project?rev=97696&view=rev Log: enhance comment output to specify what recorded slot numbers a ComplexPat will match into. Modified: llvm/trunk/utils/TableGen/DAGISelMatcher.h llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp Modified: llvm/trunk/utils/TableGen/DAGISelMatcher.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelMatcher.h?rev=97696&r1=97695&r2=97696&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelMatcher.h (original) +++ llvm/trunk/utils/TableGen/DAGISelMatcher.h Wed Mar 3 18:28:05 2010 @@ -609,11 +609,15 @@ /// the current node. class CheckComplexPatMatcher : public Matcher { const ComplexPattern &Pattern; + /// FirstResult - This is the first slot in the RecordedNodes list that the + /// result of the match populates. + unsigned FirstResult; public: - CheckComplexPatMatcher(const ComplexPattern &pattern) - : Matcher(CheckComplexPat), Pattern(pattern) {} + CheckComplexPatMatcher(const ComplexPattern &pattern, unsigned firstresult) + : Matcher(CheckComplexPat), Pattern(pattern), FirstResult(firstresult) {} const ComplexPattern &getPattern() const { return Pattern; } + unsigned getFirstResult() const { return FirstResult; } static inline bool classof(const Matcher *N) { return N->getKind() == CheckComplexPat; Modified: llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp?rev=97696&r1=97695&r2=97696&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp (original) +++ llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp Wed Mar 3 18:28:05 2010 @@ -375,9 +375,12 @@ OS << "OPC_CheckComplexPat, " << getComplexPat(Pattern) << ','; if (!OmitComments) { OS.PadToColumn(CommentIndent) << "// " << Pattern.getSelectFunc(); - OS << ": " << Pattern.getNumOperands() << " operands"; + OS << ':'; + for (unsigned i = 0, e = Pattern.getNumOperands(); i != e; ++i) + OS << " #" << cast(N)->getFirstResult()+i; + if (Pattern.hasProperty(SDNPHasChain)) - OS << " + chain result and input"; + OS << " + chain result"; } OS << '\n'; return 2; Modified: llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp?rev=97696&r1=97695&r2=97696&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp (original) +++ llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp Wed Mar 3 18:28:05 2010 @@ -252,7 +252,7 @@ // Emit a CheckComplexPat operation, which does the match (aborting if it // fails) and pushes the matched operands onto the recorded nodes list. - AddMatcher(new CheckComplexPatMatcher(CP)); + AddMatcher(new CheckComplexPatMatcher(CP, NextRecordedOperandNo)); // Record the right number of operands. NextRecordedOperandNo += CP.getNumOperands(); From dgregor at apple.com Wed Mar 3 18:30:15 2010 From: dgregor at apple.com (Douglas Gregor) Date: Thu, 04 Mar 2010 00:30:15 -0000 Subject: [llvm-commits] [test-suite] r97697 - /test-suite/trunk/MultiSource/Applications/minisat/SolverTypes.h Message-ID: <20100304003015.E85772A6C12C@llvm.org> Author: dgregor Date: Wed Mar 3 18:30:15 2010 New Revision: 97697 URL: http://llvm.org/viewvc/llvm-project?rev=97697&view=rev Log: Fix minisat not to require GCC's overly promiscuous search for friend templates in places where it's not permitted to look. Clang diagnosed the ill-formed code, GCC did not. Modified: test-suite/trunk/MultiSource/Applications/minisat/SolverTypes.h Modified: test-suite/trunk/MultiSource/Applications/minisat/SolverTypes.h URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/MultiSource/Applications/minisat/SolverTypes.h?rev=97697&r1=97696&r2=97697&view=diff ============================================================================== --- test-suite/trunk/MultiSource/Applications/minisat/SolverTypes.h (original) +++ test-suite/trunk/MultiSource/Applications/minisat/SolverTypes.h Wed Mar 3 18:30:15 2010 @@ -117,14 +117,6 @@ for (int i = 0; i < ps.size(); i++) data[i] = ps[i]; if (learnt) extra.act = 0; else calcAbstraction(); } - // -- use this function instead: - template - friend Clause* Clause_new(const V& ps, bool learnt = false) { - assert(sizeof(Lit) == sizeof(uint32_t)); - assert(sizeof(float) == sizeof(uint32_t)); - void* mem = malloc(sizeof(Clause) + sizeof(uint32_t)*(ps.size())); - return new (mem) Clause(ps, learnt); } - int size () const { return size_etc >> 3; } void shrink (int i) { assert(i <= size()); size_etc = (((size_etc >> 3) - i) << 3) | (size_etc & 7); } void pop () { shrink(1); } @@ -146,6 +138,14 @@ void strengthen (Lit p); }; +// -- use this function instead: +template +Clause* Clause_new(const V& ps, bool learnt = false) { + assert(sizeof(Lit) == sizeof(uint32_t)); + assert(sizeof(float) == sizeof(uint32_t)); + void* mem = malloc(sizeof(Clause) + sizeof(uint32_t)*(ps.size())); + return new (mem) Clause(ps, learnt); +} /*_________________________________________________________________________________________________ | From jyasskin at google.com Wed Mar 3 18:32:34 2010 From: jyasskin at google.com (Jeffrey Yasskin) Date: Thu, 04 Mar 2010 00:32:34 -0000 Subject: [llvm-commits] [llvm] r97698 - /llvm/trunk/lib/ExecutionEngine/JIT/JITEmitter.cpp Message-ID: <20100304003234.1192C2A6C12C@llvm.org> Author: jyasskin Date: Wed Mar 3 18:32:33 2010 New Revision: 97698 URL: http://llvm.org/viewvc/llvm-project?rev=97698&view=rev Log: Make sure JITResolvers don't leave any stubs behind. When a JITResolver was destroyed, it could leave stubs in the StubToResolverMap, which would confuse the lookup for subsequent lazy compilations. Modified: llvm/trunk/lib/ExecutionEngine/JIT/JITEmitter.cpp Modified: llvm/trunk/lib/ExecutionEngine/JIT/JITEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/JIT/JITEmitter.cpp?rev=97698&r1=97697&r2=97698&view=diff ============================================================================== --- llvm/trunk/lib/ExecutionEngine/JIT/JITEmitter.cpp (original) +++ llvm/trunk/lib/ExecutionEngine/JIT/JITEmitter.cpp Wed Mar 3 18:32:33 2010 @@ -156,53 +156,18 @@ // was no stub. This function uses the call-site->function map to find a // relevant function, but asserts that only stubs and not other call sites // will be passed in. - Function *EraseStub(const MutexGuard &locked, void *Stub) { - CallSiteToFunctionMapTy::iterator C2F_I = - CallSiteToFunctionMap.find(Stub); - if (C2F_I == CallSiteToFunctionMap.end()) { - // Not a stub. - return NULL; - } - - Function *const F = C2F_I->second; -#ifndef NDEBUG - void *RealStub = FunctionToLazyStubMap.lookup(F); - assert(RealStub == Stub && - "Call-site that wasn't a stub pass in to EraseStub"); -#endif - FunctionToLazyStubMap.erase(F); - CallSiteToFunctionMap.erase(C2F_I); - - // Remove the stub from the function->call-sites map, and remove the whole - // entry from the map if that was the last call site. - FunctionToCallSitesMapTy::iterator F2C_I = FunctionToCallSitesMap.find(F); - assert(F2C_I != FunctionToCallSitesMap.end() && - "FunctionToCallSitesMap broken"); - bool Erased = F2C_I->second.erase(Stub); - (void)Erased; - assert(Erased && "FunctionToCallSitesMap broken"); - if (F2C_I->second.empty()) - FunctionToCallSitesMap.erase(F2C_I); - - return F; - } + Function *EraseStub(const MutexGuard &locked, void *Stub); - void EraseAllCallSites(const MutexGuard &locked, Function *F) { + void EraseAllCallSitesFor(const MutexGuard &locked, Function *F) { assert(locked.holds(TheJIT->lock)); - EraseAllCallSitesPrelocked(F); - } - void EraseAllCallSitesPrelocked(Function *F) { - FunctionToCallSitesMapTy::iterator F2C = FunctionToCallSitesMap.find(F); - if (F2C == FunctionToCallSitesMap.end()) - return; - for (SmallPtrSet::const_iterator I = F2C->second.begin(), - E = F2C->second.end(); I != E; ++I) { - bool Erased = CallSiteToFunctionMap.erase(*I); - (void)Erased; - assert(Erased && "Missing call site->function mapping"); - } - FunctionToCallSitesMap.erase(F2C); + EraseAllCallSitesForPrelocked(F); } + void EraseAllCallSitesForPrelocked(Function *F); + + // Erases _all_ call sites regardless of their function. This is used to + // unregister the stub addresses from the StubToResolverMap in + // ~JITResolver(). + void EraseAllCallSitesPrelocked(); }; /// JITResolver - Keep track of, and resolve, call sites for functions that @@ -240,6 +205,8 @@ LazyResolverFn = jit.getJITInfo().getLazyResolverFunction(JITCompilerFn); } + ~JITResolver(); + /// getLazyFunctionStubIfAvailable - This returns a pointer to a function's /// lazy-compilation stub if it has already been created. void *getLazyFunctionStubIfAvailable(Function *F); @@ -305,6 +272,17 @@ --I; return I->second; } + /// True if any stubs refer to the given resolver. Only used in an assert(). + /// O(N) + bool ResolverHasStubs(JITResolver* Resolver) const { + MutexGuard guard(Lock); + for (std::map::const_iterator I = Map.begin(), + E = Map.end(); I != E; ++I) { + if (I->second == Resolver) + return true; + } + return false; + } }; /// This needs to be static so that a lazy call stub can access it with no /// context except the address of the stub. @@ -536,7 +514,73 @@ } void CallSiteValueMapConfig::onDelete(JITResolverState *JRS, Function *F) { - JRS->EraseAllCallSitesPrelocked(F); + JRS->EraseAllCallSitesForPrelocked(F); +} + +Function *JITResolverState::EraseStub(const MutexGuard &locked, void *Stub) { + CallSiteToFunctionMapTy::iterator C2F_I = + CallSiteToFunctionMap.find(Stub); + if (C2F_I == CallSiteToFunctionMap.end()) { + // Not a stub. + return NULL; + } + + StubToResolverMap->UnregisterStubResolver(Stub); + + Function *const F = C2F_I->second; +#ifndef NDEBUG + void *RealStub = FunctionToLazyStubMap.lookup(F); + assert(RealStub == Stub && + "Call-site that wasn't a stub passed in to EraseStub"); +#endif + FunctionToLazyStubMap.erase(F); + CallSiteToFunctionMap.erase(C2F_I); + + // Remove the stub from the function->call-sites map, and remove the whole + // entry from the map if that was the last call site. + FunctionToCallSitesMapTy::iterator F2C_I = FunctionToCallSitesMap.find(F); + assert(F2C_I != FunctionToCallSitesMap.end() && + "FunctionToCallSitesMap broken"); + bool Erased = F2C_I->second.erase(Stub); + (void)Erased; + assert(Erased && "FunctionToCallSitesMap broken"); + if (F2C_I->second.empty()) + FunctionToCallSitesMap.erase(F2C_I); + + return F; +} + +void JITResolverState::EraseAllCallSitesForPrelocked(Function *F) { + FunctionToCallSitesMapTy::iterator F2C = FunctionToCallSitesMap.find(F); + if (F2C == FunctionToCallSitesMap.end()) + return; + StubToResolverMapTy &S2RMap = *StubToResolverMap; + for (SmallPtrSet::const_iterator I = F2C->second.begin(), + E = F2C->second.end(); I != E; ++I) { + S2RMap.UnregisterStubResolver(*I); + bool Erased = CallSiteToFunctionMap.erase(*I); + (void)Erased; + assert(Erased && "Missing call site->function mapping"); + } + FunctionToCallSitesMap.erase(F2C); +} + +void JITResolverState::EraseAllCallSitesPrelocked() { + StubToResolverMapTy &S2RMap = *StubToResolverMap; + for (CallSiteToFunctionMapTy::const_iterator + I = CallSiteToFunctionMap.begin(), + E = CallSiteToFunctionMap.end(); I != E; ++I) { + S2RMap.UnregisterStubResolver(I->first); + } + CallSiteToFunctionMap.clear(); + FunctionToCallSitesMap.clear(); +} + +JITResolver::~JITResolver() { + // No need to lock because we're in the destructor, and state isn't shared. + state.EraseAllCallSitesPrelocked(); + assert(!StubToResolverMap->ResolverHasStubs(this) && + "Resolver destroyed with stubs still alive."); } /// getLazyFunctionStubIfAvailable - This returns a pointer to a function stub @@ -589,20 +633,22 @@ DEBUG(dbgs() << "JIT: Lazy stub emitted at [" << Stub << "] for function '" << F->getName() << "'\n"); - // Register this JITResolver as the one corresponding to this call site so - // JITCompilerFn will be able to find it. - StubToResolverMap->RegisterStubResolver(Stub, this); - - // Finally, keep track of the stub-to-Function mapping so that the - // JITCompilerFn knows which function to compile! - state.AddCallSite(locked, Stub, F); - - // If we are JIT'ing non-lazily but need to call a function that does not - // exist yet, add it to the JIT's work list so that we can fill in the stub - // address later. - if (!Actual && !TheJIT->isCompilingLazily()) - if (!isNonGhostDeclaration(F) && !F->hasAvailableExternallyLinkage()) - TheJIT->addPendingFunction(F); + if (TheJIT->isCompilingLazily()) { + // Register this JITResolver as the one corresponding to this call site so + // JITCompilerFn will be able to find it. + StubToResolverMap->RegisterStubResolver(Stub, this); + + // Finally, keep track of the stub-to-Function mapping so that the + // JITCompilerFn knows which function to compile! + state.AddCallSite(locked, Stub, F); + } else if (!Actual) { + // If we are JIT'ing non-lazily but need to call a function that does not + // exist yet, add it to the JIT's work list so that we can fill in the + // stub address later. + assert(!isNonGhostDeclaration(F) && !F->hasAvailableExternallyLinkage() && + "'Actual' should have been set above."); + TheJIT->addPendingFunction(F); + } return Stub; } From dgregor at apple.com Wed Mar 3 18:58:01 2010 From: dgregor at apple.com (Douglas Gregor) Date: Thu, 04 Mar 2010 00:58:01 -0000 Subject: [llvm-commits] [test-suite] r97701 - /test-suite/trunk/MultiSource/Applications/hbd/err.cpp Message-ID: <20100304005801.4CE882A6C12C@llvm.org> Author: dgregor Date: Wed Mar 3 18:58:01 2010 New Revision: 97701 URL: http://llvm.org/viewvc/llvm-project?rev=97701&view=rev Log: Clang will not support implicit conversions from ternary operators like false? "string" : "other string" to char*. That's just too hideous. Modified: test-suite/trunk/MultiSource/Applications/hbd/err.cpp Modified: test-suite/trunk/MultiSource/Applications/hbd/err.cpp URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/MultiSource/Applications/hbd/err.cpp?rev=97701&r1=97700&r2=97701&view=diff ============================================================================== --- test-suite/trunk/MultiSource/Applications/hbd/err.cpp (original) +++ test-suite/trunk/MultiSource/Applications/hbd/err.cpp Wed Mar 3 18:58:01 2010 @@ -14,10 +14,10 @@ char *errmsgs[] = { "Unknown error.", "Out of memory error.", - DEBUG_ON? "Usage: %s [-O] [-D] InFile.class [OutFile.java]\n" - :"Usage: %s [-O] InFile.class [OutFile.java]\n", - DEBUG_ON? "Usage: %s [-D] -Ifuncname InFile.class\n" - :"Usage: %s -Ifuncname InFile.class\n", + DEBUG_ON? (char*)"Usage: %s [-O] [-D] InFile.class [OutFile.java]\n" + :(char*)"Usage: %s [-O] InFile.class [OutFile.java]\n", + DEBUG_ON? (char*)"Usage: %s [-D] -Ifuncname InFile.class\n" + :(char*)"Usage: %s -Ifuncname InFile.class\n", "Not a class.", "Unsupported Class Version.", "3" From sabre at nondot.org Wed Mar 3 19:23:08 2010 From: sabre at nondot.org (Chris Lattner) Date: Thu, 04 Mar 2010 01:23:08 -0000 Subject: [llvm-commits] [llvm] r97703 - in /llvm/trunk: lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp utils/TableGen/DAGISelMatcher.h utils/TableGen/DAGISelMatcherEmitter.cpp utils/TableGen/DAGISelMatcherGen.cpp Message-ID: <20100304012308.953692A6C12C@llvm.org> Author: lattner Date: Wed Mar 3 19:23:08 2010 New Revision: 97703 URL: http://llvm.org/viewvc/llvm-project?rev=97703&view=rev Log: change the new isel matcher to emit ComplexPattern matches as the very last thing before node emission. This should dramatically reduce the number of times we do 'MatchAddress' on X86, speeding up compile time. This also improves comments in the tables and shrinks the table a bit, now down to 80506 bytes for x86. Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp llvm/trunk/utils/TableGen/DAGISelMatcher.h llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp?rev=97703&r1=97702&r2=97703&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Wed Mar 3 19:23:08 2010 @@ -2249,11 +2249,15 @@ N.getNode())) break; continue; - case OPC_CheckComplexPat: - if (!CheckComplexPattern(NodeToMatch, N, - MatcherTable[MatcherIndex++], RecordedNodes)) + case OPC_CheckComplexPat: { + unsigned CPNum = MatcherTable[MatcherIndex++]; + unsigned RecNo = MatcherTable[MatcherIndex++]; + assert(RecNo < RecordedNodes.size() && "Invalid CheckComplexPat"); + if (!CheckComplexPattern(NodeToMatch, RecordedNodes[RecNo], CPNum, + RecordedNodes)) break; continue; + } case OPC_CheckOpcode: if (!::CheckOpcode(MatcherTable, MatcherIndex, N.getNode())) break; continue; Modified: llvm/trunk/utils/TableGen/DAGISelMatcher.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelMatcher.h?rev=97703&r1=97702&r2=97703&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelMatcher.h (original) +++ llvm/trunk/utils/TableGen/DAGISelMatcher.h Wed Mar 3 19:23:08 2010 @@ -609,14 +609,27 @@ /// the current node. class CheckComplexPatMatcher : public Matcher { const ComplexPattern &Pattern; + + /// MatchNumber - This is the recorded nodes slot that contains the node we want to + /// match against. + unsigned MatchNumber; + + /// Name - The name of the node we're matching, for comment emission. + std::string Name; + /// FirstResult - This is the first slot in the RecordedNodes list that the /// result of the match populates. unsigned FirstResult; public: - CheckComplexPatMatcher(const ComplexPattern &pattern, unsigned firstresult) - : Matcher(CheckComplexPat), Pattern(pattern), FirstResult(firstresult) {} + CheckComplexPatMatcher(const ComplexPattern &pattern, unsigned matchnumber, + const std::string &name, unsigned firstresult) + : Matcher(CheckComplexPat), Pattern(pattern), MatchNumber(matchnumber), + Name(name), FirstResult(firstresult) {} const ComplexPattern &getPattern() const { return Pattern; } + unsigned getMatchNumber() const { return MatchNumber; } + + const std::string getName() const { return Name; } unsigned getFirstResult() const { return FirstResult; } static inline bool classof(const Matcher *N) { @@ -629,10 +642,11 @@ private: virtual void printImpl(raw_ostream &OS, unsigned indent) const; virtual bool isEqualImpl(const Matcher *M) const { - return &cast(M)->Pattern == &Pattern; + return &cast(M)->Pattern == &Pattern && + cast(M)->MatchNumber == MatchNumber; } virtual unsigned getHashImpl() const { - return (unsigned)(intptr_t)&Pattern; + return (unsigned)(intptr_t)&Pattern ^ MatchNumber; } }; Modified: llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp?rev=97703&r1=97702&r2=97703&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp (original) +++ llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp Wed Mar 3 19:23:08 2010 @@ -370,20 +370,22 @@ return 2; case Matcher::CheckComplexPat: { - const ComplexPattern &Pattern = - cast(N)->getPattern(); - OS << "OPC_CheckComplexPat, " << getComplexPat(Pattern) << ','; + const CheckComplexPatMatcher *CCPM = cast(N); + const ComplexPattern &Pattern = CCPM->getPattern(); + OS << "OPC_CheckComplexPat, /*CP*/" << getComplexPat(Pattern) << ", /*#*/" + << CCPM->getMatchNumber() << ','; + if (!OmitComments) { OS.PadToColumn(CommentIndent) << "// " << Pattern.getSelectFunc(); - OS << ':'; + OS << ":$" << CCPM->getName(); for (unsigned i = 0, e = Pattern.getNumOperands(); i != e; ++i) - OS << " #" << cast(N)->getFirstResult()+i; + OS << " #" << CCPM->getFirstResult()+i; if (Pattern.hasProperty(SDNPHasChain)) OS << " + chain result"; } OS << '\n'; - return 2; + return 3; } case Matcher::CheckAndImm: { Modified: llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp?rev=97703&r1=97702&r2=97703&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp (original) +++ llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp Wed Mar 3 19:23:08 2010 @@ -72,6 +72,14 @@ /// nodes array of all of the recorded input nodes that have flag results. SmallVector MatchedFlagResultNodes; + /// MatchedComplexPatterns - This maintains a list of all of the + /// ComplexPatterns that we need to check. The patterns are known to have + /// names which were recorded. The second element of each pair is the first + /// slot number that the OPC_CheckComplexPat opcode drops the matched + /// results into. + SmallVector, 2> MatchedComplexPatterns; + /// PhysRegInputs - List list has an entry for each explicitly specified /// physreg input to the pattern. The first elt is the Register node, the /// second is the recorded slot number the input pattern match saved it in. @@ -247,30 +255,9 @@ exit(1); } - // Handle complex pattern. - const ComplexPattern &CP = CGP.getComplexPattern(LeafRec); - - // Emit a CheckComplexPat operation, which does the match (aborting if it - // fails) and pushes the matched operands onto the recorded nodes list. - AddMatcher(new CheckComplexPatMatcher(CP, NextRecordedOperandNo)); - - // Record the right number of operands. - NextRecordedOperandNo += CP.getNumOperands(); - if (CP.hasProperty(SDNPHasChain)) - ++NextRecordedOperandNo; // Chained node operand. - - // If the complex pattern has a chain, then we need to keep track of the - // fact that we just recorded a chain input. The chain input will be - // matched as the last operand of the predicate if it was successful. - if (CP.hasProperty(SDNPHasChain)) { - // It is the last operand recorded. - assert(NextRecordedOperandNo > 1 && - "Should have recorded input/result chains at least!"); - MatchedChainNodes.push_back(NextRecordedOperandNo-1); - } - - // TODO: Complex patterns can't have output flags, if they did, we'd want - // to record them. + // Remember this ComplexPattern so that we can emit it after all the other + // structural matches are done. + MatchedComplexPatterns.push_back(std::make_pair(N, 0)); return; } @@ -495,6 +482,50 @@ // Emit the matcher for the pattern structure and types. EmitMatchCode(Pattern.getSrcPattern(), PatWithNoTypes); + + // Now that we've completed the structural type match, emit any ComplexPattern + // checks (e.g. addrmode matches). We emit this after the structural match + // because they are generally more expensive to evaluate and more difficult to + // factor. + // FIXME2: Can the patternpredicatematcher be moved to right before this?? + for (unsigned i = 0, e = MatchedComplexPatterns.size(); i != e; ++i) { + const TreePatternNode *N = MatchedComplexPatterns[i].first; + + // Remember where the results of this match get stuck. + MatchedComplexPatterns[i].second = NextRecordedOperandNo; + + // Get the slot we recorded the value in from the name on the node. + unsigned RecNodeEntry = VariableMap[N->getName()]; + assert(!N->getName().empty() && RecNodeEntry && + "Complex pattern should have a name and slot"); + --RecNodeEntry; // Entries in VariableMap are biased. + + const ComplexPattern &CP = + CGP.getComplexPattern(((DefInit*)N->getLeafValue())->getDef()); + + // Emit a CheckComplexPat operation, which does the match (aborting if it + // fails) and pushes the matched operands onto the recorded nodes list. + AddMatcher(new CheckComplexPatMatcher(CP, RecNodeEntry, + N->getName(), NextRecordedOperandNo)); + + // Record the right number of operands. + NextRecordedOperandNo += CP.getNumOperands(); + if (CP.hasProperty(SDNPHasChain)) { + // If the complex pattern has a chain, then we need to keep track of the + // fact that we just recorded a chain input. The chain input will be + // matched as the last operand of the predicate if it was successful. + ++NextRecordedOperandNo; // Chained node operand. + + // It is the last operand recorded. + assert(NextRecordedOperandNo > 1 && + "Should have recorded input/result chains at least!"); + MatchedChainNodes.push_back(NextRecordedOperandNo-1); + } + + // TODO: Complex patterns can't have output flags, if they did, we'd want + // to record them. + } + return false; } @@ -507,18 +538,26 @@ SmallVectorImpl &ResultOps){ assert(!N->getName().empty() && "Operand not named!"); - unsigned SlotNo = getNamedArgumentSlot(N->getName()); - // A reference to a complex pattern gets all of the results of the complex // pattern's match. if (const ComplexPattern *CP = N->getComplexPatternInfo(CGP)) { + unsigned SlotNo = 0; + for (unsigned i = 0, e = MatchedComplexPatterns.size(); i != e; ++i) + if (MatchedComplexPatterns[i].first->getName() == N->getName()) { + SlotNo = MatchedComplexPatterns[i].second; + break; + } + assert(SlotNo != 0 && "Didn't get a slot number assigned?"); + // The first slot entry is the node itself, the subsequent entries are the // matched values. for (unsigned i = 0, e = CP->getNumOperands(); i != e; ++i) - ResultOps.push_back(SlotNo+i+1); + ResultOps.push_back(SlotNo+i); return; } + unsigned SlotNo = getNamedArgumentSlot(N->getName()); + // If this is an 'imm' or 'fpimm' node, make sure to convert it to the target // version of the immediate so that it doesn't get selected due to some other // node use. From sabre at nondot.org Wed Mar 3 19:25:36 2010 From: sabre at nondot.org (Chris Lattner) Date: Thu, 04 Mar 2010 01:25:36 -0000 Subject: [llvm-commits] [llvm] r97704 - /llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp Message-ID: <20100304012536.601D02A6C12C@llvm.org> Author: lattner Date: Wed Mar 3 19:25:36 2010 New Revision: 97704 URL: http://llvm.org/viewvc/llvm-project?rev=97704&view=rev Log: now that complexpatterns are all emitted at the end of the match sequence, just emit instruction predicates right before them. This exposes yet more factoring opportunitites, shrinking the X86 table to 79144 bytes. Modified: llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp Modified: llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp?rev=97704&r1=97703&r2=97704&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp (original) +++ llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp Wed Mar 3 19:25:36 2010 @@ -471,6 +471,9 @@ if (Variant != 0) return true; } + // Emit the matcher for the pattern structure and types. + EmitMatchCode(Pattern.getSrcPattern(), PatWithNoTypes); + // If the pattern has a predicate on it (e.g. only enabled when a subtarget // feature is around, do the check). // FIXME: This should get emitted after the match code below to encourage @@ -479,15 +482,11 @@ // X86's MatchAddress. if (!Pattern.getPredicateCheck().empty()) AddMatcher(new CheckPatternPredicateMatcher(Pattern.getPredicateCheck())); - - // Emit the matcher for the pattern structure and types. - EmitMatchCode(Pattern.getSrcPattern(), PatWithNoTypes); // Now that we've completed the structural type match, emit any ComplexPattern // checks (e.g. addrmode matches). We emit this after the structural match // because they are generally more expensive to evaluate and more difficult to // factor. - // FIXME2: Can the patternpredicatematcher be moved to right before this?? for (unsigned i = 0, e = MatchedComplexPatterns.size(); i != e; ++i) { const TreePatternNode *N = MatchedComplexPatterns[i].first; From sabre at nondot.org Wed Mar 3 19:26:00 2010 From: sabre at nondot.org (Chris Lattner) Date: Thu, 04 Mar 2010 01:26:00 -0000 Subject: [llvm-commits] [llvm] r97705 - /llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp Message-ID: <20100304012600.55C1A2A6C12C@llvm.org> Author: lattner Date: Wed Mar 3 19:26:00 2010 New Revision: 97705 URL: http://llvm.org/viewvc/llvm-project?rev=97705&view=rev Log: zap fixme. Modified: llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp Modified: llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp?rev=97705&r1=97704&r2=97705&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp (original) +++ llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp Wed Mar 3 19:26:00 2010 @@ -476,10 +476,6 @@ // If the pattern has a predicate on it (e.g. only enabled when a subtarget // feature is around, do the check). - // FIXME: This should get emitted after the match code below to encourage - // sharing. This can't happen until we get an X86ISD::AddrMode node made by - // dag combine, eliminating the horrible side-effect-full stuff from - // X86's MatchAddress. if (!Pattern.getPredicateCheck().empty()) AddMatcher(new CheckPatternPredicateMatcher(Pattern.getPredicateCheck())); From evan.cheng at apple.com Wed Mar 3 19:33:56 2010 From: evan.cheng at apple.com (Evan Cheng) Date: Thu, 04 Mar 2010 01:33:56 -0000 Subject: [llvm-commits] [llvm] r97706 - /llvm/trunk/lib/CodeGen/MachineCSE.cpp Message-ID: <20100304013356.19A7B2A6C12C@llvm.org> Author: evancheng Date: Wed Mar 3 19:33:55 2010 New Revision: 97706 URL: http://llvm.org/viewvc/llvm-project?rev=97706&view=rev Log: Look ahead a bit to determine if a physical register def that is not marked dead is really alive. This is necessary to catch a lot of common cse opportunities for targets like x86. Modified: llvm/trunk/lib/CodeGen/MachineCSE.cpp Modified: llvm/trunk/lib/CodeGen/MachineCSE.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineCSE.cpp?rev=97706&r1=97705&r2=97706&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/MachineCSE.cpp (original) +++ llvm/trunk/lib/CodeGen/MachineCSE.cpp Wed Mar 3 19:33:55 2010 @@ -31,6 +31,7 @@ namespace { class MachineCSE : public MachineFunctionPass { const TargetInstrInfo *TII; + const TargetRegisterInfo *TRI; MachineRegisterInfo *MRI; MachineDominatorTree *DT; public: @@ -51,6 +52,10 @@ ScopedHashTable VNT; SmallVector Exps; + bool hasLivePhysRegDefUse(MachineInstr *MI, MachineBasicBlock *MBB); + bool isPhysDefTriviallyDead(unsigned Reg, + MachineBasicBlock::const_iterator I, + MachineBasicBlock::const_iterator E); bool PerformTrivialCoalescing(MachineInstr *MI, MachineBasicBlock *MBB); bool ProcessBlock(MachineDomTreeNode *Node); }; @@ -93,7 +98,39 @@ return Changed; } -static bool hasLivePhysRegDefUse(MachineInstr *MI) { +bool MachineCSE::isPhysDefTriviallyDead(unsigned Reg, + MachineBasicBlock::const_iterator I, + MachineBasicBlock::const_iterator E) { + unsigned LookAheadLeft = 5; + while (LookAheadLeft--) { + if (I == E) + // Reached end of block, register is obviously dead. + return true; + + if (I->isDebugValue()) + continue; + bool SeenDef = false; + for (unsigned i = 0, e = I->getNumOperands(); i != e; ++i) { + const MachineOperand &MO = I->getOperand(i); + if (!MO.isReg() || !MO.getReg()) + continue; + if (!TRI->regsOverlap(MO.getReg(), Reg)) + continue; + if (MO.isUse()) + return false; + SeenDef = true; + } + if (SeenDef) + // See a def of Reg (or an alias) before encountering any use, it's + // trivially dead. + return true; + ++I; + } + return false; +} + +bool MachineCSE::hasLivePhysRegDefUse(MachineInstr *MI, MachineBasicBlock *MBB){ + unsigned PhysDef = 0; for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) { MachineOperand &MO = MI->getOperand(i); if (!MO.isReg()) @@ -101,10 +138,26 @@ unsigned Reg = MO.getReg(); if (!Reg) continue; - // FIXME: This is obviously overly conservative. On x86 lots of instructions - // will def EFLAGS and they are not marked dead at this point. - if (TargetRegisterInfo::isPhysicalRegister(Reg) && - !(MO.isDef() && MO.isDead())) + if (TargetRegisterInfo::isPhysicalRegister(Reg)) { + if (MO.isUse()) + // Can't touch anything to read a physical register. + return true; + if (MO.isDead()) + // If the def is dead, it's ok. + continue; + // Ok, this is a physical register def that's not marked "dead". That's + // common since this pass is run before livevariables. We can scan + // forward a few instructions and check if it is obviously dead. + if (PhysDef) + // Multiple physical register defs. These are rare, forget about it. + return true; + PhysDef = Reg; + } + } + + if (PhysDef) { + MachineBasicBlock::iterator I = MI; I = llvm::next(I); + if (!isPhysDefTriviallyDead(PhysDef, I, MBB->end())) return true; } return false; @@ -135,10 +188,11 @@ if (PerformTrivialCoalescing(MI, MBB)) FoundCSE = VNT.count(MI); } + // FIXME: commute commutable instructions? // If the instruction defines a physical register and the value *may* be // used, then it's not safe to replace it with a common subexpression. - if (FoundCSE && hasLivePhysRegDefUse(MI)) + if (FoundCSE && hasLivePhysRegDefUse(MI, MBB)) FoundCSE = false; if (!FoundCSE) { @@ -180,6 +234,7 @@ bool MachineCSE::runOnMachineFunction(MachineFunction &MF) { TII = MF.getTarget().getInstrInfo(); + TRI = MF.getTarget().getRegisterInfo(); MRI = &MF.getRegInfo(); DT = &getAnalysis(); return ProcessBlock(DT->getRootNode()); From sabre at nondot.org Wed Mar 3 19:34:29 2010 From: sabre at nondot.org (Chris Lattner) Date: Thu, 04 Mar 2010 01:34:29 -0000 Subject: [llvm-commits] [llvm] r97708 - /llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp Message-ID: <20100304013429.5CB412A6C12C@llvm.org> Author: lattner Date: Wed Mar 3 19:34:29 2010 New Revision: 97708 URL: http://llvm.org/viewvc/llvm-project?rev=97708&view=rev Log: so hey, it turns out that the histogram was completely wrong, because we sometimes emit nodes multiple times to string buffers to size them. Compute the histogram correctly. Modified: llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp Modified: llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp?rev=97708&r1=97707&r2=97708&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp (original) +++ llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp Wed Mar 3 19:34:29 2010 @@ -42,8 +42,6 @@ DenseMap NodeXFormMap; std::vector NodeXForms; - // Per opcode frequence count. - std::vector Histogram; public: MatcherTableEmitter() {} @@ -53,7 +51,7 @@ void EmitPredicateFunctions(const CodeGenDAGPatterns &CGP, formatted_raw_ostream &OS); - void EmitHistogram(formatted_raw_ostream &OS); + void EmitHistogram(const Matcher *N, formatted_raw_ostream &OS); private: unsigned EmitMatcher(const Matcher *N, unsigned Indent, unsigned CurrentIdx, formatted_raw_ostream &OS); @@ -554,9 +552,6 @@ formatted_raw_ostream &OS) { unsigned Size = 0; while (N) { - if (unsigned(N->getKind()) >= Histogram.size()) - Histogram.resize(N->getKind()+1); - Histogram[N->getKind()]++; if (!OmitComments) OS << "/*" << CurrentIdx << "*/"; unsigned MatcherSize = EmitMatcher(N, Indent, CurrentIdx, OS); @@ -681,11 +676,38 @@ } } -void MatcherTableEmitter::EmitHistogram(formatted_raw_ostream &OS) { +static void BuildHistogram(const Matcher *M, std::vector &OpcodeFreq){ + for (; M != 0; M = M->getNext()) { + // Count this node. + if (unsigned(M->getKind()) >= OpcodeFreq.size()) + OpcodeFreq.resize(M->getKind()+1); + OpcodeFreq[M->getKind()]++; + + // Handle recursive nodes. + if (const ScopeMatcher *SM = dyn_cast(M)) { + for (unsigned i = 0, e = SM->getNumChildren(); i != e; ++i) + BuildHistogram(SM->getChild(i), OpcodeFreq); + } else if (const SwitchOpcodeMatcher *SOM = + dyn_cast(M)) { + for (unsigned i = 0, e = SOM->getNumCases(); i != e; ++i) + BuildHistogram(SOM->getCaseMatcher(i), OpcodeFreq); + } else if (const SwitchTypeMatcher *STM = dyn_cast(M)) { + for (unsigned i = 0, e = STM->getNumCases(); i != e; ++i) + BuildHistogram(STM->getCaseMatcher(i), OpcodeFreq); + } + } +} + +void MatcherTableEmitter::EmitHistogram(const Matcher *M, + formatted_raw_ostream &OS) { if (OmitComments) return; + + std::vector OpcodeFreq; + BuildHistogram(M, OpcodeFreq); + OS << " // Opcode Histogram:\n"; - for (unsigned i = 0, e = Histogram.size(); i != e; ++i) { + for (unsigned i = 0, e = OpcodeFreq.size(); i != e; ++i) { OS << " // #"; switch ((Matcher::KindTy)i) { case Matcher::Scope: OS << "OPC_Scope"; break; @@ -725,7 +747,7 @@ case Matcher::CompleteMatch: OS << "OPC_CompleteMatch"; break; } - OS.PadToColumn(40) << " = " << Histogram[i] << '\n'; + OS.PadToColumn(40) << " = " << OpcodeFreq[i] << '\n'; } OS << '\n'; } @@ -746,7 +768,7 @@ unsigned TotalSize = MatcherEmitter.EmitMatcherList(TheMatcher, 5, 0, OS); OS << " 0\n }; // Total Array size is " << (TotalSize+1) << " bytes\n\n"; - MatcherEmitter.EmitHistogram(OS); + MatcherEmitter.EmitHistogram(TheMatcher, OS); OS << " #undef TARGET_OPCODE\n"; OS << " return SelectCodeCommon(N, MatcherTable,sizeof(MatcherTable));\n}\n"; From sabre at nondot.org Wed Mar 3 19:43:43 2010 From: sabre at nondot.org (Chris Lattner) Date: Thu, 04 Mar 2010 01:43:43 -0000 Subject: [llvm-commits] [llvm] r97709 - /llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp Message-ID: <20100304014343.EF9172A6C12C@llvm.org> Author: lattner Date: Wed Mar 3 19:43:43 2010 New Revision: 97709 URL: http://llvm.org/viewvc/llvm-project?rev=97709&view=rev Log: add a comment. Modified: llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp Modified: llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp?rev=97709&r1=97708&r2=97709&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp (original) +++ llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp Wed Mar 3 19:43:43 2010 @@ -413,6 +413,7 @@ } void X86DAGToDAGISel::PreprocessISelDAG() { + // OptForSize is used in pattern predicates that isel is matching. OptForSize = MF->getFunction()->hasFnAttr(Attribute::OptimizeForSize); for (SelectionDAG::allnodes_iterator I = CurDAG->allnodes_begin(), From alenhar2 at llvm.org Wed Mar 3 19:56:31 2010 From: alenhar2 at llvm.org (alenhar2 at llvm.org) Date: Thu, 04 Mar 2010 01:56:31 -0000 Subject: [llvm-commits] [poolalloc] r97710 - /poolalloc/trunk/lib/PoolAllocate/PointerCompress.cpp Message-ID: <20100304015631.12F202A6C12C@llvm.org> Author: alenhar2 Date: Wed Mar 3 19:56:30 2010 New Revision: 97710 URL: http://llvm.org/viewvc/llvm-project?rev=97710&view=rev Log: update to 2.7 API Modified: poolalloc/trunk/lib/PoolAllocate/PointerCompress.cpp Modified: poolalloc/trunk/lib/PoolAllocate/PointerCompress.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/PoolAllocate/PointerCompress.cpp?rev=97710&r1=97709&r2=97710&view=diff ============================================================================== --- poolalloc/trunk/lib/PoolAllocate/PointerCompress.cpp (original) +++ poolalloc/trunk/lib/PoolAllocate/PointerCompress.cpp Wed Mar 3 19:56:30 2010 @@ -26,11 +26,10 @@ #include "llvm/Support/Debug.h" #include "llvm/Support/GetElementPtrTypeIterator.h" #include "llvm/Support/InstVisitor.h" +#include "llvm/Support/FormattedStream.h" #include "llvm/Transforms/Utils/Cloning.h" -#include - using namespace llvm; /// MEMUINTTYPE - This is the actual type we are compressing to. This is really @@ -90,7 +89,7 @@ NewToOldValueMap.find(V); if (I == NewToOldValueMap.end()) { for (I = NewToOldValueMap.begin(); I != NewToOldValueMap.end(); ++I) - std::cerr << "MAP: " << *I->first << " TO: " << *I->second << "\n"; + errs() << "MAP: " << *I->first << " TO: " << *I->second << "\n"; } assert (I != NewToOldValueMap.end() && "Value did not come from clone!"); return I->second; @@ -274,13 +273,13 @@ Elements.push_back(ComputeCompressedType(STy->getElementType(i), NodeOffset+SL->getElementOffset(i), Nodes)); - return StructType::get(getGlobalContext(),Elements); + return StructType::get(STy->getContext(),Elements); } else if (const ArrayType *ATy = dyn_cast(OrigTy)) { return ArrayType::get(ComputeCompressedType(ATy->getElementType(), NodeOffset, Nodes), ATy->getNumElements()); } else { - std::cerr << "TYPE: " << *OrigTy << "\n"; + errs() << "TYPE: " << *OrigTy << "\n"; assert(0 && "FIXME: Unhandled aggregate type!"); abort(); } @@ -322,13 +321,13 @@ /// void CompressedPoolInfo::dump() const { const TargetData &TD = getNode()->getParentGraph()->getTargetData(); - std::cerr << " From size: " + errs() << " From size: " << (getNode()->getType()->isSized() ? TD.getTypeAllocSize(getNode()->getType()) : 0) << " To size: " << (NewTy->isSized() ? TD.getTypeAllocSize(NewTy) : 0) << "\n"; - std::cerr << "Node: "; getNode()->dump(); - std::cerr << "New Type: " << *NewTy << "\n"; + errs() << "Node: "; getNode()->dump(); + errs() << "New Type: " << *NewTy << "\n"; } @@ -544,7 +543,7 @@ Unhandled |= !!getNodeIfCompressed(I.getOperand(i)); if (Unhandled) { - std::cerr << "ERROR: UNHANDLED INSTRUCTION: " << I; + errs() << "ERROR: UNHANDLED INSTRUCTION: " << I; //assert(0); //abort(); } @@ -581,7 +580,7 @@ if (RI.getNumOperands() && isa(RI.getOperand(0)->getType())) if (!isa(RI.getParent()->getParent()->getReturnType())) { // Compressing the return value. - ReturnInst::Create(getGlobalContext(), + ReturnInst::Create(RI.getContext(), getTransformedValue(RI.getOperand(0)), &RI); RI.eraseFromParent(); } @@ -1153,7 +1152,7 @@ static bool PoolIsCompressible(const DSNode *N) { assert(!N->isForwarding() && "Should not be dealing with merged nodes!"); if (N->isNodeCompletelyFolded()) { - DEBUG(std::cerr << "Node is not type-safe:\n"); + DEBUG(errs() << "Node is not type-safe:\n"); return false; } @@ -1166,19 +1165,19 @@ HasFields = true; if (I->getNode() != N) { // We currently only handle trivially self cyclic DS's right now. - DEBUG(std::cerr << "Node points to nodes other than itself:\n"); + DEBUG(errs() << "Node points to nodes other than itself:\n"); return false; } } if (!HasFields) { - DEBUG(std::cerr << "Node does not contain any pointers to compress:\n"); + DEBUG(errs() << "Node does not contain any pointers to compress:\n"); return false; } #endif if ((N->getNodeFlags() & DSNode::Composition) != DSNode::HeapNode) { - DEBUG(std::cerr << "Node contains non-heap values:\n"); + DEBUG(errs() << "Node contains non-heap values:\n"); return false; } @@ -1193,7 +1192,7 @@ Value*> &PreassignedPools, Function &F, DSGraph* DSG, PA::FuncInfo *FI) { - DEBUG(std::cerr << "In function '" << F.getNameStr() << "':\n"); + DEBUG(errs() << "In function '" << F.getNameStr() << "':\n"); for (unsigned i = 0, e = FI->NodesToPA.size(); i != e; ++i) { const DSNode *N = FI->NodesToPA[i]; @@ -1204,7 +1203,7 @@ Pools.insert(N); ++NumCompressed; } else { - DEBUG(std::cerr << "PCF: "; N->dump()); + DEBUG(errs() << "PCF: "; N->dump()); ++NumNotCompressed; } } @@ -1258,7 +1257,7 @@ FI = PoolAlloc->getFuncInfoOrClone(F); if (FI == 0) { - std::cerr << "DIDN'T FIND POOL INFO FOR: " + errs() << "DIDN'T FIND POOL INFO FOR: " << *F.getType() << F.getNameStr() << "!\n"; return false; } @@ -1310,7 +1309,7 @@ // particular, if one pool points to another, we need to know if the outgoing // pointer is compressed. const TargetData &TD = DSG->getTargetData(); - std::cerr << "In function '" << F.getNameStr() << "':\n"; + errs() << "In function '" << F.getNameStr() << "':\n"; for (std::map::iterator I = PoolsToCompress.begin(), E = PoolsToCompress.end(); I != E; ++I) { @@ -1320,7 +1319,7 @@ if (isa(I->second.getPoolDesc()) || (isa(I->second.getPoolDesc()) && F.hasExternalLinkage() && F.getNameStr() == "main")) { - std::cerr << " COMPRESSING POOL:\nPCS:"; + errs() << " COMPRESSING POOL:\nPCS:"; I->second.dump(); } } @@ -1418,7 +1417,7 @@ ClonedFunctionInfoMap.insert(std::make_pair(Clone, F)).first->second; ++NumCloned; - std::cerr << " CLONING FUNCTION: " << F->getNameStr() << " -> " + errs() << " CLONING FUNCTION: " << F->getNameStr() << " -> " << Clone->getNameStr() << "\n"; if (F->isDeclaration()) { @@ -1454,7 +1453,7 @@ } // Clone the actual function body over. - std::vector Returns; + SmallVector Returns; CloneFunctionInto(Clone, F, ValueMap, Returns); Returns.clear(); // Don't need this. @@ -1482,7 +1481,7 @@ void PointerCompress::HandleGlobalPools(Module &M) { if (PoolAlloc->GlobalNodes.empty()) return; - DEBUG(std::cerr << "Inspecting global nodes:\n"); + DEBUG(errs() << "Inspecting global nodes:\n"); // Loop over all of the global nodes identified by the pool allocator. for (std::map::iterator I = @@ -1498,7 +1497,7 @@ cast(I->second))); ++NumCompressed; } else { - DEBUG(std::cerr << "PCF: "; N->dump()); + DEBUG(errs() << "PCF: "; N->dump()); ++NumNotCompressed; } } @@ -1525,11 +1524,11 @@ // // Get pointers to 8 and 32 bit LLVM integer types. // - VoidType = Type::getVoidTy(getGlobalContext()); - Int8Type = IntegerType::getInt8Ty(getGlobalContext()); - Int16Type = IntegerType::getInt16Ty(getGlobalContext()); - Int32Type = IntegerType::getInt32Ty(getGlobalContext()); - Int64Type = IntegerType::getInt64Ty(getGlobalContext()); + VoidType = Type::getVoidTy(M.getContext()); + Int8Type = IntegerType::getInt8Ty(M.getContext()); + Int16Type = IntegerType::getInt16Ty(M.getContext()); + Int32Type = IntegerType::getInt32Ty(M.getContext()); + Int64Type = IntegerType::getInt64Ty(M.getContext()); PoolAlloc = &getAnalysis(); ECG = &getAnalysis(); From alenhar2 at llvm.org Wed Mar 3 19:58:06 2010 From: alenhar2 at llvm.org (alenhar2 at llvm.org) Date: Thu, 04 Mar 2010 01:58:06 -0000 Subject: [llvm-commits] [poolalloc] r97711 - in /poolalloc/trunk: include/dsa/EntryPointAnalysis.h lib/DSA/EntryPointAnalysis.cpp lib/PoolAllocate/EntryPointAnalysis.cpp lib/PoolAllocate/EntryPointAnalysis.h Message-ID: <20100304015806.5A3F52A6C12C@llvm.org> Author: alenhar2 Date: Wed Mar 3 19:58:06 2010 New Revision: 97711 URL: http://llvm.org/viewvc/llvm-project?rev=97711&view=rev Log: Abstract entrypoint finder Added: poolalloc/trunk/include/dsa/EntryPointAnalysis.h poolalloc/trunk/lib/DSA/EntryPointAnalysis.cpp Removed: poolalloc/trunk/lib/PoolAllocate/EntryPointAnalysis.cpp poolalloc/trunk/lib/PoolAllocate/EntryPointAnalysis.h Added: poolalloc/trunk/include/dsa/EntryPointAnalysis.h URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/include/dsa/EntryPointAnalysis.h?rev=97711&view=auto ============================================================================== --- poolalloc/trunk/include/dsa/EntryPointAnalysis.h (added) +++ poolalloc/trunk/include/dsa/EntryPointAnalysis.h Wed Mar 3 19:58:06 2010 @@ -0,0 +1,53 @@ +//===-- EntryPointAnalysis.h - Entry point Finding Pass -------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file was developed by the LLVM research group and is distributed under +// the University of Illinois Open Source License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This is a general way of finding entry points in a system. Simple programs +// will use the main version. Libraries and OS kernels can have more +// specialized versions. +// +//===----------------------------------------------------------------------===// + +#ifndef _ENTRYPOINTANALYSIS_H +#define _ENTRYPOINTANALYSIS_H + +namespace llvm { +class Function; +class Module; +} + +#include +#include "llvm/Pass.h" + +class EntryPointAnalysis : public llvm::ModulePass { + std::set names; + bool haveNames; +public: + static char ID; + EntryPointAnalysis(); + virtual ~EntryPointAnalysis(); + + /// print - Print out the analysis results... + /// + void print(llvm::raw_ostream &O, const llvm::Module *M) const; + + bool runOnModule(llvm::Module&); + + virtual void getAnalysisUsage(llvm::AnalysisUsage &Info) const; + + bool isEntryPoint(const llvm::Function* F) const; + + void findEntryPoints(const llvm::Module& M, + std::vector& dest) const; + +}; + + + +#endif /* _ENTRYPOINTANALYSIS_H */ + Added: poolalloc/trunk/lib/DSA/EntryPointAnalysis.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/EntryPointAnalysis.cpp?rev=97711&view=auto ============================================================================== --- poolalloc/trunk/lib/DSA/EntryPointAnalysis.cpp (added) +++ poolalloc/trunk/lib/DSA/EntryPointAnalysis.cpp Wed Mar 3 19:58:06 2010 @@ -0,0 +1,102 @@ +//===-- EntryPointAnalysis.cpp - Entry point Finding Pass -----------------===// +// +// The LLVM Compiler Infrastructure +// +// This file was developed by the LLVM research group and is distributed under +// the University of Illinois Open Source License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This is a general way of finding entry points in a system. Simple programs +// will use the main version. Libraries and OS kernels can have more +// specialized versions. This is done as an analysis group to allow more +// convinient opt invocations. +// +//===----------------------------------------------------------------------===// + +#include "llvm/Pass.h" +#include "llvm/Module.h" +#include "llvm/Function.h" +#include "llvm/Support/CommandLine.h" +#include "llvm/Support/FormattedStream.h" +#include "llvm/Support/Debug.h" + +#include +#include + +#include "dsa/EntryPointAnalysis.h" + +using namespace llvm; + +static cl::opt epaFile("epa-file", + cl::desc("File with entry point names")); //, cl::ReallyHidden); + +static void readNames(std::set& names) { + std::ifstream msf(epaFile.c_str(), std::ifstream::in); + if (!msf.good()) + errs() << "Failed to open file: " << epaFile << " (continuing anyway)\n"; + while (msf.good()) { + std::string n; + msf >> n; + if (n.size()) { + names.insert(n); +// errs() << "Read " << n << "\n"; + } + } +} + + +EntryPointAnalysis::EntryPointAnalysis() :ModulePass(&ID), haveNames(false) { +} + +EntryPointAnalysis::~EntryPointAnalysis() {} + +void EntryPointAnalysis::findEntryPoints(const Module& M, + std::vector& dest) const { + for (Module::const_iterator ii = M.begin(), ee = M.end(); ii != ee; ++ii) + if (isEntryPoint(ii)) + dest.push_back(ii); +} + +void EntryPointAnalysis::print(llvm::raw_ostream& O, const Module* M) const { + std::vector d; + findEntryPoints(*M, d); + O << "EntryPoints: "; + bool prev = false; + for (std::vector::iterator ii = d.begin(), ee = d.end(); + ii != ee; ++ii) { + O << (prev ? ", " : "") << (*ii)->getNameStr(); + prev = true; + } + O << "\n"; +} + +bool EntryPointAnalysis::runOnModule(llvm::Module& M) { + if (epaFile.size()) { + haveNames = true; + readNames(names); + } + return false; +} + +void EntryPointAnalysis::getAnalysisUsage(llvm::AnalysisUsage &AU) const { + AU.setPreservesAll(); +} + +bool EntryPointAnalysis::isEntryPoint(const llvm::Function* F) const { + if (haveNames) { + return !F->isDeclaration() + && F->hasExternalLinkage() + && F->hasName() + && names.find(F->getNameStr()) != names.end(); + } else { + return !F->isDeclaration() + && F->hasExternalLinkage() + && F->hasName() && F->getName() == "main"; + } +} + + + +char EntryPointAnalysis::ID; +static RegisterPass A("epa", "Identify EntryPoints"); Removed: poolalloc/trunk/lib/PoolAllocate/EntryPointAnalysis.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/PoolAllocate/EntryPointAnalysis.cpp?rev=97710&view=auto ============================================================================== --- poolalloc/trunk/lib/PoolAllocate/EntryPointAnalysis.cpp (original) +++ poolalloc/trunk/lib/PoolAllocate/EntryPointAnalysis.cpp (removed) @@ -1,53 +0,0 @@ -//===-- EntryPointAnalysis.cpp - Entry point Finding Pass -----------------===// -// -// The LLVM Compiler Infrastructure -// -// This file was developed by the LLVM research group and is distributed under -// the University of Illinois Open Source License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This is a general way of finding entry points in a system. Simple programs -// will use the main version. Libraries and OS kernels can have more -// specialized versions. This is done as an analysis group to allow more -// convinient opt invocations. -// -//===----------------------------------------------------------------------===// - -#include "llvm/Pass.h" -#include "llvm/Module.h" -#include "llvm/Function.h" - -#include "EntryPointAnalysis.h" - -using namespace llvm; - -EntryPointAnalysis::~EntryPointAnalysis() {} -char EntryPointAnalysis::ID; - -namespace { - - -static RegisterAnalysisGroup A("Entry Point Analysis"); - -class MainEntryPointAnalysis : public ImmutablePass, public EntryPointAnalysis { -public: - static char ID; - - MainEntryPointAnalysis() : ImmutablePass(&ID) { } - - bool isEntryPoint(const llvm::Function* F) const { - return !F->isDeclaration() - && F->hasExternalLinkage() - && F->hasName() && F->getName() == "main"; - } -}; - -char MainEntryPointAnalysis::ID; -RegisterPass B("epa_main", "Identify Main"); -RegisterAnalysisGroup C(B); - - - -} - Removed: poolalloc/trunk/lib/PoolAllocate/EntryPointAnalysis.h URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/PoolAllocate/EntryPointAnalysis.h?rev=97710&view=auto ============================================================================== --- poolalloc/trunk/lib/PoolAllocate/EntryPointAnalysis.h (original) +++ poolalloc/trunk/lib/PoolAllocate/EntryPointAnalysis.h (removed) @@ -1,35 +0,0 @@ -//===-- EntryPointAnalysis.h - Entry point Finding Pass -------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file was developed by the LLVM research group and is distributed under -// the University of Illinois Open Source License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This is a general way of finding entry points in a system. Simple programs -// will use the main version. Libraries and OS kernels can have more -// specialized versions. -// -//===----------------------------------------------------------------------===// - -#ifndef _ENTRYPOINTANALYSIS_H -#define _ENTRYPOINTANALYSIS_H - -namespace llvm { -class Function; -} - -class EntryPointAnalysis { -public: - static char ID; - EntryPointAnalysis() {} - virtual ~EntryPointAnalysis(); - - virtual bool isEntryPoint(const llvm::Function* F) const = 0; -}; - - - -#endif /* _ENTRYPOINTANALYSIS_H */ - From alenhar2 at llvm.org Wed Mar 3 19:59:06 2010 From: alenhar2 at llvm.org (alenhar2 at llvm.org) Date: Thu, 04 Mar 2010 01:59:06 -0000 Subject: [llvm-commits] [poolalloc] r97712 - in /poolalloc/trunk: include/dsa/CallTargets.h lib/DSA/CallTargets.cpp Message-ID: <20100304015906.8D1922A6C12C@llvm.org> Author: alenhar2 Date: Wed Mar 3 19:59:06 2010 New Revision: 97712 URL: http://llvm.org/viewvc/llvm-project?rev=97712&view=rev Log: update to 2.7 API Modified: poolalloc/trunk/include/dsa/CallTargets.h poolalloc/trunk/lib/DSA/CallTargets.cpp Modified: poolalloc/trunk/include/dsa/CallTargets.h URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/include/dsa/CallTargets.h?rev=97712&r1=97711&r2=97712&view=diff ============================================================================== --- poolalloc/trunk/include/dsa/CallTargets.h (original) +++ poolalloc/trunk/include/dsa/CallTargets.h Wed Mar 3 19:59:06 2010 @@ -38,7 +38,7 @@ virtual void getAnalysisUsage(AnalysisUsage &AU) const; - virtual void print(std::ostream &O, const Module *M) const; + virtual void print(llvm::raw_ostream &O, const Module *M) const; // Given a CallSite, get an iterator of callees std::vector::iterator begin(CallSite cs); Modified: poolalloc/trunk/lib/DSA/CallTargets.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/CallTargets.cpp?rev=97712&r1=97711&r2=97712&view=diff ============================================================================== --- poolalloc/trunk/lib/DSA/CallTargets.cpp (original) +++ poolalloc/trunk/lib/DSA/CallTargets.cpp Wed Mar 3 19:59:06 2010 @@ -89,7 +89,7 @@ } } -void CallTargetFinder::print(std::ostream &O, const Module *M) const +void CallTargetFinder::print(llvm::raw_ostream &O, const Module *M) const { O << "[* = incomplete] CS: func list\n"; for (std::map >::const_iterator ii = From evan.cheng at apple.com Wed Mar 3 20:08:04 2010 From: evan.cheng at apple.com (Evan Cheng) Date: Thu, 04 Mar 2010 02:08:04 -0000 Subject: [llvm-commits] [llvm] r97713 - /llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp Message-ID: <20100304020804.6EEA72A6C12C@llvm.org> Author: evancheng Date: Wed Mar 3 20:08:04 2010 New Revision: 97713 URL: http://llvm.org/viewvc/llvm-project?rev=97713&view=rev Log: Rename -machine-cse to -enable-machine-cse. Modified: llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp Modified: llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp?rev=97713&r1=97712&r2=97713&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp (original) +++ llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp Wed Mar 3 20:08:04 2010 @@ -67,7 +67,7 @@ cl::desc("Verify generated machine code"), cl::init(getenv("LLVM_VERIFY_MACHINEINSTRS")!=NULL)); -static cl::opt EnableMachineCSE("machine-cse", cl::Hidden, +static cl::opt EnableMachineCSE("enable-machine-cse", cl::Hidden, cl::desc("Enable Machine CSE")); static cl::opt From alenhar2 at llvm.org Wed Mar 3 20:28:42 2010 From: alenhar2 at llvm.org (alenhar2 at llvm.org) Date: Thu, 04 Mar 2010 02:28:42 -0000 Subject: [llvm-commits] [poolalloc] r97715 - in /poolalloc/trunk: include/dsa/ include/poolalloc/ include/poolalloc/ADT/ lib/AssistDS/ lib/DSA/ lib/PoolAllocate/ Message-ID: <20100304022842.52EE02A6C12C@llvm.org> Author: alenhar2 Date: Wed Mar 3 20:28:41 2010 New Revision: 97715 URL: http://llvm.org/viewvc/llvm-project?rev=97715&view=rev Log: Drop hash_ usage, move to std for now, will move to llvm hash soon. update to 2.7 api (breaks poolalloc). Support multiple entry points Removed: poolalloc/trunk/include/poolalloc/ADT/HashExtras.h Modified: poolalloc/trunk/include/dsa/DSGraph.h poolalloc/trunk/include/dsa/DSNode.h poolalloc/trunk/include/dsa/DSSupport.h poolalloc/trunk/include/dsa/DataStructure.h poolalloc/trunk/include/poolalloc/PoolAllocate.h poolalloc/trunk/lib/AssistDS/FuncSpec.cpp poolalloc/trunk/lib/DSA/BottomUpClosure.cpp poolalloc/trunk/lib/DSA/CompleteBottomUp.cpp poolalloc/trunk/lib/DSA/DataStructure.cpp poolalloc/trunk/lib/DSA/DataStructureStats.cpp poolalloc/trunk/lib/DSA/GraphChecker.cpp poolalloc/trunk/lib/DSA/Local.cpp poolalloc/trunk/lib/DSA/Printer.cpp poolalloc/trunk/lib/DSA/Steensgaard.cpp poolalloc/trunk/lib/DSA/TopDownClosure.cpp poolalloc/trunk/lib/PoolAllocate/AccessTrace.cpp poolalloc/trunk/lib/PoolAllocate/Heuristic.cpp poolalloc/trunk/lib/PoolAllocate/PAMultipleGlobalPool.cpp poolalloc/trunk/lib/PoolAllocate/PASimple.cpp poolalloc/trunk/lib/PoolAllocate/PoolAllocate.cpp poolalloc/trunk/lib/PoolAllocate/PoolOptimize.cpp poolalloc/trunk/lib/PoolAllocate/RunTimeAssociate.cpp poolalloc/trunk/lib/PoolAllocate/TransformFunctionBody.cpp Modified: poolalloc/trunk/include/dsa/DSGraph.h URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/include/dsa/DSGraph.h?rev=97715&r1=97714&r2=97715&view=diff ============================================================================== --- poolalloc/trunk/include/dsa/DSGraph.h (original) +++ poolalloc/trunk/include/dsa/DSGraph.h Wed Mar 3 20:28:41 2010 @@ -17,13 +17,10 @@ #include "dsa/DSNode.h" #include "llvm/ADT/EquivalenceClasses.h" -#include "poolalloc/ADT/HashExtras.h" -#include -#include #include #include -#include +#include namespace llvm { @@ -42,10 +39,10 @@ /// globals or unique node handles active in the function. /// class DSScalarMap { - typedef hash_map ValueMapTy; + typedef std::map ValueMapTy; ValueMapTy ValueMap; - typedef hash_set GlobalSetTy; + typedef std::set GlobalSetTy; GlobalSetTy GlobalSet; EquivalenceClasses &GlobalECs; @@ -193,17 +190,17 @@ public: // Public data-type declarations... typedef DSScalarMap ScalarMapTy; - typedef hash_map ReturnNodesTy; + typedef std::map ReturnNodesTy; typedef ilist NodeListTy; /// NodeMapTy - This data type is used when cloning one graph into another to /// keep track of the correspondence between the nodes in the old and new /// graphs. - typedef hash_map NodeMapTy; + typedef std::map NodeMapTy; // InvNodeMapTy - This data type is used to represent the inverse of a node // map. - typedef hash_multimap InvNodeMapTy; + typedef std::multimap InvNodeMapTy; private: DSGraph *GlobalsGraph; // Pointer to the common graph of global objects bool PrintAuxCalls; // Should this graph print the Aux calls vector? @@ -417,10 +414,7 @@ /// print - Print a dot graph to the specified ostream... /// - void print(OStream &O) const { - if (O.stream()) print(*O.stream()); - } - void print(std::ostream &O) const; + void print(llvm::raw_ostream &O) const; /// dump - call print(cerr), for use from the debugger... /// @@ -431,7 +425,7 @@ /// void viewGraph() const; - void writeGraphToFile(std::ostream &O, const std::string &GraphName) const; + void writeGraphToFile(llvm::raw_ostream &O, const std::string &GraphName) const; /// maskNodeTypes - Apply a mask to all of the node types in the graph. This /// is useful for clearing out markers like Incomplete. @@ -583,12 +577,15 @@ unsigned BitsToKeep; unsigned CloneFlags; + bool createDest; + // NodeMap - A mapping from nodes in the source graph to the nodes that // represent them in the destination graph. DSGraph::NodeMapTy NodeMap; public: - ReachabilityCloner(DSGraph* dest, const DSGraph* src, unsigned cloneFlags) - : Dest(dest), Src(src), CloneFlags(cloneFlags) { + ReachabilityCloner(DSGraph* dest, const DSGraph* src, unsigned cloneFlags, + bool _createDest = true) + : Dest(dest), Src(src), CloneFlags(cloneFlags), createDest(_createDest) { assert(Dest != Src && "Cannot clone from graph to same graph!"); BitsToKeep = ~DSNode::DeadNode; if (CloneFlags & DSGraph::StripAllocaBit) Modified: poolalloc/trunk/include/dsa/DSNode.h URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/include/dsa/DSNode.h?rev=97715&r1=97714&r2=97715&view=diff ============================================================================== --- poolalloc/trunk/include/dsa/DSNode.h (original) +++ poolalloc/trunk/include/dsa/DSNode.h Wed Mar 3 20:28:41 2010 @@ -16,8 +16,9 @@ #include "dsa/DSSupport.h" #include "llvm/ADT/ilist_node.h" -#include "llvm/Support/Streams.h" -#include "poolalloc/ADT/HashExtras.h" + +#include +#include namespace llvm { @@ -91,20 +92,21 @@ HeapNode = 1 << 1, // This node was allocated with malloc GlobalNode = 1 << 2, // This node was allocated by a global var decl ExternFuncNode = 1 << 3, // This node contains external functions - UnknownNode = 1 << 4, // This node points to unknown allocated memory - IncompleteNode = 1 << 5, // This node may not be complete - - ModifiedNode = 1 << 6, // This node is modified in this context - ReadNode = 1 << 7, // This node is read in this context - - ArrayNode = 1 << 8, // This node is treated like an array - ExternalNode = 1 << 9, // This node comes from an external source - IntToPtrNode = 1 << 10, // This node comes from an int cast - PtrToIntNode = 1 << 11, // This node excapes to an int cast - VAStartNode = 1 << 12, // This node excapes to an int cast + ExternGlobalNode = 1 << 4, // This node contains external globals + UnknownNode = 1 << 5, // This node points to unknown allocated memory + IncompleteNode = 1 << 6, // This node may not be complete + + ModifiedNode = 1 << 7, // This node is modified in this context + ReadNode = 1 << 8, // This node is read in this context + + ArrayNode = 1 << 9, // This node is treated like an array + ExternalNode = 1 << 10, // This node comes from an external source + IntToPtrNode = 1 << 11, // This node comes from an int cast + PtrToIntNode = 1 << 12, // This node excapes to an int cast + VAStartNode = 1 << 13, // This node excapes to an int cast //#ifndef NDEBUG - DeadNode = 1 << 13, // This node is dead and should not be pointed to + DeadNode = 1 << 14, // This node is dead and should not be pointed to //#endif Composition = AllocaNode | HeapNode | GlobalNode | UnknownNode @@ -351,6 +353,7 @@ DSNode* setHeapMarker() { NodeType |= HeapNode; return this; } DSNode* setGlobalMarker() { NodeType |= GlobalNode; return this; } DSNode* setExternFuncMarker() { NodeType |= ExternFuncNode; return this; } + DSNode* setExternGlobalMarker() { NodeType |= ExternGlobalNode; return this; } DSNode* setUnknownMarker() { NodeType |= UnknownNode; return this; } DSNode* setModifiedMarker() { NodeType |= ModifiedNode; return this; } DSNode* setReadMarker() { NodeType |= ReadNode; return this; } @@ -372,10 +375,7 @@ /// void forwardNode(DSNode *To, unsigned Offset); - void print(OStream &O, const DSGraph *G) const { - if (O.stream()) print(*O.stream(), G); - } - void print(std::ostream &O, const DSGraph *G) const; + void print(llvm::raw_ostream &O, const DSGraph *G) const; void dump() const; void assertOK() const; @@ -389,13 +389,13 @@ /// remapLinks - Change all of the Links in the current node according to the /// specified mapping. /// - void remapLinks(hash_map &OldNodeMap); + void remapLinks(std::map &OldNodeMap); /// markReachableNodes - This method recursively traverses the specified /// DSNodes, marking any nodes which are reachable. All reachable nodes it /// adds to the set, which allows it to only traverse visited nodes once. /// - void markReachableNodes(hash_set &ReachableNodes) const; + void markReachableNodes(std::set &ReachableNodes) const; private: friend class DSNodeHandle; Modified: poolalloc/trunk/include/dsa/DSSupport.h URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/include/dsa/DSSupport.h?rev=97715&r1=97714&r2=97715&view=diff ============================================================================== --- poolalloc/trunk/include/dsa/DSSupport.h (original) +++ poolalloc/trunk/include/dsa/DSSupport.h Wed Mar 3 20:28:41 2010 @@ -15,8 +15,11 @@ #define LLVM_ANALYSIS_DSSUPPORT_H #include +#include +#include +#include + #include "llvm/Support/CallSite.h" -#include "poolalloc/ADT/HashExtras.h" namespace llvm { @@ -139,15 +142,6 @@ inline void swap(llvm::DSNodeHandle &NH1, llvm::DSNodeHandle &NH2) { NH1.swap(NH2); } } -namespace __gnu_cxx { - // Provide a hash function for arbitrary pointers... - template <> struct hash { - inline size_t operator()(const llvm::DSNodeHandle &Val) const { - return hash()(Val.getNode()) ^ Val.getOffset(); - } - }; -} - namespace llvm { //===----------------------------------------------------------------------===// @@ -163,18 +157,18 @@ std::vector CallArgs; // The pointer arguments static void InitNH(DSNodeHandle &NH, const DSNodeHandle &Src, - const hash_map &NodeMap) { + const std::map &NodeMap) { if (DSNode *N = Src.getNode()) { - hash_map::const_iterator I = NodeMap.find(N); + std::map::const_iterator I = NodeMap.find(N); assert(I != NodeMap.end() && "Node not in mapping!"); NH.setTo(I->second, Src.getOffset()); } } static void InitNH(DSNodeHandle &NH, const DSNodeHandle &Src, - const hash_map &NodeMap) { + const std::map &NodeMap) { if (DSNode *N = Src.getNode()) { - hash_map::const_iterator I = NodeMap.find(N); + std::map::const_iterator I = NodeMap.find(N); assert(I != NodeMap.end() && "Node not in mapping!"); DSNode *NN = I->second.getNode(); // Call getNode before getOffset() @@ -298,7 +292,7 @@ /// DSNodes, marking any nodes which are reachable. All reachable nodes it /// adds to the set, which allows it to only traverse visited nodes once. /// - void markReachableNodes(hash_set &Nodes) const; + void markReachableNodes(std::set &Nodes) const; bool operator<(const DSCallSite &CS) const { if (isDirectCall()) { // This must sort by callee first! Modified: poolalloc/trunk/include/dsa/DataStructure.h URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/include/dsa/DataStructure.h?rev=97715&r1=97714&r2=97715&view=diff ============================================================================== --- poolalloc/trunk/include/dsa/DataStructure.h (original) +++ poolalloc/trunk/include/dsa/DataStructure.h Wed Mar 3 20:28:41 2010 @@ -19,7 +19,7 @@ #include "llvm/Support/CallSite.h" #include "llvm/ADT/EquivalenceClasses.h" -#include "poolalloc/ADT/HashExtras.h" +#include "dsa/EntryPointAnalysis.h" #include @@ -37,10 +37,10 @@ FunctionPass *createDataStructureGraphCheckerPass(); class DataStructures : public ModulePass { - typedef hash_map > ActualCalleesTy; - typedef hash_map DSInfoTy; + typedef std::map > ActualCalleesTy; + typedef std::map DSInfoTy; public: - typedef hash_set::const_iterator callee_iterator; + typedef std::set::const_iterator callee_iterator; private: /// TargetData, comes in handy @@ -91,6 +91,14 @@ ActualCallees[I].insert(F); } + template + void callee_add_many(const Instruction* I, Iterator _begin, Iterator _end) { + ActualCallees[I].insert(_begin,_end); +// typename ActualCalleesTy::mapped_type& S = ActualCallees[I]; +// for (; _begin != _end; ++_begin) +// S.insert(*_begin); + } + DataStructures(intptr_t id, const char* name) : ModulePass(id), TD(0), GraphSource(0), printname(name), GlobalsGraph(0) { //a dummy node for empty call sites @@ -103,7 +111,7 @@ public: /// print - Print out the analysis results... /// - void print(std::ostream &O, const Module *M) const; + void print(llvm::raw_ostream &O, const Module *M) const; void dumpCallGraph() const; callee_iterator callee_begin(const Instruction *I) const { @@ -135,7 +143,8 @@ void callee_get_keys(std::vector& keys) { for (ActualCalleesTy::const_iterator ii = ActualCallees.begin(), ee = ActualCallees.end(); ii != ee; ++ii) - keys.push_back(ii->first); + if (ii->first) + keys.push_back(ii->first); } virtual void releaseMemory(); @@ -147,7 +156,7 @@ /// getDSGraph - Return the data structure graph for the specified function. /// virtual DSGraph *getDSGraph(const Function &F) const { - hash_map::const_iterator I = DSInfo.find(&F); + std::map::const_iterator I = DSInfo.find(&F); assert(I != DSInfo.end() && "Function not in module!"); return I->second; } @@ -226,7 +235,7 @@ /// virtual void getAnalysisUsage(AnalysisUsage &AU) const { AU.addRequired(); - AU.addPreserved(); + AU.addPreserved(); AU.setPreservesCFG(); } }; @@ -245,6 +254,8 @@ const char* debugname; bool useCallGraph; + EntryPointAnalysis* EP; + public: static char ID; //Child constructor (CBU) @@ -260,7 +271,8 @@ virtual void getAnalysisUsage(AnalysisUsage &AU) const { AU.addRequired(); - AU.addPreserved(); + AU.addRequired(); + AU.addPreserved(); AU.setPreservesCFG(); } @@ -270,15 +282,15 @@ private: void calculateGraph(DSGraph* G); - void inlineUnresolved(DSGraph* G); - unsigned calculateGraphs(const Function *F, std::vector &Stack, unsigned &NextID, - hash_map &ValMap); + std::map &ValMap); void CloneAuxIntoGlobal(DSGraph* G); + void cloneGlobalsInto(DSGraph* G); + void cloneIntoGlobals(DSGraph* G); void finalizeGlobals(void); }; @@ -302,7 +314,8 @@ virtual void getAnalysisUsage(AnalysisUsage &AU) const { AU.addRequired(); - AU.addPreserved(); + AU.addRequired (); + AU.addPreserved(); AU.setPreservesCFG(); } @@ -325,7 +338,6 @@ virtual void getAnalysisUsage(AnalysisUsage &AU) const { AU.addRequired(); - AU.addPreserved(); AU.setPreservesCFG(); } @@ -336,7 +348,7 @@ /// by the bottom-up pass. /// class TDDataStructures : public DataStructures { - hash_set ArgsRemainIncomplete; + std::set ArgsRemainIncomplete; /// CallerCallEdges - For a particular graph, we keep a list of these records /// which indicates which graphs call this function and from where. @@ -370,7 +382,7 @@ static char ID; TDDataStructures(intptr_t CID = (intptr_t)&ID, const char* printname = "td.", bool useEQ = false) : DataStructures(CID, printname), useEQBU(useEQ) {} - ~TDDataStructures() { releaseMemory(); } + ~TDDataStructures(); virtual bool runOnModule(Module &M); @@ -383,16 +395,15 @@ AU.addRequired(); AU.addPreserved(); } - AU.addPreserved(); AU.setPreservesCFG(); } private: void markReachableFunctionsExternallyAccessible(DSNode *N, - hash_set &Visited); + std::set &Visited); void InlineCallersIntoGraph(DSGraph* G); - void ComputePostOrder(const Function &F, hash_set &Visited, + void ComputePostOrder(const Function &F, std::set &Visited, std::vector &PostOrder); }; @@ -406,6 +417,7 @@ EQTDDataStructures() :TDDataStructures((intptr_t)&ID, "eqtd.", false) {} + ~EQTDDataStructures(); }; /// SteensgaardsDataStructures - Analysis that computes a context-insensitive @@ -449,8 +461,7 @@ return ResultGraph; } - void print(OStream O, const Module *M) const; - void print(std::ostream &O, const Module *M) const; + void print(llvm::raw_ostream &O, const Module *M) const; }; Removed: poolalloc/trunk/include/poolalloc/ADT/HashExtras.h URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/include/poolalloc/ADT/HashExtras.h?rev=97714&view=auto ============================================================================== --- poolalloc/trunk/include/poolalloc/ADT/HashExtras.h (original) +++ poolalloc/trunk/include/poolalloc/ADT/HashExtras.h (removed) @@ -1,49 +0,0 @@ -//===-- poolalloc/ADT/HashExtras.h - STL hashing for LLVM -------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file contains some templates that are useful if you are working with the -// STL Hashed containers. -// -// No library is required when using these functions. -// -// This header files is a modification of HashExtras.h from LLVM. It is GNU -// C++ specific. -// -//===----------------------------------------------------------------------===// - -#ifndef POOLALLOC_ADT_HASHEXTRAS_H -#define POOLALLOC_ADT_HASHEXTRAS_H - -#include -#include -#include -#include - -// Cannot specialize hash template from outside of the std namespace. -namespace __gnu_cxx { - -// Provide a hash function for arbitrary pointers... -template struct hash { - inline size_t operator()(const T *Val) const { - return reinterpret_cast(Val); - } -}; - -template <> struct hash { - size_t operator()(std::string const &str) const { - return hash()(str.c_str()); - } -}; - -} // End namespace std - -// Use the namespace so that we don't need to state it explictly. -using namespace __gnu_cxx; - -#endif Modified: poolalloc/trunk/include/poolalloc/PoolAllocate.h URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/include/poolalloc/PoolAllocate.h?rev=97715&r1=97714&r2=97715&view=diff ============================================================================== --- poolalloc/trunk/include/poolalloc/PoolAllocate.h (original) +++ poolalloc/trunk/include/poolalloc/PoolAllocate.h Wed Mar 3 20:28:41 2010 @@ -29,7 +29,6 @@ #include "llvm/Support/CommandLine.h" #include "dsa/DataStructure.h" -#include "poolalloc/ADT/HashExtras.h" #include "poolalloc/Config/config.h" #include @@ -60,7 +59,7 @@ /// MarkedNodes - The set of nodes which are not locally pool allocatable in /// the current function. /// - hash_set MarkedNodes; + std::set MarkedNodes; /// F - The function this FuncInfo corresponds to. /// @@ -131,7 +130,7 @@ virtual PA::FuncInfo *getFuncInfoOrClone(const Function &F) {return 0;} virtual Function *getOrigFunctionFromClone(const Function *F) const {return 0;} - virtual const Type * getPoolType() {return 0;} + virtual const Type * getPoolType(LLVMContext*) {return 0;} virtual bool hasDSGraph (const Function & F) const { return Graphs->hasDSGraph (F); @@ -273,8 +272,8 @@ Instruction *IPHint = 0); /// getPoolType - Return the type of a pool descriptor - const Type * getPoolType() { - const IntegerType * IT = IntegerType::getInt8Ty(getGlobalContext()); + const Type * getPoolType(LLVMContext* C) { + const IntegerType * IT = IntegerType::getInt8Ty(*C); Type * VoidPtrType = PointerType::getUnqual(IT); if (SAFECodeEnabled) return ArrayType::get(VoidPtrType, 92); @@ -336,14 +335,15 @@ // In short, we need to filter out the case where we find a pool handle, // but it's only accessible from a clone and not the original function. // + //FIXME: handle allocators assert ((isa(Pool) || - isa(Pool) || + isa(Pool) || isa(Pool) || isa(Pool)) && "Pool of unknown type!\n"); if ((isa(Pool)) || (isa(Pool))) { return Pool; - } else if (AllocationInst * AI = dyn_cast(Pool)) { + } else if (AllocaInst * AI = dyn_cast(Pool)) { if (AI->getParent()->getParent() == &F) return Pool; } else if (Argument * Arg = dyn_cast(Pool)) { @@ -532,7 +532,7 @@ virtual Value * getGlobalPool (const DSNode * Node); virtual Value * getPool (const DSNode * N, Function & F); - virtual void print(std::ostream &OS, const Module * M) const; + virtual void print(llvm::raw_ostream &OS, const Module * M) const; virtual void dump() const; }; Modified: poolalloc/trunk/lib/AssistDS/FuncSpec.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/AssistDS/FuncSpec.cpp?rev=97715&r1=97714&r2=97715&view=diff ============================================================================== --- poolalloc/trunk/lib/AssistDS/FuncSpec.cpp (original) +++ poolalloc/trunk/lib/AssistDS/FuncSpec.cpp Wed Mar 3 20:28:41 2010 @@ -14,6 +14,8 @@ #include "llvm/Pass.h" #include "llvm/Transforms/Utils/Cloning.h" #include "llvm/ADT/Statistic.h" +#include "llvm/Support/FormattedStream.h" + #include #include #include @@ -40,11 +42,11 @@ if (const PointerType* Ty = dyn_cast(ii->getType())) { if (isa(Ty->getElementType())) { FPArgs.push_back(ii->getArgNo()); - cerr << "Eligable: " << I->getNameStr() << "\n"; + errs() << "Eligable: " << I->getNameStr() << "\n"; } } else if (isa(ii->getType())) { FPArgs.push_back(ii->getArgNo()); - cerr << "Eligable: " << I->getNameStr() << "\n"; + errs() << "Eligable: " << I->getNameStr() << "\n"; } for(Value::use_iterator ui = I->use_begin(), ue = I->use_end(); ui != ue; ++ui) Modified: poolalloc/trunk/lib/DSA/BottomUpClosure.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/BottomUpClosure.cpp?rev=97715&r1=97714&r2=97715&view=diff ============================================================================== --- poolalloc/trunk/lib/DSA/BottomUpClosure.cpp (original) +++ poolalloc/trunk/lib/DSA/BottomUpClosure.cpp Wed Mar 3 20:28:41 2010 @@ -40,30 +40,41 @@ // bool BUDataStructures::runOnModule(Module &M) { init(&getAnalysis(), false, true, false, false ); + EP = &getAnalysis(); return runOnModuleInternal(M); } bool BUDataStructures::runOnModuleInternal(Module& M) { std::vector Stack; - hash_map ValMap; + std::map ValMap; unsigned NextID = 1; - Function *MainFunc = M.getFunction("main"); - if (MainFunc && !MainFunc->isDeclaration()) { - calculateGraphs(MainFunc, Stack, NextID, ValMap); - CloneAuxIntoGlobal(getDSGraph(*MainFunc)); - } else { - DEBUG(errs() << debugname << ": No 'main' function found!\n"); + std::vector EntryPoints; + EP = &getAnalysis(); + EP->findEntryPoints(M, EntryPoints); + + for (std::vector::iterator ii = EntryPoints.begin(), + ee = EntryPoints.end(); ii != ee; ++ii) + if (!hasDSGraph(**ii)) + calculateGraphs(*ii, Stack, NextID, ValMap); + + for (std::vector::iterator ii = EntryPoints.begin(), + ee = EntryPoints.end(); ii != ee; ++ii) { + cloneGlobalsInto(getDSGraph(**ii)); + calculateGraph(getDSGraph(**ii)); + CloneAuxIntoGlobal(getDSGraph(**ii)); } // Calculate the graphs for any functions that are unreachable from main... for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I) if (!I->isDeclaration() && !hasDSGraph(*I)) { - if (MainFunc) - DEBUG(errs() << debugname << ": Function unreachable from main: " - << I->getName() << "\n"); - calculateGraphs(I, Stack, NextID, ValMap); // Calculate all graphs. + DEBUG( + if (EntryPoints.size()) + errs() << debugname << ": Function unreachable from main: " + << I->getName() << "\n"; + ); + calculateGraphs(I, Stack, NextID, ValMap); // Calculate all graphs. CloneAuxIntoGlobal(getDSGraph(*I)); } @@ -83,7 +94,7 @@ // incomplete in the globals graph. // - finalizeGlobals(); + //finalizeGlobals(); GlobalsGraph->removeTriviallyDeadNodes(true); GlobalsGraph->maskIncompleteMarkers(); @@ -96,18 +107,10 @@ // Merge the globals variables (not the calls) from the globals graph back // into the main function's graph so that the main function contains all of // the information about global pools and GV usage in the program. - if (MainFunc && !MainFunc->isDeclaration()) { - DSGraph* MainGraph = getOrCreateGraph(MainFunc); - const DSGraph* GG = MainGraph->getGlobalsGraph(); - ReachabilityCloner RC(MainGraph, GG, - DSGraph::DontCloneCallNodes | - DSGraph::DontCloneAuxCallNodes); - - // Clone the global nodes into this graph. - for (DSScalarMap::global_iterator I = GG->getScalarMap().global_begin(), - E = GG->getScalarMap().global_end(); I != E; ++I) - if (isa(*I)) - RC.getClonedNH(GG->getNodeForValue(*I)); + for (std::vector::iterator ii = EntryPoints.begin(), + ee = EntryPoints.end(); ii != ee; ++ii) { + DSGraph* MainGraph = getOrCreateGraph(*ii); + cloneGlobalsInto(MainGraph); MainGraph->maskIncompleteMarkers(); MainGraph->markIncompleteNodes(DSGraph::MarkFormalArgs | @@ -130,7 +133,7 @@ BadCalls.insert(*ii); else GoodCalls.insert(*ii); - hash_set reachable; + std::set reachable; for (std::set::iterator ii = BadCalls.begin(), ee = BadCalls.end(); ii != ee; ++ii) { ii->getRetVal().getNode()->markReachableNodes(reachable); @@ -189,7 +192,7 @@ unsigned BUDataStructures::calculateGraphs(const Function *F, std::vector &Stack, unsigned &NextID, - hash_map &ValMap) { + std::map &ValMap) { assert(!ValMap.count(F) && "Shouldn't revisit functions!"); unsigned Min = NextID++, MyID = Min; ValMap[F] = Min; @@ -216,7 +219,7 @@ const Function *Callee = CalleeFunctions[i]; unsigned M; // Have we visited the destination function yet? - hash_map::iterator It = ValMap.find(Callee); + std::map::iterator It = ValMap.find(Callee); if (It == ValMap.end()) // No, visit it now. M = calculateGraphs(Callee, Stack, NextID, ValMap); else // Yes, get it's number. @@ -338,35 +341,6 @@ void BUDataStructures::calculateGraph(DSGraph* Graph) { DEBUG(Graph->AssertGraphOK(); Graph->getGlobalsGraph()->AssertGraphOK()); - // If this graph contains the main function, clone the globals graph into this - // graph before we inline callees and other fun stuff. - bool ContainsMain = false; - DSGraph::ReturnNodesTy &ReturnNodes = Graph->getReturnNodes(); - - for (DSGraph::ReturnNodesTy::iterator I = ReturnNodes.begin(), - E = ReturnNodes.end(); I != E; ++I) - if (I->first->hasExternalLinkage() && I->first->getName() == "main") { - ContainsMain = true; - break; - } - - // If this graph contains main, copy the contents of the globals graph over. - // Note that this is *required* for correctness. If a callee contains a use - // of a global, we have to make sure to link up nodes due to global-argument - // bindings. - if (ContainsMain) { - const DSGraph* GG = Graph->getGlobalsGraph(); - ReachabilityCloner RC(Graph, GG, - DSGraph::DontCloneCallNodes | - DSGraph::DontCloneAuxCallNodes); - - // Clone the global nodes into this graph. - for (DSScalarMap::global_iterator I = GG->getScalarMap().global_begin(), - E = GG->getScalarMap().global_end(); I != E; ++I) - if (isa(*I)) - RC.getClonedNH(GG->getNodeForValue(*I)); - } - // Move our call site list into TempFCs so that inline call sites go into the // new call site list and doesn't invalidate our iterators! std::list TempFCs; @@ -385,6 +359,10 @@ // Fast path for noop calls. Note that we don't care about merging globals // in the callee with nodes in the caller here. if (CS.getRetVal().isNull() && CS.getNumPtrArgs() == 0) { + if (!CS.isDirectCall()) { + GetAnyCallees(CS, CalledFuncs); + callee_add_many(TheCall, CalledFuncs.begin(), CalledFuncs.end()); + } TempFCs.erase(TempFCs.begin()); continue; } @@ -392,6 +370,11 @@ GetAllCallees(CS, CalledFuncs); if (CalledFuncs.empty()) { + //Get any callees we do have for the callgraph + if (!CS.isDirectCall()) { + GetAnyCallees(CS, CalledFuncs); + callee_add_many(TheCall, CalledFuncs.begin(), CalledFuncs.end()); + } // Remember that we could not resolve this yet! AuxCallsList.splice(AuxCallsList.end(), TempFCs, TempFCs.begin()); continue; @@ -508,150 +491,30 @@ // reach live nodes as live. Graph->removeDeadNodes(DSGraph::KeepUnreachableGlobals); - // When this graph is finalized, clone the globals in the graph into the - // globals graph to make sure it has everything, from all graphs. - DSScalarMap &MainSM = Graph->getScalarMap(); - ReachabilityCloner RC(GlobalsGraph, Graph, DSGraph::StripAllocaBit); - - // Clone everything reachable from globals in the function graph into the - // globals graph. - for (DSScalarMap::global_iterator I = MainSM.global_begin(), - E = MainSM.global_end(); I != E; ++I) - RC.getClonedNH(MainSM[*I]); - + cloneIntoGlobals(Graph); //Graph.writeGraphToFile(cerr, "bu_" + F.getName()); } -void BUDataStructures::inlineUnresolved(DSGraph* Graph) { - - // Move our call site list into TempFCs so that inline call sites go into the - // new call site list and doesn't invalidate our iterators! - std::list TempFCs = Graph->getAuxFunctionCalls(); - - for (DSGraph::afc_iterator aii = TempFCs.begin(), aee = TempFCs.end(); - aii != aee; ++aii) { - std::vector CalledFuncs; - DSCallSite CS = *aii; - GetAnyCallees(CS, CalledFuncs); - if (CalledFuncs.empty()) - continue; - - DSGraph *GI; - Instruction *TheCall = CS.getCallSite().getInstruction(); - - for (std::vector::iterator ii = CalledFuncs.begin(), ee = CalledFuncs.end(); - ii != ee; ++ii) - callee_add(TheCall, *ii); - - if (CalledFuncs.size() == 1 && hasDSGraph(*CalledFuncs[0])) { - const Function *Callee = CalledFuncs[0]; - - // Get the data structure graph for the called function. - GI = getDSGraph(*Callee); // Graph to inline - if (GI == Graph) continue; - DEBUG(errs() << " Inlining graph for " << Callee->getName() - << "[" << GI->getGraphSize() << "+" - << GI->getAuxFunctionCalls().size() << "] into '" - << Graph->getFunctionNames() << "' [" << Graph->getGraphSize() <<"+" - << Graph->getAuxFunctionCalls().size() << "]\n"); - Graph->mergeInGraph(CS, *Callee, *GI, - DSGraph::StripAllocaBit|DSGraph::DontCloneCallNodes | - DSGraph::DontCloneAuxCallNodes); - ++NumInlines; - } else { - DEBUG(errs() << "In Fns: " << Graph->getFunctionNames() << "\n"); - DEBUG(std::cerr << " calls " << CalledFuncs.size() - << " fns from site: " << CS.getCallSite().getInstruction() - << " " << *CS.getCallSite().getInstruction()); - DEBUG(errs() << " Fns ="); - unsigned NumPrinted = 0; - - for (std::vector::iterator I = CalledFuncs.begin(), - E = CalledFuncs.end(); I != E; ++I) - if (NumPrinted++ < 8) { - DEBUG(errs() << " " << (*I)->getName()); - } - DEBUG(errs() << "\n"); - - for (unsigned x = 0; x < CalledFuncs.size(); ) - if (!hasDSGraph(*CalledFuncs[x])) - CalledFuncs.erase(CalledFuncs.begin() + x); - else - ++x; - if (!CalledFuncs.size()) - continue; - - // See if we already computed a graph for this set of callees. - std::sort(CalledFuncs.begin(), CalledFuncs.end()); - std::pair > &IndCallGraph = - IndCallGraphMap[CalledFuncs]; - - if (IndCallGraph.first == Graph) continue; - - if (IndCallGraph.first == 0) { - std::vector::iterator I = CalledFuncs.begin(), - E = CalledFuncs.end(); - - // Start with a copy of the first graph. - GI = IndCallGraph.first = new DSGraph(getDSGraph(**I), GlobalECs); - GI->setGlobalsGraph(Graph->getGlobalsGraph()); - std::vector &Args = IndCallGraph.second; - - // Get the argument nodes for the first callee. The return value is - // the 0th index in the vector. - GI->getFunctionArgumentsForCall(*I, Args); - - // Merge all of the other callees into this graph. - for (++I; I != E; ++I) { - // If the graph already contains the nodes for the function, don't - // bother merging it in again. - if (!GI->containsFunction(*I)) { - GI->cloneInto(getDSGraph(**I)); - ++NumInlines; - } - - std::vector NextArgs; - GI->getFunctionArgumentsForCall(*I, NextArgs); - unsigned i = 0, e = Args.size(); - for (; i != e; ++i) { - if (i == NextArgs.size()) break; - Args[i].mergeWith(NextArgs[i]); - } - for (e = NextArgs.size(); i != e; ++i) - Args.push_back(NextArgs[i]); - } - - // Clean up the final graph! - GI->removeDeadNodes(DSGraph::KeepUnreachableGlobals); - } else { - DEBUG(errs() << "***\n*** RECYCLED GRAPH ***\n***\n"); - } - - GI = IndCallGraph.first; - - // Merge the unified graph into this graph now. - DEBUG(errs() << " Inlining multi callee graph " - << "[" << GI->getGraphSize() << "+" - << GI->getAuxFunctionCalls().size() << "] into '" - << Graph->getFunctionNames() << "' [" << Graph->getGraphSize() <<"+" - << Graph->getAuxFunctionCalls().size() << "]\n" ); - - Graph->mergeInGraph(CS, IndCallGraph.second, *GI, - DSGraph::StripAllocaBit | - DSGraph::DontCloneCallNodes | - DSGraph::DontCloneAuxCallNodes); - ++NumInlines; - } - } - - // Recompute the Incomplete markers - Graph->maskIncompleteMarkers(); - Graph->markIncompleteNodes(DSGraph::MarkFormalArgs); - - // Delete dead nodes. Treat globals that are unreachable but that can - // reach live nodes as live. - Graph->removeDeadNodes(DSGraph::KeepUnreachableGlobals); +//For Entry Points +void BUDataStructures::cloneGlobalsInto(DSGraph* Graph) { + // If this graph contains main, copy the contents of the globals graph over. + // Note that this is *required* for correctness. If a callee contains a use + // of a global, we have to make sure to link up nodes due to global-argument + // bindings. + const DSGraph* GG = Graph->getGlobalsGraph(); + ReachabilityCloner RC(Graph, GG, + DSGraph::DontCloneCallNodes | + DSGraph::DontCloneAuxCallNodes); + + // Clone the global nodes into this graph. + for (DSScalarMap::global_iterator I = Graph->getScalarMap().global_begin(), + E = Graph->getScalarMap().global_end(); I != E; ++I) + if (isa (*I)) + RC.getClonedNH(GG->getNodeForValue(*I)); +} +//For all graphs +void BUDataStructures::cloneIntoGlobals(DSGraph* Graph) { // When this graph is finalized, clone the globals in the graph into the // globals graph to make sure it has everything, from all graphs. DSScalarMap &MainSM = Graph->getScalarMap(); @@ -662,6 +525,5 @@ for (DSScalarMap::global_iterator I = MainSM.global_begin(), E = MainSM.global_end(); I != E; ++I) RC.getClonedNH(MainSM[*I]); - - //Graph.writeGraphToFile(cerr, "bu_" + F.getName()); } + Modified: poolalloc/trunk/lib/DSA/CompleteBottomUp.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/CompleteBottomUp.cpp?rev=97715&r1=97714&r2=97715&view=diff ============================================================================== --- poolalloc/trunk/lib/DSA/CompleteBottomUp.cpp (original) +++ poolalloc/trunk/lib/DSA/CompleteBottomUp.cpp Wed Mar 3 20:28:41 2010 @@ -47,18 +47,18 @@ std::vector keys; callee_get_keys(keys); + DSGraph* G = getGlobalsGraph(); + DSGraph::ScalarMapTy& SM = G->getScalarMap(); + //mege nodes in the global graph for these functions for (std::vector::iterator ii = keys.begin(), ee = keys.end(); ii != ee; ++ii) { - if (*ii) { - callee_iterator csi = callee_begin(*ii), cse = callee_end(*ii); - if (csi != cse) ++csi; - DSGraph* G = getOrCreateGraph((*ii)->getParent()->getParent()); - for ( ; csi != cse; ++csi) { - G->getNodeForValue(*csi).mergeWith(G->getNodeForValue((*ii)->getOperand(0))); - G->getNodeForValue((*ii)->getOperand(0)).getNode()->setGlobalMarker(); - G->getNodeForValue((*ii)->getOperand(0)).getNode()->addGlobal(*csi); - } + callee_iterator csi = callee_begin(*ii), cse = callee_end(*ii); + if (csi != cse && SM.find(*csi) != SM.end()) { + DSNodeHandle& SrcNH = SM.find(*csi)->second; + ++csi; + for (; csi != cse; ++csi) + SrcNH.mergeWith(SM.find(*csi)->second); } } } Modified: poolalloc/trunk/lib/DSA/DataStructure.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/DataStructure.cpp?rev=97715&r1=97714&r2=97715&view=diff ============================================================================== --- poolalloc/trunk/lib/DSA/DataStructure.cpp (original) +++ poolalloc/trunk/lib/DSA/DataStructure.cpp Wed Mar 3 20:28:41 2010 @@ -30,7 +30,6 @@ #include "llvm/ADT/Statistic.h" #include "llvm/Support/Timer.h" #include "llvm/Support/raw_ostream.h" -#include "poolalloc/ADT/HashExtras.h" #include #include @@ -42,8 +41,8 @@ STATISTIC (NumCallNodesMerged, "Number of call nodes merged"); STATISTIC (NumNodeAllocated , "Number of nodes allocated"); STATISTIC (NumDNE , "Number of nodes removed by reachability"); - STATISTIC (NumTrivialDNE , "Number of nodes trivially removed"); - STATISTIC (NumTrivialGlobalDNE, "Number of globals trivially removed"); +// STATISTIC (NumTrivialDNE , "Number of nodes trivially removed"); +// STATISTIC (NumTrivialGlobalDNE, "Number of globals trivially removed"); #ifdef LLVA_KERNEL STATISTIC (LostPools , "Number of pools lost to DSNode Merge"); #endif @@ -800,8 +799,8 @@ // Check to see if we have a pointer & integer mismatch going on here, // loading a pointer as a long, for example. // - if ((SubType->isInteger() && isa(NewTy)) || - (NewTy->isInteger() && isa(SubType))) + if ((SubType->isIntegerTy() && NewTy->isPointerTy()) || + (NewTy->isIntegerTy() && SubType->isPointerTy())) return false; } else if (NewTySize > SubTypeSize && NewTySize <= PadSize) { // We are accessing the field, plus some structure padding. Ignore the @@ -1098,6 +1097,8 @@ } } + if (!createDest) return DSNodeHandle(0,0); + DSNode *DN = new DSNode(*SN, Dest, true /* Null out all links */); DN->maskNodeTypes(BitsToKeep); NH = DN; @@ -1494,7 +1495,7 @@ } // dump - Allow inspection of graph in a debugger. -void DSGraph::dump() const { print(cerr); } +void DSGraph::dump() const { print(errs()); } /// remapLinks - Change all of the Links in the current node according to the @@ -1540,8 +1541,8 @@ if (GlobalValue *GV = dyn_cast(Ptr)) { N->addGlobal(GV); - } else if (isa(Ptr)) { - N->setHeapMarker(); +// } else if (isa(Ptr)) { +// N->setHeapMarker(); } else if (isa(Ptr)) { N->setAllocaMarker(); } else { @@ -2200,6 +2201,7 @@ // we don't have to perform any non-trivial analysis here. // void DSGraph::removeTriviallyDeadNodes(bool updateForwarders) { +#if 0 if (updateForwarders) { /// NOTE: This code is disabled. This slows down DSA on 177.mesa /// substantially! @@ -2258,8 +2260,9 @@ // Make sure NumReferrers still agrees, if so, the node is truly dead. if (Node.getNumReferrers() == Node.numGlobals()) { for (DSNode::globals_iterator j = Node.globals_begin(), e = Node.globals_end(); - j != e; ++j) - ScalarMap.erase(*j); + j != e; ++j) + if (ScalarMap.find(*j) != ScalarMap.end()) + ScalarMap.erase(*j); Node.makeNodeDead(); ++NumTrivialGlobalDNE; } @@ -2275,7 +2278,7 @@ ++NI; } } - +#endif removeIdenticalCalls(FunctionCalls); removeIdenticalCalls(AuxFunctionCalls); } @@ -2285,7 +2288,7 @@ /// DSNodes, marking any nodes which are reachable. All reachable nodes it adds /// to the set, which allows it to only traverse visited nodes once. /// -void DSNode::markReachableNodes(hash_set &ReachableNodes) const { +void DSNode::markReachableNodes(std::set &ReachableNodes) const { if (this == 0) return; assert(getForwardNode() == 0 && "Cannot mark a forwarded node!"); if (ReachableNodes.insert(this).second) // Is newly reachable? @@ -2294,7 +2297,7 @@ I->getNode()->markReachableNodes(ReachableNodes); } -void DSCallSite::markReachableNodes(hash_set &Nodes) const { +void DSCallSite::markReachableNodes(std::set &Nodes) const { getRetVal().getNode()->markReachableNodes(Nodes); if (isIndirectCall()) getCalleeNode()->markReachableNodes(Nodes); @@ -2307,8 +2310,8 @@ // true, otherwise return false. If an alive node is reachable, this node is // marked as alive... // -static bool CanReachAliveNodes(DSNode *N, hash_set &Alive, - hash_set &Visited, +static bool CanReachAliveNodes(DSNode *N, std::set &Alive, + std::set &Visited, bool IgnoreGlobals) { if (N == 0) return false; assert(N->getForwardNode() == 0 && "Cannot mark a forwarded node!"); @@ -2337,8 +2340,8 @@ // alive nodes. // static bool CallSiteUsesAliveArgs(const DSCallSite &CS, - hash_set &Alive, - hash_set &Visited, + std::set &Alive, + std::set &Visited, bool IgnoreGlobals) { if (CanReachAliveNodes(CS.getRetVal().getNode(), Alive, Visited, IgnoreGlobals)) @@ -2369,7 +2372,7 @@ // FIXME: Merge non-trivially identical call nodes... // Alive - a set that holds all nodes found to be reachable/alive. - hash_set Alive; + std::set Alive; std::vector > GlobalNodes; // Copy and merge all information about globals to the GlobalsGraph if this is @@ -2417,8 +2420,8 @@ // value (which makes them live in turn), and continue till no more are found. // bool Iterate; - hash_set Visited; - hash_set AuxFCallsAlive; + std::set Visited; + std::set AuxFCallsAlive; do { Visited.clear(); // If any global node points to a non-global that is "alive", the global is @@ -2748,8 +2751,8 @@ return; } - cerr << *From; - cerr << *To; + errs() << *From; + errs() << *To; assert(0 && "Do not know how to copy this yet!"); abort(); } @@ -2913,12 +2916,12 @@ // if (DSGraphsStolen) return; - hash_set toDelete; + std::set toDelete; for (DSInfoTy::iterator I = DSInfo.begin(), E = DSInfo.end(); I != E; ++I) { I->second->getReturnNodes().clear(); toDelete.insert(I->second); } - for (hash_set::iterator I = toDelete.begin(), E = toDelete.end(); I != E; ++I) + for (std::set::iterator I = toDelete.begin(), E = toDelete.end(); I != E; ++I) delete *I; // Empty map so next time memory is released, data structures are not Modified: poolalloc/trunk/lib/DSA/DataStructureStats.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/DataStructureStats.cpp?rev=97715&r1=97714&r2=97715&view=diff ============================================================================== --- poolalloc/trunk/lib/DSA/DataStructureStats.cpp (original) +++ poolalloc/trunk/lib/DSA/DataStructureStats.cpp Wed Mar 3 20:28:41 2010 @@ -17,7 +17,6 @@ #include "llvm/Instructions.h" #include "llvm/Pass.h" #include "llvm/Support/InstVisitor.h" -#include "llvm/Support/Streams.h" #include "llvm/ADT/Statistic.h" #include "llvm/Support/Debug.h" #include "llvm/Support/FormattedStream.h" @@ -61,7 +60,7 @@ void visitStore(StoreInst &SI); /// Debugging support methods - void print(std::ostream &O, const Module* = 0) const { } + void print(llvm::raw_ostream &O, const Module* = 0) const { } }; static RegisterPass Z("dsstats", "DS Graph Statistics"); Modified: poolalloc/trunk/lib/DSA/GraphChecker.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/GraphChecker.cpp?rev=97715&r1=97714&r2=97715&view=diff ============================================================================== --- poolalloc/trunk/lib/DSA/GraphChecker.cpp (original) +++ poolalloc/trunk/lib/DSA/GraphChecker.cpp Wed Mar 3 20:28:41 2010 @@ -26,7 +26,7 @@ #include "dsa/DataStructure.h" #include "dsa/DSGraph.h" #include "llvm/Support/CommandLine.h" -#include "llvm/Support/Streams.h" +#include "llvm/Support/FormattedStream.h" #include "llvm/Value.h" #include using namespace llvm; @@ -68,7 +68,7 @@ } AU.setPreservesAll(); } - void print(std::ostream &O, const Module *M) const {} + void print(llvm::raw_ostream &O, const Module *M) const {} private: void verify(const DSGraph* G); @@ -87,8 +87,8 @@ DSGC::DSGC() : FunctionPass((intptr_t)&ID) { if (!AbortIfAnyCollapsed && AbortIfCollapsed.empty() && CheckFlags.empty() && AbortIfMerged.empty()) { - cerr << "The -datastructure-gc is useless if you don't specify any" - << " -dsgc-* options. See the -help-hidden output for a list.\n"; + errs() << "The -datastructure-gc is useless if you don't specify any" + << " -dsgc-* options. See the -help-hidden output for a list.\n"; abort(); } } @@ -126,8 +126,8 @@ for (DSGraph::node_const_iterator I = G->node_begin(), E = G->node_end(); I != E; ++I) if (I->isNodeCompletelyFolded()) { - cerr << "Node is collapsed: "; - I->print(cerr, G); + errs() << "Node is collapsed: "; + I->print(errs(), G); abort(); } } @@ -145,8 +145,8 @@ E = CheckFlags.end(); I != E; ++I) { std::string::size_type ColonPos = I->rfind(':'); if (ColonPos == std::string::npos) { - cerr << "Error: '" << *I - << "' is an invalid value for the --dsgc-check-flags option!\n"; + errs() << "Error: '" << *I + << "' is an invalid value for the --dsgc-check-flags option!\n"; abort(); } @@ -161,7 +161,7 @@ case 'M': Flags |= DSNode::ModifiedNode; break; case 'R': Flags |= DSNode::ReadNode; break; case 'A': Flags |= DSNode::ArrayNode; break; - default: cerr << "Invalid DSNode flag!\n"; abort(); + default: errs() << "Invalid DSNode flag!\n"; abort(); } CheckFlagsM[std::string(I->begin(), I->begin()+ColonPos)] = Flags; } @@ -179,25 +179,25 @@ // Verify it is not collapsed if it is not supposed to be... if (N->isNodeCompletelyFolded() && AbortIfCollapsedS.count(Name)) { - cerr << "Node for value '%" << Name << "' is collapsed: "; - N->print(cerr, G); + errs() << "Node for value '%" << Name << "' is collapsed: "; + N->print(errs(), G); abort(); } if (CheckFlagsM.count(Name) && CheckFlagsM[Name] != N->getNodeFlags()) { - cerr << "Node flags are not as expected for node: " << Name - << " (" << CheckFlagsM[Name] << ":" <getNodeFlags() - << ")\n"; - N->print(cerr, G); + errs() << "Node flags are not as expected for node: " << Name + << " (" << CheckFlagsM[Name] << ":" <getNodeFlags() + << ")\n"; + N->print(errs(), G); abort(); } // Verify that it is not merged if it is not supposed to be... if (AbortIfMergedS.count(Name)) { if (AbortIfMergedNodes.count(N)) { - cerr << "Nodes for values '%" << Name << "' and '%" - << AbortIfMergedNodes[N] << "' is merged: "; - N->print(cerr, G); + errs() << "Nodes for values '%" << Name << "' and '%" + << AbortIfMergedNodes[N] << "' is merged: "; + N->print(errs(), G); abort(); } AbortIfMergedNodes[N] = Name; Modified: poolalloc/trunk/lib/DSA/Local.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/Local.cpp?rev=97715&r1=97714&r2=97715&view=diff ============================================================================== --- poolalloc/trunk/lib/DSA/Local.cpp (original) +++ poolalloc/trunk/lib/DSA/Local.cpp Wed Mar 3 20:28:41 2010 @@ -29,6 +29,7 @@ #include "llvm/ADT/DenseSet.h" #include +#include // FIXME: This should eventually be a FunctionPass that is automatically // aggregated into a Pass. @@ -40,6 +41,9 @@ static RegisterPass X("dsa-local", "Local Data Structure Analysis"); +static cl::opt hasMagicSections("dsa-magic-sections", + cl::desc("File with section to global mapping")); //, cl::ReallyHidden); + namespace { //===--------------------------------------------------------------------===// // GraphBuilder Class @@ -88,16 +92,18 @@ // Visitor functions, used to handle each instruction type we encounter... friend class InstVisitor; - void visitMallocInst(MallocInst &MI) - { setDestTo(MI, createNode()->setHeapMarker()); } + //FIXME: implement in stdlib pass +// void visitMallocInst(MallocInst &MI) +// { setDestTo(MI, createNode()->setHeapMarker()); } void visitAllocaInst(AllocaInst &AI) { setDestTo(AI, createNode()->setAllocaMarker()); } - void visitFreeInst(FreeInst &FI) - { if (DSNode *N = getValueDest(FI.getOperand(0)).getNode()) - N->setHeapMarker(); - } + //FIXME: implement in stdlib pass + //void visitFreeInst(FreeInst &FI) + //{ if (DSNode *N = getValueDest(FI.getOperand(0)).getNode()) +// N->setHeapMarker(); +// } //the simple ones void visitPHINode(PHINode &PN); @@ -145,16 +151,19 @@ // If there are any constant globals referenced in this function, merge // their initializers into the local graph from the globals graph. - if (g.getScalarMap().global_begin() != g.getScalarMap().global_end()) { + // This resolves indirect calls in some common cases + // Only merge info for nodes that already exist in the local pass + // otherwise leaf functions could contain less collapsing than the globals + // graph + if (g.getScalarMap().global_begin() != g.getScalarMap().global_end()) { ReachabilityCloner RC(&g, g.getGlobalsGraph(), 0); - for (DSScalarMap::global_iterator I = g.getScalarMap().global_begin(); I != g.getScalarMap().global_end(); ++I) - if (const GlobalVariable *GV = dyn_cast(*I)) - if (!GV->isDeclaration() && GV->isConstant()) + if (const GlobalVariable * GV = dyn_cast (*I)) + //if (GV->isConstant()) RC.merge(g.getNodeForValue(GV), g.getGlobalsGraph()->getNodeForValue(GV)); } - + g.markIncompleteNodes(DSGraph::MarkFormalArgs); // Remove any nodes made dead due to merging... @@ -167,6 +176,7 @@ {} void mergeInGlobalInitializer(GlobalVariable *GV); + void mergeExternalGlobal(GlobalVariable* GV); void mergeFunction(Function* F) { getValueDest(F); } }; @@ -216,6 +226,8 @@ // Create a new global node for this global variable. N = createNode(GV->getType()->getElementType()); N->addGlobal(GV); + if (GV->isDeclaration()) + N->setExternGlobalMarker(); } else if (Function* GV = dyn_cast(V)) { // Create a new global node for this function. N = createNode(); @@ -642,11 +654,7 @@ ->foldNodeCompletely(); return true; case Intrinsic::vaend: - case Intrinsic::dbg_func_start: - case Intrinsic::dbg_region_end: - case Intrinsic::dbg_stoppoint: - case Intrinsic::dbg_region_start: - case Intrinsic::dbg_declare: + case Intrinsic::memory_barrier: return true; // noop case Intrinsic::memcpy: case Intrinsic::memmove: { @@ -703,10 +711,6 @@ - case Intrinsic::eh_selector_i32: - case Intrinsic::eh_selector_i64: - case Intrinsic::eh_typeid_for_i32: - case Intrinsic::eh_typeid_for_i64: case Intrinsic::prefetch: return true; @@ -746,9 +750,8 @@ // Special case handling of certain libc allocation functions here. if (Function *F = dyn_cast(Callee)) - if (F->isDeclaration()) - if (F->isIntrinsic() && visitIntrinsic(CS, F)) - return; + if (F->isIntrinsic() && visitIntrinsic(CS, F)) + return; // Set up the return value... DSNodeHandle RetVal; @@ -821,7 +824,7 @@ return; } - if (Ty->isIntOrIntVector() || Ty->isFPOrFPVector()) return; + if (Ty->isIntOrIntVectorTy() || Ty->isFPOrFPVectorTy()) return; const TargetData &TD = NH.getNode()->getTargetData(); @@ -858,6 +861,57 @@ MergeConstantInitIntoNode(NH, GV->getType()->getElementType(), GV->getInitializer()); } +void GraphBuilder::mergeExternalGlobal(GlobalVariable *GV) { + // Get a node handle to the global node and merge the initializer into it. + DSNodeHandle NH = getValueDest(GV); +} + +// some evil programs use sections as linker generated arrays +// read a description of this behavior in and apply it +// format: numglobals section globals... +// terminates when numglobals == 0 +void handleMagicSections(DSGraph* GlobalsGraph, Module& M) { + std::ifstream msf(hasMagicSections.c_str(), std::ifstream::in); + if (msf.good()) { + //no checking happens here + unsigned count = 0; + msf >> count; + while (count) { + std::string section; + msf >> section; + std::set inSection; + for (Module::iterator MI = M.begin(), ME = M.end(); + MI != ME; ++MI) + if (MI->hasSection() && MI->getSection() == section) + inSection.insert(MI); + for (Module::global_iterator MI = M.global_begin(), ME = M.global_end(); + MI != ME; ++MI) + if (MI->hasSection() && MI->getSection() == section) + inSection.insert(MI); + + for (unsigned x = 0; x < count; ++x) { + std::string global; + msf >> global; + Value* V = M.getNamedValue(global); + if (V) { + DSNodeHandle& DHV = GlobalsGraph->getNodeForValue(V); + for (std::set::iterator SI = inSection.begin(), + SE = inSection.end(); SI != SE; ++SI) { + DEBUG(errs() << "Merging " << V->getNameStr() << " with " + << (*SI)->getNameStr() << "\n"); + GlobalsGraph->getNodeForValue(*SI).mergeWith(DHV); + } + //DHV.getNode()->dump(); + } + } + msf >> count; + } + } else { + errs() << "Failed to open magic sections file:" << hasMagicSections << + "\n"; + } +} + char LocalDataStructures::ID; bool LocalDataStructures::runOnModule(Module &M) { @@ -870,13 +924,18 @@ // Add initializers for all of the globals to the globals graph. for (Module::global_iterator I = M.global_begin(), E = M.global_end(); I != E; ++I) - if (!I->isDeclaration()) + if (I->isDeclaration()) + GGB.mergeExternalGlobal(I); + else GGB.mergeInGlobalInitializer(I); // Add Functions to the globals graph. for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I) - if (!I->isDeclaration() && I->hasAddressTaken()) + if (I->hasAddressTaken()) GGB.mergeFunction(I); } + + if (hasMagicSections.size()) + handleMagicSections(GlobalsGraph, M); // Next step, iterate through the nodes in the globals graph, unioning // together the globals into equivalence classes. @@ -892,6 +951,8 @@ propagateUnknownFlag(G); } + + GlobalsGraph->removeTriviallyDeadNodes(); GlobalsGraph->markIncompleteNodes(DSGraph::MarkFormalArgs); Modified: poolalloc/trunk/lib/DSA/Printer.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/Printer.cpp?rev=97715&r1=97714&r2=97715&view=diff ============================================================================== --- poolalloc/trunk/lib/DSA/Printer.cpp (original) +++ poolalloc/trunk/lib/DSA/Printer.cpp Wed Mar 3 20:28:41 2010 @@ -21,12 +21,9 @@ #include "llvm/Assembly/Writer.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/GraphWriter.h" -#include "llvm/Support/Streams.h" #include "llvm/ADT/Statistic.h" #include "llvm/Config/config.h" #include "llvm/Support/FormattedStream.h" -#include -#include #include using namespace llvm; @@ -34,14 +31,14 @@ // printing of only the graph for "main". // namespace { - cl::opt OnlyPrintMain("only-print-main-ds", cl::ReallyHidden); + cl::list OnlyPrint("dsa-only-print", cl::ReallyHidden); cl::opt DontPrintAnything("dont-print-ds", cl::ReallyHidden); cl::opt LimitPrint("dsa-limit-print", cl::Hidden); STATISTIC (MaxGraphSize , "Maximum graph size"); STATISTIC (NumFoldedNodes , "Number of folded nodes (in final graph)"); } -void DSNode::dump() const { print(cerr, 0); } +void DSNode::dump() const { print(errs(), 0); } static std::string getCaption(const DSNode *N, const DSGraph *G) { std::string empty; @@ -115,6 +112,8 @@ namespace llvm { template<> struct DOTGraphTraits : public DefaultDOTGraphTraits { + DOTGraphTraits(bool& b) {} + DOTGraphTraits() {} static std::string getGraphName(const DSGraph *G) { switch (G->getReturnNodes().size()) { case 0: return G->getFunctionNames(); @@ -124,7 +123,7 @@ } static std::string - getNodeLabel(const DSNode *Node, const DSGraph *Graph, bool ShortNames) { + getNodeLabel(const DSNode* Node, const DSGraph *Graph) { return getCaption(Node, Graph); } @@ -169,9 +168,11 @@ if (!LimitPrint) { // Add scalar nodes to the graph... const DSGraph::ScalarMapTy &VM = G->getScalarMap(); - for (DSGraph::ScalarMapTy::const_iterator I = VM.begin(); I != VM.end();++I) + for (DSGraph::ScalarMapTy::const_iterator I = VM.begin(); + I != VM.end(); ++I) if (!isa(I->first)) { - std::stringstream OS; + std::string OS_str; + llvm::raw_string_ostream OS(OS_str); WriteAsOperand(OS, I->first, false, CurMod); GW.emitSimpleNode(I->first, "", OS.str()); @@ -246,28 +247,29 @@ }; } // end namespace llvm -void DSNode::print(std::ostream &O, const DSGraph *G) const { +void DSNode::print(llvm::raw_ostream &O, const DSGraph *G) const { GraphWriter W(O, G, false); W.writeNode(this); } -void DSGraph::print(std::ostream &O) const { +void DSGraph::print(llvm::raw_ostream &O) const { WriteGraph(O, this, "DataStructures"); } -void DSGraph::writeGraphToFile(std::ostream &O, +void DSGraph::writeGraphToFile(llvm::raw_ostream &O, const std::string &GraphName) const { std::string Filename = GraphName + ".dot"; O << "Writing '" << Filename << "'..."; - std::ofstream F(Filename.c_str()); + std::string Error; + llvm::raw_fd_ostream F(Filename.c_str(), Error); - if (F.good()) { + if (!Error.size()) { print(F); unsigned NumCalls = shouldPrintAuxCalls() ? getAuxFunctionCalls().size() : getFunctionCalls().size(); O << " [" << getGraphSize() << "+" << NumCalls << "]\n"; } else { - O << " error opening file for writing!\n"; + O << " error opening file for writing! " << Error << "\n"; } } @@ -280,7 +282,7 @@ template -static void printCollection(const Collection &C, std::ostream &O, +static void printCollection(const Collection &C, llvm::raw_ostream &O, const Module *M, const std::string &Prefix) { if (M == 0) { O << "Null Module pointer, cannot continue!\n"; @@ -295,7 +297,14 @@ Gr->getAuxFunctionCalls().size() : Gr->getFunctionCalls().size(); bool IsDuplicateGraph = false; - if (I->getName() == "main" || !OnlyPrintMain) { + //if no only print options, print everything + bool doPrint = OnlyPrint.begin() == OnlyPrint.end(); + //otherwise check the name + if (!doPrint) + doPrint = OnlyPrint.end() != + std::find(OnlyPrint.begin(), OnlyPrint.end(), I->getNameStr()); + + if (doPrint) { const Function *SCCFn = Gr->retnodes_begin()->first; if (&*I == SCCFn) { Gr->writeGraphToFile(O, Prefix+I->getNameStr()); @@ -308,8 +317,8 @@ } else { const Function *SCCFn = Gr->retnodes_begin()->first; if (&*I == SCCFn) { - O << "Skipped Writing '" << Prefix+I->getNameStr() << ".dot'... [" - << Gr->getGraphSize() << "+" << NumCalls << "]\n"; +// O << "Skipped Writing '" << Prefix+I->getNameStr() << ".dot'... [" +// << Gr->getGraphSize() << "+" << NumCalls << "]\n"; } else { IsDuplicateGraph = true; // Don't double count node/call nodes. } @@ -331,15 +340,10 @@ DSGraph* GG = C.getGlobalsGraph(); TotalNumNodes += GG->getGraphSize(); TotalCallNodes += GG->getFunctionCalls().size(); - if (!OnlyPrintMain) { - GG->writeGraphToFile(O, Prefix+"GlobalsGraph"); - } else { - O << "Skipped Writing '" << Prefix << "GlobalsGraph.dot'... [" - << GG->getGraphSize() << "+" << GG->getFunctionCalls().size() << "]\n"; - } + GG->writeGraphToFile(O, Prefix + "GlobalsGraph"); O << "\nGraphs contain [" << TotalNumNodes << "+" << TotalCallNodes - << "] nodes total" << std::endl; + << "] nodes total\n"; } @@ -358,8 +362,8 @@ } // print - Print out the analysis results... -void DataStructures::print(std::ostream &O, const Module *M) const { +void DataStructures::print(llvm::raw_ostream &O, const Module *M) const { if (DontPrintAnything) return; printCollection(*this, O, M, printname); - dumpCallGraph(); + //dumpCallGraph(); } Modified: poolalloc/trunk/lib/DSA/Steensgaard.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/Steensgaard.cpp?rev=97715&r1=97714&r2=97715&view=diff ============================================================================== --- poolalloc/trunk/lib/DSA/Steensgaard.cpp (original) +++ poolalloc/trunk/lib/DSA/Steensgaard.cpp Wed Mar 3 20:28:41 2010 @@ -19,6 +19,7 @@ #include "llvm/Analysis/Passes.h" #include "llvm/Module.h" #include "llvm/Support/Debug.h" +#include "llvm/Support/FormattedStream.h" #include using namespace llvm; @@ -33,12 +34,7 @@ // print - Implement the Pass::print method... void -SteensgaardDataStructures::print(OStream O, const Module *M) const { - if (O.stream()) print(*O.stream(), M); -} - -void -SteensgaardDataStructures::print(std::ostream &O, const Module *M) const { +SteensgaardDataStructures::print(llvm::raw_ostream &O, const Module *M) const { assert(ResultGraph && "Result graph has not yet been computed!"); ResultGraph->writeGraphToFile(O, "steensgaards"); } @@ -154,7 +150,7 @@ RC.getClonedNH(GlobalsGraph->getNodeForValue(*I)); - print(DOUT, &M); + print(errs(), &M); return false; } Modified: poolalloc/trunk/lib/DSA/TopDownClosure.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/TopDownClosure.cpp?rev=97715&r1=97714&r2=97715&view=diff ============================================================================== --- poolalloc/trunk/lib/DSA/TopDownClosure.cpp (original) +++ poolalloc/trunk/lib/DSA/TopDownClosure.cpp Wed Mar 3 20:28:41 2010 @@ -45,8 +45,16 @@ char TDDataStructures::ID; char EQTDDataStructures::ID; +TDDataStructures::~TDDataStructures() { + releaseMemory(); +} + +EQTDDataStructures::~EQTDDataStructures() { + releaseMemory(); +} + void TDDataStructures::markReachableFunctionsExternallyAccessible(DSNode *N, - hash_set &Visited) { + std::set &Visited) { if (!N || Visited.count(N)) return; Visited.insert(N); @@ -76,7 +84,7 @@ // arguments are functions which are reachable by global variables in the // globals graph. const DSScalarMap &GGSM = GlobalsGraph->getScalarMap(); - hash_set Visited; + std::set Visited; for (DSScalarMap::global_iterator I=GGSM.global_begin(), E=GGSM.global_end(); I != E; ++I) { DSNode *N = GGSM.find(*I)->second.getNode(); @@ -105,7 +113,7 @@ // We want to traverse the call graph in reverse post-order. To do this, we // calculate a post-order traversal, then reverse it. - hash_set VisitedGraph; + std::set VisitedGraph; std::vector PostOrder; {TIME_REGION(XXX, "td:Compute postorder"); @@ -147,7 +155,7 @@ void TDDataStructures::ComputePostOrder(const Function &F, - hash_set &Visited, + std::set &Visited, std::vector &PostOrder) { if (F.isDeclaration()) return; DSGraph* G = getOrCreateGraph(&F); Modified: poolalloc/trunk/lib/PoolAllocate/AccessTrace.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/PoolAllocate/AccessTrace.cpp?rev=97715&r1=97714&r2=97715&view=diff ============================================================================== --- poolalloc/trunk/lib/PoolAllocate/AccessTrace.cpp (original) +++ poolalloc/trunk/lib/PoolAllocate/AccessTrace.cpp Wed Mar 3 20:28:41 2010 @@ -63,8 +63,8 @@ } void PoolAccessTrace::InitializeLibraryFunctions(Module &M) { - const IntegerType * IT = IntegerType::getInt8Ty(getGlobalContext()); - const Type * VoidType = Type::getVoidTy(getGlobalContext()); + const IntegerType * IT = IntegerType::getInt8Ty(M.getContext()); + const Type * VoidType = Type::getVoidTy(M.getContext()); VoidPtrTy = PointerType::getUnqual(IT); AccessTraceInitFn = M.getOrInsertFunction("poolaccesstraceinit", Modified: poolalloc/trunk/lib/PoolAllocate/Heuristic.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/PoolAllocate/Heuristic.cpp?rev=97715&r1=97714&r2=97715&view=diff ============================================================================== --- poolalloc/trunk/lib/PoolAllocate/Heuristic.cpp (original) +++ poolalloc/trunk/lib/PoolAllocate/Heuristic.cpp Wed Mar 3 20:28:41 2010 @@ -19,6 +19,7 @@ #include "llvm/Module.h" #include "llvm/ADT/DepthFirstIterator.h" #include "llvm/Support/CommandLine.h" +#include "llvm/Support/FormattedStream.h" #include "llvm/Target/TargetData.h" #include using namespace llvm; @@ -80,7 +81,7 @@ // Doubles always want to be 8-byte aligned. if (Ty == Type::DoubleTy) return true; #else - if (Ty->isFloatingPoint()) return true; + if (Ty->isFloatingPointTy()) return true; #endif // If we are on a 64-bit system, we want to align 8-byte integers and @@ -102,7 +103,7 @@ } else if (const SequentialType *STy = dyn_cast(Ty)) { return Wants8ByteAlignment(STy->getElementType(), Offs, TD); } else { - std::cerr << *Ty << "\n"; + errs() << *Ty << "\n"; assert(0 && "Unknown type!"); } return false; @@ -110,8 +111,7 @@ unsigned Heuristic::getRecommendedAlignment(const Type *Ty, const TargetData &TD) { - const Type * VoidType = Type::getVoidTy(getGlobalContext()); - if (Ty == VoidType) // Is this void or collapsed? + if (!Ty || Ty->isVoidTy()) // Is this void or collapsed? return 0; // No known alignment, let runtime decide. return Wants8ByteAlignment(Ty, 0, TD) ? 8 : 4; @@ -121,8 +121,7 @@ /// DSNode. /// unsigned Heuristic::getRecommendedAlignment(const DSNode *N) { - const Type * VoidType = Type::getVoidTy(getGlobalContext()); - if (N->getType() == VoidType) // Is this void or collapsed? + if (!N->getType() || N->getType()->isVoidTy()) // Is this void or collapsed? return 0; // No known alignment, let runtime decide. const TargetData &TD = N->getParentGraph()->getTargetData(); Modified: poolalloc/trunk/lib/PoolAllocate/PAMultipleGlobalPool.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/PoolAllocate/PAMultipleGlobalPool.cpp?rev=97715&r1=97714&r2=97715&view=diff ============================================================================== --- poolalloc/trunk/lib/PoolAllocate/PAMultipleGlobalPool.cpp (original) +++ poolalloc/trunk/lib/PoolAllocate/PAMultipleGlobalPool.cpp Wed Mar 3 20:28:41 2010 @@ -34,6 +34,7 @@ #include "llvm/ADT/STLExtras.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/Debug.h" +#include "llvm/Support/FormattedStream.h" #include "llvm/Support/Timer.h" #include @@ -135,7 +136,9 @@ for (Function::iterator i = F.begin(), e = F.end(); i != e; ++i) for (BasicBlock::iterator ii = i->begin(), ee = i->end(); ii != ee; ++ii) { - if (MallocInst * MI = dyn_cast(ii)) { +//FIXME: Handle malloc here + if (false) { //MallocInst * MI = dyn_cast(ii)) { +#if 0 // Associate the global pool decriptor with the DSNode DSNode * Node = ECG->getNodeForValue(MI).getNode(); GlobalVariable * Pool = PoolMap[Node]; @@ -170,7 +173,7 @@ DSNodeHandle NH = SM[ii]; SM.erase(ii); SM[casted] = SM[x] = NH; - + #endif } else if (CallInst * CI = dyn_cast(ii)) { CallSite CS(CI); Function *CF = CS.getCalledFunction(); @@ -308,7 +311,9 @@ SM.erase(CI); SM[Casted] = SM[V] = NH; } - } else if (FreeInst * FI = dyn_cast(ii)) { + //FIXME: handle Frees +#if 0 + } else if (FreeInst * FI = dyn_cast (ii)) { Type * VoidPtrTy = PointerType::getUnqual(Int8Type); Value * FreedNode = castTo (FI->getPointerOperand(), VoidPtrTy, "cast", ii); DSNode * Node = ECG->getNodeForValue(FI->getPointerOperand()).getNode(); @@ -321,6 +326,7 @@ DSNodeHandle NH = SM[ii]; SM.erase(ii); SM[CI] = NH; + #endif } else if (isa(ii)) { Returns.push_back(cast(ii)); } @@ -357,7 +363,7 @@ BasicBlock * BB = BasicBlock::Create(getGlobalContext(), "entry", InitFunc); - SteensgaardDataStructures * DS = dynamic_cast(Graphs); + SteensgaardDataStructures * DS = (SteensgaardDataStructures*)Graphs; assert (DS && "PoolAllocateMultipleGlobalPools requires Steensgaard Data Structure!"); @@ -398,8 +404,8 @@ GlobalVariable *GV = new GlobalVariable (M, - getPoolType(), false, GlobalValue::ExternalLinkage, - ConstantAggregateZero::get(getPoolType()), "__poolalloc_GlobalPool"); + getPoolType(&M.getContext()), false, GlobalValue::ExternalLinkage, + ConstantAggregateZero::get(getPoolType(&M.getContext())), "__poolalloc_GlobalPool"); Value *ElSize = ConstantInt::get(Int32Type, RecSize); Value *AlignV = ConstantInt::get(Int32Type, Align); @@ -424,15 +430,15 @@ } void -PoolAllocateMultipleGlobalPool::print(std::ostream &OS, const Module * M) const { +PoolAllocateMultipleGlobalPool::print(llvm::raw_ostream &OS, const Module * M) const { for (PoolMapTy::const_iterator I = PoolMap.begin(), E = PoolMap.end(); I != E; ++I) { - OS << I->first << " -> " << I->second->getNameStr() << "\n"; - } + OS << I->first << " -> " << I->second->getName() << "\n"; + } } void PoolAllocateMultipleGlobalPool::dump() const { - print (std::cerr, currentModule); + print (errs(), currentModule); } PoolAllocateMultipleGlobalPool::~PoolAllocateMultipleGlobalPool() {} Modified: poolalloc/trunk/lib/PoolAllocate/PASimple.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/PoolAllocate/PASimple.cpp?rev=97715&r1=97714&r2=97715&view=diff ============================================================================== --- poolalloc/trunk/lib/PoolAllocate/PASimple.cpp (original) +++ poolalloc/trunk/lib/PoolAllocate/PASimple.cpp Wed Mar 3 20:28:41 2010 @@ -107,9 +107,9 @@ // // Get pointers to 8 and 32 bit LLVM integer types. // - VoidType = Type::getVoidTy(getGlobalContext()); - Int8Type = IntegerType::getInt8Ty(getGlobalContext()); - Int32Type = IntegerType::getInt32Ty(getGlobalContext()); + VoidType = Type::getVoidTy(M.getContext()); + Int8Type = IntegerType::getInt8Ty(M.getContext()); + Int32Type = IntegerType::getInt32Ty(M.getContext()); // Get the Target Data information and the Graphs if (CompleteDSA) { @@ -173,7 +173,10 @@ for (Function::iterator i = F.begin(), e = F.end(); i != e; ++i) for (BasicBlock::iterator ii = i->begin(), ee = i->end(); ii != ee; ++ii) { - if (MallocInst * MI = dyn_cast(ii)) { + if (false) { + //FIXME: malloc +#if 0 + if (MallocInst * MI = dyn_cast(ii)) { // Associate the global pool decriptor with the DSNode DSNode * Node = ECG->getNodeForValue(MI).getNode(); FInfo.PoolDescriptors.insert(std::make_pair(Node,TheGlobalPool)); @@ -201,6 +204,7 @@ Value* args[] = {TheGlobalPool, AllocSize}; Instruction* x = CallInst::Create(PoolAlloc, &args[0], &args[2], MI->getName(), ii); ii->replaceAllUsesWith(CastInst::CreatePointerCast(x, ii->getType(), "", ii)); + #endif } else if (CallInst * CI = dyn_cast(ii)) { CallSite CS(CI); Function *CF = CS.getCalledFunction(); @@ -325,12 +329,15 @@ // Update def-use info CI->replaceAllUsesWith(Casted); } + //FIXME: free + #if 0 } else if (FreeInst * FI = dyn_cast(ii)) { Type * VoidPtrTy = PointerType::getUnqual(Int8Type); Value * FreedNode = castTo (FI->getPointerOperand(), VoidPtrTy, "cast", ii); toDelete.push_back(ii); Value* args[] = {TheGlobalPool, FreedNode}; CallInst::Create(PoolFree, &args[0], &args[2], "", ii); + #endif } else if (isa(ii)) { Returns.push_back(cast(ii)); } @@ -361,20 +368,20 @@ Module& M) { GlobalVariable *GV = new GlobalVariable(M, - getPoolType(), false, GlobalValue::ExternalLinkage, - ConstantAggregateZero::get(getPoolType()), + getPoolType(&M.getContext()), false, GlobalValue::ExternalLinkage, + ConstantAggregateZero::get(getPoolType(&M.getContext())), "__poolalloc_GlobalPool"); Function *InitFunc = Function::Create (FunctionType::get(VoidType, std::vector(), false), GlobalValue::ExternalLinkage, "__poolalloc_init", &M); - BasicBlock * BB = BasicBlock::Create(getGlobalContext(), "entry", InitFunc); + BasicBlock * BB = BasicBlock::Create(M.getContext(), "entry", InitFunc); Value *ElSize = ConstantInt::get(Int32Type, RecSize); Value *AlignV = ConstantInt::get(Int32Type, Align); Value* Opts[3] = {GV, ElSize, AlignV}; CallInst::Create(PoolInit, Opts, Opts + 3, "", BB); - ReturnInst::Create(getGlobalContext(), BB); + ReturnInst::Create(M.getContext(), BB); return GV; } Modified: poolalloc/trunk/lib/PoolAllocate/PoolAllocate.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/PoolAllocate/PoolAllocate.cpp?rev=97715&r1=97714&r2=97715&view=diff ============================================================================== --- poolalloc/trunk/lib/PoolAllocate/PoolAllocate.cpp (original) +++ poolalloc/trunk/lib/PoolAllocate/PoolAllocate.cpp Wed Mar 3 20:28:41 2010 @@ -33,10 +33,9 @@ #include "llvm/ADT/STLExtras.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/Debug.h" +#include "llvm/Support/FormattedStream.h" #include "llvm/Support/Timer.h" -#include - using namespace llvm; using namespace PA; @@ -106,9 +105,9 @@ // // Get pointers to 8 and 32 bit LLVM integer types. // - VoidType = Type::getVoidTy(getGlobalContext()); - Int8Type = IntegerType::getInt8Ty(getGlobalContext()); - Int32Type = IntegerType::getInt32Ty(getGlobalContext()); + VoidType = Type::getVoidTy(M.getContext()); + Int8Type = IntegerType::getInt8Ty(M.getContext()); + Int32Type = IntegerType::getInt32Ty(M.getContext()); // // Get references to the DSA information. For SAFECode, we need Top-Down @@ -222,7 +221,7 @@ if (VoidPtrTy == 0) { // NOTE: If these are changed, make sure to update PoolOptimize.cpp as well! VoidPtrTy = PointerType::getUnqual(Int8Type); - PoolDescType = getPoolType(); + PoolDescType = getPoolType(&M->getContext()); PoolDescPtrTy = PointerType::getUnqual(PoolDescType); } @@ -303,7 +302,7 @@ if (isa(User->getOperand(1)) && cast(User->getOperand(1))->isNullValue()) { bool CondIsTrue = ICI->getPredicate() == ICmpInst::ICMP_NE; - const Type * Int1Type = IntegerType::getInt1Ty(getGlobalContext()); + const Type * Int1Type = IntegerType::getInt1Ty(*Context); User->replaceAllUsesWith(ConstantInt::get(Int1Type, CondIsTrue)); } } else if ((User->getOpcode() == Instruction::Trunc) || @@ -339,7 +338,7 @@ CallInst *CI = Calls[i]; // poolalloc never returns null. Loop over all uses of the call looking for // set(eq|ne) X, null. - OptimizePointerNotNull(CI, &getGlobalContext()); + OptimizePointerNotNull(CI, &CI->getContext()); } // TODO: poolfree accepts a null pointer, so remove any check above it, like @@ -350,13 +349,13 @@ static void GetNodesReachableFromGlobals(DSGraph* G, - hash_set &NodesFromGlobals) { + std::set &NodesFromGlobals) { for (DSScalarMap::global_iterator I = G->getScalarMap().global_begin(), E = G->getScalarMap().global_end(); I != E; ++I) G->getNodeForValue(*I).getNode()->markReachableNodes(NodesFromGlobals); } -static void MarkNodesWhichMustBePassedIn(hash_set &MarkedNodes, +static void MarkNodesWhichMustBePassedIn(std::set &MarkedNodes, Function &F, DSGraph* G, bool PassAllArguments) { // Mark globals and incomplete nodes as live... (this handles arguments) @@ -378,14 +377,14 @@ // Calculate which DSNodes are reachable from globals. If a node is reachable // from a global, we will create a global pool for it, so no argument passage // is required. - hash_set NodesFromGlobals; + std::set NodesFromGlobals; GetNodesReachableFromGlobals(G, NodesFromGlobals); // Remove any nodes reachable from a global. These nodes will be put into // global pools, which do not require arguments to be passed in. Also, erase // any marked node that is not a heap node. Since no allocations or frees // will be done with it, it needs no argument. - for (hash_set::iterator I = MarkedNodes.begin(), + for (std::set::iterator I = MarkedNodes.begin(), E = MarkedNodes.end(); I != E; ) { const DSNode *N = *I++; if ((!(1 || N->isHeapNode()) && !PassAllArguments) || NodesFromGlobals.count(N)) @@ -403,7 +402,7 @@ // Create a new entry for F. FuncInfo &FI = FunctionInfo.insert(std::make_pair(&F, FuncInfo(F))).first->second; - hash_set &MarkedNodes = FI.MarkedNodes; + std::set &MarkedNodes = FI.MarkedNodes; if (G->node_begin() == G->node_end()) return; // No memory activity, nothing is required @@ -476,7 +475,7 @@ } // Perform the cloning. - std::vector Returns; + SmallVector Returns; CloneFunctionInto(New, &F, ValueMap, Returns); // @@ -528,13 +527,13 @@ DSGraph* GG = Graphs->getGlobalsGraph(); // Get all of the nodes reachable from globals. - hash_set GlobalHeapNodes; + std::set GlobalHeapNodes; GetNodesReachableFromGlobals(GG, GlobalHeapNodes); // Filter out all nodes which have no heap allocations merged into them. - for (hash_set::iterator I = GlobalHeapNodes.begin(), + for (std::set::iterator I = GlobalHeapNodes.begin(), E = GlobalHeapNodes.end(); I != E; ) { - hash_set::iterator Last = I++; + std::set::iterator Last = I++; #if 0 // @@ -549,7 +548,7 @@ #endif const DSNode *tmp = *Last; - // std::cerr << "test \n"; + // errs() << "test \n"; if (!(tmp->isHeapNode() || tmp->isArray())) GlobalHeapNodes.erase(Last); } @@ -557,12 +556,12 @@ // Otherwise get the main function to insert the poolinit calls. Function *MainFunc = M.getFunction("main"); if (MainFunc == 0 || MainFunc->isDeclaration()) { - std::cerr << "Cannot pool allocate this program: it has global " + errs() << "Cannot pool allocate this program: it has global " << "pools but no 'main' function yet!\n"; return true; } - std::cerr << "Pool allocating " << GlobalHeapNodes.size() + errs() << "Pool allocating " << GlobalHeapNodes.size() << " global nodes!\n"; @@ -591,7 +590,7 @@ } // Any unallocated DSNodes get null pool descriptor pointers. - for (hash_set::iterator I = GlobalHeapNodes.begin(), + for (std::set::iterator I = GlobalHeapNodes.begin(), E = GlobalHeapNodes.end(); I != E; ++I) { GlobalNodes[*I] = ConstantPointerNull::get(PointerType::getUnqual(PoolDescType)); ++NumNonprofit; @@ -705,7 +704,7 @@ if (G->node_begin() == G->node_end()) return; // Quick exit if nothing to do. FuncInfo &FI = *getFuncInfo(F); - hash_set &MarkedNodes = FI.MarkedNodes; + std::set &MarkedNodes = FI.MarkedNodes; // Calculate which DSNodes are reachable from globals. If a node is reachable // from a global, we will create a global pool for it, so no argument passage @@ -738,11 +737,11 @@ } if (!FI.NodesToPA.empty()) { - std::cerr << "[" << F.getNameStr() << "] " << FI.NodesToPA.size() + errs() << "[" << F.getNameStr() << "] " << FI.NodesToPA.size() << " nodes pool allocatable\n"; CreatePools(NewF, G, FI.NodesToPA, FI.PoolDescriptors); } else { - DEBUG(std::cerr << "[" << F.getNameStr() << "] transforming body.\n"); + DEBUG(errs() << "[" << F.getNameStr() << "] transforming body.\n"); } // Transform the body of the function now... collecting information about uses @@ -844,12 +843,12 @@ InitializedBefore.clear(); DestroyedAfter.clear(); - DEBUG(std::cerr << "POOL: " << PD->getNameStr() << " information:\n"); - DEBUG(std::cerr << " Live in blocks: "); + DEBUG(errs() << "POOL: " << PD->getNameStr() << " information:\n"); + DEBUG(errs() << " Live in blocks: "); DEBUG(for (std::set::iterator I = LiveBlocks.begin(), E = LiveBlocks.end(); I != E; ++I) - std::cerr << (*I)->getNameStr() << " "); - DEBUG(std::cerr << "\n"); + errs() << (*I)->getNameStr() << " "); + DEBUG(errs() << "\n"); std::vector PoolInitPoints; @@ -951,7 +950,7 @@ } } - DEBUG(std::cerr << " Init in blocks: "); + DEBUG(errs() << " Init in blocks: "); // Insert the calls to initialize the pool. unsigned ElSizeV = Heuristic::getRecommendedSize(Node); @@ -962,18 +961,18 @@ for (unsigned i = 0, e = PoolInitPoints.size(); i != e; ++i) { Value* Opts[3] = {PD, ElSize, Align}; CallInst::Create(PoolInit, Opts, Opts + 3, "", PoolInitPoints[i]); - DEBUG(std::cerr << PoolInitPoints[i]->getParent()->getNameStr() << " "); + DEBUG(errs() << PoolInitPoints[i]->getParent()->getNameStr() << " "); } - DEBUG(std::cerr << "\n Destroy in blocks: "); + DEBUG(errs() << "\n Destroy in blocks: "); // Loop over all of the places to insert pooldestroy's... for (unsigned i = 0, e = PoolDestroyPoints.size(); i != e; ++i) { // Insert the pooldestroy call for this pool. CallInst::Create(PoolDestroy, PD, "", PoolDestroyPoints[i]); - DEBUG(std::cerr << PoolDestroyPoints[i]->getParent()->getNameStr()<<" "); + DEBUG(errs() << PoolDestroyPoints[i]->getParent()->getNameStr()<<" "); } - DEBUG(std::cerr << "\n\n"); + DEBUG(errs() << "\n\n"); // We are allowed to delete any poolfree's which occur between the last // call to poolalloc, and the call to pooldestroy. Figure out which Modified: poolalloc/trunk/lib/PoolAllocate/PoolOptimize.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/PoolAllocate/PoolOptimize.cpp?rev=97715&r1=97714&r2=97715&view=diff ============================================================================== --- poolalloc/trunk/lib/PoolAllocate/PoolOptimize.cpp (original) +++ poolalloc/trunk/lib/PoolAllocate/PoolOptimize.cpp Wed Mar 3 20:28:41 2010 @@ -62,9 +62,9 @@ // // Get pointers to 8 and 32 bit LLVM integer types. // - VoidType = Type::getVoidTy(getGlobalContext()); - Int8Type = IntegerType::getInt8Ty(getGlobalContext()); - Int32Type = IntegerType::getInt32Ty(getGlobalContext()); + VoidType = Type::getVoidTy(M.getContext()); + Int8Type = IntegerType::getInt8Ty(M.getContext()); + Int32Type = IntegerType::getInt32Ty(M.getContext()); // // Create LLVM types used by the pool allocation passes. @@ -165,10 +165,13 @@ // poolalloc(null, X) -> malloc(X) if (isa(CI->getOperand(1)) && cast(CI->getOperand(1))->isNullValue()) { +//FIXME: handle malloc + #if 0 Value *New = new MallocInst(Int8Type, CI->getOperand(2), CI->getName(), CI); CI->replaceAllUsesWith(New); CI->eraseFromParent(); + #endif } } @@ -194,8 +197,9 @@ CI->eraseFromParent(); else if (isa(CI->getOperand(1))) { // poolfree(null, Ptr) -> free(Ptr) - new FreeInst(CI->getOperand(2), CI); - CI->eraseFromParent(); + //FIXME: Handle free + //new FreeInst(CI->getOperand(2), CI); + //CI->eraseFromParent(); } } Modified: poolalloc/trunk/lib/PoolAllocate/RunTimeAssociate.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/PoolAllocate/RunTimeAssociate.cpp?rev=97715&r1=97714&r2=97715&view=diff ============================================================================== --- poolalloc/trunk/lib/PoolAllocate/RunTimeAssociate.cpp (original) +++ poolalloc/trunk/lib/PoolAllocate/RunTimeAssociate.cpp Wed Mar 3 20:28:41 2010 @@ -32,10 +32,9 @@ #include "llvm/ADT/STLExtras.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/Debug.h" +#include "llvm/Support/FormattedStream.h" -#include "EntryPointAnalysis.h" - -#include +#include "dsa/EntryPointAnalysis.h" using namespace llvm; using namespace rPA; @@ -57,13 +56,13 @@ //////////////////////////////////////////////////////////////////////////////// static void GetNodesReachableFromGlobals(DSGraph* G, - hash_set &NodesFromGlobals) { + std::set &NodesFromGlobals) { for (DSScalarMap::global_iterator I = G->getScalarMap().global_begin(), E = G->getScalarMap().global_end(); I != E; ++I) G->getNodeForValue(*I).getNode()->markReachableNodes(NodesFromGlobals); } -static void MarkNodesWhichMustBePassedIn(hash_set &MarkedNodes, +static void MarkNodesWhichMustBePassedIn(std::set &MarkedNodes, Function &F, DSGraph* G, EntryPointAnalysis* EPA) { // All DSNodes reachable from arguments must be passed in... @@ -85,13 +84,13 @@ // Calculate which DSNodes are reachable from globals. If a node is reachable // from a global, we will create a global pool for it, so no argument passage // is required. - hash_set NodesFromGlobals; + std::set NodesFromGlobals; GetNodesReachableFromGlobals(G, NodesFromGlobals); // Remove any nodes reachable from a global. These nodes will be put into // global pools, which do not require arguments to be passed in. - for (hash_set::iterator I = NodesFromGlobals.begin(), + for (std::set::iterator I = NodesFromGlobals.begin(), E = NodesFromGlobals.end(); I != E; ++I) MarkedNodes.erase(*I); } @@ -102,7 +101,7 @@ /// map and recording this info in the ArgNodes set. static void FindFunctionPoolArgs(Function &F, FuncInfo& FI, EntryPointAnalysis* EPA) { - hash_set MarkedNodes; + std::set MarkedNodes; if (FI.G->node_begin() == FI.G->node_end()) return; // No memory activity, nothing is required @@ -172,7 +171,7 @@ } // Perform the cloning. - std::vector Returns; + SmallVector Returns; CloneFunctionInto(New, &F, ValueMap, Returns); // @@ -210,7 +209,7 @@ : ModulePass((intptr_t) & ID) { } void RTAssociate::getAnalysisUsage(AnalysisUsage &AU) const { - AU.addRequiredTransitive (); + AU.addRequiredTransitive (); AU.addRequired (); } @@ -222,7 +221,7 @@ // DSA. For Automatic Pool Allocation only, we need Bottom-Up DSA. In all // cases, we need to use the Equivalence-Class version of DSA. // - DataStructures* Graphs = &getAnalysis (); + DataStructures* Graphs = &getAnalysis (); EntryPointAnalysis* EPA = &getAnalysis (); // PoolDescType = OpaqueType::get(M.getContext()); @@ -287,10 +286,10 @@ // DSGraph* GG = Graphs->getGlobalsGraph(); // Get all of the nodes reachable from globals. - hash_set GlobalHeapNodes; + std::set GlobalHeapNodes; GetNodesReachableFromGlobals(GG, GlobalHeapNodes); - std::cerr << "Pool allocating " << GlobalHeapNodes.size() + errs() << "Pool allocating " << GlobalHeapNodes.size() << " global nodes!\n"; FuncInfo& FI = makeFuncInfo(0, GG); @@ -356,6 +355,7 @@ // Calculate which DSNodes are reachable from globals. If a node is reachable // from a global, we will create a global pool for it, so no argument passage // is required. + G->getGlobalsGraph(); // Map all node reachable from this global to the corresponding nodes in @@ -414,13 +414,13 @@ CF = cast(CE->getOperand(0)); if (isa(TheCall->getOperand(0))) { - std::cerr << "INLINE ASM: ignoring. Hoping that's safe.\n"; + errs() << "INLINE ASM: ignoring. Hoping that's safe.\n"; return; } // Ignore calls to NULL pointers. if (isa(CS.getCalledValue())) { - std::cerr << "WARNING: Ignoring call using NULL function pointer.\n"; + errs() << "WARNING: Ignoring call using NULL function pointer.\n"; return; } // We need to figure out which local pool descriptors correspond to the pool @@ -438,7 +438,7 @@ // For indirect callees, find any callee since all DS graphs have been // merged. if (CF) { // Direct calls are nice and simple. - DEBUG(std::cerr << " Handling direct call: " << *TheCall); + DEBUG(errs() << " Handling direct call: " << *TheCall); FuncInfo *CFI = getFuncInfo(CF); if (CFI == 0 || CFI->Clone == 0) // Nothing to transform... return; @@ -449,7 +449,7 @@ assert ((DS->hasDSGraph (*CF)) && "Function has no ECGraph!\n"); CalleeGraph = DS->getDSGraph(*CF); } else { - DEBUG(std::cerr << " Handling indirect call: " << *TheCall); + DEBUG(errs() << " Handling indirect call: " << *TheCall); // Here we fill in CF with one of the possible called functions. Because we // merged together all of the arguments to all of the functions in the @@ -478,7 +478,7 @@ for(std::vector::const_iterator ii = g.begin(), ee = g.end(); !CF && ii != ee; ++ii) { for (EquivalenceClasses::member_iterator MI = EC.findLeader(*ii); - MI != EC.member_end(); ++MI) // Loop over members in this set. + MI != EC.member_end(); ++MI) // Loop over members in this set. if ((CF = dyn_cast(*MI))) { break; } @@ -490,6 +490,13 @@ // Do an assert unless we're bugpointing something. // // if ((UsingBugpoint) && (!CF)) return; + if (!CF) + errs() << "No Graph for CallSite in " + << TheCall->getParent()->getParent()->getNameStr() + << " originally " + << OrigInst->getParent()->getParent()->getNameStr() + << "\n"; + assert (CF && "No call graph info"); // Get the common graph for the set of functions this call may invoke. @@ -551,7 +558,7 @@ if (FI.PoolDescriptors.count(LocalNode)) ArgVal = FI.PoolDescriptors.find(LocalNode)->second; if (isa (ArgVal) && cast (ArgVal)->isNullValue()) - std::cerr << "WARNING: NULL POOL ARGUMENTS ARE PASSED IN!\n"; + errs() << "WARNING: NULL POOL ARGUMENTS ARE PASSED IN!\n"; Args.push_back(ArgVal); } @@ -587,7 +594,7 @@ } TheCall->replaceAllUsesWith(NewCall); - DEBUG(std::cerr << " Result Call: " << *NewCall); + DEBUG(errs() << " Result Call: " << *NewCall); if (TheCall->getType()->getTypeID() != Type::VoidTyID) { // If we are modifying the original function, update the DSGraph... Modified: poolalloc/trunk/lib/PoolAllocate/TransformFunctionBody.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/PoolAllocate/TransformFunctionBody.cpp?rev=97715&r1=97714&r2=97715&view=diff ============================================================================== --- poolalloc/trunk/lib/PoolAllocate/TransformFunctionBody.cpp (original) +++ poolalloc/trunk/lib/PoolAllocate/TransformFunctionBody.cpp Wed Mar 3 20:28:41 2010 @@ -23,6 +23,7 @@ #include "llvm/Instructions.h" #include "llvm/Target/TargetData.h" #include "llvm/Support/InstVisitor.h" +#include "llvm/Support/FormattedStream.h" #include "llvm/Support/Debug.h" #include "llvm/ADT/VectorExtras.h" #include @@ -38,14 +39,6 @@ // static bool UsingBugpoint = false; -// -// Variables for referencing LLVM basic types. -// -static const Type * VoidType = 0; -static const Type * Int8Type = 0; -static const Type * Int32Type = 0; -static const Type * Int64Type = 0; - namespace { /// FuncTransform - This class implements transformation required of pool /// allocated functions. @@ -69,13 +62,6 @@ std::multimap &poolFrees) : PAInfo(P), G(g), FI(fi), PoolUses(poolUses), PoolFrees(poolFrees) { - // - // Get pointers to 8 and 32 bit LLVM integer types. - // - VoidType = Type::getVoidTy(getGlobalContext()); - Int8Type = IntegerType::getInt8Ty(getGlobalContext()); - Int32Type = IntegerType::getInt32Ty(getGlobalContext()); - Int64Type = IntegerType::getInt64Ty(getGlobalContext()); } template @@ -85,13 +71,13 @@ } void visitInstruction(Instruction &I); - void visitMallocInst(MallocInst &MI); + //void visitMallocInst(MallocInst &MI); void visitAllocaInst(AllocaInst &MI); void visitCallocCall(CallSite CS); void visitReallocCall(CallSite CS); void visitMemAlignCall(CallSite CS); void visitStrdupCall(CallSite CS); - void visitFreeInst(FreeInst &FI); + //void visitFreeInst(FreeInst &FI); void visitCallSite(CallSite &CS); void visitCallInst(CallInst &CI) { CallSite CS(&CI); @@ -178,8 +164,8 @@ Value *Size) { std::string Name = I->getName(); I->setName(""); - if (Size->getType() != Int32Type) - Size = CastInst::CreateIntegerCast(Size, Int32Type, false, Size->getName(), I); + if (!Size->getType()->isIntegerTy(32)) + Size = CastInst::CreateIntegerCast(Size, Type::getInt32Ty(Size->getType()->getContext()), false, Size->getName(), I); // Insert a call to poolalloc Value *PH = getPoolHandle(I); @@ -222,7 +208,7 @@ return Casted; } - +#if 0 void FuncTransform::visitMallocInst(MallocInst &MI) { // Get the pool handle for the node that this contributes to... Value *PH = getPoolHandle(&MI); @@ -277,6 +263,7 @@ TransformAllocationInstr(&MI, AllocSize); } } +#endif void FuncTransform::visitAllocaInst(AllocaInst &MI) { // Don't do anything if bounds checking will not be done by SAFECode later. @@ -288,7 +275,7 @@ Value *PH = getPoolHandle(&MI); if (PH == 0 || isa(PH)) return; TargetData &TD = PAInfo.getAnalysis(); - Value *AllocSize = ConstantInt::get(Int32Type, TD.getTypeAllocSize(MI.getAllocatedType())); + Value *AllocSize = ConstantInt::get(Type::getInt32Ty(MI.getContext()), TD.getTypeAllocSize(MI.getAllocatedType())); if (MI.isArrayAllocation()) AllocSize = BinaryOperator::Create(Instruction::Mul, AllocSize, @@ -297,7 +284,7 @@ // TransformAllocationInstr(&MI, AllocSize); BasicBlock::iterator InsertPt(MI); ++InsertPt; - Instruction *Casted = CastInst::CreatePointerCast(&MI, PointerType::getUnqual(Int8Type), + Instruction *Casted = CastInst::CreatePointerCast(&MI, PointerType::getUnqual(Type::getInt8Ty(MI.getContext())), MI.getName()+".casted", InsertPt); std::vector args; args.push_back (PH); @@ -316,8 +303,8 @@ // Insert a cast and a call to poolfree... Value *Casted = Arg; - if (Arg->getType() != PointerType::getUnqual(Int8Type)) { - Casted = CastInst::CreatePointerCast(Arg, PointerType::getUnqual(Int8Type), + if (Arg->getType() != PointerType::getUnqual(Type::getInt8Ty(Arg->getContext()))) { + Casted = CastInst::CreatePointerCast(Arg, PointerType::getUnqual(Type::getInt8Ty(Arg->getContext())), Arg->getName()+".casted", Where); G->getScalarMap()[Casted] = G->getScalarMap()[Arg]; } @@ -328,7 +315,7 @@ return FreeI; } - +#if 0 void FuncTransform::visitFreeInst(FreeInst &FrI) { if (Instruction *I = InsertPoolFreeInstr(FrI.getOperand(0), &FrI)) { // Delete the now obsolete free instruction... @@ -345,10 +332,14 @@ } } } - +#endif void FuncTransform::visitCallocCall(CallSite CS) { TargetData& TD = PAInfo.getAnalysis(); + const Type* Int8Type = Type::getInt8Ty(CS.getInstruction()->getContext()); + const Type* Int32Type = Type::getInt32Ty(CS.getInstruction()->getContext()); + const Type* Int64Type = Type::getInt64Ty(CS.getInstruction()->getContext()); + bool useLong = TD.getTypeAllocSize(PointerType::getUnqual(Int8Type)) != 4; Module *M = CS.getInstruction()->getParent()->getParent()->getParent(); @@ -372,7 +363,7 @@ // We just turned the call of 'calloc' into the equivalent of malloc. To // finish calloc, we need to zero out the memory. Constant *MemSet = M->getOrInsertFunction((useLong ? "llvm.memset.i64" : "llvm.memset.i32"), - VoidType, + Type::getVoidTy(M->getContext()), PointerType::getUnqual(Int8Type), Int8Type, (useLong ? Int64Type : Int32Type), Int32Type, NULL); @@ -398,10 +389,10 @@ // Don't poolallocate if we have no pool handle if (PH == 0 || isa(PH)) return; - if (Size->getType() != Int32Type) - Size = CastInst::CreateIntegerCast(Size, Int32Type, false, Size->getName(), I); + if (Size->getType() != Type::getInt32Ty(CS.getInstruction()->getContext())) + Size = CastInst::CreateIntegerCast(Size, Type::getInt32Ty(CS.getInstruction()->getContext()), false, Size->getName(), I); - static Type *VoidPtrTy = PointerType::getUnqual(Int8Type); + static Type *VoidPtrTy = PointerType::getUnqual(Type::getInt8Ty(CS.getInstruction()->getContext())); if (OldPtr->getType() != VoidPtrTy) OldPtr = CastInst::CreatePointerCast(OldPtr, VoidPtrTy, OldPtr->getName(), I); @@ -445,6 +436,10 @@ Value *Size = 0; Value *PH; + const Type* Int8Type = Type::getInt8Ty(CS.getInstruction()->getContext()); + const Type* Int32Type = Type::getInt32Ty(CS.getInstruction()->getContext()); + + if (CS.getCalledFunction()->getName() == "memalign") { Align = CS.getArgument(0); Size = CS.getArgument(1); @@ -470,9 +465,9 @@ ResultDest = CastInst::CreatePointerCast(ResultDest, PtrPtr, ResultDest->getName(), I); } - if (Align->getType() != Int32Type) + if (!Align->getType()->isIntegerTy(32)) Align = CastInst::CreateIntegerCast(Align, Int32Type, false, Align->getName(), I); - if (Size->getType() != Int32Type) + if (!Size->getType()->isIntegerTy(32)) Size = CastInst::CreateIntegerCast(Size, Int32Type, false, Size->getName(), I); std::string Name = I->getName(); I->setName(""); @@ -516,11 +511,15 @@ DSNode *Node = getDSNodeHFor(I).getNode(); assert (Node && "strdup has NULL DSNode!\n"); Value *PH = getPoolHandle(I); + + const Type* Int8Type = Type::getInt8Ty(CS.getInstruction()->getContext()); + + #if 0 assert (PH && "PH for strdup is null!\n"); #else if (!PH) { - std::cerr << "strdup: NoPH" << std::endl; + errs() << "strdup: NoPH\n"; return; } #endif @@ -565,6 +564,9 @@ const Function *CF = CS.getCalledFunction(); Instruction *TheCall = CS.getInstruction(); + const Type* Int32Type = Type::getInt32Ty(CS.getInstruction()->getContext()); + + // If the called function is casted from one function type to another, peer // into the cast instruction and pull out the actual function being called. if (ConstantExpr *CE = dyn_cast(CS.getCalledValue())) @@ -573,13 +575,13 @@ CF = cast(CE->getOperand(0)); if (isa(TheCall->getOperand(0))) { - std::cerr << "INLINE ASM: ignoring. Hoping that's safe.\n"; + errs() << "INLINE ASM: ignoring. Hoping that's safe.\n"; return; } // Ignore calls to NULL pointers. if (isa(CS.getCalledValue())) { - std::cerr << "WARNING: Ignoring call using NULL function pointer.\n"; + errs() << "WARNING: Ignoring call using NULL function pointer.\n"; return; } @@ -600,7 +602,7 @@ visitStrdupCall(CS); return; } else if (CF->getName() == "valloc") { - std::cerr << "VALLOC USED BUT NOT HANDLED!\n"; + errs() << "VALLOC USED BUT NOT HANDLED!\n"; abort(); } } @@ -621,7 +623,7 @@ // For indirect callees, find any callee since all DS graphs have been // merged. if (CF) { // Direct calls are nice and simple. - DEBUG(std::cerr << " Handling direct call: " << *TheCall); + DEBUG(errs() << " Handling direct call: " << *TheCall); FuncInfo *CFI = PAInfo.getFuncInfo(*CF); if (CFI == 0 || CFI->Clone == 0) { // Nothing to transform... visitInstruction(*TheCall); @@ -633,7 +635,7 @@ assert ((Graphs.hasDSGraph (*CF)) && "Function has no ECGraph!\n"); CalleeGraph = Graphs.getDSGraph(*CF); } else { - DEBUG(std::cerr << " Handling indirect call: " << *TheCall); + DEBUG(errs() << " Handling indirect call: " << *TheCall); // Here we fill in CF with one of the possible called functions. Because we // merged together all of the arguments to all of the functions in the @@ -754,7 +756,7 @@ // Dinakar: We need pooldescriptors for allocas in the callee if it // escapes BasicBlock::iterator InsertPt = TheCall->getParent()->getParent()->front().begin(); - ArgVal = new AllocaInst(PAInfo.getPoolType(), + ArgVal = new AllocaInst(PAInfo.getPoolType(&TheCall->getContext()), 0, "PD", InsertPt); @@ -767,7 +769,7 @@ } //probably need to update DSG - // std::cerr << "WARNING: NULL POOL ARGUMENTS ARE PASSED IN!\n"; + // errs() << "WARNING: NULL POOL ARGUMENTS ARE PASSED IN!\n"; } } Args.push_back(ArgVal); @@ -809,9 +811,9 @@ AddPoolUse(*NewCall, Args[i], PoolUses); TheCall->replaceAllUsesWith(NewCall); - DEBUG(std::cerr << " Result Call: " << *NewCall); + DEBUG(errs() << " Result Call: " << *NewCall); - if (TheCall->getType() != VoidType) { + if (!TheCall->getType()->isVoidTy()) { // If we are modifying the original function, update the DSGraph... DSGraph::ScalarMapTy &SM = G->getScalarMap(); DSGraph::ScalarMapTy::iterator CII = SM.find(TheCall); From jyasskin at google.com Thu Mar 4 00:50:01 2010 From: jyasskin at google.com (Jeffrey Yasskin) Date: Thu, 04 Mar 2010 06:50:01 -0000 Subject: [llvm-commits] [llvm] r97720 - in /llvm/trunk: lib/ExecutionEngine/JIT/JITEmitter.cpp unittests/ExecutionEngine/JIT/JITTest.cpp Message-ID: <20100304065001.6941E2A6C12C@llvm.org> Author: jyasskin Date: Thu Mar 4 00:50:01 2010 New Revision: 97720 URL: http://llvm.org/viewvc/llvm-project?rev=97720&view=rev Log: Fix PR5291, in which a SmallPtrSet iterator was held across an insertion into the set. Modified: llvm/trunk/lib/ExecutionEngine/JIT/JITEmitter.cpp llvm/trunk/unittests/ExecutionEngine/JIT/JITTest.cpp Modified: llvm/trunk/lib/ExecutionEngine/JIT/JITEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/JIT/JITEmitter.cpp?rev=97720&r1=97719&r2=97720&view=diff ============================================================================== --- llvm/trunk/lib/ExecutionEngine/JIT/JITEmitter.cpp (original) +++ llvm/trunk/lib/ExecutionEngine/JIT/JITEmitter.cpp Thu Mar 4 00:50:01 2010 @@ -348,9 +348,6 @@ /// MMI - Machine module info for exception informations MachineModuleInfo* MMI; - // GVSet - a set to keep track of which globals have been seen - SmallPtrSet GVSet; - // CurFn - The llvm function being emitted. Only valid during // finishFunction(). const Function *CurFn; @@ -507,8 +504,14 @@ bool MayNeedFarStub); void *getPointerToGVIndirectSym(GlobalValue *V, void *Reference); unsigned addSizeOfGlobal(const GlobalVariable *GV, unsigned Size); - unsigned addSizeOfGlobalsInConstantVal(const Constant *C, unsigned Size); - unsigned addSizeOfGlobalsInInitializer(const Constant *Init, unsigned Size); + unsigned addSizeOfGlobalsInConstantVal( + const Constant *C, unsigned Size, + SmallPtrSet &SeenGlobals, + SmallVectorImpl &Worklist); + unsigned addSizeOfGlobalsInInitializer( + const Constant *Init, unsigned Size, + SmallPtrSet &SeenGlobals, + SmallVectorImpl &Worklist); unsigned GetSizeOfGlobalsInBytes(MachineFunction &MF); }; } @@ -968,11 +971,14 @@ } /// addSizeOfGlobalsInConstantVal - find any globals that we haven't seen yet -/// but are referenced from the constant; put them in GVSet and add their -/// size into the running total Size. +/// but are referenced from the constant; put them in SeenGlobals and the +/// Worklist, and add their size into the running total Size. -unsigned JITEmitter::addSizeOfGlobalsInConstantVal(const Constant *C, - unsigned Size) { +unsigned JITEmitter::addSizeOfGlobalsInConstantVal( + const Constant *C, + unsigned Size, + SmallPtrSet &SeenGlobals, + SmallVectorImpl &Worklist) { // If its undefined, return the garbage. if (isa(C)) return Size; @@ -994,7 +1000,7 @@ case Instruction::PtrToInt: case Instruction::IntToPtr: case Instruction::BitCast: { - Size = addSizeOfGlobalsInConstantVal(Op0, Size); + Size = addSizeOfGlobalsInConstantVal(Op0, Size, SeenGlobals, Worklist); break; } case Instruction::Add: @@ -1010,8 +1016,9 @@ case Instruction::And: case Instruction::Or: case Instruction::Xor: { - Size = addSizeOfGlobalsInConstantVal(Op0, Size); - Size = addSizeOfGlobalsInConstantVal(CE->getOperand(1), Size); + Size = addSizeOfGlobalsInConstantVal(Op0, Size, SeenGlobals, Worklist); + Size = addSizeOfGlobalsInConstantVal(CE->getOperand(1), Size, + SeenGlobals, Worklist); break; } default: { @@ -1025,8 +1032,10 @@ if (C->getType()->getTypeID() == Type::PointerTyID) if (const GlobalVariable* GV = dyn_cast(C)) - if (GVSet.insert(GV)) + if (SeenGlobals.insert(GV)) { + Worklist.push_back(GV); Size = addSizeOfGlobal(GV, Size); + } return Size; } @@ -1034,15 +1043,18 @@ /// addSizeOfGLobalsInInitializer - handle any globals that we haven't seen yet /// but are referenced from the given initializer. -unsigned JITEmitter::addSizeOfGlobalsInInitializer(const Constant *Init, - unsigned Size) { +unsigned JITEmitter::addSizeOfGlobalsInInitializer( + const Constant *Init, + unsigned Size, + SmallPtrSet &SeenGlobals, + SmallVectorImpl &Worklist) { if (!isa(Init) && !isa(Init) && !isa(Init) && !isa(Init) && !isa(Init) && Init->getType()->isFirstClassType()) - Size = addSizeOfGlobalsInConstantVal(Init, Size); + Size = addSizeOfGlobalsInConstantVal(Init, Size, SeenGlobals, Worklist); return Size; } @@ -1053,7 +1065,7 @@ unsigned JITEmitter::GetSizeOfGlobalsInBytes(MachineFunction &MF) { unsigned Size = 0; - GVSet.clear(); + SmallPtrSet SeenGlobals; for (MachineFunction::iterator MBB = MF.begin(), E = MF.end(); MBB != E; ++MBB) { @@ -1077,7 +1089,7 @@ // assuming the addresses of the new globals in this module // start at 0 (or something) and adjusting them after codegen // complete. Another possibility is to grab a marker bit in GV. - if (GVSet.insert(GV)) + if (SeenGlobals.insert(GV)) // A variable as yet unseen. Add in its size. Size = addSizeOfGlobal(GV, Size); } @@ -1086,12 +1098,14 @@ } DEBUG(dbgs() << "JIT: About to look through initializers\n"); // Look for more globals that are referenced only from initializers. - // GVSet.end is computed each time because the set can grow as we go. - for (SmallPtrSet::iterator I = GVSet.begin(); - I != GVSet.end(); I++) { - const GlobalVariable* GV = *I; + SmallVector Worklist( + SeenGlobals.begin(), SeenGlobals.end()); + while (!Worklist.empty()) { + const GlobalVariable* GV = Worklist.back(); + Worklist.pop_back(); if (GV->hasInitializer()) - Size = addSizeOfGlobalsInInitializer(GV->getInitializer(), Size); + Size = addSizeOfGlobalsInInitializer(GV->getInitializer(), Size, + SeenGlobals, Worklist); } return Size; Modified: llvm/trunk/unittests/ExecutionEngine/JIT/JITTest.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/ExecutionEngine/JIT/JITTest.cpp?rev=97720&r1=97719&r2=97720&view=diff ============================================================================== --- llvm/trunk/unittests/ExecutionEngine/JIT/JITTest.cpp (original) +++ llvm/trunk/unittests/ExecutionEngine/JIT/JITTest.cpp Thu Mar 4 00:50:01 2010 @@ -65,6 +65,8 @@ stubsAllocated = 0; } + void setSizeRequired(bool Required) { SizeRequired = Required; } + virtual void setMemoryWritable() { Base->setMemoryWritable(); } virtual void setMemoryExecutable() { Base->setMemoryExecutable(); } virtual void setPoisonMemory(bool poison) { Base->setPoisonMemory(poison); } @@ -628,6 +630,31 @@ << " not 7 from the IR version."; } +TEST_F(JITTest, NeedsExactSizeWithManyGlobals) { + // PR5291: When the JMM needed the exact size of function bodies before + // starting to emit them, the JITEmitter would modify a set while iterating + // over it. + TheJIT->DisableLazyCompilation(true); + RJMM->setSizeRequired(true); + + LoadAssembly("@A = global i32 42 " + "@B = global i32* @A " + "@C = global i32** @B " + "@D = global i32*** @C " + "@E = global i32**** @D " + "@F = global i32***** @E " + "@G = global i32****** @F " + "@H = global i32******* @G " + "@I = global i32******** @H " + "define i32********* @test() { " + " ret i32********* @I " + "}"); + Function *testIR = M->getFunction("test"); + int32_t********* (*test)() = reinterpret_cast( + (intptr_t)TheJIT->getPointerToFunction(testIR)); + EXPECT_EQ(42, *********test()); +} + // Converts the LLVM assembly to bitcode and returns it in a std::string. An // empty string indicates an error. std::string AssembleToBitcode(LLVMContext &Context, const char *Assembly) { From nicholas at mxc.ca Thu Mar 4 00:54:11 2010 From: nicholas at mxc.ca (Nick Lewycky) Date: Thu, 04 Mar 2010 06:54:11 -0000 Subject: [llvm-commits] [llvm] r97721 - in /llvm/trunk: lib/VMCore/ConstantFold.cpp test/Transforms/InstCombine/2010-03-03-ExtElim.ll Message-ID: <20100304065411.2AB612A6C12C@llvm.org> Author: nicholas Date: Thu Mar 4 00:54:10 2010 New Revision: 97721 URL: http://llvm.org/viewvc/llvm-project?rev=97721&view=rev Log: Make the 'icmp pred trunc(ext(X)), CST --> icmp pred X, ext(trunc(CST))' transformation much more careful. Truncating binary '01' to '1' sounds like it's safe until you realize that it switched from positive to negative under a signed interpretation, and that depends on the icmp predicate. Also a few miscellaneous cleanups. Added: llvm/trunk/test/Transforms/InstCombine/2010-03-03-ExtElim.ll Modified: llvm/trunk/lib/VMCore/ConstantFold.cpp Modified: llvm/trunk/lib/VMCore/ConstantFold.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/ConstantFold.cpp?rev=97721&r1=97720&r2=97721&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/ConstantFold.cpp (original) +++ llvm/trunk/lib/VMCore/ConstantFold.cpp Thu Mar 4 00:54:10 2010 @@ -2070,7 +2070,7 @@ if (ConstantExpr *CE2 = dyn_cast(C2)) { Constant *CE2Op0 = CE2->getOperand(0); if (CE2->getOpcode() == Instruction::BitCast && - CE2->getType()->isVectorTy()==CE2Op0->getType()->isVectorTy()) { + CE2->getType()->isVectorTy() == CE2Op0->getType()->isVectorTy()) { Constant *Inverse = ConstantExpr::getBitCast(C1, CE2Op0->getType()); return ConstantExpr::getICmp(pred, Inverse, CE2Op0); } @@ -2078,8 +2078,8 @@ // If the left hand side is an extension, try eliminating it. if (ConstantExpr *CE1 = dyn_cast(C1)) { - if (CE1->getOpcode() == Instruction::SExt || - CE1->getOpcode() == Instruction::ZExt) { + if ((CE1->getOpcode() == Instruction::SExt && ICmpInst::isSigned(pred)) || + (CE1->getOpcode() == Instruction::ZExt && !ICmpInst::isSigned(pred))){ Constant *CE1Op0 = CE1->getOperand(0); Constant *CE1Inverse = ConstantExpr::getTrunc(CE1, CE1Op0->getType()); if (CE1Inverse == CE1Op0) { @@ -2097,27 +2097,8 @@ // If C2 is a constant expr and C1 isn't, flip them around and fold the // other way if possible. // Also, if C1 is null and C2 isn't, flip them around. - switch (pred) { - case ICmpInst::ICMP_EQ: - case ICmpInst::ICMP_NE: - // No change of predicate required. - return ConstantExpr::getICmp(pred, C2, C1); - - case ICmpInst::ICMP_ULT: - case ICmpInst::ICMP_SLT: - case ICmpInst::ICMP_UGT: - case ICmpInst::ICMP_SGT: - case ICmpInst::ICMP_ULE: - case ICmpInst::ICMP_SLE: - case ICmpInst::ICMP_UGE: - case ICmpInst::ICMP_SGE: - // Change the predicate as necessary to swap the operands. - pred = ICmpInst::getSwappedPredicate((ICmpInst::Predicate)pred); - return ConstantExpr::getICmp(pred, C2, C1); - - default: // These predicates cannot be flopped around. - break; - } + pred = ICmpInst::getSwappedPredicate((ICmpInst::Predicate)pred); + return ConstantExpr::getICmp(pred, C2, C1); } } return 0; Added: llvm/trunk/test/Transforms/InstCombine/2010-03-03-ExtElim.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/2010-03-03-ExtElim.ll?rev=97721&view=auto ============================================================================== --- llvm/trunk/test/Transforms/InstCombine/2010-03-03-ExtElim.ll (added) +++ llvm/trunk/test/Transforms/InstCombine/2010-03-03-ExtElim.ll Thu Mar 4 00:54:10 2010 @@ -0,0 +1,18 @@ +; RUN: opt -instcombine -S %s | FileCheck %s +; PR6486 + +target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32-n8:16:32" +target triple = "i386-unknown-linux-gnu" + + at g_92 = common global [2 x i32*] zeroinitializer, align 4 ; <[2 x i32*]*> [#uses=1] + at g_177 = constant i32** bitcast (i8* getelementptr (i8* bitcast ([2 x i32*]* @g_92 to i8*), i64 4) to i32**), align 4 ; [#uses=1] + +define i1 @test() nounwind { +; CHECK: @test + %tmp = load i32*** @g_177 ; [#uses=1] + %cmp = icmp ne i32** null, %tmp ; [#uses=1] + %conv = zext i1 %cmp to i32 ; [#uses=1] + %cmp1 = icmp sle i32 0, %conv ; [#uses=1] + ret i1 %cmp1 +; CHECK: ret i1 true +} From sabre at nondot.org Thu Mar 4 01:36:55 2010 From: sabre at nondot.org (Chris Lattner) Date: Thu, 04 Mar 2010 07:36:55 -0000 Subject: [llvm-commits] [www-pubs] r97722 - in /www-pubs/trunk: 2008-06-Reiter-Thesis.html 2008-06-Reiter-Thesis.pdf pubs.js Message-ID: <20100304073655.7DB4E2A6C12C@llvm.org> Author: lattner Date: Thu Mar 4 01:36:55 2010 New Revision: 97722 URL: http://llvm.org/viewvc/llvm-project?rev=97722&view=rev Log: add Stephan Reiter's thesis. Added: www-pubs/trunk/2008-06-Reiter-Thesis.html www-pubs/trunk/2008-06-Reiter-Thesis.pdf Modified: www-pubs/trunk/pubs.js Added: www-pubs/trunk/2008-06-Reiter-Thesis.html URL: http://llvm.org/viewvc/llvm-project/www-pubs/trunk/2008-06-Reiter-Thesis.html?rev=97722&view=auto ============================================================================== --- www-pubs/trunk/2008-06-Reiter-Thesis.html (added) +++ www-pubs/trunk/2008-06-Reiter-Thesis.html Thu Mar 4 01:36:55 2010 @@ -0,0 +1,40 @@ + + + + + + Real-Time Ray Tracing of Dynamic Scenes + + + +
    + Real-Time Ray Tracing of Dynamic Scenes +
    +
    + Stephan Reiter, Diploma Thesis +
    + + +

    Abstract:

    +
    +In this thesis ray tracing of dynamic scenes in real-time is explored based on a separation of static from animated primitives in acceleration structures suited for each type of geometry.

    + +For dynamic geometry a two-level bounding volume hierarchy (BVH) is introduced that efficiently supports rigidly animated geometry, deformable geometry and fully dynamic geometry with incoherent motion and topology changes. With selective rebuilding an updating technique for BVHs is described that limits costly rebuilding operations to degenerated parts of the hierarchy and allows for balancing updating and rendering times. Furthermore a new ordered traversal scheme for BVHs is introduced that is based on a probabilistic model.

    + +Kd-trees are the acceleration structure of choice for static geometry and are commonly built by employing the surface area heuristic to determine optimal splitting planes. In this thesis two approaches for reducing the memory footprint of kd-trees are presented. Index list compaction compresses the list of triangle indices used by leaves to reference triangles. The cost-scaling termination criterion for kd-tree construction, on the other hand, limits the creation of deep trees by weighing the costs of splitting a node higher with an increasing depth. +

    + +

    Published:

    +
    + Real-Time Ray Tracing of Dynamic Scenes, Stephan Reiter.
    + Diploma Thesis, Institute for Graphics and Parallel Processing, +Johannes Kepler University, Linz, Austria, June 2008 +
    + +

    Download:

    + + + + Added: www-pubs/trunk/2008-06-Reiter-Thesis.pdf URL: http://llvm.org/viewvc/llvm-project/www-pubs/trunk/2008-06-Reiter-Thesis.pdf?rev=97722&view=auto ============================================================================== Binary files www-pubs/trunk/2008-06-Reiter-Thesis.pdf (added) and www-pubs/trunk/2008-06-Reiter-Thesis.pdf Thu Mar 4 01:36:55 2010 differ Modified: www-pubs/trunk/pubs.js URL: http://llvm.org/viewvc/llvm-project/www-pubs/trunk/pubs.js?rev=97722&r1=97721&r2=97722&view=diff ============================================================================== --- www-pubs/trunk/pubs.js (original) +++ www-pubs/trunk/pubs.js Thu Mar 4 01:36:55 2010 @@ -474,6 +474,14 @@ month: 7, year: 2008}, + {url: '2008-06-Reiter-Thesis.html', + title: 'Real-Time Ray Tracing of Dynamic Scenes', + author: 'Stephan Reiter', + published: 'Diploma Thesis, Institute for Graphics and Parallel Processing, Johannes Kepler University', + location: "Linz, Austria", + month: 6, + year: 2008}, + {url: '2008-06-CompilingHaskelltoLLVM.html', title: 'Compiling Haskell to LLVM', author: 'John van Schie', From sabre at nondot.org Thu Mar 4 01:46:14 2010 From: sabre at nondot.org (Chris Lattner) Date: Thu, 04 Mar 2010 07:46:14 -0000 Subject: [llvm-commits] [www-pubs] r97723 - in /www-pubs/trunk: 2010-01-Wennborg-Thesis.html 2010-01-Wennborg-Thesis.pdf pubs.js Message-ID: <20100304074614.826E82A6C