From jlaskey at apple.com Mon Oct 31 06:49:28 2005 From: jlaskey at apple.com (Jim Laskey) Date: Mon, 31 Oct 2005 06:49:28 -0600 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp Message-ID: <200510311249.GAA02844@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/SelectionDAG: ScheduleDAG.cpp updated: 1.38 -> 1.39 --- Log message: 1. Embed and not inherit vector for NodeGroup. 2. Iterate operands and not uses (performance.) 3. Some long pending comment changes. --- Diffs of the changes: (+39 -20) ScheduleDAG.cpp | 59 +++++++++++++++++++++++++++++++++++++------------------- 1 files changed, 39 insertions(+), 20 deletions(-) Index: llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp diff -u llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp:1.38 llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp:1.39 --- llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp:1.38 Sun Oct 30 12:54:27 2005 +++ llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp Mon Oct 31 06:49:09 2005 @@ -2,7 +2,7 @@ // // The LLVM Compiler Infrastructure // -// This file was developed by Chris Lattner and is distributed under the +// This file was developed by James M. Laskey and is distributed under the // University of Illinois Open Source License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// @@ -192,15 +192,17 @@ // Forward class NodeInfo; -typedef std::vector NIVector; -typedef std::vector::iterator NIIterator; +typedef NodeInfo *NodeInfoPtr; +typedef std::vector NIVector; +typedef std::vector::iterator NIIterator; //===----------------------------------------------------------------------===// /// /// Node group - This struct is used to manage flagged node groups. /// -class NodeGroup : public NIVector { +class NodeGroup { private: + NIVector Members; // Group member nodes int Pending; // Number of visits pending before // adding to order @@ -209,10 +211,24 @@ NodeGroup() : Pending(0) {} // Accessors - inline NodeInfo *getLeader() { return empty() ? NULL : front(); } + inline NodeInfo *getLeader() { + return Members.empty() ? NULL : Members.front(); + } inline int getPending() const { return Pending; } inline void setPending(int P) { Pending = P; } inline int addPending(int I) { return Pending += I; } + + // Pass thru + inline bool group_empty() { return Members.empty(); } + inline NIIterator group_begin() { return Members.begin(); } + inline NIIterator group_end() { return Members.end(); } + inline void group_push_back(const NodeInfoPtr &NI) { Members.push_back(NI); } + inline NIIterator group_insert(NIIterator Pos, const NodeInfoPtr &NI) { + return Members.insert(Pos, NI); + } + inline void group_insert(NIIterator Pos, NIIterator First, NIIterator Last) { + Members.insert(Pos, First, Last); + } static void Add(NodeInfo *D, NodeInfo *U); static unsigned CountInternalUses(NodeInfo *D, NodeInfo *U); @@ -257,7 +273,7 @@ // Accessors inline bool isInGroup() const { - assert(!Group || !Group->empty() && "Group with no members"); + assert(!Group || !Group->group_empty() && "Group with no members"); return Group != NULL; } inline bool isGroupLeader() const { @@ -298,8 +314,8 @@ if (N->isInGroup()) { // get Group NodeGroup *Group = NI->Group; - NGI = Group->begin(); - NGE = Group->end(); + NGI = Group->group_begin(); + NGE = Group->group_end(); // Prevent this node from being used (will be in members list NI = NULL; } @@ -491,7 +507,8 @@ } } // Merge the two lists - DGroup->insert(DGroup->end(), UGroup->begin(), UGroup->end()); + DGroup->group_insert(DGroup->group_end(), + UGroup->group_begin(), UGroup->group_end()); } else if (DGroup) { // Make user member of definers group U->Group = DGroup; @@ -503,7 +520,7 @@ // Remove internal edges DGroup->addPending(-CountInternalUses(DNI, U)); } - DGroup->push_back(U); + DGroup->group_push_back(U); } else if (UGroup) { // Make definer member of users group D->Group = UGroup; @@ -515,13 +532,13 @@ // Remove internal edges UGroup->addPending(-CountInternalUses(D, UNI)); } - UGroup->insert(UGroup->begin(), D); + UGroup->group_insert(UGroup->group_begin(), D); } else { D->Group = U->Group = DGroup = new NodeGroup(); DGroup->addPending(D->Node->use_size() + U->Node->use_size() - CountInternalUses(D, U)); - DGroup->push_back(D); - DGroup->push_back(U); + DGroup->group_push_back(D); + DGroup->group_push_back(U); } } @@ -529,10 +546,11 @@ /// unsigned NodeGroup::CountInternalUses(NodeInfo *D, NodeInfo *U) { unsigned N = 0; - for (SDNode:: use_iterator UI = D->Node->use_begin(), - E = D->Node->use_end(); UI != E; UI++) { - if (*UI == U->Node) N++; + for (unsigned M = U->Node->getNumOperands(); 0 < M--;) { + SDOperand Op = U->Node->getOperand(M); + if (Op.Val == D->Node) N++; } + return N; } //===----------------------------------------------------------------------===// @@ -743,7 +761,7 @@ unsigned ResourceSet = 0; bool IsCall = false; - for (NIIterator NGI = Group->begin(), NGE = Group->end(); + for (NIIterator NGI = Group->group_begin(), NGE = Group->group_end(); NGI != NGE; NGI++) { NodeInfo* NGNI = *NGI; Latency += NGNI->Latency; @@ -798,7 +816,8 @@ } /// isWeakDependency Return true if node A produces a result that will -/// conflict with operands of B. +/// conflict with operands of B. It is assumed that we have called +/// isStrongDependency prior. bool SimpleSched::isWeakDependency(NodeInfo *A, NodeInfo *B) { // TODO check for conflicting real registers and aliases #if 0 // FIXME - Since we are in SSA form and not checking register aliasing @@ -1225,7 +1244,7 @@ std::cerr << "\n"; if (NI->isGroupLeader()) { NodeGroup *Group = NI->Group; - for (NIIterator NII = Group->begin(), E = Group->end(); + for (NIIterator NII = Group->group_begin(), E = Group->group_end(); NII != E; NII++) { std::cerr << " "; printSI(std::cerr, *NII); @@ -1269,7 +1288,7 @@ O << "\n"; if (NI->isGroupLeader()) { NodeGroup *Group = NI->Group; - for (NIIterator NII = Group->begin(), E = Group->end(); + for (NIIterator NII = Group->group_begin(), E = Group->group_end(); NII != E; NII++) { O << " "; printSI(O, *NII); From lattner at cs.uiuc.edu Mon Oct 31 10:16:00 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon, 31 Oct 2005 10:16:00 -0600 Subject: [llvm-commits] CVS: llvm/test/Regression/Archive/ranlib_GNU.ll ranlib_SVR4.ll ranlib_xpg4.ll Message-ID: <200510311616.KAA09778@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/Archive: ranlib_GNU.ll updated: 1.6 -> 1.7 ranlib_SVR4.ll updated: 1.6 -> 1.7 ranlib_xpg4.ll updated: 1.6 -> 1.7 --- Log message: these tests fail on alpha for some reason --- Diffs of the changes: (+6 -0) ranlib_GNU.ll | 2 ++ ranlib_SVR4.ll | 2 ++ ranlib_xpg4.ll | 2 ++ 3 files changed, 6 insertions(+) Index: llvm/test/Regression/Archive/ranlib_GNU.ll diff -u llvm/test/Regression/Archive/ranlib_GNU.ll:1.6 llvm/test/Regression/Archive/ranlib_GNU.ll:1.7 --- llvm/test/Regression/Archive/ranlib_GNU.ll:1.6 Sat Nov 27 00:44:10 2004 +++ llvm/test/Regression/Archive/ranlib_GNU.ll Mon Oct 31 10:15:49 2005 @@ -5,3 +5,5 @@ ;RUN: llvm-ranlib %t.GNU.a ;RUN: llvm-ar t %t.GNU.a > %t1 ;RUN: diff %t1 %p/GNU.toc + +; XFAIL: alpha Index: llvm/test/Regression/Archive/ranlib_SVR4.ll diff -u llvm/test/Regression/Archive/ranlib_SVR4.ll:1.6 llvm/test/Regression/Archive/ranlib_SVR4.ll:1.7 --- llvm/test/Regression/Archive/ranlib_SVR4.ll:1.6 Sat Nov 27 00:44:10 2004 +++ llvm/test/Regression/Archive/ranlib_SVR4.ll Mon Oct 31 10:15:49 2005 @@ -5,3 +5,5 @@ ;RUN: llvm-ranlib %t.SVR4.a ;RUN: llvm-ar t %t.SVR4.a > %t1 ;RUN: diff %t1 %p/SVR4.toc + +; XFAIL: alpha Index: llvm/test/Regression/Archive/ranlib_xpg4.ll diff -u llvm/test/Regression/Archive/ranlib_xpg4.ll:1.6 llvm/test/Regression/Archive/ranlib_xpg4.ll:1.7 --- llvm/test/Regression/Archive/ranlib_xpg4.ll:1.6 Sat Nov 27 00:44:10 2004 +++ llvm/test/Regression/Archive/ranlib_xpg4.ll Mon Oct 31 10:15:49 2005 @@ -5,3 +5,5 @@ ;RUN: llvm-ranlib %t.xpg4.a ;RUN: llvm-ar t %t.xpg4.a > %t1 ;RUN: diff %t1 %p/xpg4.toc + +; XFAIL: alpha From jlaskey at apple.com Mon Oct 31 11:16:12 2005 From: jlaskey at apple.com (Jim Laskey) Date: Mon, 31 Oct 2005 11:16:12 -0600 Subject: [llvm-commits] CVS: llvm/utils/TableGen/SubtargetEmitter.h SubtargetEmitter.cpp Message-ID: <200510311716.LAA10770@zion.cs.uiuc.edu> Changes in directory llvm/utils/TableGen: SubtargetEmitter.h updated: 1.5 -> 1.6 SubtargetEmitter.cpp updated: 1.11 -> 1.12 --- Log message: Generate cpu to itinerary map. --- Diffs of the changes: (+63 -8) SubtargetEmitter.cpp | 68 +++++++++++++++++++++++++++++++++++++++++++++------ SubtargetEmitter.h | 3 +- 2 files changed, 63 insertions(+), 8 deletions(-) Index: llvm/utils/TableGen/SubtargetEmitter.h diff -u llvm/utils/TableGen/SubtargetEmitter.h:1.5 llvm/utils/TableGen/SubtargetEmitter.h:1.6 --- llvm/utils/TableGen/SubtargetEmitter.h:1.5 Fri Oct 28 16:47:29 2005 +++ llvm/utils/TableGen/SubtargetEmitter.h Mon Oct 31 11:16:01 2005 @@ -38,8 +38,9 @@ void EmitStageData(std::ostream &OS, unsigned NItinClasses, std::map &ItinClassesMap, std::vector > &ProcList); - void EmitProcessData(std::ostream &OS, + void EmitProcessorData(std::ostream &OS, std::vector > &ProcList); + void EmitProcessorLookup(std::ostream &OS); void EmitData(std::ostream &OS); void ParseFeaturesFunction(std::ostream &OS); Index: llvm/utils/TableGen/SubtargetEmitter.cpp diff -u llvm/utils/TableGen/SubtargetEmitter.cpp:1.11 llvm/utils/TableGen/SubtargetEmitter.cpp:1.12 --- llvm/utils/TableGen/SubtargetEmitter.cpp:1.11 Fri Oct 28 17:49:02 2005 +++ llvm/utils/TableGen/SubtargetEmitter.cpp Mon Oct 31 11:16:01 2005 @@ -7,7 +7,8 @@ // //===----------------------------------------------------------------------===// // -// This tablegen backend emits subtarget enumerations. +// This tablegen backend emits subtarget enumerations. The format is in a state +// flux and will be tightened up when integration to scheduling is complete. // //===----------------------------------------------------------------------===// @@ -62,7 +63,7 @@ // If bit flags then emit expression (1 << i) if (isBits) OS << " = " << " 1 << " << i; - // Depending on if more in the list emit comma + // Depending on 'if more in the list' emit comma if (++i < N) OS << ","; OS << "\n"; @@ -102,7 +103,7 @@ << Name << " }"; - // Depending on if more in the list emit comma + // Depending on 'if more in the list' emit comma if (++i < N) OS << ","; OS << "\n"; @@ -158,7 +159,7 @@ OS << " }"; - // Depending on if more in the list emit comma + // Depending on 'if more in the list' emit comma if (++i < N) OS << ","; OS << "\n"; @@ -315,9 +316,9 @@ } // -// EmitProcessData - Generate data for processor itineraries. +// EmitProcessorData - Generate data for processor itineraries. // -void SubtargetEmitter::EmitProcessData(std::ostream &OS, +void SubtargetEmitter::EmitProcessorData(std::ostream &OS, std::vector > &ProcList) { // Get an iterator for processor itinerary stages std::vector >::iterator @@ -362,6 +363,54 @@ // End processor itinerary table OS << "};\n"; } + + OS << "\n"; + OS << "static llvm::InstrItinerary NoItineraries[] = {};\n"; +} + +// +// EmitProcessorLookup - generate cpu name to itinerary lookup table. +// +void SubtargetEmitter::EmitProcessorLookup(std::ostream &OS) { + // Gather and sort processor information + std::vector ProcessorList = + Records.getAllDerivedDefinitions("Processor"); + sort(ProcessorList.begin(), ProcessorList.end(), LessRecordFieldName()); + + // Begin processor table + OS << "\n"; + OS << "// Sorted (by key) array of itineraries for CPU subtype.\n" + << "static const llvm::SubtargetInfoKV SubTypeInfoKV[] = {\n"; + + // For each processor + for (unsigned i = 0, N = ProcessorList.size(); i < N;) { + // Next processor + Record *Processor = ProcessorList[i]; + + std::string Name = Processor->getValueAsString("Name"); + std::string ProcItin = Processor->getValueAsDef("ProcItin")->getName(); + + // Emit as { "cpu", procinit }, + OS << " { " + << "\"" << Name << "\", " + << "(void *)&" << ProcItin; + + OS << " }"; + + // Depending on ''if more in the list'' emit comma + if (++i < N) OS << ","; + + OS << "\n"; + } + + // End processor table + OS << "};\n"; + + // Emit size of table + OS<<"\nenum {\n"; + OS<<" SubTypeInfoKVSize = sizeof(SubTypeInfoKV)/" + "sizeof(llvm::SubtargetInfoKV)\n"; + OS<<"};\n"; } // @@ -376,7 +425,9 @@ // Emit the stage data EmitStageData(OS, NItinClasses, ItinClassesMap, ProcList); // Emit the processor itinerary data - EmitProcessData(OS, ProcList); + EmitProcessorData(OS, ProcList); + // Emit the processor lookup data + EmitProcessorLookup(OS); } // @@ -409,6 +460,9 @@ OS << " " << Attribute << " = (Bits & " << Instance << ") != 0;\n"; } + OS << "\n" + << " InstrItinerary *Itin = (InstrItinerary *)" + "Features.getInfo(SubTypeInfoKV, SubTypeInfoKVSize);\n"; OS << "}\n"; } From jlaskey at apple.com Mon Oct 31 11:16:57 2005 From: jlaskey at apple.com (Jim Laskey) Date: Mon, 31 Oct 2005 11:16:57 -0600 Subject: [llvm-commits] CVS: llvm/utils/TableGen/InstrInfoEmitter.cpp InstrInfoEmitter.h Message-ID: <200510311716.LAA10786@zion.cs.uiuc.edu> Changes in directory llvm/utils/TableGen: InstrInfoEmitter.cpp updated: 1.29 -> 1.30 InstrInfoEmitter.h updated: 1.11 -> 1.12 --- Log message: Emit itinerary class in instruction info. --- Diffs of the changes: (+39 -2) InstrInfoEmitter.cpp | 34 +++++++++++++++++++++++++++++++++- InstrInfoEmitter.h | 7 ++++++- 2 files changed, 39 insertions(+), 2 deletions(-) Index: llvm/utils/TableGen/InstrInfoEmitter.cpp diff -u llvm/utils/TableGen/InstrInfoEmitter.cpp:1.29 llvm/utils/TableGen/InstrInfoEmitter.cpp:1.30 --- llvm/utils/TableGen/InstrInfoEmitter.cpp:1.29 Fri Oct 28 17:59:53 2005 +++ llvm/utils/TableGen/InstrInfoEmitter.cpp Mon Oct 31 11:16:46 2005 @@ -76,6 +76,8 @@ // run - Emit the main instruction description records for the target... void InstrInfoEmitter::run(std::ostream &OS) { + GatherItinClasses(); + EmitSourceFileHeader("Target Instruction Descriptors", OS); OS << "namespace llvm {\n\n"; @@ -168,7 +170,13 @@ OS << Inst.TheDef->getName(); else OS << Inst.Name; - OS << "\",\t" << NumOperands << ", -1, 0, false, 0, 0, 0, 0"; + + unsigned ItinClass = !IsItineraries ? 0 : + ItinClassNumber(Inst.TheDef->getValueAsDef("Itinerary")->getName()); + + OS << "\",\t" << NumOperands << ", -1, 0, false, 0, 0, " + << ItinClass + << ", 0"; // Emit all of the target indepedent flags... if (Inst.isReturn) OS << "|M_RET_FLAG"; @@ -222,6 +230,30 @@ OS << " }, // Inst #" << Num << " = " << Inst.TheDef->getName() << "\n"; } +struct LessRecord { + bool operator()(const Record *Rec1, const Record *Rec2) const { + return Rec1->getName() < Rec2->getName(); + } +}; +void InstrInfoEmitter::GatherItinClasses() { + std::vector DefList = + Records.getAllDerivedDefinitions("InstrItinClass"); + IsItineraries = !DefList.empty(); + + if (!IsItineraries) return; + + sort(DefList.begin(), DefList.end(), LessRecord()); + + for (unsigned i = 0, N = DefList.size(); i < N; i++) { + Record *Def = DefList[i]; + ItinClassMap[Def->getName()] = i + 1; + } +} + +unsigned InstrInfoEmitter::ItinClassNumber(std::string ItinName) { + return ItinClassMap[ItinName]; +} + void InstrInfoEmitter::emitShiftedValue(Record *R, StringInit *Val, IntInit *ShiftInt, std::ostream &OS) { if (Val == 0 || ShiftInt == 0) Index: llvm/utils/TableGen/InstrInfoEmitter.h diff -u llvm/utils/TableGen/InstrInfoEmitter.h:1.11 llvm/utils/TableGen/InstrInfoEmitter.h:1.12 --- llvm/utils/TableGen/InstrInfoEmitter.h:1.11 Fri Oct 28 17:59:53 2005 +++ llvm/utils/TableGen/InstrInfoEmitter.h Mon Oct 31 11:16:46 2005 @@ -28,8 +28,11 @@ class InstrInfoEmitter : public TableGenBackend { RecordKeeper &Records; + bool IsItineraries; + std::map ItinClassMap; + public: - InstrInfoEmitter(RecordKeeper &R) : Records(R) {} + InstrInfoEmitter(RecordKeeper &R) : Records(R), IsItineraries(false) {} // run - Output the instruction set description, returning true on failure. void run(std::ostream &OS); @@ -44,6 +47,8 @@ std::map, unsigned> &EL, std::map, unsigned> &OpInfo, std::ostream &OS); + void GatherItinClasses(); + unsigned ItinClassNumber(std::string ItinName); void emitShiftedValue(Record *R, StringInit *Val, IntInit *Shift, std::ostream &OS); }; From lattner at cs.uiuc.edu Mon Oct 31 12:36:03 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon, 31 Oct 2005 12:36:03 -0600 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp Message-ID: <200510311836.MAA11271@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: InstructionCombining.cpp updated: 1.401 -> 1.402 --- Log message: Limit the search depth of MaskedValueIsZero to 6 instructions, to avoid bad cases. This fixes Markus's second testcase in PR639: http://llvm.cs.uiuc.edu/PR639 , and should seal it for good. --- Diffs of the changes: (+14 -10) InstructionCombining.cpp | 24 ++++++++++++++---------- 1 files changed, 14 insertions(+), 10 deletions(-) Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.401 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.402 --- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.401 Fri Oct 28 23:36:15 2005 +++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp Mon Oct 31 12:35:52 2005 @@ -389,7 +389,8 @@ /// MaskedValueIsZero - Return true if 'V & Mask' is known to be zero. We use /// this predicate to simplify operations downstream. V and Mask are known to /// be the same type. -static bool MaskedValueIsZero(Value *V, ConstantIntegral *Mask) { +static bool MaskedValueIsZero(Value *V, ConstantIntegral *Mask, + unsigned Depth = 0) { // Note, we cannot consider 'undef' to be "IsZero" here. The problem is that // we cannot optimize based on the assumption that it is zero without changing // to to an explicit zero. If we don't change it to zero, other code could @@ -400,6 +401,8 @@ return true; if (ConstantIntegral *CI = dyn_cast(V)) return ConstantExpr::getAnd(CI, Mask)->isNullValue(); + + if (Depth == 6) return false; // Limit search depth. if (Instruction *I = dyn_cast(V)) { switch (I->getOpcode()) { @@ -408,21 +411,21 @@ if (ConstantIntegral *CI = dyn_cast(I->getOperand(1))) { ConstantIntegral *C1C2 = cast(ConstantExpr::getAnd(CI, Mask)); - if (MaskedValueIsZero(I->getOperand(0), C1C2)) + if (MaskedValueIsZero(I->getOperand(0), C1C2, Depth+1)) return true; } // If either the LHS or the RHS are MaskedValueIsZero, the result is zero. - return MaskedValueIsZero(I->getOperand(1), Mask) || - MaskedValueIsZero(I->getOperand(0), Mask); + return MaskedValueIsZero(I->getOperand(1), Mask, Depth+1) || + MaskedValueIsZero(I->getOperand(0), Mask, Depth+1); case Instruction::Or: case Instruction::Xor: // If the LHS and the RHS are MaskedValueIsZero, the result is also zero. - return MaskedValueIsZero(I->getOperand(1), Mask) && - MaskedValueIsZero(I->getOperand(0), Mask); + return MaskedValueIsZero(I->getOperand(1), Mask, Depth+1) && + MaskedValueIsZero(I->getOperand(0), Mask, Depth+1); case Instruction::Select: // If the T and F values are MaskedValueIsZero, the result is also zero. - return MaskedValueIsZero(I->getOperand(2), Mask) && - MaskedValueIsZero(I->getOperand(1), Mask); + return MaskedValueIsZero(I->getOperand(2), Mask, Depth+1) && + MaskedValueIsZero(I->getOperand(1), Mask, Depth+1); case Instruction::Cast: { const Type *SrcTy = I->getOperand(0)->getType(); if (SrcTy == Type::BoolTy) @@ -440,7 +443,7 @@ Constant *NewMask = ConstantExpr::getCast(Mask, I->getOperand(0)->getType()); return MaskedValueIsZero(I->getOperand(0), - cast(NewMask)); + cast(NewMask), Depth+1); } } break; @@ -449,7 +452,8 @@ // (shl X, C1) & C2 == 0 iff (X & C2 >>u C1) == 0 if (ConstantUInt *SA = dyn_cast(I->getOperand(1))) return MaskedValueIsZero(I->getOperand(0), - cast(ConstantExpr::getUShr(Mask, SA))); + cast(ConstantExpr::getUShr(Mask, SA)), + Depth+1); break; case Instruction::Shr: // (ushr X, C1) & C2 == 0 iff (-1 >> C1) & C2 == 0 From lattner at cs.uiuc.edu Mon Oct 31 12:42:48 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon, 31 Oct 2005 12:42:48 -0600 Subject: [llvm-commits] CVS: llvm/lib/VMCore/SymbolTable.cpp Message-ID: <200510311842.MAA11351@zion.cs.uiuc.edu> Changes in directory llvm/lib/VMCore: SymbolTable.cpp updated: 1.59 -> 1.60 --- Log message: Fix an iterator invalidation problem in code used by the -strip pass --- Diffs of the changes: (+1 -1) SymbolTable.cpp | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/lib/VMCore/SymbolTable.cpp diff -u llvm/lib/VMCore/SymbolTable.cpp:1.59 llvm/lib/VMCore/SymbolTable.cpp:1.60 --- llvm/lib/VMCore/SymbolTable.cpp:1.59 Thu Apr 21 18:46:51 2005 +++ llvm/lib/VMCore/SymbolTable.cpp Mon Oct 31 12:42:37 2005 @@ -269,12 +269,12 @@ value_iterator B = Plane.begin(), Bend = Plane.end(); while (B != Bend) { // Found nonempty type plane! Value *V = B->second; + ++B; if (!isa(V) || cast(V)->hasInternalLinkage()) { // Set name to "", removing from symbol table! V->setName(""); RemovedSymbol = true; } - ++B; } } From alenhar2 at cs.uiuc.edu Mon Oct 31 13:06:44 2005 From: alenhar2 at cs.uiuc.edu (Andrew Lenharth) Date: Mon, 31 Oct 2005 13:06:44 -0600 Subject: [llvm-commits] XFail on alpha In-Reply-To: <200510311800.j9VI0Gti003617@dcs-maillist.cs.uiuc.edu> References: <200510311800.j9VI0Gti003617@dcs-maillist.cs.uiuc.edu> Message-ID: <1130785604.20880.1.camel@localhost.localdomain> > Changes in directory llvm/test/Regression/Archive: > > ranlib_GNU.ll updated: 1.6 -> 1.7 > ranlib_SVR4.ll updated: 1.6 -> 1.7 > ranlib_xpg4.ll updated: 1.6 -> 1.7 > --- > Log message: > > these tests fail on alpha for some reason These only fail on old gcc/ld versions. They pass on both of my more up to date testers. > --- > Diffs of the changes: (+6 -0) > > ranlib_GNU.ll | 2 ++ > ranlib_SVR4.ll | 2 ++ > ranlib_xpg4.ll | 2 ++ > 3 files changed, 6 insertions(+) > > > Index: llvm/test/Regression/Archive/ranlib_GNU.ll > diff -u llvm/test/Regression/Archive/ranlib_GNU.ll:1.6 llvm/test/Regression/Archive/ranlib_GNU.ll:1.7 > --- llvm/test/Regression/Archive/ranlib_GNU.ll:1.6 Sat Nov 27 00:44:10 2004 > +++ llvm/test/Regression/Archive/ranlib_GNU.ll Mon Oct 31 10:15:49 2005 > @@ -5,3 +5,5 @@ > ;RUN: llvm-ranlib %t.GNU.a > ;RUN: llvm-ar t %t.GNU.a > %t1 > ;RUN: diff %t1 %p/GNU.toc > + > +; XFAIL: alpha > > > Index: llvm/test/Regression/Archive/ranlib_SVR4.ll > diff -u llvm/test/Regression/Archive/ranlib_SVR4.ll:1.6 llvm/test/Regression/Archive/ranlib_SVR4.ll:1.7 > --- llvm/test/Regression/Archive/ranlib_SVR4.ll:1.6 Sat Nov 27 00:44:10 2004 > +++ llvm/test/Regression/Archive/ranlib_SVR4.ll Mon Oct 31 10:15:49 2005 > @@ -5,3 +5,5 @@ > ;RUN: llvm-ranlib %t.SVR4.a > ;RUN: llvm-ar t %t.SVR4.a > %t1 > ;RUN: diff %t1 %p/SVR4.toc > + > +; XFAIL: alpha > > > Index: llvm/test/Regression/Archive/ranlib_xpg4.ll > diff -u llvm/test/Regression/Archive/ranlib_xpg4.ll:1.6 llvm/test/Regression/Archive/ranlib_xpg4.ll:1.7 > --- llvm/test/Regression/Archive/ranlib_xpg4.ll:1.6 Sat Nov 27 00:44:10 2004 > +++ llvm/test/Regression/Archive/ranlib_xpg4.ll Mon Oct 31 10:15:49 2005 > @@ -5,3 +5,5 @@ > ;RUN: llvm-ranlib %t.xpg4.a > ;RUN: llvm-ar t %t.xpg4.a > %t1 > ;RUN: diff %t1 %p/xpg4.toc > + > +; XFAIL: alpha > -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20051031/12c86783/attachment.bin From sabre at nondot.org Mon Oct 31 13:05:32 2005 From: sabre at nondot.org (Chris Lattner) Date: Mon, 31 Oct 2005 13:05:32 -0600 (CST) Subject: [llvm-commits] XFail on alpha In-Reply-To: <1130785604.20880.1.camel@localhost.localdomain> References: <200510311800.j9VI0Gti003617@dcs-maillist.cs.uiuc.edu> <1130785604.20880.1.camel@localhost.localdomain> Message-ID: On Mon, 31 Oct 2005, Andrew Lenharth wrote: >> Changes in directory llvm/test/Regression/Archive: >> these tests fail on alpha for some reason > > These only fail on old gcc/ld versions. They pass on both of my more up > to date testers. Ok. Will revert. -chris >> --- >> Diffs of the changes: (+6 -0) >> >> ranlib_GNU.ll | 2 ++ >> ranlib_SVR4.ll | 2 ++ >> ranlib_xpg4.ll | 2 ++ >> 3 files changed, 6 insertions(+) >> >> >> Index: llvm/test/Regression/Archive/ranlib_GNU.ll >> diff -u llvm/test/Regression/Archive/ranlib_GNU.ll:1.6 llvm/test/Regression/Archive/ranlib_GNU.ll:1.7 >> --- llvm/test/Regression/Archive/ranlib_GNU.ll:1.6 Sat Nov 27 00:44:10 2004 >> +++ llvm/test/Regression/Archive/ranlib_GNU.ll Mon Oct 31 10:15:49 2005 >> @@ -5,3 +5,5 @@ >> ;RUN: llvm-ranlib %t.GNU.a >> ;RUN: llvm-ar t %t.GNU.a > %t1 >> ;RUN: diff %t1 %p/GNU.toc >> + >> +; XFAIL: alpha >> >> >> Index: llvm/test/Regression/Archive/ranlib_SVR4.ll >> diff -u llvm/test/Regression/Archive/ranlib_SVR4.ll:1.6 llvm/test/Regression/Archive/ranlib_SVR4.ll:1.7 >> --- llvm/test/Regression/Archive/ranlib_SVR4.ll:1.6 Sat Nov 27 00:44:10 2004 >> +++ llvm/test/Regression/Archive/ranlib_SVR4.ll Mon Oct 31 10:15:49 2005 >> @@ -5,3 +5,5 @@ >> ;RUN: llvm-ranlib %t.SVR4.a >> ;RUN: llvm-ar t %t.SVR4.a > %t1 >> ;RUN: diff %t1 %p/SVR4.toc >> + >> +; XFAIL: alpha >> >> >> Index: llvm/test/Regression/Archive/ranlib_xpg4.ll >> diff -u llvm/test/Regression/Archive/ranlib_xpg4.ll:1.6 llvm/test/Regression/Archive/ranlib_xpg4.ll:1.7 >> --- llvm/test/Regression/Archive/ranlib_xpg4.ll:1.6 Sat Nov 27 00:44:10 2004 >> +++ llvm/test/Regression/Archive/ranlib_xpg4.ll Mon Oct 31 10:15:49 2005 >> @@ -5,3 +5,5 @@ >> ;RUN: llvm-ranlib %t.xpg4.a >> ;RUN: llvm-ar t %t.xpg4.a > %t1 >> ;RUN: diff %t1 %p/xpg4.toc >> + >> +; XFAIL: alpha >> > > -Chris -- http://nondot.org/sabre/ http://llvm.org/ From lattner at cs.uiuc.edu Mon Oct 31 13:06:24 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon, 31 Oct 2005 13:06:24 -0600 Subject: [llvm-commits] CVS: llvm/test/Regression/Archive/ranlib_GNU.ll ranlib_SVR4.ll ranlib_xpg4.ll Message-ID: <200510311906.NAA18355@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/Archive: ranlib_GNU.ll updated: 1.7 -> 1.8 ranlib_SVR4.ll updated: 1.7 -> 1.8 ranlib_xpg4.ll updated: 1.7 -> 1.8 --- Log message: Apparently these do pass on some alphas --- Diffs of the changes: (+0 -3) ranlib_GNU.ll | 1 - ranlib_SVR4.ll | 1 - ranlib_xpg4.ll | 1 - 3 files changed, 3 deletions(-) Index: llvm/test/Regression/Archive/ranlib_GNU.ll diff -u llvm/test/Regression/Archive/ranlib_GNU.ll:1.7 llvm/test/Regression/Archive/ranlib_GNU.ll:1.8 --- llvm/test/Regression/Archive/ranlib_GNU.ll:1.7 Mon Oct 31 10:15:49 2005 +++ llvm/test/Regression/Archive/ranlib_GNU.ll Mon Oct 31 13:06:13 2005 @@ -6,4 +6,3 @@ ;RUN: llvm-ar t %t.GNU.a > %t1 ;RUN: diff %t1 %p/GNU.toc -; XFAIL: alpha Index: llvm/test/Regression/Archive/ranlib_SVR4.ll diff -u llvm/test/Regression/Archive/ranlib_SVR4.ll:1.7 llvm/test/Regression/Archive/ranlib_SVR4.ll:1.8 --- llvm/test/Regression/Archive/ranlib_SVR4.ll:1.7 Mon Oct 31 10:15:49 2005 +++ llvm/test/Regression/Archive/ranlib_SVR4.ll Mon Oct 31 13:06:13 2005 @@ -6,4 +6,3 @@ ;RUN: llvm-ar t %t.SVR4.a > %t1 ;RUN: diff %t1 %p/SVR4.toc -; XFAIL: alpha Index: llvm/test/Regression/Archive/ranlib_xpg4.ll diff -u llvm/test/Regression/Archive/ranlib_xpg4.ll:1.7 llvm/test/Regression/Archive/ranlib_xpg4.ll:1.8 --- llvm/test/Regression/Archive/ranlib_xpg4.ll:1.7 Mon Oct 31 10:15:49 2005 +++ llvm/test/Regression/Archive/ranlib_xpg4.ll Mon Oct 31 13:06:13 2005 @@ -6,4 +6,3 @@ ;RUN: llvm-ar t %t.xpg4.a > %t1 ;RUN: diff %t1 %p/xpg4.toc -; XFAIL: alpha From alenhar2 at cs.uiuc.edu Mon Oct 31 13:07:41 2005 From: alenhar2 at cs.uiuc.edu (Andrew Lenharth) Date: Mon, 31 Oct 2005 13:07:41 -0600 Subject: [llvm-commits] CVS: llvm/docs/ReleaseNotes.html Message-ID: <200510311907.NAA18383@zion.cs.uiuc.edu> Changes in directory llvm/docs: ReleaseNotes.html updated: 1.339 -> 1.340 --- Log message: Updated alpha known problems. --- Diffs of the changes: (+1 -3) ReleaseNotes.html | 4 +--- 1 files changed, 1 insertion(+), 3 deletions(-) Index: llvm/docs/ReleaseNotes.html diff -u llvm/docs/ReleaseNotes.html:1.339 llvm/docs/ReleaseNotes.html:1.340 --- llvm/docs/ReleaseNotes.html:1.339 Sat Oct 29 02:08:19 2005 +++ llvm/docs/ReleaseNotes.html Mon Oct 31 13:07:29 2005 @@ -635,8 +635,6 @@
  • On 21164s, some rare FP arithmetic sequences which may trap do not have the appropriate nops inserted to ensure restartability.
  • -
  • Due to the vararg problems, C++ exceptions do not work. Small changes are required to the CFE (which break correctness in the exception handler) to compile the exception handling library (and thus the C++ standard library).
  • - @@ -717,7 +715,7 @@ src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01!" /> The LLVM Compiler Infrastructure
    - Last modified: $Date: 2005/10/29 07:08:19 $ + Last modified: $Date: 2005/10/31 19:07:29 $ From alenhar2 at cs.uiuc.edu Mon Oct 31 15:18:42 2005 From: alenhar2 at cs.uiuc.edu (Andrew Lenharth) Date: Mon, 31 Oct 2005 15:18:42 -0600 Subject: [llvm-commits] CVS: llvm-test/Makefile.programs Message-ID: <200510312118.PAA21260@zion.cs.uiuc.edu> Changes in directory llvm-test: Makefile.programs updated: 1.175 -> 1.176 --- Log message: issolate LSR on alpha-beta --- Diffs of the changes: (+2 -2) Makefile.programs | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm-test/Makefile.programs diff -u llvm-test/Makefile.programs:1.175 llvm-test/Makefile.programs:1.176 --- llvm-test/Makefile.programs:1.175 Fri Oct 28 13:23:28 2005 +++ llvm-test/Makefile.programs Mon Oct 31 15:18:30 2005 @@ -190,8 +190,8 @@ LLCBETAOPTION := -sched=simple endif ifeq ($(ARCH),Alpha) -LLCBETAOPTION := -enable-alpha-FTOI -enable-lsr-for-alpha -#-enable-alpha-intfpdiv +LLCBETAOPTION := -enable-lsr-for-alpha +#-enable-alpha-intfpdiv -enable-alpha-FTOI endif ifeq ($(ARCH),IA64) LLCBETAOPTION := -enable-ia64-dag-isel From lattner at cs.uiuc.edu Mon Oct 31 16:12:17 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon, 31 Oct 2005 16:12:17 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp Message-ID: <200510312212.QAA32566@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/PowerPC: PPCAsmPrinter.cpp updated: 1.101 -> 1.102 --- Log message: Make constant pool entries use private labels. This is important when you're not compiling a whole program at a time :) --- Diffs of the changes: (+3 -3) PPCAsmPrinter.cpp | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) Index: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp diff -u llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.101 llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.102 --- llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.101 Fri Oct 28 13:44:07 2005 +++ llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp Mon Oct 31 16:12:06 2005 @@ -294,7 +294,7 @@ } case MachineOperand::MO_ConstantPoolIndex: - O << ".CPI" << CurrentFnName << "_" << MO.getConstantPoolIndex(); + O << "LCPI" << CurrentFnName << "_" << MO.getConstantPoolIndex(); return; case MachineOperand::MO_ExternalSymbol: @@ -436,7 +436,7 @@ emitAlignment(3); else emitAlignment(TD.getTypeAlignmentShift(CP[i]->getType())); - O << ".CPI" << CurrentFnName << "_" << i << ":\t\t\t\t\t" << CommentString + O << "LCPI" << CurrentFnName << "_" << i << ":\t\t\t\t\t" << CommentString << *CP[i] << "\n"; emitGlobalConstant(CP[i]); } @@ -633,7 +633,7 @@ O << "\t.const\n"; O << "\t.align " << (unsigned)TD.getTypeAlignment(CP[i]->getType()) << "\n"; - O << ".CPI" << CurrentFnName << "_" << i << ":\t\t\t\t\t;" + O << "LCPI" << CurrentFnName << "_" << i << ":\t\t\t\t\t;" << *CP[i] << "\n"; emitGlobalConstant(CP[i]); } From lattner at cs.uiuc.edu Mon Oct 31 18:12:47 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon, 31 Oct 2005 18:12:47 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp Message-ID: <200511010012.SAA00733@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/PowerPC: PPCAsmPrinter.cpp updated: 1.102 -> 1.103 --- Log message: Add a flag to enable a darwin linker optimization --- Diffs of the changes: (+7 -1) PPCAsmPrinter.cpp | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletion(-) Index: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp diff -u llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.102 llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.103 --- llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.102 Mon Oct 31 16:12:06 2005 +++ llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp Mon Oct 31 18:12:36 2005 @@ -567,6 +567,13 @@ << "\t.long\t" << *i << '\n'; } + // 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. + O << "\t.subsections_via_symbols\n"; + AsmPrinter::doFinalization(M); return false; // success } @@ -711,7 +718,6 @@ O << "_section_.text:\n" << "\t.csect .data[RW],3\n" << "\t.llong _section_.text\n"; - delete Mang; return false; // success } From duraid at octopus.com.au Mon Oct 31 19:30:06 2005 From: duraid at octopus.com.au (Duraid Madina) Date: Mon, 31 Oct 2005 19:30:06 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/IA64/IA64InstrInfo.td Message-ID: <200511010130.TAA01126@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/IA64: IA64InstrInfo.td updated: 1.20 -> 1.21 --- Log message: add zeroextend predicate->integer --- Diffs of the changes: (+42 -37) IA64InstrInfo.td | 79 +++++++++++++++++++++++++++++-------------------------- 1 files changed, 42 insertions(+), 37 deletions(-) Index: llvm/lib/Target/IA64/IA64InstrInfo.td diff -u llvm/lib/Target/IA64/IA64InstrInfo.td:1.20 llvm/lib/Target/IA64/IA64InstrInfo.td:1.21 --- llvm/lib/Target/IA64/IA64InstrInfo.td:1.20 Sun Oct 30 19:42:11 2005 +++ llvm/lib/Target/IA64/IA64InstrInfo.td Mon Oct 31 19:29:55 2005 @@ -93,6 +93,48 @@ return true; }]>; +def ADD : AForm_DAG<0x03, 0x0b, (ops GR:$dst, GR:$src1, GR:$src2), + "add $dst = $src1, $src2;;", + [(set GR:$dst, (add GR:$src1, GR:$src2))]>; + +def ADD1 : AForm_DAG<0x03, 0x0b, (ops GR:$dst, GR:$src1, GR:$src2), + "add $dst = $src1, $src2, 1;;", + [(set GR:$dst, (add (add GR:$src1, GR:$src2), 1))]>; + +def ADDS : AForm_DAG<0x03, 0x0b, (ops GR:$dst, GR:$src1, s14imm:$imm), + "adds $dst = $imm, $src1;;", + [(set GR:$dst, (add GR:$src1, immSExt14:$imm))]>; + +def MOVL : AForm_DAG<0x03, 0x0b, (ops GR:$dst, s64imm:$imm), + "movl $dst = $imm;;", + [(set GR:$dst, imm64:$imm)]>; + +def ADDL_GA : AForm_DAG<0x03, 0x0b, (ops GR:$dst, GR:$src1, globaladdress:$imm), + "addl $dst = $imm, $src1;;", + []>; + +def SUB : AForm_DAG<0x03, 0x0b, (ops GR:$dst, GR:$src1, GR:$src2), + "sub $dst = $src1, $src2;;", + [(set GR:$dst, (sub GR:$src1, GR:$src2))]>; + +def SUB1 : AForm_DAG<0x03, 0x0b, (ops GR:$dst, GR:$src1, GR:$src2), + "sub $dst = $src1, $src2, 1;;", + [(set GR:$dst, (add (sub GR: $src1, GR:$src2), -1))]>; + +let isTwoAddress = 1 in { +def TPCADDIMM22 : AForm<0x03, 0x0b, + (ops GR:$dst, GR:$src1, s22imm:$imm, PR:$qp), + "($qp) add $dst = $imm, $dst;;">; +def TPCMPIMM8NE : AForm<0x03, 0x0b, + (ops PR:$dst, PR:$src1, s22imm:$imm, GR:$src2, PR:$qp), + "($qp) cmp.ne $dst , p0 = $imm, $src2;;">; +} + +// zero extend a bool (predicate reg) into an integer reg +def ZXTb : Pat<(zext PR:$src), + (TPCADDIMM22 (ADDS r0, 0), 1, PR:$src)>; + +// normal sign/zero-extends def SXT1 : AForm_DAG<0x03, 0x0b, (ops GR:$dst, GR:$src), "sxt1 $dst = $src;;", [(set GR:$dst, (sext_inreg GR:$src, i8))]>; def ZXT1 : AForm_DAG<0x03, 0x0b, (ops GR:$dst, GR:$src), "zxt1 $dst = $src;;", @@ -137,34 +179,6 @@ [(set GR:$dst, (or (and (shl GR:$src1, 32), isMIX4Rable), (and GR:$src2, isMIX4Rable)))]>; -def ADD : AForm_DAG<0x03, 0x0b, (ops GR:$dst, GR:$src1, GR:$src2), - "add $dst = $src1, $src2;;", - [(set GR:$dst, (add GR:$src1, GR:$src2))]>; - -def ADD1 : AForm_DAG<0x03, 0x0b, (ops GR:$dst, GR:$src1, GR:$src2), - "add $dst = $src1, $src2, 1;;", - [(set GR:$dst, (add (add GR:$src1, GR:$src2), 1))]>; - -def ADDS : AForm_DAG<0x03, 0x0b, (ops GR:$dst, GR:$src1, s14imm:$imm), - "adds $dst = $imm, $src1;;", - [(set GR:$dst, (add GR:$src1, immSExt14:$imm))]>; - -def MOVL : AForm_DAG<0x03, 0x0b, (ops GR:$dst, s64imm:$imm), - "movl $dst = $imm;;", - [(set GR:$dst, imm64:$imm)]>; - -def ADDL_GA : AForm_DAG<0x03, 0x0b, (ops GR:$dst, GR:$src1, globaladdress:$imm), - "addl $dst = $imm, $src1;;", - []>; - -def SUB : AForm_DAG<0x03, 0x0b, (ops GR:$dst, GR:$src1, GR:$src2), - "sub $dst = $src1, $src2;;", - [(set GR:$dst, (sub GR:$src1, GR:$src2))]>; - -def SUB1 : AForm_DAG<0x03, 0x0b, (ops GR:$dst, GR:$src1, GR:$src2), - "sub $dst = $src1, $src2, 1;;", - [(set GR:$dst, (add (sub GR: $src1, GR:$src2), -1))]>; - def GETFSIGD : AForm_DAG<0x03, 0x0b, (ops GR:$dst, FP:$src), "getf.sig $dst = $src;;", []>; @@ -424,15 +438,6 @@ def CADDIMM22 : AForm<0x03, 0x0b, (ops GR:$dst, GR:$src1, s22imm:$imm, PR:$qp), "($qp) add $dst = $imm, $src1;;">; -let isTwoAddress = 1 in { -def TPCADDIMM22 : AForm<0x03, 0x0b, - (ops GR:$dst, GR:$src1, s22imm:$imm, PR:$qp), - "($qp) add $dst = $imm, $dst;;">; -def TPCMPIMM8NE : AForm<0x03, 0x0b, - (ops PR:$dst, PR:$src1, s22imm:$imm, GR:$src2, PR:$qp), - "($qp) cmp.ne $dst , p0 = $imm, $src2;;">; -} - def SUBIMM8 : AForm<0x03, 0x0b, (ops GR:$dst, s8imm:$imm, GR:$src2), "sub $dst = $imm, $src2;;">; From duraid at octopus.com.au Mon Oct 31 21:07:36 2005 From: duraid at octopus.com.au (Duraid Madina) Date: Mon, 31 Oct 2005 21:07:36 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/TargetSelectionDAG.td Message-ID: <200511010307.VAA01641@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target: TargetSelectionDAG.td updated: 1.7 -> 1.8 --- Log message: add support for int->FP and FP->int ops, and add ia64 patterns for these --- Diffs of the changes: (+11 -0) TargetSelectionDAG.td | 11 +++++++++++ 1 files changed, 11 insertions(+) Index: llvm/lib/Target/TargetSelectionDAG.td diff -u llvm/lib/Target/TargetSelectionDAG.td:1.7 llvm/lib/Target/TargetSelectionDAG.td:1.8 --- llvm/lib/Target/TargetSelectionDAG.td:1.7 Wed Oct 26 12:00:25 2005 +++ llvm/lib/Target/TargetSelectionDAG.td Mon Oct 31 21:07:25 2005 @@ -94,6 +94,12 @@ def SDTFPExtendOp : SDTypeProfile<1, 1, [ // fextend SDTCisFP<0>, SDTCisFP<1>, SDTCisOpSmallerThanOp<1, 0> ]>; +def SDTIntToFPOp : SDTypeProfile<1, 1, [ // [su]int_to_fp + SDTCisFP<0>, SDTCisInt<1> +]>; +def SDTFPToIntOp : SDTypeProfile<1, 1, [ // fp_to_[su]int + SDTCisInt<0>, SDTCisFP<1> +]>; def SDTExtInreg : SDTypeProfile<1, 2, [ // sext_inreg SDTCisSameAs<0, 1>, SDTCisInt<0>, SDTCisVT<2, OtherVT>, SDTCisVTSmallerThanOp<2, 1> @@ -172,6 +178,11 @@ def fround : SDNode<"ISD::FP_ROUND" , SDTFPRoundOp>; def fextend : SDNode<"ISD::FP_EXTEND" , SDTFPExtendOp>; +def sint_to_fp : SDNode<"ISD::SINT_TO_FP" , SDTIntToFPOp>; +def uint_to_fp : SDNode<"ISD::UINT_TO_FP" , SDTIntToFPOp>; +def fp_to_sint : SDNode<"ISD::FP_TO_SINT" , SDTFPToIntOp>; +def fp_to_uint : SDNode<"ISD::FP_TO_UINT" , SDTFPToIntOp>; + def setcc : SDNode<"ISD::SETCC" , SDTSetCC>; //===----------------------------------------------------------------------===// From duraid at octopus.com.au Mon Oct 31 21:07:37 2005 From: duraid at octopus.com.au (Duraid Madina) Date: Mon, 31 Oct 2005 21:07:37 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/IA64/IA64InstrInfo.td Message-ID: <200511010307.VAA01645@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/IA64: IA64InstrInfo.td updated: 1.21 -> 1.22 --- Log message: add support for int->FP and FP->int ops, and add ia64 patterns for these --- Diffs of the changes: (+12 -0) IA64InstrInfo.td | 12 ++++++++++++ 1 files changed, 12 insertions(+) Index: llvm/lib/Target/IA64/IA64InstrInfo.td diff -u llvm/lib/Target/IA64/IA64InstrInfo.td:1.21 llvm/lib/Target/IA64/IA64InstrInfo.td:1.22 --- llvm/lib/Target/IA64/IA64InstrInfo.td:1.21 Mon Oct 31 19:29:55 2005 +++ llvm/lib/Target/IA64/IA64InstrInfo.td Mon Oct 31 21:07:25 2005 @@ -553,6 +553,18 @@ def SETFSIG : AForm<0x03, 0x0b, (ops FP:$dst, GR:$src), "setf.sig $dst = $src;;">; +// these four FP<->int conversion patterns need checking/cleaning +def SINT_TO_FP : Pat<(sint_to_fp GR:$src), + (FNORMD (FCVTXF (SETFSIG GR:$src)))>; +def UINT_TO_FP : Pat<(uint_to_fp GR:$src), + (FNORMD (FCVTXUF (SETFSIG GR:$src)))>; +/* FIXME: tablegen coughs on these +def FP_TO_SINT : Pat<(fp_to_sint FP:$src), + (GETFSIG (FCVTFXTRUNC FP:$src))>; +def FP_TO_UINT : Pat<(fp_to_uint FP:$src), + (GETFSIG (FCVTFXUTRUNC FP:$src))>; +*/ + let isTerminator = 1, isBranch = 1 in { def BRL_NOTCALL : RawForm<0x03, 0xb0, (ops i64imm:$dst), "(p0) brl.cond.sptk $dst;;">; From duraid at octopus.com.au Mon Oct 31 21:32:26 2005 From: duraid at octopus.com.au (Duraid Madina) Date: Mon, 31 Oct 2005 21:32:26 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/IA64/IA64InstrInfo.td Message-ID: <200511010332.VAA02024@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/IA64: IA64InstrInfo.td updated: 1.22 -> 1.23 --- Log message: so tablegen was thinking I might want to convert FPs to predicates. clever little tablegen! --- Diffs of the changes: (+3 -4) IA64InstrInfo.td | 7 +++---- 1 files changed, 3 insertions(+), 4 deletions(-) Index: llvm/lib/Target/IA64/IA64InstrInfo.td diff -u llvm/lib/Target/IA64/IA64InstrInfo.td:1.22 llvm/lib/Target/IA64/IA64InstrInfo.td:1.23 --- llvm/lib/Target/IA64/IA64InstrInfo.td:1.22 Mon Oct 31 21:07:25 2005 +++ llvm/lib/Target/IA64/IA64InstrInfo.td Mon Oct 31 21:32:15 2005 @@ -558,12 +558,11 @@ (FNORMD (FCVTXF (SETFSIG GR:$src)))>; def UINT_TO_FP : Pat<(uint_to_fp GR:$src), (FNORMD (FCVTXUF (SETFSIG GR:$src)))>; -/* FIXME: tablegen coughs on these -def FP_TO_SINT : Pat<(fp_to_sint FP:$src), +def FP_TO_SINT : Pat<(i64 (fp_to_sint FP:$src)), (GETFSIG (FCVTFXTRUNC FP:$src))>; -def FP_TO_UINT : Pat<(fp_to_uint FP:$src), +def FP_TO_UINT : Pat<(i64 (fp_to_uint FP:$src)), (GETFSIG (FCVTFXUTRUNC FP:$src))>; -*/ + let isTerminator = 1, isBranch = 1 in { def BRL_NOTCALL : RawForm<0x03, 0xb0, (ops i64imm:$dst), From duraid at octopus.com.au Mon Oct 31 23:46:27 2005 From: duraid at octopus.com.au (Duraid Madina) Date: Mon, 31 Oct 2005 23:46:27 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp Message-ID: <200511010546.XAA02523@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/IA64: IA64ISelDAGToDAG.cpp updated: 1.3 -> 1.4 --- Log message: FORTRAN!!! :( and other similarly unfortunate things mean that on ia64 one sometimes needs to pass FP args in both FP *and* integer registers. --- Diffs of the changes: (+20 -0) IA64ISelDAGToDAG.cpp | 20 ++++++++++++++++++++ 1 files changed, 20 insertions(+) Index: llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp diff -u llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp:1.3 llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp:1.4 --- llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp:1.3 Sat Oct 29 11:08:30 2005 +++ llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp Mon Oct 31 23:46:16 2005 @@ -208,7 +208,13 @@ CallOpcode = IA64::BRCALL_INDIRECT; } + // see section 8.5.8 of "Itanium Software Conventions and + // Runtime Architecture Guide to see some examples of what's going + // on here. (in short: int args get mapped 1:1 'slot-wise' to out0->out7, + // while FP args get mapped to F8->F15 as needed) + // TODO: support in-memory arguments + unsigned used_FPArgs=0; // how many FP args have been used so far? unsigned intArgs[] = {IA64::out0, IA64::out1, IA64::out2, IA64::out3, @@ -236,6 +242,20 @@ Chain = CurDAG->getCopyToReg(Chain, DestReg, Val, InFlag); InFlag = Chain.getValue(1); CallOperands.push_back(CurDAG->getRegister(DestReg, RegTy)); + // some functions (e.g. printf) want floating point arguments + // *also* passed as in-memory representations in integer registers + // this is FORTRAN legacy junk which we don't _always_ need + // to do, but to be on the safe side, we do. + if(MVT::isFloatingPoint(N->getOperand(i).getValueType())) { + assert((i-2) < 8 && "FP args alone would fit, but no int regs left"); + DestReg = intArgs[i-2]; // this FP arg goes in an int reg + // GETFD takes an FP reg and writes a GP reg + Chain = CurDAG->getTargetNode(IA64::GETFD, MVT::i64, Val, InFlag); + // FIXME: this next line is a bit unfortunate + Chain = CurDAG->getCopyToReg(Chain, DestReg, Chain, InFlag); + InFlag = Chain.getValue(1); + CallOperands.push_back(CurDAG->getRegister(DestReg, MVT::i64)); + } } } From duraid at octopus.com.au Mon Oct 31 23:49:19 2005 From: duraid at octopus.com.au (Duraid Madina) Date: Mon, 31 Oct 2005 23:49:19 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/IA64/README Message-ID: <200511010549.XAA02536@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/IA64: README updated: 1.4 -> 1.5 --- Log message: heh, scheduling was easy? need to send chris, jim and sampo a box of fish each --- Diffs of the changes: (+3 -1) README | 4 +++- 1 files changed, 3 insertions(+), 1 deletion(-) Index: llvm/lib/Target/IA64/README diff -u llvm/lib/Target/IA64/README:1.4 llvm/lib/Target/IA64/README:1.5 --- llvm/lib/Target/IA64/README:1.4 Tue Apr 12 13:42:59 2005 +++ llvm/lib/Target/IA64/README Mon Oct 31 23:49:08 2005 @@ -54,6 +54,8 @@ TODO: + - stop passing FP args in both FP *and* integer regs when not required + - allocate low (nonstacked) registers more aggressively - clean up and thoroughly test the isel patterns. - fix stacked register allocation order: (for readability) we don't want the out? registers being the first ones used @@ -62,7 +64,7 @@ - bundling! (we will avoid the mess that is: http://gcc.gnu.org/ml/gcc/2003-12/msg00832.html ) - - instruction scheduling (yep) + - instruction scheduling (hmmmm! ;) - write truly inspirational documentation - if-conversion (predicate database/knowledge? etc etc) - counted loop support From lattner at cs.uiuc.edu Tue Nov 1 11:59:53 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue, 1 Nov 2005 11:59:53 -0600 Subject: [llvm-commits] CVS: llvm/utils/NightlyTest.pl Message-ID: <200511011759.LAA04244@zion.cs.uiuc.edu> Changes in directory llvm/utils: NightlyTest.pl updated: 1.99 -> 1.100 --- Log message: Let people who run the nightly tester specify paths to external tests, instead of having to hack the nightly tester script itself. as an example, I use the following for my machine: $HOME/llvm/utils/NightlyTest.pl -parallel -release -enable-llcbeta \ -spec2000path /Volumes/ProjectsDisk/cvs/benchmarks/speccpu2000-llvm/benchspec/ \ -povraypath /Volumes/ProjectsDisk/cvs/benchmarks/povray31 \ -namdpath /Volumes/ProjectsDisk/cvs/benchmarks/namd --- Diffs of the changes: (+21 -2) NightlyTest.pl | 23 +++++++++++++++++++++-- 1 files changed, 21 insertions(+), 2 deletions(-) Index: llvm/utils/NightlyTest.pl diff -u llvm/utils/NightlyTest.pl:1.99 llvm/utils/NightlyTest.pl:1.100 --- llvm/utils/NightlyTest.pl:1.99 Sat Oct 29 12:01:41 2005 +++ llvm/utils/NightlyTest.pl Tue Nov 1 11:59:42 2005 @@ -38,6 +38,12 @@ # testing release branches) # -target Specify the target triplet # +# ---------------- Options to configure llvm-test ---------------------------- +# -spec2000path Path to the benchspec directory in the SPEC 2000 distro +# -spec95path Path to the benchspec directory in the SPEC 95 distro. +# -povraypath Path to the povray sources +# -namdpath Path to the namd sources +# # CVSROOT is the CVS repository from which the tree will be checked out, # specified either in the full :method:user at host:/dir syntax, or # just /dir if using a local repo. @@ -86,6 +92,8 @@ my $NICE = ""; my $NODEJAGNU = 0; +my $LLVMTESTCONFIGARGS = ""; + sub ReadFile { if (open (FILE, $_[0])) { undef $/; @@ -298,7 +306,18 @@ } if (/^-noexternals$/) { $NOEXTERNALS = 1; next; } if (/^-nodejagnu$/) { $NODEJAGNU = 1; next; } - + if (/^-spec2000path$/) { + $LLVMTESTCONFIGARGS .= " --enable-spec2000=$ARGV[0]"; shift; next; + } + if (/^-spec95path$/) { + $LLVMTESTCONFIGARGS .= " --enable-spec95=$ARGV[0]"; shift; next; + } + if (/^-povraypath$/) { + $LLVMTESTCONFIGARGS .= " --enable-povray=$ARGV[0]"; shift; next; + } + if (/^-namdpath$/) { + $LLVMTESTCONFIGARGS .= " --enable-namd=$ARGV[0]"; shift; next; + } print "Unknown option: $_ : ignoring!\n"; } @@ -410,7 +429,7 @@ # if (!$NOCHECKOUT) { if ( $VERBOSE ) { print "CONFIGURE STAGE\n"; } - my $EXTRAFLAGS = "--enable-spec --with-objroot=."; + my $EXTRAFLAGS = "--enable-spec --with-objroot=.$LLVMTESTCONFIGARGS"; system "(time -p $NICE ./configure $CONFIGUREARGS $EXTRAFLAGS) > $BuildLog 2>&1"; if ( $VERBOSE ) { print "BUILD STAGE\n"; } From jeffc at jolt-lang.org Tue Nov 1 12:04:17 2005 From: jeffc at jolt-lang.org (Jeff Cohen) Date: Tue, 1 Nov 2005 12:04:17 -0600 Subject: [llvm-commits] CVS: llvm/utils/TableGen/InstrInfoEmitter.cpp Message-ID: <200511011804.MAA04316@zion.cs.uiuc.edu> Changes in directory llvm/utils/TableGen: InstrInfoEmitter.cpp updated: 1.30 -> 1.31 --- Log message: Keep VC++ happy. --- Diffs of the changes: (+1 -0) InstrInfoEmitter.cpp | 1 + 1 files changed, 1 insertion(+) Index: llvm/utils/TableGen/InstrInfoEmitter.cpp diff -u llvm/utils/TableGen/InstrInfoEmitter.cpp:1.30 llvm/utils/TableGen/InstrInfoEmitter.cpp:1.31 --- llvm/utils/TableGen/InstrInfoEmitter.cpp:1.30 Mon Oct 31 11:16:46 2005 +++ llvm/utils/TableGen/InstrInfoEmitter.cpp Tue Nov 1 12:04:06 2005 @@ -15,6 +15,7 @@ #include "InstrInfoEmitter.h" #include "CodeGenTarget.h" #include "Record.h" +#include using namespace llvm; // runEnums - Print out enum values for all of the instructions. From jlaskey at apple.com Tue Nov 1 14:07:12 2005 From: jlaskey at apple.com (Jim Laskey) Date: Tue, 1 Nov 2005 14:07:12 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCSubtarget.cpp PPCSubtarget.h PPCTargetMachine.cpp PPCTargetMachine.h Message-ID: <200511012007.OAA04860@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/PowerPC: PPCSubtarget.cpp updated: 1.14 -> 1.15 PPCSubtarget.h updated: 1.11 -> 1.12 PPCTargetMachine.cpp updated: 1.75 -> 1.76 PPCTargetMachine.h updated: 1.14 -> 1.15 --- Log message: Allow itineraries to be passed through the Target Machine. --- Diffs of the changes: (+21 -5) PPCSubtarget.cpp | 1 + PPCSubtarget.h | 9 +++++++++ PPCTargetMachine.cpp | 3 ++- PPCTargetMachine.h | 13 +++++++++---- 4 files changed, 21 insertions(+), 5 deletions(-) Index: llvm/lib/Target/PowerPC/PPCSubtarget.cpp diff -u llvm/lib/Target/PowerPC/PPCSubtarget.cpp:1.14 llvm/lib/Target/PowerPC/PPCSubtarget.cpp:1.15 --- llvm/lib/Target/PowerPC/PPCSubtarget.cpp:1.14 Wed Oct 26 12:30:34 2005 +++ llvm/lib/Target/PowerPC/PPCSubtarget.cpp Tue Nov 1 14:07:00 2005 @@ -71,6 +71,7 @@ PPCSubtarget::PPCSubtarget(const Module &M, const std::string &FS) : StackAlignment(16) + , InstrItins() , IsGigaProcessor(false) , Is64Bit(false) , Has64BitRegs(false) Index: llvm/lib/Target/PowerPC/PPCSubtarget.h diff -u llvm/lib/Target/PowerPC/PPCSubtarget.h:1.11 llvm/lib/Target/PowerPC/PPCSubtarget.h:1.12 --- llvm/lib/Target/PowerPC/PPCSubtarget.h:1.11 Wed Oct 26 13:07:50 2005 +++ llvm/lib/Target/PowerPC/PPCSubtarget.h Tue Nov 1 14:07:00 2005 @@ -14,6 +14,7 @@ #ifndef POWERPCSUBTARGET_H #define POWERPCSUBTARGET_H +#include "llvm/Target/TargetInstrItineraries.h" #include "llvm/Target/TargetSubtarget.h" #include @@ -26,6 +27,9 @@ /// stackAlignment - The minimum alignment known to hold of the stack frame on /// entry to the function and which must be maintained by every function. unsigned StackAlignment; + + /// Selected instruction itineraries (one entry per itinerary class.) + InstrItineraryData InstrItins; /// Used by the ISel to turn in optimizations for POWER4-derived architectures bool IsGigaProcessor; @@ -49,6 +53,11 @@ /// stack frame on entry to the function and which must be maintained by every /// function for this subtarget. unsigned getStackAlignment() const { return StackAlignment; } + + /// getInstrItins - Return the instruction itineraies based on subtarget + /// selection. + const InstrItineraryData getInstrItineraryData() const { return InstrItins; } + bool hasFSQRT() const { return HasFSQRT; } bool has64BitRegs() const { return Has64BitRegs; } Index: llvm/lib/Target/PowerPC/PPCTargetMachine.cpp diff -u llvm/lib/Target/PowerPC/PPCTargetMachine.cpp:1.75 llvm/lib/Target/PowerPC/PPCTargetMachine.cpp:1.76 --- llvm/lib/Target/PowerPC/PPCTargetMachine.cpp:1.75 Mon Oct 17 19:28:58 2005 +++ llvm/lib/Target/PowerPC/PPCTargetMachine.cpp Tue Nov 1 14:07:00 2005 @@ -64,7 +64,8 @@ PPCTargetMachine::PPCTargetMachine(const Module &M, IntrinsicLowering *IL, const std::string &FS) : TargetMachine("PowerPC", IL, false, 4, 4, 4, 4, 4, 4, 2, 1, 1), - Subtarget(M, FS), FrameInfo(*this, false), JITInfo(*this) { + Subtarget(M, FS), FrameInfo(*this, false), JITInfo(*this), + InstrItins(Subtarget.getInstrItineraryData()) { if (TargetDefault == PPCTarget) { if (Subtarget.isAIX()) PPCTarget = TargetAIX; if (Subtarget.isDarwin()) PPCTarget = TargetDarwin; Index: llvm/lib/Target/PowerPC/PPCTargetMachine.h diff -u llvm/lib/Target/PowerPC/PPCTargetMachine.h:1.14 llvm/lib/Target/PowerPC/PPCTargetMachine.h:1.15 --- llvm/lib/Target/PowerPC/PPCTargetMachine.h:1.14 Sun Oct 16 00:39:50 2005 +++ llvm/lib/Target/PowerPC/PPCTargetMachine.h Tue Nov 1 14:07:00 2005 @@ -27,10 +27,11 @@ class IntrinsicLowering; class PPCTargetMachine : public TargetMachine { - PPCInstrInfo InstrInfo; - PPCSubtarget Subtarget; - PPCFrameInfo FrameInfo; - PPCJITInfo JITInfo; + PPCInstrInfo InstrInfo; + PPCSubtarget Subtarget; + PPCFrameInfo FrameInfo; + PPCJITInfo JITInfo; + InstrItineraryData InstrItins; public: PPCTargetMachine(const Module &M, IntrinsicLowering *IL, const std::string &FS); @@ -42,6 +43,10 @@ virtual const MRegisterInfo *getRegisterInfo() const { return &InstrInfo.getRegisterInfo(); } + virtual const InstrItineraryData getInstrItineraryData() const { + return InstrItins; + } + static unsigned getJITMatchQuality(); From jlaskey at apple.com Tue Nov 1 14:07:12 2005 From: jlaskey at apple.com (Jim Laskey) Date: Tue, 1 Nov 2005 14:07:12 -0600 Subject: [llvm-commits] CVS: llvm/utils/TableGen/InstrInfoEmitter.cpp SubtargetEmitter.cpp SubtargetEmitter.h Message-ID: <200511012007.OAA04868@zion.cs.uiuc.edu> Changes in directory llvm/utils/TableGen: InstrInfoEmitter.cpp updated: 1.31 -> 1.32 SubtargetEmitter.cpp updated: 1.12 -> 1.13 SubtargetEmitter.h updated: 1.6 -> 1.7 --- Log message: Allow itineraries to be passed through the Target Machine. --- Diffs of the changes: (+38 -16) InstrInfoEmitter.cpp | 2 +- SubtargetEmitter.cpp | 45 +++++++++++++++++++++++++++++++++------------ SubtargetEmitter.h | 7 ++++--- 3 files changed, 38 insertions(+), 16 deletions(-) Index: llvm/utils/TableGen/InstrInfoEmitter.cpp diff -u llvm/utils/TableGen/InstrInfoEmitter.cpp:1.31 llvm/utils/TableGen/InstrInfoEmitter.cpp:1.32 --- llvm/utils/TableGen/InstrInfoEmitter.cpp:1.31 Tue Nov 1 12:04:06 2005 +++ llvm/utils/TableGen/InstrInfoEmitter.cpp Tue Nov 1 14:07:00 2005 @@ -247,7 +247,7 @@ for (unsigned i = 0, N = DefList.size(); i < N; i++) { Record *Def = DefList[i]; - ItinClassMap[Def->getName()] = i + 1; + ItinClassMap[Def->getName()] = i; } } Index: llvm/utils/TableGen/SubtargetEmitter.cpp diff -u llvm/utils/TableGen/SubtargetEmitter.cpp:1.12 llvm/utils/TableGen/SubtargetEmitter.cpp:1.13 --- llvm/utils/TableGen/SubtargetEmitter.cpp:1.12 Mon Oct 31 11:16:01 2005 +++ llvm/utils/TableGen/SubtargetEmitter.cpp Tue Nov 1 14:07:00 2005 @@ -178,8 +178,8 @@ // CollectAllItinClasses - Gathers and enumerates all the itinerary classes. // Returns itinerary class count. // -unsigned SubtargetEmitter::CollectAllItinClasses(std::map - &ItinClassesMap) { +unsigned SubtargetEmitter::CollectAllItinClasses(std::ostream &OS, + std::map &ItinClassesMap) { // Gather and sort all itinerary classes std::vector ItinClassList = Records.getAllDerivedDefinitions("InstrItinClass"); @@ -196,6 +196,11 @@ ItinClassesMap[Name] = i; } + // Emit size of table + OS<<"\nenum {\n"; + OS<<" ItinClassesSize = " << N << "\n"; + OS<<"};\n"; + // Return itinerary class count return N; } @@ -313,6 +318,11 @@ // End stages table OS << "};\n"; + + // Emit size of table + OS<<"\nenum {\n"; + OS<<" StagesSize = sizeof(Stages)/sizeof(llvm::InstrStage)\n"; + OS<<"};\n"; } // @@ -421,13 +431,18 @@ std::vector > ProcList; // Enumerate all the itinerary classes - unsigned NItinClasses = CollectAllItinClasses(ItinClassesMap); - // Emit the stage data - EmitStageData(OS, NItinClasses, ItinClassesMap, ProcList); - // Emit the processor itinerary data - EmitProcessorData(OS, ProcList); - // Emit the processor lookup data - EmitProcessorLookup(OS); + unsigned NItinClasses = CollectAllItinClasses(OS, ItinClassesMap); + // Make sure the rest is worth the effort + HasItineraries = NItinClasses != 0; + + if (HasItineraries) { + // Emit the stage data + EmitStageData(OS, NItinClasses, ItinClassesMap, ProcList); + // Emit the processor itinerary data + EmitProcessorData(OS, ProcList); + // Emit the processor lookup data + EmitProcessorLookup(OS); + } } // @@ -460,9 +475,15 @@ OS << " " << Attribute << " = (Bits & " << Instance << ") != 0;\n"; } - OS << "\n" - << " InstrItinerary *Itin = (InstrItinerary *)" - "Features.getInfo(SubTypeInfoKV, SubTypeInfoKVSize);\n"; + + if (HasItineraries) { + OS << "\n" + << " InstrItinerary *Itinerary = (InstrItinerary *)" + "Features.getInfo(SubTypeInfoKV, SubTypeInfoKVSize);\n" + " InstrItins = InstrItineraryData(Stages, StagesSize, " + "Itinerary, ItinClassesSize);\n"; + } + OS << "}\n"; } Index: llvm/utils/TableGen/SubtargetEmitter.h diff -u llvm/utils/TableGen/SubtargetEmitter.h:1.6 llvm/utils/TableGen/SubtargetEmitter.h:1.7 --- llvm/utils/TableGen/SubtargetEmitter.h:1.6 Mon Oct 31 11:16:01 2005 +++ llvm/utils/TableGen/SubtargetEmitter.h Tue Nov 1 14:07:00 2005 @@ -27,12 +27,13 @@ RecordKeeper &Records; std::string Target; + bool HasItineraries; void Enumeration(std::ostream &OS, const char *ClassName, bool isBits); void FeatureKeyValues(std::ostream &OS); void CPUKeyValues(std::ostream &OS); - unsigned CollectAllItinClasses(std::map - &ItinClassesMap); + unsigned CollectAllItinClasses(std::ostream &OS, + std::map &ItinClassesMap); void FormItineraryString(Record *ItinData, std::string &ItinString, unsigned &NStages); void EmitStageData(std::ostream &OS, unsigned NItinClasses, @@ -45,7 +46,7 @@ void ParseFeaturesFunction(std::ostream &OS); public: - SubtargetEmitter(RecordKeeper &R) : Records(R) {} + SubtargetEmitter(RecordKeeper &R) : Records(R), HasItineraries(false) {} // run - Output the subtarget enumerations, returning true on failure. void run(std::ostream &o); From jlaskey at apple.com Tue Nov 1 14:07:12 2005 From: jlaskey at apple.com (Jim Laskey) Date: Tue, 1 Nov 2005 14:07:12 -0600 Subject: [llvm-commits] CVS: llvm/include/llvm/Target/TargetInstrInfo.h TargetInstrItineraries.h TargetMachine.h Message-ID: <200511012007.OAA04876@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/Target: TargetInstrInfo.h updated: 1.80 -> 1.81 TargetInstrItineraries.h updated: 1.1 -> 1.2 TargetMachine.h updated: 1.57 -> 1.58 --- Log message: Allow itineraries to be passed through the Target Machine. --- Diffs of the changes: (+60 -1) TargetInstrInfo.h | 1 TargetInstrItineraries.h | 52 +++++++++++++++++++++++++++++++++++++++++++++++ TargetMachine.h | 8 +++++++ 3 files changed, 60 insertions(+), 1 deletion(-) Index: llvm/include/llvm/Target/TargetInstrInfo.h diff -u llvm/include/llvm/Target/TargetInstrInfo.h:1.80 llvm/include/llvm/Target/TargetInstrInfo.h:1.81 --- llvm/include/llvm/Target/TargetInstrInfo.h:1.80 Fri Sep 2 13:16:20 2005 +++ llvm/include/llvm/Target/TargetInstrInfo.h Tue Nov 1 14:07:00 2005 @@ -146,7 +146,6 @@ return get(Opcode).numOperands; } - InstrSchedClass getSchedClass(MachineOpCode Opcode) const { return get(Opcode).schedClass; } Index: llvm/include/llvm/Target/TargetInstrItineraries.h diff -u llvm/include/llvm/Target/TargetInstrItineraries.h:1.1 llvm/include/llvm/Target/TargetInstrItineraries.h:1.2 --- llvm/include/llvm/Target/TargetInstrItineraries.h:1.1 Thu Oct 27 13:18:05 2005 +++ llvm/include/llvm/Target/TargetInstrItineraries.h Tue Nov 1 14:07:00 2005 @@ -16,6 +16,8 @@ #ifndef LLVM_TARGET_TARGETINSTRITINERARIES_H #define LLVM_TARGET_TARGETINSTRITINERARIES_H +#include "llvm/Support/Debug.h" + namespace llvm { //===----------------------------------------------------------------------===// @@ -41,6 +43,56 @@ }; + +//===----------------------------------------------------------------------===// +// Instruction itinerary Data - Itinerary data supplied by a subtarget to be +// used by a target. +// +class InstrItineraryData { + InstrStage *Stages; // Array of stages selected + unsigned NStages; // Number of stages + InstrItinerary *Itineratries; // Array of itineraries selected + unsigned NItineraries; // Number of itineraries (actually classes) + +public: + + // + // Ctors. + // + InstrItineraryData() + : Stages(NULL), NStages(0), Itineratries(NULL), NItineraries(0) + {} + InstrItineraryData(InstrStage *S, unsigned NS, InstrItinerary *I, unsigned NI) + : Stages(S), NStages(NS), Itineratries(I), NItineraries(NI) + {} + + // + // isEmpty - Returns true if there are no itineraries. + // + inline bool isEmpty() const { return NItineraries == 0; } + + // + // begin - Return the first stage of the itinerary. + // + inline InstrStage *begin(unsigned ItinClassIndx) const { + assert(ItinClassIndx < NItineraries && "Itinerary index out of range"); + unsigned StageIdx = Itineratries[ItinClassIndx].First; + assert(StageIdx < NStages && "Stage index out of range"); + return Stages + StageIdx; + } + + // + // end - Return the last+1 stage of the itinerary. + // + inline InstrStage *end(unsigned ItinClassIndx) const { + assert(ItinClassIndx < NItineraries && "Itinerary index out of range"); + unsigned StageIdx = Itineratries[ItinClassIndx].Last; + assert(StageIdx < NStages && "Stage index out of range"); + return Stages + StageIdx; + } +}; + + } // End llvm namespace #endif Index: llvm/include/llvm/Target/TargetMachine.h diff -u llvm/include/llvm/Target/TargetMachine.h:1.57 llvm/include/llvm/Target/TargetMachine.h:1.58 --- llvm/include/llvm/Target/TargetMachine.h:1.57 Fri Aug 5 16:53:21 2005 +++ llvm/include/llvm/Target/TargetMachine.h Tue Nov 1 14:07:00 2005 @@ -15,6 +15,7 @@ #define LLVM_TARGET_TARGETMACHINE_H #include "llvm/Target/TargetData.h" +#include "llvm/Target/TargetInstrItineraries.h" #include namespace llvm { @@ -122,6 +123,13 @@ /// otherwise return null. /// virtual TargetJITInfo *getJITInfo() { return 0; } + + /// getInstrItineraryData - Returns instruction itinerary data for the target + /// or specific subtarget. + /// + virtual const InstrItineraryData getInstrItineraryData() const { + return InstrItineraryData(); + } // These are deprecated interfaces. virtual const TargetSchedInfo *getSchedInfo() const { return 0; } From brukman at cs.uiuc.edu Tue Nov 1 14:58:19 2005 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Tue, 1 Nov 2005 14:58:19 -0600 Subject: [llvm-commits] CVS: llvm/autoconf/configure.ac Message-ID: <200511012058.OAA05343@zion.cs.uiuc.edu> Changes in directory llvm/autoconf: configure.ac updated: 1.195 -> 1.196 --- Log message: Fixed copy-paste typo, patch by Marco Matthies. --- Diffs of the changes: (+1 -1) configure.ac | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/autoconf/configure.ac diff -u llvm/autoconf/configure.ac:1.195 llvm/autoconf/configure.ac:1.196 --- llvm/autoconf/configure.ac:1.195 Wed Aug 24 05:43:10 2005 +++ llvm/autoconf/configure.ac Tue Nov 1 14:58:08 2005 @@ -323,7 +323,7 @@ [Define to path to Graphviz program if found or 'echo Graphviz' otherwise]) fi AC_PATH_PROG(GV, [gv], [echo gv]) -if test "$GRAPHVIZ" != "echo gv" ; then +if test "$GV" != "echo gv" ; then AC_DEFINE([HAVE_GV],[1],[Define if the gv program is available]) AC_DEFINE_UNQUOTED([LLVM_PATH_GV],"$GV", [Define to path to gv program if found or 'echo gv' otherwise]) From brukman at cs.uiuc.edu Tue Nov 1 15:01:00 2005 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Tue, 1 Nov 2005 15:01:00 -0600 Subject: [llvm-commits] CVS: llvm/configure Message-ID: <200511012101.PAA05618@zion.cs.uiuc.edu> Changes in directory llvm: configure updated: 1.198 -> 1.199 --- Log message: Re-generated to fix copy-paste typo noticed by Marco Matthies. --- Diffs of the changes: (+1 -1) configure | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/configure diff -u llvm/configure:1.198 llvm/configure:1.199 --- llvm/configure:1.198 Wed Aug 24 05:07:21 2005 +++ llvm/configure Tue Nov 1 15:00:49 2005 @@ -5169,7 +5169,7 @@ echo "${ECHO_T}no" >&6 fi -if test "$GRAPHVIZ" != "echo gv" ; then +if test "$GV" != "echo gv" ; then cat >>confdefs.h <<\_ACEOF #define HAVE_GV 1 From brukman at cs.uiuc.edu Tue Nov 1 15:13:16 2005 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Tue, 1 Nov 2005 15:13:16 -0600 Subject: [llvm-commits] CVS: llvm/docs/ProgrammersManual.html Message-ID: <200511012113.PAA05896@zion.cs.uiuc.edu> Changes in directory llvm/docs: ProgrammersManual.html updated: 1.87 -> 1.88 --- Log message: * Replace ampersands in section titles with more formal ``and'' * Surround C++ template operators with * Add <> after templated operators for consistency --- Diffs of the changes: (+36 -34) ProgrammersManual.html | 70 +++++++++++++++++++++++++------------------------ 1 files changed, 36 insertions(+), 34 deletions(-) Index: llvm/docs/ProgrammersManual.html diff -u llvm/docs/ProgrammersManual.html:1.87 llvm/docs/ProgrammersManual.html:1.88 --- llvm/docs/ProgrammersManual.html:1.87 Sun Oct 16 20:36:23 2005 +++ llvm/docs/ProgrammersManual.html Tue Nov 1 15:12:49 2005 @@ -28,7 +28,7 @@
    • The isa<>, cast<> and dyn_cast<> templates
    • -
    • The DEBUG() macro & -debug +
    • The DEBUG() macro and -debug option
      • Fine grained debug info with DEBUG_TYPE @@ -264,7 +264,8 @@
        @@ -317,44 +318,45 @@ checks to see if the operand is of the specified type, and if so, returns a pointer to it (this operator does not work with references). If the operand is not of the correct type, a null pointer is returned. Thus, this works very - much like the dynamic_cast operator in C++, and should be used in the - same circumstances. Typically, the dyn_cast<> operator is used - in an if statement or some other flow control statement like this: + much like the dynamic_cast<> operator in C++, and should be + used in the same circumstances. Typically, the dyn_cast<> + operator is used in an if statement or some other flow control + statement like this: -
        +  
              if (AllocationInst *AI = dyn_cast<AllocationInst>(Val)) {
                ...
              }
        -   
        +
        -

        This form of the if statement effectively combines together a - call to isa<> and a call to cast<> into one - statement, which is very convenient.

        - -

        Note that the dyn_cast<> operator, like C++'s - dynamic_cast or Java's instanceof operator, can be abused. - In particular you should not use big chained if/then/else blocks to - check for lots of different variants of classes. If you find yourself - wanting to do this, it is much cleaner and more efficient to use the - InstVisitor class to dispatch over the instruction type directly.

        +

        This form of the if statement effectively combines together a call + to isa<> and a call to cast<> into one + statement, which is very convenient.

        + +

        Note that the dyn_cast<> operator, like C++'s + dynamic_cast<> or Java's instanceof operator, can be + abused. In particular, you should not use big chained if/then/else + blocks to check for lots of different variants of classes. If you find + yourself wanting to do this, it is much cleaner and more efficient to use the + InstVisitor class to dispatch over the instruction type directly.

        - + -
        cast_or_null<>:
        - -
        The cast_or_null<> operator works just like the - cast<> operator, except that it allows for a null pointer as - an argument (which it then propagates). This can sometimes be useful, - allowing you to combine several null checks into one.
        - -
        dyn_cast_or_null<>:
        - -
        The dyn_cast_or_null<> operator works just like the - dyn_cast<> operator, except that it allows for a null pointer - as an argument (which it then propagates). This can sometimes be useful, - allowing you to combine several null checks into one.
        +
        cast_or_null<>:
        + +
        The cast_or_null<> operator works just like the + cast<> operator, except that it allows for a null pointer as an + argument (which it then propagates). This can sometimes be useful, allowing + you to combine several null checks into one.
        + +
        dyn_cast_or_null<>:
        + +
        The dyn_cast_or_null<> operator works just like the + dyn_cast<> operator, except that it allows for a null pointer + as an argument (which it then propagates). This can sometimes be useful, + allowing you to combine several null checks into one.
        - +

        These five templates can be used with any classes, whether they have a v-table or not. To add support for these templates, you simply need to add @@ -366,7 +368,7 @@

        @@ -2275,7 +2277,7 @@ Dinakar Dhurjati and Chris Lattner
        The LLVM Compiler Infrastructure
        - Last modified: $Date: 2005/10/17 01:36:23 $ + Last modified: $Date: 2005/11/01 21:12:49 $ From lattner at cs.uiuc.edu Tue Nov 1 19:47:16 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue, 1 Nov 2005 19:47:16 -0600 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Message-ID: <200511020147.TAA25589@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/SelectionDAG: DAGCombiner.cpp updated: 1.58 -> 1.59 --- Log message: Fix a source of undefined behavior when dealing with 64-bit types. This may fix PR652: http://llvm.cs.uiuc.edu/PR652 . Thanks to Andrew for tracking down the problem. --- Diffs of the changes: (+1 -1) DAGCombiner.cpp | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp diff -u llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.58 llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.59 --- llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.58 Sun Oct 30 01:41:49 2005 +++ llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Tue Nov 1 19:47:04 2005 @@ -384,7 +384,7 @@ return (Mask & ((1ULL << SrcBits)-1)) == 0; // Returning only the zext bits. case ISD::ZERO_EXTEND: SrcBits = MVT::getSizeInBits(Op.getOperand(0).getValueType()); - return MaskedValueIsZero(Op.getOperand(0),Mask & ((1ULL << SrcBits)-1),TLI); + return MaskedValueIsZero(Op.getOperand(0),Mask & (~0ULL >> (64-SrcBits)),TLI); case ISD::AssertZext: SrcBits = MVT::getSizeInBits(cast(Op.getOperand(1))->getVT()); return (Mask & ((1ULL << SrcBits)-1)) == 0; // Returning only the zext bits. From duraid at octopus.com.au Tue Nov 1 20:35:15 2005 From: duraid at octopus.com.au (Duraid Madina) Date: Tue, 1 Nov 2005 20:35:15 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp IA64ISelLowering.cpp Message-ID: <200511020235.UAA28653@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/IA64: IA64ISelDAGToDAG.cpp updated: 1.4 -> 1.5 IA64ISelLowering.cpp updated: 1.1 -> 1.2 --- Log message: add support for loading FP constants +0.0 and +1.0 to the dag isel, stop pretending -0.0 and -1.0 are machine constants --- Diffs of the changes: (+8 -3) IA64ISelDAGToDAG.cpp | 8 ++++++++ IA64ISelLowering.cpp | 3 --- 2 files changed, 8 insertions(+), 3 deletions(-) Index: llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp diff -u llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp:1.4 llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp:1.5 --- llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp:1.4 Mon Oct 31 23:46:16 2005 +++ llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp Tue Nov 1 20:35:04 2005 @@ -321,6 +321,14 @@ /* todo: * case ISD::DYNAMIC_STACKALLOC: */ + case ISD::ConstantFP: { + if (cast(N)->isExactlyValue(+0.0)) + return CurDAG->getRegister(IA64::F0, MVT::f64); // load 0.0 + else if (cast(N)->isExactlyValue(+1.0)) + return CurDAG->getRegister(IA64::F1, MVT::f64); // load 1.0 + else + assert(0 && "Unexpected FP constant!"); + } case ISD::FrameIndex: { // TODO: reduce creepyness int FI = cast(N)->getIndex(); Index: llvm/lib/Target/IA64/IA64ISelLowering.cpp diff -u llvm/lib/Target/IA64/IA64ISelLowering.cpp:1.1 llvm/lib/Target/IA64/IA64ISelLowering.cpp:1.2 --- llvm/lib/Target/IA64/IA64ISelLowering.cpp:1.1 Fri Oct 28 12:46:36 2005 +++ llvm/lib/Target/IA64/IA64ISelLowering.cpp Tue Nov 1 20:35:04 2005 @@ -80,9 +80,6 @@ addLegalFPImmediate(+0.0); addLegalFPImmediate(+1.0); - addLegalFPImmediate(-0.0); - addLegalFPImmediate(-1.0); - } /// isFloatingPointZero - Return true if this is 0.0 or -0.0. From duraid at octopus.com.au Tue Nov 1 20:37:29 2005 From: duraid at octopus.com.au (Duraid Madina) Date: Tue, 1 Nov 2005 20:37:29 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/TargetSelectionDAG.td Message-ID: <200511020237.UAA28799@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target: TargetSelectionDAG.td updated: 1.8 -> 1.9 --- Log message: add support for SELECT to TargetSelectionDAG.td, add support for selecting ints to IA64, and a few other ia64 bits and pieces --- Diffs of the changes: (+5 -0) TargetSelectionDAG.td | 5 +++++ 1 files changed, 5 insertions(+) Index: llvm/lib/Target/TargetSelectionDAG.td diff -u llvm/lib/Target/TargetSelectionDAG.td:1.8 llvm/lib/Target/TargetSelectionDAG.td:1.9 --- llvm/lib/Target/TargetSelectionDAG.td:1.8 Mon Oct 31 21:07:25 2005 +++ llvm/lib/Target/TargetSelectionDAG.td Tue Nov 1 20:37:18 2005 @@ -109,6 +109,10 @@ SDTCisInt<0>, SDTCisSameAs<1, 2>, SDTCisVT<3, OtherVT> ]>; +def SDTSelect : SDTypeProfile<1, 3, [ // select + SDTCisInt<1>, SDTCisSameAs<0, 2>, SDTCisSameAs<2, 3> +]>; + //===----------------------------------------------------------------------===// // Selection DAG Node Properties. // @@ -184,6 +188,7 @@ def fp_to_uint : SDNode<"ISD::FP_TO_UINT" , SDTFPToIntOp>; def setcc : SDNode<"ISD::SETCC" , SDTSetCC>; +def select : SDNode<"ISD::SELECT" , SDTSelect>; //===----------------------------------------------------------------------===// // Selection DAG Condition Codes From duraid at octopus.com.au Tue Nov 1 20:37:29 2005 From: duraid at octopus.com.au (Duraid Madina) Date: Tue, 1 Nov 2005 20:37:29 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/IA64/IA64InstrInfo.td Message-ID: <200511020237.UAA28804@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/IA64: IA64InstrInfo.td updated: 1.23 -> 1.24 --- Log message: add support for SELECT to TargetSelectionDAG.td, add support for selecting ints to IA64, and a few other ia64 bits and pieces --- Diffs of the changes: (+38 -31) IA64InstrInfo.td | 69 ++++++++++++++++++++++++++++++------------------------- 1 files changed, 38 insertions(+), 31 deletions(-) Index: llvm/lib/Target/IA64/IA64InstrInfo.td diff -u llvm/lib/Target/IA64/IA64InstrInfo.td:1.23 llvm/lib/Target/IA64/IA64InstrInfo.td:1.24 --- llvm/lib/Target/IA64/IA64InstrInfo.td:1.23 Mon Oct 31 21:32:15 2005 +++ llvm/lib/Target/IA64/IA64InstrInfo.td Tue Nov 1 20:37:18 2005 @@ -211,11 +211,6 @@ // def ADDS : AForm<0x03, 0x0b, (ops GR:$dst, GR:$src1, s14imm:$imm), // "adds $dst = $imm, $src1;;">; -// load constants of various sizes // FIXME: prettyprint -ve constants -def : Pat<(i64 immSExt14:$imm), (ADDS r0, immSExt14:$imm)>; -def : Pat<(i64 imm64:$imm), (MOVL imm64:$imm)>; -// TODO: def : Pat<(i1 1), ()>; - def AND : AForm_DAG<0x03, 0x0b, (ops GR:$dst, GR:$src1, GR:$src2), "and $dst = $src1, $src2;;", [(set GR:$dst, (and GR:$src1, GR:$src2))]>; @@ -336,6 +331,38 @@ "fcmp.geu $dst, p0 = $src1, $src2;;", [(set PR:$dst, (setuge FP:$src1, FP:$src2))]>; +def MOV : AForm<0x03, 0x0b, (ops GR:$dst, GR:$src), "mov $dst = $src;;">; +def PMOV : AForm<0x03, 0x0b, (ops GR:$dst, GR:$src, PR:$qp), + "($qp) mov $dst = $src;;">; + +def SPILL_ALL_PREDICATES_TO_GR : AForm<0x03, 0x0b, (ops GR:$dst), + "mov $dst = pr;;">; +def FILL_ALL_PREDICATES_FROM_GR : AForm<0x03, 0x0b, (ops GR:$src), + "mov pr = $src;;">; + +let isTwoAddress = 1 in { + def CMOV : AForm<0x03, 0x0b, (ops GR:$dst, GR:$src2, GR:$src, PR:$qp), + "($qp) mov $dst = $src;;">; +} + +def PFMOV : AForm<0x03, 0x0b, (ops FP:$dst, FP:$src, PR:$qp), + "($qp) mov $dst = $src;;">; + +let isTwoAddress = 1 in { + def CFMOV : AForm<0x03, 0x0b, (ops FP:$dst, FP:$src2, FP:$src, PR:$qp), + "($qp) mov $dst = $src;;">; +} + +// TODO: select FPs, bools +def SELECTINT : Pat<(select PR:$which, GR:$src1, GR:$src2), + (CMOV (MOV GR:$src2), GR:$src1, PR:$which)>; // note order! + +// load constants of various sizes // FIXME: prettyprint -ve constants +def : Pat<(i64 immSExt14:$imm), (ADDS r0, immSExt14:$imm)>; +def : Pat<(i64 imm64:$imm), (MOVL imm64:$imm)>; +//FIXME: tablegen coughs on this next one: +//def : Pat<(i1 1), (CMPEQ r0, r0)>; // TODO: this should just be a ref to p0 + // TODO: support postincrement (reg, imm9) loads+stores - this needs more // tablegen support @@ -360,28 +387,6 @@ (ops GR:$dst, i8imm:$inputs, i8imm:$locals, i8imm:$outputs, i8imm:$rotating), "alloc $dst = ar.pfs,$inputs,$locals,$outputs,$rotating;;">; -def MOV : AForm<0x03, 0x0b, (ops GR:$dst, GR:$src), "mov $dst = $src;;">; -def PMOV : AForm<0x03, 0x0b, (ops GR:$dst, GR:$src, PR:$qp), - "($qp) mov $dst = $src;;">; - -def SPILL_ALL_PREDICATES_TO_GR : AForm<0x03, 0x0b, (ops GR:$dst), - "mov $dst = pr;;">; -def FILL_ALL_PREDICATES_FROM_GR : AForm<0x03, 0x0b, (ops GR:$src), - "mov pr = $src;;">; - -let isTwoAddress = 1 in { - def CMOV : AForm<0x03, 0x0b, (ops GR:$dst, GR:$src2, GR:$src, PR:$qp), - "($qp) mov $dst = $src;;">; -} - -def PFMOV : AForm<0x03, 0x0b, (ops FP:$dst, FP:$src, PR:$qp), - "($qp) mov $dst = $src;;">; - -let isTwoAddress = 1 in { - def CFMOV : AForm<0x03, 0x0b, (ops FP:$dst, FP:$src2, FP:$src, PR:$qp), - "($qp) mov $dst = $src;;">; -} - let isTwoAddress = 1 in { def TCMPNE : AForm<0x03, 0x0b, (ops PR:$dst, PR:$src2, GR:$src3, GR:$src4), @@ -498,13 +503,15 @@ def FNMA : AForm_DAG<0x03, 0x0b, (ops FP:$dst, FP:$src1, FP:$src2, FP:$src3), "fnma $dst = $src1, $src2, $src3;;", [(set FP:$dst, (fneg (fadd (fmul FP:$src1, FP:$src2), FP:$src3)))]>; -def FABS : AForm<0x03, 0x0b, (ops FP:$dst, FP:$src), - "fabs $dst = $src;;">; +def FABS : AForm_DAG<0x03, 0x0b, (ops FP:$dst, FP:$src), + "fabs $dst = $src;;", + [(set FP:$dst, (fabs FP:$src))]>; def FNEG : AForm_DAG<0x03, 0x0b, (ops FP:$dst, FP:$src), "fneg $dst = $src;;", [(set FP:$dst, (fneg FP:$src))]>; -def FNEGABS : AForm<0x03, 0x0b, (ops FP:$dst, FP:$src), - "fnegabs $dst = $src;;">; +def FNEGABS : AForm_DAG<0x03, 0x0b, (ops FP:$dst, FP:$src), + "fnegabs $dst = $src;;", + [(set FP:$dst, (fneg (fabs FP:$src)))]>; def CFMAS1 : AForm<0x03, 0x0b, (ops FP:$dst, FP:$src1, FP:$src2, FP:$src3, PR:$qp), From jeffc at jolt-lang.org Tue Nov 1 22:03:27 2005 From: jeffc at jolt-lang.org (Jeff Cohen) Date: Tue, 1 Nov 2005 22:03:27 -0600 Subject: [llvm-commits] CVS: llvm/include/llvm/Target/TargetInstrItineraries.h Message-ID: <200511020403.WAA02185@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/Target: TargetInstrItineraries.h updated: 1.2 -> 1.3 --- Log message: Keep VC++ happy. --- Diffs of the changes: (+1 -0) TargetInstrItineraries.h | 1 + 1 files changed, 1 insertion(+) Index: llvm/include/llvm/Target/TargetInstrItineraries.h diff -u llvm/include/llvm/Target/TargetInstrItineraries.h:1.2 llvm/include/llvm/Target/TargetInstrItineraries.h:1.3 --- llvm/include/llvm/Target/TargetInstrItineraries.h:1.2 Tue Nov 1 14:07:00 2005 +++ llvm/include/llvm/Target/TargetInstrItineraries.h Tue Nov 1 22:03:16 2005 @@ -17,6 +17,7 @@ #define LLVM_TARGET_TARGETINSTRITINERARIES_H #include "llvm/Support/Debug.h" +#include namespace llvm { From lattner at cs.uiuc.edu Wed Nov 2 00:49:25 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed, 2 Nov 2005 00:49:25 -0600 Subject: [llvm-commits] CVS: llvm/utils/TableGen/DAGISelEmitter.cpp DAGISelEmitter.h Message-ID: <200511020649.AAA08691@zion.cs.uiuc.edu> Changes in directory llvm/utils/TableGen: DAGISelEmitter.cpp updated: 1.71 -> 1.72 DAGISelEmitter.h updated: 1.35 -> 1.36 --- Log message: Add support for immediates directly in the pattern, this allows itanium to define: def : Pat<(i1 1), (CMPEQ r0, r0)>; --- Diffs of the changes: (+33 -3) DAGISelEmitter.cpp | 34 +++++++++++++++++++++++++++++++--- DAGISelEmitter.h | 2 ++ 2 files changed, 33 insertions(+), 3 deletions(-) Index: llvm/utils/TableGen/DAGISelEmitter.cpp diff -u llvm/utils/TableGen/DAGISelEmitter.cpp:1.71 llvm/utils/TableGen/DAGISelEmitter.cpp:1.72 --- llvm/utils/TableGen/DAGISelEmitter.cpp:1.71 Sat Oct 29 11:39:40 2005 +++ llvm/utils/TableGen/DAGISelEmitter.cpp Wed Nov 2 00:49:14 2005 @@ -621,6 +621,10 @@ New = new TreePatternNode(DI); } else if (DagInit *DI = dynamic_cast(Arg)) { New = ParseTreePattern(DI); + } else if (IntInit *II = dynamic_cast(Arg)) { + New = new TreePatternNode(II); + if (!Dag->getArgName(0).empty()) + error("Constant int argument should not have a name!"); } else { Arg->dump(); error("Unknown leaf value for tree pattern!"); @@ -1521,7 +1525,16 @@ const std::string &RootName, std::map &VarMap, unsigned PatternNo, std::ostream &OS) { - assert(!N->isLeaf() && "Cannot match against a leaf!"); + if (N->isLeaf()) { + if (IntInit *II = dynamic_cast(N->getLeafValue())) { + OS << " if (cast(" << RootName + << ")->getSignExtended() != " << II->getValue() << ")\n" + << " goto P" << PatternNo << "Fail;\n"; + return; + } + assert(0 && "Cannot match this as a leaf value!"); + abort(); + } // If this node has a name associated with it, capture it in VarMap. If // we already saw this in the pattern, emit code to verify dagness. @@ -1762,6 +1775,12 @@ return false; } +Record *DAGISelEmitter::getSDNodeNamed(const std::string &Name) const { + Record *N = Records.getDef(Name); + assert(N && N->isSubClassOf("SDNode") && "Bad argument"); + return N; +} + /// EmitCodeForPattern - Given a pattern to match, emit code to the specified /// stream to match the pattern, and generate the code for the match if it /// succeeds. @@ -1897,8 +1916,17 @@ std::map, CompareByRecordName> PatternsByOpcode; for (unsigned i = 0, e = PatternsToMatch.size(); i != e; ++i) - PatternsByOpcode[PatternsToMatch[i].first->getOperator()] - .push_back(&PatternsToMatch[i]); + if (!PatternsToMatch[i].first->isLeaf()) { + PatternsByOpcode[PatternsToMatch[i].first->getOperator()] + .push_back(&PatternsToMatch[i]); + } else { + if (IntInit *II = + dynamic_cast(PatternsToMatch[i].first->getLeafValue())) { + PatternsByOpcode[getSDNodeNamed("imm")].push_back(&PatternsToMatch[i]); + } else { + assert(0 && "Unknown leaf value"); + } + } // Loop over all of the case statements. for (std::map, Index: llvm/utils/TableGen/DAGISelEmitter.h diff -u llvm/utils/TableGen/DAGISelEmitter.h:1.35 llvm/utils/TableGen/DAGISelEmitter.h:1.36 --- llvm/utils/TableGen/DAGISelEmitter.h:1.35 Thu Oct 20 20:19:59 2005 +++ llvm/utils/TableGen/DAGISelEmitter.h Wed Nov 2 00:49:14 2005 @@ -382,6 +382,8 @@ const CodeGenTarget &getTargetInfo() const { return Target; } + Record *getSDNodeNamed(const std::string &Name) const; + const SDNodeInfo &getSDNodeInfo(Record *R) const { assert(SDNodes.count(R) && "Unknown node!"); return SDNodes.find(R)->second; From lattner at cs.uiuc.edu Wed Nov 2 00:49:49 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed, 2 Nov 2005 00:49:49 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/IA64/IA64InstrInfo.td Message-ID: <200511020649.AAA08753@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/IA64: IA64InstrInfo.td updated: 1.24 -> 1.25 --- Log message: This works now --- Diffs of the changes: (+1 -2) IA64InstrInfo.td | 3 +-- 1 files changed, 1 insertion(+), 2 deletions(-) Index: llvm/lib/Target/IA64/IA64InstrInfo.td diff -u llvm/lib/Target/IA64/IA64InstrInfo.td:1.24 llvm/lib/Target/IA64/IA64InstrInfo.td:1.25 --- llvm/lib/Target/IA64/IA64InstrInfo.td:1.24 Tue Nov 1 20:37:18 2005 +++ llvm/lib/Target/IA64/IA64InstrInfo.td Wed Nov 2 00:49:37 2005 @@ -360,8 +360,7 @@ // load constants of various sizes // FIXME: prettyprint -ve constants def : Pat<(i64 immSExt14:$imm), (ADDS r0, immSExt14:$imm)>; def : Pat<(i64 imm64:$imm), (MOVL imm64:$imm)>; -//FIXME: tablegen coughs on this next one: -//def : Pat<(i1 1), (CMPEQ r0, r0)>; // TODO: this should just be a ref to p0 +def : Pat<(i1 1), (CMPEQ r0, r0)>; // TODO: this should just be a ref to p0 // TODO: support postincrement (reg, imm9) loads+stores - this needs more // tablegen support From duraid at octopus.com.au Wed Nov 2 01:30:51 2005 From: duraid at octopus.com.au (Duraid Madina) Date: Wed, 2 Nov 2005 01:30:51 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/IA64/IA64RegisterInfo.td Message-ID: <200511020730.BAA11424@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/IA64: IA64RegisterInfo.td updated: 1.9 -> 1.10 --- Log message: add F0 and F1 to the FP register class --- Diffs of the changes: (+19 -3) IA64RegisterInfo.td | 22 +++++++++++++++++++--- 1 files changed, 19 insertions(+), 3 deletions(-) Index: llvm/lib/Target/IA64/IA64RegisterInfo.td diff -u llvm/lib/Target/IA64/IA64RegisterInfo.td:1.9 llvm/lib/Target/IA64/IA64RegisterInfo.td:1.10 --- llvm/lib/Target/IA64/IA64RegisterInfo.td:1.9 Fri Oct 28 12:46:36 2005 +++ llvm/lib/Target/IA64/IA64RegisterInfo.td Wed Nov 2 01:30:39 2005 @@ -226,7 +226,6 @@ // // these are the scratch (+stacked) general registers -// ZERO (r0), GP (r1), SP (r12), ThreadP (r13) are not here... // FIXME/XXX we also reserve a frame pointer (r15) // FIXME/XXX we also reserve r2 for spilling/filling predicates // in IA64RegisterInfo.cpp @@ -283,7 +282,6 @@ // these are the scratch (+stacked) FP registers -// ZERO (F0) and ONE (F1) are not here def FP : RegisterClass<"IA64", f64, 64, [F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, @@ -298,7 +296,25 @@ F96, F97, F98, F99, F100, F101, F102, F103, F104, F105, F106, F107, F108, F109, F110, F111, F112, F113, F114, F115, F116, F117, F118, F119, - F120, F121, F122, F123, F124, F125, F126, F127]>; + F120, F121, F122, F123, F124, F125, F126, F127, + F0, F1]> // these last two are hidden + { + let MethodProtos = [{ + iterator allocation_order_begin(MachineFunction &MF) const; + iterator allocation_order_end(MachineFunction &MF) const; + }]; + let MethodBodies = [{ + FPClass::iterator + FPClass::allocation_order_begin(MachineFunction &MF) const { + return begin(); // we don't hide any FP regs from the start + } + + FPClass::iterator + FPClass::allocation_order_end(MachineFunction &MF) const { + return end()-2; // we hide regs F0, F1 from the end + } + }]; +} // these are the predicate registers, p0 (1/TRUE) is not here def PR : RegisterClass<"IA64", i1, 64, From duraid at octopus.com.au Wed Nov 2 01:33:10 2005 From: duraid at octopus.com.au (Duraid Madina) Date: Wed, 2 Nov 2005 01:33:10 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp Message-ID: <200511020733.BAA11601@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/IA64: IA64ISelDAGToDAG.cpp updated: 1.5 -> 1.6 --- Log message: "fix" support for FP constants (this code asserts in the scheduler, though) --- Diffs of the changes: (+4 -2) IA64ISelDAGToDAG.cpp | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) Index: llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp diff -u llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp:1.5 llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp:1.6 --- llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp:1.5 Tue Nov 1 20:35:04 2005 +++ llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp Wed Nov 2 01:32:59 2005 @@ -322,10 +322,12 @@ * case ISD::DYNAMIC_STACKALLOC: */ case ISD::ConstantFP: { + SDOperand Chain = CurDAG->getEntryNode(); // this is a constant, so.. + if (cast(N)->isExactlyValue(+0.0)) - return CurDAG->getRegister(IA64::F0, MVT::f64); // load 0.0 + return CurDAG->getCopyFromReg(Chain, IA64::F0, MVT::f64); else if (cast(N)->isExactlyValue(+1.0)) - return CurDAG->getRegister(IA64::F1, MVT::f64); // load 1.0 + return CurDAG->getCopyFromReg(Chain, IA64::F1, MVT::f64); else assert(0 && "Unexpected FP constant!"); } From criswell at cs.uiuc.edu Wed Nov 2 10:08:55 2005 From: criswell at cs.uiuc.edu (John Criswell) Date: Wed, 2 Nov 2005 10:08:55 -0600 Subject: [llvm-commits] CVS: llvm-www/releases/1.6/ Message-ID: <200511021608.KAA06953@choi.cs.uiuc.edu> Changes in directory llvm-www/releases/1.6: --- Log message: Directory /home/vadve/shared/PublicCVS/llvm-www/releases/1.6 added to the repository --- Diffs of the changes: (+0 -0) 0 files changed From alenhar2 at cs.uiuc.edu Wed Nov 2 10:15:27 2005 From: alenhar2 at cs.uiuc.edu (Andrew Lenharth) Date: Wed, 2 Nov 2005 10:15:27 -0600 Subject: [llvm-commits] CVS: llvm-test/TEST.nightly.report Message-ID: <200511021615.KAA09575@zion.cs.uiuc.edu> Changes in directory llvm-test: TEST.nightly.report updated: 1.37 -> 1.38 --- Log message: This does wonderful things for readability --- Diffs of the changes: (+3 -3) TEST.nightly.report | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) Index: llvm-test/TEST.nightly.report diff -u llvm-test/TEST.nightly.report:1.37 llvm-test/TEST.nightly.report:1.38 --- llvm-test/TEST.nightly.report:1.37 Wed Oct 26 11:45:24 2005 +++ llvm-test/TEST.nightly.report Wed Nov 2 10:15:15 2005 @@ -66,7 +66,7 @@ ["LLC" , 'TEST-RESULT-llc-time: program\s*([.0-9m:]+)', \&FormatTime], ["LLC-BETA" , 'TEST-RESULT-llc-beta-time: program\s*([.0-9m:]+)',\&FormatTime], ["JIT" , 'TEST-RESULT-jit-time: program\s*([.0-9m:]+)', \&FormatTime], - ["GCC/CBE" , \&GCCCBERatio], - ["GCC/LLC" , \&GCCLLCRatio], - ["GCC/LLC-BETA" , \&GCCLLC_BETARatio] + ["GCC/
        CBE" , \&GCCCBERatio], + ["GCC/
        LLC" , \&GCCLLCRatio], + ["GCC/
        LLC-BETA" , \&GCCLLC_BETARatio] ); From criswell at cs.uiuc.edu Wed Nov 2 10:48:46 2005 From: criswell at cs.uiuc.edu (John Criswell) Date: Wed, 2 Nov 2005 10:48:46 -0600 Subject: [llvm-commits] CVS: llvm-www/releases/1.6/cfrontend-1.6.i686-redhat-linux-gnu.tar.gz cfrontend-1.6.powerpc-apple-darwin7.9.0.tar.gz cfrontend-1.6.source.tar.gz cfrontend-1.6.sparc-sun-solaris2.8.tar.gz Message-ID: <200511021648.KAA07104@choi.cs.uiuc.edu> Changes in directory llvm-www/releases/1.6: cfrontend-1.6.i686-redhat-linux-gnu.tar.gz added (r1.1) cfrontend-1.6.powerpc-apple-darwin7.9.0.tar.gz added (r1.1) cfrontend-1.6.source.tar.gz added (r1.1) cfrontend-1.6.sparc-sun-solaris2.8.tar.gz added (r1.1) --- Log message: Initial versions of the LLVM GCC frontend. I really hope we don't change these. --- Diffs of the changes: (+0 -0) cfrontend-1.6.i686-redhat-linux-gnu.tar.gz | 0 cfrontend-1.6.powerpc-apple-darwin7.9.0.tar.gz | 0 cfrontend-1.6.source.tar.gz | 0 cfrontend-1.6.sparc-sun-solaris2.8.tar.gz | 0 4 files changed Index: llvm-www/releases/1.6/cfrontend-1.6.i686-redhat-linux-gnu.tar.gz Index: llvm-www/releases/1.6/cfrontend-1.6.powerpc-apple-darwin7.9.0.tar.gz Index: llvm-www/releases/1.6/cfrontend-1.6.source.tar.gz Index: llvm-www/releases/1.6/cfrontend-1.6.sparc-sun-solaris2.8.tar.gz From criswell at cs.uiuc.edu Wed Nov 2 10:53:24 2005 From: criswell at cs.uiuc.edu (John Criswell) Date: Wed, 2 Nov 2005 10:53:24 -0600 Subject: [llvm-commits] CVS: llvm-www/releases/1.6/LICENSE.TXT index.html Message-ID: <200511021653.KAA07244@choi.cs.uiuc.edu> Changes in directory llvm-www/releases/1.6: LICENSE.TXT added (r1.1) index.html added (r1.1) --- Log message: Add the license file and index page for this release directory. --- Diffs of the changes: (+79 -0) LICENSE.TXT | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ index.html | 7 +++++ 2 files changed, 79 insertions(+) Index: llvm-www/releases/1.6/LICENSE.TXT diff -c /dev/null llvm-www/releases/1.6/LICENSE.TXT:1.1 *** /dev/null Wed Nov 2 10:53:13 2005 --- llvm-www/releases/1.6/LICENSE.TXT Wed Nov 2 10:53:02 2005 *************** *** 0 **** --- 1,72 ---- + ============================================================================== + LLVM Release License + ============================================================================== + University of Illinois/NCSA + Open Source License + + Copyright (c) 2003, 2004, 2005 University of Illinois at Urbana-Champaign. + All rights reserved. + + Developed by: + + LLVM Team + + University of Illinois at Urbana-Champaign + + http://llvm.cs.uiuc.edu + + Permission is hereby granted, free of charge, to any person obtaining a copy of + this software and associated documentation files (the "Software"), to deal with + the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do + so, subject to the following conditions: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimers. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimers in the + documentation and/or other materials provided with the distribution. + + * Neither the names of the LLVM Team, University of Illinois at + Urbana-Champaign, nor the names of its contributors may be used to + endorse or promote products derived from this Software without specific + prior written permission. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE + SOFTWARE. + + ============================================================================== + Copyrights and Licenses for Third Party Software Distributed with LLVM: + ============================================================================== + The LLVM software contains code written by third parties. Such software will + have its own individual LICENSE.TXT file in the directory in which it appears. + This file will describe the copyrights, license, and restrictions which apply + to that code. + + The disclaimer of warranty in the University of Illinois Open Source License + applies to all code in the LLVM Distribution, and nothing in any of the + other licenses gives permission to use the names of the LLVM Team or the + University of Illinois to endorse or promote products derived from this + Software. + + The following pieces of software have additional or alternate copyrights, + licenses, and/or restrictions: + + Program Directory + ------- --------- + System Library llvm/lib/System + Compiler Driver llvm/tools/llvmc + PowerPC Backend llvm/lib/Target/PowerPC + bzip2 llvm/lib/Support/bzip2/LICENSE + Autoconf llvm/autoconf + llvm/projects/ModuleMaker/autoconf + llvm/projects/sample/autoconf + Burg llvm/utils/Burg + GNU Libc llvm/runtime/GCCLibraries/libc Index: llvm-www/releases/1.6/index.html diff -c /dev/null llvm-www/releases/1.6/index.html:1.1 *** /dev/null Wed Nov 2 10:53:24 2005 --- llvm-www/releases/1.6/index.html Wed Nov 2 10:53:02 2005 *************** *** 0 **** --- 1,7 ---- + + + + + + + From lattner at cs.uiuc.edu Wed Nov 2 11:43:10 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed, 2 Nov 2005 11:43:10 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/CBackend/Writer.cpp Message-ID: <200511021743.LAA13642@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/CBackend: Writer.cpp updated: 1.245 -> 1.246 --- Log message: Fix a QOI issue noticed by Markus F.X.J. Oberhumer. This fixes PR641: http://llvm.cs.uiuc.edu/PR641 --- Diffs of the changes: (+1 -0) Writer.cpp | 1 + 1 files changed, 1 insertion(+) Index: llvm/lib/Target/CBackend/Writer.cpp diff -u llvm/lib/Target/CBackend/Writer.cpp:1.245 llvm/lib/Target/CBackend/Writer.cpp:1.246 --- llvm/lib/Target/CBackend/Writer.cpp:1.245 Tue Sep 27 15:52:44 2005 +++ llvm/lib/Target/CBackend/Writer.cpp Wed Nov 2 11:42:58 2005 @@ -1731,6 +1731,7 @@ PM.add(createLowerGCPass()); PM.add(createLowerAllocationsPass(true)); PM.add(createLowerInvokePass()); + PM.add(createCFGSimplificationPass()); // clean up after lower invoke. PM.add(new CBackendNameAllUsedStructs()); PM.add(new CWriter(o, getIntrinsicLowering())); return false; From criswell at cs.uiuc.edu Wed Nov 2 12:06:43 2005 From: criswell at cs.uiuc.edu (John Criswell) Date: Wed, 2 Nov 2005 12:06:43 -0600 Subject: [llvm-commits] [release_16] CVS: llvm/test/Regression/CFrontend/2004-06-17-UnorderedCompares.c.tr 2005-02-20-AggregateSAVEEXPR.c Message-ID: <200511021806.MAA19233@choi.cs.uiuc.edu> Changes in directory llvm/test/Regression/CFrontend: 2004-06-17-UnorderedCompares.c.tr updated: 1.4 -> 1.4.4.1 2005-02-20-AggregateSAVEEXPR.c updated: 1.2 -> 1.2.6.1 --- Log message: Mark these as failing on sparc instead of sparcv9. The configure script no longer tells us that we're configuring for SparcV9 specifically. 2004-06-17-UnorderedCompares may work on SparcV8, but it's experiental anyway. 2005-02-20-AggregateSAVEEXPR should fail on any Solaris machine, as Solaris doesn't provide complex number support. --- Diffs of the changes: (+2 -2) 2004-06-17-UnorderedCompares.c.tr | 2 +- 2005-02-20-AggregateSAVEEXPR.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/test/Regression/CFrontend/2004-06-17-UnorderedCompares.c.tr diff -u llvm/test/Regression/CFrontend/2004-06-17-UnorderedCompares.c.tr:1.4 llvm/test/Regression/CFrontend/2004-06-17-UnorderedCompares.c.tr:1.4.4.1 --- llvm/test/Regression/CFrontend/2004-06-17-UnorderedCompares.c.tr:1.4 Mon Sep 12 20:03:53 2005 +++ llvm/test/Regression/CFrontend/2004-06-17-UnorderedCompares.c.tr Wed Nov 2 12:05:50 2005 @@ -1,5 +1,5 @@ // RUN: %llvmgcc -xc -std=c99 %s -c -o - | llvm-dis | grep -v llvm.isunordered | not grep call -// XFAIL: sparcv9|ia64 +// XFAIL: sparc|ia64 #include Index: llvm/test/Regression/CFrontend/2005-02-20-AggregateSAVEEXPR.c diff -u llvm/test/Regression/CFrontend/2005-02-20-AggregateSAVEEXPR.c:1.2 llvm/test/Regression/CFrontend/2005-02-20-AggregateSAVEEXPR.c:1.2.6.1 --- llvm/test/Regression/CFrontend/2005-02-20-AggregateSAVEEXPR.c:1.2 Fri Apr 1 17:16:23 2005 +++ llvm/test/Regression/CFrontend/2005-02-20-AggregateSAVEEXPR.c Wed Nov 2 12:05:50 2005 @@ -6,7 +6,7 @@ // We could modify the test to use only GCC extensions, but I don't know if // that would change the nature of the test. // -// XFAIL: sparcv9 +// XFAIL: sparc #include From criswell at cs.uiuc.edu Wed Nov 2 12:06:45 2005 From: criswell at cs.uiuc.edu (John Criswell) Date: Wed, 2 Nov 2005 12:06:45 -0600 Subject: [llvm-commits] [release_16] CVS: llvm/test/Regression/ExecutionEngine/parallel.ll Message-ID: <200511021806.MAA19259@choi.cs.uiuc.edu> Changes in directory llvm/test/Regression/ExecutionEngine: parallel.ll updated: 1.1 -> 1.1.4.1 --- Log message: Don't use -q; this option is not available on Solaris grep (and probably other, traditional UNIX greps). --- Diffs of the changes: (+1 -1) parallel.ll | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/test/Regression/ExecutionEngine/parallel.ll diff -u llvm/test/Regression/ExecutionEngine/parallel.ll:1.1 llvm/test/Regression/ExecutionEngine/parallel.ll:1.1.4.1 --- llvm/test/Regression/ExecutionEngine/parallel.ll:1.1 Tue Jul 12 19:35:12 2005 +++ llvm/test/Regression/ExecutionEngine/parallel.ll Wed Nov 2 12:06:28 2005 @@ -1,3 +1,3 @@ ; This isn't really an assembly file. This test runs the ParallelJIT example ; program and ensures its output is sane. -; RUN: ParallelJIT | grep -q "Fib2 returned 267914296" +; RUN: ParallelJIT | grep "Fib2 returned 267914296" From alenhar2 at cs.uiuc.edu Wed Nov 2 12:34:17 2005 From: alenhar2 at cs.uiuc.edu (Andrew Lenharth) Date: Wed, 2 Nov 2005 12:34:17 -0600 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/InstCombine/add.ll Message-ID: <200511021834.MAA16398@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/InstCombine: add.ll updated: 1.27 -> 1.28 --- Log message: This is missed by InstCombine, patch comming --- Diffs of the changes: (+7 -0) add.ll | 7 +++++++ 1 files changed, 7 insertions(+) Index: llvm/test/Regression/Transforms/InstCombine/add.ll diff -u llvm/test/Regression/Transforms/InstCombine/add.ll:1.27 llvm/test/Regression/Transforms/InstCombine/add.ll:1.28 --- llvm/test/Regression/Transforms/InstCombine/add.ll:1.27 Sat Sep 17 23:22:59 2005 +++ llvm/test/Regression/Transforms/InstCombine/add.ll Wed Nov 2 12:34:05 2005 @@ -206,3 +206,10 @@ %tmp.10 = or uint %tmp.7, %tmp.9 ; [#uses=1] ret uint %tmp.10 } + +long %test30(long %x) { + %tmp.2 = xor long %x, -9223372036854775808 + ;; Add of sign bit -> xor of sign bit. + %tmp.4 = add long %tmp.2, -9223372036854775808 + ret long %tmp.4 +} From alenhar2 at cs.uiuc.edu Wed Nov 2 12:35:51 2005 From: alenhar2 at cs.uiuc.edu (Andrew Lenharth) Date: Wed, 2 Nov 2005 12:35:51 -0600 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp Message-ID: <200511021835.MAA16503@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: InstructionCombining.cpp updated: 1.402 -> 1.403 --- Log message: make this 64 bit clean, fixed test30 of /Regression/Transforms/InstCombine/add.ll --- Diffs of the changes: (+1 -1) InstructionCombining.cpp | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.402 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.403 --- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.402 Mon Oct 31 12:35:52 2005 +++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp Wed Nov 2 12:35:40 2005 @@ -710,7 +710,7 @@ // X + (signbit) --> X ^ signbit if (ConstantInt *CI = dyn_cast(RHSC)) { unsigned NumBits = CI->getType()->getPrimitiveSizeInBits(); - uint64_t Val = CI->getRawValue() & (1ULL << NumBits)-1; + uint64_t Val = CI->getRawValue() & (~0ULL >> (64- NumBits)); if (Val == (1ULL << (NumBits-1))) return BinaryOperator::createXor(LHS, RHS); } From natebegeman at mac.com Wed Nov 2 12:43:10 2005 From: natebegeman at mac.com (Nate Begeman) Date: Wed, 2 Nov 2005 12:43:10 -0600 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Message-ID: <200511021843.MAA16689@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/SelectionDAG: DAGCombiner.cpp updated: 1.59 -> 1.60 --- Log message: Fix a crash that Andrew noticed, and add a pair of braces to unfconfuse XCode's indenting. --- Diffs of the changes: (+5 -5) DAGCombiner.cpp | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) Index: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp diff -u llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.59 llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.60 --- llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.59 Tue Nov 1 19:47:04 2005 +++ llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Wed Nov 2 12:42:59 2005 @@ -963,14 +963,14 @@ DAG.getConstant(N1C->getValue()&N01C->getValue(), VT)); } // fold (and (sign_extend_inreg x, i16 to i32), 1) -> (and x, 1) - if (N0.getOpcode() == ISD::SIGN_EXTEND_INREG) { + if (N1C && N0.getOpcode() == ISD::SIGN_EXTEND_INREG) { unsigned ExtendBits = MVT::getSizeInBits(cast(N0.getOperand(1))->getVT()); - if ((N1C->getValue() & (~0ULL << ExtendBits)) == 0) + if (ExtendBits == 64 || (N1C->getValue() & (~0ULL << ExtendBits) == 0)) return DAG.getNode(ISD::AND, VT, N0.getOperand(0), N1); } // fold (and (or x, 0xFFFF), 0xFF) -> 0xFF - if (N0.getOpcode() == ISD::OR && N1C) + if (N1C && N0.getOpcode() == ISD::OR) if (ConstantSDNode *ORI = dyn_cast(N0.getOperand(1))) if ((ORI->getValue() & N1C->getValue()) == N1C->getValue()) return N1; @@ -1031,7 +1031,7 @@ return DAG.getNode(N0.getOpcode(), VT, ANDNode, N0.getOperand(1)); } // fold (and (sra)) -> (and (srl)) when possible. - if (N0.getOpcode() == ISD::SRA && N0.Val->hasOneUse()) + if (N0.getOpcode() == ISD::SRA && N0.Val->hasOneUse()) { if (ConstantSDNode *N01C = dyn_cast(N0.getOperand(1))) { // If the RHS of the AND has zeros where the sign bits of the SRA will // land, turn the SRA into an SRL. @@ -1043,7 +1043,7 @@ return SDOperand(); } } - + } // fold (zext_inreg (extload x)) -> (zextload x) if (N0.getOpcode() == ISD::EXTLOAD) { MVT::ValueType EVT = cast(N0.getOperand(3))->getVT(); From criswell at cs.uiuc.edu Wed Nov 2 13:38:20 2005 From: criswell at cs.uiuc.edu (John Criswell) Date: Wed, 2 Nov 2005 13:38:20 -0600 Subject: [llvm-commits] [release_16] CVS: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Message-ID: <200511021938.NAA30182@choi.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/SelectionDAG: DAGCombiner.cpp updated: 1.58 -> 1.58.2.1 --- Log message: Merged in revision 1.60. --- Diffs of the changes: (+5 -5) DAGCombiner.cpp | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) Index: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp diff -u llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.58 llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.58.2.1 --- llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.58 Sun Oct 30 01:41:49 2005 +++ llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Wed Nov 2 13:38:00 2005 @@ -963,14 +963,14 @@ DAG.getConstant(N1C->getValue()&N01C->getValue(), VT)); } // fold (and (sign_extend_inreg x, i16 to i32), 1) -> (and x, 1) - if (N0.getOpcode() == ISD::SIGN_EXTEND_INREG) { + if (N1C && N0.getOpcode() == ISD::SIGN_EXTEND_INREG) { unsigned ExtendBits = MVT::getSizeInBits(cast(N0.getOperand(1))->getVT()); - if ((N1C->getValue() & (~0ULL << ExtendBits)) == 0) + if (ExtendBits == 64 || (N1C->getValue() & (~0ULL << ExtendBits) == 0)) return DAG.getNode(ISD::AND, VT, N0.getOperand(0), N1); } // fold (and (or x, 0xFFFF), 0xFF) -> 0xFF - if (N0.getOpcode() == ISD::OR && N1C) + if (N1C && N0.getOpcode() == ISD::OR) if (ConstantSDNode *ORI = dyn_cast(N0.getOperand(1))) if ((ORI->getValue() & N1C->getValue()) == N1C->getValue()) return N1; @@ -1031,7 +1031,7 @@ return DAG.getNode(N0.getOpcode(), VT, ANDNode, N0.getOperand(1)); } // fold (and (sra)) -> (and (srl)) when possible. - if (N0.getOpcode() == ISD::SRA && N0.Val->hasOneUse()) + if (N0.getOpcode() == ISD::SRA && N0.Val->hasOneUse()) { if (ConstantSDNode *N01C = dyn_cast(N0.getOperand(1))) { // If the RHS of the AND has zeros where the sign bits of the SRA will // land, turn the SRA into an SRL. @@ -1043,7 +1043,7 @@ return SDOperand(); } } - + } // fold (zext_inreg (extload x)) -> (zextload x) if (N0.getOpcode() == ISD::EXTLOAD) { MVT::ValueType EVT = cast(N0.getOperand(3))->getVT(); From lattner at cs.uiuc.edu Wed Nov 2 23:45:45 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed, 2 Nov 2005 23:45:45 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/IA64/IA64InstrInfo.td Message-ID: <200511030545.XAA13528@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/IA64: IA64InstrInfo.td updated: 1.25 -> 1.26 --- Log message: Fix a bug that prevented this pattern from matching --- Diffs of the changes: (+1 -1) IA64InstrInfo.td | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/lib/Target/IA64/IA64InstrInfo.td diff -u llvm/lib/Target/IA64/IA64InstrInfo.td:1.25 llvm/lib/Target/IA64/IA64InstrInfo.td:1.26 --- llvm/lib/Target/IA64/IA64InstrInfo.td:1.25 Wed Nov 2 00:49:37 2005 +++ llvm/lib/Target/IA64/IA64InstrInfo.td Wed Nov 2 23:45:34 2005 @@ -360,7 +360,7 @@ // load constants of various sizes // FIXME: prettyprint -ve constants def : Pat<(i64 immSExt14:$imm), (ADDS r0, immSExt14:$imm)>; def : Pat<(i64 imm64:$imm), (MOVL imm64:$imm)>; -def : Pat<(i1 1), (CMPEQ r0, r0)>; // TODO: this should just be a ref to p0 +def : Pat<(i1 -1), (CMPEQ r0, r0)>; // TODO: this should just be a ref to p0 // TODO: support postincrement (reg, imm9) loads+stores - this needs more // tablegen support From lattner at cs.uiuc.edu Wed Nov 2 23:46:23 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed, 2 Nov 2005 23:46:23 -0600 Subject: [llvm-commits] CVS: llvm/utils/TableGen/DAGISelEmitter.cpp Message-ID: <200511030546.XAA13632@zion.cs.uiuc.edu> Changes in directory llvm/utils/TableGen: DAGISelEmitter.cpp updated: 1.72 -> 1.73 --- Log message: Reject integer literals that are out of range for their type. --- Diffs of the changes: (+19 -1) DAGISelEmitter.cpp | 20 +++++++++++++++++++- 1 files changed, 19 insertions(+), 1 deletion(-) Index: llvm/utils/TableGen/DAGISelEmitter.cpp diff -u llvm/utils/TableGen/DAGISelEmitter.cpp:1.72 llvm/utils/TableGen/DAGISelEmitter.cpp:1.73 --- llvm/utils/TableGen/DAGISelEmitter.cpp:1.72 Wed Nov 2 00:49:14 2005 +++ llvm/utils/TableGen/DAGISelEmitter.cpp Wed Nov 2 23:46:11 2005 @@ -482,10 +482,28 @@ /// exception. bool TreePatternNode::ApplyTypeConstraints(TreePattern &TP, bool NotRegisters) { if (isLeaf()) { - if (DefInit *DI = dynamic_cast(getLeafValue())) + if (DefInit *DI = dynamic_cast(getLeafValue())) { // If it's a regclass or something else known, include the type. return UpdateNodeType(getIntrinsicType(DI->getDef(), NotRegisters, TP), TP); + } else if (IntInit *II = dynamic_cast(getLeafValue())) { + // Int inits are always integers. :) + bool MadeChange = UpdateNodeType(MVT::isInt, TP); + + if (hasTypeSet()) { + unsigned Size = MVT::getSizeInBits(getType()); + // Make sure that the value is representable for this type. + if (Size < 32) { + int Val = (II->getValue() << (32-Size)) >> (32-Size); + if (Val != II->getValue()) + TP.error("Sign-extended integer value '" + itostr(II->getValue()) + + "' is out of range for type 'MVT::" + + getEnumName(getType()) + "'!"); + } + } + + return MadeChange; + } return false; } From lattner at cs.uiuc.edu Thu Nov 3 01:04:17 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu, 3 Nov 2005 01:04:17 -0600 Subject: [llvm-commits] CVS: llvm/runtime/GCCLibraries/libg/ Message-ID: <200511030704.BAA18105@zion.cs.uiuc.edu> Changes in directory llvm/runtime/GCCLibraries/libg: --- Log message: Directory /home/vadve/shared/PublicCVS/llvm/runtime/GCCLibraries/libg added to the repository --- Diffs of the changes: (+0 -0) 0 files changed From lattner at cs.uiuc.edu Thu Nov 3 01:18:03 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu, 3 Nov 2005 01:18:03 -0600 Subject: [llvm-commits] CVS: llvm/tools/gccld/GenerateCode.cpp Message-ID: <200511030718.BAA18720@zion.cs.uiuc.edu> Changes in directory llvm/tools/gccld: GenerateCode.cpp updated: 1.54 -> 1.55 --- Log message: add a hack that fixes: llvm-gcc main.c -Wl,-native -o a.out -g This is important because it used by many configure scripts. John, please pull this onto the 1.6 branch. --- Diffs of the changes: (+4 -1) GenerateCode.cpp | 5 ++++- 1 files changed, 4 insertions(+), 1 deletion(-) Index: llvm/tools/gccld/GenerateCode.cpp diff -u llvm/tools/gccld/GenerateCode.cpp:1.54 llvm/tools/gccld/GenerateCode.cpp:1.55 --- llvm/tools/gccld/GenerateCode.cpp:1.54 Tue Oct 18 01:29:43 2005 +++ llvm/tools/gccld/GenerateCode.cpp Thu Nov 3 01:17:51 2005 @@ -423,7 +423,10 @@ // Add in the libraries to link. for (unsigned index = 0; index < Libraries.size(); index++) - if (Libraries[index] != "crtend") { + // HACK: If this is libg, discard it. This gets added by the compiler + // driver when doing: 'llvm-gcc main.c -Wl,-native -o a.out -g'. Note that + // this should really be fixed by changing the llvm-gcc compiler driver. + if (Libraries[index] != "crtend" && Libraries[index] != "g") { std::string Tmp = "-l"+Libraries[index]; StringsToDelete.push_back(strdup(Tmp.c_str())); args.push_back(StringsToDelete.back()); From duraid at octopus.com.au Thu Nov 3 04:09:52 2005 From: duraid at octopus.com.au (Duraid Madina) Date: Thu, 3 Nov 2005 04:09:52 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/IA64/IA64InstrInfo.td Message-ID: <200511031009.EAA29724@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/IA64: IA64InstrInfo.td updated: 1.26 -> 1.27 --- Log message: add pattern to load constant 0 into a predicate reg --- Diffs of the changes: (+2 -0) IA64InstrInfo.td | 2 ++ 1 files changed, 2 insertions(+) Index: llvm/lib/Target/IA64/IA64InstrInfo.td diff -u llvm/lib/Target/IA64/IA64InstrInfo.td:1.26 llvm/lib/Target/IA64/IA64InstrInfo.td:1.27 --- llvm/lib/Target/IA64/IA64InstrInfo.td:1.26 Wed Nov 2 23:45:34 2005 +++ llvm/lib/Target/IA64/IA64InstrInfo.td Thu Nov 3 04:09:32 2005 @@ -361,6 +361,8 @@ def : Pat<(i64 immSExt14:$imm), (ADDS r0, immSExt14:$imm)>; def : Pat<(i64 imm64:$imm), (MOVL imm64:$imm)>; def : Pat<(i1 -1), (CMPEQ r0, r0)>; // TODO: this should just be a ref to p0 +def : Pat<(i1 0), (CMPNE r0, r0)>; // TODO: any instruction actually *using* + // this predicate should be killed! // TODO: support postincrement (reg, imm9) loads+stores - this needs more // tablegen support From criswell at cs.uiuc.edu Thu Nov 3 09:25:24 2005 From: criswell at cs.uiuc.edu (John Criswell) Date: Thu, 3 Nov 2005 09:25:24 -0600 Subject: [llvm-commits] [release_16] CVS: llvm/autoconf/configure.ac Message-ID: <200511031525.JAA30995@choi.cs.uiuc.edu> Changes in directory llvm/autoconf: configure.ac updated: 1.195 -> 1.195.4.1 --- Log message: Updated the version number. Get the UIUC copyright to actually print. --- Diffs of the changes: (+2 -2) configure.ac | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/autoconf/configure.ac diff -u llvm/autoconf/configure.ac:1.195 llvm/autoconf/configure.ac:1.195.4.1 --- llvm/autoconf/configure.ac:1.195 Wed Aug 24 05:43:10 2005 +++ llvm/autoconf/configure.ac Thu Nov 3 09:25:04 2005 @@ -31,12 +31,12 @@ dnl===-----------------------------------------------------------------------=== dnl Initialize autoconf and define the package name, version number and dnl email address for reporting bugs. -AC_INIT([[llvm]],[[1.6cvs]],[llvmbugs at cs.uiuc.edu]) +AC_INIT([[llvm]],[[1.6]],[llvmbugs at cs.uiuc.edu]) dnl Provide a copyright substitution and ensure the copyright notice is included dnl in the output of --version option of the generated configure script. AC_SUBST(LLVM_COPYRIGHT,["Copyright (c) 2003-2005 University of Illinois at Urbana-Champaign."]) -AC_COPYRIGHT($LLVM_COPYRIGHT) +AC_COPYRIGHT([Copyright (c) 2003-2005 University of Illinois at Urbana-Champaign.]) dnl Indicate that we require autoconf 2.59 or later. Ths is needed because we dnl use some autoconf macros only available in 2.59. From criswell at cs.uiuc.edu Thu Nov 3 09:25:24 2005 From: criswell at cs.uiuc.edu (John Criswell) Date: Thu, 3 Nov 2005 09:25:24 -0600 Subject: [llvm-commits] [release_16] CVS: llvm/configure Message-ID: <200511031525.JAA30996@choi.cs.uiuc.edu> Changes in directory llvm: configure updated: 1.198 -> 1.198.4.1 --- Log message: Updated the version number. Get the UIUC copyright to actually print. --- Diffs of the changes: (+11 -11) configure | 22 +++++++++++----------- 1 files changed, 11 insertions(+), 11 deletions(-) Index: llvm/configure diff -u llvm/configure:1.198 llvm/configure:1.198.4.1 --- llvm/configure:1.198 Wed Aug 24 05:07:21 2005 +++ llvm/configure Thu Nov 3 09:24:58 2005 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.59 for llvm 1.6cvs. +# Generated by GNU Autoconf 2.59 for llvm 1.6. # # Report bugs to . # @@ -8,7 +8,7 @@ # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. # -# $LLVM_COPYRIGHT +# Copyright (c) 2003-2005 University of Illinois at Urbana-Champaign. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## @@ -425,8 +425,8 @@ # Identity of this package. PACKAGE_NAME='llvm' PACKAGE_TARNAME='-llvm-' -PACKAGE_VERSION='1.6cvs' -PACKAGE_STRING='llvm 1.6cvs' +PACKAGE_VERSION='1.6' +PACKAGE_STRING='llvm 1.6' PACKAGE_BUGREPORT='llvmbugs at cs.uiuc.edu' ac_unique_file="lib/VMCore/Module.cpp" @@ -964,7 +964,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures llvm 1.6cvs to adapt to many kinds of systems. +\`configure' configures llvm 1.6 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1026,7 +1026,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of llvm 1.6cvs:";; + short | recursive ) echo "Configuration of llvm 1.6:";; esac cat <<\_ACEOF @@ -1173,14 +1173,14 @@ test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF -llvm configure 1.6cvs +llvm configure 1.6 generated by GNU Autoconf 2.59 Copyright (C) 2003 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. -$LLVM_COPYRIGHT +Copyright (c) 2003-2005 University of Illinois at Urbana-Champaign. _ACEOF exit 0 fi @@ -1189,7 +1189,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by llvm $as_me 1.6cvs, which was +It was created by llvm $as_me 1.6, which was generated by GNU Autoconf 2.59. Invocation command line was $ $0 $@ @@ -31044,7 +31044,7 @@ } >&5 cat >&5 <<_CSEOF -This file was extended by llvm $as_me 1.6cvs, which was +This file was extended by llvm $as_me 1.6, which was generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -31107,7 +31107,7 @@ cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -llvm config.status 1.6cvs +llvm config.status 1.6 configured by $0, generated by GNU Autoconf 2.59, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" From criswell at cs.uiuc.edu Thu Nov 3 09:42:45 2005 From: criswell at cs.uiuc.edu (John Criswell) Date: Thu, 3 Nov 2005 09:42:45 -0600 Subject: [llvm-commits] [release_16] CVS: llvm/tools/gccld/GenerateCode.cpp Message-ID: <200511031542.JAA09474@choi.cs.uiuc.edu> Changes in directory llvm/tools/gccld: GenerateCode.cpp updated: 1.54 -> 1.54.4.1 --- Log message: Merge in hack from Chris that discards libg. --- Diffs of the changes: (+4 -1) GenerateCode.cpp | 5 ++++- 1 files changed, 4 insertions(+), 1 deletion(-) Index: llvm/tools/gccld/GenerateCode.cpp diff -u llvm/tools/gccld/GenerateCode.cpp:1.54 llvm/tools/gccld/GenerateCode.cpp:1.54.4.1 --- llvm/tools/gccld/GenerateCode.cpp:1.54 Tue Oct 18 01:29:43 2005 +++ llvm/tools/gccld/GenerateCode.cpp Thu Nov 3 09:42:27 2005 @@ -423,7 +423,10 @@ // Add in the libraries to link. for (unsigned index = 0; index < Libraries.size(); index++) - if (Libraries[index] != "crtend") { + // HACK: If this is libg, discard it. This gets added by the compiler + // driver when doing: 'llvm-gcc main.c -Wl,-native -o a.out -g'. Note that + // this should really be fixed by changing the llvm-gcc compiler driver. + if (Libraries[index] != "crtend" && Libraries[index] != "g") { std::string Tmp = "-l"+Libraries[index]; StringsToDelete.push_back(strdup(Tmp.c_str())); args.push_back(StringsToDelete.back()); From criswell at cs.uiuc.edu Thu Nov 3 12:26:35 2005 From: criswell at cs.uiuc.edu (John Criswell) Date: Thu, 3 Nov 2005 12:26:35 -0600 Subject: [llvm-commits] [release_16] CVS: llvm/docs/GettingStarted.html Message-ID: <200511031826.MAA18060@choi.cs.uiuc.edu> Changes in directory llvm/docs: GettingStarted.html updated: 1.120 -> 1.120.4.1 --- Log message: Include the CVS tag for the 1.6 release. --- Diffs of the changes: (+2 -1) GettingStarted.html | 3 ++- 1 files changed, 2 insertions(+), 1 deletion(-) Index: llvm/docs/GettingStarted.html diff -u llvm/docs/GettingStarted.html:1.120 llvm/docs/GettingStarted.html:1.120.4.1 --- llvm/docs/GettingStarted.html:1.120 Mon Sep 5 23:07:15 2005 +++ llvm/docs/GettingStarted.html Thu Nov 3 12:26:14 2005 @@ -661,6 +661,7 @@ labels:

          +
        • Release 1.6: RELEASE_16
        • Release 1.5: RELEASE_15
        • Release 1.4: RELEASE_14
        • Release 1.3: RELEASE_13
        • @@ -1540,7 +1541,7 @@ Chris Lattner
          Reid Spencer
          The LLVM Compiler Infrastructure
          - Last modified: $Date: 2005/09/06 04:07:15 $ + Last modified: $Date: 2005/11/03 18:26:14 $ From lattner at cs.uiuc.edu Thu Nov 3 12:28:33 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu, 3 Nov 2005 12:28:33 -0600 Subject: [llvm-commits] CVS: llvm/docs/GettingStarted.html Message-ID: <200511031828.MAA04131@zion.cs.uiuc.edu> Changes in directory llvm/docs: GettingStarted.html updated: 1.120 -> 1.121 --- Log message: Per bug 655: http://llvm.cs.uiuc.edu/PR655 , give people more options in case 1.35 doesn't build on their system. --- Diffs of the changes: (+2 -2) GettingStarted.html | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/docs/GettingStarted.html diff -u llvm/docs/GettingStarted.html:1.120 llvm/docs/GettingStarted.html:1.121 --- llvm/docs/GettingStarted.html:1.120 Mon Sep 5 23:07:15 2005 +++ llvm/docs/GettingStarted.html Thu Nov 3 12:28:22 2005 @@ -362,7 +362,7 @@ Bison - 1.35 + 1.28, 1.35, or 2.0 YACC compiler @@ -1540,7 +1540,7 @@ Chris Lattner
          Reid Spencer
          The LLVM Compiler Infrastructure
          - Last modified: $Date: 2005/09/06 04:07:15 $ + Last modified: $Date: 2005/11/03 18:28:22 $ From lattner at cs.uiuc.edu Thu Nov 3 12:32:18 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu, 3 Nov 2005 12:32:18 -0600 Subject: [llvm-commits] CVS: llvm/docs/GettingStarted.html Message-ID: <200511031832.MAA04252@zion.cs.uiuc.edu> Changes in directory llvm/docs: GettingStarted.html updated: 1.121 -> 1.122 --- Log message: Add more bison versions, thanks to Vladimir --- Diffs of the changes: (+2 -2) GettingStarted.html | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/docs/GettingStarted.html diff -u llvm/docs/GettingStarted.html:1.121 llvm/docs/GettingStarted.html:1.122 --- llvm/docs/GettingStarted.html:1.121 Thu Nov 3 12:28:22 2005 +++ llvm/docs/GettingStarted.html Thu Nov 3 12:32:06 2005 @@ -362,7 +362,7 @@ Bison - 1.28, 1.35, or 2.0 + 1.28, 1.35, 1.75, or 2.0 (not 1.85) YACC compiler @@ -1540,7 +1540,7 @@ Chris Lattner
          Reid Spencer
          The LLVM Compiler Infrastructure
          - Last modified: $Date: 2005/11/03 18:28:22 $ + Last modified: $Date: 2005/11/03 18:32:06 $ From duraid at octopus.com.au Thu Nov 3 16:00:28 2005 From: duraid at octopus.com.au (Duraid Madina) Date: Thu, 3 Nov 2005 16:00:28 -0600 Subject: [llvm-commits] CVS: llvm-test/Makefile.programs Message-ID: <200511032200.QAA05559@zion.cs.uiuc.edu> Changes in directory llvm-test: Makefile.programs updated: 1.176 -> 1.177 --- Log message: fun with scheduling on ia64 --- Diffs of the changes: (+1 -1) Makefile.programs | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm-test/Makefile.programs diff -u llvm-test/Makefile.programs:1.176 llvm-test/Makefile.programs:1.177 --- llvm-test/Makefile.programs:1.176 Mon Oct 31 15:18:30 2005 +++ llvm-test/Makefile.programs Thu Nov 3 16:00:16 2005 @@ -194,7 +194,7 @@ #-enable-alpha-intfpdiv -enable-alpha-FTOI endif ifeq ($(ARCH),IA64) -LLCBETAOPTION := -enable-ia64-dag-isel +LLCBETAOPTION := -enable-ia64-dag-isel -sched=simple endif ifeq ($(ARCH),x86) LLCBETAOPTION := -enable-x86-fastcc From lattner at cs.uiuc.edu Thu Nov 3 16:33:59 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu, 3 Nov 2005 16:33:59 -0600 Subject: [llvm-commits] CVS: llvm/docs/ReleaseNotes.html Message-ID: <200511032233.QAA05967@zion.cs.uiuc.edu> Changes in directory llvm/docs: ReleaseNotes.html updated: 1.340 -> 1.341 --- Log message: Fix mac os spelling --- Diffs of the changes: (+5 -5) ReleaseNotes.html | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) Index: llvm/docs/ReleaseNotes.html diff -u llvm/docs/ReleaseNotes.html:1.340 llvm/docs/ReleaseNotes.html:1.341 --- llvm/docs/ReleaseNotes.html:1.340 Mon Oct 31 13:07:29 2005 +++ llvm/docs/ReleaseNotes.html Thu Nov 3 16:33:48 2005 @@ -64,7 +64,7 @@ release incorporates a large number of enhancements and additions (primarily in the code generator), which combine to improve the quality of the code generated by LLVM by up to 30% in some cases. This release is also the first release to -have first-class support for Mac OS/X: all of the major bugs have been shaken +have first-class support for Mac OS X: all of the major bugs have been shaken out and it is now as well supported as Linux on X86.

        @@ -172,7 +172,7 @@ giving up completely. In addition, the JIT debugging mode of bugpoint is much faster.
      • LLVM now includes Xcode project files in the llvm/Xcode directory.
      • -
      • LLVM now supports Mac OS/X on Intel.
      • +
      • LLVM now supports Mac OS X on Intel.
      • LLVM now builds cleanly with GCC 4.1.
      • @@ -193,7 +193,7 @@ we find that it often speeds up programs from 10-40% depending on the program.
      • The code produced when exception handling is enabled is far more - efficient in some cases, particularly on Mac OS/X.
      • + efficient in some cases, particularly on Mac OS X. @@ -229,7 +229,7 @@
        1. A vast number of bugs have been fixed in the PowerPC backend and in - llvm-gcc when configured for Mac OS/X (particularly relating to ABI + llvm-gcc when configured for Mac OS X (particularly relating to ABI issues). For example: PR449, PR594, @@ -715,7 +715,7 @@ src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01!" /> The LLVM Compiler Infrastructure
          - Last modified: $Date: 2005/10/31 19:07:29 $ + Last modified: $Date: 2005/11/03 22:33:48 $ From lattner at cs.uiuc.edu Thu Nov 3 16:34:49 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu, 3 Nov 2005 16:34:49 -0600 Subject: [llvm-commits] CVS: llvm-www/testresults/index.html Message-ID: <200511032234.QAA06042@zion.cs.uiuc.edu> Changes in directory llvm-www/testresults: index.html updated: 1.37 -> 1.38 --- Log message: persephone got upgraded to tiger --- Diffs of the changes: (+1 -1) index.html | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm-www/testresults/index.html diff -u llvm-www/testresults/index.html:1.37 llvm-www/testresults/index.html:1.38 --- llvm-www/testresults/index.html:1.37 Sat Oct 29 11:32:45 2005 +++ llvm-www/testresults/index.html Thu Nov 3 16:34:38 2005 @@ -41,7 +41,7 @@

          PowerPC

            -
          1. Mac OS X 10.3 +
          2. Mac OS X 10.4 "Panther" on PowerPC G5 (dual 1.8Ghz CPU) -- debug build
          From jlaskey at apple.com Thu Nov 3 16:47:54 2005 From: jlaskey at apple.com (Jim Laskey) Date: Thu, 3 Nov 2005 16:47:54 -0600 Subject: [llvm-commits] CVS: llvm/include/llvm/Target/TargetInstrItineraries.h Message-ID: <200511032247.QAA06144@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/Target: TargetInstrItineraries.h updated: 1.3 -> 1.4 --- Log message: 1. Remove ranges from itinerary data. 2. Tidy up the subtarget emittined code. --- Diffs of the changes: (+7 -20) TargetInstrItineraries.h | 27 +++++++-------------------- 1 files changed, 7 insertions(+), 20 deletions(-) Index: llvm/include/llvm/Target/TargetInstrItineraries.h diff -u llvm/include/llvm/Target/TargetInstrItineraries.h:1.3 llvm/include/llvm/Target/TargetInstrItineraries.h:1.4 --- llvm/include/llvm/Target/TargetInstrItineraries.h:1.3 Tue Nov 1 22:03:16 2005 +++ llvm/include/llvm/Target/TargetInstrItineraries.h Thu Nov 3 16:47:42 2005 @@ -16,7 +16,6 @@ #ifndef LLVM_TARGET_TARGETINSTRITINERARIES_H #define LLVM_TARGET_TARGETINSTRITINERARIES_H -#include "llvm/Support/Debug.h" #include namespace llvm { @@ -49,36 +48,26 @@ // Instruction itinerary Data - Itinerary data supplied by a subtarget to be // used by a target. // -class InstrItineraryData { +struct InstrItineraryData { InstrStage *Stages; // Array of stages selected - unsigned NStages; // Number of stages InstrItinerary *Itineratries; // Array of itineraries selected - unsigned NItineraries; // Number of itineraries (actually classes) -public: - - // - // Ctors. - // - InstrItineraryData() - : Stages(NULL), NStages(0), Itineratries(NULL), NItineraries(0) - {} - InstrItineraryData(InstrStage *S, unsigned NS, InstrItinerary *I, unsigned NI) - : Stages(S), NStages(NS), Itineratries(I), NItineraries(NI) - {} +// +// Ctors. +// + InstrItineraryData() : Stages(NULL), Itineratries(NULL) {} + InstrItineraryData(InstrStage *S, InstrItinerary *I) : Stages(S), Itineratries(I) {} // // isEmpty - Returns true if there are no itineraries. // - inline bool isEmpty() const { return NItineraries == 0; } + inline bool isEmpty() const { return Itineratries == NULL; } // // begin - Return the first stage of the itinerary. // inline InstrStage *begin(unsigned ItinClassIndx) const { - assert(ItinClassIndx < NItineraries && "Itinerary index out of range"); unsigned StageIdx = Itineratries[ItinClassIndx].First; - assert(StageIdx < NStages && "Stage index out of range"); return Stages + StageIdx; } @@ -86,9 +75,7 @@ // end - Return the last+1 stage of the itinerary. // inline InstrStage *end(unsigned ItinClassIndx) const { - assert(ItinClassIndx < NItineraries && "Itinerary index out of range"); unsigned StageIdx = Itineratries[ItinClassIndx].Last; - assert(StageIdx < NStages && "Stage index out of range"); return Stages + StageIdx; } }; From jlaskey at apple.com Thu Nov 3 16:47:54 2005 From: jlaskey at apple.com (Jim Laskey) Date: Thu, 3 Nov 2005 16:47:54 -0600 Subject: [llvm-commits] CVS: llvm/utils/TableGen/SubtargetEmitter.cpp Message-ID: <200511032247.QAA06148@zion.cs.uiuc.edu> Changes in directory llvm/utils/TableGen: SubtargetEmitter.cpp updated: 1.13 -> 1.14 --- Log message: 1. Remove ranges from itinerary data. 2. Tidy up the subtarget emittined code. --- Diffs of the changes: (+11 -9) SubtargetEmitter.cpp | 20 +++++++++++--------- 1 files changed, 11 insertions(+), 9 deletions(-) Index: llvm/utils/TableGen/SubtargetEmitter.cpp diff -u llvm/utils/TableGen/SubtargetEmitter.cpp:1.13 llvm/utils/TableGen/SubtargetEmitter.cpp:1.14 --- llvm/utils/TableGen/SubtargetEmitter.cpp:1.13 Tue Nov 1 14:07:00 2005 +++ llvm/utils/TableGen/SubtargetEmitter.cpp Thu Nov 3 16:47:42 2005 @@ -223,7 +223,7 @@ // Form string as ,{ cycles, u1 | u2 | ... | un } int Cycles = Stage->getValueAsInt("Cycles"); - ItinString += " ,{ " + itostr(Cycles) + ", "; + ItinString += " { " + itostr(Cycles) + ", "; // Get unit list std::vector UnitList = Stage->getValueAsListOfDefs("Units"); @@ -260,7 +260,7 @@ // Begin stages table OS << "static llvm::InstrStage Stages[] = {\n" - " { 0, 0 } // No itinerary\n"; + " { 0, 0 }, // No itinerary\n"; unsigned ItinEnum = 1; std::map ItinMap; @@ -296,8 +296,9 @@ // If new itinerary if (Find == 0) { - // Emit as ,{ cycles, u1 | u2 | ... | un } // index - OS << ItinString << " // " << ItinEnum << "\n"; + // Emit as { cycles, u1 | u2 | ... | un }, // index + OS << ItinString << ", // " << ItinEnum << "\n"; + // Record Itin class number ItinMap[ItinString] = Find = ItinEnum++; } @@ -316,6 +317,8 @@ ProcList.push_back(ItinList); } + // Closing stage + OS << " { 0, 0 } // End itinerary\n"; // End stages table OS << "};\n"; @@ -390,7 +393,7 @@ // Begin processor table OS << "\n"; OS << "// Sorted (by key) array of itineraries for CPU subtype.\n" - << "static const llvm::SubtargetInfoKV SubTypeInfoKV[] = {\n"; + << "static const llvm::SubtargetInfoKV ProcItinKV[] = {\n"; // For each processor for (unsigned i = 0, N = ProcessorList.size(); i < N;) { @@ -418,7 +421,7 @@ // Emit size of table OS<<"\nenum {\n"; - OS<<" SubTypeInfoKVSize = sizeof(SubTypeInfoKV)/" + OS<<" ProcItinKVSize = sizeof(ProcItinKV)/" "sizeof(llvm::SubtargetInfoKV)\n"; OS<<"};\n"; } @@ -479,9 +482,8 @@ if (HasItineraries) { OS << "\n" << " InstrItinerary *Itinerary = (InstrItinerary *)" - "Features.getInfo(SubTypeInfoKV, SubTypeInfoKVSize);\n" - " InstrItins = InstrItineraryData(Stages, StagesSize, " - "Itinerary, ItinClassesSize);\n"; + "Features.getInfo(ProcItinKV, ProcItinKVSize);\n" + " InstrItins = InstrItineraryData(Stages, Itinerary);\n"; } OS << "}\n"; From lattner at cs.uiuc.edu Thu Nov 3 18:28:47 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu, 3 Nov 2005 18:28:47 -0600 Subject: [llvm-commits] CVS: llvm-www/testresults/index.html Message-ID: <200511040028.SAA06739@zion.cs.uiuc.edu> Changes in directory llvm-www/testresults: index.html updated: 1.38 -> 1.39 --- Log message: update codename --- Diffs of the changes: (+1 -1) index.html | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm-www/testresults/index.html diff -u llvm-www/testresults/index.html:1.38 llvm-www/testresults/index.html:1.39 --- llvm-www/testresults/index.html:1.38 Thu Nov 3 16:34:38 2005 +++ llvm-www/testresults/index.html Thu Nov 3 18:28:36 2005 @@ -42,7 +42,7 @@
          1. Mac OS X 10.4 -"Panther" on PowerPC G5 (dual 1.8Ghz CPU) -- debug build
          2. +"Tiger" on PowerPC G5 (dual 1.8Ghz CPU) -- debug build

          Sparc V9

          From duraid at octopus.com.au Thu Nov 3 18:58:08 2005 From: duraid at octopus.com.au (Duraid Madina) Date: Thu, 3 Nov 2005 18:58:08 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/IA64/IA64InstrInfo.td Message-ID: <200511040058.SAA06807@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/IA64: IA64InstrInfo.td updated: 1.27 -> 1.28 --- Log message: fun with predicates! (add TRUNC i64->i1, AND i1 i1, fix XOR i1 i1) --- Diffs of the changes: (+97 -41) IA64InstrInfo.td | 137 ++++++++++++++++++++++++++++++++++++++----------------- 1 files changed, 97 insertions(+), 40 deletions(-) Index: llvm/lib/Target/IA64/IA64InstrInfo.td diff -u llvm/lib/Target/IA64/IA64InstrInfo.td:1.27 llvm/lib/Target/IA64/IA64InstrInfo.td:1.28 --- llvm/lib/Target/IA64/IA64InstrInfo.td:1.27 Thu Nov 3 04:09:32 2005 +++ llvm/lib/Target/IA64/IA64InstrInfo.td Thu Nov 3 18:57:56 2005 @@ -105,6 +105,10 @@ "adds $dst = $imm, $src1;;", [(set GR:$dst, (add GR:$src1, immSExt14:$imm))]>; +def PADDS: AForm_DAG<0x03, 0x0b, (ops GR:$dst, GR:$src1, s14imm:$imm, PR:$qp), + "($qp) adds $dst = $imm, $src1;;", + []>; + def MOVL : AForm_DAG<0x03, 0x0b, (ops GR:$dst, s64imm:$imm), "movl $dst = $imm;;", [(set GR:$dst, imm64:$imm)]>; @@ -225,47 +229,6 @@ def pOR : AForm<0x03, 0x0b, (ops GR:$dst, GR:$src1, GR:$src2, PR:$qp), "($qp) or $dst = $src1, $src2;;">; -def PCMPEQUNCR0R0 : AForm<0x03, 0x0b, (ops PR:$dst, PR:$qp), - "($qp) cmp.eq.unc $dst, p0 = r0, r0;;">; - -let isTwoAddress=1 in -def TPCMPEQR0R0 : AForm<0x03, 0x0b, (ops PR:$dst, PR:$bogus, PR:$qp), - "($qp) cmp.eq $dst, p0 = r0, r0;;">; - -/* our pseudocode for OR on predicates is: -pC = pA OR pB -------------- -(pA) cmp.eq.unc pC,p0 = r0,r0 // pC = pA - ;; -(pB) cmp.eq pC,p0 = r0,r0 // if (pB) pC = 1 */ - -def bOR : Pat<(or PR:$src1, PR:$src2), - (TPCMPEQR0R0 (PCMPEQUNCR0R0 PR:$src1), PR:$src2)>; - -// FIXME: these are bogus -def bXOR : Pat<(xor PR:$src1, PR:$src2), - (PCMPEQUNCR0R0 PR:$src1)>; - -def XOR : AForm_DAG<0x03, 0x0b, (ops GR:$dst, GR:$src1, GR:$src2), - "xor $dst = $src1, $src2;;", - [(set GR:$dst, (xor GR:$src1, GR:$src2))]>; - -def SHLADD: AForm_DAG<0x03, 0x0b, (ops GR:$dst,GR:$src1,s64imm:$imm,GR:$src2), - "shladd $dst = $src1, $imm, $src2;;", - [(set GR:$dst, (add GR:$src2, (shl GR:$src1, isSHLADDimm:$imm)))]>; - -def SHL : AForm_DAG<0x03, 0x0b, (ops GR:$dst, GR:$src1, GR:$src2), - "shl $dst = $src1, $src2;;", - [(set GR:$dst, (shl GR:$src1, GR:$src2))]>; - -def SHRU : AForm_DAG<0x03, 0x0b, (ops GR:$dst, GR:$src1, GR:$src2), - "shr.u $dst = $src1, $src2;;", - [(set GR:$dst, (srl GR:$src1, GR:$src2))]>; - -def SHRS : AForm_DAG<0x03, 0x0b, (ops GR:$dst, GR:$src1, GR:$src2), - "shr $dst = $src1, $src2;;", - [(set GR:$dst, (sra GR:$src1, GR:$src2))]>; - // the following are all a bit unfortunate: we throw away the complement // of the compare! def CMPEQ : AForm_DAG<0x03, 0x0b, (ops PR:$dst, GR:$src1, GR:$src2), @@ -331,6 +294,99 @@ "fcmp.geu $dst, p0 = $src1, $src2;;", [(set PR:$dst, (setuge FP:$src1, FP:$src2))]>; +def PCMPEQUNCR0R0 : AForm<0x03, 0x0b, (ops PR:$dst, PR:$qp), + "($qp) cmp.eq.unc $dst, p0 = r0, r0;;">; + +def : Pat<(trunc GR:$src), // truncate i64 to i1 + (CMPNE GR:$src, r0)>; // $src!=0? If so, PR:$dst=true + +let isTwoAddress=1 in { + def TPCMPEQR0R0 : AForm<0x03, 0x0b, (ops PR:$dst, PR:$bogus, PR:$qp), + "($qp) cmp.eq $dst, p0 = r0, r0;;">; + def TPCMPNER0R0 : AForm<0x03, 0x0b, (ops PR:$dst, PR:$bogus, PR:$qp), + "($qp) cmp.ne $dst, p0 = r0, r0;;">; +} + +/* our pseudocode for OR on predicates is: +pC = pA OR pB +------------- +(pA) cmp.eq.unc pC,p0 = r0,r0 // pC = pA + ;; +(pB) cmp.eq pC,p0 = r0,r0 // if (pB) pC = 1 */ + +def bOR : Pat<(or PR:$src1, PR:$src2), + (TPCMPEQR0R0 (PCMPEQUNCR0R0 PR:$src1), PR:$src2)>; + +/* our pseudocode for AND on predicates is: + * +(pA) cmp.eq.unc pC,p0 = r0,r0 // pC = pA + cmp.eq pTemp,p0 = r0,r0 // pTemp = NOT pB + ;; +(pB) cmp.ne pTemp,p0 = r0,r0 + ;; +(pTemp)cmp.ne pC,p0 = r0,r0 // if (NOT pB) pC = 0 */ + +def bAND : Pat<(and PR:$src1, PR:$src2), + ( TPCMPNER0R0 (PCMPEQUNCR0R0 PR:$src1), + (TPCMPNER0R0 (CMPEQ r0, r0), PR:$src2) )>; + +/* one possible routine for XOR on predicates is: + + // Compute px = py ^ pz + // using sum of products: px = (py & !pz) | (pz & !py) + // Uses 5 instructions in 3 cycles. + // cycle 1 +(pz) cmp.eq.unc px = r0, r0 // px = pz +(py) cmp.eq.unc pt = r0, r0 // pt = py + ;; + // cycle 2 +(pt) cmp.ne.and px = r0, r0 // px = px & !pt (px = pz & !pt) +(pz) cmp.ne.and pt = r0, r0 // pt = pt & !pz + ;; + } { .mmi + // cycle 3 +(pt) cmp.eq.or px = r0, r0 // px = px | pt + +*** Another, which we use here, requires one scratch GR. it is: + + mov rt = 0 // initialize rt off critical path + ;; + + // cycle 1 +(pz) cmp.eq.unc px = r0, r0 // px = pz +(pz) mov rt = 1 // rt = pz + ;; + // cycle 2 +(py) cmp.ne px = 1, rt // if (py) px = !pz + +.. these routines kindly provided by Jim Hull +*/ + +def bXOR : Pat<(xor PR:$src1, PR:$src2), + (TPCMPIMM8NE (PCMPEQUNCR0R0 PR:$src2), 1, + (PADDS r0, 1, PR:$src2), + PR:$src1)>; + +def XOR : AForm_DAG<0x03, 0x0b, (ops GR:$dst, GR:$src1, GR:$src2), + "xor $dst = $src1, $src2;;", + [(set GR:$dst, (xor GR:$src1, GR:$src2))]>; + +def SHLADD: AForm_DAG<0x03, 0x0b, (ops GR:$dst,GR:$src1,s64imm:$imm,GR:$src2), + "shladd $dst = $src1, $imm, $src2;;", + [(set GR:$dst, (add GR:$src2, (shl GR:$src1, isSHLADDimm:$imm)))]>; + +def SHL : AForm_DAG<0x03, 0x0b, (ops GR:$dst, GR:$src1, GR:$src2), + "shl $dst = $src1, $src2;;", + [(set GR:$dst, (shl GR:$src1, GR:$src2))]>; + +def SHRU : AForm_DAG<0x03, 0x0b, (ops GR:$dst, GR:$src1, GR:$src2), + "shr.u $dst = $src1, $src2;;", + [(set GR:$dst, (srl GR:$src1, GR:$src2))]>; + +def SHRS : AForm_DAG<0x03, 0x0b, (ops GR:$dst, GR:$src1, GR:$src2), + "shr $dst = $src1, $src2;;", + [(set GR:$dst, (sra GR:$src1, GR:$src2))]>; + def MOV : AForm<0x03, 0x0b, (ops GR:$dst, GR:$src), "mov $dst = $src;;">; def PMOV : AForm<0x03, 0x0b, (ops GR:$dst, GR:$src, PR:$qp), "($qp) mov $dst = $src;;">; From duraid at octopus.com.au Thu Nov 3 19:45:15 2005 From: duraid at octopus.com.au (Duraid Madina) Date: Thu, 3 Nov 2005 19:45:15 -0600 Subject: [llvm-commits] CVS: llvm/include/llvm/Target/TargetInstrItineraries.h Message-ID: <200511040145.TAA07003@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/Target: TargetInstrItineraries.h updated: 1.4 -> 1.5 --- Log message: change NULL to 0, unbreaks the ppc target when building on ia64 --- Diffs of the changes: (+2 -2) TargetInstrItineraries.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/include/llvm/Target/TargetInstrItineraries.h diff -u llvm/include/llvm/Target/TargetInstrItineraries.h:1.4 llvm/include/llvm/Target/TargetInstrItineraries.h:1.5 --- llvm/include/llvm/Target/TargetInstrItineraries.h:1.4 Thu Nov 3 16:47:42 2005 +++ llvm/include/llvm/Target/TargetInstrItineraries.h Thu Nov 3 19:45:04 2005 @@ -55,13 +55,13 @@ // // Ctors. // - InstrItineraryData() : Stages(NULL), Itineratries(NULL) {} + InstrItineraryData() : Stages(0), Itineratries(0) {} InstrItineraryData(InstrStage *S, InstrItinerary *I) : Stages(S), Itineratries(I) {} // // isEmpty - Returns true if there are no itineraries. // - inline bool isEmpty() const { return Itineratries == NULL; } + inline bool isEmpty() const { return Itineratries == 0; } // // begin - Return the first stage of the itinerary. From jeffc at jolt-lang.org Thu Nov 3 20:59:28 2005 From: jeffc at jolt-lang.org (Jeff Cohen) Date: Thu, 3 Nov 2005 20:59:28 -0600 Subject: [llvm-commits] CVS: llvm/include/llvm/Target/TargetInstrItineraries.h Message-ID: <200511040259.UAA07250@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/Target: TargetInstrItineraries.h updated: 1.5 -> 1.6 --- Log message: no longer required to make VC++ happy. --- Diffs of the changes: (+0 -2) TargetInstrItineraries.h | 2 -- 1 files changed, 2 deletions(-) Index: llvm/include/llvm/Target/TargetInstrItineraries.h diff -u llvm/include/llvm/Target/TargetInstrItineraries.h:1.5 llvm/include/llvm/Target/TargetInstrItineraries.h:1.6 --- llvm/include/llvm/Target/TargetInstrItineraries.h:1.5 Thu Nov 3 19:45:04 2005 +++ llvm/include/llvm/Target/TargetInstrItineraries.h Thu Nov 3 20:59:17 2005 @@ -16,8 +16,6 @@ #ifndef LLVM_TARGET_TARGETINSTRITINERARIES_H #define LLVM_TARGET_TARGETINSTRITINERARIES_H -#include - namespace llvm { //===----------------------------------------------------------------------===// From jlaskey at apple.com Thu Nov 3 22:05:46 2005 From: jlaskey at apple.com (Jim Laskey) Date: Thu, 3 Nov 2005 22:05:46 -0600 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp Message-ID: <200511040405.WAA07521@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/SelectionDAG: ScheduleDAG.cpp updated: 1.39 -> 1.40 --- Log message: Scheduling now uses itinerary data. --- Diffs of the changes: (+202 -167) ScheduleDAG.cpp | 369 ++++++++++++++++++++++++++++++-------------------------- 1 files changed, 202 insertions(+), 167 deletions(-) Index: llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp diff -u llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp:1.39 llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp:1.40 --- llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp:1.39 Mon Oct 31 06:49:09 2005 +++ llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp Thu Nov 3 22:05:35 2005 @@ -21,6 +21,7 @@ #include "llvm/CodeGen/SSARegMap.h" #include "llvm/Target/TargetMachine.h" #include "llvm/Target/TargetInstrInfo.h" +#include "llvm/Target/TargetInstrItineraries.h" #include "llvm/Target/TargetLowering.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/Debug.h" @@ -32,6 +33,7 @@ enum ScheduleChoices { noScheduling, simpleScheduling, + simpleNoItinScheduling }; } // namespace @@ -43,6 +45,8 @@ "Trivial emission with no analysis"), clEnumValN(simpleScheduling, "simple", "Minimize critical path and maximize processor utilization"), + clEnumValN(simpleNoItinScheduling, "simple-noitin", + "Same as simple except using generic latency"), clEnumValEnd)); @@ -97,65 +101,59 @@ typedef typename std::vector::iterator Iter; // Tally iterator - /// AllInUse - Test to see if all of the resources in the slot are busy (set.) - inline bool AllInUse(Iter Cursor, unsigned ResourceSet) { - return (*Cursor & ResourceSet) == ResourceSet; - } - - /// Skip - Skip over slots that use all of the specified resource (all are - /// set.) - Iter Skip(Iter Cursor, unsigned ResourceSet) { - assert(ResourceSet && "At least one resource bit needs to bet set"); - - // Continue to the end - while (true) { - // Break out if one of the resource bits is not set - if (!AllInUse(Cursor, ResourceSet)) return Cursor; - // Try next slot - Cursor++; - assert(Cursor < Tally.end() && "Tally is not large enough for schedule"); - } - } - - /// FindSlots - Starting from Begin, locate N consecutive slots where at least - /// one of the resource bits is available. Returns the address of first slot. - Iter FindSlots(Iter Begin, unsigned N, unsigned ResourceSet, - unsigned &Resource) { - // Track position - Iter Cursor = Begin; + /// SlotsAvailable - Returns the an iterator equal to Begin if all units + /// are available. Otherwise return an iterator to a better Begin. + Iter SlotsAvailable(Iter Begin, unsigned N, unsigned ResourceSet, + unsigned &Resource) { + assert(N && "Must check availability with N != 0"); + // Determine end of interval + Iter End = Begin + N; + // Alternate result + Iter Better = End; + assert(End <= Tally.end() && "Tally is not large enough for schedule"); - // Try all possible slots forward - while (true) { - // Skip full slots - Cursor = Skip(Cursor, ResourceSet); - // Determine end of interval - Iter End = Cursor + N; - assert(End <= Tally.end() && "Tally is not large enough for schedule"); + // Iterate thru each resource + BitsIterator Resources(ResourceSet & ~*Begin); + while (unsigned Res = Resources.Next()) { + // Check if resource is available for next N slots + Iter Interval = End; + do { + Interval--; + if (*Interval & Res) break; + } while (Interval != Begin); - // Iterate thru each resource - BitsIterator Resources(ResourceSet & ~*Cursor); - while (unsigned Res = Resources.Next()) { - // Check if resource is available for next N slots - // Break out if resource is busy - Iter Interval = Cursor; - for (; Interval < End && !(*Interval & Res); Interval++) {} - - // If available for interval, return where and which resource - if (Interval == End) { - Resource = Res; - return Cursor; - } - // Otherwise, check if worth checking other resources - if (AllInUse(Interval, ResourceSet)) { - // Start looking beyond interval - Cursor = Interval; - break; - } + // If available for N + if (Interval == Begin) { + // Success + Resource = Res; + return Begin; } - Cursor++; + if (Better > Interval) Better = Interval; } + + // No luck + return Better; } + /// FindAndReserveStages - Return true if the stages can be completed. If + /// so mark as busy. + bool FindAndReserveStages(Iter Begin, + InstrStage *Stage, InstrStage *StageEnd) { + // If at last stage then we're done + if (Stage == StageEnd) return true; + // Get number of cycles for current stage + unsigned N = Stage->Cycles; + // Check to see if N slots are available, if not fail + unsigned Resource; + if (SlotsAvailable(Begin, N, Stage->Units, Resource) != Begin) return false; + // Check to see if remaining stages are available, if not fail + if (!FindAndReserveStages(Begin + N, Stage + 1, StageEnd)) return false; + // Reserve resource + Reserve(Begin, N, Resource); + // Success + return true; + } + /// Reserve - Mark busy (set) the specified N slots. void Reserve(Iter Begin, unsigned N, unsigned Resource) { // Determine end of interval @@ -167,24 +165,35 @@ *Begin |= Resource; } + /// FindSlots - Starting from Begin, locate consecutive slots where all stages + /// can be completed. Returns the address of first slot. + Iter FindSlots(Iter Begin, InstrStage *StageBegin, InstrStage *StageEnd) { + // Track position + Iter Cursor = Begin; + + // Try all possible slots forward + while (true) { + // Try at cursor, if successful return position. + if (FindAndReserveStages(Cursor, StageBegin, StageEnd)) return Cursor; + // Locate a better position + unsigned Resource; + Cursor = SlotsAvailable(Cursor + 1, StageBegin->Cycles, StageBegin->Units, + Resource); + } + } + public: /// Initialize - Resize and zero the tally to the specified number of time /// slots. inline void Initialize(unsigned N) { Tally.assign(N, 0); // Initialize tally to all zeros. } - - // FindAndReserve - Locate and mark busy (set) N bits started at slot I, using - // ResourceSet for choices. - unsigned FindAndReserve(unsigned I, unsigned N, unsigned ResourceSet) { - // Which resource used - unsigned Resource; - // Find slots for instruction. - Iter Where = FindSlots(Tally.begin() + I, N, ResourceSet, Resource); - // Reserve the slots - Reserve(Where, N, Resource); - // Return time slot (index) - return Where - Tally.begin(); + + // FindAndReserve - Locate an ideal slot for the specified stages and mark + // as busy. + unsigned FindAndReserve(unsigned Slot, InstrStage *StageBegin, + InstrStage *StageEnd) { + return FindSlots(Tally.begin() + Slot, StageBegin, StageEnd)-Tally.begin(); } }; @@ -203,17 +212,20 @@ class NodeGroup { private: NIVector Members; // Group member nodes + NodeInfo *Dominator; // Node with highest latency + unsigned Latency; // Total latency of the group int Pending; // Number of visits pending before // adding to order public: // Ctor. - NodeGroup() : Pending(0) {} + NodeGroup() : Dominator(NULL), Pending(0) {} // Accessors - inline NodeInfo *getLeader() { - return Members.empty() ? NULL : Members.front(); - } + inline void setDominator(NodeInfo *D) { Dominator = D; } + inline NodeInfo *getDominator() { return Dominator; } + inline void setLatency(unsigned L) { Latency = L; } + inline unsigned getLatency() { return Latency; } inline int getPending() const { return Pending; } inline void setPending(int P) { Pending = P; } inline int addPending(int I) { return Pending += I; } @@ -246,8 +258,9 @@ // adding to order public: SDNode *Node; // DAG node - unsigned Latency; // Cycles to complete instruction - unsigned ResourceSet; // Bit vector of usable resources + InstrStage *StageBegin; // First stage in itinerary + InstrStage *StageEnd; // Last+1 stage in itinerary + unsigned Latency; // Total cycles to complete instruction bool IsCall; // Is function call unsigned Slot; // Node's time slot NodeGroup *Group; // Grouping information @@ -260,8 +273,9 @@ NodeInfo(SDNode *N = NULL) : Pending(0) , Node(N) + , StageBegin(NULL) + , StageEnd(NULL) , Latency(0) - , ResourceSet(0) , IsCall(false) , Slot(0) , Group(NULL) @@ -276,8 +290,8 @@ assert(!Group || !Group->group_empty() && "Group with no members"); return Group != NULL; } - inline bool isGroupLeader() const { - return isInGroup() && Group->getLeader() == this; + inline bool isGroupDominator() const { + return isInGroup() && Group->getDominator() == this; } inline int getPending() const { return Group ? Group->getPending() : Pending; @@ -391,15 +405,6 @@ /// class SimpleSched { private: - // TODO - get ResourceSet from TII - enum { - RSInteger = 0x3, // Two integer units - RSFloat = 0xC, // Two float units - RSLoadStore = 0x30, // Two load store units - RSBranch = 0x400, // One branch unit - RSOther = 0 // Processing unit independent - }; - MachineBasicBlock *BB; // Current basic block SelectionDAG &DAG; // DAG of the current basic block const TargetMachine &TM; // Target processor @@ -408,6 +413,7 @@ SSARegMap *RegMap; // Virtual/real register map MachineConstantPool *ConstPool; // Target constant pool unsigned NodeCount; // Number of nodes in DAG + bool HasGroups; // True if there are any groups NodeInfo *Info; // Info for nodes being scheduled std::map Map; // Map nodes to info NIVector Ordering; // Emit ordering of nodes @@ -422,7 +428,7 @@ : BB(bb), DAG(D), TM(D.getTarget()), TII(*TM.getInstrInfo()), MRI(*TM.getRegisterInfo()), RegMap(BB->getParent()->getSSARegMap()), ConstPool(BB->getParent()->getConstantPool()), - NodeCount(0), Info(NULL), Map(), Tally(), NSlots(0) { + NodeCount(0), HasGroups(false), Info(NULL), Map(), Tally(), NSlots(0) { assert(&TII && "Target doesn't provide instr info?"); assert(&MRI && "Target doesn't provide register info?"); } @@ -455,6 +461,7 @@ void Schedule(); void IdentifyGroups(); void GatherSchedulingInfo(); + void FakeGroupDominators(); void PrepareNodeInfo(); bool isStrongDependency(NodeInfo *A, NodeInfo *B); bool isWeakDependency(NodeInfo *A, NodeInfo *B); @@ -474,6 +481,27 @@ inline void dump(const char *tag) const { std::cerr << tag; dump(); } void dump() const; }; + + +//===----------------------------------------------------------------------===// +/// Special case itineraries. +/// +enum { + CallLatency = 40, // To push calls back in time + + RSInteger = 0xC0000000, // Two integer units + RSFloat = 0x30000000, // Two float units + RSLoadStore = 0x0C000000, // Two load store units + RSBranch = 0x02000000 // One branch unit +}; +static InstrStage CallStage = { CallLatency, RSBranch }; +static InstrStage LoadStage = { 5, RSLoadStore }; +static InstrStage StoreStage = { 2, RSLoadStore }; +static InstrStage IntStage = { 2, RSInteger }; +static InstrStage FloatStage = { 3, RSFloat }; +//===----------------------------------------------------------------------===// + + //===----------------------------------------------------------------------===// } // namespace @@ -619,7 +647,7 @@ if (!Count) { // Add node if (NI->isInGroup()) { - Ordering.push_back(NI->Group->getLeader()); + Ordering.push_back(NI->Group->getDominator()); } else { Ordering.push_back(NI); } @@ -680,6 +708,8 @@ if (Op.getValueType() != MVT::Flag) break; // Add to node group NodeGroup::Add(getNI(Op.Val), NI); + // Let evryone else know + HasGroups = true; } } } @@ -687,8 +717,8 @@ /// GatherSchedulingInfo - Get latency and resource information about each node. /// void SimpleSched::GatherSchedulingInfo() { - // Track if groups are present - bool AreGroups = false; + + const InstrItineraryData InstrItins = TM.getInstrItineraryData(); // For each node for (unsigned i = 0, N = NodeCount; i < N; i++) { @@ -696,90 +726,87 @@ NodeInfo* NI = &Info[i]; SDNode *Node = NI->Node; - // Test for groups - if (NI->isInGroup()) AreGroups = true; - - // FIXME: Pretend by using value type to choose metrics - MVT::ValueType VT = Node->getValueType(0); - - // If machine opcode - if (Node->isTargetOpcode()) { - MachineOpCode TOpc = Node->getTargetOpcode(); - // FIXME: This is an ugly (but temporary!) hack to test the scheduler - // before we have real target info. - // FIXME NI->Latency = std::max(1, TII.maxLatency(TOpc)); - // FIXME NI->ResourceSet = TII.resources(TOpc); - if (TII.isCall(TOpc)) { - NI->ResourceSet = RSBranch; - NI->Latency = 40; - NI->IsCall = true; - } else if (TII.isLoad(TOpc)) { - NI->ResourceSet = RSLoadStore; - NI->Latency = 5; - } else if (TII.isStore(TOpc)) { - NI->ResourceSet = RSLoadStore; - NI->Latency = 2; - } else if (MVT::isInteger(VT)) { - NI->ResourceSet = RSInteger; - NI->Latency = 2; - } else if (MVT::isFloatingPoint(VT)) { - NI->ResourceSet = RSFloat; - NI->Latency = 3; - } else { - NI->ResourceSet = RSOther; - NI->Latency = 0; - } - } else { - if (MVT::isInteger(VT)) { - NI->ResourceSet = RSInteger; - NI->Latency = 2; - } else if (MVT::isFloatingPoint(VT)) { - NI->ResourceSet = RSFloat; - NI->Latency = 3; - } else { - NI->ResourceSet = RSOther; - NI->Latency = 0; + // If there are itineraries and it is a machine instruction + if (InstrItins.isEmpty() || ScheduleStyle == simpleNoItinScheduling) { + // If machine opcode + if (Node->isTargetOpcode()) { + // Get return type to guess which processing unit + MVT::ValueType VT = Node->getValueType(0); + // Get machine opcode + MachineOpCode TOpc = Node->getTargetOpcode(); + NI->IsCall = TII.isCall(TOpc); + + if (TII.isLoad(TOpc)) NI->StageBegin = &LoadStage; + else if (TII.isStore(TOpc)) NI->StageBegin = &StoreStage; + else if (MVT::isInteger(VT)) NI->StageBegin = &IntStage; + else if (MVT::isFloatingPoint(VT)) NI->StageBegin = &FloatStage; + if (NI->StageBegin) NI->StageEnd = NI->StageBegin + 1; } + } else if (Node->isTargetOpcode()) { + // get machine opcode + MachineOpCode TOpc = Node->getTargetOpcode(); + // Check to see if it is a call + NI->IsCall = TII.isCall(TOpc); + // Get itinerary stages for instruction + unsigned II = TII.getSchedClass(TOpc); + NI->StageBegin = InstrItins.begin(II); + NI->StageEnd = InstrItins.end(II); + } + + // One slot for the instruction itself + NI->Latency = 1; + + // Add long latency for a call to push it back in time + if (NI->IsCall) NI->Latency += CallLatency; + + // Sum up all the latencies + for (InstrStage *Stage = NI->StageBegin, *E = NI->StageEnd; + Stage != E; Stage++) { + NI->Latency += Stage->Cycles; } - // Add one slot for the instruction itself - NI->Latency++; - // Sum up all the latencies for max tally size NSlots += NI->Latency; } // Unify metrics if in a group - if (AreGroups) { + if (HasGroups) { for (unsigned i = 0, N = NodeCount; i < N; i++) { NodeInfo* NI = &Info[i]; - if (NI->isGroupLeader()) { + if (NI->isInGroup()) { NodeGroup *Group = NI->Group; - unsigned Latency = 0; - unsigned MaxLat = 0; - unsigned ResourceSet = 0; - bool IsCall = false; - for (NIIterator NGI = Group->group_begin(), NGE = Group->group_end(); - NGI != NGE; NGI++) { - NodeInfo* NGNI = *NGI; - Latency += NGNI->Latency; - IsCall = IsCall || NGNI->IsCall; + if (!Group->getDominator()) { + NIIterator NGI = Group->group_begin(), NGE = Group->group_end(); + NodeInfo *Dominator = *NGI; + unsigned Latency = Dominator->Latency; - if (MaxLat < NGNI->Latency) { - MaxLat = NGNI->Latency; - ResourceSet = NGNI->ResourceSet; + for (NGI++; NGI != NGE; NGI++) { + NodeInfo* NGNI = *NGI; + Latency += NGNI->Latency; + if (Dominator->Latency < NGNI->Latency) Dominator = NGNI; } - NGNI->Latency = 0; - NGNI->ResourceSet = 0; - NGNI->IsCall = false; + Dominator->Latency = Latency; + Group->setDominator(Dominator); } - - NI->Latency = Latency; - NI->ResourceSet = ResourceSet; - NI->IsCall = IsCall; + } + } + } +} + +/// FakeGroupDominators - Set dominators for non-scheduling. +/// +void SimpleSched::FakeGroupDominators() { + for (unsigned i = 0, N = NodeCount; i < N; i++) { + NodeInfo* NI = &Info[i]; + + if (NI->isInGroup()) { + NodeGroup *Group = NI->Group; + + if (!Group->getDominator()) { + Group->setDominator(NI); } } } @@ -863,8 +890,8 @@ if (Slot == NotFound) Slot = 0; // Find a slot where the needed resources are available - if (NI->ResourceSet) - Slot = Tally.FindAndReserve(Slot, NI->Latency, NI->ResourceSet); + if (NI->StageBegin != NI->StageEnd) + Slot = Tally.FindAndReserve(Slot, NI->StageBegin, NI->StageEnd); // Set node slot NI->Slot = Slot; @@ -918,8 +945,8 @@ if (Slot == NotFound) Slot = 0; // Find a slot where the needed resources are available - if (NI->ResourceSet) - Slot = Tally.FindAndReserve(Slot, NI->Latency, NI->ResourceSet); + if (NI->StageBegin != NI->StageEnd) + Slot = Tally.FindAndReserve(Slot, NI->StageBegin, NI->StageEnd); // Set node slot NI->Slot = Slot; @@ -949,7 +976,7 @@ // Iterate through nodes NodeGroupIterator NGI(Ordering[i]); if (NI->isInGroup()) { - if (NI->isGroupLeader()) { + if (NI->isGroupDominator()) { NodeGroupIterator NGI(Ordering[i]); while (NodeInfo *NI = NGI.next()) EmitNode(NI); } @@ -1187,10 +1214,22 @@ void SimpleSched::Schedule() { // Number the nodes NodeCount = DAG.allnodes_size(); - // Set up minimum info for scheduling. + // Test to see if scheduling should occur + bool ShouldSchedule = NodeCount > 3 && ScheduleStyle != noScheduling; + // Set up minimum info for scheduling PrepareNodeInfo(); // Construct node groups for flagged nodes IdentifyGroups(); + + // Don't waste time if is only entry and return + if (ShouldSchedule) { + // Get latency and resource requirements + GatherSchedulingInfo(); + } else if (HasGroups) { + // Make sure all the groups have dominators + FakeGroupDominators(); + } + // Breadth first walk of DAG VisitAll(); @@ -1204,10 +1243,7 @@ #endif // Don't waste time if is only entry and return - if (NodeCount > 3 && ScheduleStyle != noScheduling) { - // Get latency and resource requirements - GatherSchedulingInfo(); - + if (ShouldSchedule) { // Push back long instructions and critical path ScheduleBackward(); @@ -1242,7 +1278,7 @@ std::cerr << " " << NI->Preorder << ". "; printSI(std::cerr, NI); std::cerr << "\n"; - if (NI->isGroupLeader()) { + if (NI->isGroupDominator()) { NodeGroup *Group = NI->Group; for (NIIterator NII = Group->group_begin(), E = Group->group_end(); NII != E; NII++) { @@ -1265,7 +1301,6 @@ SDNode *Node = NI->Node; O << " " << std::hex << Node << std::dec - << ", RS=" << NI->ResourceSet << ", Lat=" << NI->Latency << ", Slot=" << NI->Slot << ", ARITY=(" << Node->getNumOperands() << "," @@ -1286,7 +1321,7 @@ NodeInfo *NI = Ordering[i]; printSI(O, NI); O << "\n"; - if (NI->isGroupLeader()) { + if (NI->isGroupDominator()) { NodeGroup *Group = NI->Group; for (NIIterator NII = Group->group_begin(), E = Group->group_end(); NII != E; NII++) { From duraid at octopus.com.au Thu Nov 3 23:29:50 2005 From: duraid at octopus.com.au (Duraid Madina) Date: Thu, 3 Nov 2005 23:29:50 -0600 Subject: [llvm-commits] CVS: llvm-test/Makefile.programs Message-ID: <200511040529.XAA08107@zion.cs.uiuc.edu> Changes in directory llvm-test: Makefile.programs updated: 1.177 -> 1.178 --- Log message: chicken out: sched=simple breaks quite a bit of the testsuite currently. will look at this again later :) --- Diffs of the changes: (+1 -1) Makefile.programs | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm-test/Makefile.programs diff -u llvm-test/Makefile.programs:1.177 llvm-test/Makefile.programs:1.178 --- llvm-test/Makefile.programs:1.177 Thu Nov 3 16:00:16 2005 +++ llvm-test/Makefile.programs Thu Nov 3 23:29:38 2005 @@ -194,7 +194,7 @@ #-enable-alpha-intfpdiv -enable-alpha-FTOI endif ifeq ($(ARCH),IA64) -LLCBETAOPTION := -enable-ia64-dag-isel -sched=simple +LLCBETAOPTION := -enable-ia64-dag-isel endif ifeq ($(ARCH),x86) LLCBETAOPTION := -enable-x86-fastcc From lattner at cs.uiuc.edu Fri Nov 4 00:18:42 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri, 4 Nov 2005 00:18:42 -0600 Subject: [llvm-commits] CVS: llvm-gcc/gcc/llvm-types.c Message-ID: <200511040618.AAA24957@zion.cs.uiuc.edu> Changes in directory llvm-gcc/gcc: llvm-types.c updated: 1.30 -> 1.31 --- Log message: This ugly patch fixes the regressions compiling namd and gcc on X86, suitable for the 1.6 release. This can be solved in a more elegant way in the future. --- Diffs of the changes: (+39 -3) llvm-types.c | 42 +++++++++++++++++++++++++++++++++++++++--- 1 files changed, 39 insertions(+), 3 deletions(-) Index: llvm-gcc/gcc/llvm-types.c diff -u llvm-gcc/gcc/llvm-types.c:1.30 llvm-gcc/gcc/llvm-types.c:1.31 --- llvm-gcc/gcc/llvm-types.c:1.30 Sat Sep 24 15:55:31 2005 +++ llvm-gcc/gcc/llvm-types.c Fri Nov 4 00:18:30 2005 @@ -120,10 +120,11 @@ return PrimitiveAlignments[Ty->ID]; } case ArrayTyID: - //assert(Ty->x.Array.Alignment && "Array does not have alignment set!"); + /*assert(Ty->x.Array.Alignment && "Array does not have alignment set!");*/ return Ty->x.Array.Alignment ? Ty->x.Array.Alignment : 4; case StructTyID: - //assert(Ty->x.Struct.Alignment && "Struct does not have alignment set!"); + /*assert(Ty->x.Struct.Alignment && "Struct does not have alignment set!"); + */ return Ty->x.Struct.Alignment ? Ty->x.Struct.Alignment : 4; default: fprintf(stderr, "ERROR: Type doesn't have size: "); @@ -752,7 +753,12 @@ llvm_type *Ty = llvm_type_get_from_tree(TREE_TYPE(field)); /* Get the starting offset in the record... */ unsigned StartOffset = GetFieldOffset(field); /* In bits */ +#ifdef LLVM_TARGET_MAX_ALIGN_IS_POINTER_SIZE unsigned ByteAlignment = llvm_type_get_alignment(Ty); +#else + unsigned BitAlignment = GetFieldAlignmentInBits(field); + unsigned ByteAlignment = (BitAlignment+7)/8; +#endif if (!TypeIsRecursivelyIntegral(Ty)) { /* Not an integral field? */ unsigned OrigSize = *Size; @@ -767,6 +773,7 @@ * to ensure that the LLVM conception of where this element lands is the * same as what GCC thinks. */ +#ifdef LLVM_TARGET_MAX_ALIGN_IS_POINTER_SIZE if (*Size < StartOffset/8) { unsigned PadBytes = StartOffset/8 - OrigSize; if (PadBytes == 1) @@ -778,6 +785,17 @@ ++*Idx; *Size = OrigSize + PadBytes; } +#else + if (*Size < StartOffset/8) + /* Only fix things if it is because of this "magic padding" */ + if (*Size + ByteAlignment == StartOffset/8) { + ElementTys[*Idx] = UByteTy; /* Random pad element */ + ElementOffsets[*Idx] = *Size; + ElementAlignments[*Idx] = 1; + ++*Idx; + *Size = StartOffset/8; + } +#endif #if 0 /* FIXME: This assertion should be kept!!! */ assert(*Size == StartOffset/8 && @@ -796,10 +814,16 @@ unsigned FieldCByteAlignment = (FieldCBitAlignment+7)/8; /* Is it attempting to align the current offset to some value? */ if (DeclSize == 0) { +#ifdef LLVM_TARGET_MAX_ALIGN_IS_POINTER_SIZE NumPads = FieldCByteAlignment - (*Size % FieldCByteAlignment); if (NumPads == FieldCByteAlignment) NumPads = 0; assert((*Size+NumPads) % FieldCByteAlignment == 0 && "Incorrect padding calc?"); +#else + NumPads = ByteAlignment - (*Size % ByteAlignment); + if (NumPads == ByteAlignment) NumPads = 0; + assert((*Size+NumPads) % ByteAlignment == 0 && "Incorrect padding calc?"); +#endif #if DEBUG_STRUCT_LAYOUT fprintf(stderr, "Anon field: align=%db pads = %d ", FieldCByteAlignment, NumPads); @@ -839,7 +863,8 @@ int HasSignedField; unsigned StartByte; - if (ElSizeInBits) ElSizeInBits = MAX(ElSizeInBits, FieldCBitAlignment); + if (ElSizeInBits) + ElSizeInBits = MAX(ElSizeInBits, FieldCBitAlignment); HasSignedField = !TREE_UNSIGNED(TREE_TYPE(field)); @@ -906,6 +931,7 @@ * to ensure that the LLVM conception of where this element lands is the * same as what GCC thinks. */ +#ifdef LLVM_TARGET_MAX_ALIGN_IS_POINTER_SIZE if (((*Size + ByteAlignment - 1) & ~(ByteAlignment-1)) < StartOffset/8) { unsigned PadBytes = StartOffset/8 - *Size; if (PadBytes == 1) @@ -917,6 +943,7 @@ ++*Idx; *Size = *Size + PadBytes; } +#endif /* Check to see if there is "magic padding" that got inserted into the * structure. This can happen, for example, when the C++ ABI declares that @@ -1472,6 +1499,7 @@ * elements so that the LLVM code will have the right size for the * structure. */ +#ifdef LLVM_TARGET_MAX_ALIGN_IS_POINTER_SIZE if (TYPE_SIZE(type) && TREE_CODE(TYPE_SIZE(type)) == INTEGER_CST) { unsigned GCCTypeSize = ((unsigned)TREE_INT_CST_LOW(TYPE_SIZE(type))+7)/8; unsigned LLVMTypeSize, LLVMStructAlign = 1, i; @@ -1506,6 +1534,14 @@ Size += PadBytes; } } +#else + /* Empty C++ structures == { ubyte } in LLVM so that sizes are correct. */ + if (Idx == 0 && (int)TREE_INT_CST_LOW(TYPE_SIZE(type)) == 8) { + StructElements[0] = UByteTy; + ElementOffsets[0] = 0; + ++Idx; + } +#endif /* End of the hack, set the real number of elements. */ Result->NumElements = Idx; From duraid at octopus.com.au Fri Nov 4 03:59:57 2005 From: duraid at octopus.com.au (Duraid Madina) Date: Fri, 4 Nov 2005 03:59:57 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp Message-ID: <200511040959.DAA23960@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/IA64: IA64ISelDAGToDAG.cpp updated: 1.6 -> 1.7 --- Log message: add support for loading bools --- Diffs of the changes: (+7 -1) IA64ISelDAGToDAG.cpp | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletion(-) Index: llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp diff -u llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp:1.6 llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp:1.7 --- llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp:1.6 Wed Nov 2 01:32:59 2005 +++ llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp Fri Nov 4 03:59:06 2005 @@ -369,7 +369,13 @@ unsigned Opc; switch (TypeBeingLoaded) { default: N->dump(); assert(0 && "Cannot load this type!"); - // FIXME: bools? case MVT::i1: + case MVT::i1: { // this is a bool + Opc = IA64::LD1; // first we load a byte, then compare for != 0 + CurDAG->SelectNodeTo(N, IA64::CMPNE, MVT::i1, MVT::Other, + CurDAG->getTargetNode(Opc, MVT::i64, Address), + CurDAG->getRegister(IA64::r0, MVT::i64), Chain); + return SDOperand(N, Op.ResNo); // XXX: early exit + } case MVT::i8: Opc = IA64::LD1; break; case MVT::i16: Opc = IA64::LD2; break; case MVT::i32: Opc = IA64::LD4; break; From duraid at octopus.com.au Fri Nov 4 04:02:03 2005 From: duraid at octopus.com.au (Duraid Madina) Date: Fri, 4 Nov 2005 04:02:03 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/IA64/IA64ISelLowering.cpp Message-ID: <200511041002.EAA24571@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/IA64: IA64ISelLowering.cpp updated: 1.2 -> 1.3 --- Log message: kill redundant SP/GP/RP save/restores across calls --- Diffs of the changes: (+3 -2) IA64ISelLowering.cpp | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) Index: llvm/lib/Target/IA64/IA64ISelLowering.cpp diff -u llvm/lib/Target/IA64/IA64ISelLowering.cpp:1.2 llvm/lib/Target/IA64/IA64ISelLowering.cpp:1.3 --- llvm/lib/Target/IA64/IA64ISelLowering.cpp:1.2 Tue Nov 1 20:35:04 2005 +++ llvm/lib/Target/IA64/IA64ISelLowering.cpp Fri Nov 4 04:01:11 2005 @@ -192,20 +192,21 @@ VirtGPR = MF.getSSARegMap()->createVirtualRegister(getRegClassFor(MVT::i64)); BuildMI(&BB, IA64::PSEUDO_ALLOC, 0, VirtGPR); // we create a PSEUDO_ALLOC (pseudo)instruction for now - +/* BuildMI(&BB, IA64::IDEF, 0, IA64::r1); // hmm: BuildMI(&BB, IA64::IDEF, 0, IA64::r12); BuildMI(&BB, IA64::IDEF, 0, IA64::rp); // ..hmm. - + BuildMI(&BB, IA64::MOV, 1, GP).addReg(IA64::r1); // hmm: BuildMI(&BB, IA64::MOV, 1, SP).addReg(IA64::r12); BuildMI(&BB, IA64::MOV, 1, RP).addReg(IA64::rp); // ..hmm. +*/ unsigned tempOffset=0; From criswell at cs.uiuc.edu Fri Nov 4 09:45:29 2005 From: criswell at cs.uiuc.edu (John Criswell) Date: Fri, 4 Nov 2005 09:45:29 -0600 Subject: [llvm-commits] [release_16] CVS: llvm-gcc/gcc/llvm-types.c Message-ID: <200511041545.JAA24798@choi.cs.uiuc.edu> Changes in directory llvm-gcc/gcc: llvm-types.c updated: 1.30 -> 1.30.2.1 --- Log message: Merged in revision 1.31. --- Diffs of the changes: (+39 -3) llvm-types.c | 42 +++++++++++++++++++++++++++++++++++++++--- 1 files changed, 39 insertions(+), 3 deletions(-) Index: llvm-gcc/gcc/llvm-types.c diff -u llvm-gcc/gcc/llvm-types.c:1.30 llvm-gcc/gcc/llvm-types.c:1.30.2.1 --- llvm-gcc/gcc/llvm-types.c:1.30 Sat Sep 24 15:55:31 2005 +++ llvm-gcc/gcc/llvm-types.c Fri Nov 4 09:45:05 2005 @@ -120,10 +120,11 @@ return PrimitiveAlignments[Ty->ID]; } case ArrayTyID: - //assert(Ty->x.Array.Alignment && "Array does not have alignment set!"); + /*assert(Ty->x.Array.Alignment && "Array does not have alignment set!");*/ return Ty->x.Array.Alignment ? Ty->x.Array.Alignment : 4; case StructTyID: - //assert(Ty->x.Struct.Alignment && "Struct does not have alignment set!"); + /*assert(Ty->x.Struct.Alignment && "Struct does not have alignment set!"); + */ return Ty->x.Struct.Alignment ? Ty->x.Struct.Alignment : 4; default: fprintf(stderr, "ERROR: Type doesn't have size: "); @@ -752,7 +753,12 @@ llvm_type *Ty = llvm_type_get_from_tree(TREE_TYPE(field)); /* Get the starting offset in the record... */ unsigned StartOffset = GetFieldOffset(field); /* In bits */ +#ifdef LLVM_TARGET_MAX_ALIGN_IS_POINTER_SIZE unsigned ByteAlignment = llvm_type_get_alignment(Ty); +#else + unsigned BitAlignment = GetFieldAlignmentInBits(field); + unsigned ByteAlignment = (BitAlignment+7)/8; +#endif if (!TypeIsRecursivelyIntegral(Ty)) { /* Not an integral field? */ unsigned OrigSize = *Size; @@ -767,6 +773,7 @@ * to ensure that the LLVM conception of where this element lands is the * same as what GCC thinks. */ +#ifdef LLVM_TARGET_MAX_ALIGN_IS_POINTER_SIZE if (*Size < StartOffset/8) { unsigned PadBytes = StartOffset/8 - OrigSize; if (PadBytes == 1) @@ -778,6 +785,17 @@ ++*Idx; *Size = OrigSize + PadBytes; } +#else + if (*Size < StartOffset/8) + /* Only fix things if it is because of this "magic padding" */ + if (*Size + ByteAlignment == StartOffset/8) { + ElementTys[*Idx] = UByteTy; /* Random pad element */ + ElementOffsets[*Idx] = *Size; + ElementAlignments[*Idx] = 1; + ++*Idx; + *Size = StartOffset/8; + } +#endif #if 0 /* FIXME: This assertion should be kept!!! */ assert(*Size == StartOffset/8 && @@ -796,10 +814,16 @@ unsigned FieldCByteAlignment = (FieldCBitAlignment+7)/8; /* Is it attempting to align the current offset to some value? */ if (DeclSize == 0) { +#ifdef LLVM_TARGET_MAX_ALIGN_IS_POINTER_SIZE NumPads = FieldCByteAlignment - (*Size % FieldCByteAlignment); if (NumPads == FieldCByteAlignment) NumPads = 0; assert((*Size+NumPads) % FieldCByteAlignment == 0 && "Incorrect padding calc?"); +#else + NumPads = ByteAlignment - (*Size % ByteAlignment); + if (NumPads == ByteAlignment) NumPads = 0; + assert((*Size+NumPads) % ByteAlignment == 0 && "Incorrect padding calc?"); +#endif #if DEBUG_STRUCT_LAYOUT fprintf(stderr, "Anon field: align=%db pads = %d ", FieldCByteAlignment, NumPads); @@ -839,7 +863,8 @@ int HasSignedField; unsigned StartByte; - if (ElSizeInBits) ElSizeInBits = MAX(ElSizeInBits, FieldCBitAlignment); + if (ElSizeInBits) + ElSizeInBits = MAX(ElSizeInBits, FieldCBitAlignment); HasSignedField = !TREE_UNSIGNED(TREE_TYPE(field)); @@ -906,6 +931,7 @@ * to ensure that the LLVM conception of where this element lands is the * same as what GCC thinks. */ +#ifdef LLVM_TARGET_MAX_ALIGN_IS_POINTER_SIZE if (((*Size + ByteAlignment - 1) & ~(ByteAlignment-1)) < StartOffset/8) { unsigned PadBytes = StartOffset/8 - *Size; if (PadBytes == 1) @@ -917,6 +943,7 @@ ++*Idx; *Size = *Size + PadBytes; } +#endif /* Check to see if there is "magic padding" that got inserted into the * structure. This can happen, for example, when the C++ ABI declares that @@ -1472,6 +1499,7 @@ * elements so that the LLVM code will have the right size for the * structure. */ +#ifdef LLVM_TARGET_MAX_ALIGN_IS_POINTER_SIZE if (TYPE_SIZE(type) && TREE_CODE(TYPE_SIZE(type)) == INTEGER_CST) { unsigned GCCTypeSize = ((unsigned)TREE_INT_CST_LOW(TYPE_SIZE(type))+7)/8; unsigned LLVMTypeSize, LLVMStructAlign = 1, i; @@ -1506,6 +1534,14 @@ Size += PadBytes; } } +#else + /* Empty C++ structures == { ubyte } in LLVM so that sizes are correct. */ + if (Idx == 0 && (int)TREE_INT_CST_LOW(TYPE_SIZE(type)) == 8) { + StructElements[0] = UByteTy; + ElementOffsets[0] = 0; + ++Idx; + } +#endif /* End of the hack, set the real number of elements. */ Result->NumElements = Idx; From duraid at octopus.com.au Fri Nov 4 11:56:05 2005 From: duraid at octopus.com.au (Duraid Madina) Date: Fri, 4 Nov 2005 11:56:05 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp Message-ID: <200511041756.LAA07680@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/IA64: IA64ISelDAGToDAG.cpp updated: 1.7 -> 1.8 --- Log message: oops, forgot to load GP for indirect calls, though the old code now commented out failed (e.g. methcall) - now the code compiles, though it's not quite right just yet (tm) ;) would fix this but it's 3am! :O --- Diffs of the changes: (+21 -4) IA64ISelDAGToDAG.cpp | 25 +++++++++++++++++++++---- 1 files changed, 21 insertions(+), 4 deletions(-) Index: llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp diff -u llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp:1.7 llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp:1.8 --- llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp:1.7 Fri Nov 4 03:59:06 2005 +++ llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp Fri Nov 4 11:55:53 2005 @@ -185,23 +185,40 @@ } else { // otherwise we need to load the function descriptor, // load the branch target (function)'s entry point and GP, - // branch (call) then restore the - // GP + // branch (call) then restore the GP SDOperand FnDescriptor = Select(N->getOperand(1)); // load the branch target's entry point [mem] and // GP value [mem+8] + SDOperand targetEntryPoint=CurDAG->getTargetNode(IA64::LD8, MVT::i64, + FnDescriptor); + Chain = targetEntryPoint.getValue(1); + SDOperand targetGPAddr=CurDAG->getTargetNode(IA64::ADDS, MVT::i64, + FnDescriptor, CurDAG->getConstant(8, MVT::i64)); + Chain = targetGPAddr.getValue(1); + SDOperand targetGP=CurDAG->getTargetNode(IA64::LD8, MVT::i64, + targetGPAddr); + Chain = targetGP.getValue(1); + +/* FIXME! (methcall still fails) SDOperand targetEntryPoint=CurDAG->getLoad(MVT::i64, Chain, FnDescriptor, CurDAG->getSrcValue(0)); SDOperand targetGPAddr=CurDAG->getNode(ISD::ADD, MVT::i64, FnDescriptor, CurDAG->getConstant(8, MVT::i64)); SDOperand targetGP=CurDAG->getLoad(MVT::i64, Chain, targetGPAddr, - CurDAG->getSrcValue(0)); + CurDAG->getSrcValue(0)); + */ + + // Copy the callee GP into r1 + SDOperand r1 = CurDAG->getRegister(IA64::r1, MVT::i64); + Chain = CurDAG->getNode(ISD::CopyToReg, MVT::i64, Chain, r1, + targetGP); + // Copy the callee address into the b6 branch register SDOperand B6 = CurDAG->getRegister(IA64::B6, MVT::i64); - Chain = CurDAG->getNode(ISD::CopyToReg, MVT::Other, Chain, B6, + Chain = CurDAG->getNode(ISD::CopyToReg, MVT::i64, Chain, B6, targetEntryPoint); CallOperands.push_back(B6); From jlaskey at apple.com Fri Nov 4 12:26:14 2005 From: jlaskey at apple.com (Jim Laskey) Date: Fri, 4 Nov 2005 12:26:14 -0600 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp Message-ID: <200511041826.MAA15188@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/SelectionDAG: ScheduleDAG.cpp updated: 1.40 -> 1.41 --- Log message: Fix a warning --- Diffs of the changes: (+1 -0) ScheduleDAG.cpp | 1 + 1 files changed, 1 insertion(+) Index: llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp diff -u llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp:1.40 llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp:1.41 --- llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp:1.40 Thu Nov 3 22:05:35 2005 +++ llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp Fri Nov 4 12:26:02 2005 @@ -132,6 +132,7 @@ } // No luck + Resource = 0; return Better; } From jlaskey at apple.com Fri Nov 4 18:01:37 2005 From: jlaskey at apple.com (Jim Laskey) Date: Fri, 4 Nov 2005 18:01:37 -0600 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp Message-ID: <200511050001.SAA19946@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/SelectionDAG: ScheduleDAG.cpp updated: 1.41 -> 1.42 --- Log message: Fix logic bug in finding retry slot in tally. --- Diffs of the changes: (+33 -15) ScheduleDAG.cpp | 48 +++++++++++++++++++++++++++++++++--------------- 1 files changed, 33 insertions(+), 15 deletions(-) Index: llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp diff -u llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp:1.41 llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp:1.42 --- llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp:1.41 Fri Nov 4 12:26:02 2005 +++ llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp Fri Nov 4 18:01:25 2005 @@ -101,15 +101,13 @@ typedef typename std::vector::iterator Iter; // Tally iterator - /// SlotsAvailable - Returns the an iterator equal to Begin if all units - /// are available. Otherwise return an iterator to a better Begin. - Iter SlotsAvailable(Iter Begin, unsigned N, unsigned ResourceSet, + /// SlotsAvailable - Returns true if all units are available. + /// + bool SlotsAvailable(Iter Begin, unsigned N, unsigned ResourceSet, unsigned &Resource) { assert(N && "Must check availability with N != 0"); // Determine end of interval Iter End = Begin + N; - // Alternate result - Iter Better = End; assert(End <= Tally.end() && "Tally is not large enough for schedule"); // Iterate thru each resource @@ -126,15 +124,31 @@ if (Interval == Begin) { // Success Resource = Res; - return Begin; + return true; } - if (Better > Interval) Better = Interval; } // No luck Resource = 0; - return Better; + return false; } + + /// RetrySlot - Finds a good candidate slot to retry search. + Iter RetrySlot(Iter Begin, unsigned N, unsigned ResourceSet) { + assert(N && "Must check availability with N != 0"); + // Determine end of interval + Iter End = Begin + N; + assert(End <= Tally.end() && "Tally is not large enough for schedule"); + + while (Begin != End--) { + // Clear units in use + ResourceSet &= ~*End; + // If no units left then we should go no further + if (!ResourceSet) return End + 1; + } + // Made it all the way through + return Begin; + } /// FindAndReserveStages - Return true if the stages can be completed. If /// so mark as busy. @@ -146,7 +160,7 @@ unsigned N = Stage->Cycles; // Check to see if N slots are available, if not fail unsigned Resource; - if (SlotsAvailable(Begin, N, Stage->Units, Resource) != Begin) return false; + if (!SlotsAvailable(Begin, N, Stage->Units, Resource)) return false; // Check to see if remaining stages are available, if not fail if (!FindAndReserveStages(Begin + N, Stage + 1, StageEnd)) return false; // Reserve resource @@ -177,9 +191,7 @@ // Try at cursor, if successful return position. if (FindAndReserveStages(Cursor, StageBegin, StageEnd)) return Cursor; // Locate a better position - unsigned Resource; - Cursor = SlotsAvailable(Cursor + 1, StageBegin->Cycles, StageBegin->Units, - Resource); + Cursor = RetrySlot(Cursor + 1, StageBegin->Cycles, StageBegin->Units); } } @@ -194,7 +206,13 @@ // as busy. unsigned FindAndReserve(unsigned Slot, InstrStage *StageBegin, InstrStage *StageEnd) { - return FindSlots(Tally.begin() + Slot, StageBegin, StageEnd)-Tally.begin(); + // Where to begin + Iter Begin = Tally.begin() + Slot; + // Find a free slot + Iter Where = FindSlots(Begin, StageBegin, StageEnd); + // Distance is slot number + unsigned Final = Where - Tally.begin(); + return Final; } }; @@ -718,7 +736,7 @@ /// GatherSchedulingInfo - Get latency and resource information about each node. /// void SimpleSched::GatherSchedulingInfo() { - + // Get instruction itineraries for the target const InstrItineraryData InstrItins = TM.getInstrItineraryData(); // For each node @@ -781,7 +799,7 @@ if (!Group->getDominator()) { NIIterator NGI = Group->group_begin(), NGE = Group->group_end(); NodeInfo *Dominator = *NGI; - unsigned Latency = Dominator->Latency; + unsigned Latency = 0; for (NGI++; NGI != NGE; NGI++) { NodeInfo* NGNI = *NGI; From lattner at cs.uiuc.edu Sat Nov 5 01:28:48 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sat, 5 Nov 2005 01:28:48 -0600 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp Message-ID: <200511050728.BAA21123@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: InstructionCombining.cpp updated: 1.403 -> 1.404 --- Log message: Turn srem -> urem when neither input has their sign bit set. This triggers 8 times in vortex, allowing the srems to be turned into shrs: OLD: %tmp.104 = rem int %tmp.5.i37, 16 ; [#uses=1] NEW: %tmp.104 = rem uint %tmp.5.i37, 16 ; [#uses=0] OLD: %tmp.98 = rem int %tmp.5.i24, 16 ; [#uses=1] NEW: %tmp.98 = rem uint %tmp.5.i24, 16 ; [#uses=0] OLD: %tmp.91 = rem int %tmp.5.i19, 8 ; [#uses=1] NEW: %tmp.91 = rem uint %tmp.5.i19, 8 ; [#uses=0] OLD: %tmp.88 = rem int %tmp.5.i14, 8 ; [#uses=1] NEW: %tmp.88 = rem uint %tmp.5.i14, 8 ; [#uses=0] OLD: %tmp.85 = rem int %tmp.5.i9, 1024 ; [#uses=2] NEW: %tmp.85 = rem uint %tmp.5.i9, 1024 ; [#uses=0] OLD: %tmp.82 = rem int %tmp.5.i, 512 ; [#uses=2] NEW: %tmp.82 = rem uint %tmp.5.i1, 512 ; [#uses=0] OLD: %tmp.48.i = rem int %tmp.5.i.i161, 4 ; [#uses=1] NEW: %tmp.48.i = rem uint %tmp.5.i.i161, 4 ; [#uses=0] OLD: %tmp.20.i2 = rem int %tmp.5.i.i, 4 ; [#uses=1] NEW: %tmp.20.i2 = rem uint %tmp.5.i.i, 4 ; [#uses=0] it also occurs 9 times in gcc, but with odd constant divisors (1009 and 61) so the payoff isn't as great. --- Diffs of the changes: (+19 -1) InstructionCombining.cpp | 20 +++++++++++++++++++- 1 files changed, 19 insertions(+), 1 deletion(-) Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.403 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.404 --- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.403 Wed Nov 2 12:35:40 2005 +++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp Sat Nov 5 01:28:37 2005 @@ -1246,7 +1246,7 @@ Instruction *InstCombiner::visitRem(BinaryOperator &I) { Value *Op0 = I.getOperand(0), *Op1 = I.getOperand(1); - if (I.getType()->isSigned()) + if (I.getType()->isSigned()) { if (Value *RHSNeg = dyn_castNegVal(Op1)) if (!isa(RHSNeg) || cast(RHSNeg)->getValue() > 0) { @@ -1255,6 +1255,24 @@ I.setOperand(1, RHSNeg); return &I; } + + // If the top bits of both operands are zero (i.e. we can prove they are + // unsigned inputs), turn this into a urem. + ConstantIntegral *MaskV = ConstantSInt::getMinValue(I.getType()); + if (MaskedValueIsZero(Op1, MaskV) && MaskedValueIsZero(Op0, MaskV)) { + const Type *NTy = Op0->getType()->getUnsignedVersion(); + Instruction *LHS = new CastInst(Op0, NTy, Op0->getName()); + InsertNewInstBefore(LHS, I); + Value *RHS; + if (Constant *R = dyn_cast(Op1)) + RHS = ConstantExpr::getCast(R, NTy); + else + RHS = InsertNewInstBefore(new CastInst(Op1, NTy, Op1->getName()), I); + Instruction *Rem = BinaryOperator::createRem(LHS, RHS, I.getName()); + InsertNewInstBefore(Rem, I); + return new CastInst(Rem, I.getType()); + } + } if (isa(Op0)) // undef % X -> 0 return ReplaceInstUsesWith(I, Constant::getNullValue(I.getType())); From lattner at cs.uiuc.edu Sat Nov 5 01:40:43 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sat, 5 Nov 2005 01:40:43 -0600 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp Message-ID: <200511050740.BAA21214@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: InstructionCombining.cpp updated: 1.404 -> 1.405 --- Log message: Turn sdiv into udiv if both operands have a clear sign bit. This occurs a few times in crafty: OLD: %tmp.36 = div int %tmp.35, 8 ; [#uses=1] NEW: %tmp.36 = div uint %tmp.35, 8 ; [#uses=0] OLD: %tmp.19 = div int %tmp.18, 8 ; [#uses=1] NEW: %tmp.19 = div uint %tmp.18, 8 ; [#uses=0] OLD: %tmp.117 = div int %tmp.116, 8 ; [#uses=1] NEW: %tmp.117 = div uint %tmp.116, 8 ; [#uses=0] OLD: %tmp.92 = div int %tmp.91, 8 ; [#uses=1] NEW: %tmp.92 = div uint %tmp.91, 8 ; [#uses=0] Which all turn into shrs. --- Diffs of the changes: (+19 -0) InstructionCombining.cpp | 19 +++++++++++++++++++ 1 files changed, 19 insertions(+) Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.404 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.405 --- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.404 Sat Nov 5 01:28:37 2005 +++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp Sat Nov 5 01:40:31 2005 @@ -1240,6 +1240,25 @@ if (LHS->equalsInt(0)) return ReplaceInstUsesWith(I, Constant::getNullValue(I.getType())); + if (I.getType()->isSigned()) { + // If the top bits of both operands are zero (i.e. we can prove they are + // unsigned inputs), turn this into a udiv. + ConstantIntegral *MaskV = ConstantSInt::getMinValue(I.getType()); + if (MaskedValueIsZero(Op1, MaskV) && MaskedValueIsZero(Op0, MaskV)) { + const Type *NTy = Op0->getType()->getUnsignedVersion(); + Instruction *LHS = new CastInst(Op0, NTy, Op0->getName()); + InsertNewInstBefore(LHS, I); + Value *RHS; + if (Constant *R = dyn_cast(Op1)) + RHS = ConstantExpr::getCast(R, NTy); + else + RHS = InsertNewInstBefore(new CastInst(Op1, NTy, Op1->getName()), I); + Instruction *Div = BinaryOperator::createDiv(LHS, RHS, I.getName()); + InsertNewInstBefore(Div, I); + return new CastInst(Div, I.getType()); + } + } + return 0; } From lattner at cs.uiuc.edu Sat Nov 5 02:20:41 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sat, 5 Nov 2005 02:20:41 -0600 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/TailCallElim/return-undef.ll Message-ID: <200511050820.CAA21425@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/TailCallElim: return-undef.ll added (r1.1) --- Log message: New testcase --- Diffs of the changes: (+8 -0) return-undef.ll | 8 ++++++++ 1 files changed, 8 insertions(+) Index: llvm/test/Regression/Transforms/TailCallElim/return-undef.ll diff -c /dev/null llvm/test/Regression/Transforms/TailCallElim/return-undef.ll:1.1 *** /dev/null Sat Nov 5 02:20:39 2005 --- llvm/test/Regression/Transforms/TailCallElim/return-undef.ll Sat Nov 5 02:20:29 2005 *************** *** 0 **** --- 1,8 ---- + ; RUN: llvm-as < %s | opt -tailcallelim | llvm-dis | grep sub && + ; RUN: llvm-as < %s | opt -tailcallelim | llvm-dis | not grep call + + int %test(int %X) { + %Y = sub int %X, 1 + %Z = call int %test(int %Y) + ret int undef + } From lattner at cs.uiuc.edu Sat Nov 5 02:21:23 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sat, 5 Nov 2005 02:21:23 -0600 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp Message-ID: <200511050821.CAA21456@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: TailRecursionElimination.cpp updated: 1.21 -> 1.22 --- Log message: Implement Transforms/TailCallElim/return-undef.ll, a trivial case that has been sitting in my inbox since May 18. :) --- Diffs of the changes: (+1 -0) TailRecursionElimination.cpp | 1 + 1 files changed, 1 insertion(+) Index: llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp diff -u llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp:1.21 llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp:1.22 --- llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp:1.21 Mon Aug 8 14:11:57 2005 +++ llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp Sat Nov 5 02:21:11 2005 @@ -342,6 +342,7 @@ // constant, return the value returned by the tail call, or that are being // accumulator recursion variable eliminated. if (Ret->getNumOperands() != 0 && Ret->getReturnValue() != CI && + !isa(Ret->getReturnValue()) && AccumulatorRecursionEliminationInitVal == 0 && !getCommonReturnValue(Ret, CI)) return false; From lattner at cs.uiuc.edu Sat Nov 5 02:58:07 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sat, 5 Nov 2005 02:58:07 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/PowerPC/README.txt Message-ID: <200511050858.CAA21599@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/PowerPC: README.txt updated: 1.37 -> 1.38 --- Log message: add a case Nate sent me --- Diffs of the changes: (+23 -0) README.txt | 23 +++++++++++++++++++++++ 1 files changed, 23 insertions(+) Index: llvm/lib/Target/PowerPC/README.txt diff -u llvm/lib/Target/PowerPC/README.txt:1.37 llvm/lib/Target/PowerPC/README.txt:1.38 --- llvm/lib/Target/PowerPC/README.txt:1.37 Sun Oct 30 01:42:12 2005 +++ llvm/lib/Target/PowerPC/README.txt Sat Nov 5 02:57:56 2005 @@ -217,3 +217,26 @@ stw r2, 0(r3) blr +===-------------------------------------------------------------------------=== + +Compile this: + +int %f1(int %a, int %b) { + %tmp.1 = and int %a, 15 ; [#uses=1] + %tmp.3 = and int %b, 240 ; [#uses=1] + %tmp.4 = or int %tmp.3, %tmp.1 ; [#uses=1] + ret int %tmp.4 +} + +without a copy. We make this currently: + +_f1: + rlwinm r2, r4, 0, 24, 27 + rlwimi r2, r3, 0, 28, 31 + or r3, r2, r2 + blr + +The two-addr pass or RA needs to learn when it is profitable to commute an +instruction to avoid a copy AFTER the 2-addr instruction. The 2-addr pass +currently only commutes to avoid inserting a copy BEFORE the two addr instr. + From natebegeman at mac.com Sat Nov 5 03:21:42 2005 From: natebegeman at mac.com (Nate Begeman) Date: Sat, 5 Nov 2005 03:21:42 -0600 Subject: [llvm-commits] CVS: llvm/include/llvm/Transforms/Scalar.h Message-ID: <200511050921.DAA02042@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/Transforms: Scalar.h updated: 1.57 -> 1.58 --- Log message: Add support alignment of allocation instructions. Add support for specifying alignment and size of setjmp jmpbufs. No targets currently do anything with this information, nor is it presrved in the bytecode representation. That's coming up next. --- Diffs of the changes: (+2 -1) Scalar.h | 3 ++- 1 files changed, 2 insertions(+), 1 deletion(-) Index: llvm/include/llvm/Transforms/Scalar.h diff -u llvm/include/llvm/Transforms/Scalar.h:1.57 llvm/include/llvm/Transforms/Scalar.h:1.58 --- llvm/include/llvm/Transforms/Scalar.h:1.57 Sat Oct 29 00:32:20 2005 +++ llvm/include/llvm/Transforms/Scalar.h Sat Nov 5 03:21:28 2005 @@ -271,7 +271,8 @@ // "my LLVM-to-LLVM pass doesn't support the invoke instruction yet" lowering // pass. // -FunctionPass *createLowerInvokePass(); +FunctionPass *createLowerInvokePass(unsigned JumBufSize = 200, + unsigned JumpBufAlign = 0); extern const PassInfo *LowerInvokePassID; From natebegeman at mac.com Sat Nov 5 03:21:43 2005 From: natebegeman at mac.com (Nate Begeman) Date: Sat, 5 Nov 2005 03:21:43 -0600 Subject: [llvm-commits] CVS: llvm/lib/Transforms/IPO/GlobalOpt.cpp Message-ID: <200511050921.DAA02050@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/IPO: GlobalOpt.cpp updated: 1.59 -> 1.60 --- Log message: Add support alignment of allocation instructions. Add support for specifying alignment and size of setjmp jmpbufs. No targets currently do anything with this information, nor is it presrved in the bytecode representation. That's coming up next. --- Diffs of the changes: (+2 -1) GlobalOpt.cpp | 3 ++- 1 files changed, 2 insertions(+), 1 deletion(-) Index: llvm/lib/Transforms/IPO/GlobalOpt.cpp diff -u llvm/lib/Transforms/IPO/GlobalOpt.cpp:1.59 llvm/lib/Transforms/IPO/GlobalOpt.cpp:1.60 --- llvm/lib/Transforms/IPO/GlobalOpt.cpp:1.59 Tue Oct 25 06:18:06 2005 +++ llvm/lib/Transforms/IPO/GlobalOpt.cpp Sat Nov 5 03:21:28 2005 @@ -678,7 +678,7 @@ (unsigned)NElements->getRawValue()); MallocInst *NewMI = new MallocInst(NewTy, Constant::getNullValue(Type::UIntTy), - MI->getName(), MI); + MI->getAlignment(), MI->getName(), MI); std::vector Indices; Indices.push_back(Constant::getNullValue(Type::IntTy)); Indices.push_back(Indices[0]); @@ -950,6 +950,7 @@ DEBUG(std::cerr << "LOCALIZING GLOBAL: " << *GV); Instruction* FirstI = GS.AccessingFunction->getEntryBlock().begin(); const Type* ElemTy = GV->getType()->getElementType(); + // FIXME: Pass Global's alignment when globals have alignment AllocaInst* Alloca = new AllocaInst(ElemTy, NULL, GV->getName(), FirstI); if (!isa(GV->getInitializer())) new StoreInst(GV->getInitializer(), Alloca, FirstI); From natebegeman at mac.com Sat Nov 5 03:21:43 2005 From: natebegeman at mac.com (Nate Begeman) Date: Sat, 5 Nov 2005 03:21:43 -0600 Subject: [llvm-commits] CVS: llvm/include/llvm/Instructions.h Message-ID: <200511050921.DAA02054@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm: Instructions.h updated: 1.27 -> 1.28 --- Log message: Add support alignment of allocation instructions. Add support for specifying alignment and size of setjmp jmpbufs. No targets currently do anything with this information, nor is it presrved in the bytecode representation. That's coming up next. --- Diffs of the changes: (+28 -8) Instructions.h | 36 ++++++++++++++++++++++++++++-------- 1 files changed, 28 insertions(+), 8 deletions(-) Index: llvm/include/llvm/Instructions.h diff -u llvm/include/llvm/Instructions.h:1.27 llvm/include/llvm/Instructions.h:1.28 --- llvm/include/llvm/Instructions.h:1.27 Thu Aug 4 19:49:06 2005 +++ llvm/include/llvm/Instructions.h Sat Nov 5 03:21:28 2005 @@ -33,10 +33,11 @@ /// AllocaInst. /// class AllocationInst : public UnaryInstruction { + unsigned Alignment; protected: - AllocationInst(const Type *Ty, Value *ArraySize, unsigned iTy, + AllocationInst(const Type *Ty, Value *ArraySize, unsigned iTy, unsigned Align, const std::string &Name = "", Instruction *InsertBefore = 0); - AllocationInst(const Type *Ty, Value *ArraySize, unsigned iTy, + AllocationInst(const Type *Ty, Value *ArraySize, unsigned iTy, unsigned Align, const std::string &Name, BasicBlock *InsertAtEnd); public: @@ -63,6 +64,11 @@ /// const Type *getAllocatedType() const; + /// getAlignment - Return the alignment of the memory that is being allocated + /// by the instruction. + /// + unsigned getAlignment() const { return Alignment; } + virtual Instruction *clone() const = 0; // Methods for support type inquiry through isa, cast, and dyn_cast: @@ -89,11 +95,18 @@ explicit MallocInst(const Type *Ty, Value *ArraySize = 0, const std::string &Name = "", Instruction *InsertBefore = 0) - : AllocationInst(Ty, ArraySize, Malloc, Name, InsertBefore) {} + : AllocationInst(Ty, ArraySize, Malloc, 0, Name, InsertBefore) {} MallocInst(const Type *Ty, Value *ArraySize, const std::string &Name, BasicBlock *InsertAtEnd) - : AllocationInst(Ty, ArraySize, Malloc, Name, InsertAtEnd) {} - + : AllocationInst(Ty, ArraySize, Malloc, 0, Name, InsertAtEnd) {} + MallocInst(const Type *Ty, Value *ArraySize, unsigned Align, + const std::string &Name, BasicBlock *InsertAtEnd) + : AllocationInst(Ty, ArraySize, Malloc, Align, Name, InsertAtEnd) {} + explicit MallocInst(const Type *Ty, Value *ArraySize, unsigned Align, + const std::string &Name = "", + Instruction *InsertBefore = 0) + : AllocationInst(Ty, ArraySize, Malloc, Align, Name, InsertBefore) {} + virtual MallocInst *clone() const; // Methods for support type inquiry through isa, cast, and dyn_cast: @@ -119,11 +132,18 @@ explicit AllocaInst(const Type *Ty, Value *ArraySize = 0, const std::string &Name = "", Instruction *InsertBefore = 0) - : AllocationInst(Ty, ArraySize, Alloca, Name, InsertBefore) {} + : AllocationInst(Ty, ArraySize, Alloca, 0, Name, InsertBefore) {} AllocaInst(const Type *Ty, Value *ArraySize, const std::string &Name, BasicBlock *InsertAtEnd) - : AllocationInst(Ty, ArraySize, Alloca, Name, InsertAtEnd) {} - + : AllocationInst(Ty, ArraySize, Alloca, 0, Name, InsertAtEnd) {} + AllocaInst(const Type *Ty, Value *ArraySize, unsigned Align, + const std::string &Name, BasicBlock *InsertAtEnd) + : AllocationInst(Ty, ArraySize, Alloca, Align, Name, InsertAtEnd) {} + explicit AllocaInst(const Type *Ty, Value *ArraySize, unsigned Align, + const std::string &Name = "", + Instruction *InsertBefore = 0) + : AllocationInst(Ty, ArraySize, Alloca, Align, Name, InsertBefore) {} + virtual AllocaInst *clone() const; // Methods for support type inquiry through isa, cast, and dyn_cast: From natebegeman at mac.com Sat Nov 5 03:21:43 2005 From: natebegeman at mac.com (Nate Begeman) Date: Sat, 5 Nov 2005 03:21:43 -0600 Subject: [llvm-commits] CVS: llvm/lib/VMCore/AsmWriter.cpp Instructions.cpp Message-ID: <200511050921.DAA02048@zion.cs.uiuc.edu> Changes in directory llvm/lib/VMCore: AsmWriter.cpp updated: 1.181 -> 1.182 Instructions.cpp updated: 1.26 -> 1.27 --- Log message: Add support alignment of allocation instructions. Add support for specifying alignment and size of setjmp jmpbufs. No targets currently do anything with this information, nor is it presrved in the bytecode representation. That's coming up next. --- Diffs of the changes: (+9 -6) AsmWriter.cpp | 3 +++ Instructions.cpp | 12 ++++++------ 2 files changed, 9 insertions(+), 6 deletions(-) Index: llvm/lib/VMCore/AsmWriter.cpp diff -u llvm/lib/VMCore/AsmWriter.cpp:1.181 llvm/lib/VMCore/AsmWriter.cpp:1.182 --- llvm/lib/VMCore/AsmWriter.cpp:1.181 Wed Aug 17 14:33:31 2005 +++ llvm/lib/VMCore/AsmWriter.cpp Sat Nov 5 03:21:28 2005 @@ -1172,6 +1172,9 @@ Out << ','; writeOperand(AI->getArraySize(), true); } + if (AI->getAlignment()) { + Out << ", " << AI->getAlignment(); + } } else if (isa(I)) { if (Operand) writeOperand(Operand, true); // Work with broken code Out << " to "; Index: llvm/lib/VMCore/Instructions.cpp diff -u llvm/lib/VMCore/Instructions.cpp:1.26 llvm/lib/VMCore/Instructions.cpp:1.27 --- llvm/lib/VMCore/Instructions.cpp:1.26 Fri Aug 5 10:37:31 2005 +++ llvm/lib/VMCore/Instructions.cpp Sat Nov 5 03:21:28 2005 @@ -494,18 +494,18 @@ } AllocationInst::AllocationInst(const Type *Ty, Value *ArraySize, unsigned iTy, - const std::string &Name, + unsigned Align, const std::string &Name, Instruction *InsertBefore) : UnaryInstruction(PointerType::get(Ty), iTy, getAISize(ArraySize), - Name, InsertBefore) { + Name, InsertBefore), Alignment(Align) { assert(Ty != Type::VoidTy && "Cannot allocate void!"); } AllocationInst::AllocationInst(const Type *Ty, Value *ArraySize, unsigned iTy, - const std::string &Name, + unsigned Align, const std::string &Name, BasicBlock *InsertAtEnd) : UnaryInstruction(PointerType::get(Ty), iTy, getAISize(ArraySize), - Name, InsertAtEnd) { + Name, InsertAtEnd), Alignment(Align) { assert(Ty != Type::VoidTy && "Cannot allocate void!"); } @@ -521,12 +521,12 @@ AllocaInst::AllocaInst(const AllocaInst &AI) : AllocationInst(AI.getType()->getElementType(), (Value*)AI.getOperand(0), - Instruction::Alloca) { + Instruction::Alloca, AI.getAlignment()) { } MallocInst::MallocInst(const MallocInst &MI) : AllocationInst(MI.getType()->getElementType(), (Value*)MI.getOperand(0), - Instruction::Malloc) { + Instruction::Malloc, MI.getAlignment()) { } //===----------------------------------------------------------------------===// From natebegeman at mac.com Sat Nov 5 03:21:43 2005 From: natebegeman at mac.com (Nate Begeman) Date: Sat, 5 Nov 2005 03:21:43 -0600 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp LowerInvoke.cpp ScalarReplAggregates.cpp Message-ID: <200511050921.DAA02076@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: InstructionCombining.cpp updated: 1.405 -> 1.406 LowerInvoke.cpp updated: 1.34 -> 1.35 ScalarReplAggregates.cpp updated: 1.31 -> 1.32 --- Log message: Add support alignment of allocation instructions. Add support for specifying alignment and size of setjmp jmpbufs. No targets currently do anything with this information, nor is it presrved in the bytecode representation. That's coming up next. --- Diffs of the changes: (+19 -15) InstructionCombining.cpp | 8 ++++---- LowerInvoke.cpp | 21 ++++++++++++--------- ScalarReplAggregates.cpp | 5 +++-- 3 files changed, 19 insertions(+), 15 deletions(-) Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.405 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.406 --- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.405 Sat Nov 5 01:40:31 2005 +++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp Sat Nov 5 03:21:28 2005 @@ -3936,9 +3936,9 @@ std::string Name = AI.getName(); AI.setName(""); AllocationInst *New; if (isa(AI)) - New = new MallocInst(CastElTy, Amt, Name); + New = new MallocInst(CastElTy, Amt, AI.getAlignment(), Name); else - New = new AllocaInst(CastElTy, Amt, Name); + New = new AllocaInst(CastElTy, Amt, AI.getAlignment(), Name); InsertNewInstBefore(New, AI); // If the allocation has multiple uses, insert a cast and change all things @@ -5266,10 +5266,10 @@ // Create and insert the replacement instruction... if (isa(AI)) - New = new MallocInst(NewTy, 0, AI.getName()); + New = new MallocInst(NewTy, 0, AI.getAlignment(), AI.getName()); else { assert(isa(AI) && "Unknown type of allocation inst!"); - New = new AllocaInst(NewTy, 0, AI.getName()); + New = new AllocaInst(NewTy, 0, AI.getAlignment(), AI.getName()); } InsertNewInstBefore(New, AI); Index: llvm/lib/Transforms/Scalar/LowerInvoke.cpp diff -u llvm/lib/Transforms/Scalar/LowerInvoke.cpp:1.34 llvm/lib/Transforms/Scalar/LowerInvoke.cpp:1.35 --- llvm/lib/Transforms/Scalar/LowerInvoke.cpp:1.34 Sat Oct 22 23:37:20 2005 +++ llvm/lib/Transforms/Scalar/LowerInvoke.cpp Sat Nov 5 03:21:28 2005 @@ -67,6 +67,8 @@ GlobalVariable *JBListHead; Function *SetJmpFn, *LongJmpFn; public: + LowerInvoke(unsigned Size = 200, unsigned Align = 0) : JumpBufSize(Size), + JumpBufAlign(Align) {} bool doInitialization(Module &M); bool runOnFunction(Function &F); @@ -78,6 +80,9 @@ void rewriteExpensiveInvoke(InvokeInst *II, unsigned InvokeNo, AllocaInst *InvokeNum, SwitchInst *CatchSwitch); bool insertExpensiveEHSupport(Function &F); + + unsigned JumpBufSize; + unsigned JumpBufAlign; }; RegisterOpt @@ -87,7 +92,10 @@ const PassInfo *llvm::LowerInvokePassID = X.getPassInfo(); // Public Interface To the LowerInvoke pass. -FunctionPass *llvm::createLowerInvokePass() { return new LowerInvoke(); } +FunctionPass *llvm::createLowerInvokePass(unsigned JumpBufSize, + unsigned JumpBufAlign) { + return new LowerInvoke(JumpBufSize, JumpBufAlign); +} // doInitialization - Make sure that there is a prototype for abort in the // current module. @@ -95,13 +103,8 @@ const Type *VoidPtrTy = PointerType::get(Type::SByteTy); AbortMessage = 0; if (ExpensiveEHSupport) { - // Insert a type for the linked list of jump buffers. Unfortunately, we - // don't know the size of the target's setjmp buffer, so we make a guess. - // If this guess turns out to be too small, bad stuff could happen. - unsigned JmpBufSize = 200; // PPC has 192 words - assert(sizeof(jmp_buf) <= JmpBufSize*sizeof(void*) && - "LowerInvoke doesn't know about targets with jmp_buf size > 200 words!"); - const Type *JmpBufTy = ArrayType::get(VoidPtrTy, JmpBufSize); + // Insert a type for the linked list of jump buffers. + const Type *JmpBufTy = ArrayType::get(VoidPtrTy, JumpBufSize); { // The type is recursive, so use a type holder. std::vector Elements; @@ -441,7 +444,7 @@ // that needs to be restored on all exits from the function. This is an // alloca because the value needs to be live across invokes. AllocaInst *JmpBuf = - new AllocaInst(JBLinkTy, 0, "jblink", F.begin()->begin()); + new AllocaInst(JBLinkTy, 0, JumpBufAlign, "jblink", F.begin()->begin()); std::vector Idx; Idx.push_back(Constant::getNullValue(Type::IntTy)); Index: llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp diff -u llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp:1.31 llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp:1.32 --- llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp:1.31 Thu Apr 21 18:45:12 2005 +++ llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp Sat Nov 5 03:21:28 2005 @@ -159,7 +159,8 @@ if (const StructType *ST = dyn_cast(AI->getAllocatedType())) { ElementAllocas.reserve(ST->getNumContainedTypes()); for (unsigned i = 0, e = ST->getNumContainedTypes(); i != e; ++i) { - AllocaInst *NA = new AllocaInst(ST->getContainedType(i), 0, + AllocaInst *NA = new AllocaInst(ST->getContainedType(i), 0, + AI->getAlignment(), AI->getName() + "." + utostr(i), AI); ElementAllocas.push_back(NA); WorkList.push_back(NA); // Add to worklist for recursive processing @@ -169,7 +170,7 @@ ElementAllocas.reserve(AT->getNumElements()); const Type *ElTy = AT->getElementType(); for (unsigned i = 0, e = AT->getNumElements(); i != e; ++i) { - AllocaInst *NA = new AllocaInst(ElTy, 0, + AllocaInst *NA = new AllocaInst(ElTy, 0, AI->getAlignment(), AI->getName() + "." + utostr(i), AI); ElementAllocas.push_back(NA); WorkList.push_back(NA); // Add to worklist for recursive processing From natebegeman at mac.com Sat Nov 5 03:21:43 2005 From: natebegeman at mac.com (Nate Begeman) Date: Sat, 5 Nov 2005 03:21:43 -0600 Subject: [llvm-commits] CVS: llvm/lib/AsmParser/Lexer.cpp Lexer.l llvmAsmParser.cpp llvmAsmParser.h llvmAsmParser.y Message-ID: <200511050921.DAA02068@zion.cs.uiuc.edu> Changes in directory llvm/lib/AsmParser: Lexer.cpp updated: 1.10 -> 1.11 Lexer.l updated: 1.64 -> 1.65 llvmAsmParser.cpp updated: 1.18 -> 1.19 llvmAsmParser.h updated: 1.10 -> 1.11 llvmAsmParser.y updated: 1.232 -> 1.233 --- Log message: Add support alignment of allocation instructions. Add support for specifying alignment and size of setjmp jmpbufs. No targets currently do anything with this information, nor is it presrved in the bytecode representation. That's coming up next. --- Diffs of the changes: (+2614 -3257) Lexer.cpp | 943 +++++------ Lexer.l | 1 llvmAsmParser.cpp | 4584 +++++++++++++++++++++++------------------------------- llvmAsmParser.h | 325 +-- llvmAsmParser.y | 18 5 files changed, 2614 insertions(+), 3257 deletions(-) Index: llvm/lib/AsmParser/Lexer.cpp diff -u llvm/lib/AsmParser/Lexer.cpp:1.10 llvm/lib/AsmParser/Lexer.cpp:1.11 --- llvm/lib/AsmParser/Lexer.cpp:1.10 Sat Aug 27 13:50:38 2005 +++ llvm/lib/AsmParser/Lexer.cpp Sat Nov 5 03:21:28 2005 @@ -20,7 +20,7 @@ /* A lexical scanner generated by flex */ /* Scanner skeleton version: - * $Header: /var/cvs/llvm/llvm/lib/AsmParser/Lexer.cpp,v 1.10 2005/08/27 18:50:38 reid Exp $ + * $Header: /var/cvs/llvm/llvm/lib/AsmParser/Lexer.cpp,v 1.11 2005/11/05 09:21:28 sampo Exp $ */ #define FLEX_SCANNER @@ -28,7 +28,6 @@ #define YY_FLEX_MINOR_VERSION 5 #include -#include /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */ @@ -42,6 +41,7 @@ #ifdef __cplusplus #include +#include /* Use prototypes in function declarations. */ #define YY_USE_PROTOS @@ -308,32 +308,32 @@ *yy_cp = '\0'; \ yy_c_buf_p = yy_cp; -#define YY_NUM_RULES 99 -#define YY_END_OF_BUFFER 100 -static yyconst short int yy_acclist[177] = +#define YY_NUM_RULES 100 +#define YY_END_OF_BUFFER 101 +static yyconst short int yy_acclist[178] = { 0, - 100, 98, 99, 97, 98, 99, 97, 99, 98, 99, - 98, 99, 98, 99, 98, 99, 98, 99, 98, 99, - 90, 98, 99, 90, 98, 99, 1, 98, 99, 98, - 99, 98, 99, 98, 99, 98, 99, 98, 99, 98, - 99, 98, 99, 98, 99, 98, 99, 98, 99, 98, - 99, 98, 99, 98, 99, 98, 99, 98, 99, 98, - 99, 98, 99, 98, 99, 98, 99, 98, 99, 98, - 99, 89, 87, 86, 86, 93, 91, 95, 90, 1, - 75, 32, 57, 20, 89, 86, 86, 94, 95, 17, - 95, 96, 51, 56, 30, 33, 54, 3, 42, 53, - - 22, 65, 55, 74, 69, 70, 52, 58, 88, 95, - 95, 37, 66, 67, 82, 83, 44, 19, 92, 23, - 4, 49, 43, 36, 11, 95, 2, 5, 46, 48, - 38, 60, 64, 62, 63, 61, 59, 40, 84, 39, - 45, 18, 72, 81, 35, 47, 27, 21, 34, 7, - 77, 29, 80, 50, 68, 76, 24, 25, 78, 41, - 73, 71, 6, 26, 8, 14, 9, 10, 31, 12, - 28, 79, 85, 13, 15, 16 + 101, 99, 100, 98, 99, 100, 98, 100, 99, 100, + 99, 100, 99, 100, 99, 100, 99, 100, 99, 100, + 91, 99, 100, 91, 99, 100, 1, 99, 100, 99, + 100, 99, 100, 99, 100, 99, 100, 99, 100, 99, + 100, 99, 100, 99, 100, 99, 100, 99, 100, 99, + 100, 99, 100, 99, 100, 99, 100, 99, 100, 99, + 100, 99, 100, 99, 100, 99, 100, 99, 100, 99, + 100, 90, 88, 87, 87, 94, 92, 96, 91, 1, + 76, 32, 58, 20, 90, 87, 87, 95, 96, 17, + 96, 97, 52, 57, 30, 33, 55, 3, 42, 54, + + 22, 66, 56, 75, 70, 71, 53, 59, 89, 96, + 96, 37, 67, 68, 83, 84, 44, 19, 93, 23, + 4, 49, 43, 36, 11, 96, 51, 2, 5, 46, + 48, 38, 61, 65, 63, 64, 62, 60, 40, 85, + 39, 45, 18, 73, 82, 35, 47, 27, 21, 34, + 7, 78, 29, 81, 50, 69, 77, 24, 25, 79, + 41, 74, 72, 6, 26, 8, 14, 9, 10, 31, + 12, 28, 80, 86, 13, 15, 16 } ; -static yyconst short int yy_accept[398] = +static yyconst short int yy_accept[401] = { 0, 1, 1, 1, 2, 4, 7, 9, 11, 13, 15, 17, 19, 21, 24, 27, 30, 32, 34, 36, 38, @@ -347,37 +347,37 @@ 84, 84, 84, 84, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 86, 87, 89, - 90, 91, 92, 92, 93, 94, 94, 95, 95, 95, - 96, 96, 96, 96, 97, 97, 97, 97, 97, 98, - 98, 99, 99, 99, 99, 99, 99, 99, 99, 99, - 99, 100, 100, 100, 100, 100, 100, 100, 100, 101, - 102, 102, 102, 103, 103, 104, 105, 105, 105, 105, - 105, 106, 106, 107, 107, 108, 108, 108, 108, 108, + 90, 91, 92, 92, 93, 94, 94, 94, 95, 95, + 95, 96, 96, 96, 96, 97, 97, 97, 97, 97, + 98, 98, 99, 99, 99, 99, 99, 99, 99, 99, + 99, 99, 100, 100, 100, 100, 100, 100, 100, 100, + 101, 102, 102, 102, 103, 103, 104, 105, 105, 105, + 105, 105, 106, 106, 107, 107, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, - 108, 108, 108, 108, 108, 108, 109, 109, 110, 111, - 111, 111, 111, 112, 112, 112, 112, 113, 114, 115, + 108, 108, 108, 108, 108, 108, 108, 109, 109, 110, + 111, 111, 111, 111, 112, 112, 112, 112, 112, 113, - 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, - 115, 116, 116, 116, 116, 116, 116, 116, 116, 116, - 117, 118, 118, 119, 119, 119, 120, 120, 120, 120, - 120, 120, 120, 120, 120, 120, 121, 121, 121, 122, - 123, 123, 124, 124, 124, 124, 124, 124, 124, 124, - 124, 124, 125, 125, 126, 126, 127, 127, 127, 128, - 128, 128, 128, 128, 128, 128, 128, 128, 129, 129, - 130, 130, 130, 130, 130, 130, 131, 131, 131, 131, - 131, 131, 132, 132, 133, 134, 135, 136, 137, 138, - 139, 140, 140, 140, 140, 141, 142, 143, 143, 143, - - 143, 143, 143, 144, 144, 144, 144, 145, 145, 146, - 146, 146, 146, 147, 148, 149, 149, 150, 150, 151, - 151, 151, 152, 152, 153, 154, 155, 155, 156, 157, - 158, 159, 159, 159, 160, 161, 162, 163, 163, 163, - 163, 163, 164, 165, 165, 165, 165, 165, 165, 165, - 165, 165, 165, 165, 165, 166, 167, 167, 167, 168, - 169, 169, 169, 169, 170, 170, 171, 171, 171, 171, - 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, - 171, 172, 172, 173, 173, 173, 173, 173, 173, 174, - 174, 175, 175, 176, 176, 177, 177 + 114, 115, 115, 115, 115, 115, 115, 115, 115, 115, + 115, 115, 115, 116, 116, 116, 116, 116, 116, 116, + 116, 116, 117, 118, 118, 119, 119, 119, 120, 120, + 120, 120, 120, 120, 120, 120, 120, 120, 121, 121, + 121, 122, 123, 123, 124, 124, 124, 124, 124, 124, + 124, 124, 124, 124, 125, 125, 126, 126, 127, 128, + 128, 128, 129, 129, 129, 129, 129, 129, 129, 129, + 129, 130, 130, 131, 131, 131, 131, 131, 131, 132, + 132, 132, 132, 132, 132, 133, 133, 134, 135, 136, + 137, 138, 139, 140, 141, 141, 141, 141, 142, 143, + + 144, 144, 144, 144, 144, 144, 145, 145, 145, 145, + 146, 146, 147, 147, 147, 147, 148, 149, 150, 150, + 151, 151, 152, 152, 152, 153, 153, 154, 155, 156, + 156, 157, 158, 159, 160, 160, 160, 161, 162, 163, + 164, 164, 164, 164, 164, 165, 166, 166, 166, 166, + 166, 166, 166, 166, 166, 166, 166, 166, 167, 168, + 168, 168, 169, 170, 170, 170, 170, 171, 171, 172, + 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, + 172, 172, 172, 172, 173, 173, 174, 174, 174, 174, + 174, 174, 175, 175, 176, 176, 177, 177, 178, 178 } ; @@ -422,105 +422,105 @@ 3 } ; -static yyconst short int yy_base[402] = +static yyconst short int yy_base[405] = { 0, - 0, 0, 834, 835, 835, 835, 829, 820, 34, 36, + 0, 0, 840, 841, 841, 841, 835, 826, 34, 36, 38, 42, 46, 50, 0, 51, 54, 53, 56, 61, 76, 77, 79, 80, 82, 83, 84, 90, 31, 111, - 94, 140, 113, 55, 110, 116, 827, 835, 818, 835, + 94, 140, 113, 55, 110, 116, 833, 841, 824, 841, 0, 128, 131, 144, 150, 124, 160, 167, 172, 0, - 136, 89, 168, 100, 41, 145, 114, 817, 139, 183, - 184, 185, 173, 186, 187, 189, 191, 133, 188, 193, - 200, 202, 194, 203, 205, 215, 208, 211, 207, 214, - 57, 816, 224, 225, 227, 231, 233, 234, 241, 235, - 236, 239, 247, 815, 251, 244, 245, 248, 254, 266, - - 255, 276, 269, 278, 270, 277, 814, 0, 287, 291, - 813, 303, 309, 0, 812, 295, 811, 288, 310, 810, - 296, 299, 315, 809, 316, 317, 318, 319, 808, 240, - 322, 320, 321, 325, 326, 327, 328, 331, 336, 341, - 343, 344, 345, 346, 348, 350, 353, 351, 807, 806, - 355, 357, 805, 359, 804, 803, 380, 361, 363, 391, - 802, 373, 801, 374, 800, 369, 365, 393, 396, 398, - 401, 397, 399, 409, 403, 411, 405, 368, 413, 416, - 417, 418, 367, 419, 423, 799, 425, 835, 431, 437, - 443, 446, 449, 450, 439, 451, 798, 797, 796, 452, - - 453, 455, 454, 458, 461, 462, 463, 465, 464, 469, - 795, 470, 472, 478, 475, 479, 480, 482, 483, 794, - 793, 486, 792, 488, 490, 0, 494, 499, 489, 501, - 502, 505, 497, 507, 508, 791, 517, 518, 790, 789, - 519, 788, 521, 527, 522, 529, 523, 530, 531, 536, - 538, 787, 539, 786, 541, 544, 544, 545, 785, 548, - 556, 546, 557, 550, 558, 560, 564, 784, 566, 783, - 568, 569, 570, 571, 576, 782, 572, 578, 590, 582, - 592, 781, 579, 780, 779, 778, 777, 776, 775, 774, - 773, 593, 580, 595, 772, 771, 770, 594, 599, 600, - - 596, 598, 769, 607, 610, 611, 768, 612, 767, 614, - 613, 615, 766, 765, 764, 616, 763, 618, 762, 620, - 627, 761, 626, 760, 759, 758, 624, 757, 756, 755, - 754, 635, 638, 753, 752, 749, 739, 636, 639, 640, - 641, 738, 737, 643, 644, 642, 646, 647, 649, 655, - 662, 654, 665, 666, 736, 735, 668, 669, 734, 733, - 670, 672, 673, 732, 676, 731, 674, 675, 678, 681, - 684, 686, 682, 690, 693, 695, 696, 700, 698, 703, - 730, 708, 728, 706, 704, 709, 710, 711, 726, 712, - 722, 714, 574, 720, 491, 835, 753, 755, 280, 759, + 136, 139, 168, 100, 41, 145, 114, 823, 173, 183, + 184, 185, 161, 187, 189, 191, 193, 133, 194, 196, + 200, 202, 205, 206, 209, 217, 89, 210, 213, 216, + 57, 822, 207, 224, 223, 227, 229, 233, 240, 235, + 238, 247, 249, 821, 250, 245, 241, 242, 265, 267, + + 266, 268, 271, 276, 277, 279, 820, 0, 253, 292, + 819, 304, 310, 0, 818, 311, 294, 817, 287, 314, + 816, 282, 315, 316, 815, 317, 299, 318, 319, 814, + 320, 323, 328, 329, 324, 331, 335, 332, 342, 343, + 344, 347, 345, 348, 350, 352, 353, 355, 358, 813, + 812, 362, 360, 811, 365, 810, 809, 385, 374, 367, + 389, 808, 378, 807, 381, 806, 385, 371, 368, 396, + 401, 403, 405, 407, 409, 411, 414, 413, 416, 417, + 418, 419, 424, 434, 427, 425, 805, 436, 841, 446, + 452, 371, 458, 461, 421, 446, 452, 462, 804, 803, + + 802, 463, 441, 466, 465, 467, 468, 472, 474, 475, + 476, 477, 801, 481, 480, 488, 486, 487, 489, 490, + 494, 800, 799, 492, 798, 493, 498, 0, 502, 499, + 503, 505, 513, 515, 512, 516, 519, 797, 518, 529, + 796, 795, 530, 794, 520, 532, 533, 538, 534, 537, + 540, 541, 545, 793, 547, 792, 549, 555, 791, 550, + 548, 790, 557, 560, 559, 437, 566, 567, 563, 568, + 789, 569, 788, 573, 574, 571, 577, 579, 787, 578, + 581, 591, 583, 593, 786, 596, 785, 784, 783, 782, + 781, 780, 779, 778, 597, 599, 601, 777, 776, 775, + + 600, 604, 605, 603, 606, 774, 607, 608, 612, 773, + 614, 772, 615, 616, 618, 771, 770, 769, 628, 768, + 620, 767, 634, 637, 766, 624, 765, 764, 763, 635, + 762, 761, 760, 759, 638, 641, 758, 755, 746, 744, + 639, 644, 645, 646, 743, 742, 648, 649, 647, 650, + 652, 655, 666, 667, 659, 660, 670, 741, 740, 673, + 674, 738, 737, 675, 676, 678, 736, 679, 735, 680, + 682, 685, 686, 689, 693, 694, 695, 696, 700, 701, + 702, 707, 706, 732, 711, 731, 708, 712, 709, 715, + 716, 728, 722, 724, 725, 372, 726, 292, 841, 759, - 161 + 761, 298, 765, 252 } ; -static yyconst short int yy_def[402] = +static yyconst short int yy_def[405] = { 0, - 396, 1, 396, 396, 396, 396, 397, 398, 399, 396, - 398, 398, 398, 398, 400, 398, 398, 398, 398, 398, - 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, - 398, 398, 398, 398, 398, 398, 397, 396, 398, 396, - 401, 401, 396, 396, 398, 398, 398, 398, 398, 400, - 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, - 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, - 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, - 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, - 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, - - 398, 398, 398, 398, 398, 398, 396, 401, 401, 396, - 398, 398, 398, 49, 398, 398, 398, 398, 398, 398, - 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, - 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, - 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, - 398, 398, 398, 398, 398, 398, 49, 398, 398, 398, - 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, - 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, - 398, 398, 398, 398, 398, 398, 398, 396, 396, 396, - 396, 398, 398, 398, 398, 398, 398, 398, 398, 398, - - 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, - 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, - 398, 398, 398, 398, 398, 157, 398, 398, 398, 398, - 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, - 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, - 398, 398, 398, 398, 398, 396, 398, 398, 398, 398, - 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, - 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, - 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, - 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, - - 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, - 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, - 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, - 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, - 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, - 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, - 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, - 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, - 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, - 398, 398, 398, 398, 398, 0, 396, 396, 396, 396, + 399, 1, 399, 399, 399, 399, 400, 401, 402, 399, + 401, 401, 401, 401, 403, 401, 401, 401, 401, 401, + 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, + 401, 401, 401, 401, 401, 401, 400, 399, 401, 399, + 404, 404, 399, 399, 401, 401, 401, 401, 401, 403, + 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, + 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, + 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, + 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, + 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, + + 401, 401, 401, 401, 401, 401, 399, 404, 404, 399, + 401, 401, 401, 49, 401, 401, 401, 401, 401, 401, + 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, + 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, + 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, + 401, 401, 401, 401, 401, 401, 401, 49, 401, 401, + 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, + 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, + 401, 401, 401, 401, 401, 401, 401, 401, 399, 399, + 399, 399, 401, 401, 401, 401, 401, 401, 401, 401, + + 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, + 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, + 401, 401, 401, 401, 401, 401, 401, 158, 401, 401, + 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, + 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, + 401, 401, 401, 401, 401, 401, 401, 399, 401, 401, + 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, + 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, + 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, + 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, + + 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, + 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, + 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, + 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, + 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, + 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, + 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, + 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, + 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, + 401, 401, 401, 401, 401, 401, 401, 401, 0, 399, - 396 + 399, 399, 399, 399 } ; -static yyconst short int yy_nxt[877] = +static yyconst short int yy_nxt[883] = { 0, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 4, 15, 8, 8, 8, 16, 17, 18, 19, @@ -528,99 +528,100 @@ 28, 8, 29, 30, 31, 32, 33, 34, 35, 8, 36, 42, 40, 43, 43, 44, 44, 45, 45, 40, 46, 85, 40, 40, 47, 48, 48, 40, 47, 48, - 48, 40, 40, 119, 40, 40, 40, 40, 40, 59, - 51, 60, 40, 152, 55, 104, 62, 52, 56, 53, + 48, 40, 40, 120, 40, 40, 40, 40, 40, 59, + 51, 60, 40, 153, 55, 104, 62, 52, 56, 53, 63, 54, 61, 57, 49, 64, 58, 40, 40, 65, 40, 40, 67, 40, 40, 40, 74, 70, 77, 66, 40, 40, 68, 71, 75, 40, 72, 73, 69, 76, - 93, 40, 79, 83, 81, 116, 82, 78, 80, 84, + 93, 40, 79, 83, 81, 149, 82, 78, 80, 84, 86, 40, 40, 94, 40, 40, 95, 40, 87, 102, - 118, 88, 111, 96, 89, 40, 106, 109, 109, 105, - 43, 43, 103, 121, 40, 90, 91, 40, 92, 86, + 119, 88, 111, 96, 89, 40, 106, 109, 109, 105, + 43, 43, 103, 122, 40, 90, 91, 40, 92, 86, 40, 40, 110, 44, 44, 115, 40, 97, 47, 45, - 45, 40, 136, 108, 98, 122, 99, 120, 100, 112, - 112, 40, 123, 101, 113, 47, 48, 48, 40, 40, - 113, 114, 114, 40, 40, 114, 114, 117, 114, 114, - 114, 114, 114, 114, 40, 40, 40, 40, 40, 40, - - 40, 124, 40, 127, 40, 40, 131, 132, 137, 129, - 125, 40, 126, 40, 40, 128, 40, 134, 40, 40, - 143, 130, 40, 133, 135, 40, 40, 138, 141, 139, - 142, 146, 140, 144, 148, 40, 40, 149, 40, 145, - 151, 150, 40, 147, 40, 40, 40, 40, 153, 154, - 40, 40, 40, 165, 155, 40, 40, 204, 40, 40, - 159, 156, 40, 166, 164, 40, 40, 161, 160, 157, - 162, 167, 158, 163, 171, 169, 173, 40, 179, 168, - 40, 40, 41, 174, 172, 175, 170, 40, 40, 40, - 176, 180, 181, 183, 185, 184, 109, 109, 177, 40, - - 189, 189, 186, 178, 182, 190, 40, 40, 195, 187, - 40, 190, 112, 112, 40, 191, 192, 113, 193, 193, - 40, 40, 197, 113, 194, 198, 40, 40, 40, 40, - 40, 40, 40, 40, 196, 200, 40, 40, 40, 40, - 206, 207, 40, 210, 202, 203, 205, 40, 211, 199, - 201, 212, 40, 213, 40, 40, 40, 40, 208, 40, - 209, 40, 40, 215, 40, 217, 40, 214, 40, 220, - 40, 218, 40, 216, 40, 221, 40, 222, 40, 40, - 40, 223, 219, 228, 40, 40, 252, 225, 224, 226, - 226, 236, 247, 226, 226, 227, 226, 226, 226, 226, - - 226, 226, 40, 235, 40, 233, 234, 40, 40, 40, - 40, 229, 40, 230, 40, 237, 40, 231, 239, 232, - 40, 240, 40, 244, 40, 246, 238, 40, 40, 40, - 40, 241, 249, 242, 40, 253, 40, 243, 251, 245, - 189, 189, 248, 191, 191, 190, 256, 256, 254, 250, - 40, 190, 256, 256, 255, 193, 193, 40, 193, 193, - 40, 40, 40, 40, 40, 40, 40, 258, 257, 40, - 260, 262, 40, 40, 40, 40, 40, 265, 263, 259, - 40, 40, 269, 40, 264, 268, 40, 261, 272, 40, - 40, 40, 266, 40, 40, 267, 271, 40, 273, 40, - - 40, 40, 40, 270, 275, 40, 276, 274, 40, 278, - 40, 277, 40, 40, 282, 279, 40, 283, 40, 40, - 284, 285, 287, 280, 281, 289, 292, 291, 40, 40, - 40, 290, 40, 40, 40, 286, 288, 293, 40, 295, - 40, 40, 40, 296, 294, 299, 298, 40, 297, 40, - 40, 300, 40, 256, 256, 40, 40, 40, 303, 40, - 307, 40, 301, 302, 308, 306, 309, 40, 40, 40, - 313, 40, 310, 305, 312, 40, 304, 40, 311, 40, - 40, 40, 40, 40, 317, 40, 314, 40, 318, 40, - 40, 40, 316, 40, 315, 319, 322, 320, 324, 321, - - 323, 40, 326, 40, 40, 40, 40, 40, 325, 40, - 40, 40, 327, 328, 330, 331, 329, 333, 40, 334, - 336, 40, 40, 40, 40, 40, 40, 40, 332, 40, - 335, 40, 344, 342, 338, 40, 340, 40, 40, 339, - 346, 337, 341, 347, 348, 345, 40, 40, 343, 40, - 40, 40, 40, 40, 40, 40, 349, 40, 40, 350, - 40, 351, 352, 353, 357, 40, 40, 360, 354, 356, - 358, 362, 359, 40, 364, 355, 40, 40, 363, 40, - 40, 40, 361, 40, 40, 40, 40, 40, 366, 40, - 371, 374, 40, 40, 369, 40, 367, 40, 370, 365, - - 372, 40, 378, 368, 40, 376, 40, 40, 373, 40, - 377, 40, 379, 381, 40, 40, 383, 40, 375, 40, - 40, 40, 40, 40, 380, 40, 384, 386, 387, 391, - 388, 40, 385, 40, 394, 382, 389, 40, 390, 40, - 393, 40, 40, 40, 40, 40, 40, 40, 40, 40, - 40, 392, 395, 37, 37, 37, 37, 39, 39, 50, - 40, 50, 50, 40, 40, 40, 40, 40, 40, 40, + 45, 40, 137, 116, 98, 117, 99, 121, 100, 112, + 112, 40, 40, 101, 113, 47, 48, 48, 40, 40, + 113, 114, 114, 40, 40, 114, 114, 118, 114, 114, + 114, 114, 114, 114, 40, 40, 40, 130, 40, 123, + + 40, 125, 40, 128, 40, 40, 124, 40, 132, 133, + 126, 40, 127, 40, 138, 129, 40, 40, 40, 135, + 40, 40, 131, 144, 40, 134, 136, 40, 40, 140, + 139, 154, 141, 147, 40, 40, 150, 145, 40, 142, + 40, 143, 152, 146, 40, 148, 40, 151, 155, 40, + 156, 40, 40, 40, 108, 166, 40, 157, 40, 160, + 40, 40, 109, 109, 165, 158, 162, 161, 159, 163, + 174, 167, 164, 168, 170, 172, 40, 40, 40, 40, + 173, 169, 40, 181, 182, 171, 176, 40, 40, 180, + 40, 177, 186, 40, 175, 184, 183, 185, 40, 178, + + 41, 190, 190, 40, 179, 40, 191, 197, 199, 187, + 40, 188, 191, 112, 112, 40, 192, 193, 113, 194, + 194, 40, 40, 196, 113, 40, 40, 40, 40, 40, + 40, 40, 203, 195, 40, 40, 202, 206, 198, 40, + 40, 200, 40, 40, 204, 205, 40, 207, 208, 209, + 201, 212, 213, 40, 40, 40, 40, 210, 40, 40, + 215, 40, 214, 40, 40, 211, 40, 217, 219, 40, + 216, 40, 222, 40, 218, 220, 40, 223, 40, 40, + 258, 258, 40, 40, 224, 40, 221, 230, 225, 40, + 239, 226, 40, 227, 228, 228, 40, 238, 228, 228, + + 40, 228, 228, 228, 228, 228, 228, 40, 229, 231, + 235, 232, 40, 236, 40, 233, 40, 234, 40, 237, + 40, 241, 40, 242, 40, 40, 240, 40, 40, 40, + 40, 246, 40, 248, 251, 40, 40, 245, 40, 243, + 249, 244, 247, 255, 253, 40, 250, 40, 40, 259, + 256, 252, 40, 254, 315, 190, 190, 40, 192, 192, + 191, 258, 258, 40, 260, 257, 191, 194, 194, 40, + 194, 194, 40, 40, 40, 264, 40, 40, 40, 40, + 261, 263, 265, 40, 268, 40, 40, 40, 40, 266, + 262, 40, 40, 267, 272, 271, 275, 40, 40, 40, + + 40, 40, 269, 40, 40, 40, 270, 274, 276, 40, + 40, 273, 278, 40, 40, 279, 40, 286, 277, 280, + 281, 282, 285, 40, 40, 288, 40, 40, 283, 40, + 40, 40, 284, 290, 287, 292, 294, 295, 296, 289, + 40, 40, 299, 40, 40, 40, 293, 291, 40, 40, + 298, 40, 40, 300, 302, 297, 40, 301, 40, 40, + 40, 40, 303, 306, 258, 258, 310, 311, 40, 304, + 40, 40, 305, 309, 40, 312, 313, 40, 40, 40, + 40, 308, 40, 307, 40, 40, 316, 320, 40, 40, + 40, 314, 40, 321, 40, 317, 319, 318, 323, 325, + + 322, 327, 40, 329, 40, 324, 326, 40, 40, 328, + 40, 40, 40, 330, 40, 40, 40, 40, 40, 40, + 332, 334, 336, 40, 337, 40, 40, 40, 339, 40, + 331, 40, 341, 333, 335, 40, 345, 338, 343, 40, + 342, 340, 351, 344, 347, 40, 40, 348, 40, 40, + 40, 346, 40, 350, 349, 40, 40, 40, 40, 40, + 40, 40, 353, 40, 354, 355, 40, 352, 356, 360, + 40, 40, 363, 357, 359, 361, 362, 40, 40, 367, + 358, 40, 365, 366, 40, 40, 40, 40, 364, 40, + 40, 40, 369, 40, 368, 374, 40, 40, 377, 372, + + 40, 370, 373, 375, 40, 40, 40, 40, 371, 381, + 379, 40, 40, 40, 376, 380, 384, 40, 40, 40, + 40, 386, 40, 40, 382, 378, 40, 40, 387, 383, + 389, 390, 391, 40, 394, 40, 40, 40, 393, 40, + 385, 388, 40, 40, 392, 397, 40, 40, 40, 40, + 396, 40, 40, 40, 40, 40, 395, 40, 398, 37, + 37, 37, 37, 39, 39, 50, 40, 50, 50, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, - 40, 40, 40, 40, 40, 188, 40, 40, 40, 40, - 107, 40, 38, 396, 3, 396, 396, 396, 396, 396, - 396, 396, 396, 396, 396, 396, 396, 396, 396, 396, - 396, 396, 396, 396, 396, 396, 396, 396, 396, 396, - 396, 396, 396, 396, 396, 396, 396, 396, 396, 396, - 396, 396, 396, 396, 396, 396 + 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, + 40, 189, 40, 40, 40, 40, 107, 40, 38, 399, + 3, 399, 399, 399, 399, 399, 399, 399, 399, 399, + 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, + 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, + 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, + 399, 399 } ; -static yyconst short int yy_chk[877] = +static yyconst short int yy_chk[883] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -633,91 +634,92 @@ 19, 16, 18, 17, 13, 19, 17, 21, 22, 20, 23, 24, 21, 25, 26, 27, 24, 22, 25, 20, - 52, 28, 21, 22, 24, 31, 23, 23, 21, 24, - 31, 54, 26, 28, 27, 52, 27, 25, 26, 28, + 77, 28, 21, 22, 24, 31, 23, 23, 21, 24, + 31, 54, 26, 28, 27, 77, 27, 25, 26, 28, 30, 35, 30, 31, 33, 57, 31, 36, 30, 33, 54, 30, 46, 31, 30, 46, 36, 42, 42, 35, 43, 43, 33, 57, 68, 30, 30, 51, 30, 32, - 59, 32, 44, 44, 44, 51, 56, 32, 45, 45, - 45, 45, 68, 401, 32, 59, 32, 56, 32, 47, - 47, 47, 59, 32, 47, 48, 48, 48, 48, 53, - 47, 49, 49, 49, 63, 49, 49, 53, 49, 49, - 49, 49, 49, 49, 60, 61, 62, 64, 65, 69, - - 66, 60, 67, 62, 70, 73, 65, 66, 69, 63, - 61, 71, 61, 72, 74, 62, 75, 67, 79, 77, - 74, 64, 78, 66, 67, 80, 76, 70, 73, 71, - 73, 76, 72, 75, 77, 83, 84, 78, 85, 75, - 80, 79, 86, 76, 87, 88, 90, 91, 83, 84, - 92, 130, 89, 91, 85, 96, 97, 130, 93, 98, - 88, 85, 95, 92, 90, 99, 101, 89, 88, 86, - 89, 93, 87, 89, 96, 95, 98, 100, 101, 93, - 103, 105, 399, 99, 97, 100, 95, 102, 106, 104, - 100, 102, 102, 103, 104, 103, 109, 109, 100, 118, - - 110, 110, 105, 100, 102, 110, 116, 121, 118, 106, - 122, 110, 112, 112, 112, 113, 113, 112, 113, 113, - 113, 119, 121, 112, 116, 122, 123, 125, 126, 127, - 128, 132, 133, 131, 119, 125, 134, 135, 136, 137, - 132, 133, 138, 136, 127, 128, 131, 139, 137, 123, - 126, 138, 140, 139, 141, 142, 143, 144, 134, 145, - 135, 146, 148, 141, 147, 143, 151, 140, 152, 146, - 154, 144, 158, 142, 159, 147, 167, 148, 183, 178, - 166, 151, 145, 159, 162, 164, 183, 154, 152, 157, - 157, 167, 178, 157, 157, 158, 157, 157, 157, 157, - - 157, 157, 160, 166, 168, 162, 164, 169, 172, 170, - 173, 160, 171, 160, 175, 168, 177, 160, 170, 160, - 174, 171, 176, 175, 179, 177, 169, 180, 181, 182, - 184, 172, 180, 173, 185, 184, 187, 174, 182, 176, - 189, 189, 179, 190, 190, 189, 190, 190, 185, 181, - 195, 189, 191, 191, 187, 192, 192, 192, 193, 193, - 193, 194, 196, 200, 201, 203, 202, 195, 194, 204, - 200, 202, 205, 206, 207, 209, 208, 205, 203, 196, - 210, 212, 209, 213, 204, 208, 215, 201, 213, 214, - 216, 217, 206, 218, 219, 207, 212, 222, 214, 224, - - 229, 225, 395, 210, 216, 227, 217, 215, 233, 219, - 228, 218, 230, 231, 227, 222, 232, 228, 234, 235, - 229, 230, 231, 224, 225, 232, 235, 234, 237, 238, - 241, 233, 243, 245, 247, 230, 231, 237, 244, 241, - 246, 248, 249, 243, 238, 246, 245, 250, 244, 251, - 253, 247, 255, 256, 256, 257, 258, 262, 250, 260, - 257, 264, 248, 249, 258, 255, 260, 261, 263, 265, - 264, 266, 261, 253, 263, 267, 251, 269, 262, 271, - 272, 273, 274, 277, 269, 393, 265, 275, 271, 278, - 283, 293, 267, 280, 266, 272, 275, 273, 278, 274, - - 277, 279, 280, 281, 292, 298, 294, 301, 279, 302, - 299, 300, 281, 283, 293, 294, 292, 299, 304, 300, - 302, 305, 306, 308, 311, 310, 312, 316, 298, 318, - 301, 320, 316, 311, 305, 327, 308, 323, 321, 306, - 320, 304, 310, 321, 323, 318, 332, 338, 312, 333, - 339, 340, 341, 346, 344, 345, 327, 347, 348, 332, - 349, 333, 338, 339, 345, 352, 350, 348, 340, 344, - 346, 350, 347, 351, 352, 341, 353, 354, 351, 357, - 358, 361, 349, 362, 363, 367, 368, 365, 354, 369, - 363, 368, 370, 373, 361, 371, 357, 372, 362, 353, - - 365, 374, 372, 358, 375, 370, 376, 377, 367, 379, - 371, 378, 373, 375, 380, 385, 377, 384, 369, 382, - 386, 387, 388, 390, 374, 392, 378, 380, 382, 387, - 384, 394, 379, 391, 392, 376, 385, 389, 386, 383, - 390, 381, 366, 364, 360, 359, 356, 355, 343, 342, - 337, 388, 394, 397, 397, 397, 397, 398, 398, 400, - 336, 400, 400, 335, 334, 331, 330, 329, 328, 326, - 325, 324, 322, 319, 317, 315, 314, 313, 309, 307, - 303, 297, 296, 295, 291, 290, 289, 288, 287, 286, - 285, 284, 282, 276, 270, 268, 259, 254, 252, 242, - - 240, 239, 236, 223, 221, 220, 211, 199, 198, 197, - 186, 165, 163, 161, 156, 155, 153, 150, 149, 129, - 124, 120, 117, 115, 111, 107, 94, 82, 58, 39, - 37, 8, 7, 3, 396, 396, 396, 396, 396, 396, - 396, 396, 396, 396, 396, 396, 396, 396, 396, 396, - 396, 396, 396, 396, 396, 396, 396, 396, 396, 396, - 396, 396, 396, 396, 396, 396, 396, 396, 396, 396, - 396, 396, 396, 396, 396, 396 + 52, 32, 44, 44, 44, 51, 56, 32, 45, 45, + 45, 45, 68, 52, 32, 52, 32, 56, 32, 47, + 47, 47, 63, 32, 47, 48, 48, 48, 48, 53, + 47, 49, 49, 49, 59, 49, 49, 53, 49, 49, + 49, 49, 49, 49, 60, 61, 62, 63, 64, 59, + + 65, 60, 66, 62, 67, 69, 59, 70, 65, 66, + 61, 71, 61, 72, 69, 62, 73, 74, 83, 67, + 75, 78, 64, 74, 79, 66, 67, 80, 76, 71, + 70, 83, 72, 76, 85, 84, 78, 75, 86, 73, + 87, 73, 80, 75, 88, 76, 90, 79, 84, 91, + 85, 89, 97, 98, 404, 91, 96, 85, 92, 88, + 93, 95, 109, 109, 90, 86, 89, 88, 87, 89, + 98, 92, 89, 93, 95, 96, 99, 101, 100, 102, + 97, 93, 103, 102, 102, 95, 100, 104, 105, 101, + 106, 100, 104, 122, 99, 103, 102, 103, 119, 100, + + 402, 110, 110, 398, 100, 117, 110, 119, 122, 105, + 127, 106, 110, 112, 112, 112, 113, 113, 112, 113, + 113, 113, 116, 117, 112, 120, 123, 124, 126, 128, + 129, 131, 127, 116, 132, 135, 126, 131, 120, 133, + 134, 123, 136, 138, 128, 129, 137, 132, 133, 134, + 124, 137, 138, 139, 140, 141, 143, 135, 142, 144, + 140, 145, 139, 146, 147, 136, 148, 142, 144, 149, + 141, 153, 147, 152, 143, 145, 155, 148, 160, 169, + 192, 192, 168, 396, 149, 159, 146, 160, 152, 163, + 169, 153, 165, 155, 158, 158, 167, 168, 158, 158, + + 161, 158, 158, 158, 158, 158, 158, 170, 159, 161, + 163, 161, 171, 165, 172, 161, 173, 161, 174, 167, + 175, 171, 176, 172, 178, 177, 170, 179, 180, 181, + 182, 176, 195, 178, 181, 183, 186, 175, 185, 173, + 179, 174, 177, 185, 183, 184, 180, 188, 266, 195, + 186, 182, 203, 184, 266, 190, 190, 196, 191, 191, + 190, 191, 191, 197, 196, 188, 190, 193, 193, 193, + 194, 194, 194, 198, 202, 203, 205, 204, 206, 207, + 197, 202, 204, 208, 207, 209, 210, 211, 212, 205, + 198, 215, 214, 206, 211, 210, 215, 217, 218, 216, + + 219, 220, 208, 224, 226, 221, 209, 214, 216, 227, + 230, 212, 218, 229, 231, 219, 232, 230, 217, 220, + 221, 224, 229, 235, 233, 232, 234, 236, 226, 239, + 237, 245, 227, 233, 231, 234, 236, 237, 239, 232, + 240, 243, 245, 246, 247, 249, 235, 233, 250, 248, + 243, 251, 252, 246, 248, 240, 253, 247, 255, 261, + 257, 260, 249, 252, 258, 258, 260, 261, 263, 250, + 265, 264, 251, 257, 269, 263, 264, 267, 268, 270, + 272, 255, 276, 253, 274, 275, 267, 272, 277, 280, + 278, 265, 281, 274, 283, 268, 270, 269, 276, 278, + + 275, 281, 282, 283, 284, 277, 280, 286, 295, 282, + 296, 301, 297, 284, 304, 302, 303, 305, 307, 308, + 295, 297, 302, 309, 303, 311, 313, 314, 305, 315, + 286, 321, 308, 296, 301, 326, 314, 304, 311, 319, + 309, 307, 326, 313, 319, 323, 330, 321, 324, 335, + 341, 315, 336, 324, 323, 342, 343, 344, 349, 347, + 348, 350, 335, 351, 336, 341, 352, 330, 342, 348, + 355, 356, 351, 343, 347, 349, 350, 353, 354, 355, + 344, 357, 353, 354, 360, 361, 364, 365, 352, 366, + 368, 370, 357, 371, 356, 366, 372, 373, 371, 364, + + 374, 360, 365, 368, 375, 376, 377, 378, 361, 375, + 373, 379, 380, 381, 370, 374, 378, 383, 382, 387, + 389, 380, 385, 388, 376, 372, 390, 391, 381, 377, + 383, 385, 387, 393, 390, 394, 395, 397, 389, 392, + 379, 382, 386, 384, 388, 395, 369, 367, 363, 362, + 393, 359, 358, 346, 345, 340, 391, 339, 397, 400, + 400, 400, 400, 401, 401, 403, 338, 403, 403, 337, + 334, 333, 332, 331, 329, 328, 327, 325, 322, 320, + 318, 317, 316, 312, 310, 306, 300, 299, 298, 294, + 293, 292, 291, 290, 289, 288, 287, 285, 279, 273, + + 271, 262, 259, 256, 254, 244, 242, 241, 238, 225, + 223, 222, 213, 201, 200, 199, 187, 166, 164, 162, + 157, 156, 154, 151, 150, 130, 125, 121, 118, 115, + 111, 107, 94, 82, 58, 39, 37, 8, 7, 3, + 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, + 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, + 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, + 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, + 399, 399 } ; static yy_state_type yy_state_buf[YY_BUF_SIZE + 2], *yy_state_ptr; @@ -734,7 +736,7 @@ #define YY_MORE_ADJ 0 #define YY_RESTORE_YY_MORE_OFFSET char *yytext; -#line 1 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" +#line 1 "/llvm/lib/AsmParser/Lexer.l" #define INITIAL 0 /*===-- Lexer.l - Scanner for llvm assembly files --------------*- C++ -*--===// // @@ -749,7 +751,7 @@ // //===----------------------------------------------------------------------===*/ #define YY_NEVER_INTERACTIVE 1 -#line 28 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" +#line 28 "/llvm/lib/AsmParser/Lexer.l" #include "ParserInternals.h" #include "llvm/Module.h" #include @@ -875,7 +877,7 @@ /* HexIntConstant - Hexadecimal constant generated by the CFE to avoid forcing * it to deal with 64 bit numbers. */ -#line 879 "Lexer.cpp" +#line 881 "Lexer.cpp" /* Macros after this point can all be overridden by user definitions in * section 1. @@ -1023,13 +1025,13 @@ YY_DECL { register yy_state_type yy_current_state; - register char *yy_cp = NULL, *yy_bp = NULL; + register char *yy_cp, *yy_bp; register int yy_act; -#line 179 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" +#line 179 "/llvm/lib/AsmParser/Lexer.l" -#line 1033 "Lexer.cpp" +#line 1035 "Lexer.cpp" if ( yy_init ) { @@ -1077,14 +1079,14 @@ while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 397 ) + if ( yy_current_state >= 400 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; *yy_state_ptr++ = yy_current_state; ++yy_cp; } - while ( yy_current_state != 396 ); + while ( yy_current_state != 399 ); yy_find_action: yy_current_state = *--yy_state_ptr; @@ -1122,441 +1124,446 @@ { /* beginning of action switch */ case 1: YY_RULE_SETUP -#line 181 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" +#line 181 "/llvm/lib/AsmParser/Lexer.l" { /* Ignore comments for now */ } YY_BREAK case 2: YY_RULE_SETUP -#line 183 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" +#line 183 "/llvm/lib/AsmParser/Lexer.l" { return BEGINTOK; } YY_BREAK case 3: YY_RULE_SETUP -#line 184 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" +#line 184 "/llvm/lib/AsmParser/Lexer.l" { return ENDTOK; } YY_BREAK case 4: YY_RULE_SETUP -#line 185 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" +#line 185 "/llvm/lib/AsmParser/Lexer.l" { return TRUETOK; } YY_BREAK case 5: YY_RULE_SETUP -#line 186 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" +#line 186 "/llvm/lib/AsmParser/Lexer.l" { return FALSETOK; } YY_BREAK case 6: YY_RULE_SETUP -#line 187 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" +#line 187 "/llvm/lib/AsmParser/Lexer.l" { return DECLARE; } YY_BREAK case 7: YY_RULE_SETUP -#line 188 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" +#line 188 "/llvm/lib/AsmParser/Lexer.l" { return GLOBAL; } YY_BREAK case 8: YY_RULE_SETUP -#line 189 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" +#line 189 "/llvm/lib/AsmParser/Lexer.l" { return CONSTANT; } YY_BREAK case 9: YY_RULE_SETUP -#line 190 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" +#line 190 "/llvm/lib/AsmParser/Lexer.l" { return INTERNAL; } YY_BREAK case 10: YY_RULE_SETUP -#line 191 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" +#line 191 "/llvm/lib/AsmParser/Lexer.l" { return LINKONCE; } YY_BREAK case 11: YY_RULE_SETUP -#line 192 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" +#line 192 "/llvm/lib/AsmParser/Lexer.l" { return WEAK; } YY_BREAK case 12: YY_RULE_SETUP -#line 193 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" +#line 193 "/llvm/lib/AsmParser/Lexer.l" { return APPENDING; } YY_BREAK case 13: YY_RULE_SETUP -#line 194 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" +#line 194 "/llvm/lib/AsmParser/Lexer.l" { return EXTERNAL; } /* Deprecated, turn into external */ YY_BREAK case 14: YY_RULE_SETUP -#line 195 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" +#line 195 "/llvm/lib/AsmParser/Lexer.l" { return EXTERNAL; } YY_BREAK case 15: YY_RULE_SETUP -#line 196 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" +#line 196 "/llvm/lib/AsmParser/Lexer.l" { return IMPLEMENTATION; } YY_BREAK case 16: YY_RULE_SETUP -#line 197 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" +#line 197 "/llvm/lib/AsmParser/Lexer.l" { return ZEROINITIALIZER; } YY_BREAK case 17: YY_RULE_SETUP -#line 198 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" +#line 198 "/llvm/lib/AsmParser/Lexer.l" { return DOTDOTDOT; } YY_BREAK case 18: YY_RULE_SETUP -#line 199 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" +#line 199 "/llvm/lib/AsmParser/Lexer.l" { return UNDEF; } YY_BREAK case 19: YY_RULE_SETUP -#line 200 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" +#line 200 "/llvm/lib/AsmParser/Lexer.l" { return NULL_TOK; } YY_BREAK case 20: YY_RULE_SETUP -#line 201 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" +#line 201 "/llvm/lib/AsmParser/Lexer.l" { return TO; } YY_BREAK case 21: YY_RULE_SETUP -#line 202 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" +#line 202 "/llvm/lib/AsmParser/Lexer.l" { RET_TOK(TermOpVal, Unwind, UNWIND); } YY_BREAK case 22: YY_RULE_SETUP -#line 203 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" +#line 203 "/llvm/lib/AsmParser/Lexer.l" { return NOT; } /* Deprecated, turned into XOR */ YY_BREAK case 23: YY_RULE_SETUP -#line 204 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" +#line 204 "/llvm/lib/AsmParser/Lexer.l" { return TAIL; } YY_BREAK case 24: YY_RULE_SETUP -#line 205 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" +#line 205 "/llvm/lib/AsmParser/Lexer.l" { return TARGET; } YY_BREAK case 25: YY_RULE_SETUP -#line 206 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" +#line 206 "/llvm/lib/AsmParser/Lexer.l" { return TRIPLE; } YY_BREAK case 26: YY_RULE_SETUP -#line 207 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" +#line 207 "/llvm/lib/AsmParser/Lexer.l" { return DEPLIBS; } YY_BREAK case 27: YY_RULE_SETUP -#line 208 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" +#line 208 "/llvm/lib/AsmParser/Lexer.l" { return ENDIAN; } YY_BREAK case 28: YY_RULE_SETUP -#line 209 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" +#line 209 "/llvm/lib/AsmParser/Lexer.l" { return POINTERSIZE; } YY_BREAK case 29: YY_RULE_SETUP -#line 210 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" +#line 210 "/llvm/lib/AsmParser/Lexer.l" { return LITTLE; } YY_BREAK case 30: YY_RULE_SETUP -#line 211 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" +#line 211 "/llvm/lib/AsmParser/Lexer.l" { return BIG; } YY_BREAK case 31: YY_RULE_SETUP -#line 212 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" +#line 212 "/llvm/lib/AsmParser/Lexer.l" { return VOLATILE; } YY_BREAK case 32: YY_RULE_SETUP -#line 214 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" +#line 214 "/llvm/lib/AsmParser/Lexer.l" { return CC_TOK; } YY_BREAK case 33: YY_RULE_SETUP -#line 215 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" +#line 215 "/llvm/lib/AsmParser/Lexer.l" { return CCC_TOK; } YY_BREAK case 34: YY_RULE_SETUP -#line 216 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" +#line 216 "/llvm/lib/AsmParser/Lexer.l" { return FASTCC_TOK; } YY_BREAK case 35: YY_RULE_SETUP -#line 217 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" +#line 217 "/llvm/lib/AsmParser/Lexer.l" { return COLDCC_TOK; } YY_BREAK case 36: YY_RULE_SETUP -#line 219 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" +#line 219 "/llvm/lib/AsmParser/Lexer.l" { llvmAsmlval.PrimType = Type::VoidTy ; return VOID; } YY_BREAK case 37: YY_RULE_SETUP -#line 220 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" +#line 220 "/llvm/lib/AsmParser/Lexer.l" { llvmAsmlval.PrimType = Type::BoolTy ; return BOOL; } YY_BREAK case 38: YY_RULE_SETUP -#line 221 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" +#line 221 "/llvm/lib/AsmParser/Lexer.l" { llvmAsmlval.PrimType = Type::SByteTy ; return SBYTE; } YY_BREAK case 39: YY_RULE_SETUP -#line 222 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" +#line 222 "/llvm/lib/AsmParser/Lexer.l" { llvmAsmlval.PrimType = Type::UByteTy ; return UBYTE; } YY_BREAK case 40: YY_RULE_SETUP -#line 223 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" +#line 223 "/llvm/lib/AsmParser/Lexer.l" { llvmAsmlval.PrimType = Type::ShortTy ; return SHORT; } YY_BREAK case 41: YY_RULE_SETUP -#line 224 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" +#line 224 "/llvm/lib/AsmParser/Lexer.l" { llvmAsmlval.PrimType = Type::UShortTy; return USHORT; } YY_BREAK case 42: YY_RULE_SETUP -#line 225 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" +#line 225 "/llvm/lib/AsmParser/Lexer.l" { llvmAsmlval.PrimType = Type::IntTy ; return INT; } YY_BREAK case 43: YY_RULE_SETUP -#line 226 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" +#line 226 "/llvm/lib/AsmParser/Lexer.l" { llvmAsmlval.PrimType = Type::UIntTy ; return UINT; } YY_BREAK case 44: YY_RULE_SETUP -#line 227 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" +#line 227 "/llvm/lib/AsmParser/Lexer.l" { llvmAsmlval.PrimType = Type::LongTy ; return LONG; } YY_BREAK case 45: YY_RULE_SETUP -#line 228 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" +#line 228 "/llvm/lib/AsmParser/Lexer.l" { llvmAsmlval.PrimType = Type::ULongTy ; return ULONG; } YY_BREAK case 46: YY_RULE_SETUP -#line 229 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" +#line 229 "/llvm/lib/AsmParser/Lexer.l" { llvmAsmlval.PrimType = Type::FloatTy ; return FLOAT; } YY_BREAK case 47: YY_RULE_SETUP -#line 230 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" +#line 230 "/llvm/lib/AsmParser/Lexer.l" { llvmAsmlval.PrimType = Type::DoubleTy; return DOUBLE; } YY_BREAK case 48: YY_RULE_SETUP -#line 231 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" +#line 231 "/llvm/lib/AsmParser/Lexer.l" { llvmAsmlval.PrimType = Type::LabelTy ; return LABEL; } YY_BREAK case 49: YY_RULE_SETUP -#line 232 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" +#line 232 "/llvm/lib/AsmParser/Lexer.l" { return TYPE; } YY_BREAK case 50: YY_RULE_SETUP -#line 233 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" +#line 233 "/llvm/lib/AsmParser/Lexer.l" { return OPAQUE; } YY_BREAK case 51: YY_RULE_SETUP -#line 235 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(BinaryOpVal, Add, ADD); } +#line 234 "/llvm/lib/AsmParser/Lexer.l" +{ return ALIGN; } YY_BREAK case 52: YY_RULE_SETUP -#line 236 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(BinaryOpVal, Sub, SUB); } +#line 236 "/llvm/lib/AsmParser/Lexer.l" +{ RET_TOK(BinaryOpVal, Add, ADD); } YY_BREAK case 53: YY_RULE_SETUP -#line 237 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(BinaryOpVal, Mul, MUL); } +#line 237 "/llvm/lib/AsmParser/Lexer.l" +{ RET_TOK(BinaryOpVal, Sub, SUB); } YY_BREAK case 54: YY_RULE_SETUP -#line 238 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(BinaryOpVal, Div, DIV); } +#line 238 "/llvm/lib/AsmParser/Lexer.l" +{ RET_TOK(BinaryOpVal, Mul, MUL); } YY_BREAK case 55: YY_RULE_SETUP -#line 239 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(BinaryOpVal, Rem, REM); } +#line 239 "/llvm/lib/AsmParser/Lexer.l" +{ RET_TOK(BinaryOpVal, Div, DIV); } YY_BREAK case 56: YY_RULE_SETUP -#line 240 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(BinaryOpVal, And, AND); } +#line 240 "/llvm/lib/AsmParser/Lexer.l" +{ RET_TOK(BinaryOpVal, Rem, REM); } YY_BREAK case 57: YY_RULE_SETUP -#line 241 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(BinaryOpVal, Or , OR ); } +#line 241 "/llvm/lib/AsmParser/Lexer.l" +{ RET_TOK(BinaryOpVal, And, AND); } YY_BREAK case 58: YY_RULE_SETUP -#line 242 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(BinaryOpVal, Xor, XOR); } +#line 242 "/llvm/lib/AsmParser/Lexer.l" +{ RET_TOK(BinaryOpVal, Or , OR ); } YY_BREAK case 59: YY_RULE_SETUP -#line 243 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(BinaryOpVal, SetNE, SETNE); } +#line 243 "/llvm/lib/AsmParser/Lexer.l" +{ RET_TOK(BinaryOpVal, Xor, XOR); } YY_BREAK case 60: YY_RULE_SETUP -#line 244 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(BinaryOpVal, SetEQ, SETEQ); } +#line 244 "/llvm/lib/AsmParser/Lexer.l" +{ RET_TOK(BinaryOpVal, SetNE, SETNE); } YY_BREAK case 61: YY_RULE_SETUP -#line 245 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(BinaryOpVal, SetLT, SETLT); } +#line 245 "/llvm/lib/AsmParser/Lexer.l" +{ RET_TOK(BinaryOpVal, SetEQ, SETEQ); } YY_BREAK case 62: YY_RULE_SETUP -#line 246 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(BinaryOpVal, SetGT, SETGT); } +#line 246 "/llvm/lib/AsmParser/Lexer.l" +{ RET_TOK(BinaryOpVal, SetLT, SETLT); } YY_BREAK case 63: YY_RULE_SETUP -#line 247 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(BinaryOpVal, SetLE, SETLE); } +#line 247 "/llvm/lib/AsmParser/Lexer.l" +{ RET_TOK(BinaryOpVal, SetGT, SETGT); } YY_BREAK case 64: YY_RULE_SETUP -#line 248 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(BinaryOpVal, SetGE, SETGE); } +#line 248 "/llvm/lib/AsmParser/Lexer.l" +{ RET_TOK(BinaryOpVal, SetLE, SETLE); } YY_BREAK case 65: YY_RULE_SETUP -#line 250 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(OtherOpVal, PHI, PHI_TOK); } +#line 249 "/llvm/lib/AsmParser/Lexer.l" +{ RET_TOK(BinaryOpVal, SetGE, SETGE); } YY_BREAK case 66: YY_RULE_SETUP -#line 251 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(OtherOpVal, Call, CALL); } +#line 251 "/llvm/lib/AsmParser/Lexer.l" +{ RET_TOK(OtherOpVal, PHI, PHI_TOK); } YY_BREAK case 67: YY_RULE_SETUP -#line 252 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(OtherOpVal, Cast, CAST); } +#line 252 "/llvm/lib/AsmParser/Lexer.l" +{ RET_TOK(OtherOpVal, Call, CALL); } YY_BREAK case 68: YY_RULE_SETUP -#line 253 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(OtherOpVal, Select, SELECT); } +#line 253 "/llvm/lib/AsmParser/Lexer.l" +{ RET_TOK(OtherOpVal, Cast, CAST); } YY_BREAK case 69: YY_RULE_SETUP -#line 254 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(OtherOpVal, Shl, SHL); } +#line 254 "/llvm/lib/AsmParser/Lexer.l" +{ RET_TOK(OtherOpVal, Select, SELECT); } YY_BREAK case 70: YY_RULE_SETUP -#line 255 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(OtherOpVal, Shr, SHR); } +#line 255 "/llvm/lib/AsmParser/Lexer.l" +{ RET_TOK(OtherOpVal, Shl, SHL); } YY_BREAK case 71: YY_RULE_SETUP -#line 256 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" -{ return VANEXT_old; } +#line 256 "/llvm/lib/AsmParser/Lexer.l" +{ RET_TOK(OtherOpVal, Shr, SHR); } YY_BREAK case 72: YY_RULE_SETUP -#line 257 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" -{ return VAARG_old; } +#line 257 "/llvm/lib/AsmParser/Lexer.l" +{ return VANEXT_old; } YY_BREAK case 73: YY_RULE_SETUP -#line 258 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(OtherOpVal, VAArg , VAARG); } +#line 258 "/llvm/lib/AsmParser/Lexer.l" +{ return VAARG_old; } YY_BREAK case 74: YY_RULE_SETUP -#line 259 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(TermOpVal, Ret, RET); } +#line 259 "/llvm/lib/AsmParser/Lexer.l" +{ RET_TOK(OtherOpVal, VAArg , VAARG); } YY_BREAK case 75: YY_RULE_SETUP -#line 260 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(TermOpVal, Br, BR); } +#line 260 "/llvm/lib/AsmParser/Lexer.l" +{ RET_TOK(TermOpVal, Ret, RET); } YY_BREAK case 76: YY_RULE_SETUP -#line 261 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(TermOpVal, Switch, SWITCH); } +#line 261 "/llvm/lib/AsmParser/Lexer.l" +{ RET_TOK(TermOpVal, Br, BR); } YY_BREAK case 77: YY_RULE_SETUP -#line 262 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(TermOpVal, Invoke, INVOKE); } +#line 262 "/llvm/lib/AsmParser/Lexer.l" +{ RET_TOK(TermOpVal, Switch, SWITCH); } YY_BREAK case 78: YY_RULE_SETUP -#line 263 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(TermOpVal, Unwind, UNWIND); } +#line 263 "/llvm/lib/AsmParser/Lexer.l" +{ RET_TOK(TermOpVal, Invoke, INVOKE); } YY_BREAK case 79: YY_RULE_SETUP -#line 264 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(TermOpVal, Unreachable, UNREACHABLE); } +#line 264 "/llvm/lib/AsmParser/Lexer.l" +{ RET_TOK(TermOpVal, Unwind, UNWIND); } YY_BREAK case 80: YY_RULE_SETUP -#line 266 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(MemOpVal, Malloc, MALLOC); } +#line 265 "/llvm/lib/AsmParser/Lexer.l" +{ RET_TOK(TermOpVal, Unreachable, UNREACHABLE); } YY_BREAK case 81: YY_RULE_SETUP -#line 267 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(MemOpVal, Alloca, ALLOCA); } +#line 267 "/llvm/lib/AsmParser/Lexer.l" +{ RET_TOK(MemOpVal, Malloc, MALLOC); } YY_BREAK case 82: YY_RULE_SETUP -#line 268 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(MemOpVal, Free, FREE); } +#line 268 "/llvm/lib/AsmParser/Lexer.l" +{ RET_TOK(MemOpVal, Alloca, ALLOCA); } YY_BREAK case 83: YY_RULE_SETUP -#line 269 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(MemOpVal, Load, LOAD); } +#line 269 "/llvm/lib/AsmParser/Lexer.l" +{ RET_TOK(MemOpVal, Free, FREE); } YY_BREAK case 84: YY_RULE_SETUP -#line 270 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(MemOpVal, Store, STORE); } +#line 270 "/llvm/lib/AsmParser/Lexer.l" +{ RET_TOK(MemOpVal, Load, LOAD); } YY_BREAK case 85: YY_RULE_SETUP -#line 271 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(MemOpVal, GetElementPtr, GETELEMENTPTR); } +#line 271 "/llvm/lib/AsmParser/Lexer.l" +{ RET_TOK(MemOpVal, Store, STORE); } YY_BREAK case 86: YY_RULE_SETUP -#line 274 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" +#line 272 "/llvm/lib/AsmParser/Lexer.l" +{ RET_TOK(MemOpVal, GetElementPtr, GETELEMENTPTR); } + YY_BREAK +case 87: +YY_RULE_SETUP +#line 275 "/llvm/lib/AsmParser/Lexer.l" { UnEscapeLexed(yytext+1); llvmAsmlval.StrVal = strdup(yytext+1); // Skip % return VAR_ID; } YY_BREAK -case 87: +case 88: YY_RULE_SETUP -#line 279 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" +#line 280 "/llvm/lib/AsmParser/Lexer.l" { yytext[strlen(yytext)-1] = 0; // nuke colon UnEscapeLexed(yytext); @@ -1564,9 +1571,9 @@ return LABELSTR; } YY_BREAK -case 88: +case 89: YY_RULE_SETUP -#line 285 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" +#line 286 "/llvm/lib/AsmParser/Lexer.l" { yytext[strlen(yytext)-2] = 0; // nuke colon, end quote UnEscapeLexed(yytext+1); @@ -1574,9 +1581,9 @@ return LABELSTR; } YY_BREAK -case 89: +case 90: YY_RULE_SETUP -#line 292 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" +#line 293 "/llvm/lib/AsmParser/Lexer.l" { // Note that we cannot unescape a string constant here! The // string constant might contain a \00 which would not be // understood by the string stuff. It is valid to make a @@ -1587,14 +1594,14 @@ return STRINGCONSTANT; } YY_BREAK -case 90: +case 91: YY_RULE_SETUP -#line 303 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" +#line 304 "/llvm/lib/AsmParser/Lexer.l" { llvmAsmlval.UInt64Val = atoull(yytext); return EUINT64VAL; } YY_BREAK -case 91: +case 92: YY_RULE_SETUP -#line 304 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" +#line 305 "/llvm/lib/AsmParser/Lexer.l" { uint64_t Val = atoull(yytext+1); // +1: we have bigger negative range @@ -1604,17 +1611,17 @@ return ESINT64VAL; } YY_BREAK -case 92: +case 93: YY_RULE_SETUP -#line 312 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" +#line 313 "/llvm/lib/AsmParser/Lexer.l" { llvmAsmlval.UInt64Val = HexIntToVal(yytext+3); return yytext[0] == 's' ? ESINT64VAL : EUINT64VAL; } YY_BREAK -case 93: +case 94: YY_RULE_SETUP -#line 317 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" +#line 318 "/llvm/lib/AsmParser/Lexer.l" { uint64_t Val = atoull(yytext+1); if ((unsigned)Val != Val) @@ -1623,9 +1630,9 @@ return UINTVAL; } YY_BREAK -case 94: +case 95: YY_RULE_SETUP -#line 324 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" +#line 325 "/llvm/lib/AsmParser/Lexer.l" { uint64_t Val = atoull(yytext+2); // +1: we have bigger negative range @@ -1635,18 +1642,18 @@ return SINTVAL; } YY_BREAK -case 95: +case 96: YY_RULE_SETUP -#line 333 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" +#line 334 "/llvm/lib/AsmParser/Lexer.l" { llvmAsmlval.FPVal = atof(yytext); return FPVAL; } YY_BREAK -case 96: +case 97: YY_RULE_SETUP -#line 334 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" +#line 335 "/llvm/lib/AsmParser/Lexer.l" { llvmAsmlval.FPVal = HexToFP(yytext); return FPVAL; } YY_BREAK case YY_STATE_EOF(INITIAL): -#line 336 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" +#line 337 "/llvm/lib/AsmParser/Lexer.l" { /* Make sure to free the internal buffers for flex when we are * done reading our input! @@ -1655,22 +1662,22 @@ return EOF; } YY_BREAK -case 97: +case 98: YY_RULE_SETUP -#line 344 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" +#line 345 "/llvm/lib/AsmParser/Lexer.l" { /* Ignore whitespace */ } YY_BREAK -case 98: +case 99: YY_RULE_SETUP -#line 345 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" +#line 346 "/llvm/lib/AsmParser/Lexer.l" { return yytext[0]; } YY_BREAK -case 99: +case 100: YY_RULE_SETUP -#line 347 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" +#line 348 "/llvm/lib/AsmParser/Lexer.l" YY_FATAL_ERROR( "flex scanner jammed" ); YY_BREAK -#line 1674 "Lexer.cpp" +#line 1681 "Lexer.cpp" case YY_END_OF_BUFFER: { @@ -1957,7 +1964,7 @@ while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 397 ) + if ( yy_current_state >= 400 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; @@ -1987,11 +1994,11 @@ while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 397 ) + if ( yy_current_state >= 400 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - yy_is_jam = (yy_current_state == 396); + yy_is_jam = (yy_current_state == 399); if ( ! yy_is_jam ) *yy_state_ptr++ = yy_current_state; @@ -2046,7 +2053,6 @@ #endif /* ifndef YY_NO_UNPUT */ -#ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput() #else @@ -2120,7 +2126,7 @@ return c; } -#endif /* YY_NO_INPUT */ + #ifdef YY_USE_PROTOS void yyrestart( FILE *input_file ) @@ -2231,6 +2237,11 @@ } +#ifndef YY_ALWAYS_INTERACTIVE +#ifndef YY_NEVER_INTERACTIVE +extern int isatty YY_PROTO(( int )); +#endif +#endif #ifdef YY_USE_PROTOS void yy_init_buffer( YY_BUFFER_STATE b, FILE *file ) @@ -2548,5 +2559,5 @@ return 0; } #endif -#line 347 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" +#line 348 "/llvm/lib/AsmParser/Lexer.l" Index: llvm/lib/AsmParser/Lexer.l diff -u llvm/lib/AsmParser/Lexer.l:1.64 llvm/lib/AsmParser/Lexer.l:1.65 --- llvm/lib/AsmParser/Lexer.l:1.64 Sat Jun 18 13:34:51 2005 +++ llvm/lib/AsmParser/Lexer.l Sat Nov 5 03:21:28 2005 @@ -231,6 +231,7 @@ label { llvmAsmlval.PrimType = Type::LabelTy ; return LABEL; } type { return TYPE; } opaque { return OPAQUE; } +align { return ALIGN; } add { RET_TOK(BinaryOpVal, Add, ADD); } sub { RET_TOK(BinaryOpVal, Sub, SUB); } Index: llvm/lib/AsmParser/llvmAsmParser.cpp diff -u llvm/lib/AsmParser/llvmAsmParser.cpp:1.18 llvm/lib/AsmParser/llvmAsmParser.cpp:1.19 --- llvm/lib/AsmParser/llvmAsmParser.cpp:1.18 Sat Oct 22 23:37:19 2005 +++ llvm/lib/AsmParser/llvmAsmParser.cpp Sat Nov 5 03:21:28 2005 @@ -1,257 +1,110 @@ -/* A Bison parser, made by GNU Bison 1.875d. */ -/* Skeleton parser for Yacc-like parsing with Bison, - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. +/* A Bison parser, made from /llvm/lib/AsmParser/llvmAsmParser.y + by GNU Bison version 1.28 */ - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -/* As a special exception, when this file is copied by Bison into a - Bison output file, you may use that output file without restriction. - This special exception was added by the Free Software Foundation - in version 1.24 of Bison. */ - -/* Written by Richard Stallman by simplifying the original so called - ``semantic'' parser. */ +#define YYBISON 1 /* Identify Bison output. */ -/* All symbols defined below should begin with yy or YY, to avoid - infringing on user name space. This should be done even for local - variables, as they might otherwise be expanded by user macros. - There are some unavoidable exceptions within include files to - define necessary library symbols; they are noted "INFRINGES ON - USER NAME SPACE" below. */ - -/* Identify Bison output. */ -#define YYBISON 1 - -/* Skeleton name. */ -#define YYSKELETON_NAME "yacc.c" - -/* Pure parsers. */ -#define YYPURE 0 - -/* Using locations. */ -#define YYLSP_NEEDED 0 - -/* If NAME_PREFIX is specified substitute the variables and functions - names. */ #define yyparse llvmAsmparse -#define yylex llvmAsmlex +#define yylex llvmAsmlex #define yyerror llvmAsmerror -#define yylval llvmAsmlval -#define yychar llvmAsmchar +#define yylval llvmAsmlval +#define yychar llvmAsmchar #define yydebug llvmAsmdebug #define yynerrs llvmAsmnerrs +#define ESINT64VAL 257 +#define EUINT64VAL 258 +#define SINTVAL 259 +#define UINTVAL 260 +#define FPVAL 261 +#define VOID 262 +#define BOOL 263 +#define SBYTE 264 +#define UBYTE 265 +#define SHORT 266 +#define USHORT 267 +#define INT 268 +#define UINT 269 +#define LONG 270 +#define ULONG 271 +#define FLOAT 272 +#define DOUBLE 273 +#define TYPE 274 +#define LABEL 275 +#define VAR_ID 276 +#define LABELSTR 277 +#define STRINGCONSTANT 278 +#define IMPLEMENTATION 279 +#define ZEROINITIALIZER 280 +#define TRUETOK 281 +#define FALSETOK 282 +#define BEGINTOK 283 +#define ENDTOK 284 +#define DECLARE 285 +#define GLOBAL 286 +#define CONSTANT 287 +#define VOLATILE 288 +#define TO 289 +#define DOTDOTDOT 290 +#define NULL_TOK 291 +#define UNDEF 292 +#define CONST 293 +#define INTERNAL 294 +#define LINKONCE 295 +#define WEAK 296 +#define APPENDING 297 +#define OPAQUE 298 +#define NOT 299 +#define EXTERNAL 300 +#define TARGET 301 +#define TRIPLE 302 +#define ENDIAN 303 +#define POINTERSIZE 304 +#define LITTLE 305 +#define BIG 306 +#define ALIGN 307 +#define DEPLIBS 308 +#define CALL 309 +#define TAIL 310 +#define CC_TOK 311 +#define CCC_TOK 312 +#define FASTCC_TOK 313 +#define COLDCC_TOK 314 +#define RET 315 +#define BR 316 +#define SWITCH 317 +#define INVOKE 318 +#define UNWIND 319 +#define UNREACHABLE 320 +#define ADD 321 +#define SUB 322 +#define MUL 323 +#define DIV 324 +#define REM 325 +#define AND 326 +#define OR 327 +#define XOR 328 +#define SETLE 329 +#define SETGE 330 +#define SETLT 331 +#define SETGT 332 +#define SETEQ 333 +#define SETNE 334 +#define MALLOC 335 +#define ALLOCA 336 +#define FREE 337 +#define LOAD 338 +#define STORE 339 +#define GETELEMENTPTR 340 +#define PHI_TOK 341 +#define CAST 342 +#define SELECT 343 +#define SHL 344 +#define SHR 345 +#define VAARG 346 +#define VAARG_old 347 +#define VANEXT_old 348 - -/* Tokens. */ -#ifndef YYTOKENTYPE -# define YYTOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum yytokentype { - ESINT64VAL = 258, - EUINT64VAL = 259, - SINTVAL = 260, - UINTVAL = 261, - FPVAL = 262, - VOID = 263, - BOOL = 264, - SBYTE = 265, - UBYTE = 266, - SHORT = 267, - USHORT = 268, - INT = 269, - UINT = 270, - LONG = 271, - ULONG = 272, - FLOAT = 273, - DOUBLE = 274, - TYPE = 275, - LABEL = 276, - VAR_ID = 277, - LABELSTR = 278, - STRINGCONSTANT = 279, - IMPLEMENTATION = 280, - ZEROINITIALIZER = 281, - TRUETOK = 282, - FALSETOK = 283, - BEGINTOK = 284, - ENDTOK = 285, - DECLARE = 286, - GLOBAL = 287, - CONSTANT = 288, - VOLATILE = 289, - TO = 290, - DOTDOTDOT = 291, - NULL_TOK = 292, - UNDEF = 293, - CONST = 294, - INTERNAL = 295, - LINKONCE = 296, - WEAK = 297, - APPENDING = 298, - OPAQUE = 299, - NOT = 300, - EXTERNAL = 301, - TARGET = 302, - TRIPLE = 303, - ENDIAN = 304, - POINTERSIZE = 305, - LITTLE = 306, - BIG = 307, - DEPLIBS = 308, - CALL = 309, - TAIL = 310, - CC_TOK = 311, - CCC_TOK = 312, - FASTCC_TOK = 313, - COLDCC_TOK = 314, - RET = 315, - BR = 316, - SWITCH = 317, - INVOKE = 318, - UNWIND = 319, - UNREACHABLE = 320, - ADD = 321, - SUB = 322, - MUL = 323, - DIV = 324, - REM = 325, - AND = 326, - OR = 327, - XOR = 328, - SETLE = 329, - SETGE = 330, - SETLT = 331, - SETGT = 332, - SETEQ = 333, - SETNE = 334, - MALLOC = 335, - ALLOCA = 336, - FREE = 337, - LOAD = 338, - STORE = 339, - GETELEMENTPTR = 340, - PHI_TOK = 341, - CAST = 342, - SELECT = 343, - SHL = 344, - SHR = 345, - VAARG = 346, - VAARG_old = 347, - VANEXT_old = 348 - }; -#endif -#define ESINT64VAL 258 -#define EUINT64VAL 259 -#define SINTVAL 260 -#define UINTVAL 261 -#define FPVAL 262 -#define VOID 263 -#define BOOL 264 -#define SBYTE 265 -#define UBYTE 266 -#define SHORT 267 -#define USHORT 268 -#define INT 269 -#define UINT 270 -#define LONG 271 -#define ULONG 272 -#define FLOAT 273 -#define DOUBLE 274 -#define TYPE 275 -#define LABEL 276 -#define VAR_ID 277 -#define LABELSTR 278 -#define STRINGCONSTANT 279 -#define IMPLEMENTATION 280 -#define ZEROINITIALIZER 281 -#define TRUETOK 282 -#define FALSETOK 283 -#define BEGINTOK 284 -#define ENDTOK 285 -#define DECLARE 286 -#define GLOBAL 287 -#define CONSTANT 288 -#define VOLATILE 289 -#define TO 290 -#define DOTDOTDOT 291 -#define NULL_TOK 292 -#define UNDEF 293 -#define CONST 294 -#define INTERNAL 295 -#define LINKONCE 296 -#define WEAK 297 -#define APPENDING 298 -#define OPAQUE 299 -#define NOT 300 -#define EXTERNAL 301 -#define TARGET 302 -#define TRIPLE 303 -#define ENDIAN 304 -#define POINTERSIZE 305 -#define LITTLE 306 -#define BIG 307 -#define DEPLIBS 308 -#define CALL 309 -#define TAIL 310 -#define CC_TOK 311 -#define CCC_TOK 312 -#define FASTCC_TOK 313 -#define COLDCC_TOK 314 -#define RET 315 -#define BR 316 -#define SWITCH 317 -#define INVOKE 318 -#define UNWIND 319 -#define UNREACHABLE 320 -#define ADD 321 -#define SUB 322 -#define MUL 323 -#define DIV 324 -#define REM 325 -#define AND 326 -#define OR 327 -#define XOR 328 -#define SETLE 329 -#define SETGE 330 -#define SETLT 331 -#define SETGT 332 -#define SETEQ 333 -#define SETNE 334 -#define MALLOC 335 -#define ALLOCA 336 -#define FREE 337 -#define LOAD 338 -#define STORE 339 -#define GETELEMENTPTR 340 -#define PHI_TOK 341 -#define CAST 342 -#define SELECT 343 -#define SHL 344 -#define SHR 345 -#define VAARG 346 -#define VAARG_old 347 -#define VANEXT_old 348 - - - - -/* Copy the first part of user declarations. */ -#line 14 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" +#line 14 "/llvm/lib/AsmParser/llvmAsmParser.y" #include "ParserInternals.h" #include "llvm/CallingConv.h" @@ -1103,23 +956,8 @@ } - -/* Enabling traces. */ -#ifndef YYDEBUG -# define YYDEBUG 0 -#endif - -/* Enabling verbose error messages. */ -#ifdef YYERROR_VERBOSE -# undef YYERROR_VERBOSE -# define YYERROR_VERBOSE 1 -#else -# define YYERROR_VERBOSE 0 -#endif - -#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) -#line 866 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" -typedef union YYSTYPE { +#line 866 "/llvm/lib/AsmParser/llvmAsmParser.y" +typedef union { llvm::Module *ModuleVal; llvm::Function *FunctionVal; std::pair *ArgVal; @@ -1158,1235 +996,948 @@ llvm::Instruction::OtherOps OtherOpVal; llvm::Module::Endianness Endianness; } YYSTYPE; -/* Line 191 of yacc.c. */ -#line 1163 "llvmAsmParser.tab.c" -# define yystype YYSTYPE /* obsolescent; will be withdrawn */ -# define YYSTYPE_IS_DECLARED 1 -# define YYSTYPE_IS_TRIVIAL 1 -#endif - +#include +#ifndef __cplusplus +#ifndef __STDC__ +#define const +#endif +#endif -/* Copy the second part of user declarations. */ - - -/* Line 214 of yacc.c. */ -#line 1175 "llvmAsmParser.tab.c" - -#if ! defined (yyoverflow) || YYERROR_VERBOSE - -# ifndef YYFREE -# define YYFREE free -# endif -# ifndef YYMALLOC -# define YYMALLOC malloc -# endif - -/* The parser invokes alloca or malloc; define the necessary symbols. */ - -# ifdef YYSTACK_USE_ALLOCA -# if YYSTACK_USE_ALLOCA -# define YYSTACK_ALLOC alloca -# endif -# else -# if defined (alloca) || defined (_ALLOCA_H) -# define YYSTACK_ALLOC alloca -# else -# ifdef __GNUC__ -# define YYSTACK_ALLOC __builtin_alloca -# endif -# endif -# endif - -# ifdef YYSTACK_ALLOC - /* Pacify GCC's `empty if-body' warning. */ -# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) -# else -# if defined (__STDC__) || defined (__cplusplus) -# include /* INFRINGES ON USER NAME SPACE */ -# define YYSIZE_T size_t -# endif -# define YYSTACK_ALLOC YYMALLOC -# define YYSTACK_FREE YYFREE -# endif -#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */ - - -#if (! defined (yyoverflow) \ - && (! defined (__cplusplus) \ - || (defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL))) -/* A type that is properly aligned for any stack member. */ -union yyalloc -{ - short int yyss; - YYSTYPE yyvs; - }; -/* The size of the maximum gap between one aligned stack and the next. */ -# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) +#define YYFINAL 429 +#define YYFLAG -32768 +#define YYNTBASE 109 + +#define YYTRANSLATE(x) ((unsigned)(x) <= 348 ? yytranslate[x] : 170) + +static const char yytranslate[] = { 0, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 97, + 98, 106, 2, 107, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 102, + 95, 103, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 99, 96, 101, 2, 2, 2, 2, 2, 108, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 100, + 2, 2, 104, 2, 105, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 1, 3, 4, 5, 6, + 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, + 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, + 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, + 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, + 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, + 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, + 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, + 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, + 87, 88, 89, 90, 91, 92, 93, 94 +}; -/* The size of an array large to enough to hold all stacks, each with - N elements. */ -# define YYSTACK_BYTES(N) \ - ((N) * (sizeof (short int) + sizeof (YYSTYPE)) \ - + YYSTACK_GAP_MAXIMUM) - -/* Copy COUNT objects from FROM to TO. The source and destination do - not overlap. */ -# ifndef YYCOPY -# if defined (__GNUC__) && 1 < __GNUC__ -# define YYCOPY(To, From, Count) \ - __builtin_memcpy (To, From, (Count) * sizeof (*(From))) -# else -# define YYCOPY(To, From, Count) \ - do \ - { \ - register YYSIZE_T yyi; \ - for (yyi = 0; yyi < (Count); yyi++) \ - (To)[yyi] = (From)[yyi]; \ - } \ - while (0) -# endif -# endif - -/* Relocate STACK from its old location to the new one. The - local variables YYSIZE and YYSTACKSIZE give the old and new number of - elements in the stack, and YYPTR gives the new location of the - stack. Advance YYPTR to a properly aligned location for the next - stack. */ -# define YYSTACK_RELOCATE(Stack) \ - do \ - { \ - YYSIZE_T yynewbytes; \ - YYCOPY (&yyptr->Stack, Stack, yysize); \ - Stack = &yyptr->Stack; \ - yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ - yyptr += yynewbytes / sizeof (*yyptr); \ - } \ - while (0) +#if YYDEBUG != 0 +static const short yyprhs[] = { 0, + 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, + 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, + 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, + 60, 62, 64, 67, 68, 70, 72, 74, 76, 77, + 78, 80, 82, 84, 87, 89, 91, 93, 95, 97, + 99, 101, 103, 105, 107, 109, 111, 113, 115, 117, + 119, 121, 123, 125, 127, 129, 132, 137, 143, 149, + 153, 156, 159, 161, 165, 167, 171, 173, 174, 179, + 183, 187, 192, 197, 201, 204, 207, 210, 213, 216, + 219, 222, 225, 228, 231, 238, 244, 253, 260, 267, + 274, 281, 285, 287, 289, 291, 293, 296, 299, 302, + 304, 309, 312, 318, 324, 328, 333, 334, 336, 338, + 342, 346, 350, 354, 358, 360, 361, 363, 365, 367, + 368, 371, 375, 377, 379, 383, 385, 386, 393, 395, + 397, 401, 403, 405, 408, 409, 413, 415, 417, 419, + 421, 423, 425, 427, 431, 433, 435, 437, 439, 441, + 444, 447, 450, 454, 457, 458, 460, 463, 466, 470, + 480, 490, 499, 513, 515, 517, 524, 530, 533, 540, + 548, 550, 554, 556, 557, 560, 562, 568, 574, 580, + 583, 588, 593, 600, 605, 610, 615, 618, 626, 628, + 631, 632, 634, 635, 638, 644, 650, 659, 662, 668, + 674, 683, 686, 691, 698 +}; -#endif +static const short yyrhs[] = { 5, + 0, 6, 0, 3, 0, 4, 0, 67, 0, 68, + 0, 69, 0, 70, 0, 71, 0, 72, 0, 73, + 0, 74, 0, 75, 0, 76, 0, 77, 0, 78, + 0, 79, 0, 80, 0, 90, 0, 91, 0, 16, + 0, 14, 0, 12, 0, 10, 0, 17, 0, 15, + 0, 13, 0, 11, 0, 115, 0, 116, 0, 18, + 0, 19, 0, 140, 95, 0, 0, 40, 0, 41, + 0, 42, 0, 43, 0, 0, 0, 58, 0, 59, + 0, 60, 0, 57, 4, 0, 124, 0, 8, 0, + 126, 0, 8, 0, 126, 0, 9, 0, 10, 0, + 11, 0, 12, 0, 13, 0, 14, 0, 15, 0, + 16, 0, 17, 0, 18, 0, 19, 0, 20, 0, + 21, 0, 44, 0, 125, 0, 153, 0, 96, 4, + 0, 123, 97, 128, 98, 0, 99, 4, 100, 126, + 101, 0, 102, 4, 100, 126, 103, 0, 104, 127, + 105, 0, 104, 105, 0, 126, 106, 0, 126, 0, + 127, 107, 126, 0, 127, 0, 127, 107, 36, 0, + 36, 0, 0, 124, 99, 131, 101, 0, 124, 99, + 101, 0, 124, 108, 24, 0, 124, 102, 131, 103, + 0, 124, 104, 131, 105, 0, 124, 104, 105, 0, + 124, 37, 0, 124, 38, 0, 124, 153, 0, 124, + 130, 0, 124, 26, 0, 115, 110, 0, 116, 4, + 0, 9, 27, 0, 9, 28, 0, 118, 7, 0, + 88, 97, 129, 35, 124, 98, 0, 86, 97, 129, + 167, 98, 0, 89, 97, 129, 107, 129, 107, 129, + 98, 0, 111, 97, 129, 107, 129, 98, 0, 112, + 97, 129, 107, 129, 98, 0, 113, 97, 129, 107, + 129, 98, 0, 114, 97, 129, 107, 129, 98, 0, + 131, 107, 129, 0, 129, 0, 32, 0, 33, 0, + 134, 0, 134, 149, 0, 134, 150, 0, 134, 25, + 0, 135, 0, 135, 119, 20, 122, 0, 135, 150, + 0, 135, 119, 120, 132, 129, 0, 135, 119, 46, + 132, 124, 0, 135, 47, 137, 0, 135, 54, 95, + 138, 0, 0, 52, 0, 51, 0, 49, 95, 136, + 0, 50, 95, 4, 0, 48, 95, 24, 0, 99, + 139, 101, 0, 139, 107, 24, 0, 24, 0, 0, + 22, 0, 24, 0, 140, 0, 0, 124, 141, 0, + 143, 107, 142, 0, 142, 0, 143, 0, 143, 107, + 36, 0, 36, 0, 0, 121, 122, 140, 97, 144, + 98, 0, 29, 0, 104, 0, 120, 145, 146, 0, + 30, 0, 105, 0, 156, 148, 0, 0, 31, 151, + 145, 0, 3, 0, 4, 0, 7, 0, 27, 0, + 28, 0, 37, 0, 38, 0, 102, 131, 103, 0, + 130, 0, 109, 0, 140, 0, 153, 0, 152, 0, + 124, 154, 0, 156, 157, 0, 147, 157, 0, 158, + 119, 159, 0, 158, 161, 0, 0, 23, 0, 61, + 155, 0, 61, 8, 0, 62, 21, 154, 0, 62, + 9, 154, 107, 21, 154, 107, 21, 154, 0, 63, + 117, 154, 107, 21, 154, 99, 160, 101, 0, 63, + 117, 154, 107, 21, 154, 99, 101, 0, 64, 121, + 122, 154, 97, 164, 98, 35, 21, 154, 65, 21, + 154, 0, 65, 0, 66, 0, 160, 117, 152, 107, + 21, 154, 0, 117, 152, 107, 21, 154, 0, 119, + 166, 0, 124, 99, 154, 107, 154, 101, 0, 162, + 107, 99, 154, 107, 154, 101, 0, 155, 0, 163, + 107, 155, 0, 163, 0, 0, 56, 55, 0, 55, + 0, 111, 124, 154, 107, 154, 0, 112, 124, 154, + 107, 154, 0, 113, 124, 154, 107, 154, 0, 45, + 155, 0, 114, 155, 107, 155, 0, 88, 155, 35, + 124, 0, 89, 155, 107, 155, 107, 155, 0, 92, + 155, 107, 124, 0, 93, 155, 107, 124, 0, 94, + 155, 107, 124, 0, 87, 162, 0, 165, 121, 122, + 154, 97, 164, 98, 0, 169, 0, 107, 163, 0, + 0, 34, 0, 0, 81, 124, 0, 81, 124, 107, + 53, 4, 0, 81, 124, 107, 15, 154, 0, 81, + 124, 107, 15, 154, 107, 53, 4, 0, 82, 124, + 0, 82, 124, 107, 53, 4, 0, 82, 124, 107, + 15, 154, 0, 82, 124, 107, 15, 154, 107, 53, + 4, 0, 83, 155, 0, 168, 84, 124, 154, 0, + 168, 85, 155, 107, 124, 154, 0, 86, 124, 154, + 167, 0 +}; -#if defined (__STDC__) || defined (__cplusplus) - typedef signed char yysigned_char; -#else - typedef short int yysigned_char; #endif -/* YYFINAL -- State number of the termination state. */ -#define YYFINAL 4 -/* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 1102 - -/* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 108 -/* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 62 -/* YYNRULES -- Number of rules. */ -#define YYNRULES 212 -/* YYNRULES -- Number of states. */ -#define YYNSTATES 419 - -/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ -#define YYUNDEFTOK 2 -#define YYMAXUTOK 348 - -#define YYTRANSLATE(YYX) \ - ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) - -/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ -static const unsigned char yytranslate[] = -{ - 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 96, 97, 105, 2, 106, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 101, 94, 102, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 98, 95, 100, 2, 2, 2, 2, 2, 107, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 99, 2, 2, 103, 2, 104, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, - 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, - 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, - 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, - 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, - 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, - 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, - 85, 86, 87, 88, 89, 90, 91, 92, 93 +#if YYDEBUG != 0 +static const short yyrline[] = { 0, + 983, 984, 991, 992, 1001, 1001, 1001, 1001, 1001, 1002, + 1002, 1002, 1003, 1003, 1003, 1003, 1003, 1003, 1005, 1005, + 1009, 1009, 1009, 1009, 1010, 1010, 1010, 1010, 1011, 1011, + 1012, 1012, 1015, 1018, 1022, 1022, 1023, 1024, 1025, 1028, + 1028, 1029, 1030, 1031, 1045, 1045, 1046, 1046, 1048, 1057, + 1057, 1057, 1057, 1057, 1057, 1057, 1058, 1058, 1058, 1058, + 1058, 1058, 1059, 1062, 1065, 1071, 1078, 1090, 1094, 1105, + 1114, 1117, 1125, 1129, 1134, 1135, 1138, 1141, 1151, 1176, + 1189, 1217, 1242, 1262, 1274, 1283, 1287, 1346, 1352, 1360, + 1365, 1370, 1373, 1376, 1383, 1393, 1424, 1431, 1452, 1459, + 1464, 1474, 1477, 1484, 1484, 1494, 1501, 1505, 1508, 1511, + 1524, 1544, 1546, 1550, 1554, 1556, 1558, 1563, 1564, 1566, + 1569, 1577, 1582, 1584, 1588, 1592, 1600, 1600, 1601, 1601, + 1603, 1609, 1614, 1620, 1623, 1628, 1632, 1636, 1716, 1716, + 1718, 1726, 1726, 1728, 1732, 1732, 1741, 1744, 1747, 1750, + 1753, 1756, 1759, 1762, 1786, 1793, 1796, 1801, 1801, 1807, + 1811, 1814, 1822, 1831, 1835, 1845, 1856, 1859, 1862, 1865, + 1868, 1882, 1886, 1939, 1942, 1948, 1956, 1966, 1973, 1978, + 1985, 1989, 1995, 1995, 1997, 2000, 2006, 2018, 2026, 2036, + 2048, 2055, 2062, 2069, 2074, 2093, 2115, 2129, 2186, 2192, + 2194, 2198, 2201, 2207, 2211, 2215, 2219, 2223, 2227, 2231, + 2235, 2239, 2246, 2256, 2269 }; +#endif -#if YYDEBUG -/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in - YYRHS. */ -static const unsigned short int yyprhs[] = -{ - 0, 0, 3, 5, 7, 9, 11, 13, 15, 17, - 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, - 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, - 59, 61, 63, 65, 67, 70, 71, 73, 75, 77, - 79, 80, 81, 83, 85, 87, 90, 92, 94, 96, - 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, - 118, 120, 122, 124, 126, 128, 130, 132, 135, 140, - 146, 152, 156, 159, 162, 164, 168, 170, 174, 176, - 177, 182, 186, 190, 195, 200, 204, 207, 210, 213, - 216, 219, 222, 225, 228, 231, 234, 241, 247, 256, - 263, 270, 277, 284, 288, 290, 292, 294, 296, 299, - 302, 305, 307, 312, 315, 321, 327, 331, 336, 337, - 339, 341, 345, 349, 353, 357, 361, 363, 364, 366, - 368, 370, 371, 374, 378, 380, 382, 386, 388, 389, - 396, 398, 400, 404, 406, 408, 411, 412, 416, 418, - 420, 422, 424, 426, 428, 430, 434, 436, 438, 440, - 442, 444, 447, 450, 453, 457, 460, 461, 463, 466, - 469, 473, 483, 493, 502, 516, 518, 520, 527, 533, - 536, 543, 551, 553, 557, 559, 560, 563, 565, 571, - 577, 583, 586, 591, 596, 603, 608, 613, 618, 621, - 629, 631, 634, 635, 637, 638, 641, 647, 650, 656, - 659, 664, 671 -}; -/* YYRHS -- A `-1'-separated list of the rules' RHS. */ -static const short int yyrhs[] = -{ - 133, 0, -1, 5, -1, 6, -1, 3, -1, 4, - -1, 66, -1, 67, -1, 68, -1, 69, -1, 70, - -1, 71, -1, 72, -1, 73, -1, 74, -1, 75, - -1, 76, -1, 77, -1, 78, -1, 79, -1, 89, - -1, 90, -1, 16, -1, 14, -1, 12, -1, 10, - -1, 17, -1, 15, -1, 13, -1, 11, -1, 115, - -1, 116, -1, 18, -1, 19, -1, 140, 94, -1, - -1, 40, -1, 41, -1, 42, -1, 43, -1, -1, - -1, 57, -1, 58, -1, 59, -1, 56, 4, -1, - 124, -1, 8, -1, 126, -1, 8, -1, 126, -1, - 9, -1, 10, -1, 11, -1, 12, -1, 13, -1, - 14, -1, 15, -1, 16, -1, 17, -1, 18, -1, - 19, -1, 20, -1, 21, -1, 44, -1, 125, -1, - 153, -1, 95, 4, -1, 123, 96, 128, 97, -1, - 98, 4, 99, 126, 100, -1, 101, 4, 99, 126, - 102, -1, 103, 127, 104, -1, 103, 104, -1, 126, - 105, -1, 126, -1, 127, 106, 126, -1, 127, -1, - 127, 106, 36, -1, 36, -1, -1, 124, 98, 131, - 100, -1, 124, 98, 100, -1, 124, 107, 24, -1, - 124, 101, 131, 102, -1, 124, 103, 131, 104, -1, - 124, 103, 104, -1, 124, 37, -1, 124, 38, -1, - 124, 153, -1, 124, 130, -1, 124, 26, -1, 115, - 110, -1, 116, 4, -1, 9, 27, -1, 9, 28, - -1, 118, 7, -1, 87, 96, 129, 35, 124, 97, - -1, 85, 96, 129, 167, 97, -1, 88, 96, 129, - 106, 129, 106, 129, 97, -1, 111, 96, 129, 106, - 129, 97, -1, 112, 96, 129, 106, 129, 97, -1, - 113, 96, 129, 106, 129, 97, -1, 114, 96, 129, - 106, 129, 97, -1, 131, 106, 129, -1, 129, -1, - 32, -1, 33, -1, 134, -1, 134, 149, -1, 134, - 150, -1, 134, 25, -1, 135, -1, 135, 119, 20, - 122, -1, 135, 150, -1, 135, 119, 120, 132, 129, - -1, 135, 119, 46, 132, 124, -1, 135, 47, 137, - -1, 135, 53, 94, 138, -1, -1, 52, -1, 51, - -1, 49, 94, 136, -1, 50, 94, 4, -1, 48, - 94, 24, -1, 98, 139, 100, -1, 139, 106, 24, - -1, 24, -1, -1, 22, -1, 24, -1, 140, -1, - -1, 124, 141, -1, 143, 106, 142, -1, 142, -1, - 143, -1, 143, 106, 36, -1, 36, -1, -1, 121, - 122, 140, 96, 144, 97, -1, 29, -1, 103, -1, - 120, 145, 146, -1, 30, -1, 104, -1, 156, 148, - -1, -1, 31, 151, 145, -1, 3, -1, 4, -1, - 7, -1, 27, -1, 28, -1, 37, -1, 38, -1, - 101, 131, 102, -1, 130, -1, 109, -1, 140, -1, - 153, -1, 152, -1, 124, 154, -1, 156, 157, -1, - 147, 157, -1, 158, 119, 159, -1, 158, 161, -1, - -1, 23, -1, 60, 155, -1, 60, 8, -1, 61, - 21, 154, -1, 61, 9, 154, 106, 21, 154, 106, - 21, 154, -1, 62, 117, 154, 106, 21, 154, 98, - 160, 100, -1, 62, 117, 154, 106, 21, 154, 98, - 100, -1, 63, 121, 122, 154, 96, 164, 97, 35, - 21, 154, 64, 21, 154, -1, 64, -1, 65, -1, - 160, 117, 152, 106, 21, 154, -1, 117, 152, 106, - 21, 154, -1, 119, 166, -1, 124, 98, 154, 106, - 154, 100, -1, 162, 106, 98, 154, 106, 154, 100, - -1, 155, -1, 163, 106, 155, -1, 163, -1, -1, - 55, 54, -1, 54, -1, 111, 124, 154, 106, 154, - -1, 112, 124, 154, 106, 154, -1, 113, 124, 154, - 106, 154, -1, 45, 155, -1, 114, 155, 106, 155, - -1, 87, 155, 35, 124, -1, 88, 155, 106, 155, - 106, 155, -1, 91, 155, 106, 124, -1, 92, 155, - 106, 124, -1, 93, 155, 106, 124, -1, 86, 162, - -1, 165, 121, 122, 154, 96, 164, 97, -1, 169, - -1, 106, 163, -1, -1, 34, -1, -1, 80, 124, - -1, 80, 124, 106, 15, 154, -1, 81, 124, -1, - 81, 124, 106, 15, 154, -1, 82, 155, -1, 168, - 83, 124, 154, -1, 168, 84, 155, 106, 124, 154, - -1, 85, 124, 154, 167, -1 -}; +#if YYDEBUG != 0 || defined (YYERROR_VERBOSE) -/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ -static const unsigned short int yyrline[] = -{ - 0, 983, 983, 984, 991, 992, 1001, 1001, 1001, 1001, - 1001, 1002, 1002, 1002, 1003, 1003, 1003, 1003, 1003, 1003, - 1005, 1005, 1009, 1009, 1009, 1009, 1010, 1010, 1010, 1010, - 1011, 1011, 1012, 1012, 1015, 1018, 1022, 1023, 1024, 1025, - 1026, 1028, 1029, 1030, 1031, 1032, 1045, 1045, 1046, 1046, - 1048, 1057, 1057, 1057, 1057, 1057, 1057, 1057, 1058, 1058, - 1058, 1058, 1058, 1058, 1059, 1062, 1065, 1071, 1078, 1090, - 1094, 1105, 1114, 1117, 1125, 1129, 1134, 1135, 1138, 1141, - 1151, 1176, 1189, 1217, 1242, 1262, 1274, 1283, 1287, 1346, - 1352, 1360, 1365, 1370, 1373, 1376, 1383, 1393, 1424, 1431, - 1452, 1459, 1464, 1474, 1477, 1484, 1484, 1494, 1501, 1505, - 1508, 1511, 1524, 1544, 1546, 1550, 1554, 1556, 1558, 1563, - 1564, 1566, 1569, 1577, 1582, 1584, 1588, 1592, 1600, 1600, - 1601, 1601, 1603, 1609, 1614, 1620, 1623, 1628, 1632, 1636, - 1716, 1716, 1718, 1726, 1726, 1728, 1732, 1732, 1741, 1744, - 1747, 1750, 1753, 1756, 1759, 1762, 1786, 1793, 1796, 1801, - 1801, 1807, 1811, 1814, 1822, 1831, 1835, 1845, 1856, 1859, - 1862, 1865, 1868, 1882, 1886, 1939, 1942, 1948, 1956, 1966, - 1973, 1978, 1985, 1989, 1995, 1995, 1997, 2000, 2006, 2018, - 2026, 2036, 2048, 2055, 2062, 2069, 2074, 2093, 2115, 2129, - 2186, 2192, 2194, 2198, 2201, 2207, 2211, 2215, 2219, 2223, - 2230, 2240, 2253 +static const char * const yytname[] = { "$","error","$undefined.","ESINT64VAL", +"EUINT64VAL","SINTVAL","UINTVAL","FPVAL","VOID","BOOL","SBYTE","UBYTE","SHORT", +"USHORT","INT","UINT","LONG","ULONG","FLOAT","DOUBLE","TYPE","LABEL","VAR_ID", +"LABELSTR","STRINGCONSTANT","IMPLEMENTATION","ZEROINITIALIZER","TRUETOK","FALSETOK", +"BEGINTOK","ENDTOK","DECLARE","GLOBAL","CONSTANT","VOLATILE","TO","DOTDOTDOT", +"NULL_TOK","UNDEF","CONST","INTERNAL","LINKONCE","WEAK","APPENDING","OPAQUE", +"NOT","EXTERNAL","TARGET","TRIPLE","ENDIAN","POINTERSIZE","LITTLE","BIG","ALIGN", +"DEPLIBS","CALL","TAIL","CC_TOK","CCC_TOK","FASTCC_TOK","COLDCC_TOK","RET","BR", +"SWITCH","INVOKE","UNWIND","UNREACHABLE","ADD","SUB","MUL","DIV","REM","AND", +"OR","XOR","SETLE","SETGE","SETLT","SETGT","SETEQ","SETNE","MALLOC","ALLOCA", +"FREE","LOAD","STORE","GETELEMENTPTR","PHI_TOK","CAST","SELECT","SHL","SHR", +"VAARG","VAARG_old","VANEXT_old","'='","'\\\\'","'('","')'","'['","'x'","']'", +"'<'","'>'","'{'","'}'","'*'","','","'c'","INTVAL","EINT64VAL","ArithmeticOps", +"LogicalOps","SetCondOps","ShiftOps","SIntType","UIntType","IntType","FPType", +"OptAssign","OptLinkage","OptCallingConv","TypesV","UpRTypesV","Types","PrimType", +"UpRTypes","TypeListI","ArgTypeListI","ConstVal","ConstExpr","ConstVector","GlobalType", +"Module","FunctionList","ConstPool","BigOrLittle","TargetDefinition","LibrariesDefinition", +"LibList","Name","OptName","ArgVal","ArgListH","ArgList","FunctionHeaderH","BEGIN", +"FunctionHeader","END","Function","FunctionProto","@1","ConstValueRef","SymbolicValueRef", +"ValueRef","ResolvedVal","BasicBlockList","BasicBlock","InstructionList","BBTerminatorInst", +"JumpTable","Inst","PHIList","ValueRefList","ValueRefListE","OptTailCall","InstVal", +"IndexList","OptVolatile","MemoryInst", NULL }; #endif -#if YYDEBUG || YYERROR_VERBOSE -/* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. - First, the terminals, then, starting at YYNTOKENS, nonterminals. */ -static const char *const yytname[] = -{ - "$end", "error", "$undefined", "ESINT64VAL", "EUINT64VAL", "SINTVAL", - "UINTVAL", "FPVAL", "VOID", "BOOL", "SBYTE", "UBYTE", "SHORT", "USHORT", - "INT", "UINT", "LONG", "ULONG", "FLOAT", "DOUBLE", "TYPE", "LABEL", - "VAR_ID", "LABELSTR", "STRINGCONSTANT", "IMPLEMENTATION", - "ZEROINITIALIZER", "TRUETOK", "FALSETOK", "BEGINTOK", "ENDTOK", - "DECLARE", "GLOBAL", "CONSTANT", "VOLATILE", "TO", "DOTDOTDOT", - "NULL_TOK", "UNDEF", "CONST", "INTERNAL", "LINKONCE", "WEAK", - "APPENDING", "OPAQUE", "NOT", "EXTERNAL", "TARGET", "TRIPLE", "ENDIAN", - "POINTERSIZE", "LITTLE", "BIG", "DEPLIBS", "CALL", "TAIL", "CC_TOK", - "CCC_TOK", "FASTCC_TOK", "COLDCC_TOK", "RET", "BR", "SWITCH", "INVOKE", - "UNWIND", "UNREACHABLE", "ADD", "SUB", "MUL", "DIV", "REM", "AND", "OR", - "XOR", "SETLE", "SETGE", "SETLT", "SETGT", "SETEQ", "SETNE", "MALLOC", - "ALLOCA", "FREE", "LOAD", "STORE", "GETELEMENTPTR", "PHI_TOK", "CAST", - "SELECT", "SHL", "SHR", "VAARG", "VAARG_old", "VANEXT_old", "'='", - "'\\\\'", "'('", "')'", "'['", "'x'", "']'", "'<'", "'>'", "'{'", "'}'", - "'*'", "','", "'c'", "$accept", "INTVAL", "EINT64VAL", "ArithmeticOps", - "LogicalOps", "SetCondOps", "ShiftOps", "SIntType", "UIntType", - "IntType", "FPType", "OptAssign", "OptLinkage", "OptCallingConv", - "TypesV", "UpRTypesV", "Types", "PrimType", "UpRTypes", "TypeListI", - "ArgTypeListI", "ConstVal", "ConstExpr", "ConstVector", "GlobalType", - "Module", "FunctionList", "ConstPool", "BigOrLittle", "TargetDefinition", - "LibrariesDefinition", "LibList", "Name", "OptName", "ArgVal", - "ArgListH", "ArgList", "FunctionHeaderH", "BEGIN", "FunctionHeader", - "END", "Function", "FunctionProto", "@1", "ConstValueRef", - "SymbolicValueRef", "ValueRef", "ResolvedVal", "BasicBlockList", - "BasicBlock", "InstructionList", "BBTerminatorInst", "JumpTable", "Inst", - "PHIList", "ValueRefList", "ValueRefListE", "OptTailCall", "InstVal", - "IndexList", "OptVolatile", "MemoryInst", 0 +static const short yyr1[] = { 0, + 109, 109, 110, 110, 111, 111, 111, 111, 111, 112, + 112, 112, 113, 113, 113, 113, 113, 113, 114, 114, + 115, 115, 115, 115, 116, 116, 116, 116, 117, 117, + 118, 118, 119, 119, 120, 120, 120, 120, 120, 121, + 121, 121, 121, 121, 122, 122, 123, 123, 124, 125, + 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, + 125, 125, 126, 126, 126, 126, 126, 126, 126, 126, + 126, 126, 127, 127, 128, 128, 128, 128, 129, 129, + 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, + 129, 129, 129, 129, 130, 130, 130, 130, 130, 130, + 130, 131, 131, 132, 132, 133, 134, 134, 134, 134, + 135, 135, 135, 135, 135, 135, 135, 136, 136, 137, + 137, 137, 138, 139, 139, 139, 140, 140, 141, 141, + 142, 143, 143, 144, 144, 144, 144, 145, 146, 146, + 147, 148, 148, 149, 151, 150, 152, 152, 152, 152, + 152, 152, 152, 152, 152, 153, 153, 154, 154, 155, + 156, 156, 157, 158, 158, 158, 159, 159, 159, 159, + 159, 159, 159, 159, 159, 160, 160, 161, 162, 162, + 163, 163, 164, 164, 165, 165, 166, 166, 166, 166, + 166, 166, 166, 166, 166, 166, 166, 166, 166, 167, + 167, 168, 168, 169, 169, 169, 169, 169, 169, 169, + 169, 169, 169, 169, 169 }; -#endif -# ifdef YYPRINT -/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to - token YYLEX-NUM. */ -static const unsigned short int yytoknum[] = -{ - 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, - 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, - 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, - 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, - 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, - 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, - 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, - 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, - 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, - 345, 346, 347, 348, 61, 92, 40, 41, 91, 120, - 93, 60, 62, 123, 125, 42, 44, 99 +static const short yyr2[] = { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 2, 0, 1, 1, 1, 1, 0, 0, + 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 2, 4, 5, 5, 3, + 2, 2, 1, 3, 1, 3, 1, 0, 4, 3, + 3, 4, 4, 3, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 6, 5, 8, 6, 6, 6, + 6, 3, 1, 1, 1, 1, 2, 2, 2, 1, + 4, 2, 5, 5, 3, 4, 0, 1, 1, 3, + 3, 3, 3, 3, 1, 0, 1, 1, 1, 0, + 2, 3, 1, 1, 3, 1, 0, 6, 1, 1, + 3, 1, 1, 2, 0, 3, 1, 1, 1, 1, + 1, 1, 1, 3, 1, 1, 1, 1, 1, 2, + 2, 2, 3, 2, 0, 1, 2, 2, 3, 9, + 9, 8, 13, 1, 1, 6, 5, 2, 6, 7, + 1, 3, 1, 0, 2, 1, 5, 5, 5, 2, + 4, 4, 6, 4, 4, 4, 2, 7, 1, 2, + 0, 1, 0, 2, 5, 5, 8, 2, 5, 5, + 8, 2, 4, 6, 4 }; -# endif -/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ -static const unsigned char yyr1[] = -{ - 0, 108, 109, 109, 110, 110, 111, 111, 111, 111, - 111, 112, 112, 112, 113, 113, 113, 113, 113, 113, - 114, 114, 115, 115, 115, 115, 116, 116, 116, 116, - 117, 117, 118, 118, 119, 119, 120, 120, 120, 120, - 120, 121, 121, 121, 121, 121, 122, 122, 123, 123, - 124, 125, 125, 125, 125, 125, 125, 125, 125, 125, - 125, 125, 125, 125, 126, 126, 126, 126, 126, 126, - 126, 126, 126, 126, 127, 127, 128, 128, 128, 128, - 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, - 129, 129, 129, 129, 129, 129, 130, 130, 130, 130, - 130, 130, 130, 131, 131, 132, 132, 133, 134, 134, - 134, 134, 135, 135, 135, 135, 135, 135, 135, 136, - 136, 137, 137, 137, 138, 139, 139, 139, 140, 140, - 141, 141, 142, 143, 143, 144, 144, 144, 144, 145, - 146, 146, 147, 148, 148, 149, 151, 150, 152, 152, - 152, 152, 152, 152, 152, 152, 152, 153, 153, 154, - 154, 155, 156, 156, 157, 158, 158, 158, 159, 159, - 159, 159, 159, 159, 159, 159, 159, 160, 160, 161, - 162, 162, 163, 163, 164, 164, 165, 165, 166, 166, - 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, - 166, 167, 167, 168, 168, 169, 169, 169, 169, 169, - 169, 169, 169 +static const short yydefact[] = { 117, + 39, 110, 109, 145, 35, 36, 37, 38, 40, 165, + 107, 108, 165, 127, 128, 0, 0, 39, 0, 112, + 40, 0, 41, 42, 43, 0, 0, 166, 162, 34, + 142, 143, 144, 161, 0, 0, 0, 115, 0, 0, + 0, 0, 33, 146, 44, 1, 2, 46, 50, 51, + 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, + 62, 63, 0, 0, 0, 0, 156, 0, 0, 45, + 64, 49, 157, 65, 139, 140, 141, 203, 164, 0, + 0, 0, 126, 116, 111, 104, 105, 0, 0, 66, + 0, 0, 48, 71, 73, 0, 0, 78, 72, 202, + 0, 186, 0, 0, 0, 0, 40, 174, 175, 5, + 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 0, 0, 0, 0, 0, 0, 0, + 19, 20, 0, 0, 0, 0, 0, 0, 0, 163, + 40, 178, 0, 199, 122, 119, 118, 120, 121, 125, + 0, 114, 50, 51, 52, 53, 54, 55, 56, 57, + 58, 59, 60, 0, 0, 0, 0, 113, 0, 0, + 70, 0, 137, 77, 75, 0, 0, 190, 185, 168, + 167, 0, 0, 24, 28, 23, 27, 22, 26, 21, + 25, 29, 30, 0, 0, 204, 208, 212, 0, 0, + 197, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 123, 0, 92, 93, 3, 4, 90, + 91, 94, 89, 85, 86, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 88, 87, 47, 47, + 74, 136, 130, 133, 134, 0, 0, 67, 147, 148, + 149, 150, 151, 152, 153, 0, 155, 159, 158, 160, + 0, 169, 0, 0, 0, 0, 201, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 124, 0, 0, 0, 80, 103, 0, 0, 84, + 0, 81, 0, 0, 0, 0, 68, 69, 129, 131, + 0, 138, 76, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 215, 0, 0, 192, 0, 194, 195, 196, + 0, 0, 0, 191, 0, 213, 0, 201, 0, 0, + 79, 0, 82, 83, 0, 0, 0, 0, 135, 132, + 154, 0, 0, 184, 206, 205, 210, 209, 181, 200, + 0, 0, 0, 187, 188, 189, 184, 0, 0, 0, + 0, 102, 0, 0, 0, 0, 0, 0, 183, 0, + 0, 0, 0, 0, 0, 193, 0, 214, 96, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 182, 179, 0, 198, 95, 0, 98, 99, 100, 101, + 0, 172, 0, 0, 0, 207, 211, 180, 0, 170, + 0, 171, 0, 0, 97, 0, 0, 0, 0, 0, + 0, 177, 0, 0, 176, 173, 0, 0, 0 }; -/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ -static const unsigned char yyr2[] = -{ - 0, 2, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 2, 0, 1, 1, 1, 1, - 0, 0, 1, 1, 1, 2, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 2, 4, 5, - 5, 3, 2, 2, 1, 3, 1, 3, 1, 0, - 4, 3, 3, 4, 4, 3, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 6, 5, 8, 6, - 6, 6, 6, 3, 1, 1, 1, 1, 2, 2, - 2, 1, 4, 2, 5, 5, 3, 4, 0, 1, - 1, 3, 3, 3, 3, 3, 1, 0, 1, 1, - 1, 0, 2, 3, 1, 1, 3, 1, 0, 6, - 1, 1, 3, 1, 1, 2, 0, 3, 1, 1, - 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, - 1, 2, 2, 2, 3, 2, 0, 1, 2, 2, - 3, 9, 9, 8, 13, 1, 1, 6, 5, 2, - 6, 7, 1, 3, 1, 0, 2, 1, 5, 5, - 5, 2, 4, 4, 6, 4, 4, 4, 2, 7, - 1, 2, 0, 1, 0, 2, 5, 2, 5, 2, - 4, 6, 4 +static const short yydefgoto[] = { 67, + 220, 233, 234, 235, 236, 164, 165, 194, 166, 18, + 9, 26, 68, 69, 167, 71, 72, 96, 176, 287, + 257, 288, 88, 427, 1, 2, 148, 38, 84, 151, + 73, 300, 244, 245, 246, 27, 77, 10, 33, 11, + 12, 21, 258, 74, 260, 349, 13, 29, 30, 140, + 404, 79, 201, 369, 370, 141, 142, 313, 143, 144 }; -/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state - STATE-NUM when YYTABLE doesn't specify something else to do. Zero - means the default is an error. */ -static const unsigned char yydefact[] = -{ - 118, 0, 40, 111, 1, 110, 146, 36, 37, 38, - 39, 41, 166, 108, 109, 166, 128, 129, 0, 0, - 40, 0, 113, 41, 0, 42, 43, 44, 0, 0, - 167, 163, 35, 143, 144, 145, 162, 0, 0, 0, - 116, 0, 0, 0, 0, 34, 147, 45, 2, 3, - 47, 51, 52, 53, 54, 55, 56, 57, 58, 59, - 60, 61, 62, 63, 64, 0, 0, 0, 0, 157, - 0, 0, 46, 65, 50, 158, 66, 140, 141, 142, - 204, 165, 0, 0, 0, 127, 117, 112, 105, 106, - 0, 0, 67, 0, 0, 49, 72, 74, 0, 0, - 79, 73, 203, 0, 187, 0, 0, 0, 0, 41, - 175, 176, 6, 7, 8, 9, 10, 11, 12, 13, - 14, 15, 16, 17, 18, 19, 0, 0, 0, 0, - 0, 0, 0, 20, 21, 0, 0, 0, 0, 0, - 0, 0, 164, 41, 179, 0, 200, 123, 120, 119, - 121, 122, 126, 0, 115, 51, 52, 53, 54, 55, - 56, 57, 58, 59, 60, 61, 0, 0, 0, 0, - 114, 0, 0, 71, 0, 138, 78, 76, 0, 0, - 191, 186, 169, 168, 0, 0, 25, 29, 24, 28, - 23, 27, 22, 26, 30, 31, 0, 0, 205, 207, - 209, 0, 0, 198, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 124, 0, 93, 94, - 4, 5, 91, 92, 95, 90, 86, 87, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 89, - 88, 48, 48, 75, 137, 131, 134, 135, 0, 0, - 68, 148, 149, 150, 151, 152, 153, 154, 0, 156, - 160, 159, 161, 0, 170, 0, 0, 0, 0, 202, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 125, 0, 0, 0, 81, 104, - 0, 0, 85, 0, 82, 0, 0, 0, 0, 69, - 70, 130, 132, 0, 139, 77, 0, 0, 0, 0, - 0, 0, 0, 212, 0, 0, 193, 0, 195, 196, - 197, 0, 0, 0, 192, 0, 210, 0, 202, 0, - 0, 80, 0, 83, 84, 0, 0, 0, 0, 136, - 133, 155, 0, 0, 185, 206, 208, 182, 201, 0, - 0, 0, 188, 189, 190, 185, 0, 0, 0, 0, - 103, 0, 0, 0, 0, 0, 0, 184, 0, 0, - 0, 0, 194, 0, 211, 97, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 183, 180, 0, 199, 96, - 0, 99, 100, 101, 102, 0, 173, 0, 0, 0, - 181, 0, 171, 0, 172, 0, 0, 98, 0, 0, - 0, 0, 0, 0, 178, 0, 0, 177, 174 +static const short yypact[] = {-32768, + 40, 341,-32768,-32768,-32768,-32768,-32768,-32768, 62, 12, +-32768,-32768, -20,-32768,-32768, 110, -67, 48, -50,-32768, + 62, 65,-32768,-32768,-32768, 1073, -18,-32768,-32768, 71, +-32768,-32768,-32768,-32768, -19, -8, 2,-32768, -15, 1073, + 31, 31,-32768,-32768,-32768,-32768,-32768, 8,-32768,-32768, +-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, +-32768,-32768, 123, 152, 163, 120,-32768, 71, 17,-32768, +-32768, -36,-32768,-32768,-32768,-32768,-32768, 1228,-32768, 148, + 72, 170, 164,-32768,-32768,-32768,-32768, 1136, 1173,-32768, + 89, 90,-32768,-32768, -36, 58, 94, 835,-32768,-32768, + 1136,-32768, 137, 1236, 27, 138, 62,-32768,-32768,-32768, +-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, +-32768,-32768,-32768, 1136, 1136, 1136, 1136, 1136, 1136, 1136, +-32768,-32768, 1136, 1136, 1136, 1136, 1136, 1136, 1136,-32768, + 62,-32768, 77,-32768,-32768,-32768,-32768,-32768,-32768,-32768, + -35,-32768, 118, 167, 190, 173, 191, 175, 192, 177, + 193, 196, 197, 180, 194, 198, 519,-32768, 1136, 1136, +-32768, 1136, 872,-32768, 92, 108, 662,-32768,-32768, 8, +-32768, 662, 662,-32768,-32768,-32768,-32768,-32768,-32768,-32768, +-32768,-32768,-32768, 662, 1073, 100, 101,-32768, 662, 115, + 102, 182, 111, 113, 114, 119, 662, 662, 662, 121, + 1073, 1136, 1136,-32768, 203,-32768,-32768,-32768,-32768,-32768, +-32768,-32768,-32768,-32768,-32768, 132, 133, 134, 935, 1173, + 620, 208, 139, 140, 143, 144,-32768,-32768, -74, -29, + -36,-32768, 71,-32768, 127, 117, 972,-32768,-32768,-32768, +-32768,-32768,-32768,-32768,-32768, 1173,-32768,-32768,-32768,-32768, + 128,-32768, 136, 662, -6, -2, 146, 662, 155, 1136, + 1136, 1136, 1136, 1136, 149, 151, 153, 1136, 662, 662, + 154,-32768, 1173, 1173, 1173,-32768,-32768, -28, -57,-32768, + 61,-32768, 1173, 1173, 1173, 1173,-32768,-32768,-32768,-32768, + 1036,-32768,-32768, -11, 230, 238, 165, 662, 262, 662, + 263, 1136,-32768, 162, 662,-32768, 166,-32768,-32768,-32768, + 662, 662, 662,-32768, 171,-32768, 1136, 146, 235, 169, +-32768, 1173,-32768,-32768, 172, 183, 184, 185,-32768,-32768, +-32768, 662, 662, 1136, 186,-32768, 187,-32768,-32768, 188, + 662, 189, 1136,-32768,-32768,-32768, 1136, 662, 174, 1136, + 1173,-32768, 1173, 1173, 1173, 1173, 199, 200, 188, 176, + 218, 231, 1136, 202, 662,-32768, 206,-32768,-32768, 209, + 201, 211, 212, 213, 214, 266, 5, 254, 293, 294, +-32768,-32768, 215,-32768,-32768, 1173,-32768,-32768,-32768,-32768, + 662,-32768, 740, 42, 279,-32768,-32768,-32768, 216,-32768, + 210,-32768, 740, 662,-32768, 298, 219, 250, 662, 300, + 301,-32768, 662, 662,-32768,-32768, 323, 325,-32768 }; -/* YYDEFGOTO[NTERM-NUM]. */ -static const short int yydefgoto[] = -{ - -1, 69, 222, 235, 236, 237, 238, 166, 167, 196, - 168, 20, 11, 28, 70, 71, 169, 73, 74, 98, - 178, 289, 259, 290, 90, 1, 2, 3, 150, 40, - 86, 153, 75, 302, 246, 247, 248, 29, 79, 12, - 35, 13, 14, 23, 260, 76, 262, 347, 15, 31, - 32, 142, 398, 81, 203, 367, 368, 143, 144, 313, - 145, 146 +static const short yypgoto[] = {-32768, +-32768, 251, 252, 255, 259, -102, -99, -362,-32768, 302, + 310, -81, -38,-32768, -26,-32768, -54, 240,-32768, -83, + 178, -207, 297,-32768,-32768,-32768,-32768,-32768,-32768,-32768, + -1,-32768, 39,-32768,-32768, 320,-32768,-32768,-32768,-32768, + 340,-32768, -372, 56, 161, -96,-32768, 333,-32768,-32768, +-32768,-32768,-32768, 36, -7,-32768,-32768, 21,-32768,-32768 }; -/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing - STATE-NUM. */ -#define YYPACT_NINF -383 -static const short int yypact[] = -{ - -383, 48, 136, 517, -383, -383, -383, -383, -383, -383, - -383, 27, 36, -383, -383, -17, -383, -383, 46, -21, - -3, 3, -383, 27, 73, -383, -383, -383, 879, -24, - -383, -383, 113, -383, -383, -383, -383, 20, 51, 60, - -383, 21, 879, -13, -13, -383, -383, -383, -383, -383, - 62, -383, -383, -383, -383, -383, -383, -383, -383, -383, - -383, -383, -383, -383, -383, 156, 162, 164, 480, -383, - 113, 76, -383, -383, -25, -383, -383, -383, -383, -383, - 992, -383, 149, 37, 170, 157, -383, -383, -383, -383, - 900, 941, -383, 81, 83, -383, -383, -25, 34, 87, - 643, -383, -383, 900, -383, 130, 999, 32, 243, 27, - -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, - -383, -383, -383, -383, -383, -383, 900, 900, 900, 900, - 900, 900, 900, -383, -383, 900, 900, 900, 900, 900, - 900, 900, -383, 27, -383, 22, -383, -383, -383, -383, - -383, -383, -383, -82, -383, 122, 148, 184, 153, 185, - 159, 186, 161, 187, 191, 193, 167, 197, 195, 380, - -383, 900, 900, -383, 900, 680, -383, 97, 114, 549, - -383, -383, 62, -383, 549, 549, -383, -383, -383, -383, - -383, -383, -383, -383, -383, -383, 549, 879, 108, 109, - -383, 549, 118, 111, 183, 116, 117, 119, 121, 549, - 549, 549, 124, 879, 900, 900, -383, 196, -383, -383, - -383, -383, -383, -383, -383, -383, -383, -383, 123, 132, - 135, 742, 941, 501, 208, 137, 144, 145, 147, -383, - -383, -84, -12, -25, -383, 113, -383, 155, 154, 779, - -383, -383, -383, -383, -383, -383, -383, -383, 941, -383, - -383, -383, -383, 158, -383, 160, 549, 235, 247, 173, - 549, 165, 900, 900, 900, 900, 900, 174, 175, 176, - 900, 549, 549, 177, -383, 941, 941, 941, -383, -383, - -54, -57, -383, 42, -383, 941, 941, 941, 941, -383, - -383, -383, -383, 842, -383, -383, -30, 244, 246, 172, - 549, 549, 900, -383, 179, 549, -383, 180, -383, -383, - -383, 549, 549, 549, -383, 194, -383, 900, 173, 241, - 181, -383, 941, -383, -383, 190, 198, 199, 202, -383, - -383, -383, 549, 549, 900, -383, -383, -383, 205, 549, - 206, 900, -383, -383, -383, 900, 549, 192, 900, 941, - -383, 941, 941, 941, 941, 207, 203, 205, 200, 900, - 214, 549, -383, 218, -383, -383, 220, 212, 222, 223, - 224, 225, 281, 17, 268, -383, -383, 226, -383, -383, - 941, -383, -383, -383, -383, 549, -383, 54, 53, 303, - -383, 228, -383, 227, -383, 54, 549, -383, 307, 231, - 265, 549, 310, 311, -383, 549, 549, -383, -383 -}; -/* YYPGOTO[NTERM-NUM]. */ -static const short int yypgoto[] = -{ - -383, -383, -383, 254, 262, 264, 272, -106, -105, -372, - -383, 313, 333, -101, -38, -383, -28, -383, -56, 255, - -383, -90, 188, -223, 312, -383, -383, -383, -383, -383, - -383, -383, 4, -383, 55, -383, -383, 331, -383, -383, - -383, -383, 356, -383, -382, 25, 28, -81, -383, 345, - -383, -383, -383, -383, -383, 49, 7, -383, -383, 35, - -383, -383 -}; +#define YYLAST 1340 -/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If - positive, shift that token. If negative, reduce the rule which - number is the opposite. If zero, do what YYDEFACT says. - If YYTABLE_NINF, syntax error. */ -#define YYTABLE_NINF -108 -static const short int yytable[] = -{ - 72, 170, 194, 195, 87, 77, 30, 21, 197, 291, - 293, 397, 97, 33, 72, 403, 299, 42, 216, 88, - 89, 101, 180, 409, 217, 183, 405, 186, 187, 188, - 189, 190, 191, 192, 193, 306, 21, 7, 8, 9, - 10, 184, 213, 43, 97, 333, 331, 200, 4, 332, - 204, 205, 332, 185, 206, 207, 208, 251, 252, 30, - 212, 253, 154, 186, 187, 188, 189, 190, 191, 192, - 193, -48, 341, 41, 99, 179, 332, 47, 179, 78, - 101, 254, 255, 24, 25, 26, 27, 34, 148, 149, - 300, 256, 257, 101, 37, 38, 39, 45, 198, 199, - 179, 201, 202, 179, 179, 214, 215, 179, 179, 179, - 209, 210, 211, 179, 82, 241, 242, 396, 243, 85, - 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, - 122, 123, 124, 125, 283, 16, -107, 17, 173, 228, - 174, 229, 230, 133, 134, 83, 334, 245, 332, 218, - 219, -25, -25, 404, 84, 258, -24, -24, -49, 266, - 92, 5, -23, -23, -22, -22, 93, 6, 94, 72, - 220, 221, 100, 147, 151, 281, 7, 8, 9, 10, - 171, 152, 172, 175, 181, 72, 282, 179, -29, -28, - -27, -26, 317, 243, 240, 328, 329, 330, -32, 324, - -33, 223, 224, 249, 261, 335, 336, 337, 338, 261, - 261, 250, 263, 264, 267, 268, 270, 271, 272, 285, - 284, 261, 273, 274, 265, 275, 261, 276, 286, 269, - 280, 287, 294, 295, 261, 261, 261, 277, 278, 279, - 296, 297, 360, 298, 316, 179, 318, 319, 320, 301, - 310, 304, 179, 186, 187, 188, 189, 190, 191, 192, - 193, 303, 311, 315, 307, 342, 308, 343, 344, 377, - 372, 378, 379, 380, 381, 245, 358, 194, 195, 312, - 321, 322, 323, 327, 179, 349, 351, 359, 385, 375, - 355, 261, 194, 195, 309, 261, 361, 384, 314, 356, - 401, 383, 395, 399, 362, 363, 261, 261, 364, 325, - 326, 369, 371, 382, 386, 388, 179, 389, 390, 391, - 392, 393, 394, 179, 406, 407, 400, 179, 411, 413, - 376, 415, 416, 408, 138, 261, 261, 412, 345, 346, - 261, 179, 139, 350, 140, 80, 261, 261, 261, 352, - 353, 354, 141, 44, 46, 177, 91, 239, 340, 22, - 36, 348, 373, 357, 0, 0, 0, 261, 261, 0, - 365, 366, 0, 0, 261, 0, 0, 370, 0, 0, - 0, 261, 0, 0, 374, 48, 49, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 261, 0, 0, 387, - 0, 0, 16, 0, 17, 0, 225, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 226, 227, 0, - 261, 0, 0, 402, 0, 0, 0, 0, 0, 0, - 0, 261, 0, 0, 410, 0, 261, 0, 0, 414, - 261, 261, 0, 417, 418, 0, 112, 113, 114, 115, - 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, - 0, 0, 0, 0, 0, 228, 0, 229, 230, 133, - 134, 0, 0, 0, 0, 0, 0, 0, 231, 0, - 0, 232, 0, 233, 0, 48, 49, 234, 95, 51, - 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, - 62, 63, 16, 0, 17, 0, 48, 49, 0, 95, - 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, - 165, 62, 63, 16, 64, 17, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, -35, 0, 16, - 0, 17, 0, 0, 0, 64, 0, 0, 6, -35, - -35, 0, 251, 252, 48, 49, 253, -35, -35, -35, - -35, 0, 0, -35, 18, 0, 0, 0, 0, 0, - 19, 16, 0, 17, 0, 65, 254, 255, 66, 0, - 0, 67, 0, 68, 96, 0, 256, 257, 0, 0, - 0, 0, 0, 0, 0, 0, 65, 0, 0, 66, - 0, 0, 67, 0, 68, 292, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 112, 113, 114, 115, 116, - 117, 118, 119, 120, 121, 122, 123, 124, 125, 0, - 0, 0, 0, 0, 228, 0, 229, 230, 133, 134, - 0, 0, 0, 0, 0, 0, 0, 0, 48, 49, - 258, 95, 51, 52, 53, 54, 55, 56, 57, 58, - 59, 60, 61, 62, 63, 16, 0, 17, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 176, - 0, 0, 0, 0, 0, 48, 49, 64, 95, 51, - 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, - 62, 63, 16, 0, 17, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 244, 0, 0, 0, - 0, 0, 0, 0, 64, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 65, 0, - 0, 66, 0, 0, 67, 0, 68, 48, 49, 0, - 95, 155, 156, 157, 158, 159, 160, 161, 162, 163, - 164, 165, 62, 63, 16, 0, 17, 0, 0, 0, - 0, 0, 0, 0, 0, 65, 0, 0, 66, 0, - 0, 67, 0, 68, 48, 49, 64, 95, 51, 52, - 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, - 63, 16, 0, 17, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 305, 0, 0, 0, 0, - 0, 0, 0, 64, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 65, 0, 0, - 66, 0, 288, 67, 0, 68, 0, 48, 49, 0, - 95, 51, 52, 53, 54, 55, 56, 57, 58, 59, - 60, 61, 62, 63, 16, 0, 17, 0, 0, 0, - 0, 0, 0, 0, 65, 0, 0, 66, 339, 0, - 67, 0, 68, 0, 48, 49, 64, 50, 51, 52, - 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, - 63, 16, 0, 17, 0, 48, 49, 0, 95, 51, - 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, - 62, 63, 16, 64, 17, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 65, 0, 0, - 66, 0, 0, 67, 64, 68, 48, 49, 0, 95, - 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, - 165, 62, 63, 16, 0, 17, 0, 0, 0, 0, - 0, 0, 0, 0, 65, 0, 0, 66, 0, 0, - 67, 0, 68, 0, 0, 64, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 65, 0, 0, 66, 0, - 0, 67, 0, 68, 48, 49, 0, 182, 51, 52, - 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, - 63, 16, 0, 17, 0, 0, 102, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 65, 103, 0, 66, - 0, 0, 67, 64, 68, 0, 104, 105, 0, 0, - 0, 0, 106, 107, 108, 109, 110, 111, 112, 113, - 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, - 124, 125, 126, 127, 128, 0, 0, 129, 130, 131, - 132, 133, 134, 135, 136, 137, 0, 0, 0, 0, - 0, 0, 0, 0, 65, 0, 0, 66, 0, 0, - 67, 0, 68 -}; -static const short int yycheck[] = -{ - 28, 91, 108, 108, 42, 29, 23, 3, 109, 232, - 233, 383, 68, 30, 42, 397, 100, 20, 100, 32, - 33, 105, 103, 405, 106, 106, 398, 10, 11, 12, - 13, 14, 15, 16, 17, 258, 32, 40, 41, 42, - 43, 9, 143, 46, 100, 102, 100, 128, 0, 106, - 131, 132, 106, 21, 135, 136, 137, 3, 4, 23, - 141, 7, 90, 10, 11, 12, 13, 14, 15, 16, - 17, 96, 102, 94, 70, 103, 106, 4, 106, 103, - 105, 27, 28, 56, 57, 58, 59, 104, 51, 52, - 102, 37, 38, 105, 48, 49, 50, 94, 126, 127, - 128, 129, 130, 131, 132, 83, 84, 135, 136, 137, - 138, 139, 140, 141, 94, 171, 172, 100, 174, 98, - 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, - 76, 77, 78, 79, 215, 22, 0, 24, 104, 85, - 106, 87, 88, 89, 90, 94, 104, 175, 106, 27, - 28, 3, 4, 100, 94, 101, 3, 4, 96, 197, - 4, 25, 3, 4, 3, 4, 4, 31, 4, 197, - 3, 4, 96, 24, 4, 213, 40, 41, 42, 43, - 99, 24, 99, 96, 54, 213, 214, 215, 4, 4, - 4, 4, 273, 249, 169, 285, 286, 287, 7, 280, - 7, 4, 7, 106, 179, 295, 296, 297, 298, 184, - 185, 97, 184, 185, 106, 106, 98, 106, 35, 96, - 24, 196, 106, 106, 196, 106, 201, 106, 96, 201, - 106, 96, 24, 96, 209, 210, 211, 209, 210, 211, - 96, 96, 332, 96, 272, 273, 274, 275, 276, 245, - 15, 97, 280, 10, 11, 12, 13, 14, 15, 16, - 17, 106, 15, 98, 106, 21, 106, 21, 96, 359, - 351, 361, 362, 363, 364, 303, 35, 383, 383, 106, - 106, 106, 106, 106, 312, 106, 106, 106, 369, 97, - 96, 266, 398, 398, 266, 270, 106, 97, 270, 327, - 390, 98, 21, 35, 106, 106, 281, 282, 106, 281, - 282, 106, 106, 106, 100, 97, 344, 97, 106, 97, - 97, 97, 97, 351, 21, 97, 100, 355, 21, 64, - 358, 21, 21, 106, 80, 310, 311, 106, 310, 311, - 315, 369, 80, 315, 80, 32, 321, 322, 323, 321, - 322, 323, 80, 20, 23, 100, 44, 169, 303, 3, - 15, 312, 355, 328, -1, -1, -1, 342, 343, -1, - 342, 343, -1, -1, 349, -1, -1, 349, -1, -1, - -1, 356, -1, -1, 356, 5, 6, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 371, -1, -1, 371, - -1, -1, 22, -1, 24, -1, 26, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 37, 38, -1, - 395, -1, -1, 395, -1, -1, -1, -1, -1, -1, - -1, 406, -1, -1, 406, -1, 411, -1, -1, 411, - 415, 416, -1, 415, 416, -1, 66, 67, 68, 69, - 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, - -1, -1, -1, -1, -1, 85, -1, 87, 88, 89, - 90, -1, -1, -1, -1, -1, -1, -1, 98, -1, - -1, 101, -1, 103, -1, 5, 6, 107, 8, 9, - 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, - 20, 21, 22, -1, 24, -1, 5, 6, -1, 8, - 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, - 19, 20, 21, 22, 44, 24, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 20, -1, 22, - -1, 24, -1, -1, -1, 44, -1, -1, 31, 32, - 33, -1, 3, 4, 5, 6, 7, 40, 41, 42, - 43, -1, -1, 46, 47, -1, -1, -1, -1, -1, - 53, 22, -1, 24, -1, 95, 27, 28, 98, -1, - -1, 101, -1, 103, 104, -1, 37, 38, -1, -1, - -1, -1, -1, -1, -1, -1, 95, -1, -1, 98, - -1, -1, 101, -1, 103, 104, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 66, 67, 68, 69, 70, - 71, 72, 73, 74, 75, 76, 77, 78, 79, -1, - -1, -1, -1, -1, 85, -1, 87, 88, 89, 90, - -1, -1, -1, -1, -1, -1, -1, -1, 5, 6, - 101, 8, 9, 10, 11, 12, 13, 14, 15, 16, - 17, 18, 19, 20, 21, 22, -1, 24, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 36, - -1, -1, -1, -1, -1, 5, 6, 44, 8, 9, - 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, - 20, 21, 22, -1, 24, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 36, -1, -1, -1, - -1, -1, -1, -1, 44, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 95, -1, - -1, 98, -1, -1, 101, -1, 103, 5, 6, -1, - 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, - 18, 19, 20, 21, 22, -1, 24, -1, -1, -1, - -1, -1, -1, -1, -1, 95, -1, -1, 98, -1, - -1, 101, -1, 103, 5, 6, 44, 8, 9, 10, - 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, - 21, 22, -1, 24, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 36, -1, -1, -1, -1, - -1, -1, -1, 44, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 95, -1, -1, - 98, -1, 100, 101, -1, 103, -1, 5, 6, -1, - 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, - 18, 19, 20, 21, 22, -1, 24, -1, -1, -1, - -1, -1, -1, -1, 95, -1, -1, 98, 36, -1, - 101, -1, 103, -1, 5, 6, 44, 8, 9, 10, - 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, - 21, 22, -1, 24, -1, 5, 6, -1, 8, 9, - 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, - 20, 21, 22, 44, 24, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 95, -1, -1, - 98, -1, -1, 101, 44, 103, 5, 6, -1, 8, - 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, - 19, 20, 21, 22, -1, 24, -1, -1, -1, -1, - -1, -1, -1, -1, 95, -1, -1, 98, -1, -1, - 101, -1, 103, -1, -1, 44, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 95, -1, -1, 98, -1, - -1, 101, -1, 103, 5, 6, -1, 8, 9, 10, - 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, - 21, 22, -1, 24, -1, -1, 34, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 95, 45, -1, 98, - -1, -1, 101, 44, 103, -1, 54, 55, -1, -1, - -1, -1, 60, 61, 62, 63, 64, 65, 66, 67, - 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, - 78, 79, 80, 81, 82, -1, -1, 85, 86, 87, - 88, 89, 90, 91, 92, 93, -1, -1, -1, -1, - -1, -1, -1, -1, 95, -1, -1, 98, -1, -1, - 101, -1, 103 +static const short yytable[] = { 70, + 19, 85, 28, 192, 178, 168, 193, 181, 308, 31, + 75, 95, 310, 70, 184, 185, 186, 187, 188, 189, + 190, 191, 289, 291, 403, 195, 297, 39, 19, 198, + 411, 99, 202, 203, 28, 182, 204, 205, 206, -106, + 417, 413, 210, 95, 43, 333, 309, 183, 304, 332, + 311, 184, 185, 186, 187, 188, 189, 190, 191, 211, + -47, 152, 86, 87, 3, 214, 97, 40, 45, 99, + 4, 215, 331, 298, 177, 80, 99, 177, 332, 5, + 6, 7, 8, 83, 32, 76, 81, 5, 6, 7, + 8, 341, 14, 41, 15, 332, 82, 196, 197, 177, + 199, 200, 177, 177, -48, 402, 177, 177, 177, 207, + 208, 209, 177, 98, 239, 240, 281, 241, 22, 23, + 24, 25, 146, 147, 46, 47, 90, 93, 49, 50, + 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, + 61, 14, 412, 15, 216, 217, 243, 184, 185, 186, + 187, 188, 189, 190, 191, 91, 264, 35, 36, 37, + 212, 213, 171, 62, 172, 334, 92, 332, 70, -24, + -24, 145, 279, 149, 317, -23, -23, -22, -22, -21, + -21, 324, 218, 219, 70, 280, 177, 150, 169, 170, + 173, 179, 241, -28, -27, -26, -25, 221, 247, 328, + 329, 330, -31, -32, 222, 248, 265, 266, 269, 335, + 336, 337, 338, 268, 302, 63, 270, 271, 64, 272, + 273, 65, 238, 66, 94, 274, 282, 278, 283, 284, + 285, 292, 259, 301, 305, 293, 294, 259, 259, 295, + 296, 299, 306, 316, 177, 318, 319, 320, 362, 259, + 342, 177, 312, 315, 259, 321, 376, 322, 343, 323, + 327, 344, 259, 259, 259, 346, 348, 357, 351, 360, + 389, 379, 353, 388, 243, 361, 391, 381, 363, 382, + 383, 384, 385, 390, 192, 177, 401, 193, 405, 364, + 365, 366, 371, 372, 373, 375, 406, 407, 387, 414, + 358, 192, 392, 394, 193, 386, 395, 396, 397, 398, + 399, 400, 409, 415, 421, 408, 416, 177, 419, 259, + 423, 424, 428, 259, 429, 420, 177, 42, 136, 137, + 177, 78, 138, 380, 259, 259, 139, 175, 89, 340, + 44, 20, 261, 262, 237, 34, 177, 350, 359, 377, + 0, 0, 0, 0, 263, 0, 0, 0, 0, 267, + -34, 0, 14, 259, 15, 259, 0, 275, 276, 277, + 259, 4, -34, -34, 0, 0, 259, 259, 259, 0, + -34, -34, -34, -34, 0, 0, -34, 16, 0, 0, + 0, 0, 0, 0, 17, 0, 0, 259, 259, 0, + 0, 0, 0, 0, 0, 0, 259, 0, 0, 0, + 0, 0, 0, 259, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 307, 0, 0, 0, 314, 0, + 259, 0, 0, 0, 0, 0, 0, 0, 0, 325, + 326, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 259, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 345, 259, + 347, 0, 0, 0, 259, 352, 0, 0, 259, 259, + 0, 354, 355, 356, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 367, 368, 0, 0, 0, 0, 0, 0, + 0, 374, 0, 0, 0, 0, 0, 0, 378, 0, + 0, 0, 0, 46, 47, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 393, 0, 0, 0, 0, + 14, 0, 15, 0, 223, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 224, 225, 0, 0, 0, + 0, 410, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 418, 0, 0, 0, 0, 422, + 0, 0, 0, 425, 426, 110, 111, 112, 113, 114, + 115, 116, 117, 118, 119, 120, 121, 122, 123, 0, + 0, 0, 0, 0, 226, 0, 227, 228, 131, 132, + 0, 0, 0, 0, 0, 0, 0, 229, 0, 0, + 230, 0, 231, 0, 46, 47, 232, 93, 153, 154, + 155, 156, 157, 158, 159, 160, 161, 162, 163, 60, + 61, 14, 0, 15, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 62, 249, 250, 46, 47, 251, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 14, 0, 15, 0, 0, 252, 253, + 0, 0, 0, 0, 0, 0, 0, 0, 254, 255, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 63, 0, 0, 64, 0, + 0, 65, 0, 66, 290, 0, 0, 0, 110, 111, + 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, + 122, 123, 249, 250, 0, 0, 251, 226, 0, 227, + 228, 131, 132, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 256, 0, 0, 252, 253, 0, 0, + 0, 0, 0, 0, 0, 0, 254, 255, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 110, 111, 112, 113, + 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, + 0, 0, 0, 0, 0, 226, 0, 227, 228, 131, + 132, 0, 0, 0, 0, 0, 0, 0, 0, 46, + 47, 256, 93, 49, 50, 51, 52, 53, 54, 55, + 56, 57, 58, 59, 60, 61, 14, 0, 15, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 174, 0, 0, 0, 0, 0, 46, 47, 62, 93, + 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, + 59, 60, 61, 14, 0, 15, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 242, 0, 0, + 0, 0, 0, 0, 0, 62, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 63, 0, 0, 64, 0, 0, 65, 0, 66, 46, + 47, 0, 93, 153, 154, 155, 156, 157, 158, 159, + 160, 161, 162, 163, 60, 61, 14, 0, 15, 0, + 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, + 64, 0, 0, 65, 0, 66, 46, 47, 62, 93, + 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, + 59, 60, 61, 14, 0, 15, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 303, 0, 0, + 0, 0, 0, 0, 0, 62, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 63, 0, 0, 64, 0, 286, 65, 0, 66, 0, + 46, 47, 0, 93, 49, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 59, 60, 61, 14, 0, 15, + 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, + 64, 339, 0, 65, 0, 66, 0, 46, 47, 62, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, + 58, 59, 60, 61, 14, 0, 15, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 62, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 63, 0, 0, 64, 0, 0, 65, 0, 66, + 46, 47, 0, 93, 49, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 59, 60, 61, 14, 0, 15, + 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, + 0, 64, 0, 0, 65, 0, 66, 46, 47, 62, + 93, 153, 154, 155, 156, 157, 158, 159, 160, 161, + 162, 163, 60, 61, 14, 0, 15, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 62, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 63, 0, 0, 64, 0, 0, 65, 0, 66, + 46, 47, 0, 180, 49, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 59, 60, 61, 14, 0, 15, + 0, 100, 0, 0, 0, 0, 0, 0, 63, 0, + 0, 64, 101, 0, 65, 0, 66, 0, 0, 62, + 0, 0, 102, 103, 0, 0, 0, 0, 104, 105, + 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, + 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, + 126, 0, 0, 127, 128, 129, 130, 131, 132, 133, + 134, 135, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 63, 0, 0, 64, 0, 0, 65, 0, 66 }; -/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing - symbol of state STATE-NUM. */ -static const unsigned char yystos[] = -{ - 0, 133, 134, 135, 0, 25, 31, 40, 41, 42, - 43, 120, 147, 149, 150, 156, 22, 24, 47, 53, - 119, 140, 150, 151, 56, 57, 58, 59, 121, 145, - 23, 157, 158, 30, 104, 148, 157, 48, 49, 50, - 137, 94, 20, 46, 120, 94, 145, 4, 5, 6, - 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, - 18, 19, 20, 21, 44, 95, 98, 101, 103, 109, - 122, 123, 124, 125, 126, 140, 153, 29, 103, 146, - 119, 161, 94, 94, 94, 98, 138, 122, 32, 33, - 132, 132, 4, 4, 4, 8, 104, 126, 127, 140, - 96, 105, 34, 45, 54, 55, 60, 61, 62, 63, - 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, - 74, 75, 76, 77, 78, 79, 80, 81, 82, 85, - 86, 87, 88, 89, 90, 91, 92, 93, 111, 112, - 113, 114, 159, 165, 166, 168, 169, 24, 51, 52, - 136, 4, 24, 139, 124, 9, 10, 11, 12, 13, - 14, 15, 16, 17, 18, 19, 115, 116, 118, 124, - 129, 99, 99, 104, 106, 96, 36, 127, 128, 124, - 155, 54, 8, 155, 9, 21, 10, 11, 12, 13, - 14, 15, 16, 17, 115, 116, 117, 121, 124, 124, - 155, 124, 124, 162, 155, 155, 155, 155, 155, 124, - 124, 124, 155, 121, 83, 84, 100, 106, 27, 28, - 3, 4, 110, 4, 7, 26, 37, 38, 85, 87, - 88, 98, 101, 103, 107, 111, 112, 113, 114, 130, - 153, 126, 126, 126, 36, 124, 142, 143, 144, 106, - 97, 3, 4, 7, 27, 28, 37, 38, 101, 130, - 152, 153, 154, 154, 154, 154, 122, 106, 106, 154, - 98, 106, 35, 106, 106, 106, 106, 154, 154, 154, - 106, 122, 124, 155, 24, 96, 96, 96, 100, 129, - 131, 131, 104, 131, 24, 96, 96, 96, 96, 100, - 102, 140, 141, 106, 97, 36, 131, 106, 106, 154, - 15, 15, 106, 167, 154, 98, 124, 155, 124, 124, - 124, 106, 106, 106, 155, 154, 154, 106, 129, 129, - 129, 100, 106, 102, 104, 129, 129, 129, 129, 36, - 142, 102, 21, 21, 96, 154, 154, 155, 163, 106, - 154, 106, 154, 154, 154, 96, 124, 167, 35, 106, - 129, 106, 106, 106, 106, 154, 154, 163, 164, 106, - 154, 106, 155, 164, 154, 97, 124, 129, 129, 129, - 129, 129, 106, 98, 97, 155, 100, 154, 97, 97, - 106, 97, 97, 97, 97, 21, 100, 117, 160, 35, - 100, 129, 154, 152, 100, 117, 21, 97, 106, 152, - 154, 21, 106, 64, 154, 21, 21, 154, 154 +static const short yycheck[] = { 26, + 2, 40, 23, 106, 101, 89, 106, 104, 15, 30, + 29, 66, 15, 40, 10, 11, 12, 13, 14, 15, + 16, 17, 230, 231, 387, 107, 101, 95, 30, 126, + 403, 106, 129, 130, 23, 9, 133, 134, 135, 0, + 413, 404, 139, 98, 95, 103, 53, 21, 256, 107, + 53, 10, 11, 12, 13, 14, 15, 16, 17, 141, + 97, 88, 32, 33, 25, 101, 68, 20, 4, 106, + 31, 107, 101, 103, 101, 95, 106, 104, 107, 40, + 41, 42, 43, 99, 105, 104, 95, 40, 41, 42, + 43, 103, 22, 46, 24, 107, 95, 124, 125, 126, + 127, 128, 129, 130, 97, 101, 133, 134, 135, 136, + 137, 138, 139, 97, 169, 170, 213, 172, 57, 58, + 59, 60, 51, 52, 5, 6, 4, 8, 9, 10, + 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, + 21, 22, 101, 24, 27, 28, 173, 10, 11, 12, + 13, 14, 15, 16, 17, 4, 195, 48, 49, 50, + 84, 85, 105, 44, 107, 105, 4, 107, 195, 3, + 4, 24, 211, 4, 271, 3, 4, 3, 4, 3, + 4, 278, 3, 4, 211, 212, 213, 24, 100, 100, + 97, 55, 247, 4, 4, 4, 4, 4, 107, 283, + 284, 285, 7, 7, 7, 98, 107, 107, 107, 293, + 294, 295, 296, 99, 98, 96, 35, 107, 99, 107, + 107, 102, 167, 104, 105, 107, 24, 107, 97, 97, + 97, 24, 177, 107, 107, 97, 97, 182, 183, 97, + 97, 243, 107, 270, 271, 272, 273, 274, 332, 194, + 21, 278, 107, 99, 199, 107, 353, 107, 21, 107, + 107, 97, 207, 208, 209, 4, 4, 97, 107, 35, + 53, 98, 107, 98, 301, 107, 373, 361, 107, 363, + 364, 365, 366, 53, 387, 312, 21, 387, 35, 107, + 107, 107, 107, 107, 107, 107, 4, 4, 99, 21, + 327, 404, 101, 98, 404, 107, 98, 107, 98, 98, + 98, 98, 396, 98, 65, 101, 107, 344, 21, 264, + 21, 21, 0, 268, 0, 107, 353, 18, 78, 78, + 357, 30, 78, 360, 279, 280, 78, 98, 42, 301, + 21, 2, 182, 183, 167, 13, 373, 312, 328, 357, + -1, -1, -1, -1, 194, -1, -1, -1, -1, 199, + 20, -1, 22, 308, 24, 310, -1, 207, 208, 209, + 315, 31, 32, 33, -1, -1, 321, 322, 323, -1, + 40, 41, 42, 43, -1, -1, 46, 47, -1, -1, + -1, -1, -1, -1, 54, -1, -1, 342, 343, -1, + -1, -1, -1, -1, -1, -1, 351, -1, -1, -1, + -1, -1, -1, 358, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 264, -1, -1, -1, 268, -1, + 375, -1, -1, -1, -1, -1, -1, -1, -1, 279, + 280, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 401, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 308, 414, + 310, -1, -1, -1, 419, 315, -1, -1, 423, 424, + -1, 321, 322, 323, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 342, 343, -1, -1, -1, -1, -1, -1, + -1, 351, -1, -1, -1, -1, -1, -1, 358, -1, + -1, -1, -1, 5, 6, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 375, -1, -1, -1, -1, + 22, -1, 24, -1, 26, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 37, 38, -1, -1, -1, + -1, 401, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 414, -1, -1, -1, -1, 419, + -1, -1, -1, 423, 424, 67, 68, 69, 70, 71, + 72, 73, 74, 75, 76, 77, 78, 79, 80, -1, + -1, -1, -1, -1, 86, -1, 88, 89, 90, 91, + -1, -1, -1, -1, -1, -1, -1, 99, -1, -1, + 102, -1, 104, -1, 5, 6, 108, 8, 9, 10, + 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, + 21, 22, -1, 24, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 44, 3, 4, 5, 6, 7, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 22, -1, 24, -1, -1, 27, 28, + -1, -1, -1, -1, -1, -1, -1, -1, 37, 38, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 96, -1, -1, 99, -1, + -1, 102, -1, 104, 105, -1, -1, -1, 67, 68, + 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, + 79, 80, 3, 4, -1, -1, 7, 86, -1, 88, + 89, 90, 91, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 102, -1, -1, 27, 28, -1, -1, + -1, -1, -1, -1, -1, -1, 37, 38, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 67, 68, 69, 70, + 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, + -1, -1, -1, -1, -1, 86, -1, 88, 89, 90, + 91, -1, -1, -1, -1, -1, -1, -1, -1, 5, + 6, 102, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, -1, 24, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 36, -1, -1, -1, -1, -1, 5, 6, 44, 8, + 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, + 19, 20, 21, 22, -1, 24, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 36, -1, -1, + -1, -1, -1, -1, -1, 44, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 96, -1, -1, 99, -1, -1, 102, -1, 104, 5, + 6, -1, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, -1, 24, -1, + -1, -1, -1, -1, -1, -1, -1, 96, -1, -1, + 99, -1, -1, 102, -1, 104, 5, 6, 44, 8, + 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, + 19, 20, 21, 22, -1, 24, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 36, -1, -1, + -1, -1, -1, -1, -1, 44, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 96, -1, -1, 99, -1, 101, 102, -1, 104, -1, + 5, 6, -1, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, -1, 24, + -1, -1, -1, -1, -1, -1, -1, 96, -1, -1, + 99, 36, -1, 102, -1, 104, -1, 5, 6, 44, + 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, + 18, 19, 20, 21, 22, -1, 24, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 44, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 96, -1, -1, 99, -1, -1, 102, -1, 104, + 5, 6, -1, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, -1, 24, + -1, -1, -1, -1, -1, -1, -1, -1, 96, -1, + -1, 99, -1, -1, 102, -1, 104, 5, 6, 44, + 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, + 18, 19, 20, 21, 22, -1, 24, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 44, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 96, -1, -1, 99, -1, -1, 102, -1, 104, + 5, 6, -1, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, -1, 24, + -1, 34, -1, -1, -1, -1, -1, -1, 96, -1, + -1, 99, 45, -1, 102, -1, 104, -1, -1, 44, + -1, -1, 55, 56, -1, -1, -1, -1, 61, 62, + 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, + 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, + 83, -1, -1, 86, 87, 88, 89, 90, 91, 92, + 93, 94, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 96, -1, -1, 99, -1, -1, 102, -1, 104 }; +/* -*-C-*- Note some compilers choke on comments on `#line' lines. */ +#line 3 "/usr/share/bison.simple" +/* This file comes from bison-1.28. */ -#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) -# define YYSIZE_T __SIZE_TYPE__ -#endif -#if ! defined (YYSIZE_T) && defined (size_t) -# define YYSIZE_T size_t -#endif -#if ! defined (YYSIZE_T) -# if defined (__STDC__) || defined (__cplusplus) -# include /* INFRINGES ON USER NAME SPACE */ -# define YYSIZE_T size_t -# endif -#endif -#if ! defined (YYSIZE_T) -# define YYSIZE_T unsigned int +/* Skeleton output parser for bison, + Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* As a special exception, when this file is copied by Bison into a + Bison output file, you may use that output file without restriction. + This special exception was added by the Free Software Foundation + in version 1.24 of Bison. */ + +/* This is the parser code that is written into each bison parser + when the %semantic_parser declaration is not specified in the grammar. + It was written by Richard Stallman by simplifying the hairy parser + used when %semantic_parser is specified. */ + +#ifndef YYSTACK_USE_ALLOCA +#ifdef alloca +#define YYSTACK_USE_ALLOCA +#else /* alloca not defined */ +#ifdef __GNUC__ +#define YYSTACK_USE_ALLOCA +#define alloca __builtin_alloca +#else /* not GNU C. */ +#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) || (defined (__sun) && defined (__i386)) +#define YYSTACK_USE_ALLOCA +#include +#else /* not sparc */ +/* We think this test detects Watcom and Microsoft C. */ +/* This used to test MSDOS, but that is a bad idea + since that symbol is in the user namespace. */ +#if (defined (_MSDOS) || defined (_MSDOS_)) && !defined (__TURBOC__) +#if 0 /* No need for malloc.h, which pollutes the namespace; + instead, just don't use alloca. */ +#include +#endif +#else /* not MSDOS, or __TURBOC__ */ +#if defined(_AIX) +/* I don't know what this was needed for, but it pollutes the namespace. + So I turned it off. rms, 2 May 1997. */ +/* #include */ + #pragma alloca +#define YYSTACK_USE_ALLOCA +#else /* not MSDOS, or __TURBOC__, or _AIX */ +#if 0 +#ifdef __hpux /* haible at ilog.fr says this works for HPUX 9.05 and up, + and on HPUX 10. Eventually we can turn this on. */ +#define YYSTACK_USE_ALLOCA +#define alloca __builtin_alloca +#endif /* __hpux */ +#endif +#endif /* not _AIX */ +#endif /* not MSDOS, or __TURBOC__ */ +#endif /* not sparc */ +#endif /* not GNU C */ +#endif /* alloca not defined */ +#endif /* YYSTACK_USE_ALLOCA not defined */ + +#ifdef YYSTACK_USE_ALLOCA +#define YYSTACK_ALLOC alloca +#else +#define YYSTACK_ALLOC malloc #endif +/* Note: there must be only one dollar sign in this file. + It is replaced by the list of actions, each action + as one case of the switch. */ + #define yyerrok (yyerrstatus = 0) #define yyclearin (yychar = YYEMPTY) -#define YYEMPTY (-2) +#define YYEMPTY -2 #define YYEOF 0 - #define YYACCEPT goto yyacceptlab -#define YYABORT goto yyabortlab -#define YYERROR goto yyerrorlab - - -/* Like YYERROR except do call yyerror. This remains here temporarily - to ease the transition to the new meaning of YYERROR, for GCC. +#define YYABORT goto yyabortlab +#define YYERROR goto yyerrlab1 +/* Like YYERROR except do call yyerror. + This remains here temporarily to ease the + transition to the new meaning of YYERROR, for GCC. Once GCC version 2 has supplanted version 1, this can go. */ - #define YYFAIL goto yyerrlab - #define YYRECOVERING() (!!yyerrstatus) - -#define YYBACKUP(Token, Value) \ +#define YYBACKUP(token, value) \ do \ if (yychar == YYEMPTY && yylen == 1) \ - { \ - yychar = (Token); \ - yylval = (Value); \ - yytoken = YYTRANSLATE (yychar); \ + { yychar = (token), yylval = (value); \ + yychar1 = YYTRANSLATE (yychar); \ YYPOPSTACK; \ goto yybackup; \ } \ else \ - { \ - yyerror ("syntax error: cannot back up");\ - YYERROR; \ - } \ + { yyerror ("syntax error: cannot back up"); YYERROR; } \ while (0) #define YYTERROR 1 #define YYERRCODE 256 -/* YYLLOC_DEFAULT -- Compute the default location (before the actions - are run). */ - -#ifndef YYLLOC_DEFAULT -# define YYLLOC_DEFAULT(Current, Rhs, N) \ - ((Current).first_line = (Rhs)[1].first_line, \ - (Current).first_column = (Rhs)[1].first_column, \ - (Current).last_line = (Rhs)[N].last_line, \ - (Current).last_column = (Rhs)[N].last_column) +#ifndef YYPURE +#define YYLEX yylex() #endif -/* YYLEX -- calling `yylex' with the right arguments. */ - +#ifdef YYPURE +#ifdef YYLSP_NEEDED #ifdef YYLEX_PARAM -# define YYLEX yylex (YYLEX_PARAM) +#define YYLEX yylex(&yylval, &yylloc, YYLEX_PARAM) #else -# define YYLEX yylex () +#define YYLEX yylex(&yylval, &yylloc) #endif - -/* Enable debugging if requested. */ -#if YYDEBUG - -# ifndef YYFPRINTF -# include /* INFRINGES ON USER NAME SPACE */ -# define YYFPRINTF fprintf -# endif - -# define YYDPRINTF(Args) \ -do { \ - if (yydebug) \ - YYFPRINTF Args; \ -} while (0) - -# define YYDSYMPRINT(Args) \ -do { \ - if (yydebug) \ - yysymprint Args; \ -} while (0) - -# define YYDSYMPRINTF(Title, Token, Value, Location) \ -do { \ - if (yydebug) \ - { \ - YYFPRINTF (stderr, "%s ", Title); \ - yysymprint (stderr, \ - Token, Value); \ - YYFPRINTF (stderr, "\n"); \ - } \ -} while (0) - -/*------------------------------------------------------------------. -| yy_stack_print -- Print the state stack from its BOTTOM up to its | -| TOP (included). | -`------------------------------------------------------------------*/ - -#if defined (__STDC__) || defined (__cplusplus) -static void -yy_stack_print (short int *bottom, short int *top) +#else /* not YYLSP_NEEDED */ +#ifdef YYLEX_PARAM +#define YYLEX yylex(&yylval, YYLEX_PARAM) #else -static void -yy_stack_print (bottom, top) - short int *bottom; - short int *top; +#define YYLEX yylex(&yylval) +#endif +#endif /* not YYLSP_NEEDED */ #endif -{ - YYFPRINTF (stderr, "Stack now"); - for (/* Nothing. */; bottom <= top; ++bottom) - YYFPRINTF (stderr, " %d", *bottom); - YYFPRINTF (stderr, "\n"); -} -# define YY_STACK_PRINT(Bottom, Top) \ -do { \ - if (yydebug) \ - yy_stack_print ((Bottom), (Top)); \ -} while (0) +/* If nonreentrant, generate the variables here */ +#ifndef YYPURE -/*------------------------------------------------. -| Report that the YYRULE is going to be reduced. | -`------------------------------------------------*/ +int yychar; /* the lookahead symbol */ +YYSTYPE yylval; /* the semantic value of the */ + /* lookahead symbol */ -#if defined (__STDC__) || defined (__cplusplus) -static void -yy_reduce_print (int yyrule) -#else -static void -yy_reduce_print (yyrule) - int yyrule; +#ifdef YYLSP_NEEDED +YYLTYPE yylloc; /* location data for the lookahead */ + /* symbol */ #endif -{ - int yyi; - unsigned int yylno = yyrline[yyrule]; - YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ", - yyrule - 1, yylno); - /* Print the symbols being reduced, and their result. */ - for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++) - YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]); - YYFPRINTF (stderr, "-> %s\n", yytname [yyr1[yyrule]]); -} -# define YY_REDUCE_PRINT(Rule) \ -do { \ - if (yydebug) \ - yy_reduce_print (Rule); \ -} while (0) - -/* Nonzero means print parse trace. It is left uninitialized so that - multiple parsers can coexist. */ -int yydebug; -#else /* !YYDEBUG */ -# define YYDPRINTF(Args) -# define YYDSYMPRINT(Args) -# define YYDSYMPRINTF(Title, Token, Value, Location) -# define YY_STACK_PRINT(Bottom, Top) -# define YY_REDUCE_PRINT(Rule) -#endif /* !YYDEBUG */ +int yynerrs; /* number of parse errors so far */ +#endif /* not YYPURE */ + +#if YYDEBUG != 0 +int yydebug; /* nonzero means print parse trace */ +/* Since this is uninitialized, it does not stop multiple parsers + from coexisting. */ +#endif +/* YYINITDEPTH indicates the initial size of the parser's stacks */ -/* YYINITDEPTH -- initial size of the parser's stacks. */ #ifndef YYINITDEPTH -# define YYINITDEPTH 200 +#define YYINITDEPTH 200 #endif -/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only - if the built-in stack extension method is used). - - Do not make this value too large; the results are undefined if - SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH) - evaluated with infinite-precision integer arithmetic. */ +/* YYMAXDEPTH is the maximum size the stacks can grow to + (effective only if the built-in stack extension method is used). */ -#if defined (YYMAXDEPTH) && YYMAXDEPTH == 0 -# undef YYMAXDEPTH +#if YYMAXDEPTH == 0 +#undef YYMAXDEPTH #endif #ifndef YYMAXDEPTH -# define YYMAXDEPTH 10000 +#define YYMAXDEPTH 10000 #endif - +/* Define __yy_memcpy. Note that the size argument + should be passed with type unsigned int, because that is what the non-GCC + definitions require. With GCC, __builtin_memcpy takes an arg + of type size_t, but it can handle unsigned int. */ + +#if __GNUC__ > 1 /* GNU C and GNU C++ define this. */ +#define __yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT) +#else /* not GNU C or C++ */ +#ifndef __cplusplus -#if YYERROR_VERBOSE - -# ifndef yystrlen -# if defined (__GLIBC__) && defined (_STRING_H) -# define yystrlen strlen -# else -/* Return the length of YYSTR. */ -static YYSIZE_T -# if defined (__STDC__) || defined (__cplusplus) -yystrlen (const char *yystr) -# else -yystrlen (yystr) - const char *yystr; -# endif -{ - register const char *yys = yystr; - - while (*yys++ != '\0') - continue; - - return yys - yystr - 1; -} -# endif -# endif - -# ifndef yystpcpy -# if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE) -# define yystpcpy stpcpy -# else -/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in - YYDEST. */ -static char * -# if defined (__STDC__) || defined (__cplusplus) -yystpcpy (char *yydest, const char *yysrc) -# else -yystpcpy (yydest, yysrc) - char *yydest; - const char *yysrc; -# endif +/* This is the most reliable way to avoid incompatibilities + in available built-in functions on various systems. */ +static void +__yy_memcpy (to, from, count) + char *to; + char *from; + unsigned int count; { - register char *yyd = yydest; - register const char *yys = yysrc; + register char *f = from; + register char *t = to; + register int i = count; - while ((*yyd++ = *yys++) != '\0') - continue; - - return yyd - 1; + while (i-- > 0) + *t++ = *f++; } -# endif -# endif - -#endif /* !YYERROR_VERBOSE */ - - -#if YYDEBUG -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ +#else /* __cplusplus */ -#if defined (__STDC__) || defined (__cplusplus) +/* This is the most reliable way to avoid incompatibilities + in available built-in functions on various systems. */ static void -yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep) -#else -static void -yysymprint (yyoutput, yytype, yyvaluep) - FILE *yyoutput; - int yytype; - YYSTYPE *yyvaluep; -#endif +__yy_memcpy (char *to, char *from, unsigned int count) { - /* Pacify ``unused variable'' warnings. */ - (void) yyvaluep; - - if (yytype < YYNTOKENS) - { - YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); -# ifdef YYPRINT - YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); -# endif - } - else - YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); + register char *t = to; + register char *f = from; + register int i = count; - switch (yytype) - { - default: - break; - } - YYFPRINTF (yyoutput, ")"); + while (i-- > 0) + *t++ = *f++; } -#endif /* ! YYDEBUG */ -/*-----------------------------------------------. -| Release the memory associated to this symbol. | -`-----------------------------------------------*/ - -#if defined (__STDC__) || defined (__cplusplus) -static void -yydestruct (int yytype, YYSTYPE *yyvaluep) -#else -static void -yydestruct (yytype, yyvaluep) - int yytype; - YYSTYPE *yyvaluep; #endif -{ - /* Pacify ``unused variable'' warnings. */ - (void) yyvaluep; - - switch (yytype) - { - - default: - break; - } -} +#endif +#line 217 "/usr/share/bison.simple" -/* Prevent warnings from -Wmissing-prototypes. */ +/* The user can define YYPARSE_PARAM as the name of an argument to be passed + into yyparse. The argument should have type void *. + It should actually point to an object. + Grammar actions can access the variable by casting it + to the proper pointer type. */ #ifdef YYPARSE_PARAM -# if defined (__STDC__) || defined (__cplusplus) -int yyparse (void *YYPARSE_PARAM); -# else -int yyparse (); -# endif -#else /* ! YYPARSE_PARAM */ -#if defined (__STDC__) || defined (__cplusplus) -int yyparse (void); -#else -int yyparse (); -#endif -#endif /* ! YYPARSE_PARAM */ - - - -/* The lookahead symbol. */ -int yychar; - -/* The semantic value of the lookahead symbol. */ -YYSTYPE yylval; - -/* Number of syntax errors so far. */ -int yynerrs; - - - -/*----------. -| yyparse. | -`----------*/ +#ifdef __cplusplus +#define YYPARSE_PARAM_ARG void *YYPARSE_PARAM +#define YYPARSE_PARAM_DECL +#else /* not __cplusplus */ +#define YYPARSE_PARAM_ARG YYPARSE_PARAM +#define YYPARSE_PARAM_DECL void *YYPARSE_PARAM; +#endif /* not __cplusplus */ +#else /* not YYPARSE_PARAM */ +#define YYPARSE_PARAM_ARG +#define YYPARSE_PARAM_DECL +#endif /* not YYPARSE_PARAM */ +/* Prevent warning if -Wstrict-prototypes. */ +#ifdef __GNUC__ #ifdef YYPARSE_PARAM -# if defined (__STDC__) || defined (__cplusplus) -int yyparse (void *YYPARSE_PARAM) -# else -int yyparse (YYPARSE_PARAM) - void *YYPARSE_PARAM; -# endif -#else /* ! YYPARSE_PARAM */ -#if defined (__STDC__) || defined (__cplusplus) -int -yyparse (void) +int yyparse (void *); #else -int -yyparse () - +int yyparse (void); #endif #endif + +int +yyparse(YYPARSE_PARAM_ARG) + YYPARSE_PARAM_DECL { - register int yystate; register int yyn; - int yyresult; - /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus; - /* Lookahead token as an internal (translated) token number. */ - int yytoken = 0; - - /* Three stacks and their tools: - `yyss': related to states, - `yyvs': related to semantic values, - `yyls': related to locations. - - Refer to the stacks thru separate pointers, to allow yyoverflow - to reallocate them elsewhere. */ - - /* The state stack. */ - short int yyssa[YYINITDEPTH]; - short int *yyss = yyssa; - register short int *yyssp; - - /* The semantic value stack. */ - YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs = yyvsa; + register short *yyssp; register YYSTYPE *yyvsp; + int yyerrstatus; /* number of tokens to shift before error messages enabled */ + int yychar1 = 0; /* lookahead token as an internal (translated) token number */ + + short yyssa[YYINITDEPTH]; /* the state stack */ + YYSTYPE yyvsa[YYINITDEPTH]; /* the semantic value stack */ + short *yyss = yyssa; /* refer to the stacks thru separate pointers */ + YYSTYPE *yyvs = yyvsa; /* to allow yyoverflow to reallocate them elsewhere */ +#ifdef YYLSP_NEEDED + YYLTYPE yylsa[YYINITDEPTH]; /* the location stack */ + YYLTYPE *yyls = yylsa; + YYLTYPE *yylsp; +#define YYPOPSTACK (yyvsp--, yyssp--, yylsp--) +#else #define YYPOPSTACK (yyvsp--, yyssp--) +#endif - YYSIZE_T yystacksize = YYINITDEPTH; + int yystacksize = YYINITDEPTH; + int yyfree_stacks = 0; - /* The variables used to return semantic value and location from the - action routines. */ - YYSTYPE yyval; +#ifdef YYPURE + int yychar; + YYSTYPE yylval; + int yynerrs; +#ifdef YYLSP_NEEDED + YYLTYPE yylloc; +#endif +#endif + YYSTYPE yyval; /* the variable used to return */ + /* semantic values from the action */ + /* routines */ - /* When reducing, the number of symbols on the RHS of the reduced - rule. */ int yylen; - YYDPRINTF ((stderr, "Starting parse\n")); +#if YYDEBUG != 0 + if (yydebug) + fprintf(stderr, "Starting parse\n"); +#endif yystate = 0; yyerrstatus = 0; @@ -2398,97 +1949,110 @@ so that they stay on the same level as the state stack. The wasted elements are never initialized. */ - yyssp = yyss; + yyssp = yyss - 1; yyvsp = yyvs; +#ifdef YYLSP_NEEDED + yylsp = yyls; +#endif +/* Push a new state, which is found in yystate . */ +/* In all cases, when you get here, the value and location stacks + have just been pushed. so pushing a state here evens the stacks. */ +yynewstate: - goto yysetstate; - -/*------------------------------------------------------------. -| yynewstate -- Push a new state, which is found in yystate. | -`------------------------------------------------------------*/ - yynewstate: - /* In all cases, when you get here, the value and location stacks - have just been pushed. so pushing a state here evens the stacks. - */ - yyssp++; - - yysetstate: - *yyssp = yystate; + *++yyssp = yystate; - if (yyss + yystacksize - 1 <= yyssp) + if (yyssp >= yyss + yystacksize - 1) { + /* Give user a chance to reallocate the stack */ + /* Use copies of these so that the &'s don't force the real ones into memory. */ + YYSTYPE *yyvs1 = yyvs; + short *yyss1 = yyss; +#ifdef YYLSP_NEEDED + YYLTYPE *yyls1 = yyls; +#endif + /* Get the current used size of the three stacks, in elements. */ - YYSIZE_T yysize = yyssp - yyss + 1; + int size = yyssp - yyss + 1; #ifdef yyoverflow - { - /* Give user a chance to reallocate the stack. Use copies of - these so that the &'s don't force the real ones into - memory. */ - YYSTYPE *yyvs1 = yyvs; - short int *yyss1 = yyss; - - - /* Each stack pointer address is followed by the size of the - data in use in that stack, in bytes. This used to be a - conditional around just the two extra args, but that might - be undefined if yyoverflow is a macro. */ - yyoverflow ("parser stack overflow", - &yyss1, yysize * sizeof (*yyssp), - &yyvs1, yysize * sizeof (*yyvsp), - - &yystacksize); + /* Each stack pointer address is followed by the size of + the data in use in that stack, in bytes. */ +#ifdef YYLSP_NEEDED + /* This used to be a conditional around just the two extra args, + but that might be undefined if yyoverflow is a macro. */ + yyoverflow("parser stack overflow", + &yyss1, size * sizeof (*yyssp), + &yyvs1, size * sizeof (*yyvsp), + &yyls1, size * sizeof (*yylsp), + &yystacksize); +#else + yyoverflow("parser stack overflow", + &yyss1, size * sizeof (*yyssp), + &yyvs1, size * sizeof (*yyvsp), + &yystacksize); +#endif - yyss = yyss1; - yyvs = yyvs1; - } + yyss = yyss1; yyvs = yyvs1; +#ifdef YYLSP_NEEDED + yyls = yyls1; +#endif #else /* no yyoverflow */ -# ifndef YYSTACK_RELOCATE - goto yyoverflowlab; -# else /* Extend the stack our own way. */ - if (YYMAXDEPTH <= yystacksize) - goto yyoverflowlab; + if (yystacksize >= YYMAXDEPTH) + { + yyerror("parser stack overflow"); + if (yyfree_stacks) + { + free (yyss); + free (yyvs); +#ifdef YYLSP_NEEDED + free (yyls); +#endif + } + return 2; + } yystacksize *= 2; - if (YYMAXDEPTH < yystacksize) + if (yystacksize > YYMAXDEPTH) yystacksize = YYMAXDEPTH; - - { - short int *yyss1 = yyss; - union yyalloc *yyptr = - (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); - if (! yyptr) - goto yyoverflowlab; - YYSTACK_RELOCATE (yyss); - YYSTACK_RELOCATE (yyvs); - -# undef YYSTACK_RELOCATE - if (yyss1 != yyssa) - YYSTACK_FREE (yyss1); - } -# endif +#ifndef YYSTACK_USE_ALLOCA + yyfree_stacks = 1; +#endif + yyss = (short *) YYSTACK_ALLOC (yystacksize * sizeof (*yyssp)); + __yy_memcpy ((char *)yyss, (char *)yyss1, + size * (unsigned int) sizeof (*yyssp)); + yyvs = (YYSTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yyvsp)); + __yy_memcpy ((char *)yyvs, (char *)yyvs1, + size * (unsigned int) sizeof (*yyvsp)); +#ifdef YYLSP_NEEDED + yyls = (YYLTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yylsp)); + __yy_memcpy ((char *)yyls, (char *)yyls1, + size * (unsigned int) sizeof (*yylsp)); +#endif #endif /* no yyoverflow */ - yyssp = yyss + yysize - 1; - yyvsp = yyvs + yysize - 1; - + yyssp = yyss + size - 1; + yyvsp = yyvs + size - 1; +#ifdef YYLSP_NEEDED + yylsp = yyls + size - 1; +#endif - YYDPRINTF ((stderr, "Stack size increased to %lu\n", - (unsigned long int) yystacksize)); +#if YYDEBUG != 0 + if (yydebug) + fprintf(stderr, "Stack size increased to %d\n", yystacksize); +#endif - if (yyss + yystacksize - 1 <= yyssp) + if (yyssp >= yyss + yystacksize - 1) YYABORT; } - YYDPRINTF ((stderr, "Entering state %d\n", yystate)); +#if YYDEBUG != 0 + if (yydebug) + fprintf(stderr, "Entering state %d\n", yystate); +#endif goto yybackup; - -/*-----------. -| yybackup. | -`-----------*/ -yybackup: + yybackup: /* Do appropriate processing given the current state. */ /* Read a lookahead token if we need one and don't already have one. */ @@ -2497,236 +2061,251 @@ /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; - if (yyn == YYPACT_NINF) + if (yyn == YYFLAG) goto yydefault; /* Not known => get a lookahead token if don't already have one. */ - /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ + /* yychar is either YYEMPTY or YYEOF + or a valid token in external form. */ + if (yychar == YYEMPTY) { - YYDPRINTF ((stderr, "Reading a token: ")); +#if YYDEBUG != 0 + if (yydebug) + fprintf(stderr, "Reading a token: "); +#endif yychar = YYLEX; } - if (yychar <= YYEOF) + /* Convert token to internal form (in yychar1) for indexing tables with */ + + if (yychar <= 0) /* This means end of input. */ { - yychar = yytoken = YYEOF; - YYDPRINTF ((stderr, "Now at end of input.\n")); + yychar1 = 0; + yychar = YYEOF; /* Don't call YYLEX any more */ + +#if YYDEBUG != 0 + if (yydebug) + fprintf(stderr, "Now at end of input.\n"); +#endif } else { - yytoken = YYTRANSLATE (yychar); - YYDSYMPRINTF ("Next token is", yytoken, &yylval, &yylloc); + yychar1 = YYTRANSLATE(yychar); + +#if YYDEBUG != 0 + if (yydebug) + { + fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]); + /* Give the individual parser a way to print the precise meaning + of a token, for further debugging info. */ +#ifdef YYPRINT + YYPRINT (stderr, yychar, yylval); +#endif + fprintf (stderr, ")\n"); + } +#endif } - /* If the proper action on seeing token YYTOKEN is to reduce or to - detect an error, take that action. */ - yyn += yytoken; - if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) + yyn += yychar1; + if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1) goto yydefault; + yyn = yytable[yyn]; - if (yyn <= 0) + + /* yyn is what to do for this token type in this state. + Negative => reduce, -yyn is rule number. + Positive => shift, yyn is new state. + New state is final state => don't bother to shift, + just return success. + 0, or most negative number => error. */ + + if (yyn < 0) { - if (yyn == 0 || yyn == YYTABLE_NINF) + if (yyn == YYFLAG) goto yyerrlab; yyn = -yyn; goto yyreduce; } + else if (yyn == 0) + goto yyerrlab; if (yyn == YYFINAL) YYACCEPT; /* Shift the lookahead token. */ - YYDPRINTF ((stderr, "Shifting token %s, ", yytname[yytoken])); + +#if YYDEBUG != 0 + if (yydebug) + fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]); +#endif /* Discard the token being shifted unless it is eof. */ if (yychar != YYEOF) yychar = YYEMPTY; *++yyvsp = yylval; +#ifdef YYLSP_NEEDED + *++yylsp = yylloc; +#endif - - /* Count tokens shifted since error; after three, turn off error - status. */ - if (yyerrstatus) - yyerrstatus--; + /* count tokens shifted since error; after three, turn off error status. */ + if (yyerrstatus) yyerrstatus--; yystate = yyn; goto yynewstate; - -/*-----------------------------------------------------------. -| yydefault -- do the default action for the current state. | -`-----------------------------------------------------------*/ +/* Do the default action for the current state. */ yydefault: + yyn = yydefact[yystate]; if (yyn == 0) goto yyerrlab; - goto yyreduce; - -/*-----------------------------. -| yyreduce -- Do a reduction. | -`-----------------------------*/ +/* Do a reduction. yyn is the number of a rule to reduce with. */ yyreduce: - /* yyn is the number of a rule to reduce with. */ yylen = yyr2[yyn]; + if (yylen > 0) + yyval = yyvsp[1-yylen]; /* implement default value of the action */ + +#if YYDEBUG != 0 + if (yydebug) + { + int i; - /* If YYLEN is nonzero, implement the default value of the action: - `$$ = $1'. + fprintf (stderr, "Reducing via rule %d (line %d), ", + yyn, yyrline[yyn]); - Otherwise, the following line sets YYVAL to garbage. - This behavior is undocumented and Bison - users should not rely upon it. Assigning to YYVAL - unconditionally makes the parser a bit smaller, and it avoids a - GCC warning that YYVAL may be used uninitialized. */ - yyval = yyvsp[1-yylen]; + /* Print the symbols being reduced, and their result. */ + for (i = yyprhs[yyn]; yyrhs[i] > 0; i++) + fprintf (stderr, "%s ", yytname[yyrhs[i]]); + fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]); + } +#endif - YY_REDUCE_PRINT (yyn); - switch (yyn) - { - case 3: -#line 984 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { + switch (yyn) { + +case 2: +#line 984 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ if (yyvsp[0].UIntVal > (uint32_t)INT32_MAX) // Outside of my range! ThrowException("Value too large for type!"); yyval.SIntVal = (int32_t)yyvsp[0].UIntVal; -;} - break; - - case 5: -#line 992 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { +; + break;} +case 4: +#line 992 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ if (yyvsp[0].UInt64Val > (uint64_t)INT64_MAX) // Outside of my range! ThrowException("Value too large for type!"); yyval.SInt64Val = (int64_t)yyvsp[0].UInt64Val; -;} - break; - - case 34: -#line 1015 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { +; + break;} +case 33: +#line 1015 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.StrVal = yyvsp[-1].StrVal; - ;} - break; - - case 35: -#line 1018 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 34: +#line 1018 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.StrVal = 0; - ;} - break; - - case 36: -#line 1022 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { yyval.Linkage = GlobalValue::InternalLinkage; ;} - break; - - case 37: -#line 1023 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { yyval.Linkage = GlobalValue::LinkOnceLinkage; ;} - break; - - case 38: -#line 1024 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { yyval.Linkage = GlobalValue::WeakLinkage; ;} - break; - - case 39: -#line 1025 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { yyval.Linkage = GlobalValue::AppendingLinkage; ;} - break; - - case 40: -#line 1026 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { yyval.Linkage = GlobalValue::ExternalLinkage; ;} - break; - - case 41: -#line 1028 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { yyval.UIntVal = CallingConv::C; ;} - break; - - case 42: -#line 1029 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { yyval.UIntVal = CallingConv::C; ;} - break; - - case 43: -#line 1030 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { yyval.UIntVal = CallingConv::Fast; ;} - break; - - case 44: -#line 1031 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { yyval.UIntVal = CallingConv::Cold; ;} - break; - - case 45: -#line 1032 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 35: +#line 1022 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.Linkage = GlobalValue::InternalLinkage; ; + break;} +case 36: +#line 1023 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.Linkage = GlobalValue::LinkOnceLinkage; ; + break;} +case 37: +#line 1024 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.Linkage = GlobalValue::WeakLinkage; ; + break;} +case 38: +#line 1025 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.Linkage = GlobalValue::AppendingLinkage; ; + break;} +case 39: +#line 1026 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.Linkage = GlobalValue::ExternalLinkage; ; + break;} +case 40: +#line 1028 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.UIntVal = CallingConv::C; ; + break;} +case 41: +#line 1029 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.UIntVal = CallingConv::C; ; + break;} +case 42: +#line 1030 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.UIntVal = CallingConv::Fast; ; + break;} +case 43: +#line 1031 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.UIntVal = CallingConv::Cold; ; + break;} +case 44: +#line 1032 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ if ((unsigned)yyvsp[0].UInt64Val != yyvsp[0].UInt64Val) ThrowException("Calling conv too large!"); yyval.UIntVal = yyvsp[0].UInt64Val; - ;} - break; - - case 47: -#line 1045 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { yyval.TypeVal = new PATypeHolder(yyvsp[0].PrimType); ;} - break; - - case 49: -#line 1046 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { yyval.TypeVal = new PATypeHolder(yyvsp[0].PrimType); ;} - break; - - case 50: -#line 1048 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 46: +#line 1045 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.TypeVal = new PATypeHolder(yyvsp[0].PrimType); ; + break;} +case 48: +#line 1046 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.TypeVal = new PATypeHolder(yyvsp[0].PrimType); ; + break;} +case 49: +#line 1048 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ if (!UpRefs.empty()) ThrowException("Invalid upreference in type: " + (*yyvsp[0].TypeVal)->getDescription()); yyval.TypeVal = yyvsp[0].TypeVal; - ;} - break; - - case 64: -#line 1059 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 63: +#line 1059 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.TypeVal = new PATypeHolder(OpaqueType::get()); - ;} - break; - - case 65: -#line 1062 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 64: +#line 1062 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.TypeVal = new PATypeHolder(yyvsp[0].PrimType); - ;} - break; - - case 66: -#line 1065 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { // Named types are also simple types... + ; + break;} +case 65: +#line 1065 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ // Named types are also simple types... yyval.TypeVal = new PATypeHolder(getTypeVal(yyvsp[0].ValIDVal)); -;} - break; - - case 67: -#line 1071 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { // Type UpReference +; + break;} +case 66: +#line 1071 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ // Type UpReference if (yyvsp[0].UInt64Val > (uint64_t)~0U) ThrowException("Value out of range!"); OpaqueType *OT = OpaqueType::get(); // Use temporary placeholder UpRefs.push_back(UpRefRecord((unsigned)yyvsp[0].UInt64Val, OT)); // Add to vector... yyval.TypeVal = new PATypeHolder(OT); UR_OUT("New Upreference!\n"); - ;} - break; - - case 68: -#line 1078 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { // Function derived type? + ; + break;} +case 67: +#line 1078 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ // Function derived type? std::vector Params; for (std::list::iterator I = yyvsp[-1].TypeList->begin(), E = yyvsp[-1].TypeList->end(); I != E; ++I) @@ -2737,20 +2316,18 @@ yyval.TypeVal = new PATypeHolder(HandleUpRefs(FunctionType::get(*yyvsp[-3].TypeVal,Params,isVarArg))); delete yyvsp[-1].TypeList; // Delete the argument list delete yyvsp[-3].TypeVal; // Delete the return type handle - ;} - break; - - case 69: -#line 1090 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { // Sized array type? + ; + break;} +case 68: +#line 1090 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ // Sized array type? yyval.TypeVal = new PATypeHolder(HandleUpRefs(ArrayType::get(*yyvsp[-1].TypeVal, (unsigned)yyvsp[-3].UInt64Val))); delete yyvsp[-1].TypeVal; - ;} - break; - - case 70: -#line 1094 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { // Packed array type? + ; + break;} +case 69: +#line 1094 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ // Packed array type? const llvm::Type* ElemTy = yyvsp[-1].TypeVal->get(); if ((unsigned)yyvsp[-3].UInt64Val != yyvsp[-3].UInt64Val) { ThrowException("Unsigned result not equal to signed result"); @@ -2760,12 +2337,11 @@ } yyval.TypeVal = new PATypeHolder(HandleUpRefs(PackedType::get(*yyvsp[-1].TypeVal, (unsigned)yyvsp[-3].UInt64Val))); delete yyvsp[-1].TypeVal; - ;} - break; - - case 71: -#line 1105 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { // Structure type? + ; + break;} +case 70: +#line 1105 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ // Structure type? std::vector Elements; for (std::list::iterator I = yyvsp[-1].TypeList->begin(), E = yyvsp[-1].TypeList->end(); I != E; ++I) @@ -2773,63 +2349,55 @@ yyval.TypeVal = new PATypeHolder(HandleUpRefs(StructType::get(Elements))); delete yyvsp[-1].TypeList; - ;} - break; - - case 72: -#line 1114 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { // Empty structure type? + ; + break;} +case 71: +#line 1114 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ // Empty structure type? yyval.TypeVal = new PATypeHolder(StructType::get(std::vector())); - ;} - break; - - case 73: -#line 1117 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { // Pointer type? + ; + break;} +case 72: +#line 1117 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ // Pointer type? yyval.TypeVal = new PATypeHolder(HandleUpRefs(PointerType::get(*yyvsp[-1].TypeVal))); delete yyvsp[-1].TypeVal; - ;} - break; - - case 74: -#line 1125 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 73: +#line 1125 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.TypeList = new std::list(); yyval.TypeList->push_back(*yyvsp[0].TypeVal); delete yyvsp[0].TypeVal; - ;} - break; - - case 75: -#line 1129 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 74: +#line 1129 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ (yyval.TypeList=yyvsp[-2].TypeList)->push_back(*yyvsp[0].TypeVal); delete yyvsp[0].TypeVal; - ;} - break; - - case 77: -#line 1135 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 76: +#line 1135 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ (yyval.TypeList=yyvsp[-2].TypeList)->push_back(Type::VoidTy); - ;} - break; - - case 78: -#line 1138 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 77: +#line 1138 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ (yyval.TypeList = new std::list())->push_back(Type::VoidTy); - ;} - break; - - case 79: -#line 1141 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 78: +#line 1141 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.TypeList = new std::list(); - ;} - break; - - case 80: -#line 1151 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { // Nonempty unsized arr + ; + break;} +case 79: +#line 1151 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ // Nonempty unsized arr const ArrayType *ATy = dyn_cast(yyvsp[-3].TypeVal->get()); if (ATy == 0) ThrowException("Cannot make array constant with type: '" + @@ -2853,12 +2421,11 @@ yyval.ConstVal = ConstantArray::get(ATy, *yyvsp[-1].ConstVector); delete yyvsp[-3].TypeVal; delete yyvsp[-1].ConstVector; - ;} - break; - - case 81: -#line 1176 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 80: +#line 1176 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ const ArrayType *ATy = dyn_cast(yyvsp[-2].TypeVal->get()); if (ATy == 0) ThrowException("Cannot make array constant with type: '" + @@ -2870,12 +2437,11 @@ " arguments, but has size of " + itostr(NumElements) +"!"); yyval.ConstVal = ConstantArray::get(ATy, std::vector()); delete yyvsp[-2].TypeVal; - ;} - break; - - case 82: -#line 1189 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 81: +#line 1189 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ const ArrayType *ATy = dyn_cast(yyvsp[-2].TypeVal->get()); if (ATy == 0) ThrowException("Cannot make array constant with type: '" + @@ -2902,12 +2468,11 @@ free(yyvsp[0].StrVal); yyval.ConstVal = ConstantArray::get(ATy, Vals); delete yyvsp[-2].TypeVal; - ;} - break; - - case 83: -#line 1217 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { // Nonempty unsized arr + ; + break;} +case 82: +#line 1217 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ // Nonempty unsized arr const PackedType *PTy = dyn_cast(yyvsp[-3].TypeVal->get()); if (PTy == 0) ThrowException("Cannot make packed constant with type: '" + @@ -2931,12 +2496,11 @@ yyval.ConstVal = ConstantPacked::get(PTy, *yyvsp[-1].ConstVector); delete yyvsp[-3].TypeVal; delete yyvsp[-1].ConstVector; - ;} - break; - - case 84: -#line 1242 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 83: +#line 1242 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ const StructType *STy = dyn_cast(yyvsp[-3].TypeVal->get()); if (STy == 0) ThrowException("Cannot make struct constant with type: '" + @@ -2955,12 +2519,11 @@ yyval.ConstVal = ConstantStruct::get(STy, *yyvsp[-1].ConstVector); delete yyvsp[-3].TypeVal; delete yyvsp[-1].ConstVector; - ;} - break; - - case 85: -#line 1262 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 84: +#line 1262 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ const StructType *STy = dyn_cast(yyvsp[-2].TypeVal->get()); if (STy == 0) ThrowException("Cannot make struct constant with type: '" + @@ -2971,12 +2534,11 @@ yyval.ConstVal = ConstantStruct::get(STy, std::vector()); delete yyvsp[-2].TypeVal; - ;} - break; - - case 86: -#line 1274 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 85: +#line 1274 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ const PointerType *PTy = dyn_cast(yyvsp[-1].TypeVal->get()); if (PTy == 0) ThrowException("Cannot make null pointer constant with type: '" + @@ -2984,20 +2546,18 @@ yyval.ConstVal = ConstantPointerNull::get(PTy); delete yyvsp[-1].TypeVal; - ;} - break; - - case 87: -#line 1283 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 86: +#line 1283 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.ConstVal = UndefValue::get(yyvsp[-1].TypeVal->get()); delete yyvsp[-1].TypeVal; - ;} - break; - - case 88: -#line 1287 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 87: +#line 1287 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ const PointerType *Ty = dyn_cast(yyvsp[-1].TypeVal->get()); if (Ty == 0) ThrowException("Global const reference must be a pointer type!"); @@ -3055,74 +2615,66 @@ yyval.ConstVal = cast(V); delete yyvsp[-1].TypeVal; // Free the type handle - ;} - break; - - case 89: -#line 1346 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 88: +#line 1346 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ if (yyvsp[-1].TypeVal->get() != yyvsp[0].ConstVal->getType()) ThrowException("Mismatched types for constant expression!"); yyval.ConstVal = yyvsp[0].ConstVal; delete yyvsp[-1].TypeVal; - ;} - break; - - case 90: -#line 1352 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 89: +#line 1352 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ const Type *Ty = yyvsp[-1].TypeVal->get(); if (isa(Ty) || Ty == Type::LabelTy || isa(Ty)) ThrowException("Cannot create a null initialized value of this type!"); yyval.ConstVal = Constant::getNullValue(Ty); delete yyvsp[-1].TypeVal; - ;} - break; - - case 91: -#line 1360 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { // integral constants + ; + break;} +case 90: +#line 1360 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ // integral constants if (!ConstantSInt::isValueValidForType(yyvsp[-1].PrimType, yyvsp[0].SInt64Val)) ThrowException("Constant value doesn't fit in type!"); yyval.ConstVal = ConstantSInt::get(yyvsp[-1].PrimType, yyvsp[0].SInt64Val); - ;} - break; - - case 92: -#line 1365 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { // integral constants + ; + break;} +case 91: +#line 1365 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ // integral constants if (!ConstantUInt::isValueValidForType(yyvsp[-1].PrimType, yyvsp[0].UInt64Val)) ThrowException("Constant value doesn't fit in type!"); yyval.ConstVal = ConstantUInt::get(yyvsp[-1].PrimType, yyvsp[0].UInt64Val); - ;} - break; - - case 93: -#line 1370 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { // Boolean constants + ; + break;} +case 92: +#line 1370 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ // Boolean constants yyval.ConstVal = ConstantBool::True; - ;} - break; - - case 94: -#line 1373 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { // Boolean constants + ; + break;} +case 93: +#line 1373 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ // Boolean constants yyval.ConstVal = ConstantBool::False; - ;} - break; - - case 95: -#line 1376 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { // Float & Double constants + ; + break;} +case 94: +#line 1376 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ // Float & Double constants if (!ConstantFP::isValueValidForType(yyvsp[-1].PrimType, yyvsp[0].FPVal)) ThrowException("Floating point constant invalid for type!!"); yyval.ConstVal = ConstantFP::get(yyvsp[-1].PrimType, yyvsp[0].FPVal); - ;} - break; - - case 96: -#line 1383 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 95: +#line 1383 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ if (!yyvsp[-3].ConstVal->getType()->isFirstClassType()) ThrowException("cast constant expression from a non-primitive type: '" + yyvsp[-3].ConstVal->getType()->getDescription() + "'!"); @@ -3131,12 +2683,11 @@ yyvsp[-1].TypeVal->get()->getDescription() + "'!"); yyval.ConstVal = ConstantExpr::getCast(yyvsp[-3].ConstVal, yyvsp[-1].TypeVal->get()); delete yyvsp[-1].TypeVal; - ;} - break; - - case 97: -#line 1393 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 96: +#line 1393 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ if (!isa(yyvsp[-2].ConstVal->getType())) ThrowException("GetElementPtr requires a pointer operand!"); @@ -3166,23 +2717,21 @@ delete yyvsp[-1].ValueList; yyval.ConstVal = ConstantExpr::getGetElementPtr(yyvsp[-2].ConstVal, IdxVec); - ;} - break; - - case 98: -#line 1424 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 97: +#line 1424 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ if (yyvsp[-5].ConstVal->getType() != Type::BoolTy) ThrowException("Select condition must be of boolean type!"); if (yyvsp[-3].ConstVal->getType() != yyvsp[-1].ConstVal->getType()) ThrowException("Select operand types must match!"); yyval.ConstVal = ConstantExpr::getSelect(yyvsp[-5].ConstVal, yyvsp[-3].ConstVal, yyvsp[-1].ConstVal); - ;} - break; - - case 99: -#line 1431 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 98: +#line 1431 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ if (yyvsp[-3].ConstVal->getType() != yyvsp[-1].ConstVal->getType()) ThrowException("Binary operator types must match!"); // HACK: llvm 1.3 and earlier used to emit invalid pointer constant exprs. @@ -3202,98 +2751,86 @@ ConstantExpr::getCast(yyvsp[-1].ConstVal, IntPtrTy)); yyval.ConstVal = ConstantExpr::getCast(yyval.ConstVal, yyvsp[-3].ConstVal->getType()); } - ;} - break; - - case 100: -#line 1452 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 99: +#line 1452 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ if (yyvsp[-3].ConstVal->getType() != yyvsp[-1].ConstVal->getType()) ThrowException("Logical operator types must match!"); if (!yyvsp[-3].ConstVal->getType()->isIntegral()) ThrowException("Logical operands must have integral types!"); yyval.ConstVal = ConstantExpr::get(yyvsp[-5].BinaryOpVal, yyvsp[-3].ConstVal, yyvsp[-1].ConstVal); - ;} - break; - - case 101: -#line 1459 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 100: +#line 1459 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ if (yyvsp[-3].ConstVal->getType() != yyvsp[-1].ConstVal->getType()) ThrowException("setcc operand types must match!"); yyval.ConstVal = ConstantExpr::get(yyvsp[-5].BinaryOpVal, yyvsp[-3].ConstVal, yyvsp[-1].ConstVal); - ;} - break; - - case 102: -#line 1464 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 101: +#line 1464 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ if (yyvsp[-1].ConstVal->getType() != Type::UByteTy) ThrowException("Shift count for shift constant must be unsigned byte!"); if (!yyvsp[-3].ConstVal->getType()->isInteger()) ThrowException("Shift constant expression requires integer operand!"); yyval.ConstVal = ConstantExpr::get(yyvsp[-5].OtherOpVal, yyvsp[-3].ConstVal, yyvsp[-1].ConstVal); - ;} - break; - - case 103: -#line 1474 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 102: +#line 1474 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ (yyval.ConstVector = yyvsp[-2].ConstVector)->push_back(yyvsp[0].ConstVal); - ;} - break; - - case 104: -#line 1477 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 103: +#line 1477 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.ConstVector = new std::vector(); yyval.ConstVector->push_back(yyvsp[0].ConstVal); - ;} - break; - - case 105: -#line 1484 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { yyval.BoolVal = false; ;} - break; - - case 106: -#line 1484 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { yyval.BoolVal = true; ;} - break; - - case 107: -#line 1494 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 104: +#line 1484 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.BoolVal = false; ; + break;} +case 105: +#line 1484 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.BoolVal = true; ; + break;} +case 106: +#line 1494 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.ModuleVal = ParserResult = yyvsp[0].ModuleVal; CurModule.ModuleDone(); -;} - break; - - case 108: -#line 1501 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { +; + break;} +case 107: +#line 1501 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.ModuleVal = yyvsp[-1].ModuleVal; CurFun.FunctionDone(); - ;} - break; - - case 109: -#line 1505 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 108: +#line 1505 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.ModuleVal = yyvsp[-1].ModuleVal; - ;} - break; - - case 110: -#line 1508 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 109: +#line 1508 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.ModuleVal = yyvsp[-1].ModuleVal; - ;} - break; - - case 111: -#line 1511 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 110: +#line 1511 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.ModuleVal = CurModule.CurrentModule; // Emit an error if there are any unresolved types left. if (!CurModule.LateResolveTypes.empty()) { @@ -3303,12 +2840,11 @@ else ThrowException("Reference to an undefined type: #" + itostr(DID.Num)); } - ;} - break; - - case 112: -#line 1524 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 111: +#line 1524 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ // Eagerly resolve types. This is not an optimization, this is a // requirement that is due to the fact that we could have this: // @@ -3327,174 +2863,151 @@ } delete yyvsp[0].TypeVal; - ;} - break; - - case 113: -#line 1544 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { // Function prototypes can be in const pool - ;} - break; - - case 114: -#line 1546 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 112: +#line 1544 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ // Function prototypes can be in const pool + ; + break;} +case 113: +#line 1546 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ if (yyvsp[0].ConstVal == 0) ThrowException("Global value initializer is not a constant!"); ParseGlobalVariable(yyvsp[-3].StrVal, yyvsp[-2].Linkage, yyvsp[-1].BoolVal, yyvsp[0].ConstVal->getType(), yyvsp[0].ConstVal); - ;} - break; - - case 115: -#line 1550 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 114: +#line 1550 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ ParseGlobalVariable(yyvsp[-3].StrVal, GlobalValue::ExternalLinkage, yyvsp[-1].BoolVal, *yyvsp[0].TypeVal, 0); delete yyvsp[0].TypeVal; - ;} - break; - - case 116: -#line 1554 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { - ;} - break; - - case 117: -#line 1556 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { - ;} - break; - - case 118: -#line 1558 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { - ;} - break; - - case 119: -#line 1563 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { yyval.Endianness = Module::BigEndian; ;} - break; - - case 120: -#line 1564 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { yyval.Endianness = Module::LittleEndian; ;} - break; - - case 121: -#line 1566 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 115: +#line 1554 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ + ; + break;} +case 116: +#line 1556 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ + ; + break;} +case 117: +#line 1558 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ + ; + break;} +case 118: +#line 1563 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.Endianness = Module::BigEndian; ; + break;} +case 119: +#line 1564 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.Endianness = Module::LittleEndian; ; + break;} +case 120: +#line 1566 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ CurModule.CurrentModule->setEndianness(yyvsp[0].Endianness); - ;} - break; - - case 122: -#line 1569 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 121: +#line 1569 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ if (yyvsp[0].UInt64Val == 32) CurModule.CurrentModule->setPointerSize(Module::Pointer32); else if (yyvsp[0].UInt64Val == 64) CurModule.CurrentModule->setPointerSize(Module::Pointer64); else ThrowException("Invalid pointer size: '" + utostr(yyvsp[0].UInt64Val) + "'!"); - ;} - break; - - case 123: -#line 1577 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 122: +#line 1577 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ CurModule.CurrentModule->setTargetTriple(yyvsp[0].StrVal); free(yyvsp[0].StrVal); - ;} - break; - - case 125: -#line 1584 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 124: +#line 1584 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ CurModule.CurrentModule->addLibrary(yyvsp[0].StrVal); free(yyvsp[0].StrVal); - ;} - break; - - case 126: -#line 1588 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 125: +#line 1588 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ CurModule.CurrentModule->addLibrary(yyvsp[0].StrVal); free(yyvsp[0].StrVal); - ;} - break; - - case 127: -#line 1592 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { - ;} - break; - - case 131: -#line 1601 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { yyval.StrVal = 0; ;} - break; - - case 132: -#line 1603 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 126: +#line 1592 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ + ; + break;} +case 130: +#line 1601 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.StrVal = 0; ; + break;} +case 131: +#line 1603 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ if (*yyvsp[-1].TypeVal == Type::VoidTy) ThrowException("void typed arguments are invalid!"); yyval.ArgVal = new std::pair(yyvsp[-1].TypeVal, yyvsp[0].StrVal); -;} - break; - - case 133: -#line 1609 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { +; + break;} +case 132: +#line 1609 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.ArgList = yyvsp[-2].ArgList; yyvsp[-2].ArgList->push_back(*yyvsp[0].ArgVal); delete yyvsp[0].ArgVal; - ;} - break; - - case 134: -#line 1614 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 133: +#line 1614 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.ArgList = new std::vector >(); yyval.ArgList->push_back(*yyvsp[0].ArgVal); delete yyvsp[0].ArgVal; - ;} - break; - - case 135: -#line 1620 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 134: +#line 1620 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.ArgList = yyvsp[0].ArgList; - ;} - break; - - case 136: -#line 1623 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 135: +#line 1623 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.ArgList = yyvsp[-2].ArgList; yyval.ArgList->push_back(std::pair(new PATypeHolder(Type::VoidTy), 0)); - ;} - break; - - case 137: -#line 1628 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 136: +#line 1628 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.ArgList = new std::vector >(); yyval.ArgList->push_back(std::make_pair(new PATypeHolder(Type::VoidTy), (char*)0)); - ;} - break; - - case 138: -#line 1632 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 137: +#line 1632 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.ArgList = 0; - ;} - break; - - case 139: -#line 1636 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 138: +#line 1636 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ UnEscapeLexed(yyvsp[-3].StrVal); std::string FunctionName(yyvsp[-3].StrVal); free(yyvsp[-3].StrVal); // Free strdup'd memory! @@ -3572,92 +3085,80 @@ delete yyvsp[-1].ArgList; // We're now done with the argument list } -;} - break; - - case 142: -#line 1718 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { +; + break;} +case 141: +#line 1718 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.FunctionVal = CurFun.CurrentFunction; // Make sure that we keep track of the linkage type even if there was a // previous "declare". yyval.FunctionVal->setLinkage(yyvsp[-2].Linkage); -;} - break; - - case 145: -#line 1728 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { +; + break;} +case 144: +#line 1728 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.FunctionVal = yyvsp[-1].FunctionVal; -;} - break; - - case 146: -#line 1732 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { CurFun.isDeclare = true; ;} - break; - - case 147: -#line 1732 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { +; + break;} +case 145: +#line 1732 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ CurFun.isDeclare = true; ; + break;} +case 146: +#line 1732 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.FunctionVal = CurFun.CurrentFunction; CurFun.FunctionDone(); -;} - break; - - case 148: -#line 1741 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { // A reference to a direct constant +; + break;} +case 147: +#line 1741 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ // A reference to a direct constant yyval.ValIDVal = ValID::create(yyvsp[0].SInt64Val); - ;} - break; - - case 149: -#line 1744 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 148: +#line 1744 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.ValIDVal = ValID::create(yyvsp[0].UInt64Val); - ;} - break; - - case 150: -#line 1747 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { // Perhaps it's an FP constant? + ; + break;} +case 149: +#line 1747 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ // Perhaps it's an FP constant? yyval.ValIDVal = ValID::create(yyvsp[0].FPVal); - ;} - break; - - case 151: -#line 1750 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 150: +#line 1750 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.ValIDVal = ValID::create(ConstantBool::True); - ;} - break; - - case 152: -#line 1753 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 151: +#line 1753 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.ValIDVal = ValID::create(ConstantBool::False); - ;} - break; - - case 153: -#line 1756 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 152: +#line 1756 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.ValIDVal = ValID::createNull(); - ;} - break; - - case 154: -#line 1759 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 153: +#line 1759 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.ValIDVal = ValID::createUndef(); - ;} - break; - - case 155: -#line 1762 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { // Nonempty unsized packed vector + ; + break;} +case 154: +#line 1762 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ // Nonempty unsized packed vector const Type *ETy = (*yyvsp[-1].ConstVector)[0]->getType(); int NumElements = yyvsp[-1].ConstVector->size(); @@ -3680,74 +3181,65 @@ yyval.ValIDVal = ValID::create(ConstantPacked::get(pt, *yyvsp[-1].ConstVector)); delete PTy; delete yyvsp[-1].ConstVector; - ;} - break; - - case 156: -#line 1786 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 155: +#line 1786 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.ValIDVal = ValID::create(yyvsp[0].ConstVal); - ;} - break; - - case 157: -#line 1793 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { // Is it an integer reference...? + ; + break;} +case 156: +#line 1793 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ // Is it an integer reference...? yyval.ValIDVal = ValID::create(yyvsp[0].SIntVal); - ;} - break; - - case 158: -#line 1796 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { // Is it a named reference...? + ; + break;} +case 157: +#line 1796 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ // Is it a named reference...? yyval.ValIDVal = ValID::create(yyvsp[0].StrVal); - ;} - break; - - case 161: -#line 1807 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 160: +#line 1807 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.ValueVal = getVal(*yyvsp[-1].TypeVal, yyvsp[0].ValIDVal); delete yyvsp[-1].TypeVal; - ;} - break; - - case 162: -#line 1811 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 161: +#line 1811 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.FunctionVal = yyvsp[-1].FunctionVal; - ;} - break; - - case 163: -#line 1814 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { // Do not allow functions with 0 basic blocks + ; + break;} +case 162: +#line 1814 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ // Do not allow functions with 0 basic blocks yyval.FunctionVal = yyvsp[-1].FunctionVal; - ;} - break; - - case 164: -#line 1822 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 163: +#line 1822 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ setValueName(yyvsp[0].TermInstVal, yyvsp[-1].StrVal); InsertValue(yyvsp[0].TermInstVal); yyvsp[-2].BasicBlockVal->getInstList().push_back(yyvsp[0].TermInstVal); InsertValue(yyvsp[-2].BasicBlockVal); yyval.BasicBlockVal = yyvsp[-2].BasicBlockVal; - ;} - break; - - case 165: -#line 1831 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 164: +#line 1831 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyvsp[-1].BasicBlockVal->getInstList().push_back(yyvsp[0].InstVal); yyval.BasicBlockVal = yyvsp[-1].BasicBlockVal; - ;} - break; - - case 166: -#line 1835 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 165: +#line 1835 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.BasicBlockVal = CurBB = getBBVal(ValID::create((int)CurFun.NextBBNum++), true); // Make sure to move the basic block to the correct location in the @@ -3756,12 +3248,11 @@ Function::BasicBlockListType &BBL = CurFun.CurrentFunction->getBasicBlockList(); BBL.splice(BBL.end(), BBL, yyval.BasicBlockVal); - ;} - break; - - case 167: -#line 1845 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 166: +#line 1845 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.BasicBlockVal = CurBB = getBBVal(ValID::create(yyvsp[0].StrVal), true); // Make sure to move the basic block to the correct location in the @@ -3770,40 +3261,35 @@ Function::BasicBlockListType &BBL = CurFun.CurrentFunction->getBasicBlockList(); BBL.splice(BBL.end(), BBL, yyval.BasicBlockVal); - ;} - break; - - case 168: -#line 1856 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { // Return with a result... + ; + break;} +case 167: +#line 1856 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ // Return with a result... yyval.TermInstVal = new ReturnInst(yyvsp[0].ValueVal); - ;} - break; - - case 169: -#line 1859 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { // Return with no result... + ; + break;} +case 168: +#line 1859 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ // Return with no result... yyval.TermInstVal = new ReturnInst(); - ;} - break; - - case 170: -#line 1862 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { // Unconditional Branch... + ; + break;} +case 169: +#line 1862 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ // Unconditional Branch... yyval.TermInstVal = new BranchInst(getBBVal(yyvsp[0].ValIDVal)); - ;} - break; - - case 171: -#line 1865 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 170: +#line 1865 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.TermInstVal = new BranchInst(getBBVal(yyvsp[-3].ValIDVal), getBBVal(yyvsp[0].ValIDVal), getVal(Type::BoolTy, yyvsp[-6].ValIDVal)); - ;} - break; - - case 172: -#line 1868 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 171: +#line 1868 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ SwitchInst *S = new SwitchInst(getVal(yyvsp[-7].PrimType, yyvsp[-6].ValIDVal), getBBVal(yyvsp[-3].ValIDVal), yyvsp[-1].JumpTable->size()); yyval.TermInstVal = S; @@ -3816,20 +3302,18 @@ ThrowException("Switch case is constant, but not a simple integer!"); } delete yyvsp[-1].JumpTable; - ;} - break; - - case 173: -#line 1882 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 172: +#line 1882 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ SwitchInst *S = new SwitchInst(getVal(yyvsp[-6].PrimType, yyvsp[-5].ValIDVal), getBBVal(yyvsp[-2].ValIDVal), 0); yyval.TermInstVal = S; - ;} - break; - - case 174: -#line 1887 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 173: +#line 1887 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ const PointerType *PFTy; const FunctionType *Ty; @@ -3880,38 +3364,34 @@ delete yyvsp[-10].TypeVal; delete yyvsp[-7].ValueList; - ;} - break; - - case 175: -#line 1939 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 174: +#line 1939 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.TermInstVal = new UnwindInst(); - ;} - break; - - case 176: -#line 1942 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 175: +#line 1942 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.TermInstVal = new UnreachableInst(); - ;} - break; - - case 177: -#line 1948 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 176: +#line 1948 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.JumpTable = yyvsp[-5].JumpTable; Constant *V = cast(getValNonImprovising(yyvsp[-4].PrimType, yyvsp[-3].ValIDVal)); if (V == 0) ThrowException("May only switch on a constant pool value!"); yyval.JumpTable->push_back(std::make_pair(V, getBBVal(yyvsp[0].ValIDVal))); - ;} - break; - - case 178: -#line 1956 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 177: +#line 1956 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.JumpTable = new std::vector >(); Constant *V = cast(getValNonImprovising(yyvsp[-4].PrimType, yyvsp[-3].ValIDVal)); @@ -3919,75 +3399,66 @@ ThrowException("May only switch on a constant pool value!"); yyval.JumpTable->push_back(std::make_pair(V, getBBVal(yyvsp[0].ValIDVal))); - ;} - break; - - case 179: -#line 1966 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 178: +#line 1966 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ // Is this definition named?? if so, assign the name... setValueName(yyvsp[0].InstVal, yyvsp[-1].StrVal); InsertValue(yyvsp[0].InstVal); yyval.InstVal = yyvsp[0].InstVal; -;} - break; - - case 180: -#line 1973 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { // Used for PHI nodes +; + break;} +case 179: +#line 1973 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ // Used for PHI nodes yyval.PHIList = new std::list >(); yyval.PHIList->push_back(std::make_pair(getVal(*yyvsp[-5].TypeVal, yyvsp[-3].ValIDVal), getBBVal(yyvsp[-1].ValIDVal))); delete yyvsp[-5].TypeVal; - ;} - break; - - case 181: -#line 1978 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 180: +#line 1978 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.PHIList = yyvsp[-6].PHIList; yyvsp[-6].PHIList->push_back(std::make_pair(getVal(yyvsp[-6].PHIList->front().first->getType(), yyvsp[-3].ValIDVal), getBBVal(yyvsp[-1].ValIDVal))); - ;} - break; - - case 182: -#line 1985 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { // Used for call statements, and memory insts... + ; + break;} +case 181: +#line 1985 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ // Used for call statements, and memory insts... yyval.ValueList = new std::vector(); yyval.ValueList->push_back(yyvsp[0].ValueVal); - ;} - break; - - case 183: -#line 1989 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 182: +#line 1989 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.ValueList = yyvsp[-2].ValueList; yyvsp[-2].ValueList->push_back(yyvsp[0].ValueVal); - ;} - break; - - case 185: -#line 1995 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { yyval.ValueList = 0; ;} - break; - - case 186: -#line 1997 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 184: +#line 1995 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.ValueList = 0; ; + break;} +case 185: +#line 1997 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.BoolVal = true; - ;} - break; - - case 187: -#line 2000 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 186: +#line 2000 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.BoolVal = false; - ;} - break; - - case 188: -#line 2006 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 187: +#line 2006 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ if (!(*yyvsp[-3].TypeVal)->isInteger() && !(*yyvsp[-3].TypeVal)->isFloatingPoint() && !isa((*yyvsp[-3].TypeVal).get())) ThrowException( @@ -3998,24 +3469,22 @@ if (yyval.InstVal == 0) ThrowException("binary operator returned null!"); delete yyvsp[-3].TypeVal; - ;} - break; - - case 189: -#line 2018 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 188: +#line 2018 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ if (!(*yyvsp[-3].TypeVal)->isIntegral()) ThrowException("Logical operator requires integral operands!"); yyval.InstVal = BinaryOperator::create(yyvsp[-4].BinaryOpVal, getVal(*yyvsp[-3].TypeVal, yyvsp[-2].ValIDVal), getVal(*yyvsp[-3].TypeVal, yyvsp[0].ValIDVal)); if (yyval.InstVal == 0) ThrowException("binary operator returned null!"); delete yyvsp[-3].TypeVal; - ;} - break; - - case 190: -#line 2026 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 189: +#line 2026 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ if(isa((*yyvsp[-3].TypeVal).get())) { ThrowException( "PackedTypes currently not supported in setcc instructions!"); @@ -4024,12 +3493,11 @@ if (yyval.InstVal == 0) ThrowException("binary operator returned null!"); delete yyvsp[-3].TypeVal; - ;} - break; - - case 191: -#line 2036 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 190: +#line 2036 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ std::cerr << "WARNING: Use of eliminated 'not' instruction:" << " Replacing with 'xor'.\n"; @@ -4040,54 +3508,49 @@ yyval.InstVal = BinaryOperator::create(Instruction::Xor, yyvsp[0].ValueVal, Ones); if (yyval.InstVal == 0) ThrowException("Could not create a xor instruction!"); - ;} - break; - - case 192: -#line 2048 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 191: +#line 2048 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ if (yyvsp[0].ValueVal->getType() != Type::UByteTy) ThrowException("Shift amount must be ubyte!"); if (!yyvsp[-2].ValueVal->getType()->isInteger()) ThrowException("Shift constant expression requires integer operand!"); yyval.InstVal = new ShiftInst(yyvsp[-3].OtherOpVal, yyvsp[-2].ValueVal, yyvsp[0].ValueVal); - ;} - break; - - case 193: -#line 2055 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 192: +#line 2055 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ if (!yyvsp[0].TypeVal->get()->isFirstClassType()) ThrowException("cast instruction to a non-primitive type: '" + yyvsp[0].TypeVal->get()->getDescription() + "'!"); yyval.InstVal = new CastInst(yyvsp[-2].ValueVal, *yyvsp[0].TypeVal); delete yyvsp[0].TypeVal; - ;} - break; - - case 194: -#line 2062 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 193: +#line 2062 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ if (yyvsp[-4].ValueVal->getType() != Type::BoolTy) ThrowException("select condition must be boolean!"); if (yyvsp[-2].ValueVal->getType() != yyvsp[0].ValueVal->getType()) ThrowException("select value types should match!"); yyval.InstVal = new SelectInst(yyvsp[-4].ValueVal, yyvsp[-2].ValueVal, yyvsp[0].ValueVal); - ;} - break; - - case 195: -#line 2069 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 194: +#line 2069 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ NewVarArgs = true; yyval.InstVal = new VAArgInst(yyvsp[-2].ValueVal, *yyvsp[0].TypeVal); delete yyvsp[0].TypeVal; - ;} - break; - - case 196: -#line 2074 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 195: +#line 2074 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ ObsoleteVarArgs = true; const Type* ArgTy = yyvsp[-2].ValueVal->getType(); Function* NF = CurModule.CurrentModule-> @@ -4105,12 +3568,11 @@ CurBB->getInstList().push_back(new StoreInst(bar, foo)); yyval.InstVal = new VAArgInst(foo, *yyvsp[0].TypeVal); delete yyvsp[0].TypeVal; - ;} - break; - - case 197: -#line 2093 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 196: +#line 2093 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ ObsoleteVarArgs = true; const Type* ArgTy = yyvsp[-2].ValueVal->getType(); Function* NF = CurModule.CurrentModule-> @@ -4131,12 +3593,11 @@ CurBB->getInstList().push_back(tmp); yyval.InstVal = new LoadInst(foo); delete yyvsp[0].TypeVal; - ;} - break; - - case 198: -#line 2115 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 197: +#line 2115 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ const Type *Ty = yyvsp[0].PHIList->front().first->getType(); if (!Ty->isFirstClassType()) ThrowException("PHI node operands must be of first class type!"); @@ -4149,12 +3610,11 @@ yyvsp[0].PHIList->pop_front(); } delete yyvsp[0].PHIList; // Free the list... - ;} - break; - - case 199: -#line 2129 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 198: +#line 2129 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ const PointerType *PFTy; const FunctionType *Ty; @@ -4210,89 +3670,106 @@ cast(yyval.InstVal)->setCallingConv(yyvsp[-5].UIntVal); delete yyvsp[-4].TypeVal; delete yyvsp[-1].ValueList; - ;} - break; - - case 200: -#line 2186 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 199: +#line 2186 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.InstVal = yyvsp[0].InstVal; - ;} - break; - - case 201: -#line 2192 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 200: +#line 2192 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.ValueList = yyvsp[0].ValueList; - ;} - break; - - case 202: -#line 2194 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 201: +#line 2194 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.ValueList = new std::vector(); - ;} - break; - - case 203: -#line 2198 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 202: +#line 2198 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.BoolVal = true; - ;} - break; - - case 204: -#line 2201 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 203: +#line 2201 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.BoolVal = false; - ;} - break; - - case 205: -#line 2207 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 204: +#line 2207 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.InstVal = new MallocInst(*yyvsp[0].TypeVal); delete yyvsp[0].TypeVal; - ;} - break; - - case 206: -#line 2211 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 205: +#line 2211 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ + yyval.InstVal = new MallocInst(*yyvsp[-3].TypeVal, 0, yyvsp[0].UInt64Val); + delete yyvsp[-3].TypeVal; + ; + break;} +case 206: +#line 2215 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.InstVal = new MallocInst(*yyvsp[-3].TypeVal, getVal(yyvsp[-1].PrimType, yyvsp[0].ValIDVal)); delete yyvsp[-3].TypeVal; - ;} - break; - - case 207: -#line 2215 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 207: +#line 2219 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ + yyval.InstVal = new MallocInst(*yyvsp[-6].TypeVal, getVal(yyvsp[-4].PrimType, yyvsp[-3].ValIDVal), yyvsp[0].UInt64Val); + delete yyvsp[-6].TypeVal; + ; + break;} +case 208: +#line 2223 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.InstVal = new AllocaInst(*yyvsp[0].TypeVal); delete yyvsp[0].TypeVal; - ;} - break; - - case 208: -#line 2219 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 209: +#line 2227 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ + yyval.InstVal = new AllocaInst(*yyvsp[-3].TypeVal, 0, yyvsp[0].UInt64Val); + delete yyvsp[-3].TypeVal; + ; + break;} +case 210: +#line 2231 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.InstVal = new AllocaInst(*yyvsp[-3].TypeVal, getVal(yyvsp[-1].PrimType, yyvsp[0].ValIDVal)); delete yyvsp[-3].TypeVal; - ;} - break; - - case 209: -#line 2223 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 211: +#line 2235 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ + yyval.InstVal = new AllocaInst(*yyvsp[-6].TypeVal, getVal(yyvsp[-4].PrimType, yyvsp[-3].ValIDVal), yyvsp[0].UInt64Val); + delete yyvsp[-6].TypeVal; + ; + break;} +case 212: +#line 2239 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ if (!isa(yyvsp[0].ValueVal->getType())) ThrowException("Trying to free nonpointer type " + yyvsp[0].ValueVal->getType()->getDescription() + "!"); yyval.InstVal = new FreeInst(yyvsp[0].ValueVal); - ;} - break; - - case 210: -#line 2230 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 213: +#line 2246 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ if (!isa(yyvsp[-1].TypeVal->get())) ThrowException("Can't load from nonpointer type: " + (*yyvsp[-1].TypeVal)->getDescription()); @@ -4301,12 +3778,11 @@ (*yyvsp[-1].TypeVal)->getDescription()); yyval.InstVal = new LoadInst(getVal(*yyvsp[-1].TypeVal, yyvsp[0].ValIDVal), "", yyvsp[-3].BoolVal); delete yyvsp[-1].TypeVal; - ;} - break; - - case 211: -#line 2240 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 214: +#line 2256 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ const PointerType *PT = dyn_cast(yyvsp[-1].TypeVal->get()); if (!PT) ThrowException("Can't store to a nonpointer type: " + @@ -4318,12 +3794,11 @@ yyval.InstVal = new StoreInst(yyvsp[-3].ValueVal, getVal(*yyvsp[-1].TypeVal, yyvsp[0].ValIDVal), yyvsp[-5].BoolVal); delete yyvsp[-1].TypeVal; - ;} - break; - - case 212: -#line 2253 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 215: +#line 2269 "/llvm/lib/AsmParser/llvmAsmParser.y" +{ if (!isa(yyvsp[-2].TypeVal->get())) ThrowException("getelementptr insn requires pointer operand!"); @@ -4343,239 +3818,231 @@ (*yyvsp[-2].TypeVal)->getDescription()+ "'!"); yyval.InstVal = new GetElementPtrInst(getVal(*yyvsp[-2].TypeVal, yyvsp[-1].ValIDVal), *yyvsp[0].ValueList); delete yyvsp[-2].TypeVal; delete yyvsp[0].ValueList; - ;} - break; - - - } - -/* Line 1010 of yacc.c. */ -#line 4354 "llvmAsmParser.tab.c" + ; + break;} +} + /* the action file gets copied in in place of this dollarsign */ +#line 543 "/usr/share/bison.simple" yyvsp -= yylen; yyssp -= yylen; +#ifdef YYLSP_NEEDED + yylsp -= yylen; +#endif - - YY_STACK_PRINT (yyss, yyssp); +#if YYDEBUG != 0 + if (yydebug) + { + short *ssp1 = yyss - 1; + fprintf (stderr, "state stack now"); + while (ssp1 != yyssp) + fprintf (stderr, " %d", *++ssp1); + fprintf (stderr, "\n"); + } +#endif *++yyvsp = yyval; +#ifdef YYLSP_NEEDED + yylsp++; + if (yylen == 0) + { + yylsp->first_line = yylloc.first_line; + yylsp->first_column = yylloc.first_column; + yylsp->last_line = (yylsp-1)->last_line; + yylsp->last_column = (yylsp-1)->last_column; + yylsp->text = 0; + } + else + { + yylsp->last_line = (yylsp+yylen-1)->last_line; + yylsp->last_column = (yylsp+yylen-1)->last_column; + } +#endif - /* Now `shift' the result of the reduction. Determine what state - that goes to, based on the state we popped back to and the rule - number reduced by. */ + /* Now "shift" the result of the reduction. + Determine what state that goes to, + based on the state we popped back to + and the rule number reduced by. */ yyn = yyr1[yyn]; - yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; - if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) + yystate = yypgoto[yyn - YYNTBASE] + *yyssp; + if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp) yystate = yytable[yystate]; else - yystate = yydefgoto[yyn - YYNTOKENS]; + yystate = yydefgoto[yyn - YYNTBASE]; goto yynewstate; +yyerrlab: /* here on detecting error */ -/*------------------------------------. -| yyerrlab -- here on detecting error | -`------------------------------------*/ -yyerrlab: - /* If not already recovering from an error, report this error. */ - if (!yyerrstatus) + if (! yyerrstatus) + /* If not already recovering from an error, report this error. */ { ++yynerrs; -#if YYERROR_VERBOSE + +#ifdef YYERROR_VERBOSE yyn = yypact[yystate]; - if (YYPACT_NINF < yyn && yyn < YYLAST) + if (yyn > YYFLAG && yyn < YYLAST) { - YYSIZE_T yysize = 0; - int yytype = YYTRANSLATE (yychar); - const char* yyprefix; - char *yymsg; - int yyx; - - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - - /* Stay within bounds of both yycheck and yytname. */ - int yychecklim = YYLAST - yyn; - int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; - int yycount = 0; - - yyprefix = ", expecting "; - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) - { - yysize += yystrlen (yyprefix) + yystrlen (yytname [yyx]); - yycount += 1; - if (yycount == 5) - { - yysize = 0; - break; - } - } - yysize += (sizeof ("syntax error, unexpected ") - + yystrlen (yytname[yytype])); - yymsg = (char *) YYSTACK_ALLOC (yysize); - if (yymsg != 0) + int size = 0; + char *msg; + int x, count; + + count = 0; + /* Start X at -yyn if nec to avoid negative indexes in yycheck. */ + for (x = (yyn < 0 ? -yyn : 0); + x < (sizeof(yytname) / sizeof(char *)); x++) + if (yycheck[x + yyn] == x) + size += strlen(yytname[x]) + 15, count++; + msg = (char *) malloc(size + 15); + if (msg != 0) { - char *yyp = yystpcpy (yymsg, "syntax error, unexpected "); - yyp = yystpcpy (yyp, yytname[yytype]); + strcpy(msg, "parse error"); - if (yycount < 5) + if (count < 5) { - yyprefix = ", expecting "; - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) + count = 0; + for (x = (yyn < 0 ? -yyn : 0); + x < (sizeof(yytname) / sizeof(char *)); x++) + if (yycheck[x + yyn] == x) { - yyp = yystpcpy (yyp, yyprefix); - yyp = yystpcpy (yyp, yytname[yyx]); - yyprefix = " or "; + strcat(msg, count == 0 ? ", expecting `" : " or `"); + strcat(msg, yytname[x]); + strcat(msg, "'"); + count++; } } - yyerror (yymsg); - YYSTACK_FREE (yymsg); + yyerror(msg); + free(msg); } else - yyerror ("syntax error; also virtual memory exhausted"); + yyerror ("parse error; also virtual memory exceeded"); } else #endif /* YYERROR_VERBOSE */ - yyerror ("syntax error"); + yyerror("parse error"); } - + goto yyerrlab1; +yyerrlab1: /* here on error raised explicitly by an action */ if (yyerrstatus == 3) { - /* If just tried and failed to reuse lookahead token after an - error, discard it. */ + /* if just tried and failed to reuse lookahead token after an error, discard it. */ - if (yychar <= YYEOF) - { - /* If at end of input, pop the error token, - then the rest of the stack, then return failure. */ - if (yychar == YYEOF) - for (;;) - { - YYPOPSTACK; - if (yyssp == yyss) - YYABORT; - YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp); - yydestruct (yystos[*yyssp], yyvsp); - } - } - else - { - YYDSYMPRINTF ("Error: discarding", yytoken, &yylval, &yylloc); - yydestruct (yytoken, &yylval); - yychar = YYEMPTY; + /* return failure if at end of input */ + if (yychar == YYEOF) + YYABORT; - } +#if YYDEBUG != 0 + if (yydebug) + fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]); +#endif + + yychar = YYEMPTY; } - /* Else will try to reuse lookahead token after shifting the error - token. */ - goto yyerrlab1; + /* Else will try to reuse lookahead token + after shifting the error token. */ + yyerrstatus = 3; /* Each real token shifted decrements this */ -/*---------------------------------------------------. -| yyerrorlab -- error raised explicitly by YYERROR. | -`---------------------------------------------------*/ -yyerrorlab: + goto yyerrhandle; -#ifdef __GNUC__ - /* Pacify GCC when the user code never invokes YYERROR and the label - yyerrorlab therefore never appears in user code. */ - if (0) - goto yyerrorlab; -#endif +yyerrdefault: /* current state does not do anything special for the error token. */ - yyvsp -= yylen; - yyssp -= yylen; - yystate = *yyssp; - goto yyerrlab1; +#if 0 + /* This is wrong; only states that explicitly want error tokens + should shift them. */ + yyn = yydefact[yystate]; /* If its default is to accept any token, ok. Otherwise pop it.*/ + if (yyn) goto yydefault; +#endif +yyerrpop: /* pop the current state because it cannot handle the error token */ -/*-------------------------------------------------------------. -| yyerrlab1 -- common code for both syntax error and YYERROR. | -`-------------------------------------------------------------*/ -yyerrlab1: - yyerrstatus = 3; /* Each real token shifted decrements this. */ + if (yyssp == yyss) YYABORT; + yyvsp--; + yystate = *--yyssp; +#ifdef YYLSP_NEEDED + yylsp--; +#endif - for (;;) +#if YYDEBUG != 0 + if (yydebug) { - yyn = yypact[yystate]; - if (yyn != YYPACT_NINF) - { - yyn += YYTERROR; - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) - { - yyn = yytable[yyn]; - if (0 < yyn) - break; - } - } + short *ssp1 = yyss - 1; + fprintf (stderr, "Error: state stack now"); + while (ssp1 != yyssp) + fprintf (stderr, " %d", *++ssp1); + fprintf (stderr, "\n"); + } +#endif - /* Pop the current state because it cannot handle the error token. */ - if (yyssp == yyss) - YYABORT; +yyerrhandle: - YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp); - yydestruct (yystos[yystate], yyvsp); - YYPOPSTACK; - yystate = *yyssp; - YY_STACK_PRINT (yyss, yyssp); + yyn = yypact[yystate]; + if (yyn == YYFLAG) + goto yyerrdefault; + + yyn += YYTERROR; + if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR) + goto yyerrdefault; + + yyn = yytable[yyn]; + if (yyn < 0) + { + if (yyn == YYFLAG) + goto yyerrpop; + yyn = -yyn; + goto yyreduce; } + else if (yyn == 0) + goto yyerrpop; if (yyn == YYFINAL) YYACCEPT; - YYDPRINTF ((stderr, "Shifting error token, ")); +#if YYDEBUG != 0 + if (yydebug) + fprintf(stderr, "Shifting error token, "); +#endif *++yyvsp = yylval; - +#ifdef YYLSP_NEEDED + *++yylsp = yylloc; +#endif yystate = yyn; goto yynewstate; + yyacceptlab: + /* YYACCEPT comes here. */ + if (yyfree_stacks) + { + free (yyss); + free (yyvs); +#ifdef YYLSP_NEEDED + free (yyls); +#endif + } + return 0; -/*-------------------------------------. -| yyacceptlab -- YYACCEPT comes here. | -`-------------------------------------*/ -yyacceptlab: - yyresult = 0; - goto yyreturn; - -/*-----------------------------------. -| yyabortlab -- YYABORT comes here. | -`-----------------------------------*/ -yyabortlab: - yyresult = 1; - goto yyreturn; - -#ifndef yyoverflow -/*----------------------------------------------. -| yyoverflowlab -- parser overflow comes here. | -`----------------------------------------------*/ -yyoverflowlab: - yyerror ("parser stack overflow"); - yyresult = 2; - /* Fall through. */ -#endif - -yyreturn: -#ifndef yyoverflow - if (yyss != yyssa) - YYSTACK_FREE (yyss); + yyabortlab: + /* YYABORT comes here. */ + if (yyfree_stacks) + { + free (yyss); + free (yyvs); +#ifdef YYLSP_NEEDED + free (yyls); #endif - return yyresult; + } + return 1; } - - -#line 2276 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" +#line 2292 "/llvm/lib/AsmParser/llvmAsmParser.y" int yyerror(const char *ErrorMsg) { std::string where @@ -4589,4 +4056,3 @@ ThrowException(errMsg); return 0; } - Index: llvm/lib/AsmParser/llvmAsmParser.h diff -u llvm/lib/AsmParser/llvmAsmParser.h:1.10 llvm/lib/AsmParser/llvmAsmParser.h:1.11 --- llvm/lib/AsmParser/llvmAsmParser.h:1.10 Sat Oct 22 23:37:20 2005 +++ llvm/lib/AsmParser/llvmAsmParser.h Sat Nov 5 03:21:28 2005 @@ -1,225 +1,4 @@ -/* A Bison parser, made by GNU Bison 1.875d. */ - -/* Skeleton parser for Yacc-like parsing with Bison, - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -/* As a special exception, when this file is copied by Bison into a - Bison output file, you may use that output file without restriction. - This special exception was added by the Free Software Foundation - in version 1.24 of Bison. */ - -/* Tokens. */ -#ifndef YYTOKENTYPE -# define YYTOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum yytokentype { - ESINT64VAL = 258, - EUINT64VAL = 259, - SINTVAL = 260, - UINTVAL = 261, - FPVAL = 262, - VOID = 263, - BOOL = 264, - SBYTE = 265, - UBYTE = 266, - SHORT = 267, - USHORT = 268, - INT = 269, - UINT = 270, - LONG = 271, - ULONG = 272, - FLOAT = 273, - DOUBLE = 274, - TYPE = 275, - LABEL = 276, - VAR_ID = 277, - LABELSTR = 278, - STRINGCONSTANT = 279, - IMPLEMENTATION = 280, - ZEROINITIALIZER = 281, - TRUETOK = 282, - FALSETOK = 283, - BEGINTOK = 284, - ENDTOK = 285, - DECLARE = 286, - GLOBAL = 287, - CONSTANT = 288, - VOLATILE = 289, - TO = 290, - DOTDOTDOT = 291, - NULL_TOK = 292, - UNDEF = 293, - CONST = 294, - INTERNAL = 295, - LINKONCE = 296, - WEAK = 297, - APPENDING = 298, - OPAQUE = 299, - NOT = 300, - EXTERNAL = 301, - TARGET = 302, - TRIPLE = 303, - ENDIAN = 304, - POINTERSIZE = 305, - LITTLE = 306, - BIG = 307, - DEPLIBS = 308, - CALL = 309, - TAIL = 310, - CC_TOK = 311, - CCC_TOK = 312, - FASTCC_TOK = 313, - COLDCC_TOK = 314, - RET = 315, - BR = 316, - SWITCH = 317, - INVOKE = 318, - UNWIND = 319, - UNREACHABLE = 320, - ADD = 321, - SUB = 322, - MUL = 323, - DIV = 324, - REM = 325, - AND = 326, - OR = 327, - XOR = 328, - SETLE = 329, - SETGE = 330, - SETLT = 331, - SETGT = 332, - SETEQ = 333, - SETNE = 334, - MALLOC = 335, - ALLOCA = 336, - FREE = 337, - LOAD = 338, - STORE = 339, - GETELEMENTPTR = 340, - PHI_TOK = 341, - CAST = 342, - SELECT = 343, - SHL = 344, - SHR = 345, - VAARG = 346, - VAARG_old = 347, - VANEXT_old = 348 - }; -#endif -#define ESINT64VAL 258 -#define EUINT64VAL 259 -#define SINTVAL 260 -#define UINTVAL 261 -#define FPVAL 262 -#define VOID 263 -#define BOOL 264 -#define SBYTE 265 -#define UBYTE 266 -#define SHORT 267 -#define USHORT 268 -#define INT 269 -#define UINT 270 -#define LONG 271 -#define ULONG 272 -#define FLOAT 273 -#define DOUBLE 274 -#define TYPE 275 -#define LABEL 276 -#define VAR_ID 277 -#define LABELSTR 278 -#define STRINGCONSTANT 279 -#define IMPLEMENTATION 280 -#define ZEROINITIALIZER 281 -#define TRUETOK 282 -#define FALSETOK 283 -#define BEGINTOK 284 -#define ENDTOK 285 -#define DECLARE 286 -#define GLOBAL 287 -#define CONSTANT 288 -#define VOLATILE 289 -#define TO 290 -#define DOTDOTDOT 291 -#define NULL_TOK 292 -#define UNDEF 293 -#define CONST 294 -#define INTERNAL 295 -#define LINKONCE 296 -#define WEAK 297 -#define APPENDING 298 -#define OPAQUE 299 -#define NOT 300 -#define EXTERNAL 301 -#define TARGET 302 -#define TRIPLE 303 -#define ENDIAN 304 -#define POINTERSIZE 305 -#define LITTLE 306 -#define BIG 307 -#define DEPLIBS 308 -#define CALL 309 -#define TAIL 310 -#define CC_TOK 311 -#define CCC_TOK 312 -#define FASTCC_TOK 313 -#define COLDCC_TOK 314 -#define RET 315 -#define BR 316 -#define SWITCH 317 -#define INVOKE 318 -#define UNWIND 319 -#define UNREACHABLE 320 -#define ADD 321 -#define SUB 322 -#define MUL 323 -#define DIV 324 -#define REM 325 -#define AND 326 -#define OR 327 -#define XOR 328 -#define SETLE 329 -#define SETGE 330 -#define SETLT 331 -#define SETGT 332 -#define SETEQ 333 -#define SETNE 334 -#define MALLOC 335 -#define ALLOCA 336 -#define FREE 337 -#define LOAD 338 -#define STORE 339 -#define GETELEMENTPTR 340 -#define PHI_TOK 341 -#define CAST 342 -#define SELECT 343 -#define SHL 344 -#define SHR 345 -#define VAARG 346 -#define VAARG_old 347 -#define VANEXT_old 348 - - - - -#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) -#line 866 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y" -typedef union YYSTYPE { +typedef union { llvm::Module *ModuleVal; llvm::Function *FunctionVal; std::pair *ArgVal; @@ -258,14 +37,98 @@ llvm::Instruction::OtherOps OtherOpVal; llvm::Module::Endianness Endianness; } YYSTYPE; -/* Line 1285 of yacc.c. */ -#line 263 "llvmAsmParser.tab.h" -# define yystype YYSTYPE /* obsolescent; will be withdrawn */ -# define YYSTYPE_IS_DECLARED 1 -# define YYSTYPE_IS_TRIVIAL 1 -#endif - -extern YYSTYPE llvmAsmlval; - +#define ESINT64VAL 257 +#define EUINT64VAL 258 +#define SINTVAL 259 +#define UINTVAL 260 +#define FPVAL 261 +#define VOID 262 +#define BOOL 263 +#define SBYTE 264 +#define UBYTE 265 +#define SHORT 266 +#define USHORT 267 +#define INT 268 +#define UINT 269 +#define LONG 270 +#define ULONG 271 +#define FLOAT 272 +#define DOUBLE 273 +#define TYPE 274 +#define LABEL 275 +#define VAR_ID 276 +#define LABELSTR 277 +#define STRINGCONSTANT 278 +#define IMPLEMENTATION 279 +#define ZEROINITIALIZER 280 +#define TRUETOK 281 +#define FALSETOK 282 +#define BEGINTOK 283 +#define ENDTOK 284 +#define DECLARE 285 +#define GLOBAL 286 +#define CONSTANT 287 +#define VOLATILE 288 +#define TO 289 +#define DOTDOTDOT 290 +#define NULL_TOK 291 +#define UNDEF 292 +#define CONST 293 +#define INTERNAL 294 +#define LINKONCE 295 +#define WEAK 296 +#define APPENDING 297 +#define OPAQUE 298 +#define NOT 299 +#define EXTERNAL 300 +#define TARGET 301 +#define TRIPLE 302 +#define ENDIAN 303 +#define POINTERSIZE 304 +#define LITTLE 305 +#define BIG 306 +#define ALIGN 307 +#define DEPLIBS 308 +#define CALL 309 +#define TAIL 310 +#define CC_TOK 311 +#define CCC_TOK 312 +#define FASTCC_TOK 313 +#define COLDCC_TOK 314 +#define RET 315 +#define BR 316 +#define SWITCH 317 +#define INVOKE 318 +#define UNWIND 319 +#define UNREACHABLE 320 +#define ADD 321 +#define SUB 322 +#define MUL 323 +#define DIV 324 +#define REM 325 +#define AND 326 +#define OR 327 +#define XOR 328 +#define SETLE 329 +#define SETGE 330 +#define SETLT 331 +#define SETGT 332 +#define SETEQ 333 +#define SETNE 334 +#define MALLOC 335 +#define ALLOCA 336 +#define FREE 337 +#define LOAD 338 +#define STORE 339 +#define GETELEMENTPTR 340 +#define PHI_TOK 341 +#define CAST 342 +#define SELECT 343 +#define SHL 344 +#define SHR 345 +#define VAARG 346 +#define VAARG_old 347 +#define VANEXT_old 348 +extern YYSTYPE llvmAsmlval; Index: llvm/lib/AsmParser/llvmAsmParser.y diff -u llvm/lib/AsmParser/llvmAsmParser.y:1.232 llvm/lib/AsmParser/llvmAsmParser.y:1.233 --- llvm/lib/AsmParser/llvmAsmParser.y:1.232 Sat Oct 22 23:37:20 2005 +++ llvm/lib/AsmParser/llvmAsmParser.y Sat Nov 5 03:21:28 2005 @@ -953,7 +953,7 @@ %token IMPLEMENTATION ZEROINITIALIZER TRUETOK FALSETOK BEGINTOK ENDTOK %token DECLARE GLOBAL CONSTANT VOLATILE %token TO DOTDOTDOT NULL_TOK UNDEF CONST INTERNAL LINKONCE WEAK APPENDING -%token OPAQUE NOT EXTERNAL TARGET TRIPLE ENDIAN POINTERSIZE LITTLE BIG +%token OPAQUE NOT EXTERNAL TARGET TRIPLE ENDIAN POINTERSIZE LITTLE BIG ALIGN %token DEPLIBS CALL TAIL %token CC_TOK CCC_TOK FASTCC_TOK COLDCC_TOK %type OptCallingConv @@ -2208,18 +2208,34 @@ $$ = new MallocInst(*$2); delete $2; } + | MALLOC Types ',' ALIGN EUINT64VAL { + $$ = new MallocInst(*$2, 0, $5); + delete $2; + } | MALLOC Types ',' UINT ValueRef { $$ = new MallocInst(*$2, getVal($4, $5)); delete $2; } + | MALLOC Types ',' UINT ValueRef ',' ALIGN EUINT64VAL { + $$ = new MallocInst(*$2, getVal($4, $5), $8); + delete $2; + } | ALLOCA Types { $$ = new AllocaInst(*$2); delete $2; } + | ALLOCA Types ',' ALIGN EUINT64VAL { + $$ = new AllocaInst(*$2, 0, $5); + delete $2; + } | ALLOCA Types ',' UINT ValueRef { $$ = new AllocaInst(*$2, getVal($4, $5)); delete $2; } + | ALLOCA Types ',' UINT ValueRef ',' ALIGN EUINT64VAL { + $$ = new AllocaInst(*$2, getVal($4, $5), $8); + delete $2; + } | FREE ResolvedVal { if (!isa($2->getType())) ThrowException("Trying to free nonpointer type " + From lattner at cs.uiuc.edu Sat Nov 5 15:20:46 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sat, 5 Nov 2005 15:20:46 -0600 Subject: [llvm-commits] CVS: llvm/lib/VMCore/AsmWriter.cpp Message-ID: <200511052120.PAA22521@zion.cs.uiuc.edu> Changes in directory llvm/lib/VMCore: AsmWriter.cpp updated: 1.182 -> 1.183 --- Log message: fix printing the alignment directive --- Diffs of the changes: (+1 -1) AsmWriter.cpp | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/lib/VMCore/AsmWriter.cpp diff -u llvm/lib/VMCore/AsmWriter.cpp:1.182 llvm/lib/VMCore/AsmWriter.cpp:1.183 --- llvm/lib/VMCore/AsmWriter.cpp:1.182 Sat Nov 5 03:21:28 2005 +++ llvm/lib/VMCore/AsmWriter.cpp Sat Nov 5 15:20:34 2005 @@ -1173,7 +1173,7 @@ writeOperand(AI->getArraySize(), true); } if (AI->getAlignment()) { - Out << ", " << AI->getAlignment(); + Out << ", align " << AI->getAlignment(); } } else if (isa(I)) { if (Operand) writeOperand(Operand, true); // Work with broken code From lattner at cs.uiuc.edu Sat Nov 5 15:54:14 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sat, 5 Nov 2005 15:54:14 -0600 Subject: [llvm-commits] CVS: llvm/lib/AsmParser/llvmAsmParser.y Message-ID: <200511052154.PAA22778@zion.cs.uiuc.edu> Changes in directory llvm/lib/AsmParser: llvmAsmParser.y updated: 1.233 -> 1.234 --- Log message: Verify that alignment amounts are a power of 2 --- Diffs of the changes: (+12 -0) llvmAsmParser.y | 12 ++++++++++++ 1 files changed, 12 insertions(+) Index: llvm/lib/AsmParser/llvmAsmParser.y diff -u llvm/lib/AsmParser/llvmAsmParser.y:1.233 llvm/lib/AsmParser/llvmAsmParser.y:1.234 --- llvm/lib/AsmParser/llvmAsmParser.y:1.233 Sat Nov 5 03:21:28 2005 +++ llvm/lib/AsmParser/llvmAsmParser.y Sat Nov 5 15:54:03 2005 @@ -2209,6 +2209,9 @@ delete $2; } | MALLOC Types ',' ALIGN EUINT64VAL { + if ($5 & ($5-1)) + ThrowException("Alignment amount '" + utostr($5) + + "' is not a power of 2!"); $$ = new MallocInst(*$2, 0, $5); delete $2; } @@ -2217,6 +2220,9 @@ delete $2; } | MALLOC Types ',' UINT ValueRef ',' ALIGN EUINT64VAL { + if ($8 & ($8-1)) + ThrowException("Alignment amount '" + utostr($8) + + "' is not a power of 2!"); $$ = new MallocInst(*$2, getVal($4, $5), $8); delete $2; } @@ -2225,6 +2231,9 @@ delete $2; } | ALLOCA Types ',' ALIGN EUINT64VAL { + if ($5 & ($5-1)) + ThrowException("Alignment amount '" + utostr($5) + + "' is not a power of 2!"); $$ = new AllocaInst(*$2, 0, $5); delete $2; } @@ -2233,6 +2242,9 @@ delete $2; } | ALLOCA Types ',' UINT ValueRef ',' ALIGN EUINT64VAL { + if ($8 & ($8-1)) + ThrowException("Alignment amount '" + utostr($8) + + "' is not a power of 2!"); $$ = new AllocaInst(*$2, getVal($4, $5), $8); delete $2; } From lattner at cs.uiuc.edu Sat Nov 5 15:54:35 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sat, 5 Nov 2005 15:54:35 -0600 Subject: [llvm-commits] CVS: llvm/lib/AsmParser/llvmAsmParser.cpp Message-ID: <200511052154.PAA22812@zion.cs.uiuc.edu> Changes in directory llvm/lib/AsmParser: llvmAsmParser.cpp updated: 1.19 -> 1.20 --- Log message: regenerate --- Diffs of the changes: (+176 -164) llvmAsmParser.cpp | 340 +++++++++++++++++++++++++++--------------------------- 1 files changed, 176 insertions(+), 164 deletions(-) Index: llvm/lib/AsmParser/llvmAsmParser.cpp diff -u llvm/lib/AsmParser/llvmAsmParser.cpp:1.19 llvm/lib/AsmParser/llvmAsmParser.cpp:1.20 --- llvm/lib/AsmParser/llvmAsmParser.cpp:1.19 Sat Nov 5 03:21:28 2005 +++ llvm/lib/AsmParser/llvmAsmParser.cpp Sat Nov 5 15:54:23 2005 @@ -1,5 +1,5 @@ -/* A Bison parser, made from /llvm/lib/AsmParser/llvmAsmParser.y +/* A Bison parser, made from /Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y by GNU Bison version 1.28 */ #define YYBISON 1 /* Identify Bison output. */ @@ -104,7 +104,7 @@ #define VAARG_old 347 #define VANEXT_old 348 -#line 14 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 14 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" #include "ParserInternals.h" #include "llvm/CallingConv.h" @@ -956,7 +956,7 @@ } -#line 866 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 866 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" typedef union { llvm::Module *ModuleVal; llvm::Function *FunctionVal; @@ -1174,8 +1174,8 @@ 1868, 1882, 1886, 1939, 1942, 1948, 1956, 1966, 1973, 1978, 1985, 1989, 1995, 1995, 1997, 2000, 2006, 2018, 2026, 2036, 2048, 2055, 2062, 2069, 2074, 2093, 2115, 2129, 2186, 2192, - 2194, 2198, 2201, 2207, 2211, 2215, 2219, 2223, 2227, 2231, - 2235, 2239, 2246, 2256, 2269 + 2194, 2198, 2201, 2207, 2211, 2218, 2222, 2229, 2233, 2240, + 2244, 2251, 2258, 2268, 2281 }; #endif @@ -2188,7 +2188,7 @@ switch (yyn) { case 2: -#line 984 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 984 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (yyvsp[0].UIntVal > (uint32_t)INT32_MAX) // Outside of my range! ThrowException("Value too large for type!"); @@ -2196,7 +2196,7 @@ ; break;} case 4: -#line 992 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 992 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (yyvsp[0].UInt64Val > (uint64_t)INT64_MAX) // Outside of my range! ThrowException("Value too large for type!"); @@ -2204,55 +2204,55 @@ ; break;} case 33: -#line 1015 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1015 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.StrVal = yyvsp[-1].StrVal; ; break;} case 34: -#line 1018 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1018 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.StrVal = 0; ; break;} case 35: -#line 1022 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1022 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.Linkage = GlobalValue::InternalLinkage; ; break;} case 36: -#line 1023 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1023 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.Linkage = GlobalValue::LinkOnceLinkage; ; break;} case 37: -#line 1024 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1024 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.Linkage = GlobalValue::WeakLinkage; ; break;} case 38: -#line 1025 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1025 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.Linkage = GlobalValue::AppendingLinkage; ; break;} case 39: -#line 1026 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1026 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.Linkage = GlobalValue::ExternalLinkage; ; break;} case 40: -#line 1028 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1028 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.UIntVal = CallingConv::C; ; break;} case 41: -#line 1029 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1029 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.UIntVal = CallingConv::C; ; break;} case 42: -#line 1030 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1030 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.UIntVal = CallingConv::Fast; ; break;} case 43: -#line 1031 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1031 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.UIntVal = CallingConv::Cold; ; break;} case 44: -#line 1032 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1032 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if ((unsigned)yyvsp[0].UInt64Val != yyvsp[0].UInt64Val) ThrowException("Calling conv too large!"); @@ -2260,15 +2260,15 @@ ; break;} case 46: -#line 1045 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1045 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.TypeVal = new PATypeHolder(yyvsp[0].PrimType); ; break;} case 48: -#line 1046 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1046 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.TypeVal = new PATypeHolder(yyvsp[0].PrimType); ; break;} case 49: -#line 1048 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1048 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) ThrowException("Invalid upreference in type: " + (*yyvsp[0].TypeVal)->getDescription()); @@ -2276,25 +2276,25 @@ ; break;} case 63: -#line 1059 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1059 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.TypeVal = new PATypeHolder(OpaqueType::get()); ; break;} case 64: -#line 1062 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1062 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.TypeVal = new PATypeHolder(yyvsp[0].PrimType); ; break;} case 65: -#line 1065 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1065 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Named types are also simple types... yyval.TypeVal = new PATypeHolder(getTypeVal(yyvsp[0].ValIDVal)); ; break;} case 66: -#line 1071 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1071 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Type UpReference if (yyvsp[0].UInt64Val > (uint64_t)~0U) ThrowException("Value out of range!"); OpaqueType *OT = OpaqueType::get(); // Use temporary placeholder @@ -2304,7 +2304,7 @@ ; break;} case 67: -#line 1078 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1078 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Function derived type? std::vector Params; for (std::list::iterator I = yyvsp[-1].TypeList->begin(), @@ -2319,14 +2319,14 @@ ; break;} case 68: -#line 1090 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1090 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Sized array type? yyval.TypeVal = new PATypeHolder(HandleUpRefs(ArrayType::get(*yyvsp[-1].TypeVal, (unsigned)yyvsp[-3].UInt64Val))); delete yyvsp[-1].TypeVal; ; break;} case 69: -#line 1094 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1094 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Packed array type? const llvm::Type* ElemTy = yyvsp[-1].TypeVal->get(); if ((unsigned)yyvsp[-3].UInt64Val != yyvsp[-3].UInt64Val) { @@ -2340,7 +2340,7 @@ ; break;} case 70: -#line 1105 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1105 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Structure type? std::vector Elements; for (std::list::iterator I = yyvsp[-1].TypeList->begin(), @@ -2352,51 +2352,51 @@ ; break;} case 71: -#line 1114 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1114 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Empty structure type? yyval.TypeVal = new PATypeHolder(StructType::get(std::vector())); ; break;} case 72: -#line 1117 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1117 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Pointer type? yyval.TypeVal = new PATypeHolder(HandleUpRefs(PointerType::get(*yyvsp[-1].TypeVal))); delete yyvsp[-1].TypeVal; ; break;} case 73: -#line 1125 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1125 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.TypeList = new std::list(); yyval.TypeList->push_back(*yyvsp[0].TypeVal); delete yyvsp[0].TypeVal; ; break;} case 74: -#line 1129 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1129 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeList=yyvsp[-2].TypeList)->push_back(*yyvsp[0].TypeVal); delete yyvsp[0].TypeVal; ; break;} case 76: -#line 1135 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1135 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeList=yyvsp[-2].TypeList)->push_back(Type::VoidTy); ; break;} case 77: -#line 1138 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1138 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeList = new std::list())->push_back(Type::VoidTy); ; break;} case 78: -#line 1141 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1141 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.TypeList = new std::list(); ; break;} case 79: -#line 1151 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1151 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Nonempty unsized arr const ArrayType *ATy = dyn_cast(yyvsp[-3].TypeVal->get()); if (ATy == 0) @@ -2424,7 +2424,7 @@ ; break;} case 80: -#line 1176 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1176 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { const ArrayType *ATy = dyn_cast(yyvsp[-2].TypeVal->get()); if (ATy == 0) @@ -2440,7 +2440,7 @@ ; break;} case 81: -#line 1189 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1189 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { const ArrayType *ATy = dyn_cast(yyvsp[-2].TypeVal->get()); if (ATy == 0) @@ -2471,7 +2471,7 @@ ; break;} case 82: -#line 1217 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1217 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Nonempty unsized arr const PackedType *PTy = dyn_cast(yyvsp[-3].TypeVal->get()); if (PTy == 0) @@ -2499,7 +2499,7 @@ ; break;} case 83: -#line 1242 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1242 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { const StructType *STy = dyn_cast(yyvsp[-3].TypeVal->get()); if (STy == 0) @@ -2522,7 +2522,7 @@ ; break;} case 84: -#line 1262 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1262 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { const StructType *STy = dyn_cast(yyvsp[-2].TypeVal->get()); if (STy == 0) @@ -2537,7 +2537,7 @@ ; break;} case 85: -#line 1274 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1274 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { const PointerType *PTy = dyn_cast(yyvsp[-1].TypeVal->get()); if (PTy == 0) @@ -2549,14 +2549,14 @@ ; break;} case 86: -#line 1283 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1283 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.ConstVal = UndefValue::get(yyvsp[-1].TypeVal->get()); delete yyvsp[-1].TypeVal; ; break;} case 87: -#line 1287 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1287 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { const PointerType *Ty = dyn_cast(yyvsp[-1].TypeVal->get()); if (Ty == 0) @@ -2618,7 +2618,7 @@ ; break;} case 88: -#line 1346 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1346 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (yyvsp[-1].TypeVal->get() != yyvsp[0].ConstVal->getType()) ThrowException("Mismatched types for constant expression!"); @@ -2627,7 +2627,7 @@ ; break;} case 89: -#line 1352 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1352 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { const Type *Ty = yyvsp[-1].TypeVal->get(); if (isa(Ty) || Ty == Type::LabelTy || isa(Ty)) @@ -2637,7 +2637,7 @@ ; break;} case 90: -#line 1360 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1360 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // integral constants if (!ConstantSInt::isValueValidForType(yyvsp[-1].PrimType, yyvsp[0].SInt64Val)) ThrowException("Constant value doesn't fit in type!"); @@ -2645,7 +2645,7 @@ ; break;} case 91: -#line 1365 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1365 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // integral constants if (!ConstantUInt::isValueValidForType(yyvsp[-1].PrimType, yyvsp[0].UInt64Val)) ThrowException("Constant value doesn't fit in type!"); @@ -2653,19 +2653,19 @@ ; break;} case 92: -#line 1370 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1370 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Boolean constants yyval.ConstVal = ConstantBool::True; ; break;} case 93: -#line 1373 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1373 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Boolean constants yyval.ConstVal = ConstantBool::False; ; break;} case 94: -#line 1376 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1376 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Float & Double constants if (!ConstantFP::isValueValidForType(yyvsp[-1].PrimType, yyvsp[0].FPVal)) ThrowException("Floating point constant invalid for type!!"); @@ -2673,7 +2673,7 @@ ; break;} case 95: -#line 1383 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1383 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!yyvsp[-3].ConstVal->getType()->isFirstClassType()) ThrowException("cast constant expression from a non-primitive type: '" + @@ -2686,7 +2686,7 @@ ; break;} case 96: -#line 1393 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1393 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!isa(yyvsp[-2].ConstVal->getType())) ThrowException("GetElementPtr requires a pointer operand!"); @@ -2720,7 +2720,7 @@ ; break;} case 97: -#line 1424 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1424 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (yyvsp[-5].ConstVal->getType() != Type::BoolTy) ThrowException("Select condition must be of boolean type!"); @@ -2730,7 +2730,7 @@ ; break;} case 98: -#line 1431 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1431 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (yyvsp[-3].ConstVal->getType() != yyvsp[-1].ConstVal->getType()) ThrowException("Binary operator types must match!"); @@ -2754,7 +2754,7 @@ ; break;} case 99: -#line 1452 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1452 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (yyvsp[-3].ConstVal->getType() != yyvsp[-1].ConstVal->getType()) ThrowException("Logical operator types must match!"); @@ -2764,7 +2764,7 @@ ; break;} case 100: -#line 1459 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1459 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (yyvsp[-3].ConstVal->getType() != yyvsp[-1].ConstVal->getType()) ThrowException("setcc operand types must match!"); @@ -2772,7 +2772,7 @@ ; break;} case 101: -#line 1464 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1464 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (yyvsp[-1].ConstVal->getType() != Type::UByteTy) ThrowException("Shift count for shift constant must be unsigned byte!"); @@ -2782,54 +2782,54 @@ ; break;} case 102: -#line 1474 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1474 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ConstVector = yyvsp[-2].ConstVector)->push_back(yyvsp[0].ConstVal); ; break;} case 103: -#line 1477 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1477 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.ConstVector = new std::vector(); yyval.ConstVector->push_back(yyvsp[0].ConstVal); ; break;} case 104: -#line 1484 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1484 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.BoolVal = false; ; break;} case 105: -#line 1484 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1484 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.BoolVal = true; ; break;} case 106: -#line 1494 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1494 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.ModuleVal = ParserResult = yyvsp[0].ModuleVal; CurModule.ModuleDone(); ; break;} case 107: -#line 1501 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1501 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.ModuleVal = yyvsp[-1].ModuleVal; CurFun.FunctionDone(); ; break;} case 108: -#line 1505 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1505 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.ModuleVal = yyvsp[-1].ModuleVal; ; break;} case 109: -#line 1508 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1508 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.ModuleVal = yyvsp[-1].ModuleVal; ; break;} case 110: -#line 1511 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1511 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.ModuleVal = CurModule.CurrentModule; // Emit an error if there are any unresolved types left. @@ -2843,7 +2843,7 @@ ; break;} case 111: -#line 1524 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1524 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Eagerly resolve types. This is not an optimization, this is a // requirement that is due to the fact that we could have this: @@ -2866,55 +2866,55 @@ ; break;} case 112: -#line 1544 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1544 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Function prototypes can be in const pool ; break;} case 113: -#line 1546 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1546 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (yyvsp[0].ConstVal == 0) ThrowException("Global value initializer is not a constant!"); ParseGlobalVariable(yyvsp[-3].StrVal, yyvsp[-2].Linkage, yyvsp[-1].BoolVal, yyvsp[0].ConstVal->getType(), yyvsp[0].ConstVal); ; break;} case 114: -#line 1550 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1550 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { ParseGlobalVariable(yyvsp[-3].StrVal, GlobalValue::ExternalLinkage, yyvsp[-1].BoolVal, *yyvsp[0].TypeVal, 0); delete yyvsp[0].TypeVal; ; break;} case 115: -#line 1554 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1554 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { ; break;} case 116: -#line 1556 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1556 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { ; break;} case 117: -#line 1558 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1558 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { ; break;} case 118: -#line 1563 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1563 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.Endianness = Module::BigEndian; ; break;} case 119: -#line 1564 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1564 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.Endianness = Module::LittleEndian; ; break;} case 120: -#line 1566 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1566 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { CurModule.CurrentModule->setEndianness(yyvsp[0].Endianness); ; break;} case 121: -#line 1569 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1569 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (yyvsp[0].UInt64Val == 32) CurModule.CurrentModule->setPointerSize(Module::Pointer32); @@ -2925,37 +2925,37 @@ ; break;} case 122: -#line 1577 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1577 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { CurModule.CurrentModule->setTargetTriple(yyvsp[0].StrVal); free(yyvsp[0].StrVal); ; break;} case 124: -#line 1584 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1584 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { CurModule.CurrentModule->addLibrary(yyvsp[0].StrVal); free(yyvsp[0].StrVal); ; break;} case 125: -#line 1588 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1588 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { CurModule.CurrentModule->addLibrary(yyvsp[0].StrVal); free(yyvsp[0].StrVal); ; break;} case 126: -#line 1592 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1592 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { ; break;} case 130: -#line 1601 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1601 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.StrVal = 0; ; break;} case 131: -#line 1603 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1603 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (*yyvsp[-1].TypeVal == Type::VoidTy) ThrowException("void typed arguments are invalid!"); @@ -2963,7 +2963,7 @@ ; break;} case 132: -#line 1609 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1609 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.ArgList = yyvsp[-2].ArgList; yyvsp[-2].ArgList->push_back(*yyvsp[0].ArgVal); @@ -2971,7 +2971,7 @@ ; break;} case 133: -#line 1614 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1614 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.ArgList = new std::vector >(); yyval.ArgList->push_back(*yyvsp[0].ArgVal); @@ -2979,13 +2979,13 @@ ; break;} case 134: -#line 1620 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1620 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.ArgList = yyvsp[0].ArgList; ; break;} case 135: -#line 1623 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1623 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.ArgList = yyvsp[-2].ArgList; yyval.ArgList->push_back(std::pair >(); yyval.ArgList->push_back(std::make_pair(new PATypeHolder(Type::VoidTy), (char*)0)); ; break;} case 137: -#line 1632 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1632 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.ArgList = 0; ; break;} case 138: -#line 1636 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1636 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { UnEscapeLexed(yyvsp[-3].StrVal); std::string FunctionName(yyvsp[-3].StrVal); @@ -3088,7 +3088,7 @@ ; break;} case 141: -#line 1718 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1718 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.FunctionVal = CurFun.CurrentFunction; @@ -3098,66 +3098,66 @@ ; break;} case 144: -#line 1728 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1728 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.FunctionVal = yyvsp[-1].FunctionVal; ; break;} case 145: -#line 1732 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1732 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { CurFun.isDeclare = true; ; break;} case 146: -#line 1732 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1732 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.FunctionVal = CurFun.CurrentFunction; CurFun.FunctionDone(); ; break;} case 147: -#line 1741 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1741 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // A reference to a direct constant yyval.ValIDVal = ValID::create(yyvsp[0].SInt64Val); ; break;} case 148: -#line 1744 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1744 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.ValIDVal = ValID::create(yyvsp[0].UInt64Val); ; break;} case 149: -#line 1747 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1747 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Perhaps it's an FP constant? yyval.ValIDVal = ValID::create(yyvsp[0].FPVal); ; break;} case 150: -#line 1750 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1750 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.ValIDVal = ValID::create(ConstantBool::True); ; break;} case 151: -#line 1753 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1753 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.ValIDVal = ValID::create(ConstantBool::False); ; break;} case 152: -#line 1756 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1756 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.ValIDVal = ValID::createNull(); ; break;} case 153: -#line 1759 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1759 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.ValIDVal = ValID::createUndef(); ; break;} case 154: -#line 1762 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1762 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Nonempty unsized packed vector const Type *ETy = (*yyvsp[-1].ConstVector)[0]->getType(); int NumElements = yyvsp[-1].ConstVector->size(); @@ -3184,43 +3184,43 @@ ; break;} case 155: -#line 1786 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1786 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.ValIDVal = ValID::create(yyvsp[0].ConstVal); ; break;} case 156: -#line 1793 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1793 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Is it an integer reference...? yyval.ValIDVal = ValID::create(yyvsp[0].SIntVal); ; break;} case 157: -#line 1796 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1796 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Is it a named reference...? yyval.ValIDVal = ValID::create(yyvsp[0].StrVal); ; break;} case 160: -#line 1807 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1807 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.ValueVal = getVal(*yyvsp[-1].TypeVal, yyvsp[0].ValIDVal); delete yyvsp[-1].TypeVal; ; break;} case 161: -#line 1811 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1811 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.FunctionVal = yyvsp[-1].FunctionVal; ; break;} case 162: -#line 1814 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1814 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Do not allow functions with 0 basic blocks yyval.FunctionVal = yyvsp[-1].FunctionVal; ; break;} case 163: -#line 1822 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1822 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { setValueName(yyvsp[0].TermInstVal, yyvsp[-1].StrVal); InsertValue(yyvsp[0].TermInstVal); @@ -3231,14 +3231,14 @@ ; break;} case 164: -#line 1831 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1831 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyvsp[-1].BasicBlockVal->getInstList().push_back(yyvsp[0].InstVal); yyval.BasicBlockVal = yyvsp[-1].BasicBlockVal; ; break;} case 165: -#line 1835 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1835 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.BasicBlockVal = CurBB = getBBVal(ValID::create((int)CurFun.NextBBNum++), true); @@ -3251,7 +3251,7 @@ ; break;} case 166: -#line 1845 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1845 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.BasicBlockVal = CurBB = getBBVal(ValID::create(yyvsp[0].StrVal), true); @@ -3264,31 +3264,31 @@ ; break;} case 167: -#line 1856 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1856 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Return with a result... yyval.TermInstVal = new ReturnInst(yyvsp[0].ValueVal); ; break;} case 168: -#line 1859 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1859 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Return with no result... yyval.TermInstVal = new ReturnInst(); ; break;} case 169: -#line 1862 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1862 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Unconditional Branch... yyval.TermInstVal = new BranchInst(getBBVal(yyvsp[0].ValIDVal)); ; break;} case 170: -#line 1865 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1865 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.TermInstVal = new BranchInst(getBBVal(yyvsp[-3].ValIDVal), getBBVal(yyvsp[0].ValIDVal), getVal(Type::BoolTy, yyvsp[-6].ValIDVal)); ; break;} case 171: -#line 1868 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1868 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { SwitchInst *S = new SwitchInst(getVal(yyvsp[-7].PrimType, yyvsp[-6].ValIDVal), getBBVal(yyvsp[-3].ValIDVal), yyvsp[-1].JumpTable->size()); yyval.TermInstVal = S; @@ -3305,14 +3305,14 @@ ; break;} case 172: -#line 1882 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1882 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { SwitchInst *S = new SwitchInst(getVal(yyvsp[-6].PrimType, yyvsp[-5].ValIDVal), getBBVal(yyvsp[-2].ValIDVal), 0); yyval.TermInstVal = S; ; break;} case 173: -#line 1887 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1887 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { const PointerType *PFTy; const FunctionType *Ty; @@ -3367,19 +3367,19 @@ ; break;} case 174: -#line 1939 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1939 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.TermInstVal = new UnwindInst(); ; break;} case 175: -#line 1942 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1942 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.TermInstVal = new UnreachableInst(); ; break;} case 176: -#line 1948 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1948 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.JumpTable = yyvsp[-5].JumpTable; Constant *V = cast(getValNonImprovising(yyvsp[-4].PrimType, yyvsp[-3].ValIDVal)); @@ -3390,7 +3390,7 @@ ; break;} case 177: -#line 1956 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1956 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.JumpTable = new std::vector >(); Constant *V = cast(getValNonImprovising(yyvsp[-4].PrimType, yyvsp[-3].ValIDVal)); @@ -3402,7 +3402,7 @@ ; break;} case 178: -#line 1966 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1966 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Is this definition named?? if so, assign the name... setValueName(yyvsp[0].InstVal, yyvsp[-1].StrVal); @@ -3411,7 +3411,7 @@ ; break;} case 179: -#line 1973 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1973 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Used for PHI nodes yyval.PHIList = new std::list >(); yyval.PHIList->push_back(std::make_pair(getVal(*yyvsp[-5].TypeVal, yyvsp[-3].ValIDVal), getBBVal(yyvsp[-1].ValIDVal))); @@ -3419,7 +3419,7 @@ ; break;} case 180: -#line 1978 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1978 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.PHIList = yyvsp[-6].PHIList; yyvsp[-6].PHIList->push_back(std::make_pair(getVal(yyvsp[-6].PHIList->front().first->getType(), yyvsp[-3].ValIDVal), @@ -3427,37 +3427,37 @@ ; break;} case 181: -#line 1985 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1985 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Used for call statements, and memory insts... yyval.ValueList = new std::vector(); yyval.ValueList->push_back(yyvsp[0].ValueVal); ; break;} case 182: -#line 1989 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1989 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.ValueList = yyvsp[-2].ValueList; yyvsp[-2].ValueList->push_back(yyvsp[0].ValueVal); ; break;} case 184: -#line 1995 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1995 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.ValueList = 0; ; break;} case 185: -#line 1997 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1997 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.BoolVal = true; ; break;} case 186: -#line 2000 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2000 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.BoolVal = false; ; break;} case 187: -#line 2006 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2006 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!(*yyvsp[-3].TypeVal)->isInteger() && !(*yyvsp[-3].TypeVal)->isFloatingPoint() && !isa((*yyvsp[-3].TypeVal).get())) @@ -3472,7 +3472,7 @@ ; break;} case 188: -#line 2018 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2018 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!(*yyvsp[-3].TypeVal)->isIntegral()) ThrowException("Logical operator requires integral operands!"); @@ -3483,7 +3483,7 @@ ; break;} case 189: -#line 2026 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2026 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if(isa((*yyvsp[-3].TypeVal).get())) { ThrowException( @@ -3496,7 +3496,7 @@ ; break;} case 190: -#line 2036 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2036 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { std::cerr << "WARNING: Use of eliminated 'not' instruction:" << " Replacing with 'xor'.\n"; @@ -3511,7 +3511,7 @@ ; break;} case 191: -#line 2048 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2048 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (yyvsp[0].ValueVal->getType() != Type::UByteTy) ThrowException("Shift amount must be ubyte!"); @@ -3521,7 +3521,7 @@ ; break;} case 192: -#line 2055 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2055 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!yyvsp[0].TypeVal->get()->isFirstClassType()) ThrowException("cast instruction to a non-primitive type: '" + @@ -3531,7 +3531,7 @@ ; break;} case 193: -#line 2062 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2062 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (yyvsp[-4].ValueVal->getType() != Type::BoolTy) ThrowException("select condition must be boolean!"); @@ -3541,7 +3541,7 @@ ; break;} case 194: -#line 2069 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2069 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { NewVarArgs = true; yyval.InstVal = new VAArgInst(yyvsp[-2].ValueVal, *yyvsp[0].TypeVal); @@ -3549,7 +3549,7 @@ ; break;} case 195: -#line 2074 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2074 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { ObsoleteVarArgs = true; const Type* ArgTy = yyvsp[-2].ValueVal->getType(); @@ -3571,7 +3571,7 @@ ; break;} case 196: -#line 2093 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2093 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { ObsoleteVarArgs = true; const Type* ArgTy = yyvsp[-2].ValueVal->getType(); @@ -3596,7 +3596,7 @@ ; break;} case 197: -#line 2115 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2115 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { const Type *Ty = yyvsp[0].PHIList->front().first->getType(); if (!Ty->isFirstClassType()) @@ -3613,7 +3613,7 @@ ; break;} case 198: -#line 2129 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2129 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { const PointerType *PFTy; const FunctionType *Ty; @@ -3673,93 +3673,105 @@ ; break;} case 199: -#line 2186 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2186 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.InstVal = yyvsp[0].InstVal; ; break;} case 200: -#line 2192 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2192 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.ValueList = yyvsp[0].ValueList; ; break;} case 201: -#line 2194 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2194 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.ValueList = new std::vector(); ; break;} case 202: -#line 2198 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2198 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.BoolVal = true; ; break;} case 203: -#line 2201 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2201 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.BoolVal = false; ; break;} case 204: -#line 2207 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2207 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.InstVal = new MallocInst(*yyvsp[0].TypeVal); delete yyvsp[0].TypeVal; ; break;} case 205: -#line 2211 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2211 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { + if (yyvsp[0].UInt64Val & (yyvsp[0].UInt64Val-1)) + ThrowException("Alignment amount '" + utostr(yyvsp[0].UInt64Val) + + "' is not a power of 2!"); yyval.InstVal = new MallocInst(*yyvsp[-3].TypeVal, 0, yyvsp[0].UInt64Val); delete yyvsp[-3].TypeVal; ; break;} case 206: -#line 2215 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2218 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.InstVal = new MallocInst(*yyvsp[-3].TypeVal, getVal(yyvsp[-1].PrimType, yyvsp[0].ValIDVal)); delete yyvsp[-3].TypeVal; ; break;} case 207: -#line 2219 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2222 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { + if (yyvsp[0].UInt64Val & (yyvsp[0].UInt64Val-1)) + ThrowException("Alignment amount '" + utostr(yyvsp[0].UInt64Val) + + "' is not a power of 2!"); yyval.InstVal = new MallocInst(*yyvsp[-6].TypeVal, getVal(yyvsp[-4].PrimType, yyvsp[-3].ValIDVal), yyvsp[0].UInt64Val); delete yyvsp[-6].TypeVal; ; break;} case 208: -#line 2223 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2229 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.InstVal = new AllocaInst(*yyvsp[0].TypeVal); delete yyvsp[0].TypeVal; ; break;} case 209: -#line 2227 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2233 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { + if (yyvsp[0].UInt64Val & (yyvsp[0].UInt64Val-1)) + ThrowException("Alignment amount '" + utostr(yyvsp[0].UInt64Val) + + "' is not a power of 2!"); yyval.InstVal = new AllocaInst(*yyvsp[-3].TypeVal, 0, yyvsp[0].UInt64Val); delete yyvsp[-3].TypeVal; ; break;} case 210: -#line 2231 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2240 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.InstVal = new AllocaInst(*yyvsp[-3].TypeVal, getVal(yyvsp[-1].PrimType, yyvsp[0].ValIDVal)); delete yyvsp[-3].TypeVal; ; break;} case 211: -#line 2235 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2244 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { + if (yyvsp[0].UInt64Val & (yyvsp[0].UInt64Val-1)) + ThrowException("Alignment amount '" + utostr(yyvsp[0].UInt64Val) + + "' is not a power of 2!"); yyval.InstVal = new AllocaInst(*yyvsp[-6].TypeVal, getVal(yyvsp[-4].PrimType, yyvsp[-3].ValIDVal), yyvsp[0].UInt64Val); delete yyvsp[-6].TypeVal; ; break;} case 212: -#line 2239 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2251 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!isa(yyvsp[0].ValueVal->getType())) ThrowException("Trying to free nonpointer type " + @@ -3768,7 +3780,7 @@ ; break;} case 213: -#line 2246 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2258 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!isa(yyvsp[-1].TypeVal->get())) ThrowException("Can't load from nonpointer type: " + @@ -3781,7 +3793,7 @@ ; break;} case 214: -#line 2256 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2268 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { const PointerType *PT = dyn_cast(yyvsp[-1].TypeVal->get()); if (!PT) @@ -3797,7 +3809,7 @@ ; break;} case 215: -#line 2269 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2281 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!isa(yyvsp[-2].TypeVal->get())) ThrowException("getelementptr insn requires pointer operand!"); @@ -4042,7 +4054,7 @@ } return 1; } -#line 2292 "/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2304 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" int yyerror(const char *ErrorMsg) { std::string where From lattner at cs.uiuc.edu Sat Nov 5 15:58:05 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sat, 5 Nov 2005 15:58:05 -0600 Subject: [llvm-commits] CVS: llvm/lib/VMCore/Instructions.cpp Message-ID: <200511052158.PAA22890@zion.cs.uiuc.edu> Changes in directory llvm/lib/VMCore: Instructions.cpp updated: 1.27 -> 1.28 --- Log message: verify that alignments are always a power of 2 --- Diffs of the changes: (+2 -0) Instructions.cpp | 2 ++ 1 files changed, 2 insertions(+) Index: llvm/lib/VMCore/Instructions.cpp diff -u llvm/lib/VMCore/Instructions.cpp:1.27 llvm/lib/VMCore/Instructions.cpp:1.28 --- llvm/lib/VMCore/Instructions.cpp:1.27 Sat Nov 5 03:21:28 2005 +++ llvm/lib/VMCore/Instructions.cpp Sat Nov 5 15:57:54 2005 @@ -498,6 +498,7 @@ Instruction *InsertBefore) : UnaryInstruction(PointerType::get(Ty), iTy, getAISize(ArraySize), Name, InsertBefore), Alignment(Align) { + assert((Align & (Align-1)) == 0 && "Alignment is not a power of 2!"); assert(Ty != Type::VoidTy && "Cannot allocate void!"); } @@ -506,6 +507,7 @@ BasicBlock *InsertAtEnd) : UnaryInstruction(PointerType::get(Ty), iTy, getAISize(ArraySize), Name, InsertAtEnd), Alignment(Align) { + assert((Align & (Align-1)) == 0 && "Alignment is not a power of 2!"); assert(Ty != Type::VoidTy && "Cannot allocate void!"); } From lattner at cs.uiuc.edu Sat Nov 5 15:58:41 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sat, 5 Nov 2005 15:58:41 -0600 Subject: [llvm-commits] CVS: llvm/include/llvm/Instructions.h Message-ID: <200511052158.PAA22948@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm: Instructions.h updated: 1.28 -> 1.29 --- Log message: add an accessor --- Diffs of the changes: (+4 -0) Instructions.h | 4 ++++ 1 files changed, 4 insertions(+) Index: llvm/include/llvm/Instructions.h diff -u llvm/include/llvm/Instructions.h:1.28 llvm/include/llvm/Instructions.h:1.29 --- llvm/include/llvm/Instructions.h:1.28 Sat Nov 5 03:21:28 2005 +++ llvm/include/llvm/Instructions.h Sat Nov 5 15:58:30 2005 @@ -68,6 +68,10 @@ /// by the instruction. /// unsigned getAlignment() const { return Alignment; } + void setAlignment(unsigned Align) { + assert((Align & (Align-1)) == 0 && "Alignment is not a power of 2!"); + Alignment = Align; + } virtual Instruction *clone() const = 0; From lattner at cs.uiuc.edu Sat Nov 5 16:07:41 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sat, 5 Nov 2005 16:07:41 -0600 Subject: [llvm-commits] CVS: llvm/test/Feature/alignment.ll Message-ID: <200511052207.QAA23098@zion.cs.uiuc.edu> Changes in directory llvm/test/Feature: alignment.ll added (r1.1) --- Log message: new testcase --- Diffs of the changes: (+17 -0) alignment.ll | 17 +++++++++++++++++ 1 files changed, 17 insertions(+) Index: llvm/test/Feature/alignment.ll diff -c /dev/null llvm/test/Feature/alignment.ll:1.1 *** /dev/null Sat Nov 5 16:07:40 2005 --- llvm/test/Feature/alignment.ll Sat Nov 5 16:07:30 2005 *************** *** 0 **** --- 1,17 ---- + ; RUN: llvm-as %s -o - | llvm-dis > %t1.ll + ; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll + ; RUN: diff %t1.ll %t2.ll + + int *%test() { + %X = alloca int, align 4 + %Y = alloca int, uint 42, align 16 + %Z = alloca int, align 0 + ret int *%X + } + + int *%test2() { + %X = malloc int, align 4 + %Y = malloc int, uint 42, align 16 + %Z = malloc int, align 0 + ret int *%X + } From lattner at cs.uiuc.edu Sat Nov 5 16:08:26 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sat, 5 Nov 2005 16:08:26 -0600 Subject: [llvm-commits] CVS: llvm/lib/Bytecode/Writer/Writer.cpp Message-ID: <200511052208.QAA23136@zion.cs.uiuc.edu> Changes in directory llvm/lib/Bytecode/Writer: Writer.cpp updated: 1.108 -> 1.109 --- Log message: Write/read allocation instruction alignment info to .bc files. --- Diffs of the changes: (+7 -0) Writer.cpp | 7 +++++++ 1 files changed, 7 insertions(+) Index: llvm/lib/Bytecode/Writer/Writer.cpp diff -u llvm/lib/Bytecode/Writer/Writer.cpp:1.108 llvm/lib/Bytecode/Writer/Writer.cpp:1.109 --- llvm/lib/Bytecode/Writer/Writer.cpp:1.108 Wed Aug 17 14:23:14 2005 +++ llvm/lib/Bytecode/Writer/Writer.cpp Sat Nov 5 16:08:14 2005 @@ -693,6 +693,13 @@ assert(Slots[1] != ~0U && "Cast return type unknown?"); if (Slots[1] > MaxOpSlot) MaxOpSlot = Slots[1]; NumOperands++; + } else if (const AllocationInst *AI = dyn_cast(&I)) { + assert(NumOperands == 1 && "Bogus allocation!"); + if (AI->getAlignment()) { + Slots[1] = Log2_32(AI->getAlignment())+1; + if (Slots[1] > MaxOpSlot) MaxOpSlot = Slots[1]; + NumOperands = 2; + } } else if (const GetElementPtrInst *GEP = dyn_cast(&I)) { // We need to encode the type of sequential type indices into their slot # unsigned Idx = 1; From lattner at cs.uiuc.edu Sat Nov 5 16:08:26 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sat, 5 Nov 2005 16:08:26 -0600 Subject: [llvm-commits] CVS: llvm/lib/Bytecode/Reader/Reader.cpp Message-ID: <200511052208.QAA23140@zion.cs.uiuc.edu> Changes in directory llvm/lib/Bytecode/Reader: Reader.cpp updated: 1.168 -> 1.169 --- Log message: Write/read allocation instruction alignment info to .bc files. --- Diffs of the changes: (+14 -8) Reader.cpp | 22 ++++++++++++++-------- 1 files changed, 14 insertions(+), 8 deletions(-) Index: llvm/lib/Bytecode/Reader/Reader.cpp diff -u llvm/lib/Bytecode/Reader/Reader.cpp:1.168 llvm/lib/Bytecode/Reader/Reader.cpp:1.169 --- llvm/lib/Bytecode/Reader/Reader.cpp:1.168 Sat Oct 22 23:37:20 2005 +++ llvm/lib/Bytecode/Reader/Reader.cpp Sat Nov 5 16:08:14 2005 @@ -902,27 +902,33 @@ if (CallingConv) cast(Result)->setCallingConv(CallingConv); break; } - case Instruction::Malloc: - if (Oprnds.size() > 2) + case Instruction::Malloc: { + unsigned Align = 0; + if (Oprnds.size() == 2) + Align = (1 << Oprnds[1]) >> 1; + else if (Oprnds.size() > 2) error("Invalid malloc instruction!"); if (!isa(InstTy)) error("Invalid malloc instruction!"); Result = new MallocInst(cast(InstTy)->getElementType(), - Oprnds.size() ? getValue(Type::UIntTyID, - Oprnds[0]) : 0); + getValue(Type::UIntTyID, Oprnds[0]), Align); break; + } - case Instruction::Alloca: - if (Oprnds.size() > 2) + case Instruction::Alloca: { + unsigned Align = 0; + if (Oprnds.size() == 2) + Align = (1 << Oprnds[1]) >> 1; + else if (Oprnds.size() > 2) error("Invalid alloca instruction!"); if (!isa(InstTy)) error("Invalid alloca instruction!"); Result = new AllocaInst(cast(InstTy)->getElementType(), - Oprnds.size() ? getValue(Type::UIntTyID, - Oprnds[0]) :0); + getValue(Type::UIntTyID, Oprnds[0]), Align); break; + } case Instruction::Free: if (!isa(InstTy)) error("Invalid free instruction!"); From lattner at cs.uiuc.edu Sat Nov 5 16:20:17 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sat, 5 Nov 2005 16:20:17 -0600 Subject: [llvm-commits] CVS: llvm/docs/BytecodeFormat.html Message-ID: <200511052220.QAA23337@zion.cs.uiuc.edu> Changes in directory llvm/docs: BytecodeFormat.html updated: 1.43 -> 1.44 --- Log message: rearrange some info about the instruction encoding --- Diffs of the changes: (+124 -106) BytecodeFormat.html | 230 ++++++++++++++++++++++++++++------------------------ 1 files changed, 124 insertions(+), 106 deletions(-) Index: llvm/docs/BytecodeFormat.html diff -u llvm/docs/BytecodeFormat.html:1.43 llvm/docs/BytecodeFormat.html:1.44 --- llvm/docs/BytecodeFormat.html:1.43 Mon Oct 24 12:10:57 2005 +++ llvm/docs/BytecodeFormat.html Sat Nov 5 16:20:06 2005 @@ -39,8 +39,8 @@
        2. Global Constant Pool
        3. Function Definition
        4. Compaction Table
        5. -
        6. Instruction List
        7. -
        8. Instruction Opcodes
        9. +
        10. Instructions List
        11. +
        12. Instructions
        13. Symbol Table
        @@ -1363,8 +1363,125 @@
        + + + + +
        +

        Instructions are written out one at a time as distinct units. Each +instruction +record contains at least an opcode and a type field, +and may contain a list of operands (whose interpretation depends on the opcode). +Based on the number of operands, the +instruction is encoded in a +dense format that tries to encoded each instruction into 32-bits if +possible.

        +
        + + + +
        +

        Instructions encode an opcode that identifies the kind of instruction. + Opcodes are an enumerated integer value. The specific values used depend on + the version of LLVM you're using. The opcode values are defined in the + + include/llvm/Instruction.def file. You should check there for the + most recent definitions. The table below provides the opcodes defined as of + the writing of this document. The table associates each opcode mnemonic with + its enumeration value and the bytecode and LLVM version numbers in which the + opcode was introduced.

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        OpcodeNumberBytecode VersionLLVM Version
        Terminator Instructions
        Ret111.0
        Br211.0
        Switch311.0
        Invoke411.0
        Unwind511.0
        Unreachable611.4
        Binary Operators
        Add711.0
        Sub811.0
        Mul911.0
        Div1011.0
        Rem1111.0
        Logical Operators
        And1211.0
        Or1311.0
        Xor1411.0
        Binary Comparison Operators
        SetEQ1511.0
        SetNE1611.0
        SetLE1711.0
        SetGE1811.0
        SetLT1911.0
        SetGT2011.0
        Memory Operators
        Malloc2111.0
        Free2211.0
        Alloca2311.0
        Load2411.0
        Store2511.0
        GetElementPtr2611.0
        Other Operators
        PHI2711.0
        Cast2811.0
        Call2911.0
        Shl3011.0
        Shr3111.0
        VANext3211.0
        VAArg3311.0
        Select3421.2
        + Pseudo Instructions* +
        Invoke+CC 5651.5
        Invoke+FastCC5751.5
        Call+CC5851.5
        Call+FastCC+TailCall5951.5
        Call+FastCC6051.5
        Call+CCC+TailCall6151.5
        Load+Volatile6231.3
        Store+Volatile6331.3
        + +

        * Note: +These aren't really opcodes from an LLVM language perspective. They encode +information into other opcodes without reserving space for that information. +For example, opcode=63 is a Volatile Store. The opcode for this +instruction is 25 (Store) but we encode it as 63 to indicate that is a Volatile +Store. The same is done for the calling conventions and tail calls. +In each of these entries in range 56-63, the opcode is documented as the base +opcode (Invoke, Call, Store) plus some set of modifiers, as follows:

        +
        +
        CC
        +
        This means an arbitrary calling convention is specified + in a VBR that follows the opcode. This is used when the instruction cannot + be encoded with one of the more compact forms. +
        +
        FastCC
        +
        This indicates that the Call or Invoke is using the FastCC calling + convention.
        +
        CCC
        +
        This indicates that the Call or Invoke is using the native "C" calling + convention.
        +
        TailCall
        +
        This indicates that the Call has the 'tail' modifier.
        +
        +
        + + - + +

        For brevity, instructions are written in one of four formats, depending on the number of operands to the instruction. Each @@ -1430,7 +1547,7 @@ 2-7 - opcode + opcode Specifies the opcode of the instruction. Note that the maximum opcode value is 63. @@ -1467,7 +1584,7 @@ 2-7 - opcode + opcode Specifies the opcode of the instruction. Note that the maximum opcode value is 63. @@ -1509,7 +1626,7 @@ 2-7 - opcode + opcode Specifies the opcode of the instruction. Note that the maximum opcode value is 63. @@ -1542,105 +1659,6 @@

        - -
        -

        Instructions encode an opcode that identifies the kind of instruction. - Opcodes are an enumerated integer value. The specific values used depend on - the version of LLVM you're using. The opcode values are defined in the - - include/llvm/Instruction.def file. You should check there for the - most recent definitions. The table below provides the opcodes defined as of - the writing of this document. The table associates each opcode mnemonic with - its enumeration value and the bytecode and LLVM version numbers in which the - opcode was introduced.

        - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        OpcodeNumberBytecode VersionLLVM Version
        Terminator Instructions
        Ret111.0
        Br211.0
        Switch311.0
        Invoke411.0
        Unwind511.0
        Unreachable611.4
        Binary Operators
        Add711.0
        Sub811.0
        Mul911.0
        Div1011.0
        Rem1111.0
        Logical Operators
        And1211.0
        Or1311.0
        Xor1411.0
        Binary Comparison Operators
        SetEQ1511.0
        SetNE1611.0
        SetLE1711.0
        SetGE1811.0
        SetLT1911.0
        SetGT2011.0
        Memory Operators
        Malloc2111.0
        Free2211.0
        Alloca2311.0
        Load2411.0
        Store2511.0
        GetElementPtr2611.0
        Other Operators
        PHI2711.0
        Cast2811.0
        Call2911.0
        Shl3011.0
        Shr3111.0
        VANext3211.0
        VAArg3311.0
        Select3421.2
        - Pseudo Instructions* -
        Invoke+CC 5651.5
        Invoke+FastCC5751.5
        Call+CC5851.5
        Call+FastCC+TailCall5951.5
        Call+FastCC6051.5
        Call+CCC+TailCall6151.5
        Load+Volatile6231.3
        Store+Volatile6331.3
        -
        - -

        * Note: -These aren't really opcodes from an LLVM language prespeective. They encode -information into other opcodes without reserving space for that information. -For example, opcode=63 is a Volatile Store. The opcode for this -instruction is 25 (Store) but we encode it as 63 to indicate that is a Volatile -Store. The same is done for the calling conventions and tail calls. -In each of these entries in range 56-63, the opcode is documented as the base -opcode (Invoke, Call, Store) plus some set of modifiers, as follows:

        -
        -
        CC
        -
        This means an arbitrary calling convention is specified - in a VBR that follows the opcode. This is used when the instruction cannot - be encoded with one of the more compact forms. -
        -
        FastCC
        -
        This indicates that the Call or Invoke is using the FastCC calling - convention.
        -
        CCC
        -
        This indicates that the Call or Invoke is using the native "C" calling - convention.
        -
        TailCall
        -
        This indicates that the Call has the 'tail' modifier.
        -
        - -

        A symbol table can be put out in conjunction with a module or a function. A @@ -1937,7 +1955,7 @@ Reid Spencer and Chris Lattner
        The LLVM Compiler Infrastructure
        -Last modified: $Date: 2005/10/24 17:10:57 $ +Last modified: $Date: 2005/11/05 22:20:06 $ From lattner at cs.uiuc.edu Sat Nov 5 16:32:17 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sat, 5 Nov 2005 16:32:17 -0600 Subject: [llvm-commits] CVS: llvm/docs/BytecodeFormat.html Message-ID: <200511052232.QAA23398@zion.cs.uiuc.edu> Changes in directory llvm/docs: BytecodeFormat.html updated: 1.44 -> 1.45 --- Log message: enumerate non-standard argument encoding cases, such as alignment info for allocations --- Diffs of the changes: (+35 -11) BytecodeFormat.html | 46 +++++++++++++++++++++++++++++++++++----------- 1 files changed, 35 insertions(+), 11 deletions(-) Index: llvm/docs/BytecodeFormat.html diff -u llvm/docs/BytecodeFormat.html:1.44 llvm/docs/BytecodeFormat.html:1.45 --- llvm/docs/BytecodeFormat.html:1.44 Sat Nov 5 16:20:06 2005 +++ llvm/docs/BytecodeFormat.html Sat Nov 5 16:32:06 2005 @@ -1371,8 +1371,8 @@

        Instructions are written out one at a time as distinct units. Each instruction record contains at least an opcode and a type field, -and may contain a list of operands (whose interpretation depends on the opcode). -Based on the number of operands, the +and may contain a list of operands (whose +interpretation depends on the opcode). Based on the number of operands, the instruction is encoded in a dense format that tries to encoded each instruction into 32-bits if possible.

        @@ -1477,6 +1477,36 @@
        + + + +
        +

        +Based on the instruction opcode and type, the bytecode format implicitly (to +save space) specifies the interpretation of the operand list. For most +instructions, the type of each operand is implicit from the type of the +instruction itself (e.g. the type of operands of a binary operator must match +the type of the instruction). As such, the bytecode format generally only +encodes the value number of the operand, not the type.

        + +

        In some cases, however, this is not sufficient. This section enumerates +those cases:

        + +
          +
        • getelementptr: the slot numbers for sequential type indexes are shifted up +two bits. This allows the low order bits will encode the type of index used, +as follows: 0=uint, 1=int, 2=ulong, 3=long.
        • +
        • cast: the result type number is encoded as the second operand.
        • +
        • alloca/malloc: If the allocation has an explicit alignment, the log2 of the + alignment is encoded as the second operand.
        • +
        • call: If the tail marker and calling convention cannot be encoded into the opcode of the call, it is passed as an + additional operand. The low bit of the operand is a flag indicating whether + the call is a tail call. The rest of the bits contain the calling + convention number (shifted left by one bit).
        • +
        +
        Instruction @@ -1518,17 +1548,11 @@ uint32_vbr+ The slot number of the value(s) for the operand(s). - 1 + -Notes: -
          -
        1. Note that if the instruction is a getelementptr and the type of -the operand is a sequential type (array or pointer) then the slot -number is shifted up two bits and the low order bits will encode the -type of index used, as follows: 0=uint, 1=int, 2=ulong, 3=long.
        2. -
        +

        Instruction Format 1

        This format encodes the opcode, type and a single operand into a single uint32_vbr as follows:

        @@ -1955,7 +1979,7 @@ Reid Spencer and Chris Lattner
        The LLVM Compiler Infrastructure
        -Last modified: $Date: 2005/11/05 22:20:06 $ +Last modified: $Date: 2005/11/05 22:32:06 $ From duraid at octopus.com.au Sat Nov 5 22:29:41 2005 From: duraid at octopus.com.au (Duraid Madina) Date: Sat, 5 Nov 2005 22:29:41 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/IA64/IA64TargetMachine.cpp Message-ID: <200511060429.WAA24807@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/IA64: IA64TargetMachine.cpp updated: 1.6 -> 1.7 --- Log message: ask for 16-byte aligned jmpbufs. This should unbreak C++ on IA64 (and a bunch of other things) but is currently ignored by the code generator. --- Diffs of the changes: (+2 -1) IA64TargetMachine.cpp | 3 ++- 1 files changed, 2 insertions(+), 1 deletion(-) Index: llvm/lib/Target/IA64/IA64TargetMachine.cpp diff -u llvm/lib/Target/IA64/IA64TargetMachine.cpp:1.6 llvm/lib/Target/IA64/IA64TargetMachine.cpp:1.7 --- llvm/lib/Target/IA64/IA64TargetMachine.cpp:1.6 Fri Oct 28 12:46:36 2005 +++ llvm/lib/Target/IA64/IA64TargetMachine.cpp Sat Nov 5 22:29:30 2005 @@ -92,7 +92,8 @@ PM.add(createLowerGCPass()); // FIXME: Implement the invoke/unwind instructions! - PM.add(createLowerInvokePass()); + PM.add(createLowerInvokePass(704, 16)); // on ia64 linux, jmpbufs are 704 + // bytes and must be 16byte aligned // FIXME: Implement the switch instruction in the instruction selector! PM.add(createLowerSwitchPass()); From lattner at cs.uiuc.edu Sun Nov 6 00:34:24 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun, 6 Nov 2005 00:34:24 -0600 Subject: [llvm-commits] CVS: llvm/lib/AsmParser/llvmAsmParser.y Message-ID: <200511060634.AAA25278@zion.cs.uiuc.edu> Changes in directory llvm/lib/AsmParser: llvmAsmParser.y updated: 1.234 -> 1.235 --- Log message: factor optional alignment --- Diffs of the changes: (+23 -34) llvmAsmParser.y | 57 ++++++++++++++++++++++---------------------------------- 1 files changed, 23 insertions(+), 34 deletions(-) Index: llvm/lib/AsmParser/llvmAsmParser.y diff -u llvm/lib/AsmParser/llvmAsmParser.y:1.234 llvm/lib/AsmParser/llvmAsmParser.y:1.235 --- llvm/lib/AsmParser/llvmAsmParser.y:1.234 Sat Nov 5 15:54:03 2005 +++ llvm/lib/AsmParser/llvmAsmParser.y Sun Nov 6 00:34:12 2005 @@ -948,7 +948,7 @@ %token VAR_ID LABELSTR STRINGCONSTANT %type Name OptName OptAssign - +%type OptCAlign %token IMPLEMENTATION ZEROINITIALIZER TRUETOK FALSETOK BEGINTOK ENDTOK %token DECLARE GLOBAL CONSTANT VOLATILE @@ -1035,6 +1035,11 @@ $$ = $2; }; +// OptAlign/OptCAlign - An optional alignment, and an optional alignment with +// a comma before it. +OptCAlign : /*empty*/ { $$ = 0; } | + ',' ALIGN EUINT64VAL { $$ = $3; }; + //===----------------------------------------------------------------------===// // Types includes all predefined types... except void, because it can only be // used in specific contexts (function returning void for example). To have @@ -2204,48 +2209,32 @@ -MemoryInst : MALLOC Types { - $$ = new MallocInst(*$2); +MemoryInst : MALLOC Types OptCAlign { + if ($3 & ($3-1)) + ThrowException("Alignment amount '" + utostr($3) + + "' is not a power of 2!"); + $$ = new MallocInst(*$2, 0, $3); delete $2; } - | MALLOC Types ',' ALIGN EUINT64VAL { - if ($5 & ($5-1)) - ThrowException("Alignment amount '" + utostr($5) + + | MALLOC Types ',' UINT ValueRef OptCAlign { + if ($6 & ($6-1)) + ThrowException("Alignment amount '" + utostr($6) + "' is not a power of 2!"); - $$ = new MallocInst(*$2, 0, $5); - delete $2; - } - | MALLOC Types ',' UINT ValueRef { - $$ = new MallocInst(*$2, getVal($4, $5)); + $$ = new MallocInst(*$2, getVal($4, $5), $6); delete $2; } - | MALLOC Types ',' UINT ValueRef ',' ALIGN EUINT64VAL { - if ($8 & ($8-1)) - ThrowException("Alignment amount '" + utostr($8) + + | ALLOCA Types OptCAlign { + if ($3 & ($3-1)) + ThrowException("Alignment amount '" + utostr($3) + "' is not a power of 2!"); - $$ = new MallocInst(*$2, getVal($4, $5), $8); - delete $2; - } - | ALLOCA Types { - $$ = new AllocaInst(*$2); - delete $2; - } - | ALLOCA Types ',' ALIGN EUINT64VAL { - if ($5 & ($5-1)) - ThrowException("Alignment amount '" + utostr($5) + - "' is not a power of 2!"); - $$ = new AllocaInst(*$2, 0, $5); - delete $2; - } - | ALLOCA Types ',' UINT ValueRef { - $$ = new AllocaInst(*$2, getVal($4, $5)); + $$ = new AllocaInst(*$2, 0, $3); delete $2; } - | ALLOCA Types ',' UINT ValueRef ',' ALIGN EUINT64VAL { - if ($8 & ($8-1)) - ThrowException("Alignment amount '" + utostr($8) + + | ALLOCA Types ',' UINT ValueRef OptCAlign { + if ($6 & ($6-1)) + ThrowException("Alignment amount '" + utostr($6) + "' is not a power of 2!"); - $$ = new AllocaInst(*$2, getVal($4, $5), $8); + $$ = new AllocaInst(*$2, getVal($4, $5), $6); delete $2; } | FREE ResolvedVal { From lattner at cs.uiuc.edu Sun Nov 6 00:34:46 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun, 6 Nov 2005 00:34:46 -0600 Subject: [llvm-commits] CVS: llvm/lib/AsmParser/llvmAsmParser.cpp Message-ID: <200511060634.AAA25311@zion.cs.uiuc.edu> Changes in directory llvm/lib/AsmParser: llvmAsmParser.cpp updated: 1.20 -> 1.21 --- Log message: regenerate --- Diffs of the changes: (+775 -820) llvmAsmParser.cpp | 1579 ++++++++++++++++++++++++++---------------------------- 1 files changed, 775 insertions(+), 804 deletions(-) Index: llvm/lib/AsmParser/llvmAsmParser.cpp diff -u llvm/lib/AsmParser/llvmAsmParser.cpp:1.20 llvm/lib/AsmParser/llvmAsmParser.cpp:1.21 --- llvm/lib/AsmParser/llvmAsmParser.cpp:1.20 Sat Nov 5 15:54:23 2005 +++ llvm/lib/AsmParser/llvmAsmParser.cpp Sun Nov 6 00:34:34 2005 @@ -1006,26 +1006,26 @@ -#define YYFINAL 429 +#define YYFINAL 426 #define YYFLAG -32768 #define YYNTBASE 109 -#define YYTRANSLATE(x) ((unsigned)(x) <= 348 ? yytranslate[x] : 170) +#define YYTRANSLATE(x) ((unsigned)(x) <= 348 ? yytranslate[x] : 171) static const char yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 97, - 98, 106, 2, 107, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 102, - 95, 103, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 98, + 99, 107, 2, 96, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 103, + 95, 104, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 99, 96, 101, 2, 2, 2, 2, 2, 108, 2, + 100, 97, 102, 2, 2, 2, 2, 2, 108, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 100, - 2, 2, 104, 2, 105, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 101, + 2, 2, 105, 2, 106, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -1056,24 +1056,24 @@ 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 67, 68, 70, 72, 74, 76, 77, - 78, 80, 82, 84, 87, 89, 91, 93, 95, 97, - 99, 101, 103, 105, 107, 109, 111, 113, 115, 117, - 119, 121, 123, 125, 127, 129, 132, 137, 143, 149, - 153, 156, 159, 161, 165, 167, 171, 173, 174, 179, - 183, 187, 192, 197, 201, 204, 207, 210, 213, 216, - 219, 222, 225, 228, 231, 238, 244, 253, 260, 267, - 274, 281, 285, 287, 289, 291, 293, 296, 299, 302, - 304, 309, 312, 318, 324, 328, 333, 334, 336, 338, - 342, 346, 350, 354, 358, 360, 361, 363, 365, 367, - 368, 371, 375, 377, 379, 383, 385, 386, 393, 395, - 397, 401, 403, 405, 408, 409, 413, 415, 417, 419, - 421, 423, 425, 427, 431, 433, 435, 437, 439, 441, - 444, 447, 450, 454, 457, 458, 460, 463, 466, 470, - 480, 490, 499, 513, 515, 517, 524, 530, 533, 540, - 548, 550, 554, 556, 557, 560, 562, 568, 574, 580, - 583, 588, 593, 600, 605, 610, 615, 618, 626, 628, - 631, 632, 634, 635, 638, 644, 650, 659, 662, 668, - 674, 683, 686, 691, 698 + 78, 80, 82, 84, 87, 88, 92, 94, 96, 98, + 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, + 120, 122, 124, 126, 128, 130, 132, 134, 137, 142, + 148, 154, 158, 161, 164, 166, 170, 172, 176, 178, + 179, 184, 188, 192, 197, 202, 206, 209, 212, 215, + 218, 221, 224, 227, 230, 233, 236, 243, 249, 258, + 265, 272, 279, 286, 290, 292, 294, 296, 298, 301, + 304, 307, 309, 314, 317, 323, 329, 333, 338, 339, + 341, 343, 347, 351, 355, 359, 363, 365, 366, 368, + 370, 372, 373, 376, 380, 382, 384, 388, 390, 391, + 398, 400, 402, 406, 408, 410, 413, 414, 418, 420, + 422, 424, 426, 428, 430, 432, 436, 438, 440, 442, + 444, 446, 449, 452, 455, 459, 462, 463, 465, 468, + 471, 475, 485, 495, 504, 518, 520, 522, 529, 535, + 538, 545, 553, 555, 559, 561, 562, 565, 567, 573, + 579, 585, 588, 593, 598, 605, 610, 615, 620, 623, + 631, 633, 636, 637, 639, 640, 644, 651, 655, 662, + 665, 670, 677 }; static const short yyrhs[] = { 5, @@ -1083,71 +1083,69 @@ 0, 79, 0, 80, 0, 90, 0, 91, 0, 16, 0, 14, 0, 12, 0, 10, 0, 17, 0, 15, 0, 13, 0, 11, 0, 115, 0, 116, 0, 18, - 0, 19, 0, 140, 95, 0, 0, 40, 0, 41, + 0, 19, 0, 141, 95, 0, 0, 40, 0, 41, 0, 42, 0, 43, 0, 0, 0, 58, 0, 59, - 0, 60, 0, 57, 4, 0, 124, 0, 8, 0, - 126, 0, 8, 0, 126, 0, 9, 0, 10, 0, - 11, 0, 12, 0, 13, 0, 14, 0, 15, 0, - 16, 0, 17, 0, 18, 0, 19, 0, 20, 0, - 21, 0, 44, 0, 125, 0, 153, 0, 96, 4, - 0, 123, 97, 128, 98, 0, 99, 4, 100, 126, - 101, 0, 102, 4, 100, 126, 103, 0, 104, 127, - 105, 0, 104, 105, 0, 126, 106, 0, 126, 0, - 127, 107, 126, 0, 127, 0, 127, 107, 36, 0, - 36, 0, 0, 124, 99, 131, 101, 0, 124, 99, - 101, 0, 124, 108, 24, 0, 124, 102, 131, 103, - 0, 124, 104, 131, 105, 0, 124, 104, 105, 0, - 124, 37, 0, 124, 38, 0, 124, 153, 0, 124, - 130, 0, 124, 26, 0, 115, 110, 0, 116, 4, - 0, 9, 27, 0, 9, 28, 0, 118, 7, 0, - 88, 97, 129, 35, 124, 98, 0, 86, 97, 129, - 167, 98, 0, 89, 97, 129, 107, 129, 107, 129, - 98, 0, 111, 97, 129, 107, 129, 98, 0, 112, - 97, 129, 107, 129, 98, 0, 113, 97, 129, 107, - 129, 98, 0, 114, 97, 129, 107, 129, 98, 0, - 131, 107, 129, 0, 129, 0, 32, 0, 33, 0, - 134, 0, 134, 149, 0, 134, 150, 0, 134, 25, - 0, 135, 0, 135, 119, 20, 122, 0, 135, 150, - 0, 135, 119, 120, 132, 129, 0, 135, 119, 46, - 132, 124, 0, 135, 47, 137, 0, 135, 54, 95, - 138, 0, 0, 52, 0, 51, 0, 49, 95, 136, - 0, 50, 95, 4, 0, 48, 95, 24, 0, 99, - 139, 101, 0, 139, 107, 24, 0, 24, 0, 0, - 22, 0, 24, 0, 140, 0, 0, 124, 141, 0, - 143, 107, 142, 0, 142, 0, 143, 0, 143, 107, - 36, 0, 36, 0, 0, 121, 122, 140, 97, 144, - 98, 0, 29, 0, 104, 0, 120, 145, 146, 0, - 30, 0, 105, 0, 156, 148, 0, 0, 31, 151, - 145, 0, 3, 0, 4, 0, 7, 0, 27, 0, - 28, 0, 37, 0, 38, 0, 102, 131, 103, 0, - 130, 0, 109, 0, 140, 0, 153, 0, 152, 0, - 124, 154, 0, 156, 157, 0, 147, 157, 0, 158, - 119, 159, 0, 158, 161, 0, 0, 23, 0, 61, - 155, 0, 61, 8, 0, 62, 21, 154, 0, 62, - 9, 154, 107, 21, 154, 107, 21, 154, 0, 63, - 117, 154, 107, 21, 154, 99, 160, 101, 0, 63, - 117, 154, 107, 21, 154, 99, 101, 0, 64, 121, - 122, 154, 97, 164, 98, 35, 21, 154, 65, 21, - 154, 0, 65, 0, 66, 0, 160, 117, 152, 107, - 21, 154, 0, 117, 152, 107, 21, 154, 0, 119, - 166, 0, 124, 99, 154, 107, 154, 101, 0, 162, - 107, 99, 154, 107, 154, 101, 0, 155, 0, 163, - 107, 155, 0, 163, 0, 0, 56, 55, 0, 55, - 0, 111, 124, 154, 107, 154, 0, 112, 124, 154, - 107, 154, 0, 113, 124, 154, 107, 154, 0, 45, - 155, 0, 114, 155, 107, 155, 0, 88, 155, 35, - 124, 0, 89, 155, 107, 155, 107, 155, 0, 92, - 155, 107, 124, 0, 93, 155, 107, 124, 0, 94, - 155, 107, 124, 0, 87, 162, 0, 165, 121, 122, - 154, 97, 164, 98, 0, 169, 0, 107, 163, 0, - 0, 34, 0, 0, 81, 124, 0, 81, 124, 107, - 53, 4, 0, 81, 124, 107, 15, 154, 0, 81, - 124, 107, 15, 154, 107, 53, 4, 0, 82, 124, - 0, 82, 124, 107, 53, 4, 0, 82, 124, 107, - 15, 154, 0, 82, 124, 107, 15, 154, 107, 53, - 4, 0, 83, 155, 0, 168, 84, 124, 154, 0, - 168, 85, 155, 107, 124, 154, 0, 86, 124, 154, - 167, 0 + 0, 60, 0, 57, 4, 0, 0, 96, 53, 4, + 0, 125, 0, 8, 0, 127, 0, 8, 0, 127, + 0, 9, 0, 10, 0, 11, 0, 12, 0, 13, + 0, 14, 0, 15, 0, 16, 0, 17, 0, 18, + 0, 19, 0, 20, 0, 21, 0, 44, 0, 126, + 0, 154, 0, 97, 4, 0, 124, 98, 129, 99, + 0, 100, 4, 101, 127, 102, 0, 103, 4, 101, + 127, 104, 0, 105, 128, 106, 0, 105, 106, 0, + 127, 107, 0, 127, 0, 128, 96, 127, 0, 128, + 0, 128, 96, 36, 0, 36, 0, 0, 125, 100, + 132, 102, 0, 125, 100, 102, 0, 125, 108, 24, + 0, 125, 103, 132, 104, 0, 125, 105, 132, 106, + 0, 125, 105, 106, 0, 125, 37, 0, 125, 38, + 0, 125, 154, 0, 125, 131, 0, 125, 26, 0, + 115, 110, 0, 116, 4, 0, 9, 27, 0, 9, + 28, 0, 118, 7, 0, 88, 98, 130, 35, 125, + 99, 0, 86, 98, 130, 168, 99, 0, 89, 98, + 130, 96, 130, 96, 130, 99, 0, 111, 98, 130, + 96, 130, 99, 0, 112, 98, 130, 96, 130, 99, + 0, 113, 98, 130, 96, 130, 99, 0, 114, 98, + 130, 96, 130, 99, 0, 132, 96, 130, 0, 130, + 0, 32, 0, 33, 0, 135, 0, 135, 150, 0, + 135, 151, 0, 135, 25, 0, 136, 0, 136, 119, + 20, 123, 0, 136, 151, 0, 136, 119, 120, 133, + 130, 0, 136, 119, 46, 133, 125, 0, 136, 47, + 138, 0, 136, 54, 95, 139, 0, 0, 52, 0, + 51, 0, 49, 95, 137, 0, 50, 95, 4, 0, + 48, 95, 24, 0, 100, 140, 102, 0, 140, 96, + 24, 0, 24, 0, 0, 22, 0, 24, 0, 141, + 0, 0, 125, 142, 0, 144, 96, 143, 0, 143, + 0, 144, 0, 144, 96, 36, 0, 36, 0, 0, + 121, 123, 141, 98, 145, 99, 0, 29, 0, 105, + 0, 120, 146, 147, 0, 30, 0, 106, 0, 157, + 149, 0, 0, 31, 152, 146, 0, 3, 0, 4, + 0, 7, 0, 27, 0, 28, 0, 37, 0, 38, + 0, 103, 132, 104, 0, 131, 0, 109, 0, 141, + 0, 154, 0, 153, 0, 125, 155, 0, 157, 158, + 0, 148, 158, 0, 159, 119, 160, 0, 159, 162, + 0, 0, 23, 0, 61, 156, 0, 61, 8, 0, + 62, 21, 155, 0, 62, 9, 155, 96, 21, 155, + 96, 21, 155, 0, 63, 117, 155, 96, 21, 155, + 100, 161, 102, 0, 63, 117, 155, 96, 21, 155, + 100, 102, 0, 64, 121, 123, 155, 98, 165, 99, + 35, 21, 155, 65, 21, 155, 0, 65, 0, 66, + 0, 161, 117, 153, 96, 21, 155, 0, 117, 153, + 96, 21, 155, 0, 119, 167, 0, 125, 100, 155, + 96, 155, 102, 0, 163, 96, 100, 155, 96, 155, + 102, 0, 156, 0, 164, 96, 156, 0, 164, 0, + 0, 56, 55, 0, 55, 0, 111, 125, 155, 96, + 155, 0, 112, 125, 155, 96, 155, 0, 113, 125, + 155, 96, 155, 0, 45, 156, 0, 114, 156, 96, + 156, 0, 88, 156, 35, 125, 0, 89, 156, 96, + 156, 96, 156, 0, 92, 156, 96, 125, 0, 93, + 156, 96, 125, 0, 94, 156, 96, 125, 0, 87, + 163, 0, 166, 121, 123, 155, 98, 165, 99, 0, + 170, 0, 96, 164, 0, 0, 34, 0, 0, 81, + 125, 122, 0, 81, 125, 96, 15, 155, 122, 0, + 82, 125, 122, 0, 82, 125, 96, 15, 155, 122, + 0, 83, 156, 0, 169, 84, 125, 155, 0, 169, + 85, 156, 96, 125, 155, 0, 86, 125, 155, 168, + 0 }; #endif @@ -1158,24 +1156,24 @@ 1002, 1002, 1003, 1003, 1003, 1003, 1003, 1003, 1005, 1005, 1009, 1009, 1009, 1009, 1010, 1010, 1010, 1010, 1011, 1011, 1012, 1012, 1015, 1018, 1022, 1022, 1023, 1024, 1025, 1028, - 1028, 1029, 1030, 1031, 1045, 1045, 1046, 1046, 1048, 1057, - 1057, 1057, 1057, 1057, 1057, 1057, 1058, 1058, 1058, 1058, - 1058, 1058, 1059, 1062, 1065, 1071, 1078, 1090, 1094, 1105, - 1114, 1117, 1125, 1129, 1134, 1135, 1138, 1141, 1151, 1176, - 1189, 1217, 1242, 1262, 1274, 1283, 1287, 1346, 1352, 1360, - 1365, 1370, 1373, 1376, 1383, 1393, 1424, 1431, 1452, 1459, - 1464, 1474, 1477, 1484, 1484, 1494, 1501, 1505, 1508, 1511, - 1524, 1544, 1546, 1550, 1554, 1556, 1558, 1563, 1564, 1566, - 1569, 1577, 1582, 1584, 1588, 1592, 1600, 1600, 1601, 1601, - 1603, 1609, 1614, 1620, 1623, 1628, 1632, 1636, 1716, 1716, - 1718, 1726, 1726, 1728, 1732, 1732, 1741, 1744, 1747, 1750, - 1753, 1756, 1759, 1762, 1786, 1793, 1796, 1801, 1801, 1807, - 1811, 1814, 1822, 1831, 1835, 1845, 1856, 1859, 1862, 1865, - 1868, 1882, 1886, 1939, 1942, 1948, 1956, 1966, 1973, 1978, - 1985, 1989, 1995, 1995, 1997, 2000, 2006, 2018, 2026, 2036, - 2048, 2055, 2062, 2069, 2074, 2093, 2115, 2129, 2186, 2192, - 2194, 2198, 2201, 2207, 2211, 2218, 2222, 2229, 2233, 2240, - 2244, 2251, 2258, 2268, 2281 + 1028, 1029, 1030, 1031, 1040, 1040, 1050, 1050, 1051, 1051, + 1053, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1063, 1063, + 1063, 1063, 1063, 1063, 1064, 1067, 1070, 1076, 1083, 1095, + 1099, 1110, 1119, 1122, 1130, 1134, 1139, 1140, 1143, 1146, + 1156, 1181, 1194, 1222, 1247, 1267, 1279, 1288, 1292, 1351, + 1357, 1365, 1370, 1375, 1378, 1381, 1388, 1398, 1429, 1436, + 1457, 1464, 1469, 1479, 1482, 1489, 1489, 1499, 1506, 1510, + 1513, 1516, 1529, 1549, 1551, 1555, 1559, 1561, 1563, 1568, + 1569, 1571, 1574, 1582, 1587, 1589, 1593, 1597, 1605, 1605, + 1606, 1606, 1608, 1614, 1619, 1625, 1628, 1633, 1637, 1641, + 1721, 1721, 1723, 1731, 1731, 1733, 1737, 1737, 1746, 1749, + 1752, 1755, 1758, 1761, 1764, 1767, 1791, 1798, 1801, 1806, + 1806, 1812, 1816, 1819, 1827, 1836, 1840, 1850, 1861, 1864, + 1867, 1870, 1873, 1887, 1891, 1944, 1947, 1953, 1961, 1971, + 1978, 1983, 1990, 1994, 2000, 2000, 2002, 2005, 2011, 2023, + 2031, 2041, 2053, 2060, 2067, 2074, 2079, 2098, 2120, 2134, + 2191, 2197, 2199, 2203, 2206, 2212, 2219, 2226, 2233, 2240, + 2247, 2257, 2270 }; #endif @@ -1193,17 +1191,18 @@ "SWITCH","INVOKE","UNWIND","UNREACHABLE","ADD","SUB","MUL","DIV","REM","AND", "OR","XOR","SETLE","SETGE","SETLT","SETGT","SETEQ","SETNE","MALLOC","ALLOCA", "FREE","LOAD","STORE","GETELEMENTPTR","PHI_TOK","CAST","SELECT","SHL","SHR", -"VAARG","VAARG_old","VANEXT_old","'='","'\\\\'","'('","')'","'['","'x'","']'", -"'<'","'>'","'{'","'}'","'*'","','","'c'","INTVAL","EINT64VAL","ArithmeticOps", +"VAARG","VAARG_old","VANEXT_old","'='","','","'\\\\'","'('","')'","'['","'x'", +"']'","'<'","'>'","'{'","'}'","'*'","'c'","INTVAL","EINT64VAL","ArithmeticOps", "LogicalOps","SetCondOps","ShiftOps","SIntType","UIntType","IntType","FPType", -"OptAssign","OptLinkage","OptCallingConv","TypesV","UpRTypesV","Types","PrimType", -"UpRTypes","TypeListI","ArgTypeListI","ConstVal","ConstExpr","ConstVector","GlobalType", -"Module","FunctionList","ConstPool","BigOrLittle","TargetDefinition","LibrariesDefinition", -"LibList","Name","OptName","ArgVal","ArgListH","ArgList","FunctionHeaderH","BEGIN", -"FunctionHeader","END","Function","FunctionProto","@1","ConstValueRef","SymbolicValueRef", -"ValueRef","ResolvedVal","BasicBlockList","BasicBlock","InstructionList","BBTerminatorInst", -"JumpTable","Inst","PHIList","ValueRefList","ValueRefListE","OptTailCall","InstVal", -"IndexList","OptVolatile","MemoryInst", NULL +"OptAssign","OptLinkage","OptCallingConv","OptCAlign","TypesV","UpRTypesV","Types", +"PrimType","UpRTypes","TypeListI","ArgTypeListI","ConstVal","ConstExpr","ConstVector", +"GlobalType","Module","FunctionList","ConstPool","BigOrLittle","TargetDefinition", +"LibrariesDefinition","LibList","Name","OptName","ArgVal","ArgListH","ArgList", +"FunctionHeaderH","BEGIN","FunctionHeader","END","Function","FunctionProto", +"@1","ConstValueRef","SymbolicValueRef","ValueRef","ResolvedVal","BasicBlockList", +"BasicBlock","InstructionList","BBTerminatorInst","JumpTable","Inst","PHIList", +"ValueRefList","ValueRefListE","OptTailCall","InstVal","IndexList","OptVolatile", +"MemoryInst", NULL }; #endif @@ -1212,24 +1211,24 @@ 112, 112, 113, 113, 113, 113, 113, 113, 114, 114, 115, 115, 115, 115, 116, 116, 116, 116, 117, 117, 118, 118, 119, 119, 120, 120, 120, 120, 120, 121, - 121, 121, 121, 121, 122, 122, 123, 123, 124, 125, - 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, - 125, 125, 126, 126, 126, 126, 126, 126, 126, 126, - 126, 126, 127, 127, 128, 128, 128, 128, 129, 129, - 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, - 129, 129, 129, 129, 130, 130, 130, 130, 130, 130, - 130, 131, 131, 132, 132, 133, 134, 134, 134, 134, - 135, 135, 135, 135, 135, 135, 135, 136, 136, 137, - 137, 137, 138, 139, 139, 139, 140, 140, 141, 141, - 142, 143, 143, 144, 144, 144, 144, 145, 146, 146, - 147, 148, 148, 149, 151, 150, 152, 152, 152, 152, - 152, 152, 152, 152, 152, 153, 153, 154, 154, 155, - 156, 156, 157, 158, 158, 158, 159, 159, 159, 159, - 159, 159, 159, 159, 159, 160, 160, 161, 162, 162, - 163, 163, 164, 164, 165, 165, 166, 166, 166, 166, - 166, 166, 166, 166, 166, 166, 166, 166, 166, 167, - 167, 168, 168, 169, 169, 169, 169, 169, 169, 169, - 169, 169, 169, 169, 169 + 121, 121, 121, 121, 122, 122, 123, 123, 124, 124, + 125, 126, 126, 126, 126, 126, 126, 126, 126, 126, + 126, 126, 126, 126, 127, 127, 127, 127, 127, 127, + 127, 127, 127, 127, 128, 128, 129, 129, 129, 129, + 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, + 130, 130, 130, 130, 130, 130, 131, 131, 131, 131, + 131, 131, 131, 132, 132, 133, 133, 134, 135, 135, + 135, 135, 136, 136, 136, 136, 136, 136, 136, 137, + 137, 138, 138, 138, 139, 140, 140, 140, 141, 141, + 142, 142, 143, 144, 144, 145, 145, 145, 145, 146, + 147, 147, 148, 149, 149, 150, 152, 151, 153, 153, + 153, 153, 153, 153, 153, 153, 153, 154, 154, 155, + 155, 156, 157, 157, 158, 159, 159, 159, 160, 160, + 160, 160, 160, 160, 160, 160, 160, 161, 161, 162, + 163, 163, 164, 164, 165, 165, 166, 166, 167, 167, + 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, + 167, 168, 168, 169, 169, 170, 170, 170, 170, 170, + 170, 170, 170 }; static const short yyr2[] = { 0, @@ -1237,412 +1236,388 @@ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 0, 1, 1, 1, 1, 0, 0, - 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 2, 0, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 2, 4, 5, 5, 3, - 2, 2, 1, 3, 1, 3, 1, 0, 4, 3, - 3, 4, 4, 3, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 6, 5, 8, 6, 6, 6, - 6, 3, 1, 1, 1, 1, 2, 2, 2, 1, - 4, 2, 5, 5, 3, 4, 0, 1, 1, 3, - 3, 3, 3, 3, 1, 0, 1, 1, 1, 0, - 2, 3, 1, 1, 3, 1, 0, 6, 1, 1, - 3, 1, 1, 2, 0, 3, 1, 1, 1, 1, - 1, 1, 1, 3, 1, 1, 1, 1, 1, 2, - 2, 2, 3, 2, 0, 1, 2, 2, 3, 9, - 9, 8, 13, 1, 1, 6, 5, 2, 6, 7, - 1, 3, 1, 0, 2, 1, 5, 5, 5, 2, - 4, 4, 6, 4, 4, 4, 2, 7, 1, 2, - 0, 1, 0, 2, 5, 5, 8, 2, 5, 5, - 8, 2, 4, 6, 4 + 1, 1, 1, 1, 1, 1, 1, 2, 4, 5, + 5, 3, 2, 2, 1, 3, 1, 3, 1, 0, + 4, 3, 3, 4, 4, 3, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 6, 5, 8, 6, + 6, 6, 6, 3, 1, 1, 1, 1, 2, 2, + 2, 1, 4, 2, 5, 5, 3, 4, 0, 1, + 1, 3, 3, 3, 3, 3, 1, 0, 1, 1, + 1, 0, 2, 3, 1, 1, 3, 1, 0, 6, + 1, 1, 3, 1, 1, 2, 0, 3, 1, 1, + 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, + 1, 2, 2, 2, 3, 2, 0, 1, 2, 2, + 3, 9, 9, 8, 13, 1, 1, 6, 5, 2, + 6, 7, 1, 3, 1, 0, 2, 1, 5, 5, + 5, 2, 4, 4, 6, 4, 4, 4, 2, 7, + 1, 2, 0, 1, 0, 3, 6, 3, 6, 2, + 4, 6, 4 }; -static const short yydefact[] = { 117, - 39, 110, 109, 145, 35, 36, 37, 38, 40, 165, - 107, 108, 165, 127, 128, 0, 0, 39, 0, 112, - 40, 0, 41, 42, 43, 0, 0, 166, 162, 34, - 142, 143, 144, 161, 0, 0, 0, 115, 0, 0, - 0, 0, 33, 146, 44, 1, 2, 46, 50, 51, - 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, - 62, 63, 0, 0, 0, 0, 156, 0, 0, 45, - 64, 49, 157, 65, 139, 140, 141, 203, 164, 0, - 0, 0, 126, 116, 111, 104, 105, 0, 0, 66, - 0, 0, 48, 71, 73, 0, 0, 78, 72, 202, - 0, 186, 0, 0, 0, 0, 40, 174, 175, 5, +static const short yydefact[] = { 119, + 39, 112, 111, 147, 35, 36, 37, 38, 40, 167, + 109, 110, 167, 129, 130, 0, 0, 39, 0, 114, + 40, 0, 41, 42, 43, 0, 0, 168, 164, 34, + 144, 145, 146, 163, 0, 0, 0, 117, 0, 0, + 0, 0, 33, 148, 44, 1, 2, 48, 52, 53, + 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, + 64, 65, 0, 0, 0, 0, 158, 0, 0, 47, + 66, 51, 159, 67, 141, 142, 143, 205, 166, 0, + 0, 0, 128, 118, 113, 106, 107, 0, 0, 68, + 0, 0, 50, 73, 75, 0, 0, 80, 74, 204, + 0, 188, 0, 0, 0, 0, 40, 176, 177, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 0, 0, 0, 0, 0, 0, 0, - 19, 20, 0, 0, 0, 0, 0, 0, 0, 163, - 40, 178, 0, 199, 122, 119, 118, 120, 121, 125, - 0, 114, 50, 51, 52, 53, 54, 55, 56, 57, - 58, 59, 60, 0, 0, 0, 0, 113, 0, 0, - 70, 0, 137, 77, 75, 0, 0, 190, 185, 168, - 167, 0, 0, 24, 28, 23, 27, 22, 26, 21, - 25, 29, 30, 0, 0, 204, 208, 212, 0, 0, - 197, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 123, 0, 92, 93, 3, 4, 90, - 91, 94, 89, 85, 86, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 88, 87, 47, 47, - 74, 136, 130, 133, 134, 0, 0, 67, 147, 148, - 149, 150, 151, 152, 153, 0, 155, 159, 158, 160, - 0, 169, 0, 0, 0, 0, 201, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 124, 0, 0, 0, 80, 103, 0, 0, 84, - 0, 81, 0, 0, 0, 0, 68, 69, 129, 131, - 0, 138, 76, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 215, 0, 0, 192, 0, 194, 195, 196, - 0, 0, 0, 191, 0, 213, 0, 201, 0, 0, - 79, 0, 82, 83, 0, 0, 0, 0, 135, 132, - 154, 0, 0, 184, 206, 205, 210, 209, 181, 200, - 0, 0, 0, 187, 188, 189, 184, 0, 0, 0, - 0, 102, 0, 0, 0, 0, 0, 0, 183, 0, - 0, 0, 0, 0, 0, 193, 0, 214, 96, 0, + 19, 20, 0, 0, 0, 0, 0, 0, 0, 165, + 40, 180, 0, 201, 124, 121, 120, 122, 123, 127, + 0, 116, 52, 53, 54, 55, 56, 57, 58, 59, + 60, 61, 62, 0, 0, 0, 0, 115, 0, 0, + 0, 72, 139, 79, 77, 0, 0, 192, 187, 170, + 169, 0, 0, 24, 28, 23, 27, 22, 26, 21, + 25, 29, 30, 0, 0, 45, 45, 210, 0, 0, + 199, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 125, 94, 95, 3, 4, 92, + 93, 96, 91, 87, 88, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 90, 89, 49, 49, + 76, 138, 132, 135, 136, 0, 0, 69, 149, 150, + 151, 152, 153, 154, 155, 0, 157, 161, 160, 162, + 0, 171, 0, 0, 0, 206, 0, 208, 203, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 182, 179, 0, 198, 95, 0, 98, 99, 100, 101, - 0, 172, 0, 0, 0, 207, 211, 180, 0, 170, - 0, 171, 0, 0, 97, 0, 0, 0, 0, 0, - 0, 177, 0, 0, 176, 173, 0, 0, 0 + 0, 0, 0, 126, 0, 0, 0, 82, 105, 0, + 0, 86, 0, 83, 0, 0, 0, 0, 70, 71, + 131, 133, 0, 140, 78, 0, 0, 0, 0, 0, + 0, 0, 0, 213, 0, 0, 194, 0, 196, 197, + 198, 0, 0, 0, 193, 0, 211, 0, 203, 0, + 0, 0, 81, 84, 85, 0, 0, 0, 0, 137, + 134, 156, 0, 0, 186, 45, 46, 45, 183, 202, + 0, 0, 0, 189, 190, 191, 186, 0, 0, 0, + 0, 104, 0, 0, 0, 0, 0, 0, 185, 0, + 0, 207, 209, 0, 0, 0, 195, 0, 212, 98, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 184, + 181, 0, 200, 97, 0, 100, 101, 102, 103, 0, + 174, 0, 0, 0, 182, 0, 172, 0, 173, 0, + 0, 99, 0, 0, 0, 0, 0, 0, 179, 0, + 0, 178, 175, 0, 0, 0 }; static const short yydefgoto[] = { 67, 220, 233, 234, 235, 236, 164, 165, 194, 166, 18, - 9, 26, 68, 69, 167, 71, 72, 96, 176, 287, - 257, 288, 88, 427, 1, 2, 148, 38, 84, 151, - 73, 300, 244, 245, 246, 27, 77, 10, 33, 11, - 12, 21, 258, 74, 260, 349, 13, 29, 30, 140, - 404, 79, 201, 369, 370, 141, 142, 313, 143, 144 + 9, 26, 266, 68, 69, 167, 71, 72, 96, 176, + 289, 257, 290, 88, 424, 1, 2, 148, 38, 84, + 151, 73, 302, 244, 245, 246, 27, 77, 10, 33, + 11, 12, 21, 258, 74, 260, 349, 13, 29, 30, + 140, 403, 79, 201, 369, 370, 141, 142, 314, 143, + 144 }; static const short yypact[] = {-32768, - 40, 341,-32768,-32768,-32768,-32768,-32768,-32768, 62, 12, --32768,-32768, -20,-32768,-32768, 110, -67, 48, -50,-32768, - 62, 65,-32768,-32768,-32768, 1073, -18,-32768,-32768, 71, --32768,-32768,-32768,-32768, -19, -8, 2,-32768, -15, 1073, - 31, 31,-32768,-32768,-32768,-32768,-32768, 8,-32768,-32768, + 15, 304,-32768,-32768,-32768,-32768,-32768,-32768, 104, -16, +-32768,-32768, -13,-32768,-32768, -27, -69, 23, -57,-32768, + 104, 88,-32768,-32768,-32768, 954, -18,-32768,-32768, 50, +-32768,-32768,-32768,-32768, -34, -22, 10,-32768, -5, 954, + 58, 58,-32768,-32768,-32768,-32768,-32768, 17,-32768,-32768, -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, --32768,-32768, 123, 152, 163, 120,-32768, 71, 17,-32768, --32768, -36,-32768,-32768,-32768,-32768,-32768, 1228,-32768, 148, - 72, 170, 164,-32768,-32768,-32768,-32768, 1136, 1173,-32768, - 89, 90,-32768,-32768, -36, 58, 94, 835,-32768,-32768, - 1136,-32768, 137, 1236, 27, 138, 62,-32768,-32768,-32768, +-32768,-32768, 126, 142, 148, 531,-32768, 50, 61,-32768, +-32768, -30,-32768,-32768,-32768,-32768,-32768, 1111,-32768, 150, + 66, 166, 153,-32768,-32768,-32768,-32768, 991, 1028,-32768, + 74, 77,-32768,-32768, -30, -36, 81, 769,-32768,-32768, + 991,-32768, 125, 1065, 3, 123, 104,-32768,-32768,-32768, -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, --32768,-32768,-32768, 1136, 1136, 1136, 1136, 1136, 1136, 1136, --32768,-32768, 1136, 1136, 1136, 1136, 1136, 1136, 1136,-32768, - 62,-32768, 77,-32768,-32768,-32768,-32768,-32768,-32768,-32768, - -35,-32768, 118, 167, 190, 173, 191, 175, 192, 177, - 193, 196, 197, 180, 194, 198, 519,-32768, 1136, 1136, --32768, 1136, 872,-32768, 92, 108, 662,-32768,-32768, 8, --32768, 662, 662,-32768,-32768,-32768,-32768,-32768,-32768,-32768, --32768,-32768,-32768, 662, 1073, 100, 101,-32768, 662, 115, - 102, 182, 111, 113, 114, 119, 662, 662, 662, 121, - 1073, 1136, 1136,-32768, 203,-32768,-32768,-32768,-32768,-32768, --32768,-32768,-32768,-32768,-32768, 132, 133, 134, 935, 1173, - 620, 208, 139, 140, 143, 144,-32768,-32768, -74, -29, - -36,-32768, 71,-32768, 127, 117, 972,-32768,-32768,-32768, --32768,-32768,-32768,-32768,-32768, 1173,-32768,-32768,-32768,-32768, - 128,-32768, 136, 662, -6, -2, 146, 662, 155, 1136, - 1136, 1136, 1136, 1136, 149, 151, 153, 1136, 662, 662, - 154,-32768, 1173, 1173, 1173,-32768,-32768, -28, -57,-32768, - 61,-32768, 1173, 1173, 1173, 1173,-32768,-32768,-32768,-32768, - 1036,-32768,-32768, -11, 230, 238, 165, 662, 262, 662, - 263, 1136,-32768, 162, 662,-32768, 166,-32768,-32768,-32768, - 662, 662, 662,-32768, 171,-32768, 1136, 146, 235, 169, --32768, 1173,-32768,-32768, 172, 183, 184, 185,-32768,-32768, --32768, 662, 662, 1136, 186,-32768, 187,-32768,-32768, 188, - 662, 189, 1136,-32768,-32768,-32768, 1136, 662, 174, 1136, - 1173,-32768, 1173, 1173, 1173, 1173, 199, 200, 188, 176, - 218, 231, 1136, 202, 662,-32768, 206,-32768,-32768, 209, - 201, 211, 212, 213, 214, 266, 5, 254, 293, 294, --32768,-32768, 215,-32768,-32768, 1173,-32768,-32768,-32768,-32768, - 662,-32768, 740, 42, 279,-32768,-32768,-32768, 216,-32768, - 210,-32768, 740, 662,-32768, 298, 219, 250, 662, 300, - 301,-32768, 662, 662,-32768,-32768, 323, 325,-32768 +-32768,-32768,-32768, 991, 991, 991, 991, 991, 991, 991, +-32768,-32768, 991, 991, 991, 991, 991, 991, 991,-32768, + 104,-32768, 57,-32768,-32768,-32768,-32768,-32768,-32768,-32768, + -8,-32768, 117, 146, 177, 151, 178, 162, 179, 164, + 180, 182, 183, 169, 187, 185, 407,-32768, 991, 991, + 991,-32768, 806,-32768, 97, 95, 595,-32768,-32768, 17, +-32768, 595, 595,-32768,-32768,-32768,-32768,-32768,-32768,-32768, +-32768,-32768,-32768, 595, 954, 100, 101,-32768, 595, 98, + 103, 165, 106, 107, 111, 112, 595, 595, 595, 113, + 954, 991, 991, 186,-32768,-32768,-32768,-32768,-32768,-32768, +-32768,-32768,-32768,-32768,-32768, 120, 122, 124, 843, 1028, + 552, 188, 127, 128, 129, 130,-32768,-32768, -31, -65, + -30,-32768, 50,-32768, 115, 133, 880,-32768,-32768,-32768, +-32768,-32768,-32768,-32768,-32768, 1028,-32768,-32768,-32768,-32768, + 137,-32768, 138, 595, -6,-32768, -2,-32768, 139, 595, + 121, 991, 991, 991, 991, 991, 140, 141, 143, 991, + 595, 595, 144,-32768, 1028, 1028, 1028,-32768,-32768, 18, + -7,-32768, 0,-32768, 1028, 1028, 1028, 1028,-32768,-32768, +-32768,-32768, 917,-32768,-32768, 25, 202, 203, 131, 595, + 234, 595, 991,-32768, 145, 595,-32768, 147,-32768,-32768, +-32768, 595, 595, 595,-32768, 154,-32768, 991, 139, 209, + 149, 1028,-32768,-32768,-32768, 157, 159, 160, 161,-32768, +-32768,-32768, 595, 595, 991, 167,-32768, 167,-32768, 168, + 595, 170, 991,-32768,-32768,-32768, 991, 595, 163, 991, + 1028,-32768, 1028, 1028, 1028, 1028, 171, 158, 168, 175, + 207,-32768,-32768, 991, 173, 595,-32768, 191,-32768,-32768, + 192, 174, 195, 196, 199, 200, 248, 20, 241,-32768, +-32768, 176,-32768,-32768, 1028,-32768,-32768,-32768,-32768, 595, +-32768, 673, 69, 258,-32768, 205,-32768, 210,-32768, 673, + 595,-32768, 260, 213, 240, 595, 289, 290,-32768, 595, + 595,-32768,-32768, 312, 315,-32768 }; static const short yypgoto[] = {-32768, --32768, 251, 252, 255, 259, -102, -99, -362,-32768, 302, - 310, -81, -38,-32768, -26,-32768, -54, 240,-32768, -83, - 178, -207, 297,-32768,-32768,-32768,-32768,-32768,-32768,-32768, - -1,-32768, 39,-32768,-32768, 320,-32768,-32768,-32768,-32768, - 340,-32768, -372, 56, 161, -96,-32768, 333,-32768,-32768, --32768,-32768,-32768, 36, -7,-32768,-32768, 21,-32768,-32768 +-32768, 238, 239, 242, 251, -102, -100, -385,-32768, 288, + 314, -82, -195, -35,-32768, -26,-32768, -46, 232,-32768, + -81, 172, -203, 291,-32768,-32768,-32768,-32768,-32768,-32768, +-32768, -1,-32768, 35,-32768,-32768, 319,-32768,-32768,-32768, +-32768, 339,-32768, -283, -51, 114, -85,-32768, 329,-32768, +-32768,-32768,-32768,-32768, 30, -4,-32768,-32768, 26,-32768, +-32768 }; -#define YYLAST 1340 +#define YYLAST 1205 static const short yytable[] = { 70, - 19, 85, 28, 192, 178, 168, 193, 181, 308, 31, - 75, 95, 310, 70, 184, 185, 186, 187, 188, 189, - 190, 191, 289, 291, 403, 195, 297, 39, 19, 198, - 411, 99, 202, 203, 28, 182, 204, 205, 206, -106, - 417, 413, 210, 95, 43, 333, 309, 183, 304, 332, - 311, 184, 185, 186, 187, 188, 189, 190, 191, 211, - -47, 152, 86, 87, 3, 214, 97, 40, 45, 99, - 4, 215, 331, 298, 177, 80, 99, 177, 332, 5, - 6, 7, 8, 83, 32, 76, 81, 5, 6, 7, - 8, 341, 14, 41, 15, 332, 82, 196, 197, 177, - 199, 200, 177, 177, -48, 402, 177, 177, 177, 207, - 208, 209, 177, 98, 239, 240, 281, 241, 22, 23, - 24, 25, 146, 147, 46, 47, 90, 93, 49, 50, - 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, - 61, 14, 412, 15, 216, 217, 243, 184, 185, 186, - 187, 188, 189, 190, 191, 91, 264, 35, 36, 37, - 212, 213, 171, 62, 172, 334, 92, 332, 70, -24, - -24, 145, 279, 149, 317, -23, -23, -22, -22, -21, - -21, 324, 218, 219, 70, 280, 177, 150, 169, 170, - 173, 179, 241, -28, -27, -26, -25, 221, 247, 328, - 329, 330, -31, -32, 222, 248, 265, 266, 269, 335, - 336, 337, 338, 268, 302, 63, 270, 271, 64, 272, - 273, 65, 238, 66, 94, 274, 282, 278, 283, 284, - 285, 292, 259, 301, 305, 293, 294, 259, 259, 295, - 296, 299, 306, 316, 177, 318, 319, 320, 362, 259, - 342, 177, 312, 315, 259, 321, 376, 322, 343, 323, - 327, 344, 259, 259, 259, 346, 348, 357, 351, 360, - 389, 379, 353, 388, 243, 361, 391, 381, 363, 382, - 383, 384, 385, 390, 192, 177, 401, 193, 405, 364, - 365, 366, 371, 372, 373, 375, 406, 407, 387, 414, - 358, 192, 392, 394, 193, 386, 395, 396, 397, 398, - 399, 400, 409, 415, 421, 408, 416, 177, 419, 259, - 423, 424, 428, 259, 429, 420, 177, 42, 136, 137, - 177, 78, 138, 380, 259, 259, 139, 175, 89, 340, - 44, 20, 261, 262, 237, 34, 177, 350, 359, 377, - 0, 0, 0, 0, 263, 0, 0, 0, 0, 267, - -34, 0, 14, 259, 15, 259, 0, 275, 276, 277, - 259, 4, -34, -34, 0, 0, 259, 259, 259, 0, - -34, -34, -34, -34, 0, 0, -34, 16, 0, 0, - 0, 0, 0, 0, 17, 0, 0, 259, 259, 0, - 0, 0, 0, 0, 0, 0, 259, 0, 0, 0, - 0, 0, 0, 259, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 307, 0, 0, 0, 314, 0, - 259, 0, 0, 0, 0, 0, 0, 0, 0, 325, - 326, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 259, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 345, 259, - 347, 0, 0, 0, 259, 352, 0, 0, 259, 259, - 0, 354, 355, 356, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 367, 368, 0, 0, 0, 0, 0, 0, - 0, 374, 0, 0, 0, 0, 0, 0, 378, 0, - 0, 0, 0, 46, 47, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 393, 0, 0, 0, 0, - 14, 0, 15, 0, 223, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 224, 225, 0, 0, 0, - 0, 410, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 418, 0, 0, 0, 0, 422, - 0, 0, 0, 425, 426, 110, 111, 112, 113, 114, - 115, 116, 117, 118, 119, 120, 121, 122, 123, 0, - 0, 0, 0, 0, 226, 0, 227, 228, 131, 132, - 0, 0, 0, 0, 0, 0, 0, 229, 0, 0, - 230, 0, 231, 0, 46, 47, 232, 93, 153, 154, - 155, 156, 157, 158, 159, 160, 161, 162, 163, 60, - 61, 14, 0, 15, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 62, 249, 250, 46, 47, 251, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 14, 0, 15, 0, 0, 252, 253, - 0, 0, 0, 0, 0, 0, 0, 0, 254, 255, + 19, 268, 402, 192, 85, 193, 28, 168, 310, 28, + 75, 182, 312, 70, -108, 178, 31, 410, 181, 95, + 35, 36, 37, 183, 195, 39, 291, 293, 19, 184, + 185, 186, 187, 188, 189, 190, 191, 43, 300, 3, + 198, 99, 40, 202, 203, 4, 311, 204, 205, 206, + 311, 95, 306, 210, 5, 6, 7, 8, 211, 171, + 80, 152, 5, 6, 7, 8, 97, -49, 41, 172, + 299, 14, 81, 15, 177, 99, 99, 177, 184, 185, + 186, 187, 188, 189, 190, 191, 76, 214, 332, 86, + 87, 45, 32, 215, 83, 332, 334, 196, 197, 177, + 199, 200, 177, 177, 82, 335, 177, 177, 177, 207, + 208, 209, 177, 332, -50, 238, 146, 147, 408, 333, + 332, 401, 239, 240, 241, 259, 414, 283, 342, 90, + 259, 259, 184, 185, 186, 187, 188, 189, 190, 191, + 212, 213, 259, 216, 217, 91, 243, 259, -24, -24, + 372, 92, 373, -23, -23, 259, 259, 259, 98, 264, + 22, 23, 24, 25, -22, -22, -21, -21, 70, 149, + 409, 218, 219, 145, 169, 281, 150, 170, 173, 179, + -28, -27, -26, -25, 70, 282, 177, 318, -31, -32, + 221, 222, 247, 248, 325, 265, 267, 270, 271, 272, + 241, 273, 274, 329, 330, 331, 275, 276, 280, 284, + 303, 294, 259, 336, 337, 338, 339, 285, 259, 286, + 316, 287, 343, 344, 295, 296, 297, 298, 345, 259, + 259, 304, 307, 308, 313, 322, 323, 347, 324, 328, + 351, 301, 353, 360, 361, 317, 177, 319, 320, 321, + 362, 357, 363, 177, 364, 365, 366, 388, 259, 311, + 259, 380, 371, 374, 259, 376, 387, 377, 400, 395, + 259, 259, 259, 389, 391, 404, 243, 405, 411, 382, + 416, 383, 384, 385, 386, 192, 177, 193, 390, 393, + 394, 259, 259, 396, 397, 261, 262, 398, 399, 259, + 192, 358, 193, 412, 418, 413, 259, 263, 417, 420, + 421, 425, 269, 406, 426, 136, 137, 78, 177, 138, + 277, 278, 279, -34, 259, 14, 177, 15, 139, 175, + 177, 42, 89, 381, 4, -34, -34, 341, 237, 44, + 20, 34, 350, -34, -34, -34, -34, 177, 259, -34, + 16, 0, 378, 0, 359, 0, 0, 17, 0, 259, + 0, 0, 0, 0, 259, 0, 0, 0, 259, 259, + 0, 0, 0, 0, 0, 0, 0, 309, 0, 0, + 0, 0, 0, 315, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 326, 327, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 63, 0, 0, 64, 0, - 0, 65, 0, 66, 290, 0, 0, 0, 110, 111, - 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, - 122, 123, 249, 250, 0, 0, 251, 226, 0, 227, - 228, 131, 132, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 256, 0, 0, 252, 253, 0, 0, - 0, 0, 0, 0, 0, 0, 254, 255, 0, 0, + 0, 46, 47, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 346, 0, 348, 0, 0, 14, 352, + 15, 0, 223, 0, 0, 354, 355, 356, 0, 0, + 0, 0, 0, 224, 225, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 367, 368, 0, 0, + 0, 0, 0, 0, 375, 0, 0, 0, 0, 0, + 0, 379, 0, 110, 111, 112, 113, 114, 115, 116, + 117, 118, 119, 120, 121, 122, 123, 0, 0, 392, + 0, 0, 226, 0, 227, 228, 131, 132, 0, 0, + 0, 0, 0, 0, 0, 0, 229, 0, 0, 230, + 0, 231, 0, 407, 232, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 415, 0, 0, 0, 0, 419, + 0, 0, 0, 422, 423, 46, 47, 0, 93, 49, + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, + 60, 61, 14, 0, 15, 0, 46, 47, 0, 93, + 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, + 163, 60, 61, 14, 62, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 62, 0, 249, 250, 46, + 47, 251, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 14, 0, 15, 0, + 0, 252, 253, 0, 0, 0, 0, 63, 0, 0, + 64, 254, 255, 65, 0, 66, 94, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, + 0, 64, 0, 0, 65, 0, 66, 292, 0, 0, + 0, 110, 111, 112, 113, 114, 115, 116, 117, 118, + 119, 120, 121, 122, 123, 249, 250, 0, 0, 251, + 226, 0, 227, 228, 131, 132, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 256, 0, 252, + 253, 0, 0, 0, 0, 0, 0, 0, 0, 254, + 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 110, 111, 112, 113, - 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, - 0, 0, 0, 0, 0, 226, 0, 227, 228, 131, - 132, 0, 0, 0, 0, 0, 0, 0, 0, 46, - 47, 256, 93, 49, 50, 51, 52, 53, 54, 55, - 56, 57, 58, 59, 60, 61, 14, 0, 15, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 174, 0, 0, 0, 0, 0, 46, 47, 62, 93, - 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, - 59, 60, 61, 14, 0, 15, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 242, 0, 0, - 0, 0, 0, 0, 0, 62, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 63, 0, 0, 64, 0, 0, 65, 0, 66, 46, - 47, 0, 93, 153, 154, 155, 156, 157, 158, 159, - 160, 161, 162, 163, 60, 61, 14, 0, 15, 0, - 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, - 64, 0, 0, 65, 0, 66, 46, 47, 62, 93, - 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, - 59, 60, 61, 14, 0, 15, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 303, 0, 0, - 0, 0, 0, 0, 0, 62, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 63, 0, 0, 64, 0, 286, 65, 0, 66, 0, - 46, 47, 0, 93, 49, 50, 51, 52, 53, 54, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 110, + 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, + 121, 122, 123, 0, 0, 0, 0, 0, 226, 0, + 227, 228, 131, 132, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 46, 47, 256, 93, 49, 50, 51, + 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, + 14, 0, 15, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 174, 0, 0, 0, 0, 0, + 46, 47, 62, 93, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 14, 0, 15, - 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, - 64, 339, 0, 65, 0, 66, 0, 46, 47, 62, - 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, - 58, 59, 60, 61, 14, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 62, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 63, 0, 0, 64, 0, 0, 65, 0, 66, - 46, 47, 0, 93, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 59, 60, 61, 14, 0, 15, - 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, - 0, 64, 0, 0, 65, 0, 66, 46, 47, 62, + 0, 242, 0, 0, 0, 0, 0, 46, 47, 62, 93, 153, 154, 155, 156, 157, 158, 159, 160, 161, - 162, 163, 60, 61, 14, 0, 15, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 62, 0, 0, 0, + 162, 163, 60, 61, 14, 63, 15, 0, 64, 0, + 0, 65, 0, 66, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 46, 47, 62, 93, 49, 50, + 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, + 61, 14, 63, 15, 0, 64, 0, 0, 65, 0, + 66, 0, 0, 0, 0, 305, 0, 0, 0, 0, + 0, 46, 47, 62, 93, 49, 50, 51, 52, 53, + 54, 55, 56, 57, 58, 59, 60, 61, 14, 63, + 15, 0, 64, 0, 288, 65, 0, 66, 0, 0, + 0, 0, 340, 0, 0, 0, 0, 0, 46, 47, + 62, 48, 49, 50, 51, 52, 53, 54, 55, 56, + 57, 58, 59, 60, 61, 14, 63, 15, 0, 64, + 0, 0, 65, 0, 66, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 46, 47, 62, 93, 49, + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, + 60, 61, 14, 63, 15, 0, 64, 0, 0, 65, + 0, 66, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 46, 47, 62, 93, 153, 154, 155, 156, + 157, 158, 159, 160, 161, 162, 163, 60, 61, 14, + 63, 15, 0, 64, 0, 0, 65, 0, 66, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 46, + 47, 62, 180, 49, 50, 51, 52, 53, 54, 55, + 56, 57, 58, 59, 60, 61, 14, 63, 15, 0, + 64, 0, 0, 65, 0, 66, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 63, 0, 0, 64, 0, 0, 65, 0, 66, - 46, 47, 0, 180, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 59, 60, 61, 14, 0, 15, - 0, 100, 0, 0, 0, 0, 0, 0, 63, 0, - 0, 64, 101, 0, 65, 0, 66, 0, 0, 62, - 0, 0, 102, 103, 0, 0, 0, 0, 104, 105, - 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, - 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, - 126, 0, 0, 127, 128, 129, 130, 131, 132, 133, - 134, 135, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 63, 0, 0, 64, 0, 0, 65, 0, 66 + 0, 0, 0, 0, 63, 0, 0, 64, 0, 0, + 65, 0, 66, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 101, 0, 0, 0, 0, + 0, 63, 0, 0, 64, 102, 103, 65, 0, 66, + 0, 104, 105, 106, 107, 108, 109, 110, 111, 112, + 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, + 123, 124, 125, 126, 0, 0, 127, 128, 129, 130, + 131, 132, 133, 134, 135 }; static const short yycheck[] = { 26, - 2, 40, 23, 106, 101, 89, 106, 104, 15, 30, - 29, 66, 15, 40, 10, 11, 12, 13, 14, 15, - 16, 17, 230, 231, 387, 107, 101, 95, 30, 126, - 403, 106, 129, 130, 23, 9, 133, 134, 135, 0, - 413, 404, 139, 98, 95, 103, 53, 21, 256, 107, - 53, 10, 11, 12, 13, 14, 15, 16, 17, 141, - 97, 88, 32, 33, 25, 101, 68, 20, 4, 106, - 31, 107, 101, 103, 101, 95, 106, 104, 107, 40, - 41, 42, 43, 99, 105, 104, 95, 40, 41, 42, - 43, 103, 22, 46, 24, 107, 95, 124, 125, 126, - 127, 128, 129, 130, 97, 101, 133, 134, 135, 136, - 137, 138, 139, 97, 169, 170, 213, 172, 57, 58, - 59, 60, 51, 52, 5, 6, 4, 8, 9, 10, - 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, - 21, 22, 101, 24, 27, 28, 173, 10, 11, 12, - 13, 14, 15, 16, 17, 4, 195, 48, 49, 50, - 84, 85, 105, 44, 107, 105, 4, 107, 195, 3, - 4, 24, 211, 4, 271, 3, 4, 3, 4, 3, - 4, 278, 3, 4, 211, 212, 213, 24, 100, 100, - 97, 55, 247, 4, 4, 4, 4, 4, 107, 283, - 284, 285, 7, 7, 7, 98, 107, 107, 107, 293, - 294, 295, 296, 99, 98, 96, 35, 107, 99, 107, - 107, 102, 167, 104, 105, 107, 24, 107, 97, 97, - 97, 24, 177, 107, 107, 97, 97, 182, 183, 97, - 97, 243, 107, 270, 271, 272, 273, 274, 332, 194, - 21, 278, 107, 99, 199, 107, 353, 107, 21, 107, - 107, 97, 207, 208, 209, 4, 4, 97, 107, 35, - 53, 98, 107, 98, 301, 107, 373, 361, 107, 363, - 364, 365, 366, 53, 387, 312, 21, 387, 35, 107, - 107, 107, 107, 107, 107, 107, 4, 4, 99, 21, - 327, 404, 101, 98, 404, 107, 98, 107, 98, 98, - 98, 98, 396, 98, 65, 101, 107, 344, 21, 264, - 21, 21, 0, 268, 0, 107, 353, 18, 78, 78, - 357, 30, 78, 360, 279, 280, 78, 98, 42, 301, - 21, 2, 182, 183, 167, 13, 373, 312, 328, 357, - -1, -1, -1, -1, 194, -1, -1, -1, -1, 199, - 20, -1, 22, 308, 24, 310, -1, 207, 208, 209, - 315, 31, 32, 33, -1, -1, 321, 322, 323, -1, - 40, 41, 42, 43, -1, -1, 46, 47, -1, -1, - -1, -1, -1, -1, 54, -1, -1, 342, 343, -1, - -1, -1, -1, -1, -1, -1, 351, -1, -1, -1, - -1, -1, -1, 358, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 264, -1, -1, -1, 268, -1, - 375, -1, -1, -1, -1, -1, -1, -1, -1, 279, - 280, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 401, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 308, 414, - 310, -1, -1, -1, 419, 315, -1, -1, 423, 424, - -1, 321, 322, 323, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 342, 343, -1, -1, -1, -1, -1, -1, - -1, 351, -1, -1, -1, -1, -1, -1, 358, -1, - -1, -1, -1, 5, 6, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 375, -1, -1, -1, -1, - 22, -1, 24, -1, 26, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 37, 38, -1, -1, -1, - -1, 401, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 414, -1, -1, -1, -1, 419, - -1, -1, -1, 423, 424, 67, 68, 69, 70, 71, - 72, 73, 74, 75, 76, 77, 78, 79, 80, -1, - -1, -1, -1, -1, 86, -1, 88, 89, 90, 91, - -1, -1, -1, -1, -1, -1, -1, 99, -1, -1, - 102, -1, 104, -1, 5, 6, 108, 8, 9, 10, - 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, - 21, 22, -1, 24, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 44, 3, 4, 5, 6, 7, -1, + 2, 197, 388, 106, 40, 106, 23, 89, 15, 23, + 29, 9, 15, 40, 0, 101, 30, 403, 104, 66, + 48, 49, 50, 21, 107, 95, 230, 231, 30, 10, + 11, 12, 13, 14, 15, 16, 17, 95, 104, 25, + 126, 107, 20, 129, 130, 31, 53, 133, 134, 135, + 53, 98, 256, 139, 40, 41, 42, 43, 141, 96, + 95, 88, 40, 41, 42, 43, 68, 98, 46, 106, + 102, 22, 95, 24, 101, 107, 107, 104, 10, 11, + 12, 13, 14, 15, 16, 17, 105, 96, 96, 32, + 33, 4, 106, 102, 100, 96, 104, 124, 125, 126, + 127, 128, 129, 130, 95, 106, 133, 134, 135, 136, + 137, 138, 139, 96, 98, 167, 51, 52, 402, 102, + 96, 102, 169, 170, 171, 177, 410, 213, 104, 4, + 182, 183, 10, 11, 12, 13, 14, 15, 16, 17, + 84, 85, 194, 27, 28, 4, 173, 199, 3, 4, + 346, 4, 348, 3, 4, 207, 208, 209, 98, 195, + 57, 58, 59, 60, 3, 4, 3, 4, 195, 4, + 102, 3, 4, 24, 101, 211, 24, 101, 98, 55, + 4, 4, 4, 4, 211, 212, 213, 273, 7, 7, + 4, 7, 96, 99, 280, 96, 96, 100, 96, 35, + 247, 96, 96, 285, 286, 287, 96, 96, 96, 24, + 96, 24, 264, 295, 296, 297, 298, 98, 270, 98, + 100, 98, 21, 21, 98, 98, 98, 98, 98, 281, + 282, 99, 96, 96, 96, 96, 96, 4, 96, 96, + 96, 243, 96, 35, 96, 272, 273, 274, 275, 276, + 332, 98, 96, 280, 96, 96, 96, 100, 310, 53, + 312, 99, 96, 96, 316, 96, 96, 353, 21, 96, + 322, 323, 324, 99, 102, 35, 303, 102, 21, 361, + 21, 363, 364, 365, 366, 388, 313, 388, 374, 99, + 99, 343, 344, 99, 99, 182, 183, 99, 99, 351, + 403, 328, 403, 99, 65, 96, 358, 194, 96, 21, + 21, 0, 199, 395, 0, 78, 78, 30, 345, 78, + 207, 208, 209, 20, 376, 22, 353, 24, 78, 98, + 357, 18, 42, 360, 31, 32, 33, 303, 167, 21, + 2, 13, 313, 40, 41, 42, 43, 374, 400, 46, + 47, -1, 357, -1, 329, -1, -1, 54, -1, 411, + -1, -1, -1, -1, 416, -1, -1, -1, 420, 421, + -1, -1, -1, -1, -1, -1, -1, 264, -1, -1, + -1, -1, -1, 270, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 281, 282, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 22, -1, 24, -1, -1, 27, 28, - -1, -1, -1, -1, -1, -1, -1, -1, 37, 38, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 96, -1, -1, 99, -1, - -1, 102, -1, 104, 105, -1, -1, -1, 67, 68, - 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, - 79, 80, 3, 4, -1, -1, 7, 86, -1, 88, - 89, 90, 91, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 102, -1, -1, 27, 28, -1, -1, - -1, -1, -1, -1, -1, -1, 37, 38, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 67, 68, 69, 70, - 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, - -1, -1, -1, -1, -1, 86, -1, 88, 89, 90, - 91, -1, -1, -1, -1, -1, -1, -1, -1, 5, - 6, 102, 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, -1, 24, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 36, -1, -1, -1, -1, -1, 5, 6, 44, 8, + -1, 5, 6, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 310, -1, 312, -1, -1, 22, 316, + 24, -1, 26, -1, -1, 322, 323, 324, -1, -1, + -1, -1, -1, 37, 38, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 343, 344, -1, -1, + -1, -1, -1, -1, 351, -1, -1, -1, -1, -1, + -1, 358, -1, 67, 68, 69, 70, 71, 72, 73, + 74, 75, 76, 77, 78, 79, 80, -1, -1, 376, + -1, -1, 86, -1, 88, 89, 90, 91, -1, -1, + -1, -1, -1, -1, -1, -1, 100, -1, -1, 103, + -1, 105, -1, 400, 108, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 411, -1, -1, -1, -1, 416, + -1, -1, -1, 420, 421, 5, 6, -1, 8, 9, + 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, + 20, 21, 22, -1, 24, -1, 5, 6, -1, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, - 19, 20, 21, 22, -1, 24, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 36, -1, -1, - -1, -1, -1, -1, -1, 44, -1, -1, -1, -1, + 19, 20, 21, 22, 44, 24, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 96, -1, -1, 99, -1, -1, 102, -1, 104, 5, - 6, -1, 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, -1, 24, -1, - -1, -1, -1, -1, -1, -1, -1, 96, -1, -1, - 99, -1, -1, 102, -1, 104, 5, 6, 44, 8, - 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, - 19, 20, 21, 22, -1, 24, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 36, -1, -1, - -1, -1, -1, -1, -1, 44, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 44, -1, 3, 4, 5, + 6, 7, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 22, -1, 24, -1, + -1, 27, 28, -1, -1, -1, -1, 97, -1, -1, + 100, 37, 38, 103, -1, 105, 106, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 97, -1, + -1, 100, -1, -1, 103, -1, 105, 106, -1, -1, + -1, 67, 68, 69, 70, 71, 72, 73, 74, 75, + 76, 77, 78, 79, 80, 3, 4, -1, -1, 7, + 86, -1, 88, 89, 90, 91, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 103, -1, 27, + 28, -1, -1, -1, -1, -1, -1, -1, -1, 37, + 38, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 96, -1, -1, 99, -1, 101, 102, -1, 104, -1, - 5, 6, -1, 8, 9, 10, 11, 12, 13, 14, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 67, + 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, + 78, 79, 80, -1, -1, -1, -1, -1, 86, -1, + 88, 89, 90, 91, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 5, 6, 103, 8, 9, 10, 11, + 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, + 22, -1, 24, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 36, -1, -1, -1, -1, -1, + 5, 6, 44, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, -1, 24, - -1, -1, -1, -1, -1, -1, -1, 96, -1, -1, - 99, 36, -1, 102, -1, 104, -1, 5, 6, 44, - 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, - 18, 19, 20, 21, 22, -1, 24, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 44, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 96, -1, -1, 99, -1, -1, 102, -1, 104, - 5, 6, -1, 8, 9, 10, 11, 12, 13, 14, - 15, 16, 17, 18, 19, 20, 21, 22, -1, 24, - -1, -1, -1, -1, -1, -1, -1, -1, 96, -1, - -1, 99, -1, -1, 102, -1, 104, 5, 6, 44, + -1, 36, -1, -1, -1, -1, -1, 5, 6, 44, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, - 18, 19, 20, 21, 22, -1, 24, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 44, -1, -1, -1, + 18, 19, 20, 21, 22, 97, 24, -1, 100, -1, + -1, 103, -1, 105, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 5, 6, 44, 8, 9, 10, + 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, + 21, 22, 97, 24, -1, 100, -1, -1, 103, -1, + 105, -1, -1, -1, -1, 36, -1, -1, -1, -1, + -1, 5, 6, 44, 8, 9, 10, 11, 12, 13, + 14, 15, 16, 17, 18, 19, 20, 21, 22, 97, + 24, -1, 100, -1, 102, 103, -1, 105, -1, -1, + -1, -1, 36, -1, -1, -1, -1, -1, 5, 6, + 44, 8, 9, 10, 11, 12, 13, 14, 15, 16, + 17, 18, 19, 20, 21, 22, 97, 24, -1, 100, + -1, -1, 103, -1, 105, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 5, 6, 44, 8, 9, + 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, + 20, 21, 22, 97, 24, -1, 100, -1, -1, 103, + -1, 105, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 5, 6, 44, 8, 9, 10, 11, 12, + 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, + 97, 24, -1, 100, -1, -1, 103, -1, 105, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 5, + 6, 44, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 97, 24, -1, + 100, -1, -1, 103, -1, 105, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 44, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 96, -1, -1, 99, -1, -1, 102, -1, 104, - 5, 6, -1, 8, 9, 10, 11, 12, 13, 14, - 15, 16, 17, 18, 19, 20, 21, 22, -1, 24, - -1, 34, -1, -1, -1, -1, -1, -1, 96, -1, - -1, 99, 45, -1, 102, -1, 104, -1, -1, 44, - -1, -1, 55, 56, -1, -1, -1, -1, 61, 62, - 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, - 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, - 83, -1, -1, 86, 87, 88, 89, 90, 91, 92, - 93, 94, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 96, -1, -1, 99, -1, -1, 102, -1, 104 + -1, -1, -1, -1, 97, -1, -1, 100, -1, -1, + 103, -1, 105, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 34, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 45, -1, -1, -1, -1, + -1, 97, -1, -1, 100, 55, 56, 103, -1, 105, + -1, 61, 62, 63, 64, 65, 66, 67, 68, 69, + 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, -1, -1, 86, 87, 88, 89, + 90, 91, 92, 93, 94 }; /* -*-C-*- Note some compilers choke on comments on `#line' lines. */ #line 3 "/usr/share/bison.simple" @@ -2259,42 +2234,50 @@ yyval.UIntVal = yyvsp[0].UInt64Val; ; break;} +case 45: +#line 1040 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.UIntVal = 0; ; + break;} case 46: -#line 1045 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" -{ yyval.TypeVal = new PATypeHolder(yyvsp[0].PrimType); ; +#line 1041 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.UIntVal = yyvsp[0].UInt64Val; ; break;} case 48: -#line 1046 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1050 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.TypeVal = new PATypeHolder(yyvsp[0].PrimType); ; + break;} +case 50: +#line 1051 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.TypeVal = new PATypeHolder(yyvsp[0].PrimType); ; break;} -case 49: -#line 1048 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 51: +#line 1053 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) ThrowException("Invalid upreference in type: " + (*yyvsp[0].TypeVal)->getDescription()); yyval.TypeVal = yyvsp[0].TypeVal; ; break;} -case 63: -#line 1059 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 65: +#line 1064 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.TypeVal = new PATypeHolder(OpaqueType::get()); ; break;} -case 64: -#line 1062 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 66: +#line 1067 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.TypeVal = new PATypeHolder(yyvsp[0].PrimType); ; break;} -case 65: -#line 1065 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 67: +#line 1070 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Named types are also simple types... yyval.TypeVal = new PATypeHolder(getTypeVal(yyvsp[0].ValIDVal)); ; break;} -case 66: -#line 1071 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 68: +#line 1076 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Type UpReference if (yyvsp[0].UInt64Val > (uint64_t)~0U) ThrowException("Value out of range!"); OpaqueType *OT = OpaqueType::get(); // Use temporary placeholder @@ -2303,8 +2286,8 @@ UR_OUT("New Upreference!\n"); ; break;} -case 67: -#line 1078 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 69: +#line 1083 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Function derived type? std::vector Params; for (std::list::iterator I = yyvsp[-1].TypeList->begin(), @@ -2318,15 +2301,15 @@ delete yyvsp[-3].TypeVal; // Delete the return type handle ; break;} -case 68: -#line 1090 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 70: +#line 1095 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Sized array type? yyval.TypeVal = new PATypeHolder(HandleUpRefs(ArrayType::get(*yyvsp[-1].TypeVal, (unsigned)yyvsp[-3].UInt64Val))); delete yyvsp[-1].TypeVal; ; break;} -case 69: -#line 1094 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 71: +#line 1099 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Packed array type? const llvm::Type* ElemTy = yyvsp[-1].TypeVal->get(); if ((unsigned)yyvsp[-3].UInt64Val != yyvsp[-3].UInt64Val) { @@ -2339,8 +2322,8 @@ delete yyvsp[-1].TypeVal; ; break;} -case 70: -#line 1105 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 72: +#line 1110 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Structure type? std::vector Elements; for (std::list::iterator I = yyvsp[-1].TypeList->begin(), @@ -2351,52 +2334,52 @@ delete yyvsp[-1].TypeList; ; break;} -case 71: -#line 1114 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 73: +#line 1119 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Empty structure type? yyval.TypeVal = new PATypeHolder(StructType::get(std::vector())); ; break;} -case 72: -#line 1117 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 74: +#line 1122 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Pointer type? yyval.TypeVal = new PATypeHolder(HandleUpRefs(PointerType::get(*yyvsp[-1].TypeVal))); delete yyvsp[-1].TypeVal; ; break;} -case 73: -#line 1125 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 75: +#line 1130 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.TypeList = new std::list(); yyval.TypeList->push_back(*yyvsp[0].TypeVal); delete yyvsp[0].TypeVal; ; break;} -case 74: -#line 1129 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 76: +#line 1134 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeList=yyvsp[-2].TypeList)->push_back(*yyvsp[0].TypeVal); delete yyvsp[0].TypeVal; ; break;} -case 76: -#line 1135 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 78: +#line 1140 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeList=yyvsp[-2].TypeList)->push_back(Type::VoidTy); ; break;} -case 77: -#line 1138 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 79: +#line 1143 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeList = new std::list())->push_back(Type::VoidTy); ; break;} -case 78: -#line 1141 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 80: +#line 1146 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.TypeList = new std::list(); ; break;} -case 79: -#line 1151 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 81: +#line 1156 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Nonempty unsized arr const ArrayType *ATy = dyn_cast(yyvsp[-3].TypeVal->get()); if (ATy == 0) @@ -2423,8 +2406,8 @@ delete yyvsp[-3].TypeVal; delete yyvsp[-1].ConstVector; ; break;} -case 80: -#line 1176 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 82: +#line 1181 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { const ArrayType *ATy = dyn_cast(yyvsp[-2].TypeVal->get()); if (ATy == 0) @@ -2439,8 +2422,8 @@ delete yyvsp[-2].TypeVal; ; break;} -case 81: -#line 1189 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 83: +#line 1194 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { const ArrayType *ATy = dyn_cast(yyvsp[-2].TypeVal->get()); if (ATy == 0) @@ -2470,8 +2453,8 @@ delete yyvsp[-2].TypeVal; ; break;} -case 82: -#line 1217 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 84: +#line 1222 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Nonempty unsized arr const PackedType *PTy = dyn_cast(yyvsp[-3].TypeVal->get()); if (PTy == 0) @@ -2498,8 +2481,8 @@ delete yyvsp[-3].TypeVal; delete yyvsp[-1].ConstVector; ; break;} -case 83: -#line 1242 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 85: +#line 1247 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { const StructType *STy = dyn_cast(yyvsp[-3].TypeVal->get()); if (STy == 0) @@ -2521,8 +2504,8 @@ delete yyvsp[-3].TypeVal; delete yyvsp[-1].ConstVector; ; break;} -case 84: -#line 1262 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 86: +#line 1267 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { const StructType *STy = dyn_cast(yyvsp[-2].TypeVal->get()); if (STy == 0) @@ -2536,8 +2519,8 @@ delete yyvsp[-2].TypeVal; ; break;} -case 85: -#line 1274 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 87: +#line 1279 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { const PointerType *PTy = dyn_cast(yyvsp[-1].TypeVal->get()); if (PTy == 0) @@ -2548,15 +2531,15 @@ delete yyvsp[-1].TypeVal; ; break;} -case 86: -#line 1283 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 88: +#line 1288 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.ConstVal = UndefValue::get(yyvsp[-1].TypeVal->get()); delete yyvsp[-1].TypeVal; ; break;} -case 87: -#line 1287 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 89: +#line 1292 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { const PointerType *Ty = dyn_cast(yyvsp[-1].TypeVal->get()); if (Ty == 0) @@ -2617,8 +2600,8 @@ delete yyvsp[-1].TypeVal; // Free the type handle ; break;} -case 88: -#line 1346 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 90: +#line 1351 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (yyvsp[-1].TypeVal->get() != yyvsp[0].ConstVal->getType()) ThrowException("Mismatched types for constant expression!"); @@ -2626,8 +2609,8 @@ delete yyvsp[-1].TypeVal; ; break;} -case 89: -#line 1352 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 91: +#line 1357 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { const Type *Ty = yyvsp[-1].TypeVal->get(); if (isa(Ty) || Ty == Type::LabelTy || isa(Ty)) @@ -2636,44 +2619,44 @@ delete yyvsp[-1].TypeVal; ; break;} -case 90: -#line 1360 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 92: +#line 1365 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // integral constants if (!ConstantSInt::isValueValidForType(yyvsp[-1].PrimType, yyvsp[0].SInt64Val)) ThrowException("Constant value doesn't fit in type!"); yyval.ConstVal = ConstantSInt::get(yyvsp[-1].PrimType, yyvsp[0].SInt64Val); ; break;} -case 91: -#line 1365 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 93: +#line 1370 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // integral constants if (!ConstantUInt::isValueValidForType(yyvsp[-1].PrimType, yyvsp[0].UInt64Val)) ThrowException("Constant value doesn't fit in type!"); yyval.ConstVal = ConstantUInt::get(yyvsp[-1].PrimType, yyvsp[0].UInt64Val); ; break;} -case 92: -#line 1370 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 94: +#line 1375 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Boolean constants yyval.ConstVal = ConstantBool::True; ; break;} -case 93: -#line 1373 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 95: +#line 1378 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Boolean constants yyval.ConstVal = ConstantBool::False; ; break;} -case 94: -#line 1376 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 96: +#line 1381 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Float & Double constants if (!ConstantFP::isValueValidForType(yyvsp[-1].PrimType, yyvsp[0].FPVal)) ThrowException("Floating point constant invalid for type!!"); yyval.ConstVal = ConstantFP::get(yyvsp[-1].PrimType, yyvsp[0].FPVal); ; break;} -case 95: -#line 1383 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 97: +#line 1388 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!yyvsp[-3].ConstVal->getType()->isFirstClassType()) ThrowException("cast constant expression from a non-primitive type: '" + @@ -2685,8 +2668,8 @@ delete yyvsp[-1].TypeVal; ; break;} -case 96: -#line 1393 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 98: +#line 1398 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!isa(yyvsp[-2].ConstVal->getType())) ThrowException("GetElementPtr requires a pointer operand!"); @@ -2719,8 +2702,8 @@ yyval.ConstVal = ConstantExpr::getGetElementPtr(yyvsp[-2].ConstVal, IdxVec); ; break;} -case 97: -#line 1424 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 99: +#line 1429 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (yyvsp[-5].ConstVal->getType() != Type::BoolTy) ThrowException("Select condition must be of boolean type!"); @@ -2729,8 +2712,8 @@ yyval.ConstVal = ConstantExpr::getSelect(yyvsp[-5].ConstVal, yyvsp[-3].ConstVal, yyvsp[-1].ConstVal); ; break;} -case 98: -#line 1431 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 100: +#line 1436 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (yyvsp[-3].ConstVal->getType() != yyvsp[-1].ConstVal->getType()) ThrowException("Binary operator types must match!"); @@ -2753,8 +2736,8 @@ } ; break;} -case 99: -#line 1452 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 101: +#line 1457 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (yyvsp[-3].ConstVal->getType() != yyvsp[-1].ConstVal->getType()) ThrowException("Logical operator types must match!"); @@ -2763,16 +2746,16 @@ yyval.ConstVal = ConstantExpr::get(yyvsp[-5].BinaryOpVal, yyvsp[-3].ConstVal, yyvsp[-1].ConstVal); ; break;} -case 100: -#line 1459 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 102: +#line 1464 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (yyvsp[-3].ConstVal->getType() != yyvsp[-1].ConstVal->getType()) ThrowException("setcc operand types must match!"); yyval.ConstVal = ConstantExpr::get(yyvsp[-5].BinaryOpVal, yyvsp[-3].ConstVal, yyvsp[-1].ConstVal); ; break;} -case 101: -#line 1464 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 103: +#line 1469 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (yyvsp[-1].ConstVal->getType() != Type::UByteTy) ThrowException("Shift count for shift constant must be unsigned byte!"); @@ -2781,55 +2764,55 @@ yyval.ConstVal = ConstantExpr::get(yyvsp[-5].OtherOpVal, yyvsp[-3].ConstVal, yyvsp[-1].ConstVal); ; break;} -case 102: -#line 1474 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 104: +#line 1479 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ConstVector = yyvsp[-2].ConstVector)->push_back(yyvsp[0].ConstVal); ; break;} -case 103: -#line 1477 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 105: +#line 1482 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.ConstVector = new std::vector(); yyval.ConstVector->push_back(yyvsp[0].ConstVal); ; break;} -case 104: -#line 1484 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 106: +#line 1489 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.BoolVal = false; ; break;} -case 105: -#line 1484 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 107: +#line 1489 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.BoolVal = true; ; break;} -case 106: -#line 1494 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 108: +#line 1499 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.ModuleVal = ParserResult = yyvsp[0].ModuleVal; CurModule.ModuleDone(); ; break;} -case 107: -#line 1501 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 109: +#line 1506 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.ModuleVal = yyvsp[-1].ModuleVal; CurFun.FunctionDone(); ; break;} -case 108: -#line 1505 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 110: +#line 1510 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.ModuleVal = yyvsp[-1].ModuleVal; ; break;} -case 109: -#line 1508 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 111: +#line 1513 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.ModuleVal = yyvsp[-1].ModuleVal; ; break;} -case 110: -#line 1511 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 112: +#line 1516 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.ModuleVal = CurModule.CurrentModule; // Emit an error if there are any unresolved types left. @@ -2842,8 +2825,8 @@ } ; break;} -case 111: -#line 1524 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 113: +#line 1529 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Eagerly resolve types. This is not an optimization, this is a // requirement that is due to the fact that we could have this: @@ -2865,56 +2848,56 @@ delete yyvsp[0].TypeVal; ; break;} -case 112: -#line 1544 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 114: +#line 1549 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Function prototypes can be in const pool ; break;} -case 113: -#line 1546 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 115: +#line 1551 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (yyvsp[0].ConstVal == 0) ThrowException("Global value initializer is not a constant!"); ParseGlobalVariable(yyvsp[-3].StrVal, yyvsp[-2].Linkage, yyvsp[-1].BoolVal, yyvsp[0].ConstVal->getType(), yyvsp[0].ConstVal); ; break;} -case 114: -#line 1550 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 116: +#line 1555 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { ParseGlobalVariable(yyvsp[-3].StrVal, GlobalValue::ExternalLinkage, yyvsp[-1].BoolVal, *yyvsp[0].TypeVal, 0); delete yyvsp[0].TypeVal; ; break;} -case 115: -#line 1554 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 117: +#line 1559 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { ; break;} -case 116: -#line 1556 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 118: +#line 1561 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { ; break;} -case 117: -#line 1558 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 119: +#line 1563 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { ; break;} -case 118: -#line 1563 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 120: +#line 1568 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.Endianness = Module::BigEndian; ; break;} -case 119: -#line 1564 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 121: +#line 1569 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.Endianness = Module::LittleEndian; ; break;} -case 120: -#line 1566 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 122: +#line 1571 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { CurModule.CurrentModule->setEndianness(yyvsp[0].Endianness); ; break;} -case 121: -#line 1569 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 123: +#line 1574 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (yyvsp[0].UInt64Val == 32) CurModule.CurrentModule->setPointerSize(Module::Pointer32); @@ -2924,89 +2907,89 @@ ThrowException("Invalid pointer size: '" + utostr(yyvsp[0].UInt64Val) + "'!"); ; break;} -case 122: -#line 1577 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 124: +#line 1582 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { CurModule.CurrentModule->setTargetTriple(yyvsp[0].StrVal); free(yyvsp[0].StrVal); ; break;} -case 124: -#line 1584 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 126: +#line 1589 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { CurModule.CurrentModule->addLibrary(yyvsp[0].StrVal); free(yyvsp[0].StrVal); ; break;} -case 125: -#line 1588 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 127: +#line 1593 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { CurModule.CurrentModule->addLibrary(yyvsp[0].StrVal); free(yyvsp[0].StrVal); ; break;} -case 126: -#line 1592 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 128: +#line 1597 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { ; break;} -case 130: -#line 1601 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 132: +#line 1606 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.StrVal = 0; ; break;} -case 131: -#line 1603 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 133: +#line 1608 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (*yyvsp[-1].TypeVal == Type::VoidTy) ThrowException("void typed arguments are invalid!"); yyval.ArgVal = new std::pair(yyvsp[-1].TypeVal, yyvsp[0].StrVal); ; break;} -case 132: -#line 1609 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 134: +#line 1614 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.ArgList = yyvsp[-2].ArgList; yyvsp[-2].ArgList->push_back(*yyvsp[0].ArgVal); delete yyvsp[0].ArgVal; ; break;} -case 133: -#line 1614 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 135: +#line 1619 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.ArgList = new std::vector >(); yyval.ArgList->push_back(*yyvsp[0].ArgVal); delete yyvsp[0].ArgVal; ; break;} -case 134: -#line 1620 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 136: +#line 1625 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.ArgList = yyvsp[0].ArgList; ; break;} -case 135: -#line 1623 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 137: +#line 1628 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.ArgList = yyvsp[-2].ArgList; yyval.ArgList->push_back(std::pair(new PATypeHolder(Type::VoidTy), 0)); ; break;} -case 136: -#line 1628 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 138: +#line 1633 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.ArgList = new std::vector >(); yyval.ArgList->push_back(std::make_pair(new PATypeHolder(Type::VoidTy), (char*)0)); ; break;} -case 137: -#line 1632 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 139: +#line 1637 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.ArgList = 0; ; break;} -case 138: -#line 1636 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 140: +#line 1641 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { UnEscapeLexed(yyvsp[-3].StrVal); std::string FunctionName(yyvsp[-3].StrVal); @@ -3087,8 +3070,8 @@ } ; break;} -case 141: -#line 1718 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 143: +#line 1723 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.FunctionVal = CurFun.CurrentFunction; @@ -3097,67 +3080,67 @@ yyval.FunctionVal->setLinkage(yyvsp[-2].Linkage); ; break;} -case 144: -#line 1728 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 146: +#line 1733 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.FunctionVal = yyvsp[-1].FunctionVal; ; break;} -case 145: -#line 1732 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 147: +#line 1737 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { CurFun.isDeclare = true; ; break;} -case 146: -#line 1732 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 148: +#line 1737 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.FunctionVal = CurFun.CurrentFunction; CurFun.FunctionDone(); ; break;} -case 147: -#line 1741 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 149: +#line 1746 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // A reference to a direct constant yyval.ValIDVal = ValID::create(yyvsp[0].SInt64Val); ; break;} -case 148: -#line 1744 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 150: +#line 1749 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.ValIDVal = ValID::create(yyvsp[0].UInt64Val); ; break;} -case 149: -#line 1747 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 151: +#line 1752 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Perhaps it's an FP constant? yyval.ValIDVal = ValID::create(yyvsp[0].FPVal); ; break;} -case 150: -#line 1750 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 152: +#line 1755 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.ValIDVal = ValID::create(ConstantBool::True); ; break;} -case 151: -#line 1753 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 153: +#line 1758 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.ValIDVal = ValID::create(ConstantBool::False); ; break;} -case 152: -#line 1756 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 154: +#line 1761 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.ValIDVal = ValID::createNull(); ; break;} -case 153: -#line 1759 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 155: +#line 1764 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.ValIDVal = ValID::createUndef(); ; break;} -case 154: -#line 1762 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 156: +#line 1767 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Nonempty unsized packed vector const Type *ETy = (*yyvsp[-1].ConstVector)[0]->getType(); int NumElements = yyvsp[-1].ConstVector->size(); @@ -3183,44 +3166,44 @@ delete PTy; delete yyvsp[-1].ConstVector; ; break;} -case 155: -#line 1786 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 157: +#line 1791 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.ValIDVal = ValID::create(yyvsp[0].ConstVal); ; break;} -case 156: -#line 1793 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 158: +#line 1798 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Is it an integer reference...? yyval.ValIDVal = ValID::create(yyvsp[0].SIntVal); ; break;} -case 157: -#line 1796 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 159: +#line 1801 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Is it a named reference...? yyval.ValIDVal = ValID::create(yyvsp[0].StrVal); ; break;} -case 160: -#line 1807 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 162: +#line 1812 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.ValueVal = getVal(*yyvsp[-1].TypeVal, yyvsp[0].ValIDVal); delete yyvsp[-1].TypeVal; ; break;} -case 161: -#line 1811 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 163: +#line 1816 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.FunctionVal = yyvsp[-1].FunctionVal; ; break;} -case 162: -#line 1814 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 164: +#line 1819 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Do not allow functions with 0 basic blocks yyval.FunctionVal = yyvsp[-1].FunctionVal; ; break;} -case 163: -#line 1822 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 165: +#line 1827 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { setValueName(yyvsp[0].TermInstVal, yyvsp[-1].StrVal); InsertValue(yyvsp[0].TermInstVal); @@ -3230,15 +3213,15 @@ yyval.BasicBlockVal = yyvsp[-2].BasicBlockVal; ; break;} -case 164: -#line 1831 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 166: +#line 1836 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyvsp[-1].BasicBlockVal->getInstList().push_back(yyvsp[0].InstVal); yyval.BasicBlockVal = yyvsp[-1].BasicBlockVal; ; break;} -case 165: -#line 1835 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 167: +#line 1840 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.BasicBlockVal = CurBB = getBBVal(ValID::create((int)CurFun.NextBBNum++), true); @@ -3250,8 +3233,8 @@ BBL.splice(BBL.end(), BBL, yyval.BasicBlockVal); ; break;} -case 166: -#line 1845 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 168: +#line 1850 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.BasicBlockVal = CurBB = getBBVal(ValID::create(yyvsp[0].StrVal), true); @@ -3263,32 +3246,32 @@ BBL.splice(BBL.end(), BBL, yyval.BasicBlockVal); ; break;} -case 167: -#line 1856 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 169: +#line 1861 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Return with a result... yyval.TermInstVal = new ReturnInst(yyvsp[0].ValueVal); ; break;} -case 168: -#line 1859 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 170: +#line 1864 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Return with no result... yyval.TermInstVal = new ReturnInst(); ; break;} -case 169: -#line 1862 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 171: +#line 1867 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Unconditional Branch... yyval.TermInstVal = new BranchInst(getBBVal(yyvsp[0].ValIDVal)); ; break;} -case 170: -#line 1865 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 172: +#line 1870 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.TermInstVal = new BranchInst(getBBVal(yyvsp[-3].ValIDVal), getBBVal(yyvsp[0].ValIDVal), getVal(Type::BoolTy, yyvsp[-6].ValIDVal)); ; break;} -case 171: -#line 1868 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 173: +#line 1873 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { SwitchInst *S = new SwitchInst(getVal(yyvsp[-7].PrimType, yyvsp[-6].ValIDVal), getBBVal(yyvsp[-3].ValIDVal), yyvsp[-1].JumpTable->size()); yyval.TermInstVal = S; @@ -3304,15 +3287,15 @@ delete yyvsp[-1].JumpTable; ; break;} -case 172: -#line 1882 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 174: +#line 1887 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { SwitchInst *S = new SwitchInst(getVal(yyvsp[-6].PrimType, yyvsp[-5].ValIDVal), getBBVal(yyvsp[-2].ValIDVal), 0); yyval.TermInstVal = S; ; break;} -case 173: -#line 1887 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 175: +#line 1892 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { const PointerType *PFTy; const FunctionType *Ty; @@ -3366,20 +3349,20 @@ delete yyvsp[-7].ValueList; ; break;} -case 174: -#line 1939 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 176: +#line 1944 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.TermInstVal = new UnwindInst(); ; break;} -case 175: -#line 1942 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 177: +#line 1947 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.TermInstVal = new UnreachableInst(); ; break;} -case 176: -#line 1948 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 178: +#line 1953 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.JumpTable = yyvsp[-5].JumpTable; Constant *V = cast(getValNonImprovising(yyvsp[-4].PrimType, yyvsp[-3].ValIDVal)); @@ -3389,8 +3372,8 @@ yyval.JumpTable->push_back(std::make_pair(V, getBBVal(yyvsp[0].ValIDVal))); ; break;} -case 177: -#line 1956 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 179: +#line 1961 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.JumpTable = new std::vector >(); Constant *V = cast(getValNonImprovising(yyvsp[-4].PrimType, yyvsp[-3].ValIDVal)); @@ -3401,8 +3384,8 @@ yyval.JumpTable->push_back(std::make_pair(V, getBBVal(yyvsp[0].ValIDVal))); ; break;} -case 178: -#line 1966 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 180: +#line 1971 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Is this definition named?? if so, assign the name... setValueName(yyvsp[0].InstVal, yyvsp[-1].StrVal); @@ -3410,54 +3393,54 @@ yyval.InstVal = yyvsp[0].InstVal; ; break;} -case 179: -#line 1973 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 181: +#line 1978 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Used for PHI nodes yyval.PHIList = new std::list >(); yyval.PHIList->push_back(std::make_pair(getVal(*yyvsp[-5].TypeVal, yyvsp[-3].ValIDVal), getBBVal(yyvsp[-1].ValIDVal))); delete yyvsp[-5].TypeVal; ; break;} -case 180: -#line 1978 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 182: +#line 1983 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.PHIList = yyvsp[-6].PHIList; yyvsp[-6].PHIList->push_back(std::make_pair(getVal(yyvsp[-6].PHIList->front().first->getType(), yyvsp[-3].ValIDVal), getBBVal(yyvsp[-1].ValIDVal))); ; break;} -case 181: -#line 1985 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 183: +#line 1990 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Used for call statements, and memory insts... yyval.ValueList = new std::vector(); yyval.ValueList->push_back(yyvsp[0].ValueVal); ; break;} -case 182: -#line 1989 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 184: +#line 1994 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.ValueList = yyvsp[-2].ValueList; yyvsp[-2].ValueList->push_back(yyvsp[0].ValueVal); ; break;} -case 184: -#line 1995 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 186: +#line 2000 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.ValueList = 0; ; break;} -case 185: -#line 1997 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 187: +#line 2002 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.BoolVal = true; ; break;} -case 186: -#line 2000 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 188: +#line 2005 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.BoolVal = false; ; break;} -case 187: -#line 2006 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 189: +#line 2011 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!(*yyvsp[-3].TypeVal)->isInteger() && !(*yyvsp[-3].TypeVal)->isFloatingPoint() && !isa((*yyvsp[-3].TypeVal).get())) @@ -3471,8 +3454,8 @@ delete yyvsp[-3].TypeVal; ; break;} -case 188: -#line 2018 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 190: +#line 2023 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!(*yyvsp[-3].TypeVal)->isIntegral()) ThrowException("Logical operator requires integral operands!"); @@ -3482,8 +3465,8 @@ delete yyvsp[-3].TypeVal; ; break;} -case 189: -#line 2026 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 191: +#line 2031 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if(isa((*yyvsp[-3].TypeVal).get())) { ThrowException( @@ -3495,8 +3478,8 @@ delete yyvsp[-3].TypeVal; ; break;} -case 190: -#line 2036 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 192: +#line 2041 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { std::cerr << "WARNING: Use of eliminated 'not' instruction:" << " Replacing with 'xor'.\n"; @@ -3510,8 +3493,8 @@ ThrowException("Could not create a xor instruction!"); ; break;} -case 191: -#line 2048 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 193: +#line 2053 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (yyvsp[0].ValueVal->getType() != Type::UByteTy) ThrowException("Shift amount must be ubyte!"); @@ -3520,8 +3503,8 @@ yyval.InstVal = new ShiftInst(yyvsp[-3].OtherOpVal, yyvsp[-2].ValueVal, yyvsp[0].ValueVal); ; break;} -case 192: -#line 2055 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 194: +#line 2060 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!yyvsp[0].TypeVal->get()->isFirstClassType()) ThrowException("cast instruction to a non-primitive type: '" + @@ -3530,8 +3513,8 @@ delete yyvsp[0].TypeVal; ; break;} -case 193: -#line 2062 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 195: +#line 2067 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (yyvsp[-4].ValueVal->getType() != Type::BoolTy) ThrowException("select condition must be boolean!"); @@ -3540,16 +3523,16 @@ yyval.InstVal = new SelectInst(yyvsp[-4].ValueVal, yyvsp[-2].ValueVal, yyvsp[0].ValueVal); ; break;} -case 194: -#line 2069 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 196: +#line 2074 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { NewVarArgs = true; yyval.InstVal = new VAArgInst(yyvsp[-2].ValueVal, *yyvsp[0].TypeVal); delete yyvsp[0].TypeVal; ; break;} -case 195: -#line 2074 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 197: +#line 2079 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { ObsoleteVarArgs = true; const Type* ArgTy = yyvsp[-2].ValueVal->getType(); @@ -3570,8 +3553,8 @@ delete yyvsp[0].TypeVal; ; break;} -case 196: -#line 2093 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 198: +#line 2098 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { ObsoleteVarArgs = true; const Type* ArgTy = yyvsp[-2].ValueVal->getType(); @@ -3595,8 +3578,8 @@ delete yyvsp[0].TypeVal; ; break;} -case 197: -#line 2115 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 199: +#line 2120 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { const Type *Ty = yyvsp[0].PHIList->front().first->getType(); if (!Ty->isFirstClassType()) @@ -3612,8 +3595,8 @@ delete yyvsp[0].PHIList; // Free the list... ; break;} -case 198: -#line 2129 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 200: +#line 2134 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { const PointerType *PFTy; const FunctionType *Ty; @@ -3672,115 +3655,87 @@ delete yyvsp[-1].ValueList; ; break;} -case 199: -#line 2186 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 201: +#line 2191 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.InstVal = yyvsp[0].InstVal; ; break;} -case 200: -#line 2192 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 202: +#line 2197 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.ValueList = yyvsp[0].ValueList; ; break;} -case 201: -#line 2194 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 203: +#line 2199 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.ValueList = new std::vector(); ; break;} -case 202: -#line 2198 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" -{ - yyval.BoolVal = true; - ; - break;} -case 203: -#line 2201 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" -{ - yyval.BoolVal = false; - ; - break;} case 204: -#line 2207 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2203 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { - yyval.InstVal = new MallocInst(*yyvsp[0].TypeVal); - delete yyvsp[0].TypeVal; + yyval.BoolVal = true; ; break;} case 205: -#line 2211 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2206 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { - if (yyvsp[0].UInt64Val & (yyvsp[0].UInt64Val-1)) - ThrowException("Alignment amount '" + utostr(yyvsp[0].UInt64Val) + - "' is not a power of 2!"); - yyval.InstVal = new MallocInst(*yyvsp[-3].TypeVal, 0, yyvsp[0].UInt64Val); - delete yyvsp[-3].TypeVal; + yyval.BoolVal = false; ; break;} case 206: -#line 2218 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2212 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { - yyval.InstVal = new MallocInst(*yyvsp[-3].TypeVal, getVal(yyvsp[-1].PrimType, yyvsp[0].ValIDVal)); - delete yyvsp[-3].TypeVal; + if (yyvsp[0].UIntVal & (yyvsp[0].UIntVal-1)) + ThrowException("Alignment amount '" + utostr(yyvsp[0].UIntVal) + + "' is not a power of 2!"); + yyval.InstVal = new MallocInst(*yyvsp[-1].TypeVal, 0, yyvsp[0].UIntVal); + delete yyvsp[-1].TypeVal; ; break;} case 207: -#line 2222 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2219 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { - if (yyvsp[0].UInt64Val & (yyvsp[0].UInt64Val-1)) - ThrowException("Alignment amount '" + utostr(yyvsp[0].UInt64Val) + + if (yyvsp[0].UIntVal & (yyvsp[0].UIntVal-1)) + ThrowException("Alignment amount '" + utostr(yyvsp[0].UIntVal) + "' is not a power of 2!"); - yyval.InstVal = new MallocInst(*yyvsp[-6].TypeVal, getVal(yyvsp[-4].PrimType, yyvsp[-3].ValIDVal), yyvsp[0].UInt64Val); - delete yyvsp[-6].TypeVal; + yyval.InstVal = new MallocInst(*yyvsp[-4].TypeVal, getVal(yyvsp[-2].PrimType, yyvsp[-1].ValIDVal), yyvsp[0].UIntVal); + delete yyvsp[-4].TypeVal; ; break;} case 208: -#line 2229 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2226 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { - yyval.InstVal = new AllocaInst(*yyvsp[0].TypeVal); - delete yyvsp[0].TypeVal; + if (yyvsp[0].UIntVal & (yyvsp[0].UIntVal-1)) + ThrowException("Alignment amount '" + utostr(yyvsp[0].UIntVal) + + "' is not a power of 2!"); + yyval.InstVal = new AllocaInst(*yyvsp[-1].TypeVal, 0, yyvsp[0].UIntVal); + delete yyvsp[-1].TypeVal; ; break;} case 209: #line 2233 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { - if (yyvsp[0].UInt64Val & (yyvsp[0].UInt64Val-1)) - ThrowException("Alignment amount '" + utostr(yyvsp[0].UInt64Val) + + if (yyvsp[0].UIntVal & (yyvsp[0].UIntVal-1)) + ThrowException("Alignment amount '" + utostr(yyvsp[0].UIntVal) + "' is not a power of 2!"); - yyval.InstVal = new AllocaInst(*yyvsp[-3].TypeVal, 0, yyvsp[0].UInt64Val); - delete yyvsp[-3].TypeVal; + yyval.InstVal = new AllocaInst(*yyvsp[-4].TypeVal, getVal(yyvsp[-2].PrimType, yyvsp[-1].ValIDVal), yyvsp[0].UIntVal); + delete yyvsp[-4].TypeVal; ; break;} case 210: #line 2240 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { - yyval.InstVal = new AllocaInst(*yyvsp[-3].TypeVal, getVal(yyvsp[-1].PrimType, yyvsp[0].ValIDVal)); - delete yyvsp[-3].TypeVal; - ; - break;} -case 211: -#line 2244 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" -{ - if (yyvsp[0].UInt64Val & (yyvsp[0].UInt64Val-1)) - ThrowException("Alignment amount '" + utostr(yyvsp[0].UInt64Val) + - "' is not a power of 2!"); - yyval.InstVal = new AllocaInst(*yyvsp[-6].TypeVal, getVal(yyvsp[-4].PrimType, yyvsp[-3].ValIDVal), yyvsp[0].UInt64Val); - delete yyvsp[-6].TypeVal; - ; - break;} -case 212: -#line 2251 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" -{ if (!isa(yyvsp[0].ValueVal->getType())) ThrowException("Trying to free nonpointer type " + yyvsp[0].ValueVal->getType()->getDescription() + "!"); yyval.InstVal = new FreeInst(yyvsp[0].ValueVal); ; break;} -case 213: -#line 2258 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 211: +#line 2247 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!isa(yyvsp[-1].TypeVal->get())) ThrowException("Can't load from nonpointer type: " + @@ -3792,8 +3747,8 @@ delete yyvsp[-1].TypeVal; ; break;} -case 214: -#line 2268 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 212: +#line 2257 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { const PointerType *PT = dyn_cast(yyvsp[-1].TypeVal->get()); if (!PT) @@ -3808,8 +3763,8 @@ delete yyvsp[-1].TypeVal; ; break;} -case 215: -#line 2281 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 213: +#line 2270 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!isa(yyvsp[-2].TypeVal->get())) ThrowException("getelementptr insn requires pointer operand!"); @@ -4054,7 +4009,7 @@ } return 1; } -#line 2304 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2293 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" int yyerror(const char *ErrorMsg) { std::string where From lattner at cs.uiuc.edu Sun Nov 6 00:44:54 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun, 6 Nov 2005 00:44:54 -0600 Subject: [llvm-commits] CVS: llvm/include/llvm/GlobalValue.h Message-ID: <200511060644.AAA25382@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm: GlobalValue.h updated: 1.24 -> 1.25 --- Log message: allow functions and modules to have an explicit alignment --- Diffs of the changes: (+7 -0) GlobalValue.h | 7 +++++++ 1 files changed, 7 insertions(+) Index: llvm/include/llvm/GlobalValue.h diff -u llvm/include/llvm/GlobalValue.h:1.24 llvm/include/llvm/GlobalValue.h:1.25 --- llvm/include/llvm/GlobalValue.h:1.24 Tue Oct 25 12:59:28 2005 +++ llvm/include/llvm/GlobalValue.h Sun Nov 6 00:44:42 2005 @@ -42,11 +42,18 @@ LinkageTypes Linkage; // The linkage of this global Module *Parent; + unsigned Alignment; public: ~GlobalValue() { removeDeadConstantUsers(); // remove any dead constants using this. } + unsigned getAlignment() const { return Alignment; } + void setAlignment(unsigned Align) { + assert((Align & (Align-1)) == 0 && "Alignment is not a power of 2!"); + Alignment = Align; + } + /// If the usage is empty (except transitively dead constants), then this /// global value can can be safely deleted since the destructor will /// delete the dead constants as well. From lattner at cs.uiuc.edu Sun Nov 6 00:46:39 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun, 6 Nov 2005 00:46:39 -0600 Subject: [llvm-commits] CVS: llvm/lib/AsmParser/llvmAsmParser.y Message-ID: <200511060646.AAA25445@zion.cs.uiuc.edu> Changes in directory llvm/lib/AsmParser: llvmAsmParser.y updated: 1.235 -> 1.236 --- Log message: Allow globals to have an alignment specified. Switch to using isPowerOf2_32 at Jim's request for the checking code. --- Diffs of the changes: (+25 -13) llvmAsmParser.y | 38 +++++++++++++++++++++++++------------- 1 files changed, 25 insertions(+), 13 deletions(-) Index: llvm/lib/AsmParser/llvmAsmParser.y diff -u llvm/lib/AsmParser/llvmAsmParser.y:1.235 llvm/lib/AsmParser/llvmAsmParser.y:1.236 --- llvm/lib/AsmParser/llvmAsmParser.y:1.235 Sun Nov 6 00:34:12 2005 +++ llvm/lib/AsmParser/llvmAsmParser.y Sun Nov 6 00:46:28 2005 @@ -19,6 +19,7 @@ #include "llvm/SymbolTable.h" #include "llvm/Support/GetElementPtrTypeIterator.h" #include "llvm/ADT/STLExtras.h" +#include "llvm/Support/MathExtras.h" #include #include #include @@ -516,7 +517,10 @@ /// this is a declaration, otherwise it is a definition. static void ParseGlobalVariable(char *NameStr,GlobalValue::LinkageTypes Linkage, bool isConstantGlobal, const Type *Ty, - Constant *Initializer) { + Constant *Initializer, unsigned Align) { + if (Align != 0 && !isPowerOf2_32(Align)) + ThrowException("Global alignment must be a power of two!"); + if (isa(Ty)) ThrowException("Cannot declare global vars of function type!"); @@ -546,6 +550,7 @@ GV->setInitializer(Initializer); GV->setLinkage(Linkage); GV->setConstant(isConstantGlobal); + GV->setAlignment(Align); InsertValue(GV, CurModule.Values); return; } @@ -572,6 +577,7 @@ if (isConstantGlobal) EGV->setConstant(true); EGV->setLinkage(Linkage); + EGV->setAlignment(Align); return; } @@ -584,6 +590,7 @@ GlobalVariable *GV = new GlobalVariable(Ty, isConstantGlobal, Linkage, Initializer, Name, CurModule.CurrentModule); + GV->setAlignment(Align); InsertValue(GV, CurModule.Values); } @@ -948,7 +955,7 @@ %token VAR_ID LABELSTR STRINGCONSTANT %type Name OptName OptAssign -%type OptCAlign +%type OptAlign OptCAlign %token IMPLEMENTATION ZEROINITIALIZER TRUETOK FALSETOK BEGINTOK ENDTOK %token DECLARE GLOBAL CONSTANT VOLATILE @@ -1037,6 +1044,8 @@ // OptAlign/OptCAlign - An optional alignment, and an optional alignment with // a comma before it. +OptAlign : /*empty*/ { $$ = 0; } | + ALIGN EUINT64VAL { $$ = $2; }; OptCAlign : /*empty*/ { $$ = 0; } | ',' ALIGN EUINT64VAL { $$ = $3; }; @@ -1548,12 +1557,12 @@ } | ConstPool FunctionProto { // Function prototypes can be in const pool } - | ConstPool OptAssign OptLinkage GlobalType ConstVal { + | ConstPool OptAssign OptLinkage GlobalType ConstVal OptCAlign { if ($5 == 0) ThrowException("Global value initializer is not a constant!"); - ParseGlobalVariable($2, $3, $4, $5->getType(), $5); + ParseGlobalVariable($2, $3, $4, $5->getType(), $5, $6); } - | ConstPool OptAssign EXTERNAL GlobalType Types { - ParseGlobalVariable($2, GlobalValue::ExternalLinkage, $4, *$5, 0); + | ConstPool OptAssign EXTERNAL GlobalType Types OptCAlign { + ParseGlobalVariable($2, GlobalValue::ExternalLinkage, $4, *$5, 0, $6); delete $5; } | ConstPool TARGET TargetDefinition { @@ -1638,13 +1647,15 @@ $$ = 0; }; -FunctionHeaderH : OptCallingConv TypesV Name '(' ArgList ')' { +FunctionHeaderH : OptCallingConv TypesV Name '(' ArgList ')' OptAlign { UnEscapeLexed($3); std::string FunctionName($3); free($3); // Free strdup'd memory! if (!(*$2)->isFirstClassType() && *$2 != Type::VoidTy) ThrowException("LLVM functions cannot return aggregate types!"); + if ($7 != 0 && !isPowerOf2_32($7)) + ThrowException("Function alignment must be a power of two!"); std::vector ParamTypeList; if ($5) { // If there are arguments... @@ -1696,6 +1707,7 @@ CurFun.FunctionStart(Fn); Fn->setCallingConv($1); + Fn->setAlignment($7); // Add all of the arguments we parsed to the function... if ($5) { // Is null if empty... @@ -2210,28 +2222,28 @@ MemoryInst : MALLOC Types OptCAlign { - if ($3 & ($3-1)) - ThrowException("Alignment amount '" + utostr($3) + - "' is not a power of 2!"); + if ($3 != 0 && !isPowerOf2_32($3)) + ThrowException("Alignment amount '" + utostr($3) + + "' is not a power of 2!"); $$ = new MallocInst(*$2, 0, $3); delete $2; } | MALLOC Types ',' UINT ValueRef OptCAlign { - if ($6 & ($6-1)) + if ($6 != 0 && !isPowerOf2_32($6)) ThrowException("Alignment amount '" + utostr($6) + "' is not a power of 2!"); $$ = new MallocInst(*$2, getVal($4, $5), $6); delete $2; } | ALLOCA Types OptCAlign { - if ($3 & ($3-1)) + if ($3 != 0 && !isPowerOf2_32($3)) ThrowException("Alignment amount '" + utostr($3) + "' is not a power of 2!"); $$ = new AllocaInst(*$2, 0, $3); delete $2; } | ALLOCA Types ',' UINT ValueRef OptCAlign { - if ($6 & ($6-1)) + if ($6 != 0 && !isPowerOf2_32($6)) ThrowException("Alignment amount '" + utostr($6) + "' is not a power of 2!"); $$ = new AllocaInst(*$2, getVal($4, $5), $6); From lattner at cs.uiuc.edu Sun Nov 6 00:47:05 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun, 6 Nov 2005 00:47:05 -0600 Subject: [llvm-commits] CVS: llvm/lib/AsmParser/llvmAsmParser.cpp Message-ID: <200511060647.AAA25478@zion.cs.uiuc.edu> Changes in directory llvm/lib/AsmParser: llvmAsmParser.cpp updated: 1.21 -> 1.22 --- Log message: regenerate --- Diffs of the changes: (+793 -785) llvmAsmParser.cpp | 1558 +++++++++++++++++++++++++++--------------------------- 1 files changed, 793 insertions(+), 765 deletions(-) Index: llvm/lib/AsmParser/llvmAsmParser.cpp diff -u llvm/lib/AsmParser/llvmAsmParser.cpp:1.21 llvm/lib/AsmParser/llvmAsmParser.cpp:1.22 --- llvm/lib/AsmParser/llvmAsmParser.cpp:1.21 Sun Nov 6 00:34:34 2005 +++ llvm/lib/AsmParser/llvmAsmParser.cpp Sun Nov 6 00:46:53 2005 @@ -113,6 +113,7 @@ #include "llvm/SymbolTable.h" #include "llvm/Support/GetElementPtrTypeIterator.h" #include "llvm/ADT/STLExtras.h" +#include "llvm/Support/MathExtras.h" #include #include #include @@ -610,7 +611,10 @@ /// this is a declaration, otherwise it is a definition. static void ParseGlobalVariable(char *NameStr,GlobalValue::LinkageTypes Linkage, bool isConstantGlobal, const Type *Ty, - Constant *Initializer) { + Constant *Initializer, unsigned Align) { + if (Align != 0 && !isPowerOf2_32(Align)) + ThrowException("Global alignment must be a power of two!"); + if (isa(Ty)) ThrowException("Cannot declare global vars of function type!"); @@ -640,6 +644,7 @@ GV->setInitializer(Initializer); GV->setLinkage(Linkage); GV->setConstant(isConstantGlobal); + GV->setAlignment(Align); InsertValue(GV, CurModule.Values); return; } @@ -666,6 +671,7 @@ if (isConstantGlobal) EGV->setConstant(true); EGV->setLinkage(Linkage); + EGV->setAlignment(Align); return; } @@ -678,6 +684,7 @@ GlobalVariable *GV = new GlobalVariable(Ty, isConstantGlobal, Linkage, Initializer, Name, CurModule.CurrentModule); + GV->setAlignment(Align); InsertValue(GV, CurModule.Values); } @@ -956,7 +963,7 @@ } -#line 866 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 873 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" typedef union { llvm::Module *ModuleVal; llvm::Function *FunctionVal; @@ -1006,11 +1013,11 @@ -#define YYFINAL 426 +#define YYFINAL 431 #define YYFLAG -32768 #define YYNTBASE 109 -#define YYTRANSLATE(x) ((unsigned)(x) <= 348 ? yytranslate[x] : 171) +#define YYTRANSLATE(x) ((unsigned)(x) <= 348 ? yytranslate[x] : 172) static const char yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -1056,24 +1063,24 @@ 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 67, 68, 70, 72, 74, 76, 77, - 78, 80, 82, 84, 87, 88, 92, 94, 96, 98, + 78, 80, 82, 84, 87, 88, 91, 92, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, - 120, 122, 124, 126, 128, 130, 132, 134, 137, 142, - 148, 154, 158, 161, 164, 166, 170, 172, 176, 178, - 179, 184, 188, 192, 197, 202, 206, 209, 212, 215, - 218, 221, 224, 227, 230, 233, 236, 243, 249, 258, - 265, 272, 279, 286, 290, 292, 294, 296, 298, 301, - 304, 307, 309, 314, 317, 323, 329, 333, 338, 339, - 341, 343, 347, 351, 355, 359, 363, 365, 366, 368, - 370, 372, 373, 376, 380, 382, 384, 388, 390, 391, - 398, 400, 402, 406, 408, 410, 413, 414, 418, 420, - 422, 424, 426, 428, 430, 432, 436, 438, 440, 442, - 444, 446, 449, 452, 455, 459, 462, 463, 465, 468, - 471, 475, 485, 495, 504, 518, 520, 522, 529, 535, - 538, 545, 553, 555, 559, 561, 562, 565, 567, 573, - 579, 585, 588, 593, 598, 605, 610, 615, 620, 623, - 631, 633, 636, 637, 639, 640, 644, 651, 655, 662, - 665, 670, 677 + 120, 122, 124, 126, 128, 130, 132, 134, 136, 138, + 141, 146, 152, 158, 162, 165, 168, 170, 174, 176, + 180, 182, 183, 188, 192, 196, 201, 206, 210, 213, + 216, 219, 222, 225, 228, 231, 234, 237, 240, 247, + 253, 262, 269, 276, 283, 290, 294, 296, 298, 300, + 302, 305, 308, 311, 313, 318, 321, 328, 335, 339, + 344, 345, 347, 349, 353, 357, 361, 365, 369, 371, + 372, 374, 376, 378, 379, 382, 386, 388, 390, 394, + 396, 397, 405, 407, 409, 413, 415, 417, 420, 421, + 425, 427, 429, 431, 433, 435, 437, 439, 443, 445, + 447, 449, 451, 453, 456, 459, 462, 466, 469, 470, + 472, 475, 478, 482, 492, 502, 511, 525, 527, 529, + 536, 542, 545, 552, 560, 562, 566, 568, 569, 572, + 574, 580, 586, 592, 595, 600, 605, 612, 617, 622, + 627, 630, 638, 640, 643, 644, 646, 647, 651, 658, + 662, 669, 672, 677, 684 }; static const short yyrhs[] = { 5, @@ -1083,97 +1090,97 @@ 0, 79, 0, 80, 0, 90, 0, 91, 0, 16, 0, 14, 0, 12, 0, 10, 0, 17, 0, 15, 0, 13, 0, 11, 0, 115, 0, 116, 0, 18, - 0, 19, 0, 141, 95, 0, 0, 40, 0, 41, + 0, 19, 0, 142, 95, 0, 0, 40, 0, 41, 0, 42, 0, 43, 0, 0, 0, 58, 0, 59, - 0, 60, 0, 57, 4, 0, 0, 96, 53, 4, - 0, 125, 0, 8, 0, 127, 0, 8, 0, 127, - 0, 9, 0, 10, 0, 11, 0, 12, 0, 13, - 0, 14, 0, 15, 0, 16, 0, 17, 0, 18, - 0, 19, 0, 20, 0, 21, 0, 44, 0, 126, - 0, 154, 0, 97, 4, 0, 124, 98, 129, 99, - 0, 100, 4, 101, 127, 102, 0, 103, 4, 101, - 127, 104, 0, 105, 128, 106, 0, 105, 106, 0, - 127, 107, 0, 127, 0, 128, 96, 127, 0, 128, - 0, 128, 96, 36, 0, 36, 0, 0, 125, 100, - 132, 102, 0, 125, 100, 102, 0, 125, 108, 24, - 0, 125, 103, 132, 104, 0, 125, 105, 132, 106, - 0, 125, 105, 106, 0, 125, 37, 0, 125, 38, - 0, 125, 154, 0, 125, 131, 0, 125, 26, 0, - 115, 110, 0, 116, 4, 0, 9, 27, 0, 9, - 28, 0, 118, 7, 0, 88, 98, 130, 35, 125, - 99, 0, 86, 98, 130, 168, 99, 0, 89, 98, - 130, 96, 130, 96, 130, 99, 0, 111, 98, 130, - 96, 130, 99, 0, 112, 98, 130, 96, 130, 99, - 0, 113, 98, 130, 96, 130, 99, 0, 114, 98, - 130, 96, 130, 99, 0, 132, 96, 130, 0, 130, - 0, 32, 0, 33, 0, 135, 0, 135, 150, 0, - 135, 151, 0, 135, 25, 0, 136, 0, 136, 119, - 20, 123, 0, 136, 151, 0, 136, 119, 120, 133, - 130, 0, 136, 119, 46, 133, 125, 0, 136, 47, - 138, 0, 136, 54, 95, 139, 0, 0, 52, 0, - 51, 0, 49, 95, 137, 0, 50, 95, 4, 0, - 48, 95, 24, 0, 100, 140, 102, 0, 140, 96, - 24, 0, 24, 0, 0, 22, 0, 24, 0, 141, - 0, 0, 125, 142, 0, 144, 96, 143, 0, 143, - 0, 144, 0, 144, 96, 36, 0, 36, 0, 0, - 121, 123, 141, 98, 145, 99, 0, 29, 0, 105, - 0, 120, 146, 147, 0, 30, 0, 106, 0, 157, - 149, 0, 0, 31, 152, 146, 0, 3, 0, 4, - 0, 7, 0, 27, 0, 28, 0, 37, 0, 38, - 0, 103, 132, 104, 0, 131, 0, 109, 0, 141, - 0, 154, 0, 153, 0, 125, 155, 0, 157, 158, - 0, 148, 158, 0, 159, 119, 160, 0, 159, 162, - 0, 0, 23, 0, 61, 156, 0, 61, 8, 0, - 62, 21, 155, 0, 62, 9, 155, 96, 21, 155, - 96, 21, 155, 0, 63, 117, 155, 96, 21, 155, - 100, 161, 102, 0, 63, 117, 155, 96, 21, 155, - 100, 102, 0, 64, 121, 123, 155, 98, 165, 99, - 35, 21, 155, 65, 21, 155, 0, 65, 0, 66, - 0, 161, 117, 153, 96, 21, 155, 0, 117, 153, - 96, 21, 155, 0, 119, 167, 0, 125, 100, 155, - 96, 155, 102, 0, 163, 96, 100, 155, 96, 155, - 102, 0, 156, 0, 164, 96, 156, 0, 164, 0, - 0, 56, 55, 0, 55, 0, 111, 125, 155, 96, - 155, 0, 112, 125, 155, 96, 155, 0, 113, 125, - 155, 96, 155, 0, 45, 156, 0, 114, 156, 96, - 156, 0, 88, 156, 35, 125, 0, 89, 156, 96, - 156, 96, 156, 0, 92, 156, 96, 125, 0, 93, - 156, 96, 125, 0, 94, 156, 96, 125, 0, 87, - 163, 0, 166, 121, 123, 155, 98, 165, 99, 0, - 170, 0, 96, 164, 0, 0, 34, 0, 0, 81, - 125, 122, 0, 81, 125, 96, 15, 155, 122, 0, - 82, 125, 122, 0, 82, 125, 96, 15, 155, 122, - 0, 83, 156, 0, 169, 84, 125, 155, 0, 169, - 85, 156, 96, 125, 155, 0, 86, 125, 155, 168, - 0 + 0, 60, 0, 57, 4, 0, 0, 53, 4, 0, + 0, 96, 53, 4, 0, 126, 0, 8, 0, 128, + 0, 8, 0, 128, 0, 9, 0, 10, 0, 11, + 0, 12, 0, 13, 0, 14, 0, 15, 0, 16, + 0, 17, 0, 18, 0, 19, 0, 20, 0, 21, + 0, 44, 0, 127, 0, 155, 0, 97, 4, 0, + 125, 98, 130, 99, 0, 100, 4, 101, 128, 102, + 0, 103, 4, 101, 128, 104, 0, 105, 129, 106, + 0, 105, 106, 0, 128, 107, 0, 128, 0, 129, + 96, 128, 0, 129, 0, 129, 96, 36, 0, 36, + 0, 0, 126, 100, 133, 102, 0, 126, 100, 102, + 0, 126, 108, 24, 0, 126, 103, 133, 104, 0, + 126, 105, 133, 106, 0, 126, 105, 106, 0, 126, + 37, 0, 126, 38, 0, 126, 155, 0, 126, 132, + 0, 126, 26, 0, 115, 110, 0, 116, 4, 0, + 9, 27, 0, 9, 28, 0, 118, 7, 0, 88, + 98, 131, 35, 126, 99, 0, 86, 98, 131, 169, + 99, 0, 89, 98, 131, 96, 131, 96, 131, 99, + 0, 111, 98, 131, 96, 131, 99, 0, 112, 98, + 131, 96, 131, 99, 0, 113, 98, 131, 96, 131, + 99, 0, 114, 98, 131, 96, 131, 99, 0, 133, + 96, 131, 0, 131, 0, 32, 0, 33, 0, 136, + 0, 136, 151, 0, 136, 152, 0, 136, 25, 0, + 137, 0, 137, 119, 20, 124, 0, 137, 152, 0, + 137, 119, 120, 134, 131, 123, 0, 137, 119, 46, + 134, 126, 123, 0, 137, 47, 139, 0, 137, 54, + 95, 140, 0, 0, 52, 0, 51, 0, 49, 95, + 138, 0, 50, 95, 4, 0, 48, 95, 24, 0, + 100, 141, 102, 0, 141, 96, 24, 0, 24, 0, + 0, 22, 0, 24, 0, 142, 0, 0, 126, 143, + 0, 145, 96, 144, 0, 144, 0, 145, 0, 145, + 96, 36, 0, 36, 0, 0, 121, 124, 142, 98, + 146, 99, 122, 0, 29, 0, 105, 0, 120, 147, + 148, 0, 30, 0, 106, 0, 158, 150, 0, 0, + 31, 153, 147, 0, 3, 0, 4, 0, 7, 0, + 27, 0, 28, 0, 37, 0, 38, 0, 103, 133, + 104, 0, 132, 0, 109, 0, 142, 0, 155, 0, + 154, 0, 126, 156, 0, 158, 159, 0, 149, 159, + 0, 160, 119, 161, 0, 160, 163, 0, 0, 23, + 0, 61, 157, 0, 61, 8, 0, 62, 21, 156, + 0, 62, 9, 156, 96, 21, 156, 96, 21, 156, + 0, 63, 117, 156, 96, 21, 156, 100, 162, 102, + 0, 63, 117, 156, 96, 21, 156, 100, 102, 0, + 64, 121, 124, 156, 98, 166, 99, 35, 21, 156, + 65, 21, 156, 0, 65, 0, 66, 0, 162, 117, + 154, 96, 21, 156, 0, 117, 154, 96, 21, 156, + 0, 119, 168, 0, 126, 100, 156, 96, 156, 102, + 0, 164, 96, 100, 156, 96, 156, 102, 0, 157, + 0, 165, 96, 157, 0, 165, 0, 0, 56, 55, + 0, 55, 0, 111, 126, 156, 96, 156, 0, 112, + 126, 156, 96, 156, 0, 113, 126, 156, 96, 156, + 0, 45, 157, 0, 114, 157, 96, 157, 0, 88, + 157, 35, 126, 0, 89, 157, 96, 157, 96, 157, + 0, 92, 157, 96, 126, 0, 93, 157, 96, 126, + 0, 94, 157, 96, 126, 0, 87, 164, 0, 167, + 121, 124, 156, 98, 166, 99, 0, 171, 0, 96, + 165, 0, 0, 34, 0, 0, 81, 126, 123, 0, + 81, 126, 96, 15, 156, 123, 0, 82, 126, 123, + 0, 82, 126, 96, 15, 156, 123, 0, 83, 157, + 0, 170, 84, 126, 156, 0, 170, 85, 157, 96, + 126, 156, 0, 86, 126, 156, 169, 0 }; #endif #if YYDEBUG != 0 static const short yyrline[] = { 0, - 983, 984, 991, 992, 1001, 1001, 1001, 1001, 1001, 1002, - 1002, 1002, 1003, 1003, 1003, 1003, 1003, 1003, 1005, 1005, - 1009, 1009, 1009, 1009, 1010, 1010, 1010, 1010, 1011, 1011, - 1012, 1012, 1015, 1018, 1022, 1022, 1023, 1024, 1025, 1028, - 1028, 1029, 1030, 1031, 1040, 1040, 1050, 1050, 1051, 1051, - 1053, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1063, 1063, - 1063, 1063, 1063, 1063, 1064, 1067, 1070, 1076, 1083, 1095, - 1099, 1110, 1119, 1122, 1130, 1134, 1139, 1140, 1143, 1146, - 1156, 1181, 1194, 1222, 1247, 1267, 1279, 1288, 1292, 1351, - 1357, 1365, 1370, 1375, 1378, 1381, 1388, 1398, 1429, 1436, - 1457, 1464, 1469, 1479, 1482, 1489, 1489, 1499, 1506, 1510, - 1513, 1516, 1529, 1549, 1551, 1555, 1559, 1561, 1563, 1568, - 1569, 1571, 1574, 1582, 1587, 1589, 1593, 1597, 1605, 1605, - 1606, 1606, 1608, 1614, 1619, 1625, 1628, 1633, 1637, 1641, - 1721, 1721, 1723, 1731, 1731, 1733, 1737, 1737, 1746, 1749, - 1752, 1755, 1758, 1761, 1764, 1767, 1791, 1798, 1801, 1806, - 1806, 1812, 1816, 1819, 1827, 1836, 1840, 1850, 1861, 1864, - 1867, 1870, 1873, 1887, 1891, 1944, 1947, 1953, 1961, 1971, - 1978, 1983, 1990, 1994, 2000, 2000, 2002, 2005, 2011, 2023, - 2031, 2041, 2053, 2060, 2067, 2074, 2079, 2098, 2120, 2134, - 2191, 2197, 2199, 2203, 2206, 2212, 2219, 2226, 2233, 2240, - 2247, 2257, 2270 + 990, 991, 998, 999, 1008, 1008, 1008, 1008, 1008, 1009, + 1009, 1009, 1010, 1010, 1010, 1010, 1010, 1010, 1012, 1012, + 1016, 1016, 1016, 1016, 1017, 1017, 1017, 1017, 1018, 1018, + 1019, 1019, 1022, 1025, 1029, 1029, 1030, 1031, 1032, 1035, + 1035, 1036, 1037, 1038, 1047, 1047, 1049, 1049, 1059, 1059, + 1060, 1060, 1062, 1071, 1071, 1071, 1071, 1071, 1071, 1071, + 1072, 1072, 1072, 1072, 1072, 1072, 1073, 1076, 1079, 1085, + 1092, 1104, 1108, 1119, 1128, 1131, 1139, 1143, 1148, 1149, + 1152, 1155, 1165, 1190, 1203, 1231, 1256, 1276, 1288, 1297, + 1301, 1360, 1366, 1374, 1379, 1384, 1387, 1390, 1397, 1407, + 1438, 1445, 1466, 1473, 1478, 1488, 1491, 1498, 1498, 1508, + 1515, 1519, 1522, 1525, 1538, 1558, 1560, 1564, 1568, 1570, + 1572, 1577, 1578, 1580, 1583, 1591, 1596, 1598, 1602, 1606, + 1614, 1614, 1615, 1615, 1617, 1623, 1628, 1634, 1637, 1642, + 1646, 1650, 1733, 1733, 1735, 1743, 1743, 1745, 1749, 1749, + 1758, 1761, 1764, 1767, 1770, 1773, 1776, 1779, 1803, 1810, + 1813, 1818, 1818, 1824, 1828, 1831, 1839, 1848, 1852, 1862, + 1873, 1876, 1879, 1882, 1885, 1899, 1903, 1956, 1959, 1965, + 1973, 1983, 1990, 1995, 2002, 2006, 2012, 2012, 2014, 2017, + 2023, 2035, 2043, 2053, 2065, 2072, 2079, 2086, 2091, 2110, + 2132, 2146, 2203, 2209, 2211, 2215, 2218, 2224, 2231, 2238, + 2245, 2252, 2259, 2269, 2282 }; #endif @@ -1194,15 +1201,15 @@ "VAARG","VAARG_old","VANEXT_old","'='","','","'\\\\'","'('","')'","'['","'x'", "']'","'<'","'>'","'{'","'}'","'*'","'c'","INTVAL","EINT64VAL","ArithmeticOps", "LogicalOps","SetCondOps","ShiftOps","SIntType","UIntType","IntType","FPType", -"OptAssign","OptLinkage","OptCallingConv","OptCAlign","TypesV","UpRTypesV","Types", -"PrimType","UpRTypes","TypeListI","ArgTypeListI","ConstVal","ConstExpr","ConstVector", -"GlobalType","Module","FunctionList","ConstPool","BigOrLittle","TargetDefinition", -"LibrariesDefinition","LibList","Name","OptName","ArgVal","ArgListH","ArgList", -"FunctionHeaderH","BEGIN","FunctionHeader","END","Function","FunctionProto", -"@1","ConstValueRef","SymbolicValueRef","ValueRef","ResolvedVal","BasicBlockList", -"BasicBlock","InstructionList","BBTerminatorInst","JumpTable","Inst","PHIList", -"ValueRefList","ValueRefListE","OptTailCall","InstVal","IndexList","OptVolatile", -"MemoryInst", NULL +"OptAssign","OptLinkage","OptCallingConv","OptAlign","OptCAlign","TypesV","UpRTypesV", +"Types","PrimType","UpRTypes","TypeListI","ArgTypeListI","ConstVal","ConstExpr", +"ConstVector","GlobalType","Module","FunctionList","ConstPool","BigOrLittle", +"TargetDefinition","LibrariesDefinition","LibList","Name","OptName","ArgVal", +"ArgListH","ArgList","FunctionHeaderH","BEGIN","FunctionHeader","END","Function", +"FunctionProto","@1","ConstValueRef","SymbolicValueRef","ValueRef","ResolvedVal", +"BasicBlockList","BasicBlock","InstructionList","BBTerminatorInst","JumpTable", +"Inst","PHIList","ValueRefList","ValueRefListE","OptTailCall","InstVal","IndexList", +"OptVolatile","MemoryInst", NULL }; #endif @@ -1212,23 +1219,23 @@ 115, 115, 115, 115, 116, 116, 116, 116, 117, 117, 118, 118, 119, 119, 120, 120, 120, 120, 120, 121, 121, 121, 121, 121, 122, 122, 123, 123, 124, 124, - 125, 126, 126, 126, 126, 126, 126, 126, 126, 126, - 126, 126, 126, 126, 127, 127, 127, 127, 127, 127, - 127, 127, 127, 127, 128, 128, 129, 129, 129, 129, - 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, - 130, 130, 130, 130, 130, 130, 131, 131, 131, 131, - 131, 131, 131, 132, 132, 133, 133, 134, 135, 135, - 135, 135, 136, 136, 136, 136, 136, 136, 136, 137, - 137, 138, 138, 138, 139, 140, 140, 140, 141, 141, - 142, 142, 143, 144, 144, 145, 145, 145, 145, 146, - 147, 147, 148, 149, 149, 150, 152, 151, 153, 153, - 153, 153, 153, 153, 153, 153, 153, 154, 154, 155, - 155, 156, 157, 157, 158, 159, 159, 159, 160, 160, - 160, 160, 160, 160, 160, 160, 160, 161, 161, 162, - 163, 163, 164, 164, 165, 165, 166, 166, 167, 167, - 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, - 167, 168, 168, 169, 169, 170, 170, 170, 170, 170, - 170, 170, 170 + 125, 125, 126, 127, 127, 127, 127, 127, 127, 127, + 127, 127, 127, 127, 127, 127, 128, 128, 128, 128, + 128, 128, 128, 128, 128, 128, 129, 129, 130, 130, + 130, 130, 131, 131, 131, 131, 131, 131, 131, 131, + 131, 131, 131, 131, 131, 131, 131, 131, 132, 132, + 132, 132, 132, 132, 132, 133, 133, 134, 134, 135, + 136, 136, 136, 136, 137, 137, 137, 137, 137, 137, + 137, 138, 138, 139, 139, 139, 140, 141, 141, 141, + 142, 142, 143, 143, 144, 145, 145, 146, 146, 146, + 146, 147, 148, 148, 149, 150, 150, 151, 153, 152, + 154, 154, 154, 154, 154, 154, 154, 154, 154, 155, + 155, 156, 156, 157, 158, 158, 159, 160, 160, 160, + 161, 161, 161, 161, 161, 161, 161, 161, 161, 162, + 162, 163, 164, 164, 165, 165, 166, 166, 167, 167, + 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, + 168, 168, 168, 169, 169, 170, 170, 171, 171, 171, + 171, 171, 171, 171, 171 }; static const short yyr2[] = { 0, @@ -1236,388 +1243,378 @@ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 0, 1, 1, 1, 1, 0, 0, - 1, 1, 1, 2, 0, 3, 1, 1, 1, 1, + 1, 1, 1, 2, 0, 2, 0, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 2, 4, 5, - 5, 3, 2, 2, 1, 3, 1, 3, 1, 0, - 4, 3, 3, 4, 4, 3, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 6, 5, 8, 6, - 6, 6, 6, 3, 1, 1, 1, 1, 2, 2, - 2, 1, 4, 2, 5, 5, 3, 4, 0, 1, - 1, 3, 3, 3, 3, 3, 1, 0, 1, 1, - 1, 0, 2, 3, 1, 1, 3, 1, 0, 6, - 1, 1, 3, 1, 1, 2, 0, 3, 1, 1, - 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, - 1, 2, 2, 2, 3, 2, 0, 1, 2, 2, - 3, 9, 9, 8, 13, 1, 1, 6, 5, 2, - 6, 7, 1, 3, 1, 0, 2, 1, 5, 5, - 5, 2, 4, 4, 6, 4, 4, 4, 2, 7, - 1, 2, 0, 1, 0, 3, 6, 3, 6, 2, - 4, 6, 4 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, + 4, 5, 5, 3, 2, 2, 1, 3, 1, 3, + 1, 0, 4, 3, 3, 4, 4, 3, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 6, 5, + 8, 6, 6, 6, 6, 3, 1, 1, 1, 1, + 2, 2, 2, 1, 4, 2, 6, 6, 3, 4, + 0, 1, 1, 3, 3, 3, 3, 3, 1, 0, + 1, 1, 1, 0, 2, 3, 1, 1, 3, 1, + 0, 7, 1, 1, 3, 1, 1, 2, 0, 3, + 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, + 1, 1, 1, 2, 2, 2, 3, 2, 0, 1, + 2, 2, 3, 9, 9, 8, 13, 1, 1, 6, + 5, 2, 6, 7, 1, 3, 1, 0, 2, 1, + 5, 5, 5, 2, 4, 4, 6, 4, 4, 4, + 2, 7, 1, 2, 0, 1, 0, 3, 6, 3, + 6, 2, 4, 6, 4 }; -static const short yydefact[] = { 119, - 39, 112, 111, 147, 35, 36, 37, 38, 40, 167, - 109, 110, 167, 129, 130, 0, 0, 39, 0, 114, - 40, 0, 41, 42, 43, 0, 0, 168, 164, 34, - 144, 145, 146, 163, 0, 0, 0, 117, 0, 0, - 0, 0, 33, 148, 44, 1, 2, 48, 52, 53, - 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, - 64, 65, 0, 0, 0, 0, 158, 0, 0, 47, - 66, 51, 159, 67, 141, 142, 143, 205, 166, 0, - 0, 0, 128, 118, 113, 106, 107, 0, 0, 68, - 0, 0, 50, 73, 75, 0, 0, 80, 74, 204, - 0, 188, 0, 0, 0, 0, 40, 176, 177, 5, +static const short yydefact[] = { 121, + 39, 114, 113, 149, 35, 36, 37, 38, 40, 169, + 111, 112, 169, 131, 132, 0, 0, 39, 0, 116, + 40, 0, 41, 42, 43, 0, 0, 170, 166, 34, + 146, 147, 148, 165, 0, 0, 0, 119, 0, 0, + 0, 0, 33, 150, 44, 1, 2, 50, 54, 55, + 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, + 66, 67, 0, 0, 0, 0, 160, 0, 0, 49, + 68, 53, 161, 69, 143, 144, 145, 207, 168, 0, + 0, 0, 130, 120, 115, 108, 109, 0, 0, 70, + 0, 0, 52, 75, 77, 0, 0, 82, 76, 206, + 0, 190, 0, 0, 0, 0, 40, 178, 179, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 0, 0, 0, 0, 0, 0, 0, - 19, 20, 0, 0, 0, 0, 0, 0, 0, 165, - 40, 180, 0, 201, 124, 121, 120, 122, 123, 127, - 0, 116, 52, 53, 54, 55, 56, 57, 58, 59, - 60, 61, 62, 0, 0, 0, 0, 115, 0, 0, - 0, 72, 139, 79, 77, 0, 0, 192, 187, 170, - 169, 0, 0, 24, 28, 23, 27, 22, 26, 21, - 25, 29, 30, 0, 0, 45, 45, 210, 0, 0, - 199, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 125, 94, 95, 3, 4, 92, - 93, 96, 91, 87, 88, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 90, 89, 49, 49, - 76, 138, 132, 135, 136, 0, 0, 69, 149, 150, - 151, 152, 153, 154, 155, 0, 157, 161, 160, 162, - 0, 171, 0, 0, 0, 206, 0, 208, 203, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 126, 0, 0, 0, 82, 105, 0, - 0, 86, 0, 83, 0, 0, 0, 0, 70, 71, - 131, 133, 0, 140, 78, 0, 0, 0, 0, 0, - 0, 0, 0, 213, 0, 0, 194, 0, 196, 197, - 198, 0, 0, 0, 193, 0, 211, 0, 203, 0, - 0, 0, 81, 84, 85, 0, 0, 0, 0, 137, - 134, 156, 0, 0, 186, 45, 46, 45, 183, 202, - 0, 0, 0, 189, 190, 191, 186, 0, 0, 0, - 0, 104, 0, 0, 0, 0, 0, 0, 185, 0, - 0, 207, 209, 0, 0, 0, 195, 0, 212, 98, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 184, - 181, 0, 200, 97, 0, 100, 101, 102, 103, 0, - 174, 0, 0, 0, 182, 0, 172, 0, 173, 0, - 0, 99, 0, 0, 0, 0, 0, 0, 179, 0, - 0, 178, 175, 0, 0, 0 + 19, 20, 0, 0, 0, 0, 0, 0, 0, 167, + 40, 182, 0, 203, 126, 123, 122, 124, 125, 129, + 0, 47, 54, 55, 56, 57, 58, 59, 60, 61, + 62, 63, 64, 0, 0, 0, 0, 47, 0, 0, + 0, 74, 141, 81, 79, 0, 0, 194, 189, 172, + 171, 0, 0, 24, 28, 23, 27, 22, 26, 21, + 25, 29, 30, 0, 0, 47, 47, 212, 0, 0, + 201, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 127, 0, 118, 96, 97, 3, + 4, 94, 95, 98, 93, 89, 90, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 92, 91, + 117, 51, 51, 78, 140, 134, 137, 138, 0, 0, + 71, 151, 152, 153, 154, 155, 156, 157, 0, 159, + 163, 162, 164, 0, 173, 0, 0, 0, 208, 0, + 210, 205, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 128, 0, 0, 0, + 0, 84, 107, 0, 0, 88, 0, 85, 0, 0, + 0, 0, 72, 73, 133, 135, 0, 45, 80, 0, + 0, 0, 0, 0, 0, 0, 215, 0, 0, 196, + 0, 198, 199, 200, 0, 0, 0, 195, 0, 213, + 0, 48, 205, 0, 0, 0, 83, 86, 87, 0, + 0, 0, 0, 139, 136, 0, 142, 158, 0, 0, + 188, 47, 47, 185, 204, 0, 0, 0, 191, 192, + 193, 188, 0, 0, 0, 0, 106, 0, 0, 0, + 0, 46, 0, 0, 187, 0, 209, 211, 0, 0, + 0, 197, 0, 214, 100, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 186, 183, 0, 202, 99, 0, + 102, 103, 104, 105, 0, 176, 0, 0, 0, 184, + 0, 174, 0, 175, 0, 0, 101, 0, 0, 0, + 0, 0, 0, 181, 0, 0, 180, 177, 0, 0, + 0 }; static const short yydefgoto[] = { 67, - 220, 233, 234, 235, 236, 164, 165, 194, 166, 18, - 9, 26, 266, 68, 69, 167, 71, 72, 96, 176, - 289, 257, 290, 88, 424, 1, 2, 148, 38, 84, - 151, 73, 302, 244, 245, 246, 27, 77, 10, 33, - 11, 12, 21, 258, 74, 260, 349, 13, 29, 30, - 140, 403, 79, 201, 369, 370, 141, 142, 314, 143, - 144 + 222, 235, 236, 237, 238, 164, 165, 194, 166, 18, + 9, 26, 347, 217, 68, 69, 167, 71, 72, 96, + 176, 293, 260, 294, 88, 429, 1, 2, 148, 38, + 84, 151, 73, 306, 247, 248, 249, 27, 77, 10, + 33, 11, 12, 21, 261, 74, 263, 354, 13, 29, + 30, 140, 408, 79, 201, 375, 376, 141, 142, 317, + 143, 144 }; static const short yypact[] = {-32768, - 15, 304,-32768,-32768,-32768,-32768,-32768,-32768, 104, -16, --32768,-32768, -13,-32768,-32768, -27, -69, 23, -57,-32768, - 104, 88,-32768,-32768,-32768, 954, -18,-32768,-32768, 50, --32768,-32768,-32768,-32768, -34, -22, 10,-32768, -5, 954, - 58, 58,-32768,-32768,-32768,-32768,-32768, 17,-32768,-32768, + 191, 336,-32768,-32768,-32768,-32768,-32768,-32768, 37, 19, +-32768,-32768, -17,-32768,-32768, 101, -32, 31, -25,-32768, + 37, 53,-32768,-32768,-32768, 896, -13,-32768,-32768, 130, +-32768,-32768,-32768,-32768, -19, -16, 33,-32768, 26, 896, + 58, 58,-32768,-32768,-32768,-32768,-32768, 55,-32768,-32768, -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, --32768,-32768, 126, 142, 148, 531,-32768, 50, 61,-32768, --32768, -30,-32768,-32768,-32768,-32768,-32768, 1111,-32768, 150, - 66, 166, 153,-32768,-32768,-32768,-32768, 991, 1028,-32768, - 74, 77,-32768,-32768, -30, -36, 81, 769,-32768,-32768, - 991,-32768, 125, 1065, 3, 123, 104,-32768,-32768,-32768, +-32768,-32768, 127, 156, 166, 124,-32768, 130, 82,-32768, +-32768, -81,-32768,-32768,-32768,-32768,-32768, 1053,-32768, 157, + 54, 178, 160,-32768,-32768,-32768,-32768, 933, 970,-32768, + 88, 91,-32768,-32768, -81, -42, 85, 711,-32768,-32768, + 933,-32768, 141, 1007, 0, 104, 37,-32768,-32768,-32768, -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, --32768,-32768,-32768, 991, 991, 991, 991, 991, 991, 991, --32768,-32768, 991, 991, 991, 991, 991, 991, 991,-32768, - 104,-32768, 57,-32768,-32768,-32768,-32768,-32768,-32768,-32768, - -8,-32768, 117, 146, 177, 151, 178, 162, 179, 164, - 180, 182, 183, 169, 187, 185, 407,-32768, 991, 991, - 991,-32768, 806,-32768, 97, 95, 595,-32768,-32768, 17, --32768, 595, 595,-32768,-32768,-32768,-32768,-32768,-32768,-32768, --32768,-32768,-32768, 595, 954, 100, 101,-32768, 595, 98, - 103, 165, 106, 107, 111, 112, 595, 595, 595, 113, - 954, 991, 991, 186,-32768,-32768,-32768,-32768,-32768,-32768, --32768,-32768,-32768,-32768,-32768, 120, 122, 124, 843, 1028, - 552, 188, 127, 128, 129, 130,-32768,-32768, -31, -65, - -30,-32768, 50,-32768, 115, 133, 880,-32768,-32768,-32768, --32768,-32768,-32768,-32768,-32768, 1028,-32768,-32768,-32768,-32768, - 137,-32768, 138, 595, -6,-32768, -2,-32768, 139, 595, - 121, 991, 991, 991, 991, 991, 140, 141, 143, 991, - 595, 595, 144,-32768, 1028, 1028, 1028,-32768,-32768, 18, - -7,-32768, 0,-32768, 1028, 1028, 1028, 1028,-32768,-32768, --32768,-32768, 917,-32768,-32768, 25, 202, 203, 131, 595, - 234, 595, 991,-32768, 145, 595,-32768, 147,-32768,-32768, --32768, 595, 595, 595,-32768, 154,-32768, 991, 139, 209, - 149, 1028,-32768,-32768,-32768, 157, 159, 160, 161,-32768, --32768,-32768, 595, 595, 991, 167,-32768, 167,-32768, 168, - 595, 170, 991,-32768,-32768,-32768, 991, 595, 163, 991, - 1028,-32768, 1028, 1028, 1028, 1028, 171, 158, 168, 175, - 207,-32768,-32768, 991, 173, 595,-32768, 191,-32768,-32768, - 192, 174, 195, 196, 199, 200, 248, 20, 241,-32768, --32768, 176,-32768,-32768, 1028,-32768,-32768,-32768,-32768, 595, --32768, 673, 69, 258,-32768, 205,-32768, 210,-32768, 673, - 595,-32768, 260, 213, 240, 595, 289, 290,-32768, 595, - 595,-32768,-32768, 312, 315,-32768 +-32768,-32768,-32768, 933, 933, 933, 933, 933, 933, 933, +-32768,-32768, 933, 933, 933, 933, 933, 933, 933,-32768, + 37,-32768, 71,-32768,-32768,-32768,-32768,-32768,-32768,-32768, + -77, 102, 131, 159, 195, 161, 196, 163, 201, 171, + 202, 203, 204, 175, 208, 206, 387, 102, 933, 933, + 933,-32768, 748,-32768, 118, 116, 560,-32768,-32768, 55, +-32768, 560, 560,-32768,-32768,-32768,-32768,-32768,-32768,-32768, +-32768,-32768,-32768, 560, 896, 129, 132,-32768, 560, 123, + 139, 205, 140, 142, 143, 145, 560, 560, 560, 146, + 896, 933, 933, 213,-32768, 173,-32768,-32768,-32768,-32768, +-32768,-32768,-32768,-32768,-32768,-32768,-32768, 148, 149, 150, + 785, 970, 511, 219, 158, 162, 164, 165,-32768,-32768, +-32768, -14, -48, -81,-32768, 130,-32768, 168, 167, 822, +-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 970,-32768, +-32768,-32768,-32768, 169,-32768, 172, 560, -12,-32768, -7, +-32768, 174, 560, 144, 933, 933, 933, 933, 933, 177, + 179, 180, 933, 560, 560, 181,-32768, 251, 970, 970, + 970,-32768,-32768, -74, -36,-32768, -41,-32768, 970, 970, + 970, 970,-32768,-32768,-32768,-32768, 859, 216,-32768, -35, + 237, 238, 176, 560, 560, 933,-32768, 184, 560,-32768, + 186,-32768,-32768,-32768, 560, 560, 560,-32768, 185,-32768, + 933,-32768, 174, 236, 189, 970,-32768,-32768,-32768, 198, + 199, 200, 207,-32768,-32768, 293,-32768,-32768, 560, 560, + 933, 102, 102,-32768, 214, 560, 215, 933,-32768,-32768, +-32768, 933, 560, 217, 933, 970,-32768, 970, 970, 970, + 970,-32768, 218, 212, 214, 223,-32768,-32768, 933, 197, + 560,-32768, 224,-32768,-32768, 225, 221, 227, 228, 229, + 230, 277, 20, 265,-32768,-32768, 231,-32768,-32768, 970, +-32768,-32768,-32768,-32768, 560,-32768, 615, 70, 280,-32768, + 232,-32768, 234,-32768, 615, 560,-32768, 281, 239, 250, + 560, 283, 313,-32768, 560, 560,-32768,-32768, 340, 341, +-32768 }; static const short yypgoto[] = {-32768, --32768, 238, 239, 242, 251, -102, -100, -385,-32768, 288, - 314, -82, -195, -35,-32768, -26,-32768, -46, 232,-32768, - -81, 172, -203, 291,-32768,-32768,-32768,-32768,-32768,-32768, --32768, -1,-32768, 35,-32768,-32768, 319,-32768,-32768,-32768, --32768, 339,-32768, -283, -51, 114, -85,-32768, 329,-32768, --32768,-32768,-32768,-32768, 30, -4,-32768,-32768, 26,-32768, --32768 +-32768, 264, 267, 268, 269, -102, -101, -381,-32768, 318, + 333, -96,-32768, -158, -38,-32768, -26,-32768, -46, 254, +-32768, -82, 188, -209, 317,-32768,-32768,-32768,-32768,-32768, +-32768,-32768, -1,-32768, 59,-32768,-32768, 344,-32768,-32768, +-32768,-32768, 359,-32768, -349, -6, 155, -86,-32768, 357, +-32768,-32768,-32768,-32768,-32768, 56, 9,-32768,-32768, 40, +-32768,-32768 }; -#define YYLAST 1205 +#define YYLAST 1147 static const short yytable[] = { 70, - 19, 268, 402, 192, 85, 193, 28, 168, 310, 28, - 75, 182, 312, 70, -108, 178, 31, 410, 181, 95, - 35, 36, 37, 183, 195, 39, 291, 293, 19, 184, - 185, 186, 187, 188, 189, 190, 191, 43, 300, 3, - 198, 99, 40, 202, 203, 4, 311, 204, 205, 206, - 311, 95, 306, 210, 5, 6, 7, 8, 211, 171, - 80, 152, 5, 6, 7, 8, 97, -49, 41, 172, - 299, 14, 81, 15, 177, 99, 99, 177, 184, 185, - 186, 187, 188, 189, 190, 191, 76, 214, 332, 86, - 87, 45, 32, 215, 83, 332, 334, 196, 197, 177, - 199, 200, 177, 177, 82, 335, 177, 177, 177, 207, - 208, 209, 177, 332, -50, 238, 146, 147, 408, 333, - 332, 401, 239, 240, 241, 259, 414, 283, 342, 90, - 259, 259, 184, 185, 186, 187, 188, 189, 190, 191, - 212, 213, 259, 216, 217, 91, 243, 259, -24, -24, - 372, 92, 373, -23, -23, 259, 259, 259, 98, 264, - 22, 23, 24, 25, -22, -22, -21, -21, 70, 149, - 409, 218, 219, 145, 169, 281, 150, 170, 173, 179, - -28, -27, -26, -25, 70, 282, 177, 318, -31, -32, - 221, 222, 247, 248, 325, 265, 267, 270, 271, 272, - 241, 273, 274, 329, 330, 331, 275, 276, 280, 284, - 303, 294, 259, 336, 337, 338, 339, 285, 259, 286, - 316, 287, 343, 344, 295, 296, 297, 298, 345, 259, - 259, 304, 307, 308, 313, 322, 323, 347, 324, 328, - 351, 301, 353, 360, 361, 317, 177, 319, 320, 321, - 362, 357, 363, 177, 364, 365, 366, 388, 259, 311, - 259, 380, 371, 374, 259, 376, 387, 377, 400, 395, - 259, 259, 259, 389, 391, 404, 243, 405, 411, 382, - 416, 383, 384, 385, 386, 192, 177, 193, 390, 393, - 394, 259, 259, 396, 397, 261, 262, 398, 399, 259, - 192, 358, 193, 412, 418, 413, 259, 263, 417, 420, - 421, 425, 269, 406, 426, 136, 137, 78, 177, 138, - 277, 278, 279, -34, 259, 14, 177, 15, 139, 175, - 177, 42, 89, 381, 4, -34, -34, 341, 237, 44, - 20, 34, 350, -34, -34, -34, -34, 177, 259, -34, - 16, 0, 378, 0, 359, 0, 0, 17, 0, 259, - 0, 0, 0, 0, 259, 0, 0, 0, 259, 259, - 0, 0, 0, 0, 0, 0, 0, 309, 0, 0, - 0, 0, 0, 315, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 326, 327, 0, 0, 0, 0, + 19, 85, 314, 192, 193, 28, 168, 315, 182, 241, + 195, 407, 31, 70, 178, 75, -51, 181, 214, 95, + 183, 336, 295, 297, 215, 99, 415, 337, 19, 184, + 185, 186, 187, 188, 189, 190, 191, 269, 271, 198, + 288, 28, 202, 203, 211, 288, 204, 205, 206, 310, + 40, 95, 210, 171, 336, 304, 45, 413, 99, 336, + 336, 152, 39, 172, 339, 419, 97, 338, 348, 43, + 5, 6, 7, 8, 177, 80, 41, 177, 81, 184, + 185, 186, 187, 188, 189, 190, 191, 303, 32, 86, + 87, 76, 99, 22, 23, 24, 25, 196, 197, 177, + 199, 200, 177, 177, 146, 147, 177, 177, 177, 207, + 208, 209, 177, 184, 185, 186, 187, 188, 189, 190, + 191, 406, 242, 243, 244, 83, 286, 82, 46, 47, + 90, 93, 49, 50, 51, 52, 53, 54, 55, 56, + 57, 58, 59, 60, 61, 14, 246, 15, 35, 36, + 37, 14, -52, 15, 212, 213, 267, 218, 219, 91, + 240, -24, -24, -23, -23, -22, -22, 62, 70, 92, + 262, 414, 284, -21, -21, 262, 262, 220, 221, 98, + 145, 149, 173, 150, 70, 285, 177, 262, 169, 321, + -110, 170, 262, 377, 378, 179, 328, 216, -28, -27, + 262, 262, 262, 244, -26, -25, 333, 334, 335, -31, + -32, 223, 224, 250, 251, 3, 340, 341, 342, 343, + 63, 4, 273, 64, 268, 288, 65, 270, 66, 94, + 5, 6, 7, 8, 274, 276, 287, 277, 278, 275, + 279, 283, 298, 319, 305, 289, 290, 291, 320, 177, + 322, 323, 324, 367, 332, 299, 177, 349, 350, 300, + 262, 301, 302, 307, 311, 308, 262, 312, 346, 316, + 365, 382, 325, 351, 326, 327, 331, 262, 262, 356, + 246, 358, 362, 387, 366, 388, 389, 390, 391, 177, + 192, 193, 395, 368, 369, 370, 372, 405, 396, 409, + 416, 421, 371, 425, 363, 192, 193, 262, 262, 379, + 381, 393, 262, 392, 423, 385, 400, 411, 262, 262, + 262, 394, 398, 399, 177, 401, 402, 403, 404, 418, + 417, 177, 410, 426, 422, 177, 264, 265, 386, 430, + 431, 136, 262, 262, 137, 138, 139, 78, 266, 262, + 42, 175, 177, 272, 239, -34, 262, 14, 89, 15, + 20, 280, 281, 282, 44, 345, 4, -34, -34, 34, + 383, 355, 364, 0, 262, -34, -34, -34, -34, 0, + 0, -34, 16, 0, 0, 0, 0, 0, 0, 17, + 0, 46, 47, 0, 0, 0, 0, 0, 262, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 14, 262, + 15, 0, 225, 0, 262, 0, 0, 0, 262, 262, + 0, 313, 0, 226, 227, 0, 0, 318, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 329, 330, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 46, 47, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 346, 0, 348, 0, 0, 14, 352, - 15, 0, 223, 0, 0, 354, 355, 356, 0, 0, - 0, 0, 0, 224, 225, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 367, 368, 0, 0, - 0, 0, 0, 0, 375, 0, 0, 0, 0, 0, - 0, 379, 0, 110, 111, 112, 113, 114, 115, 116, - 117, 118, 119, 120, 121, 122, 123, 0, 0, 392, - 0, 0, 226, 0, 227, 228, 131, 132, 0, 0, - 0, 0, 0, 0, 0, 0, 229, 0, 0, 230, - 0, 231, 0, 407, 232, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 415, 0, 0, 0, 0, 419, - 0, 0, 0, 422, 423, 46, 47, 0, 93, 49, - 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, - 60, 61, 14, 0, 15, 0, 46, 47, 0, 93, - 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, - 163, 60, 61, 14, 62, 15, 0, 0, 0, 0, + 0, 0, 0, 110, 111, 112, 113, 114, 115, 116, + 117, 118, 119, 120, 121, 122, 123, 0, 352, 353, + 0, 0, 228, 357, 229, 230, 131, 132, 0, 359, + 360, 361, 0, 0, 0, 0, 231, 0, 0, 232, + 0, 233, 0, 0, 234, 0, 0, 0, 0, 0, + 0, 0, 0, 373, 374, 0, 0, 0, 0, 0, + 380, 0, 0, 0, 0, 46, 47, 384, 93, 153, + 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, + 60, 61, 14, 0, 15, 397, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 62, 0, 249, 250, 46, - 47, 251, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 14, 0, 15, 0, - 0, 252, 253, 0, 0, 0, 0, 63, 0, 0, - 64, 254, 255, 65, 0, 66, 94, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, - 0, 64, 0, 0, 65, 0, 66, 292, 0, 0, - 0, 110, 111, 112, 113, 114, 115, 116, 117, 118, - 119, 120, 121, 122, 123, 249, 250, 0, 0, 251, - 226, 0, 227, 228, 131, 132, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 256, 0, 252, - 253, 0, 0, 0, 0, 0, 0, 0, 0, 254, - 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 62, 0, 0, 0, 0, 412, + 0, 0, 252, 253, 46, 47, 254, 0, 0, 0, + 420, 0, 0, 0, 0, 424, 0, 0, 0, 427, + 428, 14, 0, 15, 0, 0, 255, 256, 0, 0, + 0, 0, 0, 0, 0, 0, 257, 258, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, + 64, 0, 0, 65, 0, 66, 296, 252, 253, 0, + 0, 254, 0, 0, 0, 0, 110, 111, 112, 113, + 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, + 0, 255, 256, 0, 0, 228, 0, 229, 230, 131, + 132, 257, 258, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 259, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 110, - 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, - 121, 122, 123, 0, 0, 0, 0, 0, 226, 0, - 227, 228, 131, 132, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 46, 47, 256, 93, 49, 50, 51, + 0, 110, 111, 112, 113, 114, 115, 116, 117, 118, + 119, 120, 121, 122, 123, 0, 0, 0, 0, 0, + 228, 0, 229, 230, 131, 132, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 46, 47, 259, 93, 49, + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, + 60, 61, 14, 0, 15, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 174, 0, 0, 0, + 0, 0, 46, 47, 62, 93, 49, 50, 51, 52, + 53, 54, 55, 56, 57, 58, 59, 60, 61, 14, + 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 245, 0, 0, 0, 0, 0, 46, + 47, 62, 93, 153, 154, 155, 156, 157, 158, 159, + 160, 161, 162, 163, 60, 61, 14, 63, 15, 0, + 64, 0, 0, 65, 0, 66, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 46, 47, 62, 93, + 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, + 59, 60, 61, 14, 63, 15, 0, 64, 0, 0, + 65, 0, 66, 0, 0, 0, 0, 309, 0, 0, + 0, 0, 0, 46, 47, 62, 93, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, - 14, 0, 15, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 174, 0, 0, 0, 0, 0, - 46, 47, 62, 93, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 59, 60, 61, 14, 0, 15, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 242, 0, 0, 0, 0, 0, 46, 47, 62, - 93, 153, 154, 155, 156, 157, 158, 159, 160, 161, - 162, 163, 60, 61, 14, 63, 15, 0, 64, 0, + 14, 63, 15, 0, 64, 0, 292, 65, 0, 66, + 0, 0, 0, 0, 344, 0, 0, 0, 0, 0, + 46, 47, 62, 48, 49, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 59, 60, 61, 14, 63, 15, + 0, 64, 0, 0, 65, 0, 66, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 46, 47, 62, + 93, 49, 50, 51, 52, 53, 54, 55, 56, 57, + 58, 59, 60, 61, 14, 63, 15, 0, 64, 0, 0, 65, 0, 66, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 46, 47, 62, 93, 49, 50, - 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, + 0, 0, 0, 0, 46, 47, 62, 93, 153, 154, + 155, 156, 157, 158, 159, 160, 161, 162, 163, 60, 61, 14, 63, 15, 0, 64, 0, 0, 65, 0, - 66, 0, 0, 0, 0, 305, 0, 0, 0, 0, - 0, 46, 47, 62, 93, 49, 50, 51, 52, 53, + 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 46, 47, 62, 180, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 14, 63, - 15, 0, 64, 0, 288, 65, 0, 66, 0, 0, - 0, 0, 340, 0, 0, 0, 0, 0, 46, 47, - 62, 48, 49, 50, 51, 52, 53, 54, 55, 56, - 57, 58, 59, 60, 61, 14, 63, 15, 0, 64, - 0, 0, 65, 0, 66, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 46, 47, 62, 93, 49, - 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, - 60, 61, 14, 63, 15, 0, 64, 0, 0, 65, - 0, 66, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 46, 47, 62, 93, 153, 154, 155, 156, - 157, 158, 159, 160, 161, 162, 163, 60, 61, 14, - 63, 15, 0, 64, 0, 0, 65, 0, 66, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 46, - 47, 62, 180, 49, 50, 51, 52, 53, 54, 55, - 56, 57, 58, 59, 60, 61, 14, 63, 15, 0, - 64, 0, 0, 65, 0, 66, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 62, 0, + 15, 0, 64, 0, 0, 65, 0, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 63, 0, 0, 64, 0, 0, - 65, 0, 66, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 101, 0, 0, 0, 0, - 0, 63, 0, 0, 64, 102, 103, 65, 0, 66, - 0, 104, 105, 106, 107, 108, 109, 110, 111, 112, - 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, - 123, 124, 125, 126, 0, 0, 127, 128, 129, 130, - 131, 132, 133, 134, 135 + 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 63, 0, 0, 64, + 0, 0, 65, 0, 66, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 100, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 101, 0, 0, + 0, 0, 0, 63, 0, 0, 64, 102, 103, 65, + 0, 66, 0, 104, 105, 106, 107, 108, 109, 110, + 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, + 121, 122, 123, 124, 125, 126, 0, 0, 127, 128, + 129, 130, 131, 132, 133, 134, 135 }; static const short yycheck[] = { 26, - 2, 197, 388, 106, 40, 106, 23, 89, 15, 23, - 29, 9, 15, 40, 0, 101, 30, 403, 104, 66, - 48, 49, 50, 21, 107, 95, 230, 231, 30, 10, - 11, 12, 13, 14, 15, 16, 17, 95, 104, 25, - 126, 107, 20, 129, 130, 31, 53, 133, 134, 135, - 53, 98, 256, 139, 40, 41, 42, 43, 141, 96, - 95, 88, 40, 41, 42, 43, 68, 98, 46, 106, - 102, 22, 95, 24, 101, 107, 107, 104, 10, 11, - 12, 13, 14, 15, 16, 17, 105, 96, 96, 32, - 33, 4, 106, 102, 100, 96, 104, 124, 125, 126, - 127, 128, 129, 130, 95, 106, 133, 134, 135, 136, - 137, 138, 139, 96, 98, 167, 51, 52, 402, 102, - 96, 102, 169, 170, 171, 177, 410, 213, 104, 4, - 182, 183, 10, 11, 12, 13, 14, 15, 16, 17, - 84, 85, 194, 27, 28, 4, 173, 199, 3, 4, - 346, 4, 348, 3, 4, 207, 208, 209, 98, 195, - 57, 58, 59, 60, 3, 4, 3, 4, 195, 4, - 102, 3, 4, 24, 101, 211, 24, 101, 98, 55, - 4, 4, 4, 4, 211, 212, 213, 273, 7, 7, - 4, 7, 96, 99, 280, 96, 96, 100, 96, 35, - 247, 96, 96, 285, 286, 287, 96, 96, 96, 24, - 96, 24, 264, 295, 296, 297, 298, 98, 270, 98, - 100, 98, 21, 21, 98, 98, 98, 98, 98, 281, - 282, 99, 96, 96, 96, 96, 96, 4, 96, 96, - 96, 243, 96, 35, 96, 272, 273, 274, 275, 276, - 332, 98, 96, 280, 96, 96, 96, 100, 310, 53, - 312, 99, 96, 96, 316, 96, 96, 353, 21, 96, - 322, 323, 324, 99, 102, 35, 303, 102, 21, 361, - 21, 363, 364, 365, 366, 388, 313, 388, 374, 99, - 99, 343, 344, 99, 99, 182, 183, 99, 99, 351, - 403, 328, 403, 99, 65, 96, 358, 194, 96, 21, - 21, 0, 199, 395, 0, 78, 78, 30, 345, 78, - 207, 208, 209, 20, 376, 22, 353, 24, 78, 98, - 357, 18, 42, 360, 31, 32, 33, 303, 167, 21, - 2, 13, 313, 40, 41, 42, 43, 374, 400, 46, - 47, -1, 357, -1, 329, -1, -1, 54, -1, 411, - -1, -1, -1, -1, 416, -1, -1, -1, 420, 421, - -1, -1, -1, -1, -1, -1, -1, 264, -1, -1, - -1, -1, -1, 270, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 281, 282, -1, -1, -1, -1, + 2, 40, 15, 106, 106, 23, 89, 15, 9, 168, + 107, 393, 30, 40, 101, 29, 98, 104, 96, 66, + 21, 96, 232, 233, 102, 107, 408, 102, 30, 10, + 11, 12, 13, 14, 15, 16, 17, 196, 197, 126, + 53, 23, 129, 130, 141, 53, 133, 134, 135, 259, + 20, 98, 139, 96, 96, 104, 4, 407, 107, 96, + 96, 88, 95, 106, 106, 415, 68, 104, 104, 95, + 40, 41, 42, 43, 101, 95, 46, 104, 95, 10, + 11, 12, 13, 14, 15, 16, 17, 102, 106, 32, + 33, 105, 107, 57, 58, 59, 60, 124, 125, 126, + 127, 128, 129, 130, 51, 52, 133, 134, 135, 136, + 137, 138, 139, 10, 11, 12, 13, 14, 15, 16, + 17, 102, 169, 170, 171, 100, 213, 95, 5, 6, + 4, 8, 9, 10, 11, 12, 13, 14, 15, 16, + 17, 18, 19, 20, 21, 22, 173, 24, 48, 49, + 50, 22, 98, 24, 84, 85, 195, 27, 28, 4, + 167, 3, 4, 3, 4, 3, 4, 44, 195, 4, + 177, 102, 211, 3, 4, 182, 183, 3, 4, 98, + 24, 4, 98, 24, 211, 212, 213, 194, 101, 276, + 0, 101, 199, 352, 353, 55, 283, 96, 4, 4, + 207, 208, 209, 250, 4, 4, 289, 290, 291, 7, + 7, 4, 7, 96, 99, 25, 299, 300, 301, 302, + 97, 31, 100, 100, 96, 53, 103, 96, 105, 106, + 40, 41, 42, 43, 96, 96, 24, 96, 96, 35, + 96, 96, 24, 100, 246, 98, 98, 98, 275, 276, + 277, 278, 279, 336, 4, 98, 283, 21, 21, 98, + 267, 98, 98, 96, 96, 99, 273, 96, 53, 96, + 35, 358, 96, 98, 96, 96, 96, 284, 285, 96, + 307, 96, 98, 366, 96, 368, 369, 370, 371, 316, + 393, 393, 379, 96, 96, 96, 4, 21, 102, 35, + 21, 21, 96, 21, 331, 408, 408, 314, 315, 96, + 96, 100, 319, 96, 65, 99, 96, 400, 325, 326, + 327, 99, 99, 99, 351, 99, 99, 99, 99, 96, + 99, 358, 102, 21, 96, 362, 182, 183, 365, 0, + 0, 78, 349, 350, 78, 78, 78, 30, 194, 356, + 18, 98, 379, 199, 167, 20, 363, 22, 42, 24, + 2, 207, 208, 209, 21, 307, 31, 32, 33, 13, + 362, 316, 333, -1, 381, 40, 41, 42, 43, -1, + -1, 46, 47, -1, -1, -1, -1, -1, -1, 54, + -1, 5, 6, -1, -1, -1, -1, -1, 405, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 22, 416, + 24, -1, 26, -1, 421, -1, -1, -1, 425, 426, + -1, 267, -1, 37, 38, -1, -1, 273, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 284, 285, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 5, 6, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 310, -1, 312, -1, -1, 22, 316, - 24, -1, 26, -1, -1, 322, 323, 324, -1, -1, - -1, -1, -1, 37, 38, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 343, 344, -1, -1, - -1, -1, -1, -1, 351, -1, -1, -1, -1, -1, - -1, 358, -1, 67, 68, 69, 70, 71, 72, 73, - 74, 75, 76, 77, 78, 79, 80, -1, -1, 376, - -1, -1, 86, -1, 88, 89, 90, 91, -1, -1, - -1, -1, -1, -1, -1, -1, 100, -1, -1, 103, - -1, 105, -1, 400, 108, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 411, -1, -1, -1, -1, 416, - -1, -1, -1, 420, 421, 5, 6, -1, 8, 9, + -1, -1, -1, 67, 68, 69, 70, 71, 72, 73, + 74, 75, 76, 77, 78, 79, 80, -1, 314, 315, + -1, -1, 86, 319, 88, 89, 90, 91, -1, 325, + 326, 327, -1, -1, -1, -1, 100, -1, -1, 103, + -1, 105, -1, -1, 108, -1, -1, -1, -1, -1, + -1, -1, -1, 349, 350, -1, -1, -1, -1, -1, + 356, -1, -1, -1, -1, 5, 6, 363, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, - 20, 21, 22, -1, 24, -1, 5, 6, -1, 8, - 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, - 19, 20, 21, 22, 44, 24, -1, -1, -1, -1, + 20, 21, 22, -1, 24, 381, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 44, -1, -1, -1, -1, 405, + -1, -1, 3, 4, 5, 6, 7, -1, -1, -1, + 416, -1, -1, -1, -1, 421, -1, -1, -1, 425, + 426, 22, -1, 24, -1, -1, 27, 28, -1, -1, + -1, -1, -1, -1, -1, -1, 37, 38, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 97, -1, -1, + 100, -1, -1, 103, -1, 105, 106, 3, 4, -1, + -1, 7, -1, -1, -1, -1, 67, 68, 69, 70, + 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, + -1, 27, 28, -1, -1, 86, -1, 88, 89, 90, + 91, 37, 38, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 103, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 44, -1, 3, 4, 5, - 6, 7, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 22, -1, 24, -1, - -1, 27, 28, -1, -1, -1, -1, 97, -1, -1, - 100, 37, 38, 103, -1, 105, 106, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 97, -1, - -1, 100, -1, -1, 103, -1, 105, 106, -1, -1, -1, 67, 68, 69, 70, 71, 72, 73, 74, 75, - 76, 77, 78, 79, 80, 3, 4, -1, -1, 7, + 76, 77, 78, 79, 80, -1, -1, -1, -1, -1, 86, -1, 88, 89, 90, 91, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 103, -1, 27, - 28, -1, -1, -1, -1, -1, -1, -1, -1, 37, - 38, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 67, - 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, - 78, 79, 80, -1, -1, -1, -1, -1, 86, -1, - 88, 89, 90, 91, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 5, 6, 103, 8, 9, 10, 11, + -1, -1, -1, -1, -1, 5, 6, 103, 8, 9, + 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, + 20, 21, 22, -1, 24, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 36, -1, -1, -1, + -1, -1, 5, 6, 44, 8, 9, 10, 11, 12, + 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, + -1, 24, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 36, -1, -1, -1, -1, -1, 5, + 6, 44, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 97, 24, -1, + 100, -1, -1, 103, -1, 105, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 5, 6, 44, 8, + 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, + 19, 20, 21, 22, 97, 24, -1, 100, -1, -1, + 103, -1, 105, -1, -1, -1, -1, 36, -1, -1, + -1, -1, -1, 5, 6, 44, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, - 22, -1, 24, -1, -1, -1, -1, -1, -1, -1, + 22, 97, 24, -1, 100, -1, 102, 103, -1, 105, -1, -1, -1, -1, 36, -1, -1, -1, -1, -1, 5, 6, 44, 8, 9, 10, 11, 12, 13, 14, - 15, 16, 17, 18, 19, 20, 21, 22, -1, 24, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 36, -1, -1, -1, -1, -1, 5, 6, 44, + 15, 16, 17, 18, 19, 20, 21, 22, 97, 24, + -1, 100, -1, -1, 103, -1, 105, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 5, 6, 44, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 97, 24, -1, 100, -1, -1, 103, -1, 105, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 5, 6, 44, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 97, 24, -1, 100, -1, -1, 103, -1, - 105, -1, -1, -1, -1, 36, -1, -1, -1, -1, + 105, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 5, 6, 44, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 97, - 24, -1, 100, -1, 102, 103, -1, 105, -1, -1, - -1, -1, 36, -1, -1, -1, -1, -1, 5, 6, - 44, 8, 9, 10, 11, 12, 13, 14, 15, 16, - 17, 18, 19, 20, 21, 22, 97, 24, -1, 100, - -1, -1, 103, -1, 105, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 5, 6, 44, 8, 9, - 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, - 20, 21, 22, 97, 24, -1, 100, -1, -1, 103, - -1, 105, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 5, 6, 44, 8, 9, 10, 11, 12, - 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, - 97, 24, -1, 100, -1, -1, 103, -1, 105, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 5, - 6, 44, 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 97, 24, -1, - 100, -1, -1, 103, -1, 105, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 44, -1, + 24, -1, 100, -1, -1, 103, -1, 105, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 97, -1, -1, 100, -1, -1, - 103, -1, 105, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 34, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 45, -1, -1, -1, -1, - -1, 97, -1, -1, 100, 55, 56, 103, -1, 105, - -1, 61, 62, 63, 64, 65, 66, 67, 68, 69, - 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, - 80, 81, 82, 83, -1, -1, 86, 87, 88, 89, - 90, 91, 92, 93, 94 + 44, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 97, -1, -1, 100, + -1, -1, 103, -1, 105, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 34, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 45, -1, -1, + -1, -1, -1, 97, -1, -1, 100, 55, 56, 103, + -1, 105, -1, 61, 62, 63, 64, 65, 66, 67, + 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, + 78, 79, 80, 81, 82, 83, -1, -1, 86, 87, + 88, 89, 90, 91, 92, 93, 94 }; /* -*-C-*- Note some compilers choke on comments on `#line' lines. */ #line 3 "/usr/share/bison.simple" @@ -2163,7 +2160,7 @@ switch (yyn) { case 2: -#line 984 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 991 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (yyvsp[0].UIntVal > (uint32_t)INT32_MAX) // Outside of my range! ThrowException("Value too large for type!"); @@ -2171,7 +2168,7 @@ ; break;} case 4: -#line 992 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 999 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (yyvsp[0].UInt64Val > (uint64_t)INT64_MAX) // Outside of my range! ThrowException("Value too large for type!"); @@ -2179,55 +2176,55 @@ ; break;} case 33: -#line 1015 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1022 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.StrVal = yyvsp[-1].StrVal; ; break;} case 34: -#line 1018 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1025 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.StrVal = 0; ; break;} case 35: -#line 1022 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1029 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.Linkage = GlobalValue::InternalLinkage; ; break;} case 36: -#line 1023 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1030 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.Linkage = GlobalValue::LinkOnceLinkage; ; break;} case 37: -#line 1024 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1031 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.Linkage = GlobalValue::WeakLinkage; ; break;} case 38: -#line 1025 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1032 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.Linkage = GlobalValue::AppendingLinkage; ; break;} case 39: -#line 1026 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1033 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.Linkage = GlobalValue::ExternalLinkage; ; break;} case 40: -#line 1028 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1035 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.UIntVal = CallingConv::C; ; break;} case 41: -#line 1029 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1036 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.UIntVal = CallingConv::C; ; break;} case 42: -#line 1030 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1037 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.UIntVal = CallingConv::Fast; ; break;} case 43: -#line 1031 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1038 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.UIntVal = CallingConv::Cold; ; break;} case 44: -#line 1032 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1039 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if ((unsigned)yyvsp[0].UInt64Val != yyvsp[0].UInt64Val) ThrowException("Calling conv too large!"); @@ -2235,49 +2232,57 @@ ; break;} case 45: -#line 1040 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1047 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.UIntVal = 0; ; break;} case 46: -#line 1041 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1048 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.UIntVal = yyvsp[0].UInt64Val; ; break;} +case 47: +#line 1049 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.UIntVal = 0; ; + break;} case 48: #line 1050 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" -{ yyval.TypeVal = new PATypeHolder(yyvsp[0].PrimType); ; +{ yyval.UIntVal = yyvsp[0].UInt64Val; ; break;} case 50: -#line 1051 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1059 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.TypeVal = new PATypeHolder(yyvsp[0].PrimType); ; + break;} +case 52: +#line 1060 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.TypeVal = new PATypeHolder(yyvsp[0].PrimType); ; break;} -case 51: -#line 1053 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 53: +#line 1062 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) ThrowException("Invalid upreference in type: " + (*yyvsp[0].TypeVal)->getDescription()); yyval.TypeVal = yyvsp[0].TypeVal; ; break;} -case 65: -#line 1064 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 67: +#line 1073 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.TypeVal = new PATypeHolder(OpaqueType::get()); ; break;} -case 66: -#line 1067 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 68: +#line 1076 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.TypeVal = new PATypeHolder(yyvsp[0].PrimType); ; break;} -case 67: -#line 1070 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 69: +#line 1079 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Named types are also simple types... yyval.TypeVal = new PATypeHolder(getTypeVal(yyvsp[0].ValIDVal)); ; break;} -case 68: -#line 1076 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 70: +#line 1085 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Type UpReference if (yyvsp[0].UInt64Val > (uint64_t)~0U) ThrowException("Value out of range!"); OpaqueType *OT = OpaqueType::get(); // Use temporary placeholder @@ -2286,8 +2291,8 @@ UR_OUT("New Upreference!\n"); ; break;} -case 69: -#line 1083 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 71: +#line 1092 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Function derived type? std::vector Params; for (std::list::iterator I = yyvsp[-1].TypeList->begin(), @@ -2301,15 +2306,15 @@ delete yyvsp[-3].TypeVal; // Delete the return type handle ; break;} -case 70: -#line 1095 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 72: +#line 1104 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Sized array type? yyval.TypeVal = new PATypeHolder(HandleUpRefs(ArrayType::get(*yyvsp[-1].TypeVal, (unsigned)yyvsp[-3].UInt64Val))); delete yyvsp[-1].TypeVal; ; break;} -case 71: -#line 1099 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 73: +#line 1108 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Packed array type? const llvm::Type* ElemTy = yyvsp[-1].TypeVal->get(); if ((unsigned)yyvsp[-3].UInt64Val != yyvsp[-3].UInt64Val) { @@ -2322,8 +2327,8 @@ delete yyvsp[-1].TypeVal; ; break;} -case 72: -#line 1110 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 74: +#line 1119 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Structure type? std::vector Elements; for (std::list::iterator I = yyvsp[-1].TypeList->begin(), @@ -2334,52 +2339,52 @@ delete yyvsp[-1].TypeList; ; break;} -case 73: -#line 1119 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 75: +#line 1128 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Empty structure type? yyval.TypeVal = new PATypeHolder(StructType::get(std::vector())); ; break;} -case 74: -#line 1122 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 76: +#line 1131 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Pointer type? yyval.TypeVal = new PATypeHolder(HandleUpRefs(PointerType::get(*yyvsp[-1].TypeVal))); delete yyvsp[-1].TypeVal; ; break;} -case 75: -#line 1130 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 77: +#line 1139 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.TypeList = new std::list(); yyval.TypeList->push_back(*yyvsp[0].TypeVal); delete yyvsp[0].TypeVal; ; break;} -case 76: -#line 1134 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 78: +#line 1143 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeList=yyvsp[-2].TypeList)->push_back(*yyvsp[0].TypeVal); delete yyvsp[0].TypeVal; ; break;} -case 78: -#line 1140 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 80: +#line 1149 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeList=yyvsp[-2].TypeList)->push_back(Type::VoidTy); ; break;} -case 79: -#line 1143 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 81: +#line 1152 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeList = new std::list())->push_back(Type::VoidTy); ; break;} -case 80: -#line 1146 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 82: +#line 1155 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.TypeList = new std::list(); ; break;} -case 81: -#line 1156 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 83: +#line 1165 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Nonempty unsized arr const ArrayType *ATy = dyn_cast(yyvsp[-3].TypeVal->get()); if (ATy == 0) @@ -2406,8 +2411,8 @@ delete yyvsp[-3].TypeVal; delete yyvsp[-1].ConstVector; ; break;} -case 82: -#line 1181 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 84: +#line 1190 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { const ArrayType *ATy = dyn_cast(yyvsp[-2].TypeVal->get()); if (ATy == 0) @@ -2422,8 +2427,8 @@ delete yyvsp[-2].TypeVal; ; break;} -case 83: -#line 1194 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 85: +#line 1203 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { const ArrayType *ATy = dyn_cast(yyvsp[-2].TypeVal->get()); if (ATy == 0) @@ -2453,8 +2458,8 @@ delete yyvsp[-2].TypeVal; ; break;} -case 84: -#line 1222 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 86: +#line 1231 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Nonempty unsized arr const PackedType *PTy = dyn_cast(yyvsp[-3].TypeVal->get()); if (PTy == 0) @@ -2481,8 +2486,8 @@ delete yyvsp[-3].TypeVal; delete yyvsp[-1].ConstVector; ; break;} -case 85: -#line 1247 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 87: +#line 1256 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { const StructType *STy = dyn_cast(yyvsp[-3].TypeVal->get()); if (STy == 0) @@ -2504,8 +2509,8 @@ delete yyvsp[-3].TypeVal; delete yyvsp[-1].ConstVector; ; break;} -case 86: -#line 1267 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 88: +#line 1276 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { const StructType *STy = dyn_cast(yyvsp[-2].TypeVal->get()); if (STy == 0) @@ -2519,8 +2524,8 @@ delete yyvsp[-2].TypeVal; ; break;} -case 87: -#line 1279 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 89: +#line 1288 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { const PointerType *PTy = dyn_cast(yyvsp[-1].TypeVal->get()); if (PTy == 0) @@ -2531,15 +2536,15 @@ delete yyvsp[-1].TypeVal; ; break;} -case 88: -#line 1288 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 90: +#line 1297 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.ConstVal = UndefValue::get(yyvsp[-1].TypeVal->get()); delete yyvsp[-1].TypeVal; ; break;} -case 89: -#line 1292 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 91: +#line 1301 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { const PointerType *Ty = dyn_cast(yyvsp[-1].TypeVal->get()); if (Ty == 0) @@ -2600,8 +2605,8 @@ delete yyvsp[-1].TypeVal; // Free the type handle ; break;} -case 90: -#line 1351 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 92: +#line 1360 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (yyvsp[-1].TypeVal->get() != yyvsp[0].ConstVal->getType()) ThrowException("Mismatched types for constant expression!"); @@ -2609,8 +2614,8 @@ delete yyvsp[-1].TypeVal; ; break;} -case 91: -#line 1357 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 93: +#line 1366 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { const Type *Ty = yyvsp[-1].TypeVal->get(); if (isa(Ty) || Ty == Type::LabelTy || isa(Ty)) @@ -2619,44 +2624,44 @@ delete yyvsp[-1].TypeVal; ; break;} -case 92: -#line 1365 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 94: +#line 1374 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // integral constants if (!ConstantSInt::isValueValidForType(yyvsp[-1].PrimType, yyvsp[0].SInt64Val)) ThrowException("Constant value doesn't fit in type!"); yyval.ConstVal = ConstantSInt::get(yyvsp[-1].PrimType, yyvsp[0].SInt64Val); ; break;} -case 93: -#line 1370 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 95: +#line 1379 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // integral constants if (!ConstantUInt::isValueValidForType(yyvsp[-1].PrimType, yyvsp[0].UInt64Val)) ThrowException("Constant value doesn't fit in type!"); yyval.ConstVal = ConstantUInt::get(yyvsp[-1].PrimType, yyvsp[0].UInt64Val); ; break;} -case 94: -#line 1375 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 96: +#line 1384 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Boolean constants yyval.ConstVal = ConstantBool::True; ; break;} -case 95: -#line 1378 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 97: +#line 1387 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Boolean constants yyval.ConstVal = ConstantBool::False; ; break;} -case 96: -#line 1381 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 98: +#line 1390 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Float & Double constants if (!ConstantFP::isValueValidForType(yyvsp[-1].PrimType, yyvsp[0].FPVal)) ThrowException("Floating point constant invalid for type!!"); yyval.ConstVal = ConstantFP::get(yyvsp[-1].PrimType, yyvsp[0].FPVal); ; break;} -case 97: -#line 1388 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 99: +#line 1397 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!yyvsp[-3].ConstVal->getType()->isFirstClassType()) ThrowException("cast constant expression from a non-primitive type: '" + @@ -2668,8 +2673,8 @@ delete yyvsp[-1].TypeVal; ; break;} -case 98: -#line 1398 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 100: +#line 1407 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!isa(yyvsp[-2].ConstVal->getType())) ThrowException("GetElementPtr requires a pointer operand!"); @@ -2702,8 +2707,8 @@ yyval.ConstVal = ConstantExpr::getGetElementPtr(yyvsp[-2].ConstVal, IdxVec); ; break;} -case 99: -#line 1429 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 101: +#line 1438 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (yyvsp[-5].ConstVal->getType() != Type::BoolTy) ThrowException("Select condition must be of boolean type!"); @@ -2712,8 +2717,8 @@ yyval.ConstVal = ConstantExpr::getSelect(yyvsp[-5].ConstVal, yyvsp[-3].ConstVal, yyvsp[-1].ConstVal); ; break;} -case 100: -#line 1436 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 102: +#line 1445 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (yyvsp[-3].ConstVal->getType() != yyvsp[-1].ConstVal->getType()) ThrowException("Binary operator types must match!"); @@ -2736,8 +2741,8 @@ } ; break;} -case 101: -#line 1457 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 103: +#line 1466 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (yyvsp[-3].ConstVal->getType() != yyvsp[-1].ConstVal->getType()) ThrowException("Logical operator types must match!"); @@ -2746,16 +2751,16 @@ yyval.ConstVal = ConstantExpr::get(yyvsp[-5].BinaryOpVal, yyvsp[-3].ConstVal, yyvsp[-1].ConstVal); ; break;} -case 102: -#line 1464 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 104: +#line 1473 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (yyvsp[-3].ConstVal->getType() != yyvsp[-1].ConstVal->getType()) ThrowException("setcc operand types must match!"); yyval.ConstVal = ConstantExpr::get(yyvsp[-5].BinaryOpVal, yyvsp[-3].ConstVal, yyvsp[-1].ConstVal); ; break;} -case 103: -#line 1469 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 105: +#line 1478 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (yyvsp[-1].ConstVal->getType() != Type::UByteTy) ThrowException("Shift count for shift constant must be unsigned byte!"); @@ -2764,55 +2769,55 @@ yyval.ConstVal = ConstantExpr::get(yyvsp[-5].OtherOpVal, yyvsp[-3].ConstVal, yyvsp[-1].ConstVal); ; break;} -case 104: -#line 1479 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 106: +#line 1488 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ConstVector = yyvsp[-2].ConstVector)->push_back(yyvsp[0].ConstVal); ; break;} -case 105: -#line 1482 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 107: +#line 1491 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.ConstVector = new std::vector(); yyval.ConstVector->push_back(yyvsp[0].ConstVal); ; break;} -case 106: -#line 1489 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 108: +#line 1498 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.BoolVal = false; ; break;} -case 107: -#line 1489 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 109: +#line 1498 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.BoolVal = true; ; break;} -case 108: -#line 1499 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 110: +#line 1508 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.ModuleVal = ParserResult = yyvsp[0].ModuleVal; CurModule.ModuleDone(); ; break;} -case 109: -#line 1506 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 111: +#line 1515 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.ModuleVal = yyvsp[-1].ModuleVal; CurFun.FunctionDone(); ; break;} -case 110: -#line 1510 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 112: +#line 1519 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.ModuleVal = yyvsp[-1].ModuleVal; ; break;} -case 111: -#line 1513 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 113: +#line 1522 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.ModuleVal = yyvsp[-1].ModuleVal; ; break;} -case 112: -#line 1516 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 114: +#line 1525 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.ModuleVal = CurModule.CurrentModule; // Emit an error if there are any unresolved types left. @@ -2825,8 +2830,8 @@ } ; break;} -case 113: -#line 1529 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 115: +#line 1538 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Eagerly resolve types. This is not an optimization, this is a // requirement that is due to the fact that we could have this: @@ -2848,56 +2853,56 @@ delete yyvsp[0].TypeVal; ; break;} -case 114: -#line 1549 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 116: +#line 1558 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Function prototypes can be in const pool ; break;} -case 115: -#line 1551 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 117: +#line 1560 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { - if (yyvsp[0].ConstVal == 0) ThrowException("Global value initializer is not a constant!"); - ParseGlobalVariable(yyvsp[-3].StrVal, yyvsp[-2].Linkage, yyvsp[-1].BoolVal, yyvsp[0].ConstVal->getType(), yyvsp[0].ConstVal); + if (yyvsp[-1].ConstVal == 0) ThrowException("Global value initializer is not a constant!"); + ParseGlobalVariable(yyvsp[-4].StrVal, yyvsp[-3].Linkage, yyvsp[-2].BoolVal, yyvsp[-1].ConstVal->getType(), yyvsp[-1].ConstVal, yyvsp[0].UIntVal); ; break;} -case 116: -#line 1555 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 118: +#line 1564 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { - ParseGlobalVariable(yyvsp[-3].StrVal, GlobalValue::ExternalLinkage, yyvsp[-1].BoolVal, *yyvsp[0].TypeVal, 0); - delete yyvsp[0].TypeVal; + ParseGlobalVariable(yyvsp[-4].StrVal, GlobalValue::ExternalLinkage, yyvsp[-2].BoolVal, *yyvsp[-1].TypeVal, 0, yyvsp[0].UIntVal); + delete yyvsp[-1].TypeVal; ; break;} -case 117: -#line 1559 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 119: +#line 1568 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { ; break;} -case 118: -#line 1561 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 120: +#line 1570 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { ; break;} -case 119: -#line 1563 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 121: +#line 1572 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { ; break;} -case 120: -#line 1568 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 122: +#line 1577 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.Endianness = Module::BigEndian; ; break;} -case 121: -#line 1569 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 123: +#line 1578 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.Endianness = Module::LittleEndian; ; break;} -case 122: -#line 1571 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 124: +#line 1580 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { CurModule.CurrentModule->setEndianness(yyvsp[0].Endianness); ; break;} -case 123: -#line 1574 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 125: +#line 1583 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (yyvsp[0].UInt64Val == 32) CurModule.CurrentModule->setPointerSize(Module::Pointer32); @@ -2907,110 +2912,112 @@ ThrowException("Invalid pointer size: '" + utostr(yyvsp[0].UInt64Val) + "'!"); ; break;} -case 124: -#line 1582 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 126: +#line 1591 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { CurModule.CurrentModule->setTargetTriple(yyvsp[0].StrVal); free(yyvsp[0].StrVal); ; break;} -case 126: -#line 1589 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 128: +#line 1598 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { CurModule.CurrentModule->addLibrary(yyvsp[0].StrVal); free(yyvsp[0].StrVal); ; break;} -case 127: -#line 1593 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 129: +#line 1602 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { CurModule.CurrentModule->addLibrary(yyvsp[0].StrVal); free(yyvsp[0].StrVal); ; break;} -case 128: -#line 1597 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 130: +#line 1606 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { ; break;} -case 132: -#line 1606 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 134: +#line 1615 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.StrVal = 0; ; break;} -case 133: -#line 1608 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 135: +#line 1617 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (*yyvsp[-1].TypeVal == Type::VoidTy) ThrowException("void typed arguments are invalid!"); yyval.ArgVal = new std::pair(yyvsp[-1].TypeVal, yyvsp[0].StrVal); ; break;} -case 134: -#line 1614 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 136: +#line 1623 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.ArgList = yyvsp[-2].ArgList; yyvsp[-2].ArgList->push_back(*yyvsp[0].ArgVal); delete yyvsp[0].ArgVal; ; break;} -case 135: -#line 1619 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 137: +#line 1628 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.ArgList = new std::vector >(); yyval.ArgList->push_back(*yyvsp[0].ArgVal); delete yyvsp[0].ArgVal; ; break;} -case 136: -#line 1625 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 138: +#line 1634 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.ArgList = yyvsp[0].ArgList; ; break;} -case 137: -#line 1628 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 139: +#line 1637 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.ArgList = yyvsp[-2].ArgList; yyval.ArgList->push_back(std::pair(new PATypeHolder(Type::VoidTy), 0)); ; break;} -case 138: -#line 1633 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 140: +#line 1642 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.ArgList = new std::vector >(); yyval.ArgList->push_back(std::make_pair(new PATypeHolder(Type::VoidTy), (char*)0)); ; break;} -case 139: -#line 1637 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 141: +#line 1646 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.ArgList = 0; ; break;} -case 140: -#line 1641 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 142: +#line 1650 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { - UnEscapeLexed(yyvsp[-3].StrVal); - std::string FunctionName(yyvsp[-3].StrVal); - free(yyvsp[-3].StrVal); // Free strdup'd memory! + UnEscapeLexed(yyvsp[-4].StrVal); + std::string FunctionName(yyvsp[-4].StrVal); + free(yyvsp[-4].StrVal); // Free strdup'd memory! - if (!(*yyvsp[-4].TypeVal)->isFirstClassType() && *yyvsp[-4].TypeVal != Type::VoidTy) + if (!(*yyvsp[-5].TypeVal)->isFirstClassType() && *yyvsp[-5].TypeVal != Type::VoidTy) ThrowException("LLVM functions cannot return aggregate types!"); + if (yyvsp[0].UIntVal != 0 && !isPowerOf2_32(yyvsp[0].UIntVal)) + ThrowException("Function alignment must be a power of two!"); std::vector ParamTypeList; - if (yyvsp[-1].ArgList) { // If there are arguments... - for (std::vector >::iterator I = yyvsp[-1].ArgList->begin(); - I != yyvsp[-1].ArgList->end(); ++I) + if (yyvsp[-2].ArgList) { // If there are arguments... + for (std::vector >::iterator I = yyvsp[-2].ArgList->begin(); + I != yyvsp[-2].ArgList->end(); ++I) ParamTypeList.push_back(I->first->get()); } bool isVarArg = ParamTypeList.size() && ParamTypeList.back() == Type::VoidTy; if (isVarArg) ParamTypeList.pop_back(); - const FunctionType *FT = FunctionType::get(*yyvsp[-4].TypeVal, ParamTypeList, isVarArg); + const FunctionType *FT = FunctionType::get(*yyvsp[-5].TypeVal, ParamTypeList, isVarArg); const PointerType *PFT = PointerType::get(FT); - delete yyvsp[-4].TypeVal; + delete yyvsp[-5].TypeVal; ValID ID; if (!FunctionName.empty()) { @@ -3047,31 +3054,32 @@ } CurFun.FunctionStart(Fn); - Fn->setCallingConv(yyvsp[-5].UIntVal); + Fn->setCallingConv(yyvsp[-6].UIntVal); + Fn->setAlignment(yyvsp[0].UIntVal); // Add all of the arguments we parsed to the function... - if (yyvsp[-1].ArgList) { // Is null if empty... + if (yyvsp[-2].ArgList) { // Is null if empty... if (isVarArg) { // Nuke the last entry - assert(yyvsp[-1].ArgList->back().first->get() == Type::VoidTy && yyvsp[-1].ArgList->back().second == 0&& + assert(yyvsp[-2].ArgList->back().first->get() == Type::VoidTy && yyvsp[-2].ArgList->back().second == 0&& "Not a varargs marker!"); - delete yyvsp[-1].ArgList->back().first; - yyvsp[-1].ArgList->pop_back(); // Delete the last entry + delete yyvsp[-2].ArgList->back().first; + yyvsp[-2].ArgList->pop_back(); // Delete the last entry } Function::arg_iterator ArgIt = Fn->arg_begin(); - for (std::vector >::iterator I = yyvsp[-1].ArgList->begin(); - I != yyvsp[-1].ArgList->end(); ++I, ++ArgIt) { + for (std::vector >::iterator I = yyvsp[-2].ArgList->begin(); + I != yyvsp[-2].ArgList->end(); ++I, ++ArgIt) { delete I->first; // Delete the typeholder... setValueName(ArgIt, I->second); // Insert arg into symtab... InsertValue(ArgIt); } - delete yyvsp[-1].ArgList; // We're now done with the argument list + delete yyvsp[-2].ArgList; // We're now done with the argument list } ; break;} -case 143: -#line 1723 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 145: +#line 1735 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.FunctionVal = CurFun.CurrentFunction; @@ -3080,67 +3088,67 @@ yyval.FunctionVal->setLinkage(yyvsp[-2].Linkage); ; break;} -case 146: -#line 1733 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 148: +#line 1745 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.FunctionVal = yyvsp[-1].FunctionVal; ; break;} -case 147: -#line 1737 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 149: +#line 1749 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { CurFun.isDeclare = true; ; break;} -case 148: -#line 1737 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 150: +#line 1749 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.FunctionVal = CurFun.CurrentFunction; CurFun.FunctionDone(); ; break;} -case 149: -#line 1746 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 151: +#line 1758 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // A reference to a direct constant yyval.ValIDVal = ValID::create(yyvsp[0].SInt64Val); ; break;} -case 150: -#line 1749 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 152: +#line 1761 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.ValIDVal = ValID::create(yyvsp[0].UInt64Val); ; break;} -case 151: -#line 1752 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 153: +#line 1764 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Perhaps it's an FP constant? yyval.ValIDVal = ValID::create(yyvsp[0].FPVal); ; break;} -case 152: -#line 1755 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 154: +#line 1767 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.ValIDVal = ValID::create(ConstantBool::True); ; break;} -case 153: -#line 1758 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 155: +#line 1770 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.ValIDVal = ValID::create(ConstantBool::False); ; break;} -case 154: -#line 1761 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 156: +#line 1773 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.ValIDVal = ValID::createNull(); ; break;} -case 155: -#line 1764 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 157: +#line 1776 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.ValIDVal = ValID::createUndef(); ; break;} -case 156: -#line 1767 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 158: +#line 1779 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Nonempty unsized packed vector const Type *ETy = (*yyvsp[-1].ConstVector)[0]->getType(); int NumElements = yyvsp[-1].ConstVector->size(); @@ -3166,44 +3174,44 @@ delete PTy; delete yyvsp[-1].ConstVector; ; break;} -case 157: -#line 1791 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 159: +#line 1803 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.ValIDVal = ValID::create(yyvsp[0].ConstVal); ; break;} -case 158: -#line 1798 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 160: +#line 1810 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Is it an integer reference...? yyval.ValIDVal = ValID::create(yyvsp[0].SIntVal); ; break;} -case 159: -#line 1801 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 161: +#line 1813 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Is it a named reference...? yyval.ValIDVal = ValID::create(yyvsp[0].StrVal); ; break;} -case 162: -#line 1812 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 164: +#line 1824 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.ValueVal = getVal(*yyvsp[-1].TypeVal, yyvsp[0].ValIDVal); delete yyvsp[-1].TypeVal; ; break;} -case 163: -#line 1816 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 165: +#line 1828 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.FunctionVal = yyvsp[-1].FunctionVal; ; break;} -case 164: -#line 1819 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 166: +#line 1831 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Do not allow functions with 0 basic blocks yyval.FunctionVal = yyvsp[-1].FunctionVal; ; break;} -case 165: -#line 1827 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 167: +#line 1839 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { setValueName(yyvsp[0].TermInstVal, yyvsp[-1].StrVal); InsertValue(yyvsp[0].TermInstVal); @@ -3213,15 +3221,15 @@ yyval.BasicBlockVal = yyvsp[-2].BasicBlockVal; ; break;} -case 166: -#line 1836 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 168: +#line 1848 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyvsp[-1].BasicBlockVal->getInstList().push_back(yyvsp[0].InstVal); yyval.BasicBlockVal = yyvsp[-1].BasicBlockVal; ; break;} -case 167: -#line 1840 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 169: +#line 1852 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.BasicBlockVal = CurBB = getBBVal(ValID::create((int)CurFun.NextBBNum++), true); @@ -3233,8 +3241,8 @@ BBL.splice(BBL.end(), BBL, yyval.BasicBlockVal); ; break;} -case 168: -#line 1850 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 170: +#line 1862 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.BasicBlockVal = CurBB = getBBVal(ValID::create(yyvsp[0].StrVal), true); @@ -3246,32 +3254,32 @@ BBL.splice(BBL.end(), BBL, yyval.BasicBlockVal); ; break;} -case 169: -#line 1861 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 171: +#line 1873 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Return with a result... yyval.TermInstVal = new ReturnInst(yyvsp[0].ValueVal); ; break;} -case 170: -#line 1864 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 172: +#line 1876 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Return with no result... yyval.TermInstVal = new ReturnInst(); ; break;} -case 171: -#line 1867 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 173: +#line 1879 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Unconditional Branch... yyval.TermInstVal = new BranchInst(getBBVal(yyvsp[0].ValIDVal)); ; break;} -case 172: -#line 1870 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 174: +#line 1882 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.TermInstVal = new BranchInst(getBBVal(yyvsp[-3].ValIDVal), getBBVal(yyvsp[0].ValIDVal), getVal(Type::BoolTy, yyvsp[-6].ValIDVal)); ; break;} -case 173: -#line 1873 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 175: +#line 1885 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { SwitchInst *S = new SwitchInst(getVal(yyvsp[-7].PrimType, yyvsp[-6].ValIDVal), getBBVal(yyvsp[-3].ValIDVal), yyvsp[-1].JumpTable->size()); yyval.TermInstVal = S; @@ -3287,15 +3295,15 @@ delete yyvsp[-1].JumpTable; ; break;} -case 174: -#line 1887 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 176: +#line 1899 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { SwitchInst *S = new SwitchInst(getVal(yyvsp[-6].PrimType, yyvsp[-5].ValIDVal), getBBVal(yyvsp[-2].ValIDVal), 0); yyval.TermInstVal = S; ; break;} -case 175: -#line 1892 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 177: +#line 1904 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { const PointerType *PFTy; const FunctionType *Ty; @@ -3349,20 +3357,20 @@ delete yyvsp[-7].ValueList; ; break;} -case 176: -#line 1944 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 178: +#line 1956 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.TermInstVal = new UnwindInst(); ; break;} -case 177: -#line 1947 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 179: +#line 1959 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.TermInstVal = new UnreachableInst(); ; break;} -case 178: -#line 1953 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 180: +#line 1965 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.JumpTable = yyvsp[-5].JumpTable; Constant *V = cast(getValNonImprovising(yyvsp[-4].PrimType, yyvsp[-3].ValIDVal)); @@ -3372,8 +3380,8 @@ yyval.JumpTable->push_back(std::make_pair(V, getBBVal(yyvsp[0].ValIDVal))); ; break;} -case 179: -#line 1961 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 181: +#line 1973 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.JumpTable = new std::vector >(); Constant *V = cast(getValNonImprovising(yyvsp[-4].PrimType, yyvsp[-3].ValIDVal)); @@ -3384,8 +3392,8 @@ yyval.JumpTable->push_back(std::make_pair(V, getBBVal(yyvsp[0].ValIDVal))); ; break;} -case 180: -#line 1971 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 182: +#line 1983 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Is this definition named?? if so, assign the name... setValueName(yyvsp[0].InstVal, yyvsp[-1].StrVal); @@ -3393,54 +3401,54 @@ yyval.InstVal = yyvsp[0].InstVal; ; break;} -case 181: -#line 1978 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 183: +#line 1990 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Used for PHI nodes yyval.PHIList = new std::list >(); yyval.PHIList->push_back(std::make_pair(getVal(*yyvsp[-5].TypeVal, yyvsp[-3].ValIDVal), getBBVal(yyvsp[-1].ValIDVal))); delete yyvsp[-5].TypeVal; ; break;} -case 182: -#line 1983 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 184: +#line 1995 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.PHIList = yyvsp[-6].PHIList; yyvsp[-6].PHIList->push_back(std::make_pair(getVal(yyvsp[-6].PHIList->front().first->getType(), yyvsp[-3].ValIDVal), getBBVal(yyvsp[-1].ValIDVal))); ; break;} -case 183: -#line 1990 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 185: +#line 2002 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Used for call statements, and memory insts... yyval.ValueList = new std::vector(); yyval.ValueList->push_back(yyvsp[0].ValueVal); ; break;} -case 184: -#line 1994 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 186: +#line 2006 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.ValueList = yyvsp[-2].ValueList; yyvsp[-2].ValueList->push_back(yyvsp[0].ValueVal); ; break;} -case 186: -#line 2000 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 188: +#line 2012 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.ValueList = 0; ; break;} -case 187: -#line 2002 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 189: +#line 2014 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.BoolVal = true; ; break;} -case 188: -#line 2005 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 190: +#line 2017 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.BoolVal = false; ; break;} -case 189: -#line 2011 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 191: +#line 2023 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!(*yyvsp[-3].TypeVal)->isInteger() && !(*yyvsp[-3].TypeVal)->isFloatingPoint() && !isa((*yyvsp[-3].TypeVal).get())) @@ -3454,8 +3462,8 @@ delete yyvsp[-3].TypeVal; ; break;} -case 190: -#line 2023 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 192: +#line 2035 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!(*yyvsp[-3].TypeVal)->isIntegral()) ThrowException("Logical operator requires integral operands!"); @@ -3465,8 +3473,8 @@ delete yyvsp[-3].TypeVal; ; break;} -case 191: -#line 2031 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 193: +#line 2043 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if(isa((*yyvsp[-3].TypeVal).get())) { ThrowException( @@ -3478,8 +3486,8 @@ delete yyvsp[-3].TypeVal; ; break;} -case 192: -#line 2041 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 194: +#line 2053 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { std::cerr << "WARNING: Use of eliminated 'not' instruction:" << " Replacing with 'xor'.\n"; @@ -3493,8 +3501,8 @@ ThrowException("Could not create a xor instruction!"); ; break;} -case 193: -#line 2053 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 195: +#line 2065 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (yyvsp[0].ValueVal->getType() != Type::UByteTy) ThrowException("Shift amount must be ubyte!"); @@ -3503,8 +3511,8 @@ yyval.InstVal = new ShiftInst(yyvsp[-3].OtherOpVal, yyvsp[-2].ValueVal, yyvsp[0].ValueVal); ; break;} -case 194: -#line 2060 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 196: +#line 2072 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!yyvsp[0].TypeVal->get()->isFirstClassType()) ThrowException("cast instruction to a non-primitive type: '" + @@ -3513,8 +3521,8 @@ delete yyvsp[0].TypeVal; ; break;} -case 195: -#line 2067 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 197: +#line 2079 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (yyvsp[-4].ValueVal->getType() != Type::BoolTy) ThrowException("select condition must be boolean!"); @@ -3523,16 +3531,16 @@ yyval.InstVal = new SelectInst(yyvsp[-4].ValueVal, yyvsp[-2].ValueVal, yyvsp[0].ValueVal); ; break;} -case 196: -#line 2074 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 198: +#line 2086 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { NewVarArgs = true; yyval.InstVal = new VAArgInst(yyvsp[-2].ValueVal, *yyvsp[0].TypeVal); delete yyvsp[0].TypeVal; ; break;} -case 197: -#line 2079 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 199: +#line 2091 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { ObsoleteVarArgs = true; const Type* ArgTy = yyvsp[-2].ValueVal->getType(); @@ -3553,8 +3561,8 @@ delete yyvsp[0].TypeVal; ; break;} -case 198: -#line 2098 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 200: +#line 2110 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { ObsoleteVarArgs = true; const Type* ArgTy = yyvsp[-2].ValueVal->getType(); @@ -3578,8 +3586,8 @@ delete yyvsp[0].TypeVal; ; break;} -case 199: -#line 2120 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 201: +#line 2132 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { const Type *Ty = yyvsp[0].PHIList->front().first->getType(); if (!Ty->isFirstClassType()) @@ -3595,8 +3603,8 @@ delete yyvsp[0].PHIList; // Free the list... ; break;} -case 200: -#line 2134 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 202: +#line 2146 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { const PointerType *PFTy; const FunctionType *Ty; @@ -3655,78 +3663,78 @@ delete yyvsp[-1].ValueList; ; break;} -case 201: -#line 2191 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 203: +#line 2203 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.InstVal = yyvsp[0].InstVal; ; break;} -case 202: -#line 2197 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 204: +#line 2209 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.ValueList = yyvsp[0].ValueList; ; break;} -case 203: -#line 2199 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 205: +#line 2211 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.ValueList = new std::vector(); ; break;} -case 204: -#line 2203 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 206: +#line 2215 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.BoolVal = true; ; break;} -case 205: -#line 2206 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 207: +#line 2218 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.BoolVal = false; ; break;} -case 206: -#line 2212 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 208: +#line 2224 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { - if (yyvsp[0].UIntVal & (yyvsp[0].UIntVal-1)) - ThrowException("Alignment amount '" + utostr(yyvsp[0].UIntVal) + - "' is not a power of 2!"); + if (yyvsp[0].UIntVal != 0 && !isPowerOf2_32(yyvsp[0].UIntVal)) + ThrowException("Alignment amount '" + utostr(yyvsp[0].UIntVal) + + "' is not a power of 2!"); yyval.InstVal = new MallocInst(*yyvsp[-1].TypeVal, 0, yyvsp[0].UIntVal); delete yyvsp[-1].TypeVal; ; break;} -case 207: -#line 2219 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 209: +#line 2231 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { - if (yyvsp[0].UIntVal & (yyvsp[0].UIntVal-1)) + if (yyvsp[0].UIntVal != 0 && !isPowerOf2_32(yyvsp[0].UIntVal)) ThrowException("Alignment amount '" + utostr(yyvsp[0].UIntVal) + "' is not a power of 2!"); yyval.InstVal = new MallocInst(*yyvsp[-4].TypeVal, getVal(yyvsp[-2].PrimType, yyvsp[-1].ValIDVal), yyvsp[0].UIntVal); delete yyvsp[-4].TypeVal; ; break;} -case 208: -#line 2226 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 210: +#line 2238 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { - if (yyvsp[0].UIntVal & (yyvsp[0].UIntVal-1)) + if (yyvsp[0].UIntVal != 0 && !isPowerOf2_32(yyvsp[0].UIntVal)) ThrowException("Alignment amount '" + utostr(yyvsp[0].UIntVal) + "' is not a power of 2!"); yyval.InstVal = new AllocaInst(*yyvsp[-1].TypeVal, 0, yyvsp[0].UIntVal); delete yyvsp[-1].TypeVal; ; break;} -case 209: -#line 2233 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 211: +#line 2245 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { - if (yyvsp[0].UIntVal & (yyvsp[0].UIntVal-1)) + if (yyvsp[0].UIntVal != 0 && !isPowerOf2_32(yyvsp[0].UIntVal)) ThrowException("Alignment amount '" + utostr(yyvsp[0].UIntVal) + "' is not a power of 2!"); yyval.InstVal = new AllocaInst(*yyvsp[-4].TypeVal, getVal(yyvsp[-2].PrimType, yyvsp[-1].ValIDVal), yyvsp[0].UIntVal); delete yyvsp[-4].TypeVal; ; break;} -case 210: -#line 2240 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 212: +#line 2252 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!isa(yyvsp[0].ValueVal->getType())) ThrowException("Trying to free nonpointer type " + @@ -3734,8 +3742,8 @@ yyval.InstVal = new FreeInst(yyvsp[0].ValueVal); ; break;} -case 211: -#line 2247 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 213: +#line 2259 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!isa(yyvsp[-1].TypeVal->get())) ThrowException("Can't load from nonpointer type: " + @@ -3747,8 +3755,8 @@ delete yyvsp[-1].TypeVal; ; break;} -case 212: -#line 2257 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 214: +#line 2269 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { const PointerType *PT = dyn_cast(yyvsp[-1].TypeVal->get()); if (!PT) @@ -3763,8 +3771,8 @@ delete yyvsp[-1].TypeVal; ; break;} -case 213: -#line 2270 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +case 215: +#line 2282 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!isa(yyvsp[-2].TypeVal->get())) ThrowException("getelementptr insn requires pointer operand!"); @@ -4009,7 +4017,7 @@ } return 1; } -#line 2293 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2305 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" int yyerror(const char *ErrorMsg) { std::string where From lattner at cs.uiuc.edu Sun Nov 6 00:49:04 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun, 6 Nov 2005 00:49:04 -0600 Subject: [llvm-commits] CVS: llvm/lib/VMCore/AsmWriter.cpp Message-ID: <200511060649.AAA25537@zion.cs.uiuc.edu> Changes in directory llvm/lib/VMCore: AsmWriter.cpp updated: 1.183 -> 1.184 --- Log message: print alignment info for globals and functions --- Diffs of the changes: (+7 -0) AsmWriter.cpp | 7 +++++++ 1 files changed, 7 insertions(+) Index: llvm/lib/VMCore/AsmWriter.cpp diff -u llvm/lib/VMCore/AsmWriter.cpp:1.183 llvm/lib/VMCore/AsmWriter.cpp:1.184 --- llvm/lib/VMCore/AsmWriter.cpp:1.183 Sat Nov 5 15:20:34 2005 +++ llvm/lib/VMCore/AsmWriter.cpp Sun Nov 6 00:48:53 2005 @@ -832,6 +832,10 @@ assert(C && "GlobalVar initializer isn't constant?"); writeOperand(GV->getInitializer(), false, isa(C)); } + + if (GV->getAlignment()) { + Out << ", align " << GV->getAlignment(); + } printInfoComment(*GV); Out << "\n"; @@ -940,6 +944,9 @@ } Out << ')'; + if (F->getAlignment()) + Out << " align " << F->getAlignment(); + if (F->isExternal()) { Out << "\n"; } else { From lattner at cs.uiuc.edu Sun Nov 6 00:52:23 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun, 6 Nov 2005 00:52:23 -0600 Subject: [llvm-commits] CVS: llvm/test/Feature/alignment.ll Message-ID: <200511060652.AAA25577@zion.cs.uiuc.edu> Changes in directory llvm/test/Feature: alignment.ll updated: 1.1 -> 1.2 --- Log message: add alignment info for globals and functions --- Diffs of the changes: (+3 -1) alignment.ll | 4 +++- 1 files changed, 3 insertions(+), 1 deletion(-) Index: llvm/test/Feature/alignment.ll diff -u llvm/test/Feature/alignment.ll:1.1 llvm/test/Feature/alignment.ll:1.2 --- llvm/test/Feature/alignment.ll:1.1 Sat Nov 5 16:07:30 2005 +++ llvm/test/Feature/alignment.ll Sun Nov 6 00:52:12 2005 @@ -2,7 +2,9 @@ ; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll ; RUN: diff %t1.ll %t2.ll -int *%test() { +%X = global int 4, align 16 + +int *%test() align 32 { %X = alloca int, align 4 %Y = alloca int, uint 42, align 16 %Z = alloca int, align 0 From lattner at cs.uiuc.edu Sun Nov 6 01:11:16 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun, 6 Nov 2005 01:11:16 -0600 Subject: [llvm-commits] CVS: llvm/lib/Bytecode/Reader/Reader.cpp Message-ID: <200511060711.BAA25673@zion.cs.uiuc.edu> Changes in directory llvm/lib/Bytecode/Reader: Reader.cpp updated: 1.169 -> 1.170 --- Log message: Read/write global variable alignments if present --- Diffs of the changes: (+12 -0) Reader.cpp | 12 ++++++++++++ 1 files changed, 12 insertions(+) Index: llvm/lib/Bytecode/Reader/Reader.cpp diff -u llvm/lib/Bytecode/Reader/Reader.cpp:1.169 llvm/lib/Bytecode/Reader/Reader.cpp:1.170 --- llvm/lib/Bytecode/Reader/Reader.cpp:1.169 Sat Nov 5 16:08:14 2005 +++ llvm/lib/Bytecode/Reader/Reader.cpp Sun Nov 6 01:11:04 2005 @@ -1903,6 +1903,17 @@ bool isConstant = VarType & 1; bool hasInitializer = VarType & 2; GlobalValue::LinkageTypes Linkage; + unsigned Alignment = 0; + + // An extension word is present when linkage = 3 (internal) and hasinit = 0. + if (LinkageID == 3 && !hasInitializer) { + unsigned ExtWord = read_vbr_uint(); + // The extension word has this format: bit 0 = has initializer, bit 1-3 = + // linkage, bit 4-8 = alignment (log2), bits 10+ = future use. + hasInitializer = ExtWord & 1; + LinkageID = (ExtWord >> 1) & 7; + Alignment = (1 << ((ExtWord >> 4) & 31)) >> 1; + } switch (LinkageID) { case 0: Linkage = GlobalValue::ExternalLinkage; break; @@ -1930,6 +1941,7 @@ // Create the global variable... GlobalVariable *GV = new GlobalVariable(ElTy, isConstant, Linkage, 0, "", TheModule); + GV->setAlignment(Alignment); insertValue(GV, SlotNo, ModuleValues); unsigned initSlot = 0; From lattner at cs.uiuc.edu Sun Nov 6 01:11:16 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun, 6 Nov 2005 01:11:16 -0600 Subject: [llvm-commits] CVS: llvm/lib/Bytecode/Writer/Writer.cpp Message-ID: <200511060711.BAA25677@zion.cs.uiuc.edu> Changes in directory llvm/lib/Bytecode/Writer: Writer.cpp updated: 1.109 -> 1.110 --- Log message: Read/write global variable alignments if present --- Diffs of the changes: (+25 -6) Writer.cpp | 31 +++++++++++++++++++++++++------ 1 files changed, 25 insertions(+), 6 deletions(-) Index: llvm/lib/Bytecode/Writer/Writer.cpp diff -u llvm/lib/Bytecode/Writer/Writer.cpp:1.109 llvm/lib/Bytecode/Writer/Writer.cpp:1.110 --- llvm/lib/Bytecode/Writer/Writer.cpp:1.109 Sat Nov 5 16:08:14 2005 +++ llvm/lib/Bytecode/Writer/Writer.cpp Sun Nov 6 01:11:04 2005 @@ -416,7 +416,6 @@ //===----------------------------------------------------------------------===// //=== Instruction Output ===// //===----------------------------------------------------------------------===// -typedef unsigned char uchar; // outputInstructionFormat0 - Output those weird instructions that have a large // number of operands or have large operands themselves. @@ -925,15 +924,35 @@ // Output the types for the global variables in the module... for (Module::const_global_iterator I = M->global_begin(), - End = M->global_end(); I != End;++I) { + End = M->global_end(); I != End; ++I) { int Slot = Table.getSlot(I->getType()); assert(Slot != -1 && "Module global vars is broken!"); + assert((I->hasInitializer() || !I->hasInternalLinkage()) && + "Global must have an initializer or have external linkage!"); + // Fields: bit0 = isConstant, bit1 = hasInitializer, bit2-4=Linkage, - // bit5+ = Slot # for type - unsigned oSlot = ((unsigned)Slot << 5) | (getEncodedLinkage(I) << 2) | - (I->hasInitializer() << 1) | (unsigned)I->isConstant(); - output_vbr(oSlot); + // bit5+ = Slot # for type. + bool HasExtensionWord = I->getAlignment() != 0; + + // If we need to use the extension byte, set linkage=3(internal) and + // initializer = 0 (impossible!). + if (!HasExtensionWord) { + unsigned oSlot = ((unsigned)Slot << 5) | (getEncodedLinkage(I) << 2) | + (I->hasInitializer() << 1) | (unsigned)I->isConstant(); + output_vbr(oSlot); + } else { + unsigned oSlot = ((unsigned)Slot << 5) | (3 << 2) | + (0 << 1) | (unsigned)I->isConstant(); + output_vbr(oSlot); + + // The extension word has this format: bit 0 = has initializer, bit 1-3 = + // linkage, bit 4-8 = alignment (log2), bits 10+ = future use. + unsigned ExtWord = I->hasInitializer() | (getEncodedLinkage(I) << 1) | + (Log2_32(I->getAlignment())+1) << 4; + output_vbr(ExtWord); + + } // If we have an initializer, output it now. if (I->hasInitializer()) { From lattner at cs.uiuc.edu Sun Nov 6 01:20:36 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun, 6 Nov 2005 01:20:36 -0600 Subject: [llvm-commits] CVS: llvm/docs/BytecodeFormat.html Message-ID: <200511060720.BAA25775@zion.cs.uiuc.edu> Changes in directory llvm/docs: BytecodeFormat.html updated: 1.45 -> 1.46 --- Log message: describe extensions to the .bc format for function/global alignment --- Diffs of the changes: (+70 -6) BytecodeFormat.html | 76 +++++++++++++++++++++++++++++++++++++++++++++++----- 1 files changed, 70 insertions(+), 6 deletions(-) Index: llvm/docs/BytecodeFormat.html diff -u llvm/docs/BytecodeFormat.html:1.45 llvm/docs/BytecodeFormat.html:1.46 --- llvm/docs/BytecodeFormat.html:1.45 Sat Nov 5 16:32:06 2005 +++ llvm/docs/BytecodeFormat.html Sun Nov 6 01:20:25 2005 @@ -992,12 +992,16 @@ +
        +

        Global variables are written using an uint32_vbr -that encodes information about the global variable and a list of the -constant initializers for the global var, if any.

        +that encodes information about the global variable, an optional extension vbr, +and a an optional initializers for the global var.

        +

        The table below provides the bit layout of the first uint32_vbr that describes the global variable.

        + @@ -1025,8 +1029,43 @@
        + +

        When the Linkage type is set to 3 (internal) and the initializer field is set +to 0 (an invalid combination), an extension word follows the first uint32_vbr which encodes the real linkage and init flag, +and can includes more information:

        + + + + + + + + + + + + + + + + + + + + + + + + +
        TypeDescription
        bit(0)Has initializer? Indicates the real value of the "Has + initializer" field for the global.
        bit(2-4)Linkage type: Indicates the real value of the "linkage + type" field for the global.
        bit(4-8)The log-base-2 of the alignment for the global.
        bit(9-31)Currently unassigned.
        +

        The table below provides the format of the constant initializers for -the global variable field, if it has one.

        +the global variable field, if it has one (indicated by the "Has initializer" +field).

        + @@ -1048,7 +1087,8 @@

        Functions are written using an uint32_vbr -that encodes information about the function and a set of flags.

        +that encodes information about the function and a set of flags. If needed, +an extension word may follow this first field.

        The table below provides the bit layout of the uint32_vbr that describes the function.

        @@ -1074,9 +1114,33 @@ Block in the bytecode file for the function.
        - + + + + + + +
        bit(5-)bit(5-30) Type slot number of type for the function.
        bit(31)Indicates whether an extension word follows.
        + +

        If bit(31) is set, an additional uint32_vbr word +follows with the following fields:

        + + + + + + + + + + + + + + +
        TypeDescription
        bit(0-4)The log-base-2 of the alignment for the function.
        bit(5-31)Currently unassigned.
        @@ -1979,7 +2043,7 @@ Reid Spencer and Chris Lattner
        The LLVM Compiler Infrastructure
        -Last modified: $Date: 2005/11/05 22:32:06 $ +Last modified: $Date: 2005/11/06 07:20:25 $ From lattner at cs.uiuc.edu Sun Nov 6 01:43:51 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun, 6 Nov 2005 01:43:51 -0600 Subject: [llvm-commits] CVS: llvm/lib/Bytecode/Reader/Reader.cpp Message-ID: <200511060743.BAA25863@zion.cs.uiuc.edu> Changes in directory llvm/lib/Bytecode/Reader: Reader.cpp updated: 1.170 -> 1.171 --- Log message: encode/decode function alignment in bc files --- Diffs of the changes: (+16 -14) Reader.cpp | 30 ++++++++++++++++-------------- 1 files changed, 16 insertions(+), 14 deletions(-) Index: llvm/lib/Bytecode/Reader/Reader.cpp diff -u llvm/lib/Bytecode/Reader/Reader.cpp:1.170 llvm/lib/Bytecode/Reader/Reader.cpp:1.171 --- llvm/lib/Bytecode/Reader/Reader.cpp:1.170 Sun Nov 6 01:11:04 2005 +++ llvm/lib/Bytecode/Reader/Reader.cpp Sun Nov 6 01:43:39 2005 @@ -1928,13 +1928,11 @@ } const Type *Ty = getType(SlotNo); - if (!Ty) { + if (!Ty) error("Global has no type! SlotNo=" + utostr(SlotNo)); - } - if (!isa(Ty)) { + if (!isa(Ty)) error("Global not a pointer type! Ty= " + Ty->getDescription()); - } const Type *ElTy = cast(Ty)->getElementType(); @@ -1965,8 +1963,8 @@ FnSignature = (FnSignature << 5) + 1; // List is terminated by VoidTy. - while ((FnSignature >> 5) != Type::VoidTyID) { - const Type *Ty = getType(FnSignature >> 5); + while (((FnSignature & (~0U >> 1)) >> 5) != Type::VoidTyID) { + const Type *Ty = getType((FnSignature & (~0U >> 1)) >> 5); if (!isa(Ty) || !isa(cast(Ty)->getElementType())) { error("Function not a pointer to function type! Ty = " + @@ -1981,7 +1979,7 @@ // Insert the place holder. Function* Func = new Function(FTy, GlobalValue::ExternalLinkage, "", TheModule); - insertValue(Func, FnSignature >> 5, ModuleValues); + insertValue(Func, (FnSignature & (~0U >> 1)) >> 5, ModuleValues); // Flags are not used yet. unsigned Flags = FnSignature & 31; @@ -1992,13 +1990,17 @@ if ((Flags & (1 << 4)) == 0) FunctionSignatureList.push_back(Func); - // Look at the low bits. If there is a calling conv here, apply it, - // read it as a vbr. - Flags &= 15; - if (Flags) - Func->setCallingConv(Flags-1); - else - Func->setCallingConv(read_vbr_uint()); + // Get the calling convention from the low bits. + unsigned CC = Flags & 15; + unsigned Alignment = 0; + if (FnSignature & (1 << 31)) { // Has extension word? + unsigned ExtWord = read_vbr_uint(); + Alignment = (1 << (ExtWord & 31)) >> 1; + CC |= ((ExtWord >> 5) & 15) << 4; + } + + Func->setCallingConv(CC); + Func->setAlignment(Alignment); if (Handler) Handler->handleFunctionDeclaration(Func); From lattner at cs.uiuc.edu Sun Nov 6 01:43:51 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun, 6 Nov 2005 01:43:51 -0600 Subject: [llvm-commits] CVS: llvm/lib/Bytecode/Writer/Writer.cpp Message-ID: <200511060743.BAA25867@zion.cs.uiuc.edu> Changes in directory llvm/lib/Bytecode/Writer: Writer.cpp updated: 1.110 -> 1.111 --- Log message: encode/decode function alignment in bc files --- Diffs of the changes: (+14 -10) Writer.cpp | 24 ++++++++++++++---------- 1 files changed, 14 insertions(+), 10 deletions(-) Index: llvm/lib/Bytecode/Writer/Writer.cpp diff -u llvm/lib/Bytecode/Writer/Writer.cpp:1.110 llvm/lib/Bytecode/Writer/Writer.cpp:1.111 --- llvm/lib/Bytecode/Writer/Writer.cpp:1.110 Sun Nov 6 01:11:04 2005 +++ llvm/lib/Bytecode/Writer/Writer.cpp Sun Nov 6 01:43:39 2005 @@ -949,9 +949,8 @@ // The extension word has this format: bit 0 = has initializer, bit 1-3 = // linkage, bit 4-8 = alignment (log2), bits 10+ = future use. unsigned ExtWord = I->hasInitializer() | (getEncodedLinkage(I) << 1) | - (Log2_32(I->getAlignment())+1) << 4; + ((Log2_32(I->getAlignment())+1) << 4); output_vbr(ExtWord); - } // If we have an initializer, output it now. @@ -968,18 +967,23 @@ int Slot = Table.getSlot(I->getType()); assert(Slot != -1 && "Module slot calculator is broken!"); assert(Slot >= Type::FirstDerivedTyID && "Derived type not in range!"); - assert(((Slot << 5) >> 5) == Slot && "Slot # too big!"); - unsigned ID = (Slot << 5); - - if (I->getCallingConv() < 15) - ID += I->getCallingConv()+1; + assert(((Slot << 6) >> 6) == Slot && "Slot # too big!"); + unsigned ID = (Slot << 5) | (I->getCallingConv() & 15); if (I->isExternal()) // If external, we don't have an FunctionInfo block. ID |= 1 << 4; + + if (I->getAlignment() || I->getCallingConv() & ~15) + ID |= 1 << 31; // Do we need an extension word? + output_vbr(ID); - - if (I->getCallingConv() >= 15) - output_vbr(I->getCallingConv()); + + if (ID & (1 << 31)) { + // Extension byte: bits 0-4 = alignment, bits 5-9 = top nibble of calling + // convention. + ID = (Log2_32(I->getAlignment())+1) | ((I->getCallingConv() >> 4) << 5); + output_vbr(ID); + } } output_vbr((unsigned)Table.getSlot(Type::VoidTy) << 5); From lattner at cs.uiuc.edu Sun Nov 6 01:46:25 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun, 6 Nov 2005 01:46:25 -0600 Subject: [llvm-commits] CVS: llvm/lib/Bytecode/Writer/Writer.cpp Message-ID: <200511060746.BAA25911@zion.cs.uiuc.edu> Changes in directory llvm/lib/Bytecode/Writer: Writer.cpp updated: 1.111 -> 1.112 --- Log message: don't misencode CC#'s --- Diffs of the changes: (+4 -3) Writer.cpp | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) Index: llvm/lib/Bytecode/Writer/Writer.cpp diff -u llvm/lib/Bytecode/Writer/Writer.cpp:1.111 llvm/lib/Bytecode/Writer/Writer.cpp:1.112 --- llvm/lib/Bytecode/Writer/Writer.cpp:1.111 Sun Nov 6 01:43:39 2005 +++ llvm/lib/Bytecode/Writer/Writer.cpp Sun Nov 6 01:46:13 2005 @@ -968,12 +968,13 @@ assert(Slot != -1 && "Module slot calculator is broken!"); assert(Slot >= Type::FirstDerivedTyID && "Derived type not in range!"); assert(((Slot << 6) >> 6) == Slot && "Slot # too big!"); - unsigned ID = (Slot << 5) | (I->getCallingConv() & 15); + unsigned CC = I->getCallingConv()+1; + unsigned ID = (Slot << 5) | (CC & 15); if (I->isExternal()) // If external, we don't have an FunctionInfo block. ID |= 1 << 4; - if (I->getAlignment() || I->getCallingConv() & ~15) + if (I->getAlignment() || (CC & ~15) != 0) ID |= 1 << 31; // Do we need an extension word? output_vbr(ID); @@ -981,7 +982,7 @@ if (ID & (1 << 31)) { // Extension byte: bits 0-4 = alignment, bits 5-9 = top nibble of calling // convention. - ID = (Log2_32(I->getAlignment())+1) | ((I->getCallingConv() >> 4) << 5); + ID = (Log2_32(I->getAlignment())+1) | ((CC >> 4) << 5); output_vbr(ID); } } From lattner at cs.uiuc.edu Sun Nov 6 01:46:26 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun, 6 Nov 2005 01:46:26 -0600 Subject: [llvm-commits] CVS: llvm/lib/Bytecode/Reader/Reader.cpp Message-ID: <200511060746.BAA25915@zion.cs.uiuc.edu> Changes in directory llvm/lib/Bytecode/Reader: Reader.cpp updated: 1.171 -> 1.172 --- Log message: don't misencode CC#'s --- Diffs of the changes: (+1 -1) Reader.cpp | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/lib/Bytecode/Reader/Reader.cpp diff -u llvm/lib/Bytecode/Reader/Reader.cpp:1.171 llvm/lib/Bytecode/Reader/Reader.cpp:1.172 --- llvm/lib/Bytecode/Reader/Reader.cpp:1.171 Sun Nov 6 01:43:39 2005 +++ llvm/lib/Bytecode/Reader/Reader.cpp Sun Nov 6 01:46:13 2005 @@ -1999,7 +1999,7 @@ CC |= ((ExtWord >> 5) & 15) << 4; } - Func->setCallingConv(CC); + Func->setCallingConv(CC-1); Func->setAlignment(Alignment); if (Handler) Handler->handleFunctionDeclaration(Func); From lattner at cs.uiuc.edu Sun Nov 6 01:48:23 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun, 6 Nov 2005 01:48:23 -0600 Subject: [llvm-commits] CVS: llvm/docs/BytecodeFormat.html Message-ID: <200511060748.BAA25966@zion.cs.uiuc.edu> Changes in directory llvm/docs: BytecodeFormat.html updated: 1.46 -> 1.47 --- Log message: Minor correction --- Diffs of the changes: (+7 -4) BytecodeFormat.html | 11 +++++++---- 1 files changed, 7 insertions(+), 4 deletions(-) Index: llvm/docs/BytecodeFormat.html diff -u llvm/docs/BytecodeFormat.html:1.46 llvm/docs/BytecodeFormat.html:1.47 --- llvm/docs/BytecodeFormat.html:1.46 Sun Nov 6 01:20:25 2005 +++ llvm/docs/BytecodeFormat.html Sun Nov 6 01:48:11 2005 @@ -1102,8 +1102,7 @@ bit(0-3) - Encodes the calling convention number of the function. If this number is - zero, this field is followed by a vbr indicating the CC#. Otherwise, the + Encodes the calling convention number of the function. The CC number of the function is the value of this field minus one. @@ -1138,7 +1137,11 @@ The log-base-2 of the alignment for the function. - bit(5-31) + bit(5-9) + The top nibble of the calling convention. + + + bit(10-31) Currently unassigned. @@ -2043,7 +2046,7 @@ Reid Spencer and Chris Lattner
        The LLVM Compiler Infrastructure
        -Last modified: $Date: 2005/11/06 07:20:25 $ +Last modified: $Date: 2005/11/06 07:48:11 $ From lattner at cs.uiuc.edu Sun Nov 6 02:03:09 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun, 6 Nov 2005 02:03:09 -0600 Subject: [llvm-commits] CVS: llvm/docs/LangRef.html Message-ID: <200511060803.CAA26101@zion.cs.uiuc.edu> Changes in directory llvm/docs: LangRef.html updated: 1.113 -> 1.114 --- Log message: document alignment on globals, functions, and allocation instructions. --- Diffs of the changes: (+103 -30) LangRef.html | 133 +++++++++++++++++++++++++++++++++++++++++++++-------------- 1 files changed, 103 insertions(+), 30 deletions(-) Index: llvm/docs/LangRef.html diff -u llvm/docs/LangRef.html:1.113 llvm/docs/LangRef.html:1.114 --- llvm/docs/LangRef.html:1.113 Mon Oct 24 11:17:18 2005 +++ llvm/docs/LangRef.html Sun Nov 6 02:02:57 2005 @@ -494,7 +494,8 @@

        Global variables define regions of memory allocated at compilation time -instead of run-time. Global variables may optionally be initialized. A +instead of run-time. Global variables may optionally be initialized, and may +have an optional explicit alignment specified. A variable may be defined as a global "constant," which indicates that the contents of the variable will never be modified (enabling better optimization, allowing the global data to be placed in the read-only section of @@ -516,6 +517,12 @@ describe a region of memory, and all memory objects in LLVM are accessed through pointers.

        +

        An explicit alignment may be specified for a global. If not present, or if +the alignment is set to zero, the alignment of the global is set by the target +to whatever it feels convenient. If an explicit alignment is specified, the +global is forced to have at least that much alignment. All alignments must be +a power of 2.

        +
        @@ -528,11 +535,12 @@

        LLVM function definitions consist of an optional linkage type, an optional calling convention, a return -type, a function name, a (possibly empty) argument list, an opening curly brace, +type, a function name, a (possibly empty) argument list, an optional alignment, +an opening curly brace, a list of basic blocks, and a closing curly brace. LLVM function declarations are defined with the "declare" keyword, an optional calling convention, a return type, a function name, and -a possibly empty list of arguments.

        +href="#callingconv">calling convention, a return type, a function name, +a possibly empty list of arguments, and an optional alignment.

        A function definition contains a list of basic blocks, forming the CFG for the function. Each basic block may optionally start with a label (giving the @@ -551,6 +559,12 @@ considered different functions, and LLVM will resolve references to each appropriately.

        +

        An explicit alignment may be specified for a function. If not present, or if +the alignment is set to zero, the alignment of the function is set by the target +to whatever it feels convenient. If an explicit alignment is specified, the +function is forced to have at least that much alignment. All alignments must be +a power of 2.

        +
        @@ -1761,98 +1775,157 @@ <result> = shr sbyte -2, ubyte 1 ; yields {sbyte}:result = -1
        + - + +
        +

        A key design point of an SSA-based representation is how it represents memory. In LLVM, no memory locations are in SSA form, which makes things very simple. This section describes how to read, write, allocate, and free memory in LLVM.

        +
        + - + +
        +
        Syntax:
        -
          <result> = malloc <type>, uint <NumElements>     ; yields {type*}:result
        -  <result> = malloc <type>                         ; yields {type*}:result
        +
        +
        +  <result> = malloc <type>[, uint <NumElements>][, align <alignment>]     ; yields {type*}:result
         
        +
        Overview:
        +

        The 'malloc' instruction allocates memory from the system heap and returns a pointer to it.

        +
        Arguments:
        -

        The 'malloc' instruction allocates sizeof(<type>)*NumElements + +

        The 'malloc' instruction allocates +sizeof(<type>)*NumElements bytes of memory from the operating system and returns a pointer of the -appropriate type to the program. The second form of the instruction is -a shorter version of the first instruction that defaults to allocating -one element.

        +appropriate type to the program. If "NumElements" is specified, it is the +number of elements allocated. If an alignment is specified, the value result +of the allocation is guaranteed to be aligned to at least that boundary. If +not specified, or if zero, the target can choose to align the allocation on any +convenient boundary.

        +

        'type' must be a sized type.

        +
        Semantics:
        +

        Memory is allocated using the system "malloc" function, and a pointer is returned.

        +
        Example:
        -
          %array  = malloc [4 x ubyte ]                    ; yields {[%4 x ubyte]*}:array
         
        -  %size   = add uint 2, 2                          ; yields {uint}:size = uint 4
        +
        +  %array  = malloc [4 x ubyte ]                    ; yields {[%4 x ubyte]*}:array
        +
        +  %size   = add uint 2, 2                          ; yields {uint}:size = uint 4
           %array1 = malloc ubyte, uint 4                   ; yields {ubyte*}:array1
           %array2 = malloc [12 x ubyte], uint %size        ; yields {[12 x ubyte]*}:array2
        +  %array3 = malloc int, uint 4, align 1024         ; yields {int*}:array3
        +  %array4 = malloc int, align 1024                 ; yields {int*}:array4
         
        + - + +
        +
        Syntax:
        -
          free <type> <value>                              ; yields {void}
        +
        +
        +  free <type> <value>                              ; yields {void}
         
        +
        Overview:
        +

        The 'free' instruction returns memory back to the unused memory heap to be reallocated in the future.

        -

        +
        Arguments:
        +

        'value' shall be a pointer value that points to a value that was allocated with the 'malloc' instruction.

        +
        Semantics:
        +

        Access to the memory pointed to by the pointer is no longer defined after this instruction executes.

        +
        Example:
        -
          %array  = malloc [4 x ubyte]                    ; yields {[4 x ubyte]*}:array
        +
        +
        +  %array  = malloc [4 x ubyte]                    ; yields {[4 x ubyte]*}:array
                     free   [4 x ubyte]* %array
         
        + - + +
        +
        Syntax:
        -
          <result> = alloca <type>, uint <NumElements>  ; yields {type*}:result
        -  <result> = alloca <type>                      ; yields {type*}:result
        +
        +
        +  <result> = alloca <type>[, uint <NumElements>][, align <alignment>]     ; yields {type*}:result
         
        +
        Overview:
        +

        The 'alloca' instruction allocates memory on the current stack frame of the procedure that is live until the current function returns to its caller.

        +
        Arguments:
        +

        The 'alloca' instruction allocates sizeof(<type>)*NumElements bytes of memory on the runtime stack, returning a pointer of the -appropriate type to the program. The second form of the instruction is -a shorter version of the first that defaults to allocating one element.

        +appropriate type to the program. If "NumElements" is specified, it is the +number of elements allocated. If an alignment is specified, the value result +of the allocation is guaranteed to be aligned to at least that boundary. If +not specified, or if zero, the target can choose to align the allocation on any +convenient boundary.

        +

        'type' may be any sized type.

        +
        Semantics:
        +

        Memory is allocated; a pointer is returned. 'alloca'd memory is automatically released when the function returns. The 'alloca' instruction is commonly used to represent automatic variables that must have an address available. When the function returns (either with the ret or unwind instructions), the memory is reclaimed.

        +
        Example:
        -
          %ptr = alloca int                              ; yields {int*}:ptr
        +
        +
        +  %ptr = alloca int                              ; yields {int*}:ptr
           %ptr = alloca int, uint 4                      ; yields {int*}:ptr
        +  %ptr = alloca int, uint 4, align 1024          ; yields {int*}:ptr
        +  %ptr = alloca int, align 1024                  ; yields {int*}:ptr
         
        + @@ -3314,7 +3387,7 @@ Chris Lattner
        The LLVM Compiler Infrastructure
        - Last modified: $Date: 2005/10/24 16:17:18 $ + Last modified: $Date: 2005/11/06 08:02:57 $ From lattner at cs.uiuc.edu Sun Nov 6 02:22:29 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun, 6 Nov 2005 02:22:29 -0600 Subject: [llvm-commits] CVS: llvm/include/llvm/GlobalValue.h Message-ID: <200511060822.CAA26166@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm: GlobalValue.h updated: 1.25 -> 1.26 --- Log message: Make sure to initialize the alignment field --- Diffs of the changes: (+2 -1) GlobalValue.h | 3 ++- 1 files changed, 2 insertions(+), 1 deletion(-) Index: llvm/include/llvm/GlobalValue.h diff -u llvm/include/llvm/GlobalValue.h:1.25 llvm/include/llvm/GlobalValue.h:1.26 --- llvm/include/llvm/GlobalValue.h:1.25 Sun Nov 6 00:44:42 2005 +++ llvm/include/llvm/GlobalValue.h Sun Nov 6 02:22:18 2005 @@ -38,7 +38,8 @@ protected: GlobalValue(const Type *Ty, ValueTy vty, Use *Ops, unsigned NumOps, LinkageTypes linkage, const std::string &name = "") - : Constant(Ty, vty, Ops, NumOps, name), Linkage(linkage), Parent(0) { } + : Constant(Ty, vty, Ops, NumOps, name), Linkage(linkage), + Parent(0), Alignment(0) { } LinkageTypes Linkage; // The linkage of this global Module *Parent; From lattner at cs.uiuc.edu Sun Nov 6 02:23:28 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun, 6 Nov 2005 02:23:28 -0600 Subject: [llvm-commits] CVS: llvm/lib/Bytecode/Reader/Reader.cpp Message-ID: <200511060823.CAA26226@zion.cs.uiuc.edu> Changes in directory llvm/lib/Bytecode/Reader: Reader.cpp updated: 1.172 -> 1.173 --- Log message: minor clarity changes, no functionality difference. --- Diffs of the changes: (+2 -2) Reader.cpp | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/lib/Bytecode/Reader/Reader.cpp diff -u llvm/lib/Bytecode/Reader/Reader.cpp:1.172 llvm/lib/Bytecode/Reader/Reader.cpp:1.173 --- llvm/lib/Bytecode/Reader/Reader.cpp:1.172 Sun Nov 6 01:46:13 2005 +++ llvm/lib/Bytecode/Reader/Reader.cpp Sun Nov 6 02:23:17 2005 @@ -1901,8 +1901,7 @@ error("Invalid type (type type) for global var!"); unsigned LinkageID = (VarType >> 2) & 7; bool isConstant = VarType & 1; - bool hasInitializer = VarType & 2; - GlobalValue::LinkageTypes Linkage; + bool hasInitializer = (VarType & 2) != 0; unsigned Alignment = 0; // An extension word is present when linkage = 3 (internal) and hasinit = 0. @@ -1915,6 +1914,7 @@ Alignment = (1 << ((ExtWord >> 4) & 31)) >> 1; } + GlobalValue::LinkageTypes Linkage; switch (LinkageID) { case 0: Linkage = GlobalValue::ExternalLinkage; break; case 1: Linkage = GlobalValue::WeakLinkage; break; From natebegeman at mac.com Sun Nov 6 03:01:06 2005 From: natebegeman at mac.com (Nate Begeman) Date: Sun, 6 Nov 2005 03:01:06 -0600 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/PrologEpilogInserter.cpp Message-ID: <200511060901.DAA26375@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: PrologEpilogInserter.cpp updated: 1.49 -> 1.50 --- Log message: Add the necessary support to the ISel to allow targets to codegen the new alignment information appropriately. Includes code for PowerPC to support fixed-size allocas with alignment larger than the stack. Support for arbitrarily aligned dynamic allocas coming soon. --- Diffs of the changes: (+11 -3) PrologEpilogInserter.cpp | 14 +++++++++++--- 1 files changed, 11 insertions(+), 3 deletions(-) Index: llvm/lib/CodeGen/PrologEpilogInserter.cpp diff -u llvm/lib/CodeGen/PrologEpilogInserter.cpp:1.49 llvm/lib/CodeGen/PrologEpilogInserter.cpp:1.50 --- llvm/lib/CodeGen/PrologEpilogInserter.cpp:1.49 Fri Sep 30 12:19:22 2005 +++ llvm/lib/CodeGen/PrologEpilogInserter.cpp Sun Nov 6 03:00:38 2005 @@ -258,6 +258,7 @@ MachineFrameInfo *FFI = Fn.getFrameInfo(); unsigned StackAlignment = TFI.getStackAlignment(); + unsigned MaxAlign = StackAlignment; // Start at the beginning of the local area. // The Offset is the distance from the stack top in the direction @@ -295,9 +296,11 @@ Offset += FFI->getObjectSize(i); unsigned Align = FFI->getObjectAlignment(i); - assert(Align <= StackAlignment && "Cannot align stack object to higher " - "alignment boundary than the stack itself!"); - Offset = (Offset+Align-1)/Align*Align; // Adjust to Alignment boundary... + // If the alignment of this object is greater than that of the stack, then + // increase the stack alignment to match. + MaxAlign = std::max(MaxAlign, Align); + // Adjust to alignment boundary + Offset = (Offset+Align-1)/Align*Align; if (StackGrowsDown) { FFI->setObjectOffset(i, -Offset); // Set the computed offset @@ -315,6 +318,11 @@ // Set the final value of the stack pointer... FFI->setStackSize(Offset+TFI.getOffsetOfLocalArea()); + // If we have a new stack alignment, set the preferred stack alignment so that + // the targets can do the appropriate thing to properly align the stack above + // the default alignment. + if (MaxAlign > StackAlignment) + FFI->setMaxAlignment(MaxAlign); } From natebegeman at mac.com Sun Nov 6 03:01:06 2005 From: natebegeman at mac.com (Nate Begeman) Date: Sun, 6 Nov 2005 03:01:06 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp Message-ID: <200511060901.DAA26372@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/PowerPC: PPCRegisterInfo.cpp updated: 1.36 -> 1.37 --- Log message: Add the necessary support to the ISel to allow targets to codegen the new alignment information appropriately. Includes code for PowerPC to support fixed-size allocas with alignment larger than the stack. Support for arbitrarily aligned dynamic allocas coming soon. --- Diffs of the changes: (+26 -3) PPCRegisterInfo.cpp | 29 ++++++++++++++++++++++++++--- 1 files changed, 26 insertions(+), 3 deletions(-) Index: llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp diff -u llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp:1.36 llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp:1.37 --- llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp:1.36 Tue Oct 18 11:51:22 2005 +++ llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp Sun Nov 6 03:00:38 2005 @@ -26,6 +26,7 @@ #include "llvm/Target/TargetOptions.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/Debug.h" +#include "llvm/Support/MathExtras.h" #include "llvm/ADT/STLExtras.h" #include #include @@ -294,6 +295,11 @@ // Get the number of bytes to allocate from the FrameInfo unsigned NumBytes = MFI->getStackSize(); + + // Get the alignments provided by the target, and the maximum alignment + // (if any) of the fixed frame objects. + unsigned TargetAlign = MF.getTarget().getFrameInfo()->getStackAlignment(); + unsigned MaxAlign = MFI->getMaxAlignment(); // If we have calls, we cannot use the red zone to store callee save registers // and we must set up a stack frame, so calculate the necessary size here. @@ -307,14 +313,15 @@ // If we are a leaf function, and use up to 224 bytes of stack space, // and don't have a frame pointer, then we do not need to adjust the stack // pointer (we fit in the Red Zone). - if ((NumBytes == 0) || (NumBytes <= 224 && !hasFP(MF) && !MFI->hasCalls())) { + if ((NumBytes == 0) || (NumBytes <= 224 && !hasFP(MF) && !MFI->hasCalls() && + MaxAlign <= TargetAlign)) { MFI->setStackSize(0); return; } // Add the size of R1 to NumBytes size for the store of R1 to the bottom // of the stack and round the size to a multiple of the alignment. - unsigned Align = MF.getTarget().getFrameInfo()->getStackAlignment(); + unsigned Align = std::max(TargetAlign, MaxAlign); unsigned GPRSize = 4; unsigned Size = hasFP(MF) ? GPRSize + GPRSize : GPRSize; NumBytes = (NumBytes+Size+Align-1)/Align*Align; @@ -336,7 +343,23 @@ MI = BuildMI(PPC::STWUX, 3).addReg(PPC::R1).addReg(PPC::R1).addReg(PPC::R0); MBB.insert(MBBI, MI); } - + + // If there is a preferred stack alignment, align R1 now + // FIXME: If this ever matters, this could be made more efficient by folding + // this into the code above, so that we don't issue two store+update + // instructions. + if (MaxAlign > TargetAlign) { + assert(isPowerOf2_32(MaxAlign) && MaxAlign < 32767 && "Invalid alignment!"); + MI = BuildMI(PPC::RLWINM, 4, PPC::R0).addReg(PPC::R1).addImm(0) + .addImm(32-Log2_32(MaxAlign)).addImm(31); + MBB.insert(MBBI, MI); + MI = BuildMI(PPC::SUBFIC, 2, PPC::R0).addReg(PPC::R0).addImm(MaxAlign); + MBB.insert(MBBI, MI); + MI = BuildMI(PPC::STWUX, 3).addReg(PPC::R1).addReg(PPC::R1).addReg(PPC::R0); + MBB.insert(MBBI, MI); + } + + // If there is a frame pointer, copy R1 (SP) into R31 (FP) if (hasFP(MF)) { MI = BuildMI(PPC::STW, 3).addReg(PPC::R31).addSImm(GPRSize).addReg(PPC::R1); MBB.insert(MBBI, MI); From natebegeman at mac.com Sun Nov 6 03:01:06 2005 From: natebegeman at mac.com (Nate Begeman) Date: Sun, 6 Nov 2005 03:01:06 -0600 Subject: [llvm-commits] CVS: llvm/include/llvm/CodeGen/MachineFrameInfo.h Message-ID: <200511060901.DAA26373@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/CodeGen: MachineFrameInfo.h updated: 1.12 -> 1.13 --- Log message: Add the necessary support to the ISel to allow targets to codegen the new alignment information appropriately. Includes code for PowerPC to support fixed-size allocas with alignment larger than the stack. Support for arbitrarily aligned dynamic allocas coming soon. --- Diffs of the changes: (+18 -1) MachineFrameInfo.h | 19 ++++++++++++++++++- 1 files changed, 18 insertions(+), 1 deletion(-) Index: llvm/include/llvm/CodeGen/MachineFrameInfo.h diff -u llvm/include/llvm/CodeGen/MachineFrameInfo.h:1.12 llvm/include/llvm/CodeGen/MachineFrameInfo.h:1.13 --- llvm/include/llvm/CodeGen/MachineFrameInfo.h:1.12 Thu Apr 21 15:38:00 2005 +++ llvm/include/llvm/CodeGen/MachineFrameInfo.h Sun Nov 6 03:00:37 2005 @@ -85,6 +85,13 @@ /// to be allocated on entry to the function. /// unsigned StackSize; + + /// MaxAlignment - The prolog/epilog code inserter may process objects + /// that require greater alignment than the default alignment the target + /// provides. In these cases, MaxAlignment is set to the new alignment + /// necessary to easily calculate fixed offsets for each stack object. + /// + unsigned MaxAlignment; /// HasCalls - Set to true if this function has any function calls. This is /// only valid during and after prolog/epilog code insertion. @@ -99,7 +106,7 @@ unsigned MaxCallFrameSize; public: MachineFrameInfo() { - NumFixedObjects = StackSize = 0; + NumFixedObjects = StackSize = MaxAlignment = 0; HasVarSizedObjects = false; HasCalls = false; MaxCallFrameSize = 0; @@ -163,6 +170,16 @@ /// void setStackSize(unsigned Size) { StackSize = Size; } + /// getMaxAlignment - Return the alignment in bytes that this function must be + /// aligned to, which is greater than the default stack alignment provided by + /// the target. + /// + unsigned getMaxAlignment() const { return MaxAlignment; } + + /// setMaxAlignment - Set the preferred alignment. + /// + void setMaxAlignment(unsigned Align) { MaxAlignment = Align; } + /// hasCalls - Return true if the current function has no function calls. /// This is only valid during or after prolog/epilog code emission. /// From natebegeman at mac.com Sun Nov 6 03:01:06 2005 From: natebegeman at mac.com (Nate Begeman) Date: Sun, 6 Nov 2005 03:01:06 -0600 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Message-ID: <200511060901.DAA26374@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/SelectionDAG: SelectionDAGISel.cpp updated: 1.92 -> 1.93 --- Log message: Add the necessary support to the ISel to allow targets to codegen the new alignment information appropriately. Includes code for PowerPC to support fixed-size allocas with alignment larger than the stack. Support for arbitrarily aligned dynamic allocas coming soon. --- Diffs of the changes: (+5 -2) SelectionDAGISel.cpp | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.92 llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.93 --- llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.92 Sun Oct 30 13:42:35 2005 +++ llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Sun Nov 6 03:00:38 2005 @@ -147,7 +147,9 @@ if (ConstantUInt *CUI = dyn_cast(AI->getArraySize())) { const Type *Ty = AI->getAllocatedType(); uint64_t TySize = TLI.getTargetData().getTypeSize(Ty); - unsigned Align = TLI.getTargetData().getTypeAlignment(Ty); + unsigned Align = + std::max((unsigned)TLI.getTargetData().getTypeAlignment(Ty), + AI->getAlignment()); // If the alignment of the value is smaller than the size of the value, // and if the size of the value is particularly small (<= 8 bytes), @@ -636,7 +638,8 @@ const Type *Ty = I.getAllocatedType(); uint64_t TySize = TLI.getTargetData().getTypeSize(Ty); - unsigned Align = TLI.getTargetData().getTypeAlignment(Ty); + unsigned Align = std::max((unsigned)TLI.getTargetData().getTypeAlignment(Ty), + I.getAlignment()); SDOperand AllocSize = getValue(I.getArraySize()); MVT::ValueType IntPtr = TLI.getPointerTy(); From duraid at octopus.com.au Sun Nov 6 07:43:49 2005 From: duraid at octopus.com.au (Duraid Madina) Date: Sun, 6 Nov 2005 07:43:49 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp Message-ID: <200511061343.HAA30883@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/IA64: IA64ISelDAGToDAG.cpp updated: 1.8 -> 1.9 --- Log message: just some random hacking - calls (particularly indirect) need a lot of love (especially with -sched=simple) --- Diffs of the changes: (+25 -14) IA64ISelDAGToDAG.cpp | 39 +++++++++++++++++++++++++-------------- 1 files changed, 25 insertions(+), 14 deletions(-) Index: llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp diff -u llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp:1.8 llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp:1.9 --- llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp:1.8 Fri Nov 4 11:55:53 2005 +++ llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp Sun Nov 6 07:43:30 2005 @@ -201,7 +201,7 @@ targetGPAddr); Chain = targetGP.getValue(1); -/* FIXME! (methcall still fails) +/* FIXME? (methcall still fails) SDOperand targetEntryPoint=CurDAG->getLoad(MVT::i64, Chain, FnDescriptor, CurDAG->getSrcValue(0)); SDOperand targetGPAddr=CurDAG->getNode(ISD::ADD, MVT::i64, FnDescriptor, @@ -209,7 +209,8 @@ SDOperand targetGP=CurDAG->getLoad(MVT::i64, Chain, targetGPAddr, CurDAG->getSrcValue(0)); */ - + + /* this is just the long way of writing the two lines below? // Copy the callee GP into r1 SDOperand r1 = CurDAG->getRegister(IA64::r1, MVT::i64); Chain = CurDAG->getNode(ISD::CopyToReg, MVT::i64, Chain, r1, @@ -220,8 +221,12 @@ SDOperand B6 = CurDAG->getRegister(IA64::B6, MVT::i64); Chain = CurDAG->getNode(ISD::CopyToReg, MVT::i64, Chain, B6, targetEntryPoint); + */ + + Chain = CurDAG->getCopyToReg(Chain, IA64::r1, targetGP); + Chain = CurDAG->getCopyToReg(Chain, IA64::B6, targetEntryPoint); - CallOperands.push_back(B6); + CallOperands.push_back(CurDAG->getRegister(IA64::B6, MVT::i64)); CallOpcode = IA64::BRCALL_INDIRECT; } @@ -256,18 +261,23 @@ if (N->getOperand(i).getOpcode() != ISD::UNDEF) { SDOperand Val = Select(N->getOperand(i)); - Chain = CurDAG->getCopyToReg(Chain, DestReg, Val, InFlag); - InFlag = Chain.getValue(1); - CallOperands.push_back(CurDAG->getRegister(DestReg, RegTy)); + if(MVT::isInteger(N->getOperand(i).getValueType())) { + Chain = CurDAG->getCopyToReg(Chain, DestReg, Val, InFlag); + InFlag = Chain.getValue(1); + CallOperands.push_back(CurDAG->getRegister(DestReg, RegTy)); + } // some functions (e.g. printf) want floating point arguments // *also* passed as in-memory representations in integer registers // this is FORTRAN legacy junk which we don't _always_ need // to do, but to be on the safe side, we do. - if(MVT::isFloatingPoint(N->getOperand(i).getValueType())) { + else if(MVT::isFloatingPoint(N->getOperand(i).getValueType())) { assert((i-2) < 8 && "FP args alone would fit, but no int regs left"); - DestReg = intArgs[i-2]; // this FP arg goes in an int reg + // first copy into the appropriate FP reg + Chain = CurDAG->getCopyToReg(Chain, DestReg, Val); + // then copy into the appropriate integer reg + DestReg = intArgs[i-2]; // GETFD takes an FP reg and writes a GP reg - Chain = CurDAG->getTargetNode(IA64::GETFD, MVT::i64, Val, InFlag); + Chain = CurDAG->getTargetNode(IA64::GETFD, MVT::i64, Val); // FIXME: this next line is a bit unfortunate Chain = CurDAG->getCopyToReg(Chain, DestReg, Chain, InFlag); InFlag = Chain.getValue(1); @@ -285,8 +295,6 @@ Chain = CurDAG->getTargetNode(CallOpcode, MVT::Other, MVT::Flag, CallOperands); -// return Chain; // HACK: err, this means that functions never return anything. need to intergrate this with the code immediately below FIXME XXX - std::vector CallResults; // If the call has results, copy the values out of the ret val registers. @@ -304,12 +312,15 @@ CallResults.push_back(Chain.getValue(0)); break; } - // restore GP, SP and RP + + // restore GP, SP and RP - FIXME: this doesn't quite work (e.g. + // methcall / objinst both segfault on exit) and it *really* + // doesn't work unless you have -sched=none Chain = CurDAG->getCopyToReg(Chain, IA64::r1, GPBeforeCall); Chain = CurDAG->getCopyToReg(Chain, IA64::r12, SPBeforeCall); Chain = CurDAG->getCopyToReg(Chain, IA64::rp, RPBeforeCall); - - CallResults.push_back(Chain); + CallResults.push_back(Chain); // llc segfaults w/o this, + // ary3(e.g.) SIGILLs with 3 for (unsigned i = 0, e = CallResults.size(); i != e; ++i) CodeGenMap[Op.getValue(i)] = CallResults[i]; From lattner at cs.uiuc.edu Sun Nov 6 11:40:29 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun, 6 Nov 2005 11:40:29 -0600 Subject: [llvm-commits] CVS: llvm/include/llvm/CodeGen/MachineFrameInfo.h Message-ID: <200511061740.LAA00863@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/CodeGen: MachineFrameInfo.h updated: 1.13 -> 1.14 --- Log message: Change a comment slightly --- Diffs of the changes: (+4 -2) MachineFrameInfo.h | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) Index: llvm/include/llvm/CodeGen/MachineFrameInfo.h diff -u llvm/include/llvm/CodeGen/MachineFrameInfo.h:1.13 llvm/include/llvm/CodeGen/MachineFrameInfo.h:1.14 --- llvm/include/llvm/CodeGen/MachineFrameInfo.h:1.13 Sun Nov 6 03:00:37 2005 +++ llvm/include/llvm/CodeGen/MachineFrameInfo.h Sun Nov 6 11:40:18 2005 @@ -88,8 +88,10 @@ /// MaxAlignment - The prolog/epilog code inserter may process objects /// that require greater alignment than the default alignment the target - /// provides. In these cases, MaxAlignment is set to the new alignment - /// necessary to easily calculate fixed offsets for each stack object. + /// provides. To handle this, MaxAlignment is set to the maximum alignment + /// needed by the objects on the current frame. If this is greater than the + /// native alignment maintained by the compiler, dynamic alignment code will + /// be needed. /// unsigned MaxAlignment; From lattner at cs.uiuc.edu Sun Nov 6 11:43:32 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun, 6 Nov 2005 11:43:32 -0600 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/PrologEpilogInserter.cpp Message-ID: <200511061743.LAA00925@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: PrologEpilogInserter.cpp updated: 1.50 -> 1.51 --- Log message: Always compute max align. --- Diffs of the changes: (+5 -6) PrologEpilogInserter.cpp | 11 +++++------ 1 files changed, 5 insertions(+), 6 deletions(-) Index: llvm/lib/CodeGen/PrologEpilogInserter.cpp diff -u llvm/lib/CodeGen/PrologEpilogInserter.cpp:1.50 llvm/lib/CodeGen/PrologEpilogInserter.cpp:1.51 --- llvm/lib/CodeGen/PrologEpilogInserter.cpp:1.50 Sun Nov 6 03:00:38 2005 +++ llvm/lib/CodeGen/PrologEpilogInserter.cpp Sun Nov 6 11:43:20 2005 @@ -258,7 +258,7 @@ MachineFrameInfo *FFI = Fn.getFrameInfo(); unsigned StackAlignment = TFI.getStackAlignment(); - unsigned MaxAlign = StackAlignment; + unsigned MaxAlign = 0; // Start at the beginning of the local area. // The Offset is the distance from the stack top in the direction @@ -318,11 +318,10 @@ // Set the final value of the stack pointer... FFI->setStackSize(Offset+TFI.getOffsetOfLocalArea()); - // If we have a new stack alignment, set the preferred stack alignment so that - // the targets can do the appropriate thing to properly align the stack above - // the default alignment. - if (MaxAlign > StackAlignment) - FFI->setMaxAlignment(MaxAlign); + + // Remember the required stack alignment in case targets need it to perform + // dynamic stack alignment. + FFI->setMaxAlignment(MaxAlign); } From alenhar2 at cs.uiuc.edu Sat Nov 5 09:04:41 2005 From: alenhar2 at cs.uiuc.edu (Andrew Lenharth) Date: Sat, 05 Nov 2005 09:04:41 -0600 Subject: [llvm-commits] Re: llvm-commits Digest, Vol 17, Issue 5 In-Reply-To: <200511050922.jA59M9V0011300@dcs-maillist.cs.uiuc.edu> References: <200511050922.jA59M9V0011300@dcs-maillist.cs.uiuc.edu> Message-ID: <1131203081.8471.3.camel@localhost.localdomain> On Sat, 2005-11-05 at 03:22 -0600, llvm-commits-request at cs.uiuc.edu wrote: > Changes in directory llvm/lib/Transforms/Scalar: > > InstructionCombining.cpp updated: 1.403 -> 1.404 > --- > Log message: > > Turn srem -> urem when neither input has their sign bit set. This > triggers > 8 times in vortex, allowing the srems to be turned into shrs: > > OLD: %tmp.104 = rem int %tmp.5.i37, 16 ; > [#uses=1] > NEW: %tmp.104 = rem uint %tmp.5.i37, 16 ; > [#uses=0] > OLD: %tmp.98 = rem int %tmp.5.i24, 16 ; > [#uses=1] > NEW: %tmp.98 = rem uint %tmp.5.i24, 16 ; > [#uses=0] > OLD: %tmp.91 = rem int %tmp.5.i19, 8 ; [#uses=1] > NEW: %tmp.91 = rem uint %tmp.5.i19, 8 ; > [#uses=0] > OLD: %tmp.88 = rem int %tmp.5.i14, 8 ; [#uses=1] > NEW: %tmp.88 = rem uint %tmp.5.i14, 8 ; > [#uses=0] > OLD: %tmp.85 = rem int %tmp.5.i9, 1024 ; > [#uses=2] > NEW: %tmp.85 = rem uint %tmp.5.i9, 1024 ; > [#uses=0] > OLD: %tmp.82 = rem int %tmp.5.i, 512 ; [#uses=2] > NEW: %tmp.82 = rem uint %tmp.5.i1, 512 ; > [#uses=0] > OLD: %tmp.48.i = rem int %tmp.5.i.i161, 4 ; > [#uses=1] > NEW: %tmp.48.i = rem uint %tmp.5.i.i161, 4 ; > [#uses=0] > OLD: %tmp.20.i2 = rem int %tmp.5.i.i, 4 ; > [#uses=1] > NEW: %tmp.20.i2 = rem uint %tmp.5.i.i, 4 ; > [#uses=0] > > it also occurs 9 times in gcc, but with odd constant divisors (1009 > and 61) > so the payoff isn't as great. For those of us without an integer div or rem instruction, this is really good stuff! -- Andrew Lenharth -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20051105/59b1cf51/attachment.bin From duraid at octopus.com.au Sun Nov 6 21:11:14 2005 From: duraid at octopus.com.au (Duraid Madina) Date: Sun, 6 Nov 2005 21:11:14 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp Message-ID: <200511070311.VAA06184@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/IA64: IA64ISelDAGToDAG.cpp updated: 1.9 -> 1.10 --- Log message: add support for storing and returning bools --- Diffs of the changes: (+26 -5) IA64ISelDAGToDAG.cpp | 31 ++++++++++++++++++++++++++----- 1 files changed, 26 insertions(+), 5 deletions(-) Index: llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp diff -u llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp:1.9 llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp:1.10 --- llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp:1.9 Sun Nov 6 07:43:30 2005 +++ llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp Sun Nov 6 21:11:03 2005 @@ -301,6 +301,16 @@ switch (N->getValueType(0)) { default: assert(0 && "Unexpected ret value!"); case MVT::Other: break; + case MVT::i1: { + // bools are returned as bytes 0/1 in r8 + SDOperand byteval = CurDAG->getCopyFromReg(Chain, IA64::r8, MVT::i64, + Chain.getValue(1)); + Chain = byteval.getValue(1); + Chain = CurDAG->getTargetNode(IA64::CMPNE, MVT::i1, MVT::Other, + byteval, CurDAG->getRegister(IA64::r0, MVT::i64)).getValue(1); + CallResults.push_back(Chain.getValue(0)); + break; + } case MVT::i64: Chain = CurDAG->getCopyFromReg(Chain, IA64::r8, MVT::i64, Chain.getValue(1)).getValue(1); @@ -422,17 +432,28 @@ case ISD::TRUNCSTORE: case ISD::STORE: { SDOperand Address = Select(N->getOperand(2)); - + SDOperand Chain = Select(N->getOperand(0)); + unsigned Opc; if (N->getOpcode() == ISD::STORE) { switch (N->getOperand(1).getValueType()) { - default: assert(0 && "unknown Type in store"); + default: assert(0 && "unknown type in store"); + case MVT::i1: { // this is a bool + Opc = IA64::ST1; // we store either 0 or 1 as a byte + CurDAG->SelectNodeTo(N, Opc, MVT::Other, Address, + CurDAG->getTargetNode(IA64::PADDS, MVT::i64, + CurDAG->getRegister(IA64::r0, MVT::i64), + CurDAG->getConstant(1, MVT::i64), + Select(N->getOperand(1))), + Chain); + return SDOperand(N, 0); // XXX: early exit + } case MVT::i64: Opc = IA64::ST8; break; case MVT::f64: Opc = IA64::STF8; break; - } + } } else { //ISD::TRUNCSTORE switch(cast(N->getOperand(4))->getVT()) { - default: assert(0 && "unknown Type in store"); + default: assert(0 && "unknown type in truncstore"); case MVT::i8: Opc = IA64::ST1; break; case MVT::i16: Opc = IA64::ST2; break; case MVT::i32: Opc = IA64::ST4; break; @@ -441,7 +462,7 @@ } CurDAG->SelectNodeTo(N, Opc, MVT::Other, Select(N->getOperand(2)), - Select(N->getOperand(1)), Select(N->getOperand(0))); + Select(N->getOperand(1)), Chain); return SDOperand(N, 0); }