From daniel at zuster.org Mon Jul 19 00:44:09 2010 From: daniel at zuster.org (Daniel Dunbar) Date: Mon, 19 Jul 2010 05:44:09 -0000 Subject: [llvm-commits] [llvm] r108677 - in /llvm/trunk: include/llvm/Target/TargetAsmParser.h lib/MC/MCParser/TargetAsmParser.cpp lib/Target/X86/AsmParser/X86AsmParser.cpp utils/TableGen/AsmMatcherEmitter.cpp Message-ID: <20100719054409.761392A6C12C@llvm.org> Author: ddunbar Date: Mon Jul 19 00:44:09 2010 New Revision: 108677 URL: http://llvm.org/viewvc/llvm-project?rev=108677&view=rev Log: TblGen/AsmMatcher: Add support for honoring instruction Requires<[]> attributes as part of the matcher. - Currently includes a hack to limit ourselves to "In32BitMode" and "In64BitMode", because we don't have the other infrastructure to properly deal with setting SSE, etc. features on X86. Modified: llvm/trunk/include/llvm/Target/TargetAsmParser.h llvm/trunk/lib/MC/MCParser/TargetAsmParser.cpp llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp llvm/trunk/utils/TableGen/AsmMatcherEmitter.cpp Modified: llvm/trunk/include/llvm/Target/TargetAsmParser.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetAsmParser.h?rev=108677&r1=108676&r2=108677&view=diff ============================================================================== --- llvm/trunk/include/llvm/Target/TargetAsmParser.h (original) +++ llvm/trunk/include/llvm/Target/TargetAsmParser.h Mon Jul 19 00:44:09 2010 @@ -28,14 +28,20 @@ protected: // Can only create subclasses. TargetAsmParser(const Target &); - /// TheTarget - The Target that this machine was created for. + /// The Target that this machine was created for. const Target &TheTarget; + /// The current set of available features. + unsigned AvailableFeatures; + public: virtual ~TargetAsmParser(); const Target &getTarget() const { return TheTarget; } + unsigned getAvailableFeatures() const { return AvailableFeatures; } + void setAvailableFeatures(unsigned Value) { AvailableFeatures = Value; } + /// ParseInstruction - Parse one assembly instruction. /// /// The parser is positioned following the instruction name. The target Modified: llvm/trunk/lib/MC/MCParser/TargetAsmParser.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCParser/TargetAsmParser.cpp?rev=108677&r1=108676&r2=108677&view=diff ============================================================================== --- llvm/trunk/lib/MC/MCParser/TargetAsmParser.cpp (original) +++ llvm/trunk/lib/MC/MCParser/TargetAsmParser.cpp Mon Jul 19 00:44:09 2010 @@ -11,7 +11,7 @@ using namespace llvm; TargetAsmParser::TargetAsmParser(const Target &T) - : TheTarget(T) + : TheTarget(T), AvailableFeatures(0) { } Modified: llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp?rev=108677&r1=108676&r2=108677&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp (original) +++ llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp Mon Jul 19 00:44:09 2010 @@ -9,6 +9,7 @@ #include "llvm/Target/TargetAsmParser.h" #include "X86.h" +#include "X86Subtarget.h" #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/StringSwitch.h" #include "llvm/ADT/Twine.h" @@ -51,12 +52,14 @@ void InstructionCleanup(MCInst &Inst); - /// @name Auto-generated Match Functions - /// { - bool MatchInstruction(const SmallVectorImpl &Operands, MCInst &Inst); + /// @name Auto-generated Matcher Functions + /// { + + unsigned ComputeAvailableFeatures(const X86Subtarget *Subtarget) const; + bool MatchInstructionImpl( const SmallVectorImpl &Operands, MCInst &Inst); @@ -64,7 +67,12 @@ public: X86ATTAsmParser(const Target &T, MCAsmParser &_Parser, TargetMachine &TM) - : TargetAsmParser(T), Parser(_Parser), TM(TM) {} + : TargetAsmParser(T), Parser(_Parser), TM(TM) { + + // Initialize the set of available features. + setAvailableFeatures(ComputeAvailableFeatures( + &TM.getSubtarget())); + } virtual bool ParseInstruction(StringRef Name, SMLoc NameLoc, SmallVectorImpl &Operands); Modified: llvm/trunk/utils/TableGen/AsmMatcherEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/AsmMatcherEmitter.cpp?rev=108677&r1=108676&r2=108677&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/AsmMatcherEmitter.cpp (original) +++ llvm/trunk/utils/TableGen/AsmMatcherEmitter.cpp Mon Jul 19 00:44:09 2010 @@ -271,6 +271,8 @@ namespace { +struct SubtargetFeatureInfo; + /// ClassInfo - Helper class for storing the information about a particular /// class of operands which can be matched. struct ClassInfo { @@ -444,6 +446,9 @@ /// Operands - The operands that this instruction matches. SmallVector Operands; + /// Predicates - The required subtarget features to match this instruction. + SmallVector RequiredFeatures; + /// ConversionFnKind - The enum value which is passed to the generated /// ConvertToMCInst to convert parsed operands into an MCInst for this /// function. @@ -505,6 +510,19 @@ void dump(); }; +/// SubtargetFeatureInfo - Helper class for storing information on a subtarget +/// feature which participates in instruction matching. +struct SubtargetFeatureInfo { + /// \brief The predicate record for this feature. + Record *TheDef; + + /// \brief An unique index assigned to represent this feature. + unsigned Index; + + /// \brief The name of the enumerated constant identifying this feature. + std::string EnumName; +}; + class AsmMatcherInfo { public: /// The tablegen AsmParser record. @@ -525,6 +543,9 @@ /// Map of Register records to their class information. std::map RegisterClasses; + /// Map of Predicate records to their subtarget information. + std::map SubtargetFeatures; + private: /// Map of token to class information which has already been constructed. std::map TokenClasses; @@ -543,6 +564,23 @@ ClassInfo *getOperandClass(StringRef Token, const CodeGenInstruction::OperandInfo &OI); + /// getSubtargetFeature - Lookup or create the subtarget feature info for the + /// given operand. + SubtargetFeatureInfo *getSubtargetFeature(Record *Def) { + assert(Def->isSubClassOf("Predicate") && "Invalid predicate type!"); + + SubtargetFeatureInfo *&Entry = SubtargetFeatures[Def]; + if (!Entry) { + Entry = new SubtargetFeatureInfo; + Entry->TheDef = Def; + Entry->Index = SubtargetFeatures.size() - 1; + Entry->EnumName = "Feature_" + Def->getName(); + assert(Entry->Index < 32 && "Too many subtarget features!"); + } + + return Entry; + } + /// BuildRegisterClasses - Build the ClassInfo* instances for register /// classes. void BuildRegisterClasses(CodeGenTarget &Target, @@ -903,7 +941,31 @@ } } } - + + // Compute the require features. + ListInit *Predicates = CGI.TheDef->getValueAsListInit("Predicates"); + for (unsigned i = 0, e = Predicates->getSize(); i != e; ++i) { + if (DefInit *Pred = dynamic_cast(Predicates->getElement(i))) { + // Ignore OptForSize and OptForSpeed, they aren't really requirements, + // rather they are hints to isel. + // + // FIXME: Find better way to model this. + if (Pred->getDef()->getName() == "OptForSize" || + Pred->getDef()->getName() == "OptForSpeed") + continue; + + // FIXME: Total hack; for now, we just limit ourselves to In32BitMode + // and In64BitMode, because we aren't going to have the right feature + // masks for SSE and friends. We need to decide what we are going to do + // about CPU subtypes to implement this the right way. + if (Pred->getDef()->getName() != "In32BitMode" && + Pred->getDef()->getName() != "In64BitMode") + continue; + + II->RequiredFeatures.push_back(getSubtargetFeature(Pred->getDef())); + } + } + Instructions.push_back(II.take()); } @@ -1499,6 +1561,48 @@ OS << "}\n\n"; } +/// EmitSubtargetFeatureFlagEnumeration - Emit the subtarget feature flag +/// definitions. +static void EmitSubtargetFeatureFlagEnumeration(CodeGenTarget &Target, + AsmMatcherInfo &Info, + raw_ostream &OS) { + OS << "// Flags for subtarget features that participate in " + << "instruction matching.\n"; + OS << "enum SubtargetFeatureFlag {\n"; + for (std::map::const_iterator + it = Info.SubtargetFeatures.begin(), + ie = Info.SubtargetFeatures.end(); it != ie; ++it) { + SubtargetFeatureInfo &SFI = *it->second; + OS << " " << SFI.EnumName << " = (1 << " << SFI.Index << "),\n"; + } + OS << " Feature_None = 0\n"; + OS << "};\n\n"; +} + +/// EmitComputeAvailableFeatures - Emit the function to compute the list of +/// available features given a subtarget. +static void EmitComputeAvailableFeatures(CodeGenTarget &Target, + AsmMatcherInfo &Info, + raw_ostream &OS) { + std::string ClassName = + Info.AsmParser->getValueAsString("AsmParserClassName"); + + OS << "unsigned " << Target.getName() << ClassName << "::\n" + << "ComputeAvailableFeatures(const " << Target.getName() + << "Subtarget *Subtarget) const {\n"; + OS << " unsigned Features = 0;\n"; + for (std::map::const_iterator + it = Info.SubtargetFeatures.begin(), + ie = Info.SubtargetFeatures.end(); it != ie; ++it) { + SubtargetFeatureInfo &SFI = *it->second; + OS << " if (" << SFI.TheDef->getValueAsString("CondString") + << ")\n"; + OS << " Features |= " << SFI.EnumName << ";\n"; + } + OS << " return Features;\n"; + OS << "}\n\n"; +} + void AsmMatcherEmitter::run(raw_ostream &OS) { CodeGenTarget Target; Record *AsmParser = Target.getAsmParser(); @@ -1550,6 +1654,9 @@ EmitSourceFileHeader("Assembly Matcher Source Fragment", OS); + // Emit the subtarget feature enumeration. + EmitSubtargetFeatureFlagEnumeration(Target, Info, OS); + // Emit the function to match a register name to number. EmitMatchRegisterName(Target, AsmParser, OS); @@ -1570,6 +1677,9 @@ // Emit the subclass predicate routine. EmitIsSubclass(Target, Info.Classes, OS); + // Emit the available features compute function. + EmitComputeAvailableFeatures(Target, Info, OS); + // Finally, build the match function. size_t MaxNumOperands = 0; @@ -1600,6 +1710,7 @@ OS << " unsigned Opcode;\n"; OS << " ConversionKind ConvertFn;\n"; OS << " MatchClassKind Classes[" << MaxNumOperands << "];\n"; + OS << " unsigned RequiredFeatures;\n"; OS << " } MatchTable[" << Info.Instructions.size() << "] = {\n"; for (std::vector::const_iterator it = @@ -1615,11 +1726,27 @@ if (i) OS << ", "; OS << Op.Class->Name; } - OS << " } },\n"; + OS << " }, "; + + // Write the required features mask. + if (!II.RequiredFeatures.empty()) { + for (unsigned i = 0, e = II.RequiredFeatures.size(); i != e; ++i) { + if (i) OS << "|"; + OS << II.RequiredFeatures[i]->EnumName; + } + } else + OS << "0"; + + OS << "},\n"; } OS << " };\n\n"; + + // Emit code to get the available features. + OS << " // Get the current feature set.\n"; + OS << " unsigned AvailableFeatures = getAvailableFeatures();\n\n"; + // Emit code to compute the class list for this operand vector. OS << " // Eliminate obvious mismatches.\n"; OS << " if (Operands.size() > " << MaxNumOperands << ")\n"; @@ -1645,6 +1772,13 @@ OS << " for (const MatchEntry *it = MatchTable, " << "*ie = MatchTable + " << Info.Instructions.size() << "; it != ie; ++it) {\n"; + + // Emit check that the required features are available. + OS << " if ((AvailableFeatures & it->RequiredFeatures) " + << "!= it->RequiredFeatures)\n"; + OS << " continue;\n"; + + // Emit check that the subclasses match. for (unsigned i = 0; i != MaxNumOperands; ++i) { OS << " if (!IsSubclass(Classes[" << i << "], it->Classes[" << i << "]))\n"; From bigcheesegs at gmail.com Mon Jul 19 01:13:10 2010 From: bigcheesegs at gmail.com (Michael J. Spencer) Date: Mon, 19 Jul 2010 06:13:10 -0000 Subject: [llvm-commits] [llvm] r108678 - in /llvm/trunk: include/llvm/MC/MCObjectStreamer.h lib/MC/MCMachOStreamer.cpp lib/MC/MCObjectStreamer.cpp lib/MC/WinCOFFStreamer.cpp Message-ID: <20100719061310.ED8512A6C12C@llvm.org> Author: mspencer Date: Mon Jul 19 01:13:10 2010 New Revision: 108678 URL: http://llvm.org/viewvc/llvm-project?rev=108678&view=rev Log: MC: Add WinCOFFStreamer implementation and merge common code from MachO into MCObjectStreamer. Origonal Windows COFF implementation by Nathan Jedffords. Modified: llvm/trunk/include/llvm/MC/MCObjectStreamer.h llvm/trunk/lib/MC/MCMachOStreamer.cpp llvm/trunk/lib/MC/MCObjectStreamer.cpp llvm/trunk/lib/MC/WinCOFFStreamer.cpp Modified: llvm/trunk/include/llvm/MC/MCObjectStreamer.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCObjectStreamer.h?rev=108678&r1=108677&r2=108678&view=diff ============================================================================== --- llvm/trunk/include/llvm/MC/MCObjectStreamer.h (original) +++ llvm/trunk/include/llvm/MC/MCObjectStreamer.h Mon Jul 19 01:13:10 2010 @@ -16,6 +16,9 @@ class MCAssembler; class MCCodeEmitter; class MCSectionData; +class MCExpr; +class MCFragment; +class MCDataFragment; class TargetAsmBackend; class raw_ostream; @@ -39,6 +42,14 @@ return CurSectionData; } + MCFragment *getCurrentFragment() const; + + /// Get a data fragment to write into, creating a new one if the current + /// fragment is not a data fragment. + MCDataFragment *getOrCreateDataFragment() const; + + const MCExpr *AddValueSymbols(const MCExpr *Value); + public: MCAssembler &getAssembler() { return *Assembler; } Modified: llvm/trunk/lib/MC/MCMachOStreamer.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCMachOStreamer.cpp?rev=108678&r1=108677&r2=108678&view=diff ============================================================================== --- llvm/trunk/lib/MC/MCMachOStreamer.cpp (original) +++ llvm/trunk/lib/MC/MCMachOStreamer.cpp Mon Jul 19 01:13:10 2010 @@ -28,24 +28,6 @@ class MCMachOStreamer : public MCObjectStreamer { private: - MCFragment *getCurrentFragment() const { - assert(getCurrentSectionData() && "No current section!"); - - if (!getCurrentSectionData()->empty()) - return &getCurrentSectionData()->getFragmentList().back(); - - return 0; - } - - /// Get a data fragment to write into, creating a new one if the current - /// fragment is not a data fragment. - MCDataFragment *getOrCreateDataFragment() const { - MCDataFragment *F = dyn_cast_or_null(getCurrentFragment()); - if (!F) - F = new MCDataFragment(getCurrentSectionData()); - return F; - } - void EmitInstToFragment(const MCInst &Inst); void EmitInstToData(const MCInst &Inst); @@ -54,32 +36,6 @@ raw_ostream &OS, MCCodeEmitter *Emitter) : MCObjectStreamer(Context, TAB, OS, Emitter) {} - const MCExpr *AddValueSymbols(const MCExpr *Value) { - switch (Value->getKind()) { - case MCExpr::Target: assert(0 && "Can't handle target exprs yet!"); - case MCExpr::Constant: - break; - - case MCExpr::Binary: { - const MCBinaryExpr *BE = cast(Value); - AddValueSymbols(BE->getLHS()); - AddValueSymbols(BE->getRHS()); - break; - } - - case MCExpr::SymbolRef: - getAssembler().getOrCreateSymbolData( - cast(Value)->getSymbol()); - break; - - case MCExpr::Unary: - AddValueSymbols(cast(Value)->getSubExpr()); - break; - } - - return Value; - } - /// @name MCStreamer Interface /// @{ @@ -142,6 +98,8 @@ } // end anonymous namespace. void MCMachOStreamer::EmitLabel(MCSymbol *Symbol) { + // TODO: This is almost exactly the same as WinCOFFStreamer. Consider merging + // into MCObjectStreamer. assert(Symbol->isUndefined() && "Cannot define a symbol twice!"); assert(!Symbol->isVariable() && "Cannot emit a variable symbol!"); assert(CurSection && "Cannot emit before setting section!"); @@ -185,6 +143,8 @@ } void MCMachOStreamer::EmitAssignment(MCSymbol *Symbol, const MCExpr *Value) { + // TODO: This is exactly the same as WinCOFFStreamer. Consider merging into + // MCObjectStreamer. // FIXME: Lift context changes into super class. getAssembler().getOrCreateSymbolData(*Symbol); Symbol->setVariableValue(AddValueSymbols(Value)); @@ -335,11 +295,15 @@ } void MCMachOStreamer::EmitBytes(StringRef Data, unsigned AddrSpace) { + // TODO: This is exactly the same as WinCOFFStreamer. Consider merging into + // MCObjectStreamer. getOrCreateDataFragment()->getContents().append(Data.begin(), Data.end()); } void MCMachOStreamer::EmitValue(const MCExpr *Value, unsigned Size, unsigned AddrSpace) { + // TODO: This is exactly the same as WinCOFFStreamer. Consider merging into + // MCObjectStreamer. MCDataFragment *DF = getOrCreateDataFragment(); // Avoid fixups when possible. @@ -359,6 +323,8 @@ void MCMachOStreamer::EmitValueToAlignment(unsigned ByteAlignment, int64_t Value, unsigned ValueSize, unsigned MaxBytesToEmit) { + // TODO: This is exactly the same as WinCOFFStreamer. Consider merging into + // MCObjectStreamer. if (MaxBytesToEmit == 0) MaxBytesToEmit = ByteAlignment; new MCAlignFragment(ByteAlignment, Value, ValueSize, MaxBytesToEmit, @@ -371,6 +337,8 @@ void MCMachOStreamer::EmitCodeAlignment(unsigned ByteAlignment, unsigned MaxBytesToEmit) { + // TODO: This is exactly the same as WinCOFFStreamer. Consider merging into + // MCObjectStreamer. if (MaxBytesToEmit == 0) MaxBytesToEmit = ByteAlignment; MCAlignFragment *F = new MCAlignFragment(ByteAlignment, 0, 1, MaxBytesToEmit, Modified: llvm/trunk/lib/MC/MCObjectStreamer.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCObjectStreamer.cpp?rev=108678&r1=108677&r2=108678&view=diff ============================================================================== --- llvm/trunk/lib/MC/MCObjectStreamer.cpp (original) +++ llvm/trunk/lib/MC/MCObjectStreamer.cpp Mon Jul 19 01:13:10 2010 @@ -9,7 +9,9 @@ #include "llvm/MC/MCObjectStreamer.h" +#include "llvm/Support/ErrorHandling.h" #include "llvm/MC/MCAssembler.h" +#include "llvm/MC/MCExpr.h" using namespace llvm; MCObjectStreamer::MCObjectStreamer(MCContext &Context, TargetAsmBackend &TAB, @@ -24,6 +26,47 @@ delete Assembler; } +MCFragment *MCObjectStreamer::getCurrentFragment() const { + assert(getCurrentSectionData() && "No current section!"); + + if (!getCurrentSectionData()->empty()) + return &getCurrentSectionData()->getFragmentList().back(); + + return 0; +} + +MCDataFragment *MCObjectStreamer::getOrCreateDataFragment() const { + MCDataFragment *F = dyn_cast_or_null(getCurrentFragment()); + if (!F) + F = new MCDataFragment(getCurrentSectionData()); + return F; +} + +const MCExpr *MCObjectStreamer::AddValueSymbols(const MCExpr *Value) { + switch (Value->getKind()) { + case MCExpr::Target: llvm_unreachable("Can't handle target exprs yet!"); + case MCExpr::Constant: + break; + + case MCExpr::Binary: { + const MCBinaryExpr *BE = cast(Value); + AddValueSymbols(BE->getLHS()); + AddValueSymbols(BE->getRHS()); + break; + } + + case MCExpr::SymbolRef: + Assembler->getOrCreateSymbolData(cast(Value)->getSymbol()); + break; + + case MCExpr::Unary: + AddValueSymbols(cast(Value)->getSubExpr()); + break; + } + + return Value; +} + void MCObjectStreamer::SwitchSection(const MCSection *Section) { assert(Section && "Cannot switch to a null section!"); Modified: llvm/trunk/lib/MC/WinCOFFStreamer.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/WinCOFFStreamer.cpp?rev=108678&r1=108677&r2=108678&view=diff ============================================================================== --- llvm/trunk/lib/MC/WinCOFFStreamer.cpp (original) +++ llvm/trunk/lib/MC/WinCOFFStreamer.cpp Mon Jul 19 01:13:10 2010 @@ -18,27 +18,34 @@ #include "llvm/MC/MCSection.h" #include "llvm/MC/MCSymbol.h" #include "llvm/MC/MCExpr.h" +#include "llvm/MC/MCValue.h" +#include "llvm/MC/MCAssembler.h" +#include "llvm/MC/MCAsmLayout.h" #include "llvm/MC/MCCodeEmitter.h" #include "llvm/MC/MCSectionCOFF.h" +#include "llvm/Target/TargetRegistry.h" #include "llvm/Target/TargetAsmBackend.h" +#include "llvm/ADT/StringMap.h" + #include "llvm/Support/COFF.h" #include "llvm/Support/Debug.h" #include "llvm/Support/ErrorHandling.h" #include "llvm/Support/raw_ostream.h" using namespace llvm; -#define dbg_notimpl(x) \ - do { dbgs() << "not implemented, " << __FUNCTION__ << " (" << x << ")"; \ - abort(); } while (false); - namespace { class WinCOFFStreamer : public MCObjectStreamer { public: + MCSymbol const *CurSymbol; + WinCOFFStreamer(MCContext &Context, TargetAsmBackend &TAB, MCCodeEmitter &CE, raw_ostream &OS); + void AddCommonSymbol(MCSymbol *Symbol, uint64_t Size, + unsigned ByteAlignment, bool External); + // MCStreamer interface virtual void EmitLabel(MCSymbol *Symbol); @@ -52,18 +59,18 @@ virtual void EndCOFFSymbolDef(); virtual void EmitELFSize(MCSymbol *Symbol, const MCExpr *Value); virtual void EmitCommonSymbol(MCSymbol *Symbol, uint64_t Size, - unsigned ByteAlignment); + unsigned ByteAlignment); virtual void EmitLocalCommonSymbol(MCSymbol *Symbol, uint64_t Size); virtual void EmitZerofill(const MCSection *Section, MCSymbol *Symbol, - unsigned Size,unsigned ByteAlignment); + unsigned Size,unsigned ByteAlignment); virtual void EmitTBSSSymbol(const MCSection *Section, MCSymbol *Symbol, - uint64_t Size, unsigned ByteAlignment); + uint64_t Size, unsigned ByteAlignment); virtual void EmitBytes(StringRef Data, unsigned AddrSpace); - virtual void EmitValue(const MCExpr *Value, unsigned Size, + virtual void EmitValue(const MCExpr *Value, unsigned Size, unsigned AddrSpace); virtual void EmitGPRel32Value(const MCExpr *Value); virtual void EmitValueToAlignment(unsigned ByteAlignment, int64_t Value, - unsigned ValueSize, unsigned MaxBytesToEmit); + unsigned ValueSize, unsigned MaxBytesToEmit); virtual void EmitCodeAlignment(unsigned ByteAlignment, unsigned MaxBytesToEmit); virtual void EmitValueToOffset(const MCExpr *Offset, unsigned char Value); @@ -78,96 +85,223 @@ TargetAsmBackend &TAB, MCCodeEmitter &CE, raw_ostream &OS) - : MCObjectStreamer(Context, TAB, OS, &CE) { + : MCObjectStreamer(Context, TAB, OS, &CE) + , CurSymbol(NULL) { +} + +void WinCOFFStreamer::AddCommonSymbol(MCSymbol *Symbol, uint64_t Size, + unsigned ByteAlignment, bool External) { + assert(!Symbol->isInSection() && "Symbol must not already have a section!"); + + std::string SectionName(".bss$linkonce"); + SectionName.append(Symbol->getName().begin(), Symbol->getName().end()); + + MCSymbolData &SymbolData = getAssembler().getOrCreateSymbolData(*Symbol); + + unsigned Characteristics = + COFF::IMAGE_SCN_LNK_COMDAT | + COFF::IMAGE_SCN_CNT_UNINITIALIZED_DATA | + COFF::IMAGE_SCN_MEM_READ | + COFF::IMAGE_SCN_MEM_WRITE; + + int Selection = COFF::IMAGE_COMDAT_SELECT_LARGEST; + + const MCSection *Section = MCStreamer::getContext().getCOFFSection( + SectionName, Characteristics, Selection, SectionKind::getBSS()); + + MCSectionData &SectionData = getAssembler().getOrCreateSectionData(*Section); + + if (SectionData.getAlignment() < ByteAlignment) + SectionData.setAlignment(ByteAlignment); + + SymbolData.setExternal(External); + + Symbol->setSection(*Section); + + if (ByteAlignment != 1) + new MCAlignFragment(ByteAlignment, 0, 0, ByteAlignment, &SectionData); + + SymbolData.setFragment(new MCFillFragment(0, 0, Size, &SectionData)); } // MCStreamer interface void WinCOFFStreamer::EmitLabel(MCSymbol *Symbol) { + // TODO: This is copied almost exactly from the MachOStreamer. Consider + // merging into MCObjectStreamer? + assert(Symbol->isUndefined() && "Cannot define a symbol twice!"); + assert(!Symbol->isVariable() && "Cannot emit a variable symbol!"); + assert(CurSection && "Cannot emit before setting section!"); + + Symbol->setSection(*CurSection); + + MCSymbolData &SD = getAssembler().getOrCreateSymbolData(*Symbol); + + // FIXME: This is wasteful, we don't necessarily need to create a data + // fragment. Instead, we should mark the symbol as pointing into the data + // fragment if it exists, otherwise we should just queue the label and set its + // fragment pointer when we emit the next fragment. + MCDataFragment *F = getOrCreateDataFragment(); + assert(!SD.getFragment() && "Unexpected fragment on symbol data!"); + SD.setFragment(F); + SD.setOffset(F->getContents().size()); } void WinCOFFStreamer::EmitAssemblerFlag(MCAssemblerFlag Flag) { - dbg_notimpl("Flag = " << Flag); + llvm_unreachable("not implemented"); } void WinCOFFStreamer::EmitAssignment(MCSymbol *Symbol, const MCExpr *Value) { + // TODO: This is exactly the same as MachOStreamer. Consider merging into + // MCObjectStreamer. + getAssembler().getOrCreateSymbolData(*Symbol); + AddValueSymbols(Value); + Symbol->setVariableValue(Value); } void WinCOFFStreamer::EmitSymbolAttribute(MCSymbol *Symbol, MCSymbolAttr Attribute) { + switch (Attribute) { + case MCSA_WeakReference: + getAssembler().getOrCreateSymbolData(*Symbol).modifyFlags( + COFF::SF_WeakReference, + COFF::SF_WeakReference); + break; + + case MCSA_Global: + getAssembler().getOrCreateSymbolData(*Symbol).setExternal(true); + break; + + default: + llvm_unreachable("unsupported attribute"); + break; + } } void WinCOFFStreamer::EmitSymbolDesc(MCSymbol *Symbol, unsigned DescValue) { - dbg_notimpl("Symbol = " << Symbol->getName() << ", DescValue = "<< DescValue); + llvm_unreachable("not implemented"); } void WinCOFFStreamer::BeginCOFFSymbolDef(MCSymbol const *Symbol) { + assert(CurSymbol == NULL && "EndCOFFSymbolDef must be called between calls " + "to BeginCOFFSymbolDef!"); + CurSymbol = Symbol; } void WinCOFFStreamer::EmitCOFFSymbolStorageClass(int StorageClass) { + assert(CurSymbol != NULL && "BeginCOFFSymbolDef must be called first!"); + assert((StorageClass & ~0xFF) == 0 && "StorageClass must only have data in " + "the first byte!"); + + getAssembler().getOrCreateSymbolData(*CurSymbol).modifyFlags( + StorageClass << COFF::SF_ClassShift, + COFF::SF_ClassMask); } void WinCOFFStreamer::EmitCOFFSymbolType(int Type) { + assert(CurSymbol != NULL && "BeginCOFFSymbolDef must be called first!"); + assert((Type & ~0xFFFF) == 0 && "Type must only have data in the first 2 " + "bytes"); + + getAssembler().getOrCreateSymbolData(*CurSymbol).modifyFlags( + Type << COFF::SF_TypeShift, + COFF::SF_TypeMask); } void WinCOFFStreamer::EndCOFFSymbolDef() { + assert(CurSymbol != NULL && "BeginCOFFSymbolDef must be called first!"); + CurSymbol = NULL; } void WinCOFFStreamer::EmitELFSize(MCSymbol *Symbol, const MCExpr *Value) { - dbg_notimpl("Symbol = " << Symbol->getName() << ", Value = " << *Value); + llvm_unreachable("not implemented"); } void WinCOFFStreamer::EmitCommonSymbol(MCSymbol *Symbol, uint64_t Size, - unsigned ByteAlignment) { + unsigned ByteAlignment) { + AddCommonSymbol(Symbol, Size, ByteAlignment, true); } void WinCOFFStreamer::EmitLocalCommonSymbol(MCSymbol *Symbol, uint64_t Size) { + AddCommonSymbol(Symbol, Size, 1, false); } void WinCOFFStreamer::EmitZerofill(const MCSection *Section, MCSymbol *Symbol, - unsigned Size,unsigned ByteAlignment) { - MCSectionCOFF const *SectionCOFF = - static_cast(Section); - - dbg_notimpl("Section = " << SectionCOFF->getSectionName() << ", Symbol = " << - Symbol->getName() << ", Size = " << Size << ", ByteAlignment = " - << ByteAlignment); + unsigned Size,unsigned ByteAlignment) { + llvm_unreachable("not implemented"); } void WinCOFFStreamer::EmitTBSSSymbol(const MCSection *Section, MCSymbol *Symbol, uint64_t Size, unsigned ByteAlignment) { - MCSectionCOFF const *SectionCOFF = - static_cast(Section); - - dbg_notimpl("Section = " << SectionCOFF->getSectionName() << ", Symbol = " << - Symbol->getName() << ", Size = " << Size << ", ByteAlignment = " - << ByteAlignment); + llvm_unreachable("not implemented"); } void WinCOFFStreamer::EmitBytes(StringRef Data, unsigned AddrSpace) { + // TODO: This is copied exactly from the MachOStreamer. Consider merging into + // MCObjectStreamer? + getOrCreateDataFragment()->getContents().append(Data.begin(), Data.end()); } void WinCOFFStreamer::EmitValue(const MCExpr *Value, unsigned Size, - unsigned AddrSpace) { + unsigned AddrSpace) { + assert(AddrSpace == 0 && "Address space must be 0!"); + + // TODO: This is copied exactly from the MachOStreamer. Consider merging into + // MCObjectStreamer? + MCDataFragment *DF = getOrCreateDataFragment(); + + // Avoid fixups when possible. + int64_t AbsValue; + if (AddValueSymbols(Value)->EvaluateAsAbsolute(AbsValue)) { + // FIXME: Endianness assumption. + for (unsigned i = 0; i != Size; ++i) + DF->getContents().push_back(uint8_t(AbsValue >> (i * 8))); + } else { + DF->addFixup(MCFixup::Create(DF->getContents().size(), + AddValueSymbols(Value), + MCFixup::getKindForSize(Size))); + DF->getContents().resize(DF->getContents().size() + Size, 0); + } } void WinCOFFStreamer::EmitGPRel32Value(const MCExpr *Value) { - dbg_notimpl("Value = '" << *Value); + llvm_unreachable("not implemented"); } void WinCOFFStreamer::EmitValueToAlignment(unsigned ByteAlignment, - int64_t Value, - unsigned ValueSize, - unsigned MaxBytesToEmit) { + int64_t Value, + unsigned ValueSize, + unsigned MaxBytesToEmit) { + // TODO: This is copied exactly from the MachOStreamer. Consider merging into + // MCObjectStreamer? + if (MaxBytesToEmit == 0) + MaxBytesToEmit = ByteAlignment; + new MCAlignFragment(ByteAlignment, Value, ValueSize, MaxBytesToEmit, + getCurrentSectionData()); + + // Update the maximum alignment on the current section if necessary. + if (ByteAlignment > getCurrentSectionData()->getAlignment()) + getCurrentSectionData()->setAlignment(ByteAlignment); } void WinCOFFStreamer::EmitCodeAlignment(unsigned ByteAlignment, - unsigned MaxBytesToEmit = 0) { + unsigned MaxBytesToEmit) { + // TODO: This is copied exactly from the MachOStreamer. Consider merging into + // MCObjectStreamer? + if (MaxBytesToEmit == 0) + MaxBytesToEmit = ByteAlignment; + MCAlignFragment *F = new MCAlignFragment(ByteAlignment, 0, 1, MaxBytesToEmit, + getCurrentSectionData()); + F->setEmitNops(true); + + // Update the maximum alignment on the current section if necessary. + if (ByteAlignment > getCurrentSectionData()->getAlignment()) + getCurrentSectionData()->setAlignment(ByteAlignment); } void WinCOFFStreamer::EmitValueToOffset(const MCExpr *Offset, - unsigned char Value = 0) { - dbg_notimpl("Offset = '" << *Offset << "', Value = " << Value); + unsigned char Value) { + llvm_unreachable("not implemented"); } void WinCOFFStreamer::EmitFileDirective(StringRef Filename) { @@ -176,11 +310,24 @@ } void WinCOFFStreamer::EmitDwarfFileDirective(unsigned FileNo, - StringRef Filename) { - dbg_notimpl("FileNo = " << FileNo << ", Filename = '" << Filename << "'"); + StringRef Filename) { + llvm_unreachable("not implemented"); } void WinCOFFStreamer::EmitInstruction(const MCInst &Instruction) { + for (unsigned i = 0, e = Instruction.getNumOperands(); i != e; ++i) + if (Instruction.getOperand(i).isExpr()) + AddValueSymbols(Instruction.getOperand(i).getExpr()); + + getCurrentSectionData()->setHasInstructions(true); + + MCInstFragment *Fragment = + new MCInstFragment(Instruction, getCurrentSectionData()); + + raw_svector_ostream VecOS(Fragment->getCode()); + + getAssembler().getEmitter().EncodeInstruction(Instruction, VecOS, + Fragment->getFixups()); } void WinCOFFStreamer::Finish() { From daniel at zuster.org Mon Jul 19 01:14:44 2010 From: daniel at zuster.org (Daniel Dunbar) Date: Mon, 19 Jul 2010 06:14:44 -0000 Subject: [llvm-commits] [llvm] r108679 - /llvm/trunk/lib/Target/X86/X86InstrInfo.td Message-ID: <20100719061444.C5E042A6C12C@llvm.org> Author: ddunbar Date: Mon Jul 19 01:14:44 2010 New Revision: 108679 URL: http://llvm.org/viewvc/llvm-project?rev=108679&view=rev Log: X86: MOV8o8a, MOV8ao8, etc. are only valid in 32-bit mode. 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=108679&r1=108678&r2=108679&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86InstrInfo.td (original) +++ llvm/trunk/lib/Target/X86/X86InstrInfo.td Mon Jul 19 01:14:44 2010 @@ -1025,17 +1025,23 @@ /// moffs8, moffs16 and moffs32 versions of moves. The immediate is a /// 32-bit offset from the PC. These are only valid in x86-32 mode. def MOV8o8a : Ii32 <0xA0, RawFrm, (outs), (ins offset8:$src), - "mov{b}\t{$src, %al|%al, $src}", []>; + "mov{b}\t{$src, %al|%al, $src}", []>, + Requires<[In32BitMode]>; def MOV16o16a : Ii32 <0xA1, RawFrm, (outs), (ins offset16:$src), - "mov{w}\t{$src, %ax|%ax, $src}", []>, OpSize; + "mov{w}\t{$src, %ax|%ax, $src}", []>, OpSize, + Requires<[In32BitMode]>; def MOV32o32a : Ii32 <0xA1, RawFrm, (outs), (ins offset32:$src), - "mov{l}\t{$src, %eax|%eax, $src}", []>; + "mov{l}\t{$src, %eax|%eax, $src}", []>, + Requires<[In32BitMode]>; def MOV8ao8 : Ii32 <0xA2, RawFrm, (outs offset8:$dst), (ins), - "mov{b}\t{%al, $dst|$dst, %al}", []>; + "mov{b}\t{%al, $dst|$dst, %al}", []>, + Requires<[In32BitMode]>; def MOV16ao16 : Ii32 <0xA3, RawFrm, (outs offset16:$dst), (ins), - "mov{w}\t{%ax, $dst|$dst, %ax}", []>, OpSize; + "mov{w}\t{%ax, $dst|$dst, %ax}", []>, OpSize, + Requires<[In32BitMode]>; def MOV32ao32 : Ii32 <0xA3, RawFrm, (outs offset32:$dst), (ins), - "mov{l}\t{%eax, $dst|$dst, %eax}", []>; + "mov{l}\t{%eax, $dst|$dst, %eax}", []>, + Requires<[In32BitMode]>; // Moves to and from segment registers def MOV16rs : I<0x8C, MRMDestReg, (outs GR16:$dst), (ins SEGMENT_REG:$src), From daniel at zuster.org Mon Jul 19 01:14:49 2010 From: daniel at zuster.org (Daniel Dunbar) Date: Mon, 19 Jul 2010 06:14:49 -0000 Subject: [llvm-commits] [llvm] r108680 - in /llvm/trunk/lib/Target/X86: X86Instr64bit.td X86InstrInfo.td Message-ID: <20100719061449.79EF12A6C12D@llvm.org> Author: ddunbar Date: Mon Jul 19 01:14:49 2010 New Revision: 108680 URL: http://llvm.org/viewvc/llvm-project?rev=108680&view=rev Log: X86: Mark MOV.*_{TC,NOREX} instruction as code gen only, they aren't real. Modified: llvm/trunk/lib/Target/X86/X86Instr64bit.td llvm/trunk/lib/Target/X86/X86InstrInfo.td Modified: llvm/trunk/lib/Target/X86/X86Instr64bit.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86Instr64bit.td?rev=108680&r1=108679&r2=108680&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86Instr64bit.td (original) +++ llvm/trunk/lib/Target/X86/X86Instr64bit.td Mon Jul 19 01:14:49 2010 @@ -374,6 +374,7 @@ [(store i64immSExt32:$src, addr:$dst)]>; /// Versions of MOV64rr, MOV64rm, and MOV64mr for i64mem_TC and GR64_TC. +let isCodeGenOnly = 1 in { let neverHasSideEffects = 1 in def MOV64rr_TC : RI<0x89, MRMDestReg, (outs GR64_TC:$dst), (ins GR64_TC:$src), "mov{q}\t{$src, $dst|$dst, $src}", []>; @@ -388,6 +389,7 @@ def MOV64mr_TC : RI<0x89, MRMDestMem, (outs), (ins i64mem_TC:$dst, GR64_TC:$src), "mov{q}\t{$src, $dst|$dst, $src}", []>; +} def MOV64o8a : RIi8<0xA0, RawFrm, (outs), (ins offset8:$src), "mov{q}\t{$src, %rax|%rax, $src}", []>; Modified: llvm/trunk/lib/Target/X86/X86InstrInfo.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrInfo.td?rev=108680&r1=108679&r2=108680&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86InstrInfo.td (original) +++ llvm/trunk/lib/Target/X86/X86InstrInfo.td Mon Jul 19 01:14:49 2010 @@ -1093,6 +1093,7 @@ [(store GR32:$src, addr:$dst)]>; /// Versions of MOV32rr, MOV32rm, and MOV32mr for i32mem_TC and GR32_TC. +let isCodeGenOnly = 1 in { let neverHasSideEffects = 1 in def MOV32rr_TC : I<0x89, MRMDestReg, (outs GR32_TC:$dst), (ins GR32_TC:$src), "mov{l}\t{$src, $dst|$dst, $src}", []>; @@ -1107,10 +1108,12 @@ def MOV32mr_TC : I<0x89, MRMDestMem, (outs), (ins i32mem_TC:$dst, GR32_TC:$src), "mov{l}\t{$src, $dst|$dst, $src}", []>; +} // Versions of MOV8rr, MOV8mr, and MOV8rm that use i8mem_NOREX and GR8_NOREX so // that they can be used for copying and storing h registers, which can't be // encoded when a REX prefix is present. +let isCodeGenOnly = 1 in { let neverHasSideEffects = 1 in def MOV8rr_NOREX : I<0x88, MRMDestReg, (outs GR8_NOREX:$dst), (ins GR8_NOREX:$src), @@ -1124,6 +1127,7 @@ def MOV8rm_NOREX : I<0x8A, MRMSrcMem, (outs GR8_NOREX:$dst), (ins i8mem_NOREX:$src), "mov{b}\t{$src, $dst|$dst, $src} # NOREX", []>; +} // Moves to and from debug registers def MOV32rd : I<0x21, MRMDestReg, (outs GR32:$dst), (ins DEBUG_REG:$src), From daniel at zuster.org Mon Jul 19 01:14:54 2010 From: daniel at zuster.org (Daniel Dunbar) Date: Mon, 19 Jul 2010 06:14:54 -0000 Subject: [llvm-commits] [llvm] r108681 - in /llvm/trunk: lib/Target/X86/AsmParser/X86AsmParser.cpp lib/Target/X86/X86.td test/MC/AsmParser/X86/x86_64-new-encoder.s Message-ID: <20100719061454.3853E2A6C12C@llvm.org> Author: ddunbar Date: Mon Jul 19 01:14:54 2010 New Revision: 108681 URL: http://llvm.org/viewvc/llvm-project?rev=108681&view=rev Log: MC/X86: We now match instructions like "incl %eax" correctly for the arch we are assembling; remove crufty custom cleanup code. Modified: llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp llvm/trunk/lib/Target/X86/X86.td llvm/trunk/test/MC/AsmParser/X86/x86_64-new-encoder.s Modified: llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp?rev=108681&r1=108680&r2=108681&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp (original) +++ llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp Mon Jul 19 01:14:54 2010 @@ -50,8 +50,6 @@ bool ParseDirectiveWord(unsigned Size, SMLoc L); - void InstructionCleanup(MCInst &Inst); - bool MatchInstruction(const SmallVectorImpl &Operands, MCInst &Inst); @@ -840,57 +838,6 @@ return false; } -/// LowerMOffset - Lower an 'moffset' form of an instruction, which just has a -/// imm operand, to having "rm" or "mr" operands with the offset in the disp -/// field. -static void LowerMOffset(MCInst &Inst, unsigned Opc, unsigned RegNo, - bool isMR) { - MCOperand Disp = Inst.getOperand(0); - - // Start over with an empty instruction. - Inst = MCInst(); - Inst.setOpcode(Opc); - - if (!isMR) - Inst.addOperand(MCOperand::CreateReg(RegNo)); - - // Add the mem operand. - Inst.addOperand(MCOperand::CreateReg(0)); // Segment - Inst.addOperand(MCOperand::CreateImm(1)); // Scale - Inst.addOperand(MCOperand::CreateReg(0)); // IndexReg - Inst.addOperand(Disp); // Displacement - Inst.addOperand(MCOperand::CreateReg(0)); // BaseReg - - if (isMR) - Inst.addOperand(MCOperand::CreateReg(RegNo)); -} - -// FIXME: Custom X86 cleanup function to implement a temporary hack to handle -// matching INCL/DECL correctly for x86_64. This needs to be replaced by a -// proper mechanism for supporting (ambiguous) feature dependent instructions. -void X86ATTAsmParser::InstructionCleanup(MCInst &Inst) { - if (!Is64Bit) return; - - switch (Inst.getOpcode()) { - case X86::DEC16r: Inst.setOpcode(X86::DEC64_16r); break; - case X86::DEC16m: Inst.setOpcode(X86::DEC64_16m); break; - case X86::DEC32r: Inst.setOpcode(X86::DEC64_32r); break; - case X86::DEC32m: Inst.setOpcode(X86::DEC64_32m); break; - case X86::INC16r: Inst.setOpcode(X86::INC64_16r); break; - case X86::INC16m: Inst.setOpcode(X86::INC64_16m); break; - case X86::INC32r: Inst.setOpcode(X86::INC64_32r); break; - case X86::INC32m: Inst.setOpcode(X86::INC64_32m); break; - - // moffset instructions are x86-32 only. - case X86::MOV8o8a: LowerMOffset(Inst, X86::MOV8rm , X86::AL , false); break; - case X86::MOV16o16a: LowerMOffset(Inst, X86::MOV16rm, X86::AX , false); break; - case X86::MOV32o32a: LowerMOffset(Inst, X86::MOV32rm, X86::EAX, false); break; - case X86::MOV8ao8: LowerMOffset(Inst, X86::MOV8mr , X86::AL , true); break; - case X86::MOV16ao16: LowerMOffset(Inst, X86::MOV16mr, X86::AX , true); break; - case X86::MOV32ao32: LowerMOffset(Inst, X86::MOV32mr, X86::EAX, true); break; - } -} - bool X86ATTAsmParser::MatchInstruction(const SmallVectorImpl &Operands, Modified: llvm/trunk/lib/Target/X86/X86.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86.td?rev=108681&r1=108680&r2=108681&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86.td (original) +++ llvm/trunk/lib/Target/X86/X86.td Mon Jul 19 01:14:54 2010 @@ -180,7 +180,6 @@ // Currently the X86 assembly parser only supports ATT syntax. def ATTAsmParser : AsmParser { string AsmParserClassName = "ATTAsmParser"; - string AsmParserInstCleanup = "InstructionCleanup"; string MatchInstructionName = "MatchInstructionImpl"; int Variant = 0; Modified: llvm/trunk/test/MC/AsmParser/X86/x86_64-new-encoder.s URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AsmParser/X86/x86_64-new-encoder.s?rev=108681&r1=108680&r2=108681&view=diff ============================================================================== --- llvm/trunk/test/MC/AsmParser/X86/x86_64-new-encoder.s (original) +++ llvm/trunk/test/MC/AsmParser/X86/x86_64-new-encoder.s Mon Jul 19 01:14:54 2010 @@ -72,9 +72,9 @@ // Not moffset forms of moves, they are x86-32 only! rdar://7947184 -movb 0, %al // CHECK: movb 0, %al # encoding: [0x8a,0x04,0x25,A,A,A,A] -movw 0, %ax // CHECK: movw 0, %ax # encoding: [0x66,0x8b,0x04,0x25,A,A,A,A] -movl 0, %eax // CHECK: movl 0, %eax # encoding: [0x8b,0x04,0x25,A,A,A,A] +movb 0, %al // CHECK: movb 0, %al # encoding: [0x8a,0x04,0x25,0x00,0x00,0x00,0x00] +movw 0, %ax // CHECK: movw 0, %ax # encoding: [0x66,0x8b,0x04,0x25,0x00,0x00,0x00,0x00] +movl 0, %eax // CHECK: movl 0, %eax # encoding: [0x8b,0x04,0x25,0x00,0x00,0x00,0x00] // CHECK: pushfq # encoding: [0x9c] pushf From bigcheesegs at gmail.com Mon Jul 19 01:26:19 2010 From: bigcheesegs at gmail.com (Michael J. Spencer) Date: Mon, 19 Jul 2010 06:26:19 -0000 Subject: [llvm-commits] [llvm] r108682 - /llvm/trunk/lib/MC/MCStreamer.cpp Message-ID: <20100719062619.997C72A6C12C@llvm.org> Author: mspencer Date: Mon Jul 19 01:26:19 2010 New Revision: 108682 URL: http://llvm.org/viewvc/llvm-project?rev=108682&view=rev Log: _[A-Z] identifiers are reserved for the implementation. Modified: llvm/trunk/lib/MC/MCStreamer.cpp Modified: llvm/trunk/lib/MC/MCStreamer.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCStreamer.cpp?rev=108682&r1=108681&r2=108682&view=diff ============================================================================== --- llvm/trunk/lib/MC/MCStreamer.cpp (original) +++ llvm/trunk/lib/MC/MCStreamer.cpp Mon Jul 19 01:26:19 2010 @@ -15,7 +15,7 @@ #include using namespace llvm; -MCStreamer::MCStreamer(MCContext &_Context) : Context(_Context), CurSection(0) { +MCStreamer::MCStreamer(MCContext &Ctx) : Context(Ctx), CurSection(0) { } MCStreamer::~MCStreamer() { From daniel at zuster.org Mon Jul 19 02:21:01 2010 From: daniel at zuster.org (Daniel Dunbar) Date: Mon, 19 Jul 2010 07:21:01 -0000 Subject: [llvm-commits] [llvm] r108683 - in /llvm/trunk/lib/Target/X86: X86Instr64bit.td X86InstrInfo.td Message-ID: <20100719072101.ABC9F2A6C12C@llvm.org> Author: ddunbar Date: Mon Jul 19 02:21:01 2010 New Revision: 108683 URL: http://llvm.org/viewvc/llvm-project?rev=108683&view=rev Log: X86: Mark In32/64BitMode on LEAVE[64] and SYSEXIT[64]. Modified: llvm/trunk/lib/Target/X86/X86Instr64bit.td llvm/trunk/lib/Target/X86/X86InstrInfo.td Modified: llvm/trunk/lib/Target/X86/X86Instr64bit.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86Instr64bit.td?rev=108683&r1=108682&r2=108683&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86Instr64bit.td (original) +++ llvm/trunk/lib/Target/X86/X86Instr64bit.td Mon Jul 19 02:21:01 2010 @@ -246,7 +246,7 @@ let Defs = [RBP,RSP], Uses = [RBP,RSP], mayLoad = 1, neverHasSideEffects = 1 in def LEAVE64 : I<0xC9, RawFrm, - (outs), (ins), "leave", []>; + (outs), (ins), "leave", []>, Requires<[In64BitMode]>; let Defs = [RSP], Uses = [RSP], neverHasSideEffects=1 in { let mayLoad = 1 in { def POP64r : I<0x58, AddRegFrm, @@ -330,7 +330,7 @@ // Fast system-call instructions def SYSEXIT64 : RI<0x35, RawFrm, - (outs), (ins), "sysexit", []>, TB; + (outs), (ins), "sysexit", []>, TB, Requires<[In64BitMode]>; //===----------------------------------------------------------------------===// // Move Instructions... Modified: llvm/trunk/lib/Target/X86/X86InstrInfo.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrInfo.td?rev=108683&r1=108682&r2=108683&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86InstrInfo.td (original) +++ llvm/trunk/lib/Target/X86/X86InstrInfo.td Mon Jul 19 02:21:01 2010 @@ -756,7 +756,7 @@ // let Defs = [EBP, ESP], Uses = [EBP, ESP], mayLoad = 1, neverHasSideEffects=1 in def LEAVE : I<0xC9, RawFrm, - (outs), (ins), "leave", []>; + (outs), (ins), "leave", []>, Requires<[In32BitMode]>; def POPCNT16rr : I<0xB8, MRMSrcReg, (outs GR16:$dst), (ins GR16:$src), "popcnt{w}\t{$src, $dst|$dst, $src}", []>, OpSize, XS; @@ -934,7 +934,7 @@ def SYSENTER : I<0x34, RawFrm, (outs), (ins), "sysenter", []>, TB; def SYSEXIT : I<0x35, RawFrm, - (outs), (ins), "sysexit", []>, TB; + (outs), (ins), "sysexit", []>, TB, Requires<[In32BitMode]>; def WAIT : I<0x9B, RawFrm, (outs), (ins), "wait", []>; From daniel at zuster.org Mon Jul 19 02:21:08 2010 From: daniel at zuster.org (Daniel Dunbar) Date: Mon, 19 Jul 2010 07:21:08 -0000 Subject: [llvm-commits] [llvm] r108685 - in /llvm/trunk: lib/Target/X86/X86Instr64bit.td test/MC/AsmParser/X86/x86_instructions.s Message-ID: <20100719072108.253742A6C12E@llvm.org> Author: ddunbar Date: Mon Jul 19 02:21:07 2010 New Revision: 108685 URL: http://llvm.org/viewvc/llvm-project?rev=108685&view=rev Log: X86-64: Mark WINCALL and more tail call instructions as code gen only. Modified: llvm/trunk/lib/Target/X86/X86Instr64bit.td llvm/trunk/test/MC/AsmParser/X86/x86_instructions.s Modified: llvm/trunk/lib/Target/X86/X86Instr64bit.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86Instr64bit.td?rev=108685&r1=108684&r2=108685&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86Instr64bit.td (original) +++ llvm/trunk/lib/Target/X86/X86Instr64bit.td Mon Jul 19 02:21:07 2010 @@ -158,7 +158,7 @@ // FIXME: We need to teach codegen about single list of call-clobbered // registers. -let isCall = 1 in +let isCall = 1, isCodeGenOnly = 1 in // All calls clobber the non-callee saved registers. RSP is marked as // a use to prevent stack-pointer assignments that appear immediately // before calls from potentially appearing dead. Uses for argument @@ -182,7 +182,8 @@ } -let isCall = 1, isTerminator = 1, isReturn = 1, isBarrier = 1 in +let isCall = 1, isTerminator = 1, isReturn = 1, isBarrier = 1, + isCodeGenOnly = 1 in let Defs = [RAX, RCX, RDX, RSI, RDI, R8, R9, R10, R11, FP0, FP1, FP2, FP3, FP4, FP5, FP6, ST0, ST1, MM0, MM1, MM2, MM3, MM4, MM5, MM6, MM7, Modified: llvm/trunk/test/MC/AsmParser/X86/x86_instructions.s URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AsmParser/X86/x86_instructions.s?rev=108685&r1=108684&r2=108685&view=diff ============================================================================== --- llvm/trunk/test/MC/AsmParser/X86/x86_instructions.s (original) +++ llvm/trunk/test/MC/AsmParser/X86/x86_instructions.s Mon Jul 19 02:21:07 2010 @@ -56,7 +56,7 @@ subl %eax, %ebx // FIXME: Check that this matches the correct instruction. -// CHECK: call *%rax +// CHECK: callq *%rax call *%rax // FIXME: Check that this matches the correct instruction. From daniel at zuster.org Mon Jul 19 02:21:04 2010 From: daniel at zuster.org (Daniel Dunbar) Date: Mon, 19 Jul 2010 07:21:04 -0000 Subject: [llvm-commits] [llvm] r108684 - /llvm/trunk/lib/Target/X86/X86InstrInfo.td Message-ID: <20100719072104.8426E2A6C12D@llvm.org> Author: ddunbar Date: Mon Jul 19 02:21:04 2010 New Revision: 108684 URL: http://llvm.org/viewvc/llvm-project?rev=108684&view=rev Log: X86: Mark some tail call pseduo instruction as code gen only. 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=108684&r1=108683&r2=108684&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86InstrInfo.td (original) +++ llvm/trunk/lib/Target/X86/X86InstrInfo.td Mon Jul 19 02:21:04 2010 @@ -721,7 +721,8 @@ // Tail call stuff. -let isCall = 1, isTerminator = 1, isReturn = 1, isBarrier = 1 in +let isCall = 1, isTerminator = 1, isReturn = 1, isBarrier = 1, + isCodeGenOnly = 1 in let Defs = [EAX, ECX, EDX, FP0, FP1, FP2, FP3, FP4, FP5, FP6, ST0, MM0, MM1, MM2, MM3, MM4, MM5, MM6, MM7, XMM0, XMM1, XMM2, XMM3, XMM4, XMM5, XMM6, XMM7, From resistor at mac.com Mon Jul 19 03:09:34 2010 From: resistor at mac.com (Owen Anderson) Date: Mon, 19 Jul 2010 08:09:34 -0000 Subject: [llvm-commits] [llvm] r108687 - /llvm/trunk/lib/Transforms/InstCombine/InstCombineCasts.cpp Message-ID: <20100719080934.7BDF42A6C12D@llvm.org> Author: resistor Date: Mon Jul 19 03:09:34 2010 New Revision: 108687 URL: http://llvm.org/viewvc/llvm-project?rev=108687&view=rev Log: Reimplement r108639 in InstCombine rather than DAGCombine. Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineCasts.cpp Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineCasts.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstCombineCasts.cpp?rev=108687&r1=108686&r2=108687&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/InstCombine/InstCombineCasts.cpp (original) +++ llvm/trunk/lib/Transforms/InstCombine/InstCombineCasts.cpp Mon Jul 19 03:09:34 2010 @@ -1097,6 +1097,32 @@ break; } } + + // Fold (fptrunc (sqrt (fpext x))) -> (sqrtf x) + // NOTE: This should be disabled by -fno-builtin-sqrt if we ever support it. + CallInst *Call = dyn_cast(CI.getOperand(0)); + if (Call && Call->getCalledFunction() && + Call->getCalledFunction()->getName() == "sqrt" && + Call->getNumArgOperands() == 1) { + CastInst *Arg = dyn_cast(Call->getArgOperand(0)); + if (Arg && Arg->getOpcode() == Instruction::FPExt && + CI.getType() == Builder->getFloatTy() && + Call->getType() == Builder->getDoubleTy() && + Arg->getType() == Builder->getDoubleTy() && + Arg->getOperand(0)->getType() == Builder->getFloatTy()) { + Module* M = CI.getParent()->getParent()->getParent(); + Constant* SqrtfFunc = M->getOrInsertFunction("sqrtf", + Call->getAttributes(), + Builder->getFloatTy(), + Builder->getFloatTy(), + NULL); + CallInst *ret = CallInst::Create(SqrtfFunc, Arg->getOperand(0), + "sqrtfcall"); + ret->setAttributes(Call->getAttributes()); + return ret; + } + } + return 0; } From resistor at mac.com Mon Jul 19 03:10:24 2010 From: resistor at mac.com (Owen Anderson) Date: Mon, 19 Jul 2010 08:10:24 -0000 Subject: [llvm-commits] [llvm] r108688 - in /llvm/trunk: lib/CodeGen/SelectionDAG/DAGCombiner.cpp test/CodeGen/X86/2010-07-18-sqrt.ll Message-ID: <20100719081024.56DF92A6C12D@llvm.org> Author: resistor Date: Mon Jul 19 03:10:24 2010 New Revision: 108688 URL: http://llvm.org/viewvc/llvm-project?rev=108688&view=rev Log: Remove r108639 now that it is handled by InstCombine instead. Removed: llvm/trunk/test/CodeGen/X86/2010-07-18-sqrt.ll 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=108688&r1=108687&r2=108688&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Mon Jul 19 03:10:24 2010 @@ -4926,19 +4926,6 @@ return DAG.getNode(ISD::FCOPYSIGN, N->getDebugLoc(), VT, Tmp, N0.getOperand(1)); } - - // (f32 fp_round (f64 sqrt (f64 fp_extend (f32)))) -> (f32 sqrt) - EVT VT0 = N0.getValueType(); - if (VT == MVT::f32 && - N0.getOpcode() == ISD::FSQRT && VT0 == MVT::f64) { - SDValue N1 = N0.getOperand(0); - EVT VT1 = N1.getValueType(); - if (N1.getOpcode() == ISD::FP_EXTEND && VT1 == MVT::f64 && - N1.getOperand(0).getValueType() == MVT::f32) { - return DAG.getNode(ISD::FSQRT, N->getDebugLoc(), MVT::f32, - N1.getOperand(0), N->getOperand(1)); - } - } return SDValue(); } Removed: llvm/trunk/test/CodeGen/X86/2010-07-18-sqrt.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2010-07-18-sqrt.ll?rev=108687&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/X86/2010-07-18-sqrt.ll (original) +++ llvm/trunk/test/CodeGen/X86/2010-07-18-sqrt.ll (removed) @@ -1,17 +0,0 @@ -; RUN: llc < %s -march=x86 -mattr=+sse2 | FileCheck %s -target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64" -target triple = "x86_64-apple-darwin10.0.0" - -define float @foo(float %x) nounwind readnone ssp { -entry: -; CHECK-NOT: cvtss2sd -; CHECK-NOT: sqrtsd -; CHECK-NOT: cvtsd2ss -; CHECK: sqrtss - %conv = fpext float %x to double ; [#uses=1] - %call = tail call double @sqrt(double %conv) nounwind ; [#uses=1] - %conv1 = fptrunc double %call to float ; [#uses=1] - ret float %conv1 -} - -declare double @sqrt(double) readnone From resistor at mac.com Mon Jul 19 03:14:26 2010 From: resistor at mac.com (Owen Anderson) Date: Mon, 19 Jul 2010 08:14:26 -0000 Subject: [llvm-commits] [llvm] r108689 - /llvm/trunk/test/Transforms/InstCombine/2010-07-19-sqrt.ll Message-ID: <20100719081426.D8CA62A6C12D@llvm.org> Author: resistor Date: Mon Jul 19 03:14:26 2010 New Revision: 108689 URL: http://llvm.org/viewvc/llvm-project?rev=108689&view=rev Log: Testcase for r108687. Added: llvm/trunk/test/Transforms/InstCombine/2010-07-19-sqrt.ll Added: llvm/trunk/test/Transforms/InstCombine/2010-07-19-sqrt.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/2010-07-19-sqrt.ll?rev=108689&view=auto ============================================================================== --- llvm/trunk/test/Transforms/InstCombine/2010-07-19-sqrt.ll (added) +++ llvm/trunk/test/Transforms/InstCombine/2010-07-19-sqrt.ll Mon Jul 19 03:14:26 2010 @@ -0,0 +1,16 @@ +; RUN: opt -S -instcombine %s | FileCheck %s + +define float @foo(float %x) nounwind readnone ssp { +entry: +; CHECK-NOT: fpext +; CHECK-NOT: sqrt( +; CHECK: sqrtf( +; CHECK-NOT: fptrunc + %conv = fpext float %x to double ; [#uses=1] + %call = tail call double @sqrt(double %conv) nounwind ; [#uses=1] + %conv1 = fptrunc double %call to float ; [#uses=1] +; CHECK: ret float + ret float %conv1 +} + +declare double @sqrt(double) readnone From baldrick at free.fr Mon Jul 19 04:33:14 2010 From: baldrick at free.fr (Duncan Sands) Date: Mon, 19 Jul 2010 09:33:14 -0000 Subject: [llvm-commits] [llvm] r108690 - in /llvm/trunk: include/llvm-c/ExecutionEngine.h lib/ExecutionEngine/ExecutionEngineBindings.cpp Message-ID: <20100719093314.1860D2A6C12C@llvm.org> Author: baldrick Date: Mon Jul 19 04:33:13 2010 New Revision: 108690 URL: http://llvm.org/viewvc/llvm-project?rev=108690&view=rev Log: Expose JIT::recompileAndRelinkFunction for use through the C API. Patch by Benjamin Saunders. Modified: llvm/trunk/include/llvm-c/ExecutionEngine.h llvm/trunk/lib/ExecutionEngine/ExecutionEngineBindings.cpp Modified: llvm/trunk/include/llvm-c/ExecutionEngine.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm-c/ExecutionEngine.h?rev=108690&r1=108689&r2=108690&view=diff ============================================================================== --- llvm/trunk/include/llvm-c/ExecutionEngine.h (original) +++ llvm/trunk/include/llvm-c/ExecutionEngine.h Mon Jul 19 04:33:13 2010 @@ -116,6 +116,8 @@ LLVMBool LLVMFindFunction(LLVMExecutionEngineRef EE, const char *Name, LLVMValueRef *OutFn); +void *LLVMRecompileAndRelinkFunction(LLVMExecutionEngineRef EE, LLVMValueRef Fn); + LLVMTargetDataRef LLVMGetExecutionEngineTargetData(LLVMExecutionEngineRef EE); void LLVMAddGlobalMapping(LLVMExecutionEngineRef EE, LLVMValueRef Global, Modified: llvm/trunk/lib/ExecutionEngine/ExecutionEngineBindings.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/ExecutionEngineBindings.cpp?rev=108690&r1=108689&r2=108690&view=diff ============================================================================== --- llvm/trunk/lib/ExecutionEngine/ExecutionEngineBindings.cpp (original) +++ llvm/trunk/lib/ExecutionEngine/ExecutionEngineBindings.cpp Mon Jul 19 04:33:13 2010 @@ -236,6 +236,10 @@ return 1; } +void *LLVMRecompileAndRelinkFunction(LLVMExecutionEngineRef EE, LLVMValueRef Fn) { + return unwrap(EE)->recompileAndRelinkFunction(unwrap(Fn)); +} + LLVMTargetDataRef LLVMGetExecutionEngineTargetData(LLVMExecutionEngineRef EE) { return wrap(unwrap(EE)->getTargetData()); } From baldrick at free.fr Mon Jul 19 04:36:45 2010 From: baldrick at free.fr (Duncan Sands) Date: Mon, 19 Jul 2010 09:36:45 -0000 Subject: [llvm-commits] [llvm] r108691 - /llvm/trunk/lib/ExecutionEngine/ExecutionEngineBindings.cpp Message-ID: <20100719093645.78A0B2A6C12C@llvm.org> Author: baldrick Date: Mon Jul 19 04:36:45 2010 New Revision: 108691 URL: http://llvm.org/viewvc/llvm-project?rev=108691&view=rev Log: Fix indentation. Modified: llvm/trunk/lib/ExecutionEngine/ExecutionEngineBindings.cpp Modified: llvm/trunk/lib/ExecutionEngine/ExecutionEngineBindings.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/ExecutionEngineBindings.cpp?rev=108691&r1=108690&r2=108691&view=diff ============================================================================== --- llvm/trunk/lib/ExecutionEngine/ExecutionEngineBindings.cpp (original) +++ llvm/trunk/lib/ExecutionEngine/ExecutionEngineBindings.cpp Mon Jul 19 04:36:45 2010 @@ -237,7 +237,7 @@ } void *LLVMRecompileAndRelinkFunction(LLVMExecutionEngineRef EE, LLVMValueRef Fn) { - return unwrap(EE)->recompileAndRelinkFunction(unwrap(Fn)); + return unwrap(EE)->recompileAndRelinkFunction(unwrap(Fn)); } LLVMTargetDataRef LLVMGetExecutionEngineTargetData(LLVMExecutionEngineRef EE) { From ggreif at gmail.com Mon Jul 19 09:48:15 2010 From: ggreif at gmail.com (Gabor Greif) Date: Mon, 19 Jul 2010 14:48:15 -0000 Subject: [llvm-commits] [llvm] r108695 - /llvm/trunk/lib/VMCore/Use.cpp Message-ID: <20100719144815.307D52A6C12C@llvm.org> Author: ggreif Date: Mon Jul 19 09:48:15 2010 New Revision: 108695 URL: http://llvm.org/viewvc/llvm-project?rev=108695&view=rev Log: precompute 20 tags Modified: llvm/trunk/lib/VMCore/Use.cpp Modified: llvm/trunk/lib/VMCore/Use.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Use.cpp?rev=108695&r1=108694&r2=108695&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/Use.cpp (original) +++ llvm/trunk/lib/VMCore/Use.cpp Mon Jul 19 09:48:15 2010 @@ -86,11 +86,17 @@ //===----------------------------------------------------------------------===// Use *Use::initTags(Use * const Start, Use *Stop, ptrdiff_t Done) { - while (Done < 6) { + while (Done < 20) { if (Start == Stop--) return Start; - static const PrevPtrTag tags[6] = { fullStopTag, oneDigitTag, stopTag, - oneDigitTag, oneDigitTag, stopTag }; + static const PrevPtrTag tags[20] = { fullStopTag, oneDigitTag, stopTag, + oneDigitTag, oneDigitTag, stopTag, + zeroDigitTag, oneDigitTag, oneDigitTag, + stopTag, zeroDigitTag, oneDigitTag, + zeroDigitTag, oneDigitTag, stopTag, + oneDigitTag, oneDigitTag, oneDigitTag, + oneDigitTag, stopTag + }; Stop->Prev.setFromOpaqueValue(reinterpret_cast(tags[Done++])); Stop->Val = 0; } From daniel at zuster.org Mon Jul 19 09:53:46 2010 From: daniel at zuster.org (Daniel Dunbar) Date: Mon, 19 Jul 2010 14:53:46 -0000 Subject: [llvm-commits] [zorg] r108696 - /zorg/trunk/buildbot/osuosl/master/master.cfg Message-ID: <20100719145346.C6CF32A6C12C@llvm.org> Author: ddunbar Date: Mon Jul 19 09:53:46 2010 New Revision: 108696 URL: http://llvm.org/viewvc/llvm-project?rev=108696&view=rev Log: buildbot: Use gzip instead of bzip2 for log compression. Modified: zorg/trunk/buildbot/osuosl/master/master.cfg Modified: zorg/trunk/buildbot/osuosl/master/master.cfg URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/buildbot/osuosl/master/master.cfg?rev=108696&r1=108695&r2=108696&view=diff ============================================================================== --- zorg/trunk/buildbot/osuosl/master/master.cfg (original) +++ zorg/trunk/buildbot/osuosl/master/master.cfg Mon Jul 19 09:53:46 2010 @@ -79,6 +79,9 @@ # Number of builds to cache in memory. c['buildCacheSize'] = 1000 +# Use gzip instead of bz2, to reduce server load. +c['logCompressionMethod'] = 'gz' + ####### SCHEDULERS from buildbot.scheduler import Scheduler From lhames at gmail.com Mon Jul 19 10:22:28 2010 From: lhames at gmail.com (Lang Hames) Date: Mon, 19 Jul 2010 15:22:28 -0000 Subject: [llvm-commits] [llvm] r108698 - in /llvm/trunk: include/llvm/CodeGen/SlotIndexes.h lib/CodeGen/RegAllocPBQP.cpp lib/CodeGen/RenderMachineFunction.cpp lib/CodeGen/RenderMachineFunction.h Message-ID: <20100719152229.036432A6C12C@llvm.org> Author: lhames Date: Mon Jul 19 10:22:28 2010 New Revision: 108698 URL: http://llvm.org/viewvc/llvm-project?rev=108698&view=rev Log: Render MachineFunctions to HTML pages, with options to render register pressure estimates and liveness alongside. Still experimental. Added: llvm/trunk/lib/CodeGen/RenderMachineFunction.cpp llvm/trunk/lib/CodeGen/RenderMachineFunction.h Modified: llvm/trunk/include/llvm/CodeGen/SlotIndexes.h llvm/trunk/lib/CodeGen/RegAllocPBQP.cpp Modified: llvm/trunk/include/llvm/CodeGen/SlotIndexes.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/SlotIndexes.h?rev=108698&r1=108697&r2=108698&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/SlotIndexes.h (original) +++ llvm/trunk/include/llvm/CodeGen/SlotIndexes.h Mon Jul 19 10:22:28 2010 @@ -494,6 +494,11 @@ return SlotIndex(front(), 0); } + /// Returns the base index of the last slot in this analysis. + SlotIndex getLastIndex() { + return SlotIndex(back(), 0); + } + /// Returns the invalid index marker for this analysis. SlotIndex getInvalidIndex() { return getZeroIndex(); Modified: llvm/trunk/lib/CodeGen/RegAllocPBQP.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RegAllocPBQP.cpp?rev=108698&r1=108697&r2=108698&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/RegAllocPBQP.cpp (original) +++ llvm/trunk/lib/CodeGen/RegAllocPBQP.cpp Mon Jul 19 10:22:28 2010 @@ -34,6 +34,7 @@ #include "PBQP/HeuristicSolver.h" #include "PBQP/Graph.h" #include "PBQP/Heuristics/Briggs.h" +#include "RenderMachineFunction.h" #include "Splitter.h" #include "VirtRegMap.h" #include "VirtRegRewriter.h" @@ -105,6 +106,7 @@ if (pbqpPreSplitting) au.addRequired(); au.addRequired(); + au.addRequired(); MachineFunctionPass::getAnalysisUsage(au); } @@ -866,6 +868,9 @@ vrm = &getAnalysis(); + RenderMachineFunction *rmf = &getAnalysis(); + rmf->renderMachineFunction("Prior to PBQP register allocation."); + DEBUG(dbgs() << "PBQP Register Allocating for " << mf->getFunction()->getName() << "\n"); // Allocator main loop: Added: llvm/trunk/lib/CodeGen/RenderMachineFunction.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RenderMachineFunction.cpp?rev=108698&view=auto ============================================================================== --- llvm/trunk/lib/CodeGen/RenderMachineFunction.cpp (added) +++ llvm/trunk/lib/CodeGen/RenderMachineFunction.cpp Mon Jul 19 10:22:28 2010 @@ -0,0 +1,834 @@ +//===-- llvm/CodeGen/RenderMachineFunction.cpp - MF->HTML -----s-----------===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#define DEBUG_TYPE "rendermf" + +#include "RenderMachineFunction.h" + +#include "llvm/Function.h" +#include "llvm/Module.h" +#include "llvm/ADT/SmallVector.h" +#include "llvm/CodeGen/LiveIntervalAnalysis.h" +#include "llvm/CodeGen/MachineFunction.h" +#include "llvm/CodeGen/MachineInstr.h" +#include "llvm/CodeGen/MachineRegisterInfo.h" +#include "llvm/Support/CommandLine.h" +#include "llvm/Support/Debug.h" +#include "llvm/Support/raw_ostream.h" +#include "llvm/Target/TargetMachine.h" + +#include + +using namespace llvm; + +char RenderMachineFunction::ID = 0; +static RegisterPass +X("rendermf", "Render machine functions (and related info) to HTML pages"); + +static cl::opt +outputFileSuffix("rmf-file-suffix", + cl::desc("Appended to function name to get output file name " + "(default: \".html\")"), + cl::init(".html"), cl::Hidden); + +static cl::opt +machineFuncsToRender("rmf-funcs", + cl::desc("Coma seperated list of functions to render" + ", or \"*\"."), + cl::init(""), cl::Hidden); + +static cl::opt +pressureClasses("rmf-classes", + cl::desc("Register classes to render pressure for."), + cl::init(""), cl::Hidden); + +static cl::opt +showIntervals("rmf-intervals", + cl::desc("Live intervals to show alongside code."), + cl::init(""), cl::Hidden); + +static cl::opt +showEmptyIndexes("rmf-empty-indexes", + cl::desc("Render indexes not associated with instructions or " + "MBB starts."), + cl::init(false), cl::Hidden); + +static cl::opt +useFancyVerticals("rmf-fancy-verts", + cl::desc("Use SVG for vertical text."), + cl::init(true), cl::Hidden); + +namespace llvm { + + bool MFRenderingOptions::renderingOptionsProcessed; + std::set MFRenderingOptions::mfNamesToRender; + bool MFRenderingOptions::renderAllMFs = false; + + std::set MFRenderingOptions::classNamesToRender; + bool MFRenderingOptions::renderAllClasses = false; + + std::set > + MFRenderingOptions::intervalNumsToRender; + unsigned MFRenderingOptions::intervalTypesToRender = ExplicitOnly; + + template + void MFRenderingOptions::splitComaSeperatedList(const std::string &s, + OutputItr outItr) { + std::string::const_iterator curPos = s.begin(); + std::string::const_iterator nextComa = std::find(curPos, s.end(), ','); + while (nextComa != s.end()) { + std::string elem; + std::copy(curPos, nextComa, std::back_inserter(elem)); + *outItr = elem; + ++outItr; + curPos = llvm::next(nextComa); + nextComa = std::find(curPos, s.end(), ','); + } + + if (curPos != s.end()) { + std::string elem; + std::copy(curPos, s.end(), std::back_inserter(elem)); + *outItr = elem; + ++outItr; + } + } + + void MFRenderingOptions::processOptions() { + if (!renderingOptionsProcessed) { + processFuncNames(); + processRegClassNames(); + processIntervalNumbers(); + renderingOptionsProcessed = true; + } + } + + void MFRenderingOptions::processFuncNames() { + if (machineFuncsToRender == "*") { + renderAllMFs = true; + } else { + splitComaSeperatedList(machineFuncsToRender, + std::inserter(mfNamesToRender, + mfNamesToRender.begin())); + } + } + + void MFRenderingOptions::processRegClassNames() { + if (pressureClasses == "*") { + renderAllClasses = true; + } else { + splitComaSeperatedList(pressureClasses, + std::inserter(classNamesToRender, + classNamesToRender.begin())); + } + } + + void MFRenderingOptions::processIntervalNumbers() { + std::set intervalRanges; + splitComaSeperatedList(showIntervals, + std::inserter(intervalRanges, + intervalRanges.begin())); + std::for_each(intervalRanges.begin(), intervalRanges.end(), + processIntervalRange); + } + + void MFRenderingOptions::processIntervalRange( + const std::string &intervalRangeStr) { + if (intervalRangeStr == "*") { + intervalTypesToRender |= All; + } else if (intervalRangeStr == "virt*") { + intervalTypesToRender |= VirtPlusExplicit; + } else if (intervalRangeStr == "phys*") { + intervalTypesToRender |= PhysPlusExplicit; + } else { + std::istringstream iss(intervalRangeStr); + unsigned reg1, reg2; + if ((iss >> reg1 >> std::ws)) { + if (iss.eof()) { + intervalNumsToRender.insert(std::make_pair(reg1, reg1 + 1)); + } else { + char c; + iss >> c; + if (c == '-' && (iss >> reg2)) { + intervalNumsToRender.insert(std::make_pair(reg1, reg2 + 1)); + } else { + dbgs() << "Warning: Invalid interval range \"" + << intervalRangeStr << "\" in -rmf-intervals. Skipping.\n"; + } + } + } else { + dbgs() << "Warning: Invalid interval number \"" + << intervalRangeStr << "\" in -rmf-intervals. Skipping.\n"; + } + } + } + + void MFRenderingOptions::setup(MachineFunction *mf, + const TargetRegisterInfo *tri, + LiveIntervals *lis) { + this->mf = mf; + this->tri = tri; + this->lis = lis; + + clear(); + } + + void MFRenderingOptions::clear() { + regClassesTranslatedToCurrentFunction = false; + regClassSet.clear(); + + intervalsTranslatedToCurrentFunction = false; + intervalSet.clear(); + } + + void MFRenderingOptions::resetRenderSpecificOptions() { + intervalSet.clear(); + intervalsTranslatedToCurrentFunction = false; + } + + bool MFRenderingOptions::shouldRenderCurrentMachineFunction() const { + processOptions(); + + return (renderAllMFs || + mfNamesToRender.find(mf->getFunction()->getName()) != + mfNamesToRender.end()); + } + + const MFRenderingOptions::RegClassSet& MFRenderingOptions::regClasses() const{ + translateRegClassNamesToCurrentFunction(); + return regClassSet; + } + + const MFRenderingOptions::IntervalSet& MFRenderingOptions::intervals() const { + translateIntervalNumbersToCurrentFunction(); + return intervalSet; + } + + bool MFRenderingOptions::renderEmptyIndexes() const { + return showEmptyIndexes; + } + + bool MFRenderingOptions::fancyVerticals() const { + return useFancyVerticals; + } + + void MFRenderingOptions::translateRegClassNamesToCurrentFunction() const { + if (!regClassesTranslatedToCurrentFunction) { + processOptions(); + for (TargetRegisterInfo::regclass_iterator rcItr = tri->regclass_begin(), + rcEnd = tri->regclass_end(); + rcItr != rcEnd; ++rcItr) { + const TargetRegisterClass *trc = *rcItr; + if (renderAllClasses || + classNamesToRender.find(trc->getName()) != + classNamesToRender.end()) { + regClassSet.insert(trc); + } + } + regClassesTranslatedToCurrentFunction = true; + } + } + + void MFRenderingOptions::translateIntervalNumbersToCurrentFunction() const { + if (!intervalsTranslatedToCurrentFunction) { + processOptions(); + + // If we're not just doing explicit then do a copy over all matching + // types. + if (intervalTypesToRender != ExplicitOnly) { + for (LiveIntervals::iterator liItr = lis->begin(), liEnd = lis->end(); + liItr != liEnd; ++liItr) { + + if ((TargetRegisterInfo::isPhysicalRegister(liItr->first) && + (intervalTypesToRender & PhysPlusExplicit)) || + (TargetRegisterInfo::isVirtualRegister(liItr->first) && + (intervalTypesToRender & VirtPlusExplicit))) { + intervalSet.insert(liItr->second); + } + } + } + + // If we need to process the explicit list... + if (intervalTypesToRender != All) { + for (std::set >::const_iterator + regRangeItr = intervalNumsToRender.begin(), + regRangeEnd = intervalNumsToRender.end(); + regRangeItr != regRangeEnd; ++regRangeItr) { + const std::pair &range = *regRangeItr; + for (unsigned reg = range.first; reg != range.second; ++reg) { + if (lis->hasInterval(reg)) { + intervalSet.insert(&lis->getInterval(reg)); + } + } + } + } + + intervalsTranslatedToCurrentFunction = true; + } + } + + // ---------- TargetRegisterExtraInformation implementation ---------- + + TargetRegisterExtraInfo::TargetRegisterExtraInfo() + : mapsPopulated(false) { + } + + void TargetRegisterExtraInfo::setup(MachineFunction *mf, + MachineRegisterInfo *mri, + const TargetRegisterInfo *tri, + LiveIntervals *lis) { + this->mf = mf; + this->mri = mri; + this->tri = tri; + this->lis = lis; + } + + void TargetRegisterExtraInfo::reset() { + if (!mapsPopulated) { + initWorst(); + //initBounds(); + initCapacity(); + mapsPopulated = true; + } + + resetPressureAndLiveStates(); + } + + void TargetRegisterExtraInfo::clear() { + prWorst.clear(); + vrWorst.clear(); + capacityMap.clear(); + pressureMap.clear(); + //liveStatesMap.clear(); + mapsPopulated = false; + } + + void TargetRegisterExtraInfo::initWorst() { + assert(!mapsPopulated && prWorst.empty() && vrWorst.empty() && + "Worst map already initialised?"); + + // Start with the physical registers. + for (unsigned preg = 1; preg < tri->getNumRegs(); ++preg) { + WorstMapLine &pregLine = prWorst[preg]; + + for (TargetRegisterInfo::regclass_iterator rcItr = tri->regclass_begin(), + rcEnd = tri->regclass_end(); + rcItr != rcEnd; ++rcItr) { + const TargetRegisterClass *trc = *rcItr; + + unsigned numOverlaps = 0; + for (TargetRegisterClass::iterator rItr = trc->begin(), + rEnd = trc->end(); + rItr != rEnd; ++rItr) { + unsigned trcPReg = *rItr; + if (tri->regsOverlap(preg, trcPReg)) + ++numOverlaps; + } + + pregLine[trc] = numOverlaps; + } + } + + // Now the register classes. + for (TargetRegisterInfo::regclass_iterator rc1Itr = tri->regclass_begin(), + rcEnd = tri->regclass_end(); + rc1Itr != rcEnd; ++rc1Itr) { + const TargetRegisterClass *trc1 = *rc1Itr; + WorstMapLine &classLine = vrWorst[trc1]; + + for (TargetRegisterInfo::regclass_iterator rc2Itr = tri->regclass_begin(); + rc2Itr != rcEnd; ++rc2Itr) { + const TargetRegisterClass *trc2 = *rc2Itr; + + unsigned worst = 0; + + for (TargetRegisterClass::iterator trc1Itr = trc1->begin(), + trc1End = trc1->end(); + trc1Itr != trc1End; ++trc1Itr) { + unsigned trc1Reg = *trc1Itr; + unsigned trc1RegWorst = 0; + + for (TargetRegisterClass::iterator trc2Itr = trc2->begin(), + trc2End = trc2->end(); + trc2Itr != trc2End; ++trc2Itr) { + unsigned trc2Reg = *trc2Itr; + if (tri->regsOverlap(trc1Reg, trc2Reg)) + ++trc1RegWorst; + } + if (trc1RegWorst > worst) { + worst = trc1RegWorst; + } + } + + if (worst != 0) { + classLine[trc2] = worst; + } + } + } + } + + unsigned TargetRegisterExtraInfo::getWorst( + unsigned reg, + const TargetRegisterClass *trc) const { + const WorstMapLine *wml = 0; + if (TargetRegisterInfo::isPhysicalRegister(reg)) { + PRWorstMap::const_iterator prwItr = prWorst.find(reg); + assert(prwItr != prWorst.end() && "Missing prWorst entry."); + wml = &prwItr->second; + } else { + const TargetRegisterClass *regTRC = mri->getRegClass(reg); + VRWorstMap::const_iterator vrwItr = vrWorst.find(regTRC); + assert(vrwItr != vrWorst.end() && "Missing vrWorst entry."); + wml = &vrwItr->second; + } + + WorstMapLine::const_iterator wmlItr = wml->find(trc); + if (wmlItr == wml->end()) + return 0; + + return wmlItr->second; + } + + void TargetRegisterExtraInfo::initCapacity() { + assert(!mapsPopulated && capacityMap.empty() && + "Capacity map already initialised?"); + + for (TargetRegisterInfo::regclass_iterator rcItr = tri->regclass_begin(), + rcEnd = tri->regclass_end(); + rcItr != rcEnd; ++rcItr) { + const TargetRegisterClass *trc = *rcItr; + unsigned capacity = std::distance(trc->allocation_order_begin(*mf), + trc->allocation_order_end(*mf)); + + if (capacity != 0) + capacityMap[trc] = capacity; + } + } + + unsigned TargetRegisterExtraInfo::getCapacity( + const TargetRegisterClass *trc) const { + CapacityMap::const_iterator cmItr = capacityMap.find(trc); + assert(cmItr != capacityMap.end() && + "vreg with unallocable register class"); + return cmItr->second; + } + + void TargetRegisterExtraInfo::resetPressureAndLiveStates() { + pressureMap.clear(); + //liveStatesMap.clear(); + + // Iterate over all slots. + + + // Iterate over all live intervals. + for (LiveIntervals::iterator liItr = lis->begin(), + liEnd = lis->end(); + liItr != liEnd; ++liItr) { + LiveInterval *li = liItr->second; + + const TargetRegisterClass *liTRC; + + if (TargetRegisterInfo::isPhysicalRegister(li->reg)) + continue; + + liTRC = mri->getRegClass(li->reg); + + + // For all ranges in the current interal. + for (LiveInterval::iterator lrItr = li->begin(), + lrEnd = li->end(); + lrItr != lrEnd; ++lrItr) { + LiveRange *lr = &*lrItr; + + // For all slots in the current range. + for (SlotIndex i = lr->start; i != lr->end; i = i.getNextSlot()) { + + // Record increased pressure at index for all overlapping classes. + for (TargetRegisterInfo::regclass_iterator + rcItr = tri->regclass_begin(), + rcEnd = tri->regclass_end(); + rcItr != rcEnd; ++rcItr) { + const TargetRegisterClass *trc = *rcItr; + + if (trc->allocation_order_begin(*mf) == + trc->allocation_order_end(*mf)) + continue; + + unsigned worstAtI = getWorst(li->reg, trc); + + if (worstAtI != 0) { + pressureMap[i][trc] += worstAtI; + } + } + } + } + } + } + + unsigned TargetRegisterExtraInfo::getPressureAtSlot( + const TargetRegisterClass *trc, + SlotIndex i) const { + PressureMap::const_iterator pmItr = pressureMap.find(i); + if (pmItr == pressureMap.end()) + return 0; + const PressureMapLine &pmLine = pmItr->second; + PressureMapLine::const_iterator pmlItr = pmLine.find(trc); + if (pmlItr == pmLine.end()) + return 0; + return pmlItr->second; + } + + bool TargetRegisterExtraInfo::classOverCapacityAtSlot( + const TargetRegisterClass *trc, + SlotIndex i) const { + return (getPressureAtSlot(trc, i) > getCapacity(trc)); + } + + // ---------- MachineFunctionRenderer implementation ---------- + + template + std::string RenderMachineFunction::escapeChars(Iterator sBegin, Iterator sEnd) const { + std::string r; + + for (Iterator sItr = sBegin; sItr != sEnd; ++sItr) { + char c = *sItr; + + switch (c) { + case '<': r.append("<"); break; + case '>': r.append(">"); break; + case '&': r.append("&"); break; + case ' ': r.append(" "); break; + case '\"': r.append("""); break; + default: r.push_back(c); break; + } + } + + return r; + } + + template + void RenderMachineFunction::renderVertical(const std::string &indent, + OStream &os, + const T &t) const { + if (ro.fancyVerticals()) { + os << indent << "\n" + << indent << " " << t << "\n" + << indent << " \">\n" + << indent << "\n"; + } else { + std::ostringstream oss; + oss << t; + std::string tStr(oss.str()); + + os << indent; + for (std::string::iterator tStrItr = tStr.begin(), tStrEnd = tStr.end(); + tStrItr != tStrEnd; ++tStrItr) { + os << *tStrItr << "
"; + } + os << "\n"; + } + } + + template + void RenderMachineFunction::insertCSS(const std::string &indent, + OStream &os) const { + os << indent << "\n"; + } + + template + void RenderMachineFunction::renderFunctionSummary( + const std::string &indent, OStream &os, + const char * const renderContextStr) const { + os << indent << "

Function: " << mf->getFunction()->getName() + << "

\n" + << indent << "

Rendering context: " << renderContextStr << "

\n"; + } + + + template + void RenderMachineFunction::renderPressureTableLegend( + const std::string &indent, + OStream &os) const { + os << indent << "

Rendering Pressure Legend:

\n" + << indent << "\n" + << indent << " \n" + << indent << " " + "\n" + << indent << " \n" + << indent << " \n" + << indent << " " + " " + " \n" + << indent << " \n" + << indent << " \n" + << indent << " " + " " + " \n" + << indent << " \n" + << indent << " \n" + << indent << " " + " " + " \n" + << indent << " \n" + << indent << "
PressureDescriptionAppearance
No PressureNo physical registers of this class requested.  
Low PressureSufficient physical registers to meet demand.  
High PressurePotentially insufficient physical registers to meet demand.  
\n"; + } + + template + void RenderMachineFunction::renderCodeTablePlusPI(const std::string & indent, + OStream &os) const { + + os << indent << "\n" + << indent << " \n" + << indent << " \n" + << indent << " \n"; + + // Header row: + + if (!ro.regClasses().empty()) { + for (MFRenderingOptions::RegClassSet::const_iterator + rcItr = ro.regClasses().begin(), + rcEnd = ro.regClasses().end(); + rcItr != rcEnd; ++rcItr) { + const TargetRegisterClass *trc = *rcItr; + os << indent << " \n"; + } + } + + // FIXME: Is there a nicer way to insert space between columns in HTML? + if (!ro.regClasses().empty() && !ro.intervals().empty()) + os << indent << " \n"; + + if (!ro.intervals().empty()) { + for (MFRenderingOptions::IntervalSet::const_iterator + liItr = ro.intervals().begin(), + liEnd = ro.intervals().end(); + liItr != liEnd; ++liItr) { + + const LiveInterval *li = *liItr; + os << indent << " \n"; + } + } + + os << indent << " \n"; + + MachineInstr *mi = 0; + + // Data rows: + for (SlotIndex i = sis->getZeroIndex(); i != sis->getLastIndex(); + i = i.getNextSlot()) { + + os << indent << " \n"; + + if (i.getSlot() == SlotIndex::LOAD) { + MachineBasicBlock *mbb = sis->getMBBFromIndex(i); + mi = sis->getInstructionFromIndex(i); + + if (i == sis->getMBBStartIdx(mbb) || mi != 0 || + ro.renderEmptyIndexes()) { + os << indent << " \n" + << indent << " \n"; + } else { + i = i.getStoreIndex(); // <- Will be incremented to the next index. + continue; + } + } + + if (!ro.regClasses().empty()) { + for (MFRenderingOptions::RegClassSet::const_iterator + rcItr = ro.regClasses().begin(), + rcEnd = ro.regClasses().end(); + rcItr != rcEnd; ++rcItr) { + const TargetRegisterClass *trc = *rcItr; + + os << indent << " \n"; + } + } + + // FIXME: Is there a nicer way to insert space between columns in HTML? + if (!ro.regClasses().empty() && !ro.intervals().empty()) + os << indent << " \n"; + + if (!ro.intervals().empty()) { + for (MFRenderingOptions::IntervalSet::const_iterator + liItr = ro.intervals().begin(), + liEnd = ro.intervals().end(); + liItr != liEnd; ++liItr) { + const LiveInterval *li = *liItr; + os << indent << " \n"; + } + } + os << indent << " \n"; + } + + os << indent << "
indexinstr\n"; + renderVertical(indent + " ", os, trc->getName()); + os << indent << "   \n"; + renderVertical(indent + " ", os, li->reg); + os << indent << "
" << i << " \n"; + + if (i == sis->getMBBStartIdx(mbb)) { + os << indent << " BB#" << mbb->getNumber() << ": \n"; + } else if (mi != 0) { + os << indent << "   " << escapeChars(mi) << "\n"; + } else { + os << indent << "  \n"; + } + os << indent << " liveAt(i)) { + if (mi == 0) { + os << "l-sa"; + } else { + if (i.getSlot() == SlotIndex::DEF && + mi->definesRegister(li->reg, tri)) { + os << "l-def"; + } else if (i.getSlot() == SlotIndex::USE && + mi->readsRegister(li->reg)) { + os << "l-use"; + } else { + os << "l-sa"; + } + } + } else { + os << "l-na"; + } + os << "\">
\n"; + + if (!ro.regClasses().empty()) + renderPressureTableLegend(indent, os); + } + + template + void RenderMachineFunction::renderWarnings(const std::string &indent, + OStream &os) const { + } + + template + void RenderMachineFunction::renderFunctionPage( + OStream &os, + const char * const renderContextStr) const { + os << "\n" + << " \n" + << " " << fqn << "\n"; + + insertCSS(" ", os); + + os << " \n" + << " \n"; + + renderFunctionSummary(" ", os, renderContextStr); + + os << "


\n"; + + //renderLiveIntervalInfoTable(" ", os); + + os << "


\n"; + + renderCodeTablePlusPI(" ", os); + + os << " \n" + << "\n"; + } + + void RenderMachineFunction::getAnalysisUsage(AnalysisUsage &au) const { + au.addRequired(); + au.addRequired(); + au.setPreservesAll(); + MachineFunctionPass::getAnalysisUsage(au); + } + + bool RenderMachineFunction::runOnMachineFunction(MachineFunction &fn) { + mf = &fn; + mri = &mf->getRegInfo(); + tri = mf->getTarget().getRegisterInfo(); + lis = &getAnalysis(); + sis = &getAnalysis(); + + trei.setup(mf, mri, tri, lis); + ro.setup(mf, tri, lis); + + fqn = mf->getFunction()->getParent()->getModuleIdentifier() + "." + + mf->getFunction()->getName().str(); + + return false; + } + + void RenderMachineFunction::releaseMemory() { + trei.clear(); + ro.clear(); + } + + void RenderMachineFunction::renderMachineFunction( + const char *renderContextStr, + const char *renderSuffix) { + if (!ro.shouldRenderCurrentMachineFunction()) + return; + + trei.reset(); + + std::string rpFileName(mf->getFunction()->getName().str() + + (renderSuffix ? renderSuffix : "") + + outputFileSuffix); + + std::string errMsg; + raw_fd_ostream outFile(rpFileName.c_str(), errMsg, raw_fd_ostream::F_Binary); + + renderFunctionPage(outFile, renderContextStr); + + ro.resetRenderSpecificOptions(); + } + + void RenderMachineFunction::setupRenderingOptions() { + + } + + std::string RenderMachineFunction::escapeChars(const std::string &s) const { + return escapeChars(s.begin(), s.end()); + } + + std::string RenderMachineFunction::escapeChars(const MachineInstr *mi) const { + std::string s; + raw_string_ostream os(s); + os << *mi; + std::string s2 = os.str(); + return escapeChars(s2); + } + +} Added: llvm/trunk/lib/CodeGen/RenderMachineFunction.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RenderMachineFunction.h?rev=108698&view=auto ============================================================================== --- llvm/trunk/lib/CodeGen/RenderMachineFunction.h (added) +++ llvm/trunk/lib/CodeGen/RenderMachineFunction.h Mon Jul 19 10:22:28 2010 @@ -0,0 +1,291 @@ +//===-- llvm/CodeGen/RenderMachineFunction.h - MF->HTML -*- C++ -*---------===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_CODEGEN_RENDERMACHINEFUNCTION_H +#define LLVM_CODEGEN_RENDERMACHINEFUNCTION_H + +#include "llvm/CodeGen/LiveInterval.h" +#include "llvm/CodeGen/MachineFunctionPass.h" +#include "llvm/CodeGen/SlotIndexes.h" +#include "llvm/Target/TargetRegisterInfo.h" + +#include +#include +#include +#include + +namespace llvm { + + class LiveInterval; + class LiveIntervals; + class MachineInstr; + class MachineRegisterInfo; + class TargetRegisterClass; + class TargetRegisterInfo; + + + /// \brief Provide extra information about the physical and virtual registers + /// in the function being compiled. + class TargetRegisterExtraInfo { + public: + TargetRegisterExtraInfo(); + + /// \brief Set up TargetRegisterExtraInfo with pointers to necessary + /// sources of information. + void setup(MachineFunction *mf, MachineRegisterInfo *mri, + const TargetRegisterInfo *tri, LiveIntervals *lis); + + /// \brief Recompute tables for changed function. + void reset(); + + /// \brief Free all tables in TargetRegisterExtraInfo. + void clear(); + + /// \brief Maximum number of registers from trc which alias reg. + unsigned getWorst(unsigned reg, const TargetRegisterClass *trc) const; + + /// \brief Returns the number of allocable registers in trc. + unsigned getCapacity(const TargetRegisterClass *trc) const; + + /// \brief Return the number of registers of class trc that may be + /// needed at slot i. + unsigned getPressureAtSlot(const TargetRegisterClass *trc, + SlotIndex i) const; + + /// \brief Return true if the number of registers of type trc that may be + /// needed at slot i is greater than the capacity of trc. + bool classOverCapacityAtSlot(const TargetRegisterClass *trc, + SlotIndex i) const; + + private: + + MachineFunction *mf; + MachineRegisterInfo *mri; + const TargetRegisterInfo *tri; + LiveIntervals *lis; + + typedef std::map WorstMapLine; + typedef std::map VRWorstMap; + VRWorstMap vrWorst; + + typedef std::map PRWorstMap; + PRWorstMap prWorst; + + typedef std::map CapacityMap; + CapacityMap capacityMap; + + typedef std::map PressureMapLine; + typedef std::map PressureMap; + PressureMap pressureMap; + + bool mapsPopulated; + + /// \brief Initialise the 'worst' table. + void initWorst(); + + /// \brief Initialise the 'capacity' table. + void initCapacity(); + + /// \brief Initialise/Reset the 'pressure' and live states tables. + void resetPressureAndLiveStates(); + }; + + /// \brief Helper class to process rendering options. Tries to be as lazy as + /// possible. + class MFRenderingOptions { + public: + + struct RegClassComp { + bool operator()(const TargetRegisterClass *trc1, + const TargetRegisterClass *trc2) const { + std::string trc1Name(trc1->getName()), trc2Name(trc2->getName()); + return std::lexicographical_compare(trc1Name.begin(), trc1Name.end(), + trc2Name.begin(), trc2Name.end()); + } + }; + + typedef std::set RegClassSet; + + struct IntervalComp { + bool operator()(const LiveInterval *li1, const LiveInterval *li2) const { + return li1->reg < li2->reg; + } + }; + + typedef std::set IntervalSet; + + /// Initialise the rendering options. + void setup(MachineFunction *mf, const TargetRegisterInfo *tri, + LiveIntervals *lis); + + /// Clear translations of options to the current function. + void clear(); + + /// Reset any options computed for this specific rendering. + void resetRenderSpecificOptions(); + + /// Should we render the current function. + bool shouldRenderCurrentMachineFunction() const; + + /// Return the set of register classes to render pressure for. + const RegClassSet& regClasses() const; + + /// Return the set of live intervals to render liveness for. + const IntervalSet& intervals() const; + + /// Render indexes which are not associated with instructions / MBB starts. + bool renderEmptyIndexes() const; + + /// Return whether or not to render using SVG for fancy vertical text. + bool fancyVerticals() const; + + private: + + static bool renderingOptionsProcessed; + static std::set mfNamesToRender; + static bool renderAllMFs; + + static std::set classNamesToRender; + static bool renderAllClasses; + + + static std::set > intervalNumsToRender; + typedef enum { ExplicitOnly = 0, + VirtPlusExplicit = 1, + PhysPlusExplicit = 2, + All = 3 } + IntervalTypesToRender; + static unsigned intervalTypesToRender; + + template + static void splitComaSeperatedList(const std::string &s, OutputItr outItr); + + static void processOptions(); + + static void processFuncNames(); + static void processRegClassNames(); + static void processIntervalNumbers(); + + static void processIntervalRange(const std::string &intervalRangeStr); + + MachineFunction *mf; + const TargetRegisterInfo *tri; + LiveIntervals *lis; + + mutable bool regClassesTranslatedToCurrentFunction; + mutable RegClassSet regClassSet; + + mutable bool intervalsTranslatedToCurrentFunction; + mutable IntervalSet intervalSet; + + void translateRegClassNamesToCurrentFunction() const; + + void translateIntervalNumbersToCurrentFunction() const; + }; + + /// \brief Render MachineFunction objects and related information to a HTML + /// page. + class RenderMachineFunction : public MachineFunctionPass { + public: + static char ID; + + RenderMachineFunction() : MachineFunctionPass(&ID) {} + + virtual void getAnalysisUsage(AnalysisUsage &au) const; + + virtual bool runOnMachineFunction(MachineFunction &fn); + + virtual void releaseMemory(); + + /// \brief Render this machine function to HTML. + /// + /// @param renderContextStr This parameter will be included in the top of + /// the html file to explain where (in the + /// codegen pipeline) this function was rendered + /// from. Set it to something like + /// "Pre-register-allocation". + /// @param renderFilePrefix This string will be appended to the function + /// name (before the output file suffix) to enable + /// multiple renderings from the same function. + void renderMachineFunction(const char *renderContextStr, + const char *renderSuffix = 0); + + private: + + std::string fqn; + + MachineFunction *mf; + MachineRegisterInfo *mri; + const TargetRegisterInfo *tri; + LiveIntervals *lis; + SlotIndexes *sis; + + TargetRegisterExtraInfo trei; + MFRenderingOptions ro; + + // ---------- Utility functions ---------- + + void setupRenderingOptions(); + + // ---------- Rendering methods ---------- + + template + std::string escapeChars(Iterator sBegin, Iterator sEnd) const; + + /// \brief Render vertical text. + template + void renderVertical(const std::string &indent, + OStream &os, + const T &t) const; + + /// \brief Insert CSS layout info. + template + void insertCSS(const std::string &indent, + OStream &os) const; + + /// \brief Render a brief summary of the function (including rendering + /// context). + template + void renderFunctionSummary(const std::string &indent, + OStream &os, + const char * const renderContextStr) const; + + /// \brief Render a legend for the pressure table. + template + void renderPressureTableLegend(const std::string &indent, + OStream &os) const; + + /// \brief Render code listing, potentially with register pressure + /// and live intervals shown alongside. + template + void renderCodeTablePlusPI(const std::string &indent, + OStream &os) const; + + /// \brief Render warnings about the machine function, or weird rendering + /// parameter combinations (e.g. rendering specified live intervals + /// over more than one machine function). + template + void renderWarnings(const std::string &indent, + OStream &os) const; + + /// \brief Render the HTML page representing the MachineFunction. + template + void renderFunctionPage(OStream &os, + const char * const renderContextStr) const; + + std::string escapeChars(const std::string &s) const; + + std::string escapeChars(const MachineInstr *mi) const; + + }; +} + +#endif /* LLVM_CODEGEN_RENDERMACHINEFUNCTION_H */ From baldrick at free.fr Mon Jul 19 10:31:08 2010 From: baldrick at free.fr (Duncan Sands) Date: Mon, 19 Jul 2010 15:31:08 -0000 Subject: [llvm-commits] [llvm] r108699 - in /llvm/trunk: include/llvm-c/Core.h lib/VMCore/Core.cpp Message-ID: <20100719153108.19D742A6C12C@llvm.org> Author: baldrick Date: Mon Jul 19 10:31:07 2010 New Revision: 108699 URL: http://llvm.org/viewvc/llvm-project?rev=108699&view=rev Log: Expose BasicBlock::moveBefore and moveAfter in C API, patch by Benjamin Saunders. 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=108699&r1=108698&r2=108699&view=diff ============================================================================== --- llvm/trunk/include/llvm-c/Core.h (original) +++ llvm/trunk/include/llvm-c/Core.h Mon Jul 19 10:31:07 2010 @@ -750,6 +750,9 @@ const char *Name); void LLVMDeleteBasicBlock(LLVMBasicBlockRef BB); +void LLVMMoveBasicBlockBefore(LLVMBasicBlockRef BB, LLVMBasicBlockRef MovePos); +void LLVMMoveBasicBlockAfter(LLVMBasicBlockRef BB, LLVMBasicBlockRef MovePos); + /* Operations on instructions */ LLVMBasicBlockRef LLVMGetInstructionParent(LLVMValueRef Inst); LLVMValueRef LLVMGetFirstInstruction(LLVMBasicBlockRef BB); Modified: llvm/trunk/lib/VMCore/Core.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Core.cpp?rev=108699&r1=108698&r2=108699&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/Core.cpp (original) +++ llvm/trunk/lib/VMCore/Core.cpp Mon Jul 19 10:31:07 2010 @@ -1515,6 +1515,14 @@ unwrap(BBRef)->eraseFromParent(); } +void LLVMMoveBasicBlockBefore(LLVMBasicBlockRef BB, LLVMBasicBlockRef MovePos) { + unwrap(BB)->moveBefore(unwrap(MovePos)); +} + +void LLVMMoveBasicBlockAfter(LLVMBasicBlockRef BB, LLVMBasicBlockRef MovePos) { + unwrap(BB)->moveAfter(unwrap(MovePos)); +} + /*--.. Operations on instructions ..........................................--*/ LLVMBasicBlockRef LLVMGetInstructionParent(LLVMValueRef Inst) { From benny.kra at googlemail.com Mon Jul 19 10:37:03 2010 From: benny.kra at googlemail.com (Benjamin Kramer) Date: Mon, 19 Jul 2010 15:37:03 -0000 Subject: [llvm-commits] [llvm] r108700 - /llvm/trunk/lib/CodeGen/CMakeLists.txt Message-ID: <20100719153703.E36912A6C12C@llvm.org> Author: d0k Date: Mon Jul 19 10:37:03 2010 New Revision: 108700 URL: http://llvm.org/viewvc/llvm-project?rev=108700&view=rev Log: Update CMake build. 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=108700&r1=108699&r2=108700&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/CMakeLists.txt (original) +++ llvm/trunk/lib/CodeGen/CMakeLists.txt Mon Jul 19 10:37:03 2010 @@ -57,6 +57,7 @@ RegAllocPBQP.cpp RegisterCoalescer.cpp RegisterScavenging.cpp + RenderMachineFunction.cpp ScheduleDAG.cpp ScheduleDAGEmit.cpp ScheduleDAGInstrs.cpp From criswell at uiuc.edu Mon Jul 19 10:53:19 2010 From: criswell at uiuc.edu (John Criswell) Date: Mon, 19 Jul 2010 15:53:19 -0000 Subject: [llvm-commits] [poolalloc] r108701 - /poolalloc/trunk/lib/DSA/BottomUpClosure.cpp Message-ID: <20100719155319.EEAC82A6C12C@llvm.org> Author: criswell Date: Mon Jul 19 10:53:19 2010 New Revision: 108701 URL: http://llvm.org/viewvc/llvm-project?rev=108701&view=rev Log: Added comments. No functionality changes. Modified: poolalloc/trunk/lib/DSA/BottomUpClosure.cpp Modified: poolalloc/trunk/lib/DSA/BottomUpClosure.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/BottomUpClosure.cpp?rev=108701&r1=108700&r2=108701&view=diff ============================================================================== --- poolalloc/trunk/lib/DSA/BottomUpClosure.cpp (original) +++ poolalloc/trunk/lib/DSA/BottomUpClosure.cpp Mon Jul 19 10:53:19 2010 @@ -63,12 +63,12 @@ << "It is probably broken right now\n"; #endif - //Find SCCs and make SCC call graph + // + // Put the callgraph into canonical form by finding SCCs. + // callgraph.buildSCCs(); callgraph.buildRoots(); - // callgraph.dump(); - // // Merge the DSGraphs of functions belonging to an SCC. // @@ -189,18 +189,25 @@ // Method: postOrder() // // Description: -// I have no idea. +// Process the SCCs of the callgraph in post order. When we process a +// function, we inline the DSGraphs of its callees into the function's own +// DSGraph, thereby doing the "bottom-up" pass that makes BU so famous. // // Inputs: -// F - The function on which to do whatever. +// F - The function in the SCC to process. Note that its children in the +// callgraph will be processed first through a recursive call. // marked - A reference to a set containing all values processed by // previous invocations (this method is recursive). // // Outputs: -// marked - Updated to contain function F. +// marked - A set containing pointers to functions that have already been +// processed. // -DSGraph* BUDataStructures::postOrder(const Function* F, - svset& marked) { +// Return value: +// The DSGraph of the function after it has been processed is returned. +// +DSGraph* +BUDataStructures::postOrder(const Function* F, svset& marked) { // // If we have already processed this function before, do not process it // again. @@ -209,6 +216,15 @@ DSGraph* G = getDSGraph(*F); if (marked.count(F)) return G; + // + // Find the set of callees to process. + // + // For this operation, we do not want to use the call graph. Instead, we + // want to consult the DSGraph and see which call sites have not yet been + // resolved. This is because we may learn about more call sites after doing + // one pass of bottom-up inlining, and so we don't want to reprocess the + // callees that were previously processed in an earlier BU phase. + // for (DSCallGraph::flat_iterator ii = callgraph.flat_callee_begin(F), ee = callgraph.flat_callee_end(F); ii != ee; ++ii) { callgraph.assertSCCRoot(*ii); @@ -232,6 +248,10 @@ // update the call graph using this new information. // G->buildCallGraph(callgraph); + + // + // Return the DSGraph associated with this function. + // return G; } @@ -417,6 +437,9 @@ // TODO: // Why are the strip alloca bit and don't clone call nodes bit set? // + // I believe the answer is on page 6 of the PLDI paper on DSA. The + // idea is that stack objects are invalid if they escape. + // Graph->mergeInGraph(CS, *Callee, *GI, DSGraph::StripAllocaBit|DSGraph::DontCloneCallNodes); ++NumInlines; From bob.wilson at apple.com Mon Jul 19 11:20:16 2010 From: bob.wilson at apple.com (Bob Wilson) Date: Mon, 19 Jul 2010 09:20:16 -0700 Subject: [llvm-commits] [llvm-gcc-4.2] r108554 - /llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp In-Reply-To: <20100716210032.1BE872A6C12C@llvm.org> References: <20100716210032.1BE872A6C12C@llvm.org> Message-ID: <0AD86F36-DA36-43F9-84EF-FB2DD517C18D@apple.com> Dale, I don't think this is correct, at least for ARM. The 'p' constraint is for a memory address, not the actual memory reference. If I remember correctly, the use of this reported in pr4521 was kind of questionable, and I haven't yet looked in any detail at pr5314 and pr5533. Maybe we can talk about this in person sometime today. On Jul 16, 2010, at 2:00 PM, Dale Johannesen wrote: > Author: johannes > Date: Fri Jul 16 16:00:31 2010 > New Revision: 108554 > > URL: http://llvm.org/viewvc/llvm-project?rev=108554&view=rev > Log: > "p" constraint is a form of "m", not "r". PR 5314. > > > Modified: > llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp > > Modified: llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp > URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp?rev=108554&r1=108553&r2=108554&view=diff > ============================================================================== > --- llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp (original) > +++ llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp Fri Jul 16 16:00:31 2010 > @@ -4429,12 +4429,11 @@ > continue; > } > > - // Translate 'p' to 'r'. This is supposed to check for a valid memory > + // Translate 'p' to 'm'. This is supposed to check for a valid memory > // address, but for inline assembly there is no way to know the mode of > - // the data being addressed. Assume that a general register is always > - // a valid address. > + // the data being addressed. > if (ConstraintChar == 'p') > - ConstraintChar = 'r'; > + ConstraintChar = 'm'; > > // See if this is a regclass constraint. > unsigned RegClass; > > > _______________________________________________ > 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 Jul 19 11:27:21 2010 From: clattner at apple.com (Chris Lattner) Date: Mon, 19 Jul 2010 09:27:21 -0700 Subject: [llvm-commits] [llvm] r108695 - /llvm/trunk/lib/VMCore/Use.cpp In-Reply-To: <20100719144815.307D52A6C12C@llvm.org> References: <20100719144815.307D52A6C12C@llvm.org> Message-ID: <8DD1B3F5-6B80-497B-8035-3F68583DE082@apple.com> On Jul 19, 2010, at 7:48 AM, Gabor Greif wrote: > Author: ggreif > Date: Mon Jul 19 09:48:15 2010 > New Revision: 108695 > > URL: http://llvm.org/viewvc/llvm-project?rev=108695&view=rev > Log: > precompute 20 tags Hi Gabor, What does this do? -Chris > > Modified: > llvm/trunk/lib/VMCore/Use.cpp > > Modified: llvm/trunk/lib/VMCore/Use.cpp > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Use.cpp?rev=108695&r1=108694&r2=108695&view=diff > ============================================================================== > --- llvm/trunk/lib/VMCore/Use.cpp (original) > +++ llvm/trunk/lib/VMCore/Use.cpp Mon Jul 19 09:48:15 2010 > @@ -86,11 +86,17 @@ > //===----------------------------------------------------------------------===// > > Use *Use::initTags(Use * const Start, Use *Stop, ptrdiff_t Done) { > - while (Done < 6) { > + while (Done < 20) { > if (Start == Stop--) > return Start; > - static const PrevPtrTag tags[6] = { fullStopTag, oneDigitTag, stopTag, > - oneDigitTag, oneDigitTag, stopTag }; > + static const PrevPtrTag tags[20] = { fullStopTag, oneDigitTag, stopTag, > + oneDigitTag, oneDigitTag, stopTag, > + zeroDigitTag, oneDigitTag, oneDigitTag, > + stopTag, zeroDigitTag, oneDigitTag, > + zeroDigitTag, oneDigitTag, stopTag, > + oneDigitTag, oneDigitTag, oneDigitTag, > + oneDigitTag, stopTag > + }; > Stop->Prev.setFromOpaqueValue(reinterpret_cast(tags[Done++])); > Stop->Val = 0; > } > > > _______________________________________________ > 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 Jul 19 11:31:00 2010 From: clattner at apple.com (Chris Lattner) Date: Mon, 19 Jul 2010 09:31:00 -0700 Subject: [llvm-commits] [llvm] r108687 - /llvm/trunk/lib/Transforms/InstCombine/InstCombineCasts.cpp In-Reply-To: <20100719080934.7BDF42A6C12D@llvm.org> References: <20100719080934.7BDF42A6C12D@llvm.org> Message-ID: On Jul 19, 2010, at 1:09 AM, Owen Anderson wrote: > Author: resistor > Date: Mon Jul 19 03:09:34 2010 > New Revision: 108687 > > URL: http://llvm.org/viewvc/llvm-project?rev=108687&view=rev > Log: > Reimplement r108639 in InstCombine rather than DAGCombine. Thanks Owen! Please use ->isDoubleTy() instead of comparing to Builder->getDoubleTy(), also you're trying to do "Module* M" stuff again, please use "Module *M". One minor pedantic point is that it might not be safe to propagate the attributes from the call to sqrt to the sqrtf function declaration... you should propagate the attributes from the sqrt function declaration instead. -Chris > > Modified: > llvm/trunk/lib/Transforms/InstCombine/InstCombineCasts.cpp > > Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineCasts.cpp > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstCombineCasts.cpp?rev=108687&r1=108686&r2=108687&view=diff > ============================================================================== > --- llvm/trunk/lib/Transforms/InstCombine/InstCombineCasts.cpp (original) > +++ llvm/trunk/lib/Transforms/InstCombine/InstCombineCasts.cpp Mon Jul 19 03:09:34 2010 > @@ -1097,6 +1097,32 @@ > break; > } > } > + > + // Fold (fptrunc (sqrt (fpext x))) -> (sqrtf x) > + // NOTE: This should be disabled by -fno-builtin-sqrt if we ever support it. > + CallInst *Call = dyn_cast(CI.getOperand(0)); > + if (Call && Call->getCalledFunction() && > + Call->getCalledFunction()->getName() == "sqrt" && > + Call->getNumArgOperands() == 1) { > + CastInst *Arg = dyn_cast(Call->getArgOperand(0)); > + if (Arg && Arg->getOpcode() == Instruction::FPExt && > + CI.getType() == Builder->getFloatTy() && > + Call->getType() == Builder->getDoubleTy() && > + Arg->getType() == Builder->getDoubleTy() && > + Arg->getOperand(0)->getType() == Builder->getFloatTy()) { > + Module* M = CI.getParent()->getParent()->getParent(); > + Constant* SqrtfFunc = M->getOrInsertFunction("sqrtf", > + Call->getAttributes(), > + Builder->getFloatTy(), > + Builder->getFloatTy(), > + NULL); > + CallInst *ret = CallInst::Create(SqrtfFunc, Arg->getOperand(0), > + "sqrtfcall"); > + ret->setAttributes(Call->getAttributes()); > + return ret; > + } > + } > + > return 0; > } > > > > _______________________________________________ > 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 Jul 19 11:31:59 2010 From: clattner at apple.com (Chris Lattner) Date: Mon, 19 Jul 2010 09:31:59 -0700 Subject: [llvm-commits] [llvm] r108681 - in /llvm/trunk: lib/Target/X86/AsmParser/X86AsmParser.cpp lib/Target/X86/X86.td test/MC/AsmParser/X86/x86_64-new-encoder.s In-Reply-To: <20100719061454.3853E2A6C12C@llvm.org> References: <20100719061454.3853E2A6C12C@llvm.org> Message-ID: <7F284E51-E4D3-49EC-86E6-1D15CF53CEBD@apple.com> On Jul 18, 2010, at 11:14 PM, Daniel Dunbar wrote: > Author: ddunbar > Date: Mon Jul 19 01:14:54 2010 > New Revision: 108681 > > URL: http://llvm.org/viewvc/llvm-project?rev=108681&view=rev > Log: > MC/X86: We now match instructions like "incl %eax" correctly for the arch we are > assembling; remove crufty custom cleanup code. Woot, awesome! -Chris From stoklund at 2pi.dk Mon Jul 19 11:43:51 2010 From: stoklund at 2pi.dk (Jakob Stoklund Olesen) Date: Mon, 19 Jul 2010 09:43:51 -0700 Subject: [llvm-commits] [llvm] r108680 - in /llvm/trunk/lib/Target/X86: X86Instr64bit.td X86InstrInfo.td In-Reply-To: <20100719061449.79EF12A6C12D@llvm.org> References: <20100719061449.79EF12A6C12D@llvm.org> Message-ID: On Jul 18, 2010, at 11:14 PM, Daniel Dunbar wrote: > Author: ddunbar > Date: Mon Jul 19 01:14:49 2010 > New Revision: 108680 > > URL: http://llvm.org/viewvc/llvm-project?rev=108680&view=rev > Log: > X86: Mark MOV.*_{TC,NOREX} instruction as code gen only, they aren't real. I don't think the MOV*_TC instructions are used for anything. Evan? The MOV8rr_NOREX instruction is actually emitted when copying 8-bit H registers, so it is not really CodeGenOnly. Do we need a new hack? Or maybe no hack at all? From ggreif at gmail.com Mon Jul 19 11:47:07 2010 From: ggreif at gmail.com (Gabor Greif) Date: Mon, 19 Jul 2010 09:47:07 -0700 (PDT) Subject: [llvm-commits] [llvm] r108695 - /llvm/trunk/lib/VMCore/Use.cpp In-Reply-To: <8DD1B3F5-6B80-497B-8035-3F68583DE082@apple.com> References: <20100719144815.307D52A6C12C@llvm.org> <8DD1B3F5-6B80-497B-8035-3F68583DE082@apple.com> Message-ID: <8372a6af-ab91-4037-b824-6557837ade96@w30g2000yqw.googlegroups.com> On Jul 19, 6:27?pm, Chris Lattner wrote: > On Jul 19, 2010, at 7:48 AM, Gabor Greif wrote: > > > Author: ggreif > > Date: Mon Jul 19 09:48:15 2010 > > New Revision: 108695 > > > URL:http://llvm.org/viewvc/llvm-project?rev=108695&view=rev > > Log: > > precompute 20 tags > > Hi Gabor, > > What does this do? It does fill the "waymarks" into the Use array according to this description: . These are needed to find the User's 'this' pointer. Previously we have dynamically computed the waymarks for all Use objects, now we quickly fetch the marks for up to 20 Use objects, and then we fall back to the old algo to fill in the rest (by computing the marks dynamically). My benchmarks show a 0.5% speedup on "opt 403.gcc.bc -std-compile-opts -disable-output" when going to 0 -> 20 precomputed tags. I did not measure pure .bc- loading where the effect is probably much more prominent. Cheers, Gabor > > -Chris > > > > > > > Modified: > > ? ?llvm/trunk/lib/VMCore/Use.cpp > > > Modified: llvm/trunk/lib/VMCore/Use.cpp > > URL:http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Use.cpp?rev... > > ============================================================================== > > --- llvm/trunk/lib/VMCore/Use.cpp (original) > > +++ llvm/trunk/lib/VMCore/Use.cpp Mon Jul 19 09:48:15 2010 > > @@ -86,11 +86,17 @@ > > //===----------------------------------------------------------------------===// > > > Use *Use::initTags(Use * const Start, Use *Stop, ptrdiff_t Done) { > > - ?while (Done < 6) { > > + ?while (Done < 20) { > > ? ? if (Start == Stop--) > > ? ? ? return Start; > > - ? ?static const PrevPtrTag tags[6] = { fullStopTag, oneDigitTag, stopTag, > > - ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?oneDigitTag, oneDigitTag, stopTag }; > > + ? ?static const PrevPtrTag tags[20] = { fullStopTag, oneDigitTag, stopTag, > > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? oneDigitTag, oneDigitTag, stopTag, > > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? zeroDigitTag, oneDigitTag, oneDigitTag, > > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? stopTag, zeroDigitTag, oneDigitTag, > > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? zeroDigitTag, oneDigitTag, stopTag, > > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? oneDigitTag, oneDigitTag, oneDigitTag, > > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? oneDigitTag, stopTag > > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? }; > > ? ? Stop->Prev.setFromOpaqueValue(reinterpret_cast(tags[Done++])); > > ? ? Stop->Val = 0; > > ? } > > > _______________________________________________ > > llvm-commits mailing list > > llvm-comm... at cs.uiuc.edu > >http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits > > _______________________________________________ > llvm-commits mailing list > llvm-comm... at cs.uiuc.eduhttp://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From bob.wilson at apple.com Mon Jul 19 12:01:57 2010 From: bob.wilson at apple.com (Bob Wilson) Date: Mon, 19 Jul 2010 17:01:57 -0000 Subject: [llvm-commits] [llvm-gcc-4.2] r108709 - /llvm-gcc-4.2/trunk/GNUmakefile Message-ID: <20100719170157.F1AB02A6C12C@llvm.org> Author: bwilson Date: Mon Jul 19 12:01:57 2010 New Revision: 108709 URL: http://llvm.org/viewvc/llvm-project?rev=108709&view=rev Log: Update llvm-gcc's build to match llvm svn r108382. Modified: llvm-gcc-4.2/trunk/GNUmakefile Modified: llvm-gcc-4.2/trunk/GNUmakefile URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/GNUmakefile?rev=108709&r1=108708&r2=108709&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/GNUmakefile (original) +++ llvm-gcc-4.2/trunk/GNUmakefile Mon Jul 19 12:01:57 2010 @@ -101,9 +101,8 @@ exit 1; \ fi cd $(OBJROOT) && \ - DEVELOPER_DIR=Developer \ $(SRC)/llvmCore/utils/buildit/build_llvm "$(RC_ARCHS)" "$(TARGETS)" \ - $(SRC)/llvmCore /usr/local $(DSTROOT) $(SYMROOT) \ + $(SRC)/llvmCore /Developer/usr/local $(DSTROOT) $(SYMROOT) \ $(ENABLE_ASSERTIONS) $(LLVM_OPTIMIZED) $(INSTALL_LIBLTO) \ $(ARM_HOSTED_BUILD) \ $(RC_ProjectSourceVersion) $(RC_ProjectSourceSubversion) From wdietz2 at illinois.edu Mon Jul 19 12:05:12 2010 From: wdietz2 at illinois.edu (Will Dietz) Date: Mon, 19 Jul 2010 17:05:12 -0000 Subject: [llvm-commits] [poolalloc] r108710 - /poolalloc/trunk/test/dsa/regression/2010-07-12-SCCLeader.ll Message-ID: <20100719170512.AAE1A2A6C12C@llvm.org> Author: wdietz2 Date: Mon Jul 19 12:05:12 2010 New Revision: 108710 URL: http://llvm.org/viewvc/llvm-project?rev=108710&view=rev Log: Added test that triggers the SCC Leader failing assertion. This is bug #7630. Added: poolalloc/trunk/test/dsa/regression/2010-07-12-SCCLeader.ll Added: poolalloc/trunk/test/dsa/regression/2010-07-12-SCCLeader.ll URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/test/dsa/regression/2010-07-12-SCCLeader.ll?rev=108710&view=auto ============================================================================== --- poolalloc/trunk/test/dsa/regression/2010-07-12-SCCLeader.ll (added) +++ poolalloc/trunk/test/dsa/regression/2010-07-12-SCCLeader.ll Mon Jul 19 12:05:12 2010 @@ -0,0 +1,3553 @@ +;RUN: dsaopt %s -dsa-eq -disable-output +; ModuleID = 'bugpoint-reduced-simplified.bc' +target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64" +target triple = "x86_64-unknown-linux-gnu" + +%0 = type { %struct._IO_FILE*, %struct._IO_FILE*, [8192 x i8] } +%struct.TypCollectors = type { i8*, void (%struct.TypHeader*, i64)*, i32 (i64*, %struct.TypHeader*)* } +%struct.TypHeader = type { i64, %struct.TypHeader**, [3 x i8], i8 } +%struct.TypInputFile = type { i64, [64 x i8], [256 x i8], i8*, i64 } +%struct.TypOutputFile = type { i64, [256 x i8], i64, i64, i64, i64 } +%struct._IO_FILE = type { i32, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, %struct._IO_marker*, %struct._IO_FILE*, i32, i32, i64, i16, i8, [1 x i8], i8*, i64, i8*, i8*, i8*, i8*, i64, i32, [20 x i8] } +%struct._IO_marker = type { %struct._IO_marker*, %struct._IO_FILE*, i32 } +%struct.__jmp_buf_tag = type { [8 x i64], i32, %struct.__sigset_t } +%struct.__sigset_t = type { [16 x i64] } +%struct.anon = type { i64, i64, [4 x i8] } +%struct.termio = type { i16, i16, i16, i16, i8, [8 x i8] } +%struct.tms = type { i64, i64, i64, i64 } + + at Collectors = external constant [6 x %struct.TypCollectors], align 32 ; <[6 x %struct.TypCollectors]*> [#uses=0] + at CSeries = external global i64* ; [#uses=0] + at Class = external global i16 ; [#uses=0] + at CWeights = external global i64* ; [#uses=0] + at ug = external global i16 ; [#uses=0] + at cg = external global i16 ; [#uses=0] + at g = external global i64* ; [#uses=0] + at ce = external global i64 ; [#uses=0] + at Commutators = external global %struct.TypHeader** ; <%struct.TypHeader***> [#uses=0] + at GenStk = external global i16* ; [#uses=0] + at ExpStk = external global i64* ; [#uses=0] + at StrStk = external global i16** ; [#uses=0] + at Sp = external global i64 ; [#uses=0] + at StkDim = external global i64 ; [#uses=0] + at ue = external global i64 ; [#uses=0] + at LastClass = external global i16 ; [#uses=0] + at Powers = external global %struct.TypHeader** ; <%struct.TypHeader***> [#uses=0] + at NrGens = external global i64 ; [#uses=0] + at Prime = external global i64 ; [#uses=0] + at HdRnAvec = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] + at .str = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] + at .str1 = external constant [11 x i8], align 1 ; <[11 x i8]*> [#uses=0] + at .str2 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=0] + at .str3 = external constant [6 x i8], align 1 ; <[6 x i8]*> [#uses=0] + at .str4 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] + at .str5 = external constant [8 x i8], align 1 ; <[8 x i8]*> [#uses=0] + at .str6 = external constant [12 x i8], align 1 ; <[12 x i8]*> [#uses=0] + at .str7 = external constant [10 x i8], align 1 ; <[10 x i8]*> [#uses=0] + at .str8 = external constant [17 x i8], align 1 ; <[17 x i8]*> [#uses=0] + at .str9 = external constant [14 x i8], align 1 ; <[14 x i8]*> [#uses=0] + at .str10 = external constant [17 x i8], align 1 ; <[17 x i8]*> [#uses=0] + at .str11 = external constant [62 x i8], align 8 ; <[62 x i8]*> [#uses=0] + at .str12 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] + at HdCallOop2 = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] + at HdCallOop1 = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] + at .str13 = external constant [43 x i8], align 8 ; <[43 x i8]*> [#uses=0] + at .str14 = external constant [40 x i8], align 8 ; <[40 x i8]*> [#uses=0] + at .str15 = external constant [43 x i8], align 8 ; <[43 x i8]*> [#uses=0] + at .str16 = external constant [42 x i8], align 8 ; <[42 x i8]*> [#uses=0] + at .str17 = external constant [40 x i8], align 8 ; <[40 x i8]*> [#uses=0] + at .str18 = external constant [41 x i8], align 8 ; <[41 x i8]*> [#uses=0] + at .str19 = external constant [41 x i8], align 8 ; <[41 x i8]*> [#uses=0] + at .str20 = external constant [35 x i8], align 8 ; <[35 x i8]*> [#uses=0] + at .str21 = external constant [35 x i8], align 8 ; <[35 x i8]*> [#uses=0] + at .str22 = external constant [28 x i8], align 1 ; <[28 x i8]*> [#uses=0] + at .str23 = external constant [21 x i8], align 1 ; <[21 x i8]*> [#uses=0] + at .str24 = external constant [22 x i8], align 1 ; <[22 x i8]*> [#uses=0] + at .str25 = external constant [26 x i8], align 1 ; <[26 x i8]*> [#uses=0] + at .str26 = external constant [18 x i8], align 1 ; <[18 x i8]*> [#uses=0] + at .str27 = external constant [11 x i8], align 1 ; <[11 x i8]*> [#uses=0] + at .str28 = external constant [31 x i8], align 8 ; <[31 x i8]*> [#uses=0] + at .str29 = external constant [35 x i8], align 8 ; <[35 x i8]*> [#uses=0] + at .str30 = external constant [29 x i8], align 1 ; <[29 x i8]*> [#uses=0] + at .str31 = external constant [27 x i8], align 1 ; <[27 x i8]*> [#uses=0] + at .str32 = external constant [14 x i8], align 1 ; <[14 x i8]*> [#uses=0] + at .str33 = external constant [15 x i8], align 1 ; <[15 x i8]*> [#uses=0] + at .str34 = external constant [43 x i8], align 8 ; <[43 x i8]*> [#uses=0] + at .str35 = external constant [40 x i8], align 8 ; <[40 x i8]*> [#uses=0] + at .str36 = external constant [10 x i8], align 1 ; <[10 x i8]*> [#uses=0] + at .str37 = external constant [49 x i8], align 8 ; <[49 x i8]*> [#uses=0] + at .str38 = external constant [50 x i8], align 8 ; <[50 x i8]*> [#uses=0] + at .str39 = external constant [42 x i8], align 8 ; <[42 x i8]*> [#uses=0] + at .str40 = external constant [45 x i8], align 8 ; <[45 x i8]*> [#uses=0] + at .str41 = external constant [32 x i8], align 8 ; <[32 x i8]*> [#uses=0] + at .str42 = external constant [48 x i8], align 8 ; <[48 x i8]*> [#uses=0] + at .str43 = external constant [11 x i8], align 1 ; <[11 x i8]*> [#uses=0] + at .str44 = external constant [47 x i8], align 8 ; <[47 x i8]*> [#uses=0] + at .str45 = external constant [49 x i8], align 8 ; <[49 x i8]*> [#uses=0] + at .str46 = external constant [53 x i8], align 8 ; <[53 x i8]*> [#uses=0] + at .str47 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=0] + at .str48 = external constant [10 x i8], align 1 ; <[10 x i8]*> [#uses=0] + at .str49 = external constant [33 x i8], align 8 ; <[33 x i8]*> [#uses=0] + at .str50 = external constant [38 x i8], align 8 ; <[38 x i8]*> [#uses=0] + at .str51 = external constant [36 x i8], align 8 ; <[36 x i8]*> [#uses=0] + at .str52 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] + at .str53 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] + at .str54 = external constant [10 x i8], align 1 ; <[10 x i8]*> [#uses=0] + at .str55 = external constant [11 x i8], align 1 ; <[11 x i8]*> [#uses=0] + at .str56 = external constant [14 x i8], align 1 ; <[14 x i8]*> [#uses=0] + at .str57 = external constant [51 x i8], align 8 ; <[51 x i8]*> [#uses=0] + at .str58 = external constant [60 x i8], align 8 ; <[60 x i8]*> [#uses=0] + at .str59 = external constant [47 x i8], align 8 ; <[47 x i8]*> [#uses=0] + at .str60 = external constant [11 x i8], align 1 ; <[11 x i8]*> [#uses=0] + at .str61 = external constant [11 x i8], align 1 ; <[11 x i8]*> [#uses=0] + at .str62 = external constant [48 x i8], align 8 ; <[48 x i8]*> [#uses=0] + at .str63 = external constant [57 x i8], align 8 ; <[57 x i8]*> [#uses=0] + at .str64 = external constant [8 x i8], align 1 ; <[8 x i8]*> [#uses=0] + at .str65 = external constant [10 x i8], align 1 ; <[10 x i8]*> [#uses=0] + at .str166 = external constant [10 x i8], align 1 ; <[10 x i8]*> [#uses=0] + at HdRnSumAgWord = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] + at .str267 = external constant [17 x i8], align 1 ; <[17 x i8]*> [#uses=0] + at HdRnDifferenceAgWord = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] + at .str368 = external constant [6 x i8], align 1 ; <[6 x i8]*> [#uses=0] + at HdRnDepth = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] + at .str469 = external constant [10 x i8], align 1 ; <[10 x i8]*> [#uses=0] + at HdRnTailDepth = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] + at .str570 = external constant [14 x i8], align 1 ; <[14 x i8]*> [#uses=0] + at HdRnCentralWeight = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] + at .str671 = external constant [16 x i8], align 1 ; <[16 x i8]*> [#uses=0] + at HdRnLeadingExponent = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] + at .str772 = external constant [14 x i8], align 1 ; <[14 x i8]*> [#uses=0] + at HdRnReducedAgWord = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] + at .str873 = external constant [14 x i8], align 1 ; <[14 x i8]*> [#uses=0] + at HdRnRelativeOrder = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] + at .str974 = external constant [15 x i8], align 1 ; <[15 x i8]*> [#uses=0] + at HdRnExponentAgWord = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] + at .str1075 = external constant [16 x i8], align 1 ; <[16 x i8]*> [#uses=0] + at HdRnExponentsAgWord = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] + at .str1176 = external constant [18 x i8], align 1 ; <[18 x i8]*> [#uses=0] + at HdRnInformationAgWord = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] + at .str1277 = external constant [19 x i8], align 1 ; <[19 x i8]*> [#uses=0] + at HdRnIsCompatibleAgWord = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] + at .str1378 = external constant [13 x i8], align 1 ; <[13 x i8]*> [#uses=0] + at HdRnNormalizeIgs = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] + at .str1479 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=0] + at HdRnIsAgWord = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] + at .str1580 = external constant [5 x i8], align 1 ; <[5 x i8]*> [#uses=0] + at .str1681 = external constant [12 x i8], align 1 ; <[12 x i8]*> [#uses=0] + at .str1782 = external constant [16 x i8], align 1 ; <[16 x i8]*> [#uses=0] + at .str1883 = external constant [20 x i8], align 1 ; <[20 x i8]*> [#uses=0] + at .str1984 = external constant [22 x i8], align 1 ; <[22 x i8]*> [#uses=0] + at .str2085 = external constant [20 x i8], align 1 ; <[20 x i8]*> [#uses=0] + at .str2186 = external constant [10 x i8], align 1 ; <[10 x i8]*> [#uses=0] + at .str2287 = external constant [13 x i8], align 1 ; <[13 x i8]*> [#uses=0] + at .str2388 = external constant [14 x i8], align 1 ; <[14 x i8]*> [#uses=0] + at .str2489 = external constant [14 x i8], align 1 ; <[14 x i8]*> [#uses=0] + at .str2590 = external constant [10 x i8], align 1 ; <[10 x i8]*> [#uses=0] + at .str2691 = external constant [17 x i8], align 1 ; <[17 x i8]*> [#uses=0] + at HdCPL = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] + at HdCPC = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] + at HdCPS = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] + at .str2794 = external constant [19 x i8], align 1 ; <[19 x i8]*> [#uses=0] + at .str2895 = external constant [3 x i8], align 1 ; <[3 x i8]*> [#uses=0] + at .str2996 = external constant [14 x i8], align 1 ; <[14 x i8]*> [#uses=0] + at .str3097 = external constant [13 x i8], align 1 ; <[13 x i8]*> [#uses=0] + at .str3198 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=0] + at .str3299 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=0] + at .str33100 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=0] + at .str34101 = external constant [13 x i8], align 1 ; <[13 x i8]*> [#uses=0] + at .str35102 = external constant [12 x i8], align 1 ; <[12 x i8]*> [#uses=0] + at .str36103 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=0] + at .str37104 = external constant [5 x i8], align 1 ; <[5 x i8]*> [#uses=0] + at .str38105 = external constant [4 x i8], align 1 ; <[4 x i8]*> [#uses=0] + at .str39106 = external constant [4 x i8], align 1 ; <[4 x i8]*> [#uses=0] + at .str40107 = external constant [3 x i8], align 1 ; <[3 x i8]*> [#uses=0] + at .str41108 = external constant [41 x i8], align 8 ; <[41 x i8]*> [#uses=0] + at RepTimes = external global i64 ; [#uses=0] + at .str42109 = external constant [45 x i8], align 8 ; <[45 x i8]*> [#uses=0] + at .str43110 = external constant [28 x i8], align 1 ; <[28 x i8]*> [#uses=0] + at .str44111 = external constant [46 x i8], align 8 ; <[46 x i8]*> [#uses=0] + at .str45112 = external constant [46 x i8], align 8 ; <[46 x i8]*> [#uses=0] + at CallsProdAg = external global i64 ; [#uses=0] + at TimeProdAg = external global i64 ; [#uses=0] + at .str46113 = external constant [21 x i8], align 1 ; <[21 x i8]*> [#uses=0] + at .str47114 = external constant [8 x i8], align 1 ; <[8 x i8]*> [#uses=0] + at CallsQuoAg = external global i64 ; [#uses=0] + at TimeQuoAg = external global i64 ; [#uses=0] + at .str48115 = external constant [21 x i8], align 1 ; <[21 x i8]*> [#uses=0] + at CallsPowAgI = external global i64 ; [#uses=0] + at TimePowAgI = external global i64 ; [#uses=0] + at .str49116 = external constant [21 x i8], align 1 ; <[21 x i8]*> [#uses=0] + at CallsPowAgAg = external global i64 ; [#uses=0] + at TimePowAgAg = external global i64 ; [#uses=0] + at .str50117 = external constant [21 x i8], align 1 ; <[21 x i8]*> [#uses=0] + at CallsModAg = external global i64 ; [#uses=0] + at TimeModAg = external global i64 ; [#uses=0] + at .str51118 = external constant [21 x i8], align 1 ; <[21 x i8]*> [#uses=0] + at CallsCommAg = external global i64 ; [#uses=0] + at TimeCommAg = external global i64 ; [#uses=0] + at .str52119 = external constant [21 x i8], align 1 ; <[21 x i8]*> [#uses=0] + at CallsLtAg = external global i64 ; [#uses=0] + at TimeLtAg = external global i64 ; [#uses=0] + at .str53120 = external constant [21 x i8], align 1 ; <[21 x i8]*> [#uses=0] + at CallsEqAg = external global i64 ; [#uses=0] + at TimeEqAg = external global i64 ; [#uses=0] + at .str54121 = external constant [21 x i8], align 1 ; <[21 x i8]*> [#uses=0] + at CallsSumAg = external global i64 ; [#uses=0] + at TimeSumAg = external global i64 ; [#uses=0] + at .str55122 = external constant [21 x i8], align 1 ; <[21 x i8]*> [#uses=0] + at CallsDiffAg = external global i64 ; [#uses=0] + at TimeDiffAg = external global i64 ; [#uses=0] + at .str56123 = external constant [21 x i8], align 1 ; <[21 x i8]*> [#uses=0] + at .str57124 = external constant [40 x i8], align 8 ; <[40 x i8]*> [#uses=0] + at .str58125 = external constant [28 x i8], align 1 ; <[28 x i8]*> [#uses=0] + at .str59126 = external constant [25 x i8], align 1 ; <[25 x i8]*> [#uses=0] + at .str60127 = external constant [39 x i8], align 8 ; <[39 x i8]*> [#uses=0] + at .str61128 = external constant [28 x i8], align 1 ; <[28 x i8]*> [#uses=0] + at .str62129 = external constant [26 x i8], align 1 ; <[26 x i8]*> [#uses=0] + at .str63130 = external constant [41 x i8], align 8 ; <[41 x i8]*> [#uses=0] + at .str64131 = external constant [4 x i8], align 1 ; <[4 x i8]*> [#uses=0] + at .str65132 = external constant [2 x i8], align 1 ; <[2 x i8]*> [#uses=0] + at .str66 = external constant [31 x i8], align 8 ; <[31 x i8]*> [#uses=0] + at .str67 = external constant [37 x i8], align 8 ; <[37 x i8]*> [#uses=0] + at .str68 = external constant [37 x i8], align 8 ; <[37 x i8]*> [#uses=0] + at .str69 = external constant [12 x i8], align 1 ; <[12 x i8]*> [#uses=0] + at .str70 = external constant [12 x i8], align 1 ; <[12 x i8]*> [#uses=0] + at CPP.b = external global i1 ; [#uses=0] + at .str71 = external constant [1 x i8], align 1 ; <[1 x i8]*> [#uses=0] + at .str72 = external constant [3 x i8], align 1 ; <[3 x i8]*> [#uses=0] + at CPN = external global i64 ; [#uses=0] + at .str73 = external constant [39 x i8], align 8 ; <[39 x i8]*> [#uses=0] + at .str74 = external constant [24 x i8], align 1 ; <[24 x i8]*> [#uses=0] + at .str75 = external constant [23 x i8], align 1 ; <[23 x i8]*> [#uses=0] + at .str76 = external constant [39 x i8], align 8 ; <[39 x i8]*> [#uses=0] + at .str77 = external constant [30 x i8], align 1 ; <[30 x i8]*> [#uses=0] + at .str78 = external constant [35 x i8], align 8 ; <[35 x i8]*> [#uses=0] + at .str79 = external constant [40 x i8], align 8 ; <[40 x i8]*> [#uses=0] + at .str80 = external constant [33 x i8], align 8 ; <[33 x i8]*> [#uses=0] + at .str81 = external constant [47 x i8], align 8 ; <[47 x i8]*> [#uses=0] + at .str82 = external constant [38 x i8], align 8 ; <[38 x i8]*> [#uses=0] + at .str83 = external constant [45 x i8], align 8 ; <[45 x i8]*> [#uses=0] + at .str84 = external constant [36 x i8], align 8 ; <[36 x i8]*> [#uses=0] + at .str87 = external constant [32 x i8], align 8 ; <[32 x i8]*> [#uses=0] + at .str89 = external constant [6 x i8], align 1 ; <[6 x i8]*> [#uses=0] + at .str91 = external constant [36 x i8], align 8 ; <[36 x i8]*> [#uses=0] + at .str93 = external constant [34 x i8], align 8 ; <[34 x i8]*> [#uses=0] + at .str94 = external constant [28 x i8], align 1 ; <[28 x i8]*> [#uses=0] + at .str95 = external constant [36 x i8], align 8 ; <[36 x i8]*> [#uses=0] + at .str96 = external constant [30 x i8], align 1 ; <[30 x i8]*> [#uses=0] + at .str97 = external constant [34 x i8], align 8 ; <[34 x i8]*> [#uses=0] + at .str98 = external constant [46 x i8], align 8 ; <[46 x i8]*> [#uses=0] + at .str99 = external constant [30 x i8], align 1 ; <[30 x i8]*> [#uses=0] + at .str100 = external constant [26 x i8], align 1 ; <[26 x i8]*> [#uses=0] + at .str101 = external constant [45 x i8], align 8 ; <[45 x i8]*> [#uses=0] + at .str102 = external constant [50 x i8], align 8 ; <[50 x i8]*> [#uses=0] + at .str103 = external constant [46 x i8], align 8 ; <[46 x i8]*> [#uses=0] + at .str104 = external constant [29 x i8], align 1 ; <[29 x i8]*> [#uses=0] + at .str105 = external constant [33 x i8], align 8 ; <[33 x i8]*> [#uses=0] + at .str106 = external constant [30 x i8], align 1 ; <[30 x i8]*> [#uses=0] + at .str107 = external constant [36 x i8], align 8 ; <[36 x i8]*> [#uses=0] + at .str108 = external constant [44 x i8], align 8 ; <[44 x i8]*> [#uses=0] + at .str109 = external constant [29 x i8], align 1 ; <[29 x i8]*> [#uses=0] + at .str110 = external constant [34 x i8], align 8 ; <[34 x i8]*> [#uses=0] + at .str111 = external constant [55 x i8], align 8 ; <[55 x i8]*> [#uses=0] + at .str113 = external constant [33 x i8], align 8 ; <[33 x i8]*> [#uses=0] + at .str114 = external constant [43 x i8], align 8 ; <[43 x i8]*> [#uses=0] + at .str115 = external constant [41 x i8], align 8 ; <[41 x i8]*> [#uses=0] + at .str116 = external constant [23 x i8], align 1 ; <[23 x i8]*> [#uses=0] + at .str117 = external constant [12 x i8], align 1 ; <[12 x i8]*> [#uses=0] + at .str118 = external constant [12 x i8], align 1 ; <[12 x i8]*> [#uses=0] + at .str119 = external constant [22 x i8], align 1 ; <[22 x i8]*> [#uses=0] + at .str120 = external constant [29 x i8], align 1 ; <[29 x i8]*> [#uses=0] + at .str121 = external constant [35 x i8], align 8 ; <[35 x i8]*> [#uses=0] + at .str122 = external constant [40 x i8], align 8 ; <[40 x i8]*> [#uses=0] + at .str123 = external constant [29 x i8], align 1 ; <[29 x i8]*> [#uses=0] + at .str124 = external constant [33 x i8], align 8 ; <[33 x i8]*> [#uses=0] + at .str125 = external constant [41 x i8], align 8 ; <[41 x i8]*> [#uses=0] + at .str137 = external constant [8 x i8], align 1 ; <[8 x i8]*> [#uses=0] + at .str1138 = external constant [10 x i8], align 1 ; <[10 x i8]*> [#uses=0] + at .str2139 = external constant [10 x i8], align 1 ; <[10 x i8]*> [#uses=0] + at .str3140 = external constant [10 x i8], align 1 ; <[10 x i8]*> [#uses=0] + at .str4141 = external constant [14 x i8], align 1 ; <[14 x i8]*> [#uses=0] + at .str5142 = external constant [15 x i8], align 1 ; <[15 x i8]*> [#uses=0] + at .str6143 = external constant [11 x i8], align 1 ; <[11 x i8]*> [#uses=0] + at .str7144 = external constant [14 x i8], align 1 ; <[14 x i8]*> [#uses=0] + at .str8145 = external constant [14 x i8], align 1 ; <[14 x i8]*> [#uses=0] + at .str9146 = external constant [43 x i8], align 8 ; <[43 x i8]*> [#uses=0] + at .str10147 = external constant [44 x i8], align 8 ; <[44 x i8]*> [#uses=0] + at .str11148 = external constant [34 x i8], align 8 ; <[34 x i8]*> [#uses=0] + at .str12149 = external constant [33 x i8], align 8 ; <[33 x i8]*> [#uses=0] + at .str13150 = external constant [32 x i8], align 8 ; <[32 x i8]*> [#uses=0] + at .str14151 = external constant [43 x i8], align 8 ; <[43 x i8]*> [#uses=0] + at .str15152 = external constant [47 x i8], align 8 ; <[47 x i8]*> [#uses=0] + at .str16153 = external constant [47 x i8], align 8 ; <[47 x i8]*> [#uses=0] + at .str17154 = external constant [44 x i8], align 8 ; <[44 x i8]*> [#uses=0] + at .str18155 = external constant [43 x i8], align 8 ; <[43 x i8]*> [#uses=0] + at .str19156 = external constant [47 x i8], align 8 ; <[47 x i8]*> [#uses=0] + at .str20157 = external constant [47 x i8], align 8 ; <[47 x i8]*> [#uses=0] + at .str21158 = external constant [44 x i8], align 8 ; <[44 x i8]*> [#uses=0] + at .str22159 = external constant [44 x i8], align 8 ; <[44 x i8]*> [#uses=0] + at .str23160 = external constant [48 x i8], align 8 ; <[48 x i8]*> [#uses=0] + at .str24161 = external constant [48 x i8], align 8 ; <[48 x i8]*> [#uses=0] + at .str25162 = external constant [45 x i8], align 8 ; <[45 x i8]*> [#uses=0] + at .str26163 = external constant [40 x i8], align 8 ; <[40 x i8]*> [#uses=0] + at .str27164 = external constant [44 x i8], align 8 ; <[44 x i8]*> [#uses=0] + at .str28165 = external constant [44 x i8], align 8 ; <[44 x i8]*> [#uses=0] + at .str29166 = external constant [41 x i8], align 8 ; <[41 x i8]*> [#uses=0] + at .str30167 = external constant [43 x i8], align 8 ; <[43 x i8]*> [#uses=0] + at .str31168 = external constant [47 x i8], align 8 ; <[47 x i8]*> [#uses=0] + at .str32169 = external constant [47 x i8], align 8 ; <[47 x i8]*> [#uses=0] + at .str33170 = external constant [44 x i8], align 8 ; <[44 x i8]*> [#uses=0] + at .str34171 = external constant [28 x i8], align 1 ; <[28 x i8]*> [#uses=0] + at .str35172 = external constant [42 x i8], align 8 ; <[42 x i8]*> [#uses=0] + at .str36173 = external constant [36 x i8], align 8 ; <[36 x i8]*> [#uses=0] + at .str37174 = external constant [33 x i8], align 8 ; <[33 x i8]*> [#uses=0] + at .str38175 = external constant [42 x i8], align 8 ; <[42 x i8]*> [#uses=0] + at .str39176 = external constant [47 x i8], align 8 ; <[47 x i8]*> [#uses=0] + at .str40177 = external constant [24 x i8], align 1 ; <[24 x i8]*> [#uses=0] + at .str41178 = external constant [38 x i8], align 8 ; <[38 x i8]*> [#uses=0] + at .str179 = external constant [15 x i8], align 1 ; <[15 x i8]*> [#uses=0] + at .str1180 = external constant [35 x i8], align 8 ; <[35 x i8]*> [#uses=0] + at .str2181 = external constant [34 x i8], align 8 ; <[34 x i8]*> [#uses=0] + at .str3182 = external constant [39 x i8], align 8 ; <[39 x i8]*> [#uses=0] + at .str4183 = external constant [19 x i8], align 1 ; <[19 x i8]*> [#uses=0] + at .str5184 = external constant [37 x i8], align 8 ; <[37 x i8]*> [#uses=0] + at .str6185 = external constant [20 x i8], align 1 ; <[20 x i8]*> [#uses=0] + at .str7186 = external constant [37 x i8], align 8 ; <[37 x i8]*> [#uses=0] + at .str8187 = external constant [44 x i8], align 8 ; <[44 x i8]*> [#uses=0] + at .str9188 = external constant [45 x i8], align 8 ; <[45 x i8]*> [#uses=0] + at .str10189 = external constant [37 x i8], align 8 ; <[37 x i8]*> [#uses=0] + at .str11190 = external constant [35 x i8], align 8 ; <[35 x i8]*> [#uses=0] + at .str12191 = external constant [22 x i8], align 1 ; <[22 x i8]*> [#uses=0] + at .str13192 = external constant [36 x i8], align 8 ; <[36 x i8]*> [#uses=0] + at .str14193 = external constant [25 x i8], align 1 ; <[25 x i8]*> [#uses=0] + at .str15194 = external constant [47 x i8], align 8 ; <[47 x i8]*> [#uses=0] + at .str16195 = external constant [43 x i8], align 8 ; <[43 x i8]*> [#uses=0] + at .str17196 = external constant [36 x i8], align 8 ; <[36 x i8]*> [#uses=0] + at .str18197 = external constant [47 x i8], align 8 ; <[47 x i8]*> [#uses=0] + at .str19198 = external constant [51 x i8], align 8 ; <[51 x i8]*> [#uses=0] + at .str20199 = external constant [37 x i8], align 8 ; <[37 x i8]*> [#uses=0] + at .str21200 = external constant [37 x i8], align 8 ; <[37 x i8]*> [#uses=0] + at .str22201 = external constant [38 x i8], align 8 ; <[38 x i8]*> [#uses=0] + at .str23202 = external constant [37 x i8], align 8 ; <[37 x i8]*> [#uses=0] + at .str24203 = external constant [37 x i8], align 8 ; <[37 x i8]*> [#uses=0] + at .str25204 = external constant [39 x i8], align 8 ; <[39 x i8]*> [#uses=0] + at .str26205 = external constant [36 x i8], align 8 ; <[36 x i8]*> [#uses=0] + at .str27206 = external constant [46 x i8], align 8 ; <[46 x i8]*> [#uses=0] + at .str28207 = external constant [44 x i8], align 8 ; <[44 x i8]*> [#uses=0] + at hdTable = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] + at treeType = external global i64 ; [#uses=0] + at hdWordValue = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] + at hdTree2 = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] + at treeWordLength = external global i64 ; [#uses=0] + at wordList = external global [1024 x i64], align 32 ; <[1024 x i64]*> [#uses=0] + at hdTabl2 = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] + at .str208 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=0] + at .str1209 = external constant [17 x i8], align 1 ; <[17 x i8]*> [#uses=0] + at .str2210 = external constant [17 x i8], align 1 ; <[17 x i8]*> [#uses=0] + at .str3211 = external constant [10 x i8], align 1 ; <[10 x i8]*> [#uses=0] + at .str4212 = external constant [8 x i8], align 1 ; <[8 x i8]*> [#uses=0] + at .str5213 = external constant [14 x i8], align 1 ; <[14 x i8]*> [#uses=0] + at .str6214 = external constant [10 x i8], align 1 ; <[10 x i8]*> [#uses=0] + at .str7215 = external constant [18 x i8], align 1 ; <[18 x i8]*> [#uses=0] + at .str8216 = external constant [18 x i8], align 1 ; <[18 x i8]*> [#uses=0] + at .str9217 = external constant [18 x i8], align 1 ; <[18 x i8]*> [#uses=0] + at .str10218 = external constant [45 x i8], align 8 ; <[45 x i8]*> [#uses=0] + at .str11219 = external constant [22 x i8], align 1 ; <[22 x i8]*> [#uses=0] + at .str12220 = external constant [23 x i8], align 1 ; <[23 x i8]*> [#uses=0] + at .str13221 = external constant [28 x i8], align 1 ; <[28 x i8]*> [#uses=0] + at .str14222 = external constant [32 x i8], align 8 ; <[32 x i8]*> [#uses=0] + at .str15223 = external constant [31 x i8], align 8 ; <[31 x i8]*> [#uses=0] + at .str16224 = external constant [31 x i8], align 8 ; <[31 x i8]*> [#uses=0] + at hdExponent = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] + at hdTree1 = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] + at hdTree = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] + at .str17225 = external constant [50 x i8], align 8 ; <[50 x i8]*> [#uses=0] + at .str18226 = external constant [34 x i8], align 8 ; <[34 x i8]*> [#uses=0] + at .str19227 = external constant [15 x i8], align 1 ; <[15 x i8]*> [#uses=0] + at .str20228 = external constant [26 x i8], align 1 ; <[26 x i8]*> [#uses=0] + at .str21229 = external constant [15 x i8], align 1 ; <[15 x i8]*> [#uses=0] + at .str22230 = external constant [27 x i8], align 1 ; <[27 x i8]*> [#uses=0] + at .str23231 = external constant [31 x i8], align 8 ; <[31 x i8]*> [#uses=0] + at .str24232 = external constant [26 x i8], align 1 ; <[26 x i8]*> [#uses=0] + at .str25233 = external constant [28 x i8], align 1 ; <[28 x i8]*> [#uses=0] + at .str26234 = external constant [18 x i8], align 1 ; <[18 x i8]*> [#uses=0] + at .str27235 = external constant [34 x i8], align 8 ; <[34 x i8]*> [#uses=0] + at .str28236 = external constant [41 x i8], align 8 ; <[41 x i8]*> [#uses=0] + at .str29237 = external constant [44 x i8], align 8 ; <[44 x i8]*> [#uses=0] + at hdRel = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] + at .str30238 = external constant [32 x i8], align 8 ; <[32 x i8]*> [#uses=0] + at hdNums = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] + at .str31239 = external constant [33 x i8], align 8 ; <[33 x i8]*> [#uses=0] + at .str32240 = external constant [32 x i8], align 8 ; <[32 x i8]*> [#uses=0] + at .str33241 = external constant [33 x i8], align 8 ; <[33 x i8]*> [#uses=0] + at .str34242 = external constant [31 x i8], align 8 ; <[31 x i8]*> [#uses=0] + at dedlst = external global i64 ; [#uses=0] + at .str35243 = external constant [38 x i8], align 8 ; <[38 x i8]*> [#uses=0] + at dedfst = external global i64 ; [#uses=0] + at dedgen = external global [40960 x i64], align 32 ; <[40960 x i64]*> [#uses=0] + at dedcos = external global [40960 x i64], align 32 ; <[40960 x i64]*> [#uses=0] + at dedprint.b = external global i1 ; [#uses=0] + at .str36244 = external constant [41 x i8], align 8 ; <[41 x i8]*> [#uses=0] + at hdNext = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] + at hdPrev = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] + at lastDef = external global i64 ; [#uses=0] + at firstDef = external global i64 ; [#uses=0] + at hdFact = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] + at firstFree = external global i64 ; [#uses=0] + at lastFree = external global i64 ; [#uses=0] + at nrdel = external global i64 ; [#uses=0] + at .str37245 = external constant [36 x i8], align 8 ; <[36 x i8]*> [#uses=0] + at .str38246 = external constant [35 x i8], align 8 ; <[35 x i8]*> [#uses=0] + at lastN.4480 = external global i64 ; [#uses=0] + at phi.4481 = external global i64 ; [#uses=0] + at isSqfree.4482.b = external global i1 ; [#uses=0] + at nrp.4483 = external global i64 ; [#uses=0] + at HdResult = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] + at CycLastE = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] + at .str247 = external constant [2 x i8], align 1 ; <[2 x i8]*> [#uses=0] + at .str1248 = external constant [6 x i8], align 1 ; <[6 x i8]*> [#uses=0] + at .str2249 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=0] + at .str3250 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] + at .str4251 = external constant [10 x i8], align 1 ; <[10 x i8]*> [#uses=1] + at .str5252 = external constant [10 x i8], align 1 ; <[10 x i8]*> [#uses=0] + at .str6253 = external constant [33 x i8], align 8 ; <[33 x i8]*> [#uses=0] + at .str7254 = external constant [36 x i8], align 8 ; <[36 x i8]*> [#uses=0] + at .str8255 = external constant [38 x i8], align 8 ; <[38 x i8]*> [#uses=0] + at .str9256 = external constant [26 x i8], align 1 ; <[26 x i8]*> [#uses=0] + at .str10257 = external constant [38 x i8], align 8 ; <[38 x i8]*> [#uses=0] + at .str11258 = external constant [23 x i8], align 1 ; <[23 x i8]*> [#uses=0] + at .str12259 = external constant [45 x i8], align 8 ; <[45 x i8]*> [#uses=0] + at .str13260 = external constant [40 x i8], align 8 ; <[40 x i8]*> [#uses=0] + at .str14261 = external constant [25 x i8], align 1 ; <[25 x i8]*> [#uses=0] + at .str15262 = external constant [39 x i8], align 8 ; <[39 x i8]*> [#uses=0] + at .str16263 = external constant [22 x i8], align 1 ; <[22 x i8]*> [#uses=0] + at .str17264 = external constant [36 x i8], align 8 ; <[36 x i8]*> [#uses=0] + at .str18265 = external constant [14 x i8], align 1 ; <[14 x i8]*> [#uses=0] + at .str19266 = external constant [34 x i8], align 8 ; <[34 x i8]*> [#uses=0] + at CycLastN = external global i64 ; [#uses=0] + at .str20267 = external constant [3 x i8], align 1 ; <[3 x i8]*> [#uses=0] + at .str21268 = external constant [2 x i8], align 1 ; <[2 x i8]*> [#uses=0] + at .str22269 = external constant [10 x i8], align 1 ; <[10 x i8]*> [#uses=0] + at .str23270 = external constant [11 x i8], align 1 ; <[11 x i8]*> [#uses=0] + at .str24271 = external constant [16 x i8], align 1 ; <[16 x i8]*> [#uses=0] + at .str25272 = external constant [17 x i8], align 1 ; <[17 x i8]*> [#uses=0] + at .str26273 = external constant [13 x i8], align 1 ; <[13 x i8]*> [#uses=0] + at .str27274 = external constant [4 x i8], align 1 ; <[4 x i8]*> [#uses=0] + at .str28275 = external constant [19 x i8], align 1 ; <[19 x i8]*> [#uses=0] + at .str29276 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] + at .str30277 = external constant [11 x i8], align 1 ; <[11 x i8]*> [#uses=0] + at .str31278 = external constant [17 x i8], align 1 ; <[17 x i8]*> [#uses=0] + at EvTab = external global [81 x %struct.TypHeader* (%struct.TypHeader*)*], align 32 ; <[81 x %struct.TypHeader* (%struct.TypHeader*)*]*> [#uses=0] + at TabSum = external global [28 x [28 x %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*)*]], align 32 ; <[28 x [28 x %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*)*]]*> [#uses=0] + at TabDiff = external global [28 x [28 x %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*)*]], align 32 ; <[28 x [28 x %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*)*]]*> [#uses=0] + at TabProd = external global [28 x [28 x %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*)*]], align 32 ; <[28 x [28 x %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*)*]]*> [#uses=0] + at TabQuo = external global [28 x [28 x %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*)*]], align 32 ; <[28 x [28 x %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*)*]]*> [#uses=0] + at TabMod = external global [28 x [28 x %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*)*]], align 32 ; <[28 x [28 x %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*)*]]*> [#uses=0] + at TabPow = external global [28 x [28 x %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*)*]], align 32 ; <[28 x [28 x %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*)*]]*> [#uses=0] + at HdTrue = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] + at HdFalse = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] + at TabEq = external global [28 x [28 x %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*)*]], align 32 ; <[28 x [28 x %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*)*]]*> [#uses=0] + at TabLt = external global [28 x [28 x %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*)*]], align 32 ; <[28 x [28 x %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*)*]]*> [#uses=0] + at PrTab = external global [81 x void (%struct.TypHeader*)*], align 32 ; <[81 x void (%struct.TypHeader*)*]*> [#uses=0] + at .str292 = external constant [45 x i8], align 8 ; <[45 x i8]*> [#uses=0] + at TabComm = external global [28 x [28 x %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*)*]], align 32 ; <[28 x [28 x %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*)*]]*> [#uses=0] + at .str1294 = external constant [5 x i8], align 1 ; <[5 x i8]*> [#uses=0] + at .str2295 = external constant [13 x i8], align 1 ; <[13 x i8]*> [#uses=0] + at HdVoid = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] + at .str3297 = external constant [5 x i8], align 1 ; <[5 x i8]*> [#uses=0] + at .str4298 = external constant [6 x i8], align 1 ; <[6 x i8]*> [#uses=0] + at .str5299 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] + at .str6300 = external constant [12 x i8], align 1 ; <[12 x i8]*> [#uses=0] + at .str7301 = external constant [5 x i8], align 1 ; <[5 x i8]*> [#uses=0] + at .str8302 = external constant [8 x i8], align 1 ; <[8 x i8]*> [#uses=1] + at .str9303 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] + at .str10304 = external constant [3 x i8], align 1 ; <[3 x i8]*> [#uses=0] + at HdTildePr = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] + at .str11305 = external constant [34 x i8], align 8 ; <[34 x i8]*> [#uses=0] + at .str12306 = external constant [28 x i8], align 1 ; <[28 x i8]*> [#uses=0] + at .str13307 = external constant [23 x i8], align 1 ; <[23 x i8]*> [#uses=0] + at .str14308 = external constant [37 x i8], align 8 ; <[37 x i8]*> [#uses=0] + at .str15309 = external constant [46 x i8], align 8 ; <[46 x i8]*> [#uses=0] + at .str16310 = external constant [47 x i8], align 8 ; <[47 x i8]*> [#uses=0] + at .str17311 = external constant [47 x i8], align 8 ; <[47 x i8]*> [#uses=0] + at .str18312 = external constant [41 x i8], align 8 ; <[41 x i8]*> [#uses=0] + at .str19313 = external constant [33 x i8], align 8 ; <[33 x i8]*> [#uses=0] + at .str20314 = external constant [38 x i8], align 8 ; <[38 x i8]*> [#uses=0] + at .str21315 = external constant [51 x i8], align 8 ; <[51 x i8]*> [#uses=0] + at .str22316 = external constant [30 x i8], align 1 ; <[30 x i8]*> [#uses=0] + at .str23317 = external constant [46 x i8], align 8 ; <[46 x i8]*> [#uses=0] + at .str24318 = external constant [50 x i8], align 8 ; <[50 x i8]*> [#uses=0] + at .str25319 = external constant [49 x i8], align 8 ; <[49 x i8]*> [#uses=0] + at .str26320 = external constant [48 x i8], align 8 ; <[48 x i8]*> [#uses=0] + at .str27321 = external constant [50 x i8], align 8 ; <[50 x i8]*> [#uses=0] + at .str28322 = external constant [44 x i8], align 8 ; <[44 x i8]*> [#uses=0] + at .str29323 = external constant [33 x i8], align 8 ; <[33 x i8]*> [#uses=0] + at .str30324 = external constant [4 x i8], align 1 ; <[4 x i8]*> [#uses=0] + at .str31325 = external constant [3 x i8], align 1 ; <[3 x i8]*> [#uses=0] + at .str32326 = external constant [5 x i8], align 1 ; <[5 x i8]*> [#uses=0] + at .str33327 = external constant [5 x i8], align 1 ; <[5 x i8]*> [#uses=0] + at .str34328 = external constant [4 x i8], align 1 ; <[4 x i8]*> [#uses=0] + at .str35329 = external constant [3 x i8], align 1 ; <[3 x i8]*> [#uses=0] + at .str36330 = external constant [4 x i8], align 1 ; <[4 x i8]*> [#uses=0] + at .str37331 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=0] + at .str38332 = external constant [3 x i8], align 1 ; <[3 x i8]*> [#uses=0] + at .str40334 = external constant [6 x i8], align 1 ; <[6 x i8]*> [#uses=0] + at .str41335 = external constant [4 x i8], align 1 ; <[4 x i8]*> [#uses=0] + at .str42336 = external constant [4 x i8], align 1 ; <[4 x i8]*> [#uses=0] + at .str43337 = external constant [3 x i8], align 1 ; <[3 x i8]*> [#uses=0] + at .str44338 = external constant [3 x i8], align 1 ; <[3 x i8]*> [#uses=0] + at .str45339 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] + at .str46340 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] + at .str47341 = external constant [5 x i8], align 1 ; <[5 x i8]*> [#uses=0] + at .str48342 = external constant [6 x i8], align 1 ; <[6 x i8]*> [#uses=0] + at .str49343 = external constant [6 x i8], align 1 ; <[6 x i8]*> [#uses=0] + at .str50344 = external constant [5 x i8], align 1 ; <[5 x i8]*> [#uses=0] + at .str51345 = external constant [2 x i8], align 1 ; <[2 x i8]*> [#uses=0] + at .str52346 = external constant [3 x i8], align 1 ; <[3 x i8]*> [#uses=0] + at .str53347 = external constant [4 x i8], align 1 ; <[4 x i8]*> [#uses=0] + at .str54348 = external constant [30 x i8], align 1 ; <[30 x i8]*> [#uses=0] + at .str55349 = external constant [2 x i8], align 1 ; <[2 x i8]*> [#uses=0] + at .str56350 = external constant [5 x i8], align 1 ; <[5 x i8]*> [#uses=0] + at .str57351 = external constant [4 x i8], align 1 ; <[4 x i8]*> [#uses=0] + at .str58352 = external constant [11 x i8], align 1 ; <[11 x i8]*> [#uses=0] + at .str59353 = external constant [6 x i8], align 1 ; <[6 x i8]*> [#uses=0] + at .str60354 = external constant [5 x i8], align 1 ; <[5 x i8]*> [#uses=0] + at prPrec = external global i64 ; [#uses=0] + at .str61355 = external constant [2 x i8], align 1 ; <[2 x i8]*> [#uses=0] + at .str62356 = external constant [2 x i8], align 1 ; <[2 x i8]*> [#uses=0] + at .str63357 = external constant [2 x i8], align 1 ; <[2 x i8]*> [#uses=0] + at .str64358 = external constant [3 x i8], align 1 ; <[3 x i8]*> [#uses=0] + at .str65359 = external constant [3 x i8], align 1 ; <[3 x i8]*> [#uses=0] + at .str66360 = external constant [3 x i8], align 1 ; <[3 x i8]*> [#uses=0] + at .str67361 = external constant [2 x i8], align 1 ; <[2 x i8]*> [#uses=0] + at .str68362 = external constant [2 x i8], align 1 ; <[2 x i8]*> [#uses=0] + at .str69363 = external constant [2 x i8], align 1 ; <[2 x i8]*> [#uses=0] + at .str70364 = external constant [2 x i8], align 1 ; <[2 x i8]*> [#uses=0] + at .str71365 = external constant [2 x i8], align 1 ; <[2 x i8]*> [#uses=0] + at .str72366 = external constant [17 x i8], align 1 ; <[17 x i8]*> [#uses=0] + at .str73367 = external constant [6 x i8], align 1 ; <[6 x i8]*> [#uses=0] + at .str74368 = external constant [4 x i8], align 1 ; <[4 x i8]*> [#uses=0] + at .str75369 = external constant [2 x i8], align 1 ; <[2 x i8]*> [#uses=0] + at .str76370 = external constant [2 x i8], align 1 ; <[2 x i8]*> [#uses=0] + at .str77371 = external constant [15 x i8], align 1 ; <[15 x i8]*> [#uses=0] + at .str78372 = external constant [4 x i8], align 1 ; <[4 x i8]*> [#uses=0] + at .str79373 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] + at .str81375 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=0] + at .str82376 = external constant [45 x i8], align 8 ; <[45 x i8]*> [#uses=0] + at .str83377 = external constant [24 x i8], align 1 ; <[24 x i8]*> [#uses=0] + at .str84378 = external constant [34 x i8], align 8 ; <[34 x i8]*> [#uses=0] + at .str85379 = external constant [31 x i8], align 8 ; <[31 x i8]*> [#uses=0] + at .str86380 = external constant [38 x i8], align 8 ; <[38 x i8]*> [#uses=0] + at .str87381 = external constant [39 x i8], align 8 ; <[39 x i8]*> [#uses=0] + at .str88382 = external constant [35 x i8], align 8 ; <[35 x i8]*> [#uses=0] + at .str89383 = external constant [23 x i8], align 1 ; <[23 x i8]*> [#uses=0] + at .str90384 = external constant [33 x i8], align 8 ; <[33 x i8]*> [#uses=0] + at .str91385 = external constant [30 x i8], align 1 ; <[30 x i8]*> [#uses=0] + at .str92386 = external constant [37 x i8], align 8 ; <[37 x i8]*> [#uses=0] + at .str93387 = external constant [34 x i8], align 8 ; <[34 x i8]*> [#uses=0] + at .str94388 = external constant [21 x i8], align 1 ; <[21 x i8]*> [#uses=0] + at HdReturn = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] + at Pols = external constant [186 x i64], align 32 ; <[186 x i64]*> [#uses=0] + at HdFields = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] + at HdIntFFEs = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] + at .str396 = external constant [6 x i8], align 1 ; <[6 x i8]*> [#uses=0] + at .str1397 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] + at .str2398 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] + at .str3399 = external constant [2 x i8], align 1 ; <[2 x i8]*> [#uses=0] + at .str4400 = external constant [22 x i8], align 1 ; <[22 x i8]*> [#uses=0] + at .str5401 = external constant [36 x i8], align 8 ; <[36 x i8]*> [#uses=0] + at .str6402 = external constant [24 x i8], align 1 ; <[24 x i8]*> [#uses=0] + at .str7403 = external constant [15 x i8], align 1 ; <[15 x i8]*> [#uses=0] + at .str8404 = external constant [11 x i8], align 1 ; <[11 x i8]*> [#uses=0] + at .str9405 = external constant [4 x i8], align 1 ; <[4 x i8]*> [#uses=0] + at .str10406 = external constant [10 x i8], align 1 ; <[10 x i8]*> [#uses=0] + at .str11407 = external constant [8 x i8], align 1 ; <[8 x i8]*> [#uses=0] + at .str12408 = external constant [16 x i8], align 1 ; <[16 x i8]*> [#uses=0] + at .str13409 = external constant [43 x i8], align 8 ; <[43 x i8]*> [#uses=0] + at HdLastIntFFE = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] + at .str14410 = external constant [21 x i8], align 1 ; <[21 x i8]*> [#uses=0] + at .str15411 = external constant [43 x i8], align 8 ; <[43 x i8]*> [#uses=0] + at .str16412 = external constant [40 x i8], align 8 ; <[40 x i8]*> [#uses=0] + at .str17413 = external constant [43 x i8], align 8 ; <[43 x i8]*> [#uses=0] + at .str18414 = external constant [43 x i8], align 8 ; <[43 x i8]*> [#uses=0] + at .str19415 = external constant [28 x i8], align 1 ; <[28 x i8]*> [#uses=0] + at .str20416 = external constant [43 x i8], align 8 ; <[43 x i8]*> [#uses=0] + at .str21417 = external constant [28 x i8], align 1 ; <[28 x i8]*> [#uses=0] + at .str22418 = external constant [51 x i8], align 8 ; <[51 x i8]*> [#uses=0] + at .str23419 = external constant [44 x i8], align 8 ; <[44 x i8]*> [#uses=0] + at .str24420 = external constant [35 x i8], align 8 ; <[35 x i8]*> [#uses=0] + at .str25421 = external constant [59 x i8], align 8 ; <[59 x i8]*> [#uses=0] + at .str26422 = external constant [52 x i8], align 8 ; <[52 x i8]*> [#uses=0] + at .str27423 = external constant [59 x i8], align 8 ; <[59 x i8]*> [#uses=0] + at .str28424 = external constant [52 x i8], align 8 ; <[52 x i8]*> [#uses=0] + at .str29425 = external constant [59 x i8], align 8 ; <[59 x i8]*> [#uses=0] + at .str30426 = external constant [52 x i8], align 8 ; <[52 x i8]*> [#uses=0] + at .str31427 = external constant [59 x i8], align 8 ; <[59 x i8]*> [#uses=0] + at .str32428 = external constant [52 x i8], align 8 ; <[52 x i8]*> [#uses=0] + at HdExec = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] + at .str431 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] + at .str1432 = external constant [10 x i8], align 1 ; <[10 x i8]*> [#uses=0] + at .str2433 = external constant [12 x i8], align 1 ; <[12 x i8]*> [#uses=0] + at .str3434 = external constant [10 x i8], align 1 ; <[10 x i8]*> [#uses=0] + at HdTimes = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] + at .str4435 = external constant [8 x i8], align 1 ; <[8 x i8]*> [#uses=0] + at .str5436 = external constant [47 x i8], align 8 ; <[47 x i8]*> [#uses=0] + at .str8439 = external constant [15 x i8], align 1 ; <[15 x i8]*> [#uses=0] + at .str11442 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] + at .str12443 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] + at .str13444 = external constant [6 x i8], align 1 ; <[6 x i8]*> [#uses=0] + at .str14445 = external constant [19 x i8], align 1 ; <[19 x i8]*> [#uses=0] + at .str15446 = external constant [5 x i8], align 1 ; <[5 x i8]*> [#uses=0] + at prFull.b = external global i1 ; [#uses=0] + at .str16447 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=0] + at .str18449 = external constant [10 x i8], align 1 ; <[10 x i8]*> [#uses=0] + at .str19450 = external constant [5 x i8], align 1 ; <[5 x i8]*> [#uses=0] + at .str20451 = external constant [6 x i8], align 1 ; <[6 x i8]*> [#uses=0] + at .str22453 = external constant [34 x i8], align 8 ; <[34 x i8]*> [#uses=0] + at .str23454 = external constant [28 x i8], align 1 ; <[28 x i8]*> [#uses=0] + at .str24455 = external constant [32 x i8], align 8 ; <[32 x i8]*> [#uses=0] + at .str25456 = external constant [40 x i8], align 8 ; <[40 x i8]*> [#uses=0] + at .str26457 = external constant [30 x i8], align 1 ; <[30 x i8]*> [#uses=0] + at .str27458 = external constant [23 x i8], align 1 ; <[23 x i8]*> [#uses=0] + at .str28459 = external constant [37 x i8], align 8 ; <[37 x i8]*> [#uses=0] + at .str29460 = external constant [42 x i8], align 8 ; <[42 x i8]*> [#uses=0] + at IsProfiling = external global i64 ; [#uses=0] + at .str30461 = external constant [49 x i8], align 8 ; <[49 x i8]*> [#uses=0] + at .str31462 = external constant [6 x i8], align 1 ; <[6 x i8]*> [#uses=0] + at .str32463 = external constant [44 x i8], align 8 ; <[44 x i8]*> [#uses=0] + at .str33464 = external constant [40 x i8], align 8 ; <[40 x i8]*> [#uses=0] + at Timesum = external global i64 ; [#uses=0] + at .str34465 = external constant [22 x i8], align 1 ; <[22 x i8]*> [#uses=0] + at .str35466 = external constant [36 x i8], align 8 ; <[36 x i8]*> [#uses=0] + at .str36467 = external constant [5 x i8], align 1 ; <[5 x i8]*> [#uses=0] + at .str37468 = external constant [5 x i8], align 1 ; <[5 x i8]*> [#uses=0] + at .str39470 = external constant [5 x i8], align 1 ; <[5 x i8]*> [#uses=0] + at .str40471 = external constant [5 x i8], align 1 ; <[5 x i8]*> [#uses=0] + at .str42473 = external constant [4 x i8], align 1 ; <[4 x i8]*> [#uses=0] + at .str43474 = external constant [11 x i8], align 1 ; <[11 x i8]*> [#uses=0] + at .str477 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=0] + at .str1478 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=0] + at .str2479 = external constant [8 x i8], align 1 ; <[8 x i8]*> [#uses=0] + at .str3480 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] + at .str4481 = external constant [5 x i8], align 1 ; <[5 x i8]*> [#uses=0] + at .str5482 = external constant [5 x i8], align 1 ; <[5 x i8]*> [#uses=0] + at .str7484 = external constant [8 x i8], align 1 ; <[8 x i8]*> [#uses=0] + at .str8485 = external constant [6 x i8], align 1 ; <[6 x i8]*> [#uses=0] + at HdLast = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] + at ErrRet = external global [1 x %struct.__jmp_buf_tag], align 32 ; <[1 x %struct.__jmp_buf_tag]*> [#uses=0] + at .str9486 = external constant [5 x i8], align 1 ; <[5 x i8]*> [#uses=0] + at .str10487 = external constant [6 x i8], align 1 ; <[6 x i8]*> [#uses=0] + at HdLast2 = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] + at .str11488 = external constant [6 x i8], align 1 ; <[6 x i8]*> [#uses=0] + at HdLast3 = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] + at .str12489 = external constant [5 x i8], align 1 ; <[5 x i8]*> [#uses=0] + at HdTime = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] + at .str13490 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] + at .str14491 = external constant [18 x i8], align 1 ; <[18 x i8]*> [#uses=0] + at .str15492 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] + at .str16493 = external constant [8 x i8], align 1 ; <[8 x i8]*> [#uses=0] + at .str17494 = external constant [6 x i8], align 1 ; <[6 x i8]*> [#uses=0] + at .str18495 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] + at .str19496 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] + at .str20497 = external constant [6 x i8], align 1 ; <[6 x i8]*> [#uses=0] + at .str21498 = external constant [10 x i8], align 1 ; <[10 x i8]*> [#uses=0] + at .str22499 = external constant [10 x i8], align 1 ; <[10 x i8]*> [#uses=0] + at .str23500 = external constant [5 x i8], align 1 ; <[5 x i8]*> [#uses=0] + at .str24501 = external constant [5 x i8], align 1 ; <[5 x i8]*> [#uses=0] + at .str25502 = external constant [6 x i8], align 1 ; <[6 x i8]*> [#uses=0] + at .str26503 = external constant [8 x i8], align 1 ; <[8 x i8]*> [#uses=0] + at .str27504 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=0] + at .str28505 = external constant [6 x i8], align 1 ; <[6 x i8]*> [#uses=0] + at .str29506 = external constant [11 x i8], align 1 ; <[11 x i8]*> [#uses=0] + at .str30507 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=0] + at .str31508 = external constant [5 x i8], align 1 ; <[5 x i8]*> [#uses=0] + at .str32509 = external constant [5 x i8], align 1 ; <[5 x i8]*> [#uses=0] + at .str33510 = external constant [8 x i8], align 1 ; <[8 x i8]*> [#uses=0] + at .str34511 = external constant [11 x i8], align 1 ; <[11 x i8]*> [#uses=0] + at .str35512 = external constant [8 x i8], align 1 ; <[8 x i8]*> [#uses=0] + at .str36513 = external constant [12 x i8], align 1 ; <[12 x i8]*> [#uses=0] + at .str37514 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] + at .str38515 = external constant [4 x i8], align 1 ; <[4 x i8]*> [#uses=0] + at .str39516 = external constant [5 x i8], align 1 ; <[5 x i8]*> [#uses=0] + at .str40517 = external constant [5 x i8], align 1 ; <[5 x i8]*> [#uses=0] + at .str41518 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] + at .str42519 = external constant [15 x i8], align 1 ; <[15 x i8]*> [#uses=0] + at .str43520 = external constant [13 x i8], align 1 ; <[13 x i8]*> [#uses=0] + at .str44521 = external constant [16 x i8], align 1 ; <[16 x i8]*> [#uses=0] + at .str45522 = external constant [32 x i8], align 8 ; <[32 x i8]*> [#uses=0] + at .str46523 = external constant [30 x i8], align 1 ; <[30 x i8]*> [#uses=0] + at .str47524 = external constant [21 x i8], align 1 ; <[21 x i8]*> [#uses=0] + at .str48525 = external constant [30 x i8], align 1 ; <[30 x i8]*> [#uses=0] + at .str49526 = external constant [41 x i8], align 8 ; <[41 x i8]*> [#uses=0] + at .str50527 = external constant [32 x i8], align 8 ; <[32 x i8]*> [#uses=0] + at .str51528 = external constant [43 x i8], align 8 ; <[43 x i8]*> [#uses=0] + at .str52529 = external constant [37 x i8], align 8 ; <[37 x i8]*> [#uses=0] + at .str53530 = external constant [41 x i8], align 8 ; <[41 x i8]*> [#uses=0] + at .str54531 = external constant [52 x i8], align 8 ; <[52 x i8]*> [#uses=0] + at .str55532 = external constant [55 x i8], align 8 ; <[55 x i8]*> [#uses=0] + at .str56533 = external constant [8 x i8], align 1 ; <[8 x i8]*> [#uses=0] + at .str57534 = external constant [50 x i8], align 8 ; <[50 x i8]*> [#uses=0] + at .str58535 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] + at .str59536 = external constant [10 x i8], align 1 ; <[10 x i8]*> [#uses=0] + at .str60537 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=0] + at .str61538 = external constant [6 x i8], align 1 ; <[6 x i8]*> [#uses=0] + at .str62539 = external constant [8 x i8], align 1 ; <[8 x i8]*> [#uses=0] + at .str63540 = external constant [8 x i8], align 1 ; <[8 x i8]*> [#uses=0] + at .str64541 = external constant [21 x i8], align 1 ; <[21 x i8]*> [#uses=0] + at .str65542 = external constant [21 x i8], align 1 ; <[21 x i8]*> [#uses=0] + at .str66543 = external constant [5 x i8], align 1 ; <[5 x i8]*> [#uses=0] + at .str67544 = external constant [19 x i8], align 1 ; <[19 x i8]*> [#uses=0] + at .str68545 = external constant [34 x i8], align 8 ; <[34 x i8]*> [#uses=0] + at .str69546 = external constant [23 x i8], align 1 ; <[23 x i8]*> [#uses=0] + at .str70547 = external constant [37 x i8], align 8 ; <[37 x i8]*> [#uses=0] + at .str71548 = external constant [31 x i8], align 8 ; <[31 x i8]*> [#uses=0] + at .str72549 = external constant [17 x i8], align 1 ; <[17 x i8]*> [#uses=0] + at .str73550 = external constant [45 x i8], align 8 ; <[45 x i8]*> [#uses=0] + at .str74551 = external constant [35 x i8], align 8 ; <[35 x i8]*> [#uses=0] + at .str75552 = external constant [35 x i8], align 8 ; <[35 x i8]*> [#uses=0] + at .str76553 = external constant [17 x i8], align 1 ; <[17 x i8]*> [#uses=0] + at .str77554 = external constant [25 x i8], align 1 ; <[25 x i8]*> [#uses=0] + at .str78555 = external constant [26 x i8], align 1 ; <[26 x i8]*> [#uses=0] + at .str79556 = external constant [30 x i8], align 1 ; <[30 x i8]*> [#uses=0] + at .str80557 = external constant [48 x i8], align 8 ; <[48 x i8]*> [#uses=0] + at .str81558 = external constant [36 x i8], align 8 ; <[36 x i8]*> [#uses=0] + at .str82559 = external constant [34 x i8], align 8 ; <[34 x i8]*> [#uses=0] + at .str83560 = external constant [54 x i8], align 8 ; <[54 x i8]*> [#uses=0] + at .str84561 = external constant [38 x i8], align 8 ; <[38 x i8]*> [#uses=0] + at .str85562 = external constant [41 x i8], align 8 ; <[41 x i8]*> [#uses=0] + at .str86563 = external constant [29 x i8], align 1 ; <[29 x i8]*> [#uses=0] + at .str87564 = external constant [33 x i8], align 8 ; <[33 x i8]*> [#uses=0] + at .str88565 = external constant [36 x i8], align 8 ; <[36 x i8]*> [#uses=0] + at .str89566 = external constant [25 x i8], align 1 ; <[25 x i8]*> [#uses=0] + at .str90567 = external constant [43 x i8], align 8 ; <[43 x i8]*> [#uses=0] + at .str91568 = external constant [46 x i8], align 8 ; <[46 x i8]*> [#uses=0] + at .str93570 = external constant [55 x i8], align 8 ; <[55 x i8]*> [#uses=0] + at .str94571 = external constant [42 x i8], align 8 ; <[42 x i8]*> [#uses=0] + at .str95572 = external constant [43 x i8], align 8 ; <[43 x i8]*> [#uses=0] + at .str96573 = external constant [54 x i8], align 8 ; <[54 x i8]*> [#uses=0] + at .str97574 = external constant [29 x i8], align 1 ; <[29 x i8]*> [#uses=0] + at .str98575 = external constant [39 x i8], align 8 ; <[39 x i8]*> [#uses=0] + at .str99576 = external constant [26 x i8], align 1 ; <[26 x i8]*> [#uses=0] + at .str100577 = external constant [37 x i8], align 8 ; <[37 x i8]*> [#uses=0] + at .str101578 = external constant [35 x i8], align 8 ; <[35 x i8]*> [#uses=0] + at .str102579 = external constant [50 x i8], align 8 ; <[50 x i8]*> [#uses=0] + at .str103580 = external constant [27 x i8], align 1 ; <[27 x i8]*> [#uses=0] + at .str104581 = external constant [23 x i8], align 1 ; <[23 x i8]*> [#uses=0] + at .str105582 = external constant [29 x i8], align 1 ; <[29 x i8]*> [#uses=0] + at .str106583 = external constant [43 x i8], align 8 ; <[43 x i8]*> [#uses=0] + at .str107584 = external constant [26 x i8], align 1 ; <[26 x i8]*> [#uses=0] + at .str108585 = external constant [16 x i8], align 1 ; <[16 x i8]*> [#uses=0] + at .str109586 = external constant [28 x i8], align 1 ; <[28 x i8]*> [#uses=0] + at .str110587 = external constant [29 x i8], align 1 ; <[29 x i8]*> [#uses=0] + at .str111588 = external constant [29 x i8], align 1 ; <[29 x i8]*> [#uses=0] + at .str112589 = external constant [29 x i8], align 1 ; <[29 x i8]*> [#uses=0] + at .str113590 = external constant [29 x i8], align 1 ; <[29 x i8]*> [#uses=0] + at .str114591 = external constant [31 x i8], align 8 ; <[31 x i8]*> [#uses=0] + at .str115592 = external constant [29 x i8], align 1 ; <[29 x i8]*> [#uses=0] + at .str116593 = external constant [33 x i8], align 8 ; <[33 x i8]*> [#uses=0] + at .str117594 = external constant [29 x i8], align 1 ; <[29 x i8]*> [#uses=0] + at .str118595 = external constant [29 x i8], align 1 ; <[29 x i8]*> [#uses=0] + at .str119596 = external constant [28 x i8], align 1 ; <[28 x i8]*> [#uses=0] + at .str120597 = external constant [28 x i8], align 1 ; <[28 x i8]*> [#uses=0] + at .str121598 = external constant [14 x i8], align 1 ; <[14 x i8]*> [#uses=0] + at .str122599 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] + at .str124601 = external constant [19 x i8], align 1 ; <[19 x i8]*> [#uses=0] + at .str125602 = external constant [11 x i8], align 1 ; <[11 x i8]*> [#uses=0] + at .str126 = external constant [5 x i8], align 1 ; <[5 x i8]*> [#uses=0] + at .str127 = external constant [6 x i8], align 1 ; <[6 x i8]*> [#uses=0] + at .str128 = external constant [39 x i8], align 8 ; <[39 x i8]*> [#uses=0] + at NameType = external constant [81 x i8*], align 32 ; <[81 x i8*]*> [#uses=0] + at Size = external global [81 x %struct.anon], align 32 ; <[81 x %struct.anon]*> [#uses=0] + at HdNewHandles = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] + at NrNewHandles = external global i64 ; [#uses=0] + at s.3831 = external global [7 x i8] ; <[7 x i8]*> [#uses=0] + at HdFree = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] + at .str605 = external constant [55 x i8], align 8 ; <[55 x i8]*> [#uses=0] + at FreeHandle = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] + at NrFreeHandles = external global i64 ; [#uses=0] + at FirstBag = external global %struct.TypHeader** ; <%struct.TypHeader***> [#uses=0] + at HdResize = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] + at IsResizeCall.b = external global i1 ; [#uses=0] + at .str1606 = external constant [22 x i8], align 1 ; <[22 x i8]*> [#uses=0] + at .str2607 = external constant [8 x i8], align 1 ; <[8 x i8]*> [#uses=0] + at .str3608 = external constant [49 x i8], align 8 ; <[49 x i8]*> [#uses=0] + at .str4609 = external constant [8 x i8], align 1 ; <[8 x i8]*> [#uses=0] + at .str5610 = external constant [11 x i8], align 1 ; <[11 x i8]*> [#uses=0] + at .str6611 = external constant [11 x i8], align 1 ; <[11 x i8]*> [#uses=0] + at .str7612 = external constant [41 x i8], align 8 ; <[41 x i8]*> [#uses=0] + at .str8613 = external constant [11 x i8], align 1 ; <[11 x i8]*> [#uses=0] + at .str9614 = external constant [3 x i8], align 1 ; <[3 x i8]*> [#uses=0] + at .str10615 = external constant [40 x i8], align 8 ; <[40 x i8]*> [#uses=0] + at .str11616 = external constant [26 x i8], align 1 ; <[26 x i8]*> [#uses=0] + at lastType = external global i64 ; [#uses=0] + at lastSize = external global i64 ; [#uses=0] + at .str12617 = external constant [32 x i8], align 8 ; <[32 x i8]*> [#uses=0] + at .str13618 = external constant [5 x i8], align 1 ; <[5 x i8]*> [#uses=0] + at .str14619 = external constant [8 x i8], align 1 ; <[8 x i8]*> [#uses=0] + at .str15620 = external constant [17 x i8], align 1 ; <[17 x i8]*> [#uses=0] + at .str16621 = external constant [18 x i8], align 1 ; <[18 x i8]*> [#uses=0] + at .str17622 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=0] + at .str18623 = external constant [11 x i8], align 1 ; <[11 x i8]*> [#uses=0] + at .str19624 = external constant [8 x i8], align 1 ; <[8 x i8]*> [#uses=0] + at .str20625 = external constant [21 x i8], align 1 ; <[21 x i8]*> [#uses=0] + at .str21626 = external constant [12 x i8], align 1 ; <[12 x i8]*> [#uses=0] + at .str22627 = external constant [5 x i8], align 1 ; <[5 x i8]*> [#uses=0] + at .str23628 = external constant [12 x i8], align 1 ; <[12 x i8]*> [#uses=0] + at .str24629 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] + at .str25630 = external constant [8 x i8], align 1 ; <[8 x i8]*> [#uses=0] + at .str26631 = external constant [10 x i8], align 1 ; <[10 x i8]*> [#uses=0] + at .str28633 = external constant [18 x i8], align 1 ; <[18 x i8]*> [#uses=0] + at .str29634 = external constant [5 x i8], align 1 ; <[5 x i8]*> [#uses=0] + at .str30635 = external constant [4 x i8], align 1 ; <[4 x i8]*> [#uses=0] + at .str31636 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] + at .str32637 = external constant [20 x i8], align 1 ; <[20 x i8]*> [#uses=0] + at .str33638 = external constant [13 x i8], align 1 ; <[13 x i8]*> [#uses=0] + at .str34639 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] + at .str35640 = external constant [6 x i8], align 1 ; <[6 x i8]*> [#uses=0] + at .str36641 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] + at .str37642 = external constant [18 x i8], align 1 ; <[18 x i8]*> [#uses=0] + at .str38643 = external constant [18 x i8], align 1 ; <[18 x i8]*> [#uses=0] + at .str39644 = external constant [16 x i8], align 1 ; <[16 x i8]*> [#uses=0] + at .str40645 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=0] + at .str41646 = external constant [18 x i8], align 1 ; <[18 x i8]*> [#uses=0] + at .str42647 = external constant [15 x i8], align 1 ; <[15 x i8]*> [#uses=0] + at .str43648 = external constant [13 x i8], align 1 ; <[13 x i8]*> [#uses=0] + at .str44649 = external constant [8 x i8], align 1 ; <[8 x i8]*> [#uses=0] + at .str45650 = external constant [16 x i8], align 1 ; <[16 x i8]*> [#uses=0] + at .str46651 = external constant [15 x i8], align 1 ; <[15 x i8]*> [#uses=0] + at .str47652 = external constant [18 x i8], align 1 ; <[18 x i8]*> [#uses=0] + at .str54659 = external constant [11 x i8], align 1 ; <[11 x i8]*> [#uses=0] + at .str65670 = external constant [14 x i8], align 1 ; <[14 x i8]*> [#uses=0] + at .str66671 = external constant [19 x i8], align 1 ; <[19 x i8]*> [#uses=0] + at .str67672 = external constant [13 x i8], align 1 ; <[13 x i8]*> [#uses=0] + at .str68673 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=0] + at .str69674 = external constant [11 x i8], align 1 ; <[11 x i8]*> [#uses=0] + at .str70675 = external constant [12 x i8], align 1 ; <[12 x i8]*> [#uses=0] + at .str71676 = external constant [17 x i8], align 1 ; <[17 x i8]*> [#uses=0] + at .str72677 = external constant [16 x i8], align 1 ; <[16 x i8]*> [#uses=0] + at .str73678 = external constant [13 x i8], align 1 ; <[13 x i8]*> [#uses=0] + at .str74679 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=0] + at .str75680 = external constant [11 x i8], align 1 ; <[11 x i8]*> [#uses=0] + at .str76681 = external constant [10 x i8], align 1 ; <[10 x i8]*> [#uses=0] + at .str77682 = external constant [11 x i8], align 1 ; <[11 x i8]*> [#uses=0] + at .str78683 = external constant [6 x i8], align 1 ; <[6 x i8]*> [#uses=0] + at .str79684 = external constant [13 x i8], align 1 ; <[13 x i8]*> [#uses=0] + at .str80685 = external constant [19 x i8], align 1 ; <[19 x i8]*> [#uses=0] + at .str81686 = external constant [8 x i8], align 1 ; <[8 x i8]*> [#uses=0] + at .str82687 = external constant [24 x i8], align 1 ; <[24 x i8]*> [#uses=0] + at .str83688 = external constant [19 x i8], align 1 ; <[19 x i8]*> [#uses=0] + at .str84689 = external constant [22 x i8], align 1 ; <[22 x i8]*> [#uses=0] + at .str85690 = external constant [12 x i8], align 1 ; <[12 x i8]*> [#uses=0] + at .str86691 = external constant [12 x i8], align 1 ; <[12 x i8]*> [#uses=0] + at .str87692 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=0] + at GasmanStatAlive = external constant [81 x i64], align 32 ; <[81 x i64]*> [#uses=0] + at GasmanStatTotal = external global [81 x i64], align 32 ; <[81 x i64]*> [#uses=0] + at GasmanStatTSize = external global [81 x i64], align 32 ; <[81 x i64]*> [#uses=0] + at HdStack = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] + at TopStack = external global i64 ; [#uses=0] + at HdIdenttab = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=1] + at HdRectab = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] + at NrRectab = external global i64 ; [#uses=0] + at IsUndefinedGlobal.b = external global i1 ; [#uses=0] + at NrIdenttab = external global i64 ; [#uses=0] + at .str710 = external constant [6 x i8], align 1 ; <[6 x i8]*> [#uses=0] + at .str1711 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] + at .str2712 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] + at .str3713 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] + at .str4714 = external constant [22 x i8], align 1 ; <[22 x i8]*> [#uses=0] + at .str5715 = external constant [36 x i8], align 8 ; <[36 x i8]*> [#uses=0] + at .str6716 = external constant [30 x i8], align 1 ; <[30 x i8]*> [#uses=0] + at .str7717 = external constant [46 x i8], align 8 ; <[46 x i8]*> [#uses=0] + at .str8718 = external constant [30 x i8], align 1 ; <[30 x i8]*> [#uses=0] + at .str9719 = external constant [30 x i8], align 1 ; <[30 x i8]*> [#uses=0] + at .str10720 = external constant [43 x i8], align 8 ; <[43 x i8]*> [#uses=0] + at .str11721 = external constant [30 x i8], align 1 ; <[30 x i8]*> [#uses=0] + at .str12722 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] + at PrIntC = external global [1000 x i16], align 32 ; <[1000 x i16]*> [#uses=0] + at PrIntD = external global [1205 x i16], align 32 ; <[1205 x i16]*> [#uses=0] + at .str15725 = external constant [3 x i8], align 1 ; <[3 x i8]*> [#uses=0] + at .str16726 = external constant [5 x i8], align 1 ; <[5 x i8]*> [#uses=0] + at .str18728 = external constant [39 x i8], align 8 ; <[39 x i8]*> [#uses=0] + at TabIsList = external global [28 x i64], align 32 ; <[28 x i64]*> [#uses=0] + at TabPlainList = external global [28 x void (%struct.TypHeader*)*], align 32 ; <[28 x void (%struct.TypHeader*)*]*> [#uses=0] + at TabIsXTypeList = external global [28 x i64 (%struct.TypHeader*)*], align 32 ; <[28 x i64 (%struct.TypHeader*)*]*> [#uses=0] + at TabLenList = external global [28 x i64 (%struct.TypHeader*)*], align 32 ; <[28 x i64 (%struct.TypHeader*)*]*> [#uses=0] + at TabElmlList = external global [28 x %struct.TypHeader* (%struct.TypHeader*, i64)*], align 32 ; <[28 x %struct.TypHeader* (%struct.TypHeader*, i64)*]*> [#uses=0] + at TabElmrList = external global [28 x %struct.TypHeader* (%struct.TypHeader*, i64)*], align 32 ; <[28 x %struct.TypHeader* (%struct.TypHeader*, i64)*]*> [#uses=0] + at TabElmList = external global [28 x %struct.TypHeader* (%struct.TypHeader*, i64)*], align 32 ; <[28 x %struct.TypHeader* (%struct.TypHeader*, i64)*]*> [#uses=0] + at TabElmfList = external global [28 x %struct.TypHeader* (%struct.TypHeader*, i64)*], align 32 ; <[28 x %struct.TypHeader* (%struct.TypHeader*, i64)*]*> [#uses=0] + at TabElmsList = external global [28 x %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*)*], align 32 ; <[28 x %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*)*]*> [#uses=0] + at TabAssList = external global [28 x %struct.TypHeader* (%struct.TypHeader*, i64, %struct.TypHeader*)*], align 32 ; <[28 x %struct.TypHeader* (%struct.TypHeader*, i64, %struct.TypHeader*)*]*> [#uses=0] + at TabAsssList = external global [28 x %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*, %struct.TypHeader*)*], align 32 ; <[28 x %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*, %struct.TypHeader*)*]*> [#uses=0] + at TabPosList = external global [28 x i64 (%struct.TypHeader*, %struct.TypHeader*, i64)*], align 32 ; <[28 x i64 (%struct.TypHeader*, %struct.TypHeader*, i64)*]*> [#uses=0] + at TabIsDenseList = external global [28 x i64 (%struct.TypHeader*)*], align 32 ; <[28 x i64 (%struct.TypHeader*)*]*> [#uses=0] + at TabIsPossList = external global [28 x i64 (%struct.TypHeader*)*], align 32 ; <[28 x i64 (%struct.TypHeader*)*]*> [#uses=0] + at TabDepthVector = external global [28 x %struct.TypHeader* (%struct.TypHeader*)*], align 32 ; <[28 x %struct.TypHeader* (%struct.TypHeader*)*]*> [#uses=0] + at .str748 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] + at .str1749 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=0] + at .str2750 = external constant [6 x i8], align 1 ; <[6 x i8]*> [#uses=0] + at .str3751 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] + at .str4752 = external constant [4 x i8], align 1 ; <[4 x i8]*> [#uses=0] + at .str5753 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] + at .str6754 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=0] + at .str7755 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=0] + at .str8756 = external constant [8 x i8], align 1 ; <[8 x i8]*> [#uses=0] + at .str9757 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=0] + at .str10758 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] + at .str11759 = external constant [8 x i8], align 1 ; <[8 x i8]*> [#uses=0] + at .str12760 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] + at .str13761 = external constant [12 x i8], align 1 ; <[12 x i8]*> [#uses=0] + at .str14762 = external constant [37 x i8], align 8 ; <[37 x i8]*> [#uses=0] + at .str15763 = external constant [28 x i8], align 1 ; <[28 x i8]*> [#uses=0] + at .str16764 = external constant [30 x i8], align 1 ; <[30 x i8]*> [#uses=0] + at .str17765 = external constant [31 x i8], align 8 ; <[31 x i8]*> [#uses=0] + at .str18766 = external constant [32 x i8], align 8 ; <[32 x i8]*> [#uses=0] + at .str19767 = external constant [33 x i8], align 8 ; <[33 x i8]*> [#uses=0] + at .str20768 = external constant [44 x i8], align 8 ; <[44 x i8]*> [#uses=0] + at .str21769 = external constant [39 x i8], align 8 ; <[39 x i8]*> [#uses=0] + at .str22770 = external constant [32 x i8], align 8 ; <[32 x i8]*> [#uses=0] + at .str23771 = external constant [24 x i8], align 1 ; <[24 x i8]*> [#uses=0] + at .str24772 = external constant [22 x i8], align 1 ; <[22 x i8]*> [#uses=0] + at .str25773 = external constant [34 x i8], align 8 ; <[34 x i8]*> [#uses=0] + at .str26774 = external constant [25 x i8], align 1 ; <[25 x i8]*> [#uses=0] + at .str27775 = external constant [37 x i8], align 8 ; <[37 x i8]*> [#uses=0] + at .str28776 = external constant [23 x i8], align 1 ; <[23 x i8]*> [#uses=0] + at .str29777 = external constant [37 x i8], align 8 ; <[37 x i8]*> [#uses=0] + at .str30778 = external constant [46 x i8], align 8 ; <[46 x i8]*> [#uses=0] + at .str31779 = external constant [66 x i8], align 8 ; <[66 x i8]*> [#uses=0] + at .str32780 = external constant [40 x i8], align 8 ; <[40 x i8]*> [#uses=0] + at .str33781 = external constant [62 x i8], align 8 ; <[62 x i8]*> [#uses=0] + at .str34782 = external constant [72 x i8], align 8 ; <[72 x i8]*> [#uses=0] + at .str35783 = external constant [47 x i8], align 8 ; <[47 x i8]*> [#uses=0] + at .str36784 = external constant [40 x i8], align 8 ; <[40 x i8]*> [#uses=0] + at .str37785 = external constant [63 x i8], align 8 ; <[63 x i8]*> [#uses=0] + at .str38786 = external constant [65 x i8], align 8 ; <[65 x i8]*> [#uses=0] + at .str39787 = external constant [45 x i8], align 8 ; <[45 x i8]*> [#uses=0] + at .str40788 = external constant [39 x i8], align 8 ; <[39 x i8]*> [#uses=0] + at .str41789 = external constant [61 x i8], align 8 ; <[61 x i8]*> [#uses=0] + at .str42790 = external constant [55 x i8], align 8 ; <[55 x i8]*> [#uses=0] + at .str43791 = external constant [46 x i8], align 8 ; <[46 x i8]*> [#uses=0] + at .str44792 = external constant [37 x i8], align 8 ; <[37 x i8]*> [#uses=0] + at .str45793 = external constant [69 x i8], align 8 ; <[69 x i8]*> [#uses=0] + at .str46794 = external constant [36 x i8], align 8 ; <[36 x i8]*> [#uses=0] + at .str47795 = external constant [52 x i8], align 8 ; <[52 x i8]*> [#uses=0] + at .str49797 = external constant [45 x i8], align 8 ; <[45 x i8]*> [#uses=0] + at .str50798 = external constant [30 x i8], align 1 ; <[30 x i8]*> [#uses=0] + at .str51799 = external constant [30 x i8], align 1 ; <[30 x i8]*> [#uses=0] + at .str52800 = external constant [31 x i8], align 8 ; <[31 x i8]*> [#uses=0] + at .str53801 = external constant [34 x i8], align 8 ; <[34 x i8]*> [#uses=0] + at .str54802 = external constant [30 x i8], align 1 ; <[30 x i8]*> [#uses=0] + at .str55803 = external constant [30 x i8], align 1 ; <[30 x i8]*> [#uses=0] + at .str56804 = external constant [34 x i8], align 8 ; <[34 x i8]*> [#uses=0] + at .str57805 = external constant [31 x i8], align 8 ; <[31 x i8]*> [#uses=0] + at .str58806 = external constant [31 x i8], align 8 ; <[31 x i8]*> [#uses=0] + at .str59807 = external constant [28 x i8], align 1 ; <[28 x i8]*> [#uses=0] + at .str60808 = external constant [27 x i8], align 1 ; <[27 x i8]*> [#uses=0] + at .str61809 = external constant [34 x i8], align 8 ; <[34 x i8]*> [#uses=0] + at .str62810 = external constant [32 x i8], align 8 ; <[32 x i8]*> [#uses=0] + at .str63811 = external constant [33 x i8], align 8 ; <[33 x i8]*> [#uses=0] + at .str64812 = external constant [33 x i8], align 8 ; <[33 x i8]*> [#uses=0] + at .str68816 = external constant [4 x i8], align 1 ; <[4 x i8]*> [#uses=0] + at .str69817 = external constant [4 x i8], align 1 ; <[4 x i8]*> [#uses=0] + at .str70818 = external constant [4 x i8], align 1 ; <[4 x i8]*> [#uses=0] + at .str71819 = external constant [4 x i8], align 1 ; <[4 x i8]*> [#uses=0] + at .str72820 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=0] + at .str73821 = external constant [10 x i8], align 1 ; <[10 x i8]*> [#uses=0] + at .str74822 = external constant [8 x i8], align 1 ; <[8 x i8]*> [#uses=0] + at .str75823 = external constant [6 x i8], align 1 ; <[6 x i8]*> [#uses=0] + at .str76824 = external constant [42 x i8], align 8 ; <[42 x i8]*> [#uses=0] + at .str77825 = external constant [42 x i8], align 8 ; <[42 x i8]*> [#uses=0] + at .str78826 = external constant [42 x i8], align 8 ; <[42 x i8]*> [#uses=0] + at .str832 = external constant [14 x i8], align 1 ; <[14 x i8]*> [#uses=0] + at .str1833 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=0] + at .str2834 = external constant [8 x i8], align 1 ; <[8 x i8]*> [#uses=0] + at .str3835 = external constant [13 x i8], align 1 ; <[13 x i8]*> [#uses=0] + at .str4836 = external constant [11 x i8], align 1 ; <[11 x i8]*> [#uses=0] + at .str5837 = external constant [12 x i8], align 1 ; <[12 x i8]*> [#uses=0] + at .str6838 = external constant [16 x i8], align 1 ; <[16 x i8]*> [#uses=0] + at .str7839 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] + at .str8840 = external constant [14 x i8], align 1 ; <[14 x i8]*> [#uses=0] + at .str9841 = external constant [12 x i8], align 1 ; <[12 x i8]*> [#uses=0] + at .str10842 = external constant [13 x i8], align 1 ; <[13 x i8]*> [#uses=0] + at .str11843 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=0] + at .str12844 = external constant [13 x i8], align 1 ; <[13 x i8]*> [#uses=0] + at .str13845 = external constant [15 x i8], align 1 ; <[15 x i8]*> [#uses=0] + at .str14846 = external constant [15 x i8], align 1 ; <[15 x i8]*> [#uses=0] + at .str15847 = external constant [14 x i8], align 1 ; <[14 x i8]*> [#uses=0] + at .str16848 = external constant [18 x i8], align 1 ; <[18 x i8]*> [#uses=0] + at .str17849 = external constant [24 x i8], align 1 ; <[24 x i8]*> [#uses=0] + at .str18850 = external constant [14 x i8], align 1 ; <[14 x i8]*> [#uses=0] + at .str19851 = external constant [11 x i8], align 1 ; <[11 x i8]*> [#uses=0] + at .str20852 = external constant [16 x i8], align 1 ; <[16 x i8]*> [#uses=0] + at .str21853 = external constant [15 x i8], align 1 ; <[15 x i8]*> [#uses=0] + at .str22854 = external constant [12 x i8], align 1 ; <[12 x i8]*> [#uses=0] + at .str23855 = external constant [17 x i8], align 1 ; <[17 x i8]*> [#uses=0] + at .str24856 = external constant [4 x i8], align 1 ; <[4 x i8]*> [#uses=0] + at .str25857 = external constant [14 x i8], align 1 ; <[14 x i8]*> [#uses=0] + at .str26858 = external constant [17 x i8], align 1 ; <[17 x i8]*> [#uses=0] + at .str27859 = external constant [10 x i8], align 1 ; <[10 x i8]*> [#uses=0] + at .str28860 = external constant [6 x i8], align 1 ; <[6 x i8]*> [#uses=0] + at .str29861 = external constant [35 x i8], align 8 ; <[35 x i8]*> [#uses=0] + at .str30862 = external constant [33 x i8], align 8 ; <[33 x i8]*> [#uses=0] + at .str31863 = external constant [32 x i8], align 8 ; <[32 x i8]*> [#uses=0] + at .str32864 = external constant [33 x i8], align 8 ; <[33 x i8]*> [#uses=0] + at .str33865 = external constant [50 x i8], align 8 ; <[50 x i8]*> [#uses=0] + at .str34866 = external constant [40 x i8], align 8 ; <[40 x i8]*> [#uses=0] + at .str35867 = external constant [42 x i8], align 8 ; <[42 x i8]*> [#uses=0] + at .str36868 = external constant [43 x i8], align 8 ; <[43 x i8]*> [#uses=0] + at .str37869 = external constant [39 x i8], align 8 ; <[39 x i8]*> [#uses=0] + at .str38870 = external constant [37 x i8], align 8 ; <[37 x i8]*> [#uses=0] + at .str39871 = external constant [42 x i8], align 8 ; <[42 x i8]*> [#uses=0] + at .str40872 = external constant [32 x i8], align 8 ; <[32 x i8]*> [#uses=0] + at .str41873 = external constant [47 x i8], align 8 ; <[47 x i8]*> [#uses=0] + at .str42874 = external constant [28 x i8], align 1 ; <[28 x i8]*> [#uses=0] + at .str43875 = external constant [43 x i8], align 8 ; <[43 x i8]*> [#uses=0] + at .str44876 = external constant [32 x i8], align 8 ; <[32 x i8]*> [#uses=0] + at .str45877 = external constant [47 x i8], align 8 ; <[47 x i8]*> [#uses=0] + at .str46878 = external constant [36 x i8], align 8 ; <[36 x i8]*> [#uses=0] + at .str47879 = external constant [33 x i8], align 8 ; <[33 x i8]*> [#uses=0] + at .str48880 = external constant [34 x i8], align 8 ; <[34 x i8]*> [#uses=0] + at .str49881 = external constant [40 x i8], align 8 ; <[40 x i8]*> [#uses=0] + at .str50882 = external constant [38 x i8], align 8 ; <[38 x i8]*> [#uses=0] + at .str51883 = external constant [48 x i8], align 8 ; <[48 x i8]*> [#uses=0] + at .str52884 = external constant [48 x i8], align 8 ; <[48 x i8]*> [#uses=0] + at .str53885 = external constant [31 x i8], align 8 ; <[31 x i8]*> [#uses=0] + at .str54886 = external constant [41 x i8], align 8 ; <[41 x i8]*> [#uses=0] + at .str55887 = external constant [41 x i8], align 8 ; <[41 x i8]*> [#uses=0] + at .str56888 = external constant [34 x i8], align 8 ; <[34 x i8]*> [#uses=0] + at .str57889 = external constant [35 x i8], align 8 ; <[35 x i8]*> [#uses=0] + at .str58890 = external constant [33 x i8], align 8 ; <[33 x i8]*> [#uses=0] + at .str59891 = external constant [29 x i8], align 1 ; <[29 x i8]*> [#uses=0] + at .str60892 = external constant [20 x i8], align 1 ; <[20 x i8]*> [#uses=0] + at .str61893 = external constant [29 x i8], align 1 ; <[29 x i8]*> [#uses=0] + at .str62894 = external constant [32 x i8], align 8 ; <[32 x i8]*> [#uses=0] + at .str63895 = external constant [38 x i8], align 8 ; <[38 x i8]*> [#uses=0] + at .str64896 = external constant [29 x i8], align 1 ; <[29 x i8]*> [#uses=0] + at .str65897 = external constant [38 x i8], align 8 ; <[38 x i8]*> [#uses=0] + at .str66898 = external constant [27 x i8], align 1 ; <[27 x i8]*> [#uses=0] + at .str67899 = external constant [33 x i8], align 8 ; <[33 x i8]*> [#uses=0] + at .str68900 = external constant [36 x i8], align 8 ; <[36 x i8]*> [#uses=0] + at .str69901 = external constant [33 x i8], align 8 ; <[33 x i8]*> [#uses=0] + at .str70902 = external constant [26 x i8], align 1 ; <[26 x i8]*> [#uses=0] + at .str71903 = external constant [37 x i8], align 8 ; <[37 x i8]*> [#uses=0] + at .str72904 = external constant [36 x i8], align 8 ; <[36 x i8]*> [#uses=0] + at .str73905 = external constant [26 x i8], align 1 ; <[26 x i8]*> [#uses=0] + at .str74906 = external constant [26 x i8], align 1 ; <[26 x i8]*> [#uses=0] + at .str75907 = external constant [32 x i8], align 8 ; <[32 x i8]*> [#uses=0] + at .str76908 = external constant [36 x i8], align 8 ; <[36 x i8]*> [#uses=0] + at .str77909 = external constant [40 x i8], align 8 ; <[40 x i8]*> [#uses=0] + at .str78910 = external constant [35 x i8], align 8 ; <[35 x i8]*> [#uses=0] + at .str79911 = external constant [26 x i8], align 1 ; <[26 x i8]*> [#uses=0] + at .str80912 = external constant [30 x i8], align 1 ; <[30 x i8]*> [#uses=0] + at .str81913 = external constant [32 x i8], align 8 ; <[32 x i8]*> [#uses=0] + at .str82914 = external constant [29 x i8], align 1 ; <[29 x i8]*> [#uses=0] + at .str83915 = external constant [22 x i8], align 1 ; <[22 x i8]*> [#uses=0] + at .str84916 = external constant [38 x i8], align 8 ; <[38 x i8]*> [#uses=0] + at .str85917 = external constant [28 x i8], align 1 ; <[28 x i8]*> [#uses=0] + at .str86918 = external constant [30 x i8], align 1 ; <[30 x i8]*> [#uses=0] + at .str87919 = external constant [28 x i8], align 1 ; <[28 x i8]*> [#uses=0] + at .str88920 = external constant [36 x i8], align 8 ; <[36 x i8]*> [#uses=0] + at .str89921 = external constant [41 x i8], align 8 ; <[41 x i8]*> [#uses=0] + at .str92924 = external constant [30 x i8], align 1 ; <[30 x i8]*> [#uses=0] + at .str93925 = external constant [29 x i8], align 1 ; <[29 x i8]*> [#uses=0] + at .str94926 = external constant [20 x i8], align 1 ; <[20 x i8]*> [#uses=0] + at .str95927 = external constant [43 x i8], align 8 ; <[43 x i8]*> [#uses=0] + at .str96928 = external constant [26 x i8], align 1 ; <[26 x i8]*> [#uses=0] + at .str97929 = external constant [30 x i8], align 1 ; <[30 x i8]*> [#uses=0] + at .str98930 = external constant [25 x i8], align 1 ; <[25 x i8]*> [#uses=0] + at .str99931 = external constant [28 x i8], align 1 ; <[28 x i8]*> [#uses=0] + at .str100932 = external constant [19 x i8], align 1 ; <[19 x i8]*> [#uses=0] + at .str934 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] + at .str1935 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=0] + at .str2936 = external constant [22 x i8], align 1 ; <[22 x i8]*> [#uses=0] + at .str3937 = external constant [19 x i8], align 1 ; <[19 x i8]*> [#uses=0] + at .str4938 = external constant [13 x i8], align 1 ; <[13 x i8]*> [#uses=0] + at .str5939 = external constant [10 x i8], align 1 ; <[10 x i8]*> [#uses=0] + at .str6940 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=0] + at .str7941 = external constant [22 x i8], align 1 ; <[22 x i8]*> [#uses=0] + at HdPerm = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] + at .str8942 = external constant [37 x i8], align 8 ; <[37 x i8]*> [#uses=0] + at .str9943 = external constant [39 x i8], align 8 ; <[39 x i8]*> [#uses=0] + at .str10944 = external constant [43 x i8], align 8 ; <[43 x i8]*> [#uses=0] + at .str11945 = external constant [41 x i8], align 8 ; <[41 x i8]*> [#uses=0] + at .str12946 = external constant [45 x i8], align 8 ; <[45 x i8]*> [#uses=0] + at .str13947 = external constant [49 x i8], align 8 ; <[49 x i8]*> [#uses=0] + at .str14948 = external constant [47 x i8], align 8 ; <[47 x i8]*> [#uses=0] + at .str15949 = external constant [39 x i8], align 8 ; <[39 x i8]*> [#uses=0] + at .str16950 = external constant [55 x i8], align 8 ; <[55 x i8]*> [#uses=0] + at .str17951 = external constant [23 x i8], align 1 ; <[23 x i8]*> [#uses=0] + at .str18952 = external constant [37 x i8], align 8 ; <[37 x i8]*> [#uses=0] + at .str19953 = external constant [29 x i8], align 1 ; <[29 x i8]*> [#uses=0] + at .str20954 = external constant [26 x i8], align 1 ; <[26 x i8]*> [#uses=0] + at .str21955 = external constant [39 x i8], align 8 ; <[39 x i8]*> [#uses=0] + at .str22956 = external constant [26 x i8], align 1 ; <[26 x i8]*> [#uses=0] + at .str23957 = external constant [37 x i8], align 8 ; <[37 x i8]*> [#uses=0] + at .str24958 = external constant [37 x i8], align 8 ; <[37 x i8]*> [#uses=0] + at .str25959 = external constant [41 x i8], align 8 ; <[41 x i8]*> [#uses=0] + at .str26960 = external constant [42 x i8], align 8 ; <[42 x i8]*> [#uses=0] + at .str27961 = external constant [38 x i8], align 8 ; <[38 x i8]*> [#uses=0] + at .str28962 = external constant [30 x i8], align 1 ; <[30 x i8]*> [#uses=0] + at .str29963 = external constant [39 x i8], align 8 ; <[39 x i8]*> [#uses=0] + at .str30964 = external constant [52 x i8], align 8 ; <[52 x i8]*> [#uses=0] + at .str31965 = external constant [27 x i8], align 1 ; <[27 x i8]*> [#uses=0] + at .str32966 = external constant [40 x i8], align 8 ; <[40 x i8]*> [#uses=0] + at .str33967 = external constant [11 x i8], align 1 ; <[11 x i8]*> [#uses=0] + at .str34968 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=0] + at .str35969 = external constant [11 x i8], align 1 ; <[11 x i8]*> [#uses=0] + at .str36970 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=0] + at .str37971 = external constant [11 x i8], align 1 ; <[11 x i8]*> [#uses=0] + at .str38972 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=0] + at .str39973 = external constant [11 x i8], align 1 ; <[11 x i8]*> [#uses=0] + at .str40974 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=0] + at .str41975 = external constant [11 x i8], align 1 ; <[11 x i8]*> [#uses=0] + at .str42976 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=0] + at .str44978 = external constant [3 x i8], align 1 ; <[3 x i8]*> [#uses=0] + at .str45979 = external constant [4 x i8], align 1 ; <[4 x i8]*> [#uses=0] + at .str48982 = external constant [2 x i8], align 1 ; <[2 x i8]*> [#uses=0] + at .str6992 = external constant [35 x i8], align 8 ; <[35 x i8]*> [#uses=0] + at TabNormalizeCoeffs = external global [28 x %struct.TypHeader* (%struct.TypHeader*)*], align 32 ; <[28 x %struct.TypHeader* (%struct.TypHeader*)*]*> [#uses=0] + at TabShrinkCoeffs = external global [28 x void (%struct.TypHeader*)*], align 32 ; <[28 x void (%struct.TypHeader*)*]*> [#uses=0] + at TabShiftedCoeffs = external global [28 x %struct.TypHeader* (%struct.TypHeader*, i64)*], align 32 ; <[28 x %struct.TypHeader* (%struct.TypHeader*, i64)*]*> [#uses=0] + at TabAddCoeffs = external global [28 x [28 x void (%struct.TypHeader*, %struct.TypHeader*, %struct.TypHeader*)*]], align 32 ; <[28 x [28 x void (%struct.TypHeader*, %struct.TypHeader*, %struct.TypHeader*)*]]*> [#uses=0] + at TabMultiplyCoeffs = external global [28 x [28 x i64 (%struct.TypHeader*, %struct.TypHeader*, i64, %struct.TypHeader*, i64)*]], align 32 ; <[28 x [28 x i64 (%struct.TypHeader*, %struct.TypHeader*, i64, %struct.TypHeader*, i64)*]]*> [#uses=0] + at TabProductCoeffs = external global [28 x [28 x %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*)*]], align 32 ; <[28 x [28 x %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*)*]]*> [#uses=0] + at TabProductCoeffsMod = external global [28 x [28 x %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*, %struct.TypHeader*)*]], align 32 ; <[28 x [28 x %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*, %struct.TypHeader*)*]]*> [#uses=0] + at TabReduceCoeffs = external global [28 x [28 x i64 (%struct.TypHeader*, i64, %struct.TypHeader*, i64)*]], align 32 ; <[28 x [28 x i64 (%struct.TypHeader*, i64, %struct.TypHeader*, i64)*]]*> [#uses=0] + at TabReduceCoeffsMod = external global [28 x [28 x i64 (%struct.TypHeader*, i64, %struct.TypHeader*, i64, %struct.TypHeader*)*]], align 32 ; <[28 x [28 x i64 (%struct.TypHeader*, i64, %struct.TypHeader*, i64, %struct.TypHeader*)*]]*> [#uses=0] + at TabPowerModCoeffsInt = external global [28 x [28 x %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*, %struct.TypHeader*)*]], align 32 ; <[28 x [28 x %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*, %struct.TypHeader*)*]]*> [#uses=0] + at TabPowerModCoeffsLInt = external global [28 x [28 x %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*, %struct.TypHeader*)*]], align 32 ; <[28 x [28 x %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*, %struct.TypHeader*)*]]*> [#uses=0] + at .str995 = external constant [14 x i8], align 1 ; <[14 x i8]*> [#uses=0] + at .str1996 = external constant [16 x i8], align 1 ; <[16 x i8]*> [#uses=0] + at .str2997 = external constant [13 x i8], align 1 ; <[13 x i8]*> [#uses=0] + at .str3998 = external constant [10 x i8], align 1 ; <[10 x i8]*> [#uses=0] + at .str4999 = external constant [10 x i8], align 1 ; <[10 x i8]*> [#uses=0] + at .str51000 = external constant [14 x i8], align 1 ; <[14 x i8]*> [#uses=0] + at .str61001 = external constant [17 x i8], align 1 ; <[17 x i8]*> [#uses=0] + at .str71002 = external constant [13 x i8], align 1 ; <[13 x i8]*> [#uses=0] + at .str81003 = external constant [16 x i8], align 1 ; <[16 x i8]*> [#uses=0] + at .str91004 = external constant [16 x i8], align 1 ; <[16 x i8]*> [#uses=0] + at .str101005 = external constant [15 x i8], align 1 ; <[15 x i8]*> [#uses=0] + at .str111006 = external constant [48 x i8], align 8 ; <[48 x i8]*> [#uses=0] + at .str121007 = external constant [48 x i8], align 8 ; <[48 x i8]*> [#uses=0] + at .str131008 = external constant [21 x i8], align 1 ; <[21 x i8]*> [#uses=0] + at .str141009 = external constant [24 x i8], align 1 ; <[24 x i8]*> [#uses=0] + at .str151010 = external constant [41 x i8], align 8 ; <[41 x i8]*> [#uses=0] + at .str161011 = external constant [33 x i8], align 8 ; <[33 x i8]*> [#uses=0] + at .str171012 = external constant [40 x i8], align 8 ; <[40 x i8]*> [#uses=0] + at .str181013 = external constant [32 x i8], align 8 ; <[32 x i8]*> [#uses=0] + at .str191014 = external constant [41 x i8], align 8 ; <[41 x i8]*> [#uses=0] + at .str201015 = external constant [33 x i8], align 8 ; <[33 x i8]*> [#uses=0] + at .str211016 = external constant [29 x i8], align 1 ; <[29 x i8]*> [#uses=0] + at .str221017 = external constant [29 x i8], align 1 ; <[29 x i8]*> [#uses=0] + at .str231018 = external constant [27 x i8], align 1 ; <[27 x i8]*> [#uses=0] + at .str241019 = external constant [30 x i8], align 1 ; <[30 x i8]*> [#uses=0] + at .str251020 = external constant [34 x i8], align 8 ; <[34 x i8]*> [#uses=0] + at .str261021 = external constant [24 x i8], align 1 ; <[24 x i8]*> [#uses=0] + at .str271022 = external constant [38 x i8], align 8 ; <[38 x i8]*> [#uses=0] + at .str281023 = external constant [31 x i8], align 8 ; <[31 x i8]*> [#uses=0] + at .str1025 = external constant [8 x i8], align 1 ; <[8 x i8]*> [#uses=0] + at .str21027 = external constant [24 x i8], align 1 ; <[24 x i8]*> [#uses=0] + at .str31028 = external constant [38 x i8], align 8 ; <[38 x i8]*> [#uses=0] + at .str41029 = external constant [11 x i8], align 1 ; <[11 x i8]*> [#uses=0] + at .str51030 = external constant [12 x i8], align 1 ; <[12 x i8]*> [#uses=0] + at .str61031 = external constant [18 x i8], align 1 ; <[18 x i8]*> [#uses=0] + at .str81033 = external constant [11 x i8], align 1 ; <[11 x i8]*> [#uses=0] + at .str111036 = external constant [32 x i8], align 8 ; <[32 x i8]*> [#uses=0] + at .str121037 = external constant [35 x i8], align 8 ; <[35 x i8]*> [#uses=0] + at .str131038 = external constant [43 x i8], align 8 ; <[43 x i8]*> [#uses=0] + at .str141039 = external constant [33 x i8], align 8 ; <[33 x i8]*> [#uses=0] + at .str151040 = external constant [47 x i8], align 8 ; <[47 x i8]*> [#uses=0] + at .str1044 = external constant [6 x i8], align 1 ; <[6 x i8]*> [#uses=0] + at .str11045 = external constant [10 x i8], align 1 ; <[10 x i8]*> [#uses=0] + at .str21046 = external constant [12 x i8], align 1 ; <[12 x i8]*> [#uses=0] + at .str31047 = external constant [28 x i8], align 1 ; <[28 x i8]*> [#uses=0] + at .str41048 = external constant [42 x i8], align 8 ; <[42 x i8]*> [#uses=0] + at .str51049 = external constant [26 x i8], align 1 ; <[26 x i8]*> [#uses=0] + at .str61050 = external constant [40 x i8], align 8 ; <[40 x i8]*> [#uses=0] + at .str71051 = external constant [22 x i8], align 1 ; <[22 x i8]*> [#uses=0] + at .str81052 = external constant [36 x i8], align 8 ; <[36 x i8]*> [#uses=0] + at .str101054 = external constant [6 x i8], align 1 ; <[6 x i8]*> [#uses=0] + at .str121056 = external constant [39 x i8], align 8 ; <[39 x i8]*> [#uses=0] + at .str131057 = external constant [25 x i8], align 1 ; <[25 x i8]*> [#uses=0] + at .str11060 = external constant [11 x i8], align 1 ; <[11 x i8]*> [#uses=0] + at HdCurLHS = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] + at .str21061 = external constant [35 x i8], align 8 ; <[35 x i8]*> [#uses=0] + at .str31062 = external constant [2 x i8], align 1 ; <[2 x i8]*> [#uses=0] + at .str41063 = external constant [2 x i8], align 1 ; <[2 x i8]*> [#uses=0] + at .str61065 = external constant [31 x i8], align 8 ; <[31 x i8]*> [#uses=0] + at .str71066 = external constant [4 x i8], align 1 ; <[4 x i8]*> [#uses=0] + at .str81067 = external constant [11 x i8], align 1 ; <[11 x i8]*> [#uses=0] + at .str91068 = external constant [23 x i8], align 1 ; <[23 x i8]*> [#uses=0] + at .str101069 = external constant [42 x i8], align 8 ; <[42 x i8]*> [#uses=0] + at .str131072 = external constant [48 x i8], align 8 ; <[48 x i8]*> [#uses=0] + at .str141073 = external constant [3 x i8], align 1 ; <[3 x i8]*> [#uses=0] + at .str151074 = external constant [11 x i8], align 1 ; <[11 x i8]*> [#uses=0] + at .str161075 = external constant [46 x i8], align 8 ; <[46 x i8]*> [#uses=0] + at .str171076 = external constant [38 x i8], align 8 ; <[38 x i8]*> [#uses=0] + at .str181077 = external constant [2 x i8], align 1 ; <[2 x i8]*> [#uses=0] + at .str241083 = external constant [6 x i8], align 1 ; <[6 x i8]*> [#uses=0] + at .str251084 = external constant [4 x i8], align 1 ; <[4 x i8]*> [#uses=0] + at .str271086 = external constant [3 x i8], align 1 ; <[3 x i8]*> [#uses=0] + at .str281087 = external constant [17 x i8], align 1 ; <[17 x i8]*> [#uses=0] + at HdRnOp = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] + at HdRnEq = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] + at HdCallEq = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] + at HdStrEq = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] + at HdTilde = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] + at .str11093 = external constant [11 x i8], align 1 ; <[11 x i8]*> [#uses=0] + at HdRnSum = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] + at HdCallSum = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] + at .str31096 = external constant [16 x i8], align 1 ; <[16 x i8]*> [#uses=0] + at HdStrSum = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] + at HdRnDiff = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] + at HdCallDiff = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] + at .str51099 = external constant [16 x i8], align 1 ; <[16 x i8]*> [#uses=0] + at HdStrDiff = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] + at HdRnProd = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] + at HdCallProd = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] + at .str71102 = external constant [16 x i8], align 1 ; <[16 x i8]*> [#uses=0] + at HdStrProd = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] + at HdRnQuo = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] + at HdCallQuo = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] + at .str91105 = external constant [16 x i8], align 1 ; <[16 x i8]*> [#uses=0] + at HdStrQuo = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] + at HdRnMod = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] + at HdCallMod = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] + at .str111108 = external constant [18 x i8], align 1 ; <[18 x i8]*> [#uses=0] + at HdStrMod = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] + at HdRnPow = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] + at HdCallPow = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] + at .str131111 = external constant [16 x i8], align 1 ; <[16 x i8]*> [#uses=0] + at HdStrPow = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] + at HdRnComm = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] + at HdCallComm = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] + at .str151114 = external constant [23 x i8], align 1 ; <[23 x i8]*> [#uses=0] + at HdStrComm = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] + at .str171116 = external constant [16 x i8], align 1 ; <[16 x i8]*> [#uses=0] + at HdRnLt = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] + at HdCallLt = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] + at .str191119 = external constant [16 x i8], align 1 ; <[16 x i8]*> [#uses=0] + at HdStrLt = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] + at HdRnIn = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] + at HdCallIn = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] + at .str211122 = external constant [15 x i8], align 1 ; <[15 x i8]*> [#uses=0] + at HdStrIn = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] + at HdRnPrint = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] + at HdCallPrint = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] + at .str231125 = external constant [15 x i8], align 1 ; <[15 x i8]*> [#uses=0] + at HdStrPrint = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] + at .str241126 = external constant [6 x i8], align 1 ; <[6 x i8]*> [#uses=0] + at .str251127 = external constant [10 x i8], align 1 ; <[10 x i8]*> [#uses=0] + at .str261128 = external constant [22 x i8], align 1 ; <[22 x i8]*> [#uses=0] + at .str271129 = external constant [36 x i8], align 8 ; <[36 x i8]*> [#uses=0] + at .str281130 = external constant [50 x i8], align 8 ; <[50 x i8]*> [#uses=0] + at .str291131 = external constant [50 x i8], align 8 ; <[50 x i8]*> [#uses=0] + at .str301132 = external constant [47 x i8], align 8 ; <[47 x i8]*> [#uses=0] + at .str311133 = external constant [49 x i8], align 8 ; <[49 x i8]*> [#uses=0] + at .str321134 = external constant [47 x i8], align 8 ; <[47 x i8]*> [#uses=0] + at .str331135 = external constant [47 x i8], align 8 ; <[47 x i8]*> [#uses=0] + at .str341136 = external constant [47 x i8], align 8 ; <[47 x i8]*> [#uses=0] + at .str351137 = external constant [47 x i8], align 8 ; <[47 x i8]*> [#uses=0] + at .str361138 = external constant [26 x i8], align 1 ; <[26 x i8]*> [#uses=0] + at .str371139 = external constant [34 x i8], align 8 ; <[34 x i8]*> [#uses=0] + at .str421144 = external constant [6 x i8], align 1 ; <[6 x i8]*> [#uses=0] + at .str661168 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] + at .str671169 = external constant [4 x i8], align 1 ; <[4 x i8]*> [#uses=0] + at .str681170 = external constant [12 x i8], align 1 ; <[12 x i8]*> [#uses=0] + at .str691171 = external constant [3 x i8], align 1 ; <[3 x i8]*> [#uses=0] + at .str711173 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=0] + at .str721174 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=0] + at .str731175 = external constant [6 x i8], align 1 ; <[6 x i8]*> [#uses=0] + at .str741176 = external constant [38 x i8], align 8 ; <[38 x i8]*> [#uses=0] + at .str761178 = external constant [49 x i8], align 8 ; <[49 x i8]*> [#uses=0] + at .str771179 = external constant [49 x i8], align 8 ; <[49 x i8]*> [#uses=0] + at .str781180 = external constant [48 x i8], align 8 ; <[48 x i8]*> [#uses=0] + at .str791181 = external constant [37 x i8], align 8 ; <[37 x i8]*> [#uses=0] + at Logfile = external global i64 ; [#uses=0] + at Input = external global %struct.TypInputFile* ; <%struct.TypInputFile**> [#uses=0] + at TestInput = external global i64 ; [#uses=0] + at In = external global i8* ; [#uses=0] + at Symbol = external global i64 ; [#uses=0] + at TestOutput = external global i64 ; [#uses=0] + at TestLine = external global [256 x i8], align 32 ; <[256 x i8]*> [#uses=0] + at InputLogfile = external global i64 ; [#uses=0] + at InputFiles = external global [16 x %struct.TypInputFile], align 32 ; <[16 x %struct.TypInputFile]*> [#uses=0] + at .str1187 = external constant [2 x i8], align 1 ; <[2 x i8]*> [#uses=0] + at Output = external global %struct.TypOutputFile* ; <%struct.TypOutputFile**> [#uses=0] + at OutputFiles = external global [16 x %struct.TypOutputFile], align 32 ; <[16 x %struct.TypOutputFile]*> [#uses=0] + at .str21189 = external constant [2 x i8], align 1 ; <[2 x i8]*> [#uses=0] + at .str41191 = external constant [2 x i8], align 1 ; <[2 x i8]*> [#uses=0] + at .str51192 = external constant [8 x i8], align 1 ; <[8 x i8]*> [#uses=0] + at .str61193 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=0] + at .str71194 = external constant [14 x i8], align 1 ; <[14 x i8]*> [#uses=0] + at NrError = external global i64 ; [#uses=0] + at NrErrLine = external global i64 ; [#uses=0] + at .str91198 = external constant [17 x i8], align 1 ; <[17 x i8]*> [#uses=0] + at .str101199 = external constant [15 x i8], align 1 ; <[15 x i8]*> [#uses=0] + at .str131202 = external constant [2 x i8], align 1 ; <[2 x i8]*> [#uses=0] + at .str141203 = external constant [2 x i8], align 1 ; <[2 x i8]*> [#uses=0] + at .str151204 = external constant [3 x i8], align 1 ; <[3 x i8]*> [#uses=0] + at Prompt = external global i8* ; [#uses=0] + at .str161206 = external constant [5 x i8], align 1 ; <[5 x i8]*> [#uses=0] + at Value = external global [1024 x i8], align 32 ; <[1024 x i8]*> [#uses=0] + at .str171208 = external constant [43 x i8], align 8 ; <[43 x i8]*> [#uses=0] + at .str181209 = external constant [34 x i8], align 8 ; <[34 x i8]*> [#uses=0] + at .str191210 = external constant [42 x i8], align 8 ; <[42 x i8]*> [#uses=0] + at .str201211 = external constant [43 x i8], align 8 ; <[43 x i8]*> [#uses=0] + at .str211212 = external constant [40 x i8], align 8 ; <[40 x i8]*> [#uses=0] + at .str431234 = external constant [10 x i8], align 1 ; <[10 x i8]*> [#uses=0] + at .str1250 = external constant [4 x i8], align 1 ; <[4 x i8]*> [#uses=0] + at .str11251 = external constant [6 x i8], align 1 ; <[6 x i8]*> [#uses=0] + at .str21252 = external constant [11 x i8], align 1 ; <[11 x i8]*> [#uses=0] + at .str31253 = external constant [12 x i8], align 1 ; <[12 x i8]*> [#uses=0] + at .str41254 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] + at .str51255 = external constant [10 x i8], align 1 ; <[10 x i8]*> [#uses=0] + at .str61256 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=0] + at .str71257 = external constant [13 x i8], align 1 ; <[13 x i8]*> [#uses=0] + at .str81258 = external constant [12 x i8], align 1 ; <[12 x i8]*> [#uses=0] + at HdUnion = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] + at .str111261 = external constant [33 x i8], align 8 ; <[33 x i8]*> [#uses=0] + at .str121262 = external constant [38 x i8], align 8 ; <[38 x i8]*> [#uses=0] + at .str131263 = external constant [46 x i8], align 8 ; <[46 x i8]*> [#uses=0] + at .str141264 = external constant [30 x i8], align 1 ; <[30 x i8]*> [#uses=0] + at .str151265 = external constant [35 x i8], align 8 ; <[35 x i8]*> [#uses=0] + at .str161266 = external constant [43 x i8], align 8 ; <[43 x i8]*> [#uses=0] + at .str171267 = external constant [22 x i8], align 1 ; <[22 x i8]*> [#uses=0] + at .str181268 = external constant [36 x i8], align 8 ; <[36 x i8]*> [#uses=0] + at .str191269 = external constant [37 x i8], align 8 ; <[37 x i8]*> [#uses=0] + at .str201270 = external constant [34 x i8], align 8 ; <[34 x i8]*> [#uses=0] + at .str211271 = external constant [35 x i8], align 8 ; <[35 x i8]*> [#uses=0] + at .str221272 = external constant [38 x i8], align 8 ; <[38 x i8]*> [#uses=0] + at .str231273 = external constant [35 x i8], align 8 ; <[35 x i8]*> [#uses=0] + at .str241274 = external constant [36 x i8], align 8 ; <[36 x i8]*> [#uses=0] + at .str251275 = external constant [34 x i8], align 8 ; <[34 x i8]*> [#uses=0] + at .str261276 = external constant [31 x i8], align 8 ; <[31 x i8]*> [#uses=0] + at .str271277 = external constant [32 x i8], align 8 ; <[32 x i8]*> [#uses=0] + at .str281278 = external constant [37 x i8], align 8 ; <[37 x i8]*> [#uses=0] + at .str291279 = external constant [35 x i8], align 8 ; <[35 x i8]*> [#uses=0] + at .str301280 = external constant [35 x i8], align 8 ; <[35 x i8]*> [#uses=0] + at .str311281 = external constant [36 x i8], align 8 ; <[36 x i8]*> [#uses=0] + at .str321282 = external constant [34 x i8], align 8 ; <[34 x i8]*> [#uses=0] + at .str331283 = external constant [34 x i8], align 8 ; <[34 x i8]*> [#uses=0] + at .str341284 = external constant [20 x i8], align 1 ; <[20 x i8]*> [#uses=0] + at .str351285 = external constant [27 x i8], align 1 ; <[27 x i8]*> [#uses=0] + at StrStat = external global i8* ; [#uses=0] + at HdStat = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] + at .str11292 = external constant [11 x i8], align 1 ; <[11 x i8]*> [#uses=0] + at .str21293 = external constant [15 x i8], align 1 ; <[15 x i8]*> [#uses=0] + at .str41295 = external constant [10 x i8], align 1 ; <[10 x i8]*> [#uses=0] + at .str51296 = external constant [12 x i8], align 1 ; <[12 x i8]*> [#uses=0] + at .str61297 = external constant [8 x i8], align 1 ; <[8 x i8]*> [#uses=0] + at .str71298 = external constant [8 x i8], align 1 ; <[8 x i8]*> [#uses=0] + at .str81299 = external constant [12 x i8], align 1 ; <[12 x i8]*> [#uses=0] + at .str91300 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] + at .str101301 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=0] + at .str111302 = external constant [14 x i8], align 1 ; <[14 x i8]*> [#uses=0] + at .str131304 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=0] + at .str151306 = external constant [3 x i8], align 1 ; <[3 x i8]*> [#uses=0] + at .str161307 = external constant [4 x i8], align 1 ; <[4 x i8]*> [#uses=0] + at .str171308 = external constant [6 x i8], align 1 ; <[6 x i8]*> [#uses=0] + at .str181309 = external constant [46 x i8], align 8 ; <[46 x i8]*> [#uses=0] + at .str191310 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] + at .str201311 = external constant [50 x i8], align 8 ; <[50 x i8]*> [#uses=0] + at .str211312 = external constant [15 x i8], align 1 ; <[15 x i8]*> [#uses=0] + at .str221313 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] + at .str231314 = external constant [48 x i8], align 8 ; <[48 x i8]*> [#uses=0] + at .str241315 = external constant [49 x i8], align 8 ; <[49 x i8]*> [#uses=0] + at .str251316 = external constant [15 x i8], align 1 ; <[15 x i8]*> [#uses=0] + at .str281319 = external constant [5 x i8], align 1 ; <[5 x i8]*> [#uses=0] + at .str291320 = external constant [36 x i8], align 8 ; <[36 x i8]*> [#uses=0] + at HdChars = external global [256 x %struct.TypHeader*], align 32 ; <[256 x %struct.TypHeader*]*> [#uses=0] + at .str1322 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=0] + at .str31326 = external constant [25 x i8], align 1 ; <[25 x i8]*> [#uses=0] + at .str41327 = external constant [39 x i8], align 8 ; <[39 x i8]*> [#uses=0] + at .str61329 = external constant [2 x i8], align 1 ; <[2 x i8]*> [#uses=0] + at .str71330 = external constant [3 x i8], align 1 ; <[3 x i8]*> [#uses=0] + at .str81331 = external constant [3 x i8], align 1 ; <[3 x i8]*> [#uses=0] + at .str91332 = external constant [3 x i8], align 1 ; <[3 x i8]*> [#uses=0] + at .str101333 = external constant [3 x i8], align 1 ; <[3 x i8]*> [#uses=0] + at .str111334 = external constant [3 x i8], align 1 ; <[3 x i8]*> [#uses=0] + at .str121335 = external constant [3 x i8], align 1 ; <[3 x i8]*> [#uses=0] + at .str131336 = external constant [3 x i8], align 1 ; <[3 x i8]*> [#uses=0] + at .str151338 = external constant [5 x i8], align 1 ; <[5 x i8]*> [#uses=0] + at .str161339 = external constant [5 x i8], align 1 ; <[5 x i8]*> [#uses=0] + at .str171340 = external constant [5 x i8], align 1 ; <[5 x i8]*> [#uses=0] + at .str181341 = external constant [5 x i8], align 1 ; <[5 x i8]*> [#uses=0] + at .str191342 = external constant [5 x i8], align 1 ; <[5 x i8]*> [#uses=0] + at .str201343 = external constant [5 x i8], align 1 ; <[5 x i8]*> [#uses=0] + at .str211344 = external constant [5 x i8], align 1 ; <[5 x i8]*> [#uses=0] + at .str221345 = external constant [5 x i8], align 1 ; <[5 x i8]*> [#uses=0] + at SyFlags = external global [13 x i8] ; <[13 x i8]*> [#uses=0] + at syLastIntr = external global i64 ; [#uses=0] + at syWorkspace = external global i8* ; [#uses=0] + at stderr = external global %struct._IO_FILE* ; <%struct._IO_FILE**> [#uses=0] + at .str1350 = external constant [38 x i8], align 8 ; <[38 x i8]*> [#uses=0] + at syStartTime = external global i64 ; [#uses=0] + at .str11351 = external constant [52 x i8], align 8 ; <[52 x i8]*> [#uses=0] + at syBuf = external global [16 x %0], align 32 ; <[16 x %0]*> [#uses=0] + at syWindow.b = external global i1 ; [#uses=0] + at syOld = external global %struct.termio, align 16 ; <%struct.termio*> [#uses=0] + at .str21352 = external constant [43 x i8], align 8 ; <[43 x i8]*> [#uses=0] + at syFid = external global i64 ; [#uses=0] + at .str31353 = external constant [51 x i8], align 8 ; <[51 x i8]*> [#uses=0] + at .str41354 = external constant [36 x i8], align 8 ; <[36 x i8]*> [#uses=0] + at .str51355 = external constant [33 x i8], align 8 ; <[33 x i8]*> [#uses=0] + at stdin = external global %struct._IO_FILE* ; <%struct._IO_FILE**> [#uses=0] + at stdout = external global %struct._IO_FILE* ; <%struct._IO_FILE**> [#uses=0] + at .str121362 = external constant [42 x i8], align 8 ; <[42 x i8]*> [#uses=0] + at .str131363 = external constant [4 x i8], align 1 ; <[4 x i8]*> [#uses=0] + at SyBanner = external global i64 ; [#uses=0] + at SyGasman = external global i64 ; [#uses=0] + at .str141366 = external constant [41 x i8], align 8 ; <[41 x i8]*> [#uses=0] + at SyLibname = external global [256 x i8], align 32 ; <[256 x i8]*> [#uses=0] + at .str161369 = external constant [41 x i8], align 8 ; <[41 x i8]*> [#uses=0] + at SyHelpname = external global [256 x i8], align 32 ; <[256 x i8]*> [#uses=0] + at .str171370 = external constant [41 x i8], align 8 ; <[41 x i8]*> [#uses=0] + at SyMemory = external global i64 ; [#uses=0] + at .str181372 = external constant [41 x i8], align 8 ; <[41 x i8]*> [#uses=0] + at syLineEdit = external global i64 ; [#uses=0] + at SyQuiet = external global i64 ; [#uses=0] + at .str191374 = external constant [41 x i8], align 8 ; <[41 x i8]*> [#uses=0] + at SyNrCols = external global i64 ; [#uses=0] + at .str201376 = external constant [41 x i8], align 8 ; <[41 x i8]*> [#uses=0] + at SyNrRows = external global i64 ; [#uses=0] + at syCTRD = external global i64 ; [#uses=0] + at .str211378 = external constant [3 x i8], align 1 ; <[3 x i8]*> [#uses=0] + at .str231380 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] + at .str241381 = external constant [22 x i8], align 1 ; <[22 x i8]*> [#uses=0] + at SyInitfiles = external global [16 x [256 x i8]], align 32 ; <[16 x [256 x i8]]*> [#uses=0] + at .str251383 = external constant [28 x i8], align 1 ; <[28 x i8]*> [#uses=0] + at .str261384 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] + at .str271385 = external constant [26 x i8], align 1 ; <[26 x i8]*> [#uses=0] + at .str281386 = external constant [43 x i8], align 8 ; <[43 x i8]*> [#uses=0] + at .str291387 = external constant [5 x i8], align 1 ; <[5 x i8]*> [#uses=0] + at .str301388 = external constant [8 x i8], align 1 ; <[8 x i8]*> [#uses=0] + at .str311389 = external constant [47 x i8], align 8 ; <[47 x i8]*> [#uses=0] + at .str321390 = external constant [56 x i8], align 8 ; <[56 x i8]*> [#uses=0] + at .str331391 = external constant [53 x i8], align 8 ; <[53 x i8]*> [#uses=0] + at .str341392 = external constant [22 x i8], align 1 ; <[22 x i8]*> [#uses=0] + at .str351393 = external constant [54 x i8], align 8 ; <[54 x i8]*> [#uses=0] + at .str361394 = external constant [3 x i8], align 1 ; <[3 x i8]*> [#uses=0] + at .str371395 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] + at .str381396 = external constant [38 x i8], align 8 ; <[38 x i8]*> [#uses=0] + at .str391397 = external constant [3 x i8], align 1 ; <[3 x i8]*> [#uses=0] + at WinCmdBuffer = external global [8000 x i8], align 32 ; <[8000 x i8]*> [#uses=0] + at .str401398 = external constant [27 x i8], align 1 ; <[27 x i8]*> [#uses=0] + at syNrchar = external global i64 ; [#uses=0] + at syPrompt = external global [256 x i8], align 32 ; <[256 x i8]*> [#uses=0] + at .str411399 = external constant [3 x i8], align 1 ; <[3 x i8]*> [#uses=0] + at .str421400 = external constant [3 x i8], align 1 ; <[3 x i8]*> [#uses=0] + at .str431401 = external constant [3 x i8], align 1 ; <[3 x i8]*> [#uses=0] + at .str441402 = external constant [3 x i8], align 1 ; <[3 x i8]*> [#uses=0] + at .str451403 = external constant [3 x i8], align 1 ; <[3 x i8]*> [#uses=0] + at syNew = external global %struct.termio, align 16 ; <%struct.termio*> [#uses=0] + at syStopTime = external global i64 ; [#uses=0] + at syHistory = external global [8192 x i8], align 32 ; <[8192 x i8]*> [#uses=0] + at syCTRO = external global i32 ; [#uses=0] + at yank.3948 = external global [512 x i8], align 32 ; <[512 x i8]*> [#uses=0] + at syHi = external global i8* ; [#uses=0] + at .str461404 = external constant [3 x i8], align 1 ; <[3 x i8]*> [#uses=0] + at .str471405 = external constant [6 x i8], align 1 ; <[6 x i8]*> [#uses=0] + at .str491407 = external constant [36 x i8], align 8 ; <[36 x i8]*> [#uses=0] + at .str501408 = external constant [3 x i8], align 1 ; <[3 x i8]*> [#uses=0] + at .str511409 = external constant [3 x i8], align 1 ; <[3 x i8]*> [#uses=0] + at .str521410 = external constant [3 x i8], align 1 ; <[3 x i8]*> [#uses=0] + at syLastIndex = external global i16 ; [#uses=0] + at syLastTopics = external global [16 x [64 x i8]], align 32 ; <[16 x [64 x i8]]*> [#uses=0] + at .str551413 = external constant [3 x i8], align 1 ; <[3 x i8]*> [#uses=0] + at .str561414 = external constant [3 x i8], align 1 ; <[3 x i8]*> [#uses=0] + at .str571415 = external constant [44 x i8], align 8 ; <[44 x i8]*> [#uses=0] + at .str581416 = external constant [15 x i8], align 1 ; <[15 x i8]*> [#uses=0] + at .str591417 = external constant [50 x i8], align 8 ; <[50 x i8]*> [#uses=0] + at .str601418 = external constant [30 x i8], align 1 ; <[30 x i8]*> [#uses=0] + at .str611419 = external constant [21 x i8], align 1 ; <[21 x i8]*> [#uses=0] + at .str621420 = external constant [50 x i8], align 8 ; <[50 x i8]*> [#uses=0] + at .str631421 = external constant [4 x i8], align 1 ; <[4 x i8]*> [#uses=0] + at .str641422 = external constant [50 x i8], align 8 ; <[50 x i8]*> [#uses=0] + at .str651423 = external constant [18 x i8], align 1 ; <[18 x i8]*> [#uses=0] + at .str661424 = external constant [50 x i8], align 8 ; <[50 x i8]*> [#uses=0] + at .str671425 = external constant [26 x i8], align 1 ; <[26 x i8]*> [#uses=0] + at .str681426 = external constant [50 x i8], align 8 ; <[50 x i8]*> [#uses=0] + at .str691427 = external constant [29 x i8], align 1 ; <[29 x i8]*> [#uses=0] + at .str701428 = external constant [50 x i8], align 8 ; <[50 x i8]*> [#uses=0] + at .str711429 = external constant [30 x i8], align 1 ; <[30 x i8]*> [#uses=0] + at .str721430 = external constant [50 x i8], align 8 ; <[50 x i8]*> [#uses=0] + at .str731431 = external constant [30 x i8], align 1 ; <[30 x i8]*> [#uses=0] + at .str741432 = external constant [50 x i8], align 8 ; <[50 x i8]*> [#uses=0] + at .str751433 = external constant [11 x i8], align 1 ; <[11 x i8]*> [#uses=0] + at .str761434 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=0] + at .str771435 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=0] + at .str781436 = external constant [11 x i8], align 1 ; <[11 x i8]*> [#uses=0] + at .str791437 = external constant [47 x i8], align 8 ; <[47 x i8]*> [#uses=0] + at .str801438 = external constant [3 x i8], align 1 ; <[3 x i8]*> [#uses=0] + at .str811439 = external constant [38 x i8], align 8 ; <[38 x i8]*> [#uses=0] + at .str821440 = external constant [40 x i8], align 8 ; <[40 x i8]*> [#uses=0] + at .str831441 = external constant [40 x i8], align 8 ; <[40 x i8]*> [#uses=0] + at .str841442 = external constant [46 x i8], align 8 ; <[46 x i8]*> [#uses=0] + at .str851443 = external constant [27 x i8], align 1 ; <[27 x i8]*> [#uses=0] + at .str861444 = external constant [27 x i8], align 1 ; <[27 x i8]*> [#uses=0] + at .str871445 = external constant [27 x i8], align 1 ; <[27 x i8]*> [#uses=0] + at .str881446 = external constant [5 x i8], align 1 ; <[5 x i8]*> [#uses=0] + at .str891447 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=0] + at .str901448 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=0] + at .str911449 = external constant [40 x i8], align 8 ; <[40 x i8]*> [#uses=0] + at .str921450 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=0] + at .str931451 = external constant [10 x i8], align 1 ; <[10 x i8]*> [#uses=0] + at .str941452 = external constant [10 x i8], align 1 ; <[10 x i8]*> [#uses=0] + at .str951453 = external constant [13 x i8], align 1 ; <[13 x i8]*> [#uses=0] + at .str961454 = external constant [39 x i8], align 8 ; <[39 x i8]*> [#uses=0] + at .str971455 = external constant [39 x i8], align 8 ; <[39 x i8]*> [#uses=0] + at .str981456 = external constant [40 x i8], align 8 ; <[40 x i8]*> [#uses=0] + at .str991457 = external constant [40 x i8], align 8 ; <[40 x i8]*> [#uses=0] + at .str1001458 = external constant [15 x i8], align 1 ; <[15 x i8]*> [#uses=0] + at .str1011459 = external constant [8 x i8], align 1 ; <[8 x i8]*> [#uses=0] + at .str1021460 = external constant [24 x i8], align 1 ; <[24 x i8]*> [#uses=0] + at .str1031461 = external constant [32 x i8], align 8 ; <[32 x i8]*> [#uses=0] + at .str1041462 = external constant [11 x i8], align 1 ; <[11 x i8]*> [#uses=0] + at .str1051463 = external constant [35 x i8], align 8 ; <[35 x i8]*> [#uses=0] + at .str1061464 = external constant [67 x i8], align 8 ; <[67 x i8]*> [#uses=0] + at .str1071465 = external constant [6 x i8], align 1 ; <[6 x i8]*> [#uses=0] + at .str1081466 = external constant [29 x i8], align 1 ; <[29 x i8]*> [#uses=0] + at .str1111469 = external constant [41 x i8], align 8 ; <[41 x i8]*> [#uses=0] + at .str1121470 = external constant [40 x i8], align 8 ; <[40 x i8]*> [#uses=0] + at .str1131471 = external constant [47 x i8], align 8 ; <[47 x i8]*> [#uses=0] + at .str1141472 = external constant [43 x i8], align 8 ; <[43 x i8]*> [#uses=0] + at .str1151473 = external constant [41 x i8], align 8 ; <[41 x i8]*> [#uses=0] + at syChapnames = external global [128 x [16 x i8]], align 32 ; <[128 x [16 x i8]]*> [#uses=0] + at .str1161474 = external constant [11 x i8], align 1 ; <[11 x i8]*> [#uses=0] + at .str1171475 = external constant [36 x i8], align 8 ; <[36 x i8]*> [#uses=0] + at .str1181476 = external constant [10 x i8], align 1 ; <[10 x i8]*> [#uses=0] + at .str1191477 = external constant [5 x i8], align 1 ; <[5 x i8]*> [#uses=0] + at .str1201478 = external constant [37 x i8], align 8 ; <[37 x i8]*> [#uses=0] + at .str1211479 = external constant [10 x i8], align 1 ; <[10 x i8]*> [#uses=0] + at .str1221480 = external constant [10 x i8], align 1 ; <[10 x i8]*> [#uses=0] + at .str1231481 = external constant [31 x i8], align 8 ; <[31 x i8]*> [#uses=0] + at .str1241482 = external constant [20 x i8], align 1 ; <[20 x i8]*> [#uses=0] + at .str1251483 = external constant [71 x i8], align 8 ; <[71 x i8]*> [#uses=0] + at .str1261484 = external constant [8 x i8], align 1 ; <[8 x i8]*> [#uses=0] + at .str1271485 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=0] + at .str1281486 = external constant [8 x i8], align 1 ; <[8 x i8]*> [#uses=0] + at .str129 = external constant [6 x i8], align 1 ; <[6 x i8]*> [#uses=0] + at .str130 = external constant [17 x i8], align 1 ; <[17 x i8]*> [#uses=0] + at .str131 = external constant [2 x i8], align 1 ; <[2 x i8]*> [#uses=0] + at .str132 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=0] + at .str1504 = external constant [10 x i8], align 1 ; <[10 x i8]*> [#uses=0] + at .str11505 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] + at .str21506 = external constant [8 x i8], align 1 ; <[8 x i8]*> [#uses=0] + at .str31507 = external constant [15 x i8], align 1 ; <[15 x i8]*> [#uses=0] + at .str41508 = external constant [14 x i8], align 1 ; <[14 x i8]*> [#uses=0] + at .str51509 = external constant [16 x i8], align 1 ; <[16 x i8]*> [#uses=0] + at .str61510 = external constant [14 x i8], align 1 ; <[14 x i8]*> [#uses=0] + at .str71511 = external constant [19 x i8], align 1 ; <[19 x i8]*> [#uses=0] + at .str81512 = external constant [10 x i8], align 1 ; <[10 x i8]*> [#uses=0] + at .str91513 = external constant [38 x i8], align 8 ; <[38 x i8]*> [#uses=0] + at .str101514 = external constant [23 x i8], align 1 ; <[23 x i8]*> [#uses=0] + at .str111515 = external constant [29 x i8], align 1 ; <[29 x i8]*> [#uses=0] + at .str121516 = external constant [29 x i8], align 1 ; <[29 x i8]*> [#uses=0] + at .str131517 = external constant [38 x i8], align 8 ; <[38 x i8]*> [#uses=0] + at .str141518 = external constant [62 x i8], align 8 ; <[62 x i8]*> [#uses=0] + at .str151519 = external constant [28 x i8], align 1 ; <[28 x i8]*> [#uses=0] + at .str161520 = external constant [26 x i8], align 1 ; <[26 x i8]*> [#uses=0] + at .str171521 = external constant [44 x i8], align 8 ; <[44 x i8]*> [#uses=0] + at .str181522 = external constant [26 x i8], align 1 ; <[26 x i8]*> [#uses=0] + at .str191523 = external constant [36 x i8], align 8 ; <[36 x i8]*> [#uses=0] + at .str201524 = external constant [29 x i8], align 1 ; <[29 x i8]*> [#uses=0] + at .str211525 = external constant [36 x i8], align 8 ; <[36 x i8]*> [#uses=0] + at .str221526 = external constant [29 x i8], align 1 ; <[29 x i8]*> [#uses=0] + at .str231527 = external constant [30 x i8], align 1 ; <[30 x i8]*> [#uses=0] + at .str241528 = external constant [37 x i8], align 8 ; <[37 x i8]*> [#uses=0] + at .str251529 = external constant [31 x i8], align 8 ; <[31 x i8]*> [#uses=0] + at .str261530 = external constant [33 x i8], align 8 ; <[33 x i8]*> [#uses=0] + at .str271531 = external constant [63 x i8], align 8 ; <[63 x i8]*> [#uses=0] + at .str281532 = external constant [40 x i8], align 8 ; <[40 x i8]*> [#uses=0] + at .str291533 = external constant [39 x i8], align 8 ; <[39 x i8]*> [#uses=0] + at .str301534 = external constant [57 x i8], align 8 ; <[57 x i8]*> [#uses=0] + at .str311535 = external constant [28 x i8], align 1 ; <[28 x i8]*> [#uses=0] + at .str321536 = external constant [42 x i8], align 8 ; <[42 x i8]*> [#uses=0] + at .str331537 = external constant [54 x i8], align 8 ; <[54 x i8]*> [#uses=0] + at .str341538 = external constant [36 x i8], align 8 ; <[36 x i8]*> [#uses=0] + at .str351539 = external constant [43 x i8], align 8 ; <[43 x i8]*> [#uses=0] + at .str361540 = external constant [47 x i8], align 8 ; <[47 x i8]*> [#uses=0] + at .str371541 = external constant [63 x i8], align 8 ; <[63 x i8]*> [#uses=0] + at .str381542 = external constant [33 x i8], align 8 ; <[33 x i8]*> [#uses=0] + at .str391543 = external constant [23 x i8], align 1 ; <[23 x i8]*> [#uses=0] + at .str401544 = external constant [41 x i8], align 8 ; <[41 x i8]*> [#uses=0] + at .str411545 = external constant [47 x i8], align 8 ; <[47 x i8]*> [#uses=0] + at .str421546 = external constant [31 x i8], align 8 ; <[31 x i8]*> [#uses=0] + at .str431547 = external constant [25 x i8], align 1 ; <[25 x i8]*> [#uses=0] + at .str441548 = external constant [41 x i8], align 8 ; <[41 x i8]*> [#uses=0] + at .str451549 = external constant [30 x i8], align 1 ; <[30 x i8]*> [#uses=0] + at .str461550 = external constant [40 x i8], align 8 ; <[40 x i8]*> [#uses=0] + at .str471551 = external constant [33 x i8], align 8 ; <[33 x i8]*> [#uses=0] + at .str1553 = external constant [8 x i8], align 1 ; <[8 x i8]*> [#uses=0] + at .str11554 = external constant [10 x i8], align 1 ; <[10 x i8]*> [#uses=0] + at .str21555 = external constant [26 x i8], align 1 ; <[26 x i8]*> [#uses=0] + at .str31556 = external constant [40 x i8], align 8 ; <[40 x i8]*> [#uses=0] + at .str41557 = external constant [33 x i8], align 8 ; <[33 x i8]*> [#uses=0] + at .str51558 = external constant [40 x i8], align 8 ; <[40 x i8]*> [#uses=0] + at LargestUnknown = external global i64 ; [#uses=0] + at .str61559 = external constant [44 x i8], align 8 ; <[44 x i8]*> [#uses=0] + at .str81561 = external constant [43 x i8], align 8 ; <[43 x i8]*> [#uses=0] + at .str91562 = external constant [16 x i8], align 1 ; <[16 x i8]*> [#uses=0] + at HdVecFFEL = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] + at HdVecFFER = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] + at TabIntVecFFE = external global [28 x %struct.TypHeader* (%struct.TypHeader*, i64)*], align 32 ; <[28 x %struct.TypHeader* (%struct.TypHeader*, i64)*]*> [#uses=0] + at .str1564 = external constant [8 x i8], align 1 ; <[8 x i8]*> [#uses=0] + at .str11565 = external constant [10 x i8], align 1 ; <[10 x i8]*> [#uses=0] + at .str21566 = external constant [10 x i8], align 1 ; <[10 x i8]*> [#uses=0] + at .str31567 = external constant [10 x i8], align 1 ; <[10 x i8]*> [#uses=0] + at .str41568 = external constant [11 x i8], align 1 ; <[11 x i8]*> [#uses=0] + at .str51569 = external constant [13 x i8], align 1 ; <[13 x i8]*> [#uses=0] + at .str61570 = external constant [48 x i8], align 8 ; <[48 x i8]*> [#uses=0] + at .str91573 = external constant [50 x i8], align 8 ; <[50 x i8]*> [#uses=0] + at .str101574 = external constant [48 x i8], align 8 ; <[48 x i8]*> [#uses=0] + at .str111575 = external constant [40 x i8], align 8 ; <[40 x i8]*> [#uses=0] + at .str121576 = external constant [41 x i8], align 8 ; <[41 x i8]*> [#uses=0] + at .str131577 = external constant [47 x i8], align 8 ; <[47 x i8]*> [#uses=0] + at .str141578 = external constant [33 x i8], align 8 ; <[33 x i8]*> [#uses=0] + at .str151579 = external constant [25 x i8], align 1 ; <[25 x i8]*> [#uses=0] + at .str161580 = external constant [47 x i8], align 8 ; <[47 x i8]*> [#uses=0] + at .str171581 = external constant [35 x i8], align 8 ; <[35 x i8]*> [#uses=0] + at .str181582 = external constant [46 x i8], align 8 ; <[46 x i8]*> [#uses=0] + at .str191583 = external constant [47 x i8], align 8 ; <[47 x i8]*> [#uses=0] + at .str201584 = external constant [42 x i8], align 8 ; <[42 x i8]*> [#uses=0] + at .str211585 = external constant [33 x i8], align 8 ; <[33 x i8]*> [#uses=0] + at .str241588 = external constant [43 x i8], align 8 ; <[43 x i8]*> [#uses=0] + at .str261590 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=0] + at .str281592 = external constant [44 x i8], align 8 ; <[44 x i8]*> [#uses=0] + at .str291593 = external constant [46 x i8], align 8 ; <[46 x i8]*> [#uses=0] + at .str301594 = external constant [42 x i8], align 8 ; <[42 x i8]*> [#uses=0] + at .str311595 = external constant [44 x i8], align 8 ; <[44 x i8]*> [#uses=0] + at .str321596 = external constant [46 x i8], align 8 ; <[46 x i8]*> [#uses=0] + at .str331597 = external constant [42 x i8], align 8 ; <[42 x i8]*> [#uses=0] + at .str341598 = external constant [44 x i8], align 8 ; <[44 x i8]*> [#uses=0] + at .str351599 = external constant [46 x i8], align 8 ; <[46 x i8]*> [#uses=0] + at .str361600 = external constant [42 x i8], align 8 ; <[42 x i8]*> [#uses=0] + at .str371601 = external constant [24 x i8], align 1 ; <[24 x i8]*> [#uses=0] + at .str381602 = external constant [65 x i8], align 8 ; <[65 x i8]*> [#uses=0] + at .str391603 = external constant [22 x i8], align 1 ; <[22 x i8]*> [#uses=0] + at .str401604 = external constant [63 x i8], align 8 ; <[63 x i8]*> [#uses=0] + at .str1619 = external constant [18 x i8], align 1 ; <[18 x i8]*> [#uses=0] + at .str11620 = external constant [19 x i8], align 1 ; <[19 x i8]*> [#uses=0] + at .str21621 = external constant [11 x i8], align 1 ; <[11 x i8]*> [#uses=0] + at .str31622 = external constant [8 x i8], align 1 ; <[8 x i8]*> [#uses=0] + at .str41623 = external constant [16 x i8], align 1 ; <[16 x i8]*> [#uses=0] + at .str51624 = external constant [13 x i8], align 1 ; <[13 x i8]*> [#uses=0] + at .str61625 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] + at .str71626 = external constant [16 x i8], align 1 ; <[16 x i8]*> [#uses=0] + at .str81627 = external constant [11 x i8], align 1 ; <[11 x i8]*> [#uses=0] + at .str91628 = external constant [15 x i8], align 1 ; <[15 x i8]*> [#uses=0] + at HdIdWord = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] + at .str101630 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] + at .str111631 = external constant [40 x i8], align 8 ; <[40 x i8]*> [#uses=0] + at .str121632 = external constant [35 x i8], align 8 ; <[35 x i8]*> [#uses=0] + at .str131633 = external constant [23 x i8], align 1 ; <[23 x i8]*> [#uses=0] + at .str141634 = external constant [37 x i8], align 8 ; <[37 x i8]*> [#uses=0] + at .str151635 = external constant [47 x i8], align 8 ; <[47 x i8]*> [#uses=0] + at .str161636 = external constant [35 x i8], align 8 ; <[35 x i8]*> [#uses=0] + at .str171637 = external constant [39 x i8], align 8 ; <[39 x i8]*> [#uses=0] + at .str181638 = external constant [30 x i8], align 1 ; <[30 x i8]*> [#uses=0] + at .str191639 = external constant [28 x i8], align 1 ; <[28 x i8]*> [#uses=0] + at .str201640 = external constant [28 x i8], align 1 ; <[28 x i8]*> [#uses=0] + at .str211641 = external constant [24 x i8], align 1 ; <[24 x i8]*> [#uses=0] + at .str221642 = external constant [42 x i8], align 8 ; <[42 x i8]*> [#uses=0] + at .str231643 = external constant [28 x i8], align 1 ; <[28 x i8]*> [#uses=0] + at .str241644 = external constant [29 x i8], align 1 ; <[29 x i8]*> [#uses=0] + at .str251645 = external constant [24 x i8], align 1 ; <[24 x i8]*> [#uses=0] + at .str261646 = external constant [45 x i8], align 8 ; <[45 x i8]*> [#uses=0] + at .str271647 = external constant [53 x i8], align 8 ; <[53 x i8]*> [#uses=0] + at .str281648 = external constant [38 x i8], align 8 ; <[38 x i8]*> [#uses=0] + at .str291649 = external constant [36 x i8], align 8 ; <[36 x i8]*> [#uses=0] + at .str301650 = external constant [29 x i8], align 1 ; <[29 x i8]*> [#uses=0] + at .str311651 = external constant [31 x i8], align 8 ; <[31 x i8]*> [#uses=0] + at .str341654 = external constant [40 x i8], align 8 ; <[40 x i8]*> [#uses=0] + at .str351655 = external constant [37 x i8], align 8 ; <[37 x i8]*> [#uses=0] + at .str361656 = external constant [41 x i8], align 8 ; <[41 x i8]*> [#uses=0] + at .str371657 = external constant [34 x i8], align 8 ; <[34 x i8]*> [#uses=0] + at .str401660 = external constant [6 x i8], align 1 ; <[6 x i8]*> [#uses=0] + at .str421662 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] + at .str431663 = external constant [4 x i8], align 1 ; <[4 x i8]*> [#uses=0] + +declare fastcc i32 @OrdinaryCollect() nounwind + +declare fastcc void @AddString2(i16* nocapture) nounwind + +declare i32 @AgCombinatorial2(i64*, %struct.TypHeader* nocapture) nounwind + +declare i32 @AgSingle(i64* nocapture, %struct.TypHeader* nocapture) nounwind + +declare i32 @AgTriple(i64* nocapture, %struct.TypHeader* nocapture) nounwind + +declare i32 @AgQuadruple(i64* nocapture, %struct.TypHeader* nocapture) nounwind + +declare fastcc void @SetAvecAgGroup(%struct.TypHeader* nocapture, i64, i64) nounwind + +declare fastcc void @SetGeneratorsAgGroup(%struct.TypHeader*) nounwind + +declare fastcc %struct.TypHeader* @AgWordAgExp(%struct.TypHeader* nocapture, %struct.TypHeader*) nounwind + +declare fastcc %struct.TypHeader* @SaveAndClearCollector(%struct.TypHeader* nocapture) nounwind + +declare fastcc %struct.TypHeader* @BlankAgGroup() nounwind + +declare fastcc void @SetStacksAgGroup(%struct.TypHeader* nocapture) nounwind + +declare fastcc %struct.TypHeader* @EvalOopN(%struct.TypHeader*, %struct.TypHeader*, %struct.TypHeader* nocapture, i8* nocapture) nounwind + +declare fastcc %struct.TypHeader* @EvalOop2(%struct.TypHeader*, %struct.TypHeader*, %struct.TypHeader*, i8* nocapture) nounwind + +declare fastcc %struct.TypHeader* @EvalOop(%struct.TypHeader*, %struct.TypHeader*, i8* nocapture) nounwind + +declare fastcc void @AddString(i16* nocapture, i64) nounwind + +declare fastcc void @AddGen() nounwind + +declare i32 @AgCombinatorial(i64*, %struct.TypHeader* nocapture) nounwind + +declare fastcc i32 @SetCWeightsAgGroup(%struct.TypHeader* nocapture, %struct.TypHeader*) nounwind + +declare void @InitCombinatorial(%struct.TypHeader* nocapture, i64) nounwind + +declare void @InitSingle(%struct.TypHeader* nocapture, i64) nounwind + +declare fastcc void @Collect(%struct.TypHeader*, %struct.TypHeader*, %struct.TypHeader*) nounwind + +declare void @InitTriple(%struct.TypHeader* nocapture, i64) nounwind + +declare void @InitQuadr(%struct.TypHeader* nocapture, i64) nounwind + +declare fastcc %struct.TypHeader* @AgSolution2(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture, %struct.TypHeader** nocapture, %struct.TypHeader*) nounwind + +declare fastcc %struct.TypHeader* @AgSolution(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @EqAg(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind readonly + +declare %struct.TypHeader* @LtAg(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind readonly + +declare %struct.TypHeader* @EvAg(%struct.TypHeader*) nounwind readnone + +declare fastcc %struct.TypHeader* @IntExponentsAgWord(%struct.TypHeader* nocapture, i64, i64) nounwind + +declare %struct.TypHeader* @ProdAg(%struct.TypHeader*, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @QuoAg(%struct.TypHeader*, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @ModAg(%struct.TypHeader* nocapture, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @PowAgI(%struct.TypHeader*, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @PowAgAg(%struct.TypHeader*, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @CommAg(%struct.TypHeader*, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @FunSumAgWord(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunDifferenceAgWord(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunDepthAgWord(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunCentralWeightAgWord(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunExponentsAgWord(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunIsAgWord(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunFactorAgGroup(%struct.TypHeader* nocapture) nounwind + +declare void @PrAgen(%struct.TypHeader* nocapture) nounwind + +declare void @PrAgList(%struct.TypHeader* nocapture) nounwind + +declare void @PrAgExp(%struct.TypHeader* nocapture) nounwind + +declare void @PrAgWord(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunAgProfile(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @TEqAg(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @TLtAg(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @TProdAg(%struct.TypHeader*, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @TQuoAg(%struct.TypHeader*, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @TModAg(%struct.TypHeader* nocapture, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @TPowAgI(%struct.TypHeader*, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @TPowAgAg(%struct.TypHeader*, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @TCommAg(%struct.TypHeader*, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @FunAgGroupRecord(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunDUMPLONG(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunCollectorProfile(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunIsCompatibleAgWord(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunExponentAgWord(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunReducedAgWord(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunInformationAgWord(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunRelativeOrderAgWord(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunLeadingExponentAgWord(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunTailDepthAgWord(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunNormalizeIgs(%struct.TypHeader* nocapture) nounwind + +declare fastcc %struct.TypHeader* @DifferenceAgWord(%struct.TypHeader*, %struct.TypHeader*, %struct.TypHeader* nocapture) nounwind + +declare fastcc %struct.TypHeader* @SumAgWord(%struct.TypHeader*, %struct.TypHeader*, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @FunFactorAgWord(%struct.TypHeader* nocapture) nounwind + +declare fastcc %struct.TypHeader* @FactorAgGroup(%struct.TypHeader* nocapture, i64) nounwind + +declare %struct.TypHeader* @FunSetCollectorAgWord(%struct.TypHeader*) nounwind + +declare %struct.TypHeader* @FunAgFpGroup(%struct.TypHeader* nocapture) nounwind + +declare i64 @LenBlist(%struct.TypHeader* nocapture) nounwind readonly + +declare %struct.TypHeader* @ElmfBlist(%struct.TypHeader* nocapture, i64) nounwind readonly + +declare i64 @PosBlist(%struct.TypHeader* nocapture, %struct.TypHeader*, i64) nounwind readonly + +declare i64 @IsDenseBlist(%struct.TypHeader* nocapture) nounwind readnone + +declare i64 @IsPossBlist(%struct.TypHeader* nocapture) nounwind readonly + +declare %struct.TypHeader* @EqBlist(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind readonly + +declare %struct.TypHeader* @ElmBlist(%struct.TypHeader* nocapture, i64) nounwind + +declare %struct.TypHeader* @ElmsBlist(%struct.TypHeader* nocapture, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @AssBlist(%struct.TypHeader*, i64, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @AsssBlist(%struct.TypHeader*, %struct.TypHeader*, %struct.TypHeader*) nounwind + +declare void @PlainBlist(%struct.TypHeader*) nounwind + +declare %struct.TypHeader* @FunIsBlist(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunBlistList(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunListBlist(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunSizeBlist(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunIsSubsetBlist(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunIntersectBlist(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunUniteBlist(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunSubtractBlist(%struct.TypHeader* nocapture) nounwind + +declare fastcc i64 @IsBlist(%struct.TypHeader*) nounwind + +declare %struct.TypHeader* @FunDistanceBlist(%struct.TypHeader* nocapture) nounwind + +declare fastcc void @CVCM2V2(%struct.TypHeader*, %struct.TypHeader*, i64, i64, %struct.TypHeader*, i64, i64*, %struct.TypHeader*) nounwind + +declare fastcc void @CVCMFVF(%struct.TypHeader*, i64, %struct.TypHeader*, i64, i64, %struct.TypHeader*, i64, i64, i64*, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @FunDistanceVecFFE(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunDistancesDistributionVecFFEsVecFFE(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunDistancesDistributionMatFFEVecFFE(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunCosetLeadersMatFFE(%struct.TypHeader* nocapture) nounwind + +declare fastcc i64 @CLMF(%struct.TypHeader*, i64, %struct.TypHeader*, i64, %struct.TypHeader*, %struct.TypHeader*, i64, i64, i64) nounwind + +declare fastcc i64 @CLM2(%struct.TypHeader*, i64, i64, %struct.TypHeader*, %struct.TypHeader*, i64, i64) nounwind + +declare fastcc %struct.TypHeader* @BlistsMatFF2(%struct.TypHeader*) nounwind + +declare fastcc void @DDMFVF(%struct.TypHeader*, i64, %struct.TypHeader*, %struct.TypHeader*, i64, i64, %struct.TypHeader*) nounwind + +declare fastcc void @DDM2V2(%struct.TypHeader*, %struct.TypHeader*, %struct.TypHeader*, i64, %struct.TypHeader*) nounwind + +declare fastcc i64 @ConvVecFFE(%struct.TypHeader*, i64) nounwind + +declare fastcc i64 @ConvMatFFE(%struct.TypHeader*, i64) nounwind + +declare %struct.TypHeader* @FunAClosestVectorCombinationsMatFFEVecFFE(%struct.TypHeader* nocapture) nounwind + +declare fastcc void @CompressDeductionList() nounwind + +declare %struct.TypHeader* @FunStandardizeTable(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunStandardizeTable2(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunApplyRel(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunMakeConsequences(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunApplyRel2(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunCopyRel(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunMakeCanonical(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunTreeEntry(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunMakeConsequences2(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunAddAbelianRelator(%struct.TypHeader* nocapture) nounwind + +declare fastcc i64 @TreeEntryC() nounwind + +declare fastcc void @AddCosetFactor2(i64) nounwind + +declare fastcc void @HandleCoinc2(i64, i64, %struct.TypHeader*) nounwind + +declare fastcc void @HandleCoinc(i64, i64) nounwind + +declare fastcc void @ConvertToBase(%struct.TypHeader* nocapture, i64) nounwind + +declare %struct.TypHeader* @EvCyc(%struct.TypHeader*) nounwind readnone + +declare %struct.TypHeader* @EqCyc(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @LtCyc(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @ProdCycI(%struct.TypHeader*, %struct.TypHeader*) nounwind + +declare fastcc %struct.TypHeader* @Cyclotomic(%struct.TypHeader* nocapture, i64, i64) nounwind + +declare void @PrCyc(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @SumCyc(%struct.TypHeader*, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @DiffCyc(%struct.TypHeader*, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @ProdCyc(%struct.TypHeader*, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @QuoCyc(%struct.TypHeader*, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @PowCyc(%struct.TypHeader*, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @FunE(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunIsCyc(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunIsCycInt(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunNofCyc(%struct.TypHeader* nocapture) nounwind + +define internal %struct.TypHeader* @FunCoeffsCyc(%struct.TypHeader* nocapture %hdCall) nounwind { +entry: + ret %struct.TypHeader* null +} + +define internal %struct.TypHeader* @FunGaloisCyc(%struct.TypHeader* nocapture %hdCall) nounwind { +entry: + unreachable +} + +declare %struct.TypHeader* @CantEval(%struct.TypHeader*) nounwind + +declare %struct.TypHeader* @Sum(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @Diff(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @Prod(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @Quo(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @Mod(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @Pow(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @Eq(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @Lt(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @Ne(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @Le(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @Gt(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @Ge(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @IsTrue(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind readonly + +declare %struct.TypHeader* @IsFalse(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind readonly + +declare %struct.TypHeader* @EvBool(%struct.TypHeader*) nounwind readnone + +declare %struct.TypHeader* @EqBool(%struct.TypHeader*, %struct.TypHeader*) nounwind readonly + +declare %struct.TypHeader* @LtBool(%struct.TypHeader*, %struct.TypHeader*) nounwind readonly + +define internal fastcc void @InitEval() nounwind { +bb.nph49: + br label %bb + +bb: ; preds = %bb, %bb.nph49 + br i1 undef, label %bb5.preheader, label %bb + +bb4: ; preds = %bb5.preheader, %bb4 + br i1 undef, label %bb6, label %bb4 + +bb6: ; preds = %bb4 + br i1 undef, label %bb11.preheader, label %bb5.preheader + +bb5.preheader: ; preds = %bb6, %bb + br label %bb4 + +bb10: ; preds = %bb11.preheader, %bb10 + br i1 undef, label %bb15, label %bb10 + +bb15: ; preds = %bb10 + br i1 undef, label %bb17, label %bb11.preheader + +bb11.preheader: ; preds = %bb15, %bb6 + br label %bb10 + +bb17: ; preds = %bb15 + br i1 undef, label %InstIntFunc.exit, label %bb.i + +bb.i: ; preds = %bb17 + unreachable + +InstIntFunc.exit: ; preds = %bb17 + br i1 undef, label %InstIntFunc.exit8, label %bb.i7 + +bb.i7: ; preds = %InstIntFunc.exit + unreachable + +InstIntFunc.exit8: ; preds = %InstIntFunc.exit + br i1 undef, label %InstVar.exit28, label %bb.i27 + +bb.i27: ; preds = %InstIntFunc.exit8 + unreachable + +InstVar.exit28: ; preds = %InstIntFunc.exit8 + br i1 undef, label %InstVar.exit, label %bb.i25 + +bb.i25: ; preds = %InstVar.exit28 + unreachable + +InstVar.exit: ; preds = %InstVar.exit28 + br i1 undef, label %InstIntFunc.exit23, label %bb.i22 + +bb.i22: ; preds = %InstVar.exit + unreachable + +InstIntFunc.exit23: ; preds = %InstVar.exit + br i1 undef, label %InstIntFunc.exit20, label %bb.i19 + +bb.i19: ; preds = %InstIntFunc.exit23 + unreachable + +InstIntFunc.exit20: ; preds = %InstIntFunc.exit23 + br i1 undef, label %InstIntFunc.exit17, label %bb.i16 + +bb.i16: ; preds = %InstIntFunc.exit20 + br label %InstIntFunc.exit17 + +InstIntFunc.exit17: ; preds = %bb.i16, %InstIntFunc.exit20 + %tmp79 = tail call fastcc %struct.TypHeader* @NewBag(i32 16, i64 8) nounwind ; <%struct.TypHeader*> [#uses=2] + %tmp80 = getelementptr inbounds %struct.TypHeader* %tmp79, i64 0, i32 1 ; <%struct.TypHeader***> [#uses=1] + %tmp81 = load %struct.TypHeader*** %tmp80, align 8 ; <%struct.TypHeader**> [#uses=1] + store %struct.TypHeader* bitcast (%struct.TypHeader* (%struct.TypHeader*)* @FunIsBound to %struct.TypHeader*), %struct.TypHeader** %tmp81 + %tmp82 = tail call fastcc %struct.TypHeader* @FindIdent(i8* getelementptr inbounds ([8 x i8]* @.str8302, i64 0, i64 0)) nounwind ; <%struct.TypHeader*> [#uses=1] + %tmp83 = getelementptr inbounds %struct.TypHeader* %tmp82, i64 0, i32 1 ; <%struct.TypHeader***> [#uses=1] + %tmp84 = load %struct.TypHeader*** %tmp83, align 8 ; <%struct.TypHeader**> [#uses=1] + br i1 undef, label %InstIntFunc.exit14, label %bb.i13 + +bb.i13: ; preds = %InstIntFunc.exit17 + unreachable + +InstIntFunc.exit14: ; preds = %InstIntFunc.exit17 + store %struct.TypHeader* %tmp79, %struct.TypHeader** %tmp84, align 8 + br i1 undef, label %InstIntFunc.exit11, label %bb.i10 + +bb.i10: ; preds = %InstIntFunc.exit14 + unreachable + +InstIntFunc.exit11: ; preds = %InstIntFunc.exit14 + br i1 undef, label %InstIntFunc.exit9.i, label %bb.i8.i + +bb.i8.i: ; preds = %InstIntFunc.exit11 + unreachable + +InstIntFunc.exit9.i: ; preds = %InstIntFunc.exit11 + br i1 undef, label %InstIntFunc.exit6.i, label %bb.i5.i + +bb.i5.i: ; preds = %InstIntFunc.exit9.i + unreachable + +InstIntFunc.exit6.i: ; preds = %InstIntFunc.exit9.i + br i1 undef, label %InstIntFunc.exit3.i, label %bb.i2.i + +bb.i2.i: ; preds = %InstIntFunc.exit6.i + unreachable + +InstIntFunc.exit3.i: ; preds = %InstIntFunc.exit6.i + br i1 undef, label %InitInt.exit, label %bb.i.i + +bb.i.i: ; preds = %InstIntFunc.exit3.i + br label %InitInt.exit + +InitInt.exit: ; preds = %bb.i.i, %InstIntFunc.exit3.i + br i1 undef, label %InstIntFunc.exit6.i419, label %bb.i5.i418 + +bb.i5.i418: ; preds = %InitInt.exit + unreachable + +InstIntFunc.exit6.i419: ; preds = %InitInt.exit + br i1 undef, label %InstIntFunc.exit3.i422, label %bb.i2.i421 + +bb.i2.i421: ; preds = %InstIntFunc.exit6.i419 + unreachable + +InstIntFunc.exit3.i422: ; preds = %InstIntFunc.exit6.i419 + br i1 undef, label %InitRat.exit, label %bb.i.i424 + +bb.i.i424: ; preds = %InstIntFunc.exit3.i422 + unreachable + +InitRat.exit: ; preds = %InstIntFunc.exit3.i422 + br label %bb.i396 + +bb.i396: ; preds = %bb.i396, %InitRat.exit + br i1 undef, label %bb2.i398, label %bb.i396 + +bb2.i398: ; preds = %bb.i396 + br i1 undef, label %InstIntFunc.exit15.i401, label %bb.i14.i400 + +bb.i14.i400: ; preds = %bb2.i398 + br label %InstIntFunc.exit15.i401 + +InstIntFunc.exit15.i401: ; preds = %bb.i14.i400, %bb2.i398 + br i1 undef, label %InstIntFunc.exit12.i404, label %bb.i11.i403 + +bb.i11.i403: ; preds = %InstIntFunc.exit15.i401 + unreachable + +InstIntFunc.exit12.i404: ; preds = %InstIntFunc.exit15.i401 + br i1 undef, label %InstIntFunc.exit9.i407, label %bb.i8.i406 + +bb.i8.i406: ; preds = %InstIntFunc.exit12.i404 + unreachable + +InstIntFunc.exit9.i407: ; preds = %InstIntFunc.exit12.i404 + br i1 undef, label %InstIntFunc.exit6.i410, label %bb.i5.i409 + +bb.i5.i409: ; preds = %InstIntFunc.exit9.i407 + br label %InstIntFunc.exit6.i410 + +InstIntFunc.exit6.i410: ; preds = %bb.i5.i409, %InstIntFunc.exit9.i407 + %tmp215 = tail call fastcc %struct.TypHeader* @NewBag(i32 16, i64 8) nounwind ; <%struct.TypHeader*> [#uses=2] + %tmp216 = getelementptr inbounds %struct.TypHeader* %tmp215, i64 0, i32 1 ; <%struct.TypHeader***> [#uses=1] + %tmp217 = load %struct.TypHeader*** %tmp216, align 8 ; <%struct.TypHeader**> [#uses=1] + store %struct.TypHeader* bitcast (%struct.TypHeader* (%struct.TypHeader*)* @FunCoeffsCyc to %struct.TypHeader*), %struct.TypHeader** %tmp217 + %tmp218 = tail call fastcc %struct.TypHeader* @FindIdent(i8* getelementptr inbounds ([10 x i8]* @.str4251, i64 0, i64 0)) nounwind ; <%struct.TypHeader*> [#uses=1] + %tmp219 = getelementptr inbounds %struct.TypHeader* %tmp218, i64 0, i32 1 ; <%struct.TypHeader***> [#uses=1] + %tmp220 = load %struct.TypHeader*** %tmp219, align 8 ; <%struct.TypHeader**> [#uses=1] + br i1 undef, label %InstIntFunc.exit3.i413, label %bb.i2.i412 + +bb.i2.i412: ; preds = %InstIntFunc.exit6.i410 + unreachable + +InstIntFunc.exit3.i413: ; preds = %InstIntFunc.exit6.i410 + store %struct.TypHeader* %tmp215, %struct.TypHeader** %tmp220, align 8 + unreachable +} + +declare void @CantPrint(%struct.TypHeader*) nounwind + +declare %struct.TypHeader* @CantSum(%struct.TypHeader*, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @CantDiff(%struct.TypHeader*, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @CantProd(%struct.TypHeader*, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @CantQuo(%struct.TypHeader*, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @CantMod(%struct.TypHeader*, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @CantPow(%struct.TypHeader*, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @IntComm(%struct.TypHeader* nocapture) nounwind + +declare void @PrBinop(%struct.TypHeader*) nounwind + +declare void @PrComm(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @EvVar(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @EvVarAuto(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @EvVarAss(%struct.TypHeader* nocapture) nounwind + +declare void @PrVar(%struct.TypHeader* nocapture) nounwind + +declare void @PrVarAss(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @EvNot(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @EvAnd(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @EvOr(%struct.TypHeader* nocapture) nounwind + +declare void @PrBool(%struct.TypHeader*) nounwind + +declare void @PrNot(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunIsBool(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunShallowCopy(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunCopy(%struct.TypHeader* nocapture) nounwind + +define internal %struct.TypHeader* @FunIsBound(%struct.TypHeader* nocapture %hdCall) nounwind { +entry: + br i1 undef, label %bb1, label %bb + +bb: ; preds = %entry + ret %struct.TypHeader* undef + +bb1: ; preds = %entry + br i1 undef, label %bb3, label %bb24 + +bb3: ; preds = %bb1 + br i1 undef, label %bb25, label %bb24 + +bb24: ; preds = %bb3, %bb1 + ret %struct.TypHeader* undef + +bb25: ; preds = %bb3 + br i1 undef, label %bb28, label %bb86 + +bb28: ; preds = %bb25 + br i1 undef, label %bb133, label %bb86 + +bb86: ; preds = %bb28, %bb25 + br i1 undef, label %bb93, label %bb94 + +bb93: ; preds = %bb86 + unreachable + +bb94: ; preds = %bb86 + br i1 undef, label %bb97, label %bb108 + +bb97: ; preds = %bb94 + ret %struct.TypHeader* undef + +bb108: ; preds = %bb94 + br i1 undef, label %bb110, label %bb109 + +bb109: ; preds = %bb108 + %tmp91 = bitcast %struct.TypHeader** undef to i8* ; [#uses=1] + %tmp92 = call fastcc %struct.TypHeader* @FindRecname(i8* %tmp91) nounwind ; <%struct.TypHeader*> [#uses=0] + unreachable + +bb110: ; preds = %bb108 + ret %struct.TypHeader* undef + +bb133: ; preds = %bb28 + ret %struct.TypHeader* undef +} + +declare %struct.TypHeader* @FunLeftQuotient(%struct.TypHeader* nocapture) nounwind + +define internal %struct.TypHeader* @CantComm(%struct.TypHeader* %hdL, %struct.TypHeader* %hdR) nounwind { +entry: + unreachable +} + +declare i16** @__ctype_b_loc() nounwind readnone + +declare fastcc void @Print(%struct.TypHeader*) nounwind + +declare %struct.TypHeader* @FunUnbind(%struct.TypHeader* nocapture) nounwind + +declare fastcc void @CopyCleanup(%struct.TypHeader*) nounwind + +declare fastcc void @CopyCopy(%struct.TypHeader*, %struct.TypHeader* nocapture) nounwind + +declare fastcc void @CopyForward(%struct.TypHeader*, %struct.TypHeader*) nounwind + +declare fastcc %struct.TypHeader* @CopyShadow(%struct.TypHeader*) nounwind + +declare fastcc %struct.TypHeader* @Copy(%struct.TypHeader*) nounwind + +declare %struct.TypHeader* @EvFFE(%struct.TypHeader*) nounwind readnone + +declare %struct.TypHeader* @EqFFE(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind readonly + +declare %struct.TypHeader* @LtFFE(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind readonly + +declare void @PrFFE(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @SumFFE(%struct.TypHeader*, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @DiffFFE(%struct.TypHeader*, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @ProdFFE(%struct.TypHeader*, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @QuoFFE(%struct.TypHeader*, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @PowFFE(%struct.TypHeader* nocapture, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @FunIsFFE(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunLogFFE(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunIntFFE(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunZ(%struct.TypHeader* nocapture) nounwind + +declare fastcc void @PrFF(%struct.TypHeader** nocapture, i32) nounwind + +declare fastcc %struct.TypHeader* @RootFiniteField(i64) nounwind + +declare fastcc %struct.TypHeader* @ConvTabIntFFE(i64) nounwind + +declare fastcc %struct.TypHeader* @CommonFF(%struct.TypHeader** nocapture, %struct.TypHeader* nocapture) nounwind + +declare fastcc void @ChangeEnv(%struct.TypHeader*) nounwind + +declare %struct.TypHeader* @EvFunction(%struct.TypHeader*) nounwind readnone + +declare %struct.TypHeader* @EvReturn(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @EvFunccall(%struct.TypHeader*) nounwind + +declare %struct.TypHeader* @EvMakefunc(%struct.TypHeader* nocapture) nounwind + +declare void @PrFunccall(%struct.TypHeader* nocapture) nounwind + +declare void @PrFunction(%struct.TypHeader* nocapture) nounwind + +declare void @PrFuncint(%struct.TypHeader* nocapture) nounwind + +declare void @PrReturn(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunTrace(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunUntrace(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunProfile(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunApplyFunc(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunIsFunc(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunIgnore(%struct.TypHeader* nocapture) nounwind readonly + +declare fastcc i64 @SizeObj(%struct.TypHeader*) nounwind + +declare fastcc void @MarkObj(%struct.TypHeader*) nounwind + +declare fastcc %struct.TypHeader* @Error(i8* nocapture, i64, i64) nounwind + +declare void @longjmp(%struct.__jmp_buf_tag*, i32) noreturn nounwind + +declare fastcc void @InitGap(i32, i8** nocapture) nounwind + +declare i32 @_setjmp(%struct.__jmp_buf_tag*) nounwind + +declare %struct.TypHeader* @FunSIZEHANDLES(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunNUMBERHANDLES(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunCoefficients(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunGASMAN(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunSIZE(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunTYPE(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunOBJ(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunHANDLE(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunIsIdentical(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunTmpName(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunSizeScreen(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunRuntime(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunExec(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunHelp(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunReadTest(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunLogInputTo(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunLogTo(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunAppendTo(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunPrntTo(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunPrint(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunAUTO(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunREAD(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunWindowCmd(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunError(%struct.TypHeader*) nounwind + +declare %struct.TypHeader* @FunBacktrace(%struct.TypHeader*) nounwind + +declare i32 @main(i32, i8** nocapture) noreturn nounwind + +declare fastcc void @ExitKernel(%struct.TypHeader*) nounwind + +declare fastcc void @CollectGarb() nounwind + +define internal fastcc %struct.TypHeader* @NewBag(i32 %type, i64 %size) nounwind { +entry: + br i1 undef, label %bb3, label %bb2 + +bb2: ; preds = %entry + br i1 undef, label %bb22, label %bb28 + +bb3: ; preds = %entry + unreachable + +bb22: ; preds = %bb2 + unreachable + +bb28: ; preds = %bb2 + br i1 undef, label %bb30, label %bb29 + +bb29: ; preds = %bb28 + unreachable + +bb30: ; preds = %bb28 + br i1 undef, label %bb33, label %bb31 + +bb31: ; preds = %bb30 + br i1 undef, label %bb32, label %bb33 + +bb32: ; preds = %bb31 + tail call fastcc void @Resize(%struct.TypHeader* undef, i64 undef) nounwind + ret %struct.TypHeader* undef + +bb33: ; preds = %bb31, %bb30 + ret %struct.TypHeader* undef +} + +define internal fastcc void @Resize(%struct.TypHeader* %hdBag, i64 %newSize) nounwind { +entry: + br i1 undef, label %bb1, label %bb2 + +bb1: ; preds = %entry + br label %bb2 + +bb2: ; preds = %bb1, %entry + br i1 undef, label %bb3, label %bb4 + +bb3: ; preds = %bb2 + ret void + +bb4: ; preds = %bb2 + %tmp53 = tail call fastcc %struct.TypHeader* @NewBag(i32 undef, i64 %newSize) nounwind ; <%struct.TypHeader*> [#uses=0] + unreachable +} + +declare fastcc i64 @completion(i8* nocapture, i64, i64) nounwind + +define internal fastcc %struct.TypHeader* @FindRecname(i8* nocapture %name) nounwind { +entry: + br i1 undef, label %bb8, label %bb5 + +bb5: ; preds = %entry + unreachable + +bb8: ; preds = %entry + %tmp24 = tail call fastcc %struct.TypHeader* @NewBag(i32 78, i64 0) nounwind ; <%struct.TypHeader*> [#uses=1] + %tmp26 = getelementptr inbounds %struct.TypHeader* %tmp24, i64 0, i32 1 ; <%struct.TypHeader***> [#uses=1] + %tmp27 = load %struct.TypHeader*** %tmp26, align 8 ; <%struct.TypHeader**> [#uses=1] + %tmp29 = bitcast %struct.TypHeader** %tmp27 to i8* ; [#uses=1] + %tmp30 = tail call i8* @strncat(i8* %tmp29, i8* %name, i64 undef) nounwind ; [#uses=0] + unreachable +} + +define internal fastcc %struct.TypHeader* @FindIdent(i8* nocapture %name) nounwind { +entry: + br i1 undef, label %bb10, label %bb8 + +bb8: ; preds = %entry + br label %bb10 + +bb10: ; preds = %bb8, %entry + %tmp28 = load %struct.TypHeader** @HdIdenttab, align 8 ; <%struct.TypHeader*> [#uses=1] + %tmp32 = getelementptr inbounds %struct.TypHeader* %tmp28, i64 0, i32 1 ; <%struct.TypHeader***> [#uses=1] + %tmp33 = load %struct.TypHeader*** %tmp32, align 8 ; <%struct.TypHeader**> [#uses=1] + br label %bb12 + +bb11: ; preds = %bb13 + br label %bb12 + +bb12: ; preds = %bb11, %bb10 + %tmp36 = getelementptr inbounds %struct.TypHeader** %tmp33, i64 undef ; <%struct.TypHeader**> [#uses=1] + %tmp37 = load %struct.TypHeader** %tmp36, align 8 ; <%struct.TypHeader*> [#uses=2] + br i1 undef, label %bb19, label %bb13 + +bb13: ; preds = %bb12 + br i1 undef, label %bb14, label %bb11 + +bb14: ; preds = %bb13 + br i1 undef, label %bb19, label %bb15 + +bb15: ; preds = %bb14 + br i1 undef, label %bb18, label %bb17 + +bb17: ; preds = %bb15 + ret %struct.TypHeader* %tmp37 + +bb18: ; preds = %bb15 + ret %struct.TypHeader* %tmp37 + +bb19: ; preds = %bb14, %bb12 + unreachable +} + +declare %struct.TypHeader* @EvInt(%struct.TypHeader*) nounwind readnone + +declare %struct.TypHeader* @EqInt(%struct.TypHeader*, %struct.TypHeader*) nounwind readonly + +declare %struct.TypHeader* @LtInt(%struct.TypHeader*, %struct.TypHeader*) nounwind readonly + +declare void @PrInteger(%struct.TypHeader*) nounwind + +declare %struct.TypHeader* @SumInt(%struct.TypHeader*, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @DiffInt(%struct.TypHeader*, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @ProdInt(%struct.TypHeader*, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @ModInt(%struct.TypHeader*, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @PowInt(%struct.TypHeader*, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @FunIsInt(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunQuo(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunRem(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunGcdInt(%struct.TypHeader* nocapture) nounwind + +declare fastcc %struct.TypHeader* @GcdInt(%struct.TypHeader*, %struct.TypHeader*) nounwind + +declare fastcc %struct.TypHeader* @RemInt(%struct.TypHeader*, %struct.TypHeader*) nounwind + +declare fastcc %struct.TypHeader* @QuoInt(%struct.TypHeader*, %struct.TypHeader*) nounwind + +declare i64 @CantLenList(%struct.TypHeader* nocapture) nounwind + +declare i64 @NotIsDenseList(%struct.TypHeader* nocapture) nounwind readnone + +declare i64 @NotIsPossList(%struct.TypHeader* nocapture) nounwind readnone + +declare %struct.TypHeader* @EvList(%struct.TypHeader*) nounwind readnone + +declare %struct.TypHeader* @EqList(%struct.TypHeader*, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @LtList(%struct.TypHeader*, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @SumList(%struct.TypHeader*, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @DiffList(%struct.TypHeader*, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @ProdList(%struct.TypHeader*, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @QuoList(%struct.TypHeader*, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @QuoLists(%struct.TypHeader*, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @ModList(%struct.TypHeader*, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @ModLists(%struct.TypHeader*, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @PowList(%struct.TypHeader*, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @PowLists(%struct.TypHeader*, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @CommList(%struct.TypHeader*, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @CommLists(%struct.TypHeader*, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @CantElmList(%struct.TypHeader* nocapture, i64) nounwind + +declare %struct.TypHeader* @CantElmsList(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @CantAssList(%struct.TypHeader* nocapture, i64, %struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @CantAsssList(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind + +declare i64 @CantPosList(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture, i64) nounwind + +declare void @CantPlainList(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @DepthListx(%struct.TypHeader*) nounwind + +declare void @PrList(%struct.TypHeader*) nounwind + +declare %struct.TypHeader* @SumSclList(%struct.TypHeader*, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @SumListScl(%struct.TypHeader*, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @DiffSclList(%struct.TypHeader*, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @DiffListScl(%struct.TypHeader*, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @ProdSclList(%struct.TypHeader*, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @ProdListScl(%struct.TypHeader*, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @EvElmList(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @EvElmListLevel(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @EvElmsList(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @EvElmsListLevel(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @EvAssList(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @EvAssListLevel(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @EvAsssList(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @EvAsssListLevel(%struct.TypHeader* nocapture) nounwind + +declare void @PrElmList(%struct.TypHeader* nocapture) nounwind + +declare void @PrElmsList(%struct.TypHeader* nocapture) nounwind + +declare void @PrAssList(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @EvIn(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunIsList(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunIsVector(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunIsMat(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunLength(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunAdd(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunAppend(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunPosition(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunOnPoints(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunOnPairs(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunOnTuples(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunOnSets(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunOnRight(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunOnLeft(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunDepthVector(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @CantDepthVector(%struct.TypHeader* nocapture) nounwind + +declare fastcc %struct.TypHeader* @AsssListLevel(%struct.TypHeader*, %struct.TypHeader*, %struct.TypHeader*, i64) nounwind + +declare fastcc %struct.TypHeader* @AssListLevel(%struct.TypHeader*, i64, %struct.TypHeader*, i64) nounwind + +declare fastcc %struct.TypHeader* @ElmsListLevel(%struct.TypHeader*, %struct.TypHeader*, i64) nounwind + +declare fastcc %struct.TypHeader* @ElmListLevel(%struct.TypHeader*, i64, i64) nounwind + +declare %struct.TypHeader* @ProdListList(%struct.TypHeader*, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @DiffListList(%struct.TypHeader*, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @SumListList(%struct.TypHeader*, %struct.TypHeader*) nounwind + +declare void @PrPcPres(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunTriangleIndex(%struct.TypHeader* nocapture) nounwind + +declare fastcc i32 @IsNormedPcp(%struct.TypHeader*, %struct.TypHeader** nocapture) nounwind + +declare %struct.TypHeader* @FunTailReducedPcp(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunBaseReducedPcp(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunTailDepthPcp(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunDepthPcp(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunExponentsPcp(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunExponentPcp(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunDifferencePcp(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunSumPcp(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunSubtractPowerPcp(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunAddPowerPcp(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunDefinePowerPcp(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunSubtractCommPcp(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunAddCommPcp(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunDefineCommPcp(%struct.TypHeader* nocapture) nounwind + +declare fastcc %struct.TypHeader* @NormalWordPcp(%struct.TypHeader*, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @FunPowerPcp(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunConjugatePcp(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunCommPcp(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunQuotientPcp(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunLeftQuotientPcp(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunProductPcp(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunNormalWordPcp(%struct.TypHeader* nocapture) nounwind + +declare fastcc void @ShrinkSwords(%struct.TypHeader*, %struct.TypHeader*, %struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunCentralWeightsPcp(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunShrinkPcp(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunGeneratorsPcp(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunDefineCentralWeightsPcp(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunExtendCentralPcp(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunAgPcp(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunPcp(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @EvPerm(%struct.TypHeader*) nounwind readnone + +declare %struct.TypHeader* @EqPP(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind readonly + +declare %struct.TypHeader* @EqPQ(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind readonly + +declare %struct.TypHeader* @EqQP(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind readonly + +declare %struct.TypHeader* @EqQQ(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind readonly + +declare %struct.TypHeader* @LtPP(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind readonly + +declare %struct.TypHeader* @LtPQ(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind readonly + +declare %struct.TypHeader* @LtQP(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind readonly + +declare %struct.TypHeader* @LtQQ(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind readonly + +declare %struct.TypHeader* @EvMakeperm(%struct.TypHeader* nocapture) nounwind + +declare void @PrMakeperm(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @PowPI(%struct.TypHeader* nocapture, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @PowIP(%struct.TypHeader*, %struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @QuoIP(%struct.TypHeader*, %struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @PowPP(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunIsPerm(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunPermList(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunOrderPerm(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunSignPerm(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunSmallestGeneratorPerm(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @CommQQ(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @CommQP(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @CommPQ(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @CommPP(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @PowQQ(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @PowQP(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @PowPQ(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @ModQQ(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @ModQP(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @ModPQ(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @ModPP(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @ProdQQ(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @ProdQP(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @ProdPQ(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @ProdPP(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunCyclePermInt(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunCycleLengthPermInt(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunLargestMovedPointPerm(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @QuoIQ(%struct.TypHeader*, %struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @PowIQ(%struct.TypHeader*, %struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @QuoQQ(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @QuoQP(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @QuoPQ(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @QuoPP(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @PowQI(%struct.TypHeader* nocapture, %struct.TypHeader*) nounwind + +declare void @PrPermQ(%struct.TypHeader* nocapture) nounwind + +declare void @PrPermP(%struct.TypHeader* nocapture) nounwind + +declare i64 @LenPlist(%struct.TypHeader* nocapture) nounwind readonly + +declare %struct.TypHeader* @ElmfPlist(%struct.TypHeader* nocapture, i64) nounwind readonly + +declare i64 @PosPlist(%struct.TypHeader* nocapture, %struct.TypHeader*, i64) nounwind + +declare void @PlainPlist(%struct.TypHeader* nocapture) nounwind readnone + +declare i64 @IsDensePlist(%struct.TypHeader* nocapture) nounwind readonly + +declare i64 @IsPossPlist(%struct.TypHeader* nocapture) nounwind readonly + +declare %struct.TypHeader* @EqPlist(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @LtPlist(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @ElmPlist(%struct.TypHeader* nocapture, i64) nounwind + +declare %struct.TypHeader* @ElmsPlist(%struct.TypHeader* nocapture, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @AssPlist(%struct.TypHeader*, i64, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @AsssPlist(%struct.TypHeader*, %struct.TypHeader*, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @EvMakeList(%struct.TypHeader* nocapture) nounwind + +declare void @PrMakeList(%struct.TypHeader* nocapture) nounwind + +declare fastcc %struct.TypHeader* @MakeList(%struct.TypHeader*, i64, %struct.TypHeader* nocapture) nounwind + +declare fastcc %struct.TypHeader* @UnifiedFieldVecFFE(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind + +declare void @AddCoeffsListxListx(%struct.TypHeader*, %struct.TypHeader*, %struct.TypHeader*) nounwind + +declare i64 @MultiplyCoeffsListxListx(%struct.TypHeader*, %struct.TypHeader*, i64, %struct.TypHeader*, i64) nounwind + +declare %struct.TypHeader* @CantNormalizeCoeffs(%struct.TypHeader* nocapture) nounwind + +declare void @CantShrinkCoeffs(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @CantShiftedCoeffs(%struct.TypHeader* nocapture, i64) nounwind + +declare void @CantAddCoeffs(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind + +declare i64 @CantMultiplyCoeffs(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture, i64, %struct.TypHeader* nocapture, i64) nounwind + +declare %struct.TypHeader* @CantProductCoeffs(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @CantProductCoeffsMod(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind + +declare i64 @CantReduceCoeffs(%struct.TypHeader* nocapture, i64, %struct.TypHeader* nocapture, i64) nounwind + +declare i64 @CantReduceCoeffsMod(%struct.TypHeader* nocapture, i64, %struct.TypHeader* nocapture, i64, %struct.TypHeader* nocapture) nounwind + +declare noalias %struct.TypHeader* @CantPowerModCoeffs(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @NormalizeCoeffsListx(%struct.TypHeader*) nounwind + +declare %struct.TypHeader* @NormalizeCoeffsVecFFE(%struct.TypHeader*) nounwind + +declare void @ShrinkCoeffsListx(%struct.TypHeader*) nounwind + +declare void @ShrinkCoeffsVecFFE(%struct.TypHeader*) nounwind + +declare %struct.TypHeader* @ShiftedCoeffsListx(%struct.TypHeader*, i64) nounwind + +declare %struct.TypHeader* @ShiftedCoeffsVecFFE(%struct.TypHeader*, i64) nounwind + +declare void @AddCoeffsListxVecFFE(%struct.TypHeader*, %struct.TypHeader*, %struct.TypHeader*) nounwind + +declare void @AddCoeffsVecFFEVecFFE(%struct.TypHeader*, %struct.TypHeader*, %struct.TypHeader*) nounwind + +declare i64 @MultiplyCoeffsVecFFEVecFFE(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture, i64, %struct.TypHeader* nocapture, i64) nounwind + +declare %struct.TypHeader* @ProductCoeffsListxListx(%struct.TypHeader*, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @ProductCoeffsVecFFEVecFFE(%struct.TypHeader*, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @ProductCoeffsModListxListx(%struct.TypHeader*, %struct.TypHeader*, %struct.TypHeader*) nounwind + +declare i64 @ReduceCoeffsListxListx(%struct.TypHeader*, i64, %struct.TypHeader*, i64) nounwind + +declare i64 @ReduceCoeffsVecFFEVecFFE(%struct.TypHeader* nocapture, i64, %struct.TypHeader* nocapture, i64) nounwind + +declare i64 @ReduceCoeffsModListxListx(%struct.TypHeader*, i64, %struct.TypHeader*, i64, %struct.TypHeader*) nounwind + +declare i64 @ReduceCoeffsModListx(%struct.TypHeader*, i64, %struct.TypHeader* nocapture, i64, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @PowerModListxIntListx(%struct.TypHeader*, %struct.TypHeader*, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @PowerModVecFFEIntVecFFE(%struct.TypHeader*, %struct.TypHeader*, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @PowerModListxLIntListx(%struct.TypHeader*, %struct.TypHeader* nocapture, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @PowerModVecFFELIntVecFFE(%struct.TypHeader*, %struct.TypHeader* nocapture, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @FunShiftedCoeffs(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunNormalizeCoeffs(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunShrinkCoeffs(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunAddCoeffs(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunSumCoeffs(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunProductCoeffs(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunProductCoeffsMod(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunReduceCoeffs(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunRemainderCoeffs(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunReduceCoeffsMod(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunPowerModCoeffs(%struct.TypHeader* nocapture) nounwind + +declare i64 @LenRange(%struct.TypHeader* nocapture) nounwind readonly + +declare %struct.TypHeader* @ElmfRange(%struct.TypHeader* nocapture, i64) nounwind readonly + +declare i64 @PosRange(%struct.TypHeader* nocapture, %struct.TypHeader*, i64) nounwind + +declare i64 @IsDenseRange(%struct.TypHeader* nocapture) nounwind readnone + +declare i64 @IsPossRange(%struct.TypHeader* nocapture) nounwind readonly + +declare %struct.TypHeader* @LtRange(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind readonly + +declare %struct.TypHeader* @ElmRange(%struct.TypHeader* nocapture, i64) nounwind + +declare %struct.TypHeader* @ElmsRange(%struct.TypHeader* nocapture, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @AssRange(%struct.TypHeader*, i64, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @AsssRange(%struct.TypHeader*, %struct.TypHeader*, %struct.TypHeader*) nounwind + +declare void @PlainRange(%struct.TypHeader*) nounwind + +declare void @PrRange(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @EvMakeRange(%struct.TypHeader* nocapture) nounwind + +declare void @PrMakeRange(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunIsRange(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @EvRat(%struct.TypHeader*) nounwind readnone + +declare void @PrRat(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @SumRat(%struct.TypHeader*, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @DiffRat(%struct.TypHeader*, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @ProdRat(%struct.TypHeader*, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @QuoRat(%struct.TypHeader*, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @ModRat(%struct.TypHeader* nocapture, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @PowRat(%struct.TypHeader*, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @EqRat(%struct.TypHeader*, %struct.TypHeader*) nounwind readonly + +declare %struct.TypHeader* @LtRat(%struct.TypHeader*, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @FunIsRat(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunNumerator(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunDenominator(%struct.TypHeader* nocapture) nounwind + +declare fastcc %struct.TypHeader* @RdExpr(i64) nounwind + +declare fastcc %struct.TypHeader* @RdAtom(i64) nounwind + +declare fastcc %struct.TypHeader* @RdFactor(i64) nounwind + +declare fastcc %struct.TypHeader* @RdTerm(i64) nounwind + +declare fastcc %struct.TypHeader* @RdAri(i64) nounwind + +declare fastcc %struct.TypHeader* @RdRel(i64) nounwind + +declare fastcc %struct.TypHeader* @RdStats(i64) nounwind + +declare fastcc %struct.TypHeader* @RdStat(i64) nounwind + +declare %struct.TypHeader* @EvRec(%struct.TypHeader*) nounwind readnone + +declare %struct.TypHeader* @EqRec(%struct.TypHeader*, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @EvMakeRec(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @EvRecElm(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @EvRecAss(%struct.TypHeader* nocapture) nounwind + +declare void @PrRec(%struct.TypHeader*) nounwind + +declare void @PrRecElm(%struct.TypHeader* nocapture) nounwind + +declare void @PrRecAss(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @SumRec(%struct.TypHeader*, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @DiffRec(%struct.TypHeader*, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @ProdRec(%struct.TypHeader*, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @QuoRec(%struct.TypHeader*, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @ModRec(%struct.TypHeader*, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @PowRec(%struct.TypHeader*, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @LtRec(%struct.TypHeader*, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @CommRec(%struct.TypHeader*, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @FunIsRec(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunRecFields(%struct.TypHeader* nocapture) nounwind + +declare fastcc %struct.TypHeader* @MakeRec(%struct.TypHeader*, i64, %struct.TypHeader* nocapture) nounwind + +declare fastcc i64 @OpenInput(i8* nocapture) nounwind + +declare fastcc void @PutLine() nounwind + +declare fastcc void @PutChr(i32 signext) nounwind + +declare fastcc void @Pr(i8* nocapture, i64, i64) nounwind + +declare fastcc void @SyntaxError(i8*) nounwind + +declare fastcc void @GetLine() nounwind + +declare fastcc void @GetIdent() nounwind + +declare fastcc void @GetSymbol() nounwind + +declare fastcc void @Match(i64, i8* nocapture, i64) nounwind + +declare i64 @LenSet(%struct.TypHeader* nocapture) nounwind readonly + +declare %struct.TypHeader* @ElmfSet(%struct.TypHeader* nocapture, i64) nounwind readonly + +declare i64 @PosSet(%struct.TypHeader* nocapture, %struct.TypHeader*, i64) nounwind + +declare void @PlainSet(%struct.TypHeader* nocapture) nounwind readnone + +declare i64 @IsDenseSet(%struct.TypHeader* nocapture) nounwind readnone + +declare i64 @IsPossSet(%struct.TypHeader* nocapture) nounwind readonly + +declare %struct.TypHeader* @EqSet(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @LtSet(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @ElmSet(%struct.TypHeader* nocapture, i64) nounwind + +declare %struct.TypHeader* @ElmsSet(%struct.TypHeader* nocapture, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @AssSet(%struct.TypHeader*, i64, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @AsssSet(%struct.TypHeader*, %struct.TypHeader*, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @FunSet(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunIsSet(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunIsEqualSet(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunIsSubsetSet(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunAddSet(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunRemoveSet(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunUniteSet(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunIntersectSet(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunSubtractSet(%struct.TypHeader* nocapture) nounwind + +declare fastcc i64 @IsSet(%struct.TypHeader*) nounwind + +declare fastcc %struct.TypHeader* @SetList(%struct.TypHeader*) nounwind + +declare %struct.TypHeader* @EvStatseq(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @EvIf(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @EvFor(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @EvWhile(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @EvRepeat(%struct.TypHeader* nocapture) nounwind + +declare void @PrStatseq(%struct.TypHeader* nocapture) nounwind + +declare void @PrIf(%struct.TypHeader* nocapture) nounwind + +declare void @PrFor(%struct.TypHeader* nocapture) nounwind + +declare void @PrWhile(%struct.TypHeader* nocapture) nounwind + +declare void @PrRepeat(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @EvChar(%struct.TypHeader*) nounwind readnone + +declare %struct.TypHeader* @EqChar(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind readonly + +declare %struct.TypHeader* @LtChar(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind readonly + +declare i64 @LenString(%struct.TypHeader* nocapture) nounwind readonly + +declare %struct.TypHeader* @ElmfString(%struct.TypHeader* nocapture, i64) nounwind readonly + +declare i64 @PosString(%struct.TypHeader*, %struct.TypHeader*, i64) nounwind + +declare i64 @IsDenseString(%struct.TypHeader* nocapture) nounwind readnone + +declare i64 @IsPossString(%struct.TypHeader* nocapture) nounwind readonly + +declare void @PrChar(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @ElmString(%struct.TypHeader* nocapture, i64) nounwind + +declare %struct.TypHeader* @ElmsString(%struct.TypHeader* nocapture, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @AssString(%struct.TypHeader*, i64, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @AsssString(%struct.TypHeader*, %struct.TypHeader*, %struct.TypHeader*) nounwind + +declare void @PlainString(%struct.TypHeader*) nounwind + +declare void @PrString(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @EqString(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind readonly + +declare %struct.TypHeader* @LtString(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind readonly + +declare %struct.TypHeader* @FunIsString(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @EvMakeString(%struct.TypHeader* nocapture) nounwind + +declare fastcc i64 @IsString(%struct.TypHeader*) nounwind + +declare noalias i8* @calloc(i64, i64) nounwind + +declare i8* @tmpnam(i8*) nounwind + +declare fastcc void @SyExit(i64) noreturn nounwind + +declare void @exit(i32) noreturn nounwind + +declare i64 @times(%struct.tms* nocapture) nounwind + +declare i64 @fwrite(i8* nocapture, i64, i64, i8* nocapture) nounwind + +declare void @syAnswerIntr(i32) nounwind + +declare i64 @time(i64*) nounwind + +declare void (i32)* @signal(i32, void (i32)*) nounwind + +declare fastcc void @syEchoch(i32, i64) nounwind + +declare i32 @fileno(%struct._IO_FILE* nocapture) nounwind + +declare i64 @write(i32, i8* nocapture, i64) + +declare fastcc void @syStopraw(i64) nounwind + +declare i32 @ioctl(i32, i64, ...) nounwind + +declare void @syAnswerTstp(i32) nounwind + +declare i32 @getpid() nounwind + +declare i32 @kill(i32, i32) nounwind + +declare fastcc void @SyFclose(i64) nounwind + +declare i32 @fclose(%struct._IO_FILE* nocapture) nounwind + +declare i8* @strncat(i8*, i8* nocapture, i64) nounwind + +declare i32 @strcmp(i8* nocapture, i8* nocapture) nounwind readonly + +declare fastcc i64 @SyFopen(i8* nocapture, i8* nocapture) nounwind + +declare noalias %struct._IO_FILE* @fopen(i8* noalias nocapture, i8* noalias nocapture) nounwind + +declare void @setbuf(%struct._IO_FILE* noalias nocapture, i8* noalias) nounwind + +declare i64 @strlen(i8* nocapture) nounwind readonly + +declare fastcc void @syWinPut(i64, i8* nocapture, i8* nocapture) nounwind + +declare i32 @isatty(i32) nounwind + +declare i8* @ttyname(i32) nounwind + +declare i32 @fputs(i8* noalias nocapture, %struct._IO_FILE* noalias nocapture) nounwind + +declare i32 @atoi(i8* nocapture) nounwind readonly + +declare noalias i8* @malloc(i64) nounwind + +declare void @free(i8* nocapture) nounwind + +declare i8* @getenv(i8* nocapture) nounwind readonly + +declare i32 @system(i8* nocapture) + +declare i64 @read(i32, i8* nocapture, i64) + +declare fastcc void @SyFputs(i8* nocapture, i64) nounwind + +declare fastcc i32 @syGetch(i64) nounwind + +declare fastcc i32 @syStartraw(i64) nounwind + +declare void @llvm.memcpy.i64(i8* nocapture, i8* nocapture, i64, i32) nounwind + +declare void @syAnswerCont(i32) nounwind + +declare fastcc void @syEchos(i8* nocapture, i64) nounwind + +declare fastcc i8* @SyFgets(i8*, i64) nounwind + +declare i8* @fgets(i8* noalias, i32, %struct._IO_FILE* noalias nocapture) nounwind + +declare fastcc void @SyHelp(i8* nocapture, i64) nounwind + +declare %struct.TypHeader* @FunTzRelator(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunTzWord(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunTzSortC(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunTzRenumberGens(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunTzReplaceGens(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunTzSubstituteGen(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunTzOccurrences(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunTzOccurrencesPairs(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunTzSearchC(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @EvUnknown(%struct.TypHeader*) nounwind readnone + +declare %struct.TypHeader* @EqUnknown(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind readonly + +declare %struct.TypHeader* @LtUnknown(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind readonly + +declare void @PrUnknown(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @SumUnknown(%struct.TypHeader*, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @DiffUnknown(%struct.TypHeader*, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @ProdUnknown(%struct.TypHeader*, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @QuoUnknown(%struct.TypHeader*, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @PowUnknown(%struct.TypHeader* nocapture, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @FunUnknown(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunIsUnknown(%struct.TypHeader* nocapture) nounwind + +declare i64 @LenVecFFE(%struct.TypHeader* nocapture) nounwind readonly + +declare %struct.TypHeader* @ElmlVecFFE(%struct.TypHeader* nocapture, i64) nounwind + +declare %struct.TypHeader* @ElmrVecFFE(%struct.TypHeader* nocapture, i64) nounwind + +declare i64 @PosVecFFE(%struct.TypHeader*, %struct.TypHeader*, i64) nounwind + +declare i64 @IsDenseVecFFE(%struct.TypHeader* nocapture) nounwind readnone + +declare i64 @IsPossVecFFE(%struct.TypHeader* nocapture) nounwind readonly + +declare %struct.TypHeader* @DepthVecFFE(%struct.TypHeader* nocapture) nounwind readonly + +declare fastcc i64 @DegreeVecFFE(%struct.TypHeader* nocapture) nounwind readonly + +declare fastcc i64 @DegreeMatFFE(%struct.TypHeader** nocapture) nounwind readonly + +declare %struct.TypHeader* @ElmfVecFFE(%struct.TypHeader* nocapture, i64) nounwind + +declare %struct.TypHeader* @ElmVecFFE(%struct.TypHeader* nocapture, i64) nounwind + +declare %struct.TypHeader* @ElmsVecFFE(%struct.TypHeader* nocapture, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @AssVecFFE(%struct.TypHeader*, i64, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @AsssVecFFE(%struct.TypHeader*, %struct.TypHeader*, %struct.TypHeader*) nounwind + +declare void @PlainVecFFE(%struct.TypHeader*) nounwind + +declare i64 @IsXTypeVecFFE(%struct.TypHeader*) nounwind + +declare i64 @IsXTypeMatFFE(%struct.TypHeader*) nounwind + +declare void @PrVecFFE(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @SumFFEVecFFE(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @SumVecFFEFFE(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @SumVecFFEVecFFE(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @DiffFFEVecFFE(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @DiffVecFFEFFE(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @DiffVecFFEVecFFE(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @ProdFFEVecFFE(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @ProdVecFFEFFE(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @ProdVecFFEVecFFE(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @ProdVecFFEMatFFE(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @PowMatFFEInt(%struct.TypHeader*, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @FunCharFFE(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunDegreeFFE(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunLogVecFFE(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunMakeVecFFE(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunNumberVecFFE(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @CantIntVecFFE(%struct.TypHeader* nocapture, i64) nounwind + +declare %struct.TypHeader* @FunIntVecFFE(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @ProdFFEVector(%struct.TypHeader*, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @ProdVectorFFE(%struct.TypHeader*, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @DiffFFEVector(%struct.TypHeader*, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @DiffVectorFFE(%struct.TypHeader*, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @SumFFEVector(%struct.TypHeader*, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @SumVectorFFE(%struct.TypHeader*, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @IntVecFFE(%struct.TypHeader*, i64) nounwind + +declare i64 @LenVector(%struct.TypHeader* nocapture) nounwind readonly + +declare %struct.TypHeader* @ElmfVector(%struct.TypHeader* nocapture, i64) nounwind readonly + +declare i64 @PosVector(%struct.TypHeader* nocapture, %struct.TypHeader*, i64) nounwind + +declare void @PlainVector(%struct.TypHeader* nocapture) nounwind readnone + +declare i64 @IsDenseVector(%struct.TypHeader* nocapture) nounwind readnone + +declare i64 @IsPossVector(%struct.TypHeader* nocapture) nounwind readonly + +declare %struct.TypHeader* @EqVector(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @LtVector(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @ElmVector(%struct.TypHeader* nocapture, i64) nounwind + +declare %struct.TypHeader* @ElmsVector(%struct.TypHeader* nocapture, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @AssVector(%struct.TypHeader*, i64, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @AsssVector(%struct.TypHeader*, %struct.TypHeader*, %struct.TypHeader*) nounwind + +declare i64 @IsXTypeVector(%struct.TypHeader*) nounwind + +declare i64 @IsXTypeMatrix(%struct.TypHeader*) nounwind + +declare %struct.TypHeader* @SumIntVector(%struct.TypHeader*, %struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @SumVectorInt(%struct.TypHeader* nocapture, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @SumVectorVector(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @DiffIntVector(%struct.TypHeader*, %struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @DiffVectorInt(%struct.TypHeader* nocapture, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @DiffVectorVector(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @ProdIntVector(%struct.TypHeader*, %struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @ProdVectorInt(%struct.TypHeader* nocapture, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @ProdVectorVector(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @ProdVectorMatrix(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @PowMatrixInt(%struct.TypHeader*, %struct.TypHeader*) nounwind + +declare fastcc %struct.TypHeader* @SwordWord(%struct.TypHeader*, %struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @EvWord(%struct.TypHeader*) nounwind readnone + +declare %struct.TypHeader* @EqWord(%struct.TypHeader*, %struct.TypHeader*) nounwind readonly + +declare fastcc %struct.TypHeader* @WordSword(%struct.TypHeader* nocapture) nounwind + +declare void @PrWord(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @ProdWord(%struct.TypHeader*, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @QuoWord(%struct.TypHeader*, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @ModWord(%struct.TypHeader*, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @PowWW(%struct.TypHeader*, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @CommWord(%struct.TypHeader*, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @LtWord(%struct.TypHeader*, %struct.TypHeader*) nounwind readonly + +declare %struct.TypHeader* @PowWI(%struct.TypHeader*, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @FunExpsum(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunIsWord(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunPosWord(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunSubword(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunLenWord(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunMappedWord(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunEliminated(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunSubs(%struct.TypHeader* nocapture) nounwind + +declare fastcc %struct.TypHeader* @Words(%struct.TypHeader* nocapture, i64) nounwind + +declare %struct.TypHeader* @FunAbstractGenerators(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @FunAbstractGenerator(%struct.TypHeader* nocapture) nounwind + +declare void @PrSword(%struct.TypHeader* nocapture) nounwind + +declare %struct.TypHeader* @LtAg_DIRECT(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind readonly + +declare %struct.TypHeader* @CommAg_DIRECT(%struct.TypHeader*, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @ProdCyc_DIRECT(%struct.TypHeader*, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @QuoCyc_DIRECT(%struct.TypHeader*) nounwind + +declare void @AddCoeffsListxListx_DIRECT(%struct.TypHeader*, %struct.TypHeader*, %struct.TypHeader*) nounwind + +declare i64 @PosRange_DIRECT(%struct.TypHeader* nocapture, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @ProdCycI_DIRECT(%struct.TypHeader*, %struct.TypHeader*) nounwind + +declare void @PrFunction_DIRECT(%struct.TypHeader* nocapture) nounwind + +declare void @FunPrint_DIRECT(%struct.TypHeader* nocapture) nounwind + +declare void @FunBacktrace_DIRECT() nounwind + +declare %struct.TypHeader* @SumSclList_DIRECT(%struct.TypHeader*, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @SumListScl_DIRECT(%struct.TypHeader*, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @DiffSclList_DIRECT(%struct.TypHeader*, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @DiffListScl_DIRECT(%struct.TypHeader*, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @ProdSclList_DIRECT(%struct.TypHeader*, %struct.TypHeader*) nounwind + +declare %struct.TypHeader* @ProdListScl_DIRECT(%struct.TypHeader*, %struct.TypHeader*) nounwind + +declare i64 @IsXTypeVector_DIRECT(%struct.TypHeader*) nounwind + +declare %struct.TypHeader* @EqWord_DIRECT(%struct.TypHeader*, %struct.TypHeader*) nounwind readonly + +declare %struct.TypHeader* @ProdWord_DIRECT(%struct.TypHeader*, %struct.TypHeader*) nounwind From foldr at codedgers.com Mon Jul 19 12:17:11 2010 From: foldr at codedgers.com (Mikhail Glushenkov) Date: Mon, 19 Jul 2010 17:17:11 -0000 Subject: [llvm-commits] [llvm] r108714 - /llvm/trunk/utils/TableGen/LLVMCConfigurationEmitter.cpp Message-ID: <20100719171711.231D52A6C12C@llvm.org> Author: foldr Date: Mon Jul 19 12:17:10 2010 New Revision: 108714 URL: http://llvm.org/viewvc/llvm-project?rev=108714&view=rev Log: Better error reporting for switch_list. Modified: llvm/trunk/utils/TableGen/LLVMCConfigurationEmitter.cpp Modified: llvm/trunk/utils/TableGen/LLVMCConfigurationEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/LLVMCConfigurationEmitter.cpp?rev=108714&r1=108713&r2=108714&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/LLVMCConfigurationEmitter.cpp (original) +++ llvm/trunk/utils/TableGen/LLVMCConfigurationEmitter.cpp Mon Jul 19 12:17:10 2010 @@ -315,6 +315,10 @@ bool isList() const { return OptionType::IsList(this->Type); } + bool isParameterList() const + { return (OptionType::IsList(this->Type) + && !OptionType::IsSwitchList(this->Type)); } + }; void OptionDescription::CheckConsistency() const { @@ -471,8 +475,11 @@ const OptionDescription& FindSwitch(const std::string& OptName) const; const OptionDescription& FindParameter(const std::string& OptName) const; const OptionDescription& FindList(const std::string& OptName) const; + const OptionDescription& FindParameterList(const std::string& OptName) const; const OptionDescription& FindListOrParameter(const std::string& OptName) const; + const OptionDescription& + FindParameterListOrParameter(const std::string& OptName) const; /// insertDescription - Insert new OptionDescription into /// OptionDescriptions list @@ -510,6 +517,14 @@ } const OptionDescription& +OptionDescriptions::FindParameterList(const std::string& OptName) const { + const OptionDescription& OptDesc = this->FindOption(OptName); + if (!OptDesc.isList() || OptDesc.isSwitchList()) + throw OptName + ": incorrect option type - should be a parameter list!"; + return OptDesc; +} + +const OptionDescription& OptionDescriptions::FindParameter(const std::string& OptName) const { const OptionDescription& OptDesc = this->FindOption(OptName); if (!OptDesc.isParameter()) @@ -526,6 +541,16 @@ return OptDesc; } +const OptionDescription& +OptionDescriptions::FindParameterListOrParameter +(const std::string& OptName) const { + const OptionDescription& OptDesc = this->FindOption(OptName); + if ((!OptDesc.isList() && !OptDesc.isParameter()) || OptDesc.isSwitchList()) + throw OptName + + ": incorrect option type - should be a parameter list or parameter!"; + return OptDesc; +} + void OptionDescriptions::InsertDescription (const OptionDescription& o) { container_type::iterator I = Descriptions.find(o.Name); if (I != Descriptions.end()) { @@ -679,8 +704,8 @@ void onCommaSeparated (const DagInit& d) { CheckNumberOfArguments(d, 0); - if (!optDesc_.isList()) - throw "'comma_separated' is valid only on list options!"; + if (!optDesc_.isParameterList()) + throw "'comma_separated' is valid only on parameter list options!"; optDesc_.setCommaSeparated(); } @@ -747,7 +772,7 @@ if (val < 2) throw "Error in the 'multi_val' property: " "the value must be greater than 1!"; - if (!optDesc_.isList()) + if (!optDesc_.isParameterList()) throw "The multi_val property is valid only on list options!"; optDesc_.MultiVal = val; } @@ -1453,7 +1478,7 @@ return true; } else if (TestName == "element_in_list") { - const OptionDescription& OptDesc = OptDescs.FindList(OptName); + const OptionDescription& OptDesc = OptDescs.FindParameterList(OptName); const std::string& VarName = OptDesc.GenVariableName(); O << "std::find(" << VarName << ".begin(),\n"; O.indent(IndentLevel + Indent1) @@ -2026,7 +2051,7 @@ { CheckNumberOfArguments(Dag, 1); const std::string& Name = InitPtrToString(Dag.getArg(0)); - const OptionDescription& D = OptDescs.FindListOrParameter(Name); + const OptionDescription& D = OptDescs.FindParameterListOrParameter(Name); if (D.isSwitchList()) { throw std::runtime_error @@ -2061,7 +2086,7 @@ CheckNumberOfArguments(Dag, 2); const std::string& Name = InitPtrToString(Dag.getArg(0)); const std::string& Hook = InitPtrToString(Dag.getArg(1)); - const OptionDescription& D = OptDescs.FindListOrParameter(Name); + const OptionDescription& D = OptDescs.FindParameterListOrParameter(Name); O.indent(IndentLevel) << "vec.push_back(std::make_pair(" << D.GenVariableName() << ".getPosition(" @@ -2527,8 +2552,15 @@ O.indent(IndentLevel) << OptDesc.GenVariableName() << ".clear();\n"; for (ListInit::const_iterator B = List.begin(), E = List.end(); B != E; ++B) { - O.indent(IndentLevel) << OptDesc.GenVariableName() << ".push_back(\"" - << InitPtrToString(*B) << "\");\n"; + const Init* CurElem = *B; + if (OptDesc.isSwitchList()) + CheckBooleanConstant(CurElem); + + O.indent(IndentLevel) + << OptDesc.GenVariableName() << ".push_back(\"" + << (OptDesc.isSwitchList() ? CurElem->getAsString() + : InitPtrToString(CurElem)) + << "\");\n"; } } else if (OptDesc.isSwitch()) { @@ -2797,7 +2829,8 @@ CheckNumberOfArguments(Dag, 2); const std::string& OptName = InitPtrToString(Dag.getArg(0)); const std::string& HookName = InitPtrToString(Dag.getArg(1)); - const OptionDescription& D = OptDescs_.FindOption(OptName); + const OptionDescription& D = + OptDescs_.FindParameterListOrParameter(OptName); HookNames_[HookName] = HookInfo(D.isList() ? HookInfo::ListHook : HookInfo::ArgHook); From foldr at codedgers.com Mon Jul 19 12:17:22 2010 From: foldr at codedgers.com (Mikhail Glushenkov) Date: Mon, 19 Jul 2010 17:17:22 -0000 Subject: [llvm-commits] [llvm] r108718 - /llvm/trunk/utils/TableGen/LLVMCConfigurationEmitter.cpp Message-ID: <20100719171723.059642A6C12F@llvm.org> Author: foldr Date: Mon Jul 19 12:17:22 2010 New Revision: 108718 URL: http://llvm.org/viewvc/llvm-project?rev=108718&view=rev Log: Remove code duplication. Modified: llvm/trunk/utils/TableGen/LLVMCConfigurationEmitter.cpp Modified: llvm/trunk/utils/TableGen/LLVMCConfigurationEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/LLVMCConfigurationEmitter.cpp?rev=108718&r1=108717&r2=108718&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/LLVMCConfigurationEmitter.cpp (original) +++ llvm/trunk/utils/TableGen/LLVMCConfigurationEmitter.cpp Mon Jul 19 12:17:22 2010 @@ -1853,6 +1853,24 @@ } +/// EmitForEachListElementCycleHeader - Emit common code for iterating through +/// all elements of a list. Helper function used by +/// EmitForwardOptionPropertyHandlingCode. +void EmitForEachListElementCycleHeader (const OptionDescription& D, + unsigned IndentLevel, + raw_ostream& O) { + unsigned IndentLevel1 = IndentLevel + Indent1; + + O.indent(IndentLevel) + << "for (" << D.GenTypeDeclaration() + << "::iterator B = " << D.GenVariableName() << ".begin(),\n"; + O.indent(IndentLevel) + << "E = " << D.GenVariableName() << ".end(); B != E;) {\n"; + O.indent(IndentLevel1) << "unsigned pos = " << D.GenVariableName() + << ".getPosition(B - " << D.GenVariableName() + << ".begin());\n"; +} + /// EmitForwardOptionPropertyHandlingCode - Helper function used to /// implement EmitActionHandler. Emits code for /// handling the (forward) and (forward_as) option properties. @@ -1893,16 +1911,7 @@ << D.GenVariableName() << "));\n"; break; case OptionType::PrefixList: - // TODO: remove duplication across PrefixList / ParameterList / SwitchList - // branches - O.indent(IndentLevel) - << "for (" << D.GenTypeDeclaration() - << "::iterator B = " << D.GenVariableName() << ".begin(),\n"; - O.indent(IndentLevel) - << "E = " << D.GenVariableName() << ".end(); B != E;) {\n"; - O.indent(IndentLevel1) << "unsigned pos = " << D.GenVariableName() - << ".getPosition(B - " << D.GenVariableName() - << ".begin());\n"; + EmitForEachListElementCycleHeader(D, IndentLevel, O); O.indent(IndentLevel1) << "vec.push_back(std::make_pair(pos, \"" << Name << "\" + " << "*B));\n"; O.indent(IndentLevel1) << "++B;\n"; @@ -1915,14 +1924,7 @@ O.indent(IndentLevel) << "}\n"; break; case OptionType::ParameterList: - O.indent(IndentLevel) - << "for (" << D.GenTypeDeclaration() << "::iterator B = " - << D.GenVariableName() << ".begin(),\n"; - O.indent(IndentLevel) << "E = " << D.GenVariableName() - << ".end() ; B != E;) {\n"; - O.indent(IndentLevel1) << "unsigned pos = " << D.GenVariableName() - << ".getPosition(B - " << D.GenVariableName() - << ".begin());\n"; + EmitForEachListElementCycleHeader(D, IndentLevel, O); O.indent(IndentLevel1) << "vec.push_back(std::make_pair(pos, \"" << Name << "\"));\n"; @@ -1934,14 +1936,7 @@ O.indent(IndentLevel) << "}\n"; break; case OptionType::SwitchList: - O.indent(IndentLevel) - << "for (" << D.GenTypeDeclaration() << "::iterator B = " - << D.GenVariableName() << ".begin(),\n"; - O.indent(IndentLevel) << "E = " << D.GenVariableName() - << ".end() ; B != E;) {\n"; - O.indent(IndentLevel1) << "unsigned pos = " << D.GenVariableName() - << ".getPosition(B - " << D.GenVariableName() - << ".begin());\n"; + EmitForEachListElementCycleHeader(D, IndentLevel, O); O.indent(IndentLevel1) << "vec.push_back(std::make_pair(pos, \"" << Name << "\"));\n"; O.indent(IndentLevel1) << "++B;\n"; From grosbach at apple.com Mon Jul 19 12:18:28 2010 From: grosbach at apple.com (Jim Grosbach) Date: Mon, 19 Jul 2010 17:18:28 -0000 Subject: [llvm-commits] [llvm] r108722 - in /llvm/trunk/lib/Target/ARM: ARMISelLowering.cpp ARMISelLowering.h Message-ID: <20100719171828.926362A6C12C@llvm.org> Author: grosbach Date: Mon Jul 19 12:18:28 2010 New Revision: 108722 URL: http://llvm.org/viewvc/llvm-project?rev=108722&view=rev Log: Since ARM emits inline jump tables as part of the ConstantIsland pass, it should set the jump table encloding the EK_Inline. This prevents a second, unused, copy of the table from being emitted after the function body. PR7499. Modified: llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp llvm/trunk/lib/Target/ARM/ARMISelLowering.h Modified: llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp?rev=108722&r1=108721&r2=108722&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp (original) +++ llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp Mon Jul 19 12:18:28 2010 @@ -1628,6 +1628,10 @@ return DAG.getNode(ARMISD::Wrapper, dl, MVT::i32, Res); } +unsigned ARMTargetLowering::getJumpTableEncoding() const { + return MachineJumpTableInfo::EK_Inline; +} + SDValue ARMTargetLowering::LowerBlockAddress(SDValue Op, SelectionDAG &DAG) const { MachineFunction &MF = DAG.getMachineFunction(); Modified: llvm/trunk/lib/Target/ARM/ARMISelLowering.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMISelLowering.h?rev=108722&r1=108721&r2=108722&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMISelLowering.h (original) +++ llvm/trunk/lib/Target/ARM/ARMISelLowering.h Mon Jul 19 12:18:28 2010 @@ -175,6 +175,8 @@ public: explicit ARMTargetLowering(TargetMachine &TM); + virtual unsigned getJumpTableEncoding(void) const; + virtual SDValue LowerOperation(SDValue Op, SelectionDAG &DAG) const; /// ReplaceNodeResults - Replace the results of node with an illegal result From grosbach at apple.com Mon Jul 19 12:19:40 2010 From: grosbach at apple.com (Jim Grosbach) Date: Mon, 19 Jul 2010 17:19:40 -0000 Subject: [llvm-commits] [llvm] r108727 - in /llvm/trunk/lib/Target/ARM: ARMISelLowering.cpp ARMISelLowering.h Message-ID: <20100719171940.8DDAB2A6C12C@llvm.org> Author: grosbach Date: Mon Jul 19 12:19:40 2010 New Revision: 108727 URL: http://llvm.org/viewvc/llvm-project?rev=108727&view=rev Log: revert so I can get the right PR# in the log message. Modified: llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp llvm/trunk/lib/Target/ARM/ARMISelLowering.h Modified: llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp?rev=108727&r1=108726&r2=108727&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp (original) +++ llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp Mon Jul 19 12:19:40 2010 @@ -1628,10 +1628,6 @@ return DAG.getNode(ARMISD::Wrapper, dl, MVT::i32, Res); } -unsigned ARMTargetLowering::getJumpTableEncoding() const { - return MachineJumpTableInfo::EK_Inline; -} - SDValue ARMTargetLowering::LowerBlockAddress(SDValue Op, SelectionDAG &DAG) const { MachineFunction &MF = DAG.getMachineFunction(); Modified: llvm/trunk/lib/Target/ARM/ARMISelLowering.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMISelLowering.h?rev=108727&r1=108726&r2=108727&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMISelLowering.h (original) +++ llvm/trunk/lib/Target/ARM/ARMISelLowering.h Mon Jul 19 12:19:40 2010 @@ -175,8 +175,6 @@ public: explicit ARMTargetLowering(TargetMachine &TM); - virtual unsigned getJumpTableEncoding(void) const; - virtual SDValue LowerOperation(SDValue Op, SelectionDAG &DAG) const; /// ReplaceNodeResults - Replace the results of node with an illegal result From grosbach at apple.com Mon Jul 19 12:20:38 2010 From: grosbach at apple.com (Jim Grosbach) Date: Mon, 19 Jul 2010 17:20:38 -0000 Subject: [llvm-commits] [llvm] r108730 - in /llvm/trunk/lib/Target/ARM: ARMISelLowering.cpp ARMISelLowering.h Message-ID: <20100719172038.469F82A6C12C@llvm.org> Author: grosbach Date: Mon Jul 19 12:20:38 2010 New Revision: 108730 URL: http://llvm.org/viewvc/llvm-project?rev=108730&view=rev Log: Since ARM emits inline jump tables as part of the ConstantIsland pass, it should set the jump table encloding the EK_Inline. This prevents a second, unused, copy of the table from being emitted after the function body. PR6581. Modified: llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp llvm/trunk/lib/Target/ARM/ARMISelLowering.h Modified: llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp?rev=108730&r1=108729&r2=108730&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp (original) +++ llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp Mon Jul 19 12:20:38 2010 @@ -1628,6 +1628,10 @@ return DAG.getNode(ARMISD::Wrapper, dl, MVT::i32, Res); } +unsigned ARMTargetLowering::getJumpTableEncoding() const { + return MachineJumpTableInfo::EK_Inline; +} + SDValue ARMTargetLowering::LowerBlockAddress(SDValue Op, SelectionDAG &DAG) const { MachineFunction &MF = DAG.getMachineFunction(); Modified: llvm/trunk/lib/Target/ARM/ARMISelLowering.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMISelLowering.h?rev=108730&r1=108729&r2=108730&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMISelLowering.h (original) +++ llvm/trunk/lib/Target/ARM/ARMISelLowering.h Mon Jul 19 12:20:38 2010 @@ -175,6 +175,8 @@ public: explicit ARMTargetLowering(TargetMachine &TM); + virtual unsigned getJumpTableEncoding(void) const; + virtual SDValue LowerOperation(SDValue Op, SelectionDAG &DAG) const; /// ReplaceNodeResults - Replace the results of node with an illegal result From dalej at apple.com Mon Jul 19 12:40:16 2010 From: dalej at apple.com (Dale Johannesen) Date: Mon, 19 Jul 2010 10:40:16 -0700 Subject: [llvm-commits] [llvm-gcc-4.2] r108554 - /llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp In-Reply-To: <0AD86F36-DA36-43F9-84EF-FB2DD517C18D@apple.com> References: <20100716210032.1BE872A6C12C@llvm.org> <0AD86F36-DA36-43F9-84EF-FB2DD517C18D@apple.com> Message-ID: On Jul 19, 2010, at 9:20 AMPDT, Bob Wilson wrote: > Dale, I don't think this is correct, at least for ARM. The 'p' > constraint is for a memory address, not the actual memory > reference. If I remember correctly, the use of this reported in > pr4521 was kind of questionable, and I haven't yet looked in any > detail at pr5314 and pr5533. Maybe we can talk about this in person > sometime today. It wouldn't surprise me if "p" isn't completely correct yet; inline asm is implemented incrementally as bugs are found in it. I believe this one is an improvement, but could be wrong. Do you know of anything it breaks? > On Jul 16, 2010, at 2:00 PM, Dale Johannesen wrote: > >> Author: johannes >> Date: Fri Jul 16 16:00:31 2010 >> New Revision: 108554 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=108554&view=rev >> Log: >> "p" constraint is a form of "m", not "r". PR 5314. >> >> >> Modified: >> llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp >> >> Modified: llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp >> URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp?rev=108554&r1=108553&r2=108554&view=diff >> = >> = >> = >> = >> = >> = >> = >> = >> = >> ===================================================================== >> --- llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp (original) >> +++ llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp Fri Jul 16 16:00:31 2010 >> @@ -4429,12 +4429,11 @@ >> continue; >> } >> >> - // Translate 'p' to 'r'. This is supposed to check for a >> valid memory >> + // Translate 'p' to 'm'. This is supposed to check for a >> valid memory >> // address, but for inline assembly there is no way to know the >> mode of >> - // the data being addressed. Assume that a general register >> is always >> - // a valid address. >> + // the data being addressed. >> if (ConstraintChar == 'p') >> - ConstraintChar = 'r'; >> + ConstraintChar = 'm'; >> >> // See if this is a regclass constraint. >> unsigned RegClass; >> >> >> _______________________________________________ >> 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 Jul 19 12:53:55 2010 From: dpatel at apple.com (Devang Patel) Date: Mon, 19 Jul 2010 17:53:55 -0000 Subject: [llvm-commits] [llvm] r108731 - in /llvm/trunk: lib/CodeGen/AsmPrinter/DwarfDebug.cpp test/DebugInfo/2010-07-19-Crash.ll Message-ID: <20100719175355.653482A6C12C@llvm.org> Author: dpatel Date: Mon Jul 19 12:53:55 2010 New Revision: 108731 URL: http://llvm.org/viewvc/llvm-project?rev=108731&view=rev Log: Fix PR 7662. Do not try to insert local variable info to a DIE used for function declaration. Added: llvm/trunk/test/DebugInfo/2010-07-19-Crash.ll 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=108731&r1=108730&r2=108731&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original) +++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Mon Jul 19 12:53:55 2010 @@ -2032,6 +2032,7 @@ if (!SP.Verify()) continue; // Collect info for variables that were optimized out. + if (!SP.isDefinition()) continue; StringRef FName = SP.getLinkageName(); if (FName.empty()) FName = SP.getName(); Added: llvm/trunk/test/DebugInfo/2010-07-19-Crash.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/2010-07-19-Crash.ll?rev=108731&view=auto ============================================================================== --- llvm/trunk/test/DebugInfo/2010-07-19-Crash.ll (added) +++ llvm/trunk/test/DebugInfo/2010-07-19-Crash.ll Mon Jul 19 12:53:55 2010 @@ -0,0 +1,24 @@ +; RUN: llc -o /dev/null < %s +; PR7662 +; Do not add variables to !11 because it is a declaration entry. + +define i32 @bar() nounwind readnone ssp { +entry: + ret i32 42, !dbg !9 +} + +!llvm.dbg.sp = !{!0, !6, !11} +!llvm.dbg.lv.foo = !{!7} + +!0 = metadata !{i32 524334, i32 0, metadata !1, metadata !"bar", metadata !"bar", metadata !"bar", metadata !1, i32 3, metadata !3, i1 false, i1 true, i32 0, i32 0, null, i1 false, i1 true, i32 ()* @bar} ; [ DW_TAG_subprogram ] +!1 = metadata !{i32 524329, metadata !"one.c", metadata !"/private/tmp", metadata !2} ; [ DW_TAG_file_type ] +!2 = metadata !{i32 524305, i32 0, i32 12, metadata !"one.c", metadata !".", metadata !"clang 2.8", i1 true, i1 true, metadata !"", i32 0} ; [ DW_TAG_compile_unit ] +!3 = metadata !{i32 524309, metadata !1, metadata !"", metadata !1, i32 0, i64 0, i64 0, i64 0, i32 0, null, metadata !4, i32 0, null} ; [ DW_TAG_subroutine_type ] +!4 = metadata !{metadata !5} +!5 = metadata !{i32 524324, metadata !1, metadata !"int", metadata !1, i32 0, i64 32, i64 32, i64 0, i32 0, i32 5} ; [ DW_TAG_base_type ] +!6 = metadata !{i32 524334, i32 0, metadata !1, metadata !"foo", metadata !"foo", metadata !"foo", metadata !1, i32 7, metadata !3, i1 true, i1 true, i32 0, i32 0, null, i1 false, i1 true, null} ; [ DW_TAG_subprogram ] +!11 = metadata !{i32 524334, i32 0, metadata !1, metadata !"foo", metadata !"foo", metadata !"foo", metadata !1, i32 7, metadata !3, i1 true, i1 false, i32 0, i32 0, null, i1 false, i1 true, null} ; [ DW_TAG_subprogram ] +!7 = metadata !{i32 524544, metadata !8, metadata !"one", metadata !1, i32 8, metadata !5} ; [ DW_TAG_auto_variable ] +!8 = metadata !{i32 524299, metadata !6, i32 7, i32 18} ; [ DW_TAG_lexical_block ] +!9 = metadata !{i32 4, i32 3, metadata !10, null} +!10 = metadata !{i32 524299, metadata !0, i32 3, i32 11} ; [ DW_TAG_lexical_block ] From dalej at apple.com Mon Jul 19 12:56:21 2010 From: dalej at apple.com (Dale Johannesen) Date: Mon, 19 Jul 2010 10:56:21 -0700 Subject: [llvm-commits] [llvm] r108639 - /llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp In-Reply-To: <2AD332F8-BCA8-44CA-89B6-F957DE67F33E@apple.com> References: <20100718084754.EB5022A6C12C@llvm.org> <9A1C9E46-38B4-4B1E-9B56-2DA374BF9E8A@apple.com> <15083EB0-FA01-4730-88DF-2B92CB0FB549@mac.com> <93873D0A-7686-47FD-8B2B-EEB48F83226D@mac.com> <74CCA0EE-E64A-4FD9-B697-CF4E6D2CE1C3@apple.com> <8E04AB0D-30A8-4A52-9D6B-3CB0F0FB3F96@mac.com> <2AD332F8-BCA8-44CA-89B6-F957DE67F33E@apple.com> Message-ID: On Jul 18, 2010, at 1:12 PMPDT, Chris Lattner wrote: > On Jul 18, 2010, at 1:02 PM, Owen Anderson wrote: > On Jul 18, 2010, at 12:52 PM, Chris Lattner wrote: >>> >>> I would prefer for this to happen in InstCombiner::visitFPTrunc. >>> Both because we already have the infrastructure to do this there, >>> but also because your code only handles the -fno-math-errno case. >>> Normal calls to libm sqrt should be transformed, not just llvm.sqrt. >> >> Do we really want InstCombine assigning semantic value to random >> functions named sqrt()? I understand SimplifyLibCalls doing this, >> since it implicitly assumes that we're using libc, but I'm wary of >> making InstCombine assume it. > > Yes we do. When/if we support -fno-builtin-sqrt, we will do this by > adding a "not a builtin" function attribute, which optimizations > like this should listen to. This is adding the assumption that the source language is C-based, or otherwise has a sqrt (as Fortran). So far this assumption has been quarantined in SimplifyLibCalls. From clattner at apple.com Mon Jul 19 12:57:46 2010 From: clattner at apple.com (Chris Lattner) Date: Mon, 19 Jul 2010 10:57:46 -0700 Subject: [llvm-commits] [llvm] r108639 - /llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp In-Reply-To: References: <20100718084754.EB5022A6C12C@llvm.org> <9A1C9E46-38B4-4B1E-9B56-2DA374BF9E8A@apple.com> <15083EB0-FA01-4730-88DF-2B92CB0FB549@mac.com> <93873D0A-7686-47FD-8B2B-EEB48F83226D@mac.com> <74CCA0EE-E64A-4FD9-B697-CF4E6D2CE1C3@apple.com> <8E04AB0D-30A8-4A52-9D6B-3CB0F0FB3F96@mac.com> <2AD332F8-BCA8-44CA-89B6-F957DE67F33E@apple.com> Message-ID: On Jul 19, 2010, at 10:56 AM, Dale Johannesen wrote: > > On Jul 18, 2010, at 1:12 PMPDT, Chris Lattner wrote: > >> On Jul 18, 2010, at 1:02 PM, Owen Anderson wrote: >> On Jul 18, 2010, at 12:52 PM, Chris Lattner wrote: >>>> >>>> I would prefer for this to happen in InstCombiner::visitFPTrunc. Both because we already have the infrastructure to do this there, but also because your code only handles the -fno-math-errno case. Normal calls to libm sqrt should be transformed, not just llvm.sqrt. >>> >>> Do we really want InstCombine assigning semantic value to random functions named sqrt()? I understand SimplifyLibCalls doing this, since it implicitly assumes that we're using libc, but I'm wary of making InstCombine assume it. >> >> Yes we do. When/if we support -fno-builtin-sqrt, we will do this by adding a "not a builtin" function attribute, which optimizations like this should listen to. > > This is adding the assumption that the source language is C-based, No, this is just making the assumption that libm is in the address space. This is not true for kernels, but is true for just about every user application, no matter what language it is written in. > or otherwise has a sqrt (as Fortran). So far this assumption has been quarantined in SimplifyLibCalls. Yep, someone who cares should really implement -fno-builtin-foo support. -Chris From dalej at apple.com Mon Jul 19 13:22:06 2010 From: dalej at apple.com (Dale Johannesen) Date: Mon, 19 Jul 2010 18:22:06 -0000 Subject: [llvm-commits] [llvm-gcc-4.2] r108732 - /llvm-gcc-4.2/trunk/gcc/cp/decl.c Message-ID: <20100719182206.31E862A6C12C@llvm.org> Author: johannes Date: Mon Jul 19 13:22:06 2010 New Revision: 108732 URL: http://llvm.org/viewvc/llvm-project?rev=108732&view=rev Log: Apply another copy of the fix for 7729514 to the duplicate code in the C++ FE. 8195660. Modified: llvm-gcc-4.2/trunk/gcc/cp/decl.c Modified: llvm-gcc-4.2/trunk/gcc/cp/decl.c URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/cp/decl.c?rev=108732&r1=108731&r2=108732&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/cp/decl.c (original) +++ llvm-gcc-4.2/trunk/gcc/cp/decl.c Mon Jul 19 13:22:06 2010 @@ -377,7 +377,10 @@ /* Avoid crashing later. */ define_label (location, DECL_NAME (label)); } - else if (!TREE_USED (label)) +/* LLVM LOCAL begin 8204109 */ + else if (!TREE_USED (label) && + strncmp (IDENTIFIER_POINTER (DECL_NAME (label)), "LASM$", 5) != 0) +/* LLVM LOCAL end */ warning (OPT_Wunused_label, "label %q+D defined but not used", label); } From dalej at apple.com Mon Jul 19 13:22:40 2010 From: dalej at apple.com (Dale Johannesen) Date: Mon, 19 Jul 2010 18:22:40 -0000 Subject: [llvm-commits] [llvm] r108733 - /llvm/trunk/test/FrontendC++/2010-07-19-nowarn.cpp Message-ID: <20100719182240.ECAEC2A6C12C@llvm.org> Author: johannes Date: Mon Jul 19 13:22:40 2010 New Revision: 108733 URL: http://llvm.org/viewvc/llvm-project?rev=108733&view=rev Log: Testcase for 108732 (8195660). Added: llvm/trunk/test/FrontendC++/2010-07-19-nowarn.cpp Added: llvm/trunk/test/FrontendC++/2010-07-19-nowarn.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/FrontendC%2B%2B/2010-07-19-nowarn.cpp?rev=108733&view=auto ============================================================================== --- llvm/trunk/test/FrontendC++/2010-07-19-nowarn.cpp (added) +++ llvm/trunk/test/FrontendC++/2010-07-19-nowarn.cpp Mon Jul 19 13:22:40 2010 @@ -0,0 +1,21 @@ +// RUN: %llvmgcc %s -c -m32 -fasm-blocks -o /dev/null +// This should not warn about unreferenced label. 8195660. +// XFAIL: * +// XTARGET: x86,i386,i686 + +void quarterAsm(int array[], int len) +{ + __asm + { + mov esi, array; + mov ecx, len; + shr ecx, 2; +loop: + movdqa xmm0, [esi]; + psrad xmm0, 2; + movdqa [esi], xmm0; + add esi, 16; + sub ecx, 1; + jnz loop; + } +} From xerxes at zafena.se Mon Jul 19 13:32:18 2010 From: xerxes at zafena.se (Xerxes Ranby) Date: Mon, 19 Jul 2010 20:32:18 +0200 Subject: [llvm-commits] [patch] v2 PR7608 ARMv4 JIT forgets to set the lr register when making a indirect function call In-Reply-To: References: <4C3A4388.1040703@zafena.se> <4C3B79BF.3080303@zafena.se> Message-ID: <4C449A32.7060101@zafena.se> Bob Wilson wrote: > On Jul 12, 2010, at 1:23 PM, Xerxes Ranby wrote: > >> Bob Wilson wrote: >> >>> I don't think this is good enough. The "mov lr, pc" instruction must be emitted immediately before the call. I don't know how to do that without making all the "call_nolink" instructions into pseudo-instructions. >>> >> Where can I find documentation on what pseudo instructions are and how pseudo instructions can resolve this kind of situation? >> > > Look at ARMCodeEmitter::emitPseudoInstruction for some examples. Basically you would just change the "call_nolink" instructions to be marked as pseudo instructions and then add code to ARMCodeEmitter to generate both the "mov lr, pc" and "bx" instructions together Hi I have attached a new patch that basicaly implements what Bob suggested, thank you Bob, it marks all the ARM "call_nolink" instructions as pseudo instructions and adds code to ARMCodeEmitter to generate both the "mov lr, pc" and the branch instructions together. My own testing indicates that this work very well and fixes the PR7608 bug without introducing any new test regressions. Index: llvm/lib/Target/ARM/ARMInstrInfo.td =================================================================== --- llvm.orig/lib/Target/ARM/ARMInstrInfo.td 2010-07-13 17:41:01.000000000 +0200 +++ llvm/lib/Target/ARM/ARMInstrInfo.td 2010-07-19 17:11:19.000000000 +0200 @@ -961,7 +961,7 @@ // ARMv4T // Note: Restrict $func to the tGPR regclass to prevent it being in LR. - def BX : ABXIx2<(outs), (ins tGPR:$func, variable_ops), + def BX : PseudoInst<(outs), (ins tGPR:$func, variable_ops), IIC_Br, "mov\tlr, pc\n\tbx\t$func", [(ARMcall_nolink tGPR:$func)]>, Requires<[IsARM, HasV4T, IsNotDarwin]> { @@ -971,7 +971,7 @@ } // ARMv4 - def BMOVPCRX : ABXIx2<(outs), (ins tGPR:$func, variable_ops), + def BMOVPCRX : PseudoInst<(outs), (ins tGPR:$func, variable_ops), IIC_Br, "mov\tlr, pc\n\tmov\tpc, $func", [(ARMcall_nolink tGPR:$func)]>, Requires<[IsARM, NoV4T, IsNotDarwin]> { @@ -1010,7 +1010,7 @@ // ARMv4T // Note: Restrict $func to the tGPR regclass to prevent it being in LR. - def BXr9 : ABXIx2<(outs), (ins tGPR:$func, variable_ops), + def BXr9 : PseudoInst<(outs), (ins tGPR:$func, variable_ops), IIC_Br, "mov\tlr, pc\n\tbx\t$func", [(ARMcall_nolink tGPR:$func)]>, Requires<[IsARM, HasV4T, IsDarwin]> { @@ -1020,7 +1020,7 @@ } // ARMv4 - def BMOVPCRXr9 : ABXIx2<(outs), (ins tGPR:$func, variable_ops), + def BMOVPCRXr9 : PseudoInst<(outs), (ins tGPR:$func, variable_ops), IIC_Br, "mov\tlr, pc\n\tmov\tpc, $func", [(ARMcall_nolink tGPR:$func)]>, Requires<[IsARM, NoV4T, IsDarwin]> { Index: llvm/lib/Target/ARM/ARMCodeEmitter.cpp =================================================================== --- llvm.orig/lib/Target/ARM/ARMCodeEmitter.cpp 2010-07-13 17:41:01.000000000 +0200 +++ llvm/lib/Target/ARM/ARMCodeEmitter.cpp 2010-07-19 17:20:26.000000000 +0200 @@ -654,6 +654,16 @@ switch (Opcode) { default: llvm_unreachable("ARMCodeEmitter::emitPseudoInstruction"); + case ARM::BX: + case ARM::BMOVPCRX: + case ARM::BXr9: + case ARM::BMOVPCRXr9: { + // First emit mov lr, pc + emitWordLE(0xe1a0e00f); + // and then emit the branch. + emitMiscBranchInstruction(MI); + break; + } case TargetOpcode::INLINEASM: { // We allow inline assembler nodes with empty bodies - they can // implicitly define registers, which is ok for JIT. Ok to push? Cheers Xerxes -------------- next part -------------- A non-text attachment was scrubbed... Name: rawMOVLRPC.patch Type: text/x-patch Size: 2515 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20100719/010f3356/attachment.bin From stoklund at 2pi.dk Mon Jul 19 13:41:20 2010 From: stoklund at 2pi.dk (Jakob Stoklund Olesen) Date: Mon, 19 Jul 2010 18:41:20 -0000 Subject: [llvm-commits] [llvm] r108734 - in /llvm/trunk/lib/CodeGen: InlineSpiller.cpp RegAllocLinearScan.cpp Spiller.cpp Spiller.h Message-ID: <20100719184120.B0C062A6C12C@llvm.org> Author: stoklund Date: Mon Jul 19 13:41:20 2010 New Revision: 108734 URL: http://llvm.org/viewvc/llvm-project?rev=108734&view=rev Log: Spillers may alter MachineLoopInfo when breaking critical edges, so make it non-const. Modified: llvm/trunk/lib/CodeGen/InlineSpiller.cpp llvm/trunk/lib/CodeGen/RegAllocLinearScan.cpp llvm/trunk/lib/CodeGen/Spiller.cpp llvm/trunk/lib/CodeGen/Spiller.h Modified: llvm/trunk/lib/CodeGen/InlineSpiller.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/InlineSpiller.cpp?rev=108734&r1=108733&r2=108734&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/InlineSpiller.cpp (original) +++ llvm/trunk/lib/CodeGen/InlineSpiller.cpp Mon Jul 19 13:41:20 2010 @@ -18,6 +18,7 @@ #include "llvm/CodeGen/LiveIntervalAnalysis.h" #include "llvm/CodeGen/MachineFrameInfo.h" #include "llvm/CodeGen/MachineFunction.h" +#include "llvm/CodeGen/MachineLoopInfo.h" #include "llvm/CodeGen/MachineRegisterInfo.h" #include "llvm/Target/TargetMachine.h" #include "llvm/Target/TargetInstrInfo.h" @@ -30,6 +31,7 @@ class InlineSpiller : public Spiller { MachineFunction &mf_; LiveIntervals &lis_; + MachineLoopInfo &loops_; VirtRegMap &vrm_; MachineFrameInfo &mfi_; MachineRegisterInfo &mri_; @@ -53,8 +55,9 @@ ~InlineSpiller() {} public: - InlineSpiller(MachineFunction *mf, LiveIntervals *lis, VirtRegMap *vrm) - : mf_(*mf), lis_(*lis), vrm_(*vrm), + InlineSpiller(MachineFunction *mf, LiveIntervals *lis, MachineLoopInfo *mli, + VirtRegMap *vrm) + : mf_(*mf), lis_(*lis), loops_(*mli), vrm_(*vrm), mfi_(*mf->getFrameInfo()), mri_(mf->getRegInfo()), tii_(*mf->getTarget().getInstrInfo()), @@ -82,9 +85,9 @@ namespace llvm { Spiller *createInlineSpiller(MachineFunction *mf, LiveIntervals *lis, - const MachineLoopInfo *mli, + MachineLoopInfo *mli, VirtRegMap *vrm) { - return new InlineSpiller(mf, lis, vrm); + return new InlineSpiller(mf, lis, mli, vrm); } } Modified: llvm/trunk/lib/CodeGen/RegAllocLinearScan.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RegAllocLinearScan.cpp?rev=108734&r1=108733&r2=108734&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/RegAllocLinearScan.cpp (original) +++ llvm/trunk/lib/CodeGen/RegAllocLinearScan.cpp Mon Jul 19 13:41:20 2010 @@ -127,7 +127,7 @@ BitVector allocatableRegs_; LiveIntervals* li_; LiveStacks* ls_; - const MachineLoopInfo *loopInfo; + MachineLoopInfo *loopInfo; /// handled_ - Intervals are added to the handled_ set in the order of their /// start value. This is uses for backtracking. @@ -799,7 +799,7 @@ static float getConflictWeight(LiveInterval *cur, unsigned Reg, LiveIntervals *li_, MachineRegisterInfo *mri_, - const MachineLoopInfo *loopInfo) { + MachineLoopInfo *loopInfo) { float Conflicts = 0; for (MachineRegisterInfo::reg_iterator I = mri_->reg_begin(Reg), E = mri_->reg_end(); I != E; ++I) { Modified: llvm/trunk/lib/CodeGen/Spiller.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/Spiller.cpp?rev=108734&r1=108733&r2=108734&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/Spiller.cpp (original) +++ llvm/trunk/lib/CodeGen/Spiller.cpp Mon Jul 19 13:41:20 2010 @@ -193,10 +193,10 @@ class StandardSpiller : public Spiller { protected: LiveIntervals *lis; - const MachineLoopInfo *loopInfo; + MachineLoopInfo *loopInfo; VirtRegMap *vrm; public: - StandardSpiller(LiveIntervals *lis, const MachineLoopInfo *loopInfo, + StandardSpiller(LiveIntervals *lis, MachineLoopInfo *loopInfo, VirtRegMap *vrm) : lis(lis), loopInfo(loopInfo), vrm(vrm) {} @@ -222,7 +222,7 @@ class SplittingSpiller : public StandardSpiller { public: SplittingSpiller(MachineFunction *mf, LiveIntervals *lis, - const MachineLoopInfo *loopInfo, VirtRegMap *vrm) + MachineLoopInfo *loopInfo, VirtRegMap *vrm) : StandardSpiller(lis, loopInfo, vrm) { mri = &mf->getRegInfo(); @@ -508,12 +508,12 @@ namespace llvm { Spiller *createInlineSpiller(MachineFunction*, LiveIntervals*, - const MachineLoopInfo*, + MachineLoopInfo*, VirtRegMap*); } llvm::Spiller* llvm::createSpiller(MachineFunction *mf, LiveIntervals *lis, - const MachineLoopInfo *loopInfo, + MachineLoopInfo *loopInfo, VirtRegMap *vrm) { switch (spillerOpt) { default: assert(0 && "unknown spiller"); Modified: llvm/trunk/lib/CodeGen/Spiller.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/Spiller.h?rev=108734&r1=108733&r2=108734&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/Spiller.h (original) +++ llvm/trunk/lib/CodeGen/Spiller.h Mon Jul 19 13:41:20 2010 @@ -51,7 +51,7 @@ /// Create and return a spiller object, as specified on the command line. Spiller* createSpiller(MachineFunction *mf, LiveIntervals *li, - const MachineLoopInfo *loopInfo, VirtRegMap *vrm); + MachineLoopInfo *loopInfo, VirtRegMap *vrm); } #endif From evan.cheng at apple.com Mon Jul 19 13:47:01 2010 From: evan.cheng at apple.com (Evan Cheng) Date: Mon, 19 Jul 2010 18:47:01 -0000 Subject: [llvm-commits] [llvm] r108735 - in /llvm/trunk: include/llvm/Target/TargetLowering.h lib/CodeGen/SelectionDAG/TargetLowering.cpp Message-ID: <20100719184701.BD0E92A6C12C@llvm.org> Author: evancheng Date: Mon Jul 19 13:47:01 2010 New Revision: 108735 URL: http://llvm.org/viewvc/llvm-project?rev=108735&view=rev Log: Teach computeRegisterProperties() to compute "representative" register class for legal value types. A "representative" register class is the largest legal super-reg register class for a value type. e.g. On i386, GR32 is the rep register class for i8 / i16 / i32; on x86_64 it would be GR64. This property will be used by the register pressure tracking instruction scheduler. Modified: llvm/trunk/include/llvm/Target/TargetLowering.h llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp Modified: llvm/trunk/include/llvm/Target/TargetLowering.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetLowering.h?rev=108735&r1=108734&r2=108735&view=diff ============================================================================== --- llvm/trunk/include/llvm/Target/TargetLowering.h (original) +++ llvm/trunk/include/llvm/Target/TargetLowering.h Mon Jul 19 13:47:01 2010 @@ -168,6 +168,18 @@ return RC; } + /// getRepRegClassFor - Return the 'representative' register class for the + /// specified value type. The 'representative' register class is the largest + /// legal super-reg register class for the register class of the value type. + /// For example, on i386 the rep register class for i8, i16, and i32 are GR32; + /// while the rep register class is GR64 on x86_64. + virtual const TargetRegisterClass *getRepRegClassFor(EVT VT) const { + assert(VT.isSimple() && "getRegClassFor called on illegal type!"); + const TargetRegisterClass *RC = RepRegClassForVT[VT.getSimpleVT().SimpleTy]; + assert(RC && "This value type is not natively supported!"); + return RC; + } + /// isTypeLegal - Return true if the target has native support for the /// specified value type. This means that it has a register that directly /// holds it without promotions or expansions. @@ -1562,6 +1574,12 @@ unsigned char NumRegistersForVT[MVT::LAST_VALUETYPE]; EVT RegisterTypeForVT[MVT::LAST_VALUETYPE]; + /// RepRegClassForVT - This indicates the "representative" register class to + /// use for each ValueType the target supports natively. This information is + /// used by the scheduler to track register pressure. e.g. On x86, i8, i16, + /// and i32's representative class would be GR32. + const TargetRegisterClass *RepRegClassForVT[MVT::LAST_VALUETYPE]; + /// Synthesizable indicates whether it is OK for the compiler to create new /// operations using this type. All Legal types are Synthesizable except /// MMX types on X86. Non-Legal types are not Synthesizable. @@ -1672,6 +1690,20 @@ /// This field specifies whether the target can benefit from code placement /// optimization. bool benefitFromCodePlacementOpt; + +private: + /// isLegalRC - Return true if the value types that can be represented by the + /// specified register class are all legal. + bool isLegalRC(const TargetRegisterClass *RC) const; + + /// hasLegalSuperRegRegClasses - Return true if the specified register class + /// has one or more super-reg register classes that are legal. + bool hasLegalSuperRegRegClasses(const TargetRegisterClass *RC); + + /// findRepresentativeClass - Return the largest legal super-reg register class + /// of the specified register class. + const TargetRegisterClass * + findRepresentativeClass(const TargetRegisterClass *RC); }; /// GetReturnInfo - Given an LLVM IR type and return type attributes, Modified: llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp?rev=108735&r1=108734&r2=108735&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp Mon Jul 19 13:47:01 2010 @@ -651,6 +651,50 @@ return NumVectorRegs; } +/// isLegalRC - Return true if the value types that can be represented by the +/// specified register class are all legal. +bool TargetLowering::isLegalRC(const TargetRegisterClass *RC) const { + for (TargetRegisterClass::vt_iterator I = RC->vt_begin(), E = RC->vt_end(); + I != E; ++I) { + if (isTypeLegal(*I)) + return true; + } + return false; +} + +/// hasLegalSuperRegRegClasses - Return true if the specified register class +/// has one or more super-reg register classes that are legal. +bool TargetLowering::hasLegalSuperRegRegClasses(const TargetRegisterClass *RC) { + if (*RC->superregclasses_begin() == 0) + return false; + for (TargetRegisterInfo::regclass_iterator I = RC->superregclasses_begin(), + E = RC->superregclasses_end(); I != E; ++I) { + const TargetRegisterClass *RRC = *I; + if (isLegalRC(RRC)) + return true; + } + return false; +} + +/// findRepresentativeClass - Return the largest legal super-reg register class +/// of the specified register class. +const TargetRegisterClass * +TargetLowering::findRepresentativeClass(const TargetRegisterClass *RC) { + if (!RC) return 0; + + const TargetRegisterClass *BestRC = RC; + for (TargetRegisterInfo::regclass_iterator I = RC->superregclasses_begin(), + E = RC->superregclasses_end(); I != E; ++I) { + const TargetRegisterClass *RRC = *I; + if (RRC->isASubClass() || !isLegalRC(RRC)) + continue; + if (!hasLegalSuperRegRegClasses(RRC)) + return RRC; + BestRC = RRC; + } + return BestRC; +} + /// computeRegisterProperties - Once all of the register classes are added, /// this allows us to compute derived properties we expose. void TargetLowering::computeRegisterProperties() { @@ -770,6 +814,14 @@ } } } + + // Determine the 'representative' register class for each value type. + // An representative register class is the largest (meaning one which is + // not a sub-register class / subreg register class) legal register class for + // a group of value types. For example, on i386, i8, i16, and i32 + // representative would be GR32; while on x86_64 it's GR64. + for (unsigned i = 0; i != MVT::LAST_VALUETYPE; ++i) + RepRegClassForVT[i] = findRepresentativeClass(RegClassForVT[i]); } const char *TargetLowering::getTargetNodeName(unsigned Opcode) const { From resistor at mac.com Mon Jul 19 14:23:33 2010 From: resistor at mac.com (Owen Anderson) Date: Mon, 19 Jul 2010 19:23:33 -0000 Subject: [llvm-commits] [llvm] r108736 - /llvm/trunk/lib/Transforms/InstCombine/InstCombineCasts.cpp Message-ID: <20100719192333.1B6132A6C12C@llvm.org> Author: resistor Date: Mon Jul 19 14:23:32 2010 New Revision: 108736 URL: http://llvm.org/viewvc/llvm-project?rev=108736&view=rev Log: Tweak per Chris' comments. Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineCasts.cpp Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineCasts.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstCombineCasts.cpp?rev=108736&r1=108735&r2=108736&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/InstCombine/InstCombineCasts.cpp (original) +++ llvm/trunk/lib/Transforms/InstCombine/InstCombineCasts.cpp Mon Jul 19 14:23:32 2010 @@ -1106,19 +1106,20 @@ Call->getNumArgOperands() == 1) { CastInst *Arg = dyn_cast(Call->getArgOperand(0)); if (Arg && Arg->getOpcode() == Instruction::FPExt && - CI.getType() == Builder->getFloatTy() && - Call->getType() == Builder->getDoubleTy() && - Arg->getType() == Builder->getDoubleTy() && - Arg->getOperand(0)->getType() == Builder->getFloatTy()) { - Module* M = CI.getParent()->getParent()->getParent(); + CI.getType()->isFloatTy() && + Call->getType()->isDoubleTy() && + Arg->getType()->isDoubleTy() && + Arg->getOperand(0)->getType()->isFloatTy()) { + Function *Callee = Call->getCalledFunction(); + Module *M = CI.getParent()->getParent()->getParent(); Constant* SqrtfFunc = M->getOrInsertFunction("sqrtf", - Call->getAttributes(), + Callee->getAttributes(), Builder->getFloatTy(), Builder->getFloatTy(), NULL); CallInst *ret = CallInst::Create(SqrtfFunc, Arg->getOperand(0), "sqrtfcall"); - ret->setAttributes(Call->getAttributes()); + ret->setAttributes(Callee->getAttributes()); return ret; } } From resistor at mac.com Mon Jul 19 14:24:38 2010 From: resistor at mac.com (Owen Anderson) Date: Mon, 19 Jul 2010 19:24:38 -0000 Subject: [llvm-commits] [llvm] r108737 - /llvm/trunk/autoconf/configure.ac Message-ID: <20100719192438.114CC2A6C12C@llvm.org> Author: resistor Date: Mon Jul 19 14:24:37 2010 New Revision: 108737 URL: http://llvm.org/viewvc/llvm-project?rev=108737&view=rev Log: Add support for detecting and the getsect() function. Modified: llvm/trunk/autoconf/configure.ac Modified: llvm/trunk/autoconf/configure.ac URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/autoconf/configure.ac?rev=108737&r1=108736&r2=108737&view=diff ============================================================================== --- llvm/trunk/autoconf/configure.ac (original) +++ llvm/trunk/autoconf/configure.ac Mon Jul 19 14:24:37 2010 @@ -1287,6 +1287,9 @@ dnl Try to find Darwin specific crash reporting library. AC_CHECK_HEADERS([CrashReporterClient.h]) +dnl Try to find Darwin specific linker-section library. +AC_CHECK_HEADERS([mach-o/getsect.h]) + dnl===-----------------------------------------------------------------------=== dnl=== dnl=== SECTION 7: Check for types and structures @@ -1362,6 +1365,22 @@ AC_DEFINE(LLVM_MULTITHREADED, 0, Build multithreading support into LLVM) AC_MSG_WARN([LLVM will be built thread-unsafe because atomic builtins are missing])) +dnl Check for Darwin-specific getsect(). +AC_MSG_CHECKING(for getsect()) +AC_COMPILE_IFELSE( + AC_LANG_SOURCE( + [[#include + int main() { + unsigned long p; + return (int)getsect("__DATA","??__pass_info", &p); + } + ]]), + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_GETSECT, 1, Have Darwin getsect() support), + AC_MSG_RESULT(no) + AC_DEFINE(HAVE_GETSECT, 1, Have Darwin getsect() support) +) + dnl===-----------------------------------------------------------------------=== dnl=== From resistor at mac.com Mon Jul 19 14:24:55 2010 From: resistor at mac.com (Owen Anderson) Date: Mon, 19 Jul 2010 19:24:55 -0000 Subject: [llvm-commits] [llvm] r108738 - in /llvm/trunk: configure include/llvm/Config/config.h.in Message-ID: <20100719192455.A60862A6C12C@llvm.org> Author: resistor Date: Mon Jul 19 14:24:55 2010 New Revision: 108738 URL: http://llvm.org/viewvc/llvm-project?rev=108738&view=rev Log: Regenerate. Modified: llvm/trunk/configure llvm/trunk/include/llvm/Config/config.h.in Modified: llvm/trunk/configure URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/configure?rev=108738&r1=108737&r2=108738&view=diff ============================================================================== --- llvm/trunk/configure (original) +++ llvm/trunk/configure Mon Jul 19 14:24:55 2010 @@ -17120,6 +17120,176 @@ +for ac_header in mach-o/getsect.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ----------------------------------- ## +## Report this to llvmbugs at cs.uiuc.edu ## +## ----------------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + { echo "$as_me:$LINENO: checking for HUGE_VAL sanity" >&5 @@ -20066,6 +20236,78 @@ rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext +{ echo "$as_me:$LINENO: checking for getsect()" >&5 +echo $ECHO_N "checking for getsect()... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + int main() { + unsigned long p; + return (int)getsect("__DATA","??__pass_info", &p); + } + +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_GETSECT 1 +_ACEOF + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_GETSECT 1 +_ACEOF + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if test "$llvm_cv_os_type" = "Linux" -a "$llvm_cv_target_arch" = "x86_64" ; then Modified: llvm/trunk/include/llvm/Config/config.h.in URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Config/config.h.in?rev=108738&r1=108737&r2=108738&view=diff ============================================================================== --- llvm/trunk/include/llvm/Config/config.h.in (original) +++ llvm/trunk/include/llvm/Config/config.h.in Mon Jul 19 14:24:55 2010 @@ -145,6 +145,9 @@ /* Define to 1 if you have the `getrusage' function. */ #undef HAVE_GETRUSAGE +/* Have Darwin getsect() support */ +#undef HAVE_GETSECT + /* Define to 1 if you have the `gettimeofday' function. */ #undef HAVE_GETTIMEOFDAY @@ -218,6 +221,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_MACH_O_DYLD_H +/* Define to 1 if you have the header file. */ +#undef HAVE_MACH_O_GETSECT_H + /* Define if mallinfo() is available on this platform. */ #undef HAVE_MALLINFO From resistor at mac.com Mon Jul 19 14:41:53 2010 From: resistor at mac.com (Owen Anderson) Date: Mon, 19 Jul 2010 19:41:53 -0000 Subject: [llvm-commits] [llvm] r108739 - /llvm/trunk/autoconf/configure.ac Message-ID: <20100719194153.1C5962A6C12C@llvm.org> Author: resistor Date: Mon Jul 19 14:41:52 2010 New Revision: 108739 URL: http://llvm.org/viewvc/llvm-project?rev=108739&view=rev Log: Remove extraneous character. Modified: llvm/trunk/autoconf/configure.ac Modified: llvm/trunk/autoconf/configure.ac URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/autoconf/configure.ac?rev=108739&r1=108738&r2=108739&view=diff ============================================================================== --- llvm/trunk/autoconf/configure.ac (original) +++ llvm/trunk/autoconf/configure.ac Mon Jul 19 14:41:52 2010 @@ -1372,7 +1372,7 @@ [[#include int main() { unsigned long p; - return (int)getsect("__DATA","??__pass_info", &p); + return (int)getsect("__DATA","__pass_info", &p); } ]]), AC_MSG_RESULT(yes) From resistor at mac.com Mon Jul 19 14:42:02 2010 From: resistor at mac.com (Owen Anderson) Date: Mon, 19 Jul 2010 19:42:02 -0000 Subject: [llvm-commits] [llvm] r108740 - /llvm/trunk/configure Message-ID: <20100719194202.1ABB92A6C12C@llvm.org> Author: resistor Date: Mon Jul 19 14:42:01 2010 New Revision: 108740 URL: http://llvm.org/viewvc/llvm-project?rev=108740&view=rev Log: Regenerate. Modified: llvm/trunk/configure Modified: llvm/trunk/configure URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/configure?rev=108740&r1=108739&r2=108740&view=diff ============================================================================== --- llvm/trunk/configure (original) +++ llvm/trunk/configure Mon Jul 19 14:42:01 2010 @@ -20247,7 +20247,7 @@ #include int main() { unsigned long p; - return (int)getsect("__DATA","??__pass_info", &p); + return (int)getsect("__DATA","__pass_info", &p); } _ACEOF From stoklund at 2pi.dk Mon Jul 19 14:59:05 2010 From: stoklund at 2pi.dk (Jakob Stoklund Olesen) Date: Mon, 19 Jul 2010 12:59:05 -0700 Subject: [llvm-commits] [llvm] r108735 - in /llvm/trunk: include/llvm/Target/TargetLowering.h lib/CodeGen/SelectionDAG/TargetLowering.cpp In-Reply-To: <20100719184701.BD0E92A6C12C@llvm.org> References: <20100719184701.BD0E92A6C12C@llvm.org> Message-ID: On Jul 19, 2010, at 11:47 AM, Evan Cheng wrote: > Author: evancheng > Date: Mon Jul 19 13:47:01 2010 > New Revision: 108735 > > URL: http://llvm.org/viewvc/llvm-project?rev=108735&view=rev > Log: > Teach computeRegisterProperties() to compute "representative" register class for legal value types. A "representative" register class is the largest legal super-reg register class for a value type. e.g. On i386, GR32 is the rep register class for i8 / i16 / i32; on x86_64 it would be GR64. > > This property will be used by the register pressure tracking instruction scheduler. Hi Evan, This looks a lot like you have x86 in mind. What is getRepRegClassFor(f32) going to return on ARM? QQQQ? How are you planning to deal with registers with more than one usable subregister? /jakob From evan.cheng at apple.com Mon Jul 19 15:11:21 2010 From: evan.cheng at apple.com (Evan Cheng) Date: Mon, 19 Jul 2010 13:11:21 -0700 Subject: [llvm-commits] [llvm] r108735 - in /llvm/trunk: include/llvm/Target/TargetLowering.h lib/CodeGen/SelectionDAG/TargetLowering.cpp In-Reply-To: References: <20100719184701.BD0E92A6C12C@llvm.org> Message-ID: <8E57D391-E68A-4532-B780-2B6FB52F7C2E@apple.com> On Jul 19, 2010, at 12:59 PM, Jakob Stoklund Olesen wrote: > > On Jul 19, 2010, at 11:47 AM, Evan Cheng wrote: > >> Author: evancheng >> Date: Mon Jul 19 13:47:01 2010 >> New Revision: 108735 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=108735&view=rev >> Log: >> Teach computeRegisterProperties() to compute "representative" register class for legal value types. A "representative" register class is the largest legal super-reg register class for a value type. e.g. On i386, GR32 is the rep register class for i8 / i16 / i32; on x86_64 it would be GR64. >> >> This property will be used by the register pressure tracking instruction scheduler. > > Hi Evan, > > This looks a lot like you have x86 in mind. No. What is x86? :-) > > What is getRepRegClassFor(f32) going to return on ARM? QQQQ? QQ and QQQQ are not legal during isel. It's Q. It's probably overly conservative for tracking. I'm still trying to figure that out. > > How are you planning to deal with registers with more than one usable subregister? I am not sure what you mean? It's ignore sub-register classes (e.g. QPR_VFP2). Evan > > /jakob > From stoklund at 2pi.dk Mon Jul 19 15:22:15 2010 From: stoklund at 2pi.dk (Jakob Stoklund Olesen) Date: Mon, 19 Jul 2010 13:22:15 -0700 Subject: [llvm-commits] [llvm] r108735 - in /llvm/trunk: include/llvm/Target/TargetLowering.h lib/CodeGen/SelectionDAG/TargetLowering.cpp In-Reply-To: <8E57D391-E68A-4532-B780-2B6FB52F7C2E@apple.com> References: <20100719184701.BD0E92A6C12C@llvm.org> <8E57D391-E68A-4532-B780-2B6FB52F7C2E@apple.com> Message-ID: <52E5CF36-C5F1-4834-8A37-23D68A18268C@2pi.dk> On Jul 19, 2010, at 1:11 PM, Evan Cheng wrote: > > On Jul 19, 2010, at 12:59 PM, Jakob Stoklund Olesen wrote: > >> >> On Jul 19, 2010, at 11:47 AM, Evan Cheng wrote: >> >>> Author: evancheng >>> Date: Mon Jul 19 13:47:01 2010 >>> New Revision: 108735 >>> >>> URL: http://llvm.org/viewvc/llvm-project?rev=108735&view=rev >>> Log: >>> Teach computeRegisterProperties() to compute "representative" register class for legal value types. A "representative" register class is the largest legal super-reg register class for a value type. e.g. On i386, GR32 is the rep register class for i8 / i16 / i32; on x86_64 it would be GR64. >>> >>> This property will be used by the register pressure tracking instruction scheduler. >> >> Hi Evan, >> >> This looks a lot like you have x86 in mind. > > No. What is x86? :-) > >> >> What is getRepRegClassFor(f32) going to return on ARM? QQQQ? > > QQ and QQQQ are not legal during isel. It's Q. It's probably overly conservative for tracking. I'm still trying to figure that out. > > >> >> How are you planning to deal with registers with more than one usable subregister? > > I am not sure what you mean? It's ignore sub-register classes (e.g. QPR_VFP2). I meant the same as above - QPR only has 16 registers, but there are 32 DPR registers. If you are counting each DPR as a QPR, you are going to be scheduling as if you only had 16 DPR registers. Can you use some kind of scaling so a DPR counts as 0.5 QPR? From grosbach at apple.com Mon Jul 19 15:31:22 2010 From: grosbach at apple.com (Jim Grosbach) Date: Mon, 19 Jul 2010 20:31:22 -0000 Subject: [llvm-commits] [llvm-gcc-4.2] r108744 - /llvm-gcc-4.2/trunk/gcc/config/darwin.c Message-ID: <20100719203122.5E4E42A6C12C@llvm.org> Author: grosbach Date: Mon Jul 19 15:31:22 2010 New Revision: 108744 URL: http://llvm.org/viewvc/llvm-project?rev=108744&view=rev Log: Put ObjC method names, method types and class names in separate string literal sections. rdar://8199900 Modified: llvm-gcc-4.2/trunk/gcc/config/darwin.c Modified: llvm-gcc-4.2/trunk/gcc/config/darwin.c URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/config/darwin.c?rev=108744&r1=108743&r2=108744&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/config/darwin.c (original) +++ llvm-gcc-4.2/trunk/gcc/config/darwin.c Mon Jul 19 15:31:22 2010 @@ -1713,10 +1713,7 @@ else if (!strncmp (name, "PROP_NAME_ATTR_", 15)) return "__TEXT,__cstring,cstring_literals"; } else if (flag_objc_abi == 2) { - if (!strncmp (name, "PROP_NAME_ATTR_", 15) - || !strncmp (name, "CLASS_NAME_", 11) - || !strncmp (name, "METH_VAR_NAME_", 14) - || !strncmp (name, "METH_VAR_TYPE_", 14)) + if (!strncmp (name, "PROP_NAME_ATTR_", 15)) return "__TEXT,__cstring,cstring_literals"; else if (!strncmp (name, "CLASSLIST_REFERENCES_", 21)) return "__DATA, __objc_classrefs, regular, no_dead_strip"; @@ -1743,6 +1740,12 @@ else if (!strncmp (name, "CLASS_$_", 8) || !strncmp (name, "METACLASS_$_", 12)) return "__DATA, __objc_data"; + else if (!strncmp (name, "METH_VAR_NAME_", 14)) + return "__TEXT, __objc_methname, cstring_literals"; + else if (!strncmp (name, "METH_VAR_TYPE_", 14)) + return "__TEXT, __objc_methtype, cstring_literals"; + else if (!strncmp (name, "CLASS_NAME_", 11)) + return "__TEXT, __objc_classname, cstring_literals"; } return 0; } From bob.wilson at apple.com Mon Jul 19 15:36:36 2010 From: bob.wilson at apple.com (Bob Wilson) Date: Mon, 19 Jul 2010 20:36:36 -0000 Subject: [llvm-commits] [llvm-gcc-4.2] r108745 - /llvm-gcc-4.2/trunk/GNUmakefile Message-ID: <20100719203636.888A52A6C12C@llvm.org> Author: bwilson Date: Mon Jul 19 15:36:36 2010 New Revision: 108745 URL: http://llvm.org/viewvc/llvm-project?rev=108745&view=rev Log: Don't install libLTO.dylib as part of llvm-gcc. Radar 8169193. Modified: llvm-gcc-4.2/trunk/GNUmakefile Modified: llvm-gcc-4.2/trunk/GNUmakefile URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/GNUmakefile?rev=108745&r1=108744&r2=108745&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/GNUmakefile (original) +++ llvm-gcc-4.2/trunk/GNUmakefile Mon Jul 19 15:36:36 2010 @@ -93,7 +93,7 @@ SYMROOT=$(OBJROOT)/sym-llvmCore \ DSTROOT=$(OBJROOT)/dst-llvmCore llvmCore $(MAKE) LLVMCORE_PATH=$(OBJROOT)/dst-llvmCore/Developer/usr/local \ - INSTALL_LIBLTO=yes llvmgcc42 + INSTALL_LIBLTO=no llvmgcc42 llvmCore: $(OBJROOT) $(SYMROOT) $(DSTROOT) if [ ! -d $(SRC)/llvmCore ]; then \ From daniel at zuster.org Mon Jul 19 15:44:17 2010 From: daniel at zuster.org (Daniel Dunbar) Date: Mon, 19 Jul 2010 20:44:17 -0000 Subject: [llvm-commits] [llvm] r108746 - in /llvm/trunk: lib/Target/X86/X86Instr64bit.td lib/Target/X86/X86InstrInfo.td test/MC/AsmParser/X86/x86_32-new-encoder.s test/MC/AsmParser/X86/x86_64-new-encoder.s Message-ID: <20100719204417.36B182A6C12C@llvm.org> Author: ddunbar Date: Mon Jul 19 15:44:16 2010 New Revision: 108746 URL: http://llvm.org/viewvc/llvm-project?rev=108746&view=rev Log: X86: Mark JMP{32,64}[mr] as requires 32-bit/64-bit mode. They are the same instruction, we only want to allow the one for the current subtarget. - This also fixes suffix matching for jmp instructions, because it eliminates the ambiguity between 'jmpl' and 'jmpq'. Modified: llvm/trunk/lib/Target/X86/X86Instr64bit.td llvm/trunk/lib/Target/X86/X86InstrInfo.td llvm/trunk/test/MC/AsmParser/X86/x86_32-new-encoder.s llvm/trunk/test/MC/AsmParser/X86/x86_64-new-encoder.s Modified: llvm/trunk/lib/Target/X86/X86Instr64bit.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86Instr64bit.td?rev=108746&r1=108745&r2=108746&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86Instr64bit.td (original) +++ llvm/trunk/lib/Target/X86/X86Instr64bit.td Mon Jul 19 15:44:16 2010 @@ -217,9 +217,9 @@ def JMP64pcrel32 : I<0xE9, RawFrm, (outs), (ins brtarget:$dst), "jmp{q}\t$dst", []>; def JMP64r : I<0xFF, MRM4r, (outs), (ins GR64:$dst), "jmp{q}\t{*}$dst", - [(brind GR64:$dst)]>; + [(brind GR64:$dst)]>, Requires<[In64BitMode]>; def JMP64m : I<0xFF, MRM4m, (outs), (ins i64mem:$dst), "jmp{q}\t{*}$dst", - [(brind (loadi64 addr:$dst))]>; + [(brind (loadi64 addr:$dst))]>, Requires<[In64BitMode]>; def FARJMP64 : RI<0xFF, MRM5m, (outs), (ins opaque80mem:$dst), "ljmp{q}\t{*}$dst", []>; } Modified: llvm/trunk/lib/Target/X86/X86InstrInfo.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrInfo.td?rev=108746&r1=108745&r2=108746&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86InstrInfo.td (original) +++ llvm/trunk/lib/Target/X86/X86InstrInfo.td Mon Jul 19 15:44:16 2010 @@ -650,9 +650,9 @@ // Indirect branches let isBranch = 1, isTerminator = 1, isBarrier = 1, isIndirectBranch = 1 in { def JMP32r : I<0xFF, MRM4r, (outs), (ins GR32:$dst), "jmp{l}\t{*}$dst", - [(brind GR32:$dst)]>; + [(brind GR32:$dst)]>, Requires<[In32BitMode]>; def JMP32m : I<0xFF, MRM4m, (outs), (ins i32mem:$dst), "jmp{l}\t{*}$dst", - [(brind (loadi32 addr:$dst))]>; + [(brind (loadi32 addr:$dst))]>, Requires<[In32BitMode]>; def FARJMP16i : Iseg16<0xEA, RawFrm, (outs), (ins i16imm:$seg, i16imm:$off), Modified: llvm/trunk/test/MC/AsmParser/X86/x86_32-new-encoder.s URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AsmParser/X86/x86_32-new-encoder.s?rev=108746&r1=108745&r2=108746&view=diff ============================================================================== --- llvm/trunk/test/MC/AsmParser/X86/x86_32-new-encoder.s (original) +++ llvm/trunk/test/MC/AsmParser/X86/x86_32-new-encoder.s Mon Jul 19 15:44:16 2010 @@ -415,3 +415,6 @@ // CHECK: encoding: [0x61] popal +// CHECK: jmpl *8(%eax) +// CHECK: encoding: [0xff,0x60,0x08] + jmp *8(%eax) Modified: llvm/trunk/test/MC/AsmParser/X86/x86_64-new-encoder.s URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AsmParser/X86/x86_64-new-encoder.s?rev=108746&r1=108745&r2=108746&view=diff ============================================================================== --- llvm/trunk/test/MC/AsmParser/X86/x86_64-new-encoder.s (original) +++ llvm/trunk/test/MC/AsmParser/X86/x86_64-new-encoder.s Mon Jul 19 15:44:16 2010 @@ -150,3 +150,6 @@ // CHECK: [0x65,0x8b,0x04,0x25,0x7c,0x00,0x00,0x00] movl %gs:124, %eax +// CHECK: jmpq *8(%rax) +// CHECK: encoding: [0xff,0x60,0x08] + jmp *8(%rax) From daniel at zuster.org Mon Jul 19 15:44:20 2010 From: daniel at zuster.org (Daniel Dunbar) Date: Mon, 19 Jul 2010 20:44:20 -0000 Subject: [llvm-commits] [llvm] r108747 - /llvm/trunk/lib/MC/MCMachOStreamer.cpp Message-ID: <20100719204420.30AFB2A6C12D@llvm.org> Author: ddunbar Date: Mon Jul 19 15:44:20 2010 New Revision: 108747 URL: http://llvm.org/viewvc/llvm-project?rev=108747&view=rev Log: MC/Mach-O: Silently ignore .file directives instead of error'ing out on them. They aren't important enough to abort the entire assembly, and failing early makes testing more annoying. Modified: llvm/trunk/lib/MC/MCMachOStreamer.cpp Modified: llvm/trunk/lib/MC/MCMachOStreamer.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCMachOStreamer.cpp?rev=108747&r1=108746&r2=108747&view=diff ============================================================================== --- llvm/trunk/lib/MC/MCMachOStreamer.cpp (original) +++ llvm/trunk/lib/MC/MCMachOStreamer.cpp Mon Jul 19 15:44:20 2010 @@ -82,10 +82,16 @@ unsigned char Value = 0); virtual void EmitFileDirective(StringRef Filename) { - report_fatal_error("unsupported directive: '.file'"); + // FIXME: Just ignore the .file; it isn't important enough to fail the + // entire assembly. + + //report_fatal_error("unsupported directive: '.file'"); } virtual void EmitDwarfFileDirective(unsigned FileNo, StringRef Filename) { - report_fatal_error("unsupported directive: '.file'"); + // FIXME: Just ignore the .file; it isn't important enough to fail the + // entire assembly. + + //report_fatal_error("unsupported directive: '.file'"); } virtual void EmitInstruction(const MCInst &Inst); From bob.wilson at apple.com Mon Jul 19 16:29:39 2010 From: bob.wilson at apple.com (Bob Wilson) Date: Mon, 19 Jul 2010 21:29:39 -0000 Subject: [llvm-commits] [llvm-gcc-4.2] r108751 - /llvm-gcc-4.2/trunk/GNUmakefile Message-ID: <20100719212939.910682A6C12C@llvm.org> Author: bwilson Date: Mon Jul 19 16:29:39 2010 New Revision: 108751 URL: http://llvm.org/viewvc/llvm-project?rev=108751&view=rev Log: Don't explicitly set INSTALL_LIBLTO to its default value. Modified: llvm-gcc-4.2/trunk/GNUmakefile Modified: llvm-gcc-4.2/trunk/GNUmakefile URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/GNUmakefile?rev=108751&r1=108750&r2=108751&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/GNUmakefile (original) +++ llvm-gcc-4.2/trunk/GNUmakefile Mon Jul 19 16:29:39 2010 @@ -93,7 +93,7 @@ SYMROOT=$(OBJROOT)/sym-llvmCore \ DSTROOT=$(OBJROOT)/dst-llvmCore llvmCore $(MAKE) LLVMCORE_PATH=$(OBJROOT)/dst-llvmCore/Developer/usr/local \ - INSTALL_LIBLTO=no llvmgcc42 + llvmgcc42 llvmCore: $(OBJROOT) $(SYMROOT) $(DSTROOT) if [ ! -d $(SRC)/llvmCore ]; then \ From bob.wilson at apple.com Mon Jul 19 16:31:16 2010 From: bob.wilson at apple.com (Bob Wilson) Date: Mon, 19 Jul 2010 21:31:16 -0000 Subject: [llvm-commits] [llvm-gcc-4.2] r108752 - /llvm-gcc-4.2/trunk/build_gcc Message-ID: <20100719213116.7D0AF2A6C12C@llvm.org> Author: bwilson Date: Mon Jul 19 16:31:16 2010 New Revision: 108752 URL: http://llvm.org/viewvc/llvm-project?rev=108752&view=rev Log: The llvmCore build now installs only one copy of libLTO.dylib, in the Developer/usr/lib directory, and that copy is already stripped so there's no need to strip it again. 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=108752&r1=108751&r2=108752&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/build_gcc (original) +++ llvm-gcc-4.2/trunk/build_gcc Mon Jul 19 16:31:16 2010 @@ -768,18 +768,17 @@ # Install libLTO.dylib if [ "$INSTALL_LIBLTO" == yes ]; then - LTO=$LLVMCORE_PATH/lib/libLTO.dylib - if [ ! -r $LTO ]; then - LTO=$LLVMCORE_PATH/../lib/libLTO.dylib - if [ ! -r $LTO ]; then - echo "Error: llvmCore installation is missing libLTO.dylib" - exit 1 - fi + LTO=$LLVMCORE_PATH/../lib/libLTO.dylib + if [ ! -r $LTO ]; then + echo "Error: llvmCore installation is missing libLTO.dylib" + exit 1 fi mkdir -p $DEST_DIR/Developer/usr/lib cp $LTO $DEST_DIR/Developer/usr/lib/libLTO.dylib - strip -S $DEST_DIR/Developer/usr/lib/libLTO.dylib - + # FIXME: The unstripped libLTO.dylib from llvmCore's SYM_DIR should be + # copied to the current SYM_DIR. Clang is currently responsible for + # installing libLTO.dylib, not llvm-gcc, so it's not worth fixing now. + if [ "x$DISABLE_USR_LINKS" == "x" ]; then # Add a symlink in /usr/lib for B&I. mkdir -p $DEST_DIR/usr/lib/ From bob.wilson at apple.com Mon Jul 19 16:33:07 2010 From: bob.wilson at apple.com (Bob Wilson) Date: Mon, 19 Jul 2010 21:33:07 -0000 Subject: [llvm-commits] [llvm] r108753 - /llvm/trunk/utils/buildit/build_llvm Message-ID: <20100719213308.07F282A6C12C@llvm.org> Author: bwilson Date: Mon Jul 19 16:33:07 2010 New Revision: 108753 URL: http://llvm.org/viewvc/llvm-project?rev=108753&view=rev Log: Save a copy of the unstripped libLTO.dylib in $SYM_DIR. Clean up the code for dealing with libLTO.dylib to put it all in one place and to allow use of DISABLE_USR_LINKS. Modified: llvm/trunk/utils/buildit/build_llvm Modified: llvm/trunk/utils/buildit/build_llvm URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/buildit/build_llvm?rev=108753&r1=108752&r2=108753&view=diff ============================================================================== --- llvm/trunk/utils/buildit/build_llvm (original) +++ llvm/trunk/utils/buildit/build_llvm Mon Jul 19 16:33:07 2010 @@ -317,9 +317,20 @@ mkdir -p $DT_HOME/lib mv lib/libLTO.dylib $DT_HOME/lib/libLTO.dylib + # Save a copy of the unstripped dylib + mkdir -p $SYM_DIR/Developer/usr/lib + cp $DT_HOME/lib/libLTO.dylib $SYM_DIR/Developer/usr/lib/libLTO.dylib + # Use '-l' to strip i386 modules. N.B. that flag doesn't work with kext or # PPC objects! strip -arch all -Sl $DT_HOME/lib/libLTO.dylib + + if [ "x$DISABLE_USR_LINKS" == "x" ]; then + # Add a symlink in /usr/lib for B&I. + mkdir -p $DEST_DIR/usr/lib/ + (cd $DEST_DIR/usr/lib && \ + ln -s ../../Developer/usr/lib/libLTO.dylib ./libLTO.dylib) + fi else rm -f lib/libLTO.dylib fi @@ -350,15 +361,6 @@ rm -rf $DEST_DIR$DEST_ROOT/docs ################################################################################ -# symlinks so that B&I can find things - -if [ "$INSTALL_LIBLTO" = "yes" ]; then - mkdir -p $DEST_DIR/usr/lib/ - cd $DEST_DIR/usr/lib && \ - ln -s ../../Developer/usr/lib/libLTO.dylib ./libLTO.dylib -fi - -################################################################################ # w00t! Done! exit 0 From resistor at mac.com Mon Jul 19 16:44:49 2010 From: resistor at mac.com (Owen Anderson) Date: Mon, 19 Jul 2010 21:44:49 -0000 Subject: [llvm-commits] [llvm] r108755 - in /llvm/trunk: include/llvm/PassSupport.h lib/VMCore/PassManager.cpp Message-ID: <20100719214449.232A42A6C12C@llvm.org> Author: resistor Date: Mon Jul 19 16:44:48 2010 New Revision: 108755 URL: http://llvm.org/viewvc/llvm-project?rev=108755&view=rev Log: Change the implemented interfaces list on PassInfo from a std::vector to a manually implemented linked list. This is a little slower and involves more malloc'ing, but these lists are typically short, and it allows PassInfo to be entirely constant initializable. Modified: llvm/trunk/include/llvm/PassSupport.h llvm/trunk/lib/VMCore/PassManager.cpp Modified: llvm/trunk/include/llvm/PassSupport.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/PassSupport.h?rev=108755&r1=108754&r2=108755&view=diff ============================================================================== --- llvm/trunk/include/llvm/PassSupport.h (original) +++ llvm/trunk/include/llvm/PassSupport.h Mon Jul 19 16:44:48 2010 @@ -36,6 +36,10 @@ class PassInfo { public: typedef Pass* (*NormalCtor_t)(); + struct InterfaceInfo { + const PassInfo *interface; + const InterfaceInfo *next; + }; private: const char *const PassName; // Nice name for Pass @@ -44,7 +48,7 @@ const bool IsCFGOnlyPass; // Pass only looks at the CFG. const bool IsAnalysis; // True if an analysis pass. const bool IsAnalysisGroup; // True if an analysis group. - std::vector ItfImpl;// Interfaces implemented by this pass + const InterfaceInfo *ItfImpl;// Interfaces implemented by this pass NormalCtor_t NormalCtor; @@ -116,13 +120,16 @@ /// template. /// void addInterfaceImplemented(const PassInfo *ItfPI) { - ItfImpl.push_back(ItfPI); + InterfaceInfo *NewInfo = new InterfaceInfo(); + NewInfo->interface = ItfPI; + NewInfo->next = ItfImpl; + ItfImpl = NewInfo; } /// getInterfacesImplemented - Return a list of all of the analysis group /// interfaces implemented by this pass. /// - const std::vector &getInterfacesImplemented() const { + const InterfaceInfo *getInterfacesImplemented() const { return ItfImpl; } Modified: llvm/trunk/lib/VMCore/PassManager.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/PassManager.cpp?rev=108755&r1=108754&r2=108755&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/PassManager.cpp (original) +++ llvm/trunk/lib/VMCore/PassManager.cpp Mon Jul 19 16:44:48 2010 @@ -638,10 +638,14 @@ // If Pass not found then check the interfaces implemented by Immutable Pass if (!P) { - const std::vector &ImmPI = - PI->getInterfacesImplemented(); - if (std::find(ImmPI.begin(), ImmPI.end(), AID) != ImmPI.end()) - P = *I; + const PassInfo::InterfaceInfo *ImmPI = PI->getInterfacesImplemented(); + while (ImmPI) { + if (ImmPI->interface == AID) { + P = *I; + break; + } else + ImmPI = ImmPI->next; + } } } @@ -731,9 +735,11 @@ //This pass is the current implementation of all of the interfaces it //implements as well. - const std::vector &II = PI->getInterfacesImplemented(); - for (unsigned i = 0, e = II.size(); i != e; ++i) - AvailableAnalysis[II[i]] = P; + const PassInfo::InterfaceInfo *II = PI->getInterfacesImplemented(); + while (II) { + AvailableAnalysis[II->interface] = P; + II = II->next; + } } // Return true if P preserves high level analysis used by other @@ -867,12 +873,13 @@ // Remove all interfaces this pass implements, for which it is also // listed as the available implementation. - const std::vector &II = PI->getInterfacesImplemented(); - for (unsigned i = 0, e = II.size(); i != e; ++i) { + const PassInfo::InterfaceInfo *II = PI->getInterfacesImplemented(); + while (II) { std::map::iterator Pos = - AvailableAnalysis.find(II[i]); + AvailableAnalysis.find(II->interface); if (Pos != AvailableAnalysis.end() && Pos->second == P) AvailableAnalysis.erase(Pos); + II = II->next; } } } From resistor at mac.com Mon Jul 19 16:47:37 2010 From: resistor at mac.com (Owen Anderson) Date: Mon, 19 Jul 2010 14:47:37 -0700 Subject: [llvm-commits] [llvm] r108755 - in /llvm/trunk: include/llvm/PassSupport.h lib/VMCore/PassManager.cpp In-Reply-To: <20100719214449.232A42A6C12C@llvm.org> References: <20100719214449.232A42A6C12C@llvm.org> Message-ID: <67C6B4E1-A62B-4D0D-B21B-471DD1F692F1@mac.com> On Jul 19, 2010, at 2:44 PM, Owen Anderson wrote: > Change the implemented interfaces list on PassInfo from a std::vector to a manually implemented > linked list. This is a little slower and involves more malloc'ing, but these lists are > typically short, and it allows PassInfo to be entirely constant initializable. Module getting rid of its static constructor, of course. --Owen From grosbach at apple.com Mon Jul 19 17:04:28 2010 From: grosbach at apple.com (Jim Grosbach) Date: Mon, 19 Jul 2010 22:04:28 -0000 Subject: [llvm-commits] [llvm] r108759 - /llvm/trunk/CREDITS.TXT Message-ID: <20100719220428.D6E422A6C12C@llvm.org> Author: grosbach Date: Mon Jul 19 17:04:28 2010 New Revision: 108759 URL: http://llvm.org/viewvc/llvm-project?rev=108759&view=rev Log: long past time I added myself to this, I suppose. Modified: llvm/trunk/CREDITS.TXT Modified: llvm/trunk/CREDITS.TXT URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/CREDITS.TXT?rev=108759&r1=108758&r2=108759&view=diff ============================================================================== --- llvm/trunk/CREDITS.TXT (original) +++ llvm/trunk/CREDITS.TXT Mon Jul 19 17:04:28 2010 @@ -134,6 +134,11 @@ E: ggreif at gmail.com D: Improvements for space efficiency +N: James Grosbach +E: grosbach at apple.com +D: SjLj exception handling support +D: General fixes and improvements for the ARM back-end + N: Lang Hames E: lhames at gmail.com D: PBQP-based register allocator From evan.cheng at apple.com Mon Jul 19 17:09:06 2010 From: evan.cheng at apple.com (Evan Cheng) Date: Mon, 19 Jul 2010 15:09:06 -0700 Subject: [llvm-commits] [llvm] r108735 - in /llvm/trunk: include/llvm/Target/TargetLowering.h lib/CodeGen/SelectionDAG/TargetLowering.cpp In-Reply-To: <52E5CF36-C5F1-4834-8A37-23D68A18268C@2pi.dk> References: <20100719184701.BD0E92A6C12C@llvm.org> <8E57D391-E68A-4532-B780-2B6FB52F7C2E@apple.com> <52E5CF36-C5F1-4834-8A37-23D68A18268C@2pi.dk> Message-ID: On Jul 19, 2010, at 1:22 PM, Jakob Stoklund Olesen wrote: > > On Jul 19, 2010, at 1:11 PM, Evan Cheng wrote: > >> >> On Jul 19, 2010, at 12:59 PM, Jakob Stoklund Olesen wrote: >> >>> >>> On Jul 19, 2010, at 11:47 AM, Evan Cheng wrote: >>> >>>> Author: evancheng >>>> Date: Mon Jul 19 13:47:01 2010 >>>> New Revision: 108735 >>>> >>>> URL: http://llvm.org/viewvc/llvm-project?rev=108735&view=rev >>>> Log: >>>> Teach computeRegisterProperties() to compute "representative" register class for legal value types. A "representative" register class is the largest legal super-reg register class for a value type. e.g. On i386, GR32 is the rep register class for i8 / i16 / i32; on x86_64 it would be GR64. >>>> >>>> This property will be used by the register pressure tracking instruction scheduler. >>> >>> Hi Evan, >>> >>> This looks a lot like you have x86 in mind. >> >> No. What is x86? :-) >> >>> >>> What is getRepRegClassFor(f32) going to return on ARM? QQQQ? >> >> QQ and QQQQ are not legal during isel. It's Q. It's probably overly conservative for tracking. I'm still trying to figure that out. >> >> >>> >>> How are you planning to deal with registers with more than one usable subregister? >> >> I am not sure what you mean? It's ignore sub-register classes (e.g. QPR_VFP2). > > I meant the same as above - QPR only has 16 registers, but there are 32 DPR registers. If you are counting each DPR as a QPR, you are going to be scheduling as if you only had 16 DPR registers. > > Can you use some kind of scaling so a DPR counts as 0.5 QPR? > No, I don't like that. I was hoping to avoid having targets provide findRepresentativeClass(). But I think it cannot be avoided. Evan From bob.wilson at apple.com Mon Jul 19 17:15:28 2010 From: bob.wilson at apple.com (Bob Wilson) Date: Mon, 19 Jul 2010 15:15:28 -0700 Subject: [llvm-commits] [patch] v2 PR7608 ARMv4 JIT forgets to set the lr register when making a indirect function call In-Reply-To: <4C449A32.7060101@zafena.se> References: <4C3A4388.1040703@zafena.se> <4C3B79BF.3080303@zafena.se> <4C449A32.7060101@zafena.se> Message-ID: <4C11E453-313C-4B77-BC04-07B730DC649A@apple.com> Looks good to me. On Jul 19, 2010, at 11:32 AM, Xerxes Ranby wrote: > Bob Wilson wrote: >> On Jul 12, 2010, at 1:23 PM, Xerxes Ranby wrote: >> >>> Bob Wilson wrote: >>> >>>> I don't think this is good enough. The "mov lr, pc" instruction must be emitted immediately before the call. I don't know how to do that without making all the "call_nolink" instructions into pseudo-instructions. >>>> >>> Where can I find documentation on what pseudo instructions are and how pseudo instructions can resolve this kind of situation? >>> >> >> Look at ARMCodeEmitter::emitPseudoInstruction for some examples. Basically you would just change the "call_nolink" instructions to be marked as pseudo instructions and then add code to ARMCodeEmitter to generate both the "mov lr, pc" and "bx" instructions together > Hi I have attached a new patch that basicaly implements what Bob suggested, thank you Bob, it marks all the ARM "call_nolink" instructions as pseudo instructions and adds code to ARMCodeEmitter to generate both the "mov lr, pc" and the branch instructions together. My own testing indicates that this work very well and fixes the PR7608 bug without introducing any new test regressions. > > Index: llvm/lib/Target/ARM/ARMInstrInfo.td > =================================================================== > --- llvm.orig/lib/Target/ARM/ARMInstrInfo.td 2010-07-13 17:41:01.000000000 +0200 > +++ llvm/lib/Target/ARM/ARMInstrInfo.td 2010-07-19 17:11:19.000000000 +0200 > @@ -961,7 +961,7 @@ > > // ARMv4T > // Note: Restrict $func to the tGPR regclass to prevent it being in LR. > - def BX : ABXIx2<(outs), (ins tGPR:$func, variable_ops), > + def BX : PseudoInst<(outs), (ins tGPR:$func, variable_ops), > IIC_Br, "mov\tlr, pc\n\tbx\t$func", > [(ARMcall_nolink tGPR:$func)]>, > Requires<[IsARM, HasV4T, IsNotDarwin]> { > @@ -971,7 +971,7 @@ > } > > // ARMv4 > - def BMOVPCRX : ABXIx2<(outs), (ins tGPR:$func, variable_ops), > + def BMOVPCRX : PseudoInst<(outs), (ins tGPR:$func, variable_ops), > IIC_Br, "mov\tlr, pc\n\tmov\tpc, $func", > [(ARMcall_nolink tGPR:$func)]>, > Requires<[IsARM, NoV4T, IsNotDarwin]> { > @@ -1010,7 +1010,7 @@ > > // ARMv4T > // Note: Restrict $func to the tGPR regclass to prevent it being in LR. > - def BXr9 : ABXIx2<(outs), (ins tGPR:$func, variable_ops), > + def BXr9 : PseudoInst<(outs), (ins tGPR:$func, variable_ops), > IIC_Br, "mov\tlr, pc\n\tbx\t$func", > [(ARMcall_nolink tGPR:$func)]>, > Requires<[IsARM, HasV4T, IsDarwin]> { > @@ -1020,7 +1020,7 @@ > } > > // ARMv4 > - def BMOVPCRXr9 : ABXIx2<(outs), (ins tGPR:$func, variable_ops), > + def BMOVPCRXr9 : PseudoInst<(outs), (ins tGPR:$func, variable_ops), > IIC_Br, "mov\tlr, pc\n\tmov\tpc, $func", > [(ARMcall_nolink tGPR:$func)]>, > Requires<[IsARM, NoV4T, IsDarwin]> { > Index: llvm/lib/Target/ARM/ARMCodeEmitter.cpp > =================================================================== > --- llvm.orig/lib/Target/ARM/ARMCodeEmitter.cpp 2010-07-13 17:41:01.000000000 +0200 > +++ llvm/lib/Target/ARM/ARMCodeEmitter.cpp 2010-07-19 17:20:26.000000000 +0200 > @@ -654,6 +654,16 @@ > switch (Opcode) { > default: > llvm_unreachable("ARMCodeEmitter::emitPseudoInstruction"); > + case ARM::BX: > + case ARM::BMOVPCRX: > + case ARM::BXr9: > + case ARM::BMOVPCRXr9: { > + // First emit mov lr, pc > + emitWordLE(0xe1a0e00f); > + // and then emit the branch. > + emitMiscBranchInstruction(MI); > + break; > + } > case TargetOpcode::INLINEASM: { > // We allow inline assembler nodes with empty bodies - they can > // implicitly define registers, which is ok for JIT. > > > Ok to push? > > Cheers > Xerxes > > Index: llvm/lib/Target/ARM/ARMInstrInfo.td > =================================================================== > --- llvm.orig/lib/Target/ARM/ARMInstrInfo.td 2010-07-13 17:41:01.000000000 +0200 > +++ llvm/lib/Target/ARM/ARMInstrInfo.td 2010-07-19 17:11:19.000000000 +0200 > @@ -961,7 +961,7 @@ > > // ARMv4T > // Note: Restrict $func to the tGPR regclass to prevent it being in LR. > - def BX : ABXIx2<(outs), (ins tGPR:$func, variable_ops), > + def BX : PseudoInst<(outs), (ins tGPR:$func, variable_ops), > IIC_Br, "mov\tlr, pc\n\tbx\t$func", > [(ARMcall_nolink tGPR:$func)]>, > Requires<[IsARM, HasV4T, IsNotDarwin]> { > @@ -971,7 +971,7 @@ > } > > // ARMv4 > - def BMOVPCRX : ABXIx2<(outs), (ins tGPR:$func, variable_ops), > + def BMOVPCRX : PseudoInst<(outs), (ins tGPR:$func, variable_ops), > IIC_Br, "mov\tlr, pc\n\tmov\tpc, $func", > [(ARMcall_nolink tGPR:$func)]>, > Requires<[IsARM, NoV4T, IsNotDarwin]> { > @@ -1010,7 +1010,7 @@ > > // ARMv4T > // Note: Restrict $func to the tGPR regclass to prevent it being in LR. > - def BXr9 : ABXIx2<(outs), (ins tGPR:$func, variable_ops), > + def BXr9 : PseudoInst<(outs), (ins tGPR:$func, variable_ops), > IIC_Br, "mov\tlr, pc\n\tbx\t$func", > [(ARMcall_nolink tGPR:$func)]>, > Requires<[IsARM, HasV4T, IsDarwin]> { > @@ -1020,7 +1020,7 @@ > } > > // ARMv4 > - def BMOVPCRXr9 : ABXIx2<(outs), (ins tGPR:$func, variable_ops), > + def BMOVPCRXr9 : PseudoInst<(outs), (ins tGPR:$func, variable_ops), > IIC_Br, "mov\tlr, pc\n\tmov\tpc, $func", > [(ARMcall_nolink tGPR:$func)]>, > Requires<[IsARM, NoV4T, IsDarwin]> { > Index: llvm/lib/Target/ARM/ARMCodeEmitter.cpp > =================================================================== > --- llvm.orig/lib/Target/ARM/ARMCodeEmitter.cpp 2010-07-13 17:41:01.000000000 +0200 > +++ llvm/lib/Target/ARM/ARMCodeEmitter.cpp 2010-07-19 17:20:26.000000000 +0200 > @@ -654,6 +654,16 @@ > switch (Opcode) { > default: > llvm_unreachable("ARMCodeEmitter::emitPseudoInstruction"); > + case ARM::BX: > + case ARM::BMOVPCRX: > + case ARM::BXr9: > + case ARM::BMOVPCRXr9: { > + // First emit mov lr, pc > + emitWordLE(0xe1a0e00f); > + // and then emit the branch. > + emitMiscBranchInstruction(MI); > + break; > + } > case TargetOpcode::INLINEASM: { > // We allow inline assembler nodes with empty bodies - they can > // implicitly define registers, which is ok for JIT. From evan.cheng at apple.com Mon Jul 19 17:15:08 2010 From: evan.cheng at apple.com (Evan Cheng) Date: Mon, 19 Jul 2010 22:15:08 -0000 Subject: [llvm-commits] [llvm] r108761 - in /llvm/trunk: include/llvm/Target/TargetLowering.h lib/CodeGen/SelectionDAG/TargetLowering.cpp lib/Target/ARM/ARMISelLowering.cpp lib/Target/ARM/ARMISelLowering.h Message-ID: <20100719221508.C8EF02A6C12C@llvm.org> Author: evancheng Date: Mon Jul 19 17:15:08 2010 New Revision: 108761 URL: http://llvm.org/viewvc/llvm-project?rev=108761&view=rev Log: ARM has to provide its own TargetLowering::findRepresentativeClass because its scalar floating point registers alias its vector registers. Modified: llvm/trunk/include/llvm/Target/TargetLowering.h llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp llvm/trunk/lib/Target/ARM/ARMISelLowering.h Modified: llvm/trunk/include/llvm/Target/TargetLowering.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetLowering.h?rev=108761&r1=108760&r2=108761&view=diff ============================================================================== --- llvm/trunk/include/llvm/Target/TargetLowering.h (original) +++ llvm/trunk/include/llvm/Target/TargetLowering.h Mon Jul 19 17:15:08 2010 @@ -993,6 +993,11 @@ Synthesizable[VT.getSimpleVT().SimpleTy] = isSynthesizable; } + /// findRepresentativeClass - Return the largest legal super-reg register class + /// of the specified register class. + virtual const TargetRegisterClass * + findRepresentativeClass(const TargetRegisterClass *RC) const; + /// computeRegisterProperties - Once all of the register classes are added, /// this allows us to compute derived properties we expose. void computeRegisterProperties(); @@ -1698,12 +1703,7 @@ /// hasLegalSuperRegRegClasses - Return true if the specified register class /// has one or more super-reg register classes that are legal. - bool hasLegalSuperRegRegClasses(const TargetRegisterClass *RC); - - /// findRepresentativeClass - Return the largest legal super-reg register class - /// of the specified register class. - const TargetRegisterClass * - findRepresentativeClass(const TargetRegisterClass *RC); + bool hasLegalSuperRegRegClasses(const TargetRegisterClass *RC) const; }; /// GetReturnInfo - Given an LLVM IR type and return type attributes, Modified: llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp?rev=108761&r1=108760&r2=108761&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp Mon Jul 19 17:15:08 2010 @@ -664,7 +664,8 @@ /// hasLegalSuperRegRegClasses - Return true if the specified register class /// has one or more super-reg register classes that are legal. -bool TargetLowering::hasLegalSuperRegRegClasses(const TargetRegisterClass *RC) { +bool +TargetLowering::hasLegalSuperRegRegClasses(const TargetRegisterClass *RC) const{ if (*RC->superregclasses_begin() == 0) return false; for (TargetRegisterInfo::regclass_iterator I = RC->superregclasses_begin(), @@ -679,9 +680,7 @@ /// findRepresentativeClass - Return the largest legal super-reg register class /// of the specified register class. const TargetRegisterClass * -TargetLowering::findRepresentativeClass(const TargetRegisterClass *RC) { - if (!RC) return 0; - +TargetLowering::findRepresentativeClass(const TargetRegisterClass *RC) const { const TargetRegisterClass *BestRC = RC; for (TargetRegisterInfo::regclass_iterator I = RC->superregclasses_begin(), E = RC->superregclasses_end(); I != E; ++I) { @@ -820,8 +819,10 @@ // not a sub-register class / subreg register class) legal register class for // a group of value types. For example, on i386, i8, i16, and i32 // representative would be GR32; while on x86_64 it's GR64. - for (unsigned i = 0; i != MVT::LAST_VALUETYPE; ++i) - RepRegClassForVT[i] = findRepresentativeClass(RegClassForVT[i]); + for (unsigned i = 0; i != MVT::LAST_VALUETYPE; ++i) { + const TargetRegisterClass *RC = RegClassForVT[i]; + RepRegClassForVT[i] = RC ? findRepresentativeClass(RC) : 0; + } } const char *TargetLowering::getTargetNodeName(unsigned Opcode) const { Modified: llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp?rev=108761&r1=108760&r2=108761&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp (original) +++ llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp Mon Jul 19 17:15:08 2010 @@ -550,6 +550,22 @@ benefitFromCodePlacementOpt = true; } +const TargetRegisterClass * +ARMTargetLowering::findRepresentativeClass(const TargetRegisterClass *RC) const{ + switch (RC->getID()) { + default: + return RC; + case ARM::tGPRRegClassID: + case ARM::GPRRegClassID: + return ARM::GPRRegisterClass; + case ARM::SPRRegClassID: + case ARM::DPRRegClassID: + return ARM::DPRRegisterClass; + case ARM::QPRRegClassID: + return ARM::QPRRegisterClass; + } +} + const char *ARMTargetLowering::getTargetNodeName(unsigned Opcode) const { switch (Opcode) { default: return 0; Modified: llvm/trunk/lib/Target/ARM/ARMISelLowering.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMISelLowering.h?rev=108761&r1=108760&r2=108761&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMISelLowering.h (original) +++ llvm/trunk/lib/Target/ARM/ARMISelLowering.h Mon Jul 19 17:15:08 2010 @@ -271,6 +271,10 @@ /// materialize the FP immediate as a load from a constant pool. virtual bool isFPImmLegal(const APFloat &Imm, EVT VT) const; + protected: + const TargetRegisterClass * + findRepresentativeClass(const TargetRegisterClass *RC) const; + private: /// Subtarget - Keep a pointer to the ARMSubtarget around so that we can /// make the right decision when generating code for different targets. From stoklund at 2pi.dk Mon Jul 19 17:22:23 2010 From: stoklund at 2pi.dk (Jakob Stoklund Olesen) Date: Mon, 19 Jul 2010 15:22:23 -0700 Subject: [llvm-commits] [llvm] r108735 - in /llvm/trunk: include/llvm/Target/TargetLowering.h lib/CodeGen/SelectionDAG/TargetLowering.cpp In-Reply-To: References: <20100719184701.BD0E92A6C12C@llvm.org> <8E57D391-E68A-4532-B780-2B6FB52F7C2E@apple.com> <52E5CF36-C5F1-4834-8A37-23D68A18268C@2pi.dk> Message-ID: <2559FA6C-2DD4-4256-B1C2-B91C7F416927@2pi.dk> On Jul 19, 2010, at 3:09 PM, Evan Cheng wrote: > > On Jul 19, 2010, at 1:22 PM, Jakob Stoklund Olesen wrote: >> >> Can you use some kind of scaling so a DPR counts as 0.5 QPR? >> > > No, I don't like that. I was hoping to avoid having targets provide findRepresentativeClass(). But I think it cannot be avoided. I don't think overriding findRepresentativeClass() solves the problem. There is no 'correct' representative register class. Whenever you allocate a QPR, you block two DPRs. Whenever you allocate a DPR, you block one (half) QPR. I think you need to model that asymmetry somehow. From echristo at apple.com Mon Jul 19 17:25:26 2010 From: echristo at apple.com (Eric Christopher) Date: Mon, 19 Jul 2010 15:25:26 -0700 Subject: [llvm-commits] [llvm] r108735 - in /llvm/trunk: include/llvm/Target/TargetLowering.h lib/CodeGen/SelectionDAG/TargetLowering.cpp In-Reply-To: <2559FA6C-2DD4-4256-B1C2-B91C7F416927@2pi.dk> References: <20100719184701.BD0E92A6C12C@llvm.org> <8E57D391-E68A-4532-B780-2B6FB52F7C2E@apple.com> <52E5CF36-C5F1-4834-8A37-23D68A18268C@2pi.dk> <2559FA6C-2DD4-4256-B1C2-B91C7F416927@2pi.dk> Message-ID: On Jul 19, 2010, at 3:22 PM, Jakob Stoklund Olesen wrote: > > On Jul 19, 2010, at 3:09 PM, Evan Cheng wrote: > >> >> On Jul 19, 2010, at 1:22 PM, Jakob Stoklund Olesen wrote: >>> >>> Can you use some kind of scaling so a DPR counts as 0.5 QPR? >>> >> >> No, I don't like that. I was hoping to avoid having targets provide findRepresentativeClass(). But I think it cannot be avoided. > > I don't think overriding findRepresentativeClass() solves the problem. There is no 'correct' representative register class. > > Whenever you allocate a QPR, you block two DPRs. > Whenever you allocate a DPR, you block one (half) QPR. > > I think you need to model that asymmetry somehow. > As a first pass for scheduling wouldn't the second one be a bit overkill? i.e. is there anything wrong with considering it as a full QPR? If so, just round up? -eric From bob.wilson at apple.com Mon Jul 19 17:30:28 2010 From: bob.wilson at apple.com (Bob Wilson) Date: Mon, 19 Jul 2010 15:30:28 -0700 Subject: [llvm-commits] [patch] v2 PR7608 ARMv4 JIT forgets to set the lr register when making a indirect function call In-Reply-To: <4C11E453-313C-4B77-BC04-07B730DC649A@apple.com> References: <4C3A4388.1040703@zafena.se> <4C3B79BF.3080303@zafena.se> <4C449A32.7060101@zafena.se> <4C11E453-313C-4B77-BC04-07B730DC649A@apple.com> Message-ID: <4EA45324-80B0-49DA-8A5A-88199D5AA433@apple.com> Wait a minute.... How does EmitMiscBranchInstruction() know how to encode those BX instructions? You need to add the encoding bits in the .td file. Instead of declaring them as PseudoInsts, declare them as real instructions (similar to BRIND), but set the format to "Pseudo". On Jul 19, 2010, at 3:15 PM, Bob Wilson wrote: > Looks good to me. > > On Jul 19, 2010, at 11:32 AM, Xerxes Ranby wrote: > >> Bob Wilson wrote: >>> On Jul 12, 2010, at 1:23 PM, Xerxes Ranby wrote: >>> >>>> Bob Wilson wrote: >>>> >>>>> I don't think this is good enough. The "mov lr, pc" instruction must be emitted immediately before the call. I don't know how to do that without making all the "call_nolink" instructions into pseudo-instructions. >>>>> >>>> Where can I find documentation on what pseudo instructions are and how pseudo instructions can resolve this kind of situation? >>>> >>> >>> Look at ARMCodeEmitter::emitPseudoInstruction for some examples. Basically you would just change the "call_nolink" instructions to be marked as pseudo instructions and then add code to ARMCodeEmitter to generate both the "mov lr, pc" and "bx" instructions together >> Hi I have attached a new patch that basicaly implements what Bob suggested, thank you Bob, it marks all the ARM "call_nolink" instructions as pseudo instructions and adds code to ARMCodeEmitter to generate both the "mov lr, pc" and the branch instructions together. My own testing indicates that this work very well and fixes the PR7608 bug without introducing any new test regressions. >> >> Index: llvm/lib/Target/ARM/ARMInstrInfo.td >> =================================================================== >> --- llvm.orig/lib/Target/ARM/ARMInstrInfo.td 2010-07-13 17:41:01.000000000 +0200 >> +++ llvm/lib/Target/ARM/ARMInstrInfo.td 2010-07-19 17:11:19.000000000 +0200 >> @@ -961,7 +961,7 @@ >> >> // ARMv4T >> // Note: Restrict $func to the tGPR regclass to prevent it being in LR. >> - def BX : ABXIx2<(outs), (ins tGPR:$func, variable_ops), >> + def BX : PseudoInst<(outs), (ins tGPR:$func, variable_ops), >> IIC_Br, "mov\tlr, pc\n\tbx\t$func", >> [(ARMcall_nolink tGPR:$func)]>, >> Requires<[IsARM, HasV4T, IsNotDarwin]> { >> @@ -971,7 +971,7 @@ >> } >> >> // ARMv4 >> - def BMOVPCRX : ABXIx2<(outs), (ins tGPR:$func, variable_ops), >> + def BMOVPCRX : PseudoInst<(outs), (ins tGPR:$func, variable_ops), >> IIC_Br, "mov\tlr, pc\n\tmov\tpc, $func", >> [(ARMcall_nolink tGPR:$func)]>, >> Requires<[IsARM, NoV4T, IsNotDarwin]> { >> @@ -1010,7 +1010,7 @@ >> >> // ARMv4T >> // Note: Restrict $func to the tGPR regclass to prevent it being in LR. >> - def BXr9 : ABXIx2<(outs), (ins tGPR:$func, variable_ops), >> + def BXr9 : PseudoInst<(outs), (ins tGPR:$func, variable_ops), >> IIC_Br, "mov\tlr, pc\n\tbx\t$func", >> [(ARMcall_nolink tGPR:$func)]>, >> Requires<[IsARM, HasV4T, IsDarwin]> { >> @@ -1020,7 +1020,7 @@ >> } >> >> // ARMv4 >> - def BMOVPCRXr9 : ABXIx2<(outs), (ins tGPR:$func, variable_ops), >> + def BMOVPCRXr9 : PseudoInst<(outs), (ins tGPR:$func, variable_ops), >> IIC_Br, "mov\tlr, pc\n\tmov\tpc, $func", >> [(ARMcall_nolink tGPR:$func)]>, >> Requires<[IsARM, NoV4T, IsDarwin]> { >> Index: llvm/lib/Target/ARM/ARMCodeEmitter.cpp >> =================================================================== >> --- llvm.orig/lib/Target/ARM/ARMCodeEmitter.cpp 2010-07-13 17:41:01.000000000 +0200 >> +++ llvm/lib/Target/ARM/ARMCodeEmitter.cpp 2010-07-19 17:20:26.000000000 +0200 >> @@ -654,6 +654,16 @@ >> switch (Opcode) { >> default: >> llvm_unreachable("ARMCodeEmitter::emitPseudoInstruction"); >> + case ARM::BX: >> + case ARM::BMOVPCRX: >> + case ARM::BXr9: >> + case ARM::BMOVPCRXr9: { >> + // First emit mov lr, pc >> + emitWordLE(0xe1a0e00f); >> + // and then emit the branch. >> + emitMiscBranchInstruction(MI); >> + break; >> + } >> case TargetOpcode::INLINEASM: { >> // We allow inline assembler nodes with empty bodies - they can >> // implicitly define registers, which is ok for JIT. >> >> >> Ok to push? >> >> Cheers >> Xerxes >> >> Index: llvm/lib/Target/ARM/ARMInstrInfo.td >> =================================================================== >> --- llvm.orig/lib/Target/ARM/ARMInstrInfo.td 2010-07-13 17:41:01.000000000 +0200 >> +++ llvm/lib/Target/ARM/ARMInstrInfo.td 2010-07-19 17:11:19.000000000 +0200 >> @@ -961,7 +961,7 @@ >> >> // ARMv4T >> // Note: Restrict $func to the tGPR regclass to prevent it being in LR. >> - def BX : ABXIx2<(outs), (ins tGPR:$func, variable_ops), >> + def BX : PseudoInst<(outs), (ins tGPR:$func, variable_ops), >> IIC_Br, "mov\tlr, pc\n\tbx\t$func", >> [(ARMcall_nolink tGPR:$func)]>, >> Requires<[IsARM, HasV4T, IsNotDarwin]> { >> @@ -971,7 +971,7 @@ >> } >> >> // ARMv4 >> - def BMOVPCRX : ABXIx2<(outs), (ins tGPR:$func, variable_ops), >> + def BMOVPCRX : PseudoInst<(outs), (ins tGPR:$func, variable_ops), >> IIC_Br, "mov\tlr, pc\n\tmov\tpc, $func", >> [(ARMcall_nolink tGPR:$func)]>, >> Requires<[IsARM, NoV4T, IsNotDarwin]> { >> @@ -1010,7 +1010,7 @@ >> >> // ARMv4T >> // Note: Restrict $func to the tGPR regclass to prevent it being in LR. >> - def BXr9 : ABXIx2<(outs), (ins tGPR:$func, variable_ops), >> + def BXr9 : PseudoInst<(outs), (ins tGPR:$func, variable_ops), >> IIC_Br, "mov\tlr, pc\n\tbx\t$func", >> [(ARMcall_nolink tGPR:$func)]>, >> Requires<[IsARM, HasV4T, IsDarwin]> { >> @@ -1020,7 +1020,7 @@ >> } >> >> // ARMv4 >> - def BMOVPCRXr9 : ABXIx2<(outs), (ins tGPR:$func, variable_ops), >> + def BMOVPCRXr9 : PseudoInst<(outs), (ins tGPR:$func, variable_ops), >> IIC_Br, "mov\tlr, pc\n\tmov\tpc, $func", >> [(ARMcall_nolink tGPR:$func)]>, >> Requires<[IsARM, NoV4T, IsDarwin]> { >> Index: llvm/lib/Target/ARM/ARMCodeEmitter.cpp >> =================================================================== >> --- llvm.orig/lib/Target/ARM/ARMCodeEmitter.cpp 2010-07-13 17:41:01.000000000 +0200 >> +++ llvm/lib/Target/ARM/ARMCodeEmitter.cpp 2010-07-19 17:20:26.000000000 +0200 >> @@ -654,6 +654,16 @@ >> switch (Opcode) { >> default: >> llvm_unreachable("ARMCodeEmitter::emitPseudoInstruction"); >> + case ARM::BX: >> + case ARM::BMOVPCRX: >> + case ARM::BXr9: >> + case ARM::BMOVPCRXr9: { >> + // First emit mov lr, pc >> + emitWordLE(0xe1a0e00f); >> + // and then emit the branch. >> + emitMiscBranchInstruction(MI); >> + break; >> + } >> case TargetOpcode::INLINEASM: { >> // We allow inline assembler nodes with empty bodies - they can >> // implicitly define registers, which is ok for JIT. > From evan.cheng at apple.com Mon Jul 19 17:35:53 2010 From: evan.cheng at apple.com (Evan Cheng) Date: Mon, 19 Jul 2010 15:35:53 -0700 Subject: [llvm-commits] [llvm] r108735 - in /llvm/trunk: include/llvm/Target/TargetLowering.h lib/CodeGen/SelectionDAG/TargetLowering.cpp In-Reply-To: <2559FA6C-2DD4-4256-B1C2-B91C7F416927@2pi.dk> References: <20100719184701.BD0E92A6C12C@llvm.org> <8E57D391-E68A-4532-B780-2B6FB52F7C2E@apple.com> <52E5CF36-C5F1-4834-8A37-23D68A18268C@2pi.dk> <2559FA6C-2DD4-4256-B1C2-B91C7F416927@2pi.dk> Message-ID: On Jul 19, 2010, at 3:22 PM, Jakob Stoklund Olesen wrote: > > On Jul 19, 2010, at 3:09 PM, Evan Cheng wrote: > >> >> On Jul 19, 2010, at 1:22 PM, Jakob Stoklund Olesen wrote: >>> >>> Can you use some kind of scaling so a DPR counts as 0.5 QPR? >>> >> >> No, I don't like that. I was hoping to avoid having targets provide findRepresentativeClass(). But I think it cannot be avoided. > > I don't think overriding findRepresentativeClass() solves the problem. There is no 'correct' representative register class. > > Whenever you allocate a QPR, you block two DPRs. > Whenever you allocate a DPR, you block one (half) QPR. > > I think you need to model that asymmetry somehow. > We'll see. Register pressure is "estimated" during instruction scheduling. I think we'll get away with the current scheme because it's relatively rare for vector and non-vector to mix in a way for this to be an issue. I want to keep it simple for now. Evan From stoklund at 2pi.dk Mon Jul 19 17:38:20 2010 From: stoklund at 2pi.dk (Jakob Stoklund Olesen) Date: Mon, 19 Jul 2010 15:38:20 -0700 Subject: [llvm-commits] [llvm] r108735 - in /llvm/trunk: include/llvm/Target/TargetLowering.h lib/CodeGen/SelectionDAG/TargetLowering.cpp In-Reply-To: References: <20100719184701.BD0E92A6C12C@llvm.org> <8E57D391-E68A-4532-B780-2B6FB52F7C2E@apple.com> <52E5CF36-C5F1-4834-8A37-23D68A18268C@2pi.dk> <2559FA6C-2DD4-4256-B1C2-B91C7F416927@2pi.dk> Message-ID: On Jul 19, 2010, at 3:25 PM, Eric Christopher wrote: > > On Jul 19, 2010, at 3:22 PM, Jakob Stoklund Olesen wrote: > >> >> On Jul 19, 2010, at 3:09 PM, Evan Cheng wrote: >> >>> >>> On Jul 19, 2010, at 1:22 PM, Jakob Stoklund Olesen wrote: >>>> >>>> Can you use some kind of scaling so a DPR counts as 0.5 QPR? >>>> >>> >>> No, I don't like that. I was hoping to avoid having targets provide findRepresentativeClass(). But I think it cannot be avoided. >> >> I don't think overriding findRepresentativeClass() solves the problem. There is no 'correct' representative register class. >> >> Whenever you allocate a QPR, you block two DPRs. >> Whenever you allocate a DPR, you block one (half) QPR. >> >> I think you need to model that asymmetry somehow. >> > > As a first pass for scheduling wouldn't the second one be a bit overkill? i.e. is there anything wrong with considering it as a full QPR? If so, just round up? QPR has 16 registers, DPR has 32. If each DPR counts as a QPR, the scheduler is going to behave as if there were only 16 DPR registers available. That is almost as bad as scheduling purely for register pressure. From echristo at apple.com Mon Jul 19 17:41:28 2010 From: echristo at apple.com (Eric Christopher) Date: Mon, 19 Jul 2010 15:41:28 -0700 Subject: [llvm-commits] [llvm] r108735 - in /llvm/trunk: include/llvm/Target/TargetLowering.h lib/CodeGen/SelectionDAG/TargetLowering.cpp In-Reply-To: References: <20100719184701.BD0E92A6C12C@llvm.org> <8E57D391-E68A-4532-B780-2B6FB52F7C2E@apple.com> <52E5CF36-C5F1-4834-8A37-23D68A18268C@2pi.dk> <2559FA6C-2DD4-4256-B1C2-B91C7F416927@2pi.dk> Message-ID: <6996DC86-32B5-4C1C-83DE-1D64667E860F@apple.com> On Jul 19, 2010, at 3:38 PM, Jakob Stoklund Olesen wrote: > > On Jul 19, 2010, at 3:25 PM, Eric Christopher wrote: > >> >> On Jul 19, 2010, at 3:22 PM, Jakob Stoklund Olesen wrote: >> >>> >>> On Jul 19, 2010, at 3:09 PM, Evan Cheng wrote: >>> >>>> >>>> On Jul 19, 2010, at 1:22 PM, Jakob Stoklund Olesen wrote: >>>>> >>>>> Can you use some kind of scaling so a DPR counts as 0.5 QPR? >>>>> >>>> >>>> No, I don't like that. I was hoping to avoid having targets provide findRepresentativeClass(). But I think it cannot be avoided. >>> >>> I don't think overriding findRepresentativeClass() solves the problem. There is no 'correct' representative register class. >>> >>> Whenever you allocate a QPR, you block two DPRs. >>> Whenever you allocate a DPR, you block one (half) QPR. >>> >>> I think you need to model that asymmetry somehow. >>> >> >> As a first pass for scheduling wouldn't the second one be a bit overkill? i.e. is there anything wrong with considering it as a full QPR? If so, just round up? > > QPR has 16 registers, DPR has 32. > > If each DPR counts as a QPR, the scheduler is going to behave as if there were only 16 DPR registers available. That is almost as bad as scheduling purely for register pressure. > True, but you could maybe count each QPR as two dprs and if you run into an occasion where that matters it'd suck, but I bet it'd be infrequent. -eric From gohman at apple.com Mon Jul 19 17:48:56 2010 From: gohman at apple.com (Dan Gohman) Date: Mon, 19 Jul 2010 22:48:56 -0000 Subject: [llvm-commits] [llvm] r108765 - in /llvm/trunk: lib/CodeGen/SelectionDAG/FastISel.cpp test/CodeGen/X86/fast-isel-atomic.ll Message-ID: <20100719224856.C6D9C2A6C12C@llvm.org> Author: djg Date: Mon Jul 19 17:48:56 2010 New Revision: 108765 URL: http://llvm.org/viewvc/llvm-project?rev=108765&view=rev Log: After a custom inserter, in a block which has constant instructions, update the current basic block in addition to the current insert position, so that they remain consistent. This fixes rdar://8204072. Added: llvm/trunk/test/CodeGen/X86/fast-isel-atomic.ll Modified: llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp Modified: llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp?rev=108765&r1=108764&r2=108765&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp Mon Jul 19 17:48:56 2010 @@ -276,6 +276,7 @@ void FastISel::recomputeInsertPt() { if (getLastLocalValue()) { FuncInfo.InsertPt = getLastLocalValue(); + FuncInfo.MBB = FuncInfo.InsertPt->getParent(); ++FuncInfo.InsertPt; } else FuncInfo.InsertPt = FuncInfo.MBB->getFirstNonPHI(); Added: llvm/trunk/test/CodeGen/X86/fast-isel-atomic.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/fast-isel-atomic.ll?rev=108765&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/X86/fast-isel-atomic.ll (added) +++ llvm/trunk/test/CodeGen/X86/fast-isel-atomic.ll Mon Jul 19 17:48:56 2010 @@ -0,0 +1,16 @@ +; RUN: llc < %s -O0 -march=x86-64 +; rdar://8204072 + + at sc = external global i8 + at uc = external global i8 + +declare i8 @llvm.atomic.load.and.i8.p0i8(i8* nocapture, i8) nounwind + +define void @test_fetch_and_op() nounwind { +entry: + %tmp40 = call i8 @llvm.atomic.load.and.i8.p0i8(i8* @sc, i8 11) ; [#uses=1] + store i8 %tmp40, i8* @sc + %tmp41 = call i8 @llvm.atomic.load.and.i8.p0i8(i8* @uc, i8 11) ; [#uses=1] + store i8 %tmp41, i8* @uc + ret void +} From stoklund at 2pi.dk Mon Jul 19 17:52:07 2010 From: stoklund at 2pi.dk (Jakob Stoklund Olesen) Date: Mon, 19 Jul 2010 15:52:07 -0700 Subject: [llvm-commits] [llvm] r108735 - in /llvm/trunk: include/llvm/Target/TargetLowering.h lib/CodeGen/SelectionDAG/TargetLowering.cpp In-Reply-To: <6996DC86-32B5-4C1C-83DE-1D64667E860F@apple.com> References: <20100719184701.BD0E92A6C12C@llvm.org> <8E57D391-E68A-4532-B780-2B6FB52F7C2E@apple.com> <52E5CF36-C5F1-4834-8A37-23D68A18268C@2pi.dk> <2559FA6C-2DD4-4256-B1C2-B91C7F416927@2pi.dk> <6996DC86-32B5-4C1C-83DE-1D64667E860F@apple.com> Message-ID: <24318A76-8719-4D72-9F6B-55E0908D1EB6@2pi.dk> On Jul 19, 2010, at 3:41 PM, Eric Christopher wrote: > > On Jul 19, 2010, at 3:38 PM, Jakob Stoklund Olesen wrote: > >> QPR has 16 registers, DPR has 32. >> >> If each DPR counts as a QPR, the scheduler is going to behave as if there were only 16 DPR registers available. That is almost as bad as scheduling purely for register pressure. >> > > True, but you could maybe count each QPR as two dprs and if you run into an occasion where that matters it'd suck, but I bet it'd be infrequent. Right. That's what I meant by scaling. I think it is necessary. Evan is probably right that QPRs and DPRs won't be live at the same time. But we should at least get the number of registers right. Overriding findRepresentativeClass for ARM does get the register counts right, though. From echristo at apple.com Mon Jul 19 17:53:30 2010 From: echristo at apple.com (Eric Christopher) Date: Mon, 19 Jul 2010 15:53:30 -0700 Subject: [llvm-commits] [llvm] r108735 - in /llvm/trunk: include/llvm/Target/TargetLowering.h lib/CodeGen/SelectionDAG/TargetLowering.cpp In-Reply-To: <24318A76-8719-4D72-9F6B-55E0908D1EB6@2pi.dk> References: <20100719184701.BD0E92A6C12C@llvm.org> <8E57D391-E68A-4532-B780-2B6FB52F7C2E@apple.com> <52E5CF36-C5F1-4834-8A37-23D68A18268C@2pi.dk> <2559FA6C-2DD4-4256-B1C2-B91C7F416927@2pi.dk> <6996DC86-32B5-4C1C-83DE-1D64667E860F@apple.com> <24318A76-8719-4D72-9F6B-55E0908D1EB6@2pi.dk> Message-ID: <899F5523-F71E-463F-9E95-204AEEE54CE4@apple.com> On Jul 19, 2010, at 3:52 PM, Jakob Stoklund Olesen wrote: > > On Jul 19, 2010, at 3:41 PM, Eric Christopher wrote: > >> >> On Jul 19, 2010, at 3:38 PM, Jakob Stoklund Olesen wrote: >> >>> QPR has 16 registers, DPR has 32. >>> >>> If each DPR counts as a QPR, the scheduler is going to behave as if there were only 16 DPR registers available. That is almost as bad as scheduling purely for register pressure. >>> >> >> True, but you could maybe count each QPR as two dprs and if you run into an occasion where that matters it'd suck, but I bet it'd be infrequent. > > Right. That's what I meant by scaling. I think it is necessary. > Ah. Yes. > Evan is probably right that QPRs and DPRs won't be live at the same time. > > But we should at least get the number of registers right. > > Overriding findRepresentativeClass for ARM does get the register counts right, though. Right. Violent agreement. :) -eric From dpatel at apple.com Mon Jul 19 18:25:39 2010 From: dpatel at apple.com (Devang Patel) Date: Mon, 19 Jul 2010 23:25:39 -0000 Subject: [llvm-commits] [llvm] r108767 - /llvm/trunk/lib/CodeGen/RegAllocFast.cpp Message-ID: <20100719232539.EDD322A6C12C@llvm.org> Author: dpatel Date: Mon Jul 19 18:25:39 2010 New Revision: 108767 URL: http://llvm.org/viewvc/llvm-project?rev=108767&view=rev Log: Fix memory leak reported by valgrind. Do not visit operands of old instruction. Visit all operands of new instruction. Modified: llvm/trunk/lib/CodeGen/RegAllocFast.cpp Modified: llvm/trunk/lib/CodeGen/RegAllocFast.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RegAllocFast.cpp?rev=108767&r1=108766&r2=108767&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/RegAllocFast.cpp (original) +++ llvm/trunk/lib/CodeGen/RegAllocFast.cpp Mon Jul 19 18:25:39 2010 @@ -753,31 +753,39 @@ // Debug values are not allowed to change codegen in any way. if (MI->isDebugValue()) { - 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 || TargetRegisterInfo::isPhysicalRegister(Reg)) continue; - LiveRegMap::iterator LRI = LiveVirtRegs.find(Reg); - if (LRI != LiveVirtRegs.end()) - setPhysReg(MI, i, LRI->second.PhysReg); - else { - int SS = StackSlotForVirtReg[Reg]; - if (SS == -1) - MO.setReg(0); // We can't allocate a physreg for a DebugValue, sorry! + bool ScanDbgValue = true; + while (ScanDbgValue) { + ScanDbgValue = false; + 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 || TargetRegisterInfo::isPhysicalRegister(Reg)) continue; + LiveRegMap::iterator LRI = LiveVirtRegs.find(Reg); + if (LRI != LiveVirtRegs.end()) + setPhysReg(MI, i, LRI->second.PhysReg); else { - // Modify DBG_VALUE now that the value is in a spill slot. - uint64_t Offset = MI->getOperand(1).getImm(); - const MDNode *MDPtr = - MI->getOperand(MI->getNumOperands()-1).getMetadata(); - DebugLoc DL = MI->getDebugLoc(); - if (MachineInstr *NewDV = - TII->emitFrameIndexDebugValue(*MF, SS, Offset, MDPtr, DL)) { - DEBUG(dbgs() << "Modifying debug info due to spill:" << "\t" << *MI); - MachineBasicBlock *MBB = MI->getParent(); - MBB->insert(MBB->erase(MI), NewDV); - } else + int SS = StackSlotForVirtReg[Reg]; + if (SS == -1) MO.setReg(0); // We can't allocate a physreg for a DebugValue, sorry! + else { + // Modify DBG_VALUE now that the value is in a spill slot. + uint64_t Offset = MI->getOperand(1).getImm(); + const MDNode *MDPtr = + MI->getOperand(MI->getNumOperands()-1).getMetadata(); + DebugLoc DL = MI->getDebugLoc(); + if (MachineInstr *NewDV = + TII->emitFrameIndexDebugValue(*MF, SS, Offset, MDPtr, DL)) { + DEBUG(dbgs() << "Modifying debug info due to spill:" << "\t" << *MI); + MachineBasicBlock *MBB = MI->getParent(); + MBB->insert(MBB->erase(MI), NewDV); + // Scan NewDV operands from the beginning. + MI = NewDV; + ScanDbgValue = true; + break; + } else + MO.setReg(0); // We can't allocate a physreg for a DebugValue, sorry! + } } } } From dpatel at apple.com Mon Jul 19 18:26:44 2010 From: dpatel at apple.com (Devang Patel) Date: Mon, 19 Jul 2010 16:26:44 -0700 Subject: [llvm-commits] [llvm] r107678 - in /llvm/trunk: lib/Target/X86/AsmPrinter/X86MCInstLower.cpp test/CodeGen/X86/2010-07-06-DbgCrash.ll In-Reply-To: References: <20100706181832.4A4402A6C12C@llvm.org> <0CA13FB8-22D9-43AE-86A0-ECA778FAB91D@apple.com> Message-ID: <5EAED277-ED59-4B81-8757-52E035530D77@apple.com> On Jul 17, 2010, at 11:33 AM, Benjamin Kramer wrote: > > On 16.07.2010, at 22:16, Devang Patel wrote: > >> Valgrind on my mac is not reporting this error. Is it possible for any one with linux box to shed a little light here ? > > It only shows up on x86, probably due to register allocation differences. Here's a line to reproduce in darwin: > > valgrind llc -march=x86 -O0 -relocation-model pic < test/CodeGen/X86/2010-07-06-DbgCrash.ll -o /dev/null Indeed. Thanks! Fixed in r108767 - Devang -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20100719/c22d2c68/attachment.html From bruno.cardoso at gmail.com Mon Jul 19 18:32:44 2010 From: bruno.cardoso at gmail.com (Bruno Cardoso Lopes) Date: Mon, 19 Jul 2010 23:32:44 -0000 Subject: [llvm-commits] [llvm] r108769 - in /llvm/trunk: lib/Target/X86/AsmPrinter/X86ATTInstPrinter.h lib/Target/X86/AsmPrinter/X86IntelInstPrinter.h lib/Target/X86/X86InstrFragmentsSIMD.td lib/Target/X86/X86InstrInfo.td lib/Target/X86/X86InstrSSE.td lib/Target/X86/X86RegisterInfo.td test/MC/AsmParser/X86/x86_32-encoding.s test/MC/AsmParser/X86/x86_64-encoding.s utils/TableGen/EDEmitter.cpp Message-ID: <20100719233245.47F512A6C12C@llvm.org> Author: bruno Date: Mon Jul 19 18:32:44 2010 New Revision: 108769 URL: http://llvm.org/viewvc/llvm-project?rev=108769&view=rev Log: Add 256-bit vaddsub, vhadd, vhsub, vblend and vdpp instructions! Modified: llvm/trunk/lib/Target/X86/AsmPrinter/X86ATTInstPrinter.h llvm/trunk/lib/Target/X86/AsmPrinter/X86IntelInstPrinter.h llvm/trunk/lib/Target/X86/X86InstrFragmentsSIMD.td llvm/trunk/lib/Target/X86/X86InstrInfo.td llvm/trunk/lib/Target/X86/X86InstrSSE.td llvm/trunk/lib/Target/X86/X86RegisterInfo.td llvm/trunk/test/MC/AsmParser/X86/x86_32-encoding.s llvm/trunk/test/MC/AsmParser/X86/x86_64-encoding.s llvm/trunk/utils/TableGen/EDEmitter.cpp Modified: llvm/trunk/lib/Target/X86/AsmPrinter/X86ATTInstPrinter.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/AsmPrinter/X86ATTInstPrinter.h?rev=108769&r1=108768&r2=108769&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/AsmPrinter/X86ATTInstPrinter.h (original) +++ llvm/trunk/lib/Target/X86/AsmPrinter/X86ATTInstPrinter.h Mon Jul 19 18:32:44 2010 @@ -56,6 +56,9 @@ void printi128mem(const MCInst *MI, unsigned OpNo, raw_ostream &O) { printMemReference(MI, OpNo, O); } + void printi256mem(const MCInst *MI, unsigned OpNo, raw_ostream &O) { + printMemReference(MI, OpNo, O); + } void printf32mem(const MCInst *MI, unsigned OpNo, raw_ostream &O) { printMemReference(MI, OpNo, O); } Modified: llvm/trunk/lib/Target/X86/AsmPrinter/X86IntelInstPrinter.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/AsmPrinter/X86IntelInstPrinter.h?rev=108769&r1=108768&r2=108769&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/AsmPrinter/X86IntelInstPrinter.h (original) +++ llvm/trunk/lib/Target/X86/AsmPrinter/X86IntelInstPrinter.h Mon Jul 19 18:32:44 2010 @@ -64,6 +64,10 @@ O << "XMMWORD PTR "; printMemReference(MI, OpNo, O); } + void printi256mem(const MCInst *MI, unsigned OpNo, raw_ostream &O) { + O << "YMMWORD PTR "; + printMemReference(MI, OpNo, O); + } void printf32mem(const MCInst *MI, unsigned OpNo, raw_ostream &O) { O << "DWORD PTR "; printMemReference(MI, OpNo, O); Modified: llvm/trunk/lib/Target/X86/X86InstrFragmentsSIMD.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrFragmentsSIMD.td?rev=108769&r1=108768&r2=108769&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86InstrFragmentsSIMD.td (original) +++ llvm/trunk/lib/Target/X86/X86InstrFragmentsSIMD.td Mon Jul 19 18:32:44 2010 @@ -213,6 +213,7 @@ def memopv16i8 : PatFrag<(ops node:$ptr), (v16i8 (memop node:$ptr))>; // FIXME: move this to a more appropriate place after all AVX is done. +def memopv32i8 : PatFrag<(ops node:$ptr), (v32i8 (memop node:$ptr))>; def memopv8f32 : PatFrag<(ops node:$ptr), (v8f32 (memop node:$ptr))>; def memopv4f64 : PatFrag<(ops node:$ptr), (v4f64 (memop node:$ptr))>; Modified: llvm/trunk/lib/Target/X86/X86InstrInfo.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrInfo.td?rev=108769&r1=108768&r2=108769&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86InstrInfo.td (original) +++ llvm/trunk/lib/Target/X86/X86InstrInfo.td Mon Jul 19 18:32:44 2010 @@ -222,7 +222,7 @@ def i32mem : X86MemOperand<"printi32mem">; def i64mem : X86MemOperand<"printi64mem">; def i128mem : X86MemOperand<"printi128mem">; -//def i256mem : X86MemOperand<"printi256mem">; +def i256mem : X86MemOperand<"printi256mem">; def f32mem : X86MemOperand<"printf32mem">; def f64mem : X86MemOperand<"printf64mem">; def f80mem : X86MemOperand<"printf80mem">; Modified: llvm/trunk/lib/Target/X86/X86InstrSSE.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrSSE.td?rev=108769&r1=108768&r2=108769&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86InstrSSE.td (original) +++ llvm/trunk/lib/Target/X86/X86InstrSSE.td Mon Jul 19 18:32:44 2010 @@ -3125,35 +3125,41 @@ // SSE3 - Arithmetic //===---------------------------------------------------------------------===// -multiclass sse3_addsub { +multiclass sse3_addsub { def rr : I<0xD0, MRMSrcReg, - (outs VR128:$dst), (ins VR128:$src1, VR128:$src2), + (outs RC:$dst), (ins RC:$src1, RC:$src2), !if(Is2Addr, !strconcat(OpcodeStr, "\t{$src2, $dst|$dst, $src2}"), !strconcat(OpcodeStr, "\t{$src2, $src1, $dst|$dst, $src1, $src2}")), - [(set VR128:$dst, (Int VR128:$src1, - VR128:$src2))]>; + [(set RC:$dst, (Int RC:$src1, RC:$src2))]>; def rm : I<0xD0, MRMSrcMem, - (outs VR128:$dst), (ins VR128:$src1, f128mem:$src2), + (outs RC:$dst), (ins RC:$src1, x86memop:$src2), !if(Is2Addr, !strconcat(OpcodeStr, "\t{$src2, $dst|$dst, $src2}"), !strconcat(OpcodeStr, "\t{$src2, $src1, $dst|$dst, $src1, $src2}")), - [(set VR128:$dst, (Int VR128:$src1, - (memop addr:$src2)))]>; - + [(set RC:$dst, (Int RC:$src1, (memop addr:$src2)))]>; } let isAsmParserOnly = 1, Predicates = [HasAVX], ExeDomain = SSEPackedDouble in { - defm VADDSUBPS : sse3_addsub, XD, - VEX_4V; - defm VADDSUBPD : sse3_addsub, OpSize, - VEX_4V; + defm VADDSUBPS : sse3_addsub, XD, VEX_4V; + defm VADDSUBPD : sse3_addsub, OpSize, VEX_4V; + let Pattern = [] in { + defm VADDSUBPSY : sse3_addsub, XD, VEX_4V; + defm VADDSUBPDY : sse3_addsub, OpSize, VEX_4V; + } } let Constraints = "$src1 = $dst", Predicates = [HasSSE3], ExeDomain = SSEPackedDouble in { - defm ADDSUBPS : sse3_addsub, XD; - defm ADDSUBPD : sse3_addsub, TB, OpSize; + defm ADDSUBPS : sse3_addsub, XD; + defm ADDSUBPD : sse3_addsub, TB, OpSize; } //===---------------------------------------------------------------------===// @@ -3161,51 +3167,65 @@ //===---------------------------------------------------------------------===// // Horizontal ops -class S3D_Intrr o, string OpcodeStr, Intrinsic IntId, bit Is2Addr = 1> - : S3DI o, string OpcodeStr, ValueType vt, RegisterClass RC, + X86MemOperand x86memop, Intrinsic IntId, bit Is2Addr = 1> { + def rr : S3DI; -class S3D_Intrm o, string OpcodeStr, Intrinsic IntId, bit Is2Addr = 1> - : S3DI; + + def rm : S3DI; -class S3_Intrr o, string OpcodeStr, Intrinsic IntId, bit Is2Addr = 1> - : S3I; +} +multiclass S3_Int o, string OpcodeStr, ValueType vt, RegisterClass RC, + X86MemOperand x86memop, Intrinsic IntId, bit Is2Addr = 1> { + def rr : S3I; -class S3_Intrm o, string OpcodeStr, Intrinsic IntId, bit Is2Addr = 1> - : S3I; + + def rm : S3I; + [(set RC:$dst, (vt (IntId RC:$src1, (memop addr:$src2))))]>; +} let isAsmParserOnly = 1, Predicates = [HasAVX] in { - def VHADDPSrr : S3D_Intrr<0x7C, "vhaddps", int_x86_sse3_hadd_ps, 0>, VEX_4V; - def VHADDPSrm : S3D_Intrm<0x7C, "vhaddps", int_x86_sse3_hadd_ps, 0>, VEX_4V; - def VHADDPDrr : S3_Intrr <0x7C, "vhaddpd", int_x86_sse3_hadd_pd, 0>, VEX_4V; - def VHADDPDrm : S3_Intrm <0x7C, "vhaddpd", int_x86_sse3_hadd_pd, 0>, VEX_4V; - def VHSUBPSrr : S3D_Intrr<0x7D, "vhsubps", int_x86_sse3_hsub_ps, 0>, VEX_4V; - def VHSUBPSrm : S3D_Intrm<0x7D, "vhsubps", int_x86_sse3_hsub_ps, 0>, VEX_4V; - def VHSUBPDrr : S3_Intrr <0x7D, "vhsubpd", int_x86_sse3_hsub_pd, 0>, VEX_4V; - def VHSUBPDrm : S3_Intrm <0x7D, "vhsubpd", int_x86_sse3_hsub_pd, 0>, VEX_4V; + defm VHADDPS : S3D_Int<0x7C, "vhaddps", v4f32, VR128, f128mem, + int_x86_sse3_hadd_ps, 0>, VEX_4V; + defm VHADDPD : S3_Int <0x7C, "vhaddpd", v2f64, VR128, f128mem, + int_x86_sse3_hadd_pd, 0>, VEX_4V; + defm VHSUBPS : S3D_Int<0x7D, "vhsubps", v4f32, VR128, f128mem, + int_x86_sse3_hsub_ps, 0>, VEX_4V; + defm VHSUBPD : S3_Int <0x7D, "vhsubpd", v2f64, VR128, f128mem, + int_x86_sse3_hsub_pd, 0>, VEX_4V; + let Pattern = [] in { + defm VHADDPSY : S3D_Int<0x7C, "vhaddps", v8f32, VR256, f256mem, + int_x86_sse3_hadd_ps, 0>, VEX_4V; + defm VHADDPDY : S3_Int <0x7C, "vhaddpd", v4f64, VR256, f256mem, + int_x86_sse3_hadd_pd, 0>, VEX_4V; + defm VHSUBPSY : S3D_Int<0x7D, "vhsubps", v8f32, VR256, f256mem, + int_x86_sse3_hsub_ps, 0>, VEX_4V; + defm VHSUBPDY : S3_Int <0x7D, "vhsubpd", v4f64, VR256, f256mem, + int_x86_sse3_hsub_pd, 0>, VEX_4V; + } } let Constraints = "$src1 = $dst" in { - def HADDPSrr : S3D_Intrr<0x7C, "haddps", int_x86_sse3_hadd_ps>; - def HADDPSrm : S3D_Intrm<0x7C, "haddps", int_x86_sse3_hadd_ps>; - def HADDPDrr : S3_Intrr <0x7C, "haddpd", int_x86_sse3_hadd_pd>; - def HADDPDrm : S3_Intrm <0x7C, "haddpd", int_x86_sse3_hadd_pd>; - def HSUBPSrr : S3D_Intrr<0x7D, "hsubps", int_x86_sse3_hsub_ps>; - def HSUBPSrm : S3D_Intrm<0x7D, "hsubps", int_x86_sse3_hsub_ps>; - def HSUBPDrr : S3_Intrr <0x7D, "hsubpd", int_x86_sse3_hsub_pd>; - def HSUBPDrm : S3_Intrm <0x7D, "hsubpd", int_x86_sse3_hsub_pd>; + defm HADDPS : S3D_Int<0x7C, "haddps", v4f32, VR128, f128mem, + int_x86_sse3_hadd_ps>; + defm HADDPD : S3_Int<0x7C, "haddpd", v2f64, VR128, f128mem, + int_x86_sse3_hadd_pd>; + defm HSUBPS : S3D_Int<0x7D, "hsubps", v4f32, VR128, f128mem, + int_x86_sse3_hsub_ps>; + defm HSUBPD : S3_Int<0x7D, "hsubpd", v2f64, VR128, f128mem, + int_x86_sse3_hsub_pd>; } //===---------------------------------------------------------------------===// @@ -4431,79 +4451,98 @@ /// SS41I_binop_rmi_int - SSE 4.1 binary operator with 8-bit immediate multiclass SS41I_binop_rmi_int opc, string OpcodeStr, - Intrinsic IntId128, bit Is2Addr = 1> { + Intrinsic IntId, RegisterClass RC, PatFrag memop_frag, + X86MemOperand x86memop, bit Is2Addr = 1> { let isCommutable = 1 in - def rri : SS4AIi8, + [(set RC:$dst, (IntId RC:$src1, RC:$src2, imm:$src3))]>, OpSize; - def rmi : SS4AIi8, + [(set RC:$dst, + (IntId RC:$src1, + (bitconvert (memop_frag addr:$src2)), imm:$src3))]>, OpSize; } let isAsmParserOnly = 1, Predicates = [HasAVX] in { let isCommutable = 0 in { defm VBLENDPS : SS41I_binop_rmi_int<0x0C, "vblendps", int_x86_sse41_blendps, - 0>, VEX_4V; + VR128, memopv16i8, i128mem, 0>, VEX_4V; defm VBLENDPD : SS41I_binop_rmi_int<0x0D, "vblendpd", int_x86_sse41_blendpd, - 0>, VEX_4V; + VR128, memopv16i8, i128mem, 0>, VEX_4V; + let Pattern = [] in { + defm VBLENDPSY : SS41I_binop_rmi_int<0x0C, "vblendps", int_x86_sse41_blendps, + VR256, memopv32i8, i256mem, 0>, VEX_4V; + defm VBLENDPDY : SS41I_binop_rmi_int<0x0D, "vblendpd", int_x86_sse41_blendpd, + VR256, memopv32i8, i256mem, 0>, VEX_4V; + } defm VPBLENDW : SS41I_binop_rmi_int<0x0E, "vpblendw", int_x86_sse41_pblendw, - 0>, VEX_4V; + VR128, memopv16i8, i128mem, 0>, VEX_4V; defm VMPSADBW : SS41I_binop_rmi_int<0x42, "vmpsadbw", int_x86_sse41_mpsadbw, - 0>, VEX_4V; + VR128, memopv16i8, i128mem, 0>, VEX_4V; } defm VDPPS : SS41I_binop_rmi_int<0x40, "vdpps", int_x86_sse41_dpps, - 0>, VEX_4V; + VR128, memopv16i8, i128mem, 0>, VEX_4V; defm VDPPD : SS41I_binop_rmi_int<0x41, "vdppd", int_x86_sse41_dppd, - 0>, VEX_4V; + VR128, memopv16i8, i128mem, 0>, VEX_4V; + let Pattern = [] in + defm VDPPSY : SS41I_binop_rmi_int<0x40, "vdpps", int_x86_sse41_dpps, + VR256, memopv32i8, i256mem, 0>, VEX_4V; } let Constraints = "$src1 = $dst" in { let isCommutable = 0 in { - defm BLENDPS : SS41I_binop_rmi_int<0x0C, "blendps", int_x86_sse41_blendps>; - defm BLENDPD : SS41I_binop_rmi_int<0x0D, "blendpd", int_x86_sse41_blendpd>; - defm PBLENDW : SS41I_binop_rmi_int<0x0E, "pblendw", int_x86_sse41_pblendw>; - defm MPSADBW : SS41I_binop_rmi_int<0x42, "mpsadbw", int_x86_sse41_mpsadbw>; + defm BLENDPS : SS41I_binop_rmi_int<0x0C, "blendps", int_x86_sse41_blendps, + VR128, memopv16i8, i128mem>; + defm BLENDPD : SS41I_binop_rmi_int<0x0D, "blendpd", int_x86_sse41_blendpd, + VR128, memopv16i8, i128mem>; + defm PBLENDW : SS41I_binop_rmi_int<0x0E, "pblendw", int_x86_sse41_pblendw, + VR128, memopv16i8, i128mem>; + defm MPSADBW : SS41I_binop_rmi_int<0x42, "mpsadbw", int_x86_sse41_mpsadbw, + VR128, memopv16i8, i128mem>; } - defm DPPS : SS41I_binop_rmi_int<0x40, "dpps", int_x86_sse41_dpps>; - defm DPPD : SS41I_binop_rmi_int<0x41, "dppd", int_x86_sse41_dppd>; + defm DPPS : SS41I_binop_rmi_int<0x40, "dpps", int_x86_sse41_dpps, + VR128, memopv16i8, i128mem>; + defm DPPD : SS41I_binop_rmi_int<0x41, "dppd", int_x86_sse41_dppd, + VR128, memopv16i8, i128mem>; } /// SS41I_quaternary_int_avx - AVX SSE 4.1 with 4 operators let isAsmParserOnly = 1, Predicates = [HasAVX] in { - multiclass SS41I_quaternary_int_avx opc, string OpcodeStr> { - def rr : I, OpSize, TA, VEX_4V, VEX_I8IMM; - - def rm : I, OpSize, TA, VEX_4V, VEX_I8IMM; - } +multiclass SS41I_quaternary_int_avx opc, string OpcodeStr, + RegisterClass RC, X86MemOperand x86memop> { + def rr : I, OpSize, TA, VEX_4V, VEX_I8IMM; + + def rm : I, OpSize, TA, VEX_4V, VEX_I8IMM; } +} + +defm VBLENDVPD : SS41I_quaternary_int_avx<0x4B, "vblendvpd", VR128, i128mem>; +defm VBLENDVPS : SS41I_quaternary_int_avx<0x4A, "vblendvps", VR128, i128mem>; +defm VBLENDVPDY : SS41I_quaternary_int_avx<0x4B, "vblendvpd", VR256, i256mem>; +defm VBLENDVPSY : SS41I_quaternary_int_avx<0x4A, "vblendvps", VR256, i256mem>; -defm VBLENDVPD : SS41I_quaternary_int_avx<0x4B, "vblendvpd">; -defm VBLENDVPS : SS41I_quaternary_int_avx<0x4A, "vblendvps">; -defm VPBLENDVB : SS41I_quaternary_int_avx<0x4C, "vpblendvb">; +defm VPBLENDVB : SS41I_quaternary_int_avx<0x4C, "vpblendvb", VR128, i128mem>; /// SS41I_ternary_int - SSE 4.1 ternary operator let Uses = [XMM0], Constraints = "$src1 = $dst" in { Modified: llvm/trunk/lib/Target/X86/X86RegisterInfo.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86RegisterInfo.td?rev=108769&r1=108768&r2=108769&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86RegisterInfo.td (original) +++ llvm/trunk/lib/Target/X86/X86RegisterInfo.td Mon Jul 19 18:32:44 2010 @@ -804,7 +804,7 @@ }]; } -def VR256 : RegisterClass<"X86", [v8i32, v4i64, v8f32, v4f64], 256, +def VR256 : RegisterClass<"X86", [v32i8, v8i32, v4i64, v8f32, v4f64], 256, [YMM0, YMM1, YMM2, YMM3, YMM4, YMM5, YMM6, YMM7, YMM8, YMM9, YMM10, YMM11, YMM12, YMM13, YMM14, YMM15]> { Modified: llvm/trunk/test/MC/AsmParser/X86/x86_32-encoding.s URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AsmParser/X86/x86_32-encoding.s?rev=108769&r1=108768&r2=108769&view=diff ============================================================================== --- llvm/trunk/test/MC/AsmParser/X86/x86_32-encoding.s (original) +++ llvm/trunk/test/MC/AsmParser/X86/x86_32-encoding.s Mon Jul 19 18:32:44 2010 @@ -12926,3 +12926,75 @@ // CHECK: encoding: [0xc5,0xec,0xc2,0xd9,0x1f] vcmptrue_usps %ymm1, %ymm2, %ymm3 +// CHECK: vaddsubps %ymm1, %ymm2, %ymm3 +// CHECK: encoding: [0xc5,0xef,0xd0,0xd9] + vaddsubps %ymm1, %ymm2, %ymm3 + +// CHECK: vaddsubps (%eax), %ymm1, %ymm2 +// CHECK: encoding: [0xc5,0xf7,0xd0,0x10] + vaddsubps (%eax), %ymm1, %ymm2 + +// CHECK: vaddsubpd %ymm1, %ymm2, %ymm3 +// CHECK: encoding: [0xc5,0xed,0xd0,0xd9] + vaddsubpd %ymm1, %ymm2, %ymm3 + +// CHECK: vaddsubpd (%eax), %ymm1, %ymm2 +// CHECK: encoding: [0xc5,0xf5,0xd0,0x10] + vaddsubpd (%eax), %ymm1, %ymm2 + +// CHECK: vhaddps %ymm1, %ymm2, %ymm3 +// CHECK: encoding: [0xc5,0xef,0x7c,0xd9] + vhaddps %ymm1, %ymm2, %ymm3 + +// CHECK: vhaddps (%eax), %ymm2, %ymm3 +// CHECK: encoding: [0xc5,0xef,0x7c,0x18] + vhaddps (%eax), %ymm2, %ymm3 + +// CHECK: vhaddpd %ymm1, %ymm2, %ymm3 +// CHECK: encoding: [0xc5,0xed,0x7c,0xd9] + vhaddpd %ymm1, %ymm2, %ymm3 + +// CHECK: vhaddpd (%eax), %ymm2, %ymm3 +// CHECK: encoding: [0xc5,0xed,0x7c,0x18] + vhaddpd (%eax), %ymm2, %ymm3 + +// CHECK: vhsubps %ymm1, %ymm2, %ymm3 +// CHECK: encoding: [0xc5,0xef,0x7d,0xd9] + vhsubps %ymm1, %ymm2, %ymm3 + +// CHECK: vhsubps (%eax), %ymm2, %ymm3 +// CHECK: encoding: [0xc5,0xef,0x7d,0x18] + vhsubps (%eax), %ymm2, %ymm3 + +// CHECK: vhsubpd %ymm1, %ymm2, %ymm3 +// CHECK: encoding: [0xc5,0xed,0x7d,0xd9] + vhsubpd %ymm1, %ymm2, %ymm3 + +// CHECK: vhsubpd (%eax), %ymm2, %ymm3 +// CHECK: encoding: [0xc5,0xed,0x7d,0x18] + vhsubpd (%eax), %ymm2, %ymm3 + +// CHECK: vblendps $3, %ymm2, %ymm5, %ymm1 +// CHECK: encoding: [0xc4,0xe3,0x55,0x0c,0xca,0x03] + vblendps $3, %ymm2, %ymm5, %ymm1 + +// CHECK: vblendps $3, (%eax), %ymm5, %ymm1 +// CHECK: encoding: [0xc4,0xe3,0x55,0x0c,0x08,0x03] + vblendps $3, (%eax), %ymm5, %ymm1 + +// CHECK: vblendpd $3, %ymm2, %ymm5, %ymm1 +// CHECK: encoding: [0xc4,0xe3,0x55,0x0d,0xca,0x03] + vblendpd $3, %ymm2, %ymm5, %ymm1 + +// CHECK: vblendpd $3, (%eax), %ymm5, %ymm1 +// CHECK: encoding: [0xc4,0xe3,0x55,0x0d,0x08,0x03] + vblendpd $3, (%eax), %ymm5, %ymm1 + +// CHECK: vdpps $3, %ymm2, %ymm5, %ymm1 +// CHECK: encoding: [0xc4,0xe3,0x55,0x40,0xca,0x03] + vdpps $3, %ymm2, %ymm5, %ymm1 + +// CHECK: vdpps $3, (%eax), %ymm5, %ymm1 +// CHECK: encoding: [0xc4,0xe3,0x55,0x40,0x08,0x03] + vdpps $3, (%eax), %ymm5, %ymm1 + Modified: llvm/trunk/test/MC/AsmParser/X86/x86_64-encoding.s URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AsmParser/X86/x86_64-encoding.s?rev=108769&r1=108768&r2=108769&view=diff ============================================================================== --- llvm/trunk/test/MC/AsmParser/X86/x86_64-encoding.s (original) +++ llvm/trunk/test/MC/AsmParser/X86/x86_64-encoding.s Mon Jul 19 18:32:44 2010 @@ -3000,3 +3000,75 @@ // CHECK: encoding: [0xc4,0x41,0x1c,0xc2,0xeb,0x1f] vcmptrue_usps %ymm11, %ymm12, %ymm13 +// CHECK: vaddsubps %ymm11, %ymm12, %ymm13 +// CHECK: encoding: [0xc4,0x41,0x1f,0xd0,0xeb] + vaddsubps %ymm11, %ymm12, %ymm13 + +// CHECK: vaddsubps (%rax), %ymm11, %ymm12 +// CHECK: encoding: [0xc5,0x27,0xd0,0x20] + vaddsubps (%rax), %ymm11, %ymm12 + +// CHECK: vaddsubpd %ymm11, %ymm12, %ymm13 +// CHECK: encoding: [0xc4,0x41,0x1d,0xd0,0xeb] + vaddsubpd %ymm11, %ymm12, %ymm13 + +// CHECK: vaddsubpd (%rax), %ymm11, %ymm12 +// CHECK: encoding: [0xc5,0x25,0xd0,0x20] + vaddsubpd (%rax), %ymm11, %ymm12 + +// CHECK: vhaddps %ymm11, %ymm12, %ymm13 +// CHECK: encoding: [0xc4,0x41,0x1f,0x7c,0xeb] + vhaddps %ymm11, %ymm12, %ymm13 + +// CHECK: vhaddps (%rax), %ymm12, %ymm13 +// CHECK: encoding: [0xc5,0x1f,0x7c,0x28] + vhaddps (%rax), %ymm12, %ymm13 + +// CHECK: vhaddpd %ymm11, %ymm12, %ymm13 +// CHECK: encoding: [0xc4,0x41,0x1d,0x7c,0xeb] + vhaddpd %ymm11, %ymm12, %ymm13 + +// CHECK: vhaddpd (%rax), %ymm12, %ymm13 +// CHECK: encoding: [0xc5,0x1d,0x7c,0x28] + vhaddpd (%rax), %ymm12, %ymm13 + +// CHECK: vhsubps %ymm11, %ymm12, %ymm13 +// CHECK: encoding: [0xc4,0x41,0x1f,0x7d,0xeb] + vhsubps %ymm11, %ymm12, %ymm13 + +// CHECK: vhsubps (%rax), %ymm12, %ymm13 +// CHECK: encoding: [0xc5,0x1f,0x7d,0x28] + vhsubps (%rax), %ymm12, %ymm13 + +// CHECK: vhsubpd %ymm11, %ymm12, %ymm13 +// CHECK: encoding: [0xc4,0x41,0x1d,0x7d,0xeb] + vhsubpd %ymm11, %ymm12, %ymm13 + +// CHECK: vhsubpd (%rax), %ymm12, %ymm13 +// CHECK: encoding: [0xc5,0x1d,0x7d,0x28] + vhsubpd (%rax), %ymm12, %ymm13 + +// CHECK: vblendps $3, %ymm12, %ymm10, %ymm11 +// CHECK: encoding: [0xc4,0x43,0x2d,0x0c,0xdc,0x03] + vblendps $3, %ymm12, %ymm10, %ymm11 + +// CHECK: vblendps $3, (%rax), %ymm10, %ymm11 +// CHECK: encoding: [0xc4,0x63,0x2d,0x0c,0x18,0x03] + vblendps $3, (%rax), %ymm10, %ymm11 + +// CHECK: vblendpd $3, %ymm12, %ymm10, %ymm11 +// CHECK: encoding: [0xc4,0x43,0x2d,0x0d,0xdc,0x03] + vblendpd $3, %ymm12, %ymm10, %ymm11 + +// CHECK: vblendpd $3, (%rax), %ymm10, %ymm11 +// CHECK: encoding: [0xc4,0x63,0x2d,0x0d,0x18,0x03] + vblendpd $3, (%rax), %ymm10, %ymm11 + +// CHECK: vdpps $3, %ymm12, %ymm10, %ymm11 +// CHECK: encoding: [0xc4,0x43,0x2d,0x40,0xdc,0x03] + vdpps $3, %ymm12, %ymm10, %ymm11 + +// CHECK: vdpps $3, (%rax), %ymm10, %ymm11 +// CHECK: encoding: [0xc4,0x63,0x2d,0x40,0x18,0x03] + vdpps $3, (%rax), %ymm10, %ymm11 + Modified: llvm/trunk/utils/TableGen/EDEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/EDEmitter.cpp?rev=108769&r1=108768&r2=108769&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/EDEmitter.cpp (original) +++ llvm/trunk/utils/TableGen/EDEmitter.cpp Mon Jul 19 18:32:44 2010 @@ -339,6 +339,7 @@ MEM("f80mem"); MEM("opaque80mem"); MEM("i128mem"); + MEM("i256mem"); MEM("f128mem"); MEM("f256mem"); MEM("opaque512mem"); From sabre at nondot.org Mon Jul 19 18:41:57 2010 From: sabre at nondot.org (Chris Lattner) Date: Mon, 19 Jul 2010 23:41:57 -0000 Subject: [llvm-commits] [llvm] r108782 - in /llvm/trunk/lib/Target/X86: AsmPrinter/X86AsmPrinter.cpp AsmPrinter/X86AsmPrinter.h AsmPrinter/X86MCInstLower.cpp AsmPrinter/X86MCInstLower.h X86AsmPrinter.cpp X86AsmPrinter.h X86MCInstLower.cpp X86MCInstLower.h Message-ID: <20100719234157.45E312A6C12C@llvm.org> Author: lattner Date: Mon Jul 19 18:41:57 2010 New Revision: 108782 URL: http://llvm.org/viewvc/llvm-project?rev=108782&view=rev Log: fix a layering problem by moving the x86 implementation of AsmPrinter and InstLowering into libx86 and out of the asmprinter subdirectory. Now X86/AsmPrinter just depends on MC stuff, not all of codegen and LLVM IR. Added: llvm/trunk/lib/Target/X86/X86AsmPrinter.cpp - copied, changed from r108730, llvm/trunk/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp llvm/trunk/lib/Target/X86/X86AsmPrinter.h - copied, changed from r108730, llvm/trunk/lib/Target/X86/AsmPrinter/X86AsmPrinter.h llvm/trunk/lib/Target/X86/X86MCInstLower.cpp - copied unchanged from r108730, llvm/trunk/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp llvm/trunk/lib/Target/X86/X86MCInstLower.h - copied unchanged from r108730, llvm/trunk/lib/Target/X86/AsmPrinter/X86MCInstLower.h Removed: llvm/trunk/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp llvm/trunk/lib/Target/X86/AsmPrinter/X86AsmPrinter.h llvm/trunk/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp llvm/trunk/lib/Target/X86/AsmPrinter/X86MCInstLower.h Removed: llvm/trunk/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp?rev=108781&view=auto ============================================================================== --- llvm/trunk/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp (removed) @@ -1,684 +0,0 @@ -//===-- X86AsmPrinter.cpp - Convert X86 LLVM code to AT&T assembly --------===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file contains a printer that converts from our internal representation -// of machine-dependent LLVM code to X86 machine code. -// -//===----------------------------------------------------------------------===// - -#include "X86AsmPrinter.h" -#include "X86ATTInstPrinter.h" -#include "X86IntelInstPrinter.h" -#include "X86MCInstLower.h" -#include "X86.h" -#include "X86COFFMachineModuleInfo.h" -#include "X86MachineFunctionInfo.h" -#include "X86TargetMachine.h" -#include "llvm/CallingConv.h" -#include "llvm/DerivedTypes.h" -#include "llvm/Module.h" -#include "llvm/Type.h" -#include "llvm/Assembly/Writer.h" -#include "llvm/MC/MCAsmInfo.h" -#include "llvm/MC/MCContext.h" -#include "llvm/MC/MCExpr.h" -#include "llvm/MC/MCSectionMachO.h" -#include "llvm/MC/MCStreamer.h" -#include "llvm/MC/MCSymbol.h" -#include "llvm/CodeGen/MachineJumpTableInfo.h" -#include "llvm/CodeGen/MachineModuleInfoImpls.h" -#include "llvm/CodeGen/TargetLoweringObjectFileImpl.h" -#include "llvm/Support/COFF.h" -#include "llvm/Support/ErrorHandling.h" -#include "llvm/Target/Mangler.h" -#include "llvm/Target/TargetOptions.h" -#include "llvm/Target/TargetRegistry.h" -#include "llvm/ADT/SmallString.h" -using namespace llvm; - -//===----------------------------------------------------------------------===// -// Primitive Helper Functions. -//===----------------------------------------------------------------------===// - -void X86AsmPrinter::PrintPICBaseSymbol(raw_ostream &O) const { - const TargetLowering *TLI = TM.getTargetLowering(); - O << *static_cast(TLI)->getPICBaseSymbol(MF, - OutContext); -} - -/// runOnMachineFunction - Emit the function body. -/// -bool X86AsmPrinter::runOnMachineFunction(MachineFunction &MF) { - SetupMachineFunction(MF); - - if (Subtarget->isTargetCOFF()) { - bool Intrn = MF.getFunction()->hasInternalLinkage(); - OutStreamer.BeginCOFFSymbolDef(CurrentFnSym); - OutStreamer.EmitCOFFSymbolStorageClass(Intrn ? COFF::IMAGE_SYM_CLASS_STATIC - : COFF::IMAGE_SYM_CLASS_EXTERNAL); - OutStreamer.EmitCOFFSymbolType(COFF::IMAGE_SYM_DTYPE_FUNCTION - << COFF::SCT_COMPLEX_TYPE_SHIFT); - OutStreamer.EndCOFFSymbolDef(); - } - - // Have common code print out the function header with linkage info etc. - EmitFunctionHeader(); - - // Emit the rest of the function body. - EmitFunctionBody(); - - // We didn't modify anything. - return false; -} - -/// printSymbolOperand - Print a raw symbol reference operand. This handles -/// jump tables, constant pools, global address and external symbols, all of -/// which print to a label with various suffixes for relocation types etc. -void X86AsmPrinter::printSymbolOperand(const MachineOperand &MO, - raw_ostream &O) { - switch (MO.getType()) { - default: llvm_unreachable("unknown symbol type!"); - case MachineOperand::MO_JumpTableIndex: - O << *GetJTISymbol(MO.getIndex()); - break; - case MachineOperand::MO_ConstantPoolIndex: - O << *GetCPISymbol(MO.getIndex()); - printOffset(MO.getOffset(), O); - break; - case MachineOperand::MO_GlobalAddress: { - const GlobalValue *GV = MO.getGlobal(); - - MCSymbol *GVSym; - if (MO.getTargetFlags() == X86II::MO_DARWIN_STUB) - GVSym = GetSymbolWithGlobalValueBase(GV, "$stub"); - else if (MO.getTargetFlags() == X86II::MO_DARWIN_NONLAZY || - MO.getTargetFlags() == X86II::MO_DARWIN_NONLAZY_PIC_BASE || - MO.getTargetFlags() == X86II::MO_DARWIN_HIDDEN_NONLAZY_PIC_BASE) - GVSym = GetSymbolWithGlobalValueBase(GV, "$non_lazy_ptr"); - else - GVSym = Mang->getSymbol(GV); - - // Handle dllimport linkage. - if (MO.getTargetFlags() == X86II::MO_DLLIMPORT) - GVSym = OutContext.GetOrCreateSymbol(Twine("__imp_") + GVSym->getName()); - - if (MO.getTargetFlags() == X86II::MO_DARWIN_NONLAZY || - MO.getTargetFlags() == X86II::MO_DARWIN_NONLAZY_PIC_BASE) { - MCSymbol *Sym = GetSymbolWithGlobalValueBase(GV, "$non_lazy_ptr"); - MachineModuleInfoImpl::StubValueTy &StubSym = - MMI->getObjFileInfo().getGVStubEntry(Sym); - if (StubSym.getPointer() == 0) - StubSym = MachineModuleInfoImpl:: - StubValueTy(Mang->getSymbol(GV), !GV->hasInternalLinkage()); - } else if (MO.getTargetFlags() == X86II::MO_DARWIN_HIDDEN_NONLAZY_PIC_BASE){ - MCSymbol *Sym = GetSymbolWithGlobalValueBase(GV, "$non_lazy_ptr"); - MachineModuleInfoImpl::StubValueTy &StubSym = - MMI->getObjFileInfo().getHiddenGVStubEntry(Sym); - if (StubSym.getPointer() == 0) - StubSym = MachineModuleInfoImpl:: - StubValueTy(Mang->getSymbol(GV), !GV->hasInternalLinkage()); - } else if (MO.getTargetFlags() == X86II::MO_DARWIN_STUB) { - MCSymbol *Sym = GetSymbolWithGlobalValueBase(GV, "$stub"); - MachineModuleInfoImpl::StubValueTy &StubSym = - MMI->getObjFileInfo().getFnStubEntry(Sym); - if (StubSym.getPointer() == 0) - StubSym = MachineModuleInfoImpl:: - StubValueTy(Mang->getSymbol(GV), !GV->hasInternalLinkage()); - } - - // If the name begins with a dollar-sign, enclose it in parens. We do this - // to avoid having it look like an integer immediate to the assembler. - if (GVSym->getName()[0] != '$') - O << *GVSym; - else - O << '(' << *GVSym << ')'; - printOffset(MO.getOffset(), O); - break; - } - case MachineOperand::MO_ExternalSymbol: { - const MCSymbol *SymToPrint; - if (MO.getTargetFlags() == X86II::MO_DARWIN_STUB) { - SmallString<128> TempNameStr; - TempNameStr += StringRef(MO.getSymbolName()); - TempNameStr += StringRef("$stub"); - - MCSymbol *Sym = GetExternalSymbolSymbol(TempNameStr.str()); - MachineModuleInfoImpl::StubValueTy &StubSym = - MMI->getObjFileInfo().getFnStubEntry(Sym); - if (StubSym.getPointer() == 0) { - TempNameStr.erase(TempNameStr.end()-5, TempNameStr.end()); - StubSym = MachineModuleInfoImpl:: - StubValueTy(OutContext.GetOrCreateSymbol(TempNameStr.str()), - true); - } - SymToPrint = StubSym.getPointer(); - } else { - SymToPrint = GetExternalSymbolSymbol(MO.getSymbolName()); - } - - // If the name begins with a dollar-sign, enclose it in parens. We do this - // to avoid having it look like an integer immediate to the assembler. - if (SymToPrint->getName()[0] != '$') - O << *SymToPrint; - else - O << '(' << *SymToPrint << '('; - break; - } - } - - switch (MO.getTargetFlags()) { - default: - llvm_unreachable("Unknown target flag on GV operand"); - case X86II::MO_NO_FLAG: // No flag. - break; - case X86II::MO_DARWIN_NONLAZY: - case X86II::MO_DLLIMPORT: - case X86II::MO_DARWIN_STUB: - // These affect the name of the symbol, not any suffix. - break; - case X86II::MO_GOT_ABSOLUTE_ADDRESS: - O << " + [.-"; - PrintPICBaseSymbol(O); - O << ']'; - break; - case X86II::MO_PIC_BASE_OFFSET: - case X86II::MO_DARWIN_NONLAZY_PIC_BASE: - case X86II::MO_DARWIN_HIDDEN_NONLAZY_PIC_BASE: - O << '-'; - PrintPICBaseSymbol(O); - break; - case X86II::MO_TLSGD: O << "@TLSGD"; break; - case X86II::MO_GOTTPOFF: O << "@GOTTPOFF"; break; - case X86II::MO_INDNTPOFF: O << "@INDNTPOFF"; break; - case X86II::MO_TPOFF: O << "@TPOFF"; break; - case X86II::MO_NTPOFF: O << "@NTPOFF"; break; - case X86II::MO_GOTPCREL: O << "@GOTPCREL"; break; - case X86II::MO_GOT: O << "@GOT"; break; - case X86II::MO_GOTOFF: O << "@GOTOFF"; break; - case X86II::MO_PLT: O << "@PLT"; break; - case X86II::MO_TLVP: O << "@TLVP"; break; - case X86II::MO_TLVP_PIC_BASE: - O << "@TLVP" << '-'; - PrintPICBaseSymbol(O); - break; - } -} - -/// print_pcrel_imm - This is used to print an immediate value that ends up -/// being encoded as a pc-relative value. These print slightly differently, for -/// example, a $ is not emitted. -void X86AsmPrinter::print_pcrel_imm(const MachineInstr *MI, unsigned OpNo, - raw_ostream &O) { - const MachineOperand &MO = MI->getOperand(OpNo); - switch (MO.getType()) { - default: llvm_unreachable("Unknown pcrel immediate operand"); - case MachineOperand::MO_Register: - // pc-relativeness was handled when computing the value in the reg. - printOperand(MI, OpNo, O); - return; - case MachineOperand::MO_Immediate: - O << MO.getImm(); - return; - case MachineOperand::MO_MachineBasicBlock: - O << *MO.getMBB()->getSymbol(); - return; - case MachineOperand::MO_GlobalAddress: - case MachineOperand::MO_ExternalSymbol: - printSymbolOperand(MO, O); - return; - } -} - - -void X86AsmPrinter::printOperand(const MachineInstr *MI, unsigned OpNo, - raw_ostream &O, const char *Modifier) { - const MachineOperand &MO = MI->getOperand(OpNo); - switch (MO.getType()) { - default: llvm_unreachable("unknown operand type!"); - case MachineOperand::MO_Register: { - O << '%'; - unsigned Reg = MO.getReg(); - if (Modifier && strncmp(Modifier, "subreg", strlen("subreg")) == 0) { - EVT VT = (strcmp(Modifier+6,"64") == 0) ? - MVT::i64 : ((strcmp(Modifier+6, "32") == 0) ? MVT::i32 : - ((strcmp(Modifier+6,"16") == 0) ? MVT::i16 : MVT::i8)); - Reg = getX86SubSuperRegister(Reg, VT); - } - O << X86ATTInstPrinter::getRegisterName(Reg); - return; - } - - case MachineOperand::MO_Immediate: - O << '$' << MO.getImm(); - return; - - case MachineOperand::MO_JumpTableIndex: - case MachineOperand::MO_ConstantPoolIndex: - case MachineOperand::MO_GlobalAddress: - case MachineOperand::MO_ExternalSymbol: { - O << '$'; - printSymbolOperand(MO, O); - break; - } - } -} - -void X86AsmPrinter::printSSECC(const MachineInstr *MI, unsigned Op, - raw_ostream &O) { - unsigned char value = MI->getOperand(Op).getImm(); - assert(value <= 7 && "Invalid ssecc argument!"); - switch (value) { - case 0: O << "eq"; break; - case 1: O << "lt"; break; - case 2: O << "le"; break; - case 3: O << "unord"; break; - case 4: O << "neq"; break; - case 5: O << "nlt"; break; - case 6: O << "nle"; break; - case 7: O << "ord"; break; - } -} - -void X86AsmPrinter::printLeaMemReference(const MachineInstr *MI, unsigned Op, - raw_ostream &O, const char *Modifier) { - const MachineOperand &BaseReg = MI->getOperand(Op); - const MachineOperand &IndexReg = MI->getOperand(Op+2); - const MachineOperand &DispSpec = MI->getOperand(Op+3); - - // If we really don't want to print out (rip), don't. - bool HasBaseReg = BaseReg.getReg() != 0; - if (HasBaseReg && Modifier && !strcmp(Modifier, "no-rip") && - BaseReg.getReg() == X86::RIP) - HasBaseReg = false; - - // HasParenPart - True if we will print out the () part of the mem ref. - bool HasParenPart = IndexReg.getReg() || HasBaseReg; - - if (DispSpec.isImm()) { - int DispVal = DispSpec.getImm(); - if (DispVal || !HasParenPart) - O << DispVal; - } else { - assert(DispSpec.isGlobal() || DispSpec.isCPI() || - DispSpec.isJTI() || DispSpec.isSymbol()); - printSymbolOperand(MI->getOperand(Op+3), O); - } - - if (HasParenPart) { - assert(IndexReg.getReg() != X86::ESP && - "X86 doesn't allow scaling by ESP"); - - O << '('; - if (HasBaseReg) - printOperand(MI, Op, O, Modifier); - - if (IndexReg.getReg()) { - O << ','; - printOperand(MI, Op+2, O, Modifier); - unsigned ScaleVal = MI->getOperand(Op+1).getImm(); - if (ScaleVal != 1) - O << ',' << ScaleVal; - } - O << ')'; - } -} - -void X86AsmPrinter::printMemReference(const MachineInstr *MI, unsigned Op, - raw_ostream &O, const char *Modifier) { - assert(isMem(MI, Op) && "Invalid memory reference!"); - const MachineOperand &Segment = MI->getOperand(Op+4); - if (Segment.getReg()) { - printOperand(MI, Op+4, O, Modifier); - O << ':'; - } - printLeaMemReference(MI, Op, O, Modifier); -} - -void X86AsmPrinter::printPICLabel(const MachineInstr *MI, unsigned Op, - raw_ostream &O) { - PrintPICBaseSymbol(O); - O << '\n'; - PrintPICBaseSymbol(O); - O << ':'; -} - -bool X86AsmPrinter::printAsmMRegister(const MachineOperand &MO, char Mode, - raw_ostream &O) { - unsigned Reg = MO.getReg(); - switch (Mode) { - default: return true; // Unknown mode. - case 'b': // Print QImode register - Reg = getX86SubSuperRegister(Reg, MVT::i8); - break; - case 'h': // Print QImode high register - Reg = getX86SubSuperRegister(Reg, MVT::i8, true); - break; - case 'w': // Print HImode register - Reg = getX86SubSuperRegister(Reg, MVT::i16); - break; - case 'k': // Print SImode register - Reg = getX86SubSuperRegister(Reg, MVT::i32); - break; - case 'q': // Print DImode register - Reg = getX86SubSuperRegister(Reg, MVT::i64); - break; - } - - O << '%' << X86ATTInstPrinter::getRegisterName(Reg); - return false; -} - -/// PrintAsmOperand - Print out an operand for an inline asm expression. -/// -bool X86AsmPrinter::PrintAsmOperand(const MachineInstr *MI, unsigned OpNo, - unsigned AsmVariant, - const char *ExtraCode, raw_ostream &O) { - // Does this asm operand have a single letter operand modifier? - if (ExtraCode && ExtraCode[0]) { - if (ExtraCode[1] != 0) return true; // Unknown modifier. - - const MachineOperand &MO = MI->getOperand(OpNo); - - switch (ExtraCode[0]) { - default: return true; // Unknown modifier. - case 'a': // This is an address. Currently only 'i' and 'r' are expected. - if (MO.isImm()) { - O << MO.getImm(); - return false; - } - if (MO.isGlobal() || MO.isCPI() || MO.isJTI() || MO.isSymbol()) { - printSymbolOperand(MO, O); - if (Subtarget->isPICStyleRIPRel()) - O << "(%rip)"; - return false; - } - if (MO.isReg()) { - O << '('; - printOperand(MI, OpNo, O); - O << ')'; - return false; - } - return true; - - case 'c': // Don't print "$" before a global var name or constant. - if (MO.isImm()) - O << MO.getImm(); - else if (MO.isGlobal() || MO.isCPI() || MO.isJTI() || MO.isSymbol()) - printSymbolOperand(MO, O); - else - printOperand(MI, OpNo, O); - return false; - - case 'A': // Print '*' before a register (it must be a register) - if (MO.isReg()) { - O << '*'; - printOperand(MI, OpNo, O); - return false; - } - return true; - - case 'b': // Print QImode register - case 'h': // Print QImode high register - case 'w': // Print HImode register - case 'k': // Print SImode register - case 'q': // Print DImode register - if (MO.isReg()) - return printAsmMRegister(MO, ExtraCode[0], O); - printOperand(MI, OpNo, O); - return false; - - case 'P': // This is the operand of a call, treat specially. - print_pcrel_imm(MI, OpNo, O); - return false; - - case 'n': // Negate the immediate or print a '-' before the operand. - // Note: this is a temporary solution. It should be handled target - // independently as part of the 'MC' work. - if (MO.isImm()) { - O << -MO.getImm(); - return false; - } - O << '-'; - } - } - - printOperand(MI, OpNo, O); - return false; -} - -bool X86AsmPrinter::PrintAsmMemoryOperand(const MachineInstr *MI, - unsigned OpNo, unsigned AsmVariant, - const char *ExtraCode, - raw_ostream &O) { - if (ExtraCode && ExtraCode[0]) { - if (ExtraCode[1] != 0) return true; // Unknown modifier. - - switch (ExtraCode[0]) { - default: return true; // Unknown modifier. - case 'b': // Print QImode register - case 'h': // Print QImode high register - case 'w': // Print HImode register - case 'k': // Print SImode register - case 'q': // Print SImode register - // These only apply to registers, ignore on mem. - break; - case 'P': // Don't print @PLT, but do print as memory. - printMemReference(MI, OpNo, O, "no-rip"); - return false; - } - } - printMemReference(MI, OpNo, O); - return false; -} - -void X86AsmPrinter::EmitStartOfAsmFile(Module &M) { - if (Subtarget->isTargetDarwin()) - OutStreamer.SwitchSection(getObjFileLowering().getTextSection()); -} - - -void X86AsmPrinter::EmitEndOfAsmFile(Module &M) { - if (Subtarget->isTargetDarwin()) { - // All darwin targets use mach-o. - MachineModuleInfoMachO &MMIMacho = - MMI->getObjFileInfo(); - - // Output stubs for dynamically-linked functions. - MachineModuleInfoMachO::SymbolListTy Stubs; - - Stubs = MMIMacho.GetFnStubList(); - if (!Stubs.empty()) { - const MCSection *TheSection = - OutContext.getMachOSection("__IMPORT", "__jump_table", - MCSectionMachO::S_SYMBOL_STUBS | - MCSectionMachO::S_ATTR_SELF_MODIFYING_CODE | - MCSectionMachO::S_ATTR_PURE_INSTRUCTIONS, - 5, SectionKind::getMetadata()); - OutStreamer.SwitchSection(TheSection); - - for (unsigned i = 0, e = Stubs.size(); i != e; ++i) { - // L_foo$stub: - OutStreamer.EmitLabel(Stubs[i].first); - // .indirect_symbol _foo - OutStreamer.EmitSymbolAttribute(Stubs[i].second.getPointer(), - MCSA_IndirectSymbol); - // hlt; hlt; hlt; hlt; hlt hlt = 0xf4 = -12. - const char HltInsts[] = { -12, -12, -12, -12, -12 }; - OutStreamer.EmitBytes(StringRef(HltInsts, 5), 0/*addrspace*/); - } - - Stubs.clear(); - OutStreamer.AddBlankLine(); - } - - // Output stubs for external and common global variables. - Stubs = MMIMacho.GetGVStubList(); - if (!Stubs.empty()) { - const MCSection *TheSection = - OutContext.getMachOSection("__IMPORT", "__pointers", - MCSectionMachO::S_NON_LAZY_SYMBOL_POINTERS, - SectionKind::getMetadata()); - OutStreamer.SwitchSection(TheSection); - - for (unsigned i = 0, e = Stubs.size(); i != e; ++i) { - // L_foo$non_lazy_ptr: - OutStreamer.EmitLabel(Stubs[i].first); - // .indirect_symbol _foo - MachineModuleInfoImpl::StubValueTy &MCSym = Stubs[i].second; - OutStreamer.EmitSymbolAttribute(MCSym.getPointer(), - MCSA_IndirectSymbol); - // .long 0 - if (MCSym.getInt()) - // External to current translation unit. - OutStreamer.EmitIntValue(0, 4/*size*/, 0/*addrspace*/); - else - // Internal to current translation unit. - // - // When we place the LSDA into the TEXT section, the type info - // pointers need to be indirect and pc-rel. We accomplish this by - // using NLPs. However, sometimes the types are local to the file. So - // we need to fill in the value for the NLP in those cases. - OutStreamer.EmitValue(MCSymbolRefExpr::Create(MCSym.getPointer(), - OutContext), - 4/*size*/, 0/*addrspace*/); - } - Stubs.clear(); - OutStreamer.AddBlankLine(); - } - - Stubs = MMIMacho.GetHiddenGVStubList(); - if (!Stubs.empty()) { - OutStreamer.SwitchSection(getObjFileLowering().getDataSection()); - EmitAlignment(2); - - for (unsigned i = 0, e = Stubs.size(); i != e; ++i) { - // L_foo$non_lazy_ptr: - OutStreamer.EmitLabel(Stubs[i].first); - // .long _foo - OutStreamer.EmitValue(MCSymbolRefExpr:: - Create(Stubs[i].second.getPointer(), - OutContext), - 4/*size*/, 0/*addrspace*/); - } - Stubs.clear(); - OutStreamer.AddBlankLine(); - } - - // Funny Darwin hack: This flag tells the linker that no global symbols - // contain code that falls through to other global symbols (e.g. the obvious - // implementation of multiple entry points). If this doesn't occur, the - // linker can safely perform dead code stripping. Since LLVM never - // generates code that does this, it is always safe to set. - OutStreamer.EmitAssemblerFlag(MCAF_SubsectionsViaSymbols); - } - - if (Subtarget->isTargetCOFF()) { - X86COFFMachineModuleInfo &COFFMMI = - MMI->getObjFileInfo(); - - // Emit type information for external functions - typedef X86COFFMachineModuleInfo::externals_iterator externals_iterator; - for (externals_iterator I = COFFMMI.externals_begin(), - E = COFFMMI.externals_end(); - I != E; ++I) { - OutStreamer.BeginCOFFSymbolDef(CurrentFnSym); - OutStreamer.EmitCOFFSymbolStorageClass(COFF::IMAGE_SYM_CLASS_EXTERNAL); - OutStreamer.EmitCOFFSymbolType(COFF::IMAGE_SYM_DTYPE_FUNCTION - << COFF::SCT_COMPLEX_TYPE_SHIFT); - OutStreamer.EndCOFFSymbolDef(); - } - - // Necessary for dllexport support - std::vector DLLExportedFns, DLLExportedGlobals; - - const TargetLoweringObjectFileCOFF &TLOFCOFF = - static_cast(getObjFileLowering()); - - for (Module::const_iterator I = M.begin(), E = M.end(); I != E; ++I) - if (I->hasDLLExportLinkage()) - DLLExportedFns.push_back(Mang->getSymbol(I)); - - for (Module::const_global_iterator I = M.global_begin(), - E = M.global_end(); I != E; ++I) - if (I->hasDLLExportLinkage()) - DLLExportedGlobals.push_back(Mang->getSymbol(I)); - - // Output linker support code for dllexported globals on windows. - if (!DLLExportedGlobals.empty() || !DLLExportedFns.empty()) { - OutStreamer.SwitchSection(TLOFCOFF.getDrectveSection()); - SmallString<128> name; - for (unsigned i = 0, e = DLLExportedGlobals.size(); i != e; ++i) { - if (Subtarget->isTargetWindows()) - name = " /EXPORT:"; - else - name = " -export:"; - name += DLLExportedGlobals[i]->getName(); - if (Subtarget->isTargetWindows()) - name += ",DATA"; - else - name += ",data"; - OutStreamer.EmitBytes(name, 0); - } - - for (unsigned i = 0, e = DLLExportedFns.size(); i != e; ++i) { - if (Subtarget->isTargetWindows()) - name = " /EXPORT:"; - else - name = " -export:"; - name += DLLExportedFns[i]->getName(); - OutStreamer.EmitBytes(name, 0); - } - } - } - - if (Subtarget->isTargetELF()) { - const TargetLoweringObjectFileELF &TLOFELF = - static_cast(getObjFileLowering()); - - MachineModuleInfoELF &MMIELF = MMI->getObjFileInfo(); - - // Output stubs for external and common global variables. - MachineModuleInfoELF::SymbolListTy Stubs = MMIELF.GetGVStubList(); - if (!Stubs.empty()) { - OutStreamer.SwitchSection(TLOFELF.getDataRelSection()); - const TargetData *TD = TM.getTargetData(); - - for (unsigned i = 0, e = Stubs.size(); i != e; ++i) { - OutStreamer.EmitLabel(Stubs[i].first); - OutStreamer.EmitSymbolValue(Stubs[i].second.getPointer(), - TD->getPointerSize(), 0); - } - Stubs.clear(); - } - } -} - - -//===----------------------------------------------------------------------===// -// Target Registry Stuff -//===----------------------------------------------------------------------===// - -static MCInstPrinter *createX86MCInstPrinter(const Target &T, - unsigned SyntaxVariant, - const MCAsmInfo &MAI) { - if (SyntaxVariant == 0) - return new X86ATTInstPrinter(MAI); - if (SyntaxVariant == 1) - return new X86IntelInstPrinter(MAI); - return 0; -} - -// Force static initialization. -extern "C" void LLVMInitializeX86AsmPrinter() { - RegisterAsmPrinter X(TheX86_32Target); - RegisterAsmPrinter Y(TheX86_64Target); - - TargetRegistry::RegisterMCInstPrinter(TheX86_32Target,createX86MCInstPrinter); - TargetRegistry::RegisterMCInstPrinter(TheX86_64Target,createX86MCInstPrinter); -} Removed: llvm/trunk/lib/Target/X86/AsmPrinter/X86AsmPrinter.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/AsmPrinter/X86AsmPrinter.h?rev=108781&view=auto ============================================================================== --- llvm/trunk/lib/Target/X86/AsmPrinter/X86AsmPrinter.h (original) +++ llvm/trunk/lib/Target/X86/AsmPrinter/X86AsmPrinter.h (removed) @@ -1,89 +0,0 @@ -//===-- X86AsmPrinter.h - Convert X86 LLVM code to assembly -----*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// AT&T assembly code printer class. -// -//===----------------------------------------------------------------------===// - -#ifndef X86ASMPRINTER_H -#define X86ASMPRINTER_H - -#include "../X86.h" -#include "../X86MachineFunctionInfo.h" -#include "../X86TargetMachine.h" -#include "llvm/ADT/StringSet.h" -#include "llvm/CodeGen/AsmPrinter.h" -#include "llvm/CodeGen/MachineModuleInfo.h" -#include "llvm/CodeGen/ValueTypes.h" -#include "llvm/Support/Compiler.h" - -namespace llvm { - -class MachineJumpTableInfo; -class MCContext; -class MCInst; -class MCStreamer; -class MCSymbol; - -class LLVM_LIBRARY_VISIBILITY X86AsmPrinter : public AsmPrinter { - const X86Subtarget *Subtarget; - public: - explicit X86AsmPrinter(TargetMachine &TM, MCStreamer &Streamer) - : AsmPrinter(TM, Streamer) { - Subtarget = &TM.getSubtarget(); - } - - virtual const char *getPassName() const { - return "X86 AT&T-Style Assembly Printer"; - } - - const X86Subtarget &getSubtarget() const { return *Subtarget; } - - virtual void EmitStartOfAsmFile(Module &M); - - virtual void EmitEndOfAsmFile(Module &M); - - virtual void EmitInstruction(const MachineInstr *MI); - - void printSymbolOperand(const MachineOperand &MO, raw_ostream &O); - - // These methods are used by the tablegen'erated instruction printer. - void printOperand(const MachineInstr *MI, unsigned OpNo, raw_ostream &O, - const char *Modifier = 0); - void print_pcrel_imm(const MachineInstr *MI, unsigned OpNo, raw_ostream &O); - - bool printAsmMRegister(const MachineOperand &MO, char Mode, raw_ostream &O); - bool PrintAsmOperand(const MachineInstr *MI, unsigned OpNo, - unsigned AsmVariant, const char *ExtraCode, - raw_ostream &OS); - bool PrintAsmMemoryOperand(const MachineInstr *MI, unsigned OpNo, - unsigned AsmVariant, const char *ExtraCode, - raw_ostream &OS); - - void printMachineInstruction(const MachineInstr *MI); - void printSSECC(const MachineInstr *MI, unsigned Op, raw_ostream &O); - void printMemReference(const MachineInstr *MI, unsigned Op, raw_ostream &O, - const char *Modifier=NULL); - void printLeaMemReference(const MachineInstr *MI, unsigned Op, raw_ostream &O, - const char *Modifier=NULL); - - void printPICLabel(const MachineInstr *MI, unsigned Op, raw_ostream &O); - - void PrintPICBaseSymbol(raw_ostream &O) const; - - bool runOnMachineFunction(MachineFunction &F); - - void PrintDebugValueComment(const MachineInstr *MI, raw_ostream &OS); - - MachineLocation getDebugValueLocation(const MachineInstr *MI) const; -}; - -} // end namespace llvm - -#endif Removed: llvm/trunk/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp?rev=108781&view=auto ============================================================================== --- llvm/trunk/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp (original) +++ llvm/trunk/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp (removed) @@ -1,632 +0,0 @@ -//===-- X86MCInstLower.cpp - Convert X86 MachineInstr to an MCInst --------===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file contains code to lower X86 MachineInstrs to their corresponding -// MCInst records. -// -//===----------------------------------------------------------------------===// - -#include "X86MCInstLower.h" -#include "X86AsmPrinter.h" -#include "X86COFFMachineModuleInfo.h" -#include "X86MCAsmInfo.h" -#include "llvm/Analysis/DebugInfo.h" -#include "llvm/CodeGen/MachineModuleInfoImpls.h" -#include "llvm/MC/MCContext.h" -#include "llvm/MC/MCExpr.h" -#include "llvm/MC/MCInst.h" -#include "llvm/MC/MCStreamer.h" -#include "llvm/MC/MCSymbol.h" -#include "llvm/Target/Mangler.h" -#include "llvm/Support/FormattedStream.h" -#include "llvm/ADT/SmallString.h" -#include "llvm/Type.h" -using namespace llvm; - - -const X86Subtarget &X86MCInstLower::getSubtarget() const { - return AsmPrinter.getSubtarget(); -} - -MachineModuleInfoMachO &X86MCInstLower::getMachOMMI() const { - assert(getSubtarget().isTargetDarwin() &&"Can only get MachO info on darwin"); - return AsmPrinter.MMI->getObjFileInfo(); -} - - -MCSymbol *X86MCInstLower::GetPICBaseSymbol() const { - const TargetLowering *TLI = AsmPrinter.TM.getTargetLowering(); - return static_cast(TLI)-> - getPICBaseSymbol(AsmPrinter.MF, Ctx); -} - -/// GetSymbolFromOperand - Lower an MO_GlobalAddress or MO_ExternalSymbol -/// operand to an MCSymbol. -MCSymbol *X86MCInstLower:: -GetSymbolFromOperand(const MachineOperand &MO) const { - assert((MO.isGlobal() || MO.isSymbol()) && "Isn't a symbol reference"); - - SmallString<128> Name; - - if (!MO.isGlobal()) { - assert(MO.isSymbol()); - Name += AsmPrinter.MAI->getGlobalPrefix(); - Name += MO.getSymbolName(); - } else { - const GlobalValue *GV = MO.getGlobal(); - bool isImplicitlyPrivate = false; - if (MO.getTargetFlags() == X86II::MO_DARWIN_STUB || - MO.getTargetFlags() == X86II::MO_DARWIN_NONLAZY || - MO.getTargetFlags() == X86II::MO_DARWIN_NONLAZY_PIC_BASE || - MO.getTargetFlags() == X86II::MO_DARWIN_HIDDEN_NONLAZY_PIC_BASE) - isImplicitlyPrivate = true; - - Mang->getNameWithPrefix(Name, GV, isImplicitlyPrivate); - } - - // If the target flags on the operand changes the name of the symbol, do that - // before we return the symbol. - switch (MO.getTargetFlags()) { - default: break; - case X86II::MO_DLLIMPORT: { - // Handle dllimport linkage. - const char *Prefix = "__imp_"; - Name.insert(Name.begin(), Prefix, Prefix+strlen(Prefix)); - break; - } - case X86II::MO_DARWIN_NONLAZY: - case X86II::MO_DARWIN_NONLAZY_PIC_BASE: { - Name += "$non_lazy_ptr"; - MCSymbol *Sym = Ctx.GetOrCreateSymbol(Name.str()); - - MachineModuleInfoImpl::StubValueTy &StubSym = - getMachOMMI().getGVStubEntry(Sym); - if (StubSym.getPointer() == 0) { - assert(MO.isGlobal() && "Extern symbol not handled yet"); - StubSym = - MachineModuleInfoImpl:: - StubValueTy(AsmPrinter.Mang->getSymbol(MO.getGlobal()), - !MO.getGlobal()->hasInternalLinkage()); - } - return Sym; - } - case X86II::MO_DARWIN_HIDDEN_NONLAZY_PIC_BASE: { - Name += "$non_lazy_ptr"; - MCSymbol *Sym = Ctx.GetOrCreateSymbol(Name.str()); - MachineModuleInfoImpl::StubValueTy &StubSym = - getMachOMMI().getHiddenGVStubEntry(Sym); - if (StubSym.getPointer() == 0) { - assert(MO.isGlobal() && "Extern symbol not handled yet"); - StubSym = - MachineModuleInfoImpl:: - StubValueTy(AsmPrinter.Mang->getSymbol(MO.getGlobal()), - !MO.getGlobal()->hasInternalLinkage()); - } - return Sym; - } - case X86II::MO_DARWIN_STUB: { - Name += "$stub"; - MCSymbol *Sym = Ctx.GetOrCreateSymbol(Name.str()); - MachineModuleInfoImpl::StubValueTy &StubSym = - getMachOMMI().getFnStubEntry(Sym); - if (StubSym.getPointer()) - return Sym; - - if (MO.isGlobal()) { - StubSym = - MachineModuleInfoImpl:: - StubValueTy(AsmPrinter.Mang->getSymbol(MO.getGlobal()), - !MO.getGlobal()->hasInternalLinkage()); - } else { - Name.erase(Name.end()-5, Name.end()); - StubSym = - MachineModuleInfoImpl:: - StubValueTy(Ctx.GetOrCreateSymbol(Name.str()), false); - } - return Sym; - } - } - - return Ctx.GetOrCreateSymbol(Name.str()); -} - -MCOperand X86MCInstLower::LowerSymbolOperand(const MachineOperand &MO, - MCSymbol *Sym) const { - // FIXME: We would like an efficient form for this, so we don't have to do a - // lot of extra uniquing. - const MCExpr *Expr = 0; - MCSymbolRefExpr::VariantKind RefKind = MCSymbolRefExpr::VK_None; - - switch (MO.getTargetFlags()) { - default: llvm_unreachable("Unknown target flag on GV operand"); - case X86II::MO_NO_FLAG: // No flag. - // These affect the name of the symbol, not any suffix. - case X86II::MO_DARWIN_NONLAZY: - case X86II::MO_DLLIMPORT: - case X86II::MO_DARWIN_STUB: - break; - - case X86II::MO_TLVP: RefKind = MCSymbolRefExpr::VK_TLVP; break; - case X86II::MO_TLVP_PIC_BASE: - Expr = MCSymbolRefExpr::Create(Sym, MCSymbolRefExpr::VK_TLVP, Ctx); - // Subtract the pic base. - Expr = MCBinaryExpr::CreateSub(Expr, - MCSymbolRefExpr::Create(GetPICBaseSymbol(), - Ctx), - Ctx); - break; - case X86II::MO_TLSGD: RefKind = MCSymbolRefExpr::VK_TLSGD; break; - case X86II::MO_GOTTPOFF: RefKind = MCSymbolRefExpr::VK_GOTTPOFF; break; - case X86II::MO_INDNTPOFF: RefKind = MCSymbolRefExpr::VK_INDNTPOFF; break; - case X86II::MO_TPOFF: RefKind = MCSymbolRefExpr::VK_TPOFF; break; - case X86II::MO_NTPOFF: RefKind = MCSymbolRefExpr::VK_NTPOFF; break; - case X86II::MO_GOTPCREL: RefKind = MCSymbolRefExpr::VK_GOTPCREL; break; - case X86II::MO_GOT: RefKind = MCSymbolRefExpr::VK_GOT; break; - case X86II::MO_GOTOFF: RefKind = MCSymbolRefExpr::VK_GOTOFF; break; - case X86II::MO_PLT: RefKind = MCSymbolRefExpr::VK_PLT; break; - case X86II::MO_PIC_BASE_OFFSET: - case X86II::MO_DARWIN_NONLAZY_PIC_BASE: - case X86II::MO_DARWIN_HIDDEN_NONLAZY_PIC_BASE: - Expr = MCSymbolRefExpr::Create(Sym, Ctx); - // Subtract the pic base. - Expr = MCBinaryExpr::CreateSub(Expr, - MCSymbolRefExpr::Create(GetPICBaseSymbol(), Ctx), - Ctx); - if (MO.isJTI() && AsmPrinter.MAI->hasSetDirective()) { - // If .set directive is supported, use it to reduce the number of - // relocations the assembler will generate for differences between - // local labels. This is only safe when the symbols are in the same - // section so we are restricting it to jumptable references. - MCSymbol *Label = Ctx.CreateTempSymbol(); - AsmPrinter.OutStreamer.EmitAssignment(Label, Expr); - Expr = MCSymbolRefExpr::Create(Label, Ctx); - } - break; - } - - if (Expr == 0) - Expr = MCSymbolRefExpr::Create(Sym, RefKind, Ctx); - - if (!MO.isJTI() && MO.getOffset()) - Expr = MCBinaryExpr::CreateAdd(Expr, - MCConstantExpr::Create(MO.getOffset(), Ctx), - Ctx); - return MCOperand::CreateExpr(Expr); -} - - - -static void lower_subreg32(MCInst *MI, unsigned OpNo) { - // Convert registers in the addr mode according to subreg32. - unsigned Reg = MI->getOperand(OpNo).getReg(); - if (Reg != 0) - MI->getOperand(OpNo).setReg(getX86SubSuperRegister(Reg, MVT::i32)); -} - -static void lower_lea64_32mem(MCInst *MI, unsigned OpNo) { - // Convert registers in the addr mode according to subreg64. - for (unsigned i = 0; i != 4; ++i) { - if (!MI->getOperand(OpNo+i).isReg()) continue; - - unsigned Reg = MI->getOperand(OpNo+i).getReg(); - if (Reg == 0) continue; - - MI->getOperand(OpNo+i).setReg(getX86SubSuperRegister(Reg, MVT::i64)); - } -} - -/// LowerSubReg32_Op0 - Things like MOVZX16rr8 -> MOVZX32rr8. -static void LowerSubReg32_Op0(MCInst &OutMI, unsigned NewOpc) { - OutMI.setOpcode(NewOpc); - lower_subreg32(&OutMI, 0); -} -/// LowerUnaryToTwoAddr - R = setb -> R = sbb R, R -static void LowerUnaryToTwoAddr(MCInst &OutMI, unsigned NewOpc) { - OutMI.setOpcode(NewOpc); - OutMI.addOperand(OutMI.getOperand(0)); - OutMI.addOperand(OutMI.getOperand(0)); -} - -/// \brief Simplify FOO $imm, %{al,ax,eax,rax} to FOO $imm, for instruction with -/// a short fixed-register form. -static void SimplifyShortImmForm(MCInst &Inst, unsigned Opcode) { - unsigned ImmOp = Inst.getNumOperands() - 1; - assert(Inst.getOperand(0).isReg() && Inst.getOperand(ImmOp).isImm() && - ((Inst.getNumOperands() == 3 && Inst.getOperand(1).isReg() && - Inst.getOperand(0).getReg() == Inst.getOperand(1).getReg()) || - Inst.getNumOperands() == 2) && "Unexpected instruction!"); - - // Check whether the destination register can be fixed. - unsigned Reg = Inst.getOperand(0).getReg(); - if (Reg != X86::AL && Reg != X86::AX && Reg != X86::EAX && Reg != X86::RAX) - return; - - // If so, rewrite the instruction. - MCOperand Saved = Inst.getOperand(ImmOp); - Inst = MCInst(); - Inst.setOpcode(Opcode); - Inst.addOperand(Saved); -} - -/// \brief Simplify things like MOV32rm to MOV32o32a. -static void SimplifyShortMoveForm(MCInst &Inst, unsigned Opcode) { - bool IsStore = Inst.getOperand(0).isReg() && Inst.getOperand(1).isReg(); - unsigned AddrBase = IsStore; - unsigned RegOp = IsStore ? 0 : 5; - unsigned AddrOp = AddrBase + 3; - assert(Inst.getNumOperands() == 6 && Inst.getOperand(RegOp).isReg() && - Inst.getOperand(AddrBase + 0).isReg() && // base - Inst.getOperand(AddrBase + 1).isImm() && // scale - Inst.getOperand(AddrBase + 2).isReg() && // index register - (Inst.getOperand(AddrOp).isExpr() || // address - Inst.getOperand(AddrOp).isImm())&& - Inst.getOperand(AddrBase + 4).isReg() && // segment - "Unexpected instruction!"); - - // Check whether the destination register can be fixed. - unsigned Reg = Inst.getOperand(RegOp).getReg(); - if (Reg != X86::AL && Reg != X86::AX && Reg != X86::EAX && Reg != X86::RAX) - return; - - // Check whether this is an absolute address. - // FIXME: We know TLVP symbol refs aren't, but there should be a better way - // to do this here. - bool Absolute = true; - if (Inst.getOperand(AddrOp).isExpr()) { - const MCExpr *MCE = Inst.getOperand(AddrOp).getExpr(); - if (const MCSymbolRefExpr *SRE = dyn_cast(MCE)) - if (SRE->getKind() == MCSymbolRefExpr::VK_TLVP) - Absolute = false; - } - - if (Absolute && - (Inst.getOperand(AddrBase + 0).getReg() != 0 || - Inst.getOperand(AddrBase + 2).getReg() != 0 || - Inst.getOperand(AddrBase + 4).getReg() != 0 || - Inst.getOperand(AddrBase + 1).getImm() != 1)) - return; - - // If so, rewrite the instruction. - MCOperand Saved = Inst.getOperand(AddrOp); - Inst = MCInst(); - Inst.setOpcode(Opcode); - Inst.addOperand(Saved); -} - -void X86MCInstLower::Lower(const MachineInstr *MI, MCInst &OutMI) const { - OutMI.setOpcode(MI->getOpcode()); - - for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) { - const MachineOperand &MO = MI->getOperand(i); - - MCOperand MCOp; - switch (MO.getType()) { - default: - MI->dump(); - llvm_unreachable("unknown operand type"); - case MachineOperand::MO_Register: - // Ignore all implicit register operands. - if (MO.isImplicit()) continue; - MCOp = MCOperand::CreateReg(MO.getReg()); - break; - case MachineOperand::MO_Immediate: - MCOp = MCOperand::CreateImm(MO.getImm()); - break; - case MachineOperand::MO_MachineBasicBlock: - MCOp = MCOperand::CreateExpr(MCSymbolRefExpr::Create( - MO.getMBB()->getSymbol(), Ctx)); - break; - case MachineOperand::MO_GlobalAddress: - MCOp = LowerSymbolOperand(MO, GetSymbolFromOperand(MO)); - break; - case MachineOperand::MO_ExternalSymbol: - MCOp = LowerSymbolOperand(MO, GetSymbolFromOperand(MO)); - break; - case MachineOperand::MO_JumpTableIndex: - MCOp = LowerSymbolOperand(MO, AsmPrinter.GetJTISymbol(MO.getIndex())); - break; - case MachineOperand::MO_ConstantPoolIndex: - MCOp = LowerSymbolOperand(MO, AsmPrinter.GetCPISymbol(MO.getIndex())); - break; - case MachineOperand::MO_BlockAddress: - MCOp = LowerSymbolOperand(MO, - AsmPrinter.GetBlockAddressSymbol(MO.getBlockAddress())); - break; - } - - OutMI.addOperand(MCOp); - } - - // Handle a few special cases to eliminate operand modifiers. - switch (OutMI.getOpcode()) { - case X86::LEA64_32r: // Handle 'subreg rewriting' for the lea64_32mem operand. - lower_lea64_32mem(&OutMI, 1); - // FALL THROUGH. - case X86::LEA64r: - case X86::LEA16r: - case X86::LEA32r: - // LEA should have a segment register, but it must be empty. - assert(OutMI.getNumOperands() == 1+X86::AddrNumOperands && - "Unexpected # of LEA operands"); - assert(OutMI.getOperand(1+X86::AddrSegmentReg).getReg() == 0 && - "LEA has segment specified!"); - break; - case X86::MOVZX16rr8: LowerSubReg32_Op0(OutMI, X86::MOVZX32rr8); break; - case X86::MOVZX16rm8: LowerSubReg32_Op0(OutMI, X86::MOVZX32rm8); break; - case X86::MOVSX16rr8: LowerSubReg32_Op0(OutMI, X86::MOVSX32rr8); break; - case X86::MOVSX16rm8: LowerSubReg32_Op0(OutMI, X86::MOVSX32rm8); break; - case X86::MOVZX64rr32: LowerSubReg32_Op0(OutMI, X86::MOV32rr); break; - case X86::MOVZX64rm32: LowerSubReg32_Op0(OutMI, X86::MOV32rm); break; - case X86::MOV64ri64i32: LowerSubReg32_Op0(OutMI, X86::MOV32ri); break; - case X86::MOVZX64rr8: LowerSubReg32_Op0(OutMI, X86::MOVZX32rr8); break; - case X86::MOVZX64rm8: LowerSubReg32_Op0(OutMI, X86::MOVZX32rm8); break; - case X86::MOVZX64rr16: LowerSubReg32_Op0(OutMI, X86::MOVZX32rr16); break; - case X86::MOVZX64rm16: LowerSubReg32_Op0(OutMI, X86::MOVZX32rm16); break; - case X86::SETB_C8r: LowerUnaryToTwoAddr(OutMI, X86::SBB8rr); break; - case X86::SETB_C16r: LowerUnaryToTwoAddr(OutMI, X86::SBB16rr); break; - case X86::SETB_C32r: LowerUnaryToTwoAddr(OutMI, X86::SBB32rr); break; - case X86::SETB_C64r: LowerUnaryToTwoAddr(OutMI, X86::SBB64rr); break; - case X86::MOV8r0: LowerUnaryToTwoAddr(OutMI, X86::XOR8rr); break; - case X86::MOV32r0: LowerUnaryToTwoAddr(OutMI, X86::XOR32rr); break; - case X86::MMX_V_SET0: LowerUnaryToTwoAddr(OutMI, X86::MMX_PXORrr); break; - case X86::MMX_V_SETALLONES: - LowerUnaryToTwoAddr(OutMI, X86::MMX_PCMPEQDrr); break; - case X86::FsFLD0SS: LowerUnaryToTwoAddr(OutMI, X86::PXORrr); break; - case X86::FsFLD0SD: LowerUnaryToTwoAddr(OutMI, X86::PXORrr); break; - case X86::V_SET0PS: LowerUnaryToTwoAddr(OutMI, X86::XORPSrr); break; - case X86::V_SET0PD: LowerUnaryToTwoAddr(OutMI, X86::XORPDrr); break; - case X86::V_SET0PI: LowerUnaryToTwoAddr(OutMI, X86::PXORrr); break; - case X86::V_SETALLONES: LowerUnaryToTwoAddr(OutMI, X86::PCMPEQDrr); break; - - case X86::MOV16r0: - LowerSubReg32_Op0(OutMI, X86::MOV32r0); // MOV16r0 -> MOV32r0 - LowerUnaryToTwoAddr(OutMI, X86::XOR32rr); // MOV32r0 -> XOR32rr - break; - case X86::MOV64r0: - LowerSubReg32_Op0(OutMI, X86::MOV32r0); // MOV64r0 -> MOV32r0 - LowerUnaryToTwoAddr(OutMI, X86::XOR32rr); // MOV32r0 -> XOR32rr - break; - - // TAILJMPr64, CALL64r, CALL64pcrel32 - These instructions have - // register inputs modeled as normal uses instead of implicit uses. As such, - // truncate off all but the first operand (the callee). FIXME: Change isel. - case X86::TAILJMPr64: - case X86::CALL64r: - case X86::CALL64pcrel32: { - unsigned Opcode = OutMI.getOpcode(); - MCOperand Saved = OutMI.getOperand(0); - OutMI = MCInst(); - OutMI.setOpcode(Opcode); - OutMI.addOperand(Saved); - break; - } - - // TAILJMPd, TAILJMPd64 - Lower to the correct jump instructions. - case X86::TAILJMPr: - case X86::TAILJMPd: - case X86::TAILJMPd64: { - unsigned Opcode; - switch (OutMI.getOpcode()) { - default: assert(0 && "Invalid opcode"); - case X86::TAILJMPr: Opcode = X86::JMP32r; break; - case X86::TAILJMPd: - case X86::TAILJMPd64: Opcode = X86::JMP_1; break; - } - - MCOperand Saved = OutMI.getOperand(0); - OutMI = MCInst(); - OutMI.setOpcode(Opcode); - OutMI.addOperand(Saved); - break; - } - - // The assembler backend wants to see branches in their small form and relax - // them to their large form. The JIT can only handle the large form because - // it does not do relaxation. For now, translate the large form to the - // small one here. - case X86::JMP_4: OutMI.setOpcode(X86::JMP_1); break; - case X86::JO_4: OutMI.setOpcode(X86::JO_1); break; - case X86::JNO_4: OutMI.setOpcode(X86::JNO_1); break; - case X86::JB_4: OutMI.setOpcode(X86::JB_1); break; - case X86::JAE_4: OutMI.setOpcode(X86::JAE_1); break; - case X86::JE_4: OutMI.setOpcode(X86::JE_1); break; - case X86::JNE_4: OutMI.setOpcode(X86::JNE_1); break; - case X86::JBE_4: OutMI.setOpcode(X86::JBE_1); break; - case X86::JA_4: OutMI.setOpcode(X86::JA_1); break; - case X86::JS_4: OutMI.setOpcode(X86::JS_1); break; - case X86::JNS_4: OutMI.setOpcode(X86::JNS_1); break; - case X86::JP_4: OutMI.setOpcode(X86::JP_1); break; - case X86::JNP_4: OutMI.setOpcode(X86::JNP_1); break; - case X86::JL_4: OutMI.setOpcode(X86::JL_1); break; - case X86::JGE_4: OutMI.setOpcode(X86::JGE_1); break; - case X86::JLE_4: OutMI.setOpcode(X86::JLE_1); break; - case X86::JG_4: OutMI.setOpcode(X86::JG_1); break; - - // We don't currently select the correct instruction form for instructions - // which have a short %eax, etc. form. Handle this by custom lowering, for - // now. - // - // Note, we are currently not handling the following instructions: - // MOV64ao8, MOV64o8a - // XCHG16ar, XCHG32ar, XCHG64ar - case X86::MOV8mr_NOREX: - case X86::MOV8mr: SimplifyShortMoveForm(OutMI, X86::MOV8ao8); break; - case X86::MOV8rm_NOREX: - case X86::MOV8rm: SimplifyShortMoveForm(OutMI, X86::MOV8o8a); break; - case X86::MOV16mr: SimplifyShortMoveForm(OutMI, X86::MOV16ao16); break; - case X86::MOV16rm: SimplifyShortMoveForm(OutMI, X86::MOV16o16a); break; - case X86::MOV32mr: SimplifyShortMoveForm(OutMI, X86::MOV32ao32); break; - case X86::MOV32rm: SimplifyShortMoveForm(OutMI, X86::MOV32o32a); break; - case X86::MOV64mr: SimplifyShortMoveForm(OutMI, X86::MOV64ao64); break; - case X86::MOV64rm: SimplifyShortMoveForm(OutMI, X86::MOV64o64a); break; - - case X86::ADC8ri: SimplifyShortImmForm(OutMI, X86::ADC8i8); break; - case X86::ADC16ri: SimplifyShortImmForm(OutMI, X86::ADC16i16); break; - case X86::ADC32ri: SimplifyShortImmForm(OutMI, X86::ADC32i32); break; - case X86::ADC64ri32: SimplifyShortImmForm(OutMI, X86::ADC64i32); break; - case X86::ADD8ri: SimplifyShortImmForm(OutMI, X86::ADD8i8); break; - case X86::ADD16ri: SimplifyShortImmForm(OutMI, X86::ADD16i16); break; - case X86::ADD32ri: SimplifyShortImmForm(OutMI, X86::ADD32i32); break; - case X86::ADD64ri32: SimplifyShortImmForm(OutMI, X86::ADD64i32); break; - case X86::AND8ri: SimplifyShortImmForm(OutMI, X86::AND8i8); break; - case X86::AND16ri: SimplifyShortImmForm(OutMI, X86::AND16i16); break; - case X86::AND32ri: SimplifyShortImmForm(OutMI, X86::AND32i32); break; - case X86::AND64ri32: SimplifyShortImmForm(OutMI, X86::AND64i32); break; - case X86::CMP8ri: SimplifyShortImmForm(OutMI, X86::CMP8i8); break; - case X86::CMP16ri: SimplifyShortImmForm(OutMI, X86::CMP16i16); break; - case X86::CMP32ri: SimplifyShortImmForm(OutMI, X86::CMP32i32); break; - case X86::CMP64ri32: SimplifyShortImmForm(OutMI, X86::CMP64i32); break; - case X86::OR8ri: SimplifyShortImmForm(OutMI, X86::OR8i8); break; - case X86::OR16ri: SimplifyShortImmForm(OutMI, X86::OR16i16); break; - case X86::OR32ri: SimplifyShortImmForm(OutMI, X86::OR32i32); break; - case X86::OR64ri32: SimplifyShortImmForm(OutMI, X86::OR64i32); break; - case X86::SBB8ri: SimplifyShortImmForm(OutMI, X86::SBB8i8); break; - case X86::SBB16ri: SimplifyShortImmForm(OutMI, X86::SBB16i16); break; - case X86::SBB32ri: SimplifyShortImmForm(OutMI, X86::SBB32i32); break; - case X86::SBB64ri32: SimplifyShortImmForm(OutMI, X86::SBB64i32); break; - case X86::SUB8ri: SimplifyShortImmForm(OutMI, X86::SUB8i8); break; - case X86::SUB16ri: SimplifyShortImmForm(OutMI, X86::SUB16i16); break; - case X86::SUB32ri: SimplifyShortImmForm(OutMI, X86::SUB32i32); break; - case X86::SUB64ri32: SimplifyShortImmForm(OutMI, X86::SUB64i32); break; - case X86::TEST8ri: SimplifyShortImmForm(OutMI, X86::TEST8i8); break; - case X86::TEST16ri: SimplifyShortImmForm(OutMI, X86::TEST16i16); break; - case X86::TEST32ri: SimplifyShortImmForm(OutMI, X86::TEST32i32); break; - case X86::TEST64ri32: SimplifyShortImmForm(OutMI, X86::TEST64i32); break; - case X86::XOR8ri: SimplifyShortImmForm(OutMI, X86::XOR8i8); break; - case X86::XOR16ri: SimplifyShortImmForm(OutMI, X86::XOR16i16); break; - case X86::XOR32ri: SimplifyShortImmForm(OutMI, X86::XOR32i32); break; - case X86::XOR64ri32: SimplifyShortImmForm(OutMI, X86::XOR64i32); break; - } -} - -void X86AsmPrinter::PrintDebugValueComment(const MachineInstr *MI, - raw_ostream &O) { - // Only the target-dependent form of DBG_VALUE should get here. - // Referencing the offset and metadata as NOps-2 and NOps-1 is - // probably portable to other targets; frame pointer location is not. - unsigned NOps = MI->getNumOperands(); - assert(NOps==7); - O << '\t' << MAI->getCommentString() << "DEBUG_VALUE: "; - // cast away const; DIetc do not take const operands for some reason. - DIVariable V(const_cast(MI->getOperand(NOps-1).getMetadata())); - if (V.getContext().isSubprogram()) - O << DISubprogram(V.getContext()).getDisplayName() << ":"; - O << V.getName(); - O << " <- "; - // Frame address. Currently handles register +- offset only. - O << '['; - if (MI->getOperand(0).isReg() && MI->getOperand(0).getReg()) - printOperand(MI, 0, O); - else - O << "undef"; - O << '+'; printOperand(MI, 3, O); - O << ']'; - O << "+"; - printOperand(MI, NOps-2, O); -} - -MachineLocation -X86AsmPrinter::getDebugValueLocation(const MachineInstr *MI) const { - MachineLocation Location; - assert (MI->getNumOperands() == 7 && "Invalid no. of machine operands!"); - // Frame address. Currently handles register +- offset only. - - if (MI->getOperand(0).isReg() && MI->getOperand(3).isImm()) - Location.set(MI->getOperand(0).getReg(), MI->getOperand(3).getImm()); - return Location; -} - - -void X86AsmPrinter::EmitInstruction(const MachineInstr *MI) { - X86MCInstLower MCInstLowering(OutContext, Mang, *this); - switch (MI->getOpcode()) { - case TargetOpcode::DBG_VALUE: - if (isVerbose() && OutStreamer.hasRawTextSupport()) { - std::string TmpStr; - raw_string_ostream OS(TmpStr); - PrintDebugValueComment(MI, OS); - OutStreamer.EmitRawText(StringRef(OS.str())); - } - return; - - case X86::TAILJMPr: - case X86::TAILJMPd: - case X86::TAILJMPd64: - // Lower these as normal, but add some comments. - OutStreamer.AddComment("TAILCALL"); - break; - - case X86::MOVPC32r: { - MCInst TmpInst; - // This is a pseudo op for a two instruction sequence with a label, which - // looks like: - // call "L1$pb" - // "L1$pb": - // popl %esi - - // Emit the call. - MCSymbol *PICBase = MCInstLowering.GetPICBaseSymbol(); - TmpInst.setOpcode(X86::CALLpcrel32); - // FIXME: We would like an efficient form for this, so we don't have to do a - // lot of extra uniquing. - TmpInst.addOperand(MCOperand::CreateExpr(MCSymbolRefExpr::Create(PICBase, - OutContext))); - OutStreamer.EmitInstruction(TmpInst); - - // Emit the label. - OutStreamer.EmitLabel(PICBase); - - // popl $reg - TmpInst.setOpcode(X86::POP32r); - TmpInst.getOperand(0) = MCOperand::CreateReg(MI->getOperand(0).getReg()); - OutStreamer.EmitInstruction(TmpInst); - return; - } - - case X86::ADD32ri: { - // Lower the MO_GOT_ABSOLUTE_ADDRESS form of ADD32ri. - if (MI->getOperand(2).getTargetFlags() != X86II::MO_GOT_ABSOLUTE_ADDRESS) - break; - - // Okay, we have something like: - // EAX = ADD32ri EAX, MO_GOT_ABSOLUTE_ADDRESS(@MYGLOBAL) - - // For this, we want to print something like: - // MYGLOBAL + (. - PICBASE) - // However, we can't generate a ".", so just emit a new label here and refer - // to it. - MCSymbol *DotSym = OutContext.CreateTempSymbol(); - OutStreamer.EmitLabel(DotSym); - - // Now that we have emitted the label, lower the complex operand expression. - MCSymbol *OpSym = MCInstLowering.GetSymbolFromOperand(MI->getOperand(2)); - - const MCExpr *DotExpr = MCSymbolRefExpr::Create(DotSym, OutContext); - const MCExpr *PICBase = - MCSymbolRefExpr::Create(MCInstLowering.GetPICBaseSymbol(), OutContext); - DotExpr = MCBinaryExpr::CreateSub(DotExpr, PICBase, OutContext); - - DotExpr = MCBinaryExpr::CreateAdd(MCSymbolRefExpr::Create(OpSym,OutContext), - DotExpr, OutContext); - - MCInst TmpInst; - TmpInst.setOpcode(X86::ADD32ri); - TmpInst.addOperand(MCOperand::CreateReg(MI->getOperand(0).getReg())); - TmpInst.addOperand(MCOperand::CreateReg(MI->getOperand(1).getReg())); - TmpInst.addOperand(MCOperand::CreateExpr(DotExpr)); - OutStreamer.EmitInstruction(TmpInst); - return; - } - } - - MCInst TmpInst; - MCInstLowering.Lower(MI, TmpInst); - OutStreamer.EmitInstruction(TmpInst); -} - Removed: llvm/trunk/lib/Target/X86/AsmPrinter/X86MCInstLower.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/AsmPrinter/X86MCInstLower.h?rev=108781&view=auto ============================================================================== --- llvm/trunk/lib/Target/X86/AsmPrinter/X86MCInstLower.h (original) +++ llvm/trunk/lib/Target/X86/AsmPrinter/X86MCInstLower.h (removed) @@ -1,51 +0,0 @@ -//===-- X86MCInstLower.h - Lower MachineInstr to MCInst -------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef X86_MCINSTLOWER_H -#define X86_MCINSTLOWER_H - -#include "llvm/Support/Compiler.h" - -namespace llvm { - class MCContext; - class MCInst; - class MCOperand; - class MCSymbol; - class MachineInstr; - class MachineModuleInfoMachO; - class MachineOperand; - class Mangler; - class X86AsmPrinter; - class X86Subtarget; - -/// X86MCInstLower - This class is used to lower an MachineInstr into an MCInst. -class LLVM_LIBRARY_VISIBILITY X86MCInstLower { - MCContext &Ctx; - Mangler *Mang; - X86AsmPrinter &AsmPrinter; - - const X86Subtarget &getSubtarget() const; -public: - X86MCInstLower(MCContext &ctx, Mangler *mang, X86AsmPrinter &asmprinter) - : Ctx(ctx), Mang(mang), AsmPrinter(asmprinter) {} - - void Lower(const MachineInstr *MI, MCInst &OutMI) const; - - MCSymbol *GetPICBaseSymbol() const; - - MCSymbol *GetSymbolFromOperand(const MachineOperand &MO) const; - MCOperand LowerSymbolOperand(const MachineOperand &MO, MCSymbol *Sym) const; - -private: - MachineModuleInfoMachO &getMachOMMI() const; -}; - -} - -#endif Copied: llvm/trunk/lib/Target/X86/X86AsmPrinter.cpp (from r108730, llvm/trunk/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp) URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86AsmPrinter.cpp?p2=llvm/trunk/lib/Target/X86/X86AsmPrinter.cpp&p1=llvm/trunk/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp&r1=108730&r2=108782&rev=108782&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/X86/X86AsmPrinter.cpp Mon Jul 19 18:41:57 2010 @@ -13,8 +13,8 @@ //===----------------------------------------------------------------------===// #include "X86AsmPrinter.h" -#include "X86ATTInstPrinter.h" -#include "X86IntelInstPrinter.h" +#include "AsmPrinter/X86ATTInstPrinter.h" +#include "AsmPrinter/X86IntelInstPrinter.h" #include "X86MCInstLower.h" #include "X86.h" #include "X86COFFMachineModuleInfo.h" Copied: llvm/trunk/lib/Target/X86/X86AsmPrinter.h (from r108730, llvm/trunk/lib/Target/X86/AsmPrinter/X86AsmPrinter.h) URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86AsmPrinter.h?p2=llvm/trunk/lib/Target/X86/X86AsmPrinter.h&p1=llvm/trunk/lib/Target/X86/AsmPrinter/X86AsmPrinter.h&r1=108730&r2=108782&rev=108782&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/AsmPrinter/X86AsmPrinter.h (original) +++ llvm/trunk/lib/Target/X86/X86AsmPrinter.h Mon Jul 19 18:41:57 2010 @@ -14,9 +14,9 @@ #ifndef X86ASMPRINTER_H #define X86ASMPRINTER_H -#include "../X86.h" -#include "../X86MachineFunctionInfo.h" -#include "../X86TargetMachine.h" +#include "X86.h" +#include "X86MachineFunctionInfo.h" +#include "X86TargetMachine.h" #include "llvm/ADT/StringSet.h" #include "llvm/CodeGen/AsmPrinter.h" #include "llvm/CodeGen/MachineModuleInfo.h" From sabre at nondot.org Mon Jul 19 18:44:46 2010 From: sabre at nondot.org (Chris Lattner) Date: Mon, 19 Jul 2010 23:44:46 -0000 Subject: [llvm-commits] [llvm] r108783 - in /llvm/trunk/lib/Target/ARM: ARMAsmPrinter.cpp ARMMCInstLower.cpp ARMMCInstLower.h AsmPrinter/ARMAsmPrinter.cpp AsmPrinter/ARMMCInstLower.cpp AsmPrinter/ARMMCInstLower.h Message-ID: <20100719234446.CBA422A6C12C@llvm.org> Author: lattner Date: Mon Jul 19 18:44:46 2010 New Revision: 108783 URL: http://llvm.org/viewvc/llvm-project?rev=108783&view=rev Log: sink the arm implementations of ASmPrinter and MCInstLower out of the AsmPrinter directory into libarm. Now the ARM InstPrinters depend jsut on the MC stuff, not on vmcore or codegen. Added: llvm/trunk/lib/Target/ARM/ARMAsmPrinter.cpp - copied, changed from r108781, llvm/trunk/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp llvm/trunk/lib/Target/ARM/ARMMCInstLower.cpp - copied unchanged from r108781, llvm/trunk/lib/Target/ARM/AsmPrinter/ARMMCInstLower.cpp llvm/trunk/lib/Target/ARM/ARMMCInstLower.h - copied unchanged from r108781, llvm/trunk/lib/Target/ARM/AsmPrinter/ARMMCInstLower.h Removed: llvm/trunk/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp llvm/trunk/lib/Target/ARM/AsmPrinter/ARMMCInstLower.cpp llvm/trunk/lib/Target/ARM/AsmPrinter/ARMMCInstLower.h Copied: llvm/trunk/lib/Target/ARM/ARMAsmPrinter.cpp (from r108781, llvm/trunk/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp) URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMAsmPrinter.cpp?p2=llvm/trunk/lib/Target/ARM/ARMAsmPrinter.cpp&p1=llvm/trunk/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp&r1=108781&r2=108783&rev=108783&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/ARM/ARMAsmPrinter.cpp Mon Jul 19 18:44:46 2010 @@ -17,7 +17,7 @@ #include "ARMBuildAttrs.h" #include "ARMAddressingModes.h" #include "ARMConstantPoolValue.h" -#include "ARMInstPrinter.h" +#include "AsmPrinter/ARMInstPrinter.h" #include "ARMMachineFunctionInfo.h" #include "ARMMCInstLower.h" #include "ARMTargetMachine.h" Removed: llvm/trunk/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp?rev=108782&view=auto ============================================================================== --- llvm/trunk/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp (removed) @@ -1,1438 +0,0 @@ -//===-- ARMAsmPrinter.cpp - Print machine code to an ARM .s file ----------===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file contains a printer that converts from our internal representation -// of machine-dependent LLVM code to GAS-format ARM assembly language. -// -//===----------------------------------------------------------------------===// - -#define DEBUG_TYPE "asm-printer" -#include "ARM.h" -#include "ARMBuildAttrs.h" -#include "ARMAddressingModes.h" -#include "ARMConstantPoolValue.h" -#include "ARMInstPrinter.h" -#include "ARMMachineFunctionInfo.h" -#include "ARMMCInstLower.h" -#include "ARMTargetMachine.h" -#include "llvm/Analysis/DebugInfo.h" -#include "llvm/Constants.h" -#include "llvm/Module.h" -#include "llvm/Type.h" -#include "llvm/Assembly/Writer.h" -#include "llvm/CodeGen/AsmPrinter.h" -#include "llvm/CodeGen/MachineModuleInfoImpls.h" -#include "llvm/CodeGen/MachineFunctionPass.h" -#include "llvm/CodeGen/MachineJumpTableInfo.h" -#include "llvm/CodeGen/TargetLoweringObjectFileImpl.h" -#include "llvm/MC/MCAsmInfo.h" -#include "llvm/MC/MCContext.h" -#include "llvm/MC/MCExpr.h" -#include "llvm/MC/MCInst.h" -#include "llvm/MC/MCSectionMachO.h" -#include "llvm/MC/MCStreamer.h" -#include "llvm/MC/MCSymbol.h" -#include "llvm/Target/Mangler.h" -#include "llvm/Target/TargetData.h" -#include "llvm/Target/TargetMachine.h" -#include "llvm/Target/TargetOptions.h" -#include "llvm/Target/TargetRegistry.h" -#include "llvm/ADT/SmallPtrSet.h" -#include "llvm/ADT/SmallString.h" -#include "llvm/ADT/StringExtras.h" -#include "llvm/Support/CommandLine.h" -#include "llvm/Support/ErrorHandling.h" -#include "llvm/Support/raw_ostream.h" -#include -using namespace llvm; - -static cl::opt -EnableMCInst("enable-arm-mcinst-printer", cl::Hidden, - cl::desc("enable experimental asmprinter gunk in the arm backend")); - -namespace { - class ARMAsmPrinter : public AsmPrinter { - - /// Subtarget - Keep a pointer to the ARMSubtarget around so that we can - /// make the right decision when printing asm code for different targets. - const ARMSubtarget *Subtarget; - - /// AFI - Keep a pointer to ARMFunctionInfo for the current - /// MachineFunction. - ARMFunctionInfo *AFI; - - /// MCP - Keep a pointer to constantpool entries of the current - /// MachineFunction. - const MachineConstantPool *MCP; - - public: - explicit ARMAsmPrinter(TargetMachine &TM, MCStreamer &Streamer) - : AsmPrinter(TM, Streamer), AFI(NULL), MCP(NULL) { - Subtarget = &TM.getSubtarget(); - } - - virtual const char *getPassName() const { - return "ARM Assembly Printer"; - } - - void printInstructionThroughMCStreamer(const MachineInstr *MI); - - - void printOperand(const MachineInstr *MI, int OpNum, raw_ostream &O, - const char *Modifier = 0); - void printSOImmOperand(const MachineInstr *MI, int OpNum, raw_ostream &O); - void printSOImm2PartOperand(const MachineInstr *MI, int OpNum, - raw_ostream &O); - void printSORegOperand(const MachineInstr *MI, int OpNum, - raw_ostream &O); - void printAddrMode2Operand(const MachineInstr *MI, int OpNum, - raw_ostream &O); - void printAddrMode2OffsetOperand(const MachineInstr *MI, int OpNum, - raw_ostream &O); - void printAddrMode3Operand(const MachineInstr *MI, int OpNum, - raw_ostream &O); - void printAddrMode3OffsetOperand(const MachineInstr *MI, int OpNum, - raw_ostream &O); - void printAddrMode4Operand(const MachineInstr *MI, int OpNum,raw_ostream &O, - const char *Modifier = 0); - void printAddrMode5Operand(const MachineInstr *MI, int OpNum,raw_ostream &O, - const char *Modifier = 0); - void printAddrMode6Operand(const MachineInstr *MI, int OpNum, - raw_ostream &O); - void printAddrMode6OffsetOperand(const MachineInstr *MI, int OpNum, - raw_ostream &O); - void printAddrModePCOperand(const MachineInstr *MI, int OpNum, - raw_ostream &O, - const char *Modifier = 0); - void printBitfieldInvMaskImmOperand (const MachineInstr *MI, int OpNum, - raw_ostream &O); - - void printThumbS4ImmOperand(const MachineInstr *MI, int OpNum, - raw_ostream &O); - void printThumbITMask(const MachineInstr *MI, int OpNum, raw_ostream &O); - void printThumbAddrModeRROperand(const MachineInstr *MI, int OpNum, - raw_ostream &O); - void printThumbAddrModeRI5Operand(const MachineInstr *MI, int OpNum, - raw_ostream &O, - unsigned Scale); - void printThumbAddrModeS1Operand(const MachineInstr *MI, int OpNum, - raw_ostream &O); - void printThumbAddrModeS2Operand(const MachineInstr *MI, int OpNum, - raw_ostream &O); - void printThumbAddrModeS4Operand(const MachineInstr *MI, int OpNum, - raw_ostream &O); - void printThumbAddrModeSPOperand(const MachineInstr *MI, int OpNum, - raw_ostream &O); - - void printT2SOOperand(const MachineInstr *MI, int OpNum, raw_ostream &O); - void printT2AddrModeImm12Operand(const MachineInstr *MI, int OpNum, - raw_ostream &O); - void printT2AddrModeImm8Operand(const MachineInstr *MI, int OpNum, - raw_ostream &O); - void printT2AddrModeImm8s4Operand(const MachineInstr *MI, int OpNum, - raw_ostream &O); - void printT2AddrModeImm8OffsetOperand(const MachineInstr *MI, int OpNum, - raw_ostream &O); - void printT2AddrModeImm8s4OffsetOperand(const MachineInstr *MI, int OpNum, - raw_ostream &O) {} - void printT2AddrModeSoRegOperand(const MachineInstr *MI, int OpNum, - raw_ostream &O); - - void printCPSOptionOperand(const MachineInstr *MI, int OpNum, - raw_ostream &O) {} - void printMSRMaskOperand(const MachineInstr *MI, int OpNum, - raw_ostream &O) {} - void printNegZeroOperand(const MachineInstr *MI, int OpNum, - raw_ostream &O) {} - void printPredicateOperand(const MachineInstr *MI, int OpNum, - raw_ostream &O); - void printMandatoryPredicateOperand(const MachineInstr *MI, int OpNum, - raw_ostream &O); - void printSBitModifierOperand(const MachineInstr *MI, int OpNum, - raw_ostream &O); - void printPCLabel(const MachineInstr *MI, int OpNum, - raw_ostream &O); - void printRegisterList(const MachineInstr *MI, int OpNum, - raw_ostream &O); - void printCPInstOperand(const MachineInstr *MI, int OpNum, - raw_ostream &O, - const char *Modifier); - void printJTBlockOperand(const MachineInstr *MI, int OpNum, - raw_ostream &O); - void printJT2BlockOperand(const MachineInstr *MI, int OpNum, - raw_ostream &O); - void printTBAddrMode(const MachineInstr *MI, int OpNum, - raw_ostream &O); - void printNoHashImmediate(const MachineInstr *MI, int OpNum, - raw_ostream &O); - void printVFPf32ImmOperand(const MachineInstr *MI, int OpNum, - raw_ostream &O); - void printVFPf64ImmOperand(const MachineInstr *MI, int OpNum, - raw_ostream &O); - void printNEONModImmOperand(const MachineInstr *MI, int OpNum, - raw_ostream &O); - - virtual bool PrintAsmOperand(const MachineInstr *MI, unsigned OpNum, - unsigned AsmVariant, const char *ExtraCode, - raw_ostream &O); - virtual bool PrintAsmMemoryOperand(const MachineInstr *MI, unsigned OpNum, - unsigned AsmVariant, - const char *ExtraCode, raw_ostream &O); - - void printInstruction(const MachineInstr *MI, raw_ostream &O); // autogen - static const char *getRegisterName(unsigned RegNo); - - virtual void EmitInstruction(const MachineInstr *MI); - bool runOnMachineFunction(MachineFunction &F); - - virtual void EmitConstantPool() {} // we emit constant pools customly! - virtual void EmitFunctionEntryLabel(); - void EmitStartOfAsmFile(Module &M); - void EmitEndOfAsmFile(Module &M); - - MCSymbol *GetARMSetPICJumpTableLabel2(unsigned uid, unsigned uid2, - const MachineBasicBlock *MBB) const; - MCSymbol *GetARMJTIPICJumpTableLabel2(unsigned uid, unsigned uid2) const; - - /// EmitMachineConstantPoolValue - Print a machine constantpool value to - /// the .s file. - virtual void EmitMachineConstantPoolValue(MachineConstantPoolValue *MCPV) { - SmallString<128> Str; - raw_svector_ostream OS(Str); - EmitMachineConstantPoolValue(MCPV, OS); - OutStreamer.EmitRawText(OS.str()); - } - - void EmitMachineConstantPoolValue(MachineConstantPoolValue *MCPV, - raw_ostream &O) { - switch (TM.getTargetData()->getTypeAllocSize(MCPV->getType())) { - case 1: O << MAI->getData8bitsDirective(0); break; - case 2: O << MAI->getData16bitsDirective(0); break; - case 4: O << MAI->getData32bitsDirective(0); break; - default: assert(0 && "Unknown CPV size"); - } - - ARMConstantPoolValue *ACPV = static_cast(MCPV); - - if (ACPV->isLSDA()) { - O << MAI->getPrivateGlobalPrefix() << "_LSDA_" << getFunctionNumber(); - } else if (ACPV->isBlockAddress()) { - O << *GetBlockAddressSymbol(ACPV->getBlockAddress()); - } else if (ACPV->isGlobalValue()) { - const GlobalValue *GV = ACPV->getGV(); - bool isIndirect = Subtarget->isTargetDarwin() && - Subtarget->GVIsIndirectSymbol(GV, TM.getRelocationModel()); - if (!isIndirect) - O << *Mang->getSymbol(GV); - else { - // FIXME: Remove this when Darwin transition to @GOT like syntax. - MCSymbol *Sym = GetSymbolWithGlobalValueBase(GV, "$non_lazy_ptr"); - O << *Sym; - - MachineModuleInfoMachO &MMIMachO = - MMI->getObjFileInfo(); - MachineModuleInfoImpl::StubValueTy &StubSym = - GV->hasHiddenVisibility() ? MMIMachO.getHiddenGVStubEntry(Sym) : - MMIMachO.getGVStubEntry(Sym); - if (StubSym.getPointer() == 0) - StubSym = MachineModuleInfoImpl:: - StubValueTy(Mang->getSymbol(GV), !GV->hasInternalLinkage()); - } - } else { - assert(ACPV->isExtSymbol() && "unrecognized constant pool value"); - O << *GetExternalSymbolSymbol(ACPV->getSymbol()); - } - - if (ACPV->hasModifier()) O << "(" << ACPV->getModifier() << ")"; - if (ACPV->getPCAdjustment() != 0) { - O << "-(" << MAI->getPrivateGlobalPrefix() << "PC" - << getFunctionNumber() << "_" << ACPV->getLabelId() - << "+" << (unsigned)ACPV->getPCAdjustment(); - if (ACPV->mustAddCurrentAddress()) - O << "-."; - O << ')'; - } - } - }; -} // end of anonymous namespace - -#include "ARMGenAsmWriter.inc" - -void ARMAsmPrinter::EmitFunctionEntryLabel() { - if (AFI->isThumbFunction()) { - OutStreamer.EmitRawText(StringRef("\t.code\t16")); - if (!Subtarget->isTargetDarwin()) - OutStreamer.EmitRawText(StringRef("\t.thumb_func")); - else { - // This needs to emit to a temporary string to get properly quoted - // MCSymbols when they have spaces in them. - SmallString<128> Tmp; - raw_svector_ostream OS(Tmp); - OS << "\t.thumb_func\t" << *CurrentFnSym; - OutStreamer.EmitRawText(OS.str()); - } - } - - OutStreamer.EmitLabel(CurrentFnSym); -} - -/// runOnMachineFunction - This uses the printInstruction() -/// method to print assembly for each instruction. -/// -bool ARMAsmPrinter::runOnMachineFunction(MachineFunction &MF) { - AFI = MF.getInfo(); - MCP = MF.getConstantPool(); - - return AsmPrinter::runOnMachineFunction(MF); -} - -void ARMAsmPrinter::printOperand(const MachineInstr *MI, int OpNum, - raw_ostream &O, const char *Modifier) { - const MachineOperand &MO = MI->getOperand(OpNum); - unsigned TF = MO.getTargetFlags(); - - switch (MO.getType()) { - default: - assert(0 && ""); - case MachineOperand::MO_Register: { - unsigned Reg = MO.getReg(); - assert(TargetRegisterInfo::isPhysicalRegister(Reg)); - if (Modifier && strcmp(Modifier, "dregpair") == 0) { - unsigned DRegLo = TM.getRegisterInfo()->getSubReg(Reg, ARM::dsub_0); - unsigned DRegHi = TM.getRegisterInfo()->getSubReg(Reg, ARM::dsub_1); - O << '{' - << getRegisterName(DRegLo) << ", " << getRegisterName(DRegHi) - << '}'; - } else if (Modifier && strcmp(Modifier, "lane") == 0) { - unsigned RegNum = ARMRegisterInfo::getRegisterNumbering(Reg); - unsigned DReg = - TM.getRegisterInfo()->getMatchingSuperReg(Reg, - RegNum & 1 ? ARM::ssub_1 : ARM::ssub_0, &ARM::DPR_VFP2RegClass); - O << getRegisterName(DReg) << '[' << (RegNum & 1) << ']'; - } else { - assert(!MO.getSubReg() && "Subregs should be eliminated!"); - O << getRegisterName(Reg); - } - break; - } - case MachineOperand::MO_Immediate: { - int64_t Imm = MO.getImm(); - O << '#'; - if ((Modifier && strcmp(Modifier, "lo16") == 0) || - (TF & ARMII::MO_LO16)) - O << ":lower16:"; - else if ((Modifier && strcmp(Modifier, "hi16") == 0) || - (TF & ARMII::MO_HI16)) - O << ":upper16:"; - O << Imm; - break; - } - case MachineOperand::MO_MachineBasicBlock: - O << *MO.getMBB()->getSymbol(); - return; - case MachineOperand::MO_GlobalAddress: { - bool isCallOp = Modifier && !strcmp(Modifier, "call"); - const GlobalValue *GV = MO.getGlobal(); - - if ((Modifier && strcmp(Modifier, "lo16") == 0) || - (TF & ARMII::MO_LO16)) - O << ":lower16:"; - else if ((Modifier && strcmp(Modifier, "hi16") == 0) || - (TF & ARMII::MO_HI16)) - O << ":upper16:"; - O << *Mang->getSymbol(GV); - - printOffset(MO.getOffset(), O); - - if (isCallOp && Subtarget->isTargetELF() && - TM.getRelocationModel() == Reloc::PIC_) - O << "(PLT)"; - break; - } - case MachineOperand::MO_ExternalSymbol: { - bool isCallOp = Modifier && !strcmp(Modifier, "call"); - O << *GetExternalSymbolSymbol(MO.getSymbolName()); - - if (isCallOp && Subtarget->isTargetELF() && - TM.getRelocationModel() == Reloc::PIC_) - O << "(PLT)"; - break; - } - case MachineOperand::MO_ConstantPoolIndex: - O << *GetCPISymbol(MO.getIndex()); - break; - case MachineOperand::MO_JumpTableIndex: - O << *GetJTISymbol(MO.getIndex()); - break; - } -} - -static void printSOImm(raw_ostream &O, int64_t V, bool VerboseAsm, - const MCAsmInfo *MAI) { - // Break it up into two parts that make up a shifter immediate. - V = ARM_AM::getSOImmVal(V); - assert(V != -1 && "Not a valid so_imm value!"); - - unsigned Imm = ARM_AM::getSOImmValImm(V); - unsigned Rot = ARM_AM::getSOImmValRot(V); - - // Print low-level immediate formation info, per - // A5.1.3: "Data-processing operands - Immediate". - if (Rot) { - O << "#" << Imm << ", " << Rot; - // Pretty printed version. - if (VerboseAsm) { - O << "\t" << MAI->getCommentString() << ' '; - O << (int)ARM_AM::rotr32(Imm, Rot); - } - } else { - O << "#" << Imm; - } -} - -/// printSOImmOperand - SOImm is 4-bit rotate amount in bits 8-11 with 8-bit -/// immediate in bits 0-7. -void ARMAsmPrinter::printSOImmOperand(const MachineInstr *MI, int OpNum, - raw_ostream &O) { - const MachineOperand &MO = MI->getOperand(OpNum); - assert(MO.isImm() && "Not a valid so_imm value!"); - printSOImm(O, MO.getImm(), isVerbose(), MAI); -} - -/// printSOImm2PartOperand - SOImm is broken into two pieces using a 'mov' -/// followed by an 'orr' to materialize. -void ARMAsmPrinter::printSOImm2PartOperand(const MachineInstr *MI, int OpNum, - raw_ostream &O) { - const MachineOperand &MO = MI->getOperand(OpNum); - assert(MO.isImm() && "Not a valid so_imm value!"); - unsigned V1 = ARM_AM::getSOImmTwoPartFirst(MO.getImm()); - unsigned V2 = ARM_AM::getSOImmTwoPartSecond(MO.getImm()); - printSOImm(O, V1, isVerbose(), MAI); - O << "\n\torr"; - printPredicateOperand(MI, 2, O); - O << "\t"; - printOperand(MI, 0, O); - O << ", "; - printOperand(MI, 0, O); - O << ", "; - printSOImm(O, V2, isVerbose(), MAI); -} - -// so_reg is a 4-operand unit corresponding to register forms of the A5.1 -// "Addressing Mode 1 - Data-processing operands" forms. This includes: -// REG 0 0 - e.g. R5 -// REG REG 0,SH_OPC - e.g. R5, ROR R3 -// REG 0 IMM,SH_OPC - e.g. R5, LSL #3 -void ARMAsmPrinter::printSORegOperand(const MachineInstr *MI, int Op, - raw_ostream &O) { - const MachineOperand &MO1 = MI->getOperand(Op); - const MachineOperand &MO2 = MI->getOperand(Op+1); - const MachineOperand &MO3 = MI->getOperand(Op+2); - - O << getRegisterName(MO1.getReg()); - - // Print the shift opc. - O << ", " - << ARM_AM::getShiftOpcStr(ARM_AM::getSORegShOp(MO3.getImm())) - << " "; - - if (MO2.getReg()) { - O << getRegisterName(MO2.getReg()); - assert(ARM_AM::getSORegOffset(MO3.getImm()) == 0); - } else { - O << "#" << ARM_AM::getSORegOffset(MO3.getImm()); - } -} - -void ARMAsmPrinter::printAddrMode2Operand(const MachineInstr *MI, int Op, - raw_ostream &O) { - const MachineOperand &MO1 = MI->getOperand(Op); - const MachineOperand &MO2 = MI->getOperand(Op+1); - const MachineOperand &MO3 = MI->getOperand(Op+2); - - if (!MO1.isReg()) { // FIXME: This is for CP entries, but isn't right. - printOperand(MI, Op, O); - return; - } - - O << "[" << getRegisterName(MO1.getReg()); - - if (!MO2.getReg()) { - if (ARM_AM::getAM2Offset(MO3.getImm())) // Don't print +0. - O << ", #" - << ARM_AM::getAddrOpcStr(ARM_AM::getAM2Op(MO3.getImm())) - << ARM_AM::getAM2Offset(MO3.getImm()); - O << "]"; - return; - } - - O << ", " - << ARM_AM::getAddrOpcStr(ARM_AM::getAM2Op(MO3.getImm())) - << getRegisterName(MO2.getReg()); - - if (unsigned ShImm = ARM_AM::getAM2Offset(MO3.getImm())) - O << ", " - << ARM_AM::getShiftOpcStr(ARM_AM::getAM2ShiftOpc(MO3.getImm())) - << " #" << ShImm; - O << "]"; -} - -void ARMAsmPrinter::printAddrMode2OffsetOperand(const MachineInstr *MI, int Op, - raw_ostream &O) { - const MachineOperand &MO1 = MI->getOperand(Op); - const MachineOperand &MO2 = MI->getOperand(Op+1); - - if (!MO1.getReg()) { - unsigned ImmOffs = ARM_AM::getAM2Offset(MO2.getImm()); - O << "#" - << ARM_AM::getAddrOpcStr(ARM_AM::getAM2Op(MO2.getImm())) - << ImmOffs; - return; - } - - O << ARM_AM::getAddrOpcStr(ARM_AM::getAM2Op(MO2.getImm())) - << getRegisterName(MO1.getReg()); - - if (unsigned ShImm = ARM_AM::getAM2Offset(MO2.getImm())) - O << ", " - << ARM_AM::getShiftOpcStr(ARM_AM::getAM2ShiftOpc(MO2.getImm())) - << " #" << ShImm; -} - -void ARMAsmPrinter::printAddrMode3Operand(const MachineInstr *MI, int Op, - raw_ostream &O) { - const MachineOperand &MO1 = MI->getOperand(Op); - const MachineOperand &MO2 = MI->getOperand(Op+1); - const MachineOperand &MO3 = MI->getOperand(Op+2); - - assert(TargetRegisterInfo::isPhysicalRegister(MO1.getReg())); - O << "[" << getRegisterName(MO1.getReg()); - - if (MO2.getReg()) { - O << ", " - << (char)ARM_AM::getAM3Op(MO3.getImm()) - << getRegisterName(MO2.getReg()) - << "]"; - return; - } - - if (unsigned ImmOffs = ARM_AM::getAM3Offset(MO3.getImm())) - O << ", #" - << ARM_AM::getAddrOpcStr(ARM_AM::getAM3Op(MO3.getImm())) - << ImmOffs; - O << "]"; -} - -void ARMAsmPrinter::printAddrMode3OffsetOperand(const MachineInstr *MI, int Op, - raw_ostream &O){ - const MachineOperand &MO1 = MI->getOperand(Op); - const MachineOperand &MO2 = MI->getOperand(Op+1); - - if (MO1.getReg()) { - O << (char)ARM_AM::getAM3Op(MO2.getImm()) - << getRegisterName(MO1.getReg()); - return; - } - - unsigned ImmOffs = ARM_AM::getAM3Offset(MO2.getImm()); - O << "#" - << ARM_AM::getAddrOpcStr(ARM_AM::getAM3Op(MO2.getImm())) - << ImmOffs; -} - -void ARMAsmPrinter::printAddrMode4Operand(const MachineInstr *MI, int Op, - raw_ostream &O, - const char *Modifier) { - const MachineOperand &MO2 = MI->getOperand(Op+1); - ARM_AM::AMSubMode Mode = ARM_AM::getAM4SubMode(MO2.getImm()); - if (Modifier && strcmp(Modifier, "submode") == 0) { - O << ARM_AM::getAMSubModeStr(Mode); - } else if (Modifier && strcmp(Modifier, "wide") == 0) { - ARM_AM::AMSubMode Mode = ARM_AM::getAM4SubMode(MO2.getImm()); - if (Mode == ARM_AM::ia) - O << ".w"; - } else { - printOperand(MI, Op, O); - } -} - -void ARMAsmPrinter::printAddrMode5Operand(const MachineInstr *MI, int Op, - raw_ostream &O, - const char *Modifier) { - const MachineOperand &MO1 = MI->getOperand(Op); - const MachineOperand &MO2 = MI->getOperand(Op+1); - - if (!MO1.isReg()) { // FIXME: This is for CP entries, but isn't right. - printOperand(MI, Op, O); - return; - } - - assert(TargetRegisterInfo::isPhysicalRegister(MO1.getReg())); - - if (Modifier && strcmp(Modifier, "submode") == 0) { - ARM_AM::AMSubMode Mode = ARM_AM::getAM5SubMode(MO2.getImm()); - O << ARM_AM::getAMSubModeStr(Mode); - return; - } else if (Modifier && strcmp(Modifier, "base") == 0) { - // Used for FSTM{D|S} and LSTM{D|S} operations. - O << getRegisterName(MO1.getReg()); - return; - } - - O << "[" << getRegisterName(MO1.getReg()); - - if (unsigned ImmOffs = ARM_AM::getAM5Offset(MO2.getImm())) { - O << ", #" - << ARM_AM::getAddrOpcStr(ARM_AM::getAM5Op(MO2.getImm())) - << ImmOffs*4; - } - O << "]"; -} - -void ARMAsmPrinter::printAddrMode6Operand(const MachineInstr *MI, int Op, - raw_ostream &O) { - const MachineOperand &MO1 = MI->getOperand(Op); - const MachineOperand &MO2 = MI->getOperand(Op+1); - - O << "[" << getRegisterName(MO1.getReg()); - if (MO2.getImm()) { - // FIXME: Both darwin as and GNU as violate ARM docs here. - O << ", :" << (MO2.getImm() << 3); - } - O << "]"; -} - -void ARMAsmPrinter::printAddrMode6OffsetOperand(const MachineInstr *MI, int Op, - raw_ostream &O){ - const MachineOperand &MO = MI->getOperand(Op); - if (MO.getReg() == 0) - O << "!"; - else - O << ", " << getRegisterName(MO.getReg()); -} - -void ARMAsmPrinter::printAddrModePCOperand(const MachineInstr *MI, int Op, - raw_ostream &O, - const char *Modifier) { - if (Modifier && strcmp(Modifier, "label") == 0) { - printPCLabel(MI, Op+1, O); - return; - } - - const MachineOperand &MO1 = MI->getOperand(Op); - assert(TargetRegisterInfo::isPhysicalRegister(MO1.getReg())); - O << "[pc, " << getRegisterName(MO1.getReg()) << "]"; -} - -void -ARMAsmPrinter::printBitfieldInvMaskImmOperand(const MachineInstr *MI, int Op, - raw_ostream &O) { - const MachineOperand &MO = MI->getOperand(Op); - uint32_t v = ~MO.getImm(); - int32_t lsb = CountTrailingZeros_32(v); - int32_t width = (32 - CountLeadingZeros_32 (v)) - lsb; - assert(MO.isImm() && "Not a valid bf_inv_mask_imm value!"); - O << "#" << lsb << ", #" << width; -} - -//===--------------------------------------------------------------------===// - -void ARMAsmPrinter::printThumbS4ImmOperand(const MachineInstr *MI, int Op, - raw_ostream &O) { - O << "#" << MI->getOperand(Op).getImm() * 4; -} - -void -ARMAsmPrinter::printThumbITMask(const MachineInstr *MI, int Op, - raw_ostream &O) { - // (3 - the number of trailing zeros) is the number of then / else. - unsigned Mask = MI->getOperand(Op).getImm(); - unsigned CondBit0 = Mask >> 4 & 1; - unsigned NumTZ = CountTrailingZeros_32(Mask); - assert(NumTZ <= 3 && "Invalid IT mask!"); - for (unsigned Pos = 3, e = NumTZ; Pos > e; --Pos) { - bool T = ((Mask >> Pos) & 1) == CondBit0; - if (T) - O << 't'; - else - O << 'e'; - } -} - -void -ARMAsmPrinter::printThumbAddrModeRROperand(const MachineInstr *MI, int Op, - raw_ostream &O) { - const MachineOperand &MO1 = MI->getOperand(Op); - const MachineOperand &MO2 = MI->getOperand(Op+1); - O << "[" << getRegisterName(MO1.getReg()); - O << ", " << getRegisterName(MO2.getReg()) << "]"; -} - -void -ARMAsmPrinter::printThumbAddrModeRI5Operand(const MachineInstr *MI, int Op, - raw_ostream &O, - unsigned Scale) { - const MachineOperand &MO1 = MI->getOperand(Op); - const MachineOperand &MO2 = MI->getOperand(Op+1); - const MachineOperand &MO3 = MI->getOperand(Op+2); - - if (!MO1.isReg()) { // FIXME: This is for CP entries, but isn't right. - printOperand(MI, Op, O); - return; - } - - O << "[" << getRegisterName(MO1.getReg()); - if (MO3.getReg()) - O << ", " << getRegisterName(MO3.getReg()); - else if (unsigned ImmOffs = MO2.getImm()) - O << ", #" << ImmOffs * Scale; - O << "]"; -} - -void -ARMAsmPrinter::printThumbAddrModeS1Operand(const MachineInstr *MI, int Op, - raw_ostream &O) { - printThumbAddrModeRI5Operand(MI, Op, O, 1); -} -void -ARMAsmPrinter::printThumbAddrModeS2Operand(const MachineInstr *MI, int Op, - raw_ostream &O) { - printThumbAddrModeRI5Operand(MI, Op, O, 2); -} -void -ARMAsmPrinter::printThumbAddrModeS4Operand(const MachineInstr *MI, int Op, - raw_ostream &O) { - printThumbAddrModeRI5Operand(MI, Op, O, 4); -} - -void ARMAsmPrinter::printThumbAddrModeSPOperand(const MachineInstr *MI,int Op, - raw_ostream &O) { - const MachineOperand &MO1 = MI->getOperand(Op); - const MachineOperand &MO2 = MI->getOperand(Op+1); - O << "[" << getRegisterName(MO1.getReg()); - if (unsigned ImmOffs = MO2.getImm()) - O << ", #" << ImmOffs*4; - O << "]"; -} - -//===--------------------------------------------------------------------===// - -// Constant shifts t2_so_reg is a 2-operand unit corresponding to the Thumb2 -// register with shift forms. -// REG 0 0 - e.g. R5 -// REG IMM, SH_OPC - e.g. R5, LSL #3 -void ARMAsmPrinter::printT2SOOperand(const MachineInstr *MI, int OpNum, - raw_ostream &O) { - const MachineOperand &MO1 = MI->getOperand(OpNum); - const MachineOperand &MO2 = MI->getOperand(OpNum+1); - - unsigned Reg = MO1.getReg(); - assert(TargetRegisterInfo::isPhysicalRegister(Reg)); - O << getRegisterName(Reg); - - // Print the shift opc. - O << ", " - << ARM_AM::getShiftOpcStr(ARM_AM::getSORegShOp(MO2.getImm())) - << " "; - - assert(MO2.isImm() && "Not a valid t2_so_reg value!"); - O << "#" << ARM_AM::getSORegOffset(MO2.getImm()); -} - -void ARMAsmPrinter::printT2AddrModeImm12Operand(const MachineInstr *MI, - int OpNum, - raw_ostream &O) { - const MachineOperand &MO1 = MI->getOperand(OpNum); - const MachineOperand &MO2 = MI->getOperand(OpNum+1); - - O << "[" << getRegisterName(MO1.getReg()); - - unsigned OffImm = MO2.getImm(); - if (OffImm) // Don't print +0. - O << ", #" << OffImm; - O << "]"; -} - -void ARMAsmPrinter::printT2AddrModeImm8Operand(const MachineInstr *MI, - int OpNum, - raw_ostream &O) { - const MachineOperand &MO1 = MI->getOperand(OpNum); - const MachineOperand &MO2 = MI->getOperand(OpNum+1); - - O << "[" << getRegisterName(MO1.getReg()); - - int32_t OffImm = (int32_t)MO2.getImm(); - // Don't print +0. - if (OffImm < 0) - O << ", #-" << -OffImm; - else if (OffImm > 0) - O << ", #" << OffImm; - O << "]"; -} - -void ARMAsmPrinter::printT2AddrModeImm8s4Operand(const MachineInstr *MI, - int OpNum, - raw_ostream &O) { - const MachineOperand &MO1 = MI->getOperand(OpNum); - const MachineOperand &MO2 = MI->getOperand(OpNum+1); - - O << "[" << getRegisterName(MO1.getReg()); - - int32_t OffImm = (int32_t)MO2.getImm() / 4; - // Don't print +0. - if (OffImm < 0) - O << ", #-" << -OffImm * 4; - else if (OffImm > 0) - O << ", #" << OffImm * 4; - O << "]"; -} - -void ARMAsmPrinter::printT2AddrModeImm8OffsetOperand(const MachineInstr *MI, - int OpNum, - raw_ostream &O) { - const MachineOperand &MO1 = MI->getOperand(OpNum); - int32_t OffImm = (int32_t)MO1.getImm(); - // Don't print +0. - if (OffImm < 0) - O << "#-" << -OffImm; - else if (OffImm > 0) - O << "#" << OffImm; -} - -void ARMAsmPrinter::printT2AddrModeSoRegOperand(const MachineInstr *MI, - int OpNum, - raw_ostream &O) { - const MachineOperand &MO1 = MI->getOperand(OpNum); - const MachineOperand &MO2 = MI->getOperand(OpNum+1); - const MachineOperand &MO3 = MI->getOperand(OpNum+2); - - O << "[" << getRegisterName(MO1.getReg()); - - assert(MO2.getReg() && "Invalid so_reg load / store address!"); - O << ", " << getRegisterName(MO2.getReg()); - - unsigned ShAmt = MO3.getImm(); - if (ShAmt) { - assert(ShAmt <= 3 && "Not a valid Thumb2 addressing mode!"); - O << ", lsl #" << ShAmt; - } - O << "]"; -} - - -//===--------------------------------------------------------------------===// - -void ARMAsmPrinter::printPredicateOperand(const MachineInstr *MI, int OpNum, - raw_ostream &O) { - ARMCC::CondCodes CC = (ARMCC::CondCodes)MI->getOperand(OpNum).getImm(); - if (CC != ARMCC::AL) - O << ARMCondCodeToString(CC); -} - -void ARMAsmPrinter::printMandatoryPredicateOperand(const MachineInstr *MI, - int OpNum, - raw_ostream &O) { - ARMCC::CondCodes CC = (ARMCC::CondCodes)MI->getOperand(OpNum).getImm(); - O << ARMCondCodeToString(CC); -} - -void ARMAsmPrinter::printSBitModifierOperand(const MachineInstr *MI, int OpNum, - raw_ostream &O){ - unsigned Reg = MI->getOperand(OpNum).getReg(); - if (Reg) { - assert(Reg == ARM::CPSR && "Expect ARM CPSR register!"); - O << 's'; - } -} - -void ARMAsmPrinter::printPCLabel(const MachineInstr *MI, int OpNum, - raw_ostream &O) { - int Id = (int)MI->getOperand(OpNum).getImm(); - O << MAI->getPrivateGlobalPrefix() - << "PC" << getFunctionNumber() << "_" << Id; -} - -void ARMAsmPrinter::printRegisterList(const MachineInstr *MI, int OpNum, - raw_ostream &O) { - O << "{"; - for (unsigned i = OpNum, e = MI->getNumOperands(); i != e; ++i) { - if (MI->getOperand(i).isImplicit()) - continue; - if ((int)i != OpNum) O << ", "; - printOperand(MI, i, O); - } - O << "}"; -} - -void ARMAsmPrinter::printCPInstOperand(const MachineInstr *MI, int OpNum, - raw_ostream &O, const char *Modifier) { - assert(Modifier && "This operand only works with a modifier!"); - // There are two aspects to a CONSTANTPOOL_ENTRY operand, the label and the - // data itself. - if (!strcmp(Modifier, "label")) { - unsigned ID = MI->getOperand(OpNum).getImm(); - OutStreamer.EmitLabel(GetCPISymbol(ID)); - } else { - assert(!strcmp(Modifier, "cpentry") && "Unknown modifier for CPE"); - unsigned CPI = MI->getOperand(OpNum).getIndex(); - - const MachineConstantPoolEntry &MCPE = MCP->getConstants()[CPI]; - - if (MCPE.isMachineConstantPoolEntry()) { - EmitMachineConstantPoolValue(MCPE.Val.MachineCPVal); - } else { - EmitGlobalConstant(MCPE.Val.ConstVal); - } - } -} - -MCSymbol *ARMAsmPrinter:: -GetARMSetPICJumpTableLabel2(unsigned uid, unsigned uid2, - const MachineBasicBlock *MBB) const { - SmallString<60> Name; - raw_svector_ostream(Name) << MAI->getPrivateGlobalPrefix() - << getFunctionNumber() << '_' << uid << '_' << uid2 - << "_set_" << MBB->getNumber(); - return OutContext.GetOrCreateSymbol(Name.str()); -} - -MCSymbol *ARMAsmPrinter:: -GetARMJTIPICJumpTableLabel2(unsigned uid, unsigned uid2) const { - SmallString<60> Name; - raw_svector_ostream(Name) << MAI->getPrivateGlobalPrefix() << "JTI" - << getFunctionNumber() << '_' << uid << '_' << uid2; - return OutContext.GetOrCreateSymbol(Name.str()); -} - -void ARMAsmPrinter::printJTBlockOperand(const MachineInstr *MI, int OpNum, - raw_ostream &O) { - assert(!Subtarget->isThumb2() && "Thumb2 should use double-jump jumptables!"); - - const MachineOperand &MO1 = MI->getOperand(OpNum); - const MachineOperand &MO2 = MI->getOperand(OpNum+1); // Unique Id - - unsigned JTI = MO1.getIndex(); - MCSymbol *JTISymbol = GetARMJTIPICJumpTableLabel2(JTI, MO2.getImm()); - // Can't use EmitLabel until instprinter happens, label comes out in the wrong - // order. - O << *JTISymbol << ":\n"; - - const char *JTEntryDirective = MAI->getData32bitsDirective(); - - const MachineJumpTableInfo *MJTI = MF->getJumpTableInfo(); - const std::vector &JT = MJTI->getJumpTables(); - const std::vector &JTBBs = JT[JTI].MBBs; - bool UseSet= MAI->hasSetDirective() && TM.getRelocationModel() == Reloc::PIC_; - SmallPtrSet JTSets; - for (unsigned i = 0, e = JTBBs.size(); i != e; ++i) { - MachineBasicBlock *MBB = JTBBs[i]; - bool isNew = JTSets.insert(MBB); - - if (UseSet && isNew) { - O << "\t.set\t" - << *GetARMSetPICJumpTableLabel2(JTI, MO2.getImm(), MBB) << ',' - << *MBB->getSymbol() << '-' << *JTISymbol << '\n'; - } - - O << JTEntryDirective << ' '; - if (UseSet) - O << *GetARMSetPICJumpTableLabel2(JTI, MO2.getImm(), MBB); - else if (TM.getRelocationModel() == Reloc::PIC_) - O << *MBB->getSymbol() << '-' << *JTISymbol; - else - O << *MBB->getSymbol(); - - if (i != e-1) - O << '\n'; - } -} - -void ARMAsmPrinter::printJT2BlockOperand(const MachineInstr *MI, int OpNum, - raw_ostream &O) { - const MachineOperand &MO1 = MI->getOperand(OpNum); - const MachineOperand &MO2 = MI->getOperand(OpNum+1); // Unique Id - unsigned JTI = MO1.getIndex(); - - MCSymbol *JTISymbol = GetARMJTIPICJumpTableLabel2(JTI, MO2.getImm()); - - // Can't use EmitLabel until instprinter happens, label comes out in the wrong - // order. - O << *JTISymbol << ":\n"; - - const MachineJumpTableInfo *MJTI = MF->getJumpTableInfo(); - const std::vector &JT = MJTI->getJumpTables(); - const std::vector &JTBBs = JT[JTI].MBBs; - bool ByteOffset = false, HalfWordOffset = false; - if (MI->getOpcode() == ARM::t2TBB) - ByteOffset = true; - else if (MI->getOpcode() == ARM::t2TBH) - HalfWordOffset = true; - - for (unsigned i = 0, e = JTBBs.size(); i != e; ++i) { - MachineBasicBlock *MBB = JTBBs[i]; - if (ByteOffset) - O << MAI->getData8bitsDirective(); - else if (HalfWordOffset) - O << MAI->getData16bitsDirective(); - - if (ByteOffset || HalfWordOffset) - O << '(' << *MBB->getSymbol() << "-" << *JTISymbol << ")/2"; - else - O << "\tb.w " << *MBB->getSymbol(); - - if (i != e-1) - O << '\n'; - } -} - -void ARMAsmPrinter::printTBAddrMode(const MachineInstr *MI, int OpNum, - raw_ostream &O) { - O << "[pc, " << getRegisterName(MI->getOperand(OpNum).getReg()); - if (MI->getOpcode() == ARM::t2TBH) - O << ", lsl #1"; - O << ']'; -} - -void ARMAsmPrinter::printNoHashImmediate(const MachineInstr *MI, int OpNum, - raw_ostream &O) { - O << MI->getOperand(OpNum).getImm(); -} - -void ARMAsmPrinter::printVFPf32ImmOperand(const MachineInstr *MI, int OpNum, - raw_ostream &O) { - const ConstantFP *FP = MI->getOperand(OpNum).getFPImm(); - O << '#' << FP->getValueAPF().convertToFloat(); - if (isVerbose()) { - O << "\t\t" << MAI->getCommentString() << ' '; - WriteAsOperand(O, FP, /*PrintType=*/false); - } -} - -void ARMAsmPrinter::printVFPf64ImmOperand(const MachineInstr *MI, int OpNum, - raw_ostream &O) { - const ConstantFP *FP = MI->getOperand(OpNum).getFPImm(); - O << '#' << FP->getValueAPF().convertToDouble(); - if (isVerbose()) { - O << "\t\t" << MAI->getCommentString() << ' '; - WriteAsOperand(O, FP, /*PrintType=*/false); - } -} - -void ARMAsmPrinter::printNEONModImmOperand(const MachineInstr *MI, int OpNum, - raw_ostream &O) { - unsigned EncodedImm = MI->getOperand(OpNum).getImm(); - unsigned EltBits; - uint64_t Val = ARM_AM::decodeNEONModImm(EncodedImm, EltBits); - O << "#0x" << utohexstr(Val); -} - -bool ARMAsmPrinter::PrintAsmOperand(const MachineInstr *MI, unsigned OpNum, - unsigned AsmVariant, const char *ExtraCode, - raw_ostream &O) { - // Does this asm operand have a single letter operand modifier? - if (ExtraCode && ExtraCode[0]) { - if (ExtraCode[1] != 0) return true; // Unknown modifier. - - switch (ExtraCode[0]) { - default: return true; // Unknown modifier. - case 'a': // Print as a memory address. - if (MI->getOperand(OpNum).isReg()) { - O << "[" << getRegisterName(MI->getOperand(OpNum).getReg()) << "]"; - return false; - } - // Fallthrough - case 'c': // Don't print "#" before an immediate operand. - if (!MI->getOperand(OpNum).isImm()) - return true; - printNoHashImmediate(MI, OpNum, O); - return false; - case 'P': // Print a VFP double precision register. - case 'q': // Print a NEON quad precision register. - printOperand(MI, OpNum, O); - return false; - case 'Q': - case 'R': - case 'H': - report_fatal_error("llvm does not support 'Q', 'R', and 'H' modifiers!"); - return true; - } - } - - printOperand(MI, OpNum, O); - return false; -} - -bool ARMAsmPrinter::PrintAsmMemoryOperand(const MachineInstr *MI, - unsigned OpNum, unsigned AsmVariant, - const char *ExtraCode, - raw_ostream &O) { - if (ExtraCode && ExtraCode[0]) - return true; // Unknown modifier. - - const MachineOperand &MO = MI->getOperand(OpNum); - assert(MO.isReg() && "unexpected inline asm memory operand"); - O << "[" << getRegisterName(MO.getReg()) << "]"; - return false; -} - -void ARMAsmPrinter::EmitInstruction(const MachineInstr *MI) { - if (EnableMCInst) { - printInstructionThroughMCStreamer(MI); - return; - } - - if (MI->getOpcode() == ARM::CONSTPOOL_ENTRY) - EmitAlignment(2); - - SmallString<128> Str; - raw_svector_ostream OS(Str); - if (MI->getOpcode() == ARM::DBG_VALUE) { - unsigned NOps = MI->getNumOperands(); - assert(NOps==4); - OS << '\t' << MAI->getCommentString() << "DEBUG_VALUE: "; - // cast away const; DIetc do not take const operands for some reason. - DIVariable V(const_cast(MI->getOperand(NOps-1).getMetadata())); - OS << V.getName(); - OS << " <- "; - // Frame address. Currently handles register +- offset only. - assert(MI->getOperand(0).isReg() && MI->getOperand(1).isImm()); - OS << '['; printOperand(MI, 0, OS); OS << '+'; printOperand(MI, 1, OS); - OS << ']'; - OS << "+"; - printOperand(MI, NOps-2, OS); - OutStreamer.EmitRawText(OS.str()); - return; - } - - printInstruction(MI, OS); - OutStreamer.EmitRawText(OS.str()); - - // Make sure the instruction that follows TBB is 2-byte aligned. - // FIXME: Constant island pass should insert an "ALIGN" instruction instead. - if (MI->getOpcode() == ARM::t2TBB) - EmitAlignment(1); -} - -void ARMAsmPrinter::EmitStartOfAsmFile(Module &M) { - if (Subtarget->isTargetDarwin()) { - Reloc::Model RelocM = TM.getRelocationModel(); - if (RelocM == Reloc::PIC_ || RelocM == Reloc::DynamicNoPIC) { - // Declare all the text sections up front (before the DWARF sections - // emitted by AsmPrinter::doInitialization) so the assembler will keep - // them together at the beginning of the object file. This helps - // avoid out-of-range branches that are due a fundamental limitation of - // the way symbol offsets are encoded with the current Darwin ARM - // relocations. - const TargetLoweringObjectFileMachO &TLOFMacho = - static_cast( - getObjFileLowering()); - OutStreamer.SwitchSection(TLOFMacho.getTextSection()); - OutStreamer.SwitchSection(TLOFMacho.getTextCoalSection()); - OutStreamer.SwitchSection(TLOFMacho.getConstTextCoalSection()); - if (RelocM == Reloc::DynamicNoPIC) { - const MCSection *sect = - OutContext.getMachOSection("__TEXT", "__symbol_stub4", - MCSectionMachO::S_SYMBOL_STUBS, - 12, SectionKind::getText()); - OutStreamer.SwitchSection(sect); - } else { - const MCSection *sect = - OutContext.getMachOSection("__TEXT", "__picsymbolstub4", - MCSectionMachO::S_SYMBOL_STUBS, - 16, SectionKind::getText()); - OutStreamer.SwitchSection(sect); - } - } - } - - // Use unified assembler syntax. - OutStreamer.EmitRawText(StringRef("\t.syntax unified")); - - // Emit ARM Build Attributes - if (Subtarget->isTargetELF()) { - // CPU Type - std::string CPUString = Subtarget->getCPUString(); - if (CPUString != "generic") - OutStreamer.EmitRawText("\t.cpu " + Twine(CPUString)); - - // FIXME: Emit FPU type - if (Subtarget->hasVFP2()) - OutStreamer.EmitRawText("\t.eabi_attribute " + - Twine(ARMBuildAttrs::VFP_arch) + ", 2"); - - // Signal various FP modes. - if (!UnsafeFPMath) { - OutStreamer.EmitRawText("\t.eabi_attribute " + - Twine(ARMBuildAttrs::ABI_FP_denormal) + ", 1"); - OutStreamer.EmitRawText("\t.eabi_attribute " + - Twine(ARMBuildAttrs::ABI_FP_exceptions) + ", 1"); - } - - if (NoInfsFPMath && NoNaNsFPMath) - OutStreamer.EmitRawText("\t.eabi_attribute " + - Twine(ARMBuildAttrs::ABI_FP_number_model)+ ", 1"); - else - OutStreamer.EmitRawText("\t.eabi_attribute " + - Twine(ARMBuildAttrs::ABI_FP_number_model)+ ", 3"); - - // 8-bytes alignment stuff. - OutStreamer.EmitRawText("\t.eabi_attribute " + - Twine(ARMBuildAttrs::ABI_align8_needed) + ", 1"); - OutStreamer.EmitRawText("\t.eabi_attribute " + - Twine(ARMBuildAttrs::ABI_align8_preserved) + ", 1"); - - // Hard float. Use both S and D registers and conform to AAPCS-VFP. - if (Subtarget->isAAPCS_ABI() && FloatABIType == FloatABI::Hard) { - OutStreamer.EmitRawText("\t.eabi_attribute " + - Twine(ARMBuildAttrs::ABI_HardFP_use) + ", 3"); - OutStreamer.EmitRawText("\t.eabi_attribute " + - Twine(ARMBuildAttrs::ABI_VFP_args) + ", 1"); - } - // FIXME: Should we signal R9 usage? - } -} - - -void ARMAsmPrinter::EmitEndOfAsmFile(Module &M) { - if (Subtarget->isTargetDarwin()) { - // All darwin targets use mach-o. - const TargetLoweringObjectFileMachO &TLOFMacho = - static_cast(getObjFileLowering()); - MachineModuleInfoMachO &MMIMacho = - MMI->getObjFileInfo(); - - // Output non-lazy-pointers for external and common global variables. - MachineModuleInfoMachO::SymbolListTy Stubs = MMIMacho.GetGVStubList(); - - if (!Stubs.empty()) { - // Switch with ".non_lazy_symbol_pointer" directive. - OutStreamer.SwitchSection(TLOFMacho.getNonLazySymbolPointerSection()); - EmitAlignment(2); - for (unsigned i = 0, e = Stubs.size(); i != e; ++i) { - // L_foo$stub: - OutStreamer.EmitLabel(Stubs[i].first); - // .indirect_symbol _foo - MachineModuleInfoImpl::StubValueTy &MCSym = Stubs[i].second; - OutStreamer.EmitSymbolAttribute(MCSym.getPointer(),MCSA_IndirectSymbol); - - if (MCSym.getInt()) - // External to current translation unit. - OutStreamer.EmitIntValue(0, 4/*size*/, 0/*addrspace*/); - else - // Internal to current translation unit. - // - // When we place the LSDA into the TEXT section, the type info pointers - // need to be indirect and pc-rel. We accomplish this by using NLPs. - // However, sometimes the types are local to the file. So we need to - // fill in the value for the NLP in those cases. - OutStreamer.EmitValue(MCSymbolRefExpr::Create(MCSym.getPointer(), - OutContext), - 4/*size*/, 0/*addrspace*/); - } - - Stubs.clear(); - OutStreamer.AddBlankLine(); - } - - Stubs = MMIMacho.GetHiddenGVStubList(); - if (!Stubs.empty()) { - OutStreamer.SwitchSection(getObjFileLowering().getDataSection()); - EmitAlignment(2); - for (unsigned i = 0, e = Stubs.size(); i != e; ++i) { - // L_foo$stub: - OutStreamer.EmitLabel(Stubs[i].first); - // .long _foo - OutStreamer.EmitValue(MCSymbolRefExpr:: - Create(Stubs[i].second.getPointer(), - OutContext), - 4/*size*/, 0/*addrspace*/); - } - - Stubs.clear(); - OutStreamer.AddBlankLine(); - } - - // Funny Darwin hack: This flag tells the linker that no global symbols - // contain code that falls through to other global symbols (e.g. the obvious - // implementation of multiple entry points). If this doesn't occur, the - // linker can safely perform dead code stripping. Since LLVM never - // generates code that does this, it is always safe to set. - OutStreamer.EmitAssemblerFlag(MCAF_SubsectionsViaSymbols); - } -} - -//===----------------------------------------------------------------------===// - -void ARMAsmPrinter::printInstructionThroughMCStreamer(const MachineInstr *MI) { - ARMMCInstLower MCInstLowering(OutContext, *Mang, *this); - switch (MI->getOpcode()) { - case ARM::t2MOVi32imm: - assert(0 && "Should be lowered by thumb2it pass"); - default: break; - case ARM::PICADD: { // FIXME: Remove asm string from td file. - // This is a pseudo op for a label + instruction sequence, which looks like: - // LPC0: - // add r0, pc, r0 - // This adds the address of LPC0 to r0. - - // Emit the label. - // FIXME: MOVE TO SHARED PLACE. - unsigned Id = (unsigned)MI->getOperand(2).getImm(); - const char *Prefix = MAI->getPrivateGlobalPrefix(); - MCSymbol *Label =OutContext.GetOrCreateSymbol(Twine(Prefix) - + "PC" + Twine(getFunctionNumber()) + "_" + Twine(Id)); - OutStreamer.EmitLabel(Label); - - - // Form and emit tha dd. - MCInst AddInst; - AddInst.setOpcode(ARM::ADDrr); - AddInst.addOperand(MCOperand::CreateReg(MI->getOperand(0).getReg())); - AddInst.addOperand(MCOperand::CreateReg(ARM::PC)); - AddInst.addOperand(MCOperand::CreateReg(MI->getOperand(1).getReg())); - OutStreamer.EmitInstruction(AddInst); - return; - } - case ARM::CONSTPOOL_ENTRY: { // FIXME: Remove asm string from td file. - /// CONSTPOOL_ENTRY - This instruction represents a floating constant pool - /// in the function. The first operand is the ID# for this instruction, the - /// second is the index into the MachineConstantPool that this is, the third - /// is the size in bytes of this constant pool entry. - unsigned LabelId = (unsigned)MI->getOperand(0).getImm(); - unsigned CPIdx = (unsigned)MI->getOperand(1).getIndex(); - - EmitAlignment(2); - OutStreamer.EmitLabel(GetCPISymbol(LabelId)); - - const MachineConstantPoolEntry &MCPE = MCP->getConstants()[CPIdx]; - if (MCPE.isMachineConstantPoolEntry()) - EmitMachineConstantPoolValue(MCPE.Val.MachineCPVal); - else - EmitGlobalConstant(MCPE.Val.ConstVal); - - return; - } - case ARM::MOVi2pieces: { // FIXME: Remove asmstring from td file. - // This is a hack that lowers as a two instruction sequence. - unsigned DstReg = MI->getOperand(0).getReg(); - unsigned ImmVal = (unsigned)MI->getOperand(1).getImm(); - - unsigned SOImmValV1 = ARM_AM::getSOImmTwoPartFirst(ImmVal); - unsigned SOImmValV2 = ARM_AM::getSOImmTwoPartSecond(ImmVal); - - { - MCInst TmpInst; - TmpInst.setOpcode(ARM::MOVi); - TmpInst.addOperand(MCOperand::CreateReg(DstReg)); - TmpInst.addOperand(MCOperand::CreateImm(SOImmValV1)); - - // Predicate. - TmpInst.addOperand(MCOperand::CreateImm(MI->getOperand(2).getImm())); - TmpInst.addOperand(MCOperand::CreateReg(MI->getOperand(3).getReg())); - - TmpInst.addOperand(MCOperand::CreateReg(0)); // cc_out - OutStreamer.EmitInstruction(TmpInst); - } - - { - MCInst TmpInst; - TmpInst.setOpcode(ARM::ORRri); - TmpInst.addOperand(MCOperand::CreateReg(DstReg)); // dstreg - TmpInst.addOperand(MCOperand::CreateReg(DstReg)); // inreg - TmpInst.addOperand(MCOperand::CreateImm(SOImmValV2)); // so_imm - // Predicate. - TmpInst.addOperand(MCOperand::CreateImm(MI->getOperand(2).getImm())); - TmpInst.addOperand(MCOperand::CreateReg(MI->getOperand(3).getReg())); - - TmpInst.addOperand(MCOperand::CreateReg(0)); // cc_out - OutStreamer.EmitInstruction(TmpInst); - } - return; - } - case ARM::MOVi32imm: { // FIXME: Remove asmstring from td file. - // This is a hack that lowers as a two instruction sequence. - unsigned DstReg = MI->getOperand(0).getReg(); - const MachineOperand &MO = MI->getOperand(1); - MCOperand V1, V2; - if (MO.isImm()) { - unsigned ImmVal = (unsigned)MI->getOperand(1).getImm(); - V1 = MCOperand::CreateImm(ImmVal & 65535); - V2 = MCOperand::CreateImm(ImmVal >> 16); - } else if (MO.isGlobal()) { - MCSymbol *Symbol = MCInstLowering.GetGlobalAddressSymbol(MO); - const MCSymbolRefExpr *SymRef1 = - MCSymbolRefExpr::Create(Symbol, - MCSymbolRefExpr::VK_ARM_LO16, OutContext); - const MCSymbolRefExpr *SymRef2 = - MCSymbolRefExpr::Create(Symbol, - MCSymbolRefExpr::VK_ARM_HI16, OutContext); - V1 = MCOperand::CreateExpr(SymRef1); - V2 = MCOperand::CreateExpr(SymRef2); - } else { - MI->dump(); - llvm_unreachable("cannot handle this operand"); - } - - { - MCInst TmpInst; - TmpInst.setOpcode(ARM::MOVi16); - TmpInst.addOperand(MCOperand::CreateReg(DstReg)); // dstreg - TmpInst.addOperand(V1); // lower16(imm) - - // Predicate. - TmpInst.addOperand(MCOperand::CreateImm(MI->getOperand(2).getImm())); - TmpInst.addOperand(MCOperand::CreateReg(MI->getOperand(3).getReg())); - - OutStreamer.EmitInstruction(TmpInst); - } - - { - MCInst TmpInst; - TmpInst.setOpcode(ARM::MOVTi16); - TmpInst.addOperand(MCOperand::CreateReg(DstReg)); // dstreg - TmpInst.addOperand(MCOperand::CreateReg(DstReg)); // srcreg - TmpInst.addOperand(V2); // upper16(imm) - - // Predicate. - TmpInst.addOperand(MCOperand::CreateImm(MI->getOperand(2).getImm())); - TmpInst.addOperand(MCOperand::CreateReg(MI->getOperand(3).getReg())); - - OutStreamer.EmitInstruction(TmpInst); - } - - return; - } - } - - MCInst TmpInst; - MCInstLowering.Lower(MI, TmpInst); - OutStreamer.EmitInstruction(TmpInst); -} - -//===----------------------------------------------------------------------===// -// Target Registry Stuff -//===----------------------------------------------------------------------===// - -static MCInstPrinter *createARMMCInstPrinter(const Target &T, - unsigned SyntaxVariant, - const MCAsmInfo &MAI) { - if (SyntaxVariant == 0) - return new ARMInstPrinter(MAI, false); - return 0; -} - -// Force static initialization. -extern "C" void LLVMInitializeARMAsmPrinter() { - RegisterAsmPrinter X(TheARMTarget); - RegisterAsmPrinter Y(TheThumbTarget); - - TargetRegistry::RegisterMCInstPrinter(TheARMTarget, createARMMCInstPrinter); - TargetRegistry::RegisterMCInstPrinter(TheThumbTarget, createARMMCInstPrinter); -} - Removed: llvm/trunk/lib/Target/ARM/AsmPrinter/ARMMCInstLower.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/AsmPrinter/ARMMCInstLower.cpp?rev=108782&view=auto ============================================================================== --- llvm/trunk/lib/Target/ARM/AsmPrinter/ARMMCInstLower.cpp (original) +++ llvm/trunk/lib/Target/ARM/AsmPrinter/ARMMCInstLower.cpp (removed) @@ -1,162 +0,0 @@ -//===-- ARMMCInstLower.cpp - Convert ARM MachineInstr to an MCInst --------===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file contains code to lower ARM MachineInstrs to their corresponding -// MCInst records. -// -//===----------------------------------------------------------------------===// - -#include "ARMMCInstLower.h" -//#include "llvm/CodeGen/MachineModuleInfoImpls.h" -#include "llvm/CodeGen/AsmPrinter.h" -#include "llvm/CodeGen/MachineBasicBlock.h" -#include "llvm/MC/MCAsmInfo.h" -#include "llvm/MC/MCContext.h" -#include "llvm/MC/MCExpr.h" -#include "llvm/MC/MCInst.h" -//#include "llvm/MC/MCStreamer.h" -#include "llvm/Target/Mangler.h" -#include "llvm/Support/raw_ostream.h" -#include "llvm/ADT/SmallString.h" -using namespace llvm; - - -#if 0 -const ARMSubtarget &ARMMCInstLower::getSubtarget() const { - return AsmPrinter.getSubtarget(); -} - -MachineModuleInfoMachO &ARMMCInstLower::getMachOMMI() const { - assert(getSubtarget().isTargetDarwin() &&"Can only get MachO info on darwin"); - return AsmPrinter.MMI->getObjFileInfo(); -} -#endif - -MCSymbol *ARMMCInstLower:: -GetGlobalAddressSymbol(const MachineOperand &MO) const { - // FIXME: HANDLE PLT references how?? - switch (MO.getTargetFlags()) { - default: assert(0 && "Unknown target flag on GV operand"); - case 0: break; - } - - return Printer.Mang->getSymbol(MO.getGlobal()); -} - -MCSymbol *ARMMCInstLower:: -GetExternalSymbolSymbol(const MachineOperand &MO) const { - // FIXME: HANDLE PLT references how?? - switch (MO.getTargetFlags()) { - default: assert(0 && "Unknown target flag on GV operand"); - case 0: break; - } - - return Printer.GetExternalSymbolSymbol(MO.getSymbolName()); -} - - - -MCSymbol *ARMMCInstLower:: -GetJumpTableSymbol(const MachineOperand &MO) const { - SmallString<256> Name; - raw_svector_ostream(Name) << Printer.MAI->getPrivateGlobalPrefix() << "JTI" - << Printer.getFunctionNumber() << '_' << MO.getIndex(); - -#if 0 - switch (MO.getTargetFlags()) { - default: llvm_unreachable("Unknown target flag on GV operand"); - } -#endif - - // Create a symbol for the name. - return Ctx.GetOrCreateSymbol(Name.str()); -} - -MCSymbol *ARMMCInstLower:: -GetConstantPoolIndexSymbol(const MachineOperand &MO) const { - SmallString<256> Name; - raw_svector_ostream(Name) << Printer.MAI->getPrivateGlobalPrefix() << "CPI" - << Printer.getFunctionNumber() << '_' << MO.getIndex(); - -#if 0 - switch (MO.getTargetFlags()) { - default: llvm_unreachable("Unknown target flag on GV operand"); - } -#endif - - // Create a symbol for the name. - return Ctx.GetOrCreateSymbol(Name.str()); -} - -MCOperand ARMMCInstLower:: -LowerSymbolOperand(const MachineOperand &MO, MCSymbol *Sym) const { - // FIXME: We would like an efficient form for this, so we don't have to do a - // lot of extra uniquing. - const MCExpr *Expr = MCSymbolRefExpr::Create(Sym, Ctx); - -#if 0 - switch (MO.getTargetFlags()) { - default: llvm_unreachable("Unknown target flag on GV operand"); - } -#endif - - if (!MO.isJTI() && MO.getOffset()) - Expr = MCBinaryExpr::CreateAdd(Expr, - MCConstantExpr::Create(MO.getOffset(), Ctx), - Ctx); - return MCOperand::CreateExpr(Expr); -} - - -void ARMMCInstLower::Lower(const MachineInstr *MI, MCInst &OutMI) const { - OutMI.setOpcode(MI->getOpcode()); - - for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) { - const MachineOperand &MO = MI->getOperand(i); - - MCOperand MCOp; - switch (MO.getType()) { - default: - MI->dump(); - assert(0 && "unknown operand type"); - case MachineOperand::MO_Register: - // Ignore all implicit register operands. - if (MO.isImplicit()) continue; - assert(!MO.getSubReg() && "Subregs should be eliminated!"); - MCOp = MCOperand::CreateReg(MO.getReg()); - break; - case MachineOperand::MO_Immediate: - MCOp = MCOperand::CreateImm(MO.getImm()); - break; - case MachineOperand::MO_MachineBasicBlock: - MCOp = MCOperand::CreateExpr(MCSymbolRefExpr::Create( - MO.getMBB()->getSymbol(), Ctx)); - break; - case MachineOperand::MO_GlobalAddress: - MCOp = LowerSymbolOperand(MO, GetGlobalAddressSymbol(MO)); - break; - case MachineOperand::MO_ExternalSymbol: - MCOp = LowerSymbolOperand(MO, GetExternalSymbolSymbol(MO)); - break; - case MachineOperand::MO_JumpTableIndex: - MCOp = LowerSymbolOperand(MO, GetJumpTableSymbol(MO)); - break; - case MachineOperand::MO_ConstantPoolIndex: - MCOp = LowerSymbolOperand(MO, GetConstantPoolIndexSymbol(MO)); - break; - case MachineOperand::MO_BlockAddress: - MCOp = LowerSymbolOperand(MO, Printer.GetBlockAddressSymbol( - MO.getBlockAddress())); - break; - } - - OutMI.addOperand(MCOp); - } - -} Removed: llvm/trunk/lib/Target/ARM/AsmPrinter/ARMMCInstLower.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/AsmPrinter/ARMMCInstLower.h?rev=108782&view=auto ============================================================================== --- llvm/trunk/lib/Target/ARM/AsmPrinter/ARMMCInstLower.h (original) +++ llvm/trunk/lib/Target/ARM/AsmPrinter/ARMMCInstLower.h (removed) @@ -1,56 +0,0 @@ -//===-- ARMMCInstLower.h - Lower MachineInstr to MCInst -------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef ARM_MCINSTLOWER_H -#define ARM_MCINSTLOWER_H - -#include "llvm/Support/Compiler.h" - -namespace llvm { - class AsmPrinter; - class MCAsmInfo; - class MCContext; - class MCInst; - class MCOperand; - class MCSymbol; - class MachineInstr; - class MachineModuleInfoMachO; - class MachineOperand; - class Mangler; - //class ARMSubtarget; - -/// ARMMCInstLower - This class is used to lower an MachineInstr into an MCInst. -class LLVM_LIBRARY_VISIBILITY ARMMCInstLower { - MCContext &Ctx; - Mangler &Mang; - AsmPrinter &Printer; - - //const ARMSubtarget &getSubtarget() const; -public: - ARMMCInstLower(MCContext &ctx, Mangler &mang, AsmPrinter &printer) - : Ctx(ctx), Mang(mang), Printer(printer) {} - - void Lower(const MachineInstr *MI, MCInst &OutMI) const; - - //MCSymbol *GetPICBaseSymbol() const; - MCSymbol *GetGlobalAddressSymbol(const MachineOperand &MO) const; - MCSymbol *GetExternalSymbolSymbol(const MachineOperand &MO) const; - MCSymbol *GetJumpTableSymbol(const MachineOperand &MO) const; - MCSymbol *GetConstantPoolIndexSymbol(const MachineOperand &MO) const; - MCOperand LowerSymbolOperand(const MachineOperand &MO, MCSymbol *Sym) const; - -/* -private: - MachineModuleInfoMachO &getMachOMMI() const; - */ -}; - -} - -#endif From stuart at apple.com Mon Jul 19 18:56:30 2010 From: stuart at apple.com (Stuart Hastings) Date: Mon, 19 Jul 2010 23:56:30 -0000 Subject: [llvm-commits] [llvm] r108784 - in /llvm/trunk: include/llvm/Analysis/DebugInfo.h lib/Analysis/DebugInfo.cpp lib/CodeGen/AsmPrinter/DwarfDebug.cpp Message-ID: <20100719235630.9158F2A6C12C@llvm.org> Author: stuart Date: Mon Jul 19 18:56:30 2010 New Revision: 108784 URL: http://llvm.org/viewvc/llvm-project?rev=108784&view=rev Log: Correct line info for declarations/definitions. Radar 8063111. Modified: llvm/trunk/include/llvm/Analysis/DebugInfo.h llvm/trunk/lib/Analysis/DebugInfo.cpp llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Modified: llvm/trunk/include/llvm/Analysis/DebugInfo.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/DebugInfo.h?rev=108784&r1=108783&r2=108784&view=diff ============================================================================== --- llvm/trunk/include/llvm/Analysis/DebugInfo.h (original) +++ llvm/trunk/include/llvm/Analysis/DebugInfo.h Mon Jul 19 18:56:30 2010 @@ -134,7 +134,7 @@ public: explicit DICompileUnit(const MDNode *N = 0) : DIScope(N) {} - unsigned getLanguage() const { return getUnsignedField(2); } + unsigned getLanguage() const { return getUnsignedField(2); } StringRef getFilename() const { return getStringField(3); } StringRef getDirectory() const { return getStringField(4); } StringRef getProducer() const { return getStringField(5); } @@ -504,10 +504,18 @@ public: explicit DILexicalBlock(const MDNode *N = 0) : DIScope(N) {} DIScope getContext() const { return getFieldAs(1); } - StringRef getDirectory() const { return getContext().getDirectory(); } - StringRef getFilename() const { return getContext().getFilename(); } unsigned getLineNumber() const { return getUnsignedField(2); } unsigned getColumnNumber() const { return getUnsignedField(3); } + StringRef getDirectory() const { + DIFile F = getFieldAs(4); + StringRef dir = F.getDirectory(); + return !dir.empty() ? dir : getContext().getDirectory(); + } + StringRef getFilename() const { + DIFile F = getFieldAs(4); + StringRef filename = F.getFilename(); + return !filename.empty() ? filename : getContext().getFilename(); + } }; /// DINameSpace - A wrapper for a C++ style name space. @@ -694,8 +702,8 @@ /// CreateLexicalBlock - This creates a descriptor for a lexical block /// with the specified parent context. - DILexicalBlock CreateLexicalBlock(DIDescriptor Context, unsigned Line = 0, - unsigned Col = 0); + DILexicalBlock CreateLexicalBlock(DIDescriptor Context, DIFile F, + unsigned Line = 0, unsigned Col = 0); /// CreateNameSpace - This creates new descriptor for a namespace /// with the specified parent context. Modified: llvm/trunk/lib/Analysis/DebugInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/DebugInfo.cpp?rev=108784&r1=108783&r2=108784&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/DebugInfo.cpp (original) +++ llvm/trunk/lib/Analysis/DebugInfo.cpp Mon Jul 19 18:56:30 2010 @@ -1107,14 +1107,19 @@ /// CreateBlock - This creates a descriptor for a lexical block with the /// specified parent VMContext. DILexicalBlock DIFactory::CreateLexicalBlock(DIDescriptor Context, - unsigned LineNo, unsigned Col) { + DIFile F, unsigned LineNo, + unsigned Col) { + // Defeat MDNode uniqing for lexical blocks. + static unsigned int unique_id = 0; Value *Elts[] = { GetTagConstant(dwarf::DW_TAG_lexical_block), Context, ConstantInt::get(Type::getInt32Ty(VMContext), LineNo), - ConstantInt::get(Type::getInt32Ty(VMContext), Col) + ConstantInt::get(Type::getInt32Ty(VMContext), Col), + F, + ConstantInt::get(Type::getInt32Ty(VMContext), unique_id++) }; - return DILexicalBlock(MDNode::get(VMContext, &Elts[0], 4)); + return DILexicalBlock(MDNode::get(VMContext, &Elts[0], 6)); } /// CreateNameSpace - This creates new descriptor for a namespace Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=108784&r1=108783&r2=108784&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original) +++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Mon Jul 19 18:56:30 2010 @@ -2683,18 +2683,21 @@ if (FDL.isUnknown()) return; const MDNode *Scope = FDL.getScope(MF->getFunction()->getContext()); + const MDNode *TheScope = 0; DISubprogram SP = getDISubprogram(Scope); unsigned Line, Col; if (SP.Verify()) { Line = SP.getLineNumber(); Col = 0; + TheScope = SP; } else { Line = FDL.getLine(); Col = FDL.getCol(); + TheScope = Scope; } - recordSourceLine(Line, Col, Scope); + recordSourceLine(Line, Col, TheScope); /// ProcessedArgs - Collection of arguments already processed. SmallPtrSet ProcessedArgs; @@ -2900,16 +2903,6 @@ Src = GetOrCreateSourceID(Dir, Fn); } -#if 0 - if (!Lines.empty()) { - SrcLineInfo lastSrcLineInfo = Lines.back(); - // Emitting sequential line records with the same line number (but - // different addresses) seems to confuse GDB. Avoid this. - if (lastSrcLineInfo.getLine() == Line) - return NULL; - } -#endif - MCSymbol *Label = MMI->getContext().CreateTempSymbol(); Lines.push_back(SrcLineInfo(Line, Col, Src, Label)); From stuart at apple.com Mon Jul 19 18:56:39 2010 From: stuart at apple.com (Stuart Hastings) Date: Mon, 19 Jul 2010 23:56:39 -0000 Subject: [llvm-commits] [llvm-gcc-4.2] r108786 - in /llvm-gcc-4.2/trunk/gcc: cp/pt.c llvm-convert.cpp llvm-debug.cpp Message-ID: <20100719235639.57C042A6C12C@llvm.org> Author: stuart Date: Mon Jul 19 18:56:39 2010 New Revision: 108786 URL: http://llvm.org/viewvc/llvm-project?rev=108786&view=rev Log: Correct line info for declarations/definitions. Radar 8063111. Modified: llvm-gcc-4.2/trunk/gcc/cp/pt.c llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp Modified: llvm-gcc-4.2/trunk/gcc/cp/pt.c URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/cp/pt.c?rev=108786&r1=108785&r2=108786&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/cp/pt.c (original) +++ llvm-gcc-4.2/trunk/gcc/cp/pt.c Mon Jul 19 18:56:39 2010 @@ -6696,8 +6696,6 @@ template, and in any case are considered separate under the discrete model. */ r = copy_decl (t); - /* LLVM LOCAL 7514620 */ - DECL_SOURCE_LOCATION(r) = saved_loc; DECL_USE_TEMPLATE (r) = 0; TREE_TYPE (r) = type; /* Clear out the mangled name and RTL for the instantiation. */ Modified: llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp?rev=108786&r1=108785&r2=108786&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp (original) +++ llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp Mon Jul 19 18:56:39 2010 @@ -976,19 +976,20 @@ Value *Result = 0; + bool emitdebuginfo = EmitDebugInfo(); + + if (emitdebuginfo && EXPR_HAS_LOCATION(exp)) { + // Set new location on the way up the tree. + TheDebugInfo->setLocationFile(EXPR_FILENAME(exp)); + TheDebugInfo->setLocationLine(EXPR_LINENO(exp)); + } + // If we've just changed lexical blocks, emit any local variables // declared in the new block. TreeToLLVM::switchLexicalBlock(exp); - if (EmitDebugInfo()) { - if (EXPR_HAS_LOCATION(exp)) { - // Set new location on the way up the tree. - TheDebugInfo->setLocationFile(EXPR_FILENAME(exp)); - TheDebugInfo->setLocationLine(EXPR_LINENO(exp)); - } - + if (emitdebuginfo) TheDebugInfo->EmitStopPoint(Fn, Builder.GetInsertBlock(), Builder); - } switch (TREE_CODE(exp)) { default: Modified: llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp?rev=108786&r1=108785&r2=108786&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp (original) +++ llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp Mon Jul 19 18:56:39 2010 @@ -288,13 +288,7 @@ RegionStack.pop_back(); } DebugInfo::push_regions(desired, grand); - // There's no point in declaring an empty (declares no variables) - // lexical BLOCK as the current lexical BLOCK. Locate nearest - // non-empty ancestor BLOCK and declare that. - for (t = desired; TREE_CODE(t) == BLOCK; t = BLOCK_SUPERCONTEXT(t)) - if (BLOCK_VARS(t)) - break; - setCurrentLexicalBlock(t); + setCurrentLexicalBlock(desired); } /// CreateSubprogramFromFnDecl - Constructs the debug code for @@ -475,11 +469,41 @@ return false; } -/// findRegion - Find tree_node N's region. -DIDescriptor DebugInfo::findRegion(tree Node) { - if (Node == NULL_TREE) +/// findRegion - Find the region (context) of a GCC tree. +DIDescriptor DebugInfo::findRegion(tree exp) { + if (exp == NULL_TREE) return getOrCreateFile(main_input_filename); + tree Node = exp; + location_t *p_locus = 0; + tree_code code = TREE_CODE(exp); + enum tree_code_class tree_cc = TREE_CODE_CLASS(code); + switch (tree_cc) { + case tcc_declaration: /* A decl node */ + p_locus = &DECL_SOURCE_LOCATION(exp); + break; + + case tcc_expression: /* an expression */ + case tcc_comparison: /* a comparison expression */ + case tcc_unary: /* a unary arithmetic expression */ + case tcc_binary: /* a binary arithmetic expression */ + Node = TREE_BLOCK(exp); + p_locus = EXPR_LOCUS(exp); + break; + + case tcc_exceptional: + switch (code) { + case BLOCK: + p_locus = &BLOCK_SOURCE_LOCATION(Node); + break; + default: + gcc_unreachable (); + } + break; + default: + break; + } + std::map::iterator I = RegionMap.find(Node); if (I != RegionMap.end()) if (MDNode *R = dyn_cast_or_null(I->second)) @@ -504,56 +528,23 @@ } } } else if (TREE_CODE(Node) == BLOCK) { - // TREE_BLOCK is GCC's lexical block. - tree scopeToDeclare, step; - -#if 0 - // GDB Kludge - // This code section is devoted to eliminating as many lexical - // blocks as possible, in order to mimic GCC debug output. In a - // perfect world, the debugger would not be adversely affected by - // a few extra lexical scopes. Ideally this stuff could be - // drastically simplified when LLDB replaces GDB. - if (nonemptySibling(Node)) { - // If any sibling BLOCK declares anything, use this scope. - scopeToDeclare = Node; + // Recursively establish ancestor scopes. + DIDescriptor context = findRegion(BLOCK_SUPERCONTEXT(Node)); + // If we don't have a location, use the last-seen info. + unsigned int line; + const char *fullpath; + if (LOCATION_FILE(*p_locus) == (char*)0) { + fullpath = CurFullPath; + line = CurLineNo; } else { - tree upper = supercontextWithDecls(Node); - if (TREE_CODE(upper) == FUNCTION_DECL) { - scopeToDeclare = upper; - } else if (TREE_CODE(upper) == BLOCK && BLOCK_VARS(upper) && BLOCK_VARS(Node) && - upper != Node) { - // We can't use upper because it declares something. Find the - // uppermost empty BLOCK /between/ Node and upper. - for (step = BLOCK_SUPERCONTEXT(Node); - TREE_CODE(step) == BLOCK && !BLOCK_VARS(step) && - BLOCK_SUPERCONTEXT(step); - step = BLOCK_SUPERCONTEXT(step)) - ; - scopeToDeclare = step; - } else - // Either or both of upper and Node are empty (declare - // nothing); fuse Node's scope with upper. - scopeToDeclare = upper; - } -#else - scopeToDeclare = Node; -#endif - - switch (TREE_CODE(scopeToDeclare)) { - default: - assert("non-BLOCK, non-FUNCTION_DECL scope!"); - case FUNCTION_DECL: - return CreateSubprogramFromFnDecl(scopeToDeclare); - case BLOCK: - // Recursively establish ancestor scopes. - DIDescriptor context = findRegion(BLOCK_SUPERCONTEXT(scopeToDeclare)); - DILexicalBlock lexical_block = - DebugFactory.CreateLexicalBlock(context, CurLineNo); - RegionMap[scopeToDeclare] = WeakVH(lexical_block); - return DIDescriptor(lexical_block); + fullpath = LOCATION_FILE(*p_locus); + line = LOCATION_LINE(*p_locus); } - // GDB Kludge end + DIFile F(getOrCreateFile(fullpath)); + DILexicalBlock lexical_block = + DebugFactory.CreateLexicalBlock(context, F, line, 0U); + RegionMap[Node] = WeakVH(lexical_block); + return DIDescriptor(lexical_block); } // Otherwise main compile unit covers everything. From daniel at zuster.org Mon Jul 19 19:08:13 2010 From: daniel at zuster.org (Daniel Dunbar) Date: Tue, 20 Jul 2010 00:08:13 -0000 Subject: [llvm-commits] [llvm] r108787 - in /llvm/trunk/lib/Target: ARM/AsmPrinter/CMakeLists.txt ARM/CMakeLists.txt X86/AsmPrinter/CMakeLists.txt X86/CMakeLists.txt Message-ID: <20100720000813.5E6AD2A6C12C@llvm.org> Author: ddunbar Date: Mon Jul 19 19:08:13 2010 New Revision: 108787 URL: http://llvm.org/viewvc/llvm-project?rev=108787&view=rev Log: Update CMake files. Modified: llvm/trunk/lib/Target/ARM/AsmPrinter/CMakeLists.txt llvm/trunk/lib/Target/ARM/CMakeLists.txt llvm/trunk/lib/Target/X86/AsmPrinter/CMakeLists.txt llvm/trunk/lib/Target/X86/CMakeLists.txt Modified: llvm/trunk/lib/Target/ARM/AsmPrinter/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/AsmPrinter/CMakeLists.txt?rev=108787&r1=108786&r2=108787&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/AsmPrinter/CMakeLists.txt (original) +++ llvm/trunk/lib/Target/ARM/AsmPrinter/CMakeLists.txt Mon Jul 19 19:08:13 2010 @@ -1,8 +1,6 @@ include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/.. ) add_llvm_library(LLVMARMAsmPrinter - ARMAsmPrinter.cpp ARMInstPrinter.cpp - ARMMCInstLower.cpp ) add_dependencies(LLVMARMAsmPrinter ARMCodeGenTable_gen) Modified: llvm/trunk/lib/Target/ARM/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/CMakeLists.txt?rev=108787&r1=108786&r2=108787&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/CMakeLists.txt (original) +++ llvm/trunk/lib/Target/ARM/CMakeLists.txt Mon Jul 19 19:08:13 2010 @@ -13,6 +13,7 @@ tablegen(ARMGenEDInfo.inc -gen-enhanced-disassembly-info) add_llvm_target(ARMCodeGen + ARMAsmPrinter.cpp ARMBaseInstrInfo.cpp ARMBaseRegisterInfo.cpp ARMCodeEmitter.cpp @@ -25,7 +26,9 @@ ARMJITInfo.cpp ARMLoadStoreOptimizer.cpp ARMMCAsmInfo.cpp + ARMMCInstLower.cpp ARMRegisterInfo.cpp + ARMSelectionDAGInfo.cpp ARMSubtarget.cpp ARMTargetMachine.cpp ARMTargetObjectFile.cpp @@ -38,7 +41,6 @@ Thumb2InstrInfo.cpp Thumb2RegisterInfo.cpp Thumb2SizeReduction.cpp - ARMSelectionDAGInfo.cpp ) target_link_libraries (LLVMARMCodeGen LLVMSelectionDAG) Modified: llvm/trunk/lib/Target/X86/AsmPrinter/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/AsmPrinter/CMakeLists.txt?rev=108787&r1=108786&r2=108787&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/AsmPrinter/CMakeLists.txt (original) +++ llvm/trunk/lib/Target/X86/AsmPrinter/CMakeLists.txt Mon Jul 19 19:08:13 2010 @@ -2,8 +2,6 @@ add_llvm_library(LLVMX86AsmPrinter X86ATTInstPrinter.cpp - X86AsmPrinter.cpp X86IntelInstPrinter.cpp - X86MCInstLower.cpp ) add_dependencies(LLVMX86AsmPrinter X86CodeGenTable_gen) Modified: llvm/trunk/lib/Target/X86/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/CMakeLists.txt?rev=108787&r1=108786&r2=108787&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/CMakeLists.txt (original) +++ llvm/trunk/lib/Target/X86/CMakeLists.txt Mon Jul 19 19:08:13 2010 @@ -18,9 +18,11 @@ set(sources SSEDomainFix.cpp X86AsmBackend.cpp - X86CodeEmitter.cpp + X86AsmPrinter.cpp X86COFFMachineModuleInfo.cpp + X86CodeEmitter.cpp X86ELFWriterInfo.cpp + X86FastISel.cpp X86FloatingPoint.cpp X86ISelDAGToDAG.cpp X86ISelLowering.cpp @@ -28,12 +30,12 @@ X86JITInfo.cpp X86MCAsmInfo.cpp X86MCCodeEmitter.cpp + X86MCInstLower.cpp X86RegisterInfo.cpp + X86SelectionDAGInfo.cpp X86Subtarget.cpp X86TargetMachine.cpp X86TargetObjectFile.cpp - X86FastISel.cpp - X86SelectionDAGInfo.cpp ) if( CMAKE_CL_64 ) From bruno.cardoso at gmail.com Mon Jul 19 19:11:13 2010 From: bruno.cardoso at gmail.com (Bruno Cardoso Lopes) Date: Tue, 20 Jul 2010 00:11:13 -0000 Subject: [llvm-commits] [llvm] r108788 - in /llvm/trunk: lib/Target/X86/X86InstrFormats.td lib/Target/X86/X86InstrSSE.td test/MC/AsmParser/X86/x86_64-encoding.s Message-ID: <20100720001113.63CCD2A6C12C@llvm.org> Author: bruno Date: Mon Jul 19 19:11:13 2010 New Revision: 108788 URL: http://llvm.org/viewvc/llvm-project?rev=108788&view=rev Log: Add AVX vbroadcast new instruction Modified: llvm/trunk/lib/Target/X86/X86InstrFormats.td llvm/trunk/lib/Target/X86/X86InstrSSE.td llvm/trunk/test/MC/AsmParser/X86/x86_64-encoding.s Modified: llvm/trunk/lib/Target/X86/X86InstrFormats.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrFormats.td?rev=108788&r1=108787&r2=108788&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86InstrFormats.td (original) +++ llvm/trunk/lib/Target/X86/X86InstrFormats.td Mon Jul 19 19:11:13 2010 @@ -411,6 +411,15 @@ : Ii8, TA, Requires<[HasSSE42]>; +// AVX Instruction Templates: +// Instructions introduced in AVX (no SSE equivalent forms) +// +// AVX8I - AVX instructions with T8 and OpSize prefix. +class AVX8I o, Format F, dag outs, dag ins, string asm, + list pattern> + : I, T8, OpSize, + Requires<[HasAVX]>; + // AES Instruction Templates: // // AES8I Modified: llvm/trunk/lib/Target/X86/X86InstrSSE.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrSSE.td?rev=108788&r1=108787&r2=108788&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86InstrSSE.td (original) +++ llvm/trunk/lib/Target/X86/X86InstrSSE.td Mon Jul 19 19:11:13 2010 @@ -4980,3 +4980,22 @@ (int_x86_aesni_aeskeygenassist (bitconvert (memopv2i64 addr:$src1)), imm:$src2))]>, OpSize; + +//===----------------------------------------------------------------------===// +// AVX Instructions +//===----------------------------------------------------------------------===// + +let isAsmParserOnly = 1 in { + +// Load from memory and broadcast to all elements of the destination operand +class avx_broadcast opc, string OpcodeStr, RegisterClass RC, + X86MemOperand x86memop> : + AVX8I, VEX; + +def VBROADCASTSS : avx_broadcast<0x18, "vbroadcastss", VR128, f32mem>; +def VBROADCASTSSY : avx_broadcast<0x18, "vbroadcastss", VR256, f32mem>; +def VBROADCASTSD : avx_broadcast<0x19, "vbroadcastsd", VR256, f64mem>; +def VBROADCASTF128 : avx_broadcast<0x1A, "vbroadcastf128", VR256, f128mem>; + +} // isAsmParserOnly Modified: llvm/trunk/test/MC/AsmParser/X86/x86_64-encoding.s URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AsmParser/X86/x86_64-encoding.s?rev=108788&r1=108787&r2=108788&view=diff ============================================================================== --- llvm/trunk/test/MC/AsmParser/X86/x86_64-encoding.s (original) +++ llvm/trunk/test/MC/AsmParser/X86/x86_64-encoding.s Mon Jul 19 19:11:13 2010 @@ -3072,3 +3072,19 @@ // CHECK: encoding: [0xc4,0x63,0x2d,0x40,0x18,0x03] vdpps $3, (%rax), %ymm10, %ymm11 +// CHECK: vbroadcastf128 (%rax), %ymm12 +// CHECK: encoding: [0xc4,0x62,0x7d,0x1a,0x20] + vbroadcastf128 (%rax), %ymm12 + +// CHECK: vbroadcastsd (%rax), %ymm12 +// CHECK: encoding: [0xc4,0x62,0x7d,0x19,0x20] + vbroadcastsd (%rax), %ymm12 + +// CHECK: vbroadcastss (%rax), %xmm12 +// CHECK: encoding: [0xc4,0x62,0x79,0x18,0x20] + vbroadcastss (%rax), %xmm12 + +// CHECK: vbroadcastss (%rax), %ymm12 +// CHECK: encoding: [0xc4,0x62,0x7d,0x18,0x20] + vbroadcastss (%rax), %ymm12 + From bruno.cardoso at gmail.com Mon Jul 19 19:11:50 2010 From: bruno.cardoso at gmail.com (Bruno Cardoso Lopes) Date: Tue, 20 Jul 2010 00:11:50 -0000 Subject: [llvm-commits] [llvm] r108789 - /llvm/trunk/test/MC/AsmParser/X86/x86_32-encoding.s Message-ID: <20100720001150.7A3D02A6C12C@llvm.org> Author: bruno Date: Mon Jul 19 19:11:50 2010 New Revision: 108789 URL: http://llvm.org/viewvc/llvm-project?rev=108789&view=rev Log: x86_32 tests for vbroadcast Modified: llvm/trunk/test/MC/AsmParser/X86/x86_32-encoding.s Modified: llvm/trunk/test/MC/AsmParser/X86/x86_32-encoding.s URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AsmParser/X86/x86_32-encoding.s?rev=108789&r1=108788&r2=108789&view=diff ============================================================================== --- llvm/trunk/test/MC/AsmParser/X86/x86_32-encoding.s (original) +++ llvm/trunk/test/MC/AsmParser/X86/x86_32-encoding.s Mon Jul 19 19:11:50 2010 @@ -12998,3 +12998,19 @@ // CHECK: encoding: [0xc4,0xe3,0x55,0x40,0x08,0x03] vdpps $3, (%eax), %ymm5, %ymm1 +// CHECK: vbroadcastf128 (%eax), %ymm2 +// CHECK: encoding: [0xc4,0xe2,0x7d,0x1a,0x10] + vbroadcastf128 (%eax), %ymm2 + +// CHECK: vbroadcastsd (%eax), %ymm2 +// CHECK: encoding: [0xc4,0xe2,0x7d,0x19,0x10] + vbroadcastsd (%eax), %ymm2 + +// CHECK: vbroadcastss (%eax), %xmm2 +// CHECK: encoding: [0xc4,0xe2,0x79,0x18,0x10] + vbroadcastss (%eax), %xmm2 + +// CHECK: vbroadcastss (%eax), %ymm2 +// CHECK: encoding: [0xc4,0xe2,0x7d,0x18,0x10] + vbroadcastss (%eax), %ymm2 + From dalej at apple.com Mon Jul 19 19:50:13 2010 From: dalej at apple.com (Dale Johannesen) Date: Tue, 20 Jul 2010 00:50:13 -0000 Subject: [llvm-commits] [llvm] r108792 - /llvm/trunk/lib/CodeGen/MachineLICM.cpp Message-ID: <20100720005013.3E7A92A6C12C@llvm.org> Author: johannes Date: Mon Jul 19 19:50:13 2010 New Revision: 108792 URL: http://llvm.org/viewvc/llvm-project?rev=108792&view=rev Log: Don't hoist things out of a large switch inside a loop, for the reasons in the comments. This is a major win on 253.perlbmk on ARM Darwin. I expect it to be a good heuristic in general, but it's possible some things will regress; I'll be watching. 7940152. Modified: llvm/trunk/lib/CodeGen/MachineLICM.cpp Modified: llvm/trunk/lib/CodeGen/MachineLICM.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineLICM.cpp?rev=108792&r1=108791&r2=108792&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/MachineLICM.cpp (original) +++ llvm/trunk/lib/CodeGen/MachineLICM.cpp Mon Jul 19 19:50:13 2010 @@ -489,8 +489,12 @@ } const std::vector &Children = N->getChildren(); - for (unsigned I = 0, E = Children.size(); I != E; ++I) - HoistRegion(Children[I]); + // Don't hoist things out of a large switch statement. This often causes + // code to be hoisted that wasn't going to be executed, and increases + // register pressure in a situation where it's likely to matter. + if (Children.size() < 10) + for (unsigned I = 0, E = Children.size(); I != E; ++I) + HoistRegion(Children[I]); } /// IsLICMCandidate - Returns true if the instruction may be a suitable From gohman at apple.com Mon Jul 19 19:57:18 2010 From: gohman at apple.com (Dan Gohman) Date: Tue, 20 Jul 2010 00:57:18 -0000 Subject: [llvm-commits] [llvm] r108793 - /llvm/trunk/lib/Analysis/ScalarEvolutionNormalization.cpp Message-ID: <20100720005718.948ED2A6C12C@llvm.org> Author: djg Date: Mon Jul 19 19:57:18 2010 New Revision: 108793 URL: http://llvm.org/viewvc/llvm-project?rev=108793&view=rev Log: Minor code simplification. Modified: llvm/trunk/lib/Analysis/ScalarEvolutionNormalization.cpp Modified: llvm/trunk/lib/Analysis/ScalarEvolutionNormalization.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ScalarEvolutionNormalization.cpp?rev=108793&r1=108792&r2=108793&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/ScalarEvolutionNormalization.cpp (original) +++ llvm/trunk/lib/Analysis/ScalarEvolutionNormalization.cpp Mon Jul 19 19:57:18 2010 @@ -50,13 +50,10 @@ // Look at all of the uses of IV by the PHI node. If any use corresponds to // a block that is not dominated by the latch block, give up and use the // preincremented value. - unsigned NumUses = 0; for (unsigned i = 0, e = PN->getNumIncomingValues(); i != e; ++i) - if (PN->getIncomingValue(i) == IV) { - ++NumUses; - if (!DT->dominates(LatchBlock, PN->getIncomingBlock(i))) - return false; - } + if (PN->getIncomingValue(i) == IV && + !DT->dominates(LatchBlock, PN->getIncomingBlock(i))) + return false; // Okay, all uses of IV by PN are in predecessor blocks that really are // dominated by the latch block. Use the post-incremented value. From resistor at mac.com Mon Jul 19 20:19:59 2010 From: resistor at mac.com (Owen Anderson) Date: Tue, 20 Jul 2010 01:19:59 -0000 Subject: [llvm-commits] [llvm] r108794 - in /llvm/trunk: include/llvm/ include/llvm/Support/ lib/Analysis/ lib/Analysis/IPA/ lib/VMCore/ tools/bugpoint/ Message-ID: <20100720011959.69EE02A6C12C@llvm.org> Author: resistor Date: Mon Jul 19 20:19:58 2010 New Revision: 108794 URL: http://llvm.org/viewvc/llvm-project?rev=108794&view=rev Log: Separate PassInfo into two classes: a constructor-free superclass (StaticPassInfo) and a constructor-ful subclass (PassInfo). Modified: llvm/trunk/include/llvm/Pass.h llvm/trunk/include/llvm/PassAnalysisSupport.h llvm/trunk/include/llvm/PassManagers.h llvm/trunk/include/llvm/PassSupport.h llvm/trunk/include/llvm/Support/PassNameParser.h llvm/trunk/lib/Analysis/AliasAnalysisCounter.cpp llvm/trunk/lib/Analysis/AliasDebugger.cpp llvm/trunk/lib/Analysis/BasicAliasAnalysis.cpp llvm/trunk/lib/Analysis/IPA/CallGraph.cpp llvm/trunk/lib/Analysis/IPA/GlobalsModRef.cpp llvm/trunk/lib/Analysis/ProfileEstimatorPass.cpp llvm/trunk/lib/Analysis/ProfileInfoLoaderPass.cpp llvm/trunk/lib/Analysis/ScalarEvolutionAliasAnalysis.cpp llvm/trunk/lib/VMCore/Pass.cpp llvm/trunk/lib/VMCore/PassManager.cpp llvm/trunk/tools/bugpoint/BugDriver.cpp llvm/trunk/tools/bugpoint/BugDriver.h llvm/trunk/tools/bugpoint/CrashDebugger.cpp llvm/trunk/tools/bugpoint/ExtractFunction.cpp llvm/trunk/tools/bugpoint/FindBugs.cpp llvm/trunk/tools/bugpoint/Miscompilation.cpp llvm/trunk/tools/bugpoint/OptimizerDriver.cpp llvm/trunk/tools/bugpoint/bugpoint.cpp Modified: llvm/trunk/include/llvm/Pass.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Pass.h?rev=108794&r1=108793&r2=108794&view=diff ============================================================================== --- llvm/trunk/include/llvm/Pass.h (original) +++ llvm/trunk/include/llvm/Pass.h Mon Jul 19 20:19:58 2010 @@ -41,6 +41,7 @@ class Function; class Module; class AnalysisUsage; +class StaticPassInfo; class PassInfo; class ImmutablePass; class PMStack; @@ -50,7 +51,7 @@ class StringRef; // AnalysisID - Use the PassInfo to identify a pass... -typedef const PassInfo* AnalysisID; +typedef const StaticPassInfo* AnalysisID; /// Different types of internal pass managers. External pass managers /// (PassManager and FunctionPassManager) are not represented here. @@ -104,7 +105,7 @@ /// getPassInfo - Return the PassInfo data structure that corresponds to this /// pass... If the pass has not been registered, this will return null. /// - const PassInfo *getPassInfo() const; + const StaticPassInfo *getPassInfo() const; /// print - Print out the internal state of the pass. This is called by /// Analyze to print out the contents of an analysis. Otherwise it is not @@ -159,7 +160,7 @@ /// 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 *); + virtual void *getAdjustedAnalysisPointer(const StaticPassInfo *); virtual ImmutablePass *getAsImmutablePass(); virtual PMDataManager *getAsPMDataManager(); @@ -171,17 +172,17 @@ virtual void dumpPassStructure(unsigned Offset = 0); template - static const PassInfo *getClassPassInfo() { + static const StaticPassInfo *getClassPassInfo() { return lookupPassInfo(intptr_t(&AnalysisClass::ID)); } // lookupPassInfo - Return the pass info object for the specified pass class, // or null if it is not known. - static const PassInfo *lookupPassInfo(intptr_t TI); + static const StaticPassInfo *lookupPassInfo(intptr_t TI); // lookupPassInfo - Return the pass info object for the pass with the given // argument string, or null if it is not known. - static const PassInfo *lookupPassInfo(StringRef Arg); + static const StaticPassInfo *lookupPassInfo(StringRef Arg); /// getAnalysisIfAvailable() - Subclasses use this function to /// get analysis information that might be around, for example to update it. @@ -213,10 +214,10 @@ AnalysisType &getAnalysis(Function &F); // Defined in PassAnalysisSupport.h template - AnalysisType &getAnalysisID(const PassInfo *PI) const; + AnalysisType &getAnalysisID(const StaticPassInfo *PI) const; template - AnalysisType &getAnalysisID(const PassInfo *PI, Function &F); + AnalysisType &getAnalysisID(const StaticPassInfo *PI, Function &F); }; Modified: llvm/trunk/include/llvm/PassAnalysisSupport.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/PassAnalysisSupport.h?rev=108794&r1=108793&r2=108794&view=diff ============================================================================== --- llvm/trunk/include/llvm/PassAnalysisSupport.h (original) +++ llvm/trunk/include/llvm/PassAnalysisSupport.h Mon Jul 19 20:19:58 2010 @@ -86,7 +86,7 @@ // linked in. Be careful about spelling! // AnalysisUsage &addPreserved(StringRef Arg) { - const PassInfo *PI = Pass::lookupPassInfo(Arg); + const StaticPassInfo *PI = Pass::lookupPassInfo(Arg); // If the pass exists, preserve it. Otherwise silently do nothing. if (PI) Preserved.push_back(PI); return *this; @@ -130,7 +130,7 @@ inline PMDataManager &getPMDataManager() { return PM; } // Find pass that is implementing PI. - Pass *findImplPass(const PassInfo *PI) { + Pass *findImplPass(const StaticPassInfo *PI) { Pass *ResultPass = 0; for (unsigned i = 0; i < AnalysisImpls.size() ; ++i) { if (AnalysisImpls[i].first == PI) { @@ -142,10 +142,10 @@ } // Find pass that is implementing PI. Initialize pass for Function F. - Pass *findImplPass(Pass *P, const PassInfo *PI, Function &F); + Pass *findImplPass(Pass *P, const StaticPassInfo *PI, Function &F); - void addAnalysisImplsPair(const PassInfo *PI, Pass *P) { - std::pair pir = std::make_pair(PI,P); + void addAnalysisImplsPair(const StaticPassInfo *PI, Pass *P) { + std::pair pir = std::make_pair(PI,P); AnalysisImpls.push_back(pir); } @@ -160,7 +160,7 @@ // AnalysisImpls - This keeps track of which passes implements the interfaces // that are required by the current pass (to implement getAnalysis()). - std::vector > AnalysisImpls; + std::vector > AnalysisImpls; private: // PassManager that is used to resolve analysis info @@ -179,7 +179,7 @@ AnalysisType *Pass::getAnalysisIfAvailable() const { assert(Resolver && "Pass not resident in a PassManager object!"); - const PassInfo *PI = getClassPassInfo(); + const StaticPassInfo *PI = getClassPassInfo(); if (PI == 0) return 0; Pass *ResultPass = Resolver->getAnalysisIfAvailable(PI, true); @@ -203,7 +203,7 @@ } template -AnalysisType &Pass::getAnalysisID(const PassInfo *PI) const { +AnalysisType &Pass::getAnalysisID(const StaticPassInfo *PI) const { assert(PI && "getAnalysis for unregistered pass!"); assert(Resolver&&"Pass has not been inserted into a PassManager object!"); // PI *must* appear in AnalysisImpls. Because the number of passes used @@ -233,7 +233,7 @@ } template -AnalysisType &Pass::getAnalysisID(const PassInfo *PI, Function &F) { +AnalysisType &Pass::getAnalysisID(const StaticPassInfo *PI, Function &F) { assert(PI && "getAnalysis for unregistered pass!"); assert(Resolver && "Pass has not been inserted into a PassManager object!"); // PI *must* appear in AnalysisImpls. Because the number of passes used Modified: llvm/trunk/include/llvm/PassManagers.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/PassManagers.h?rev=108794&r1=108793&r2=108794&view=diff ============================================================================== --- llvm/trunk/include/llvm/PassManagers.h (original) +++ llvm/trunk/include/llvm/PassManagers.h Mon Jul 19 20:19:58 2010 @@ -302,7 +302,7 @@ /// through getAnalysis interface. virtual void addLowerLevelRequiredPass(Pass *P, Pass *RequiredPass); - virtual Pass *getOnTheFlyPass(Pass *P, const PassInfo *PI, Function &F); + virtual Pass *getOnTheFlyPass(Pass *P, const StaticPassInfo *PI, Function &F); /// Initialize available analysis information. void initializeAnalysisInfo() { Modified: llvm/trunk/include/llvm/PassSupport.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/PassSupport.h?rev=108794&r1=108793&r2=108794&view=diff ============================================================================== --- llvm/trunk/include/llvm/PassSupport.h (original) +++ llvm/trunk/include/llvm/PassSupport.h Mon Jul 19 20:19:58 2010 @@ -22,6 +22,7 @@ #define LLVM_PASS_SUPPORT_H #include "Pass.h" +#include "llvm/Config/config.h" namespace llvm { @@ -33,45 +34,24 @@ /// getPassInfo() method. These objects are set up by the RegisterPass<> /// template, defined below. /// -class PassInfo { -public: + +struct StaticPassInfo { typedef Pass* (*NormalCtor_t)(); struct InterfaceInfo { - const PassInfo *interface; + const StaticPassInfo *interface; const InterfaceInfo *next; }; -private: - const char *const PassName; // Nice name for Pass - const char *const PassArgument; // Command Line argument to run this pass - const intptr_t PassID; - const bool IsCFGOnlyPass; // Pass only looks at the CFG. - const bool IsAnalysis; // True if an analysis pass. - const bool IsAnalysisGroup; // True if an analysis group. - const InterfaceInfo *ItfImpl;// Interfaces implemented by this pass + const char *PassName; // Nice name for Pass + const char *PassArgument; // Command Line argument to run this pass + intptr_t PassID; + bool IsCFGOnlyPass; // Pass only looks at the CFG. + bool IsAnalysis; // True if an analysis pass. + bool IsAnalysisGroup; // True if an analysis group. + InterfaceInfo *ItfImpl;// Interfaces implemented by this pass NormalCtor_t NormalCtor; - -public: - /// PassInfo ctor - Do not call this directly, this should only be invoked - /// through RegisterPass. - PassInfo(const char *name, const char *arg, intptr_t pi, - NormalCtor_t normal = 0, - bool isCFGOnly = false, bool is_analysis = false) - : PassName(name), PassArgument(arg), PassID(pi), - IsCFGOnlyPass(isCFGOnly), - IsAnalysis(is_analysis), IsAnalysisGroup(false), NormalCtor(normal) { - registerPass(); - } - /// PassInfo ctor - Do not call this directly, this should only be invoked - /// through RegisterPass. This version is for use by analysis groups; it - /// does not auto-register the pass. - PassInfo(const char *name, intptr_t pi) - : PassName(name), PassArgument(""), PassID(pi), - IsCFGOnlyPass(false), - IsAnalysis(false), IsAnalysisGroup(true), NormalCtor(0) { - } - + /// getPassName - Return the friendly name for the pass, never returns null /// const char *getPassName() const { return PassName; } @@ -90,7 +70,7 @@ bool isPassID(void *IDPtr) const { return PassID == (intptr_t)IDPtr; } - + /// isAnalysisGroup - Return true if this is an analysis group, not a normal /// pass. /// @@ -100,7 +80,7 @@ /// isCFGOnlyPass - return true if this pass only looks at the CFG for the /// function. bool isCFGOnlyPass() const { return IsCFGOnlyPass; } - + /// getNormalCtor - Return a pointer to a function, that when called, creates /// an instance of the pass and returns it. This pointer may be null if there /// is no default constructor for the pass. @@ -112,14 +92,11 @@ NormalCtor = Ctor; } - /// createPass() - Use this method to create an instance of this pass. - Pass *createPass() const; - /// addInterfaceImplemented - This method is called when this pass is /// registered as a member of an analysis group with the RegisterAnalysisGroup /// template. /// - void addInterfaceImplemented(const PassInfo *ItfPI) { + void addInterfaceImplemented(const StaticPassInfo *ItfPI) { InterfaceInfo *NewInfo = new InterfaceInfo(); NewInfo->interface = ItfPI; NewInfo->next = ItfImpl; @@ -133,6 +110,39 @@ return ItfImpl; } + /// createPass() - Use this method to create an instance of this pass. + Pass *createPass() const; +}; + +class PassInfo : public StaticPassInfo { +public: + /// PassInfo ctor - Do not call this directly, this should only be invoked + /// through RegisterPass. + PassInfo(const char *name, const char *arg, intptr_t pi, + NormalCtor_t normal = 0, + bool isCFGOnly = false, bool is_analysis = false) { + this->PassName = name; + this->PassArgument = arg; + this->PassID = pi; + this->IsCFGOnlyPass = isCFGOnly; + this->IsAnalysis = is_analysis; + this->IsAnalysisGroup = false; + this->NormalCtor = normal; + registerPass(); + } + /// PassInfo ctor - Do not call this directly, this should only be invoked + /// through RegisterPass. This version is for use by analysis groups; it + /// does not auto-register the pass. + PassInfo(const char *name, intptr_t pi) { + this->PassName = name; + this->PassArgument = ""; + this->PassID = pi; + this->IsCFGOnlyPass = false; + this->IsAnalysis = false; + this->IsAnalysisGroup = true; + this->NormalCtor = 0; + } + protected: void registerPass(); void unregisterPass(); @@ -240,7 +250,7 @@ /// Callback functions - These functions are invoked whenever a pass is loaded /// or removed from the current executable. /// - virtual void passRegistered(const PassInfo *) {} + virtual void passRegistered(const StaticPassInfo *) {} /// enumeratePasses - Iterate over the registered passes, calling the /// passEnumerate callback on each PassInfo object. @@ -250,7 +260,7 @@ /// passEnumerate - Callback function invoked when someone calls /// enumeratePasses on this PassRegistrationListener object. /// - virtual void passEnumerate(const PassInfo *) {} + virtual void passEnumerate(const StaticPassInfo *) {} }; Modified: llvm/trunk/include/llvm/Support/PassNameParser.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/PassNameParser.h?rev=108794&r1=108793&r2=108794&view=diff ============================================================================== --- llvm/trunk/include/llvm/Support/PassNameParser.h (original) +++ llvm/trunk/include/llvm/Support/PassNameParser.h Mon Jul 19 20:19:58 2010 @@ -55,9 +55,11 @@ // ignorablePassImpl - Can be overriden in subclasses to refine the list of // which passes we want to include. // - virtual bool ignorablePassImpl(const PassInfo *P) const { return false; } + virtual bool ignorablePassImpl(const StaticPassInfo *P) const { + return false; + } - inline bool ignorablePass(const PassInfo *P) const { + inline bool ignorablePass(const StaticPassInfo *P) const { // Ignore non-selectable and non-constructible passes! Ignore // non-optimizations. return P->getPassArgument() == 0 || *P->getPassArgument() == 0 || @@ -66,7 +68,7 @@ // Implement the PassRegistrationListener callbacks used to populate our map // - virtual void passRegistered(const PassInfo *P) { + virtual void passRegistered(const StaticPassInfo *P) { if (ignorablePass(P) || !Opt) return; if (findOption(P->getPassArgument()) != getNumOptions()) { errs() << "Two passes with the same argument (-" @@ -75,7 +77,7 @@ } addLiteralOption(P->getPassArgument(), P, P->getPassName()); } - virtual void passEnumerate(const PassInfo *P) { passRegistered(P); } + virtual void passEnumerate(const StaticPassInfo *P) { passRegistered(P); } // ValLessThan - Provide a sorting comparator for Values elements... typedef std::pairisPassID(&AliasAnalysis::ID)) return (AliasAnalysis*)this; return this; Modified: llvm/trunk/lib/Analysis/AliasDebugger.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/AliasDebugger.cpp?rev=108794&r1=108793&r2=108794&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/AliasDebugger.cpp (original) +++ llvm/trunk/lib/Analysis/AliasDebugger.cpp Mon Jul 19 20:19:58 2010 @@ -83,7 +83,7 @@ /// 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) { + virtual void *getAdjustedAnalysisPointer(const StaticPassInfo *PI) { if (PI->isPassID(&AliasAnalysis::ID)) return (AliasAnalysis*)this; return this; Modified: llvm/trunk/lib/Analysis/BasicAliasAnalysis.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/BasicAliasAnalysis.cpp?rev=108794&r1=108793&r2=108794&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/BasicAliasAnalysis.cpp (original) +++ llvm/trunk/lib/Analysis/BasicAliasAnalysis.cpp Mon Jul 19 20:19:58 2010 @@ -172,7 +172,7 @@ /// 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) { + virtual void *getAdjustedAnalysisPointer(const StaticPassInfo *PI) { if (PI->isPassID(&AliasAnalysis::ID)) return (AliasAnalysis*)this; return this; @@ -243,7 +243,7 @@ /// 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) { + virtual void *getAdjustedAnalysisPointer(const StaticPassInfo *PI) { if (PI->isPassID(&AliasAnalysis::ID)) return (AliasAnalysis*)this; return this; Modified: llvm/trunk/lib/Analysis/IPA/CallGraph.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/IPA/CallGraph.cpp?rev=108794&r1=108793&r2=108794&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/IPA/CallGraph.cpp (original) +++ llvm/trunk/lib/Analysis/IPA/CallGraph.cpp Mon Jul 19 20:19:58 2010 @@ -86,7 +86,7 @@ /// 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) { + virtual void *getAdjustedAnalysisPointer(const StaticPassInfo *PI) { if (PI->isPassID(&CallGraph::ID)) return (CallGraph*)this; return this; Modified: llvm/trunk/lib/Analysis/IPA/GlobalsModRef.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/IPA/GlobalsModRef.cpp?rev=108794&r1=108793&r2=108794&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/IPA/GlobalsModRef.cpp (original) +++ llvm/trunk/lib/Analysis/IPA/GlobalsModRef.cpp Mon Jul 19 20:19:58 2010 @@ -149,7 +149,7 @@ /// 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) { + virtual void *getAdjustedAnalysisPointer(const StaticPassInfo *PI) { if (PI->isPassID(&AliasAnalysis::ID)) return (AliasAnalysis*)this; return this; Modified: llvm/trunk/lib/Analysis/ProfileEstimatorPass.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ProfileEstimatorPass.cpp?rev=108794&r1=108793&r2=108794&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/ProfileEstimatorPass.cpp (original) +++ llvm/trunk/lib/Analysis/ProfileEstimatorPass.cpp Mon Jul 19 20:19:58 2010 @@ -59,7 +59,7 @@ /// 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) { + virtual void *getAdjustedAnalysisPointer(const StaticPassInfo *PI) { if (PI->isPassID(&ProfileInfo::ID)) return (ProfileInfo*)this; return this; Modified: llvm/trunk/lib/Analysis/ProfileInfoLoaderPass.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ProfileInfoLoaderPass.cpp?rev=108794&r1=108793&r2=108794&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/ProfileInfoLoaderPass.cpp (original) +++ llvm/trunk/lib/Analysis/ProfileInfoLoaderPass.cpp Mon Jul 19 20:19:58 2010 @@ -67,7 +67,7 @@ /// 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) { + virtual void *getAdjustedAnalysisPointer(const StaticPassInfo *PI) { if (PI->isPassID(&ProfileInfo::ID)) return (ProfileInfo*)this; return this; Modified: llvm/trunk/lib/Analysis/ScalarEvolutionAliasAnalysis.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ScalarEvolutionAliasAnalysis.cpp?rev=108794&r1=108793&r2=108794&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/ScalarEvolutionAliasAnalysis.cpp (original) +++ llvm/trunk/lib/Analysis/ScalarEvolutionAliasAnalysis.cpp Mon Jul 19 20:19:58 2010 @@ -40,7 +40,7 @@ /// 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) { + virtual void *getAdjustedAnalysisPointer(const StaticPassInfo *PI) { if (PI->isPassID(&AliasAnalysis::ID)) return (AliasAnalysis*)this; return this; Modified: llvm/trunk/lib/VMCore/Pass.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Pass.cpp?rev=108794&r1=108793&r2=108794&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/Pass.cpp (original) +++ llvm/trunk/lib/VMCore/Pass.cpp Mon Jul 19 20:19:58 2010 @@ -75,7 +75,7 @@ /// Registration templates, but can be overloaded directly. /// const char *Pass::getPassName() const { - if (const PassInfo *PI = getPassInfo()) + if (const StaticPassInfo *PI = getPassInfo()) return PI->getPassName(); return "Unnamed pass: implement Pass::getPassName()"; } @@ -101,7 +101,7 @@ // By default, don't do anything. } -void *Pass::getAdjustedAnalysisPointer(const PassInfo *) { +void *Pass::getAdjustedAnalysisPointer(const StaticPassInfo *) { return this; } @@ -243,35 +243,35 @@ /// PassInfoMap - Keep track of the passinfo object for each registered llvm /// pass. - typedef std::map MapType; + typedef std::map MapType; MapType PassInfoMap; - typedef StringMap StringMapType; + typedef StringMap StringMapType; StringMapType PassInfoStringMap; /// AnalysisGroupInfo - Keep track of information for each analysis group. struct AnalysisGroupInfo { - std::set Implementations; + std::set Implementations; }; /// AnalysisGroupInfoMap - Information for each analysis group. - std::map AnalysisGroupInfoMap; + std::map AnalysisGroupInfoMap; public: - const PassInfo *GetPassInfo(intptr_t TI) const { + const StaticPassInfo *GetPassInfo(intptr_t TI) const { sys::SmartScopedLock Guard(Lock); MapType::const_iterator I = PassInfoMap.find(TI); return I != PassInfoMap.end() ? I->second : 0; } - const PassInfo *GetPassInfo(StringRef Arg) const { + const StaticPassInfo *GetPassInfo(StringRef Arg) const { sys::SmartScopedLock Guard(Lock); StringMapType::const_iterator I = PassInfoStringMap.find(Arg); return I != PassInfoStringMap.end() ? I->second : 0; } - void RegisterPass(const PassInfo &PI) { + void RegisterPass(const StaticPassInfo &PI) { sys::SmartScopedLock Guard(Lock); bool Inserted = PassInfoMap.insert(std::make_pair(PI.getTypeInfo(),&PI)).second; @@ -279,7 +279,7 @@ PassInfoStringMap[PI.getPassArgument()] = &PI; } - void UnregisterPass(const PassInfo &PI) { + void UnregisterPass(const StaticPassInfo &PI) { sys::SmartScopedLock Guard(Lock); MapType::iterator I = PassInfoMap.find(PI.getTypeInfo()); assert(I != PassInfoMap.end() && "Pass registered but not in map!"); @@ -298,8 +298,8 @@ /// Analysis Group Mechanisms. - void RegisterAnalysisGroup(PassInfo *InterfaceInfo, - const PassInfo *ImplementationInfo, + void RegisterAnalysisGroup(StaticPassInfo *InterfaceInfo, + const StaticPassInfo *ImplementationInfo, bool isDefault) { sys::SmartScopedLock Guard(Lock); AnalysisGroupInfo &AGI = AnalysisGroupInfoMap[InterfaceInfo]; @@ -363,15 +363,15 @@ // getPassInfo - Return the PassInfo data structure that corresponds to this // pass... -const PassInfo *Pass::getPassInfo() const { +const StaticPassInfo *Pass::getPassInfo() const { return lookupPassInfo(PassID); } -const PassInfo *Pass::lookupPassInfo(intptr_t TI) { +const StaticPassInfo *Pass::lookupPassInfo(intptr_t TI) { return getPassRegistrar()->GetPassInfo(TI); } -const PassInfo *Pass::lookupPassInfo(StringRef Arg) { +const StaticPassInfo *Pass::lookupPassInfo(StringRef Arg) { return getPassRegistrar()->GetPassInfo(Arg); } @@ -390,7 +390,7 @@ getPassRegistrar()->UnregisterPass(*this); } -Pass *PassInfo::createPass() const { +Pass *StaticPassInfo::createPass() const { assert((!isAnalysisGroup() || NormalCtor) && "No default implementation found for analysis group!"); assert(NormalCtor && @@ -408,8 +408,8 @@ intptr_t PassID, bool isDefault) : PassInfo(Name, InterfaceID) { - PassInfo *InterfaceInfo = - const_cast(Pass::lookupPassInfo(InterfaceID)); + StaticPassInfo *InterfaceInfo = + const_cast(Pass::lookupPassInfo(InterfaceID)); if (InterfaceInfo == 0) { // First reference to Interface, register it now. registerPass(); @@ -419,13 +419,13 @@ "Trying to join an analysis group that is a normal pass!"); if (PassID) { - const PassInfo *ImplementationInfo = Pass::lookupPassInfo(PassID); + const StaticPassInfo *ImplementationInfo = Pass::lookupPassInfo(PassID); assert(ImplementationInfo && "Must register pass before adding to AnalysisGroup!"); // Make sure we keep track of the fact that the implementation implements // the interface. - PassInfo *IIPI = const_cast(ImplementationInfo); + StaticPassInfo *IIPI = const_cast(ImplementationInfo); IIPI->addInterfaceImplemented(InterfaceInfo); getPassRegistrar()->RegisterAnalysisGroup(InterfaceInfo, IIPI, isDefault); @@ -479,7 +479,7 @@ VectorType &CFGOnlyList; GetCFGOnlyPasses(VectorType &L) : CFGOnlyList(L) {} - void passEnumerate(const PassInfo *P) { + void passEnumerate(const StaticPassInfo *P) { if (P->isCFGOnlyPass()) CFGOnlyList.push_back(P); } Modified: llvm/trunk/lib/VMCore/PassManager.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/PassManager.cpp?rev=108794&r1=108793&r2=108794&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/PassManager.cpp (original) +++ llvm/trunk/lib/VMCore/PassManager.cpp Mon Jul 19 20:19:58 2010 @@ -332,7 +332,8 @@ /// Return function pass corresponding to PassInfo PI, that is /// required by module pass MP. Instantiate analysis pass, by using /// its runOnFunction() for function F. - virtual Pass* getOnTheFlyPass(Pass *MP, const PassInfo *PI, Function &F); + virtual Pass* getOnTheFlyPass(Pass *MP, const StaticPassInfo *PI, + Function &F); virtual const char *getPassName() const { return "Module Pass Manager"; @@ -632,7 +633,7 @@ for (SmallVector::iterator I = ImmutablePasses.begin(), E = ImmutablePasses.end(); P == NULL && I != E; ++I) { - const PassInfo *PI = (*I)->getPassInfo(); + const StaticPassInfo *PI = (*I)->getPassInfo(); if (PI == AID) P = *I; @@ -728,7 +729,7 @@ /// Augement AvailableAnalysis by adding analysis made available by pass P. void PMDataManager::recordAvailableAnalysis(Pass *P) { - const PassInfo *PI = P->getPassInfo(); + const StaticPassInfo *PI = P->getPassInfo(); if (PI == 0) return; AvailableAnalysis[PI] = P; @@ -867,7 +868,7 @@ P->releaseMemory(); } - if (const PassInfo *PI = P->getPassInfo()) { + if (const StaticPassInfo *PI = P->getPassInfo()) { // Remove the pass itself (if it is not already removed). AvailableAnalysis.erase(PI); @@ -1051,7 +1052,7 @@ if (PMDataManager *PMD = (*I)->getAsPMDataManager()) PMD->dumpPassArguments(); else - if (const PassInfo *PI = (*I)->getPassInfo()) + if (const StaticPassInfo *PI = (*I)->getPassInfo()) if (!PI->isAnalysisGroup()) dbgs() << " -" << PI->getPassArgument(); } @@ -1154,7 +1155,8 @@ llvm_unreachable("Unable to schedule pass"); } -Pass *PMDataManager::getOnTheFlyPass(Pass *P, const PassInfo *PI, Function &F) { +Pass *PMDataManager::getOnTheFlyPass(Pass *P, const StaticPassInfo *PI, + Function &F) { assert(0 && "Unable to find on the fly pass"); return NULL; } @@ -1173,7 +1175,7 @@ return PM.findAnalysisPass(ID, dir); } -Pass *AnalysisResolver::findImplPass(Pass *P, const PassInfo *AnalysisPI, +Pass *AnalysisResolver::findImplPass(Pass *P, const StaticPassInfo *AnalysisPI, Function &F) { return PM.getOnTheFlyPass(P, AnalysisPI, F); } @@ -1568,7 +1570,8 @@ /// Return function pass corresponding to PassInfo PI, that is /// required by module pass MP. Instantiate analysis pass, by using /// its runOnFunction() for function F. -Pass* MPPassManager::getOnTheFlyPass(Pass *MP, const PassInfo *PI, Function &F){ +Pass* MPPassManager::getOnTheFlyPass(Pass *MP, const StaticPassInfo *PI, + Function &F){ FunctionPassManagerImpl *FPP = OnTheFlyManagers[MP]; assert(FPP && "Unable to find on the fly pass"); Modified: llvm/trunk/tools/bugpoint/BugDriver.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/bugpoint/BugDriver.cpp?rev=108794&r1=108793&r2=108794&view=diff ============================================================================== --- llvm/trunk/tools/bugpoint/BugDriver.cpp (original) +++ llvm/trunk/tools/bugpoint/BugDriver.cpp Mon Jul 19 20:19:58 2010 @@ -56,7 +56,8 @@ /// getPassesString - Turn a list of passes into a string which indicates the /// command line options that must be passed to add the passes. /// -std::string llvm::getPassesString(const std::vector &Passes) { +std::string +llvm::getPassesString(const std::vector &Passes) { std::string Result; for (unsigned i = 0, e = Passes.size(); i != e; ++i) { if (i) Result += " "; Modified: llvm/trunk/tools/bugpoint/BugDriver.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/bugpoint/BugDriver.h?rev=108794&r1=108793&r2=108794&view=diff ============================================================================== --- llvm/trunk/tools/bugpoint/BugDriver.h (original) +++ llvm/trunk/tools/bugpoint/BugDriver.h Mon Jul 19 20:19:58 2010 @@ -23,7 +23,7 @@ namespace llvm { class Value; -class PassInfo; +class StaticPassInfo; class Module; class GlobalVariable; class Function; @@ -47,7 +47,7 @@ const char *ToolName; // argv[0] of bugpoint std::string ReferenceOutputFile; // Name of `good' output file Module *Program; // The raw program, linked together - std::vector PassesToRun; + std::vector PassesToRun; AbstractInterpreter *Interpreter; // How to run the program AbstractInterpreter *SafeInterpreter; // To generate reference output, etc. GCC *gcc; @@ -77,10 +77,10 @@ bool addSources(const std::vector &FileNames); template void addPasses(It I, It E) { PassesToRun.insert(PassesToRun.end(), I, E); } - void setPassesToRun(const std::vector &PTR) { + void setPassesToRun(const std::vector &PTR) { PassesToRun = PTR; } - const std::vector &getPassesToRun() const { + const std::vector &getPassesToRun() const { return PassesToRun; } @@ -112,7 +112,7 @@ /// ReferenceOutput contains the filename of the file containing the output we /// are to match. /// - bool debugPassMiscompilation(const PassInfo *ThePass, + bool debugPassMiscompilation(const StaticPassInfo *ThePass, const std::string &ReferenceOutput); /// compileSharedObject - This method creates a SharedObject from a given @@ -243,7 +243,8 @@ /// failure. If AutoDebugCrashes is set to true, then bugpoint will /// automatically attempt to track down a crashing pass if one exists, and /// this method will never return null. - Module *runPassesOn(Module *M, const std::vector &Passes, + Module *runPassesOn(Module *M, + const std::vector &Passes, bool AutoDebugCrashes = false, unsigned NumExtraArgs = 0, const char * const *ExtraArgs = NULL); @@ -256,7 +257,7 @@ /// or failed, unless Quiet is set. ExtraArgs specifies additional arguments /// to pass to the child bugpoint instance. /// - bool runPasses(const std::vector &PassesToRun, + bool runPasses(const std::vector &PassesToRun, std::string &OutputFilename, bool DeleteOutput = false, bool Quiet = false, unsigned NumExtraArgs = 0, const char * const *ExtraArgs = NULL) const; @@ -268,7 +269,7 @@ /// If the passes did not compile correctly, output the command required to /// recreate the failure. This returns true if a compiler error is found. /// - bool runManyPasses(const std::vector &AllPasses, + bool runManyPasses(const std::vector &AllPasses, std::string &ErrMsg); /// writeProgramToFile - This writes the current "Program" to the named @@ -281,14 +282,14 @@ /// false indicating whether or not the optimizer crashed on the specified /// input (true = crashed). /// - bool runPasses(const std::vector &PassesToRun, + bool runPasses(const std::vector &PassesToRun, bool DeleteOutput = true) const { std::string Filename; return runPasses(PassesToRun, Filename, DeleteOutput); } /// runAsChild - The actual "runPasses" guts that runs in a child process. - int runPassesAsChild(const std::vector &PassesToRun); + int runPassesAsChild(const std::vector &PassesToRun); /// initializeExecutionEnvironment - This method is used to set up the /// environment for executing LLVM programs. @@ -306,7 +307,7 @@ /// getPassesString - Turn a list of passes into a string which indicates the /// command line options that must be passed to add the passes. /// -std::string getPassesString(const std::vector &Passes); +std::string getPassesString(const std::vector &Passes); /// PrintFunctionList - prints out list of problematic functions /// Modified: llvm/trunk/tools/bugpoint/CrashDebugger.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/bugpoint/CrashDebugger.cpp?rev=108794&r1=108793&r2=108794&view=diff ============================================================================== --- llvm/trunk/tools/bugpoint/CrashDebugger.cpp (original) +++ llvm/trunk/tools/bugpoint/CrashDebugger.cpp Mon Jul 19 20:19:58 2010 @@ -43,7 +43,7 @@ } namespace llvm { - class ReducePassList : public ListReducer { + class ReducePassList : public ListReducer { BugDriver &BD; public: ReducePassList(BugDriver &bd) : BD(bd) {} @@ -52,15 +52,15 @@ // running the "Kept" passes fail when run on the output of the "removed" // passes. If we return true, we update the current module of bugpoint. // - virtual TestResult doTest(std::vector &Removed, - std::vector &Kept, + virtual TestResult doTest(std::vector &Removed, + std::vector &Kept, std::string &Error); }; } ReducePassList::TestResult -ReducePassList::doTest(std::vector &Prefix, - std::vector &Suffix, +ReducePassList::doTest(std::vector &Prefix, + std::vector &Suffix, std::string &Error) { sys::Path PrefixOutput; Module *OrigProgram = 0; Modified: llvm/trunk/tools/bugpoint/ExtractFunction.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/bugpoint/ExtractFunction.cpp?rev=108794&r1=108793&r2=108794&view=diff ============================================================================== --- llvm/trunk/tools/bugpoint/ExtractFunction.cpp (original) +++ llvm/trunk/tools/bugpoint/ExtractFunction.cpp Mon Jul 19 20:19:58 2010 @@ -99,8 +99,8 @@ return Result; } -static const PassInfo *getPI(Pass *P) { - const PassInfo *PI = P->getPassInfo(); +static const StaticPassInfo *getPI(Pass *P) { + const StaticPassInfo *PI = P->getPassInfo(); delete P; return PI; } @@ -114,7 +114,7 @@ for (Module::iterator I = M->begin(), E = M->end(); I != E; ++I) I->setLinkage(GlobalValue::ExternalLinkage); - std::vector CleanupPasses; + std::vector CleanupPasses; CleanupPasses.push_back(getPI(createGlobalDCEPass())); if (MayModifySemantics) @@ -138,7 +138,7 @@ /// function. This returns null if there are no extractable loops in the /// program or if the loop extractor crashes. Module *BugDriver::ExtractLoop(Module *M) { - std::vector LoopExtractPasses; + std::vector LoopExtractPasses; LoopExtractPasses.push_back(getPI(createSingleLoopExtractorPass())); Module *NewM = runPassesOn(M, LoopExtractPasses); @@ -359,7 +359,7 @@ std::string uniqueFN = "--extract-blocks-file=" + uniqueFilename.str(); const char *ExtraArg = uniqueFN.c_str(); - std::vector PI; + std::vector PI; std::vector EmptyBBs; // This parameter is ignored. PI.push_back(getPI(createBlockExtractorPass(EmptyBBs))); Module *Ret = runPassesOn(M, PI, false, 1, &ExtraArg); Modified: llvm/trunk/tools/bugpoint/FindBugs.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/bugpoint/FindBugs.cpp?rev=108794&r1=108793&r2=108794&view=diff ============================================================================== --- llvm/trunk/tools/bugpoint/FindBugs.cpp (original) +++ llvm/trunk/tools/bugpoint/FindBugs.cpp Mon Jul 19 20:19:58 2010 @@ -29,7 +29,8 @@ /// If the passes did not compile correctly, output the command required to /// recreate the failure. This returns true if a compiler error is found. /// -bool BugDriver::runManyPasses(const std::vector &AllPasses, +bool +BugDriver::runManyPasses(const std::vector &AllPasses, std::string &ErrMsg) { setPassesToRun(AllPasses); outs() << "Starting bug finding procedure...\n\n"; Modified: llvm/trunk/tools/bugpoint/Miscompilation.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/bugpoint/Miscompilation.cpp?rev=108794&r1=108793&r2=108794&view=diff ============================================================================== --- llvm/trunk/tools/bugpoint/Miscompilation.cpp (original) +++ llvm/trunk/tools/bugpoint/Miscompilation.cpp Mon Jul 19 20:19:58 2010 @@ -43,13 +43,13 @@ cl::desc("Don't extract blocks when searching for miscompilations"), cl::init(false)); - class ReduceMiscompilingPasses : public ListReducer { + class ReduceMiscompilingPasses : public ListReducer { BugDriver &BD; public: ReduceMiscompilingPasses(BugDriver &bd) : BD(bd) {} - virtual TestResult doTest(std::vector &Prefix, - std::vector &Suffix, + virtual TestResult doTest(std::vector &Prefix, + std::vector &Suffix, std::string &Error); }; } @@ -58,8 +58,8 @@ /// group, see if they still break the program. /// ReduceMiscompilingPasses::TestResult -ReduceMiscompilingPasses::doTest(std::vector &Prefix, - std::vector &Suffix, +ReduceMiscompilingPasses::doTest(std::vector &Prefix, + std::vector &Suffix, std::string &Error) { // First, run the program with just the Suffix passes. If it is still broken // with JUST the kept passes, discard the prefix passes. Modified: llvm/trunk/tools/bugpoint/OptimizerDriver.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/bugpoint/OptimizerDriver.cpp?rev=108794&r1=108793&r2=108794&view=diff ============================================================================== --- llvm/trunk/tools/bugpoint/OptimizerDriver.cpp (original) +++ llvm/trunk/tools/bugpoint/OptimizerDriver.cpp Mon Jul 19 20:19:58 2010 @@ -83,7 +83,7 @@ outs() << getPassesString(PassesToRun) << "\n"; } -int BugDriver::runPassesAsChild(const std::vector &Passes) { +int BugDriver::runPassesAsChild(const std::vector &Passes) { std::string ErrInfo; raw_fd_ostream OutFile(ChildOutput.c_str(), ErrInfo, raw_fd_ostream::F_Binary); @@ -124,7 +124,7 @@ /// outs() a single line message indicating whether compilation was successful /// or failed. /// -bool BugDriver::runPasses(const std::vector &Passes, +bool BugDriver::runPasses(const std::vector &Passes, std::string &OutputFilename, bool DeleteOutput, bool Quiet, unsigned NumExtraArgs, const char * const *ExtraArgs) const { @@ -178,7 +178,7 @@ pass_args.push_back( std::string("-load")); pass_args.push_back( PluginLoader::getPlugin(i)); } - for (std::vector::const_iterator I = Passes.begin(), + for (std::vector::const_iterator I = Passes.begin(), E = Passes.end(); I != E; ++I ) pass_args.push_back( std::string("-") + (*I)->getPassArgument() ); for (std::vector::const_iterator I = pass_args.begin(), @@ -235,7 +235,7 @@ /// module, returning the transformed module on success, or a null pointer on /// failure. Module *BugDriver::runPassesOn(Module *M, - const std::vector &Passes, + const std::vector &Passes, bool AutoDebugCrashes, unsigned NumExtraArgs, const char * const *ExtraArgs) { Module *OldProgram = swapProgramIn(M); Modified: llvm/trunk/tools/bugpoint/bugpoint.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/bugpoint/bugpoint.cpp?rev=108794&r1=108793&r2=108794&view=diff ============================================================================== --- llvm/trunk/tools/bugpoint/bugpoint.cpp (original) +++ llvm/trunk/tools/bugpoint/bugpoint.cpp Mon Jul 19 20:19:58 2010 @@ -61,7 +61,7 @@ // The AnalysesList is automatically populated with registered Passes by the // PassNameParser. // -static cl::list +static cl::list PassList(cl::desc("Passes available:"), cl::ZeroOrMore); static cl::opt @@ -90,7 +90,7 @@ AddToDriver(BugDriver &_D) : D(_D) {} virtual void add(Pass *P) { - const PassInfo *PI = P->getPassInfo(); + const StaticPassInfo *PI = P->getPassInfo(); D.addPasses(&PI, &PI + 1); } }; From evan.cheng at apple.com Mon Jul 19 21:01:31 2010 From: evan.cheng at apple.com (Evan Cheng) Date: Mon, 19 Jul 2010 19:01:31 -0700 Subject: [llvm-commits] [llvm] r108792 - /llvm/trunk/lib/CodeGen/MachineLICM.cpp In-Reply-To: <20100720005013.3E7A92A6C12C@llvm.org> References: <20100720005013.3E7A92A6C12C@llvm.org> Message-ID: On Jul 19, 2010, at 5:50 PM, Dale Johannesen wrote: > Author: johannes > Date: Mon Jul 19 19:50:13 2010 > New Revision: 108792 > > URL: http://llvm.org/viewvc/llvm-project?rev=108792&view=rev > Log: > Don't hoist things out of a large switch inside a > loop, for the reasons in the comments. This is a > major win on 253.perlbmk on ARM Darwin. I expect it > to be a good heuristic in general, but it's possible > some things will regress; I'll be watching. > 7940152. > > > Modified: > llvm/trunk/lib/CodeGen/MachineLICM.cpp > > Modified: llvm/trunk/lib/CodeGen/MachineLICM.cpp > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineLICM.cpp?rev=108792&r1=108791&r2=108792&view=diff > ============================================================================== > --- llvm/trunk/lib/CodeGen/MachineLICM.cpp (original) > +++ llvm/trunk/lib/CodeGen/MachineLICM.cpp Mon Jul 19 19:50:13 2010 > @@ -489,8 +489,12 @@ > } > > const std::vector &Children = N->getChildren(); > - for (unsigned I = 0, E = Children.size(); I != E; ++I) > - HoistRegion(Children[I]); > + // Don't hoist things out of a large switch statement. This often causes > + // code to be hoisted that wasn't going to be executed, and increases > + // register pressure in a situation where it's likely to matter. > + if (Children.size() < 10) How would this work? This doesn't seem like a good way to determine if the loop body contains a switch statement. Evan > + for (unsigned I = 0, E = Children.size(); I != E; ++I) > + HoistRegion(Children[I]); > } > > /// IsLICMCandidate - Returns true if the instruction may be a suitable > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From daniel at zuster.org Mon Jul 19 22:06:07 2010 From: daniel at zuster.org (Daniel Dunbar) Date: Tue, 20 Jul 2010 03:06:07 -0000 Subject: [llvm-commits] [llvm] r108805 - in /llvm/trunk: include/llvm/ include/llvm/Support/ lib/Analysis/ lib/Analysis/IPA/ lib/VMCore/ tools/bugpoint/ Message-ID: <20100720030607.930892A6C12C@llvm.org> Author: ddunbar Date: Mon Jul 19 22:06:07 2010 New Revision: 108805 URL: http://llvm.org/viewvc/llvm-project?rev=108805&view=rev Log: Revert r108794, "Separate PassInfo into two classes: a constructor-free superclass (StaticPassInfo) and a constructor-ful subclass (PassInfo).", it is breaking teh everything. Modified: llvm/trunk/include/llvm/Pass.h llvm/trunk/include/llvm/PassAnalysisSupport.h llvm/trunk/include/llvm/PassManagers.h llvm/trunk/include/llvm/PassSupport.h llvm/trunk/include/llvm/Support/PassNameParser.h llvm/trunk/lib/Analysis/AliasAnalysisCounter.cpp llvm/trunk/lib/Analysis/AliasDebugger.cpp llvm/trunk/lib/Analysis/BasicAliasAnalysis.cpp llvm/trunk/lib/Analysis/IPA/CallGraph.cpp llvm/trunk/lib/Analysis/IPA/GlobalsModRef.cpp llvm/trunk/lib/Analysis/ProfileEstimatorPass.cpp llvm/trunk/lib/Analysis/ProfileInfoLoaderPass.cpp llvm/trunk/lib/Analysis/ScalarEvolutionAliasAnalysis.cpp llvm/trunk/lib/VMCore/Pass.cpp llvm/trunk/lib/VMCore/PassManager.cpp llvm/trunk/tools/bugpoint/BugDriver.cpp llvm/trunk/tools/bugpoint/BugDriver.h llvm/trunk/tools/bugpoint/CrashDebugger.cpp llvm/trunk/tools/bugpoint/ExtractFunction.cpp llvm/trunk/tools/bugpoint/FindBugs.cpp llvm/trunk/tools/bugpoint/Miscompilation.cpp llvm/trunk/tools/bugpoint/OptimizerDriver.cpp llvm/trunk/tools/bugpoint/bugpoint.cpp Modified: llvm/trunk/include/llvm/Pass.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Pass.h?rev=108805&r1=108804&r2=108805&view=diff ============================================================================== --- llvm/trunk/include/llvm/Pass.h (original) +++ llvm/trunk/include/llvm/Pass.h Mon Jul 19 22:06:07 2010 @@ -41,7 +41,6 @@ class Function; class Module; class AnalysisUsage; -class StaticPassInfo; class PassInfo; class ImmutablePass; class PMStack; @@ -51,7 +50,7 @@ class StringRef; // AnalysisID - Use the PassInfo to identify a pass... -typedef const StaticPassInfo* AnalysisID; +typedef const PassInfo* AnalysisID; /// Different types of internal pass managers. External pass managers /// (PassManager and FunctionPassManager) are not represented here. @@ -105,7 +104,7 @@ /// getPassInfo - Return the PassInfo data structure that corresponds to this /// pass... If the pass has not been registered, this will return null. /// - const StaticPassInfo *getPassInfo() const; + const PassInfo *getPassInfo() const; /// print - Print out the internal state of the pass. This is called by /// Analyze to print out the contents of an analysis. Otherwise it is not @@ -160,7 +159,7 @@ /// 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 StaticPassInfo *); + virtual void *getAdjustedAnalysisPointer(const PassInfo *); virtual ImmutablePass *getAsImmutablePass(); virtual PMDataManager *getAsPMDataManager(); @@ -172,17 +171,17 @@ virtual void dumpPassStructure(unsigned Offset = 0); template - static const StaticPassInfo *getClassPassInfo() { + static const PassInfo *getClassPassInfo() { return lookupPassInfo(intptr_t(&AnalysisClass::ID)); } // lookupPassInfo - Return the pass info object for the specified pass class, // or null if it is not known. - static const StaticPassInfo *lookupPassInfo(intptr_t TI); + static const PassInfo *lookupPassInfo(intptr_t TI); // lookupPassInfo - Return the pass info object for the pass with the given // argument string, or null if it is not known. - static const StaticPassInfo *lookupPassInfo(StringRef Arg); + static const PassInfo *lookupPassInfo(StringRef Arg); /// getAnalysisIfAvailable() - Subclasses use this function to /// get analysis information that might be around, for example to update it. @@ -214,10 +213,10 @@ AnalysisType &getAnalysis(Function &F); // Defined in PassAnalysisSupport.h template - AnalysisType &getAnalysisID(const StaticPassInfo *PI) const; + AnalysisType &getAnalysisID(const PassInfo *PI) const; template - AnalysisType &getAnalysisID(const StaticPassInfo *PI, Function &F); + AnalysisType &getAnalysisID(const PassInfo *PI, Function &F); }; Modified: llvm/trunk/include/llvm/PassAnalysisSupport.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/PassAnalysisSupport.h?rev=108805&r1=108804&r2=108805&view=diff ============================================================================== --- llvm/trunk/include/llvm/PassAnalysisSupport.h (original) +++ llvm/trunk/include/llvm/PassAnalysisSupport.h Mon Jul 19 22:06:07 2010 @@ -86,7 +86,7 @@ // linked in. Be careful about spelling! // AnalysisUsage &addPreserved(StringRef Arg) { - const StaticPassInfo *PI = Pass::lookupPassInfo(Arg); + const PassInfo *PI = Pass::lookupPassInfo(Arg); // If the pass exists, preserve it. Otherwise silently do nothing. if (PI) Preserved.push_back(PI); return *this; @@ -130,7 +130,7 @@ inline PMDataManager &getPMDataManager() { return PM; } // Find pass that is implementing PI. - Pass *findImplPass(const StaticPassInfo *PI) { + Pass *findImplPass(const PassInfo *PI) { Pass *ResultPass = 0; for (unsigned i = 0; i < AnalysisImpls.size() ; ++i) { if (AnalysisImpls[i].first == PI) { @@ -142,10 +142,10 @@ } // Find pass that is implementing PI. Initialize pass for Function F. - Pass *findImplPass(Pass *P, const StaticPassInfo *PI, Function &F); + Pass *findImplPass(Pass *P, const PassInfo *PI, Function &F); - void addAnalysisImplsPair(const StaticPassInfo *PI, Pass *P) { - std::pair pir = std::make_pair(PI,P); + void addAnalysisImplsPair(const PassInfo *PI, Pass *P) { + std::pair pir = std::make_pair(PI,P); AnalysisImpls.push_back(pir); } @@ -160,7 +160,7 @@ // AnalysisImpls - This keeps track of which passes implements the interfaces // that are required by the current pass (to implement getAnalysis()). - std::vector > AnalysisImpls; + std::vector > AnalysisImpls; private: // PassManager that is used to resolve analysis info @@ -179,7 +179,7 @@ AnalysisType *Pass::getAnalysisIfAvailable() const { assert(Resolver && "Pass not resident in a PassManager object!"); - const StaticPassInfo *PI = getClassPassInfo(); + const PassInfo *PI = getClassPassInfo(); if (PI == 0) return 0; Pass *ResultPass = Resolver->getAnalysisIfAvailable(PI, true); @@ -203,7 +203,7 @@ } template -AnalysisType &Pass::getAnalysisID(const StaticPassInfo *PI) const { +AnalysisType &Pass::getAnalysisID(const PassInfo *PI) const { assert(PI && "getAnalysis for unregistered pass!"); assert(Resolver&&"Pass has not been inserted into a PassManager object!"); // PI *must* appear in AnalysisImpls. Because the number of passes used @@ -233,7 +233,7 @@ } template -AnalysisType &Pass::getAnalysisID(const StaticPassInfo *PI, Function &F) { +AnalysisType &Pass::getAnalysisID(const PassInfo *PI, Function &F) { assert(PI && "getAnalysis for unregistered pass!"); assert(Resolver && "Pass has not been inserted into a PassManager object!"); // PI *must* appear in AnalysisImpls. Because the number of passes used Modified: llvm/trunk/include/llvm/PassManagers.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/PassManagers.h?rev=108805&r1=108804&r2=108805&view=diff ============================================================================== --- llvm/trunk/include/llvm/PassManagers.h (original) +++ llvm/trunk/include/llvm/PassManagers.h Mon Jul 19 22:06:07 2010 @@ -302,7 +302,7 @@ /// through getAnalysis interface. virtual void addLowerLevelRequiredPass(Pass *P, Pass *RequiredPass); - virtual Pass *getOnTheFlyPass(Pass *P, const StaticPassInfo *PI, Function &F); + virtual Pass *getOnTheFlyPass(Pass *P, const PassInfo *PI, Function &F); /// Initialize available analysis information. void initializeAnalysisInfo() { Modified: llvm/trunk/include/llvm/PassSupport.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/PassSupport.h?rev=108805&r1=108804&r2=108805&view=diff ============================================================================== --- llvm/trunk/include/llvm/PassSupport.h (original) +++ llvm/trunk/include/llvm/PassSupport.h Mon Jul 19 22:06:07 2010 @@ -22,7 +22,6 @@ #define LLVM_PASS_SUPPORT_H #include "Pass.h" -#include "llvm/Config/config.h" namespace llvm { @@ -34,24 +33,45 @@ /// getPassInfo() method. These objects are set up by the RegisterPass<> /// template, defined below. /// - -struct StaticPassInfo { +class PassInfo { +public: typedef Pass* (*NormalCtor_t)(); struct InterfaceInfo { - const StaticPassInfo *interface; + const PassInfo *interface; const InterfaceInfo *next; }; - const char *PassName; // Nice name for Pass - const char *PassArgument; // Command Line argument to run this pass - intptr_t PassID; - bool IsCFGOnlyPass; // Pass only looks at the CFG. - bool IsAnalysis; // True if an analysis pass. - bool IsAnalysisGroup; // True if an analysis group. - InterfaceInfo *ItfImpl;// Interfaces implemented by this pass +private: + const char *const PassName; // Nice name for Pass + const char *const PassArgument; // Command Line argument to run this pass + const intptr_t PassID; + const bool IsCFGOnlyPass; // Pass only looks at the CFG. + const bool IsAnalysis; // True if an analysis pass. + const bool IsAnalysisGroup; // True if an analysis group. + const InterfaceInfo *ItfImpl;// Interfaces implemented by this pass NormalCtor_t NormalCtor; - + +public: + /// PassInfo ctor - Do not call this directly, this should only be invoked + /// through RegisterPass. + PassInfo(const char *name, const char *arg, intptr_t pi, + NormalCtor_t normal = 0, + bool isCFGOnly = false, bool is_analysis = false) + : PassName(name), PassArgument(arg), PassID(pi), + IsCFGOnlyPass(isCFGOnly), + IsAnalysis(is_analysis), IsAnalysisGroup(false), NormalCtor(normal) { + registerPass(); + } + /// PassInfo ctor - Do not call this directly, this should only be invoked + /// through RegisterPass. This version is for use by analysis groups; it + /// does not auto-register the pass. + PassInfo(const char *name, intptr_t pi) + : PassName(name), PassArgument(""), PassID(pi), + IsCFGOnlyPass(false), + IsAnalysis(false), IsAnalysisGroup(true), NormalCtor(0) { + } + /// getPassName - Return the friendly name for the pass, never returns null /// const char *getPassName() const { return PassName; } @@ -70,7 +90,7 @@ bool isPassID(void *IDPtr) const { return PassID == (intptr_t)IDPtr; } - + /// isAnalysisGroup - Return true if this is an analysis group, not a normal /// pass. /// @@ -80,7 +100,7 @@ /// isCFGOnlyPass - return true if this pass only looks at the CFG for the /// function. bool isCFGOnlyPass() const { return IsCFGOnlyPass; } - + /// getNormalCtor - Return a pointer to a function, that when called, creates /// an instance of the pass and returns it. This pointer may be null if there /// is no default constructor for the pass. @@ -92,11 +112,14 @@ NormalCtor = Ctor; } + /// createPass() - Use this method to create an instance of this pass. + Pass *createPass() const; + /// addInterfaceImplemented - This method is called when this pass is /// registered as a member of an analysis group with the RegisterAnalysisGroup /// template. /// - void addInterfaceImplemented(const StaticPassInfo *ItfPI) { + void addInterfaceImplemented(const PassInfo *ItfPI) { InterfaceInfo *NewInfo = new InterfaceInfo(); NewInfo->interface = ItfPI; NewInfo->next = ItfImpl; @@ -110,39 +133,6 @@ return ItfImpl; } - /// createPass() - Use this method to create an instance of this pass. - Pass *createPass() const; -}; - -class PassInfo : public StaticPassInfo { -public: - /// PassInfo ctor - Do not call this directly, this should only be invoked - /// through RegisterPass. - PassInfo(const char *name, const char *arg, intptr_t pi, - NormalCtor_t normal = 0, - bool isCFGOnly = false, bool is_analysis = false) { - this->PassName = name; - this->PassArgument = arg; - this->PassID = pi; - this->IsCFGOnlyPass = isCFGOnly; - this->IsAnalysis = is_analysis; - this->IsAnalysisGroup = false; - this->NormalCtor = normal; - registerPass(); - } - /// PassInfo ctor - Do not call this directly, this should only be invoked - /// through RegisterPass. This version is for use by analysis groups; it - /// does not auto-register the pass. - PassInfo(const char *name, intptr_t pi) { - this->PassName = name; - this->PassArgument = ""; - this->PassID = pi; - this->IsCFGOnlyPass = false; - this->IsAnalysis = false; - this->IsAnalysisGroup = true; - this->NormalCtor = 0; - } - protected: void registerPass(); void unregisterPass(); @@ -250,7 +240,7 @@ /// Callback functions - These functions are invoked whenever a pass is loaded /// or removed from the current executable. /// - virtual void passRegistered(const StaticPassInfo *) {} + virtual void passRegistered(const PassInfo *) {} /// enumeratePasses - Iterate over the registered passes, calling the /// passEnumerate callback on each PassInfo object. @@ -260,7 +250,7 @@ /// passEnumerate - Callback function invoked when someone calls /// enumeratePasses on this PassRegistrationListener object. /// - virtual void passEnumerate(const StaticPassInfo *) {} + virtual void passEnumerate(const PassInfo *) {} }; Modified: llvm/trunk/include/llvm/Support/PassNameParser.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/PassNameParser.h?rev=108805&r1=108804&r2=108805&view=diff ============================================================================== --- llvm/trunk/include/llvm/Support/PassNameParser.h (original) +++ llvm/trunk/include/llvm/Support/PassNameParser.h Mon Jul 19 22:06:07 2010 @@ -55,11 +55,9 @@ // ignorablePassImpl - Can be overriden in subclasses to refine the list of // which passes we want to include. // - virtual bool ignorablePassImpl(const StaticPassInfo *P) const { - return false; - } + virtual bool ignorablePassImpl(const PassInfo *P) const { return false; } - inline bool ignorablePass(const StaticPassInfo *P) const { + inline bool ignorablePass(const PassInfo *P) const { // Ignore non-selectable and non-constructible passes! Ignore // non-optimizations. return P->getPassArgument() == 0 || *P->getPassArgument() == 0 || @@ -68,7 +66,7 @@ // Implement the PassRegistrationListener callbacks used to populate our map // - virtual void passRegistered(const StaticPassInfo *P) { + virtual void passRegistered(const PassInfo *P) { if (ignorablePass(P) || !Opt) return; if (findOption(P->getPassArgument()) != getNumOptions()) { errs() << "Two passes with the same argument (-" @@ -77,7 +75,7 @@ } addLiteralOption(P->getPassArgument(), P, P->getPassName()); } - virtual void passEnumerate(const StaticPassInfo *P) { passRegistered(P); } + virtual void passEnumerate(const PassInfo *P) { passRegistered(P); } // ValLessThan - Provide a sorting comparator for Values elements... typedef std::pairisPassID(&AliasAnalysis::ID)) return (AliasAnalysis*)this; return this; Modified: llvm/trunk/lib/Analysis/AliasDebugger.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/AliasDebugger.cpp?rev=108805&r1=108804&r2=108805&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/AliasDebugger.cpp (original) +++ llvm/trunk/lib/Analysis/AliasDebugger.cpp Mon Jul 19 22:06:07 2010 @@ -83,7 +83,7 @@ /// 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 StaticPassInfo *PI) { + virtual void *getAdjustedAnalysisPointer(const PassInfo *PI) { if (PI->isPassID(&AliasAnalysis::ID)) return (AliasAnalysis*)this; return this; Modified: llvm/trunk/lib/Analysis/BasicAliasAnalysis.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/BasicAliasAnalysis.cpp?rev=108805&r1=108804&r2=108805&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/BasicAliasAnalysis.cpp (original) +++ llvm/trunk/lib/Analysis/BasicAliasAnalysis.cpp Mon Jul 19 22:06:07 2010 @@ -172,7 +172,7 @@ /// 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 StaticPassInfo *PI) { + virtual void *getAdjustedAnalysisPointer(const PassInfo *PI) { if (PI->isPassID(&AliasAnalysis::ID)) return (AliasAnalysis*)this; return this; @@ -243,7 +243,7 @@ /// 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 StaticPassInfo *PI) { + virtual void *getAdjustedAnalysisPointer(const PassInfo *PI) { if (PI->isPassID(&AliasAnalysis::ID)) return (AliasAnalysis*)this; return this; Modified: llvm/trunk/lib/Analysis/IPA/CallGraph.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/IPA/CallGraph.cpp?rev=108805&r1=108804&r2=108805&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/IPA/CallGraph.cpp (original) +++ llvm/trunk/lib/Analysis/IPA/CallGraph.cpp Mon Jul 19 22:06:07 2010 @@ -86,7 +86,7 @@ /// 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 StaticPassInfo *PI) { + virtual void *getAdjustedAnalysisPointer(const PassInfo *PI) { if (PI->isPassID(&CallGraph::ID)) return (CallGraph*)this; return this; Modified: llvm/trunk/lib/Analysis/IPA/GlobalsModRef.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/IPA/GlobalsModRef.cpp?rev=108805&r1=108804&r2=108805&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/IPA/GlobalsModRef.cpp (original) +++ llvm/trunk/lib/Analysis/IPA/GlobalsModRef.cpp Mon Jul 19 22:06:07 2010 @@ -149,7 +149,7 @@ /// 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 StaticPassInfo *PI) { + virtual void *getAdjustedAnalysisPointer(const PassInfo *PI) { if (PI->isPassID(&AliasAnalysis::ID)) return (AliasAnalysis*)this; return this; Modified: llvm/trunk/lib/Analysis/ProfileEstimatorPass.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ProfileEstimatorPass.cpp?rev=108805&r1=108804&r2=108805&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/ProfileEstimatorPass.cpp (original) +++ llvm/trunk/lib/Analysis/ProfileEstimatorPass.cpp Mon Jul 19 22:06:07 2010 @@ -59,7 +59,7 @@ /// 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 StaticPassInfo *PI) { + virtual void *getAdjustedAnalysisPointer(const PassInfo *PI) { if (PI->isPassID(&ProfileInfo::ID)) return (ProfileInfo*)this; return this; Modified: llvm/trunk/lib/Analysis/ProfileInfoLoaderPass.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ProfileInfoLoaderPass.cpp?rev=108805&r1=108804&r2=108805&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/ProfileInfoLoaderPass.cpp (original) +++ llvm/trunk/lib/Analysis/ProfileInfoLoaderPass.cpp Mon Jul 19 22:06:07 2010 @@ -67,7 +67,7 @@ /// 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 StaticPassInfo *PI) { + virtual void *getAdjustedAnalysisPointer(const PassInfo *PI) { if (PI->isPassID(&ProfileInfo::ID)) return (ProfileInfo*)this; return this; Modified: llvm/trunk/lib/Analysis/ScalarEvolutionAliasAnalysis.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ScalarEvolutionAliasAnalysis.cpp?rev=108805&r1=108804&r2=108805&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/ScalarEvolutionAliasAnalysis.cpp (original) +++ llvm/trunk/lib/Analysis/ScalarEvolutionAliasAnalysis.cpp Mon Jul 19 22:06:07 2010 @@ -40,7 +40,7 @@ /// 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 StaticPassInfo *PI) { + virtual void *getAdjustedAnalysisPointer(const PassInfo *PI) { if (PI->isPassID(&AliasAnalysis::ID)) return (AliasAnalysis*)this; return this; Modified: llvm/trunk/lib/VMCore/Pass.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Pass.cpp?rev=108805&r1=108804&r2=108805&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/Pass.cpp (original) +++ llvm/trunk/lib/VMCore/Pass.cpp Mon Jul 19 22:06:07 2010 @@ -75,7 +75,7 @@ /// Registration templates, but can be overloaded directly. /// const char *Pass::getPassName() const { - if (const StaticPassInfo *PI = getPassInfo()) + if (const PassInfo *PI = getPassInfo()) return PI->getPassName(); return "Unnamed pass: implement Pass::getPassName()"; } @@ -101,7 +101,7 @@ // By default, don't do anything. } -void *Pass::getAdjustedAnalysisPointer(const StaticPassInfo *) { +void *Pass::getAdjustedAnalysisPointer(const PassInfo *) { return this; } @@ -243,35 +243,35 @@ /// PassInfoMap - Keep track of the passinfo object for each registered llvm /// pass. - typedef std::map MapType; + typedef std::map MapType; MapType PassInfoMap; - typedef StringMap StringMapType; + typedef StringMap StringMapType; StringMapType PassInfoStringMap; /// AnalysisGroupInfo - Keep track of information for each analysis group. struct AnalysisGroupInfo { - std::set Implementations; + std::set Implementations; }; /// AnalysisGroupInfoMap - Information for each analysis group. - std::map AnalysisGroupInfoMap; + std::map AnalysisGroupInfoMap; public: - const StaticPassInfo *GetPassInfo(intptr_t TI) const { + const PassInfo *GetPassInfo(intptr_t TI) const { sys::SmartScopedLock Guard(Lock); MapType::const_iterator I = PassInfoMap.find(TI); return I != PassInfoMap.end() ? I->second : 0; } - const StaticPassInfo *GetPassInfo(StringRef Arg) const { + const PassInfo *GetPassInfo(StringRef Arg) const { sys::SmartScopedLock Guard(Lock); StringMapType::const_iterator I = PassInfoStringMap.find(Arg); return I != PassInfoStringMap.end() ? I->second : 0; } - void RegisterPass(const StaticPassInfo &PI) { + void RegisterPass(const PassInfo &PI) { sys::SmartScopedLock Guard(Lock); bool Inserted = PassInfoMap.insert(std::make_pair(PI.getTypeInfo(),&PI)).second; @@ -279,7 +279,7 @@ PassInfoStringMap[PI.getPassArgument()] = &PI; } - void UnregisterPass(const StaticPassInfo &PI) { + void UnregisterPass(const PassInfo &PI) { sys::SmartScopedLock Guard(Lock); MapType::iterator I = PassInfoMap.find(PI.getTypeInfo()); assert(I != PassInfoMap.end() && "Pass registered but not in map!"); @@ -298,8 +298,8 @@ /// Analysis Group Mechanisms. - void RegisterAnalysisGroup(StaticPassInfo *InterfaceInfo, - const StaticPassInfo *ImplementationInfo, + void RegisterAnalysisGroup(PassInfo *InterfaceInfo, + const PassInfo *ImplementationInfo, bool isDefault) { sys::SmartScopedLock Guard(Lock); AnalysisGroupInfo &AGI = AnalysisGroupInfoMap[InterfaceInfo]; @@ -363,15 +363,15 @@ // getPassInfo - Return the PassInfo data structure that corresponds to this // pass... -const StaticPassInfo *Pass::getPassInfo() const { +const PassInfo *Pass::getPassInfo() const { return lookupPassInfo(PassID); } -const StaticPassInfo *Pass::lookupPassInfo(intptr_t TI) { +const PassInfo *Pass::lookupPassInfo(intptr_t TI) { return getPassRegistrar()->GetPassInfo(TI); } -const StaticPassInfo *Pass::lookupPassInfo(StringRef Arg) { +const PassInfo *Pass::lookupPassInfo(StringRef Arg) { return getPassRegistrar()->GetPassInfo(Arg); } @@ -390,7 +390,7 @@ getPassRegistrar()->UnregisterPass(*this); } -Pass *StaticPassInfo::createPass() const { +Pass *PassInfo::createPass() const { assert((!isAnalysisGroup() || NormalCtor) && "No default implementation found for analysis group!"); assert(NormalCtor && @@ -408,8 +408,8 @@ intptr_t PassID, bool isDefault) : PassInfo(Name, InterfaceID) { - StaticPassInfo *InterfaceInfo = - const_cast(Pass::lookupPassInfo(InterfaceID)); + PassInfo *InterfaceInfo = + const_cast(Pass::lookupPassInfo(InterfaceID)); if (InterfaceInfo == 0) { // First reference to Interface, register it now. registerPass(); @@ -419,13 +419,13 @@ "Trying to join an analysis group that is a normal pass!"); if (PassID) { - const StaticPassInfo *ImplementationInfo = Pass::lookupPassInfo(PassID); + const PassInfo *ImplementationInfo = Pass::lookupPassInfo(PassID); assert(ImplementationInfo && "Must register pass before adding to AnalysisGroup!"); // Make sure we keep track of the fact that the implementation implements // the interface. - StaticPassInfo *IIPI = const_cast(ImplementationInfo); + PassInfo *IIPI = const_cast(ImplementationInfo); IIPI->addInterfaceImplemented(InterfaceInfo); getPassRegistrar()->RegisterAnalysisGroup(InterfaceInfo, IIPI, isDefault); @@ -479,7 +479,7 @@ VectorType &CFGOnlyList; GetCFGOnlyPasses(VectorType &L) : CFGOnlyList(L) {} - void passEnumerate(const StaticPassInfo *P) { + void passEnumerate(const PassInfo *P) { if (P->isCFGOnlyPass()) CFGOnlyList.push_back(P); } Modified: llvm/trunk/lib/VMCore/PassManager.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/PassManager.cpp?rev=108805&r1=108804&r2=108805&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/PassManager.cpp (original) +++ llvm/trunk/lib/VMCore/PassManager.cpp Mon Jul 19 22:06:07 2010 @@ -332,8 +332,7 @@ /// Return function pass corresponding to PassInfo PI, that is /// required by module pass MP. Instantiate analysis pass, by using /// its runOnFunction() for function F. - virtual Pass* getOnTheFlyPass(Pass *MP, const StaticPassInfo *PI, - Function &F); + virtual Pass* getOnTheFlyPass(Pass *MP, const PassInfo *PI, Function &F); virtual const char *getPassName() const { return "Module Pass Manager"; @@ -633,7 +632,7 @@ for (SmallVector::iterator I = ImmutablePasses.begin(), E = ImmutablePasses.end(); P == NULL && I != E; ++I) { - const StaticPassInfo *PI = (*I)->getPassInfo(); + const PassInfo *PI = (*I)->getPassInfo(); if (PI == AID) P = *I; @@ -729,7 +728,7 @@ /// Augement AvailableAnalysis by adding analysis made available by pass P. void PMDataManager::recordAvailableAnalysis(Pass *P) { - const StaticPassInfo *PI = P->getPassInfo(); + const PassInfo *PI = P->getPassInfo(); if (PI == 0) return; AvailableAnalysis[PI] = P; @@ -868,7 +867,7 @@ P->releaseMemory(); } - if (const StaticPassInfo *PI = P->getPassInfo()) { + if (const PassInfo *PI = P->getPassInfo()) { // Remove the pass itself (if it is not already removed). AvailableAnalysis.erase(PI); @@ -1052,7 +1051,7 @@ if (PMDataManager *PMD = (*I)->getAsPMDataManager()) PMD->dumpPassArguments(); else - if (const StaticPassInfo *PI = (*I)->getPassInfo()) + if (const PassInfo *PI = (*I)->getPassInfo()) if (!PI->isAnalysisGroup()) dbgs() << " -" << PI->getPassArgument(); } @@ -1155,8 +1154,7 @@ llvm_unreachable("Unable to schedule pass"); } -Pass *PMDataManager::getOnTheFlyPass(Pass *P, const StaticPassInfo *PI, - Function &F) { +Pass *PMDataManager::getOnTheFlyPass(Pass *P, const PassInfo *PI, Function &F) { assert(0 && "Unable to find on the fly pass"); return NULL; } @@ -1175,7 +1173,7 @@ return PM.findAnalysisPass(ID, dir); } -Pass *AnalysisResolver::findImplPass(Pass *P, const StaticPassInfo *AnalysisPI, +Pass *AnalysisResolver::findImplPass(Pass *P, const PassInfo *AnalysisPI, Function &F) { return PM.getOnTheFlyPass(P, AnalysisPI, F); } @@ -1570,8 +1568,7 @@ /// Return function pass corresponding to PassInfo PI, that is /// required by module pass MP. Instantiate analysis pass, by using /// its runOnFunction() for function F. -Pass* MPPassManager::getOnTheFlyPass(Pass *MP, const StaticPassInfo *PI, - Function &F){ +Pass* MPPassManager::getOnTheFlyPass(Pass *MP, const PassInfo *PI, Function &F){ FunctionPassManagerImpl *FPP = OnTheFlyManagers[MP]; assert(FPP && "Unable to find on the fly pass"); Modified: llvm/trunk/tools/bugpoint/BugDriver.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/bugpoint/BugDriver.cpp?rev=108805&r1=108804&r2=108805&view=diff ============================================================================== --- llvm/trunk/tools/bugpoint/BugDriver.cpp (original) +++ llvm/trunk/tools/bugpoint/BugDriver.cpp Mon Jul 19 22:06:07 2010 @@ -56,8 +56,7 @@ /// getPassesString - Turn a list of passes into a string which indicates the /// command line options that must be passed to add the passes. /// -std::string -llvm::getPassesString(const std::vector &Passes) { +std::string llvm::getPassesString(const std::vector &Passes) { std::string Result; for (unsigned i = 0, e = Passes.size(); i != e; ++i) { if (i) Result += " "; Modified: llvm/trunk/tools/bugpoint/BugDriver.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/bugpoint/BugDriver.h?rev=108805&r1=108804&r2=108805&view=diff ============================================================================== --- llvm/trunk/tools/bugpoint/BugDriver.h (original) +++ llvm/trunk/tools/bugpoint/BugDriver.h Mon Jul 19 22:06:07 2010 @@ -23,7 +23,7 @@ namespace llvm { class Value; -class StaticPassInfo; +class PassInfo; class Module; class GlobalVariable; class Function; @@ -47,7 +47,7 @@ const char *ToolName; // argv[0] of bugpoint std::string ReferenceOutputFile; // Name of `good' output file Module *Program; // The raw program, linked together - std::vector PassesToRun; + std::vector PassesToRun; AbstractInterpreter *Interpreter; // How to run the program AbstractInterpreter *SafeInterpreter; // To generate reference output, etc. GCC *gcc; @@ -77,10 +77,10 @@ bool addSources(const std::vector &FileNames); template void addPasses(It I, It E) { PassesToRun.insert(PassesToRun.end(), I, E); } - void setPassesToRun(const std::vector &PTR) { + void setPassesToRun(const std::vector &PTR) { PassesToRun = PTR; } - const std::vector &getPassesToRun() const { + const std::vector &getPassesToRun() const { return PassesToRun; } @@ -112,7 +112,7 @@ /// ReferenceOutput contains the filename of the file containing the output we /// are to match. /// - bool debugPassMiscompilation(const StaticPassInfo *ThePass, + bool debugPassMiscompilation(const PassInfo *ThePass, const std::string &ReferenceOutput); /// compileSharedObject - This method creates a SharedObject from a given @@ -243,8 +243,7 @@ /// failure. If AutoDebugCrashes is set to true, then bugpoint will /// automatically attempt to track down a crashing pass if one exists, and /// this method will never return null. - Module *runPassesOn(Module *M, - const std::vector &Passes, + Module *runPassesOn(Module *M, const std::vector &Passes, bool AutoDebugCrashes = false, unsigned NumExtraArgs = 0, const char * const *ExtraArgs = NULL); @@ -257,7 +256,7 @@ /// or failed, unless Quiet is set. ExtraArgs specifies additional arguments /// to pass to the child bugpoint instance. /// - bool runPasses(const std::vector &PassesToRun, + bool runPasses(const std::vector &PassesToRun, std::string &OutputFilename, bool DeleteOutput = false, bool Quiet = false, unsigned NumExtraArgs = 0, const char * const *ExtraArgs = NULL) const; @@ -269,7 +268,7 @@ /// If the passes did not compile correctly, output the command required to /// recreate the failure. This returns true if a compiler error is found. /// - bool runManyPasses(const std::vector &AllPasses, + bool runManyPasses(const std::vector &AllPasses, std::string &ErrMsg); /// writeProgramToFile - This writes the current "Program" to the named @@ -282,14 +281,14 @@ /// false indicating whether or not the optimizer crashed on the specified /// input (true = crashed). /// - bool runPasses(const std::vector &PassesToRun, + bool runPasses(const std::vector &PassesToRun, bool DeleteOutput = true) const { std::string Filename; return runPasses(PassesToRun, Filename, DeleteOutput); } /// runAsChild - The actual "runPasses" guts that runs in a child process. - int runPassesAsChild(const std::vector &PassesToRun); + int runPassesAsChild(const std::vector &PassesToRun); /// initializeExecutionEnvironment - This method is used to set up the /// environment for executing LLVM programs. @@ -307,7 +306,7 @@ /// getPassesString - Turn a list of passes into a string which indicates the /// command line options that must be passed to add the passes. /// -std::string getPassesString(const std::vector &Passes); +std::string getPassesString(const std::vector &Passes); /// PrintFunctionList - prints out list of problematic functions /// Modified: llvm/trunk/tools/bugpoint/CrashDebugger.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/bugpoint/CrashDebugger.cpp?rev=108805&r1=108804&r2=108805&view=diff ============================================================================== --- llvm/trunk/tools/bugpoint/CrashDebugger.cpp (original) +++ llvm/trunk/tools/bugpoint/CrashDebugger.cpp Mon Jul 19 22:06:07 2010 @@ -43,7 +43,7 @@ } namespace llvm { - class ReducePassList : public ListReducer { + class ReducePassList : public ListReducer { BugDriver &BD; public: ReducePassList(BugDriver &bd) : BD(bd) {} @@ -52,15 +52,15 @@ // running the "Kept" passes fail when run on the output of the "removed" // passes. If we return true, we update the current module of bugpoint. // - virtual TestResult doTest(std::vector &Removed, - std::vector &Kept, + virtual TestResult doTest(std::vector &Removed, + std::vector &Kept, std::string &Error); }; } ReducePassList::TestResult -ReducePassList::doTest(std::vector &Prefix, - std::vector &Suffix, +ReducePassList::doTest(std::vector &Prefix, + std::vector &Suffix, std::string &Error) { sys::Path PrefixOutput; Module *OrigProgram = 0; Modified: llvm/trunk/tools/bugpoint/ExtractFunction.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/bugpoint/ExtractFunction.cpp?rev=108805&r1=108804&r2=108805&view=diff ============================================================================== --- llvm/trunk/tools/bugpoint/ExtractFunction.cpp (original) +++ llvm/trunk/tools/bugpoint/ExtractFunction.cpp Mon Jul 19 22:06:07 2010 @@ -99,8 +99,8 @@ return Result; } -static const StaticPassInfo *getPI(Pass *P) { - const StaticPassInfo *PI = P->getPassInfo(); +static const PassInfo *getPI(Pass *P) { + const PassInfo *PI = P->getPassInfo(); delete P; return PI; } @@ -114,7 +114,7 @@ for (Module::iterator I = M->begin(), E = M->end(); I != E; ++I) I->setLinkage(GlobalValue::ExternalLinkage); - std::vector CleanupPasses; + std::vector CleanupPasses; CleanupPasses.push_back(getPI(createGlobalDCEPass())); if (MayModifySemantics) @@ -138,7 +138,7 @@ /// function. This returns null if there are no extractable loops in the /// program or if the loop extractor crashes. Module *BugDriver::ExtractLoop(Module *M) { - std::vector LoopExtractPasses; + std::vector LoopExtractPasses; LoopExtractPasses.push_back(getPI(createSingleLoopExtractorPass())); Module *NewM = runPassesOn(M, LoopExtractPasses); @@ -359,7 +359,7 @@ std::string uniqueFN = "--extract-blocks-file=" + uniqueFilename.str(); const char *ExtraArg = uniqueFN.c_str(); - std::vector PI; + std::vector PI; std::vector EmptyBBs; // This parameter is ignored. PI.push_back(getPI(createBlockExtractorPass(EmptyBBs))); Module *Ret = runPassesOn(M, PI, false, 1, &ExtraArg); Modified: llvm/trunk/tools/bugpoint/FindBugs.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/bugpoint/FindBugs.cpp?rev=108805&r1=108804&r2=108805&view=diff ============================================================================== --- llvm/trunk/tools/bugpoint/FindBugs.cpp (original) +++ llvm/trunk/tools/bugpoint/FindBugs.cpp Mon Jul 19 22:06:07 2010 @@ -29,8 +29,7 @@ /// If the passes did not compile correctly, output the command required to /// recreate the failure. This returns true if a compiler error is found. /// -bool -BugDriver::runManyPasses(const std::vector &AllPasses, +bool BugDriver::runManyPasses(const std::vector &AllPasses, std::string &ErrMsg) { setPassesToRun(AllPasses); outs() << "Starting bug finding procedure...\n\n"; Modified: llvm/trunk/tools/bugpoint/Miscompilation.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/bugpoint/Miscompilation.cpp?rev=108805&r1=108804&r2=108805&view=diff ============================================================================== --- llvm/trunk/tools/bugpoint/Miscompilation.cpp (original) +++ llvm/trunk/tools/bugpoint/Miscompilation.cpp Mon Jul 19 22:06:07 2010 @@ -43,13 +43,13 @@ cl::desc("Don't extract blocks when searching for miscompilations"), cl::init(false)); - class ReduceMiscompilingPasses : public ListReducer { + class ReduceMiscompilingPasses : public ListReducer { BugDriver &BD; public: ReduceMiscompilingPasses(BugDriver &bd) : BD(bd) {} - virtual TestResult doTest(std::vector &Prefix, - std::vector &Suffix, + virtual TestResult doTest(std::vector &Prefix, + std::vector &Suffix, std::string &Error); }; } @@ -58,8 +58,8 @@ /// group, see if they still break the program. /// ReduceMiscompilingPasses::TestResult -ReduceMiscompilingPasses::doTest(std::vector &Prefix, - std::vector &Suffix, +ReduceMiscompilingPasses::doTest(std::vector &Prefix, + std::vector &Suffix, std::string &Error) { // First, run the program with just the Suffix passes. If it is still broken // with JUST the kept passes, discard the prefix passes. Modified: llvm/trunk/tools/bugpoint/OptimizerDriver.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/bugpoint/OptimizerDriver.cpp?rev=108805&r1=108804&r2=108805&view=diff ============================================================================== --- llvm/trunk/tools/bugpoint/OptimizerDriver.cpp (original) +++ llvm/trunk/tools/bugpoint/OptimizerDriver.cpp Mon Jul 19 22:06:07 2010 @@ -83,7 +83,7 @@ outs() << getPassesString(PassesToRun) << "\n"; } -int BugDriver::runPassesAsChild(const std::vector &Passes) { +int BugDriver::runPassesAsChild(const std::vector &Passes) { std::string ErrInfo; raw_fd_ostream OutFile(ChildOutput.c_str(), ErrInfo, raw_fd_ostream::F_Binary); @@ -124,7 +124,7 @@ /// outs() a single line message indicating whether compilation was successful /// or failed. /// -bool BugDriver::runPasses(const std::vector &Passes, +bool BugDriver::runPasses(const std::vector &Passes, std::string &OutputFilename, bool DeleteOutput, bool Quiet, unsigned NumExtraArgs, const char * const *ExtraArgs) const { @@ -178,7 +178,7 @@ pass_args.push_back( std::string("-load")); pass_args.push_back( PluginLoader::getPlugin(i)); } - for (std::vector::const_iterator I = Passes.begin(), + for (std::vector::const_iterator I = Passes.begin(), E = Passes.end(); I != E; ++I ) pass_args.push_back( std::string("-") + (*I)->getPassArgument() ); for (std::vector::const_iterator I = pass_args.begin(), @@ -235,7 +235,7 @@ /// module, returning the transformed module on success, or a null pointer on /// failure. Module *BugDriver::runPassesOn(Module *M, - const std::vector &Passes, + const std::vector &Passes, bool AutoDebugCrashes, unsigned NumExtraArgs, const char * const *ExtraArgs) { Module *OldProgram = swapProgramIn(M); Modified: llvm/trunk/tools/bugpoint/bugpoint.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/bugpoint/bugpoint.cpp?rev=108805&r1=108804&r2=108805&view=diff ============================================================================== --- llvm/trunk/tools/bugpoint/bugpoint.cpp (original) +++ llvm/trunk/tools/bugpoint/bugpoint.cpp Mon Jul 19 22:06:07 2010 @@ -61,7 +61,7 @@ // The AnalysesList is automatically populated with registered Passes by the // PassNameParser. // -static cl::list +static cl::list PassList(cl::desc("Passes available:"), cl::ZeroOrMore); static cl::opt @@ -90,7 +90,7 @@ AddToDriver(BugDriver &_D) : D(_D) {} virtual void add(Pass *P) { - const StaticPassInfo *PI = P->getPassInfo(); + const PassInfo *PI = P->getPassInfo(); D.addPasses(&PI, &PI + 1); } }; From nicholas at mxc.ca Mon Jul 19 23:10:15 2010 From: nicholas at mxc.ca (Nick Lewycky) Date: Mon, 19 Jul 2010 21:10:15 -0700 Subject: [llvm-commits] [poolalloc] r108710 - /poolalloc/trunk/test/dsa/regression/2010-07-12-SCCLeader.ll In-Reply-To: <20100719170512.AAE1A2A6C12C@llvm.org> References: <20100719170512.AAE1A2A6C12C@llvm.org> Message-ID: <4C4521A7.1010002@mxc.ca> Will Dietz wrote: > Author: wdietz2 > Date: Mon Jul 19 12:05:12 2010 > New Revision: 108710 > > URL: http://llvm.org/viewvc/llvm-project?rev=108710&view=rev > Log: > Added test that triggers the SCC Leader failing assertion. > This is bug #7630. This testcase is huge. Do you really need all those dead globals, functions and types? Please trim this down. Nick > Added: > poolalloc/trunk/test/dsa/regression/2010-07-12-SCCLeader.ll > > Added: poolalloc/trunk/test/dsa/regression/2010-07-12-SCCLeader.ll > URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/test/dsa/regression/2010-07-12-SCCLeader.ll?rev=108710&view=auto > ============================================================================== > --- poolalloc/trunk/test/dsa/regression/2010-07-12-SCCLeader.ll (added) > +++ poolalloc/trunk/test/dsa/regression/2010-07-12-SCCLeader.ll Mon Jul 19 12:05:12 2010 > @@ -0,0 +1,3553 @@ > +;RUN: dsaopt %s -dsa-eq -disable-output > +; ModuleID = 'bugpoint-reduced-simplified.bc' > +target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64" > +target triple = "x86_64-unknown-linux-gnu" > + > +%0 = type { %struct._IO_FILE*, %struct._IO_FILE*, [8192 x i8] } > +%struct.TypCollectors = type { i8*, void (%struct.TypHeader*, i64)*, i32 (i64*, %struct.TypHeader*)* } > +%struct.TypHeader = type { i64, %struct.TypHeader**, [3 x i8], i8 } > +%struct.TypInputFile = type { i64, [64 x i8], [256 x i8], i8*, i64 } > +%struct.TypOutputFile = type { i64, [256 x i8], i64, i64, i64, i64 } > +%struct._IO_FILE = type { i32, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, %struct._IO_marker*, %struct._IO_FILE*, i32, i32, i64, i16, i8, [1 x i8], i8*, i64, i8*, i8*, i8*, i8*, i64, i32, [20 x i8] } > +%struct._IO_marker = type { %struct._IO_marker*, %struct._IO_FILE*, i32 } > +%struct.__jmp_buf_tag = type { [8 x i64], i32, %struct.__sigset_t } > +%struct.__sigset_t = type { [16 x i64] } > +%struct.anon = type { i64, i64, [4 x i8] } > +%struct.termio = type { i16, i16, i16, i16, i8, [8 x i8] } > +%struct.tms = type { i64, i64, i64, i64 } > + > + at Collectors = external constant [6 x %struct.TypCollectors], align 32 ;<[6 x %struct.TypCollectors]*> [#uses=0] > + at CSeries = external global i64* ; [#uses=0] > + at Class = external global i16 ; [#uses=0] > + at CWeights = external global i64* ; [#uses=0] > + at ug = external global i16 ; [#uses=0] > + at cg = external global i16 ; [#uses=0] > + at g = external global i64* ; [#uses=0] > + at ce = external global i64 ; [#uses=0] > + at Commutators = external global %struct.TypHeader** ;<%struct.TypHeader***> [#uses=0] > + at GenStk = external global i16* ; [#uses=0] > + at ExpStk = external global i64* ; [#uses=0] > + at StrStk = external global i16** ; [#uses=0] > + at Sp = external global i64 ; [#uses=0] > + at StkDim = external global i64 ; [#uses=0] > + at ue = external global i64 ; [#uses=0] > + at LastClass = external global i16 ; [#uses=0] > + at Powers = external global %struct.TypHeader** ;<%struct.TypHeader***> [#uses=0] > + at NrGens = external global i64 ; [#uses=0] > + at Prime = external global i64 ; [#uses=0] > + at HdRnAvec = external global %struct.TypHeader* ;<%struct.TypHeader**> [#uses=0] > + at .str = external constant [7 x i8], align 1 ;<[7 x i8]*> [#uses=0] > + at .str1 = external constant [11 x i8], align 1 ;<[11 x i8]*> [#uses=0] > + at .str2 = external constant [9 x i8], align 1 ;<[9 x i8]*> [#uses=0] > + at .str3 = external constant [6 x i8], align 1 ;<[6 x i8]*> [#uses=0] > + at .str4 = external constant [7 x i8], align 1 ;<[7 x i8]*> [#uses=0] > + at .str5 = external constant [8 x i8], align 1 ;<[8 x i8]*> [#uses=0] > + at .str6 = external constant [12 x i8], align 1 ;<[12 x i8]*> [#uses=0] > + at .str7 = external constant [10 x i8], align 1 ;<[10 x i8]*> [#uses=0] > + at .str8 = external constant [17 x i8], align 1 ;<[17 x i8]*> [#uses=0] > + at .str9 = external constant [14 x i8], align 1 ;<[14 x i8]*> [#uses=0] > + at .str10 = external constant [17 x i8], align 1 ;<[17 x i8]*> [#uses=0] > + at .str11 = external constant [62 x i8], align 8 ;<[62 x i8]*> [#uses=0] > + at .str12 = external constant [7 x i8], align 1 ;<[7 x i8]*> [#uses=0] > + at HdCallOop2 = external global %struct.TypHeader* ;<%struct.TypHeader**> [#uses=0] > + at HdCallOop1 = external global %struct.TypHeader* ;<%struct.TypHeader**> [#uses=0] > + at .str13 = external constant [43 x i8], align 8 ;<[43 x i8]*> [#uses=0] > + at .str14 = external constant [40 x i8], align 8 ;<[40 x i8]*> [#uses=0] > + at .str15 = external constant [43 x i8], align 8 ;<[43 x i8]*> [#uses=0] > + at .str16 = external constant [42 x i8], align 8 ;<[42 x i8]*> [#uses=0] > + at .str17 = external constant [40 x i8], align 8 ;<[40 x i8]*> [#uses=0] > + at .str18 = external constant [41 x i8], align 8 ;<[41 x i8]*> [#uses=0] > + at .str19 = external constant [41 x i8], align 8 ;<[41 x i8]*> [#uses=0] > + at .str20 = external constant [35 x i8], align 8 ;<[35 x i8]*> [#uses=0] > + at .str21 = external constant [35 x i8], align 8 ;<[35 x i8]*> [#uses=0] > + at .str22 = external constant [28 x i8], align 1 ;<[28 x i8]*> [#uses=0] > + at .str23 = external constant [21 x i8], align 1 ;<[21 x i8]*> [#uses=0] > + at .str24 = external constant [22 x i8], align 1 ;<[22 x i8]*> [#uses=0] > + at .str25 = external constant [26 x i8], align 1 ;<[26 x i8]*> [#uses=0] > + at .str26 = external constant [18 x i8], align 1 ;<[18 x i8]*> [#uses=0] > + at .str27 = external constant [11 x i8], align 1 ;<[11 x i8]*> [#uses=0] > + at .str28 = external constant [31 x i8], align 8 ;<[31 x i8]*> [#uses=0] > + at .str29 = external constant [35 x i8], align 8 ;<[35 x i8]*> [#uses=0] > + at .str30 = external constant [29 x i8], align 1 ;<[29 x i8]*> [#uses=0] > + at .str31 = external constant [27 x i8], align 1 ;<[27 x i8]*> [#uses=0] > + at .str32 = external constant [14 x i8], align 1 ;<[14 x i8]*> [#uses=0] > + at .str33 = external constant [15 x i8], align 1 ;<[15 x i8]*> [#uses=0] > + at .str34 = external constant [43 x i8], align 8 ;<[43 x i8]*> [#uses=0] > + at .str35 = external constant [40 x i8], align 8 ;<[40 x i8]*> [#uses=0] > + at .str36 = external constant [10 x i8], align 1 ;<[10 x i8]*> [#uses=0] > + at .str37 = external constant [49 x i8], align 8 ;<[49 x i8]*> [#uses=0] > + at .str38 = external constant [50 x i8], align 8 ;<[50 x i8]*> [#uses=0] > + at .str39 = external constant [42 x i8], align 8 ;<[42 x i8]*> [#uses=0] > + at .str40 = external constant [45 x i8], align 8 ;<[45 x i8]*> [#uses=0] > + at .str41 = external constant [32 x i8], align 8 ;<[32 x i8]*> [#uses=0] > + at .str42 = external constant [48 x i8], align 8 ;<[48 x i8]*> [#uses=0] > + at .str43 = external constant [11 x i8], align 1 ;<[11 x i8]*> [#uses=0] > + at .str44 = external constant [47 x i8], align 8 ;<[47 x i8]*> [#uses=0] > + at .str45 = external constant [49 x i8], align 8 ;<[49 x i8]*> [#uses=0] > + at .str46 = external constant [53 x i8], align 8 ;<[53 x i8]*> [#uses=0] > + at .str47 = external constant [9 x i8], align 1 ;<[9 x i8]*> [#uses=0] > + at .str48 = external constant [10 x i8], align 1 ;<[10 x i8]*> [#uses=0] > + at .str49 = external constant [33 x i8], align 8 ;<[33 x i8]*> [#uses=0] > + at .str50 = external constant [38 x i8], align 8 ;<[38 x i8]*> [#uses=0] > + at .str51 = external constant [36 x i8], align 8 ;<[36 x i8]*> [#uses=0] > + at .str52 = external constant [7 x i8], align 1 ;<[7 x i8]*> [#uses=0] > + at .str53 = external constant [7 x i8], align 1 ;<[7 x i8]*> [#uses=0] > + at .str54 = external constant [10 x i8], align 1 ;<[10 x i8]*> [#uses=0] > + at .str55 = external constant [11 x i8], align 1 ;<[11 x i8]*> [#uses=0] > + at .str56 = external constant [14 x i8], align 1 ;<[14 x i8]*> [#uses=0] > + at .str57 = external constant [51 x i8], align 8 ;<[51 x i8]*> [#uses=0] > + at .str58 = external constant [60 x i8], align 8 ;<[60 x i8]*> [#uses=0] > + at .str59 = external constant [47 x i8], align 8 ;<[47 x i8]*> [#uses=0] > + at .str60 = external constant [11 x i8], align 1 ;<[11 x i8]*> [#uses=0] > + at .str61 = external constant [11 x i8], align 1 ;<[11 x i8]*> [#uses=0] > + at .str62 = external constant [48 x i8], align 8 ;<[48 x i8]*> [#uses=0] > + at .str63 = external constant [57 x i8], align 8 ;<[57 x i8]*> [#uses=0] > + at .str64 = external constant [8 x i8], align 1 ;<[8 x i8]*> [#uses=0] > + at .str65 = external constant [10 x i8], align 1 ;<[10 x i8]*> [#uses=0] > + at .str166 = external constant [10 x i8], align 1 ;<[10 x i8]*> [#uses=0] > + at HdRnSumAgWord = external global %struct.TypHeader* ;<%struct.TypHeader**> [#uses=0] > + at .str267 = external constant [17 x i8], align 1 ;<[17 x i8]*> [#uses=0] > + at HdRnDifferenceAgWord = external global %struct.TypHeader* ;<%struct.TypHeader**> [#uses=0] > + at .str368 = external constant [6 x i8], align 1 ;<[6 x i8]*> [#uses=0] > + at HdRnDepth = external global %struct.TypHeader* ;<%struct.TypHeader**> [#uses=0] > + at .str469 = external constant [10 x i8], align 1 ;<[10 x i8]*> [#uses=0] > + at HdRnTailDepth = external global %struct.TypHeader* ;<%struct.TypHeader**> [#uses=0] > + at .str570 = external constant [14 x i8], align 1 ;<[14 x i8]*> [#uses=0] > + at HdRnCentralWeight = external global %struct.TypHeader* ;<%struct.TypHeader**> [#uses=0] > + at .str671 = external constant [16 x i8], align 1 ;<[16 x i8]*> [#uses=0] > + at HdRnLeadingExponent = external global %struct.TypHeader* ;<%struct.TypHeader**> [#uses=0] > + at .str772 = external constant [14 x i8], align 1 ;<[14 x i8]*> [#uses=0] > + at HdRnReducedAgWord = external global %struct.TypHeader* ;<%struct.TypHeader**> [#uses=0] > + at .str873 = external constant [14 x i8], align 1 ;<[14 x i8]*> [#uses=0] > + at HdRnRelativeOrder = external global %struct.TypHeader* ;<%struct.TypHeader**> [#uses=0] > + at .str974 = external constant [15 x i8], align 1 ;<[15 x i8]*> [#uses=0] > + at HdRnExponentAgWord = external global %struct.TypHeader* ;<%struct.TypHeader**> [#uses=0] > + at .str1075 = external constant [16 x i8], align 1 ;<[16 x i8]*> [#uses=0] > + at HdRnExponentsAgWord = external global %struct.TypHeader* ;<%struct.TypHeader**> [#uses=0] > + at .str1176 = external constant [18 x i8], align 1 ;<[18 x i8]*> [#uses=0] > + at HdRnInformationAgWord = external global %struct.TypHeader* ;<%struct.TypHeader**> [#uses=0] > + at .str1277 = external constant [19 x i8], align 1 ;<[19 x i8]*> [#uses=0] > + at HdRnIsCompatibleAgWord = external global %struct.TypHeader* ;<%struct.TypHeader**> [#uses=0] > + at .str1378 = external constant [13 x i8], align 1 ;<[13 x i8]*> [#uses=0] > + at HdRnNormalizeIgs = external global %struct.TypHeader* ;<%struct.TypHeader**> [#uses=0] > + at .str1479 = external constant [9 x i8], align 1 ;<[9 x i8]*> [#uses=0] > + at HdRnIsAgWord = external global %struct.TypHeader* ;<%struct.TypHeader**> [#uses=0] > + at .str1580 = external constant [5 x i8], align 1 ;<[5 x i8]*> [#uses=0] > + at .str1681 = external constant [12 x i8], align 1 ;<[12 x i8]*> [#uses=0] > + at .str1782 = external constant [16 x i8], align 1 ;<[16 x i8]*> [#uses=0] > + at .str1883 = external constant [20 x i8], align 1 ;<[20 x i8]*> [#uses=0] > + at .str1984 = external constant [22 x i8], align 1 ;<[22 x i8]*> [#uses=0] > + at .str2085 = external constant [20 x i8], align 1 ;<[20 x i8]*> [#uses=0] > + at .str2186 = external constant [10 x i8], align 1 ;<[10 x i8]*> [#uses=0] > + at .str2287 = external constant [13 x i8], align 1 ;<[13 x i8]*> [#uses=0] > + at .str2388 = external constant [14 x i8], align 1 ;<[14 x i8]*> [#uses=0] > + at .str2489 = external constant [14 x i8], align 1 ;<[14 x i8]*> [#uses=0] > + at .str2590 = external constant [10 x i8], align 1 ;<[10 x i8]*> [#uses=0] > + at .str2691 = external constant [17 x i8], align 1 ;<[17 x i8]*> [#uses=0] > + at HdCPL = external global %struct.TypHeader* ;<%struct.TypHeader**> [#uses=0] > + at HdCPC = external global %struct.TypHeader* ;<%struct.TypHeader**> [#uses=0] > + at HdCPS = external global %struct.TypHeader* ;<%struct.TypHeader**> [#uses=0] > + at .str2794 = external constant [19 x i8], align 1 ;<[19 x i8]*> [#uses=0] > + at .str2895 = external constant [3 x i8], align 1 ;<[3 x i8]*> [#uses=0] > + at .str2996 = external constant [14 x i8], align 1 ;<[14 x i8]*> [#uses=0] > + at .str3097 = external constant [13 x i8], align 1 ;<[13 x i8]*> [#uses=0] > + at .str3198 = external constant [9 x i8], align 1 ;<[9 x i8]*> [#uses=0] > + at .str3299 = external constant [9 x i8], align 1 ;<[9 x i8]*> [#uses=0] > + at .str33100 = external constant [9 x i8], align 1 ;<[9 x i8]*> [#uses=0] > + at .str34101 = external constant [13 x i8], align 1 ;<[13 x i8]*> [#uses=0] > + at .str35102 = external constant [12 x i8], align 1 ;<[12 x i8]*> [#uses=0] > + at .str36103 = external constant [9 x i8], align 1 ;<[9 x i8]*> [#uses=0] > + at .str37104 = external constant [5 x i8], align 1 ;<[5 x i8]*> [#uses=0] > + at .str38105 = external constant [4 x i8], align 1 ;<[4 x i8]*> [#uses=0] > + at .str39106 = external constant [4 x i8], align 1 ;<[4 x i8]*> [#uses=0] > + at .str40107 = external constant [3 x i8], align 1 ;<[3 x i8]*> [#uses=0] > + at .str41108 = external constant [41 x i8], align 8 ;<[41 x i8]*> [#uses=0] > + at RepTimes = external global i64 ; [#uses=0] > + at .str42109 = external constant [45 x i8], align 8 ;<[45 x i8]*> [#uses=0] > + at .str43110 = external constant [28 x i8], align 1 ;<[28 x i8]*> [#uses=0] > + at .str44111 = external constant [46 x i8], align 8 ;<[46 x i8]*> [#uses=0] > + at .str45112 = external constant [46 x i8], align 8 ;<[46 x i8]*> [#uses=0] > + at CallsProdAg = external global i64 ; [#uses=0] > + at TimeProdAg = external global i64 ; [#uses=0] > + at .str46113 = external constant [21 x i8], align 1 ;<[21 x i8]*> [#uses=0] > + at .str47114 = external constant [8 x i8], align 1 ;<[8 x i8]*> [#uses=0] > + at CallsQuoAg = external global i64 ; [#uses=0] > + at TimeQuoAg = external global i64 ; [#uses=0] > + at .str48115 = external constant [21 x i8], align 1 ;<[21 x i8]*> [#uses=0] > + at CallsPowAgI = external global i64 ; [#uses=0] > + at TimePowAgI = external global i64 ; [#uses=0] > + at .str49116 = external constant [21 x i8], align 1 ;<[21 x i8]*> [#uses=0] > + at CallsPowAgAg = external global i64 ; [#uses=0] > + at TimePowAgAg = external global i64 ; [#uses=0] > + at .str50117 = external constant [21 x i8], align 1 ;<[21 x i8]*> [#uses=0] > + at CallsModAg = external global i64 ; [#uses=0] > + at TimeModAg = external global i64 ; [#uses=0] > + at .str51118 = external constant [21 x i8], align 1 ;<[21 x i8]*> [#uses=0] > + at CallsCommAg = external global i64 ; [#uses=0] > + at TimeCommAg = external global i64 ; [#uses=0] > + at .str52119 = external constant [21 x i8], align 1 ;<[21 x i8]*> [#uses=0] > + at CallsLtAg = external global i64 ; [#uses=0] > + at TimeLtAg = external global i64 ; [#uses=0] > + at .str53120 = external constant [21 x i8], align 1 ;<[21 x i8]*> [#uses=0] > + at CallsEqAg = external global i64 ; [#uses=0] > + at TimeEqAg = external global i64 ; [#uses=0] > + at .str54121 = external constant [21 x i8], align 1 ;<[21 x i8]*> [#uses=0] > + at CallsSumAg = external global i64 ; [#uses=0] > + at TimeSumAg = external global i64 ; [#uses=0] > + at .str55122 = external constant [21 x i8], align 1 ;<[21 x i8]*> [#uses=0] > + at CallsDiffAg = external global i64 ; [#uses=0] > + at TimeDiffAg = external global i64 ; [#uses=0] > + at .str56123 = external constant [21 x i8], align 1 ;<[21 x i8]*> [#uses=0] > + at .str57124 = external constant [40 x i8], align 8 ;<[40 x i8]*> [#uses=0] > + at .str58125 = external constant [28 x i8], align 1 ;<[28 x i8]*> [#uses=0] > + at .str59126 = external constant [25 x i8], align 1 ;<[25 x i8]*> [#uses=0] > + at .str60127 = external constant [39 x i8], align 8 ;<[39 x i8]*> [#uses=0] > + at .str61128 = external constant [28 x i8], align 1 ;<[28 x i8]*> [#uses=0] > + at .str62129 = external constant [26 x i8], align 1 ;<[26 x i8]*> [#uses=0] > + at .str63130 = external constant [41 x i8], align 8 ;<[41 x i8]*> [#uses=0] > + at .str64131 = external constant [4 x i8], align 1 ;<[4 x i8]*> [#uses=0] > + at .str65132 = external constant [2 x i8], align 1 ;<[2 x i8]*> [#uses=0] > + at .str66 = external constant [31 x i8], align 8 ;<[31 x i8]*> [#uses=0] > + at .str67 = external constant [37 x i8], align 8 ;<[37 x i8]*> [#uses=0] > + at .str68 = external constant [37 x i8], align 8 ;<[37 x i8]*> [#uses=0] > + at .str69 = external constant [12 x i8], align 1 ;<[12 x i8]*> [#uses=0] > + at .str70 = external constant [12 x i8], align 1 ;<[12 x i8]*> [#uses=0] > + at CPP.b = external global i1 ; [#uses=0] > + at .str71 = external constant [1 x i8], align 1 ;<[1 x i8]*> [#uses=0] > + at .str72 = external constant [3 x i8], align 1 ;<[3 x i8]*> [#uses=0] > + at CPN = external global i64 ; [#uses=0] > + at .str73 = external constant [39 x i8], align 8 ;<[39 x i8]*> [#uses=0] > + at .str74 = external constant [24 x i8], align 1 ;<[24 x i8]*> [#uses=0] > + at .str75 = external constant [23 x i8], align 1 ;<[23 x i8]*> [#uses=0] > + at .str76 = external constant [39 x i8], align 8 ;<[39 x i8]*> [#uses=0] > + at .str77 = external constant [30 x i8], align 1 ;<[30 x i8]*> [#uses=0] > + at .str78 = external constant [35 x i8], align 8 ;<[35 x i8]*> [#uses=0] > + at .str79 = external constant [40 x i8], align 8 ;<[40 x i8]*> [#uses=0] > + at .str80 = external constant [33 x i8], align 8 ;<[33 x i8]*> [#uses=0] > + at .str81 = external constant [47 x i8], align 8 ;<[47 x i8]*> [#uses=0] > + at .str82 = external constant [38 x i8], align 8 ;<[38 x i8]*> [#uses=0] > + at .str83 = external constant [45 x i8], align 8 ;<[45 x i8]*> [#uses=0] > + at .str84 = external constant [36 x i8], align 8 ;<[36 x i8]*> [#uses=0] > + at .str87 = external constant [32 x i8], align 8 ;<[32 x i8]*> [#uses=0] > + at .str89 = external constant [6 x i8], align 1 ;<[6 x i8]*> [#uses=0] > + at .str91 = external constant [36 x i8], align 8 ;<[36 x i8]*> [#uses=0] > + at .str93 = external constant [34 x i8], align 8 ;<[34 x i8]*> [#uses=0] > + at .str94 = external constant [28 x i8], align 1 ;<[28 x i8]*> [#uses=0] > + at .str95 = external constant [36 x i8], align 8 ;<[36 x i8]*> [#uses=0] > + at .str96 = external constant [30 x i8], align 1 ;<[30 x i8]*> [#uses=0] > + at .str97 = external constant [34 x i8], align 8 ;<[34 x i8]*> [#uses=0] > + at .str98 = external constant [46 x i8], align 8 ;<[46 x i8]*> [#uses=0] > + at .str99 = external constant [30 x i8], align 1 ;<[30 x i8]*> [#uses=0] > + at .str100 = external constant [26 x i8], align 1 ;<[26 x i8]*> [#uses=0] > + at .str101 = external constant [45 x i8], align 8 ;<[45 x i8]*> [#uses=0] > + at .str102 = external constant [50 x i8], align 8 ;<[50 x i8]*> [#uses=0] > + at .str103 = external constant [46 x i8], align 8 ;<[46 x i8]*> [#uses=0] > + at .str104 = external constant [29 x i8], align 1 ;<[29 x i8]*> [#uses=0] > + at .str105 = external constant [33 x i8], align 8 ;<[33 x i8]*> [#uses=0] > + at .str106 = external constant [30 x i8], align 1 ;<[30 x i8]*> [#uses=0] > + at .str107 = external constant [36 x i8], align 8 ;<[36 x i8]*> [#uses=0] > + at .str108 = external constant [44 x i8], align 8 ;<[44 x i8]*> [#uses=0] > + at .str109 = external constant [29 x i8], align 1 ;<[29 x i8]*> [#uses=0] > + at .str110 = external constant [34 x i8], align 8 ;<[34 x i8]*> [#uses=0] > + at .str111 = external constant [55 x i8], align 8 ;<[55 x i8]*> [#uses=0] > + at .str113 = external constant [33 x i8], align 8 ;<[33 x i8]*> [#uses=0] > + at .str114 = external constant [43 x i8], align 8 ;<[43 x i8]*> [#uses=0] > + at .str115 = external constant [41 x i8], align 8 ;<[41 x i8]*> [#uses=0] > + at .str116 = external constant [23 x i8], align 1 ;<[23 x i8]*> [#uses=0] > + at .str117 = external constant [12 x i8], align 1 ;<[12 x i8]*> [#uses=0] > + at .str118 = external constant [12 x i8], align 1 ;<[12 x i8]*> [#uses=0] > + at .str119 = external constant [22 x i8], align 1 ;<[22 x i8]*> [#uses=0] > + at .str120 = external constant [29 x i8], align 1 ;<[29 x i8]*> [#uses=0] > + at .str121 = external constant [35 x i8], align 8 ;<[35 x i8]*> [#uses=0] > + at .str122 = external constant [40 x i8], align 8 ;<[40 x i8]*> [#uses=0] > + at .str123 = external constant [29 x i8], align 1 ;<[29 x i8]*> [#uses=0] > + at .str124 = external constant [33 x i8], align 8 ;<[33 x i8]*> [#uses=0] > + at .str125 = external constant [41 x i8], align 8 ;<[41 x i8]*> [#uses=0] > + at .str137 = external constant [8 x i8], align 1 ;<[8 x i8]*> [#uses=0] > + at .str1138 = external constant [10 x i8], align 1 ;<[10 x i8]*> [#uses=0] > + at .str2139 = external constant [10 x i8], align 1 ;<[10 x i8]*> [#uses=0] > + at .str3140 = external constant [10 x i8], align 1 ;<[10 x i8]*> [#uses=0] > + at .str4141 = external constant [14 x i8], align 1 ;<[14 x i8]*> [#uses=0] > + at .str5142 = external constant [15 x i8], align 1 ;<[15 x i8]*> [#uses=0] > + at .str6143 = external constant [11 x i8], align 1 ;<[11 x i8]*> [#uses=0] > + at .str7144 = external constant [14 x i8], align 1 ;<[14 x i8]*> [#uses=0] > + at .str8145 = external constant [14 x i8], align 1 ;<[14 x i8]*> [#uses=0] > + at .str9146 = external constant [43 x i8], align 8 ;<[43 x i8]*> [#uses=0] > + at .str10147 = external constant [44 x i8], align 8 ;<[44 x i8]*> [#uses=0] > + at .str11148 = external constant [34 x i8], align 8 ;<[34 x i8]*> [#uses=0] > + at .str12149 = external constant [33 x i8], align 8 ;<[33 x i8]*> [#uses=0] > + at .str13150 = external constant [32 x i8], align 8 ;<[32 x i8]*> [#uses=0] > + at .str14151 = external constant [43 x i8], align 8 ;<[43 x i8]*> [#uses=0] > + at .str15152 = external constant [47 x i8], align 8 ;<[47 x i8]*> [#uses=0] > + at .str16153 = external constant [47 x i8], align 8 ;<[47 x i8]*> [#uses=0] > + at .str17154 = external constant [44 x i8], align 8 ;<[44 x i8]*> [#uses=0] > + at .str18155 = external constant [43 x i8], align 8 ;<[43 x i8]*> [#uses=0] > + at .str19156 = external constant [47 x i8], align 8 ;<[47 x i8]*> [#uses=0] > + at .str20157 = external constant [47 x i8], align 8 ;<[47 x i8]*> [#uses=0] > + at .str21158 = external constant [44 x i8], align 8 ;<[44 x i8]*> [#uses=0] > + at .str22159 = external constant [44 x i8], align 8 ;<[44 x i8]*> [#uses=0] > + at .str23160 = external constant [48 x i8], align 8 ;<[48 x i8]*> [#uses=0] > + at .str24161 = external constant [48 x i8], align 8 ;<[48 x i8]*> [#uses=0] > + at .str25162 = external constant [45 x i8], align 8 ;<[45 x i8]*> [#uses=0] > + at .str26163 = external constant [40 x i8], align 8 ;<[40 x i8]*> [#uses=0] > + at .str27164 = external constant [44 x i8], align 8 ;<[44 x i8]*> [#uses=0] > + at .str28165 = external constant [44 x i8], align 8 ;<[44 x i8]*> [#uses=0] > + at .str29166 = external constant [41 x i8], align 8 ;<[41 x i8]*> [#uses=0] > + at .str30167 = external constant [43 x i8], align 8 ;<[43 x i8]*> [#uses=0] > + at .str31168 = external constant [47 x i8], align 8 ;<[47 x i8]*> [#uses=0] > + at .str32169 = external constant [47 x i8], align 8 ;<[47 x i8]*> [#uses=0] > + at .str33170 = external constant [44 x i8], align 8 ;<[44 x i8]*> [#uses=0] > + at .str34171 = external constant [28 x i8], align 1 ;<[28 x i8]*> [#uses=0] > + at .str35172 = external constant [42 x i8], align 8 ;<[42 x i8]*> [#uses=0] > + at .str36173 = external constant [36 x i8], align 8 ;<[36 x i8]*> [#uses=0] > + at .str37174 = external constant [33 x i8], align 8 ;<[33 x i8]*> [#uses=0] > + at .str38175 = external constant [42 x i8], align 8 ;<[42 x i8]*> [#uses=0] > + at .str39176 = external constant [47 x i8], align 8 ;<[47 x i8]*> [#uses=0] > + at .str40177 = external constant [24 x i8], align 1 ;<[24 x i8]*> [#uses=0] > + at .str41178 = external constant [38 x i8], align 8 ;<[38 x i8]*> [#uses=0] > + at .str179 = external constant [15 x i8], align 1 ;<[15 x i8]*> [#uses=0] > + at .str1180 = external constant [35 x i8], align 8 ;<[35 x i8]*> [#uses=0] > + at .str2181 = external constant [34 x i8], align 8 ;<[34 x i8]*> [#uses=0] > + at .str3182 = external constant [39 x i8], align 8 ;<[39 x i8]*> [#uses=0] > + at .str4183 = external constant [19 x i8], align 1 ;<[19 x i8]*> [#uses=0] > + at .str5184 = external constant [37 x i8], align 8 ;<[37 x i8]*> [#uses=0] > + at .str6185 = external constant [20 x i8], align 1 ;<[20 x i8]*> [#uses=0] > + at .str7186 = external constant [37 x i8], align 8 ;<[37 x i8]*> [#uses=0] > + at .str8187 = external constant [44 x i8], align 8 ;<[44 x i8]*> [#uses=0] > + at .str9188 = external constant [45 x i8], align 8 ;<[45 x i8]*> [#uses=0] > + at .str10189 = external constant [37 x i8], align 8 ;<[37 x i8]*> [#uses=0] > + at .str11190 = external constant [35 x i8], align 8 ;<[35 x i8]*> [#uses=0] > + at .str12191 = external constant [22 x i8], align 1 ;<[22 x i8]*> [#uses=0] > + at .str13192 = external constant [36 x i8], align 8 ;<[36 x i8]*> [#uses=0] > + at .str14193 = external constant [25 x i8], align 1 ;<[25 x i8]*> [#uses=0] > + at .str15194 = external constant [47 x i8], align 8 ;<[47 x i8]*> [#uses=0] > + at .str16195 = external constant [43 x i8], align 8 ;<[43 x i8]*> [#uses=0] > + at .str17196 = external constant [36 x i8], align 8 ;<[36 x i8]*> [#uses=0] > + at .str18197 = external constant [47 x i8], align 8 ;<[47 x i8]*> [#uses=0] > + at .str19198 = external constant [51 x i8], align 8 ;<[51 x i8]*> [#uses=0] > + at .str20199 = external constant [37 x i8], align 8 ;<[37 x i8]*> [#uses=0] > + at .str21200 = external constant [37 x i8], align 8 ;<[37 x i8]*> [#uses=0] > + at .str22201 = external constant [38 x i8], align 8 ;<[38 x i8]*> [#uses=0] > + at .str23202 = external constant [37 x i8], align 8 ;<[37 x i8]*> [#uses=0] > + at .str24203 = external constant [37 x i8], align 8 ;<[37 x i8]*> [#uses=0] > + at .str25204 = external constant [39 x i8], align 8 ;<[39 x i8]*> [#uses=0] > + at .str26205 = external constant [36 x i8], align 8 ;<[36 x i8]*> [#uses=0] > + at .str27206 = external constant [46 x i8], align 8 ;<[46 x i8]*> [#uses=0] > + at .str28207 = external constant [44 x i8], align 8 ;<[44 x i8]*> [#uses=0] > + at hdTable = external global %struct.TypHeader* ;<%struct.TypHeader**> [#uses=0] > + at treeType = external global i64 ; [#uses=0] > + at hdWordValue = external global %struct.TypHeader* ;<%struct.TypHeader**> [#uses=0] > + at hdTree2 = external global %struct.TypHeader* ;<%struct.TypHeader**> [#uses=0] > + at treeWordLength = external global i64 ; [#uses=0] > + at wordList = external global [1024 x i64], align 32 ;<[1024 x i64]*> [#uses=0] > + at hdTabl2 = external global %struct.TypHeader* ;<%struct.TypHeader**> [#uses=0] > + at .str208 = external constant [9 x i8], align 1 ;<[9 x i8]*> [#uses=0] > + at .str1209 = external constant [17 x i8], align 1 ;<[17 x i8]*> [#uses=0] > + at .str2210 = external constant [17 x i8], align 1 ;<[17 x i8]*> [#uses=0] > + at .str3211 = external constant [10 x i8], align 1 ;<[10 x i8]*> [#uses=0] > + at .str4212 = external constant [8 x i8], align 1 ;<[8 x i8]*> [#uses=0] > + at .str5213 = external constant [14 x i8], align 1 ;<[14 x i8]*> [#uses=0] > + at .str6214 = external constant [10 x i8], align 1 ;<[10 x i8]*> [#uses=0] > + at .str7215 = external constant [18 x i8], align 1 ;<[18 x i8]*> [#uses=0] > + at .str8216 = external constant [18 x i8], align 1 ;<[18 x i8]*> [#uses=0] > + at .str9217 = external constant [18 x i8], align 1 ;<[18 x i8]*> [#uses=0] > + at .str10218 = external constant [45 x i8], align 8 ;<[45 x i8]*> [#uses=0] > + at .str11219 = external constant [22 x i8], align 1 ;<[22 x i8]*> [#uses=0] > + at .str12220 = external constant [23 x i8], align 1 ;<[23 x i8]*> [#uses=0] > + at .str13221 = external constant [28 x i8], align 1 ;<[28 x i8]*> [#uses=0] > + at .str14222 = external constant [32 x i8], align 8 ;<[32 x i8]*> [#uses=0] > + at .str15223 = external constant [31 x i8], align 8 ;<[31 x i8]*> [#uses=0] > + at .str16224 = external constant [31 x i8], align 8 ;<[31 x i8]*> [#uses=0] > + at hdExponent = external global %struct.TypHeader* ;<%struct.TypHeader**> [#uses=0] > + at hdTree1 = external global %struct.TypHeader* ;<%struct.TypHeader**> [#uses=0] > + at hdTree = external global %struct.TypHeader* ;<%struct.TypHeader**> [#uses=0] > + at .str17225 = external constant [50 x i8], align 8 ;<[50 x i8]*> [#uses=0] > + at .str18226 = external constant [34 x i8], align 8 ;<[34 x i8]*> [#uses=0] > + at .str19227 = external constant [15 x i8], align 1 ;<[15 x i8]*> [#uses=0] > + at .str20228 = external constant [26 x i8], align 1 ;<[26 x i8]*> [#uses=0] > + at .str21229 = external constant [15 x i8], align 1 ;<[15 x i8]*> [#uses=0] > + at .str22230 = external constant [27 x i8], align 1 ;<[27 x i8]*> [#uses=0] > + at .str23231 = external constant [31 x i8], align 8 ;<[31 x i8]*> [#uses=0] > + at .str24232 = external constant [26 x i8], align 1 ;<[26 x i8]*> [#uses=0] > + at .str25233 = external constant [28 x i8], align 1 ;<[28 x i8]*> [#uses=0] > + at .str26234 = external constant [18 x i8], align 1 ;<[18 x i8]*> [#uses=0] > + at .str27235 = external constant [34 x i8], align 8 ;<[34 x i8]*> [#uses=0] > + at .str28236 = external constant [41 x i8], align 8 ;<[41 x i8]*> [#uses=0] > + at .str29237 = external constant [44 x i8], align 8 ;<[44 x i8]*> [#uses=0] > + at hdRel = external global %struct.TypHeader* ;<%struct.TypHeader**> [#uses=0] > + at .str30238 = external constant [32 x i8], align 8 ;<[32 x i8]*> [#uses=0] > + at hdNums = external global %struct.TypHeader* ;<%struct.TypHeader**> [#uses=0] > + at .str31239 = external constant [33 x i8], align 8 ;<[33 x i8]*> [#uses=0] > + at .str32240 = external constant [32 x i8], align 8 ;<[32 x i8]*> [#uses=0] > + at .str33241 = external constant [33 x i8], align 8 ;<[33 x i8]*> [#uses=0] > + at .str34242 = external constant [31 x i8], align 8 ;<[31 x i8]*> [#uses=0] > + at dedlst = external global i64 ; [#uses=0] > + at .str35243 = external constant [38 x i8], align 8 ;<[38 x i8]*> [#uses=0] > + at dedfst = external global i64 ; [#uses=0] > + at dedgen = external global [40960 x i64], align 32 ;<[40960 x i64]*> [#uses=0] > + at dedcos = external global [40960 x i64], align 32 ;<[40960 x i64]*> [#uses=0] > + at dedprint.b = external global i1 ; [#uses=0] > + at .str36244 = external constant [41 x i8], align 8 ;<[41 x i8]*> [#uses=0] > + at hdNext = external global %struct.TypHeader* ;<%struct.TypHeader**> [#uses=0] > + at hdPrev = external global %struct.TypHeader* ;<%struct.TypHeader**> [#uses=0] > + at lastDef = external global i64 ; [#uses=0] > + at firstDef = external global i64 ; [#uses=0] > + at hdFact = external global %struct.TypHeader* ;<%struct.TypHeader**> [#uses=0] > + at firstFree = external global i64 ; [#uses=0] > + at lastFree = external global i64 ; [#uses=0] > + at nrdel = external global i64 ; [#uses=0] > + at .str37245 = external constant [36 x i8], align 8 ;<[36 x i8]*> [#uses=0] > + at .str38246 = external constant [35 x i8], align 8 ;<[35 x i8]*> [#uses=0] > + at lastN.4480 = external global i64 ; [#uses=0] > + at phi.4481 = external global i64 ; [#uses=0] > + at isSqfree.4482.b = external global i1 ; [#uses=0] > + at nrp.4483 = external global i64 ; [#uses=0] > + at HdResult = external global %struct.TypHeader* ;<%struct.TypHeader**> [#uses=0] > + at CycLastE = external global %struct.TypHeader* ;<%struct.TypHeader**> [#uses=0] > + at .str247 = external constant [2 x i8], align 1 ;<[2 x i8]*> [#uses=0] > + at .str1248 = external constant [6 x i8], align 1 ;<[6 x i8]*> [#uses=0] > + at .str2249 = external constant [9 x i8], align 1 ;<[9 x i8]*> [#uses=0] > + at .str3250 = external constant [7 x i8], align 1 ;<[7 x i8]*> [#uses=0] > + at .str4251 = external constant [10 x i8], align 1 ;<[10 x i8]*> [#uses=1] > + at .str5252 = external constant [10 x i8], align 1 ;<[10 x i8]*> [#uses=0] > + at .str6253 = external constant [33 x i8], align 8 ;<[33 x i8]*> [#uses=0] > + at .str7254 = external constant [36 x i8], align 8 ;<[36 x i8]*> [#uses=0] > + at .str8255 = external constant [38 x i8], align 8 ;<[38 x i8]*> [#uses=0] > + at .str9256 = external constant [26 x i8], align 1 ;<[26 x i8]*> [#uses=0] > + at .str10257 = external constant [38 x i8], align 8 ;<[38 x i8]*> [#uses=0] > + at .str11258 = external constant [23 x i8], align 1 ;<[23 x i8]*> [#uses=0] > + at .str12259 = external constant [45 x i8], align 8 ;<[45 x i8]*> [#uses=0] > + at .str13260 = external constant [40 x i8], align 8 ;<[40 x i8]*> [#uses=0] > + at .str14261 = external constant [25 x i8], align 1 ;<[25 x i8]*> [#uses=0] > + at .str15262 = external constant [39 x i8], align 8 ;<[39 x i8]*> [#uses=0] > + at .str16263 = external constant [22 x i8], align 1 ;<[22 x i8]*> [#uses=0] > + at .str17264 = external constant [36 x i8], align 8 ;<[36 x i8]*> [#uses=0] > + at .str18265 = external constant [14 x i8], align 1 ;<[14 x i8]*> [#uses=0] > + at .str19266 = external constant [34 x i8], align 8 ;<[34 x i8]*> [#uses=0] > + at CycLastN = external global i64 ; [#uses=0] > + at .str20267 = external constant [3 x i8], align 1 ;<[3 x i8]*> [#uses=0] > + at .str21268 = external constant [2 x i8], align 1 ;<[2 x i8]*> [#uses=0] > + at .str22269 = external constant [10 x i8], align 1 ;<[10 x i8]*> [#uses=0] > + at .str23270 = external constant [11 x i8], align 1 ;<[11 x i8]*> [#uses=0] > + at .str24271 = external constant [16 x i8], align 1 ;<[16 x i8]*> [#uses=0] > + at .str25272 = external constant [17 x i8], align 1 ;<[17 x i8]*> [#uses=0] > + at .str26273 = external constant [13 x i8], align 1 ;<[13 x i8]*> [#uses=0] > + at .str27274 = external constant [4 x i8], align 1 ;<[4 x i8]*> [#uses=0] > + at .str28275 = external constant [19 x i8], align 1 ;<[19 x i8]*> [#uses=0] > + at .str29276 = external constant [7 x i8], align 1 ;<[7 x i8]*> [#uses=0] > + at .str30277 = external constant [11 x i8], align 1 ;<[11 x i8]*> [#uses=0] > + at .str31278 = external constant [17 x i8], align 1 ;<[17 x i8]*> [#uses=0] > + at EvTab = external global [81 x %struct.TypHeader* (%struct.TypHeader*)*], align 32 ;<[81 x %struct.TypHeader* (%struct.TypHeader*)*]*> [#uses=0] > + at TabSum = external global [28 x [28 x %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*)*]], align 32 ;<[28 x [28 x %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*)*]]*> [#uses=0] > + at TabDiff = external global [28 x [28 x %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*)*]], align 32 ;<[28 x [28 x %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*)*]]*> [#uses=0] > + at TabProd = external global [28 x [28 x %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*)*]], align 32 ;<[28 x [28 x %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*)*]]*> [#uses=0] > + at TabQuo = external global [28 x [28 x %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*)*]], align 32 ;<[28 x [28 x %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*)*]]*> [#uses=0] > + at TabMod = external global [28 x [28 x %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*)*]], align 32 ;<[28 x [28 x %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*)*]]*> [#uses=0] > + at TabPow = external global [28 x [28 x %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*)*]], align 32 ;<[28 x [28 x %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*)*]]*> [#uses=0] > + at HdTrue = external global %struct.TypHeader* ;<%struct.TypHeader**> [#uses=0] > + at HdFalse = external global %struct.TypHeader* ;<%struct.TypHeader**> [#uses=0] > + at TabEq = external global [28 x [28 x %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*)*]], align 32 ;<[28 x [28 x %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*)*]]*> [#uses=0] > + at TabLt = external global [28 x [28 x %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*)*]], align 32 ;<[28 x [28 x %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*)*]]*> [#uses=0] > + at PrTab = external global [81 x void (%struct.TypHeader*)*], align 32 ;<[81 x void (%struct.TypHeader*)*]*> [#uses=0] > + at .str292 = external constant [45 x i8], align 8 ;<[45 x i8]*> [#uses=0] > + at TabComm = external global [28 x [28 x %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*)*]], align 32 ;<[28 x [28 x %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*)*]]*> [#uses=0] > + at .str1294 = external constant [5 x i8], align 1 ;<[5 x i8]*> [#uses=0] > + at .str2295 = external constant [13 x i8], align 1 ;<[13 x i8]*> [#uses=0] > + at HdVoid = external global %struct.TypHeader* ;<%struct.TypHeader**> [#uses=0] > + at .str3297 = external constant [5 x i8], align 1 ;<[5 x i8]*> [#uses=0] > + at .str4298 = external constant [6 x i8], align 1 ;<[6 x i8]*> [#uses=0] > + at .str5299 = external constant [7 x i8], align 1 ;<[7 x i8]*> [#uses=0] > + at .str6300 = external constant [12 x i8], align 1 ;<[12 x i8]*> [#uses=0] > + at .str7301 = external constant [5 x i8], align 1 ;<[5 x i8]*> [#uses=0] > + at .str8302 = external constant [8 x i8], align 1 ;<[8 x i8]*> [#uses=1] > + at .str9303 = external constant [7 x i8], align 1 ;<[7 x i8]*> [#uses=0] > + at .str10304 = external constant [3 x i8], align 1 ;<[3 x i8]*> [#uses=0] > + at HdTildePr = external global %struct.TypHeader* ;<%struct.TypHeader**> [#uses=0] > + at .str11305 = external constant [34 x i8], align 8 ;<[34 x i8]*> [#uses=0] > + at .str12306 = external constant [28 x i8], align 1 ;<[28 x i8]*> [#uses=0] > + at .str13307 = external constant [23 x i8], align 1 ;<[23 x i8]*> [#uses=0] > + at .str14308 = external constant [37 x i8], align 8 ;<[37 x i8]*> [#uses=0] > + at .str15309 = external constant [46 x i8], align 8 ;<[46 x i8]*> [#uses=0] > + at .str16310 = external constant [47 x i8], align 8 ;<[47 x i8]*> [#uses=0] > + at .str17311 = external constant [47 x i8], align 8 ;<[47 x i8]*> [#uses=0] > + at .str18312 = external constant [41 x i8], align 8 ;<[41 x i8]*> [#uses=0] > + at .str19313 = external constant [33 x i8], align 8 ;<[33 x i8]*> [#uses=0] > + at .str20314 = external constant [38 x i8], align 8 ;<[38 x i8]*> [#uses=0] > + at .str21315 = external constant [51 x i8], align 8 ;<[51 x i8]*> [#uses=0] > + at .str22316 = external constant [30 x i8], align 1 ;<[30 x i8]*> [#uses=0] > + at .str23317 = external constant [46 x i8], align 8 ;<[46 x i8]*> [#uses=0] > + at .str24318 = external constant [50 x i8], align 8 ;<[50 x i8]*> [#uses=0] > + at .str25319 = external constant [49 x i8], align 8 ;<[49 x i8]*> [#uses=0] > + at .str26320 = external constant [48 x i8], align 8 ;<[48 x i8]*> [#uses=0] > + at .str27321 = external constant [50 x i8], align 8 ;<[50 x i8]*> [#uses=0] > + at .str28322 = external constant [44 x i8], align 8 ;<[44 x i8]*> [#uses=0] > + at .str29323 = external constant [33 x i8], align 8 ;<[33 x i8]*> [#uses=0] > + at .str30324 = external constant [4 x i8], align 1 ;<[4 x i8]*> [#uses=0] > + at .str31325 = external constant [3 x i8], align 1 ;<[3 x i8]*> [#uses=0] > + at .str32326 = external constant [5 x i8], align 1 ;<[5 x i8]*> [#uses=0] > + at .str33327 = external constant [5 x i8], align 1 ;<[5 x i8]*> [#uses=0] > + at .str34328 = external constant [4 x i8], align 1 ;<[4 x i8]*> [#uses=0] > + at .str35329 = external constant [3 x i8], align 1 ;<[3 x i8]*> [#uses=0] > + at .str36330 = external constant [4 x i8], align 1 ;<[4 x i8]*> [#uses=0] > + at .str37331 = external constant [9 x i8], align 1 ;<[9 x i8]*> [#uses=0] > + at .str38332 = external constant [3 x i8], align 1 ;<[3 x i8]*> [#uses=0] > + at .str40334 = external constant [6 x i8], align 1 ;<[6 x i8]*> [#uses=0] > + at .str41335 = external constant [4 x i8], align 1 ;<[4 x i8]*> [#uses=0] > + at .str42336 = external constant [4 x i8], align 1 ;<[4 x i8]*> [#uses=0] > + at .str43337 = external constant [3 x i8], align 1 ;<[3 x i8]*> [#uses=0] > + at .str44338 = external constant [3 x i8], align 1 ;<[3 x i8]*> [#uses=0] > + at .str45339 = external constant [7 x i8], align 1 ;<[7 x i8]*> [#uses=0] > + at .str46340 = external constant [7 x i8], align 1 ;<[7 x i8]*> [#uses=0] > + at .str47341 = external constant [5 x i8], align 1 ;<[5 x i8]*> [#uses=0] > + at .str48342 = external constant [6 x i8], align 1 ;<[6 x i8]*> [#uses=0] > + at .str49343 = external constant [6 x i8], align 1 ;<[6 x i8]*> [#uses=0] > + at .str50344 = external constant [5 x i8], align 1 ;<[5 x i8]*> [#uses=0] > + at .str51345 = external constant [2 x i8], align 1 ;<[2 x i8]*> [#uses=0] > + at .str52346 = external constant [3 x i8], align 1 ;<[3 x i8]*> [#uses=0] > + at .str53347 = external constant [4 x i8], align 1 ;<[4 x i8]*> [#uses=0] > + at .str54348 = external constant [30 x i8], align 1 ;<[30 x i8]*> [#uses=0] > + at .str55349 = external constant [2 x i8], align 1 ;<[2 x i8]*> [#uses=0] > + at .str56350 = external constant [5 x i8], align 1 ;<[5 x i8]*> [#uses=0] > + at .str57351 = external constant [4 x i8], align 1 ;<[4 x i8]*> [#uses=0] > + at .str58352 = external constant [11 x i8], align 1 ;<[11 x i8]*> [#uses=0] > + at .str59353 = external constant [6 x i8], align 1 ;<[6 x i8]*> [#uses=0] > + at .str60354 = external constant [5 x i8], align 1 ;<[5 x i8]*> [#uses=0] > + at prPrec = external global i64 ; [#uses=0] > + at .str61355 = external constant [2 x i8], align 1 ;<[2 x i8]*> [#uses=0] > + at .str62356 = external constant [2 x i8], align 1 ;<[2 x i8]*> [#uses=0] > + at .str63357 = external constant [2 x i8], align 1 ;<[2 x i8]*> [#uses=0] > + at .str64358 = external constant [3 x i8], align 1 ;<[3 x i8]*> [#uses=0] > + at .str65359 = external constant [3 x i8], align 1 ;<[3 x i8]*> [#uses=0] > + at .str66360 = external constant [3 x i8], align 1 ;<[3 x i8]*> [#uses=0] > + at .str67361 = external constant [2 x i8], align 1 ;<[2 x i8]*> [#uses=0] > + at .str68362 = external constant [2 x i8], align 1 ;<[2 x i8]*> [#uses=0] > + at .str69363 = external constant [2 x i8], align 1 ;<[2 x i8]*> [#uses=0] > + at .str70364 = external constant [2 x i8], align 1 ;<[2 x i8]*> [#uses=0] > + at .str71365 = external constant [2 x i8], align 1 ;<[2 x i8]*> [#uses=0] > + at .str72366 = external constant [17 x i8], align 1 ;<[17 x i8]*> [#uses=0] > + at .str73367 = external constant [6 x i8], align 1 ;<[6 x i8]*> [#uses=0] > + at .str74368 = external constant [4 x i8], align 1 ;<[4 x i8]*> [#uses=0] > + at .str75369 = external constant [2 x i8], align 1 ;<[2 x i8]*> [#uses=0] > + at .str76370 = external constant [2 x i8], align 1 ;<[2 x i8]*> [#uses=0] > + at .str77371 = external constant [15 x i8], align 1 ;<[15 x i8]*> [#uses=0] > + at .str78372 = external constant [4 x i8], align 1 ;<[4 x i8]*> [#uses=0] > + at .str79373 = external constant [7 x i8], align 1 ;<[7 x i8]*> [#uses=0] > + at .str81375 = external constant [9 x i8], align 1 ;<[9 x i8]*> [#uses=0] > + at .str82376 = external constant [45 x i8], align 8 ;<[45 x i8]*> [#uses=0] > + at .str83377 = external constant [24 x i8], align 1 ;<[24 x i8]*> [#uses=0] > + at .str84378 = external constant [34 x i8], align 8 ;<[34 x i8]*> [#uses=0] > + at .str85379 = external constant [31 x i8], align 8 ;<[31 x i8]*> [#uses=0] > + at .str86380 = external constant [38 x i8], align 8 ;<[38 x i8]*> [#uses=0] > + at .str87381 = external constant [39 x i8], align 8 ;<[39 x i8]*> [#uses=0] > + at .str88382 = external constant [35 x i8], align 8 ;<[35 x i8]*> [#uses=0] > + at .str89383 = external constant [23 x i8], align 1 ;<[23 x i8]*> [#uses=0] > + at .str90384 = external constant [33 x i8], align 8 ;<[33 x i8]*> [#uses=0] > + at .str91385 = external constant [30 x i8], align 1 ;<[30 x i8]*> [#uses=0] > + at .str92386 = external constant [37 x i8], align 8 ;<[37 x i8]*> [#uses=0] > + at .str93387 = external constant [34 x i8], align 8 ;<[34 x i8]*> [#uses=0] > + at .str94388 = external constant [21 x i8], align 1 ;<[21 x i8]*> [#uses=0] > + at HdReturn = external global %struct.TypHeader* ;<%struct.TypHeader**> [#uses=0] > + at Pols = external constant [186 x i64], align 32 ;<[186 x i64]*> [#uses=0] > + at HdFields = external global %struct.TypHeader* ;<%struct.TypHeader**> [#uses=0] > + at HdIntFFEs = external global %struct.TypHeader* ;<%struct.TypHeader**> [#uses=0] > + at .str396 = external constant [6 x i8], align 1 ;<[6 x i8]*> [#uses=0] > + at .str1397 = external constant [7 x i8], align 1 ;<[7 x i8]*> [#uses=0] > + at .str2398 = external constant [7 x i8], align 1 ;<[7 x i8]*> [#uses=0] > + at .str3399 = external constant [2 x i8], align 1 ;<[2 x i8]*> [#uses=0] > + at .str4400 = external constant [22 x i8], align 1 ;<[22 x i8]*> [#uses=0] > + at .str5401 = external constant [36 x i8], align 8 ;<[36 x i8]*> [#uses=0] > + at .str6402 = external constant [24 x i8], align 1 ;<[24 x i8]*> [#uses=0] > + at .str7403 = external constant [15 x i8], align 1 ;<[15 x i8]*> [#uses=0] > + at .str8404 = external constant [11 x i8], align 1 ;<[11 x i8]*> [#uses=0] > + at .str9405 = external constant [4 x i8], align 1 ;<[4 x i8]*> [#uses=0] > + at .str10406 = external constant [10 x i8], align 1 ;<[10 x i8]*> [#uses=0] > + at .str11407 = external constant [8 x i8], align 1 ;<[8 x i8]*> [#uses=0] > + at .str12408 = external constant [16 x i8], align 1 ;<[16 x i8]*> [#uses=0] > + at .str13409 = external constant [43 x i8], align 8 ;<[43 x i8]*> [#uses=0] > + at HdLastIntFFE = external global %struct.TypHeader* ;<%struct.TypHeader**> [#uses=0] > + at .str14410 = external constant [21 x i8], align 1 ;<[21 x i8]*> [#uses=0] > + at .str15411 = external constant [43 x i8], align 8 ;<[43 x i8]*> [#uses=0] > + at .str16412 = external constant [40 x i8], align 8 ;<[40 x i8]*> [#uses=0] > + at .str17413 = external constant [43 x i8], align 8 ;<[43 x i8]*> [#uses=0] > + at .str18414 = external constant [43 x i8], align 8 ;<[43 x i8]*> [#uses=0] > + at .str19415 = external constant [28 x i8], align 1 ;<[28 x i8]*> [#uses=0] > + at .str20416 = external constant [43 x i8], align 8 ;<[43 x i8]*> [#uses=0] > + at .str21417 = external constant [28 x i8], align 1 ;<[28 x i8]*> [#uses=0] > + at .str22418 = external constant [51 x i8], align 8 ;<[51 x i8]*> [#uses=0] > + at .str23419 = external constant [44 x i8], align 8 ;<[44 x i8]*> [#uses=0] > + at .str24420 = external constant [35 x i8], align 8 ;<[35 x i8]*> [#uses=0] > + at .str25421 = external constant [59 x i8], align 8 ;<[59 x i8]*> [#uses=0] > + at .str26422 = external constant [52 x i8], align 8 ;<[52 x i8]*> [#uses=0] > + at .str27423 = external constant [59 x i8], align 8 ;<[59 x i8]*> [#uses=0] > + at .str28424 = external constant [52 x i8], align 8 ;<[52 x i8]*> [#uses=0] > + at .str29425 = external constant [59 x i8], align 8 ;<[59 x i8]*> [#uses=0] > + at .str30426 = external constant [52 x i8], align 8 ;<[52 x i8]*> [#uses=0] > + at .str31427 = external constant [59 x i8], align 8 ;<[59 x i8]*> [#uses=0] > + at .str32428 = external constant [52 x i8], align 8 ;<[52 x i8]*> [#uses=0] > + at HdExec = external global %struct.TypHeader* ;<%struct.TypHeader**> [#uses=0] > + at .str431 = external constant [7 x i8], align 1 ;<[7 x i8]*> [#uses=0] > + at .str1432 = external constant [10 x i8], align 1 ;<[10 x i8]*> [#uses=0] > + at .str2433 = external constant [12 x i8], align 1 ;<[12 x i8]*> [#uses=0] > + at .str3434 = external constant [10 x i8], align 1 ;<[10 x i8]*> [#uses=0] > + at HdTimes = external global %struct.TypHeader* ;<%struct.TypHeader**> [#uses=0] > + at .str4435 = external constant [8 x i8], align 1 ;<[8 x i8]*> [#uses=0] > + at .str5436 = external constant [47 x i8], align 8 ;<[47 x i8]*> [#uses=0] > + at .str8439 = external constant [15 x i8], align 1 ;<[15 x i8]*> [#uses=0] > + at .str11442 = external constant [7 x i8], align 1 ;<[7 x i8]*> [#uses=0] > + at .str12443 = external constant [7 x i8], align 1 ;<[7 x i8]*> [#uses=0] > + at .str13444 = external constant [6 x i8], align 1 ;<[6 x i8]*> [#uses=0] > + at .str14445 = external constant [19 x i8], align 1 ;<[19 x i8]*> [#uses=0] > + at .str15446 = external constant [5 x i8], align 1 ;<[5 x i8]*> [#uses=0] > + at prFull.b = external global i1 ; [#uses=0] > + at .str16447 = external constant [9 x i8], align 1 ;<[9 x i8]*> [#uses=0] > + at .str18449 = external constant [10 x i8], align 1 ;<[10 x i8]*> [#uses=0] > + at .str19450 = external constant [5 x i8], align 1 ;<[5 x i8]*> [#uses=0] > + at .str20451 = external constant [6 x i8], align 1 ;<[6 x i8]*> [#uses=0] > + at .str22453 = external constant [34 x i8], align 8 ;<[34 x i8]*> [#uses=0] > + at .str23454 = external constant [28 x i8], align 1 ;<[28 x i8]*> [#uses=0] > + at .str24455 = external constant [32 x i8], align 8 ;<[32 x i8]*> [#uses=0] > + at .str25456 = external constant [40 x i8], align 8 ;<[40 x i8]*> [#uses=0] > + at .str26457 = external constant [30 x i8], align 1 ;<[30 x i8]*> [#uses=0] > + at .str27458 = external constant [23 x i8], align 1 ;<[23 x i8]*> [#uses=0] > + at .str28459 = external constant [37 x i8], align 8 ;<[37 x i8]*> [#uses=0] > + at .str29460 = external constant [42 x i8], align 8 ;<[42 x i8]*> [#uses=0] > + at IsProfiling = external global i64 ; [#uses=0] > + at .str30461 = external constant [49 x i8], align 8 ;<[49 x i8]*> [#uses=0] > + at .str31462 = external constant [6 x i8], align 1 ;<[6 x i8]*> [#uses=0] > + at .str32463 = external constant [44 x i8], align 8 ;<[44 x i8]*> [#uses=0] > + at .str33464 = external constant [40 x i8], align 8 ;<[40 x i8]*> [#uses=0] > + at Timesum = external global i64 ; [#uses=0] > + at .str34465 = external constant [22 x i8], align 1 ;<[22 x i8]*> [#uses=0] > + at .str35466 = external constant [36 x i8], align 8 ;<[36 x i8]*> [#uses=0] > + at .str36467 = external constant [5 x i8], align 1 ;<[5 x i8]*> [#uses=0] > + at .str37468 = external constant [5 x i8], align 1 ;<[5 x i8]*> [#uses=0] > + at .str39470 = external constant [5 x i8], align 1 ;<[5 x i8]*> [#uses=0] > + at .str40471 = external constant [5 x i8], align 1 ;<[5 x i8]*> [#uses=0] > + at .str42473 = external constant [4 x i8], align 1 ;<[4 x i8]*> [#uses=0] > + at .str43474 = external constant [11 x i8], align 1 ;<[11 x i8]*> [#uses=0] > + at .str477 = external constant [9 x i8], align 1 ;<[9 x i8]*> [#uses=0] > + at .str1478 = external constant [9 x i8], align 1 ;<[9 x i8]*> [#uses=0] > + at .str2479 = external constant [8 x i8], align 1 ;<[8 x i8]*> [#uses=0] > + at .str3480 = external constant [7 x i8], align 1 ;<[7 x i8]*> [#uses=0] > + at .str4481 = external constant [5 x i8], align 1 ;<[5 x i8]*> [#uses=0] > + at .str5482 = external constant [5 x i8], align 1 ;<[5 x i8]*> [#uses=0] > + at .str7484 = external constant [8 x i8], align 1 ;<[8 x i8]*> [#uses=0] > + at .str8485 = external constant [6 x i8], align 1 ;<[6 x i8]*> [#uses=0] > + at HdLast = external global %struct.TypHeader* ;<%struct.TypHeader**> [#uses=0] > + at ErrRet = external global [1 x %struct.__jmp_buf_tag], align 32 ;<[1 x %struct.__jmp_buf_tag]*> [#uses=0] > + at .str9486 = external constant [5 x i8], align 1 ;<[5 x i8]*> [#uses=0] > + at .str10487 = external constant [6 x i8], align 1 ;<[6 x i8]*> [#uses=0] > + at HdLast2 = external global %struct.TypHeader* ;<%struct.TypHeader**> [#uses=0] > + at .str11488 = external constant [6 x i8], align 1 ;<[6 x i8]*> [#uses=0] > + at HdLast3 = external global %struct.TypHeader* ;<%struct.TypHeader**> [#uses=0] > + at .str12489 = external constant [5 x i8], align 1 ;<[5 x i8]*> [#uses=0] > + at HdTime = external global %struct.TypHeader* ;<%struct.TypHeader**> [#uses=0] > + at .str13490 = external constant [7 x i8], align 1 ;<[7 x i8]*> [#uses=0] > + at .str14491 = external constant [18 x i8], align 1 ;<[18 x i8]*> [#uses=0] > + at .str15492 = external constant [7 x i8], align 1 ;<[7 x i8]*> [#uses=0] > + at .str16493 = external constant [8 x i8], align 1 ;<[8 x i8]*> [#uses=0] > + at .str17494 = external constant [6 x i8], align 1 ;<[6 x i8]*> [#uses=0] > + at .str18495 = external constant [7 x i8], align 1 ;<[7 x i8]*> [#uses=0] > + at .str19496 = external constant [7 x i8], align 1 ;<[7 x i8]*> [#uses=0] > + at .str20497 = external constant [6 x i8], align 1 ;<[6 x i8]*> [#uses=0] > + at .str21498 = external constant [10 x i8], align 1 ;<[10 x i8]*> [#uses=0] > + at .str22499 = external constant [10 x i8], align 1 ;<[10 x i8]*> [#uses=0] > + at .str23500 = external constant [5 x i8], align 1 ;<[5 x i8]*> [#uses=0] > + at .str24501 = external constant [5 x i8], align 1 ;<[5 x i8]*> [#uses=0] > + at .str25502 = external constant [6 x i8], align 1 ;<[6 x i8]*> [#uses=0] > + at .str26503 = external constant [8 x i8], align 1 ;<[8 x i8]*> [#uses=0] > + at .str27504 = external constant [9 x i8], align 1 ;<[9 x i8]*> [#uses=0] > + at .str28505 = external constant [6 x i8], align 1 ;<[6 x i8]*> [#uses=0] > + at .str29506 = external constant [11 x i8], align 1 ;<[11 x i8]*> [#uses=0] > + at .str30507 = external constant [9 x i8], align 1 ;<[9 x i8]*> [#uses=0] > + at .str31508 = external constant [5 x i8], align 1 ;<[5 x i8]*> [#uses=0] > + at .str32509 = external constant [5 x i8], align 1 ;<[5 x i8]*> [#uses=0] > + at .str33510 = external constant [8 x i8], align 1 ;<[8 x i8]*> [#uses=0] > + at .str34511 = external constant [11 x i8], align 1 ;<[11 x i8]*> [#uses=0] > + at .str35512 = external constant [8 x i8], align 1 ;<[8 x i8]*> [#uses=0] > + at .str36513 = external constant [12 x i8], align 1 ;<[12 x i8]*> [#uses=0] > + at .str37514 = external constant [7 x i8], align 1 ;<[7 x i8]*> [#uses=0] > + at .str38515 = external constant [4 x i8], align 1 ;<[4 x i8]*> [#uses=0] > + at .str39516 = external constant [5 x i8], align 1 ;<[5 x i8]*> [#uses=0] > + at .str40517 = external constant [5 x i8], align 1 ;<[5 x i8]*> [#uses=0] > + at .str41518 = external constant [7 x i8], align 1 ;<[7 x i8]*> [#uses=0] > + at .str42519 = external constant [15 x i8], align 1 ;<[15 x i8]*> [#uses=0] > + at .str43520 = external constant [13 x i8], align 1 ;<[13 x i8]*> [#uses=0] > + at .str44521 = external constant [16 x i8], align 1 ;<[16 x i8]*> [#uses=0] > + at .str45522 = external constant [32 x i8], align 8 ;<[32 x i8]*> [#uses=0] > + at .str46523 = external constant [30 x i8], align 1 ;<[30 x i8]*> [#uses=0] > + at .str47524 = external constant [21 x i8], align 1 ;<[21 x i8]*> [#uses=0] > + at .str48525 = external constant [30 x i8], align 1 ;<[30 x i8]*> [#uses=0] > + at .str49526 = external constant [41 x i8], align 8 ;<[41 x i8]*> [#uses=0] > + at .str50527 = external constant [32 x i8], align 8 ;<[32 x i8]*> [#uses=0] > + at .str51528 = external constant [43 x i8], align 8 ;<[43 x i8]*> [#uses=0] > + at .str52529 = external constant [37 x i8], align 8 ;<[37 x i8]*> [#uses=0] > + at .str53530 = external constant [41 x i8], align 8 ;<[41 x i8]*> [#uses=0] > + at .str54531 = external constant [52 x i8], align 8 ;<[52 x i8]*> [#uses=0] > + at .str55532 = external constant [55 x i8], align 8 ;<[55 x i8]*> [#uses=0] > + at .str56533 = external constant [8 x i8], align 1 ;<[8 x i8]*> [#uses=0] > + at .str57534 = external constant [50 x i8], align 8 ;<[50 x i8]*> [#uses=0] > + at .str58535 = external constant [7 x i8], align 1 ;<[7 x i8]*> [#uses=0] > + at .str59536 = external constant [10 x i8], align 1 ;<[10 x i8]*> [#uses=0] > + at .str60537 = external constant [9 x i8], align 1 ;<[9 x i8]*> [#uses=0] > + at .str61538 = external constant [6 x i8], align 1 ;<[6 x i8]*> [#uses=0] > + at .str62539 = external constant [8 x i8], align 1 ;<[8 x i8]*> [#uses=0] > + at .str63540 = external constant [8 x i8], align 1 ;<[8 x i8]*> [#uses=0] > + at .str64541 = external constant [21 x i8], align 1 ;<[21 x i8]*> [#uses=0] > + at .str65542 = external constant [21 x i8], align 1 ;<[21 x i8]*> [#uses=0] > + at .str66543 = external constant [5 x i8], align 1 ;<[5 x i8]*> [#uses=0] > + at .str67544 = external constant [19 x i8], align 1 ;<[19 x i8]*> [#uses=0] > + at .str68545 = external constant [34 x i8], align 8 ;<[34 x i8]*> [#uses=0] > + at .str69546 = external constant [23 x i8], align 1 ;<[23 x i8]*> [#uses=0] > + at .str70547 = external constant [37 x i8], align 8 ;<[37 x i8]*> [#uses=0] > + at .str71548 = external constant [31 x i8], align 8 ;<[31 x i8]*> [#uses=0] > + at .str72549 = external constant [17 x i8], align 1 ;<[17 x i8]*> [#uses=0] > + at .str73550 = external constant [45 x i8], align 8 ;<[45 x i8]*> [#uses=0] > + at .str74551 = external constant [35 x i8], align 8 ;<[35 x i8]*> [#uses=0] > + at .str75552 = external constant [35 x i8], align 8 ;<[35 x i8]*> [#uses=0] > + at .str76553 = external constant [17 x i8], align 1 ;<[17 x i8]*> [#uses=0] > + at .str77554 = external constant [25 x i8], align 1 ;<[25 x i8]*> [#uses=0] > + at .str78555 = external constant [26 x i8], align 1 ;<[26 x i8]*> [#uses=0] > + at .str79556 = external constant [30 x i8], align 1 ;<[30 x i8]*> [#uses=0] > + at .str80557 = external constant [48 x i8], align 8 ;<[48 x i8]*> [#uses=0] > + at .str81558 = external constant [36 x i8], align 8 ;<[36 x i8]*> [#uses=0] > + at .str82559 = external constant [34 x i8], align 8 ;<[34 x i8]*> [#uses=0] > + at .str83560 = external constant [54 x i8], align 8 ;<[54 x i8]*> [#uses=0] > + at .str84561 = external constant [38 x i8], align 8 ;<[38 x i8]*> [#uses=0] > + at .str85562 = external constant [41 x i8], align 8 ;<[41 x i8]*> [#uses=0] > + at .str86563 = external constant [29 x i8], align 1 ;<[29 x i8]*> [#uses=0] > + at .str87564 = external constant [33 x i8], align 8 ;<[33 x i8]*> [#uses=0] > + at .str88565 = external constant [36 x i8], align 8 ;<[36 x i8]*> [#uses=0] > + at .str89566 = external constant [25 x i8], align 1 ;<[25 x i8]*> [#uses=0] > + at .str90567 = external constant [43 x i8], align 8 ;<[43 x i8]*> [#uses=0] > + at .str91568 = external constant [46 x i8], align 8 ;<[46 x i8]*> [#uses=0] > + at .str93570 = external constant [55 x i8], align 8 ;<[55 x i8]*> [#uses=0] > + at .str94571 = external constant [42 x i8], align 8 ;<[42 x i8]*> [#uses=0] > + at .str95572 = external constant [43 x i8], align 8 ;<[43 x i8]*> [#uses=0] > + at .str96573 = external constant [54 x i8], align 8 ;<[54 x i8]*> [#uses=0] > + at .str97574 = external constant [29 x i8], align 1 ;<[29 x i8]*> [#uses=0] > + at .str98575 = external constant [39 x i8], align 8 ;<[39 x i8]*> [#uses=0] > + at .str99576 = external constant [26 x i8], align 1 ;<[26 x i8]*> [#uses=0] > + at .str100577 = external constant [37 x i8], align 8 ;<[37 x i8]*> [#uses=0] > + at .str101578 = external constant [35 x i8], align 8 ;<[35 x i8]*> [#uses=0] > + at .str102579 = external constant [50 x i8], align 8 ;<[50 x i8]*> [#uses=0] > + at .str103580 = external constant [27 x i8], align 1 ;<[27 x i8]*> [#uses=0] > + at .str104581 = external constant [23 x i8], align 1 ;<[23 x i8]*> [#uses=0] > + at .str105582 = external constant [29 x i8], align 1 ;<[29 x i8]*> [#uses=0] > + at .str106583 = external constant [43 x i8], align 8 ;<[43 x i8]*> [#uses=0] > + at .str107584 = external constant [26 x i8], align 1 ;<[26 x i8]*> [#uses=0] > + at .str108585 = external constant [16 x i8], align 1 ;<[16 x i8]*> [#uses=0] > + at .str109586 = external constant [28 x i8], align 1 ;<[28 x i8]*> [#uses=0] > + at .str110587 = external constant [29 x i8], align 1 ;<[29 x i8]*> [#uses=0] > + at .str111588 = external constant [29 x i8], align 1 ;<[29 x i8]*> [#uses=0] > + at .str112589 = external constant [29 x i8], align 1 ;<[29 x i8]*> [#uses=0] > + at .str113590 = external constant [29 x i8], align 1 ;<[29 x i8]*> [#uses=0] > + at .str114591 = external constant [31 x i8], align 8 ;<[31 x i8]*> [#uses=0] > + at .str115592 = external constant [29 x i8], align 1 ;<[29 x i8]*> [#uses=0] > + at .str116593 = external constant [33 x i8], align 8 ;<[33 x i8]*> [#uses=0] > + at .str117594 = external constant [29 x i8], align 1 ;<[29 x i8]*> [#uses=0] > + at .str118595 = external constant [29 x i8], align 1 ;<[29 x i8]*> [#uses=0] > + at .str119596 = external constant [28 x i8], align 1 ;<[28 x i8]*> [#uses=0] > + at .str120597 = external constant [28 x i8], align 1 ;<[28 x i8]*> [#uses=0] > + at .str121598 = external constant [14 x i8], align 1 ;<[14 x i8]*> [#uses=0] > + at .str122599 = external constant [7 x i8], align 1 ;<[7 x i8]*> [#uses=0] > + at .str124601 = external constant [19 x i8], align 1 ;<[19 x i8]*> [#uses=0] > + at .str125602 = external constant [11 x i8], align 1 ;<[11 x i8]*> [#uses=0] > + at .str126 = external constant [5 x i8], align 1 ;<[5 x i8]*> [#uses=0] > + at .str127 = external constant [6 x i8], align 1 ;<[6 x i8]*> [#uses=0] > + at .str128 = external constant [39 x i8], align 8 ;<[39 x i8]*> [#uses=0] > + at NameType = external constant [81 x i8*], align 32 ;<[81 x i8*]*> [#uses=0] > + at Size = external global [81 x %struct.anon], align 32 ;<[81 x %struct.anon]*> [#uses=0] > + at HdNewHandles = external global %struct.TypHeader* ;<%struct.TypHeader**> [#uses=0] > + at NrNewHandles = external global i64 ; [#uses=0] > + at s.3831 = external global [7 x i8] ;<[7 x i8]*> [#uses=0] > + at HdFree = external global %struct.TypHeader* ;<%struct.TypHeader**> [#uses=0] > + at .str605 = external constant [55 x i8], align 8 ;<[55 x i8]*> [#uses=0] > + at FreeHandle = external global %struct.TypHeader* ;<%struct.TypHeader**> [#uses=0] > + at NrFreeHandles = external global i64 ; [#uses=0] > + at FirstBag = external global %struct.TypHeader** ;<%struct.TypHeader***> [#uses=0] > + at HdResize = external global %struct.TypHeader* ;<%struct.TypHeader**> [#uses=0] > + at IsResizeCall.b = external global i1 ; [#uses=0] > + at .str1606 = external constant [22 x i8], align 1 ;<[22 x i8]*> [#uses=0] > + at .str2607 = external constant [8 x i8], align 1 ;<[8 x i8]*> [#uses=0] > + at .str3608 = external constant [49 x i8], align 8 ;<[49 x i8]*> [#uses=0] > + at .str4609 = external constant [8 x i8], align 1 ;<[8 x i8]*> [#uses=0] > + at .str5610 = external constant [11 x i8], align 1 ;<[11 x i8]*> [#uses=0] > + at .str6611 = external constant [11 x i8], align 1 ;<[11 x i8]*> [#uses=0] > + at .str7612 = external constant [41 x i8], align 8 ;<[41 x i8]*> [#uses=0] > + at .str8613 = external constant [11 x i8], align 1 ;<[11 x i8]*> [#uses=0] > + at .str9614 = external constant [3 x i8], align 1 ;<[3 x i8]*> [#uses=0] > + at .str10615 = external constant [40 x i8], align 8 ;<[40 x i8]*> [#uses=0] > + at .str11616 = external constant [26 x i8], align 1 ;<[26 x i8]*> [#uses=0] > + at lastType = external global i64 ; [#uses=0] > + at lastSize = external global i64 ; [#uses=0] > + at .str12617 = external constant [32 x i8], align 8 ;<[32 x i8]*> [#uses=0] > + at .str13618 = external constant [5 x i8], align 1 ;<[5 x i8]*> [#uses=0] > + at .str14619 = external constant [8 x i8], align 1 ;<[8 x i8]*> [#uses=0] > + at .str15620 = external constant [17 x i8], align 1 ;<[17 x i8]*> [#uses=0] > + at .str16621 = external constant [18 x i8], align 1 ;<[18 x i8]*> [#uses=0] > + at .str17622 = external constant [9 x i8], align 1 ;<[9 x i8]*> [#uses=0] > + at .str18623 = external constant [11 x i8], align 1 ;<[11 x i8]*> [#uses=0] > + at .str19624 = external constant [8 x i8], align 1 ;<[8 x i8]*> [#uses=0] > + at .str20625 = external constant [21 x i8], align 1 ;<[21 x i8]*> [#uses=0] > + at .str21626 = external constant [12 x i8], align 1 ;<[12 x i8]*> [#uses=0] > + at .str22627 = external constant [5 x i8], align 1 ;<[5 x i8]*> [#uses=0] > + at .str23628 = external constant [12 x i8], align 1 ;<[12 x i8]*> [#uses=0] > + at .str24629 = external constant [7 x i8], align 1 ;<[7 x i8]*> [#uses=0] > + at .str25630 = external constant [8 x i8], align 1 ;<[8 x i8]*> [#uses=0] > + at .str26631 = external constant [10 x i8], align 1 ;<[10 x i8]*> [#uses=0] > + at .str28633 = external constant [18 x i8], align 1 ;<[18 x i8]*> [#uses=0] > + at .str29634 = external constant [5 x i8], align 1 ;<[5 x i8]*> [#uses=0] > + at .str30635 = external constant [4 x i8], align 1 ;<[4 x i8]*> [#uses=0] > + at .str31636 = external constant [7 x i8], align 1 ;<[7 x i8]*> [#uses=0] > + at .str32637 = external constant [20 x i8], align 1 ;<[20 x i8]*> [#uses=0] > + at .str33638 = external constant [13 x i8], align 1 ;<[13 x i8]*> [#uses=0] > + at .str34639 = external constant [7 x i8], align 1 ;<[7 x i8]*> [#uses=0] > + at .str35640 = external constant [6 x i8], align 1 ;<[6 x i8]*> [#uses=0] > + at .str36641 = external constant [7 x i8], align 1 ;<[7 x i8]*> [#uses=0] > + at .str37642 = external constant [18 x i8], align 1 ;<[18 x i8]*> [#uses=0] > + at .str38643 = external constant [18 x i8], align 1 ;<[18 x i8]*> [#uses=0] > + at .str39644 = external constant [16 x i8], align 1 ;<[16 x i8]*> [#uses=0] > + at .str40645 = external constant [9 x i8], align 1 ;<[9 x i8]*> [#uses=0] > + at .str41646 = external constant [18 x i8], align 1 ;<[18 x i8]*> [#uses=0] > + at .str42647 = external constant [15 x i8], align 1 ;<[15 x i8]*> [#uses=0] > + at .str43648 = external constant [13 x i8], align 1 ;<[13 x i8]*> [#uses=0] > + at .str44649 = external constant [8 x i8], align 1 ;<[8 x i8]*> [#uses=0] > + at .str45650 = external constant [16 x i8], align 1 ;<[16 x i8]*> [#uses=0] > + at .str46651 = external constant [15 x i8], align 1 ;<[15 x i8]*> [#uses=0] > + at .str47652 = external constant [18 x i8], align 1 ;<[18 x i8]*> [#uses=0] > + at .str54659 = external constant [11 x i8], align 1 ;<[11 x i8]*> [#uses=0] > + at .str65670 = external constant [14 x i8], align 1 ;<[14 x i8]*> [#uses=0] > + at .str66671 = external constant [19 x i8], align 1 ;<[19 x i8]*> [#uses=0] > + at .str67672 = external constant [13 x i8], align 1 ;<[13 x i8]*> [#uses=0] > + at .str68673 = external constant [9 x i8], align 1 ;<[9 x i8]*> [#uses=0] > + at .str69674 = external constant [11 x i8], align 1 ;<[11 x i8]*> [#uses=0] > + at .str70675 = external constant [12 x i8], align 1 ;<[12 x i8]*> [#uses=0] > + at .str71676 = external constant [17 x i8], align 1 ;<[17 x i8]*> [#uses=0] > + at .str72677 = external constant [16 x i8], align 1 ;<[16 x i8]*> [#uses=0] > + at .str73678 = external constant [13 x i8], align 1 ;<[13 x i8]*> [#uses=0] > + at .str74679 = external constant [9 x i8], align 1 ;<[9 x i8]*> [#uses=0] > + at .str75680 = external constant [11 x i8], align 1 ;<[11 x i8]*> [#uses=0] > + at .str76681 = external constant [10 x i8], align 1 ;<[10 x i8]*> [#uses=0] > + at .str77682 = external constant [11 x i8], align 1 ;<[11 x i8]*> [#uses=0] > + at .str78683 = external constant [6 x i8], align 1 ;<[6 x i8]*> [#uses=0] > + at .str79684 = external constant [13 x i8], align 1 ;<[13 x i8]*> [#uses=0] > + at .str80685 = external constant [19 x i8], align 1 ;<[19 x i8]*> [#uses=0] > + at .str81686 = external constant [8 x i8], align 1 ;<[8 x i8]*> [#uses=0] > + at .str82687 = external constant [24 x i8], align 1 ;<[24 x i8]*> [#uses=0] > + at .str83688 = external constant [19 x i8], align 1 ;<[19 x i8]*> [#uses=0] > + at .str84689 = external constant [22 x i8], align 1 ;<[22 x i8]*> [#uses=0] > + at .str85690 = external constant [12 x i8], align 1 ;<[12 x i8]*> [#uses=0] > + at .str86691 = external constant [12 x i8], align 1 ;<[12 x i8]*> [#uses=0] > + at .str87692 = external constant [9 x i8], align 1 ;<[9 x i8]*> [#uses=0] > + at GasmanStatAlive = external constant [81 x i64], align 32 ;<[81 x i64]*> [#uses=0] > + at GasmanStatTotal = external global [81 x i64], align 32 ;<[81 x i64]*> [#uses=0] > + at GasmanStatTSize = external global [81 x i64], align 32 ;<[81 x i64]*> [#uses=0] > + at HdStack = external global %struct.TypHeader* ;<%struct.TypHeader**> [#uses=0] > + at TopStack = external global i64 ; [#uses=0] > + at HdIdenttab = external global %struct.TypHeader* ;<%struct.TypHeader**> [#uses=1] > + at HdRectab = external global %struct.TypHeader* ;<%struct.TypHeader**> [#uses=0] > + at NrRectab = external global i64 ; [#uses=0] > + at IsUndefinedGlobal.b = external global i1 ; [#uses=0] > + at NrIdenttab = external global i64 ; [#uses=0] > + at .str710 = external constant [6 x i8], align 1 ;<[6 x i8]*> [#uses=0] > + at .str1711 = external constant [7 x i8], align 1 ;<[7 x i8]*> [#uses=0] > + at .str2712 = external constant [7 x i8], align 1 ;<[7 x i8]*> [#uses=0] > + at .str3713 = external constant [7 x i8], align 1 ;<[7 x i8]*> [#uses=0] > + at .str4714 = external constant [22 x i8], align 1 ;<[22 x i8]*> [#uses=0] > + at .str5715 = external constant [36 x i8], align 8 ;<[36 x i8]*> [#uses=0] > + at .str6716 = external constant [30 x i8], align 1 ;<[30 x i8]*> [#uses=0] > + at .str7717 = external constant [46 x i8], align 8 ;<[46 x i8]*> [#uses=0] > + at .str8718 = external constant [30 x i8], align 1 ;<[30 x i8]*> [#uses=0] > + at .str9719 = external constant [30 x i8], align 1 ;<[30 x i8]*> [#uses=0] > + at .str10720 = external constant [43 x i8], align 8 ;<[43 x i8]*> [#uses=0] > + at .str11721 = external constant [30 x i8], align 1 ;<[30 x i8]*> [#uses=0] > + at .str12722 = external constant [7 x i8], align 1 ;<[7 x i8]*> [#uses=0] > + at PrIntC = external global [1000 x i16], align 32 ;<[1000 x i16]*> [#uses=0] > + at PrIntD = external global [1205 x i16], align 32 ;<[1205 x i16]*> [#uses=0] > + at .str15725 = external constant [3 x i8], align 1 ;<[3 x i8]*> [#uses=0] > + at .str16726 = external constant [5 x i8], align 1 ;<[5 x i8]*> [#uses=0] > + at .str18728 = external constant [39 x i8], align 8 ;<[39 x i8]*> [#uses=0] > + at TabIsList = external global [28 x i64], align 32 ;<[28 x i64]*> [#uses=0] > + at TabPlainList = external global [28 x void (%struct.TypHeader*)*], align 32 ;<[28 x void (%struct.TypHeader*)*]*> [#uses=0] > + at TabIsXTypeList = external global [28 x i64 (%struct.TypHeader*)*], align 32 ;<[28 x i64 (%struct.TypHeader*)*]*> [#uses=0] > + at TabLenList = external global [28 x i64 (%struct.TypHeader*)*], align 32 ;<[28 x i64 (%struct.TypHeader*)*]*> [#uses=0] > + at TabElmlList = external global [28 x %struct.TypHeader* (%struct.TypHeader*, i64)*], align 32 ;<[28 x %struct.TypHeader* (%struct.TypHeader*, i64)*]*> [#uses=0] > + at TabElmrList = external global [28 x %struct.TypHeader* (%struct.TypHeader*, i64)*], align 32 ;<[28 x %struct.TypHeader* (%struct.TypHeader*, i64)*]*> [#uses=0] > + at TabElmList = external global [28 x %struct.TypHeader* (%struct.TypHeader*, i64)*], align 32 ;<[28 x %struct.TypHeader* (%struct.TypHeader*, i64)*]*> [#uses=0] > + at TabElmfList = external global [28 x %struct.TypHeader* (%struct.TypHeader*, i64)*], align 32 ;<[28 x %struct.TypHeader* (%struct.TypHeader*, i64)*]*> [#uses=0] > + at TabElmsList = external global [28 x %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*)*], align 32 ;<[28 x %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*)*]*> [#uses=0] > + at TabAssList = external global [28 x %struct.TypHeader* (%struct.TypHeader*, i64, %struct.TypHeader*)*], align 32 ;<[28 x %struct.TypHeader* (%struct.TypHeader*, i64, %struct.TypHeader*)*]*> [#uses=0] > + at TabAsssList = external global [28 x %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*, %struct.TypHeader*)*], align 32 ;<[28 x %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*, %struct.TypHeader*)*]*> [#uses=0] > + at TabPosList = external global [28 x i64 (%struct.TypHeader*, %struct.TypHeader*, i64)*], align 32 ;<[28 x i64 (%struct.TypHeader*, %struct.TypHeader*, i64)*]*> [#uses=0] > + at TabIsDenseList = external global [28 x i64 (%struct.TypHeader*)*], align 32 ;<[28 x i64 (%struct.TypHeader*)*]*> [#uses=0] > + at TabIsPossList = external global [28 x i64 (%struct.TypHeader*)*], align 32 ;<[28 x i64 (%struct.TypHeader*)*]*> [#uses=0] > + at TabDepthVector = external global [28 x %struct.TypHeader* (%struct.TypHeader*)*], align 32 ;<[28 x %struct.TypHeader* (%struct.TypHeader*)*]*> [#uses=0] > + at .str748 = external constant [7 x i8], align 1 ;<[7 x i8]*> [#uses=0] > + at .str1749 = external constant [9 x i8], align 1 ;<[9 x i8]*> [#uses=0] > + at .str2750 = external constant [6 x i8], align 1 ;<[6 x i8]*> [#uses=0] > + at .str3751 = external constant [7 x i8], align 1 ;<[7 x i8]*> [#uses=0] > + at .str4752 = external constant [4 x i8], align 1 ;<[4 x i8]*> [#uses=0] > + at .str5753 = external constant [7 x i8], align 1 ;<[7 x i8]*> [#uses=0] > + at .str6754 = external constant [9 x i8], align 1 ;<[9 x i8]*> [#uses=0] > + at .str7755 = external constant [9 x i8], align 1 ;<[9 x i8]*> [#uses=0] > + at .str8756 = external constant [8 x i8], align 1 ;<[8 x i8]*> [#uses=0] > + at .str9757 = external constant [9 x i8], align 1 ;<[9 x i8]*> [#uses=0] > + at .str10758 = external constant [7 x i8], align 1 ;<[7 x i8]*> [#uses=0] > + at .str11759 = external constant [8 x i8], align 1 ;<[8 x i8]*> [#uses=0] > + at .str12760 = external constant [7 x i8], align 1 ;<[7 x i8]*> [#uses=0] > + at .str13761 = external constant [12 x i8], align 1 ;<[12 x i8]*> [#uses=0] > + at .str14762 = external constant [37 x i8], align 8 ;<[37 x i8]*> [#uses=0] > + at .str15763 = external constant [28 x i8], align 1 ;<[28 x i8]*> [#uses=0] > + at .str16764 = external constant [30 x i8], align 1 ;<[30 x i8]*> [#uses=0] > + at .str17765 = external constant [31 x i8], align 8 ;<[31 x i8]*> [#uses=0] > + at .str18766 = external constant [32 x i8], align 8 ;<[32 x i8]*> [#uses=0] > + at .str19767 = external constant [33 x i8], align 8 ;<[33 x i8]*> [#uses=0] > + at .str20768 = external constant [44 x i8], align 8 ;<[44 x i8]*> [#uses=0] > + at .str21769 = external constant [39 x i8], align 8 ;<[39 x i8]*> [#uses=0] > + at .str22770 = external constant [32 x i8], align 8 ;<[32 x i8]*> [#uses=0] > + at .str23771 = external constant [24 x i8], align 1 ;<[24 x i8]*> [#uses=0] > + at .str24772 = external constant [22 x i8], align 1 ;<[22 x i8]*> [#uses=0] > + at .str25773 = external constant [34 x i8], align 8 ;<[34 x i8]*> [#uses=0] > + at .str26774 = external constant [25 x i8], align 1 ;<[25 x i8]*> [#uses=0] > + at .str27775 = external constant [37 x i8], align 8 ;<[37 x i8]*> [#uses=0] > + at .str28776 = external constant [23 x i8], align 1 ;<[23 x i8]*> [#uses=0] > + at .str29777 = external constant [37 x i8], align 8 ;<[37 x i8]*> [#uses=0] > + at .str30778 = external constant [46 x i8], align 8 ;<[46 x i8]*> [#uses=0] > + at .str31779 = external constant [66 x i8], align 8 ;<[66 x i8]*> [#uses=0] > + at .str32780 = external constant [40 x i8], align 8 ;<[40 x i8]*> [#uses=0] > + at .str33781 = external constant [62 x i8], align 8 ;<[62 x i8]*> [#uses=0] > + at .str34782 = external constant [72 x i8], align 8 ;<[72 x i8]*> [#uses=0] > + at .str35783 = external constant [47 x i8], align 8 ;<[47 x i8]*> [#uses=0] > + at .str36784 = external constant [40 x i8], align 8 ;<[40 x i8]*> [#uses=0] > + at .str37785 = external constant [63 x i8], align 8 ;<[63 x i8]*> [#uses=0] > + at .str38786 = external constant [65 x i8], align 8 ;<[65 x i8]*> [#uses=0] > + at .str39787 = external constant [45 x i8], align 8 ;<[45 x i8]*> [#uses=0] > + at .str40788 = external constant [39 x i8], align 8 ;<[39 x i8]*> [#uses=0] > + at .str41789 = external constant [61 x i8], align 8 ;<[61 x i8]*> [#uses=0] > + at .str42790 = external constant [55 x i8], align 8 ;<[55 x i8]*> [#uses=0] > + at .str43791 = external constant [46 x i8], align 8 ;<[46 x i8]*> [#uses=0] > + at .str44792 = external constant [37 x i8], align 8 ;<[37 x i8]*> [#uses=0] > + at .str45793 = external constant [69 x i8], align 8 ;<[69 x i8]*> [#uses=0] > + at .str46794 = external constant [36 x i8], align 8 ;<[36 x i8]*> [#uses=0] > + at .str47795 = external constant [52 x i8], align 8 ;<[52 x i8]*> [#uses=0] > + at .str49797 = external constant [45 x i8], align 8 ;<[45 x i8]*> [#uses=0] > + at .str50798 = external constant [30 x i8], align 1 ;<[30 x i8]*> [#uses=0] > + at .str51799 = external constant [30 x i8], align 1 ;<[30 x i8]*> [#uses=0] > + at .str52800 = external constant [31 x i8], align 8 ;<[31 x i8]*> [#uses=0] > + at .str53801 = external constant [34 x i8], align 8 ;<[34 x i8]*> [#uses=0] > + at .str54802 = external constant [30 x i8], align 1 ;<[30 x i8]*> [#uses=0] > + at .str55803 = external constant [30 x i8], align 1 ;<[30 x i8]*> [#uses=0] > + at .str56804 = external constant [34 x i8], align 8 ;<[34 x i8]*> [#uses=0] > + at .str57805 = external constant [31 x i8], align 8 ;<[31 x i8]*> [#uses=0] > + at .str58806 = external constant [31 x i8], align 8 ;<[31 x i8]*> [#uses=0] > + at .str59807 = external constant [28 x i8], align 1 ;<[28 x i8]*> [#uses=0] > + at .str60808 = external constant [27 x i8], align 1 ;<[27 x i8]*> [#uses=0] > + at .str61809 = external constant [34 x i8], align 8 ;<[34 x i8]*> [#uses=0] > + at .str62810 = external constant [32 x i8], align 8 ;<[32 x i8]*> [#uses=0] > + at .str63811 = external constant [33 x i8], align 8 ;<[33 x i8]*> [#uses=0] > + at .str64812 = external constant [33 x i8], align 8 ;<[33 x i8]*> [#uses=0] > + at .str68816 = external constant [4 x i8], align 1 ;<[4 x i8]*> [#uses=0] > + at .str69817 = external constant [4 x i8], align 1 ;<[4 x i8]*> [#uses=0] > + at .str70818 = external constant [4 x i8], align 1 ;<[4 x i8]*> [#uses=0] > + at .str71819 = external constant [4 x i8], align 1 ;<[4 x i8]*> [#uses=0] > + at .str72820 = external constant [9 x i8], align 1 ;<[9 x i8]*> [#uses=0] > + at .str73821 = external constant [10 x i8], align 1 ;<[10 x i8]*> [#uses=0] > + at .str74822 = external constant [8 x i8], align 1 ;<[8 x i8]*> [#uses=0] > + at .str75823 = external constant [6 x i8], align 1 ;<[6 x i8]*> [#uses=0] > + at .str76824 = external constant [42 x i8], align 8 ;<[42 x i8]*> [#uses=0] > + at .str77825 = external constant [42 x i8], align 8 ;<[42 x i8]*> [#uses=0] > + at .str78826 = external constant [42 x i8], align 8 ;<[42 x i8]*> [#uses=0] > + at .str832 = external constant [14 x i8], align 1 ;<[14 x i8]*> [#uses=0] > + at .str1833 = external constant [9 x i8], align 1 ;<[9 x i8]*> [#uses=0] > + at .str2834 = external constant [8 x i8], align 1 ;<[8 x i8]*> [#uses=0] > + at .str3835 = external constant [13 x i8], align 1 ;<[13 x i8]*> [#uses=0] > + at .str4836 = external constant [11 x i8], align 1 ;<[11 x i8]*> [#uses=0] > + at .str5837 = external constant [12 x i8], align 1 ;<[12 x i8]*> [#uses=0] > + at .str6838 = external constant [16 x i8], align 1 ;<[16 x i8]*> [#uses=0] > + at .str7839 = external constant [7 x i8], align 1 ;<[7 x i8]*> [#uses=0] > + at .str8840 = external constant [14 x i8], align 1 ;<[14 x i8]*> [#uses=0] > + at .str9841 = external constant [12 x i8], align 1 ;<[12 x i8]*> [#uses=0] > + at .str10842 = external constant [13 x i8], align 1 ;<[13 x i8]*> [#uses=0] > + at .str11843 = external constant [9 x i8], align 1 ;<[9 x i8]*> [#uses=0] > + at .str12844 = external constant [13 x i8], align 1 ;<[13 x i8]*> [#uses=0] > + at .str13845 = external constant [15 x i8], align 1 ;<[15 x i8]*> [#uses=0] > + at .str14846 = external constant [15 x i8], align 1 ;<[15 x i8]*> [#uses=0] > + at .str15847 = external constant [14 x i8], align 1 ;<[14 x i8]*> [#uses=0] > + at .str16848 = external constant [18 x i8], align 1 ;<[18 x i8]*> [#uses=0] > + at .str17849 = external constant [24 x i8], align 1 ;<[24 x i8]*> [#uses=0] > + at .str18850 = external constant [14 x i8], align 1 ;<[14 x i8]*> [#uses=0] > + at .str19851 = external constant [11 x i8], align 1 ;<[11 x i8]*> [#uses=0] > + at .str20852 = external constant [16 x i8], align 1 ;<[16 x i8]*> [#uses=0] > + at .str21853 = external constant [15 x i8], align 1 ;<[15 x i8]*> [#uses=0] > + at .str22854 = external constant [12 x i8], align 1 ;<[12 x i8]*> [#uses=0] > + at .str23855 = external constant [17 x i8], align 1 ;<[17 x i8]*> [#uses=0] > + at .str24856 = external constant [4 x i8], align 1 ;<[4 x i8]*> [#uses=0] > + at .str25857 = external constant [14 x i8], align 1 ;<[14 x i8]*> [#uses=0] > + at .str26858 = external constant [17 x i8], align 1 ;<[17 x i8]*> [#uses=0] > + at .str27859 = external constant [10 x i8], align 1 ;<[10 x i8]*> [#uses=0] > + at .str28860 = external constant [6 x i8], align 1 ;<[6 x i8]*> [#uses=0] > + at .str29861 = external constant [35 x i8], align 8 ;<[35 x i8]*> [#uses=0] > + at .str30862 = external constant [33 x i8], align 8 ;<[33 x i8]*> [#uses=0] > + at .str31863 = external constant [32 x i8], align 8 ;<[32 x i8]*> [#uses=0] > + at .str32864 = external constant [33 x i8], align 8 ;<[33 x i8]*> [#uses=0] > + at .str33865 = external constant [50 x i8], align 8 ;<[50 x i8]*> [#uses=0] > + at .str34866 = external constant [40 x i8], align 8 ;<[40 x i8]*> [#uses=0] > + at .str35867 = external constant [42 x i8], align 8 ;<[42 x i8]*> [#uses=0] > + at .str36868 = external constant [43 x i8], align 8 ;<[43 x i8]*> [#uses=0] > + at .str37869 = external constant [39 x i8], align 8 ;<[39 x i8]*> [#uses=0] > + at .str38870 = external constant [37 x i8], align 8 ;<[37 x i8]*> [#uses=0] > + at .str39871 = external constant [42 x i8], align 8 ;<[42 x i8]*> [#uses=0] > + at .str40872 = external constant [32 x i8], align 8 ;<[32 x i8]*> [#uses=0] > + at .str41873 = external constant [47 x i8], align 8 ;<[47 x i8]*> [#uses=0] > + at .str42874 = external constant [28 x i8], align 1 ;<[28 x i8]*> [#uses=0] > + at .str43875 = external constant [43 x i8], align 8 ;<[43 x i8]*> [#uses=0] > + at .str44876 = external constant [32 x i8], align 8 ;<[32 x i8]*> [#uses=0] > + at .str45877 = external constant [47 x i8], align 8 ;<[47 x i8]*> [#uses=0] > + at .str46878 = external constant [36 x i8], align 8 ;<[36 x i8]*> [#uses=0] > + at .str47879 = external constant [33 x i8], align 8 ;<[33 x i8]*> [#uses=0] > + at .str48880 = external constant [34 x i8], align 8 ;<[34 x i8]*> [#uses=0] > + at .str49881 = external constant [40 x i8], align 8 ;<[40 x i8]*> [#uses=0] > + at .str50882 = external constant [38 x i8], align 8 ;<[38 x i8]*> [#uses=0] > + at .str51883 = external constant [48 x i8], align 8 ;<[48 x i8]*> [#uses=0] > + at .str52884 = external constant [48 x i8], align 8 ;<[48 x i8]*> [#uses=0] > + at .str53885 = external constant [31 x i8], align 8 ;<[31 x i8]*> [#uses=0] > + at .str54886 = external constant [41 x i8], align 8 ;<[41 x i8]*> [#uses=0] > + at .str55887 = external constant [41 x i8], align 8 ;<[41 x i8]*> [#uses=0] > + at .str56888 = external constant [34 x i8], align 8 ;<[34 x i8]*> [#uses=0] > + at .str57889 = external constant [35 x i8], align 8 ;<[35 x i8]*> [#uses=0] > + at .str58890 = external constant [33 x i8], align 8 ;<[33 x i8]*> [#uses=0] > + at .str59891 = external constant [29 x i8], align 1 ;<[29 x i8]*> [#uses=0] > + at .str60892 = external constant [20 x i8], align 1 ;<[20 x i8]*> [#uses=0] > + at .str61893 = external constant [29 x i8], align 1 ;<[29 x i8]*> [#uses=0] > + at .str62894 = external constant [32 x i8], align 8 ;<[32 x i8]*> [#uses=0] > + at .str63895 = external constant [38 x i8], align 8 ;<[38 x i8]*> [#uses=0] > + at .str64896 = external constant [29 x i8], align 1 ;<[29 x i8]*> [#uses=0] > + at .str65897 = external constant [38 x i8], align 8 ;<[38 x i8]*> [#uses=0] > + at .str66898 = external constant [27 x i8], align 1 ;<[27 x i8]*> [#uses=0] > + at .str67899 = external constant [33 x i8], align 8 ;<[33 x i8]*> [#uses=0] > + at .str68900 = external constant [36 x i8], align 8 ;<[36 x i8]*> [#uses=0] > + at .str69901 = external constant [33 x i8], align 8 ;<[33 x i8]*> [#uses=0] > + at .str70902 = external constant [26 x i8], align 1 ;<[26 x i8]*> [#uses=0] > + at .str71903 = external constant [37 x i8], align 8 ;<[37 x i8]*> [#uses=0] > + at .str72904 = external constant [36 x i8], align 8 ;<[36 x i8]*> [#uses=0] > + at .str73905 = external constant [26 x i8], align 1 ;<[26 x i8]*> [#uses=0] > + at .str74906 = external constant [26 x i8], align 1 ;<[26 x i8]*> [#uses=0] > + at .str75907 = external constant [32 x i8], align 8 ;<[32 x i8]*> [#uses=0] > + at .str76908 = external constant [36 x i8], align 8 ;<[36 x i8]*> [#uses=0] > + at .str77909 = external constant [40 x i8], align 8 ;<[40 x i8]*> [#uses=0] > + at .str78910 = external constant [35 x i8], align 8 ;<[35 x i8]*> [#uses=0] > + at .str79911 = external constant [26 x i8], align 1 ;<[26 x i8]*> [#uses=0] > + at .str80912 = external constant [30 x i8], align 1 ;<[30 x i8]*> [#uses=0] > + at .str81913 = external constant [32 x i8], align 8 ;<[32 x i8]*> [#uses=0] > + at .str82914 = external constant [29 x i8], align 1 ;<[29 x i8]*> [#uses=0] > + at .str83915 = external constant [22 x i8], align 1 ;<[22 x i8]*> [#uses=0] > + at .str84916 = external constant [38 x i8], align 8 ;<[38 x i8]*> [#uses=0] > + at .str85917 = external constant [28 x i8], align 1 ;<[28 x i8]*> [#uses=0] > + at .str86918 = external constant [30 x i8], align 1 ;<[30 x i8]*> [#uses=0] > + at .str87919 = external constant [28 x i8], align 1 ;<[28 x i8]*> [#uses=0] > + at .str88920 = external constant [36 x i8], align 8 ;<[36 x i8]*> [#uses=0] > + at .str89921 = external constant [41 x i8], align 8 ;<[41 x i8]*> [#uses=0] > + at .str92924 = external constant [30 x i8], align 1 ;<[30 x i8]*> [#uses=0] > + at .str93925 = external constant [29 x i8], align 1 ;<[29 x i8]*> [#uses=0] > + at .str94926 = external constant [20 x i8], align 1 ;<[20 x i8]*> [#uses=0] > + at .str95927 = external constant [43 x i8], align 8 ;<[43 x i8]*> [#uses=0] > + at .str96928 = external constant [26 x i8], align 1 ;<[26 x i8]*> [#uses=0] > + at .str97929 = external constant [30 x i8], align 1 ;<[30 x i8]*> [#uses=0] > + at .str98930 = external constant [25 x i8], align 1 ;<[25 x i8]*> [#uses=0] > + at .str99931 = external constant [28 x i8], align 1 ;<[28 x i8]*> [#uses=0] > + at .str100932 = external constant [19 x i8], align 1 ;<[19 x i8]*> [#uses=0] > + at .str934 = external constant [7 x i8], align 1 ;<[7 x i8]*> [#uses=0] > + at .str1935 = external constant [9 x i8], align 1 ;<[9 x i8]*> [#uses=0] > + at .str2936 = external constant [22 x i8], align 1 ;<[22 x i8]*> [#uses=0] > + at .str3937 = external constant [19 x i8], align 1 ;<[19 x i8]*> [#uses=0] > + at .str4938 = external constant [13 x i8], align 1 ;<[13 x i8]*> [#uses=0] > + at .str5939 = external constant [10 x i8], align 1 ;<[10 x i8]*> [#uses=0] > + at .str6940 = external constant [9 x i8], align 1 ;<[9 x i8]*> [#uses=0] > + at .str7941 = external constant [22 x i8], align 1 ;<[22 x i8]*> [#uses=0] > + at HdPerm = external global %struct.TypHeader* ;<%struct.TypHeader**> [#uses=0] > + at .str8942 = external constant [37 x i8], align 8 ;<[37 x i8]*> [#uses=0] > + at .str9943 = external constant [39 x i8], align 8 ;<[39 x i8]*> [#uses=0] > + at .str10944 = external constant [43 x i8], align 8 ;<[43 x i8]*> [#uses=0] > + at .str11945 = external constant [41 x i8], align 8 ;<[41 x i8]*> [#uses=0] > + at .str12946 = external constant [45 x i8], align 8 ;<[45 x i8]*> [#uses=0] > + at .str13947 = external constant [49 x i8], align 8 ;<[49 x i8]*> [#uses=0] > + at .str14948 = external constant [47 x i8], align 8 ;<[47 x i8]*> [#uses=0] > + at .str15949 = external constant [39 x i8], align 8 ;<[39 x i8]*> [#uses=0] > + at .str16950 = external constant [55 x i8], align 8 ;<[55 x i8]*> [#uses=0] > + at .str17951 = external constant [23 x i8], align 1 ;<[23 x i8]*> [#uses=0] > + at .str18952 = external constant [37 x i8], align 8 ;<[37 x i8]*> [#uses=0] > + at .str19953 = external constant [29 x i8], align 1 ;<[29 x i8]*> [#uses=0] > + at .str20954 = external constant [26 x i8], align 1 ;<[26 x i8]*> [#uses=0] > + at .str21955 = external constant [39 x i8], align 8 ;<[39 x i8]*> [#uses=0] > + at .str22956 = external constant [26 x i8], align 1 ;<[26 x i8]*> [#uses=0] > + at .str23957 = external constant [37 x i8], align 8 ;<[37 x i8]*> [#uses=0] > + at .str24958 = external constant [37 x i8], align 8 ;<[37 x i8]*> [#uses=0] > + at .str25959 = external constant [41 x i8], align 8 ;<[41 x i8]*> [#uses=0] > + at .str26960 = external constant [42 x i8], align 8 ;<[42 x i8]*> [#uses=0] > + at .str27961 = external constant [38 x i8], align 8 ;<[38 x i8]*> [#uses=0] > + at .str28962 = external constant [30 x i8], align 1 ;<[30 x i8]*> [#uses=0] > + at .str29963 = external constant [39 x i8], align 8 ;<[39 x i8]*> [#uses=0] > + at .str30964 = external constant [52 x i8], align 8 ;<[52 x i8]*> [#uses=0] > + at .str31965 = external constant [27 x i8], align 1 ;<[27 x i8]*> [#uses=0] > + at .str32966 = external constant [40 x i8], align 8 ;<[40 x i8]*> [#uses=0] > + at .str33967 = external constant [11 x i8], align 1 ;<[11 x i8]*> [#uses=0] > + at .str34968 = external constant [9 x i8], align 1 ;<[9 x i8]*> [#uses=0] > + at .str35969 = external constant [11 x i8], align 1 ;<[11 x i8]*> [#uses=0] > + at .str36970 = external constant [9 x i8], align 1 ;<[9 x i8]*> [#uses=0] > + at .str37971 = external constant [11 x i8], align 1 ;<[11 x i8]*> [#uses=0] > + at .str38972 = external constant [9 x i8], align 1 ;<[9 x i8]*> [#uses=0] > + at .str39973 = external constant [11 x i8], align 1 ;<[11 x i8]*> [#uses=0] > + at .str40974 = external constant [9 x i8], align 1 ;<[9 x i8]*> [#uses=0] > + at .str41975 = external constant [11 x i8], align 1 ;<[11 x i8]*> [#uses=0] > + at .str42976 = external constant [9 x i8], align 1 ;<[9 x i8]*> [#uses=0] > + at .str44978 = external constant [3 x i8], align 1 ;<[3 x i8]*> [#uses=0] > + at .str45979 = external constant [4 x i8], align 1 ;<[4 x i8]*> [#uses=0] > + at .str48982 = external constant [2 x i8], align 1 ;<[2 x i8]*> [#uses=0] > + at .str6992 = external constant [35 x i8], align 8 ;<[35 x i8]*> [#uses=0] > + at TabNormalizeCoeffs = external global [28 x %struct.TypHeader* (%struct.TypHeader*)*], align 32 ;<[28 x %struct.TypHeader* (%struct.TypHeader*)*]*> [#uses=0] > + at TabShrinkCoeffs = external global [28 x void (%struct.TypHeader*)*], align 32 ;<[28 x void (%struct.TypHeader*)*]*> [#uses=0] > + at TabShiftedCoeffs = external global [28 x %struct.TypHeader* (%struct.TypHeader*, i64)*], align 32 ;<[28 x %struct.TypHeader* (%struct.TypHeader*, i64)*]*> [#uses=0] > + at TabAddCoeffs = external global [28 x [28 x void (%struct.TypHeader*, %struct.TypHeader*, %struct.TypHeader*)*]], align 32 ;<[28 x [28 x void (%struct.TypHeader*, %struct.TypHeader*, %struct.TypHeader*)*]]*> [#uses=0] > + at TabMultiplyCoeffs = external global [28 x [28 x i64 (%struct.TypHeader*, %struct.TypHeader*, i64, %struct.TypHeader*, i64)*]], align 32 ;<[28 x [28 x i64 (%struct.TypHeader*, %struct.TypHeader*, i64, %struct.TypHeader*, i64)*]]*> [#uses=0] > + at TabProductCoeffs = external global [28 x [28 x %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*)*]], align 32 ;<[28 x [28 x %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*)*]]*> [#uses=0] > + at TabProductCoeffsMod = external global [28 x [28 x %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*, %struct.TypHeader*)*]], align 32 ;<[28 x [28 x %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*, %struct.TypHeader*)*]]*> [#uses=0] > + at TabReduceCoeffs = external global [28 x [28 x i64 (%struct.TypHeader*, i64, %struct.TypHeader*, i64)*]], align 32 ;<[28 x [28 x i64 (%struct.TypHeader*, i64, %struct.TypHeader*, i64)*]]*> [#uses=0] > + at TabReduceCoeffsMod = external global [28 x [28 x i64 (%struct.TypHeader*, i64, %struct.TypHeader*, i64, %struct.TypHeader*)*]], align 32 ;<[28 x [28 x i64 (%struct.TypHeader*, i64, %struct.TypHeader*, i64, %struct.TypHeader*)*]]*> [#uses=0] > + at TabPowerModCoeffsInt = external global [28 x [28 x %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*, %struct.TypHeader*)*]], align 32 ;<[28 x [28 x %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*, %struct.TypHeader*)*]]*> [#uses=0] > + at TabPowerModCoeffsLInt = external global [28 x [28 x %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*, %struct.TypHeader*)*]], align 32 ;<[28 x [28 x %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*, %struct.TypHeader*)*]]*> [#uses=0] > + at .str995 = external constant [14 x i8], align 1 ;<[14 x i8]*> [#uses=0] > + at .str1996 = external constant [16 x i8], align 1 ;<[16 x i8]*> [#uses=0] > + at .str2997 = external constant [13 x i8], align 1 ;<[13 x i8]*> [#uses=0] > + at .str3998 = external constant [10 x i8], align 1 ;<[10 x i8]*> [#uses=0] > + at .str4999 = external constant [10 x i8], align 1 ;<[10 x i8]*> [#uses=0] > + at .str51000 = external constant [14 x i8], align 1 ;<[14 x i8]*> [#uses=0] > + at .str61001 = external constant [17 x i8], align 1 ;<[17 x i8]*> [#uses=0] > + at .str71002 = external constant [13 x i8], align 1 ;<[13 x i8]*> [#uses=0] > + at .str81003 = external constant [16 x i8], align 1 ;<[16 x i8]*> [#uses=0] > + at .str91004 = external constant [16 x i8], align 1 ;<[16 x i8]*> [#uses=0] > + at .str101005 = external constant [15 x i8], align 1 ;<[15 x i8]*> [#uses=0] > + at .str111006 = external constant [48 x i8], align 8 ;<[48 x i8]*> [#uses=0] > + at .str121007 = external constant [48 x i8], align 8 ;<[48 x i8]*> [#uses=0] > + at .str131008 = external constant [21 x i8], align 1 ;<[21 x i8]*> [#uses=0] > + at .str141009 = external constant [24 x i8], align 1 ;<[24 x i8]*> [#uses=0] > + at .str151010 = external constant [41 x i8], align 8 ;<[41 x i8]*> [#uses=0] > + at .str161011 = external constant [33 x i8], align 8 ;<[33 x i8]*> [#uses=0] > + at .str171012 = external constant [40 x i8], align 8 ;<[40 x i8]*> [#uses=0] > + at .str181013 = external constant [32 x i8], align 8 ;<[32 x i8]*> [#uses=0] > + at .str191014 = external constant [41 x i8], align 8 ;<[41 x i8]*> [#uses=0] > + at .str201015 = external constant [33 x i8], align 8 ;<[33 x i8]*> [#uses=0] > + at .str211016 = external constant [29 x i8], align 1 ;<[29 x i8]*> [#uses=0] > + at .str221017 = external constant [29 x i8], align 1 ;<[29 x i8]*> [#uses=0] > + at .str231018 = external constant [27 x i8], align 1 ;<[27 x i8]*> [#uses=0] > + at .str241019 = external constant [30 x i8], align 1 ;<[30 x i8]*> [#uses=0] > + at .str251020 = external constant [34 x i8], align 8 ;<[34 x i8]*> [#uses=0] > + at .str261021 = external constant [24 x i8], align 1 ;<[24 x i8]*> [#uses=0] > + at .str271022 = external constant [38 x i8], align 8 ;<[38 x i8]*> [#uses=0] > + at .str281023 = external constant [31 x i8], align 8 ;<[31 x i8]*> [#uses=0] > + at .str1025 = external constant [8 x i8], align 1 ;<[8 x i8]*> [#uses=0] > + at .str21027 = external constant [24 x i8], align 1 ;<[24 x i8]*> [#uses=0] > + at .str31028 = external constant [38 x i8], align 8 ;<[38 x i8]*> [#uses=0] > + at .str41029 = external constant [11 x i8], align 1 ;<[11 x i8]*> [#uses=0] > + at .str51030 = external constant [12 x i8], align 1 ;<[12 x i8]*> [#uses=0] > + at .str61031 = external constant [18 x i8], align 1 ;<[18 x i8]*> [#uses=0] > + at .str81033 = external constant [11 x i8], align 1 ;<[11 x i8]*> [#uses=0] > + at .str111036 = external constant [32 x i8], align 8 ;<[32 x i8]*> [#uses=0] > + at .str121037 = external constant [35 x i8], align 8 ;<[35 x i8]*> [#uses=0] > + at .str131038 = external constant [43 x i8], align 8 ;<[43 x i8]*> [#uses=0] > + at .str141039 = external constant [33 x i8], align 8 ;<[33 x i8]*> [#uses=0] > + at .str151040 = external constant [47 x i8], align 8 ;<[47 x i8]*> [#uses=0] > + at .str1044 = external constant [6 x i8], align 1 ;<[6 x i8]*> [#uses=0] > + at .str11045 = external constant [10 x i8], align 1 ;<[10 x i8]*> [#uses=0] > + at .str21046 = external constant [12 x i8], align 1 ;<[12 x i8]*> [#uses=0] > + at .str31047 = external constant [28 x i8], align 1 ;<[28 x i8]*> [#uses=0] > + at .str41048 = external constant [42 x i8], align 8 ;<[42 x i8]*> [#uses=0] > + at .str51049 = external constant [26 x i8], align 1 ;<[26 x i8]*> [#uses=0] > + at .str61050 = external constant [40 x i8], align 8 ;<[40 x i8]*> [#uses=0] > + at .str71051 = external constant [22 x i8], align 1 ;<[22 x i8]*> [#uses=0] > + at .str81052 = external constant [36 x i8], align 8 ;<[36 x i8]*> [#uses=0] > + at .str101054 = external constant [6 x i8], align 1 ;<[6 x i8]*> [#uses=0] > + at .str121056 = external constant [39 x i8], align 8 ;<[39 x i8]*> [#uses=0] > + at .str131057 = external constant [25 x i8], align 1 ;<[25 x i8]*> [#uses=0] > + at .str11060 = external constant [11 x i8], align 1 ;<[11 x i8]*> [#uses=0] > + at HdCurLHS = external global %struct.TypHeader* ;<%struct.TypHeader**> [#uses=0] > + at .str21061 = external constant [35 x i8], align 8 ;<[35 x i8]*> [#uses=0] > + at .str31062 = external constant [2 x i8], align 1 ;<[2 x i8]*> [#uses=0] > + at .str41063 = external constant [2 x i8], align 1 ;<[2 x i8]*> [#uses=0] > + at .str61065 = external constant [31 x i8], align 8 ;<[31 x i8]*> [#uses=0] > + at .str71066 = external constant [4 x i8], align 1 ;<[4 x i8]*> [#uses=0] > + at .str81067 = external constant [11 x i8], align 1 ;<[11 x i8]*> [#uses=0] > + at .str91068 = external constant [23 x i8], align 1 ;<[23 x i8]*> [#uses=0] > + at .str101069 = external constant [42 x i8], align 8 ;<[42 x i8]*> [#uses=0] > + at .str131072 = external constant [48 x i8], align 8 ;<[48 x i8]*> [#uses=0] > + at .str141073 = external constant [3 x i8], align 1 ;<[3 x i8]*> [#uses=0] > + at .str151074 = external constant [11 x i8], align 1 ;<[11 x i8]*> [#uses=0] > + at .str161075 = external constant [46 x i8], align 8 ;<[46 x i8]*> [#uses=0] > + at .str171076 = external constant [38 x i8], align 8 ;<[38 x i8]*> [#uses=0] > + at .str181077 = external constant [2 x i8], align 1 ;<[2 x i8]*> [#uses=0] > + at .str241083 = external constant [6 x i8], align 1 ;<[6 x i8]*> [#uses=0] > + at .str251084 = external constant [4 x i8], align 1 ;<[4 x i8]*> [#uses=0] > + at .str271086 = external constant [3 x i8], align 1 ;<[3 x i8]*> [#uses=0] > + at .str281087 = external constant [17 x i8], align 1 ;<[17 x i8]*> [#uses=0] > + at HdRnOp = external global %struct.TypHeader* ;<%struct.TypHeader**> [#uses=0] > + at HdRnEq = external global %struct.TypHeader* ;<%struct.TypHeader**> [#uses=0] > + at HdCallEq = external global %struct.TypHeader* ;<%struct.TypHeader**> [#uses=0] > + at HdStrEq = external global %struct.TypHeader* ;<%struct.TypHeader**> [#uses=0] > + at HdTilde = external global %struct.TypHeader* ;<%struct.TypHeader**> [#uses=0] > + at .str11093 = external constant [11 x i8], align 1 ;<[11 x i8]*> [#uses=0] > + at HdRnSum = external global %struct.TypHeader* ;<%struct.TypHeader**> [#uses=0] > + at HdCallSum = external global %struct.TypHeader* ;<%struct.TypHeader**> [#uses=0] > + at .str31096 = external constant [16 x i8], align 1 ;<[16 x i8]*> [#uses=0] > + at HdStrSum = external global %struct.TypHeader* ;<%struct.TypHeader**> [#uses=0] > + at HdRnDiff = external global %struct.TypHeader* ;<%struct.TypHeader**> [#uses=0] > + at HdCallDiff = external global %struct.TypHeader* ;<%struct.TypHeader**> [#uses=0] > + at .str51099 = external constant [16 x i8], align 1 ;<[16 x i8]*> [#uses=0] > + at HdStrDiff = external global %struct.TypHeader* ;<%struct.TypHeader**> [#uses=0] > + at HdRnProd = external global %struct.TypHeader* ;<%struct.TypHeader**> [#uses=0] > + at HdCallProd = external global %struct.TypHeader* ;<%struct.TypHeader**> [#uses=0] > + at .str71102 = external constant [16 x i8], align 1 ;<[16 x i8]*> [#uses=0] > + at HdStrProd = external global %struct.TypHeader* ;<%struct.TypHeader**> [#uses=0] > + at HdRnQuo = external global %struct.TypHeader* ;<%struct.TypHeader**> [#uses=0] > + at HdCallQuo = external global %struct.TypHeader* ;<%struct.TypHeader**> [#uses=0] > + at .str91105 = external constant [16 x i8], align 1 ;<[16 x i8]*> [#uses=0] > + at HdStrQuo = external global %struct.TypHeader* ;<%struct.TypHeader**> [#uses=0] > + at HdRnMod = external global %struct.TypHeader* ;<%struct.TypHeader**> [#uses=0] > + at HdCallMod = external global %struct.TypHeader* ;<%struct.TypHeader**> [#uses=0] > + at .str111108 = external constant [18 x i8], align 1 ;<[18 x i8]*> [#uses=0] > + at HdStrMod = external global %struct.TypHeader* ;<%struct.TypHeader**> [#uses=0] > + at HdRnPow = external global %struct.TypHeader* ;<%struct.TypHeader**> [#uses=0] > + at HdCallPow = external global %struct.TypHeader* ;<%struct.TypHeader**> [#uses=0] > + at .str131111 = external constant [16 x i8], align 1 ;<[16 x i8]*> [#uses=0] > + at HdStrPow = external global %struct.TypHeader* ;<%struct.TypHeader**> [#uses=0] > + at HdRnComm = external global %struct.TypHeader* ;<%struct.TypHeader**> [#uses=0] > + at HdCallComm = external global %struct.TypHeader* ;<%struct.TypHeader**> [#uses=0] > + at .str151114 = external constant [23 x i8], align 1 ;<[23 x i8]*> [#uses=0] > + at HdStrComm = external global %struct.TypHeader* ;<%struct.TypHeader**> [#uses=0] > + at .str171116 = external constant [16 x i8], align 1 ;<[16 x i8]*> [#uses=0] > + at HdRnLt = external global %struct.TypHeader* ;<%struct.TypHeader**> [#uses=0] > + at HdCallLt = external global %struct.TypHeader* ;<%struct.TypHeader**> [#uses=0] > + at .str191119 = external constant [16 x i8], align 1 ;<[16 x i8]*> [#uses=0] > + at HdStrLt = external global %struct.TypHeader* ;<%struct.TypHeader**> [#uses=0] > + at HdRnIn = external global %struct.TypHeader* ;<%struct.TypHeader**> [#uses=0] > + at HdCallIn = external global %struct.TypHeader* ;<%struct.TypHeader**> [#uses=0] > + at .str211122 = external constant [15 x i8], align 1 ;<[15 x i8]*> [#uses=0] > + at HdStrIn = external global %struct.TypHeader* ;<%struct.TypHeader**> [#uses=0] > + at HdRnPrint = external global %struct.TypHeader* ;<%struct.TypHeader**> [#uses=0] > + at HdCallPrint = external global %struct.TypHeader* ;<%struct.TypHeader**> [#uses=0] > + at .str231125 = external constant [15 x i8], align 1 ;<[15 x i8]*> [#uses=0] > + at HdStrPrint = external global %struct.TypHeader* ;<%struct.TypHeader**> [#uses=0] > + at .str241126 = external constant [6 x i8], align 1 ;<[6 x i8]*> [#uses=0] > + at .str251127 = external constant [10 x i8], align 1 ;<[10 x i8]*> [#uses=0] > + at .str261128 = external constant [22 x i8], align 1 ;<[22 x i8]*> [#uses=0] > + at .str271129 = external constant [36 x i8], align 8 ;<[36 x i8]*> [#uses=0] > + at .str281130 = external constant [50 x i8], align 8 ;<[50 x i8]*> [#uses=0] > + at .str291131 = external constant [50 x i8], align 8 ;<[50 x i8]*> [#uses=0] > + at .str301132 = external constant [47 x i8], align 8 ;<[47 x i8]*> [#uses=0] > + at .str311133 = external constant [49 x i8], align 8 ;<[49 x i8]*> [#uses=0] > + at .str321134 = external constant [47 x i8], align 8 ;<[47 x i8]*> [#uses=0] > + at .str331135 = external constant [47 x i8], align 8 ;<[47 x i8]*> [#uses=0] > + at .str341136 = external constant [47 x i8], align 8 ;<[47 x i8]*> [#uses=0] > + at .str351137 = external constant [47 x i8], align 8 ;<[47 x i8]*> [#uses=0] > + at .str361138 = external constant [26 x i8], align 1 ;<[26 x i8]*> [#uses=0] > + at .str371139 = external constant [34 x i8], align 8 ;<[34 x i8]*> [#uses=0] > + at .str421144 = external constant [6 x i8], align 1 ;<[6 x i8]*> [#uses=0] > + at .str661168 = external constant [7 x i8], align 1 ;<[7 x i8]*> [#uses=0] > + at .str671169 = external constant [4 x i8], align 1 ;<[4 x i8]*> [#uses=0] > + at .str681170 = external constant [12 x i8], align 1 ;<[12 x i8]*> [#uses=0] > + at .str691171 = external constant [3 x i8], align 1 ;<[3 x i8]*> [#uses=0] > + at .str711173 = external constant [9 x i8], align 1 ;<[9 x i8]*> [#uses=0] > + at .str721174 = external constant [9 x i8], align 1 ;<[9 x i8]*> [#uses=0] > + at .str731175 = external constant [6 x i8], align 1 ;<[6 x i8]*> [#uses=0] > + at .str741176 = external constant [38 x i8], align 8 ;<[38 x i8]*> [#uses=0] > + at .str761178 = external constant [49 x i8], align 8 ;<[49 x i8]*> [#uses=0] > + at .str771179 = external constant [49 x i8], align 8 ;<[49 x i8]*> [#uses=0] > + at .str781180 = external constant [48 x i8], align 8 ;<[48 x i8]*> [#uses=0] > + at .str791181 = external constant [37 x i8], align 8 ;<[37 x i8]*> [#uses=0] > + at Logfile = external global i64 ; [#uses=0] > + at Input = external global %struct.TypInputFile* ;<%struct.TypInputFile**> [#uses=0] > + at TestInput = external global i64 ; [#uses=0] > + at In = external global i8* ; [#uses=0] > + at Symbol = external global i64 ; [#uses=0] > + at TestOutput = external global i64 ; [#uses=0] > + at TestLine = external global [256 x i8], align 32 ;<[256 x i8]*> [#uses=0] > + at InputLogfile = external global i64 ; [#uses=0] > + at InputFiles = external global [16 x %struct.TypInputFile], align 32 ;<[16 x %struct.TypInputFile]*> [#uses=0] > + at .str1187 = external constant [2 x i8], align 1 ;<[2 x i8]*> [#uses=0] > + at Output = external global %struct.TypOutputFile* ;<%struct.TypOutputFile**> [#uses=0] > + at OutputFiles = external global [16 x %struct.TypOutputFile], align 32 ;<[16 x %struct.TypOutputFile]*> [#uses=0] > + at .str21189 = external constant [2 x i8], align 1 ;<[2 x i8]*> [#uses=0] > + at .str41191 = external constant [2 x i8], align 1 ;<[2 x i8]*> [#uses=0] > + at .str51192 = external constant [8 x i8], align 1 ;<[8 x i8]*> [#uses=0] > + at .str61193 = external constant [9 x i8], align 1 ;<[9 x i8]*> [#uses=0] > + at .str71194 = external constant [14 x i8], align 1 ;<[14 x i8]*> [#uses=0] > + at NrError = external global i64 ; [#uses=0] > + at NrErrLine = external global i64 ; [#uses=0] > + at .str91198 = external constant [17 x i8], align 1 ;<[17 x i8]*> [#uses=0] > + at .str101199 = external constant [15 x i8], align 1 ;<[15 x i8]*> [#uses=0] > + at .str131202 = external constant [2 x i8], align 1 ;<[2 x i8]*> [#uses=0] > + at .str141203 = external constant [2 x i8], align 1 ;<[2 x i8]*> [#uses=0] > + at .str151204 = external constant [3 x i8], align 1 ;<[3 x i8]*> [#uses=0] > + at Prompt = external global i8* ; [#uses=0] > + at .str161206 = external constant [5 x i8], align 1 ;<[5 x i8]*> [#uses=0] > + at Value = external global [1024 x i8], align 32 ;<[1024 x i8]*> [#uses=0] > + at .str171208 = external constant [43 x i8], align 8 ;<[43 x i8]*> [#uses=0] > + at .str181209 = external constant [34 x i8], align 8 ;<[34 x i8]*> [#uses=0] > + at .str191210 = external constant [42 x i8], align 8 ;<[42 x i8]*> [#uses=0] > + at .str201211 = external constant [43 x i8], align 8 ;<[43 x i8]*> [#uses=0] > + at .str211212 = external constant [40 x i8], align 8 ;<[40 x i8]*> [#uses=0] > + at .str431234 = external constant [10 x i8], align 1 ;<[10 x i8]*> [#uses=0] > + at .str1250 = external constant [4 x i8], align 1 ;<[4 x i8]*> [#uses=0] > + at .str11251 = external constant [6 x i8], align 1 ;<[6 x i8]*> [#uses=0] > + at .str21252 = external constant [11 x i8], align 1 ;<[11 x i8]*> [#uses=0] > + at .str31253 = external constant [12 x i8], align 1 ;<[12 x i8]*> [#uses=0] > + at .str41254 = external constant [7 x i8], align 1 ;<[7 x i8]*> [#uses=0] > + at .str51255 = external constant [10 x i8], align 1 ;<[10 x i8]*> [#uses=0] > + at .str61256 = external constant [9 x i8], align 1 ;<[9 x i8]*> [#uses=0] > + at .str71257 = external constant [13 x i8], align 1 ;<[13 x i8]*> [#uses=0] > + at .str81258 = external constant [12 x i8], align 1 ;<[12 x i8]*> [#uses=0] > + at HdUnion = external global %struct.TypHeader* ;<%struct.TypHeader**> [#uses=0] > + at .str111261 = external constant [33 x i8], align 8 ;<[33 x i8]*> [#uses=0] > + at .str121262 = external constant [38 x i8], align 8 ;<[38 x i8]*> [#uses=0] > + at .str131263 = external constant [46 x i8], align 8 ;<[46 x i8]*> [#uses=0] > + at .str141264 = external constant [30 x i8], align 1 ;<[30 x i8]*> [#uses=0] > + at .str151265 = external constant [35 x i8], align 8 ;<[35 x i8]*> [#uses=0] > + at .str161266 = external constant [43 x i8], align 8 ;<[43 x i8]*> [#uses=0] > + at .str171267 = external constant [22 x i8], align 1 ;<[22 x i8]*> [#uses=0] > + at .str181268 = external constant [36 x i8], align 8 ;<[36 x i8]*> [#uses=0] > + at .str191269 = external constant [37 x i8], align 8 ;<[37 x i8]*> [#uses=0] > + at .str201270 = external constant [34 x i8], align 8 ;<[34 x i8]*> [#uses=0] > + at .str211271 = external constant [35 x i8], align 8 ;<[35 x i8]*> [#uses=0] > + at .str221272 = external constant [38 x i8], align 8 ;<[38 x i8]*> [#uses=0] > + at .str231273 = external constant [35 x i8], align 8 ;<[35 x i8]*> [#uses=0] > + at .str241274 = external constant [36 x i8], align 8 ;<[36 x i8]*> [#uses=0] > + at .str251275 = external constant [34 x i8], align 8 ;<[34 x i8]*> [#uses=0] > + at .str261276 = external constant [31 x i8], align 8 ;<[31 x i8]*> [#uses=0] > + at .str271277 = external constant [32 x i8], align 8 ;<[32 x i8]*> [#uses=0] > + at .str281278 = external constant [37 x i8], align 8 ;<[37 x i8]*> [#uses=0] > + at .str291279 = external constant [35 x i8], align 8 ;<[35 x i8]*> [#uses=0] > + at .str301280 = external constant [35 x i8], align 8 ;<[35 x i8]*> [#uses=0] > + at .str311281 = external constant [36 x i8], align 8 ;<[36 x i8]*> [#uses=0] > + at .str321282 = external constant [34 x i8], align 8 ;<[34 x i8]*> [#uses=0] > + at .str331283 = external constant [34 x i8], align 8 ;<[34 x i8]*> [#uses=0] > + at .str341284 = external constant [20 x i8], align 1 ;<[20 x i8]*> [#uses=0] > + at .str351285 = external constant [27 x i8], align 1 ;<[27 x i8]*> [#uses=0] > + at StrStat = external global i8* ; [#uses=0] > + at HdStat = external global %struct.TypHeader* ;<%struct.TypHeader**> [#uses=0] > + at .str11292 = external constant [11 x i8], align 1 ;<[11 x i8]*> [#uses=0] > + at .str21293 = external constant [15 x i8], align 1 ;<[15 x i8]*> [#uses=0] > + at .str41295 = external constant [10 x i8], align 1 ;<[10 x i8]*> [#uses=0] > + at .str51296 = external constant [12 x i8], align 1 ;<[12 x i8]*> [#uses=0] > + at .str61297 = external constant [8 x i8], align 1 ;<[8 x i8]*> [#uses=0] > + at .str71298 = external constant [8 x i8], align 1 ;<[8 x i8]*> [#uses=0] > + at .str81299 = external constant [12 x i8], align 1 ;<[12 x i8]*> [#uses=0] > + at .str91300 = external constant [7 x i8], align 1 ;<[7 x i8]*> [#uses=0] > + at .str101301 = external constant [9 x i8], align 1 ;<[9 x i8]*> [#uses=0] > + at .str111302 = external constant [14 x i8], align 1 ;<[14 x i8]*> [#uses=0] > + at .str131304 = external constant [9 x i8], align 1 ;<[9 x i8]*> [#uses=0] > + at .str151306 = external constant [3 x i8], align 1 ;<[3 x i8]*> [#uses=0] > + at .str161307 = external constant [4 x i8], align 1 ;<[4 x i8]*> [#uses=0] > + at .str171308 = external constant [6 x i8], align 1 ;<[6 x i8]*> [#uses=0] > + at .str181309 = external constant [46 x i8], align 8 ;<[46 x i8]*> [#uses=0] > + at .str191310 = external constant [7 x i8], align 1 ;<[7 x i8]*> [#uses=0] > + at .str201311 = external constant [50 x i8], align 8 ;<[50 x i8]*> [#uses=0] > + at .str211312 = external constant [15 x i8], align 1 ;<[15 x i8]*> [#uses=0] > + at .str221313 = external constant [7 x i8], align 1 ;<[7 x i8]*> [#uses=0] > + at .str231314 = external constant [48 x i8], align 8 ;<[48 x i8]*> [#uses=0] > + at .str241315 = external constant [49 x i8], align 8 ;<[49 x i8]*> [#uses=0] > + at .str251316 = external constant [15 x i8], align 1 ;<[15 x i8]*> [#uses=0] > + at .str281319 = external constant [5 x i8], align 1 ;<[5 x i8]*> [#uses=0] > + at .str291320 = external constant [36 x i8], align 8 ;<[36 x i8]*> [#uses=0] > + at HdChars = external global [256 x %struct.TypHeader*], align 32 ;<[256 x %struct.TypHeader*]*> [#uses=0] > + at .str1322 = external constant [9 x i8], align 1 ;<[9 x i8]*> [#uses=0] > + at .str31326 = external constant [25 x i8], align 1 ;<[25 x i8]*> [#uses=0] > + at .str41327 = external constant [39 x i8], align 8 ;<[39 x i8]*> [#uses=0] > + at .str61329 = external constant [2 x i8], align 1 ;<[2 x i8]*> [#uses=0] > + at .str71330 = external constant [3 x i8], align 1 ;<[3 x i8]*> [#uses=0] > + at .str81331 = external constant [3 x i8], align 1 ;<[3 x i8]*> [#uses=0] > + at .str91332 = external constant [3 x i8], align 1 ;<[3 x i8]*> [#uses=0] > + at .str101333 = external constant [3 x i8], align 1 ;<[3 x i8]*> [#uses=0] > + at .str111334 = external constant [3 x i8], align 1 ;<[3 x i8]*> [#uses=0] > + at .str121335 = external constant [3 x i8], align 1 ;<[3 x i8]*> [#uses=0] > + at .str131336 = external constant [3 x i8], align 1 ;<[3 x i8]*> [#uses=0] > + at .str151338 = external constant [5 x i8], align 1 ;<[5 x i8]*> [#uses=0] > + at .str161339 = external constant [5 x i8], align 1 ;<[5 x i8]*> [#uses=0] > + at .str171340 = external constant [5 x i8], align 1 ;<[5 x i8]*> [#uses=0] > + at .str181341 = external constant [5 x i8], align 1 ;<[5 x i8]*> [#uses=0] > + at .str191342 = external constant [5 x i8], align 1 ;<[5 x i8]*> [#uses=0] > + at .str201343 = external constant [5 x i8], align 1 ;<[5 x i8]*> [#uses=0] > + at .str211344 = external constant [5 x i8], align 1 ;<[5 x i8]*> [#uses=0] > + at .str221345 = external constant [5 x i8], align 1 ;<[5 x i8]*> [#uses=0] > + at SyFlags = external global [13 x i8] ;<[13 x i8]*> [#uses=0] > + at syLastIntr = external global i64 ; [#uses=0] > + at syWorkspace = external global i8* ; [#uses=0] > + at stderr = external global %struct._IO_FILE* ;<%struct._IO_FILE**> [#uses=0] > + at .str1350 = external constant [38 x i8], align 8 ;<[38 x i8]*> [#uses=0] > + at syStartTime = external global i64 ; [#uses=0] > + at .str11351 = external constant [52 x i8], align 8 ;<[52 x i8]*> [#uses=0] > + at syBuf = external global [16 x %0], align 32 ;<[16 x %0]*> [#uses=0] > + at syWindow.b = external global i1 ; [#uses=0] > + at syOld = external global %struct.termio, align 16 ;<%struct.termio*> [#uses=0] > + at .str21352 = external constant [43 x i8], align 8 ;<[43 x i8]*> [#uses=0] > + at syFid = external global i64 ; [#uses=0] > + at .str31353 = external constant [51 x i8], align 8 ;<[51 x i8]*> [#uses=0] > + at .str41354 = external constant [36 x i8], align 8 ;<[36 x i8]*> [#uses=0] > + at .str51355 = external constant [33 x i8], align 8 ;<[33 x i8]*> [#uses=0] > + at stdin = external global %struct._IO_FILE* ;<%struct._IO_FILE**> [#uses=0] > + at stdout = external global %struct._IO_FILE* ;<%struct._IO_FILE**> [#uses=0] > + at .str121362 = external constant [42 x i8], align 8 ;<[42 x i8]*> [#uses=0] > + at .str131363 = external constant [4 x i8], align 1 ;<[4 x i8]*> [#uses=0] > + at SyBanner = external global i64 ; [#uses=0] > + at SyGasman = external global i64 ; [#uses=0] > + at .str141366 = external constant [41 x i8], align 8 ;<[41 x i8]*> [#uses=0] > + at SyLibname = external global [256 x i8], align 32 ;<[256 x i8]*> [#uses=0] > + at .str161369 = external constant [41 x i8], align 8 ;<[41 x i8]*> [#uses=0] > + at SyHelpname = external global [256 x i8], align 32 ;<[256 x i8]*> [#uses=0] > + at .str171370 = external constant [41 x i8], align 8 ;<[41 x i8]*> [#uses=0] > + at SyMemory = external global i64 ; [#uses=0] > + at .str181372 = external constant [41 x i8], align 8 ;<[41 x i8]*> [#uses=0] > + at syLineEdit = external global i64 ; [#uses=0] > + at SyQuiet = external global i64 ; [#uses=0] > + at .str191374 = external constant [41 x i8], align 8 ;<[41 x i8]*> [#uses=0] > + at SyNrCols = external global i64 ; [#uses=0] > + at .str201376 = external constant [41 x i8], align 8 ;<[41 x i8]*> [#uses=0] > + at SyNrRows = external global i64 ; [#uses=0] > + at syCTRD = external global i64 ; [#uses=0] > + at .str211378 = external constant [3 x i8], align 1 ;<[3 x i8]*> [#uses=0] > + at .str231380 = external constant [7 x i8], align 1 ;<[7 x i8]*> [#uses=0] > + at .str241381 = external constant [22 x i8], align 1 ;<[22 x i8]*> [#uses=0] > + at SyInitfiles = external global [16 x [256 x i8]], align 32 ;<[16 x [256 x i8]]*> [#uses=0] > + at .str251383 = external constant [28 x i8], align 1 ;<[28 x i8]*> [#uses=0] > + at .str261384 = external constant [7 x i8], align 1 ;<[7 x i8]*> [#uses=0] > + at .str271385 = external constant [26 x i8], align 1 ;<[26 x i8]*> [#uses=0] > + at .str281386 = external constant [43 x i8], align 8 ;<[43 x i8]*> [#uses=0] > + at .str291387 = external constant [5 x i8], align 1 ;<[5 x i8]*> [#uses=0] > + at .str301388 = external constant [8 x i8], align 1 ;<[8 x i8]*> [#uses=0] > + at .str311389 = external constant [47 x i8], align 8 ;<[47 x i8]*> [#uses=0] > + at .str321390 = external constant [56 x i8], align 8 ;<[56 x i8]*> [#uses=0] > + at .str331391 = external constant [53 x i8], align 8 ;<[53 x i8]*> [#uses=0] > + at .str341392 = external constant [22 x i8], align 1 ;<[22 x i8]*> [#uses=0] > + at .str351393 = external constant [54 x i8], align 8 ;<[54 x i8]*> [#uses=0] > + at .str361394 = external constant [3 x i8], align 1 ;<[3 x i8]*> [#uses=0] > + at .str371395 = external constant [7 x i8], align 1 ;<[7 x i8]*> [#uses=0] > + at .str381396 = external constant [38 x i8], align 8 ;<[38 x i8]*> [#uses=0] > + at .str391397 = external constant [3 x i8], align 1 ;<[3 x i8]*> [#uses=0] > + at WinCmdBuffer = external global [8000 x i8], align 32 ;<[8000 x i8]*> [#uses=0] > + at .str401398 = external constant [27 x i8], align 1 ;<[27 x i8]*> [#uses=0] > + at syNrchar = external global i64 ; [#uses=0] > + at syPrompt = external global [256 x i8], align 32 ;<[256 x i8]*> [#uses=0] > + at .str411399 = external constant [3 x i8], align 1 ;<[3 x i8]*> [#uses=0] > + at .str421400 = external constant [3 x i8], align 1 ;<[3 x i8]*> [#uses=0] > + at .str431401 = external constant [3 x i8], align 1 ;<[3 x i8]*> [#uses=0] > + at .str441402 = external constant [3 x i8], align 1 ;<[3 x i8]*> [#uses=0] > + at .str451403 = external constant [3 x i8], align 1 ;<[3 x i8]*> [#uses=0] > + at syNew = external global %struct.termio, align 16 ;<%struct.termio*> [#uses=0] > + at syStopTime = external global i64 ; [#uses=0] > + at syHistory = external global [8192 x i8], align 32 ;<[8192 x i8]*> [#uses=0] > + at syCTRO = external global i32 ; [#uses=0] > + at yank.3948 = external global [512 x i8], align 32 ;<[512 x i8]*> [#uses=0] > + at syHi = external global i8* ; [#uses=0] > + at .str461404 = external constant [3 x i8], align 1 ;<[3 x i8]*> [#uses=0] > + at .str471405 = external constant [6 x i8], align 1 ;<[6 x i8]*> [#uses=0] > + at .str491407 = external constant [36 x i8], align 8 ;<[36 x i8]*> [#uses=0] > + at .str501408 = external constant [3 x i8], align 1 ;<[3 x i8]*> [#uses=0] > + at .str511409 = external constant [3 x i8], align 1 ;<[3 x i8]*> [#uses=0] > + at .str521410 = external constant [3 x i8], align 1 ;<[3 x i8]*> [#uses=0] > + at syLastIndex = external global i16 ; [#uses=0] > + at syLastTopics = external global [16 x [64 x i8]], align 32 ;<[16 x [64 x i8]]*> [#uses=0] > + at .str551413 = external constant [3 x i8], align 1 ;<[3 x i8]*> [#uses=0] > + at .str561414 = external constant [3 x i8], align 1 ;<[3 x i8]*> [#uses=0] > + at .str571415 = external constant [44 x i8], align 8 ;<[44 x i8]*> [#uses=0] > + at .str581416 = external constant [15 x i8], align 1 ;<[15 x i8]*> [#uses=0] > + at .str591417 = external constant [50 x i8], align 8 ;<[50 x i8]*> [#uses=0] > + at .str601418 = external constant [30 x i8], align 1 ;<[30 x i8]*> [#uses=0] > + at .str611419 = external constant [21 x i8], align 1 ;<[21 x i8]*> [#uses=0] > + at .str621420 = external constant [50 x i8], align 8 ;<[50 x i8]*> [#uses=0] > + at .str631421 = external constant [4 x i8], align 1 ;<[4 x i8]*> [#uses=0] > + at .str641422 = external constant [50 x i8], align 8 ;<[50 x i8]*> [#uses=0] > + at .str651423 = external constant [18 x i8], align 1 ;<[18 x i8]*> [#uses=0] > + at .str661424 = external constant [50 x i8], align 8 ;<[50 x i8]*> [#uses=0] > + at .str671425 = external constant [26 x i8], align 1 ;<[26 x i8]*> [#uses=0] > + at .str681426 = external constant [50 x i8], align 8 ;<[50 x i8]*> [#uses=0] > + at .str691427 = external constant [29 x i8], align 1 ;<[29 x i8]*> [#uses=0] > + at .str701428 = external constant [50 x i8], align 8 ;<[50 x i8]*> [#uses=0] > + at .str711429 = external constant [30 x i8], align 1 ;<[30 x i8]*> [#uses=0] > + at .str721430 = external constant [50 x i8], align 8 ;<[50 x i8]*> [#uses=0] > + at .str731431 = external constant [30 x i8], align 1 ;<[30 x i8]*> [#uses=0] > + at .str741432 = external constant [50 x i8], align 8 ;<[50 x i8]*> [#uses=0] > + at .str751433 = external constant [11 x i8], align 1 ;<[11 x i8]*> [#uses=0] > + at .str761434 = external constant [9 x i8], align 1 ;<[9 x i8]*> [#uses=0] > + at .str771435 = external constant [9 x i8], align 1 ;<[9 x i8]*> [#uses=0] > + at .str781436 = external constant [11 x i8], align 1 ;<[11 x i8]*> [#uses=0] > + at .str791437 = external constant [47 x i8], align 8 ;<[47 x i8]*> [#uses=0] > + at .str801438 = external constant [3 x i8], align 1 ;<[3 x i8]*> [#uses=0] > + at .str811439 = external constant [38 x i8], align 8 ;<[38 x i8]*> [#uses=0] > + at .str821440 = external constant [40 x i8], align 8 ;<[40 x i8]*> [#uses=0] > + at .str831441 = external constant [40 x i8], align 8 ;<[40 x i8]*> [#uses=0] > + at .str841442 = external constant [46 x i8], align 8 ;<[46 x i8]*> [#uses=0] > + at .str851443 = external constant [27 x i8], align 1 ;<[27 x i8]*> [#uses=0] > + at .str861444 = external constant [27 x i8], align 1 ;<[27 x i8]*> [#uses=0] > + at .str871445 = external constant [27 x i8], align 1 ;<[27 x i8]*> [#uses=0] > + at .str881446 = external constant [5 x i8], align 1 ;<[5 x i8]*> [#uses=0] > + at .str891447 = external constant [9 x i8], align 1 ;<[9 x i8]*> [#uses=0] > + at .str901448 = external constant [9 x i8], align 1 ;<[9 x i8]*> [#uses=0] > + at .str911449 = external constant [40 x i8], align 8 ;<[40 x i8]*> [#uses=0] > + at .str921450 = external constant [9 x i8], align 1 ;<[9 x i8]*> [#uses=0] > + at .str931451 = external constant [10 x i8], align 1 ;<[10 x i8]*> [#uses=0] > + at .str941452 = external constant [10 x i8], align 1 ;<[10 x i8]*> [#uses=0] > + at .str951453 = external constant [13 x i8], align 1 ;<[13 x i8]*> [#uses=0] > + at .str961454 = external constant [39 x i8], align 8 ;<[39 x i8]*> [#uses=0] > + at .str971455 = external constant [39 x i8], align 8 ;<[39 x i8]*> [#uses=0] > + at .str981456 = external constant [40 x i8], align 8 ;<[40 x i8]*> [#uses=0] > + at .str991457 = external constant [40 x i8], align 8 ;<[40 x i8]*> [#uses=0] > + at .str1001458 = external constant [15 x i8], align 1 ;<[15 x i8]*> [#uses=0] > + at .str1011459 = external constant [8 x i8], align 1 ;<[8 x i8]*> [#uses=0] > + at .str1021460 = external constant [24 x i8], align 1 ;<[24 x i8]*> [#uses=0] > + at .str1031461 = external constant [32 x i8], align 8 ;<[32 x i8]*> [#uses=0] > + at .str1041462 = external constant [11 x i8], align 1 ;<[11 x i8]*> [#uses=0] > + at .str1051463 = external constant [35 x i8], align 8 ;<[35 x i8]*> [#uses=0] > + at .str1061464 = external constant [67 x i8], align 8 ;<[67 x i8]*> [#uses=0] > + at .str1071465 = external constant [6 x i8], align 1 ;<[6 x i8]*> [#uses=0] > + at .str1081466 = external constant [29 x i8], align 1 ;<[29 x i8]*> [#uses=0] > + at .str1111469 = external constant [41 x i8], align 8 ;<[41 x i8]*> [#uses=0] > + at .str1121470 = external constant [40 x i8], align 8 ;<[40 x i8]*> [#uses=0] > + at .str1131471 = external constant [47 x i8], align 8 ;<[47 x i8]*> [#uses=0] > + at .str1141472 = external constant [43 x i8], align 8 ;<[43 x i8]*> [#uses=0] > + at .str1151473 = external constant [41 x i8], align 8 ;<[41 x i8]*> [#uses=0] > + at syChapnames = external global [128 x [16 x i8]], align 32 ;<[128 x [16 x i8]]*> [#uses=0] > + at .str1161474 = external constant [11 x i8], align 1 ;<[11 x i8]*> [#uses=0] > + at .str1171475 = external constant [36 x i8], align 8 ;<[36 x i8]*> [#uses=0] > + at .str1181476 = external constant [10 x i8], align 1 ;<[10 x i8]*> [#uses=0] > + at .str1191477 = external constant [5 x i8], align 1 ;<[5 x i8]*> [#uses=0] > + at .str1201478 = external constant [37 x i8], align 8 ;<[37 x i8]*> [#uses=0] > + at .str1211479 = external constant [10 x i8], align 1 ;<[10 x i8]*> [#uses=0] > + at .str1221480 = external constant [10 x i8], align 1 ;<[10 x i8]*> [#uses=0] > + at .str1231481 = external constant [31 x i8], align 8 ;<[31 x i8]*> [#uses=0] > + at .str1241482 = external constant [20 x i8], align 1 ;<[20 x i8]*> [#uses=0] > + at .str1251483 = external constant [71 x i8], align 8 ;<[71 x i8]*> [#uses=0] > + at .str1261484 = external constant [8 x i8], align 1 ;<[8 x i8]*> [#uses=0] > + at .str1271485 = external constant [9 x i8], align 1 ;<[9 x i8]*> [#uses=0] > + at .str1281486 = external constant [8 x i8], align 1 ;<[8 x i8]*> [#uses=0] > + at .str129 = external constant [6 x i8], align 1 ;<[6 x i8]*> [#uses=0] > + at .str130 = external constant [17 x i8], align 1 ;<[17 x i8]*> [#uses=0] > + at .str131 = external constant [2 x i8], align 1 ;<[2 x i8]*> [#uses=0] > + at .str132 = external constant [9 x i8], align 1 ;<[9 x i8]*> [#uses=0] > + at .str1504 = external constant [10 x i8], align 1 ;<[10 x i8]*> [#uses=0] > + at .str11505 = external constant [7 x i8], align 1 ;<[7 x i8]*> [#uses=0] > + at .str21506 = external constant [8 x i8], align 1 ;<[8 x i8]*> [#uses=0] > + at .str31507 = external constant [15 x i8], align 1 ;<[15 x i8]*> [#uses=0] > + at .str41508 = external constant [14 x i8], align 1 ;<[14 x i8]*> [#uses=0] > + at .str51509 = external constant [16 x i8], align 1 ;<[16 x i8]*> [#uses=0] > + at .str61510 = external constant [14 x i8], align 1 ;<[14 x i8]*> [#uses=0] > + at .str71511 = external constant [19 x i8], align 1 ;<[19 x i8]*> [#uses=0] > + at .str81512 = external constant [10 x i8], align 1 ;<[10 x i8]*> [#uses=0] > + at .str91513 = external constant [38 x i8], align 8 ;<[38 x i8]*> [#uses=0] > + at .str101514 = external constant [23 x i8], align 1 ;<[23 x i8]*> [#uses=0] > + at .str111515 = external constant [29 x i8], align 1 ;<[29 x i8]*> [#uses=0] > + at .str121516 = external constant [29 x i8], align 1 ;<[29 x i8]*> [#uses=0] > + at .str131517 = external constant [38 x i8], align 8 ;<[38 x i8]*> [#uses=0] > + at .str141518 = external constant [62 x i8], align 8 ;<[62 x i8]*> [#uses=0] > + at .str151519 = external constant [28 x i8], align 1 ;<[28 x i8]*> [#uses=0] > + at .str161520 = external constant [26 x i8], align 1 ;<[26 x i8]*> [#uses=0] > + at .str171521 = external constant [44 x i8], align 8 ;<[44 x i8]*> [#uses=0] > + at .str181522 = external constant [26 x i8], align 1 ;<[26 x i8]*> [#uses=0] > + at .str191523 = external constant [36 x i8], align 8 ;<[36 x i8]*> [#uses=0] > + at .str201524 = external constant [29 x i8], align 1 ;<[29 x i8]*> [#uses=0] > + at .str211525 = external constant [36 x i8], align 8 ;<[36 x i8]*> [#uses=0] > + at .str221526 = external constant [29 x i8], align 1 ;<[29 x i8]*> [#uses=0] > + at .str231527 = external constant [30 x i8], align 1 ;<[30 x i8]*> [#uses=0] > + at .str241528 = external constant [37 x i8], align 8 ;<[37 x i8]*> [#uses=0] > + at .str251529 = external constant [31 x i8], align 8 ;<[31 x i8]*> [#uses=0] > + at .str261530 = external constant [33 x i8], align 8 ;<[33 x i8]*> [#uses=0] > + at .str271531 = external constant [63 x i8], align 8 ;<[63 x i8]*> [#uses=0] > + at .str281532 = external constant [40 x i8], align 8 ;<[40 x i8]*> [#uses=0] > + at .str291533 = external constant [39 x i8], align 8 ;<[39 x i8]*> [#uses=0] > + at .str301534 = external constant [57 x i8], align 8 ;<[57 x i8]*> [#uses=0] > + at .str311535 = external constant [28 x i8], align 1 ;<[28 x i8]*> [#uses=0] > + at .str321536 = external constant [42 x i8], align 8 ;<[42 x i8]*> [#uses=0] > + at .str331537 = external constant [54 x i8], align 8 ;<[54 x i8]*> [#uses=0] > + at .str341538 = external constant [36 x i8], align 8 ;<[36 x i8]*> [#uses=0] > + at .str351539 = external constant [43 x i8], align 8 ;<[43 x i8]*> [#uses=0] > + at .str361540 = external constant [47 x i8], align 8 ;<[47 x i8]*> [#uses=0] > + at .str371541 = external constant [63 x i8], align 8 ;<[63 x i8]*> [#uses=0] > + at .str381542 = external constant [33 x i8], align 8 ;<[33 x i8]*> [#uses=0] > + at .str391543 = external constant [23 x i8], align 1 ;<[23 x i8]*> [#uses=0] > + at .str401544 = external constant [41 x i8], align 8 ;<[41 x i8]*> [#uses=0] > + at .str411545 = external constant [47 x i8], align 8 ;<[47 x i8]*> [#uses=0] > + at .str421546 = external constant [31 x i8], align 8 ;<[31 x i8]*> [#uses=0] > + at .str431547 = external constant [25 x i8], align 1 ;<[25 x i8]*> [#uses=0] > + at .str441548 = external constant [41 x i8], align 8 ;<[41 x i8]*> [#uses=0] > + at .str451549 = external constant [30 x i8], align 1 ;<[30 x i8]*> [#uses=0] > + at .str461550 = external constant [40 x i8], align 8 ;<[40 x i8]*> [#uses=0] > + at .str471551 = external constant [33 x i8], align 8 ;<[33 x i8]*> [#uses=0] > + at .str1553 = external constant [8 x i8], align 1 ;<[8 x i8]*> [#uses=0] > + at .str11554 = external constant [10 x i8], align 1 ;<[10 x i8]*> [#uses=0] > + at .str21555 = external constant [26 x i8], align 1 ;<[26 x i8]*> [#uses=0] > + at .str31556 = external constant [40 x i8], align 8 ;<[40 x i8]*> [#uses=0] > + at .str41557 = external constant [33 x i8], align 8 ;<[33 x i8]*> [#uses=0] > + at .str51558 = external constant [40 x i8], align 8 ;<[40 x i8]*> [#uses=0] > + at LargestUnknown = external global i64 ; [#uses=0] > + at .str61559 = external constant [44 x i8], align 8 ;<[44 x i8]*> [#uses=0] > + at .str81561 = external constant [43 x i8], align 8 ;<[43 x i8]*> [#uses=0] > + at .str91562 = external constant [16 x i8], align 1 ;<[16 x i8]*> [#uses=0] > + at HdVecFFEL = external global %struct.TypHeader* ;<%struct.TypHeader**> [#uses=0] > + at HdVecFFER = external global %struct.TypHeader* ;<%struct.TypHeader**> [#uses=0] > + at TabIntVecFFE = external global [28 x %struct.TypHeader* (%struct.TypHeader*, i64)*], align 32 ;<[28 x %struct.TypHeader* (%struct.TypHeader*, i64)*]*> [#uses=0] > + at .str1564 = external constant [8 x i8], align 1 ;<[8 x i8]*> [#uses=0] > + at .str11565 = external constant [10 x i8], align 1 ;<[10 x i8]*> [#uses=0] > + at .str21566 = external constant [10 x i8], align 1 ;<[10 x i8]*> [#uses=0] > + at .str31567 = external constant [10 x i8], align 1 ;<[10 x i8]*> [#uses=0] > + at .str41568 = external constant [11 x i8], align 1 ;<[11 x i8]*> [#uses=0] > + at .str51569 = external constant [13 x i8], align 1 ;<[13 x i8]*> [#uses=0] > + at .str61570 = external constant [48 x i8], align 8 ;<[48 x i8]*> [#uses=0] > + at .str91573 = external constant [50 x i8], align 8 ;<[50 x i8]*> [#uses=0] > + at .str101574 = external constant [48 x i8], align 8 ;<[48 x i8]*> [#uses=0] > + at .str111575 = external constant [40 x i8], align 8 ;<[40 x i8]*> [#uses=0] > + at .str121576 = external constant [41 x i8], align 8 ;<[41 x i8]*> [#uses=0] > + at .str131577 = external constant [47 x i8], align 8 ;<[47 x i8]*> [#uses=0] > + at .str141578 = external constant [33 x i8], align 8 ;<[33 x i8]*> [#uses=0] > + at .str151579 = external constant [25 x i8], align 1 ;<[25 x i8]*> [#uses=0] > + at .str161580 = external constant [47 x i8], align 8 ;<[47 x i8]*> [#uses=0] > + at .str171581 = external constant [35 x i8], align 8 ;<[35 x i8]*> [#uses=0] > + at .str181582 = external constant [46 x i8], align 8 ;<[46 x i8]*> [#uses=0] > + at .str191583 = external constant [47 x i8], align 8 ;<[47 x i8]*> [#uses=0] > + at .str201584 = external constant [42 x i8], align 8 ;<[42 x i8]*> [#uses=0] > + at .str211585 = external constant [33 x i8], align 8 ;<[33 x i8]*> [#uses=0] > + at .str241588 = external constant [43 x i8], align 8 ;<[43 x i8]*> [#uses=0] > + at .str261590 = external constant [9 x i8], align 1 ;<[9 x i8]*> [#uses=0] > + at .str281592 = external constant [44 x i8], align 8 ;<[44 x i8]*> [#uses=0] > + at .str291593 = external constant [46 x i8], align 8 ;<[46 x i8]*> [#uses=0] > + at .str301594 = external constant [42 x i8], align 8 ;<[42 x i8]*> [#uses=0] > + at .str311595 = external constant [44 x i8], align 8 ;<[44 x i8]*> [#uses=0] > + at .str321596 = external constant [46 x i8], align 8 ;<[46 x i8]*> [#uses=0] > + at .str331597 = external constant [42 x i8], align 8 ;<[42 x i8]*> [#uses=0] > + at .str341598 = external constant [44 x i8], align 8 ;<[44 x i8]*> [#uses=0] > + at .str351599 = external constant [46 x i8], align 8 ;<[46 x i8]*> [#uses=0] > + at .str361600 = external constant [42 x i8], align 8 ;<[42 x i8]*> [#uses=0] > + at .str371601 = external constant [24 x i8], align 1 ;<[24 x i8]*> [#uses=0] > + at .str381602 = external constant [65 x i8], align 8 ;<[65 x i8]*> [#uses=0] > + at .str391603 = external constant [22 x i8], align 1 ;<[22 x i8]*> [#uses=0] > + at .str401604 = external constant [63 x i8], align 8 ;<[63 x i8]*> [#uses=0] > + at .str1619 = external constant [18 x i8], align 1 ;<[18 x i8]*> [#uses=0] > + at .str11620 = external constant [19 x i8], align 1 ;<[19 x i8]*> [#uses=0] > + at .str21621 = external constant [11 x i8], align 1 ;<[11 x i8]*> [#uses=0] > + at .str31622 = external constant [8 x i8], align 1 ;<[8 x i8]*> [#uses=0] > + at .str41623 = external constant [16 x i8], align 1 ;<[16 x i8]*> [#uses=0] > + at .str51624 = external constant [13 x i8], align 1 ;<[13 x i8]*> [#uses=0] > + at .str61625 = external constant [7 x i8], align 1 ;<[7 x i8]*> [#uses=0] > + at .str71626 = external constant [16 x i8], align 1 ;<[16 x i8]*> [#uses=0] > + at .str81627 = external constant [11 x i8], align 1 ;<[11 x i8]*> [#uses=0] > + at .str91628 = external constant [15 x i8], align 1 ;<[15 x i8]*> [#uses=0] > + at HdIdWord = external global %struct.TypHeader* ;<%struct.TypHeader**> [#uses=0] > + at .str101630 = external constant [7 x i8], align 1 ;<[7 x i8]*> [#uses=0] > + at .str111631 = external constant [40 x i8], align 8 ;<[40 x i8]*> [#uses=0] > + at .str121632 = external constant [35 x i8], align 8 ;<[35 x i8]*> [#uses=0] > + at .str131633 = external constant [23 x i8], align 1 ;<[23 x i8]*> [#uses=0] > + at .str141634 = external constant [37 x i8], align 8 ;<[37 x i8]*> [#uses=0] > + at .str151635 = external constant [47 x i8], align 8 ;<[47 x i8]*> [#uses=0] > + at .str161636 = external constant [35 x i8], align 8 ;<[35 x i8]*> [#uses=0] > + at .str171637 = external constant [39 x i8], align 8 ;<[39 x i8]*> [#uses=0] > + at .str181638 = external constant [30 x i8], align 1 ;<[30 x i8]*> [#uses=0] > + at .str191639 = external constant [28 x i8], align 1 ;<[28 x i8]*> [#uses=0] > + at .str201640 = external constant [28 x i8], align 1 ;<[28 x i8]*> [#uses=0] > + at .str211641 = external constant [24 x i8], align 1 ;<[24 x i8]*> [#uses=0] > + at .str221642 = external constant [42 x i8], align 8 ;<[42 x i8]*> [#uses=0] > + at .str231643 = external constant [28 x i8], align 1 ;<[28 x i8]*> [#uses=0] > + at .str241644 = external constant [29 x i8], align 1 ;<[29 x i8]*> [#uses=0] > + at .str251645 = external constant [24 x i8], align 1 ;<[24 x i8]*> [#uses=0] > + at .str261646 = external constant [45 x i8], align 8 ;<[45 x i8]*> [#uses=0] > + at .str271647 = external constant [53 x i8], align 8 ;<[53 x i8]*> [#uses=0] > + at .str281648 = external constant [38 x i8], align 8 ;<[38 x i8]*> [#uses=0] > + at .str291649 = external constant [36 x i8], align 8 ;<[36 x i8]*> [#uses=0] > + at .str301650 = external constant [29 x i8], align 1 ;<[29 x i8]*> [#uses=0] > + at .str311651 = external constant [31 x i8], align 8 ;<[31 x i8]*> [#uses=0] > + at .str341654 = external constant [40 x i8], align 8 ;<[40 x i8]*> [#uses=0] > + at .str351655 = external constant [37 x i8], align 8 ;<[37 x i8]*> [#uses=0] > + at .str361656 = external constant [41 x i8], align 8 ;<[41 x i8]*> [#uses=0] > + at .str371657 = external constant [34 x i8], align 8 ;<[34 x i8]*> [#uses=0] > + at .str401660 = external constant [6 x i8], align 1 ;<[6 x i8]*> [#uses=0] > + at .str421662 = external constant [7 x i8], align 1 ;<[7 x i8]*> [#uses=0] > + at .str431663 = external constant [4 x i8], align 1 ;<[4 x i8]*> [#uses=0] > + > +declare fastcc i32 @OrdinaryCollect() nounwind > + > +declare fastcc void @AddString2(i16* nocapture) nounwind > + > +declare i32 @AgCombinatorial2(i64*, %struct.TypHeader* nocapture) nounwind > + > +declare i32 @AgSingle(i64* nocapture, %struct.TypHeader* nocapture) nounwind > + > +declare i32 @AgTriple(i64* nocapture, %struct.TypHeader* nocapture) nounwind > + > +declare i32 @AgQuadruple(i64* nocapture, %struct.TypHeader* nocapture) nounwind > + > +declare fastcc void @SetAvecAgGroup(%struct.TypHeader* nocapture, i64, i64) nounwind > + > +declare fastcc void @SetGeneratorsAgGroup(%struct.TypHeader*) nounwind > + > +declare fastcc %struct.TypHeader* @AgWordAgExp(%struct.TypHeader* nocapture, %struct.TypHeader*) nounwind > + > +declare fastcc %struct.TypHeader* @SaveAndClearCollector(%struct.TypHeader* nocapture) nounwind > + > +declare fastcc %struct.TypHeader* @BlankAgGroup() nounwind > + > +declare fastcc void @SetStacksAgGroup(%struct.TypHeader* nocapture) nounwind > + > +declare fastcc %struct.TypHeader* @EvalOopN(%struct.TypHeader*, %struct.TypHeader*, %struct.TypHeader* nocapture, i8* nocapture) nounwind > + > +declare fastcc %struct.TypHeader* @EvalOop2(%struct.TypHeader*, %struct.TypHeader*, %struct.TypHeader*, i8* nocapture) nounwind > + > +declare fastcc %struct.TypHeader* @EvalOop(%struct.TypHeader*, %struct.TypHeader*, i8* nocapture) nounwind > + > +declare fastcc void @AddString(i16* nocapture, i64) nounwind > + > +declare fastcc void @AddGen() nounwind > + > +declare i32 @AgCombinatorial(i64*, %struct.TypHeader* nocapture) nounwind > + > +declare fastcc i32 @SetCWeightsAgGroup(%struct.TypHeader* nocapture, %struct.TypHeader*) nounwind > + > +declare void @InitCombinatorial(%struct.TypHeader* nocapture, i64) nounwind > + > +declare void @InitSingle(%struct.TypHeader* nocapture, i64) nounwind > + > +declare fastcc void @Collect(%struct.TypHeader*, %struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare void @InitTriple(%struct.TypHeader* nocapture, i64) nounwind > + > +declare void @InitQuadr(%struct.TypHeader* nocapture, i64) nounwind > + > +declare fastcc %struct.TypHeader* @AgSolution2(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture, %struct.TypHeader** nocapture, %struct.TypHeader*) nounwind > + > +declare fastcc %struct.TypHeader* @AgSolution(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @EqAg(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind readonly > + > +declare %struct.TypHeader* @LtAg(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind readonly > + > +declare %struct.TypHeader* @EvAg(%struct.TypHeader*) nounwind readnone > + > +declare fastcc %struct.TypHeader* @IntExponentsAgWord(%struct.TypHeader* nocapture, i64, i64) nounwind > + > +declare %struct.TypHeader* @ProdAg(%struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @QuoAg(%struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @ModAg(%struct.TypHeader* nocapture, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @PowAgI(%struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @PowAgAg(%struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @CommAg(%struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @FunSumAgWord(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunDifferenceAgWord(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunDepthAgWord(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunCentralWeightAgWord(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunExponentsAgWord(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunIsAgWord(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunFactorAgGroup(%struct.TypHeader* nocapture) nounwind > + > +declare void @PrAgen(%struct.TypHeader* nocapture) nounwind > + > +declare void @PrAgList(%struct.TypHeader* nocapture) nounwind > + > +declare void @PrAgExp(%struct.TypHeader* nocapture) nounwind > + > +declare void @PrAgWord(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunAgProfile(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @TEqAg(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @TLtAg(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @TProdAg(%struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @TQuoAg(%struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @TModAg(%struct.TypHeader* nocapture, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @TPowAgI(%struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @TPowAgAg(%struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @TCommAg(%struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @FunAgGroupRecord(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunDUMPLONG(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunCollectorProfile(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunIsCompatibleAgWord(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunExponentAgWord(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunReducedAgWord(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunInformationAgWord(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunRelativeOrderAgWord(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunLeadingExponentAgWord(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunTailDepthAgWord(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunNormalizeIgs(%struct.TypHeader* nocapture) nounwind > + > +declare fastcc %struct.TypHeader* @DifferenceAgWord(%struct.TypHeader*, %struct.TypHeader*, %struct.TypHeader* nocapture) nounwind > + > +declare fastcc %struct.TypHeader* @SumAgWord(%struct.TypHeader*, %struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @FunFactorAgWord(%struct.TypHeader* nocapture) nounwind > + > +declare fastcc %struct.TypHeader* @FactorAgGroup(%struct.TypHeader* nocapture, i64) nounwind > + > +declare %struct.TypHeader* @FunSetCollectorAgWord(%struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @FunAgFpGroup(%struct.TypHeader* nocapture) nounwind > + > +declare i64 @LenBlist(%struct.TypHeader* nocapture) nounwind readonly > + > +declare %struct.TypHeader* @ElmfBlist(%struct.TypHeader* nocapture, i64) nounwind readonly > + > +declare i64 @PosBlist(%struct.TypHeader* nocapture, %struct.TypHeader*, i64) nounwind readonly > + > +declare i64 @IsDenseBlist(%struct.TypHeader* nocapture) nounwind readnone > + > +declare i64 @IsPossBlist(%struct.TypHeader* nocapture) nounwind readonly > + > +declare %struct.TypHeader* @EqBlist(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind readonly > + > +declare %struct.TypHeader* @ElmBlist(%struct.TypHeader* nocapture, i64) nounwind > + > +declare %struct.TypHeader* @ElmsBlist(%struct.TypHeader* nocapture, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @AssBlist(%struct.TypHeader*, i64, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @AsssBlist(%struct.TypHeader*, %struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare void @PlainBlist(%struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @FunIsBlist(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunBlistList(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunListBlist(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunSizeBlist(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunIsSubsetBlist(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunIntersectBlist(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunUniteBlist(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunSubtractBlist(%struct.TypHeader* nocapture) nounwind > + > +declare fastcc i64 @IsBlist(%struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @FunDistanceBlist(%struct.TypHeader* nocapture) nounwind > + > +declare fastcc void @CVCM2V2(%struct.TypHeader*, %struct.TypHeader*, i64, i64, %struct.TypHeader*, i64, i64*, %struct.TypHeader*) nounwind > + > +declare fastcc void @CVCMFVF(%struct.TypHeader*, i64, %struct.TypHeader*, i64, i64, %struct.TypHeader*, i64, i64, i64*, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @FunDistanceVecFFE(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunDistancesDistributionVecFFEsVecFFE(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunDistancesDistributionMatFFEVecFFE(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunCosetLeadersMatFFE(%struct.TypHeader* nocapture) nounwind > + > +declare fastcc i64 @CLMF(%struct.TypHeader*, i64, %struct.TypHeader*, i64, %struct.TypHeader*, %struct.TypHeader*, i64, i64, i64) nounwind > + > +declare fastcc i64 @CLM2(%struct.TypHeader*, i64, i64, %struct.TypHeader*, %struct.TypHeader*, i64, i64) nounwind > + > +declare fastcc %struct.TypHeader* @BlistsMatFF2(%struct.TypHeader*) nounwind > + > +declare fastcc void @DDMFVF(%struct.TypHeader*, i64, %struct.TypHeader*, %struct.TypHeader*, i64, i64, %struct.TypHeader*) nounwind > + > +declare fastcc void @DDM2V2(%struct.TypHeader*, %struct.TypHeader*, %struct.TypHeader*, i64, %struct.TypHeader*) nounwind > + > +declare fastcc i64 @ConvVecFFE(%struct.TypHeader*, i64) nounwind > + > +declare fastcc i64 @ConvMatFFE(%struct.TypHeader*, i64) nounwind > + > +declare %struct.TypHeader* @FunAClosestVectorCombinationsMatFFEVecFFE(%struct.TypHeader* nocapture) nounwind > + > +declare fastcc void @CompressDeductionList() nounwind > + > +declare %struct.TypHeader* @FunStandardizeTable(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunStandardizeTable2(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunApplyRel(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunMakeConsequences(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunApplyRel2(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunCopyRel(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunMakeCanonical(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunTreeEntry(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunMakeConsequences2(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunAddAbelianRelator(%struct.TypHeader* nocapture) nounwind > + > +declare fastcc i64 @TreeEntryC() nounwind > + > +declare fastcc void @AddCosetFactor2(i64) nounwind > + > +declare fastcc void @HandleCoinc2(i64, i64, %struct.TypHeader*) nounwind > + > +declare fastcc void @HandleCoinc(i64, i64) nounwind > + > +declare fastcc void @ConvertToBase(%struct.TypHeader* nocapture, i64) nounwind > + > +declare %struct.TypHeader* @EvCyc(%struct.TypHeader*) nounwind readnone > + > +declare %struct.TypHeader* @EqCyc(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @LtCyc(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @ProdCycI(%struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare fastcc %struct.TypHeader* @Cyclotomic(%struct.TypHeader* nocapture, i64, i64) nounwind > + > +declare void @PrCyc(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @SumCyc(%struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @DiffCyc(%struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @ProdCyc(%struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @QuoCyc(%struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @PowCyc(%struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @FunE(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunIsCyc(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunIsCycInt(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunNofCyc(%struct.TypHeader* nocapture) nounwind > + > +define internal %struct.TypHeader* @FunCoeffsCyc(%struct.TypHeader* nocapture %hdCall) nounwind { > +entry: > + ret %struct.TypHeader* null > +} > + > +define internal %struct.TypHeader* @FunGaloisCyc(%struct.TypHeader* nocapture %hdCall) nounwind { > +entry: > + unreachable > +} > + > +declare %struct.TypHeader* @CantEval(%struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @Sum(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @Diff(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @Prod(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @Quo(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @Mod(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @Pow(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @Eq(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @Lt(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @Ne(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @Le(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @Gt(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @Ge(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @IsTrue(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind readonly > + > +declare %struct.TypHeader* @IsFalse(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind readonly > + > +declare %struct.TypHeader* @EvBool(%struct.TypHeader*) nounwind readnone > + > +declare %struct.TypHeader* @EqBool(%struct.TypHeader*, %struct.TypHeader*) nounwind readonly > + > +declare %struct.TypHeader* @LtBool(%struct.TypHeader*, %struct.TypHeader*) nounwind readonly > + > +define internal fastcc void @InitEval() nounwind { > +bb.nph49: > + br label %bb > + > +bb: ; preds = %bb, %bb.nph49 > + br i1 undef, label %bb5.preheader, label %bb > + > +bb4: ; preds = %bb5.preheader, %bb4 > + br i1 undef, label %bb6, label %bb4 > + > +bb6: ; preds = %bb4 > + br i1 undef, label %bb11.preheader, label %bb5.preheader > + > +bb5.preheader: ; preds = %bb6, %bb > + br label %bb4 > + > +bb10: ; preds = %bb11.preheader, %bb10 > + br i1 undef, label %bb15, label %bb10 > + > +bb15: ; preds = %bb10 > + br i1 undef, label %bb17, label %bb11.preheader > + > +bb11.preheader: ; preds = %bb15, %bb6 > + br label %bb10 > + > +bb17: ; preds = %bb15 > + br i1 undef, label %InstIntFunc.exit, label %bb.i > + > +bb.i: ; preds = %bb17 > + unreachable > + > +InstIntFunc.exit: ; preds = %bb17 > + br i1 undef, label %InstIntFunc.exit8, label %bb.i7 > + > +bb.i7: ; preds = %InstIntFunc.exit > + unreachable > + > +InstIntFunc.exit8: ; preds = %InstIntFunc.exit > + br i1 undef, label %InstVar.exit28, label %bb.i27 > + > +bb.i27: ; preds = %InstIntFunc.exit8 > + unreachable > + > +InstVar.exit28: ; preds = %InstIntFunc.exit8 > + br i1 undef, label %InstVar.exit, label %bb.i25 > + > +bb.i25: ; preds = %InstVar.exit28 > + unreachable > + > +InstVar.exit: ; preds = %InstVar.exit28 > + br i1 undef, label %InstIntFunc.exit23, label %bb.i22 > + > +bb.i22: ; preds = %InstVar.exit > + unreachable > + > +InstIntFunc.exit23: ; preds = %InstVar.exit > + br i1 undef, label %InstIntFunc.exit20, label %bb.i19 > + > +bb.i19: ; preds = %InstIntFunc.exit23 > + unreachable > + > +InstIntFunc.exit20: ; preds = %InstIntFunc.exit23 > + br i1 undef, label %InstIntFunc.exit17, label %bb.i16 > + > +bb.i16: ; preds = %InstIntFunc.exit20 > + br label %InstIntFunc.exit17 > + > +InstIntFunc.exit17: ; preds = %bb.i16, %InstIntFunc.exit20 > + %tmp79 = tail call fastcc %struct.TypHeader* @NewBag(i32 16, i64 8) nounwind ;<%struct.TypHeader*> [#uses=2] > + %tmp80 = getelementptr inbounds %struct.TypHeader* %tmp79, i64 0, i32 1 ;<%struct.TypHeader***> [#uses=1] > + %tmp81 = load %struct.TypHeader*** %tmp80, align 8 ;<%struct.TypHeader**> [#uses=1] > + store %struct.TypHeader* bitcast (%struct.TypHeader* (%struct.TypHeader*)* @FunIsBound to %struct.TypHeader*), %struct.TypHeader** %tmp81 > + %tmp82 = tail call fastcc %struct.TypHeader* @FindIdent(i8* getelementptr inbounds ([8 x i8]* @.str8302, i64 0, i64 0)) nounwind ;<%struct.TypHeader*> [#uses=1] > + %tmp83 = getelementptr inbounds %struct.TypHeader* %tmp82, i64 0, i32 1 ;<%struct.TypHeader***> [#uses=1] > + %tmp84 = load %struct.TypHeader*** %tmp83, align 8 ;<%struct.TypHeader**> [#uses=1] > + br i1 undef, label %InstIntFunc.exit14, label %bb.i13 > + > +bb.i13: ; preds = %InstIntFunc.exit17 > + unreachable > + > +InstIntFunc.exit14: ; preds = %InstIntFunc.exit17 > + store %struct.TypHeader* %tmp79, %struct.TypHeader** %tmp84, align 8 > + br i1 undef, label %InstIntFunc.exit11, label %bb.i10 > + > +bb.i10: ; preds = %InstIntFunc.exit14 > + unreachable > + > +InstIntFunc.exit11: ; preds = %InstIntFunc.exit14 > + br i1 undef, label %InstIntFunc.exit9.i, label %bb.i8.i > + > +bb.i8.i: ; preds = %InstIntFunc.exit11 > + unreachable > + > +InstIntFunc.exit9.i: ; preds = %InstIntFunc.exit11 > + br i1 undef, label %InstIntFunc.exit6.i, label %bb.i5.i > + > +bb.i5.i: ; preds = %InstIntFunc.exit9.i > + unreachable > + > +InstIntFunc.exit6.i: ; preds = %InstIntFunc.exit9.i > + br i1 undef, label %InstIntFunc.exit3.i, label %bb.i2.i > + > +bb.i2.i: ; preds = %InstIntFunc.exit6.i > + unreachable > + > +InstIntFunc.exit3.i: ; preds = %InstIntFunc.exit6.i > + br i1 undef, label %InitInt.exit, label %bb.i.i > + > +bb.i.i: ; preds = %InstIntFunc.exit3.i > + br label %InitInt.exit > + > +InitInt.exit: ; preds = %bb.i.i, %InstIntFunc.exit3.i > + br i1 undef, label %InstIntFunc.exit6.i419, label %bb.i5.i418 > + > +bb.i5.i418: ; preds = %InitInt.exit > + unreachable > + > +InstIntFunc.exit6.i419: ; preds = %InitInt.exit > + br i1 undef, label %InstIntFunc.exit3.i422, label %bb.i2.i421 > + > +bb.i2.i421: ; preds = %InstIntFunc.exit6.i419 > + unreachable > + > +InstIntFunc.exit3.i422: ; preds = %InstIntFunc.exit6.i419 > + br i1 undef, label %InitRat.exit, label %bb.i.i424 > + > +bb.i.i424: ; preds = %InstIntFunc.exit3.i422 > + unreachable > + > +InitRat.exit: ; preds = %InstIntFunc.exit3.i422 > + br label %bb.i396 > + > +bb.i396: ; preds = %bb.i396, %InitRat.exit > + br i1 undef, label %bb2.i398, label %bb.i396 > + > +bb2.i398: ; preds = %bb.i396 > + br i1 undef, label %InstIntFunc.exit15.i401, label %bb.i14.i400 > + > +bb.i14.i400: ; preds = %bb2.i398 > + br label %InstIntFunc.exit15.i401 > + > +InstIntFunc.exit15.i401: ; preds = %bb.i14.i400, %bb2.i398 > + br i1 undef, label %InstIntFunc.exit12.i404, label %bb.i11.i403 > + > +bb.i11.i403: ; preds = %InstIntFunc.exit15.i401 > + unreachable > + > +InstIntFunc.exit12.i404: ; preds = %InstIntFunc.exit15.i401 > + br i1 undef, label %InstIntFunc.exit9.i407, label %bb.i8.i406 > + > +bb.i8.i406: ; preds = %InstIntFunc.exit12.i404 > + unreachable > + > +InstIntFunc.exit9.i407: ; preds = %InstIntFunc.exit12.i404 > + br i1 undef, label %InstIntFunc.exit6.i410, label %bb.i5.i409 > + > +bb.i5.i409: ; preds = %InstIntFunc.exit9.i407 > + br label %InstIntFunc.exit6.i410 > + > +InstIntFunc.exit6.i410: ; preds = %bb.i5.i409, %InstIntFunc.exit9.i407 > + %tmp215 = tail call fastcc %struct.TypHeader* @NewBag(i32 16, i64 8) nounwind ;<%struct.TypHeader*> [#uses=2] > + %tmp216 = getelementptr inbounds %struct.TypHeader* %tmp215, i64 0, i32 1 ;<%struct.TypHeader***> [#uses=1] > + %tmp217 = load %struct.TypHeader*** %tmp216, align 8 ;<%struct.TypHeader**> [#uses=1] > + store %struct.TypHeader* bitcast (%struct.TypHeader* (%struct.TypHeader*)* @FunCoeffsCyc to %struct.TypHeader*), %struct.TypHeader** %tmp217 > + %tmp218 = tail call fastcc %struct.TypHeader* @FindIdent(i8* getelementptr inbounds ([10 x i8]* @.str4251, i64 0, i64 0)) nounwind ;<%struct.TypHeader*> [#uses=1] > + %tmp219 = getelementptr inbounds %struct.TypHeader* %tmp218, i64 0, i32 1 ;<%struct.TypHeader***> [#uses=1] > + %tmp220 = load %struct.TypHeader*** %tmp219, align 8 ;<%struct.TypHeader**> [#uses=1] > + br i1 undef, label %InstIntFunc.exit3.i413, label %bb.i2.i412 > + > +bb.i2.i412: ; preds = %InstIntFunc.exit6.i410 > + unreachable > + > +InstIntFunc.exit3.i413: ; preds = %InstIntFunc.exit6.i410 > + store %struct.TypHeader* %tmp215, %struct.TypHeader** %tmp220, align 8 > + unreachable > +} > + > +declare void @CantPrint(%struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @CantSum(%struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @CantDiff(%struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @CantProd(%struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @CantQuo(%struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @CantMod(%struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @CantPow(%struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @IntComm(%struct.TypHeader* nocapture) nounwind > + > +declare void @PrBinop(%struct.TypHeader*) nounwind > + > +declare void @PrComm(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @EvVar(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @EvVarAuto(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @EvVarAss(%struct.TypHeader* nocapture) nounwind > + > +declare void @PrVar(%struct.TypHeader* nocapture) nounwind > + > +declare void @PrVarAss(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @EvNot(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @EvAnd(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @EvOr(%struct.TypHeader* nocapture) nounwind > + > +declare void @PrBool(%struct.TypHeader*) nounwind > + > +declare void @PrNot(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunIsBool(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunShallowCopy(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunCopy(%struct.TypHeader* nocapture) nounwind > + > +define internal %struct.TypHeader* @FunIsBound(%struct.TypHeader* nocapture %hdCall) nounwind { > +entry: > + br i1 undef, label %bb1, label %bb > + > +bb: ; preds = %entry > + ret %struct.TypHeader* undef > + > +bb1: ; preds = %entry > + br i1 undef, label %bb3, label %bb24 > + > +bb3: ; preds = %bb1 > + br i1 undef, label %bb25, label %bb24 > + > +bb24: ; preds = %bb3, %bb1 > + ret %struct.TypHeader* undef > + > +bb25: ; preds = %bb3 > + br i1 undef, label %bb28, label %bb86 > + > +bb28: ; preds = %bb25 > + br i1 undef, label %bb133, label %bb86 > + > +bb86: ; preds = %bb28, %bb25 > + br i1 undef, label %bb93, label %bb94 > + > +bb93: ; preds = %bb86 > + unreachable > + > +bb94: ; preds = %bb86 > + br i1 undef, label %bb97, label %bb108 > + > +bb97: ; preds = %bb94 > + ret %struct.TypHeader* undef > + > +bb108: ; preds = %bb94 > + br i1 undef, label %bb110, label %bb109 > + > +bb109: ; preds = %bb108 > + %tmp91 = bitcast %struct.TypHeader** undef to i8* ; [#uses=1] > + %tmp92 = call fastcc %struct.TypHeader* @FindRecname(i8* %tmp91) nounwind ;<%struct.TypHeader*> [#uses=0] > + unreachable > + > +bb110: ; preds = %bb108 > + ret %struct.TypHeader* undef > + > +bb133: ; preds = %bb28 > + ret %struct.TypHeader* undef > +} > + > +declare %struct.TypHeader* @FunLeftQuotient(%struct.TypHeader* nocapture) nounwind > + > +define internal %struct.TypHeader* @CantComm(%struct.TypHeader* %hdL, %struct.TypHeader* %hdR) nounwind { > +entry: > + unreachable > +} > + > +declare i16** @__ctype_b_loc() nounwind readnone > + > +declare fastcc void @Print(%struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @FunUnbind(%struct.TypHeader* nocapture) nounwind > + > +declare fastcc void @CopyCleanup(%struct.TypHeader*) nounwind > + > +declare fastcc void @CopyCopy(%struct.TypHeader*, %struct.TypHeader* nocapture) nounwind > + > +declare fastcc void @CopyForward(%struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare fastcc %struct.TypHeader* @CopyShadow(%struct.TypHeader*) nounwind > + > +declare fastcc %struct.TypHeader* @Copy(%struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @EvFFE(%struct.TypHeader*) nounwind readnone > + > +declare %struct.TypHeader* @EqFFE(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind readonly > + > +declare %struct.TypHeader* @LtFFE(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind readonly > + > +declare void @PrFFE(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @SumFFE(%struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @DiffFFE(%struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @ProdFFE(%struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @QuoFFE(%struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @PowFFE(%struct.TypHeader* nocapture, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @FunIsFFE(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunLogFFE(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunIntFFE(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunZ(%struct.TypHeader* nocapture) nounwind > + > +declare fastcc void @PrFF(%struct.TypHeader** nocapture, i32) nounwind > + > +declare fastcc %struct.TypHeader* @RootFiniteField(i64) nounwind > + > +declare fastcc %struct.TypHeader* @ConvTabIntFFE(i64) nounwind > + > +declare fastcc %struct.TypHeader* @CommonFF(%struct.TypHeader** nocapture, %struct.TypHeader* nocapture) nounwind > + > +declare fastcc void @ChangeEnv(%struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @EvFunction(%struct.TypHeader*) nounwind readnone > + > +declare %struct.TypHeader* @EvReturn(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @EvFunccall(%struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @EvMakefunc(%struct.TypHeader* nocapture) nounwind > + > +declare void @PrFunccall(%struct.TypHeader* nocapture) nounwind > + > +declare void @PrFunction(%struct.TypHeader* nocapture) nounwind > + > +declare void @PrFuncint(%struct.TypHeader* nocapture) nounwind > + > +declare void @PrReturn(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunTrace(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunUntrace(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunProfile(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunApplyFunc(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunIsFunc(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunIgnore(%struct.TypHeader* nocapture) nounwind readonly > + > +declare fastcc i64 @SizeObj(%struct.TypHeader*) nounwind > + > +declare fastcc void @MarkObj(%struct.TypHeader*) nounwind > + > +declare fastcc %struct.TypHeader* @Error(i8* nocapture, i64, i64) nounwind > + > +declare void @longjmp(%struct.__jmp_buf_tag*, i32) noreturn nounwind > + > +declare fastcc void @InitGap(i32, i8** nocapture) nounwind > + > +declare i32 @_setjmp(%struct.__jmp_buf_tag*) nounwind > + > +declare %struct.TypHeader* @FunSIZEHANDLES(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunNUMBERHANDLES(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunCoefficients(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunGASMAN(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunSIZE(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunTYPE(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunOBJ(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunHANDLE(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunIsIdentical(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunTmpName(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunSizeScreen(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunRuntime(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunExec(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunHelp(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunReadTest(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunLogInputTo(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunLogTo(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunAppendTo(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunPrntTo(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunPrint(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunAUTO(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunREAD(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunWindowCmd(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunError(%struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @FunBacktrace(%struct.TypHeader*) nounwind > + > +declare i32 @main(i32, i8** nocapture) noreturn nounwind > + > +declare fastcc void @ExitKernel(%struct.TypHeader*) nounwind > + > +declare fastcc void @CollectGarb() nounwind > + > +define internal fastcc %struct.TypHeader* @NewBag(i32 %type, i64 %size) nounwind { > +entry: > + br i1 undef, label %bb3, label %bb2 > + > +bb2: ; preds = %entry > + br i1 undef, label %bb22, label %bb28 > + > +bb3: ; preds = %entry > + unreachable > + > +bb22: ; preds = %bb2 > + unreachable > + > +bb28: ; preds = %bb2 > + br i1 undef, label %bb30, label %bb29 > + > +bb29: ; preds = %bb28 > + unreachable > + > +bb30: ; preds = %bb28 > + br i1 undef, label %bb33, label %bb31 > + > +bb31: ; preds = %bb30 > + br i1 undef, label %bb32, label %bb33 > + > +bb32: ; preds = %bb31 > + tail call fastcc void @Resize(%struct.TypHeader* undef, i64 undef) nounwind > + ret %struct.TypHeader* undef > + > +bb33: ; preds = %bb31, %bb30 > + ret %struct.TypHeader* undef > +} > + > +define internal fastcc void @Resize(%struct.TypHeader* %hdBag, i64 %newSize) nounwind { > +entry: > + br i1 undef, label %bb1, label %bb2 > + > +bb1: ; preds = %entry > + br label %bb2 > + > +bb2: ; preds = %bb1, %entry > + br i1 undef, label %bb3, label %bb4 > + > +bb3: ; preds = %bb2 > + ret void > + > +bb4: ; preds = %bb2 > + %tmp53 = tail call fastcc %struct.TypHeader* @NewBag(i32 undef, i64 %newSize) nounwind ;<%struct.TypHeader*> [#uses=0] > + unreachable > +} > + > +declare fastcc i64 @completion(i8* nocapture, i64, i64) nounwind > + > +define internal fastcc %struct.TypHeader* @FindRecname(i8* nocapture %name) nounwind { > +entry: > + br i1 undef, label %bb8, label %bb5 > + > +bb5: ; preds = %entry > + unreachable > + > +bb8: ; preds = %entry > + %tmp24 = tail call fastcc %struct.TypHeader* @NewBag(i32 78, i64 0) nounwind ;<%struct.TypHeader*> [#uses=1] > + %tmp26 = getelementptr inbounds %struct.TypHeader* %tmp24, i64 0, i32 1 ;<%struct.TypHeader***> [#uses=1] > + %tmp27 = load %struct.TypHeader*** %tmp26, align 8 ;<%struct.TypHeader**> [#uses=1] > + %tmp29 = bitcast %struct.TypHeader** %tmp27 to i8* ; [#uses=1] > + %tmp30 = tail call i8* @strncat(i8* %tmp29, i8* %name, i64 undef) nounwind ; [#uses=0] > + unreachable > +} > + > +define internal fastcc %struct.TypHeader* @FindIdent(i8* nocapture %name) nounwind { > +entry: > + br i1 undef, label %bb10, label %bb8 > + > +bb8: ; preds = %entry > + br label %bb10 > + > +bb10: ; preds = %bb8, %entry > + %tmp28 = load %struct.TypHeader** @HdIdenttab, align 8 ;<%struct.TypHeader*> [#uses=1] > + %tmp32 = getelementptr inbounds %struct.TypHeader* %tmp28, i64 0, i32 1 ;<%struct.TypHeader***> [#uses=1] > + %tmp33 = load %struct.TypHeader*** %tmp32, align 8 ;<%struct.TypHeader**> [#uses=1] > + br label %bb12 > + > +bb11: ; preds = %bb13 > + br label %bb12 > + > +bb12: ; preds = %bb11, %bb10 > + %tmp36 = getelementptr inbounds %struct.TypHeader** %tmp33, i64 undef ;<%struct.TypHeader**> [#uses=1] > + %tmp37 = load %struct.TypHeader** %tmp36, align 8 ;<%struct.TypHeader*> [#uses=2] > + br i1 undef, label %bb19, label %bb13 > + > +bb13: ; preds = %bb12 > + br i1 undef, label %bb14, label %bb11 > + > +bb14: ; preds = %bb13 > + br i1 undef, label %bb19, label %bb15 > + > +bb15: ; preds = %bb14 > + br i1 undef, label %bb18, label %bb17 > + > +bb17: ; preds = %bb15 > + ret %struct.TypHeader* %tmp37 > + > +bb18: ; preds = %bb15 > + ret %struct.TypHeader* %tmp37 > + > +bb19: ; preds = %bb14, %bb12 > + unreachable > +} > + > +declare %struct.TypHeader* @EvInt(%struct.TypHeader*) nounwind readnone > + > +declare %struct.TypHeader* @EqInt(%struct.TypHeader*, %struct.TypHeader*) nounwind readonly > + > +declare %struct.TypHeader* @LtInt(%struct.TypHeader*, %struct.TypHeader*) nounwind readonly > + > +declare void @PrInteger(%struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @SumInt(%struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @DiffInt(%struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @ProdInt(%struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @ModInt(%struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @PowInt(%struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @FunIsInt(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunQuo(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunRem(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunGcdInt(%struct.TypHeader* nocapture) nounwind > + > +declare fastcc %struct.TypHeader* @GcdInt(%struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare fastcc %struct.TypHeader* @RemInt(%struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare fastcc %struct.TypHeader* @QuoInt(%struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare i64 @CantLenList(%struct.TypHeader* nocapture) nounwind > + > +declare i64 @NotIsDenseList(%struct.TypHeader* nocapture) nounwind readnone > + > +declare i64 @NotIsPossList(%struct.TypHeader* nocapture) nounwind readnone > + > +declare %struct.TypHeader* @EvList(%struct.TypHeader*) nounwind readnone > + > +declare %struct.TypHeader* @EqList(%struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @LtList(%struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @SumList(%struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @DiffList(%struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @ProdList(%struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @QuoList(%struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @QuoLists(%struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @ModList(%struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @ModLists(%struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @PowList(%struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @PowLists(%struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @CommList(%struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @CommLists(%struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @CantElmList(%struct.TypHeader* nocapture, i64) nounwind > + > +declare %struct.TypHeader* @CantElmsList(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @CantAssList(%struct.TypHeader* nocapture, i64, %struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @CantAsssList(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind > + > +declare i64 @CantPosList(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture, i64) nounwind > + > +declare void @CantPlainList(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @DepthListx(%struct.TypHeader*) nounwind > + > +declare void @PrList(%struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @SumSclList(%struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @SumListScl(%struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @DiffSclList(%struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @DiffListScl(%struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @ProdSclList(%struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @ProdListScl(%struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @EvElmList(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @EvElmListLevel(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @EvElmsList(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @EvElmsListLevel(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @EvAssList(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @EvAssListLevel(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @EvAsssList(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @EvAsssListLevel(%struct.TypHeader* nocapture) nounwind > + > +declare void @PrElmList(%struct.TypHeader* nocapture) nounwind > + > +declare void @PrElmsList(%struct.TypHeader* nocapture) nounwind > + > +declare void @PrAssList(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @EvIn(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunIsList(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunIsVector(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunIsMat(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunLength(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunAdd(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunAppend(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunPosition(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunOnPoints(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunOnPairs(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunOnTuples(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunOnSets(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunOnRight(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunOnLeft(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunDepthVector(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @CantDepthVector(%struct.TypHeader* nocapture) nounwind > + > +declare fastcc %struct.TypHeader* @AsssListLevel(%struct.TypHeader*, %struct.TypHeader*, %struct.TypHeader*, i64) nounwind > + > +declare fastcc %struct.TypHeader* @AssListLevel(%struct.TypHeader*, i64, %struct.TypHeader*, i64) nounwind > + > +declare fastcc %struct.TypHeader* @ElmsListLevel(%struct.TypHeader*, %struct.TypHeader*, i64) nounwind > + > +declare fastcc %struct.TypHeader* @ElmListLevel(%struct.TypHeader*, i64, i64) nounwind > + > +declare %struct.TypHeader* @ProdListList(%struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @DiffListList(%struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @SumListList(%struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare void @PrPcPres(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunTriangleIndex(%struct.TypHeader* nocapture) nounwind > + > +declare fastcc i32 @IsNormedPcp(%struct.TypHeader*, %struct.TypHeader** nocapture) nounwind > + > +declare %struct.TypHeader* @FunTailReducedPcp(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunBaseReducedPcp(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunTailDepthPcp(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunDepthPcp(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunExponentsPcp(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunExponentPcp(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunDifferencePcp(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunSumPcp(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunSubtractPowerPcp(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunAddPowerPcp(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunDefinePowerPcp(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunSubtractCommPcp(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunAddCommPcp(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunDefineCommPcp(%struct.TypHeader* nocapture) nounwind > + > +declare fastcc %struct.TypHeader* @NormalWordPcp(%struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @FunPowerPcp(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunConjugatePcp(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunCommPcp(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunQuotientPcp(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunLeftQuotientPcp(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunProductPcp(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunNormalWordPcp(%struct.TypHeader* nocapture) nounwind > + > +declare fastcc void @ShrinkSwords(%struct.TypHeader*, %struct.TypHeader*, %struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunCentralWeightsPcp(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunShrinkPcp(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunGeneratorsPcp(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunDefineCentralWeightsPcp(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunExtendCentralPcp(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunAgPcp(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunPcp(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @EvPerm(%struct.TypHeader*) nounwind readnone > + > +declare %struct.TypHeader* @EqPP(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind readonly > + > +declare %struct.TypHeader* @EqPQ(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind readonly > + > +declare %struct.TypHeader* @EqQP(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind readonly > + > +declare %struct.TypHeader* @EqQQ(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind readonly > + > +declare %struct.TypHeader* @LtPP(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind readonly > + > +declare %struct.TypHeader* @LtPQ(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind readonly > + > +declare %struct.TypHeader* @LtQP(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind readonly > + > +declare %struct.TypHeader* @LtQQ(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind readonly > + > +declare %struct.TypHeader* @EvMakeperm(%struct.TypHeader* nocapture) nounwind > + > +declare void @PrMakeperm(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @PowPI(%struct.TypHeader* nocapture, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @PowIP(%struct.TypHeader*, %struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @QuoIP(%struct.TypHeader*, %struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @PowPP(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunIsPerm(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunPermList(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunOrderPerm(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunSignPerm(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunSmallestGeneratorPerm(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @CommQQ(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @CommQP(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @CommPQ(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @CommPP(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @PowQQ(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @PowQP(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @PowPQ(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @ModQQ(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @ModQP(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @ModPQ(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @ModPP(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @ProdQQ(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @ProdQP(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @ProdPQ(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @ProdPP(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunCyclePermInt(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunCycleLengthPermInt(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunLargestMovedPointPerm(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @QuoIQ(%struct.TypHeader*, %struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @PowIQ(%struct.TypHeader*, %struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @QuoQQ(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @QuoQP(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @QuoPQ(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @QuoPP(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @PowQI(%struct.TypHeader* nocapture, %struct.TypHeader*) nounwind > + > +declare void @PrPermQ(%struct.TypHeader* nocapture) nounwind > + > +declare void @PrPermP(%struct.TypHeader* nocapture) nounwind > + > +declare i64 @LenPlist(%struct.TypHeader* nocapture) nounwind readonly > + > +declare %struct.TypHeader* @ElmfPlist(%struct.TypHeader* nocapture, i64) nounwind readonly > + > +declare i64 @PosPlist(%struct.TypHeader* nocapture, %struct.TypHeader*, i64) nounwind > + > +declare void @PlainPlist(%struct.TypHeader* nocapture) nounwind readnone > + > +declare i64 @IsDensePlist(%struct.TypHeader* nocapture) nounwind readonly > + > +declare i64 @IsPossPlist(%struct.TypHeader* nocapture) nounwind readonly > + > +declare %struct.TypHeader* @EqPlist(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @LtPlist(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @ElmPlist(%struct.TypHeader* nocapture, i64) nounwind > + > +declare %struct.TypHeader* @ElmsPlist(%struct.TypHeader* nocapture, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @AssPlist(%struct.TypHeader*, i64, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @AsssPlist(%struct.TypHeader*, %struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @EvMakeList(%struct.TypHeader* nocapture) nounwind > + > +declare void @PrMakeList(%struct.TypHeader* nocapture) nounwind > + > +declare fastcc %struct.TypHeader* @MakeList(%struct.TypHeader*, i64, %struct.TypHeader* nocapture) nounwind > + > +declare fastcc %struct.TypHeader* @UnifiedFieldVecFFE(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind > + > +declare void @AddCoeffsListxListx(%struct.TypHeader*, %struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare i64 @MultiplyCoeffsListxListx(%struct.TypHeader*, %struct.TypHeader*, i64, %struct.TypHeader*, i64) nounwind > + > +declare %struct.TypHeader* @CantNormalizeCoeffs(%struct.TypHeader* nocapture) nounwind > + > +declare void @CantShrinkCoeffs(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @CantShiftedCoeffs(%struct.TypHeader* nocapture, i64) nounwind > + > +declare void @CantAddCoeffs(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind > + > +declare i64 @CantMultiplyCoeffs(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture, i64, %struct.TypHeader* nocapture, i64) nounwind > + > +declare %struct.TypHeader* @CantProductCoeffs(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @CantProductCoeffsMod(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind > + > +declare i64 @CantReduceCoeffs(%struct.TypHeader* nocapture, i64, %struct.TypHeader* nocapture, i64) nounwind > + > +declare i64 @CantReduceCoeffsMod(%struct.TypHeader* nocapture, i64, %struct.TypHeader* nocapture, i64, %struct.TypHeader* nocapture) nounwind > + > +declare noalias %struct.TypHeader* @CantPowerModCoeffs(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @NormalizeCoeffsListx(%struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @NormalizeCoeffsVecFFE(%struct.TypHeader*) nounwind > + > +declare void @ShrinkCoeffsListx(%struct.TypHeader*) nounwind > + > +declare void @ShrinkCoeffsVecFFE(%struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @ShiftedCoeffsListx(%struct.TypHeader*, i64) nounwind > + > +declare %struct.TypHeader* @ShiftedCoeffsVecFFE(%struct.TypHeader*, i64) nounwind > + > +declare void @AddCoeffsListxVecFFE(%struct.TypHeader*, %struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare void @AddCoeffsVecFFEVecFFE(%struct.TypHeader*, %struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare i64 @MultiplyCoeffsVecFFEVecFFE(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture, i64, %struct.TypHeader* nocapture, i64) nounwind > + > +declare %struct.TypHeader* @ProductCoeffsListxListx(%struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @ProductCoeffsVecFFEVecFFE(%struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @ProductCoeffsModListxListx(%struct.TypHeader*, %struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare i64 @ReduceCoeffsListxListx(%struct.TypHeader*, i64, %struct.TypHeader*, i64) nounwind > + > +declare i64 @ReduceCoeffsVecFFEVecFFE(%struct.TypHeader* nocapture, i64, %struct.TypHeader* nocapture, i64) nounwind > + > +declare i64 @ReduceCoeffsModListxListx(%struct.TypHeader*, i64, %struct.TypHeader*, i64, %struct.TypHeader*) nounwind > + > +declare i64 @ReduceCoeffsModListx(%struct.TypHeader*, i64, %struct.TypHeader* nocapture, i64, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @PowerModListxIntListx(%struct.TypHeader*, %struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @PowerModVecFFEIntVecFFE(%struct.TypHeader*, %struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @PowerModListxLIntListx(%struct.TypHeader*, %struct.TypHeader* nocapture, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @PowerModVecFFELIntVecFFE(%struct.TypHeader*, %struct.TypHeader* nocapture, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @FunShiftedCoeffs(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunNormalizeCoeffs(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunShrinkCoeffs(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunAddCoeffs(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunSumCoeffs(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunProductCoeffs(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunProductCoeffsMod(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunReduceCoeffs(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunRemainderCoeffs(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunReduceCoeffsMod(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunPowerModCoeffs(%struct.TypHeader* nocapture) nounwind > + > +declare i64 @LenRange(%struct.TypHeader* nocapture) nounwind readonly > + > +declare %struct.TypHeader* @ElmfRange(%struct.TypHeader* nocapture, i64) nounwind readonly > + > +declare i64 @PosRange(%struct.TypHeader* nocapture, %struct.TypHeader*, i64) nounwind > + > +declare i64 @IsDenseRange(%struct.TypHeader* nocapture) nounwind readnone > + > +declare i64 @IsPossRange(%struct.TypHeader* nocapture) nounwind readonly > + > +declare %struct.TypHeader* @LtRange(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind readonly > + > +declare %struct.TypHeader* @ElmRange(%struct.TypHeader* nocapture, i64) nounwind > + > +declare %struct.TypHeader* @ElmsRange(%struct.TypHeader* nocapture, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @AssRange(%struct.TypHeader*, i64, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @AsssRange(%struct.TypHeader*, %struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare void @PlainRange(%struct.TypHeader*) nounwind > + > +declare void @PrRange(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @EvMakeRange(%struct.TypHeader* nocapture) nounwind > + > +declare void @PrMakeRange(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunIsRange(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @EvRat(%struct.TypHeader*) nounwind readnone > + > +declare void @PrRat(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @SumRat(%struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @DiffRat(%struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @ProdRat(%struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @QuoRat(%struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @ModRat(%struct.TypHeader* nocapture, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @PowRat(%struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @EqRat(%struct.TypHeader*, %struct.TypHeader*) nounwind readonly > + > +declare %struct.TypHeader* @LtRat(%struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @FunIsRat(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunNumerator(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunDenominator(%struct.TypHeader* nocapture) nounwind > + > +declare fastcc %struct.TypHeader* @RdExpr(i64) nounwind > + > +declare fastcc %struct.TypHeader* @RdAtom(i64) nounwind > + > +declare fastcc %struct.TypHeader* @RdFactor(i64) nounwind > + > +declare fastcc %struct.TypHeader* @RdTerm(i64) nounwind > + > +declare fastcc %struct.TypHeader* @RdAri(i64) nounwind > + > +declare fastcc %struct.TypHeader* @RdRel(i64) nounwind > + > +declare fastcc %struct.TypHeader* @RdStats(i64) nounwind > + > +declare fastcc %struct.TypHeader* @RdStat(i64) nounwind > + > +declare %struct.TypHeader* @EvRec(%struct.TypHeader*) nounwind readnone > + > +declare %struct.TypHeader* @EqRec(%struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @EvMakeRec(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @EvRecElm(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @EvRecAss(%struct.TypHeader* nocapture) nounwind > + > +declare void @PrRec(%struct.TypHeader*) nounwind > + > +declare void @PrRecElm(%struct.TypHeader* nocapture) nounwind > + > +declare void @PrRecAss(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @SumRec(%struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @DiffRec(%struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @ProdRec(%struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @QuoRec(%struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @ModRec(%struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @PowRec(%struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @LtRec(%struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @CommRec(%struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @FunIsRec(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunRecFields(%struct.TypHeader* nocapture) nounwind > + > +declare fastcc %struct.TypHeader* @MakeRec(%struct.TypHeader*, i64, %struct.TypHeader* nocapture) nounwind > + > +declare fastcc i64 @OpenInput(i8* nocapture) nounwind > + > +declare fastcc void @PutLine() nounwind > + > +declare fastcc void @PutChr(i32 signext) nounwind > + > +declare fastcc void @Pr(i8* nocapture, i64, i64) nounwind > + > +declare fastcc void @SyntaxError(i8*) nounwind > + > +declare fastcc void @GetLine() nounwind > + > +declare fastcc void @GetIdent() nounwind > + > +declare fastcc void @GetSymbol() nounwind > + > +declare fastcc void @Match(i64, i8* nocapture, i64) nounwind > + > +declare i64 @LenSet(%struct.TypHeader* nocapture) nounwind readonly > + > +declare %struct.TypHeader* @ElmfSet(%struct.TypHeader* nocapture, i64) nounwind readonly > + > +declare i64 @PosSet(%struct.TypHeader* nocapture, %struct.TypHeader*, i64) nounwind > + > +declare void @PlainSet(%struct.TypHeader* nocapture) nounwind readnone > + > +declare i64 @IsDenseSet(%struct.TypHeader* nocapture) nounwind readnone > + > +declare i64 @IsPossSet(%struct.TypHeader* nocapture) nounwind readonly > + > +declare %struct.TypHeader* @EqSet(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @LtSet(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @ElmSet(%struct.TypHeader* nocapture, i64) nounwind > + > +declare %struct.TypHeader* @ElmsSet(%struct.TypHeader* nocapture, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @AssSet(%struct.TypHeader*, i64, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @AsssSet(%struct.TypHeader*, %struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @FunSet(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunIsSet(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunIsEqualSet(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunIsSubsetSet(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunAddSet(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunRemoveSet(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunUniteSet(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunIntersectSet(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunSubtractSet(%struct.TypHeader* nocapture) nounwind > + > +declare fastcc i64 @IsSet(%struct.TypHeader*) nounwind > + > +declare fastcc %struct.TypHeader* @SetList(%struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @EvStatseq(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @EvIf(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @EvFor(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @EvWhile(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @EvRepeat(%struct.TypHeader* nocapture) nounwind > + > +declare void @PrStatseq(%struct.TypHeader* nocapture) nounwind > + > +declare void @PrIf(%struct.TypHeader* nocapture) nounwind > + > +declare void @PrFor(%struct.TypHeader* nocapture) nounwind > + > +declare void @PrWhile(%struct.TypHeader* nocapture) nounwind > + > +declare void @PrRepeat(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @EvChar(%struct.TypHeader*) nounwind readnone > + > +declare %struct.TypHeader* @EqChar(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind readonly > + > +declare %struct.TypHeader* @LtChar(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind readonly > + > +declare i64 @LenString(%struct.TypHeader* nocapture) nounwind readonly > + > +declare %struct.TypHeader* @ElmfString(%struct.TypHeader* nocapture, i64) nounwind readonly > + > +declare i64 @PosString(%struct.TypHeader*, %struct.TypHeader*, i64) nounwind > + > +declare i64 @IsDenseString(%struct.TypHeader* nocapture) nounwind readnone > + > +declare i64 @IsPossString(%struct.TypHeader* nocapture) nounwind readonly > + > +declare void @PrChar(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @ElmString(%struct.TypHeader* nocapture, i64) nounwind > + > +declare %struct.TypHeader* @ElmsString(%struct.TypHeader* nocapture, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @AssString(%struct.TypHeader*, i64, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @AsssString(%struct.TypHeader*, %struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare void @PlainString(%struct.TypHeader*) nounwind > + > +declare void @PrString(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @EqString(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind readonly > + > +declare %struct.TypHeader* @LtString(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind readonly > + > +declare %struct.TypHeader* @FunIsString(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @EvMakeString(%struct.TypHeader* nocapture) nounwind > + > +declare fastcc i64 @IsString(%struct.TypHeader*) nounwind > + > +declare noalias i8* @calloc(i64, i64) nounwind > + > +declare i8* @tmpnam(i8*) nounwind > + > +declare fastcc void @SyExit(i64) noreturn nounwind > + > +declare void @exit(i32) noreturn nounwind > + > +declare i64 @times(%struct.tms* nocapture) nounwind > + > +declare i64 @fwrite(i8* nocapture, i64, i64, i8* nocapture) nounwind > + > +declare void @syAnswerIntr(i32) nounwind > + > +declare i64 @time(i64*) nounwind > + > +declare void (i32)* @signal(i32, void (i32)*) nounwind > + > +declare fastcc void @syEchoch(i32, i64) nounwind > + > +declare i32 @fileno(%struct._IO_FILE* nocapture) nounwind > + > +declare i64 @write(i32, i8* nocapture, i64) > + > +declare fastcc void @syStopraw(i64) nounwind > + > +declare i32 @ioctl(i32, i64, ...) nounwind > + > +declare void @syAnswerTstp(i32) nounwind > + > +declare i32 @getpid() nounwind > + > +declare i32 @kill(i32, i32) nounwind > + > +declare fastcc void @SyFclose(i64) nounwind > + > +declare i32 @fclose(%struct._IO_FILE* nocapture) nounwind > + > +declare i8* @strncat(i8*, i8* nocapture, i64) nounwind > + > +declare i32 @strcmp(i8* nocapture, i8* nocapture) nounwind readonly > + > +declare fastcc i64 @SyFopen(i8* nocapture, i8* nocapture) nounwind > + > +declare noalias %struct._IO_FILE* @fopen(i8* noalias nocapture, i8* noalias nocapture) nounwind > + > +declare void @setbuf(%struct._IO_FILE* noalias nocapture, i8* noalias) nounwind > + > +declare i64 @strlen(i8* nocapture) nounwind readonly > + > +declare fastcc void @syWinPut(i64, i8* nocapture, i8* nocapture) nounwind > + > +declare i32 @isatty(i32) nounwind > + > +declare i8* @ttyname(i32) nounwind > + > +declare i32 @fputs(i8* noalias nocapture, %struct._IO_FILE* noalias nocapture) nounwind > + > +declare i32 @atoi(i8* nocapture) nounwind readonly > + > +declare noalias i8* @malloc(i64) nounwind > + > +declare void @free(i8* nocapture) nounwind > + > +declare i8* @getenv(i8* nocapture) nounwind readonly > + > +declare i32 @system(i8* nocapture) > + > +declare i64 @read(i32, i8* nocapture, i64) > + > +declare fastcc void @SyFputs(i8* nocapture, i64) nounwind > + > +declare fastcc i32 @syGetch(i64) nounwind > + > +declare fastcc i32 @syStartraw(i64) nounwind > + > +declare void @llvm.memcpy.i64(i8* nocapture, i8* nocapture, i64, i32) nounwind > + > +declare void @syAnswerCont(i32) nounwind > + > +declare fastcc void @syEchos(i8* nocapture, i64) nounwind > + > +declare fastcc i8* @SyFgets(i8*, i64) nounwind > + > +declare i8* @fgets(i8* noalias, i32, %struct._IO_FILE* noalias nocapture) nounwind > + > +declare fastcc void @SyHelp(i8* nocapture, i64) nounwind > + > +declare %struct.TypHeader* @FunTzRelator(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunTzWord(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunTzSortC(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunTzRenumberGens(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunTzReplaceGens(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunTzSubstituteGen(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunTzOccurrences(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunTzOccurrencesPairs(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunTzSearchC(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @EvUnknown(%struct.TypHeader*) nounwind readnone > + > +declare %struct.TypHeader* @EqUnknown(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind readonly > + > +declare %struct.TypHeader* @LtUnknown(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind readonly > + > +declare void @PrUnknown(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @SumUnknown(%struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @DiffUnknown(%struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @ProdUnknown(%struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @QuoUnknown(%struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @PowUnknown(%struct.TypHeader* nocapture, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @FunUnknown(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunIsUnknown(%struct.TypHeader* nocapture) nounwind > + > +declare i64 @LenVecFFE(%struct.TypHeader* nocapture) nounwind readonly > + > +declare %struct.TypHeader* @ElmlVecFFE(%struct.TypHeader* nocapture, i64) nounwind > + > +declare %struct.TypHeader* @ElmrVecFFE(%struct.TypHeader* nocapture, i64) nounwind > + > +declare i64 @PosVecFFE(%struct.TypHeader*, %struct.TypHeader*, i64) nounwind > + > +declare i64 @IsDenseVecFFE(%struct.TypHeader* nocapture) nounwind readnone > + > +declare i64 @IsPossVecFFE(%struct.TypHeader* nocapture) nounwind readonly > + > +declare %struct.TypHeader* @DepthVecFFE(%struct.TypHeader* nocapture) nounwind readonly > + > +declare fastcc i64 @DegreeVecFFE(%struct.TypHeader* nocapture) nounwind readonly > + > +declare fastcc i64 @DegreeMatFFE(%struct.TypHeader** nocapture) nounwind readonly > + > +declare %struct.TypHeader* @ElmfVecFFE(%struct.TypHeader* nocapture, i64) nounwind > + > +declare %struct.TypHeader* @ElmVecFFE(%struct.TypHeader* nocapture, i64) nounwind > + > +declare %struct.TypHeader* @ElmsVecFFE(%struct.TypHeader* nocapture, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @AssVecFFE(%struct.TypHeader*, i64, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @AsssVecFFE(%struct.TypHeader*, %struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare void @PlainVecFFE(%struct.TypHeader*) nounwind > + > +declare i64 @IsXTypeVecFFE(%struct.TypHeader*) nounwind > + > +declare i64 @IsXTypeMatFFE(%struct.TypHeader*) nounwind > + > +declare void @PrVecFFE(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @SumFFEVecFFE(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @SumVecFFEFFE(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @SumVecFFEVecFFE(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @DiffFFEVecFFE(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @DiffVecFFEFFE(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @DiffVecFFEVecFFE(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @ProdFFEVecFFE(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @ProdVecFFEFFE(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @ProdVecFFEVecFFE(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @ProdVecFFEMatFFE(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @PowMatFFEInt(%struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @FunCharFFE(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunDegreeFFE(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunLogVecFFE(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunMakeVecFFE(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunNumberVecFFE(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @CantIntVecFFE(%struct.TypHeader* nocapture, i64) nounwind > + > +declare %struct.TypHeader* @FunIntVecFFE(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @ProdFFEVector(%struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @ProdVectorFFE(%struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @DiffFFEVector(%struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @DiffVectorFFE(%struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @SumFFEVector(%struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @SumVectorFFE(%struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @IntVecFFE(%struct.TypHeader*, i64) nounwind > + > +declare i64 @LenVector(%struct.TypHeader* nocapture) nounwind readonly > + > +declare %struct.TypHeader* @ElmfVector(%struct.TypHeader* nocapture, i64) nounwind readonly > + > +declare i64 @PosVector(%struct.TypHeader* nocapture, %struct.TypHeader*, i64) nounwind > + > +declare void @PlainVector(%struct.TypHeader* nocapture) nounwind readnone > + > +declare i64 @IsDenseVector(%struct.TypHeader* nocapture) nounwind readnone > + > +declare i64 @IsPossVector(%struct.TypHeader* nocapture) nounwind readonly > + > +declare %struct.TypHeader* @EqVector(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @LtVector(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @ElmVector(%struct.TypHeader* nocapture, i64) nounwind > + > +declare %struct.TypHeader* @ElmsVector(%struct.TypHeader* nocapture, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @AssVector(%struct.TypHeader*, i64, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @AsssVector(%struct.TypHeader*, %struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare i64 @IsXTypeVector(%struct.TypHeader*) nounwind > + > +declare i64 @IsXTypeMatrix(%struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @SumIntVector(%struct.TypHeader*, %struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @SumVectorInt(%struct.TypHeader* nocapture, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @SumVectorVector(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @DiffIntVector(%struct.TypHeader*, %struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @DiffVectorInt(%struct.TypHeader* nocapture, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @DiffVectorVector(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @ProdIntVector(%struct.TypHeader*, %struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @ProdVectorInt(%struct.TypHeader* nocapture, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @ProdVectorVector(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @ProdVectorMatrix(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @PowMatrixInt(%struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare fastcc %struct.TypHeader* @SwordWord(%struct.TypHeader*, %struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @EvWord(%struct.TypHeader*) nounwind readnone > + > +declare %struct.TypHeader* @EqWord(%struct.TypHeader*, %struct.TypHeader*) nounwind readonly > + > +declare fastcc %struct.TypHeader* @WordSword(%struct.TypHeader* nocapture) nounwind > + > +declare void @PrWord(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @ProdWord(%struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @QuoWord(%struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @ModWord(%struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @PowWW(%struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @CommWord(%struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @LtWord(%struct.TypHeader*, %struct.TypHeader*) nounwind readonly > + > +declare %struct.TypHeader* @PowWI(%struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @FunExpsum(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunIsWord(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunPosWord(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunSubword(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunLenWord(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunMappedWord(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunEliminated(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunSubs(%struct.TypHeader* nocapture) nounwind > + > +declare fastcc %struct.TypHeader* @Words(%struct.TypHeader* nocapture, i64) nounwind > + > +declare %struct.TypHeader* @FunAbstractGenerators(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @FunAbstractGenerator(%struct.TypHeader* nocapture) nounwind > + > +declare void @PrSword(%struct.TypHeader* nocapture) nounwind > + > +declare %struct.TypHeader* @LtAg_DIRECT(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind readonly > + > +declare %struct.TypHeader* @CommAg_DIRECT(%struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @ProdCyc_DIRECT(%struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @QuoCyc_DIRECT(%struct.TypHeader*) nounwind > + > +declare void @AddCoeffsListxListx_DIRECT(%struct.TypHeader*, %struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare i64 @PosRange_DIRECT(%struct.TypHeader* nocapture, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @ProdCycI_DIRECT(%struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare void @PrFunction_DIRECT(%struct.TypHeader* nocapture) nounwind > + > +declare void @FunPrint_DIRECT(%struct.TypHeader* nocapture) nounwind > + > +declare void @FunBacktrace_DIRECT() nounwind > + > +declare %struct.TypHeader* @SumSclList_DIRECT(%struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @SumListScl_DIRECT(%struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @DiffSclList_DIRECT(%struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @DiffListScl_DIRECT(%struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @ProdSclList_DIRECT(%struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @ProdListScl_DIRECT(%struct.TypHeader*, %struct.TypHeader*) nounwind > + > +declare i64 @IsXTypeVector_DIRECT(%struct.TypHeader*) nounwind > + > +declare %struct.TypHeader* @EqWord_DIRECT(%struct.TypHeader*, %struct.TypHeader*) nounwind readonly > + > +declare %struct.TypHeader* @ProdWord_DIRECT(%struct.TypHeader*, %struct.TypHeader*) nounwind > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits > From wdietz2 at illinois.edu Mon Jul 19 23:57:18 2010 From: wdietz2 at illinois.edu (Will Dietz) Date: Tue, 20 Jul 2010 04:57:18 -0000 Subject: [llvm-commits] [poolalloc] r108808 - /poolalloc/trunk/test/dsa/regression/2010-07-12-SCCLeader.ll Message-ID: <20100720045718.BBF172A6C12C@llvm.org> Author: wdietz2 Date: Mon Jul 19 23:57:18 2010 New Revision: 108808 URL: http://llvm.org/viewvc/llvm-project?rev=108808&view=rev Log: Further reduced SCCLeader testcase to make it of manageable size. Modified: poolalloc/trunk/test/dsa/regression/2010-07-12-SCCLeader.ll Modified: poolalloc/trunk/test/dsa/regression/2010-07-12-SCCLeader.ll URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/test/dsa/regression/2010-07-12-SCCLeader.ll?rev=108808&r1=108807&r2=108808&view=diff ============================================================================== --- poolalloc/trunk/test/dsa/regression/2010-07-12-SCCLeader.ll (original) +++ poolalloc/trunk/test/dsa/regression/2010-07-12-SCCLeader.ll Mon Jul 19 23:57:18 2010 @@ -3,2061 +3,18 @@ target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64" target triple = "x86_64-unknown-linux-gnu" -%0 = type { %struct._IO_FILE*, %struct._IO_FILE*, [8192 x i8] } -%struct.TypCollectors = type { i8*, void (%struct.TypHeader*, i64)*, i32 (i64*, %struct.TypHeader*)* } %struct.TypHeader = type { i64, %struct.TypHeader**, [3 x i8], i8 } -%struct.TypInputFile = type { i64, [64 x i8], [256 x i8], i8*, i64 } -%struct.TypOutputFile = type { i64, [256 x i8], i64, i64, i64, i64 } -%struct._IO_FILE = type { i32, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, %struct._IO_marker*, %struct._IO_FILE*, i32, i32, i64, i16, i8, [1 x i8], i8*, i64, i8*, i8*, i8*, i8*, i64, i32, [20 x i8] } -%struct._IO_marker = type { %struct._IO_marker*, %struct._IO_FILE*, i32 } -%struct.__jmp_buf_tag = type { [8 x i64], i32, %struct.__sigset_t } -%struct.__sigset_t = type { [16 x i64] } -%struct.anon = type { i64, i64, [4 x i8] } -%struct.termio = type { i16, i16, i16, i16, i8, [8 x i8] } -%struct.tms = type { i64, i64, i64, i64 } - - at Collectors = external constant [6 x %struct.TypCollectors], align 32 ; <[6 x %struct.TypCollectors]*> [#uses=0] - at CSeries = external global i64* ; [#uses=0] - at Class = external global i16 ; [#uses=0] - at CWeights = external global i64* ; [#uses=0] - at ug = external global i16 ; [#uses=0] - at cg = external global i16 ; [#uses=0] - at g = external global i64* ; [#uses=0] - at ce = external global i64 ; [#uses=0] - at Commutators = external global %struct.TypHeader** ; <%struct.TypHeader***> [#uses=0] - at GenStk = external global i16* ; [#uses=0] - at ExpStk = external global i64* ; [#uses=0] - at StrStk = external global i16** ; [#uses=0] - at Sp = external global i64 ; [#uses=0] - at StkDim = external global i64 ; [#uses=0] - at ue = external global i64 ; [#uses=0] - at LastClass = external global i16 ; [#uses=0] - at Powers = external global %struct.TypHeader** ; <%struct.TypHeader***> [#uses=0] - at NrGens = external global i64 ; [#uses=0] - at Prime = external global i64 ; [#uses=0] - at HdRnAvec = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] - at .str = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] - at .str1 = external constant [11 x i8], align 1 ; <[11 x i8]*> [#uses=0] - at .str2 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=0] - at .str3 = external constant [6 x i8], align 1 ; <[6 x i8]*> [#uses=0] - at .str4 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] - at .str5 = external constant [8 x i8], align 1 ; <[8 x i8]*> [#uses=0] - at .str6 = external constant [12 x i8], align 1 ; <[12 x i8]*> [#uses=0] - at .str7 = external constant [10 x i8], align 1 ; <[10 x i8]*> [#uses=0] - at .str8 = external constant [17 x i8], align 1 ; <[17 x i8]*> [#uses=0] - at .str9 = external constant [14 x i8], align 1 ; <[14 x i8]*> [#uses=0] - at .str10 = external constant [17 x i8], align 1 ; <[17 x i8]*> [#uses=0] - at .str11 = external constant [62 x i8], align 8 ; <[62 x i8]*> [#uses=0] - at .str12 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] - at HdCallOop2 = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] - at HdCallOop1 = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] - at .str13 = external constant [43 x i8], align 8 ; <[43 x i8]*> [#uses=0] - at .str14 = external constant [40 x i8], align 8 ; <[40 x i8]*> [#uses=0] - at .str15 = external constant [43 x i8], align 8 ; <[43 x i8]*> [#uses=0] - at .str16 = external constant [42 x i8], align 8 ; <[42 x i8]*> [#uses=0] - at .str17 = external constant [40 x i8], align 8 ; <[40 x i8]*> [#uses=0] - at .str18 = external constant [41 x i8], align 8 ; <[41 x i8]*> [#uses=0] - at .str19 = external constant [41 x i8], align 8 ; <[41 x i8]*> [#uses=0] - at .str20 = external constant [35 x i8], align 8 ; <[35 x i8]*> [#uses=0] - at .str21 = external constant [35 x i8], align 8 ; <[35 x i8]*> [#uses=0] - at .str22 = external constant [28 x i8], align 1 ; <[28 x i8]*> [#uses=0] - at .str23 = external constant [21 x i8], align 1 ; <[21 x i8]*> [#uses=0] - at .str24 = external constant [22 x i8], align 1 ; <[22 x i8]*> [#uses=0] - at .str25 = external constant [26 x i8], align 1 ; <[26 x i8]*> [#uses=0] - at .str26 = external constant [18 x i8], align 1 ; <[18 x i8]*> [#uses=0] - at .str27 = external constant [11 x i8], align 1 ; <[11 x i8]*> [#uses=0] - at .str28 = external constant [31 x i8], align 8 ; <[31 x i8]*> [#uses=0] - at .str29 = external constant [35 x i8], align 8 ; <[35 x i8]*> [#uses=0] - at .str30 = external constant [29 x i8], align 1 ; <[29 x i8]*> [#uses=0] - at .str31 = external constant [27 x i8], align 1 ; <[27 x i8]*> [#uses=0] - at .str32 = external constant [14 x i8], align 1 ; <[14 x i8]*> [#uses=0] - at .str33 = external constant [15 x i8], align 1 ; <[15 x i8]*> [#uses=0] - at .str34 = external constant [43 x i8], align 8 ; <[43 x i8]*> [#uses=0] - at .str35 = external constant [40 x i8], align 8 ; <[40 x i8]*> [#uses=0] - at .str36 = external constant [10 x i8], align 1 ; <[10 x i8]*> [#uses=0] - at .str37 = external constant [49 x i8], align 8 ; <[49 x i8]*> [#uses=0] - at .str38 = external constant [50 x i8], align 8 ; <[50 x i8]*> [#uses=0] - at .str39 = external constant [42 x i8], align 8 ; <[42 x i8]*> [#uses=0] - at .str40 = external constant [45 x i8], align 8 ; <[45 x i8]*> [#uses=0] - at .str41 = external constant [32 x i8], align 8 ; <[32 x i8]*> [#uses=0] - at .str42 = external constant [48 x i8], align 8 ; <[48 x i8]*> [#uses=0] - at .str43 = external constant [11 x i8], align 1 ; <[11 x i8]*> [#uses=0] - at .str44 = external constant [47 x i8], align 8 ; <[47 x i8]*> [#uses=0] - at .str45 = external constant [49 x i8], align 8 ; <[49 x i8]*> [#uses=0] - at .str46 = external constant [53 x i8], align 8 ; <[53 x i8]*> [#uses=0] - at .str47 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=0] - at .str48 = external constant [10 x i8], align 1 ; <[10 x i8]*> [#uses=0] - at .str49 = external constant [33 x i8], align 8 ; <[33 x i8]*> [#uses=0] - at .str50 = external constant [38 x i8], align 8 ; <[38 x i8]*> [#uses=0] - at .str51 = external constant [36 x i8], align 8 ; <[36 x i8]*> [#uses=0] - at .str52 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] - at .str53 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] - at .str54 = external constant [10 x i8], align 1 ; <[10 x i8]*> [#uses=0] - at .str55 = external constant [11 x i8], align 1 ; <[11 x i8]*> [#uses=0] - at .str56 = external constant [14 x i8], align 1 ; <[14 x i8]*> [#uses=0] - at .str57 = external constant [51 x i8], align 8 ; <[51 x i8]*> [#uses=0] - at .str58 = external constant [60 x i8], align 8 ; <[60 x i8]*> [#uses=0] - at .str59 = external constant [47 x i8], align 8 ; <[47 x i8]*> [#uses=0] - at .str60 = external constant [11 x i8], align 1 ; <[11 x i8]*> [#uses=0] - at .str61 = external constant [11 x i8], align 1 ; <[11 x i8]*> [#uses=0] - at .str62 = external constant [48 x i8], align 8 ; <[48 x i8]*> [#uses=0] - at .str63 = external constant [57 x i8], align 8 ; <[57 x i8]*> [#uses=0] - at .str64 = external constant [8 x i8], align 1 ; <[8 x i8]*> [#uses=0] - at .str65 = external constant [10 x i8], align 1 ; <[10 x i8]*> [#uses=0] - at .str166 = external constant [10 x i8], align 1 ; <[10 x i8]*> [#uses=0] - at HdRnSumAgWord = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] - at .str267 = external constant [17 x i8], align 1 ; <[17 x i8]*> [#uses=0] - at HdRnDifferenceAgWord = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] - at .str368 = external constant [6 x i8], align 1 ; <[6 x i8]*> [#uses=0] - at HdRnDepth = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] - at .str469 = external constant [10 x i8], align 1 ; <[10 x i8]*> [#uses=0] - at HdRnTailDepth = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] - at .str570 = external constant [14 x i8], align 1 ; <[14 x i8]*> [#uses=0] - at HdRnCentralWeight = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] - at .str671 = external constant [16 x i8], align 1 ; <[16 x i8]*> [#uses=0] - at HdRnLeadingExponent = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] - at .str772 = external constant [14 x i8], align 1 ; <[14 x i8]*> [#uses=0] - at HdRnReducedAgWord = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] - at .str873 = external constant [14 x i8], align 1 ; <[14 x i8]*> [#uses=0] - at HdRnRelativeOrder = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] - at .str974 = external constant [15 x i8], align 1 ; <[15 x i8]*> [#uses=0] - at HdRnExponentAgWord = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] - at .str1075 = external constant [16 x i8], align 1 ; <[16 x i8]*> [#uses=0] - at HdRnExponentsAgWord = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] - at .str1176 = external constant [18 x i8], align 1 ; <[18 x i8]*> [#uses=0] - at HdRnInformationAgWord = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] - at .str1277 = external constant [19 x i8], align 1 ; <[19 x i8]*> [#uses=0] - at HdRnIsCompatibleAgWord = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] - at .str1378 = external constant [13 x i8], align 1 ; <[13 x i8]*> [#uses=0] - at HdRnNormalizeIgs = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] - at .str1479 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=0] - at HdRnIsAgWord = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] - at .str1580 = external constant [5 x i8], align 1 ; <[5 x i8]*> [#uses=0] - at .str1681 = external constant [12 x i8], align 1 ; <[12 x i8]*> [#uses=0] - at .str1782 = external constant [16 x i8], align 1 ; <[16 x i8]*> [#uses=0] - at .str1883 = external constant [20 x i8], align 1 ; <[20 x i8]*> [#uses=0] - at .str1984 = external constant [22 x i8], align 1 ; <[22 x i8]*> [#uses=0] - at .str2085 = external constant [20 x i8], align 1 ; <[20 x i8]*> [#uses=0] - at .str2186 = external constant [10 x i8], align 1 ; <[10 x i8]*> [#uses=0] - at .str2287 = external constant [13 x i8], align 1 ; <[13 x i8]*> [#uses=0] - at .str2388 = external constant [14 x i8], align 1 ; <[14 x i8]*> [#uses=0] - at .str2489 = external constant [14 x i8], align 1 ; <[14 x i8]*> [#uses=0] - at .str2590 = external constant [10 x i8], align 1 ; <[10 x i8]*> [#uses=0] - at .str2691 = external constant [17 x i8], align 1 ; <[17 x i8]*> [#uses=0] - at HdCPL = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] - at HdCPC = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] - at HdCPS = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] - at .str2794 = external constant [19 x i8], align 1 ; <[19 x i8]*> [#uses=0] - at .str2895 = external constant [3 x i8], align 1 ; <[3 x i8]*> [#uses=0] - at .str2996 = external constant [14 x i8], align 1 ; <[14 x i8]*> [#uses=0] - at .str3097 = external constant [13 x i8], align 1 ; <[13 x i8]*> [#uses=0] - at .str3198 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=0] - at .str3299 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=0] - at .str33100 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=0] - at .str34101 = external constant [13 x i8], align 1 ; <[13 x i8]*> [#uses=0] - at .str35102 = external constant [12 x i8], align 1 ; <[12 x i8]*> [#uses=0] - at .str36103 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=0] - at .str37104 = external constant [5 x i8], align 1 ; <[5 x i8]*> [#uses=0] - at .str38105 = external constant [4 x i8], align 1 ; <[4 x i8]*> [#uses=0] - at .str39106 = external constant [4 x i8], align 1 ; <[4 x i8]*> [#uses=0] - at .str40107 = external constant [3 x i8], align 1 ; <[3 x i8]*> [#uses=0] - at .str41108 = external constant [41 x i8], align 8 ; <[41 x i8]*> [#uses=0] - at RepTimes = external global i64 ; [#uses=0] - at .str42109 = external constant [45 x i8], align 8 ; <[45 x i8]*> [#uses=0] - at .str43110 = external constant [28 x i8], align 1 ; <[28 x i8]*> [#uses=0] - at .str44111 = external constant [46 x i8], align 8 ; <[46 x i8]*> [#uses=0] - at .str45112 = external constant [46 x i8], align 8 ; <[46 x i8]*> [#uses=0] - at CallsProdAg = external global i64 ; [#uses=0] - at TimeProdAg = external global i64 ; [#uses=0] - at .str46113 = external constant [21 x i8], align 1 ; <[21 x i8]*> [#uses=0] - at .str47114 = external constant [8 x i8], align 1 ; <[8 x i8]*> [#uses=0] - at CallsQuoAg = external global i64 ; [#uses=0] - at TimeQuoAg = external global i64 ; [#uses=0] - at .str48115 = external constant [21 x i8], align 1 ; <[21 x i8]*> [#uses=0] - at CallsPowAgI = external global i64 ; [#uses=0] - at TimePowAgI = external global i64 ; [#uses=0] - at .str49116 = external constant [21 x i8], align 1 ; <[21 x i8]*> [#uses=0] - at CallsPowAgAg = external global i64 ; [#uses=0] - at TimePowAgAg = external global i64 ; [#uses=0] - at .str50117 = external constant [21 x i8], align 1 ; <[21 x i8]*> [#uses=0] - at CallsModAg = external global i64 ; [#uses=0] - at TimeModAg = external global i64 ; [#uses=0] - at .str51118 = external constant [21 x i8], align 1 ; <[21 x i8]*> [#uses=0] - at CallsCommAg = external global i64 ; [#uses=0] - at TimeCommAg = external global i64 ; [#uses=0] - at .str52119 = external constant [21 x i8], align 1 ; <[21 x i8]*> [#uses=0] - at CallsLtAg = external global i64 ; [#uses=0] - at TimeLtAg = external global i64 ; [#uses=0] - at .str53120 = external constant [21 x i8], align 1 ; <[21 x i8]*> [#uses=0] - at CallsEqAg = external global i64 ; [#uses=0] - at TimeEqAg = external global i64 ; [#uses=0] - at .str54121 = external constant [21 x i8], align 1 ; <[21 x i8]*> [#uses=0] - at CallsSumAg = external global i64 ; [#uses=0] - at TimeSumAg = external global i64 ; [#uses=0] - at .str55122 = external constant [21 x i8], align 1 ; <[21 x i8]*> [#uses=0] - at CallsDiffAg = external global i64 ; [#uses=0] - at TimeDiffAg = external global i64 ; [#uses=0] - at .str56123 = external constant [21 x i8], align 1 ; <[21 x i8]*> [#uses=0] - at .str57124 = external constant [40 x i8], align 8 ; <[40 x i8]*> [#uses=0] - at .str58125 = external constant [28 x i8], align 1 ; <[28 x i8]*> [#uses=0] - at .str59126 = external constant [25 x i8], align 1 ; <[25 x i8]*> [#uses=0] - at .str60127 = external constant [39 x i8], align 8 ; <[39 x i8]*> [#uses=0] - at .str61128 = external constant [28 x i8], align 1 ; <[28 x i8]*> [#uses=0] - at .str62129 = external constant [26 x i8], align 1 ; <[26 x i8]*> [#uses=0] - at .str63130 = external constant [41 x i8], align 8 ; <[41 x i8]*> [#uses=0] - at .str64131 = external constant [4 x i8], align 1 ; <[4 x i8]*> [#uses=0] - at .str65132 = external constant [2 x i8], align 1 ; <[2 x i8]*> [#uses=0] - at .str66 = external constant [31 x i8], align 8 ; <[31 x i8]*> [#uses=0] - at .str67 = external constant [37 x i8], align 8 ; <[37 x i8]*> [#uses=0] - at .str68 = external constant [37 x i8], align 8 ; <[37 x i8]*> [#uses=0] - at .str69 = external constant [12 x i8], align 1 ; <[12 x i8]*> [#uses=0] - at .str70 = external constant [12 x i8], align 1 ; <[12 x i8]*> [#uses=0] - at CPP.b = external global i1 ; [#uses=0] - at .str71 = external constant [1 x i8], align 1 ; <[1 x i8]*> [#uses=0] - at .str72 = external constant [3 x i8], align 1 ; <[3 x i8]*> [#uses=0] - at CPN = external global i64 ; [#uses=0] - at .str73 = external constant [39 x i8], align 8 ; <[39 x i8]*> [#uses=0] - at .str74 = external constant [24 x i8], align 1 ; <[24 x i8]*> [#uses=0] - at .str75 = external constant [23 x i8], align 1 ; <[23 x i8]*> [#uses=0] - at .str76 = external constant [39 x i8], align 8 ; <[39 x i8]*> [#uses=0] - at .str77 = external constant [30 x i8], align 1 ; <[30 x i8]*> [#uses=0] - at .str78 = external constant [35 x i8], align 8 ; <[35 x i8]*> [#uses=0] - at .str79 = external constant [40 x i8], align 8 ; <[40 x i8]*> [#uses=0] - at .str80 = external constant [33 x i8], align 8 ; <[33 x i8]*> [#uses=0] - at .str81 = external constant [47 x i8], align 8 ; <[47 x i8]*> [#uses=0] - at .str82 = external constant [38 x i8], align 8 ; <[38 x i8]*> [#uses=0] - at .str83 = external constant [45 x i8], align 8 ; <[45 x i8]*> [#uses=0] - at .str84 = external constant [36 x i8], align 8 ; <[36 x i8]*> [#uses=0] - at .str87 = external constant [32 x i8], align 8 ; <[32 x i8]*> [#uses=0] - at .str89 = external constant [6 x i8], align 1 ; <[6 x i8]*> [#uses=0] - at .str91 = external constant [36 x i8], align 8 ; <[36 x i8]*> [#uses=0] - at .str93 = external constant [34 x i8], align 8 ; <[34 x i8]*> [#uses=0] - at .str94 = external constant [28 x i8], align 1 ; <[28 x i8]*> [#uses=0] - at .str95 = external constant [36 x i8], align 8 ; <[36 x i8]*> [#uses=0] - at .str96 = external constant [30 x i8], align 1 ; <[30 x i8]*> [#uses=0] - at .str97 = external constant [34 x i8], align 8 ; <[34 x i8]*> [#uses=0] - at .str98 = external constant [46 x i8], align 8 ; <[46 x i8]*> [#uses=0] - at .str99 = external constant [30 x i8], align 1 ; <[30 x i8]*> [#uses=0] - at .str100 = external constant [26 x i8], align 1 ; <[26 x i8]*> [#uses=0] - at .str101 = external constant [45 x i8], align 8 ; <[45 x i8]*> [#uses=0] - at .str102 = external constant [50 x i8], align 8 ; <[50 x i8]*> [#uses=0] - at .str103 = external constant [46 x i8], align 8 ; <[46 x i8]*> [#uses=0] - at .str104 = external constant [29 x i8], align 1 ; <[29 x i8]*> [#uses=0] - at .str105 = external constant [33 x i8], align 8 ; <[33 x i8]*> [#uses=0] - at .str106 = external constant [30 x i8], align 1 ; <[30 x i8]*> [#uses=0] - at .str107 = external constant [36 x i8], align 8 ; <[36 x i8]*> [#uses=0] - at .str108 = external constant [44 x i8], align 8 ; <[44 x i8]*> [#uses=0] - at .str109 = external constant [29 x i8], align 1 ; <[29 x i8]*> [#uses=0] - at .str110 = external constant [34 x i8], align 8 ; <[34 x i8]*> [#uses=0] - at .str111 = external constant [55 x i8], align 8 ; <[55 x i8]*> [#uses=0] - at .str113 = external constant [33 x i8], align 8 ; <[33 x i8]*> [#uses=0] - at .str114 = external constant [43 x i8], align 8 ; <[43 x i8]*> [#uses=0] - at .str115 = external constant [41 x i8], align 8 ; <[41 x i8]*> [#uses=0] - at .str116 = external constant [23 x i8], align 1 ; <[23 x i8]*> [#uses=0] - at .str117 = external constant [12 x i8], align 1 ; <[12 x i8]*> [#uses=0] - at .str118 = external constant [12 x i8], align 1 ; <[12 x i8]*> [#uses=0] - at .str119 = external constant [22 x i8], align 1 ; <[22 x i8]*> [#uses=0] - at .str120 = external constant [29 x i8], align 1 ; <[29 x i8]*> [#uses=0] - at .str121 = external constant [35 x i8], align 8 ; <[35 x i8]*> [#uses=0] - at .str122 = external constant [40 x i8], align 8 ; <[40 x i8]*> [#uses=0] - at .str123 = external constant [29 x i8], align 1 ; <[29 x i8]*> [#uses=0] - at .str124 = external constant [33 x i8], align 8 ; <[33 x i8]*> [#uses=0] - at .str125 = external constant [41 x i8], align 8 ; <[41 x i8]*> [#uses=0] - at .str137 = external constant [8 x i8], align 1 ; <[8 x i8]*> [#uses=0] - at .str1138 = external constant [10 x i8], align 1 ; <[10 x i8]*> [#uses=0] - at .str2139 = external constant [10 x i8], align 1 ; <[10 x i8]*> [#uses=0] - at .str3140 = external constant [10 x i8], align 1 ; <[10 x i8]*> [#uses=0] - at .str4141 = external constant [14 x i8], align 1 ; <[14 x i8]*> [#uses=0] - at .str5142 = external constant [15 x i8], align 1 ; <[15 x i8]*> [#uses=0] - at .str6143 = external constant [11 x i8], align 1 ; <[11 x i8]*> [#uses=0] - at .str7144 = external constant [14 x i8], align 1 ; <[14 x i8]*> [#uses=0] - at .str8145 = external constant [14 x i8], align 1 ; <[14 x i8]*> [#uses=0] - at .str9146 = external constant [43 x i8], align 8 ; <[43 x i8]*> [#uses=0] - at .str10147 = external constant [44 x i8], align 8 ; <[44 x i8]*> [#uses=0] - at .str11148 = external constant [34 x i8], align 8 ; <[34 x i8]*> [#uses=0] - at .str12149 = external constant [33 x i8], align 8 ; <[33 x i8]*> [#uses=0] - at .str13150 = external constant [32 x i8], align 8 ; <[32 x i8]*> [#uses=0] - at .str14151 = external constant [43 x i8], align 8 ; <[43 x i8]*> [#uses=0] - at .str15152 = external constant [47 x i8], align 8 ; <[47 x i8]*> [#uses=0] - at .str16153 = external constant [47 x i8], align 8 ; <[47 x i8]*> [#uses=0] - at .str17154 = external constant [44 x i8], align 8 ; <[44 x i8]*> [#uses=0] - at .str18155 = external constant [43 x i8], align 8 ; <[43 x i8]*> [#uses=0] - at .str19156 = external constant [47 x i8], align 8 ; <[47 x i8]*> [#uses=0] - at .str20157 = external constant [47 x i8], align 8 ; <[47 x i8]*> [#uses=0] - at .str21158 = external constant [44 x i8], align 8 ; <[44 x i8]*> [#uses=0] - at .str22159 = external constant [44 x i8], align 8 ; <[44 x i8]*> [#uses=0] - at .str23160 = external constant [48 x i8], align 8 ; <[48 x i8]*> [#uses=0] - at .str24161 = external constant [48 x i8], align 8 ; <[48 x i8]*> [#uses=0] - at .str25162 = external constant [45 x i8], align 8 ; <[45 x i8]*> [#uses=0] - at .str26163 = external constant [40 x i8], align 8 ; <[40 x i8]*> [#uses=0] - at .str27164 = external constant [44 x i8], align 8 ; <[44 x i8]*> [#uses=0] - at .str28165 = external constant [44 x i8], align 8 ; <[44 x i8]*> [#uses=0] - at .str29166 = external constant [41 x i8], align 8 ; <[41 x i8]*> [#uses=0] - at .str30167 = external constant [43 x i8], align 8 ; <[43 x i8]*> [#uses=0] - at .str31168 = external constant [47 x i8], align 8 ; <[47 x i8]*> [#uses=0] - at .str32169 = external constant [47 x i8], align 8 ; <[47 x i8]*> [#uses=0] - at .str33170 = external constant [44 x i8], align 8 ; <[44 x i8]*> [#uses=0] - at .str34171 = external constant [28 x i8], align 1 ; <[28 x i8]*> [#uses=0] - at .str35172 = external constant [42 x i8], align 8 ; <[42 x i8]*> [#uses=0] - at .str36173 = external constant [36 x i8], align 8 ; <[36 x i8]*> [#uses=0] - at .str37174 = external constant [33 x i8], align 8 ; <[33 x i8]*> [#uses=0] - at .str38175 = external constant [42 x i8], align 8 ; <[42 x i8]*> [#uses=0] - at .str39176 = external constant [47 x i8], align 8 ; <[47 x i8]*> [#uses=0] - at .str40177 = external constant [24 x i8], align 1 ; <[24 x i8]*> [#uses=0] - at .str41178 = external constant [38 x i8], align 8 ; <[38 x i8]*> [#uses=0] - at .str179 = external constant [15 x i8], align 1 ; <[15 x i8]*> [#uses=0] - at .str1180 = external constant [35 x i8], align 8 ; <[35 x i8]*> [#uses=0] - at .str2181 = external constant [34 x i8], align 8 ; <[34 x i8]*> [#uses=0] - at .str3182 = external constant [39 x i8], align 8 ; <[39 x i8]*> [#uses=0] - at .str4183 = external constant [19 x i8], align 1 ; <[19 x i8]*> [#uses=0] - at .str5184 = external constant [37 x i8], align 8 ; <[37 x i8]*> [#uses=0] - at .str6185 = external constant [20 x i8], align 1 ; <[20 x i8]*> [#uses=0] - at .str7186 = external constant [37 x i8], align 8 ; <[37 x i8]*> [#uses=0] - at .str8187 = external constant [44 x i8], align 8 ; <[44 x i8]*> [#uses=0] - at .str9188 = external constant [45 x i8], align 8 ; <[45 x i8]*> [#uses=0] - at .str10189 = external constant [37 x i8], align 8 ; <[37 x i8]*> [#uses=0] - at .str11190 = external constant [35 x i8], align 8 ; <[35 x i8]*> [#uses=0] - at .str12191 = external constant [22 x i8], align 1 ; <[22 x i8]*> [#uses=0] - at .str13192 = external constant [36 x i8], align 8 ; <[36 x i8]*> [#uses=0] - at .str14193 = external constant [25 x i8], align 1 ; <[25 x i8]*> [#uses=0] - at .str15194 = external constant [47 x i8], align 8 ; <[47 x i8]*> [#uses=0] - at .str16195 = external constant [43 x i8], align 8 ; <[43 x i8]*> [#uses=0] - at .str17196 = external constant [36 x i8], align 8 ; <[36 x i8]*> [#uses=0] - at .str18197 = external constant [47 x i8], align 8 ; <[47 x i8]*> [#uses=0] - at .str19198 = external constant [51 x i8], align 8 ; <[51 x i8]*> [#uses=0] - at .str20199 = external constant [37 x i8], align 8 ; <[37 x i8]*> [#uses=0] - at .str21200 = external constant [37 x i8], align 8 ; <[37 x i8]*> [#uses=0] - at .str22201 = external constant [38 x i8], align 8 ; <[38 x i8]*> [#uses=0] - at .str23202 = external constant [37 x i8], align 8 ; <[37 x i8]*> [#uses=0] - at .str24203 = external constant [37 x i8], align 8 ; <[37 x i8]*> [#uses=0] - at .str25204 = external constant [39 x i8], align 8 ; <[39 x i8]*> [#uses=0] - at .str26205 = external constant [36 x i8], align 8 ; <[36 x i8]*> [#uses=0] - at .str27206 = external constant [46 x i8], align 8 ; <[46 x i8]*> [#uses=0] - at .str28207 = external constant [44 x i8], align 8 ; <[44 x i8]*> [#uses=0] - at hdTable = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] - at treeType = external global i64 ; [#uses=0] - at hdWordValue = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] - at hdTree2 = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] - at treeWordLength = external global i64 ; [#uses=0] - at wordList = external global [1024 x i64], align 32 ; <[1024 x i64]*> [#uses=0] - at hdTabl2 = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] - at .str208 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=0] - at .str1209 = external constant [17 x i8], align 1 ; <[17 x i8]*> [#uses=0] - at .str2210 = external constant [17 x i8], align 1 ; <[17 x i8]*> [#uses=0] - at .str3211 = external constant [10 x i8], align 1 ; <[10 x i8]*> [#uses=0] - at .str4212 = external constant [8 x i8], align 1 ; <[8 x i8]*> [#uses=0] - at .str5213 = external constant [14 x i8], align 1 ; <[14 x i8]*> [#uses=0] - at .str6214 = external constant [10 x i8], align 1 ; <[10 x i8]*> [#uses=0] - at .str7215 = external constant [18 x i8], align 1 ; <[18 x i8]*> [#uses=0] - at .str8216 = external constant [18 x i8], align 1 ; <[18 x i8]*> [#uses=0] - at .str9217 = external constant [18 x i8], align 1 ; <[18 x i8]*> [#uses=0] - at .str10218 = external constant [45 x i8], align 8 ; <[45 x i8]*> [#uses=0] - at .str11219 = external constant [22 x i8], align 1 ; <[22 x i8]*> [#uses=0] - at .str12220 = external constant [23 x i8], align 1 ; <[23 x i8]*> [#uses=0] - at .str13221 = external constant [28 x i8], align 1 ; <[28 x i8]*> [#uses=0] - at .str14222 = external constant [32 x i8], align 8 ; <[32 x i8]*> [#uses=0] - at .str15223 = external constant [31 x i8], align 8 ; <[31 x i8]*> [#uses=0] - at .str16224 = external constant [31 x i8], align 8 ; <[31 x i8]*> [#uses=0] - at hdExponent = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] - at hdTree1 = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] - at hdTree = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] - at .str17225 = external constant [50 x i8], align 8 ; <[50 x i8]*> [#uses=0] - at .str18226 = external constant [34 x i8], align 8 ; <[34 x i8]*> [#uses=0] - at .str19227 = external constant [15 x i8], align 1 ; <[15 x i8]*> [#uses=0] - at .str20228 = external constant [26 x i8], align 1 ; <[26 x i8]*> [#uses=0] - at .str21229 = external constant [15 x i8], align 1 ; <[15 x i8]*> [#uses=0] - at .str22230 = external constant [27 x i8], align 1 ; <[27 x i8]*> [#uses=0] - at .str23231 = external constant [31 x i8], align 8 ; <[31 x i8]*> [#uses=0] - at .str24232 = external constant [26 x i8], align 1 ; <[26 x i8]*> [#uses=0] - at .str25233 = external constant [28 x i8], align 1 ; <[28 x i8]*> [#uses=0] - at .str26234 = external constant [18 x i8], align 1 ; <[18 x i8]*> [#uses=0] - at .str27235 = external constant [34 x i8], align 8 ; <[34 x i8]*> [#uses=0] - at .str28236 = external constant [41 x i8], align 8 ; <[41 x i8]*> [#uses=0] - at .str29237 = external constant [44 x i8], align 8 ; <[44 x i8]*> [#uses=0] - at hdRel = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] - at .str30238 = external constant [32 x i8], align 8 ; <[32 x i8]*> [#uses=0] - at hdNums = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] - at .str31239 = external constant [33 x i8], align 8 ; <[33 x i8]*> [#uses=0] - at .str32240 = external constant [32 x i8], align 8 ; <[32 x i8]*> [#uses=0] - at .str33241 = external constant [33 x i8], align 8 ; <[33 x i8]*> [#uses=0] - at .str34242 = external constant [31 x i8], align 8 ; <[31 x i8]*> [#uses=0] - at dedlst = external global i64 ; [#uses=0] - at .str35243 = external constant [38 x i8], align 8 ; <[38 x i8]*> [#uses=0] - at dedfst = external global i64 ; [#uses=0] - at dedgen = external global [40960 x i64], align 32 ; <[40960 x i64]*> [#uses=0] - at dedcos = external global [40960 x i64], align 32 ; <[40960 x i64]*> [#uses=0] - at dedprint.b = external global i1 ; [#uses=0] - at .str36244 = external constant [41 x i8], align 8 ; <[41 x i8]*> [#uses=0] - at hdNext = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] - at hdPrev = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] - at lastDef = external global i64 ; [#uses=0] - at firstDef = external global i64 ; [#uses=0] - at hdFact = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] - at firstFree = external global i64 ; [#uses=0] - at lastFree = external global i64 ; [#uses=0] - at nrdel = external global i64 ; [#uses=0] - at .str37245 = external constant [36 x i8], align 8 ; <[36 x i8]*> [#uses=0] - at .str38246 = external constant [35 x i8], align 8 ; <[35 x i8]*> [#uses=0] - at lastN.4480 = external global i64 ; [#uses=0] - at phi.4481 = external global i64 ; [#uses=0] - at isSqfree.4482.b = external global i1 ; [#uses=0] - at nrp.4483 = external global i64 ; [#uses=0] - at HdResult = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] - at CycLastE = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] - at .str247 = external constant [2 x i8], align 1 ; <[2 x i8]*> [#uses=0] - at .str1248 = external constant [6 x i8], align 1 ; <[6 x i8]*> [#uses=0] - at .str2249 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=0] - at .str3250 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] + @.str4251 = external constant [10 x i8], align 1 ; <[10 x i8]*> [#uses=1] - at .str5252 = external constant [10 x i8], align 1 ; <[10 x i8]*> [#uses=0] - at .str6253 = external constant [33 x i8], align 8 ; <[33 x i8]*> [#uses=0] - at .str7254 = external constant [36 x i8], align 8 ; <[36 x i8]*> [#uses=0] - at .str8255 = external constant [38 x i8], align 8 ; <[38 x i8]*> [#uses=0] - at .str9256 = external constant [26 x i8], align 1 ; <[26 x i8]*> [#uses=0] - at .str10257 = external constant [38 x i8], align 8 ; <[38 x i8]*> [#uses=0] - at .str11258 = external constant [23 x i8], align 1 ; <[23 x i8]*> [#uses=0] - at .str12259 = external constant [45 x i8], align 8 ; <[45 x i8]*> [#uses=0] - at .str13260 = external constant [40 x i8], align 8 ; <[40 x i8]*> [#uses=0] - at .str14261 = external constant [25 x i8], align 1 ; <[25 x i8]*> [#uses=0] - at .str15262 = external constant [39 x i8], align 8 ; <[39 x i8]*> [#uses=0] - at .str16263 = external constant [22 x i8], align 1 ; <[22 x i8]*> [#uses=0] - at .str17264 = external constant [36 x i8], align 8 ; <[36 x i8]*> [#uses=0] - at .str18265 = external constant [14 x i8], align 1 ; <[14 x i8]*> [#uses=0] - at .str19266 = external constant [34 x i8], align 8 ; <[34 x i8]*> [#uses=0] - at CycLastN = external global i64 ; [#uses=0] - at .str20267 = external constant [3 x i8], align 1 ; <[3 x i8]*> [#uses=0] - at .str21268 = external constant [2 x i8], align 1 ; <[2 x i8]*> [#uses=0] - at .str22269 = external constant [10 x i8], align 1 ; <[10 x i8]*> [#uses=0] - at .str23270 = external constant [11 x i8], align 1 ; <[11 x i8]*> [#uses=0] - at .str24271 = external constant [16 x i8], align 1 ; <[16 x i8]*> [#uses=0] - at .str25272 = external constant [17 x i8], align 1 ; <[17 x i8]*> [#uses=0] - at .str26273 = external constant [13 x i8], align 1 ; <[13 x i8]*> [#uses=0] - at .str27274 = external constant [4 x i8], align 1 ; <[4 x i8]*> [#uses=0] - at .str28275 = external constant [19 x i8], align 1 ; <[19 x i8]*> [#uses=0] - at .str29276 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] - at .str30277 = external constant [11 x i8], align 1 ; <[11 x i8]*> [#uses=0] - at .str31278 = external constant [17 x i8], align 1 ; <[17 x i8]*> [#uses=0] - at EvTab = external global [81 x %struct.TypHeader* (%struct.TypHeader*)*], align 32 ; <[81 x %struct.TypHeader* (%struct.TypHeader*)*]*> [#uses=0] - at TabSum = external global [28 x [28 x %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*)*]], align 32 ; <[28 x [28 x %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*)*]]*> [#uses=0] - at TabDiff = external global [28 x [28 x %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*)*]], align 32 ; <[28 x [28 x %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*)*]]*> [#uses=0] - at TabProd = external global [28 x [28 x %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*)*]], align 32 ; <[28 x [28 x %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*)*]]*> [#uses=0] - at TabQuo = external global [28 x [28 x %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*)*]], align 32 ; <[28 x [28 x %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*)*]]*> [#uses=0] - at TabMod = external global [28 x [28 x %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*)*]], align 32 ; <[28 x [28 x %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*)*]]*> [#uses=0] - at TabPow = external global [28 x [28 x %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*)*]], align 32 ; <[28 x [28 x %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*)*]]*> [#uses=0] - at HdTrue = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] - at HdFalse = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] - at TabEq = external global [28 x [28 x %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*)*]], align 32 ; <[28 x [28 x %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*)*]]*> [#uses=0] - at TabLt = external global [28 x [28 x %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*)*]], align 32 ; <[28 x [28 x %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*)*]]*> [#uses=0] - at PrTab = external global [81 x void (%struct.TypHeader*)*], align 32 ; <[81 x void (%struct.TypHeader*)*]*> [#uses=0] - at .str292 = external constant [45 x i8], align 8 ; <[45 x i8]*> [#uses=0] - at TabComm = external global [28 x [28 x %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*)*]], align 32 ; <[28 x [28 x %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*)*]]*> [#uses=0] - at .str1294 = external constant [5 x i8], align 1 ; <[5 x i8]*> [#uses=0] - at .str2295 = external constant [13 x i8], align 1 ; <[13 x i8]*> [#uses=0] - at HdVoid = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] - at .str3297 = external constant [5 x i8], align 1 ; <[5 x i8]*> [#uses=0] - at .str4298 = external constant [6 x i8], align 1 ; <[6 x i8]*> [#uses=0] - at .str5299 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] - at .str6300 = external constant [12 x i8], align 1 ; <[12 x i8]*> [#uses=0] - at .str7301 = external constant [5 x i8], align 1 ; <[5 x i8]*> [#uses=0] @.str8302 = external constant [8 x i8], align 1 ; <[8 x i8]*> [#uses=1] - at .str9303 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] - at .str10304 = external constant [3 x i8], align 1 ; <[3 x i8]*> [#uses=0] - at HdTildePr = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] - at .str11305 = external constant [34 x i8], align 8 ; <[34 x i8]*> [#uses=0] - at .str12306 = external constant [28 x i8], align 1 ; <[28 x i8]*> [#uses=0] - at .str13307 = external constant [23 x i8], align 1 ; <[23 x i8]*> [#uses=0] - at .str14308 = external constant [37 x i8], align 8 ; <[37 x i8]*> [#uses=0] - at .str15309 = external constant [46 x i8], align 8 ; <[46 x i8]*> [#uses=0] - at .str16310 = external constant [47 x i8], align 8 ; <[47 x i8]*> [#uses=0] - at .str17311 = external constant [47 x i8], align 8 ; <[47 x i8]*> [#uses=0] - at .str18312 = external constant [41 x i8], align 8 ; <[41 x i8]*> [#uses=0] - at .str19313 = external constant [33 x i8], align 8 ; <[33 x i8]*> [#uses=0] - at .str20314 = external constant [38 x i8], align 8 ; <[38 x i8]*> [#uses=0] - at .str21315 = external constant [51 x i8], align 8 ; <[51 x i8]*> [#uses=0] - at .str22316 = external constant [30 x i8], align 1 ; <[30 x i8]*> [#uses=0] - at .str23317 = external constant [46 x i8], align 8 ; <[46 x i8]*> [#uses=0] - at .str24318 = external constant [50 x i8], align 8 ; <[50 x i8]*> [#uses=0] - at .str25319 = external constant [49 x i8], align 8 ; <[49 x i8]*> [#uses=0] - at .str26320 = external constant [48 x i8], align 8 ; <[48 x i8]*> [#uses=0] - at .str27321 = external constant [50 x i8], align 8 ; <[50 x i8]*> [#uses=0] - at .str28322 = external constant [44 x i8], align 8 ; <[44 x i8]*> [#uses=0] - at .str29323 = external constant [33 x i8], align 8 ; <[33 x i8]*> [#uses=0] - at .str30324 = external constant [4 x i8], align 1 ; <[4 x i8]*> [#uses=0] - at .str31325 = external constant [3 x i8], align 1 ; <[3 x i8]*> [#uses=0] - at .str32326 = external constant [5 x i8], align 1 ; <[5 x i8]*> [#uses=0] - at .str33327 = external constant [5 x i8], align 1 ; <[5 x i8]*> [#uses=0] - at .str34328 = external constant [4 x i8], align 1 ; <[4 x i8]*> [#uses=0] - at .str35329 = external constant [3 x i8], align 1 ; <[3 x i8]*> [#uses=0] - at .str36330 = external constant [4 x i8], align 1 ; <[4 x i8]*> [#uses=0] - at .str37331 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=0] - at .str38332 = external constant [3 x i8], align 1 ; <[3 x i8]*> [#uses=0] - at .str40334 = external constant [6 x i8], align 1 ; <[6 x i8]*> [#uses=0] - at .str41335 = external constant [4 x i8], align 1 ; <[4 x i8]*> [#uses=0] - at .str42336 = external constant [4 x i8], align 1 ; <[4 x i8]*> [#uses=0] - at .str43337 = external constant [3 x i8], align 1 ; <[3 x i8]*> [#uses=0] - at .str44338 = external constant [3 x i8], align 1 ; <[3 x i8]*> [#uses=0] - at .str45339 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] - at .str46340 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] - at .str47341 = external constant [5 x i8], align 1 ; <[5 x i8]*> [#uses=0] - at .str48342 = external constant [6 x i8], align 1 ; <[6 x i8]*> [#uses=0] - at .str49343 = external constant [6 x i8], align 1 ; <[6 x i8]*> [#uses=0] - at .str50344 = external constant [5 x i8], align 1 ; <[5 x i8]*> [#uses=0] - at .str51345 = external constant [2 x i8], align 1 ; <[2 x i8]*> [#uses=0] - at .str52346 = external constant [3 x i8], align 1 ; <[3 x i8]*> [#uses=0] - at .str53347 = external constant [4 x i8], align 1 ; <[4 x i8]*> [#uses=0] - at .str54348 = external constant [30 x i8], align 1 ; <[30 x i8]*> [#uses=0] - at .str55349 = external constant [2 x i8], align 1 ; <[2 x i8]*> [#uses=0] - at .str56350 = external constant [5 x i8], align 1 ; <[5 x i8]*> [#uses=0] - at .str57351 = external constant [4 x i8], align 1 ; <[4 x i8]*> [#uses=0] - at .str58352 = external constant [11 x i8], align 1 ; <[11 x i8]*> [#uses=0] - at .str59353 = external constant [6 x i8], align 1 ; <[6 x i8]*> [#uses=0] - at .str60354 = external constant [5 x i8], align 1 ; <[5 x i8]*> [#uses=0] - at prPrec = external global i64 ; [#uses=0] - at .str61355 = external constant [2 x i8], align 1 ; <[2 x i8]*> [#uses=0] - at .str62356 = external constant [2 x i8], align 1 ; <[2 x i8]*> [#uses=0] - at .str63357 = external constant [2 x i8], align 1 ; <[2 x i8]*> [#uses=0] - at .str64358 = external constant [3 x i8], align 1 ; <[3 x i8]*> [#uses=0] - at .str65359 = external constant [3 x i8], align 1 ; <[3 x i8]*> [#uses=0] - at .str66360 = external constant [3 x i8], align 1 ; <[3 x i8]*> [#uses=0] - at .str67361 = external constant [2 x i8], align 1 ; <[2 x i8]*> [#uses=0] - at .str68362 = external constant [2 x i8], align 1 ; <[2 x i8]*> [#uses=0] - at .str69363 = external constant [2 x i8], align 1 ; <[2 x i8]*> [#uses=0] - at .str70364 = external constant [2 x i8], align 1 ; <[2 x i8]*> [#uses=0] - at .str71365 = external constant [2 x i8], align 1 ; <[2 x i8]*> [#uses=0] - at .str72366 = external constant [17 x i8], align 1 ; <[17 x i8]*> [#uses=0] - at .str73367 = external constant [6 x i8], align 1 ; <[6 x i8]*> [#uses=0] - at .str74368 = external constant [4 x i8], align 1 ; <[4 x i8]*> [#uses=0] - at .str75369 = external constant [2 x i8], align 1 ; <[2 x i8]*> [#uses=0] - at .str76370 = external constant [2 x i8], align 1 ; <[2 x i8]*> [#uses=0] - at .str77371 = external constant [15 x i8], align 1 ; <[15 x i8]*> [#uses=0] - at .str78372 = external constant [4 x i8], align 1 ; <[4 x i8]*> [#uses=0] - at .str79373 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] - at .str81375 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=0] - at .str82376 = external constant [45 x i8], align 8 ; <[45 x i8]*> [#uses=0] - at .str83377 = external constant [24 x i8], align 1 ; <[24 x i8]*> [#uses=0] - at .str84378 = external constant [34 x i8], align 8 ; <[34 x i8]*> [#uses=0] - at .str85379 = external constant [31 x i8], align 8 ; <[31 x i8]*> [#uses=0] - at .str86380 = external constant [38 x i8], align 8 ; <[38 x i8]*> [#uses=0] - at .str87381 = external constant [39 x i8], align 8 ; <[39 x i8]*> [#uses=0] - at .str88382 = external constant [35 x i8], align 8 ; <[35 x i8]*> [#uses=0] - at .str89383 = external constant [23 x i8], align 1 ; <[23 x i8]*> [#uses=0] - at .str90384 = external constant [33 x i8], align 8 ; <[33 x i8]*> [#uses=0] - at .str91385 = external constant [30 x i8], align 1 ; <[30 x i8]*> [#uses=0] - at .str92386 = external constant [37 x i8], align 8 ; <[37 x i8]*> [#uses=0] - at .str93387 = external constant [34 x i8], align 8 ; <[34 x i8]*> [#uses=0] - at .str94388 = external constant [21 x i8], align 1 ; <[21 x i8]*> [#uses=0] - at HdReturn = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] - at Pols = external constant [186 x i64], align 32 ; <[186 x i64]*> [#uses=0] - at HdFields = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] - at HdIntFFEs = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] - at .str396 = external constant [6 x i8], align 1 ; <[6 x i8]*> [#uses=0] - at .str1397 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] - at .str2398 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] - at .str3399 = external constant [2 x i8], align 1 ; <[2 x i8]*> [#uses=0] - at .str4400 = external constant [22 x i8], align 1 ; <[22 x i8]*> [#uses=0] - at .str5401 = external constant [36 x i8], align 8 ; <[36 x i8]*> [#uses=0] - at .str6402 = external constant [24 x i8], align 1 ; <[24 x i8]*> [#uses=0] - at .str7403 = external constant [15 x i8], align 1 ; <[15 x i8]*> [#uses=0] - at .str8404 = external constant [11 x i8], align 1 ; <[11 x i8]*> [#uses=0] - at .str9405 = external constant [4 x i8], align 1 ; <[4 x i8]*> [#uses=0] - at .str10406 = external constant [10 x i8], align 1 ; <[10 x i8]*> [#uses=0] - at .str11407 = external constant [8 x i8], align 1 ; <[8 x i8]*> [#uses=0] - at .str12408 = external constant [16 x i8], align 1 ; <[16 x i8]*> [#uses=0] - at .str13409 = external constant [43 x i8], align 8 ; <[43 x i8]*> [#uses=0] - at HdLastIntFFE = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] - at .str14410 = external constant [21 x i8], align 1 ; <[21 x i8]*> [#uses=0] - at .str15411 = external constant [43 x i8], align 8 ; <[43 x i8]*> [#uses=0] - at .str16412 = external constant [40 x i8], align 8 ; <[40 x i8]*> [#uses=0] - at .str17413 = external constant [43 x i8], align 8 ; <[43 x i8]*> [#uses=0] - at .str18414 = external constant [43 x i8], align 8 ; <[43 x i8]*> [#uses=0] - at .str19415 = external constant [28 x i8], align 1 ; <[28 x i8]*> [#uses=0] - at .str20416 = external constant [43 x i8], align 8 ; <[43 x i8]*> [#uses=0] - at .str21417 = external constant [28 x i8], align 1 ; <[28 x i8]*> [#uses=0] - at .str22418 = external constant [51 x i8], align 8 ; <[51 x i8]*> [#uses=0] - at .str23419 = external constant [44 x i8], align 8 ; <[44 x i8]*> [#uses=0] - at .str24420 = external constant [35 x i8], align 8 ; <[35 x i8]*> [#uses=0] - at .str25421 = external constant [59 x i8], align 8 ; <[59 x i8]*> [#uses=0] - at .str26422 = external constant [52 x i8], align 8 ; <[52 x i8]*> [#uses=0] - at .str27423 = external constant [59 x i8], align 8 ; <[59 x i8]*> [#uses=0] - at .str28424 = external constant [52 x i8], align 8 ; <[52 x i8]*> [#uses=0] - at .str29425 = external constant [59 x i8], align 8 ; <[59 x i8]*> [#uses=0] - at .str30426 = external constant [52 x i8], align 8 ; <[52 x i8]*> [#uses=0] - at .str31427 = external constant [59 x i8], align 8 ; <[59 x i8]*> [#uses=0] - at .str32428 = external constant [52 x i8], align 8 ; <[52 x i8]*> [#uses=0] - at HdExec = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] - at .str431 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] - at .str1432 = external constant [10 x i8], align 1 ; <[10 x i8]*> [#uses=0] - at .str2433 = external constant [12 x i8], align 1 ; <[12 x i8]*> [#uses=0] - at .str3434 = external constant [10 x i8], align 1 ; <[10 x i8]*> [#uses=0] - at HdTimes = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] - at .str4435 = external constant [8 x i8], align 1 ; <[8 x i8]*> [#uses=0] - at .str5436 = external constant [47 x i8], align 8 ; <[47 x i8]*> [#uses=0] - at .str8439 = external constant [15 x i8], align 1 ; <[15 x i8]*> [#uses=0] - at .str11442 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] - at .str12443 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] - at .str13444 = external constant [6 x i8], align 1 ; <[6 x i8]*> [#uses=0] - at .str14445 = external constant [19 x i8], align 1 ; <[19 x i8]*> [#uses=0] - at .str15446 = external constant [5 x i8], align 1 ; <[5 x i8]*> [#uses=0] - at prFull.b = external global i1 ; [#uses=0] - at .str16447 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=0] - at .str18449 = external constant [10 x i8], align 1 ; <[10 x i8]*> [#uses=0] - at .str19450 = external constant [5 x i8], align 1 ; <[5 x i8]*> [#uses=0] - at .str20451 = external constant [6 x i8], align 1 ; <[6 x i8]*> [#uses=0] - at .str22453 = external constant [34 x i8], align 8 ; <[34 x i8]*> [#uses=0] - at .str23454 = external constant [28 x i8], align 1 ; <[28 x i8]*> [#uses=0] - at .str24455 = external constant [32 x i8], align 8 ; <[32 x i8]*> [#uses=0] - at .str25456 = external constant [40 x i8], align 8 ; <[40 x i8]*> [#uses=0] - at .str26457 = external constant [30 x i8], align 1 ; <[30 x i8]*> [#uses=0] - at .str27458 = external constant [23 x i8], align 1 ; <[23 x i8]*> [#uses=0] - at .str28459 = external constant [37 x i8], align 8 ; <[37 x i8]*> [#uses=0] - at .str29460 = external constant [42 x i8], align 8 ; <[42 x i8]*> [#uses=0] - at IsProfiling = external global i64 ; [#uses=0] - at .str30461 = external constant [49 x i8], align 8 ; <[49 x i8]*> [#uses=0] - at .str31462 = external constant [6 x i8], align 1 ; <[6 x i8]*> [#uses=0] - at .str32463 = external constant [44 x i8], align 8 ; <[44 x i8]*> [#uses=0] - at .str33464 = external constant [40 x i8], align 8 ; <[40 x i8]*> [#uses=0] - at Timesum = external global i64 ; [#uses=0] - at .str34465 = external constant [22 x i8], align 1 ; <[22 x i8]*> [#uses=0] - at .str35466 = external constant [36 x i8], align 8 ; <[36 x i8]*> [#uses=0] - at .str36467 = external constant [5 x i8], align 1 ; <[5 x i8]*> [#uses=0] - at .str37468 = external constant [5 x i8], align 1 ; <[5 x i8]*> [#uses=0] - at .str39470 = external constant [5 x i8], align 1 ; <[5 x i8]*> [#uses=0] - at .str40471 = external constant [5 x i8], align 1 ; <[5 x i8]*> [#uses=0] - at .str42473 = external constant [4 x i8], align 1 ; <[4 x i8]*> [#uses=0] - at .str43474 = external constant [11 x i8], align 1 ; <[11 x i8]*> [#uses=0] - at .str477 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=0] - at .str1478 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=0] - at .str2479 = external constant [8 x i8], align 1 ; <[8 x i8]*> [#uses=0] - at .str3480 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] - at .str4481 = external constant [5 x i8], align 1 ; <[5 x i8]*> [#uses=0] - at .str5482 = external constant [5 x i8], align 1 ; <[5 x i8]*> [#uses=0] - at .str7484 = external constant [8 x i8], align 1 ; <[8 x i8]*> [#uses=0] - at .str8485 = external constant [6 x i8], align 1 ; <[6 x i8]*> [#uses=0] - at HdLast = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] - at ErrRet = external global [1 x %struct.__jmp_buf_tag], align 32 ; <[1 x %struct.__jmp_buf_tag]*> [#uses=0] - at .str9486 = external constant [5 x i8], align 1 ; <[5 x i8]*> [#uses=0] - at .str10487 = external constant [6 x i8], align 1 ; <[6 x i8]*> [#uses=0] - at HdLast2 = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] - at .str11488 = external constant [6 x i8], align 1 ; <[6 x i8]*> [#uses=0] - at HdLast3 = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] - at .str12489 = external constant [5 x i8], align 1 ; <[5 x i8]*> [#uses=0] - at HdTime = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] - at .str13490 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] - at .str14491 = external constant [18 x i8], align 1 ; <[18 x i8]*> [#uses=0] - at .str15492 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] - at .str16493 = external constant [8 x i8], align 1 ; <[8 x i8]*> [#uses=0] - at .str17494 = external constant [6 x i8], align 1 ; <[6 x i8]*> [#uses=0] - at .str18495 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] - at .str19496 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] - at .str20497 = external constant [6 x i8], align 1 ; <[6 x i8]*> [#uses=0] - at .str21498 = external constant [10 x i8], align 1 ; <[10 x i8]*> [#uses=0] - at .str22499 = external constant [10 x i8], align 1 ; <[10 x i8]*> [#uses=0] - at .str23500 = external constant [5 x i8], align 1 ; <[5 x i8]*> [#uses=0] - at .str24501 = external constant [5 x i8], align 1 ; <[5 x i8]*> [#uses=0] - at .str25502 = external constant [6 x i8], align 1 ; <[6 x i8]*> [#uses=0] - at .str26503 = external constant [8 x i8], align 1 ; <[8 x i8]*> [#uses=0] - at .str27504 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=0] - at .str28505 = external constant [6 x i8], align 1 ; <[6 x i8]*> [#uses=0] - at .str29506 = external constant [11 x i8], align 1 ; <[11 x i8]*> [#uses=0] - at .str30507 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=0] - at .str31508 = external constant [5 x i8], align 1 ; <[5 x i8]*> [#uses=0] - at .str32509 = external constant [5 x i8], align 1 ; <[5 x i8]*> [#uses=0] - at .str33510 = external constant [8 x i8], align 1 ; <[8 x i8]*> [#uses=0] - at .str34511 = external constant [11 x i8], align 1 ; <[11 x i8]*> [#uses=0] - at .str35512 = external constant [8 x i8], align 1 ; <[8 x i8]*> [#uses=0] - at .str36513 = external constant [12 x i8], align 1 ; <[12 x i8]*> [#uses=0] - at .str37514 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] - at .str38515 = external constant [4 x i8], align 1 ; <[4 x i8]*> [#uses=0] - at .str39516 = external constant [5 x i8], align 1 ; <[5 x i8]*> [#uses=0] - at .str40517 = external constant [5 x i8], align 1 ; <[5 x i8]*> [#uses=0] - at .str41518 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] - at .str42519 = external constant [15 x i8], align 1 ; <[15 x i8]*> [#uses=0] - at .str43520 = external constant [13 x i8], align 1 ; <[13 x i8]*> [#uses=0] - at .str44521 = external constant [16 x i8], align 1 ; <[16 x i8]*> [#uses=0] - at .str45522 = external constant [32 x i8], align 8 ; <[32 x i8]*> [#uses=0] - at .str46523 = external constant [30 x i8], align 1 ; <[30 x i8]*> [#uses=0] - at .str47524 = external constant [21 x i8], align 1 ; <[21 x i8]*> [#uses=0] - at .str48525 = external constant [30 x i8], align 1 ; <[30 x i8]*> [#uses=0] - at .str49526 = external constant [41 x i8], align 8 ; <[41 x i8]*> [#uses=0] - at .str50527 = external constant [32 x i8], align 8 ; <[32 x i8]*> [#uses=0] - at .str51528 = external constant [43 x i8], align 8 ; <[43 x i8]*> [#uses=0] - at .str52529 = external constant [37 x i8], align 8 ; <[37 x i8]*> [#uses=0] - at .str53530 = external constant [41 x i8], align 8 ; <[41 x i8]*> [#uses=0] - at .str54531 = external constant [52 x i8], align 8 ; <[52 x i8]*> [#uses=0] - at .str55532 = external constant [55 x i8], align 8 ; <[55 x i8]*> [#uses=0] - at .str56533 = external constant [8 x i8], align 1 ; <[8 x i8]*> [#uses=0] - at .str57534 = external constant [50 x i8], align 8 ; <[50 x i8]*> [#uses=0] - at .str58535 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] - at .str59536 = external constant [10 x i8], align 1 ; <[10 x i8]*> [#uses=0] - at .str60537 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=0] - at .str61538 = external constant [6 x i8], align 1 ; <[6 x i8]*> [#uses=0] - at .str62539 = external constant [8 x i8], align 1 ; <[8 x i8]*> [#uses=0] - at .str63540 = external constant [8 x i8], align 1 ; <[8 x i8]*> [#uses=0] - at .str64541 = external constant [21 x i8], align 1 ; <[21 x i8]*> [#uses=0] - at .str65542 = external constant [21 x i8], align 1 ; <[21 x i8]*> [#uses=0] - at .str66543 = external constant [5 x i8], align 1 ; <[5 x i8]*> [#uses=0] - at .str67544 = external constant [19 x i8], align 1 ; <[19 x i8]*> [#uses=0] - at .str68545 = external constant [34 x i8], align 8 ; <[34 x i8]*> [#uses=0] - at .str69546 = external constant [23 x i8], align 1 ; <[23 x i8]*> [#uses=0] - at .str70547 = external constant [37 x i8], align 8 ; <[37 x i8]*> [#uses=0] - at .str71548 = external constant [31 x i8], align 8 ; <[31 x i8]*> [#uses=0] - at .str72549 = external constant [17 x i8], align 1 ; <[17 x i8]*> [#uses=0] - at .str73550 = external constant [45 x i8], align 8 ; <[45 x i8]*> [#uses=0] - at .str74551 = external constant [35 x i8], align 8 ; <[35 x i8]*> [#uses=0] - at .str75552 = external constant [35 x i8], align 8 ; <[35 x i8]*> [#uses=0] - at .str76553 = external constant [17 x i8], align 1 ; <[17 x i8]*> [#uses=0] - at .str77554 = external constant [25 x i8], align 1 ; <[25 x i8]*> [#uses=0] - at .str78555 = external constant [26 x i8], align 1 ; <[26 x i8]*> [#uses=0] - at .str79556 = external constant [30 x i8], align 1 ; <[30 x i8]*> [#uses=0] - at .str80557 = external constant [48 x i8], align 8 ; <[48 x i8]*> [#uses=0] - at .str81558 = external constant [36 x i8], align 8 ; <[36 x i8]*> [#uses=0] - at .str82559 = external constant [34 x i8], align 8 ; <[34 x i8]*> [#uses=0] - at .str83560 = external constant [54 x i8], align 8 ; <[54 x i8]*> [#uses=0] - at .str84561 = external constant [38 x i8], align 8 ; <[38 x i8]*> [#uses=0] - at .str85562 = external constant [41 x i8], align 8 ; <[41 x i8]*> [#uses=0] - at .str86563 = external constant [29 x i8], align 1 ; <[29 x i8]*> [#uses=0] - at .str87564 = external constant [33 x i8], align 8 ; <[33 x i8]*> [#uses=0] - at .str88565 = external constant [36 x i8], align 8 ; <[36 x i8]*> [#uses=0] - at .str89566 = external constant [25 x i8], align 1 ; <[25 x i8]*> [#uses=0] - at .str90567 = external constant [43 x i8], align 8 ; <[43 x i8]*> [#uses=0] - at .str91568 = external constant [46 x i8], align 8 ; <[46 x i8]*> [#uses=0] - at .str93570 = external constant [55 x i8], align 8 ; <[55 x i8]*> [#uses=0] - at .str94571 = external constant [42 x i8], align 8 ; <[42 x i8]*> [#uses=0] - at .str95572 = external constant [43 x i8], align 8 ; <[43 x i8]*> [#uses=0] - at .str96573 = external constant [54 x i8], align 8 ; <[54 x i8]*> [#uses=0] - at .str97574 = external constant [29 x i8], align 1 ; <[29 x i8]*> [#uses=0] - at .str98575 = external constant [39 x i8], align 8 ; <[39 x i8]*> [#uses=0] - at .str99576 = external constant [26 x i8], align 1 ; <[26 x i8]*> [#uses=0] - at .str100577 = external constant [37 x i8], align 8 ; <[37 x i8]*> [#uses=0] - at .str101578 = external constant [35 x i8], align 8 ; <[35 x i8]*> [#uses=0] - at .str102579 = external constant [50 x i8], align 8 ; <[50 x i8]*> [#uses=0] - at .str103580 = external constant [27 x i8], align 1 ; <[27 x i8]*> [#uses=0] - at .str104581 = external constant [23 x i8], align 1 ; <[23 x i8]*> [#uses=0] - at .str105582 = external constant [29 x i8], align 1 ; <[29 x i8]*> [#uses=0] - at .str106583 = external constant [43 x i8], align 8 ; <[43 x i8]*> [#uses=0] - at .str107584 = external constant [26 x i8], align 1 ; <[26 x i8]*> [#uses=0] - at .str108585 = external constant [16 x i8], align 1 ; <[16 x i8]*> [#uses=0] - at .str109586 = external constant [28 x i8], align 1 ; <[28 x i8]*> [#uses=0] - at .str110587 = external constant [29 x i8], align 1 ; <[29 x i8]*> [#uses=0] - at .str111588 = external constant [29 x i8], align 1 ; <[29 x i8]*> [#uses=0] - at .str112589 = external constant [29 x i8], align 1 ; <[29 x i8]*> [#uses=0] - at .str113590 = external constant [29 x i8], align 1 ; <[29 x i8]*> [#uses=0] - at .str114591 = external constant [31 x i8], align 8 ; <[31 x i8]*> [#uses=0] - at .str115592 = external constant [29 x i8], align 1 ; <[29 x i8]*> [#uses=0] - at .str116593 = external constant [33 x i8], align 8 ; <[33 x i8]*> [#uses=0] - at .str117594 = external constant [29 x i8], align 1 ; <[29 x i8]*> [#uses=0] - at .str118595 = external constant [29 x i8], align 1 ; <[29 x i8]*> [#uses=0] - at .str119596 = external constant [28 x i8], align 1 ; <[28 x i8]*> [#uses=0] - at .str120597 = external constant [28 x i8], align 1 ; <[28 x i8]*> [#uses=0] - at .str121598 = external constant [14 x i8], align 1 ; <[14 x i8]*> [#uses=0] - at .str122599 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] - at .str124601 = external constant [19 x i8], align 1 ; <[19 x i8]*> [#uses=0] - at .str125602 = external constant [11 x i8], align 1 ; <[11 x i8]*> [#uses=0] - at .str126 = external constant [5 x i8], align 1 ; <[5 x i8]*> [#uses=0] - at .str127 = external constant [6 x i8], align 1 ; <[6 x i8]*> [#uses=0] - at .str128 = external constant [39 x i8], align 8 ; <[39 x i8]*> [#uses=0] - at NameType = external constant [81 x i8*], align 32 ; <[81 x i8*]*> [#uses=0] - at Size = external global [81 x %struct.anon], align 32 ; <[81 x %struct.anon]*> [#uses=0] - at HdNewHandles = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] - at NrNewHandles = external global i64 ; [#uses=0] - at s.3831 = external global [7 x i8] ; <[7 x i8]*> [#uses=0] - at HdFree = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] - at .str605 = external constant [55 x i8], align 8 ; <[55 x i8]*> [#uses=0] - at FreeHandle = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] - at NrFreeHandles = external global i64 ; [#uses=0] - at FirstBag = external global %struct.TypHeader** ; <%struct.TypHeader***> [#uses=0] - at HdResize = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] - at IsResizeCall.b = external global i1 ; [#uses=0] - at .str1606 = external constant [22 x i8], align 1 ; <[22 x i8]*> [#uses=0] - at .str2607 = external constant [8 x i8], align 1 ; <[8 x i8]*> [#uses=0] - at .str3608 = external constant [49 x i8], align 8 ; <[49 x i8]*> [#uses=0] - at .str4609 = external constant [8 x i8], align 1 ; <[8 x i8]*> [#uses=0] - at .str5610 = external constant [11 x i8], align 1 ; <[11 x i8]*> [#uses=0] - at .str6611 = external constant [11 x i8], align 1 ; <[11 x i8]*> [#uses=0] - at .str7612 = external constant [41 x i8], align 8 ; <[41 x i8]*> [#uses=0] - at .str8613 = external constant [11 x i8], align 1 ; <[11 x i8]*> [#uses=0] - at .str9614 = external constant [3 x i8], align 1 ; <[3 x i8]*> [#uses=0] - at .str10615 = external constant [40 x i8], align 8 ; <[40 x i8]*> [#uses=0] - at .str11616 = external constant [26 x i8], align 1 ; <[26 x i8]*> [#uses=0] - at lastType = external global i64 ; [#uses=0] - at lastSize = external global i64 ; [#uses=0] - at .str12617 = external constant [32 x i8], align 8 ; <[32 x i8]*> [#uses=0] - at .str13618 = external constant [5 x i8], align 1 ; <[5 x i8]*> [#uses=0] - at .str14619 = external constant [8 x i8], align 1 ; <[8 x i8]*> [#uses=0] - at .str15620 = external constant [17 x i8], align 1 ; <[17 x i8]*> [#uses=0] - at .str16621 = external constant [18 x i8], align 1 ; <[18 x i8]*> [#uses=0] - at .str17622 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=0] - at .str18623 = external constant [11 x i8], align 1 ; <[11 x i8]*> [#uses=0] - at .str19624 = external constant [8 x i8], align 1 ; <[8 x i8]*> [#uses=0] - at .str20625 = external constant [21 x i8], align 1 ; <[21 x i8]*> [#uses=0] - at .str21626 = external constant [12 x i8], align 1 ; <[12 x i8]*> [#uses=0] - at .str22627 = external constant [5 x i8], align 1 ; <[5 x i8]*> [#uses=0] - at .str23628 = external constant [12 x i8], align 1 ; <[12 x i8]*> [#uses=0] - at .str24629 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] - at .str25630 = external constant [8 x i8], align 1 ; <[8 x i8]*> [#uses=0] - at .str26631 = external constant [10 x i8], align 1 ; <[10 x i8]*> [#uses=0] - at .str28633 = external constant [18 x i8], align 1 ; <[18 x i8]*> [#uses=0] - at .str29634 = external constant [5 x i8], align 1 ; <[5 x i8]*> [#uses=0] - at .str30635 = external constant [4 x i8], align 1 ; <[4 x i8]*> [#uses=0] - at .str31636 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] - at .str32637 = external constant [20 x i8], align 1 ; <[20 x i8]*> [#uses=0] - at .str33638 = external constant [13 x i8], align 1 ; <[13 x i8]*> [#uses=0] - at .str34639 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] - at .str35640 = external constant [6 x i8], align 1 ; <[6 x i8]*> [#uses=0] - at .str36641 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] - at .str37642 = external constant [18 x i8], align 1 ; <[18 x i8]*> [#uses=0] - at .str38643 = external constant [18 x i8], align 1 ; <[18 x i8]*> [#uses=0] - at .str39644 = external constant [16 x i8], align 1 ; <[16 x i8]*> [#uses=0] - at .str40645 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=0] - at .str41646 = external constant [18 x i8], align 1 ; <[18 x i8]*> [#uses=0] - at .str42647 = external constant [15 x i8], align 1 ; <[15 x i8]*> [#uses=0] - at .str43648 = external constant [13 x i8], align 1 ; <[13 x i8]*> [#uses=0] - at .str44649 = external constant [8 x i8], align 1 ; <[8 x i8]*> [#uses=0] - at .str45650 = external constant [16 x i8], align 1 ; <[16 x i8]*> [#uses=0] - at .str46651 = external constant [15 x i8], align 1 ; <[15 x i8]*> [#uses=0] - at .str47652 = external constant [18 x i8], align 1 ; <[18 x i8]*> [#uses=0] - at .str54659 = external constant [11 x i8], align 1 ; <[11 x i8]*> [#uses=0] - at .str65670 = external constant [14 x i8], align 1 ; <[14 x i8]*> [#uses=0] - at .str66671 = external constant [19 x i8], align 1 ; <[19 x i8]*> [#uses=0] - at .str67672 = external constant [13 x i8], align 1 ; <[13 x i8]*> [#uses=0] - at .str68673 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=0] - at .str69674 = external constant [11 x i8], align 1 ; <[11 x i8]*> [#uses=0] - at .str70675 = external constant [12 x i8], align 1 ; <[12 x i8]*> [#uses=0] - at .str71676 = external constant [17 x i8], align 1 ; <[17 x i8]*> [#uses=0] - at .str72677 = external constant [16 x i8], align 1 ; <[16 x i8]*> [#uses=0] - at .str73678 = external constant [13 x i8], align 1 ; <[13 x i8]*> [#uses=0] - at .str74679 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=0] - at .str75680 = external constant [11 x i8], align 1 ; <[11 x i8]*> [#uses=0] - at .str76681 = external constant [10 x i8], align 1 ; <[10 x i8]*> [#uses=0] - at .str77682 = external constant [11 x i8], align 1 ; <[11 x i8]*> [#uses=0] - at .str78683 = external constant [6 x i8], align 1 ; <[6 x i8]*> [#uses=0] - at .str79684 = external constant [13 x i8], align 1 ; <[13 x i8]*> [#uses=0] - at .str80685 = external constant [19 x i8], align 1 ; <[19 x i8]*> [#uses=0] - at .str81686 = external constant [8 x i8], align 1 ; <[8 x i8]*> [#uses=0] - at .str82687 = external constant [24 x i8], align 1 ; <[24 x i8]*> [#uses=0] - at .str83688 = external constant [19 x i8], align 1 ; <[19 x i8]*> [#uses=0] - at .str84689 = external constant [22 x i8], align 1 ; <[22 x i8]*> [#uses=0] - at .str85690 = external constant [12 x i8], align 1 ; <[12 x i8]*> [#uses=0] - at .str86691 = external constant [12 x i8], align 1 ; <[12 x i8]*> [#uses=0] - at .str87692 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=0] - at GasmanStatAlive = external constant [81 x i64], align 32 ; <[81 x i64]*> [#uses=0] - at GasmanStatTotal = external global [81 x i64], align 32 ; <[81 x i64]*> [#uses=0] - at GasmanStatTSize = external global [81 x i64], align 32 ; <[81 x i64]*> [#uses=0] - at HdStack = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] - at TopStack = external global i64 ; [#uses=0] @HdIdenttab = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=1] - at HdRectab = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] - at NrRectab = external global i64 ; [#uses=0] - at IsUndefinedGlobal.b = external global i1 ; [#uses=0] - at NrIdenttab = external global i64 ; [#uses=0] - at .str710 = external constant [6 x i8], align 1 ; <[6 x i8]*> [#uses=0] - at .str1711 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] - at .str2712 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] - at .str3713 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] - at .str4714 = external constant [22 x i8], align 1 ; <[22 x i8]*> [#uses=0] - at .str5715 = external constant [36 x i8], align 8 ; <[36 x i8]*> [#uses=0] - at .str6716 = external constant [30 x i8], align 1 ; <[30 x i8]*> [#uses=0] - at .str7717 = external constant [46 x i8], align 8 ; <[46 x i8]*> [#uses=0] - at .str8718 = external constant [30 x i8], align 1 ; <[30 x i8]*> [#uses=0] - at .str9719 = external constant [30 x i8], align 1 ; <[30 x i8]*> [#uses=0] - at .str10720 = external constant [43 x i8], align 8 ; <[43 x i8]*> [#uses=0] - at .str11721 = external constant [30 x i8], align 1 ; <[30 x i8]*> [#uses=0] - at .str12722 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] - at PrIntC = external global [1000 x i16], align 32 ; <[1000 x i16]*> [#uses=0] - at PrIntD = external global [1205 x i16], align 32 ; <[1205 x i16]*> [#uses=0] - at .str15725 = external constant [3 x i8], align 1 ; <[3 x i8]*> [#uses=0] - at .str16726 = external constant [5 x i8], align 1 ; <[5 x i8]*> [#uses=0] - at .str18728 = external constant [39 x i8], align 8 ; <[39 x i8]*> [#uses=0] - at TabIsList = external global [28 x i64], align 32 ; <[28 x i64]*> [#uses=0] - at TabPlainList = external global [28 x void (%struct.TypHeader*)*], align 32 ; <[28 x void (%struct.TypHeader*)*]*> [#uses=0] - at TabIsXTypeList = external global [28 x i64 (%struct.TypHeader*)*], align 32 ; <[28 x i64 (%struct.TypHeader*)*]*> [#uses=0] - at TabLenList = external global [28 x i64 (%struct.TypHeader*)*], align 32 ; <[28 x i64 (%struct.TypHeader*)*]*> [#uses=0] - at TabElmlList = external global [28 x %struct.TypHeader* (%struct.TypHeader*, i64)*], align 32 ; <[28 x %struct.TypHeader* (%struct.TypHeader*, i64)*]*> [#uses=0] - at TabElmrList = external global [28 x %struct.TypHeader* (%struct.TypHeader*, i64)*], align 32 ; <[28 x %struct.TypHeader* (%struct.TypHeader*, i64)*]*> [#uses=0] - at TabElmList = external global [28 x %struct.TypHeader* (%struct.TypHeader*, i64)*], align 32 ; <[28 x %struct.TypHeader* (%struct.TypHeader*, i64)*]*> [#uses=0] - at TabElmfList = external global [28 x %struct.TypHeader* (%struct.TypHeader*, i64)*], align 32 ; <[28 x %struct.TypHeader* (%struct.TypHeader*, i64)*]*> [#uses=0] - at TabElmsList = external global [28 x %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*)*], align 32 ; <[28 x %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*)*]*> [#uses=0] - at TabAssList = external global [28 x %struct.TypHeader* (%struct.TypHeader*, i64, %struct.TypHeader*)*], align 32 ; <[28 x %struct.TypHeader* (%struct.TypHeader*, i64, %struct.TypHeader*)*]*> [#uses=0] - at TabAsssList = external global [28 x %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*, %struct.TypHeader*)*], align 32 ; <[28 x %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*, %struct.TypHeader*)*]*> [#uses=0] - at TabPosList = external global [28 x i64 (%struct.TypHeader*, %struct.TypHeader*, i64)*], align 32 ; <[28 x i64 (%struct.TypHeader*, %struct.TypHeader*, i64)*]*> [#uses=0] - at TabIsDenseList = external global [28 x i64 (%struct.TypHeader*)*], align 32 ; <[28 x i64 (%struct.TypHeader*)*]*> [#uses=0] - at TabIsPossList = external global [28 x i64 (%struct.TypHeader*)*], align 32 ; <[28 x i64 (%struct.TypHeader*)*]*> [#uses=0] - at TabDepthVector = external global [28 x %struct.TypHeader* (%struct.TypHeader*)*], align 32 ; <[28 x %struct.TypHeader* (%struct.TypHeader*)*]*> [#uses=0] - at .str748 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] - at .str1749 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=0] - at .str2750 = external constant [6 x i8], align 1 ; <[6 x i8]*> [#uses=0] - at .str3751 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] - at .str4752 = external constant [4 x i8], align 1 ; <[4 x i8]*> [#uses=0] - at .str5753 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] - at .str6754 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=0] - at .str7755 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=0] - at .str8756 = external constant [8 x i8], align 1 ; <[8 x i8]*> [#uses=0] - at .str9757 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=0] - at .str10758 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] - at .str11759 = external constant [8 x i8], align 1 ; <[8 x i8]*> [#uses=0] - at .str12760 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] - at .str13761 = external constant [12 x i8], align 1 ; <[12 x i8]*> [#uses=0] - at .str14762 = external constant [37 x i8], align 8 ; <[37 x i8]*> [#uses=0] - at .str15763 = external constant [28 x i8], align 1 ; <[28 x i8]*> [#uses=0] - at .str16764 = external constant [30 x i8], align 1 ; <[30 x i8]*> [#uses=0] - at .str17765 = external constant [31 x i8], align 8 ; <[31 x i8]*> [#uses=0] - at .str18766 = external constant [32 x i8], align 8 ; <[32 x i8]*> [#uses=0] - at .str19767 = external constant [33 x i8], align 8 ; <[33 x i8]*> [#uses=0] - at .str20768 = external constant [44 x i8], align 8 ; <[44 x i8]*> [#uses=0] - at .str21769 = external constant [39 x i8], align 8 ; <[39 x i8]*> [#uses=0] - at .str22770 = external constant [32 x i8], align 8 ; <[32 x i8]*> [#uses=0] - at .str23771 = external constant [24 x i8], align 1 ; <[24 x i8]*> [#uses=0] - at .str24772 = external constant [22 x i8], align 1 ; <[22 x i8]*> [#uses=0] - at .str25773 = external constant [34 x i8], align 8 ; <[34 x i8]*> [#uses=0] - at .str26774 = external constant [25 x i8], align 1 ; <[25 x i8]*> [#uses=0] - at .str27775 = external constant [37 x i8], align 8 ; <[37 x i8]*> [#uses=0] - at .str28776 = external constant [23 x i8], align 1 ; <[23 x i8]*> [#uses=0] - at .str29777 = external constant [37 x i8], align 8 ; <[37 x i8]*> [#uses=0] - at .str30778 = external constant [46 x i8], align 8 ; <[46 x i8]*> [#uses=0] - at .str31779 = external constant [66 x i8], align 8 ; <[66 x i8]*> [#uses=0] - at .str32780 = external constant [40 x i8], align 8 ; <[40 x i8]*> [#uses=0] - at .str33781 = external constant [62 x i8], align 8 ; <[62 x i8]*> [#uses=0] - at .str34782 = external constant [72 x i8], align 8 ; <[72 x i8]*> [#uses=0] - at .str35783 = external constant [47 x i8], align 8 ; <[47 x i8]*> [#uses=0] - at .str36784 = external constant [40 x i8], align 8 ; <[40 x i8]*> [#uses=0] - at .str37785 = external constant [63 x i8], align 8 ; <[63 x i8]*> [#uses=0] - at .str38786 = external constant [65 x i8], align 8 ; <[65 x i8]*> [#uses=0] - at .str39787 = external constant [45 x i8], align 8 ; <[45 x i8]*> [#uses=0] - at .str40788 = external constant [39 x i8], align 8 ; <[39 x i8]*> [#uses=0] - at .str41789 = external constant [61 x i8], align 8 ; <[61 x i8]*> [#uses=0] - at .str42790 = external constant [55 x i8], align 8 ; <[55 x i8]*> [#uses=0] - at .str43791 = external constant [46 x i8], align 8 ; <[46 x i8]*> [#uses=0] - at .str44792 = external constant [37 x i8], align 8 ; <[37 x i8]*> [#uses=0] - at .str45793 = external constant [69 x i8], align 8 ; <[69 x i8]*> [#uses=0] - at .str46794 = external constant [36 x i8], align 8 ; <[36 x i8]*> [#uses=0] - at .str47795 = external constant [52 x i8], align 8 ; <[52 x i8]*> [#uses=0] - at .str49797 = external constant [45 x i8], align 8 ; <[45 x i8]*> [#uses=0] - at .str50798 = external constant [30 x i8], align 1 ; <[30 x i8]*> [#uses=0] - at .str51799 = external constant [30 x i8], align 1 ; <[30 x i8]*> [#uses=0] - at .str52800 = external constant [31 x i8], align 8 ; <[31 x i8]*> [#uses=0] - at .str53801 = external constant [34 x i8], align 8 ; <[34 x i8]*> [#uses=0] - at .str54802 = external constant [30 x i8], align 1 ; <[30 x i8]*> [#uses=0] - at .str55803 = external constant [30 x i8], align 1 ; <[30 x i8]*> [#uses=0] - at .str56804 = external constant [34 x i8], align 8 ; <[34 x i8]*> [#uses=0] - at .str57805 = external constant [31 x i8], align 8 ; <[31 x i8]*> [#uses=0] - at .str58806 = external constant [31 x i8], align 8 ; <[31 x i8]*> [#uses=0] - at .str59807 = external constant [28 x i8], align 1 ; <[28 x i8]*> [#uses=0] - at .str60808 = external constant [27 x i8], align 1 ; <[27 x i8]*> [#uses=0] - at .str61809 = external constant [34 x i8], align 8 ; <[34 x i8]*> [#uses=0] - at .str62810 = external constant [32 x i8], align 8 ; <[32 x i8]*> [#uses=0] - at .str63811 = external constant [33 x i8], align 8 ; <[33 x i8]*> [#uses=0] - at .str64812 = external constant [33 x i8], align 8 ; <[33 x i8]*> [#uses=0] - at .str68816 = external constant [4 x i8], align 1 ; <[4 x i8]*> [#uses=0] - at .str69817 = external constant [4 x i8], align 1 ; <[4 x i8]*> [#uses=0] - at .str70818 = external constant [4 x i8], align 1 ; <[4 x i8]*> [#uses=0] - at .str71819 = external constant [4 x i8], align 1 ; <[4 x i8]*> [#uses=0] - at .str72820 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=0] - at .str73821 = external constant [10 x i8], align 1 ; <[10 x i8]*> [#uses=0] - at .str74822 = external constant [8 x i8], align 1 ; <[8 x i8]*> [#uses=0] - at .str75823 = external constant [6 x i8], align 1 ; <[6 x i8]*> [#uses=0] - at .str76824 = external constant [42 x i8], align 8 ; <[42 x i8]*> [#uses=0] - at .str77825 = external constant [42 x i8], align 8 ; <[42 x i8]*> [#uses=0] - at .str78826 = external constant [42 x i8], align 8 ; <[42 x i8]*> [#uses=0] - at .str832 = external constant [14 x i8], align 1 ; <[14 x i8]*> [#uses=0] - at .str1833 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=0] - at .str2834 = external constant [8 x i8], align 1 ; <[8 x i8]*> [#uses=0] - at .str3835 = external constant [13 x i8], align 1 ; <[13 x i8]*> [#uses=0] - at .str4836 = external constant [11 x i8], align 1 ; <[11 x i8]*> [#uses=0] - at .str5837 = external constant [12 x i8], align 1 ; <[12 x i8]*> [#uses=0] - at .str6838 = external constant [16 x i8], align 1 ; <[16 x i8]*> [#uses=0] - at .str7839 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] - at .str8840 = external constant [14 x i8], align 1 ; <[14 x i8]*> [#uses=0] - at .str9841 = external constant [12 x i8], align 1 ; <[12 x i8]*> [#uses=0] - at .str10842 = external constant [13 x i8], align 1 ; <[13 x i8]*> [#uses=0] - at .str11843 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=0] - at .str12844 = external constant [13 x i8], align 1 ; <[13 x i8]*> [#uses=0] - at .str13845 = external constant [15 x i8], align 1 ; <[15 x i8]*> [#uses=0] - at .str14846 = external constant [15 x i8], align 1 ; <[15 x i8]*> [#uses=0] - at .str15847 = external constant [14 x i8], align 1 ; <[14 x i8]*> [#uses=0] - at .str16848 = external constant [18 x i8], align 1 ; <[18 x i8]*> [#uses=0] - at .str17849 = external constant [24 x i8], align 1 ; <[24 x i8]*> [#uses=0] - at .str18850 = external constant [14 x i8], align 1 ; <[14 x i8]*> [#uses=0] - at .str19851 = external constant [11 x i8], align 1 ; <[11 x i8]*> [#uses=0] - at .str20852 = external constant [16 x i8], align 1 ; <[16 x i8]*> [#uses=0] - at .str21853 = external constant [15 x i8], align 1 ; <[15 x i8]*> [#uses=0] - at .str22854 = external constant [12 x i8], align 1 ; <[12 x i8]*> [#uses=0] - at .str23855 = external constant [17 x i8], align 1 ; <[17 x i8]*> [#uses=0] - at .str24856 = external constant [4 x i8], align 1 ; <[4 x i8]*> [#uses=0] - at .str25857 = external constant [14 x i8], align 1 ; <[14 x i8]*> [#uses=0] - at .str26858 = external constant [17 x i8], align 1 ; <[17 x i8]*> [#uses=0] - at .str27859 = external constant [10 x i8], align 1 ; <[10 x i8]*> [#uses=0] - at .str28860 = external constant [6 x i8], align 1 ; <[6 x i8]*> [#uses=0] - at .str29861 = external constant [35 x i8], align 8 ; <[35 x i8]*> [#uses=0] - at .str30862 = external constant [33 x i8], align 8 ; <[33 x i8]*> [#uses=0] - at .str31863 = external constant [32 x i8], align 8 ; <[32 x i8]*> [#uses=0] - at .str32864 = external constant [33 x i8], align 8 ; <[33 x i8]*> [#uses=0] - at .str33865 = external constant [50 x i8], align 8 ; <[50 x i8]*> [#uses=0] - at .str34866 = external constant [40 x i8], align 8 ; <[40 x i8]*> [#uses=0] - at .str35867 = external constant [42 x i8], align 8 ; <[42 x i8]*> [#uses=0] - at .str36868 = external constant [43 x i8], align 8 ; <[43 x i8]*> [#uses=0] - at .str37869 = external constant [39 x i8], align 8 ; <[39 x i8]*> [#uses=0] - at .str38870 = external constant [37 x i8], align 8 ; <[37 x i8]*> [#uses=0] - at .str39871 = external constant [42 x i8], align 8 ; <[42 x i8]*> [#uses=0] - at .str40872 = external constant [32 x i8], align 8 ; <[32 x i8]*> [#uses=0] - at .str41873 = external constant [47 x i8], align 8 ; <[47 x i8]*> [#uses=0] - at .str42874 = external constant [28 x i8], align 1 ; <[28 x i8]*> [#uses=0] - at .str43875 = external constant [43 x i8], align 8 ; <[43 x i8]*> [#uses=0] - at .str44876 = external constant [32 x i8], align 8 ; <[32 x i8]*> [#uses=0] - at .str45877 = external constant [47 x i8], align 8 ; <[47 x i8]*> [#uses=0] - at .str46878 = external constant [36 x i8], align 8 ; <[36 x i8]*> [#uses=0] - at .str47879 = external constant [33 x i8], align 8 ; <[33 x i8]*> [#uses=0] - at .str48880 = external constant [34 x i8], align 8 ; <[34 x i8]*> [#uses=0] - at .str49881 = external constant [40 x i8], align 8 ; <[40 x i8]*> [#uses=0] - at .str50882 = external constant [38 x i8], align 8 ; <[38 x i8]*> [#uses=0] - at .str51883 = external constant [48 x i8], align 8 ; <[48 x i8]*> [#uses=0] - at .str52884 = external constant [48 x i8], align 8 ; <[48 x i8]*> [#uses=0] - at .str53885 = external constant [31 x i8], align 8 ; <[31 x i8]*> [#uses=0] - at .str54886 = external constant [41 x i8], align 8 ; <[41 x i8]*> [#uses=0] - at .str55887 = external constant [41 x i8], align 8 ; <[41 x i8]*> [#uses=0] - at .str56888 = external constant [34 x i8], align 8 ; <[34 x i8]*> [#uses=0] - at .str57889 = external constant [35 x i8], align 8 ; <[35 x i8]*> [#uses=0] - at .str58890 = external constant [33 x i8], align 8 ; <[33 x i8]*> [#uses=0] - at .str59891 = external constant [29 x i8], align 1 ; <[29 x i8]*> [#uses=0] - at .str60892 = external constant [20 x i8], align 1 ; <[20 x i8]*> [#uses=0] - at .str61893 = external constant [29 x i8], align 1 ; <[29 x i8]*> [#uses=0] - at .str62894 = external constant [32 x i8], align 8 ; <[32 x i8]*> [#uses=0] - at .str63895 = external constant [38 x i8], align 8 ; <[38 x i8]*> [#uses=0] - at .str64896 = external constant [29 x i8], align 1 ; <[29 x i8]*> [#uses=0] - at .str65897 = external constant [38 x i8], align 8 ; <[38 x i8]*> [#uses=0] - at .str66898 = external constant [27 x i8], align 1 ; <[27 x i8]*> [#uses=0] - at .str67899 = external constant [33 x i8], align 8 ; <[33 x i8]*> [#uses=0] - at .str68900 = external constant [36 x i8], align 8 ; <[36 x i8]*> [#uses=0] - at .str69901 = external constant [33 x i8], align 8 ; <[33 x i8]*> [#uses=0] - at .str70902 = external constant [26 x i8], align 1 ; <[26 x i8]*> [#uses=0] - at .str71903 = external constant [37 x i8], align 8 ; <[37 x i8]*> [#uses=0] - at .str72904 = external constant [36 x i8], align 8 ; <[36 x i8]*> [#uses=0] - at .str73905 = external constant [26 x i8], align 1 ; <[26 x i8]*> [#uses=0] - at .str74906 = external constant [26 x i8], align 1 ; <[26 x i8]*> [#uses=0] - at .str75907 = external constant [32 x i8], align 8 ; <[32 x i8]*> [#uses=0] - at .str76908 = external constant [36 x i8], align 8 ; <[36 x i8]*> [#uses=0] - at .str77909 = external constant [40 x i8], align 8 ; <[40 x i8]*> [#uses=0] - at .str78910 = external constant [35 x i8], align 8 ; <[35 x i8]*> [#uses=0] - at .str79911 = external constant [26 x i8], align 1 ; <[26 x i8]*> [#uses=0] - at .str80912 = external constant [30 x i8], align 1 ; <[30 x i8]*> [#uses=0] - at .str81913 = external constant [32 x i8], align 8 ; <[32 x i8]*> [#uses=0] - at .str82914 = external constant [29 x i8], align 1 ; <[29 x i8]*> [#uses=0] - at .str83915 = external constant [22 x i8], align 1 ; <[22 x i8]*> [#uses=0] - at .str84916 = external constant [38 x i8], align 8 ; <[38 x i8]*> [#uses=0] - at .str85917 = external constant [28 x i8], align 1 ; <[28 x i8]*> [#uses=0] - at .str86918 = external constant [30 x i8], align 1 ; <[30 x i8]*> [#uses=0] - at .str87919 = external constant [28 x i8], align 1 ; <[28 x i8]*> [#uses=0] - at .str88920 = external constant [36 x i8], align 8 ; <[36 x i8]*> [#uses=0] - at .str89921 = external constant [41 x i8], align 8 ; <[41 x i8]*> [#uses=0] - at .str92924 = external constant [30 x i8], align 1 ; <[30 x i8]*> [#uses=0] - at .str93925 = external constant [29 x i8], align 1 ; <[29 x i8]*> [#uses=0] - at .str94926 = external constant [20 x i8], align 1 ; <[20 x i8]*> [#uses=0] - at .str95927 = external constant [43 x i8], align 8 ; <[43 x i8]*> [#uses=0] - at .str96928 = external constant [26 x i8], align 1 ; <[26 x i8]*> [#uses=0] - at .str97929 = external constant [30 x i8], align 1 ; <[30 x i8]*> [#uses=0] - at .str98930 = external constant [25 x i8], align 1 ; <[25 x i8]*> [#uses=0] - at .str99931 = external constant [28 x i8], align 1 ; <[28 x i8]*> [#uses=0] - at .str100932 = external constant [19 x i8], align 1 ; <[19 x i8]*> [#uses=0] - at .str934 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] - at .str1935 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=0] - at .str2936 = external constant [22 x i8], align 1 ; <[22 x i8]*> [#uses=0] - at .str3937 = external constant [19 x i8], align 1 ; <[19 x i8]*> [#uses=0] - at .str4938 = external constant [13 x i8], align 1 ; <[13 x i8]*> [#uses=0] - at .str5939 = external constant [10 x i8], align 1 ; <[10 x i8]*> [#uses=0] - at .str6940 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=0] - at .str7941 = external constant [22 x i8], align 1 ; <[22 x i8]*> [#uses=0] - at HdPerm = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] - at .str8942 = external constant [37 x i8], align 8 ; <[37 x i8]*> [#uses=0] - at .str9943 = external constant [39 x i8], align 8 ; <[39 x i8]*> [#uses=0] - at .str10944 = external constant [43 x i8], align 8 ; <[43 x i8]*> [#uses=0] - at .str11945 = external constant [41 x i8], align 8 ; <[41 x i8]*> [#uses=0] - at .str12946 = external constant [45 x i8], align 8 ; <[45 x i8]*> [#uses=0] - at .str13947 = external constant [49 x i8], align 8 ; <[49 x i8]*> [#uses=0] - at .str14948 = external constant [47 x i8], align 8 ; <[47 x i8]*> [#uses=0] - at .str15949 = external constant [39 x i8], align 8 ; <[39 x i8]*> [#uses=0] - at .str16950 = external constant [55 x i8], align 8 ; <[55 x i8]*> [#uses=0] - at .str17951 = external constant [23 x i8], align 1 ; <[23 x i8]*> [#uses=0] - at .str18952 = external constant [37 x i8], align 8 ; <[37 x i8]*> [#uses=0] - at .str19953 = external constant [29 x i8], align 1 ; <[29 x i8]*> [#uses=0] - at .str20954 = external constant [26 x i8], align 1 ; <[26 x i8]*> [#uses=0] - at .str21955 = external constant [39 x i8], align 8 ; <[39 x i8]*> [#uses=0] - at .str22956 = external constant [26 x i8], align 1 ; <[26 x i8]*> [#uses=0] - at .str23957 = external constant [37 x i8], align 8 ; <[37 x i8]*> [#uses=0] - at .str24958 = external constant [37 x i8], align 8 ; <[37 x i8]*> [#uses=0] - at .str25959 = external constant [41 x i8], align 8 ; <[41 x i8]*> [#uses=0] - at .str26960 = external constant [42 x i8], align 8 ; <[42 x i8]*> [#uses=0] - at .str27961 = external constant [38 x i8], align 8 ; <[38 x i8]*> [#uses=0] - at .str28962 = external constant [30 x i8], align 1 ; <[30 x i8]*> [#uses=0] - at .str29963 = external constant [39 x i8], align 8 ; <[39 x i8]*> [#uses=0] - at .str30964 = external constant [52 x i8], align 8 ; <[52 x i8]*> [#uses=0] - at .str31965 = external constant [27 x i8], align 1 ; <[27 x i8]*> [#uses=0] - at .str32966 = external constant [40 x i8], align 8 ; <[40 x i8]*> [#uses=0] - at .str33967 = external constant [11 x i8], align 1 ; <[11 x i8]*> [#uses=0] - at .str34968 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=0] - at .str35969 = external constant [11 x i8], align 1 ; <[11 x i8]*> [#uses=0] - at .str36970 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=0] - at .str37971 = external constant [11 x i8], align 1 ; <[11 x i8]*> [#uses=0] - at .str38972 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=0] - at .str39973 = external constant [11 x i8], align 1 ; <[11 x i8]*> [#uses=0] - at .str40974 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=0] - at .str41975 = external constant [11 x i8], align 1 ; <[11 x i8]*> [#uses=0] - at .str42976 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=0] - at .str44978 = external constant [3 x i8], align 1 ; <[3 x i8]*> [#uses=0] - at .str45979 = external constant [4 x i8], align 1 ; <[4 x i8]*> [#uses=0] - at .str48982 = external constant [2 x i8], align 1 ; <[2 x i8]*> [#uses=0] - at .str6992 = external constant [35 x i8], align 8 ; <[35 x i8]*> [#uses=0] - at TabNormalizeCoeffs = external global [28 x %struct.TypHeader* (%struct.TypHeader*)*], align 32 ; <[28 x %struct.TypHeader* (%struct.TypHeader*)*]*> [#uses=0] - at TabShrinkCoeffs = external global [28 x void (%struct.TypHeader*)*], align 32 ; <[28 x void (%struct.TypHeader*)*]*> [#uses=0] - at TabShiftedCoeffs = external global [28 x %struct.TypHeader* (%struct.TypHeader*, i64)*], align 32 ; <[28 x %struct.TypHeader* (%struct.TypHeader*, i64)*]*> [#uses=0] - at TabAddCoeffs = external global [28 x [28 x void (%struct.TypHeader*, %struct.TypHeader*, %struct.TypHeader*)*]], align 32 ; <[28 x [28 x void (%struct.TypHeader*, %struct.TypHeader*, %struct.TypHeader*)*]]*> [#uses=0] - at TabMultiplyCoeffs = external global [28 x [28 x i64 (%struct.TypHeader*, %struct.TypHeader*, i64, %struct.TypHeader*, i64)*]], align 32 ; <[28 x [28 x i64 (%struct.TypHeader*, %struct.TypHeader*, i64, %struct.TypHeader*, i64)*]]*> [#uses=0] - at TabProductCoeffs = external global [28 x [28 x %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*)*]], align 32 ; <[28 x [28 x %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*)*]]*> [#uses=0] - at TabProductCoeffsMod = external global [28 x [28 x %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*, %struct.TypHeader*)*]], align 32 ; <[28 x [28 x %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*, %struct.TypHeader*)*]]*> [#uses=0] - at TabReduceCoeffs = external global [28 x [28 x i64 (%struct.TypHeader*, i64, %struct.TypHeader*, i64)*]], align 32 ; <[28 x [28 x i64 (%struct.TypHeader*, i64, %struct.TypHeader*, i64)*]]*> [#uses=0] - at TabReduceCoeffsMod = external global [28 x [28 x i64 (%struct.TypHeader*, i64, %struct.TypHeader*, i64, %struct.TypHeader*)*]], align 32 ; <[28 x [28 x i64 (%struct.TypHeader*, i64, %struct.TypHeader*, i64, %struct.TypHeader*)*]]*> [#uses=0] - at TabPowerModCoeffsInt = external global [28 x [28 x %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*, %struct.TypHeader*)*]], align 32 ; <[28 x [28 x %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*, %struct.TypHeader*)*]]*> [#uses=0] - at TabPowerModCoeffsLInt = external global [28 x [28 x %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*, %struct.TypHeader*)*]], align 32 ; <[28 x [28 x %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*, %struct.TypHeader*)*]]*> [#uses=0] - at .str995 = external constant [14 x i8], align 1 ; <[14 x i8]*> [#uses=0] - at .str1996 = external constant [16 x i8], align 1 ; <[16 x i8]*> [#uses=0] - at .str2997 = external constant [13 x i8], align 1 ; <[13 x i8]*> [#uses=0] - at .str3998 = external constant [10 x i8], align 1 ; <[10 x i8]*> [#uses=0] - at .str4999 = external constant [10 x i8], align 1 ; <[10 x i8]*> [#uses=0] - at .str51000 = external constant [14 x i8], align 1 ; <[14 x i8]*> [#uses=0] - at .str61001 = external constant [17 x i8], align 1 ; <[17 x i8]*> [#uses=0] - at .str71002 = external constant [13 x i8], align 1 ; <[13 x i8]*> [#uses=0] - at .str81003 = external constant [16 x i8], align 1 ; <[16 x i8]*> [#uses=0] - at .str91004 = external constant [16 x i8], align 1 ; <[16 x i8]*> [#uses=0] - at .str101005 = external constant [15 x i8], align 1 ; <[15 x i8]*> [#uses=0] - at .str111006 = external constant [48 x i8], align 8 ; <[48 x i8]*> [#uses=0] - at .str121007 = external constant [48 x i8], align 8 ; <[48 x i8]*> [#uses=0] - at .str131008 = external constant [21 x i8], align 1 ; <[21 x i8]*> [#uses=0] - at .str141009 = external constant [24 x i8], align 1 ; <[24 x i8]*> [#uses=0] - at .str151010 = external constant [41 x i8], align 8 ; <[41 x i8]*> [#uses=0] - at .str161011 = external constant [33 x i8], align 8 ; <[33 x i8]*> [#uses=0] - at .str171012 = external constant [40 x i8], align 8 ; <[40 x i8]*> [#uses=0] - at .str181013 = external constant [32 x i8], align 8 ; <[32 x i8]*> [#uses=0] - at .str191014 = external constant [41 x i8], align 8 ; <[41 x i8]*> [#uses=0] - at .str201015 = external constant [33 x i8], align 8 ; <[33 x i8]*> [#uses=0] - at .str211016 = external constant [29 x i8], align 1 ; <[29 x i8]*> [#uses=0] - at .str221017 = external constant [29 x i8], align 1 ; <[29 x i8]*> [#uses=0] - at .str231018 = external constant [27 x i8], align 1 ; <[27 x i8]*> [#uses=0] - at .str241019 = external constant [30 x i8], align 1 ; <[30 x i8]*> [#uses=0] - at .str251020 = external constant [34 x i8], align 8 ; <[34 x i8]*> [#uses=0] - at .str261021 = external constant [24 x i8], align 1 ; <[24 x i8]*> [#uses=0] - at .str271022 = external constant [38 x i8], align 8 ; <[38 x i8]*> [#uses=0] - at .str281023 = external constant [31 x i8], align 8 ; <[31 x i8]*> [#uses=0] - at .str1025 = external constant [8 x i8], align 1 ; <[8 x i8]*> [#uses=0] - at .str21027 = external constant [24 x i8], align 1 ; <[24 x i8]*> [#uses=0] - at .str31028 = external constant [38 x i8], align 8 ; <[38 x i8]*> [#uses=0] - at .str41029 = external constant [11 x i8], align 1 ; <[11 x i8]*> [#uses=0] - at .str51030 = external constant [12 x i8], align 1 ; <[12 x i8]*> [#uses=0] - at .str61031 = external constant [18 x i8], align 1 ; <[18 x i8]*> [#uses=0] - at .str81033 = external constant [11 x i8], align 1 ; <[11 x i8]*> [#uses=0] - at .str111036 = external constant [32 x i8], align 8 ; <[32 x i8]*> [#uses=0] - at .str121037 = external constant [35 x i8], align 8 ; <[35 x i8]*> [#uses=0] - at .str131038 = external constant [43 x i8], align 8 ; <[43 x i8]*> [#uses=0] - at .str141039 = external constant [33 x i8], align 8 ; <[33 x i8]*> [#uses=0] - at .str151040 = external constant [47 x i8], align 8 ; <[47 x i8]*> [#uses=0] - at .str1044 = external constant [6 x i8], align 1 ; <[6 x i8]*> [#uses=0] - at .str11045 = external constant [10 x i8], align 1 ; <[10 x i8]*> [#uses=0] - at .str21046 = external constant [12 x i8], align 1 ; <[12 x i8]*> [#uses=0] - at .str31047 = external constant [28 x i8], align 1 ; <[28 x i8]*> [#uses=0] - at .str41048 = external constant [42 x i8], align 8 ; <[42 x i8]*> [#uses=0] - at .str51049 = external constant [26 x i8], align 1 ; <[26 x i8]*> [#uses=0] - at .str61050 = external constant [40 x i8], align 8 ; <[40 x i8]*> [#uses=0] - at .str71051 = external constant [22 x i8], align 1 ; <[22 x i8]*> [#uses=0] - at .str81052 = external constant [36 x i8], align 8 ; <[36 x i8]*> [#uses=0] - at .str101054 = external constant [6 x i8], align 1 ; <[6 x i8]*> [#uses=0] - at .str121056 = external constant [39 x i8], align 8 ; <[39 x i8]*> [#uses=0] - at .str131057 = external constant [25 x i8], align 1 ; <[25 x i8]*> [#uses=0] - at .str11060 = external constant [11 x i8], align 1 ; <[11 x i8]*> [#uses=0] - at HdCurLHS = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] - at .str21061 = external constant [35 x i8], align 8 ; <[35 x i8]*> [#uses=0] - at .str31062 = external constant [2 x i8], align 1 ; <[2 x i8]*> [#uses=0] - at .str41063 = external constant [2 x i8], align 1 ; <[2 x i8]*> [#uses=0] - at .str61065 = external constant [31 x i8], align 8 ; <[31 x i8]*> [#uses=0] - at .str71066 = external constant [4 x i8], align 1 ; <[4 x i8]*> [#uses=0] - at .str81067 = external constant [11 x i8], align 1 ; <[11 x i8]*> [#uses=0] - at .str91068 = external constant [23 x i8], align 1 ; <[23 x i8]*> [#uses=0] - at .str101069 = external constant [42 x i8], align 8 ; <[42 x i8]*> [#uses=0] - at .str131072 = external constant [48 x i8], align 8 ; <[48 x i8]*> [#uses=0] - at .str141073 = external constant [3 x i8], align 1 ; <[3 x i8]*> [#uses=0] - at .str151074 = external constant [11 x i8], align 1 ; <[11 x i8]*> [#uses=0] - at .str161075 = external constant [46 x i8], align 8 ; <[46 x i8]*> [#uses=0] - at .str171076 = external constant [38 x i8], align 8 ; <[38 x i8]*> [#uses=0] - at .str181077 = external constant [2 x i8], align 1 ; <[2 x i8]*> [#uses=0] - at .str241083 = external constant [6 x i8], align 1 ; <[6 x i8]*> [#uses=0] - at .str251084 = external constant [4 x i8], align 1 ; <[4 x i8]*> [#uses=0] - at .str271086 = external constant [3 x i8], align 1 ; <[3 x i8]*> [#uses=0] - at .str281087 = external constant [17 x i8], align 1 ; <[17 x i8]*> [#uses=0] - at HdRnOp = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] - at HdRnEq = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] - at HdCallEq = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] - at HdStrEq = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] - at HdTilde = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] - at .str11093 = external constant [11 x i8], align 1 ; <[11 x i8]*> [#uses=0] - at HdRnSum = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] - at HdCallSum = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] - at .str31096 = external constant [16 x i8], align 1 ; <[16 x i8]*> [#uses=0] - at HdStrSum = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] - at HdRnDiff = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] - at HdCallDiff = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] - at .str51099 = external constant [16 x i8], align 1 ; <[16 x i8]*> [#uses=0] - at HdStrDiff = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] - at HdRnProd = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] - at HdCallProd = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] - at .str71102 = external constant [16 x i8], align 1 ; <[16 x i8]*> [#uses=0] - at HdStrProd = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] - at HdRnQuo = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] - at HdCallQuo = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] - at .str91105 = external constant [16 x i8], align 1 ; <[16 x i8]*> [#uses=0] - at HdStrQuo = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] - at HdRnMod = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] - at HdCallMod = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] - at .str111108 = external constant [18 x i8], align 1 ; <[18 x i8]*> [#uses=0] - at HdStrMod = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] - at HdRnPow = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] - at HdCallPow = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] - at .str131111 = external constant [16 x i8], align 1 ; <[16 x i8]*> [#uses=0] - at HdStrPow = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] - at HdRnComm = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] - at HdCallComm = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] - at .str151114 = external constant [23 x i8], align 1 ; <[23 x i8]*> [#uses=0] - at HdStrComm = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] - at .str171116 = external constant [16 x i8], align 1 ; <[16 x i8]*> [#uses=0] - at HdRnLt = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] - at HdCallLt = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] - at .str191119 = external constant [16 x i8], align 1 ; <[16 x i8]*> [#uses=0] - at HdStrLt = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] - at HdRnIn = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] - at HdCallIn = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] - at .str211122 = external constant [15 x i8], align 1 ; <[15 x i8]*> [#uses=0] - at HdStrIn = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] - at HdRnPrint = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] - at HdCallPrint = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] - at .str231125 = external constant [15 x i8], align 1 ; <[15 x i8]*> [#uses=0] - at HdStrPrint = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] - at .str241126 = external constant [6 x i8], align 1 ; <[6 x i8]*> [#uses=0] - at .str251127 = external constant [10 x i8], align 1 ; <[10 x i8]*> [#uses=0] - at .str261128 = external constant [22 x i8], align 1 ; <[22 x i8]*> [#uses=0] - at .str271129 = external constant [36 x i8], align 8 ; <[36 x i8]*> [#uses=0] - at .str281130 = external constant [50 x i8], align 8 ; <[50 x i8]*> [#uses=0] - at .str291131 = external constant [50 x i8], align 8 ; <[50 x i8]*> [#uses=0] - at .str301132 = external constant [47 x i8], align 8 ; <[47 x i8]*> [#uses=0] - at .str311133 = external constant [49 x i8], align 8 ; <[49 x i8]*> [#uses=0] - at .str321134 = external constant [47 x i8], align 8 ; <[47 x i8]*> [#uses=0] - at .str331135 = external constant [47 x i8], align 8 ; <[47 x i8]*> [#uses=0] - at .str341136 = external constant [47 x i8], align 8 ; <[47 x i8]*> [#uses=0] - at .str351137 = external constant [47 x i8], align 8 ; <[47 x i8]*> [#uses=0] - at .str361138 = external constant [26 x i8], align 1 ; <[26 x i8]*> [#uses=0] - at .str371139 = external constant [34 x i8], align 8 ; <[34 x i8]*> [#uses=0] - at .str421144 = external constant [6 x i8], align 1 ; <[6 x i8]*> [#uses=0] - at .str661168 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] - at .str671169 = external constant [4 x i8], align 1 ; <[4 x i8]*> [#uses=0] - at .str681170 = external constant [12 x i8], align 1 ; <[12 x i8]*> [#uses=0] - at .str691171 = external constant [3 x i8], align 1 ; <[3 x i8]*> [#uses=0] - at .str711173 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=0] - at .str721174 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=0] - at .str731175 = external constant [6 x i8], align 1 ; <[6 x i8]*> [#uses=0] - at .str741176 = external constant [38 x i8], align 8 ; <[38 x i8]*> [#uses=0] - at .str761178 = external constant [49 x i8], align 8 ; <[49 x i8]*> [#uses=0] - at .str771179 = external constant [49 x i8], align 8 ; <[49 x i8]*> [#uses=0] - at .str781180 = external constant [48 x i8], align 8 ; <[48 x i8]*> [#uses=0] - at .str791181 = external constant [37 x i8], align 8 ; <[37 x i8]*> [#uses=0] - at Logfile = external global i64 ; [#uses=0] - at Input = external global %struct.TypInputFile* ; <%struct.TypInputFile**> [#uses=0] - at TestInput = external global i64 ; [#uses=0] - at In = external global i8* ; [#uses=0] - at Symbol = external global i64 ; [#uses=0] - at TestOutput = external global i64 ; [#uses=0] - at TestLine = external global [256 x i8], align 32 ; <[256 x i8]*> [#uses=0] - at InputLogfile = external global i64 ; [#uses=0] - at InputFiles = external global [16 x %struct.TypInputFile], align 32 ; <[16 x %struct.TypInputFile]*> [#uses=0] - at .str1187 = external constant [2 x i8], align 1 ; <[2 x i8]*> [#uses=0] - at Output = external global %struct.TypOutputFile* ; <%struct.TypOutputFile**> [#uses=0] - at OutputFiles = external global [16 x %struct.TypOutputFile], align 32 ; <[16 x %struct.TypOutputFile]*> [#uses=0] - at .str21189 = external constant [2 x i8], align 1 ; <[2 x i8]*> [#uses=0] - at .str41191 = external constant [2 x i8], align 1 ; <[2 x i8]*> [#uses=0] - at .str51192 = external constant [8 x i8], align 1 ; <[8 x i8]*> [#uses=0] - at .str61193 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=0] - at .str71194 = external constant [14 x i8], align 1 ; <[14 x i8]*> [#uses=0] - at NrError = external global i64 ; [#uses=0] - at NrErrLine = external global i64 ; [#uses=0] - at .str91198 = external constant [17 x i8], align 1 ; <[17 x i8]*> [#uses=0] - at .str101199 = external constant [15 x i8], align 1 ; <[15 x i8]*> [#uses=0] - at .str131202 = external constant [2 x i8], align 1 ; <[2 x i8]*> [#uses=0] - at .str141203 = external constant [2 x i8], align 1 ; <[2 x i8]*> [#uses=0] - at .str151204 = external constant [3 x i8], align 1 ; <[3 x i8]*> [#uses=0] - at Prompt = external global i8* ; [#uses=0] - at .str161206 = external constant [5 x i8], align 1 ; <[5 x i8]*> [#uses=0] - at Value = external global [1024 x i8], align 32 ; <[1024 x i8]*> [#uses=0] - at .str171208 = external constant [43 x i8], align 8 ; <[43 x i8]*> [#uses=0] - at .str181209 = external constant [34 x i8], align 8 ; <[34 x i8]*> [#uses=0] - at .str191210 = external constant [42 x i8], align 8 ; <[42 x i8]*> [#uses=0] - at .str201211 = external constant [43 x i8], align 8 ; <[43 x i8]*> [#uses=0] - at .str211212 = external constant [40 x i8], align 8 ; <[40 x i8]*> [#uses=0] - at .str431234 = external constant [10 x i8], align 1 ; <[10 x i8]*> [#uses=0] - at .str1250 = external constant [4 x i8], align 1 ; <[4 x i8]*> [#uses=0] - at .str11251 = external constant [6 x i8], align 1 ; <[6 x i8]*> [#uses=0] - at .str21252 = external constant [11 x i8], align 1 ; <[11 x i8]*> [#uses=0] - at .str31253 = external constant [12 x i8], align 1 ; <[12 x i8]*> [#uses=0] - at .str41254 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] - at .str51255 = external constant [10 x i8], align 1 ; <[10 x i8]*> [#uses=0] - at .str61256 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=0] - at .str71257 = external constant [13 x i8], align 1 ; <[13 x i8]*> [#uses=0] - at .str81258 = external constant [12 x i8], align 1 ; <[12 x i8]*> [#uses=0] - at HdUnion = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] - at .str111261 = external constant [33 x i8], align 8 ; <[33 x i8]*> [#uses=0] - at .str121262 = external constant [38 x i8], align 8 ; <[38 x i8]*> [#uses=0] - at .str131263 = external constant [46 x i8], align 8 ; <[46 x i8]*> [#uses=0] - at .str141264 = external constant [30 x i8], align 1 ; <[30 x i8]*> [#uses=0] - at .str151265 = external constant [35 x i8], align 8 ; <[35 x i8]*> [#uses=0] - at .str161266 = external constant [43 x i8], align 8 ; <[43 x i8]*> [#uses=0] - at .str171267 = external constant [22 x i8], align 1 ; <[22 x i8]*> [#uses=0] - at .str181268 = external constant [36 x i8], align 8 ; <[36 x i8]*> [#uses=0] - at .str191269 = external constant [37 x i8], align 8 ; <[37 x i8]*> [#uses=0] - at .str201270 = external constant [34 x i8], align 8 ; <[34 x i8]*> [#uses=0] - at .str211271 = external constant [35 x i8], align 8 ; <[35 x i8]*> [#uses=0] - at .str221272 = external constant [38 x i8], align 8 ; <[38 x i8]*> [#uses=0] - at .str231273 = external constant [35 x i8], align 8 ; <[35 x i8]*> [#uses=0] - at .str241274 = external constant [36 x i8], align 8 ; <[36 x i8]*> [#uses=0] - at .str251275 = external constant [34 x i8], align 8 ; <[34 x i8]*> [#uses=0] - at .str261276 = external constant [31 x i8], align 8 ; <[31 x i8]*> [#uses=0] - at .str271277 = external constant [32 x i8], align 8 ; <[32 x i8]*> [#uses=0] - at .str281278 = external constant [37 x i8], align 8 ; <[37 x i8]*> [#uses=0] - at .str291279 = external constant [35 x i8], align 8 ; <[35 x i8]*> [#uses=0] - at .str301280 = external constant [35 x i8], align 8 ; <[35 x i8]*> [#uses=0] - at .str311281 = external constant [36 x i8], align 8 ; <[36 x i8]*> [#uses=0] - at .str321282 = external constant [34 x i8], align 8 ; <[34 x i8]*> [#uses=0] - at .str331283 = external constant [34 x i8], align 8 ; <[34 x i8]*> [#uses=0] - at .str341284 = external constant [20 x i8], align 1 ; <[20 x i8]*> [#uses=0] - at .str351285 = external constant [27 x i8], align 1 ; <[27 x i8]*> [#uses=0] - at StrStat = external global i8* ; [#uses=0] - at HdStat = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] - at .str11292 = external constant [11 x i8], align 1 ; <[11 x i8]*> [#uses=0] - at .str21293 = external constant [15 x i8], align 1 ; <[15 x i8]*> [#uses=0] - at .str41295 = external constant [10 x i8], align 1 ; <[10 x i8]*> [#uses=0] - at .str51296 = external constant [12 x i8], align 1 ; <[12 x i8]*> [#uses=0] - at .str61297 = external constant [8 x i8], align 1 ; <[8 x i8]*> [#uses=0] - at .str71298 = external constant [8 x i8], align 1 ; <[8 x i8]*> [#uses=0] - at .str81299 = external constant [12 x i8], align 1 ; <[12 x i8]*> [#uses=0] - at .str91300 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] - at .str101301 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=0] - at .str111302 = external constant [14 x i8], align 1 ; <[14 x i8]*> [#uses=0] - at .str131304 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=0] - at .str151306 = external constant [3 x i8], align 1 ; <[3 x i8]*> [#uses=0] - at .str161307 = external constant [4 x i8], align 1 ; <[4 x i8]*> [#uses=0] - at .str171308 = external constant [6 x i8], align 1 ; <[6 x i8]*> [#uses=0] - at .str181309 = external constant [46 x i8], align 8 ; <[46 x i8]*> [#uses=0] - at .str191310 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] - at .str201311 = external constant [50 x i8], align 8 ; <[50 x i8]*> [#uses=0] - at .str211312 = external constant [15 x i8], align 1 ; <[15 x i8]*> [#uses=0] - at .str221313 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] - at .str231314 = external constant [48 x i8], align 8 ; <[48 x i8]*> [#uses=0] - at .str241315 = external constant [49 x i8], align 8 ; <[49 x i8]*> [#uses=0] - at .str251316 = external constant [15 x i8], align 1 ; <[15 x i8]*> [#uses=0] - at .str281319 = external constant [5 x i8], align 1 ; <[5 x i8]*> [#uses=0] - at .str291320 = external constant [36 x i8], align 8 ; <[36 x i8]*> [#uses=0] - at HdChars = external global [256 x %struct.TypHeader*], align 32 ; <[256 x %struct.TypHeader*]*> [#uses=0] - at .str1322 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=0] - at .str31326 = external constant [25 x i8], align 1 ; <[25 x i8]*> [#uses=0] - at .str41327 = external constant [39 x i8], align 8 ; <[39 x i8]*> [#uses=0] - at .str61329 = external constant [2 x i8], align 1 ; <[2 x i8]*> [#uses=0] - at .str71330 = external constant [3 x i8], align 1 ; <[3 x i8]*> [#uses=0] - at .str81331 = external constant [3 x i8], align 1 ; <[3 x i8]*> [#uses=0] - at .str91332 = external constant [3 x i8], align 1 ; <[3 x i8]*> [#uses=0] - at .str101333 = external constant [3 x i8], align 1 ; <[3 x i8]*> [#uses=0] - at .str111334 = external constant [3 x i8], align 1 ; <[3 x i8]*> [#uses=0] - at .str121335 = external constant [3 x i8], align 1 ; <[3 x i8]*> [#uses=0] - at .str131336 = external constant [3 x i8], align 1 ; <[3 x i8]*> [#uses=0] - at .str151338 = external constant [5 x i8], align 1 ; <[5 x i8]*> [#uses=0] - at .str161339 = external constant [5 x i8], align 1 ; <[5 x i8]*> [#uses=0] - at .str171340 = external constant [5 x i8], align 1 ; <[5 x i8]*> [#uses=0] - at .str181341 = external constant [5 x i8], align 1 ; <[5 x i8]*> [#uses=0] - at .str191342 = external constant [5 x i8], align 1 ; <[5 x i8]*> [#uses=0] - at .str201343 = external constant [5 x i8], align 1 ; <[5 x i8]*> [#uses=0] - at .str211344 = external constant [5 x i8], align 1 ; <[5 x i8]*> [#uses=0] - at .str221345 = external constant [5 x i8], align 1 ; <[5 x i8]*> [#uses=0] - at SyFlags = external global [13 x i8] ; <[13 x i8]*> [#uses=0] - at syLastIntr = external global i64 ; [#uses=0] - at syWorkspace = external global i8* ; [#uses=0] - at stderr = external global %struct._IO_FILE* ; <%struct._IO_FILE**> [#uses=0] - at .str1350 = external constant [38 x i8], align 8 ; <[38 x i8]*> [#uses=0] - at syStartTime = external global i64 ; [#uses=0] - at .str11351 = external constant [52 x i8], align 8 ; <[52 x i8]*> [#uses=0] - at syBuf = external global [16 x %0], align 32 ; <[16 x %0]*> [#uses=0] - at syWindow.b = external global i1 ; [#uses=0] - at syOld = external global %struct.termio, align 16 ; <%struct.termio*> [#uses=0] - at .str21352 = external constant [43 x i8], align 8 ; <[43 x i8]*> [#uses=0] - at syFid = external global i64 ; [#uses=0] - at .str31353 = external constant [51 x i8], align 8 ; <[51 x i8]*> [#uses=0] - at .str41354 = external constant [36 x i8], align 8 ; <[36 x i8]*> [#uses=0] - at .str51355 = external constant [33 x i8], align 8 ; <[33 x i8]*> [#uses=0] - at stdin = external global %struct._IO_FILE* ; <%struct._IO_FILE**> [#uses=0] - at stdout = external global %struct._IO_FILE* ; <%struct._IO_FILE**> [#uses=0] - at .str121362 = external constant [42 x i8], align 8 ; <[42 x i8]*> [#uses=0] - at .str131363 = external constant [4 x i8], align 1 ; <[4 x i8]*> [#uses=0] - at SyBanner = external global i64 ; [#uses=0] - at SyGasman = external global i64 ; [#uses=0] - at .str141366 = external constant [41 x i8], align 8 ; <[41 x i8]*> [#uses=0] - at SyLibname = external global [256 x i8], align 32 ; <[256 x i8]*> [#uses=0] - at .str161369 = external constant [41 x i8], align 8 ; <[41 x i8]*> [#uses=0] - at SyHelpname = external global [256 x i8], align 32 ; <[256 x i8]*> [#uses=0] - at .str171370 = external constant [41 x i8], align 8 ; <[41 x i8]*> [#uses=0] - at SyMemory = external global i64 ; [#uses=0] - at .str181372 = external constant [41 x i8], align 8 ; <[41 x i8]*> [#uses=0] - at syLineEdit = external global i64 ; [#uses=0] - at SyQuiet = external global i64 ; [#uses=0] - at .str191374 = external constant [41 x i8], align 8 ; <[41 x i8]*> [#uses=0] - at SyNrCols = external global i64 ; [#uses=0] - at .str201376 = external constant [41 x i8], align 8 ; <[41 x i8]*> [#uses=0] - at SyNrRows = external global i64 ; [#uses=0] - at syCTRD = external global i64 ; [#uses=0] - at .str211378 = external constant [3 x i8], align 1 ; <[3 x i8]*> [#uses=0] - at .str231380 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] - at .str241381 = external constant [22 x i8], align 1 ; <[22 x i8]*> [#uses=0] - at SyInitfiles = external global [16 x [256 x i8]], align 32 ; <[16 x [256 x i8]]*> [#uses=0] - at .str251383 = external constant [28 x i8], align 1 ; <[28 x i8]*> [#uses=0] - at .str261384 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] - at .str271385 = external constant [26 x i8], align 1 ; <[26 x i8]*> [#uses=0] - at .str281386 = external constant [43 x i8], align 8 ; <[43 x i8]*> [#uses=0] - at .str291387 = external constant [5 x i8], align 1 ; <[5 x i8]*> [#uses=0] - at .str301388 = external constant [8 x i8], align 1 ; <[8 x i8]*> [#uses=0] - at .str311389 = external constant [47 x i8], align 8 ; <[47 x i8]*> [#uses=0] - at .str321390 = external constant [56 x i8], align 8 ; <[56 x i8]*> [#uses=0] - at .str331391 = external constant [53 x i8], align 8 ; <[53 x i8]*> [#uses=0] - at .str341392 = external constant [22 x i8], align 1 ; <[22 x i8]*> [#uses=0] - at .str351393 = external constant [54 x i8], align 8 ; <[54 x i8]*> [#uses=0] - at .str361394 = external constant [3 x i8], align 1 ; <[3 x i8]*> [#uses=0] - at .str371395 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] - at .str381396 = external constant [38 x i8], align 8 ; <[38 x i8]*> [#uses=0] - at .str391397 = external constant [3 x i8], align 1 ; <[3 x i8]*> [#uses=0] - at WinCmdBuffer = external global [8000 x i8], align 32 ; <[8000 x i8]*> [#uses=0] - at .str401398 = external constant [27 x i8], align 1 ; <[27 x i8]*> [#uses=0] - at syNrchar = external global i64 ; [#uses=0] - at syPrompt = external global [256 x i8], align 32 ; <[256 x i8]*> [#uses=0] - at .str411399 = external constant [3 x i8], align 1 ; <[3 x i8]*> [#uses=0] - at .str421400 = external constant [3 x i8], align 1 ; <[3 x i8]*> [#uses=0] - at .str431401 = external constant [3 x i8], align 1 ; <[3 x i8]*> [#uses=0] - at .str441402 = external constant [3 x i8], align 1 ; <[3 x i8]*> [#uses=0] - at .str451403 = external constant [3 x i8], align 1 ; <[3 x i8]*> [#uses=0] - at syNew = external global %struct.termio, align 16 ; <%struct.termio*> [#uses=0] - at syStopTime = external global i64 ; [#uses=0] - at syHistory = external global [8192 x i8], align 32 ; <[8192 x i8]*> [#uses=0] - at syCTRO = external global i32 ; [#uses=0] - at yank.3948 = external global [512 x i8], align 32 ; <[512 x i8]*> [#uses=0] - at syHi = external global i8* ; [#uses=0] - at .str461404 = external constant [3 x i8], align 1 ; <[3 x i8]*> [#uses=0] - at .str471405 = external constant [6 x i8], align 1 ; <[6 x i8]*> [#uses=0] - at .str491407 = external constant [36 x i8], align 8 ; <[36 x i8]*> [#uses=0] - at .str501408 = external constant [3 x i8], align 1 ; <[3 x i8]*> [#uses=0] - at .str511409 = external constant [3 x i8], align 1 ; <[3 x i8]*> [#uses=0] - at .str521410 = external constant [3 x i8], align 1 ; <[3 x i8]*> [#uses=0] - at syLastIndex = external global i16 ; [#uses=0] - at syLastTopics = external global [16 x [64 x i8]], align 32 ; <[16 x [64 x i8]]*> [#uses=0] - at .str551413 = external constant [3 x i8], align 1 ; <[3 x i8]*> [#uses=0] - at .str561414 = external constant [3 x i8], align 1 ; <[3 x i8]*> [#uses=0] - at .str571415 = external constant [44 x i8], align 8 ; <[44 x i8]*> [#uses=0] - at .str581416 = external constant [15 x i8], align 1 ; <[15 x i8]*> [#uses=0] - at .str591417 = external constant [50 x i8], align 8 ; <[50 x i8]*> [#uses=0] - at .str601418 = external constant [30 x i8], align 1 ; <[30 x i8]*> [#uses=0] - at .str611419 = external constant [21 x i8], align 1 ; <[21 x i8]*> [#uses=0] - at .str621420 = external constant [50 x i8], align 8 ; <[50 x i8]*> [#uses=0] - at .str631421 = external constant [4 x i8], align 1 ; <[4 x i8]*> [#uses=0] - at .str641422 = external constant [50 x i8], align 8 ; <[50 x i8]*> [#uses=0] - at .str651423 = external constant [18 x i8], align 1 ; <[18 x i8]*> [#uses=0] - at .str661424 = external constant [50 x i8], align 8 ; <[50 x i8]*> [#uses=0] - at .str671425 = external constant [26 x i8], align 1 ; <[26 x i8]*> [#uses=0] - at .str681426 = external constant [50 x i8], align 8 ; <[50 x i8]*> [#uses=0] - at .str691427 = external constant [29 x i8], align 1 ; <[29 x i8]*> [#uses=0] - at .str701428 = external constant [50 x i8], align 8 ; <[50 x i8]*> [#uses=0] - at .str711429 = external constant [30 x i8], align 1 ; <[30 x i8]*> [#uses=0] - at .str721430 = external constant [50 x i8], align 8 ; <[50 x i8]*> [#uses=0] - at .str731431 = external constant [30 x i8], align 1 ; <[30 x i8]*> [#uses=0] - at .str741432 = external constant [50 x i8], align 8 ; <[50 x i8]*> [#uses=0] - at .str751433 = external constant [11 x i8], align 1 ; <[11 x i8]*> [#uses=0] - at .str761434 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=0] - at .str771435 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=0] - at .str781436 = external constant [11 x i8], align 1 ; <[11 x i8]*> [#uses=0] - at .str791437 = external constant [47 x i8], align 8 ; <[47 x i8]*> [#uses=0] - at .str801438 = external constant [3 x i8], align 1 ; <[3 x i8]*> [#uses=0] - at .str811439 = external constant [38 x i8], align 8 ; <[38 x i8]*> [#uses=0] - at .str821440 = external constant [40 x i8], align 8 ; <[40 x i8]*> [#uses=0] - at .str831441 = external constant [40 x i8], align 8 ; <[40 x i8]*> [#uses=0] - at .str841442 = external constant [46 x i8], align 8 ; <[46 x i8]*> [#uses=0] - at .str851443 = external constant [27 x i8], align 1 ; <[27 x i8]*> [#uses=0] - at .str861444 = external constant [27 x i8], align 1 ; <[27 x i8]*> [#uses=0] - at .str871445 = external constant [27 x i8], align 1 ; <[27 x i8]*> [#uses=0] - at .str881446 = external constant [5 x i8], align 1 ; <[5 x i8]*> [#uses=0] - at .str891447 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=0] - at .str901448 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=0] - at .str911449 = external constant [40 x i8], align 8 ; <[40 x i8]*> [#uses=0] - at .str921450 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=0] - at .str931451 = external constant [10 x i8], align 1 ; <[10 x i8]*> [#uses=0] - at .str941452 = external constant [10 x i8], align 1 ; <[10 x i8]*> [#uses=0] - at .str951453 = external constant [13 x i8], align 1 ; <[13 x i8]*> [#uses=0] - at .str961454 = external constant [39 x i8], align 8 ; <[39 x i8]*> [#uses=0] - at .str971455 = external constant [39 x i8], align 8 ; <[39 x i8]*> [#uses=0] - at .str981456 = external constant [40 x i8], align 8 ; <[40 x i8]*> [#uses=0] - at .str991457 = external constant [40 x i8], align 8 ; <[40 x i8]*> [#uses=0] - at .str1001458 = external constant [15 x i8], align 1 ; <[15 x i8]*> [#uses=0] - at .str1011459 = external constant [8 x i8], align 1 ; <[8 x i8]*> [#uses=0] - at .str1021460 = external constant [24 x i8], align 1 ; <[24 x i8]*> [#uses=0] - at .str1031461 = external constant [32 x i8], align 8 ; <[32 x i8]*> [#uses=0] - at .str1041462 = external constant [11 x i8], align 1 ; <[11 x i8]*> [#uses=0] - at .str1051463 = external constant [35 x i8], align 8 ; <[35 x i8]*> [#uses=0] - at .str1061464 = external constant [67 x i8], align 8 ; <[67 x i8]*> [#uses=0] - at .str1071465 = external constant [6 x i8], align 1 ; <[6 x i8]*> [#uses=0] - at .str1081466 = external constant [29 x i8], align 1 ; <[29 x i8]*> [#uses=0] - at .str1111469 = external constant [41 x i8], align 8 ; <[41 x i8]*> [#uses=0] - at .str1121470 = external constant [40 x i8], align 8 ; <[40 x i8]*> [#uses=0] - at .str1131471 = external constant [47 x i8], align 8 ; <[47 x i8]*> [#uses=0] - at .str1141472 = external constant [43 x i8], align 8 ; <[43 x i8]*> [#uses=0] - at .str1151473 = external constant [41 x i8], align 8 ; <[41 x i8]*> [#uses=0] - at syChapnames = external global [128 x [16 x i8]], align 32 ; <[128 x [16 x i8]]*> [#uses=0] - at .str1161474 = external constant [11 x i8], align 1 ; <[11 x i8]*> [#uses=0] - at .str1171475 = external constant [36 x i8], align 8 ; <[36 x i8]*> [#uses=0] - at .str1181476 = external constant [10 x i8], align 1 ; <[10 x i8]*> [#uses=0] - at .str1191477 = external constant [5 x i8], align 1 ; <[5 x i8]*> [#uses=0] - at .str1201478 = external constant [37 x i8], align 8 ; <[37 x i8]*> [#uses=0] - at .str1211479 = external constant [10 x i8], align 1 ; <[10 x i8]*> [#uses=0] - at .str1221480 = external constant [10 x i8], align 1 ; <[10 x i8]*> [#uses=0] - at .str1231481 = external constant [31 x i8], align 8 ; <[31 x i8]*> [#uses=0] - at .str1241482 = external constant [20 x i8], align 1 ; <[20 x i8]*> [#uses=0] - at .str1251483 = external constant [71 x i8], align 8 ; <[71 x i8]*> [#uses=0] - at .str1261484 = external constant [8 x i8], align 1 ; <[8 x i8]*> [#uses=0] - at .str1271485 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=0] - at .str1281486 = external constant [8 x i8], align 1 ; <[8 x i8]*> [#uses=0] - at .str129 = external constant [6 x i8], align 1 ; <[6 x i8]*> [#uses=0] - at .str130 = external constant [17 x i8], align 1 ; <[17 x i8]*> [#uses=0] - at .str131 = external constant [2 x i8], align 1 ; <[2 x i8]*> [#uses=0] - at .str132 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=0] - at .str1504 = external constant [10 x i8], align 1 ; <[10 x i8]*> [#uses=0] - at .str11505 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] - at .str21506 = external constant [8 x i8], align 1 ; <[8 x i8]*> [#uses=0] - at .str31507 = external constant [15 x i8], align 1 ; <[15 x i8]*> [#uses=0] - at .str41508 = external constant [14 x i8], align 1 ; <[14 x i8]*> [#uses=0] - at .str51509 = external constant [16 x i8], align 1 ; <[16 x i8]*> [#uses=0] - at .str61510 = external constant [14 x i8], align 1 ; <[14 x i8]*> [#uses=0] - at .str71511 = external constant [19 x i8], align 1 ; <[19 x i8]*> [#uses=0] - at .str81512 = external constant [10 x i8], align 1 ; <[10 x i8]*> [#uses=0] - at .str91513 = external constant [38 x i8], align 8 ; <[38 x i8]*> [#uses=0] - at .str101514 = external constant [23 x i8], align 1 ; <[23 x i8]*> [#uses=0] - at .str111515 = external constant [29 x i8], align 1 ; <[29 x i8]*> [#uses=0] - at .str121516 = external constant [29 x i8], align 1 ; <[29 x i8]*> [#uses=0] - at .str131517 = external constant [38 x i8], align 8 ; <[38 x i8]*> [#uses=0] - at .str141518 = external constant [62 x i8], align 8 ; <[62 x i8]*> [#uses=0] - at .str151519 = external constant [28 x i8], align 1 ; <[28 x i8]*> [#uses=0] - at .str161520 = external constant [26 x i8], align 1 ; <[26 x i8]*> [#uses=0] - at .str171521 = external constant [44 x i8], align 8 ; <[44 x i8]*> [#uses=0] - at .str181522 = external constant [26 x i8], align 1 ; <[26 x i8]*> [#uses=0] - at .str191523 = external constant [36 x i8], align 8 ; <[36 x i8]*> [#uses=0] - at .str201524 = external constant [29 x i8], align 1 ; <[29 x i8]*> [#uses=0] - at .str211525 = external constant [36 x i8], align 8 ; <[36 x i8]*> [#uses=0] - at .str221526 = external constant [29 x i8], align 1 ; <[29 x i8]*> [#uses=0] - at .str231527 = external constant [30 x i8], align 1 ; <[30 x i8]*> [#uses=0] - at .str241528 = external constant [37 x i8], align 8 ; <[37 x i8]*> [#uses=0] - at .str251529 = external constant [31 x i8], align 8 ; <[31 x i8]*> [#uses=0] - at .str261530 = external constant [33 x i8], align 8 ; <[33 x i8]*> [#uses=0] - at .str271531 = external constant [63 x i8], align 8 ; <[63 x i8]*> [#uses=0] - at .str281532 = external constant [40 x i8], align 8 ; <[40 x i8]*> [#uses=0] - at .str291533 = external constant [39 x i8], align 8 ; <[39 x i8]*> [#uses=0] - at .str301534 = external constant [57 x i8], align 8 ; <[57 x i8]*> [#uses=0] - at .str311535 = external constant [28 x i8], align 1 ; <[28 x i8]*> [#uses=0] - at .str321536 = external constant [42 x i8], align 8 ; <[42 x i8]*> [#uses=0] - at .str331537 = external constant [54 x i8], align 8 ; <[54 x i8]*> [#uses=0] - at .str341538 = external constant [36 x i8], align 8 ; <[36 x i8]*> [#uses=0] - at .str351539 = external constant [43 x i8], align 8 ; <[43 x i8]*> [#uses=0] - at .str361540 = external constant [47 x i8], align 8 ; <[47 x i8]*> [#uses=0] - at .str371541 = external constant [63 x i8], align 8 ; <[63 x i8]*> [#uses=0] - at .str381542 = external constant [33 x i8], align 8 ; <[33 x i8]*> [#uses=0] - at .str391543 = external constant [23 x i8], align 1 ; <[23 x i8]*> [#uses=0] - at .str401544 = external constant [41 x i8], align 8 ; <[41 x i8]*> [#uses=0] - at .str411545 = external constant [47 x i8], align 8 ; <[47 x i8]*> [#uses=0] - at .str421546 = external constant [31 x i8], align 8 ; <[31 x i8]*> [#uses=0] - at .str431547 = external constant [25 x i8], align 1 ; <[25 x i8]*> [#uses=0] - at .str441548 = external constant [41 x i8], align 8 ; <[41 x i8]*> [#uses=0] - at .str451549 = external constant [30 x i8], align 1 ; <[30 x i8]*> [#uses=0] - at .str461550 = external constant [40 x i8], align 8 ; <[40 x i8]*> [#uses=0] - at .str471551 = external constant [33 x i8], align 8 ; <[33 x i8]*> [#uses=0] - at .str1553 = external constant [8 x i8], align 1 ; <[8 x i8]*> [#uses=0] - at .str11554 = external constant [10 x i8], align 1 ; <[10 x i8]*> [#uses=0] - at .str21555 = external constant [26 x i8], align 1 ; <[26 x i8]*> [#uses=0] - at .str31556 = external constant [40 x i8], align 8 ; <[40 x i8]*> [#uses=0] - at .str41557 = external constant [33 x i8], align 8 ; <[33 x i8]*> [#uses=0] - at .str51558 = external constant [40 x i8], align 8 ; <[40 x i8]*> [#uses=0] - at LargestUnknown = external global i64 ; [#uses=0] - at .str61559 = external constant [44 x i8], align 8 ; <[44 x i8]*> [#uses=0] - at .str81561 = external constant [43 x i8], align 8 ; <[43 x i8]*> [#uses=0] - at .str91562 = external constant [16 x i8], align 1 ; <[16 x i8]*> [#uses=0] - at HdVecFFEL = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] - at HdVecFFER = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] - at TabIntVecFFE = external global [28 x %struct.TypHeader* (%struct.TypHeader*, i64)*], align 32 ; <[28 x %struct.TypHeader* (%struct.TypHeader*, i64)*]*> [#uses=0] - at .str1564 = external constant [8 x i8], align 1 ; <[8 x i8]*> [#uses=0] - at .str11565 = external constant [10 x i8], align 1 ; <[10 x i8]*> [#uses=0] - at .str21566 = external constant [10 x i8], align 1 ; <[10 x i8]*> [#uses=0] - at .str31567 = external constant [10 x i8], align 1 ; <[10 x i8]*> [#uses=0] - at .str41568 = external constant [11 x i8], align 1 ; <[11 x i8]*> [#uses=0] - at .str51569 = external constant [13 x i8], align 1 ; <[13 x i8]*> [#uses=0] - at .str61570 = external constant [48 x i8], align 8 ; <[48 x i8]*> [#uses=0] - at .str91573 = external constant [50 x i8], align 8 ; <[50 x i8]*> [#uses=0] - at .str101574 = external constant [48 x i8], align 8 ; <[48 x i8]*> [#uses=0] - at .str111575 = external constant [40 x i8], align 8 ; <[40 x i8]*> [#uses=0] - at .str121576 = external constant [41 x i8], align 8 ; <[41 x i8]*> [#uses=0] - at .str131577 = external constant [47 x i8], align 8 ; <[47 x i8]*> [#uses=0] - at .str141578 = external constant [33 x i8], align 8 ; <[33 x i8]*> [#uses=0] - at .str151579 = external constant [25 x i8], align 1 ; <[25 x i8]*> [#uses=0] - at .str161580 = external constant [47 x i8], align 8 ; <[47 x i8]*> [#uses=0] - at .str171581 = external constant [35 x i8], align 8 ; <[35 x i8]*> [#uses=0] - at .str181582 = external constant [46 x i8], align 8 ; <[46 x i8]*> [#uses=0] - at .str191583 = external constant [47 x i8], align 8 ; <[47 x i8]*> [#uses=0] - at .str201584 = external constant [42 x i8], align 8 ; <[42 x i8]*> [#uses=0] - at .str211585 = external constant [33 x i8], align 8 ; <[33 x i8]*> [#uses=0] - at .str241588 = external constant [43 x i8], align 8 ; <[43 x i8]*> [#uses=0] - at .str261590 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=0] - at .str281592 = external constant [44 x i8], align 8 ; <[44 x i8]*> [#uses=0] - at .str291593 = external constant [46 x i8], align 8 ; <[46 x i8]*> [#uses=0] - at .str301594 = external constant [42 x i8], align 8 ; <[42 x i8]*> [#uses=0] - at .str311595 = external constant [44 x i8], align 8 ; <[44 x i8]*> [#uses=0] - at .str321596 = external constant [46 x i8], align 8 ; <[46 x i8]*> [#uses=0] - at .str331597 = external constant [42 x i8], align 8 ; <[42 x i8]*> [#uses=0] - at .str341598 = external constant [44 x i8], align 8 ; <[44 x i8]*> [#uses=0] - at .str351599 = external constant [46 x i8], align 8 ; <[46 x i8]*> [#uses=0] - at .str361600 = external constant [42 x i8], align 8 ; <[42 x i8]*> [#uses=0] - at .str371601 = external constant [24 x i8], align 1 ; <[24 x i8]*> [#uses=0] - at .str381602 = external constant [65 x i8], align 8 ; <[65 x i8]*> [#uses=0] - at .str391603 = external constant [22 x i8], align 1 ; <[22 x i8]*> [#uses=0] - at .str401604 = external constant [63 x i8], align 8 ; <[63 x i8]*> [#uses=0] - at .str1619 = external constant [18 x i8], align 1 ; <[18 x i8]*> [#uses=0] - at .str11620 = external constant [19 x i8], align 1 ; <[19 x i8]*> [#uses=0] - at .str21621 = external constant [11 x i8], align 1 ; <[11 x i8]*> [#uses=0] - at .str31622 = external constant [8 x i8], align 1 ; <[8 x i8]*> [#uses=0] - at .str41623 = external constant [16 x i8], align 1 ; <[16 x i8]*> [#uses=0] - at .str51624 = external constant [13 x i8], align 1 ; <[13 x i8]*> [#uses=0] - at .str61625 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] - at .str71626 = external constant [16 x i8], align 1 ; <[16 x i8]*> [#uses=0] - at .str81627 = external constant [11 x i8], align 1 ; <[11 x i8]*> [#uses=0] - at .str91628 = external constant [15 x i8], align 1 ; <[15 x i8]*> [#uses=0] - at HdIdWord = external global %struct.TypHeader* ; <%struct.TypHeader**> [#uses=0] - at .str101630 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] - at .str111631 = external constant [40 x i8], align 8 ; <[40 x i8]*> [#uses=0] - at .str121632 = external constant [35 x i8], align 8 ; <[35 x i8]*> [#uses=0] - at .str131633 = external constant [23 x i8], align 1 ; <[23 x i8]*> [#uses=0] - at .str141634 = external constant [37 x i8], align 8 ; <[37 x i8]*> [#uses=0] - at .str151635 = external constant [47 x i8], align 8 ; <[47 x i8]*> [#uses=0] - at .str161636 = external constant [35 x i8], align 8 ; <[35 x i8]*> [#uses=0] - at .str171637 = external constant [39 x i8], align 8 ; <[39 x i8]*> [#uses=0] - at .str181638 = external constant [30 x i8], align 1 ; <[30 x i8]*> [#uses=0] - at .str191639 = external constant [28 x i8], align 1 ; <[28 x i8]*> [#uses=0] - at .str201640 = external constant [28 x i8], align 1 ; <[28 x i8]*> [#uses=0] - at .str211641 = external constant [24 x i8], align 1 ; <[24 x i8]*> [#uses=0] - at .str221642 = external constant [42 x i8], align 8 ; <[42 x i8]*> [#uses=0] - at .str231643 = external constant [28 x i8], align 1 ; <[28 x i8]*> [#uses=0] - at .str241644 = external constant [29 x i8], align 1 ; <[29 x i8]*> [#uses=0] - at .str251645 = external constant [24 x i8], align 1 ; <[24 x i8]*> [#uses=0] - at .str261646 = external constant [45 x i8], align 8 ; <[45 x i8]*> [#uses=0] - at .str271647 = external constant [53 x i8], align 8 ; <[53 x i8]*> [#uses=0] - at .str281648 = external constant [38 x i8], align 8 ; <[38 x i8]*> [#uses=0] - at .str291649 = external constant [36 x i8], align 8 ; <[36 x i8]*> [#uses=0] - at .str301650 = external constant [29 x i8], align 1 ; <[29 x i8]*> [#uses=0] - at .str311651 = external constant [31 x i8], align 8 ; <[31 x i8]*> [#uses=0] - at .str341654 = external constant [40 x i8], align 8 ; <[40 x i8]*> [#uses=0] - at .str351655 = external constant [37 x i8], align 8 ; <[37 x i8]*> [#uses=0] - at .str361656 = external constant [41 x i8], align 8 ; <[41 x i8]*> [#uses=0] - at .str371657 = external constant [34 x i8], align 8 ; <[34 x i8]*> [#uses=0] - at .str401660 = external constant [6 x i8], align 1 ; <[6 x i8]*> [#uses=0] - at .str421662 = external constant [7 x i8], align 1 ; <[7 x i8]*> [#uses=0] - at .str431663 = external constant [4 x i8], align 1 ; <[4 x i8]*> [#uses=0] - -declare fastcc i32 @OrdinaryCollect() nounwind - -declare fastcc void @AddString2(i16* nocapture) nounwind - -declare i32 @AgCombinatorial2(i64*, %struct.TypHeader* nocapture) nounwind - -declare i32 @AgSingle(i64* nocapture, %struct.TypHeader* nocapture) nounwind - -declare i32 @AgTriple(i64* nocapture, %struct.TypHeader* nocapture) nounwind - -declare i32 @AgQuadruple(i64* nocapture, %struct.TypHeader* nocapture) nounwind - -declare fastcc void @SetAvecAgGroup(%struct.TypHeader* nocapture, i64, i64) nounwind - -declare fastcc void @SetGeneratorsAgGroup(%struct.TypHeader*) nounwind - -declare fastcc %struct.TypHeader* @AgWordAgExp(%struct.TypHeader* nocapture, %struct.TypHeader*) nounwind - -declare fastcc %struct.TypHeader* @SaveAndClearCollector(%struct.TypHeader* nocapture) nounwind - -declare fastcc %struct.TypHeader* @BlankAgGroup() nounwind - -declare fastcc void @SetStacksAgGroup(%struct.TypHeader* nocapture) nounwind - -declare fastcc %struct.TypHeader* @EvalOopN(%struct.TypHeader*, %struct.TypHeader*, %struct.TypHeader* nocapture, i8* nocapture) nounwind - -declare fastcc %struct.TypHeader* @EvalOop2(%struct.TypHeader*, %struct.TypHeader*, %struct.TypHeader*, i8* nocapture) nounwind - -declare fastcc %struct.TypHeader* @EvalOop(%struct.TypHeader*, %struct.TypHeader*, i8* nocapture) nounwind - -declare fastcc void @AddString(i16* nocapture, i64) nounwind - -declare fastcc void @AddGen() nounwind - -declare i32 @AgCombinatorial(i64*, %struct.TypHeader* nocapture) nounwind - -declare fastcc i32 @SetCWeightsAgGroup(%struct.TypHeader* nocapture, %struct.TypHeader*) nounwind - -declare void @InitCombinatorial(%struct.TypHeader* nocapture, i64) nounwind - -declare void @InitSingle(%struct.TypHeader* nocapture, i64) nounwind - -declare fastcc void @Collect(%struct.TypHeader*, %struct.TypHeader*, %struct.TypHeader*) nounwind - -declare void @InitTriple(%struct.TypHeader* nocapture, i64) nounwind - -declare void @InitQuadr(%struct.TypHeader* nocapture, i64) nounwind - -declare fastcc %struct.TypHeader* @AgSolution2(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture, %struct.TypHeader** nocapture, %struct.TypHeader*) nounwind - -declare fastcc %struct.TypHeader* @AgSolution(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @EqAg(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind readonly - -declare %struct.TypHeader* @LtAg(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind readonly - -declare %struct.TypHeader* @EvAg(%struct.TypHeader*) nounwind readnone - -declare fastcc %struct.TypHeader* @IntExponentsAgWord(%struct.TypHeader* nocapture, i64, i64) nounwind - -declare %struct.TypHeader* @ProdAg(%struct.TypHeader*, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @QuoAg(%struct.TypHeader*, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @ModAg(%struct.TypHeader* nocapture, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @PowAgI(%struct.TypHeader*, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @PowAgAg(%struct.TypHeader*, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @CommAg(%struct.TypHeader*, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @FunSumAgWord(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunDifferenceAgWord(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunDepthAgWord(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunCentralWeightAgWord(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunExponentsAgWord(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunIsAgWord(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunFactorAgGroup(%struct.TypHeader* nocapture) nounwind - -declare void @PrAgen(%struct.TypHeader* nocapture) nounwind - -declare void @PrAgList(%struct.TypHeader* nocapture) nounwind - -declare void @PrAgExp(%struct.TypHeader* nocapture) nounwind - -declare void @PrAgWord(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunAgProfile(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @TEqAg(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @TLtAg(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @TProdAg(%struct.TypHeader*, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @TQuoAg(%struct.TypHeader*, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @TModAg(%struct.TypHeader* nocapture, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @TPowAgI(%struct.TypHeader*, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @TPowAgAg(%struct.TypHeader*, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @TCommAg(%struct.TypHeader*, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @FunAgGroupRecord(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunDUMPLONG(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunCollectorProfile(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunIsCompatibleAgWord(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunExponentAgWord(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunReducedAgWord(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunInformationAgWord(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunRelativeOrderAgWord(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunLeadingExponentAgWord(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunTailDepthAgWord(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunNormalizeIgs(%struct.TypHeader* nocapture) nounwind - -declare fastcc %struct.TypHeader* @DifferenceAgWord(%struct.TypHeader*, %struct.TypHeader*, %struct.TypHeader* nocapture) nounwind - -declare fastcc %struct.TypHeader* @SumAgWord(%struct.TypHeader*, %struct.TypHeader*, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @FunFactorAgWord(%struct.TypHeader* nocapture) nounwind - -declare fastcc %struct.TypHeader* @FactorAgGroup(%struct.TypHeader* nocapture, i64) nounwind - -declare %struct.TypHeader* @FunSetCollectorAgWord(%struct.TypHeader*) nounwind - -declare %struct.TypHeader* @FunAgFpGroup(%struct.TypHeader* nocapture) nounwind - -declare i64 @LenBlist(%struct.TypHeader* nocapture) nounwind readonly - -declare %struct.TypHeader* @ElmfBlist(%struct.TypHeader* nocapture, i64) nounwind readonly - -declare i64 @PosBlist(%struct.TypHeader* nocapture, %struct.TypHeader*, i64) nounwind readonly - -declare i64 @IsDenseBlist(%struct.TypHeader* nocapture) nounwind readnone - -declare i64 @IsPossBlist(%struct.TypHeader* nocapture) nounwind readonly - -declare %struct.TypHeader* @EqBlist(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind readonly - -declare %struct.TypHeader* @ElmBlist(%struct.TypHeader* nocapture, i64) nounwind - -declare %struct.TypHeader* @ElmsBlist(%struct.TypHeader* nocapture, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @AssBlist(%struct.TypHeader*, i64, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @AsssBlist(%struct.TypHeader*, %struct.TypHeader*, %struct.TypHeader*) nounwind - -declare void @PlainBlist(%struct.TypHeader*) nounwind - -declare %struct.TypHeader* @FunIsBlist(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunBlistList(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunListBlist(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunSizeBlist(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunIsSubsetBlist(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunIntersectBlist(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunUniteBlist(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunSubtractBlist(%struct.TypHeader* nocapture) nounwind - -declare fastcc i64 @IsBlist(%struct.TypHeader*) nounwind - -declare %struct.TypHeader* @FunDistanceBlist(%struct.TypHeader* nocapture) nounwind - -declare fastcc void @CVCM2V2(%struct.TypHeader*, %struct.TypHeader*, i64, i64, %struct.TypHeader*, i64, i64*, %struct.TypHeader*) nounwind - -declare fastcc void @CVCMFVF(%struct.TypHeader*, i64, %struct.TypHeader*, i64, i64, %struct.TypHeader*, i64, i64, i64*, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @FunDistanceVecFFE(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunDistancesDistributionVecFFEsVecFFE(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunDistancesDistributionMatFFEVecFFE(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunCosetLeadersMatFFE(%struct.TypHeader* nocapture) nounwind - -declare fastcc i64 @CLMF(%struct.TypHeader*, i64, %struct.TypHeader*, i64, %struct.TypHeader*, %struct.TypHeader*, i64, i64, i64) nounwind - -declare fastcc i64 @CLM2(%struct.TypHeader*, i64, i64, %struct.TypHeader*, %struct.TypHeader*, i64, i64) nounwind - -declare fastcc %struct.TypHeader* @BlistsMatFF2(%struct.TypHeader*) nounwind - -declare fastcc void @DDMFVF(%struct.TypHeader*, i64, %struct.TypHeader*, %struct.TypHeader*, i64, i64, %struct.TypHeader*) nounwind - -declare fastcc void @DDM2V2(%struct.TypHeader*, %struct.TypHeader*, %struct.TypHeader*, i64, %struct.TypHeader*) nounwind - -declare fastcc i64 @ConvVecFFE(%struct.TypHeader*, i64) nounwind - -declare fastcc i64 @ConvMatFFE(%struct.TypHeader*, i64) nounwind - -declare %struct.TypHeader* @FunAClosestVectorCombinationsMatFFEVecFFE(%struct.TypHeader* nocapture) nounwind - -declare fastcc void @CompressDeductionList() nounwind - -declare %struct.TypHeader* @FunStandardizeTable(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunStandardizeTable2(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunApplyRel(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunMakeConsequences(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunApplyRel2(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunCopyRel(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunMakeCanonical(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunTreeEntry(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunMakeConsequences2(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunAddAbelianRelator(%struct.TypHeader* nocapture) nounwind - -declare fastcc i64 @TreeEntryC() nounwind - -declare fastcc void @AddCosetFactor2(i64) nounwind - -declare fastcc void @HandleCoinc2(i64, i64, %struct.TypHeader*) nounwind - -declare fastcc void @HandleCoinc(i64, i64) nounwind - -declare fastcc void @ConvertToBase(%struct.TypHeader* nocapture, i64) nounwind - -declare %struct.TypHeader* @EvCyc(%struct.TypHeader*) nounwind readnone - -declare %struct.TypHeader* @EqCyc(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @LtCyc(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @ProdCycI(%struct.TypHeader*, %struct.TypHeader*) nounwind - -declare fastcc %struct.TypHeader* @Cyclotomic(%struct.TypHeader* nocapture, i64, i64) nounwind - -declare void @PrCyc(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @SumCyc(%struct.TypHeader*, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @DiffCyc(%struct.TypHeader*, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @ProdCyc(%struct.TypHeader*, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @QuoCyc(%struct.TypHeader*, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @PowCyc(%struct.TypHeader*, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @FunE(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunIsCyc(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunIsCycInt(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunNofCyc(%struct.TypHeader* nocapture) nounwind -define internal %struct.TypHeader* @FunCoeffsCyc(%struct.TypHeader* nocapture %hdCall) nounwind { +define %struct.TypHeader* @FunCoeffsCyc(%struct.TypHeader* nocapture %hdCall) nounwind { entry: ret %struct.TypHeader* null } -define internal %struct.TypHeader* @FunGaloisCyc(%struct.TypHeader* nocapture %hdCall) nounwind { -entry: - unreachable -} - -declare %struct.TypHeader* @CantEval(%struct.TypHeader*) nounwind - -declare %struct.TypHeader* @Sum(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @Diff(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @Prod(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @Quo(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @Mod(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @Pow(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @Eq(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @Lt(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @Ne(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @Le(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @Gt(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @Ge(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @IsTrue(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind readonly - -declare %struct.TypHeader* @IsFalse(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind readonly - -declare %struct.TypHeader* @EvBool(%struct.TypHeader*) nounwind readnone - -declare %struct.TypHeader* @EqBool(%struct.TypHeader*, %struct.TypHeader*) nounwind readonly - -declare %struct.TypHeader* @LtBool(%struct.TypHeader*, %struct.TypHeader*) nounwind readonly - -define internal fastcc void @InitEval() nounwind { -bb.nph49: - br label %bb - -bb: ; preds = %bb, %bb.nph49 - br i1 undef, label %bb5.preheader, label %bb - -bb4: ; preds = %bb5.preheader, %bb4 - br i1 undef, label %bb6, label %bb4 - -bb6: ; preds = %bb4 - br i1 undef, label %bb11.preheader, label %bb5.preheader - -bb5.preheader: ; preds = %bb6, %bb - br label %bb4 - -bb10: ; preds = %bb11.preheader, %bb10 - br i1 undef, label %bb15, label %bb10 - -bb15: ; preds = %bb10 - br i1 undef, label %bb17, label %bb11.preheader - -bb11.preheader: ; preds = %bb15, %bb6 - br label %bb10 - -bb17: ; preds = %bb15 - br i1 undef, label %InstIntFunc.exit, label %bb.i - -bb.i: ; preds = %bb17 - unreachable - -InstIntFunc.exit: ; preds = %bb17 - br i1 undef, label %InstIntFunc.exit8, label %bb.i7 - -bb.i7: ; preds = %InstIntFunc.exit - unreachable - -InstIntFunc.exit8: ; preds = %InstIntFunc.exit - br i1 undef, label %InstVar.exit28, label %bb.i27 - -bb.i27: ; preds = %InstIntFunc.exit8 - unreachable - -InstVar.exit28: ; preds = %InstIntFunc.exit8 - br i1 undef, label %InstVar.exit, label %bb.i25 - -bb.i25: ; preds = %InstVar.exit28 - unreachable - -InstVar.exit: ; preds = %InstVar.exit28 - br i1 undef, label %InstIntFunc.exit23, label %bb.i22 - -bb.i22: ; preds = %InstVar.exit - unreachable - -InstIntFunc.exit23: ; preds = %InstVar.exit - br i1 undef, label %InstIntFunc.exit20, label %bb.i19 - -bb.i19: ; preds = %InstIntFunc.exit23 - unreachable - -InstIntFunc.exit20: ; preds = %InstIntFunc.exit23 - br i1 undef, label %InstIntFunc.exit17, label %bb.i16 - -bb.i16: ; preds = %InstIntFunc.exit20 - br label %InstIntFunc.exit17 +define fastcc void @InitEval() nounwind { InstIntFunc.exit17: ; preds = %bb.i16, %InstIntFunc.exit20 %tmp79 = tail call fastcc %struct.TypHeader* @NewBag(i32 16, i64 8) nounwind ; <%struct.TypHeader*> [#uses=2] @@ -2169,53 +126,7 @@ unreachable } -declare void @CantPrint(%struct.TypHeader*) nounwind - -declare %struct.TypHeader* @CantSum(%struct.TypHeader*, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @CantDiff(%struct.TypHeader*, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @CantProd(%struct.TypHeader*, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @CantQuo(%struct.TypHeader*, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @CantMod(%struct.TypHeader*, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @CantPow(%struct.TypHeader*, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @IntComm(%struct.TypHeader* nocapture) nounwind - -declare void @PrBinop(%struct.TypHeader*) nounwind - -declare void @PrComm(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @EvVar(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @EvVarAuto(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @EvVarAss(%struct.TypHeader* nocapture) nounwind - -declare void @PrVar(%struct.TypHeader* nocapture) nounwind - -declare void @PrVarAss(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @EvNot(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @EvAnd(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @EvOr(%struct.TypHeader* nocapture) nounwind - -declare void @PrBool(%struct.TypHeader*) nounwind - -declare void @PrNot(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunIsBool(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunShallowCopy(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunCopy(%struct.TypHeader* nocapture) nounwind - -define internal %struct.TypHeader* @FunIsBound(%struct.TypHeader* nocapture %hdCall) nounwind { +define %struct.TypHeader* @FunIsBound(%struct.TypHeader* nocapture %hdCall) nounwind { entry: br i1 undef, label %bb1, label %bb @@ -2264,162 +175,7 @@ ret %struct.TypHeader* undef } -declare %struct.TypHeader* @FunLeftQuotient(%struct.TypHeader* nocapture) nounwind - -define internal %struct.TypHeader* @CantComm(%struct.TypHeader* %hdL, %struct.TypHeader* %hdR) nounwind { -entry: - unreachable -} - -declare i16** @__ctype_b_loc() nounwind readnone - -declare fastcc void @Print(%struct.TypHeader*) nounwind - -declare %struct.TypHeader* @FunUnbind(%struct.TypHeader* nocapture) nounwind - -declare fastcc void @CopyCleanup(%struct.TypHeader*) nounwind - -declare fastcc void @CopyCopy(%struct.TypHeader*, %struct.TypHeader* nocapture) nounwind - -declare fastcc void @CopyForward(%struct.TypHeader*, %struct.TypHeader*) nounwind - -declare fastcc %struct.TypHeader* @CopyShadow(%struct.TypHeader*) nounwind - -declare fastcc %struct.TypHeader* @Copy(%struct.TypHeader*) nounwind - -declare %struct.TypHeader* @EvFFE(%struct.TypHeader*) nounwind readnone - -declare %struct.TypHeader* @EqFFE(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind readonly - -declare %struct.TypHeader* @LtFFE(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind readonly - -declare void @PrFFE(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @SumFFE(%struct.TypHeader*, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @DiffFFE(%struct.TypHeader*, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @ProdFFE(%struct.TypHeader*, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @QuoFFE(%struct.TypHeader*, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @PowFFE(%struct.TypHeader* nocapture, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @FunIsFFE(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunLogFFE(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunIntFFE(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunZ(%struct.TypHeader* nocapture) nounwind - -declare fastcc void @PrFF(%struct.TypHeader** nocapture, i32) nounwind - -declare fastcc %struct.TypHeader* @RootFiniteField(i64) nounwind - -declare fastcc %struct.TypHeader* @ConvTabIntFFE(i64) nounwind - -declare fastcc %struct.TypHeader* @CommonFF(%struct.TypHeader** nocapture, %struct.TypHeader* nocapture) nounwind - -declare fastcc void @ChangeEnv(%struct.TypHeader*) nounwind - -declare %struct.TypHeader* @EvFunction(%struct.TypHeader*) nounwind readnone - -declare %struct.TypHeader* @EvReturn(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @EvFunccall(%struct.TypHeader*) nounwind - -declare %struct.TypHeader* @EvMakefunc(%struct.TypHeader* nocapture) nounwind - -declare void @PrFunccall(%struct.TypHeader* nocapture) nounwind - -declare void @PrFunction(%struct.TypHeader* nocapture) nounwind - -declare void @PrFuncint(%struct.TypHeader* nocapture) nounwind - -declare void @PrReturn(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunTrace(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunUntrace(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunProfile(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunApplyFunc(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunIsFunc(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunIgnore(%struct.TypHeader* nocapture) nounwind readonly - -declare fastcc i64 @SizeObj(%struct.TypHeader*) nounwind - -declare fastcc void @MarkObj(%struct.TypHeader*) nounwind - -declare fastcc %struct.TypHeader* @Error(i8* nocapture, i64, i64) nounwind - -declare void @longjmp(%struct.__jmp_buf_tag*, i32) noreturn nounwind - -declare fastcc void @InitGap(i32, i8** nocapture) nounwind - -declare i32 @_setjmp(%struct.__jmp_buf_tag*) nounwind - -declare %struct.TypHeader* @FunSIZEHANDLES(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunNUMBERHANDLES(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunCoefficients(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunGASMAN(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunSIZE(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunTYPE(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunOBJ(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunHANDLE(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunIsIdentical(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunTmpName(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunSizeScreen(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunRuntime(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunExec(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunHelp(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunReadTest(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunLogInputTo(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunLogTo(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunAppendTo(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunPrntTo(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunPrint(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunAUTO(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunREAD(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunWindowCmd(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunError(%struct.TypHeader*) nounwind - -declare %struct.TypHeader* @FunBacktrace(%struct.TypHeader*) nounwind - -declare i32 @main(i32, i8** nocapture) noreturn nounwind - -declare fastcc void @ExitKernel(%struct.TypHeader*) nounwind - -declare fastcc void @CollectGarb() nounwind - -define internal fastcc %struct.TypHeader* @NewBag(i32 %type, i64 %size) nounwind { +define fastcc %struct.TypHeader* @NewBag(i32 %type, i64 %size) nounwind { entry: br i1 undef, label %bb3, label %bb2 @@ -2452,7 +208,7 @@ ret %struct.TypHeader* undef } -define internal fastcc void @Resize(%struct.TypHeader* %hdBag, i64 %newSize) nounwind { +define fastcc void @Resize(%struct.TypHeader* %hdBag, i64 %newSize) nounwind { entry: br i1 undef, label %bb1, label %bb2 @@ -2470,9 +226,7 @@ unreachable } -declare fastcc i64 @completion(i8* nocapture, i64, i64) nounwind - -define internal fastcc %struct.TypHeader* @FindRecname(i8* nocapture %name) nounwind { +define fastcc %struct.TypHeader* @FindRecname(i8* nocapture %name) nounwind { entry: br i1 undef, label %bb8, label %bb5 @@ -2488,7 +242,7 @@ unreachable } -define internal fastcc %struct.TypHeader* @FindIdent(i8* nocapture %name) nounwind { +define fastcc %struct.TypHeader* @FindIdent(i8* nocapture %name) nounwind { entry: br i1 undef, label %bb10, label %bb8 @@ -2528,1026 +282,4 @@ unreachable } -declare %struct.TypHeader* @EvInt(%struct.TypHeader*) nounwind readnone - -declare %struct.TypHeader* @EqInt(%struct.TypHeader*, %struct.TypHeader*) nounwind readonly - -declare %struct.TypHeader* @LtInt(%struct.TypHeader*, %struct.TypHeader*) nounwind readonly - -declare void @PrInteger(%struct.TypHeader*) nounwind - -declare %struct.TypHeader* @SumInt(%struct.TypHeader*, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @DiffInt(%struct.TypHeader*, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @ProdInt(%struct.TypHeader*, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @ModInt(%struct.TypHeader*, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @PowInt(%struct.TypHeader*, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @FunIsInt(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunQuo(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunRem(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunGcdInt(%struct.TypHeader* nocapture) nounwind - -declare fastcc %struct.TypHeader* @GcdInt(%struct.TypHeader*, %struct.TypHeader*) nounwind - -declare fastcc %struct.TypHeader* @RemInt(%struct.TypHeader*, %struct.TypHeader*) nounwind - -declare fastcc %struct.TypHeader* @QuoInt(%struct.TypHeader*, %struct.TypHeader*) nounwind - -declare i64 @CantLenList(%struct.TypHeader* nocapture) nounwind - -declare i64 @NotIsDenseList(%struct.TypHeader* nocapture) nounwind readnone - -declare i64 @NotIsPossList(%struct.TypHeader* nocapture) nounwind readnone - -declare %struct.TypHeader* @EvList(%struct.TypHeader*) nounwind readnone - -declare %struct.TypHeader* @EqList(%struct.TypHeader*, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @LtList(%struct.TypHeader*, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @SumList(%struct.TypHeader*, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @DiffList(%struct.TypHeader*, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @ProdList(%struct.TypHeader*, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @QuoList(%struct.TypHeader*, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @QuoLists(%struct.TypHeader*, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @ModList(%struct.TypHeader*, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @ModLists(%struct.TypHeader*, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @PowList(%struct.TypHeader*, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @PowLists(%struct.TypHeader*, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @CommList(%struct.TypHeader*, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @CommLists(%struct.TypHeader*, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @CantElmList(%struct.TypHeader* nocapture, i64) nounwind - -declare %struct.TypHeader* @CantElmsList(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @CantAssList(%struct.TypHeader* nocapture, i64, %struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @CantAsssList(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind - -declare i64 @CantPosList(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture, i64) nounwind - -declare void @CantPlainList(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @DepthListx(%struct.TypHeader*) nounwind - -declare void @PrList(%struct.TypHeader*) nounwind - -declare %struct.TypHeader* @SumSclList(%struct.TypHeader*, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @SumListScl(%struct.TypHeader*, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @DiffSclList(%struct.TypHeader*, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @DiffListScl(%struct.TypHeader*, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @ProdSclList(%struct.TypHeader*, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @ProdListScl(%struct.TypHeader*, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @EvElmList(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @EvElmListLevel(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @EvElmsList(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @EvElmsListLevel(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @EvAssList(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @EvAssListLevel(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @EvAsssList(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @EvAsssListLevel(%struct.TypHeader* nocapture) nounwind - -declare void @PrElmList(%struct.TypHeader* nocapture) nounwind - -declare void @PrElmsList(%struct.TypHeader* nocapture) nounwind - -declare void @PrAssList(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @EvIn(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunIsList(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunIsVector(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunIsMat(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunLength(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunAdd(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunAppend(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunPosition(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunOnPoints(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunOnPairs(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunOnTuples(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunOnSets(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunOnRight(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunOnLeft(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunDepthVector(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @CantDepthVector(%struct.TypHeader* nocapture) nounwind - -declare fastcc %struct.TypHeader* @AsssListLevel(%struct.TypHeader*, %struct.TypHeader*, %struct.TypHeader*, i64) nounwind - -declare fastcc %struct.TypHeader* @AssListLevel(%struct.TypHeader*, i64, %struct.TypHeader*, i64) nounwind - -declare fastcc %struct.TypHeader* @ElmsListLevel(%struct.TypHeader*, %struct.TypHeader*, i64) nounwind - -declare fastcc %struct.TypHeader* @ElmListLevel(%struct.TypHeader*, i64, i64) nounwind - -declare %struct.TypHeader* @ProdListList(%struct.TypHeader*, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @DiffListList(%struct.TypHeader*, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @SumListList(%struct.TypHeader*, %struct.TypHeader*) nounwind - -declare void @PrPcPres(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunTriangleIndex(%struct.TypHeader* nocapture) nounwind - -declare fastcc i32 @IsNormedPcp(%struct.TypHeader*, %struct.TypHeader** nocapture) nounwind - -declare %struct.TypHeader* @FunTailReducedPcp(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunBaseReducedPcp(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunTailDepthPcp(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunDepthPcp(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunExponentsPcp(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunExponentPcp(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunDifferencePcp(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunSumPcp(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunSubtractPowerPcp(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunAddPowerPcp(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunDefinePowerPcp(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunSubtractCommPcp(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunAddCommPcp(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunDefineCommPcp(%struct.TypHeader* nocapture) nounwind - -declare fastcc %struct.TypHeader* @NormalWordPcp(%struct.TypHeader*, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @FunPowerPcp(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunConjugatePcp(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunCommPcp(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunQuotientPcp(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunLeftQuotientPcp(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunProductPcp(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunNormalWordPcp(%struct.TypHeader* nocapture) nounwind - -declare fastcc void @ShrinkSwords(%struct.TypHeader*, %struct.TypHeader*, %struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunCentralWeightsPcp(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunShrinkPcp(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunGeneratorsPcp(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunDefineCentralWeightsPcp(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunExtendCentralPcp(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunAgPcp(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunPcp(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @EvPerm(%struct.TypHeader*) nounwind readnone - -declare %struct.TypHeader* @EqPP(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind readonly - -declare %struct.TypHeader* @EqPQ(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind readonly - -declare %struct.TypHeader* @EqQP(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind readonly - -declare %struct.TypHeader* @EqQQ(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind readonly - -declare %struct.TypHeader* @LtPP(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind readonly - -declare %struct.TypHeader* @LtPQ(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind readonly - -declare %struct.TypHeader* @LtQP(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind readonly - -declare %struct.TypHeader* @LtQQ(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind readonly - -declare %struct.TypHeader* @EvMakeperm(%struct.TypHeader* nocapture) nounwind - -declare void @PrMakeperm(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @PowPI(%struct.TypHeader* nocapture, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @PowIP(%struct.TypHeader*, %struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @QuoIP(%struct.TypHeader*, %struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @PowPP(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunIsPerm(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunPermList(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunOrderPerm(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunSignPerm(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunSmallestGeneratorPerm(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @CommQQ(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @CommQP(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @CommPQ(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @CommPP(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @PowQQ(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @PowQP(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @PowPQ(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @ModQQ(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @ModQP(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @ModPQ(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @ModPP(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @ProdQQ(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @ProdQP(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @ProdPQ(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @ProdPP(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunCyclePermInt(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunCycleLengthPermInt(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunLargestMovedPointPerm(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @QuoIQ(%struct.TypHeader*, %struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @PowIQ(%struct.TypHeader*, %struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @QuoQQ(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @QuoQP(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @QuoPQ(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @QuoPP(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @PowQI(%struct.TypHeader* nocapture, %struct.TypHeader*) nounwind - -declare void @PrPermQ(%struct.TypHeader* nocapture) nounwind - -declare void @PrPermP(%struct.TypHeader* nocapture) nounwind - -declare i64 @LenPlist(%struct.TypHeader* nocapture) nounwind readonly - -declare %struct.TypHeader* @ElmfPlist(%struct.TypHeader* nocapture, i64) nounwind readonly - -declare i64 @PosPlist(%struct.TypHeader* nocapture, %struct.TypHeader*, i64) nounwind - -declare void @PlainPlist(%struct.TypHeader* nocapture) nounwind readnone - -declare i64 @IsDensePlist(%struct.TypHeader* nocapture) nounwind readonly - -declare i64 @IsPossPlist(%struct.TypHeader* nocapture) nounwind readonly - -declare %struct.TypHeader* @EqPlist(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @LtPlist(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @ElmPlist(%struct.TypHeader* nocapture, i64) nounwind - -declare %struct.TypHeader* @ElmsPlist(%struct.TypHeader* nocapture, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @AssPlist(%struct.TypHeader*, i64, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @AsssPlist(%struct.TypHeader*, %struct.TypHeader*, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @EvMakeList(%struct.TypHeader* nocapture) nounwind - -declare void @PrMakeList(%struct.TypHeader* nocapture) nounwind - -declare fastcc %struct.TypHeader* @MakeList(%struct.TypHeader*, i64, %struct.TypHeader* nocapture) nounwind - -declare fastcc %struct.TypHeader* @UnifiedFieldVecFFE(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind - -declare void @AddCoeffsListxListx(%struct.TypHeader*, %struct.TypHeader*, %struct.TypHeader*) nounwind - -declare i64 @MultiplyCoeffsListxListx(%struct.TypHeader*, %struct.TypHeader*, i64, %struct.TypHeader*, i64) nounwind - -declare %struct.TypHeader* @CantNormalizeCoeffs(%struct.TypHeader* nocapture) nounwind - -declare void @CantShrinkCoeffs(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @CantShiftedCoeffs(%struct.TypHeader* nocapture, i64) nounwind - -declare void @CantAddCoeffs(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind - -declare i64 @CantMultiplyCoeffs(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture, i64, %struct.TypHeader* nocapture, i64) nounwind - -declare %struct.TypHeader* @CantProductCoeffs(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @CantProductCoeffsMod(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind - -declare i64 @CantReduceCoeffs(%struct.TypHeader* nocapture, i64, %struct.TypHeader* nocapture, i64) nounwind - -declare i64 @CantReduceCoeffsMod(%struct.TypHeader* nocapture, i64, %struct.TypHeader* nocapture, i64, %struct.TypHeader* nocapture) nounwind - -declare noalias %struct.TypHeader* @CantPowerModCoeffs(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @NormalizeCoeffsListx(%struct.TypHeader*) nounwind - -declare %struct.TypHeader* @NormalizeCoeffsVecFFE(%struct.TypHeader*) nounwind - -declare void @ShrinkCoeffsListx(%struct.TypHeader*) nounwind - -declare void @ShrinkCoeffsVecFFE(%struct.TypHeader*) nounwind - -declare %struct.TypHeader* @ShiftedCoeffsListx(%struct.TypHeader*, i64) nounwind - -declare %struct.TypHeader* @ShiftedCoeffsVecFFE(%struct.TypHeader*, i64) nounwind - -declare void @AddCoeffsListxVecFFE(%struct.TypHeader*, %struct.TypHeader*, %struct.TypHeader*) nounwind - -declare void @AddCoeffsVecFFEVecFFE(%struct.TypHeader*, %struct.TypHeader*, %struct.TypHeader*) nounwind - -declare i64 @MultiplyCoeffsVecFFEVecFFE(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture, i64, %struct.TypHeader* nocapture, i64) nounwind - -declare %struct.TypHeader* @ProductCoeffsListxListx(%struct.TypHeader*, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @ProductCoeffsVecFFEVecFFE(%struct.TypHeader*, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @ProductCoeffsModListxListx(%struct.TypHeader*, %struct.TypHeader*, %struct.TypHeader*) nounwind - -declare i64 @ReduceCoeffsListxListx(%struct.TypHeader*, i64, %struct.TypHeader*, i64) nounwind - -declare i64 @ReduceCoeffsVecFFEVecFFE(%struct.TypHeader* nocapture, i64, %struct.TypHeader* nocapture, i64) nounwind - -declare i64 @ReduceCoeffsModListxListx(%struct.TypHeader*, i64, %struct.TypHeader*, i64, %struct.TypHeader*) nounwind - -declare i64 @ReduceCoeffsModListx(%struct.TypHeader*, i64, %struct.TypHeader* nocapture, i64, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @PowerModListxIntListx(%struct.TypHeader*, %struct.TypHeader*, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @PowerModVecFFEIntVecFFE(%struct.TypHeader*, %struct.TypHeader*, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @PowerModListxLIntListx(%struct.TypHeader*, %struct.TypHeader* nocapture, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @PowerModVecFFELIntVecFFE(%struct.TypHeader*, %struct.TypHeader* nocapture, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @FunShiftedCoeffs(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunNormalizeCoeffs(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunShrinkCoeffs(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunAddCoeffs(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunSumCoeffs(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunProductCoeffs(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunProductCoeffsMod(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunReduceCoeffs(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunRemainderCoeffs(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunReduceCoeffsMod(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunPowerModCoeffs(%struct.TypHeader* nocapture) nounwind - -declare i64 @LenRange(%struct.TypHeader* nocapture) nounwind readonly - -declare %struct.TypHeader* @ElmfRange(%struct.TypHeader* nocapture, i64) nounwind readonly - -declare i64 @PosRange(%struct.TypHeader* nocapture, %struct.TypHeader*, i64) nounwind - -declare i64 @IsDenseRange(%struct.TypHeader* nocapture) nounwind readnone - -declare i64 @IsPossRange(%struct.TypHeader* nocapture) nounwind readonly - -declare %struct.TypHeader* @LtRange(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind readonly - -declare %struct.TypHeader* @ElmRange(%struct.TypHeader* nocapture, i64) nounwind - -declare %struct.TypHeader* @ElmsRange(%struct.TypHeader* nocapture, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @AssRange(%struct.TypHeader*, i64, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @AsssRange(%struct.TypHeader*, %struct.TypHeader*, %struct.TypHeader*) nounwind - -declare void @PlainRange(%struct.TypHeader*) nounwind - -declare void @PrRange(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @EvMakeRange(%struct.TypHeader* nocapture) nounwind - -declare void @PrMakeRange(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunIsRange(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @EvRat(%struct.TypHeader*) nounwind readnone - -declare void @PrRat(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @SumRat(%struct.TypHeader*, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @DiffRat(%struct.TypHeader*, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @ProdRat(%struct.TypHeader*, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @QuoRat(%struct.TypHeader*, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @ModRat(%struct.TypHeader* nocapture, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @PowRat(%struct.TypHeader*, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @EqRat(%struct.TypHeader*, %struct.TypHeader*) nounwind readonly - -declare %struct.TypHeader* @LtRat(%struct.TypHeader*, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @FunIsRat(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunNumerator(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunDenominator(%struct.TypHeader* nocapture) nounwind - -declare fastcc %struct.TypHeader* @RdExpr(i64) nounwind - -declare fastcc %struct.TypHeader* @RdAtom(i64) nounwind - -declare fastcc %struct.TypHeader* @RdFactor(i64) nounwind - -declare fastcc %struct.TypHeader* @RdTerm(i64) nounwind - -declare fastcc %struct.TypHeader* @RdAri(i64) nounwind - -declare fastcc %struct.TypHeader* @RdRel(i64) nounwind - -declare fastcc %struct.TypHeader* @RdStats(i64) nounwind - -declare fastcc %struct.TypHeader* @RdStat(i64) nounwind - -declare %struct.TypHeader* @EvRec(%struct.TypHeader*) nounwind readnone - -declare %struct.TypHeader* @EqRec(%struct.TypHeader*, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @EvMakeRec(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @EvRecElm(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @EvRecAss(%struct.TypHeader* nocapture) nounwind - -declare void @PrRec(%struct.TypHeader*) nounwind - -declare void @PrRecElm(%struct.TypHeader* nocapture) nounwind - -declare void @PrRecAss(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @SumRec(%struct.TypHeader*, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @DiffRec(%struct.TypHeader*, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @ProdRec(%struct.TypHeader*, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @QuoRec(%struct.TypHeader*, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @ModRec(%struct.TypHeader*, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @PowRec(%struct.TypHeader*, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @LtRec(%struct.TypHeader*, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @CommRec(%struct.TypHeader*, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @FunIsRec(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunRecFields(%struct.TypHeader* nocapture) nounwind - -declare fastcc %struct.TypHeader* @MakeRec(%struct.TypHeader*, i64, %struct.TypHeader* nocapture) nounwind - -declare fastcc i64 @OpenInput(i8* nocapture) nounwind - -declare fastcc void @PutLine() nounwind - -declare fastcc void @PutChr(i32 signext) nounwind - -declare fastcc void @Pr(i8* nocapture, i64, i64) nounwind - -declare fastcc void @SyntaxError(i8*) nounwind - -declare fastcc void @GetLine() nounwind - -declare fastcc void @GetIdent() nounwind - -declare fastcc void @GetSymbol() nounwind - -declare fastcc void @Match(i64, i8* nocapture, i64) nounwind - -declare i64 @LenSet(%struct.TypHeader* nocapture) nounwind readonly - -declare %struct.TypHeader* @ElmfSet(%struct.TypHeader* nocapture, i64) nounwind readonly - -declare i64 @PosSet(%struct.TypHeader* nocapture, %struct.TypHeader*, i64) nounwind - -declare void @PlainSet(%struct.TypHeader* nocapture) nounwind readnone - -declare i64 @IsDenseSet(%struct.TypHeader* nocapture) nounwind readnone - -declare i64 @IsPossSet(%struct.TypHeader* nocapture) nounwind readonly - -declare %struct.TypHeader* @EqSet(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @LtSet(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @ElmSet(%struct.TypHeader* nocapture, i64) nounwind - -declare %struct.TypHeader* @ElmsSet(%struct.TypHeader* nocapture, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @AssSet(%struct.TypHeader*, i64, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @AsssSet(%struct.TypHeader*, %struct.TypHeader*, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @FunSet(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunIsSet(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunIsEqualSet(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunIsSubsetSet(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunAddSet(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunRemoveSet(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunUniteSet(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunIntersectSet(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunSubtractSet(%struct.TypHeader* nocapture) nounwind - -declare fastcc i64 @IsSet(%struct.TypHeader*) nounwind - -declare fastcc %struct.TypHeader* @SetList(%struct.TypHeader*) nounwind - -declare %struct.TypHeader* @EvStatseq(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @EvIf(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @EvFor(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @EvWhile(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @EvRepeat(%struct.TypHeader* nocapture) nounwind - -declare void @PrStatseq(%struct.TypHeader* nocapture) nounwind - -declare void @PrIf(%struct.TypHeader* nocapture) nounwind - -declare void @PrFor(%struct.TypHeader* nocapture) nounwind - -declare void @PrWhile(%struct.TypHeader* nocapture) nounwind - -declare void @PrRepeat(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @EvChar(%struct.TypHeader*) nounwind readnone - -declare %struct.TypHeader* @EqChar(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind readonly - -declare %struct.TypHeader* @LtChar(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind readonly - -declare i64 @LenString(%struct.TypHeader* nocapture) nounwind readonly - -declare %struct.TypHeader* @ElmfString(%struct.TypHeader* nocapture, i64) nounwind readonly - -declare i64 @PosString(%struct.TypHeader*, %struct.TypHeader*, i64) nounwind - -declare i64 @IsDenseString(%struct.TypHeader* nocapture) nounwind readnone - -declare i64 @IsPossString(%struct.TypHeader* nocapture) nounwind readonly - -declare void @PrChar(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @ElmString(%struct.TypHeader* nocapture, i64) nounwind - -declare %struct.TypHeader* @ElmsString(%struct.TypHeader* nocapture, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @AssString(%struct.TypHeader*, i64, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @AsssString(%struct.TypHeader*, %struct.TypHeader*, %struct.TypHeader*) nounwind - -declare void @PlainString(%struct.TypHeader*) nounwind - -declare void @PrString(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @EqString(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind readonly - -declare %struct.TypHeader* @LtString(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind readonly - -declare %struct.TypHeader* @FunIsString(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @EvMakeString(%struct.TypHeader* nocapture) nounwind - -declare fastcc i64 @IsString(%struct.TypHeader*) nounwind - -declare noalias i8* @calloc(i64, i64) nounwind - -declare i8* @tmpnam(i8*) nounwind - -declare fastcc void @SyExit(i64) noreturn nounwind - -declare void @exit(i32) noreturn nounwind - -declare i64 @times(%struct.tms* nocapture) nounwind - -declare i64 @fwrite(i8* nocapture, i64, i64, i8* nocapture) nounwind - -declare void @syAnswerIntr(i32) nounwind - -declare i64 @time(i64*) nounwind - -declare void (i32)* @signal(i32, void (i32)*) nounwind - -declare fastcc void @syEchoch(i32, i64) nounwind - -declare i32 @fileno(%struct._IO_FILE* nocapture) nounwind - -declare i64 @write(i32, i8* nocapture, i64) - -declare fastcc void @syStopraw(i64) nounwind - -declare i32 @ioctl(i32, i64, ...) nounwind - -declare void @syAnswerTstp(i32) nounwind - -declare i32 @getpid() nounwind - -declare i32 @kill(i32, i32) nounwind - -declare fastcc void @SyFclose(i64) nounwind - -declare i32 @fclose(%struct._IO_FILE* nocapture) nounwind - declare i8* @strncat(i8*, i8* nocapture, i64) nounwind - -declare i32 @strcmp(i8* nocapture, i8* nocapture) nounwind readonly - -declare fastcc i64 @SyFopen(i8* nocapture, i8* nocapture) nounwind - -declare noalias %struct._IO_FILE* @fopen(i8* noalias nocapture, i8* noalias nocapture) nounwind - -declare void @setbuf(%struct._IO_FILE* noalias nocapture, i8* noalias) nounwind - -declare i64 @strlen(i8* nocapture) nounwind readonly - -declare fastcc void @syWinPut(i64, i8* nocapture, i8* nocapture) nounwind - -declare i32 @isatty(i32) nounwind - -declare i8* @ttyname(i32) nounwind - -declare i32 @fputs(i8* noalias nocapture, %struct._IO_FILE* noalias nocapture) nounwind - -declare i32 @atoi(i8* nocapture) nounwind readonly - -declare noalias i8* @malloc(i64) nounwind - -declare void @free(i8* nocapture) nounwind - -declare i8* @getenv(i8* nocapture) nounwind readonly - -declare i32 @system(i8* nocapture) - -declare i64 @read(i32, i8* nocapture, i64) - -declare fastcc void @SyFputs(i8* nocapture, i64) nounwind - -declare fastcc i32 @syGetch(i64) nounwind - -declare fastcc i32 @syStartraw(i64) nounwind - -declare void @llvm.memcpy.i64(i8* nocapture, i8* nocapture, i64, i32) nounwind - -declare void @syAnswerCont(i32) nounwind - -declare fastcc void @syEchos(i8* nocapture, i64) nounwind - -declare fastcc i8* @SyFgets(i8*, i64) nounwind - -declare i8* @fgets(i8* noalias, i32, %struct._IO_FILE* noalias nocapture) nounwind - -declare fastcc void @SyHelp(i8* nocapture, i64) nounwind - -declare %struct.TypHeader* @FunTzRelator(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunTzWord(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunTzSortC(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunTzRenumberGens(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunTzReplaceGens(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunTzSubstituteGen(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunTzOccurrences(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunTzOccurrencesPairs(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunTzSearchC(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @EvUnknown(%struct.TypHeader*) nounwind readnone - -declare %struct.TypHeader* @EqUnknown(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind readonly - -declare %struct.TypHeader* @LtUnknown(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind readonly - -declare void @PrUnknown(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @SumUnknown(%struct.TypHeader*, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @DiffUnknown(%struct.TypHeader*, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @ProdUnknown(%struct.TypHeader*, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @QuoUnknown(%struct.TypHeader*, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @PowUnknown(%struct.TypHeader* nocapture, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @FunUnknown(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunIsUnknown(%struct.TypHeader* nocapture) nounwind - -declare i64 @LenVecFFE(%struct.TypHeader* nocapture) nounwind readonly - -declare %struct.TypHeader* @ElmlVecFFE(%struct.TypHeader* nocapture, i64) nounwind - -declare %struct.TypHeader* @ElmrVecFFE(%struct.TypHeader* nocapture, i64) nounwind - -declare i64 @PosVecFFE(%struct.TypHeader*, %struct.TypHeader*, i64) nounwind - -declare i64 @IsDenseVecFFE(%struct.TypHeader* nocapture) nounwind readnone - -declare i64 @IsPossVecFFE(%struct.TypHeader* nocapture) nounwind readonly - -declare %struct.TypHeader* @DepthVecFFE(%struct.TypHeader* nocapture) nounwind readonly - -declare fastcc i64 @DegreeVecFFE(%struct.TypHeader* nocapture) nounwind readonly - -declare fastcc i64 @DegreeMatFFE(%struct.TypHeader** nocapture) nounwind readonly - -declare %struct.TypHeader* @ElmfVecFFE(%struct.TypHeader* nocapture, i64) nounwind - -declare %struct.TypHeader* @ElmVecFFE(%struct.TypHeader* nocapture, i64) nounwind - -declare %struct.TypHeader* @ElmsVecFFE(%struct.TypHeader* nocapture, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @AssVecFFE(%struct.TypHeader*, i64, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @AsssVecFFE(%struct.TypHeader*, %struct.TypHeader*, %struct.TypHeader*) nounwind - -declare void @PlainVecFFE(%struct.TypHeader*) nounwind - -declare i64 @IsXTypeVecFFE(%struct.TypHeader*) nounwind - -declare i64 @IsXTypeMatFFE(%struct.TypHeader*) nounwind - -declare void @PrVecFFE(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @SumFFEVecFFE(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @SumVecFFEFFE(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @SumVecFFEVecFFE(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @DiffFFEVecFFE(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @DiffVecFFEFFE(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @DiffVecFFEVecFFE(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @ProdFFEVecFFE(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @ProdVecFFEFFE(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @ProdVecFFEVecFFE(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @ProdVecFFEMatFFE(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @PowMatFFEInt(%struct.TypHeader*, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @FunCharFFE(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunDegreeFFE(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunLogVecFFE(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunMakeVecFFE(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunNumberVecFFE(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @CantIntVecFFE(%struct.TypHeader* nocapture, i64) nounwind - -declare %struct.TypHeader* @FunIntVecFFE(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @ProdFFEVector(%struct.TypHeader*, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @ProdVectorFFE(%struct.TypHeader*, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @DiffFFEVector(%struct.TypHeader*, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @DiffVectorFFE(%struct.TypHeader*, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @SumFFEVector(%struct.TypHeader*, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @SumVectorFFE(%struct.TypHeader*, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @IntVecFFE(%struct.TypHeader*, i64) nounwind - -declare i64 @LenVector(%struct.TypHeader* nocapture) nounwind readonly - -declare %struct.TypHeader* @ElmfVector(%struct.TypHeader* nocapture, i64) nounwind readonly - -declare i64 @PosVector(%struct.TypHeader* nocapture, %struct.TypHeader*, i64) nounwind - -declare void @PlainVector(%struct.TypHeader* nocapture) nounwind readnone - -declare i64 @IsDenseVector(%struct.TypHeader* nocapture) nounwind readnone - -declare i64 @IsPossVector(%struct.TypHeader* nocapture) nounwind readonly - -declare %struct.TypHeader* @EqVector(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @LtVector(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @ElmVector(%struct.TypHeader* nocapture, i64) nounwind - -declare %struct.TypHeader* @ElmsVector(%struct.TypHeader* nocapture, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @AssVector(%struct.TypHeader*, i64, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @AsssVector(%struct.TypHeader*, %struct.TypHeader*, %struct.TypHeader*) nounwind - -declare i64 @IsXTypeVector(%struct.TypHeader*) nounwind - -declare i64 @IsXTypeMatrix(%struct.TypHeader*) nounwind - -declare %struct.TypHeader* @SumIntVector(%struct.TypHeader*, %struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @SumVectorInt(%struct.TypHeader* nocapture, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @SumVectorVector(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @DiffIntVector(%struct.TypHeader*, %struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @DiffVectorInt(%struct.TypHeader* nocapture, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @DiffVectorVector(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @ProdIntVector(%struct.TypHeader*, %struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @ProdVectorInt(%struct.TypHeader* nocapture, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @ProdVectorVector(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @ProdVectorMatrix(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @PowMatrixInt(%struct.TypHeader*, %struct.TypHeader*) nounwind - -declare fastcc %struct.TypHeader* @SwordWord(%struct.TypHeader*, %struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @EvWord(%struct.TypHeader*) nounwind readnone - -declare %struct.TypHeader* @EqWord(%struct.TypHeader*, %struct.TypHeader*) nounwind readonly - -declare fastcc %struct.TypHeader* @WordSword(%struct.TypHeader* nocapture) nounwind - -declare void @PrWord(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @ProdWord(%struct.TypHeader*, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @QuoWord(%struct.TypHeader*, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @ModWord(%struct.TypHeader*, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @PowWW(%struct.TypHeader*, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @CommWord(%struct.TypHeader*, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @LtWord(%struct.TypHeader*, %struct.TypHeader*) nounwind readonly - -declare %struct.TypHeader* @PowWI(%struct.TypHeader*, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @FunExpsum(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunIsWord(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunPosWord(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunSubword(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunLenWord(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunMappedWord(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunEliminated(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunSubs(%struct.TypHeader* nocapture) nounwind - -declare fastcc %struct.TypHeader* @Words(%struct.TypHeader* nocapture, i64) nounwind - -declare %struct.TypHeader* @FunAbstractGenerators(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @FunAbstractGenerator(%struct.TypHeader* nocapture) nounwind - -declare void @PrSword(%struct.TypHeader* nocapture) nounwind - -declare %struct.TypHeader* @LtAg_DIRECT(%struct.TypHeader* nocapture, %struct.TypHeader* nocapture) nounwind readonly - -declare %struct.TypHeader* @CommAg_DIRECT(%struct.TypHeader*, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @ProdCyc_DIRECT(%struct.TypHeader*, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @QuoCyc_DIRECT(%struct.TypHeader*) nounwind - -declare void @AddCoeffsListxListx_DIRECT(%struct.TypHeader*, %struct.TypHeader*, %struct.TypHeader*) nounwind - -declare i64 @PosRange_DIRECT(%struct.TypHeader* nocapture, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @ProdCycI_DIRECT(%struct.TypHeader*, %struct.TypHeader*) nounwind - -declare void @PrFunction_DIRECT(%struct.TypHeader* nocapture) nounwind - -declare void @FunPrint_DIRECT(%struct.TypHeader* nocapture) nounwind - -declare void @FunBacktrace_DIRECT() nounwind - -declare %struct.TypHeader* @SumSclList_DIRECT(%struct.TypHeader*, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @SumListScl_DIRECT(%struct.TypHeader*, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @DiffSclList_DIRECT(%struct.TypHeader*, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @DiffListScl_DIRECT(%struct.TypHeader*, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @ProdSclList_DIRECT(%struct.TypHeader*, %struct.TypHeader*) nounwind - -declare %struct.TypHeader* @ProdListScl_DIRECT(%struct.TypHeader*, %struct.TypHeader*) nounwind - -declare i64 @IsXTypeVector_DIRECT(%struct.TypHeader*) nounwind - -declare %struct.TypHeader* @EqWord_DIRECT(%struct.TypHeader*, %struct.TypHeader*) nounwind readonly - -declare %struct.TypHeader* @ProdWord_DIRECT(%struct.TypHeader*, %struct.TypHeader*) nounwind From wdietz2 at illinois.edu Tue Jul 20 00:09:20 2010 From: wdietz2 at illinois.edu (Will Dietz) Date: Tue, 20 Jul 2010 00:09:20 -0500 Subject: [llvm-commits] [poolalloc] r108710 - /poolalloc/trunk/test/dsa/regression/2010-07-12-SCCLeader.ll In-Reply-To: <4C4521A7.1010002@mxc.ca> References: <20100719170512.AAE1A2A6C12C@llvm.org> <4C4521A7.1010002@mxc.ca> Message-ID: On Mon, Jul 19, 2010 at 11:10 PM, Nick Lewycky wrote: > This testcase is huge. Do you really need all those dead globals, functions > and types? Please trim this down. Good call, much of that was unnecessary, fixed in r108808. Thanks, ~Will Dietz From nicholas at mxc.ca Tue Jul 20 00:10:50 2010 From: nicholas at mxc.ca (Nick Lewycky) Date: Mon, 19 Jul 2010 22:10:50 -0700 Subject: [llvm-commits] [poolalloc] r108710 - /poolalloc/trunk/test/dsa/regression/2010-07-12-SCCLeader.ll In-Reply-To: References: <20100719170512.AAE1A2A6C12C@llvm.org> <4C4521A7.1010002@mxc.ca> Message-ID: <4C452FDA.1010608@mxc.ca> Will Dietz wrote: > On Mon, Jul 19, 2010 at 11:10 PM, Nick Lewycky wrote: >> This testcase is huge. Do you really need all those dead globals, functions >> and types? Please trim this down. > > Good call, much of that was unnecessary, fixed in r108808. Thanks! From echristo at apple.com Tue Jul 20 01:52:22 2010 From: echristo at apple.com (Eric Christopher) Date: Tue, 20 Jul 2010 06:52:22 -0000 Subject: [llvm-commits] [llvm] r108812 - in /llvm/trunk: include/llvm/Target/TargetRegisterInfo.h lib/Target/ARM/ARMBaseRegisterInfo.cpp lib/Target/ARM/ARMBaseRegisterInfo.h lib/Target/ARM/Thumb1RegisterInfo.cpp lib/Target/ARM/Thumb1RegisterInfo.h lib/Target/MSP430/MSP430RegisterInfo.cpp lib/Target/MSP430/MSP430RegisterInfo.h lib/Target/SystemZ/SystemZRegisterInfo.h lib/Target/X86/X86RegisterInfo.cpp lib/Target/X86/X86RegisterInfo.h Message-ID: <20100720065222.393FC2A6C12C@llvm.org> Author: echristo Date: Tue Jul 20 01:52:21 2010 New Revision: 108812 URL: http://llvm.org/viewvc/llvm-project?rev=108812&view=rev Log: Constify some arguments. Modified: llvm/trunk/include/llvm/Target/TargetRegisterInfo.h llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.cpp llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.h llvm/trunk/lib/Target/ARM/Thumb1RegisterInfo.cpp llvm/trunk/lib/Target/ARM/Thumb1RegisterInfo.h llvm/trunk/lib/Target/MSP430/MSP430RegisterInfo.cpp llvm/trunk/lib/Target/MSP430/MSP430RegisterInfo.h llvm/trunk/lib/Target/SystemZ/SystemZRegisterInfo.h llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp llvm/trunk/lib/Target/X86/X86RegisterInfo.h Modified: llvm/trunk/include/llvm/Target/TargetRegisterInfo.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetRegisterInfo.h?rev=108812&r1=108811&r2=108812&view=diff ============================================================================== --- llvm/trunk/include/llvm/Target/TargetRegisterInfo.h (original) +++ llvm/trunk/include/llvm/Target/TargetRegisterInfo.h Tue Jul 20 01:52:21 2010 @@ -603,7 +603,7 @@ /// immediately on entry to the current function. This eliminates the need for /// add/sub sp brackets around call sites. Returns true if the call frame is /// included as part of the stack frame. - virtual bool hasReservedCallFrame(MachineFunction &MF) const { + virtual bool hasReservedCallFrame(const MachineFunction &MF) const { return !hasFP(MF); } @@ -614,7 +614,7 @@ /// if the function has a reserved call frame or a frame pointer. Some /// targets (Thumb2, for example) may have more complicated criteria, /// however, and can override this behavior. - virtual bool canSimplifyCallFramePseudos(MachineFunction &MF) const { + virtual bool canSimplifyCallFramePseudos(const MachineFunction &MF) const { return hasReservedCallFrame(MF) || hasFP(MF); } @@ -624,7 +624,7 @@ /// reserved as its spill slot. This tells PEI not to create a new stack frame /// object for the given register. It should be called only after /// processFunctionBeforeCalleeSavedScan(). - virtual bool hasReservedSpillSlot(MachineFunction &MF, unsigned Reg, + virtual bool hasReservedSpillSlot(const MachineFunction &MF, unsigned Reg, int &FrameIdx) const { return false; } Modified: llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.cpp?rev=108812&r1=108811&r2=108812&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.cpp (original) +++ llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.cpp Tue Jul 20 01:52:21 2010 @@ -1239,7 +1239,7 @@ // add/sub sp brackets around call sites. Returns true if the call frame is // included as part of the stack frame. bool ARMBaseRegisterInfo:: -hasReservedCallFrame(MachineFunction &MF) const { +hasReservedCallFrame(const MachineFunction &MF) const { const MachineFrameInfo *FFI = MF.getFrameInfo(); unsigned CFSize = FFI->getMaxCallFrameSize(); // It's not always a good idea to include the call frame as part of the @@ -1257,7 +1257,7 @@ // is not sufficient here since we still may reference some objects via SP // even when FP is available in Thumb2 mode. bool ARMBaseRegisterInfo:: -canSimplifyCallFramePseudos(MachineFunction &MF) const { +canSimplifyCallFramePseudos(const MachineFunction &MF) const { return hasReservedCallFrame(MF) || MF.getFrameInfo()->hasVarSizedObjects(); } Modified: llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.h?rev=108812&r1=108811&r2=108812&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.h (original) +++ llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.h Tue Jul 20 01:52:21 2010 @@ -144,8 +144,8 @@ virtual bool requiresFrameIndexScavenging(const MachineFunction &MF) const; - virtual bool hasReservedCallFrame(MachineFunction &MF) const; - virtual bool canSimplifyCallFramePseudos(MachineFunction &MF) const; + virtual bool hasReservedCallFrame(const MachineFunction &MF) const; + virtual bool canSimplifyCallFramePseudos(const MachineFunction &MF) const; virtual void eliminateCallFramePseudoInstr(MachineFunction &MF, MachineBasicBlock &MBB, Modified: llvm/trunk/lib/Target/ARM/Thumb1RegisterInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/Thumb1RegisterInfo.cpp?rev=108812&r1=108811&r2=108812&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/Thumb1RegisterInfo.cpp (original) +++ llvm/trunk/lib/Target/ARM/Thumb1RegisterInfo.cpp Tue Jul 20 01:52:21 2010 @@ -68,7 +68,7 @@ .addConstantPoolIndex(Idx).addImm(Pred).addReg(PredReg); } -bool Thumb1RegisterInfo::hasReservedCallFrame(MachineFunction &MF) const { +bool Thumb1RegisterInfo::hasReservedCallFrame(const MachineFunction &MF) const { const MachineFrameInfo *FFI = MF.getFrameInfo(); unsigned CFSize = FFI->getMaxCallFrameSize(); // It's not always a good idea to include the call frame as part of the Modified: llvm/trunk/lib/Target/ARM/Thumb1RegisterInfo.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/Thumb1RegisterInfo.h?rev=108812&r1=108811&r2=108812&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/Thumb1RegisterInfo.h (original) +++ llvm/trunk/lib/Target/ARM/Thumb1RegisterInfo.h Tue Jul 20 01:52:21 2010 @@ -38,7 +38,7 @@ unsigned PredReg = 0) const; /// Code Generation virtual methods... - bool hasReservedCallFrame(MachineFunction &MF) const; + bool hasReservedCallFrame(const MachineFunction &MF) const; void eliminateCallFramePseudoInstr(MachineFunction &MF, MachineBasicBlock &MBB, Modified: llvm/trunk/lib/Target/MSP430/MSP430RegisterInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MSP430/MSP430RegisterInfo.cpp?rev=108812&r1=108811&r2=108812&view=diff ============================================================================== --- llvm/trunk/lib/Target/MSP430/MSP430RegisterInfo.cpp (original) +++ llvm/trunk/lib/Target/MSP430/MSP430RegisterInfo.cpp Tue Jul 20 01:52:21 2010 @@ -101,7 +101,7 @@ MFI->isFrameAddressTaken()); } -bool MSP430RegisterInfo::hasReservedCallFrame(MachineFunction &MF) const { +bool MSP430RegisterInfo::hasReservedCallFrame(const MachineFunction &MF) const { return !MF.getFrameInfo()->hasVarSizedObjects(); } Modified: llvm/trunk/lib/Target/MSP430/MSP430RegisterInfo.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MSP430/MSP430RegisterInfo.h?rev=108812&r1=108811&r2=108812&view=diff ============================================================================== --- llvm/trunk/lib/Target/MSP430/MSP430RegisterInfo.h (original) +++ llvm/trunk/lib/Target/MSP430/MSP430RegisterInfo.h Tue Jul 20 01:52:21 2010 @@ -40,7 +40,7 @@ const TargetRegisterClass* getPointerRegClass(unsigned Kind = 0) const; bool hasFP(const MachineFunction &MF) const; - bool hasReservedCallFrame(MachineFunction &MF) const; + bool hasReservedCallFrame(const MachineFunction &MF) const; void eliminateCallFramePseudoInstr(MachineFunction &MF, MachineBasicBlock &MBB, Modified: llvm/trunk/lib/Target/SystemZ/SystemZRegisterInfo.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/SystemZ/SystemZRegisterInfo.h?rev=108812&r1=108811&r2=108812&view=diff ============================================================================== --- llvm/trunk/lib/Target/SystemZ/SystemZRegisterInfo.h (original) +++ llvm/trunk/lib/Target/SystemZ/SystemZRegisterInfo.h Tue Jul 20 01:52:21 2010 @@ -34,7 +34,7 @@ BitVector getReservedRegs(const MachineFunction &MF) const; - bool hasReservedCallFrame(MachineFunction &MF) const { return true; } + bool hasReservedCallFrame(const MachineFunction &MF) const { return true; } bool hasFP(const MachineFunction &MF) const; int getFrameIndexOffset(const MachineFunction &MF, int FI) const; Modified: llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp?rev=108812&r1=108811&r2=108812&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp (original) +++ llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp Tue Jul 20 01:52:21 2010 @@ -469,12 +469,12 @@ return requiresRealignment && canRealignStack(MF); } -bool X86RegisterInfo::hasReservedCallFrame(MachineFunction &MF) const { +bool X86RegisterInfo::hasReservedCallFrame(const MachineFunction &MF) const { return !MF.getFrameInfo()->hasVarSizedObjects(); } -bool X86RegisterInfo::hasReservedSpillSlot(MachineFunction &MF, unsigned Reg, - int &FrameIdx) const { +bool X86RegisterInfo::hasReservedSpillSlot(const MachineFunction &MF, + unsigned Reg, int &FrameIdx) const { if (Reg == FramePtr && hasFP(MF)) { FrameIdx = MF.getFrameInfo()->getObjectIndexBegin(); return true; Modified: llvm/trunk/lib/Target/X86/X86RegisterInfo.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86RegisterInfo.h?rev=108812&r1=108811&r2=108812&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86RegisterInfo.h (original) +++ llvm/trunk/lib/Target/X86/X86RegisterInfo.h Tue Jul 20 01:52:21 2010 @@ -117,9 +117,9 @@ bool needsStackRealignment(const MachineFunction &MF) const; - bool hasReservedCallFrame(MachineFunction &MF) const; + bool hasReservedCallFrame(const MachineFunction &MF) const; - bool hasReservedSpillSlot(MachineFunction &MF, unsigned Reg, + bool hasReservedSpillSlot(const MachineFunction &MF, unsigned Reg, int &FrameIdx) const; void eliminateCallFramePseudoInstr(MachineFunction &MF, From resistor at mac.com Tue Jul 20 01:52:42 2010 From: resistor at mac.com (Owen Anderson) Date: Tue, 20 Jul 2010 06:52:42 -0000 Subject: [llvm-commits] [llvm] r108813 - in /llvm/trunk: include/llvm/ include/llvm/Support/ lib/Analysis/ lib/Analysis/IPA/ lib/VMCore/ tools/bugpoint/ Message-ID: <20100720065242.CACB42A6C12C@llvm.org> Author: resistor Date: Tue Jul 20 01:52:42 2010 New Revision: 108813 URL: http://llvm.org/viewvc/llvm-project?rev=108813&view=rev Log: Reapply r108794, a fix for the failing test from last time. Modified: llvm/trunk/include/llvm/Pass.h llvm/trunk/include/llvm/PassAnalysisSupport.h llvm/trunk/include/llvm/PassManagers.h llvm/trunk/include/llvm/PassSupport.h llvm/trunk/include/llvm/Support/PassNameParser.h llvm/trunk/lib/Analysis/AliasAnalysisCounter.cpp llvm/trunk/lib/Analysis/AliasDebugger.cpp llvm/trunk/lib/Analysis/BasicAliasAnalysis.cpp llvm/trunk/lib/Analysis/IPA/CallGraph.cpp llvm/trunk/lib/Analysis/IPA/GlobalsModRef.cpp llvm/trunk/lib/Analysis/ProfileEstimatorPass.cpp llvm/trunk/lib/Analysis/ProfileInfo.cpp llvm/trunk/lib/Analysis/ProfileInfoLoaderPass.cpp llvm/trunk/lib/Analysis/ScalarEvolutionAliasAnalysis.cpp llvm/trunk/lib/VMCore/Pass.cpp llvm/trunk/lib/VMCore/PassManager.cpp llvm/trunk/tools/bugpoint/BugDriver.cpp llvm/trunk/tools/bugpoint/BugDriver.h llvm/trunk/tools/bugpoint/CrashDebugger.cpp llvm/trunk/tools/bugpoint/ExtractFunction.cpp llvm/trunk/tools/bugpoint/FindBugs.cpp llvm/trunk/tools/bugpoint/Miscompilation.cpp llvm/trunk/tools/bugpoint/OptimizerDriver.cpp llvm/trunk/tools/bugpoint/bugpoint.cpp Modified: llvm/trunk/include/llvm/Pass.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Pass.h?rev=108813&r1=108812&r2=108813&view=diff ============================================================================== --- llvm/trunk/include/llvm/Pass.h (original) +++ llvm/trunk/include/llvm/Pass.h Tue Jul 20 01:52:42 2010 @@ -41,6 +41,7 @@ class Function; class Module; class AnalysisUsage; +class StaticPassInfo; class PassInfo; class ImmutablePass; class PMStack; @@ -50,7 +51,7 @@ class StringRef; // AnalysisID - Use the PassInfo to identify a pass... -typedef const PassInfo* AnalysisID; +typedef const StaticPassInfo* AnalysisID; /// Different types of internal pass managers. External pass managers /// (PassManager and FunctionPassManager) are not represented here. @@ -104,7 +105,7 @@ /// getPassInfo - Return the PassInfo data structure that corresponds to this /// pass... If the pass has not been registered, this will return null. /// - const PassInfo *getPassInfo() const; + const StaticPassInfo *getPassInfo() const; /// print - Print out the internal state of the pass. This is called by /// Analyze to print out the contents of an analysis. Otherwise it is not @@ -159,7 +160,7 @@ /// 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 *); + virtual void *getAdjustedAnalysisPointer(const StaticPassInfo *); virtual ImmutablePass *getAsImmutablePass(); virtual PMDataManager *getAsPMDataManager(); @@ -171,17 +172,17 @@ virtual void dumpPassStructure(unsigned Offset = 0); template - static const PassInfo *getClassPassInfo() { + static const StaticPassInfo *getClassPassInfo() { return lookupPassInfo(intptr_t(&AnalysisClass::ID)); } // lookupPassInfo - Return the pass info object for the specified pass class, // or null if it is not known. - static const PassInfo *lookupPassInfo(intptr_t TI); + static const StaticPassInfo *lookupPassInfo(intptr_t TI); // lookupPassInfo - Return the pass info object for the pass with the given // argument string, or null if it is not known. - static const PassInfo *lookupPassInfo(StringRef Arg); + static const StaticPassInfo *lookupPassInfo(StringRef Arg); /// getAnalysisIfAvailable() - Subclasses use this function to /// get analysis information that might be around, for example to update it. @@ -213,10 +214,10 @@ AnalysisType &getAnalysis(Function &F); // Defined in PassAnalysisSupport.h template - AnalysisType &getAnalysisID(const PassInfo *PI) const; + AnalysisType &getAnalysisID(const StaticPassInfo *PI) const; template - AnalysisType &getAnalysisID(const PassInfo *PI, Function &F); + AnalysisType &getAnalysisID(const StaticPassInfo *PI, Function &F); }; Modified: llvm/trunk/include/llvm/PassAnalysisSupport.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/PassAnalysisSupport.h?rev=108813&r1=108812&r2=108813&view=diff ============================================================================== --- llvm/trunk/include/llvm/PassAnalysisSupport.h (original) +++ llvm/trunk/include/llvm/PassAnalysisSupport.h Tue Jul 20 01:52:42 2010 @@ -86,7 +86,7 @@ // linked in. Be careful about spelling! // AnalysisUsage &addPreserved(StringRef Arg) { - const PassInfo *PI = Pass::lookupPassInfo(Arg); + const StaticPassInfo *PI = Pass::lookupPassInfo(Arg); // If the pass exists, preserve it. Otherwise silently do nothing. if (PI) Preserved.push_back(PI); return *this; @@ -130,7 +130,7 @@ inline PMDataManager &getPMDataManager() { return PM; } // Find pass that is implementing PI. - Pass *findImplPass(const PassInfo *PI) { + Pass *findImplPass(const StaticPassInfo *PI) { Pass *ResultPass = 0; for (unsigned i = 0; i < AnalysisImpls.size() ; ++i) { if (AnalysisImpls[i].first == PI) { @@ -142,10 +142,10 @@ } // Find pass that is implementing PI. Initialize pass for Function F. - Pass *findImplPass(Pass *P, const PassInfo *PI, Function &F); + Pass *findImplPass(Pass *P, const StaticPassInfo *PI, Function &F); - void addAnalysisImplsPair(const PassInfo *PI, Pass *P) { - std::pair pir = std::make_pair(PI,P); + void addAnalysisImplsPair(const StaticPassInfo *PI, Pass *P) { + std::pair pir = std::make_pair(PI,P); AnalysisImpls.push_back(pir); } @@ -160,7 +160,7 @@ // AnalysisImpls - This keeps track of which passes implements the interfaces // that are required by the current pass (to implement getAnalysis()). - std::vector > AnalysisImpls; + std::vector > AnalysisImpls; private: // PassManager that is used to resolve analysis info @@ -179,7 +179,7 @@ AnalysisType *Pass::getAnalysisIfAvailable() const { assert(Resolver && "Pass not resident in a PassManager object!"); - const PassInfo *PI = getClassPassInfo(); + const StaticPassInfo *PI = getClassPassInfo(); if (PI == 0) return 0; Pass *ResultPass = Resolver->getAnalysisIfAvailable(PI, true); @@ -203,7 +203,7 @@ } template -AnalysisType &Pass::getAnalysisID(const PassInfo *PI) const { +AnalysisType &Pass::getAnalysisID(const StaticPassInfo *PI) const { assert(PI && "getAnalysis for unregistered pass!"); assert(Resolver&&"Pass has not been inserted into a PassManager object!"); // PI *must* appear in AnalysisImpls. Because the number of passes used @@ -233,7 +233,7 @@ } template -AnalysisType &Pass::getAnalysisID(const PassInfo *PI, Function &F) { +AnalysisType &Pass::getAnalysisID(const StaticPassInfo *PI, Function &F) { assert(PI && "getAnalysis for unregistered pass!"); assert(Resolver && "Pass has not been inserted into a PassManager object!"); // PI *must* appear in AnalysisImpls. Because the number of passes used Modified: llvm/trunk/include/llvm/PassManagers.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/PassManagers.h?rev=108813&r1=108812&r2=108813&view=diff ============================================================================== --- llvm/trunk/include/llvm/PassManagers.h (original) +++ llvm/trunk/include/llvm/PassManagers.h Tue Jul 20 01:52:42 2010 @@ -302,7 +302,7 @@ /// through getAnalysis interface. virtual void addLowerLevelRequiredPass(Pass *P, Pass *RequiredPass); - virtual Pass *getOnTheFlyPass(Pass *P, const PassInfo *PI, Function &F); + virtual Pass *getOnTheFlyPass(Pass *P, const StaticPassInfo *PI, Function &F); /// Initialize available analysis information. void initializeAnalysisInfo() { Modified: llvm/trunk/include/llvm/PassSupport.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/PassSupport.h?rev=108813&r1=108812&r2=108813&view=diff ============================================================================== --- llvm/trunk/include/llvm/PassSupport.h (original) +++ llvm/trunk/include/llvm/PassSupport.h Tue Jul 20 01:52:42 2010 @@ -22,6 +22,7 @@ #define LLVM_PASS_SUPPORT_H #include "Pass.h" +#include "llvm/Config/config.h" namespace llvm { @@ -33,45 +34,24 @@ /// getPassInfo() method. These objects are set up by the RegisterPass<> /// template, defined below. /// -class PassInfo { -public: + +struct StaticPassInfo { typedef Pass* (*NormalCtor_t)(); struct InterfaceInfo { - const PassInfo *interface; + const StaticPassInfo *interface; const InterfaceInfo *next; }; -private: - const char *const PassName; // Nice name for Pass - const char *const PassArgument; // Command Line argument to run this pass - const intptr_t PassID; - const bool IsCFGOnlyPass; // Pass only looks at the CFG. - const bool IsAnalysis; // True if an analysis pass. - const bool IsAnalysisGroup; // True if an analysis group. - const InterfaceInfo *ItfImpl;// Interfaces implemented by this pass + const char *PassName; // Nice name for Pass + const char *PassArgument; // Command Line argument to run this pass + intptr_t PassID; + bool IsCFGOnlyPass; // Pass only looks at the CFG. + bool IsAnalysis; // True if an analysis pass. + bool IsAnalysisGroup; // True if an analysis group. + InterfaceInfo *ItfImpl;// Interfaces implemented by this pass NormalCtor_t NormalCtor; - -public: - /// PassInfo ctor - Do not call this directly, this should only be invoked - /// through RegisterPass. - PassInfo(const char *name, const char *arg, intptr_t pi, - NormalCtor_t normal = 0, - bool isCFGOnly = false, bool is_analysis = false) - : PassName(name), PassArgument(arg), PassID(pi), - IsCFGOnlyPass(isCFGOnly), - IsAnalysis(is_analysis), IsAnalysisGroup(false), NormalCtor(normal) { - registerPass(); - } - /// PassInfo ctor - Do not call this directly, this should only be invoked - /// through RegisterPass. This version is for use by analysis groups; it - /// does not auto-register the pass. - PassInfo(const char *name, intptr_t pi) - : PassName(name), PassArgument(""), PassID(pi), - IsCFGOnlyPass(false), - IsAnalysis(false), IsAnalysisGroup(true), NormalCtor(0) { - } - + /// getPassName - Return the friendly name for the pass, never returns null /// const char *getPassName() const { return PassName; } @@ -90,7 +70,7 @@ bool isPassID(void *IDPtr) const { return PassID == (intptr_t)IDPtr; } - + /// isAnalysisGroup - Return true if this is an analysis group, not a normal /// pass. /// @@ -100,7 +80,7 @@ /// isCFGOnlyPass - return true if this pass only looks at the CFG for the /// function. bool isCFGOnlyPass() const { return IsCFGOnlyPass; } - + /// getNormalCtor - Return a pointer to a function, that when called, creates /// an instance of the pass and returns it. This pointer may be null if there /// is no default constructor for the pass. @@ -112,14 +92,11 @@ NormalCtor = Ctor; } - /// createPass() - Use this method to create an instance of this pass. - Pass *createPass() const; - /// addInterfaceImplemented - This method is called when this pass is /// registered as a member of an analysis group with the RegisterAnalysisGroup /// template. /// - void addInterfaceImplemented(const PassInfo *ItfPI) { + void addInterfaceImplemented(const StaticPassInfo *ItfPI) { InterfaceInfo *NewInfo = new InterfaceInfo(); NewInfo->interface = ItfPI; NewInfo->next = ItfImpl; @@ -133,6 +110,39 @@ return ItfImpl; } + /// createPass() - Use this method to create an instance of this pass. + Pass *createPass() const; +}; + +class PassInfo : public StaticPassInfo { +public: + /// PassInfo ctor - Do not call this directly, this should only be invoked + /// through RegisterPass. + PassInfo(const char *name, const char *arg, intptr_t pi, + NormalCtor_t normal = 0, + bool isCFGOnly = false, bool is_analysis = false) { + this->PassName = name; + this->PassArgument = arg; + this->PassID = pi; + this->IsCFGOnlyPass = isCFGOnly; + this->IsAnalysis = is_analysis; + this->IsAnalysisGroup = false; + this->NormalCtor = normal; + registerPass(); + } + /// PassInfo ctor - Do not call this directly, this should only be invoked + /// through RegisterPass. This version is for use by analysis groups; it + /// does not auto-register the pass. + PassInfo(const char *name, intptr_t pi) { + this->PassName = name; + this->PassArgument = ""; + this->PassID = pi; + this->IsCFGOnlyPass = false; + this->IsAnalysis = false; + this->IsAnalysisGroup = true; + this->NormalCtor = 0; + } + protected: void registerPass(); void unregisterPass(); @@ -240,7 +250,7 @@ /// Callback functions - These functions are invoked whenever a pass is loaded /// or removed from the current executable. /// - virtual void passRegistered(const PassInfo *) {} + virtual void passRegistered(const StaticPassInfo *) {} /// enumeratePasses - Iterate over the registered passes, calling the /// passEnumerate callback on each PassInfo object. @@ -250,7 +260,7 @@ /// passEnumerate - Callback function invoked when someone calls /// enumeratePasses on this PassRegistrationListener object. /// - virtual void passEnumerate(const PassInfo *) {} + virtual void passEnumerate(const StaticPassInfo *) {} }; Modified: llvm/trunk/include/llvm/Support/PassNameParser.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/PassNameParser.h?rev=108813&r1=108812&r2=108813&view=diff ============================================================================== --- llvm/trunk/include/llvm/Support/PassNameParser.h (original) +++ llvm/trunk/include/llvm/Support/PassNameParser.h Tue Jul 20 01:52:42 2010 @@ -55,9 +55,11 @@ // ignorablePassImpl - Can be overriden in subclasses to refine the list of // which passes we want to include. // - virtual bool ignorablePassImpl(const PassInfo *P) const { return false; } + virtual bool ignorablePassImpl(const StaticPassInfo *P) const { + return false; + } - inline bool ignorablePass(const PassInfo *P) const { + inline bool ignorablePass(const StaticPassInfo *P) const { // Ignore non-selectable and non-constructible passes! Ignore // non-optimizations. return P->getPassArgument() == 0 || *P->getPassArgument() == 0 || @@ -66,7 +68,7 @@ // Implement the PassRegistrationListener callbacks used to populate our map // - virtual void passRegistered(const PassInfo *P) { + virtual void passRegistered(const StaticPassInfo *P) { if (ignorablePass(P) || !Opt) return; if (findOption(P->getPassArgument()) != getNumOptions()) { errs() << "Two passes with the same argument (-" @@ -75,7 +77,7 @@ } addLiteralOption(P->getPassArgument(), P, P->getPassName()); } - virtual void passEnumerate(const PassInfo *P) { passRegistered(P); } + virtual void passEnumerate(const StaticPassInfo *P) { passRegistered(P); } // ValLessThan - Provide a sorting comparator for Values elements... typedef std::pairisPassID(&AliasAnalysis::ID)) return (AliasAnalysis*)this; return this; Modified: llvm/trunk/lib/Analysis/AliasDebugger.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/AliasDebugger.cpp?rev=108813&r1=108812&r2=108813&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/AliasDebugger.cpp (original) +++ llvm/trunk/lib/Analysis/AliasDebugger.cpp Tue Jul 20 01:52:42 2010 @@ -83,7 +83,7 @@ /// 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) { + virtual void *getAdjustedAnalysisPointer(const StaticPassInfo *PI) { if (PI->isPassID(&AliasAnalysis::ID)) return (AliasAnalysis*)this; return this; Modified: llvm/trunk/lib/Analysis/BasicAliasAnalysis.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/BasicAliasAnalysis.cpp?rev=108813&r1=108812&r2=108813&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/BasicAliasAnalysis.cpp (original) +++ llvm/trunk/lib/Analysis/BasicAliasAnalysis.cpp Tue Jul 20 01:52:42 2010 @@ -172,7 +172,7 @@ /// 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) { + virtual void *getAdjustedAnalysisPointer(const StaticPassInfo *PI) { if (PI->isPassID(&AliasAnalysis::ID)) return (AliasAnalysis*)this; return this; @@ -243,7 +243,7 @@ /// 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) { + virtual void *getAdjustedAnalysisPointer(const StaticPassInfo *PI) { if (PI->isPassID(&AliasAnalysis::ID)) return (AliasAnalysis*)this; return this; Modified: llvm/trunk/lib/Analysis/IPA/CallGraph.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/IPA/CallGraph.cpp?rev=108813&r1=108812&r2=108813&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/IPA/CallGraph.cpp (original) +++ llvm/trunk/lib/Analysis/IPA/CallGraph.cpp Tue Jul 20 01:52:42 2010 @@ -86,7 +86,7 @@ /// 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) { + virtual void *getAdjustedAnalysisPointer(const StaticPassInfo *PI) { if (PI->isPassID(&CallGraph::ID)) return (CallGraph*)this; return this; Modified: llvm/trunk/lib/Analysis/IPA/GlobalsModRef.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/IPA/GlobalsModRef.cpp?rev=108813&r1=108812&r2=108813&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/IPA/GlobalsModRef.cpp (original) +++ llvm/trunk/lib/Analysis/IPA/GlobalsModRef.cpp Tue Jul 20 01:52:42 2010 @@ -149,7 +149,7 @@ /// 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) { + virtual void *getAdjustedAnalysisPointer(const StaticPassInfo *PI) { if (PI->isPassID(&AliasAnalysis::ID)) return (AliasAnalysis*)this; return this; Modified: llvm/trunk/lib/Analysis/ProfileEstimatorPass.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ProfileEstimatorPass.cpp?rev=108813&r1=108812&r2=108813&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/ProfileEstimatorPass.cpp (original) +++ llvm/trunk/lib/Analysis/ProfileEstimatorPass.cpp Tue Jul 20 01:52:42 2010 @@ -59,7 +59,7 @@ /// 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) { + virtual void *getAdjustedAnalysisPointer(const StaticPassInfo *PI) { if (PI->isPassID(&ProfileInfo::ID)) return (ProfileInfo*)this; return this; Modified: llvm/trunk/lib/Analysis/ProfileInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ProfileInfo.cpp?rev=108813&r1=108812&r2=108813&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/ProfileInfo.cpp (original) +++ llvm/trunk/lib/Analysis/ProfileInfo.cpp Tue Jul 20 01:52:42 2010 @@ -1082,7 +1082,7 @@ /// 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) { + virtual void *getAdjustedAnalysisPointer(const StaticPassInfo *PI) { if (PI->isPassID(&ProfileInfo::ID)) return (ProfileInfo*)this; return this; Modified: llvm/trunk/lib/Analysis/ProfileInfoLoaderPass.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ProfileInfoLoaderPass.cpp?rev=108813&r1=108812&r2=108813&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/ProfileInfoLoaderPass.cpp (original) +++ llvm/trunk/lib/Analysis/ProfileInfoLoaderPass.cpp Tue Jul 20 01:52:42 2010 @@ -67,7 +67,7 @@ /// 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) { + virtual void *getAdjustedAnalysisPointer(const StaticPassInfo *PI) { if (PI->isPassID(&ProfileInfo::ID)) return (ProfileInfo*)this; return this; Modified: llvm/trunk/lib/Analysis/ScalarEvolutionAliasAnalysis.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ScalarEvolutionAliasAnalysis.cpp?rev=108813&r1=108812&r2=108813&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/ScalarEvolutionAliasAnalysis.cpp (original) +++ llvm/trunk/lib/Analysis/ScalarEvolutionAliasAnalysis.cpp Tue Jul 20 01:52:42 2010 @@ -40,7 +40,7 @@ /// 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) { + virtual void *getAdjustedAnalysisPointer(const StaticPassInfo *PI) { if (PI->isPassID(&AliasAnalysis::ID)) return (AliasAnalysis*)this; return this; Modified: llvm/trunk/lib/VMCore/Pass.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Pass.cpp?rev=108813&r1=108812&r2=108813&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/Pass.cpp (original) +++ llvm/trunk/lib/VMCore/Pass.cpp Tue Jul 20 01:52:42 2010 @@ -75,7 +75,7 @@ /// Registration templates, but can be overloaded directly. /// const char *Pass::getPassName() const { - if (const PassInfo *PI = getPassInfo()) + if (const StaticPassInfo *PI = getPassInfo()) return PI->getPassName(); return "Unnamed pass: implement Pass::getPassName()"; } @@ -101,7 +101,7 @@ // By default, don't do anything. } -void *Pass::getAdjustedAnalysisPointer(const PassInfo *) { +void *Pass::getAdjustedAnalysisPointer(const StaticPassInfo *) { return this; } @@ -243,35 +243,35 @@ /// PassInfoMap - Keep track of the passinfo object for each registered llvm /// pass. - typedef std::map MapType; + typedef std::map MapType; MapType PassInfoMap; - typedef StringMap StringMapType; + typedef StringMap StringMapType; StringMapType PassInfoStringMap; /// AnalysisGroupInfo - Keep track of information for each analysis group. struct AnalysisGroupInfo { - std::set Implementations; + std::set Implementations; }; /// AnalysisGroupInfoMap - Information for each analysis group. - std::map AnalysisGroupInfoMap; + std::map AnalysisGroupInfoMap; public: - const PassInfo *GetPassInfo(intptr_t TI) const { + const StaticPassInfo *GetPassInfo(intptr_t TI) const { sys::SmartScopedLock Guard(Lock); MapType::const_iterator I = PassInfoMap.find(TI); return I != PassInfoMap.end() ? I->second : 0; } - const PassInfo *GetPassInfo(StringRef Arg) const { + const StaticPassInfo *GetPassInfo(StringRef Arg) const { sys::SmartScopedLock Guard(Lock); StringMapType::const_iterator I = PassInfoStringMap.find(Arg); return I != PassInfoStringMap.end() ? I->second : 0; } - void RegisterPass(const PassInfo &PI) { + void RegisterPass(const StaticPassInfo &PI) { sys::SmartScopedLock Guard(Lock); bool Inserted = PassInfoMap.insert(std::make_pair(PI.getTypeInfo(),&PI)).second; @@ -279,7 +279,7 @@ PassInfoStringMap[PI.getPassArgument()] = &PI; } - void UnregisterPass(const PassInfo &PI) { + void UnregisterPass(const StaticPassInfo &PI) { sys::SmartScopedLock Guard(Lock); MapType::iterator I = PassInfoMap.find(PI.getTypeInfo()); assert(I != PassInfoMap.end() && "Pass registered but not in map!"); @@ -298,8 +298,8 @@ /// Analysis Group Mechanisms. - void RegisterAnalysisGroup(PassInfo *InterfaceInfo, - const PassInfo *ImplementationInfo, + void RegisterAnalysisGroup(StaticPassInfo *InterfaceInfo, + const StaticPassInfo *ImplementationInfo, bool isDefault) { sys::SmartScopedLock Guard(Lock); AnalysisGroupInfo &AGI = AnalysisGroupInfoMap[InterfaceInfo]; @@ -363,15 +363,15 @@ // getPassInfo - Return the PassInfo data structure that corresponds to this // pass... -const PassInfo *Pass::getPassInfo() const { +const StaticPassInfo *Pass::getPassInfo() const { return lookupPassInfo(PassID); } -const PassInfo *Pass::lookupPassInfo(intptr_t TI) { +const StaticPassInfo *Pass::lookupPassInfo(intptr_t TI) { return getPassRegistrar()->GetPassInfo(TI); } -const PassInfo *Pass::lookupPassInfo(StringRef Arg) { +const StaticPassInfo *Pass::lookupPassInfo(StringRef Arg) { return getPassRegistrar()->GetPassInfo(Arg); } @@ -390,7 +390,7 @@ getPassRegistrar()->UnregisterPass(*this); } -Pass *PassInfo::createPass() const { +Pass *StaticPassInfo::createPass() const { assert((!isAnalysisGroup() || NormalCtor) && "No default implementation found for analysis group!"); assert(NormalCtor && @@ -408,8 +408,8 @@ intptr_t PassID, bool isDefault) : PassInfo(Name, InterfaceID) { - PassInfo *InterfaceInfo = - const_cast(Pass::lookupPassInfo(InterfaceID)); + StaticPassInfo *InterfaceInfo = + const_cast(Pass::lookupPassInfo(InterfaceID)); if (InterfaceInfo == 0) { // First reference to Interface, register it now. registerPass(); @@ -419,13 +419,13 @@ "Trying to join an analysis group that is a normal pass!"); if (PassID) { - const PassInfo *ImplementationInfo = Pass::lookupPassInfo(PassID); + const StaticPassInfo *ImplementationInfo = Pass::lookupPassInfo(PassID); assert(ImplementationInfo && "Must register pass before adding to AnalysisGroup!"); // Make sure we keep track of the fact that the implementation implements // the interface. - PassInfo *IIPI = const_cast(ImplementationInfo); + StaticPassInfo *IIPI = const_cast(ImplementationInfo); IIPI->addInterfaceImplemented(InterfaceInfo); getPassRegistrar()->RegisterAnalysisGroup(InterfaceInfo, IIPI, isDefault); @@ -479,7 +479,7 @@ VectorType &CFGOnlyList; GetCFGOnlyPasses(VectorType &L) : CFGOnlyList(L) {} - void passEnumerate(const PassInfo *P) { + void passEnumerate(const StaticPassInfo *P) { if (P->isCFGOnlyPass()) CFGOnlyList.push_back(P); } Modified: llvm/trunk/lib/VMCore/PassManager.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/PassManager.cpp?rev=108813&r1=108812&r2=108813&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/PassManager.cpp (original) +++ llvm/trunk/lib/VMCore/PassManager.cpp Tue Jul 20 01:52:42 2010 @@ -332,7 +332,8 @@ /// Return function pass corresponding to PassInfo PI, that is /// required by module pass MP. Instantiate analysis pass, by using /// its runOnFunction() for function F. - virtual Pass* getOnTheFlyPass(Pass *MP, const PassInfo *PI, Function &F); + virtual Pass* getOnTheFlyPass(Pass *MP, const StaticPassInfo *PI, + Function &F); virtual const char *getPassName() const { return "Module Pass Manager"; @@ -632,7 +633,7 @@ for (SmallVector::iterator I = ImmutablePasses.begin(), E = ImmutablePasses.end(); P == NULL && I != E; ++I) { - const PassInfo *PI = (*I)->getPassInfo(); + const StaticPassInfo *PI = (*I)->getPassInfo(); if (PI == AID) P = *I; @@ -728,7 +729,7 @@ /// Augement AvailableAnalysis by adding analysis made available by pass P. void PMDataManager::recordAvailableAnalysis(Pass *P) { - const PassInfo *PI = P->getPassInfo(); + const StaticPassInfo *PI = P->getPassInfo(); if (PI == 0) return; AvailableAnalysis[PI] = P; @@ -867,7 +868,7 @@ P->releaseMemory(); } - if (const PassInfo *PI = P->getPassInfo()) { + if (const StaticPassInfo *PI = P->getPassInfo()) { // Remove the pass itself (if it is not already removed). AvailableAnalysis.erase(PI); @@ -1051,7 +1052,7 @@ if (PMDataManager *PMD = (*I)->getAsPMDataManager()) PMD->dumpPassArguments(); else - if (const PassInfo *PI = (*I)->getPassInfo()) + if (const StaticPassInfo *PI = (*I)->getPassInfo()) if (!PI->isAnalysisGroup()) dbgs() << " -" << PI->getPassArgument(); } @@ -1154,7 +1155,8 @@ llvm_unreachable("Unable to schedule pass"); } -Pass *PMDataManager::getOnTheFlyPass(Pass *P, const PassInfo *PI, Function &F) { +Pass *PMDataManager::getOnTheFlyPass(Pass *P, const StaticPassInfo *PI, + Function &F) { assert(0 && "Unable to find on the fly pass"); return NULL; } @@ -1173,7 +1175,7 @@ return PM.findAnalysisPass(ID, dir); } -Pass *AnalysisResolver::findImplPass(Pass *P, const PassInfo *AnalysisPI, +Pass *AnalysisResolver::findImplPass(Pass *P, const StaticPassInfo *AnalysisPI, Function &F) { return PM.getOnTheFlyPass(P, AnalysisPI, F); } @@ -1568,7 +1570,8 @@ /// Return function pass corresponding to PassInfo PI, that is /// required by module pass MP. Instantiate analysis pass, by using /// its runOnFunction() for function F. -Pass* MPPassManager::getOnTheFlyPass(Pass *MP, const PassInfo *PI, Function &F){ +Pass* MPPassManager::getOnTheFlyPass(Pass *MP, const StaticPassInfo *PI, + Function &F){ FunctionPassManagerImpl *FPP = OnTheFlyManagers[MP]; assert(FPP && "Unable to find on the fly pass"); Modified: llvm/trunk/tools/bugpoint/BugDriver.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/bugpoint/BugDriver.cpp?rev=108813&r1=108812&r2=108813&view=diff ============================================================================== --- llvm/trunk/tools/bugpoint/BugDriver.cpp (original) +++ llvm/trunk/tools/bugpoint/BugDriver.cpp Tue Jul 20 01:52:42 2010 @@ -56,7 +56,8 @@ /// getPassesString - Turn a list of passes into a string which indicates the /// command line options that must be passed to add the passes. /// -std::string llvm::getPassesString(const std::vector &Passes) { +std::string +llvm::getPassesString(const std::vector &Passes) { std::string Result; for (unsigned i = 0, e = Passes.size(); i != e; ++i) { if (i) Result += " "; Modified: llvm/trunk/tools/bugpoint/BugDriver.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/bugpoint/BugDriver.h?rev=108813&r1=108812&r2=108813&view=diff ============================================================================== --- llvm/trunk/tools/bugpoint/BugDriver.h (original) +++ llvm/trunk/tools/bugpoint/BugDriver.h Tue Jul 20 01:52:42 2010 @@ -23,7 +23,7 @@ namespace llvm { class Value; -class PassInfo; +class StaticPassInfo; class Module; class GlobalVariable; class Function; @@ -47,7 +47,7 @@ const char *ToolName; // argv[0] of bugpoint std::string ReferenceOutputFile; // Name of `good' output file Module *Program; // The raw program, linked together - std::vector PassesToRun; + std::vector PassesToRun; AbstractInterpreter *Interpreter; // How to run the program AbstractInterpreter *SafeInterpreter; // To generate reference output, etc. GCC *gcc; @@ -77,10 +77,10 @@ bool addSources(const std::vector &FileNames); template void addPasses(It I, It E) { PassesToRun.insert(PassesToRun.end(), I, E); } - void setPassesToRun(const std::vector &PTR) { + void setPassesToRun(const std::vector &PTR) { PassesToRun = PTR; } - const std::vector &getPassesToRun() const { + const std::vector &getPassesToRun() const { return PassesToRun; } @@ -112,7 +112,7 @@ /// ReferenceOutput contains the filename of the file containing the output we /// are to match. /// - bool debugPassMiscompilation(const PassInfo *ThePass, + bool debugPassMiscompilation(const StaticPassInfo *ThePass, const std::string &ReferenceOutput); /// compileSharedObject - This method creates a SharedObject from a given @@ -243,7 +243,8 @@ /// failure. If AutoDebugCrashes is set to true, then bugpoint will /// automatically attempt to track down a crashing pass if one exists, and /// this method will never return null. - Module *runPassesOn(Module *M, const std::vector &Passes, + Module *runPassesOn(Module *M, + const std::vector &Passes, bool AutoDebugCrashes = false, unsigned NumExtraArgs = 0, const char * const *ExtraArgs = NULL); @@ -256,7 +257,7 @@ /// or failed, unless Quiet is set. ExtraArgs specifies additional arguments /// to pass to the child bugpoint instance. /// - bool runPasses(const std::vector &PassesToRun, + bool runPasses(const std::vector &PassesToRun, std::string &OutputFilename, bool DeleteOutput = false, bool Quiet = false, unsigned NumExtraArgs = 0, const char * const *ExtraArgs = NULL) const; @@ -268,7 +269,7 @@ /// If the passes did not compile correctly, output the command required to /// recreate the failure. This returns true if a compiler error is found. /// - bool runManyPasses(const std::vector &AllPasses, + bool runManyPasses(const std::vector &AllPasses, std::string &ErrMsg); /// writeProgramToFile - This writes the current "Program" to the named @@ -281,14 +282,14 @@ /// false indicating whether or not the optimizer crashed on the specified /// input (true = crashed). /// - bool runPasses(const std::vector &PassesToRun, + bool runPasses(const std::vector &PassesToRun, bool DeleteOutput = true) const { std::string Filename; return runPasses(PassesToRun, Filename, DeleteOutput); } /// runAsChild - The actual "runPasses" guts that runs in a child process. - int runPassesAsChild(const std::vector &PassesToRun); + int runPassesAsChild(const std::vector &PassesToRun); /// initializeExecutionEnvironment - This method is used to set up the /// environment for executing LLVM programs. @@ -306,7 +307,7 @@ /// getPassesString - Turn a list of passes into a string which indicates the /// command line options that must be passed to add the passes. /// -std::string getPassesString(const std::vector &Passes); +std::string getPassesString(const std::vector &Passes); /// PrintFunctionList - prints out list of problematic functions /// Modified: llvm/trunk/tools/bugpoint/CrashDebugger.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/bugpoint/CrashDebugger.cpp?rev=108813&r1=108812&r2=108813&view=diff ============================================================================== --- llvm/trunk/tools/bugpoint/CrashDebugger.cpp (original) +++ llvm/trunk/tools/bugpoint/CrashDebugger.cpp Tue Jul 20 01:52:42 2010 @@ -43,7 +43,7 @@ } namespace llvm { - class ReducePassList : public ListReducer { + class ReducePassList : public ListReducer { BugDriver &BD; public: ReducePassList(BugDriver &bd) : BD(bd) {} @@ -52,15 +52,15 @@ // running the "Kept" passes fail when run on the output of the "removed" // passes. If we return true, we update the current module of bugpoint. // - virtual TestResult doTest(std::vector &Removed, - std::vector &Kept, + virtual TestResult doTest(std::vector &Removed, + std::vector &Kept, std::string &Error); }; } ReducePassList::TestResult -ReducePassList::doTest(std::vector &Prefix, - std::vector &Suffix, +ReducePassList::doTest(std::vector &Prefix, + std::vector &Suffix, std::string &Error) { sys::Path PrefixOutput; Module *OrigProgram = 0; Modified: llvm/trunk/tools/bugpoint/ExtractFunction.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/bugpoint/ExtractFunction.cpp?rev=108813&r1=108812&r2=108813&view=diff ============================================================================== --- llvm/trunk/tools/bugpoint/ExtractFunction.cpp (original) +++ llvm/trunk/tools/bugpoint/ExtractFunction.cpp Tue Jul 20 01:52:42 2010 @@ -99,8 +99,8 @@ return Result; } -static const PassInfo *getPI(Pass *P) { - const PassInfo *PI = P->getPassInfo(); +static const StaticPassInfo *getPI(Pass *P) { + const StaticPassInfo *PI = P->getPassInfo(); delete P; return PI; } @@ -114,7 +114,7 @@ for (Module::iterator I = M->begin(), E = M->end(); I != E; ++I) I->setLinkage(GlobalValue::ExternalLinkage); - std::vector CleanupPasses; + std::vector CleanupPasses; CleanupPasses.push_back(getPI(createGlobalDCEPass())); if (MayModifySemantics) @@ -138,7 +138,7 @@ /// function. This returns null if there are no extractable loops in the /// program or if the loop extractor crashes. Module *BugDriver::ExtractLoop(Module *M) { - std::vector LoopExtractPasses; + std::vector LoopExtractPasses; LoopExtractPasses.push_back(getPI(createSingleLoopExtractorPass())); Module *NewM = runPassesOn(M, LoopExtractPasses); @@ -359,7 +359,7 @@ std::string uniqueFN = "--extract-blocks-file=" + uniqueFilename.str(); const char *ExtraArg = uniqueFN.c_str(); - std::vector PI; + std::vector PI; std::vector EmptyBBs; // This parameter is ignored. PI.push_back(getPI(createBlockExtractorPass(EmptyBBs))); Module *Ret = runPassesOn(M, PI, false, 1, &ExtraArg); Modified: llvm/trunk/tools/bugpoint/FindBugs.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/bugpoint/FindBugs.cpp?rev=108813&r1=108812&r2=108813&view=diff ============================================================================== --- llvm/trunk/tools/bugpoint/FindBugs.cpp (original) +++ llvm/trunk/tools/bugpoint/FindBugs.cpp Tue Jul 20 01:52:42 2010 @@ -29,7 +29,8 @@ /// If the passes did not compile correctly, output the command required to /// recreate the failure. This returns true if a compiler error is found. /// -bool BugDriver::runManyPasses(const std::vector &AllPasses, +bool +BugDriver::runManyPasses(const std::vector &AllPasses, std::string &ErrMsg) { setPassesToRun(AllPasses); outs() << "Starting bug finding procedure...\n\n"; Modified: llvm/trunk/tools/bugpoint/Miscompilation.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/bugpoint/Miscompilation.cpp?rev=108813&r1=108812&r2=108813&view=diff ============================================================================== --- llvm/trunk/tools/bugpoint/Miscompilation.cpp (original) +++ llvm/trunk/tools/bugpoint/Miscompilation.cpp Tue Jul 20 01:52:42 2010 @@ -43,13 +43,13 @@ cl::desc("Don't extract blocks when searching for miscompilations"), cl::init(false)); - class ReduceMiscompilingPasses : public ListReducer { + class ReduceMiscompilingPasses : public ListReducer { BugDriver &BD; public: ReduceMiscompilingPasses(BugDriver &bd) : BD(bd) {} - virtual TestResult doTest(std::vector &Prefix, - std::vector &Suffix, + virtual TestResult doTest(std::vector &Prefix, + std::vector &Suffix, std::string &Error); }; } @@ -58,8 +58,8 @@ /// group, see if they still break the program. /// ReduceMiscompilingPasses::TestResult -ReduceMiscompilingPasses::doTest(std::vector &Prefix, - std::vector &Suffix, +ReduceMiscompilingPasses::doTest(std::vector &Prefix, + std::vector &Suffix, std::string &Error) { // First, run the program with just the Suffix passes. If it is still broken // with JUST the kept passes, discard the prefix passes. Modified: llvm/trunk/tools/bugpoint/OptimizerDriver.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/bugpoint/OptimizerDriver.cpp?rev=108813&r1=108812&r2=108813&view=diff ============================================================================== --- llvm/trunk/tools/bugpoint/OptimizerDriver.cpp (original) +++ llvm/trunk/tools/bugpoint/OptimizerDriver.cpp Tue Jul 20 01:52:42 2010 @@ -83,7 +83,7 @@ outs() << getPassesString(PassesToRun) << "\n"; } -int BugDriver::runPassesAsChild(const std::vector &Passes) { +int BugDriver::runPassesAsChild(const std::vector &Passes) { std::string ErrInfo; raw_fd_ostream OutFile(ChildOutput.c_str(), ErrInfo, raw_fd_ostream::F_Binary); @@ -124,7 +124,7 @@ /// outs() a single line message indicating whether compilation was successful /// or failed. /// -bool BugDriver::runPasses(const std::vector &Passes, +bool BugDriver::runPasses(const std::vector &Passes, std::string &OutputFilename, bool DeleteOutput, bool Quiet, unsigned NumExtraArgs, const char * const *ExtraArgs) const { @@ -178,7 +178,7 @@ pass_args.push_back( std::string("-load")); pass_args.push_back( PluginLoader::getPlugin(i)); } - for (std::vector::const_iterator I = Passes.begin(), + for (std::vector::const_iterator I = Passes.begin(), E = Passes.end(); I != E; ++I ) pass_args.push_back( std::string("-") + (*I)->getPassArgument() ); for (std::vector::const_iterator I = pass_args.begin(), @@ -235,7 +235,7 @@ /// module, returning the transformed module on success, or a null pointer on /// failure. Module *BugDriver::runPassesOn(Module *M, - const std::vector &Passes, + const std::vector &Passes, bool AutoDebugCrashes, unsigned NumExtraArgs, const char * const *ExtraArgs) { Module *OldProgram = swapProgramIn(M); Modified: llvm/trunk/tools/bugpoint/bugpoint.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/bugpoint/bugpoint.cpp?rev=108813&r1=108812&r2=108813&view=diff ============================================================================== --- llvm/trunk/tools/bugpoint/bugpoint.cpp (original) +++ llvm/trunk/tools/bugpoint/bugpoint.cpp Tue Jul 20 01:52:42 2010 @@ -61,7 +61,7 @@ // The AnalysesList is automatically populated with registered Passes by the // PassNameParser. // -static cl::list +static cl::list PassList(cl::desc("Passes available:"), cl::ZeroOrMore); static cl::opt @@ -90,7 +90,7 @@ AddToDriver(BugDriver &_D) : D(_D) {} virtual void add(Pass *P) { - const PassInfo *PI = P->getPassInfo(); + const StaticPassInfo *PI = P->getPassInfo(); D.addPasses(&PI, &PI + 1); } }; From echristo at apple.com Tue Jul 20 01:56:13 2010 From: echristo at apple.com (Eric Christopher) Date: Tue, 20 Jul 2010 06:56:13 -0000 Subject: [llvm-commits] [llvm] r108814 - /llvm/trunk/include/llvm/Target/TargetRegisterInfo.h Message-ID: <20100720065613.935C62A6C12C@llvm.org> Author: echristo Date: Tue Jul 20 01:56:13 2010 New Revision: 108814 URL: http://llvm.org/viewvc/llvm-project?rev=108814&view=rev Log: Grammar. Modified: llvm/trunk/include/llvm/Target/TargetRegisterInfo.h Modified: llvm/trunk/include/llvm/Target/TargetRegisterInfo.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetRegisterInfo.h?rev=108814&r1=108813&r2=108814&view=diff ============================================================================== --- llvm/trunk/include/llvm/Target/TargetRegisterInfo.h (original) +++ llvm/trunk/include/llvm/Target/TargetRegisterInfo.h Tue Jul 20 01:56:13 2010 @@ -610,7 +610,7 @@ /// canSimplifyCallFramePseudos - When possible, it's best to simplify the /// call frame pseudo ops before doing frame index elimination. This is /// possible only when frame index references between the pseudos won't - /// need adjusted for the call frame adjustments. Normally, that's true + /// need adjusting for the call frame adjustments. Normally, that's true /// if the function has a reserved call frame or a frame pointer. Some /// targets (Thumb2, for example) may have more complicated criteria, /// however, and can override this behavior. From lhames at gmail.com Tue Jul 20 02:41:45 2010 From: lhames at gmail.com (Lang Hames) Date: Tue, 20 Jul 2010 07:41:45 -0000 Subject: [llvm-commits] [llvm] r108815 - in /llvm/trunk/lib/CodeGen: RegAllocPBQP.cpp RenderMachineFunction.cpp RenderMachineFunction.h Message-ID: <20100720074145.28CDB2A6C12D@llvm.org> Author: lhames Date: Tue Jul 20 02:41:44 2010 New Revision: 108815 URL: http://llvm.org/viewvc/llvm-project?rev=108815&view=rev Log: Switched to rendering after allocation (but before rewriting) in PBQP. Updated renderer to use allocation information from VirtRegMap (if available) to render spilled intervals differently. Modified: llvm/trunk/lib/CodeGen/RegAllocPBQP.cpp llvm/trunk/lib/CodeGen/RenderMachineFunction.cpp llvm/trunk/lib/CodeGen/RenderMachineFunction.h Modified: llvm/trunk/lib/CodeGen/RegAllocPBQP.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RegAllocPBQP.cpp?rev=108815&r1=108814&r2=108815&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/RegAllocPBQP.cpp (original) +++ llvm/trunk/lib/CodeGen/RegAllocPBQP.cpp Tue Jul 20 02:41:44 2010 @@ -865,11 +865,10 @@ lis = &getAnalysis(); lss = &getAnalysis(); loopInfo = &getAnalysis(); + RenderMachineFunction *rmf = &getAnalysis(); vrm = &getAnalysis(); - RenderMachineFunction *rmf = &getAnalysis(); - rmf->renderMachineFunction("Prior to PBQP register allocation."); DEBUG(dbgs() << "PBQP Register Allocating for " << mf->getFunction()->getName() << "\n"); @@ -907,6 +906,8 @@ // Finalise allocation, allocate empty ranges. finalizeAlloc(); + rmf->renderMachineFunction("After PBQP register allocation.", vrm); + vregIntervalsToAlloc.clear(); emptyVRegIntervals.clear(); li2Node.clear(); Modified: llvm/trunk/lib/CodeGen/RenderMachineFunction.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RenderMachineFunction.cpp?rev=108815&r1=108814&r2=108815&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/RenderMachineFunction.cpp (original) +++ llvm/trunk/lib/CodeGen/RenderMachineFunction.cpp Tue Jul 20 02:41:44 2010 @@ -11,6 +11,8 @@ #include "RenderMachineFunction.h" +#include "VirtRegMap.h" + #include "llvm/Function.h" #include "llvm/Module.h" #include "llvm/ADT/SmallVector.h" @@ -511,6 +513,50 @@ return r; } + RenderMachineFunction::LiveState + RenderMachineFunction::getLiveStateAt(const LiveInterval *li, + SlotIndex i) const { + const MachineInstr *mi = sis->getInstructionFromIndex(i); + + if (li->liveAt(i)) { + if (mi == 0) { + if (vrm == 0 || + (vrm->getStackSlot(li->reg) == VirtRegMap::NO_STACK_SLOT)) { + return AliveReg; + } else { + return AliveStack; + } + } else { + if (i.getSlot() == SlotIndex::DEF && + mi->definesRegister(li->reg, tri)) { + return Defined; + } else if (i.getSlot() == SlotIndex::USE && + mi->readsRegister(li->reg)) { + return Used; + } else { + if (vrm == 0 || + (vrm->getStackSlot(li->reg) == VirtRegMap::NO_STACK_SLOT)) { + return AliveReg; + } else { + return AliveStack; + } + } + } + } + return Dead; + } + + /// \brief Render a machine instruction. + template + void RenderMachineFunction::renderMachineInstr(OStream &os, + const MachineInstr *mi) const { + std::string s; + raw_string_ostream oss(s); + oss << *mi; + + os << escapeChars(oss.str()); + } + template void RenderMachineFunction::renderVertical(const std::string &indent, OStream &os, @@ -557,7 +603,8 @@ << indent << " table.code td.l-na { background-color: #ffffff; }\n" << indent << " table.code td.l-def { background-color: #ff0000; }\n" << indent << " table.code td.l-use { background-color: #ffff00; }\n" - << indent << " table.code td.l-sa { background-color: #000000; }\n" + << indent << " table.code td.l-sar { background-color: #000000; }\n" + << indent << " table.code td.l-sas { background-color: #770000; }\n" << indent << " table.code th { border-width: 0px; " "border-style: solid; }\n" << indent << "\n"; @@ -663,7 +710,9 @@ if (i == sis->getMBBStartIdx(mbb)) { os << indent << " BB#" << mbb->getNumber() << ": \n"; } else if (mi != 0) { - os << indent << "   " << escapeChars(mi) << "\n"; + os << indent << "   "; + renderMachineInstr(os, mi); + os << "\n"; } else { os << indent << "  \n"; } @@ -706,22 +755,13 @@ liItr != liEnd; ++liItr) { const LiveInterval *li = *liItr; os << indent << " liveAt(i)) { - if (mi == 0) { - os << "l-sa"; - } else { - if (i.getSlot() == SlotIndex::DEF && - mi->definesRegister(li->reg, tri)) { - os << "l-def"; - } else if (i.getSlot() == SlotIndex::USE && - mi->readsRegister(li->reg)) { - os << "l-use"; - } else { - os << "l-sa"; - } - } - } else { - os << "l-na"; + switch (getLiveStateAt(li, i)) { + case Dead: os << "l-na"; break; + case Defined: os << "l-def"; break; + case Used: os << "l-use"; break; + case AliveReg: os << "l-sar"; break; + case AliveStack: os << "l-sas"; break; + default: assert(false && "Unrecognised live state."); break; } os << "\">\n"; } @@ -797,10 +837,12 @@ void RenderMachineFunction::renderMachineFunction( const char *renderContextStr, + const VirtRegMap *vrm, const char *renderSuffix) { if (!ro.shouldRenderCurrentMachineFunction()) return; + this->vrm = vrm; trei.reset(); std::string rpFileName(mf->getFunction()->getName().str() + @@ -815,20 +857,8 @@ ro.resetRenderSpecificOptions(); } - void RenderMachineFunction::setupRenderingOptions() { - - } - std::string RenderMachineFunction::escapeChars(const std::string &s) const { return escapeChars(s.begin(), s.end()); } - std::string RenderMachineFunction::escapeChars(const MachineInstr *mi) const { - std::string s; - raw_string_ostream os(s); - os << *mi; - std::string s2 = os.str(); - return escapeChars(s2); - } - } Modified: llvm/trunk/lib/CodeGen/RenderMachineFunction.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RenderMachineFunction.h?rev=108815&r1=108814&r2=108815&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/RenderMachineFunction.h (original) +++ llvm/trunk/lib/CodeGen/RenderMachineFunction.h Tue Jul 20 02:41:44 2010 @@ -30,7 +30,7 @@ class MachineRegisterInfo; class TargetRegisterClass; class TargetRegisterInfo; - + class VirtRegMap; /// \brief Provide extra information about the physical and virtual registers /// in the function being compiled. @@ -212,10 +212,14 @@ /// codegen pipeline) this function was rendered /// from. Set it to something like /// "Pre-register-allocation". + /// @param vrm If non-null the VRM will be queried to determine + /// whether a virtual register was allocated to a + /// physical register or spilled. /// @param renderFilePrefix This string will be appended to the function /// name (before the output file suffix) to enable /// multiple renderings from the same function. void renderMachineFunction(const char *renderContextStr, + const VirtRegMap *vrm = 0, const char *renderSuffix = 0); private: @@ -227,19 +231,26 @@ const TargetRegisterInfo *tri; LiveIntervals *lis; SlotIndexes *sis; + const VirtRegMap *vrm; TargetRegisterExtraInfo trei; MFRenderingOptions ro; - // ---------- Utility functions ---------- + // Utilities. + typedef enum { Dead, Defined, Used, AliveReg, AliveStack } LiveState; - void setupRenderingOptions(); + LiveState getLiveStateAt(const LiveInterval *li, SlotIndex i) const; // ---------- Rendering methods ---------- template std::string escapeChars(Iterator sBegin, Iterator sEnd) const; + /// \brief Render a machine instruction. + template + void renderMachineInstr(OStream &os, + const MachineInstr *mi) const; + /// \brief Render vertical text. template void renderVertical(const std::string &indent, @@ -282,9 +293,6 @@ const char * const renderContextStr) const; std::string escapeChars(const std::string &s) const; - - std::string escapeChars(const MachineInstr *mi) const; - }; } From bruno.cardoso at gmail.com Tue Jul 20 02:58:52 2010 From: bruno.cardoso at gmail.com (Bruno Cardoso Lopes) Date: Tue, 20 Jul 2010 07:58:52 -0000 Subject: [llvm-commits] [llvm] r108816 - in /llvm/trunk: lib/Target/Mips/MipsISelLowering.cpp test/CodeGen/Mips/2010-07-20-Select.ll Message-ID: <20100720075852.236BA2A6C12D@llvm.org> Author: bruno Date: Tue Jul 20 02:58:51 2010 New Revision: 108816 URL: http://llvm.org/viewvc/llvm-project?rev=108816&view=rev Log: Fix Mips PR7473. Patch by stetorvs at gmail.com Added: llvm/trunk/test/CodeGen/Mips/2010-07-20-Select.ll Modified: llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp Modified: llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp?rev=108816&r1=108815&r2=108816&view=diff ============================================================================== --- llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp (original) +++ llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp Tue Jul 20 02:58:51 2010 @@ -317,13 +317,13 @@ BB->addSuccessor(sinkMBB); // sinkMBB: - // %Result = phi [ %FalseValue, copy0MBB ], [ %TrueValue, thisMBB ] + // %Result = phi [ %TrueValue, thisMBB ], [ %FalseValue, copy0MBB ] // ... BB = sinkMBB; BuildMI(*BB, BB->begin(), dl, TII->get(Mips::PHI), MI->getOperand(0).getReg()) - .addReg(MI->getOperand(2).getReg()).addMBB(copy0MBB) - .addReg(MI->getOperand(3).getReg()).addMBB(thisMBB); + .addReg(MI->getOperand(2).getReg()).addMBB(thisMBB) + .addReg(MI->getOperand(3).getReg()).addMBB(copy0MBB); MI->eraseFromParent(); // The pseudo instruction is gone now. return BB; Added: llvm/trunk/test/CodeGen/Mips/2010-07-20-Select.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Mips/2010-07-20-Select.ll?rev=108816&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/Mips/2010-07-20-Select.ll (added) +++ llvm/trunk/test/CodeGen/Mips/2010-07-20-Select.ll Tue Jul 20 02:58:51 2010 @@ -0,0 +1,21 @@ +; RUN: llc < %s -march=mips -relocation-model=static | FileCheck %s +; Fix PR7473 + +define i32 @main() nounwind readnone { +entry: + %a = alloca i32, align 4 ; [#uses=2] + %c = alloca i32, align 4 ; [#uses=2] + volatile store i32 1, i32* %a, align 4 + volatile store i32 0, i32* %c, align 4 + %0 = volatile load i32* %a, align 4 ; [#uses=1] + %1 = icmp eq i32 %0, 0 ; [#uses=1] +; CHECK: addiu $4, $zero, 3 + %iftmp.0.0 = select i1 %1, i32 3, i32 0 ; [#uses=1] + %2 = volatile load i32* %c, align 4 ; [#uses=1] + %3 = icmp eq i32 %2, 0 ; [#uses=1] +; CHECK: addu $4, $zero, $3 +; CHECK: addu $2, $5, $4 + %iftmp.2.0 = select i1 %3, i32 0, i32 5 ; [#uses=1] + %4 = add nsw i32 %iftmp.2.0, %iftmp.0.0 ; [#uses=1] + ret i32 %4 +} From resistor at mac.com Tue Jul 20 03:26:15 2010 From: resistor at mac.com (Owen Anderson) Date: Tue, 20 Jul 2010 08:26:15 -0000 Subject: [llvm-commits] [llvm] r108818 - in /llvm/trunk: include/llvm/ include/llvm/Support/ lib/Analysis/ lib/Analysis/IPA/ lib/VMCore/ tools/bugpoint/ Message-ID: <20100720082615.D8A782A6C12C@llvm.org> Author: resistor Date: Tue Jul 20 03:26:15 2010 New Revision: 108818 URL: http://llvm.org/viewvc/llvm-project?rev=108818&view=rev Log: Speculatively revert r108813, in an attempt to get the self-host buildbots working again. I don't see why this patch would cause them to fail the way they are, but none of the other intervening patches seem likely either. Modified: llvm/trunk/include/llvm/Pass.h llvm/trunk/include/llvm/PassAnalysisSupport.h llvm/trunk/include/llvm/PassManagers.h llvm/trunk/include/llvm/PassSupport.h llvm/trunk/include/llvm/Support/PassNameParser.h llvm/trunk/lib/Analysis/AliasAnalysisCounter.cpp llvm/trunk/lib/Analysis/AliasDebugger.cpp llvm/trunk/lib/Analysis/BasicAliasAnalysis.cpp llvm/trunk/lib/Analysis/IPA/CallGraph.cpp llvm/trunk/lib/Analysis/IPA/GlobalsModRef.cpp llvm/trunk/lib/Analysis/ProfileEstimatorPass.cpp llvm/trunk/lib/Analysis/ProfileInfo.cpp llvm/trunk/lib/Analysis/ProfileInfoLoaderPass.cpp llvm/trunk/lib/Analysis/ScalarEvolutionAliasAnalysis.cpp llvm/trunk/lib/VMCore/Pass.cpp llvm/trunk/lib/VMCore/PassManager.cpp llvm/trunk/tools/bugpoint/BugDriver.cpp llvm/trunk/tools/bugpoint/BugDriver.h llvm/trunk/tools/bugpoint/CrashDebugger.cpp llvm/trunk/tools/bugpoint/ExtractFunction.cpp llvm/trunk/tools/bugpoint/FindBugs.cpp llvm/trunk/tools/bugpoint/Miscompilation.cpp llvm/trunk/tools/bugpoint/OptimizerDriver.cpp llvm/trunk/tools/bugpoint/bugpoint.cpp Modified: llvm/trunk/include/llvm/Pass.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Pass.h?rev=108818&r1=108817&r2=108818&view=diff ============================================================================== --- llvm/trunk/include/llvm/Pass.h (original) +++ llvm/trunk/include/llvm/Pass.h Tue Jul 20 03:26:15 2010 @@ -41,7 +41,6 @@ class Function; class Module; class AnalysisUsage; -class StaticPassInfo; class PassInfo; class ImmutablePass; class PMStack; @@ -51,7 +50,7 @@ class StringRef; // AnalysisID - Use the PassInfo to identify a pass... -typedef const StaticPassInfo* AnalysisID; +typedef const PassInfo* AnalysisID; /// Different types of internal pass managers. External pass managers /// (PassManager and FunctionPassManager) are not represented here. @@ -105,7 +104,7 @@ /// getPassInfo - Return the PassInfo data structure that corresponds to this /// pass... If the pass has not been registered, this will return null. /// - const StaticPassInfo *getPassInfo() const; + const PassInfo *getPassInfo() const; /// print - Print out the internal state of the pass. This is called by /// Analyze to print out the contents of an analysis. Otherwise it is not @@ -160,7 +159,7 @@ /// 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 StaticPassInfo *); + virtual void *getAdjustedAnalysisPointer(const PassInfo *); virtual ImmutablePass *getAsImmutablePass(); virtual PMDataManager *getAsPMDataManager(); @@ -172,17 +171,17 @@ virtual void dumpPassStructure(unsigned Offset = 0); template - static const StaticPassInfo *getClassPassInfo() { + static const PassInfo *getClassPassInfo() { return lookupPassInfo(intptr_t(&AnalysisClass::ID)); } // lookupPassInfo - Return the pass info object for the specified pass class, // or null if it is not known. - static const StaticPassInfo *lookupPassInfo(intptr_t TI); + static const PassInfo *lookupPassInfo(intptr_t TI); // lookupPassInfo - Return the pass info object for the pass with the given // argument string, or null if it is not known. - static const StaticPassInfo *lookupPassInfo(StringRef Arg); + static const PassInfo *lookupPassInfo(StringRef Arg); /// getAnalysisIfAvailable() - Subclasses use this function to /// get analysis information that might be around, for example to update it. @@ -214,10 +213,10 @@ AnalysisType &getAnalysis(Function &F); // Defined in PassAnalysisSupport.h template - AnalysisType &getAnalysisID(const StaticPassInfo *PI) const; + AnalysisType &getAnalysisID(const PassInfo *PI) const; template - AnalysisType &getAnalysisID(const StaticPassInfo *PI, Function &F); + AnalysisType &getAnalysisID(const PassInfo *PI, Function &F); }; Modified: llvm/trunk/include/llvm/PassAnalysisSupport.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/PassAnalysisSupport.h?rev=108818&r1=108817&r2=108818&view=diff ============================================================================== --- llvm/trunk/include/llvm/PassAnalysisSupport.h (original) +++ llvm/trunk/include/llvm/PassAnalysisSupport.h Tue Jul 20 03:26:15 2010 @@ -86,7 +86,7 @@ // linked in. Be careful about spelling! // AnalysisUsage &addPreserved(StringRef Arg) { - const StaticPassInfo *PI = Pass::lookupPassInfo(Arg); + const PassInfo *PI = Pass::lookupPassInfo(Arg); // If the pass exists, preserve it. Otherwise silently do nothing. if (PI) Preserved.push_back(PI); return *this; @@ -130,7 +130,7 @@ inline PMDataManager &getPMDataManager() { return PM; } // Find pass that is implementing PI. - Pass *findImplPass(const StaticPassInfo *PI) { + Pass *findImplPass(const PassInfo *PI) { Pass *ResultPass = 0; for (unsigned i = 0; i < AnalysisImpls.size() ; ++i) { if (AnalysisImpls[i].first == PI) { @@ -142,10 +142,10 @@ } // Find pass that is implementing PI. Initialize pass for Function F. - Pass *findImplPass(Pass *P, const StaticPassInfo *PI, Function &F); + Pass *findImplPass(Pass *P, const PassInfo *PI, Function &F); - void addAnalysisImplsPair(const StaticPassInfo *PI, Pass *P) { - std::pair pir = std::make_pair(PI,P); + void addAnalysisImplsPair(const PassInfo *PI, Pass *P) { + std::pair pir = std::make_pair(PI,P); AnalysisImpls.push_back(pir); } @@ -160,7 +160,7 @@ // AnalysisImpls - This keeps track of which passes implements the interfaces // that are required by the current pass (to implement getAnalysis()). - std::vector > AnalysisImpls; + std::vector > AnalysisImpls; private: // PassManager that is used to resolve analysis info @@ -179,7 +179,7 @@ AnalysisType *Pass::getAnalysisIfAvailable() const { assert(Resolver && "Pass not resident in a PassManager object!"); - const StaticPassInfo *PI = getClassPassInfo(); + const PassInfo *PI = getClassPassInfo(); if (PI == 0) return 0; Pass *ResultPass = Resolver->getAnalysisIfAvailable(PI, true); @@ -203,7 +203,7 @@ } template -AnalysisType &Pass::getAnalysisID(const StaticPassInfo *PI) const { +AnalysisType &Pass::getAnalysisID(const PassInfo *PI) const { assert(PI && "getAnalysis for unregistered pass!"); assert(Resolver&&"Pass has not been inserted into a PassManager object!"); // PI *must* appear in AnalysisImpls. Because the number of passes used @@ -233,7 +233,7 @@ } template -AnalysisType &Pass::getAnalysisID(const StaticPassInfo *PI, Function &F) { +AnalysisType &Pass::getAnalysisID(const PassInfo *PI, Function &F) { assert(PI && "getAnalysis for unregistered pass!"); assert(Resolver && "Pass has not been inserted into a PassManager object!"); // PI *must* appear in AnalysisImpls. Because the number of passes used Modified: llvm/trunk/include/llvm/PassManagers.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/PassManagers.h?rev=108818&r1=108817&r2=108818&view=diff ============================================================================== --- llvm/trunk/include/llvm/PassManagers.h (original) +++ llvm/trunk/include/llvm/PassManagers.h Tue Jul 20 03:26:15 2010 @@ -302,7 +302,7 @@ /// through getAnalysis interface. virtual void addLowerLevelRequiredPass(Pass *P, Pass *RequiredPass); - virtual Pass *getOnTheFlyPass(Pass *P, const StaticPassInfo *PI, Function &F); + virtual Pass *getOnTheFlyPass(Pass *P, const PassInfo *PI, Function &F); /// Initialize available analysis information. void initializeAnalysisInfo() { Modified: llvm/trunk/include/llvm/PassSupport.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/PassSupport.h?rev=108818&r1=108817&r2=108818&view=diff ============================================================================== --- llvm/trunk/include/llvm/PassSupport.h (original) +++ llvm/trunk/include/llvm/PassSupport.h Tue Jul 20 03:26:15 2010 @@ -22,7 +22,6 @@ #define LLVM_PASS_SUPPORT_H #include "Pass.h" -#include "llvm/Config/config.h" namespace llvm { @@ -34,24 +33,45 @@ /// getPassInfo() method. These objects are set up by the RegisterPass<> /// template, defined below. /// - -struct StaticPassInfo { +class PassInfo { +public: typedef Pass* (*NormalCtor_t)(); struct InterfaceInfo { - const StaticPassInfo *interface; + const PassInfo *interface; const InterfaceInfo *next; }; - const char *PassName; // Nice name for Pass - const char *PassArgument; // Command Line argument to run this pass - intptr_t PassID; - bool IsCFGOnlyPass; // Pass only looks at the CFG. - bool IsAnalysis; // True if an analysis pass. - bool IsAnalysisGroup; // True if an analysis group. - InterfaceInfo *ItfImpl;// Interfaces implemented by this pass +private: + const char *const PassName; // Nice name for Pass + const char *const PassArgument; // Command Line argument to run this pass + const intptr_t PassID; + const bool IsCFGOnlyPass; // Pass only looks at the CFG. + const bool IsAnalysis; // True if an analysis pass. + const bool IsAnalysisGroup; // True if an analysis group. + const InterfaceInfo *ItfImpl;// Interfaces implemented by this pass NormalCtor_t NormalCtor; - + +public: + /// PassInfo ctor - Do not call this directly, this should only be invoked + /// through RegisterPass. + PassInfo(const char *name, const char *arg, intptr_t pi, + NormalCtor_t normal = 0, + bool isCFGOnly = false, bool is_analysis = false) + : PassName(name), PassArgument(arg), PassID(pi), + IsCFGOnlyPass(isCFGOnly), + IsAnalysis(is_analysis), IsAnalysisGroup(false), NormalCtor(normal) { + registerPass(); + } + /// PassInfo ctor - Do not call this directly, this should only be invoked + /// through RegisterPass. This version is for use by analysis groups; it + /// does not auto-register the pass. + PassInfo(const char *name, intptr_t pi) + : PassName(name), PassArgument(""), PassID(pi), + IsCFGOnlyPass(false), + IsAnalysis(false), IsAnalysisGroup(true), NormalCtor(0) { + } + /// getPassName - Return the friendly name for the pass, never returns null /// const char *getPassName() const { return PassName; } @@ -70,7 +90,7 @@ bool isPassID(void *IDPtr) const { return PassID == (intptr_t)IDPtr; } - + /// isAnalysisGroup - Return true if this is an analysis group, not a normal /// pass. /// @@ -80,7 +100,7 @@ /// isCFGOnlyPass - return true if this pass only looks at the CFG for the /// function. bool isCFGOnlyPass() const { return IsCFGOnlyPass; } - + /// getNormalCtor - Return a pointer to a function, that when called, creates /// an instance of the pass and returns it. This pointer may be null if there /// is no default constructor for the pass. @@ -92,11 +112,14 @@ NormalCtor = Ctor; } + /// createPass() - Use this method to create an instance of this pass. + Pass *createPass() const; + /// addInterfaceImplemented - This method is called when this pass is /// registered as a member of an analysis group with the RegisterAnalysisGroup /// template. /// - void addInterfaceImplemented(const StaticPassInfo *ItfPI) { + void addInterfaceImplemented(const PassInfo *ItfPI) { InterfaceInfo *NewInfo = new InterfaceInfo(); NewInfo->interface = ItfPI; NewInfo->next = ItfImpl; @@ -110,39 +133,6 @@ return ItfImpl; } - /// createPass() - Use this method to create an instance of this pass. - Pass *createPass() const; -}; - -class PassInfo : public StaticPassInfo { -public: - /// PassInfo ctor - Do not call this directly, this should only be invoked - /// through RegisterPass. - PassInfo(const char *name, const char *arg, intptr_t pi, - NormalCtor_t normal = 0, - bool isCFGOnly = false, bool is_analysis = false) { - this->PassName = name; - this->PassArgument = arg; - this->PassID = pi; - this->IsCFGOnlyPass = isCFGOnly; - this->IsAnalysis = is_analysis; - this->IsAnalysisGroup = false; - this->NormalCtor = normal; - registerPass(); - } - /// PassInfo ctor - Do not call this directly, this should only be invoked - /// through RegisterPass. This version is for use by analysis groups; it - /// does not auto-register the pass. - PassInfo(const char *name, intptr_t pi) { - this->PassName = name; - this->PassArgument = ""; - this->PassID = pi; - this->IsCFGOnlyPass = false; - this->IsAnalysis = false; - this->IsAnalysisGroup = true; - this->NormalCtor = 0; - } - protected: void registerPass(); void unregisterPass(); @@ -250,7 +240,7 @@ /// Callback functions - These functions are invoked whenever a pass is loaded /// or removed from the current executable. /// - virtual void passRegistered(const StaticPassInfo *) {} + virtual void passRegistered(const PassInfo *) {} /// enumeratePasses - Iterate over the registered passes, calling the /// passEnumerate callback on each PassInfo object. @@ -260,7 +250,7 @@ /// passEnumerate - Callback function invoked when someone calls /// enumeratePasses on this PassRegistrationListener object. /// - virtual void passEnumerate(const StaticPassInfo *) {} + virtual void passEnumerate(const PassInfo *) {} }; Modified: llvm/trunk/include/llvm/Support/PassNameParser.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/PassNameParser.h?rev=108818&r1=108817&r2=108818&view=diff ============================================================================== --- llvm/trunk/include/llvm/Support/PassNameParser.h (original) +++ llvm/trunk/include/llvm/Support/PassNameParser.h Tue Jul 20 03:26:15 2010 @@ -55,11 +55,9 @@ // ignorablePassImpl - Can be overriden in subclasses to refine the list of // which passes we want to include. // - virtual bool ignorablePassImpl(const StaticPassInfo *P) const { - return false; - } + virtual bool ignorablePassImpl(const PassInfo *P) const { return false; } - inline bool ignorablePass(const StaticPassInfo *P) const { + inline bool ignorablePass(const PassInfo *P) const { // Ignore non-selectable and non-constructible passes! Ignore // non-optimizations. return P->getPassArgument() == 0 || *P->getPassArgument() == 0 || @@ -68,7 +66,7 @@ // Implement the PassRegistrationListener callbacks used to populate our map // - virtual void passRegistered(const StaticPassInfo *P) { + virtual void passRegistered(const PassInfo *P) { if (ignorablePass(P) || !Opt) return; if (findOption(P->getPassArgument()) != getNumOptions()) { errs() << "Two passes with the same argument (-" @@ -77,7 +75,7 @@ } addLiteralOption(P->getPassArgument(), P, P->getPassName()); } - virtual void passEnumerate(const StaticPassInfo *P) { passRegistered(P); } + virtual void passEnumerate(const PassInfo *P) { passRegistered(P); } // ValLessThan - Provide a sorting comparator for Values elements... typedef std::pairisPassID(&AliasAnalysis::ID)) return (AliasAnalysis*)this; return this; Modified: llvm/trunk/lib/Analysis/AliasDebugger.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/AliasDebugger.cpp?rev=108818&r1=108817&r2=108818&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/AliasDebugger.cpp (original) +++ llvm/trunk/lib/Analysis/AliasDebugger.cpp Tue Jul 20 03:26:15 2010 @@ -83,7 +83,7 @@ /// 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 StaticPassInfo *PI) { + virtual void *getAdjustedAnalysisPointer(const PassInfo *PI) { if (PI->isPassID(&AliasAnalysis::ID)) return (AliasAnalysis*)this; return this; Modified: llvm/trunk/lib/Analysis/BasicAliasAnalysis.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/BasicAliasAnalysis.cpp?rev=108818&r1=108817&r2=108818&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/BasicAliasAnalysis.cpp (original) +++ llvm/trunk/lib/Analysis/BasicAliasAnalysis.cpp Tue Jul 20 03:26:15 2010 @@ -172,7 +172,7 @@ /// 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 StaticPassInfo *PI) { + virtual void *getAdjustedAnalysisPointer(const PassInfo *PI) { if (PI->isPassID(&AliasAnalysis::ID)) return (AliasAnalysis*)this; return this; @@ -243,7 +243,7 @@ /// 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 StaticPassInfo *PI) { + virtual void *getAdjustedAnalysisPointer(const PassInfo *PI) { if (PI->isPassID(&AliasAnalysis::ID)) return (AliasAnalysis*)this; return this; Modified: llvm/trunk/lib/Analysis/IPA/CallGraph.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/IPA/CallGraph.cpp?rev=108818&r1=108817&r2=108818&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/IPA/CallGraph.cpp (original) +++ llvm/trunk/lib/Analysis/IPA/CallGraph.cpp Tue Jul 20 03:26:15 2010 @@ -86,7 +86,7 @@ /// 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 StaticPassInfo *PI) { + virtual void *getAdjustedAnalysisPointer(const PassInfo *PI) { if (PI->isPassID(&CallGraph::ID)) return (CallGraph*)this; return this; Modified: llvm/trunk/lib/Analysis/IPA/GlobalsModRef.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/IPA/GlobalsModRef.cpp?rev=108818&r1=108817&r2=108818&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/IPA/GlobalsModRef.cpp (original) +++ llvm/trunk/lib/Analysis/IPA/GlobalsModRef.cpp Tue Jul 20 03:26:15 2010 @@ -149,7 +149,7 @@ /// 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 StaticPassInfo *PI) { + virtual void *getAdjustedAnalysisPointer(const PassInfo *PI) { if (PI->isPassID(&AliasAnalysis::ID)) return (AliasAnalysis*)this; return this; Modified: llvm/trunk/lib/Analysis/ProfileEstimatorPass.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ProfileEstimatorPass.cpp?rev=108818&r1=108817&r2=108818&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/ProfileEstimatorPass.cpp (original) +++ llvm/trunk/lib/Analysis/ProfileEstimatorPass.cpp Tue Jul 20 03:26:15 2010 @@ -59,7 +59,7 @@ /// 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 StaticPassInfo *PI) { + virtual void *getAdjustedAnalysisPointer(const PassInfo *PI) { if (PI->isPassID(&ProfileInfo::ID)) return (ProfileInfo*)this; return this; Modified: llvm/trunk/lib/Analysis/ProfileInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ProfileInfo.cpp?rev=108818&r1=108817&r2=108818&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/ProfileInfo.cpp (original) +++ llvm/trunk/lib/Analysis/ProfileInfo.cpp Tue Jul 20 03:26:15 2010 @@ -1082,7 +1082,7 @@ /// 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 StaticPassInfo *PI) { + virtual void *getAdjustedAnalysisPointer(const PassInfo *PI) { if (PI->isPassID(&ProfileInfo::ID)) return (ProfileInfo*)this; return this; Modified: llvm/trunk/lib/Analysis/ProfileInfoLoaderPass.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ProfileInfoLoaderPass.cpp?rev=108818&r1=108817&r2=108818&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/ProfileInfoLoaderPass.cpp (original) +++ llvm/trunk/lib/Analysis/ProfileInfoLoaderPass.cpp Tue Jul 20 03:26:15 2010 @@ -67,7 +67,7 @@ /// 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 StaticPassInfo *PI) { + virtual void *getAdjustedAnalysisPointer(const PassInfo *PI) { if (PI->isPassID(&ProfileInfo::ID)) return (ProfileInfo*)this; return this; Modified: llvm/trunk/lib/Analysis/ScalarEvolutionAliasAnalysis.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ScalarEvolutionAliasAnalysis.cpp?rev=108818&r1=108817&r2=108818&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/ScalarEvolutionAliasAnalysis.cpp (original) +++ llvm/trunk/lib/Analysis/ScalarEvolutionAliasAnalysis.cpp Tue Jul 20 03:26:15 2010 @@ -40,7 +40,7 @@ /// 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 StaticPassInfo *PI) { + virtual void *getAdjustedAnalysisPointer(const PassInfo *PI) { if (PI->isPassID(&AliasAnalysis::ID)) return (AliasAnalysis*)this; return this; Modified: llvm/trunk/lib/VMCore/Pass.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Pass.cpp?rev=108818&r1=108817&r2=108818&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/Pass.cpp (original) +++ llvm/trunk/lib/VMCore/Pass.cpp Tue Jul 20 03:26:15 2010 @@ -75,7 +75,7 @@ /// Registration templates, but can be overloaded directly. /// const char *Pass::getPassName() const { - if (const StaticPassInfo *PI = getPassInfo()) + if (const PassInfo *PI = getPassInfo()) return PI->getPassName(); return "Unnamed pass: implement Pass::getPassName()"; } @@ -101,7 +101,7 @@ // By default, don't do anything. } -void *Pass::getAdjustedAnalysisPointer(const StaticPassInfo *) { +void *Pass::getAdjustedAnalysisPointer(const PassInfo *) { return this; } @@ -243,35 +243,35 @@ /// PassInfoMap - Keep track of the passinfo object for each registered llvm /// pass. - typedef std::map MapType; + typedef std::map MapType; MapType PassInfoMap; - typedef StringMap StringMapType; + typedef StringMap StringMapType; StringMapType PassInfoStringMap; /// AnalysisGroupInfo - Keep track of information for each analysis group. struct AnalysisGroupInfo { - std::set Implementations; + std::set Implementations; }; /// AnalysisGroupInfoMap - Information for each analysis group. - std::map AnalysisGroupInfoMap; + std::map AnalysisGroupInfoMap; public: - const StaticPassInfo *GetPassInfo(intptr_t TI) const { + const PassInfo *GetPassInfo(intptr_t TI) const { sys::SmartScopedLock Guard(Lock); MapType::const_iterator I = PassInfoMap.find(TI); return I != PassInfoMap.end() ? I->second : 0; } - const StaticPassInfo *GetPassInfo(StringRef Arg) const { + const PassInfo *GetPassInfo(StringRef Arg) const { sys::SmartScopedLock Guard(Lock); StringMapType::const_iterator I = PassInfoStringMap.find(Arg); return I != PassInfoStringMap.end() ? I->second : 0; } - void RegisterPass(const StaticPassInfo &PI) { + void RegisterPass(const PassInfo &PI) { sys::SmartScopedLock Guard(Lock); bool Inserted = PassInfoMap.insert(std::make_pair(PI.getTypeInfo(),&PI)).second; @@ -279,7 +279,7 @@ PassInfoStringMap[PI.getPassArgument()] = &PI; } - void UnregisterPass(const StaticPassInfo &PI) { + void UnregisterPass(const PassInfo &PI) { sys::SmartScopedLock Guard(Lock); MapType::iterator I = PassInfoMap.find(PI.getTypeInfo()); assert(I != PassInfoMap.end() && "Pass registered but not in map!"); @@ -298,8 +298,8 @@ /// Analysis Group Mechanisms. - void RegisterAnalysisGroup(StaticPassInfo *InterfaceInfo, - const StaticPassInfo *ImplementationInfo, + void RegisterAnalysisGroup(PassInfo *InterfaceInfo, + const PassInfo *ImplementationInfo, bool isDefault) { sys::SmartScopedLock Guard(Lock); AnalysisGroupInfo &AGI = AnalysisGroupInfoMap[InterfaceInfo]; @@ -363,15 +363,15 @@ // getPassInfo - Return the PassInfo data structure that corresponds to this // pass... -const StaticPassInfo *Pass::getPassInfo() const { +const PassInfo *Pass::getPassInfo() const { return lookupPassInfo(PassID); } -const StaticPassInfo *Pass::lookupPassInfo(intptr_t TI) { +const PassInfo *Pass::lookupPassInfo(intptr_t TI) { return getPassRegistrar()->GetPassInfo(TI); } -const StaticPassInfo *Pass::lookupPassInfo(StringRef Arg) { +const PassInfo *Pass::lookupPassInfo(StringRef Arg) { return getPassRegistrar()->GetPassInfo(Arg); } @@ -390,7 +390,7 @@ getPassRegistrar()->UnregisterPass(*this); } -Pass *StaticPassInfo::createPass() const { +Pass *PassInfo::createPass() const { assert((!isAnalysisGroup() || NormalCtor) && "No default implementation found for analysis group!"); assert(NormalCtor && @@ -408,8 +408,8 @@ intptr_t PassID, bool isDefault) : PassInfo(Name, InterfaceID) { - StaticPassInfo *InterfaceInfo = - const_cast(Pass::lookupPassInfo(InterfaceID)); + PassInfo *InterfaceInfo = + const_cast(Pass::lookupPassInfo(InterfaceID)); if (InterfaceInfo == 0) { // First reference to Interface, register it now. registerPass(); @@ -419,13 +419,13 @@ "Trying to join an analysis group that is a normal pass!"); if (PassID) { - const StaticPassInfo *ImplementationInfo = Pass::lookupPassInfo(PassID); + const PassInfo *ImplementationInfo = Pass::lookupPassInfo(PassID); assert(ImplementationInfo && "Must register pass before adding to AnalysisGroup!"); // Make sure we keep track of the fact that the implementation implements // the interface. - StaticPassInfo *IIPI = const_cast(ImplementationInfo); + PassInfo *IIPI = const_cast(ImplementationInfo); IIPI->addInterfaceImplemented(InterfaceInfo); getPassRegistrar()->RegisterAnalysisGroup(InterfaceInfo, IIPI, isDefault); @@ -479,7 +479,7 @@ VectorType &CFGOnlyList; GetCFGOnlyPasses(VectorType &L) : CFGOnlyList(L) {} - void passEnumerate(const StaticPassInfo *P) { + void passEnumerate(const PassInfo *P) { if (P->isCFGOnlyPass()) CFGOnlyList.push_back(P); } Modified: llvm/trunk/lib/VMCore/PassManager.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/PassManager.cpp?rev=108818&r1=108817&r2=108818&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/PassManager.cpp (original) +++ llvm/trunk/lib/VMCore/PassManager.cpp Tue Jul 20 03:26:15 2010 @@ -332,8 +332,7 @@ /// Return function pass corresponding to PassInfo PI, that is /// required by module pass MP. Instantiate analysis pass, by using /// its runOnFunction() for function F. - virtual Pass* getOnTheFlyPass(Pass *MP, const StaticPassInfo *PI, - Function &F); + virtual Pass* getOnTheFlyPass(Pass *MP, const PassInfo *PI, Function &F); virtual const char *getPassName() const { return "Module Pass Manager"; @@ -633,7 +632,7 @@ for (SmallVector::iterator I = ImmutablePasses.begin(), E = ImmutablePasses.end(); P == NULL && I != E; ++I) { - const StaticPassInfo *PI = (*I)->getPassInfo(); + const PassInfo *PI = (*I)->getPassInfo(); if (PI == AID) P = *I; @@ -729,7 +728,7 @@ /// Augement AvailableAnalysis by adding analysis made available by pass P. void PMDataManager::recordAvailableAnalysis(Pass *P) { - const StaticPassInfo *PI = P->getPassInfo(); + const PassInfo *PI = P->getPassInfo(); if (PI == 0) return; AvailableAnalysis[PI] = P; @@ -868,7 +867,7 @@ P->releaseMemory(); } - if (const StaticPassInfo *PI = P->getPassInfo()) { + if (const PassInfo *PI = P->getPassInfo()) { // Remove the pass itself (if it is not already removed). AvailableAnalysis.erase(PI); @@ -1052,7 +1051,7 @@ if (PMDataManager *PMD = (*I)->getAsPMDataManager()) PMD->dumpPassArguments(); else - if (const StaticPassInfo *PI = (*I)->getPassInfo()) + if (const PassInfo *PI = (*I)->getPassInfo()) if (!PI->isAnalysisGroup()) dbgs() << " -" << PI->getPassArgument(); } @@ -1155,8 +1154,7 @@ llvm_unreachable("Unable to schedule pass"); } -Pass *PMDataManager::getOnTheFlyPass(Pass *P, const StaticPassInfo *PI, - Function &F) { +Pass *PMDataManager::getOnTheFlyPass(Pass *P, const PassInfo *PI, Function &F) { assert(0 && "Unable to find on the fly pass"); return NULL; } @@ -1175,7 +1173,7 @@ return PM.findAnalysisPass(ID, dir); } -Pass *AnalysisResolver::findImplPass(Pass *P, const StaticPassInfo *AnalysisPI, +Pass *AnalysisResolver::findImplPass(Pass *P, const PassInfo *AnalysisPI, Function &F) { return PM.getOnTheFlyPass(P, AnalysisPI, F); } @@ -1570,8 +1568,7 @@ /// Return function pass corresponding to PassInfo PI, that is /// required by module pass MP. Instantiate analysis pass, by using /// its runOnFunction() for function F. -Pass* MPPassManager::getOnTheFlyPass(Pass *MP, const StaticPassInfo *PI, - Function &F){ +Pass* MPPassManager::getOnTheFlyPass(Pass *MP, const PassInfo *PI, Function &F){ FunctionPassManagerImpl *FPP = OnTheFlyManagers[MP]; assert(FPP && "Unable to find on the fly pass"); Modified: llvm/trunk/tools/bugpoint/BugDriver.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/bugpoint/BugDriver.cpp?rev=108818&r1=108817&r2=108818&view=diff ============================================================================== --- llvm/trunk/tools/bugpoint/BugDriver.cpp (original) +++ llvm/trunk/tools/bugpoint/BugDriver.cpp Tue Jul 20 03:26:15 2010 @@ -56,8 +56,7 @@ /// getPassesString - Turn a list of passes into a string which indicates the /// command line options that must be passed to add the passes. /// -std::string -llvm::getPassesString(const std::vector &Passes) { +std::string llvm::getPassesString(const std::vector &Passes) { std::string Result; for (unsigned i = 0, e = Passes.size(); i != e; ++i) { if (i) Result += " "; Modified: llvm/trunk/tools/bugpoint/BugDriver.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/bugpoint/BugDriver.h?rev=108818&r1=108817&r2=108818&view=diff ============================================================================== --- llvm/trunk/tools/bugpoint/BugDriver.h (original) +++ llvm/trunk/tools/bugpoint/BugDriver.h Tue Jul 20 03:26:15 2010 @@ -23,7 +23,7 @@ namespace llvm { class Value; -class StaticPassInfo; +class PassInfo; class Module; class GlobalVariable; class Function; @@ -47,7 +47,7 @@ const char *ToolName; // argv[0] of bugpoint std::string ReferenceOutputFile; // Name of `good' output file Module *Program; // The raw program, linked together - std::vector PassesToRun; + std::vector PassesToRun; AbstractInterpreter *Interpreter; // How to run the program AbstractInterpreter *SafeInterpreter; // To generate reference output, etc. GCC *gcc; @@ -77,10 +77,10 @@ bool addSources(const std::vector &FileNames); template void addPasses(It I, It E) { PassesToRun.insert(PassesToRun.end(), I, E); } - void setPassesToRun(const std::vector &PTR) { + void setPassesToRun(const std::vector &PTR) { PassesToRun = PTR; } - const std::vector &getPassesToRun() const { + const std::vector &getPassesToRun() const { return PassesToRun; } @@ -112,7 +112,7 @@ /// ReferenceOutput contains the filename of the file containing the output we /// are to match. /// - bool debugPassMiscompilation(const StaticPassInfo *ThePass, + bool debugPassMiscompilation(const PassInfo *ThePass, const std::string &ReferenceOutput); /// compileSharedObject - This method creates a SharedObject from a given @@ -243,8 +243,7 @@ /// failure. If AutoDebugCrashes is set to true, then bugpoint will /// automatically attempt to track down a crashing pass if one exists, and /// this method will never return null. - Module *runPassesOn(Module *M, - const std::vector &Passes, + Module *runPassesOn(Module *M, const std::vector &Passes, bool AutoDebugCrashes = false, unsigned NumExtraArgs = 0, const char * const *ExtraArgs = NULL); @@ -257,7 +256,7 @@ /// or failed, unless Quiet is set. ExtraArgs specifies additional arguments /// to pass to the child bugpoint instance. /// - bool runPasses(const std::vector &PassesToRun, + bool runPasses(const std::vector &PassesToRun, std::string &OutputFilename, bool DeleteOutput = false, bool Quiet = false, unsigned NumExtraArgs = 0, const char * const *ExtraArgs = NULL) const; @@ -269,7 +268,7 @@ /// If the passes did not compile correctly, output the command required to /// recreate the failure. This returns true if a compiler error is found. /// - bool runManyPasses(const std::vector &AllPasses, + bool runManyPasses(const std::vector &AllPasses, std::string &ErrMsg); /// writeProgramToFile - This writes the current "Program" to the named @@ -282,14 +281,14 @@ /// false indicating whether or not the optimizer crashed on the specified /// input (true = crashed). /// - bool runPasses(const std::vector &PassesToRun, + bool runPasses(const std::vector &PassesToRun, bool DeleteOutput = true) const { std::string Filename; return runPasses(PassesToRun, Filename, DeleteOutput); } /// runAsChild - The actual "runPasses" guts that runs in a child process. - int runPassesAsChild(const std::vector &PassesToRun); + int runPassesAsChild(const std::vector &PassesToRun); /// initializeExecutionEnvironment - This method is used to set up the /// environment for executing LLVM programs. @@ -307,7 +306,7 @@ /// getPassesString - Turn a list of passes into a string which indicates the /// command line options that must be passed to add the passes. /// -std::string getPassesString(const std::vector &Passes); +std::string getPassesString(const std::vector &Passes); /// PrintFunctionList - prints out list of problematic functions /// Modified: llvm/trunk/tools/bugpoint/CrashDebugger.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/bugpoint/CrashDebugger.cpp?rev=108818&r1=108817&r2=108818&view=diff ============================================================================== --- llvm/trunk/tools/bugpoint/CrashDebugger.cpp (original) +++ llvm/trunk/tools/bugpoint/CrashDebugger.cpp Tue Jul 20 03:26:15 2010 @@ -43,7 +43,7 @@ } namespace llvm { - class ReducePassList : public ListReducer { + class ReducePassList : public ListReducer { BugDriver &BD; public: ReducePassList(BugDriver &bd) : BD(bd) {} @@ -52,15 +52,15 @@ // running the "Kept" passes fail when run on the output of the "removed" // passes. If we return true, we update the current module of bugpoint. // - virtual TestResult doTest(std::vector &Removed, - std::vector &Kept, + virtual TestResult doTest(std::vector &Removed, + std::vector &Kept, std::string &Error); }; } ReducePassList::TestResult -ReducePassList::doTest(std::vector &Prefix, - std::vector &Suffix, +ReducePassList::doTest(std::vector &Prefix, + std::vector &Suffix, std::string &Error) { sys::Path PrefixOutput; Module *OrigProgram = 0; Modified: llvm/trunk/tools/bugpoint/ExtractFunction.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/bugpoint/ExtractFunction.cpp?rev=108818&r1=108817&r2=108818&view=diff ============================================================================== --- llvm/trunk/tools/bugpoint/ExtractFunction.cpp (original) +++ llvm/trunk/tools/bugpoint/ExtractFunction.cpp Tue Jul 20 03:26:15 2010 @@ -99,8 +99,8 @@ return Result; } -static const StaticPassInfo *getPI(Pass *P) { - const StaticPassInfo *PI = P->getPassInfo(); +static const PassInfo *getPI(Pass *P) { + const PassInfo *PI = P->getPassInfo(); delete P; return PI; } @@ -114,7 +114,7 @@ for (Module::iterator I = M->begin(), E = M->end(); I != E; ++I) I->setLinkage(GlobalValue::ExternalLinkage); - std::vector CleanupPasses; + std::vector CleanupPasses; CleanupPasses.push_back(getPI(createGlobalDCEPass())); if (MayModifySemantics) @@ -138,7 +138,7 @@ /// function. This returns null if there are no extractable loops in the /// program or if the loop extractor crashes. Module *BugDriver::ExtractLoop(Module *M) { - std::vector LoopExtractPasses; + std::vector LoopExtractPasses; LoopExtractPasses.push_back(getPI(createSingleLoopExtractorPass())); Module *NewM = runPassesOn(M, LoopExtractPasses); @@ -359,7 +359,7 @@ std::string uniqueFN = "--extract-blocks-file=" + uniqueFilename.str(); const char *ExtraArg = uniqueFN.c_str(); - std::vector PI; + std::vector PI; std::vector EmptyBBs; // This parameter is ignored. PI.push_back(getPI(createBlockExtractorPass(EmptyBBs))); Module *Ret = runPassesOn(M, PI, false, 1, &ExtraArg); Modified: llvm/trunk/tools/bugpoint/FindBugs.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/bugpoint/FindBugs.cpp?rev=108818&r1=108817&r2=108818&view=diff ============================================================================== --- llvm/trunk/tools/bugpoint/FindBugs.cpp (original) +++ llvm/trunk/tools/bugpoint/FindBugs.cpp Tue Jul 20 03:26:15 2010 @@ -29,8 +29,7 @@ /// If the passes did not compile correctly, output the command required to /// recreate the failure. This returns true if a compiler error is found. /// -bool -BugDriver::runManyPasses(const std::vector &AllPasses, +bool BugDriver::runManyPasses(const std::vector &AllPasses, std::string &ErrMsg) { setPassesToRun(AllPasses); outs() << "Starting bug finding procedure...\n\n"; Modified: llvm/trunk/tools/bugpoint/Miscompilation.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/bugpoint/Miscompilation.cpp?rev=108818&r1=108817&r2=108818&view=diff ============================================================================== --- llvm/trunk/tools/bugpoint/Miscompilation.cpp (original) +++ llvm/trunk/tools/bugpoint/Miscompilation.cpp Tue Jul 20 03:26:15 2010 @@ -43,13 +43,13 @@ cl::desc("Don't extract blocks when searching for miscompilations"), cl::init(false)); - class ReduceMiscompilingPasses : public ListReducer { + class ReduceMiscompilingPasses : public ListReducer { BugDriver &BD; public: ReduceMiscompilingPasses(BugDriver &bd) : BD(bd) {} - virtual TestResult doTest(std::vector &Prefix, - std::vector &Suffix, + virtual TestResult doTest(std::vector &Prefix, + std::vector &Suffix, std::string &Error); }; } @@ -58,8 +58,8 @@ /// group, see if they still break the program. /// ReduceMiscompilingPasses::TestResult -ReduceMiscompilingPasses::doTest(std::vector &Prefix, - std::vector &Suffix, +ReduceMiscompilingPasses::doTest(std::vector &Prefix, + std::vector &Suffix, std::string &Error) { // First, run the program with just the Suffix passes. If it is still broken // with JUST the kept passes, discard the prefix passes. Modified: llvm/trunk/tools/bugpoint/OptimizerDriver.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/bugpoint/OptimizerDriver.cpp?rev=108818&r1=108817&r2=108818&view=diff ============================================================================== --- llvm/trunk/tools/bugpoint/OptimizerDriver.cpp (original) +++ llvm/trunk/tools/bugpoint/OptimizerDriver.cpp Tue Jul 20 03:26:15 2010 @@ -83,7 +83,7 @@ outs() << getPassesString(PassesToRun) << "\n"; } -int BugDriver::runPassesAsChild(const std::vector &Passes) { +int BugDriver::runPassesAsChild(const std::vector &Passes) { std::string ErrInfo; raw_fd_ostream OutFile(ChildOutput.c_str(), ErrInfo, raw_fd_ostream::F_Binary); @@ -124,7 +124,7 @@ /// outs() a single line message indicating whether compilation was successful /// or failed. /// -bool BugDriver::runPasses(const std::vector &Passes, +bool BugDriver::runPasses(const std::vector &Passes, std::string &OutputFilename, bool DeleteOutput, bool Quiet, unsigned NumExtraArgs, const char * const *ExtraArgs) const { @@ -178,7 +178,7 @@ pass_args.push_back( std::string("-load")); pass_args.push_back( PluginLoader::getPlugin(i)); } - for (std::vector::const_iterator I = Passes.begin(), + for (std::vector::const_iterator I = Passes.begin(), E = Passes.end(); I != E; ++I ) pass_args.push_back( std::string("-") + (*I)->getPassArgument() ); for (std::vector::const_iterator I = pass_args.begin(), @@ -235,7 +235,7 @@ /// module, returning the transformed module on success, or a null pointer on /// failure. Module *BugDriver::runPassesOn(Module *M, - const std::vector &Passes, + const std::vector &Passes, bool AutoDebugCrashes, unsigned NumExtraArgs, const char * const *ExtraArgs) { Module *OldProgram = swapProgramIn(M); Modified: llvm/trunk/tools/bugpoint/bugpoint.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/bugpoint/bugpoint.cpp?rev=108818&r1=108817&r2=108818&view=diff ============================================================================== --- llvm/trunk/tools/bugpoint/bugpoint.cpp (original) +++ llvm/trunk/tools/bugpoint/bugpoint.cpp Tue Jul 20 03:26:15 2010 @@ -61,7 +61,7 @@ // The AnalysesList is automatically populated with registered Passes by the // PassNameParser. // -static cl::list +static cl::list PassList(cl::desc("Passes available:"), cl::ZeroOrMore); static cl::opt @@ -90,7 +90,7 @@ AddToDriver(BugDriver &_D) : D(_D) {} virtual void add(Pass *P) { - const StaticPassInfo *PI = P->getPassInfo(); + const PassInfo *PI = P->getPassInfo(); D.addPasses(&PI, &PI + 1); } }; From bruno.cardoso at gmail.com Tue Jul 20 03:37:04 2010 From: bruno.cardoso at gmail.com (Bruno Cardoso Lopes) Date: Tue, 20 Jul 2010 08:37:04 -0000 Subject: [llvm-commits] [llvm] r108820 - in /llvm/trunk: lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp lib/Target/Mips/MipsISelLowering.cpp test/CodeGen/Mips/2010-07-20-Switch.ll Message-ID: <20100720083704.C9F782A6C12C@llvm.org> Author: bruno Date: Tue Jul 20 03:37:04 2010 New Revision: 108820 URL: http://llvm.org/viewvc/llvm-project?rev=108820&view=rev Log: Fix PR7174, a couple o Mips fixes: - Fix a typo for PIC check during jmp table lowering - Also fix the "first jump table basic block is not considered only reachable by fall through" problem, use this ad-hoc solution until I come up with something better. Patch by stetorvs at gmail.com Added: llvm/trunk/test/CodeGen/Mips/2010-07-20-Switch.ll Modified: llvm/trunk/lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp Modified: llvm/trunk/lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp?rev=108820&r1=108819&r2=108820&view=diff ============================================================================== --- llvm/trunk/lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp Tue Jul 20 03:37:04 2010 @@ -18,6 +18,8 @@ #include "MipsInstrInfo.h" #include "MipsTargetMachine.h" #include "MipsMachineFunction.h" +#include "llvm/BasicBlock.h" +#include "llvm/Instructions.h" #include "llvm/CodeGen/AsmPrinter.h" #include "llvm/CodeGen/MachineFunctionPass.h" #include "llvm/CodeGen/MachineConstantPool.h" @@ -75,6 +77,7 @@ } virtual void EmitFunctionBodyStart(); virtual void EmitFunctionBodyEnd(); + virtual bool isBlockOnlyReachableByFallthrough(const MachineBasicBlock *MBB) const; static const char *getRegisterName(unsigned RegNo); virtual void EmitFunctionEntryLabel(); @@ -227,6 +230,23 @@ } +/// isBlockOnlyReachableByFallthough - Return true if the basic block has +/// exactly one predecessor and the control transfer mechanism between +/// the predecessor and this block is a fall-through. +bool MipsAsmPrinter::isBlockOnlyReachableByFallthrough(const MachineBasicBlock *MBB) + const { + // The predecessor has to be immediately before this block. + const MachineBasicBlock *Pred = *MBB->pred_begin(); + + // If the predecessor is a switch statement, assume a jump table + // implementation, so it is not a fall through. + if (const BasicBlock *bb = Pred->getBasicBlock()) + if (isa(bb->getTerminator())) + return false; + + return AsmPrinter::isBlockOnlyReachableByFallthrough(MBB); +} + // Print out an operand for an inline asm expression. bool MipsAsmPrinter::PrintAsmOperand(const MachineInstr *MI, unsigned OpNo, unsigned AsmVariant,const char *ExtraCode, Modified: llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp?rev=108820&r1=108819&r2=108820&view=diff ============================================================================== --- llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp (original) +++ llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp Tue Jul 20 03:37:04 2010 @@ -542,7 +542,7 @@ SDValue JTI = DAG.getTargetJumpTable(JT->getIndex(), PtrVT, OpFlag); - if (IsPIC) { + if (!IsPIC) { SDValue Ops[] = { JTI }; HiPart = DAG.getNode(MipsISD::Hi, dl, DAG.getVTList(MVT::i32), Ops, 1); } else // Emit Load from Global Pointer Added: llvm/trunk/test/CodeGen/Mips/2010-07-20-Switch.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Mips/2010-07-20-Switch.ll?rev=108820&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/Mips/2010-07-20-Switch.ll (added) +++ llvm/trunk/test/CodeGen/Mips/2010-07-20-Switch.ll Tue Jul 20 03:37:04 2010 @@ -0,0 +1,33 @@ +; RUN: llc < %s -march=mips -relocation-model=static | FileCheck %s + +define i32 @main() nounwind readnone { +entry: + %x = alloca i32, align 4 ; [#uses=2] + volatile store i32 2, i32* %x, align 4 + %0 = volatile load i32* %x, align 4 ; [#uses=1] +; CHECK: lui $3, %hi($JTI0_0) +; CHECK: sll $2, $2, 2 +; CHECK: addiu $3, $3, %lo($JTI0_0) + switch i32 %0, label %bb4 [ + i32 0, label %bb5 + i32 1, label %bb1 + i32 2, label %bb2 + i32 3, label %bb3 + ] + +bb1: ; preds = %entry + ret i32 2 + +; CHECK: $BB0_2 +bb2: ; preds = %entry + ret i32 0 + +bb3: ; preds = %entry + ret i32 3 + +bb4: ; preds = %entry + ret i32 4 + +bb5: ; preds = %entry + ret i32 1 +} From bruno.cardoso at gmail.com Tue Jul 20 03:44:20 2010 From: bruno.cardoso at gmail.com (Bruno Cardoso Lopes) Date: Tue, 20 Jul 2010 08:44:20 -0000 Subject: [llvm-commits] [llvm] r108821 - /llvm/trunk/Makefile.rules Message-ID: <20100720084420.A1ACD2A6C12C@llvm.org> Author: bruno Date: Tue Jul 20 03:44:20 2010 New Revision: 108821 URL: http://llvm.org/viewvc/llvm-project?rev=108821&view=rev Log: Enable LLVM to compile on Mips. Fix PR5828 Modified: llvm/trunk/Makefile.rules Modified: llvm/trunk/Makefile.rules URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/Makefile.rules?rev=108821&r1=108820&r2=108821&view=diff ============================================================================== --- llvm/trunk/Makefile.rules (original) +++ llvm/trunk/Makefile.rules Tue Jul 20 03:44:20 2010 @@ -1339,9 +1339,11 @@ endif ifeq ($(HOST_OS), $(filter $(HOST_OS), Linux NetBSD FreeBSD)) +ifneq ($(ARCH), Mips) LD.Flags += -Wl,--version-script=$(LLVM_SRC_ROOT)/autoconf/ExportMap.map endif endif +endif #--------------------------------------------------------- # Tool Version Info Support From lhames at gmail.com Tue Jul 20 04:13:29 2010 From: lhames at gmail.com (Lang Hames) Date: Tue, 20 Jul 2010 09:13:29 -0000 Subject: [llvm-commits] [llvm] r108822 - in /llvm/trunk/lib/CodeGen: RenderMachineFunction.cpp RenderMachineFunction.h Message-ID: <20100720091329.DA1AD2A6C12C@llvm.org> Author: lhames Date: Tue Jul 20 04:13:29 2010 New Revision: 108822 URL: http://llvm.org/viewvc/llvm-project?rev=108822&view=rev Log: Added support for turning HTML indentation on and off (indentation off by default). Reduces output file size ~20% on my test cases. Modified: llvm/trunk/lib/CodeGen/RenderMachineFunction.cpp llvm/trunk/lib/CodeGen/RenderMachineFunction.h Modified: llvm/trunk/lib/CodeGen/RenderMachineFunction.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RenderMachineFunction.cpp?rev=108822&r1=108821&r2=108822&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/RenderMachineFunction.cpp (original) +++ llvm/trunk/lib/CodeGen/RenderMachineFunction.cpp Tue Jul 20 04:13:29 2010 @@ -66,6 +66,12 @@ cl::desc("Use SVG for vertical text."), cl::init(true), cl::Hidden); +static cl::opt +prettyHTML("rmf-pretty-html", + cl::desc("Pretty print HTML. For debugging the renderer only.."), + cl::init(false), cl::Hidden); + + namespace llvm { bool MFRenderingOptions::renderingOptionsProcessed; @@ -493,6 +499,25 @@ // ---------- MachineFunctionRenderer implementation ---------- + template + void RenderMachineFunction::Spacer::print(OStream &os) const { + if (!prettyHTML) + return; + for (unsigned i = 0; i < ns; ++i) { + os << " "; + } + } + + RenderMachineFunction::Spacer RenderMachineFunction::s(unsigned ns) const { + return Spacer(ns); + } + + template + OStream& operator<<(OStream &os, const RenderMachineFunction::Spacer &s) { + s.print(os); + return os; + } + template std::string RenderMachineFunction::escapeChars(Iterator sBegin, Iterator sEnd) const { std::string r; @@ -558,22 +583,23 @@ } template - void RenderMachineFunction::renderVertical(const std::string &indent, + void RenderMachineFunction::renderVertical(const Spacer &indent, OStream &os, const T &t) const { if (ro.fancyVerticals()) { os << indent << "\n" - << indent << " " << t << "\n" - << indent << " \">\n" + << indent + s(2) << "class=\"obj\"\n" + << indent + s(2) << "type=\"image/svg+xml\"\n" + << indent + s(2) << "width=\"14px\"\n" + << indent + s(2) << "height=\"55px\"\n" + << indent + s(2) << "data=\"data:image/svg+xml,\n" + << indent + s(4) << "\n" + << indent + s(6) << "" << t << "\n" + << indent + s(4) << "\">\n" << indent << "\n"; } else { std::ostringstream oss; @@ -583,36 +609,36 @@ os << indent; for (std::string::iterator tStrItr = tStr.begin(), tStrEnd = tStr.end(); tStrItr != tStrEnd; ++tStrItr) { - os << *tStrItr << "
"; + os << *tStrItr << "
"; } os << "\n"; } } template - void RenderMachineFunction::insertCSS(const std::string &indent, + void RenderMachineFunction::insertCSS(const Spacer &indent, OStream &os) const { os << indent << "\n"; } template void RenderMachineFunction::renderFunctionSummary( - const std::string &indent, OStream &os, + const Spacer &indent, OStream &os, const char * const renderContextStr) const { os << indent << "

Function: " << mf->getFunction()->getName() << "

\n" @@ -622,40 +648,40 @@ template void RenderMachineFunction::renderPressureTableLegend( - const std::string &indent, + const Spacer &indent, OStream &os) const { os << indent << "

Rendering Pressure Legend:

\n" << indent << "\n" - << indent << " \n" - << indent << " " + << indent + s(2) << "\n" + << indent + s(4) << "" "\n" - << indent << " \n" - << indent << " \n" - << indent << " " - " " - " \n" - << indent << " \n" - << indent << " \n" - << indent << " " - " " - " \n" - << indent << " \n" - << indent << " \n" - << indent << " " - " " - " \n" - << indent << " \n" + << indent + s(2) << "\n" + << indent + s(2) << "\n" + << indent + s(4) << "" + "" + "\n" + << indent + s(2) << "\n" + << indent + s(2) << "\n" + << indent + s(4) << "" + "" + "\n" + << indent + s(2) << "\n" + << indent + s(2) << "\n" + << indent + s(4) << "" + "" + "\n" + << indent + s(2) << "\n" << indent << "
PressureDescription
PressureDescriptionAppearance
No PressureNo physical registers of this class requested.  
Low PressureSufficient physical registers to meet demand.  
High PressurePotentially insufficient physical registers to meet demand.  
No PressureNo physical registers of this class requested.  
Low PressureSufficient physical registers to meet demand.  
High PressurePotentially insufficient physical registers to meet demand.  
\n"; } template - void RenderMachineFunction::renderCodeTablePlusPI(const std::string & indent, + void RenderMachineFunction::renderCodeTablePlusPI(const Spacer &indent, OStream &os) const { os << indent << "\n" - << indent << " \n" - << indent << " \n" - << indent << " \n"; + << indent + s(2) << "\n" + << indent + s(4) << "\n" + << indent + s(4) << "\n"; // Header row: @@ -665,15 +691,15 @@ rcEnd = ro.regClasses().end(); rcItr != rcEnd; ++rcItr) { const TargetRegisterClass *trc = *rcItr; - os << indent << " \n"; + os << indent + s(4) << "\n"; } } // FIXME: Is there a nicer way to insert space between columns in HTML? if (!ro.regClasses().empty() && !ro.intervals().empty()) - os << indent << " \n"; + os << indent + s(4) << "\n"; if (!ro.intervals().empty()) { for (MFRenderingOptions::IntervalSet::const_iterator @@ -682,13 +708,13 @@ liItr != liEnd; ++liItr) { const LiveInterval *li = *liItr; - os << indent << " \n"; + os << indent + s(4) << "\n"; } } - os << indent << " \n"; + os << indent + s(2) << "\n"; MachineInstr *mi = 0; @@ -696,7 +722,7 @@ for (SlotIndex i = sis->getZeroIndex(); i != sis->getLastIndex(); i = i.getNextSlot()) { - os << indent << " \n"; + os << indent + s(2) << "\n"; if (i.getSlot() == SlotIndex::LOAD) { MachineBasicBlock *mbb = sis->getMBBFromIndex(i); @@ -704,19 +730,18 @@ if (i == sis->getMBBStartIdx(mbb) || mi != 0 || ro.renderEmptyIndexes()) { - os << indent << " \n" - << indent << " \n" + << indent + s(4) << "\n"; + os << indent + s(4) << "\n"; } else { i = i.getStoreIndex(); // <- Will be incremented to the next index. continue; @@ -730,7 +755,7 @@ rcItr != rcEnd; ++rcItr) { const TargetRegisterClass *trc = *rcItr; - os << indent << " \n"; + os << indent + s(4) << "\n"; if (!ro.intervals().empty()) { for (MFRenderingOptions::IntervalSet::const_iterator @@ -754,7 +779,7 @@ liEnd = ro.intervals().end(); liItr != liEnd; ++liItr) { const LiveInterval *li = *liItr; - os << indent << " \n"; } } - os << indent << " \n"; + os << indent + s(2) << "\n"; } os << indent << "
indexinstr
indexinstr\n"; - renderVertical(indent + " ", os, trc->getName()); - os << indent << " \n"; + renderVertical(indent + s(6), os, trc->getName()); + os << indent + s(4) << "    \n"; - renderVertical(indent + " ", os, li->reg); - os << indent << " \n"; + renderVertical(indent + s(6), os, li->reg); + os << indent + s(4) << "
" << i << " \n"; + os << indent + s(4) << "" << i << " \n"; if (i == sis->getMBBStartIdx(mbb)) { - os << indent << " BB#" << mbb->getNumber() << ": \n"; + os << indent + s(6) << "BB#" << mbb->getNumber() << ": \n"; } else if (mi != 0) { - os << indent << "   "; + os << indent + s(6) << "  "; renderMachineInstr(os, mi); - os << "\n"; } else { - os << indent << "  \n"; + os << indent + s(6) << " \n"; } - os << indent << "
\n"; @@ -776,7 +801,7 @@ } template - void RenderMachineFunction::renderWarnings(const std::string &indent, + void RenderMachineFunction::renderWarnings(const Spacer &indent, OStream &os) const { } @@ -785,25 +810,25 @@ OStream &os, const char * const renderContextStr) const { os << "\n" - << " \n" - << " " << fqn << "\n"; + << s(2) << "\n" + << s(4) << "" << fqn << "\n"; - insertCSS(" ", os); + insertCSS(s(4), os); - os << " \n" - << " \n"; + os << s(2) << "\n" + << s(2) << "\n"; - renderFunctionSummary(" ", os, renderContextStr); + renderFunctionSummary(s(4), os, renderContextStr); - os << "


\n"; + os << s(4) << "


\n"; //renderLiveIntervalInfoTable(" ", os); - os << "


\n"; + os << s(4) << "


\n"; - renderCodeTablePlusPI(" ", os); + renderCodeTablePlusPI(s(4), os); - os << " \n" + os << s(2) << "\n" << "\n"; } Modified: llvm/trunk/lib/CodeGen/RenderMachineFunction.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RenderMachineFunction.h?rev=108822&r1=108821&r2=108822&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/RenderMachineFunction.h (original) +++ llvm/trunk/lib/CodeGen/RenderMachineFunction.h Tue Jul 20 04:13:29 2010 @@ -243,6 +243,18 @@ // ---------- Rendering methods ---------- + /// For inserting spaces when pretty printing. + class Spacer { + public: + explicit Spacer(unsigned numSpaces) : ns(numSpaces) {} + Spacer operator+(const Spacer &o) const { return Spacer(ns + o.ns); } + template void print(OStream &os) const; + private: + unsigned ns; + }; + + Spacer s(unsigned ns) const; + template std::string escapeChars(Iterator sBegin, Iterator sEnd) const; @@ -253,38 +265,38 @@ /// \brief Render vertical text. template - void renderVertical(const std::string &indent, + void renderVertical(const Spacer &indent, OStream &os, const T &t) const; /// \brief Insert CSS layout info. template - void insertCSS(const std::string &indent, + void insertCSS(const Spacer &indent, OStream &os) const; /// \brief Render a brief summary of the function (including rendering /// context). template - void renderFunctionSummary(const std::string &indent, + void renderFunctionSummary(const Spacer &indent, OStream &os, const char * const renderContextStr) const; /// \brief Render a legend for the pressure table. template - void renderPressureTableLegend(const std::string &indent, + void renderPressureTableLegend(const Spacer &indent, OStream &os) const; /// \brief Render code listing, potentially with register pressure /// and live intervals shown alongside. template - void renderCodeTablePlusPI(const std::string &indent, + void renderCodeTablePlusPI(const Spacer &indent, OStream &os) const; /// \brief Render warnings about the machine function, or weird rendering /// parameter combinations (e.g. rendering specified live intervals /// over more than one machine function). template - void renderWarnings(const std::string &indent, + void renderWarnings(const Spacer &indent, OStream &os) const; /// \brief Render the HTML page representing the MachineFunction. From lhames at gmail.com Tue Jul 20 05:18:54 2010 From: lhames at gmail.com (Lang Hames) Date: Tue, 20 Jul 2010 10:18:54 -0000 Subject: [llvm-commits] [llvm] r108823 - in /llvm/trunk/lib/CodeGen: RenderMachineFunction.cpp RenderMachineFunction.h Message-ID: <20100720101854.E167A2A6C12C@llvm.org> Author: lhames Date: Tue Jul 20 05:18:54 2010 New Revision: 108823 URL: http://llvm.org/viewvc/llvm-project?rev=108823&view=rev Log: Use run-length encoding to represent identical adjacent cells in the pressure and interval table. Reduces output HTML file sizes by ~80% in my test cases. Also fix access of private member type by << operator. Modified: llvm/trunk/lib/CodeGen/RenderMachineFunction.cpp llvm/trunk/lib/CodeGen/RenderMachineFunction.h Modified: llvm/trunk/lib/CodeGen/RenderMachineFunction.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RenderMachineFunction.cpp?rev=108823&r1=108822&r2=108823&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/RenderMachineFunction.cpp (original) +++ llvm/trunk/lib/CodeGen/RenderMachineFunction.cpp Tue Jul 20 05:18:54 2010 @@ -571,6 +571,17 @@ return Dead; } + RenderMachineFunction::PressureState + RenderMachineFunction::getPressureStateAt(const TargetRegisterClass *trc, + SlotIndex i) const { + if (trei.getPressureAtSlot(trc, i) == 0) { + return Zero; + } else if (trei.classOverCapacityAtSlot(trc, i)){ + return High; + } + return Low; + } + /// \brief Render a machine instruction. template void RenderMachineFunction::renderMachineInstr(OStream &os, @@ -623,14 +634,14 @@ << indent + s(2) << "table.code td { font-family: monospace; " "border-width: 0px; border-style: solid; " "border-bottom: 1px solid #dddddd; white-space: nowrap; }\n" - << indent + s(2) << "table.code td.s-zp { background-color: #000000; }\n" - << indent + s(2) << "table.code td.s-up { background-color: #00ff00; }\n" - << indent + s(2) << "table.code td.s-op { background-color: #ff0000; }\n" - << indent + s(2) << "table.code td.l-na { background-color: #ffffff; }\n" - << indent + s(2) << "table.code td.l-def { background-color: #ff0000; }\n" - << indent + s(2) << "table.code td.l-use { background-color: #ffff00; }\n" - << indent + s(2) << "table.code td.l-sar { background-color: #000000; }\n" - << indent + s(2) << "table.code td.l-sas { background-color: #770000; }\n" + << indent + s(2) << "table.code td.p-z { background-color: #000000; }\n" + << indent + s(2) << "table.code td.p-l { background-color: #00ff00; }\n" + << indent + s(2) << "table.code td.p-h { background-color: #ff0000; }\n" + << indent + s(2) << "table.code td.l-n { background-color: #ffffff; }\n" + << indent + s(2) << "table.code td.l-d { background-color: #ff0000; }\n" + << indent + s(2) << "table.code td.l-u { background-color: #ffff00; }\n" + << indent + s(2) << "table.code td.l-r { background-color: #000000; }\n" + << indent + s(2) << "table.code td.l-s { background-color: #770000; }\n" << indent + s(2) << "table.code th { border-width: 0px; " "border-style: solid; }\n" << indent << "\n"; @@ -674,17 +685,54 @@ << indent << "\n"; } + template + void RenderMachineFunction::renderCellsWithRLE( + const Spacer &indent, OStream &os, + const std::pair &rleAccumulator, + const std::map &cellTypeStrs) const { + + if (rleAccumulator.second == 0) + return; + + typename std::map::const_iterator ctsItr = + cellTypeStrs.find(rleAccumulator.first); + + assert(ctsItr != cellTypeStrs.end() && "No string for given cell type."); + + os << indent + s(4) << "second << "\""; + if (rleAccumulator.second > 1) + os << " colspan=" << rleAccumulator.second; + os << ">\n"; + } + + template void RenderMachineFunction::renderCodeTablePlusPI(const Spacer &indent, OStream &os) const { + std::map lsStrs; + lsStrs[Dead] = "l-n"; + lsStrs[Defined] = "l-d"; + lsStrs[Used] = "l-u"; + lsStrs[AliveReg] = "l-r"; + lsStrs[AliveStack] = "l-s"; + + std::map psStrs; + psStrs[Zero] = "p-z"; + psStrs[Low] = "p-l"; + psStrs[High] = "p-h"; + + // Open the table... + os << indent << "\n" - << indent + s(2) << "\n" - << indent + s(4) << "\n" + << indent + s(2) << "\n"; + + // Render the header row... + + os << indent + s(4) << "\n" << indent + s(4) << "\n"; - // Header row: - + // Render class names if necessary... if (!ro.regClasses().empty()) { for (MFRenderingOptions::RegClassSet::const_iterator rcItr = ro.regClasses().begin(), @@ -701,6 +749,7 @@ if (!ro.regClasses().empty() && !ro.intervals().empty()) os << indent + s(4) << "\n"; + // Render interval numbers if necessary... if (!ro.intervals().empty()) { for (MFRenderingOptions::IntervalSet::const_iterator liItr = ro.intervals().begin(), @@ -716,14 +765,18 @@ os << indent + s(2) << "\n"; + // End header row, start with the data rows... + MachineInstr *mi = 0; // Data rows: for (SlotIndex i = sis->getZeroIndex(); i != sis->getLastIndex(); i = i.getNextSlot()) { + + // Render the slot column. + os << indent + s(2) << "\n"; - os << indent + s(2) << "\n"; - + // Render the code column. if (i.getSlot() == SlotIndex::LOAD) { MachineBasicBlock *mbb = sis->getMBBFromIndex(i); mi = sis->getInstructionFromIndex(i); @@ -739,7 +792,7 @@ os << indent + s(6) << "  "; renderMachineInstr(os, mi); } else { - os << indent + s(6) << " \n"; + // Empty interval - leave blank. } os << indent + s(4) << "\n"; } else { @@ -748,25 +801,25 @@ } } + // Render the class columns. if (!ro.regClasses().empty()) { + std::pair psRLEAccumulator(Zero, 0); for (MFRenderingOptions::RegClassSet::const_iterator rcItr = ro.regClasses().begin(), rcEnd = ro.regClasses().end(); rcItr != rcEnd; ++rcItr) { const TargetRegisterClass *trc = *rcItr; + PressureState newPressure = getPressureStateAt(trc, i); - os << indent + s(4) << "\n"; } + renderCellsWithRLE(indent + s(4), os, psRLEAccumulator, psStrs); } // FIXME: Is there a nicer way to insert space between columns in HTML? @@ -774,22 +827,23 @@ os << indent + s(4) << "\n"; if (!ro.intervals().empty()) { + std::pair lsRLEAccumulator(Dead, 0); for (MFRenderingOptions::IntervalSet::const_iterator liItr = ro.intervals().begin(), liEnd = ro.intervals().end(); liItr != liEnd; ++liItr) { const LiveInterval *li = *liItr; - os << indent + s(4) << "\n"; } + renderCellsWithRLE(indent + s(4), os, lsRLEAccumulator, lsStrs); } os << indent + s(2) << "\n"; } Modified: llvm/trunk/lib/CodeGen/RenderMachineFunction.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RenderMachineFunction.h?rev=108823&r1=108822&r2=108823&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/RenderMachineFunction.h (original) +++ llvm/trunk/lib/CodeGen/RenderMachineFunction.h Tue Jul 20 05:18:54 2010 @@ -223,6 +223,11 @@ const char *renderSuffix = 0); private: + class Spacer; + + template + friend OStream& operator<<(OStream &os, const Spacer &s); + std::string fqn; @@ -238,9 +243,12 @@ // Utilities. typedef enum { Dead, Defined, Used, AliveReg, AliveStack } LiveState; - LiveState getLiveStateAt(const LiveInterval *li, SlotIndex i) const; + typedef enum { Zero, Low, High } PressureState; + PressureState getPressureStateAt(const TargetRegisterClass *trc, + SlotIndex i) const; + // ---------- Rendering methods ---------- /// For inserting spaces when pretty printing. @@ -286,6 +294,14 @@ void renderPressureTableLegend(const Spacer &indent, OStream &os) const; + /// \brief Render a consecutive set of HTML cells of the same class using + /// the colspan attribute for run-length encoding. + template + void renderCellsWithRLE( + const Spacer &indent, OStream &os, + const std::pair &rleAccumulator, + const std::map &cellTypeStrs) const; + /// \brief Render code listing, potentially with register pressure /// and live intervals shown alongside. template From lhames at gmail.com Tue Jul 20 05:29:46 2010 From: lhames at gmail.com (Lang Hames) Date: Tue, 20 Jul 2010 10:29:46 -0000 Subject: [llvm-commits] [llvm] r108824 - /llvm/trunk/lib/CodeGen/RenderMachineFunction.cpp Message-ID: <20100720102946.A4B1F2A6C12C@llvm.org> Author: lhames Date: Tue Jul 20 05:29:46 2010 New Revision: 108824 URL: http://llvm.org/viewvc/llvm-project?rev=108824&view=rev Log: Oops - I tables render poorly in Chrome without this explicit height specification. Modified: llvm/trunk/lib/CodeGen/RenderMachineFunction.cpp Modified: llvm/trunk/lib/CodeGen/RenderMachineFunction.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RenderMachineFunction.cpp?rev=108824&r1=108823&r2=108824&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/RenderMachineFunction.cpp (original) +++ llvm/trunk/lib/CodeGen/RenderMachineFunction.cpp Tue Jul 20 05:29:46 2010 @@ -774,7 +774,7 @@ i = i.getNextSlot()) { // Render the slot column. - os << indent + s(2) << "\n"; + os << indent + s(2) << "\n"; // Render the code column. if (i.getSlot() == SlotIndex::LOAD) { From baldrick at free.fr Tue Jul 20 03:51:56 2010 From: baldrick at free.fr (Duncan Sands) Date: Tue, 20 Jul 2010 10:51:56 +0200 Subject: [llvm-commits] [llvm] r108765 - in /llvm/trunk: lib/CodeGen/SelectionDAG/FastISel.cpp test/CodeGen/X86/fast-isel-atomic.ll In-Reply-To: <20100719224856.C6D9C2A6C12C@llvm.org> References: <20100719224856.C6D9C2A6C12C@llvm.org> Message-ID: <4C4563AC.908@free.fr> Hi Dan, > After a custom inserter, in a block which has constant instructions, > update the current basic block in addition to the current insert > position, so that they remain consistent. This fixes rdar://8204072. this rdar looks very similar to PR7652. Ciao, Duncan. > > Added: > llvm/trunk/test/CodeGen/X86/fast-isel-atomic.ll > Modified: > llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp > > Modified: llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp?rev=108765&r1=108764&r2=108765&view=diff > ============================================================================== > --- llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp (original) > +++ llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp Mon Jul 19 17:48:56 2010 > @@ -276,6 +276,7 @@ > void FastISel::recomputeInsertPt() { > if (getLastLocalValue()) { > FuncInfo.InsertPt = getLastLocalValue(); > + FuncInfo.MBB = FuncInfo.InsertPt->getParent(); > ++FuncInfo.InsertPt; > } else > FuncInfo.InsertPt = FuncInfo.MBB->getFirstNonPHI(); > > Added: llvm/trunk/test/CodeGen/X86/fast-isel-atomic.ll > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/fast-isel-atomic.ll?rev=108765&view=auto > ============================================================================== > --- llvm/trunk/test/CodeGen/X86/fast-isel-atomic.ll (added) > +++ llvm/trunk/test/CodeGen/X86/fast-isel-atomic.ll Mon Jul 19 17:48:56 2010 > @@ -0,0 +1,16 @@ > +; RUN: llc< %s -O0 -march=x86-64 > +; rdar://8204072 > + > + at sc = external global i8 > + at uc = external global i8 > + > +declare i8 @llvm.atomic.load.and.i8.p0i8(i8* nocapture, i8) nounwind > + > +define void @test_fetch_and_op() nounwind { > +entry: > + %tmp40 = call i8 @llvm.atomic.load.and.i8.p0i8(i8* @sc, i8 11) ; [#uses=1] > + store i8 %tmp40, i8* @sc > + %tmp41 = call i8 @llvm.atomic.load.and.i8.p0i8(i8* @uc, i8 11) ; [#uses=1] > + store i8 %tmp41, i8* @uc > + ret void > +} > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From baldrick at free.fr Tue Jul 20 03:55:44 2010 From: baldrick at free.fr (Duncan Sands) Date: Tue, 20 Jul 2010 10:55:44 +0200 Subject: [llvm-commits] [llvm-gcc-4.2] r108786 - in /llvm-gcc-4.2/trunk/gcc: cp/pt.c llvm-convert.cpp llvm-debug.cpp In-Reply-To: <20100719235639.57C042A6C12C@llvm.org> References: <20100719235639.57C042A6C12C@llvm.org> Message-ID: <4C456490.9080103@free.fr> Hi Stuart, > Correct line info for declarations/definitions. Radar 8063111. please add a testcase to LLVM. Thanks, Duncan. From lhames at gmail.com Tue Jul 20 09:35:55 2010 From: lhames at gmail.com (Lang Hames) Date: Tue, 20 Jul 2010 14:35:55 -0000 Subject: [llvm-commits] [llvm] r108839 - /llvm/trunk/lib/CodeGen/RenderMachineFunction.cpp Message-ID: <20100720143555.E81C32A6C12C@llvm.org> Author: lhames Date: Tue Jul 20 09:35:55 2010 New Revision: 108839 URL: http://llvm.org/viewvc/llvm-project?rev=108839&view=rev Log: Updated css classes for the pressure table legend. Modified: llvm/trunk/lib/CodeGen/RenderMachineFunction.cpp Modified: llvm/trunk/lib/CodeGen/RenderMachineFunction.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RenderMachineFunction.cpp?rev=108839&r1=108838&r2=108839&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/RenderMachineFunction.cpp (original) +++ llvm/trunk/lib/CodeGen/RenderMachineFunction.cpp Tue Jul 20 09:35:55 2010 @@ -670,17 +670,17 @@ << indent + s(2) << "\n" << indent + s(4) << "" "" - "\n" + "\n" << indent + s(2) << "\n" << indent + s(2) << "\n" << indent + s(4) << "" "" - "\n" + "\n" << indent + s(2) << "\n" << indent + s(2) << "\n" << indent + s(4) << "" "" - "\n" + "\n" << indent + s(2) << "\n" << indent << "
index
indexinstr  
No PressureNo physical registers of this class requested.    
Low PressureSufficient physical registers to meet demand.    
High PressurePotentially insufficient physical registers to meet demand.    
\n"; } From grosbach at apple.com Tue Jul 20 09:51:32 2010 From: grosbach at apple.com (Jim Grosbach) Date: Tue, 20 Jul 2010 14:51:32 -0000 Subject: [llvm-commits] [llvm] r108841 - /llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp Message-ID: <20100720145132.3B6332A6C12C@llvm.org> Author: grosbach Date: Tue Jul 20 09:51:32 2010 New Revision: 108841 URL: http://llvm.org/viewvc/llvm-project?rev=108841&view=rev Log: Removed un-used code. Modified: llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp Modified: llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp?rev=108841&r1=108840&r2=108841&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp (original) +++ llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp Tue Jul 20 09:51:32 2010 @@ -1969,54 +1969,6 @@ } SDValue -ARMTargetLowering::LowerDYNAMIC_STACKALLOC(SDValue Op, - SelectionDAG &DAG) const { - SDNode *Node = Op.getNode(); - DebugLoc dl = Node->getDebugLoc(); - EVT VT = Node->getValueType(0); - SDValue Chain = Op.getOperand(0); - SDValue Size = Op.getOperand(1); - SDValue Align = Op.getOperand(2); - - // Chain the dynamic stack allocation so that it doesn't modify the stack - // pointer when other instructions are using the stack. - Chain = DAG.getCALLSEQ_START(Chain, DAG.getIntPtrConstant(0, true)); - - unsigned AlignVal = cast(Align)->getZExtValue(); - unsigned StackAlign = getTargetMachine().getFrameInfo()->getStackAlignment(); - if (AlignVal > StackAlign) - // Do this now since selection pass cannot introduce new target - // independent node. - Align = DAG.getConstant(-(uint64_t)AlignVal, VT); - - // In Thumb1 mode, there isn't a "sub r, sp, r" instruction, we will end up - // using a "add r, sp, r" instead. Negate the size now so we don't have to - // do even more horrible hack later. - MachineFunction &MF = DAG.getMachineFunction(); - ARMFunctionInfo *AFI = MF.getInfo(); - if (AFI->isThumb1OnlyFunction()) { - bool Negate = true; - ConstantSDNode *C = dyn_cast(Size); - if (C) { - uint32_t Val = C->getZExtValue(); - if (Val <= 508 && ((Val & 3) == 0)) - Negate = false; - } - if (Negate) - Size = DAG.getNode(ISD::SUB, dl, VT, DAG.getConstant(0, VT), Size); - } - - SDVTList VTList = DAG.getVTList(VT, MVT::Other); - SDValue Ops1[] = { Chain, Size, Align }; - SDValue Res = DAG.getNode(ARMISD::DYN_ALLOC, dl, VTList, Ops1, 3); - Chain = Res.getValue(1); - Chain = DAG.getCALLSEQ_END(Chain, DAG.getIntPtrConstant(0, true), - DAG.getIntPtrConstant(0, true), SDValue()); - SDValue Ops2[] = { Res, Chain }; - return DAG.getMergeValues(Ops2, 2, dl); -} - -SDValue ARMTargetLowering::GetF64FormalArgument(CCValAssign &VA, CCValAssign &NextVA, SDValue &Root, SelectionDAG &DAG, DebugLoc dl) const { @@ -3622,7 +3574,6 @@ case ISD::SELECT_CC: return LowerSELECT_CC(Op, DAG); case ISD::BR_CC: return LowerBR_CC(Op, DAG); case ISD::BR_JT: return LowerBR_JT(Op, DAG); - case ISD::DYNAMIC_STACKALLOC: return LowerDYNAMIC_STACKALLOC(Op, DAG); case ISD::VASTART: return LowerVASTART(Op, DAG); case ISD::MEMBARRIER: return LowerMEMBARRIER(Op, DAG, Subtarget); case ISD::SINT_TO_FP: From daniel at zuster.org Tue Jul 20 10:27:09 2010 From: daniel at zuster.org (Daniel Dunbar) Date: Tue, 20 Jul 2010 08:27:09 -0700 Subject: [llvm-commits] [llvm] r108822 - in /llvm/trunk/lib/CodeGen: RenderMachineFunction.cpp RenderMachineFunction.h In-Reply-To: <20100720091329.DA1AD2A6C12C@llvm.org> References: <20100720091329.DA1AD2A6C12C@llvm.org> Message-ID: Hi Lang, This broke the MSVC build here: http://google1.osuosl.org:8011/builders/clang-i686-xp-msvc9/builds/7791 Can you take a look? The error is: -- 71>..\..\..\lib\CodeGen\RenderMachineFunction.cpp(519) : error C2893: Failed to specialize function template 'OStream &llvm::operator <<(OStream &,const llvm::RenderMachineFunction::Spacer &)' 71> With the following template arguments: 71> 'llvm::raw_ostream' 71>..\..\..\lib\CodeGen\RenderMachineFunction.cpp(519) : error C2248: 'llvm::RenderMachineFunction::Spacer' : cannot access private class declared in class 'llvm::RenderMachineFunction' 71> d:\public\zorg\buildbot\osuosl\slave\clang-i686-xp-msvc9\llvm\lib\codegen\RenderMachineFunction.h(255) : see declaration of 'llvm::RenderMachineFunction::Spacer' 71> d:\public\zorg\buildbot\osuosl\slave\clang-i686-xp-msvc9\llvm\lib\codegen\RenderMachineFunction.h(196) : see declaration of 'llvm::RenderMachineFunction' -- - Daniel On Tue, Jul 20, 2010 at 2:13 AM, Lang Hames wrote: > Author: lhames > Date: Tue Jul 20 04:13:29 2010 > New Revision: 108822 > > URL: http://llvm.org/viewvc/llvm-project?rev=108822&view=rev > Log: > Added support for turning HTML indentation on and off (indentation off by default). > > Reduces output file size ~20% on my test cases. > > > Modified: > ? ?llvm/trunk/lib/CodeGen/RenderMachineFunction.cpp > ? ?llvm/trunk/lib/CodeGen/RenderMachineFunction.h > > Modified: llvm/trunk/lib/CodeGen/RenderMachineFunction.cpp > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RenderMachineFunction.cpp?rev=108822&r1=108821&r2=108822&view=diff > ============================================================================== > --- llvm/trunk/lib/CodeGen/RenderMachineFunction.cpp (original) > +++ llvm/trunk/lib/CodeGen/RenderMachineFunction.cpp Tue Jul 20 04:13:29 2010 > @@ -66,6 +66,12 @@ > ? ? ? ? ? ? ? ? ? cl::desc("Use SVG for vertical text."), > ? ? ? ? ? ? ? ? ? cl::init(true), cl::Hidden); > > +static cl::opt > +prettyHTML("rmf-pretty-html", > + ? ? ? ? ? cl::desc("Pretty print HTML. For debugging the renderer only.."), > + ? ? ? ? ? cl::init(false), cl::Hidden); > + > + > ?namespace llvm { > > ? bool MFRenderingOptions::renderingOptionsProcessed; > @@ -493,6 +499,25 @@ > > ? // ---------- MachineFunctionRenderer implementation ---------- > > + ?template > + ?void RenderMachineFunction::Spacer::print(OStream &os) const { > + ? ?if (!prettyHTML) > + ? ? ?return; > + ? ?for (unsigned i = 0; i < ns; ++i) { > + ? ? ?os << " "; > + ? ?} > + ?} > + > + ?RenderMachineFunction::Spacer RenderMachineFunction::s(unsigned ns) const { > + ? ?return Spacer(ns); > + ?} > + > + ?template > + ?OStream& operator<<(OStream &os, const RenderMachineFunction::Spacer &s) { > + ? ?s.print(os); > + ? ?return os; > + ?} > + > ? template > ? std::string RenderMachineFunction::escapeChars(Iterator sBegin, Iterator sEnd) const { > ? ? std::string r; > @@ -558,22 +583,23 @@ > ? } > > ? template > - ?void RenderMachineFunction::renderVertical(const std::string &indent, > + ?void RenderMachineFunction::renderVertical(const Spacer &indent, > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?OStream &os, > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?const T &t) const { > ? ? if (ro.fancyVerticals()) { > ? ? ? os << indent << " - ? ? ? ? << indent << " ?class=\"obj\"\n" > - ? ? ? ? << indent << " ?type=\"image/svg+xml\"\n" > - ? ? ? ? << indent << " ?width=\"14px\"\n" > - ? ? ? ? << indent << " ?height=\"55px\"\n" > - ? ? ? ? << indent << " ?data=\"data:image/svg+xml,\n" > - ? ? ? ? << indent << " ? ?\n" > - ? ? ? ? << indent << " ? ? ? - ? ? ? ? ? ? ? ? ? ? ?"font-family='Courier' font-size='12' " > - ? ? ? ? ? ? ? ? ? ? ?"transform='rotate(-90)' text-rendering='optimizeSpeed' " > - ? ? ? ? ? ? ? ? ? ? ?"fill='#000'>" << t << "\n" > - ? ? ? ? << indent << " ? ?\">\n" > + ? ? ? ? << indent + s(2) << "class=\"obj\"\n" > + ? ? ? ? << indent + s(2) << "type=\"image/svg+xml\"\n" > + ? ? ? ? << indent + s(2) << "width=\"14px\"\n" > + ? ? ? ? << indent + s(2) << "height=\"55px\"\n" > + ? ? ? ? << indent + s(2) << "data=\"data:image/svg+xml,\n" > + ? ? ? ? << indent + s(4) << "\n" > + ? ? ? ? << indent + s(6) << " + ? ? ? ? ? ? ? ? ? ? ? ? ? ? "font-family='Courier' font-size='12' " > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? "transform='rotate(-90)' " > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? "text-rendering='optimizeSpeed' " > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? "fill='#000'>" << t << "\n" > + ? ? ? ? << indent + s(4) << "\">\n" > ? ? ? ? ?<< indent << "\n"; > ? ? } else { > ? ? ? std::ostringstream oss; > @@ -583,36 +609,36 @@ > ? ? ? os << indent; > ? ? ? for (std::string::iterator tStrItr = tStr.begin(), tStrEnd = tStr.end(); > ? ? ? ? ? ?tStrItr != tStrEnd; ++tStrItr) { > - ? ? ? ?os << *tStrItr << "
"; > + ? ? ? ?os << *tStrItr << "
"; > ? ? ? } > ? ? ? os << "\n"; > ? ? } > ? } > > ? template > - ?void RenderMachineFunction::insertCSS(const std::string &indent, > + ?void RenderMachineFunction::insertCSS(const Spacer &indent, > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? OStream &os) const { > ? ? os << indent << "\n"; > ? } > > ? template > ? void RenderMachineFunction::renderFunctionSummary( > - ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?const std::string &indent, OStream &os, > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?const Spacer &indent, OStream &os, > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? const char * const renderContextStr) const { > ? ? os << indent << "

Function: " << mf->getFunction()->getName() > ? ? ? ? ? ? ? ? ?<< "

\n" > @@ -622,40 +648,40 @@ > > ? template > ? void RenderMachineFunction::renderPressureTableLegend( > - ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?const std::string &indent, > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?const Spacer &indent, > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? OStream &os) const { > ? ? os << indent << "

Rendering Pressure Legend:

\n" > ? ? ? ?<< indent << "\n" > - ? ? ? << indent << " ?\n" > - ? ? ? << indent << " ? ?" > + ? ? ? << indent + s(2) << "\n" > + ? ? ? << indent + s(4) << "" > ? ? ? ? ? ? ? ? ? ? "\n" > - ? ? ? << indent << " ?\n" > - ? ? ? << indent << " ?\n" > - ? ? ? << indent << " ? ?" > - ? ? ? ? ? ? ? ? ? ?" ? ?" > - ? ? ? ? ? ? ? ? ? ?" ? ?\n" > - ? ? ? << indent << " ?\n" > - ? ? ? << indent << " ?\n" > - ? ? ? << indent << " ? ?" > - ? ? ? ? ? ? ? ? ? ?" ? ?" > - ? ? ? ? ? ? ? ? ? ?" ? ?\n" > - ? ? ? << indent << " ?\n" > - ? ? ? << indent << " ?\n" > - ? ? ? << indent << " ? ?" > - ? ? ? ? ? ? ? ? ? ?" ? ?" > - ? ? ? ? ? ? ? ? ? ?" ? ?\n" > - ? ? ? << indent << " ?\n" > + ? ? ? << indent + s(2) << "\n" > + ? ? ? << indent + s(2) << "\n" > + ? ? ? << indent + s(4) << "" > + ? ? ? ? ? ? ? ? ? ?"" > + ? ? ? ? ? ? ? ? ? ?"\n" > + ? ? ? << indent + s(2) << "\n" > + ? ? ? << indent + s(2) << "\n" > + ? ? ? << indent + s(4) << "" > + ? ? ? ? ? ? ? ? ? ?"" > + ? ? ? ? ? ? ? ? ? ?"\n" > + ? ? ? << indent + s(2) << "\n" > + ? ? ? << indent + s(2) << "\n" > + ? ? ? << indent + s(4) << "" > + ? ? ? ? ? ? ? ? ? ?"" > + ? ? ? ? ? ? ? ? ? ?"\n" > + ? ? ? << indent + s(2) << "\n" > ? ? ? ?<< indent << "
PressureDescription
PressureDescriptionAppearance
No PressureNo physical registers of this class requested.  
Low PressureSufficient physical registers to meet demand.  
High PressurePotentially insufficient physical registers to meet demand.  
No PressureNo physical registers of this class requested.  
Low PressureSufficient physical registers to meet demand.  
High PressurePotentially insufficient physical registers to meet demand.  
\n"; > ? } > > ? template > - ?void RenderMachineFunction::renderCodeTablePlusPI(const std::string & indent, > + ?void RenderMachineFunction::renderCodeTablePlusPI(const Spacer &indent, > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? OStream &os) const { > > ? ? os << indent << "\n" > - ? ? ? << indent << " ?\n" > - ? ? ? << indent << " ? ?\n" > - ? ? ? << indent << " ? ?\n"; > + ? ? ? << indent + s(2) << "\n" > + ? ? ? << indent + s(4) << "\n" > + ? ? ? << indent + s(4) << "\n"; > > ? ? // Header row: > > @@ -665,15 +691,15 @@ > ? ? ? ? ? ? ?rcEnd = ro.regClasses().end(); > ? ? ? ? ? ?rcItr != rcEnd; ++rcItr) { > ? ? ? ? const TargetRegisterClass *trc = *rcItr; > - ? ? ? ?os << indent << " ? ?\n"; > + ? ? ? ?os << indent + s(4) << "\n"; > ? ? ? } > ? ? } > > ? ? // FIXME: Is there a nicer way to insert space between columns in HTML? > ? ? if (!ro.regClasses().empty() && !ro.intervals().empty()) > - ? ? ?os << indent << " ? ?\n"; > + ? ? ?os << indent + s(4) << "\n"; > > ? ? if (!ro.intervals().empty()) { > ? ? ? for (MFRenderingOptions::IntervalSet::const_iterator > @@ -682,13 +708,13 @@ > ? ? ? ? ? ?liItr != liEnd; ++liItr) { > > ? ? ? ? const LiveInterval *li = *liItr; > - ? ? ? ?os << indent << " ? ?\n"; > + ? ? ? ?os << indent + s(4) << "\n"; > ? ? ? } > ? ? } > > - ? ?os << indent << " ?\n"; > + ? ?os << indent + s(2) << "\n"; > > ? ? MachineInstr *mi = 0; > > @@ -696,7 +722,7 @@ > ? ? for (SlotIndex i = sis->getZeroIndex(); i != sis->getLastIndex(); > ? ? ? ? ?i = i.getNextSlot()) { > > - ? ? ?os << indent << " ?\n"; > + ? ? ?os << indent + s(2) << "\n"; > > ? ? ? if (i.getSlot() == SlotIndex::LOAD) { > ? ? ? ? MachineBasicBlock *mbb = sis->getMBBFromIndex(i); > @@ -704,19 +730,18 @@ > > ? ? ? ? if (i == sis->getMBBStartIdx(mbb) || mi != 0 || > ? ? ? ? ? ? ro.renderEmptyIndexes()) { > - ? ? ? ? ?os << indent << " ? ?\n" > - ? ? ? ? ? ? << indent << " ? ?\n" > + ? ? ? ? ? ? << indent + s(4) << "\n"; > + ? ? ? ? ?os << indent + s(4) << "\n"; > ? ? ? ? } else { > ? ? ? ? ? i = i.getStoreIndex(); // <- Will be incremented to the next index. > ? ? ? ? ? continue; > @@ -730,7 +755,7 @@ > ? ? ? ? ? ? ?rcItr != rcEnd; ++rcItr) { > ? ? ? ? ? const TargetRegisterClass *trc = *rcItr; > > - ? ? ? ? ?os << indent << " ? ?\n"; > + ? ? ? ?os << indent + s(4) << "\n"; > > ? ? ? if (!ro.intervals().empty()) { > ? ? ? ? for (MFRenderingOptions::IntervalSet::const_iterator > @@ -754,7 +779,7 @@ > ? ? ? ? ? ? ? ?liEnd = ro.intervals().end(); > ? ? ? ? ? ? ?liItr != liEnd; ++liItr) { > ? ? ? ? ? const LiveInterval *li = *liItr; > - ? ? ? ? ?os << indent << " ? ?\n"; > ? ? ? ? } > ? ? ? } > - ? ? ?os << indent << " ?\n"; > + ? ? ?os << indent + s(2) << "\n"; > ? ? } > > ? ? os << indent << "
indexinstr
indexinstr\n"; > - ? ? ? ?renderVertical(indent + " ? ? ?", os, trc->getName()); > - ? ? ? ?os << indent << " ? ?\n"; > + ? ? ? ?renderVertical(indent + s(6), os, trc->getName()); > + ? ? ? ?os << indent + s(4) << "    \n"; > - ? ? ? ?renderVertical(indent + " ? ? ?", os, li->reg); > - ? ? ? ?os << indent << " ? ?\n"; > + ? ? ? ?renderVertical(indent + s(6), os, li->reg); > + ? ? ? ?os << indent + s(4) << "
" << i << " \n"; > + ? ? ? ? ?os << indent + s(4) << "" << i << " \n"; > > ? ? ? ? ? if (i == sis->getMBBStartIdx(mbb)) { > - ? ? ? ? ? ?os << indent << " ? ? ?BB#" << mbb->getNumber() << ": \n"; > + ? ? ? ? ? ?os << indent + s(6) << "BB#" << mbb->getNumber() << ": \n"; > ? ? ? ? ? } else if (mi != 0) { > - ? ? ? ? ? ?os << indent << " ? ? ?  "; > + ? ? ? ? ? ?os << indent + s(6) << "  "; > ? ? ? ? ? ? renderMachineInstr(os, mi); > - ? ? ? ? ? ?os << "\n"; > ? ? ? ? ? } else { > - ? ? ? ? ? ?os << indent << " ? ? ? \n"; > + ? ? ? ? ? ?os << indent + s(6) << " \n"; > ? ? ? ? ? } > - ? ? ? ? ?os << indent << " ? ? + ? ? ? ? ?os << indent + s(4) << " > ? ? ? ? ? if (trei.getPressureAtSlot(trc, i) == 0) { > ? ? ? ? ? ? os << "s-zp"; > @@ -746,7 +771,7 @@ > > ? ? ? // FIXME: Is there a nicer way to insert space between columns in HTML? > ? ? ? if (!ro.regClasses().empty() && !ro.intervals().empty()) > - ? ? ? ?os << indent << " ? ? + ? ? ? ? ?os << indent + s(4) << " ? ? ? ? ? switch (getLiveStateAt(li, i)) { > ? ? ? ? ? ? case Dead: os << "l-na"; break; > ? ? ? ? ? ? case Defined: os << "l-def"; break; > @@ -766,7 +791,7 @@ > ? ? ? ? ? os << "\">
\n"; > @@ -776,7 +801,7 @@ > ? } > > ? template > - ?void RenderMachineFunction::renderWarnings(const std::string &indent, > + ?void RenderMachineFunction::renderWarnings(const Spacer &indent, > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?OStream &os) const { > ? } > > @@ -785,25 +810,25 @@ > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? OStream &os, > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? const char * const renderContextStr) const { > ? ? os << "\n" > - ? ? ? << " ?\n" > - ? ? ? << " ? ?" << fqn << "\n"; > + ? ? ? << s(2) << "\n" > + ? ? ? << s(4) << "" << fqn << "\n"; > > - ? ?insertCSS(" ? ?", os); > + ? ?insertCSS(s(4), os); > > - ? ?os << " ?\n" > - ? ? ? << " ?\n"; > + ? ?os << s(2) << "\n" > + ? ? ? << s(2) << "\n"; > > - ? ?renderFunctionSummary(" ? ?", os, renderContextStr); > + ? ?renderFunctionSummary(s(4), os, renderContextStr); > > - ? ?os << " ? ?


\n"; > + ? ?os << s(4) << "


\n"; > > ? ? //renderLiveIntervalInfoTable(" ? ?", os); > > - ? ?os << " ? ?


\n"; > + ? ?os << s(4) << "


\n"; > > - ? ?renderCodeTablePlusPI(" ? ?", os); > + ? ?renderCodeTablePlusPI(s(4), os); > > - ? ?os << " ?\n" > + ? ?os << s(2) << "\n" > ? ? ? ?<< "\n"; > ? } > > > Modified: llvm/trunk/lib/CodeGen/RenderMachineFunction.h > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RenderMachineFunction.h?rev=108822&r1=108821&r2=108822&view=diff > ============================================================================== > --- llvm/trunk/lib/CodeGen/RenderMachineFunction.h (original) > +++ llvm/trunk/lib/CodeGen/RenderMachineFunction.h Tue Jul 20 04:13:29 2010 > @@ -243,6 +243,18 @@ > > ? ? // ---------- Rendering methods ---------- > > + ? ?/// For inserting spaces when pretty printing. > + ? ?class Spacer { > + ? ?public: > + ? ? ?explicit Spacer(unsigned numSpaces) : ns(numSpaces) {} > + ? ? ?Spacer operator+(const Spacer &o) const { return Spacer(ns + o.ns); } > + ? ? ?template void print(OStream &os) const; > + ? ?private: > + ? ? ?unsigned ns; > + ? ?}; > + > + ? ?Spacer s(unsigned ns) const; > + > ? ? template > ? ? std::string escapeChars(Iterator sBegin, Iterator sEnd) const; > > @@ -253,38 +265,38 @@ > > ? ? /// \brief Render vertical text. > ? ? template > - ? ?void renderVertical(const std::string &indent, > + ? ?void renderVertical(const Spacer &indent, > ? ? ? ? ? ? ? ? ? ? ? ? OStream &os, > ? ? ? ? ? ? ? ? ? ? ? ? const T &t) const; > > ? ? /// \brief Insert CSS layout info. > ? ? template > - ? ?void insertCSS(const std::string &indent, > + ? ?void insertCSS(const Spacer &indent, > ? ? ? ? ? ? ? ? ? ?OStream &os) const; > > ? ? /// \brief Render a brief summary of the function (including rendering > ? ? /// ? ? ? ?context). > ? ? template > - ? ?void renderFunctionSummary(const std::string &indent, > + ? ?void renderFunctionSummary(const Spacer &indent, > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?OStream &os, > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?const char * const renderContextStr) const; > > ? ? /// \brief Render a legend for the pressure table. > ? ? template > - ? ?void renderPressureTableLegend(const std::string &indent, > + ? ?void renderPressureTableLegend(const Spacer &indent, > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?OStream &os) const; > > ? ? /// \brief Render code listing, potentially with register pressure > ? ? /// ? ? ? ?and live intervals shown alongside. > ? ? template > - ? ?void renderCodeTablePlusPI(const std::string &indent, > + ? ?void renderCodeTablePlusPI(const Spacer &indent, > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?OStream &os) const; > > ? ? /// \brief Render warnings about the machine function, or weird rendering > ? ? /// ? ? ? ?parameter combinations (e.g. rendering specified live intervals > ? ? /// ? ? ? ?over more than one machine function). > ? ? template > - ? ?void renderWarnings(const std::string &indent, > + ? ?void renderWarnings(const Spacer &indent, > ? ? ? ? ? ? ? ? ? ? ? ? OStream &os) const; > > ? ? /// \brief Render the HTML page representing the MachineFunction. > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits > From clattner at apple.com Tue Jul 20 10:33:01 2010 From: clattner at apple.com (Chris Lattner) Date: Tue, 20 Jul 2010 08:33:01 -0700 Subject: [llvm-commits] [llvm] r108823 - in /llvm/trunk/lib/CodeGen: RenderMachineFunction.cpp RenderMachineFunction.h In-Reply-To: <20100720101854.E167A2A6C12C@llvm.org> References: <20100720101854.E167A2A6C12C@llvm.org> Message-ID: On Jul 20, 2010, at 3:18 AM, Lang Hames wrote: > Author: lhames > Date: Tue Jul 20 05:18:54 2010 > New Revision: 108823 > > URL: http://llvm.org/viewvc/llvm-project?rev=108823&view=rev > Log: > Use run-length encoding to represent identical adjacent cells in the pressure > and interval table. Reduces output HTML file sizes by ~80% in my test cases. > > Also fix access of private member type by << operator. Hi Lang, I haven't had a chance to look at the bigger patch, but why all the templates on OStream? They code looks like it is only instantiated on one type to me. -Chris From stoklund at 2pi.dk Tue Jul 20 10:41:07 2010 From: stoklund at 2pi.dk (Jakob Stoklund Olesen) Date: Tue, 20 Jul 2010 15:41:07 -0000 Subject: [llvm-commits] [llvm] r108842 - in /llvm/trunk/lib/CodeGen: CMakeLists.txt InlineSpiller.cpp SplitKit.cpp SplitKit.h Message-ID: <20100720154107.D10442A6C12C@llvm.org> Author: stoklund Date: Tue Jul 20 10:41:07 2010 New Revision: 108842 URL: http://llvm.org/viewvc/llvm-project?rev=108842&view=rev Log: Beginning SplitKit - utility classes for live range splitting. This is a work in progress. So far we have some basic loop analysis to help determine where it is useful to split a live range around a loop. The actual loop splitting code from Splitter.cpp is also going to move in here. Added: llvm/trunk/lib/CodeGen/SplitKit.cpp llvm/trunk/lib/CodeGen/SplitKit.h Modified: llvm/trunk/lib/CodeGen/CMakeLists.txt llvm/trunk/lib/CodeGen/InlineSpiller.cpp Modified: llvm/trunk/lib/CodeGen/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/CMakeLists.txt?rev=108842&r1=108841&r2=108842&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/CMakeLists.txt (original) +++ llvm/trunk/lib/CodeGen/CMakeLists.txt Tue Jul 20 10:41:07 2010 @@ -68,6 +68,7 @@ SjLjEHPrepare.cpp SlotIndexes.cpp Spiller.cpp + SplitKit.cpp Splitter.cpp StackProtector.cpp StackSlotColoring.cpp Modified: llvm/trunk/lib/CodeGen/InlineSpiller.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/InlineSpiller.cpp?rev=108842&r1=108841&r2=108842&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/InlineSpiller.cpp (original) +++ llvm/trunk/lib/CodeGen/InlineSpiller.cpp Tue Jul 20 10:41:07 2010 @@ -14,6 +14,7 @@ #define DEBUG_TYPE "spiller" #include "Spiller.h" +#include "SplitKit.h" #include "VirtRegMap.h" #include "llvm/CodeGen/LiveIntervalAnalysis.h" #include "llvm/CodeGen/MachineFrameInfo.h" @@ -39,6 +40,8 @@ const TargetRegisterInfo &tri_; const BitVector reserved_; + SplitAnalysis splitAnalysis_; + // Variables that are valid during spill(), but used by multiple methods. LiveInterval *li_; std::vector *newIntervals_; @@ -62,7 +65,8 @@ mri_(mf->getRegInfo()), tii_(*mf->getTarget().getInstrInfo()), tri_(*mf->getTarget().getRegisterInfo()), - reserved_(tri_.getReservedRegs(mf_)) {} + reserved_(tri_.getReservedRegs(mf_)), + splitAnalysis_(mf, lis, mli) {} void spill(LiveInterval *li, std::vector &newIntervals, @@ -70,6 +74,8 @@ SlotIndex *earliestIndex); private: + bool split(); + bool allUsesAvailableAt(const MachineInstr *OrigMI, SlotIndex OrigIdx, SlotIndex UseIdx); bool reMaterializeFor(MachineBasicBlock::iterator MI); @@ -91,6 +97,22 @@ } } +/// split - try splitting the current interval into pieces that may allocate +/// separately. Return true if successful. +bool InlineSpiller::split() { + // FIXME: Add intra-MBB splitting. + if (lis_.intervalIsInOneMBB(*li_)) + return false; + + splitAnalysis_.analyze(li_); + + if (const MachineLoop *loop = splitAnalysis_.getBestSplitLoop()) { + if (splitAroundLoop(splitAnalysis_, loop)) + return true; + } + return false; +} + /// allUsesAvailableAt - Return true if all registers used by OrigMI at /// OrigIdx are also available with the same value at UseIdx. bool InlineSpiller::allUsesAvailableAt(const MachineInstr *OrigMI, @@ -338,6 +360,9 @@ rc_ = mri_.getRegClass(li->reg); spillIs_ = &spillIs; + if (split()) + return; + reMaterializeAll(); // Remat may handle everything. Added: llvm/trunk/lib/CodeGen/SplitKit.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SplitKit.cpp?rev=108842&view=auto ============================================================================== --- llvm/trunk/lib/CodeGen/SplitKit.cpp (added) +++ llvm/trunk/lib/CodeGen/SplitKit.cpp Tue Jul 20 10:41:07 2010 @@ -0,0 +1,148 @@ +//===---------- SplitKit.cpp - Toolkit for splitting live ranges ----------===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file contains the SplitAnalysis class as well as mutator functions for +// live range splitting. +// +//===----------------------------------------------------------------------===// + +#define DEBUG_TYPE "splitter" +#include "SplitKit.h" +#include "llvm/CodeGen/LiveIntervalAnalysis.h" +#include "llvm/CodeGen/MachineFunctionPass.h" +#include "llvm/CodeGen/MachineLoopInfo.h" +#include "llvm/CodeGen/MachineRegisterInfo.h" +#include "llvm/Support/Debug.h" +#include "llvm/Support/raw_ostream.h" + +using namespace llvm; + + +//===----------------------------------------------------------------------===// +// Split Analysis +//===----------------------------------------------------------------------===// + +SplitAnalysis::SplitAnalysis(const MachineFunction *mf, + const LiveIntervals *lis, + const MachineLoopInfo *mli) + : mf_(*mf), + lis_(*lis), + loops_(*mli), + curli_(0) {} + +void SplitAnalysis::clear() { + usingInstrs_.clear(); + usingBlocks_.clear(); + usingLoops_.clear(); +} + +/// analyseUses - Count instructions, basic blocks, and loops using curli. +void SplitAnalysis::analyseUses() { + const MachineRegisterInfo &MRI = mf_.getRegInfo(); + for (MachineRegisterInfo::reg_iterator I = MRI.reg_begin(curli_->reg); + MachineInstr *MI = I.skipInstruction();) { + if (MI->isDebugValue() || !usingInstrs_.insert(MI)) + continue; + MachineBasicBlock *MBB = MI->getParent(); + if (usingBlocks_[MBB]++) + continue; + if (MachineLoop *Loop = loops_.getLoopFor(MBB)) + usingLoops_.insert(Loop); + } + DEBUG(dbgs() << "Counted " + << usingInstrs_.size() << " instrs, " + << usingBlocks_.size() << " blocks, " + << usingLoops_.size() << " loops in " + << *curli_ << "\n"); +} + +SplitAnalysis::LoopPeripheralUse +SplitAnalysis::analyzeLoopPeripheralUse(const MachineLoop *Loop) { + // Peripheral blocks. + SmallVector Peri; + Loop->getExitBlocks(Peri); + if (MachineBasicBlock *PredBB = Loop->getLoopPredecessor()) + Peri.push_back(PredBB); + array_pod_sort(Peri.begin(), Peri.end()); + Peri.erase(std::unique(Peri.begin(), Peri.end()), Peri.end()); + + LoopPeripheralUse use = ContainedInLoop; + for (BlockCountMap::iterator I = usingBlocks_.begin(), E = usingBlocks_.end(); + I != E; ++I) { + const MachineBasicBlock *MBB = I->first; + // Is this a peripheral block? + if (use < MultiPeripheral && + std::binary_search(Peri.begin(), Peri.end(), MBB)) { + if (I->second > 1) use = MultiPeripheral; + else use = SinglePeripheral; + continue; + } + // Is it a loop block? + if (Loop->contains(MBB)) + continue; + // It must be an unrelated block. + return OutsideLoop; + } + return use; +} + +void SplitAnalysis::analyze(const LiveInterval *li) { + clear(); + curli_ = li; + analyseUses(); +} + +const MachineLoop *SplitAnalysis::getBestSplitLoop() { + LoopPtrSet Loops, SecondLoops; + + // Find first-class and second class candidate loops. + // We prefer to split around loops where curli is used outside the periphery. + for (LoopPtrSet::const_iterator I = usingLoops_.begin(), + E = usingLoops_.end(); I != E; ++I) + switch(analyzeLoopPeripheralUse(*I)) { + case OutsideLoop: + Loops.insert(*I); + break; + case MultiPeripheral: + SecondLoops.insert(*I); + break; + default: + continue; + } + + // If there are no first class loops available, look at second class loops. + if (Loops.empty()) + Loops = SecondLoops; + + if (Loops.empty()) + return 0; + + // Pick the earliest loop. + // FIXME: Are there other heuristics to consider? + // - avoid breaking critical edges. + // - avoid impossible loops. + const MachineLoop *Best = 0; + SlotIndex BestIdx; + for (LoopPtrSet::const_iterator I = Loops.begin(), E = Loops.end(); I != E; + ++I) { + SlotIndex Idx = lis_.getMBBStartIdx((*I)->getHeader()); + if (!Best || Idx < BestIdx) + Best = *I, BestIdx = Idx; + } + return Best; +} + +//===----------------------------------------------------------------------===// +// Loop Splitting +//===----------------------------------------------------------------------===// + +bool llvm::splitAroundLoop(SplitAnalysis &sa, const MachineLoop *loop) { + return false; +} + Added: llvm/trunk/lib/CodeGen/SplitKit.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SplitKit.h?rev=108842&view=auto ============================================================================== --- llvm/trunk/lib/CodeGen/SplitKit.h (added) +++ llvm/trunk/lib/CodeGen/SplitKit.h Tue Jul 20 10:41:07 2010 @@ -0,0 +1,86 @@ +//===---------- SplitKit.cpp - Toolkit for splitting live ranges ----------===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file contains the SplitAnalysis class as well as mutator functions for +// live range splitting. +// +//===----------------------------------------------------------------------===// + +#include "llvm/ADT/SmallPtrSet.h" +#include "llvm/ADT/DenseMap.h" + +namespace llvm { + +class LiveInterval; +class LiveIntervals; +class MachineBasicBlock; +class MachineInstr; +class MachineFunction; +class MachineFunctionPass; +class MachineLoop; +class MachineLoopInfo; + +class SplitAnalysis { + const MachineFunction &mf_; + const LiveIntervals &lis_; + const MachineLoopInfo &loops_; + + // Current live interval. + const LiveInterval *curli_; + + // Instructions using the the current register. + typedef SmallPtrSet InstrPtrSet; + InstrPtrSet usingInstrs_; + + // The number of instructions using curli in each basic block. + typedef DenseMap BlockCountMap; + BlockCountMap usingBlocks_; + + // Loops where the curent interval is used. + typedef SmallPtrSet LoopPtrSet; + LoopPtrSet usingLoops_; + + // Sumarize statistics by counting instructions using curli_. + void analyseUses(); + +public: + SplitAnalysis(const MachineFunction *mf, const LiveIntervals *lis, + const MachineLoopInfo *mli); + + /// analyze - set curli to the specified interval, and analyze how it may be + /// split. + void analyze(const LiveInterval *li); + + /// clear - clear all data structures so SplitAnalysis is ready to analyze a + /// new interval. + void clear(); + + /// LoopPeripheralUse - how is a variable used in and around a loop? + /// Peripheral blocks are the loop predecessors and exit blocks. + enum LoopPeripheralUse { + ContainedInLoop, // All uses are inside the loop. + SinglePeripheral, // At most one instruction per peripheral block. + MultiPeripheral, // Multiple instructions in some peripheral blocks. + OutsideLoop // Uses outside loop periphery. + }; + + /// analyzeLoopPeripheralUse - Return an enum describing how curli_ is used in + /// and around the Loop. + LoopPeripheralUse analyzeLoopPeripheralUse(const MachineLoop*); + + /// getBestSplitLoop - Return the loop where curli may best be split to a + /// separate register, or NULL. + const MachineLoop *getBestSplitLoop(); +}; + +/// splitAroundLoop - Try to split curli into a separate live interval inside +/// the loop. Retun true on success. +bool splitAroundLoop(SplitAnalysis&, const MachineLoop*); + +} From baldrick at free.fr Tue Jul 20 10:52:32 2010 From: baldrick at free.fr (Duncan Sands) Date: Tue, 20 Jul 2010 15:52:32 -0000 Subject: [llvm-commits] [llvm] r108843 - /llvm/trunk/test/CodeGen/X86/fast-isel-atomic.ll Message-ID: <20100720155232.7F3E32A6C12C@llvm.org> Author: baldrick Date: Tue Jul 20 10:52:32 2010 New Revision: 108843 URL: http://llvm.org/viewvc/llvm-project?rev=108843&view=rev Log: The same problem was being tracked in PR7652. Modified: llvm/trunk/test/CodeGen/X86/fast-isel-atomic.ll Modified: llvm/trunk/test/CodeGen/X86/fast-isel-atomic.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/fast-isel-atomic.ll?rev=108843&r1=108842&r2=108843&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/fast-isel-atomic.ll (original) +++ llvm/trunk/test/CodeGen/X86/fast-isel-atomic.ll Tue Jul 20 10:52:32 2010 @@ -1,5 +1,6 @@ ; RUN: llc < %s -O0 -march=x86-64 ; rdar://8204072 +; PR7652 @sc = external global i8 @uc = external global i8 From stoklund at 2pi.dk Tue Jul 20 10:58:14 2010 From: stoklund at 2pi.dk (Jakob Stoklund Olesen) Date: Tue, 20 Jul 2010 08:58:14 -0700 Subject: [llvm-commits] [llvm] r108816 - in /llvm/trunk: lib/Target/Mips/MipsISelLowering.cpp test/CodeGen/Mips/2010-07-20-Select.ll In-Reply-To: <20100720075852.236BA2A6C12D@llvm.org> References: <20100720075852.236BA2A6C12D@llvm.org> Message-ID: <0A488632-7B9A-4DBB-AB33-3FA6D96A9FAF@2pi.dk> On Jul 20, 2010, at 12:58 AM, Bruno Cardoso Lopes wrote: > Author: bruno > Date: Tue Jul 20 02:58:51 2010 > New Revision: 108816 > > URL: http://llvm.org/viewvc/llvm-project?rev=108816&view=rev > Log: > Fix Mips PR7473. Patch by stetorvs at gmail.com > > Added: > llvm/trunk/test/CodeGen/Mips/2010-07-20-Select.ll > Modified: > llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp > > Modified: llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp?rev=108816&r1=108815&r2=108816&view=diff > ============================================================================== > --- llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp (original) > +++ llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp Tue Jul 20 02:58:51 2010 > @@ -317,13 +317,13 @@ > BB->addSuccessor(sinkMBB); > > // sinkMBB: > - // %Result = phi [ %FalseValue, copy0MBB ], [ %TrueValue, thisMBB ] > + // %Result = phi [ %TrueValue, thisMBB ], [ %FalseValue, copy0MBB ] > // ... > BB = sinkMBB; > BuildMI(*BB, BB->begin(), dl, > TII->get(Mips::PHI), MI->getOperand(0).getReg()) > - .addReg(MI->getOperand(2).getReg()).addMBB(copy0MBB) > - .addReg(MI->getOperand(3).getReg()).addMBB(thisMBB); > + .addReg(MI->getOperand(2).getReg()).addMBB(thisMBB) > + .addReg(MI->getOperand(3).getReg()).addMBB(copy0MBB); > > MI->eraseFromParent(); // The pseudo instruction is gone now. > return BB; Hi Bruno, The change to the comment doesn't match the change to the code. Was that on purpose? /jakob From grosbach at apple.com Tue Jul 20 11:07:04 2010 From: grosbach at apple.com (Jim Grosbach) Date: Tue, 20 Jul 2010 16:07:04 -0000 Subject: [llvm-commits] [llvm] r108844 - /llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td Message-ID: <20100720160704.9C57D2A6C12C@llvm.org> Author: grosbach Date: Tue Jul 20 11:07:04 2010 New Revision: 108844 URL: http://llvm.org/viewvc/llvm-project?rev=108844&view=rev Log: Using BIC for immediates needs an extra bump for its complexity to get instruction selection to prefer it when possible. rdar://7903972 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=108844&r1=108843&r2=108844&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td (original) +++ llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td Tue Jul 20 11:07:04 2010 @@ -1686,6 +1686,7 @@ defm t2MVN : T2I_un_irs <0b0011, "mvn", UnOpFrag<(not node:$Src)>, 1, 1>; +let AddedComplexity = 1 in def : T2Pat<(and GPR:$src, t2_so_imm_not:$imm), (t2BICri GPR:$src, t2_so_imm_not:$imm)>; From stoklund at 2pi.dk Tue Jul 20 11:12:37 2010 From: stoklund at 2pi.dk (Jakob Stoklund Olesen) Date: Tue, 20 Jul 2010 16:12:37 -0000 Subject: [llvm-commits] [llvm] r108845 - in /llvm/trunk/lib/CodeGen: SplitKit.cpp SplitKit.h Message-ID: <20100720161237.D55C92A6C12C@llvm.org> Author: stoklund Date: Tue Jul 20 11:12:37 2010 New Revision: 108845 URL: http://llvm.org/viewvc/llvm-project?rev=108845&view=rev Log: Appease the colonials. Modified: llvm/trunk/lib/CodeGen/SplitKit.cpp llvm/trunk/lib/CodeGen/SplitKit.h Modified: llvm/trunk/lib/CodeGen/SplitKit.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SplitKit.cpp?rev=108845&r1=108844&r2=108845&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SplitKit.cpp (original) +++ llvm/trunk/lib/CodeGen/SplitKit.cpp Tue Jul 20 11:12:37 2010 @@ -42,8 +42,8 @@ usingLoops_.clear(); } -/// analyseUses - Count instructions, basic blocks, and loops using curli. -void SplitAnalysis::analyseUses() { +/// analyzeUses - Count instructions, basic blocks, and loops using curli. +void SplitAnalysis::analyzeUses() { const MachineRegisterInfo &MRI = mf_.getRegInfo(); for (MachineRegisterInfo::reg_iterator I = MRI.reg_begin(curli_->reg); MachineInstr *MI = I.skipInstruction();) { @@ -95,7 +95,7 @@ void SplitAnalysis::analyze(const LiveInterval *li) { clear(); curli_ = li; - analyseUses(); + analyzeUses(); } const MachineLoop *SplitAnalysis::getBestSplitLoop() { Modified: llvm/trunk/lib/CodeGen/SplitKit.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SplitKit.h?rev=108845&r1=108844&r2=108845&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SplitKit.h (original) +++ llvm/trunk/lib/CodeGen/SplitKit.h Tue Jul 20 11:12:37 2010 @@ -47,7 +47,7 @@ LoopPtrSet usingLoops_; // Sumarize statistics by counting instructions using curli_. - void analyseUses(); + void analyzeUses(); public: SplitAnalysis(const MachineFunction *mf, const LiveIntervals *lis, From grosbach at apple.com Tue Jul 20 11:16:49 2010 From: grosbach at apple.com (Jim Grosbach) Date: Tue, 20 Jul 2010 16:16:49 -0000 Subject: [llvm-commits] [llvm] r108846 - in /llvm/trunk/test/CodeGen/Thumb2: 2010-04-15-DynAllocBug.ll thumb2-and2.ll thumb2-uxtb.ll Message-ID: <20100720161649.1705C2A6C12C@llvm.org> Author: grosbach Date: Tue Jul 20 11:16:48 2010 New Revision: 108846 URL: http://llvm.org/viewvc/llvm-project?rev=108846&view=rev Log: update tests for smarter BIC usage Modified: llvm/trunk/test/CodeGen/Thumb2/2010-04-15-DynAllocBug.ll llvm/trunk/test/CodeGen/Thumb2/thumb2-and2.ll llvm/trunk/test/CodeGen/Thumb2/thumb2-uxtb.ll Modified: llvm/trunk/test/CodeGen/Thumb2/2010-04-15-DynAllocBug.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Thumb2/2010-04-15-DynAllocBug.ll?rev=108846&r1=108845&r2=108846&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/Thumb2/2010-04-15-DynAllocBug.ll (original) +++ llvm/trunk/test/CodeGen/Thumb2/2010-04-15-DynAllocBug.ll Tue Jul 20 11:16:48 2010 @@ -7,13 +7,11 @@ define void @t() nounwind ssp { entry: ; CHECK: t: -; CHECK: mov r0, sp -; CHECK: bfc r0, #0, #3 +; CHECK: bic r0, sp, #7 ; CHECK: subs r0, #16 ; CHECK: mov sp, r0 ; Yes, this is stupid codegen, but it's correct. -; CHECK: mov r0, sp -; CHECK: bfc r0, #0, #3 +; CHECK: bic r0, sp, #7 ; CHECK: subs r0, #16 ; CHECK: mov sp, r0 %size = mul i32 8, 2 Modified: llvm/trunk/test/CodeGen/Thumb2/thumb2-and2.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Thumb2/thumb2-and2.ll?rev=108846&r1=108845&r2=108846&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/Thumb2/thumb2-and2.ll (original) +++ llvm/trunk/test/CodeGen/Thumb2/thumb2-and2.ll Tue Jul 20 11:16:48 2010 @@ -30,7 +30,7 @@ ret i32 %tmp } ; CHECK: f4: -; CHECK: and r0, r0, #1448498774 +; CHECK: bic r0, r0, #-1448498775 ; 66846720 = 0x03fc0000 define i32 @f5(i32 %a) { Modified: llvm/trunk/test/CodeGen/Thumb2/thumb2-uxtb.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Thumb2/thumb2-uxtb.ll?rev=108846&r1=108845&r2=108846&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/Thumb2/thumb2-uxtb.ll (original) +++ llvm/trunk/test/CodeGen/Thumb2/thumb2-uxtb.ll Tue Jul 20 11:16:48 2010 @@ -6,7 +6,7 @@ ; ARMv7A: uxtb16 r0, r0 ; ARMv7M: test1 -; ARMv7M: and r0, r0, #16711935 +; ARMv7M: bic r0, r0, #-16711936 %tmp1 = and i32 %x, 16711935 ; [#uses=1] ret i32 %tmp1 } From gohman at apple.com Tue Jul 20 11:32:11 2010 From: gohman at apple.com (Dan Gohman) Date: Tue, 20 Jul 2010 16:32:11 -0000 Subject: [llvm-commits] [llvm] r108848 - /llvm/trunk/lib/Analysis/ScalarEvolutionNormalization.cpp Message-ID: <20100720163211.3445A2A6C12C@llvm.org> Author: djg Date: Tue Jul 20 11:32:11 2010 New Revision: 108848 URL: http://llvm.org/viewvc/llvm-project?rev=108848&view=rev Log: Minor code cleanups. Modified: llvm/trunk/lib/Analysis/ScalarEvolutionNormalization.cpp Modified: llvm/trunk/lib/Analysis/ScalarEvolutionNormalization.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ScalarEvolutionNormalization.cpp?rev=108848&r1=108847&r2=108848&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/ScalarEvolutionNormalization.cpp (original) +++ llvm/trunk/lib/Analysis/ScalarEvolutionNormalization.cpp Tue Jul 20 11:32:11 2010 @@ -69,6 +69,7 @@ DominatorTree &DT) { if (isa(S) || isa(S)) return S; + if (const SCEVCastExpr *X = dyn_cast(S)) { const SCEV *O = X->getOperand(); const SCEV *N = TransformForPostIncUse(Kind, O, User, OperandValToReplace, @@ -82,9 +83,11 @@ } return S; } + if (const SCEVNAryExpr *X = dyn_cast(S)) { SmallVector Operands; bool Changed = false; + // Transform each operand. for (SCEVNAryExpr::op_iterator I = X->op_begin(), E = X->op_end(); I != E; ++I) { const SCEV *O = *I; @@ -134,6 +137,7 @@ } return S; } + if (const SCEVUDivExpr *X = dyn_cast(S)) { const SCEV *LO = X->getLHS(); const SCEV *RO = X->getRHS(); @@ -145,6 +149,7 @@ return SE.getUDivExpr(LN, RN); return S; } + llvm_unreachable("Unexpected SCEV kind!"); return 0; } From ggreif at gmail.com Tue Jul 20 11:32:20 2010 From: ggreif at gmail.com (Gabor Greif) Date: Tue, 20 Jul 2010 16:32:20 -0000 Subject: [llvm-commits] [llvm] r108849 - /llvm/trunk/unittests/Support/Casting.cpp Message-ID: <20100720163220.A43C72A6C12C@llvm.org> Author: ggreif Date: Tue Jul 20 11:32:20 2010 New Revision: 108849 URL: http://llvm.org/viewvc/llvm-project?rev=108849&view=rev Log: initial checkin for unittest to exercise Support/Casting.h this is still minimal on purpose, but I plan to migrate the ugly hack under #ifdef DEBUG_CAST_OPERATORS into this file Added: llvm/trunk/unittests/Support/Casting.cpp Added: llvm/trunk/unittests/Support/Casting.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/Support/Casting.cpp?rev=108849&view=auto ============================================================================== --- llvm/trunk/unittests/Support/Casting.cpp (added) +++ llvm/trunk/unittests/Support/Casting.cpp Tue Jul 20 11:32:20 2010 @@ -0,0 +1,32 @@ +//===---------- llvm/unittest/Support/Casting.cpp - Casting tests --------===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "llvm/Support/raw_ostream.h" +#include "llvm/Support/Debug.h" +#define DEBUG_CAST_OPERATORS +#include "llvm/Support/Casting.h" + +#include "gtest/gtest.h" +#include + +using namespace llvm; + +namespace { + +extern bar &B1; +extern const bar *B2; + +TEST(CastingTest, Basics) { + EXPECT_TRUE(isa(B1)); +} + +bar B; +bar &B1 = B; +const bar *B2 = &B; +} // anonymous namespace From gohman at apple.com Tue Jul 20 11:34:50 2010 From: gohman at apple.com (Dan Gohman) Date: Tue, 20 Jul 2010 16:34:50 -0000 Subject: [llvm-commits] [llvm] r108850 - /llvm/trunk/lib/Analysis/ScalarEvolutionNormalization.cpp Message-ID: <20100720163450.D18A12A6C12C@llvm.org> Author: djg Date: Tue Jul 20 11:34:50 2010 New Revision: 108850 URL: http://llvm.org/viewvc/llvm-project?rev=108850&view=rev Log: Change an argument from an Instruction* to a Value*, which is all that is needed here. Modified: llvm/trunk/lib/Analysis/ScalarEvolutionNormalization.cpp Modified: llvm/trunk/lib/Analysis/ScalarEvolutionNormalization.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ScalarEvolutionNormalization.cpp?rev=108850&r1=108849&r2=108850&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/ScalarEvolutionNormalization.cpp (original) +++ llvm/trunk/lib/Analysis/ScalarEvolutionNormalization.cpp Tue Jul 20 11:34:50 2010 @@ -26,7 +26,7 @@ /// post-inc value when we cannot) or it can end up adding extra live-ranges to /// the loop, resulting in reg-reg copies (if we use the pre-inc value when we /// should use the post-inc value). -static bool IVUseShouldUsePostIncValue(Instruction *User, Instruction *IV, +static bool IVUseShouldUsePostIncValue(Instruction *User, Value *Operand, const Loop *L, DominatorTree *DT) { // If the user is in the loop, use the preinc value. if (L->contains(User)) return false; @@ -47,15 +47,15 @@ PHINode *PN = dyn_cast(User); if (!PN) return false; // not a phi, not dominated by latch block. - // Look at all of the uses of IV by the PHI node. If any use corresponds to - // a block that is not dominated by the latch block, give up and use the + // Look at all of the uses of Operand by the PHI node. If any use corresponds + // to a block that is not dominated by the latch block, give up and use the // preincremented value. for (unsigned i = 0, e = PN->getNumIncomingValues(); i != e; ++i) - if (PN->getIncomingValue(i) == IV && + if (PN->getIncomingValue(i) == Operand && !DT->dominates(LatchBlock, PN->getIncomingBlock(i))) return false; - // Okay, all uses of IV by PN are in predecessor blocks that really are + // Okay, all uses of Operand by PN are in predecessor blocks that really are // dominated by the latch block. Use the post-incremented value. return true; } From ggreif at gmail.com Tue Jul 20 11:38:13 2010 From: ggreif at gmail.com (Gabor Greif) Date: Tue, 20 Jul 2010 16:38:13 -0000 Subject: [llvm-commits] [llvm] r108851 - /llvm/trunk/unittests/Support/Casting.cpp Message-ID: <20100720163813.20B412A6C12C@llvm.org> Author: ggreif Date: Tue Jul 20 11:38:12 2010 New Revision: 108851 URL: http://llvm.org/viewvc/llvm-project?rev=108851&view=rev Log: isa<> tests Modified: llvm/trunk/unittests/Support/Casting.cpp Modified: llvm/trunk/unittests/Support/Casting.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/Support/Casting.cpp?rev=108851&r1=108850&r2=108851&view=diff ============================================================================== --- llvm/trunk/unittests/Support/Casting.cpp (original) +++ llvm/trunk/unittests/Support/Casting.cpp Tue Jul 20 11:38:12 2010 @@ -22,8 +22,14 @@ extern bar &B1; extern const bar *B2; -TEST(CastingTest, Basics) { +TEST(CastingTest, isa) { + // test various configurations of const + const bar &B3 = B1; + const bar *const B4 = B2; EXPECT_TRUE(isa(B1)); + EXPECT_TRUE(isa(B2)); + EXPECT_TRUE(isa(B3)); + EXPECT_TRUE(isa(B4)); } bar B; From gohman at apple.com Tue Jul 20 11:44:52 2010 From: gohman at apple.com (Dan Gohman) Date: Tue, 20 Jul 2010 16:44:52 -0000 Subject: [llvm-commits] [llvm] r108852 - in /llvm/trunk: include/llvm/Analysis/ScalarEvolutionExpander.h lib/Analysis/ScalarEvolutionExpander.cpp Message-ID: <20100720164452.41B462A6C12D@llvm.org> Author: djg Date: Tue Jul 20 11:44:52 2010 New Revision: 108852 URL: http://llvm.org/viewvc/llvm-project?rev=108852&view=rev Log: Make getOrInsertCanonicalInductionVariable guarantee that its result is a PHINode*. Modified: llvm/trunk/include/llvm/Analysis/ScalarEvolutionExpander.h llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp Modified: llvm/trunk/include/llvm/Analysis/ScalarEvolutionExpander.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/ScalarEvolutionExpander.h?rev=108852&r1=108851&r2=108852&view=diff ============================================================================== --- llvm/trunk/include/llvm/Analysis/ScalarEvolutionExpander.h (original) +++ llvm/trunk/include/llvm/Analysis/ScalarEvolutionExpander.h Tue Jul 20 11:44:52 2010 @@ -76,7 +76,8 @@ /// canonical induction variable of the specified type for the specified /// loop (inserting one if there is none). A canonical induction variable /// starts at zero and steps by one on each iteration. - Value *getOrInsertCanonicalInductionVariable(const Loop *L, const Type *Ty); + PHINode *getOrInsertCanonicalInductionVariable(const Loop *L, + const Type *Ty); /// expandCodeFor - Insert code to directly compute the specified SCEV /// expression into the program. The inserted code is inserted into the Modified: llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp?rev=108852&r1=108851&r2=108852&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp (original) +++ llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp Tue Jul 20 11:44:52 2010 @@ -1349,7 +1349,7 @@ /// canonical induction variable of the specified type for the specified /// loop (inserting one if there is none). A canonical induction variable /// starts at zero and steps by one on each iteration. -Value * +PHINode * SCEVExpander::getOrInsertCanonicalInductionVariable(const Loop *L, const Type *Ty) { assert(Ty->isIntegerTy() && "Can only insert integer induction variables!"); @@ -1357,7 +1357,7 @@ SE.getConstant(Ty, 1), L); BasicBlock *SaveInsertBB = Builder.GetInsertBlock(); BasicBlock::iterator SaveInsertPt = Builder.GetInsertPoint(); - Value *V = expandCodeFor(H, 0, L->getHeader()->begin()); + PHINode *V = cast(expandCodeFor(H, 0, L->getHeader()->begin())); if (SaveInsertBB) restoreInsertPoint(SaveInsertBB, SaveInsertPt); return V; From gohman at apple.com Tue Jul 20 11:46:58 2010 From: gohman at apple.com (Dan Gohman) Date: Tue, 20 Jul 2010 16:46:58 -0000 Subject: [llvm-commits] [llvm] r108853 - /llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp Message-ID: <20100720164658.704E32A6C12C@llvm.org> Author: djg Date: Tue Jul 20 11:46:58 2010 New Revision: 108853 URL: http://llvm.org/viewvc/llvm-project?rev=108853&view=rev Log: Simplify this code; LoopInfo::getCanonicalInductionVariable will only find integer induction variables. Modified: llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp Modified: llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp?rev=108853&r1=108852&r2=108853&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp (original) +++ llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp Tue Jul 20 11:46:58 2010 @@ -1059,9 +1059,7 @@ // First check for an existing canonical IV in a suitable type. PHINode *CanonicalIV = 0; if (PHINode *PN = L->getCanonicalInductionVariable()) - if (SE.isSCEVable(PN->getType()) && - SE.getEffectiveSCEVType(PN->getType())->isIntegerTy() && - SE.getTypeSizeInBits(PN->getType()) >= SE.getTypeSizeInBits(Ty)) + if (SE.getTypeSizeInBits(PN->getType()) >= SE.getTypeSizeInBits(Ty)) CanonicalIV = PN; // Rewrite an AddRec in terms of the canonical induction variable, if @@ -1353,12 +1351,17 @@ SCEVExpander::getOrInsertCanonicalInductionVariable(const Loop *L, const Type *Ty) { assert(Ty->isIntegerTy() && "Can only insert integer induction variables!"); + + // Build a SCEV for {0,+,1}. const SCEV *H = SE.getAddRecExpr(SE.getConstant(Ty, 0), SE.getConstant(Ty, 1), L); + + // Emit code for it. BasicBlock *SaveInsertBB = Builder.GetInsertBlock(); BasicBlock::iterator SaveInsertPt = Builder.GetInsertPoint(); PHINode *V = cast(expandCodeFor(H, 0, L->getHeader()->begin())); if (SaveInsertBB) restoreInsertPoint(SaveInsertBB, SaveInsertPt); + return V; } From ggreif at gmail.com Tue Jul 20 11:51:18 2010 From: ggreif at gmail.com (Gabor Greif) Date: Tue, 20 Jul 2010 16:51:18 -0000 Subject: [llvm-commits] [llvm] r108854 - /llvm/trunk/unittests/Support/Casting.cpp Message-ID: <20100720165118.CD9242A6C12C@llvm.org> Author: ggreif Date: Tue Jul 20 11:51:18 2010 New Revision: 108854 URL: http://llvm.org/viewvc/llvm-project?rev=108854&view=rev Log: extend to cast<> and cast_or_null<> tests Modified: llvm/trunk/unittests/Support/Casting.cpp Modified: llvm/trunk/unittests/Support/Casting.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/Support/Casting.cpp?rev=108854&r1=108853&r2=108854&view=diff ============================================================================== --- llvm/trunk/unittests/Support/Casting.cpp (original) +++ llvm/trunk/unittests/Support/Casting.cpp Tue Jul 20 11:51:18 2010 @@ -19,19 +19,47 @@ namespace { +const foo *null_foo = NULL; + extern bar &B1; extern const bar *B2; +// test various configurations of const +const bar &B3 = B1; +const bar *const B4 = B2; TEST(CastingTest, isa) { - // test various configurations of const - const bar &B3 = B1; - const bar *const B4 = B2; EXPECT_TRUE(isa(B1)); EXPECT_TRUE(isa(B2)); EXPECT_TRUE(isa(B3)); EXPECT_TRUE(isa(B4)); } +TEST(CastingTest, cast) { + foo &F1 = cast(B1); + EXPECT_NE(&F1, null_foo); + const foo *F3 = cast(B2); + EXPECT_NE(F3, null_foo); + const foo *F4 = cast(B2); + EXPECT_NE(F4, null_foo); + const foo &F8 = cast(B3); + EXPECT_NE(&F8, null_foo); + const foo *F9 = cast(B4); + EXPECT_NE(F9, null_foo); + foo *F10 = cast(fub()); + EXPECT_EQ(F10, null_foo); +} + +TEST(CastingTest, cast_or_null) { + const foo *F11 = cast_or_null(B2); + EXPECT_NE(F11, null_foo); + const foo *F12 = cast_or_null(B2); + EXPECT_NE(F12, null_foo); + const foo *F13 = cast_or_null(B4); + EXPECT_NE(F13, null_foo); + const foo *F14 = cast_or_null(fub()); // Shouldn't print. + EXPECT_EQ(F14, null_foo); +} + bar B; bar &B1 = B; const bar *B2 = &B; From gohman at apple.com Tue Jul 20 11:53:00 2010 From: gohman at apple.com (Dan Gohman) Date: Tue, 20 Jul 2010 16:53:00 -0000 Subject: [llvm-commits] [llvm] r108855 - /llvm/trunk/lib/Analysis/ScalarEvolution.cpp Message-ID: <20100720165300.449702A6C12C@llvm.org> Author: djg Date: Tue Jul 20 11:53:00 2010 New Revision: 108855 URL: http://llvm.org/viewvc/llvm-project?rev=108855&view=rev Log: Add a fast path for x - x. Modified: llvm/trunk/lib/Analysis/ScalarEvolution.cpp Modified: llvm/trunk/lib/Analysis/ScalarEvolution.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ScalarEvolution.cpp?rev=108855&r1=108854&r2=108855&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/ScalarEvolution.cpp (original) +++ llvm/trunk/lib/Analysis/ScalarEvolution.cpp Tue Jul 20 11:53:00 2010 @@ -2442,6 +2442,10 @@ /// const SCEV *ScalarEvolution::getMinusSCEV(const SCEV *LHS, const SCEV *RHS) { + // Fast path: X - X --> 0. + if (LHS == RHS) + return getConstant(LHS->getType(), 0); + // X - Y --> X + -Y return getAddExpr(LHS, getNegativeSCEV(RHS)); } From resistor at mac.com Tue Jul 20 11:55:05 2010 From: resistor at mac.com (Owen Anderson) Date: Tue, 20 Jul 2010 16:55:05 -0000 Subject: [llvm-commits] [llvm] r108856 - in /llvm/trunk: include/llvm/PassSupport.h lib/VMCore/PassManager.cpp Message-ID: <20100720165505.454E22A6C12C@llvm.org> Author: resistor Date: Tue Jul 20 11:55:05 2010 New Revision: 108856 URL: http://llvm.org/viewvc/llvm-project?rev=108856&view=rev Log: Pull out r108755. After offline discussion with Chris, we're going to go a different direction with this. Modified: llvm/trunk/include/llvm/PassSupport.h llvm/trunk/lib/VMCore/PassManager.cpp Modified: llvm/trunk/include/llvm/PassSupport.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/PassSupport.h?rev=108856&r1=108855&r2=108856&view=diff ============================================================================== --- llvm/trunk/include/llvm/PassSupport.h (original) +++ llvm/trunk/include/llvm/PassSupport.h Tue Jul 20 11:55:05 2010 @@ -36,10 +36,6 @@ class PassInfo { public: typedef Pass* (*NormalCtor_t)(); - struct InterfaceInfo { - const PassInfo *interface; - const InterfaceInfo *next; - }; private: const char *const PassName; // Nice name for Pass @@ -48,7 +44,7 @@ const bool IsCFGOnlyPass; // Pass only looks at the CFG. const bool IsAnalysis; // True if an analysis pass. const bool IsAnalysisGroup; // True if an analysis group. - const InterfaceInfo *ItfImpl;// Interfaces implemented by this pass + std::vector ItfImpl;// Interfaces implemented by this pass NormalCtor_t NormalCtor; @@ -120,16 +116,13 @@ /// template. /// void addInterfaceImplemented(const PassInfo *ItfPI) { - InterfaceInfo *NewInfo = new InterfaceInfo(); - NewInfo->interface = ItfPI; - NewInfo->next = ItfImpl; - ItfImpl = NewInfo; + ItfImpl.push_back(ItfPI); } /// getInterfacesImplemented - Return a list of all of the analysis group /// interfaces implemented by this pass. /// - const InterfaceInfo *getInterfacesImplemented() const { + const std::vector &getInterfacesImplemented() const { return ItfImpl; } Modified: llvm/trunk/lib/VMCore/PassManager.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/PassManager.cpp?rev=108856&r1=108855&r2=108856&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/PassManager.cpp (original) +++ llvm/trunk/lib/VMCore/PassManager.cpp Tue Jul 20 11:55:05 2010 @@ -638,14 +638,10 @@ // If Pass not found then check the interfaces implemented by Immutable Pass if (!P) { - const PassInfo::InterfaceInfo *ImmPI = PI->getInterfacesImplemented(); - while (ImmPI) { - if (ImmPI->interface == AID) { - P = *I; - break; - } else - ImmPI = ImmPI->next; - } + const std::vector &ImmPI = + PI->getInterfacesImplemented(); + if (std::find(ImmPI.begin(), ImmPI.end(), AID) != ImmPI.end()) + P = *I; } } @@ -735,11 +731,9 @@ //This pass is the current implementation of all of the interfaces it //implements as well. - const PassInfo::InterfaceInfo *II = PI->getInterfacesImplemented(); - while (II) { - AvailableAnalysis[II->interface] = P; - II = II->next; - } + const std::vector &II = PI->getInterfacesImplemented(); + for (unsigned i = 0, e = II.size(); i != e; ++i) + AvailableAnalysis[II[i]] = P; } // Return true if P preserves high level analysis used by other @@ -873,13 +867,12 @@ // Remove all interfaces this pass implements, for which it is also // listed as the available implementation. - const PassInfo::InterfaceInfo *II = PI->getInterfacesImplemented(); - while (II) { + const std::vector &II = PI->getInterfacesImplemented(); + for (unsigned i = 0, e = II.size(); i != e; ++i) { std::map::iterator Pos = - AvailableAnalysis.find(II->interface); + AvailableAnalysis.find(II[i]); if (Pos != AvailableAnalysis.end() && Pos->second == P) AvailableAnalysis.erase(Pos); - II = II->next; } } } From gohman at apple.com Tue Jul 20 12:06:20 2010 From: gohman at apple.com (Dan Gohman) Date: Tue, 20 Jul 2010 17:06:20 -0000 Subject: [llvm-commits] [llvm] r108863 - in /llvm/trunk: lib/Analysis/ScalarEvolutionNormalization.cpp test/CodeGen/X86/lsr-normalization.ll Message-ID: <20100720170620.488292A6C12C@llvm.org> Author: djg Date: Tue Jul 20 12:06:20 2010 New Revision: 108863 URL: http://llvm.org/viewvc/llvm-project?rev=108863&view=rev Log: Fix SCEV denormalization of expressions where the exit value from one loop is involved in the increment of an addrec for another loop. This fixes rdar://8168938. Added: llvm/trunk/test/CodeGen/X86/lsr-normalization.ll Modified: llvm/trunk/lib/Analysis/ScalarEvolutionNormalization.cpp Modified: llvm/trunk/lib/Analysis/ScalarEvolutionNormalization.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ScalarEvolutionNormalization.cpp?rev=108863&r1=108862&r2=108863&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/ScalarEvolutionNormalization.cpp (original) +++ llvm/trunk/lib/Analysis/ScalarEvolutionNormalization.cpp Tue Jul 20 12:06:20 2010 @@ -45,7 +45,7 @@ // their uses occur in the predecessor block, not the block the PHI lives in) // should still use the post-inc value. Check for this case now. PHINode *PN = dyn_cast(User); - if (!PN) return false; // not a phi, not dominated by latch block. + if (!PN || !Operand) return false; // not a phi, not dominated by latch block. // Look at all of the uses of Operand by the PHI node. If any use corresponds // to a block that is not dominated by the latch block, give up and use the @@ -84,6 +84,59 @@ return S; } + if (const SCEVAddRecExpr *AR = dyn_cast(S)) { + // An addrec. This is the interesting part. + SmallVector Operands; + const Loop *L = AR->getLoop(); + // The addrec conceptually uses its operands at loop entry. + Instruction *LUser = L->getHeader()->begin(); + // Transform each operand. + for (SCEVNAryExpr::op_iterator I = AR->op_begin(), E = AR->op_end(); + I != E; ++I) { + const SCEV *O = *I; + const SCEV *N = TransformForPostIncUse(Kind, O, LUser, 0, Loops, SE, DT); + Operands.push_back(N); + } + const SCEV *Result = SE.getAddRecExpr(Operands, L); + switch (Kind) { + default: llvm_unreachable("Unexpected transform name!"); + case NormalizeAutodetect: + if (IVUseShouldUsePostIncValue(User, OperandValToReplace, L, &DT)) { + const SCEV *TransformedStep = + TransformForPostIncUse(Kind, AR->getStepRecurrence(SE), + User, OperandValToReplace, Loops, SE, DT); + Result = SE.getMinusSCEV(Result, TransformedStep); + Loops.insert(L); + } +#ifdef XDEBUG + assert(S == TransformForPostIncUse(Denormalize, Result, + User, OperandValToReplace, + Loops, SE, DT) && + "SCEV normalization is not invertible!"); +#endif + break; + case Normalize: + if (Loops.count(L)) { + const SCEV *TransformedStep = + TransformForPostIncUse(Kind, AR->getStepRecurrence(SE), + User, OperandValToReplace, Loops, SE, DT); + Result = SE.getMinusSCEV(Result, TransformedStep); + } +#ifdef XDEBUG + assert(S == TransformForPostIncUse(Denormalize, Result, + User, OperandValToReplace, + Loops, SE, DT) && + "SCEV normalization is not invertible!"); +#endif + break; + case Denormalize: + if (Loops.count(L)) + Result = cast(Result)->getPostIncExpr(SE); + break; + } + return Result; + } + if (const SCEVNAryExpr *X = dyn_cast(S)) { SmallVector Operands; bool Changed = false; @@ -96,37 +149,7 @@ Changed |= N != O; Operands.push_back(N); } - if (const SCEVAddRecExpr *AR = dyn_cast(S)) { - // An addrec. This is the interesting part. - const Loop *L = AR->getLoop(); - const SCEV *Result = SE.getAddRecExpr(Operands, L); - switch (Kind) { - default: llvm_unreachable("Unexpected transform name!"); - case NormalizeAutodetect: - if (Instruction *OI = dyn_cast(OperandValToReplace)) - if (IVUseShouldUsePostIncValue(User, OI, L, &DT)) { - const SCEV *TransformedStep = - TransformForPostIncUse(Kind, AR->getStepRecurrence(SE), - User, OperandValToReplace, Loops, SE, DT); - Result = SE.getMinusSCEV(Result, TransformedStep); - Loops.insert(L); - } - break; - case Normalize: - if (Loops.count(L)) { - const SCEV *TransformedStep = - TransformForPostIncUse(Kind, AR->getStepRecurrence(SE), - User, OperandValToReplace, Loops, SE, DT); - Result = SE.getMinusSCEV(Result, TransformedStep); - } - break; - case Denormalize: - if (Loops.count(L)) - Result = SE.getAddExpr(Result, AR->getStepRecurrence(SE)); - break; - } - return Result; - } + // If any operand actually changed, return a transformed result. if (Changed) switch (S->getSCEVType()) { case scAddExpr: return SE.getAddExpr(Operands); Added: llvm/trunk/test/CodeGen/X86/lsr-normalization.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/lsr-normalization.ll?rev=108863&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/X86/lsr-normalization.ll (added) +++ llvm/trunk/test/CodeGen/X86/lsr-normalization.ll Tue Jul 20 12:06:20 2010 @@ -0,0 +1,99 @@ +; RUN: llc < %s -march=x86-64 | grep div | count 1 +; rdar://8168938 + +; This testcase involves SCEV normalization with the exit value from +; one loop involved with the increment value for an addrec on another +; loop. The expression should be properly normalized and simplified, +; and require only a single division. + +%0 = type { %0*, %0* } + + at 0 = private constant [13 x i8] c"Result: %lu\0A\00" ; <[13 x i8]*> [#uses=1] + at 1 = internal constant [5 x i8] c"Huh?\00" ; <[5 x i8]*> [#uses=1] + +define i32 @main(i32 %arg, i8** nocapture %arg1) nounwind { +bb: + %tmp = alloca %0, align 8 ; <%0*> [#uses=11] + %tmp2 = bitcast %0* %tmp to i8* ; [#uses=1] + call void @llvm.memset.p0i8.i64(i8* %tmp2, i8 0, i64 16, i32 8, i1 false) nounwind + %tmp3 = getelementptr inbounds %0* %tmp, i64 0, i32 0 ; <%0**> [#uses=3] + store %0* %tmp, %0** %tmp3 + %tmp4 = getelementptr inbounds %0* %tmp, i64 0, i32 1 ; <%0**> [#uses=1] + store %0* %tmp, %0** %tmp4 + %tmp5 = call noalias i8* @_Znwm(i64 24) nounwind ; [#uses=2] + %tmp6 = getelementptr inbounds i8* %tmp5, i64 16 ; [#uses=2] + %tmp7 = icmp eq i8* %tmp6, null ; [#uses=1] + br i1 %tmp7, label %bb10, label %bb8 + +bb8: ; preds = %bb + %tmp9 = bitcast i8* %tmp6 to i32* ; [#uses=1] + store i32 1, i32* %tmp9 + br label %bb10 + +bb10: ; preds = %bb8, %bb + %tmp11 = bitcast i8* %tmp5 to %0* ; <%0*> [#uses=1] + call void @_ZNSt15_List_node_base4hookEPS_(%0* %tmp11, %0* %tmp) nounwind + %tmp12 = load %0** %tmp3 ; <%0*> [#uses=3] + %tmp13 = icmp eq %0* %tmp12, %tmp ; [#uses=1] + br i1 %tmp13, label %bb14, label %bb16 + +bb14: ; preds = %bb10 + %tmp15 = call i32 @puts(i8* getelementptr inbounds ([5 x i8]* @1, i64 0, i64 0)) + br label %bb35 + +bb16: ; preds = %bb16, %bb10 + %tmp17 = phi i64 [ %tmp22, %bb16 ], [ 0, %bb10 ] ; [#uses=1] + %tmp18 = phi %0* [ %tmp20, %bb16 ], [ %tmp12, %bb10 ] ; <%0*> [#uses=1] + %tmp19 = getelementptr inbounds %0* %tmp18, i64 0, i32 0 ; <%0**> [#uses=1] + %tmp20 = load %0** %tmp19 ; <%0*> [#uses=2] + %tmp21 = icmp eq %0* %tmp20, %tmp ; [#uses=1] + %tmp22 = add i64 %tmp17, 1 ; [#uses=2] + br i1 %tmp21, label %bb23, label %bb16 + +bb23: ; preds = %bb16 + %tmp24 = udiv i64 100, %tmp22 ; [#uses=1] + br label %bb25 + +bb25: ; preds = %bb25, %bb23 + %tmp26 = phi i64 [ %tmp31, %bb25 ], [ 0, %bb23 ] ; [#uses=1] + %tmp27 = phi %0* [ %tmp29, %bb25 ], [ %tmp12, %bb23 ] ; <%0*> [#uses=1] + %tmp28 = getelementptr inbounds %0* %tmp27, i64 0, i32 0 ; <%0**> [#uses=1] + %tmp29 = load %0** %tmp28 ; <%0*> [#uses=2] + %tmp30 = icmp eq %0* %tmp29, %tmp ; [#uses=1] + %tmp31 = add i64 %tmp26, 1 ; [#uses=2] + br i1 %tmp30, label %bb32, label %bb25 + +bb32: ; preds = %bb25 + %tmp33 = mul i64 %tmp31, %tmp24 ; [#uses=1] + %tmp34 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([13 x i8]* @0, i64 0, i64 0), i64 %tmp33) nounwind + br label %bb35 + +bb35: ; preds = %bb32, %bb14 + %tmp36 = load %0** %tmp3 ; <%0*> [#uses=2] + %tmp37 = icmp eq %0* %tmp36, %tmp ; [#uses=1] + br i1 %tmp37, label %bb44, label %bb38 + +bb38: ; preds = %bb38, %bb35 + %tmp39 = phi %0* [ %tmp41, %bb38 ], [ %tmp36, %bb35 ] ; <%0*> [#uses=2] + %tmp40 = getelementptr inbounds %0* %tmp39, i64 0, i32 0 ; <%0**> [#uses=1] + %tmp41 = load %0** %tmp40 ; <%0*> [#uses=2] + %tmp42 = bitcast %0* %tmp39 to i8* ; [#uses=1] + call void @_ZdlPv(i8* %tmp42) nounwind + %tmp43 = icmp eq %0* %tmp41, %tmp ; [#uses=1] + br i1 %tmp43, label %bb44, label %bb38 + +bb44: ; preds = %bb38, %bb35 + ret i32 0 +} + +declare i32 @printf(i8* nocapture, ...) nounwind + +declare void @_ZNSt15_List_node_base4hookEPS_(%0*, %0*) + +declare noalias i8* @_Znwm(i64) + +declare void @llvm.memset.p0i8.i64(i8* nocapture, i8, i64, i32, i1) nounwind + +declare void @_ZdlPv(i8*) nounwind + +declare i32 @puts(i8* nocapture) nounwind From ggreif at gmail.com Tue Jul 20 12:06:28 2010 From: ggreif at gmail.com (Gabor Greif) Date: Tue, 20 Jul 2010 17:06:28 -0000 Subject: [llvm-commits] [llvm] r108864 - /llvm/trunk/unittests/Support/Casting.cpp Message-ID: <20100720170628.D45DB2A6C12C@llvm.org> Author: ggreif Date: Tue Jul 20 12:06:28 2010 New Revision: 108864 URL: http://llvm.org/viewvc/llvm-project?rev=108864&view=rev Log: migrate essentially everything from under #ifdef DEBUG_CAST_OPERATORS into this file Modified: llvm/trunk/unittests/Support/Casting.cpp Modified: llvm/trunk/unittests/Support/Casting.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/Support/Casting.cpp?rev=108864&r1=108863&r2=108864&view=diff ============================================================================== --- llvm/trunk/unittests/Support/Casting.cpp (original) +++ llvm/trunk/unittests/Support/Casting.cpp Tue Jul 20 12:06:28 2010 @@ -9,12 +9,47 @@ #include "llvm/Support/raw_ostream.h" #include "llvm/Support/Debug.h" -#define DEBUG_CAST_OPERATORS +//#define DEBUG_CAST_OPERATORS #include "llvm/Support/Casting.h" #include "gtest/gtest.h" #include + +namespace llvm { + +// set up two example classes +// with conversion facility +// +struct bar { + bar() {} + //struct foo *baz(); +private: + bar(const bar &); +}; +struct foo { + void ext() const; + /* static bool classof(const bar *X) { + cerr << "Classof: " << X << "\n"; + return true; + }*/ +}; + +template <> struct isa_impl { + static inline bool doit(const bar &Val) { + dbgs() << "Classof: " << &Val << "\n"; + return true; + } +}; + +/*foo *bar::baz() { + return cast(this); +}*/ + + +bar *fub(); +} // End llvm namespace + using namespace llvm; namespace { @@ -41,12 +76,15 @@ EXPECT_NE(F3, null_foo); const foo *F4 = cast(B2); EXPECT_NE(F4, null_foo); - const foo &F8 = cast(B3); - EXPECT_NE(&F8, null_foo); - const foo *F9 = cast(B4); - EXPECT_NE(F9, null_foo); - foo *F10 = cast(fub()); - EXPECT_EQ(F10, null_foo); + const foo &F5 = cast(B3); + EXPECT_NE(&F5, null_foo); + const foo *F6 = cast(B4); + EXPECT_NE(F6, null_foo); + foo *F7 = cast(fub()); + EXPECT_EQ(F7, null_foo); + +/* foo *F8 = B1.baz(); + EXPECT_NE(F8, null_foo);*/ } TEST(CastingTest, cast_or_null) { @@ -60,7 +98,17 @@ EXPECT_EQ(F14, null_foo); } +// These lines are errors... +//foo *F20 = cast(B2); // Yields const foo* +//foo &F21 = cast(B3); // Yields const foo& +//foo *F22 = cast(B4); // Yields const foo* +//foo &F23 = cast_or_null(B1); +//const foo &F24 = cast_or_null(B3); + + bar B; bar &B1 = B; const bar *B2 = &B; } // anonymous namespace + +bar *llvm::fub() { return 0; } From gohman at apple.com Tue Jul 20 12:18:52 2010 From: gohman at apple.com (Dan Gohman) Date: Tue, 20 Jul 2010 17:18:52 -0000 Subject: [llvm-commits] [llvm] r108865 - /llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp Message-ID: <20100720171852.4608B2A6C12C@llvm.org> Author: djg Date: Tue Jul 20 12:18:52 2010 New Revision: 108865 URL: http://llvm.org/viewvc/llvm-project?rev=108865&view=rev Log: Remember that the induction variable is always a PHINode and use getIncomingValueForBlock instead of LoopInfo::getCanonicalInductionVariableIncrement. Modified: llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp Modified: llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp?rev=108865&r1=108864&r2=108865&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp Tue Jul 20 12:18:52 2010 @@ -102,7 +102,7 @@ void RewriteNonIntegerIVs(Loop *L); ICmpInst *LinearFunctionTestReplace(Loop *L, const SCEV *BackedgeTakenCount, - Value *IndVar, + PHINode *IndVar, BasicBlock *ExitingBlock, BranchInst *BI, SCEVExpander &Rewriter); @@ -131,7 +131,7 @@ /// is actually a much broader range than just linear tests. ICmpInst *IndVarSimplify::LinearFunctionTestReplace(Loop *L, const SCEV *BackedgeTakenCount, - Value *IndVar, + PHINode *IndVar, BasicBlock *ExitingBlock, BranchInst *BI, SCEVExpander &Rewriter) { @@ -181,7 +181,7 @@ // The BackedgeTaken expression contains the number of times that the // backedge branches to the loop header. This is one less than the // number of times the loop executes, so use the incremented indvar. - CmpIndVar = L->getCanonicalInductionVariableIncrement(); + CmpIndVar = IndVar->getIncomingValueForBlock(ExitingBlock); } else { // We have to use the preincremented value... RHS = SE->getTruncateOrZeroExtend(BackedgeTakenCount, @@ -534,7 +534,7 @@ // Now that we know the largest of the induction variable expressions // in this loop, insert a canonical induction variable of the largest size. - Value *IndVar = 0; + PHINode *IndVar = 0; if (NeedCannIV) { // Check to see if the loop already has any canonical-looking induction // variables. If any are present and wider than the planned canonical From ggreif at gmail.com Tue Jul 20 12:20:25 2010 From: ggreif at gmail.com (Gabor Greif) Date: Tue, 20 Jul 2010 17:20:25 -0000 Subject: [llvm-commits] [llvm] r108868 - /llvm/trunk/include/llvm/Support/Casting.h Message-ID: <20100720172025.9E6C42A6C12C@llvm.org> Author: ggreif Date: Tue Jul 20 12:20:25 2010 New Revision: 108868 URL: http://llvm.org/viewvc/llvm-project?rev=108868&view=rev Log: remove testing cruft, this can be found in unittests/Support/Casting.cpp now Modified: llvm/trunk/include/llvm/Support/Casting.h Modified: llvm/trunk/include/llvm/Support/Casting.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/Casting.h?rev=108868&r1=108867&r2=108868&view=diff ============================================================================== --- llvm/trunk/include/llvm/Support/Casting.h (original) +++ llvm/trunk/include/llvm/Support/Casting.h Tue Jul 20 12:20:25 2010 @@ -236,73 +236,6 @@ return (Val && isa(Val)) ? cast(Val) : 0; } - -#ifdef DEBUG_CAST_OPERATORS -#include "llvm/Support/raw_ostream.h" - -struct bar { - bar() {} -private: - bar(const bar &); -}; -struct foo { - void ext() const; - /* static bool classof(const bar *X) { - cerr << "Classof: " << X << "\n"; - return true; - }*/ -}; - -template <> struct isa_impl { - static inline bool doit(const bar &Val) { - dbgs() << "Classof: " << &Val << "\n"; - return true; - } -}; - - -bar *fub(); -void test(bar &B1, const bar *B2) { - // test various configurations of const - const bar &B3 = B1; - const bar *const B4 = B2; - - // test isa - if (!isa(B1)) return; - if (!isa(B2)) return; - if (!isa(B3)) return; - if (!isa(B4)) return; - - // test cast - foo &F1 = cast(B1); - const foo *F3 = cast(B2); - const foo *F4 = cast(B2); - const foo &F8 = cast(B3); - const foo *F9 = cast(B4); - foo *F10 = cast(fub()); - - // test cast_or_null - const foo *F11 = cast_or_null(B2); - const foo *F12 = cast_or_null(B2); - const foo *F13 = cast_or_null(B4); - const foo *F14 = cast_or_null(fub()); // Shouldn't print. - - // These lines are errors... - //foo *F20 = cast(B2); // Yields const foo* - //foo &F21 = cast(B3); // Yields const foo& - //foo *F22 = cast(B4); // Yields const foo* - //foo &F23 = cast_or_null(B1); - //const foo &F24 = cast_or_null(B3); -} - -bar *fub() { return 0; } -void main() { - bar B; - test(B, &B); -} - -#endif - } // End llvm namespace #endif From clattner at apple.com Tue Jul 20 12:25:33 2010 From: clattner at apple.com (Chris Lattner) Date: Tue, 20 Jul 2010 10:25:33 -0700 Subject: [llvm-commits] [llvm] r108868 - /llvm/trunk/include/llvm/Support/Casting.h In-Reply-To: <20100720172025.9E6C42A6C12C@llvm.org> References: <20100720172025.9E6C42A6C12C@llvm.org> Message-ID: On Jul 20, 2010, at 10:20 AM, Gabor Greif wrote: > Author: ggreif > Date: Tue Jul 20 12:20:25 2010 > New Revision: 108868 > > URL: http://llvm.org/viewvc/llvm-project?rev=108868&view=rev > Log: > remove testing cruft, this can be found in unittests/Support/Casting.cpp now Woot, thanks! From dalej at apple.com Tue Jul 20 13:04:44 2010 From: dalej at apple.com (Dale Johannesen) Date: Tue, 20 Jul 2010 11:04:44 -0700 Subject: [llvm-commits] [llvm] r108792 - /llvm/trunk/lib/CodeGen/MachineLICM.cpp In-Reply-To: References: <20100720005013.3E7A92A6C12C@llvm.org> Message-ID: <7B0E8857-ACD2-418A-96E0-64F019AE3E0C@apple.com> On Jul 19, 2010, at 7:01 PMPDT, Evan Cheng wrote: >> >> const std::vector &Children = N->getChildren(); >> - for (unsigned I = 0, E = Children.size(); I != E; ++I) >> - HoistRegion(Children[I]); >> + // Don't hoist things out of a large switch statement. This >> often causes >> + // code to be hoisted that wasn't going to be executed, and >> increases >> + // register pressure in a situation where it's likely to matter. >> + if (Children.size() < 10) > > How would this work? This doesn't seem like a good way to determine > if the loop body contains a switch statement. You're right, I meant to count successors. Fixing. From sabre at nondot.org Tue Jul 20 13:25:19 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 20 Jul 2010 18:25:19 -0000 Subject: [llvm-commits] [llvm] r108869 - in /llvm/trunk: ./ include/llvm-c/ lib/MC/ lib/MC/MCDisassembler/ tools/ tools/edis/ tools/llvm-mc/ Message-ID: <20100720182519.A8DD92A6C12C@llvm.org> Author: lattner Date: Tue Jul 20 13:25:19 2010 New Revision: 108869 URL: http://llvm.org/viewvc/llvm-project?rev=108869&view=rev Log: start straightening out libedis's dependencies and make it fit better in the llvm world. Among other things, this changes: 1. The guts of libedis are now moved into lib/MC/MCDisassembler 2. llvm-mc now depends on lib/MC/MCDisassembler, not tools/edis, so edis and mc don't have to be built in series. 3. lib/MC/MCDisassembler no longer depends on the C api, the C API depends on it. 4. Various code cleanup changes. There is still a lot to be done to make edis fit with the llvm design, but this is an incremental step in the right direction. Added: llvm/trunk/lib/MC/MCDisassembler/ llvm/trunk/lib/MC/MCDisassembler/EDDisassembler.cpp - copied, changed from r108847, llvm/trunk/tools/edis/EDDisassembler.cpp llvm/trunk/lib/MC/MCDisassembler/EDDisassembler.h - copied, changed from r108847, llvm/trunk/tools/edis/EDDisassembler.h llvm/trunk/lib/MC/MCDisassembler/EDInst.cpp - copied, changed from r108847, llvm/trunk/tools/edis/EDInst.cpp llvm/trunk/lib/MC/MCDisassembler/EDInst.h - copied, changed from r108847, llvm/trunk/tools/edis/EDInst.h llvm/trunk/lib/MC/MCDisassembler/EDOperand.cpp - copied, changed from r108847, llvm/trunk/tools/edis/EDOperand.cpp llvm/trunk/lib/MC/MCDisassembler/EDOperand.h - copied, changed from r108847, llvm/trunk/tools/edis/EDOperand.h llvm/trunk/lib/MC/MCDisassembler/EDToken.cpp - copied, changed from r108847, llvm/trunk/tools/edis/EDToken.cpp llvm/trunk/lib/MC/MCDisassembler/EDToken.h - copied, changed from r108847, llvm/trunk/tools/edis/EDToken.h llvm/trunk/tools/edis/EDMain.cpp - copied, changed from r108847, llvm/trunk/tools/edis/EDMain.cpp Removed: llvm/trunk/tools/edis/EDDisassembler.cpp llvm/trunk/tools/edis/EDDisassembler.h llvm/trunk/tools/edis/EDInst.cpp llvm/trunk/tools/edis/EDInst.h llvm/trunk/tools/edis/EDOperand.cpp llvm/trunk/tools/edis/EDOperand.h llvm/trunk/tools/edis/EDToken.cpp llvm/trunk/tools/edis/EDToken.h Modified: llvm/trunk/CMakeLists.txt llvm/trunk/include/llvm-c/EnhancedDisassembly.h llvm/trunk/lib/MC/Makefile llvm/trunk/tools/Makefile llvm/trunk/tools/llvm-mc/CMakeLists.txt llvm/trunk/tools/llvm-mc/Disassembler.cpp llvm/trunk/tools/llvm-mc/Makefile Modified: llvm/trunk/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/CMakeLists.txt?rev=108869&r1=108868&r2=108869&view=diff ============================================================================== --- llvm/trunk/CMakeLists.txt (original) +++ llvm/trunk/CMakeLists.txt Tue Jul 20 13:25:19 2010 @@ -308,6 +308,7 @@ add_subdirectory(lib/Analysis/IPA) add_subdirectory(lib/MC) add_subdirectory(lib/MC/MCParser) +add_subdirectory(lib/MC/MCDisassembler) add_subdirectory(test) add_subdirectory(utils/FileCheck) Modified: llvm/trunk/include/llvm-c/EnhancedDisassembly.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm-c/EnhancedDisassembly.h?rev=108869&r1=108868&r2=108869&view=diff ============================================================================== --- llvm/trunk/include/llvm-c/EnhancedDisassembly.h (original) +++ llvm/trunk/include/llvm-c/EnhancedDisassembly.h Tue Jul 20 13:25:19 2010 @@ -51,41 +51,38 @@ @typedef EDAssemblySyntax_t An assembly syntax for use in tokenizing instructions. */ -typedef enum { +enum { /*! @constant kEDAssemblySyntaxX86Intel Intel syntax for i386 and x86_64. */ kEDAssemblySyntaxX86Intel = 0, /*! @constant kEDAssemblySyntaxX86ATT AT&T syntax for i386 and x86_64. */ kEDAssemblySyntaxX86ATT = 1, kEDAssemblySyntaxARMUAL = 2 -} EDAssemblySyntax_t; +}; +typedef unsigned EDAssemblySyntax_t; /*! @typedef EDDisassemblerRef Encapsulates a disassembler for a single CPU architecture. */ -struct EDDisassembler; -typedef struct EDDisassembler *EDDisassemblerRef; +typedef void *EDDisassemblerRef; /*! @typedef EDInstRef Encapsulates a single disassembled instruction in one assembly syntax. */ -struct EDInst; -typedef struct EDInst *EDInstRef; +typedef void *EDInstRef; /*! @typedef EDTokenRef Encapsulates a token from the disassembly of an instruction. */ -struct EDToken; -typedef struct EDToken *EDTokenRef; +typedef void *EDTokenRef; /*! @typedef EDOperandRef Encapsulates an operand of an instruction. */ -struct EDOperand; -typedef struct EDOperand *EDOperandRef; +typedef void *EDOperandRef; /*! @functiongroup Getting a disassembler Copied: llvm/trunk/lib/MC/MCDisassembler/EDDisassembler.cpp (from r108847, llvm/trunk/tools/edis/EDDisassembler.cpp) URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCDisassembler/EDDisassembler.cpp?p2=llvm/trunk/lib/MC/MCDisassembler/EDDisassembler.cpp&p1=llvm/trunk/tools/edis/EDDisassembler.cpp&r1=108847&r2=108869&rev=108869&view=diff ============================================================================== --- llvm/trunk/tools/edis/EDDisassembler.cpp (original) +++ llvm/trunk/lib/MC/MCDisassembler/EDDisassembler.cpp Tue Jul 20 13:25:19 2010 @@ -15,9 +15,6 @@ #include "EDDisassembler.h" #include "EDInst.h" - -#include "llvm/ADT/OwningPtr.h" -#include "llvm/ADT/SmallVector.h" #include "llvm/MC/EDInstInfo.h" #include "llvm/MC/MCAsmInfo.h" #include "llvm/MC/MCContext.h" @@ -38,7 +35,6 @@ #include "llvm/Target/TargetMachine.h" #include "llvm/Target/TargetRegisterInfo.h" #include "llvm/Target/TargetSelect.h" - using namespace llvm; bool EDDisassembler::sInitialized = false; @@ -79,22 +75,22 @@ /// @arg arch - The target architecture /// @arg syntax - The assembly syntax in sd form static int getLLVMSyntaxVariant(Triple::ArchType arch, - EDAssemblySyntax_t syntax) { + EDDisassembler::AssemblySyntax syntax) { switch (syntax) { default: return -1; // Mappings below from X86AsmPrinter.cpp - case kEDAssemblySyntaxX86ATT: + case EDDisassembler::kEDAssemblySyntaxX86ATT: if (arch == Triple::x86 || arch == Triple::x86_64) return 0; else return -1; - case kEDAssemblySyntaxX86Intel: + case EDDisassembler::kEDAssemblySyntaxX86Intel: if (arch == Triple::x86 || arch == Triple::x86_64) return 1; else return -1; - case kEDAssemblySyntaxARMUAL: + case EDDisassembler::kEDAssemblySyntaxARMUAL: if (arch == Triple::arm || arch == Triple::thumb) return 0; else @@ -118,7 +114,7 @@ #undef BRINGUP_TARGET EDDisassembler *EDDisassembler::getDisassembler(Triple::ArchType arch, - EDAssemblySyntax_t syntax) { + AssemblySyntax syntax) { CPUKey key; key.Arch = arch; key.Syntax = syntax; @@ -143,10 +139,8 @@ } EDDisassembler *EDDisassembler::getDisassembler(StringRef str, - EDAssemblySyntax_t syntax) { - Triple triple(str); - - return getDisassembler(triple.getArch(), syntax); + AssemblySyntax syntax) { + return getDisassembler(Triple(str).getArch(), syntax); } EDDisassembler::EDDisassembler(CPUKey &key) : Copied: llvm/trunk/lib/MC/MCDisassembler/EDDisassembler.h (from r108847, llvm/trunk/tools/edis/EDDisassembler.h) URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCDisassembler/EDDisassembler.h?p2=llvm/trunk/lib/MC/MCDisassembler/EDDisassembler.h&p1=llvm/trunk/tools/edis/EDDisassembler.h&r1=108847&r2=108869&rev=108869&view=diff ============================================================================== --- llvm/trunk/tools/edis/EDDisassembler.h (original) +++ llvm/trunk/lib/MC/MCDisassembler/EDDisassembler.h Tue Jul 20 13:25:19 2010 @@ -1,4 +1,4 @@ -//===-EDDisassembler.h - LLVM Enhanced Disassembler -------------*- C++ -*-===// +//===-- EDDisassembler.h - LLVM Enhanced Disassembler -----------*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -13,13 +13,11 @@ // //===----------------------------------------------------------------------===// -#ifndef EDDisassembler_ -#define EDDisassembler_ +#ifndef LLVM_EDDISASSEMBLER_H +#define LLVM_EDDISASSEMBLER_H #include "EDInfo.inc" -#include "llvm-c/EnhancedDisassembly.h" - #include "llvm/ADT/OwningPtr.h" #include "llvm/ADT/Triple.h" #include "llvm/Support/raw_ostream.h" @@ -27,7 +25,6 @@ #include #include -#include #include namespace llvm { @@ -51,11 +48,24 @@ class TargetRegisterInfo; struct EDInstInfo; -} +struct EDInst; +struct EDOperand; +struct EDToken; + +typedef int (*EDByteReaderCallback)(uint8_t *byte, uint64_t address, void *arg); /// EDDisassembler - Encapsulates a disassembler for a single architecture and /// disassembly syntax. Also manages the static disassembler registry. struct EDDisassembler { + typedef enum { + /*! @constant kEDAssemblySyntaxX86Intel Intel syntax for i386 and x86_64. */ + kEDAssemblySyntaxX86Intel = 0, + /*! @constant kEDAssemblySyntaxX86ATT AT&T syntax for i386 and x86_64. */ + kEDAssemblySyntaxX86ATT = 1, + kEDAssemblySyntaxARMUAL = 2 + } AssemblySyntax; + + //////////////////// // Static members // //////////////////// @@ -67,7 +77,7 @@ llvm::Triple::ArchType Arch; /// The assembly syntax - EDAssemblySyntax_t Syntax; + AssemblySyntax Syntax; /// operator== - Equality operator bool operator==(const CPUKey &key) const { @@ -98,7 +108,7 @@ /// @arg arch - The desired architecture /// @arg syntax - The desired disassembly syntax static EDDisassembler *getDisassembler(llvm::Triple::ArchType arch, - EDAssemblySyntax_t syntax); + AssemblySyntax syntax); /// getDisassembler - Returns the disassembler for a given combination of /// CPU type, CPU subtype, and assembly syntax, or NULL on failure @@ -107,7 +117,7 @@ /// "x86_64-apple-darwin" /// @arg syntax - The disassembly syntax for the required disassembler static EDDisassembler *getDisassembler(llvm::StringRef str, - EDAssemblySyntax_t syntax); + AssemblySyntax syntax); /// initialize - Initializes the disassembler registry and the LLVM backend static void initialize(); @@ -128,7 +138,7 @@ CPUKey Key; /// The LLVM target corresponding to the disassembler const llvm::Target *Tgt; - /// The target machien instance. + /// The target machine instance. llvm::OwningPtr TargetMachine; /// The assembly information for the target architecture llvm::OwningPtr AsmInfo; @@ -256,4 +266,6 @@ int llvmSyntaxVariant() const; }; +} // end namespace llvm + #endif Copied: llvm/trunk/lib/MC/MCDisassembler/EDInst.cpp (from r108847, llvm/trunk/tools/edis/EDInst.cpp) URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCDisassembler/EDInst.cpp?p2=llvm/trunk/lib/MC/MCDisassembler/EDInst.cpp&p1=llvm/trunk/tools/edis/EDInst.cpp&r1=108847&r2=108869&rev=108869&view=diff ============================================================================== --- llvm/trunk/tools/edis/EDInst.cpp (original) +++ llvm/trunk/lib/MC/MCDisassembler/EDInst.cpp Tue Jul 20 13:25:19 2010 @@ -13,8 +13,8 @@ // //===----------------------------------------------------------------------===// -#include "EDDisassembler.h" #include "EDInst.h" +#include "EDDisassembler.h" #include "EDOperand.h" #include "EDToken.h" Copied: llvm/trunk/lib/MC/MCDisassembler/EDInst.h (from r108847, llvm/trunk/tools/edis/EDInst.h) URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCDisassembler/EDInst.h?p2=llvm/trunk/lib/MC/MCDisassembler/EDInst.h&p1=llvm/trunk/tools/edis/EDInst.h&r1=108847&r2=108869&rev=108869&view=diff ============================================================================== --- llvm/trunk/tools/edis/EDInst.h (original) +++ llvm/trunk/lib/MC/MCDisassembler/EDInst.h Tue Jul 20 13:25:19 2010 @@ -1,4 +1,4 @@ -//===-EDInst.h - LLVM Enhanced Disassembler ---------------------*- C++ -*-===// +//===-- EDInst.h - LLVM Enhanced Disassembler -------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -13,19 +13,23 @@ // //===----------------------------------------------------------------------===// -#ifndef EDInst_ -#define EDInst_ - -#include "llvm-c/EnhancedDisassembly.h" +#ifndef LLVM_EDINST_H +#define LLVM_EDINST_H #include "llvm/ADT/SmallVector.h" - #include #include namespace llvm { + class MCInst; struct EDInstInfo; -} + struct EDToken; + struct EDDisassembler; + struct EDOperand; + +#ifdef __BLOCKS__ + typedef int (^EDTokenVisitor_t)(EDToken *token); +#endif /// CachedResult - Encapsulates the result of a function along with the validity /// of that result, so that slow functions don't need to run twice @@ -172,4 +176,6 @@ #endif }; +} // end namespace llvm + #endif Copied: llvm/trunk/lib/MC/MCDisassembler/EDOperand.cpp (from r108847, llvm/trunk/tools/edis/EDOperand.cpp) URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCDisassembler/EDOperand.cpp?p2=llvm/trunk/lib/MC/MCDisassembler/EDOperand.cpp&p1=llvm/trunk/tools/edis/EDOperand.cpp&r1=108847&r2=108869&rev=108869&view=diff ============================================================================== --- llvm/trunk/tools/edis/EDOperand.cpp (original) +++ llvm/trunk/lib/MC/MCDisassembler/EDOperand.cpp Tue Jul 20 13:25:19 2010 @@ -1,4 +1,4 @@ -//===-EDOperand.cpp - LLVM Enhanced Disassembler --------------------------===// +//===-- EDOperand.cpp - LLVM Enhanced Disassembler ------------------------===// // // The LLVM Compiler Infrastructure // @@ -13,13 +13,11 @@ // //===----------------------------------------------------------------------===// +#include "EDOperand.h" #include "EDDisassembler.h" #include "EDInst.h" -#include "EDOperand.h" - #include "llvm/MC/EDInstInfo.h" #include "llvm/MC/MCInst.h" - using namespace llvm; EDOperand::EDOperand(const EDDisassembler &disassembler, @@ -263,7 +261,7 @@ #ifdef __BLOCKS__ struct RegisterReaderWrapper { - EDRegisterBlock_t regBlock; + EDOperand::EDRegisterBlock_t regBlock; }; int readerWrapperCallback(uint64_t *value, Copied: llvm/trunk/lib/MC/MCDisassembler/EDOperand.h (from r108847, llvm/trunk/tools/edis/EDOperand.h) URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCDisassembler/EDOperand.h?p2=llvm/trunk/lib/MC/MCDisassembler/EDOperand.h&p1=llvm/trunk/tools/edis/EDOperand.h&r1=108847&r2=108869&rev=108869&view=diff ============================================================================== --- llvm/trunk/tools/edis/EDOperand.h (original) +++ llvm/trunk/lib/MC/MCDisassembler/EDOperand.h Tue Jul 20 13:25:19 2010 @@ -13,10 +13,19 @@ // //===----------------------------------------------------------------------===// -#ifndef EDOperand_ -#define EDOperand_ +#ifndef LLVM_EDOPERAND_H +#define LLVM_EDOPERAND_H + +#include "llvm/Support/DataTypes.h" + +namespace llvm { + +struct EDDisassembler; +struct EDInst; + +typedef int (*EDRegisterReaderCallback)(uint64_t *value, unsigned regID, + void* arg); -#include "llvm-c/EnhancedDisassembly.h" /// EDOperand - Encapsulates a single operand, which can be evaluated by the /// client @@ -69,10 +78,14 @@ int isMemory(); #ifdef __BLOCKS__ + typedef int (^EDRegisterBlock_t)(uint64_t *value, unsigned regID); + /// evaluate - Like evaluate for a callback, but uses a block instead int evaluate(uint64_t &result, EDRegisterBlock_t regBlock); #endif }; +} // end namespace llvm + #endif Copied: llvm/trunk/lib/MC/MCDisassembler/EDToken.cpp (from r108847, llvm/trunk/tools/edis/EDToken.cpp) URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCDisassembler/EDToken.cpp?p2=llvm/trunk/lib/MC/MCDisassembler/EDToken.cpp&p1=llvm/trunk/tools/edis/EDToken.cpp&r1=108847&r2=108869&rev=108869&view=diff ============================================================================== --- llvm/trunk/tools/edis/EDToken.cpp (original) +++ llvm/trunk/lib/MC/MCDisassembler/EDToken.cpp Tue Jul 20 13:25:19 2010 @@ -1,4 +1,4 @@ -//===-EDToken.cpp - LLVM Enhanced Disassembler ----------------------------===// +//===-- EDToken.cpp - LLVM Enhanced Disassembler --------------------------===// // // The LLVM Compiler Infrastructure // @@ -13,13 +13,11 @@ // //===----------------------------------------------------------------------===// -#include "EDDisassembler.h" #include "EDToken.h" - -#include "llvm/ADT/SmallVector.h" +#include "EDDisassembler.h" #include "llvm/MC/MCParser/MCAsmLexer.h" #include "llvm/MC/MCParser/MCParsedAsmOperand.h" - +#include "llvm/ADT/SmallVector.h" using namespace llvm; EDToken::EDToken(StringRef str, Copied: llvm/trunk/lib/MC/MCDisassembler/EDToken.h (from r108847, llvm/trunk/tools/edis/EDToken.h) URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCDisassembler/EDToken.h?p2=llvm/trunk/lib/MC/MCDisassembler/EDToken.h&p1=llvm/trunk/tools/edis/EDToken.h&r1=108847&r2=108869&rev=108869&view=diff ============================================================================== --- llvm/trunk/tools/edis/EDToken.h (original) +++ llvm/trunk/lib/MC/MCDisassembler/EDToken.h Tue Jul 20 13:25:19 2010 @@ -13,15 +13,17 @@ // //===----------------------------------------------------------------------===// -#ifndef EDToken_ -#define EDToken_ +#ifndef LLVM_EDTOKEN_H +#define LLVM_EDTOKEN_H -#include "llvm-c/EnhancedDisassembly.h" #include "llvm/ADT/StringRef.h" - #include #include +namespace llvm { + +struct EDDisassembler; + /// EDToken - Encapsulates a single token, which can provide a string /// representation of itself or interpret itself in various ways, depending /// on the token type. @@ -132,4 +134,5 @@ int getString(const char*& buf); }; +} // end namespace llvm #endif Modified: llvm/trunk/lib/MC/Makefile URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/Makefile?rev=108869&r1=108868&r2=108869&view=diff ============================================================================== --- llvm/trunk/lib/MC/Makefile (original) +++ llvm/trunk/lib/MC/Makefile Tue Jul 20 13:25:19 2010 @@ -10,7 +10,7 @@ LEVEL = ../.. LIBRARYNAME = LLVMMC BUILD_ARCHIVE := 1 -PARALLEL_DIRS := MCParser +PARALLEL_DIRS := MCParser MCDisassembler include $(LEVEL)/Makefile.common Modified: llvm/trunk/tools/Makefile URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/Makefile?rev=108869&r1=108868&r2=108869&view=diff ============================================================================== --- llvm/trunk/tools/Makefile (original) +++ llvm/trunk/tools/Makefile Tue Jul 20 13:25:19 2010 @@ -15,14 +15,11 @@ # NOTE: The tools are organized into five groups of four consisting of one # large and three small executables. This is done to minimize memory load # in parallel builds. Please retain this ordering. - -# libEnhancedDisassembly must be built ahead of llvm-mc -# because llvm-mc links against libEnhancedDisassembly -DIRS := llvm-config edis llvm-mc -PARALLEL_DIRS := opt llvm-as llvm-dis \ +DIRS := llvm-config +PARALLEL_DIRS := opt llvm-as llvm-dis edis \ llc llvm-ranlib llvm-ar llvm-nm \ llvm-ld llvm-prof llvm-link \ - lli llvm-extract \ + lli llvm-extract llvm-mc \ bugpoint llvm-bcanalyzer llvm-stub \ llvmc @@ -34,6 +31,7 @@ include $(LEVEL)/Makefile.config + # These libraries build as dynamic libraries (.dylib /.so), they can only be # built if ENABLE_PIC is set. ifeq ($(ENABLE_PIC),1) @@ -46,6 +44,14 @@ else PARALLEL_DIRS += lto endif + + # The edis library is only supported if ARM and/or X86 are enabled, and if + # LLVM is being built PIC on platforms that support dylibs. + ifneq ($(DISABLE_EDIS),1) + ifneq ($(filter $(TARGETS_TO_BUILD), X86 ARM),) + PARALLEL_DIRS := $(filter-out edis, $(PARALLEL_DIRS)) + endif + endif endif endif Removed: llvm/trunk/tools/edis/EDDisassembler.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/edis/EDDisassembler.cpp?rev=108868&view=auto ============================================================================== --- llvm/trunk/tools/edis/EDDisassembler.cpp (original) +++ llvm/trunk/tools/edis/EDDisassembler.cpp (removed) @@ -1,408 +0,0 @@ -//===-EDDisassembler.cpp - LLVM Enhanced Disassembler ---------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file implements the Enhanced Disassembly library's disassembler class. -// The disassembler is responsible for vending individual instructions according -// to a given architecture and disassembly syntax. -// -//===----------------------------------------------------------------------===// - -#include "EDDisassembler.h" -#include "EDInst.h" - -#include "llvm/ADT/OwningPtr.h" -#include "llvm/ADT/SmallVector.h" -#include "llvm/MC/EDInstInfo.h" -#include "llvm/MC/MCAsmInfo.h" -#include "llvm/MC/MCContext.h" -#include "llvm/MC/MCDisassembler.h" -#include "llvm/MC/MCExpr.h" -#include "llvm/MC/MCInst.h" -#include "llvm/MC/MCInstPrinter.h" -#include "llvm/MC/MCStreamer.h" -#include "llvm/MC/MCParser/AsmLexer.h" -#include "llvm/MC/MCParser/MCAsmParser.h" -#include "llvm/MC/MCParser/MCParsedAsmOperand.h" -#include "llvm/Support/MemoryBuffer.h" -#include "llvm/Support/MemoryObject.h" -#include "llvm/Support/SourceMgr.h" -#include "llvm/Target/TargetAsmLexer.h" -#include "llvm/Target/TargetAsmParser.h" -#include "llvm/Target/TargetRegistry.h" -#include "llvm/Target/TargetMachine.h" -#include "llvm/Target/TargetRegisterInfo.h" -#include "llvm/Target/TargetSelect.h" - -using namespace llvm; - -bool EDDisassembler::sInitialized = false; -EDDisassembler::DisassemblerMap_t EDDisassembler::sDisassemblers; - -struct TripleMap { - Triple::ArchType Arch; - const char *String; -}; - -static struct TripleMap triplemap[] = { - { Triple::x86, "i386-unknown-unknown" }, - { Triple::x86_64, "x86_64-unknown-unknown" }, - { Triple::arm, "arm-unknown-unknown" }, - { Triple::thumb, "thumb-unknown-unknown" }, - { Triple::InvalidArch, NULL, } -}; - -/// infoFromArch - Returns the TripleMap corresponding to a given architecture, -/// or NULL if there is an error -/// -/// @arg arch - The Triple::ArchType for the desired architecture -static const char *tripleFromArch(Triple::ArchType arch) { - unsigned int infoIndex; - - for (infoIndex = 0; triplemap[infoIndex].String != NULL; ++infoIndex) { - if (arch == triplemap[infoIndex].Arch) - return triplemap[infoIndex].String; - } - - return NULL; -} - -/// getLLVMSyntaxVariant - gets the constant to use to get an assembly printer -/// for the desired assembly syntax, suitable for passing to -/// Target::createMCInstPrinter() -/// -/// @arg arch - The target architecture -/// @arg syntax - The assembly syntax in sd form -static int getLLVMSyntaxVariant(Triple::ArchType arch, - EDAssemblySyntax_t syntax) { - switch (syntax) { - default: - return -1; - // Mappings below from X86AsmPrinter.cpp - case kEDAssemblySyntaxX86ATT: - if (arch == Triple::x86 || arch == Triple::x86_64) - return 0; - else - return -1; - case kEDAssemblySyntaxX86Intel: - if (arch == Triple::x86 || arch == Triple::x86_64) - return 1; - else - return -1; - case kEDAssemblySyntaxARMUAL: - if (arch == Triple::arm || arch == Triple::thumb) - return 0; - else - return -1; - } -} - -void EDDisassembler::initialize() { - if (sInitialized) - return; - - sInitialized = true; - - InitializeAllTargetInfos(); - InitializeAllTargets(); - InitializeAllAsmPrinters(); - InitializeAllAsmParsers(); - InitializeAllDisassemblers(); -} - -#undef BRINGUP_TARGET - -EDDisassembler *EDDisassembler::getDisassembler(Triple::ArchType arch, - EDAssemblySyntax_t syntax) { - CPUKey key; - key.Arch = arch; - key.Syntax = syntax; - - EDDisassembler::DisassemblerMap_t::iterator i = sDisassemblers.find(key); - - if (i != sDisassemblers.end()) { - return i->second; - } else { - EDDisassembler* sdd = new EDDisassembler(key); - if (!sdd->valid()) { - delete sdd; - return NULL; - } - - sDisassemblers[key] = sdd; - - return sdd; - } - - return NULL; -} - -EDDisassembler *EDDisassembler::getDisassembler(StringRef str, - EDAssemblySyntax_t syntax) { - Triple triple(str); - - return getDisassembler(triple.getArch(), syntax); -} - -EDDisassembler::EDDisassembler(CPUKey &key) : - Valid(false), - HasSemantics(false), - ErrorStream(nulls()), - Key(key) { - const char *triple = tripleFromArch(key.Arch); - - if (!triple) - return; - - LLVMSyntaxVariant = getLLVMSyntaxVariant(key.Arch, key.Syntax); - - if (LLVMSyntaxVariant < 0) - return; - - std::string tripleString(triple); - std::string errorString; - - Tgt = TargetRegistry::lookupTarget(tripleString, - errorString); - - if (!Tgt) - return; - - std::string featureString; - - TargetMachine.reset(Tgt->createTargetMachine(tripleString, - featureString)); - - const TargetRegisterInfo *registerInfo = TargetMachine->getRegisterInfo(); - - if (!registerInfo) - return; - - initMaps(*registerInfo); - - AsmInfo.reset(Tgt->createAsmInfo(tripleString)); - - if (!AsmInfo) - return; - - Disassembler.reset(Tgt->createMCDisassembler()); - - if (!Disassembler) - return; - - InstInfos = Disassembler->getEDInfo(); - - InstString.reset(new std::string); - InstStream.reset(new raw_string_ostream(*InstString)); - InstPrinter.reset(Tgt->createMCInstPrinter(LLVMSyntaxVariant, *AsmInfo)); - - if (!InstPrinter) - return; - - GenericAsmLexer.reset(new AsmLexer(*AsmInfo)); - SpecificAsmLexer.reset(Tgt->createAsmLexer(*AsmInfo)); - SpecificAsmLexer->InstallLexer(*GenericAsmLexer); - - initMaps(*TargetMachine->getRegisterInfo()); - - Valid = true; -} - -EDDisassembler::~EDDisassembler() { - if (!valid()) - return; -} - -namespace { - /// EDMemoryObject - a subclass of MemoryObject that allows use of a callback - /// as provided by the sd interface. See MemoryObject. - class EDMemoryObject : public llvm::MemoryObject { - private: - EDByteReaderCallback Callback; - void *Arg; - public: - EDMemoryObject(EDByteReaderCallback callback, - void *arg) : Callback(callback), Arg(arg) { } - ~EDMemoryObject() { } - uint64_t getBase() const { return 0x0; } - uint64_t getExtent() const { return (uint64_t)-1; } - int readByte(uint64_t address, uint8_t *ptr) const { - if (!Callback) - return -1; - - if (Callback(ptr, address, Arg)) - return -1; - - return 0; - } - }; -} - -EDInst *EDDisassembler::createInst(EDByteReaderCallback byteReader, - uint64_t address, - void *arg) { - EDMemoryObject memoryObject(byteReader, arg); - - MCInst* inst = new MCInst; - uint64_t byteSize; - - if (!Disassembler->getInstruction(*inst, - byteSize, - memoryObject, - address, - ErrorStream)) { - delete inst; - return NULL; - } else { - const llvm::EDInstInfo *thisInstInfo; - - thisInstInfo = &InstInfos[inst->getOpcode()]; - - EDInst* sdInst = new EDInst(inst, byteSize, *this, thisInstInfo); - return sdInst; - } -} - -void EDDisassembler::initMaps(const TargetRegisterInfo ®isterInfo) { - unsigned numRegisters = registerInfo.getNumRegs(); - unsigned registerIndex; - - for (registerIndex = 0; registerIndex < numRegisters; ++registerIndex) { - const char* registerName = registerInfo.get(registerIndex).Name; - - RegVec.push_back(registerName); - RegRMap[registerName] = registerIndex; - } - - switch (Key.Arch) { - default: - break; - case Triple::x86: - case Triple::x86_64: - stackPointers.insert(registerIDWithName("SP")); - stackPointers.insert(registerIDWithName("ESP")); - stackPointers.insert(registerIDWithName("RSP")); - - programCounters.insert(registerIDWithName("IP")); - programCounters.insert(registerIDWithName("EIP")); - programCounters.insert(registerIDWithName("RIP")); - break; - case Triple::arm: - case Triple::thumb: - stackPointers.insert(registerIDWithName("SP")); - - programCounters.insert(registerIDWithName("PC")); - break; - } -} - -const char *EDDisassembler::nameWithRegisterID(unsigned registerID) const { - if (registerID >= RegVec.size()) - return NULL; - else - return RegVec[registerID].c_str(); -} - -unsigned EDDisassembler::registerIDWithName(const char *name) const { - regrmap_t::const_iterator iter = RegRMap.find(std::string(name)); - if (iter == RegRMap.end()) - return 0; - else - return (*iter).second; -} - -bool EDDisassembler::registerIsStackPointer(unsigned registerID) { - return (stackPointers.find(registerID) != stackPointers.end()); -} - -bool EDDisassembler::registerIsProgramCounter(unsigned registerID) { - return (programCounters.find(registerID) != programCounters.end()); -} - -int EDDisassembler::printInst(std::string &str, MCInst &inst) { - PrinterMutex.acquire(); - - InstPrinter->printInst(&inst, *InstStream); - InstStream->flush(); - str = *InstString; - InstString->clear(); - - PrinterMutex.release(); - - return 0; -} - -int EDDisassembler::parseInst(SmallVectorImpl &operands, - SmallVectorImpl &tokens, - const std::string &str) { - int ret = 0; - - switch (Key.Arch) { - default: - return -1; - case Triple::x86: - case Triple::x86_64: - case Triple::arm: - case Triple::thumb: - break; - } - - const char *cStr = str.c_str(); - MemoryBuffer *buf = MemoryBuffer::getMemBuffer(cStr, cStr + strlen(cStr)); - - StringRef instName; - SMLoc instLoc; - - SourceMgr sourceMgr; - sourceMgr.AddNewSourceBuffer(buf, SMLoc()); // ownership of buf handed over - MCContext context(*AsmInfo); - OwningPtr streamer(createNullStreamer(context)); - OwningPtr genericParser(createMCAsmParser(*Tgt, sourceMgr, - context, *streamer, - *AsmInfo)); - OwningPtr TargetParser(Tgt->createAsmParser(*genericParser, - *TargetMachine)); - - AsmToken OpcodeToken = genericParser->Lex(); - AsmToken NextToken = genericParser->Lex(); // consume next token, because specificParser expects us to - - if (OpcodeToken.is(AsmToken::Identifier)) { - instName = OpcodeToken.getString(); - instLoc = OpcodeToken.getLoc(); - - if (NextToken.isNot(AsmToken::Eof) && - TargetParser->ParseInstruction(instName, instLoc, operands)) - ret = -1; - } else { - ret = -1; - } - - ParserMutex.acquire(); - - if (!ret) { - GenericAsmLexer->setBuffer(buf); - - while (SpecificAsmLexer->Lex(), - SpecificAsmLexer->isNot(AsmToken::Eof) && - SpecificAsmLexer->isNot(AsmToken::EndOfStatement)) { - if (SpecificAsmLexer->is(AsmToken::Error)) { - ret = -1; - break; - } - tokens.push_back(SpecificAsmLexer->getTok()); - } - } - - ParserMutex.release(); - - return ret; -} - -int EDDisassembler::llvmSyntaxVariant() const { - return LLVMSyntaxVariant; -} Removed: llvm/trunk/tools/edis/EDDisassembler.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/edis/EDDisassembler.h?rev=108868&view=auto ============================================================================== --- llvm/trunk/tools/edis/EDDisassembler.h (original) +++ llvm/trunk/tools/edis/EDDisassembler.h (removed) @@ -1,259 +0,0 @@ -//===-EDDisassembler.h - LLVM Enhanced Disassembler -------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines the interface for the Enhanced Disassembly library's -// disassembler class. The disassembler is responsible for vending individual -// instructions according to a given architecture and disassembly syntax. -// -//===----------------------------------------------------------------------===// - -#ifndef EDDisassembler_ -#define EDDisassembler_ - -#include "EDInfo.inc" - -#include "llvm-c/EnhancedDisassembly.h" - -#include "llvm/ADT/OwningPtr.h" -#include "llvm/ADT/Triple.h" -#include "llvm/Support/raw_ostream.h" -#include "llvm/System/Mutex.h" - -#include -#include -#include -#include - -namespace llvm { -class AsmLexer; -class AsmToken; -class MCContext; -class MCAsmInfo; -class MCAsmLexer; -class AsmParser; -class TargetAsmLexer; -class TargetAsmParser; -class MCDisassembler; -class MCInstPrinter; -class MCInst; -class MCParsedAsmOperand; -class MCStreamer; -template class SmallVectorImpl; -class SourceMgr; -class Target; -class TargetMachine; -class TargetRegisterInfo; - -struct EDInstInfo; -} - -/// EDDisassembler - Encapsulates a disassembler for a single architecture and -/// disassembly syntax. Also manages the static disassembler registry. -struct EDDisassembler { - //////////////////// - // Static members // - //////////////////// - - /// CPUKey - Encapsulates the descriptor of an architecture/disassembly-syntax - /// pair - struct CPUKey { - /// The architecture type - llvm::Triple::ArchType Arch; - - /// The assembly syntax - EDAssemblySyntax_t Syntax; - - /// operator== - Equality operator - bool operator==(const CPUKey &key) const { - return (Arch == key.Arch && - Syntax == key.Syntax); - } - - /// operator< - Less-than operator - bool operator<(const CPUKey &key) const { - if(Arch > key.Arch) - return false; - if(Syntax >= key.Syntax) - return false; - return true; - } - }; - - typedef std::map DisassemblerMap_t; - - /// True if the disassembler registry has been initialized; false if not - static bool sInitialized; - /// A map from disassembler specifications to disassemblers. Populated - /// lazily. - static DisassemblerMap_t sDisassemblers; - - /// getDisassembler - Returns the specified disassemble, or NULL on failure - /// - /// @arg arch - The desired architecture - /// @arg syntax - The desired disassembly syntax - static EDDisassembler *getDisassembler(llvm::Triple::ArchType arch, - EDAssemblySyntax_t syntax); - - /// getDisassembler - Returns the disassembler for a given combination of - /// CPU type, CPU subtype, and assembly syntax, or NULL on failure - /// - /// @arg str - The string representation of the architecture triple, e.g., - /// "x86_64-apple-darwin" - /// @arg syntax - The disassembly syntax for the required disassembler - static EDDisassembler *getDisassembler(llvm::StringRef str, - EDAssemblySyntax_t syntax); - - /// initialize - Initializes the disassembler registry and the LLVM backend - static void initialize(); - - //////////////////////// - // Per-object members // - //////////////////////// - - /// True only if the object has been successfully initialized - bool Valid; - /// True if the disassembler can provide semantic information - bool HasSemantics; - - /// The stream to write errors to - llvm::raw_ostream &ErrorStream; - - /// The architecture/syntax pair for the current architecture - CPUKey Key; - /// The LLVM target corresponding to the disassembler - const llvm::Target *Tgt; - /// The target machien instance. - llvm::OwningPtr TargetMachine; - /// The assembly information for the target architecture - llvm::OwningPtr AsmInfo; - /// The disassembler for the target architecture - llvm::OwningPtr Disassembler; - /// The output string for the instruction printer; must be guarded with - /// PrinterMutex - llvm::OwningPtr InstString; - /// The output stream for the disassembler; must be guarded with - /// PrinterMutex - llvm::OwningPtr InstStream; - /// The instruction printer for the target architecture; must be guarded with - /// PrinterMutex when printing - llvm::OwningPtr InstPrinter; - /// The mutex that guards the instruction printer's printing functions, which - /// use a shared stream - llvm::sys::Mutex PrinterMutex; - /// The array of instruction information provided by the TableGen backend for - /// the target architecture - const llvm::EDInstInfo *InstInfos; - /// The target-specific lexer for use in tokenizing strings, in - /// target-independent and target-specific portions - llvm::OwningPtr GenericAsmLexer; - llvm::OwningPtr SpecificAsmLexer; - /// The guard for the above - llvm::sys::Mutex ParserMutex; - /// The LLVM number used for the target disassembly syntax variant - int LLVMSyntaxVariant; - - typedef std::vector regvec_t; - typedef std::map regrmap_t; - - /// A vector of registers for quick mapping from LLVM register IDs to names - regvec_t RegVec; - /// A map of registers for quick mapping from register names to LLVM IDs - regrmap_t RegRMap; - - /// A set of register IDs for aliases of the stack pointer for the current - /// architecture - std::set stackPointers; - /// A set of register IDs for aliases of the program counter for the current - /// architecture - std::set programCounters; - - /// Constructor - initializes a disassembler with all the necessary objects, - /// which come pre-allocated from the registry accessor function - /// - /// @arg key - the architecture and disassembly syntax for the - /// disassembler - EDDisassembler(CPUKey& key); - - /// valid - reports whether there was a failure in the constructor. - bool valid() { - return Valid; - } - - /// hasSemantics - reports whether the disassembler can provide operands and - /// tokens. - bool hasSemantics() { - return HasSemantics; - } - - ~EDDisassembler(); - - /// createInst - creates and returns an instruction given a callback and - /// memory address, or NULL on failure - /// - /// @arg byteReader - A callback function that provides machine code bytes - /// @arg address - The address of the first byte of the instruction, - /// suitable for passing to byteReader - /// @arg arg - An opaque argument for byteReader - EDInst *createInst(EDByteReaderCallback byteReader, - uint64_t address, - void *arg); - - /// initMaps - initializes regVec and regRMap using the provided register - /// info - /// - /// @arg registerInfo - the register information to use as a source - void initMaps(const llvm::TargetRegisterInfo ®isterInfo); - /// nameWithRegisterID - Returns the name (owned by the EDDisassembler) of a - /// register for a given register ID, or NULL on failure - /// - /// @arg registerID - the ID of the register to be queried - const char *nameWithRegisterID(unsigned registerID) const; - /// registerIDWithName - Returns the ID of a register for a given register - /// name, or (unsigned)-1 on failure - /// - /// @arg name - The name of the register - unsigned registerIDWithName(const char *name) const; - - /// registerIsStackPointer - reports whether a register ID is an alias for the - /// stack pointer register - /// - /// @arg registerID - The LLVM register ID - bool registerIsStackPointer(unsigned registerID); - /// registerIsStackPointer - reports whether a register ID is an alias for the - /// stack pointer register - /// - /// @arg registerID - The LLVM register ID - bool registerIsProgramCounter(unsigned registerID); - - /// printInst - prints an MCInst to a string, returning 0 on success, or -1 - /// otherwise - /// - /// @arg str - A reference to a string which is filled in with the string - /// representation of the instruction - /// @arg inst - A reference to the MCInst to be printed - int printInst(std::string& str, - llvm::MCInst& inst); - - /// parseInst - extracts operands and tokens from a string for use in - /// tokenizing the string. Returns 0 on success, or -1 otherwise. - /// - /// @arg operands - A reference to a vector that will be filled in with the - /// parsed operands - /// @arg tokens - A reference to a vector that will be filled in with the - /// tokens - /// @arg str - The string representation of the instruction - int parseInst(llvm::SmallVectorImpl &operands, - llvm::SmallVectorImpl &tokens, - const std::string &str); - - /// llvmSyntaxVariant - returns the LLVM syntax variant for this disassembler - int llvmSyntaxVariant() const; -}; - -#endif Removed: llvm/trunk/tools/edis/EDInst.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/edis/EDInst.cpp?rev=108868&view=auto ============================================================================== --- llvm/trunk/tools/edis/EDInst.cpp (original) +++ llvm/trunk/tools/edis/EDInst.cpp (removed) @@ -1,207 +0,0 @@ -//===-EDInst.cpp - LLVM Enhanced Disassembler -----------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file implements the Enhanced Disassembly library's instruction class. -// The instruction is responsible for vending the string representation, -// individual tokens, and operands for a single instruction. -// -//===----------------------------------------------------------------------===// - -#include "EDDisassembler.h" -#include "EDInst.h" -#include "EDOperand.h" -#include "EDToken.h" - -#include "llvm/MC/EDInstInfo.h" -#include "llvm/MC/MCInst.h" - -using namespace llvm; - -EDInst::EDInst(llvm::MCInst *inst, - uint64_t byteSize, - EDDisassembler &disassembler, - const llvm::EDInstInfo *info) : - Disassembler(disassembler), - Inst(inst), - ThisInstInfo(info), - ByteSize(byteSize), - BranchTarget(-1), - MoveSource(-1), - MoveTarget(-1) { - OperandOrder = ThisInstInfo->operandOrders[Disassembler.llvmSyntaxVariant()]; -} - -EDInst::~EDInst() { - unsigned int index; - unsigned int numOperands = Operands.size(); - - for (index = 0; index < numOperands; ++index) - delete Operands[index]; - - unsigned int numTokens = Tokens.size(); - - for (index = 0; index < numTokens; ++index) - delete Tokens[index]; - - delete Inst; -} - -uint64_t EDInst::byteSize() { - return ByteSize; -} - -int EDInst::stringify() { - if (StringifyResult.valid()) - return StringifyResult.result(); - - if (Disassembler.printInst(String, *Inst)) - return StringifyResult.setResult(-1); - - return StringifyResult.setResult(0); -} - -int EDInst::getString(const char*& str) { - if (stringify()) - return -1; - - str = String.c_str(); - - return 0; -} - -unsigned EDInst::instID() { - return Inst->getOpcode(); -} - -bool EDInst::isBranch() { - if (ThisInstInfo) - return - ThisInstInfo->instructionType == kInstructionTypeBranch || - ThisInstInfo->instructionType == kInstructionTypeCall; - else - return false; -} - -bool EDInst::isMove() { - if (ThisInstInfo) - return ThisInstInfo->instructionType == kInstructionTypeMove; - else - return false; -} - -int EDInst::parseOperands() { - if (ParseResult.valid()) - return ParseResult.result(); - - if (!ThisInstInfo) - return ParseResult.setResult(-1); - - unsigned int opIndex; - unsigned int mcOpIndex = 0; - - for (opIndex = 0; opIndex < ThisInstInfo->numOperands; ++opIndex) { - if (isBranch() && - (ThisInstInfo->operandFlags[opIndex] & kOperandFlagTarget)) { - BranchTarget = opIndex; - } - else if (isMove()) { - if (ThisInstInfo->operandFlags[opIndex] & kOperandFlagSource) - MoveSource = opIndex; - else if (ThisInstInfo->operandFlags[opIndex] & kOperandFlagTarget) - MoveTarget = opIndex; - } - - EDOperand *operand = new EDOperand(Disassembler, *this, opIndex, mcOpIndex); - - Operands.push_back(operand); - } - - return ParseResult.setResult(0); -} - -int EDInst::branchTargetID() { - if (parseOperands()) - return -1; - return BranchTarget; -} - -int EDInst::moveSourceID() { - if (parseOperands()) - return -1; - return MoveSource; -} - -int EDInst::moveTargetID() { - if (parseOperands()) - return -1; - return MoveTarget; -} - -int EDInst::numOperands() { - if (parseOperands()) - return -1; - return Operands.size(); -} - -int EDInst::getOperand(EDOperand *&operand, unsigned int index) { - if (parseOperands()) - return -1; - - if (index >= Operands.size()) - return -1; - - operand = Operands[index]; - return 0; -} - -int EDInst::tokenize() { - if (TokenizeResult.valid()) - return TokenizeResult.result(); - - if (stringify()) - return TokenizeResult.setResult(-1); - - return TokenizeResult.setResult(EDToken::tokenize(Tokens, - String, - OperandOrder, - Disassembler)); - -} - -int EDInst::numTokens() { - if (tokenize()) - return -1; - return Tokens.size(); -} - -int EDInst::getToken(EDToken *&token, unsigned int index) { - if (tokenize()) - return -1; - token = Tokens[index]; - return 0; -} - -#ifdef __BLOCKS__ -int EDInst::visitTokens(EDTokenVisitor_t visitor) { - if (tokenize()) - return -1; - - tokvec_t::iterator iter; - - for (iter = Tokens.begin(); iter != Tokens.end(); ++iter) { - int ret = visitor(*iter); - if (ret == 1) - return 0; - if (ret != 0) - return -1; - } - - return 0; -} -#endif Removed: llvm/trunk/tools/edis/EDInst.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/edis/EDInst.h?rev=108868&view=auto ============================================================================== --- llvm/trunk/tools/edis/EDInst.h (original) +++ llvm/trunk/tools/edis/EDInst.h (removed) @@ -1,175 +0,0 @@ -//===-EDInst.h - LLVM Enhanced Disassembler ---------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines the interface for the Enhanced Disassembly library's -// instruction class. The instruction is responsible for vending the string -// representation, individual tokens and operands for a single instruction. -// -//===----------------------------------------------------------------------===// - -#ifndef EDInst_ -#define EDInst_ - -#include "llvm-c/EnhancedDisassembly.h" - -#include "llvm/ADT/SmallVector.h" - -#include -#include - -namespace llvm { - struct EDInstInfo; -} - -/// CachedResult - Encapsulates the result of a function along with the validity -/// of that result, so that slow functions don't need to run twice -struct CachedResult { - /// True if the result has been obtained by executing the function - bool Valid; - /// The result last obtained from the function - int Result; - - /// Constructor - Initializes an invalid result - CachedResult() : Valid(false) { } - /// valid - Returns true if the result has been obtained by executing the - /// function and false otherwise - bool valid() { return Valid; } - /// result - Returns the result of the function or an undefined value if - /// valid() is false - int result() { return Result; } - /// setResult - Sets the result of the function and declares it valid - /// returning the result (so that setResult() can be called from inside a - /// return statement) - /// @arg result - The result of the function - int setResult(int result) { Result = result; Valid = true; return result; } -}; - -/// EDInst - Encapsulates a single instruction, which can be queried for its -/// string representation, as well as its operands and tokens -struct EDInst { - /// The parent disassembler - EDDisassembler &Disassembler; - /// The containing MCInst - llvm::MCInst *Inst; - /// The instruction information provided by TableGen for this instruction - const llvm::EDInstInfo *ThisInstInfo; - /// The number of bytes for the machine code representation of the instruction - uint64_t ByteSize; - - /// The result of the stringify() function - CachedResult StringifyResult; - /// The string representation of the instruction - std::string String; - /// The order in which operands from the InstInfo's operand information appear - /// in String - const char* OperandOrder; - - /// The result of the parseOperands() function - CachedResult ParseResult; - typedef llvm::SmallVector opvec_t; - /// The instruction's operands - opvec_t Operands; - /// The operand corresponding to the target, if the instruction is a branch - int BranchTarget; - /// The operand corresponding to the source, if the instruction is a move - int MoveSource; - /// The operand corresponding to the target, if the instruction is a move - int MoveTarget; - - /// The result of the tokenize() function - CachedResult TokenizeResult; - typedef std::vector tokvec_t; - /// The instruction's tokens - tokvec_t Tokens; - - /// Constructor - initializes an instruction given the output of the LLVM - /// C++ disassembler - /// - /// @arg inst - The MCInst, which will now be owned by this object - /// @arg byteSize - The size of the consumed instruction, in bytes - /// @arg disassembler - The parent disassembler - /// @arg instInfo - The instruction information produced by the table - /// generator for this instruction - EDInst(llvm::MCInst *inst, - uint64_t byteSize, - EDDisassembler &disassembler, - const llvm::EDInstInfo *instInfo); - ~EDInst(); - - /// byteSize - returns the number of bytes consumed by the machine code - /// representation of the instruction - uint64_t byteSize(); - /// instID - returns the LLVM instruction ID of the instruction - unsigned instID(); - - /// stringify - populates the String and AsmString members of the instruction, - /// returning 0 on success or -1 otherwise - int stringify(); - /// getString - retrieves a pointer to the string representation of the - /// instructinon, returning 0 on success or -1 otherwise - /// - /// @arg str - A reference to a pointer that, on success, is set to point to - /// the string representation of the instruction; this string is still owned - /// by the instruction and will be deleted when it is - int getString(const char *&str); - - /// isBranch - Returns true if the instruction is a branch - bool isBranch(); - /// isMove - Returns true if the instruction is a move - bool isMove(); - - /// parseOperands - populates the Operands member of the instruction, - /// returning 0 on success or -1 otherwise - int parseOperands(); - /// branchTargetID - returns the ID (suitable for use with getOperand()) of - /// the target operand if the instruction is a branch, or -1 otherwise - int branchTargetID(); - /// moveSourceID - returns the ID of the source operand if the instruction - /// is a move, or -1 otherwise - int moveSourceID(); - /// moveTargetID - returns the ID of the target operand if the instruction - /// is a move, or -1 otherwise - int moveTargetID(); - - /// numOperands - returns the number of operands available to retrieve, or -1 - /// on error - int numOperands(); - /// getOperand - retrieves an operand from the instruction's operand list by - /// index, returning 0 on success or -1 on error - /// - /// @arg operand - A reference whose target is pointed at the operand on - /// success, although the operand is still owned by the EDInst - /// @arg index - The index of the operand in the instruction - int getOperand(EDOperand *&operand, unsigned int index); - - /// tokenize - populates the Tokens member of the instruction, returning 0 on - /// success or -1 otherwise - int tokenize(); - /// numTokens - returns the number of tokens in the instruction, or -1 on - /// error - int numTokens(); - /// getToken - retrieves a token from the instruction's token list by index, - /// returning 0 on success or -1 on error - /// - /// @arg token - A reference whose target is pointed at the token on success, - /// although the token is still owned by the EDInst - /// @arg index - The index of the token in the instrcutino - int getToken(EDToken *&token, unsigned int index); - -#ifdef __BLOCKS__ - /// visitTokens - Visits each token in turn and applies a block to it, - /// returning 0 if all blocks are visited and/or the block signals - /// termination by returning 1; returns -1 on error - /// - /// @arg visitor - The visitor block to apply to all tokens. - int visitTokens(EDTokenVisitor_t visitor); -#endif -}; - -#endif Copied: llvm/trunk/tools/edis/EDMain.cpp (from r108847, llvm/trunk/tools/edis/EDMain.cpp) URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/edis/EDMain.cpp?p2=llvm/trunk/tools/edis/EDMain.cpp&p1=llvm/trunk/tools/edis/EDMain.cpp&r1=108847&r2=108869&rev=108869&view=diff ============================================================================== --- llvm/trunk/tools/edis/EDMain.cpp (original) +++ llvm/trunk/tools/edis/EDMain.cpp Tue Jul 20 13:25:19 2010 @@ -1,4 +1,4 @@ -//===-EDMain.cpp - LLVM Enhanced Disassembly C API ------------------------===// +//===-- EDMain.cpp - LLVM Enhanced Disassembly C API ----------------------===// // // The LLVM Compiler Infrastructure // @@ -11,33 +11,46 @@ // //===----------------------------------------------------------------------===// -#include "EDDisassembler.h" -#include "EDInst.h" -#include "EDOperand.h" -#include "EDToken.h" - +// FIXME: This code isn't layered right, the headers should be moved to +// include llvm/MC/MCDisassembler or something. +#include "../../lib/MC/MCDisassembler/EDDisassembler.h" +#include "../../lib/MC/MCDisassembler/EDInst.h" +#include "../../lib/MC/MCDisassembler/EDOperand.h" +#include "../../lib/MC/MCDisassembler/EDToken.h" #include "llvm-c/EnhancedDisassembly.h" +using namespace llvm; int EDGetDisassembler(EDDisassemblerRef *disassembler, const char *triple, EDAssemblySyntax_t syntax) { EDDisassembler::initialize(); - EDDisassemblerRef ret = EDDisassembler::getDisassembler(triple, - syntax); + EDDisassembler::AssemblySyntax Syntax; + switch (syntax) { + default: assert(0 && "Unknown assembly syntax!"); + case kEDAssemblySyntaxX86Intel: + Syntax = EDDisassembler::kEDAssemblySyntaxX86Intel; + break; + case kEDAssemblySyntaxX86ATT: + Syntax = EDDisassembler::kEDAssemblySyntaxX86ATT; + break; + case kEDAssemblySyntaxARMUAL: + Syntax = EDDisassembler::kEDAssemblySyntaxARMUAL; + break; + } + + EDDisassemblerRef ret = EDDisassembler::getDisassembler(triple, Syntax); - if (ret) { - *disassembler = ret; - return 0; - } else { + if (!ret) return -1; - } + *disassembler = ret; + return 0; } int EDGetRegisterName(const char** regName, EDDisassemblerRef disassembler, unsigned regID) { - const char* name = disassembler->nameWithRegisterID(regID); + const char *name = ((EDDisassembler*)disassembler)->nameWithRegisterID(regID); if (!name) return -1; *regName = name; @@ -46,24 +59,25 @@ int EDRegisterIsStackPointer(EDDisassemblerRef disassembler, unsigned regID) { - return disassembler->registerIsStackPointer(regID) ? 1 : 0; + return ((EDDisassembler*)disassembler)->registerIsStackPointer(regID) ? 1 : 0; } int EDRegisterIsProgramCounter(EDDisassemblerRef disassembler, unsigned regID) { - return disassembler->registerIsProgramCounter(regID) ? 1 : 0; + return ((EDDisassembler*)disassembler)->registerIsProgramCounter(regID) ? 1:0; } unsigned int EDCreateInsts(EDInstRef *insts, unsigned int count, EDDisassemblerRef disassembler, - EDByteReaderCallback byteReader, + ::EDByteReaderCallback byteReader, uint64_t address, void *arg) { unsigned int index; for (index = 0; index < count; ++index) { - EDInst *inst = disassembler->createInst(byteReader, address, arg); + EDInst *inst = ((EDDisassembler*)disassembler)->createInst(byteReader, + address, arg); if (!inst) return index; @@ -76,163 +90,143 @@ } void EDReleaseInst(EDInstRef inst) { - delete inst; + delete ((EDInst*)inst); } int EDInstByteSize(EDInstRef inst) { - return inst->byteSize(); + return ((EDInst*)inst)->byteSize(); } int EDGetInstString(const char **buf, EDInstRef inst) { - return inst->getString(*buf); + return ((EDInst*)inst)->getString(*buf); } int EDInstID(unsigned *instID, EDInstRef inst) { - *instID = inst->instID(); + *instID = ((EDInst*)inst)->instID(); return 0; } int EDInstIsBranch(EDInstRef inst) { - return inst->isBranch(); + return ((EDInst*)inst)->isBranch(); } int EDInstIsMove(EDInstRef inst) { - return inst->isMove(); + return ((EDInst*)inst)->isMove(); } int EDBranchTargetID(EDInstRef inst) { - return inst->branchTargetID(); + return ((EDInst*)inst)->branchTargetID(); } int EDMoveSourceID(EDInstRef inst) { - return inst->moveSourceID(); + return ((EDInst*)inst)->moveSourceID(); } int EDMoveTargetID(EDInstRef inst) { - return inst->moveTargetID(); + return ((EDInst*)inst)->moveTargetID(); } int EDNumTokens(EDInstRef inst) { - return inst->numTokens(); + return ((EDInst*)inst)->numTokens(); } int EDGetToken(EDTokenRef *token, EDInstRef inst, int index) { - return inst->getToken(*token, index); + return ((EDInst*)inst)->getToken(*(EDToken**)token, index); } int EDGetTokenString(const char **buf, EDTokenRef token) { - return token->getString(*buf); + return ((EDToken*)token)->getString(*buf); } int EDOperandIndexForToken(EDTokenRef token) { - return token->operandID(); + return ((EDToken*)token)->operandID(); } int EDTokenIsWhitespace(EDTokenRef token) { - if (token->type() == EDToken::kTokenWhitespace) - return 1; - else - return 0; + return ((EDToken*)token)->type() == EDToken::kTokenWhitespace; } int EDTokenIsPunctuation(EDTokenRef token) { - if (token->type() == EDToken::kTokenPunctuation) - return 1; - else - return 0; + return ((EDToken*)token)->type() == EDToken::kTokenPunctuation; } int EDTokenIsOpcode(EDTokenRef token) { - if (token->type() == EDToken::kTokenOpcode) - return 1; - else - return 0; + return ((EDToken*)token)->type() == EDToken::kTokenOpcode; } int EDTokenIsLiteral(EDTokenRef token) { - if (token->type() == EDToken::kTokenLiteral) - return 1; - else - return 0; + return ((EDToken*)token)->type() == EDToken::kTokenLiteral; } int EDTokenIsRegister(EDTokenRef token) { - if (token->type() == EDToken::kTokenRegister) - return 1; - else - return 0; + return ((EDToken*)token)->type() == EDToken::kTokenRegister; } int EDTokenIsNegativeLiteral(EDTokenRef token) { - if (token->type() != EDToken::kTokenLiteral) + if (((EDToken*)token)->type() != EDToken::kTokenLiteral) return -1; - return token->literalSign(); + return ((EDToken*)token)->literalSign(); } -int EDLiteralTokenAbsoluteValue(uint64_t *value, - EDTokenRef token) { - if (token->type() != EDToken::kTokenLiteral) +int EDLiteralTokenAbsoluteValue(uint64_t *value, EDTokenRef token) { + if (((EDToken*)token)->type() != EDToken::kTokenLiteral) return -1; - return token->literalAbsoluteValue(*value); + return ((EDToken*)token)->literalAbsoluteValue(*value); } int EDRegisterTokenValue(unsigned *registerID, EDTokenRef token) { - if (token->type() != EDToken::kTokenRegister) + if (((EDToken*)token)->type() != EDToken::kTokenRegister) return -1; - return token->registerID(*registerID); + return ((EDToken*)token)->registerID(*registerID); } int EDNumOperands(EDInstRef inst) { - return inst->numOperands(); + return ((EDInst*)inst)->numOperands(); } int EDGetOperand(EDOperandRef *operand, EDInstRef inst, int index) { - return inst->getOperand(*operand, index); + return ((EDInst*)inst)->getOperand(*(EDOperand**)operand, index); } int EDOperandIsRegister(EDOperandRef operand) { - return operand->isRegister(); + return ((EDOperand*)operand)->isRegister(); } int EDOperandIsImmediate(EDOperandRef operand) { - return operand->isImmediate(); + return ((EDOperand*)operand)->isImmediate(); } int EDOperandIsMemory(EDOperandRef operand) { - return operand->isMemory(); + return ((EDOperand*)operand)->isMemory(); } -int EDRegisterOperandValue(unsigned *value, - EDOperandRef operand) { - if (!operand->isRegister()) +int EDRegisterOperandValue(unsigned *value, EDOperandRef operand) { + if (!((EDOperand*)operand)->isRegister()) return -1; - *value = operand->regVal(); + *value = ((EDOperand*)operand)->regVal(); return 0; } -int EDImmediateOperandValue(uint64_t *value, - EDOperandRef operand) { - if (!operand->isImmediate()) +int EDImmediateOperandValue(uint64_t *value, EDOperandRef operand) { + if (!((EDOperand*)operand)->isImmediate()) return -1; - *value = operand->immediateVal(); + *value = ((EDOperand*)operand)->immediateVal(); return 0; } -int EDEvaluateOperand(uint64_t *result, - EDOperandRef operand, - EDRegisterReaderCallback regReader, - void *arg) { - return operand->evaluate(*result, regReader, arg); +int EDEvaluateOperand(uint64_t *result, EDOperandRef operand, + ::EDRegisterReaderCallback regReader, void *arg) { + return ((EDOperand*)operand)->evaluate(*result, regReader, arg); } #ifdef __BLOCKS__ @@ -264,15 +258,13 @@ (void*)&wrapper); } -int EDBlockEvaluateOperand(uint64_t *result, - EDOperandRef operand, +int EDBlockEvaluateOperand(uint64_t *result, EDOperandRef operand, EDRegisterBlock_t regBlock) { - return operand->evaluate(*result, regBlock); + return ((EDOperand*)operand)->evaluate(*result, regBlock); } -int EDBlockVisitTokens(EDInstRef inst, - EDTokenVisitor_t visitor) { - return inst->visitTokens(visitor); +int EDBlockVisitTokens(EDInstRef inst, ::EDTokenVisitor_t visitor) { + return ((EDInst*)inst)->visitTokens((llvm::EDTokenVisitor_t)visitor); } #else Removed: llvm/trunk/tools/edis/EDOperand.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/edis/EDOperand.cpp?rev=108868&view=auto ============================================================================== --- llvm/trunk/tools/edis/EDOperand.cpp (original) +++ llvm/trunk/tools/edis/EDOperand.cpp (removed) @@ -1,284 +0,0 @@ -//===-EDOperand.cpp - LLVM Enhanced Disassembler --------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file implements the Enhanced Disassembly library's operand class. The -// operand is responsible for allowing evaluation given a particular register -// context. -// -//===----------------------------------------------------------------------===// - -#include "EDDisassembler.h" -#include "EDInst.h" -#include "EDOperand.h" - -#include "llvm/MC/EDInstInfo.h" -#include "llvm/MC/MCInst.h" - -using namespace llvm; - -EDOperand::EDOperand(const EDDisassembler &disassembler, - const EDInst &inst, - unsigned int opIndex, - unsigned int &mcOpIndex) : - Disassembler(disassembler), - Inst(inst), - OpIndex(opIndex), - MCOpIndex(mcOpIndex) { - unsigned int numMCOperands = 0; - - if (Disassembler.Key.Arch == Triple::x86 || - Disassembler.Key.Arch == Triple::x86_64) { - uint8_t operandType = inst.ThisInstInfo->operandTypes[opIndex]; - - switch (operandType) { - default: - break; - case kOperandTypeImmediate: - numMCOperands = 1; - break; - case kOperandTypeRegister: - numMCOperands = 1; - break; - case kOperandTypeX86Memory: - numMCOperands = 5; - break; - case kOperandTypeX86EffectiveAddress: - numMCOperands = 4; - break; - case kOperandTypeX86PCRelative: - numMCOperands = 1; - break; - } - } - else if (Disassembler.Key.Arch == Triple::arm || - Disassembler.Key.Arch == Triple::thumb) { - uint8_t operandType = inst.ThisInstInfo->operandTypes[opIndex]; - - switch (operandType) { - default: - case kOperandTypeARMRegisterList: - break; - case kOperandTypeImmediate: - case kOperandTypeRegister: - case kOperandTypeARMBranchTarget: - case kOperandTypeARMSoImm: - case kOperandTypeThumb2SoImm: - case kOperandTypeARMSoImm2Part: - case kOperandTypeARMPredicate: - case kOperandTypeThumbITMask: - case kOperandTypeThumb2AddrModeImm8Offset: - case kOperandTypeARMTBAddrMode: - case kOperandTypeThumb2AddrModeImm8s4Offset: - numMCOperands = 1; - break; - case kOperandTypeThumb2SoReg: - case kOperandTypeARMAddrMode2Offset: - case kOperandTypeARMAddrMode3Offset: - case kOperandTypeARMAddrMode4: - case kOperandTypeARMAddrMode5: - case kOperandTypeARMAddrModePC: - case kOperandTypeThumb2AddrModeImm8: - case kOperandTypeThumb2AddrModeImm12: - case kOperandTypeThumb2AddrModeImm8s4: - case kOperandTypeThumbAddrModeRR: - case kOperandTypeThumbAddrModeSP: - numMCOperands = 2; - break; - case kOperandTypeARMSoReg: - case kOperandTypeARMAddrMode2: - case kOperandTypeARMAddrMode3: - case kOperandTypeThumb2AddrModeSoReg: - case kOperandTypeThumbAddrModeS1: - case kOperandTypeThumbAddrModeS2: - case kOperandTypeThumbAddrModeS4: - case kOperandTypeARMAddrMode6Offset: - numMCOperands = 3; - break; - case kOperandTypeARMAddrMode6: - numMCOperands = 4; - break; - } - } - - mcOpIndex += numMCOperands; -} - -EDOperand::~EDOperand() { -} - -int EDOperand::evaluate(uint64_t &result, - EDRegisterReaderCallback callback, - void *arg) { - uint8_t operandType = Inst.ThisInstInfo->operandTypes[OpIndex]; - - switch (Disassembler.Key.Arch) { - default: - return -1; - case Triple::x86: - case Triple::x86_64: - switch (operandType) { - default: - return -1; - case kOperandTypeImmediate: - result = Inst.Inst->getOperand(MCOpIndex).getImm(); - return 0; - case kOperandTypeRegister: - { - unsigned reg = Inst.Inst->getOperand(MCOpIndex).getReg(); - return callback(&result, reg, arg); - } - case kOperandTypeX86PCRelative: - { - int64_t displacement = Inst.Inst->getOperand(MCOpIndex).getImm(); - - uint64_t ripVal; - - // TODO fix how we do this - - if (callback(&ripVal, Disassembler.registerIDWithName("RIP"), arg)) - return -1; - - result = ripVal + displacement; - return 0; - } - case kOperandTypeX86Memory: - case kOperandTypeX86EffectiveAddress: - { - unsigned baseReg = Inst.Inst->getOperand(MCOpIndex).getReg(); - uint64_t scaleAmount = Inst.Inst->getOperand(MCOpIndex+1).getImm(); - unsigned indexReg = Inst.Inst->getOperand(MCOpIndex+2).getReg(); - int64_t displacement = Inst.Inst->getOperand(MCOpIndex+3).getImm(); - //unsigned segmentReg = Inst.Inst->getOperand(MCOpIndex+4).getReg(); - - uint64_t addr = 0; - - if (baseReg) { - uint64_t baseVal; - if (callback(&baseVal, baseReg, arg)) - return -1; - addr += baseVal; - } - - if (indexReg) { - uint64_t indexVal; - if (callback(&indexVal, indexReg, arg)) - return -1; - addr += (scaleAmount * indexVal); - } - - addr += displacement; - - result = addr; - return 0; - } - } - break; - case Triple::arm: - case Triple::thumb: - switch (operandType) { - default: - return -1; - case kOperandTypeImmediate: - result = Inst.Inst->getOperand(MCOpIndex).getImm(); - return 0; - case kOperandTypeRegister: - { - unsigned reg = Inst.Inst->getOperand(MCOpIndex).getReg(); - return callback(&result, reg, arg); - } - case kOperandTypeARMBranchTarget: - { - int64_t displacement = Inst.Inst->getOperand(MCOpIndex).getImm(); - - uint64_t pcVal; - - if (callback(&pcVal, Disassembler.registerIDWithName("PC"), arg)) - return -1; - - result = pcVal + displacement; - return 0; - } - } - } - - return -1; -} - -int EDOperand::isRegister() { - return(Inst.ThisInstInfo->operandFlags[OpIndex] == kOperandTypeRegister); -} - -unsigned EDOperand::regVal() { - return Inst.Inst->getOperand(MCOpIndex).getReg(); -} - -int EDOperand::isImmediate() { - return(Inst.ThisInstInfo->operandFlags[OpIndex] == kOperandTypeImmediate); -} - -uint64_t EDOperand::immediateVal() { - return Inst.Inst->getOperand(MCOpIndex).getImm(); -} - -int EDOperand::isMemory() { - uint8_t operandType = Inst.ThisInstInfo->operandTypes[OpIndex]; - - switch (operandType) { - default: - return 0; - case kOperandTypeX86Memory: - case kOperandTypeX86PCRelative: - case kOperandTypeX86EffectiveAddress: - case kOperandTypeARMSoReg: - case kOperandTypeARMSoImm: - case kOperandTypeARMAddrMode2: - case kOperandTypeARMAddrMode2Offset: - case kOperandTypeARMAddrMode3: - case kOperandTypeARMAddrMode3Offset: - case kOperandTypeARMAddrMode4: - case kOperandTypeARMAddrMode5: - case kOperandTypeARMAddrMode6: - case kOperandTypeARMAddrModePC: - case kOperandTypeARMBranchTarget: - case kOperandTypeThumbAddrModeS1: - case kOperandTypeThumbAddrModeS2: - case kOperandTypeThumbAddrModeS4: - case kOperandTypeThumbAddrModeRR: - case kOperandTypeThumbAddrModeSP: - case kOperandTypeThumb2SoImm: - case kOperandTypeThumb2AddrModeImm8: - case kOperandTypeThumb2AddrModeImm8Offset: - case kOperandTypeThumb2AddrModeImm12: - case kOperandTypeThumb2AddrModeSoReg: - case kOperandTypeThumb2AddrModeImm8s4: - return 1; - } -} - -#ifdef __BLOCKS__ -struct RegisterReaderWrapper { - EDRegisterBlock_t regBlock; -}; - -int readerWrapperCallback(uint64_t *value, - unsigned regID, - void *arg) { - struct RegisterReaderWrapper *wrapper = (struct RegisterReaderWrapper *)arg; - return wrapper->regBlock(value, regID); -} - -int EDOperand::evaluate(uint64_t &result, - EDRegisterBlock_t regBlock) { - struct RegisterReaderWrapper wrapper; - wrapper.regBlock = regBlock; - return evaluate(result, - readerWrapperCallback, - (void*)&wrapper); -} -#endif Removed: llvm/trunk/tools/edis/EDOperand.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/edis/EDOperand.h?rev=108868&view=auto ============================================================================== --- llvm/trunk/tools/edis/EDOperand.h (original) +++ llvm/trunk/tools/edis/EDOperand.h (removed) @@ -1,78 +0,0 @@ -//===-EDOperand.h - LLVM Enhanced Disassembler ------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines the interface for the Enhanced Disassembly library's -// operand class. The operand is responsible for allowing evaluation given a -// particular register context. -// -//===----------------------------------------------------------------------===// - -#ifndef EDOperand_ -#define EDOperand_ - -#include "llvm-c/EnhancedDisassembly.h" - -/// EDOperand - Encapsulates a single operand, which can be evaluated by the -/// client -struct EDOperand { - /// The parent disassembler - const EDDisassembler &Disassembler; - /// The parent instruction - const EDInst &Inst; - - /// The index of the operand in the EDInst - unsigned int OpIndex; - /// The index of the first component of the operand in the MCInst - unsigned int MCOpIndex; - - /// Constructor - Initializes an EDOperand - /// - /// @arg disassembler - The disassembler responsible for the operand - /// @arg inst - The instruction containing this operand - /// @arg opIndex - The index of the operand in inst - /// @arg mcOpIndex - The index of the operand in the original MCInst - EDOperand(const EDDisassembler &disassembler, - const EDInst &inst, - unsigned int opIndex, - unsigned int &mcOpIndex); - ~EDOperand(); - - /// evaluate - Returns the numeric value of an operand to the extent possible, - /// returning 0 on success or -1 if there was some problem (such as a - /// register not being readable) - /// - /// @arg result - A reference whose target is filled in with the value of - /// the operand (the address if it is a memory operand) - /// @arg callback - A function to call to obtain register values - /// @arg arg - An opaque argument to pass to callback - int evaluate(uint64_t &result, - EDRegisterReaderCallback callback, - void *arg); - - /// isRegister - Returns 1 if the operand is a register or 0 otherwise - int isRegister(); - /// regVal - Returns the register value. - unsigned regVal(); - - /// isImmediate - Returns 1 if the operand is an immediate or 0 otherwise - int isImmediate(); - /// immediateVal - Returns the immediate value. - uint64_t immediateVal(); - - /// isMemory - Returns 1 if the operand is a memory location or 0 otherwise - int isMemory(); - -#ifdef __BLOCKS__ - /// evaluate - Like evaluate for a callback, but uses a block instead - int evaluate(uint64_t &result, - EDRegisterBlock_t regBlock); -#endif -}; - -#endif Removed: llvm/trunk/tools/edis/EDToken.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/edis/EDToken.cpp?rev=108868&view=auto ============================================================================== --- llvm/trunk/tools/edis/EDToken.cpp (original) +++ llvm/trunk/tools/edis/EDToken.cpp (removed) @@ -1,208 +0,0 @@ -//===-EDToken.cpp - LLVM Enhanced Disassembler ----------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file implements the Enhanced Disassembler library's token class. The -// token is responsible for vending information about the token, such as its -// type and logical value. -// -//===----------------------------------------------------------------------===// - -#include "EDDisassembler.h" -#include "EDToken.h" - -#include "llvm/ADT/SmallVector.h" -#include "llvm/MC/MCParser/MCAsmLexer.h" -#include "llvm/MC/MCParser/MCParsedAsmOperand.h" - -using namespace llvm; - -EDToken::EDToken(StringRef str, - enum tokenType type, - uint64_t localType, - EDDisassembler &disassembler) : - Disassembler(disassembler), - Str(str), - Type(type), - LocalType(localType), - OperandID(-1) { -} - -EDToken::~EDToken() { -} - -void EDToken::makeLiteral(bool sign, uint64_t absoluteValue) { - Type = kTokenLiteral; - LiteralSign = sign; - LiteralAbsoluteValue = absoluteValue; -} - -void EDToken::makeRegister(unsigned registerID) { - Type = kTokenRegister; - RegisterID = registerID; -} - -void EDToken::setOperandID(int operandID) { - OperandID = operandID; -} - -enum EDToken::tokenType EDToken::type() const { - return Type; -} - -uint64_t EDToken::localType() const { - return LocalType; -} - -StringRef EDToken::string() const { - return Str; -} - -int EDToken::operandID() const { - return OperandID; -} - -int EDToken::literalSign() const { - if (Type != kTokenLiteral) - return -1; - return (LiteralSign ? 1 : 0); -} - -int EDToken::literalAbsoluteValue(uint64_t &value) const { - if (Type != kTokenLiteral) - return -1; - value = LiteralAbsoluteValue; - return 0; -} - -int EDToken::registerID(unsigned ®isterID) const { - if (Type != kTokenRegister) - return -1; - registerID = RegisterID; - return 0; -} - -int EDToken::tokenize(std::vector &tokens, - std::string &str, - const char *operandOrder, - EDDisassembler &disassembler) { - SmallVector parsedOperands; - SmallVector asmTokens; - - if (disassembler.parseInst(parsedOperands, asmTokens, str)) - return -1; - - SmallVectorImpl::iterator operandIterator; - unsigned int operandIndex; - SmallVectorImpl::iterator tokenIterator; - - operandIterator = parsedOperands.begin(); - operandIndex = 0; - - bool readOpcode = false; - - const char *wsPointer = asmTokens.begin()->getLoc().getPointer(); - - for (tokenIterator = asmTokens.begin(); - tokenIterator != asmTokens.end(); - ++tokenIterator) { - SMLoc tokenLoc = tokenIterator->getLoc(); - - const char *tokenPointer = tokenLoc.getPointer(); - - if (tokenPointer > wsPointer) { - unsigned long wsLength = tokenPointer - wsPointer; - - EDToken *whitespaceToken = new EDToken(StringRef(wsPointer, wsLength), - EDToken::kTokenWhitespace, - 0, - disassembler); - - tokens.push_back(whitespaceToken); - } - - wsPointer = tokenPointer + tokenIterator->getString().size(); - - while (operandIterator != parsedOperands.end() && - tokenLoc.getPointer() > - (*operandIterator)->getEndLoc().getPointer()) { - ++operandIterator; - ++operandIndex; - } - - EDToken *token; - - switch (tokenIterator->getKind()) { - case AsmToken::Identifier: - if (!readOpcode) { - token = new EDToken(tokenIterator->getString(), - EDToken::kTokenOpcode, - (uint64_t)tokenIterator->getKind(), - disassembler); - readOpcode = true; - break; - } - // any identifier that isn't an opcode is mere punctuation; so we fall - // through - default: - token = new EDToken(tokenIterator->getString(), - EDToken::kTokenPunctuation, - (uint64_t)tokenIterator->getKind(), - disassembler); - break; - case AsmToken::Integer: - { - token = new EDToken(tokenIterator->getString(), - EDToken::kTokenLiteral, - (uint64_t)tokenIterator->getKind(), - disassembler); - - int64_t intVal = tokenIterator->getIntVal(); - - if (intVal < 0) - token->makeLiteral(true, -intVal); - else - token->makeLiteral(false, intVal); - break; - } - case AsmToken::Register: - { - token = new EDToken(tokenIterator->getString(), - EDToken::kTokenLiteral, - (uint64_t)tokenIterator->getKind(), - disassembler); - - token->makeRegister((unsigned)tokenIterator->getRegVal()); - break; - } - } - - if (operandIterator != parsedOperands.end() && - tokenLoc.getPointer() >= - (*operandIterator)->getStartLoc().getPointer()) { - /// operandIndex == 0 means the operand is the instruction (which the - /// AsmParser treats as an operand but edis does not). We therefore skip - /// operandIndex == 0 and subtract 1 from all other operand indices. - - if (operandIndex > 0) - token->setOperandID(operandOrder[operandIndex - 1]); - } - - tokens.push_back(token); - } - - return 0; -} - -int EDToken::getString(const char*& buf) { - if (PermStr.length() == 0) { - PermStr = Str.str(); - } - buf = PermStr.c_str(); - return 0; -} Removed: llvm/trunk/tools/edis/EDToken.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/edis/EDToken.h?rev=108868&view=auto ============================================================================== --- llvm/trunk/tools/edis/EDToken.h (original) +++ llvm/trunk/tools/edis/EDToken.h (removed) @@ -1,135 +0,0 @@ -//===-EDToken.h - LLVM Enhanced Disassembler --------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines the interface for the Enhanced Disassembly library's token -// class. The token is responsible for vending information about the token, -// such as its type and logical value. -// -//===----------------------------------------------------------------------===// - -#ifndef EDToken_ -#define EDToken_ - -#include "llvm-c/EnhancedDisassembly.h" -#include "llvm/ADT/StringRef.h" - -#include -#include - -/// EDToken - Encapsulates a single token, which can provide a string -/// representation of itself or interpret itself in various ways, depending -/// on the token type. -struct EDToken { - enum tokenType { - kTokenWhitespace, - kTokenOpcode, - kTokenLiteral, - kTokenRegister, - kTokenPunctuation - }; - - /// The parent disassembler - EDDisassembler &Disassembler; - - /// The token's string representation - llvm::StringRef Str; - /// The token's string representation, but in a form suitable for export - std::string PermStr; - /// The type of the token, as exposed through the external API - enum tokenType Type; - /// The type of the token, as recorded by the syntax-specific tokenizer - uint64_t LocalType; - /// The operand corresponding to the token, or (unsigned int)-1 if not - /// part of an operand. - int OperandID; - - /// The sign if the token is a literal (1 if negative, 0 otherwise) - bool LiteralSign; - /// The absolute value if the token is a literal - uint64_t LiteralAbsoluteValue; - /// The LLVM register ID if the token is a register name - unsigned RegisterID; - - /// Constructor - Initializes an EDToken with the information common to all - /// tokens - /// - /// @arg str - The string corresponding to the token - /// @arg type - The token's type as exposed through the public API - /// @arg localType - The token's type as recorded by the tokenizer - /// @arg disassembler - The disassembler responsible for the token - EDToken(llvm::StringRef str, - enum tokenType type, - uint64_t localType, - EDDisassembler &disassembler); - - /// makeLiteral - Adds the information specific to a literal - /// @arg sign - The sign of the literal (1 if negative, 0 - /// otherwise) - /// - /// @arg absoluteValue - The absolute value of the literal - void makeLiteral(bool sign, uint64_t absoluteValue); - /// makeRegister - Adds the information specific to a register - /// - /// @arg registerID - The LLVM register ID - void makeRegister(unsigned registerID); - - /// setOperandID - Links the token to a numbered operand - /// - /// @arg operandID - The operand ID to link to - void setOperandID(int operandID); - - ~EDToken(); - - /// type - Returns the public type of the token - enum tokenType type() const; - /// localType - Returns the tokenizer-specific type of the token - uint64_t localType() const; - /// string - Returns the string representation of the token - llvm::StringRef string() const; - /// operandID - Returns the operand ID of the token - int operandID() const; - - /// literalSign - Returns the sign of the token - /// (1 if negative, 0 if positive or unsigned, -1 if it is not a literal) - int literalSign() const; - /// literalAbsoluteValue - Retrieves the absolute value of the token, and - /// returns -1 if the token is not a literal - /// @arg value - A reference to a value that is filled in with the absolute - /// value, if it is valid - int literalAbsoluteValue(uint64_t &value) const; - /// registerID - Retrieves the register ID of the token, and returns -1 if the - /// token is not a register - /// - /// @arg registerID - A reference to a value that is filled in with the - /// register ID, if it is valid - int registerID(unsigned ®isterID) const; - - /// tokenize - Tokenizes a string using the platform- and syntax-specific - /// tokenizer, and returns 0 on success (-1 on failure) - /// - /// @arg tokens - A vector that will be filled in with pointers to - /// allocated tokens - /// @arg str - The string, as outputted by the AsmPrinter - /// @arg operandOrder - The order of the operands from the operandFlags array - /// as they appear in str - /// @arg disassembler - The disassembler for the desired target and - // assembly syntax - static int tokenize(std::vector &tokens, - std::string &str, - const char *operandOrder, - EDDisassembler &disassembler); - - /// getString - Directs a character pointer to the string, returning 0 on - /// success (-1 on failure) - /// @arg buf - A reference to a pointer that is set to point to the string. - /// The string is still owned by the token. - int getString(const char*& buf); -}; - -#endif Modified: llvm/trunk/tools/llvm-mc/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mc/CMakeLists.txt?rev=108869&r1=108868&r2=108869&view=diff ============================================================================== --- llvm/trunk/tools/llvm-mc/CMakeLists.txt (original) +++ llvm/trunk/tools/llvm-mc/CMakeLists.txt Tue Jul 20 13:25:19 2010 @@ -1,5 +1,4 @@ -set( LLVM_USED_LIBS EnhancedDisassembly) -set(LLVM_LINK_COMPONENTS ${LLVM_TARGETS_TO_BUILD} support MC MCParser) +set(LLVM_LINK_COMPONENTS ${LLVM_TARGETS_TO_BUILD} support MC MCParser MCDisassembler) add_llvm_tool(llvm-mc llvm-mc.cpp Modified: llvm/trunk/tools/llvm-mc/Disassembler.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mc/Disassembler.cpp?rev=108869&r1=108868&r2=108869&view=diff ============================================================================== --- llvm/trunk/tools/llvm-mc/Disassembler.cpp (original) +++ llvm/trunk/tools/llvm-mc/Disassembler.cpp Tue Jul 20 13:25:19 2010 @@ -13,21 +13,21 @@ //===----------------------------------------------------------------------===// #include "Disassembler.h" - -#include "llvm/ADT/OwningPtr.h" -#include "llvm/ADT/Triple.h" +#include "../../lib/MC/MCDisassembler/EDDisassembler.h" +#include "../../lib/MC/MCDisassembler/EDInst.h" +#include "../../lib/MC/MCDisassembler/EDOperand.h" +#include "../../lib/MC/MCDisassembler/EDToken.h" #include "llvm/MC/MCAsmInfo.h" #include "llvm/MC/MCDisassembler.h" #include "llvm/MC/MCInst.h" #include "llvm/MC/MCInstPrinter.h" #include "llvm/Target/TargetRegistry.h" +#include "llvm/ADT/OwningPtr.h" +#include "llvm/ADT/Triple.h" #include "llvm/Support/MemoryBuffer.h" #include "llvm/Support/MemoryObject.h" #include "llvm/Support/raw_ostream.h" #include "llvm/Support/SourceMgr.h" - -#include "llvm-c/EnhancedDisassembly.h" - using namespace llvm; typedef std::vector > ByteArrayTy; @@ -179,21 +179,17 @@ } static int verboseEvaluator(uint64_t *V, unsigned R, void *Arg) { - EDDisassemblerRef &disassembler = *((EDDisassemblerRef*)Arg); - - const char *regName; + EDDisassembler &disassembler = *((EDDisassembler *)Arg); - if (!EDGetRegisterName(®Name, - disassembler, - R)) + if (const char *regName = disassembler.nameWithRegisterID(R)) outs() << "[" << regName << "/" << R << "]"; - if (EDRegisterIsStackPointer(disassembler, R)) + + if (disassembler.registerIsStackPointer(R)) outs() << "(sp)"; - if (EDRegisterIsProgramCounter(disassembler, R)) + if (disassembler.registerIsProgramCounter(R)) outs() << "(pc)"; *V = 0; - return 0; } @@ -209,10 +205,8 @@ return -1; } - EDDisassemblerRef disassembler; - Triple T(TS); - EDAssemblySyntax_t AS; + EDDisassembler::AssemblySyntax AS; switch (T.getArch()) { default: @@ -220,90 +214,82 @@ return -1; case Triple::arm: case Triple::thumb: - AS = kEDAssemblySyntaxARMUAL; + AS = EDDisassembler::kEDAssemblySyntaxARMUAL; break; case Triple::x86: case Triple::x86_64: - AS = kEDAssemblySyntaxX86ATT; + AS = EDDisassembler::kEDAssemblySyntaxX86ATT; break; } - if (EDGetDisassembler(&disassembler, - TS.c_str(), - AS)) { - errs() << "error: couldn't get disassembler for " << TS.c_str() << "\n"; + EDDisassembler::initialize(); + EDDisassembler *disassembler = + EDDisassembler::getDisassembler(TS.c_str(), AS); + + if (disassembler == 0) { + errs() << "error: couldn't get disassembler for " << TS << '\n'; return -1; } - EDInstRef inst; - - if (EDCreateInsts(&inst, 1, disassembler, byteArrayReader, 0,&ByteArray) - != 1) { + EDInst *inst = + disassembler->createInst(byteArrayReader, 0, &ByteArray); + + if (inst == 0) { errs() << "error: Didn't get an instruction\n"; return -1; } - int numTokens = EDNumTokens(inst); - - if (numTokens < 0) { - errs() << "error: Couldn't count the instruction's tokens\n"; + unsigned numTokens = inst->numTokens(); + if ((int)numTokens < 0) { + errs() << "error: couldn't count the instruction's tokens\n"; return -1; } - int tokenIndex; - - for (tokenIndex = 0; tokenIndex < numTokens; ++tokenIndex) { - EDTokenRef token; + for (unsigned tokenIndex = 0; tokenIndex != numTokens; ++tokenIndex) { + EDToken *token; - if (EDGetToken(&token, inst, tokenIndex)) { + if (inst->getToken(token, tokenIndex)) { errs() << "error: Couldn't get token\n"; return -1; } const char *buf; - - if (EDGetTokenString(&buf, token)) { + if (token->getString(buf)) { errs() << "error: Couldn't get string for token\n"; return -1; } - outs() << "["; - - int operandIndex = EDOperandIndexForToken(token); + outs() << '['; + int operandIndex = token->operandID(); if (operandIndex >= 0) outs() << operandIndex << "-"; - if (EDTokenIsWhitespace(token)) { - outs() << "w"; - } else if (EDTokenIsPunctuation(token)) { - outs() << "p"; - } else if (EDTokenIsOpcode(token)) { - outs() << "o"; - } else if (EDTokenIsLiteral(token)) { - outs() << "l"; - } else if (EDTokenIsRegister(token)) { - outs() << "r"; - } else { - outs() << "?"; + switch (token->type()) { + default: outs() << "?"; break; + case EDToken::kTokenWhitespace: outs() << "w"; break; + case EDToken::kTokenPunctuation: outs() << "p"; break; + case EDToken::kTokenOpcode: outs() << "o"; break; + case EDToken::kTokenLiteral: outs() << "l"; break; + case EDToken::kTokenRegister: outs() << "r"; break; } outs() << ":" << buf; - if (EDTokenIsLiteral(token)) { + if (token->type() == EDToken::kTokenLiteral) { outs() << "="; - if (EDTokenIsNegativeLiteral(token)) + if (token->literalSign()) outs() << "-"; uint64_t absoluteValue; - if (EDLiteralTokenAbsoluteValue(&absoluteValue, token)) { + if (token->literalAbsoluteValue(absoluteValue)) { errs() << "error: Couldn't get the value of a literal token\n"; return -1; } outs() << absoluteValue; - } else if (EDTokenIsRegister(token)) { + } else if (token->type() == EDToken::kTokenRegister) { outs() << "="; unsigned regID; - if (EDRegisterTokenValue(®ID, token)) { + if (token->registerID(regID)) { errs() << "error: Couldn't get the ID of a register token\n"; return -1; } @@ -315,45 +301,34 @@ outs() << " "; - if (EDInstIsBranch(inst)) + if (inst->isBranch()) outs() << "
"; - if (EDInstIsMove(inst)) + if (inst->isMove()) outs() << " "; - int numOperands = EDNumOperands(inst); + unsigned numOperands = inst->numOperands(); - if (numOperands < 0) { + if ((int)numOperands < 0) { errs() << "error: Couldn't count operands\n"; return -1; } - int operandIndex; - - for (operandIndex = 0; operandIndex < numOperands; ++operandIndex) { + for (unsigned operandIndex = 0; operandIndex != numOperands; ++operandIndex) { outs() << operandIndex << ":"; - EDOperandRef operand; - - if (EDGetOperand(&operand, - inst, - operandIndex)) { - errs() << "error: Couldn't get operand\n"; + EDOperand *operand; + if (inst->getOperand(operand, operandIndex)) { + errs() << "error: couldn't get operand\n"; return -1; } uint64_t evaluatedResult; - - EDEvaluateOperand(&evaluatedResult, - operand, - verboseEvaluator, - &disassembler); - - outs() << "=" << evaluatedResult; - - outs() << " "; + evaluatedResult = operand->evaluate(evaluatedResult, verboseEvaluator, + disassembler); + outs() << "=" << evaluatedResult << " "; } - outs() << "\n"; + outs() << '\n'; return 0; } Modified: llvm/trunk/tools/llvm-mc/Makefile URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mc/Makefile?rev=108869&r1=108868&r2=108869&view=diff ============================================================================== --- llvm/trunk/tools/llvm-mc/Makefile (original) +++ llvm/trunk/tools/llvm-mc/Makefile Tue Jul 20 13:25:19 2010 @@ -18,9 +18,7 @@ # early so we can set up LINK_COMPONENTS before including Makefile.rules include $(LEVEL)/Makefile.config -LINK_COMPONENTS := $(TARGETS_TO_BUILD) MCParser MC support +LINK_COMPONENTS := $(TARGETS_TO_BUILD) MCDisassembler MCParser MC support include $(LLVM_SRC_ROOT)/Makefile.rules -# Using LIBS instead of USEDLIBS to force static linking -LIBS += $(LLVMLibDir)/libEnhancedDisassembly.a From bruno.cardoso at gmail.com Tue Jul 20 13:28:40 2010 From: bruno.cardoso at gmail.com (Bruno Cardoso Lopes) Date: Tue, 20 Jul 2010 11:28:40 -0700 Subject: [llvm-commits] [llvm] r108816 - in /llvm/trunk: lib/Target/Mips/MipsISelLowering.cpp test/CodeGen/Mips/2010-07-20-Select.ll In-Reply-To: <0A488632-7B9A-4DBB-AB33-3FA6D96A9FAF@2pi.dk> References: <20100720075852.236BA2A6C12D@llvm.org> <0A488632-7B9A-4DBB-AB33-3FA6D96A9FAF@2pi.dk> Message-ID: It seems ok to me, MipsISD::SelectCC has operand 2 as true and operand 3 as false, am I missing something? Thanks On Tue, Jul 20, 2010 at 8:58 AM, Jakob Stoklund Olesen wrote: > > On Jul 20, 2010, at 12:58 AM, Bruno Cardoso Lopes wrote: > >> Author: bruno >> Date: Tue Jul 20 02:58:51 2010 >> New Revision: 108816 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=108816&view=rev >> Log: >> Fix Mips PR7473. Patch by stetorvs at gmail.com >> >> Added: >> ? ?llvm/trunk/test/CodeGen/Mips/2010-07-20-Select.ll >> Modified: >> ? ?llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp >> >> Modified: llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp >> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp?rev=108816&r1=108815&r2=108816&view=diff >> ============================================================================== >> --- llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp (original) >> +++ llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp Tue Jul 20 02:58:51 2010 >> @@ -317,13 +317,13 @@ >> ? ? BB->addSuccessor(sinkMBB); >> >> ? ? // ?sinkMBB: >> - ? ?// ? %Result = phi [ %FalseValue, copy0MBB ], [ %TrueValue, thisMBB ] >> + ? ?// ? %Result = phi [ %TrueValue, thisMBB ], [ %FalseValue, copy0MBB ] >> ? ? // ?... >> ? ? BB = sinkMBB; >> ? ? BuildMI(*BB, BB->begin(), dl, >> ? ? ? ? ? ? TII->get(Mips::PHI), MI->getOperand(0).getReg()) >> - ? ? ?.addReg(MI->getOperand(2).getReg()).addMBB(copy0MBB) >> - ? ? ?.addReg(MI->getOperand(3).getReg()).addMBB(thisMBB); >> + ? ? ?.addReg(MI->getOperand(2).getReg()).addMBB(thisMBB) >> + ? ? ?.addReg(MI->getOperand(3).getReg()).addMBB(copy0MBB); >> >> ? ? MI->eraseFromParent(); ? // The pseudo instruction is gone now. >> ? ? return BB; > > Hi Bruno, > > The change to the comment doesn't match the change to the code. Was that on purpose? > > /jakob > > -- Bruno Cardoso Lopes http://www.brunocardoso.cc From sabre at nondot.org Tue Jul 20 13:29:50 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 20 Jul 2010 18:29:50 -0000 Subject: [llvm-commits] [llvm] r108870 - /llvm/trunk/lib/MC/MCDisassembler/Makefile Message-ID: <20100720182950.552192A6C12C@llvm.org> Author: lattner Date: Tue Jul 20 13:29:50 2010 New Revision: 108870 URL: http://llvm.org/viewvc/llvm-project?rev=108870&view=rev Log: forgot to add a file Added: llvm/trunk/lib/MC/MCDisassembler/Makefile Added: llvm/trunk/lib/MC/MCDisassembler/Makefile URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCDisassembler/Makefile?rev=108870&view=auto ============================================================================== --- llvm/trunk/lib/MC/MCDisassembler/Makefile (added) +++ llvm/trunk/lib/MC/MCDisassembler/Makefile Tue Jul 20 13:29:50 2010 @@ -0,0 +1,21 @@ +##===- lib/MC/MCDisassembler/Makefile ----------------------*- Makefile -*-===## +# +# The LLVM Compiler Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See LICENSE.TXT for details. +# +##===----------------------------------------------------------------------===## + +LEVEL = ../../.. +LIBRARYNAME = LLVMMCDisassembler +BUILT_SOURCES = EDInfo.inc + +include $(LEVEL)/Makefile.common + +EDInfo.inc: $(TBLGEN) + $(Echo) "Building semantic information header" + $(Verb) $(TableGen) -o $(call SYSPATH, $@) -gen-enhanced-disassembly-header /dev/null + +clean:: + -$(Verb) $(RM) -f EDInfo.inc From sabre at nondot.org Tue Jul 20 13:30:37 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 20 Jul 2010 18:30:37 -0000 Subject: [llvm-commits] [llvm] r108872 - /llvm/trunk/lib/MC/MCDisassembler/CMakeLists.txt Message-ID: <20100720183037.8783D2A6C12C@llvm.org> Author: lattner Date: Tue Jul 20 13:30:37 2010 New Revision: 108872 URL: http://llvm.org/viewvc/llvm-project?rev=108872&view=rev Log: cmake too Added: llvm/trunk/lib/MC/MCDisassembler/CMakeLists.txt Added: llvm/trunk/lib/MC/MCDisassembler/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCDisassembler/CMakeLists.txt?rev=108872&view=auto ============================================================================== --- llvm/trunk/lib/MC/MCDisassembler/CMakeLists.txt (added) +++ llvm/trunk/lib/MC/MCDisassembler/CMakeLists.txt Tue Jul 20 13:30:37 2010 @@ -0,0 +1,6 @@ +add_llvm_library(LLVMMCDisassembler + EDDisassembler.cpp + EDOperand.cpp + EDInst.cpp + EDToken.cpp + ) From sabre at nondot.org Tue Jul 20 13:31:55 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 20 Jul 2010 18:31:55 -0000 Subject: [llvm-commits] [llvm] r108873 - in /llvm/trunk/tools/edis: EDInfo.td Makefile Message-ID: <20100720183155.0A1562A6C12C@llvm.org> Author: lattner Date: Tue Jul 20 13:31:54 2010 New Revision: 108873 URL: http://llvm.org/viewvc/llvm-project?rev=108873&view=rev Log: edinfo doesn't need to be built here. Removed: llvm/trunk/tools/edis/EDInfo.td Modified: llvm/trunk/tools/edis/Makefile Removed: llvm/trunk/tools/edis/EDInfo.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/edis/EDInfo.td?rev=108872&view=auto ============================================================================== --- llvm/trunk/tools/edis/EDInfo.td (original) +++ llvm/trunk/tools/edis/EDInfo.td (removed) @@ -1 +0,0 @@ -// Intentionally empty. Modified: llvm/trunk/tools/edis/Makefile URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/edis/Makefile?rev=108873&r1=108872&r2=108873&view=diff ============================================================================== --- llvm/trunk/tools/edis/Makefile (original) +++ llvm/trunk/tools/edis/Makefile Tue Jul 20 13:31:54 2010 @@ -10,8 +10,6 @@ LEVEL = ../.. LIBRARYNAME = EnhancedDisassembly -BUILT_SOURCES = EDInfo.inc - EXPORTED_SYMBOL_FILE = $(PROJ_SRC_DIR)/EnhancedDisassembly.exports # Include this here so we can get the configuration of the targets @@ -52,9 +50,3 @@ endif endif -EDInfo.inc: $(TBLGEN) - $(Echo) "Building semantic information header" - $(Verb) $(TableGen) -o $(call SYSPATH, $@) -gen-enhanced-disassembly-header /dev/null - -clean:: - -$(Verb) $(RM) -f EDInfo.inc From sabre at nondot.org Tue Jul 20 13:33:21 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 20 Jul 2010 18:33:21 -0000 Subject: [llvm-commits] [llvm] r108874 - /llvm/trunk/lib/MC/MCDisassembler/CMakeLists.txt Message-ID: <20100720183321.72F202A6C12C@llvm.org> Author: lattner Date: Tue Jul 20 13:33:21 2010 New Revision: 108874 URL: http://llvm.org/viewvc/llvm-project?rev=108874&view=rev Log: hopefully teach cmake to build the .inc file. Modified: llvm/trunk/lib/MC/MCDisassembler/CMakeLists.txt Modified: llvm/trunk/lib/MC/MCDisassembler/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCDisassembler/CMakeLists.txt?rev=108874&r1=108873&r2=108874&view=diff ============================================================================== --- llvm/trunk/lib/MC/MCDisassembler/CMakeLists.txt (original) +++ llvm/trunk/lib/MC/MCDisassembler/CMakeLists.txt Tue Jul 20 13:33:21 2010 @@ -1,6 +1,15 @@ + +add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/EDInfo.inc + COMMAND ${LLVM_TABLEGEN_EXE} -o ${CMAKE_CURRENT_BINARY_DIR}/EDInfo.inc + -gen-enhanced-disassembly-header + DEPENDS tblgen + COMMENT "Building enhanced disassembly semantic information header (EDInfo.inc)") +set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/EDInfo.inc PROPERTIES GENERATED 1) + add_llvm_library(LLVMMCDisassembler EDDisassembler.cpp EDOperand.cpp EDInst.cpp EDToken.cpp + ${CMAKE_CURRENT_BINARY_DIR}/EDInfo.inc ) From sabre at nondot.org Tue Jul 20 13:33:29 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 20 Jul 2010 18:33:29 -0000 Subject: [llvm-commits] [llvm] r108875 - /llvm/trunk/tools/edis/CMakeLists.txt Message-ID: <20100720183329.ED8202A6C12C@llvm.org> Author: lattner Date: Tue Jul 20 13:33:29 2010 New Revision: 108875 URL: http://llvm.org/viewvc/llvm-project?rev=108875&view=rev Log: update cmake. Modified: llvm/trunk/tools/edis/CMakeLists.txt Modified: llvm/trunk/tools/edis/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/edis/CMakeLists.txt?rev=108875&r1=108874&r2=108875&view=diff ============================================================================== --- llvm/trunk/tools/edis/CMakeLists.txt (original) +++ llvm/trunk/tools/edis/CMakeLists.txt Tue Jul 20 13:33:29 2010 @@ -1,22 +1,9 @@ set(LLVM_NO_RTTI 1) -add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/EDInfo.inc - COMMAND ${LLVM_TABLEGEN_EXE} -o ${CMAKE_CURRENT_BINARY_DIR}/EDInfo.inc - -gen-enhanced-disassembly-header ${CMAKE_CURRENT_SOURCE_DIR}/EDInfo.td - DEPENDS tblgen - COMMENT "Building enhanced disassembly semantic information header (EDInfo.inc)") -set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/EDInfo.inc PROPERTIES GENERATED 1) - include_directories(${CMAKE_CURRENT_BINARY_DIR}) add_llvm_library(EnhancedDisassembly - EDDisassembler.cpp - EDInst.cpp - EDMain.cpp - EDOperand.cpp - EDToken.cpp ../../include/llvm-c/EnhancedDisassembly.h - ${CMAKE_CURRENT_BINARY_DIR}/EDInfo.inc ) set_target_properties(EnhancedDisassembly From stoklund at 2pi.dk Tue Jul 20 13:34:07 2010 From: stoklund at 2pi.dk (Jakob Stoklund Olesen) Date: Tue, 20 Jul 2010 11:34:07 -0700 Subject: [llvm-commits] [llvm] r108816 - in /llvm/trunk: lib/Target/Mips/MipsISelLowering.cpp test/CodeGen/Mips/2010-07-20-Select.ll In-Reply-To: References: <20100720075852.236BA2A6C12D@llvm.org> <0A488632-7B9A-4DBB-AB33-3FA6D96A9FAF@2pi.dk> Message-ID: On Jul 20, 2010, at 11:28 AM, Bruno Cardoso Lopes wrote: > It seems ok to me, MipsISD::SelectCC has operand 2 as true and operand > 3 as false, > am I missing something? No, it is probably fine. I just noticed that the mapping between getOperand(2/3) and thisMBB/copy0MBB is swapped in the code, but it is not swapped in the comment. It sounds like the comment was correct before, but the code was wrong. Now both are correct. >>> ============================================================================== >>> --- llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp (original) >>> +++ llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp Tue Jul 20 02:58:51 2010 >>> @@ -317,13 +317,13 @@ >>> BB->addSuccessor(sinkMBB); >>> >>> // sinkMBB: >>> - // %Result = phi [ %FalseValue, copy0MBB ], [ %TrueValue, thisMBB ] >>> + // %Result = phi [ %TrueValue, thisMBB ], [ %FalseValue, copy0MBB ] >>> // ... >>> BB = sinkMBB; >>> BuildMI(*BB, BB->begin(), dl, >>> TII->get(Mips::PHI), MI->getOperand(0).getReg()) >>> - .addReg(MI->getOperand(2).getReg()).addMBB(copy0MBB) >>> - .addReg(MI->getOperand(3).getReg()).addMBB(thisMBB); >>> + .addReg(MI->getOperand(2).getReg()).addMBB(thisMBB) >>> + .addReg(MI->getOperand(3).getReg()).addMBB(copy0MBB); >>> >>> MI->eraseFromParent(); // The pseudo instruction is gone now. >>> return BB; From sabre at nondot.org Tue Jul 20 13:35:23 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 20 Jul 2010 18:35:23 -0000 Subject: [llvm-commits] [llvm] r108876 - /llvm/trunk/tools/edis/Makefile Message-ID: <20100720183523.7FEA92A6C12C@llvm.org> Author: lattner Date: Tue Jul 20 13:35:23 2010 New Revision: 108876 URL: http://llvm.org/viewvc/llvm-project?rev=108876&view=rev Log: edis needs to link in mcdisassembler. Modified: llvm/trunk/tools/edis/Makefile Modified: llvm/trunk/tools/edis/Makefile URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/edis/Makefile?rev=108876&r1=108875&r2=108876&view=diff ============================================================================== --- llvm/trunk/tools/edis/Makefile (original) +++ llvm/trunk/tools/edis/Makefile Tue Jul 20 13:35:23 2010 @@ -26,7 +26,7 @@ endif endif -LINK_COMPONENTS := $(TARGETS_TO_BUILD) x86asmprinter x86disassembler +LINK_COMPONENTS := $(TARGETS_TO_BUILD) mcdisassembler x86asmprinter x86disassembler include $(LEVEL)/Makefile.common From resistor at mac.com Tue Jul 20 13:39:06 2010 From: resistor at mac.com (Owen Anderson) Date: Tue, 20 Jul 2010 18:39:06 -0000 Subject: [llvm-commits] [llvm] r108877 - in /llvm/trunk/lib/VMCore: CMakeLists.txt Pass.cpp Message-ID: <20100720183906.44FAF2A6C12C@llvm.org> Author: resistor Date: Tue Jul 20 13:39:06 2010 New Revision: 108877 URL: http://llvm.org/viewvc/llvm-project?rev=108877&view=rev Log: Convert the internal PassRegistrar class into a new, external PassRegistry class. No intended functionality change at this point. Modified: llvm/trunk/lib/VMCore/CMakeLists.txt llvm/trunk/lib/VMCore/Pass.cpp Modified: llvm/trunk/lib/VMCore/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/CMakeLists.txt?rev=108877&r1=108876&r2=108877&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/CMakeLists.txt (original) +++ llvm/trunk/lib/VMCore/CMakeLists.txt Tue Jul 20 13:39:06 2010 @@ -23,6 +23,7 @@ Module.cpp Pass.cpp PassManager.cpp + PassRegistry.cpp PrintModulePass.cpp Type.cpp TypeSymbolTable.cpp Modified: llvm/trunk/lib/VMCore/Pass.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Pass.cpp?rev=108877&r1=108876&r2=108877&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/Pass.cpp (original) +++ llvm/trunk/lib/VMCore/Pass.cpp Tue Jul 20 13:39:06 2010 @@ -15,6 +15,7 @@ #include "llvm/Pass.h" #include "llvm/PassManager.h" +#include "llvm/PassRegistry.h" #include "llvm/Module.h" #include "llvm/ADT/STLExtras.h" #include "llvm/ADT/StringMap.h" @@ -236,112 +237,32 @@ //===----------------------------------------------------------------------===// // Pass Registration mechanism // -namespace { -class PassRegistrar { - /// Guards the contents of this class. - mutable sys::SmartMutex Lock; - - /// PassInfoMap - Keep track of the passinfo object for each registered llvm - /// pass. - typedef std::map MapType; - MapType PassInfoMap; - - typedef StringMap StringMapType; - StringMapType PassInfoStringMap; - - /// AnalysisGroupInfo - Keep track of information for each analysis group. - struct AnalysisGroupInfo { - std::set Implementations; - }; - - /// AnalysisGroupInfoMap - Information for each analysis group. - std::map AnalysisGroupInfoMap; - -public: - - const PassInfo *GetPassInfo(intptr_t TI) const { - sys::SmartScopedLock Guard(Lock); - MapType::const_iterator I = PassInfoMap.find(TI); - return I != PassInfoMap.end() ? I->second : 0; - } - - const PassInfo *GetPassInfo(StringRef Arg) const { - sys::SmartScopedLock Guard(Lock); - StringMapType::const_iterator I = PassInfoStringMap.find(Arg); - return I != PassInfoStringMap.end() ? I->second : 0; - } - - void RegisterPass(const PassInfo &PI) { - sys::SmartScopedLock Guard(Lock); - bool Inserted = - PassInfoMap.insert(std::make_pair(PI.getTypeInfo(),&PI)).second; - assert(Inserted && "Pass registered multiple times!"); Inserted=Inserted; - PassInfoStringMap[PI.getPassArgument()] = &PI; - } - - void UnregisterPass(const PassInfo &PI) { - sys::SmartScopedLock Guard(Lock); - MapType::iterator I = PassInfoMap.find(PI.getTypeInfo()); - assert(I != PassInfoMap.end() && "Pass registered but not in map!"); - - // Remove pass from the map. - PassInfoMap.erase(I); - PassInfoStringMap.erase(PI.getPassArgument()); - } - - void EnumerateWith(PassRegistrationListener *L) { - sys::SmartScopedLock Guard(Lock); - for (MapType::const_iterator I = PassInfoMap.begin(), - E = PassInfoMap.end(); I != E; ++I) - L->passEnumerate(I->second); - } - - - /// Analysis Group Mechanisms. - void RegisterAnalysisGroup(PassInfo *InterfaceInfo, - const PassInfo *ImplementationInfo, - bool isDefault) { - sys::SmartScopedLock Guard(Lock); - AnalysisGroupInfo &AGI = AnalysisGroupInfoMap[InterfaceInfo]; - assert(AGI.Implementations.count(ImplementationInfo) == 0 && - "Cannot add a pass to the same analysis group more than once!"); - AGI.Implementations.insert(ImplementationInfo); - if (isDefault) { - assert(InterfaceInfo->getNormalCtor() == 0 && - "Default implementation for analysis group already specified!"); - assert(ImplementationInfo->getNormalCtor() && - "Cannot specify pass as default if it does not have a default ctor"); - InterfaceInfo->setNormalCtor(ImplementationInfo->getNormalCtor()); - } - } -}; -} static std::vector *Listeners = 0; static sys::SmartMutex ListenersLock; -static PassRegistrar *PassRegistrarObj = 0; -static PassRegistrar *getPassRegistrar() { +static PassRegistry *PassRegistryObj = 0; +static PassRegistry *getPassRegistry() { // Use double-checked locking to safely initialize the registrar when // we're running in multithreaded mode. - PassRegistrar* tmp = PassRegistrarObj; + PassRegistry* tmp = PassRegistryObj; if (llvm_is_multithreaded()) { sys::MemoryFence(); if (!tmp) { llvm_acquire_global_lock(); - tmp = PassRegistrarObj; + tmp = PassRegistryObj; if (!tmp) { - tmp = new PassRegistrar(); + tmp = new PassRegistry(); sys::MemoryFence(); - PassRegistrarObj = tmp; + PassRegistryObj = tmp; } llvm_release_global_lock(); } } else if (!tmp) { - PassRegistrarObj = new PassRegistrar(); + PassRegistryObj = new PassRegistry(); } - return PassRegistrarObj; + return PassRegistryObj; } namespace { @@ -351,13 +272,13 @@ // llvm_shutdown clear this map prevents successful ressurection after // llvm_shutdown is run. Ideally we should find a solution so that we don't // leak the map, AND can still resurrect after shutdown. -void cleanupPassRegistrar(void*) { - if (PassRegistrarObj) { - delete PassRegistrarObj; - PassRegistrarObj = 0; +void cleanupPassRegistry(void*) { + if (PassRegistryObj) { + delete PassRegistryObj; + PassRegistryObj = 0; } } -ManagedCleanup<&cleanupPassRegistrar> registrarCleanup ATTRIBUTE_USED; +ManagedCleanup<&cleanupPassRegistry> registryCleanup ATTRIBUTE_USED; } @@ -368,15 +289,15 @@ } const PassInfo *Pass::lookupPassInfo(intptr_t TI) { - return getPassRegistrar()->GetPassInfo(TI); + return getPassRegistry()->getPassInfo(TI); } const PassInfo *Pass::lookupPassInfo(StringRef Arg) { - return getPassRegistrar()->GetPassInfo(Arg); + return getPassRegistry()->getPassInfo(Arg); } void PassInfo::registerPass() { - getPassRegistrar()->RegisterPass(*this); + getPassRegistry()->registerPass(*this); // Notify any listeners. sys::SmartScopedLock Lock(ListenersLock); @@ -387,7 +308,7 @@ } void PassInfo::unregisterPass() { - getPassRegistrar()->UnregisterPass(*this); + getPassRegistry()->unregisterPass(*this); } Pass *PassInfo::createPass() const { @@ -428,7 +349,7 @@ PassInfo *IIPI = const_cast(ImplementationInfo); IIPI->addInterfaceImplemented(InterfaceInfo); - getPassRegistrar()->RegisterAnalysisGroup(InterfaceInfo, IIPI, isDefault); + getPassRegistry()->registerAnalysisGroup(InterfaceInfo, IIPI, isDefault); } } @@ -464,7 +385,7 @@ // passEnumerate callback on each PassInfo object. // void PassRegistrationListener::enumeratePasses() { - getPassRegistrar()->EnumerateWith(this); + getPassRegistry()->enumerateWith(this); } PassNameParser::~PassNameParser() {} From pwalton at mozilla.com Tue Jul 20 13:45:38 2010 From: pwalton at mozilla.com (Patrick Walton) Date: Tue, 20 Jul 2010 11:45:38 -0700 Subject: [llvm-commits] [PATCH] Fix ocamldoc generation when outputs for multiple build modes are present Message-ID: <4C45EED2.3010803@mozilla.com> Hi, When intermediate files for two build modes (Debug and Debug+Asserts, Debug and Release, etc.) are present in the same directory, then ocamldoc will fail. The attached patch fixes this issue (bug 7591). Thanks, Patrick -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: b20100720-llvm-build-docs-makefile Url: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20100720/9f7210dc/attachment.pl From echristo at apple.com Tue Jul 20 13:46:43 2010 From: echristo at apple.com (Eric Christopher) Date: Tue, 20 Jul 2010 18:46:43 -0000 Subject: [llvm-commits] [llvm] r108883 - /llvm/trunk/lib/MC/MCDisassembler/EDOperand.h Message-ID: <20100720184644.00E0C2A6C12C@llvm.org> Author: echristo Date: Tue Jul 20 13:46:43 2010 New Revision: 108883 URL: http://llvm.org/viewvc/llvm-project?rev=108883&view=rev Log: Update header. Modified: llvm/trunk/lib/MC/MCDisassembler/EDOperand.h Modified: llvm/trunk/lib/MC/MCDisassembler/EDOperand.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCDisassembler/EDOperand.h?rev=108883&r1=108882&r2=108883&view=diff ============================================================================== --- llvm/trunk/lib/MC/MCDisassembler/EDOperand.h (original) +++ llvm/trunk/lib/MC/MCDisassembler/EDOperand.h Tue Jul 20 13:46:43 2010 @@ -16,7 +16,7 @@ #ifndef LLVM_EDOPERAND_H #define LLVM_EDOPERAND_H -#include "llvm/Support/DataTypes.h" +#include "llvm/System/DataTypes.h" namespace llvm { From dpatel at apple.com Tue Jul 20 13:52:28 2010 From: dpatel at apple.com (Devang Patel) Date: Tue, 20 Jul 2010 11:52:28 -0700 Subject: [llvm-commits] [llvm] r108877 - in /llvm/trunk/lib/VMCore: CMakeLists.txt Pass.cpp In-Reply-To: <20100720183906.44FAF2A6C12C@llvm.org> References: <20100720183906.44FAF2A6C12C@llvm.org> Message-ID: You are missing PassRegistry.h. On Jul 20, 2010, at 11:39 AM, Owen Anderson wrote: > Author: resistor > Date: Tue Jul 20 13:39:06 2010 > New Revision: 108877 > > URL: http://llvm.org/viewvc/llvm-project?rev=108877&view=rev > Log: > Convert the internal PassRegistrar class into a new, external PassRegistry class. No intended functionality change at this point. > > Modified: > llvm/trunk/lib/VMCore/CMakeLists.txt > llvm/trunk/lib/VMCore/Pass.cpp > > Modified: llvm/trunk/lib/VMCore/CMakeLists.txt > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/CMakeLists.txt?rev=108877&r1=108876&r2=108877&view=diff > ============================================================================== > --- llvm/trunk/lib/VMCore/CMakeLists.txt (original) > +++ llvm/trunk/lib/VMCore/CMakeLists.txt Tue Jul 20 13:39:06 2010 > @@ -23,6 +23,7 @@ > Module.cpp > Pass.cpp > PassManager.cpp > + PassRegistry.cpp > PrintModulePass.cpp > Type.cpp > TypeSymbolTable.cpp > > Modified: llvm/trunk/lib/VMCore/Pass.cpp > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Pass.cpp?rev=108877&r1=108876&r2=108877&view=diff > ============================================================================== > --- llvm/trunk/lib/VMCore/Pass.cpp (original) > +++ llvm/trunk/lib/VMCore/Pass.cpp Tue Jul 20 13:39:06 2010 > @@ -15,6 +15,7 @@ > > #include "llvm/Pass.h" > #include "llvm/PassManager.h" > +#include "llvm/PassRegistry.h" > #include "llvm/Module.h" > #include "llvm/ADT/STLExtras.h" > #include "llvm/ADT/StringMap.h" > @@ -236,112 +237,32 @@ > //===----------------------------------------------------------------------===// > // Pass Registration mechanism > // > -namespace { > -class PassRegistrar { > - /// Guards the contents of this class. > - mutable sys::SmartMutex Lock; > - > - /// PassInfoMap - Keep track of the passinfo object for each registered llvm > - /// pass. > - typedef std::map MapType; > - MapType PassInfoMap; > - > - typedef StringMap StringMapType; > - StringMapType PassInfoStringMap; > - > - /// AnalysisGroupInfo - Keep track of information for each analysis group. > - struct AnalysisGroupInfo { > - std::set Implementations; > - }; > - > - /// AnalysisGroupInfoMap - Information for each analysis group. > - std::map AnalysisGroupInfoMap; > - > -public: > - > - const PassInfo *GetPassInfo(intptr_t TI) const { > - sys::SmartScopedLock Guard(Lock); > - MapType::const_iterator I = PassInfoMap.find(TI); > - return I != PassInfoMap.end() ? I->second : 0; > - } > - > - const PassInfo *GetPassInfo(StringRef Arg) const { > - sys::SmartScopedLock Guard(Lock); > - StringMapType::const_iterator I = PassInfoStringMap.find(Arg); > - return I != PassInfoStringMap.end() ? I->second : 0; > - } > - > - void RegisterPass(const PassInfo &PI) { > - sys::SmartScopedLock Guard(Lock); > - bool Inserted = > - PassInfoMap.insert(std::make_pair(PI.getTypeInfo(),&PI)).second; > - assert(Inserted && "Pass registered multiple times!"); Inserted=Inserted; > - PassInfoStringMap[PI.getPassArgument()] = &PI; > - } > - > - void UnregisterPass(const PassInfo &PI) { > - sys::SmartScopedLock Guard(Lock); > - MapType::iterator I = PassInfoMap.find(PI.getTypeInfo()); > - assert(I != PassInfoMap.end() && "Pass registered but not in map!"); > - > - // Remove pass from the map. > - PassInfoMap.erase(I); > - PassInfoStringMap.erase(PI.getPassArgument()); > - } > - > - void EnumerateWith(PassRegistrationListener *L) { > - sys::SmartScopedLock Guard(Lock); > - for (MapType::const_iterator I = PassInfoMap.begin(), > - E = PassInfoMap.end(); I != E; ++I) > - L->passEnumerate(I->second); > - } > - > - > - /// Analysis Group Mechanisms. > - void RegisterAnalysisGroup(PassInfo *InterfaceInfo, > - const PassInfo *ImplementationInfo, > - bool isDefault) { > - sys::SmartScopedLock Guard(Lock); > - AnalysisGroupInfo &AGI = AnalysisGroupInfoMap[InterfaceInfo]; > - assert(AGI.Implementations.count(ImplementationInfo) == 0 && > - "Cannot add a pass to the same analysis group more than once!"); > - AGI.Implementations.insert(ImplementationInfo); > - if (isDefault) { > - assert(InterfaceInfo->getNormalCtor() == 0 && > - "Default implementation for analysis group already specified!"); > - assert(ImplementationInfo->getNormalCtor() && > - "Cannot specify pass as default if it does not have a default ctor"); > - InterfaceInfo->setNormalCtor(ImplementationInfo->getNormalCtor()); > - } > - } > -}; > -} > > static std::vector *Listeners = 0; > static sys::SmartMutex ListenersLock; > > -static PassRegistrar *PassRegistrarObj = 0; > -static PassRegistrar *getPassRegistrar() { > +static PassRegistry *PassRegistryObj = 0; > +static PassRegistry *getPassRegistry() { > // Use double-checked locking to safely initialize the registrar when > // we're running in multithreaded mode. > - PassRegistrar* tmp = PassRegistrarObj; > + PassRegistry* tmp = PassRegistryObj; > if (llvm_is_multithreaded()) { > sys::MemoryFence(); > if (!tmp) { > llvm_acquire_global_lock(); > - tmp = PassRegistrarObj; > + tmp = PassRegistryObj; > if (!tmp) { > - tmp = new PassRegistrar(); > + tmp = new PassRegistry(); > sys::MemoryFence(); > - PassRegistrarObj = tmp; > + PassRegistryObj = tmp; > } > llvm_release_global_lock(); > } > } else if (!tmp) { > - PassRegistrarObj = new PassRegistrar(); > + PassRegistryObj = new PassRegistry(); > } > > - return PassRegistrarObj; > + return PassRegistryObj; > } > > namespace { > @@ -351,13 +272,13 @@ > // llvm_shutdown clear this map prevents successful ressurection after > // llvm_shutdown is run. Ideally we should find a solution so that we don't > // leak the map, AND can still resurrect after shutdown. > -void cleanupPassRegistrar(void*) { > - if (PassRegistrarObj) { > - delete PassRegistrarObj; > - PassRegistrarObj = 0; > +void cleanupPassRegistry(void*) { > + if (PassRegistryObj) { > + delete PassRegistryObj; > + PassRegistryObj = 0; > } > } > -ManagedCleanup<&cleanupPassRegistrar> registrarCleanup ATTRIBUTE_USED; > +ManagedCleanup<&cleanupPassRegistry> registryCleanup ATTRIBUTE_USED; > > } > > @@ -368,15 +289,15 @@ > } > > const PassInfo *Pass::lookupPassInfo(intptr_t TI) { > - return getPassRegistrar()->GetPassInfo(TI); > + return getPassRegistry()->getPassInfo(TI); > } > > const PassInfo *Pass::lookupPassInfo(StringRef Arg) { > - return getPassRegistrar()->GetPassInfo(Arg); > + return getPassRegistry()->getPassInfo(Arg); > } > > void PassInfo::registerPass() { > - getPassRegistrar()->RegisterPass(*this); > + getPassRegistry()->registerPass(*this); > > // Notify any listeners. > sys::SmartScopedLock Lock(ListenersLock); > @@ -387,7 +308,7 @@ > } > > void PassInfo::unregisterPass() { > - getPassRegistrar()->UnregisterPass(*this); > + getPassRegistry()->unregisterPass(*this); > } > > Pass *PassInfo::createPass() const { > @@ -428,7 +349,7 @@ > PassInfo *IIPI = const_cast(ImplementationInfo); > IIPI->addInterfaceImplemented(InterfaceInfo); > > - getPassRegistrar()->RegisterAnalysisGroup(InterfaceInfo, IIPI, isDefault); > + getPassRegistry()->registerAnalysisGroup(InterfaceInfo, IIPI, isDefault); > } > } > > @@ -464,7 +385,7 @@ > // passEnumerate callback on each PassInfo object. > // > void PassRegistrationListener::enumeratePasses() { > - getPassRegistrar()->EnumerateWith(this); > + getPassRegistry()->enumerateWith(this); > } > > PassNameParser::~PassNameParser() {} > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From resistor at mac.com Tue Jul 20 13:53:26 2010 From: resistor at mac.com (Owen Anderson) Date: Tue, 20 Jul 2010 18:53:26 -0000 Subject: [llvm-commits] [llvm] r108885 - /llvm/trunk/include/llvm/PassRegistry.h Message-ID: <20100720185326.119772A6C12C@llvm.org> Author: resistor Date: Tue Jul 20 13:53:25 2010 New Revision: 108885 URL: http://llvm.org/viewvc/llvm-project?rev=108885&view=rev Log: Oops. Added: llvm/trunk/include/llvm/PassRegistry.h Added: llvm/trunk/include/llvm/PassRegistry.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/PassRegistry.h?rev=108885&view=auto ============================================================================== --- llvm/trunk/include/llvm/PassRegistry.h (added) +++ llvm/trunk/include/llvm/PassRegistry.h Tue Jul 20 13:53:25 2010 @@ -0,0 +1,67 @@ +//===- llvm/PassRegistry.h - Pass Information Registry ----------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file defines PassRegistry, a class that is used in the initialization +// and registration of passes. At initialization, passes are registered with +// the PassRegistry, which is later provided to the PassManager for dependency +// resolution and similar tasks. +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_PASSREGISTRY_H +#define LLVM_PASSREGISTRY_H + +#include "llvm/PassSupport.h" +#include "llvm/ADT/StringMap.h" +#include "llvm/System/DataTypes.h" +#include "llvm/System/Mutex.h" +#include +#include + +using namespace llvm; + +namespace llvm { + +class PassRegistry { + /// Guards the contents of this class. + mutable sys::SmartMutex Lock; + + /// PassInfoMap - Keep track of the PassInfo object for each registered pass. + typedef std::map MapType; + MapType PassInfoMap; + + typedef StringMap StringMapType; + StringMapType PassInfoStringMap; + + /// AnalysisGroupInfo - Keep track of information for each analysis group. + struct AnalysisGroupInfo { + std::set Implementations; + }; + std::map AnalysisGroupInfoMap; + +public: + static PassRegistry *getPassRegistry(); + + const PassInfo *getPassInfo(intptr_t TI) const; + const PassInfo *getPassInfo(StringRef Arg) const; + + void registerPass(const PassInfo &PI); + void unregisterPass(const PassInfo &PI); + + /// Analysis Group Mechanisms. + void registerAnalysisGroup(PassInfo *InterfaceInfo, + const PassInfo *ImplementationInfo, + bool isDefault); + + void enumerateWith(PassRegistrationListener *L); +}; + +} + +#endif From sabre at nondot.org Tue Jul 20 13:53:27 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 20 Jul 2010 18:53:27 -0000 Subject: [llvm-commits] [llvm] r108886 - /llvm/trunk/lib/MC/MCDisassembler/Makefile Message-ID: <20100720185327.C12232A6C12D@llvm.org> Author: lattner Date: Tue Jul 20 13:53:27 2010 New Revision: 108886 URL: http://llvm.org/viewvc/llvm-project?rev=108886&view=rev Log: drop edinfo.inc into the objdir for src!=objdir builds. Modified: llvm/trunk/lib/MC/MCDisassembler/Makefile Modified: llvm/trunk/lib/MC/MCDisassembler/Makefile URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCDisassembler/Makefile?rev=108886&r1=108885&r2=108886&view=diff ============================================================================== --- llvm/trunk/lib/MC/MCDisassembler/Makefile (original) +++ llvm/trunk/lib/MC/MCDisassembler/Makefile Tue Jul 20 13:53:27 2010 @@ -13,9 +13,9 @@ include $(LEVEL)/Makefile.common -EDInfo.inc: $(TBLGEN) +$(ObjDir)/EDInfo.inc: $(TBLGEN) $(ObjDir)/.dir $(Echo) "Building semantic information header" - $(Verb) $(TableGen) -o $(call SYSPATH, $@) -gen-enhanced-disassembly-header /dev/null + $(Verb) $(TableGen) -o $@ -gen-enhanced-disassembly-header /dev/null clean:: -$(Verb) $(RM) -f EDInfo.inc From sabre at nondot.org Tue Jul 20 13:59:59 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 20 Jul 2010 18:59:59 -0000 Subject: [llvm-commits] [llvm] r108887 - in /llvm/trunk/lib/MC/MCDisassembler: CMakeLists.txt EDDisassembler.h EDInfo.h Makefile Message-ID: <20100720185959.1C0BD2A6C12C@llvm.org> Author: lattner Date: Tue Jul 20 13:59:58 2010 New Revision: 108887 URL: http://llvm.org/viewvc/llvm-project?rev=108887&view=rev Log: there is no reason to dynamically generate a static header. Added: llvm/trunk/lib/MC/MCDisassembler/EDInfo.h Modified: llvm/trunk/lib/MC/MCDisassembler/CMakeLists.txt llvm/trunk/lib/MC/MCDisassembler/EDDisassembler.h llvm/trunk/lib/MC/MCDisassembler/Makefile Modified: llvm/trunk/lib/MC/MCDisassembler/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCDisassembler/CMakeLists.txt?rev=108887&r1=108886&r2=108887&view=diff ============================================================================== --- llvm/trunk/lib/MC/MCDisassembler/CMakeLists.txt (original) +++ llvm/trunk/lib/MC/MCDisassembler/CMakeLists.txt Tue Jul 20 13:59:58 2010 @@ -1,15 +1,7 @@ -add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/EDInfo.inc - COMMAND ${LLVM_TABLEGEN_EXE} -o ${CMAKE_CURRENT_BINARY_DIR}/EDInfo.inc - -gen-enhanced-disassembly-header - DEPENDS tblgen - COMMENT "Building enhanced disassembly semantic information header (EDInfo.inc)") -set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/EDInfo.inc PROPERTIES GENERATED 1) - add_llvm_library(LLVMMCDisassembler EDDisassembler.cpp EDOperand.cpp EDInst.cpp EDToken.cpp - ${CMAKE_CURRENT_BINARY_DIR}/EDInfo.inc ) Modified: llvm/trunk/lib/MC/MCDisassembler/EDDisassembler.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCDisassembler/EDDisassembler.h?rev=108887&r1=108886&r2=108887&view=diff ============================================================================== --- llvm/trunk/lib/MC/MCDisassembler/EDDisassembler.h (original) +++ llvm/trunk/lib/MC/MCDisassembler/EDDisassembler.h Tue Jul 20 13:59:58 2010 @@ -16,7 +16,7 @@ #ifndef LLVM_EDDISASSEMBLER_H #define LLVM_EDDISASSEMBLER_H -#include "EDInfo.inc" +#include "EDInfo.h" #include "llvm/ADT/OwningPtr.h" #include "llvm/ADT/Triple.h" Added: llvm/trunk/lib/MC/MCDisassembler/EDInfo.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCDisassembler/EDInfo.h?rev=108887&view=auto ============================================================================== --- llvm/trunk/lib/MC/MCDisassembler/EDInfo.h (added) +++ llvm/trunk/lib/MC/MCDisassembler/EDInfo.h Tue Jul 20 13:59:58 2010 @@ -0,0 +1,70 @@ +//===- TableGen'erated file -------------------------------------*- C++ -*-===// +// +// Enhanced Disassembly Info Header +// +// Automatically generated file, do not edit! +// +//===----------------------------------------------------------------------===// + +#ifndef EDInfo_ +#define EDInfo_ + +#define EDIS_MAX_OPERANDS 13 +#define EDIS_MAX_SYNTAXES 2 + +enum OperandTypes { + kOperandTypeNone, + kOperandTypeImmediate, + kOperandTypeRegister, + kOperandTypeX86Memory, + kOperandTypeX86EffectiveAddress, + kOperandTypeX86PCRelative, + kOperandTypeARMBranchTarget, + kOperandTypeARMSoReg, + kOperandTypeARMSoImm, + kOperandTypeARMSoImm2Part, + kOperandTypeARMPredicate, + kOperandTypeARMAddrMode2, + kOperandTypeARMAddrMode2Offset, + kOperandTypeARMAddrMode3, + kOperandTypeARMAddrMode3Offset, + kOperandTypeARMAddrMode4, + kOperandTypeARMAddrMode5, + kOperandTypeARMAddrMode6, + kOperandTypeARMAddrMode6Offset, + kOperandTypeARMAddrModePC, + kOperandTypeARMRegisterList, + kOperandTypeARMTBAddrMode, + kOperandTypeThumbITMask, + kOperandTypeThumbAddrModeS1, + kOperandTypeThumbAddrModeS2, + kOperandTypeThumbAddrModeS4, + kOperandTypeThumbAddrModeRR, + kOperandTypeThumbAddrModeSP, + kOperandTypeThumb2SoReg, + kOperandTypeThumb2SoImm, + kOperandTypeThumb2AddrModeImm8, + kOperandTypeThumb2AddrModeImm8Offset, + kOperandTypeThumb2AddrModeImm12, + kOperandTypeThumb2AddrModeSoReg, + kOperandTypeThumb2AddrModeImm8s4, + kOperandTypeThumb2AddrModeImm8s4Offset +}; + +enum OperandFlags { + kOperandFlagSource = 0x1, + kOperandFlagTarget = 0x2 +}; + +enum InstructionTypes { + kInstructionTypeNone, + kInstructionTypeMove, + kInstructionTypeBranch, + kInstructionTypePush, + kInstructionTypePop, + kInstructionTypeCall, + kInstructionTypeReturn +}; + + +#endif Modified: llvm/trunk/lib/MC/MCDisassembler/Makefile URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCDisassembler/Makefile?rev=108887&r1=108886&r2=108887&view=diff ============================================================================== --- llvm/trunk/lib/MC/MCDisassembler/Makefile (original) +++ llvm/trunk/lib/MC/MCDisassembler/Makefile Tue Jul 20 13:59:58 2010 @@ -9,13 +9,6 @@ LEVEL = ../../.. LIBRARYNAME = LLVMMCDisassembler -BUILT_SOURCES = EDInfo.inc include $(LEVEL)/Makefile.common -$(ObjDir)/EDInfo.inc: $(TBLGEN) $(ObjDir)/.dir - $(Echo) "Building semantic information header" - $(Verb) $(TableGen) -o $@ -gen-enhanced-disassembly-header /dev/null - -clean:: - -$(Verb) $(RM) -f EDInfo.inc From matt at console-pimps.org Tue Jul 20 14:09:38 2010 From: matt at console-pimps.org (Matt Fleming) Date: Tue, 20 Jul 2010 20:09:38 +0100 Subject: [llvm-commits] [PATCH] ELFAsmParser section directives Message-ID: <87eieyynpp.fsf@linux-g6p1.site> The following patch adds various directives that specify the start of a section. OK to commit along with tests in a new test/MC/AsmParser/ELF directory? Index: lib/MC/MCParser/ELFAsmParser.cpp =================================================================== --- lib/MC/MCParser/ELFAsmParser.cpp (revision 108749) +++ lib/MC/MCParser/ELFAsmParser.cpp (working copy) @@ -42,6 +42,14 @@ AddDirectiveHandler<&ELFAsmParser::ParseDirectiveSize>(".size"); AddDirectiveHandler<&ELFAsmParser::ParseDirectiveLEB128>(".sleb128"); AddDirectiveHandler<&ELFAsmParser::ParseDirectiveLEB128>(".uleb128"); + AddDirectiveHandler<&ELFAsmParser::ParseSectionDirectiveBSS>(".bss"); + AddDirectiveHandler<&ELFAsmParser::ParseSectionDirectiveRoData>(".rodata"); + AddDirectiveHandler<&ELFAsmParser::ParseSectionDirectiveTData>(".tdata"); + AddDirectiveHandler<&ELFAsmParser::ParseSectionDirectiveTBSS>(".tbss"); + AddDirectiveHandler<&ELFAsmParser::ParseSectionDirectiveDataRel>(".data.rel"); + AddDirectiveHandler<&ELFAsmParser::ParseSectionDirectiveDataRelRo>(".data.rel.ro"); + AddDirectiveHandler<&ELFAsmParser::ParseSectionDirectiveDataRelRoLocal>(".data.rel.ro.local"); + AddDirectiveHandler<&ELFAsmParser::ParseSectionDirectiveEhFrame>(".eh_frame"); } bool ParseSectionDirectiveData(StringRef, SMLoc) { @@ -57,6 +65,52 @@ bool ParseDirectiveLEB128(StringRef, SMLoc); bool ParseDirectiveSection(StringRef, SMLoc); bool ParseDirectiveSize(StringRef, SMLoc); + bool ParseSectionDirectiveBSS(StringRef, SMLoc) { + return ParseSectionSwitch(".bss", MCSectionELF::SHT_NOBITS, + MCSectionELF::SHF_WRITE | + MCSectionELF::SHF_ALLOC, SectionKind::getBSS()); + } + bool ParseSectionDirectiveRoData(StringRef, SMLoc) { + return ParseSectionSwitch(".rodata", MCSectionELF::SHT_PROGBITS, + MCSectionELF::SHF_ALLOC, + SectionKind::getReadOnly()); + } + bool ParseSectionDirectiveTData(StringRef, SMLoc) { + return ParseSectionSwitch(".tdata", MCSectionELF::SHT_PROGBITS, + MCSectionELF::SHF_ALLOC | + MCSectionELF::SHF_TLS | MCSectionELF::SHF_WRITE, + SectionKind::getThreadData()); + } + bool ParseSectionDirectiveTBSS(StringRef, SMLoc) { + return ParseSectionSwitch(".tbss", MCSectionELF::SHT_NOBITS, + MCSectionELF::SHF_ALLOC | + MCSectionELF::SHF_TLS | MCSectionELF::SHF_WRITE, + SectionKind::getThreadBSS()); + } + bool ParseSectionDirectiveDataRel(StringRef, SMLoc) { + return ParseSectionSwitch(".data.rel", MCSectionELF::SHT_PROGBITS, + MCSectionELF::SHF_ALLOC | + MCSectionELF::SHF_WRITE, + SectionKind::getDataRel()); + } + bool ParseSectionDirectiveDataRelRo(StringRef, SMLoc) { + return ParseSectionSwitch(".data.rel.ro", MCSectionELF::SHT_PROGBITS, + MCSectionELF::SHF_ALLOC | + MCSectionELF::SHF_WRITE, + SectionKind::getReadOnlyWithRel()); + } + bool ParseSectionDirectiveDataRelRoLocal(StringRef, SMLoc) { + return ParseSectionSwitch(".data.rel.ro.local", MCSectionELF::SHT_PROGBITS, + MCSectionELF::SHF_ALLOC | + MCSectionELF::SHF_WRITE, + SectionKind::getReadOnlyWithRelLocal()); + } + bool ParseSectionDirectiveEhFrame(StringRef, SMLoc) { + return ParseSectionSwitch(".eh_frame", MCSectionELF::SHT_PROGBITS, + MCSectionELF::SHF_ALLOC | + MCSectionELF::SHF_WRITE, + SectionKind::getDataRel()); + } }; } From dpatel at apple.com Tue Jul 20 14:13:31 2010 From: dpatel at apple.com (Devang Patel) Date: Tue, 20 Jul 2010 12:13:31 -0700 Subject: [llvm-commits] [llvm] r108885 - /llvm/trunk/include/llvm/PassRegistry.h In-Reply-To: <20100720185326.119772A6C12C@llvm.org> References: <20100720185326.119772A6C12C@llvm.org> Message-ID: <6B1BA291-7A47-4679-9B54-C9C84AA5D230@apple.com> On Jul 20, 2010, at 11:53 AM, Owen Anderson wrote: > Author: resistor > Date: Tue Jul 20 13:53:25 2010 > New Revision: 108885 > > URL: http://llvm.org/viewvc/llvm-project?rev=108885&view=rev > Log: > Oops. Thanks. Now I'm getting.... llvm[2]: Compiling GraphPrinters.cpp for Debug+Asserts build Undefined symbols: "llvm::PassRegistry::registerPass(llvm::PassInfo const&)", referenced from: llvm::PassInfo::registerPass() in libLLVMCore.a(Pass.o) "llvm::PassRegistry::getPassInfo(long) const", referenced from: llvm::Pass::lookupPassInfo(long) in libLLVMCore.a(Pass.o) "llvm::PassRegistry::unregisterPass(llvm::PassInfo const&)", referenced from: llvm::PassInfo::unregisterPass() in libLLVMCore.a(Pass.o) "llvm::PassRegistry::registerAnalysisGroup(llvm::PassInfo*, llvm::PassInfo const*, bool)", referenced from: llvm::RegisterAGBase::RegisterAGBase(char const*, long, long, bool)in libLLVMCore.a(Pass.o) llvm::RegisterAGBase::RegisterAGBase(char const*, long, long, bool)in libLLVMCore.a(Pass.o) "llvm::PassRegistry::enumerateWith(llvm::PassRegistrationListener*)", referenced from: llvm::PassRegistrationListener::enumeratePasses() in libLLVMCore.a(Pass.o) "llvm::PassRegistry::getPassInfo(llvm::StringRef) const", referenced from: llvm::Pass::lookupPassInfo(llvm::StringRef) in libLLVMCore.a(Pass.o) - Devang From resistor at mac.com Tue Jul 20 14:23:55 2010 From: resistor at mac.com (Owen Anderson) Date: Tue, 20 Jul 2010 19:23:55 -0000 Subject: [llvm-commits] [llvm] r108888 - in /llvm/trunk: include/llvm/PassRegistry.h lib/VMCore/PassRegistry.cpp Message-ID: <20100720192355.489052A6C12C@llvm.org> Author: resistor Date: Tue Jul 20 14:23:55 2010 New Revision: 108888 URL: http://llvm.org/viewvc/llvm-project?rev=108888&view=rev Log: I just fail with SVN today. Added: llvm/trunk/lib/VMCore/PassRegistry.cpp Modified: llvm/trunk/include/llvm/PassRegistry.h Modified: llvm/trunk/include/llvm/PassRegistry.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/PassRegistry.h?rev=108888&r1=108887&r2=108888&view=diff ============================================================================== --- llvm/trunk/include/llvm/PassRegistry.h (original) +++ llvm/trunk/include/llvm/PassRegistry.h Tue Jul 20 14:23:55 2010 @@ -46,8 +46,6 @@ std::map AnalysisGroupInfoMap; public: - static PassRegistry *getPassRegistry(); - const PassInfo *getPassInfo(intptr_t TI) const; const PassInfo *getPassInfo(StringRef Arg) const; Added: llvm/trunk/lib/VMCore/PassRegistry.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/PassRegistry.cpp?rev=108888&view=auto ============================================================================== --- llvm/trunk/lib/VMCore/PassRegistry.cpp (added) +++ llvm/trunk/lib/VMCore/PassRegistry.cpp Tue Jul 20 14:23:55 2010 @@ -0,0 +1,72 @@ +//===- PassRegistry.cpp - Pass Registration Implementation ----------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file implements the PassRegistry, with which passes are registered on +// initialization, and supports the PassManager in dependency resolution. +// +//===----------------------------------------------------------------------===// + +#include "llvm/PassRegistry.h" +#include "llvm/System/Mutex.h" + +const PassInfo *PassRegistry::getPassInfo(intptr_t TI) const { + sys::SmartScopedLock Guard(Lock); + MapType::const_iterator I = PassInfoMap.find(TI); + return I != PassInfoMap.end() ? I->second : 0; +} + +const PassInfo *PassRegistry::getPassInfo(StringRef Arg) const { + sys::SmartScopedLock Guard(Lock); + StringMapType::const_iterator I = PassInfoStringMap.find(Arg); + return I != PassInfoStringMap.end() ? I->second : 0; +} + +void PassRegistry::registerPass(const PassInfo &PI) { + sys::SmartScopedLock Guard(Lock); + bool Inserted = + PassInfoMap.insert(std::make_pair(PI.getTypeInfo(),&PI)).second; + assert(Inserted && "Pass registered multiple times!"); Inserted=Inserted; + PassInfoStringMap[PI.getPassArgument()] = &PI; +} + +void PassRegistry::unregisterPass(const PassInfo &PI) { + sys::SmartScopedLock Guard(Lock); + MapType::iterator I = PassInfoMap.find(PI.getTypeInfo()); + assert(I != PassInfoMap.end() && "Pass registered but not in map!"); + + // Remove pass from the map. + PassInfoMap.erase(I); + PassInfoStringMap.erase(PI.getPassArgument()); +} + +void PassRegistry::enumerateWith(PassRegistrationListener *L) { + sys::SmartScopedLock Guard(Lock); + for (MapType::const_iterator I = PassInfoMap.begin(), + E = PassInfoMap.end(); I != E; ++I) + L->passEnumerate(I->second); +} + + +/// Analysis Group Mechanisms. +void PassRegistry::registerAnalysisGroup(PassInfo *InterfaceInfo, + const PassInfo *ImplementationInfo, + bool isDefault) { + sys::SmartScopedLock Guard(Lock); + AnalysisGroupInfo &AGI = AnalysisGroupInfoMap[InterfaceInfo]; + assert(AGI.Implementations.count(ImplementationInfo) == 0 && + "Cannot add a pass to the same analysis group more than once!"); + AGI.Implementations.insert(ImplementationInfo); + if (isDefault) { + assert(InterfaceInfo->getNormalCtor() == 0 && + "Default implementation for analysis group already specified!"); + assert(ImplementationInfo->getNormalCtor() && + "Cannot specify pass as default if it does not have a default ctor"); + InterfaceInfo->setNormalCtor(ImplementationInfo->getNormalCtor()); + } +} From matt at console-pimps.org Tue Jul 20 14:29:04 2010 From: matt at console-pimps.org (Matt Fleming) Date: Tue, 20 Jul 2010 20:29:04 +0100 Subject: [llvm-commits] [PATCH] More ELF SHT_ values Message-ID: <87bpa2ymtb.fsf@linux-g6p1.site> This patch adds the rest of the SHT_* values from the SYSV ELF specification. OK to commit? Index: include/llvm/Support/ELF.h =================================================================== --- include/llvm/Support/ELF.h (revision 108887) +++ include/llvm/Support/ELF.h (working copy) @@ -257,22 +257,29 @@ // Section types. enum { - SHT_NULL = 0, // No associated section (inactive entry). - SHT_PROGBITS = 1, // Program-defined contents. - SHT_SYMTAB = 2, // Symbol table. - SHT_STRTAB = 3, // String table. - SHT_RELA = 4, // Relocation entries; explicit addends. - SHT_HASH = 5, // Symbol hash table. - SHT_DYNAMIC = 6, // Information for dynamic linking. - SHT_NOTE = 7, // Information about the file. - SHT_NOBITS = 8, // Data occupies no space in the file. - SHT_REL = 9, // Relocation entries; no explicit addends. - SHT_SHLIB = 10, // Reserved. - SHT_DYNSYM = 11, // Symbol table. - SHT_LOPROC = 0x70000000, // Lowest processor architecture-specific type. - SHT_HIPROC = 0x7fffffff, // Highest processor architecture-specific type. - SHT_LOUSER = 0x80000000, // Lowest type reserved for applications. - SHT_HIUSER = 0xffffffff // Highest type reserved for applications. + SHT_NULL = 0, // No associated section (inactive entry). + SHT_PROGBITS = 1, // Program-defined contents. + SHT_SYMTAB = 2, // Symbol table. + SHT_STRTAB = 3, // String table. + SHT_RELA = 4, // Relocation entries; explicit addends. + SHT_HASH = 5, // Symbol hash table. + SHT_DYNAMIC = 6, // Information for dynamic linking. + SHT_NOTE = 7, // Information about the file. + SHT_NOBITS = 8, // Data occupies no space in the file. + SHT_REL = 9, // Relocation entries; no explicit addends. + SHT_SHLIB = 10, // Reserved. + SHT_DYNSYM = 11, // Symbol table. + SHT_INIT_ARRAY = 14, // Pointers to initialisation functions. + SHT_FINI_ARRAY = 15, // Pointers to termination functions. + SHT_PREINIT_ARRAY = 16, // Pointers to pre-init functions. + SHT_GROUP = 17, // Section group. + SHT_SYMTAB_SHNDX = 18, // Indicies for SHN_XINDEX entries. + SHT_LOOS = 0x60000000, // Lowest operating system-specific type. + SHT_HIOS = 0x6fffffff, // Highest operating system-specific type. + SHT_LOPROC = 0x70000000, // Lowest processor architecture-specific type. + SHT_HIPROC = 0x7fffffff, // Highest processor architecture-specific type. + SHT_LOUSER = 0x80000000, // Lowest type reserved for applications. + SHT_HIUSER = 0xffffffff // Highest type reserved for applications. }; // Section flags. From espindola at google.com Tue Jul 20 14:33:39 2010 From: espindola at google.com (Rafael Espindola) Date: Tue, 20 Jul 2010 15:33:39 -0400 Subject: [llvm-commits] [PATCH] More ELF SHT_ values In-Reply-To: <87bpa2ymtb.fsf@linux-g6p1.site> References: <87bpa2ymtb.fsf@linux-g6p1.site> Message-ID: Should be fine, thanks! On 20 July 2010 15:29, Matt Fleming wrote: > > This patch adds the rest of the SHT_* values from the SYSV ELF > specification. OK to commit? > > Index: include/llvm/Support/ELF.h > =================================================================== > --- include/llvm/Support/ELF.h ?(revision 108887) > +++ include/llvm/Support/ELF.h ?(working copy) > @@ -257,22 +257,29 @@ > > ?// Section types. > ?enum { > - ?SHT_NULL ? ? = 0, ?// No associated section (inactive entry). > - ?SHT_PROGBITS = 1, ?// Program-defined contents. > - ?SHT_SYMTAB ? = 2, ?// Symbol table. > - ?SHT_STRTAB ? = 3, ?// String table. > - ?SHT_RELA ? ? = 4, ?// Relocation entries; explicit addends. > - ?SHT_HASH ? ? = 5, ?// Symbol hash table. > - ?SHT_DYNAMIC ?= 6, ?// Information for dynamic linking. > - ?SHT_NOTE ? ? = 7, ?// Information about the file. > - ?SHT_NOBITS ? = 8, ?// Data occupies no space in the file. > - ?SHT_REL ? ? ?= 9, ?// Relocation entries; no explicit addends. > - ?SHT_SHLIB ? ?= 10, // Reserved. > - ?SHT_DYNSYM ? = 11, // Symbol table. > - ?SHT_LOPROC ? = 0x70000000, // Lowest processor architecture-specific type. > - ?SHT_HIPROC ? = 0x7fffffff, // Highest processor architecture-specific type. > - ?SHT_LOUSER ? = 0x80000000, // Lowest type reserved for applications. > - ?SHT_HIUSER ? = 0xffffffff ?// Highest type reserved for applications. > + ?SHT_NULL ? ? ? ? ?= 0, ?// No associated section (inactive entry). > + ?SHT_PROGBITS ? ? ?= 1, ?// Program-defined contents. > + ?SHT_SYMTAB ? ? ? ?= 2, ?// Symbol table. > + ?SHT_STRTAB ? ? ? ?= 3, ?// String table. > + ?SHT_RELA ? ? ? ? ?= 4, ?// Relocation entries; explicit addends. > + ?SHT_HASH ? ? ? ? ?= 5, ?// Symbol hash table. > + ?SHT_DYNAMIC ? ? ? = 6, ?// Information for dynamic linking. > + ?SHT_NOTE ? ? ? ? ?= 7, ?// Information about the file. > + ?SHT_NOBITS ? ? ? ?= 8, ?// Data occupies no space in the file. > + ?SHT_REL ? ? ? ? ? = 9, ?// Relocation entries; no explicit addends. > + ?SHT_SHLIB ? ? ? ? = 10, // Reserved. > + ?SHT_DYNSYM ? ? ? ?= 11, // Symbol table. > + ?SHT_INIT_ARRAY ? ?= 14, // Pointers to initialisation functions. > + ?SHT_FINI_ARRAY ? ?= 15, // Pointers to termination functions. > + ?SHT_PREINIT_ARRAY = 16, // Pointers to pre-init functions. > + ?SHT_GROUP ? ? ? ? = 17, // Section group. > + ?SHT_SYMTAB_SHNDX ?= 18, // Indicies for SHN_XINDEX entries. > + ?SHT_LOOS ? ? ? ? ?= 0x60000000, // Lowest operating system-specific type. > + ?SHT_HIOS ? ? ? ? ?= 0x6fffffff, // Highest operating system-specific type. > + ?SHT_LOPROC ? ? ? ?= 0x70000000, // Lowest processor architecture-specific type. > + ?SHT_HIPROC ? ? ? ?= 0x7fffffff, // Highest processor architecture-specific type. > + ?SHT_LOUSER ? ? ? ?= 0x80000000, // Lowest type reserved for applications. > + ?SHT_HIUSER ? ? ? ?= 0xffffffff ?// Highest type reserved for applications. > ?}; > > ?// Section flags. > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits > -- Rafael ?vila de Esp?ndola From ggreif at gmail.com Tue Jul 20 14:35:55 2010 From: ggreif at gmail.com (Gabor Greif) Date: Tue, 20 Jul 2010 19:35:55 -0000 Subject: [llvm-commits] [llvm] r108889 - /llvm/trunk/unittests/Support/Casting.cpp Message-ID: <20100720193556.05A892A6C12C@llvm.org> Author: ggreif Date: Tue Jul 20 14:35:55 2010 New Revision: 108889 URL: http://llvm.org/viewvc/llvm-project?rev=108889&view=rev Log: tidy up Modified: llvm/trunk/unittests/Support/Casting.cpp Modified: llvm/trunk/unittests/Support/Casting.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/Support/Casting.cpp?rev=108889&r1=108888&r2=108889&view=diff ============================================================================== --- llvm/trunk/unittests/Support/Casting.cpp (original) +++ llvm/trunk/unittests/Support/Casting.cpp Tue Jul 20 14:35:55 2010 @@ -1,4 +1,4 @@ -//===---------- llvm/unittest/Support/Casting.cpp - Casting tests --------===// +//===---------- llvm/unittest/Support/Casting.cpp - Casting tests ---------===// // // The LLVM Compiler Infrastructure // @@ -7,15 +7,13 @@ // //===----------------------------------------------------------------------===// -#include "llvm/Support/raw_ostream.h" -#include "llvm/Support/Debug.h" -//#define DEBUG_CAST_OPERATORS #include "llvm/Support/Casting.h" +#include "llvm/Support/Debug.h" +#include "llvm/Support/raw_ostream.h" #include "gtest/gtest.h" #include - namespace llvm { // set up two example classes From sabre at nondot.org Tue Jul 20 14:40:51 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 20 Jul 2010 19:40:51 -0000 Subject: [llvm-commits] [llvm] r108890 - /llvm/trunk/lib/MC/MCDisassembler/EDInst.h Message-ID: <20100720194051.BFAB82A6C12C@llvm.org> Author: lattner Date: Tue Jul 20 14:40:51 2010 New Revision: 108890 URL: http://llvm.org/viewvc/llvm-project?rev=108890&view=rev Log: hopefully heal the linux builders Modified: llvm/trunk/lib/MC/MCDisassembler/EDInst.h Modified: llvm/trunk/lib/MC/MCDisassembler/EDInst.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCDisassembler/EDInst.h?rev=108890&r1=108889&r2=108890&view=diff ============================================================================== --- llvm/trunk/lib/MC/MCDisassembler/EDInst.h (original) +++ llvm/trunk/lib/MC/MCDisassembler/EDInst.h Tue Jul 20 14:40:51 2010 @@ -16,6 +16,7 @@ #ifndef LLVM_EDINST_H #define LLVM_EDINST_H +#include "llvm/Support/DataTypes.h" #include "llvm/ADT/SmallVector.h" #include #include From sabre at nondot.org Tue Jul 20 14:43:19 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 20 Jul 2010 19:43:19 -0000 Subject: [llvm-commits] [llvm] r108891 - /llvm/trunk/lib/MC/MCDisassembler/EDInfo.h Message-ID: <20100720194319.7498B2A6C12C@llvm.org> Author: lattner Date: Tue Jul 20 14:43:19 2010 New Revision: 108891 URL: http://llvm.org/viewvc/llvm-project?rev=108891&view=rev Log: turn this into a normal header. Modified: llvm/trunk/lib/MC/MCDisassembler/EDInfo.h Modified: llvm/trunk/lib/MC/MCDisassembler/EDInfo.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCDisassembler/EDInfo.h?rev=108891&r1=108890&r2=108891&view=diff ============================================================================== --- llvm/trunk/lib/MC/MCDisassembler/EDInfo.h (original) +++ llvm/trunk/lib/MC/MCDisassembler/EDInfo.h Tue Jul 20 14:43:19 2010 @@ -1,16 +1,19 @@ -//===- TableGen'erated file -------------------------------------*- C++ -*-===// +//===-- EDInfo.h - LLVM Enhanced Disassembler -------------------*- C++ -*-===// // -// Enhanced Disassembly Info Header -// -// Automatically generated file, do not edit! +// The LLVM Compiler Infrastructure // +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// //===----------------------------------------------------------------------===// -#ifndef EDInfo_ -#define EDInfo_ +#ifndef LLVM_EDINFO_H +#define LLVM_EDINFO_H -#define EDIS_MAX_OPERANDS 13 -#define EDIS_MAX_SYNTAXES 2 +enum { + EDIS_MAX_OPERANDS = 13, + EDIS_MAX_SYNTAXES = 2 +}; enum OperandTypes { kOperandTypeNone, From bruno.cardoso at gmail.com Tue Jul 20 14:44:51 2010 From: bruno.cardoso at gmail.com (Bruno Cardoso Lopes) Date: Tue, 20 Jul 2010 19:44:51 -0000 Subject: [llvm-commits] [llvm] r108892 - in /llvm/trunk: lib/Target/X86/X86InstrFormats.td lib/Target/X86/X86InstrSSE.td test/MC/AsmParser/X86/x86_32-encoding.s test/MC/AsmParser/X86/x86_64-encoding.s Message-ID: <20100720194451.D48B12A6C12C@llvm.org> Author: bruno Date: Tue Jul 20 14:44:51 2010 New Revision: 108892 URL: http://llvm.org/viewvc/llvm-project?rev=108892&view=rev Log: Add new AVX instruction vinsertf128 Modified: llvm/trunk/lib/Target/X86/X86InstrFormats.td llvm/trunk/lib/Target/X86/X86InstrSSE.td llvm/trunk/test/MC/AsmParser/X86/x86_32-encoding.s llvm/trunk/test/MC/AsmParser/X86/x86_64-encoding.s Modified: llvm/trunk/lib/Target/X86/X86InstrFormats.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrFormats.td?rev=108892&r1=108891&r2=108892&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86InstrFormats.td (original) +++ llvm/trunk/lib/Target/X86/X86InstrFormats.td Tue Jul 20 14:44:51 2010 @@ -415,10 +415,15 @@ // Instructions introduced in AVX (no SSE equivalent forms) // // AVX8I - AVX instructions with T8 and OpSize prefix. +// AVXAIi8 - AVX instructions with TA, OpSize prefix and ImmT = Imm8. class AVX8I o, Format F, dag outs, dag ins, string asm, list pattern> : I, T8, OpSize, Requires<[HasAVX]>; +class AVXAIi8 o, Format F, dag outs, dag ins, string asm, + list pattern> + : Ii8, TA, OpSize, + Requires<[HasAVX]>; // AES Instruction Templates: // Modified: llvm/trunk/lib/Target/X86/X86InstrSSE.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrSSE.td?rev=108892&r1=108891&r2=108892&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86InstrSSE.td (original) +++ llvm/trunk/lib/Target/X86/X86InstrSSE.td Tue Jul 20 14:44:51 2010 @@ -4998,4 +4998,14 @@ def VBROADCASTSD : avx_broadcast<0x19, "vbroadcastsd", VR256, f64mem>; def VBROADCASTF128 : avx_broadcast<0x1A, "vbroadcastf128", VR256, f128mem>; +// Insert packed floating-point values +def VINSERTF128rr : AVXAIi8<0x18, MRMSrcReg, (outs VR256:$dst), + (ins VR256:$src1, VR128:$src2, i8imm:$src3), + "vinsertf128\t{$src3, $src2, $src1, $dst|$dst, $src1, $src2, $src3}", + []>, VEX_4V; +def VINSERTF128rm : AVXAIi8<0x18, MRMSrcMem, (outs VR256:$dst), + (ins VR256:$src1, f128mem:$src2, i8imm:$src3), + "vinsertf128\t{$src3, $src2, $src1, $dst|$dst, $src1, $src2, $src3}", + []>, VEX_4V; + } // isAsmParserOnly Modified: llvm/trunk/test/MC/AsmParser/X86/x86_32-encoding.s URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AsmParser/X86/x86_32-encoding.s?rev=108892&r1=108891&r2=108892&view=diff ============================================================================== --- llvm/trunk/test/MC/AsmParser/X86/x86_32-encoding.s (original) +++ llvm/trunk/test/MC/AsmParser/X86/x86_32-encoding.s Tue Jul 20 14:44:51 2010 @@ -13014,3 +13014,11 @@ // CHECK: encoding: [0xc4,0xe2,0x7d,0x18,0x10] vbroadcastss (%eax), %ymm2 +// CHECK: vinsertf128 $7, %xmm2, %ymm2, %ymm5 +// CHECK: encoding: [0xc4,0xe3,0x6d,0x18,0xea,0x07] + vinsertf128 $7, %xmm2, %ymm2, %ymm5 + +// CHECK: vinsertf128 $7, (%eax), %ymm2, %ymm5 +// CHECK: encoding: [0xc4,0xe3,0x6d,0x18,0x28,0x07] + vinsertf128 $7, (%eax), %ymm2, %ymm5 + Modified: llvm/trunk/test/MC/AsmParser/X86/x86_64-encoding.s URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AsmParser/X86/x86_64-encoding.s?rev=108892&r1=108891&r2=108892&view=diff ============================================================================== --- llvm/trunk/test/MC/AsmParser/X86/x86_64-encoding.s (original) +++ llvm/trunk/test/MC/AsmParser/X86/x86_64-encoding.s Tue Jul 20 14:44:51 2010 @@ -3088,3 +3088,11 @@ // CHECK: encoding: [0xc4,0x62,0x7d,0x18,0x20] vbroadcastss (%rax), %ymm12 +// CHECK: vinsertf128 $7, %xmm12, %ymm12, %ymm10 +// CHECK: encoding: [0xc4,0x43,0x1d,0x18,0xd4,0x07] + vinsertf128 $7, %xmm12, %ymm12, %ymm10 + +// CHECK: vinsertf128 $7, (%rax), %ymm12, %ymm10 +// CHECK: encoding: [0xc4,0x63,0x1d,0x18,0x10,0x07] + vinsertf128 $7, (%rax), %ymm12, %ymm10 + From sabre at nondot.org Tue Jul 20 14:45:21 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 20 Jul 2010 19:45:21 -0000 Subject: [llvm-commits] [llvm] r108893 - in /llvm/trunk/utils/TableGen: EDEmitter.cpp EDEmitter.h TableGen.cpp Message-ID: <20100720194522.0ADEC2A6C12C@llvm.org> Author: lattner Date: Tue Jul 20 14:45:21 2010 New Revision: 108893 URL: http://llvm.org/viewvc/llvm-project?rev=108893&view=rev Log: remove option from tablegen for building static header. Modified: llvm/trunk/utils/TableGen/EDEmitter.cpp llvm/trunk/utils/TableGen/EDEmitter.h llvm/trunk/utils/TableGen/TableGen.cpp Modified: llvm/trunk/utils/TableGen/EDEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/EDEmitter.cpp?rev=108893&r1=108892&r2=108893&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/EDEmitter.cpp (original) +++ llvm/trunk/utils/TableGen/EDEmitter.cpp Tue Jul 20 14:45:21 2010 @@ -896,21 +896,3 @@ o << "}\n"; } - -void EDEmitter::runHeader(raw_ostream &o) { - EmitSourceFileHeader("Enhanced Disassembly Info Header", o); - - o << "#ifndef EDInfo_" << "\n"; - o << "#define EDInfo_" << "\n"; - o << "\n"; - o << "#define EDIS_MAX_OPERANDS " << format("%d", EDIS_MAX_OPERANDS) << "\n"; - o << "#define EDIS_MAX_SYNTAXES " << format("%d", EDIS_MAX_SYNTAXES) << "\n"; - o << "\n"; - - unsigned int i = 0; - - emitCommonEnums(o, i); - - o << "\n"; - o << "#endif" << "\n"; -} Modified: llvm/trunk/utils/TableGen/EDEmitter.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/EDEmitter.h?rev=108893&r1=108892&r2=108893&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/EDEmitter.h (original) +++ llvm/trunk/utils/TableGen/EDEmitter.h Tue Jul 20 14:45:21 2010 @@ -27,9 +27,6 @@ // run - Output the instruction table. void run(raw_ostream &o); - - // runHeader - Emit a header file that allows use of the instruction table. - void runHeader(raw_ostream &o); }; } // End llvm namespace Modified: llvm/trunk/utils/TableGen/TableGen.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/TableGen.cpp?rev=108893&r1=108892&r2=108893&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/TableGen.cpp (original) +++ llvm/trunk/utils/TableGen/TableGen.cpp Tue Jul 20 14:45:21 2010 @@ -67,7 +67,7 @@ GenIntrinsic, GenTgtIntrinsic, GenLLVMCConf, - GenEDHeader, GenEDInfo, + GenEDInfo, GenArmNeon, GenArmNeonSema, PrintEnums @@ -128,8 +128,6 @@ "Generate Clang AST statement nodes"), clEnumValN(GenLLVMCConf, "gen-llvmc", "Generate LLVMC configuration library"), - clEnumValN(GenEDHeader, "gen-enhanced-disassembly-header", - "Generate enhanced disassembly info header"), clEnumValN(GenEDInfo, "gen-enhanced-disassembly-info", "Generate enhanced disassembly info"), clEnumValN(GenArmNeon, "gen-arm-neon", @@ -301,9 +299,6 @@ case GenLLVMCConf: LLVMCConfigurationEmitter(Records).run(Out); break; - case GenEDHeader: - EDEmitter(Records).runHeader(Out); - break; case GenEDInfo: EDEmitter(Records).run(Out); break; From simmon12 at illinois.edu Tue Jul 20 14:49:19 2010 From: simmon12 at illinois.edu (Patrick Simmons) Date: Tue, 20 Jul 2010 19:49:19 -0000 Subject: [llvm-commits] [poolalloc] r108894 - in /poolalloc/trunk/runtime/FL2Allocator: PoolAllocator.cpp PoolAllocator.h Message-ID: <20100720194920.0227E2A6C12C@llvm.org> Author: psimmons Date: Tue Jul 20 14:49:19 2010 New Revision: 108894 URL: http://llvm.org/viewvc/llvm-project?rev=108894&view=rev Log: PoolAlloc runtime fixes for multithreading Modified: poolalloc/trunk/runtime/FL2Allocator/PoolAllocator.cpp poolalloc/trunk/runtime/FL2Allocator/PoolAllocator.h Modified: poolalloc/trunk/runtime/FL2Allocator/PoolAllocator.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/runtime/FL2Allocator/PoolAllocator.cpp?rev=108894&r1=108893&r2=108894&view=diff ============================================================================== --- poolalloc/trunk/runtime/FL2Allocator/PoolAllocator.cpp (original) +++ poolalloc/trunk/runtime/FL2Allocator/PoolAllocator.cpp Tue Jul 20 14:49:19 2010 @@ -483,6 +483,7 @@ unsigned DeclaredSize, unsigned ObjAlignment) { assert(Pool && "Null pool pointer passed into poolinit!\n"); memset(Pool, 0, sizeof(PoolTy)); + Pool->thread_refcount = 1; pthread_mutex_init(&Pool->pool_lock,NULL); Pool->AllocSize = INITIAL_SLAB_SIZE; @@ -524,6 +525,15 @@ // void pooldestroy(PoolTy *Pool) { assert(Pool && "Null pool pointer passed in to pooldestroy!\n"); + +#ifdef USE_DYNCALL + __sync_fetch_and_add(&Pool->thread_refcount,-1); +#else + Pool->thread_refcount--; +#endif + if(Pool->thread_refcount) + return; + pthread_mutex_destroy(&Pool->pool_lock); #ifdef ENABLE_POOL_IDS @@ -908,31 +918,58 @@ { void** arg = (void**)arg_; DCCallVM* callVM = dcNewCallVM((size_t)arg[1]*sizeof(size_t)+108); + arg[2+(size_t)arg[1]+2] = callVM; int i; for(i=0; i<(size_t)arg[1]; i++) dcArgPointer(callVM,arg[2+i]); dcArgPointer(callVM,arg[2+i]); void* to_return = dcCallPointer(callVM,arg[0]); - dcFree(callVM); - free(arg_); return to_return; } +void* poolalloc_thread_manager(void* args_) +{ + void** args = (void**)args_; + size_t num_pools = (size_t)args[1]; + + void* to_return; + pthread_join((pthread_t)(args[2+num_pools+1]),&to_return); + + for(int i=0; i*)args[2+i]); + + dcFree((DCCallVM*)args[2+num_pools+2]); + free(args); + return to_return; +} + int poolalloc_pthread_create(pthread_t* thread, const pthread_attr_t* attr, void *(*start_routine)(void*), int num_pools, ...) { - void** arg_array = (void**)malloc(sizeof(void*)*(3+num_pools)); + void** arg_array = (void**)malloc(sizeof(void*)*(5+num_pools)); arg_array[0] = (void*)start_routine; arg_array[1] = (void*)num_pools; va_list argpools; va_start(argpools,num_pools); int i; for(i=0; i* pool_ptr = reinterpret_cast*>(arg_array[2+i]); + if(pool_ptr) + __sync_fetch_and_add(&pool_ptr->thread_refcount,1); + } arg_array[2+i]=va_arg(argpools,void*); va_end(argpools); - return pthread_create(thread,attr,poolalloc_thread_start,arg_array); + + pthread_t dummy; + int to_return = pthread_create(&dummy,attr,poolalloc_thread_start,arg_array); + arg_array[2+i+1] = (void*)(dummy); + to_return |= pthread_create(thread,NULL,poolalloc_thread_manager,arg_array); + + return to_return; } #endif Modified: poolalloc/trunk/runtime/FL2Allocator/PoolAllocator.h URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/runtime/FL2Allocator/PoolAllocator.h?rev=108894&r1=108893&r2=108894&view=diff ============================================================================== --- poolalloc/trunk/runtime/FL2Allocator/PoolAllocator.h (original) +++ poolalloc/trunk/runtime/FL2Allocator/PoolAllocator.h Tue Jul 20 14:49:19 2010 @@ -178,6 +178,9 @@ // Lock for the pool pthread_mutex_t pool_lock; + + // Thread reference count for the pool + int thread_refcount; }; extern "C" { From sabre at nondot.org Tue Jul 20 14:54:01 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 20 Jul 2010 19:54:01 -0000 Subject: [llvm-commits] [llvm] r108895 - /llvm/trunk/lib/MC/MCDisassembler/EDInst.h Message-ID: <20100720195401.6F31F2A6C12C@llvm.org> Author: lattner Date: Tue Jul 20 14:54:01 2010 New Revision: 108895 URL: http://llvm.org/viewvc/llvm-project?rev=108895&view=rev Log: this is in System Modified: llvm/trunk/lib/MC/MCDisassembler/EDInst.h Modified: llvm/trunk/lib/MC/MCDisassembler/EDInst.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCDisassembler/EDInst.h?rev=108895&r1=108894&r2=108895&view=diff ============================================================================== --- llvm/trunk/lib/MC/MCDisassembler/EDInst.h (original) +++ llvm/trunk/lib/MC/MCDisassembler/EDInst.h Tue Jul 20 14:54:01 2010 @@ -16,7 +16,7 @@ #ifndef LLVM_EDINST_H #define LLVM_EDINST_H -#include "llvm/Support/DataTypes.h" +#include "llvm/System/DataTypes.h" #include "llvm/ADT/SmallVector.h" #include #include From sabre at nondot.org Tue Jul 20 15:06:19 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 20 Jul 2010 20:06:19 -0000 Subject: [llvm-commits] [llvm] r108908 - /llvm/trunk/lib/MC/MCDisassembler/EDToken.cpp Message-ID: <20100720200619.B15792A6C12C@llvm.org> Author: lattner Date: Tue Jul 20 15:06:19 2010 New Revision: 108908 URL: http://llvm.org/viewvc/llvm-project?rev=108908&view=rev Log: apparently also missing an include. Modified: llvm/trunk/lib/MC/MCDisassembler/EDToken.cpp Modified: llvm/trunk/lib/MC/MCDisassembler/EDToken.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCDisassembler/EDToken.cpp?rev=108908&r1=108907&r2=108908&view=diff ============================================================================== --- llvm/trunk/lib/MC/MCDisassembler/EDToken.cpp (original) +++ llvm/trunk/lib/MC/MCDisassembler/EDToken.cpp Tue Jul 20 15:06:19 2010 @@ -18,6 +18,7 @@ #include "llvm/MC/MCParser/MCAsmLexer.h" #include "llvm/MC/MCParser/MCParsedAsmOperand.h" #include "llvm/ADT/SmallVector.h" +#include "llvm/System/DataTypes.h" using namespace llvm; EDToken::EDToken(StringRef str, From gohman at apple.com Tue Jul 20 15:09:07 2010 From: gohman at apple.com (Dan Gohman) Date: Tue, 20 Jul 2010 20:09:07 -0000 Subject: [llvm-commits] [llvm] r108909 - /llvm/trunk/lib/Transforms/IPO/DeadArgumentElimination.cpp Message-ID: <20100720200907.E1E8E2A6C12C@llvm.org> Author: djg Date: Tue Jul 20 15:09:07 2010 New Revision: 108909 URL: http://llvm.org/viewvc/llvm-project?rev=108909&view=rev Log: Use getDebugLoc and setDebugLoc instead of getDbgMetadata and setDbgMetadata, avoiding MDNode overhead. Modified: llvm/trunk/lib/Transforms/IPO/DeadArgumentElimination.cpp Modified: llvm/trunk/lib/Transforms/IPO/DeadArgumentElimination.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/DeadArgumentElimination.cpp?rev=108909&r1=108908&r2=108909&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/IPO/DeadArgumentElimination.cpp (original) +++ llvm/trunk/lib/Transforms/IPO/DeadArgumentElimination.cpp Tue Jul 20 15:09:07 2010 @@ -250,8 +250,7 @@ if (cast(Call)->isTailCall()) cast(New)->setTailCall(); } - if (MDNode *N = Call->getDbgMetadata()) - New->setDbgMetadata(N); + New->setDebugLoc(Call->getDebugLoc()); Args.clear(); @@ -780,8 +779,7 @@ if (cast(Call)->isTailCall()) cast(New)->setTailCall(); } - if (MDNode *N = Call->getDbgMetadata()) - New->setDbgMetadata(N); + New->setDebugLoc(Call->getDebugLoc()); Args.clear(); From echristo at apple.com Tue Jul 20 15:09:48 2010 From: echristo at apple.com (Eric Christopher) Date: Tue, 20 Jul 2010 20:09:48 -0000 Subject: [llvm-commits] [llvm-gcc-4.2] r108910 - in /llvm-gcc-4.2/trunk/gcc: gimplify.c llvm-convert.cpp Message-ID: <20100720200949.A63442A6C12C@llvm.org> Author: echristo Date: Tue Jul 20 15:09:48 2010 New Revision: 108910 URL: http://llvm.org/viewvc/llvm-project?rev=108910&view=rev Log: Propagate alignment information for vlas. Modified: llvm-gcc-4.2/trunk/gcc/gimplify.c llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp Modified: llvm-gcc-4.2/trunk/gcc/gimplify.c URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/gimplify.c?rev=108910&r1=108909&r2=108910&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/gimplify.c (original) +++ llvm-gcc-4.2/trunk/gcc/gimplify.c Tue Jul 20 15:09:48 2010 @@ -1258,6 +1258,13 @@ args = tree_cons (NULL, DECL_SIZE_UNIT (decl), NULL); t = built_in_decls[BUILT_IN_ALLOCA]; + /* LLVM LOCAL begin add alloca alignment */ + /* We may have specified an alignment on the alloca - store it on the + function call so that we can emit this later and not lose it. */ + DECL_USER_ALIGN (t) = DECL_USER_ALIGN (decl); + DECL_ALIGN(t) = DECL_ALIGN(decl); + /* LLVM LOCAL end add alloca alignment */ + t = build_function_call_expr (t, args); t = fold_convert (ptr_type, t); t = build2 (MODIFY_EXPR, void_type_node, addr, t); Modified: llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp?rev=108910&r1=108909&r2=108910&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp (original) +++ llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp Tue Jul 20 15:09:48 2010 @@ -6629,7 +6629,15 @@ if (!validate_arglist(arglist, INTEGER_TYPE, VOID_TYPE)) return false; Value *Amt = Emit(TREE_VALUE(arglist), 0); - Result = Builder.CreateAlloca(Type::getInt8Ty(Context), Amt); + AllocaInst *AI = Builder.CreateAlloca(Type::getInt8Ty(Context), Amt); + + // If this was originally a vla alloca find the alignment and set it + // on our alloca. + tree fndecl = get_callee_fndecl(exp); + unsigned align = DECL_ALIGN(fndecl) ? DECL_ALIGN(fndecl)/8 : 1; + AI->setAlignment(align); + Result = AI; + return true; } From resistor at mac.com Tue Jul 20 15:16:11 2010 From: resistor at mac.com (Owen Anderson) Date: Tue, 20 Jul 2010 20:16:11 -0000 Subject: [llvm-commits] [llvm] r108912 - in /llvm/trunk/lib/MC/MCDisassembler: EDToken.cpp EDToken.h Message-ID: <20100720201611.D43B42A6C12C@llvm.org> Author: resistor Date: Tue Jul 20 15:16:11 2010 New Revision: 108912 URL: http://llvm.org/viewvc/llvm-project?rev=108912&view=rev Log: Let's get those buildbots green: #include is needed in the header, not just the implementation. Modified: llvm/trunk/lib/MC/MCDisassembler/EDToken.cpp llvm/trunk/lib/MC/MCDisassembler/EDToken.h Modified: llvm/trunk/lib/MC/MCDisassembler/EDToken.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCDisassembler/EDToken.cpp?rev=108912&r1=108911&r2=108912&view=diff ============================================================================== --- llvm/trunk/lib/MC/MCDisassembler/EDToken.cpp (original) +++ llvm/trunk/lib/MC/MCDisassembler/EDToken.cpp Tue Jul 20 15:16:11 2010 @@ -18,7 +18,6 @@ #include "llvm/MC/MCParser/MCAsmLexer.h" #include "llvm/MC/MCParser/MCParsedAsmOperand.h" #include "llvm/ADT/SmallVector.h" -#include "llvm/System/DataTypes.h" using namespace llvm; EDToken::EDToken(StringRef str, Modified: llvm/trunk/lib/MC/MCDisassembler/EDToken.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCDisassembler/EDToken.h?rev=108912&r1=108911&r2=108912&view=diff ============================================================================== --- llvm/trunk/lib/MC/MCDisassembler/EDToken.h (original) +++ llvm/trunk/lib/MC/MCDisassembler/EDToken.h Tue Jul 20 15:16:11 2010 @@ -17,6 +17,7 @@ #define LLVM_EDTOKEN_H #include "llvm/ADT/StringRef.h" +#include "llvm/System/DataTypes.h" #include #include From gohman at apple.com Tue Jul 20 15:18:21 2010 From: gohman at apple.com (Dan Gohman) Date: Tue, 20 Jul 2010 20:18:21 -0000 Subject: [llvm-commits] [llvm] r108914 - in /llvm/trunk: include/llvm/Instruction.h lib/VMCore/Metadata.cpp Message-ID: <20100720201821.E77202A6C12C@llvm.org> Author: djg Date: Tue Jul 20 15:18:21 2010 New Revision: 108914 URL: http://llvm.org/viewvc/llvm-project?rev=108914&view=rev Log: Remove setDbgMetadata and getDbgMetadata; their users have been replaced with setDebugLoc and getDebugLoc. Modified: llvm/trunk/include/llvm/Instruction.h llvm/trunk/lib/VMCore/Metadata.cpp Modified: llvm/trunk/include/llvm/Instruction.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Instruction.h?rev=108914&r1=108913&r2=108914&view=diff ============================================================================== --- llvm/trunk/include/llvm/Instruction.h (original) +++ llvm/trunk/include/llvm/Instruction.h Tue Jul 20 15:18:21 2010 @@ -170,16 +170,6 @@ void setMetadata(unsigned KindID, MDNode *Node); void setMetadata(const char *Kind, MDNode *Node); - /// setDbgMetadata - This is just an optimized helper function that is - /// equivalent to setMetadata("dbg", Node); - void setDbgMetadata(MDNode *Node); - - /// getDbgMetadata - This is just an optimized helper function that is - /// equivalent to calling getMetadata("dbg"). - MDNode *getDbgMetadata() const { - return DbgLoc.getAsMDNode(getContext()); - } - /// setDebugLoc - Set the debug location information for this instruction. void setDebugLoc(const DebugLoc &Loc) { DbgLoc = Loc; } Modified: llvm/trunk/lib/VMCore/Metadata.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Metadata.cpp?rev=108914&r1=108913&r2=108914&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/Metadata.cpp (original) +++ llvm/trunk/lib/VMCore/Metadata.cpp Tue Jul 20 15:18:21 2010 @@ -445,10 +445,6 @@ return getMetadataImpl(getContext().getMDKindID(Kind)); } -void Instruction::setDbgMetadata(MDNode *Node) { - DbgLoc = DebugLoc::getFromDILocation(Node); -} - /// setMetadata - Set the metadata of of the specified kind to the specified /// node. This updates/replaces metadata if already present, or removes it if /// Node is null. From echristo at apple.com Tue Jul 20 15:32:47 2010 From: echristo at apple.com (Eric Christopher) Date: Tue, 20 Jul 2010 20:32:47 -0000 Subject: [llvm-commits] [llvm] r108918 - /llvm/trunk/test/FrontendC/vla-2.c Message-ID: <20100720203247.958A82A6C12C@llvm.org> Author: echristo Date: Tue Jul 20 15:32:47 2010 New Revision: 108918 URL: http://llvm.org/viewvc/llvm-project?rev=108918&view=rev Log: Testcase for llvm-gcc commit r108910. Added: llvm/trunk/test/FrontendC/vla-2.c Added: llvm/trunk/test/FrontendC/vla-2.c URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/FrontendC/vla-2.c?rev=108918&view=auto ============================================================================== --- llvm/trunk/test/FrontendC/vla-2.c (added) +++ llvm/trunk/test/FrontendC/vla-2.c Tue Jul 20 15:32:47 2010 @@ -0,0 +1,10 @@ +// RUN: %llvmgcc -std=gnu99 %s -S -o - | grep ".*alloca.*align 32" + +extern void bar(int[]); + +void foo(int a) +{ + int var[a] __attribute__((__aligned__(32))); + bar(var); + return; +} From sabre at nondot.org Tue Jul 20 15:33:59 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 20 Jul 2010 20:33:59 -0000 Subject: [llvm-commits] [llvm] r108919 - /llvm/trunk/tools/edis/Makefile Message-ID: <20100720203359.BCFC02A6C12C@llvm.org> Author: lattner Date: Tue Jul 20 15:33:59 2010 New Revision: 108919 URL: http://llvm.org/viewvc/llvm-project?rev=108919&view=rev Log: this logic is handled by tools/makefile. Modified: llvm/trunk/tools/edis/Makefile Modified: llvm/trunk/tools/edis/Makefile URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/edis/Makefile?rev=108919&r1=108918&r2=108919&view=diff ============================================================================== --- llvm/trunk/tools/edis/Makefile (original) +++ llvm/trunk/tools/edis/Makefile Tue Jul 20 15:33:59 2010 @@ -9,6 +9,8 @@ LEVEL = ../.. LIBRARYNAME = EnhancedDisassembly +LINK_LIBS_IN_SHARED = 1 +SHARED_LIBRARY = 1 EXPORTED_SYMBOL_FILE = $(PROJ_SRC_DIR)/EnhancedDisassembly.exports @@ -17,15 +19,6 @@ # early so we can set up LINK_COMPONENTS before including Makefile.rules include $(LEVEL)/Makefile.config -ifeq ($(ENABLE_PIC),1) - ifneq ($(DISABLE_EDIS),1) - ifneq ($(TARGET_OS), $(filter $(TARGET_OS), Cygwin MingW)) - LINK_LIBS_IN_SHARED = 1 - SHARED_LIBRARY = 1 - endif - endif -endif - LINK_COMPONENTS := $(TARGETS_TO_BUILD) mcdisassembler x86asmprinter x86disassembler include $(LEVEL)/Makefile.common From eli.friedman at gmail.com Tue Jul 20 15:37:09 2010 From: eli.friedman at gmail.com (Eli Friedman) Date: Tue, 20 Jul 2010 13:37:09 -0700 Subject: [llvm-commits] [PATCH] ELFAsmParser section directives In-Reply-To: <87eieyynpp.fsf@linux-g6p1.site> References: <87eieyynpp.fsf@linux-g6p1.site> Message-ID: On Tue, Jul 20, 2010 at 12:09 PM, Matt Fleming wrote: > The following patch adds various directives that specify the start of a > section. OK to commit along with tests in a new test/MC/AsmParser/ELF > directory? > > Index: lib/MC/MCParser/ELFAsmParser.cpp > =================================================================== > --- lib/MC/MCParser/ELFAsmParser.cpp ? ?(revision 108749) > +++ lib/MC/MCParser/ELFAsmParser.cpp ? ?(working copy) > @@ -42,6 +42,14 @@ > ? ? AddDirectiveHandler<&ELFAsmParser::ParseDirectiveSize>(".size"); > ? ? AddDirectiveHandler<&ELFAsmParser::ParseDirectiveLEB128>(".sleb128"); > ? ? AddDirectiveHandler<&ELFAsmParser::ParseDirectiveLEB128>(".uleb128"); > + ? ?AddDirectiveHandler<&ELFAsmParser::ParseSectionDirectiveBSS>(".bss"); > + ? ?AddDirectiveHandler<&ELFAsmParser::ParseSectionDirectiveRoData>(".rodata"); > + ? ?AddDirectiveHandler<&ELFAsmParser::ParseSectionDirectiveTData>(".tdata"); > + ? ?AddDirectiveHandler<&ELFAsmParser::ParseSectionDirectiveTBSS>(".tbss"); > + ? ?AddDirectiveHandler<&ELFAsmParser::ParseSectionDirectiveDataRel>(".data.rel"); > + ? ?AddDirectiveHandler<&ELFAsmParser::ParseSectionDirectiveDataRelRo>(".data.rel.ro"); > + ? ?AddDirectiveHandler<&ELFAsmParser::ParseSectionDirectiveDataRelRoLocal>(".data.rel.ro.local"); > + ? ?AddDirectiveHandler<&ELFAsmParser::ParseSectionDirectiveEhFrame>(".eh_frame"); > ? } Should be grouped with other ParseSection* > ? bool ParseSectionDirectiveData(StringRef, SMLoc) { > @@ -57,6 +65,52 @@ > ? bool ParseDirectiveLEB128(StringRef, SMLoc); > ? bool ParseDirectiveSection(StringRef, SMLoc); > ? bool ParseDirectiveSize(StringRef, SMLoc); > + ?bool ParseSectionDirectiveBSS(StringRef, SMLoc) { > + ? ?return ParseSectionSwitch(".bss", MCSectionELF::SHT_NOBITS, > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?MCSectionELF::SHF_WRITE | > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?MCSectionELF::SHF_ALLOC, SectionKind::getBSS()); > + ?} > + ?bool ParseSectionDirectiveRoData(StringRef, SMLoc) { > + ? ?return ParseSectionSwitch(".rodata", MCSectionELF::SHT_PROGBITS, > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?MCSectionELF::SHF_ALLOC, > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?SectionKind::getReadOnly()); > + ?} > + ?bool ParseSectionDirectiveTData(StringRef, SMLoc) { > + ? ?return ParseSectionSwitch(".tdata", MCSectionELF::SHT_PROGBITS, > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?MCSectionELF::SHF_ALLOC | > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?MCSectionELF::SHF_TLS | MCSectionELF::SHF_WRITE, > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?SectionKind::getThreadData()); > + ?} > + ?bool ParseSectionDirectiveTBSS(StringRef, SMLoc) { > + ? ?return ParseSectionSwitch(".tbss", MCSectionELF::SHT_NOBITS, > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?MCSectionELF::SHF_ALLOC | > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?MCSectionELF::SHF_TLS | MCSectionELF::SHF_WRITE, > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?SectionKind::getThreadBSS()); > + ?} > + ?bool ParseSectionDirectiveDataRel(StringRef, SMLoc) { > + ? ?return ParseSectionSwitch(".data.rel", MCSectionELF::SHT_PROGBITS, > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?MCSectionELF::SHF_ALLOC | > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?MCSectionELF::SHF_WRITE, > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?SectionKind::getDataRel()); > + ?} > + ?bool ParseSectionDirectiveDataRelRo(StringRef, SMLoc) { > + ? ?return ParseSectionSwitch(".data.rel.ro", MCSectionELF::SHT_PROGBITS, > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?MCSectionELF::SHF_ALLOC | > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?MCSectionELF::SHF_WRITE, > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?SectionKind::getReadOnlyWithRel()); > + ?} > + ?bool ParseSectionDirectiveDataRelRoLocal(StringRef, SMLoc) { > + ? ?return ParseSectionSwitch(".data.rel.ro.local", MCSectionELF::SHT_PROGBITS, > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?MCSectionELF::SHF_ALLOC | > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?MCSectionELF::SHF_WRITE, > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?SectionKind::getReadOnlyWithRelLocal()); > + ?} > + ?bool ParseSectionDirectiveEhFrame(StringRef, SMLoc) { > + ? ?return ParseSectionSwitch(".eh_frame", MCSectionELF::SHT_PROGBITS, > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?MCSectionELF::SHF_ALLOC | > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?MCSectionELF::SHF_WRITE, > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?SectionKind::getDataRel()); > + ?} > ?}; Should be grouped with other ParsxeSection* Otherwise, looks fine. -Eli From bob.wilson at apple.com Tue Jul 20 15:44:02 2010 From: bob.wilson at apple.com (Bob Wilson) Date: Tue, 20 Jul 2010 20:44:02 -0000 Subject: [llvm-commits] [llvm] r108922 - in /llvm/trunk: Makefile utils/buildit/GNUmakefile utils/buildit/build_llvm Message-ID: <20100720204402.63F112A6C12C@llvm.org> Author: bwilson Date: Tue Jul 20 15:44:02 2010 New Revision: 108922 URL: http://llvm.org/viewvc/llvm-project?rev=108922&view=rev Log: Add support for a new Apple-style build target, EmbeddedSim, that builds llvmCore for the iOS Simulator. Modified: llvm/trunk/Makefile llvm/trunk/utils/buildit/GNUmakefile llvm/trunk/utils/buildit/build_llvm Modified: llvm/trunk/Makefile URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/Makefile?rev=108922&r1=108921&r2=108922&view=diff ============================================================================== --- llvm/trunk/Makefile (original) +++ llvm/trunk/Makefile Tue Jul 20 15:44:02 2010 @@ -112,7 +112,8 @@ --host=$(BUILD_TRIPLE) --target=$(BUILD_TRIPLE); \ cd .. ; \ fi; \ - ($(MAKE) -C BuildTools \ + (unset SDKROOT; \ + $(MAKE) -C BuildTools \ BUILD_DIRS_ONLY=1 \ UNIVERSAL= \ ENABLE_OPTIMIZED=$(ENABLE_OPTIMIZED) \ Modified: llvm/trunk/utils/buildit/GNUmakefile URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/buildit/GNUmakefile?rev=108922&r1=108921&r2=108922&view=diff ============================================================================== --- llvm/trunk/utils/buildit/GNUmakefile (original) +++ llvm/trunk/utils/buildit/GNUmakefile Tue Jul 20 15:44:02 2010 @@ -49,8 +49,9 @@ # Default to not install libLTO.dylib. INSTALL_LIBLTO := no -# Default to do a native build, not a cross-build for an ARM host. +# Default to do a native build, not a cross-build for an ARM host or simulator. ARM_HOSTED_BUILD := no +IOS_SIM_BUILD := no ifndef RC_ProjectSourceVersion RC_ProjectSourceVersion = 9999 @@ -66,12 +67,19 @@ $(SRC)/utils/buildit/build_llvm "$(RC_ARCHS)" "$(TARGETS)" \ $(SRC) $(PREFIX) $(DSTROOT) $(SYMROOT) \ $(ENABLE_ASSERTIONS) $(LLVM_OPTIMIZED) $(INSTALL_LIBLTO) \ - $(ARM_HOSTED_BUILD) \ + $(ARM_HOSTED_BUILD) $(IOS_SIM_BUILD) \ $(RC_ProjectSourceVersion) $(RC_ProjectSourceSubversion) EmbeddedHosted: $(MAKE) ARM_HOSTED_BUILD=yes PREFIX=/usr install +# When building for the iOS simulator, MACOSX_DEPLOYMENT_TARGET is not set +# by default, but it needs to be set when building tools that run on the host +# (e.g., tblgen), so set it here. +EmbeddedSim: + export MACOSX_DEPLOYMENT_TARGET=`sw_vers -productVersion`; \ + $(MAKE) IOS_SIM_BUILD=yes PREFIX=/usr install + # installhdrs does nothing, because the headers aren't useful until # the compiler is installed. installhdrs: @@ -120,4 +128,4 @@ $(OBJROOT) $(SYMROOT) $(DSTROOT): mkdir -p $@ -.PHONY: install installsrc clean EmbeddedHosted +.PHONY: install installsrc clean EmbeddedHosted EmbeddedSim Modified: llvm/trunk/utils/buildit/build_llvm URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/buildit/build_llvm?rev=108922&r1=108921&r2=108922&view=diff ============================================================================== --- llvm/trunk/utils/buildit/build_llvm (original) +++ llvm/trunk/utils/buildit/build_llvm Tue Jul 20 15:44:02 2010 @@ -49,11 +49,14 @@ # A yes/no parameter that controls whether to cross-build for an ARM host. ARM_HOSTED_BUILD="${10}" +# A yes/no parameter that controls whether to cross-build for the iOS simulator +IOS_SIM_BUILD="${11}" + # The version number of the submission, e.g. 1007. -LLVM_SUBMIT_VERSION="${11}" +LLVM_SUBMIT_VERSION="${12}" # The subversion number of the submission, e.g. 03. -LLVM_SUBMIT_SUBVERSION="${12}" +LLVM_SUBMIT_SUBVERSION="${13}" # The current working directory is where the build will happen. It may already # contain a partial result of an interrupted build, in which case this script @@ -124,6 +127,10 @@ if [ "$ARM_HOSTED_BUILD" = yes ]; then configure_opts="--enable-targets=arm --host=arm-apple-darwin10 \ --target=arm-apple-darwin10 --build=i686-apple-darwin10" +elif [ "$IOS_SIM_BUILD" = yes ]; then + # Use a non-standard "darwin_sim" host triple to trigger a cross-build. + configure_opts="--enable-targets=x86 --host=i686-apple-darwin_sim \ + --build=i686-apple-darwin10" else configure_opts="--enable-targets=arm,x86,powerpc,cbe" fi From bob.wilson at apple.com Tue Jul 20 15:45:26 2010 From: bob.wilson at apple.com (Bob Wilson) Date: Tue, 20 Jul 2010 20:45:26 -0000 Subject: [llvm-commits] [llvm-gcc-4.2] r108923 - /llvm-gcc-4.2/trunk/GNUmakefile Message-ID: <20100720204526.E93FC2A6C12C@llvm.org> Author: bwilson Date: Tue Jul 20 15:45:26 2010 New Revision: 108923 URL: http://llvm.org/viewvc/llvm-project?rev=108923&view=rev Log: Adjust build_llvm invocation to provide new IOS_SIM_BUILD parameter added in svn r108922. Modified: llvm-gcc-4.2/trunk/GNUmakefile Modified: llvm-gcc-4.2/trunk/GNUmakefile URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/GNUmakefile?rev=108923&r1=108922&r2=108923&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/GNUmakefile (original) +++ llvm-gcc-4.2/trunk/GNUmakefile Tue Jul 20 15:45:26 2010 @@ -77,8 +77,9 @@ LLVM_OPTIMIZED := yes endif -# Cross-builds for ARM hosts are not supported here. +# Cross-builds for ARM hosts or iOS Simulator are not supported here. ARM_HOSTED_BUILD := no +IOS_SIM_BUILD := no ifndef RC_ProjectSourceVersion RC_ProjectSourceVersion = 9999 @@ -104,7 +105,7 @@ $(SRC)/llvmCore/utils/buildit/build_llvm "$(RC_ARCHS)" "$(TARGETS)" \ $(SRC)/llvmCore /Developer/usr/local $(DSTROOT) $(SYMROOT) \ $(ENABLE_ASSERTIONS) $(LLVM_OPTIMIZED) $(INSTALL_LIBLTO) \ - $(ARM_HOSTED_BUILD) \ + $(ARM_HOSTED_BUILD) $(IOS_SIM_BUILD) \ $(RC_ProjectSourceVersion) $(RC_ProjectSourceSubversion) llvmgcc42: $(OBJROOT) $(SYMROOT) $(DSTROOT) From matt at console-pimps.org Tue Jul 20 15:52:18 2010 From: matt at console-pimps.org (Matt Fleming) Date: Tue, 20 Jul 2010 20:52:18 -0000 Subject: [llvm-commits] [llvm] r108924 - /llvm/trunk/include/llvm/Support/ELF.h Message-ID: <20100720205219.07ED32A6C12C@llvm.org> Author: mfleming Date: Tue Jul 20 15:52:18 2010 New Revision: 108924 URL: http://llvm.org/viewvc/llvm-project?rev=108924&view=rev Log: Add the rest of the SHT_* values as defined in the System V ABI ELF specification. Modified: llvm/trunk/include/llvm/Support/ELF.h Modified: llvm/trunk/include/llvm/Support/ELF.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/ELF.h?rev=108924&r1=108923&r2=108924&view=diff ============================================================================== --- llvm/trunk/include/llvm/Support/ELF.h (original) +++ llvm/trunk/include/llvm/Support/ELF.h Tue Jul 20 15:52:18 2010 @@ -257,22 +257,29 @@ // Section types. enum { - SHT_NULL = 0, // No associated section (inactive entry). - SHT_PROGBITS = 1, // Program-defined contents. - SHT_SYMTAB = 2, // Symbol table. - SHT_STRTAB = 3, // String table. - SHT_RELA = 4, // Relocation entries; explicit addends. - SHT_HASH = 5, // Symbol hash table. - SHT_DYNAMIC = 6, // Information for dynamic linking. - SHT_NOTE = 7, // Information about the file. - SHT_NOBITS = 8, // Data occupies no space in the file. - SHT_REL = 9, // Relocation entries; no explicit addends. - SHT_SHLIB = 10, // Reserved. - SHT_DYNSYM = 11, // Symbol table. - SHT_LOPROC = 0x70000000, // Lowest processor architecture-specific type. - SHT_HIPROC = 0x7fffffff, // Highest processor architecture-specific type. - SHT_LOUSER = 0x80000000, // Lowest type reserved for applications. - SHT_HIUSER = 0xffffffff // Highest type reserved for applications. + SHT_NULL = 0, // No associated section (inactive entry). + SHT_PROGBITS = 1, // Program-defined contents. + SHT_SYMTAB = 2, // Symbol table. + SHT_STRTAB = 3, // String table. + SHT_RELA = 4, // Relocation entries; explicit addends. + SHT_HASH = 5, // Symbol hash table. + SHT_DYNAMIC = 6, // Information for dynamic linking. + SHT_NOTE = 7, // Information about the file. + SHT_NOBITS = 8, // Data occupies no space in the file. + SHT_REL = 9, // Relocation entries; no explicit addends. + SHT_SHLIB = 10, // Reserved. + SHT_DYNSYM = 11, // Symbol table. + SHT_INIT_ARRAY = 14, // Pointers to initialisation functions. + SHT_FINI_ARRAY = 15, // Pointers to termination functions. + SHT_PREINIT_ARRAY = 16, // Pointers to pre-init functions. + SHT_GROUP = 17, // Section group. + SHT_SYMTAB_SHNDX = 18, // Indicies for SHN_XINDEX entries. + SHT_LOOS = 0x60000000, // Lowest operating system-specific type. + SHT_HIOS = 0x6fffffff, // Highest operating system-specific type. + SHT_LOPROC = 0x70000000, // Lowest processor architecture-specific type. + SHT_HIPROC = 0x7fffffff, // Highest processor architecture-specific type. + SHT_LOUSER = 0x80000000, // Lowest type reserved for applications. + SHT_HIUSER = 0xffffffff // Highest type reserved for applications. }; // Section flags. From sabre at nondot.org Tue Jul 20 15:55:57 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 20 Jul 2010 20:55:57 -0000 Subject: [llvm-commits] [llvm] r108925 - /llvm/trunk/tools/Makefile Message-ID: <20100720205557.4C33B2A6C12C@llvm.org> Author: lattner Date: Tue Jul 20 15:55:57 2010 New Revision: 108925 URL: http://llvm.org/viewvc/llvm-project?rev=108925&view=rev Log: fix DISABLE_EDIS Modified: llvm/trunk/tools/Makefile Modified: llvm/trunk/tools/Makefile URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/Makefile?rev=108925&r1=108924&r2=108925&view=diff ============================================================================== --- llvm/trunk/tools/Makefile (original) +++ llvm/trunk/tools/Makefile Tue Jul 20 15:55:57 2010 @@ -16,7 +16,7 @@ # large and three small executables. This is done to minimize memory load # in parallel builds. Please retain this ordering. DIRS := llvm-config -PARALLEL_DIRS := opt llvm-as llvm-dis edis \ +PARALLEL_DIRS := opt llvm-as llvm-dis \ llc llvm-ranlib llvm-ar llvm-nm \ llvm-ld llvm-prof llvm-link \ lli llvm-extract llvm-mc \ @@ -49,7 +49,7 @@ # LLVM is being built PIC on platforms that support dylibs. ifneq ($(DISABLE_EDIS),1) ifneq ($(filter $(TARGETS_TO_BUILD), X86 ARM),) - PARALLEL_DIRS := $(filter-out edis, $(PARALLEL_DIRS)) + PARALLEL_DIRS += edis endif endif endif From echristo at apple.com Tue Jul 20 16:05:58 2010 From: echristo at apple.com (Eric Christopher) Date: Tue, 20 Jul 2010 21:05:58 -0000 Subject: [llvm-commits] [llvm] r108926 - /llvm/trunk/include/llvm/CodeGen/MachineFrameInfo.h Message-ID: <20100720210559.101DB2A6C12C@llvm.org> Author: echristo Date: Tue Jul 20 16:05:58 2010 New Revision: 108926 URL: http://llvm.org/viewvc/llvm-project?rev=108926&view=rev Log: Formatting. Modified: llvm/trunk/include/llvm/CodeGen/MachineFrameInfo.h Modified: llvm/trunk/include/llvm/CodeGen/MachineFrameInfo.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineFrameInfo.h?rev=108926&r1=108925&r2=108926&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/MachineFrameInfo.h (original) +++ llvm/trunk/include/llvm/CodeGen/MachineFrameInfo.h Tue Jul 20 16:05:58 2010 @@ -432,7 +432,7 @@ /// setCalleeSavedInfo - Used by prolog/epilog inserter to set the function's /// callee saved information. - void setCalleeSavedInfo(const std::vector &CSI) { + void setCalleeSavedInfo(const std::vector &CSI) { CSInfo = CSI; } @@ -453,7 +453,7 @@ BitVector getPristineRegs(const MachineBasicBlock *MBB) const; /// print - Used by the MachineFunction printer to print information about - /// stack objects. Implemented in MachineFunction.cpp + /// stack objects. Implemented in MachineFunction.cpp /// void print(const MachineFunction &MF, raw_ostream &OS) const; From matt at console-pimps.org Tue Jul 20 16:12:47 2010 From: matt at console-pimps.org (Matt Fleming) Date: Tue, 20 Jul 2010 21:12:47 -0000 Subject: [llvm-commits] [llvm] r108928 - /llvm/trunk/lib/MC/MCParser/ELFAsmParser.cpp Message-ID: <20100720211247.2E7D32A6C12C@llvm.org> Author: mfleming Date: Tue Jul 20 16:12:46 2010 New Revision: 108928 URL: http://llvm.org/viewvc/llvm-project?rev=108928&view=rev Log: Add some more handlers for ELF section directives. Modified: llvm/trunk/lib/MC/MCParser/ELFAsmParser.cpp Modified: llvm/trunk/lib/MC/MCParser/ELFAsmParser.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCParser/ELFAsmParser.cpp?rev=108928&r1=108927&r2=108928&view=diff ============================================================================== --- llvm/trunk/lib/MC/MCParser/ELFAsmParser.cpp (original) +++ llvm/trunk/lib/MC/MCParser/ELFAsmParser.cpp Tue Jul 20 16:12:46 2010 @@ -38,6 +38,14 @@ AddDirectiveHandler<&ELFAsmParser::ParseSectionDirectiveData>(".data"); AddDirectiveHandler<&ELFAsmParser::ParseSectionDirectiveText>(".text"); + AddDirectiveHandler<&ELFAsmParser::ParseSectionDirectiveBSS>(".bss"); + AddDirectiveHandler<&ELFAsmParser::ParseSectionDirectiveRoData>(".rodata"); + AddDirectiveHandler<&ELFAsmParser::ParseSectionDirectiveTData>(".tdata"); + AddDirectiveHandler<&ELFAsmParser::ParseSectionDirectiveTBSS>(".tbss"); + AddDirectiveHandler<&ELFAsmParser::ParseSectionDirectiveDataRel>(".data.rel"); + AddDirectiveHandler<&ELFAsmParser::ParseSectionDirectiveDataRelRo>(".data.rel.ro"); + AddDirectiveHandler<&ELFAsmParser::ParseSectionDirectiveDataRelRoLocal>(".data.rel.ro.local"); + AddDirectiveHandler<&ELFAsmParser::ParseSectionDirectiveEhFrame>(".eh_frame"); AddDirectiveHandler<&ELFAsmParser::ParseDirectiveSection>(".section"); AddDirectiveHandler<&ELFAsmParser::ParseDirectiveSize>(".size"); AddDirectiveHandler<&ELFAsmParser::ParseDirectiveLEB128>(".sleb128"); @@ -54,6 +62,52 @@ MCSectionELF::SHF_EXECINSTR | MCSectionELF::SHF_ALLOC, SectionKind::getText()); } + bool ParseSectionDirectiveBSS(StringRef, SMLoc) { + return ParseSectionSwitch(".bss", MCSectionELF::SHT_NOBITS, + MCSectionELF::SHF_WRITE | + MCSectionELF::SHF_ALLOC, SectionKind::getBSS()); + } + bool ParseSectionDirectiveRoData(StringRef, SMLoc) { + return ParseSectionSwitch(".rodata", MCSectionELF::SHT_PROGBITS, + MCSectionELF::SHF_ALLOC, + SectionKind::getReadOnly()); + } + bool ParseSectionDirectiveTData(StringRef, SMLoc) { + return ParseSectionSwitch(".tdata", MCSectionELF::SHT_PROGBITS, + MCSectionELF::SHF_ALLOC | + MCSectionELF::SHF_TLS | MCSectionELF::SHF_WRITE, + SectionKind::getThreadData()); + } + bool ParseSectionDirectiveTBSS(StringRef, SMLoc) { + return ParseSectionSwitch(".tbss", MCSectionELF::SHT_NOBITS, + MCSectionELF::SHF_ALLOC | + MCSectionELF::SHF_TLS | MCSectionELF::SHF_WRITE, + SectionKind::getThreadBSS()); + } + bool ParseSectionDirectiveDataRel(StringRef, SMLoc) { + return ParseSectionSwitch(".data.rel", MCSectionELF::SHT_PROGBITS, + MCSectionELF::SHF_ALLOC | + MCSectionELF::SHF_WRITE, + SectionKind::getDataRel()); + } + bool ParseSectionDirectiveDataRelRo(StringRef, SMLoc) { + return ParseSectionSwitch(".data.rel.ro", MCSectionELF::SHT_PROGBITS, + MCSectionELF::SHF_ALLOC | + MCSectionELF::SHF_WRITE, + SectionKind::getReadOnlyWithRel()); + } + bool ParseSectionDirectiveDataRelRoLocal(StringRef, SMLoc) { + return ParseSectionSwitch(".data.rel.ro.local", MCSectionELF::SHT_PROGBITS, + MCSectionELF::SHF_ALLOC | + MCSectionELF::SHF_WRITE, + SectionKind::getReadOnlyWithRelLocal()); + } + bool ParseSectionDirectiveEhFrame(StringRef, SMLoc) { + return ParseSectionSwitch(".eh_frame", MCSectionELF::SHT_PROGBITS, + MCSectionELF::SHF_ALLOC | + MCSectionELF::SHF_WRITE, + SectionKind::getDataRel()); + } bool ParseDirectiveLEB128(StringRef, SMLoc); bool ParseDirectiveSection(StringRef, SMLoc); bool ParseDirectiveSize(StringRef, SMLoc); From matt at console-pimps.org Tue Jul 20 16:13:26 2010 From: matt at console-pimps.org (Matt Fleming) Date: Tue, 20 Jul 2010 22:13:26 +0100 Subject: [llvm-commits] [PATCH] ELFAsmParser section directives In-Reply-To: References: <87eieyynpp.fsf@linux-g6p1.site> Message-ID: <877hkpzwjt.fsf@linux-g6p1.site> On Tue, 20 Jul 2010 13:37:09 -0700, Eli Friedman wrote: > > Should be grouped with other ParsxeSection* > > Otherwise, looks fine. Thanks for the review Eli, committed! From sabre at nondot.org Tue Jul 20 16:17:29 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 20 Jul 2010 21:17:29 -0000 Subject: [llvm-commits] [llvm] r108929 - in /llvm/trunk/lib/Target/ARM: ARMBaseInstrInfo.cpp ARMBaseInstrInfo.h ARMBaseRegisterInfo.h ARMExpandPseudoInsts.cpp Disassembler/ARMDisassemblerCore.h Message-ID: <20100720211729.EE9092A6C12C@llvm.org> Author: lattner Date: Tue Jul 20 16:17:29 2010 New Revision: 108929 URL: http://llvm.org/viewvc/llvm-project?rev=108929&view=rev Log: prune #includes a little. Modified: llvm/trunk/lib/Target/ARM/ARMBaseInstrInfo.cpp llvm/trunk/lib/Target/ARM/ARMBaseInstrInfo.h llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.h llvm/trunk/lib/Target/ARM/ARMExpandPseudoInsts.cpp llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.h Modified: llvm/trunk/lib/Target/ARM/ARMBaseInstrInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMBaseInstrInfo.cpp?rev=108929&r1=108928&r2=108929&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMBaseInstrInfo.cpp (original) +++ llvm/trunk/lib/Target/ARM/ARMBaseInstrInfo.cpp Tue Jul 20 16:17:29 2010 @@ -15,9 +15,9 @@ #include "ARM.h" #include "ARMAddressingModes.h" #include "ARMConstantPoolValue.h" -#include "ARMGenInstrInfo.inc" #include "ARMMachineFunctionInfo.h" #include "ARMRegisterInfo.h" +#include "ARMGenInstrInfo.inc" #include "llvm/Constants.h" #include "llvm/Function.h" #include "llvm/GlobalValue.h" Modified: llvm/trunk/lib/Target/ARM/ARMBaseInstrInfo.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMBaseInstrInfo.h?rev=108929&r1=108928&r2=108929&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMBaseInstrInfo.h (original) +++ llvm/trunk/lib/Target/ARM/ARMBaseInstrInfo.h Tue Jul 20 16:17:29 2010 @@ -15,11 +15,12 @@ #define ARMBASEINSTRUCTIONINFO_H #include "ARM.h" -#include "ARMRegisterInfo.h" #include "llvm/CodeGen/MachineInstrBuilder.h" #include "llvm/Target/TargetInstrInfo.h" namespace llvm { + class ARMSubtarget; + class ARMBaseRegisterInfo; /// ARMII - This namespace holds all of the target specific flags that /// instruction info tracks. @@ -198,7 +199,7 @@ } class ARMBaseInstrInfo : public TargetInstrInfoImpl { - const ARMSubtarget& Subtarget; + const ARMSubtarget &Subtarget; protected: // Can be only subclassed. explicit ARMBaseInstrInfo(const ARMSubtarget &STI); Modified: llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.h?rev=108929&r1=108928&r2=108929&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.h (original) +++ llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.h Tue Jul 20 16:17:29 2010 @@ -44,7 +44,7 @@ } } -struct ARMBaseRegisterInfo : public ARMGenRegisterInfo { +class ARMBaseRegisterInfo : public ARMGenRegisterInfo { protected: const ARMBaseInstrInfo &TII; const ARMSubtarget &STI; Modified: llvm/trunk/lib/Target/ARM/ARMExpandPseudoInsts.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMExpandPseudoInsts.cpp?rev=108929&r1=108928&r2=108929&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMExpandPseudoInsts.cpp (original) +++ llvm/trunk/lib/Target/ARM/ARMExpandPseudoInsts.cpp Tue Jul 20 16:17:29 2010 @@ -19,7 +19,7 @@ #include "ARMBaseInstrInfo.h" #include "llvm/CodeGen/MachineFunctionPass.h" #include "llvm/CodeGen/MachineInstrBuilder.h" - +#include "llvm/Target/TargetRegisterInfo.h" using namespace llvm; namespace { Modified: llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.h?rev=108929&r1=108928&r2=108929&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.h (original) +++ llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.h Tue Jul 20 16:17:29 2010 @@ -23,7 +23,8 @@ #include "llvm/MC/MCInst.h" #include "llvm/Target/TargetInstrInfo.h" -#include "ARMInstrInfo.h" +#include "ARMBaseInstrInfo.h" +#include "ARMRegisterInfo.h" #include "ARMDisassembler.h" namespace llvm { From dgregor at apple.com Tue Jul 20 16:21:27 2010 From: dgregor at apple.com (Douglas Gregor) Date: Tue, 20 Jul 2010 21:21:27 -0000 Subject: [llvm-commits] [llvm] r108931 - /llvm/trunk/tools/edis/CMakeLists.txt Message-ID: <20100720212127.789B52A6C12C@llvm.org> Author: dgregor Date: Tue Jul 20 16:21:27 2010 New Revision: 108931 URL: http://llvm.org/viewvc/llvm-project?rev=108931&view=rev Log: Fix edis makefile Modified: llvm/trunk/tools/edis/CMakeLists.txt Modified: llvm/trunk/tools/edis/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/edis/CMakeLists.txt?rev=108931&r1=108930&r2=108931&view=diff ============================================================================== --- llvm/trunk/tools/edis/CMakeLists.txt (original) +++ llvm/trunk/tools/edis/CMakeLists.txt Tue Jul 20 16:21:27 2010 @@ -4,6 +4,7 @@ add_llvm_library(EnhancedDisassembly ../../include/llvm-c/EnhancedDisassembly.h + EDMain.cpp ) set_target_properties(EnhancedDisassembly From resistor at mac.com Tue Jul 20 16:22:24 2010 From: resistor at mac.com (Owen Anderson) Date: Tue, 20 Jul 2010 21:22:24 -0000 Subject: [llvm-commits] [llvm] r108932 - in /llvm/trunk: include/llvm/PassRegistry.h lib/VMCore/Pass.cpp lib/VMCore/PassRegistry.cpp Message-ID: <20100720212224.6252B2A6C12C@llvm.org> Author: resistor Date: Tue Jul 20 16:22:24 2010 New Revision: 108932 URL: http://llvm.org/viewvc/llvm-project?rev=108932&view=rev Log: Move more functionality from Pass.cpp to PassRegistry.cpp. This global will go away eventually, but for now we still need it around. Modified: llvm/trunk/include/llvm/PassRegistry.h llvm/trunk/lib/VMCore/Pass.cpp llvm/trunk/lib/VMCore/PassRegistry.cpp Modified: llvm/trunk/include/llvm/PassRegistry.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/PassRegistry.h?rev=108932&r1=108931&r2=108932&view=diff ============================================================================== --- llvm/trunk/include/llvm/PassRegistry.h (original) +++ llvm/trunk/include/llvm/PassRegistry.h Tue Jul 20 16:22:24 2010 @@ -46,6 +46,8 @@ std::map AnalysisGroupInfoMap; public: + static PassRegistry *getPassRegistry(); + const PassInfo *getPassInfo(intptr_t TI) const; const PassInfo *getPassInfo(StringRef Arg) const; Modified: llvm/trunk/lib/VMCore/Pass.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Pass.cpp?rev=108932&r1=108931&r2=108932&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/Pass.cpp (original) +++ llvm/trunk/lib/VMCore/Pass.cpp Tue Jul 20 16:22:24 2010 @@ -241,47 +241,6 @@ static std::vector *Listeners = 0; static sys::SmartMutex ListenersLock; -static PassRegistry *PassRegistryObj = 0; -static PassRegistry *getPassRegistry() { - // Use double-checked locking to safely initialize the registrar when - // we're running in multithreaded mode. - PassRegistry* tmp = PassRegistryObj; - if (llvm_is_multithreaded()) { - sys::MemoryFence(); - if (!tmp) { - llvm_acquire_global_lock(); - tmp = PassRegistryObj; - if (!tmp) { - tmp = new PassRegistry(); - sys::MemoryFence(); - PassRegistryObj = tmp; - } - llvm_release_global_lock(); - } - } else if (!tmp) { - PassRegistryObj = new PassRegistry(); - } - - return PassRegistryObj; -} - -namespace { - -// FIXME: We use ManagedCleanup to erase the pass registrar on shutdown. -// Unfortunately, passes are registered with static ctors, and having -// llvm_shutdown clear this map prevents successful ressurection after -// llvm_shutdown is run. Ideally we should find a solution so that we don't -// leak the map, AND can still resurrect after shutdown. -void cleanupPassRegistry(void*) { - if (PassRegistryObj) { - delete PassRegistryObj; - PassRegistryObj = 0; - } -} -ManagedCleanup<&cleanupPassRegistry> registryCleanup ATTRIBUTE_USED; - -} - // getPassInfo - Return the PassInfo data structure that corresponds to this // pass... const PassInfo *Pass::getPassInfo() const { @@ -289,15 +248,15 @@ } const PassInfo *Pass::lookupPassInfo(intptr_t TI) { - return getPassRegistry()->getPassInfo(TI); + return PassRegistry::getPassRegistry()->getPassInfo(TI); } const PassInfo *Pass::lookupPassInfo(StringRef Arg) { - return getPassRegistry()->getPassInfo(Arg); + return PassRegistry::getPassRegistry()->getPassInfo(Arg); } void PassInfo::registerPass() { - getPassRegistry()->registerPass(*this); + PassRegistry::getPassRegistry()->registerPass(*this); // Notify any listeners. sys::SmartScopedLock Lock(ListenersLock); @@ -308,7 +267,7 @@ } void PassInfo::unregisterPass() { - getPassRegistry()->unregisterPass(*this); + PassRegistry::getPassRegistry()->unregisterPass(*this); } Pass *PassInfo::createPass() const { @@ -349,7 +308,7 @@ PassInfo *IIPI = const_cast(ImplementationInfo); IIPI->addInterfaceImplemented(InterfaceInfo); - getPassRegistry()->registerAnalysisGroup(InterfaceInfo, IIPI, isDefault); + PassRegistry::getPassRegistry()->registerAnalysisGroup(InterfaceInfo, IIPI, isDefault); } } @@ -385,7 +344,7 @@ // passEnumerate callback on each PassInfo object. // void PassRegistrationListener::enumeratePasses() { - getPassRegistry()->enumerateWith(this); + PassRegistry::getPassRegistry()->enumerateWith(this); } PassNameParser::~PassNameParser() {} Modified: llvm/trunk/lib/VMCore/PassRegistry.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/PassRegistry.cpp?rev=108932&r1=108931&r2=108932&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/PassRegistry.cpp (original) +++ llvm/trunk/lib/VMCore/PassRegistry.cpp Tue Jul 20 16:22:24 2010 @@ -13,7 +13,49 @@ //===----------------------------------------------------------------------===// #include "llvm/PassRegistry.h" -#include "llvm/System/Mutex.h" +#include "llvm/Support/Compiler.h" +#include "llvm/Support/ManagedStatic.h" + +static PassRegistry *PassRegistryObj = 0; +PassRegistry *PassRegistry::getPassRegistry() { + // Use double-checked locking to safely initialize the registrar when + // we're running in multithreaded mode. + PassRegistry* tmp = PassRegistryObj; + if (llvm_is_multithreaded()) { + sys::MemoryFence(); + if (!tmp) { + llvm_acquire_global_lock(); + tmp = PassRegistryObj; + if (!tmp) { + tmp = new PassRegistry(); + sys::MemoryFence(); + PassRegistryObj = tmp; + } + llvm_release_global_lock(); + } + } else if (!tmp) { + PassRegistryObj = new PassRegistry(); + } + + return PassRegistryObj; +} + +namespace { + +// FIXME: We use ManagedCleanup to erase the pass registrar on shutdown. +// Unfortunately, passes are registered with static ctors, and having +// llvm_shutdown clear this map prevents successful ressurection after +// llvm_shutdown is run. Ideally we should find a solution so that we don't +// leak the map, AND can still resurrect after shutdown. +void cleanupPassRegistry(void*) { + if (PassRegistryObj) { + delete PassRegistryObj; + PassRegistryObj = 0; + } +} +ManagedCleanup<&cleanupPassRegistry> registryCleanup ATTRIBUTE_USED; + +} const PassInfo *PassRegistry::getPassInfo(intptr_t TI) const { sys::SmartScopedLock Guard(Lock); From sabre at nondot.org Tue Jul 20 16:23:57 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 20 Jul 2010 21:23:57 -0000 Subject: [llvm-commits] [llvm] r108933 - /llvm/trunk/tools/edis/Makefile Message-ID: <20100720212357.70E942A6C12C@llvm.org> Author: lattner Date: Tue Jul 20 16:23:57 2010 New Revision: 108933 URL: http://llvm.org/viewvc/llvm-project?rev=108933&view=rev Log: fix edis to only try to link in the x86 parts if the x86 backend is enabled. Add direct ARM support. Modified: llvm/trunk/tools/edis/Makefile Modified: llvm/trunk/tools/edis/Makefile URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/edis/Makefile?rev=108933&r1=108932&r2=108933&view=diff ============================================================================== --- llvm/trunk/tools/edis/Makefile (original) +++ llvm/trunk/tools/edis/Makefile Tue Jul 20 16:23:57 2010 @@ -19,7 +19,17 @@ # early so we can set up LINK_COMPONENTS before including Makefile.rules include $(LEVEL)/Makefile.config -LINK_COMPONENTS := $(TARGETS_TO_BUILD) mcdisassembler x86asmprinter x86disassembler +LINK_COMPONENTS := $(TARGETS_TO_BUILD) mcdisassembler + +# If the X86 target is enabled, link in the asmprinter and disassembler. +ifneq ($(filter $(TARGETS_TO_BUILD), X86),) +LINK_COMPONENTS += x86asmprinter x86disassembler +endif + +# If the X86 target is enabled, link in the asmprinter and disassembler. +ifneq ($(filter $(TARGETS_TO_BUILD), ARM),) +LINK_COMPONENTS += armasmprinter armdisassembler +endif include $(LEVEL)/Makefile.common From sabre at nondot.org Tue Jul 20 16:26:27 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 20 Jul 2010 21:26:27 -0000 Subject: [llvm-commits] [llvm] r108934 - /llvm/trunk/tools/edis/Makefile Message-ID: <20100720212627.ACD9A2A6C12C@llvm.org> Author: lattner Date: Tue Jul 20 16:26:27 2010 New Revision: 108934 URL: http://llvm.org/viewvc/llvm-project?rev=108934&view=rev Log: there is now no reason to link in TARGETS_TO_BUILD since we list arm explicitly. X86 and ARM are the only two targets that support disassembly, so our explicit list is enough. These other targets weren't getting pulled in anyway though, since there were no references to their symbols. Modified: llvm/trunk/tools/edis/Makefile Modified: llvm/trunk/tools/edis/Makefile URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/edis/Makefile?rev=108934&r1=108933&r2=108934&view=diff ============================================================================== --- llvm/trunk/tools/edis/Makefile (original) +++ llvm/trunk/tools/edis/Makefile Tue Jul 20 16:26:27 2010 @@ -19,7 +19,7 @@ # early so we can set up LINK_COMPONENTS before including Makefile.rules include $(LEVEL)/Makefile.config -LINK_COMPONENTS := $(TARGETS_TO_BUILD) mcdisassembler +LINK_COMPONENTS := mcdisassembler # If the X86 target is enabled, link in the asmprinter and disassembler. ifneq ($(filter $(TARGETS_TO_BUILD), X86),) From dalej at apple.com Tue Jul 20 16:29:12 2010 From: dalej at apple.com (Dale Johannesen) Date: Tue, 20 Jul 2010 21:29:12 -0000 Subject: [llvm-commits] [llvm] r108935 - /llvm/trunk/lib/CodeGen/MachineLICM.cpp Message-ID: <20100720212912.A4A212A6C12C@llvm.org> Author: johannes Date: Tue Jul 20 16:29:12 2010 New Revision: 108935 URL: http://llvm.org/viewvc/llvm-project?rev=108935&view=rev Log: Fix test for switch statements and increase threshold a bit per experimentation. Modified: llvm/trunk/lib/CodeGen/MachineLICM.cpp Modified: llvm/trunk/lib/CodeGen/MachineLICM.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineLICM.cpp?rev=108935&r1=108934&r2=108935&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/MachineLICM.cpp (original) +++ llvm/trunk/lib/CodeGen/MachineLICM.cpp Tue Jul 20 16:29:12 2010 @@ -488,13 +488,14 @@ MII = NextMII; } - const std::vector &Children = N->getChildren(); // Don't hoist things out of a large switch statement. This often causes // code to be hoisted that wasn't going to be executed, and increases // register pressure in a situation where it's likely to matter. - if (Children.size() < 10) + if (BB->succ_size() < 25) { + const std::vector &Children = N->getChildren(); for (unsigned I = 0, E = Children.size(); I != E; ++I) HoistRegion(Children[I]); + } } /// IsLICMCandidate - Returns true if the instruction may be a suitable From matt at console-pimps.org Tue Jul 20 16:37:30 2010 From: matt at console-pimps.org (Matt Fleming) Date: Tue, 20 Jul 2010 21:37:30 -0000 Subject: [llvm-commits] [llvm] r108938 - in /llvm/trunk/test/MC/AsmParser/ELF: ./ dg.exp directive_section_bss.s directive_section_data_rel.s directive_section_data_rel_ro.s directive_section_eh_frame.s directive_section_rodata.s directive_section_tbss.s directive_section_tdata.s Message-ID: <20100720213730.CBCD82A6C12C@llvm.org> Author: mfleming Date: Tue Jul 20 16:37:30 2010 New Revision: 108938 URL: http://llvm.org/viewvc/llvm-project?rev=108938&view=rev Log: Include some tests for the recently committed ELF section directive handlers. Added: llvm/trunk/test/MC/AsmParser/ELF/ llvm/trunk/test/MC/AsmParser/ELF/dg.exp llvm/trunk/test/MC/AsmParser/ELF/directive_section_bss.s llvm/trunk/test/MC/AsmParser/ELF/directive_section_data_rel.s llvm/trunk/test/MC/AsmParser/ELF/directive_section_data_rel_ro.s llvm/trunk/test/MC/AsmParser/ELF/directive_section_eh_frame.s llvm/trunk/test/MC/AsmParser/ELF/directive_section_rodata.s llvm/trunk/test/MC/AsmParser/ELF/directive_section_tbss.s llvm/trunk/test/MC/AsmParser/ELF/directive_section_tdata.s Added: llvm/trunk/test/MC/AsmParser/ELF/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AsmParser/ELF/dg.exp?rev=108938&view=auto ============================================================================== --- llvm/trunk/test/MC/AsmParser/ELF/dg.exp (added) +++ llvm/trunk/test/MC/AsmParser/ELF/dg.exp Tue Jul 20 16:37:30 2010 @@ -0,0 +1,6 @@ +load_lib llvm.exp + +if { [llvm_supports_target X86] } { + RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{s}]] +} + Added: llvm/trunk/test/MC/AsmParser/ELF/directive_section_bss.s URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AsmParser/ELF/directive_section_bss.s?rev=108938&view=auto ============================================================================== --- llvm/trunk/test/MC/AsmParser/ELF/directive_section_bss.s (added) +++ llvm/trunk/test/MC/AsmParser/ELF/directive_section_bss.s Tue Jul 20 16:37:30 2010 @@ -0,0 +1,6 @@ +# RUN: llvm-mc -triple i386-pc-linux-gnu %s | FileCheck %s + + .bss +# CHECK: .bss + .bss + Added: llvm/trunk/test/MC/AsmParser/ELF/directive_section_data_rel.s URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AsmParser/ELF/directive_section_data_rel.s?rev=108938&view=auto ============================================================================== --- llvm/trunk/test/MC/AsmParser/ELF/directive_section_data_rel.s (added) +++ llvm/trunk/test/MC/AsmParser/ELF/directive_section_data_rel.s Tue Jul 20 16:37:30 2010 @@ -0,0 +1,6 @@ +# RUN: llvm-mc -triple i386-pc-linux-gnu %s | FileCheck %s + + .data.rel +# CHECK: .data.rel + .data.rel + Added: llvm/trunk/test/MC/AsmParser/ELF/directive_section_data_rel_ro.s URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AsmParser/ELF/directive_section_data_rel_ro.s?rev=108938&view=auto ============================================================================== --- llvm/trunk/test/MC/AsmParser/ELF/directive_section_data_rel_ro.s (added) +++ llvm/trunk/test/MC/AsmParser/ELF/directive_section_data_rel_ro.s Tue Jul 20 16:37:30 2010 @@ -0,0 +1,6 @@ +# RUN: llvm-mc -triple i386-pc-linux-gnu %s | FileCheck %s + + .data.rel.ro +# CHECK: .data.rel.ro + .data.rel.ro + Added: llvm/trunk/test/MC/AsmParser/ELF/directive_section_eh_frame.s URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AsmParser/ELF/directive_section_eh_frame.s?rev=108938&view=auto ============================================================================== --- llvm/trunk/test/MC/AsmParser/ELF/directive_section_eh_frame.s (added) +++ llvm/trunk/test/MC/AsmParser/ELF/directive_section_eh_frame.s Tue Jul 20 16:37:30 2010 @@ -0,0 +1,6 @@ +# RUN: llvm-mc -triple i386-pc-linux-gnu %s | FileCheck %s + + .eh_frame +# CHECK: .eh_frame + .eh_frame + Added: llvm/trunk/test/MC/AsmParser/ELF/directive_section_rodata.s URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AsmParser/ELF/directive_section_rodata.s?rev=108938&view=auto ============================================================================== --- llvm/trunk/test/MC/AsmParser/ELF/directive_section_rodata.s (added) +++ llvm/trunk/test/MC/AsmParser/ELF/directive_section_rodata.s Tue Jul 20 16:37:30 2010 @@ -0,0 +1,6 @@ +# RUN: llvm-mc -triple i386-pc-linux-gnu %s | FileCheck %s + + .rodata +# CHECK: .rodata + .rodata + Added: llvm/trunk/test/MC/AsmParser/ELF/directive_section_tbss.s URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AsmParser/ELF/directive_section_tbss.s?rev=108938&view=auto ============================================================================== --- llvm/trunk/test/MC/AsmParser/ELF/directive_section_tbss.s (added) +++ llvm/trunk/test/MC/AsmParser/ELF/directive_section_tbss.s Tue Jul 20 16:37:30 2010 @@ -0,0 +1,6 @@ +# RUN: llvm-mc -triple i386-pc-linux-gnu %s | FileCheck %s + + .tbss +# CHECK: .tbss + .tbss + Added: llvm/trunk/test/MC/AsmParser/ELF/directive_section_tdata.s URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AsmParser/ELF/directive_section_tdata.s?rev=108938&view=auto ============================================================================== --- llvm/trunk/test/MC/AsmParser/ELF/directive_section_tdata.s (added) +++ llvm/trunk/test/MC/AsmParser/ELF/directive_section_tdata.s Tue Jul 20 16:37:30 2010 @@ -0,0 +1,6 @@ +# RUN: llvm-mc -triple i386-pc-linux-gnu %s | FileCheck %s + + .tdata +# CHECK: .tdata + .tdata + From gohman at apple.com Tue Jul 20 16:42:29 2010 From: gohman at apple.com (Dan Gohman) Date: Tue, 20 Jul 2010 21:42:29 -0000 Subject: [llvm-commits] [llvm] r108939 - in /llvm/trunk: include/llvm/LLVMContext.h lib/Bitcode/Reader/BitcodeReader.cpp lib/Bitcode/Reader/BitcodeReader.h lib/Bitcode/Writer/BitcodeWriter.cpp lib/VMCore/LLVMContext.cpp Message-ID: <20100720214229.3A1B92A6C12C@llvm.org> Author: djg Date: Tue Jul 20 16:42:28 2010 New Revision: 108939 URL: http://llvm.org/viewvc/llvm-project?rev=108939&view=rev Log: Add support for remapping metadata kind IDs when reading in a bitcode file, so that two bitcode files where the same metadata kind name happens to have been assigned a different ID can still be linked together. Eliminate the restriction that metadata kind IDs can't be 0. Change MD_dbg from 1 to 0, because we can now, and because it's less mysterious that way. Modified: llvm/trunk/include/llvm/LLVMContext.h llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp llvm/trunk/lib/Bitcode/Reader/BitcodeReader.h llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp llvm/trunk/lib/VMCore/LLVMContext.cpp Modified: llvm/trunk/include/llvm/LLVMContext.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/LLVMContext.h?rev=108939&r1=108938&r2=108939&view=diff ============================================================================== --- llvm/trunk/include/llvm/LLVMContext.h (original) +++ llvm/trunk/include/llvm/LLVMContext.h Tue Jul 20 16:42:28 2010 @@ -40,7 +40,7 @@ // Pinned metadata names, which always have the same value. This is a // compile-time performance optimization, not a correctness optimization. enum { - MD_dbg = 1 // "dbg" -> 1. + MD_dbg = 0 // "dbg" }; /// getMDKindID - Return a unique non-zero ID for the specified metadata kind. Modified: llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp?rev=108939&r1=108938&r2=108939&view=diff ============================================================================== --- llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp (original) +++ llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp Tue Jul 20 16:42:28 2010 @@ -39,6 +39,7 @@ std::vector().swap(FunctionBBs); std::vector().swap(FunctionsWithBodies); DeferredFunctionInfo.clear(); + MDKindMap.clear(); } //===----------------------------------------------------------------------===// @@ -859,13 +860,12 @@ SmallString<8> Name; Name.resize(RecordLength-1); unsigned Kind = Record[0]; - (void) Kind; for (unsigned i = 1; i != RecordLength; ++i) Name[i-1] = Record[i]; unsigned NewKind = TheModule->getMDKindID(Name.str()); - assert(Kind == NewKind && - "FIXME: Unable to handle custom metadata mismatch!");(void)NewKind; + if (!MDKindMap.insert(std::make_pair(Kind, NewKind)).second) + return Error("Conflicting METADATA_KIND records"); break; } } @@ -1621,8 +1621,12 @@ Instruction *Inst = InstructionList[Record[0]]; for (unsigned i = 1; i != RecordLength; i = i+2) { unsigned Kind = Record[i]; + DenseMap::iterator I = + MDKindMap.find(Kind); + if (I == MDKindMap.end()) + return Error("Invalid metadata kind ID"); Value *Node = MDValueList.getValueFwdRef(Record[i+1]); - Inst->setMetadata(Kind, cast(Node)); + Inst->setMetadata(I->second, cast(Node)); } break; } Modified: llvm/trunk/lib/Bitcode/Reader/BitcodeReader.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Bitcode/Reader/BitcodeReader.h?rev=108939&r1=108938&r2=108939&view=diff ============================================================================== --- llvm/trunk/lib/Bitcode/Reader/BitcodeReader.h (original) +++ llvm/trunk/lib/Bitcode/Reader/BitcodeReader.h Tue Jul 20 16:42:28 2010 @@ -156,6 +156,9 @@ // stored here with their replacement function. typedef std::vector > UpgradedIntrinsicMap; UpgradedIntrinsicMap UpgradedIntrinsics; + + // Map the bitcode's custom MDKind ID to the Module's MDKind ID. + DenseMap MDKindMap; // After the module header has been read, the FunctionsWithBodies list is // reversed. This keeps track of whether we've done this yet. Modified: llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp?rev=108939&r1=108938&r2=108939&view=diff ============================================================================== --- llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp (original) +++ llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp Tue Jul 20 16:42:28 2010 @@ -634,12 +634,11 @@ SmallVector Names; M->getMDKindNames(Names); - assert(Names[0] == "" && "MDKind #0 is invalid"); - if (Names.size() == 1) return; + if (Names.empty()) return; Stream.EnterSubblock(bitc::METADATA_BLOCK_ID, 3); - for (unsigned MDKindID = 1, e = Names.size(); MDKindID != e; ++MDKindID) { + for (unsigned MDKindID = 0, e = Names.size(); MDKindID != e; ++MDKindID) { Record.push_back(MDKindID); StringRef KName = Names[MDKindID]; Record.append(KName.begin(), KName.end()); Modified: llvm/trunk/lib/VMCore/LLVMContext.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/LLVMContext.cpp?rev=108939&r1=108938&r2=108939&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/LLVMContext.cpp (original) +++ llvm/trunk/lib/VMCore/LLVMContext.cpp Tue Jul 20 16:42:28 2010 @@ -110,21 +110,18 @@ /// getMDKindID - Return a unique non-zero ID for the specified metadata kind. unsigned LLVMContext::getMDKindID(StringRef Name) const { assert(isValidName(Name) && "Invalid MDNode name"); - - unsigned &Entry = pImpl->CustomMDKindNames[Name]; - + // If this is new, assign it its ID. - if (Entry == 0) Entry = pImpl->CustomMDKindNames.size(); - return Entry; + return + pImpl->CustomMDKindNames.GetOrCreateValue( + Name, pImpl->CustomMDKindNames.size()).second; } /// getHandlerNames - Populate client supplied smallvector using custome /// metadata name and ID. void LLVMContext::getMDKindNames(SmallVectorImpl &Names) const { - Names.resize(pImpl->CustomMDKindNames.size()+1); - Names[0] = ""; + Names.resize(pImpl->CustomMDKindNames.size()); for (StringMap::const_iterator I = pImpl->CustomMDKindNames.begin(), E = pImpl->CustomMDKindNames.end(); I != E; ++I) - // MD Handlers are numbered from 1. Names[I->second] = I->first(); } From gohman at apple.com Tue Jul 20 16:45:17 2010 From: gohman at apple.com (Dan Gohman) Date: Tue, 20 Jul 2010 21:45:17 -0000 Subject: [llvm-commits] [llvm] r108940 - /llvm/trunk/include/llvm/LLVMContext.h Message-ID: <20100720214517.4C4C72A6C12C@llvm.org> Author: djg Date: Tue Jul 20 16:45:17 2010 New Revision: 108940 URL: http://llvm.org/viewvc/llvm-project?rev=108940&view=rev Log: Remove an obsolete comment. Modified: llvm/trunk/include/llvm/LLVMContext.h Modified: llvm/trunk/include/llvm/LLVMContext.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/LLVMContext.h?rev=108940&r1=108939&r2=108940&view=diff ============================================================================== --- llvm/trunk/include/llvm/LLVMContext.h (original) +++ llvm/trunk/include/llvm/LLVMContext.h Tue Jul 20 16:45:17 2010 @@ -48,8 +48,7 @@ unsigned getMDKindID(StringRef Name) const; /// getMDKindNames - Populate client supplied SmallVector with the name for - /// custom metadata IDs registered in this LLVMContext. ID #0 is not used, - /// so it is filled in as an empty string. + /// custom metadata IDs registered in this LLVMContext. void getMDKindNames(SmallVectorImpl &Result) const; /// setInlineAsmDiagnosticHandler - This method sets a handler that is invoked From stoklund at 2pi.dk Tue Jul 20 16:46:58 2010 From: stoklund at 2pi.dk (Jakob Stoklund Olesen) Date: Tue, 20 Jul 2010 21:46:58 -0000 Subject: [llvm-commits] [llvm] r108941 - in /llvm/trunk: include/llvm/Analysis/LoopInfo.h lib/CodeGen/SplitKit.cpp lib/CodeGen/SplitKit.h Message-ID: <20100720214658.C907A2A6C12C@llvm.org> Author: stoklund Date: Tue Jul 20 16:46:58 2010 New Revision: 108941 URL: http://llvm.org/viewvc/llvm-project?rev=108941&view=rev Log: Implement loop splitting analysis. Determine which loop exit blocks need a 'pre-exit' block inserted. Recognize when this would be impossible. Modified: llvm/trunk/include/llvm/Analysis/LoopInfo.h llvm/trunk/lib/CodeGen/SplitKit.cpp llvm/trunk/lib/CodeGen/SplitKit.h Modified: llvm/trunk/include/llvm/Analysis/LoopInfo.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/LoopInfo.h?rev=108941&r1=108940&r2=108941&view=diff ============================================================================== --- llvm/trunk/include/llvm/Analysis/LoopInfo.h (original) +++ llvm/trunk/include/llvm/Analysis/LoopInfo.h Tue Jul 20 16:46:58 2010 @@ -509,6 +509,12 @@ } }; +template +raw_ostream& operator<<(raw_ostream &OS, const LoopBase &Loop) { + Loop.print(OS); + return OS; +} + class Loop : public LoopBase { public: Loop() {} Modified: llvm/trunk/lib/CodeGen/SplitKit.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SplitKit.cpp?rev=108941&r1=108940&r2=108941&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SplitKit.cpp (original) +++ llvm/trunk/lib/CodeGen/SplitKit.cpp Tue Jul 20 16:46:58 2010 @@ -18,11 +18,17 @@ #include "llvm/CodeGen/MachineFunctionPass.h" #include "llvm/CodeGen/MachineLoopInfo.h" #include "llvm/CodeGen/MachineRegisterInfo.h" +#include "llvm/Support/CommandLine.h" #include "llvm/Support/Debug.h" #include "llvm/Support/raw_ostream.h" +#include "llvm/Target/TargetInstrInfo.h" +#include "llvm/Target/TargetMachine.h" using namespace llvm; +static cl::opt +AllowSplit("spiller-splits-edges", + cl::desc("Allow critical edge splitting during spilling")); //===----------------------------------------------------------------------===// // Split Analysis @@ -34,6 +40,7 @@ : mf_(*mf), lis_(*lis), loops_(*mli), + tii_(*mf->getTarget().getInstrInfo()), curli_(0) {} void SplitAnalysis::clear() { @@ -42,6 +49,12 @@ usingLoops_.clear(); } +bool SplitAnalysis::canAnalyzeBranch(const MachineBasicBlock *MBB) { + MachineBasicBlock *T, *F; + SmallVector Cond; + return !tii_.AnalyzeBranch(const_cast(*MBB), T, F, Cond); +} + /// analyzeUses - Count instructions, basic blocks, and loops using curli. void SplitAnalysis::analyzeUses() { const MachineRegisterInfo &MRI = mf_.getRegInfo(); @@ -62,29 +75,49 @@ << *curli_ << "\n"); } -SplitAnalysis::LoopPeripheralUse -SplitAnalysis::analyzeLoopPeripheralUse(const MachineLoop *Loop) { - // Peripheral blocks. - SmallVector Peri; - Loop->getExitBlocks(Peri); - if (MachineBasicBlock *PredBB = Loop->getLoopPredecessor()) - Peri.push_back(PredBB); - array_pod_sort(Peri.begin(), Peri.end()); - Peri.erase(std::unique(Peri.begin(), Peri.end()), Peri.end()); +// Get three sets of basic blocks surrounding a loop: Blocks inside the loop, +// predecessor blocks, and exit blocks. +void SplitAnalysis::getLoopBlocks(const MachineLoop *Loop, LoopBlocks &Blocks) { + Blocks.clear(); + + // Blocks in the loop. + Blocks.Loop.insert(Loop->block_begin(), Loop->block_end()); + + // Predecessor blocks. + const MachineBasicBlock *Header = Loop->getHeader(); + for (MachineBasicBlock::const_pred_iterator I = Header->pred_begin(), + E = Header->pred_end(); I != E; ++I) + if (!Blocks.Loop.count(*I)) + Blocks.Preds.insert(*I); + + // Exit blocks. + for (MachineLoop::block_iterator I = Loop->block_begin(), + E = Loop->block_end(); I != E; ++I) { + const MachineBasicBlock *MBB = *I; + for (MachineBasicBlock::const_succ_iterator SI = MBB->succ_begin(), + SE = MBB->succ_end(); SI != SE; ++SI) + if (!Blocks.Loop.count(*SI)) + Blocks.Exits.insert(*SI); + } +} +/// analyzeLoopPeripheralUse - Return an enum describing how curli_ is used in +/// and around the Loop. +SplitAnalysis::LoopPeripheralUse SplitAnalysis:: +analyzeLoopPeripheralUse(const SplitAnalysis::LoopBlocks &Blocks) { LoopPeripheralUse use = ContainedInLoop; for (BlockCountMap::iterator I = usingBlocks_.begin(), E = usingBlocks_.end(); I != E; ++I) { const MachineBasicBlock *MBB = I->first; // Is this a peripheral block? if (use < MultiPeripheral && - std::binary_search(Peri.begin(), Peri.end(), MBB)) { + (Blocks.Preds.count(MBB) || Blocks.Exits.count(MBB))) { if (I->second > 1) use = MultiPeripheral; else use = SinglePeripheral; continue; } // Is it a loop block? - if (Loop->contains(MBB)) + if (Blocks.Loop.count(MBB)) continue; // It must be an unrelated block. return OutsideLoop; @@ -92,6 +125,80 @@ return use; } +/// getCriticalExits - It may be necessary to partially break critical edges +/// leaving the loop if an exit block has phi uses of curli. Collect the exit +/// blocks that need special treatment into CriticalExits. +void SplitAnalysis::getCriticalExits(const SplitAnalysis::LoopBlocks &Blocks, + BlockPtrSet &CriticalExits) { + CriticalExits.clear(); + + // A critical exit block contains a phi def of curli, and has a predecessor + // that is not in the loop nor a loop predecessor. + // For such an exit block, the edges carrying the new variable must be moved + // to a new pre-exit block. + for (BlockPtrSet::iterator I = Blocks.Exits.begin(), E = Blocks.Exits.end(); + I != E; ++I) { + const MachineBasicBlock *Succ = *I; + SlotIndex SuccIdx = lis_.getMBBStartIdx(Succ); + VNInfo *SuccVNI = curli_->getVNInfoAt(SuccIdx); + // This exit may not have curli live in at all. No need to split. + if (!SuccVNI) + continue; + // If this is not a PHI def, it is either using a value from before the + // loop, or a value defined inside the loop. Both are safe. + if (!SuccVNI->isPHIDef() || SuccVNI->def.getBaseIndex() != SuccIdx) + continue; + // This exit block does have a PHI. Does it also have a predecessor that is + // not a loop block or loop predecessor? + for (MachineBasicBlock::const_pred_iterator PI = Succ->pred_begin(), + PE = Succ->pred_end(); PI != PE; ++PI) { + const MachineBasicBlock *Pred = *PI; + if (Blocks.Loop.count(Pred) || Blocks.Preds.count(Pred)) + continue; + // This is a critical exit block, and we need to split the exit edge. + CriticalExits.insert(Succ); + break; + } + } +} + +/// canSplitCriticalExits - Return true if it is possible to insert new exit +/// blocks before the blocks in CriticalExits. +bool +SplitAnalysis::canSplitCriticalExits(const SplitAnalysis::LoopBlocks &Blocks, + BlockPtrSet &CriticalExits) { + // If we don't allow critical edge splitting, require no critical exits. + if (!AllowSplit) + return CriticalExits.empty(); + + for (BlockPtrSet::iterator I = CriticalExits.begin(), E = CriticalExits.end(); + I != E; ++I) { + const MachineBasicBlock *Succ = *I; + // We want to insert a new pre-exit MBB before Succ, and change all the + // in-loop blocks to branch to the pre-exit instead of Succ. + // Check that all the in-loop predecessors can be changed. + for (MachineBasicBlock::const_pred_iterator PI = Succ->pred_begin(), + PE = Succ->pred_end(); PI != PE; ++PI) { + const MachineBasicBlock *Pred = *PI; + // The external predecessors won't be altered. + if (!Blocks.Loop.count(Pred) && !Blocks.Preds.count(Pred)) + continue; + if (!canAnalyzeBranch(Pred)) + return false; + } + + // If Succ's layout predecessor falls through, that too must be analyzable. + // We need to insert the pre-exit block in the gap. + MachineFunction::const_iterator MFI = Succ; + if (MFI == mf_.begin()) + continue; + if (!canAnalyzeBranch(--MFI)) + return false; + } + // No problems found. + return true; +} + void SplitAnalysis::analyze(const LiveInterval *li) { clear(); curli_ = li; @@ -99,22 +206,46 @@ } const MachineLoop *SplitAnalysis::getBestSplitLoop() { + assert(curli_ && "Call analyze() before getBestSplitLoop"); + if (usingLoops_.empty()) + return 0; + LoopPtrSet Loops, SecondLoops; + LoopBlocks Blocks; + BlockPtrSet CriticalExits; // Find first-class and second class candidate loops. // We prefer to split around loops where curli is used outside the periphery. for (LoopPtrSet::const_iterator I = usingLoops_.begin(), - E = usingLoops_.end(); I != E; ++I) - switch(analyzeLoopPeripheralUse(*I)) { + E = usingLoops_.end(); I != E; ++I) { + getLoopBlocks(*I, Blocks); + LoopPtrSet *LPS = 0; + switch(analyzeLoopPeripheralUse(Blocks)) { case OutsideLoop: - Loops.insert(*I); + LPS = &Loops; break; case MultiPeripheral: - SecondLoops.insert(*I); + LPS = &SecondLoops; break; - default: + case ContainedInLoop: + DEBUG(dbgs() << "ContainedInLoop: " << **I); + continue; + case SinglePeripheral: + DEBUG(dbgs() << "SinglePeripheral: " << **I); continue; } + // Will it be possible to split around this loop? + getCriticalExits(Blocks, CriticalExits); + DEBUG(dbgs() << CriticalExits.size() << " critical exits: " << **I); + if (!canSplitCriticalExits(Blocks, CriticalExits)) + continue; + // This is a possible split. + assert(LPS); + LPS->insert(*I); + } + + DEBUG(dbgs() << "Got " << Loops.size() << " + " << SecondLoops.size() + << " candidate loops\n"); // If there are no first class loops available, look at second class loops. if (Loops.empty()) @@ -125,8 +256,6 @@ // Pick the earliest loop. // FIXME: Are there other heuristics to consider? - // - avoid breaking critical edges. - // - avoid impossible loops. const MachineLoop *Best = 0; SlotIndex BestIdx; for (LoopPtrSet::const_iterator I = Loops.begin(), E = Loops.end(); I != E; @@ -135,6 +264,7 @@ if (!Best || Idx < BestIdx) Best = *I, BestIdx = Idx; } + DEBUG(dbgs() << "Best: " << *Best); return Best; } Modified: llvm/trunk/lib/CodeGen/SplitKit.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SplitKit.h?rev=108941&r1=108940&r2=108941&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SplitKit.h (original) +++ llvm/trunk/lib/CodeGen/SplitKit.h Tue Jul 20 16:46:58 2010 @@ -25,11 +25,13 @@ class MachineFunctionPass; class MachineLoop; class MachineLoopInfo; +class TargetInstrInfo; class SplitAnalysis { const MachineFunction &mf_; const LiveIntervals &lis_; const MachineLoopInfo &loops_; + const TargetInstrInfo &tii_; // Current live interval. const LiveInterval *curli_; @@ -49,6 +51,10 @@ // Sumarize statistics by counting instructions using curli_. void analyzeUses(); + /// canAnalyzeBranch - Return true if MBB ends in a branch that can be + /// analyzed. + bool canAnalyzeBranch(const MachineBasicBlock *MBB); + public: SplitAnalysis(const MachineFunction *mf, const LiveIntervals *lis, const MachineLoopInfo *mli); @@ -61,6 +67,24 @@ /// new interval. void clear(); + typedef SmallPtrSet BlockPtrSet; + + // Sets of basic blocks surrounding a machine loop. + struct LoopBlocks { + BlockPtrSet Loop; // Blocks in the loop. + BlockPtrSet Preds; // Loop predecessor blocks. + BlockPtrSet Exits; // Loop exit blocks. + + void clear() { + Loop.clear(); + Preds.clear(); + Exits.clear(); + } + }; + + // Calculate the block sets surrounding the loop. + void getLoopBlocks(const MachineLoop *Loop, LoopBlocks &Blocks); + /// LoopPeripheralUse - how is a variable used in and around a loop? /// Peripheral blocks are the loop predecessors and exit blocks. enum LoopPeripheralUse { @@ -72,7 +96,17 @@ /// analyzeLoopPeripheralUse - Return an enum describing how curli_ is used in /// and around the Loop. - LoopPeripheralUse analyzeLoopPeripheralUse(const MachineLoop*); + LoopPeripheralUse analyzeLoopPeripheralUse(const LoopBlocks&); + + /// getCriticalExits - It may be necessary to partially break critical edges + /// leaving the loop if an exit block has phi uses of curli. Collect the exit + /// blocks that need special treatment into CriticalExits. + void getCriticalExits(const LoopBlocks &Blocks, BlockPtrSet &CriticalExits); + + /// canSplitCriticalExits - Return true if it is possible to insert new exit + /// blocks before the blocks in CriticalExits. + bool canSplitCriticalExits(const LoopBlocks &Blocks, + BlockPtrSet &CriticalExits); /// getBestSplitLoop - Return the loop where curli may best be split to a /// separate register, or NULL. From clattner at apple.com Tue Jul 20 17:09:47 2010 From: clattner at apple.com (Chris Lattner) Date: Tue, 20 Jul 2010 15:09:47 -0700 Subject: [llvm-commits] [llvm] r108938 - in /llvm/trunk/test/MC/AsmParser/ELF: ./ dg.exp directive_section_bss.s directive_section_data_rel.s directive_section_data_rel_ro.s directive_section_eh_frame.s directive_section_rodata.s directive_section_tbss.s directive_section_tdata.s In-Reply-To: <20100720213730.CBCD82A6C12C@llvm.org> References: <20100720213730.CBCD82A6C12C@llvm.org> Message-ID: On Jul 20, 2010, at 2:37 PM, Matt Fleming wrote: > Author: mfleming > Date: Tue Jul 20 16:37:30 2010 > New Revision: 108938 > > URL: http://llvm.org/viewvc/llvm-project?rev=108938&view=rev > Log: > Include some tests for the recently committed ELF section directive > handlers. Hi Matt, Please merge these into a single directive_section.s testcase. The beauty of filecheck is that it allows more granular checks for stuff like this. -Chris > > > Added: > llvm/trunk/test/MC/AsmParser/ELF/ > llvm/trunk/test/MC/AsmParser/ELF/dg.exp > llvm/trunk/test/MC/AsmParser/ELF/directive_section_bss.s > llvm/trunk/test/MC/AsmParser/ELF/directive_section_data_rel.s > llvm/trunk/test/MC/AsmParser/ELF/directive_section_data_rel_ro.s > llvm/trunk/test/MC/AsmParser/ELF/directive_section_eh_frame.s > llvm/trunk/test/MC/AsmParser/ELF/directive_section_rodata.s > llvm/trunk/test/MC/AsmParser/ELF/directive_section_tbss.s > llvm/trunk/test/MC/AsmParser/ELF/directive_section_tdata.s > > Added: llvm/trunk/test/MC/AsmParser/ELF/dg.exp > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AsmParser/ELF/dg.exp?rev=108938&view=auto > ============================================================================== > --- llvm/trunk/test/MC/AsmParser/ELF/dg.exp (added) > +++ llvm/trunk/test/MC/AsmParser/ELF/dg.exp Tue Jul 20 16:37:30 2010 > @@ -0,0 +1,6 @@ > +load_lib llvm.exp > + > +if { [llvm_supports_target X86] } { > + RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{s}]] > +} > + > > Added: llvm/trunk/test/MC/AsmParser/ELF/directive_section_bss.s > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AsmParser/ELF/directive_section_bss.s?rev=108938&view=auto > ============================================================================== > --- llvm/trunk/test/MC/AsmParser/ELF/directive_section_bss.s (added) > +++ llvm/trunk/test/MC/AsmParser/ELF/directive_section_bss.s Tue Jul 20 16:37:30 2010 > @@ -0,0 +1,6 @@ > +# RUN: llvm-mc -triple i386-pc-linux-gnu %s | FileCheck %s > + > + .bss > +# CHECK: .bss > + .bss > + > > Added: llvm/trunk/test/MC/AsmParser/ELF/directive_section_data_rel.s > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AsmParser/ELF/directive_section_data_rel.s?rev=108938&view=auto > ============================================================================== > --- llvm/trunk/test/MC/AsmParser/ELF/directive_section_data_rel.s (added) > +++ llvm/trunk/test/MC/AsmParser/ELF/directive_section_data_rel.s Tue Jul 20 16:37:30 2010 > @@ -0,0 +1,6 @@ > +# RUN: llvm-mc -triple i386-pc-linux-gnu %s | FileCheck %s > + > + .data.rel > +# CHECK: .data.rel > + .data.rel > + > > Added: llvm/trunk/test/MC/AsmParser/ELF/directive_section_data_rel_ro.s > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AsmParser/ELF/directive_section_data_rel_ro.s?rev=108938&view=auto > ============================================================================== > --- llvm/trunk/test/MC/AsmParser/ELF/directive_section_data_rel_ro.s (added) > +++ llvm/trunk/test/MC/AsmParser/ELF/directive_section_data_rel_ro.s Tue Jul 20 16:37:30 2010 > @@ -0,0 +1,6 @@ > +# RUN: llvm-mc -triple i386-pc-linux-gnu %s | FileCheck %s > + > + .data.rel.ro > +# CHECK: .data.rel.ro > + .data.rel.ro > + > > Added: llvm/trunk/test/MC/AsmParser/ELF/directive_section_eh_frame.s > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AsmParser/ELF/directive_section_eh_frame.s?rev=108938&view=auto > ============================================================================== > --- llvm/trunk/test/MC/AsmParser/ELF/directive_section_eh_frame.s (added) > +++ llvm/trunk/test/MC/AsmParser/ELF/directive_section_eh_frame.s Tue Jul 20 16:37:30 2010 > @@ -0,0 +1,6 @@ > +# RUN: llvm-mc -triple i386-pc-linux-gnu %s | FileCheck %s > + > + .eh_frame > +# CHECK: .eh_frame > + .eh_frame > + > > Added: llvm/trunk/test/MC/AsmParser/ELF/directive_section_rodata.s > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AsmParser/ELF/directive_section_rodata.s?rev=108938&view=auto > ============================================================================== > --- llvm/trunk/test/MC/AsmParser/ELF/directive_section_rodata.s (added) > +++ llvm/trunk/test/MC/AsmParser/ELF/directive_section_rodata.s Tue Jul 20 16:37:30 2010 > @@ -0,0 +1,6 @@ > +# RUN: llvm-mc -triple i386-pc-linux-gnu %s | FileCheck %s > + > + .rodata > +# CHECK: .rodata > + .rodata > + > > Added: llvm/trunk/test/MC/AsmParser/ELF/directive_section_tbss.s > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AsmParser/ELF/directive_section_tbss.s?rev=108938&view=auto > ============================================================================== > --- llvm/trunk/test/MC/AsmParser/ELF/directive_section_tbss.s (added) > +++ llvm/trunk/test/MC/AsmParser/ELF/directive_section_tbss.s Tue Jul 20 16:37:30 2010 > @@ -0,0 +1,6 @@ > +# RUN: llvm-mc -triple i386-pc-linux-gnu %s | FileCheck %s > + > + .tbss > +# CHECK: .tbss > + .tbss > + > > Added: llvm/trunk/test/MC/AsmParser/ELF/directive_section_tdata.s > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AsmParser/ELF/directive_section_tdata.s?rev=108938&view=auto > ============================================================================== > --- llvm/trunk/test/MC/AsmParser/ELF/directive_section_tdata.s (added) > +++ llvm/trunk/test/MC/AsmParser/ELF/directive_section_tdata.s Tue Jul 20 16:37:30 2010 > @@ -0,0 +1,6 @@ > +# RUN: llvm-mc -triple i386-pc-linux-gnu %s | FileCheck %s > + > + .tdata > +# CHECK: .tdata > + .tdata > + > > > _______________________________________________ > 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 Jul 20 17:18:19 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 20 Jul 2010 22:18:19 -0000 Subject: [llvm-commits] [llvm] r108945 - in /llvm/trunk/lib/Target/X86: X86AsmPrinter.cpp X86MCInstLower.cpp Message-ID: <20100720221820.17FF32A6C12C@llvm.org> Author: lattner Date: Tue Jul 20 17:18:19 2010 New Revision: 108945 URL: http://llvm.org/viewvc/llvm-project?rev=108945&view=rev Log: move two asmprinter methods into the asmprinter .cpp file. Modified: llvm/trunk/lib/Target/X86/X86AsmPrinter.cpp llvm/trunk/lib/Target/X86/X86MCInstLower.cpp Modified: llvm/trunk/lib/Target/X86/X86AsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86AsmPrinter.cpp?rev=108945&r1=108944&r2=108945&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86AsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/X86/X86AsmPrinter.cpp Tue Jul 20 17:18:19 2010 @@ -24,6 +24,7 @@ #include "llvm/DerivedTypes.h" #include "llvm/Module.h" #include "llvm/Type.h" +#include "llvm/Analysis/DebugInfo.h" #include "llvm/Assembly/Writer.h" #include "llvm/MC/MCAsmInfo.h" #include "llvm/MC/MCContext.h" @@ -659,6 +660,44 @@ } } +MachineLocation +X86AsmPrinter::getDebugValueLocation(const MachineInstr *MI) const { + MachineLocation Location; + assert (MI->getNumOperands() == 7 && "Invalid no. of machine operands!"); + // Frame address. Currently handles register +- offset only. + + if (MI->getOperand(0).isReg() && MI->getOperand(3).isImm()) + Location.set(MI->getOperand(0).getReg(), MI->getOperand(3).getImm()); + return Location; +} + +void X86AsmPrinter::PrintDebugValueComment(const MachineInstr *MI, + raw_ostream &O) { + // Only the target-dependent form of DBG_VALUE should get here. + // Referencing the offset and metadata as NOps-2 and NOps-1 is + // probably portable to other targets; frame pointer location is not. + unsigned NOps = MI->getNumOperands(); + assert(NOps==7); + O << '\t' << MAI->getCommentString() << "DEBUG_VALUE: "; + // cast away const; DIetc do not take const operands for some reason. + DIVariable V(const_cast(MI->getOperand(NOps-1).getMetadata())); + if (V.getContext().isSubprogram()) + O << DISubprogram(V.getContext()).getDisplayName() << ":"; + O << V.getName(); + O << " <- "; + // Frame address. Currently handles register +- offset only. + O << '['; + if (MI->getOperand(0).isReg() && MI->getOperand(0).getReg()) + printOperand(MI, 0, O); + else + O << "undef"; + O << '+'; printOperand(MI, 3, O); + O << ']'; + O << "+"; + printOperand(MI, NOps-2, O); +} + + //===----------------------------------------------------------------------===// // Target Registry Stuff Modified: llvm/trunk/lib/Target/X86/X86MCInstLower.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86MCInstLower.cpp?rev=108945&r1=108944&r2=108945&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86MCInstLower.cpp (original) +++ llvm/trunk/lib/Target/X86/X86MCInstLower.cpp Tue Jul 20 17:18:19 2010 @@ -16,7 +16,6 @@ #include "X86AsmPrinter.h" #include "X86COFFMachineModuleInfo.h" #include "X86MCAsmInfo.h" -#include "llvm/Analysis/DebugInfo.h" #include "llvm/CodeGen/MachineModuleInfoImpls.h" #include "llvm/MC/MCContext.h" #include "llvm/MC/MCExpr.h" @@ -505,43 +504,6 @@ } } -void X86AsmPrinter::PrintDebugValueComment(const MachineInstr *MI, - raw_ostream &O) { - // Only the target-dependent form of DBG_VALUE should get here. - // Referencing the offset and metadata as NOps-2 and NOps-1 is - // probably portable to other targets; frame pointer location is not. - unsigned NOps = MI->getNumOperands(); - assert(NOps==7); - O << '\t' << MAI->getCommentString() << "DEBUG_VALUE: "; - // cast away const; DIetc do not take const operands for some reason. - DIVariable V(const_cast(MI->getOperand(NOps-1).getMetadata())); - if (V.getContext().isSubprogram()) - O << DISubprogram(V.getContext()).getDisplayName() << ":"; - O << V.getName(); - O << " <- "; - // Frame address. Currently handles register +- offset only. - O << '['; - if (MI->getOperand(0).isReg() && MI->getOperand(0).getReg()) - printOperand(MI, 0, O); - else - O << "undef"; - O << '+'; printOperand(MI, 3, O); - O << ']'; - O << "+"; - printOperand(MI, NOps-2, O); -} - -MachineLocation -X86AsmPrinter::getDebugValueLocation(const MachineInstr *MI) const { - MachineLocation Location; - assert (MI->getNumOperands() == 7 && "Invalid no. of machine operands!"); - // Frame address. Currently handles register +- offset only. - - if (MI->getOperand(0).isReg() && MI->getOperand(3).isImm()) - Location.set(MI->getOperand(0).getReg(), MI->getOperand(3).getImm()); - return Location; -} - void X86AsmPrinter::EmitInstruction(const MachineInstr *MI) { X86MCInstLower MCInstLowering(OutContext, Mang, *this); From sabre at nondot.org Tue Jul 20 17:23:57 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 20 Jul 2010 22:23:57 -0000 Subject: [llvm-commits] [llvm] r108947 - in /llvm/trunk/lib/Target/X86: X86MCInstLower.cpp X86MCInstLower.h Message-ID: <20100720222357.9EB252A6C12C@llvm.org> Author: lattner Date: Tue Jul 20 17:23:57 2010 New Revision: 108947 URL: http://llvm.org/viewvc/llvm-project?rev=108947&view=rev Log: cleanups. Modified: llvm/trunk/lib/Target/X86/X86MCInstLower.cpp llvm/trunk/lib/Target/X86/X86MCInstLower.h Modified: llvm/trunk/lib/Target/X86/X86MCInstLower.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86MCInstLower.cpp?rev=108947&r1=108946&r2=108947&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86MCInstLower.cpp (original) +++ llvm/trunk/lib/Target/X86/X86MCInstLower.cpp Tue Jul 20 17:23:57 2010 @@ -28,14 +28,12 @@ #include "llvm/Type.h" using namespace llvm; - -const X86Subtarget &X86MCInstLower::getSubtarget() const { - return AsmPrinter.getSubtarget(); -} +X86MCInstLower::X86MCInstLower(MCContext &ctx, Mangler *mang, + X86AsmPrinter &asmprinter) +: Ctx(ctx), Mang(mang), AsmPrinter(asmprinter), MMI(AsmPrinter.MMI) {} MachineModuleInfoMachO &X86MCInstLower::getMachOMMI() const { - assert(getSubtarget().isTargetDarwin() &&"Can only get MachO info on darwin"); - return AsmPrinter.MMI->getObjFileInfo(); + return MMI->getObjFileInfo(); } @@ -90,7 +88,7 @@ assert(MO.isGlobal() && "Extern symbol not handled yet"); StubSym = MachineModuleInfoImpl:: - StubValueTy(AsmPrinter.Mang->getSymbol(MO.getGlobal()), + StubValueTy(Mang->getSymbol(MO.getGlobal()), !MO.getGlobal()->hasInternalLinkage()); } return Sym; @@ -104,7 +102,7 @@ assert(MO.isGlobal() && "Extern symbol not handled yet"); StubSym = MachineModuleInfoImpl:: - StubValueTy(AsmPrinter.Mang->getSymbol(MO.getGlobal()), + StubValueTy(Mang->getSymbol(MO.getGlobal()), !MO.getGlobal()->hasInternalLinkage()); } return Sym; @@ -120,7 +118,7 @@ if (MO.isGlobal()) { StubSym = MachineModuleInfoImpl:: - StubValueTy(AsmPrinter.Mang->getSymbol(MO.getGlobal()), + StubValueTy(Mang->getSymbol(MO.getGlobal()), !MO.getGlobal()->hasInternalLinkage()); } else { Name.erase(Name.end()-5, Name.end()); Modified: llvm/trunk/lib/Target/X86/X86MCInstLower.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86MCInstLower.h?rev=108947&r1=108946&r2=108947&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86MCInstLower.h (original) +++ llvm/trunk/lib/Target/X86/X86MCInstLower.h Tue Jul 20 17:23:57 2010 @@ -18,22 +18,20 @@ class MCOperand; class MCSymbol; class MachineInstr; + class MachineModuleInfo; class MachineModuleInfoMachO; class MachineOperand; class Mangler; class X86AsmPrinter; - class X86Subtarget; /// X86MCInstLower - This class is used to lower an MachineInstr into an MCInst. class LLVM_LIBRARY_VISIBILITY X86MCInstLower { MCContext &Ctx; Mangler *Mang; X86AsmPrinter &AsmPrinter; - - const X86Subtarget &getSubtarget() const; + MachineModuleInfo *MMI; public: - X86MCInstLower(MCContext &ctx, Mangler *mang, X86AsmPrinter &asmprinter) - : Ctx(ctx), Mang(mang), AsmPrinter(asmprinter) {} + X86MCInstLower(MCContext &ctx, Mangler *mang, X86AsmPrinter &asmprinter); void Lower(const MachineInstr *MI, MCInst &OutMI) const; From gohman at apple.com Tue Jul 20 17:25:04 2010 From: gohman at apple.com (Dan Gohman) Date: Tue, 20 Jul 2010 22:25:04 -0000 Subject: [llvm-commits] [llvm] r108948 - in /llvm/trunk: include/llvm/Instruction.h lib/VMCore/Instruction.cpp lib/VMCore/Metadata.cpp Message-ID: <20100720222504.9F5722A6C12C@llvm.org> Author: djg Date: Tue Jul 20 17:25:04 2010 New Revision: 108948 URL: http://llvm.org/viewvc/llvm-project?rev=108948&view=rev Log: Rename removeAllMetadata to clearMetadataHashEntries and simplify it to just do the things that need to be done when an instruction is deleted. Modified: llvm/trunk/include/llvm/Instruction.h llvm/trunk/lib/VMCore/Instruction.cpp llvm/trunk/lib/VMCore/Metadata.cpp Modified: llvm/trunk/include/llvm/Instruction.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Instruction.h?rev=108948&r1=108947&r2=108948&view=diff ============================================================================== --- llvm/trunk/include/llvm/Instruction.h (original) +++ llvm/trunk/include/llvm/Instruction.h Tue Jul 20 17:25:04 2010 @@ -189,7 +189,7 @@ void getAllMetadataImpl(SmallVectorImpl > &)const; void getAllMetadataOtherThanDebugLocImpl(SmallVectorImpl > &) const; - void removeAllMetadata(); + void clearMetadataHashEntries(); public: //===--------------------------------------------------------------------===// // Predicates and helper methods. Modified: llvm/trunk/lib/VMCore/Instruction.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Instruction.cpp?rev=108948&r1=108947&r2=108948&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/Instruction.cpp (original) +++ llvm/trunk/lib/VMCore/Instruction.cpp Tue Jul 20 17:25:04 2010 @@ -49,8 +49,8 @@ // Out of line virtual method, so the vtable, etc has a home. Instruction::~Instruction() { assert(Parent == 0 && "Instruction still linked in the program!"); - if (hasMetadata()) - removeAllMetadata(); + if (hasMetadataHashEntry()) + clearMetadataHashEntries(); } Modified: llvm/trunk/lib/VMCore/Metadata.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Metadata.cpp?rev=108948&r1=108947&r2=108948&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/Metadata.cpp (original) +++ llvm/trunk/lib/VMCore/Metadata.cpp Tue Jul 20 17:25:04 2010 @@ -563,13 +563,11 @@ } -/// removeAllMetadata - Remove all metadata from this instruction. -void Instruction::removeAllMetadata() { - assert(hasMetadata() && "Caller should check"); - DbgLoc = DebugLoc(); - if (hasMetadataHashEntry()) { - getContext().pImpl->MetadataStore.erase(this); - setHasMetadataHashEntry(false); - } +/// clearMetadataHashEntries - Clear all hashtable-based metadata from +/// this instruction. +void Instruction::clearMetadataHashEntries() { + assert(hasMetadataHashEntry() && "Caller should check"); + getContext().pImpl->MetadataStore.erase(this); + setHasMetadataHashEntry(false); } From sabre at nondot.org Tue Jul 20 17:26:07 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 20 Jul 2010 22:26:07 -0000 Subject: [llvm-commits] [llvm] r108949 - in /llvm/trunk/lib/Target/X86: X86MCInstLower.cpp X86MCInstLower.h Message-ID: <20100720222607.57C822A6C12C@llvm.org> Author: lattner Date: Tue Jul 20 17:26:07 2010 New Revision: 108949 URL: http://llvm.org/viewvc/llvm-project?rev=108949&view=rev Log: pass around MF, not MMI. Modified: llvm/trunk/lib/Target/X86/X86MCInstLower.cpp llvm/trunk/lib/Target/X86/X86MCInstLower.h Modified: llvm/trunk/lib/Target/X86/X86MCInstLower.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86MCInstLower.cpp?rev=108949&r1=108948&r2=108949&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86MCInstLower.cpp (original) +++ llvm/trunk/lib/Target/X86/X86MCInstLower.cpp Tue Jul 20 17:26:07 2010 @@ -30,17 +30,17 @@ X86MCInstLower::X86MCInstLower(MCContext &ctx, Mangler *mang, X86AsmPrinter &asmprinter) -: Ctx(ctx), Mang(mang), AsmPrinter(asmprinter), MMI(AsmPrinter.MMI) {} +: Ctx(ctx), Mang(mang), AsmPrinter(asmprinter), MF(*AsmPrinter.MF) {} MachineModuleInfoMachO &X86MCInstLower::getMachOMMI() const { - return MMI->getObjFileInfo(); + return MF.getMMI().getObjFileInfo(); } MCSymbol *X86MCInstLower::GetPICBaseSymbol() const { const TargetLowering *TLI = AsmPrinter.TM.getTargetLowering(); return static_cast(TLI)-> - getPICBaseSymbol(AsmPrinter.MF, Ctx); + getPICBaseSymbol(&MF, Ctx); } /// GetSymbolFromOperand - Lower an MO_GlobalAddress or MO_ExternalSymbol Modified: llvm/trunk/lib/Target/X86/X86MCInstLower.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86MCInstLower.h?rev=108949&r1=108948&r2=108949&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86MCInstLower.h (original) +++ llvm/trunk/lib/Target/X86/X86MCInstLower.h Tue Jul 20 17:26:07 2010 @@ -18,7 +18,7 @@ class MCOperand; class MCSymbol; class MachineInstr; - class MachineModuleInfo; + class MachineFunction; class MachineModuleInfoMachO; class MachineOperand; class Mangler; @@ -29,7 +29,7 @@ MCContext &Ctx; Mangler *Mang; X86AsmPrinter &AsmPrinter; - MachineModuleInfo *MMI; + const MachineFunction &MF; public: X86MCInstLower(MCContext &ctx, Mangler *mang, X86AsmPrinter &asmprinter); From espindola at google.com Tue Jul 20 17:29:20 2010 From: espindola at google.com (Rafael Espindola) Date: Tue, 20 Jul 2010 18:29:20 -0400 Subject: [llvm-commits] [patch] Fix calling convention on ARM if vfp2+ is enabled Message-ID: If vfp2 or newer is enabled, f64 is legal and we have to shadow r1 when a double is assigned to r2. This was already handle correctly when f64 was being split, this patch adds the case where it is legal. I changed which registers are "shadowed". My understanding is that when a f64 is assigned to r2/r3, register r1 is the one shadowed. Registers r2 and r3 are simply used. That is the meaning used on the .td file. Should I change the .td? Cheers, -- Rafael ?vila de Esp?ndola -------------- next part -------------- A non-text attachment was scrubbed... Name: cc.patch Type: text/x-patch Size: 2540 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20100720/a53db593/attachment.bin From sabre at nondot.org Tue Jul 20 17:30:53 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 20 Jul 2010 22:30:53 -0000 Subject: [llvm-commits] [llvm] r108950 - in /llvm/trunk/lib/Target/X86: X86MCInstLower.cpp X86MCInstLower.h Message-ID: <20100720223053.DB68C2A6C12C@llvm.org> Author: lattner Date: Tue Jul 20 17:30:53 2010 New Revision: 108950 URL: http://llvm.org/viewvc/llvm-project?rev=108950&view=rev Log: reduce X86MCInstLower dependencies on asmprinter. Modified: llvm/trunk/lib/Target/X86/X86MCInstLower.cpp llvm/trunk/lib/Target/X86/X86MCInstLower.h Modified: llvm/trunk/lib/Target/X86/X86MCInstLower.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86MCInstLower.cpp?rev=108950&r1=108949&r2=108950&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86MCInstLower.cpp (original) +++ llvm/trunk/lib/Target/X86/X86MCInstLower.cpp Tue Jul 20 17:30:53 2010 @@ -29,8 +29,10 @@ using namespace llvm; X86MCInstLower::X86MCInstLower(MCContext &ctx, Mangler *mang, - X86AsmPrinter &asmprinter) -: Ctx(ctx), Mang(mang), AsmPrinter(asmprinter), MF(*AsmPrinter.MF) {} + X86AsmPrinter &asmprinter, + const TargetMachine &tm) +: Ctx(ctx), Mang(mang), AsmPrinter(asmprinter), MF(*AsmPrinter.MF), + TM(tm), MAI(*TM.getMCAsmInfo()) {} MachineModuleInfoMachO &X86MCInstLower::getMachOMMI() const { return MF.getMMI().getObjFileInfo(); @@ -38,8 +40,7 @@ MCSymbol *X86MCInstLower::GetPICBaseSymbol() const { - const TargetLowering *TLI = AsmPrinter.TM.getTargetLowering(); - return static_cast(TLI)-> + return static_cast(TM.getTargetLowering())-> getPICBaseSymbol(&MF, Ctx); } @@ -53,7 +54,7 @@ if (!MO.isGlobal()) { assert(MO.isSymbol()); - Name += AsmPrinter.MAI->getGlobalPrefix(); + Name += MAI.getGlobalPrefix(); Name += MO.getSymbolName(); } else { const GlobalValue *GV = MO.getGlobal(); @@ -175,7 +176,7 @@ Expr = MCBinaryExpr::CreateSub(Expr, MCSymbolRefExpr::Create(GetPICBaseSymbol(), Ctx), Ctx); - if (MO.isJTI() && AsmPrinter.MAI->hasSetDirective()) { + if (MO.isJTI() && MAI.hasSetDirective()) { // If .set directive is supported, use it to reduce the number of // relocations the assembler will generate for differences between // local labels. This is only safe when the symbols are in the same @@ -504,7 +505,7 @@ void X86AsmPrinter::EmitInstruction(const MachineInstr *MI) { - X86MCInstLower MCInstLowering(OutContext, Mang, *this); + X86MCInstLower MCInstLowering(OutContext, Mang, *this, TM); switch (MI->getOpcode()) { case TargetOpcode::DBG_VALUE: if (isVerbose() && OutStreamer.hasRawTextSupport()) { Modified: llvm/trunk/lib/Target/X86/X86MCInstLower.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86MCInstLower.h?rev=108950&r1=108949&r2=108950&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86MCInstLower.h (original) +++ llvm/trunk/lib/Target/X86/X86MCInstLower.h Tue Jul 20 17:30:53 2010 @@ -13,6 +13,7 @@ #include "llvm/Support/Compiler.h" namespace llvm { + class MCAsmInfo; class MCContext; class MCInst; class MCOperand; @@ -22,6 +23,7 @@ class MachineModuleInfoMachO; class MachineOperand; class Mangler; + class TargetMachine; class X86AsmPrinter; /// X86MCInstLower - This class is used to lower an MachineInstr into an MCInst. @@ -30,8 +32,11 @@ Mangler *Mang; X86AsmPrinter &AsmPrinter; const MachineFunction &MF; + const TargetMachine &TM; + const MCAsmInfo &MAI; public: - X86MCInstLower(MCContext &ctx, Mangler *mang, X86AsmPrinter &asmprinter); + X86MCInstLower(MCContext &ctx, Mangler *mang, X86AsmPrinter &asmprinter, + const TargetMachine &TM); void Lower(const MachineInstr *MI, MCInst &OutMI) const; From dpatel at apple.com Tue Jul 20 17:34:59 2010 From: dpatel at apple.com (Devang Patel) Date: Tue, 20 Jul 2010 15:34:59 -0700 Subject: [llvm-commits] [llvm] r108948 - in /llvm/trunk: include/llvm/Instruction.h lib/VMCore/Instruction.cpp lib/VMCore/Metadata.cpp In-Reply-To: <20100720222504.9F5722A6C12C@llvm.org> References: <20100720222504.9F5722A6C12C@llvm.org> Message-ID: <33959A0C-F24E-44A9-BB2C-C3433505CB0A@apple.com> On Jul 20, 2010, at 3:25 PM, Dan Gohman wrote: > Author: djg > Date: Tue Jul 20 17:25:04 2010 > New Revision: 108948 > > URL: http://llvm.org/viewvc/llvm-project?rev=108948&view=rev > Log: > Rename removeAllMetadata to clearMetadataHashEntries and simplify > it to just do the things that need to be done when an instruction > is deleted. > > Modified: > llvm/trunk/include/llvm/Instruction.h > llvm/trunk/lib/VMCore/Instruction.cpp > llvm/trunk/lib/VMCore/Metadata.cpp > > Modified: llvm/trunk/include/llvm/Instruction.h > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Instruction.h?rev=108948&r1=108947&r2=108948&view=diff > ============================================================================== > --- llvm/trunk/include/llvm/Instruction.h (original) > +++ llvm/trunk/include/llvm/Instruction.h Tue Jul 20 17:25:04 2010 > @@ -189,7 +189,7 @@ > void getAllMetadataImpl(SmallVectorImpl > &)const; > void getAllMetadataOtherThanDebugLocImpl(SmallVectorImpl MDNode*> > &) const; > - void removeAllMetadata(); > + void clearMetadataHashEntries(); > public: > //===--------------------------------------------------------------------===// > // Predicates and helper methods. > > Modified: llvm/trunk/lib/VMCore/Instruction.cpp > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Instruction.cpp?rev=108948&r1=108947&r2=108948&view=diff > ============================================================================== > --- llvm/trunk/lib/VMCore/Instruction.cpp (original) > +++ llvm/trunk/lib/VMCore/Instruction.cpp Tue Jul 20 17:25:04 2010 > @@ -49,8 +49,8 @@ > // Out of line virtual method, so the vtable, etc has a home. > Instruction::~Instruction() { > assert(Parent == 0 && "Instruction still linked in the program!"); > - if (hasMetadata()) > - removeAllMetadata(); > + if (hasMetadataHashEntry()) > + clearMetadataHashEntries(); > } > > > > Modified: llvm/trunk/lib/VMCore/Metadata.cpp > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Metadata.cpp?rev=108948&r1=108947&r2=108948&view=diff > ============================================================================== > --- llvm/trunk/lib/VMCore/Metadata.cpp (original) > +++ llvm/trunk/lib/VMCore/Metadata.cpp Tue Jul 20 17:25:04 2010 > @@ -563,13 +563,11 @@ > } > > > -/// removeAllMetadata - Remove all metadata from this instruction. > -void Instruction::removeAllMetadata() { > - assert(hasMetadata() && "Caller should check"); > - DbgLoc = DebugLoc(); > - if (hasMetadataHashEntry()) { > - getContext().pImpl->MetadataStore.erase(this); > - setHasMetadataHashEntry(false); > - } > +/// clearMetadataHashEntries - Clear all hashtable-based metadata from > +/// this instruction. > +void Instruction::clearMetadataHashEntries() { > + assert(hasMetadataHashEntry() && "Caller should check"); > + getContext().pImpl->MetadataStore.erase(this); > + setHasMetadataHashEntry(false); > } Please reset DbgLoc also. - Devang From sabre at nondot.org Tue Jul 20 17:35:40 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 20 Jul 2010 22:35:40 -0000 Subject: [llvm-commits] [llvm] r108952 - in /llvm/trunk/lib/Target/X86: X86MCInstLower.cpp X86MCInstLower.h Message-ID: <20100720223540.666062A6C12C@llvm.org> Author: lattner Date: Tue Jul 20 17:35:40 2010 New Revision: 108952 URL: http://llvm.org/viewvc/llvm-project?rev=108952&view=rev Log: continue pushing dependencies around. Modified: llvm/trunk/lib/Target/X86/X86MCInstLower.cpp llvm/trunk/lib/Target/X86/X86MCInstLower.h Modified: llvm/trunk/lib/Target/X86/X86MCInstLower.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86MCInstLower.cpp?rev=108952&r1=108951&r2=108952&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86MCInstLower.cpp (original) +++ llvm/trunk/lib/Target/X86/X86MCInstLower.cpp Tue Jul 20 17:35:40 2010 @@ -29,10 +29,10 @@ using namespace llvm; X86MCInstLower::X86MCInstLower(MCContext &ctx, Mangler *mang, - X86AsmPrinter &asmprinter, - const TargetMachine &tm) -: Ctx(ctx), Mang(mang), AsmPrinter(asmprinter), MF(*AsmPrinter.MF), - TM(tm), MAI(*TM.getMCAsmInfo()) {} + const MachineFunction &mf, + X86AsmPrinter &asmprinter) +: Ctx(ctx), Mang(mang), MF(mf), TM(mf.getTarget()), MAI(*TM.getMCAsmInfo()), + AsmPrinter(asmprinter) {} MachineModuleInfoMachO &X86MCInstLower::getMachOMMI() const { return MF.getMMI().getObjFileInfo(); @@ -505,7 +505,7 @@ void X86AsmPrinter::EmitInstruction(const MachineInstr *MI) { - X86MCInstLower MCInstLowering(OutContext, Mang, *this, TM); + X86MCInstLower MCInstLowering(OutContext, Mang, *MF, *this); switch (MI->getOpcode()) { case TargetOpcode::DBG_VALUE: if (isVerbose() && OutStreamer.hasRawTextSupport()) { Modified: llvm/trunk/lib/Target/X86/X86MCInstLower.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86MCInstLower.h?rev=108952&r1=108951&r2=108952&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86MCInstLower.h (original) +++ llvm/trunk/lib/Target/X86/X86MCInstLower.h Tue Jul 20 17:35:40 2010 @@ -30,13 +30,14 @@ class LLVM_LIBRARY_VISIBILITY X86MCInstLower { MCContext &Ctx; Mangler *Mang; - X86AsmPrinter &AsmPrinter; const MachineFunction &MF; const TargetMachine &TM; const MCAsmInfo &MAI; + + X86AsmPrinter &AsmPrinter; public: - X86MCInstLower(MCContext &ctx, Mangler *mang, X86AsmPrinter &asmprinter, - const TargetMachine &TM); + X86MCInstLower(MCContext &ctx, Mangler *mang, const MachineFunction &MF, + X86AsmPrinter &asmprinter); void Lower(const MachineInstr *MI, MCInst &OutMI) const; From gclayton at apple.com Tue Jul 20 17:36:00 2010 From: gclayton at apple.com (Greg Clayton) Date: Tue, 20 Jul 2010 22:36:00 -0000 Subject: [llvm-commits] [llvm] r108953 - /llvm/trunk/include/llvm/Support/MachO.h Message-ID: <20100720223600.C4BE72A6C12C@llvm.org> Author: gclayton Date: Tue Jul 20 17:36:00 2010 New Revision: 108953 URL: http://llvm.org/viewvc/llvm-project?rev=108953&view=rev Log: Added support to MachO.h for many defines and structures that are needed to Parse mach-o files. All defines have been renamed to not conflict with #defines in mach header files, all structures were left named the same but are in the llvm::MachO namespace. Modified: llvm/trunk/include/llvm/Support/MachO.h Modified: llvm/trunk/include/llvm/Support/MachO.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/MachO.h?rev=108953&r1=108952&r2=108953&view=diff ============================================================================== --- llvm/trunk/include/llvm/Support/MachO.h (original) +++ llvm/trunk/include/llvm/Support/MachO.h Tue Jul 20 17:36:00 2010 @@ -14,11 +14,649 @@ #ifndef LLVM_SUPPORT_MACHO_H #define LLVM_SUPPORT_MACHO_H +#include + // NOTE: The enums in this file are intentially named to be different than those // in the headers in /usr/include/mach (on darwin systems) to avoid conflicts // with those macros. namespace llvm { namespace MachO { + // Enums from + enum { + // Constants for the "magic" field in llvm::MachO::mach_header and + // llvm::MachO::mach_header_64 + HeaderMagic32 = 0xFEEDFACEu, // MH_MAGIC + HeaderMagic32Swapped = 0xCEFAEDFEu, // MH_CIGAM + HeaderMagic64 = 0xFEEDFACFu, // MH_MAGIC_64 + HeaderMagic64Swapped = 0xCFFAEDFEu, // MH_CIGAM_64 + UniversalMagic = 0xCAFEBABEu, // FAT_MAGIC + UniversalMagicSwapped = 0xBEBAFECAu, // FAT_CIGAM + + // Constants for the "filetype" field in llvm::MachO::mach_header and + // llvm::MachO::mach_header_64 + HeaderFileTypeObject = 0x1u, // MH_OBJECT + HeaderFileTypeExecutable = 0x2u, // MH_EXECUTE + HeaderFileTypeFixedVMShlib = 0x3u, // MH_FVMLIB + HeaderFileTypeCore = 0x4u, // MH_CORE + HeaderFileTypePreloadedExecutable = 0x5u, // MH_PRELOAD + HeaderFileTypeDynamicShlib = 0x6u, // MH_DYLIB + HeaderFileTypeDynamicLinkEditor = 0x7u, // MH_DYLINKER + HeaderFileTypeBundle = 0x8u, // MH_BUNDLE + HeaderFileTypeDynamicShlibStub = 0x9u, // MH_DYLIB_STUB + HeaderFileTypeDSYM = 0xAu, // MH_DSYM + HeaderFileTypeKextBundle = 0xBu, // MH_KEXT_BUNDLE + + // Constant bits for the "flags" field in llvm::MachO::mach_header and + // llvm::MachO::mach_header_64 + HeaderFlagBitNoUndefinedSymbols = 0x00000001u, // MH_NOUNDEFS + HeaderFlagBitIsIncrementalLinkObject= 0x00000002u, // MH_INCRLINK + HeaderFlagBitIsDynamicLinkObject = 0x00000004u, // MH_DYLDLINK + HeaderFlagBitBindAtLoad = 0x00000008u, // MH_BINDATLOAD + HeaderFlagBitPrebound = 0x00000010u, // MH_PREBOUND + HeaderFlagBitSplitSegments = 0x00000020u, // MH_SPLIT_SEGS + HeaderFlagBitLazyInit = 0x00000040u, // MH_LAZY_INIT + HeaderFlagBitTwoLevelNamespace = 0x00000080u, // MH_TWOLEVEL + HeaderFlagBitForceFlatNamespace = 0x00000100u, // MH_FORCE_FLAT + HeaderFlagBitNoMultipleDefintions = 0x00000200u, // MH_NOMULTIDEFS + HeaderFlagBitNoFixPrebinding = 0x00000400u, // MH_NOFIXPREBINDING + HeaderFlagBitPrebindable = 0x00000800u, // MH_PREBINDABLE + HeaderFlagBitAllModulesBound = 0x00001000u, // MH_ALLMODSBOUND + HeaderFlagBitSubsectionsViaSymbols = 0x00002000u, // MH_SUBSECTIONS_VIA_SYMBOLS + HeaderFlagBitCanonical = 0x00004000u, // MH_CANONICAL + HeaderFlagBitWeakDefines = 0x00008000u, // MH_WEAK_DEFINES + HeaderFlagBitBindsToWeak = 0x00010000u, // MH_BINDS_TO_WEAK + HeaderFlagBitAllowStackExecution = 0x00020000u, // MH_ALLOW_STACK_EXECUTION + HeaderFlagBitRootSafe = 0x00040000u, // MH_ROOT_SAFE + HeaderFlagBitSetUIDSafe = 0x00080000u, // MH_SETUID_SAFE + HeaderFlagBitNoReexportedDylibs = 0x00100000u, // MH_NO_REEXPORTED_DYLIBS + HeaderFlagBitPIE = 0x00200000u, // MH_PIE + HeaderFlagBitDeadStrippableDylib = 0x00400000u, // MH_DEAD_STRIPPABLE_DYLIB + + // Constants for the "cmd" field in llvm::MachO::load_command + LoadCommandDynamicLinkerRequired = 0x80000000u, // LC_REQ_DYLD + LoadCommandSegment32 = 0x00000001u, // LC_SEGMENT + LoadCommandSymtab = 0x00000002u, // LC_SYMTAB + LoadCommandSymSeg = 0x00000003u, // LC_SYMSEG + LoadCommandThread = 0x00000004u, // LC_THREAD + LoadCommandUnixThread = 0x00000005u, // LC_UNIXTHREAD + LoadCommandFixedVMShlibLoad = 0x00000006u, // LC_LOADFVMLIB + LoadCommandFixedVMShlibIdent = 0x00000007u, // LC_IDFVMLIB + LoadCommandIdent = 0x00000008u, // LC_IDENT + LoadCommandFixedVMFileInclusion = 0x00000009u, // LC_FVMFILE + LoadCommandPrePage = 0x0000000Au, // LC_PREPAGE + LoadCommandDynamicSymtabInfo = 0x0000000Bu, // LC_DYSYMTAB + LoadCommandDylibLoad = 0x0000000Cu, // LC_LOAD_DYLIB + LoadCommandDylibIdent = 0x0000000Du, // LC_ID_DYLIB + LoadCommandDynamicLinkerLoad = 0x0000000Eu, // LC_LOAD_DYLINKER + LoadCommandDynamicLinkerIdent = 0x0000000Fu, // LC_ID_DYLINKER + LoadCommandDylibPrebound = 0x00000010u, // LC_PREBOUND_DYLIB + LoadCommandRoutines32 = 0x00000011u, // LC_ROUTINES + LoadCommandSubFramework = 0x00000012u, // LC_SUB_FRAMEWORK + LoadCommandSubUmbrella = 0x00000013u, // LC_SUB_UMBRELLA + LoadCommandSubClient = 0x00000014u, // LC_SUB_CLIENT + LoadCommandSubLibrary = 0x00000015u, // LC_SUB_LIBRARY + LoadCommandTwoLevelHints = 0x00000016u, // LC_TWOLEVEL_HINTS + LoadCommandPreBindChecksum = 0x00000017u, // LC_PREBIND_CKSUM + LoadCommandDylibLoadWeak = 0x80000018u, // LC_LOAD_WEAK_DYLIB + LoadCommandSegment64 = 0x00000019u, // LC_SEGMENT_64 + LoadCommandRoutines64 = 0x0000001Au, // LC_ROUTINES_64 + LoadCommandUUID = 0x0000001Bu, // LC_UUID + LoadCommandRunpath = 0x8000001Cu, // LC_RPATH + LoadCommandCodeSignature = 0x0000001Du, // LC_CODE_SIGNATURE + LoadCommandSegmentSplitInfo = 0x0000001Eu, // LC_SEGMENT_SPLIT_INFO + LoadCommandDylibReexport = 0x8000001Fu, // LC_REEXPORT_DYLIB + LoadCommandDylibLazyLoad = 0x00000020u, // LC_LAZY_LOAD_DYLIB + LoadCommandEncryptionInfo = 0x00000021u, // LC_ENCRYPTION_INFO + LoadCommandDynamicLinkerInfo = 0x00000022u, // LC_DYLD_INFO + LoadCommandDynamicLinkerInfoOnly = 0x80000022u, // LC_DYLD_INFO_ONLY + LoadCommandDylibLoadUpward = 0x80000023u, // LC_LOAD_UPWARD_DYLIB + + // Constant bits for the "flags" field in llvm::MachO::segment_command + SegmentCommandFlagBitHighVM = 0x1u, // SG_HIGHVM + SegmentCommandFlagBitFixedVMLibrary = 0x2u, // SG_FVMLIB + SegmentCommandFlagBitNoRelocations = 0x4u, // SG_NORELOC + SegmentCommandFlagBitProtectedVersion1 = 0x8u, // SG_PROTECTED_VERSION_1 + + + // Constant masks for the "flags" field in llvm::MachO::section and + // llvm::MachO::section_64 + SectionFlagMaskSectionType = 0x000000ffu, // SECTION_TYPE + SectionFlagMaskAllAttributes = 0xffffff00u, // SECTION_ATTRIBUTES + SectionFlagMaskUserAttributes = 0xff000000u, // SECTION_ATTRIBUTES_USR + SectionFlagMaskSystemAttributes = 0x00ffff00u, // SECTION_ATTRIBUTES_SYS + + // Constant masks for the "flags[7:0]" field in llvm::MachO::section and + // llvm::MachO::section_64 (mask "flags" with SECTION_TYPE) + SectionTypeRegular = 0x00u, // S_REGULAR + SectionTypeZeroFill = 0x01u, // S_ZEROFILL + SectionTypeCStringLiterals = 0x02u, // S_CSTRING_LITERALS + SectionType4ByteLiterals = 0x03u, // S_4BYTE_LITERALS + SectionType8ByteLiterals = 0x04u, // S_8BYTE_LITERALS + SectionTypeLiteralPointers = 0x05u, // S_LITERAL_POINTERS + SectionTypeNonLazySymbolPointers = 0x06u, // S_NON_LAZY_SYMBOL_POINTERS + SectionTypeLazySymbolPointers = 0x07u, // S_LAZY_SYMBOL_POINTERS + SectionTypeSymbolStubs = 0x08u, // S_SYMBOL_STUBS + SectionTypeModuleInitFunctionPointers = 0x09u, // S_MOD_INIT_FUNC_POINTERS + SectionTypeModuleTermFunctionPointers = 0x0au, // S_MOD_TERM_FUNC_POINTERS + SectionTypeCoalesced = 0x0bu, // S_COALESCED + SectionTypeZeroFillLarge = 0x0cu, // S_GB_ZEROFILL + SectionTypeInterposing = 0x0du, // S_INTERPOSING + SectionType16ByteLiterals = 0x0eu, // S_16BYTE_LITERALS + SectionTypeDTraceObjectFormat = 0x0fu, // S_DTRACE_DOF + SectionTypeLazyDylibSymbolPointers = 0x10u, // S_LAZY_DYLIB_SYMBOL_POINTERS + + // Constant masks for the "flags[31:24]" field in llvm::MachO::section and + // llvm::MachO::section_64 (mask "flags" with SECTION_ATTRIBUTES_USR) + SectionAttrUserPureInstructions = 0x80000000u, // S_ATTR_PURE_INSTRUCTIONS + SectionAttrUserNoTableOfContents = 0x40000000u, // S_ATTR_NO_TOC + SectionAttrUserCanStripStaticSymbols = 0x20000000u, // S_ATTR_STRIP_STATIC_SYMS + SectionAttrUserNoDeadStrip = 0x10000000u, // S_ATTR_NO_DEAD_STRIP + SectionAttrUserLiveSupport = 0x08000000u, // S_ATTR_LIVE_SUPPORT + SectionAttrUserSelfModifyingCode = 0x04000000u, // S_ATTR_SELF_MODIFYING_CODE + SectionAttrUserDebug = 0x02000000u, // S_ATTR_DEBUG + + // Constant masks for the "flags[23:8]" field in llvm::MachO::section and + // llvm::MachO::section_64 (mask "flags" with SECTION_ATTRIBUTES_SYS) + SectionAttrSytemSomeInstructions = 0x00000400u, // S_ATTR_SOME_INSTRUCTIONS + SectionAttrSytemHasExternalRelocations= 0x00000200u, // S_ATTR_EXT_RELOC + SectionAttrSytemHasLocalRelocations = 0x00000100u, // S_ATTR_LOC_RELOC + + IndirectSymbolLocal = 0x80000000u, // INDIRECT_SYMBOL_LOCAL + IndirectSymbolAbsolute = 0x40000000u, // INDIRECT_SYMBOL_ABS + + RebaseTypePointer = 1u, // REBASE_TYPE_POINTER + RebaseTypeTextAbsolute32 = 2u, // REBASE_TYPE_TEXT_ABSOLUTE32 + RebaseTypeTextPCRelative32 = 3u, // REBASE_TYPE_TEXT_PCREL32 + + RebaseOpcodeMask = 0xF0u, // REBASE_OPCODE_MASK + RebaseImmediateMask = 0x0Fu, // REBASE_IMMEDIATE_MASK + RebaseOpcodeDone = 0x00u, // REBASE_OPCODE_DONE + RebaseOpcodeSetTypeImmediate = 0x10u, // REBASE_OPCODE_SET_TYPE_IMM + RebaseOpcodeSetSegmentAndOffsetULEB = 0x20u, // REBASE_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB + RebaseOpcodeAddAddressULEB = 0x30u, // REBASE_OPCODE_ADD_ADDR_ULEB + RebaseOpcodeAddAddressImmediateScaled = 0x40u, // REBASE_OPCODE_ADD_ADDR_IMM_SCALED + RebaseOpcodeDoRebaseImmediateTimes = 0x50u, // REBASE_OPCODE_DO_REBASE_IMM_TIMES + RebaseOpcodeDoRebaseULEBTimes = 0x60u, // REBASE_OPCODE_DO_REBASE_ULEB_TIMES + RebaseOpcodeDoRebaseAddAddressULEB = 0x70u, // REBASE_OPCODE_DO_REBASE_ADD_ADDR_ULEB + RebaseOpcodeDoRebaseULEBTimesSkippingULEB = 0x80u, // REBASE_OPCODE_DO_REBASE_ULEB_TIMES_SKIPPING_ULEB + + + BindTypePointer = 1u, // BIND_TYPE_POINTER + BindTypeTextAbsolute32 = 2u, // BIND_TYPE_TEXT_ABSOLUTE32 + BindTypeTextPCRelative32 = 3u, // BIND_TYPE_TEXT_PCREL32 + + BindSpecialDylibSelf = 0u, // BIND_SPECIAL_DYLIB_SELF + BindSpecialDylibMainExecutable = -1u, // BIND_SPECIAL_DYLIB_MAIN_EXECUTABLE + BindSpecialDylibFlatLookup = -2u, // BIND_SPECIAL_DYLIB_FLAT_LOOKUP + + BindSymbolFlagsWeakImport = 0x1u, // BIND_SYMBOL_FLAGS_WEAK_IMPORT + BindSymbolFlagsNonWeakDefinition = 0x8u, // BIND_SYMBOL_FLAGS_NON_WEAK_DEFINITION + + BindOpcodeMask = 0xF0u, // BIND_OPCODE_MASK + BindImmediateMask = 0x0Fu, // BIND_IMMEDIATE_MASK + BindOpcodeDone = 0x00u, // BIND_OPCODE_DONE + BindOpcodeSetDylibOrdinalImmediate = 0x10u, // BIND_OPCODE_SET_DYLIB_ORDINAL_IMM + BindOpcodeSetDylibOrdinalULEB = 0x20u, // BIND_OPCODE_SET_DYLIB_ORDINAL_ULEB + BindOpcodeSetDylibSpecialImmediate = 0x30u, // BIND_OPCODE_SET_DYLIB_SPECIAL_IMM + BindOpcodeSetSymbolTrailingFlagsImmediate = 0x40u, // BIND_OPCODE_SET_SYMBOL_TRAILING_FLAGS_IMM + BindOpcodeSetTypeImmediate = 0x50u, // BIND_OPCODE_SET_TYPE_IMM + BindOpcodeSetAppendSLEB = 0x60u, // BIND_OPCODE_SET_ADDEND_SLEB + BindOpcodeSetSegmentAndOffsetULEB = 0x70u, // BIND_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB + BindOpcodeAddAddressULEB = 0x80u, // BIND_OPCODE_ADD_ADDR_ULEB + BindOpcodeDoBind = 0x90u, // BIND_OPCODE_DO_BIND + BindOpcodeDoBindAddAddressULEB = 0xA0u, // BIND_OPCODE_DO_BIND_ADD_ADDR_ULEB + BindOpcodeDoBindAddAddressImmediateScaled = 0xB0u, // BIND_OPCODE_DO_BIND_ADD_ADDR_IMM_SCALED + BindOpcodeDoBindULEBTimesSkippingULEB = 0xC0u, // BIND_OPCODE_DO_BIND_ULEB_TIMES_SKIPPING_ULEB + + ExportSymbolFlagsKindMask = 0x03u, // EXPORT_SYMBOL_FLAGS_KIND_MASK + ExportSymbolFlagsKindRegular = 0x00u, // EXPORT_SYMBOL_FLAGS_KIND_REGULAR + ExportSymbolFlagsKindThreadLocal = 0x01u, // EXPORT_SYMBOL_FLAGS_KIND_THREAD_LOCAL + ExportSymbolFlagsWeakDefinition = 0x04u, // EXPORT_SYMBOL_FLAGS_WEAK_DEFINITION + ExportSymbolFlagsIndirectDefinition = 0x08u, // EXPORT_SYMBOL_FLAGS_INDIRECT_DEFINITION + ExportSymbolFlagsHasSpecializations = 0x10u, // EXPORT_SYMBOL_FLAGS_HAS_SPECIALIZATIONS + + + // Constant masks for the "n_type" field in llvm::MachO::nlist and + // llvm::MachO::nlist_64 + NlistMaskStab = 0xe0, // N_STAB + NlistMaskPrivateExternal = 0x10, // N_PEXT + NlistMaskType = 0x0e, // N_TYPE + NlistMaskExternal = 0x01, // N_EXT + + // Constants for the "n_type & N_TYPE" llvm::MachO::nlist and + // llvm::MachO::nlist_64 + NListTypeUndefined = 0x0u, // N_UNDF + NListTypeAbsolute = 0x2u, // N_ABS + NListTypeSection = 0xeu, // N_SECT + NListTypePreboundUndefined = 0xcu, // N_PBUD + NListTypeIndirect = 0xau, // N_INDR + + // Constant masks for the "n_sect" field in llvm::MachO::nlist and + // llvm::MachO::nlist_64 + NListSectionNoSection = 0u, // NO_SECT + NListSectionMaxSection = 0xffu, // MAX_SECT + + // Constant values for the "n_type" field in llvm::MachO::nlist and + // llvm::MachO::nlist_64 when "(n_type & NlistMaskStab) != 0" + StabGlobalSymbol = 0x20u, // N_GSYM + StabFunctionName = 0x22u, // N_FNAME + StabFunction = 0x24u, // N_FUN + StabStaticSymbol = 0x26u, // N_STSYM + StabLocalCommon = 0x28u, // N_LCSYM + StabBeginSymbol = 0x2Eu, // N_BNSYM + StabSourceFileOptions = 0x3Cu, // N_OPT + StabRegisterSymbol = 0x40u, // N_RSYM + StabSourceLine = 0x44u, // N_SLINE + StabEndSymbol = 0x4Eu, // N_ENSYM + StabStructureType = 0x60u, // N_SSYM + StabSourceFileName = 0x64u, // N_SO + StabObjectFileName = 0x66u, // N_OSO + StabLocalSymbol = 0x80u, // N_LSYM + StabBeginIncludeFileName = 0x82u, // N_BINCL + StabIncludeFileName = 0x84u, // N_SOL + StabCompilerParameters = 0x86u, // N_PARAMS + StabCompilerVersion = 0x88u, // N_VERSION + StabCompilerOptLevel = 0x8Au, // N_OLEVEL + StabParameter = 0xA0u, // N_PSYM + StabEndIncludeFile = 0xA2u, // N_EINCL + StabAlternateEntry = 0xA4u, // N_ENTRY + StabLeftBracket = 0xC0u, // N_LBRAC + StabDeletedIncludeFile = 0xC2u, // N_EXCL + StabRightBracket = 0xE0u, // N_RBRAC + StabBeginCommon = 0xE2u, // N_BCOMM + StabEndCommon = 0xE4u, // N_ECOMM + StabEndCommonLocal = 0xE8u, // N_ECOML + StabLength = 0xFEu // N_LENG + + }; + + // Structs from + + struct mach_header { + uint32_t magic; + uint32_t cputype; + uint32_t cpusubtype; + uint32_t filetype; + uint32_t ncmds; + uint32_t sizeofcmds; + uint32_t flags; + }; + + struct mach_header_64 { + uint32_t magic; + uint32_t cputype; + uint32_t cpusubtype; + uint32_t filetype; + uint32_t ncmds; + uint32_t sizeofcmds; + uint32_t flags; + uint32_t reserved; + }; + + struct load_command { + uint32_t cmd; + uint32_t cmdsize; + }; + + struct segment_command { + uint32_t cmd; + uint32_t cmdsize; + char segname[16]; + uint32_t vmaddr; + uint32_t vmsize; + uint32_t fileoff; + uint32_t filesize; + uint32_t maxprot; + uint32_t initprot; + uint32_t nsects; + uint32_t flags; + }; + + struct segment_command_64 { + uint32_t cmd; + uint32_t cmdsize; + char segname[16]; + uint64_t vmaddr; + uint64_t vmsize; + uint64_t fileoff; + uint64_t filesize; + uint32_t maxprot; + uint32_t initprot; + uint32_t nsects; + uint32_t flags; + }; + + struct section { + char sectname[16]; + char segname[16]; + uint32_t addr; + uint32_t size; + uint32_t offset; + uint32_t align; + uint32_t reloff; + uint32_t nreloc; + uint32_t flags; + uint32_t reserved1; + uint32_t reserved2; + }; + + struct section_64 { + char sectname[16]; + char segname[16]; + uint64_t addr; + uint64_t size; + uint32_t offset; + uint32_t align; + uint32_t reloff; + uint32_t nreloc; + uint32_t flags; + uint32_t reserved1; + uint32_t reserved2; + uint32_t reserved3; + }; + + struct fvmlib { + uint32_t name; + uint32_t minor_version; + uint32_t header_addr; + }; + + struct fvmlib_command { + uint32_t cmd; + uint32_t cmdsize; + struct fvmlib fvmlib; + }; + + struct dylib { + uint32_t name; + uint32_t timestamp; + uint32_t current_version; + uint32_t compatibility_version; + }; + + struct dylib_command { + uint32_t cmd; + uint32_t cmdsize; + struct dylib dylib; + }; + + struct sub_framework_command { + uint32_t cmd; + uint32_t cmdsize; + uint32_t umbrella; + }; + + struct sub_client_command { + uint32_t cmd; + uint32_t cmdsize; + uint32_t client; + }; + + struct sub_umbrella_command { + uint32_t cmd; + uint32_t cmdsize; + uint32_t sub_umbrella; + }; + + struct sub_library_command { + uint32_t cmd; + uint32_t cmdsize; + uint32_t sub_library; + }; + + struct prebound_dylib_command { + uint32_t cmd; + uint32_t cmdsize; + uint32_t name; + uint32_t nmodules; + uint32_t linked_modules; + }; + + struct dylinker_command { + uint32_t cmd; + uint32_t cmdsize; + uint32_t name; + }; + + struct thread_command { + uint32_t cmd; + uint32_t cmdsize; + }; + + struct routines_command { + uint32_t cmd; + uint32_t cmdsize; + uint32_t init_address; + uint32_t init_module; + uint32_t reserved1; + uint32_t reserved2; + uint32_t reserved3; + uint32_t reserved4; + uint32_t reserved5; + uint32_t reserved6; + }; + + struct routines_command_64 { + uint32_t cmd; + uint32_t cmdsize; + uint64_t init_address; + uint64_t init_module; + uint64_t reserved1; + uint64_t reserved2; + uint64_t reserved3; + uint64_t reserved4; + uint64_t reserved5; + uint64_t reserved6; + }; + + struct symtab_command { + uint32_t cmd; + uint32_t cmdsize; + uint32_t symoff; + uint32_t nsyms; + uint32_t stroff; + uint32_t strsize; + }; + + struct dysymtab_command { + uint32_t cmd; + uint32_t cmdsize; + uint32_t ilocalsym; + uint32_t nlocalsym; + uint32_t iextdefsym; + uint32_t nextdefsym; + uint32_t iundefsym; + uint32_t nundefsym; + uint32_t tocoff; + uint32_t ntoc; + uint32_t modtaboff; + uint32_t nmodtab; + uint32_t extrefsymoff; + uint32_t nextrefsyms; + uint32_t indirectsymoff; + uint32_t nindirectsyms; + uint32_t extreloff; + uint32_t nextrel; + uint32_t locreloff; + uint32_t nlocrel; + }; + + struct dylib_table_of_contents { + uint32_t symbol_index; + uint32_t module_index; + }; + + struct dylib_module { + uint32_t module_name; + uint32_t iextdefsym; + uint32_t nextdefsym; + uint32_t irefsym; + uint32_t nrefsym; + uint32_t ilocalsym; + uint32_t nlocalsym; + uint32_t iextrel; + uint32_t nextrel; + uint32_t iinit_iterm; + uint32_t ninit_nterm; + uint32_t objc_module_info_addr; + uint32_t objc_module_info_size; + }; + + struct dylib_module_64 { + uint32_t module_name; + uint32_t iextdefsym; + uint32_t nextdefsym; + uint32_t irefsym; + uint32_t nrefsym; + uint32_t ilocalsym; + uint32_t nlocalsym; + uint32_t iextrel; + uint32_t nextrel; + uint32_t iinit_iterm; + uint32_t ninit_nterm; + uint32_t objc_module_info_size; + uint64_t objc_module_info_addr; + }; + + struct dylib_reference { + uint32_t isym:24, + flags:8; + }; + + + struct twolevel_hints_command { + uint32_t cmd; + uint32_t cmdsize; + uint32_t offset; + uint32_t nhints; + }; + + struct twolevel_hint { + uint32_t isub_image:8, + itoc:24; + }; + + struct prebind_cksum_command { + uint32_t cmd; + uint32_t cmdsize; + uint32_t cksum; + }; + + struct uuid_command { + uint32_t cmd; + uint32_t cmdsize; + uint8_t uuid[16]; + }; + + struct rpath_command { + uint32_t cmd; + uint32_t cmdsize; + uint32_t path; + }; + + struct linkedit_data_command { + uint32_t cmd; + uint32_t cmdsize; + uint32_t dataoff; + uint32_t datasize; + }; + + struct encryption_info_command { + uint32_t cmd; + uint32_t cmdsize; + uint32_t cryptoff; + uint32_t cryptsize; + uint32_t cryptid; + }; + + struct dyld_info_command { + uint32_t cmd; + uint32_t cmdsize; + uint32_t rebase_off; + uint32_t rebase_size; + uint32_t bind_off; + uint32_t bind_size; + uint32_t weak_bind_off; + uint32_t weak_bind_size; + uint32_t lazy_bind_off; + uint32_t lazy_bind_size; + uint32_t export_off; + uint32_t export_size; + }; + + struct symseg_command { + uint32_t cmd; + uint32_t cmdsize; + uint32_t offset; + uint32_t size; + }; + + struct ident_command { + uint32_t cmd; + uint32_t cmdsize; + }; + + struct fvmfile_command { + uint32_t cmd; + uint32_t cmdsize; + uint32_t name; + uint32_t header_addr; + }; + + + // Structs from + struct fat_header { + uint32_t magic; + uint32_t nfat_arch; + }; + + struct fat_arch { + uint32_t cputype; + uint32_t cpusubtype; + uint32_t offset; + uint32_t size; + uint32_t align; + }; + + // Structs from + struct nlist { + uint32_t n_strx; + uint8_t n_type; + uint8_t n_sect; + int16_t n_desc; + uint32_t n_value; + }; + + struct nlist_64 { + uint32_t n_strx; + uint8_t n_type; + uint8_t n_sect; + uint16_t n_desc; + uint64_t n_value; + }; + + // Get/Set functions from + + static inline uint16_t GET_LIBRARY_ORDINAL(uint16_t n_desc) + { + return (((n_desc) >> 8u) & 0xffu); + } + + static inline void SET_LIBRARY_ORDINAL(uint16_t &n_desc, uint8_t ordinal) + { + n_desc = (((n_desc) & 0x00ff) | (((ordinal) & 0xff) << 8)); + } + + static inline uint8_t GET_COMM_ALIGN (uint16_t n_desc) + { + return (n_desc >> 8u) & 0x0fu; + } + + static inline void SET_COMM_ALIGN (uint16_t &n_desc, uint8_t align) + { + n_desc = ((n_desc & 0xf0ffu) | ((align & 0x0fu) << 8u)); + } + // Enums from enum { // Capability bits used in the definition of cpu_type. From deeppatel1987 at gmail.com Tue Jul 20 17:41:56 2010 From: deeppatel1987 at gmail.com (Sandeep Patel) Date: Tue, 20 Jul 2010 22:41:56 +0000 Subject: [llvm-commits] [patch] Fix calling convention on ARM if vfp2+ is enabled In-Reply-To: References: Message-ID: I think this is what test/CodeGen/ARM/arguments.ll and arguments_f64_backfill.ll are testing. Can you provide a test that shows the case you think is incorrect? deep On Tue, Jul 20, 2010 at 10:29 PM, Rafael Espindola wrote: > If vfp2 or newer is enabled, f64 is legal and we have to shadow r1 > when a double is assigned to r2. This was already handle correctly > when f64 was being split, this patch adds the case where it is legal. > > I changed which registers are "shadowed". My understanding is that > when a f64 is assigned to r2/r3, register r1 is the one shadowed. > Registers r2 and r3 are simply used. That is the meaning used on the > .td file. Should I change the .td? > > Cheers, > -- > Rafael ?vila de Esp?ndola > > _______________________________________________ > 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 Jul 20 17:45:33 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 20 Jul 2010 22:45:33 -0000 Subject: [llvm-commits] [llvm] r108955 - in /llvm/trunk/lib/Target/X86: X86MCInstLower.cpp X86MCInstLower.h Message-ID: <20100720224533.A53BB2A6C12C@llvm.org> Author: lattner Date: Tue Jul 20 17:45:33 2010 New Revision: 108955 URL: http://llvm.org/viewvc/llvm-project?rev=108955&view=rev Log: make asmprinter optional, even though passing in null will cause things to explode right now. Modified: llvm/trunk/lib/Target/X86/X86MCInstLower.cpp llvm/trunk/lib/Target/X86/X86MCInstLower.h Modified: llvm/trunk/lib/Target/X86/X86MCInstLower.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86MCInstLower.cpp?rev=108955&r1=108954&r2=108955&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86MCInstLower.cpp (original) +++ llvm/trunk/lib/Target/X86/X86MCInstLower.cpp Tue Jul 20 17:45:33 2010 @@ -28,11 +28,10 @@ #include "llvm/Type.h" using namespace llvm; -X86MCInstLower::X86MCInstLower(MCContext &ctx, Mangler *mang, - const MachineFunction &mf, - X86AsmPrinter &asmprinter) -: Ctx(ctx), Mang(mang), MF(mf), TM(mf.getTarget()), MAI(*TM.getMCAsmInfo()), - AsmPrinter(asmprinter) {} +X86MCInstLower::X86MCInstLower(Mangler *mang, const MachineFunction &mf, + X86AsmPrinter *asmprinter) +: Ctx(mf.getContext()), Mang(mang), MF(mf), TM(mf.getTarget()), + MAI(*TM.getMCAsmInfo()), AsmPrinter(asmprinter) {} MachineModuleInfoMachO &X86MCInstLower::getMachOMMI() const { return MF.getMMI().getObjFileInfo(); @@ -182,7 +181,7 @@ // local labels. This is only safe when the symbols are in the same // section so we are restricting it to jumptable references. MCSymbol *Label = Ctx.CreateTempSymbol(); - AsmPrinter.OutStreamer.EmitAssignment(Label, Expr); + AsmPrinter->OutStreamer.EmitAssignment(Label, Expr); Expr = MCSymbolRefExpr::Create(Label, Ctx); } break; @@ -327,14 +326,14 @@ MCOp = LowerSymbolOperand(MO, GetSymbolFromOperand(MO)); break; case MachineOperand::MO_JumpTableIndex: - MCOp = LowerSymbolOperand(MO, AsmPrinter.GetJTISymbol(MO.getIndex())); + MCOp = LowerSymbolOperand(MO, AsmPrinter->GetJTISymbol(MO.getIndex())); break; case MachineOperand::MO_ConstantPoolIndex: - MCOp = LowerSymbolOperand(MO, AsmPrinter.GetCPISymbol(MO.getIndex())); + MCOp = LowerSymbolOperand(MO, AsmPrinter->GetCPISymbol(MO.getIndex())); break; case MachineOperand::MO_BlockAddress: MCOp = LowerSymbolOperand(MO, - AsmPrinter.GetBlockAddressSymbol(MO.getBlockAddress())); + AsmPrinter->GetBlockAddressSymbol(MO.getBlockAddress())); break; } @@ -505,7 +504,7 @@ void X86AsmPrinter::EmitInstruction(const MachineInstr *MI) { - X86MCInstLower MCInstLowering(OutContext, Mang, *MF, *this); + X86MCInstLower MCInstLowering(Mang, *MF, this); switch (MI->getOpcode()) { case TargetOpcode::DBG_VALUE: if (isVerbose() && OutStreamer.hasRawTextSupport()) { Modified: llvm/trunk/lib/Target/X86/X86MCInstLower.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86MCInstLower.h?rev=108955&r1=108954&r2=108955&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86MCInstLower.h (original) +++ llvm/trunk/lib/Target/X86/X86MCInstLower.h Tue Jul 20 17:45:33 2010 @@ -34,10 +34,12 @@ const TargetMachine &TM; const MCAsmInfo &MAI; - X86AsmPrinter &AsmPrinter; + /// AsmPrinter - This is the asmprinter when emission is actually happening, + /// or null if an instruction is being lowered for some other reason. + X86AsmPrinter *AsmPrinter; public: - X86MCInstLower(MCContext &ctx, Mangler *mang, const MachineFunction &MF, - X86AsmPrinter &asmprinter); + X86MCInstLower(Mangler *mang, const MachineFunction &MF, + X86AsmPrinter *asmprinter); void Lower(const MachineInstr *MI, MCInst &OutMI) const; From gohman at apple.com Tue Jul 20 17:52:56 2010 From: gohman at apple.com (Dan Gohman) Date: Tue, 20 Jul 2010 15:52:56 -0700 Subject: [llvm-commits] [llvm] r108948 - in /llvm/trunk: include/llvm/Instruction.h lib/VMCore/Instruction.cpp lib/VMCore/Metadata.cpp In-Reply-To: <33959A0C-F24E-44A9-BB2C-C3433505CB0A@apple.com> References: <20100720222504.9F5722A6C12C@llvm.org> <33959A0C-F24E-44A9-BB2C-C3433505CB0A@apple.com> Message-ID: <8493D5FB-DBF9-4B79-B88E-278981CF73C6@apple.com> On Jul 20, 2010, at 3:34 PM, Devang Patel wrote: > Please reset DbgLoc also. Why? Dan From gohman at apple.com Tue Jul 20 18:09:34 2010 From: gohman at apple.com (Dan Gohman) Date: Tue, 20 Jul 2010 23:09:34 -0000 Subject: [llvm-commits] [llvm] r108961 - in /llvm/trunk/lib/Transforms: IPO/StripSymbols.cpp Utils/CloneFunction.cpp Utils/PromoteMemoryToRegister.cpp Message-ID: <20100720230934.852862A6C12C@llvm.org> Author: djg Date: Tue Jul 20 18:09:34 2010 New Revision: 108961 URL: http://llvm.org/viewvc/llvm-project?rev=108961&view=rev Log: Don't look up the "dbg" metadata kind by name. Modified: llvm/trunk/lib/Transforms/IPO/StripSymbols.cpp llvm/trunk/lib/Transforms/Utils/CloneFunction.cpp llvm/trunk/lib/Transforms/Utils/PromoteMemoryToRegister.cpp Modified: llvm/trunk/lib/Transforms/IPO/StripSymbols.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/StripSymbols.cpp?rev=108961&r1=108960&r2=108961&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/IPO/StripSymbols.cpp (original) +++ llvm/trunk/lib/Transforms/IPO/StripSymbols.cpp Tue Jul 20 18:09:34 2010 @@ -254,14 +254,13 @@ } } - unsigned MDDbgKind = M.getMDKindID("dbg"); for (Module::iterator MI = M.begin(), ME = M.end(); MI != ME; ++MI) for (Function::iterator FI = MI->begin(), FE = MI->end(); FI != FE; ++FI) for (BasicBlock::iterator BI = FI->begin(), BE = FI->end(); BI != BE; ++BI) { - Changed = true; // FIXME: Only set if there was debug metadata. - BI->setMetadata(MDDbgKind, 0); + Changed != !BI->getDebugLoc().isUnknown(); + BI->setDebugLoc(DebugLoc()); } return Changed; Modified: llvm/trunk/lib/Transforms/Utils/CloneFunction.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/CloneFunction.cpp?rev=108961&r1=108960&r2=108961&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Utils/CloneFunction.cpp (original) +++ llvm/trunk/lib/Transforms/Utils/CloneFunction.cpp Tue Jul 20 18:09:34 2010 @@ -408,10 +408,9 @@ // BasicBlock::iterator I = NewBB->begin(); - unsigned DbgKind = OldFunc->getContext().getMDKindID("dbg"); MDNode *TheCallMD = NULL; if (TheCall && TheCall->hasMetadata()) - TheCallMD = TheCall->getMetadata(DbgKind); + TheCallMD = TheCall->getMetadata(LLVMContext::MD_dbg); // Handle PHI nodes specially, as we have to remove references to dead // blocks. @@ -421,14 +420,14 @@ for (; (PN = dyn_cast(I)); ++I, ++OldI) { if (I->hasMetadata()) { if (TheCallMD) { - if (MDNode *IMD = I->getMetadata(DbgKind)) { + if (MDNode *IMD = I->getMetadata(LLVMContext::MD_dbg)) { MDNode *NewMD = UpdateInlinedAtInfo(IMD, TheCallMD); - I->setMetadata(DbgKind, NewMD); + I->setMetadata(LLVMContext::MD_dbg, NewMD); } } else { // The cloned instruction has dbg info but the call instruction // does not have dbg info. Remove dbg info from cloned instruction. - I->setMetadata(DbgKind, 0); + I->setMetadata(LLVMContext::MD_dbg, 0); } } PHIToResolve.push_back(cast(OldI)); @@ -445,14 +444,14 @@ for (; I != NewBB->end(); ++I) { if (I->hasMetadata()) { if (TheCallMD) { - if (MDNode *IMD = I->getMetadata(DbgKind)) { + if (MDNode *IMD = I->getMetadata(LLVMContext::MD_dbg)) { MDNode *NewMD = UpdateInlinedAtInfo(IMD, TheCallMD); - I->setMetadata(DbgKind, NewMD); + I->setMetadata(LLVMContext::MD_dbg, NewMD); } } else { // The cloned instruction has dbg info but the call instruction // does not have dbg info. Remove dbg info from cloned instruction. - I->setMetadata(DbgKind, 0); + I->setMetadata(LLVMContext::MD_dbg, 0); } } RemapInstruction(I, VMap); Modified: llvm/trunk/lib/Transforms/Utils/PromoteMemoryToRegister.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/PromoteMemoryToRegister.cpp?rev=108961&r1=108960&r2=108961&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Utils/PromoteMemoryToRegister.cpp (original) +++ llvm/trunk/lib/Transforms/Utils/PromoteMemoryToRegister.cpp Tue Jul 20 18:09:34 2010 @@ -896,11 +896,12 @@ DIVar, SI); // Propagate any debug metadata from the store onto the dbg.value. - if (MDNode *SIMD = SI->getMetadata("dbg")) - DbgVal->setMetadata("dbg", SIMD); + DebugLoc SIDL = SI->getDebugLoc(); + if (!SIDL.isUnknown()) + DbgVal->setDebugLoc(SIDL); // Otherwise propagate debug metadata from dbg.declare. - else if (MDNode *MD = DDI->getMetadata("dbg")) - DbgVal->setMetadata("dbg", MD); + else + DbgVal->setDebugLoc(DDI->getDebugLoc()); } // QueuePhiNode - queues a phi-node to be added to a basic-block for a specific From gohman at apple.com Tue Jul 20 18:10:36 2010 From: gohman at apple.com (Dan Gohman) Date: Tue, 20 Jul 2010 23:10:36 -0000 Subject: [llvm-commits] [llvm] r108962 - /llvm/trunk/lib/Transforms/IPO/StripSymbols.cpp Message-ID: <20100720231036.3397D2A6C12C@llvm.org> Author: djg Date: Tue Jul 20 18:10:36 2010 New Revision: 108962 URL: http://llvm.org/viewvc/llvm-project?rev=108962&view=rev Log: Fix a typo. Modified: llvm/trunk/lib/Transforms/IPO/StripSymbols.cpp Modified: llvm/trunk/lib/Transforms/IPO/StripSymbols.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/StripSymbols.cpp?rev=108962&r1=108961&r2=108962&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/IPO/StripSymbols.cpp (original) +++ llvm/trunk/lib/Transforms/IPO/StripSymbols.cpp Tue Jul 20 18:10:36 2010 @@ -259,7 +259,7 @@ ++FI) for (BasicBlock::iterator BI = FI->begin(), BE = FI->end(); BI != BE; ++BI) { - Changed != !BI->getDebugLoc().isUnknown(); + Changed |= !BI->getDebugLoc().isUnknown(); BI->setDebugLoc(DebugLoc()); } From bob.wilson at apple.com Tue Jul 20 18:11:13 2010 From: bob.wilson at apple.com (Bob Wilson) Date: Tue, 20 Jul 2010 23:11:13 -0000 Subject: [llvm-commits] [llvm-gcc-4.2] r108963 - in /llvm-gcc-4.2/trunk/gcc: config/i386/i386.h llvm-convert.cpp Message-ID: <20100720231113.F04C52A6C12C@llvm.org> Author: bwilson Date: Tue Jul 20 18:11:13 2010 New Revision: 108963 URL: http://llvm.org/viewvc/llvm-project?rev=108963&view=rev Log: Add a new target-specific macro to control how the inline assembly "p" constraint is canonicalized. Modified: llvm-gcc-4.2/trunk/gcc/config/i386/i386.h llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp Modified: llvm-gcc-4.2/trunk/gcc/config/i386/i386.h URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/config/i386/i386.h?rev=108963&r1=108962&r2=108963&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/config/i386/i386.h (original) +++ llvm-gcc-4.2/trunk/gcc/config/i386/i386.h Tue Jul 20 18:11:13 2010 @@ -3932,6 +3932,11 @@ if (nm && (*nm == '%' || *nm == '#')) ++nm; \ ((!nm || ISDIGIT (*nm)) ? reg_names[REG_NUM] : nm); }) +/* LLVM_CANONICAL_ADDRESS_CONSTRAINTS - Valid x86 memory addresses include + symbolic values and immediates. Canonicalize GCC's "p" constraint for + memory addresses to allow both memory and immediate operands. */ +#define LLVM_CANONICAL_ADDRESS_CONSTRAINTS "im" + /* Propagate code model setting to backend */ #define LLVM_SET_MACHINE_OPTIONS(argvec) \ do { \ Modified: llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp?rev=108963&r1=108962&r2=108963&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp (original) +++ llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp Tue Jul 20 18:11:13 2010 @@ -4249,6 +4249,15 @@ #define LLVM_GET_REG_NAME(REG_NAME, REG_NUM) reg_names[REG_NUM] #endif +// LLVM_CANONICAL_ADDRESS_CONSTRAINTS - GCC defines the "p" constraint to +// allow a valid memory address, but targets differ widely on what is allowed +// as an address. This macro is a string containing the canonical constraint +// characters that are conservatively valid addresses. Default to allowing an +// address in a register, since that works for many targets. +#ifndef LLVM_CANONICAL_ADDRESS_CONSTRAINTS +#define LLVM_CANONICAL_ADDRESS_CONSTRAINTS "r" +#endif + /// Reads from register variables are handled by emitting an inline asm node /// that copies the value out of the specified register. Value *TreeToLLVM::EmitReadOfRegisterVariable(tree decl, @@ -4430,11 +4439,14 @@ continue; } - // Translate 'p' to 'm'. This is supposed to check for a valid memory - // address, but for inline assembly there is no way to know the mode of - // the data being addressed. Peculiarly, it also accepts a constant. - if (ConstraintChar == 'p') - Result += "im"; + // Translate 'p' to a target-specific set of constraints that + // conservatively allow a valid memory address. For inline assembly there + // is no way to know the mode of the data being addressed, so this is only + // a rough approximation of how GCC handles this constraint. + if (ConstraintChar == 'p') { + Result += LLVM_CANONICAL_ADDRESS_CONSTRAINTS; + continue; + } // See if this is a regclass constraint. unsigned RegClass; From bob.wilson at apple.com Tue Jul 20 18:13:29 2010 From: bob.wilson at apple.com (Bob Wilson) Date: Tue, 20 Jul 2010 16:13:29 -0700 Subject: [llvm-commits] [llvm-gcc-4.2] r108554 - /llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp In-Reply-To: References: <20100716210032.1BE872A6C12C@llvm.org> <0AD86F36-DA36-43F9-84EF-FB2DD517C18D@apple.com> Message-ID: On Jul 19, 2010, at 10:40 AM, Dale Johannesen wrote: > > On Jul 19, 2010, at 9:20 AMPDT, Bob Wilson wrote: > >> Dale, I don't think this is correct, at least for ARM. The 'p' constraint is for a memory address, not the actual memory reference. If I remember correctly, the use of this reported in pr4521 was kind of questionable, and I haven't yet looked in any detail at pr5314 and pr5533. Maybe we can talk about this in person sometime today. > > It wouldn't surprise me if "p" isn't completely correct yet; inline asm is implemented incrementally as bugs are found in it. I believe this one is an improvement, but could be wrong. Do you know of anything it breaks? There may be some breakage, but it definitely allows things through that will not work for ARM. I've fixed it for now by adding a target-specific macro (svn 108963). There's such a wide variation in what different targets allow as a valid memory address that I don't see any other way to handle this. From bruno.cardoso at gmail.com Tue Jul 20 18:19:02 2010 From: bruno.cardoso at gmail.com (Bruno Cardoso Lopes) Date: Tue, 20 Jul 2010 23:19:02 -0000 Subject: [llvm-commits] [llvm] r108964 - in /llvm/trunk: lib/Target/X86/X86InstrSSE.td test/MC/AsmParser/X86/x86_32-encoding.s test/MC/AsmParser/X86/x86_64-encoding.s Message-ID: <20100720231902.E2C4D2A6C12C@llvm.org> Author: bruno Date: Tue Jul 20 18:19:02 2010 New Revision: 108964 URL: http://llvm.org/viewvc/llvm-project?rev=108964&view=rev Log: Add new AVX vextractf128 instructions Modified: llvm/trunk/lib/Target/X86/X86InstrSSE.td llvm/trunk/test/MC/AsmParser/X86/x86_32-encoding.s llvm/trunk/test/MC/AsmParser/X86/x86_64-encoding.s Modified: llvm/trunk/lib/Target/X86/X86InstrSSE.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrSSE.td?rev=108964&r1=108963&r2=108964&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86InstrSSE.td (original) +++ llvm/trunk/lib/Target/X86/X86InstrSSE.td Tue Jul 20 18:19:02 2010 @@ -5008,4 +5008,14 @@ "vinsertf128\t{$src3, $src2, $src1, $dst|$dst, $src1, $src2, $src3}", []>, VEX_4V; +// Extract packed floating-point values +def VEXTRACTF128rr : AVXAIi8<0x19, MRMDestReg, (outs VR128:$dst), + (ins VR256:$src1, i8imm:$src2), + "vextractf128\t{$src2, $src1, $dst|$dst, $src1, $src2}", + []>, VEX; +def VEXTRACTF128mr : AVXAIi8<0x19, MRMDestMem, (outs), + (ins f128mem:$dst, VR256:$src1, i8imm:$src2), + "vextractf128\t{$src2, $src1, $dst|$dst, $src1, $src2}", + []>, VEX; + } // isAsmParserOnly Modified: llvm/trunk/test/MC/AsmParser/X86/x86_32-encoding.s URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AsmParser/X86/x86_32-encoding.s?rev=108964&r1=108963&r2=108964&view=diff ============================================================================== --- llvm/trunk/test/MC/AsmParser/X86/x86_32-encoding.s (original) +++ llvm/trunk/test/MC/AsmParser/X86/x86_32-encoding.s Tue Jul 20 18:19:02 2010 @@ -13022,3 +13022,11 @@ // CHECK: encoding: [0xc4,0xe3,0x6d,0x18,0x28,0x07] vinsertf128 $7, (%eax), %ymm2, %ymm5 +// CHECK: vextractf128 $7, %ymm2, %xmm2 +// CHECK: encoding: [0xc4,0xe3,0x7d,0x19,0xd2,0x07] + vextractf128 $7, %ymm2, %xmm2 + +// CHECK: vextractf128 $7, %ymm2, (%eax) +// CHECK: encoding: [0xc4,0xe3,0x7d,0x19,0x10,0x07] + vextractf128 $7, %ymm2, (%eax) + Modified: llvm/trunk/test/MC/AsmParser/X86/x86_64-encoding.s URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AsmParser/X86/x86_64-encoding.s?rev=108964&r1=108963&r2=108964&view=diff ============================================================================== --- llvm/trunk/test/MC/AsmParser/X86/x86_64-encoding.s (original) +++ llvm/trunk/test/MC/AsmParser/X86/x86_64-encoding.s Tue Jul 20 18:19:02 2010 @@ -3096,3 +3096,11 @@ // CHECK: encoding: [0xc4,0x63,0x1d,0x18,0x10,0x07] vinsertf128 $7, (%rax), %ymm12, %ymm10 +// CHECK: vextractf128 $7, %ymm12, %xmm12 +// CHECK: encoding: [0xc4,0x43,0x7d,0x19,0xe4,0x07] + vextractf128 $7, %ymm12, %xmm12 + +// CHECK: vextractf128 $7, %ymm12, (%rax) +// CHECK: encoding: [0xc4,0x63,0x7d,0x19,0x20,0x07] + vextractf128 $7, %ymm12, (%rax) + From dalej at apple.com Tue Jul 20 18:39:47 2010 From: dalej at apple.com (Dale Johannesen) Date: Tue, 20 Jul 2010 16:39:47 -0700 Subject: [llvm-commits] [llvm-gcc-4.2] r108554 - /llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp In-Reply-To: References: <20100716210032.1BE872A6C12C@llvm.org> <0AD86F36-DA36-43F9-84EF-FB2DD517C18D@apple.com> Message-ID: <340D8CA4-EC07-4EEF-88B6-853971AB944E@apple.com> On Jul 20, 2010, at 4:13 PMPDT, Bob Wilson wrote: > On Jul 19, 2010, at 10:40 AM, Dale Johannesen wrote: >> On Jul 19, 2010, at 9:20 AMPDT, Bob Wilson wrote: >> >>> Dale, I don't think this is correct, at least for ARM. The 'p' >>> constraint is for a memory address, not the actual memory >>> reference. If I remember correctly, the use of this reported in >>> pr4521 was kind of questionable, and I haven't yet looked in any >>> detail at pr5314 and pr5533. Maybe we can talk about this in >>> person sometime today. >> >> It wouldn't surprise me if "p" isn't completely correct yet; inline >> asm is implemented incrementally as bugs are found in it. I >> believe this one is an improvement, but could be wrong. Do you >> know of anything it breaks? > > There may be some breakage, but it definitely allows things through > that will not work for ARM. I've fixed it for now by adding a > target-specific macro (svn 108963). There's such a wide variation > in what different targets allow as a valid memory address that I > don't see any other way to handle this. I agree. Thanks for looking at it. From resistor at mac.com Tue Jul 20 18:41:56 2010 From: resistor at mac.com (Owen Anderson) Date: Tue, 20 Jul 2010 23:41:56 -0000 Subject: [llvm-commits] [llvm] r108966 - in /llvm/trunk: include/llvm/PassRegistry.h include/llvm/PassSupport.h lib/VMCore/Pass.cpp lib/VMCore/PassRegistry.cpp Message-ID: <20100720234156.9C1E72A6C12C@llvm.org> Author: resistor Date: Tue Jul 20 18:41:56 2010 New Revision: 108966 URL: http://llvm.org/viewvc/llvm-project?rev=108966&view=rev Log: Move the handling of PassRegistrationListener's to PassRegistry. Modified: llvm/trunk/include/llvm/PassRegistry.h llvm/trunk/include/llvm/PassSupport.h llvm/trunk/lib/VMCore/Pass.cpp llvm/trunk/lib/VMCore/PassRegistry.cpp Modified: llvm/trunk/include/llvm/PassRegistry.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/PassRegistry.h?rev=108966&r1=108965&r2=108966&view=diff ============================================================================== --- llvm/trunk/include/llvm/PassRegistry.h (original) +++ llvm/trunk/include/llvm/PassRegistry.h Tue Jul 20 18:41:56 2010 @@ -17,17 +17,18 @@ #ifndef LLVM_PASSREGISTRY_H #define LLVM_PASSREGISTRY_H -#include "llvm/PassSupport.h" #include "llvm/ADT/StringMap.h" #include "llvm/System/DataTypes.h" #include "llvm/System/Mutex.h" #include #include - -using namespace llvm; +#include namespace llvm { +class PassInfo; +struct PassRegistrationListener; + class PassRegistry { /// Guards the contents of this class. mutable sys::SmartMutex Lock; @@ -44,6 +45,8 @@ std::set Implementations; }; std::map AnalysisGroupInfoMap; + + std::vector Listeners; public: static PassRegistry *getPassRegistry(); @@ -60,6 +63,8 @@ bool isDefault); void enumerateWith(PassRegistrationListener *L); + void addRegistrationListener(PassRegistrationListener* L); + void removeRegistrationListener(PassRegistrationListener *L); }; } Modified: llvm/trunk/include/llvm/PassSupport.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/PassSupport.h?rev=108966&r1=108965&r2=108966&view=diff ============================================================================== --- llvm/trunk/include/llvm/PassSupport.h (original) +++ llvm/trunk/include/llvm/PassSupport.h Tue Jul 20 18:41:56 2010 @@ -22,6 +22,7 @@ #define LLVM_PASS_SUPPORT_H #include "Pass.h" +#include "llvm/PassRegistry.h" namespace llvm { @@ -57,7 +58,7 @@ : PassName(name), PassArgument(arg), PassID(pi), IsCFGOnlyPass(isCFGOnly), IsAnalysis(is_analysis), IsAnalysisGroup(false), NormalCtor(normal) { - registerPass(); + PassRegistry::getPassRegistry()->registerPass(*this); } /// PassInfo ctor - Do not call this directly, this should only be invoked /// through RegisterPass. This version is for use by analysis groups; it @@ -126,10 +127,6 @@ return ItfImpl; } -protected: - void registerPass(); - void unregisterPass(); - private: void operator=(const PassInfo &); // do not implement PassInfo(const PassInfo &); // do not implement @@ -165,6 +162,7 @@ : PassInfo(Name, PassArg, intptr_t(&passName::ID), PassInfo::NormalCtor_t(callDefaultCtor), CFGOnly, is_analysis) { + } }; Modified: llvm/trunk/lib/VMCore/Pass.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Pass.cpp?rev=108966&r1=108965&r2=108966&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/Pass.cpp (original) +++ llvm/trunk/lib/VMCore/Pass.cpp Tue Jul 20 18:41:56 2010 @@ -234,13 +234,6 @@ return PMT_BasicBlockPassManager; } -//===----------------------------------------------------------------------===// -// Pass Registration mechanism -// - -static std::vector *Listeners = 0; -static sys::SmartMutex ListenersLock; - // getPassInfo - Return the PassInfo data structure that corresponds to this // pass... const PassInfo *Pass::getPassInfo() const { @@ -255,21 +248,6 @@ return PassRegistry::getPassRegistry()->getPassInfo(Arg); } -void PassInfo::registerPass() { - PassRegistry::getPassRegistry()->registerPass(*this); - - // Notify any listeners. - sys::SmartScopedLock Lock(ListenersLock); - if (Listeners) - for (std::vector::iterator - I = Listeners->begin(), E = Listeners->end(); I != E; ++I) - (*I)->passRegistered(this); -} - -void PassInfo::unregisterPass() { - PassRegistry::getPassRegistry()->unregisterPass(*this); -} - Pass *PassInfo::createPass() const { assert((!isAnalysisGroup() || NormalCtor) && "No default implementation found for analysis group!"); @@ -292,7 +270,7 @@ const_cast(Pass::lookupPassInfo(InterfaceID)); if (InterfaceInfo == 0) { // First reference to Interface, register it now. - registerPass(); + PassRegistry::getPassRegistry()->registerPass(*this); InterfaceInfo = this; } assert(isAnalysisGroup() && @@ -320,24 +298,12 @@ // PassRegistrationListener ctor - Add the current object to the list of // PassRegistrationListeners... PassRegistrationListener::PassRegistrationListener() { - sys::SmartScopedLock Lock(ListenersLock); - if (!Listeners) Listeners = new std::vector(); - Listeners->push_back(this); + PassRegistry::getPassRegistry()->addRegistrationListener(this); } // dtor - Remove object from list of listeners... PassRegistrationListener::~PassRegistrationListener() { - sys::SmartScopedLock Lock(ListenersLock); - std::vector::iterator I = - std::find(Listeners->begin(), Listeners->end(), this); - assert(Listeners && I != Listeners->end() && - "PassRegistrationListener not registered!"); - Listeners->erase(I); - - if (Listeners->empty()) { - delete Listeners; - Listeners = 0; - } + PassRegistry::getPassRegistry()->removeRegistrationListener(this); } // enumeratePasses - Iterate over the registered passes, calling the Modified: llvm/trunk/lib/VMCore/PassRegistry.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/PassRegistry.cpp?rev=108966&r1=108965&r2=108966&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/PassRegistry.cpp (original) +++ llvm/trunk/lib/VMCore/PassRegistry.cpp Tue Jul 20 18:41:56 2010 @@ -13,9 +13,12 @@ //===----------------------------------------------------------------------===// #include "llvm/PassRegistry.h" +#include "llvm/PassSupport.h" #include "llvm/Support/Compiler.h" #include "llvm/Support/ManagedStatic.h" +using namespace llvm; + static PassRegistry *PassRegistryObj = 0; PassRegistry *PassRegistry::getPassRegistry() { // Use double-checked locking to safely initialize the registrar when @@ -69,12 +72,21 @@ return I != PassInfoStringMap.end() ? I->second : 0; } +//===----------------------------------------------------------------------===// +// Pass Registration mechanism +// + void PassRegistry::registerPass(const PassInfo &PI) { sys::SmartScopedLock Guard(Lock); bool Inserted = PassInfoMap.insert(std::make_pair(PI.getTypeInfo(),&PI)).second; assert(Inserted && "Pass registered multiple times!"); Inserted=Inserted; PassInfoStringMap[PI.getPassArgument()] = &PI; + + // Notify any listeners. + for (std::vector::iterator + I = Listeners.begin(), E = Listeners.end(); I != E; ++I) + (*I)->passRegistered(&PI); } void PassRegistry::unregisterPass(const PassInfo &PI) { @@ -112,3 +124,16 @@ InterfaceInfo->setNormalCtor(ImplementationInfo->getNormalCtor()); } } + +void PassRegistry::addRegistrationListener(PassRegistrationListener *L) { + sys::SmartScopedLock Guard(Lock); + Listeners.push_back(L); +} + +void PassRegistry::removeRegistrationListener(PassRegistrationListener *L) { + sys::SmartScopedLock Guard(Lock); + std::vector::iterator I = + std::find(Listeners.begin(), Listeners.end(), L); + assert(I != Listeners.end() && "PassRegistrationListener not registered!"); + Listeners.erase(I); +} From gohman at apple.com Tue Jul 20 18:49:05 2010 From: gohman at apple.com (Dan Gohman) Date: Tue, 20 Jul 2010 23:49:05 -0000 Subject: [llvm-commits] [llvm] r108967 - /llvm/trunk/lib/Transforms/Utils/CloneFunction.cpp Message-ID: <20100720234905.E2EE42A6C12C@llvm.org> Author: djg Date: Tue Jul 20 18:49:05 2010 New Revision: 108967 URL: http://llvm.org/viewvc/llvm-project?rev=108967&view=rev Log: Use DebugLocs instead of MDNodes. Modified: llvm/trunk/lib/Transforms/Utils/CloneFunction.cpp Modified: llvm/trunk/lib/Transforms/Utils/CloneFunction.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/CloneFunction.cpp?rev=108967&r1=108966&r2=108967&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Utils/CloneFunction.cpp (original) +++ llvm/trunk/lib/Transforms/Utils/CloneFunction.cpp Tue Jul 20 18:49:05 2010 @@ -334,25 +334,16 @@ Ops.size(), TD); } -static MDNode *UpdateInlinedAtInfo(MDNode *InsnMD, MDNode *TheCallMD) { - DILocation ILoc(InsnMD); - if (!ILoc.Verify()) return InsnMD; - - DILocation CallLoc(TheCallMD); - if (!CallLoc.Verify()) return InsnMD; - - DILocation OrigLocation = ILoc.getOrigLocation(); - MDNode *NewLoc = TheCallMD; - if (OrigLocation.Verify()) - NewLoc = UpdateInlinedAtInfo(OrigLocation, TheCallMD); - - Value *MDVs[] = { - InsnMD->getOperand(0), // Line - InsnMD->getOperand(1), // Col - InsnMD->getOperand(2), // Scope - NewLoc - }; - return MDNode::get(InsnMD->getContext(), MDVs, 4); +static DebugLoc +UpdateInlinedAtInfo(const DebugLoc &InsnDL, const DebugLoc &TheCallDL, + LLVMContext &Ctx) { + DebugLoc NewLoc = TheCallDL; + if (MDNode *IA = InsnDL.getInlinedAt(Ctx)) + NewLoc = UpdateInlinedAtInfo(DebugLoc::getFromDILocation(IA), TheCallDL, + Ctx); + + return DebugLoc::get(InsnDL.getLine(), InsnDL.getCol(), + InsnDL.getScope(Ctx), NewLoc.getAsMDNode(Ctx)); } /// CloneAndPruneFunctionInto - This works exactly like CloneFunctionInto, @@ -408,9 +399,9 @@ // BasicBlock::iterator I = NewBB->begin(); - MDNode *TheCallMD = NULL; - if (TheCall && TheCall->hasMetadata()) - TheCallMD = TheCall->getMetadata(LLVMContext::MD_dbg); + DebugLoc TheCallDL; + if (TheCall) + TheCallDL = TheCall->getDebugLoc(); // Handle PHI nodes specially, as we have to remove references to dead // blocks. @@ -419,15 +410,17 @@ BasicBlock::const_iterator OldI = BI->begin(); for (; (PN = dyn_cast(I)); ++I, ++OldI) { if (I->hasMetadata()) { - if (TheCallMD) { - if (MDNode *IMD = I->getMetadata(LLVMContext::MD_dbg)) { - MDNode *NewMD = UpdateInlinedAtInfo(IMD, TheCallMD); - I->setMetadata(LLVMContext::MD_dbg, NewMD); + if (!TheCallDL.isUnknown()) { + DebugLoc IDL = I->getDebugLoc(); + if (!IDL.isUnknown()) { + DebugLoc NewDL = UpdateInlinedAtInfo(IDL, TheCallDL, + I->getContext()); + I->setDebugLoc(NewDL); } } else { // The cloned instruction has dbg info but the call instruction // does not have dbg info. Remove dbg info from cloned instruction. - I->setMetadata(LLVMContext::MD_dbg, 0); + I->setDebugLoc(DebugLoc()); } } PHIToResolve.push_back(cast(OldI)); @@ -443,15 +436,17 @@ // Otherwise, remap the rest of the instructions normally. for (; I != NewBB->end(); ++I) { if (I->hasMetadata()) { - if (TheCallMD) { - if (MDNode *IMD = I->getMetadata(LLVMContext::MD_dbg)) { - MDNode *NewMD = UpdateInlinedAtInfo(IMD, TheCallMD); - I->setMetadata(LLVMContext::MD_dbg, NewMD); + if (!TheCallDL.isUnknown()) { + DebugLoc IDL = I->getDebugLoc(); + if (!IDL.isUnknown()) { + DebugLoc NewDL = UpdateInlinedAtInfo(IDL, TheCallDL, + I->getContext()); + I->setDebugLoc(NewDL); } } else { // The cloned instruction has dbg info but the call instruction // does not have dbg info. Remove dbg info from cloned instruction. - I->setMetadata(LLVMContext::MD_dbg, 0); + I->setDebugLoc(DebugLoc()); } } RemapInstruction(I, VMap); From gohman at apple.com Tue Jul 20 18:49:44 2010 From: gohman at apple.com (Dan Gohman) Date: Tue, 20 Jul 2010 23:49:44 -0000 Subject: [llvm-commits] [llvm] r108968 - /llvm/trunk/lib/Transforms/IPO/StripSymbols.cpp Message-ID: <20100720234944.D44BA2A6C12C@llvm.org> Author: djg Date: Tue Jul 20 18:49:44 2010 New Revision: 108968 URL: http://llvm.org/viewvc/llvm-project?rev=108968&view=rev Log: Make this code a little more readable. Modified: llvm/trunk/lib/Transforms/IPO/StripSymbols.cpp Modified: llvm/trunk/lib/Transforms/IPO/StripSymbols.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/StripSymbols.cpp?rev=108968&r1=108967&r2=108968&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/IPO/StripSymbols.cpp (original) +++ llvm/trunk/lib/Transforms/IPO/StripSymbols.cpp Tue Jul 20 18:49:44 2010 @@ -259,8 +259,10 @@ ++FI) for (BasicBlock::iterator BI = FI->begin(), BE = FI->end(); BI != BE; ++BI) { - Changed |= !BI->getDebugLoc().isUnknown(); - BI->setDebugLoc(DebugLoc()); + if (!BI->getDebugLoc().isUnknown()) { + Changed = true; + BI->setDebugLoc(DebugLoc()); + } } return Changed; From stoklund at 2pi.dk Tue Jul 20 18:50:15 2010 From: stoklund at 2pi.dk (Jakob Stoklund Olesen) Date: Tue, 20 Jul 2010 23:50:15 -0000 Subject: [llvm-commits] [llvm] r108969 - in /llvm/trunk/lib/CodeGen: InlineSpiller.cpp RegAllocLinearScan.cpp Spiller.cpp Spiller.h SplitKit.cpp SplitKit.h Message-ID: <20100720235015.C81432A6C12C@llvm.org> Author: stoklund Date: Tue Jul 20 18:50:15 2010 New Revision: 108969 URL: http://llvm.org/viewvc/llvm-project?rev=108969&view=rev Log: Change the createSpiller interface to take a MachineFunctionPass argument. The spillers can pluck the analyses they need from the pass reference. Switch some never-null pointers to references. Modified: llvm/trunk/lib/CodeGen/InlineSpiller.cpp llvm/trunk/lib/CodeGen/RegAllocLinearScan.cpp llvm/trunk/lib/CodeGen/Spiller.cpp llvm/trunk/lib/CodeGen/Spiller.h llvm/trunk/lib/CodeGen/SplitKit.cpp llvm/trunk/lib/CodeGen/SplitKit.h Modified: llvm/trunk/lib/CodeGen/InlineSpiller.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/InlineSpiller.cpp?rev=108969&r1=108968&r2=108969&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/InlineSpiller.cpp (original) +++ llvm/trunk/lib/CodeGen/InlineSpiller.cpp Tue Jul 20 18:50:15 2010 @@ -58,15 +58,19 @@ ~InlineSpiller() {} public: - InlineSpiller(MachineFunction *mf, LiveIntervals *lis, MachineLoopInfo *mli, - VirtRegMap *vrm) - : mf_(*mf), lis_(*lis), loops_(*mli), vrm_(*vrm), - mfi_(*mf->getFrameInfo()), - mri_(mf->getRegInfo()), - tii_(*mf->getTarget().getInstrInfo()), - tri_(*mf->getTarget().getRegisterInfo()), + InlineSpiller(MachineFunctionPass &pass, + MachineFunction &mf, + VirtRegMap &vrm) + : mf_(mf), + lis_(pass.getAnalysis()), + loops_(pass.getAnalysis()), + vrm_(vrm), + mfi_(*mf.getFrameInfo()), + mri_(mf.getRegInfo()), + tii_(*mf.getTarget().getInstrInfo()), + tri_(*mf.getTarget().getRegisterInfo()), reserved_(tri_.getReservedRegs(mf_)), - splitAnalysis_(mf, lis, mli) {} + splitAnalysis_(mf, lis_, loops_) {} void spill(LiveInterval *li, std::vector &newIntervals, @@ -89,11 +93,10 @@ } namespace llvm { -Spiller *createInlineSpiller(MachineFunction *mf, - LiveIntervals *lis, - MachineLoopInfo *mli, - VirtRegMap *vrm) { - return new InlineSpiller(mf, lis, mli, vrm); +Spiller *createInlineSpiller(MachineFunctionPass &pass, + MachineFunction &mf, + VirtRegMap &vrm) { + return new InlineSpiller(pass, mf, vrm); } } Modified: llvm/trunk/lib/CodeGen/RegAllocLinearScan.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RegAllocLinearScan.cpp?rev=108969&r1=108968&r2=108969&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/RegAllocLinearScan.cpp (original) +++ llvm/trunk/lib/CodeGen/RegAllocLinearScan.cpp Tue Jul 20 18:50:15 2010 @@ -483,7 +483,7 @@ vrm_ = &getAnalysis(); if (!rewriter_.get()) rewriter_.reset(createVirtRegRewriter()); - spiller_.reset(createSpiller(mf_, li_, loopInfo, vrm_)); + spiller_.reset(createSpiller(*this, *mf_, *vrm_)); initIntervalSets(); Modified: llvm/trunk/lib/CodeGen/Spiller.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/Spiller.cpp?rev=108969&r1=108968&r2=108969&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/Spiller.cpp (original) +++ llvm/trunk/lib/CodeGen/Spiller.cpp Tue Jul 20 18:50:15 2010 @@ -15,6 +15,7 @@ #include "llvm/CodeGen/MachineFrameInfo.h" #include "llvm/CodeGen/MachineFunction.h" #include "llvm/CodeGen/MachineInstrBuilder.h" +#include "llvm/CodeGen/MachineLoopInfo.h" #include "llvm/CodeGen/MachineRegisterInfo.h" #include "llvm/Target/TargetMachine.h" #include "llvm/Target/TargetInstrInfo.h" @@ -49,22 +50,24 @@ /// Utility class for spillers. class SpillerBase : public Spiller { protected: + MachineFunctionPass *pass; MachineFunction *mf; + VirtRegMap *vrm; LiveIntervals *lis; MachineFrameInfo *mfi; MachineRegisterInfo *mri; const TargetInstrInfo *tii; const TargetRegisterInfo *tri; - VirtRegMap *vrm; /// Construct a spiller base. - SpillerBase(MachineFunction *mf, LiveIntervals *lis, VirtRegMap *vrm) - : mf(mf), lis(lis), vrm(vrm) + SpillerBase(MachineFunctionPass &pass, MachineFunction &mf, VirtRegMap &vrm) + : pass(&pass), mf(&mf), vrm(&vrm) { - mfi = mf->getFrameInfo(); - mri = &mf->getRegInfo(); - tii = mf->getTarget().getInstrInfo(); - tri = mf->getTarget().getRegisterInfo(); + lis = &pass.getAnalysis(); + mfi = mf.getFrameInfo(); + mri = &mf.getRegInfo(); + tii = mf.getTarget().getInstrInfo(); + tri = mf.getTarget().getRegisterInfo(); } /// Add spill ranges for every use/def of the live interval, inserting loads @@ -173,8 +176,9 @@ class TrivialSpiller : public SpillerBase { public: - TrivialSpiller(MachineFunction *mf, LiveIntervals *lis, VirtRegMap *vrm) - : SpillerBase(mf, lis, vrm) {} + TrivialSpiller(MachineFunctionPass &pass, MachineFunction &mf, + VirtRegMap &vrm) + : SpillerBase(pass, mf, vrm) {} void spill(LiveInterval *li, std::vector &newIntervals, @@ -196,9 +200,11 @@ MachineLoopInfo *loopInfo; VirtRegMap *vrm; public: - StandardSpiller(LiveIntervals *lis, MachineLoopInfo *loopInfo, - VirtRegMap *vrm) - : lis(lis), loopInfo(loopInfo), vrm(vrm) {} + StandardSpiller(MachineFunctionPass &pass, MachineFunction &mf, + VirtRegMap &vrm) + : lis(&pass.getAnalysis()), + loopInfo(pass.getAnalysisIfAvailable()), + vrm(&vrm) {} /// Falls back on LiveIntervals::addIntervalsForSpills. void spill(LiveInterval *li, @@ -221,13 +227,12 @@ /// then the spiller falls back on the standard spilling mechanism. class SplittingSpiller : public StandardSpiller { public: - SplittingSpiller(MachineFunction *mf, LiveIntervals *lis, - MachineLoopInfo *loopInfo, VirtRegMap *vrm) - : StandardSpiller(lis, loopInfo, vrm) { - - mri = &mf->getRegInfo(); - tii = mf->getTarget().getInstrInfo(); - tri = mf->getTarget().getRegisterInfo(); + SplittingSpiller(MachineFunctionPass &pass, MachineFunction &mf, + VirtRegMap &vrm) + : StandardSpiller(pass, mf, vrm) { + mri = &mf.getRegInfo(); + tii = mf.getTarget().getInstrInfo(); + tri = mf.getTarget().getRegisterInfo(); } void spill(LiveInterval *li, @@ -506,20 +511,19 @@ namespace llvm { -Spiller *createInlineSpiller(MachineFunction*, - LiveIntervals*, - MachineLoopInfo*, - VirtRegMap*); +Spiller *createInlineSpiller(MachineFunctionPass &pass, + MachineFunction &mf, + VirtRegMap &vrm); } -llvm::Spiller* llvm::createSpiller(MachineFunction *mf, LiveIntervals *lis, - MachineLoopInfo *loopInfo, - VirtRegMap *vrm) { +llvm::Spiller* llvm::createSpiller(MachineFunctionPass &pass, + MachineFunction &mf, + VirtRegMap &vrm) { switch (spillerOpt) { default: assert(0 && "unknown spiller"); - case trivial: return new TrivialSpiller(mf, lis, vrm); - case standard: return new StandardSpiller(lis, loopInfo, vrm); - case splitting: return new SplittingSpiller(mf, lis, loopInfo, vrm); - case inline_: return createInlineSpiller(mf, lis, loopInfo, vrm); + case trivial: return new TrivialSpiller(pass, mf, vrm); + case standard: return new StandardSpiller(pass, mf, vrm); + case splitting: return new SplittingSpiller(pass, mf, vrm); + case inline_: return createInlineSpiller(pass, mf, vrm); } } Modified: llvm/trunk/lib/CodeGen/Spiller.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/Spiller.h?rev=108969&r1=108968&r2=108969&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/Spiller.h (original) +++ llvm/trunk/lib/CodeGen/Spiller.h Tue Jul 20 18:50:15 2010 @@ -16,14 +16,10 @@ namespace llvm { class LiveInterval; - class LiveIntervals; - class LiveStacks; class MachineFunction; - class MachineInstr; - class MachineLoopInfo; + class MachineFunctionPass; class SlotIndex; class VirtRegMap; - class VNInfo; /// Spiller interface. /// @@ -50,8 +46,9 @@ }; /// Create and return a spiller object, as specified on the command line. - Spiller* createSpiller(MachineFunction *mf, LiveIntervals *li, - MachineLoopInfo *loopInfo, VirtRegMap *vrm); + Spiller* createSpiller(MachineFunctionPass &pass, + MachineFunction &mf, + VirtRegMap &vrm); } #endif Modified: llvm/trunk/lib/CodeGen/SplitKit.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SplitKit.cpp?rev=108969&r1=108968&r2=108969&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SplitKit.cpp (original) +++ llvm/trunk/lib/CodeGen/SplitKit.cpp Tue Jul 20 18:50:15 2010 @@ -34,13 +34,13 @@ // Split Analysis //===----------------------------------------------------------------------===// -SplitAnalysis::SplitAnalysis(const MachineFunction *mf, - const LiveIntervals *lis, - const MachineLoopInfo *mli) - : mf_(*mf), - lis_(*lis), - loops_(*mli), - tii_(*mf->getTarget().getInstrInfo()), +SplitAnalysis::SplitAnalysis(const MachineFunction &mf, + const LiveIntervals &lis, + const MachineLoopInfo &mli) + : mf_(mf), + lis_(lis), + loops_(mli), + tii_(*mf.getTarget().getInstrInfo()), curli_(0) {} void SplitAnalysis::clear() { Modified: llvm/trunk/lib/CodeGen/SplitKit.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SplitKit.h?rev=108969&r1=108968&r2=108969&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SplitKit.h (original) +++ llvm/trunk/lib/CodeGen/SplitKit.h Tue Jul 20 18:50:15 2010 @@ -56,8 +56,8 @@ bool canAnalyzeBranch(const MachineBasicBlock *MBB); public: - SplitAnalysis(const MachineFunction *mf, const LiveIntervals *lis, - const MachineLoopInfo *mli); + SplitAnalysis(const MachineFunction &mf, const LiveIntervals &lis, + const MachineLoopInfo &mli); /// analyze - set curli to the specified interval, and analyze how it may be /// split. From gohman at apple.com Tue Jul 20 18:55:01 2010 From: gohman at apple.com (Dan Gohman) Date: Tue, 20 Jul 2010 23:55:01 -0000 Subject: [llvm-commits] [llvm] r108971 - /llvm/trunk/lib/VMCore/AsmWriter.cpp Message-ID: <20100720235503.1008D2A6C12C@llvm.org> Author: djg Date: Tue Jul 20 18:55:01 2010 New Revision: 108971 URL: http://llvm.org/viewvc/llvm-project?rev=108971&view=rev Log: Give MDNode printing has access to the current Module in more cases. This will be needed when function-local metadata can appear in places that aren't intrinsic function arguments. 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=108971&r1=108970&r2=108971&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/AsmWriter.cpp (original) +++ llvm/trunk/lib/VMCore/AsmWriter.cpp Tue Jul 20 18:55:01 2010 @@ -581,8 +581,12 @@ if (const Function *Func = dyn_cast(V)) return new SlotTracker(Func); - if (isa(V)) + if (const MDNode *MD = dyn_cast(V)) { + if (!MD->isFunctionLocal()) + return new SlotTracker(MD->getFunction()); + return new SlotTracker((Function *)0); + } return 0; } @@ -778,15 +782,14 @@ // Don't insert if N is a function-local metadata, these are always printed // inline. - if (N->isFunctionLocal()) - return; - - mdn_iterator I = mdnMap.find(N); - if (I != mdnMap.end()) - return; + if (!N->isFunctionLocal()) { + mdn_iterator I = mdnMap.find(N); + if (I != mdnMap.end()) + return; - unsigned DestSlot = mdnNext++; - mdnMap[N] = DestSlot; + unsigned DestSlot = mdnNext++; + mdnMap[N] = DestSlot; + } // Recursively add any MDNodes referenced by operands. for (unsigned i = 0, e = N->getNumOperands(); i != e; ++i) @@ -800,7 +803,8 @@ static void WriteAsOperandInternal(raw_ostream &Out, const Value *V, TypePrinting *TypePrinter, - SlotTracker *Machine); + SlotTracker *Machine, + const Module *Context); @@ -856,7 +860,8 @@ static void WriteConstantInternal(raw_ostream &Out, const Constant *CV, TypePrinting &TypePrinter, - SlotTracker *Machine) { + SlotTracker *Machine, + const Module *Context) { if (const ConstantInt *CI = dyn_cast(CV)) { if (CI->getType()->isIntegerTy(1)) { Out << (CI->getZExtValue() ? "true" : "false"); @@ -972,9 +977,11 @@ if (const BlockAddress *BA = dyn_cast(CV)) { Out << "blockaddress("; - WriteAsOperandInternal(Out, BA->getFunction(), &TypePrinter, Machine); + WriteAsOperandInternal(Out, BA->getFunction(), &TypePrinter, Machine, + Context); Out << ", "; - WriteAsOperandInternal(Out, BA->getBasicBlock(), &TypePrinter, Machine); + WriteAsOperandInternal(Out, BA->getBasicBlock(), &TypePrinter, Machine, + Context); Out << ")"; return; } @@ -994,12 +1001,14 @@ TypePrinter.print(ETy, Out); Out << ' '; WriteAsOperandInternal(Out, CA->getOperand(0), - &TypePrinter, Machine); + &TypePrinter, Machine, + Context); for (unsigned i = 1, e = CA->getNumOperands(); i != e; ++i) { Out << ", "; TypePrinter.print(ETy, Out); Out << ' '; - WriteAsOperandInternal(Out, CA->getOperand(i), &TypePrinter, Machine); + WriteAsOperandInternal(Out, CA->getOperand(i), &TypePrinter, Machine, + Context); } } Out << ']'; @@ -1017,14 +1026,16 @@ TypePrinter.print(CS->getOperand(0)->getType(), Out); Out << ' '; - WriteAsOperandInternal(Out, CS->getOperand(0), &TypePrinter, Machine); + WriteAsOperandInternal(Out, CS->getOperand(0), &TypePrinter, Machine, + Context); for (unsigned i = 1; i < N; i++) { Out << ", "; TypePrinter.print(CS->getOperand(i)->getType(), Out); Out << ' '; - WriteAsOperandInternal(Out, CS->getOperand(i), &TypePrinter, Machine); + WriteAsOperandInternal(Out, CS->getOperand(i), &TypePrinter, Machine, + Context); } Out << ' '; } @@ -1039,7 +1050,8 @@ Out << "{ "; TypePrinter.print(CU->getOperand(0)->getType(), Out); Out << ' '; - WriteAsOperandInternal(Out, CU->getOperand(0), &TypePrinter, Machine); + WriteAsOperandInternal(Out, CU->getOperand(0), &TypePrinter, Machine, + Context); Out << " }"; return; } @@ -1051,12 +1063,14 @@ Out << '<'; TypePrinter.print(ETy, Out); Out << ' '; - WriteAsOperandInternal(Out, CP->getOperand(0), &TypePrinter, Machine); + WriteAsOperandInternal(Out, CP->getOperand(0), &TypePrinter, Machine, + Context); for (unsigned i = 1, e = CP->getNumOperands(); i != e; ++i) { Out << ", "; TypePrinter.print(ETy, Out); Out << ' '; - WriteAsOperandInternal(Out, CP->getOperand(i), &TypePrinter, Machine); + WriteAsOperandInternal(Out, CP->getOperand(i), &TypePrinter, Machine, + Context); } Out << '>'; return; @@ -1087,7 +1101,7 @@ for (User::const_op_iterator OI=CE->op_begin(); OI != CE->op_end(); ++OI) { TypePrinter.print((*OI)->getType(), Out); Out << ' '; - WriteAsOperandInternal(Out, *OI, &TypePrinter, Machine); + WriteAsOperandInternal(Out, *OI, &TypePrinter, Machine, Context); if (OI+1 != CE->op_end()) Out << ", "; } @@ -1112,7 +1126,8 @@ static void WriteMDNodeBodyInternal(raw_ostream &Out, const MDNode *Node, TypePrinting *TypePrinter, - SlotTracker *Machine) { + SlotTracker *Machine, + const Module *Context) { Out << "!{"; for (unsigned mi = 0, me = Node->getNumOperands(); mi != me; ++mi) { const Value *V = Node->getOperand(mi); @@ -1122,7 +1137,7 @@ TypePrinter->print(V->getType(), Out); Out << ' '; WriteAsOperandInternal(Out, Node->getOperand(mi), - TypePrinter, Machine); + TypePrinter, Machine, Context); } if (mi + 1 != me) Out << ", "; @@ -1138,7 +1153,8 @@ /// static void WriteAsOperandInternal(raw_ostream &Out, const Value *V, TypePrinting *TypePrinter, - SlotTracker *Machine) { + SlotTracker *Machine, + const Module *Context) { if (V->hasName()) { PrintLLVMName(Out, V); return; @@ -1147,7 +1163,7 @@ const Constant *CV = dyn_cast(V); if (CV && !isa(CV)) { assert(TypePrinter && "Constants require TypePrinting!"); - WriteConstantInternal(Out, CV, *TypePrinter, Machine); + WriteConstantInternal(Out, CV, *TypePrinter, Machine, Context); return; } @@ -1168,12 +1184,16 @@ if (const MDNode *N = dyn_cast(V)) { if (N->isFunctionLocal()) { // Print metadata inline, not via slot reference number. - WriteMDNodeBodyInternal(Out, N, TypePrinter, Machine); + WriteMDNodeBodyInternal(Out, N, TypePrinter, Machine, Context); return; } - if (!Machine) - Machine = createSlotTracker(V); + if (!Machine) { + if (N->isFunctionLocal()) + Machine = new SlotTracker(N->getFunction()); + else + Machine = new SlotTracker(Context); + } Out << '!' << Machine->getMetadataSlot(N); return; } @@ -1227,8 +1247,9 @@ // Fast path: Don't construct and populate a TypePrinting object if we // won't be needing any types printed. if (!PrintType && - (!isa(V) || V->hasName() || isa(V))) { - WriteAsOperandInternal(Out, V, 0, 0); + ((!isa(V) && !isa(V)) || + V->hasName() || isa(V))) { + WriteAsOperandInternal(Out, V, 0, 0, Context); return; } @@ -1242,7 +1263,7 @@ Out << ' '; } - WriteAsOperandInternal(Out, V, &TypePrinter, 0); + WriteAsOperandInternal(Out, V, &TypePrinter, 0, Context); } namespace { @@ -1297,7 +1318,7 @@ TypePrinter.print(Operand->getType(), Out); Out << ' '; } - WriteAsOperandInternal(Out, Operand, &TypePrinter, &Machine); + WriteAsOperandInternal(Out, Operand, &TypePrinter, &Machine, TheModule); } void AssemblyWriter::writeParamOperand(const Value *Operand, @@ -1314,7 +1335,7 @@ Out << ' ' << Attribute::getAsString(Attrs); Out << ' '; // Print the operand - WriteAsOperandInternal(Out, Operand, &TypePrinter, &Machine); + WriteAsOperandInternal(Out, Operand, &TypePrinter, &Machine, TheModule); } void AssemblyWriter::printModule(const Module *M) { @@ -1451,7 +1472,7 @@ if (GV->isMaterializable()) Out << "; Materializable\n"; - WriteAsOperandInternal(Out, GV, &TypePrinter, &Machine); + WriteAsOperandInternal(Out, GV, &TypePrinter, &Machine, GV->getParent()); Out << " = "; if (!GV->hasInitializer() && GV->hasExternalLinkage()) @@ -1510,7 +1531,7 @@ TypePrinter.print(F->getFunctionType(), Out); Out << "* "; - WriteAsOperandInternal(Out, F, &TypePrinter, &Machine); + WriteAsOperandInternal(Out, F, &TypePrinter, &Machine, F->getParent()); } else if (const GlobalAlias *GA = dyn_cast(Aliasee)) { TypePrinter.print(GA->getType(), Out); Out << ' '; @@ -1593,7 +1614,7 @@ Out << Attribute::getAsString(Attrs.getRetAttributes()) << ' '; TypePrinter.print(F->getReturnType(), Out); Out << ' '; - WriteAsOperandInternal(Out, F, &TypePrinter, &Machine); + WriteAsOperandInternal(Out, F, &TypePrinter, &Machine, F->getParent()); Out << '('; Machine.incorporateFunction(F); @@ -2029,7 +2050,9 @@ } else { Out << ", !"; } - Out << " !" << Machine.getMetadataSlot(InstMD[i].second); + Out << ' '; + WriteAsOperandInternal(Out, InstMD[i].second, &TypePrinter, &Machine, + TheModule); } } printInfoComment(I); @@ -2077,7 +2100,7 @@ } void AssemblyWriter::printMDNodeBody(const MDNode *Node) { - WriteMDNodeBodyInternal(Out, Node, &TypePrinter, &Machine); + WriteMDNodeBodyInternal(Out, Node, &TypePrinter, &Machine, TheModule); WriteMDNodeComment(Node, Out); Out << "\n"; } @@ -2138,7 +2161,7 @@ TypePrinting TypePrinter; TypePrinter.print(C->getType(), OS); OS << ' '; - WriteConstantInternal(OS, C, TypePrinter, 0); + WriteConstantInternal(OS, C, TypePrinter, 0, 0); } else if (isa(this) || isa(this) || isa(this)) { WriteAsOperand(OS, this, true, 0); From deeppatel1987 at gmail.com Tue Jul 20 19:18:44 2010 From: deeppatel1987 at gmail.com (Sandeep Patel) Date: Wed, 21 Jul 2010 00:18:44 +0000 Subject: [llvm-commits] [patch] Fix calling convention on ARM if vfp2+ is enabled In-Reply-To: References: Message-ID: Nevermind, I see the test case in the patch. This looks good to me. Sorry I missed this case. deep On Tue, Jul 20, 2010 at 10:41 PM, Sandeep Patel wrote: > I think this is what test/CodeGen/ARM/arguments.ll and > arguments_f64_backfill.ll are testing. > > Can you provide a test that shows the case you think is incorrect? > > deep > > On Tue, Jul 20, 2010 at 10:29 PM, Rafael Espindola wrote: >> If vfp2 or newer is enabled, f64 is legal and we have to shadow r1 >> when a double is assigned to r2. This was already handle correctly >> when f64 was being split, this patch adds the case where it is legal. >> >> I changed which registers are "shadowed". My understanding is that >> when a f64 is assigned to r2/r3, register r1 is the one shadowed. >> Registers r2 and r3 are simply used. That is the meaning used on the >> .td file. Should I change the .td? >> >> Cheers, >> -- >> Rafael ?vila de Esp?ndola >> >> _______________________________________________ >> llvm-commits mailing list >> llvm-commits at cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits >> >> > From daniel at zuster.org Tue Jul 20 21:07:59 2010 From: daniel at zuster.org (Daniel Dunbar) Date: Wed, 21 Jul 2010 02:07:59 -0000 Subject: [llvm-commits] [test-suite] r108981 - /test-suite/trunk/Makefile.rules Message-ID: <20100721020759.D652F2A6C12C@llvm.org> Author: ddunbar Date: Tue Jul 20 21:07:59 2010 New Revision: 108981 URL: http://llvm.org/viewvc/llvm-project?rev=108981&view=rev Log: Invent an LLVM_RELEASE_IS_PLUS_ASSERTS make variable, to allow using LLVM test suite with older LLVM source trees. Modified: test-suite/trunk/Makefile.rules Modified: test-suite/trunk/Makefile.rules URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/Makefile.rules?rev=108981&r1=108980&r2=108981&view=diff ============================================================================== --- test-suite/trunk/Makefile.rules (original) +++ test-suite/trunk/Makefile.rules Tue Jul 20 21:07:59 2010 @@ -152,12 +152,25 @@ CONFIGURATION := $(CONFIGURATION)+Profile endif +# We cleverly reversed the sense of this variable in r107758, support use of +# LLVM_RELEASE_IS_PLUS_ASSERTS to allow testing old LLVM revs. We can eliminate +# this when we kill the dependency on LLVM's Makefiles. +ifeq ($(LLVM_RELEASE_IS_PLUS_ASSERTS),1) + +ifeq ($(DISABLE_ASSERTIONS),1) + CONFIGURATION := $(CONFIGURATION)-Asserts +endif + +else + # Unless DISABLE_ASSERTIONS=1 is specified (make command line or configured), # adjust the CONFIGURATION name appropriately (to match LLVM makefiles) ifneq ($(DISABLE_ASSERTIONS),1) CONFIGURATION := $(CONFIGURATION)+Asserts endif +endif + # If ENABLE_EXPENSIVE_CHECKS=1 is specified (make command line or # configured), then adjust the CONFIGURATION name appropriately # (to match LLVM makefiles) From daniel at zuster.org Tue Jul 20 21:23:54 2010 From: daniel at zuster.org (Daniel Dunbar) Date: Wed, 21 Jul 2010 02:23:54 -0000 Subject: [llvm-commits] [zorg] r108982 - /zorg/trunk/lnt/lnt/tests/nt.py Message-ID: <20100721022355.060602A6C12C@llvm.org> Author: ddunbar Date: Tue Jul 20 21:23:54 2010 New Revision: 108982 URL: http://llvm.org/viewvc/llvm-project?rev=108982&view=rev Log: LNT/nt: Teach LNT to automatically set LLVM_RELEASE_IS_PLUS_ASSERTS based on the inferred LLVM revision, to support testing older LLVM revs. Modified: zorg/trunk/lnt/lnt/tests/nt.py Modified: zorg/trunk/lnt/lnt/tests/nt.py URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/lnt/lnt/tests/nt.py?rev=108982&r1=108981&r2=108982&view=diff ============================================================================== --- zorg/trunk/lnt/lnt/tests/nt.py (original) +++ zorg/trunk/lnt/lnt/tests/nt.py Tue Jul 20 21:23:54 2010 @@ -18,6 +18,8 @@ return datetime.utcnow().strftime('%Y-%m-%d %H:%M:%S') def run_test(nick_prefix, opts): + llvm_source_version = get_source_version(opts.llvm_src_root) + # Compute TARGET_FLAGS. target_flags = [] @@ -137,6 +139,11 @@ if cc_info.get('cc_name') in ('apple_clang', 'clang'): make_variables['CC_UNDER_TEST_IS_CLANG'] = '1' + # Set LLVM_RELEASE_IS_PLUS_ASSERTS when appropriate, to allow testing older + # LLVM source trees. + if llvm_source_version.isdigit() and int(llvm_source_version) < 107758: + make_variables['LLVM_RELEASE_IS_PLUS_ASSERTS'] = 1 + # Set ARCH appropriately, based on the inferred target. # # FIXME: We should probably be more strict about this. @@ -411,7 +418,7 @@ # FIXME: Hack, use better method of getting versions. Ideally, from binaries # so we are more likely to be accurate. - run_info['llvm_revision'] = get_source_version(opts.llvm_src_root) + run_info['llvm_revision'] = llvm_source_version run_info['test_suite_revision'] = get_source_version(opts.test_suite_root) run_info.update(public_make_variables) From bruno.cardoso at gmail.com Tue Jul 20 21:46:58 2010 From: bruno.cardoso at gmail.com (Bruno Cardoso Lopes) Date: Wed, 21 Jul 2010 02:46:58 -0000 Subject: [llvm-commits] [llvm] r108983 - in /llvm/trunk: lib/Target/X86/X86InstrSSE.td lib/Target/X86/X86MCCodeEmitter.cpp test/MC/AsmParser/X86/x86_32-encoding.s test/MC/AsmParser/X86/x86_64-encoding.s Message-ID: <20100721024658.8DEEB2A6C12C@llvm.org> Author: bruno Date: Tue Jul 20 21:46:58 2010 New Revision: 108983 URL: http://llvm.org/viewvc/llvm-project?rev=108983&view=rev Log: Add new AVX vmaskmov instructions, and also fix the VEX encoding bits to support it Modified: llvm/trunk/lib/Target/X86/X86InstrSSE.td llvm/trunk/lib/Target/X86/X86MCCodeEmitter.cpp llvm/trunk/test/MC/AsmParser/X86/x86_32-encoding.s llvm/trunk/test/MC/AsmParser/X86/x86_64-encoding.s Modified: llvm/trunk/lib/Target/X86/X86InstrSSE.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrSSE.td?rev=108983&r1=108982&r2=108983&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86InstrSSE.td (original) +++ llvm/trunk/lib/Target/X86/X86InstrSSE.td Tue Jul 20 21:46:58 2010 @@ -256,10 +256,10 @@ let isAsmParserOnly = 1 in { def VMOVSSmr : SI<0x11, MRMDestMem, (outs), (ins f32mem:$dst, FR32:$src), "movss\t{$src, $dst|$dst, $src}", - [(store FR32:$src, addr:$dst)]>, XS, VEX_4V; + [(store FR32:$src, addr:$dst)]>, XS, VEX; def VMOVSDmr : SI<0x11, MRMDestMem, (outs), (ins f64mem:$dst, FR64:$src), "movsd\t{$src, $dst|$dst, $src}", - [(store FR64:$src, addr:$dst)]>, XD, VEX_4V; + [(store FR64:$src, addr:$dst)]>, XD, VEX; } // Extract and store. @@ -5018,4 +5018,27 @@ "vextractf128\t{$src2, $src1, $dst|$dst, $src1, $src2}", []>, VEX; +// Conditional SIMD Packed Loads and Stores +multiclass avx_movmask_rm opc_rm, bits<8> opc_mr, string OpcodeStr> { + def rm : AVX8I, VEX_4V; + def Yrm : AVX8I, VEX_4V; + def mr : AVX8I, VEX_4V; + def Ymr : AVX8I, VEX_4V; +} + +defm VMASKMOVPS : avx_movmask_rm<0x2C, 0x2E, "vmaskmovps">; +defm VMASKMOVPD : avx_movmask_rm<0x2D, 0x2F, "vmaskmovpd">; + } // isAsmParserOnly Modified: llvm/trunk/lib/Target/X86/X86MCCodeEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86MCCodeEmitter.cpp?rev=108983&r1=108982&r2=108983&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86MCCodeEmitter.cpp (original) +++ llvm/trunk/lib/Target/X86/X86MCCodeEmitter.cpp Tue Jul 20 21:46:58 2010 @@ -469,30 +469,36 @@ unsigned NumOps = MI.getNumOperands(); unsigned CurOp = 0; + bool IsDestMem = false; switch (TSFlags & X86II::FormMask) { case X86II::MRMInitReg: assert(0 && "FIXME: Remove this!"); + case X86II::MRMDestMem: + IsDestMem = true; + // The important info for the VEX prefix is never beyond the address + // registers. Don't check beyond that. + NumOps = CurOp = X86::AddrNumOperands; case X86II::MRM0m: case X86II::MRM1m: case X86II::MRM2m: case X86II::MRM3m: case X86II::MRM4m: case X86II::MRM5m: case X86II::MRM6m: case X86II::MRM7m: - case X86II::MRMDestMem: - NumOps = CurOp = X86::AddrNumOperands; case X86II::MRMSrcMem: case X86II::MRMSrcReg: if (MI.getNumOperands() > CurOp && MI.getOperand(CurOp).isReg() && X86InstrInfo::isX86_64ExtendedReg(MI.getOperand(CurOp).getReg())) VEX_R = 0x0; - - // CurOp and NumOps are equal when VEX_R represents a register used - // to index a memory destination (which is the last operand) - CurOp = (CurOp == NumOps) ? 0 : CurOp+1; + CurOp++; if (HasVEX_4V) { - VEX_4V = getVEXRegisterEncoding(MI, CurOp); + VEX_4V = getVEXRegisterEncoding(MI, IsDestMem ? CurOp-1 : CurOp); CurOp++; } + // To only check operands before the memory address ones, start + // the search from the begining + if (IsDestMem) + CurOp = 0; + // If the last register should be encoded in the immediate field // do not use any bit from VEX prefix to this register, ignore it if (TSFlags & X86II::VEX_I8IMM) @@ -833,10 +839,15 @@ case X86II::MRMDestMem: EmitByte(BaseOpcode, CurByte, OS); + SrcRegNum = CurOp + X86::AddrNumOperands; + + if (HasVEX_4V) // Skip 1st src (which is encoded in VEX_VVVV) + SrcRegNum++; + EmitMemModRMByte(MI, CurOp, - GetX86RegNum(MI.getOperand(CurOp + X86::AddrNumOperands)), + GetX86RegNum(MI.getOperand(SrcRegNum)), TSFlags, CurByte, OS, Fixups); - CurOp += X86::AddrNumOperands + 1; + CurOp = SrcRegNum + 1; break; case X86II::MRMSrcReg: Modified: llvm/trunk/test/MC/AsmParser/X86/x86_32-encoding.s URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AsmParser/X86/x86_32-encoding.s?rev=108983&r1=108982&r2=108983&view=diff ============================================================================== --- llvm/trunk/test/MC/AsmParser/X86/x86_32-encoding.s (original) +++ llvm/trunk/test/MC/AsmParser/X86/x86_32-encoding.s Tue Jul 20 21:46:58 2010 @@ -13030,3 +13030,35 @@ // CHECK: encoding: [0xc4,0xe3,0x7d,0x19,0x10,0x07] vextractf128 $7, %ymm2, (%eax) +// CHECK: vmaskmovpd %xmm2, %xmm5, (%eax) +// CHECK: encoding: [0xc4,0xe2,0x51,0x2f,0x10] + vmaskmovpd %xmm2, %xmm5, (%eax) + +// CHECK: vmaskmovpd %ymm2, %ymm5, (%eax) +// CHECK: encoding: [0xc4,0xe2,0x55,0x2f,0x10] + vmaskmovpd %ymm2, %ymm5, (%eax) + +// CHECK: vmaskmovpd (%eax), %xmm2, %xmm5 +// CHECK: encoding: [0xc4,0xe2,0x69,0x2d,0x28] + vmaskmovpd (%eax), %xmm2, %xmm5 + +// CHECK: vmaskmovpd (%eax), %ymm2, %ymm5 +// CHECK: encoding: [0xc4,0xe2,0x6d,0x2d,0x28] + vmaskmovpd (%eax), %ymm2, %ymm5 + +// CHECK: vmaskmovps %xmm2, %xmm5, (%eax) +// CHECK: encoding: [0xc4,0xe2,0x51,0x2e,0x10] + vmaskmovps %xmm2, %xmm5, (%eax) + +// CHECK: vmaskmovps %ymm2, %ymm5, (%eax) +// CHECK: encoding: [0xc4,0xe2,0x55,0x2e,0x10] + vmaskmovps %ymm2, %ymm5, (%eax) + +// CHECK: vmaskmovps (%eax), %xmm2, %xmm5 +// CHECK: encoding: [0xc4,0xe2,0x69,0x2c,0x28] + vmaskmovps (%eax), %xmm2, %xmm5 + +// CHECK: vmaskmovps (%eax), %ymm2, %ymm5 +// CHECK: encoding: [0xc4,0xe2,0x6d,0x2c,0x28] + vmaskmovps (%eax), %ymm2, %ymm5 + Modified: llvm/trunk/test/MC/AsmParser/X86/x86_64-encoding.s URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AsmParser/X86/x86_64-encoding.s?rev=108983&r1=108982&r2=108983&view=diff ============================================================================== --- llvm/trunk/test/MC/AsmParser/X86/x86_64-encoding.s (original) +++ llvm/trunk/test/MC/AsmParser/X86/x86_64-encoding.s Tue Jul 20 21:46:58 2010 @@ -3104,3 +3104,35 @@ // CHECK: encoding: [0xc4,0x63,0x7d,0x19,0x20,0x07] vextractf128 $7, %ymm12, (%rax) +// CHECK: vmaskmovpd %xmm12, %xmm10, (%rax) +// CHECK: encoding: [0xc4,0x62,0x29,0x2f,0x20] + vmaskmovpd %xmm12, %xmm10, (%rax) + +// CHECK: vmaskmovpd %ymm12, %ymm10, (%rax) +// CHECK: encoding: [0xc4,0x62,0x2d,0x2f,0x20] + vmaskmovpd %ymm12, %ymm10, (%rax) + +// CHECK: vmaskmovpd (%rax), %xmm12, %xmm10 +// CHECK: encoding: [0xc4,0x62,0x19,0x2d,0x10] + vmaskmovpd (%rax), %xmm12, %xmm10 + +// CHECK: vmaskmovpd (%rax), %ymm12, %ymm10 +// CHECK: encoding: [0xc4,0x62,0x1d,0x2d,0x10] + vmaskmovpd (%rax), %ymm12, %ymm10 + +// CHECK: vmaskmovps %xmm12, %xmm10, (%rax) +// CHECK: encoding: [0xc4,0x62,0x29,0x2e,0x20] + vmaskmovps %xmm12, %xmm10, (%rax) + +// CHECK: vmaskmovps %ymm12, %ymm10, (%rax) +// CHECK: encoding: [0xc4,0x62,0x2d,0x2e,0x20] + vmaskmovps %ymm12, %ymm10, (%rax) + +// CHECK: vmaskmovps (%rax), %xmm12, %xmm10 +// CHECK: encoding: [0xc4,0x62,0x19,0x2c,0x10] + vmaskmovps (%rax), %xmm12, %xmm10 + +// CHECK: vmaskmovps (%rax), %ymm12, %ymm10 +// CHECK: encoding: [0xc4,0x62,0x1d,0x2c,0x10] + vmaskmovps (%rax), %ymm12, %ymm10 + From bruno.cardoso at gmail.com Tue Jul 20 22:07:42 2010 From: bruno.cardoso at gmail.com (Bruno Cardoso Lopes) Date: Wed, 21 Jul 2010 03:07:42 -0000 Subject: [llvm-commits] [llvm] r108984 - in /llvm/trunk: lib/Target/X86/X86InstrSSE.td test/MC/AsmParser/X86/x86_32-encoding.s test/MC/AsmParser/X86/x86_64-encoding.s Message-ID: <20100721030743.7C8372A6C12C@llvm.org> Author: bruno Date: Tue Jul 20 22:07:42 2010 New Revision: 108984 URL: http://llvm.org/viewvc/llvm-project?rev=108984&view=rev Log: Add new AVX vpermilps, vpermilpd and vperm2f128 instructions Modified: llvm/trunk/lib/Target/X86/X86InstrSSE.td llvm/trunk/test/MC/AsmParser/X86/x86_32-encoding.s llvm/trunk/test/MC/AsmParser/X86/x86_64-encoding.s Modified: llvm/trunk/lib/Target/X86/X86InstrSSE.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrSSE.td?rev=108984&r1=108983&r2=108984&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86InstrSSE.td (original) +++ llvm/trunk/lib/Target/X86/X86InstrSSE.td Tue Jul 20 22:07:42 2010 @@ -5041,4 +5041,39 @@ defm VMASKMOVPS : avx_movmask_rm<0x2C, 0x2E, "vmaskmovps">; defm VMASKMOVPD : avx_movmask_rm<0x2D, 0x2F, "vmaskmovpd">; +// Permute Floating-Point Values +multiclass avx_permil opc_rm, bits<8> opc_rmi, string OpcodeStr, + RegisterClass RC, X86MemOperand x86memop> { + def rr : AVX8I, VEX_4V; + def rm : AVX8I, VEX_4V; + def ri : AVXAIi8, VEX; + def mi : AVXAIi8, VEX; +} + +defm VPERMILPS : avx_permil<0x0C, 0x04, "vpermilps", VR128, f128mem>; +defm VPERMILPSY : avx_permil<0x0C, 0x04, "vpermilps", VR256, f256mem>; +defm VPERMILPD : avx_permil<0x0D, 0x05, "vpermilpd", VR128, f128mem>; +defm VPERMILPDY : avx_permil<0x0D, 0x05, "vpermilpd", VR256, f256mem>; + +def VPERM2F128rr : AVXAIi8<0x06, MRMSrcReg, (outs VR256:$dst), + (ins VR256:$src1, VR256:$src2, i8imm:$src3), + "vperm2f128\t{$src3, $src2, $src1, $dst|$dst, $src1, $src2, $src3}", + []>, VEX_4V; +def VPERM2F128rm : AVXAIi8<0x06, MRMSrcMem, (outs VR256:$dst), + (ins VR256:$src1, f256mem:$src2, i8imm:$src3), + "vperm2f128\t{$src3, $src2, $src1, $dst|$dst, $src1, $src2, $src3}", + []>, VEX_4V; + } // isAsmParserOnly Modified: llvm/trunk/test/MC/AsmParser/X86/x86_32-encoding.s URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AsmParser/X86/x86_32-encoding.s?rev=108984&r1=108983&r2=108984&view=diff ============================================================================== --- llvm/trunk/test/MC/AsmParser/X86/x86_32-encoding.s (original) +++ llvm/trunk/test/MC/AsmParser/X86/x86_32-encoding.s Tue Jul 20 22:07:42 2010 @@ -13062,3 +13062,75 @@ // CHECK: encoding: [0xc4,0xe2,0x6d,0x2c,0x28] vmaskmovps (%eax), %ymm2, %ymm5 +// CHECK: vpermilps $7, %xmm1, %xmm5 +// CHECK: encoding: [0xc4,0xe3,0x79,0x04,0xe9,0x07] + vpermilps $7, %xmm1, %xmm5 + +// CHECK: vpermilps $7, %ymm5, %ymm1 +// CHECK: encoding: [0xc4,0xe3,0x7d,0x04,0xcd,0x07] + vpermilps $7, %ymm5, %ymm1 + +// CHECK: vpermilps $7, (%eax), %xmm5 +// CHECK: encoding: [0xc4,0xe3,0x79,0x04,0x28,0x07] + vpermilps $7, (%eax), %xmm5 + +// CHECK: vpermilps $7, (%eax), %ymm5 +// CHECK: encoding: [0xc4,0xe3,0x7d,0x04,0x28,0x07] + vpermilps $7, (%eax), %ymm5 + +// CHECK: vpermilps %xmm1, %xmm5, %xmm1 +// CHECK: encoding: [0xc4,0xe2,0x51,0x0c,0xc9] + vpermilps %xmm1, %xmm5, %xmm1 + +// CHECK: vpermilps %ymm1, %ymm5, %ymm1 +// CHECK: encoding: [0xc4,0xe2,0x55,0x0c,0xc9] + vpermilps %ymm1, %ymm5, %ymm1 + +// CHECK: vpermilps (%eax), %xmm5, %xmm3 +// CHECK: encoding: [0xc4,0xe2,0x51,0x0c,0x18] + vpermilps (%eax), %xmm5, %xmm3 + +// CHECK: vpermilps (%eax), %ymm5, %ymm1 +// CHECK: encoding: [0xc4,0xe2,0x55,0x0c,0x08] + vpermilps (%eax), %ymm5, %ymm1 + +// CHECK: vpermilpd $7, %xmm1, %xmm5 +// CHECK: encoding: [0xc4,0xe3,0x79,0x05,0xe9,0x07] + vpermilpd $7, %xmm1, %xmm5 + +// CHECK: vpermilpd $7, %ymm5, %ymm1 +// CHECK: encoding: [0xc4,0xe3,0x7d,0x05,0xcd,0x07] + vpermilpd $7, %ymm5, %ymm1 + +// CHECK: vpermilpd $7, (%eax), %xmm5 +// CHECK: encoding: [0xc4,0xe3,0x79,0x05,0x28,0x07] + vpermilpd $7, (%eax), %xmm5 + +// CHECK: vpermilpd $7, (%eax), %ymm5 +// CHECK: encoding: [0xc4,0xe3,0x7d,0x05,0x28,0x07] + vpermilpd $7, (%eax), %ymm5 + +// CHECK: vpermilpd %xmm1, %xmm5, %xmm1 +// CHECK: encoding: [0xc4,0xe2,0x51,0x0d,0xc9] + vpermilpd %xmm1, %xmm5, %xmm1 + +// CHECK: vpermilpd %ymm1, %ymm5, %ymm1 +// CHECK: encoding: [0xc4,0xe2,0x55,0x0d,0xc9] + vpermilpd %ymm1, %ymm5, %ymm1 + +// CHECK: vpermilpd (%eax), %xmm5, %xmm3 +// CHECK: encoding: [0xc4,0xe2,0x51,0x0d,0x18] + vpermilpd (%eax), %xmm5, %xmm3 + +// CHECK: vpermilpd (%eax), %ymm5, %ymm1 +// CHECK: encoding: [0xc4,0xe2,0x55,0x0d,0x08] + vpermilpd (%eax), %ymm5, %ymm1 + +// CHECK: vperm2f128 $7, %ymm2, %ymm5, %ymm1 +// CHECK: encoding: [0xc4,0xe3,0x55,0x06,0xca,0x07] + vperm2f128 $7, %ymm2, %ymm5, %ymm1 + +// CHECK: vperm2f128 $7, (%eax), %ymm5, %ymm1 +// CHECK: encoding: [0xc4,0xe3,0x55,0x06,0x08,0x07] + vperm2f128 $7, (%eax), %ymm5, %ymm1 + Modified: llvm/trunk/test/MC/AsmParser/X86/x86_64-encoding.s URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AsmParser/X86/x86_64-encoding.s?rev=108984&r1=108983&r2=108984&view=diff ============================================================================== --- llvm/trunk/test/MC/AsmParser/X86/x86_64-encoding.s (original) +++ llvm/trunk/test/MC/AsmParser/X86/x86_64-encoding.s Tue Jul 20 22:07:42 2010 @@ -3136,3 +3136,75 @@ // CHECK: encoding: [0xc4,0x62,0x1d,0x2c,0x10] vmaskmovps (%rax), %ymm12, %ymm10 +// CHECK: vpermilps $7, %xmm11, %xmm10 +// CHECK: encoding: [0xc4,0x43,0x79,0x04,0xd3,0x07] + vpermilps $7, %xmm11, %xmm10 + +// CHECK: vpermilps $7, %ymm10, %ymm11 +// CHECK: encoding: [0xc4,0x43,0x7d,0x04,0xda,0x07] + vpermilps $7, %ymm10, %ymm11 + +// CHECK: vpermilps $7, (%rax), %xmm10 +// CHECK: encoding: [0xc4,0x63,0x79,0x04,0x10,0x07] + vpermilps $7, (%rax), %xmm10 + +// CHECK: vpermilps $7, (%rax), %ymm10 +// CHECK: encoding: [0xc4,0x63,0x7d,0x04,0x10,0x07] + vpermilps $7, (%rax), %ymm10 + +// CHECK: vpermilps %xmm11, %xmm10, %xmm11 +// CHECK: encoding: [0xc4,0x42,0x29,0x0c,0xdb] + vpermilps %xmm11, %xmm10, %xmm11 + +// CHECK: vpermilps %ymm11, %ymm10, %ymm11 +// CHECK: encoding: [0xc4,0x42,0x2d,0x0c,0xdb] + vpermilps %ymm11, %ymm10, %ymm11 + +// CHECK: vpermilps (%rax), %xmm10, %xmm13 +// CHECK: encoding: [0xc4,0x62,0x29,0x0c,0x28] + vpermilps (%rax), %xmm10, %xmm13 + +// CHECK: vpermilps (%rax), %ymm10, %ymm11 +// CHECK: encoding: [0xc4,0x62,0x2d,0x0c,0x18] + vpermilps (%rax), %ymm10, %ymm11 + +// CHECK: vpermilpd $7, %xmm11, %xmm10 +// CHECK: encoding: [0xc4,0x43,0x79,0x05,0xd3,0x07] + vpermilpd $7, %xmm11, %xmm10 + +// CHECK: vpermilpd $7, %ymm10, %ymm11 +// CHECK: encoding: [0xc4,0x43,0x7d,0x05,0xda,0x07] + vpermilpd $7, %ymm10, %ymm11 + +// CHECK: vpermilpd $7, (%rax), %xmm10 +// CHECK: encoding: [0xc4,0x63,0x79,0x05,0x10,0x07] + vpermilpd $7, (%rax), %xmm10 + +// CHECK: vpermilpd $7, (%rax), %ymm10 +// CHECK: encoding: [0xc4,0x63,0x7d,0x05,0x10,0x07] + vpermilpd $7, (%rax), %ymm10 + +// CHECK: vpermilpd %xmm11, %xmm10, %xmm11 +// CHECK: encoding: [0xc4,0x42,0x29,0x0d,0xdb] + vpermilpd %xmm11, %xmm10, %xmm11 + +// CHECK: vpermilpd %ymm11, %ymm10, %ymm11 +// CHECK: encoding: [0xc4,0x42,0x2d,0x0d,0xdb] + vpermilpd %ymm11, %ymm10, %ymm11 + +// CHECK: vpermilpd (%rax), %xmm10, %xmm13 +// CHECK: encoding: [0xc4,0x62,0x29,0x0d,0x28] + vpermilpd (%rax), %xmm10, %xmm13 + +// CHECK: vpermilpd (%rax), %ymm10, %ymm11 +// CHECK: encoding: [0xc4,0x62,0x2d,0x0d,0x18] + vpermilpd (%rax), %ymm10, %ymm11 + +// CHECK: vperm2f128 $7, %ymm12, %ymm10, %ymm11 +// CHECK: encoding: [0xc4,0x43,0x2d,0x06,0xdc,0x07] + vperm2f128 $7, %ymm12, %ymm10, %ymm11 + +// CHECK: vperm2f128 $7, (%rax), %ymm10, %ymm11 +// CHECK: encoding: [0xc4,0x63,0x2d,0x06,0x18,0x07] + vperm2f128 $7, (%rax), %ymm10, %ymm11 + From echristo at apple.com Tue Jul 20 23:51:24 2010 From: echristo at apple.com (Eric Christopher) Date: Wed, 21 Jul 2010 04:51:24 -0000 Subject: [llvm-commits] [llvm] r108985 - /llvm/trunk/test/FrontendC/vla-2.c Message-ID: <20100721045125.016322A6C12C@llvm.org> Author: echristo Date: Tue Jul 20 23:51:24 2010 New Revision: 108985 URL: http://llvm.org/viewvc/llvm-project?rev=108985&view=rev Log: Update this to use a "valid" alignment. Modified: llvm/trunk/test/FrontendC/vla-2.c Modified: llvm/trunk/test/FrontendC/vla-2.c URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/FrontendC/vla-2.c?rev=108985&r1=108984&r2=108985&view=diff ============================================================================== --- llvm/trunk/test/FrontendC/vla-2.c (original) +++ llvm/trunk/test/FrontendC/vla-2.c Tue Jul 20 23:51:24 2010 @@ -1,10 +1,10 @@ -// RUN: %llvmgcc -std=gnu99 %s -S -o - | grep ".*alloca.*align 32" +// RUN: %llvmgcc -std=gnu99 %s -S -o - | grep ".*alloca.*align 16" extern void bar(int[]); void foo(int a) { - int var[a] __attribute__((__aligned__(32))); + int var[a] __attribute__((__aligned__(16))); bar(var); return; } From echristo at apple.com Tue Jul 20 23:53:16 2010 From: echristo at apple.com (Eric Christopher) Date: Wed, 21 Jul 2010 04:53:16 -0000 Subject: [llvm-commits] [llvm-gcc-4.2] r108986 - /llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp Message-ID: <20100721045316.351C12A6C12C@llvm.org> Author: echristo Date: Tue Jul 20 23:53:15 2010 New Revision: 108986 URL: http://llvm.org/viewvc/llvm-project?rev=108986&view=rev Log: Make this error message dependent upon alignments set only by attribute as well as triggering on more code. Only by attribute solves problems that could occur via vector spill. Modified: llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp Modified: llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp?rev=108986&r1=108985&r2=108986&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp (original) +++ llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp Tue Jul 20 23:53:15 2010 @@ -820,8 +820,8 @@ // every time we see a variable. if (SeenVLA && GreatestAlignment > TheTarget->getFrameInfo()->getStackAlignment()) - error ("alignment for %q+D conflicts with either a dynamically " - "realigned stack or the maximum stack alignment", SeenVLA); + error ("alignment for %q+D conflicts with a dynamically realigned stack", + SeenVLA); return Fn; } @@ -1772,13 +1772,6 @@ DECL_SIZE(decl) != 0 && TREE_CODE(DECL_SIZE_UNIT(decl)) != INTEGER_CST) SeenVLA = decl; - // If this is just the rotten husk of a variable that the gimplifier - // eliminated all uses of, but is preserving for debug info, ignore it. - // TODO: This affects the correctness of the warning we're attempting to - // watch above. - if (TREE_CODE(decl) == VAR_DECL && DECL_VALUE_EXPR(decl)) - return; - // Gimple temporaries are handled specially: their DECL_LLVM is set when the // definition is encountered. if (isGimpleTemporary(decl)) @@ -1828,6 +1821,18 @@ Alignment = DECL_ALIGN(decl) / 8; } + // Record the alignment if it's the largest we've seen and is explicitly + // requested. + if (DECL_USER_ALIGN(decl) && Alignment > GreatestAlignment) + GreatestAlignment = Alignment; + + // If this is just the rotten husk of a variable that the gimplifier + // eliminated all uses of, but is preserving for debug info, ignore it. + // We're doing this late so that we can get the alignment information from + // the code. + if (TREE_CODE(decl) == VAR_DECL && DECL_VALUE_EXPR(decl)) + return; + const char *Name; // Name of variable if (DECL_NAME(decl)) Name = IDENTIFIER_POINTER(DECL_NAME(decl)); @@ -1847,10 +1852,6 @@ AI->setAlignment(Alignment); - // Record the alignment if it's the largest we've seen. - if (Alignment > GreatestAlignment) - GreatestAlignment = Alignment; - SET_DECL_LLVM(decl, AI); // Handle annotate attributes From echristo at apple.com Tue Jul 20 23:54:06 2010 From: echristo at apple.com (Eric Christopher) Date: Wed, 21 Jul 2010 04:54:06 -0000 Subject: [llvm-commits] [llvm] r108987 - /llvm/trunk/test/FrontendC/vla-1.c Message-ID: <20100721045406.A42312A6C12C@llvm.org> Author: echristo Date: Tue Jul 20 23:54:06 2010 New Revision: 108987 URL: http://llvm.org/viewvc/llvm-project?rev=108987&view=rev Log: Turn this test on again after the llvm-gcc change in r108986. Modified: llvm/trunk/test/FrontendC/vla-1.c Modified: llvm/trunk/test/FrontendC/vla-1.c URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/FrontendC/vla-1.c?rev=108987&r1=108986&r2=108987&view=diff ============================================================================== --- llvm/trunk/test/FrontendC/vla-1.c (original) +++ llvm/trunk/test/FrontendC/vla-1.c Tue Jul 20 23:54:06 2010 @@ -1,5 +1,4 @@ -// RUN: true -// %llvmgcc -std=gnu99 %s -S |& grep {error: "is greater than the stack alignment" } +// RUN: not %llvmgcc -std=gnu99 %s -S |& grep "error: alignment for" int foo(int a) { From clattner at apple.com Wed Jul 21 00:54:37 2010 From: clattner at apple.com (Chris Lattner) Date: Tue, 20 Jul 2010 22:54:37 -0700 Subject: [llvm-commits] [llvm] r108953 - /llvm/trunk/include/llvm/Support/MachO.h In-Reply-To: <20100720223600.C4BE72A6C12C@llvm.org> References: <20100720223600.C4BE72A6C12C@llvm.org> Message-ID: <1BB57431-EBBF-4724-B37A-4E5A5021E18A@apple.com> On Jul 20, 2010, at 3:36 PM, Greg Clayton wrote: > Author: gclayton > Date: Tue Jul 20 17:36:00 2010 > New Revision: 108953 > > URL: http://llvm.org/viewvc/llvm-project?rev=108953&view=rev > Log: > Added support to MachO.h for many defines and structures that are needed > to Parse mach-o files. All defines have been renamed to not conflict with > #defines in mach header files, all structures were left named the same but > are in the llvm::MachO namespace. Nice! > +#include Please use llvm/System/DataTypes.h. Some compilers (on windows?) don't have stdint.h. > + LoadCommandPreBindChecksum = 0x00000017u, // LC_PREBIND_CKSUM > + LoadCommandDylibLoadWeak = 0x80000018u, // LC_LOAD_WEAK_DYLIB > + LoadCommandSegment64 = 0x00000019u, // LC_SEGMENT_64 Please fit in 80 columns. > > + static inline uint8_t GET_COMM_ALIGN (uint16_t n_desc) > + { > + return (n_desc >> 8u) & 0x0fu; > + } > + > + static inline void SET_COMM_ALIGN (uint16_t &n_desc, uint8_t align) No spaces before the (. Thanks Greg! -Chris From evan.cheng at apple.com Wed Jul 21 01:09:07 2010 From: evan.cheng at apple.com (Evan Cheng) Date: Wed, 21 Jul 2010 06:09:07 -0000 Subject: [llvm-commits] [llvm] r108991 - in /llvm/trunk: include/llvm/Target/TargetLowering.h lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp lib/CodeGen/SelectionDAG/TargetLowering.cpp lib/Target/ARM/ARMISelLowering.cpp lib/Target/ARM/ARMISelLowering.h lib/Target/PIC16/PIC16ISelLowering.cpp lib/Target/PIC16/PIC16ISelLowering.h Message-ID: <20100721060908.414072A6C12C@llvm.org> Author: evancheng Date: Wed Jul 21 01:09:07 2010 New Revision: 108991 URL: http://llvm.org/viewvc/llvm-project?rev=108991&view=rev Log: Teach bottom up pre-ra scheduler to track register pressure. Work in progress. Modified: llvm/trunk/include/llvm/Target/TargetLowering.h llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp llvm/trunk/lib/Target/ARM/ARMISelLowering.h llvm/trunk/lib/Target/PIC16/PIC16ISelLowering.cpp llvm/trunk/lib/Target/PIC16/PIC16ISelLowering.h Modified: llvm/trunk/include/llvm/Target/TargetLowering.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetLowering.h?rev=108991&r1=108990&r2=108991&view=diff ============================================================================== --- llvm/trunk/include/llvm/Target/TargetLowering.h (original) +++ llvm/trunk/include/llvm/Target/TargetLowering.h Wed Jul 21 01:09:07 2010 @@ -174,12 +174,18 @@ /// For example, on i386 the rep register class for i8, i16, and i32 are GR32; /// while the rep register class is GR64 on x86_64. virtual const TargetRegisterClass *getRepRegClassFor(EVT VT) const { - assert(VT.isSimple() && "getRegClassFor called on illegal type!"); + assert(VT.isSimple() && "getRepRegClassFor called on illegal type!"); const TargetRegisterClass *RC = RepRegClassForVT[VT.getSimpleVT().SimpleTy]; - assert(RC && "This value type is not natively supported!"); return RC; } + /// getRepRegClassCostFor - Return the cost of the 'representative' register + /// class for the specified value type. + virtual uint8_t getRepRegClassCostFor(EVT VT) const { + assert(VT.isSimple() && "getRepRegClassCostFor called on illegal type!"); + return RepRegClassCostForVT[VT.getSimpleVT().SimpleTy]; + } + /// isTypeLegal - Return true if the target has native support for the /// specified value type. This means that it has a register that directly /// holds it without promotions or expansions. @@ -994,9 +1000,9 @@ } /// findRepresentativeClass - Return the largest legal super-reg register class - /// of the specified register class. - virtual const TargetRegisterClass * - findRepresentativeClass(const TargetRegisterClass *RC) const; + /// of the register class for the specified type and its associated "cost". + virtual std::pair + findRepresentativeClass(EVT VT) const; /// computeRegisterProperties - Once all of the register classes are added, /// this allows us to compute derived properties we expose. @@ -1581,10 +1587,17 @@ /// RepRegClassForVT - This indicates the "representative" register class to /// use for each ValueType the target supports natively. This information is - /// used by the scheduler to track register pressure. e.g. On x86, i8, i16, + /// used by the scheduler to track register pressure. By default, the + /// representative register class is the largest legal super-reg register + /// class of the register class of the specified type. e.g. On x86, i8, i16, /// and i32's representative class would be GR32. const TargetRegisterClass *RepRegClassForVT[MVT::LAST_VALUETYPE]; + /// RepRegClassCostForVT - This indicates the "cost" of the "representative" + /// register class for each ValueType. The cost is used by the scheduler to + /// approximate register pressure. + uint8_t RepRegClassCostForVT[MVT::LAST_VALUETYPE]; + /// Synthesizable indicates whether it is OK for the compiler to create new /// operations using this type. All Legal types are Synthesizable except /// MMX types on X86. Non-Legal types are not Synthesizable. Modified: llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp?rev=108991&r1=108990&r2=108991&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp Wed Jul 21 01:09:07 2010 @@ -24,15 +24,20 @@ #include "llvm/Target/TargetData.h" #include "llvm/Target/TargetMachine.h" #include "llvm/Target/TargetInstrInfo.h" +#include "llvm/Target/TargetLowering.h" #include "llvm/ADT/SmallSet.h" #include "llvm/ADT/Statistic.h" #include "llvm/ADT/STLExtras.h" +#include "llvm/Support/CommandLine.h" #include "llvm/Support/Debug.h" #include "llvm/Support/ErrorHandling.h" #include "llvm/Support/raw_ostream.h" #include using namespace llvm; +static cl::opt RegPressureAware("reg-pressure-aware-sched", + cl::init(false), cl::Hidden); + STATISTIC(NumBacktracks, "Number of times scheduler backtracked"); STATISTIC(NumUnfolds, "Number of nodes unfolded"); STATISTIC(NumDups, "Number of duplicated nodes"); @@ -181,7 +186,9 @@ /// Schedule - Schedule the DAG using list scheduling. void ScheduleDAGRRList::Schedule() { - DEBUG(dbgs() << "********** List Scheduling **********\n"); + DEBUG(dbgs() + << "********** List Scheduling BB#" << BB->getNumber() + << " **********\n"); NumLiveRegs = 0; LiveRegDefs.resize(TRI->getNumRegs(), NULL); @@ -989,7 +996,7 @@ : SPQ(spq) {} hybrid_ls_rr_sort(const hybrid_ls_rr_sort &RHS) : SPQ(RHS.SPQ) {} - + bool operator()(const SUnit* left, const SUnit* right) const; }; } // end anonymous namespace @@ -1029,23 +1036,46 @@ std::vector Queue; SF Picker; unsigned CurQueueId; + bool isBottomUp; protected: // SUnits - The SUnits for the current graph. std::vector *SUnits; - + + MachineFunction &MF; const TargetInstrInfo *TII; const TargetRegisterInfo *TRI; + const TargetLowering *TLI; ScheduleDAGRRList *scheduleDAG; // SethiUllmanNumbers - The SethiUllman number for each node. std::vector SethiUllmanNumbers; + /// RegPressure - Tracking current reg pressure per register class. + /// + std::vector RegPressure; + + /// RegLimit - Tracking the number of allocatable registers per register + /// class. + std::vector RegLimit; + public: - RegReductionPriorityQueue(const TargetInstrInfo *tii, - const TargetRegisterInfo *tri) - : Picker(this), CurQueueId(0), - TII(tii), TRI(tri), scheduleDAG(NULL) {} + RegReductionPriorityQueue(MachineFunction &mf, + bool isbottomup, + const TargetInstrInfo *tii, + const TargetRegisterInfo *tri, + const TargetLowering *tli) + : Picker(this), CurQueueId(0), isBottomUp(isbottomup), + MF(mf), TII(tii), TRI(tri), TLI(tli), scheduleDAG(NULL) { + unsigned NumRC = TRI->getNumRegClasses(); + RegLimit.resize(NumRC); + RegPressure.resize(NumRC); + std::fill(RegLimit.begin(), RegLimit.end(), 0); + std::fill(RegPressure.begin(), RegPressure.end(), 0); + for (TargetRegisterInfo::regclass_iterator I = TRI->regclass_begin(), + E = TRI->regclass_end(); I != E; ++I) + RegLimit[(*I)->getID()] = tri->getAllocatableSet(MF, *I).count() - 1; + } void initNodes(std::vector &sunits) { SUnits = &sunits; @@ -1072,6 +1102,7 @@ void releaseState() { SUnits = 0; SethiUllmanNumbers.clear(); + std::fill(RegPressure.begin(), RegPressure.end(), 0); } unsigned getNodePriority(const SUnit *SU) const { @@ -1139,10 +1170,191 @@ SU->NodeQueueId = 0; } + // EstimateSpills - Given a scheduling unit, estimate the number of spills + // it would cause by scheduling it at the current cycle. + unsigned EstimateSpills(const SUnit *SU) const { + if (!TLI) + return 0; + + unsigned Spills = 0; + for (SUnit::const_pred_iterator I = SU->Preds.begin(),E = SU->Preds.end(); + I != E; ++I) { + if (I->isCtrl()) + continue; + SUnit *PredSU = I->getSUnit(); + if (PredSU->NumSuccsLeft != PredSU->NumSuccs - 1) + continue; + const SDNode *N = PredSU->getNode(); + if (!N->isMachineOpcode()) + continue; + unsigned NumDefs = TII->get(N->getMachineOpcode()).getNumDefs(); + for (unsigned i = 0; i != NumDefs; ++i) { + EVT VT = N->getValueType(i); + if (!N->hasAnyUseOfValue(i)) + continue; + unsigned RCId = TLI->getRepRegClassFor(VT)->getID(); + unsigned Cost = TLI->getRepRegClassCostFor(VT); + // Check if this increases register pressure of the specific register + // class to the point where it would cause spills. + int Excess = RegPressure[RCId] + Cost - RegLimit[RCId]; + if (Excess > 0) + Spills += Excess; + } + } + + if (!SU->NumSuccs || !Spills) + return Spills; + const SDNode *N = SU->getNode(); + if (!N->isMachineOpcode()) + return Spills; + unsigned NumDefs = TII->get(N->getMachineOpcode()).getNumDefs(); + for (unsigned i = 0; i != NumDefs; ++i) { + EVT VT = N->getValueType(i); + if (!N->hasAnyUseOfValue(i)) + continue; + unsigned RCId = TLI->getRepRegClassFor(VT)->getID(); + unsigned Cost = TLI->getRepRegClassCostFor(VT); + if (RegPressure[RCId] > RegLimit[RCId]) { + int Less = RegLimit[RCId] - (RegPressure[RCId] - Cost); + if (Less > 0) { + if (Spills <= (unsigned)Less) + return 0; + Spills -= Less; + } + } + } + + return Spills; + } + + void OpenPredLives(SUnit *SU) { + const SDNode *N = SU->getNode(); + if (!N->isMachineOpcode()) + return; + unsigned Opc = N->getMachineOpcode(); + if (Opc == TargetOpcode::EXTRACT_SUBREG || + Opc == TargetOpcode::INSERT_SUBREG || + Opc == TargetOpcode::SUBREG_TO_REG || + Opc == TargetOpcode::COPY_TO_REGCLASS || + Opc == TargetOpcode::REG_SEQUENCE || + Opc == TargetOpcode::IMPLICIT_DEF) + return; + + for (SUnit::pred_iterator I = SU->Preds.begin(), E = SU->Preds.end(); + I != E; ++I) { + if (I->isCtrl()) + continue; + SUnit *PredSU = I->getSUnit(); + if (PredSU->NumSuccsLeft != PredSU->NumSuccs - 1) + continue; + const SDNode *PN = PredSU->getNode(); + if (!PN->isMachineOpcode()) + continue; + unsigned NumDefs = TII->get(PN->getMachineOpcode()).getNumDefs(); + for (unsigned i = 0; i != NumDefs; ++i) { + EVT VT = PN->getValueType(i); + if (!PN->hasAnyUseOfValue(i)) + continue; + unsigned RCId = TLI->getRepRegClassFor(VT)->getID(); + RegPressure[RCId] += TLI->getRepRegClassCostFor(VT); + } + } + + if (!SU->NumSuccs) + return; + unsigned NumDefs = TII->get(N->getMachineOpcode()).getNumDefs(); + for (unsigned i = 0; i != NumDefs; ++i) { + EVT VT = N->getValueType(i); + if (!N->hasAnyUseOfValue(i)) + continue; + unsigned RCId = TLI->getRepRegClassFor(VT)->getID(); + RegPressure[RCId] -= TLI->getRepRegClassCostFor(VT); + if (RegPressure[RCId] < 0) + // Register pressure tracking is imprecise. This can happen. + RegPressure[RCId] = 0; + } + } + + void ClosePredLives(SUnit *SU) { + const SDNode *N = SU->getNode(); + if (!N->isMachineOpcode()) + return; + unsigned Opc = N->getMachineOpcode(); + if (Opc == TargetOpcode::EXTRACT_SUBREG || + Opc == TargetOpcode::INSERT_SUBREG || + Opc == TargetOpcode::SUBREG_TO_REG || + Opc == TargetOpcode::COPY_TO_REGCLASS || + Opc == TargetOpcode::REG_SEQUENCE || + Opc == TargetOpcode::IMPLICIT_DEF) + return; + + for (SUnit::pred_iterator I = SU->Preds.begin(), E = SU->Preds.end(); + I != E; ++I) { + if (I->isCtrl()) + continue; + SUnit *PredSU = I->getSUnit(); + if (PredSU->NumSuccsLeft != PredSU->NumSuccs - 1) + continue; + const SDNode *PN = PredSU->getNode(); + if (!PN->isMachineOpcode()) + continue; + unsigned NumDefs = TII->get(PN->getMachineOpcode()).getNumDefs(); + for (unsigned i = 0; i != NumDefs; ++i) { + EVT VT = PN->getValueType(i); + if (!PN->hasAnyUseOfValue(i)) + continue; + unsigned RCId = TLI->getRepRegClassFor(VT)->getID(); + RegPressure[RCId] -= TLI->getRepRegClassCostFor(VT); + if (RegPressure[RCId] < 0) + // Register pressure tracking is imprecise. This can happen. + RegPressure[RCId] = 0; + } + } + + if (!SU->NumSuccs) + return; + unsigned NumDefs = TII->get(N->getMachineOpcode()).getNumDefs(); + for (unsigned i = NumDefs, e = N->getNumValues(); i != e; ++i) { + EVT VT = N->getValueType(i); + if (VT == MVT::Flag || VT == MVT::Other) + continue; + if (!N->hasAnyUseOfValue(i)) + continue; + unsigned RCId = TLI->getRepRegClassFor(VT)->getID(); + RegPressure[RCId] += TLI->getRepRegClassCostFor(VT); + } + } + + void ScheduledNode(SUnit *SU) { + if (!TLI || !isBottomUp) + return; + OpenPredLives(SU); + dumpRegPressure(); + } + + void UnscheduledNode(SUnit *SU) { + if (!TLI || !isBottomUp) + return; + ClosePredLives(SU); + dumpRegPressure(); + } + void setScheduleDAG(ScheduleDAGRRList *scheduleDag) { scheduleDAG = scheduleDag; } + void dumpRegPressure() const { + for (TargetRegisterInfo::regclass_iterator I = TRI->regclass_begin(), + E = TRI->regclass_end(); I != E; ++I) { + const TargetRegisterClass *RC = *I; + unsigned Id = RC->getID(); + unsigned RP = RegPressure[Id]; + if (!RP) continue; + DEBUG(dbgs() << RC->getName() << ": " << RP << " / " << RegLimit[Id] + << '\n'); + } + } + protected: bool canClobber(const SUnit *SU, const SUnit *Op); void AddPseudoTwoAddrDeps(); @@ -1635,8 +1847,8 @@ const TargetInstrInfo *TII = TM.getInstrInfo(); const TargetRegisterInfo *TRI = TM.getRegisterInfo(); - BURegReductionPriorityQueue *PQ = new BURegReductionPriorityQueue(TII, TRI); - + BURegReductionPriorityQueue *PQ = + new BURegReductionPriorityQueue(*IS->MF, true, TII, TRI, 0); ScheduleDAGRRList *SD = new ScheduleDAGRRList(*IS->MF, true, false, PQ); PQ->setScheduleDAG(SD); return SD; @@ -1648,8 +1860,8 @@ const TargetInstrInfo *TII = TM.getInstrInfo(); const TargetRegisterInfo *TRI = TM.getRegisterInfo(); - TDRegReductionPriorityQueue *PQ = new TDRegReductionPriorityQueue(TII, TRI); - + TDRegReductionPriorityQueue *PQ = + new TDRegReductionPriorityQueue(*IS->MF, false, TII, TRI, 0); ScheduleDAGRRList *SD = new ScheduleDAGRRList(*IS->MF, false, false, PQ); PQ->setScheduleDAG(SD); return SD; @@ -1661,8 +1873,8 @@ const TargetInstrInfo *TII = TM.getInstrInfo(); const TargetRegisterInfo *TRI = TM.getRegisterInfo(); - SrcRegReductionPriorityQueue *PQ = new SrcRegReductionPriorityQueue(TII, TRI); - + SrcRegReductionPriorityQueue *PQ = + new SrcRegReductionPriorityQueue(*IS->MF, true, TII, TRI, 0); ScheduleDAGRRList *SD = new ScheduleDAGRRList(*IS->MF, true, false, PQ); PQ->setScheduleDAG(SD); return SD; @@ -1673,9 +1885,11 @@ const TargetMachine &TM = IS->TM; const TargetInstrInfo *TII = TM.getInstrInfo(); const TargetRegisterInfo *TRI = TM.getRegisterInfo(); + const TargetLowering *TLI = &IS->getTargetLowering(); - HybridBURRPriorityQueue *PQ = new HybridBURRPriorityQueue(TII, TRI); - + HybridBURRPriorityQueue *PQ = + new HybridBURRPriorityQueue(*IS->MF, true, TII, TRI, + (RegPressureAware ? TLI : 0)); ScheduleDAGRRList *SD = new ScheduleDAGRRList(*IS->MF, true, true, PQ); PQ->setScheduleDAG(SD); return SD; Modified: llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp?rev=108991&r1=108990&r2=108991&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp Wed Jul 21 01:09:07 2010 @@ -678,9 +678,12 @@ } /// findRepresentativeClass - Return the largest legal super-reg register class -/// of the specified register class. -const TargetRegisterClass * -TargetLowering::findRepresentativeClass(const TargetRegisterClass *RC) const { +/// of the register class for the specified type and its associated "cost". +std::pair +TargetLowering::findRepresentativeClass(EVT VT) const { + const TargetRegisterClass *RC = RegClassForVT[VT.getSimpleVT().SimpleTy]; + if (!RC) + return std::make_pair(RC, 0); const TargetRegisterClass *BestRC = RC; for (TargetRegisterInfo::regclass_iterator I = RC->superregclasses_begin(), E = RC->superregclasses_end(); I != E; ++I) { @@ -688,10 +691,10 @@ if (RRC->isASubClass() || !isLegalRC(RRC)) continue; if (!hasLegalSuperRegRegClasses(RRC)) - return RRC; + return std::make_pair(RRC, 1); BestRC = RRC; } - return BestRC; + return std::make_pair(BestRC, 1); } /// computeRegisterProperties - Once all of the register classes are added, @@ -820,8 +823,11 @@ // a group of value types. For example, on i386, i8, i16, and i32 // representative would be GR32; while on x86_64 it's GR64. for (unsigned i = 0; i != MVT::LAST_VALUETYPE; ++i) { - const TargetRegisterClass *RC = RegClassForVT[i]; - RepRegClassForVT[i] = RC ? findRepresentativeClass(RC) : 0; + const TargetRegisterClass* RRC; + uint8_t Cost; + tie(RRC, Cost) = findRepresentativeClass((MVT::SimpleValueType)i); + RepRegClassForVT[i] = RRC; + RepRegClassCostForVT[i] = Cost; } } Modified: llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp?rev=108991&r1=108990&r2=108991&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp (original) +++ llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp Wed Jul 21 01:09:07 2010 @@ -550,20 +550,38 @@ benefitFromCodePlacementOpt = true; } -const TargetRegisterClass * -ARMTargetLowering::findRepresentativeClass(const TargetRegisterClass *RC) const{ - switch (RC->getID()) { +std::pair +ARMTargetLowering::findRepresentativeClass(EVT VT) const{ + const TargetRegisterClass *RRC = 0; + uint8_t Cost = 1; + switch (VT.getSimpleVT().SimpleTy) { default: - return RC; - case ARM::tGPRRegClassID: - case ARM::GPRRegClassID: - return ARM::GPRRegisterClass; - case ARM::SPRRegClassID: - case ARM::DPRRegClassID: - return ARM::DPRRegisterClass; - case ARM::QPRRegClassID: - return ARM::QPRRegisterClass; + return TargetLowering::findRepresentativeClass(VT); + // Use SPR as representative register class for all floating point + // and vector types. + case MVT::f32: + RRC = ARM::SPRRegisterClass; + break; + case MVT::f64: case MVT::v8i8: case MVT::v4i16: + case MVT::v2i32: case MVT::v1i64: case MVT::v2f32: + RRC = ARM::SPRRegisterClass; + Cost = 2; + break; + case MVT::v16i8: case MVT::v8i16: case MVT::v4i32: case MVT::v2i64: + case MVT::v4f32: case MVT::v2f64: + RRC = ARM::SPRRegisterClass; + Cost = 4; + break; + case MVT::v4i64: + RRC = ARM::SPRRegisterClass; + Cost = 8; + break; + case MVT::v8i64: + RRC = ARM::SPRRegisterClass; + Cost = 16; + break; } + return std::make_pair(RRC, Cost); } const char *ARMTargetLowering::getTargetNodeName(unsigned Opcode) const { Modified: llvm/trunk/lib/Target/ARM/ARMISelLowering.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMISelLowering.h?rev=108991&r1=108990&r2=108991&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMISelLowering.h (original) +++ llvm/trunk/lib/Target/ARM/ARMISelLowering.h Wed Jul 21 01:09:07 2010 @@ -272,8 +272,8 @@ virtual bool isFPImmLegal(const APFloat &Imm, EVT VT) const; protected: - const TargetRegisterClass * - findRepresentativeClass(const TargetRegisterClass *RC) const; + std::pair + findRepresentativeClass(EVT VT) const; private: /// Subtarget - Keep a pointer to the ARMSubtarget around so that we can Modified: llvm/trunk/lib/Target/PIC16/PIC16ISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PIC16/PIC16ISelLowering.cpp?rev=108991&r1=108990&r2=108991&view=diff ============================================================================== --- llvm/trunk/lib/Target/PIC16/PIC16ISelLowering.cpp (original) +++ llvm/trunk/lib/Target/PIC16/PIC16ISelLowering.cpp Wed Jul 21 01:09:07 2010 @@ -312,6 +312,16 @@ computeRegisterProperties(); } +std::pair +PIC16TargetLowering::findRepresentativeClass(EVT VT) const { + switch (VT.getSimpleVT().SimpleTy) { + default: + return TargetLowering::findRepresentativeClass(VT); + case MVT::i16: + return std::make_pair(PIC16::FSR16RegisterClass, 1); + } +} + // getOutFlag - Extract the flag result if the Op has it. static SDValue getOutFlag(SDValue &Op) { // Flag is the last value of the node. Modified: llvm/trunk/lib/Target/PIC16/PIC16ISelLowering.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PIC16/PIC16ISelLowering.h?rev=108991&r1=108990&r2=108991&view=diff ============================================================================== --- llvm/trunk/lib/Target/PIC16/PIC16ISelLowering.h (original) +++ llvm/trunk/lib/Target/PIC16/PIC16ISelLowering.h Wed Jul 21 01:09:07 2010 @@ -181,6 +181,9 @@ // FIXME: The function never seems to be aligned. return 1; } + protected: + std::pair + findRepresentativeClass(EVT VT) const; private: // If the Node is a BUILD_PAIR representing a direct Address, // then this function will return true. From ggreif at gmail.com Wed Jul 21 03:25:55 2010 From: ggreif at gmail.com (Gabor Greif) Date: Wed, 21 Jul 2010 08:25:55 -0000 Subject: [llvm-commits] [llvm] r109001 - /llvm/trunk/include/llvm/Instructions.h Message-ID: <20100721082555.F371D2A6C12C@llvm.org> Author: ggreif Date: Wed Jul 21 03:25:55 2010 New Revision: 109001 URL: http://llvm.org/viewvc/llvm-project?rev=109001&view=rev Log: restore aesthetics Modified: llvm/trunk/include/llvm/Instructions.h Modified: llvm/trunk/include/llvm/Instructions.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Instructions.h?rev=109001&r1=109000&r2=109001&view=diff ============================================================================== --- llvm/trunk/include/llvm/Instructions.h (original) +++ llvm/trunk/include/llvm/Instructions.h Wed Jul 21 03:25:55 2010 @@ -2734,7 +2734,7 @@ TruncInst( Value *S, ///< The value to be truncated const Type *Ty, ///< The (smaller) type to truncate to - const Twine &NameStr = "", ///< A name for the new instruction + const Twine &NameStr = "", ///< A name for the new instruction Instruction *InsertBefore = 0 ///< Where to insert the new instruction ); @@ -2742,7 +2742,7 @@ TruncInst( Value *S, ///< The value to be truncated const Type *Ty, ///< The (smaller) type to truncate to - const Twine &NameStr, ///< A name for the new instruction + const Twine &NameStr, ///< A name for the new instruction BasicBlock *InsertAtEnd ///< The block to insert the instruction into ); @@ -2771,7 +2771,7 @@ ZExtInst( Value *S, ///< The value to be zero extended const Type *Ty, ///< The type to zero extend to - const Twine &NameStr = "", ///< A name for the new instruction + const Twine &NameStr = "", ///< A name for the new instruction Instruction *InsertBefore = 0 ///< Where to insert the new instruction ); @@ -2779,7 +2779,7 @@ ZExtInst( Value *S, ///< The value to be zero extended const Type *Ty, ///< The type to zero extend to - const Twine &NameStr, ///< A name for the new instruction + const Twine &NameStr, ///< A name for the new instruction BasicBlock *InsertAtEnd ///< The block to insert the instruction into ); @@ -2808,7 +2808,7 @@ SExtInst( Value *S, ///< The value to be sign extended const Type *Ty, ///< The type to sign extend to - const Twine &NameStr = "", ///< A name for the new instruction + const Twine &NameStr = "", ///< A name for the new instruction Instruction *InsertBefore = 0 ///< Where to insert the new instruction ); @@ -2816,7 +2816,7 @@ SExtInst( Value *S, ///< The value to be sign extended const Type *Ty, ///< The type to sign extend to - const Twine &NameStr, ///< A name for the new instruction + const Twine &NameStr, ///< A name for the new instruction BasicBlock *InsertAtEnd ///< The block to insert the instruction into ); @@ -2845,7 +2845,7 @@ FPTruncInst( Value *S, ///< The value to be truncated const Type *Ty, ///< The type to truncate to - const Twine &NameStr = "", ///< A name for the new instruction + const Twine &NameStr = "", ///< A name for the new instruction Instruction *InsertBefore = 0 ///< Where to insert the new instruction ); @@ -2853,7 +2853,7 @@ FPTruncInst( Value *S, ///< The value to be truncated const Type *Ty, ///< The type to truncate to - const Twine &NameStr, ///< A name for the new instruction + const Twine &NameStr, ///< A name for the new instruction BasicBlock *InsertAtEnd ///< The block to insert the instruction into ); @@ -2882,7 +2882,7 @@ FPExtInst( Value *S, ///< The value to be extended const Type *Ty, ///< The type to extend to - const Twine &NameStr = "", ///< A name for the new instruction + const Twine &NameStr = "", ///< A name for the new instruction Instruction *InsertBefore = 0 ///< Where to insert the new instruction ); @@ -2890,7 +2890,7 @@ FPExtInst( Value *S, ///< The value to be extended const Type *Ty, ///< The type to extend to - const Twine &NameStr, ///< A name for the new instruction + const Twine &NameStr, ///< A name for the new instruction BasicBlock *InsertAtEnd ///< The block to insert the instruction into ); @@ -2919,7 +2919,7 @@ UIToFPInst( Value *S, ///< The value to be converted const Type *Ty, ///< The type to convert to - const Twine &NameStr = "", ///< A name for the new instruction + const Twine &NameStr = "", ///< A name for the new instruction Instruction *InsertBefore = 0 ///< Where to insert the new instruction ); @@ -2927,7 +2927,7 @@ UIToFPInst( Value *S, ///< The value to be converted const Type *Ty, ///< The type to convert to - const Twine &NameStr, ///< A name for the new instruction + const Twine &NameStr, ///< A name for the new instruction BasicBlock *InsertAtEnd ///< The block to insert the instruction into ); @@ -2956,7 +2956,7 @@ SIToFPInst( Value *S, ///< The value to be converted const Type *Ty, ///< The type to convert to - const Twine &NameStr = "", ///< A name for the new instruction + const Twine &NameStr = "", ///< A name for the new instruction Instruction *InsertBefore = 0 ///< Where to insert the new instruction ); @@ -2964,7 +2964,7 @@ SIToFPInst( Value *S, ///< The value to be converted const Type *Ty, ///< The type to convert to - const Twine &NameStr, ///< A name for the new instruction + const Twine &NameStr, ///< A name for the new instruction BasicBlock *InsertAtEnd ///< The block to insert the instruction into ); @@ -2993,7 +2993,7 @@ FPToUIInst( Value *S, ///< The value to be converted const Type *Ty, ///< The type to convert to - const Twine &NameStr = "", ///< A name for the new instruction + const Twine &NameStr = "", ///< A name for the new instruction Instruction *InsertBefore = 0 ///< Where to insert the new instruction ); @@ -3001,7 +3001,7 @@ FPToUIInst( Value *S, ///< The value to be converted const Type *Ty, ///< The type to convert to - const Twine &NameStr, ///< A name for the new instruction + const Twine &NameStr, ///< A name for the new instruction BasicBlock *InsertAtEnd ///< Where to insert the new instruction ); @@ -3030,7 +3030,7 @@ FPToSIInst( Value *S, ///< The value to be converted const Type *Ty, ///< The type to convert to - const Twine &NameStr = "", ///< A name for the new instruction + const Twine &NameStr = "", ///< A name for the new instruction Instruction *InsertBefore = 0 ///< Where to insert the new instruction ); @@ -3038,7 +3038,7 @@ FPToSIInst( Value *S, ///< The value to be converted const Type *Ty, ///< The type to convert to - const Twine &NameStr, ///< A name for the new instruction + const Twine &NameStr, ///< A name for the new instruction BasicBlock *InsertAtEnd ///< The block to insert the instruction into ); @@ -3063,7 +3063,7 @@ IntToPtrInst( Value *S, ///< The value to be converted const Type *Ty, ///< The type to convert to - const Twine &NameStr = "", ///< A name for the new instruction + const Twine &NameStr = "", ///< A name for the new instruction Instruction *InsertBefore = 0 ///< Where to insert the new instruction ); @@ -3071,7 +3071,7 @@ IntToPtrInst( Value *S, ///< The value to be converted const Type *Ty, ///< The type to convert to - const Twine &NameStr, ///< A name for the new instruction + const Twine &NameStr, ///< A name for the new instruction BasicBlock *InsertAtEnd ///< The block to insert the instruction into ); @@ -3103,7 +3103,7 @@ PtrToIntInst( Value *S, ///< The value to be converted const Type *Ty, ///< The type to convert to - const Twine &NameStr = "", ///< A name for the new instruction + const Twine &NameStr = "", ///< A name for the new instruction Instruction *InsertBefore = 0 ///< Where to insert the new instruction ); @@ -3111,7 +3111,7 @@ PtrToIntInst( Value *S, ///< The value to be converted const Type *Ty, ///< The type to convert to - const Twine &NameStr, ///< A name for the new instruction + const Twine &NameStr, ///< A name for the new instruction BasicBlock *InsertAtEnd ///< The block to insert the instruction into ); @@ -3140,7 +3140,7 @@ BitCastInst( Value *S, ///< The value to be casted const Type *Ty, ///< The type to casted to - const Twine &NameStr = "", ///< A name for the new instruction + const Twine &NameStr = "", ///< A name for the new instruction Instruction *InsertBefore = 0 ///< Where to insert the new instruction ); @@ -3148,7 +3148,7 @@ BitCastInst( Value *S, ///< The value to be casted const Type *Ty, ///< The type to casted to - const Twine &NameStr, ///< A name for the new instruction + const Twine &NameStr, ///< A name for the new instruction BasicBlock *InsertAtEnd ///< The block to insert the instruction into ); From bruno.cardoso at gmail.com Wed Jul 21 03:56:24 2010 From: bruno.cardoso at gmail.com (Bruno Cardoso Lopes) Date: Wed, 21 Jul 2010 08:56:24 -0000 Subject: [llvm-commits] [llvm] r109002 - in /llvm/trunk: lib/Target/X86/X86InstrSSE.td lib/Target/X86/X86MCCodeEmitter.cpp test/MC/AsmParser/X86/x86_32-encoding.s Message-ID: <20100721085624.82A2E2A6C12C@llvm.org> Author: bruno Date: Wed Jul 21 03:56:24 2010 New Revision: 109002 URL: http://llvm.org/viewvc/llvm-project?rev=109002&view=rev Log: Add AVX only vzeroall and vzeroupper instructions Modified: llvm/trunk/lib/Target/X86/X86InstrSSE.td llvm/trunk/lib/Target/X86/X86MCCodeEmitter.cpp llvm/trunk/test/MC/AsmParser/X86/x86_32-encoding.s Modified: llvm/trunk/lib/Target/X86/X86InstrSSE.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrSSE.td?rev=109002&r1=109001&r2=109002&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86InstrSSE.td (original) +++ llvm/trunk/lib/Target/X86/X86InstrSSE.td Wed Jul 21 03:56:24 2010 @@ -5076,4 +5076,10 @@ "vperm2f128\t{$src3, $src2, $src1, $dst|$dst, $src1, $src2, $src3}", []>, VEX_4V; +// Zero All YMM registers +def VZEROALL : I<0x77, RawFrm, (outs), (ins), "vzeroall", []>, VEX, VEX_L; + +// Zero Upper bits of YMM registers +def VZEROUPPER : I<0x77, RawFrm, (outs), (ins), "vzeroupper", []>, VEX; + } // isAsmParserOnly Modified: llvm/trunk/lib/Target/X86/X86MCCodeEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86MCCodeEmitter.cpp?rev=109002&r1=109001&r2=109002&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86MCCodeEmitter.cpp (original) +++ llvm/trunk/lib/Target/X86/X86MCCodeEmitter.cpp Wed Jul 21 03:56:24 2010 @@ -514,7 +514,10 @@ VEX_X = 0x0; } break; - default: // MRMDestReg, MRM0r-MRM7r + default: // MRMDestReg, MRM0r-MRM7r, RawFrm + if (!MI.getNumOperands()) + break; + if (MI.getOperand(CurOp).isReg() && X86InstrInfo::isX86_64ExtendedReg(MI.getOperand(CurOp).getReg())) VEX_B = 0; @@ -530,7 +533,6 @@ VEX_R = 0x0; } break; - assert(0 && "Not implemented!"); } // Emit segment override opcode prefix as needed. Modified: llvm/trunk/test/MC/AsmParser/X86/x86_32-encoding.s URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AsmParser/X86/x86_32-encoding.s?rev=109002&r1=109001&r2=109002&view=diff ============================================================================== --- llvm/trunk/test/MC/AsmParser/X86/x86_32-encoding.s (original) +++ llvm/trunk/test/MC/AsmParser/X86/x86_32-encoding.s Wed Jul 21 03:56:24 2010 @@ -13134,3 +13134,11 @@ // CHECK: encoding: [0xc4,0xe3,0x55,0x06,0x08,0x07] vperm2f128 $7, (%eax), %ymm5, %ymm1 +// CHECK: vzeroall +// CHECK: encoding: [0xc5,0xfc,0x77] + vzeroall + +// CHECK: vzeroupper +// CHECK: encoding: [0xc5,0xf8,0x77] + vzeroupper + From lhames at gmail.com Wed Jul 21 04:02:06 2010 From: lhames at gmail.com (Lang Hames) Date: Wed, 21 Jul 2010 09:02:06 -0000 Subject: [llvm-commits] [llvm] r109003 - in /llvm/trunk/lib/CodeGen: RenderMachineFunction.cpp RenderMachineFunction.h Message-ID: <20100721090206.8119B2A6C12C@llvm.org> Author: lhames Date: Wed Jul 21 04:02:06 2010 New Revision: 109003 URL: http://llvm.org/viewvc/llvm-project?rev=109003&view=rev Log: Changed OStream templates to functions on raw_ostream, removed the unused "renderWarnings" function. Modified: llvm/trunk/lib/CodeGen/RenderMachineFunction.cpp llvm/trunk/lib/CodeGen/RenderMachineFunction.h Modified: llvm/trunk/lib/CodeGen/RenderMachineFunction.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RenderMachineFunction.cpp?rev=109003&r1=109002&r2=109003&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/RenderMachineFunction.cpp (original) +++ llvm/trunk/lib/CodeGen/RenderMachineFunction.cpp Wed Jul 21 04:02:06 2010 @@ -499,8 +499,7 @@ // ---------- MachineFunctionRenderer implementation ---------- - template - void RenderMachineFunction::Spacer::print(OStream &os) const { + void RenderMachineFunction::Spacer::print(raw_ostream &os) const { if (!prettyHTML) return; for (unsigned i = 0; i < ns; ++i) { @@ -512,8 +511,7 @@ return Spacer(ns); } - template - OStream& operator<<(OStream &os, const RenderMachineFunction::Spacer &s) { + raw_ostream& operator<<(raw_ostream &os, const RenderMachineFunction::Spacer &s) { s.print(os); return os; } @@ -583,8 +581,7 @@ } /// \brief Render a machine instruction. - template - void RenderMachineFunction::renderMachineInstr(OStream &os, + void RenderMachineFunction::renderMachineInstr(raw_ostream &os, const MachineInstr *mi) const { std::string s; raw_string_ostream oss(s); @@ -593,9 +590,9 @@ os << escapeChars(oss.str()); } - template + template void RenderMachineFunction::renderVertical(const Spacer &indent, - OStream &os, + raw_ostream &os, const T &t) const { if (ro.fancyVerticals()) { os << indent << " void RenderMachineFunction::insertCSS(const Spacer &indent, - OStream &os) const { + raw_ostream &os) const { os << indent << "\n"; } - template void RenderMachineFunction::renderFunctionSummary( - const Spacer &indent, OStream &os, + const Spacer &indent, raw_ostream &os, const char * const renderContextStr) const { os << indent << "

Function: " << mf->getFunction()->getName() << "

\n" @@ -657,10 +652,9 @@ } - template void RenderMachineFunction::renderPressureTableLegend( const Spacer &indent, - OStream &os) const { + raw_ostream &os) const { os << indent << "

Rendering Pressure Legend:

\n" << indent << "\n" << indent + s(2) << "\n" @@ -685,9 +679,9 @@ << indent << "
\n"; } - template + template void RenderMachineFunction::renderCellsWithRLE( - const Spacer &indent, OStream &os, + const Spacer &indent, raw_ostream &os, const std::pair &rleAccumulator, const std::map &cellTypeStrs) const { @@ -706,9 +700,8 @@ } - template void RenderMachineFunction::renderCodeTablePlusPI(const Spacer &indent, - OStream &os) const { + raw_ostream &os) const { std::map lsStrs; lsStrs[Dead] = "l-n"; @@ -854,14 +847,8 @@ renderPressureTableLegend(indent, os); } - template - void RenderMachineFunction::renderWarnings(const Spacer &indent, - OStream &os) const { - } - - template void RenderMachineFunction::renderFunctionPage( - OStream &os, + raw_ostream &os, const char * const renderContextStr) const { os << "\n" << s(2) << "\n" Modified: llvm/trunk/lib/CodeGen/RenderMachineFunction.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RenderMachineFunction.h?rev=109003&r1=109002&r2=109003&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/RenderMachineFunction.h (original) +++ llvm/trunk/lib/CodeGen/RenderMachineFunction.h Wed Jul 21 04:02:06 2010 @@ -31,6 +31,7 @@ class TargetRegisterClass; class TargetRegisterInfo; class VirtRegMap; + class raw_ostream; /// \brief Provide extra information about the physical and virtual registers /// in the function being compiled. @@ -225,8 +226,7 @@ private: class Spacer; - template - friend OStream& operator<<(OStream &os, const Spacer &s); + friend raw_ostream& operator<<(raw_ostream &os, const Spacer &s); std::string fqn; @@ -256,7 +256,7 @@ public: explicit Spacer(unsigned numSpaces) : ns(numSpaces) {} Spacer operator+(const Spacer &o) const { return Spacer(ns + o.ns); } - template void print(OStream &os) const; + void print(raw_ostream &os) const; private: unsigned ns; }; @@ -267,57 +267,44 @@ std::string escapeChars(Iterator sBegin, Iterator sEnd) const; /// \brief Render a machine instruction. - template - void renderMachineInstr(OStream &os, + void renderMachineInstr(raw_ostream &os, const MachineInstr *mi) const; /// \brief Render vertical text. - template + template void renderVertical(const Spacer &indent, - OStream &os, + raw_ostream &os, const T &t) const; /// \brief Insert CSS layout info. - template void insertCSS(const Spacer &indent, - OStream &os) const; + raw_ostream &os) const; /// \brief Render a brief summary of the function (including rendering /// context). - template void renderFunctionSummary(const Spacer &indent, - OStream &os, + raw_ostream &os, const char * const renderContextStr) const; /// \brief Render a legend for the pressure table. - template void renderPressureTableLegend(const Spacer &indent, - OStream &os) const; + raw_ostream &os) const; /// \brief Render a consecutive set of HTML cells of the same class using /// the colspan attribute for run-length encoding. - template + template void renderCellsWithRLE( - const Spacer &indent, OStream &os, + const Spacer &indent, raw_ostream &os, const std::pair &rleAccumulator, const std::map &cellTypeStrs) const; /// \brief Render code listing, potentially with register pressure /// and live intervals shown alongside. - template void renderCodeTablePlusPI(const Spacer &indent, - OStream &os) const; - - /// \brief Render warnings about the machine function, or weird rendering - /// parameter combinations (e.g. rendering specified live intervals - /// over more than one machine function). - template - void renderWarnings(const Spacer &indent, - OStream &os) const; + raw_ostream &os) const; /// \brief Render the HTML page representing the MachineFunction. - template - void renderFunctionPage(OStream &os, + void renderFunctionPage(raw_ostream &os, const char * const renderContextStr) const; std::string escapeChars(const std::string &s) const; From echristo at apple.com Wed Jul 21 04:05:23 2010 From: echristo at apple.com (Eric Christopher) Date: Wed, 21 Jul 2010 09:05:23 -0000 Subject: [llvm-commits] [llvm] r109004 - in /llvm/trunk/lib/Target/X86: X86ISelLowering.cpp X86ISelLowering.h X86InstrInfo.td Message-ID: <20100721090524.177462A6C12C@llvm.org> Author: echristo Date: Wed Jul 21 04:05:23 2010 New Revision: 109004 URL: http://llvm.org/viewvc/llvm-project?rev=109004&view=rev Log: Lower MEMBARRIER on x86 and support processors without SSE2. Fixes a pile of libgomp failures in the llvm-gcc testsuite due to the libcall not existing. Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp llvm/trunk/lib/Target/X86/X86ISelLowering.h llvm/trunk/lib/Target/X86/X86InstrInfo.td Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=109004&r1=109003&r2=109004&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original) +++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Wed Jul 21 04:05:23 2010 @@ -343,8 +343,9 @@ if (Subtarget->hasSSE1()) setOperationAction(ISD::PREFETCH , MVT::Other, Legal); - if (!Subtarget->hasSSE2()) - setOperationAction(ISD::MEMBARRIER , MVT::Other, Expand); + // We may not have a libcall for MEMBARRIER so we should lower this. + setOperationAction(ISD::MEMBARRIER , MVT::Other, Custom); + // On X86 and X86-64, atomic operations are lowered to locked instructions. // Locked instructions, in turn, have implicit fence semantics (all memory // operations are flushed before issuing the locked instruction, and they @@ -7508,6 +7509,16 @@ return Sum; } +SDValue X86TargetLowering::LowerMEMBARRIER(SDValue Op, SelectionDAG &DAG) const{ + DebugLoc dl = Op.getDebugLoc(); + + if (!Subtarget->hasSSE2()) + return DAG.getNode(X86ISD::MEMBARRIER, dl, MVT::Other, Op.getOperand(0), + DAG.getConstant(0, MVT::i32)); + + return DAG.getNode(X86ISD::MEMBARRIER, dl, MVT::Other, Op.getOperand(0)); +} + SDValue X86TargetLowering::LowerCMP_SWAP(SDValue Op, SelectionDAG &DAG) const { EVT T = Op.getValueType(); DebugLoc dl = Op.getDebugLoc(); @@ -7597,6 +7608,7 @@ SDValue X86TargetLowering::LowerOperation(SDValue Op, SelectionDAG &DAG) const { switch (Op.getOpcode()) { default: llvm_unreachable("Should not custom lower this!"); + case ISD::MEMBARRIER: return LowerMEMBARRIER(Op,DAG); case ISD::ATOMIC_CMP_SWAP: return LowerCMP_SWAP(Op,DAG); case ISD::ATOMIC_LOAD_SUB: return LowerLOAD_SUB(Op,DAG); case ISD::BUILD_VECTOR: return LowerBUILD_VECTOR(Op, DAG); Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.h?rev=109004&r1=109003&r2=109004&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86ISelLowering.h (original) +++ llvm/trunk/lib/Target/X86/X86ISelLowering.h Wed Jul 21 04:05:23 2010 @@ -265,7 +265,10 @@ ATOMXOR64_DAG, ATOMAND64_DAG, ATOMNAND64_DAG, - ATOMSWAP64_DAG + ATOMSWAP64_DAG, + + // Memory barrier + MEMBARRIER // WARNING: Do not add anything in the end unless you want the node to // have memop! In fact, starting from ATOMADD64_DAG all opcodes will be @@ -715,6 +718,7 @@ SDValue LowerCMP_SWAP(SDValue Op, SelectionDAG &DAG) const; SDValue LowerLOAD_SUB(SDValue Op, SelectionDAG &DAG) const; SDValue LowerREADCYCLECOUNTER(SDValue Op, SelectionDAG &DAG) const; + SDValue LowerMEMBARRIER(SDValue Op, SelectionDAG &DAG) const; virtual SDValue LowerFormalArguments(SDValue Chain, Modified: llvm/trunk/lib/Target/X86/X86InstrInfo.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrInfo.td?rev=109004&r1=109003&r2=109004&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86InstrInfo.td (original) +++ llvm/trunk/lib/Target/X86/X86InstrInfo.td Wed Jul 21 04:05:23 2010 @@ -80,6 +80,14 @@ def SDT_X86TCRET : SDTypeProfile<0, 2, [SDTCisPtrTy<0>, SDTCisVT<1, i32>]>; +def SDT_X86MEMBARRIER : SDTypeProfile<0, 0, []>; +def SDT_X86MEMBARRIERNoSSE : SDTypeProfile<0, 1, [SDTCisInt<0>]>; + +def X86MemBarrier : SDNode<"X86ISD::MEMBARRIER", SDT_X86MEMBARRIER, + [SDNPHasChain]>; +def X86MemBarrierNoSSE : SDNode<"X86ISD::MEMBARRIER", SDT_X86MEMBARRIERNoSSE, + [SDNPHasChain]>; + def X86bsf : SDNode<"X86ISD::BSF", SDTUnaryArithWithFlags>; def X86bsr : SDNode<"X86ISD::BSR", SDTUnaryArithWithFlags>; def X86shld : SDNode<"X86ISD::SHLD", SDTIntShiftDOp>; @@ -3906,6 +3914,19 @@ // Atomic support // +// Memory barriers +let hasSideEffects = 1 in { +def Int_MemBarrier : I<0, Pseudo, (outs), (ins), + "#MEMBARRIER", + [(X86MemBarrier)]>, Requires<[HasSSE2]>; + +let Uses = [ESP], isCodeGenOnly = 1 in +def Int_MemBarrierNoSSE : I<0x0B, Pseudo, (outs), (ins GR32:$zero), + "lock\n\t" + "or{l}\t{$zero, (%esp)|(%esp), $zero}", + [(X86MemBarrierNoSSE GR32:$zero)]>, LOCK; +} + // Atomic swap. These are just normal xchg instructions. But since a memory // operand is referenced, the atomicity is ensured. let Constraints = "$val = $dst" in { From echristo at apple.com Wed Jul 21 04:23:57 2010 From: echristo at apple.com (Eric Christopher) Date: Wed, 21 Jul 2010 09:23:57 -0000 Subject: [llvm-commits] [llvm] r109005 - in /llvm/trunk/lib/Target/X86: X86ISelLowering.cpp X86ISelLowering.h X86InstrInfo.td Message-ID: <20100721092357.51E822A6C12C@llvm.org> Author: echristo Date: Wed Jul 21 04:23:56 2010 New Revision: 109005 URL: http://llvm.org/viewvc/llvm-project?rev=109005&view=rev Log: Pulling out previous patch, must've run the tests in the wrong directory. Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp llvm/trunk/lib/Target/X86/X86ISelLowering.h llvm/trunk/lib/Target/X86/X86InstrInfo.td Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=109005&r1=109004&r2=109005&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original) +++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Wed Jul 21 04:23:56 2010 @@ -343,9 +343,8 @@ if (Subtarget->hasSSE1()) setOperationAction(ISD::PREFETCH , MVT::Other, Legal); - // We may not have a libcall for MEMBARRIER so we should lower this. - setOperationAction(ISD::MEMBARRIER , MVT::Other, Custom); - + if (!Subtarget->hasSSE2()) + setOperationAction(ISD::MEMBARRIER , MVT::Other, Expand); // On X86 and X86-64, atomic operations are lowered to locked instructions. // Locked instructions, in turn, have implicit fence semantics (all memory // operations are flushed before issuing the locked instruction, and they @@ -7509,16 +7508,6 @@ return Sum; } -SDValue X86TargetLowering::LowerMEMBARRIER(SDValue Op, SelectionDAG &DAG) const{ - DebugLoc dl = Op.getDebugLoc(); - - if (!Subtarget->hasSSE2()) - return DAG.getNode(X86ISD::MEMBARRIER, dl, MVT::Other, Op.getOperand(0), - DAG.getConstant(0, MVT::i32)); - - return DAG.getNode(X86ISD::MEMBARRIER, dl, MVT::Other, Op.getOperand(0)); -} - SDValue X86TargetLowering::LowerCMP_SWAP(SDValue Op, SelectionDAG &DAG) const { EVT T = Op.getValueType(); DebugLoc dl = Op.getDebugLoc(); @@ -7608,7 +7597,6 @@ SDValue X86TargetLowering::LowerOperation(SDValue Op, SelectionDAG &DAG) const { switch (Op.getOpcode()) { default: llvm_unreachable("Should not custom lower this!"); - case ISD::MEMBARRIER: return LowerMEMBARRIER(Op,DAG); case ISD::ATOMIC_CMP_SWAP: return LowerCMP_SWAP(Op,DAG); case ISD::ATOMIC_LOAD_SUB: return LowerLOAD_SUB(Op,DAG); case ISD::BUILD_VECTOR: return LowerBUILD_VECTOR(Op, DAG); Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.h?rev=109005&r1=109004&r2=109005&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86ISelLowering.h (original) +++ llvm/trunk/lib/Target/X86/X86ISelLowering.h Wed Jul 21 04:23:56 2010 @@ -265,10 +265,7 @@ ATOMXOR64_DAG, ATOMAND64_DAG, ATOMNAND64_DAG, - ATOMSWAP64_DAG, - - // Memory barrier - MEMBARRIER + ATOMSWAP64_DAG // WARNING: Do not add anything in the end unless you want the node to // have memop! In fact, starting from ATOMADD64_DAG all opcodes will be @@ -718,7 +715,6 @@ SDValue LowerCMP_SWAP(SDValue Op, SelectionDAG &DAG) const; SDValue LowerLOAD_SUB(SDValue Op, SelectionDAG &DAG) const; SDValue LowerREADCYCLECOUNTER(SDValue Op, SelectionDAG &DAG) const; - SDValue LowerMEMBARRIER(SDValue Op, SelectionDAG &DAG) const; virtual SDValue LowerFormalArguments(SDValue Chain, Modified: llvm/trunk/lib/Target/X86/X86InstrInfo.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrInfo.td?rev=109005&r1=109004&r2=109005&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86InstrInfo.td (original) +++ llvm/trunk/lib/Target/X86/X86InstrInfo.td Wed Jul 21 04:23:56 2010 @@ -80,14 +80,6 @@ def SDT_X86TCRET : SDTypeProfile<0, 2, [SDTCisPtrTy<0>, SDTCisVT<1, i32>]>; -def SDT_X86MEMBARRIER : SDTypeProfile<0, 0, []>; -def SDT_X86MEMBARRIERNoSSE : SDTypeProfile<0, 1, [SDTCisInt<0>]>; - -def X86MemBarrier : SDNode<"X86ISD::MEMBARRIER", SDT_X86MEMBARRIER, - [SDNPHasChain]>; -def X86MemBarrierNoSSE : SDNode<"X86ISD::MEMBARRIER", SDT_X86MEMBARRIERNoSSE, - [SDNPHasChain]>; - def X86bsf : SDNode<"X86ISD::BSF", SDTUnaryArithWithFlags>; def X86bsr : SDNode<"X86ISD::BSR", SDTUnaryArithWithFlags>; def X86shld : SDNode<"X86ISD::SHLD", SDTIntShiftDOp>; @@ -3914,19 +3906,6 @@ // Atomic support // -// Memory barriers -let hasSideEffects = 1 in { -def Int_MemBarrier : I<0, Pseudo, (outs), (ins), - "#MEMBARRIER", - [(X86MemBarrier)]>, Requires<[HasSSE2]>; - -let Uses = [ESP], isCodeGenOnly = 1 in -def Int_MemBarrierNoSSE : I<0x0B, Pseudo, (outs), (ins GR32:$zero), - "lock\n\t" - "or{l}\t{$zero, (%esp)|(%esp), $zero}", - [(X86MemBarrierNoSSE GR32:$zero)]>, LOCK; -} - // Atomic swap. These are just normal xchg instructions. But since a memory // operand is referenced, the atomicity is ensured. let Constraints = "$val = $dst" in { From ggreif at gmail.com Wed Jul 21 05:20:08 2010 From: ggreif at gmail.com (Gabor Greif) Date: Wed, 21 Jul 2010 10:20:08 -0000 Subject: [llvm-commits] [llvm] r109006 - /llvm/trunk/docs/ReleaseNotes.html Message-ID: <20100721102009.268F22A6C12C@llvm.org> Author: ggreif Date: Wed Jul 21 05:20:08 2010 New Revision: 109006 URL: http://llvm.org/viewvc/llvm-project?rev=109006&view=rev Log: add info on operand rotation 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=109006&r1=109005&r2=109006&view=diff ============================================================================== --- llvm/trunk/docs/ReleaseNotes.html (original) +++ llvm/trunk/docs/ReleaseNotes.html Wed Jul 21 05:20:08 2010 @@ -604,6 +604,15 @@ Unfortunately, this support is not really usable in 2.7, so if you're interested in pushing it forward, please help contribute to LLVM mainline. + + +
  • LLVM 2.8 changes the internal order of operands in InvokeInst + and CallInst. + To be portable across releases, resort to CallSite and the + high-level accessors, such as getCalledValue and setUnwindDest.
  • + + From ggreif at gmail.com Wed Jul 21 05:22:42 2010 From: ggreif at gmail.com (Gabor Greif) Date: Wed, 21 Jul 2010 10:22:42 -0000 Subject: [llvm-commits] [llvm] r109007 - /llvm/trunk/docs/ReleaseNotes.html Message-ID: <20100721102242.7DBA52A6C12C@llvm.org> Author: ggreif Date: Wed Jul 21 05:22:41 2010 New Revision: 109007 URL: http://llvm.org/viewvc/llvm-project?rev=109007&view=rev Log: appease Validator 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=109007&r1=109006&r2=109007&view=diff ============================================================================== --- llvm/trunk/docs/ReleaseNotes.html (original) +++ llvm/trunk/docs/ReleaseNotes.html Wed Jul 21 05:22:41 2010 @@ -610,7 +610,7 @@ href="http://llvm.org/doxygen/classllvm_1_1InvokeInst.html">InvokeInst and CallInst. To be portable across releases, resort to CallSite and the - high-level accessors, such as getCalledValue and setUnwindDest. + high-level accessors, such as getCalledValue and setUnwindDest. From rafael.espindola at gmail.com Wed Jul 21 06:38:31 2010 From: rafael.espindola at gmail.com (Rafael Espindola) Date: Wed, 21 Jul 2010 11:38:31 -0000 Subject: [llvm-commits] [llvm] r109009 - in /llvm/trunk: lib/Target/ARM/ARMISelLowering.cpp test/CodeGen/ARM/arguments.ll Message-ID: <20100721113831.20E6E2A6C12C@llvm.org> Author: rafael Date: Wed Jul 21 06:38:30 2010 New Revision: 109009 URL: http://llvm.org/viewvc/llvm-project?rev=109009&view=rev Log: Fix calling convention on ARM if vfp2+ is enabled. Modified: llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp llvm/trunk/test/CodeGen/ARM/arguments.ll Modified: llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp?rev=109009&r1=109008&r2=109009&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp (original) +++ llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp Wed Jul 21 06:38:30 2010 @@ -831,8 +831,9 @@ CCState &State, bool CanFail) { static const unsigned HiRegList[] = { ARM::R0, ARM::R2 }; static const unsigned LoRegList[] = { ARM::R1, ARM::R3 }; + static const unsigned ShadowRegList[] = { ARM::R0, ARM::R1 }; - unsigned Reg = State.AllocateReg(HiRegList, LoRegList, 2); + unsigned Reg = State.AllocateReg(HiRegList, ShadowRegList, 2); if (Reg == 0) { // For the 2nd half of a v2f64, do not just fail. if (CanFail) @@ -850,6 +851,9 @@ if (HiRegList[i] == Reg) break; + unsigned T = State.AllocateReg(LoRegList[i]); + assert(T == LoRegList[i] && "Could not allocate register"); + State.addLoc(CCValAssign::getCustomReg(ValNo, ValVT, Reg, LocVT, LocInfo)); State.addLoc(CCValAssign::getCustomReg(ValNo, ValVT, LoRegList[i], LocVT, LocInfo)); Modified: llvm/trunk/test/CodeGen/ARM/arguments.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/arguments.ll?rev=109009&r1=109008&r2=109009&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/ARM/arguments.ll (original) +++ llvm/trunk/test/CodeGen/ARM/arguments.ll Wed Jul 21 06:38:30 2010 @@ -1,11 +1,29 @@ -; RUN: llc < %s -mtriple=arm-linux-gnueabi | FileCheck %s -check-prefix=ELF -; RUN: llc < %s -mtriple=arm-apple-darwin | FileCheck %s -check-prefix=DARWIN +; RUN: llc < %s -mtriple=arm-linux-gnueabi -mattr=+vfp2 | FileCheck %s -check-prefix=ELF +; RUN: llc < %s -mtriple=arm-apple-darwin -mattr=+vfp2 | FileCheck %s -check-prefix=DARWIN -define i32 @f(i32 %a, i64 %b) { +define i32 @f1(i32 %a, i64 %b) { +; ELF: f1: ; ELF: mov r0, r2 +; DARWIN: f1: ; DARWIN: mov r0, r1 - %tmp = call i32 @g(i64 %b) + %tmp = call i32 @g1(i64 %b) ret i32 %tmp } -declare i32 @g(i64) +; test that allocating the double to r2/r3 makes r1 unavailable on gnueabi. +define i32 @f2() nounwind optsize { +; ELF: f2: +; ELF: mov r0, #128 +; ELF: str r0, [sp] +; DARWIN: f2: +; DARWIN: mov r3, #128 +entry: + %0 = tail call i32 (i32, ...)* @g2(i32 5, double 1.600000e+01, i32 128) nounwind optsize ; [#uses=1] + %not. = icmp ne i32 %0, 128 ; [#uses=1] + %.0 = zext i1 %not. to i32 ; [#uses=1] + ret i32 %.0 +} + +declare i32 @g1(i64) + +declare i32 @g2(i32 %i, ...) From sabre at nondot.org Wed Jul 21 10:57:41 2010 From: sabre at nondot.org (Chris Lattner) Date: Wed, 21 Jul 2010 15:57:41 -0000 Subject: [llvm-commits] [llvm] r109013 - /llvm/trunk/docs/ReleaseNotes.html Message-ID: <20100721155741.41FFD2A6C12C@llvm.org> Author: lattner Date: Wed Jul 21 10:57:40 2010 New Revision: 109013 URL: http://llvm.org/viewvc/llvm-project?rev=109013&view=rev Log: strip out the 2.7 release notes, this really is the 2.8 release notes now. Add a few items like the fpstackifier improvements. 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=109013&r1=109012&r2=109013&view=diff ============================================================================== --- llvm/trunk/docs/ReleaseNotes.html (original) +++ llvm/trunk/docs/ReleaseNotes.html Wed Jul 21 10:57:40 2010 @@ -118,40 +118,9 @@ integrating with other development tools. Clang is considered a production-quality compiler for C and Objective-C on x86 (32- and 64-bit).

    -

    In the LLVM 2.7 time-frame, the Clang team has made many improvements:

    +

    In the LLVM 2.8 time-frame, the Clang team has made many improvements:

      - -
    • C++ Support: Clang is now capable of self-hosting! While still -alpha-quality, Clang's C++ support has matured enough to build LLVM and Clang, -and C++ is now enabled by default. See the Clang C++ compatibility -page for common C++ migration issues.
    • - -
    • Objective-C: Clang now includes experimental support for an updated -Objective-C ABI on non-Darwin platforms. This includes support for non-fragile -instance variables and accelerated proxies, as well as greater potential for -future optimisations. The new ABI is used when compiling with the --fobjc-nonfragile-abi and -fgnu-runtime options. Code compiled with these -options may be mixed with code compiled with GCC or clang using the old GNU ABI, -but requires the libobjc2 runtime from the GNUstep project.
    • - -
    • New warnings: Clang contains a number of new warnings, including -control-flow warnings (unreachable code, missing return statements in a -non-void function, etc.), sign-comparison warnings, and improved -format-string warnings.
    • - -
    • CIndex API and Python bindings: Clang now includes a C API as part of the -CIndex library. Although we may make some changes to the API in the future, it -is intended to be stable and has been designed for use by external projects. See -the Clang -doxygen CIndex -documentation for more details. The CIndex API also includes a preliminary -set of Python bindings.
    • - -
    • ARM Support: Clang now has ABI support for both the Darwin and Linux ARM -ABIs. Coupled with many improvements to the LLVM ARM backend, Clang is now -suitable for use as a beta quality ARM compiler.
    @@ -170,10 +139,7 @@ future!). The tool is very good at finding bugs that occur on specific paths through code, such as on error conditions.

    -

    In the LLVM 2.7 time-frame, the analyzer core has made several major and - minor improvements, including better support for tracking the fields of - structures, initial support (not enabled by default yet) for doing - interprocedural (cross-function) analysis, and new checks have been added. +

    In the LLVM 2.8 time-frame,

    @@ -190,26 +156,8 @@ implementation of the CLI) using LLVM for static and just-in-time compilation.

    -

    -With the release of LLVM 2.7, VMKit has shifted to a great framework for writing -virtual machines. VMKit now offers precise and efficient garbage collection with -multi-threading support, thanks to the MMTk memory management toolkit, as well -as just in time and ahead of time compilation with LLVM. The major changes in -VMKit 0.27 are:

    - -
      +

      With the release of LLVM 2.8, ...

      -
    • Garbage collection: VMKit now uses the MMTk toolkit for garbage collectors. - The first collector to be ported is the MarkSweep collector, which is precise, - and drastically improves the performance of VMKit.
    • -
    • Line number information in the JVM: by using the debug metadata of LLVM, the - JVM now supports precise line number information, useful when printing a stack - trace.
    • -
    • Interface calls in the JVM: we implemented a variant of the Interface Method - Table technique for interface calls in the JVM. -
    • - -
    @@ -231,8 +179,10 @@

    All of the code in the compiler-rt project is available under the standard LLVM -License, a "BSD-style" license. New in LLVM 2.7: compiler_rt now -supports ARM targets.

    +License, a "BSD-style" license. New in LLVM 2.8: + +Soft float support +

    @@ -265,7 +215,7 @@

    -DragonEgg is a new project which is seeing its first release with llvm-2.7. +2.8 status here.

    @@ -288,23 +238,13 @@ LLVM MC Project Blog Post.

    -

    2.7 includes major parts of the work required by the new MC Project. A few - targets have been refactored to support it, and work is underway to support a - native assembler in LLVM. This work is not complete in LLVM 2.7, but it has - made substantially more progress on LLVM mainline.

    - -

    One minor example of what MC can do is to transcode an AT&T syntax - X86 .s file into intel syntax. You can do this with something like:

    -
    -  llvm-mc foo.s -output-asm-variant=1 -o foo-intel.s
    -
    - +

    2.8 status here

    @@ -312,171 +252,13 @@

    An exciting aspect of LLVM is that it is used as an enabling technology for a lot of other language and tools projects. This section lists some of the - projects that have already been updated to work with LLVM 2.7.

    - - - -
    -Pure -
    - -
    -

    -Pure -is an algebraic/functional programming language based on term rewriting. -Programs are collections of equations which are used to evaluate expressions in -a symbolic fashion. Pure offers dynamic typing, eager and lazy evaluation, -lexical closures, a hygienic macro system (also based on term rewriting), -built-in list and matrix support (including list and matrix comprehensions) and -an easy-to-use C interface. The interpreter uses LLVM as a backend to - JIT-compile Pure programs to fast native code.

    - -

    Pure versions 0.43 and later have been tested and are known to work with -LLVM 2.7 (and continue to work with older LLVM releases >= 2.5).

    - -
    - - - - -
    -

    -Roadsend PHP (rphp) is an open -source implementation of the PHP programming -language that uses LLVM for its optimizer, JIT and static compiler. This is a -reimplementation of an earlier project that is now based on LLVM. -

    -
    - - - - -
    -

    -Unladen Swallow is a -branch of Python intended to be fully -compatible and significantly faster. It uses LLVM's optimization passes and JIT -compiler. -

    -
    - - - - -
    -

    -TCE is a toolset for designing -application-specific processors (ASP) based on the Transport triggered -architecture (TTA). The toolset provides a complete co-design flow from C/C++ -programs down to synthesizable VHDL and parallel program binaries. Processor -customization points include the register files, function units, supported -operations, and the interconnection network.

    - -

    TCE uses llvm-gcc/Clang and LLVM for C/C++ language support, target -independent optimizations and also for parts of code generation. It generates -new LLVM-based code generators "on the fly" for the designed TTA processors and -loads them in to the compiler backend as runtime libraries to avoid per-target -recompilation of larger parts of the compiler chain.

    - -
    - - - - -
    -

    -SAFECode is a memory safe C -compiler built using LLVM. It takes standard, unannotated C code, analyzes the -code to ensure that memory accesses and array indexing operations are safe, and -instruments the code with run-time checks when safety cannot be proven -statically. -

    -
    - - - - -
    -

    -IcedTea provides a -harness to build OpenJDK using only free software build tools and to provide -replacements for the not-yet free parts of OpenJDK. One of the extensions that -IcedTea provides is a new JIT compiler named Shark which uses LLVM -to provide native code generation without introducing processor-dependent -code. -

    -

    Icedtea6 1.8 and later have been tested and are known to work with -LLVM 2.7 (and continue to work with older LLVM releases >= 2.6 as well). -

    -
    - - - - -
    -

    -LLVM-Lua uses LLVM - to add JIT and static compiling support to the Lua VM. Lua -bytecode is analyzed to remove type checks, then LLVM is used to compile the -bytecode down to machine code. -

    -

    LLVM-Lua 1.2.0 have been tested and is known to work with LLVM 2.7. -

    -
    - - - - -
    -

    -MacRuby is an implementation of Ruby based on -core Mac OS technologies, sponsored by Apple Inc. It uses LLVM at runtime for -optimization passes, JIT compilation and exception handling. It also allows -static (ahead-of-time) compilation of Ruby code straight to machine code. -

    -

    The upcoming MacRuby 0.6 release works with LLVM 2.7. -

    -
    - - - - -
    -

    -GHC is an open source, -state-of-the-art programming suite for Haskell, a standard lazy -functional programming language. It includes an optimizing static -compiler generating good code for a variety of platforms, together -with an interactive system for convenient, quick development.

    - -

    In addition to the existing C and native code generators, GHC now -supports an LLVM -code generator. GHC supports LLVM 2.7.

    - + projects that have already been updated to work with LLVM 2.8.

    @@ -496,29 +278,11 @@
    -

    In addition to changes to the code, between LLVM 2.6 and 2.7, a number of +

    In addition to changes to the code, between LLVM 2.7 and 2.8, a number of organization changes have happened:

      -
    • LLVM has a new official logo!
    • - -
    • Ted Kremenek and Doug Gregor have stepped forward as Code Owners of the - Clang static analyzer and the Clang frontend, respectively.
    • - -
    • LLVM now has an official Blog at - http://blog.llvm.org. This is a great way - to learn about new LLVM-related features as they are implemented. Several - features in this release are already explained on the blog.
    • - -
    • The LLVM web pages are now checked into the SVN server, in the "www", - "www-pubs" and "www-releases" SVN modules. Previously they were hidden in a - largely inaccessible old CVS server.
    • - -
    • llvm.org is now hosted on a new (and much - faster) server. It is still graciously hosted at the University of Illinois - of Urbana Champaign.
    @@ -529,43 +293,10 @@
    -

    LLVM 2.7 includes several major new capabilities:

    +

    LLVM 2.8 includes several major new capabilities:

      -
    • 2.7 includes initial support for the MicroBlaze target. - MicroBlaze is a soft processor core designed for Xilinx FPGAs.
    • - -
    • 2.7 includes a new LLVM IR "extensible metadata" feature. This feature - supports many different use cases, including allowing front-end authors to - encode source level information into LLVM IR, which is consumed by later - language-specific passes. This is a great way to do high-level optimizations - like devirtualization, type-based alias analysis, etc. See the - Extensible Metadata Blog Post for more information.
    • - -
    • 2.7 encodes debug information -in a completely new way, built on extensible metadata. The new implementation -is much more memory efficient and paves the way for improvements to optimized -code debugging experience.
    • - -
    • 2.7 now directly supports taking the address of a label and doing an - indirect branch through a pointer. This is particularly useful for - interpreter loops, and is used to implement the GCC "address of label" - extension. For more information, see the -Address of Label and Indirect Branches in LLVM IR Blog Post. - -
    • 2.7 is the first release to start supporting APIs for assembling and - disassembling target machine code. These APIs are useful for a variety of - low level clients, and are surfaced in the new "enhanced disassembly" API. - For more information see the The X86 - Disassembler Blog Post for more information.
    • - -
    • 2.7 includes major parts of the work required by the new MC Project, - see the MC update above for more information.
    • - +
    • .
    @@ -580,31 +311,6 @@ expose new optimization opportunities:

      -
    • LLVM IR now supports a 16-bit "half float" data type through two new intrinsics and APFloat support.
    • -
    • LLVM IR supports two new function - attributes: inlinehint and alignstack(n). The former is a hint to the - optimizer that a function was declared 'inline' and thus the inliner should - weight it higher when considering inlining it. The later - indicates to the code generator that the function diverges from the platform - ABI on stack alignment.
    • -
    • The new llvm.objectsize intrinsic - allows the optimizer to infer the sizes of memory objects in some cases. - This intrinsic is used to implement the GCC __builtin_object_size - extension.
    • -
    • LLVM IR now supports marking load and store instructions with "non-temporal" hints (building on the new - metadata feature). This hint encourages the code - generator to generate non-temporal accesses when possible, which are useful - for code that is carefully managing cache behavior. Currently, only the - X86 backend provides target support for this feature.
    • - -
    • LLVM 2.7 has pre-alpha support for unions in LLVM IR. - Unfortunately, this support is not really usable in 2.7, so if you're - interested in pushing it forward, please help contribute to LLVM mainline.
    • - -
    • LLVM 2.8 changes the internal order of operands in InvokeInst @@ -629,48 +335,7 @@
        -
      • The inliner now merges arrays stack objects in different callees when - inlining multiple call sites into one function. This reduces the stack size - of the resultant function.
      • -
      • The -basicaa alias analysis pass (which is the default) has been improved to - be less dependent on "type safe" pointers. It can now look through bitcasts - and other constructs more aggressively, allowing better load/store - optimization.
      • -
      • The load elimination optimization in the GVN Pass [intro - blog post] has been substantially improved to be more aggressive about - partial redundancy elimination and do more aggressive phi translation. Please - see the - Advanced Topics in Redundant Load Elimination with a Focus on PHI Translation - Blog Post for more details.
      • -
      • The module target data string now - includes a notion of 'native' integer data types for the target. This - helps mid-level optimizations avoid promoting complex sequences of - operations to data types that are not natively supported (e.g. converting - i32 operations to i64 on 32-bit chips).
      • -
      • The mid-level optimizer is now conservative when operating on a module with - no target data. Previously, it would default to SparcV9 settings, which is - not what most people expected.
      • -
      • Jump threading is now much more aggressive at simplifying correlated - conditionals and threading blocks with otherwise complex logic. It has - subsumed the old "Conditional Propagation" pass, and -condprop has been - removed from LLVM 2.7.
      • -
      • The -instcombine pass has been refactored from being one huge file to being - a library of its own. Internally, it uses a customized IRBuilder to clean - it up and simplify it.
      • - -
      • The optimal edge profiling pass is reliable and much more complete than in - 2.6. It can be used with the llvm-prof tool but isn't wired up to the - llvm-gcc and clang command line options yet.
      • - -
      • A new experimental alias analysis implementation, -scev-aa, has been added. - It uses LLVM's Scalar Evolution implementation to do symbolic analysis of - pointer offset expressions to disambiguate pointers. It can catch a few - cases that basicaa cannot, particularly in complex loop nests.
      • - -
      • The default pass ordering has been tweaked for improved optimization - effectiveness.
      • +
      @@ -685,19 +350,7 @@
        -
      • The JIT now supports generating debug information and is compatible with -the new GDB 7.0 (and later) interfaces for registering dynamically generated -debug info.
      • - -
      • The JIT now defaults -to compiling eagerly to avoid a race condition in the lazy JIT. -Clients that still want the lazy JIT can switch it on by calling -ExecutionEngine::DisableLazyCompilation(false).
      • - -
      • It is now possible to create more than one JIT instance in the same process. -These JITs can generate machine code in parallel, -although you -still have to obey the other threading restrictions.
      • +
      @@ -715,49 +368,7 @@ it run faster:

        -
      • The 'llc -asm-verbose' option (which is now the default) has been enhanced - to emit many useful comments to .s files indicating information about spill - slots and loop nest structure. This should make it much easier to read and - understand assembly files. This is wired up in llvm-gcc and clang to - the -fverbose-asm option.
      • - -
      • New LSR with "full strength reduction" mode, which can reduce address - register pressure in loops where address generation is important.
      • - -
      • A new codegen level Common Subexpression Elimination pass (MachineCSE) - is available and enabled by default. It catches redundancies exposed by - lowering.
      • -
      • A new pre-register-allocation tail duplication pass is available and enabled - by default, it can substantially improve branch prediction quality in some - cases.
      • -
      • A new sign and zero extension optimization pass (OptimizeExtsPass) - is available and enabled by default. This pass can takes advantage - architecture features like x86-64 implicit zero extension behavior and - sub-registers.
      • -
      • The code generator now supports a mode where it attempts to preserve the - order of instructions in the input code. This is important for source that - is hand scheduled and extremely sensitive to scheduling. It is compatible - with the GCC -fno-schedule-insns option.
      • -
      • The target-independent code generator now supports generating code with - arbitrary numbers of result values. Returning more values than was - previously supported is handled by returning through a hidden pointer. In - 2.7, only the X86 and XCore targets have adopted support for this - though.
      • -
      • The code generator now supports generating code that follows the - Glasgow Haskell Compiler Calling - Convention and ABI.
      • -
      • The "DAG instruction - selection" phase of the code generator has been largely rewritten for - 2.7. Previously, tblgen spit out tons of C++ code which was compiled and - linked into the target to do the pattern matching, now it emits a much - smaller table which is read by the target-independent code. The primary - advantages of this approach is that the size and compile time of various - targets is much improved. The X86 code generator shrunk by 1.5MB of code, - for example.
      • -
      • Almost the entire code generator has switched to emitting code through the - MC interfaces instead of printing textually to the .s file. This led to a - number of cleanups and speedups. In 2.7, debug an exception handling - information does not go through MC yet.
      • +
      • MachO writer works.
      @@ -771,11 +382,9 @@

        -
      • The X86 backend now optimizes tails calls much more aggressively for - functions that use the standard C calling convention.
      • -
      • The X86 backend now models scalar SSE registers as subregs of the SSE vector - registers, making the code generator more aggressive in cases where scalars - and vector types are mixed.
      • +
      • The X86 backend now supports holding X87 floating point stack values + in registers across basic blocks, dramatically improving performance of code + that uses long double, and when targetting CPUs that don't support SSE.
      @@ -792,27 +401,7 @@
        -
      • The ARM backend now generates instructions in unified assembly syntax.
      • - -
      • llvm-gcc now has complete support for the ARM v7 NEON instruction set. This - support differs slightly from the GCC implementation. Please see the - - ARM Advanced SIMD (NEON) Intrinsics and Types in LLVM Blog Post for - helpful information if migrating code from GCC to LLVM-GCC.
      • - -
      • The ARM and Thumb code generators now use register scavenging for stack - object address materialization. This allows the use of R3 as a general - purpose register in Thumb1 code, as it was previous reserved for use in - stack address materialization. Secondly, sequential uses of the same - value will now re-use the materialized constant.
      • - -
      • The ARM backend now has good support for ARMv4 targets and has been tested - on StrongARM hardware. Previously, LLVM only supported ARMv4T and - newer chips.
      • - -
      • Atomic builtins are now supported for ARMv6 and ARMv7 (__sync_synchronize, - __sync_fetch_and_add, etc.).
      • +
      @@ -831,34 +420,7 @@

        -
      • The optimizer uses the new CodeMetrics class to measure the size of code. - Various passes (like the inliner, loop unswitcher, etc) all use this to make - more accurate estimates of the code size impact of various - optimizations.
      • -
      • A new - llvm/Analysis/InstructionSimplify.h interface is available for doing - symbolic simplification of instructions (e.g. a+0 -> a) - without requiring the instruction to exist. This centralizes a lot of - ad-hoc symbolic manipulation code scattered in various passes.
      • -
      • The optimizer now uses a new SSAUpdater - class which efficiently supports - doing unstructured SSA update operations. This centralized a bunch of code - scattered throughout various passes (e.g. jump threading, lcssa, - loop rotate, etc) for doing this sort of thing. The code generator has a - similar - MachineSSAUpdater class.
      • -
      • The - llvm/Support/Regex.h header exposes a platform independent regular - expression API. Building on this, the FileCheck utility now supports - regular exressions.
      • -
      • raw_ostream now supports a circular "debug stream" accessed with "dbgs()". - By default, this stream works the same way as "errs()", but if you pass - -debug-buffer-size=1000 to opt, the debug stream is capped to a - fixed sized circular buffer and the output is printed at the end of the - program's execution. This is helpful if you have a long lived compiler - process and you're interested in seeing snapshots in time.
      • +
      @@ -873,16 +435,7 @@

      Other miscellaneous features include:

        -
      • You can now build LLVM as a big dynamic library (e.g. "libllvm2.7.so"). To - get this, configure LLVM with the --enable-shared option.
      • - -
      • LLVM command line tools now overwrite their output by default. Previously, - they would only do this with -f. This makes them more convenient to use, and - behave more like standard unix tools.
      • - -
      • The opt and llc tools now autodetect whether their input is a .ll or .bc - file, and automatically do the right thing. This means you don't need to - explicitly use the llvm-as tool for most things.
      • +
      @@ -896,48 +449,18 @@

      If you're already an LLVM user or developer with out-of-tree changes based -on LLVM 2.6, this section lists some "gotchas" that you may run into upgrading +on LLVM 2.7, this section lists some "gotchas" that you may run into upgrading from the previous release.

        -
      • -The Andersen's alias analysis ("anders-aa") pass, the Predicate Simplifier -("predsimplify") pass, the LoopVR pass, the GVNPRE pass, and the random sampling -profiling ("rsprofiling") passes have all been removed. They were not being -actively maintained and had substantial problems. If you are interested in -these components, you are welcome to ressurect them from SVN, fix the -correctness problems, and resubmit them to mainline.
      • - -
      • LLVM now defaults to building most libraries with RTTI turned off, providing -a code size reduction. Packagers who are interested in building LLVM to support -plugins that require RTTI information should build with "make REQUIRE_RTTI=1" -and should read the new Advice on Packaging LLVM -document.
      • - -
      • The LLVM interpreter now defaults to not using libffi even -if you have it installed. This makes it more likely that an LLVM built on one -system will work when copied to a similar system. To use libffi, -configure with --enable-libffi.
      • - -
      • Debug information uses a completely different representation, an LLVM 2.6 -.bc file should work with LLVM 2.7, but debug info won't come forward.
      • - -
      • The LLVM 2.6 (and earlier) "malloc" and "free" instructions got removed, - along with LowerAllocations pass. Now you should just use a call to the - malloc and free functions in libc. These calls are optimized as well as - the old instructions were.
      • +
      • .

      In addition, many APIs have changed in this release. Some of the major LLVM API changes are:

        - -
      • The add, sub, and mul instructions no longer -support floating-point operands. The fadd, fsub, and -fmul instructions should be used for this purpose instead.
      • -
      @@ -1016,8 +539,7 @@
    • The MSIL, Alpha, SPU, MIPS, PIC16, Blackfin, MSP430, SystemZ and MicroBlaze backends are experimental.
    • llc "-filetype=asm" (the default) is the only - supported value for this option. The MachO writer is experimental, and - works much better in mainline SVN.
    • + supported value for this option. XXX Update me
    @@ -1034,8 +556,6 @@ all inline assembly that uses the X86 floating point stack. It supports the 'f' and 't' constraints, but not 'u'. -
  • The X86 backend generates inefficient floating point code when configured - to generate code for systems that don't have SSE2.
  • Win64 code generation wasn't widely tested. Everything should work, but we expect small issues to happen. Also, llvm-gcc cannot build the mingw64 runtime currently due to lack of support for the 'u' inline assembly From stoklund at 2pi.dk Wed Jul 21 11:39:53 2010 From: stoklund at 2pi.dk (Jakob Stoklund Olesen) Date: Wed, 21 Jul 2010 09:39:53 -0700 Subject: [llvm-commits] [llvm] r108991 - in /llvm/trunk: include/llvm/Target/TargetLowering.h lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp lib/CodeGen/SelectionDAG/TargetLowering.cpp lib/Target/ARM/ARMISelLowering.cpp lib/Target/ARM/ARMISelLowering.h lib/Target/PIC16/PIC16ISelLowering.cpp lib/Target/PIC16/PIC16ISelLowering.h In-Reply-To: <20100721060908.414072A6C12C@llvm.org> References: <20100721060908.414072A6C12C@llvm.org> Message-ID: <76163134-7530-435C-9080-99F77044AE97@2pi.dk> On Jul 20, 2010, at 11:09 PM, Evan Cheng wrote: > + case MVT::f32: > + RRC = ARM::SPRRegisterClass; > + break; > + case MVT::f64: case MVT::v8i8: case MVT::v4i16: > + case MVT::v2i32: case MVT::v1i64: case MVT::v2f32: > + RRC = ARM::SPRRegisterClass; > + Cost = 2; > + break; > + case MVT::v16i8: case MVT::v8i16: case MVT::v4i32: case MVT::v2i64: > + case MVT::v4f32: case MVT::v2f64: > + RRC = ARM::SPRRegisterClass; > + Cost = 4; > + break; > + case MVT::v4i64: > + RRC = ARM::SPRRegisterClass; > + Cost = 8; > + break; > + case MVT::v8i64: > + RRC = ARM::SPRRegisterClass; > + Cost = 16; > + break; > } > + return std::make_pair(RRC, Cost); Nice! Of course ARM is still being evil because there are 32 SPRs and 32 DPRs ;-) From gohman at apple.com Wed Jul 21 12:21:27 2010 From: gohman at apple.com (Dan Gohman) Date: Wed, 21 Jul 2010 17:21:27 -0000 Subject: [llvm-commits] [llvm] r109017 - /llvm/trunk/include/llvm/Module.h Message-ID: <20100721172127.EE0172A6C12C@llvm.org> Author: djg Date: Wed Jul 21 12:21:27 2010 New Revision: 109017 URL: http://llvm.org/viewvc/llvm-project?rev=109017&view=rev Log: Delete an obsolete comment. Modified: llvm/trunk/include/llvm/Module.h Modified: llvm/trunk/include/llvm/Module.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Module.h?rev=109017&r1=109016&r2=109017&view=diff ============================================================================== --- llvm/trunk/include/llvm/Module.h (original) +++ llvm/trunk/include/llvm/Module.h Wed Jul 21 12:21:27 2010 @@ -237,8 +237,7 @@ unsigned getMDKindID(StringRef Name) const; /// getMDKindNames - Populate client supplied SmallVector with the name for - /// custom metadata IDs registered in this LLVMContext. ID #0 is not used, - /// so it is filled in as an empty string. + /// custom metadata IDs registered in this LLVMContext. void getMDKindNames(SmallVectorImpl &Result) const; /// @} From resistor at mac.com Wed Jul 21 12:52:45 2010 From: resistor at mac.com (Owen Anderson) Date: Wed, 21 Jul 2010 17:52:45 -0000 Subject: [llvm-commits] [llvm] r109019 - in /llvm/trunk: include/llvm/PassRegistry.h lib/VMCore/Pass.cpp lib/VMCore/PassRegistry.cpp Message-ID: <20100721175245.46F632A6C12C@llvm.org> Author: resistor Date: Wed Jul 21 12:52:45 2010 New Revision: 109019 URL: http://llvm.org/viewvc/llvm-project?rev=109019&view=rev Log: Move the smarts of AnalysisGroup registration into PassRegistry. Modified: llvm/trunk/include/llvm/PassRegistry.h llvm/trunk/lib/VMCore/Pass.cpp llvm/trunk/lib/VMCore/PassRegistry.cpp Modified: llvm/trunk/include/llvm/PassRegistry.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/PassRegistry.h?rev=109019&r1=109018&r2=109019&view=diff ============================================================================== --- llvm/trunk/include/llvm/PassRegistry.h (original) +++ llvm/trunk/include/llvm/PassRegistry.h Wed Jul 21 12:52:45 2010 @@ -58,9 +58,8 @@ void unregisterPass(const PassInfo &PI); /// Analysis Group Mechanisms. - void registerAnalysisGroup(PassInfo *InterfaceInfo, - const PassInfo *ImplementationInfo, - bool isDefault); + void registerAnalysisGroup(intptr_t InterfaceID, intptr_t PassID, + PassInfo& Registeree, bool isDefault); void enumerateWith(PassRegistrationListener *L); void addRegistrationListener(PassRegistrationListener* L); Modified: llvm/trunk/lib/VMCore/Pass.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Pass.cpp?rev=109019&r1=109018&r2=109019&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/Pass.cpp (original) +++ llvm/trunk/lib/VMCore/Pass.cpp Wed Jul 21 12:52:45 2010 @@ -264,30 +264,9 @@ // RegisterAGBase::RegisterAGBase(const char *Name, intptr_t InterfaceID, intptr_t PassID, bool isDefault) - : PassInfo(Name, InterfaceID) { - - PassInfo *InterfaceInfo = - const_cast(Pass::lookupPassInfo(InterfaceID)); - if (InterfaceInfo == 0) { - // First reference to Interface, register it now. - PassRegistry::getPassRegistry()->registerPass(*this); - InterfaceInfo = this; - } - assert(isAnalysisGroup() && - "Trying to join an analysis group that is a normal pass!"); - - if (PassID) { - const PassInfo *ImplementationInfo = Pass::lookupPassInfo(PassID); - assert(ImplementationInfo && - "Must register pass before adding to AnalysisGroup!"); - - // Make sure we keep track of the fact that the implementation implements - // the interface. - PassInfo *IIPI = const_cast(ImplementationInfo); - IIPI->addInterfaceImplemented(InterfaceInfo); - - PassRegistry::getPassRegistry()->registerAnalysisGroup(InterfaceInfo, IIPI, isDefault); - } + : PassInfo(Name, InterfaceID) { + PassRegistry::getPassRegistry()->registerAnalysisGroup(InterfaceID, PassID, + *this, isDefault); } Modified: llvm/trunk/lib/VMCore/PassRegistry.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/PassRegistry.cpp?rev=109019&r1=109018&r2=109019&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/PassRegistry.cpp (original) +++ llvm/trunk/lib/VMCore/PassRegistry.cpp Wed Jul 21 12:52:45 2010 @@ -108,20 +108,40 @@ /// Analysis Group Mechanisms. -void PassRegistry::registerAnalysisGroup(PassInfo *InterfaceInfo, - const PassInfo *ImplementationInfo, +void PassRegistry::registerAnalysisGroup(intptr_t InterfaceID, + intptr_t PassID, + PassInfo& Registeree, bool isDefault) { - sys::SmartScopedLock Guard(Lock); - AnalysisGroupInfo &AGI = AnalysisGroupInfoMap[InterfaceInfo]; - assert(AGI.Implementations.count(ImplementationInfo) == 0 && - "Cannot add a pass to the same analysis group more than once!"); - AGI.Implementations.insert(ImplementationInfo); - if (isDefault) { - assert(InterfaceInfo->getNormalCtor() == 0 && - "Default implementation for analysis group already specified!"); - assert(ImplementationInfo->getNormalCtor() && - "Cannot specify pass as default if it does not have a default ctor"); - InterfaceInfo->setNormalCtor(ImplementationInfo->getNormalCtor()); + PassInfo *InterfaceInfo = const_cast(getPassInfo(InterfaceID)); + if (InterfaceInfo == 0) { + // First reference to Interface, register it now. + registerPass(Registeree); + InterfaceInfo = &Registeree; + } + assert(Registeree.isAnalysisGroup() && + "Trying to join an analysis group that is a normal pass!"); + + if (PassID) { + PassInfo *ImplementationInfo = const_cast(getPassInfo(PassID)); + assert(ImplementationInfo && + "Must register pass before adding to AnalysisGroup!"); + + // Make sure we keep track of the fact that the implementation implements + // the interface. + ImplementationInfo->addInterfaceImplemented(InterfaceInfo); + + sys::SmartScopedLock Guard(Lock); + AnalysisGroupInfo &AGI = AnalysisGroupInfoMap[InterfaceInfo]; + assert(AGI.Implementations.count(ImplementationInfo) == 0 && + "Cannot add a pass to the same analysis group more than once!"); + AGI.Implementations.insert(ImplementationInfo); + if (isDefault) { + assert(InterfaceInfo->getNormalCtor() == 0 && + "Default implementation for analysis group already specified!"); + assert(ImplementationInfo->getNormalCtor() && + "Cannot specify pass as default if it does not have a default ctor"); + InterfaceInfo->setNormalCtor(ImplementationInfo->getNormalCtor()); + } } } From gohman at apple.com Wed Jul 21 12:53:53 2010 From: gohman at apple.com (Dan Gohman) Date: Wed, 21 Jul 2010 17:53:53 -0000 Subject: [llvm-commits] [llvm] r109020 - /llvm/trunk/lib/VMCore/Metadata.cpp Message-ID: <20100721175353.96A7A2A6C12C@llvm.org> Author: djg Date: Wed Jul 21 12:53:53 2010 New Revision: 109020 URL: http://llvm.org/viewvc/llvm-project?rev=109020&view=rev Log: Tidy. Modified: llvm/trunk/lib/VMCore/Metadata.cpp Modified: llvm/trunk/lib/VMCore/Metadata.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Metadata.cpp?rev=109020&r1=109019&r2=109020&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/Metadata.cpp (original) +++ llvm/trunk/lib/VMCore/Metadata.cpp Wed Jul 21 12:53:53 2010 @@ -330,10 +330,8 @@ // NamedMDNode implementation. // -namespace llvm { // SymbolTableListTraits specialization for MDSymbolTable. -void ilist_traits -::addNodeToList(NamedMDNode *N) { +void ilist_traits::addNodeToList(NamedMDNode *N) { assert(N->getParent() == 0 && "Value already in a container!!"); Module *Owner = getListOwner(); N->setParent(Owner); @@ -347,7 +345,6 @@ MDSymbolTable &ST = Owner->getMDSymbolTable(); ST.remove(N->getName()); } -} static SmallVector &getNMDOps(void *Operands) { return *(SmallVector*)Operands; From gohman at apple.com Wed Jul 21 13:01:42 2010 From: gohman at apple.com (Dan Gohman) Date: Wed, 21 Jul 2010 18:01:42 -0000 Subject: [llvm-commits] [llvm] r109021 - in /llvm/trunk: include/llvm/Metadata.h lib/VMCore/Metadata.cpp Message-ID: <20100721180142.5A80D2A6C12C@llvm.org> Author: djg Date: Wed Jul 21 13:01:42 2010 New Revision: 109021 URL: http://llvm.org/viewvc/llvm-project?rev=109021&view=rev Log: Use TrackingVH instead of WeakVH for NamedMDNode's operands, since nodes referenced by NamedMDNodes shouldn't be deleted. Modified: llvm/trunk/include/llvm/Metadata.h llvm/trunk/lib/VMCore/Metadata.cpp Modified: llvm/trunk/include/llvm/Metadata.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Metadata.h?rev=109021&r1=109020&r2=109021&view=diff ============================================================================== --- llvm/trunk/include/llvm/Metadata.h (original) +++ llvm/trunk/include/llvm/Metadata.h Wed Jul 21 13:01:42 2010 @@ -185,7 +185,7 @@ std::string Name; Module *Parent; - void *Operands; // SmallVector, 4> + void *Operands; // SmallVector, 4> void setParent(Module *M) { Parent = M; } protected: Modified: llvm/trunk/lib/VMCore/Metadata.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Metadata.cpp?rev=109021&r1=109020&r2=109021&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/Metadata.cpp (original) +++ llvm/trunk/lib/VMCore/Metadata.cpp Wed Jul 21 13:01:42 2010 @@ -346,8 +346,8 @@ ST.remove(N->getName()); } -static SmallVector &getNMDOps(void *Operands) { - return *(SmallVector*)Operands; +static SmallVector, 4> &getNMDOps(void *Operands) { + return *(SmallVector, 4>*)Operands; } NamedMDNode::NamedMDNode(LLVMContext &C, const Twine &N, @@ -355,11 +355,11 @@ unsigned NumMDs, Module *ParentModule) : Value(Type::getMetadataTy(C), Value::NamedMDNodeVal), Parent(0) { setName(N); - Operands = new SmallVector(); + Operands = new SmallVector, 4>(); - SmallVector &Node = getNMDOps(Operands); + SmallVector, 4> &Node = getNMDOps(Operands); for (unsigned i = 0; i != NumMDs; ++i) - Node.push_back(WeakVH(MDs[i])); + Node.push_back(TrackingVH(MDs[i])); if (ParentModule) ParentModule->getNamedMDList().push_back(this); @@ -389,12 +389,12 @@ /// getOperand - Return specified operand. MDNode *NamedMDNode::getOperand(unsigned i) const { assert(i < getNumOperands() && "Invalid Operand number!"); - return dyn_cast_or_null(getNMDOps(Operands)[i]); + return dyn_cast_or_null(&*getNMDOps(Operands)[i]); } /// addOperand - Add metadata Operand. void NamedMDNode::addOperand(MDNode *M) { - getNMDOps(Operands).push_back(WeakVH(M)); + getNMDOps(Operands).push_back(TrackingVH(M)); } /// eraseFromParent - Drop all references and remove the node from parent From dpatel at apple.com Wed Jul 21 13:07:30 2010 From: dpatel at apple.com (Devang Patel) Date: Wed, 21 Jul 2010 11:07:30 -0700 Subject: [llvm-commits] [llvm] r109021 - in /llvm/trunk: include/llvm/Metadata.h lib/VMCore/Metadata.cpp In-Reply-To: <20100721180142.5A80D2A6C12C@llvm.org> References: <20100721180142.5A80D2A6C12C@llvm.org> Message-ID: On Jul 21, 2010, at 11:01 AM, Dan Gohman wrote: > Author: djg > Date: Wed Jul 21 13:01:42 2010 > New Revision: 109021 > > URL: http://llvm.org/viewvc/llvm-project?rev=109021&view=rev > Log: > Use TrackingVH instead of WeakVH for NamedMDNode's operands, since nodes > referenced by NamedMDNodes shouldn't be deleted. That was not required earlier. Why would you want to impose this restriction ? One could manually delete a MDNode for whatever reason. It does not happen for the debug info case though. > > /// getOperand - Return specified operand. > MDNode *NamedMDNode::getOperand(unsigned i) const { > assert(i < getNumOperands() && "Invalid Operand number!"); > - return dyn_cast_or_null(getNMDOps(Operands)[i]); > + return dyn_cast_or_null(&*getNMDOps(Operands)[i]); > } If you want to impose this restriction then or_null is unnecessary. - Devang From evan.cheng at apple.com Wed Jul 21 13:14:55 2010 From: evan.cheng at apple.com (Evan Cheng) Date: Wed, 21 Jul 2010 11:14:55 -0700 Subject: [llvm-commits] [llvm] r108991 - in /llvm/trunk: include/llvm/Target/TargetLowering.h lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp lib/CodeGen/SelectionDAG/TargetLowering.cpp lib/Target/ARM/ARMISelLowering.cpp lib/Target/ARM/ARMISelLowering.h lib/Target/PIC16/PIC16ISelLowering.cpp lib/Target/PIC16/PIC16ISelLowering.h In-Reply-To: <76163134-7530-435C-9080-99F77044AE97@2pi.dk> References: <20100721060908.414072A6C12C@llvm.org> <76163134-7530-435C-9080-99F77044AE97@2pi.dk> Message-ID: <52C889F7-637D-4C52-A336-B9D083A25052@apple.com> On Jul 21, 2010, at 9:39 AM, Jakob Stoklund Olesen wrote: > > On Jul 20, 2010, at 11:09 PM, Evan Cheng wrote: > >> + case MVT::f32: >> + RRC = ARM::SPRRegisterClass; >> + break; >> + case MVT::f64: case MVT::v8i8: case MVT::v4i16: >> + case MVT::v2i32: case MVT::v1i64: case MVT::v2f32: >> + RRC = ARM::SPRRegisterClass; >> + Cost = 2; >> + break; >> + case MVT::v16i8: case MVT::v8i16: case MVT::v4i32: case MVT::v2i64: >> + case MVT::v4f32: case MVT::v2f64: >> + RRC = ARM::SPRRegisterClass; >> + Cost = 4; >> + break; >> + case MVT::v4i64: >> + RRC = ARM::SPRRegisterClass; >> + Cost = 8; >> + break; >> + case MVT::v8i64: >> + RRC = ARM::SPRRegisterClass; >> + Cost = 16; >> + break; >> } >> + return std::make_pair(RRC, Cost); > > Nice! > > Of course ARM is still being evil because there are 32 SPRs and 32 DPRs ;-) There is no good way to model it. :-( I think using DPR as representative and cost 1 for both f32 and f64 is probably slightly more accurate. Evan -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20100721/ab058f5d/attachment.html From daniel at zuster.org Wed Jul 21 13:48:59 2010 From: daniel at zuster.org (Daniel Dunbar) Date: Wed, 21 Jul 2010 18:48:59 -0000 Subject: [llvm-commits] [llvm] r109026 - /llvm/trunk/include/llvm/Support/MachO.h Message-ID: <20100721184859.AA1822A6C12C@llvm.org> Author: ddunbar Date: Wed Jul 21 13:48:59 2010 New Revision: 109026 URL: http://llvm.org/viewvc/llvm-project?rev=109026&view=rev Log: Use System/DataTypes.h instead of stdint.h, which isn't portable. Modified: llvm/trunk/include/llvm/Support/MachO.h Modified: llvm/trunk/include/llvm/Support/MachO.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/MachO.h?rev=109026&r1=109025&r2=109026&view=diff ============================================================================== --- llvm/trunk/include/llvm/Support/MachO.h (original) +++ llvm/trunk/include/llvm/Support/MachO.h Wed Jul 21 13:48:59 2010 @@ -14,7 +14,7 @@ #ifndef LLVM_SUPPORT_MACHO_H #define LLVM_SUPPORT_MACHO_H -#include +#include "llvm/System/DataTypes.h" // NOTE: The enums in this file are intentially named to be different than those // in the headers in /usr/include/mach (on darwin systems) to avoid conflicts From gohman at apple.com Wed Jul 21 13:54:18 2010 From: gohman at apple.com (Dan Gohman) Date: Wed, 21 Jul 2010 18:54:18 -0000 Subject: [llvm-commits] [llvm] r109028 - in /llvm/trunk: docs/LangRef.html include/llvm/Analysis/DebugInfo.h include/llvm/Metadata.h lib/Analysis/DebugInfo.cpp lib/AsmParser/LLParser.cpp lib/Bitcode/Reader/BitcodeReader.cpp lib/Bitcode/Writer/BitcodeWriter.cpp lib/CodeGen/AsmPrinter/DwarfDebug.cpp lib/VMCore/AsmWriter.cpp lib/VMCore/Metadata.cpp test/Feature/NamedMDNode.ll Message-ID: <20100721185419.7DBEE2A6C12C@llvm.org> Author: djg Date: Wed Jul 21 13:54:18 2010 New Revision: 109028 URL: http://llvm.org/viewvc/llvm-project?rev=109028&view=rev Log: Disallow null as a named metadata operand. Make MDNode::destroy private. Fix the one thing that used MDNode::destroy, outside of MDNode itself. One should never delete or destroy an MDNode explicitly. MDNodes implicitly go away when there are no references to them (implementation details aside). Modified: llvm/trunk/docs/LangRef.html llvm/trunk/include/llvm/Analysis/DebugInfo.h llvm/trunk/include/llvm/Metadata.h llvm/trunk/lib/Analysis/DebugInfo.cpp llvm/trunk/lib/AsmParser/LLParser.cpp llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp llvm/trunk/lib/VMCore/AsmWriter.cpp llvm/trunk/lib/VMCore/Metadata.cpp llvm/trunk/test/Feature/NamedMDNode.ll Modified: llvm/trunk/docs/LangRef.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/LangRef.html?rev=109028&r1=109027&r2=109028&view=diff ============================================================================== --- llvm/trunk/docs/LangRef.html (original) +++ llvm/trunk/docs/LangRef.html Wed Jul 21 13:54:18 2010 @@ -949,15 +949,17 @@

    Named metadata is a collection of metadata. Metadata - nodes (but not metadata strings) and null are the only valid operands for + nodes (but not metadata strings) are the only valid operands for a named metadata.

    Syntax:
    -; An unnamed metadata node, which is referenced by the named metadata.
    +; Some unnamed metadata nodes, which are referenced by the named metadata.
    +!0 = metadata !{metadata !"zero"}
     !1 = metadata !{metadata !"one"}
    +!2 = metadata !{metadata !"two"}
     ; A named metadata.
    -!name = !{null, !1}
    +!name = !{!0, !1, !2}
     
    Modified: llvm/trunk/include/llvm/Analysis/DebugInfo.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/DebugInfo.h?rev=109028&r1=109027&r2=109028&view=diff ============================================================================== --- llvm/trunk/include/llvm/Analysis/DebugInfo.h (original) +++ llvm/trunk/include/llvm/Analysis/DebugInfo.h Wed Jul 21 13:54:18 2010 @@ -304,8 +304,7 @@ void dump() const; /// replaceAllUsesWith - Replace all uses of debug info referenced by - /// this descriptor. After this completes, the current debug info value - /// is erased. + /// this descriptor. void replaceAllUsesWith(DIDescriptor &D); }; Modified: llvm/trunk/include/llvm/Metadata.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Metadata.h?rev=109028&r1=109027&r2=109028&view=diff ============================================================================== --- llvm/trunk/include/llvm/Metadata.h (original) +++ llvm/trunk/include/llvm/Metadata.h Wed Jul 21 13:54:18 2010 @@ -149,9 +149,6 @@ // critical code because it recursively visits all the MDNode's operands. const Function *getFunction() const; - // destroy - Delete this node. Only when there are no uses. - void destroy(); - /// Profile - calculate a unique identifier for this MDNode to collapse /// duplicates void Profile(FoldingSetNodeID &ID) const; @@ -162,6 +159,9 @@ return V->getValueID() == MDNodeVal; } private: + // destroy - Delete this node. Only when there are no uses. + void destroy(); + bool isNotUniqued() const { return (getSubclassDataFromValue() & NotUniquedBit) != 0; } Modified: llvm/trunk/lib/Analysis/DebugInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/DebugInfo.cpp?rev=109028&r1=109027&r2=109028&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/DebugInfo.cpp (original) +++ llvm/trunk/lib/Analysis/DebugInfo.cpp Wed Jul 21 13:54:18 2010 @@ -233,8 +233,7 @@ } /// replaceAllUsesWith - Replace all uses of debug info referenced by -/// this descriptor. After this completes, the current debug info value -/// is erased. +/// this descriptor. void DIDerivedType::replaceAllUsesWith(DIDescriptor &D) { if (!DbgNode) return; @@ -249,7 +248,6 @@ const MDNode *DN = D; const Value *V = cast_or_null(DN); Node->replaceAllUsesWith(const_cast(V)); - Node->destroy(); } } @@ -1385,7 +1383,7 @@ return 0; for (unsigned i = 0, e = NMD->getNumOperands(); i != e; ++i) { - DIDescriptor DIG(cast_or_null(NMD->getOperand(i))); + DIDescriptor DIG(cast(NMD->getOperand(i))); if (!DIG.isGlobalVariable()) continue; if (DIGlobalVariable(DIG).getGlobal() == V) Modified: llvm/trunk/lib/AsmParser/LLParser.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/AsmParser/LLParser.cpp?rev=109028&r1=109027&r2=109028&view=diff ============================================================================== --- llvm/trunk/lib/AsmParser/LLParser.cpp (original) +++ llvm/trunk/lib/AsmParser/LLParser.cpp Wed Jul 21 13:54:18 2010 @@ -546,12 +546,6 @@ SmallVector Elts; if (Lex.getKind() != lltok::rbrace) do { - // Null is a special case since it is typeless. - if (EatIfPresent(lltok::kw_null)) { - Elts.push_back(0); - continue; - } - if (ParseToken(lltok::exclaim, "Expected '!' here")) return true; Modified: llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp?rev=109028&r1=109027&r2=109028&view=diff ============================================================================== --- llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp (original) +++ llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp Wed Jul 21 13:54:18 2010 @@ -803,10 +803,6 @@ unsigned Size = Record.size(); SmallVector Elts; for (unsigned i = 0; i != Size; ++i) { - if (Record[i] == ~0U) { - Elts.push_back(NULL); - continue; - } MDNode *MD = dyn_cast(MDValueList.getValueFwdRef(Record[i])); if (MD == 0) return Error("Malformed metadata record"); Modified: llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp?rev=109028&r1=109027&r2=109028&view=diff ============================================================================== --- llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp (original) +++ llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp Wed Jul 21 13:54:18 2010 @@ -558,12 +558,8 @@ Record.clear(); // Write named metadata operands. - for (unsigned i = 0, e = NMD->getNumOperands(); i != e; ++i) { - if (NMD->getOperand(i)) - Record.push_back(VE.getValueID(NMD->getOperand(i))); - else - Record.push_back(~0U); - } + for (unsigned i = 0, e = NMD->getNumOperands(); i != e; ++i) + Record.push_back(VE.getValueID(NMD->getOperand(i))); Stream.EmitRecord(bitc::METADATA_NAMED_NODE, Record, 0); Record.clear(); } Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=109028&r1=109027&r2=109028&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original) +++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Wed Jul 21 13:54:18 2010 @@ -2319,7 +2319,7 @@ M->getNamedMetadata(Twine("llvm.dbg.lv.", getRealLinkageName(F->getName())))) { for (unsigned i = 0, e = NMD->getNumOperands(); i != e; ++i) { - DIVariable DV(cast_or_null(NMD->getOperand(i))); + DIVariable DV(cast(NMD->getOperand(i))); if (!DV || !Processed.insert(DV)) continue; DbgScope *Scope = DbgScopeMap.lookup(DV.getContext()); @@ -2783,7 +2783,7 @@ M->getNamedMetadata(Twine("llvm.dbg.lv.", getRealLinkageName(FName)))) { for (unsigned i = 0, e = NMD->getNumOperands(); i != e; ++i) { - DIVariable DV(cast_or_null(NMD->getOperand(i))); + DIVariable DV(cast(NMD->getOperand(i))); if (!DV || !ProcessedVars.insert(DV)) continue; DbgScope *Scope = AbstractScopes.lookup(DV.getContext()); Modified: llvm/trunk/lib/VMCore/AsmWriter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/AsmWriter.cpp?rev=109028&r1=109027&r2=109028&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/AsmWriter.cpp (original) +++ llvm/trunk/lib/VMCore/AsmWriter.cpp Wed Jul 21 13:54:18 2010 @@ -638,10 +638,8 @@ I = TheModule->named_metadata_begin(), E = TheModule->named_metadata_end(); I != E; ++I) { const NamedMDNode *NMD = I; - for (unsigned i = 0, e = NMD->getNumOperands(); i != e; ++i) { - if (MDNode *MD = NMD->getOperand(i)) - CreateMetadataSlot(MD); - } + for (unsigned i = 0, e = NMD->getNumOperands(); i != e; ++i) + CreateMetadataSlot(NMD->getOperand(i)); } // Add all the unnamed functions to the table. @@ -1424,10 +1422,7 @@ Out << "!" << NMD->getName() << " = !{"; for (unsigned i = 0, e = NMD->getNumOperands(); i != e; ++i) { if (i) Out << ", "; - if (MDNode *MD = NMD->getOperand(i)) - Out << '!' << Machine.getMetadataSlot(MD); - else - Out << "null"; + Out << '!' << Machine.getMetadataSlot(NMD->getOperand(i)); } Out << "}\n"; } Modified: llvm/trunk/lib/VMCore/Metadata.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Metadata.cpp?rev=109028&r1=109027&r2=109028&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/Metadata.cpp (original) +++ llvm/trunk/lib/VMCore/Metadata.cpp Wed Jul 21 13:54:18 2010 @@ -389,7 +389,7 @@ /// getOperand - Return specified operand. MDNode *NamedMDNode::getOperand(unsigned i) const { assert(i < getNumOperands() && "Invalid Operand number!"); - return dyn_cast_or_null(&*getNMDOps(Operands)[i]); + return dyn_cast(&*getNMDOps(Operands)[i]); } /// addOperand - Add metadata Operand. Modified: llvm/trunk/test/Feature/NamedMDNode.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Feature/NamedMDNode.ll?rev=109028&r1=109027&r2=109028&view=diff ============================================================================== --- llvm/trunk/test/Feature/NamedMDNode.ll (original) +++ llvm/trunk/test/Feature/NamedMDNode.ll Wed Jul 21 13:54:18 2010 @@ -3,7 +3,7 @@ ;; Simple NamedMDNode !0 = metadata !{i32 42} !1 = metadata !{metadata !"foo"} -!llvm.stuff = !{!0, !1, null} +!llvm.stuff = !{!0, !1} !samename = !{!0, !1} declare void @samename() From clattner at apple.com Wed Jul 21 15:01:40 2010 From: clattner at apple.com (Chris Lattner) Date: Wed, 21 Jul 2010 13:01:40 -0700 Subject: [llvm-commits] [llvm] r109021 - in /llvm/trunk: include/llvm/Metadata.h lib/VMCore/Metadata.cpp In-Reply-To: References: <20100721180142.5A80D2A6C12C@llvm.org> Message-ID: On Jul 21, 2010, at 11:07 AM, Devang Patel wrote: > > On Jul 21, 2010, at 11:01 AM, Dan Gohman wrote: > >> Author: djg >> Date: Wed Jul 21 13:01:42 2010 >> New Revision: 109021 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=109021&view=rev >> Log: >> Use TrackingVH instead of WeakVH for NamedMDNode's operands, since nodes >> referenced by NamedMDNodes shouldn't be deleted. > > That was not required earlier. Why would you want to impose this restriction ? > One could manually delete a MDNode for whatever reason. It does not happen for the debug info case though. In what case is that valid and desirable? Since MDNodes are uniqued, you don't know what is using them. -Chris From gohman at apple.com Wed Jul 21 15:25:43 2010 From: gohman at apple.com (Dan Gohman) Date: Wed, 21 Jul 2010 20:25:43 -0000 Subject: [llvm-commits] [llvm] r109031 - /llvm/trunk/lib/VMCore/Verifier.cpp Message-ID: <20100721202543.D47472A6C12C@llvm.org> Author: djg Date: Wed Jul 21 15:25:43 2010 New Revision: 109031 URL: http://llvm.org/viewvc/llvm-project?rev=109031&view=rev Log: NamedMDNode is never an operand. Modified: llvm/trunk/lib/VMCore/Verifier.cpp Modified: llvm/trunk/lib/VMCore/Verifier.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Verifier.cpp?rev=109031&r1=109030&r2=109031&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/Verifier.cpp (original) +++ llvm/trunk/lib/VMCore/Verifier.cpp Wed Jul 21 15:25:43 2010 @@ -520,7 +520,7 @@ Value *Op = MD.getOperand(i); if (!Op) continue; - if (isa(Op) || isa(Op) || isa(Op)) + if (isa(Op) || isa(Op)) continue; if (MDNode *N = dyn_cast(Op)) { Assert2(MD.isFunctionLocal() || !N->isFunctionLocal(), From bruno.cardoso at gmail.com Wed Jul 21 15:38:42 2010 From: bruno.cardoso at gmail.com (Bruno Cardoso Lopes) Date: Wed, 21 Jul 2010 20:38:42 -0000 Subject: [llvm-commits] [llvm] r109032 - /llvm/trunk/lib/Target/X86/X86InstrSSE.td Message-ID: <20100721203843.31AF02A6C12C@llvm.org> Author: bruno Date: Wed Jul 21 15:38:42 2010 New Revision: 109032 URL: http://llvm.org/viewvc/llvm-project?rev=109032&view=rev Log: Avoid AVX instructions to be selected instead of its SSE form Modified: llvm/trunk/lib/Target/X86/X86InstrSSE.td Modified: llvm/trunk/lib/Target/X86/X86InstrSSE.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrSSE.td?rev=109032&r1=109031&r2=109032&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86InstrSSE.td (original) +++ llvm/trunk/lib/Target/X86/X86InstrSSE.td Wed Jul 21 15:38:42 2010 @@ -3081,7 +3081,7 @@ defm MOVDDUP : sse3_replicate_dfp<"movddup">; // Move Unaligned Integer -let isAsmParserOnly = 1 in +let isAsmParserOnly = 1, Predicates = [HasAVX] in def VLDDQUrm : S3DI<0xF0, MRMSrcMem, (outs VR128:$dst), (ins i128mem:$src), "vlddqu\t{$src, $dst|$dst, $src}", [(set VR128:$dst, (int_x86_sse3_ldu_dq addr:$src))]>, VEX; From resistor at mac.com Wed Jul 21 15:46:41 2010 From: resistor at mac.com (Owen Anderson) Date: Wed, 21 Jul 2010 20:46:41 -0000 Subject: [llvm-commits] [llvm] r109034 - /llvm/trunk/include/llvm/PassSupport.h Message-ID: <20100721204641.4A7932A6C12C@llvm.org> Author: resistor Date: Wed Jul 21 15:46:41 2010 New Revision: 109034 URL: http://llvm.org/viewvc/llvm-project?rev=109034&view=rev Log: Add the INITIALIZE_PASS macro. Modified: llvm/trunk/include/llvm/PassSupport.h Modified: llvm/trunk/include/llvm/PassSupport.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/PassSupport.h?rev=109034&r1=109033&r2=109034&view=diff ============================================================================== --- llvm/trunk/include/llvm/PassSupport.h (original) +++ llvm/trunk/include/llvm/PassSupport.h Wed Jul 21 15:46:41 2010 @@ -132,6 +132,8 @@ PassInfo(const PassInfo &); // do not implement }; +#define INITIALIZE_PASS(passName, arg, name, cfg, analysis) \ + static RegisterPass passName ## _info(arg, name, cfg, analysis) template Pass *callDefaultCtor() { return new PassName(); } From natebegeman at mac.com Wed Jul 21 15:49:52 2010 From: natebegeman at mac.com (Nate Begeman) Date: Wed, 21 Jul 2010 20:49:52 -0000 Subject: [llvm-commits] [llvm] r109035 - in /llvm/trunk/lib/Target/X86: X86ISelLowering.cpp X86InstrInfo.cpp Message-ID: <20100721204953.583492A6C12C@llvm.org> Author: sampo Date: Wed Jul 21 15:49:52 2010 New Revision: 109035 URL: http://llvm.org/viewvc/llvm-project?rev=109035&view=rev Log: Fix a couple issues with Win64 ABI 1) all registers were spilled as xmm, regardless of actual size 2) win64 abi doesn't do the varargs-size-in-%al thing Still to look into: xmm6-15 are marked as clobbered by call instructions on win64 even though they aren't. Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp llvm/trunk/lib/Target/X86/X86InstrInfo.cpp Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=109035&r1=109034&r2=109035&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original) +++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Wed Jul 21 15:49:52 2010 @@ -1990,7 +1990,7 @@ } } - if (Is64Bit && isVarArg) { + if (Is64Bit && isVarArg && !Subtarget->isTargetWin64()) { // From AMD64 ABI document: // For calls that may call functions that use varargs or stdargs // (prototype-less calls or calls to functions containing ellipsis (...) in @@ -1999,7 +1999,6 @@ // the number of registers, but must be an ubound on the number of SSE // registers used and is in the range 0 - 8 inclusive. - // FIXME: Verify this on Win64 // Count the number of XMM registers allocated. static const unsigned XMMArgRegs[] = { X86::XMM0, X86::XMM1, X86::XMM2, X86::XMM3, Modified: llvm/trunk/lib/Target/X86/X86InstrInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrInfo.cpp?rev=109035&r1=109034&r2=109035&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86InstrInfo.cpp (original) +++ llvm/trunk/lib/Target/X86/X86InstrInfo.cpp Wed Jul 21 15:49:52 2010 @@ -2062,7 +2062,6 @@ DebugLoc DL = MBB.findDebugLoc(MI); bool is64Bit = TM.getSubtarget().is64Bit(); - bool isWin64 = TM.getSubtarget().isTargetWin64(); unsigned SlotSize = is64Bit ? 8 : 4; MachineFunction &MF = *MBB.getParent(); @@ -2078,7 +2077,7 @@ if (Reg == FPReg) // X86RegisterInfo::emitPrologue will handle spilling of frame register. continue; - if (!X86::VR128RegClass.contains(Reg) && !isWin64) { + if (!X86::VR128RegClass.contains(Reg)) { CalleeFrameSize += SlotSize; BuildMI(MBB, MI, DL, get(Opc)).addReg(Reg, RegState::Kill); } else { @@ -2103,14 +2102,13 @@ MachineFunction &MF = *MBB.getParent(); unsigned FPReg = RI.getFrameRegister(MF); bool is64Bit = TM.getSubtarget().is64Bit(); - bool isWin64 = TM.getSubtarget().isTargetWin64(); unsigned Opc = is64Bit ? X86::POP64r : X86::POP32r; for (unsigned i = 0, e = CSI.size(); i != e; ++i) { unsigned Reg = CSI[i].getReg(); if (Reg == FPReg) // X86RegisterInfo::emitEpilogue will handle restoring of frame register. continue; - if (!X86::VR128RegClass.contains(Reg) && !isWin64) { + if (!X86::VR128RegClass.contains(Reg)) { BuildMI(MBB, MI, DL, get(Opc), Reg); } else { loadRegFromStackSlot(MBB, MI, Reg, CSI[i].getFrameIdx(), From anton at korobeynikov.info Wed Jul 21 16:01:12 2010 From: anton at korobeynikov.info (Anton Korobeynikov) Date: Thu, 22 Jul 2010 01:01:12 +0400 Subject: [llvm-commits] [llvm] r109035 - in /llvm/trunk/lib/Target/X86: X86ISelLowering.cpp X86InstrInfo.cpp In-Reply-To: <20100721204953.583492A6C12C@llvm.org> References: <20100721204953.583492A6C12C@llvm.org> Message-ID: Hello, Nate > xmm6-15 are marked as clobbered by call instructions on win64 even though they aren't. They in fact are. Consider reading e.g. http://msdn.microsoft.com/en-us/library/9z1stfyw.aspx > - ? ?if (!X86::VR128RegClass.contains(Reg) && !isWin64) { > + ? ?if (!X86::VR128RegClass.contains(Reg)) { This change is incorrect. This way you'll get stuff like "push xmm6", which is invalid instruction. Please revert. -- With best regards, Anton Korobeynikov Faculty of Mathematics and Mechanics, Saint Petersburg State University From natebegeman at mac.com Wed Jul 21 16:04:05 2010 From: natebegeman at mac.com (Nate Begeman) Date: Wed, 21 Jul 2010 14:04:05 -0700 Subject: [llvm-commits] [llvm] r109035 - in /llvm/trunk/lib/Target/X86: X86ISelLowering.cpp X86InstrInfo.cpp In-Reply-To: References: <20100721204953.583492A6C12C@llvm.org> Message-ID: <1872DAE9-6CEE-493A-B214-18F997DDD1C1@mac.com> On Jul 21, 2010, at 2:01 PM, Anton Korobeynikov wrote: > Hello, Nate > >> xmm6-15 are marked as clobbered by call instructions on win64 even though they aren't. > They in fact are. Consider reading e.g. > http://msdn.microsoft.com/en-us/library/9z1stfyw.aspx Your link says they're callee-save, not call-clobbered. > >> - if (!X86::VR128RegClass.contains(Reg) && !isWin64) { >> + if (!X86::VR128RegClass.contains(Reg)) { > This change is incorrect. This way you'll get stuff like "push xmm6", > which is invalid instruction. > Please revert. How so? The previous code is obviously incorrect, and leads to code like the following being generated on win64 today; movaps rsi, (stack) Nate From anton at korobeynikov.info Wed Jul 21 16:16:02 2010 From: anton at korobeynikov.info (Anton Korobeynikov) Date: Thu, 22 Jul 2010 01:16:02 +0400 Subject: [llvm-commits] [llvm] r109035 - in /llvm/trunk/lib/Target/X86: X86ISelLowering.cpp X86InstrInfo.cpp In-Reply-To: <1872DAE9-6CEE-493A-B214-18F997DDD1C1@mac.com> References: <20100721204953.583492A6C12C@llvm.org> <1872DAE9-6CEE-493A-B214-18F997DDD1C1@mac.com> Message-ID: >>> xmm6-15 are marked as clobbered by call instructions on win64 even though they aren't. >> They in fact are. Consider reading e.g. >> http://msdn.microsoft.com/en-us/library/9z1stfyw.aspx > > Your link says they're callee-save, not call-clobbered. Hrm. Sorry, I should drink more coffee. Where they are marked as call-clobbered? > How so? ?The previous code is obviously incorrect, and leads to code like the following being generated on win64 today; > movaps rsi, (stack) Right. It was broken in r105344. In any case - your change is incorrect :) The problem just moves to prologue / epilogue expansion code. You can find the full description of the problem at http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20090824/085827.html Unfortunately, I didnt't find the time since that time to make a generic fix.... -- With best regards, Anton Korobeynikov Faculty of Mathematics and Mechanics, Saint Petersburg State University From gohman at apple.com Wed Jul 21 16:18:37 2010 From: gohman at apple.com (Dan Gohman) Date: Wed, 21 Jul 2010 21:18:37 -0000 Subject: [llvm-commits] [llvm] r109036 - /llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp Message-ID: <20100721211837.D1A862A6C12C@llvm.org> Author: djg Date: Wed Jul 21 16:18:37 2010 New Revision: 109036 URL: http://llvm.org/viewvc/llvm-project?rev=109036&view=rev Log: Add some debug output to help diagnose PR7689. Modified: llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp Modified: llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp?rev=109036&r1=109035&r2=109036&view=diff ============================================================================== --- llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp (original) +++ llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp Wed Jul 21 16:18:37 2010 @@ -897,6 +897,9 @@ Record.push_back(VE.getValueID(BA->getFunction())); Record.push_back(VE.getGlobalBasicBlockID(BA->getBasicBlock())); } else { +#ifndef NDEBUG + C->dump(); +#endif llvm_unreachable("Unknown constant!"); } Stream.EmitRecord(Code, Record, AbbrevToUse); From grosbach at apple.com Wed Jul 21 16:21:52 2010 From: grosbach at apple.com (Jim Grosbach) Date: Wed, 21 Jul 2010 21:21:52 -0000 Subject: [llvm-commits] [llvm] r109037 - /llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Message-ID: <20100721212152.6975D2A6C12C@llvm.org> Author: grosbach Date: Wed Jul 21 16:21:52 2010 New Revision: 109037 URL: http://llvm.org/viewvc/llvm-project?rev=109037&view=rev Log: 80 column and trailing whitespace cleanup 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=109037&r1=109036&r2=109037&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original) +++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Wed Jul 21 16:21:52 2010 @@ -44,7 +44,7 @@ static cl::opt PrintDbgScope("print-dbgscope", cl::Hidden, cl::desc("Print DbgScope information for each machine instruction")); -static cl::opt DisableDebugInfoPrinting("disable-debug-info-print", +static cl::opt DisableDebugInfoPrinting("disable-debug-info-print", cl::Hidden, cl::desc("Disable debug info printing")); @@ -116,8 +116,8 @@ /// addGlobalType - Add a new global type to the compile unit. /// - void addGlobalType(StringRef Name, DIE *Die) { - GlobalTypes[Name] = Die; + void addGlobalType(StringRef Name, DIE *Die) { + GlobalTypes[Name] = Die; } /// getDIE - Returns the debug information entry map slot for the @@ -131,8 +131,9 @@ /// getDIEEntry - Returns the debug information entry for the speciefied /// debug variable. - DIEEntry *getDIEEntry(const MDNode *N) { - DenseMap::iterator I = MDNodeToDIEEntryMap.find(N); + DIEEntry *getDIEEntry(const MDNode *N) { + DenseMap::iterator I = + MDNodeToDIEEntryMap.find(N); if (I == MDNodeToDIEEntryMap.end()) return NULL; return I->second; @@ -194,7 +195,7 @@ DbgScope *Parent; // Parent to this scope. DIDescriptor Desc; // Debug info descriptor for scope. // Location at which this scope is inlined. - AssertingVH InlinedAtLocation; + AssertingVH InlinedAtLocation; bool AbstractScope; // Abstract Scope const MachineInstr *LastInsn; // Last instruction of this scope. const MachineInstr *FirstInsn; // First instruction of this scope. @@ -225,14 +226,14 @@ /// openInsnRange - This scope covers instruction range starting from MI. void openInsnRange(const MachineInstr *MI) { - if (!FirstInsn) + if (!FirstInsn) FirstInsn = MI; - + if (Parent) Parent->openInsnRange(MI); } - /// extendInsnRange - Extend the current instruction range covered by + /// extendInsnRange - Extend the current instruction range covered by /// this scope. void extendInsnRange(const MachineInstr *MI) { assert (FirstInsn && "MI Range is not open!"); @@ -247,9 +248,9 @@ void closeInsnRange(DbgScope *NewScope = NULL) { assert (LastInsn && "Last insn missing!"); Ranges.push_back(DbgRange(FirstInsn, LastInsn)); - FirstInsn = NULL; + FirstInsn = NULL; LastInsn = NULL; - // If Parent dominates NewScope then do not close Parent's instruction + // If Parent dominates NewScope then do not close Parent's instruction // range. if (Parent && (!NewScope || !Parent->dominates(NewScope))) Parent->closeInsnRange(NewScope); @@ -264,7 +265,7 @@ unsigned getDFSIn() const { return DFSIn; } void setDFSIn(unsigned I) { DFSIn = I; } bool dominates(const DbgScope *S) { - if (S == this) + if (S == this) return true; if (DFSIn < S->getDFSIn() && DFSOut > S->getDFSOut()) return true; @@ -313,13 +314,13 @@ DwarfDebug::DwarfDebug(AsmPrinter *A, Module *M) : Asm(A), MMI(Asm->MMI), FirstCU(0), - AbbreviationsSet(InitAbbreviationsSetSize), + AbbreviationsSet(InitAbbreviationsSetSize), CurrentFnDbgScope(0), PrevLabel(NULL) { NextStringPoolNumber = 0; - + DwarfFrameSectionSym = DwarfInfoSectionSym = DwarfAbbrevSectionSym = 0; DwarfStrSectionSym = TextSectionSym = 0; - DwarfDebugRangeSectionSym = DwarfDebugLocSectionSym = 0; + DwarfDebugRangeSectionSym = DwarfDebugLocSectionSym = 0; DwarfDebugLineSectionSym = CurrentLineSectionSym = 0; FunctionBeginSym = FunctionEndSym = 0; DIEIntegerOne = new (DIEValueAllocator) DIEInteger(1); @@ -377,7 +378,7 @@ void DwarfDebug::addUInt(DIE *Die, unsigned Attribute, unsigned Form, uint64_t Integer) { if (!Form) Form = DIEInteger::BestForm(false, Integer); - DIEValue *Value = Integer == 1 ? + DIEValue *Value = Integer == 1 ? DIEIntegerOne : new (DIEValueAllocator) DIEInteger(Integer); Die->addValue(Attribute, Form, Value); } @@ -392,7 +393,7 @@ } /// addString - Add a string attribute data and value. DIEString only -/// keeps string reference. +/// keeps string reference. void DwarfDebug::addString(DIE *Die, unsigned Attribute, unsigned Form, StringRef String) { DIEValue *Value = new (DIEValueAllocator) DIEString(String); @@ -835,26 +836,26 @@ assert (MO.isFPImm() && "Invalid machine operand!"); DIEBlock *Block = new (DIEValueAllocator) DIEBlock(); APFloat FPImm = MO.getFPImm()->getValueAPF(); - + // Get the raw data form of the floating point. const APInt FltVal = FPImm.bitcastToAPInt(); const char *FltPtr = (const char*)FltVal.getRawData(); - + int NumBytes = FltVal.getBitWidth() / 8; // 8 bits per byte. bool LittleEndian = Asm->getTargetData().isLittleEndian(); int Incr = (LittleEndian ? 1 : -1); int Start = (LittleEndian ? 0 : NumBytes - 1); int Stop = (LittleEndian ? NumBytes : -1); - + // Output the constant to DWARF one byte at a time. for (; Start != Stop; Start += Incr) addUInt(Block, 0, dwarf::DW_FORM_data1, (unsigned char)0xFF & FltPtr[Start]); - + addBlock(Die, dwarf::DW_AT_const_value, 0, Block); if (VS) addLabel(Die, dwarf::DW_AT_start_scope, dwarf::DW_FORM_addr, VS); - return true; + return true; } @@ -872,7 +873,7 @@ ContextDIE->addChild(Die); } else if (DIE *ContextDIE = getCompileUnit(Context)->getDIE(Context)) ContextDIE->addChild(Die); - else + else getCompileUnit(Context)->addDie(Die); } @@ -1057,7 +1058,7 @@ DICompositeType ContainingType = CTy.getContainingType(); if (DIDescriptor(ContainingType).isCompositeType()) - addDIEEntry(&Buffer, dwarf::DW_AT_containing_type, dwarf::DW_FORM_ref4, + addDIEEntry(&Buffer, dwarf::DW_AT_containing_type, dwarf::DW_FORM_ref4, getOrCreateTypeDIE(DIType(ContainingType))); else { DIDescriptor Context = CTy.getContext(); @@ -1073,7 +1074,7 @@ if (!Name.empty()) addString(&Buffer, dwarf::DW_AT_name, dwarf::DW_FORM_string, Name); - if (Tag == dwarf::DW_TAG_enumeration_type || Tag == dwarf::DW_TAG_class_type + if (Tag == dwarf::DW_TAG_enumeration_type || Tag == dwarf::DW_TAG_class_type || Tag == dwarf::DW_TAG_structure_type || Tag == dwarf::DW_TAG_union_type) { // Add size if non-zero (derived types might be zero-sized.) @@ -1149,7 +1150,7 @@ return Enumerator; } -/// getRealLinkageName - If special LLVM prefix that is used to inform the asm +/// getRealLinkageName - If special LLVM prefix that is used to inform the asm /// printer to not emit usual symbol prefix before the symbol name is used then /// return linkage name after skipping this special LLVM prefix. static StringRef getRealLinkageName(StringRef LinkageName) { @@ -1189,7 +1190,7 @@ StringRef Name = DT.getName(); if (!Name.empty()) addString(MemberDie, dwarf::DW_AT_name, dwarf::DW_FORM_string, Name); - + addType(MemberDie, DT.getTypeDerivedFrom()); addSourceLine(MemberDie, &DT); @@ -1240,7 +1241,7 @@ addUInt(VBaseLocationDie, 0, dwarf::DW_FORM_data1, dwarf::DW_OP_deref); addUInt(VBaseLocationDie, 0, dwarf::DW_FORM_data1, dwarf::DW_OP_plus); - addBlock(MemberDie, dwarf::DW_AT_data_member_location, 0, + addBlock(MemberDie, dwarf::DW_AT_data_member_location, 0, VBaseLocationDie); } else addBlock(MemberDie, dwarf::DW_AT_data_member_location, 0, MemLocationDie); @@ -1302,7 +1303,7 @@ addUInt(Block, 0, dwarf::DW_FORM_data1, dwarf::DW_OP_constu); addUInt(Block, 0, dwarf::DW_FORM_data1, SP.getVirtualIndex()); addBlock(SPDie, dwarf::DW_AT_vtable_elem_location, 0, Block); - ContainingTypeMap.insert(std::make_pair(SPDie, + ContainingTypeMap.insert(std::make_pair(SPDie, SP.getContainingType())); } @@ -1331,7 +1332,7 @@ if (!SP.isLocalToUnit()) addUInt(SPDie, dwarf::DW_AT_external, dwarf::DW_FORM_flag, 1); - + if (SP.isOptimized()) addUInt(SPDie, dwarf::DW_AT_APPLE_optimized, dwarf::DW_FORM_flag, 1); @@ -1394,18 +1395,18 @@ assert(SPDie && "Unable to find subprogram DIE!"); DISubprogram SP(SPNode); - + // There is not any need to generate specification DIE for a function // defined at compile unit level. If a function is defined inside another // function then gdb prefers the definition at top level and but does not - // expect specification DIE in parent function. So avoid creating + // expect specification DIE in parent function. So avoid creating // specification DIE for a function defined inside a function. if (SP.isDefinition() && !SP.getContext().isCompileUnit() && - !SP.getContext().isFile() && + !SP.getContext().isFile() && !isSubprogramContext(SP.getContext())) { addUInt(SPDie, dwarf::DW_AT_declaration, dwarf::DW_FORM_flag, 1); - - // Add arguments. + + // Add arguments. DICompositeType SPTy = SP.getType(); DIArray Args = SPTy.getTypeArray(); unsigned SPTag = SPTy.getTag(); @@ -1420,11 +1421,11 @@ } DIE *SPDeclDie = SPDie; SPDie = new DIE(dwarf::DW_TAG_subprogram); - addDIEEntry(SPDie, dwarf::DW_AT_specification, dwarf::DW_FORM_ref4, + addDIEEntry(SPDie, dwarf::DW_AT_specification, dwarf::DW_FORM_ref4, SPDeclDie); SPCU->addDie(SPDie); } - + // Pick up abstract subprogram DIE. if (DIE *AbsSPDIE = AbstractSPDies.lookup(SPNode)) { SPDie = new DIE(dwarf::DW_TAG_subprogram); @@ -1459,7 +1460,7 @@ SmallVector::const_iterator RI = Ranges.begin(); if (Ranges.size() > 1) { // .debug_range section has not been laid out yet. Emit offset in - // .debug_range as a uint, size 4, for now. emitDIE will handle + // .debug_range as a uint, size 4, for now. emitDIE will handle // DW_AT_ranges appropriately. addUInt(ScopeDIE, dwarf::DW_AT_ranges, dwarf::DW_FORM_data4, DebugRangeSymbols.size() * Asm->getTargetData().getPointerSize()); @@ -1480,7 +1481,7 @@ assert(Start->isDefined() && "Invalid starting label for an inlined scope!"); assert(End->isDefined() && "Invalid end label for an inlined scope!"); - + addLabel(ScopeDIE, dwarf::DW_AT_low_pc, dwarf::DW_FORM_addr, Start); addLabel(ScopeDIE, dwarf::DW_AT_high_pc, dwarf::DW_FORM_addr, End); @@ -1493,7 +1494,7 @@ DIE *DwarfDebug::constructInlinedScopeDIE(DbgScope *Scope) { const SmallVector &Ranges = Scope->getRanges(); - assert (Ranges.empty() == false + assert (Ranges.empty() == false && "DbgScope does not have instruction markers!"); // FIXME : .debug_inlined section specification does not clearly state how @@ -1623,15 +1624,15 @@ const MachineInstr *DVInsn = DVI->second; const MCSymbol *DVLabel = findVariableLabel(DV); bool updated = false; - // FIXME : Handle getNumOperands != 3 + // FIXME : Handle getNumOperands != 3 if (DVInsn->getNumOperands() == 3) { if (DVInsn->getOperand(0).isReg()) - updated = + updated = addRegisterAddress(VariableDie, DVLabel, DVInsn->getOperand(0)); else if (DVInsn->getOperand(0).isImm()) updated = addConstantValue(VariableDie, DVLabel, DVInsn->getOperand(0)); - else if (DVInsn->getOperand(0).isFPImm()) - updated = + else if (DVInsn->getOperand(0).isFPImm()) + updated = addConstantFPValue(VariableDie, DVLabel, DVInsn->getOperand(0)); } else { MachineLocation Location = Asm->getDebugValueLocation(DVInsn); @@ -1651,7 +1652,7 @@ } DV->setDIE(VariableDie); return VariableDie; - } + } // .. else use frame index, if available. MachineLocation Location; @@ -1661,7 +1662,7 @@ if (findVariableFrameIndex(DV, &FI)) { int Offset = RI->getFrameIndexReference(*Asm->MF, FI, FrameReg); Location.set(FrameReg, Offset); - + if (VD.hasComplexAddress()) addComplexAddress(DV, VariableDie, dwarf::DW_AT_location, Location); else if (VD.isBlockByrefVariable()) @@ -1677,7 +1678,7 @@ void DwarfDebug::addPubTypes(DISubprogram SP) { DICompositeType SPTy = SP.getType(); unsigned SPTag = SPTy.getTag(); - if (SPTag != dwarf::DW_TAG_subroutine_type) + if (SPTag != dwarf::DW_TAG_subroutine_type) return; DIArray Args = SPTy.getTypeArray(); @@ -1699,7 +1700,7 @@ DIE *DwarfDebug::constructScopeDIE(DbgScope *Scope) { if (!Scope || !Scope->getScopeNode()) return NULL; - + DIScope DS(Scope->getScopeNode()); DIE *ScopeDIE = NULL; if (Scope->getInlinedAt()) @@ -1718,7 +1719,7 @@ else ScopeDIE = constructLexicalScopeDIE(Scope); if (!ScopeDIE) return NULL; - + // Add variables to scope. const SmallVector &Variables = Scope->getVariables(); for (unsigned i = 0, N = Variables.size(); i < N; ++i) { @@ -1736,9 +1737,9 @@ ScopeDIE->addChild(NestedDIE); } - if (DS.isSubprogram()) + if (DS.isSubprogram()) addPubTypes(DISubprogram(DS)); - + return ScopeDIE; } @@ -1794,7 +1795,7 @@ return NDie; } -/// constructCompileUnit - Create new CompileUnit for the given +/// constructCompileUnit - Create new CompileUnit for the given /// metadata node with tag DW_TAG_compile_unit. void DwarfDebug::constructCompileUnit(const MDNode *N) { DICompileUnit DIUnit(N); @@ -1812,7 +1813,7 @@ // simplifies debug range entries. addUInt(Die, dwarf::DW_AT_entry_pc, dwarf::DW_FORM_addr, 0); // DW_AT_stmt_list is a offset of line number information for this - // compile unit in debug_line section. This offset is calculated + // compile unit in debug_line section. This offset is calculated // during endMoudle(). addLabel(Die, dwarf::DW_AT_stmt_list, dwarf::DW_FORM_data4, 0); @@ -1891,7 +1892,7 @@ // Do not create specification DIE if context is either compile unit // or a subprogram. if (DI_GV.isDefinition() && !GVContext.isCompileUnit() && - !GVContext.isFile() && + !GVContext.isFile() && !isSubprogramContext(GVContext)) { // Create specification DIE. DIE *VariableSpecDIE = new DIE(dwarf::DW_TAG_variable); @@ -1912,7 +1913,7 @@ addBlock(VariableDie, dwarf::DW_AT_location, 0, Block); } addToContextOwner(VariableDie, GVContext); - + // Expose as global. FIXME - need to check external flag. TheCU->addGlobal(DI_GV.getName(), VariableDie); @@ -1965,7 +1966,7 @@ DbgFinder.processModule(*M); bool HasDebugInfo = false; - + // Scan all the compile-units to see if there are any marked as the main unit. // if not, we do not generate debug info. for (DebugInfoFinder::iterator I = DbgFinder.compile_unit_begin(), @@ -1975,15 +1976,15 @@ break; } } - + if (!HasDebugInfo) return; // Tell MMI that we have debug info. MMI->setDebugInfoAvailability(true); - + // Emit initial sections. EmitSectionLabels(); - + // Create all the compile unit DIEs. for (DebugInfoFinder::iterator I = DbgFinder.compile_unit_begin(), E = DbgFinder.compile_unit_end(); I != E; ++I) @@ -2036,7 +2037,7 @@ StringRef FName = SP.getLinkageName(); if (FName.empty()) FName = SP.getName(); - NamedMDNode *NMD = + NamedMDNode *NMD = M->getNamedMetadata(Twine("llvm.dbg.lv.", getRealLinkageName(FName))); if (!NMD) continue; unsigned E = NMD->getNumOperands(); @@ -2047,7 +2048,7 @@ if (!DV.Verify()) continue; Scope->addVariable(new DbgVariable(DV)); } - + // Construct subprogram DIE and add variables DIEs. constructSubprogramDIE(SP); DIE *ScopeDIE = getCompileUnit(SP)->getDIE(SP); @@ -2132,7 +2133,7 @@ // Emit info into a debug str section. emitDebugStr(); - + for (DenseMap::iterator I = CUMap.begin(), E = CUMap.end(); I != E; ++I) delete I->second; @@ -2140,7 +2141,7 @@ } /// findAbstractVariable - Find abstract variable, if any, associated with Var. -DbgVariable *DwarfDebug::findAbstractVariable(DIVariable &Var, +DbgVariable *DwarfDebug::findAbstractVariable(DIVariable &Var, DebugLoc ScopeLoc) { DbgVariable *AbsDbgVariable = AbstractVariables.lookup(Var); @@ -2160,7 +2161,7 @@ /// collectVariableInfoFromMMITable - Collect variable information from /// side table maintained by MMI. -void +void DwarfDebug::collectVariableInfoFromMMITable(const MachineFunction * MF, SmallPtrSet &Processed) { const LLVMContext &Ctx = Asm->MF->getFunction()->getContext(); @@ -2178,7 +2179,7 @@ Scope = ConcreteScopes.lookup(IA); if (Scope == 0) Scope = DbgScopeMap.lookup(VP.second.getScope(Ctx)); - + // If variable scope is not found then skip this variable. if (Scope == 0) continue; @@ -2194,7 +2195,7 @@ } } -/// isDbgValueInUndefinedReg - Return true if debug value, encoded by +/// isDbgValueInUndefinedReg - Return true if debug value, encoded by /// DBG_VALUE instruction, is in undefined reg. static bool isDbgValueInUndefinedReg(const MachineInstr *MI) { assert (MI->isDebugValue() && "Invalid DBG_VALUE machine instruction!"); @@ -2203,7 +2204,7 @@ return false; } -/// isDbgValueInDefinedReg - Return true if debug value, encoded by +/// isDbgValueInDefinedReg - Return true if debug value, encoded by /// DBG_VALUE instruction, is in a defined reg. static bool isDbgValueInDefinedReg(const MachineInstr *MI) { assert (MI->isDebugValue() && "Invalid DBG_VALUE machine instruction!"); @@ -2213,10 +2214,10 @@ } /// collectVariableInfo - Populate DbgScope entries with variables' info. -void +void DwarfDebug::collectVariableInfo(const MachineFunction *MF, SmallPtrSet &Processed) { - + /// collection info from MMI table. collectVariableInfoFromMMITable(MF, Processed); @@ -2245,11 +2246,11 @@ continue; const MachineInstr *PrevMI = MInsn; - for (SmallVector::iterator MI = I+1, + for (SmallVector::iterator MI = I+1, ME = DbgValues.end(); MI != ME; ++MI) { - const MDNode *Var = + const MDNode *Var = (*MI)->getOperand((*MI)->getNumOperands()-1).getMetadata(); - if (Var == DV && isDbgValueInDefinedReg(*MI) && + if (Var == DV && isDbgValueInDefinedReg(*MI) && !PrevMI->isIdenticalTo(*MI)) MultipleValues.push_back(*MI); PrevMI = *MI; @@ -2270,7 +2271,7 @@ DbgVariable *RegVar = new DbgVariable(DV); Scope->addVariable(RegVar); if (!CurFnArg) - DbgVariableLabelsMap[RegVar] = getLabelBeforeInsn(MInsn); + DbgVariableLabelsMap[RegVar] = getLabelBeforeInsn(MInsn); if (DbgVariable *AbsVar = findAbstractVariable(DV, MInsn->getDebugLoc())) { DbgVariableToDbgInstMap[AbsVar] = MInsn; VarToAbstractVarMap[RegVar] = AbsVar; @@ -2287,13 +2288,13 @@ RegVar->setDotDebugLocOffset(DotDebugLocEntries.size()); const MachineInstr *Begin = NULL; const MachineInstr *End = NULL; - for (SmallVector::iterator - MVI = MultipleValues.begin(), MVE = MultipleValues.end(); + for (SmallVector::iterator + MVI = MultipleValues.begin(), MVE = MultipleValues.end(); MVI != MVE; ++MVI) { if (!Begin) { Begin = *MVI; continue; - } + } End = *MVI; MachineLocation MLoc; MLoc.set(Begin->getOperand(0).getReg(), 0); @@ -2315,8 +2316,8 @@ // Collect info for variables that were optimized out. const Function *F = MF->getFunction(); const Module *M = F->getParent(); - if (NamedMDNode *NMD = - M->getNamedMetadata(Twine("llvm.dbg.lv.", + if (NamedMDNode *NMD = + M->getNamedMetadata(Twine("llvm.dbg.lv.", getRealLinkageName(F->getName())))) { for (unsigned i = 0, e = NMD->getNumOperands(); i != e; ++i) { DIVariable DV(cast(NMD->getOperand(i))); @@ -2365,7 +2366,7 @@ return; } - // If location is unknown then use temp label for this DBG_VALUE + // If location is unknown then use temp label for this DBG_VALUE // instruction. if (MI->isDebugValue()) { PrevLabel = MMI->getContext().CreateTempSymbol(); @@ -2394,7 +2395,7 @@ } /// getOrCreateDbgScope - Create DbgScope for the scope. -DbgScope *DwarfDebug::getOrCreateDbgScope(const MDNode *Scope, +DbgScope *DwarfDebug::getOrCreateDbgScope(const MDNode *Scope, const MDNode *InlinedAt) { if (!InlinedAt) { DbgScope *WScope = DbgScopeMap.lookup(Scope); @@ -2403,7 +2404,7 @@ WScope = new DbgScope(NULL, DIDescriptor(Scope), NULL); DbgScopeMap.insert(std::make_pair(Scope, WScope)); if (DIDescriptor(Scope).isLexicalBlock()) { - DbgScope *Parent = + DbgScope *Parent = getOrCreateDbgScope(DILexicalBlock(Scope).getContext(), NULL); WScope->setParent(Parent); Parent->addScope(WScope); @@ -2420,7 +2421,7 @@ DISubprogram(Scope).getFunction() == Asm->MF->getFunction()) CurrentFnDbgScope = WScope; } - + return WScope; } @@ -2449,14 +2450,14 @@ const MDNode *&Scope, const MDNode *&InlinedAt) { DebugLoc DL = MInsn->getDebugLoc(); if (DL.isUnknown()) return false; - + const MDNode *S = DL.getScope(Ctx); - + // There is no need to create another DIE for compile unit. For all // other scopes, create one DbgScope now. This will be translated // into a scope DIE at the end. if (DIScope(S).isCompileUnit()) return false; - + Scope = S; InlinedAt = DL.getInlinedAt(Ctx); return true; @@ -2491,7 +2492,7 @@ } /// printDbgScopeInfo - Print DbgScope info for each machine instruction. -static +static void printDbgScopeInfo(LLVMContext &Ctx, const MachineFunction *MF, DenseMap &MI2ScopeMap) { @@ -2508,9 +2509,9 @@ // Check if instruction has valid location information. if (hasValidLocation(Ctx, MInsn, Scope, InlinedAt)) { dbgs() << " [ "; - if (InlinedAt) + if (InlinedAt) dbgs() << "*"; - DenseMap::iterator DI = + DenseMap::iterator DI = MI2ScopeMap.find(MInsn); if (DI != MI2ScopeMap.end()) { DbgScope *S = DI->second; @@ -2518,7 +2519,7 @@ PrevDFSIn = S->getDFSIn(); } else dbgs() << PrevDFSIn; - } else + } else dbgs() << " [ x" << PrevDFSIn; dbgs() << " ]"; MInsn->dump(); @@ -2556,26 +2557,26 @@ PrevMI = MInsn; continue; } - + // If scope has not changed then skip this instruction. if (Scope == PrevScope && PrevInlinedAt == InlinedAt) { PrevMI = MInsn; continue; } - if (RangeBeginMI) { - // If we have alread seen a beginning of a instruction range and + if (RangeBeginMI) { + // If we have alread seen a beginning of a instruction range and // current instruction scope does not match scope of first instruction // in this range then create a new instruction range. DbgRange R(RangeBeginMI, PrevMI); - MI2ScopeMap[RangeBeginMI] = getOrCreateDbgScope(PrevScope, + MI2ScopeMap[RangeBeginMI] = getOrCreateDbgScope(PrevScope, PrevInlinedAt); MIRanges.push_back(R); - } + } // This is a beginning of a new instruction range. RangeBeginMI = MInsn; - + // Reset previous markers. PrevMI = MInsn; PrevScope = Scope; @@ -2589,7 +2590,7 @@ MIRanges.push_back(R); MI2ScopeMap[RangeBeginMI] = getOrCreateDbgScope(PrevScope, PrevInlinedAt); } - + if (!CurrentFnDbgScope) return false; @@ -2619,7 +2620,7 @@ return !DbgScopeMap.empty(); } -/// identifyScopeMarkers() - +/// identifyScopeMarkers() - /// Each DbgScope has first instruction and last instruction to mark beginning /// and end of a scope respectively. Create an inverse map that list scopes /// starts (and ends) with an instruction. One instruction may start (or end) @@ -2629,23 +2630,23 @@ WorkList.push_back(CurrentFnDbgScope); while (!WorkList.empty()) { DbgScope *S = WorkList.pop_back_val(); - + const SmallVector &Children = S->getScopes(); - if (!Children.empty()) + if (!Children.empty()) for (SmallVector::const_iterator SI = Children.begin(), SE = Children.end(); SI != SE; ++SI) WorkList.push_back(*SI); if (S->isAbstractScope()) continue; - + const SmallVector &Ranges = S->getRanges(); if (Ranges.empty()) continue; for (SmallVector::const_iterator RI = Ranges.begin(), RE = Ranges.end(); RI != RE; ++RI) { - assert(RI->first && "DbgRange does not have first instruction!"); - assert(RI->second && "DbgRange does not have second instruction!"); + assert(RI->first && "DbgRange does not have first instruction!"); + assert(RI->second && "DbgRange does not have second instruction!"); InsnsEndScopeSet.insert(RI->second); } } @@ -2681,10 +2682,10 @@ // function. DebugLoc FDL = FindFirstDebugLoc(MF); if (FDL.isUnknown()) return; - + const MDNode *Scope = FDL.getScope(MF->getFunction()->getContext()); const MDNode *TheScope = 0; - + DISubprogram SP = getDISubprogram(Scope); unsigned Line, Col; if (SP.Verify()) { @@ -2696,7 +2697,7 @@ Col = FDL.getCol(); TheScope = Scope; } - + recordSourceLine(Line, Col, TheScope); /// ProcessedArgs - Collection of arguments already processed. @@ -2714,7 +2715,7 @@ DIVariable DV(MI->getOperand(MI->getNumOperands() - 1).getMetadata()); if (!DV.Verify()) continue; // If DBG_VALUE is for a local variable then it needs a label. - if (DV.getTag() != dwarf::DW_TAG_arg_variable + if (DV.getTag() != dwarf::DW_TAG_arg_variable && isDbgValueInUndefinedReg(MI) == false) InsnNeedsLabel.insert(MI); // DBG_VALUE for inlined functions argument needs a label. @@ -2722,10 +2723,11 @@ describes(MF->getFunction())) InsnNeedsLabel.insert(MI); // DBG_VALUE indicating argument location change needs a label. - else if (isDbgValueInUndefinedReg(MI) == false && !ProcessedArgs.insert(DV)) + else if (isDbgValueInUndefinedReg(MI) == false + && !ProcessedArgs.insert(DV)) InsnNeedsLabel.insert(MI); } else { - // If location is unknown then instruction needs a location only if + // If location is unknown then instruction needs a location only if // UnknownLocations flag is set. if (DL.isUnknown()) { if (UnknownLocations && !PrevLoc.isUnknown()) @@ -2734,7 +2736,7 @@ // Otherwise, instruction needs a location only if it is new location. InsnNeedsLabel.insert(MI); } - + if (!DL.isUnknown() || UnknownLocations) PrevLoc = DL; } @@ -2754,7 +2756,7 @@ Asm->getFunctionNumber()); // Assumes in correct section after the entry point. Asm->OutStreamer.EmitLabel(FunctionEndSym); - + SmallPtrSet ProcessedVars; collectVariableInfo(MF, ProcessedVars); @@ -2768,7 +2770,7 @@ SectionLineInfos.insert(SectionLineInfos.end(), Lines.begin(), Lines.end()); } - + // Construct abstract scopes. for (SmallVector::iterator AI = AbstractScopesList.begin(), AE = AbstractScopesList.end(); AI != AE; ++AI) { @@ -2779,8 +2781,8 @@ if (FName.empty()) FName = SP.getName(); const Module *M = MF->getFunction()->getParent(); - if (NamedMDNode *NMD = - M->getNamedMetadata(Twine("llvm.dbg.lv.", + if (NamedMDNode *NMD = + M->getNamedMetadata(Twine("llvm.dbg.lv.", getRealLinkageName(FName)))) { for (unsigned i = 0, e = NMD->getNumOperands(); i != e; ++i) { DIVariable DV(cast(NMD->getOperand(i))); @@ -2797,9 +2799,9 @@ } DIE *CurFnDIE = constructScopeDIE(CurrentFnDbgScope); - + if (!DisableFramePointerElim(*MF)) - addUInt(CurFnDIE, dwarf::DW_AT_APPLE_omit_frame_ptr, + addUInt(CurFnDIE, dwarf::DW_AT_APPLE_omit_frame_ptr, dwarf::DW_FORM_flag, 1); @@ -2853,22 +2855,22 @@ else return I->second; } -/// findDbgScope - Find DbgScope for the debug loc attached with an +/// findDbgScope - Find DbgScope for the debug loc attached with an /// instruction. DbgScope *DwarfDebug::findDbgScope(const MachineInstr *MInsn) { DbgScope *Scope = NULL; - LLVMContext &Ctx = + LLVMContext &Ctx = MInsn->getParent()->getParent()->getFunction()->getContext(); DebugLoc DL = MInsn->getDebugLoc(); - if (DL.isUnknown()) + if (DL.isUnknown()) return Scope; if (const MDNode *IA = DL.getInlinedAt(Ctx)) Scope = ConcreteScopes.lookup(IA); if (Scope == 0) Scope = DbgScopeMap.lookup(DL.getScope(Ctx)); - + return Scope; } @@ -2876,7 +2878,7 @@ /// recordSourceLine - Register a source line with debug info. Returns the /// unique label that was emitted and which provides correspondence to /// the source line list. -MCSymbol *DwarfDebug::recordSourceLine(unsigned Line, unsigned Col, +MCSymbol *DwarfDebug::recordSourceLine(unsigned Line, unsigned Col, const MDNode *S) { StringRef Dir; StringRef Fn; @@ -2985,7 +2987,7 @@ const char *SymbolStem = 0) { Asm->OutStreamer.SwitchSection(Section); if (!SymbolStem) return 0; - + MCSymbol *TmpSym = Asm->GetTempSymbol(SymbolStem); Asm->OutStreamer.EmitLabel(TmpSym); return TmpSym; @@ -3002,21 +3004,21 @@ EmitSectionSym(Asm, TLOF.getDwarfFrameSection(), "section_debug_frame"); } - DwarfInfoSectionSym = + DwarfInfoSectionSym = EmitSectionSym(Asm, TLOF.getDwarfInfoSection(), "section_info"); - DwarfAbbrevSectionSym = + DwarfAbbrevSectionSym = EmitSectionSym(Asm, TLOF.getDwarfAbbrevSection(), "section_abbrev"); EmitSectionSym(Asm, TLOF.getDwarfARangesSection()); - + if (const MCSection *MacroInfo = TLOF.getDwarfMacroInfoSection()) EmitSectionSym(Asm, MacroInfo); - DwarfDebugLineSectionSym = + DwarfDebugLineSectionSym = EmitSectionSym(Asm, TLOF.getDwarfLineSection(), "section_line"); EmitSectionSym(Asm, TLOF.getDwarfLocSection()); EmitSectionSym(Asm, TLOF.getDwarfPubNamesSection()); EmitSectionSym(Asm, TLOF.getDwarfPubTypesSection()); - DwarfStrSectionSym = + DwarfStrSectionSym = EmitSectionSym(Asm, TLOF.getDwarfStrSection(), "section_str"); DwarfDebugRangeSectionSym = EmitSectionSym(Asm, TLOF.getDwarfRangesSection(), "debug_range"); @@ -3054,7 +3056,7 @@ if (Asm->isVerbose()) Asm->OutStreamer.AddComment(dwarf::AttributeString(Attr)); - + switch (Attr) { case dwarf::DW_AT_sibling: Asm->EmitInt32(Die->getSiblingOffset()); @@ -3076,7 +3078,7 @@ break; } case dwarf::DW_AT_stmt_list: { - Asm->EmitLabelDifference(CurrentLineSectionSym, + Asm->EmitLabelDifference(CurrentLineSectionSym, DwarfDebugLineSectionSym, 4); break; } @@ -3118,18 +3120,18 @@ E = CUMap.end(); I != E; ++I) { CompileUnit *TheCU = I->second; DIE *Die = TheCU->getCUDie(); - + // Emit the compile units header. Asm->OutStreamer.EmitLabel(Asm->GetTempSymbol("info_begin", TheCU->getID())); - + // Emit size of content not including length itself unsigned ContentSize = Die->getSize() + sizeof(int16_t) + // DWARF version number sizeof(int32_t) + // Offset Into Abbrev. Section sizeof(int8_t) + // Pointer Size (in bytes) sizeof(int32_t); // FIXME - extra pad for gdb bug. - + Asm->OutStreamer.AddComment("Length of Compilation Unit Info"); Asm->EmitInt32(ContentSize); Asm->OutStreamer.AddComment("DWARF version number"); @@ -3139,7 +3141,7 @@ DwarfAbbrevSectionSym); Asm->OutStreamer.AddComment("Address Size (in bytes)"); Asm->EmitInt8(Asm->getTargetData().getPointerSize()); - + emitDIE(Die); // FIXME - extra padding for gdb bug. Asm->OutStreamer.AddComment("4 extra padding bytes for GDB"); @@ -3188,7 +3190,7 @@ // Define last address of section. Asm->OutStreamer.AddComment("Extended Op"); Asm->EmitInt8(0); - + Asm->OutStreamer.AddComment("Op size"); Asm->EmitInt8(Asm->getTargetData().getPointerSize() + 1); Asm->OutStreamer.AddComment("DW_LNE_set_address"); @@ -3233,7 +3235,7 @@ Asm->OutStreamer.EmitLabel(Asm->GetTempSymbol("line_begin")); Asm->OutStreamer.AddComment("DWARF version number"); - Asm->EmitInt16(dwarf::DWARF_VERSION); + Asm->EmitInt16(dwarf::DWARF_VERSION); Asm->OutStreamer.AddComment("Prolog Length"); Asm->EmitLabelDifference(Asm->GetTempSymbol("line_prolog_end"), @@ -3288,7 +3290,7 @@ const std::string &FN = getSourceFileName(Id.second); if (Asm->isVerbose()) Asm->OutStreamer.AddComment("Source"); Asm->OutStreamer.EmitBytes(StringRef(FN.c_str(), FN.size()+1), 0); - + Asm->EmitULEB128(Id.first, "Directory #"); Asm->EmitULEB128(0, "Mod date"); Asm->EmitULEB128(0, "File size"); @@ -3332,18 +3334,18 @@ Asm->EmitInt8(Asm->getTargetData().getPointerSize() + 1); Asm->OutStreamer.AddComment("DW_LNE_set_address"); - Asm->EmitInt8(dwarf::DW_LNE_set_address); + Asm->EmitInt8(dwarf::DW_LNE_set_address); Asm->OutStreamer.AddComment("Location label"); Asm->OutStreamer.EmitSymbolValue(Label, Asm->getTargetData().getPointerSize(), 0/*AddrSpace*/); - + // If change of source, then switch to the new source. if (Source != LineInfo.getSourceID()) { Source = LineInfo.getSourceID(); Asm->OutStreamer.AddComment("DW_LNS_set_file"); - Asm->EmitInt8(dwarf::DW_LNS_set_file); + Asm->EmitInt8(dwarf::DW_LNS_set_file); Asm->EmitULEB128(Source, "New Source"); } @@ -3451,7 +3453,7 @@ Asm->OutStreamer.EmitLabel(DebugFrameBegin); Asm->OutStreamer.AddComment("FDE CIE offset"); - Asm->EmitSectionOffset(Asm->GetTempSymbol("debug_frame_common"), + Asm->EmitSectionOffset(Asm->GetTempSymbol("debug_frame_common"), DwarfFrameSectionSym); Asm->OutStreamer.AddComment("FDE initial location"); @@ -3460,8 +3462,8 @@ Asm->OutStreamer.EmitSymbolValue(FuncBeginSym, Asm->getTargetData().getPointerSize(), 0/*AddrSpace*/); - - + + Asm->OutStreamer.AddComment("FDE address range"); Asm->EmitLabelDifference(Asm->GetTempSymbol("func_end",DebugFrameInfo.Number), FuncBeginSym, Asm->getTargetData().getPointerSize()); @@ -3481,41 +3483,41 @@ // Start the dwarf pubnames section. Asm->OutStreamer.SwitchSection( Asm->getObjFileLowering().getDwarfPubNamesSection()); - + Asm->OutStreamer.AddComment("Length of Public Names Info"); Asm->EmitLabelDifference( Asm->GetTempSymbol("pubnames_end", TheCU->getID()), Asm->GetTempSymbol("pubnames_begin", TheCU->getID()), 4); - + Asm->OutStreamer.EmitLabel(Asm->GetTempSymbol("pubnames_begin", TheCU->getID())); - + Asm->OutStreamer.AddComment("DWARF Version"); - Asm->EmitInt16(dwarf::DWARF_VERSION); - + Asm->EmitInt16(dwarf::DWARF_VERSION); + Asm->OutStreamer.AddComment("Offset of Compilation Unit Info"); - Asm->EmitSectionOffset(Asm->GetTempSymbol("info_begin", TheCU->getID()), + Asm->EmitSectionOffset(Asm->GetTempSymbol("info_begin", TheCU->getID()), DwarfInfoSectionSym); - + Asm->OutStreamer.AddComment("Compilation Unit Length"); Asm->EmitLabelDifference(Asm->GetTempSymbol("info_end", TheCU->getID()), Asm->GetTempSymbol("info_begin", TheCU->getID()), 4); - + const StringMap &Globals = TheCU->getGlobals(); for (StringMap::const_iterator GI = Globals.begin(), GE = Globals.end(); GI != GE; ++GI) { const char *Name = GI->getKeyData(); DIE *Entity = GI->second; - + Asm->OutStreamer.AddComment("DIE offset"); Asm->EmitInt32(Entity->getOffset()); - + if (Asm->isVerbose()) Asm->OutStreamer.AddComment("External Name"); Asm->OutStreamer.EmitBytes(StringRef(Name, strlen(Name)+1), 0); } - + Asm->OutStreamer.AddComment("End Mark"); Asm->EmitInt32(0); Asm->OutStreamer.EmitLabel(Asm->GetTempSymbol("pubnames_end", @@ -3534,37 +3536,37 @@ Asm->EmitLabelDifference( Asm->GetTempSymbol("pubtypes_end", TheCU->getID()), Asm->GetTempSymbol("pubtypes_begin", TheCU->getID()), 4); - + Asm->OutStreamer.EmitLabel(Asm->GetTempSymbol("pubtypes_begin", TheCU->getID())); - + if (Asm->isVerbose()) Asm->OutStreamer.AddComment("DWARF Version"); Asm->EmitInt16(dwarf::DWARF_VERSION); - + Asm->OutStreamer.AddComment("Offset of Compilation Unit Info"); Asm->EmitSectionOffset(Asm->GetTempSymbol("info_begin", TheCU->getID()), DwarfInfoSectionSym); - + Asm->OutStreamer.AddComment("Compilation Unit Length"); Asm->EmitLabelDifference(Asm->GetTempSymbol("info_end", TheCU->getID()), Asm->GetTempSymbol("info_begin", TheCU->getID()), 4); - + const StringMap &Globals = TheCU->getGlobalTypes(); for (StringMap::const_iterator GI = Globals.begin(), GE = Globals.end(); GI != GE; ++GI) { const char *Name = GI->getKeyData(); DIE * Entity = GI->second; - + if (Asm->isVerbose()) Asm->OutStreamer.AddComment("DIE offset"); Asm->EmitInt32(Entity->getOffset()); - + if (Asm->isVerbose()) Asm->OutStreamer.AddComment("External Name"); Asm->OutStreamer.EmitBytes(StringRef(Name, GI->getKeyLength()+1), 0); } - + Asm->OutStreamer.AddComment("End Mark"); - Asm->EmitInt32(0); + Asm->EmitInt32(0); Asm->OutStreamer.EmitLabel(Asm->GetTempSymbol("pubtypes_end", TheCU->getID())); } @@ -3575,26 +3577,26 @@ void DwarfDebug::emitDebugStr() { // Check to see if it is worth the effort. if (StringPool.empty()) return; - + // Start the dwarf str section. Asm->OutStreamer.SwitchSection( Asm->getObjFileLowering().getDwarfStrSection()); // Get all of the string pool entries and put them in an array by their ID so // we can sort them. - SmallVector >*>, 64> Entries; - + for (StringMap >::iterator I = StringPool.begin(), E = StringPool.end(); I != E; ++I) Entries.push_back(std::make_pair(I->second.second, &*I)); - + array_pod_sort(Entries.begin(), Entries.end()); - + for (unsigned i = 0, e = Entries.size(); i != e; ++i) { // Emit a label for reference from debug information entries. Asm->OutStreamer.EmitLabel(Entries[i].second->getValue().first); - + // Emit the string itself. Asm->OutStreamer.EmitBytes(Entries[i].second->getKey(), 0/*addrspace*/); } @@ -3612,8 +3614,8 @@ unsigned char Size = Asm->getTargetData().getPointerSize(); Asm->OutStreamer.EmitLabel(Asm->GetTempSymbol("debug_loc", 0)); unsigned index = 1; - for (SmallVector::iterator - I = DotDebugLocEntries.begin(), E = DotDebugLocEntries.end(); + for (SmallVector::iterator + I = DotDebugLocEntries.begin(), E = DotDebugLocEntries.end(); I != E; ++I, ++index) { DotDebugLocEntry Entry = *I; if (Entry.isEmpty()) { @@ -3655,7 +3657,7 @@ Asm->getObjFileLowering().getDwarfRangesSection()); unsigned char Size = Asm->getTargetData().getPointerSize(); for (SmallVector::iterator - I = DebugRangeSymbols.begin(), E = DebugRangeSymbols.end(); + I = DebugRangeSymbols.begin(), E = DebugRangeSymbols.end(); I != E; ++I) { if (*I) Asm->OutStreamer.EmitSymbolValue(const_cast(*I), Size, 0); @@ -3728,7 +3730,7 @@ if (LName.empty()) { Asm->OutStreamer.EmitBytes(Name, 0); Asm->OutStreamer.EmitIntValue(0, 1, 0); // nul terminator. - } else + } else Asm->EmitSectionOffset(getStringPoolEntry(getRealLinkageName(LName)), DwarfStrSectionSym); From natebegeman at mac.com Wed Jul 21 16:23:16 2010 From: natebegeman at mac.com (Nate Begeman) Date: Wed, 21 Jul 2010 14:23:16 -0700 Subject: [llvm-commits] [llvm] r109035 - in /llvm/trunk/lib/Target/X86: X86ISelLowering.cpp X86InstrInfo.cpp In-Reply-To: References: <20100721204953.583492A6C12C@llvm.org> <1872DAE9-6CEE-493A-B214-18F997DDD1C1@mac.com> Message-ID: On Jul 21, 2010, at 2:16 PM, Anton Korobeynikov wrote: >>>> xmm6-15 are marked as clobbered by call instructions on win64 even though they aren't. >>> They in fact are. Consider reading e.g. >>> http://msdn.microsoft.com/en-us/library/9z1stfyw.aspx >> >> Your link says they're callee-save, not call-clobbered. > Hrm. Sorry, I should drink more coffee. Where they are marked as call-clobbered? > >> How so? The previous code is obviously incorrect, and leads to code like the following being generated on win64 today; >> movaps rsi, (stack) > Right. It was broken in r105344. In any case - your change is > incorrect :) The problem just moves to prologue / epilogue expansion > code. Can you explain a bit about how prolog/epilog expansion is broken? Sorry, I'm not 100% following this yet. > You can find the full description of the problem at > http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20090824/085827.html > Unfortunately, I didnt't find the time since that time to make a generic fix.... I assume this is referencing: http://msdn.microsoft.com/en-us/library/ew5tede7.aspx If I recall correctly, PowerPC has an extremely similar issue with where LR/CR are stored. I'll revert that part of the patch and work on a "more correct" one, but it seems strange that win64 wouldn't save callee-save regs in this routine, and instead choose to save them some other way. Nate From grosbach at apple.com Wed Jul 21 16:36:26 2010 From: grosbach at apple.com (Jim Grosbach) Date: Wed, 21 Jul 2010 21:36:26 -0000 Subject: [llvm-commits] [llvm] r109038 - /llvm/trunk/lib/Analysis/DebugInfo.cpp Message-ID: <20100721213626.2869A2A6C12C@llvm.org> Author: grosbach Date: Wed Jul 21 16:36:25 2010 New Revision: 109038 URL: http://llvm.org/viewvc/llvm-project?rev=109038&view=rev Log: tidy up. Modified: llvm/trunk/lib/Analysis/DebugInfo.cpp Modified: llvm/trunk/lib/Analysis/DebugInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/DebugInfo.cpp?rev=109038&r1=109037&r2=109038&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/DebugInfo.cpp (original) +++ llvm/trunk/lib/Analysis/DebugInfo.cpp Wed Jul 21 16:36:25 2010 @@ -32,7 +32,7 @@ // DIDescriptor //===----------------------------------------------------------------------===// -StringRef +StringRef DIDescriptor::getStringField(unsigned Elt) const { if (DbgNode == 0) return StringRef(); @@ -60,7 +60,8 @@ return DIDescriptor(); if (Elt < DbgNode->getNumOperands()) - return DIDescriptor(dyn_cast_or_null(DbgNode->getOperand(Elt))); + return + DIDescriptor(dyn_cast_or_null(DbgNode->getOperand(Elt))); return DIDescriptor(); } @@ -353,7 +354,7 @@ bool DILocation::Verify() const { if (!DbgNode) return false; - + return DbgNode->getNumOperands() == 4; } @@ -376,7 +377,7 @@ Tag == dwarf::DW_TAG_const_type || Tag == dwarf::DW_TAG_volatile_type || Tag == dwarf::DW_TAG_restrict_type) { DIType BaseType = getTypeDerivedFrom(); - // If this type is not derived from any type then take conservative + // If this type is not derived from any type then take conservative // approach. if (!BaseType.isValid()) return getSizeInBits(); @@ -385,17 +386,17 @@ else return BaseType.getSizeInBits(); } - + return getSizeInBits(); } -/// isInlinedFnArgument - Return trule if this variable provides debugging +/// isInlinedFnArgument - Return true if this variable provides debugging /// information for an inlined function arguments. bool DIVariable::isInlinedFnArgument(const Function *CurFn) { assert(CurFn && "Invalid function"); if (!getContext().isSubprogram()) return false; - // This variable is not inlined function argument if its scope + // This variable is not inlined function argument if its scope // does not describe current function. return !(DISubprogram(getContext()).describes(CurFn)); } @@ -414,7 +415,7 @@ return false; } -unsigned DISubprogram::isOptimized() const { +unsigned DISubprogram::isOptimized() const { assert (DbgNode && "Invalid subprogram descriptor!"); if (DbgNode->getNumOperands() == 16) return getUnsignedField(15); @@ -424,7 +425,7 @@ StringRef DIScope::getFilename() const { if (!DbgNode) return StringRef(); - if (isLexicalBlock()) + if (isLexicalBlock()) return DILexicalBlock(DbgNode).getFilename(); if (isSubprogram()) return DISubprogram(DbgNode).getFilename(); @@ -443,7 +444,7 @@ StringRef DIScope::getDirectory() const { if (!DbgNode) return StringRef(); - if (isLexicalBlock()) + if (isLexicalBlock()) return DILexicalBlock(DbgNode).getDirectory(); if (isSubprogram()) return DISubprogram(DbgNode).getDirectory(); @@ -978,8 +979,8 @@ } /// CreateSubprogramDefinition - Create new subprogram descriptor for the -/// given declaration. -DISubprogram DIFactory::CreateSubprogramDefinition(DISubprogram &SPDeclaration) { +/// given declaration. +DISubprogram DIFactory::CreateSubprogramDefinition(DISubprogram &SPDeclaration){ if (SPDeclaration.isDefinition()) return DISubprogram(SPDeclaration); @@ -1087,7 +1088,7 @@ const std::string &Name, DIFile F, unsigned LineNo, - DIType Ty, + DIType Ty, SmallVector &addr) { SmallVector Elts; Elts.push_back(GetTagConstant(Tag)); @@ -1177,7 +1178,7 @@ // If this block already has a terminator then insert this intrinsic // before the terminator. - if (TerminatorInst *T = InsertAtEnd->getTerminator()) + if (TerminatorInst *T = InsertAtEnd->getTerminator()) return CallInst::Create(DeclareFn, Args, Args+2, "", T); else return CallInst::Create(DeclareFn, Args, Args+2, "", InsertAtEnd);} @@ -1206,7 +1207,7 @@ if (!ValueFn) ValueFn = Intrinsic::getDeclaration(&M, Intrinsic::dbg_value); - Value *Args[] = { MDNode::get(V->getContext(), &V, 1), + Value *Args[] = { MDNode::get(V->getContext(), &V, 1), ConstantInt::get(Type::getInt64Ty(V->getContext()), Offset), D }; return CallInst::Create(ValueFn, Args, Args+3, "", InsertAtEnd); @@ -1224,21 +1225,21 @@ ++BI) { if (DbgDeclareInst *DDI = dyn_cast(BI)) processDeclare(DDI); - + DebugLoc Loc = BI->getDebugLoc(); if (Loc.isUnknown()) continue; - + LLVMContext &Ctx = BI->getContext(); DIDescriptor Scope(Loc.getScope(Ctx)); - + if (Scope.isCompileUnit()) addCompileUnit(DICompileUnit(Scope)); else if (Scope.isSubprogram()) processSubprogram(DISubprogram(Scope)); else if (Scope.isLexicalBlock()) processLexicalBlock(DILexicalBlock(Scope)); - + if (MDNode *IA = Loc.getInlinedAt(Ctx)) processLocation(DILocation(IA)); } @@ -1396,16 +1397,16 @@ /// It looks through pointer casts too. static const DbgDeclareInst *findDbgDeclare(const Value *V) { V = V->stripPointerCasts(); - + if (!isa(V) && !isa(V)) return 0; - + const Function *F = NULL; if (const Instruction *I = dyn_cast(V)) F = I->getParent()->getParent(); else if (const Argument *A = dyn_cast(V)) F = A->getParent(); - + for (Function::const_iterator FI = F->begin(), FE = F->end(); FI != FE; ++FI) for (BasicBlock::const_iterator BI = (*FI).begin(), BE = (*FI).end(); BI != BE; ++BI) @@ -1463,10 +1464,10 @@ DIDescriptor D(Scope); if (D.isSubprogram()) return DISubprogram(Scope); - + if (D.isLexicalBlock()) return getDISubprogram(DILexicalBlock(Scope).getContext()); - + return DISubprogram(); } @@ -1474,9 +1475,9 @@ DICompositeType llvm::getDICompositeType(DIType T) { if (T.isCompositeType()) return DICompositeType(T); - + if (T.isDerivedType()) return getDICompositeType(DIDerivedType(T).getTypeDerivedFrom()); - + return DICompositeType(); } From anton at korobeynikov.info Wed Jul 21 16:37:48 2010 From: anton at korobeynikov.info (Anton Korobeynikov) Date: Thu, 22 Jul 2010 01:37:48 +0400 Subject: [llvm-commits] [llvm] r109035 - in /llvm/trunk/lib/Target/X86: X86ISelLowering.cpp X86InstrInfo.cpp In-Reply-To: References: <20100721204953.583492A6C12C@llvm.org> <1872DAE9-6CEE-493A-B214-18F997DDD1C1@mac.com> Message-ID: Hello, Nate > Can you explain a bit about how prolog/epilog expansion is broken? ?Sorry, I'm not 100% following this yet. If you'll look inside prologue / epilogue expansion code, you'll find that it finds the place to insert stack frame allocation / deallocation stuff just via scanning the first / last MBB and looking for push'es / pop's skipping them. It's ok since currently push / pop is inserted inserted only by this callee-saved save / restore code. Now problem: in order to save / restore high xmm registers one must use movaps. And this case is not handled by prologue / epilogue expansion code. The problem is that we cannot handle it the same way as push / pop: this instruction can normally be generated by the codegen. I saw the testcases, when movaps was used for vector reg reload from the spill slot just in the end of MBB. The situation was even worse with post-RA scheduler, since it can move this movaps quite far. Thus: 1. If we'll skip movaps blindly, we'll insert stack frame allocation / deallocation in wrong place 2. If we won't skip movaps, we'll insert stack frame allocation / deallocation in wrong place The only quick workaround found was to use {load,store}RegFromStackSlot for all callee-saved regs, since it uses absolute offsets and is not influenced by this erratic behavior. > If I recall correctly, PowerPC has an extremely similar issue with where LR/CR are stored. ?I'll revert that part of the patch and work on a "more correct" one, but it seems strange that win64 wouldn't save callee-save regs in this routine, and instead choose to save them some other way. It will. But since high xmm regs need to be saved, they (high xmm regs) will be saved / restored into a wrong place => not preserved across the call. -- With best regards, Anton Korobeynikov Faculty of Mathematics and Mechanics, Saint Petersburg State University From bruno.cardoso at gmail.com Wed Jul 21 16:37:59 2010 From: bruno.cardoso at gmail.com (Bruno Cardoso Lopes) Date: Wed, 21 Jul 2010 21:37:59 -0000 Subject: [llvm-commits] [llvm] r109039 - in /llvm/trunk: lib/Target/X86/X86InstrSSE.td test/MC/AsmParser/X86/x86_32-encoding.s test/MC/AsmParser/X86/x86_64-encoding.s Message-ID: <20100721213759.D4B412A6C12C@llvm.org> Author: bruno Date: Wed Jul 21 16:37:59 2010 New Revision: 109039 URL: http://llvm.org/viewvc/llvm-project?rev=109039&view=rev Log: Add missing AVX convert instructions. Those instructions are not described in their SSE forms (although they exist), but add the AVX forms anyway, so the assembler can benefit from it Modified: llvm/trunk/lib/Target/X86/X86InstrSSE.td llvm/trunk/test/MC/AsmParser/X86/x86_32-encoding.s llvm/trunk/test/MC/AsmParser/X86/x86_64-encoding.s Modified: llvm/trunk/lib/Target/X86/X86InstrSSE.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrSSE.td?rev=109039&r1=109038&r2=109039&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86InstrSSE.td (original) +++ llvm/trunk/lib/Target/X86/X86InstrSSE.td Wed Jul 21 16:37:59 2010 @@ -516,6 +516,14 @@ [(set DstRC:$dst, (OpNode (ld_frag addr:$src)))]>; } +multiclass sse12_cvt_s_np opc, RegisterClass SrcRC, RegisterClass DstRC, + X86MemOperand x86memop, string asm> { + def rr : SI; + def rm : SI; +} + multiclass sse12_cvt_p opc, RegisterClass SrcRC, RegisterClass DstRC, SDNode OpNode, X86MemOperand x86memop, PatFrag ld_frag, string asm, Domain d> { @@ -526,25 +534,40 @@ } multiclass sse12_vcvt_avx opc, RegisterClass SrcRC, RegisterClass DstRC, - SDNode OpNode, X86MemOperand x86memop, PatFrag ld_frag, - string asm> { + X86MemOperand x86memop, string asm> { def rr : SI; + !strconcat(asm,"\t{$src, $src1, $dst|$dst, $src1, $src}"), []>; def rm : SI; + (ins DstRC:$src1, x86memop:$src), + !strconcat(asm,"\t{$src, $src1, $dst|$dst, $src1, $src}"), []>; } let isAsmParserOnly = 1 in { -defm VCVTTSS2SI : sse12_cvt_s<0x2C, FR32, GR32, fp_to_sint, f32mem, loadf32, - "cvttss2si\t{$src, $dst|$dst, $src}">, XS, VEX; -defm VCVTTSD2SI : sse12_cvt_s<0x2C, FR64, GR32, fp_to_sint, f64mem, loadf64, - "cvttsd2si\t{$src, $dst|$dst, $src}">, XD, VEX; -defm VCVTSI2SS : sse12_vcvt_avx<0x2A, GR32, FR32, sint_to_fp, i32mem, loadi32, - "cvtsi2ss\t{$src, $src1, $dst|$dst, $src1, $src}">, XS, - VEX_4V; -defm VCVTSI2SD : sse12_vcvt_avx<0x2A, GR32, FR64, sint_to_fp, i32mem, loadi32, - "cvtsi2sd\t{$src, $src1, $dst|$dst, $src1, $src}">, XD, - VEX_4V; +defm VCVTTSS2SI : sse12_cvt_s<0x2C, FR32, GR32, fp_to_sint, f32mem, loadf32, + "cvttss2si\t{$src, $dst|$dst, $src}">, XS, VEX; +defm VCVTTSS2SIr64 : sse12_cvt_s<0x2C, FR32, GR64, fp_to_sint, f32mem, loadf32, + "cvttss2si\t{$src, $dst|$dst, $src}">, XS, VEX, + VEX_W; +defm VCVTTSD2SI : sse12_cvt_s<0x2C, FR64, GR32, fp_to_sint, f64mem, loadf64, + "cvttsd2si\t{$src, $dst|$dst, $src}">, XD, VEX; +defm VCVTTSD2SIr64 : sse12_cvt_s<0x2C, FR64, GR64, fp_to_sint, f64mem, loadf64, + "cvttsd2si\t{$src, $dst|$dst, $src}">, XD, VEX, + VEX_W; + +// The assembler can recognize rr 64-bit instructions by seeing a rxx +// register, but the same isn't true when only using memory operands, +// provide other assembly "l" and "q" forms to address this explicitly +// where appropriate to do so. +defm VCVTSI2SS : sse12_vcvt_avx<0x2A, GR32, FR32, i32mem, "cvtsi2ss">, XS, + VEX_4V; +defm VCVTSI2SSQ : sse12_vcvt_avx<0x2A, GR64, FR32, i64mem, "cvtsi2ssq">, XS, + VEX_4V, VEX_W; +defm VCVTSI2SD : sse12_vcvt_avx<0x2A, GR32, FR64, i32mem, "cvtsi2sd">, XD, + VEX_4V; +defm VCVTSI2SDL : sse12_vcvt_avx<0x2A, GR32, FR64, i32mem, "cvtsi2sdl">, XD, + VEX_4V; +defm VCVTSI2SDQ : sse12_vcvt_avx<0x2A, GR64, FR64, i64mem, "cvtsi2sdq">, XD, + VEX_4V, VEX_W; } defm CVTTSS2SI : sse12_cvt_s<0x2C, FR32, GR32, fp_to_sint, f32mem, loadf32, @@ -603,6 +626,14 @@ defm Int_VCVTSD2SI : sse12_cvt_sint<0x2D, VR128, GR32, int_x86_sse2_cvtsd2si, f128mem, load, "cvtsd2si\t{$src, $dst|$dst, $src}">, XD, VEX; + // FIXME: The asm matcher has a hack to ignore instructions with _Int and Int_ + // Get rid of this hack or rename the intrinsics, there are several + // intructions that only match with the intrinsic form, why create duplicates + // to let them be recognized by the assembler? + defm VCVTSD2SI_alt : sse12_cvt_s_np<0x2D, FR64, GR32, f64mem, + "cvtsd2si\t{$src, $dst|$dst, $src}">, XD, VEX; + defm VCVTSD2SI64 : sse12_cvt_s_np<0x2D, FR64, GR64, f64mem, + "cvtsd2si\t{$src, $dst|$dst, $src}">, XD, VEX, VEX_W; } defm Int_CVTSS2SI : sse12_cvt_sint<0x2D, VR128, GR32, int_x86_sse_cvtss2si, f32mem, load, "cvtss2si\t{$src, $dst|$dst, $src}">, XS; @@ -661,14 +692,17 @@ XD; let isAsmParserOnly = 1, Pattern = [] in { -defm VCVTSS2SI : sse12_cvt_s<0x2D, FR32, GR32, undef, f32mem, load, - "cvtss2si{l}\t{$src, $dst|$dst, $src}">, XS, VEX; -defm VCVTDQ2PS : sse12_cvt_p<0x5B, VR128, VR128, undef, f128mem, load, - "cvtdq2ps\t{$src, $dst|$dst, $src}", - SSEPackedSingle>, TB, VEX; -defm VCVTDQ2PSY : sse12_cvt_p<0x5B, VR256, VR256, undef, f256mem, load, - "cvtdq2ps\t{$src, $dst|$dst, $src}", - SSEPackedSingle>, TB, VEX; +defm VCVTSS2SI : sse12_cvt_s<0x2D, FR32, GR32, undef, f32mem, load, + "cvtss2si{l}\t{$src, $dst|$dst, $src}">, XS, VEX; +defm VCVTSS2SI64 : sse12_cvt_s<0x2D, FR32, GR64, undef, f32mem, load, + "cvtss2si\t{$src, $dst|$dst, $src}">, XS, VEX, + VEX_W; +defm VCVTDQ2PS : sse12_cvt_p<0x5B, VR128, VR128, undef, f128mem, load, + "cvtdq2ps\t{$src, $dst|$dst, $src}", + SSEPackedSingle>, TB, VEX; +defm VCVTDQ2PSY : sse12_cvt_p<0x5B, VR256, VR256, undef, f256mem, load, + "cvtdq2ps\t{$src, $dst|$dst, $src}", + SSEPackedSingle>, TB, VEX; } let Pattern = [] in { defm CVTSS2SI : sse12_cvt_s<0x2D, FR32, GR32, undef, f32mem, load /*dummy*/, Modified: llvm/trunk/test/MC/AsmParser/X86/x86_32-encoding.s URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AsmParser/X86/x86_32-encoding.s?rev=109039&r1=109038&r2=109039&view=diff ============================================================================== --- llvm/trunk/test/MC/AsmParser/X86/x86_32-encoding.s (original) +++ llvm/trunk/test/MC/AsmParser/X86/x86_32-encoding.s Wed Jul 21 16:37:59 2010 @@ -13142,3 +13142,19 @@ // CHECK: encoding: [0xc5,0xf8,0x77] vzeroupper +// CHECK: vcvtsd2si %xmm4, %ecx +// CHECK: encoding: [0xc5,0xfb,0x2d,0xcc] + vcvtsd2si %xmm4, %ecx + +// CHECK: vcvtsd2si (%ecx), %ecx +// CHECK: encoding: [0xc5,0xfb,0x2d,0x09] + vcvtsd2si (%ecx), %ecx + +// CHECK: vcvtsi2sdl (%ebp), %xmm0, %xmm7 +// CHECK: encoding: [0xc5,0xfb,0x2a,0x7d,0x00] + vcvtsi2sdl (%ebp), %xmm0, %xmm7 + +// CHECK: vcvtsi2sdl (%esp), %xmm0, %xmm7 +// CHECK: encoding: [0xc5,0xfb,0x2a,0x3c,0x24] + vcvtsi2sdl (%esp), %xmm0, %xmm7 + Modified: llvm/trunk/test/MC/AsmParser/X86/x86_64-encoding.s URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AsmParser/X86/x86_64-encoding.s?rev=109039&r1=109038&r2=109039&view=diff ============================================================================== --- llvm/trunk/test/MC/AsmParser/X86/x86_64-encoding.s (original) +++ llvm/trunk/test/MC/AsmParser/X86/x86_64-encoding.s Wed Jul 21 16:37:59 2010 @@ -3208,3 +3208,59 @@ // CHECK: encoding: [0xc4,0x63,0x2d,0x06,0x18,0x07] vperm2f128 $7, (%rax), %ymm10, %ymm11 +// CHECK: vcvtsd2si %xmm8, %r8d +// CHECK: encoding: [0xc4,0x41,0x7b,0x2d,0xc0] + vcvtsd2si %xmm8, %r8d + +// CHECK: vcvtsd2si (%rcx), %ecx +// CHECK: encoding: [0xc5,0xfb,0x2d,0x09] + vcvtsd2si (%rcx), %ecx + +// CHECK: vcvtss2si %xmm4, %rcx +// CHECK: encoding: [0xc4,0xe1,0xfa,0x2d,0xcc] + vcvtss2si %xmm4, %rcx + +// CHECK: vcvtss2si (%rcx), %r8 +// CHECK: encoding: [0xc4,0x61,0xfa,0x2d,0x01] + vcvtss2si (%rcx), %r8 + +// CHECK: vcvtsi2sdl %r8d, %xmm8, %xmm15 +// CHECK: encoding: [0xc4,0x41,0x3b,0x2a,0xf8] + vcvtsi2sdl %r8d, %xmm8, %xmm15 + +// CHECK: vcvtsi2sdl (%rbp), %xmm8, %xmm15 +// CHECK: encoding: [0xc5,0x3b,0x2a,0x7d,0x00] + vcvtsi2sdl (%rbp), %xmm8, %xmm15 + +// CHECK: vcvtsi2sdq %rcx, %xmm4, %xmm6 +// CHECK: encoding: [0xc4,0xe1,0xdb,0x2a,0xf1] + vcvtsi2sdq %rcx, %xmm4, %xmm6 + +// CHECK: vcvtsi2sdq (%rcx), %xmm4, %xmm6 +// CHECK: encoding: [0xc4,0xe1,0xdb,0x2a,0x31] + vcvtsi2sdq (%rcx), %xmm4, %xmm6 + +// CHECK: vcvtsi2ssq %rcx, %xmm4, %xmm6 +// CHECK: encoding: [0xc4,0xe1,0xda,0x2a,0xf1] + vcvtsi2ssq %rcx, %xmm4, %xmm6 + +// CHECK: vcvtsi2ssq (%rcx), %xmm4, %xmm6 +// CHECK: encoding: [0xc4,0xe1,0xda,0x2a,0x31] + vcvtsi2ssq (%rcx), %xmm4, %xmm6 + +// CHECK: vcvttsd2si %xmm4, %rcx +// CHECK: encoding: [0xc4,0xe1,0xfb,0x2c,0xcc] + vcvttsd2si %xmm4, %rcx + +// CHECK: vcvttsd2si (%rcx), %rcx +// CHECK: encoding: [0xc4,0xe1,0xfb,0x2c,0x09] + vcvttsd2si (%rcx), %rcx + +// CHECK: vcvttss2si %xmm4, %rcx +// CHECK: encoding: [0xc4,0xe1,0xfa,0x2c,0xcc] + vcvttss2si %xmm4, %rcx + +// CHECK: vcvttss2si (%rcx), %rcx +// CHECK: encoding: [0xc4,0xe1,0xfa,0x2c,0x09] + vcvttss2si (%rcx), %rcx + From natebegeman at mac.com Wed Jul 21 16:54:07 2010 From: natebegeman at mac.com (Nate Begeman) Date: Wed, 21 Jul 2010 14:54:07 -0700 Subject: [llvm-commits] [llvm] r109035 - in /llvm/trunk/lib/Target/X86: X86ISelLowering.cpp X86InstrInfo.cpp In-Reply-To: References: <20100721204953.583492A6C12C@llvm.org> <1872DAE9-6CEE-493A-B214-18F997DDD1C1@mac.com> Message-ID: On Jul 21, 2010, at 2:37 PM, Anton Korobeynikov wrote: > Hello, Nate > >> Can you explain a bit about how prolog/epilog expansion is broken? Sorry, I'm not 100% following this yet. > If you'll look inside prologue / epilogue expansion code, you'll find > that it finds the place to insert stack frame allocation / > deallocation stuff just via scanning the first / last MBB and looking > for push'es / pop's skipping them. It's ok since currently push / pop > is inserted inserted only by this callee-saved save / restore code. > Now problem: in order to save / restore high xmm registers one must > use movaps. And this case is not handled by prologue / epilogue > expansion code. The problem is that we cannot handle it the same way > as push / pop: this instruction can normally be generated by the > codegen. I saw the testcases, when movaps was used for vector reg > reload from the spill slot just in the end of MBB. The situation was > even worse with post-RA scheduler, since it can move this movaps quite > far. > > Thus: > 1. If we'll skip movaps blindly, we'll insert stack frame allocation / > deallocation in wrong place > 2. If we won't skip movaps, we'll insert stack frame allocation / > deallocation in wrong place > > The only quick workaround found was to use > {load,store}RegFromStackSlot for all callee-saved regs, since it uses > absolute offsets and is not influenced by this erratic behavior. Ah, ok, so because of a PEI deficiency, we have to store all callee-save registers with move instructions to fixed stack offsets for win64? If so, how about this, which should at least never generate illegal instructions: Index: lib/Target/X86/X86InstrInfo.cpp =================================================================== --- lib/Target/X86/X86InstrInfo.cpp (revision 109035) +++ lib/Target/X86/X86InstrInfo.cpp (working copy) @@ -2062,6 +2062,7 @@ DebugLoc DL = MBB.findDebugLoc(MI); bool is64Bit = TM.getSubtarget().is64Bit(); + bool isWin64 = TM.getSubtarget().isTargetWin64(); unsigned SlotSize = is64Bit ? 8 : 4; MachineFunction &MF = *MBB.getParent(); @@ -2077,6 +2078,17 @@ if (Reg == FPReg) // X86RegisterInfo::emitPrologue will handle spilling of frame register. continue; + + // The Prolog/Epilog Inserter code looks for pushes/pops, but xmm regs can + // only be saved with xmm move instructions. As a workaround to prevent + // stack frame manipulation code from being inserted in the wrong place, + // all registers on win64 should be saved with storeRegToStackSlot(); + if (isWin64) { + const TargetRegisterClass *RC = TRI->getMinimalPhysRegClass(Reg); + storeRegToStackSlot(MBB, MI, Reg, true, CSI[i-1].getFrameIdx(), RC, &RI); + continue; + } + And something similar for the load path. > >> If I recall correctly, PowerPC has an extremely similar issue with where LR/CR are stored. I'll revert that part of the patch and work on a "more correct" one, but it seems strange that win64 wouldn't save callee-save regs in this routine, and instead choose to save them some other way. > It will. But since high xmm regs need to be saved, they (high xmm > regs) will be saved / restored into a wrong place => not preserved > across the call. > > -- > With best regards, Anton Korobeynikov > Faculty of Mathematics and Mechanics, Saint Petersburg State University From grosbach at apple.com Wed Jul 21 17:04:53 2010 From: grosbach at apple.com (Jim Grosbach) Date: Wed, 21 Jul 2010 22:04:53 -0000 Subject: [llvm-commits] [llvm] r109042 - /llvm/trunk/include/llvm/CodeGen/AsmPrinter.h Message-ID: <20100721220454.0D92A2A6C12C@llvm.org> Author: grosbach Date: Wed Jul 21 17:04:53 2010 New Revision: 109042 URL: http://llvm.org/viewvc/llvm-project?rev=109042&view=rev Log: tidy up Modified: llvm/trunk/include/llvm/CodeGen/AsmPrinter.h Modified: llvm/trunk/include/llvm/CodeGen/AsmPrinter.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/AsmPrinter.h?rev=109042&r1=109041&r2=109042&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/AsmPrinter.h (original) +++ llvm/trunk/include/llvm/CodeGen/AsmPrinter.h Wed Jul 21 17:04:53 2010 @@ -296,7 +296,7 @@ MCSymbol *GetBlockAddressSymbol(const BlockAddress *BA) const; MCSymbol *GetBlockAddressSymbol(const BasicBlock *BB) const; - //===------------------------------------------------------------------===// + //===------------------------------------------------------------------===// // Emission Helper Routines. //===------------------------------------------------------------------===// public: From echristo at apple.com Wed Jul 21 17:07:19 2010 From: echristo at apple.com (Eric Christopher) Date: Wed, 21 Jul 2010 22:07:19 -0000 Subject: [llvm-commits] [llvm] r109043 - /llvm/trunk/utils/TableGen/FastISelEmitter.cpp Message-ID: <20100721220719.722192A6C12C@llvm.org> Author: echristo Date: Wed Jul 21 17:07:19 2010 New Revision: 109043 URL: http://llvm.org/viewvc/llvm-project?rev=109043&view=rev Log: Hack around extracts that aren't easy to process. Modified: llvm/trunk/utils/TableGen/FastISelEmitter.cpp Modified: llvm/trunk/utils/TableGen/FastISelEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/FastISelEmitter.cpp?rev=109043&r1=109042&r2=109043&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/FastISelEmitter.cpp (original) +++ llvm/trunk/utils/TableGen/FastISelEmitter.cpp Wed Jul 21 17:07:19 2010 @@ -287,6 +287,10 @@ if (!DstRC) continue; } else { + // If this isn't a leaf, then continue since the register classes are + // a bit too complicated for now. + if (!Dst->getChild(1)->isLeaf()) continue; + DefInit *SR = dynamic_cast(Dst->getChild(1)->getLeafValue()); if (SR) SubRegNo = getQualifiedName(SR->getDef()); From resistor at mac.com Wed Jul 21 17:09:46 2010 From: resistor at mac.com (Owen Anderson) Date: Wed, 21 Jul 2010 22:09:46 -0000 Subject: [llvm-commits] [llvm] r109045 - in /llvm/trunk/lib: Analysis/ CodeGen/ Target/ Transforms/Hello/ Transforms/IPO/ Transforms/InstCombine/ Transforms/Instrumentation/ Transforms/Scalar/ Transforms/Utils/ VMCore/ Message-ID: <20100721220947.522CF2A6C12C@llvm.org> Author: resistor Date: Wed Jul 21 17:09:45 2010 New Revision: 109045 URL: http://llvm.org/viewvc/llvm-project?rev=109045&view=rev Log: Fix batch of converting RegisterPass<> to INTIALIZE_PASS(). Modified: llvm/trunk/lib/Analysis/AliasAnalysisEvaluator.cpp llvm/trunk/lib/Analysis/AliasSetTracker.cpp llvm/trunk/lib/Analysis/CFGPrinter.cpp llvm/trunk/lib/Analysis/DbgInfoPrinter.cpp llvm/trunk/lib/Analysis/DomPrinter.cpp llvm/trunk/lib/Analysis/IVUsers.cpp llvm/trunk/lib/Analysis/InstCount.cpp llvm/trunk/lib/Analysis/IntervalPartition.cpp llvm/trunk/lib/Analysis/LazyValueInfo.cpp llvm/trunk/lib/Analysis/Lint.cpp llvm/trunk/lib/Analysis/LiveValues.cpp llvm/trunk/lib/Analysis/LoopDependenceAnalysis.cpp llvm/trunk/lib/Analysis/LoopInfo.cpp llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp llvm/trunk/lib/Analysis/ModuleDebugInfoPrinter.cpp llvm/trunk/lib/Analysis/PointerTracking.cpp llvm/trunk/lib/Analysis/PostDominators.cpp llvm/trunk/lib/Analysis/ProfileVerifierPass.cpp llvm/trunk/lib/Analysis/ScalarEvolution.cpp llvm/trunk/lib/CodeGen/CalcSpillWeights.cpp llvm/trunk/lib/CodeGen/DeadMachineInstructionElim.cpp llvm/trunk/lib/CodeGen/GCMetadata.cpp llvm/trunk/lib/CodeGen/IfConversion.cpp llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp llvm/trunk/lib/CodeGen/LiveStackAnalysis.cpp llvm/trunk/lib/CodeGen/LiveVariables.cpp llvm/trunk/lib/CodeGen/MachineCSE.cpp llvm/trunk/lib/CodeGen/MachineLICM.cpp llvm/trunk/lib/CodeGen/MachineModuleInfo.cpp llvm/trunk/lib/CodeGen/MachineSink.cpp llvm/trunk/lib/CodeGen/OptimizeExts.cpp llvm/trunk/lib/CodeGen/OptimizePHIs.cpp llvm/trunk/lib/CodeGen/ProcessImplicitDefs.cpp llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp llvm/trunk/lib/CodeGen/RegAllocLinearScan.cpp llvm/trunk/lib/CodeGen/RenderMachineFunction.cpp llvm/trunk/lib/CodeGen/SlotIndexes.cpp llvm/trunk/lib/CodeGen/Splitter.cpp llvm/trunk/lib/CodeGen/StackProtector.cpp llvm/trunk/lib/CodeGen/StackSlotColoring.cpp llvm/trunk/lib/CodeGen/UnreachableBlockElim.cpp llvm/trunk/lib/CodeGen/VirtRegMap.cpp llvm/trunk/lib/Target/TargetData.cpp llvm/trunk/lib/Transforms/Hello/Hello.cpp llvm/trunk/lib/Transforms/IPO/ArgumentPromotion.cpp llvm/trunk/lib/Transforms/IPO/ConstantMerge.cpp llvm/trunk/lib/Transforms/IPO/DeadArgumentElimination.cpp llvm/trunk/lib/Transforms/IPO/DeadTypeElimination.cpp llvm/trunk/lib/Transforms/IPO/FunctionAttrs.cpp llvm/trunk/lib/Transforms/IPO/GlobalDCE.cpp llvm/trunk/lib/Transforms/IPO/GlobalOpt.cpp llvm/trunk/lib/Transforms/IPO/IPConstantPropagation.cpp llvm/trunk/lib/Transforms/IPO/InlineAlways.cpp llvm/trunk/lib/Transforms/IPO/InlineSimple.cpp llvm/trunk/lib/Transforms/IPO/Internalize.cpp llvm/trunk/lib/Transforms/IPO/LoopExtractor.cpp llvm/trunk/lib/Transforms/IPO/LowerSetJmp.cpp llvm/trunk/lib/Transforms/IPO/MergeFunctions.cpp llvm/trunk/lib/Transforms/IPO/PartialInlining.cpp llvm/trunk/lib/Transforms/IPO/PartialSpecialization.cpp llvm/trunk/lib/Transforms/IPO/PruneEH.cpp llvm/trunk/lib/Transforms/IPO/StripDeadPrototypes.cpp llvm/trunk/lib/Transforms/IPO/StripSymbols.cpp llvm/trunk/lib/Transforms/IPO/StructRetPromotion.cpp llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp llvm/trunk/lib/Transforms/Instrumentation/EdgeProfiling.cpp llvm/trunk/lib/Transforms/Instrumentation/OptimalEdgeProfiling.cpp llvm/trunk/lib/Transforms/Scalar/ABCD.cpp llvm/trunk/lib/Transforms/Scalar/ADCE.cpp llvm/trunk/lib/Transforms/Scalar/BasicBlockPlacement.cpp llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp llvm/trunk/lib/Transforms/Scalar/ConstantProp.cpp llvm/trunk/lib/Transforms/Scalar/DCE.cpp llvm/trunk/lib/Transforms/Scalar/DeadStoreElimination.cpp llvm/trunk/lib/Transforms/Scalar/GEPSplitter.cpp llvm/trunk/lib/Transforms/Scalar/GVN.cpp llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp llvm/trunk/lib/Transforms/Scalar/JumpThreading.cpp llvm/trunk/lib/Transforms/Scalar/LICM.cpp llvm/trunk/lib/Transforms/Scalar/LoopDeletion.cpp llvm/trunk/lib/Transforms/Scalar/LoopIndexSplit.cpp llvm/trunk/lib/Transforms/Scalar/LoopRotation.cpp llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp llvm/trunk/lib/Transforms/Scalar/LoopUnrollPass.cpp llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp llvm/trunk/lib/Transforms/Scalar/MemCpyOptimizer.cpp llvm/trunk/lib/Transforms/Scalar/Reassociate.cpp llvm/trunk/lib/Transforms/Scalar/SCCP.cpp llvm/trunk/lib/Transforms/Scalar/ScalarReplAggregates.cpp llvm/trunk/lib/Transforms/Scalar/SimplifyCFGPass.cpp llvm/trunk/lib/Transforms/Scalar/SimplifyHalfPowrLibCalls.cpp llvm/trunk/lib/Transforms/Scalar/SimplifyLibCalls.cpp llvm/trunk/lib/Transforms/Scalar/Sink.cpp llvm/trunk/lib/Transforms/Scalar/TailDuplication.cpp llvm/trunk/lib/Transforms/Scalar/TailRecursionElimination.cpp llvm/trunk/lib/Transforms/Utils/SSI.cpp llvm/trunk/lib/Transforms/Utils/UnifyFunctionExitNodes.cpp llvm/trunk/lib/VMCore/Dominators.cpp llvm/trunk/lib/VMCore/PrintModulePass.cpp Modified: llvm/trunk/lib/Analysis/AliasAnalysisEvaluator.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/AliasAnalysisEvaluator.cpp?rev=109045&r1=109044&r2=109045&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/AliasAnalysisEvaluator.cpp (original) +++ llvm/trunk/lib/Analysis/AliasAnalysisEvaluator.cpp Wed Jul 21 17:09:45 2010 @@ -74,8 +74,8 @@ } char AAEval::ID = 0; -static RegisterPass -X("aa-eval", "Exhaustive Alias Analysis Precision Evaluator", false, true); +INITIALIZE_PASS(AAEval, "aa-eval", + "Exhaustive Alias Analysis Precision Evaluator", false, true); FunctionPass *llvm::createAAEvalPass() { return new AAEval(); } Modified: llvm/trunk/lib/Analysis/AliasSetTracker.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/AliasSetTracker.cpp?rev=109045&r1=109044&r2=109045&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/AliasSetTracker.cpp (original) +++ llvm/trunk/lib/Analysis/AliasSetTracker.cpp Wed Jul 21 17:09:45 2010 @@ -600,5 +600,5 @@ } char AliasSetPrinter::ID = 0; -static RegisterPass -X("print-alias-sets", "Alias Set Printer", false, true); +INITIALIZE_PASS(AliasSetPrinter, "print-alias-sets", + "Alias Set Printer", false, true); Modified: llvm/trunk/lib/Analysis/CFGPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/CFGPrinter.cpp?rev=109045&r1=109044&r2=109045&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/CFGPrinter.cpp (original) +++ llvm/trunk/lib/Analysis/CFGPrinter.cpp Wed Jul 21 17:09:45 2010 @@ -41,8 +41,7 @@ } char CFGViewer::ID = 0; -static RegisterPass -V0("view-cfg", "View CFG of function", false, true); +INITIALIZE_PASS(CFGViewer, "view-cfg", "View CFG of function", false, true); namespace { struct CFGOnlyViewer : public FunctionPass { Modified: llvm/trunk/lib/Analysis/DbgInfoPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/DbgInfoPrinter.cpp?rev=109045&r1=109044&r2=109045&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/DbgInfoPrinter.cpp (original) +++ llvm/trunk/lib/Analysis/DbgInfoPrinter.cpp Wed Jul 21 17:09:45 2010 @@ -48,8 +48,8 @@ } }; char PrintDbgInfo::ID = 0; - static RegisterPass X("print-dbginfo", - "Print debug info in human readable form"); + INITIALIZE_PASS(PrintDbgInfo, "print-dbginfo", + "Print debug info in human readable form", false, false); } FunctionPass *llvm::createDbgInfoPrinterPass() { return new PrintDbgInfo(); } Modified: llvm/trunk/lib/Analysis/DomPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/DomPrinter.cpp?rev=109045&r1=109044&r2=109045&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/DomPrinter.cpp (original) +++ llvm/trunk/lib/Analysis/DomPrinter.cpp Wed Jul 21 17:09:45 2010 @@ -111,22 +111,23 @@ } // end anonymous namespace char DomViewer::ID = 0; -RegisterPass A("view-dom", - "View dominance tree of function"); +INITIALIZE_PASS(DomViewer, "view-dom", + "View dominance tree of function", false, false); char DomOnlyViewer::ID = 0; -RegisterPass B("view-dom-only", - "View dominance tree of function " - "(with no function bodies)"); +INITIALIZE_PASS(DomOnlyViewer, "view-dom-only", + "View dominance tree of function (with no function bodies)", + false, false); char PostDomViewer::ID = 0; -RegisterPass C("view-postdom", - "View postdominance tree of function"); +INITIALIZE_PASS(PostDomViewer, "view-postdom", + "View postdominance tree of function", false, false); char PostDomOnlyViewer::ID = 0; -RegisterPass D("view-postdom-only", - "View postdominance tree of function " - "(with no function bodies)"); +INITIALIZE_PASS(PostDomOnlyViewer, "view-postdom-only", + "View postdominance tree of function " + "(with no function bodies)", + false, false); namespace { struct DomPrinter @@ -159,26 +160,26 @@ char DomPrinter::ID = 0; -RegisterPass E("dot-dom", - "Print dominance tree of function " - "to 'dot' file"); +INITIALIZE_PASS(DomPrinter, "dot-dom", + "Print dominance tree of function to 'dot' file", + false, false); char DomOnlyPrinter::ID = 0; -RegisterPass F("dot-dom-only", - "Print dominance tree of function " - "to 'dot' file " - "(with no function bodies)"); +INITIALIZE_PASS(DomOnlyPrinter, "dot-dom-only", + "Print dominance tree of function to 'dot' file " + "(with no function bodies)", + false, false); char PostDomPrinter::ID = 0; -RegisterPass G("dot-postdom", - "Print postdominance tree of function " - "to 'dot' file"); +INITIALIZE_PASS(PostDomPrinter, "dot-postdom", + "Print postdominance tree of function to 'dot' file", + false, false); char PostDomOnlyPrinter::ID = 0; -RegisterPass H("dot-postdom-only", - "Print postdominance tree of function " - "to 'dot' file " - "(with no function bodies)"); +INITIALIZE_PASS(PostDomOnlyPrinter, "dot-postdom-only", + "Print postdominance tree of function to 'dot' file " + "(with no function bodies)", + false, false); // Create methods available outside of this file, to use them // "include/llvm/LinkAllPasses.h". Otherwise the pass would be deleted by Modified: llvm/trunk/lib/Analysis/IVUsers.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/IVUsers.cpp?rev=109045&r1=109044&r2=109045&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/IVUsers.cpp (original) +++ llvm/trunk/lib/Analysis/IVUsers.cpp Wed Jul 21 17:09:45 2010 @@ -29,8 +29,7 @@ using namespace llvm; char IVUsers::ID = 0; -static RegisterPass -X("iv-users", "Induction Variable Users", false, true); +INITIALIZE_PASS(IVUsers, "iv-users", "Induction Variable Users", false, true); Pass *llvm::createIVUsersPass() { return new IVUsers(); Modified: llvm/trunk/lib/Analysis/InstCount.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/InstCount.cpp?rev=109045&r1=109044&r2=109045&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/InstCount.cpp (original) +++ llvm/trunk/lib/Analysis/InstCount.cpp Wed Jul 21 17:09:45 2010 @@ -64,8 +64,8 @@ } char InstCount::ID = 0; -static RegisterPass -X("instcount", "Counts the various types of Instructions", false, true); +INITIALIZE_PASS(InstCount, "instcount", + "Counts the various types of Instructions", false, true); FunctionPass *llvm::createInstCountPass() { return new InstCount(); } Modified: llvm/trunk/lib/Analysis/IntervalPartition.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/IntervalPartition.cpp?rev=109045&r1=109044&r2=109045&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/IntervalPartition.cpp (original) +++ llvm/trunk/lib/Analysis/IntervalPartition.cpp Wed Jul 21 17:09:45 2010 @@ -16,8 +16,8 @@ using namespace llvm; char IntervalPartition::ID = 0; -static RegisterPass -X("intervals", "Interval Partition Construction", true, true); +INITIALIZE_PASS(IntervalPartition, "intervals", + "Interval Partition Construction", true, true); //===----------------------------------------------------------------------===// // IntervalPartition Implementation Modified: llvm/trunk/lib/Analysis/LazyValueInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/LazyValueInfo.cpp?rev=109045&r1=109044&r2=109045&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/LazyValueInfo.cpp (original) +++ llvm/trunk/lib/Analysis/LazyValueInfo.cpp Wed Jul 21 17:09:45 2010 @@ -27,8 +27,8 @@ using namespace llvm; char LazyValueInfo::ID = 0; -static RegisterPass -X("lazy-value-info", "Lazy Value Information Analysis", false, true); +INITIALIZE_PASS(LazyValueInfo, "lazy-value-info", + "Lazy Value Information Analysis", false, true); namespace llvm { FunctionPass *createLazyValueInfoPass() { return new LazyValueInfo(); } Modified: llvm/trunk/lib/Analysis/Lint.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/Lint.cpp?rev=109045&r1=109044&r2=109045&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/Lint.cpp (original) +++ llvm/trunk/lib/Analysis/Lint.cpp Wed Jul 21 17:09:45 2010 @@ -167,8 +167,7 @@ } char Lint::ID = 0; -static RegisterPass -X("lint", "Statically lint-checks LLVM IR", false, true); +INITIALIZE_PASS(Lint, "lint", "Statically lint-checks LLVM IR", false, true); // Assert - We know that cond should be true, if not print an error message. #define Assert(C, M) \ Modified: llvm/trunk/lib/Analysis/LiveValues.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/LiveValues.cpp?rev=109045&r1=109044&r2=109045&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/LiveValues.cpp (original) +++ llvm/trunk/lib/Analysis/LiveValues.cpp Wed Jul 21 17:09:45 2010 @@ -22,8 +22,8 @@ } char LiveValues::ID = 0; -static RegisterPass -X("live-values", "Value Liveness Analysis", false, true); +INITIALIZE_PASS(LiveValues, "live-values", + "Value Liveness Analysis", false, true); LiveValues::LiveValues() : FunctionPass(&ID) {} Modified: llvm/trunk/lib/Analysis/LoopDependenceAnalysis.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/LoopDependenceAnalysis.cpp?rev=109045&r1=109044&r2=109045&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/LoopDependenceAnalysis.cpp (original) +++ llvm/trunk/lib/Analysis/LoopDependenceAnalysis.cpp Wed Jul 21 17:09:45 2010 @@ -46,8 +46,8 @@ return new LoopDependenceAnalysis(); } -static RegisterPass -R("lda", "Loop Dependence Analysis", false, true); +INITIALIZE_PASS(LoopDependenceAnalysis, "lda", + "Loop Dependence Analysis", false, true); char LoopDependenceAnalysis::ID = 0; //===----------------------------------------------------------------------===// Modified: llvm/trunk/lib/Analysis/LoopInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/LoopInfo.cpp?rev=109045&r1=109044&r2=109045&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/LoopInfo.cpp (original) +++ llvm/trunk/lib/Analysis/LoopInfo.cpp Wed Jul 21 17:09:45 2010 @@ -38,8 +38,7 @@ cl::desc("Verify loop info (time consuming)")); char LoopInfo::ID = 0; -static RegisterPass -X("loops", "Natural Loop Information", true, true); +INITIALIZE_PASS(LoopInfo, "loops", "Natural Loop Information", true, true); //===----------------------------------------------------------------------===// // Loop implementation Modified: llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp?rev=109045&r1=109044&r2=109045&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp (original) +++ llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp Wed Jul 21 17:09:45 2010 @@ -46,8 +46,8 @@ char MemoryDependenceAnalysis::ID = 0; // Register this pass... -static RegisterPass X("memdep", - "Memory Dependence Analysis", false, true); +INITIALIZE_PASS(MemoryDependenceAnalysis, "memdep", + "Memory Dependence Analysis", false, true); MemoryDependenceAnalysis::MemoryDependenceAnalysis() : FunctionPass(&ID), PredCache(0) { Modified: llvm/trunk/lib/Analysis/ModuleDebugInfoPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ModuleDebugInfoPrinter.cpp?rev=109045&r1=109044&r2=109045&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/ModuleDebugInfoPrinter.cpp (original) +++ llvm/trunk/lib/Analysis/ModuleDebugInfoPrinter.cpp Wed Jul 21 17:09:45 2010 @@ -42,9 +42,8 @@ } char ModuleDebugInfoPrinter::ID = 0; -static RegisterPass -X("module-debuginfo", - "Decodes module-level debug info", false, true); +INITIALIZE_PASS(ModuleDebugInfoPrinter, "module-debuginfo", + "Decodes module-level debug info", false, true); ModulePass *llvm::createModuleDebugInfoPrinterPass() { return new ModuleDebugInfoPrinter(); Modified: llvm/trunk/lib/Analysis/PointerTracking.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/PointerTracking.cpp?rev=109045&r1=109044&r2=109045&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/PointerTracking.cpp (original) +++ llvm/trunk/lib/Analysis/PointerTracking.cpp Wed Jul 21 17:09:45 2010 @@ -263,5 +263,5 @@ } } -static RegisterPass X("pointertracking", - "Track pointer bounds", false, true); +INITIALIZE_PASS(PointerTracking, "pointertracking", + "Track pointer bounds", false, true); Modified: llvm/trunk/lib/Analysis/PostDominators.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/PostDominators.cpp?rev=109045&r1=109044&r2=109045&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/PostDominators.cpp (original) +++ llvm/trunk/lib/Analysis/PostDominators.cpp Wed Jul 21 17:09:45 2010 @@ -28,8 +28,8 @@ char PostDominatorTree::ID = 0; char PostDominanceFrontier::ID = 0; -static RegisterPass -F("postdomtree", "Post-Dominator Tree Construction", true, true); +INITIALIZE_PASS(PostDominatorTree, "postdomtree", + "Post-Dominator Tree Construction", true, true); bool PostDominatorTree::runOnFunction(Function &F) { DT->recalculate(F); Modified: llvm/trunk/lib/Analysis/ProfileVerifierPass.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ProfileVerifierPass.cpp?rev=109045&r1=109044&r2=109045&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/ProfileVerifierPass.cpp (original) +++ llvm/trunk/lib/Analysis/ProfileVerifierPass.cpp Wed Jul 21 17:09:45 2010 @@ -366,8 +366,8 @@ char ProfileVerifierPassT::ID = 0; } -static RegisterPass -X("profile-verifier", "Verify profiling information", false, true); +INITIALIZE_PASS(ProfileVerifierPass, "profile-verifier", + "Verify profiling information", false, true); namespace llvm { FunctionPass *createProfileVerifierPass() { Modified: llvm/trunk/lib/Analysis/ScalarEvolution.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ScalarEvolution.cpp?rev=109045&r1=109044&r2=109045&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/ScalarEvolution.cpp (original) +++ llvm/trunk/lib/Analysis/ScalarEvolution.cpp Wed Jul 21 17:09:45 2010 @@ -103,8 +103,8 @@ "derived loop"), cl::init(100)); -static RegisterPass -R("scalar-evolution", "Scalar Evolution Analysis", false, true); +INITIALIZE_PASS(ScalarEvolution, "scalar-evolution", + "Scalar Evolution Analysis", false, true); char ScalarEvolution::ID = 0; //===----------------------------------------------------------------------===// Modified: llvm/trunk/lib/CodeGen/CalcSpillWeights.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/CalcSpillWeights.cpp?rev=109045&r1=109044&r2=109045&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/CalcSpillWeights.cpp (original) +++ llvm/trunk/lib/CodeGen/CalcSpillWeights.cpp Wed Jul 21 17:09:45 2010 @@ -25,8 +25,8 @@ using namespace llvm; char CalculateSpillWeights::ID = 0; -static RegisterPass X("calcspillweights", - "Calculate spill weights"); +INITIALIZE_PASS(CalculateSpillWeights, "calcspillweights", + "Calculate spill weights", false, false); void CalculateSpillWeights::getAnalysisUsage(AnalysisUsage &au) const { au.addRequired(); Modified: llvm/trunk/lib/CodeGen/DeadMachineInstructionElim.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/DeadMachineInstructionElim.cpp?rev=109045&r1=109044&r2=109045&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/DeadMachineInstructionElim.cpp (original) +++ llvm/trunk/lib/CodeGen/DeadMachineInstructionElim.cpp Wed Jul 21 17:09:45 2010 @@ -44,9 +44,8 @@ } char DeadMachineInstructionElim::ID = 0; -static RegisterPass -Y("dead-mi-elimination", - "Remove dead machine instructions"); +INITIALIZE_PASS(DeadMachineInstructionElim, "dead-mi-elimination", + "Remove dead machine instructions", false, false); FunctionPass *llvm::createDeadMachineInstructionElimPass() { return new DeadMachineInstructionElim(); Modified: llvm/trunk/lib/CodeGen/GCMetadata.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/GCMetadata.cpp?rev=109045&r1=109044&r2=109045&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/GCMetadata.cpp (original) +++ llvm/trunk/lib/CodeGen/GCMetadata.cpp Wed Jul 21 17:09:45 2010 @@ -55,8 +55,8 @@ } -static RegisterPass -X("collector-metadata", "Create Garbage Collector Module Metadata"); +INITIALIZE_PASS(GCModuleInfo, "collector-metadata", + "Create Garbage Collector Module Metadata", false, false); // ----------------------------------------------------------------------------- Modified: llvm/trunk/lib/CodeGen/IfConversion.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/IfConversion.cpp?rev=109045&r1=109044&r2=109045&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/IfConversion.cpp (original) +++ llvm/trunk/lib/CodeGen/IfConversion.cpp Wed Jul 21 17:09:45 2010 @@ -230,8 +230,7 @@ char IfConverter::ID = 0; } -static RegisterPass -X("if-converter", "If Converter"); +INITIALIZE_PASS(IfConverter, "if-converter", "If Converter", false, false); FunctionPass *llvm::createIfConverterPass() { return new IfConverter(); } Modified: llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp?rev=109045&r1=109044&r2=109045&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp (original) +++ llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp Wed Jul 21 17:09:45 2010 @@ -55,7 +55,8 @@ STATISTIC(numSplits , "Number of intervals split"); char LiveIntervals::ID = 0; -static RegisterPass X("liveintervals", "Live Interval Analysis"); +INITIALIZE_PASS(LiveIntervals, "liveintervals", + "Live Interval Analysis", false, false); void LiveIntervals::getAnalysisUsage(AnalysisUsage &AU) const { AU.setPreservesCFG(); Modified: llvm/trunk/lib/CodeGen/LiveStackAnalysis.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LiveStackAnalysis.cpp?rev=109045&r1=109044&r2=109045&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/LiveStackAnalysis.cpp (original) +++ llvm/trunk/lib/CodeGen/LiveStackAnalysis.cpp Wed Jul 21 17:09:45 2010 @@ -25,7 +25,8 @@ using namespace llvm; char LiveStacks::ID = 0; -static RegisterPass X("livestacks", "Live Stack Slot Analysis"); +INITIALIZE_PASS(LiveStacks, "livestacks", + "Live Stack Slot Analysis", false, false); void LiveStacks::getAnalysisUsage(AnalysisUsage &AU) const { AU.setPreservesAll(); Modified: llvm/trunk/lib/CodeGen/LiveVariables.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LiveVariables.cpp?rev=109045&r1=109044&r2=109045&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/LiveVariables.cpp (original) +++ llvm/trunk/lib/CodeGen/LiveVariables.cpp Wed Jul 21 17:09:45 2010 @@ -42,7 +42,8 @@ using namespace llvm; char LiveVariables::ID = 0; -static RegisterPass X("livevars", "Live Variable Analysis"); +INITIALIZE_PASS(LiveVariables, "livevars", + "Live Variable Analysis", false, false); void LiveVariables::getAnalysisUsage(AnalysisUsage &AU) const { Modified: llvm/trunk/lib/CodeGen/MachineCSE.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineCSE.cpp?rev=109045&r1=109044&r2=109045&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/MachineCSE.cpp (original) +++ llvm/trunk/lib/CodeGen/MachineCSE.cpp Wed Jul 21 17:09:45 2010 @@ -85,8 +85,8 @@ } // end anonymous namespace char MachineCSE::ID = 0; -static RegisterPass -X("machine-cse", "Machine Common Subexpression Elimination"); +INITIALIZE_PASS(MachineCSE, "machine-cse", + "Machine Common Subexpression Elimination", false, false); FunctionPass *llvm::createMachineCSEPass() { return new MachineCSE(); } Modified: llvm/trunk/lib/CodeGen/MachineLICM.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineLICM.cpp?rev=109045&r1=109044&r2=109045&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/MachineLICM.cpp (original) +++ llvm/trunk/lib/CodeGen/MachineLICM.cpp Wed Jul 21 17:09:45 2010 @@ -189,8 +189,8 @@ } // end anonymous namespace char MachineLICM::ID = 0; -static RegisterPass -X("machinelicm", "Machine Loop Invariant Code Motion"); +INITIALIZE_PASS(MachineLICM, "machinelicm", + "Machine Loop Invariant Code Motion", false, false); FunctionPass *llvm::createMachineLICMPass(bool PreRegAlloc) { return new MachineLICM(PreRegAlloc); Modified: llvm/trunk/lib/CodeGen/MachineModuleInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineModuleInfo.cpp?rev=109045&r1=109044&r2=109045&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/MachineModuleInfo.cpp (original) +++ llvm/trunk/lib/CodeGen/MachineModuleInfo.cpp Wed Jul 21 17:09:45 2010 @@ -28,8 +28,8 @@ using namespace llvm::dwarf; // Handle the Pass registration stuff necessary to use TargetData's. -static RegisterPass -X("machinemoduleinfo", "Machine Module Information"); +INITIALIZE_PASS(MachineModuleInfo, "machinemoduleinfo", + "Machine Module Information", false, false); char MachineModuleInfo::ID = 0; // Out of line virtual method. Modified: llvm/trunk/lib/CodeGen/MachineSink.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineSink.cpp?rev=109045&r1=109044&r2=109045&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/MachineSink.cpp (original) +++ llvm/trunk/lib/CodeGen/MachineSink.cpp Wed Jul 21 17:09:45 2010 @@ -65,8 +65,8 @@ } // end anonymous namespace char MachineSinking::ID = 0; -static RegisterPass -X("machine-sink", "Machine code sinking"); +INITIALIZE_PASS(MachineSinking, "machine-sink", + "Machine code sinking", false, false); FunctionPass *llvm::createMachineSinkingPass() { return new MachineSinking(); } Modified: llvm/trunk/lib/CodeGen/OptimizeExts.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/OptimizeExts.cpp?rev=109045&r1=109044&r2=109045&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/OptimizeExts.cpp (original) +++ llvm/trunk/lib/CodeGen/OptimizeExts.cpp Wed Jul 21 17:09:45 2010 @@ -63,8 +63,8 @@ } char OptimizeExts::ID = 0; -static RegisterPass -X("opt-exts", "Optimize sign / zero extensions"); +INITIALIZE_PASS(OptimizeExts, "opt-exts", + "Optimize sign / zero extensions", false, false); FunctionPass *llvm::createOptimizeExtsPass() { return new OptimizeExts(); } Modified: llvm/trunk/lib/CodeGen/OptimizePHIs.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/OptimizePHIs.cpp?rev=109045&r1=109044&r2=109045&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/OptimizePHIs.cpp (original) +++ llvm/trunk/lib/CodeGen/OptimizePHIs.cpp Wed Jul 21 17:09:45 2010 @@ -54,8 +54,8 @@ } char OptimizePHIs::ID = 0; -static RegisterPass -X("opt-phis", "Optimize machine instruction PHIs"); +INITIALIZE_PASS(OptimizePHIs, "opt-phis", + "Optimize machine instruction PHIs", false, false); FunctionPass *llvm::createOptimizePHIsPass() { return new OptimizePHIs(); } Modified: llvm/trunk/lib/CodeGen/ProcessImplicitDefs.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/ProcessImplicitDefs.cpp?rev=109045&r1=109044&r2=109045&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/ProcessImplicitDefs.cpp (original) +++ llvm/trunk/lib/CodeGen/ProcessImplicitDefs.cpp Wed Jul 21 17:09:45 2010 @@ -26,8 +26,8 @@ using namespace llvm; char ProcessImplicitDefs::ID = 0; -static RegisterPass X("processimpdefs", - "Process Implicit Definitions."); +INITIALIZE_PASS(ProcessImplicitDefs, "processimpdefs", + "Process Implicit Definitions.", false, false); void ProcessImplicitDefs::getAnalysisUsage(AnalysisUsage &AU) const { AU.setPreservesCFG(); Modified: llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp?rev=109045&r1=109044&r2=109045&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp (original) +++ llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp Wed Jul 21 17:09:45 2010 @@ -40,8 +40,8 @@ char PEI::ID = 0; -static RegisterPass -X("prologepilog", "Prologue/Epilogue Insertion"); +INITIALIZE_PASS(PEI, "prologepilog", + "Prologue/Epilogue Insertion", false, false); /// createPrologEpilogCodeInserter - This function returns a pass that inserts /// prolog and epilog code, and eliminates abstract frame references. Modified: llvm/trunk/lib/CodeGen/RegAllocLinearScan.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RegAllocLinearScan.cpp?rev=109045&r1=109044&r2=109045&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/RegAllocLinearScan.cpp (original) +++ llvm/trunk/lib/CodeGen/RegAllocLinearScan.cpp Wed Jul 21 17:09:45 2010 @@ -358,8 +358,8 @@ char RALinScan::ID = 0; } -static RegisterPass -X("linearscan-regalloc", "Linear Scan Register Allocator"); +INITIALIZE_PASS(RALinScan, "linearscan-regalloc", + "Linear Scan Register Allocator", false, false); void RALinScan::ComputeRelatedRegClasses() { // First pass, add all reg classes to the union, and determine at least one Modified: llvm/trunk/lib/CodeGen/RenderMachineFunction.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RenderMachineFunction.cpp?rev=109045&r1=109044&r2=109045&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/RenderMachineFunction.cpp (original) +++ llvm/trunk/lib/CodeGen/RenderMachineFunction.cpp Wed Jul 21 17:09:45 2010 @@ -30,8 +30,9 @@ using namespace llvm; char RenderMachineFunction::ID = 0; -static RegisterPass -X("rendermf", "Render machine functions (and related info) to HTML pages"); +INITIALIZE_PASS(RenderMachineFunction, "rendermf", + "Render machine functions (and related info) to HTML pages", + false, false); static cl::opt outputFileSuffix("rmf-file-suffix", Modified: llvm/trunk/lib/CodeGen/SlotIndexes.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SlotIndexes.cpp?rev=109045&r1=109044&r2=109045&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SlotIndexes.cpp (original) +++ llvm/trunk/lib/CodeGen/SlotIndexes.cpp Wed Jul 21 17:09:45 2010 @@ -40,7 +40,8 @@ } char SlotIndexes::ID = 0; -static RegisterPass X("slotindexes", "Slot index numbering"); +INITIALIZE_PASS(SlotIndexes, "slotindexes", + "Slot index numbering", false, false); IndexListEntry* IndexListEntry::getEmptyKeyEntry() { return &*IndexListEntryEmptyKey; Modified: llvm/trunk/lib/CodeGen/Splitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/Splitter.cpp?rev=109045&r1=109044&r2=109045&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/Splitter.cpp (original) +++ llvm/trunk/lib/CodeGen/Splitter.cpp Wed Jul 21 17:09:45 2010 @@ -29,8 +29,8 @@ using namespace llvm; char LoopSplitter::ID = 0; -static RegisterPass -X("loop-splitting", "Split virtual regists across loop boundaries."); +INITIALIZE_PASS(LoopSplitter, "loop-splitting", + "Split virtual regists across loop boundaries.", false, false); namespace llvm { Modified: llvm/trunk/lib/CodeGen/StackProtector.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/StackProtector.cpp?rev=109045&r1=109044&r2=109045&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/StackProtector.cpp (original) +++ llvm/trunk/lib/CodeGen/StackProtector.cpp Wed Jul 21 17:09:45 2010 @@ -71,8 +71,8 @@ } // end anonymous namespace char StackProtector::ID = 0; -static RegisterPass -X("stack-protector", "Insert stack protectors"); +INITIALIZE_PASS(StackProtector, "stack-protector", + "Insert stack protectors", false, false); FunctionPass *llvm::createStackProtectorPass(const TargetLowering *tli) { return new StackProtector(tli); Modified: llvm/trunk/lib/CodeGen/StackSlotColoring.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/StackSlotColoring.cpp?rev=109045&r1=109044&r2=109045&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/StackSlotColoring.cpp (original) +++ llvm/trunk/lib/CodeGen/StackSlotColoring.cpp Wed Jul 21 17:09:45 2010 @@ -146,8 +146,8 @@ char StackSlotColoring::ID = 0; -static RegisterPass -X("stack-slot-coloring", "Stack Slot Coloring"); +INITIALIZE_PASS(StackSlotColoring, "stack-slot-coloring", + "Stack Slot Coloring", false, false); FunctionPass *llvm::createStackSlotColoringPass(bool RegColor) { return new StackSlotColoring(RegColor); Modified: llvm/trunk/lib/CodeGen/UnreachableBlockElim.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/UnreachableBlockElim.cpp?rev=109045&r1=109044&r2=109045&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/UnreachableBlockElim.cpp (original) +++ llvm/trunk/lib/CodeGen/UnreachableBlockElim.cpp Wed Jul 21 17:09:45 2010 @@ -51,8 +51,8 @@ }; } char UnreachableBlockElim::ID = 0; -static RegisterPass -X("unreachableblockelim", "Remove unreachable blocks from the CFG"); +INITIALIZE_PASS(UnreachableBlockElim, "unreachableblockelim", + "Remove unreachable blocks from the CFG", false, false); FunctionPass *llvm::createUnreachableBlockEliminationPass() { return new UnreachableBlockElim(); Modified: llvm/trunk/lib/CodeGen/VirtRegMap.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/VirtRegMap.cpp?rev=109045&r1=109044&r2=109045&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/VirtRegMap.cpp (original) +++ llvm/trunk/lib/CodeGen/VirtRegMap.cpp Wed Jul 21 17:09:45 2010 @@ -48,8 +48,7 @@ char VirtRegMap::ID = 0; -static RegisterPass -X("virtregmap", "Virtual Register Map"); +INITIALIZE_PASS(VirtRegMap, "virtregmap", "Virtual Register Map", false, false); bool VirtRegMap::runOnMachineFunction(MachineFunction &mf) { MRI = &mf.getRegInfo(); Modified: llvm/trunk/lib/Target/TargetData.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/TargetData.cpp?rev=109045&r1=109044&r2=109045&view=diff ============================================================================== --- llvm/trunk/lib/Target/TargetData.cpp (original) +++ llvm/trunk/lib/Target/TargetData.cpp Wed Jul 21 17:09:45 2010 @@ -34,8 +34,7 @@ // Handle the Pass registration stuff necessary to use TargetData's. // Register the default SparcV9 implementation... -static RegisterPass X("targetdata", "Target Data Layout", false, - true); +INITIALIZE_PASS(TargetData, "targetdata", "Target Data Layout", false, true); char TargetData::ID = 0; //===----------------------------------------------------------------------===// Modified: llvm/trunk/lib/Transforms/Hello/Hello.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Hello/Hello.cpp?rev=109045&r1=109044&r2=109045&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Hello/Hello.cpp (original) +++ llvm/trunk/lib/Transforms/Hello/Hello.cpp Wed Jul 21 17:09:45 2010 @@ -37,7 +37,7 @@ } char Hello::ID = 0; -static RegisterPass X("hello", "Hello World Pass"); +INITIALIZE_PASS(Hello, "hello", "Hello World Pass", false, false); namespace { // Hello2 - The second implementation with getAnalysisUsage implemented. @@ -60,5 +60,6 @@ } char Hello2::ID = 0; -static RegisterPass -Y("hello2", "Hello World Pass (with getAnalysisUsage implemented)"); +INITIALIZE_PASS(Hello2, "hello2", + "Hello World Pass (with getAnalysisUsage implemented)", + false, false); Modified: llvm/trunk/lib/Transforms/IPO/ArgumentPromotion.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/ArgumentPromotion.cpp?rev=109045&r1=109044&r2=109045&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/IPO/ArgumentPromotion.cpp (original) +++ llvm/trunk/lib/Transforms/IPO/ArgumentPromotion.cpp Wed Jul 21 17:09:45 2010 @@ -84,8 +84,8 @@ } char ArgPromotion::ID = 0; -static RegisterPass -X("argpromotion", "Promote 'by reference' arguments to scalars"); +INITIALIZE_PASS(ArgPromotion, "argpromotion", + "Promote 'by reference' arguments to scalars", false, false); Pass *llvm::createArgumentPromotionPass(unsigned maxElements) { return new ArgPromotion(maxElements); Modified: llvm/trunk/lib/Transforms/IPO/ConstantMerge.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/ConstantMerge.cpp?rev=109045&r1=109044&r2=109045&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/IPO/ConstantMerge.cpp (original) +++ llvm/trunk/lib/Transforms/IPO/ConstantMerge.cpp Wed Jul 21 17:09:45 2010 @@ -41,8 +41,8 @@ } char ConstantMerge::ID = 0; -static RegisterPass -X("constmerge", "Merge Duplicate Global Constants"); +INITIALIZE_PASS(ConstantMerge, "constmerge", + "Merge Duplicate Global Constants", false, false); ModulePass *llvm::createConstantMergePass() { return new ConstantMerge(); } Modified: llvm/trunk/lib/Transforms/IPO/DeadArgumentElimination.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/DeadArgumentElimination.cpp?rev=109045&r1=109044&r2=109045&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/IPO/DeadArgumentElimination.cpp (original) +++ llvm/trunk/lib/Transforms/IPO/DeadArgumentElimination.cpp Wed Jul 21 17:09:45 2010 @@ -151,8 +151,7 @@ char DAE::ID = 0; -static RegisterPass -X("deadargelim", "Dead Argument Elimination"); +INITIALIZE_PASS(DAE, "deadargelim", "Dead Argument Elimination", false, false); namespace { /// DAH - DeadArgumentHacking pass - Same as dead argument elimination, but @@ -167,8 +166,9 @@ } char DAH::ID = 0; -static RegisterPass -Y("deadarghaX0r", "Dead Argument Hacking (BUGPOINT USE ONLY; DO NOT USE)"); +INITIALIZE_PASS(DAH, "deadarghaX0r", + "Dead Argument Hacking (BUGPOINT USE ONLY; DO NOT USE)", + false, false); /// createDeadArgEliminatio