From evan.cheng at apple.com Mon Oct 16 01:33:59 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Mon, 16 Oct 2006 01:33:59 -0500 Subject: [llvm-commits] CVS: llvm/utils/TableGen/DAGISelEmitter.cpp Message-ID: <200610160633.k9G6Xxr0004841@zion.cs.uiuc.edu> Changes in directory llvm/utils/TableGen: DAGISelEmitter.cpp updated: 1.271 -> 1.272 --- Log message: Passing isel root and use operands to ComplexPattern functions, these should do the usual load folding checks as well. --- Diffs of the changes: (+28 -14) DAGISelEmitter.cpp | 42 ++++++++++++++++++++++++++++-------------- 1 files changed, 28 insertions(+), 14 deletions(-) Index: llvm/utils/TableGen/DAGISelEmitter.cpp diff -u llvm/utils/TableGen/DAGISelEmitter.cpp:1.271 llvm/utils/TableGen/DAGISelEmitter.cpp:1.272 --- llvm/utils/TableGen/DAGISelEmitter.cpp:1.271 Sat Oct 14 03:30:15 2006 +++ llvm/utils/TableGen/DAGISelEmitter.cpp Mon Oct 16 01:33:44 2006 @@ -2199,9 +2199,9 @@ /// EmitMatchCode - Emit a matcher for N, going to the label for PatternNo /// if the match fails. At this point, we already know that the opcode for N /// matches, and the SDNode for the result has the RootName specified name. - void EmitMatchCode(TreePatternNode *Root, TreePatternNode *N, - TreePatternNode *P, const std::string &RootName, - const std::string &ChainSuffix, bool &FoundChain) { + void EmitMatchCode(TreePatternNode *N, TreePatternNode *P, + const std::string &RootName, const std::string &ChainSuffix, + bool &FoundChain) { bool isRoot = (P == NULL); // Emit instruction predicates. Each predicate is just a string for now. if (isRoot) { @@ -2283,12 +2283,22 @@ // / [YY] // | ^ // [XX]-------| - const SDNodeInfo &PInfo = ISE.getSDNodeInfo(P->getOperator()); - if (P != Root || + bool NeedCheck = false; + if (P != Pattern) + NeedCheck = true; + else { + const SDNodeInfo &PInfo = ISE.getSDNodeInfo(P->getOperator()); + NeedCheck = + P->getOperator() == ISE.get_intrinsic_void_sdnode() || + P->getOperator() == ISE.get_intrinsic_w_chain_sdnode() || + P->getOperator() == ISE.get_intrinsic_wo_chain_sdnode() || PInfo.getNumOperands() > 1 || PInfo.hasProperty(SDNPHasChain) || PInfo.hasProperty(SDNPInFlag) || - PInfo.hasProperty(SDNPOptInFlag)) { + PInfo.hasProperty(SDNPOptInFlag); + } + + if (NeedCheck) { std::string ParentName(RootName.begin(), RootName.end()-1); emitCheck("CanBeFoldedBy(" + RootName + ".Val, " + ParentName + ".Val, N.Val)"); @@ -2359,7 +2369,7 @@ emitCheck(MaskPredicate + RootName + "0, cast(" + RootName + "1), " + itostr(II->getValue()) + ")"); - EmitChildMatchCode(Root, N->getChild(0), N, RootName + utostr(0), + EmitChildMatchCode(N->getChild(0), N, RootName + utostr(0), ChainSuffix + utostr(0), FoundChain); return; } @@ -2370,7 +2380,7 @@ emitInit("SDOperand " + RootName + utostr(OpNo) + " = " + RootName + ".getOperand(" +utostr(OpNo) + ");"); - EmitChildMatchCode(Root, N->getChild(i), N, RootName + utostr(OpNo), + EmitChildMatchCode(N->getChild(i), N, RootName + utostr(OpNo), ChainSuffix + utostr(OpNo), FoundChain); } @@ -2401,15 +2411,15 @@ } } - void EmitChildMatchCode(TreePatternNode *Root, TreePatternNode *Child, - TreePatternNode *Parent, const std::string &RootName, + void EmitChildMatchCode(TreePatternNode *Child, TreePatternNode *Parent, + const std::string &RootName, const std::string &ChainSuffix, bool &FoundChain) { if (!Child->isLeaf()) { // If it's not a leaf, recursively match. const SDNodeInfo &CInfo = ISE.getSDNodeInfo(Child->getOperator()); emitCheck(RootName + ".getOpcode() == " + CInfo.getEnumName()); - EmitMatchCode(Root, Child, Parent, RootName, ChainSuffix, FoundChain); + EmitMatchCode(Child, Parent, RootName, ChainSuffix, FoundChain); if (NodeHasProperty(Child, SDNPHasChain, ISE)) FoldedChains.push_back(std::make_pair(RootName, CInfo.getNumResults())); } else { @@ -2457,7 +2467,12 @@ emitCode("SDOperand " + ChainName + ";"); } - std::string Code = Fn + "(" + RootName; + std::string Code = Fn + "("; + if (CP->hasProperty(SDNPHasChain)) { + std::string ParentName(RootName.begin(), RootName.end()-1); + Code += "N, " + ParentName + ", "; + } + Code += RootName; for (unsigned i = 0; i < NumOps; i++) Code += ", CPTmp" + utostr(i); if (CP->hasProperty(SDNPHasChain)) @@ -3099,8 +3114,7 @@ // Emit the matcher, capturing named arguments in VariableMap. bool FoundChain = false; - Emitter.EmitMatchCode(Pattern.getSrcPattern(), Pattern.getSrcPattern(), NULL, - "N", "", FoundChain); + Emitter.EmitMatchCode(Pattern.getSrcPattern(), NULL, "N", "", FoundChain); // TP - Get *SOME* tree pattern, we don't care which. TreePattern &TP = *PatternFragments.begin()->second; From evan.cheng at apple.com Mon Oct 16 01:35:09 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Mon, 16 Oct 2006 01:35:09 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86ISelDAGToDAG.cpp Message-ID: <200610160635.k9G6Z9Iv004881@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: X86ISelDAGToDAG.cpp updated: 1.119 -> 1.120 --- Log message: SelectScalarSSELoad should call CanBeFoldedBy as well. --- Diffs of the changes: (+7 -3) X86ISelDAGToDAG.cpp | 10 +++++++--- 1 files changed, 7 insertions(+), 3 deletions(-) Index: llvm/lib/Target/X86/X86ISelDAGToDAG.cpp diff -u llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1.119 llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1.120 --- llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1.119 Sat Oct 14 03:33:25 2006 +++ llvm/lib/Target/X86/X86ISelDAGToDAG.cpp Mon Oct 16 01:34:55 2006 @@ -147,7 +147,8 @@ SDOperand &Index, SDOperand &Disp); bool SelectLEAAddr(SDOperand N, SDOperand &Base, SDOperand &Scale, SDOperand &Index, SDOperand &Disp); - bool SelectScalarSSELoad(SDOperand N, SDOperand &Base, SDOperand &Scale, + bool SelectScalarSSELoad(SDOperand Root, SDOperand Pred, + SDOperand N, SDOperand &Base, SDOperand &Scale, SDOperand &Index, SDOperand &Disp, SDOperand &InChain, SDOperand &OutChain); bool TryFoldLoad(SDOperand P, SDOperand N, @@ -804,13 +805,16 @@ /// SelectScalarSSELoad - Match a scalar SSE load. In particular, we want to /// match a load whose top elements are either undef or zeros. The load flavor /// is derived from the type of N, which is either v4f32 or v2f64. -bool X86DAGToDAGISel::SelectScalarSSELoad(SDOperand N, SDOperand &Base, +bool X86DAGToDAGISel::SelectScalarSSELoad(SDOperand Root, SDOperand Pred, + SDOperand N, SDOperand &Base, SDOperand &Scale, SDOperand &Index, SDOperand &Disp, SDOperand &InChain, SDOperand &OutChain) { if (N.getOpcode() == ISD::SCALAR_TO_VECTOR) { InChain = N.getOperand(0).getValue(1); - if (ISD::isNON_EXTLoad(InChain.Val) && InChain.getValue(0).hasOneUse()) { + if (ISD::isNON_EXTLoad(InChain.Val) && + InChain.getValue(0).hasOneUse() && + CanBeFoldedBy(N.Val, Pred.Val, Root.Val)) { LoadSDNode *LD = cast(InChain); if (!SelectAddr(LD->getBasePtr(), Base, Scale, Index, Disp)) return false; From evan.cheng at apple.com Mon Oct 16 01:36:14 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Mon, 16 Oct 2006 01:36:14 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86ISelLowering.cpp Message-ID: <200610160636.k9G6aEjv004910@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: X86ISelLowering.cpp updated: 1.275 -> 1.276 --- Log message: Avoid getting into an infinite loop when -disable-x86-shuffle-opti is specified. --- Diffs of the changes: (+12 -8) X86ISelLowering.cpp | 20 ++++++++++++-------- 1 files changed, 12 insertions(+), 8 deletions(-) Index: llvm/lib/Target/X86/X86ISelLowering.cpp diff -u llvm/lib/Target/X86/X86ISelLowering.cpp:1.275 llvm/lib/Target/X86/X86ISelLowering.cpp:1.276 --- llvm/lib/Target/X86/X86ISelLowering.cpp:1.275 Fri Oct 13 16:14:26 2006 +++ llvm/lib/Target/X86/X86ISelLowering.cpp Mon Oct 16 01:36:00 2006 @@ -3413,7 +3413,7 @@ // FIXME: we can do the same for v4f32 case when we know both parts of // the lower half come from scalar_to_vector (loadf32). We should do // that in post legalizer dag combiner with target specific hooks. - if (MVT::isInteger(EVT) && (NonZeros & (0x3 << 2)) == 0) + if (!NoShuffleOpti && MVT::isInteger(EVT) && (NonZeros & (0x3 << 2)) == 0) return V[0]; MVT::ValueType MaskVT = MVT::getIntVectorWithNumElements(NumElems); MVT::ValueType EVT = MVT::getVectorBaseType(MaskVT); @@ -3466,6 +3466,8 @@ unsigned NumElems = PermMask.getNumOperands(); bool V1IsUndef = V1.getOpcode() == ISD::UNDEF; bool V2IsUndef = V2.getOpcode() == ISD::UNDEF; + bool V1IsSplat = false; + bool V2IsSplat = false; if (isUndefShuffle(Op.Val)) return DAG.getNode(ISD::UNDEF, VT); @@ -3492,8 +3494,8 @@ ShouldXformToMOVLP(V1.Val, V2.Val, PermMask.Val)) return CommuteVectorShuffle(Op, DAG); - bool V1IsSplat = isSplatVector(V1.Val); - bool V2IsSplat = isSplatVector(V2.Val); + V1IsSplat = isSplatVector(V1.Val); + V2IsSplat = isSplatVector(V2.Val); if ((V1IsSplat || V1IsUndef) && !(V2IsSplat || V2IsUndef)) { Op = CommuteVectorShuffle(Op, DAG); V1 = Op.getOperand(0); @@ -3519,12 +3521,14 @@ } return Op; } + } - if (X86::isUNPCKL_v_undef_Mask(PermMask.Val) || - X86::isUNPCKLMask(PermMask.Val) || - X86::isUNPCKHMask(PermMask.Val)) - return Op; + if (X86::isUNPCKL_v_undef_Mask(PermMask.Val) || + X86::isUNPCKLMask(PermMask.Val) || + X86::isUNPCKHMask(PermMask.Val)) + return Op; + if (!NoShuffleOpti) { if (V2IsSplat) { // Normalize mask so all entries that point to V2 points to its first // element then try to match unpck{h|l} again. If match, return a @@ -3543,7 +3547,7 @@ } // Normalize the node to match x86 shuffle ops if needed - if (V2.getOpcode() != ISD::UNDEF) + if (!NoShuffleOpti && V2.getOpcode() != ISD::UNDEF) if (isCommutedSHUFP(PermMask.Val)) { Op = CommuteVectorShuffle(Op, DAG); V1 = Op.getOperand(0); From rafael.espindola at gmail.com Mon Oct 16 11:33:48 2006 From: rafael.espindola at gmail.com (Rafael Espindola) Date: Mon, 16 Oct 2006 11:33:48 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/ARM/ARMInstrInfo.td ARMMul.cpp README.txt Message-ID: <200610161633.k9GGXm0d006445@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/ARM: ARMInstrInfo.td updated: 1.49 -> 1.50 ARMMul.cpp updated: 1.2 -> 1.3 README.txt updated: 1.5 -> 1.6 --- Log message: implement smull and umull --- Diffs of the changes: (+24 -5) ARMInstrInfo.td | 10 ++++++++++ ARMMul.cpp | 14 +++++++++----- README.txt | 5 +++++ 3 files changed, 24 insertions(+), 5 deletions(-) Index: llvm/lib/Target/ARM/ARMInstrInfo.td diff -u llvm/lib/Target/ARM/ARMInstrInfo.td:1.49 llvm/lib/Target/ARM/ARMInstrInfo.td:1.50 --- llvm/lib/Target/ARM/ARMInstrInfo.td:1.49 Sat Oct 14 08:42:53 2006 +++ llvm/lib/Target/ARM/ARMInstrInfo.td Mon Oct 16 11:33:29 2006 @@ -174,6 +174,16 @@ "mul $dst, $a, $b", [(set IntRegs:$dst, (mul IntRegs:$a, IntRegs:$b))]>; +let Defs = [R0] in { + def SMULL : InstARM<(ops IntRegs:$dst, IntRegs:$a, IntRegs:$b), + "smull r12, $dst, $a, $b", + [(set IntRegs:$dst, (mulhs IntRegs:$a, IntRegs:$b))]>; + + def UMULL : InstARM<(ops IntRegs:$dst, IntRegs:$a, IntRegs:$b), + "umull r12, $dst, $a, $b", + [(set IntRegs:$dst, (mulhu IntRegs:$a, IntRegs:$b))]>; +} + def bcond : InstARM<(ops brtarget:$dst, CCOp:$cc), "b$cc $dst", [(armbr bb:$dst, imm:$cc)]>; Index: llvm/lib/Target/ARM/ARMMul.cpp diff -u llvm/lib/Target/ARM/ARMMul.cpp:1.2 llvm/lib/Target/ARM/ARMMul.cpp:1.3 --- llvm/lib/Target/ARM/ARMMul.cpp:1.2 Tue Sep 19 11:41:40 2006 +++ llvm/lib/Target/ARM/ARMMul.cpp Mon Oct 16 11:33:29 2006 @@ -8,7 +8,7 @@ // //===----------------------------------------------------------------------===// // -// Modify the ARM multiplication instructions so that Rd and Rm are distinct +// Modify the ARM multiplication instructions so that Rd{Hi,Lo} and Rm are distinct // //===----------------------------------------------------------------------===// @@ -39,7 +39,10 @@ I != E; ++I) { MachineInstr *MI = I; - if (MI->getOpcode() == ARM::MUL) { + int Op = MI->getOpcode(); + if (Op == ARM::MUL || + Op == ARM::SMULL || + Op == ARM::UMULL) { MachineOperand &RdOp = MI->getOperand(0); MachineOperand &RmOp = MI->getOperand(1); MachineOperand &RsOp = MI->getOperand(2); @@ -48,7 +51,7 @@ unsigned Rm = RmOp.getReg(); unsigned Rs = RsOp.getReg(); - if(Rd == Rm) { + if (Rd == Rm) { Changed = true; if (Rd != Rs) { //Rd and Rm must be distinct, but Rd can be equal to Rs. @@ -56,9 +59,10 @@ RmOp.setReg(Rs); RsOp.setReg(Rm); } else { - BuildMI(MBB, I, ARM::MOV, 3, ARM::R12).addReg(Rm).addImm(0) + unsigned scratch = Op == ARM::MUL ? ARM::R12 : ARM::R0; + BuildMI(MBB, I, ARM::MOV, 3, scratch).addReg(Rm).addImm(0) .addImm(ARMShift::LSL); - RmOp.setReg(ARM::R12); + RmOp.setReg(scratch); } } } Index: llvm/lib/Target/ARM/README.txt diff -u llvm/lib/Target/ARM/README.txt:1.5 llvm/lib/Target/ARM/README.txt:1.6 --- llvm/lib/Target/ARM/README.txt:1.5 Mon Oct 9 09:18:33 2006 +++ llvm/lib/Target/ARM/README.txt Mon Oct 16 11:33:29 2006 @@ -46,3 +46,8 @@ Only needs 8 bytes of stack space. We currently allocate 16. ---------------------------------------------------------- + +32 x 32 -> 64 multiplications currently uses two instructions. We +should try to declare smull and umull as returning two values. + +---------------------------------------------------------- From rafael.espindola at gmail.com Mon Oct 16 11:33:48 2006 From: rafael.espindola at gmail.com (Rafael Espindola) Date: Mon, 16 Oct 2006 11:33:48 -0500 Subject: [llvm-commits] CVS: llvm/test/Regression/CodeGen/ARM/long.ll Message-ID: <200610161633.k9GGXmFM006444@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/CodeGen/ARM: long.ll updated: 1.5 -> 1.6 --- Log message: implement smull and umull --- Diffs of the changes: (+19 -1) long.ll | 20 +++++++++++++++++++- 1 files changed, 19 insertions(+), 1 deletion(-) Index: llvm/test/Regression/CodeGen/ARM/long.ll diff -u llvm/test/Regression/CodeGen/ARM/long.ll:1.5 llvm/test/Regression/CodeGen/ARM/long.ll:1.6 --- llvm/test/Regression/CodeGen/ARM/long.ll:1.5 Fri Oct 13 12:19:20 2006 +++ llvm/test/Regression/CodeGen/ARM/long.ll Mon Oct 16 11:33:29 2006 @@ -7,7 +7,9 @@ ; RUN: llvm-as < %s | llc -march=arm | grep "adds" | wc -l | grep 1 && ; RUN: llvm-as < %s | llc -march=arm | grep "adcs" | wc -l | grep 1 && ; RUN: llvm-as < %s | llc -march=arm | grep "subs" | wc -l | grep 1 && -; RUN: llvm-as < %s | llc -march=arm | grep "sbcs" | wc -l | grep 1 +; RUN: llvm-as < %s | llc -march=arm | grep "sbcs" | wc -l | grep 1 && +; RUN: llvm-as < %s | llc -march=arm | grep "smull" | wc -l | grep 1 && +; RUN: llvm-as < %s | llc -march=arm | grep "umull" | wc -l | grep 1 long %f1() { entry: @@ -52,3 +54,19 @@ %tmp = sub long %a, %b ret long %tmp } + +long %f(int %a, int %b) { +entry: + %tmp = cast int %a to long + %tmp1 = cast int %b to long + %tmp2 = mul long %tmp1, %tmp + ret long %tmp2 +} + +ulong %g(uint %a, uint %b) { +entry: + %tmp = cast uint %a to ulong + %tmp1 = cast uint %b to ulong + %tmp2 = mul ulong %tmp1, %tmp + ret ulong %tmp2 +} From rafael.espindola at gmail.com Mon Oct 16 12:17:39 2006 From: rafael.espindola at gmail.com (Rafael Espindola) Date: Mon, 16 Oct 2006 12:17:39 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/ARM/ARMInstrInfo.td README.txt Message-ID: <200610161717.k9GHHdXd025908@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/ARM: ARMInstrInfo.td updated: 1.50 -> 1.51 README.txt updated: 1.6 -> 1.7 --- Log message: implement LDRB, LDRSB, LDRH and LDRSH --- Diffs of the changes: (+20 -0) ARMInstrInfo.td | 16 ++++++++++++++++ README.txt | 4 ++++ 2 files changed, 20 insertions(+) Index: llvm/lib/Target/ARM/ARMInstrInfo.td diff -u llvm/lib/Target/ARM/ARMInstrInfo.td:1.50 llvm/lib/Target/ARM/ARMInstrInfo.td:1.51 --- llvm/lib/Target/ARM/ARMInstrInfo.td:1.50 Mon Oct 16 11:33:29 2006 +++ llvm/lib/Target/ARM/ARMInstrInfo.td Mon Oct 16 12:17:21 2006 @@ -113,6 +113,22 @@ "ldr $dst, $addr", [(set IntRegs:$dst, (load iaddr:$addr))]>; +def LDRB : InstARM<(ops IntRegs:$dst, IntRegs:$addr), + "ldrb $dst, $addr", + [(set IntRegs:$dst, (zextloadi8 IntRegs:$addr))]>; + +def LDRSB : InstARM<(ops IntRegs:$dst, IntRegs:$addr), + "ldrsb $dst, $addr", + [(set IntRegs:$dst, (sextloadi8 IntRegs:$addr))]>; + +def LDRH : InstARM<(ops IntRegs:$dst, IntRegs:$addr), + "ldrh $dst, $addr", + [(set IntRegs:$dst, (zextloadi16 IntRegs:$addr))]>; + +def LDRSH : InstARM<(ops IntRegs:$dst, IntRegs:$addr), + "ldrsh $dst, $addr", + [(set IntRegs:$dst, (sextloadi16 IntRegs:$addr))]>; + def str : InstARM<(ops IntRegs:$src, memri:$addr), "str $src, $addr", [(store IntRegs:$src, iaddr:$addr)]>; Index: llvm/lib/Target/ARM/README.txt diff -u llvm/lib/Target/ARM/README.txt:1.6 llvm/lib/Target/ARM/README.txt:1.7 --- llvm/lib/Target/ARM/README.txt:1.6 Mon Oct 16 11:33:29 2006 +++ llvm/lib/Target/ARM/README.txt Mon Oct 16 12:17:21 2006 @@ -51,3 +51,7 @@ should try to declare smull and umull as returning two values. ---------------------------------------------------------- + +Implement addressing modes 2 (ldrb) and 3 (ldrsb) + +---------------------------------------------------------- From rafael.espindola at gmail.com Mon Oct 16 12:17:39 2006 From: rafael.espindola at gmail.com (Rafael Espindola) Date: Mon, 16 Oct 2006 12:17:39 -0500 Subject: [llvm-commits] CVS: llvm/test/Regression/CodeGen/ARM/load.ll Message-ID: <200610161717.k9GHHdMf025909@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/CodeGen/ARM: load.ll added (r1.1) --- Log message: implement LDRB, LDRSB, LDRH and LDRSH --- Diffs of the changes: (+33 -0) load.ll | 33 +++++++++++++++++++++++++++++++++ 1 files changed, 33 insertions(+) Index: llvm/test/Regression/CodeGen/ARM/load.ll diff -c /dev/null llvm/test/Regression/CodeGen/ARM/load.ll:1.1 *** /dev/null Mon Oct 16 12:17:32 2006 --- llvm/test/Regression/CodeGen/ARM/load.ll Mon Oct 16 12:17:22 2006 *************** *** 0 **** --- 1,33 ---- + ; RUN: llvm-as < %s | llc -march=arm && + ; RUN: llvm-as < %s | llc -march=arm | grep ldrsb && + ; RUN: llvm-as < %s | llc -march=arm | grep ldrb && + ; RUN: llvm-as < %s | llc -march=arm | grep ldrsh && + ; RUN: llvm-as < %s | llc -march=arm | grep ldrh + + int %f1(sbyte* %p) { + entry: + %tmp = load sbyte* %p ; [#uses=1] + %tmp = cast sbyte %tmp to int ; [#uses=1] + ret int %tmp + } + + int %f2(ubyte* %p) { + entry: + %tmp = load ubyte* %p ; [#uses=1] + %tmp = cast ubyte %tmp to int ; [#uses=1] + ret int %tmp + } + + int %f3(short* %p) { + entry: + %tmp = load short* %p ; [#uses=1] + %tmp = cast short %tmp to int ; [#uses=1] + ret int %tmp + } + + int %f4(ushort* %p) { + entry: + %tmp = load ushort* %p ; [#uses=1] + %tmp = cast ushort %tmp to int ; [#uses=1] + ret int %tmp + } From rafael.espindola at gmail.com Mon Oct 16 12:38:27 2006 From: rafael.espindola at gmail.com (Rafael Espindola) Date: Mon, 16 Oct 2006 12:38:27 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/ARM/ARMInstrInfo.td Message-ID: <200610161738.k9GHcRlQ007682@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/ARM: ARMInstrInfo.td updated: 1.51 -> 1.52 --- Log message: fix assembly syntax --- Diffs of the changes: (+4 -4) ARMInstrInfo.td | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) Index: llvm/lib/Target/ARM/ARMInstrInfo.td diff -u llvm/lib/Target/ARM/ARMInstrInfo.td:1.51 llvm/lib/Target/ARM/ARMInstrInfo.td:1.52 --- llvm/lib/Target/ARM/ARMInstrInfo.td:1.51 Mon Oct 16 12:17:21 2006 +++ llvm/lib/Target/ARM/ARMInstrInfo.td Mon Oct 16 12:38:12 2006 @@ -114,19 +114,19 @@ [(set IntRegs:$dst, (load iaddr:$addr))]>; def LDRB : InstARM<(ops IntRegs:$dst, IntRegs:$addr), - "ldrb $dst, $addr", + "ldrb $dst, [$addr]", [(set IntRegs:$dst, (zextloadi8 IntRegs:$addr))]>; def LDRSB : InstARM<(ops IntRegs:$dst, IntRegs:$addr), - "ldrsb $dst, $addr", + "ldrsb $dst, [$addr]", [(set IntRegs:$dst, (sextloadi8 IntRegs:$addr))]>; def LDRH : InstARM<(ops IntRegs:$dst, IntRegs:$addr), - "ldrh $dst, $addr", + "ldrh $dst, [$addr]", [(set IntRegs:$dst, (zextloadi16 IntRegs:$addr))]>; def LDRSH : InstARM<(ops IntRegs:$dst, IntRegs:$addr), - "ldrsh $dst, $addr", + "ldrsh $dst, [$addr]", [(set IntRegs:$dst, (sextloadi16 IntRegs:$addr))]>; def str : InstARM<(ops IntRegs:$src, memri:$addr), From rafael.espindola at gmail.com Mon Oct 16 12:57:34 2006 From: rafael.espindola at gmail.com (Rafael Espindola) Date: Mon, 16 Oct 2006 12:57:34 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/ARM/ARMInstrInfo.td Message-ID: <200610161757.k9GHvY6l016568@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/ARM: ARMInstrInfo.td updated: 1.52 -> 1.53 --- Log message: define the IntBinOp class and use it to implement the multiply instructions --- Diffs of the changes: (+13 -12) ARMInstrInfo.td | 25 +++++++++++++------------ 1 files changed, 13 insertions(+), 12 deletions(-) Index: llvm/lib/Target/ARM/ARMInstrInfo.td diff -u llvm/lib/Target/ARM/ARMInstrInfo.td:1.52 llvm/lib/Target/ARM/ARMInstrInfo.td:1.53 --- llvm/lib/Target/ARM/ARMInstrInfo.td:1.52 Mon Oct 16 12:38:12 2006 +++ llvm/lib/Target/ARM/ARMInstrInfo.td Mon Oct 16 12:57:20 2006 @@ -36,9 +36,8 @@ //def raddr : ComplexPattern; //===----------------------------------------------------------------------===// -// Instructions +// Instruction Class Templates //===----------------------------------------------------------------------===// - class InstARM pattern> : Instruction { let Namespace = "ARM"; @@ -47,6 +46,15 @@ let Pattern = pattern; } +class IntBinOp : + InstARM<(ops IntRegs:$dst, IntRegs:$a, IntRegs:$b), + !strconcat(OpcStr, " $dst, $a, $b"), + [(set IntRegs:$dst, (OpNode IntRegs:$a, IntRegs:$b))]>; + +//===----------------------------------------------------------------------===// +// Instructions +//===----------------------------------------------------------------------===// + def brtarget : Operand; // Operand for printing out a condition code. @@ -186,18 +194,11 @@ IntRegs:$false, imm:$cc))]>; } -def MUL : InstARM<(ops IntRegs:$dst, IntRegs:$a, IntRegs:$b), - "mul $dst, $a, $b", - [(set IntRegs:$dst, (mul IntRegs:$a, IntRegs:$b))]>; +def MUL : IntBinOp<"mul", mul>; let Defs = [R0] in { - def SMULL : InstARM<(ops IntRegs:$dst, IntRegs:$a, IntRegs:$b), - "smull r12, $dst, $a, $b", - [(set IntRegs:$dst, (mulhs IntRegs:$a, IntRegs:$b))]>; - - def UMULL : InstARM<(ops IntRegs:$dst, IntRegs:$a, IntRegs:$b), - "umull r12, $dst, $a, $b", - [(set IntRegs:$dst, (mulhu IntRegs:$a, IntRegs:$b))]>; + def SMULL : IntBinOp<"smull r12,", mulhs>; + def UMULL : IntBinOp<"umull r12,", mulhu>; } def bcond : InstARM<(ops brtarget:$dst, CCOp:$cc), From rafael.espindola at gmail.com Mon Oct 16 13:18:29 2006 From: rafael.espindola at gmail.com (Rafael Espindola) Date: Mon, 16 Oct 2006 13:18:29 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/ARM/ARMInstrInfo.td Message-ID: <200610161818.k9GIITJV017015@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/ARM: ARMInstrInfo.td updated: 1.53 -> 1.54 --- Log message: define the Addr1BinOp class --- Diffs of the changes: (+14 -34) ARMInstrInfo.td | 48 ++++++++++++++---------------------------------- 1 files changed, 14 insertions(+), 34 deletions(-) Index: llvm/lib/Target/ARM/ARMInstrInfo.td diff -u llvm/lib/Target/ARM/ARMInstrInfo.td:1.53 llvm/lib/Target/ARM/ARMInstrInfo.td:1.54 --- llvm/lib/Target/ARM/ARMInstrInfo.td:1.53 Mon Oct 16 12:57:20 2006 +++ llvm/lib/Target/ARM/ARMInstrInfo.td Mon Oct 16 13:18:14 2006 @@ -51,6 +51,11 @@ !strconcat(OpcStr, " $dst, $a, $b"), [(set IntRegs:$dst, (OpNode IntRegs:$a, IntRegs:$b))]>; +class Addr1BinOp : + InstARM<(ops IntRegs:$dst, IntRegs:$a, op_addr_mode1:$b), + !strconcat(OpcStr, " $dst, $a, $b"), + [(set IntRegs:$dst, (OpNode IntRegs:$a, addr_mode1:$b))]>; + //===----------------------------------------------------------------------===// // Instructions //===----------------------------------------------------------------------===// @@ -144,17 +149,9 @@ def MOV : InstARM<(ops IntRegs:$dst, op_addr_mode1:$src), "mov $dst, $src", [(set IntRegs:$dst, addr_mode1:$src)]>; -def ADD : InstARM<(ops IntRegs:$dst, IntRegs:$a, op_addr_mode1:$b), - "add $dst, $a, $b", - [(set IntRegs:$dst, (add IntRegs:$a, addr_mode1:$b))]>; - -def ADCS : InstARM<(ops IntRegs:$dst, IntRegs:$a, op_addr_mode1:$b), - "adcs $dst, $a, $b", - [(set IntRegs:$dst, (adde IntRegs:$a, addr_mode1:$b))]>; - -def ADDS : InstARM<(ops IntRegs:$dst, IntRegs:$a, op_addr_mode1:$b), - "adds $dst, $a, $b", - [(set IntRegs:$dst, (addc IntRegs:$a, addr_mode1:$b))]>; +def ADD : Addr1BinOp<"add", add>; +def ADCS : Addr1BinOp<"adcs", adde>; +def ADDS : Addr1BinOp<"adds", addc>; // "LEA" forms of add def lea_addri : InstARM<(ops IntRegs:$dst, memri:$addr), @@ -162,29 +159,12 @@ [(set IntRegs:$dst, iaddr:$addr)]>; -def SUB : InstARM<(ops IntRegs:$dst, IntRegs:$a, op_addr_mode1:$b), - "sub $dst, $a, $b", - [(set IntRegs:$dst, (sub IntRegs:$a, addr_mode1:$b))]>; - -def SBCS : InstARM<(ops IntRegs:$dst, IntRegs:$a, op_addr_mode1:$b), - "sbcs $dst, $a, $b", - [(set IntRegs:$dst, (sube IntRegs:$a, addr_mode1:$b))]>; - -def SUBS : InstARM<(ops IntRegs:$dst, IntRegs:$a, op_addr_mode1:$b), - "subs $dst, $a, $b", - [(set IntRegs:$dst, (subc IntRegs:$a, addr_mode1:$b))]>; - -def AND : InstARM<(ops IntRegs:$dst, IntRegs:$a, op_addr_mode1:$b), - "and $dst, $a, $b", - [(set IntRegs:$dst, (and IntRegs:$a, addr_mode1:$b))]>; - -def EOR : InstARM<(ops IntRegs:$dst, IntRegs:$a, op_addr_mode1:$b), - "eor $dst, $a, $b", - [(set IntRegs:$dst, (xor IntRegs:$a, addr_mode1:$b))]>; - -def ORR : InstARM<(ops IntRegs:$dst, IntRegs:$a, op_addr_mode1:$b), - "orr $dst, $a, $b", - [(set IntRegs:$dst, (or IntRegs:$a, addr_mode1:$b))]>; +def SUB : Addr1BinOp<"sub", sub>; +def SBCS : Addr1BinOp<"sbcs", sube>; +def SUBS : Addr1BinOp<"subs", subc>; +def AND : Addr1BinOp<"and", and>; +def EOR : Addr1BinOp<"eor", xor>; +def ORR : Addr1BinOp<"orr", or>; let isTwoAddress = 1 in { def movcond : InstARM<(ops IntRegs:$dst, IntRegs:$false, From rafael.espindola at gmail.com Mon Oct 16 13:39:37 2006 From: rafael.espindola at gmail.com (Rafael Espindola) Date: Mon, 16 Oct 2006 13:39:37 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/ARM/ARMInstrInfo.td Message-ID: <200610161839.k9GIdbs6017423@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/ARM: ARMInstrInfo.td updated: 1.55 -> 1.56 --- Log message: define the DFPBinOp class --- Diffs of the changes: (+10 -15) ARMInstrInfo.td | 25 ++++++++++--------------- 1 files changed, 10 insertions(+), 15 deletions(-) Index: llvm/lib/Target/ARM/ARMInstrInfo.td diff -u llvm/lib/Target/ARM/ARMInstrInfo.td:1.55 llvm/lib/Target/ARM/ARMInstrInfo.td:1.56 --- llvm/lib/Target/ARM/ARMInstrInfo.td:1.55 Mon Oct 16 13:32:36 2006 +++ llvm/lib/Target/ARM/ARMInstrInfo.td Mon Oct 16 13:39:22 2006 @@ -56,6 +56,11 @@ !strconcat(OpcStr, " $dst, $a, $b"), [(set FPRegs:$dst, (OpNode FPRegs:$a, FPRegs:$b))]>; +class DFPBinOp : + InstARM<(ops DFPRegs:$dst, DFPRegs:$a, DFPRegs:$b), + !strconcat(OpcStr, " $dst, $a, $b"), + [(set DFPRegs:$dst, (OpNode DFPRegs:$a, DFPRegs:$b))]>; + class Addr1BinOp : InstARM<(ops IntRegs:$dst, IntRegs:$a, op_addr_mode1:$b), !strconcat(OpcStr, " $dst, $a, $b"), @@ -256,17 +261,10 @@ def FMSTAT : InstARM<(ops ), "fmstat", [(armfmstat)]>; // Floating Point Arithmetic -def FADDS : FPBinOp<"fadds", fadd>; - -def FADDD : InstARM<(ops DFPRegs:$dst, DFPRegs:$a, DFPRegs:$b), - "faddd $dst, $a, $b", - [(set DFPRegs:$dst, (fadd DFPRegs:$a, DFPRegs:$b))]>; - -def FSUBS : FPBinOp<"fsubs", fsub>; - -def FSUBD : InstARM<(ops DFPRegs:$dst, DFPRegs:$a, DFPRegs:$b), - "fsubd $dst, $a, $b", - [(set DFPRegs:$dst, (fsub DFPRegs:$a, DFPRegs:$b))]>; +def FADDS : FPBinOp<"fadds", fadd>; +def FADDD : DFPBinOp<"faddd", fadd>; +def FSUBS : FPBinOp<"fsubs", fsub>; +def FSUBD : DFPBinOp<"fsubd", fsub>; def FNEGS : InstARM<(ops FPRegs:$dst, FPRegs:$src), "fnegs $dst, $src", @@ -277,10 +275,7 @@ [(set DFPRegs:$dst, (fneg DFPRegs:$src))]>; def FMULS : FPBinOp<"fmuls", fmul>; - -def FMULD : InstARM<(ops DFPRegs:$dst, DFPRegs:$a, DFPRegs:$b), - "fmuld $dst, $a, $b", - [(set DFPRegs:$dst, (fmul DFPRegs:$a, DFPRegs:$b))]>; +def FMULD : DFPBinOp<"fmuld", fmul>; // Floating Point Load From rafael.espindola at gmail.com Mon Oct 16 13:32:50 2006 From: rafael.espindola at gmail.com (Rafael Espindola) Date: Mon, 16 Oct 2006 13:32:50 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/ARM/ARMInstrInfo.td Message-ID: <200610161832.k9GIWo4j017313@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/ARM: ARMInstrInfo.td updated: 1.54 -> 1.55 --- Log message: add the FPBinOp class --- Diffs of the changes: (+8 -9) ARMInstrInfo.td | 17 ++++++++--------- 1 files changed, 8 insertions(+), 9 deletions(-) Index: llvm/lib/Target/ARM/ARMInstrInfo.td diff -u llvm/lib/Target/ARM/ARMInstrInfo.td:1.54 llvm/lib/Target/ARM/ARMInstrInfo.td:1.55 --- llvm/lib/Target/ARM/ARMInstrInfo.td:1.54 Mon Oct 16 13:18:14 2006 +++ llvm/lib/Target/ARM/ARMInstrInfo.td Mon Oct 16 13:32:36 2006 @@ -51,6 +51,11 @@ !strconcat(OpcStr, " $dst, $a, $b"), [(set IntRegs:$dst, (OpNode IntRegs:$a, IntRegs:$b))]>; +class FPBinOp : + InstARM<(ops FPRegs:$dst, FPRegs:$a, FPRegs:$b), + !strconcat(OpcStr, " $dst, $a, $b"), + [(set FPRegs:$dst, (OpNode FPRegs:$a, FPRegs:$b))]>; + class Addr1BinOp : InstARM<(ops IntRegs:$dst, IntRegs:$a, op_addr_mode1:$b), !strconcat(OpcStr, " $dst, $a, $b"), @@ -251,17 +256,13 @@ def FMSTAT : InstARM<(ops ), "fmstat", [(armfmstat)]>; // Floating Point Arithmetic -def FADDS : InstARM<(ops FPRegs:$dst, FPRegs:$a, FPRegs:$b), - "fadds $dst, $a, $b", - [(set FPRegs:$dst, (fadd FPRegs:$a, FPRegs:$b))]>; +def FADDS : FPBinOp<"fadds", fadd>; def FADDD : InstARM<(ops DFPRegs:$dst, DFPRegs:$a, DFPRegs:$b), "faddd $dst, $a, $b", [(set DFPRegs:$dst, (fadd DFPRegs:$a, DFPRegs:$b))]>; -def FSUBS : InstARM<(ops FPRegs:$dst, FPRegs:$a, FPRegs:$b), - "fsubs $dst, $a, $b", - [(set FPRegs:$dst, (fsub FPRegs:$a, FPRegs:$b))]>; +def FSUBS : FPBinOp<"fsubs", fsub>; def FSUBD : InstARM<(ops DFPRegs:$dst, DFPRegs:$a, DFPRegs:$b), "fsubd $dst, $a, $b", @@ -275,9 +276,7 @@ "fnegd $dst, $src", [(set DFPRegs:$dst, (fneg DFPRegs:$src))]>; -def FMULS : InstARM<(ops FPRegs:$dst, FPRegs:$a, FPRegs:$b), - "fmuls $dst, $a, $b", - [(set FPRegs:$dst, (fmul FPRegs:$a, FPRegs:$b))]>; +def FMULS : FPBinOp<"fmuls", fmul>; def FMULD : InstARM<(ops DFPRegs:$dst, DFPRegs:$a, DFPRegs:$b), "fmuld $dst, $a, $b", From jlaskey at apple.com Mon Oct 16 14:38:55 2006 From: jlaskey at apple.com (Jim Laskey) Date: Mon, 16 Oct 2006 14:38:55 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/DwarfWriter.cpp Message-ID: <200610161938.k9GJctTW010043@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: DwarfWriter.cpp updated: 1.79 -> 1.80 --- Log message: Global name regression. --- Diffs of the changes: (+5 -1) DwarfWriter.cpp | 6 +++++- 1 files changed, 5 insertions(+), 1 deletion(-) Index: llvm/lib/CodeGen/DwarfWriter.cpp diff -u llvm/lib/CodeGen/DwarfWriter.cpp:1.79 llvm/lib/CodeGen/DwarfWriter.cpp:1.80 --- llvm/lib/CodeGen/DwarfWriter.cpp:1.79 Fri Oct 13 08:02:19 2006 +++ llvm/lib/CodeGen/DwarfWriter.cpp Mon Oct 16 14:38:41 2006 @@ -1632,11 +1632,15 @@ // Add source line info if available. AddSourceLine(VariableDie, UnitDesc, GVD->getLine()); + + // Work up linkage name. + std::string LinkageName(TAI->getGlobalPrefix()); + LinkageName += GV->getName(); // Add address. DIEBlock *Block = new DIEBlock(); Block->AddUInt(DW_FORM_data1, DW_OP_addr); - Block->AddObjectLabel(DW_FORM_udata, MangledName); + Block->AddObjectLabel(DW_FORM_udata, LinkageName); Block->ComputeSize(*this); VariableDie->AddBlock(DW_AT_location, 0, Block); From sabre at nondot.org Mon Oct 16 15:42:03 2006 From: sabre at nondot.org (Chris Lattner) Date: Mon, 16 Oct 2006 15:42:03 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/CodeGen/MachineJumpTableInfo.h Message-ID: <200610162042.k9GKg3mP015111@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/CodeGen: MachineJumpTableInfo.h updated: 1.3 -> 1.4 --- Log message: add a ReplaceMBBInJumpTables method --- Diffs of the changes: (+12 -0) MachineJumpTableInfo.h | 12 ++++++++++++ 1 files changed, 12 insertions(+) Index: llvm/include/llvm/CodeGen/MachineJumpTableInfo.h diff -u llvm/include/llvm/CodeGen/MachineJumpTableInfo.h:1.3 llvm/include/llvm/CodeGen/MachineJumpTableInfo.h:1.4 --- llvm/include/llvm/CodeGen/MachineJumpTableInfo.h:1.3 Tue May 2 20:29:56 2006 +++ llvm/include/llvm/CodeGen/MachineJumpTableInfo.h Mon Oct 16 15:41:42 2006 @@ -26,6 +26,7 @@ namespace llvm { class MachineBasicBlock; +class TargetData; /// MachineJumpTableEntry - One jump table in the jump table info. /// @@ -54,6 +55,17 @@ return JumpTables; } + /// ReplaceMBBInJumpTables - If Old is the target of any jump tables, update + /// the jump tables to branch to New instead. + void ReplaceMBBInJumpTables(MachineBasicBlock *Old, MachineBasicBlock *New) { + for (unsigned i = 0, e = JumpTables.size(); i != e; ++i) { + MachineJumpTableEntry &JTE = JumpTables[i]; + for (unsigned j = 0, e = JTE.MBBs.size(); j != e; ++j) + if (JTE.MBBs[j] == Old) + JTE.MBBs[j] = New; + } + } + /// getEntrySize - returns the size of an individual field in a jump table unsigned getEntrySize() const; From jlaskey at apple.com Mon Oct 16 15:52:48 2006 From: jlaskey at apple.com (Jim Laskey) Date: Mon, 16 Oct 2006 15:52:48 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp SelectionDAGISel.cpp Message-ID: <200610162052.k9GKqmKA016621@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/SelectionDAG: DAGCombiner.cpp updated: 1.224 -> 1.225 SelectionDAGISel.cpp updated: 1.288 -> 1.289 --- Log message: Pass AliasAnalysis thru to DAGCombiner. --- Diffs of the changes: (+18 -6) DAGCombiner.cpp | 15 +++++++++++---- SelectionDAGISel.cpp | 9 +++++++-- 2 files changed, 18 insertions(+), 6 deletions(-) Index: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp diff -u llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.224 llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.225 --- llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.224 Sat Oct 14 07:14:27 2006 +++ llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Mon Oct 16 15:52:31 2006 @@ -30,6 +30,7 @@ #define DEBUG_TYPE "dagcombine" #include "llvm/ADT/Statistic.h" +#include "llvm/Analysis/AliasAnalysis.h" #include "llvm/CodeGen/SelectionDAG.h" #include "llvm/Support/Debug.h" #include "llvm/Support/MathExtras.h" @@ -60,6 +61,9 @@ // Worklist of all of the nodes that need to be simplified. std::vector WorkList; + // AA - Used for DAG load/store alias analysis. + AliasAnalysis &AA; + /// AddUsersToWorkList - When an instruction is simplified, add all users of /// the instruction to the work lists because they might get more simplified /// now. @@ -262,8 +266,11 @@ SDOperand FindBetterChain(SDNode *N, SDOperand Chain); public: - DAGCombiner(SelectionDAG &D) - : DAG(D), TLI(D.getTargetLoweringInfo()), AfterLegalize(false) {} + DAGCombiner(SelectionDAG &D, AliasAnalysis &A) + : DAG(D), + TLI(D.getTargetLoweringInfo()), + AfterLegalize(false), + AA(A) {} /// Run - runs the dag combiner on all nodes in the work list void Run(bool RunningAfterLegalize); @@ -4133,8 +4140,8 @@ // SelectionDAG::Combine - This is the entry point for the file. // -void SelectionDAG::Combine(bool RunningAfterLegalize) { +void SelectionDAG::Combine(bool RunningAfterLegalize, AliasAnalysis &AA) { /// run - This is the main entry point to this class. /// - DAGCombiner(*this).Run(RunningAfterLegalize); + DAGCombiner(*this, AA).Run(RunningAfterLegalize); } Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.288 llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.289 --- llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.288 Fri Oct 13 16:12:22 2006 +++ llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Mon Oct 16 15:52:31 2006 @@ -12,6 +12,7 @@ //===----------------------------------------------------------------------===// #define DEBUG_TYPE "isel" +#include "llvm/Analysis/AliasAnalysis.h" #include "llvm/CodeGen/SelectionDAGISel.h" #include "llvm/CodeGen/ScheduleDAG.h" #include "llvm/CallingConv.h" @@ -2951,6 +2952,7 @@ void SelectionDAGISel::getAnalysisUsage(AnalysisUsage &AU) const { // FIXME: we only modify the CFG to split critical edges. This // updates dom and loop info. + AU.addRequired(); } @@ -3546,8 +3548,11 @@ } void SelectionDAGISel::CodeGenAndEmitDAG(SelectionDAG &DAG) { + // Get alias analysis for load/store combining. + AliasAnalysis &AA = getAnalysis(); + // Run the DAG combiner in pre-legalize mode. - DAG.Combine(false); + DAG.Combine(false, AA); DEBUG(std::cerr << "Lowered selection DAG:\n"); DEBUG(DAG.dump()); @@ -3560,7 +3565,7 @@ DEBUG(DAG.dump()); // Run the DAG combiner in post-legalize mode. - DAG.Combine(true); + DAG.Combine(true, AA); if (ViewISelDAGs) DAG.viewGraph(); From jlaskey at apple.com Mon Oct 16 15:52:48 2006 From: jlaskey at apple.com (Jim Laskey) Date: Mon, 16 Oct 2006 15:52:48 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAG.h Message-ID: <200610162052.k9GKqmW2016614@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/CodeGen: SelectionDAG.h updated: 1.137 -> 1.138 --- Log message: Pass AliasAnalysis thru to DAGCombiner. --- Diffs of the changes: (+2 -1) SelectionDAG.h | 3 ++- 1 files changed, 2 insertions(+), 1 deletion(-) Index: llvm/include/llvm/CodeGen/SelectionDAG.h diff -u llvm/include/llvm/CodeGen/SelectionDAG.h:1.137 llvm/include/llvm/CodeGen/SelectionDAG.h:1.138 --- llvm/include/llvm/CodeGen/SelectionDAG.h:1.137 Fri Oct 13 19:41:01 2006 +++ llvm/include/llvm/CodeGen/SelectionDAG.h Mon Oct 16 15:52:31 2006 @@ -25,6 +25,7 @@ #include namespace llvm { + class AliasAnalysis; class TargetLowering; class TargetMachine; class MachineDebugInfo; @@ -116,7 +117,7 @@ /// certain types of nodes together, or eliminating superfluous nodes. When /// the AfterLegalize argument is set to 'true', Combine takes care not to /// generate any nodes that will be illegal on the target. - void Combine(bool AfterLegalize); + void Combine(bool AfterLegalize, AliasAnalysis &AA); /// Legalize - This transforms the SelectionDAG into a SelectionDAG that is /// compatible with the target instruction selector, as indicated by the From evan.cheng at apple.com Mon Oct 16 16:00:52 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Mon, 16 Oct 2006 16:00:52 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86Subtarget.cpp X86Subtarget.h Message-ID: <200610162100.k9GL0qrW016815@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: X86Subtarget.cpp updated: 1.36 -> 1.37 X86Subtarget.h updated: 1.19 -> 1.20 --- Log message: Proper fix for rdar://problem/4770604 Thanks to Stuart Hastings! --- Diffs of the changes: (+21 -12) X86Subtarget.cpp | 25 +++++++++++++------------ X86Subtarget.h | 8 ++++++++ 2 files changed, 21 insertions(+), 12 deletions(-) Index: llvm/lib/Target/X86/X86Subtarget.cpp diff -u llvm/lib/Target/X86/X86Subtarget.cpp:1.36 llvm/lib/Target/X86/X86Subtarget.cpp:1.37 --- llvm/lib/Target/X86/X86Subtarget.cpp:1.36 Fri Oct 6 13:57:51 2006 +++ llvm/lib/Target/X86/X86Subtarget.cpp Mon Oct 16 16:00:37 2006 @@ -26,21 +26,22 @@ clEnumValN(X86Subtarget::intel, "intel", " Emit Intel-style assembly"), clEnumValEnd)); + /// GetCpuIDAndInfo - Execute the specified cpuid and return the 4 values in the /// specified arguments. If we can't run cpuid on the host, return true. -static inline bool GetCpuIDAndInfo(unsigned value, unsigned *rEAX, - unsigned *rEBX, unsigned *rECX, - unsigned *rEDX) { +bool X86::GetCpuIDAndInfo(unsigned value, unsigned *rEAX, unsigned *rEBX, + unsigned *rECX, unsigned *rEDX) { #if defined(__x86_64__) - asm ("pushq\t%%rbx\n\t" - "cpuid\n\t" + unsigned long long saveRBX; + asm ("nop" : "=b" (saveRBX)); + asm ("cpuid\n\t" "movl\t%%ebx, %%esi\n\t" - "popq\t%%rbx" : "=a" (*rEAX), "=S" (*rEBX), "=c" (*rECX), "=d" (*rEDX) : "a" (value)); + asm ("nop" :: "b" (saveRBX)); return false; #elif defined(i386) || defined(__i386__) || defined(__x86__) || defined(_M_IX86) #if defined(__GNUC__) @@ -80,30 +81,30 @@ char c[12]; } text; - if (GetCpuIDAndInfo(0, &EAX, text.u+0, text.u+2, text.u+1)) + if (X86::GetCpuIDAndInfo(0, &EAX, text.u+0, text.u+2, text.u+1)) return; // FIXME: support for AMD family of processors. if (memcmp(text.c, "GenuineIntel", 12) == 0) { - GetCpuIDAndInfo(0x1, &EAX, &EBX, &ECX, &EDX); + X86::GetCpuIDAndInfo(0x1, &EAX, &EBX, &ECX, &EDX); if ((EDX >> 23) & 0x1) X86SSELevel = MMX; if ((EDX >> 25) & 0x1) X86SSELevel = SSE1; if ((EDX >> 26) & 0x1) X86SSELevel = SSE2; if (ECX & 0x1) X86SSELevel = SSE3; - GetCpuIDAndInfo(0x80000001, &EAX, &EBX, &ECX, &EDX); + X86::GetCpuIDAndInfo(0x80000001, &EAX, &EBX, &ECX, &EDX); HasX86_64 = (EDX >> 29) & 0x1; } } static const char *GetCurrentX86CPU() { unsigned EAX = 0, EBX = 0, ECX = 0, EDX = 0; - if (GetCpuIDAndInfo(0x1, &EAX, &EBX, &ECX, &EDX)) + if (X86::GetCpuIDAndInfo(0x1, &EAX, &EBX, &ECX, &EDX)) return "generic"; unsigned Family = (EAX >> 8) & 0xf; // Bits 8 - 11 unsigned Model = (EAX >> 4) & 0xf; // Bits 4 - 7 - GetCpuIDAndInfo(0x80000001, &EAX, &EBX, &ECX, &EDX); + X86::GetCpuIDAndInfo(0x80000001, &EAX, &EBX, &ECX, &EDX); bool Em64T = (EDX >> 29) & 0x1; union { @@ -111,7 +112,7 @@ char c[12]; } text; - GetCpuIDAndInfo(0, &EAX, text.u+0, text.u+2, text.u+1); + X86::GetCpuIDAndInfo(0, &EAX, text.u+0, text.u+2, text.u+1); if (memcmp(text.c, "GenuineIntel", 12) == 0) { switch (Family) { case 3: Index: llvm/lib/Target/X86/X86Subtarget.h diff -u llvm/lib/Target/X86/X86Subtarget.h:1.19 llvm/lib/Target/X86/X86Subtarget.h:1.20 --- llvm/lib/Target/X86/X86Subtarget.h:1.19 Fri Oct 6 04:17:41 2006 +++ llvm/lib/Target/X86/X86Subtarget.h Mon Oct 16 16:00:37 2006 @@ -106,6 +106,14 @@ bool isTargetWindows() const { return TargetType == isWindows; } bool isTargetCygwin() const { return TargetType == isCygwin; } }; + +namespace X86 { + /// GetCpuIDAndInfo - Execute the specified cpuid and return the 4 values in + /// the specified arguments. If we can't run cpuid on the host, return true. + bool GetCpuIDAndInfo(unsigned value, unsigned *rEAX, unsigned *rEBX, + unsigned *rECX, unsigned *rEDX); +} + } // End llvm namespace #endif From evan.cheng at apple.com Mon Oct 16 16:02:09 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Mon, 16 Oct 2006 16:02:09 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86JITInfo.cpp Message-ID: <200610162102.k9GL29g7016852@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: X86JITInfo.cpp updated: 1.27 -> 1.28 --- Log message: Added a X86CompilationCallback variant which saves XMM argument registers for targets with SSE. --- Diffs of the changes: (+58 -1) X86JITInfo.cpp | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 58 insertions(+), 1 deletion(-) Index: llvm/lib/Target/X86/X86JITInfo.cpp diff -u llvm/lib/Target/X86/X86JITInfo.cpp:1.27 llvm/lib/Target/X86/X86JITInfo.cpp:1.28 --- llvm/lib/Target/X86/X86JITInfo.cpp:1.27 Fri Sep 8 12:03:56 2006 +++ llvm/lib/Target/X86/X86JITInfo.cpp Mon Oct 16 16:01:55 2006 @@ -14,6 +14,7 @@ #define DEBUG_TYPE "jit" #include "X86JITInfo.h" #include "X86Relocations.h" +#include "X86Subtarget.h" #include "llvm/CodeGen/MachineCodeEmitter.h" #include "llvm/Config/alloca.h" #include @@ -138,6 +139,45 @@ #endif "popl %ebp\n" "ret\n"); + + // Same as X86CompilationCallback but also saves XMM argument registers. + void X86CompilationCallback_SSE(void); + asm( + ".text\n" + ".align 8\n" + ".globl " ASMPREFIX "X86CompilationCallback_SSE\n" + ASMPREFIX "X86CompilationCallback_SSE:\n" + "pushl %ebp\n" + "movl %esp, %ebp\n" // Standard prologue +#if FASTCC_NUM_INT_ARGS_INREGS > 0 + "pushl %eax\n" + "pushl %edx\n" // Save EAX/EDX +#endif + "andl $-16, %esp\n" // Align ESP on 16-byte boundary + // Save all XMM arg registers + "subl $64, %esp\n" + "movaps %xmm0, (%esp)\n" + "movaps %xmm1, 16(%esp)\n" + "movaps %xmm2, 32(%esp)\n" + "movaps %xmm3, 48(%esp)\n" + "subl $16, %esp\n" + "movl 4(%ebp), %eax\n" // Pass prev frame and return address + "movl %eax, 4(%esp)\n" + "movl %ebp, (%esp)\n" + "call " ASMPREFIX "X86CompilationCallback2\n" + "addl $16, %esp\n" + "movaps 48(%esp), %xmm3\n" + "movaps 32(%esp), %xmm2\n" + "movaps 16(%esp), %xmm1\n" + "movaps (%esp), %xmm0\n" + "movl %ebp, %esp\n" // Restore ESP +#if FASTCC_NUM_INT_ARGS_INREGS > 0 + "subl $8, %esp\n" + "popl %edx\n" + "popl %eax\n" +#endif + "popl %ebp\n" + "ret\n"); #else void X86CompilationCallback2(void); @@ -215,13 +255,30 @@ TargetJITInfo::LazyResolverFn X86JITInfo::getLazyResolverFunction(JITCompilerFn F) { JITCompilerFunction = F; + + unsigned EAX = 0, EBX = 0, ECX = 0, EDX = 0; + union { + unsigned u[3]; + char c[12]; + } text; + + if (!X86::GetCpuIDAndInfo(0, &EAX, text.u+0, text.u+2, text.u+1)) { + // FIXME: support for AMD family of processors. + if (memcmp(text.c, "GenuineIntel", 12) == 0) { + X86::GetCpuIDAndInfo(0x1, &EAX, &EBX, &ECX, &EDX); + if ((EDX >> 25) & 0x1) + return X86CompilationCallback_SSE; + } + } + return X86CompilationCallback; } void *X86JITInfo::emitFunctionStub(void *Fn, MachineCodeEmitter &MCE) { // Note, we cast to intptr_t here to silence a -pedantic warning that // complains about casting a function pointer to a normal pointer. - if (Fn != (void*)(intptr_t)X86CompilationCallback) { + if (Fn != (void*)(intptr_t)X86CompilationCallback && + Fn != (void*)(intptr_t)X86CompilationCallback_SSE) { MCE.startFunctionStub(5); MCE.emitByte(0xE9); MCE.emitWordLE((intptr_t)Fn-MCE.getCurrentPCValue()-4); From rafael.espindola at gmail.com Mon Oct 16 16:10:48 2006 From: rafael.espindola at gmail.com (Rafael Espindola) Date: Mon, 16 Oct 2006 16:10:48 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/ARM/ARMAsmPrinter.cpp ARMISelDAGToDAG.cpp ARMInstrInfo.td Message-ID: <200610162110.k9GLAmxp017009@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/ARM: ARMAsmPrinter.cpp updated: 1.22 -> 1.23 ARMISelDAGToDAG.cpp updated: 1.70 -> 1.71 ARMInstrInfo.td updated: 1.56 -> 1.57 --- Log message: expand ISD::SHL_PARTS, ISD::SRA_PARTS and ISD::SRL_PARTS --- Diffs of the changes: (+20 -8) ARMAsmPrinter.cpp | 3 +-- ARMISelDAGToDAG.cpp | 15 +++++++++++---- ARMInstrInfo.td | 10 ++++++++-- 3 files changed, 20 insertions(+), 8 deletions(-) Index: llvm/lib/Target/ARM/ARMAsmPrinter.cpp diff -u llvm/lib/Target/ARM/ARMAsmPrinter.cpp:1.22 llvm/lib/Target/ARM/ARMAsmPrinter.cpp:1.23 --- llvm/lib/Target/ARM/ARMAsmPrinter.cpp:1.22 Wed Oct 4 22:01:21 2006 +++ llvm/lib/Target/ARM/ARMAsmPrinter.cpp Mon Oct 16 16:10:32 2006 @@ -216,8 +216,7 @@ } break; case MachineOperand::MO_ExternalSymbol: - assert(0 && "not implemented"); - abort(); + O << TAI->getGlobalPrefix() << MO.getSymbolName(); break; case MachineOperand::MO_ConstantPoolIndex: O << TAI->getPrivateGlobalPrefix() << "CPI" << getFunctionNumber() Index: llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp diff -u llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp:1.70 llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp:1.71 --- llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp:1.70 Sat Oct 14 12:59:54 2006 +++ llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp Mon Oct 16 16:10:32 2006 @@ -72,6 +72,10 @@ setOperationAction(ISD::BRCOND, MVT::Other, Expand); + setOperationAction(ISD::SHL_PARTS, MVT::i32, Expand); + setOperationAction(ISD::SRA_PARTS, MVT::i32, Expand); + setOperationAction(ISD::SRL_PARTS, MVT::i32, Expand); + setOperationAction(ISD::VASTART, MVT::Other, Custom); setOperationAction(ISD::VAEND, MVT::Other, Expand); @@ -321,11 +325,14 @@ Chain = DAG.getNode(ISD::TokenFactor, MVT::Other, &MemOpChains[0], MemOpChains.size()); - // If the callee is a GlobalAddress/ExternalSymbol node (quite common, every - // direct call is) turn it into a TargetGlobalAddress/TargetExternalSymbol - // node so that legalize doesn't hack it. + // If the callee is a GlobalAddress node (quite common, every direct call is) + // turn it into a TargetGlobalAddress node so that legalize doesn't hack it. + // Likewise ExternalSymbol -> TargetExternalSymbol. + assert(Callee.getValueType() == MVT::i32); if (GlobalAddressSDNode *G = dyn_cast(Callee)) - Callee = DAG.getTargetGlobalAddress(G->getGlobal(), Callee.getValueType()); + Callee = DAG.getTargetGlobalAddress(G->getGlobal(), MVT::i32); + else if (ExternalSymbolSDNode *E = dyn_cast(Callee)) + Callee = DAG.getTargetExternalSymbol(E->getSymbol(), MVT::i32); // If this is a direct call, pass the chain and the callee. assert (Callee.Val); Index: llvm/lib/Target/ARM/ARMInstrInfo.td diff -u llvm/lib/Target/ARM/ARMInstrInfo.td:1.56 llvm/lib/Target/ARM/ARMInstrInfo.td:1.57 --- llvm/lib/Target/ARM/ARMInstrInfo.td:1.56 Mon Oct 16 13:39:22 2006 +++ llvm/lib/Target/ARM/ARMInstrInfo.td Mon Oct 16 16:10:32 2006 @@ -128,8 +128,8 @@ def bx: InstARM<(ops), "bx r14", [(retflag)]>; } -let Defs = [R0, R1, R2, R3, R14] in { - def bl: InstARM<(ops i32imm:$func, variable_ops), "bl $func", [(ARMcall tglobaladdr:$func)]>; +let noResults = 1, Defs = [R0, R1, R2, R3, R14] in { + def bl: InstARM<(ops i32imm:$func, variable_ops), "bl $func", []>; } def ldr : InstARM<(ops IntRegs:$dst, memri:$addr), @@ -286,3 +286,9 @@ def FLDD : InstARM<(ops DFPRegs:$dst, IntRegs:$addr), "fldd $dst, $addr", [(set DFPRegs:$dst, (load IntRegs:$addr))]>; + +def : Pat<(ARMcall tglobaladdr:$dst), + (bl tglobaladdr:$dst)>; + +def : Pat<(ARMcall texternalsym:$dst), + (bl texternalsym:$dst)>; From rafael.espindola at gmail.com Mon Oct 16 16:10:47 2006 From: rafael.espindola at gmail.com (Rafael Espindola) Date: Mon, 16 Oct 2006 16:10:47 -0500 Subject: [llvm-commits] CVS: llvm/test/Regression/CodeGen/ARM/longarith.ll Message-ID: <200610162110.k9GLAlQv016999@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/CodeGen/ARM: longarith.ll added (r1.1) --- Log message: expand ISD::SHL_PARTS, ISD::SRA_PARTS and ISD::SRL_PARTS --- Diffs of the changes: (+24 -0) longarith.ll | 24 ++++++++++++++++++++++++ 1 files changed, 24 insertions(+) Index: llvm/test/Regression/CodeGen/ARM/longarith.ll diff -c /dev/null llvm/test/Regression/CodeGen/ARM/longarith.ll:1.1 *** /dev/null Mon Oct 16 16:10:42 2006 --- llvm/test/Regression/CodeGen/ARM/longarith.ll Mon Oct 16 16:10:32 2006 *************** *** 0 **** --- 1,24 ---- + ; RUN: llvm-as < %s | llc -march=arm && + ; RUN: llvm-as < %s | llc -march=arm | grep __ashldi3 && + ; RUN: llvm-as < %s | llc -march=arm | grep __ashrdi3 && + ; RUN: llvm-as < %s | llc -march=arm | grep __lshrdi3 + uint %f1(ulong %x, ubyte %y) { + entry: + %a = shl ulong %x, ubyte %y + %b = cast ulong %a to uint + ret uint %b + } + + uint %f2(long %x, ubyte %y) { + entry: + %a = shr long %x, ubyte %y + %b = cast long %a to uint + ret uint %b + } + + uint %f3(ulong %x, ubyte %y) { + entry: + %a = shr ulong %x, ubyte %y + %b = cast ulong %a to uint + ret uint %b + } From rafael.espindola at gmail.com Mon Oct 16 16:50:18 2006 From: rafael.espindola at gmail.com (Rafael Espindola) Date: Mon, 16 Oct 2006 16:50:18 -0500 Subject: [llvm-commits] CVS: llvm/test/Regression/CodeGen/ARM/fparith.ll Message-ID: <200610162150.k9GLoIwp017603@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/CodeGen/ARM: fparith.ll updated: 1.3 -> 1.4 --- Log message: add fdivs e fdivd --- Diffs of the changes: (+15 -1) fparith.ll | 16 +++++++++++++++- 1 files changed, 15 insertions(+), 1 deletion(-) Index: llvm/test/Regression/CodeGen/ARM/fparith.ll diff -u llvm/test/Regression/CodeGen/ARM/fparith.ll:1.3 llvm/test/Regression/CodeGen/ARM/fparith.ll:1.4 --- llvm/test/Regression/CodeGen/ARM/fparith.ll:1.3 Fri Oct 13 12:37:35 2006 +++ llvm/test/Regression/CodeGen/ARM/fparith.ll Mon Oct 16 16:50:04 2006 @@ -4,7 +4,9 @@ ; RUN: llvm-as < %s | llc -march=arm | grep fmuls && ; RUN: llvm-as < %s | llc -march=arm | grep fmuld && ; RUN: llvm-as < %s | llc -march=arm | grep fnegs && -; RUN: llvm-as < %s | llc -march=arm | grep fnegd +; RUN: llvm-as < %s | llc -march=arm | grep fnegd && +; RUN: llvm-as < %s | llc -march=arm | grep fdivs && +; RUN: llvm-as < %s | llc -march=arm | grep fdivd float %f1(float %a, float %b) { entry: @@ -53,3 +55,15 @@ %tmp1 = sub double -0.000000e+00, %a ret double %tmp1 } + +float %f9(float %a, float %b) { +entry: + %tmp1 = div float %a, %b + ret float %tmp1 +} + +double %f10(double %a, double %b) { +entry: + %tmp1 = div double %a, %b + ret double %tmp1 +} From rafael.espindola at gmail.com Mon Oct 16 16:50:20 2006 From: rafael.espindola at gmail.com (Rafael Espindola) Date: Mon, 16 Oct 2006 16:50:20 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/ARM/ARMInstrInfo.td Message-ID: <200610162150.k9GLoKHn017608@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/ARM: ARMInstrInfo.td updated: 1.57 -> 1.58 --- Log message: add fdivs e fdivd --- Diffs of the changes: (+2 -1) ARMInstrInfo.td | 3 ++- 1 files changed, 2 insertions(+), 1 deletion(-) Index: llvm/lib/Target/ARM/ARMInstrInfo.td diff -u llvm/lib/Target/ARM/ARMInstrInfo.td:1.57 llvm/lib/Target/ARM/ARMInstrInfo.td:1.58 --- llvm/lib/Target/ARM/ARMInstrInfo.td:1.57 Mon Oct 16 16:10:32 2006 +++ llvm/lib/Target/ARM/ARMInstrInfo.td Mon Oct 16 16:50:04 2006 @@ -276,7 +276,8 @@ def FMULS : FPBinOp<"fmuls", fmul>; def FMULD : DFPBinOp<"fmuld", fmul>; - +def FDIVS : FPBinOp<"fdivs", fdiv>; +def FDIVD : DFPBinOp<"fdivd", fdiv>; // Floating Point Load def FLDS : InstARM<(ops FPRegs:$dst, IntRegs:$addr), From evan.cheng at apple.com Mon Oct 16 17:49:51 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Mon, 16 Oct 2006 17:49:51 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Message-ID: <200610162249.k9GMnpB7018505@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/SelectionDAG: DAGCombiner.cpp updated: 1.225 -> 1.226 --- Log message: Be careful when looking through a vbit_convert. Optimizing this: (vector_shuffle (vbitconvert (vbuildvector (copyfromreg v4f32), 1, v4f32), 4, f32), (undef, undef, undef, undef), (0, 0, 0, 0), 4, f32) to the vbitconvert is a very bad idea. --- Diffs of the changes: (+11 -2) DAGCombiner.cpp | 13 +++++++++++-- 1 files changed, 11 insertions(+), 2 deletions(-) Index: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp diff -u llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.225 llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.226 --- llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.225 Mon Oct 16 15:52:31 2006 +++ llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Mon Oct 16 17:49:37 2006 @@ -3108,8 +3108,17 @@ // all scalar elements the same. if (isSplat) { SDNode *V = N0.Val; - if (V->getOpcode() == ISD::VBIT_CONVERT) - V = V->getOperand(0).Val; + + // If this is a vbit convert that changes the element type of the vector but + // not the number of vector elements, look through it. Be careful not to + // look though conversions that change things like v4f32 to v2f64. + if (V->getOpcode() == ISD::VBIT_CONVERT) { + SDOperand ConvInput = V->getOperand(0); + if (NumElts == + ConvInput.getConstantOperandVal(ConvInput.getNumOperands()-2)) + V = ConvInput.Val; + } + if (V->getOpcode() == ISD::VBUILD_VECTOR) { unsigned NumElems = V->getNumOperands()-2; if (NumElems > BaseIdx) { From evan.cheng at apple.com Mon Oct 16 17:53:42 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Mon, 16 Oct 2006 17:53:42 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86JITInfo.cpp Message-ID: <200610162253.k9GMrgek018579@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: X86JITInfo.cpp updated: 1.28 -> 1.29 --- Log message: Unbreak x86-64 build. --- Diffs of the changes: (+9 -2) X86JITInfo.cpp | 11 +++++++++-- 1 files changed, 9 insertions(+), 2 deletions(-) Index: llvm/lib/Target/X86/X86JITInfo.cpp diff -u llvm/lib/Target/X86/X86JITInfo.cpp:1.28 llvm/lib/Target/X86/X86JITInfo.cpp:1.29 --- llvm/lib/Target/X86/X86JITInfo.cpp:1.28 Mon Oct 16 16:01:55 2006 +++ llvm/lib/Target/X86/X86JITInfo.cpp Mon Oct 16 17:53:28 2006 @@ -256,6 +256,7 @@ X86JITInfo::getLazyResolverFunction(JITCompilerFn F) { JITCompilerFunction = F; +#if !defined(__x86_64__) unsigned EAX = 0, EBX = 0, ECX = 0, EDX = 0; union { unsigned u[3]; @@ -270,6 +271,7 @@ return X86CompilationCallback_SSE; } } +#endif return X86CompilationCallback; } @@ -277,8 +279,13 @@ void *X86JITInfo::emitFunctionStub(void *Fn, MachineCodeEmitter &MCE) { // Note, we cast to intptr_t here to silence a -pedantic warning that // complains about casting a function pointer to a normal pointer. - if (Fn != (void*)(intptr_t)X86CompilationCallback && - Fn != (void*)(intptr_t)X86CompilationCallback_SSE) { +#if defined(__x86_64__) + bool NotCC = Fn != (void*)(intptr_t)X86CompilationCallback; +#else + bool NotCC = (Fn != (void*)(intptr_t)X86CompilationCallback && + Fn != (void*)(intptr_t)X86CompilationCallback_SSE); +#endif + if (NotCC) { MCE.startFunctionStub(5); MCE.emitByte(0xE9); MCE.emitWordLE((intptr_t)Fn-MCE.getCurrentPCValue()-4); From reid at x10sys.com Mon Oct 16 18:08:23 2006 From: reid at x10sys.com (Reid Spencer) Date: Mon, 16 Oct 2006 18:08:23 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp Message-ID: <200610162308.k9GN8N9J018821@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: InstructionCombining.cpp updated: 1.519 -> 1.520 --- Log message: Undo Chris' last patch, it caused a regression. --- Diffs of the changes: (+2 -2) InstructionCombining.cpp | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.519 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.520 --- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.519 Sun Oct 15 17:42:15 2006 +++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp Mon Oct 16 18:08:08 2006 @@ -1970,10 +1970,10 @@ return BinaryOperator::createAnd(Op0, NewNot); } - // -(X sdiv C) -> (X sdiv -C) + // 0 - (X sdiv C) -> (X sdiv -C) if (Op1I->getOpcode() == Instruction::Div) if (ConstantSInt *CSI = dyn_cast(Op0)) - if (!CSI->isNullValue()) + if (CSI->isNullValue()) if (Constant *DivRHS = dyn_cast(Op1I->getOperand(1))) return BinaryOperator::createDiv(Op1I->getOperand(0), ConstantExpr::getNeg(DivRHS)); From evan.cheng at apple.com Mon Oct 16 18:44:22 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Mon, 16 Oct 2006 18:44:22 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86JITInfo.cpp Message-ID: <200610162344.k9GNiMH9024444@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: X86JITInfo.cpp updated: 1.29 -> 1.30 --- Log message: One more try. --- Diffs of the changes: (+6 -4) X86JITInfo.cpp | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-) Index: llvm/lib/Target/X86/X86JITInfo.cpp diff -u llvm/lib/Target/X86/X86JITInfo.cpp:1.29 llvm/lib/Target/X86/X86JITInfo.cpp:1.30 --- llvm/lib/Target/X86/X86JITInfo.cpp:1.29 Mon Oct 16 17:53:28 2006 +++ llvm/lib/Target/X86/X86JITInfo.cpp Mon Oct 16 18:44:08 2006 @@ -256,7 +256,8 @@ X86JITInfo::getLazyResolverFunction(JITCompilerFn F) { JITCompilerFunction = F; -#if !defined(__x86_64__) +#if (defined(__i386__) || defined(i386) || defined(_M_IX86)) && \ + !defined(_MSC_VER) && !defined(__x86_64__) unsigned EAX = 0, EBX = 0, ECX = 0, EDX = 0; union { unsigned u[3]; @@ -279,11 +280,12 @@ void *X86JITInfo::emitFunctionStub(void *Fn, MachineCodeEmitter &MCE) { // Note, we cast to intptr_t here to silence a -pedantic warning that // complains about casting a function pointer to a normal pointer. -#if defined(__x86_64__) - bool NotCC = Fn != (void*)(intptr_t)X86CompilationCallback; -#else +#if (defined(__i386__) || defined(i386) || defined(_M_IX86)) && \ + !defined(_MSC_VER) && !defined(__x86_64__) bool NotCC = (Fn != (void*)(intptr_t)X86CompilationCallback && Fn != (void*)(intptr_t)X86CompilationCallback_SSE); +#else + bool NotCC = Fn != (void*)(intptr_t)X86CompilationCallback; #endif if (NotCC) { MCE.startFunctionStub(5); From evan.cheng at apple.com Mon Oct 16 19:25:03 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Mon, 16 Oct 2006 19:25:03 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86Subtarget.cpp Message-ID: <200610170025.k9H0P3qA025272@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: X86Subtarget.cpp updated: 1.37 -> 1.38 --- Log message: Proper fix. --- Diffs of the changes: (+4 -5) X86Subtarget.cpp | 9 ++++----- 1 files changed, 4 insertions(+), 5 deletions(-) Index: llvm/lib/Target/X86/X86Subtarget.cpp diff -u llvm/lib/Target/X86/X86Subtarget.cpp:1.37 llvm/lib/Target/X86/X86Subtarget.cpp:1.38 --- llvm/lib/Target/X86/X86Subtarget.cpp:1.37 Mon Oct 16 16:00:37 2006 +++ llvm/lib/Target/X86/X86Subtarget.cpp Mon Oct 16 19:24:49 2006 @@ -32,16 +32,15 @@ bool X86::GetCpuIDAndInfo(unsigned value, unsigned *rEAX, unsigned *rEBX, unsigned *rECX, unsigned *rEDX) { #if defined(__x86_64__) - unsigned long long saveRBX; - asm ("nop" : "=b" (saveRBX)); - asm ("cpuid\n\t" - "movl\t%%ebx, %%esi\n\t" + // gcc doesn't know cpuid would clobber ebx/rbx. Preseve it manually. + asm ("movq\t%%rbx, %%rsi\n\t" + "cpuid\n\t" + "xchgq\t%%rbx, %%rsi\n\t" : "=a" (*rEAX), "=S" (*rEBX), "=c" (*rECX), "=d" (*rEDX) : "a" (value)); - asm ("nop" :: "b" (saveRBX)); return false; #elif defined(i386) || defined(__i386__) || defined(__x86__) || defined(_M_IX86) #if defined(__GNUC__) From jlaskey at apple.com Tue Oct 17 06:31:11 2006 From: jlaskey at apple.com (Jim Laskey) Date: Tue, 17 Oct 2006 06:31:11 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cpp Message-ID: <200610171131.k9HBVBhH012479@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/PowerPC: PPCTargetAsmInfo.cpp updated: 1.6 -> 1.7 --- Log message: Use S_debug for dwarf info. --- Diffs of the changes: (+11 -11) PPCTargetAsmInfo.cpp | 22 +++++++++++----------- 1 files changed, 11 insertions(+), 11 deletions(-) Index: llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cpp diff -u llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cpp:1.6 llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cpp:1.7 --- llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cpp:1.6 Wed Oct 4 22:13:59 2006 +++ llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cpp Tue Oct 17 06:30:57 2006 @@ -37,16 +37,16 @@ NeedsSet = true; AddressSize = isPPC64 ? 8 : 4; - DwarfAbbrevSection = ".section __DWARF,__debug_abbrev"; - DwarfInfoSection = ".section __DWARF,__debug_info"; - DwarfLineSection = ".section __DWARF,__debug_line"; - DwarfFrameSection = ".section __DWARF,__debug_frame"; - DwarfPubNamesSection = ".section __DWARF,__debug_pubnames"; - DwarfPubTypesSection = ".section __DWARF,__debug_pubtypes"; - DwarfStrSection = ".section __DWARF,__debug_str"; - DwarfLocSection = ".section __DWARF,__debug_loc"; - DwarfARangesSection = ".section __DWARF,__debug_aranges"; - DwarfRangesSection = ".section __DWARF,__debug_ranges"; - DwarfMacInfoSection = ".section __DWARF,__debug_macinfo"; + DwarfAbbrevSection = ".section __DWARF,__debug_abbrev,regular,debug"; + DwarfInfoSection = ".section __DWARF,__debug_info,regular,debug"; + DwarfLineSection = ".section __DWARF,__debug_line,regular,debug"; + DwarfFrameSection = ".section __DWARF,__debug_frame,regular,debug"; + DwarfPubNamesSection = ".section __DWARF,__debug_pubnames,regular,debug"; + DwarfPubTypesSection = ".section __DWARF,__debug_pubtypes,regular,debug"; + DwarfStrSection = ".section __DWARF,__debug_str,regular,debug"; + DwarfLocSection = ".section __DWARF,__debug_loc,regular,debug"; + DwarfARangesSection = ".section __DWARF,__debug_aranges,regular,debug"; + DwarfRangesSection = ".section __DWARF,__debug_ranges,regular,debug"; + DwarfMacInfoSection = ".section __DWARF,__debug_macinfo,regular,debug"; } From rafael.espindola at gmail.com Tue Oct 17 08:13:37 2006 From: rafael.espindola at gmail.com (Rafael Espindola) Date: Tue, 17 Oct 2006 08:13:37 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/ARM/ARMInstrInfo.td ARMRegisterInfo.cpp Message-ID: <200610171313.k9HDDbRM014023@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/ARM: ARMInstrInfo.td updated: 1.58 -> 1.59 ARMRegisterInfo.cpp updated: 1.20 -> 1.21 --- Log message: add FCPYS and FCPYD --- Diffs of the changes: (+16 -3) ARMInstrInfo.td | 5 +++++ ARMRegisterInfo.cpp | 14 +++++++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) Index: llvm/lib/Target/ARM/ARMInstrInfo.td diff -u llvm/lib/Target/ARM/ARMInstrInfo.td:1.58 llvm/lib/Target/ARM/ARMInstrInfo.td:1.59 --- llvm/lib/Target/ARM/ARMInstrInfo.td:1.58 Mon Oct 16 16:50:04 2006 +++ llvm/lib/Target/ARM/ARMInstrInfo.td Tue Oct 17 08:13:23 2006 @@ -212,6 +212,11 @@ "fcmpd $a, $b", [(armcmp DFPRegs:$a, DFPRegs:$b)]>; +// Floating Point Copy +def FCPYS : InstARM<(ops FPRegs:$dst, FPRegs:$src), "fcpys $dst, $src", []>; + +def FCPYD : InstARM<(ops DFPRegs:$dst, DFPRegs:$src), "fcpyd $dst, $src", []>; + // Floating Point Conversion // We use bitconvert for moving the data between the register classes. // The format conversion is done with ARM specific nodes Index: llvm/lib/Target/ARM/ARMRegisterInfo.cpp diff -u llvm/lib/Target/ARM/ARMRegisterInfo.cpp:1.20 llvm/lib/Target/ARM/ARMRegisterInfo.cpp:1.21 --- llvm/lib/Target/ARM/ARMRegisterInfo.cpp:1.20 Fri Oct 6 09:29:47 2006 +++ llvm/lib/Target/ARM/ARMRegisterInfo.cpp Tue Oct 17 08:13:23 2006 @@ -47,9 +47,17 @@ MachineBasicBlock::iterator I, unsigned DestReg, unsigned SrcReg, const TargetRegisterClass *RC) const { - assert (RC == ARM::IntRegsRegisterClass); - BuildMI(MBB, I, ARM::MOV, 3, DestReg).addReg(SrcReg).addImm(0) - .addImm(ARMShift::LSL); + assert(RC == ARM::IntRegsRegisterClass || + RC == ARM::FPRegsRegisterClass || + RC == ARM::DFPRegsRegisterClass); + + if (RC == ARM::IntRegsRegisterClass) + BuildMI(MBB, I, ARM::MOV, 3, DestReg).addReg(SrcReg).addImm(0) + .addImm(ARMShift::LSL); + else if (RC == ARM::FPRegsRegisterClass) + BuildMI(MBB, I, ARM::FCPYS, 1, DestReg).addReg(SrcReg); + else + BuildMI(MBB, I, ARM::FCPYD, 1, DestReg).addReg(SrcReg); } MachineInstr *ARMRegisterInfo::foldMemoryOperand(MachineInstr* MI, From rafael.espindola at gmail.com Tue Oct 17 08:36:22 2006 From: rafael.espindola at gmail.com (Rafael Espindola) Date: Tue, 17 Oct 2006 08:36:22 -0500 Subject: [llvm-commits] CVS: llvm/test/Regression/CodeGen/ARM/fp.ll Message-ID: <200610171336.k9HDaMQ0014361@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/CodeGen/ARM: fp.ll updated: 1.8 -> 1.9 --- Log message: add FSTD and FSTS --- Diffs of the changes: (+16 -2) fp.ll | 18 ++++++++++++++++-- 1 files changed, 16 insertions(+), 2 deletions(-) Index: llvm/test/Regression/CodeGen/ARM/fp.ll diff -u llvm/test/Regression/CodeGen/ARM/fp.ll:1.8 llvm/test/Regression/CodeGen/ARM/fp.ll:1.9 --- llvm/test/Regression/CodeGen/ARM/fp.ll:1.8 Sat Oct 7 09:24:52 2006 +++ llvm/test/Regression/CodeGen/ARM/fp.ll Tue Oct 17 08:36:07 2006 @@ -1,12 +1,14 @@ ; RUN: llvm-as < %s | llc -march=arm && -; RUN: llvm-as < %s | llc -march=arm | grep fmsr | wc -l | grep 4 && +; RUN: llvm-as < %s | llc -march=arm | grep fmsr | wc -l | grep 5 && ; RUN: llvm-as < %s | llc -march=arm | grep fsitos && ; RUN: llvm-as < %s | llc -march=arm | grep fmrs && ; RUN: llvm-as < %s | llc -march=arm | grep fsitod && ; RUN: llvm-as < %s | llc -march=arm | grep fmrrd | wc -l | grep 5 && -; RUN: llvm-as < %s | llc -march=arm | grep fmdrr | wc -l | grep 2 && +; RUN: llvm-as < %s | llc -march=arm | grep fmdrr | wc -l | grep 3 && ; RUN: llvm-as < %s | llc -march=arm | grep fldd && ; RUN: llvm-as < %s | llc -march=arm | grep flds && +; RUN: llvm-as < %s | llc -march=arm | grep fstd && +; RUN: llvm-as < %s | llc -march=arm | grep fsts && ; RUN: llvm-as < %s | llc -march=arm | grep fuitod && ; RUN: llvm-as < %s | llc -march=arm | grep fuitos && ; RUN: llvm-as < %s | llc -march=arm | grep ".word.*1065353216" @@ -60,3 +62,15 @@ declare void %f4(double) declare double %f5() + +void %f6(float %a, float* %b) { +entry: + store float %a, float* %b + ret void +} + +void %f7(double %a, double* %b) { +entry: + store double %a, double* %b + ret void +} From rafael.espindola at gmail.com Tue Oct 17 08:36:23 2006 From: rafael.espindola at gmail.com (Rafael Espindola) Date: Tue, 17 Oct 2006 08:36:23 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/ARM/ARMInstrInfo.td README.txt Message-ID: <200610171336.k9HDaNCJ014369@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/ARM: ARMInstrInfo.td updated: 1.59 -> 1.60 README.txt updated: 1.7 -> 1.8 --- Log message: add FSTD and FSTS --- Diffs of the changes: (+12 -3) ARMInstrInfo.td | 13 +++++++++++-- README.txt | 2 +- 2 files changed, 12 insertions(+), 3 deletions(-) Index: llvm/lib/Target/ARM/ARMInstrInfo.td diff -u llvm/lib/Target/ARM/ARMInstrInfo.td:1.59 llvm/lib/Target/ARM/ARMInstrInfo.td:1.60 --- llvm/lib/Target/ARM/ARMInstrInfo.td:1.59 Tue Oct 17 08:13:23 2006 +++ llvm/lib/Target/ARM/ARMInstrInfo.td Tue Oct 17 08:36:07 2006 @@ -286,13 +286,22 @@ // Floating Point Load def FLDS : InstARM<(ops FPRegs:$dst, IntRegs:$addr), - "flds $dst, $addr", + "flds $dst, [$addr]", [(set FPRegs:$dst, (load IntRegs:$addr))]>; def FLDD : InstARM<(ops DFPRegs:$dst, IntRegs:$addr), - "fldd $dst, $addr", + "fldd $dst, [$addr]", [(set DFPRegs:$dst, (load IntRegs:$addr))]>; +// Floating Point Store +def FSTS : InstARM<(ops FPRegs:$src, IntRegs:$addr), + "fsts $src, [$addr]", + [(store FPRegs:$src, IntRegs:$addr)]>; + +def FSTD : InstARM<(ops DFPRegs:$src, IntRegs:$addr), + "fstd $src, [$addr]", + [(store DFPRegs:$src, IntRegs:$addr)]>; + def : Pat<(ARMcall tglobaladdr:$dst), (bl tglobaladdr:$dst)>; Index: llvm/lib/Target/ARM/README.txt diff -u llvm/lib/Target/ARM/README.txt:1.7 llvm/lib/Target/ARM/README.txt:1.8 --- llvm/lib/Target/ARM/README.txt:1.7 Mon Oct 16 12:17:21 2006 +++ llvm/lib/Target/ARM/README.txt Tue Oct 17 08:36:07 2006 @@ -29,7 +29,7 @@ ---------------------------------------------------------- -add an offset to FLDS/FLDD addressing mode +add an offset to FLDS/FLDD/FSTD/FSTS addressing mode ---------------------------------------------------------- From jlaskey at apple.com Tue Oct 17 08:41:24 2006 From: jlaskey at apple.com (Jim Laskey) Date: Tue, 17 Oct 2006 08:41:24 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/AsmPrinter.cpp DwarfWriter.cpp Message-ID: <200610171341.k9HDfOCs014466@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: AsmPrinter.cpp updated: 1.109 -> 1.110 DwarfWriter.cpp updated: 1.80 -> 1.81 --- Log message: Basic support for getGlobalLinkName. --- Diffs of the changes: (+12 -2) AsmPrinter.cpp | 10 ++++++++++ DwarfWriter.cpp | 4 ++-- 2 files changed, 12 insertions(+), 2 deletions(-) Index: llvm/lib/CodeGen/AsmPrinter.cpp diff -u llvm/lib/CodeGen/AsmPrinter.cpp:1.109 llvm/lib/CodeGen/AsmPrinter.cpp:1.110 --- llvm/lib/CodeGen/AsmPrinter.cpp:1.109 Tue Oct 10 23:29:42 2006 +++ llvm/lib/CodeGen/AsmPrinter.cpp Tue Oct 17 08:41:07 2006 @@ -349,6 +349,16 @@ return Alignment; } +/// getGlobalLinkName - Returns the asm/link name of of the specified +/// global variable. Should be overridden by each target asm printer to +/// generate the appropriate value. +void AsmPrinter::getGlobalLinkName(const GlobalVariable *GV, + std::string &LinkName) { + // Default action is to use a global symbol. + LinkName = TAI->getGlobalPrefix(); + LinkName += GV->getName(); +} + // EmitAlignment - Emit an alignment directive to the specified power of two. void AsmPrinter::EmitAlignment(unsigned NumBits, const GlobalValue *GV) const { if (GV && GV->getAlignment()) Index: llvm/lib/CodeGen/DwarfWriter.cpp diff -u llvm/lib/CodeGen/DwarfWriter.cpp:1.80 llvm/lib/CodeGen/DwarfWriter.cpp:1.81 --- llvm/lib/CodeGen/DwarfWriter.cpp:1.80 Mon Oct 16 14:38:41 2006 +++ llvm/lib/CodeGen/DwarfWriter.cpp Tue Oct 17 08:41:07 2006 @@ -1634,8 +1634,8 @@ AddSourceLine(VariableDie, UnitDesc, GVD->getLine()); // Work up linkage name. - std::string LinkageName(TAI->getGlobalPrefix()); - LinkageName += GV->getName(); + std::string LinkageName; + Asm->getGlobalLinkName(GV, LinkageName); // Add address. DIEBlock *Block = new DIEBlock(); From jlaskey at apple.com Tue Oct 17 08:41:24 2006 From: jlaskey at apple.com (Jim Laskey) Date: Tue, 17 Oct 2006 08:41:24 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/CodeGen/AsmPrinter.h Message-ID: <200610171341.k9HDfOwW014472@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/CodeGen: AsmPrinter.h updated: 1.52 -> 1.53 --- Log message: Basic support for getGlobalLinkName. --- Diffs of the changes: (+8 -1) AsmPrinter.h | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletion(-) Index: llvm/include/llvm/CodeGen/AsmPrinter.h diff -u llvm/include/llvm/CodeGen/AsmPrinter.h:1.52 llvm/include/llvm/CodeGen/AsmPrinter.h:1.53 --- llvm/include/llvm/CodeGen/AsmPrinter.h:1.52 Wed Oct 4 22:00:37 2006 +++ llvm/include/llvm/CodeGen/AsmPrinter.h Tue Oct 17 08:41:07 2006 @@ -99,6 +99,13 @@ /// specified global, returned in log form. This includes an explicitly /// requested alignment (if the global has one). unsigned getPreferredAlignmentLog(const GlobalVariable *GV) const; + + /// getGlobalLinkName - Returns the asm/link name of of the specified + /// global variable. Should be overridden by each target asm printer to + /// generate the appropriate value. + virtual void getGlobalLinkName(const GlobalVariable *GV, + std::string &LinkName); + protected: /// doInitialization - Set up the AsmPrinter when we are working on a new /// module. If your pass overrides this, it must make sure to explicitly @@ -167,7 +174,7 @@ /// special global used by LLVM. If so, emit it and return true, otherwise /// do nothing and return false. bool EmitSpecialLLVMGlobal(const GlobalVariable *GV); - + /// EmitAlignment - Emit an alignment directive to the specified power of /// two boundary. For example, if you pass in 3 here, you will get an 8 /// byte alignment. If a global value is specified, and if that global has From rafael.espindola at gmail.com Tue Oct 17 09:34:16 2006 From: rafael.espindola at gmail.com (Rafael Espindola) Date: Tue, 17 Oct 2006 09:34:16 -0500 Subject: [llvm-commits] CVS: llvm/test/Regression/CodeGen/ARM/long.ll Message-ID: <200610171434.k9HEYG1r015211@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/CodeGen/ARM: long.ll updated: 1.6 -> 1.7 --- Log message: add the immediate to the Offset in eliminateFrameIndex --- Diffs of the changes: (+7 -0) long.ll | 7 +++++++ 1 files changed, 7 insertions(+) Index: llvm/test/Regression/CodeGen/ARM/long.ll diff -u llvm/test/Regression/CodeGen/ARM/long.ll:1.6 llvm/test/Regression/CodeGen/ARM/long.ll:1.7 --- llvm/test/Regression/CodeGen/ARM/long.ll:1.6 Mon Oct 16 11:33:29 2006 +++ llvm/test/Regression/CodeGen/ARM/long.ll Tue Oct 17 09:34:02 2006 @@ -70,3 +70,10 @@ %tmp2 = mul ulong %tmp1, %tmp ret ulong %tmp2 } + +ulong %f10() { +entry: + %a = alloca ulong, align 8 + %retval = load ulong* %a + ret ulong %retval +} From rafael.espindola at gmail.com Tue Oct 17 09:34:17 2006 From: rafael.espindola at gmail.com (Rafael Espindola) Date: Tue, 17 Oct 2006 09:34:17 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/ARM/ARMRegisterInfo.cpp Message-ID: <200610171434.k9HEYHDk015216@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/ARM: ARMRegisterInfo.cpp updated: 1.21 -> 1.22 --- Log message: add the immediate to the Offset in eliminateFrameIndex --- Diffs of the changes: (+2 -2) ARMRegisterInfo.cpp | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/lib/Target/ARM/ARMRegisterInfo.cpp diff -u llvm/lib/Target/ARM/ARMRegisterInfo.cpp:1.21 llvm/lib/Target/ARM/ARMRegisterInfo.cpp:1.22 --- llvm/lib/Target/ARM/ARMRegisterInfo.cpp:1.21 Tue Oct 17 08:13:23 2006 +++ llvm/lib/Target/ARM/ARMRegisterInfo.cpp Tue Oct 17 09:34:02 2006 @@ -106,8 +106,8 @@ int FrameIndex = MI.getOperand(FrameIdx).getFrameIndex(); - int Offset = MF.getFrameInfo()->getObjectOffset(FrameIndex); - assert (MI.getOperand(OffIdx).getImmedValue() == 0); + int Offset = MF.getFrameInfo()->getObjectOffset(FrameIndex) + + MI.getOperand(OffIdx).getImmedValue(); unsigned StackSize = MF.getFrameInfo()->getStackSize(); From evan.cheng at apple.com Tue Oct 17 12:06:56 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 17 Oct 2006 12:06:56 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Message-ID: <200610171706.k9HH6uAU025326@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/SelectionDAG: DAGCombiner.cpp updated: 1.226 -> 1.227 --- Log message: Make sure operand does have size and element type operands. --- Diffs of the changes: (+2 -1) DAGCombiner.cpp | 3 ++- 1 files changed, 2 insertions(+), 1 deletion(-) Index: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp diff -u llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.226 llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.227 --- llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.226 Mon Oct 16 17:49:37 2006 +++ llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Tue Oct 17 12:06:35 2006 @@ -3114,7 +3114,8 @@ // look though conversions that change things like v4f32 to v2f64. if (V->getOpcode() == ISD::VBIT_CONVERT) { SDOperand ConvInput = V->getOperand(0); - if (NumElts == + if (ConvInput.getValueType() == MVT::Vector && + NumElts == ConvInput.getConstantOperandVal(ConvInput.getNumOperands()-2)) V = ConvInput.Val; } From sabre at nondot.org Tue Oct 17 12:14:07 2006 From: sabre at nondot.org (Chris Lattner) Date: Tue, 17 Oct 2006 12:14:07 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/BranchFolding.cpp Message-ID: <200610171714.k9HHE7SW026298@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: BranchFolding.cpp updated: 1.11 -> 1.12 --- Log message: Reenable this pass, fixing the bugs in it. It now correctly deletes unreachable blocks and blocks that are empty. --- Diffs of the changes: (+32 -23) BranchFolding.cpp | 55 +++++++++++++++++++++++++++++++----------------------- 1 files changed, 32 insertions(+), 23 deletions(-) Index: llvm/lib/CodeGen/BranchFolding.cpp diff -u llvm/lib/CodeGen/BranchFolding.cpp:1.11 llvm/lib/CodeGen/BranchFolding.cpp:1.12 --- llvm/lib/CodeGen/BranchFolding.cpp:1.11 Fri Oct 13 19:30:06 2006 +++ llvm/lib/CodeGen/BranchFolding.cpp Tue Oct 17 12:13:52 2006 @@ -18,6 +18,7 @@ #include "llvm/CodeGen/Passes.h" #include "llvm/CodeGen/MachineFunctionPass.h" +#include "llvm/CodeGen/MachineJumpTableInfo.h" #include "llvm/Target/TargetInstrInfo.h" #include "llvm/Target/TargetMachine.h" #include "llvm/ADT/STLExtras.h" @@ -36,39 +37,39 @@ FunctionPass *llvm::createBranchFoldingPass() { return new BranchFolder(); } +/// RemoveDeadBlock - Remove the specified dead machine basic block from the +/// function, updating the CFG. +static void RemoveDeadBlock(MachineBasicBlock *MBB) { + assert(MBB->pred_empty() && "MBB must be dead!"); + MachineFunction *MF = MBB->getParent(); + // drop all successors. + while (!MBB->succ_empty()) + MBB->removeSuccessor(MBB->succ_end()-1); + // Remove the block. + MF->getBasicBlockList().erase(MBB); +} + bool BranchFolder::runOnMachineFunction(MachineFunction &MF) { TII = MF.getTarget().getInstrInfo(); if (!TII) return false; - - // DISABLED FOR NOW. - return false; - //MF.dump(); bool EverMadeChange = false; MadeChange = true; while (MadeChange) { MadeChange = false; - for (MachineFunction::iterator MBB = ++MF.begin(), E = MF.end(); MBB != E; - ++MBB) - OptimizeBlock(MBB); - // If branches were folded away somehow, do a quick scan and delete any dead - // blocks. - if (MadeChange) { - for (MachineFunction::iterator I = ++MF.begin(), E = MF.end(); I != E; ) { - MachineBasicBlock *MBB = I++; - // Is it dead? - if (MBB->pred_empty()) { - // drop all successors. - while (!MBB->succ_empty()) - MBB->removeSuccessor(MBB->succ_end()-1); - MF.getBasicBlockList().erase(MBB); - } + for (MachineFunction::iterator I = ++MF.begin(), E = MF.end(); I != E; ) { + MachineBasicBlock *MBB = I++; + OptimizeBlock(MBB); + + // If it is dead, remove it. + if (MBB->pred_empty()) { + RemoveDeadBlock(MBB); + MadeChange = true; } - } - + } EverMadeChange |= MadeChange; } @@ -115,14 +116,22 @@ MachineFunction::iterator FallThrough = next(MBB); - if (FallThrough != MBB->getParent()->end()) { + if (FallThrough == MBB->getParent()->end()) { + // TODO: Simplify preds to not branch here if possible! + } else { + // Rewrite all predecessors of the old block to go to the fallthrough + // instead. while (!MBB->pred_empty()) { MachineBasicBlock *Pred = *(MBB->pred_end()-1); ReplaceUsesOfBlockWith(Pred, MBB, FallThrough, TII); } + + // If MBB was the target of a jump table, update jump tables to go to the + // fallthrough instead. + MBB->getParent()->getJumpTableInfo()->ReplaceMBBInJumpTables(MBB, + FallThrough); MadeChange = true; } - // TODO: CHANGE STUFF TO NOT BRANCH HERE! return; } From jlaskey at apple.com Tue Oct 17 12:17:41 2006 From: jlaskey at apple.com (Jim Laskey) Date: Tue, 17 Oct 2006 12:17:41 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/CodeGen/AsmPrinter.h Message-ID: <200610171717.k9HHHfhr000865@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/CodeGen: AsmPrinter.h updated: 1.53 -> 1.54 --- Log message: Clean up interface to getGlobalLinkName. --- Diffs of the changes: (+1 -2) AsmPrinter.h | 3 +-- 1 files changed, 1 insertion(+), 2 deletions(-) Index: llvm/include/llvm/CodeGen/AsmPrinter.h diff -u llvm/include/llvm/CodeGen/AsmPrinter.h:1.53 llvm/include/llvm/CodeGen/AsmPrinter.h:1.54 --- llvm/include/llvm/CodeGen/AsmPrinter.h:1.53 Tue Oct 17 08:41:07 2006 +++ llvm/include/llvm/CodeGen/AsmPrinter.h Tue Oct 17 12:17:24 2006 @@ -103,8 +103,7 @@ /// getGlobalLinkName - Returns the asm/link name of of the specified /// global variable. Should be overridden by each target asm printer to /// generate the appropriate value. - virtual void getGlobalLinkName(const GlobalVariable *GV, - std::string &LinkName); + virtual const std::string getGlobalLinkName(const GlobalVariable *GV) const; protected: /// doInitialization - Set up the AsmPrinter when we are working on a new From jlaskey at apple.com Tue Oct 17 12:17:43 2006 From: jlaskey at apple.com (Jim Laskey) Date: Tue, 17 Oct 2006 12:17:43 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/AsmPrinter.cpp DwarfWriter.cpp Message-ID: <200610171717.k9HHHh25000903@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: AsmPrinter.cpp updated: 1.110 -> 1.111 DwarfWriter.cpp updated: 1.81 -> 1.82 --- Log message: Clean up interface to getGlobalLinkName. --- Diffs of the changes: (+4 -4) AsmPrinter.cpp | 5 +++-- DwarfWriter.cpp | 3 +-- 2 files changed, 4 insertions(+), 4 deletions(-) Index: llvm/lib/CodeGen/AsmPrinter.cpp diff -u llvm/lib/CodeGen/AsmPrinter.cpp:1.110 llvm/lib/CodeGen/AsmPrinter.cpp:1.111 --- llvm/lib/CodeGen/AsmPrinter.cpp:1.110 Tue Oct 17 08:41:07 2006 +++ llvm/lib/CodeGen/AsmPrinter.cpp Tue Oct 17 12:17:24 2006 @@ -352,11 +352,12 @@ /// getGlobalLinkName - Returns the asm/link name of of the specified /// global variable. Should be overridden by each target asm printer to /// generate the appropriate value. -void AsmPrinter::getGlobalLinkName(const GlobalVariable *GV, - std::string &LinkName) { +const std::string AsmPrinter::getGlobalLinkName(const GlobalVariable *GV) const{ + std::string LinkName; // Default action is to use a global symbol. LinkName = TAI->getGlobalPrefix(); LinkName += GV->getName(); + return LinkName; } // EmitAlignment - Emit an alignment directive to the specified power of two. Index: llvm/lib/CodeGen/DwarfWriter.cpp diff -u llvm/lib/CodeGen/DwarfWriter.cpp:1.81 llvm/lib/CodeGen/DwarfWriter.cpp:1.82 --- llvm/lib/CodeGen/DwarfWriter.cpp:1.81 Tue Oct 17 08:41:07 2006 +++ llvm/lib/CodeGen/DwarfWriter.cpp Tue Oct 17 12:17:24 2006 @@ -1634,8 +1634,7 @@ AddSourceLine(VariableDie, UnitDesc, GVD->getLine()); // Work up linkage name. - std::string LinkageName; - Asm->getGlobalLinkName(GV, LinkageName); + const std::string LinkageName = Asm->getGlobalLinkName(GV); // Add address. DIEBlock *Block = new DIEBlock(); From rafael.espindola at gmail.com Tue Oct 17 13:05:11 2006 From: rafael.espindola at gmail.com (Rafael Espindola) Date: Tue, 17 Oct 2006 13:05:11 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/ARM/ARMAsmPrinter.cpp ARMISelDAGToDAG.cpp ARMInstrInfo.td Message-ID: <200610171805.k9HI5BUB027673@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/ARM: ARMAsmPrinter.cpp updated: 1.23 -> 1.24 ARMISelDAGToDAG.cpp updated: 1.71 -> 1.72 ARMInstrInfo.td updated: 1.60 -> 1.61 --- Log message: initial implementation of addressing mode 5 --- Diffs of the changes: (+48 -11) ARMAsmPrinter.cpp | 19 +++++++++++++++++++ ARMISelDAGToDAG.cpp | 9 +++++++++ ARMInstrInfo.td | 31 ++++++++++++++++++++----------- 3 files changed, 48 insertions(+), 11 deletions(-) Index: llvm/lib/Target/ARM/ARMAsmPrinter.cpp diff -u llvm/lib/Target/ARM/ARMAsmPrinter.cpp:1.23 llvm/lib/Target/ARM/ARMAsmPrinter.cpp:1.24 --- llvm/lib/Target/ARM/ARMAsmPrinter.cpp:1.23 Mon Oct 16 16:10:32 2006 +++ llvm/lib/Target/ARM/ARMAsmPrinter.cpp Tue Oct 17 13:04:52 2006 @@ -55,6 +55,7 @@ } void printAddrMode1(const MachineInstr *MI, int opNum); + void printAddrMode5(const MachineInstr *MI, int opNum); void printMemRegImm(const MachineInstr *MI, int opNum, const char *Modifier = NULL) { @@ -193,6 +194,24 @@ } } +void ARMAsmPrinter::printAddrMode5(const MachineInstr *MI, int opNum) { + const MachineOperand &Arg = MI->getOperand(opNum); + const MachineOperand &Offset = MI->getOperand(opNum + 1); + assert(Offset.isImmediate()); + + if (Arg.isConstantPoolIndex()) { + assert(Offset.getImmedValue() == 0); + printOperand(MI, opNum); + } else { + assert(Arg.isRegister()); + O << '['; + printOperand(MI, opNum); + O << ", "; + printOperand(MI, opNum + 1); + O << ']'; + } +} + void ARMAsmPrinter::printOperand(const MachineInstr *MI, int opNum) { const MachineOperand &MO = MI->getOperand (opNum); const MRegisterInfo &RI = *TM.getRegisterInfo(); Index: llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp diff -u llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp:1.71 llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp:1.72 --- llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp:1.71 Mon Oct 16 16:10:32 2006 +++ llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp Tue Oct 17 13:04:52 2006 @@ -737,6 +737,7 @@ bool SelectAddrRegImm(SDOperand N, SDOperand &Offset, SDOperand &Base); bool SelectAddrMode1(SDOperand N, SDOperand &Arg, SDOperand &Shift, SDOperand &ShiftType); + bool SelectAddrMode5(SDOperand N, SDOperand &Arg, SDOperand &Offset); // Include the pieces autogenerated from the target description. #include "ARMGenDAGISel.inc" @@ -835,6 +836,14 @@ return true; } +bool ARMDAGToDAGISel::SelectAddrMode5(SDOperand N, SDOperand &Arg, + SDOperand &Offset) { + //TODO: detect offset + Offset = CurDAG->getTargetConstant(0, MVT::i32); + Arg = N; + return true; +} + //register plus/minus 12 bit offset bool ARMDAGToDAGISel::SelectAddrRegImm(SDOperand N, SDOperand &Offset, SDOperand &Base) { Index: llvm/lib/Target/ARM/ARMInstrInfo.td diff -u llvm/lib/Target/ARM/ARMInstrInfo.td:1.60 llvm/lib/Target/ARM/ARMInstrInfo.td:1.61 --- llvm/lib/Target/ARM/ARMInstrInfo.td:1.60 Tue Oct 17 08:36:07 2006 +++ llvm/lib/Target/ARM/ARMInstrInfo.td Tue Oct 17 13:04:52 2006 @@ -19,6 +19,12 @@ let MIOperandInfo = (ops ptr_rc, ptr_rc, i32imm); } +def op_addr_mode5 : Operand { + let PrintMethod = "printAddrMode5"; + let NumMIOperands = 2; + let MIOperandInfo = (ops ptr_rc, i32imm); +} + def memri : Operand { let PrintMethod = "printMemRegImm"; let NumMIOperands = 2; @@ -30,6 +36,9 @@ def addr_mode1 : ComplexPattern; +//Addressing Mode 5: VFP load/store +def addr_mode5 : ComplexPattern; + //register plus/minus 12 bit offset def iaddr : ComplexPattern; //register plus scaled register @@ -285,22 +294,22 @@ def FDIVD : DFPBinOp<"fdivd", fdiv>; // Floating Point Load -def FLDS : InstARM<(ops FPRegs:$dst, IntRegs:$addr), - "flds $dst, [$addr]", - [(set FPRegs:$dst, (load IntRegs:$addr))]>; - -def FLDD : InstARM<(ops DFPRegs:$dst, IntRegs:$addr), - "fldd $dst, [$addr]", - [(set DFPRegs:$dst, (load IntRegs:$addr))]>; +def FLDS : InstARM<(ops FPRegs:$dst, op_addr_mode5:$addr), + "flds $dst, $addr", + [(set FPRegs:$dst, (load addr_mode5:$addr))]>; + +def FLDD : InstARM<(ops DFPRegs:$dst, op_addr_mode5:$addr), + "fldd $dst, $addr", + [(set DFPRegs:$dst, (load addr_mode5:$addr))]>; // Floating Point Store -def FSTS : InstARM<(ops FPRegs:$src, IntRegs:$addr), +def FSTS : InstARM<(ops FPRegs:$src, op_addr_mode5:$addr), "fsts $src, [$addr]", - [(store FPRegs:$src, IntRegs:$addr)]>; + [(store FPRegs:$src, addr_mode5:$addr)]>; -def FSTD : InstARM<(ops DFPRegs:$src, IntRegs:$addr), +def FSTD : InstARM<(ops DFPRegs:$src, op_addr_mode5:$addr), "fstd $src, [$addr]", - [(store DFPRegs:$src, IntRegs:$addr)]>; + [(store DFPRegs:$src, addr_mode5:$addr)]>; def : Pat<(ARMcall tglobaladdr:$dst), (bl tglobaladdr:$dst)>; From sabre at nondot.org Tue Oct 17 13:07:11 2006 From: sabre at nondot.org (Chris Lattner) Date: Tue, 17 Oct 2006 13:07:11 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCInstrInfo.cpp Message-ID: <200610171807.k9HI7BZv028323@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/PowerPC: PPCInstrInfo.cpp updated: 1.24 -> 1.25 --- Log message: add support for inserting an uncond branch --- Diffs of the changes: (+8 -2) PPCInstrInfo.cpp | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-) Index: llvm/lib/Target/PowerPC/PPCInstrInfo.cpp diff -u llvm/lib/Target/PowerPC/PPCInstrInfo.cpp:1.24 llvm/lib/Target/PowerPC/PPCInstrInfo.cpp:1.25 --- llvm/lib/Target/PowerPC/PPCInstrInfo.cpp:1.24 Fri Oct 13 16:21:17 2006 +++ llvm/lib/Target/PowerPC/PPCInstrInfo.cpp Tue Oct 17 13:06:55 2006 @@ -238,8 +238,14 @@ void PPCInstrInfo::InsertBranch(MachineBasicBlock &MBB, MachineBasicBlock *TBB, MachineBasicBlock *FBB, const std::vector &Cond) const { - // Fall through? - if (TBB == 0 && FBB == 0) return; + // Shouldn't be a fall through. + assert(TBB && "InsertBranch must not be told to insert a fallthrough"); + + // Unconditional branch? + if (FBB == 0) { + BuildMI(&MBB, PPC::B, 1).addMBB(TBB); + return; + } assert(Cond.size() == 2 && "PPC branch conditions have two components!"); From rafael.espindola at gmail.com Tue Oct 17 13:05:11 2006 From: rafael.espindola at gmail.com (Rafael Espindola) Date: Tue, 17 Oct 2006 13:05:11 -0500 Subject: [llvm-commits] CVS: llvm/test/Regression/CodeGen/ARM/fpmem.ll Message-ID: <200610171805.k9HI5BXg027674@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/CodeGen/ARM: fpmem.ll added (r1.1) --- Log message: initial implementation of addressing mode 5 --- Diffs of the changes: (+14 -0) fpmem.ll | 14 ++++++++++++++ 1 files changed, 14 insertions(+) Index: llvm/test/Regression/CodeGen/ARM/fpmem.ll diff -c /dev/null llvm/test/Regression/CodeGen/ARM/fpmem.ll:1.1 *** /dev/null Tue Oct 17 13:05:03 2006 --- llvm/test/Regression/CodeGen/ARM/fpmem.ll Tue Oct 17 13:04:53 2006 *************** *** 0 **** --- 1,14 ---- + ; RUN: llvm-as < %s | llc -march=arm && + ; RUN: llvm-as < %s | llc -march=arm | grep flds | wc -l | grep 2 && + ; RUN: llvm-as < %s | llc -march=arm | grep "flds.*\[" | wc -l | grep 1 + + float %g(float %a) { + entry: + ret float 0.000000e+00 + } + + float %g(float* %v) { + entry: + %tmp = load float* %v + ret float %tmp + } From reid at x10sys.com Tue Oct 17 13:14:26 2006 From: reid at x10sys.com (Reid Spencer) Date: Tue, 17 Oct 2006 13:14:26 -0500 Subject: [llvm-commits] CVS: llvm-test/SingleSource/UnitTests/Vector/SSE/Makefile Message-ID: <200610171814.k9HIEQES029333@zion.cs.uiuc.edu> Changes in directory llvm-test/SingleSource/UnitTests/Vector/SSE: Makefile updated: 1.2 -> 1.3 --- Log message: Set some FP tolerance for these tests. --- Diffs of the changes: (+1 -0) Makefile | 1 + 1 files changed, 1 insertion(+) Index: llvm-test/SingleSource/UnitTests/Vector/SSE/Makefile diff -u llvm-test/SingleSource/UnitTests/Vector/SSE/Makefile:1.2 llvm-test/SingleSource/UnitTests/Vector/SSE/Makefile:1.3 --- llvm-test/SingleSource/UnitTests/Vector/SSE/Makefile:1.2 Tue Jun 6 19:05:16 2006 +++ llvm-test/SingleSource/UnitTests/Vector/SSE/Makefile Tue Oct 17 13:14:11 2006 @@ -2,6 +2,7 @@ DIRS = LEVEL = ../../../.. +FP_TOLERANCE := 0.01 include $(LEVEL)/SingleSource/Makefile.singlesrc TARGET_FLAGS += -msse3 From sabre at nondot.org Tue Oct 17 13:14:54 2006 From: sabre at nondot.org (Chris Lattner) Date: Tue, 17 Oct 2006 13:14:54 -0500 Subject: [llvm-commits] CVS: llvm/test/Regression/CodeGen/PowerPC/branch-opt.ll Message-ID: <200610171814.k9HIEsEL029387@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/CodeGen/PowerPC: branch-opt.ll added (r1.1) --- Log message: new testcase --- Diffs of the changes: (+93 -0) branch-opt.ll | 93 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 93 insertions(+) Index: llvm/test/Regression/CodeGen/PowerPC/branch-opt.ll diff -c /dev/null llvm/test/Regression/CodeGen/PowerPC/branch-opt.ll:1.1 *** /dev/null Tue Oct 17 13:14:49 2006 --- llvm/test/Regression/CodeGen/PowerPC/branch-opt.ll Tue Oct 17 13:14:39 2006 *************** *** 0 **** --- 1,93 ---- + ; RUN: llvm-as < %s | llc -march=ppc32 && + ; RUN: llvm-as < %s | llc -march=ppc32 | not grep 'b LBB.*cond_next48.loopexit' + + target endian = big + target pointersize = 32 + target triple = "powerpc-apple-darwin8.7.0" + + implementation ; Functions: + + void %foo(int %W, int %X, int %Y, int %Z) { + entry: + %X = cast int %X to uint ; [#uses=1] + %Y = cast int %Y to uint ; [#uses=1] + %Z = cast int %Z to uint ; [#uses=1] + %W = cast int %W to uint ; [#uses=1] + %tmp1 = and int %W, 1 ; [#uses=1] + %tmp1 = seteq int %tmp1, 0 ; [#uses=1] + br bool %tmp1, label %cond_false, label %bb5 + + bb: ; preds = %bb5, %bb + %indvar77 = phi uint [ %indvar.next78, %bb ], [ 0, %bb5 ] ; [#uses=1] + %tmp2 = tail call int (...)* %bar( ) ; [#uses=0] + %indvar.next78 = add uint %indvar77, 1 ; [#uses=2] + %exitcond79 = seteq uint %indvar.next78, %X ; [#uses=1] + br bool %exitcond79, label %cond_next48, label %bb + + bb5: ; preds = %entry + %tmp = seteq int %X, 0 ; [#uses=1] + br bool %tmp, label %cond_next48, label %bb + + cond_false: ; preds = %entry + %tmp10 = and int %W, 2 ; [#uses=1] + %tmp10 = seteq int %tmp10, 0 ; [#uses=1] + br bool %tmp10, label %cond_false20, label %bb16 + + bb12: ; preds = %bb16, %bb12 + %indvar72 = phi uint [ %indvar.next73, %bb12 ], [ 0, %bb16 ] ; [#uses=1] + %tmp13 = tail call int (...)* %bar( ) ; [#uses=0] + %indvar.next73 = add uint %indvar72, 1 ; [#uses=2] + %exitcond74 = seteq uint %indvar.next73, %Y ; [#uses=1] + br bool %exitcond74, label %cond_next48, label %bb12 + + bb16: ; preds = %cond_false + %tmp18 = seteq int %Y, 0 ; [#uses=1] + br bool %tmp18, label %cond_next48, label %bb12 + + cond_false20: ; preds = %cond_false + %tmp23 = and int %W, 4 ; [#uses=1] + %tmp23 = seteq int %tmp23, 0 ; [#uses=1] + br bool %tmp23, label %cond_false33, label %bb29 + + bb25: ; preds = %bb29, %bb25 + %indvar67 = phi uint [ %indvar.next68, %bb25 ], [ 0, %bb29 ] ; [#uses=1] + %tmp26 = tail call int (...)* %bar( ) ; [#uses=0] + %indvar.next68 = add uint %indvar67, 1 ; [#uses=2] + %exitcond69 = seteq uint %indvar.next68, %Z ; [#uses=1] + br bool %exitcond69, label %cond_next48, label %bb25 + + bb29: ; preds = %cond_false20 + %tmp31 = seteq int %Z, 0 ; [#uses=1] + br bool %tmp31, label %cond_next48, label %bb25 + + cond_false33: ; preds = %cond_false20 + %tmp36 = and int %W, 8 ; [#uses=1] + %tmp36 = seteq int %tmp36, 0 ; [#uses=1] + br bool %tmp36, label %cond_next48, label %bb42 + + bb38: ; preds = %bb42 + %tmp39 = tail call int (...)* %bar( ) ; [#uses=0] + %indvar.next = add uint %indvar, 1 ; [#uses=1] + br label %bb42 + + bb42: ; preds = %cond_false33, %bb38 + %indvar = phi uint [ %indvar.next, %bb38 ], [ 0, %cond_false33 ] ; [#uses=3] + %indvar = cast uint %indvar to int ; [#uses=1] + %W_addr.0 = sub int %W, %indvar ; [#uses=1] + %exitcond = seteq uint %indvar, %W ; [#uses=1] + br bool %exitcond, label %cond_next48, label %bb38 + + cond_next48: ; preds = %bb, %bb12, %bb25, %bb42, %cond_false33, %bb29, %bb16, %bb5 + %W_addr.1 = phi int [ %W, %bb5 ], [ %W, %bb16 ], [ %W, %bb29 ], [ %W, %cond_false33 ], [ %W_addr.0, %bb42 ], [ %W, %bb25 ], [ %W, %bb12 ], [ %W, %bb ] ; [#uses=1] + %tmp50 = seteq int %W_addr.1, 0 ; [#uses=1] + br bool %tmp50, label %UnifiedReturnBlock, label %cond_true51 + + cond_true51: ; preds = %cond_next48 + %tmp52 = tail call int (...)* %bar( ) ; [#uses=0] + ret void + + UnifiedReturnBlock: ; preds = %cond_next48 + ret void + } + + declare int %bar(...) From sabre at nondot.org Tue Oct 17 13:16:54 2006 From: sabre at nondot.org (Chris Lattner) Date: Tue, 17 Oct 2006 13:16:54 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/BranchFolding.cpp Message-ID: <200610171816.k9HIGsl5029455@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: BranchFolding.cpp updated: 1.12 -> 1.13 --- Log message: Enable deleting branches to successor blocks. With the previous patches, branch folding can now compile stuff like this: void foo(int W, int X, int Y, int Z) { if (W & 1) { for (; X;--X) bar(); } else if (W & 2) { for (; Y;--Y) bar(); } else if (W & 4) { for (; Z;--Z) bar(); } else if (W & 8) { for (; W;--W) bar(); } if (W) { bar(); } } contrived testcase where loops exits all end up merging together. To have the loop merges be: ... cmplw cr0, r30, r27 bne cr0, LBB1_14 ;bb38 LBB1_16: ;cond_next48.loopexit mr r27, r29 LBB1_20: ;cond_next48 cmplwi cr0, r27, 0 beq cr0, LBB1_22 ;UnifiedReturnBlock ... instead of: ... cmplw cr0, r30, r27 bne cr0, LBB1_14 ;bb38 LBB1_16: ;cond_next48.loopexit mr r27, r29 b LBB1_20 ;cond_next48 LBB1_17: ;cond_next48.loopexit1 b LBB1_20 ;cond_next48 LBB1_18: ;cond_next48.loopexit2 b LBB1_20 ;cond_next48 LBB1_19: ;cond_next48.loopexit3 LBB1_20: ;cond_next48 cmplwi cr0, r27, 0 beq cr0, LBB1_22 ;UnifiedReturnBlock ... This is CodeGen/PowerPC/branch-opt.ll --- Diffs of the changes: (+3 -4) BranchFolding.cpp | 7 +++---- 1 files changed, 3 insertions(+), 4 deletions(-) Index: llvm/lib/CodeGen/BranchFolding.cpp diff -u llvm/lib/CodeGen/BranchFolding.cpp:1.12 llvm/lib/CodeGen/BranchFolding.cpp:1.13 --- llvm/lib/CodeGen/BranchFolding.cpp:1.12 Tue Oct 17 12:13:52 2006 +++ llvm/lib/CodeGen/BranchFolding.cpp Tue Oct 17 13:16:40 2006 @@ -137,10 +137,11 @@ // Check to see if we can simplify the terminator of the block before this // one. -#if 0 + MachineBasicBlock &PrevBB = *prior(MBB); + MachineBasicBlock *PriorTBB = 0, *PriorFBB = 0; std::vector PriorCond; - if (!TII->AnalyzeBranch(*prior(MBB), PriorTBB, PriorFBB, PriorCond)) { + if (!TII->AnalyzeBranch(PrevBB, PriorTBB, PriorFBB, PriorCond)) { // If the previous branch is conditional and both conditions go to the same // destination, remove the branch, replacing it with an unconditional one. if (PriorTBB && PriorTBB == PriorFBB) { @@ -160,8 +161,6 @@ return OptimizeBlock(MBB); } } -#endif - #if 0 From reid at x10sys.com Tue Oct 17 13:23:32 2006 From: reid at x10sys.com (Reid Spencer) Date: Tue, 17 Oct 2006 13:23:32 -0500 Subject: [llvm-commits] CVS: llvm-test/SingleSource/UnitTests/Vector/SSE/Makefile Message-ID: <200610171823.k9HINWK1006900@zion.cs.uiuc.edu> Changes in directory llvm-test/SingleSource/UnitTests/Vector/SSE: Makefile updated: 1.3 -> 1.4 --- Log message: Adjust the FP tolerance so that it actually quashes the fp differences. Also, disable CBE for now in these tests bacause the CWriter doesn't know how to deal with vector instructions. --- Diffs of the changes: (+7 -3) Makefile | 10 +++++++--- 1 files changed, 7 insertions(+), 3 deletions(-) Index: llvm-test/SingleSource/UnitTests/Vector/SSE/Makefile diff -u llvm-test/SingleSource/UnitTests/Vector/SSE/Makefile:1.3 llvm-test/SingleSource/UnitTests/Vector/SSE/Makefile:1.4 --- llvm-test/SingleSource/UnitTests/Vector/SSE/Makefile:1.3 Tue Oct 17 13:14:11 2006 +++ llvm-test/SingleSource/UnitTests/Vector/SSE/Makefile Tue Oct 17 13:23:16 2006 @@ -2,8 +2,12 @@ DIRS = LEVEL = ../../../.. -FP_TOLERANCE := 0.01 +FP_TOLERANCE := 0.016 + +### FIXME: We have disabled CBE here because it doesn't grok the vector +### FIXME: instructions yet. +DISABLE_CBE := 1 include $(LEVEL)/SingleSource/Makefile.singlesrc -TARGET_FLAGS += -msse3 -LCCFLAGS += -msse3 +TARGET_FLAGS += -msse2 +LCCFLAGS += -msse2 From rafael.espindola at gmail.com Tue Oct 17 13:29:30 2006 From: rafael.espindola at gmail.com (Rafael Espindola) Date: Tue, 17 Oct 2006 13:29:30 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/ARM/ARMInstrInfo.td Message-ID: <200610171829.k9HITUj1008260@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/ARM: ARMInstrInfo.td updated: 1.61 -> 1.62 --- Log message: remove extra [] in stores --- Diffs of the changes: (+2 -2) ARMInstrInfo.td | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/lib/Target/ARM/ARMInstrInfo.td diff -u llvm/lib/Target/ARM/ARMInstrInfo.td:1.61 llvm/lib/Target/ARM/ARMInstrInfo.td:1.62 --- llvm/lib/Target/ARM/ARMInstrInfo.td:1.61 Tue Oct 17 13:04:52 2006 +++ llvm/lib/Target/ARM/ARMInstrInfo.td Tue Oct 17 13:29:14 2006 @@ -304,11 +304,11 @@ // Floating Point Store def FSTS : InstARM<(ops FPRegs:$src, op_addr_mode5:$addr), - "fsts $src, [$addr]", + "fsts $src, $addr", [(store FPRegs:$src, addr_mode5:$addr)]>; def FSTD : InstARM<(ops DFPRegs:$src, op_addr_mode5:$addr), - "fstd $src, [$addr]", + "fstd $src, $addr", [(store DFPRegs:$src, addr_mode5:$addr)]>; def : Pat<(ARMcall tglobaladdr:$dst), From rafael.espindola at gmail.com Tue Oct 17 13:29:33 2006 From: rafael.espindola at gmail.com (Rafael Espindola) Date: Tue, 17 Oct 2006 13:29:33 -0500 Subject: [llvm-commits] CVS: llvm/test/Regression/CodeGen/ARM/fpmem.ll Message-ID: <200610171829.k9HITXaB008266@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/CodeGen/ARM: fpmem.ll updated: 1.1 -> 1.2 --- Log message: remove extra [] in stores --- Diffs of the changes: (+10 -3) fpmem.ll | 13 ++++++++++--- 1 files changed, 10 insertions(+), 3 deletions(-) Index: llvm/test/Regression/CodeGen/ARM/fpmem.ll diff -u llvm/test/Regression/CodeGen/ARM/fpmem.ll:1.1 llvm/test/Regression/CodeGen/ARM/fpmem.ll:1.2 --- llvm/test/Regression/CodeGen/ARM/fpmem.ll:1.1 Tue Oct 17 13:04:53 2006 +++ llvm/test/Regression/CodeGen/ARM/fpmem.ll Tue Oct 17 13:29:14 2006 @@ -1,14 +1,21 @@ ; RUN: llvm-as < %s | llc -march=arm && ; RUN: llvm-as < %s | llc -march=arm | grep flds | wc -l | grep 2 && -; RUN: llvm-as < %s | llc -march=arm | grep "flds.*\[" | wc -l | grep 1 +; RUN: llvm-as < %s | llc -march=arm | grep "flds.*\[" | wc -l | grep 1 && +; RUN: llvm-as < %s | llc -march=arm | grep "fsts.*\[" | wc -l | grep 1 -float %g(float %a) { +float %f1(float %a) { entry: ret float 0.000000e+00 } -float %g(float* %v) { +float %f2(float* %v) { entry: %tmp = load float* %v ret float %tmp } + +void %f3(float %a, float* %v) { +entry: + store float %a, float* %v + ret void +} From sabre at nondot.org Tue Oct 17 15:06:20 2006 From: sabre at nondot.org (Chris Lattner) Date: Tue, 17 Oct 2006 13:06:20 -0700 (PDT) Subject: [llvm-commits] llvm-gcc commit Message-ID: This fixes PR946: Index: llvm-convert.cpp =================================================================== --- llvm-convert.cpp (revision 119000) +++ llvm-convert.cpp (working copy) @@ -3475,7 +3475,7 @@ // The second arg of llvm.va_copy is a pointer to a valist. Value *Arg2; const Type *VAListTy = cast(Arg1->getType())->getElementType(); - if (!isAggregateType(TREE_TYPE(Arg1T))) { + if (!isAggregateType(TREE_TYPE(Arg2T))) { // Emit it as a value, then store it to a temporary slot. Value *V2 = Emit(Arg2T, 0); Arg2 = CreateTemporary(V2->getType()); -Chris -- http://nondot.org/sabre/ http://llvm.org/ From jlaskey at apple.com Tue Oct 17 14:34:10 2006 From: jlaskey at apple.com (Jim Laskey) Date: Tue, 17 Oct 2006 14:34:10 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp SelectionDAG.cpp SelectionDAGPrinter.cpp Message-ID: <200610171934.k9HJYA2l018095@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/SelectionDAG: DAGCombiner.cpp updated: 1.227 -> 1.228 SelectionDAG.cpp updated: 1.352 -> 1.353 SelectionDAGPrinter.cpp updated: 1.38 -> 1.39 --- Log message: Make it simplier to dump DAGs while in DAGCombiner. Remove a nasty optimization. --- Diffs of the changes: (+7 -10) DAGCombiner.cpp | 12 ++++-------- SelectionDAG.cpp | 2 +- SelectionDAGPrinter.cpp | 3 ++- 3 files changed, 7 insertions(+), 10 deletions(-) Index: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp diff -u llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.227 llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.228 --- llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.227 Tue Oct 17 12:06:35 2006 +++ llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Tue Oct 17 14:33:52 2006 @@ -49,7 +49,7 @@ static cl::opt CombinerAA("combiner-alias-analysis", cl::Hidden, - cl::desc("Turn on alias analysis turning testing")); + cl::desc("Turn on alias analysis during testing")); //------------------------------ DAGCombiner ---------------------------------// @@ -388,6 +388,9 @@ // changes of the root. HandleSDNode Dummy(DAG.getRoot()); + // The root of the dag may dangle to deleted nodes until the dag combiner is + // done. Set it to null to avoid confusion. + DAG.setRoot(SDOperand()); /// DagCombineInfo - Expose the DAG combiner to the target combiner impls. TargetLowering::DAGCombinerInfo @@ -2759,13 +2762,6 @@ } if (CombinerAA) { - // If the store ptr is a frame index and the frame index has a use of one - // and this is a return block, then the store is redundant. - if (Ptr.hasOneUse() && isa(Ptr) && - DAG.getRoot().getOpcode() == ISD::RET) { - return Chain; - } - // Walk up chain skipping non-aliasing memory nodes. SDOperand BetterChain = FindBetterChain(N, Chain); Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.352 llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.353 --- llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.352 Fri Oct 13 19:41:01 2006 +++ llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Tue Oct 17 14:33:52 2006 @@ -2684,7 +2684,7 @@ DumpNodes(Nodes[i], 2, this); } - DumpNodes(getRoot().Val, 2, this); + if (getRoot().Val) DumpNodes(getRoot().Val, 2, this); std::cerr << "\n\n"; } Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp:1.38 llvm/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp:1.39 --- llvm/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp:1.38 Wed Oct 11 02:09:31 2006 +++ llvm/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp Tue Oct 17 14:33:52 2006 @@ -61,7 +61,8 @@ static void addCustomGraphFeatures(SelectionDAG *G, GraphWriter &GW) { GW.emitSimpleNode(0, "plaintext=circle", "GraphRoot"); - GW.emitEdge(0, -1, G->getRoot().Val, -1, ""); + if (G->getRoot().Val) + GW.emitEdge(0, -1, G->getRoot().Val, -1, ""); } }; } From rafael.espindola at gmail.com Tue Oct 17 15:20:23 2006 From: rafael.espindola at gmail.com (Rafael Espindola) Date: Tue, 17 Oct 2006 15:20:23 -0500 Subject: [llvm-commits] CVS: llvm/test/Regression/CodeGen/ARM/fp.ll fpcmp.ll fpconv.ll Message-ID: <200610172020.k9HKKNOt027841@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/CodeGen/ARM: fp.ll updated: 1.9 -> 1.10 fpcmp.ll updated: 1.4 -> 1.5 fpconv.ll updated: 1.3 -> 1.4 --- Log message: cleanup some tests --- Diffs of the changes: (+43 -45) fp.ll | 34 +++------------------------------- fpcmp.ll | 8 +------- fpconv.ll | 46 +++++++++++++++++++++++++++++++++++++++------- 3 files changed, 43 insertions(+), 45 deletions(-) Index: llvm/test/Regression/CodeGen/ARM/fp.ll diff -u llvm/test/Regression/CodeGen/ARM/fp.ll:1.9 llvm/test/Regression/CodeGen/ARM/fp.ll:1.10 --- llvm/test/Regression/CodeGen/ARM/fp.ll:1.9 Tue Oct 17 08:36:07 2006 +++ llvm/test/Regression/CodeGen/ARM/fp.ll Tue Oct 17 15:20:07 2006 @@ -1,42 +1,14 @@ ; RUN: llvm-as < %s | llc -march=arm && -; RUN: llvm-as < %s | llc -march=arm | grep fmsr | wc -l | grep 5 && -; RUN: llvm-as < %s | llc -march=arm | grep fsitos && +; RUN: llvm-as < %s | llc -march=arm | grep fmsr && ; RUN: llvm-as < %s | llc -march=arm | grep fmrs && -; RUN: llvm-as < %s | llc -march=arm | grep fsitod && -; RUN: llvm-as < %s | llc -march=arm | grep fmrrd | wc -l | grep 5 && -; RUN: llvm-as < %s | llc -march=arm | grep fmdrr | wc -l | grep 3 && +; RUN: llvm-as < %s | llc -march=arm | grep fmrrd && +; RUN: llvm-as < %s | llc -march=arm | grep fmdrr && ; RUN: llvm-as < %s | llc -march=arm | grep fldd && ; RUN: llvm-as < %s | llc -march=arm | grep flds && ; RUN: llvm-as < %s | llc -march=arm | grep fstd && ; RUN: llvm-as < %s | llc -march=arm | grep fsts && -; RUN: llvm-as < %s | llc -march=arm | grep fuitod && -; RUN: llvm-as < %s | llc -march=arm | grep fuitos && ; RUN: llvm-as < %s | llc -march=arm | grep ".word.*1065353216" -float %f(int %a) { -entry: - %tmp = cast int %a to float ; [#uses=1] - ret float %tmp -} - -double %g(int %a) { -entry: - %tmp = cast int %a to double ; [#uses=1] - ret double %tmp -} - -double %uint_to_double(uint %a) { -entry: - %tmp = cast uint %a to double - ret double %tmp -} - -float %uint_to_float(uint %a) { -entry: - %tmp = cast uint %a to float - ret float %tmp -} - double %h(double* %v) { entry: Index: llvm/test/Regression/CodeGen/ARM/fpcmp.ll diff -u llvm/test/Regression/CodeGen/ARM/fpcmp.ll:1.4 llvm/test/Regression/CodeGen/ARM/fpcmp.ll:1.5 --- llvm/test/Regression/CodeGen/ARM/fpcmp.ll:1.4 Sat Oct 14 08:42:53 2006 +++ llvm/test/Regression/CodeGen/ARM/fpcmp.ll Tue Oct 17 15:20:07 2006 @@ -4,6 +4,7 @@ ; RUN: llvm-as < %s | llc -march=arm | grep movgt && ; RUN: llvm-as < %s | llc -march=arm | grep movge && ; RUN: llvm-as < %s | llc -march=arm | grep movls && +; RUN: llvm-as < %s | llc -march=arm | grep movne && ; RUN: llvm-as < %s | llc -march=arm | grep fcmps && ; RUN: llvm-as < %s | llc -march=arm | grep fcmpd @@ -55,10 +56,3 @@ %tmp = cast bool %tmp to int ; [#uses=1] ret int %tmp } - -int %g2(double %a) { -entry: - %tmp = setne double %a, 1.000000e+00 ; [#uses=1] - %tmp = cast bool %tmp to int ; [#uses=1] - ret int %tmp -} Index: llvm/test/Regression/CodeGen/ARM/fpconv.ll diff -u llvm/test/Regression/CodeGen/ARM/fpconv.ll:1.3 llvm/test/Regression/CodeGen/ARM/fpconv.ll:1.4 --- llvm/test/Regression/CodeGen/ARM/fpconv.ll:1.3 Tue Oct 10 15:38:57 2006 +++ llvm/test/Regression/CodeGen/ARM/fpconv.ll Tue Oct 17 15:20:07 2006 @@ -1,6 +1,14 @@ ; RUN: llvm-as < %s | llc -march=arm && +; RUN: llvm-as < %s | llc -march=arm | grep fcvtsd && ; RUN: llvm-as < %s | llc -march=arm | grep fcvtds && -; RUN: llvm-as < %s | llc -march=arm | grep fcvtsd +; RUN: llvm-as < %s | llc -march=arm | grep ftosis && +; RUN: llvm-as < %s | llc -march=arm | grep ftouis && +; RUN: llvm-as < %s | llc -march=arm | grep ftosid && +; RUN: llvm-as < %s | llc -march=arm | grep ftouid && +; RUN: llvm-as < %s | llc -march=arm | grep fsitos && +; RUN: llvm-as < %s | llc -march=arm | grep fsitod && +; RUN: llvm-as < %s | llc -march=arm | grep fuitos && +; RUN: llvm-as < %s | llc -march=arm | grep fuitod float %f1(double %x) { entry: @@ -20,16 +28,16 @@ ret int %tmp } -int %f4(double %x) { +uint %f4(float %x) { entry: - %tmp = cast double %x to int - ret int %tmp + %tmp = cast float %x to uint + ret uint %tmp } -uint %f5(float %x) { +int %f5(double %x) { entry: - %tmp = cast float %x to uint - ret uint %tmp + %tmp = cast double %x to int + ret int %tmp } uint %f6(double %x) { @@ -37,3 +45,27 @@ %tmp = cast double %x to uint ret uint %tmp } + +float %f7(int %a) { +entry: + %tmp = cast int %a to float + ret float %tmp +} + +double %f8(int %a) { +entry: + %tmp = cast int %a to double + ret double %tmp +} + +float %f9(uint %a) { +entry: + %tmp = cast uint %a to float + ret float %tmp +} + +double %f10(uint %a) { +entry: + %tmp = cast uint %a to double + ret double %tmp +} From asl at math.spbu.ru Tue Oct 17 15:30:03 2006 From: asl at math.spbu.ru (Anton Korobeynikov) Date: Tue, 17 Oct 2006 15:30:03 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86ATTAsmPrinter.cpp X86AsmPrinter.cpp Message-ID: <200610172030.k9HKU3BZ028035@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: X86ATTAsmPrinter.cpp updated: 1.67 -> 1.68 X86AsmPrinter.cpp updated: 1.201 -> 1.202 --- Log message: Adding linkonce linkage codegeneration support for mingw32\cygwin targets. --- Diffs of the changes: (+26 -1) X86ATTAsmPrinter.cpp | 14 +++++++++++++- X86AsmPrinter.cpp | 13 +++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) Index: llvm/lib/Target/X86/X86ATTAsmPrinter.cpp diff -u llvm/lib/Target/X86/X86ATTAsmPrinter.cpp:1.67 llvm/lib/Target/X86/X86ATTAsmPrinter.cpp:1.68 --- llvm/lib/Target/X86/X86ATTAsmPrinter.cpp:1.67 Wed Oct 4 22:01:21 2006 +++ llvm/lib/Target/X86/X86ATTAsmPrinter.cpp Tue Oct 17 15:29:49 2006 @@ -89,13 +89,25 @@ EmitAlignment(4, F); // FIXME: This should be parameterized somewhere. O << "\t.globl\t" << CurrentFnName << "\n"; break; - case Function::WeakLinkage: case Function::LinkOnceLinkage: if (Subtarget->isTargetDarwin()) { O << "\t.globl\t" << CurrentFnName << "\n"; O << "\t.weak_definition\t" << CurrentFnName << "\n"; } else if (Subtarget->isTargetCygwin()) { EmitAlignment(4, F); // FIXME: This should be parameterized somewhere. + O << "\t.linkonce discard\n"; + O << "\t.globl " << CurrentFnName << "\n"; + } else { + EmitAlignment(4, F); // FIXME: This should be parameterized somewhere. + O << "\t.weak " << CurrentFnName << "\n"; + } + break; + case Function::WeakLinkage: + if (Subtarget->isTargetDarwin()) { + O << "\t.globl\t" << CurrentFnName << "\n"; + O << "\t.weak_definition\t" << CurrentFnName << "\n"; + } else if (Subtarget->isTargetCygwin()) { + EmitAlignment(4, F); // FIXME: This should be parameterized somewhere. O << "\t.weak " << CurrentFnName << "\n"; } else { EmitAlignment(4, F); // FIXME: This should be parameterized somewhere. Index: llvm/lib/Target/X86/X86AsmPrinter.cpp diff -u llvm/lib/Target/X86/X86AsmPrinter.cpp:1.201 llvm/lib/Target/X86/X86AsmPrinter.cpp:1.202 --- llvm/lib/Target/X86/X86AsmPrinter.cpp:1.201 Sat Oct 14 15:53:35 2006 +++ llvm/lib/Target/X86/X86AsmPrinter.cpp Tue Oct 17 15:29:49 2006 @@ -174,6 +174,19 @@ } else { switch (I->getLinkage()) { case GlobalValue::LinkOnceLinkage: + if (Subtarget->isTargetDarwin()) { + O << "\t.globl " << name << "\n" + << "\t.weak_definition " << name << "\n"; + SwitchToDataSection(".section __DATA,__const_coal,coalesced", I); + } else if (Subtarget->isTargetCygwin()) { + O << "\t.section\t.llvm.linkonce.d." << name << ",\"aw\"\n" + << "\t.globl " << name << "\n" + << "\t.linkonce same_size\n"; + } else { + O << "\t.section\t.llvm.linkonce.d." << name << ",\"aw\", at progbits\n" + << "\t.weak " << name << "\n"; + } + break; case GlobalValue::WeakLinkage: if (Subtarget->isTargetDarwin()) { O << "\t.globl " << name << "\n" From rafael.espindola at gmail.com Tue Oct 17 15:33:29 2006 From: rafael.espindola at gmail.com (Rafael Espindola) Date: Tue, 17 Oct 2006 15:33:29 -0500 Subject: [llvm-commits] CVS: llvm/test/Regression/CodeGen/ARM/fparith.ll Message-ID: <200610172033.k9HKXTHW028168@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/CodeGen/ARM: fparith.ll updated: 1.4 -> 1.5 --- Log message: add FABSS and FABSD --- Diffs of the changes: (+16 -0) fparith.ll | 16 ++++++++++++++++ 1 files changed, 16 insertions(+) Index: llvm/test/Regression/CodeGen/ARM/fparith.ll diff -u llvm/test/Regression/CodeGen/ARM/fparith.ll:1.4 llvm/test/Regression/CodeGen/ARM/fparith.ll:1.5 --- llvm/test/Regression/CodeGen/ARM/fparith.ll:1.4 Mon Oct 16 16:50:04 2006 +++ llvm/test/Regression/CodeGen/ARM/fparith.ll Tue Oct 17 15:33:13 2006 @@ -67,3 +67,19 @@ %tmp1 = div double %a, %b ret double %tmp1 } + +float %f11(float %a) { +entry: + %tmp1 = call float %fabsf(float %a) + ret float %tmp1 +} + +declare float %fabsf(float) + +double %f12(double %a) { +entry: + %tmp1 = call double %fabs(double %a) + ret double %tmp1 +} + +declare double %fabs(double) From rafael.espindola at gmail.com Tue Oct 17 15:33:29 2006 From: rafael.espindola at gmail.com (Rafael Espindola) Date: Tue, 17 Oct 2006 15:33:29 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/ARM/ARMInstrInfo.td Message-ID: <200610172033.k9HKXTO7028163@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/ARM: ARMInstrInfo.td updated: 1.62 -> 1.63 --- Log message: add FABSS and FABSD --- Diffs of the changes: (+8 -0) ARMInstrInfo.td | 8 ++++++++ 1 files changed, 8 insertions(+) Index: llvm/lib/Target/ARM/ARMInstrInfo.td diff -u llvm/lib/Target/ARM/ARMInstrInfo.td:1.62 llvm/lib/Target/ARM/ARMInstrInfo.td:1.63 --- llvm/lib/Target/ARM/ARMInstrInfo.td:1.62 Tue Oct 17 13:29:14 2006 +++ llvm/lib/Target/ARM/ARMInstrInfo.td Tue Oct 17 15:33:13 2006 @@ -288,6 +288,14 @@ "fnegd $dst, $src", [(set DFPRegs:$dst, (fneg DFPRegs:$src))]>; +def FABSS : InstARM<(ops FPRegs:$dst, FPRegs:$src), + "fabss $dst, $src", + [(set FPRegs:$dst, (fabs FPRegs:$src))]>; + +def FABSD : InstARM<(ops DFPRegs:$dst, DFPRegs:$src), + "fabsd $dst, $src", + [(set DFPRegs:$dst, (fabs DFPRegs:$src))]>; + def FMULS : FPBinOp<"fmuls", fmul>; def FMULD : DFPBinOp<"fmuld", fmul>; def FDIVS : FPBinOp<"fdivs", fdiv>; From rafael.espindola at gmail.com Tue Oct 17 16:05:48 2006 From: rafael.espindola at gmail.com (Rafael Espindola) Date: Tue, 17 Oct 2006 16:05:48 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp Message-ID: <200610172105.k9HL5mvF028670@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/ARM: ARMISelDAGToDAG.cpp updated: 1.72 -> 1.73 --- Log message: expand ISD::SDIV, ISD::UDIV, ISD::SREM and ISD::UREM --- Diffs of the changes: (+4 -0) ARMISelDAGToDAG.cpp | 4 ++++ 1 files changed, 4 insertions(+) Index: llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp diff -u llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp:1.72 llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp:1.73 --- llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp:1.72 Tue Oct 17 13:04:52 2006 +++ llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp Tue Oct 17 16:05:33 2006 @@ -75,6 +75,10 @@ setOperationAction(ISD::SHL_PARTS, MVT::i32, Expand); setOperationAction(ISD::SRA_PARTS, MVT::i32, Expand); setOperationAction(ISD::SRL_PARTS, MVT::i32, Expand); + setOperationAction(ISD::SDIV, MVT::i32, Expand); + setOperationAction(ISD::UDIV, MVT::i32, Expand); + setOperationAction(ISD::SREM, MVT::i32, Expand); + setOperationAction(ISD::UREM, MVT::i32, Expand); setOperationAction(ISD::VASTART, MVT::Other, Custom); setOperationAction(ISD::VAEND, MVT::Other, Expand); From rafael.espindola at gmail.com Tue Oct 17 16:05:49 2006 From: rafael.espindola at gmail.com (Rafael Espindola) Date: Tue, 17 Oct 2006 16:05:49 -0500 Subject: [llvm-commits] CVS: llvm/test/Regression/CodeGen/ARM/div.ll Message-ID: <200610172105.k9HL5niA028676@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/CodeGen/ARM: div.ll added (r1.1) --- Log message: expand ISD::SDIV, ISD::UDIV, ISD::SREM and ISD::UREM --- Diffs of the changes: (+29 -0) div.ll | 29 +++++++++++++++++++++++++++++ 1 files changed, 29 insertions(+) Index: llvm/test/Regression/CodeGen/ARM/div.ll diff -c /dev/null llvm/test/Regression/CodeGen/ARM/div.ll:1.1 *** /dev/null Tue Oct 17 16:05:43 2006 --- llvm/test/Regression/CodeGen/ARM/div.ll Tue Oct 17 16:05:33 2006 *************** *** 0 **** --- 1,29 ---- + ; RUN: llvm-as < %s | llc -march=arm && + ; RUN: llvm-as < %s | llc -march=arm | grep __divsi3 && + ; RUN: llvm-as < %s | llc -march=arm | grep __udivsi3 && + ; RUN: llvm-as < %s | llc -march=arm | grep __modsi3 && + ; RUN: llvm-as < %s | llc -march=arm | grep __umodsi3 + + int %f1(int %a, int %b) { + entry: + %tmp1 = div int %a, %b + ret int %tmp1 + } + + uint %f2(uint %a, uint %b) { + entry: + %tmp1 = div uint %a, %b + ret uint %tmp1 + } + + int %f3(int %a, int %b) { + entry: + %tmp1 = rem int %a, %b + ret int %tmp1 + } + + uint %f4(uint %a, uint %b) { + entry: + %tmp1 = rem uint %a, %b + ret uint %tmp1 + } From evan.cheng at apple.com Tue Oct 17 16:13:10 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 17 Oct 2006 16:13:10 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAG.h SelectionDAGNodes.h Message-ID: <200610172113.k9HLDAjB028804@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/CodeGen: SelectionDAG.h updated: 1.138 -> 1.139 SelectionDAGNodes.h updated: 1.154 -> 1.155 --- Log message: Split PRE_INDEXED to PRE_INC / PRE_DEC and similarly for POST_INDEXED. --- Diffs of the changes: (+14 -8) SelectionDAG.h | 1 + SelectionDAGNodes.h | 21 +++++++++++++-------- 2 files changed, 14 insertions(+), 8 deletions(-) Index: llvm/include/llvm/CodeGen/SelectionDAG.h diff -u llvm/include/llvm/CodeGen/SelectionDAG.h:1.138 llvm/include/llvm/CodeGen/SelectionDAG.h:1.139 --- llvm/include/llvm/CodeGen/SelectionDAG.h:1.138 Mon Oct 16 15:52:31 2006 +++ llvm/include/llvm/CodeGen/SelectionDAG.h Tue Oct 17 16:12:56 2006 @@ -314,6 +314,7 @@ SDOperand getExtLoad(ISD::LoadExtType ExtType, MVT::ValueType VT, SDOperand Chain, SDOperand Ptr, const Value *SV, int SVOffset, MVT::ValueType EVT, bool isVolatile=false); + SDOperand getPreIndexedLoad(SDOperand OrigLoad, SDOperand Base); SDOperand getVecLoad(unsigned Count, MVT::ValueType VT, SDOperand Chain, SDOperand Ptr, SDOperand SV); Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h diff -u llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.154 llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.155 --- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.154 Fri Oct 13 16:08:54 2006 +++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h Tue Oct 17 16:12:56 2006 @@ -528,8 +528,8 @@ /// chain, an unindexed load produces one value (result of the /// load); an unindexed store does not produces a value. /// - /// PRE_INDEXED Similar to the unindexed mode where the effective address is - /// the result of computation of the base pointer. However, it + /// PRE_INC Similar to the unindexed mode where the effective address is + /// PRE_DEC the result of computation of the base pointer. However, it /// considers the computation as being folded into the load / /// store operation (i.e. the load / store does the address /// computation as well as performing the memory transaction). @@ -539,8 +539,8 @@ /// computation); a pre-indexed store produces one value (result /// of the address computation). /// - /// POST_INDEXED The effective address is the value of the base pointer. The - /// value of the offset operand is then added to the base after + /// POST_INC The effective address is the value of the base pointer. The + /// POST_DEC value of the offset operand is then added to the base after /// memory transaction. In addition to producing a chain, /// post-indexed load produces two values (the result of the load /// and the result of the base + offset computation); a @@ -549,8 +549,10 @@ /// enum MemOpAddrMode { UNINDEXED = 0, - PRE_INDEXED, - POST_INDEXED + PRE_INC, + PRE_DEC, + POST_INC, + POST_DEC }; //===--------------------------------------------------------------------===// @@ -854,6 +856,7 @@ /// getOperationName - Return the opcode of this operation for printing. /// const char* getOperationName(const SelectionDAG *G = 0) const; + static const char* getAddressingModeName(ISD::MemOpAddrMode AM); void dump() const; void dump(const SelectionDAG *G) const; @@ -1405,7 +1408,8 @@ : SDNode(ISD::LOAD, Chain, Ptr, Off), AddrMode(AM), ExtType(ETy), LoadedVT(LVT), SrcValue(SV), SVOffset(O), Alignment(Align), IsVolatile(Vol) { - assert((Off.getOpcode() == ISD::UNDEF || AddrMode == ISD::POST_INDEXED) && + assert((Off.getOpcode() == ISD::UNDEF || + AddrMode == ISD::POST_INC || AddrMode == ISD::POST_DEC) && "Only post-indexed load has a non-undef offset operand"); } public: @@ -1458,7 +1462,8 @@ : SDNode(ISD::STORE, Chain, Value, Ptr, Off), AddrMode(AM), IsTruncStore(isTrunc), StoredVT(SVT), SrcValue(SV), SVOffset(O), Alignment(Align), IsVolatile(Vol) { - assert((Off.getOpcode() == ISD::UNDEF || AddrMode == ISD::POST_INDEXED) && + assert((Off.getOpcode() == ISD::UNDEF || + AddrMode == ISD::POST_INC || AddrMode == ISD::POST_DEC) && "Only post-indexed store has a non-undef offset operand"); } public: From evan.cheng at apple.com Tue Oct 17 16:14:46 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 17 Oct 2006 16:14:46 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Message-ID: <200610172114.k9HLEkHt028862@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/SelectionDAG: SelectionDAG.cpp updated: 1.353 -> 1.354 --- Log message: Reflect MemOpAddrMode change; added a helper to create pre-indexed load. --- Diffs of the changes: (+68 -4) SelectionDAG.cpp | 72 +++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 files changed, 68 insertions(+), 4 deletions(-) Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.353 llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.354 --- llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.353 Tue Oct 17 14:33:52 2006 +++ llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Tue Oct 17 16:14:32 2006 @@ -1440,6 +1440,48 @@ return SDOperand(N, 0); } +SDOperand SelectionDAG::getPreIndexedLoad(SDOperand OrigLoad, SDOperand Base) { + LoadSDNode *LD = cast(OrigLoad); + SDOperand Ptr = LD->getBasePtr(); + MVT::ValueType PtrVT = Ptr.getValueType(); + unsigned Opc = Ptr.getOpcode(); + SDOperand Offset = LD->getOffset(); + assert(Offset.getOpcode() == ISD::UNDEF); + assert((Opc == ISD::ADD || Opc == ISD::SUB) && + "Load address must be !"); + ISD::MemOpAddrMode AM = (Opc == ISD::ADD) ? ISD::PRE_INC : ISD::PRE_DEC; + if (Ptr.getOperand(0) == Base) { + Offset = Ptr.getOperand(1); + Ptr = Ptr.getOperand(0); + } else { + assert(Ptr.getOperand(1) == Base); + Offset = Ptr.getOperand(0); + Ptr = Ptr.getOperand(1); + } + + MVT::ValueType VT = OrigLoad.getValueType(); + SDVTList VTs = getVTList(VT, PtrVT, MVT::Other); + SelectionDAGCSEMap::NodeID ID(ISD::LOAD, VTs, LD->getChain(), Ptr, Offset); + ID.AddInteger(AM); + ID.AddInteger(LD->getExtensionType()); + ID.AddInteger(LD->getLoadedVT()); + ID.AddPointer(LD->getSrcValue()); + ID.AddInteger(LD->getSrcValueOffset()); + ID.AddInteger(LD->getAlignment()); + ID.AddInteger(LD->isVolatile()); + void *IP = 0; + if (SDNode *E = CSEMap.FindNodeOrInsertPos(ID, IP)) + return SDOperand(E, 0); + SDNode *N = new LoadSDNode(LD->getChain(), Ptr, Offset, AM, + LD->getExtensionType(), LD->getLoadedVT(), + LD->getSrcValue(), LD->getSrcValueOffset(), + LD->getAlignment(), LD->isVolatile()); + N->setValueTypes(VTs); + CSEMap.InsertNode(N, IP); + AllNodes.push_back(N); + return SDOperand(N, 0); +} + SDOperand SelectionDAG::getVecLoad(unsigned Count, MVT::ValueType EVT, SDOperand Chain, SDOperand Ptr, SDOperand SV) { @@ -2565,6 +2607,21 @@ } } +const char *SDNode::getAddressingModeName(ISD::MemOpAddrMode AM) { + switch (AM) { + default: + return ""; + case ISD::PRE_INC: + return ""; + case ISD::PRE_DEC: + return ""; + case ISD::POST_INC: + return ""; + case ISD::POST_DEC: + return ""; + } +} + void SDNode::dump() const { dump(0); } void SDNode::dump(const SelectionDAG *G) const { std::cerr << (void*)this << ": "; @@ -2650,10 +2707,17 @@ if (doExt) std::cerr << MVT::getValueTypeString(LD->getLoadedVT()) << ">"; - if (LD->getAddressingMode() == ISD::PRE_INDEXED) - std::cerr << "
";
-    else if (LD->getAddressingMode() == ISD::POST_INDEXED)
-      std::cerr << " ";
+    const char *AM = getAddressingModeName(LD->getAddressingMode());
+    if (AM != "")
+      std::cerr << " " << AM;
+  } else if (const StoreSDNode *ST = dyn_cast(this)) {
+    if (ST->isTruncatingStore())
+      std::cerr << " getStoredVT()) << ">";
+
+    const char *AM = getAddressingModeName(ST->getAddressingMode());
+    if (AM != "")
+      std::cerr << " " << AM;
   }
 }
 





From evan.cheng at apple.com  Tue Oct 17 16:18:40 2006
From: evan.cheng at apple.com (Evan Cheng)
Date: Tue, 17 Oct 2006 16:18:40 -0500
Subject: [llvm-commits] CVS:
	llvm/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp
Message-ID: <200610172118.k9HLIe7a028927@zion.cs.uiuc.edu>



Changes in directory llvm/lib/CodeGen/SelectionDAG:

SelectionDAGPrinter.cpp updated: 1.39 -> 1.40
---
Log message:

Fix printer for StoreSDNode.

---
Diffs of the changes:  (+5 -4)

 SelectionDAGPrinter.cpp |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)


Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp:1.39 llvm/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp:1.40
--- llvm/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp:1.39	Tue Oct 17 14:33:52 2006
+++ llvm/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp	Tue Oct 17 16:18:26 2006
@@ -148,10 +148,11 @@
     if (doExt)
       Op = Op + MVT::getValueTypeString(LD->getLoadedVT()) + ">";
 
-    if (LD->getAddressingMode() == ISD::PRE_INDEXED)
-      Op = Op + "
";
-    else if (LD->getAddressingMode() == ISD::POST_INDEXED)
-      Op = Op + "";
+    Op += LD->getAddressingModeName(LD->getAddressingMode());
+  } else if (const StoreSDNode *ST = dyn_cast(Node)) {
+    if (ST->isTruncatingStore())
+      Op = Op + "getStoredVT()) + ">";
+    Op += ST->getAddressingModeName(ST->getAddressingMode());
   }
   
   return Op;





From sabre at nondot.org  Tue Oct 17 16:23:35 2006
From: sabre at nondot.org (Chris Lattner)
Date: Tue, 17 Oct 2006 16:23:35 -0500
Subject: [llvm-commits] CVS:
	llvm/test/Regression/CodeGen/PowerPC/2006-10-17-brcc-miscompile.ll
Message-ID: <200610172123.k9HLNZW6029050@zion.cs.uiuc.edu>



Changes in directory llvm/test/Regression/CodeGen/PowerPC:

2006-10-17-brcc-miscompile.ll added (r1.1)
---
Log message:

new testcase, miscompilation of llvm with itself.


---
Diffs of the changes:  (+24 -0)

 2006-10-17-brcc-miscompile.ll |   24 ++++++++++++++++++++++++
 1 files changed, 24 insertions(+)


Index: llvm/test/Regression/CodeGen/PowerPC/2006-10-17-brcc-miscompile.ll
diff -c /dev/null llvm/test/Regression/CodeGen/PowerPC/2006-10-17-brcc-miscompile.ll:1.1
*** /dev/null	Tue Oct 17 16:23:30 2006
--- llvm/test/Regression/CodeGen/PowerPC/2006-10-17-brcc-miscompile.ll	Tue Oct 17 16:23:20 2006
***************
*** 0 ****
--- 1,24 ----
+ ; RUN: llvm-as < %s | llc -march=ppc32 | grep xor 
+ 
+ target endian = big
+ target pointersize = 32
+ target triple = "powerpc-apple-darwin8.7.0"
+ 
+ implementation   ; Functions:
+ 
+ void %foo(int %X) {
+ entry:
+ 	%tmp1 = and int %X, 3		;  [#uses=1]
+ 	%tmp2 = xor int %tmp1, 1
+ 	%tmp = seteq int %tmp2, 0		;  [#uses=1]
+ 	br bool %tmp, label %UnifiedReturnBlock, label %cond_true
+ 
+ cond_true:		; preds = %entry
+ 	tail call int (...)* %bar( )		;  [#uses=0]
+ 	ret void
+ 
+ UnifiedReturnBlock:		; preds = %entry
+ 	ret void
+ }
+ 
+ declare int %bar(...)





From sabre at nondot.org  Tue Oct 17 16:24:29 2006
From: sabre at nondot.org (Chris Lattner)
Date: Tue, 17 Oct 2006 16:24:29 -0500
Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
Message-ID: <200610172124.k9HLOT2n029148@zion.cs.uiuc.edu>



Changes in directory llvm/lib/CodeGen/SelectionDAG:

DAGCombiner.cpp updated: 1.228 -> 1.229
---
Log message:

Fix CodeGen/PowerPC/2006-10-17-brcc-miscompile.ll


---
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.228 llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.229
--- llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.228	Tue Oct 17 14:33:52 2006
+++ llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp	Tue Oct 17 16:24:15 2006
@@ -3689,7 +3689,7 @@
             cast(N0.getOperand(1))->getValue() == 1) {
           // If this is (X^1) == 0/1, swap the RHS and eliminate the xor.  We
           // can only do this if the top bits are known zero.
-          if (TLI.MaskedValueIsZero(N1, 
+          if (TLI.MaskedValueIsZero(N0, 
                                     MVT::getIntVTBitMask(N0.getValueType())-1)){
             // Okay, get the un-inverted input value.
             SDOperand Val;





From sabre at nondot.org  Tue Oct 17 16:51:58 2006
From: sabre at nondot.org (Chris Lattner)
Date: Tue, 17 Oct 2006 16:51:58 -0500
Subject: [llvm-commits] CVS: llvm/include/llvm/CodeGen/MachineDebugInfo.h
Message-ID: <200610172151.k9HLpwuE002337@zion.cs.uiuc.edu>



Changes in directory llvm/include/llvm/CodeGen:

MachineDebugInfo.h updated: 1.39 -> 1.40
---
Log message:

minor cleanups


---
Diffs of the changes:  (+1 -5)

 MachineDebugInfo.h |    6 +-----
 1 files changed, 1 insertion(+), 5 deletions(-)


Index: llvm/include/llvm/CodeGen/MachineDebugInfo.h
diff -u llvm/include/llvm/CodeGen/MachineDebugInfo.h:1.39 llvm/include/llvm/CodeGen/MachineDebugInfo.h:1.40
--- llvm/include/llvm/CodeGen/MachineDebugInfo.h:1.39	Mon Sep 18 09:47:26 2006
+++ llvm/include/llvm/CodeGen/MachineDebugInfo.h	Tue Oct 17 16:51:44 2006
@@ -20,7 +20,7 @@
 //     string and assigned a sequential numeric ID (base 1.)
 //  -- Source files - Files are also uniqued based on their name and directory
 //     ID.  A file ID is sequential number (base 1.)
-//  -- Source line coorespondence - A vector of file ID, line#, column# triples.
+//  -- Source line correspondence - A vector of file ID, line#, column# triples.
 //     A DEBUG_LOCATION instruction is generated  by the DAG Legalizer
 //     corresponding to each entry in the source line list.  This allows a debug
 //     emitter to generate labels referenced by debug information tables.
@@ -35,10 +35,6 @@
 #include "llvm/ADT/UniqueVector.h"
 #include "llvm/GlobalValue.h"
 #include "llvm/Pass.h"
-#include "llvm/User.h"
-
-#include 
-#include 
 
 namespace llvm {
 





From rafael.espindola at gmail.com  Tue Oct 17 15:45:37 2006
From: rafael.espindola at gmail.com (Rafael Espindola)
Date: Tue, 17 Oct 2006 15:45:37 -0500
Subject: [llvm-commits] CVS: llvm/lib/Target/ARM/ARMInstrInfo.td
Message-ID: <200610172045.k9HKjbbO028349@zion.cs.uiuc.edu>



Changes in directory llvm/lib/Target/ARM:

ARMInstrInfo.td updated: 1.63 -> 1.64
---
Log message:

add the FPUnaryOp and DFPUnaryOp classes


---
Diffs of the changes:  (+14 -15)

 ARMInstrInfo.td |   29 ++++++++++++++---------------
 1 files changed, 14 insertions(+), 15 deletions(-)


Index: llvm/lib/Target/ARM/ARMInstrInfo.td
diff -u llvm/lib/Target/ARM/ARMInstrInfo.td:1.63 llvm/lib/Target/ARM/ARMInstrInfo.td:1.64
--- llvm/lib/Target/ARM/ARMInstrInfo.td:1.63	Tue Oct 17 15:33:13 2006
+++ llvm/lib/Target/ARM/ARMInstrInfo.td	Tue Oct 17 15:45:22 2006
@@ -70,6 +70,16 @@
                  !strconcat(OpcStr, " $dst, $a, $b"),
                  [(set DFPRegs:$dst, (OpNode DFPRegs:$a, DFPRegs:$b))]>;
 
+class FPUnaryOp :
+        InstARM<(ops FPRegs:$dst, FPRegs:$src),
+                 !strconcat(OpcStr, " $dst, $src"),
+                 [(set FPRegs:$dst, (OpNode FPRegs:$src))]>;
+
+class DFPUnaryOp :
+        InstARM<(ops DFPRegs:$dst, DFPRegs:$src),
+                 !strconcat(OpcStr, " $dst, $src"),
+                 [(set DFPRegs:$dst, (OpNode DFPRegs:$src))]>;
+
 class Addr1BinOp :
         InstARM<(ops IntRegs:$dst, IntRegs:$a, op_addr_mode1:$b),
                  !strconcat(OpcStr, " $dst, $a, $b"),
@@ -280,21 +290,10 @@
 def FSUBS   : FPBinOp<"fsubs",  fsub>;
 def FSUBD   : DFPBinOp<"fsubd", fsub>;
 
-def FNEGS   : InstARM<(ops FPRegs:$dst, FPRegs:$src),
-                       "fnegs $dst, $src",
-		       [(set FPRegs:$dst, (fneg FPRegs:$src))]>;
-
-def FNEGD   : InstARM<(ops DFPRegs:$dst, DFPRegs:$src),
-                       "fnegd $dst, $src",
-		       [(set DFPRegs:$dst, (fneg DFPRegs:$src))]>;
-
-def FABSS   : InstARM<(ops FPRegs:$dst, FPRegs:$src),
-                       "fabss $dst, $src",
-		       [(set FPRegs:$dst, (fabs FPRegs:$src))]>;
-
-def FABSD   : InstARM<(ops DFPRegs:$dst, DFPRegs:$src),
-                       "fabsd $dst, $src",
-		       [(set DFPRegs:$dst, (fabs DFPRegs:$src))]>;
+def FNEGS   : FPUnaryOp<"fnegs",  fneg>;
+def FNEGD   : DFPUnaryOp<"fnegd", fneg>;
+def FABSS   : FPUnaryOp<"fabss",  fabs>;
+def FABSD   : DFPUnaryOp<"fabsd", fabs>;
 
 def FMULS   : FPBinOp<"fmuls", fmul>;
 def FMULD   : DFPBinOp<"fmuld", fmul>;





From sabre at nondot.org  Tue Oct 17 17:07:02 2006
From: sabre at nondot.org (Chris Lattner)
Date: Tue, 17 Oct 2006 17:07:02 -0500
Subject: [llvm-commits] CVS: llvm/lib/CodeGen/DwarfWriter.cpp
	MachineDebugInfo.cpp
Message-ID: <200610172207.k9HM72Jm012555@zion.cs.uiuc.edu>



Changes in directory llvm/lib/CodeGen:

DwarfWriter.cpp updated: 1.82 -> 1.83
MachineDebugInfo.cpp updated: 1.48 -> 1.49
---
Log message:

Do not leak all of the SourceLineInfo objects.  Do not bother mallocing each
one separately.


---
Diffs of the changes:  (+15 -14)

 DwarfWriter.cpp      |   27 ++++++++++++++-------------
 MachineDebugInfo.cpp |    2 +-
 2 files changed, 15 insertions(+), 14 deletions(-)


Index: llvm/lib/CodeGen/DwarfWriter.cpp
diff -u llvm/lib/CodeGen/DwarfWriter.cpp:1.82 llvm/lib/CodeGen/DwarfWriter.cpp:1.83
--- llvm/lib/CodeGen/DwarfWriter.cpp:1.82	Tue Oct 17 12:17:24 2006
+++ llvm/lib/CodeGen/DwarfWriter.cpp	Tue Oct 17 17:06:46 2006
@@ -2178,7 +2178,7 @@
   // A sequence for each text section.
   for (unsigned j = 0, M = SectionSourceLines.size(); j < M; ++j) {
     // Isolate current sections line info.
-    const std::vector &LineInfos = SectionSourceLines[j];
+    const std::vector &LineInfos = SectionSourceLines[j];
     
     if (DwarfVerbose) {
       O << "\t"
@@ -2193,40 +2193,40 @@
     
     // Construct rows of the address, source, line, column matrix.
     for (unsigned i = 0, N = LineInfos.size(); i < N; ++i) {
-      SourceLineInfo *LineInfo = LineInfos[i];
+      const SourceLineInfo &LineInfo = LineInfos[i];
       
       if (DwarfVerbose) {
-        unsigned SourceID = LineInfo->getSourceID();
+        unsigned SourceID = LineInfo.getSourceID();
         const SourceFileInfo &SourceFile = SourceFiles[SourceID];
         unsigned DirectoryID = SourceFile.getDirectoryID();
         O << "\t"
           << TAI->getCommentString() << " "
           << Directories[DirectoryID]
           << SourceFile.getName() << ":"
-          << LineInfo->getLine() << "\n"; 
+          << LineInfo.getLine() << "\n"; 
       }
 
       // Define the line address.
       EmitInt8(0); EOL("Extended Op");
       EmitInt8(4 + 1); EOL("Op size");
       EmitInt8(DW_LNE_set_address); EOL("DW_LNE_set_address");
-      EmitReference("loc",  LineInfo->getLabelID()); EOL("Location label");
+      EmitReference("loc",  LineInfo.getLabelID()); EOL("Location label");
       
       // If change of source, then switch to the new source.
-      if (Source != LineInfo->getSourceID()) {
-        Source = LineInfo->getSourceID();
+      if (Source != LineInfo.getSourceID()) {
+        Source = LineInfo.getSourceID();
         EmitInt8(DW_LNS_set_file); EOL("DW_LNS_set_file");
         EmitULEB128Bytes(Source); EOL("New Source");
       }
       
       // If change of line.
-      if (Line != LineInfo->getLine()) {
+      if (Line != LineInfo.getLine()) {
         // Determine offset.
-        int Offset = LineInfo->getLine() - Line;
+        int Offset = LineInfo.getLine() - Line;
         int Delta = Offset - MinLineDelta;
         
         // Update line.
-        Line = LineInfo->getLine();
+        Line = LineInfo.getLine();
         
         // If delta is small enough and in range...
         if (Delta >= 0 && Delta < (MaxLineDelta - 1)) {
@@ -2635,13 +2635,13 @@
   EmitLabel("func_end", SubprogramCount);
     
   // Get function line info.
-  std::vector &LineInfos = DebugInfo->getSourceLines();
+  const std::vector &LineInfos = DebugInfo->getSourceLines();
 
   if (!LineInfos.empty()) {
     // Get section line info.
     unsigned ID = SectionMap.insert(Asm->CurrentSection);
     if (SectionSourceLines.size() < ID) SectionSourceLines.resize(ID);
-    std::vector &SectionLineInfos =SectionSourceLines[ID-1];
+    std::vector &SectionLineInfos = SectionSourceLines[ID-1];
     // Append the function info to section info.
     SectionLineInfos.insert(SectionLineInfos.end(),
                             LineInfos.begin(), LineInfos.end());
@@ -2654,7 +2654,8 @@
   EmitFunctionDebugFrame();
   
   // Reset the line numbers for the next function.
-  LineInfos.clear();
+  // FIXME: move this to release memory of the debuginfo object.
+  DebugInfo->ClearLineInfo();
 
   // Clear function debug information.
   DebugInfo->EndFunction();


Index: llvm/lib/CodeGen/MachineDebugInfo.cpp
diff -u llvm/lib/CodeGen/MachineDebugInfo.cpp:1.48 llvm/lib/CodeGen/MachineDebugInfo.cpp:1.49
--- llvm/lib/CodeGen/MachineDebugInfo.cpp:1.48	Fri Oct 13 08:01:34 2006
+++ llvm/lib/CodeGen/MachineDebugInfo.cpp	Tue Oct 17 17:06:46 2006
@@ -1538,7 +1538,7 @@
 unsigned MachineDebugInfo::RecordLabel(unsigned Line, unsigned Column,
                                        unsigned Source) {
   unsigned ID = NextLabelID();
-  Lines.push_back(new SourceLineInfo(Line, Column, Source, ID));
+  Lines.push_back(SourceLineInfo(Line, Column, Source, ID));
   return ID;
 }
 





From sabre at nondot.org  Tue Oct 17 17:12:32 2006
From: sabre at nondot.org (Chris Lattner)
Date: Tue, 17 Oct 2006 17:12:32 -0500
Subject: [llvm-commits] CVS: llvm/include/llvm/Target/TargetInstrInfo.h
Message-ID: <200610172212.k9HMCW5S026739@zion.cs.uiuc.edu>



Changes in directory llvm/include/llvm/Target:

TargetInstrInfo.h updated: 1.94 -> 1.95
---
Log message:

update comment


---
Diffs of the changes:  (+4 -2)

 TargetInstrInfo.h |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)


Index: llvm/include/llvm/Target/TargetInstrInfo.h
diff -u llvm/include/llvm/Target/TargetInstrInfo.h:1.94 llvm/include/llvm/Target/TargetInstrInfo.h:1.95
--- llvm/include/llvm/Target/TargetInstrInfo.h:1.94	Fri Oct 13 16:02:27 2006
+++ llvm/include/llvm/Target/TargetInstrInfo.h	Tue Oct 17 17:12:15 2006
@@ -276,9 +276,11 @@
   /// implemented for a target).  Upon success, this returns false and returns
   /// with the following information in various cases:
   ///
-  /// 1. If this block ends with only an unconditional branch, it sets TBB to be
+  /// 1. If this block ends with no branches (it just falls through to its succ)
+  ///    just return false, leaving TBB/FBB null.
+  /// 2. If this block ends with only an unconditional branch, it sets TBB to be
   ///    the destination block.
-  /// 2. If this block ends with an conditional branch, it returns the 'true'
+  /// 3. If this block ends with an conditional branch, it returns the 'true'
   ///    destination in TBB, the 'false' destination in FBB, and a list of
   ///    operands that evaluate the condition.  These operands can be passed to
   ///    other TargetInstrInfo methods to create new branches.





From sabre at nondot.org  Tue Oct 17 17:39:21 2006
From: sabre at nondot.org (Chris Lattner)
Date: Tue, 17 Oct 2006 17:39:21 -0500
Subject: [llvm-commits] CVS: llvm/include/llvm/Target/TargetInstrInfo.h
Message-ID: <200610172239.k9HMdLpL028224@zion.cs.uiuc.edu>



Changes in directory llvm/include/llvm/Target:

TargetInstrInfo.h updated: 1.95 -> 1.96
---
Log message:

expose DWARF_LABEL opcode# so the branch folder can update debug info properly.



---
Diffs of the changes:  (+7 -0)

 TargetInstrInfo.h |    7 +++++++
 1 files changed, 7 insertions(+)


Index: llvm/include/llvm/Target/TargetInstrInfo.h
diff -u llvm/include/llvm/Target/TargetInstrInfo.h:1.95 llvm/include/llvm/Target/TargetInstrInfo.h:1.96
--- llvm/include/llvm/Target/TargetInstrInfo.h:1.95	Tue Oct 17 17:12:15 2006
+++ llvm/include/llvm/Target/TargetInstrInfo.h	Tue Oct 17 17:39:05 2006
@@ -219,6 +219,13 @@
     return get(Opcode).Flags & M_VARIABLE_OPS;
   }
 
+  /// getDWARF_LABELOpcode - Return the opcode of the target's DWARF_LABEL
+  /// instruction if it has one.  This is used by codegen passes that update
+  /// DWARF line number info as they modify the code.
+  virtual unsigned getDWARF_LABELOpcode() const {
+    return 0;
+  }
+  
   /// Return true if the instruction is a register to register move
   /// and leave the source and dest operands in the passed parameters.
   virtual bool isMoveInstr(const MachineInstr& MI,





From sabre at nondot.org  Tue Oct 17 17:39:48 2006
From: sabre at nondot.org (Chris Lattner)
Date: Tue, 17 Oct 2006 17:39:48 -0500
Subject: [llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCInstrInfo.h
Message-ID: <200610172239.k9HMdmuL028504@zion.cs.uiuc.edu>



Changes in directory llvm/lib/Target/PowerPC:

PPCInstrInfo.h updated: 1.17 -> 1.18
---
Log message:

expose DWARF_LABEL opcode# so the branch folder can update debug info properly.



---
Diffs of the changes:  (+7 -0)

 PPCInstrInfo.h |    7 +++++++
 1 files changed, 7 insertions(+)


Index: llvm/lib/Target/PowerPC/PPCInstrInfo.h
diff -u llvm/lib/Target/PowerPC/PPCInstrInfo.h:1.17 llvm/lib/Target/PowerPC/PPCInstrInfo.h:1.18
--- llvm/lib/Target/PowerPC/PPCInstrInfo.h:1.17	Fri Oct 13 16:21:17 2006
+++ llvm/lib/Target/PowerPC/PPCInstrInfo.h	Tue Oct 17 17:39:33 2006
@@ -77,6 +77,13 @@
   /// This is used for addressing modes.
   virtual const TargetRegisterClass *getPointerRegClass() const;  
 
+  /// getDWARF_LABELOpcode - Return the opcode of the target's DWARF_LABEL
+  /// instruction if it has one.  This is used by codegen passes that update
+  /// DWARF line number info as they modify the code.
+  virtual unsigned getDWARF_LABELOpcode() const {
+    return PPC::DWARF_LABEL;
+  }
+  
   // Return true if the instruction is a register to register move and
   // leave the source and dest operands in the passed parameters.
   //





From sabre at nondot.org  Tue Oct 17 17:41:59 2006
From: sabre at nondot.org (Chris Lattner)
Date: Tue, 17 Oct 2006 17:41:59 -0500
Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86InstrInfo.cpp
	X86InstrInfo.h
Message-ID: <200610172241.k9HMfxtZ028590@zion.cs.uiuc.edu>



Changes in directory llvm/lib/Target/X86:

X86InstrInfo.cpp updated: 1.62 -> 1.63
X86InstrInfo.h updated: 1.55 -> 1.56
---
Log message:

expose DWARF_LABEL opcode# so the branch folder can update debug info properly.



---
Diffs of the changes:  (+12 -0)

 X86InstrInfo.cpp |    7 +++++++
 X86InstrInfo.h   |    5 +++++
 2 files changed, 12 insertions(+)


Index: llvm/lib/Target/X86/X86InstrInfo.cpp
diff -u llvm/lib/Target/X86/X86InstrInfo.cpp:1.62 llvm/lib/Target/X86/X86InstrInfo.cpp:1.63
--- llvm/lib/Target/X86/X86InstrInfo.cpp:1.62	Fri Oct 13 15:40:42 2006
+++ llvm/lib/Target/X86/X86InstrInfo.cpp	Tue Oct 17 17:41:45 2006
@@ -25,6 +25,13 @@
     TM(tm), RI(tm, *this) {
 }
 
+/// getDWARF_LABELOpcode - Return the opcode of the target's DWARF_LABEL
+/// instruction if it has one.  This is used by codegen passes that update
+/// DWARF line number info as they modify the code.
+unsigned X86InstrInfo::getDWARF_LABELOpcode() const {
+  return X86::DWARF_LABEL;
+}
+
 
 bool X86InstrInfo::isMoveInstr(const MachineInstr& MI,
                                unsigned& sourceReg,


Index: llvm/lib/Target/X86/X86InstrInfo.h
diff -u llvm/lib/Target/X86/X86InstrInfo.h:1.55 llvm/lib/Target/X86/X86InstrInfo.h:1.56
--- llvm/lib/Target/X86/X86InstrInfo.h:1.55	Fri Oct 13 15:40:42 2006
+++ llvm/lib/Target/X86/X86InstrInfo.h	Tue Oct 17 17:41:45 2006
@@ -205,6 +205,11 @@
   unsigned isLoadFromStackSlot(MachineInstr *MI, int &FrameIndex) const;
   unsigned isStoreToStackSlot(MachineInstr *MI, int &FrameIndex) const;
   
+  /// getDWARF_LABELOpcode - Return the opcode of the target's DWARF_LABEL
+  /// instruction if it has one.  This is used by codegen passes that update
+  /// DWARF line number info as they modify the code.
+  virtual unsigned getDWARF_LABELOpcode() const;
+  
   /// convertToThreeAddress - This method must be implemented by targets that
   /// set the M_CONVERTIBLE_TO_3_ADDR flag.  When this flag is set, the target
   /// may be able to convert a two-address instruction into a true





From sabre at nondot.org  Tue Oct 17 16:47:28 2006
From: sabre at nondot.org (Chris Lattner)
Date: Tue, 17 Oct 2006 16:47:28 -0500
Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
Message-ID: <200610172147.k9HLlSCK020701@zion.cs.uiuc.edu>



Changes in directory llvm/lib/CodeGen/SelectionDAG:

SelectionDAG.cpp updated: 1.354 -> 1.355
---
Log message:

Trivial patch to speed up legalizing common i64 constants.


---
Diffs of the changes:  (+7 -0)

 SelectionDAG.cpp |    7 +++++++
 1 files changed, 7 insertions(+)


Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.354 llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.355
--- llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.354	Tue Oct 17 16:14:32 2006
+++ llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp	Tue Oct 17 16:47:13 2006
@@ -1234,6 +1234,13 @@
     if (N2C && N2C->getValue() == 0)
       return N2;
     break;
+  case ISD::OR:
+  case ISD::XOR:
+    // (X ^| 0) -> X.  This commonly occurs when legalizing i64 values, so it's
+    // worth handling here.
+    if (N2C && N2C->getValue() == 0)
+      return N1;
+    break;
   case ISD::FP_ROUND_INREG:
     if (cast(N2)->getVT() == VT) return N1;  // Not actually rounding.
     break;





From sabre at nondot.org  Tue Oct 17 17:07:01 2006
From: sabre at nondot.org (Chris Lattner)
Date: Tue, 17 Oct 2006 17:07:01 -0500
Subject: [llvm-commits] CVS: llvm/include/llvm/CodeGen/DwarfWriter.h
	MachineDebugInfo.h
Message-ID: <200610172207.k9HM71HK012548@zion.cs.uiuc.edu>



Changes in directory llvm/include/llvm/CodeGen:

DwarfWriter.h updated: 1.40 -> 1.41
MachineDebugInfo.h updated: 1.40 -> 1.41
---
Log message:

Do not leak all of the SourceLineInfo objects.  Do not bother mallocing each
one separately.


---
Diffs of the changes:  (+8 -3)

 DwarfWriter.h      |    2 +-
 MachineDebugInfo.h |    9 +++++++--
 2 files changed, 8 insertions(+), 3 deletions(-)


Index: llvm/include/llvm/CodeGen/DwarfWriter.h
diff -u llvm/include/llvm/CodeGen/DwarfWriter.h:1.40 llvm/include/llvm/CodeGen/DwarfWriter.h:1.41
--- llvm/include/llvm/CodeGen/DwarfWriter.h:1.40	Thu Sep  7 17:06:40 2006
+++ llvm/include/llvm/CodeGen/DwarfWriter.h	Tue Oct 17 17:06:46 2006
@@ -151,7 +151,7 @@
   
   /// SectionSourceLines - Tracks line numbers per text section.
   ///
-  std::vector > SectionSourceLines;
+  std::vector > SectionSourceLines;
 
 
 public:


Index: llvm/include/llvm/CodeGen/MachineDebugInfo.h
diff -u llvm/include/llvm/CodeGen/MachineDebugInfo.h:1.40 llvm/include/llvm/CodeGen/MachineDebugInfo.h:1.41
--- llvm/include/llvm/CodeGen/MachineDebugInfo.h:1.40	Tue Oct 17 16:51:44 2006
+++ llvm/include/llvm/CodeGen/MachineDebugInfo.h	Tue Oct 17 17:06:46 2006
@@ -967,7 +967,7 @@
   UniqueVector SourceFiles;
 
   // Lines - List of of source line correspondence.
-  std::vector Lines;
+  std::vector Lines;
   
   // LabelID - Current number assigned to unique label numbers.
   unsigned LabelID;
@@ -1049,10 +1049,15 @@
   
   /// getSourceLines - Return a vector of source lines.
   ///
-  std::vector &getSourceLines() {
+  const std::vector &getSourceLines() const {
     return Lines;
   }
   
+  // FIXME: nuke this.
+  void ClearLineInfo() {
+    Lines.clear();
+  }
+  
   /// SetupCompileUnits - Set up the unique vector of compile units.
   ///
   void SetupCompileUnits(Module &M);





From sabre at nondot.org  Tue Oct 17 18:16:59 2006
From: sabre at nondot.org (Chris Lattner)
Date: Tue, 17 Oct 2006 18:16:59 -0500
Subject: [llvm-commits] CVS: llvm/include/llvm/CodeGen/MachineDebugInfo.h
Message-ID: <200610172316.k9HNGxxr029231@zion.cs.uiuc.edu>



Changes in directory llvm/include/llvm/CodeGen:

MachineDebugInfo.h updated: 1.41 -> 1.42
---
Log message:

add a method to remove a line # record.


---
Diffs of the changes:  (+5 -0)

 MachineDebugInfo.h |    5 +++++
 1 files changed, 5 insertions(+)


Index: llvm/include/llvm/CodeGen/MachineDebugInfo.h
diff -u llvm/include/llvm/CodeGen/MachineDebugInfo.h:1.41 llvm/include/llvm/CodeGen/MachineDebugInfo.h:1.42
--- llvm/include/llvm/CodeGen/MachineDebugInfo.h:1.41	Tue Oct 17 17:06:46 2006
+++ llvm/include/llvm/CodeGen/MachineDebugInfo.h	Tue Oct 17 18:16:42 2006
@@ -1029,6 +1029,11 @@
   /// provide correspondence to the source line list.
   unsigned RecordLabel(unsigned Line, unsigned Column, unsigned Source);
   
+  /// RemoveLabelInfo - Remove the specified label # from MachineDebugInfo, for
+  /// example because the code was deleted.
+  void RemoveLabelInfo(unsigned LabelUID);
+  
+  
   /// RecordSource - Register a source file with debug info. Returns an source
   /// ID.
   unsigned RecordSource(const std::string &Directory,





From sabre at nondot.org  Tue Oct 17 18:17:41 2006
From: sabre at nondot.org (Chris Lattner)
Date: Tue, 17 Oct 2006 18:17:41 -0500
Subject: [llvm-commits] CVS: llvm/lib/CodeGen/BranchFolding.cpp
Message-ID: <200610172317.k9HNHf8U029277@zion.cs.uiuc.edu>



Changes in directory llvm/lib/CodeGen:

BranchFolding.cpp updated: 1.13 -> 1.14
---
Log message:

Teach the branch folder to update debug info if it removes blocks with line
# notes in it.


---
Diffs of the changes:  (+23 -2)

 BranchFolding.cpp |   25 +++++++++++++++++++++++--
 1 files changed, 23 insertions(+), 2 deletions(-)


Index: llvm/lib/CodeGen/BranchFolding.cpp
diff -u llvm/lib/CodeGen/BranchFolding.cpp:1.13 llvm/lib/CodeGen/BranchFolding.cpp:1.14
--- llvm/lib/CodeGen/BranchFolding.cpp:1.13	Tue Oct 17 13:16:40 2006
+++ llvm/lib/CodeGen/BranchFolding.cpp	Tue Oct 17 18:17:27 2006
@@ -17,6 +17,7 @@
 //===----------------------------------------------------------------------===//
 
 #include "llvm/CodeGen/Passes.h"
+#include "llvm/CodeGen/MachineDebugInfo.h"
 #include "llvm/CodeGen/MachineFunctionPass.h"
 #include "llvm/CodeGen/MachineJumpTableInfo.h"
 #include "llvm/Target/TargetInstrInfo.h"
@@ -29,9 +30,11 @@
     virtual bool runOnMachineFunction(MachineFunction &MF);
     virtual const char *getPassName() const { return "Control Flow Optimizer"; }
     const TargetInstrInfo *TII;
+    MachineDebugInfo *MDI;
     bool MadeChange;
   private:
     void OptimizeBlock(MachineFunction::iterator MBB);
+    void RemoveDeadBlock(MachineBasicBlock *MBB);
   };
 }
 
@@ -39,12 +42,30 @@
 
 /// RemoveDeadBlock - Remove the specified dead machine basic block from the
 /// function, updating the CFG.
-static void RemoveDeadBlock(MachineBasicBlock *MBB) {
+void BranchFolder::RemoveDeadBlock(MachineBasicBlock *MBB) {
   assert(MBB->pred_empty() && "MBB must be dead!");
+  
   MachineFunction *MF = MBB->getParent();
   // drop all successors.
   while (!MBB->succ_empty())
     MBB->removeSuccessor(MBB->succ_end()-1);
+  
+  // If there is DWARF info to active, check to see if there are any DWARF_LABEL
+  // records in the basic block.  If so, unregister them from MachineDebugInfo.
+  if (MDI && !MBB->empty()) {
+    unsigned DWARF_LABELOpc = TII->getDWARF_LABELOpcode();
+    assert(DWARF_LABELOpc &&
+           "Target supports dwarf but didn't implement getDWARF_LABELOpcode!");
+    
+    for (MachineBasicBlock::iterator I = MBB->begin(), E = MBB->end();
+         I != E; ++I) {
+      if ((unsigned)I->getOpcode() == DWARF_LABELOpc) {
+        // The label ID # is always operand #0, an immediate.
+        MDI->RemoveLabelInfo(I->getOperand(0).getImm());
+      }
+    }
+  }
+  
   // Remove the block.
   MF->getBasicBlockList().erase(MBB);
 }
@@ -53,7 +74,7 @@
   TII = MF.getTarget().getInstrInfo();
   if (!TII) return false;
 
-  //MF.dump();
+  MDI = getAnalysisToUpdate();
   
   bool EverMadeChange = false;
   MadeChange = true;





From dpatel at apple.com  Tue Oct 17 18:48:34 2006
From: dpatel at apple.com (Devang Patel)
Date: Tue, 17 Oct 2006 16:48:34 -0700
Subject: [llvm-commits] Add predicate simplifier and control loop unrolling
Message-ID: <7939CCD7-9F1C-4940-A64D-AB3CB43F1DE3@apple.com>

This llvm-gcc4 patch enabled predicate simplification pass. And now  
loop unrolling is enabled only at -O2 or when -funroll-loops is used.

Index: llvm-backend.cpp
===================================================================
--- llvm-backend.cpp    (revision 119002)
+++ llvm-backend.cpp    (working copy)
@@ -234,6 +234,7 @@ void llvm_asm_file_start(void) {
      PM->add(createCFGSimplificationPass());    // Merge & remove BBs
      PM->add(createScalarReplAggregatesPass()); // Break up aggregate  
allocas
      PM->add(createInstructionCombiningPass()); // Combine silly seq's
+    PM->add(createPredicateSimplifierPass());  // Canonicalize  
registers
      PM->add(createCondPropagationPass());      // Propagate  
conditionals
      PM->add(createTailCallEliminationPass());  // Eliminate tail calls
      PM->add(createCFGSimplificationPass());    // Merge & remove BBs
@@ -242,7 +243,8 @@ void llvm_asm_file_start(void) {
      PM->add(createLoopUnswitchPass());         // Unswitch loops.
      PM->add(createInstructionCombiningPass()); // Clean up after  
LICM/reassoc
      PM->add(createIndVarSimplifyPass());       // Canonicalize indvars
-    PM->add(createLoopUnrollPass());           // Unroll small loops
+    if (flag_unroll_loops || optimize > 2)
+      PM->add(createLoopUnrollPass());           // Unroll small loops
      PM->add(createInstructionCombiningPass()); // Clean up after the  
unroller

      if (optimize > 2)



From sabre at nondot.org  Tue Oct 17 18:16:59 2006
From: sabre at nondot.org (Chris Lattner)
Date: Tue, 17 Oct 2006 18:16:59 -0500
Subject: [llvm-commits] CVS: llvm/lib/CodeGen/MachineDebugInfo.cpp
Message-ID: <200610172316.k9HNGxVt029236@zion.cs.uiuc.edu>



Changes in directory llvm/lib/CodeGen:

MachineDebugInfo.cpp updated: 1.49 -> 1.50
---
Log message:

add a method to remove a line # record.


---
Diffs of the changes:  (+14 -0)

 MachineDebugInfo.cpp |   14 ++++++++++++++
 1 files changed, 14 insertions(+)


Index: llvm/lib/CodeGen/MachineDebugInfo.cpp
diff -u llvm/lib/CodeGen/MachineDebugInfo.cpp:1.49 llvm/lib/CodeGen/MachineDebugInfo.cpp:1.50
--- llvm/lib/CodeGen/MachineDebugInfo.cpp:1.49	Tue Oct 17 17:06:46 2006
+++ llvm/lib/CodeGen/MachineDebugInfo.cpp	Tue Oct 17 18:16:42 2006
@@ -1542,6 +1542,20 @@
   return ID;
 }
 
+static bool LabelUIDComparison(const SourceLineInfo &LI, unsigned UID) {
+  return LI.getLabelID() < UID;
+}
+
+/// RemoveLabelInfo - Remove the specified label # from MachineDebugInfo, for
+/// example because the code was deleted.
+void MachineDebugInfo::RemoveLabelInfo(unsigned LabelUID) {
+  std::vector::iterator I =
+    std::lower_bound(Lines.begin(), Lines.end(), LabelUID, LabelUIDComparison);
+  assert(I != Lines.end() && "Didn't find label UID in MachineDebugInfo!");
+  Lines.erase(I);
+}
+
+
 /// RecordSource - Register a source file with debug info. Returns an source
 /// ID.
 unsigned MachineDebugInfo::RecordSource(const std::string &Directory,





From clattner at apple.com  Tue Oct 17 19:44:41 2006
From: clattner at apple.com (Chris Lattner)
Date: Tue, 17 Oct 2006 17:44:41 -0700
Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86ATTAsmPrinter.cpp
	X86AsmPrinter.cpp
In-Reply-To: <200610172030.k9HKU3BZ028035@zion.cs.uiuc.edu>
References: <200610172030.k9HKU3BZ028035@zion.cs.uiuc.edu>
Message-ID: <5DD46AC7-CBF9-4CF0-93D1-E90B62472FA9@apple.com>


Anton, are you sure this is right?  linkonce is probably !=  
".linkonce".  Please check the semantics carefully, can you cite some  
docs on what ".linkonce" does?

Emitting LLVM linkonce symbols the same as LLVM weak symbols should  
always be safe.

Thanks,

-Chris

On Oct 17, 2006, at 1:30 PM, Anton Korobeynikov wrote:

>
>
> Changes in directory llvm/lib/Target/X86:
>
> X86ATTAsmPrinter.cpp updated: 1.67 -> 1.68
> X86AsmPrinter.cpp updated: 1.201 -> 1.202
> ---
> Log message:
>
> Adding linkonce linkage codegeneration support for mingw32\cygwin
> targets.
>
>
> ---
> Diffs of the changes:  (+26 -1)
>
>  X86ATTAsmPrinter.cpp |   14 +++++++++++++-
>  X86AsmPrinter.cpp    |   13 +++++++++++++
>  2 files changed, 26 insertions(+), 1 deletion(-)
>
>
> Index: llvm/lib/Target/X86/X86ATTAsmPrinter.cpp
> diff -u llvm/lib/Target/X86/X86ATTAsmPrinter.cpp:1.67 llvm/lib/ 
> Target/X86/X86ATTAsmPrinter.cpp:1.68
> --- llvm/lib/Target/X86/X86ATTAsmPrinter.cpp:1.67	Wed Oct  4  
> 22:01:21 2006
> +++ llvm/lib/Target/X86/X86ATTAsmPrinter.cpp	Tue Oct 17 15:29:49 2006
> @@ -89,13 +89,25 @@
>      EmitAlignment(4, F);     // FIXME: This should be  
> parameterized somewhere.
>      O << "\t.globl\t" << CurrentFnName << "\n";
>      break;
> -  case Function::WeakLinkage:
>    case Function::LinkOnceLinkage:
>      if (Subtarget->isTargetDarwin()) {
>        O << "\t.globl\t" << CurrentFnName << "\n";
>        O << "\t.weak_definition\t" << CurrentFnName << "\n";
>      } else if (Subtarget->isTargetCygwin()) {
>        EmitAlignment(4, F);     // FIXME: This should be  
> parameterized somewhere.
> +      O << "\t.linkonce discard\n";
> +      O << "\t.globl " << CurrentFnName << "\n";
> +    } else {
> +      EmitAlignment(4, F);     // FIXME: This should be  
> parameterized somewhere.
> +      O << "\t.weak " << CurrentFnName << "\n";
> +    }
> +    break;
> +  case Function::WeakLinkage:
> +    if (Subtarget->isTargetDarwin()) {
> +      O << "\t.globl\t" << CurrentFnName << "\n";
> +      O << "\t.weak_definition\t" << CurrentFnName << "\n";
> +    } else if (Subtarget->isTargetCygwin()) {
> +      EmitAlignment(4, F);     // FIXME: This should be  
> parameterized somewhere.
>        O << "\t.weak " << CurrentFnName << "\n";
>      } else {
>        EmitAlignment(4, F);     // FIXME: This should be  
> parameterized somewhere.
>
>
> Index: llvm/lib/Target/X86/X86AsmPrinter.cpp
> diff -u llvm/lib/Target/X86/X86AsmPrinter.cpp:1.201 llvm/lib/Target/ 
> X86/X86AsmPrinter.cpp:1.202
> --- llvm/lib/Target/X86/X86AsmPrinter.cpp:1.201	Sat Oct 14 15:53:35  
> 2006
> +++ llvm/lib/Target/X86/X86AsmPrinter.cpp	Tue Oct 17 15:29:49 2006
> @@ -174,6 +174,19 @@
>      } else {
>        switch (I->getLinkage()) {
>        case GlobalValue::LinkOnceLinkage:
> +        if (Subtarget->isTargetDarwin()) {
> +          O << "\t.globl " << name << "\n"
> +            << "\t.weak_definition " << name << "\n";
> +          SwitchToDataSection(".section  
> __DATA,__const_coal,coalesced", I);
> +        } else if (Subtarget->isTargetCygwin()) {
> +          O << "\t.section\t.llvm.linkonce.d." << name << ",\"aw\"\n"
> +            << "\t.globl " << name << "\n"
> +            << "\t.linkonce same_size\n";
> +        } else {
> +          O << "\t.section\t.llvm.linkonce.d." << name << ",\"aw 
> \", at progbits\n"
> +            << "\t.weak " << name << "\n";
> +        }
> +        break;
>        case GlobalValue::WeakLinkage:
>          if (Subtarget->isTargetDarwin()) {
>            O << "\t.globl " << name << "\n"
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits



From dpatel at apple.com  Tue Oct 17 20:17:11 2006
From: dpatel at apple.com (Devang Patel)
Date: Tue, 17 Oct 2006 18:17:11 -0700
Subject: [llvm-commits] Add predicate simplifier and control loop
	unrolling
In-Reply-To: <7939CCD7-9F1C-4940-A64D-AB3CB43F1DE3@apple.com>
References: <7939CCD7-9F1C-4940-A64D-AB3CB43F1DE3@apple.com>
Message-ID: <94A2E404-5BA9-49C7-AB72-8744E3AE1D83@apple.com>

Now, loop unrolling is enable at -O2 only if it is not explicitly set/ 
reset using -f[no-]unroll-loops.

-
Devang

Index: opts.c
===================================================================
--- opts.c      (revision 118611)
+++ opts.c      (working copy)
@@ -548,6 +548,11 @@ void set_flags_from_O (unsigned int cmdl
            /* PRE tends to generate bigger code.  */
            flag_tree_pre = 1;
         }
+      /* APPLE LOCAL begin LLVM */
+      /* Enable loop unrolling at -O2 if -f[no-]unroll-loops is not  
used.  */
+      if (!flag_unroll_loops_set)
+        flag_unroll_loops = 1;
+      /* APPLE LOCAL end LLVM */
      }

    if (optimize >= 3)
Index: llvm-backend.cpp
===================================================================
--- llvm-backend.cpp    (revision 119003)
+++ llvm-backend.cpp    (working copy)
@@ -243,7 +243,7 @@ void llvm_asm_file_start(void) {
      PM->add(createLoopUnswitchPass());         // Unswitch loops.
      PM->add(createInstructionCombiningPass()); // Clean up after  
LICM/reassoc
      PM->add(createIndVarSimplifyPass());       // Canonicalize indvars
-    if (flag_unroll_loops || optimize > 1)
+    if (flag_unroll_loops)
        PM->add(createLoopUnrollPass());           // Unroll small loops
      PM->add(createInstructionCombiningPass()); // Clean up after the  
unroller



From sabre at nondot.org  Tue Oct 17 20:19:02 2006
From: sabre at nondot.org (Chris Lattner)
Date: Tue, 17 Oct 2006 20:19:02 -0500
Subject: [llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCISelLowering.cpp
Message-ID: <200610180119.k9I1J2Rt031100@zion.cs.uiuc.edu>



Changes in directory llvm/lib/Target/PowerPC:

PPCISelLowering.cpp updated: 1.212 -> 1.213
---
Log message:

Expand alloca for ppc64


---
Diffs of the changes:  (+2 -1)

 PPCISelLowering.cpp |    3 ++-
 1 files changed, 2 insertions(+), 1 deletion(-)


Index: llvm/lib/Target/PowerPC/PPCISelLowering.cpp
diff -u llvm/lib/Target/PowerPC/PPCISelLowering.cpp:1.212 llvm/lib/Target/PowerPC/PPCISelLowering.cpp:1.213
--- llvm/lib/Target/PowerPC/PPCISelLowering.cpp:1.212	Fri Oct 13 16:14:26 2006
+++ llvm/lib/Target/PowerPC/PPCISelLowering.cpp	Tue Oct 17 20:18:48 2006
@@ -153,7 +153,8 @@
   setOperationAction(ISD::STACKSAVE         , MVT::Other, Expand); 
   setOperationAction(ISD::STACKRESTORE      , MVT::Other, Expand);
   setOperationAction(ISD::DYNAMIC_STACKALLOC, MVT::i32  , Expand);
-  
+  setOperationAction(ISD::DYNAMIC_STACKALLOC, MVT::i64  , Expand);
+
   // We want to custom lower some of our intrinsics.
   setOperationAction(ISD::INTRINSIC_WO_CHAIN, MVT::Other, Custom);
   





From sabre at nondot.org  Tue Oct 17 20:20:57 2006
From: sabre at nondot.org (Chris Lattner)
Date: Tue, 17 Oct 2006 20:20:57 -0500
Subject: [llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCISelLowering.cpp
Message-ID: <200610180120.k9I1KvOh031179@zion.cs.uiuc.edu>



Changes in directory llvm/lib/Target/PowerPC:

PPCISelLowering.cpp updated: 1.213 -> 1.214
---
Log message:

set the ppc64 stack pointer right, dynamic alloca now works for ppc64



---
Diffs of the changes:  (+5 -1)

 PPCISelLowering.cpp |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletion(-)


Index: llvm/lib/Target/PowerPC/PPCISelLowering.cpp
diff -u llvm/lib/Target/PowerPC/PPCISelLowering.cpp:1.213 llvm/lib/Target/PowerPC/PPCISelLowering.cpp:1.214
--- llvm/lib/Target/PowerPC/PPCISelLowering.cpp:1.213	Tue Oct 17 20:18:48 2006
+++ llvm/lib/Target/PowerPC/PPCISelLowering.cpp	Tue Oct 17 20:20:43 2006
@@ -261,7 +261,11 @@
   setSetCCResultType(MVT::i32);
   setShiftAmountType(MVT::i32);
   setSetCCResultContents(ZeroOrOneSetCCResult);
-  setStackPointerRegisterToSaveRestore(PPC::R1);
+  
+  if (TM.getSubtarget().isPPC64())
+    setStackPointerRegisterToSaveRestore(PPC::X1);
+  else 
+    setStackPointerRegisterToSaveRestore(PPC::R1);
   
   // We have target-specific dag combine patterns for the following nodes:
   setTargetDAGCombine(ISD::SINT_TO_FP);





From sabre at nondot.org  Tue Oct 17 20:21:49 2006
From: sabre at nondot.org (Chris Lattner)
Date: Tue, 17 Oct 2006 20:21:49 -0500
Subject: [llvm-commits] CVS:
	llvm/test/Regression/CodeGen/PowerPC/2006-10-17-ppc64-alloca.ll
Message-ID: <200610180121.k9I1Lnlf031242@zion.cs.uiuc.edu>



Changes in directory llvm/test/Regression/CodeGen/PowerPC:

2006-10-17-ppc64-alloca.ll added (r1.1)
---
Log message:

new testcase


---
Diffs of the changes:  (+6 -0)

 2006-10-17-ppc64-alloca.ll |    6 ++++++
 1 files changed, 6 insertions(+)


Index: llvm/test/Regression/CodeGen/PowerPC/2006-10-17-ppc64-alloca.ll
diff -c /dev/null llvm/test/Regression/CodeGen/PowerPC/2006-10-17-ppc64-alloca.ll:1.1
*** /dev/null	Tue Oct 17 20:21:45 2006
--- llvm/test/Regression/CodeGen/PowerPC/2006-10-17-ppc64-alloca.ll	Tue Oct 17 20:21:35 2006
***************
*** 0 ****
--- 1,6 ----
+ ; RUN: llvm-as < %s | llc -march=ppc64
+ 
+ int * %foo(uint %n) {
+ 	%A = alloca int, uint %n
+ 	ret int* %A
+ }





From resistor at mac.com  Tue Oct 17 21:20:09 2006
From: resistor at mac.com (Owen Anderson)
Date: Tue, 17 Oct 2006 21:20:09 -0500
Subject: [llvm-commits] CVS: llvm/lib/AsmParser/llvmAsmParser.y Lexer.l
Message-ID: <200610180220.k9I2K9BE032160@zion.cs.uiuc.edu>



Changes in directory llvm/lib/AsmParser:

llvmAsmParser.y updated: 1.265 -> 1.266
Lexer.l updated: 1.77 -> 1.78
---
Log message:

Add support for the new "target data" information in .ll files.  This provides 
a better encoding of the targets data layout, rather than trying to guess it
from the endianness and pointersize like before.


---
Diffs of the changes:  (+7 -0)

 Lexer.l         |    1 +
 llvmAsmParser.y |    6 ++++++
 2 files changed, 7 insertions(+)


Index: llvm/lib/AsmParser/llvmAsmParser.y
diff -u llvm/lib/AsmParser/llvmAsmParser.y:1.265 llvm/lib/AsmParser/llvmAsmParser.y:1.266
--- llvm/lib/AsmParser/llvmAsmParser.y:1.265	Sun Oct 15 18:26:46 2006
+++ llvm/lib/AsmParser/llvmAsmParser.y	Tue Oct 17 21:19:55 2006
@@ -1068,6 +1068,7 @@
 %token DEPLIBS CALL TAIL ASM_TOK MODULE SIDEEFFECT
 %token CC_TOK CCC_TOK CSRETCC_TOK FASTCC_TOK COLDCC_TOK
 %token X86_STDCALLCC_TOK X86_FASTCALLCC_TOK
+%token DATA
 %type  OptCallingConv
 
 // Basic Block Terminating Operators
@@ -1873,6 +1874,11 @@
     free($3);
     CHECK_FOR_ERROR
   };
+  | DATA '=' STRINGCONSTANT {
+    CurModule.CurrentModule->setDataLayout($3);
+    free($3);
+    CHECK_FOR_ERROR
+  };
 
 LibrariesDefinition : '[' LibList ']';
 


Index: llvm/lib/AsmParser/Lexer.l
diff -u llvm/lib/AsmParser/Lexer.l:1.77 llvm/lib/AsmParser/Lexer.l:1.78
--- llvm/lib/AsmParser/Lexer.l:1.77	Sun Sep 17 15:25:45 2006
+++ llvm/lib/AsmParser/Lexer.l	Tue Oct 17 21:19:55 2006
@@ -210,6 +210,7 @@
 deplibs         { return DEPLIBS; }
 endian          { return ENDIAN; }
 pointersize     { return POINTERSIZE; }
+data          { return DATA; }
 little          { return LITTLE; }
 big             { return BIG; }
 volatile        { return VOLATILE; }





From resistor at mac.com  Tue Oct 17 21:21:28 2006
From: resistor at mac.com (Owen Anderson)
Date: Tue, 17 Oct 2006 21:21:28 -0500
Subject: [llvm-commits] CVS: llvm/include/llvm/Module.h
Message-ID: <200610180221.k9I2LSBS032202@zion.cs.uiuc.edu>



Changes in directory llvm/include/llvm:

Module.h updated: 1.73 -> 1.74
---
Log message:

Add support for the new "target data" information in .ll files.  This provides 
a better encoding of the targets data layout, rather than trying to guess it
from the endianness and pointersize like before.


---
Diffs of the changes:  (+8 -0)

 Module.h |    8 ++++++++
 1 files changed, 8 insertions(+)


Index: llvm/include/llvm/Module.h
diff -u llvm/include/llvm/Module.h:1.73 llvm/include/llvm/Module.h:1.74
--- llvm/include/llvm/Module.h:1.73	Wed May 31 11:40:28 2006
+++ llvm/include/llvm/Module.h	Tue Oct 17 21:21:12 2006
@@ -116,6 +116,11 @@
   /// @returns the module identifier as a string
   const std::string &getModuleIdentifier() const { return ModuleID; }
 
+  /// Get the data layout string for the module's target platform.  This encodes
+  /// the type sizes and alignments expected by this module.
+  /// @returns the data layout as a string
+  std::string getDataLayout() const { return DataLayout; }
+
   /// Get the target triple which is a string describing the target host.
   /// @returns a string containing the target triple.
   const std::string &getTargetTriple() const { return TargetTriple; }
@@ -139,6 +144,9 @@
   /// Set the module identifier.
   void setModuleIdentifier(const std::string &ID) { ModuleID = ID; }
 
+  /// Set the data layout
+  void setDataLayout(std::string DL) { DataLayout = DL; }
+
   /// Set the target triple.
   void setTargetTriple(const std::string &T) { TargetTriple = T; }
 





From resistor at mac.com  Tue Oct 17 21:21:27 2006
From: resistor at mac.com (Owen Anderson)
Date: Tue, 17 Oct 2006 21:21:27 -0500
Subject: [llvm-commits] CVS: llvm/lib/VMCore/AsmWriter.cpp
Message-ID: <200610180221.k9I2LRTb032197@zion.cs.uiuc.edu>



Changes in directory llvm/lib/VMCore:

AsmWriter.cpp updated: 1.207 -> 1.208
---
Log message:

Add support for the new "target data" information in .ll files.  This provides 
a better encoding of the targets data layout, rather than trying to guess it
from the endianness and pointersize like before.


---
Diffs of the changes:  (+3 -0)

 AsmWriter.cpp |    3 +++
 1 files changed, 3 insertions(+)


Index: llvm/lib/VMCore/AsmWriter.cpp
diff -u llvm/lib/VMCore/AsmWriter.cpp:1.207 llvm/lib/VMCore/AsmWriter.cpp:1.208
--- llvm/lib/VMCore/AsmWriter.cpp:1.207	Thu Sep 28 17:50:29 2006
+++ llvm/lib/VMCore/AsmWriter.cpp	Tue Oct 17 21:21:12 2006
@@ -781,6 +781,9 @@
       M->getModuleIdentifier().find('\n') == std::string::npos)
     Out << "; ModuleID = '" << M->getModuleIdentifier() << "'\n";
 
+  if (!M->getDataLayout().empty())
+    Out << "target data = \"" << M->getDataLayout() << "\"\n";
+
   switch (M->getEndianness()) {
   case Module::LittleEndian: Out << "target endian = little\n"; break;
   case Module::BigEndian:    Out << "target endian = big\n";    break;





From resistor at mac.com  Tue Oct 17 21:22:02 2006
From: resistor at mac.com (Owen Anderson)
Date: Tue, 17 Oct 2006 21:22:02 -0500
Subject: [llvm-commits] CVS: llvm/lib/AsmParser/Lexer.cpp.cvs Lexer.l.cvs
	llvmAsmParser.cpp.cvs llvmAsmParser.h.cvs llvmAsmParser.y.cvs
Message-ID: <200610180222.k9I2M2uw032231@zion.cs.uiuc.edu>



Changes in directory llvm/lib/AsmParser:

Lexer.cpp.cvs updated: 1.9 -> 1.10
Lexer.l.cvs updated: 1.7 -> 1.8
llvmAsmParser.cpp.cvs updated: 1.17 -> 1.18
llvmAsmParser.h.cvs updated: 1.12 -> 1.13
llvmAsmParser.y.cvs updated: 1.17 -> 1.18
---
Log message:

Add support for the new "target data" information in .ll files.  This provides 
a better encoding of the targets data layout, rather than trying to guess it
from the endianness and pointersize like before.

Update the generated files.


---
Diffs of the changes:  (+2224 -2372)

 Lexer.cpp.cvs         | 2804 +++++++++++++++++++++++---------------------------
 Lexer.l.cvs           |    1 
 llvmAsmParser.cpp.cvs | 1684 +++++++++++++++---------------
 llvmAsmParser.h.cvs   |   75 -
 llvmAsmParser.y.cvs   |    6 
 5 files changed, 2223 insertions(+), 2347 deletions(-)


Index: llvm/lib/AsmParser/Lexer.cpp.cvs
diff -u llvm/lib/AsmParser/Lexer.cpp.cvs:1.9 llvm/lib/AsmParser/Lexer.cpp.cvs:1.10
--- llvm/lib/AsmParser/Lexer.cpp.cvs:1.9	Sun Sep 17 15:25:45 2006
+++ llvm/lib/AsmParser/Lexer.cpp.cvs	Tue Oct 17 21:21:48 2006
@@ -1,94 +1,51 @@
-#line 2 "Lexer.cpp"
-
-#line 4 "Lexer.cpp"
-
-#define  YY_INT_ALIGNED short int
+#define yy_create_buffer llvmAsm_create_buffer
+#define yy_delete_buffer llvmAsm_delete_buffer
+#define yy_scan_buffer llvmAsm_scan_buffer
+#define yy_scan_string llvmAsm_scan_string
+#define yy_scan_bytes llvmAsm_scan_bytes
+#define yy_flex_debug llvmAsm_flex_debug
+#define yy_init_buffer llvmAsm_init_buffer
+#define yy_flush_buffer llvmAsm_flush_buffer
+#define yy_load_buffer_state llvmAsm_load_buffer_state
+#define yy_switch_to_buffer llvmAsm_switch_to_buffer
+#define yyin llvmAsmin
+#define yyleng llvmAsmleng
+#define yylex llvmAsmlex
+#define yyout llvmAsmout
+#define yyrestart llvmAsmrestart
+#define yytext llvmAsmtext
+#define yylineno llvmAsmlineno
 
+#line 20 "Lexer.cpp"
 /* A lexical scanner generated by flex */
 
+/* Scanner skeleton version:
+ * $Header: /var/cvs/llvm/llvm/lib/AsmParser/Lexer.cpp.cvs,v 1.10 2006/10/18 02:21:48 resistor Exp $
+ */
+
 #define FLEX_SCANNER
 #define YY_FLEX_MAJOR_VERSION 2
 #define YY_FLEX_MINOR_VERSION 5
-#define YY_FLEX_SUBMINOR_VERSION 33
-#if YY_FLEX_SUBMINOR_VERSION > 0
-#define FLEX_BETA
-#endif
-
-/* First, we deal with  platform-specific or compiler-specific issues. */
 
-/* begin standard C headers. */
 #include 
-#include 
-#include 
-#include 
-
-/* end standard C headers. */
 
-/* flex integer type definitions */
-
-#ifndef FLEXINT_H
-#define FLEXINT_H
-
-/* C99 systems have . Non-C99 systems may or may not. */
-
-#if __STDC_VERSION__ >= 199901L
-
-/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
- * if you want the limit (max/min) macros for int types. 
- */
-#ifndef __STDC_LIMIT_MACROS
-#define __STDC_LIMIT_MACROS 1
-#endif
-
-#include 
-typedef int8_t flex_int8_t;
-typedef uint8_t flex_uint8_t;
-typedef int16_t flex_int16_t;
-typedef uint16_t flex_uint16_t;
-typedef int32_t flex_int32_t;
-typedef uint32_t flex_uint32_t;
-#else
-typedef signed char flex_int8_t;
-typedef short int flex_int16_t;
-typedef int flex_int32_t;
-typedef unsigned char flex_uint8_t; 
-typedef unsigned short int flex_uint16_t;
-typedef unsigned int flex_uint32_t;
-#endif /* ! C99 */
 
-/* Limits of integral types. */
-#ifndef INT8_MIN
-#define INT8_MIN               (-128)
+/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
+#ifdef c_plusplus
+#ifndef __cplusplus
+#define __cplusplus
 #endif
-#ifndef INT16_MIN
-#define INT16_MIN              (-32767-1)
-#endif
-#ifndef INT32_MIN
-#define INT32_MIN              (-2147483647-1)
-#endif
-#ifndef INT8_MAX
-#define INT8_MAX               (127)
-#endif
-#ifndef INT16_MAX
-#define INT16_MAX              (32767)
-#endif
-#ifndef INT32_MAX
-#define INT32_MAX              (2147483647)
-#endif
-#ifndef UINT8_MAX
-#define UINT8_MAX              (255U)
-#endif
-#ifndef UINT16_MAX
-#define UINT16_MAX             (65535U)
-#endif
-#ifndef UINT32_MAX
-#define UINT32_MAX             (4294967295U)
 #endif
 
-#endif /* ! FLEXINT_H */
 
 #ifdef __cplusplus
 
+#include 
+#include 
+
+/* Use prototypes in function declarations. */
+#define YY_USE_PROTOS
+
 /* The "const" storage-class-modifier is valid. */
 #define YY_USE_CONST
 
@@ -96,17 +53,34 @@
 
 #if __STDC__
 
+#define YY_USE_PROTOS
 #define YY_USE_CONST
 
 #endif	/* __STDC__ */
 #endif	/* ! __cplusplus */
 
+#ifdef __TURBOC__
+ #pragma warn -rch
+ #pragma warn -use
+#include 
+#include 
+#define YY_USE_CONST
+#define YY_USE_PROTOS
+#endif
+
 #ifdef YY_USE_CONST
 #define yyconst const
 #else
 #define yyconst
 #endif
 
+
+#ifdef YY_USE_PROTOS
+#define YY_PROTO(proto) proto
+#else
+#define YY_PROTO(proto) ()
+#endif
+
 /* Returned upon end-of-file. */
 #define YY_NULL 0
 
@@ -121,88 +95,71 @@
  * but we do it the disgusting crufty way forced on us by the ()-less
  * definition of BEGIN.
  */
-#define BEGIN (yy_start) = 1 + 2 *
+#define BEGIN yy_start = 1 + 2 *
 
 /* Translate the current start state into a value that can be later handed
  * to BEGIN to return to the state.  The YYSTATE alias is for lex
  * compatibility.
  */
-#define YY_START (((yy_start) - 1) / 2)
+#define YY_START ((yy_start - 1) / 2)
 #define YYSTATE YY_START
 
 /* Action number for EOF rule of a given start state. */
 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
 
 /* Special action meaning "start processing a new file". */
-#define YY_NEW_FILE llvmAsmrestart(llvmAsmin  )
+#define YY_NEW_FILE yyrestart( yyin )
 
 #define YY_END_OF_BUFFER_CHAR 0
 
 /* Size of default input buffer. */
-#ifndef YY_BUF_SIZE
 #define YY_BUF_SIZE (16384*64)
-#endif
 
-/* The state buf must be large enough to hold one state per character in the main buffer.
- */
-#define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
-
-#ifndef YY_TYPEDEF_YY_BUFFER_STATE
-#define YY_TYPEDEF_YY_BUFFER_STATE
 typedef struct yy_buffer_state *YY_BUFFER_STATE;
-#endif
-
-extern int llvmAsmleng;
 
-extern FILE *llvmAsmin, *llvmAsmout;
+extern int yyleng;
+extern FILE *yyin, *yyout;
 
 #define EOB_ACT_CONTINUE_SCAN 0
 #define EOB_ACT_END_OF_FILE 1
 #define EOB_ACT_LAST_MATCH 2
 
-    /* Note: We specifically omit the test for yy_rule_can_match_eol because it requires
-     *       access to the local variable yy_act. Since yyless() is a macro, it would break
-     *       existing scanners that call yyless() from OUTSIDE llvmAsmlex. 
-     *       One obvious solution it to make yy_act a global. I tried that, and saw
-     *       a 5% performance hit in a non-llvmAsmlineno scanner, because yy_act is
-     *       normally declared as a register variable-- so it is not worth it.
-     */
-    #define  YY_LESS_LINENO(n) \
-            do { \
-                int yyl;\
-                for ( yyl = n; yyl < llvmAsmleng; ++yyl )\
-                    if ( llvmAsmtext[yyl] == '\n' )\
-                        --llvmAsmlineno;\
-            }while(0)
-    
-/* Return all but the first "n" matched characters back to the input stream. */
+/* The funky do-while in the following #define is used to turn the definition
+ * int a single C statement (which needs a semi-colon terminator).  This
+ * avoids problems with code like:
+ *
+ * 	if ( condition_holds )
+ *		yyless( 5 );
+ *	else
+ *		do_something_else();
+ *
+ * Prior to using the do-while the compiler would get upset at the
+ * "else" because it interpreted the "if" statement as being all
+ * done when it reached the ';' after the yyless() call.
+ */
+
+/* Return all but the first 'n' matched characters back to the input stream. */
+
 #define yyless(n) \
 	do \
 		{ \
-		/* Undo effects of setting up llvmAsmtext. */ \
-        int yyless_macro_arg = (n); \
-        YY_LESS_LINENO(yyless_macro_arg);\
-		*yy_cp = (yy_hold_char); \
+		/* Undo effects of setting up yytext. */ \
+		*yy_cp = yy_hold_char; \
 		YY_RESTORE_YY_MORE_OFFSET \
-		(yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
-		YY_DO_BEFORE_ACTION; /* set up llvmAsmtext again */ \
+		yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
+		YY_DO_BEFORE_ACTION; /* set up yytext again */ \
 		} \
 	while ( 0 )
 
-#define unput(c) yyunput( c, (yytext_ptr)  )
+#define unput(c) yyunput( c, yytext_ptr )
 
 /* The following is because we cannot portably get our hands on size_t
  * (without autoconf's help, which isn't available because we want
  * flex-generated scanners to compile on their own).
  */
-
-#ifndef YY_TYPEDEF_YY_SIZE_T
-#define YY_TYPEDEF_YY_SIZE_T
 typedef unsigned int yy_size_t;
-#endif
 
-#ifndef YY_STRUCT_YY_BUFFER_STATE
-#define YY_STRUCT_YY_BUFFER_STATE
+
 struct yy_buffer_state
 	{
 	FILE *yy_input_file;
@@ -239,16 +196,12 @@
 	 */
 	int yy_at_bol;
 
-    int yy_bs_lineno; /**< The line count. */
-    int yy_bs_column; /**< The column count. */
-    
 	/* Whether to try to fill the input buffer when we reach the
 	 * end of it.
 	 */
 	int yy_fill_buffer;
 
 	int yy_buffer_status;
-
 #define YY_BUFFER_NEW 0
 #define YY_BUFFER_NORMAL 1
 	/* When an EOF's been seen but there's still some text to process
@@ -258,197 +211,192 @@
 	 * possible backing-up.
 	 *
 	 * When we actually see the EOF, we change the status to "new"
-	 * (via llvmAsmrestart()), so that the user can continue scanning by
-	 * just pointing llvmAsmin at a new input file.
+	 * (via yyrestart()), so that the user can continue scanning by
+	 * just pointing yyin at a new input file.
 	 */
 #define YY_BUFFER_EOF_PENDING 2
-
 	};
-#endif /* !YY_STRUCT_YY_BUFFER_STATE */
 
-/* Stack of input buffers. */
-static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
-static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
-static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
+static YY_BUFFER_STATE yy_current_buffer = 0;
 
 /* We provide macros for accessing buffer states in case in the
  * future we want to put the buffer states in a more general
  * "scanner state".
- *
- * Returns the top of the stack, or NULL.
  */
-#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
-                          ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
-                          : NULL)
+#define YY_CURRENT_BUFFER yy_current_buffer
 
-/* Same as previous macro, but useful when we know that the buffer stack is not
- * NULL or when we need an lvalue. For internal use only.
- */
-#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
 
-/* yy_hold_char holds the character lost when llvmAsmtext is formed. */
+/* yy_hold_char holds the character lost when yytext is formed. */
 static char yy_hold_char;
+
 static int yy_n_chars;		/* number of characters read into yy_ch_buf */
-int llvmAsmleng;
+
+
+int yyleng;
 
 /* Points to current character in buffer. */
 static char *yy_c_buf_p = (char *) 0;
-static int yy_init = 0;		/* whether we need to initialize */
+static int yy_init = 1;		/* whether we need to initialize */
 static int yy_start = 0;	/* start state number */
 
-/* Flag which is used to allow llvmAsmwrap()'s to do buffer switches
- * instead of setting up a fresh llvmAsmin.  A bit of a hack ...
+/* Flag which is used to allow yywrap()'s to do buffer switches
+ * instead of setting up a fresh yyin.  A bit of a hack ...
  */
 static int yy_did_buffer_switch_on_eof;
 
-void llvmAsmrestart (FILE *input_file  );
-void llvmAsm_switch_to_buffer (YY_BUFFER_STATE new_buffer  );
-YY_BUFFER_STATE llvmAsm_create_buffer (FILE *file,int size  );
-void llvmAsm_delete_buffer (YY_BUFFER_STATE b  );
-void llvmAsm_flush_buffer (YY_BUFFER_STATE b  );
-void llvmAsmpush_buffer_state (YY_BUFFER_STATE new_buffer  );
-void llvmAsmpop_buffer_state (void );
-
-static void llvmAsmensure_buffer_stack (void );
-static void llvmAsm_load_buffer_state (void );
-static void llvmAsm_init_buffer (YY_BUFFER_STATE b,FILE *file  );
-
-#define YY_FLUSH_BUFFER llvmAsm_flush_buffer(YY_CURRENT_BUFFER )
-
-YY_BUFFER_STATE llvmAsm_scan_buffer (char *base,yy_size_t size  );
-YY_BUFFER_STATE llvmAsm_scan_string (yyconst char *yy_str  );
-YY_BUFFER_STATE llvmAsm_scan_bytes (yyconst char *bytes,int len  );
-
-void *llvmAsmalloc (yy_size_t  );
-void *llvmAsmrealloc (void *,yy_size_t  );
-void llvmAsmfree (void *  );
+void yyrestart YY_PROTO(( FILE *input_file ));
+
+void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
+void yy_load_buffer_state YY_PROTO(( void ));
+YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
+void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
+void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
+void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
+#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
+
+YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
+YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
+YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
+
+static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
+static inline void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
+static void yy_flex_free YY_PROTO(( void * ));
 
-#define yy_new_buffer llvmAsm_create_buffer
+#define yy_new_buffer yy_create_buffer
 
 #define yy_set_interactive(is_interactive) \
 	{ \
-	if ( ! YY_CURRENT_BUFFER ){ \
-        llvmAsmensure_buffer_stack (); \
-		YY_CURRENT_BUFFER_LVALUE =    \
-            llvmAsm_create_buffer(llvmAsmin,YY_BUF_SIZE ); \
-	} \
-	YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
+	if ( ! yy_current_buffer ) \
+		yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
+	yy_current_buffer->yy_is_interactive = is_interactive; \
 	}
 
 #define yy_set_bol(at_bol) \
 	{ \
-	if ( ! YY_CURRENT_BUFFER ){\
-        llvmAsmensure_buffer_stack (); \
-		YY_CURRENT_BUFFER_LVALUE =    \
-            llvmAsm_create_buffer(llvmAsmin,YY_BUF_SIZE ); \
-	} \
-	YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
+	if ( ! yy_current_buffer ) \
+		yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
+	yy_current_buffer->yy_at_bol = at_bol; \
 	}
 
-#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
+#define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
 
-/* Begin user sect3 */
 
-#define llvmAsmwrap(n) 1
-#define YY_SKIP_YYWRAP
+#define YY_USES_REJECT
 
+#define yywrap() 1
+#define YY_SKIP_YYWRAP
 typedef unsigned char YY_CHAR;
-
-FILE *llvmAsmin = (FILE *) 0, *llvmAsmout = (FILE *) 0;
-
+FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
 typedef int yy_state_type;
-
-extern int llvmAsmlineno;
-
-int llvmAsmlineno = 1;
-
-extern char *llvmAsmtext;
-#define yytext_ptr llvmAsmtext
-
-static yy_state_type yy_get_previous_state (void );
-static yy_state_type yy_try_NUL_trans (yy_state_type current_state  );
-static int yy_get_next_buffer (void );
-static void yy_fatal_error (yyconst char msg[]  );
+extern int yylineno;
+int yylineno = 1;
+extern char *yytext;
+#define yytext_ptr yytext
+
+static yy_state_type yy_get_previous_state YY_PROTO(( void ));
+static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
+static int yy_get_next_buffer YY_PROTO(( void ));
+static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
 
 /* Done after the current pattern has been matched and before the
- * corresponding action - sets up llvmAsmtext.
+ * corresponding action - sets up yytext.
  */
 #define YY_DO_BEFORE_ACTION \
-	(yytext_ptr) = yy_bp; \
-	llvmAsmleng = (size_t) (yy_cp - yy_bp); \
-	(yy_hold_char) = *yy_cp; \
+	yytext_ptr = yy_bp; \
+	yyleng = (int) (yy_cp - yy_bp); \
+	yy_hold_char = *yy_cp; \
 	*yy_cp = '\0'; \
-	(yy_c_buf_p) = yy_cp;
+	yy_c_buf_p = yy_cp;
 
-#define YY_NUM_RULES 113
-#define YY_END_OF_BUFFER 114
-/* This struct is not used in this scanner,
-   but its presence is necessary. */
-struct yy_trans_info
-	{
-	flex_int32_t yy_verify;
-	flex_int32_t yy_nxt;
-	};
-static yyconst flex_int16_t yy_accept[501] =
+#define YY_NUM_RULES 114
+#define YY_END_OF_BUFFER 115
+static yyconst short int yy_acclist[192] =
+    {   0,
+      115,  113,  114,  112,  113,  114,  112,  114,  113,  114,
+      113,  114,  113,  114,  113,  114,  113,  114,  113,  114,
+      105,  113,  114,  105,  113,  114,    1,  113,  114,  113,
+      114,  113,  114,  113,  114,  113,  114,  113,  114,  113,
+      114,  113,  114,  113,  114,  113,  114,  113,  114,  113,
+      114,  113,  114,  113,  114,  113,  114,  113,  114,  113,
+      114,  113,  114,  113,  114,  113,  114,  113,  114,  113,
+      114,  104,  102,  101,  101,  108,  106,  110,  105,    1,
+       87,   41,   69,   23,  104,  101,  101,  109,  110,   20,
+      110,  111,   63,   68,   39,   34,   42,   66,    3,   54,
+
+       65,   25,   77,   67,   86,   81,   82,   64,   70,  103,
+      110,  110,   49,   78,   79,   32,   94,   95,   56,   22,
+      107,   26,    4,   61,   55,   48,   11,  110,   36,    2,
+        5,   58,   60,   50,   72,   76,   74,   75,   73,   71,
+       52,   96,   51,   57,   21,   84,   93,   45,   59,   30,
+       24,   44,    7,   89,   33,   92,   38,   62,   80,   88,
+       27,   28,   90,   53,   85,   83,   43,    6,   29,   37,
+        8,   17,    9,   10,   35,   12,   14,   13,   40,   15,
+       31,   91,   97,   99,  100,   16,   46,   98,   18,   47,
+       19
+
+    } ;
+
+static yyconst short int yy_accept[505] =
     {   0,
-        0,    0,  114,  112,  111,  111,  112,  112,  112,  112,
-      112,  112,  104,  104,    1,  112,  112,  112,  112,  112,
-      112,  112,  112,  112,  112,  112,  112,  112,  112,  112,
-      112,  112,  112,  112,  112,  112,    0,  103,    0,  101,
-      100,  100,  107,    0,  105,    0,  109,  104,    0,    1,
-        0,    0,    0,    0,    0,    0,    0,    0,   86,    0,
-       40,    0,    0,    0,    0,    0,    0,    0,    0,    0,
-        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
-        0,    0,    0,    0,    0,   68,    0,    0,    0,    0,
-        0,    0,    0,    0,    0,    0,    0,    0,   23,    0,
-
-        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
-        0,    0,  103,  100,  100,  109,   20,  109,    0,  110,
-       62,    0,    0,   67,    0,   38,    0,   33,    0,    0,
-        0,   41,    0,    0,    0,    0,    0,   65,    0,    0,
-        3,    0,    0,    0,    0,    0,    0,    0,    0,    0,
-        0,   53,    0,    0,    0,    0,    0,    0,    0,    0,
-       64,   25,    0,    0,   76,    0,   66,   85,    0,    0,
-        0,    0,    0,   80,    0,   81,    0,    0,    0,   63,
-        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
-        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
-
-        0,   69,    0,  102,  109,    0,    0,    0,  109,    0,
-        0,    0,    0,   48,   77,   78,    0,    0,    0,    0,
-        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
-        0,   93,    0,    0,    0,    0,    0,    0,    0,    0,
-        0,   94,   55,    0,    0,   22,    0,    0,  106,    0,
-        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
-        0,   26,    0,    0,    4,   60,    0,   54,    0,    0,
-        0,    0,    0,    0,    0,    0,    0,   47,    0,   11,
-        0,    0,  109,   35,    0,    0,    2,    0,    0,    0,
-        0,    0,    0,    0,    0,    0,    0,    0,    0,    5,
-
-        0,   57,    0,    0,    0,    0,    0,    0,   59,    0,
-        0,    0,    0,    0,    0,   49,    0,    0,   71,   75,
-       73,   74,   72,   70,   51,    0,    0,   95,    0,    0,
-        0,   50,   56,   21,    0,    0,    0,    0,    0,   83,
-        0,    0,    0,    0,    0,   92,    0,   44,    0,    0,
-        0,    0,    0,    0,   58,   30,   24,    0,    0,   43,
-        0,    7,    0,    0,    0,   88,    0,   32,   91,   37,
-       61,    0,    0,   79,    0,    0,   87,   27,   28,    0,
-        0,   89,   52,   84,   82,    0,    0,    0,    0,    0,
-        0,   42,    6,   29,    0,    0,    0,    0,    0,    0,
-
-        0,    0,    0,    0,    0,   36,    0,    0,    0,    0,
-        0,    0,    0,    0,    0,    8,    0,    0,    0,   17,
-        0,    0,    0,    0,    9,   10,    0,    0,    0,    0,
-        0,   34,    0,    0,    0,   12,   14,   13,    0,    0,
-        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
-        0,    0,    0,    0,    0,    0,    0,    0,   39,    0,
-        0,    0,    0,    0,   15,    0,    0,    0,    0,   31,
-        0,    0,   90,    0,    0,    0,    0,    0,    0,    0,
-        0,    0,    0,    0,    0,    0,   96,    0,   98,   99,
-       16,    0,   45,    0,   97,   18,   46,    0,   19,    0
+        1,    1,    1,    2,    4,    7,    9,   11,   13,   15,
+       17,   19,   21,   24,   27,   30,   32,   34,   36,   38,
+       40,   42,   44,   46,   48,   50,   52,   54,   56,   58,
+       60,   62,   64,   66,   68,   70,   72,   72,   73,   73,
+       74,   75,   76,   77,   77,   78,   78,   79,   80,   80,
+       81,   81,   81,   81,   81,   81,   81,   81,   81,   82,
+       82,   83,   83,   83,   83,   83,   83,   83,   83,   83,
+       83,   83,   83,   83,   83,   83,   83,   83,   83,   83,
+       83,   83,   83,   83,   83,   83,   83,   84,   84,   84,
+       84,   84,   84,   84,   84,   84,   84,   84,   84,   84,
+
+       85,   85,   85,   85,   85,   85,   85,   85,   85,   85,
+       85,   85,   85,   85,   86,   87,   89,   90,   91,   92,
+       92,   93,   94,   94,   94,   95,   95,   96,   96,   97,
+       97,   97,   97,   98,   98,   98,   98,   98,   98,   98,
+       99,   99,   99,  100,  100,  100,  100,  100,  100,  100,
+      100,  100,  100,  100,  101,  101,  101,  101,  101,  101,
+      101,  101,  101,  102,  103,  103,  103,  104,  104,  105,
+      106,  106,  106,  106,  106,  106,  107,  107,  108,  108,
+      108,  108,  109,  109,  109,  109,  109,  109,  109,  109,
+      109,  109,  109,  109,  109,  109,  109,  109,  109,  109,
+
+      109,  109,  109,  109,  110,  110,  111,  112,  112,  112,
+      112,  113,  113,  113,  113,  113,  114,  115,  116,  116,
+      116,  116,  117,  117,  117,  117,  117,  117,  117,  117,
+      117,  117,  117,  117,  117,  118,  118,  118,  118,  118,
+      118,  118,  118,  118,  118,  119,  120,  120,  120,  121,
+      121,  121,  122,  122,  122,  122,  122,  122,  122,  122,
+      122,  122,  122,  122,  122,  123,  123,  123,  124,  125,
+      125,  126,  126,  126,  126,  126,  126,  126,  126,  126,
+      126,  127,  127,  128,  128,  128,  129,  130,  130,  130,
+      131,  131,  131,  131,  131,  131,  131,  131,  131,  131,
+
+      131,  131,  131,  132,  132,  133,  133,  133,  133,  133,
+      133,  133,  134,  134,  134,  134,  134,  134,  134,  135,
+      135,  135,  136,  137,  138,  139,  140,  141,  142,  142,
+      142,  143,  143,  143,  143,  144,  145,  146,  146,  146,
+      146,  146,  146,  147,  147,  147,  147,  147,  147,  148,
+      148,  149,  149,  149,  149,  149,  149,  149,  150,  151,
+      152,  152,  152,  153,  153,  154,  154,  154,  154,  155,
+      155,  156,  157,  158,  159,  159,  159,  160,  160,  160,
+      161,  162,  163,  163,  163,  164,  165,  166,  167,  167,
+      167,  167,  167,  167,  167,  168,  169,  170,  170,  170,
+
+      170,  170,  170,  170,  170,  170,  170,  170,  170,  171,
+      171,  171,  171,  171,  171,  171,  171,  171,  171,  172,
+      172,  172,  172,  173,  173,  173,  173,  173,  174,  175,
+      175,  175,  175,  175,  175,  176,  176,  176,  176,  177,
+      178,  179,  179,  179,  179,  179,  179,  179,  179,  179,
+      179,  179,  179,  179,  179,  179,  179,  179,  179,  179,
+      179,  179,  180,  180,  180,  180,  180,  180,  181,  181,
+      181,  181,  181,  182,  182,  182,  183,  183,  183,  183,
+      183,  183,  183,  183,  183,  183,  183,  183,  183,  183,
+      184,  184,  185,  186,  187,  187,  188,  188,  189,  190,
 
+      191,  191,  192,  192
     } ;
 
-static yyconst flex_int32_t yy_ec[256] =
+static yyconst int yy_ec[256] =
     {   0,
         1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
         1,    1,    2,    1,    1,    1,    1,    1,    1,    1,
@@ -480,7 +428,7 @@
         1,    1,    1,    1,    1
     } ;
 
-static yyconst flex_int32_t yy_meta[44] =
+static yyconst int yy_meta[44] =
     {   0,
         1,    1,    2,    1,    3,    1,    1,    3,    3,    3,
         3,    3,    3,    4,    1,    3,    3,    3,    3,    3,
@@ -489,256 +437,256 @@
         3,    3,    3
     } ;
 
-static yyconst flex_int16_t yy_base[506] =
+static yyconst short int yy_base[509] =
     {   0,
-        0,    0, 1090, 1091, 1091, 1091, 1085, 1074,   36,   40,
+        0,    0, 1096, 1097, 1097, 1097, 1091, 1080,   36,   40,
        44,   50,   56,   62,    0,   63,   66,   81,   89,   47,
        90,   91,   76,   96,  108,   49,   97,  110,   68,  137,
-      120,  168,  112,  115,  135,  127, 1083, 1091, 1072, 1091,
+      120,  168,  112,  115,  135,  127, 1089, 1097, 1078, 1097,
         0,  158,  173,  180,  196,   70,  201,  216,  221,    0,
-      121,  152,  123,  139,  166,  140,  162,  184, 1071,  222,
-      180,   31,  186,  232,   69,  144,  209,  234,  236,  225,
-      188,  241,  119,  235,  189,  238,  246,  245,  249,  255,
-      248,  257,  258,  264,  269, 1070,  265,  267,  271,  273,
-      275,  276,  277,  282,  284,  304,  293,  296, 1069,  305,
-
-      288,  285,  297,  308,  311,  315,  316,  323,  325,  147,
-      322,  328, 1068,    0,  343,  348, 1067,  362,  379,    0,
-     1066,  352,  335, 1065,  355, 1064,  354, 1063,  366,  368,
-      289, 1062,  348,  369,  380,  370,  382, 1061,  386,  384,
-      374,  392,  393,  388,  394,  398,  396,  400,  406,  404,
-      407,  411,  408,  413,  415,  418,  423,  421,  424,  425,
-     1060, 1059,  427,  428, 1058,  430, 1057, 1056,  454,  435,
-      443,  436,  465, 1055,  433, 1054,  434,  437,  467, 1053,
-      455,  468,  470,  331,  475,  477,  469,  471,  472,  487,
-      473,  491,  485,  479,  499,  493,  501,  495,  502,  505,
-
-      508, 1052,  506, 1091,  519,  533,  537,  541,  546,  547,
-      513,  548,  549, 1051, 1050, 1049,  550,  551,  552,  553,
-      554,  555,  509,  556,  563,  559,  560,  572,  561,  562,
-      573, 1048,  576,  579,  580,  583,  585,  586,  587,  590,
-      588, 1047, 1046,  592,  594, 1045,  593,  595,    0,  598,
-      599,  613,  601,  605,  615,  616,  611,  511,  622,  623,
-      619, 1044,  627,  629, 1043, 1042,  630, 1041,  635,  633,
-      637,  640,  641,  642,  647,  648,  649, 1040,  651, 1039,
-      655,  653,  673, 1038,  652,  654, 1037,  660,  656,  673,
-      664,  675,  678,  679,  682,  683,  684,  686,  687, 1036,
-
-      688, 1035,  690,  689,  692,  693,  696,  701, 1034,  702,
-      705,  711,  706,  712,  717, 1033,  709,  720, 1032, 1031,
-     1030, 1029, 1028, 1027, 1026,  722,  723, 1025,  724,  725,
-      729, 1024, 1023, 1022,  728,  732,  734,  730,  735, 1021,
-      731,  744,  740,  741,  749, 1020,  747, 1019,  750,  752,
-      756,  755,  758,  761, 1018, 1017, 1016,  768,  762, 1015,
-      770, 1014,  769,  771,  782, 1013,  774, 1012, 1011, 1010,
-     1009,  763,  775, 1008,  788,  783, 1007, 1006, 1005,  789,
-      791, 1004, 1003, 1002, 1001,  790,  794,  796,  795,  798,
-      799, 1000,  999,  998,  800,  806,  807,  809,  801,  811,
-
-      812,  813,  817,  814,  818,  995,  819,  825,  826,  830,
-      836,  837,  839,  838,  841,  986,  842,  843,  847,  984,
-      848,  850,  849,  853,  983,  982,  851,  859,  869,  855,
-      871,  981,  873,  874,  875,  979,  978,  977,  878,  881,
-      882,  884,  885,  857,  887,  891,  893,  892,  895,  896,
-      897,  898,  899,  903,  904,  908,  909,  910,  975,  913,
-      916,  919,  920,  921,  971,  923,  924,  926,  928,  969,
-      930,  929,  968,  931,  937,  940,  941,  943,  949,  950,
-      951,  952,  954,  955,  956,  957,  858,  959,  854,  597,
-      523,  963,  440,  965,  438,  334,  286,  966,  205, 1091,
+      121,  152,  123,  139,  166,  140,  162,  184, 1077,  222,
+      180,   31,  186,  119,  232,  208,  144,  225,  234,  236,
+      235,  188,  238,  240,  246,  241,  245,  203,  248,  256,
+      254,  258,  262,  252,  272,  274, 1076,  276,  278,  280,
+      255,  253,  283,  284,  285,  286,  288,  297,  300, 1075,
+
+      301,  292,  295,  307,  309,  318,  316,  315,  322,  312,
+      147,  329,  330, 1074,    0,  344,  349, 1073,  363,  380,
+        0, 1072,  338,  336, 1071,  355, 1070,  356, 1069,  353,
+      367,  334, 1068,  375,  365,  381,  384,  370,  371, 1067,
+      388,  392,  391,  393,  394,  395,  396,  400,  399,  407,
+      406,  409,  411,  413,  410,  414,  418,  421,  425,  426,
+      427,  429, 1066, 1065,  430,  431, 1064,  435, 1063, 1062,
+      458,  436,  439,  434,  469, 1061,  449, 1060,  438,  441,
+      458, 1059,  471,  472,  474,  473,  481,  482,  475,  476,
+      483,  488,  489,  493,  495,  496,  504,  501,  503,  505,
+
+      510,  507,  516, 1058,  511, 1097,  527,  541,  545,  549,
+      554,  555,  440,  556,  557, 1057, 1056, 1055,  558,  559,
+      560, 1054,  527,  518,  561,  189,  562,  528,  566,  563,
+      564,  567,  568,  570, 1053,  571,  587,  580,  578,  579,
+      581,  590,  591,  596, 1052, 1051,  594,  598, 1050,  597,
+      601,    0,  606,  603,  607,  602,  608,  610,  618,  620,
+      625,  623,  628,  629, 1049,  630,  626, 1048, 1047,  638,
+     1046,  634,  640,  642,  644,  646,  648,  651,  653,  652,
+     1045,  654, 1044,  656,  657,  662, 1043,  662,  665, 1042,
+      668,  671,  674,  680,  682,  683,  684,  685,  687,  686,
+
+      689,  690, 1041,  691, 1040,  696,  692,  695,  693,  700,
+      699, 1039,  710,  712,  713,  714,  715,  719, 1038,  718,
+      722, 1037, 1036, 1035, 1034, 1033, 1032, 1031,  725,  729,
+     1030,  726,  730,  732, 1029, 1028, 1027,  731,  735,  743,
+      733,  737, 1026,  734,  746,  744,  747,  750, 1025,  752,
+     1024,  755,  761,  760,  758,  763,  764, 1023, 1022, 1021,
+      771,  762, 1020,  773, 1019,  774,  777,  779, 1018,  787,
+     1017, 1016, 1015, 1014,  778,  788, 1013,  791,  792, 1012,
+     1011, 1010,  790,  795, 1009, 1008, 1007, 1006,  793,  796,
+      798,  797,  804,  801, 1005, 1004, 1003,  809,  811,  812,
+
+      813,  814,  816,  817,  820,  822,  827,  819, 1002,  815,
+      833,  826,  839,  843,  845,  846,  847,  848,  999,  849,
+      850,  851,  990,  854,  857,  855,  856,  989,  987,  858,
+      866,  876,  862,  861,  986,  879,  880,  881,  984,  983,
+      982,  882,  884,  888,  890,  889,  863,  891,  896,  897,
+      899,  901,  900,  902,  903,  904,  908,  909,  912,  913,
+      916,  980,  918,  924,  923,  925,  926,  977,  928,  929,
+      930,  931,  975,  935,  936,  973,  934,  944,  942,  946,
+      950,  954,  956,  957,  958,  960,  961,  959,  962,  864,
+      964,  829,  766,  604,  969,  519,  965,  517,  477,  446,
 
-     1001, 1003,  214, 1007,   83
+      970,  333, 1097, 1005, 1007,   83, 1011,   80
     } ;
 
-static yyconst flex_int16_t yy_def[506] =
+static yyconst short int yy_def[509] =
     {   0,
-      500,    1,  500,  500,  500,  500,  501,  502,  503,  500,
-      502,  502,  502,  502,  504,  502,  502,  502,  502,  502,
-      502,  502,  502,  502,  502,  502,  502,  502,  502,  502,
-      502,  502,  502,  502,  502,  502,  501,  500,  502,  500,
-      505,  505,  500,  500,  502,  502,  502,  502,  502,  504,
-      502,  502,  502,  502,  502,  502,  502,  502,  502,  502,
-      502,  502,  502,  502,  502,  502,  502,  502,  502,  502,
-      502,  502,  502,  502,  502,  502,  502,  502,  502,  502,
-      502,  502,  502,  502,  502,  502,  502,  502,  502,  502,
-      502,  502,  502,  502,  502,  502,  502,  502,  502,  502,
-
-      502,  502,  502,  502,  502,  502,  502,  502,  502,  502,
-      502,  502,  500,  505,  505,  500,  502,  502,  502,   49,
-      502,  502,  502,  502,  502,  502,  502,  502,  502,  502,
-      502,  502,  502,  502,  502,  502,  502,  502,  502,  502,
-      502,  502,  502,  502,  502,  502,  502,  502,  502,  502,
-      502,  502,  502,  502,  502,  502,  502,  502,  502,  502,
-      502,  502,  502,  502,  502,  502,  502,  502,   49,  502,
-      502,  502,  502,  502,  502,  502,  502,  502,  502,  502,
-      502,  502,  502,  502,  502,  502,  502,  502,  502,  502,
-      502,  502,  502,  502,  502,  502,  502,  502,  502,  502,
-
-      502,  502,  502,  500,  500,  500,  500,  502,  502,  502,
-      502,  502,  502,  502,  502,  502,  502,  502,  502,  502,
-      502,  502,  502,  502,  502,  502,  502,  502,  502,  502,
-      502,  502,  502,  502,  502,  502,  502,  502,  502,  502,
-      502,  502,  502,  502,  502,  502,  502,  502,  169,  502,
-      502,  502,  502,  502,  502,  502,  502,  502,  502,  502,
-      502,  502,  502,  502,  502,  502,  502,  502,  502,  502,
-      502,  502,  502,  502,  502,  502,  502,  502,  502,  502,
-      502,  502,  500,  502,  502,  502,  502,  502,  502,  502,
-      502,  502,  502,  502,  502,  502,  502,  502,  502,  502,
-
-      502,  502,  502,  502,  502,  502,  502,  502,  502,  502,
-      502,  502,  502,  502,  502,  502,  502,  502,  502,  502,
-      502,  502,  502,  502,  502,  502,  502,  502,  502,  502,
-      502,  502,  502,  502,  502,  502,  502,  502,  502,  502,
-      502,  502,  502,  502,  502,  502,  502,  502,  502,  502,
-      502,  502,  502,  502,  502,  502,  502,  502,  502,  502,
-      502,  502,  502,  502,  502,  502,  502,  502,  502,  502,
-      502,  502,  502,  502,  502,  502,  502,  502,  502,  502,
-      502,  502,  502,  502,  502,  502,  502,  502,  502,  502,
-      502,  502,  502,  502,  502,  502,  502,  502,  502,  502,
-
-      502,  502,  502,  502,  502,  502,  502,  502,  502,  502,
-      502,  502,  502,  502,  502,  502,  502,  502,  502,  502,
-      502,  502,  502,  502,  502,  502,  502,  502,  502,  502,
-      502,  502,  502,  502,  502,  502,  502,  502,  502,  502,
-      502,  502,  502,  502,  502,  502,  502,  502,  502,  502,
-      502,  502,  502,  502,  502,  502,  502,  502,  502,  502,
-      502,  502,  502,  502,  502,  502,  502,  502,  502,  502,
-      502,  502,  502,  502,  502,  502,  502,  502,  502,  502,
-      502,  502,  502,  502,  502,  502,  502,  502,  502,  502,
-      502,  502,  502,  502,  502,  502,  502,  502,  502,    0,
+      503,    1,  503,  503,  503,  503,  504,  505,  506,  503,
+      505,  505,  505,  505,  507,  505,  505,  505,  505,  505,
+      505,  505,  505,  505,  505,  505,  505,  505,  505,  505,
+      505,  505,  505,  505,  505,  505,  504,  503,  505,  503,
+      508,  508,  503,  503,  505,  505,  505,  505,  505,  507,
+      505,  505,  505,  505,  505,  505,  505,  505,  505,  505,
+      505,  505,  505,  505,  505,  505,  505,  505,  505,  505,
+      505,  505,  505,  505,  505,  505,  505,  505,  505,  505,
+      505,  505,  505,  505,  505,  505,  505,  505,  505,  505,
+      505,  505,  505,  505,  505,  505,  505,  505,  505,  505,
+
+      505,  505,  505,  505,  505,  505,  505,  505,  505,  505,
+      505,  505,  505,  503,  508,  508,  503,  505,  505,  505,
+       49,  505,  505,  505,  505,  505,  505,  505,  505,  505,
+      505,  505,  505,  505,  505,  505,  505,  505,  505,  505,
+      505,  505,  505,  505,  505,  505,  505,  505,  505,  505,
+      505,  505,  505,  505,  505,  505,  505,  505,  505,  505,
+      505,  505,  505,  505,  505,  505,  505,  505,  505,  505,
+       49,  505,  505,  505,  505,  505,  505,  505,  505,  505,
+      505,  505,  505,  505,  505,  505,  505,  505,  505,  505,
+      505,  505,  505,  505,  505,  505,  505,  505,  505,  505,
+
+      505,  505,  505,  505,  505,  503,  503,  503,  503,  505,
+      505,  505,  505,  505,  505,  505,  505,  505,  505,  505,
+      505,  505,  505,  505,  505,  505,  505,  505,  505,  505,
+      505,  505,  505,  505,  505,  505,  505,  505,  505,  505,
+      505,  505,  505,  505,  505,  505,  505,  505,  505,  505,
+      505,  171,  505,  505,  505,  505,  505,  505,  505,  505,
+      505,  505,  505,  505,  505,  505,  505,  505,  505,  505,
+      505,  505,  505,  505,  505,  505,  505,  505,  505,  505,
+      505,  505,  505,  505,  505,  503,  505,  505,  505,  505,
+      505,  505,  505,  505,  505,  505,  505,  505,  505,  505,
+
+      505,  505,  505,  505,  505,  505,  505,  505,  505,  505,
+      505,  505,  505,  505,  505,  505,  505,  505,  505,  505,
+      505,  505,  505,  505,  505,  505,  505,  505,  505,  505,
+      505,  505,  505,  505,  505,  505,  505,  505,  505,  505,
+      505,  505,  505,  505,  505,  505,  505,  505,  505,  505,
+      505,  505,  505,  505,  505,  505,  505,  505,  505,  505,
+      505,  505,  505,  505,  505,  505,  505,  505,  505,  505,
+      505,  505,  505,  505,  505,  505,  505,  505,  505,  505,
+      505,  505,  505,  505,  505,  505,  505,  505,  505,  505,
+      505,  505,  505,  505,  505,  505,  505,  505,  505,  505,
+
+      505,  505,  505,  505,  505,  505,  505,  505,  505,  505,
+      505,  505,  505,  505,  505,  505,  505,  505,  505,  505,
+      505,  505,  505,  505,  505,  505,  505,  505,  505,  505,
+      505,  505,  505,  505,  505,  505,  505,  505,  505,  505,
+      505,  505,  505,  505,  505,  505,  505,  505,  505,  505,
+      505,  505,  505,  505,  505,  505,  505,  505,  505,  505,
+      505,  505,  505,  505,  505,  505,  505,  505,  505,  505,
+      505,  505,  505,  505,  505,  505,  505,  505,  505,  505,
+      505,  505,  505,  505,  505,  505,  505,  505,  505,  505,
+      505,  505,  505,  505,  505,  505,  505,  505,  505,  505,
 
-      500,  500,  500,  500,  500
+      505,  505,    0,  503,  503,  503,  503,  503
     } ;
 
-static yyconst flex_int16_t yy_nxt[1135] =
+static yyconst short int yy_nxt[1141] =
     {   0,
         4,    5,    6,    7,    8,    9,   10,   11,   12,   13,
        14,   14,   14,    4,   15,    8,    8,    8,   16,   17,
        18,   19,   20,   21,   22,    8,   23,    8,   24,   25,
        26,   27,   28,    8,   29,   30,   31,   32,   33,   34,
        35,    8,   36,   42,   40,   43,   43,   43,   43,   44,
-       44,   44,   44,   45,   45,   45,   45,   40,   46,  133,
-       40,  134,   40,   40,   47,   48,   48,   48,   48,   40,
-       47,   48,   48,   48,   48,   40,   40,   68,  117,   40,
-       83,   40,   40,   40,   51,  114,   84,   69,   56,   40,
-       89,   52,   57,   53,   40,   54,   49,   58,   55,   60,
-
-       59,   61,   40,   40,   40,   75,   76,  138,   70,   40,
-       40,   64,   62,   73,   77,   65,   63,   66,   71,   74,
-       67,   40,   78,   40,   72,   40,   80,   79,   40,   85,
-      107,   86,   40,   40,   40,   87,   40,  109,   98,   81,
-       40,   88,  121,  108,  124,   82,   90,  110,   40,  112,
-       40,   99,   40,   40,  100,  148,   91,   40,  201,   92,
-       40,  101,   93,   94,  127,   40,  111,  115,  115,  115,
-      115,  125,  139,   95,   96,   40,   97,   90,  122,   40,
-      123,   40,   43,   43,   43,   43,  128,  102,  116,   44,
-       44,   44,   44,   40,  103,  126,  104,   40,  105,   40,
-
-      132,   40,   40,  106,   47,   45,   45,   45,   45,   40,
-      118,  118,  118,  118,   40,  129,   41,  119,   40,  146,
-      135,  150,   40,  119,   47,   48,   48,   48,   48,   40,
-      120,  120,  120,  120,   40,   40,  120,  120,   40,  120,
-      120,  120,  120,  120,  120,   40,  140,   40,   40,   40,
-      130,   40,  136,  144,   40,  141,  142,  131,   40,   40,
-      145,   40,   40,  147,  137,  154,  149,  157,   40,  160,
-       40,   40,  143,  151,  152,  155,  153,   40,   40,  158,
-       40,  156,   40,  159,   40,  161,   40,  164,   40,   40,
-       40,  165,  163,  166,  162,   40,  171,   40,   40,   40,
-
-      167,   40,   40,  178,  172,  174,   40,  168,  175,   40,
-       40,  176,  173,  169,  177,  179,  170,   40,   40,  181,
-      186,   40,  182,  180,   40,  216,  187,  188,   40,   40,
-      183,  184,  190,  195,  196,   40,   40,  191,   40,  189,
-      194,   40,  185,  200,   40,  192,  197,   40,   40,  198,
-      193,  199,  115,  115,  115,  115,  202,  205,  205,  205,
-      205,   40,  203,  264,  206,   40,  211,   40,   40,  217,
-      206,  118,  118,  118,  118,   40,  210,  212,  119,   40,
-      213,   40,   40,   40,  119,  207,  208,   40,  209,  209,
-      209,  209,   40,   40,  214,   40,  215,   40,  220,   40,
-
-      225,   40,  219,  224,  218,   40,   40,   40,  222,   40,
-      221,   40,  223,   40,  226,  227,  231,   40,  232,   40,
-       40,   40,  233,  229,   40,  234,   40,  228,   40,  236,
-      230,   40,  235,  237,   40,  239,   40,   40,   40,  238,
-       40,   40,  240,   40,  242,  243,   40,   40,   40,   40,
-       40,   40,  244,   40,  241,  246,   40,  258,  252,  259,
-      248,  247,  245,  249,  249,  249,  249,  257,   40,  249,
-      249,  250,  249,  249,  249,  249,  249,  249,   40,  251,
-       40,   40,   40,   40,   40,   40,   40,  253,   40,  254,
-       40,  261,   40,  255,  263,  256,  262,  265,   40,  266,
-
-       40,  260,  269,  271,   40,  267,   40,  268,   40,  270,
-      274,  273,   40,  272,   40,   40,  278,  275,   40,   40,
-      279,   40,   40,  277,   40,  281,   40,  276,  205,  205,
-      205,  205,  280,  285,  326,  206,   40,  282,  294,  207,
-      207,  206,  283,  283,  283,  283,  283,  283,  283,  283,
-      209,  209,  209,  209,   40,  209,  209,  209,  209,   40,
-       40,   40,   40,   40,   40,   40,   40,   40,   40,   40,
-      288,  291,   40,   40,   40,   40,   40,  284,  286,  287,
-      292,  296,  301,  300,  295,   40,   40,  289,  290,   40,
-      299,  297,   40,   40,  298,  293,   40,  304,   40,   40,
-
-       40,   40,  305,   40,  303,   40,   40,   40,   40,  302,
-       40,   40,   40,  308,   40,  309,  311,  306,   40,  307,
-      316,  310,  313,  312,   40,  317,   40,  320,   40,   40,
-      314,  315,   40,  318,  319,   40,   40,  322,  324,  329,
-       40,  321,   40,   40,  327,  328,   40,  325,   40,  330,
-       40,  323,  332,   40,   40,   40,  334,  331,  336,  333,
-       40,   40,   40,  335,   40,   40,   40,   40,   40,   40,
-      346,  337,  340,   40,  349,  347,  338,   40,  343,  345,
-      348,  339,  283,  283,  283,  283,   40,  342,   40,  341,
-      344,   40,   40,  350,  352,   40,   40,   40,  351,   40,
-
-       40,   40,   40,   40,  355,   40,   40,  359,  360,   40,
-      353,  354,  361,  356,   40,   40,  358,  362,   40,   40,
-      357,  363,   40,  366,   40,   40,  365,  368,  370,  364,
-       40,  369,  367,   40,  371,   40,   40,   40,   40,  372,
-      373,   40,   40,   40,   40,   40,  376,   40,   40,  377,
-      375,  379,  381,   40,   40,  382,  374,   40,  387,  384,
-       40,  378,   40,   40,  380,   40,  383,  385,   40,   40,
-      386,   40,  392,  390,   40,   40,   40,  388,  393,  389,
-      391,   40,   40,   40,   40,  397,  398,   40,   40,  395,
-      394,  401,  396,  402,  404,   40,   40,  405,  399,  400,
-
-      403,   40,   40,   40,   40,  406,  408,   40,   40,   40,
-      407,   40,   40,   40,   40,  409,  410,  413,  411,   40,
-       40,  414,   40,  421,   40,   40,   40,   40,  415,  412,
-       40,   40,   40,  422,  417,  416,  426,  420,   40,   40,
-      418,  424,  423,   40,  430,  425,  419,  429,  431,   40,
-       40,   40,   40,  427,   40,   40,   40,  428,  432,  434,
-       40,   40,   40,   40,   40,  436,   40,   40,   40,  439,
-       40,   40,   40,  433,  435,  443,  440,  444,  437,  438,
-      441,  445,   40,  447,   40,  442,   40,   40,   40,  446,
-      448,   40,  450,  449,   40,   40,  452,   40,   40,  457,
-
-       40,  451,  455,  453,   40,   40,   40,  458,   40,   40,
-       40,   40,   40,  462,  456,  464,   40,   40,  454,  460,
-      461,   40,   40,   40,  463,  465,   40,  459,  466,   40,
-      469,  470,   40,   40,   40,  467,   40,   40,  473,   40,
-      468,   40,   40,   40,   40,  477,  471,  474,  475,  476,
-       40,  482,  479,   40,   40,  472,   40,  484,  480,  483,
-      478,  481,   40,   40,   40,   40,  485,   40,   40,   40,
-       40,  486,   40,  491,  492,  493,   40,  487,   40,   40,
-      488,   40,   40,  497,   40,  490,  489,  498,   40,  496,
-       40,   40,   40,  495,   40,   40,   40,   40,  494,   40,
+       44,   44,   44,   45,   45,   45,   45,   40,   46,  134,
+       40,  135,   40,   40,   47,   48,   48,   48,   48,   40,
+       47,   48,   48,   48,   48,   40,   40,   69,  118,   40,
+       84,   40,  115,   40,   51,   41,   85,   70,   56,   40,
+       90,   52,   57,   53,   40,   54,   49,   58,   55,   60,
+
+       59,   61,   40,   40,   40,   76,   77,   64,   71,   40,
+       40,   65,   62,   74,   78,   66,   63,   67,   72,   75,
+       68,   40,   79,   40,   73,   40,   81,   80,   40,   86,
+      108,   87,   40,   40,   40,   88,   40,  110,   99,   82,
+       40,   89,  122,  109,  125,   83,   91,  111,   40,  113,
+       40,  100,   40,   40,  101,  137,   92,   40,  203,   93,
+       40,  102,   94,   95,  128,   40,  112,  116,  116,  116,
+      116,  126,  141,   96,   97,   40,   98,   91,  123,   40,
+      124,   40,   43,   43,   43,   43,  129,  103,  117,   44,
+       44,   44,   44,   40,  104,  127,  105,   40,  106,   40,
+
+      133,   40,   40,  107,   47,   45,   45,   45,   45,   40,
+      119,  119,  119,  119,   40,  130,   40,  120,  297,  148,
+      136,   40,  156,  120,   47,   48,   48,   48,   48,   40,
+      121,  121,  121,  121,   40,   40,  121,  121,   40,  121,
+      121,  121,  121,  121,  121,   40,  140,   40,   40,   40,
+      131,   40,  138,   40,   40,  143,  144,  132,   40,   40,
+      149,   40,  142,  146,  139,   40,   40,   40,   40,   40,
+      147,   40,  145,  152,  159,   40,  150,  151,  157,  162,
+      153,  154,  161,  155,  158,   40,  160,   40,  164,   40,
+      163,   40,  166,   40,  172,  171,   40,   40,   40,   40,
+
+      165,   40,  167,  173,  168,   40,  180,  182,   40,  169,
+       40,  174,  176,   40,   40,  177,  170,  181,  178,  175,
+       40,  179,   40,  183,  188,   40,  184,  186,   40,   40,
+      202,   40,  197,  198,  185,   40,  189,  190,  187,  192,
+      191,  196,   40,   40,  193,  199,   40,   40,  200,   40,
+      201,   40,  194,  116,  116,  116,  116,  195,  207,  207,
+      207,  207,  212,  204,  205,  208,   40,  213,   40,   40,
+      218,  208,  119,  119,  119,  119,   40,  214,   40,  120,
+       40,  216,  215,   40,   40,  120,  209,  210,   40,  211,
+      211,  211,  211,   40,   40,  217,  219,   40,  223,  224,
+
+      220,   40,  222,  221,   40,   40,   40,   40,   40,   40,
+      225,  227,   40,   40,  226,  229,  230,  228,  234,   40,
+       40,  235,   40,   40,   40,  237,   40,   40,  231,  236,
+      232,   40,  233,  239,   40,  240,  242,  238,   40,   40,
+       40,  241,   40,   40,   40,  243,  245,   40,   40,   40,
+      246,   40,   40,   40,   40,  247,  255,  244,  249,   40,
+      288,  261,   40,  262,  250,  251,  248,  252,  252,  252,
+      252,   40,  253,  252,  252,  254,  252,  252,  252,  252,
+      252,  252,   40,  260,   40,   40,   40,   40,   40,   40,
+       40,  256,  263,  257,   40,   40,   40,  258,  266,  259,
+
+      265,   40,   40,  268,  269,  267,   40,  264,   40,   40,
+      273,  270,  271,  272,   40,  275,   40,   40,   40,  274,
+       40,  276,  278,   40,   40,  280,  281,  277,  282,   40,
+       40,   40,   40,  284,  283,  279,  207,  207,  207,  207,
+       40,   40,  285,  208,  295,  294,  299,  209,  209,  208,
+      286,  286,  286,  286,  286,  286,  286,  286,  211,  211,
+      211,  211,   40,  211,  211,  211,  211,   40,   40,   40,
+       40,   40,   40,   40,   40,   40,   40,   40,  291,   40,
+       40,   40,  302,   40,   40,  287,  289,  290,  304,  303,
+      298,   40,   40,   40,   40,  292,  293,  301,  300,  306,
+
+       40,  296,  308,   40,   40,  307,  305,   40,  311,   40,
+       40,   40,  309,  310,   40,   40,   40,   40,  312,   40,
+       40,   40,  313,   40,  314,  315,  316,  321,  319,  320,
+      323,   40,  325,   40,  317,  322,   40,  318,   40,   40,
+      327,   40,   40,   40,  324,  330,  326,   40,  329,  332,
+      331,   40,  333,   40,  334,   40,  328,   40,  336,   40,
+      335,   40,  339,  337,   40,   40,   40,   40,  338,   40,
+       40,  286,  286,  286,  286,   40,  340,  343,   40,  346,
+      349,   40,  341,  348,   40,  342,  350,   40,  351,  352,
+      345,  347,  344,   40,  353,   40,   40,   40,   40,   40,
+
+       40,  355,   40,   40,   40,   40,   40,  358,   40,   40,
+      362,  363,   40,   40,  354,  356,  357,  359,  364,  361,
+      365,  369,  360,   40,  366,   40,   40,   40,   40,  367,
+      368,   40,   40,  372,  371,   40,  373,  374,   40,   40,
+      370,  375,   40,   40,   40,   40,   40,   40,   40,  376,
+       40,  380,  379,  378,  382,  384,   40,   40,  377,   40,
+       40,  387,  390,   40,  385,   40,  381,  383,   40,  386,
+      388,   40,  389,   40,   40,   40,   40,   40,  393,   40,
+      392,  395,  396,  391,   40,  394,   40,   40,  400,  401,
+       40,   40,   40,  397,  398,  399,  404,  406,  402,  405,
+
+       40,   40,  403,   40,   40,   40,   40,  407,   40,   40,
+       40,   40,  408,  410,   40,  411,  412,   40,  409,  416,
+      413,  414,   40,  417,   40,   40,   40,   40,   40,   40,
+       40,  415,   40,   40,  418,   40,  424,  419,  425,   40,
+       40,  423,   40,  420,  433,  421,   40,  426,  427,  429,
+      428,  422,   40,  431,  430,  432,   40,  434,   40,   40,
+       40,   40,   40,   40,   40,  435,  437,   40,   40,   40,
+       40,   40,  439,  442,   40,   40,   40,   40,  446,   40,
+      451,  436,  443,  438,  447,  440,  441,  444,  448,   40,
+      450,  445,   40,   40,   40,   40,  449,   40,  453,  452,
+
+      455,   40,   40,   40,   40,  460,  456,  454,  458,   40,
+       40,  461,   40,   40,   40,   40,   40,   40,  459,  465,
+      467,   40,   40,  463,  457,   40,   40,  464,  466,   40,
+      468,   40,  462,  469,  472,  473,   40,   40,   40,   40,
+      470,   40,   40,   40,   40,  471,  476,   40,   40,   40,
+      480,  477,  474,  478,  479,   40,  482,   40,  485,   40,
+      475,  483,  486,   40,  487,  481,  484,   40,  488,   40,
+       40,   40,   40,   40,   40,   40,  489,   40,   40,  494,
+      495,  496,   40,   40,  490,  491,   40,  501,   40,  500,
+       40,  493,  492,   40,  499,   40,   40,   40,  498,   40,
 
-      499,   37,   37,   37,   37,   39,   39,   50,   40,   50,
-       50,   40,   40,   40,   40,   40,   40,   40,   40,   40,
+       40,  497,   40,   40,  502,   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,   40,   40,   40,   40,   40,   40,   40,   40,   40,
-       40,  204,   40,   40,   40,   40,  113,   40,   38,  500,
-        3,  500,  500,  500,  500,  500,  500,  500,  500,  500,
+       40,   40,   40,   40,   40,   40,   40,  206,   40,   40,
+       40,   40,  114,   40,   38,  503,    3,  503,  503,  503,
 
-      500,  500,  500,  500,  500,  500,  500,  500,  500,  500,
-      500,  500,  500,  500,  500,  500,  500,  500,  500,  500,
-      500,  500,  500,  500,  500,  500,  500,  500,  500,  500,
-      500,  500,  500,  500
+      503,  503,  503,  503,  503,  503,  503,  503,  503,  503,
+      503,  503,  503,  503,  503,  503,  503,  503,  503,  503,
+      503,  503,  503,  503,  503,  503,  503,  503,  503,  503,
+      503,  503,  503,  503,  503,  503,  503,  503,  503,  503
     } ;
 
-static yyconst flex_int16_t yy_chk[1135] =
+static yyconst short int yy_chk[1141] =
     {   0,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
@@ -748,150 +696,141 @@
        10,   10,   10,   11,   11,   11,   11,   11,   12,   62,
        20,   62,   26,   12,   13,   13,   13,   13,   13,   13,
        14,   14,   14,   14,   14,   14,   16,   20,   46,   17,
-       26,   29,   65,   46,   16,  505,   26,   20,   17,   23,
+       26,   29,  508,   46,   16,  506,   26,   20,   17,   23,
        29,   16,   17,   16,   18,   16,   13,   17,   16,   18,
 
-       17,   18,   19,   21,   22,   23,   23,   65,   21,   24,
+       17,   18,   19,   21,   22,   23,   23,   19,   21,   24,
        27,   19,   18,   22,   24,   19,   18,   19,   21,   22,
        19,   25,   24,   28,   21,   33,   25,   24,   34,   27,
-       33,   27,   73,   31,   51,   28,   53,   34,   31,   25,
+       33,   27,   64,   31,   51,   28,   53,   34,   31,   25,
        36,   28,   51,   33,   53,   25,   30,   35,   35,   36,
-       30,   31,   54,   56,   31,   73,   30,   66,  110,   30,
-      110,   31,   30,   30,   56,   52,   35,   42,   42,   42,
-       42,   54,   66,   30,   30,   57,   30,   32,   52,   55,
+       30,   31,   54,   56,   31,   64,   30,   67,  111,   30,
+      111,   31,   30,   30,   56,   52,   35,   42,   42,   42,
+       42,   54,   67,   30,   30,   57,   30,   32,   52,   55,
        52,   32,   43,   43,   43,   43,   57,   32,   44,   44,
        44,   44,   44,   61,   32,   55,   32,   58,   32,   63,
 
-       61,   71,   75,   32,   45,   45,   45,   45,   45,   45,
-       47,   47,   47,   47,   47,   58,  503,   47,  499,   71,
-       63,   75,   67,   47,   48,   48,   48,   48,   48,   48,
-       49,   49,   49,   49,   49,   60,   49,   49,   70,   49,
-       49,   49,   49,   49,   49,   64,   67,   68,   74,   69,
-       60,   76,   64,   70,   72,   68,   69,   60,   78,   77,
-       70,   81,   79,   72,   64,   77,   74,   79,   80,   81,
-       82,   83,   69,   76,   76,   78,   76,   84,   87,   79,
-       88,   78,   85,   80,   89,   82,   90,   85,   91,   92,
-       93,   87,   84,   88,   83,   94,   92,   95,  102,  497,
-
-       89,  101,  131,   94,   92,   93,   97,   89,   93,   98,
-      103,   93,   92,   90,   93,   95,   91,   96,  100,   97,
-      101,  104,   98,   96,  105,  131,  102,  103,  106,  107,
-       98,  100,  105,  107,  107,  111,  108,  105,  109,  104,
-      106,  112,  100,  109,  184,  105,  107,  496,  123,  108,
-      105,  108,  115,  115,  115,  115,  111,  116,  116,  116,
-      116,  133,  112,  184,  116,  122,  123,  127,  125,  133,
-      116,  118,  118,  118,  118,  118,  122,  125,  118,  129,
-      127,  130,  134,  136,  118,  119,  119,  141,  119,  119,
-      119,  119,  119,  135,  129,  137,  130,  140,  136,  139,
-
-      141,  144,  135,  140,  134,  142,  143,  145,  139,  147,
-      137,  146,  139,  148,  142,  143,  146,  150,  147,  149,
-      151,  153,  148,  144,  152,  149,  154,  143,  155,  151,
-      145,  156,  150,  152,  158,  154,  157,  159,  160,  153,
-      163,  164,  155,  166,  157,  158,  175,  177,  170,  172,
-      178,  495,  159,  493,  156,  163,  171,  177,  172,  178,
-      166,  164,  160,  169,  169,  169,  169,  175,  181,  169,
-      169,  170,  169,  169,  169,  169,  169,  169,  173,  171,
-      179,  182,  187,  183,  188,  189,  191,  173,  185,  173,
-      186,  181,  194,  173,  183,  173,  182,  185,  193,  186,
-
-      190,  179,  189,  191,  192,  187,  196,  188,  198,  190,
-      194,  193,  195,  192,  197,  199,  198,  195,  200,  203,
-      199,  201,  223,  197,  258,  201,  211,  196,  205,  205,
-      205,  205,  200,  211,  258,  205,  491,  203,  223,  206,
-      206,  205,  206,  206,  206,  206,  207,  207,  207,  207,
-      208,  208,  208,  208,  208,  209,  209,  209,  209,  209,
-      210,  212,  213,  217,  218,  219,  220,  221,  222,  224,
-      217,  220,  226,  227,  229,  230,  225,  210,  212,  213,
-      221,  225,  230,  229,  224,  228,  231,  218,  219,  233,
-      228,  226,  234,  235,  227,  222,  236,  234,  237,  238,
-
-      239,  241,  235,  240,  233,  244,  247,  245,  248,  231,
-      490,  250,  251,  238,  253,  239,  241,  236,  254,  237,
-      250,  240,  245,  244,  257,  251,  252,  254,  255,  256,
-      247,  248,  261,  252,  253,  259,  260,  255,  256,  261,
-      263,  254,  264,  267,  259,  260,  270,  257,  269,  263,
-      271,  255,  267,  272,  273,  274,  270,  264,  272,  269,
-      275,  276,  277,  271,  279,  285,  282,  286,  281,  289,
-      285,  273,  276,  288,  289,  286,  274,  291,  281,  282,
-      288,  275,  283,  283,  283,  283,  290,  279,  292,  277,
-      281,  293,  294,  290,  292,  295,  296,  297,  291,  298,
-
-      299,  301,  304,  303,  295,  305,  306,  299,  301,  307,
-      293,  294,  303,  296,  308,  310,  298,  304,  311,  313,
-      297,  305,  317,  308,  312,  314,  307,  311,  313,  306,
-      315,  312,  310,  318,  314,  326,  327,  329,  330,  315,
-      317,  335,  331,  338,  341,  336,  327,  337,  339,  329,
-      326,  331,  336,  343,  344,  337,  318,  342,  343,  339,
-      347,  330,  345,  349,  335,  350,  338,  341,  352,  351,
-      342,  353,  350,  347,  354,  359,  372,  344,  351,  345,
-      349,  358,  363,  361,  364,  358,  358,  367,  373,  353,
-      352,  363,  354,  364,  367,  365,  376,  372,  359,  361,
-
-      365,  375,  380,  386,  381,  373,  376,  387,  389,  388,
-      375,  390,  391,  395,  399,  380,  381,  388,  386,  396,
-      397,  389,  398,  399,  400,  401,  402,  404,  390,  387,
-      403,  405,  407,  400,  395,  391,  404,  398,  408,  409,
-      396,  402,  401,  410,  409,  403,  397,  408,  410,  411,
-      412,  414,  413,  405,  415,  417,  418,  407,  411,  413,
-      419,  421,  423,  422,  427,  415,  424,  489,  430,  419,
-      444,  487,  428,  412,  414,  424,  421,  427,  417,  418,
-      422,  428,  429,  430,  431,  423,  433,  434,  435,  429,
-      431,  439,  434,  433,  440,  441,  439,  442,  443,  444,
-
-      445,  435,  442,  440,  446,  448,  447,  445,  449,  450,
-      451,  452,  453,  449,  443,  451,  454,  455,  441,  447,
-      448,  456,  457,  458,  450,  452,  460,  446,  453,  461,
-      456,  457,  462,  463,  464,  454,  466,  467,  461,  468,
-      455,  469,  472,  471,  474,  466,  458,  462,  463,  464,
-      475,  472,  468,  476,  477,  460,  478,  475,  469,  474,
-      467,  471,  479,  480,  481,  482,  476,  483,  484,  485,
-      486,  477,  488,  482,  483,  484,  492,  478,  494,  498,
-      479,  473,  470,  492,  465,  481,  480,  494,  459,  488,
-      438,  437,  436,  486,  432,  426,  425,  420,  485,  416,
-
-      498,  501,  501,  501,  501,  502,  502,  504,  406,  504,
-      504,  394,  393,  392,  385,  384,  383,  382,  379,  378,
-      377,  374,  371,  370,  369,  368,  366,  362,  360,  357,
-      356,  355,  348,  346,  340,  334,  333,  332,  328,  325,
-      324,  323,  322,  321,  320,  319,  316,  309,  302,  300,
-      287,  284,  280,  278,  268,  266,  265,  262,  246,  243,
-      242,  232,  216,  215,  214,  202,  180,  176,  174,  168,
-      167,  165,  162,  161,  138,  132,  128,  126,  124,  121,
-      117,  113,   99,   86,   59,   39,   37,    8,    7,    3,
-      500,  500,  500,  500,  500,  500,  500,  500,  500,  500,
-
-      500,  500,  500,  500,  500,  500,  500,  500,  500,  500,
-      500,  500,  500,  500,  500,  500,  500,  500,  500,  500,
-      500,  500,  500,  500,  500,  500,  500,  500,  500,  500,
-      500,  500,  500,  500
+       61,   72,  226,   32,   45,   45,   45,   45,   45,   45,
+       47,   47,   47,   47,   47,   58,   78,   47,  226,   72,
+       63,   66,   78,   47,   48,   48,   48,   48,   48,   48,
+       49,   49,   49,   49,   49,   60,   49,   49,   68,   49,
+       49,   49,   49,   49,   49,   65,   66,   69,   71,   70,
+       60,   73,   65,   74,   76,   69,   70,   60,   77,   75,
+       73,   79,   68,   71,   65,   84,   92,   81,   91,   80,
+       71,   82,   70,   76,   80,   83,   74,   75,   79,   82,
+       77,   77,   81,   77,   79,   85,   80,   86,   84,   88,
+       83,   89,   86,   90,   92,   91,   93,   94,   95,   96,
+
+       85,   97,   88,   93,   89,  102,   95,   97,  103,   90,
+       98,   93,   94,   99,  101,   94,   90,   96,   94,   93,
+      104,   94,  105,   98,  102,  110,   99,  101,  108,  107,
+      110,  106,  108,  108,   99,  109,  103,  104,  101,  106,
+      105,  107,  112,  113,  106,  108,  502,  132,  109,  124,
+      109,  123,  106,  116,  116,  116,  116,  106,  117,  117,
+      117,  117,  123,  112,  113,  117,  130,  124,  126,  128,
+      132,  117,  119,  119,  119,  119,  119,  126,  135,  119,
+      131,  130,  128,  138,  139,  119,  120,  120,  134,  120,
+      120,  120,  120,  120,  136,  131,  134,  137,  138,  139,
+
+      135,  141,  137,  136,  143,  142,  144,  145,  146,  147,
+      141,  142,  149,  148,  141,  144,  145,  143,  148,  151,
+      150,  149,  152,  155,  153,  151,  154,  156,  145,  150,
+      146,  157,  147,  153,  158,  154,  156,  152,  159,  160,
+      161,  155,  162,  165,  166,  157,  159,  174,  168,  172,
+      160,  179,  173,  213,  180,  161,  174,  158,  165,  500,
+      213,  179,  177,  180,  166,  168,  162,  171,  171,  171,
+      171,  181,  172,  171,  171,  173,  171,  171,  171,  171,
+      171,  171,  175,  177,  183,  184,  186,  185,  189,  190,
+      499,  175,  181,  175,  187,  188,  191,  175,  185,  175,
+
+      184,  192,  193,  187,  188,  186,  194,  183,  195,  196,
+      192,  189,  190,  191,  198,  194,  199,  197,  200,  193,
+      202,  195,  197,  201,  205,  199,  200,  196,  201,  203,
+      498,  224,  496,  203,  202,  198,  207,  207,  207,  207,
+      223,  228,  205,  207,  224,  223,  228,  208,  208,  207,
+      208,  208,  208,  208,  209,  209,  209,  209,  210,  210,
+      210,  210,  210,  211,  211,  211,  211,  211,  212,  214,
+      215,  219,  220,  221,  225,  227,  230,  231,  219,  229,
+      232,  233,  231,  234,  236,  212,  214,  215,  233,  232,
+      227,  239,  240,  238,  241,  220,  221,  230,  229,  236,
+
+      237,  225,  238,  242,  243,  237,  234,  247,  241,  244,
+      250,  248,  239,  240,  251,  256,  254,  494,  242,  253,
+      255,  257,  243,  258,  244,  247,  248,  255,  253,  254,
+      257,  259,  258,  260,  250,  256,  262,  251,  261,  267,
+      259,  263,  264,  266,  257,  262,  258,  272,  261,  264,
+      263,  270,  266,  273,  267,  274,  260,  275,  272,  276,
+      270,  277,  275,  273,  278,  280,  279,  282,  274,  284,
+      285,  286,  286,  286,  286,  288,  276,  279,  289,  284,
+      288,  291,  277,  285,  292,  278,  289,  293,  291,  292,
+      282,  284,  280,  294,  293,  295,  296,  297,  298,  300,
+
+      299,  295,  301,  302,  304,  307,  309,  298,  308,  306,
+      302,  304,  311,  310,  294,  296,  297,  299,  306,  301,
+      307,  311,  300,  313,  308,  314,  315,  316,  317,  309,
+      310,  320,  318,  315,  314,  321,  316,  317,  329,  332,
+      313,  318,  330,  333,  338,  334,  341,  344,  339,  320,
+      342,  332,  330,  329,  334,  339,  340,  346,  321,  345,
+      347,  342,  346,  348,  340,  350,  333,  338,  352,  341,
+      344,  355,  345,  354,  353,  362,  356,  357,  350,  493,
+      348,  353,  354,  347,  361,  352,  364,  366,  361,  361,
+      367,  375,  368,  355,  356,  357,  366,  368,  362,  367,
+
+      370,  376,  364,  383,  378,  379,  389,  370,  384,  390,
+      392,  391,  375,  378,  394,  379,  383,  393,  376,  391,
+      384,  389,  398,  392,  399,  400,  401,  402,  410,  403,
+      404,  390,  408,  405,  393,  406,  402,  394,  403,  412,
+      407,  401,  492,  398,  412,  399,  411,  404,  405,  407,
+      406,  400,  413,  410,  408,  411,  414,  413,  415,  416,
+      417,  418,  420,  421,  422,  414,  416,  424,  426,  427,
+      425,  430,  418,  422,  434,  433,  447,  490,  427,  431,
+      434,  415,  424,  417,  430,  420,  421,  425,  431,  432,
+      433,  426,  436,  437,  438,  442,  432,  443,  437,  436,
+
+      442,  444,  446,  445,  448,  447,  443,  438,  445,  449,
+      450,  448,  451,  453,  452,  454,  455,  456,  446,  452,
+      454,  457,  458,  450,  444,  459,  460,  451,  453,  461,
+      455,  463,  449,  456,  459,  460,  465,  464,  466,  467,
+      457,  469,  470,  471,  472,  458,  464,  477,  474,  475,
+      469,  465,  461,  466,  467,  479,  471,  478,  475,  480,
+      463,  472,  477,  481,  478,  470,  474,  482,  479,  483,
+      484,  485,  488,  486,  487,  489,  480,  491,  497,  485,
+      486,  487,  495,  501,  481,  482,  476,  497,  473,  495,
+      468,  484,  483,  462,  491,  441,  440,  439,  489,  435,
+
+      429,  488,  428,  423,  501,  504,  504,  504,  504,  505,
+      505,  507,  419,  507,  507,  409,  397,  396,  395,  388,
+      387,  386,  385,  382,  381,  380,  377,  374,  373,  372,
+      371,  369,  365,  363,  360,  359,  358,  351,  349,  343,
+      337,  336,  335,  331,  328,  327,  326,  325,  324,  323,
+      322,  319,  312,  305,  303,  290,  287,  283,  281,  271,
+      269,  268,  265,  249,  246,  245,  235,  222,  218,  217,
+      216,  204,  182,  178,  176,  170,  169,  167,  164,  163,
+      140,  133,  129,  127,  125,  122,  118,  114,  100,   87,
+       59,   39,   37,    8,    7,    3,  503,  503,  503,  503,
+
+      503,  503,  503,  503,  503,  503,  503,  503,  503,  503,
+      503,  503,  503,  503,  503,  503,  503,  503,  503,  503,
+      503,  503,  503,  503,  503,  503,  503,  503,  503,  503,
+      503,  503,  503,  503,  503,  503,  503,  503,  503,  503
     } ;
 
-/* Table of booleans, true if rule could match eol. */
-static yyconst flex_int32_t yy_rule_can_match_eol[114] =
-    {   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, 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, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
-    0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0,     };
-
-static yy_state_type yy_last_accepting_state;
-static char *yy_last_accepting_cpos;
-
-extern int llvmAsm_flex_debug;
-int llvmAsm_flex_debug = 0;
-
-/* The intent behind this definition is that it'll catch
- * any uses of REJECT which flex missed.
- */
-#define REJECT reject_used_but_not_detected
+static yy_state_type yy_state_buf[YY_BUF_SIZE + 2], *yy_state_ptr;
+static char *yy_full_match;
+static int yy_lp;
+#define REJECT \
+{ \
+*yy_cp = yy_hold_char; /* undo effects of setting up yytext */ \
+yy_cp = yy_full_match; /* restore poss. backed-over text */ \
+++yy_lp; \
+goto find_rule; \
+}
 #define yymore() yymore_used_but_not_detected
 #define YY_MORE_ADJ 0
 #define YY_RESTORE_YY_MORE_OFFSET
-char *llvmAsmtext;
-#line 1 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
+char *yytext;
+#line 1 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
+#define INITIAL 0
 /*===-- Lexer.l - Scanner for llvm assembly files --------------*- C++ -*--===//
 //
 //                     The LLVM Compiler Infrastructure
@@ -904,7 +843,8 @@
 //  This file implements the flex scanner for LLVM assembly languages files.
 //
 //===----------------------------------------------------------------------===*/
-#line 28 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
+#define YY_NEVER_INTERACTIVE 1
+#line 28 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
 #include "ParserInternals.h"
 #include "llvm/Module.h"
 #include 
@@ -913,10 +853,10 @@
 #include 
 
 void set_scan_file(FILE * F){
-  llvmAsm_switch_to_buffer(llvmAsm_create_buffer(F,YY_BUF_SIZE ) );
+  yy_switch_to_buffer(yy_create_buffer( F, YY_BUF_SIZE ) );
 }
 void set_scan_string (const char * str) {
-  llvmAsm_scan_string (str);
+  yy_scan_string (str);
 }
 
 #define RET_TOK(type, Enum, sym) \
@@ -1030,23 +970,7 @@
 /* HexIntConstant - Hexadecimal constant generated by the CFE to avoid forcing
  * it to deal with 64 bit numbers.
  */
-#line 1034 "Lexer.cpp"
-
-#define INITIAL 0
-
-#ifndef YY_NO_UNISTD_H
-/* Special case for "unistd.h", since it is non-ANSI. We include it way
- * down here because we want the user's section 1 to have been scanned first.
- * The user has a chance to override it with an option.
- */
-#include 
-#endif
-
-#ifndef YY_EXTRA_TYPE
-#define YY_EXTRA_TYPE void *
-#endif
-
-static int yy_init_globals (void );
+#line 974 "Lexer.cpp"
 
 /* Macros after this point can all be overridden by user definitions in
  * section 1.
@@ -1054,30 +978,65 @@
 
 #ifndef YY_SKIP_YYWRAP
 #ifdef __cplusplus
-extern "C" int llvmAsmwrap (void );
+extern "C" int yywrap YY_PROTO(( void ));
 #else
-extern int llvmAsmwrap (void );
+extern int yywrap YY_PROTO(( void ));
+#endif
 #endif
+
+#ifndef YY_NO_UNPUT
+static inline void yyunput YY_PROTO(( int c, char *buf_ptr ));
 #endif
 
-    static inline void yyunput (int c,char *buf_ptr  );
-    
 #ifndef yytext_ptr
-static void yy_flex_strncpy (char *,yyconst char *,int );
+static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
 #endif
 
 #ifdef YY_NEED_STRLEN
-static int yy_flex_strlen (yyconst char * );
+static int yy_flex_strlen YY_PROTO(( yyconst char * ));
 #endif
 
 #ifndef YY_NO_INPUT
-
 #ifdef __cplusplus
-static int yyinput (void );
+static int yyinput YY_PROTO(( void ));
+#else
+static int input YY_PROTO(( void ));
+#endif
+#endif
+
+#if YY_STACK_USED
+static int yy_start_stack_ptr = 0;
+static int yy_start_stack_depth = 0;
+static int *yy_start_stack = 0;
+#ifndef YY_NO_PUSH_STATE
+static void yy_push_state YY_PROTO(( int new_state ));
+#endif
+#ifndef YY_NO_POP_STATE
+static void yy_pop_state YY_PROTO(( void ));
+#endif
+#ifndef YY_NO_TOP_STATE
+static int yy_top_state YY_PROTO(( void ));
+#endif
+
 #else
-static int input (void );
+#define YY_NO_PUSH_STATE 1
+#define YY_NO_POP_STATE 1
+#define YY_NO_TOP_STATE 1
 #endif
 
+#ifdef YY_MALLOC_DECL
+YY_MALLOC_DECL
+#else
+#if __STDC__
+#ifndef __cplusplus
+#include 
+#endif
+#else
+/* Just try to get by without declaring the routines.  This will fail
+ * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
+ * or sizeof(void*) != sizeof(int).
+ */
+#endif
 #endif
 
 /* Amount of stuff to slurp up with each read. */
@@ -1086,11 +1045,12 @@
 #endif
 
 /* Copy whatever the last rule matched to the standard output. */
+
 #ifndef ECHO
 /* This used to be an fputs(), but since the string might contain NUL's,
  * we now use fwrite().
  */
-#define ECHO (void) fwrite( llvmAsmtext, llvmAsmleng, 1, llvmAsmout )
+#define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
 #endif
 
 /* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
@@ -1098,35 +1058,21 @@
  */
 #ifndef YY_INPUT
 #define YY_INPUT(buf,result,max_size) \
-	if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
+	if ( yy_current_buffer->yy_is_interactive ) \
 		{ \
-		int c = '*'; \
-		size_t n; \
+		int c = '*', n; \
 		for ( n = 0; n < max_size && \
-			     (c = getc( llvmAsmin )) != EOF && c != '\n'; ++n ) \
+			     (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
 			buf[n] = (char) c; \
 		if ( c == '\n' ) \
 			buf[n++] = (char) c; \
-		if ( c == EOF && ferror( llvmAsmin ) ) \
+		if ( c == EOF && ferror( yyin ) ) \
 			YY_FATAL_ERROR( "input in flex scanner failed" ); \
 		result = n; \
 		} \
-	else \
-		{ \
-		errno=0; \
-		while ( (result = fread(buf, 1, max_size, llvmAsmin))==0 && ferror(llvmAsmin)) \
-			{ \
-			if( errno != EINTR) \
-				{ \
-				YY_FATAL_ERROR( "input in flex scanner failed" ); \
-				break; \
-				} \
-			errno=0; \
-			clearerr(llvmAsmin); \
-			} \
-		}\
-\
-
+	else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
+		  && ferror( yyin ) ) \
+		YY_FATAL_ERROR( "input in flex scanner failed" );
 #endif
 
 /* No semi-colon after return; correct usage is to write "yyterminate();" -
@@ -1147,20 +1093,14 @@
 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
 #endif
 
-/* end tables serialization structures and prototypes */
-
 /* Default declaration of generated scanner - a define so the user can
  * easily add parameters.
  */
 #ifndef YY_DECL
-#define YY_DECL_IS_OURS 1
-
-extern int llvmAsmlex (void);
-
-#define YY_DECL int llvmAsmlex (void)
-#endif /* !YY_DECL */
+#define YY_DECL int yylex YY_PROTO(( void ))
+#endif
 
-/* Code executed at the beginning of each rule, after llvmAsmtext and llvmAsmleng
+/* Code executed at the beginning of each rule, after yytext and yyleng
  * have been set up.
  */
 #ifndef YY_USER_ACTION
@@ -1175,655 +1115,658 @@
 #define YY_RULE_SETUP \
 	YY_USER_ACTION
 
-/** The main scanner function which does all the work.
- */
 YY_DECL
-{
+	{
 	register yy_state_type yy_current_state;
 	register char *yy_cp, *yy_bp;
 	register int yy_act;
-    
-#line 179 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
+
+#line 179 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
 
 
-#line 1190 "Lexer.cpp"
+#line 1128 "Lexer.cpp"
 
-	if ( !(yy_init) )
+	if ( yy_init )
 		{
-		(yy_init) = 1;
+		yy_init = 0;
 
 #ifdef YY_USER_INIT
 		YY_USER_INIT;
 #endif
 
-		if ( ! (yy_start) )
-			(yy_start) = 1;	/* first start state */
+		if ( ! yy_start )
+			yy_start = 1;	/* first start state */
 
-		if ( ! llvmAsmin )
-			llvmAsmin = stdin;
+		if ( ! yyin )
+			yyin = stdin;
 
-		if ( ! llvmAsmout )
-			llvmAsmout = stdout;
+		if ( ! yyout )
+			yyout = stdout;
 
-		if ( ! YY_CURRENT_BUFFER ) {
-			llvmAsmensure_buffer_stack ();
-			YY_CURRENT_BUFFER_LVALUE =
-				llvmAsm_create_buffer(llvmAsmin,YY_BUF_SIZE );
-		}
+		if ( ! yy_current_buffer )
+			yy_current_buffer =
+				yy_create_buffer( yyin, YY_BUF_SIZE );
 
-		llvmAsm_load_buffer_state( );
+		yy_load_buffer_state();
 		}
 
 	while ( 1 )		/* loops until end-of-file is reached */
 		{
-		yy_cp = (yy_c_buf_p);
+		yy_cp = yy_c_buf_p;
 
-		/* Support of llvmAsmtext. */
-		*yy_cp = (yy_hold_char);
+		/* Support of yytext. */
+		*yy_cp = yy_hold_char;
 
 		/* yy_bp points to the position in yy_ch_buf of the start of
 		 * the current run.
 		 */
 		yy_bp = yy_cp;
 
-		yy_current_state = (yy_start);
+		yy_current_state = yy_start;
+		yy_state_ptr = yy_state_buf;
+		*yy_state_ptr++ = yy_current_state;
 yy_match:
 		do
 			{
 			register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
-			if ( yy_accept[yy_current_state] )
-				{
-				(yy_last_accepting_state) = yy_current_state;
-				(yy_last_accepting_cpos) = yy_cp;
-				}
 			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 >= 501 )
+				if ( yy_current_state >= 504 )
 					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 != 500 );
-		yy_cp = (yy_last_accepting_cpos);
-		yy_current_state = (yy_last_accepting_state);
+		while ( yy_current_state != 503 );
 
 yy_find_action:
-		yy_act = yy_accept[yy_current_state];
+		yy_current_state = *--yy_state_ptr;
+		yy_lp = yy_accept[yy_current_state];
+find_rule: /* we branch to this label when backing up */
+		for ( ; ; ) /* until we find what rule we matched */
+			{
+			if ( yy_lp && yy_lp < yy_accept[yy_current_state + 1] )
+				{
+				yy_act = yy_acclist[yy_lp];
+					{
+					yy_full_match = yy_cp;
+					break;
+					}
+				}
+			--yy_cp;
+			yy_current_state = *--yy_state_ptr;
+			yy_lp = yy_accept[yy_current_state];
+			}
 
 		YY_DO_BEFORE_ACTION;
 
-		if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] )
+		if ( yy_act != YY_END_OF_BUFFER )
 			{
 			int yyl;
-			for ( yyl = 0; yyl < llvmAsmleng; ++yyl )
-				if ( llvmAsmtext[yyl] == '\n' )
-					   
-    llvmAsmlineno++;
-;
+			for ( yyl = 0; yyl < yyleng; ++yyl )
+				if ( yytext[yyl] == '\n' )
+					++yylineno;
 			}
 
 do_action:	/* This label is used only to access EOF actions. */
 
+
 		switch ( yy_act )
 	{ /* beginning of action switch */
-			case 0: /* must back up */
-			/* undo the effects of YY_DO_BEFORE_ACTION */
-			*yy_cp = (yy_hold_char);
-			yy_cp = (yy_last_accepting_cpos);
-			yy_current_state = (yy_last_accepting_state);
-			goto yy_find_action;
-
 case 1:
 YY_RULE_SETUP
-#line 181 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
+#line 181 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
 { /* Ignore comments for now */ }
 	YY_BREAK
 case 2:
 YY_RULE_SETUP
-#line 183 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
+#line 183 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
 { return BEGINTOK; }
 	YY_BREAK
 case 3:
 YY_RULE_SETUP
-#line 184 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
+#line 184 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
 { return ENDTOK; }
 	YY_BREAK
 case 4:
 YY_RULE_SETUP
-#line 185 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
+#line 185 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
 { return TRUETOK;  }
 	YY_BREAK
 case 5:
 YY_RULE_SETUP
-#line 186 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
+#line 186 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
 { return FALSETOK; }
 	YY_BREAK
 case 6:
 YY_RULE_SETUP
-#line 187 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
+#line 187 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
 { return DECLARE; }
 	YY_BREAK
 case 7:
 YY_RULE_SETUP
-#line 188 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
+#line 188 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
 { return GLOBAL; }
 	YY_BREAK
 case 8:
 YY_RULE_SETUP
-#line 189 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
+#line 189 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
 { return CONSTANT; }
 	YY_BREAK
 case 9:
 YY_RULE_SETUP
-#line 190 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
+#line 190 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
 { return INTERNAL; }
 	YY_BREAK
 case 10:
 YY_RULE_SETUP
-#line 191 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
+#line 191 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
 { return LINKONCE; }
 	YY_BREAK
 case 11:
 YY_RULE_SETUP
-#line 192 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
+#line 192 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
 { return WEAK; }
 	YY_BREAK
 case 12:
 YY_RULE_SETUP
-#line 193 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
+#line 193 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
 { return APPENDING; }
 	YY_BREAK
 case 13:
 YY_RULE_SETUP
-#line 194 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
+#line 194 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
 { return DLLIMPORT; }
 	YY_BREAK
 case 14:
 YY_RULE_SETUP
-#line 195 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
+#line 195 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
 { return DLLEXPORT; }
 	YY_BREAK
 case 15:
 YY_RULE_SETUP
-#line 196 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
+#line 196 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
 { return EXTERN_WEAK; }
 	YY_BREAK
 case 16:
 YY_RULE_SETUP
-#line 197 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
+#line 197 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
 { return EXTERNAL; }    /* Deprecated, turn into external */
 	YY_BREAK
 case 17:
 YY_RULE_SETUP
-#line 198 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
+#line 198 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
 { return EXTERNAL; }
 	YY_BREAK
 case 18:
 YY_RULE_SETUP
-#line 199 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
+#line 199 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
 { return IMPLEMENTATION; }
 	YY_BREAK
 case 19:
 YY_RULE_SETUP
-#line 200 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
+#line 200 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
 { return ZEROINITIALIZER; }
 	YY_BREAK
 case 20:
 YY_RULE_SETUP
-#line 201 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
+#line 201 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
 { return DOTDOTDOT; }
 	YY_BREAK
 case 21:
 YY_RULE_SETUP
-#line 202 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
+#line 202 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
 { return UNDEF; }
 	YY_BREAK
 case 22:
 YY_RULE_SETUP
-#line 203 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
+#line 203 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
 { return NULL_TOK; }
 	YY_BREAK
 case 23:
 YY_RULE_SETUP
-#line 204 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
+#line 204 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
 { return TO; }
 	YY_BREAK
 case 24:
 YY_RULE_SETUP
-#line 205 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
+#line 205 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
 { RET_TOK(TermOpVal, Unwind, UNWIND); }
 	YY_BREAK
 case 25:
 YY_RULE_SETUP
-#line 206 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
+#line 206 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
 { return NOT; }  /* Deprecated, turned into XOR */
 	YY_BREAK
 case 26:
 YY_RULE_SETUP
-#line 207 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
+#line 207 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
 { return TAIL; }
 	YY_BREAK
 case 27:
 YY_RULE_SETUP
-#line 208 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
+#line 208 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
 { return TARGET; }
 	YY_BREAK
 case 28:
 YY_RULE_SETUP
-#line 209 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
+#line 209 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
 { return TRIPLE; }
 	YY_BREAK
 case 29:
 YY_RULE_SETUP
-#line 210 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
+#line 210 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
 { return DEPLIBS; }
 	YY_BREAK
 case 30:
 YY_RULE_SETUP
-#line 211 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
+#line 211 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
 { return ENDIAN; }
 	YY_BREAK
 case 31:
 YY_RULE_SETUP
-#line 212 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
+#line 212 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
 { return POINTERSIZE; }
 	YY_BREAK
 case 32:
 YY_RULE_SETUP
-#line 213 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
-{ return LITTLE; }
+#line 213 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
+{ return DATA; }
 	YY_BREAK
 case 33:
 YY_RULE_SETUP
-#line 214 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
-{ return BIG; }
+#line 214 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
+{ return LITTLE; }
 	YY_BREAK
 case 34:
 YY_RULE_SETUP
-#line 215 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
-{ return VOLATILE; }
+#line 215 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
+{ return BIG; }
 	YY_BREAK
 case 35:
 YY_RULE_SETUP
-#line 216 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
-{ return ALIGN;  }
+#line 216 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
+{ return VOLATILE; }
 	YY_BREAK
 case 36:
 YY_RULE_SETUP
-#line 217 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
-{ return SECTION; }
+#line 217 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
+{ return ALIGN;  }
 	YY_BREAK
 case 37:
 YY_RULE_SETUP
-#line 218 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
-{ return MODULE; }
+#line 218 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
+{ return SECTION; }
 	YY_BREAK
 case 38:
 YY_RULE_SETUP
-#line 219 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
-{ return ASM_TOK; }
+#line 219 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
+{ return MODULE; }
 	YY_BREAK
 case 39:
 YY_RULE_SETUP
-#line 220 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
-{ return SIDEEFFECT; }
+#line 220 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
+{ return ASM_TOK; }
 	YY_BREAK
 case 40:
 YY_RULE_SETUP
-#line 222 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
-{ return CC_TOK; }
+#line 221 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
+{ return SIDEEFFECT; }
 	YY_BREAK
 case 41:
 YY_RULE_SETUP
-#line 223 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
-{ return CCC_TOK; }
+#line 223 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
+{ return CC_TOK; }
 	YY_BREAK
 case 42:
 YY_RULE_SETUP
-#line 224 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
-{ return CSRETCC_TOK; }
+#line 224 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
+{ return CCC_TOK; }
 	YY_BREAK
 case 43:
 YY_RULE_SETUP
-#line 225 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
-{ return FASTCC_TOK; }
+#line 225 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
+{ return CSRETCC_TOK; }
 	YY_BREAK
 case 44:
 YY_RULE_SETUP
-#line 226 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
-{ return COLDCC_TOK; }
+#line 226 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
+{ return FASTCC_TOK; }
 	YY_BREAK
 case 45:
 YY_RULE_SETUP
-#line 227 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
-{ return X86_STDCALLCC_TOK; }
+#line 227 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
+{ return COLDCC_TOK; }
 	YY_BREAK
 case 46:
 YY_RULE_SETUP
-#line 228 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
-{ return X86_FASTCALLCC_TOK; }
+#line 228 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
+{ return X86_STDCALLCC_TOK; }
 	YY_BREAK
 case 47:
 YY_RULE_SETUP
-#line 230 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
-{ llvmAsmlval.PrimType = Type::VoidTy  ; return VOID;   }
+#line 229 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
+{ return X86_FASTCALLCC_TOK; }
 	YY_BREAK
 case 48:
 YY_RULE_SETUP
-#line 231 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
-{ llvmAsmlval.PrimType = Type::BoolTy  ; return BOOL;   }
+#line 231 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
+{ llvmAsmlval.PrimType = Type::VoidTy  ; return VOID;   }
 	YY_BREAK
 case 49:
 YY_RULE_SETUP
-#line 232 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
-{ llvmAsmlval.PrimType = Type::SByteTy ; return SBYTE;  }
+#line 232 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
+{ llvmAsmlval.PrimType = Type::BoolTy  ; return BOOL;   }
 	YY_BREAK
 case 50:
 YY_RULE_SETUP
-#line 233 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
-{ llvmAsmlval.PrimType = Type::UByteTy ; return UBYTE;  }
+#line 233 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
+{ llvmAsmlval.PrimType = Type::SByteTy ; return SBYTE;  }
 	YY_BREAK
 case 51:
 YY_RULE_SETUP
-#line 234 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
-{ llvmAsmlval.PrimType = Type::ShortTy ; return SHORT;  }
+#line 234 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
+{ llvmAsmlval.PrimType = Type::UByteTy ; return UBYTE;  }
 	YY_BREAK
 case 52:
 YY_RULE_SETUP
-#line 235 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
-{ llvmAsmlval.PrimType = Type::UShortTy; return USHORT; }
+#line 235 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
+{ llvmAsmlval.PrimType = Type::ShortTy ; return SHORT;  }
 	YY_BREAK
 case 53:
 YY_RULE_SETUP
-#line 236 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
-{ llvmAsmlval.PrimType = Type::IntTy   ; return INT;    }
+#line 236 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
+{ llvmAsmlval.PrimType = Type::UShortTy; return USHORT; }
 	YY_BREAK
 case 54:
 YY_RULE_SETUP
-#line 237 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
-{ llvmAsmlval.PrimType = Type::UIntTy  ; return UINT;   }
+#line 237 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
+{ llvmAsmlval.PrimType = Type::IntTy   ; return INT;    }
 	YY_BREAK
 case 55:
 YY_RULE_SETUP
-#line 238 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
-{ llvmAsmlval.PrimType = Type::LongTy  ; return LONG;   }
+#line 238 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
+{ llvmAsmlval.PrimType = Type::UIntTy  ; return UINT;   }
 	YY_BREAK
 case 56:
 YY_RULE_SETUP
-#line 239 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
-{ llvmAsmlval.PrimType = Type::ULongTy ; return ULONG;  }
+#line 239 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
+{ llvmAsmlval.PrimType = Type::LongTy  ; return LONG;   }
 	YY_BREAK
 case 57:
 YY_RULE_SETUP
-#line 240 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
-{ llvmAsmlval.PrimType = Type::FloatTy ; return FLOAT;  }
+#line 240 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
+{ llvmAsmlval.PrimType = Type::ULongTy ; return ULONG;  }
 	YY_BREAK
 case 58:
 YY_RULE_SETUP
-#line 241 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
-{ llvmAsmlval.PrimType = Type::DoubleTy; return DOUBLE; }
+#line 241 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
+{ llvmAsmlval.PrimType = Type::FloatTy ; return FLOAT;  }
 	YY_BREAK
 case 59:
 YY_RULE_SETUP
-#line 242 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
-{ llvmAsmlval.PrimType = Type::LabelTy ; return LABEL;  }
+#line 242 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
+{ llvmAsmlval.PrimType = Type::DoubleTy; return DOUBLE; }
 	YY_BREAK
 case 60:
 YY_RULE_SETUP
-#line 243 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
-{ return TYPE;   }
+#line 243 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
+{ llvmAsmlval.PrimType = Type::LabelTy ; return LABEL;  }
 	YY_BREAK
 case 61:
 YY_RULE_SETUP
-#line 244 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
-{ return OPAQUE; }
+#line 244 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
+{ return TYPE;   }
 	YY_BREAK
 case 62:
 YY_RULE_SETUP
-#line 246 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
-{ RET_TOK(BinaryOpVal, Add, ADD); }
+#line 245 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
+{ return OPAQUE; }
 	YY_BREAK
 case 63:
 YY_RULE_SETUP
-#line 247 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
-{ RET_TOK(BinaryOpVal, Sub, SUB); }
+#line 247 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
+{ RET_TOK(BinaryOpVal, Add, ADD); }
 	YY_BREAK
 case 64:
 YY_RULE_SETUP
-#line 248 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
-{ RET_TOK(BinaryOpVal, Mul, MUL); }
+#line 248 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
+{ RET_TOK(BinaryOpVal, Sub, SUB); }
 	YY_BREAK
 case 65:
 YY_RULE_SETUP
-#line 249 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
-{ RET_TOK(BinaryOpVal, Div, DIV); }
+#line 249 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
+{ RET_TOK(BinaryOpVal, Mul, MUL); }
 	YY_BREAK
 case 66:
 YY_RULE_SETUP
-#line 250 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
-{ RET_TOK(BinaryOpVal, Rem, REM); }
+#line 250 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
+{ RET_TOK(BinaryOpVal, Div, DIV); }
 	YY_BREAK
 case 67:
 YY_RULE_SETUP
-#line 251 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
-{ RET_TOK(BinaryOpVal, And, AND); }
+#line 251 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
+{ RET_TOK(BinaryOpVal, Rem, REM); }
 	YY_BREAK
 case 68:
 YY_RULE_SETUP
-#line 252 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
-{ RET_TOK(BinaryOpVal, Or , OR ); }
+#line 252 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
+{ RET_TOK(BinaryOpVal, And, AND); }
 	YY_BREAK
 case 69:
 YY_RULE_SETUP
-#line 253 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
-{ RET_TOK(BinaryOpVal, Xor, XOR); }
+#line 253 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
+{ RET_TOK(BinaryOpVal, Or , OR ); }
 	YY_BREAK
 case 70:
 YY_RULE_SETUP
-#line 254 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
-{ RET_TOK(BinaryOpVal, SetNE, SETNE); }
+#line 254 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
+{ RET_TOK(BinaryOpVal, Xor, XOR); }
 	YY_BREAK
 case 71:
 YY_RULE_SETUP
-#line 255 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
-{ RET_TOK(BinaryOpVal, SetEQ, SETEQ); }
+#line 255 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
+{ RET_TOK(BinaryOpVal, SetNE, SETNE); }
 	YY_BREAK
 case 72:
 YY_RULE_SETUP
-#line 256 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
-{ RET_TOK(BinaryOpVal, SetLT, SETLT); }
+#line 256 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
+{ RET_TOK(BinaryOpVal, SetEQ, SETEQ); }
 	YY_BREAK
 case 73:
 YY_RULE_SETUP
-#line 257 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
-{ RET_TOK(BinaryOpVal, SetGT, SETGT); }
+#line 257 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
+{ RET_TOK(BinaryOpVal, SetLT, SETLT); }
 	YY_BREAK
 case 74:
 YY_RULE_SETUP
-#line 258 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
-{ RET_TOK(BinaryOpVal, SetLE, SETLE); }
+#line 258 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
+{ RET_TOK(BinaryOpVal, SetGT, SETGT); }
 	YY_BREAK
 case 75:
 YY_RULE_SETUP
-#line 259 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
-{ RET_TOK(BinaryOpVal, SetGE, SETGE); }
+#line 259 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
+{ RET_TOK(BinaryOpVal, SetLE, SETLE); }
 	YY_BREAK
 case 76:
 YY_RULE_SETUP
-#line 261 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
-{ RET_TOK(OtherOpVal, PHI, PHI_TOK); }
+#line 260 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
+{ RET_TOK(BinaryOpVal, SetGE, SETGE); }
 	YY_BREAK
 case 77:
 YY_RULE_SETUP
-#line 262 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
-{ RET_TOK(OtherOpVal, Call, CALL); }
+#line 262 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
+{ RET_TOK(OtherOpVal, PHI, PHI_TOK); }
 	YY_BREAK
 case 78:
 YY_RULE_SETUP
-#line 263 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
-{ RET_TOK(OtherOpVal, Cast, CAST); }
+#line 263 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
+{ RET_TOK(OtherOpVal, Call, CALL); }
 	YY_BREAK
 case 79:
 YY_RULE_SETUP
-#line 264 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
-{ RET_TOK(OtherOpVal, Select, SELECT); }
+#line 264 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
+{ RET_TOK(OtherOpVal, Cast, CAST); }
 	YY_BREAK
 case 80:
 YY_RULE_SETUP
-#line 265 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
-{ RET_TOK(OtherOpVal, Shl, SHL); }
+#line 265 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
+{ RET_TOK(OtherOpVal, Select, SELECT); }
 	YY_BREAK
 case 81:
 YY_RULE_SETUP
-#line 266 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
-{ RET_TOK(OtherOpVal, Shr, SHR); }
+#line 266 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
+{ RET_TOK(OtherOpVal, Shl, SHL); }
 	YY_BREAK
 case 82:
 YY_RULE_SETUP
-#line 267 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
-{ return VANEXT_old; }
+#line 267 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
+{ RET_TOK(OtherOpVal, Shr, SHR); }
 	YY_BREAK
 case 83:
 YY_RULE_SETUP
-#line 268 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
-{ return VAARG_old; }
+#line 268 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
+{ return VANEXT_old; }
 	YY_BREAK
 case 84:
 YY_RULE_SETUP
-#line 269 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
-{ RET_TOK(OtherOpVal, VAArg , VAARG); }
+#line 269 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
+{ return VAARG_old; }
 	YY_BREAK
 case 85:
 YY_RULE_SETUP
-#line 270 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
-{ RET_TOK(TermOpVal, Ret, RET); }
+#line 270 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
+{ RET_TOK(OtherOpVal, VAArg , VAARG); }
 	YY_BREAK
 case 86:
 YY_RULE_SETUP
-#line 271 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
-{ RET_TOK(TermOpVal, Br, BR); }
+#line 271 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
+{ RET_TOK(TermOpVal, Ret, RET); }
 	YY_BREAK
 case 87:
 YY_RULE_SETUP
-#line 272 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
-{ RET_TOK(TermOpVal, Switch, SWITCH); }
+#line 272 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
+{ RET_TOK(TermOpVal, Br, BR); }
 	YY_BREAK
 case 88:
 YY_RULE_SETUP
-#line 273 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
-{ RET_TOK(TermOpVal, Invoke, INVOKE); }
+#line 273 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
+{ RET_TOK(TermOpVal, Switch, SWITCH); }
 	YY_BREAK
 case 89:
 YY_RULE_SETUP
-#line 274 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
-{ RET_TOK(TermOpVal, Unwind, UNWIND); }
+#line 274 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
+{ RET_TOK(TermOpVal, Invoke, INVOKE); }
 	YY_BREAK
 case 90:
 YY_RULE_SETUP
-#line 275 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
-{ RET_TOK(TermOpVal, Unreachable, UNREACHABLE); }
+#line 275 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
+{ RET_TOK(TermOpVal, Unwind, UNWIND); }
 	YY_BREAK
 case 91:
 YY_RULE_SETUP
-#line 277 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
-{ RET_TOK(MemOpVal, Malloc, MALLOC); }
+#line 276 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
+{ RET_TOK(TermOpVal, Unreachable, UNREACHABLE); }
 	YY_BREAK
 case 92:
 YY_RULE_SETUP
-#line 278 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
-{ RET_TOK(MemOpVal, Alloca, ALLOCA); }
+#line 278 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
+{ RET_TOK(MemOpVal, Malloc, MALLOC); }
 	YY_BREAK
 case 93:
 YY_RULE_SETUP
-#line 279 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
-{ RET_TOK(MemOpVal, Free, FREE); }
+#line 279 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
+{ RET_TOK(MemOpVal, Alloca, ALLOCA); }
 	YY_BREAK
 case 94:
 YY_RULE_SETUP
-#line 280 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
-{ RET_TOK(MemOpVal, Load, LOAD); }
+#line 280 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
+{ RET_TOK(MemOpVal, Free, FREE); }
 	YY_BREAK
 case 95:
 YY_RULE_SETUP
-#line 281 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
-{ RET_TOK(MemOpVal, Store, STORE); }
+#line 281 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
+{ RET_TOK(MemOpVal, Load, LOAD); }
 	YY_BREAK
 case 96:
 YY_RULE_SETUP
-#line 282 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
-{ RET_TOK(MemOpVal, GetElementPtr, GETELEMENTPTR); }
+#line 282 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
+{ RET_TOK(MemOpVal, Store, STORE); }
 	YY_BREAK
 case 97:
 YY_RULE_SETUP
-#line 284 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
-{ RET_TOK(OtherOpVal, ExtractElement, EXTRACTELEMENT); }
+#line 283 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
+{ RET_TOK(MemOpVal, GetElementPtr, GETELEMENTPTR); }
 	YY_BREAK
 case 98:
 YY_RULE_SETUP
-#line 285 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
-{ RET_TOK(OtherOpVal, InsertElement, INSERTELEMENT); }
+#line 285 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
+{ RET_TOK(OtherOpVal, ExtractElement, EXTRACTELEMENT); }
 	YY_BREAK
 case 99:
 YY_RULE_SETUP
-#line 286 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
-{ RET_TOK(OtherOpVal, ShuffleVector, SHUFFLEVECTOR); }
+#line 286 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
+{ RET_TOK(OtherOpVal, InsertElement, INSERTELEMENT); }
 	YY_BREAK
 case 100:
 YY_RULE_SETUP
-#line 289 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
+#line 287 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
+{ RET_TOK(OtherOpVal, ShuffleVector, SHUFFLEVECTOR); }
+	YY_BREAK
+case 101:
+YY_RULE_SETUP
+#line 290 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
 {
-                  UnEscapeLexed(llvmAsmtext+1);
-                  llvmAsmlval.StrVal = strdup(llvmAsmtext+1);             // Skip %
+                  UnEscapeLexed(yytext+1);
+                  llvmAsmlval.StrVal = strdup(yytext+1);             // Skip %
                   return VAR_ID;
                 }
 	YY_BREAK
-case 101:
+case 102:
 YY_RULE_SETUP
-#line 294 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
+#line 295 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
 {
-                  llvmAsmtext[strlen(llvmAsmtext)-1] = 0;  // nuke colon
-                  UnEscapeLexed(llvmAsmtext);
-                  llvmAsmlval.StrVal = strdup(llvmAsmtext);
+                  yytext[strlen(yytext)-1] = 0;  // nuke colon
+                  UnEscapeLexed(yytext);
+                  llvmAsmlval.StrVal = strdup(yytext);
                   return LABELSTR;
                 }
 	YY_BREAK
-case 102:
-/* rule 102 can match eol */
+case 103:
 YY_RULE_SETUP
-#line 300 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
+#line 301 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
 {
-                  llvmAsmtext[strlen(llvmAsmtext)-2] = 0;  // nuke colon, end quote
-                  UnEscapeLexed(llvmAsmtext+1);
-                  llvmAsmlval.StrVal = strdup(llvmAsmtext+1);
+                  yytext[strlen(yytext)-2] = 0;  // nuke colon, end quote
+                  UnEscapeLexed(yytext+1);
+                  llvmAsmlval.StrVal = strdup(yytext+1);
                   return LABELSTR;
                 }
 	YY_BREAK
-case 103:
-/* rule 103 can match eol */
+case 104:
 YY_RULE_SETUP
-#line 307 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
+#line 308 "/Users/resistor/llvm/src/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
                    // [sbyte] c"Hello World\00" constant, for example.
                    //
-                   llvmAsmtext[strlen(llvmAsmtext)-1] = 0;           // nuke end quote
-                   llvmAsmlval.StrVal = strdup(llvmAsmtext+1);  // Nuke start quote
+                   yytext[strlen(yytext)-1] = 0;           // nuke end quote
+                   llvmAsmlval.StrVal = strdup(yytext+1);  // Nuke start quote
                    return STRINGCONSTANT;
                  }
 	YY_BREAK
-case 104:
+case 105:
 YY_RULE_SETUP
-#line 318 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
-{ llvmAsmlval.UInt64Val = atoull(llvmAsmtext); return EUINT64VAL; }
+#line 319 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
+{ llvmAsmlval.UInt64Val = atoull(yytext); return EUINT64VAL; }
 	YY_BREAK
-case 105:
+case 106:
 YY_RULE_SETUP
-#line 319 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
+#line 320 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
 {
-                  uint64_t Val = atoull(llvmAsmtext+1);
+                  uint64_t Val = atoull(yytext+1);
                   // +1:  we have bigger negative range
                   if (Val > (uint64_t)INT64_MAX+1)
                     GenerateError("Constant too large for signed 64 bits!");
@@ -1831,30 +1774,30 @@
                   return ESINT64VAL;
                 }
 	YY_BREAK
-case 106:
+case 107:
 YY_RULE_SETUP
-#line 327 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
+#line 328 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
 {
-                   llvmAsmlval.UInt64Val = HexIntToVal(llvmAsmtext+3);
-                   return llvmAsmtext[0] == 's' ? ESINT64VAL : EUINT64VAL;
+                   llvmAsmlval.UInt64Val = HexIntToVal(yytext+3);
+                   return yytext[0] == 's' ? ESINT64VAL : EUINT64VAL;
                  }
 	YY_BREAK
-case 107:
+case 108:
 YY_RULE_SETUP
-#line 332 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
+#line 333 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
 {
-                  uint64_t Val = atoull(llvmAsmtext+1);
+                  uint64_t Val = atoull(yytext+1);
                   if ((unsigned)Val != Val)
                     GenerateError("Invalid value number (too large)!");
                   llvmAsmlval.UIntVal = unsigned(Val);
                   return UINTVAL;
                 }
 	YY_BREAK
-case 108:
+case 109:
 YY_RULE_SETUP
-#line 339 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
+#line 340 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
 {
-                  uint64_t Val = atoull(llvmAsmtext+2);
+                  uint64_t Val = atoull(yytext+2);
                   // +1:  we have bigger negative range
                   if (Val > (uint64_t)INT32_MAX+1)
                     GenerateError("Constant too large for signed 32 bits!");
@@ -1862,67 +1805,66 @@
                   return SINTVAL;
                 }
 	YY_BREAK
-case 109:
+case 110:
 YY_RULE_SETUP
-#line 348 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
-{ llvmAsmlval.FPVal = atof(llvmAsmtext); return FPVAL; }
+#line 349 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
+{ llvmAsmlval.FPVal = atof(yytext); return FPVAL; }
 	YY_BREAK
-case 110:
+case 111:
 YY_RULE_SETUP
-#line 349 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
-{ llvmAsmlval.FPVal = HexToFP(llvmAsmtext); return FPVAL; }
+#line 350 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
+{ llvmAsmlval.FPVal = HexToFP(yytext); return FPVAL; }
 	YY_BREAK
 case YY_STATE_EOF(INITIAL):
-#line 351 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
+#line 352 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
 {
                   /* Make sure to free the internal buffers for flex when we are
                    * done reading our input!
                    */
-                  llvmAsm_delete_buffer(YY_CURRENT_BUFFER);
+                  yy_delete_buffer(YY_CURRENT_BUFFER);
                   return EOF;
                 }
 	YY_BREAK
-case 111:
-/* rule 111 can match eol */
+case 112:
 YY_RULE_SETUP
-#line 359 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
+#line 360 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
 { /* Ignore whitespace */ }
 	YY_BREAK
-case 112:
+case 113:
 YY_RULE_SETUP
-#line 360 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
-{ return llvmAsmtext[0]; }
+#line 361 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
+{ return yytext[0]; }
 	YY_BREAK
-case 113:
+case 114:
 YY_RULE_SETUP
-#line 362 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
+#line 363 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
 YY_FATAL_ERROR( "flex scanner jammed" );
 	YY_BREAK
-#line 1902 "Lexer.cpp"
+#line 1844 "Lexer.cpp"
 
 	case YY_END_OF_BUFFER:
 		{
 		/* Amount of text matched not including the EOB char. */
-		int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
+		int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
 
 		/* Undo the effects of YY_DO_BEFORE_ACTION. */
-		*yy_cp = (yy_hold_char);
+		*yy_cp = yy_hold_char;
 		YY_RESTORE_YY_MORE_OFFSET
 
-		if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
+		if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
 			{
 			/* We're scanning a new file or input source.  It's
 			 * possible that this happened because the user
-			 * just pointed llvmAsmin at a new source and called
-			 * llvmAsmlex().  If so, then we have to assure
-			 * consistency between YY_CURRENT_BUFFER and our
+			 * just pointed yyin at a new source and called
+			 * yylex().  If so, then we have to assure
+			 * consistency between yy_current_buffer and our
 			 * globals.  Here is the right place to do so, because
 			 * this is the first action (other than possibly a
 			 * back-up) that will match for the new input source.
 			 */
-			(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
-			YY_CURRENT_BUFFER_LVALUE->yy_input_file = llvmAsmin;
-			YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
+			yy_n_chars = yy_current_buffer->yy_n_chars;
+			yy_current_buffer->yy_input_file = yyin;
+			yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
 			}
 
 		/* Note that here we test for yy_c_buf_p "<=" to the position
@@ -1932,13 +1874,13 @@
 		 * end-of-buffer state).  Contrast this with the test
 		 * in input().
 		 */
-		if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
+		if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
 			{ /* This was really a NUL. */
 			yy_state_type yy_next_state;
 
-			(yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
+			yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
 
-			yy_current_state = yy_get_previous_state(  );
+			yy_current_state = yy_get_previous_state();
 
 			/* Okay, we're now positioned to make the NUL
 			 * transition.  We couldn't have
@@ -1951,42 +1893,41 @@
 
 			yy_next_state = yy_try_NUL_trans( yy_current_state );
 
-			yy_bp = (yytext_ptr) + YY_MORE_ADJ;
+			yy_bp = yytext_ptr + YY_MORE_ADJ;
 
 			if ( yy_next_state )
 				{
 				/* Consume the NUL. */
-				yy_cp = ++(yy_c_buf_p);
+				yy_cp = ++yy_c_buf_p;
 				yy_current_state = yy_next_state;
 				goto yy_match;
 				}
 
 			else
 				{
-				yy_cp = (yy_last_accepting_cpos);
-				yy_current_state = (yy_last_accepting_state);
+				yy_cp = yy_c_buf_p;
 				goto yy_find_action;
 				}
 			}
 
-		else switch ( yy_get_next_buffer(  ) )
+		else switch ( yy_get_next_buffer() )
 			{
 			case EOB_ACT_END_OF_FILE:
 				{
-				(yy_did_buffer_switch_on_eof) = 0;
+				yy_did_buffer_switch_on_eof = 0;
 
-				if ( llvmAsmwrap( ) )
+				if ( yywrap() )
 					{
 					/* Note: because we've taken care in
 					 * yy_get_next_buffer() to have set up
-					 * llvmAsmtext, we can now set up
+					 * yytext, we can now set up
 					 * yy_c_buf_p so that if some total
 					 * hoser (like flex itself) wants to
 					 * call the scanner after we return the
 					 * YY_NULL, it'll still work - another
 					 * YY_NULL will get returned.
 					 */
-					(yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
+					yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
 
 					yy_act = YY_STATE_EOF(YY_START);
 					goto do_action;
@@ -1994,30 +1935,30 @@
 
 				else
 					{
-					if ( ! (yy_did_buffer_switch_on_eof) )
+					if ( ! yy_did_buffer_switch_on_eof )
 						YY_NEW_FILE;
 					}
 				break;
 				}
 
 			case EOB_ACT_CONTINUE_SCAN:
-				(yy_c_buf_p) =
-					(yytext_ptr) + yy_amount_of_matched_text;
+				yy_c_buf_p =
+					yytext_ptr + yy_amount_of_matched_text;
 
-				yy_current_state = yy_get_previous_state(  );
+				yy_current_state = yy_get_previous_state();
 
-				yy_cp = (yy_c_buf_p);
-				yy_bp = (yytext_ptr) + YY_MORE_ADJ;
+				yy_cp = yy_c_buf_p;
+				yy_bp = yytext_ptr + YY_MORE_ADJ;
 				goto yy_match;
 
 			case EOB_ACT_LAST_MATCH:
-				(yy_c_buf_p) =
-				&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
+				yy_c_buf_p =
+				&yy_current_buffer->yy_ch_buf[yy_n_chars];
 
-				yy_current_state = yy_get_previous_state(  );
+				yy_current_state = yy_get_previous_state();
 
-				yy_cp = (yy_c_buf_p);
-				yy_bp = (yytext_ptr) + YY_MORE_ADJ;
+				yy_cp = yy_c_buf_p;
+				yy_bp = yytext_ptr + YY_MORE_ADJ;
 				goto yy_find_action;
 			}
 		break;
@@ -2028,7 +1969,8 @@
 			"fatal flex scanner internal error--no action found" );
 	} /* end of action switch */
 		} /* end of scanning one token */
-} /* end of llvmAsmlex */
+	} /* end of yylex */
+
 
 /* yy_get_next_buffer - try to read in a new buffer
  *
@@ -2037,20 +1979,21 @@
  *	EOB_ACT_CONTINUE_SCAN - continue scanning from current position
  *	EOB_ACT_END_OF_FILE - end of file
  */
-static int yy_get_next_buffer (void)
-{
-    	register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
-	register char *source = (yytext_ptr);
+
+static int yy_get_next_buffer()
+	{
+	register char *dest = yy_current_buffer->yy_ch_buf;
+	register char *source = yytext_ptr;
 	register int number_to_move, i;
 	int ret_val;
 
-	if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
+	if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
 		YY_FATAL_ERROR(
 		"fatal flex scanner internal error--end of buffer missed" );
 
-	if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
+	if ( yy_current_buffer->yy_fill_buffer == 0 )
 		{ /* Don't try to fill the buffer, so this is an EOF. */
-		if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
+		if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
 			{
 			/* We matched a single character, the EOB, so
 			 * treat this as a final EOF.
@@ -2070,30 +2013,34 @@
 	/* Try to read more data. */
 
 	/* First move last chars to start of buffer. */
-	number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
+	number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
 
 	for ( i = 0; i < number_to_move; ++i )
 		*(dest++) = *(source++);
 
-	if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
+	if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
 		/* don't do the read, it's not guaranteed to return an EOF,
 		 * just force an EOF
 		 */
-		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
+		yy_current_buffer->yy_n_chars = yy_n_chars = 0;
 
 	else
 		{
-			int num_to_read =
-			YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
+		int num_to_read =
+			yy_current_buffer->yy_buf_size - number_to_move - 1;
 
 		while ( num_to_read <= 0 )
 			{ /* Not enough room in the buffer - grow it. */
+#ifdef YY_USES_REJECT
+			YY_FATAL_ERROR(
+"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
+#else
 
 			/* just a shorter name for the current buffer */
-			YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
+			YY_BUFFER_STATE b = yy_current_buffer;
 
 			int yy_c_buf_p_offset =
-				(int) ((yy_c_buf_p) - b->yy_ch_buf);
+				(int) (yy_c_buf_p - b->yy_ch_buf);
 
 			if ( b->yy_is_our_buffer )
 				{
@@ -2106,7 +2053,8 @@
 
 				b->yy_ch_buf = (char *)
 					/* Include room in for 2 EOB chars. */
-					llvmAsmrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2  );
+					yy_flex_realloc( (void *) b->yy_ch_buf,
+							 b->yy_buf_size + 2 );
 				}
 			else
 				/* Can't grow it, we don't own it. */
@@ -2116,35 +2064,35 @@
 				YY_FATAL_ERROR(
 				"fatal error - scanner input buffer overflow" );
 
-			(yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
+			yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
 
-			num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
+			num_to_read = yy_current_buffer->yy_buf_size -
 						number_to_move - 1;
-
+#endif
 			}
 
 		if ( num_to_read > YY_READ_BUF_SIZE )
 			num_to_read = YY_READ_BUF_SIZE;
 
 		/* Read in more data. */
-		YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
-			(yy_n_chars), num_to_read );
+		YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
+			yy_n_chars, num_to_read );
 
-		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
+		yy_current_buffer->yy_n_chars = yy_n_chars;
 		}
 
-	if ( (yy_n_chars) == 0 )
+	if ( yy_n_chars == 0 )
 		{
 		if ( number_to_move == YY_MORE_ADJ )
 			{
 			ret_val = EOB_ACT_END_OF_FILE;
-			llvmAsmrestart(llvmAsmin  );
+			yyrestart( yyin );
 			}
 
 		else
 			{
 			ret_val = EOB_ACT_LAST_MATCH;
-			YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
+			yy_current_buffer->yy_buffer_status =
 				YY_BUFFER_EOF_PENDING;
 			}
 		}
@@ -2152,141 +2100,148 @@
 	else
 		ret_val = EOB_ACT_CONTINUE_SCAN;
 
-	(yy_n_chars) += number_to_move;
-	YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
-	YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
+	yy_n_chars += number_to_move;
+	yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
+	yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
 
-	(yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
+	yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
 
 	return ret_val;
-}
+	}
+
 
 /* yy_get_previous_state - get the state just before the EOB char was reached */
 
-    static yy_state_type yy_get_previous_state (void)
-{
+static yy_state_type yy_get_previous_state()
+	{
 	register yy_state_type yy_current_state;
 	register char *yy_cp;
-    
-	yy_current_state = (yy_start);
 
-	for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
+	yy_current_state = yy_start;
+	yy_state_ptr = yy_state_buf;
+	*yy_state_ptr++ = yy_current_state;
+
+	for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
 		{
 		register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
-		if ( yy_accept[yy_current_state] )
-			{
-			(yy_last_accepting_state) = yy_current_state;
-			(yy_last_accepting_cpos) = yy_cp;
-			}
 		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 >= 501 )
+			if ( yy_current_state >= 504 )
 				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;
 		}
 
 	return yy_current_state;
-}
+	}
+
 
 /* yy_try_NUL_trans - try to make a transition on the NUL character
  *
  * synopsis
  *	next_state = yy_try_NUL_trans( current_state );
  */
-    static yy_state_type yy_try_NUL_trans  (yy_state_type yy_current_state )
-{
+
+#ifdef YY_USE_PROTOS
+static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
+#else
+static yy_state_type yy_try_NUL_trans( yy_current_state )
+yy_state_type yy_current_state;
+#endif
+	{
 	register int yy_is_jam;
-    	register char *yy_cp = (yy_c_buf_p);
 
 	register YY_CHAR yy_c = 1;
-	if ( yy_accept[yy_current_state] )
-		{
-		(yy_last_accepting_state) = yy_current_state;
-		(yy_last_accepting_cpos) = yy_cp;
-		}
 	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 >= 501 )
+		if ( yy_current_state >= 504 )
 			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 == 500);
+	yy_is_jam = (yy_current_state == 503);
+	if ( ! yy_is_jam )
+		*yy_state_ptr++ = yy_current_state;
 
 	return yy_is_jam ? 0 : yy_current_state;
-}
+	}
 
-    static inline void yyunput (int c, register char * yy_bp )
-{
-	register char *yy_cp;
-    
-    yy_cp = (yy_c_buf_p);
 
-	/* undo effects of setting up llvmAsmtext */
-	*yy_cp = (yy_hold_char);
+#ifndef YY_NO_UNPUT
+#ifdef YY_USE_PROTOS
+static inline void yyunput( int c, register char *yy_bp )
+#else
+static inline void yyunput( c, yy_bp )
+int c;
+register char *yy_bp;
+#endif
+	{
+	register char *yy_cp = yy_c_buf_p;
+
+	/* undo effects of setting up yytext */
+	*yy_cp = yy_hold_char;
 
-	if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
+	if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
 		{ /* need to shift things up to make room */
 		/* +2 for EOB chars. */
-		register int number_to_move = (yy_n_chars) + 2;
-		register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
-					YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
+		register int number_to_move = yy_n_chars + 2;
+		register char *dest = &yy_current_buffer->yy_ch_buf[
+					yy_current_buffer->yy_buf_size + 2];
 		register char *source =
-				&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
+				&yy_current_buffer->yy_ch_buf[number_to_move];
 
-		while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
+		while ( source > yy_current_buffer->yy_ch_buf )
 			*--dest = *--source;
 
 		yy_cp += (int) (dest - source);
 		yy_bp += (int) (dest - source);
-		YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
-			(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
+		yy_current_buffer->yy_n_chars =
+			yy_n_chars = yy_current_buffer->yy_buf_size;
 
-		if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
+		if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
 			YY_FATAL_ERROR( "flex scanner push-back overflow" );
 		}
 
 	*--yy_cp = (char) c;
 
-    if ( c == '\n' ){
-        --llvmAsmlineno;
-    }
+	if ( c == '\n' )
+		--yylineno;
+
+	yytext_ptr = yy_bp;
+	yy_hold_char = *yy_cp;
+	yy_c_buf_p = yy_cp;
+	}
+#endif	/* ifndef YY_NO_UNPUT */
 
-	(yytext_ptr) = yy_bp;
-	(yy_hold_char) = *yy_cp;
-	(yy_c_buf_p) = yy_cp;
-}
 
-#ifndef YY_NO_INPUT
 #ifdef __cplusplus
-    static int yyinput (void)
+static int yyinput()
 #else
-    static int input  (void)
+static int input()
 #endif
-
-{
+	{
 	int c;
-    
-	*(yy_c_buf_p) = (yy_hold_char);
 
-	if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
+	*yy_c_buf_p = yy_hold_char;
+
+	if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
 		{
 		/* yy_c_buf_p now points to the character we want to return.
 		 * If this occurs *before* the EOB characters, then it's a
 		 * valid NUL; if not, then we've hit the end of the buffer.
 		 */
-		if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
+		if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
 			/* This was really a NUL. */
-			*(yy_c_buf_p) = '\0';
+			*yy_c_buf_p = '\0';
 
 		else
 			{ /* need more input */
-			int offset = (yy_c_buf_p) - (yytext_ptr);
-			++(yy_c_buf_p);
+			int offset = yy_c_buf_p - yytext_ptr;
+			++yy_c_buf_p;
 
-			switch ( yy_get_next_buffer(  ) )
+			switch ( yy_get_next_buffer() )
 				{
 				case EOB_ACT_LAST_MATCH:
 					/* This happens because yy_g_n_b()
@@ -2300,16 +2255,16 @@
 					 */
 
 					/* Reset buffer status. */
-					llvmAsmrestart(llvmAsmin );
+					yyrestart( yyin );
 
-					/*FALLTHROUGH*/
+					/* fall through */
 
 				case EOB_ACT_END_OF_FILE:
 					{
-					if ( llvmAsmwrap( ) )
+					if ( yywrap() )
 						return EOF;
 
-					if ( ! (yy_did_buffer_switch_on_eof) )
+					if ( ! yy_did_buffer_switch_on_eof )
 						YY_NEW_FILE;
 #ifdef __cplusplus
 					return yyinput();
@@ -2319,170 +2274,174 @@
 					}
 
 				case EOB_ACT_CONTINUE_SCAN:
-					(yy_c_buf_p) = (yytext_ptr) + offset;
+					yy_c_buf_p = yytext_ptr + offset;
 					break;
 				}
 			}
 		}
 
-	c = *(unsigned char *) (yy_c_buf_p);	/* cast for 8-bit char's */
-	*(yy_c_buf_p) = '\0';	/* preserve llvmAsmtext */
-	(yy_hold_char) = *++(yy_c_buf_p);
+	c = *(unsigned char *) yy_c_buf_p;	/* cast for 8-bit char's */
+	*yy_c_buf_p = '\0';	/* preserve yytext */
+	yy_hold_char = *++yy_c_buf_p;
 
 	if ( c == '\n' )
-		   
-    llvmAsmlineno++;
-;
+		++yylineno;
 
 	return c;
-}
-#endif	/* ifndef YY_NO_INPUT */
+	}
 
-/** Immediately switch to a different input stream.
- * @param input_file A readable stream.
- * 
- * @note This function does not reset the start condition to @c INITIAL .
- */
-    void llvmAsmrestart  (FILE * input_file )
-{
-    
-	if ( ! YY_CURRENT_BUFFER ){
-        llvmAsmensure_buffer_stack ();
-		YY_CURRENT_BUFFER_LVALUE =
-            llvmAsm_create_buffer(llvmAsmin,YY_BUF_SIZE );
+
+#ifdef YY_USE_PROTOS
+void yyrestart( FILE *input_file )
+#else
+void yyrestart( input_file )
+FILE *input_file;
+#endif
+	{
+	if ( ! yy_current_buffer )
+		yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
+
+	yy_init_buffer( yy_current_buffer, input_file );
+	yy_load_buffer_state();
 	}
 
-	llvmAsm_init_buffer(YY_CURRENT_BUFFER,input_file );
-	llvmAsm_load_buffer_state( );
-}
 
-/** Switch to a different input buffer.
- * @param new_buffer The new input buffer.
- * 
- */
-    void llvmAsm_switch_to_buffer  (YY_BUFFER_STATE  new_buffer )
-{
-    
-	/* TODO. We should be able to replace this entire function body
-	 * with
-	 *		llvmAsmpop_buffer_state();
-	 *		llvmAsmpush_buffer_state(new_buffer);
-     */
-	llvmAsmensure_buffer_stack ();
-	if ( YY_CURRENT_BUFFER == new_buffer )
+#ifdef YY_USE_PROTOS
+void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
+#else
+void yy_switch_to_buffer( new_buffer )
+YY_BUFFER_STATE new_buffer;
+#endif
+	{
+	if ( yy_current_buffer == new_buffer )
 		return;
 
-	if ( YY_CURRENT_BUFFER )
+	if ( yy_current_buffer )
 		{
 		/* Flush out information for old buffer. */
-		*(yy_c_buf_p) = (yy_hold_char);
-		YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
-		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
+		*yy_c_buf_p = yy_hold_char;
+		yy_current_buffer->yy_buf_pos = yy_c_buf_p;
+		yy_current_buffer->yy_n_chars = yy_n_chars;
 		}
 
-	YY_CURRENT_BUFFER_LVALUE = new_buffer;
-	llvmAsm_load_buffer_state( );
+	yy_current_buffer = new_buffer;
+	yy_load_buffer_state();
 
 	/* We don't actually know whether we did this switch during
-	 * EOF (llvmAsmwrap()) processing, but the only time this flag
-	 * is looked at is after llvmAsmwrap() is called, so it's safe
+	 * EOF (yywrap()) processing, but the only time this flag
+	 * is looked at is after yywrap() is called, so it's safe
 	 * to go ahead and always set it.
 	 */
-	(yy_did_buffer_switch_on_eof) = 1;
-}
+	yy_did_buffer_switch_on_eof = 1;
+	}
 
-static void llvmAsm_load_buffer_state  (void)
-{
-    	(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
-	(yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
-	llvmAsmin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
-	(yy_hold_char) = *(yy_c_buf_p);
-}
 
-/** Allocate and initialize an input buffer state.
- * @param file A readable stream.
- * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
- * 
- * @return the allocated buffer state.
- */
-    YY_BUFFER_STATE llvmAsm_create_buffer  (FILE * file, int  size )
-{
+#ifdef YY_USE_PROTOS
+void yy_load_buffer_state( void )
+#else
+void yy_load_buffer_state()
+#endif
+	{
+	yy_n_chars = yy_current_buffer->yy_n_chars;
+	yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
+	yyin = yy_current_buffer->yy_input_file;
+	yy_hold_char = *yy_c_buf_p;
+	}
+
+
+#ifdef YY_USE_PROTOS
+YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
+#else
+YY_BUFFER_STATE yy_create_buffer( file, size )
+FILE *file;
+int size;
+#endif
+	{
 	YY_BUFFER_STATE b;
-    
-	b = (YY_BUFFER_STATE) llvmAsmalloc(sizeof( struct yy_buffer_state )  );
+
+	b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
 	if ( ! b )
-		YY_FATAL_ERROR( "out of dynamic memory in llvmAsm_create_buffer()" );
+		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
 
 	b->yy_buf_size = size;
 
 	/* yy_ch_buf has to be 2 characters longer than the size given because
 	 * we need to put in 2 end-of-buffer characters.
 	 */
-	b->yy_ch_buf = (char *) llvmAsmalloc(b->yy_buf_size + 2  );
+	b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
 	if ( ! b->yy_ch_buf )
-		YY_FATAL_ERROR( "out of dynamic memory in llvmAsm_create_buffer()" );
+		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
 
 	b->yy_is_our_buffer = 1;
 
-	llvmAsm_init_buffer(b,file );
+	yy_init_buffer( b, file );
 
 	return b;
-}
+	}
 
-/** Destroy the buffer.
- * @param b a buffer created with llvmAsm_create_buffer()
- * 
- */
-    void llvmAsm_delete_buffer (YY_BUFFER_STATE  b )
-{
-    
+
+#ifdef YY_USE_PROTOS
+void yy_delete_buffer( YY_BUFFER_STATE b )
+#else
+void yy_delete_buffer( b )
+YY_BUFFER_STATE b;
+#endif
+	{
 	if ( ! b )
 		return;
 
-	if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
-		YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
+	if ( b == yy_current_buffer )
+		yy_current_buffer = (YY_BUFFER_STATE) 0;
 
 	if ( b->yy_is_our_buffer )
-		llvmAsmfree((void *) b->yy_ch_buf  );
+		yy_flex_free( (void *) b->yy_ch_buf );
 
-	llvmAsmfree((void *) b  );
-}
+	yy_flex_free( (void *) b );
+	}
 
-/* Initializes or reinitializes a buffer.
- * This function is sometimes called more than once on the same buffer,
- * such as during a llvmAsmrestart() or at EOF.
- */
-    static void llvmAsm_init_buffer  (YY_BUFFER_STATE  b, FILE * file )
 
-{
-	int oerrno = errno;
-    
-	llvmAsm_flush_buffer(b );
+#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 )
+#else
+void yy_init_buffer( b, file )
+YY_BUFFER_STATE b;
+FILE *file;
+#endif
+
+
+	{
+	yy_flush_buffer( b );
 
 	b->yy_input_file = file;
 	b->yy_fill_buffer = 1;
 
-    /* If b is the current buffer, then llvmAsm_init_buffer was _probably_
-     * called from llvmAsmrestart() or through yy_get_next_buffer.
-     * In that case, we don't want to reset the lineno or column.
-     */
-    if (b != YY_CURRENT_BUFFER){
-        b->yy_bs_lineno = 1;
-        b->yy_bs_column = 0;
-    }
+#if YY_ALWAYS_INTERACTIVE
+	b->yy_is_interactive = 1;
+#else
+#if YY_NEVER_INTERACTIVE
+	b->yy_is_interactive = 0;
+#else
+	b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
+#endif
+#endif
+	}
 
-        b->yy_is_interactive = 0;
-    
-	errno = oerrno;
-}
 
-/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
- * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
- * 
- */
-    void llvmAsm_flush_buffer (YY_BUFFER_STATE  b )
-{
-    	if ( ! b )
+#ifdef YY_USE_PROTOS
+void yy_flush_buffer( YY_BUFFER_STATE b )
+#else
+void yy_flush_buffer( b )
+YY_BUFFER_STATE b;
+#endif
+
+	{
+	if ( ! b )
 		return;
 
 	b->yy_n_chars = 0;
@@ -2499,123 +2458,31 @@
 	b->yy_at_bol = 1;
 	b->yy_buffer_status = YY_BUFFER_NEW;
 
-	if ( b == YY_CURRENT_BUFFER )
-		llvmAsm_load_buffer_state( );
-}
-
-/** Pushes the new state onto the stack. The new state becomes
- *  the current state. This function will allocate the stack
- *  if necessary.
- *  @param new_buffer The new state.
- *  
- */
-void llvmAsmpush_buffer_state (YY_BUFFER_STATE new_buffer )
-{
-    	if (new_buffer == NULL)
-		return;
-
-	llvmAsmensure_buffer_stack();
-
-	/* This block is copied from llvmAsm_switch_to_buffer. */
-	if ( YY_CURRENT_BUFFER )
-		{
-		/* Flush out information for old buffer. */
-		*(yy_c_buf_p) = (yy_hold_char);
-		YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
-		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
-		}
-
-	/* Only push if top exists. Otherwise, replace top. */
-	if (YY_CURRENT_BUFFER)
-		(yy_buffer_stack_top)++;
-	YY_CURRENT_BUFFER_LVALUE = new_buffer;
-
-	/* copied from llvmAsm_switch_to_buffer. */
-	llvmAsm_load_buffer_state( );
-	(yy_did_buffer_switch_on_eof) = 1;
-}
-
-/** Removes and deletes the top of the stack, if present.
- *  The next element becomes the new top.
- *  
- */
-void llvmAsmpop_buffer_state (void)
-{
-    	if (!YY_CURRENT_BUFFER)
-		return;
-
-	llvmAsm_delete_buffer(YY_CURRENT_BUFFER );
-	YY_CURRENT_BUFFER_LVALUE = NULL;
-	if ((yy_buffer_stack_top) > 0)
-		--(yy_buffer_stack_top);
-
-	if (YY_CURRENT_BUFFER) {
-		llvmAsm_load_buffer_state( );
-		(yy_did_buffer_switch_on_eof) = 1;
-	}
-}
-
-/* Allocates the stack if it does not exist.
- *  Guarantees space for at least one push.
- */
-static void llvmAsmensure_buffer_stack (void)
-{
-	int num_to_alloc;
-    
-	if (!(yy_buffer_stack)) {
-
-		/* First allocation is just for 2 elements, since we don't know if this
-		 * scanner will even need a stack. We use 2 instead of 1 to avoid an
-		 * immediate realloc on the next call.
-         */
-		num_to_alloc = 1;
-		(yy_buffer_stack) = (struct yy_buffer_state**)llvmAsmalloc
-								(num_to_alloc * sizeof(struct yy_buffer_state*)
-								);
-		
-		memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
-				
-		(yy_buffer_stack_max) = num_to_alloc;
-		(yy_buffer_stack_top) = 0;
-		return;
+	if ( b == yy_current_buffer )
+		yy_load_buffer_state();
 	}
 
-	if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
-
-		/* Increase the buffer to prepare for a possible push. */
-		int grow_size = 8 /* arbitrary grow size */;
-
-		num_to_alloc = (yy_buffer_stack_max) + grow_size;
-		(yy_buffer_stack) = (struct yy_buffer_state**)llvmAsmrealloc
-								((yy_buffer_stack),
-								num_to_alloc * sizeof(struct yy_buffer_state*)
-								);
-
-		/* zero only the new slots.*/
-		memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
-		(yy_buffer_stack_max) = num_to_alloc;
-	}
-}
 
-/** Setup the input buffer state to scan directly from a user-specified character buffer.
- * @param base the character buffer
- * @param size the size in bytes of the character buffer
- * 
- * @return the newly allocated buffer state object. 
- */
-YY_BUFFER_STATE llvmAsm_scan_buffer  (char * base, yy_size_t  size )
-{
+#ifndef YY_NO_SCAN_BUFFER
+#ifdef YY_USE_PROTOS
+YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
+#else
+YY_BUFFER_STATE yy_scan_buffer( base, size )
+char *base;
+yy_size_t size;
+#endif
+	{
 	YY_BUFFER_STATE b;
-    
+
 	if ( size < 2 ||
 	     base[size-2] != YY_END_OF_BUFFER_CHAR ||
 	     base[size-1] != YY_END_OF_BUFFER_CHAR )
 		/* They forgot to leave room for the EOB's. */
 		return 0;
 
-	b = (YY_BUFFER_STATE) llvmAsmalloc(sizeof( struct yy_buffer_state )  );
+	b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
 	if ( ! b )
-		YY_FATAL_ERROR( "out of dynamic memory in llvmAsm_scan_buffer()" );
+		YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
 
 	b->yy_buf_size = size - 2;	/* "- 2" to take care of EOB's */
 	b->yy_buf_pos = b->yy_ch_buf = base;
@@ -2627,53 +2494,58 @@
 	b->yy_fill_buffer = 0;
 	b->yy_buffer_status = YY_BUFFER_NEW;
 
-	llvmAsm_switch_to_buffer(b  );
+	yy_switch_to_buffer( b );
 
 	return b;
-}
+	}
+#endif
 
-/** Setup the input buffer state to scan a string. The next call to llvmAsmlex() will
- * scan from a @e copy of @a str.
- * @param str a NUL-terminated string to scan
- * 
- * @return the newly allocated buffer state object.
- * @note If you want to scan bytes that may contain NUL values, then use
- *       llvmAsm_scan_bytes() instead.
- */
-YY_BUFFER_STATE llvmAsm_scan_string (yyconst char * yystr )
-{
-    
-	return llvmAsm_scan_bytes(yystr,strlen(yystr) );
-}
 
-/** Setup the input buffer state to scan the given bytes. The next call to llvmAsmlex() will
- * scan from a @e copy of @a bytes.
- * @param bytes the byte buffer to scan
- * @param len the number of bytes in the buffer pointed to by @a bytes.
- * 
- * @return the newly allocated buffer state object.
- */
-YY_BUFFER_STATE llvmAsm_scan_bytes  (yyconst char * yybytes, int  _yybytes_len )
-{
+#ifndef YY_NO_SCAN_STRING
+#ifdef YY_USE_PROTOS
+YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
+#else
+YY_BUFFER_STATE yy_scan_string( yy_str )
+yyconst char *yy_str;
+#endif
+	{
+	int len;
+	for ( len = 0; yy_str[len]; ++len )
+		;
+
+	return yy_scan_bytes( yy_str, len );
+	}
+#endif
+
+
+#ifndef YY_NO_SCAN_BYTES
+#ifdef YY_USE_PROTOS
+YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
+#else
+YY_BUFFER_STATE yy_scan_bytes( bytes, len )
+yyconst char *bytes;
+int len;
+#endif
+	{
 	YY_BUFFER_STATE b;
 	char *buf;
 	yy_size_t n;
 	int i;
-    
+
 	/* Get memory for full buffer, including space for trailing EOB's. */
-	n = _yybytes_len + 2;
-	buf = (char *) llvmAsmalloc(n  );
+	n = len + 2;
+	buf = (char *) yy_flex_alloc( n );
 	if ( ! buf )
-		YY_FATAL_ERROR( "out of dynamic memory in llvmAsm_scan_bytes()" );
+		YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
 
-	for ( i = 0; i < _yybytes_len; ++i )
-		buf[i] = yybytes[i];
+	for ( i = 0; i < len; ++i )
+		buf[i] = bytes[i];
 
-	buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
+	buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
 
-	b = llvmAsm_scan_buffer(buf,n );
+	b = yy_scan_buffer( buf, n );
 	if ( ! b )
-		YY_FATAL_ERROR( "bad buffer in llvmAsm_scan_bytes()" );
+		YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
 
 	/* It's okay to grow etc. this buffer, and we should throw it
 	 * away when we're done.
@@ -2681,199 +2553,148 @@
 	b->yy_is_our_buffer = 1;
 
 	return b;
-}
+	}
+#endif
 
-#ifndef YY_EXIT_FAILURE
-#define YY_EXIT_FAILURE 2
+
+#ifndef YY_NO_PUSH_STATE
+#ifdef YY_USE_PROTOS
+static void yy_push_state( int new_state )
+#else
+static void yy_push_state( new_state )
+int new_state;
 #endif
+	{
+	if ( yy_start_stack_ptr >= yy_start_stack_depth )
+		{
+		yy_size_t new_size;
 
-static void yy_fatal_error (yyconst char* msg )
-{
-    	(void) fprintf( stderr, "%s\n", msg );
-	exit( YY_EXIT_FAILURE );
-}
+		yy_start_stack_depth += YY_START_STACK_INCR;
+		new_size = yy_start_stack_depth * sizeof( int );
 
-/* Redefine yyless() so it works in section 3 code. */
+		if ( ! yy_start_stack )
+			yy_start_stack = (int *) yy_flex_alloc( new_size );
 
-#undef yyless
-#define yyless(n) \
-	do \
-		{ \
-		/* Undo effects of setting up llvmAsmtext. */ \
-        int yyless_macro_arg = (n); \
-        YY_LESS_LINENO(yyless_macro_arg);\
-		llvmAsmtext[llvmAsmleng] = (yy_hold_char); \
-		(yy_c_buf_p) = llvmAsmtext + yyless_macro_arg; \
-		(yy_hold_char) = *(yy_c_buf_p); \
-		*(yy_c_buf_p) = '\0'; \
-		llvmAsmleng = yyless_macro_arg; \
-		} \
-	while ( 0 )
+		else
+			yy_start_stack = (int *) yy_flex_realloc(
+					(void *) yy_start_stack, new_size );
 
-/* Accessor  methods (get/set functions) to struct members. */
+		if ( ! yy_start_stack )
+			YY_FATAL_ERROR(
+			"out of memory expanding start-condition stack" );
+		}
 
-/** Get the current line number.
- * 
- */
-int llvmAsmget_lineno  (void)
-{
-        
-    return llvmAsmlineno;
-}
+	yy_start_stack[yy_start_stack_ptr++] = YY_START;
 
-/** Get the input stream.
- * 
- */
-FILE *llvmAsmget_in  (void)
-{
-        return llvmAsmin;
-}
+	BEGIN(new_state);
+	}
+#endif
 
-/** Get the output stream.
- * 
- */
-FILE *llvmAsmget_out  (void)
-{
-        return llvmAsmout;
-}
 
-/** Get the length of the current token.
- * 
- */
-int llvmAsmget_leng  (void)
-{
-        return llvmAsmleng;
-}
+#ifndef YY_NO_POP_STATE
+static void yy_pop_state()
+	{
+	if ( --yy_start_stack_ptr < 0 )
+		YY_FATAL_ERROR( "start-condition stack underflow" );
 
-/** Get the current token.
- * 
- */
+	BEGIN(yy_start_stack[yy_start_stack_ptr]);
+	}
+#endif
 
-char *llvmAsmget_text  (void)
-{
-        return llvmAsmtext;
-}
 
-/** Set the current line number.
- * @param line_number
- * 
- */
-void llvmAsmset_lineno (int  line_number )
-{
-    
-    llvmAsmlineno = line_number;
-}
+#ifndef YY_NO_TOP_STATE
+static int yy_top_state()
+	{
+	return yy_start_stack[yy_start_stack_ptr - 1];
+	}
+#endif
 
-/** Set the input stream. This does not discard the current
- * input buffer.
- * @param in_str A readable stream.
- * 
- * @see llvmAsm_switch_to_buffer
- */
-void llvmAsmset_in (FILE *  in_str )
-{
-        llvmAsmin = in_str ;
-}
+#ifndef YY_EXIT_FAILURE
+#define YY_EXIT_FAILURE 2
+#endif
 
-void llvmAsmset_out (FILE *  out_str )
-{
-        llvmAsmout = out_str ;
-}
+#ifdef YY_USE_PROTOS
+static void yy_fatal_error( yyconst char msg[] )
+#else
+static void yy_fatal_error( msg )
+char msg[];
+#endif
+	{
+	(void) fprintf( stderr, "%s\n", msg );
+	exit( YY_EXIT_FAILURE );
+	}
 
-int llvmAsmget_debug  (void)
-{
-        return llvmAsm_flex_debug;
-}
 
-void llvmAsmset_debug (int  bdebug )
-{
-        llvmAsm_flex_debug = bdebug ;
-}
 
-static int yy_init_globals (void)
-{
-        /* Initialization is the same as for the non-reentrant scanner.
-     * This function is called from llvmAsmlex_destroy(), so don't allocate here.
-     */
-
-    /* We do not touch llvmAsmlineno unless the option is enabled. */
-    llvmAsmlineno =  1;
-    
-    (yy_buffer_stack) = 0;
-    (yy_buffer_stack_top) = 0;
-    (yy_buffer_stack_max) = 0;
-    (yy_c_buf_p) = (char *) 0;
-    (yy_init) = 0;
-    (yy_start) = 0;
-
-/* Defined in main.c */
-#ifdef YY_STDINIT
-    llvmAsmin = stdin;
-    llvmAsmout = stdout;
-#else
-    llvmAsmin = (FILE *) 0;
-    llvmAsmout = (FILE *) 0;
-#endif
-
-    /* For future reference: Set errno on error, since we are called by
-     * llvmAsmlex_init()
-     */
-    return 0;
-}
+/* Redefine yyless() so it works in section 3 code. */
 
-/* llvmAsmlex_destroy is for both reentrant and non-reentrant scanners. */
-int llvmAsmlex_destroy  (void)
-{
-    
-    /* Pop the buffer stack, destroying each element. */
-	while(YY_CURRENT_BUFFER){
-		llvmAsm_delete_buffer(YY_CURRENT_BUFFER  );
-		YY_CURRENT_BUFFER_LVALUE = NULL;
-		llvmAsmpop_buffer_state();
-	}
-
-	/* Destroy the stack itself. */
-	llvmAsmfree((yy_buffer_stack) );
-	(yy_buffer_stack) = NULL;
-
-    /* Reset the globals. This is important in a non-reentrant scanner so the next time
-     * llvmAsmlex() is called, initialization will occur. */
-    yy_init_globals( );
+#undef yyless
+#define yyless(n) \
+	do \
+		{ \
+		/* Undo effects of setting up yytext. */ \
+		yytext[yyleng] = yy_hold_char; \
+		yy_c_buf_p = yytext + n; \
+		yy_hold_char = *yy_c_buf_p; \
+		*yy_c_buf_p = '\0'; \
+		yyleng = n; \
+		} \
+	while ( 0 )
 
-    return 0;
-}
 
-/*
- * Internal utility routines.
- */
+/* Internal utility routines. */
 
 #ifndef yytext_ptr
-static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
-{
+#ifdef YY_USE_PROTOS
+static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
+#else
+static void yy_flex_strncpy( s1, s2, n )
+char *s1;
+yyconst char *s2;
+int n;
+#endif
+	{
 	register int i;
 	for ( i = 0; i < n; ++i )
 		s1[i] = s2[i];
-}
+	}
 #endif
 
 #ifdef YY_NEED_STRLEN
-static int yy_flex_strlen (yyconst char * s )
-{
+#ifdef YY_USE_PROTOS
+static int yy_flex_strlen( yyconst char *s )
+#else
+static int yy_flex_strlen( s )
+yyconst char *s;
+#endif
+	{
 	register int n;
 	for ( n = 0; s[n]; ++n )
 		;
 
 	return n;
-}
+	}
 #endif
 
-void *llvmAsmalloc (yy_size_t  size )
-{
+
+#ifdef YY_USE_PROTOS
+static void *yy_flex_alloc( yy_size_t size )
+#else
+static void *yy_flex_alloc( size )
+yy_size_t size;
+#endif
+	{
 	return (void *) malloc( size );
-}
+	}
 
-void *llvmAsmrealloc  (void * ptr, yy_size_t  size )
-{
+#ifdef YY_USE_PROTOS
+static inline void *yy_flex_realloc( void *ptr, yy_size_t size )
+#else
+static inline void *yy_flex_realloc( ptr, size )
+void *ptr;
+yy_size_t size;
+#endif
+	{
 	/* The cast to (char *) in the following accommodates both
 	 * implementations that use char* generic pointers, and those
 	 * that use void* generic pointers.  It works with the latter
@@ -2882,16 +2703,24 @@
 	 * as though doing an assignment.
 	 */
 	return (void *) realloc( (char *) ptr, size );
-}
-
-void llvmAsmfree (void * ptr )
-{
-	free( (char *) ptr );	/* see llvmAsmrealloc() for (char *) cast */
-}
-
-#define YYTABLES_NAME "yytables"
-
-#line 362 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
+	}
 
+#ifdef YY_USE_PROTOS
+static void yy_flex_free( void *ptr )
+#else
+static void yy_flex_free( ptr )
+void *ptr;
+#endif
+	{
+	free( ptr );
+	}
 
+#if YY_MAIN
+int main()
+	{
+	yylex();
+	return 0;
+	}
+#endif
+#line 363 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
 


Index: llvm/lib/AsmParser/Lexer.l.cvs
diff -u llvm/lib/AsmParser/Lexer.l.cvs:1.7 llvm/lib/AsmParser/Lexer.l.cvs:1.8
--- llvm/lib/AsmParser/Lexer.l.cvs:1.7	Sun Sep 17 15:25:45 2006
+++ llvm/lib/AsmParser/Lexer.l.cvs	Tue Oct 17 21:21:48 2006
@@ -210,6 +210,7 @@
 deplibs         { return DEPLIBS; }
 endian          { return ENDIAN; }
 pointersize     { return POINTERSIZE; }
+data          { return DATA; }
 little          { return LITTLE; }
 big             { return BIG; }
 volatile        { return VOLATILE; }


Index: llvm/lib/AsmParser/llvmAsmParser.cpp.cvs
diff -u llvm/lib/AsmParser/llvmAsmParser.cpp.cvs:1.17 llvm/lib/AsmParser/llvmAsmParser.cpp.cvs:1.18
--- llvm/lib/AsmParser/llvmAsmParser.cpp.cvs:1.17	Sun Oct 15 18:27:25 2006
+++ llvm/lib/AsmParser/llvmAsmParser.cpp.cvs	Tue Oct 17 21:21:48 2006
@@ -1,5 +1,5 @@
 
-/*  A Bison parser, made from /Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y
+/*  A Bison parser, made from /Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y
     by GNU Bison version 1.28  */
 
 #define YYBISON 1  /* Identify Bison output.  */
@@ -79,45 +79,46 @@
 #define	COLDCC_TOK	322
 #define	X86_STDCALLCC_TOK	323
 #define	X86_FASTCALLCC_TOK	324
-#define	RET	325
-#define	BR	326
-#define	SWITCH	327
-#define	INVOKE	328
-#define	UNWIND	329
-#define	UNREACHABLE	330
-#define	ADD	331
-#define	SUB	332
-#define	MUL	333
-#define	DIV	334
-#define	REM	335
-#define	AND	336
-#define	OR	337
-#define	XOR	338
-#define	SETLE	339
-#define	SETGE	340
-#define	SETLT	341
-#define	SETGT	342
-#define	SETEQ	343
-#define	SETNE	344
-#define	MALLOC	345
-#define	ALLOCA	346
-#define	FREE	347
-#define	LOAD	348
-#define	STORE	349
-#define	GETELEMENTPTR	350
-#define	PHI_TOK	351
-#define	CAST	352
-#define	SELECT	353
-#define	SHL	354
-#define	SHR	355
-#define	VAARG	356
-#define	EXTRACTELEMENT	357
-#define	INSERTELEMENT	358
-#define	SHUFFLEVECTOR	359
-#define	VAARG_old	360
-#define	VANEXT_old	361
+#define	DATA	325
+#define	RET	326
+#define	BR	327
+#define	SWITCH	328
+#define	INVOKE	329
+#define	UNWIND	330
+#define	UNREACHABLE	331
+#define	ADD	332
+#define	SUB	333
+#define	MUL	334
+#define	DIV	335
+#define	REM	336
+#define	AND	337
+#define	OR	338
+#define	XOR	339
+#define	SETLE	340
+#define	SETGE	341
+#define	SETLT	342
+#define	SETGT	343
+#define	SETEQ	344
+#define	SETNE	345
+#define	MALLOC	346
+#define	ALLOCA	347
+#define	FREE	348
+#define	LOAD	349
+#define	STORE	350
+#define	GETELEMENTPTR	351
+#define	PHI_TOK	352
+#define	CAST	353
+#define	SELECT	354
+#define	SHL	355
+#define	SHR	356
+#define	VAARG	357
+#define	EXTRACTELEMENT	358
+#define	INSERTELEMENT	359
+#define	SHUFFLEVECTOR	360
+#define	VAARG_old	361
+#define	VANEXT_old	362
 
-#line 14 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 14 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 
 #include "ParserInternals.h"
 #include "llvm/CallingConv.h"
@@ -1077,7 +1078,7 @@
 }
 
 
-#line 974 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 974 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 typedef union {
   llvm::Module                           *ModuleVal;
   llvm::Function                         *FunctionVal;
@@ -1127,26 +1128,26 @@
 
 
 
-#define	YYFINAL		514
+#define	YYFINAL		517
 #define	YYFLAG		-32768
-#define	YYNTBASE	122
+#define	YYNTBASE	123
 
-#define YYTRANSLATE(x) ((unsigned)(x) <= 361 ? yytranslate[x] : 196)
+#define YYTRANSLATE(x) ((unsigned)(x) <= 362 ? yytranslate[x] : 197)
 
 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,   111,
-   112,   120,     2,   109,     2,     2,     2,     2,     2,     2,
-     2,     2,     2,     2,     2,     2,     2,     2,     2,   116,
-   108,   117,     2,     2,     2,     2,     2,     2,     2,     2,
+     2,     2,     2,     2,     2,     2,     2,     2,     2,   112,
+   113,   121,     2,   110,     2,     2,     2,     2,     2,     2,
+     2,     2,     2,     2,     2,     2,     2,     2,     2,   117,
+   109,   118,     2,     2,     2,     2,     2,     2,     2,     2,
      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-   113,   110,   115,     2,     2,     2,     2,     2,   121,     2,
+   114,   111,   116,     2,     2,     2,     2,     2,   122,     2,
      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-     2,     2,     2,     2,     2,     2,     2,     2,     2,   114,
-     2,     2,   118,     2,   119,     2,     2,     2,     2,     2,
+     2,     2,     2,     2,     2,     2,     2,     2,     2,   115,
+     2,     2,   119,     2,   120,     2,     2,     2,     2,     2,
      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
@@ -1170,7 +1171,7 @@
     77,    78,    79,    80,    81,    82,    83,    84,    85,    86,
     87,    88,    89,    90,    91,    92,    93,    94,    95,    96,
     97,    98,    99,   100,   101,   102,   103,   104,   105,   106,
-   107
+   107,   108
 };
 
 #if YYDEBUG != 0
@@ -1190,132 +1191,134 @@
    334,   343,   347,   349,   351,   353,   355,   358,   361,   366,
    369,   371,   376,   379,   384,   385,   393,   394,   402,   403,
    411,   412,   420,   424,   429,   430,   432,   434,   436,   440,
-   444,   448,   452,   456,   458,   459,   461,   463,   465,   466,
-   469,   473,   475,   477,   481,   483,   484,   493,   495,   497,
-   501,   503,   505,   508,   509,   511,   513,   514,   519,   520,
-   522,   524,   526,   528,   530,   532,   534,   536,   538,   542,
-   544,   550,   552,   554,   556,   558,   561,   564,   567,   571,
-   574,   575,   577,   580,   583,   587,   597,   607,   616,   630,
-   632,   634,   641,   647,   650,   657,   665,   667,   671,   673,
-   674,   677,   679,   685,   691,   697,   700,   705,   710,   717,
-   722,   727,   732,   737,   744,   751,   754,   762,   764,   767,
-   768,   770,   771,   775,   782,   786,   793,   796,   801,   808
+   444,   448,   452,   456,   460,   462,   463,   465,   467,   469,
+   470,   473,   477,   479,   481,   485,   487,   488,   497,   499,
+   501,   505,   507,   509,   512,   513,   515,   517,   518,   523,
+   524,   526,   528,   530,   532,   534,   536,   538,   540,   542,
+   546,   548,   554,   556,   558,   560,   562,   565,   568,   571,
+   575,   578,   579,   581,   584,   587,   591,   601,   611,   620,
+   634,   636,   638,   645,   651,   654,   661,   669,   671,   675,
+   677,   678,   681,   683,   689,   695,   701,   704,   709,   714,
+   721,   726,   731,   736,   741,   748,   755,   758,   766,   768,
+   771,   772,   774,   775,   779,   786,   790,   797,   800,   805,
+   812
 };
 
 static const short yyrhs[] = {     5,
-     0,     6,     0,     3,     0,     4,     0,    77,     0,    78,
-     0,    79,     0,    80,     0,    81,     0,    82,     0,    83,
-     0,    84,     0,    85,     0,    86,     0,    87,     0,    88,
-     0,    89,     0,    90,     0,   100,     0,   101,     0,    16,
+     0,     6,     0,     3,     0,     4,     0,    78,     0,    79,
+     0,    80,     0,    81,     0,    82,     0,    83,     0,    84,
+     0,    85,     0,    86,     0,    87,     0,    88,     0,    89,
+     0,    90,     0,    91,     0,   101,     0,   102,     0,    16,
      0,    14,     0,    12,     0,    10,     0,    17,     0,    15,
-     0,    13,     0,    11,     0,   128,     0,   129,     0,    18,
-     0,    19,     0,   164,   108,     0,     0,    41,     0,    42,
+     0,    13,     0,    11,     0,   129,     0,   130,     0,    18,
+     0,    19,     0,   165,   109,     0,     0,    41,     0,    42,
      0,    43,     0,    44,     0,    45,     0,    46,     0,    47,
      0,     0,     0,    65,     0,    66,     0,    67,     0,    68,
      0,    69,     0,    70,     0,    64,     4,     0,     0,    57,
-     4,     0,     0,   109,    57,     4,     0,    34,    24,     0,
-     0,   137,     0,     0,   109,   140,   139,     0,   137,     0,
-    57,     4,     0,   143,     0,     8,     0,   145,     0,     8,
-     0,   145,     0,     9,     0,    10,     0,    11,     0,    12,
+     4,     0,     0,   110,    57,     4,     0,    34,    24,     0,
+     0,   138,     0,     0,   110,   141,   140,     0,   138,     0,
+    57,     4,     0,   144,     0,     8,     0,   146,     0,     8,
+     0,   146,     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,    48,
-     0,   144,     0,   179,     0,   110,     4,     0,   142,   111,
-   147,   112,     0,   113,     4,   114,   145,   115,     0,   116,
-     4,   114,   145,   117,     0,   118,   146,   119,     0,   118,
-   119,     0,   145,   120,     0,   145,     0,   146,   109,   145,
-     0,   146,     0,   146,   109,    37,     0,    37,     0,     0,
-   143,   113,   150,   115,     0,   143,   113,   115,     0,   143,
-   121,    24,     0,   143,   116,   150,   117,     0,   143,   118,
-   150,   119,     0,   143,   118,   119,     0,   143,    38,     0,
-   143,    39,     0,   143,   179,     0,   143,   149,     0,   143,
-    26,     0,   128,   123,     0,   129,     4,     0,     9,    27,
-     0,     9,    28,     0,   131,     7,     0,    98,   111,   148,
-    36,   143,   112,     0,    96,   111,   148,   193,   112,     0,
-    99,   111,   148,   109,   148,   109,   148,   112,     0,   124,
-   111,   148,   109,   148,   112,     0,   125,   111,   148,   109,
-   148,   112,     0,   126,   111,   148,   109,   148,   112,     0,
-   127,   111,   148,   109,   148,   112,     0,   103,   111,   148,
-   109,   148,   112,     0,   104,   111,   148,   109,   148,   109,
-   148,   112,     0,   105,   111,   148,   109,   148,   109,   148,
-   112,     0,   150,   109,   148,     0,   148,     0,    32,     0,
-    33,     0,   153,     0,   153,   173,     0,   153,   175,     0,
-   153,    62,    61,   159,     0,   153,    25,     0,   154,     0,
-   154,   132,    20,   141,     0,   154,   175,     0,   154,    62,
-    61,   159,     0,     0,   154,   132,   133,   151,   148,   155,
-   139,     0,     0,   154,   132,    50,   151,   143,   156,   139,
-     0,     0,   154,   132,    45,   151,   143,   157,   139,     0,
-     0,   154,   132,    47,   151,   143,   158,   139,     0,   154,
-    51,   161,     0,   154,    58,   108,   162,     0,     0,    24,
-     0,    56,     0,    55,     0,    53,   108,   160,     0,    54,
-   108,     4,     0,    52,   108,    24,     0,   113,   163,   115,
-     0,   163,   109,    24,     0,    24,     0,     0,    22,     0,
-    24,     0,   164,     0,     0,   143,   165,     0,   167,   109,
-   166,     0,   166,     0,   167,     0,   167,   109,    37,     0,
-    37,     0,     0,   134,   141,   164,   111,   168,   112,   138,
-   135,     0,    29,     0,   118,     0,   133,   169,   170,     0,
-    30,     0,   119,     0,   182,   172,     0,     0,    45,     0,
-    47,     0,     0,    31,   176,   174,   169,     0,     0,    63,
-     0,     3,     0,     4,     0,     7,     0,    27,     0,    28,
-     0,    38,     0,    39,     0,    26,     0,   116,   150,   117,
-     0,   149,     0,    61,   177,    24,   109,    24,     0,   122,
-     0,   164,     0,   179,     0,   178,     0,   143,   180,     0,
-   182,   183,     0,   171,   183,     0,   184,   132,   185,     0,
-   184,   187,     0,     0,    23,     0,    71,   181,     0,    71,
-     8,     0,    72,    21,   180,     0,    72,     9,   180,   109,
-    21,   180,   109,    21,   180,     0,    73,   130,   180,   109,
-    21,   180,   113,   186,   115,     0,    73,   130,   180,   109,
-    21,   180,   113,   115,     0,    74,   134,   141,   180,   111,
-   190,   112,    36,    21,   180,    75,    21,   180,     0,    75,
-     0,    76,     0,   186,   130,   178,   109,    21,   180,     0,
-   130,   178,   109,    21,   180,     0,   132,   192,     0,   143,
-   113,   180,   109,   180,   115,     0,   188,   109,   113,   180,
-   109,   180,   115,     0,   181,     0,   189,   109,   181,     0,
-   189,     0,     0,    60,    59,     0,    59,     0,   124,   143,
-   180,   109,   180,     0,   125,   143,   180,   109,   180,     0,
-   126,   143,   180,   109,   180,     0,    49,   181,     0,   127,
-   181,   109,   181,     0,    98,   181,    36,   143,     0,    99,
-   181,   109,   181,   109,   181,     0,   102,   181,   109,   143,
-     0,   106,   181,   109,   143,     0,   107,   181,   109,   143,
-     0,   103,   181,   109,   181,     0,   104,   181,   109,   181,
-   109,   181,     0,   105,   181,   109,   181,   109,   181,     0,
-    97,   188,     0,   191,   134,   141,   180,   111,   190,   112,
-     0,   195,     0,   109,   189,     0,     0,    35,     0,     0,
-    91,   143,   136,     0,    91,   143,   109,    15,   180,   136,
-     0,    92,   143,   136,     0,    92,   143,   109,    15,   180,
-   136,     0,    93,   181,     0,   194,    94,   143,   180,     0,
-   194,    95,   181,   109,   143,   180,     0,    96,   143,   180,
-   193,     0
+     0,   145,     0,   180,     0,   111,     4,     0,   143,   112,
+   148,   113,     0,   114,     4,   115,   146,   116,     0,   117,
+     4,   115,   146,   118,     0,   119,   147,   120,     0,   119,
+   120,     0,   146,   121,     0,   146,     0,   147,   110,   146,
+     0,   147,     0,   147,   110,    37,     0,    37,     0,     0,
+   144,   114,   151,   116,     0,   144,   114,   116,     0,   144,
+   122,    24,     0,   144,   117,   151,   118,     0,   144,   119,
+   151,   120,     0,   144,   119,   120,     0,   144,    38,     0,
+   144,    39,     0,   144,   180,     0,   144,   150,     0,   144,
+    26,     0,   129,   124,     0,   130,     4,     0,     9,    27,
+     0,     9,    28,     0,   132,     7,     0,    99,   112,   149,
+    36,   144,   113,     0,    97,   112,   149,   194,   113,     0,
+   100,   112,   149,   110,   149,   110,   149,   113,     0,   125,
+   112,   149,   110,   149,   113,     0,   126,   112,   149,   110,
+   149,   113,     0,   127,   112,   149,   110,   149,   113,     0,
+   128,   112,   149,   110,   149,   113,     0,   104,   112,   149,
+   110,   149,   113,     0,   105,   112,   149,   110,   149,   110,
+   149,   113,     0,   106,   112,   149,   110,   149,   110,   149,
+   113,     0,   151,   110,   149,     0,   149,     0,    32,     0,
+    33,     0,   154,     0,   154,   174,     0,   154,   176,     0,
+   154,    62,    61,   160,     0,   154,    25,     0,   155,     0,
+   155,   133,    20,   142,     0,   155,   176,     0,   155,    62,
+    61,   160,     0,     0,   155,   133,   134,   152,   149,   156,
+   140,     0,     0,   155,   133,    50,   152,   144,   157,   140,
+     0,     0,   155,   133,    45,   152,   144,   158,   140,     0,
+     0,   155,   133,    47,   152,   144,   159,   140,     0,   155,
+    51,   162,     0,   155,    58,   109,   163,     0,     0,    24,
+     0,    56,     0,    55,     0,    53,   109,   161,     0,    54,
+   109,     4,     0,    52,   109,    24,     0,    71,   109,    24,
+     0,   114,   164,   116,     0,   164,   110,    24,     0,    24,
+     0,     0,    22,     0,    24,     0,   165,     0,     0,   144,
+   166,     0,   168,   110,   167,     0,   167,     0,   168,     0,
+   168,   110,    37,     0,    37,     0,     0,   135,   142,   165,
+   112,   169,   113,   139,   136,     0,    29,     0,   119,     0,
+   134,   170,   171,     0,    30,     0,   120,     0,   183,   173,
+     0,     0,    45,     0,    47,     0,     0,    31,   177,   175,
+   170,     0,     0,    63,     0,     3,     0,     4,     0,     7,
+     0,    27,     0,    28,     0,    38,     0,    39,     0,    26,
+     0,   117,   151,   118,     0,   150,     0,    61,   178,    24,
+   110,    24,     0,   123,     0,   165,     0,   180,     0,   179,
+     0,   144,   181,     0,   183,   184,     0,   172,   184,     0,
+   185,   133,   186,     0,   185,   188,     0,     0,    23,     0,
+    72,   182,     0,    72,     8,     0,    73,    21,   181,     0,
+    73,     9,   181,   110,    21,   181,   110,    21,   181,     0,
+    74,   131,   181,   110,    21,   181,   114,   187,   116,     0,
+    74,   131,   181,   110,    21,   181,   114,   116,     0,    75,
+   135,   142,   181,   112,   191,   113,    36,    21,   181,    76,
+    21,   181,     0,    76,     0,    77,     0,   187,   131,   179,
+   110,    21,   181,     0,   131,   179,   110,    21,   181,     0,
+   133,   193,     0,   144,   114,   181,   110,   181,   116,     0,
+   189,   110,   114,   181,   110,   181,   116,     0,   182,     0,
+   190,   110,   182,     0,   190,     0,     0,    60,    59,     0,
+    59,     0,   125,   144,   181,   110,   181,     0,   126,   144,
+   181,   110,   181,     0,   127,   144,   181,   110,   181,     0,
+    49,   182,     0,   128,   182,   110,   182,     0,    99,   182,
+    36,   144,     0,   100,   182,   110,   182,   110,   182,     0,
+   103,   182,   110,   144,     0,   107,   182,   110,   144,     0,
+   108,   182,   110,   144,     0,   104,   182,   110,   182,     0,
+   105,   182,   110,   182,   110,   182,     0,   106,   182,   110,
+   182,   110,   182,     0,    98,   189,     0,   192,   135,   142,
+   181,   112,   191,   113,     0,   196,     0,   110,   190,     0,
+     0,    35,     0,     0,    92,   144,   137,     0,    92,   144,
+   110,    15,   181,   137,     0,    93,   144,   137,     0,    93,
+   144,   110,    15,   181,   137,     0,    94,   182,     0,   195,
+    95,   144,   181,     0,   195,    96,   182,   110,   144,   181,
+     0,    97,   144,   181,   194,     0
 };
 
 #endif
 
 #if YYDEBUG != 0
 static const short yyrline[] = { 0,
-  1096,  1097,  1105,  1106,  1116,  1116,  1116,  1116,  1116,  1117,
-  1117,  1117,  1118,  1118,  1118,  1118,  1118,  1118,  1120,  1120,
-  1124,  1124,  1124,  1124,  1125,  1125,  1125,  1125,  1126,  1126,
-  1127,  1127,  1130,  1134,  1139,  1139,  1140,  1141,  1142,  1143,
-  1144,  1145,  1148,  1148,  1149,  1150,  1151,  1152,  1153,  1154,
-  1164,  1164,  1171,  1171,  1180,  1188,  1188,  1194,  1194,  1196,
-  1201,  1215,  1215,  1216,  1216,  1218,  1228,  1228,  1228,  1228,
-  1228,  1228,  1228,  1229,  1229,  1229,  1229,  1229,  1229,  1230,
-  1234,  1238,  1246,  1254,  1267,  1272,  1284,  1294,  1298,  1309,
-  1314,  1320,  1321,  1325,  1329,  1340,  1366,  1380,  1410,  1436,
-  1457,  1470,  1480,  1485,  1546,  1553,  1562,  1568,  1574,  1578,
-  1582,  1590,  1601,  1633,  1641,  1663,  1674,  1680,  1688,  1694,
-  1700,  1709,  1713,  1721,  1721,  1731,  1739,  1744,  1748,  1752,
-  1756,  1771,  1793,  1796,  1799,  1804,  1807,  1811,  1815,  1819,
-  1823,  1828,  1832,  1835,  1838,  1842,  1855,  1856,  1858,  1862,
-  1871,  1877,  1879,  1884,  1889,  1898,  1898,  1899,  1899,  1901,
-  1908,  1914,  1921,  1925,  1931,  1936,  1941,  2036,  2036,  2038,
-  2046,  2046,  2048,  2053,  2053,  2054,  2057,  2057,  2067,  2071,
-  2076,  2080,  2084,  2088,  2092,  2096,  2100,  2104,  2108,  2133,
-  2137,  2151,  2155,  2161,  2161,  2167,  2172,  2176,  2185,  2196,
-  2201,  2213,  2226,  2230,  2234,  2239,  2248,  2267,  2276,  2332,
-  2336,  2343,  2354,  2367,  2376,  2385,  2395,  2399,  2406,  2406,
-  2408,  2412,  2417,  2433,  2448,  2462,  2475,  2483,  2491,  2499,
-  2505,  2525,  2548,  2554,  2560,  2566,  2581,  2640,  2647,  2650,
-  2655,  2659,  2666,  2671,  2677,  2682,  2688,  2696,  2708,  2723
+  1097,  1098,  1106,  1107,  1117,  1117,  1117,  1117,  1117,  1118,
+  1118,  1118,  1119,  1119,  1119,  1119,  1119,  1119,  1121,  1121,
+  1125,  1125,  1125,  1125,  1126,  1126,  1126,  1126,  1127,  1127,
+  1128,  1128,  1131,  1135,  1140,  1140,  1141,  1142,  1143,  1144,
+  1145,  1146,  1149,  1149,  1150,  1151,  1152,  1153,  1154,  1155,
+  1165,  1165,  1172,  1172,  1181,  1189,  1189,  1195,  1195,  1197,
+  1202,  1216,  1216,  1217,  1217,  1219,  1229,  1229,  1229,  1229,
+  1229,  1229,  1229,  1230,  1230,  1230,  1230,  1230,  1230,  1231,
+  1235,  1239,  1247,  1255,  1268,  1273,  1285,  1295,  1299,  1310,
+  1315,  1321,  1322,  1326,  1330,  1341,  1367,  1381,  1411,  1437,
+  1458,  1471,  1481,  1486,  1547,  1554,  1563,  1569,  1575,  1579,
+  1583,  1591,  1602,  1634,  1642,  1664,  1675,  1681,  1689,  1695,
+  1701,  1710,  1714,  1722,  1722,  1732,  1740,  1745,  1749,  1753,
+  1757,  1772,  1794,  1797,  1800,  1805,  1808,  1812,  1816,  1820,
+  1824,  1829,  1833,  1836,  1839,  1843,  1856,  1857,  1859,  1863,
+  1872,  1877,  1883,  1885,  1890,  1895,  1904,  1904,  1905,  1905,
+  1907,  1914,  1920,  1927,  1931,  1937,  1942,  1947,  2042,  2042,
+  2044,  2052,  2052,  2054,  2059,  2059,  2060,  2063,  2063,  2073,
+  2077,  2082,  2086,  2090,  2094,  2098,  2102,  2106,  2110,  2114,
+  2139,  2143,  2157,  2161,  2167,  2167,  2173,  2178,  2182,  2191,
+  2202,  2207,  2219,  2232,  2236,  2240,  2245,  2254,  2273,  2282,
+  2338,  2342,  2349,  2360,  2373,  2382,  2391,  2401,  2405,  2412,
+  2412,  2414,  2418,  2423,  2439,  2454,  2468,  2481,  2489,  2497,
+  2505,  2511,  2531,  2554,  2560,  2566,  2572,  2587,  2646,  2653,
+  2656,  2661,  2665,  2672,  2677,  2683,  2688,  2694,  2702,  2714,
+  2729
 };
 #endif
 
@@ -1331,14 +1334,14 @@
 "DLLIMPORT","DLLEXPORT","EXTERN_WEAK","OPAQUE","NOT","EXTERNAL","TARGET","TRIPLE",
 "ENDIAN","POINTERSIZE","LITTLE","BIG","ALIGN","DEPLIBS","CALL","TAIL","ASM_TOK",
 "MODULE","SIDEEFFECT","CC_TOK","CCC_TOK","CSRETCC_TOK","FASTCC_TOK","COLDCC_TOK",
-"X86_STDCALLCC_TOK","X86_FASTCALLCC_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","EXTRACTELEMENT","INSERTELEMENT",
-"SHUFFLEVECTOR","VAARG_old","VANEXT_old","'='","','","'\\\\'","'('","')'","'['",
-"'x'","']'","'<'","'>'","'{'","'}'","'*'","'c'","INTVAL","EINT64VAL","ArithmeticOps",
-"LogicalOps","SetCondOps","ShiftOps","SIntType","UIntType","IntType","FPType",
-"OptAssign","OptLinkage","OptCallingConv","OptAlign","OptCAlign","SectionString",
+"X86_STDCALLCC_TOK","X86_FASTCALLCC_TOK","DATA","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","EXTRACTELEMENT",
+"INSERTELEMENT","SHUFFLEVECTOR","VAARG_old","VANEXT_old","'='","','","'\\\\'",
+"'('","')'","'['","'x'","']'","'<'","'>'","'{'","'}'","'*'","'c'","INTVAL","EINT64VAL",
+"ArithmeticOps","LogicalOps","SetCondOps","ShiftOps","SIntType","UIntType","IntType",
+"FPType","OptAssign","OptLinkage","OptCallingConv","OptAlign","OptCAlign","SectionString",
 "OptSection","GlobalVarAttributes","GlobalVarAttribute","TypesV","UpRTypesV",
 "Types","PrimType","UpRTypes","TypeListI","ArgTypeListI","ConstVal","ConstExpr",
 "ConstVector","GlobalType","Module","FunctionList","ConstPool","@1","@2","@3",
@@ -1352,31 +1355,32 @@
 #endif
 
 static const short yyr1[] = {     0,
-   122,   122,   123,   123,   124,   124,   124,   124,   124,   125,
-   125,   125,   126,   126,   126,   126,   126,   126,   127,   127,
-   128,   128,   128,   128,   129,   129,   129,   129,   130,   130,
-   131,   131,   132,   132,   133,   133,   133,   133,   133,   133,
-   133,   133,   134,   134,   134,   134,   134,   134,   134,   134,
-   135,   135,   136,   136,   137,   138,   138,   139,   139,   140,
-   140,   141,   141,   142,   142,   143,   144,   144,   144,   144,
-   144,   144,   144,   144,   144,   144,   144,   144,   144,   145,
+   123,   123,   124,   124,   125,   125,   125,   125,   125,   126,
+   126,   126,   127,   127,   127,   127,   127,   127,   128,   128,
+   129,   129,   129,   129,   130,   130,   130,   130,   131,   131,
+   132,   132,   133,   133,   134,   134,   134,   134,   134,   134,
+   134,   134,   135,   135,   135,   135,   135,   135,   135,   135,
+   136,   136,   137,   137,   138,   139,   139,   140,   140,   141,
+   141,   142,   142,   143,   143,   144,   145,   145,   145,   145,
    145,   145,   145,   145,   145,   145,   145,   145,   145,   146,
-   146,   147,   147,   147,   147,   148,   148,   148,   148,   148,
-   148,   148,   148,   148,   148,   148,   148,   148,   148,   148,
-   148,   149,   149,   149,   149,   149,   149,   149,   149,   149,
-   149,   150,   150,   151,   151,   152,   153,   153,   153,   153,
-   153,   154,   154,   154,   155,   154,   156,   154,   157,   154,
-   158,   154,   154,   154,   154,   159,   160,   160,   161,   161,
-   161,   162,   163,   163,   163,   164,   164,   165,   165,   166,
-   167,   167,   168,   168,   168,   168,   169,   170,   170,   171,
-   172,   172,   173,   174,   174,   174,   176,   175,   177,   177,
-   178,   178,   178,   178,   178,   178,   178,   178,   178,   178,
-   178,   179,   179,   180,   180,   181,   182,   182,   183,   184,
-   184,   184,   185,   185,   185,   185,   185,   185,   185,   185,
-   185,   186,   186,   187,   188,   188,   189,   189,   190,   190,
-   191,   191,   192,   192,   192,   192,   192,   192,   192,   192,
-   192,   192,   192,   192,   192,   192,   192,   192,   193,   193,
-   194,   194,   195,   195,   195,   195,   195,   195,   195,   195
+   146,   146,   146,   146,   146,   146,   146,   146,   146,   147,
+   147,   148,   148,   148,   148,   149,   149,   149,   149,   149,
+   149,   149,   149,   149,   149,   149,   149,   149,   149,   149,
+   149,   150,   150,   150,   150,   150,   150,   150,   150,   150,
+   150,   151,   151,   152,   152,   153,   154,   154,   154,   154,
+   154,   155,   155,   155,   156,   155,   157,   155,   158,   155,
+   159,   155,   155,   155,   155,   160,   161,   161,   162,   162,
+   162,   162,   163,   164,   164,   164,   165,   165,   166,   166,
+   167,   168,   168,   169,   169,   169,   169,   170,   171,   171,
+   172,   173,   173,   174,   175,   175,   175,   177,   176,   178,
+   178,   179,   179,   179,   179,   179,   179,   179,   179,   179,
+   179,   179,   180,   180,   181,   181,   182,   183,   183,   184,
+   185,   185,   185,   186,   186,   186,   186,   186,   186,   186,
+   186,   186,   187,   187,   188,   189,   189,   190,   190,   191,
+   191,   192,   192,   193,   193,   193,   193,   193,   193,   193,
+   193,   193,   193,   193,   193,   193,   193,   193,   193,   194,
+   194,   195,   195,   196,   196,   196,   196,   196,   196,   196,
+   196
 };
 
 static const short yyr2[] = {     0,
@@ -1395,424 +1399,427 @@
      8,     3,     1,     1,     1,     1,     2,     2,     4,     2,
      1,     4,     2,     4,     0,     7,     0,     7,     0,     7,
      0,     7,     3,     4,     0,     1,     1,     1,     3,     3,
-     3,     3,     3,     1,     0,     1,     1,     1,     0,     2,
-     3,     1,     1,     3,     1,     0,     8,     1,     1,     3,
-     1,     1,     2,     0,     1,     1,     0,     4,     0,     1,
-     1,     1,     1,     1,     1,     1,     1,     1,     3,     1,
-     5,     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,     4,     6,     6,     2,     7,     1,     2,     0,
-     1,     0,     3,     6,     3,     6,     2,     4,     6,     4
+     3,     3,     3,     3,     1,     0,     1,     1,     1,     0,
+     2,     3,     1,     1,     3,     1,     0,     8,     1,     1,
+     3,     1,     1,     2,     0,     1,     1,     0,     4,     0,
+     1,     1,     1,     1,     1,     1,     1,     1,     1,     3,
+     1,     5,     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,     4,     6,     6,     2,     7,     1,     2,
+     0,     1,     0,     3,     6,     3,     6,     2,     4,     6,
+     4
 };
 
 static const short yydefact[] = {   145,
-    42,   131,   130,   177,    35,    36,    37,    38,    39,    40,
-    41,     0,    43,   201,   127,   128,   201,   156,   157,     0,
-     0,     0,    42,     0,   133,   174,     0,     0,    44,    45,
-    46,    47,    48,    49,     0,     0,   202,   198,    34,   171,
-   172,   173,   197,     0,     0,     0,   143,     0,     0,     0,
-     0,     0,     0,     0,    33,   175,   176,    43,   146,   129,
-    50,     1,     2,    63,    67,    68,    69,    70,    71,    72,
-    73,    74,    75,    76,    77,    78,    79,    80,     0,     0,
-     0,     0,   192,     0,     0,    62,    81,    66,   193,    82,
-   168,   169,   170,   242,   200,     0,     0,     0,   155,   144,
-   134,   132,   124,   125,     0,     0,     0,     0,   178,    83,
-     0,     0,    65,    88,    90,     0,     0,    95,    89,   241,
-     0,   222,     0,     0,     0,     0,    43,   210,   211,     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,     0,
-     0,     0,   199,    43,   214,     0,   238,   151,   148,   147,
-   149,   150,   154,     0,   139,   141,   137,    67,    68,    69,
-    70,    71,    72,    73,    74,    75,    76,    77,     0,     0,
-     0,     0,   135,     0,     0,     0,    87,   166,    94,    92,
-     0,     0,   226,   221,   204,   203,     0,     0,    24,    28,
-    23,    27,    22,    26,    21,    25,    29,    30,     0,     0,
-    53,    53,   247,     0,     0,   236,     0,     0,     0,     0,
+    42,   131,   130,   178,    35,    36,    37,    38,    39,    40,
+    41,     0,    43,   202,   127,   128,   202,   157,   158,     0,
+     0,     0,    42,     0,   133,   175,     0,     0,    44,    45,
+    46,    47,    48,    49,     0,     0,   203,   199,    34,   172,
+   173,   174,   198,     0,     0,     0,     0,   143,     0,     0,
+     0,     0,     0,     0,     0,    33,   176,   177,    43,   146,
+   129,    50,     1,     2,    63,    67,    68,    69,    70,    71,
+    72,    73,    74,    75,    76,    77,    78,    79,    80,     0,
+     0,     0,     0,   193,     0,     0,    62,    81,    66,   194,
+    82,   169,   170,   171,   243,   201,     0,     0,     0,     0,
+   156,   144,   134,   132,   124,   125,     0,     0,     0,     0,
+   179,    83,     0,     0,    65,    88,    90,     0,     0,    95,
+    89,   242,     0,   223,     0,     0,     0,     0,    43,   211,
+   212,     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,     0,     0,     0,   200,    43,   215,     0,   239,   151,
+   148,   147,   149,   150,   152,   155,     0,   139,   141,   137,
+    67,    68,    69,    70,    71,    72,    73,    74,    75,    76,
+    77,     0,     0,     0,     0,   135,     0,     0,     0,    87,
+   167,    94,    92,     0,     0,   227,   222,   205,   204,     0,
+     0,    24,    28,    23,    27,    22,    26,    21,    25,    29,
+    30,     0,     0,    53,    53,   248,     0,     0,   237,     0,
      0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-     0,     0,   152,    58,    58,    58,   109,   110,     3,     4,
-   107,   108,   111,   106,   102,   103,     0,     0,     0,     0,
+     0,     0,     0,     0,     0,   153,    58,    58,    58,   109,
+   110,     3,     4,   107,   108,   111,   106,   102,   103,     0,
      0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-   105,   104,    58,    64,    64,    91,   165,   159,   162,   163,
-     0,     0,    84,   181,   182,   183,   188,   184,   185,   186,
-   187,   179,     0,   190,   195,   194,   196,     0,   205,     0,
-     0,     0,   243,     0,   245,   240,     0,     0,     0,     0,
+     0,     0,     0,   105,   104,    58,    64,    64,    91,   166,
+   160,   163,   164,     0,     0,    84,   182,   183,   184,   189,
+   185,   186,   187,   188,   180,     0,   191,   196,   195,   197,
+     0,   206,     0,     0,     0,   244,     0,   246,   241,     0,
      0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-     0,     0,     0,   153,     0,   140,   142,   138,     0,     0,
-     0,     0,     0,     0,    97,   123,     0,     0,   101,     0,
-    98,     0,     0,     0,     0,   136,    85,    86,   158,   160,
-     0,    56,    93,   180,     0,     0,     0,     0,     0,     0,
-     0,     0,     0,   250,     0,     0,   228,     0,   230,   233,
-     0,     0,   231,   232,     0,     0,     0,   227,     0,   248,
-     0,     0,     0,    60,    58,   240,     0,     0,     0,     0,
-     0,     0,    96,    99,   100,     0,     0,     0,     0,   164,
-   161,    57,    51,     0,   189,     0,     0,   220,    53,    54,
-    53,   217,   239,     0,     0,     0,     0,     0,   223,   224,
-   225,   220,     0,    55,    61,    59,     0,     0,     0,     0,
-     0,     0,   122,     0,     0,     0,     0,     0,   167,     0,
-     0,     0,   219,     0,     0,   244,   246,     0,     0,     0,
-   229,   234,   235,     0,   249,   113,     0,     0,     0,     0,
-     0,     0,     0,     0,     0,    52,   191,     0,     0,     0,
-   218,   215,     0,   237,   112,     0,   119,     0,     0,   115,
-   116,   117,   118,     0,   208,     0,     0,     0,   216,     0,
-     0,     0,   206,     0,   207,     0,     0,   114,   120,   121,
-     0,     0,     0,     0,     0,     0,   213,     0,     0,   212,
-   209,     0,     0,     0
+     0,     0,     0,     0,     0,     0,   154,     0,   140,   142,
+   138,     0,     0,     0,     0,     0,     0,    97,   123,     0,
+     0,   101,     0,    98,     0,     0,     0,     0,   136,    85,
+    86,   159,   161,     0,    56,    93,   181,     0,     0,     0,
+     0,     0,     0,     0,     0,     0,   251,     0,     0,   229,
+     0,   231,   234,     0,     0,   232,   233,     0,     0,     0,
+   228,     0,   249,     0,     0,     0,    60,    58,   241,     0,
+     0,     0,     0,     0,     0,    96,    99,   100,     0,     0,
+     0,     0,   165,   162,    57,    51,     0,   190,     0,     0,
+   221,    53,    54,    53,   218,   240,     0,     0,     0,     0,
+     0,   224,   225,   226,   221,     0,    55,    61,    59,     0,
+     0,     0,     0,     0,     0,   122,     0,     0,     0,     0,
+     0,   168,     0,     0,     0,   220,     0,     0,   245,   247,
+     0,     0,     0,   230,   235,   236,     0,   250,   113,     0,
+     0,     0,     0,     0,     0,     0,     0,     0,    52,   192,
+     0,     0,     0,   219,   216,     0,   238,   112,     0,   119,
+     0,     0,   115,   116,   117,   118,     0,   209,     0,     0,
+     0,   217,     0,     0,     0,   207,     0,   208,     0,     0,
+   114,   120,   121,     0,     0,     0,     0,     0,     0,   214,
+     0,     0,   213,   210,     0,     0,     0
 };
 
-static const short yydefgoto[] = {    83,
-   251,   267,   268,   269,   270,   189,   190,   219,   191,    23,
-    13,    35,   439,   303,   384,   403,   326,   385,    84,    85,
-   192,    87,    88,   116,   201,   336,   294,   337,   105,   512,
-     1,     2,   273,   246,   244,   245,    60,   171,    47,   100,
-   174,    89,   350,   279,   280,   281,    36,    93,    14,    42,
-    15,    58,    16,    26,   355,   295,    90,   297,   412,    17,
-    38,    39,   163,   487,    95,   226,   443,   444,   164,   165,
-   364,   166,   167
+static const short yydefgoto[] = {    84,
+   254,   270,   271,   272,   273,   192,   193,   222,   194,    23,
+    13,    35,   442,   306,   387,   406,   329,   388,    85,    86,
+   195,    88,    89,   118,   204,   339,   297,   340,   107,   515,
+     1,     2,   276,   249,   247,   248,    61,   173,    48,   102,
+   177,    90,   353,   282,   283,   284,    36,    94,    14,    42,
+    15,    59,    16,    26,   358,   298,    91,   300,   415,    17,
+    38,    39,   165,   490,    96,   229,   446,   447,   166,   167,
+   367,   168,   169
 };
 
 static const short yypact[] = {-32768,
-   194,   602,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
--32768,   -20,    38,    59,-32768,-32768,   -18,-32768,-32768,    13,
-    -8,    75,   115,    58,-32768,    40,   124,   163,-32768,-32768,
--32768,-32768,-32768,-32768,  1052,   -22,-32768,-32768,    -3,-32768,
--32768,-32768,-32768,    60,    65,    67,-32768,    57,   124,  1052,
-    62,    62,    62,    62,-32768,-32768,-32768,    38,-32768,-32768,
--32768,-32768,-32768,    61,-32768,-32768,-32768,-32768,-32768,-32768,
--32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,   167,   172,
-   173,   569,-32768,    -3,    68,-32768,-32768,   -30,-32768,-32768,
--32768,-32768,-32768,  1223,-32768,   159,    42,   180,   162,-32768,
--32768,-32768,-32768,-32768,  1093,  1093,  1093,  1134,-32768,-32768,
-    73,    74,-32768,-32768,   -30,   -75,    78,   847,-32768,-32768,
-  1093,-32768,   132,  1175,    14,   185,    38,-32768,-32768,-32768,
+   118,   605,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
+-32768,   -46,   131,    10,-32768,-32768,   -18,-32768,-32768,    29,
+   -69,    58,    51,   -19,-32768,   106,   114,   144,-32768,-32768,
+-32768,-32768,-32768,-32768,  1060,   -20,-32768,-32768,   130,-32768,
+-32768,-32768,-32768,    80,    81,    83,    94,-32768,    57,   114,
+  1060,    44,    44,    44,    44,-32768,-32768,-32768,   131,-32768,
+-32768,-32768,-32768,-32768,    90,-32768,-32768,-32768,-32768,-32768,
+-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,   200,
+   201,   202,   572,-32768,   130,    99,-32768,-32768,   -34,-32768,
+-32768,-32768,-32768,-32768,  1231,-32768,   191,    77,   212,   193,
+   194,-32768,-32768,-32768,-32768,-32768,  1101,  1101,  1101,  1142,
+-32768,-32768,   104,   107,-32768,-32768,   -34,   -74,   109,   852,
+-32768,-32768,  1101,-32768,   165,  1183,    30,    93,   131,-32768,
 -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
--32768,-32768,-32768,  1093,  1093,  1093,  1093,  1093,  1093,  1093,
--32768,-32768,  1093,  1093,  1093,  1093,  1093,  1093,  1093,  1093,
-  1093,  1093,-32768,    38,-32768,    22,-32768,-32768,-32768,-32768,
--32768,-32768,-32768,   -47,-32768,-32768,-32768,   111,   137,   199,
-   140,   203,   142,   204,   147,   205,   210,   211,   151,   206,
-   213,   412,-32768,  1093,  1093,  1093,-32768,   888,-32768,   103,
-   110,   635,-32768,-32768,    61,-32768,   635,   635,-32768,-32768,
--32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,   635,  1052,
-   114,   117,-32768,   635,   134,   118,   188,   119,   139,   141,
-   144,   145,   146,   148,   635,   635,   635,   149,  1052,  1093,
-  1093,   225,-32768,   150,   150,   150,-32768,-32768,-32768,-32768,
--32768,-32768,-32768,-32768,-32768,-32768,   152,   153,   154,   157,
-   158,   175,   929,  1134,   589,   227,   176,   178,   179,   182,
--32768,-32768,   150,   -51,   -72,   -30,-32768,    -3,-32768,   161,
-   183,   970,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
--32768,   197,  1134,-32768,-32768,-32768,-32768,   164,-32768,   187,
-   635,    -4,-32768,     3,-32768,   189,   635,   171,  1093,  1093,
-  1093,  1093,  1093,  1093,  1093,  1093,   193,   195,   200,  1093,
-   635,   635,   201,-32768,   -17,-32768,-32768,-32768,  1134,  1134,
-  1134,  1134,  1134,  1134,-32768,-32768,   -16,   -26,-32768,   -73,
--32768,  1134,  1134,  1134,  1134,-32768,-32768,-32768,-32768,-32768,
-  1011,   228,-32768,-32768,   237,   -25,   270,   273,   186,   635,
-   299,   635,  1093,-32768,   214,   635,-32768,   215,-32768,-32768,
-   216,   217,-32768,-32768,   635,   635,   635,-32768,   202,-32768,
-  1093,   282,   304,-32768,   150,   189,   276,   218,   224,   229,
-   230,  1134,-32768,-32768,-32768,   231,   232,   233,   234,-32768,
--32768,-32768,   257,   238,-32768,   635,   635,  1093,   239,-32768,
-   239,-32768,   241,   635,   244,  1093,  1093,  1093,-32768,-32768,
--32768,  1093,   635,-32768,-32768,-32768,   242,  1093,  1134,  1134,
-  1134,  1134,-32768,  1134,  1134,  1134,  1134,   311,-32768,   331,
-   247,   245,   241,   248,   300,-32768,-32768,  1093,   246,   635,
--32768,-32768,-32768,   252,-32768,-32768,   254,   258,   260,   261,
-   265,   263,   268,   272,   277,-32768,-32768,   348,    16,   341,
--32768,-32768,   275,-32768,-32768,  1134,-32768,  1134,  1134,-32768,
--32768,-32768,-32768,   635,-32768,   738,    63,   367,-32768,   279,
-   280,   284,-32768,   285,-32768,   738,   635,-32768,-32768,-32768,
-   376,   289,   324,   635,   379,   380,-32768,   635,   635,-32768,
--32768,   402,   403,-32768
+-32768,-32768,-32768,-32768,-32768,  1101,  1101,  1101,  1101,  1101,
+  1101,  1101,-32768,-32768,  1101,  1101,  1101,  1101,  1101,  1101,
+  1101,  1101,  1101,  1101,-32768,   131,-32768,    62,-32768,-32768,
+-32768,-32768,-32768,-32768,-32768,-32768,   -72,-32768,-32768,-32768,
+   142,   170,   221,   173,   222,   175,   223,   178,   224,   231,
+   232,   183,   225,   233,   425,-32768,  1101,  1101,  1101,-32768,
+   893,-32768,   120,   128,   638,-32768,-32768,    90,-32768,   638,
+   638,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
+-32768,   638,  1060,   121,   132,-32768,   638,   129,   134,   214,
+   141,   143,   146,   147,   148,   149,   150,   638,   638,   638,
+   151,  1060,  1101,  1101,   228,-32768,   152,   152,   152,-32768,
+-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,   153,
+   154,   155,   156,   159,   160,   934,  1142,   592,   230,   161,
+   164,   177,   180,-32768,-32768,   152,   -37,   -99,   -34,-32768,
+   130,-32768,   184,   174,   978,-32768,-32768,-32768,-32768,-32768,
+-32768,-32768,-32768,-32768,   227,  1142,-32768,-32768,-32768,-32768,
+   186,-32768,   187,   638,     2,-32768,     3,-32768,   188,   638,
+   179,  1101,  1101,  1101,  1101,  1101,  1101,  1101,  1101,   189,
+   190,   195,  1101,   638,   638,   196,-32768,   -23,-32768,-32768,
+-32768,  1142,  1142,  1142,  1142,  1142,  1142,-32768,-32768,   -30,
+    21,-32768,   -73,-32768,  1142,  1142,  1142,  1142,-32768,-32768,
+-32768,-32768,-32768,  1019,   229,-32768,-32768,   240,    24,   280,
+   286,   197,   638,   307,   638,  1101,-32768,   203,   638,-32768,
+   205,-32768,-32768,   210,   211,-32768,-32768,   638,   638,   638,
+-32768,   215,-32768,  1101,   288,   318,-32768,   152,   188,   290,
+   218,   219,   220,   226,  1142,-32768,-32768,-32768,   234,   237,
+   241,   242,-32768,-32768,-32768,   284,   243,-32768,   638,   638,
+  1101,   246,-32768,   246,-32768,   247,   638,   248,  1101,  1101,
+  1101,-32768,-32768,-32768,  1101,   638,-32768,-32768,-32768,   252,
+  1101,  1142,  1142,  1142,  1142,-32768,  1142,  1142,  1142,  1142,
+   338,-32768,   319,   249,   236,   247,   253,   303,-32768,-32768,
+  1101,   245,   638,-32768,-32768,-32768,   254,-32768,-32768,   256,
+   260,   259,   263,   265,   264,   267,   270,   274,-32768,-32768,
+   357,    14,   355,-32768,-32768,   276,-32768,-32768,  1142,-32768,
+  1142,  1142,-32768,-32768,-32768,-32768,   638,-32768,   742,    52,
+   372,-32768,   281,   282,   287,-32768,   289,-32768,   742,   638,
+-32768,-32768,-32768,   376,   291,   326,   638,   382,   383,-32768,
+   638,   638,-32768,-32768,   405,   406,-32768
 };
 
 static const short yypgoto[] = {-32768,
--32768,   310,   312,   313,   314,  -125,  -124,  -449,-32768,   366,
-   386,  -103,-32768,  -219,    69,-32768,  -236,-32768,   -46,-32768,
-   -35,-32768,   -66,   292,-32768,  -100,   219,  -251,    80,-32768,
--32768,-32768,-32768,-32768,-32768,-32768,   363,-32768,-32768,-32768,
--32768,     4,-32768,    71,-32768,-32768,   356,-32768,-32768,-32768,
--32768,-32768,   413,-32768,-32768,  -447,   -55,    64,   -99,-32768,
-   399,-32768,-32768,-32768,-32768,-32768,    56,    -2,-32768,-32768,
-    37,-32768,-32768
+-32768,   312,   313,   314,   315,  -127,  -126,  -458,-32768,   373,
+   388,  -116,-32768,  -221,    59,-32768,  -241,-32768,   -48,-32768,
+   -35,-32768,   -62,   293,-32768,  -100,   239,  -226,    91,-32768,
+-32768,-32768,-32768,-32768,-32768,-32768,   365,-32768,-32768,-32768,
+-32768,     4,-32768,    63,-32768,-32768,   359,-32768,-32768,-32768,
+-32768,-32768,   417,-32768,-32768,  -414,   -55,    64,  -103,-32768,
+   403,-32768,-32768,-32768,-32768,-32768,    55,    -3,-32768,-32768,
+    34,-32768,-32768
 };
 
 
-#define	YYLAST		1330
+#define	YYLAST		1339
 
 
-static const short yytable[] = {    86,
-   217,   218,   305,   102,    37,    24,    91,   193,   327,   328,
-   360,    40,   338,   340,    86,   115,   382,   362,    18,   486,
-    19,   203,   207,   220,   206,   209,   210,   211,   212,   213,
-   214,   215,   216,   196,   208,   392,   346,   496,   494,   383,
-    27,   356,    24,   197,   348,   395,   223,   119,   502,   227,
-   228,   115,   361,   229,   230,   231,   232,   233,   234,   361,
-   239,   242,   238,   347,    44,    45,    46,   243,   119,   175,
-   176,   177,   209,   210,   211,   212,   213,   214,   215,   216,
-   -64,    37,   392,   392,    56,   202,    57,   117,   202,   119,
-   394,   405,   392,   103,   104,    92,   169,   170,   393,    48,
-    41,    28,    29,    30,    31,    32,    33,    34,   221,   222,
-   202,   224,   225,   202,   202,   240,   241,   202,   202,   202,
-   202,   202,   202,   235,   236,   237,   202,   274,   275,   276,
-   485,   106,   107,   108,    50,    49,   272,   247,   248,   -24,
-   -24,   323,   -23,   -23,   -22,   -22,   296,    59,   426,   -21,
-   -21,   296,   296,   249,   250,     5,     6,     7,     8,    51,
-    10,    52,   278,   296,    53,    55,    61,    96,   296,    99,
-   110,   -65,    97,   301,    98,   111,   112,   495,   118,   296,
-   296,   296,   168,   172,    86,   173,   194,   195,   198,   446,
-   204,   447,   321,  -126,   209,   210,   211,   212,   213,   214,
-   215,   216,   -28,    86,   322,   202,   -27,   -26,   -25,   252,
-   368,   282,   370,   371,   372,   276,   -31,   -32,     3,   253,
-   378,   283,   302,   309,     4,   304,   308,   310,   386,   387,
-   388,   389,   390,   391,     5,     6,     7,     8,     9,    10,
-    11,   396,   397,   398,   399,   296,   307,   311,   324,   312,
-   341,   296,   313,   314,   315,    12,   316,   320,   325,   354,
-   404,   382,   329,   330,   331,   296,   296,   332,   333,   351,
-   298,   299,   357,   367,   202,   369,   202,   202,   202,   373,
-   374,   349,   300,   366,   202,   334,   342,   306,   343,   344,
-   406,   433,   345,   407,   352,   358,   408,   363,   317,   318,
-   319,   375,   410,   376,   296,   424,   296,   425,   377,   381,
-   296,   428,   422,   438,   466,   278,   451,   452,   453,   296,
-   296,   296,   414,   416,   417,   418,   429,   202,   458,   459,
-   460,   461,   430,   462,   463,   464,   465,   431,   432,   434,
-   435,   436,   437,   217,   218,   423,   440,   445,   471,   448,
-   296,   296,   450,   456,   467,   468,   361,   469,   296,   470,
-   472,   217,   218,   474,   359,   475,   476,   296,   484,   478,
-   365,   477,   202,   479,   480,   490,   488,   491,   492,   481,
-   202,   202,   202,   482,   379,   380,   202,   497,   483,   489,
-   498,   499,   457,   501,   296,   500,   504,   505,   506,   508,
-   509,   513,   514,   159,    94,   160,   161,   162,    54,   200,
-   271,   101,   202,   109,    25,    43,    62,    63,   413,   454,
-   402,   401,   427,   409,     0,   411,     0,     0,   296,   415,
-     0,     0,     0,    18,     0,    19,     0,   254,   419,   420,
-   421,   296,     0,     0,     0,     0,     0,     0,   296,   255,
-   256,     0,   296,   296,     0,     0,     0,     0,     0,     0,
-     0,     0,     0,     0,     0,     0,     0,     0,     0,   441,
-   442,     0,     0,     0,     0,     0,     0,   449,     0,     0,
-     0,     0,     0,     0,     0,     0,   455,     0,   130,   131,
-   132,   133,   134,   135,   136,   137,   138,   139,   140,   141,
-   142,   143,     0,     0,     0,     0,     0,   257,     0,   258,
-   259,   151,   152,   473,   260,   261,   262,     0,     0,     0,
-     0,     0,     0,     0,   263,     0,     0,   264,     0,   265,
-     0,     0,   266,     0,     0,     0,     0,     0,     0,     0,
-     0,     0,     0,     0,     0,     0,     0,   493,     0,     0,
-     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-   503,     0,     0,     0,     0,     0,     0,   507,     0,     0,
-     0,   510,   511,    62,    63,     0,   113,    65,    66,    67,
-    68,    69,    70,    71,    72,    73,    74,    75,    76,    77,
-    18,     0,    19,    62,    63,     0,   113,   178,   179,   180,
-   181,   182,   183,   184,   185,   186,   187,   188,    76,    77,
-    18,     0,    19,     0,     0,     0,    78,     0,     0,     0,
-     0,   -34,     0,    18,     0,    19,     0,     0,     0,     0,
-     0,     0,     4,   -34,   -34,     0,    78,   284,   285,    62,
-    63,   286,   -34,   -34,   -34,   -34,   -34,   -34,   -34,     0,
-     0,   -34,    20,     0,     0,     0,    18,     0,    19,    21,
-   287,   288,   289,    22,     0,     0,     0,     0,     0,     0,
-     0,     0,   290,   291,     0,     0,     0,     0,    79,     0,
-     0,    80,     0,     0,    81,     0,    82,   114,     0,     0,
-     0,     0,     0,     0,     0,   292,     0,     0,    79,     0,
-     0,    80,     0,     0,    81,     0,    82,   339,     0,     0,
-     0,   130,   131,   132,   133,   134,   135,   136,   137,   138,
-   139,   140,   141,   142,   143,     0,     0,     0,     0,     0,
-   257,     0,   258,   259,   151,   152,     0,   260,   261,   262,
-   284,   285,     0,     0,   286,     0,     0,     0,     0,     0,
-   293,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-     0,     0,     0,   287,   288,   289,     0,     0,     0,     0,
-     0,     0,     0,     0,     0,   290,   291,     0,     0,     0,
+static const short yytable[] = {    87,
+   220,   221,   104,   308,    37,    24,   330,   331,    92,   196,
+   385,    40,   223,   489,    27,    87,   363,   365,   351,   206,
+   117,   121,   209,   212,   213,   214,   215,   216,   217,   218,
+   219,   499,    37,   386,   349,   199,   395,   245,   210,    49,
+   341,   343,    24,   246,   226,   200,   398,   230,   231,   242,
+   211,   232,   233,   234,   235,   236,   237,   117,   364,   364,
+   241,   212,   213,   214,   215,   216,   217,   218,   219,   359,
+    51,   178,   179,   180,   497,   105,   106,   -64,   350,   395,
+    44,    45,    46,   121,   505,   396,   121,   205,   119,    56,
+   205,     5,     6,     7,     8,    52,    10,    53,    93,    47,
+    54,    41,   212,   213,   214,   215,   216,   217,   218,   219,
+   224,   225,   205,   227,   228,   205,   205,  -126,    50,   205,
+   205,   205,   205,   205,   205,   238,   239,   240,   205,   488,
+   395,   171,   172,   395,   277,   278,   279,    60,   397,   275,
+   326,   408,     3,   108,   109,   110,   429,    62,     4,   299,
+    57,    18,    58,    19,   299,   299,   243,   244,     5,     6,
+     7,     8,     9,    10,    11,   281,   299,   498,   250,   251,
+   101,   299,   -24,   -24,   304,   -23,   -23,   -22,   -22,    12,
+   -21,   -21,   299,   299,   299,   252,   253,    87,    97,    98,
+   449,    99,   450,   324,    28,    29,    30,    31,    32,    33,
+    34,   -65,   100,   112,   113,   114,    87,   325,   205,   371,
+   120,   373,   374,   375,   170,   174,   175,   176,   197,   381,
+   201,   198,   279,   207,   -28,   -27,   -26,   -25,   255,   285,
+   305,   389,   390,   391,   392,   393,   394,   -31,   -32,   256,
+   286,   307,   310,   311,   399,   400,   401,   402,   299,   312,
+   313,   327,   314,   344,   299,   315,   316,   317,   318,   319,
+   323,   328,   385,   407,   332,   333,   334,   335,   299,   299,
+   336,   337,   345,   301,   302,   346,   370,   205,   372,   205,
+   205,   205,   376,   377,   352,   303,   355,   205,   347,   357,
+   309,   348,   369,   354,   436,   360,   361,   366,   378,   379,
+   409,   320,   321,   322,   380,   384,   410,   299,   411,   299,
+   413,   427,   417,   299,   419,   454,   455,   456,   281,   420,
+   421,   428,   299,   299,   299,   431,   425,   432,   433,   434,
+   205,   461,   462,   463,   464,   435,   465,   466,   467,   468,
+   441,   469,   470,   437,   220,   221,   438,   474,   426,   472,
+   439,   440,   443,   299,   299,   448,   451,   453,   471,   364,
+   475,   299,   220,   221,   459,   473,   477,   362,   478,   479,
+   299,   480,   481,   368,   482,   205,   483,   487,   493,   484,
+   494,   495,   485,   205,   205,   205,   486,   382,   383,   205,
+   491,   492,   500,   501,   502,   460,   507,   299,   504,   503,
+   508,   509,   511,   512,   516,   517,   161,   162,   163,   164,
+    55,    95,   203,   405,   103,   205,   404,   111,    25,    43,
+   416,   457,   430,     0,     0,     0,   412,     0,   414,    63,
+    64,   299,   418,   274,     0,     0,     0,     0,     0,     0,
+     0,   422,   423,   424,   299,     0,    18,     0,    19,     0,
+   257,   299,     0,     0,     0,   299,   299,     0,     0,     0,
+     0,     0,   258,   259,     0,     0,     0,     0,     0,     0,
+     0,     0,   444,   445,     0,     0,     0,     0,     0,     0,
+   452,     0,     0,     0,     0,     0,     0,     0,     0,   458,
      0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-     0,     0,     0,     0,     0,     0,     0,     0,   292,     0,
+     0,     0,   132,   133,   134,   135,   136,   137,   138,   139,
+   140,   141,   142,   143,   144,   145,   476,     0,     0,     0,
+     0,   260,     0,   261,   262,   153,   154,     0,   263,   264,
+   265,     0,     0,     0,     0,     0,     0,     0,   266,     0,
+     0,   267,     0,   268,     0,     0,   269,     0,     0,     0,
+   496,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+     0,     0,     0,   506,     0,     0,     0,     0,     0,     0,
+   510,     0,     0,     0,   513,   514,    63,    64,     0,   115,
+    66,    67,    68,    69,    70,    71,    72,    73,    74,    75,
+    76,    77,    78,    18,     0,    19,    63,    64,     0,   115,
+   181,   182,   183,   184,   185,   186,   187,   188,   189,   190,
+   191,    77,    78,    18,     0,    19,     0,     0,     0,    79,
+     0,     0,     0,     0,   -34,     0,    18,     0,    19,     0,
+     0,     0,     0,     0,     0,     4,   -34,   -34,     0,    79,
+   287,   288,    63,    64,   289,   -34,   -34,   -34,   -34,   -34,
+   -34,   -34,     0,     0,   -34,    20,     0,     0,     0,    18,
+     0,    19,    21,   290,   291,   292,    22,     0,     0,     0,
+     0,     0,     0,     0,     0,   293,   294,     0,     0,     0,
+     0,     0,    80,     0,     0,    81,     0,     0,    82,     0,
+    83,   116,     0,     0,     0,     0,     0,     0,   295,     0,
+     0,     0,    80,     0,     0,    81,     0,     0,    82,     0,
+    83,   342,     0,     0,     0,   132,   133,   134,   135,   136,
+   137,   138,   139,   140,   141,   142,   143,   144,   145,     0,
+     0,     0,     0,     0,   260,     0,   261,   262,   153,   154,
+     0,   263,   264,   265,   287,   288,     0,     0,   289,     0,
+     0,     0,     0,     0,   296,     0,     0,     0,     0,     0,
+     0,     0,     0,     0,     0,     0,     0,   290,   291,   292,
+     0,     0,     0,     0,     0,     0,     0,     0,     0,   293,
+   294,     0,     0,     0,     0,     0,     0,     0,     0,     0,
      0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-     0,     0,     0,     0,   130,   131,   132,   133,   134,   135,
-   136,   137,   138,   139,   140,   141,   142,   143,     0,     0,
-     0,     0,     0,   257,     0,   258,   259,   151,   152,     0,
-   260,   261,   262,     0,     0,     0,     0,     0,     0,     0,
-     0,    62,    63,   293,   113,    65,    66,    67,    68,    69,
-    70,    71,    72,    73,    74,    75,    76,    77,    18,     0,
-    19,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-     0,     0,     0,   199,     0,     0,     0,     0,     0,     0,
-     0,     0,    62,    63,    78,   113,    65,    66,    67,    68,
-    69,    70,    71,    72,    73,    74,    75,    76,    77,    18,
-     0,    19,     0,     0,     0,     0,     0,     0,     0,     0,
-     0,     0,     0,     0,   277,     0,     0,     0,     0,     0,
-     0,     0,     0,    62,    63,    78,   113,   178,   179,   180,
-   181,   182,   183,   184,   185,   186,   187,   188,    76,    77,
-    18,     0,    19,     0,     0,     0,    79,     0,     0,    80,
-     0,     0,    81,     0,    82,     0,     0,     0,     0,     0,
-     0,     0,     0,     0,    62,    63,    78,   113,    65,    66,
-    67,    68,    69,    70,    71,    72,    73,    74,    75,    76,
-    77,    18,     0,    19,     0,     0,     0,    79,     0,     0,
-    80,     0,     0,    81,     0,    82,   353,     0,     0,     0,
-     0,     0,     0,     0,     0,    62,    63,    78,   113,    65,
+     0,     0,   295,     0,     0,     0,     0,     0,     0,     0,
+     0,     0,     0,     0,     0,     0,     0,     0,     0,   132,
+   133,   134,   135,   136,   137,   138,   139,   140,   141,   142,
+   143,   144,   145,     0,     0,     0,     0,     0,   260,     0,
+   261,   262,   153,   154,     0,   263,   264,   265,     0,     0,
+     0,     0,     0,     0,     0,     0,    63,    64,   296,   115,
     66,    67,    68,    69,    70,    71,    72,    73,    74,    75,
-    76,    77,    18,     0,    19,     0,     0,     0,    79,     0,
-     0,    80,     0,   335,    81,     0,    82,   400,     0,     0,
-     0,     0,     0,     0,     0,     0,    62,    63,    78,    64,
-    65,    66,    67,    68,    69,    70,    71,    72,    73,    74,
-    75,    76,    77,    18,     0,    19,     0,     0,     0,    79,
-     0,     0,    80,     0,     0,    81,     0,    82,     0,     0,
-     0,     0,     0,     0,     0,     0,     0,    62,    63,    78,
-   113,    65,    66,    67,    68,    69,    70,    71,    72,    73,
-    74,    75,    76,    77,    18,     0,    19,     0,     0,     0,
-    79,     0,     0,    80,     0,     0,    81,     0,    82,     0,
-     0,     0,     0,     0,     0,     0,     0,     0,    62,    63,
-    78,   113,   178,   179,   180,   181,   182,   183,   184,   185,
-   186,   187,   188,    76,    77,    18,     0,    19,     0,     0,
-     0,    79,     0,     0,    80,     0,     0,    81,     0,    82,
-     0,     0,     0,     0,     0,     0,     0,     0,     0,    62,
-    63,    78,   205,    65,    66,    67,    68,    69,    70,    71,
-    72,    73,    74,    75,    76,    77,    18,     0,    19,     0,
-     0,     0,    79,     0,     0,    80,     0,     0,    81,     0,
-    82,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-     0,     0,    78,     0,     0,     0,     0,     0,     0,     0,
+    76,    77,    78,    18,     0,    19,     0,     0,     0,     0,
+     0,     0,     0,     0,     0,     0,     0,     0,   202,     0,
+     0,     0,     0,     0,     0,     0,     0,    63,    64,    79,
+   115,    66,    67,    68,    69,    70,    71,    72,    73,    74,
+    75,    76,    77,    78,    18,     0,    19,     0,     0,     0,
+     0,     0,     0,     0,     0,     0,     0,     0,     0,   280,
+     0,     0,     0,     0,     0,     0,     0,     0,    63,    64,
+    79,   115,   181,   182,   183,   184,   185,   186,   187,   188,
+   189,   190,   191,    77,    78,    18,     0,    19,     0,     0,
+     0,     0,    80,     0,     0,    81,     0,     0,    82,     0,
+    83,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+     0,    79,    63,    64,     0,   115,    66,    67,    68,    69,
+    70,    71,    72,    73,    74,    75,    76,    77,    78,    18,
+     0,    19,     0,    80,     0,     0,    81,     0,     0,    82,
+     0,    83,     0,     0,   356,     0,     0,     0,     0,     0,
+     0,     0,     0,    63,    64,    79,   115,    66,    67,    68,
+    69,    70,    71,    72,    73,    74,    75,    76,    77,    78,
+    18,     0,    19,     0,    80,     0,     0,    81,     0,   338,
+    82,     0,    83,     0,     0,   403,     0,     0,     0,     0,
+     0,     0,     0,     0,    63,    64,    79,    65,    66,    67,
+    68,    69,    70,    71,    72,    73,    74,    75,    76,    77,
+    78,    18,     0,    19,     0,     0,     0,     0,    80,     0,
+     0,    81,     0,     0,    82,     0,    83,     0,     0,     0,
+     0,     0,     0,     0,     0,    63,    64,    79,   115,    66,
+    67,    68,    69,    70,    71,    72,    73,    74,    75,    76,
+    77,    78,    18,     0,    19,     0,     0,     0,     0,    80,
+     0,     0,    81,     0,     0,    82,     0,    83,     0,     0,
+     0,     0,     0,     0,     0,     0,    63,    64,    79,   115,
+   181,   182,   183,   184,   185,   186,   187,   188,   189,   190,
+   191,    77,    78,    18,     0,    19,     0,     0,     0,     0,
+    80,     0,     0,    81,     0,     0,    82,     0,    83,     0,
+     0,     0,     0,     0,     0,     0,     0,    63,    64,    79,
+   208,    66,    67,    68,    69,    70,    71,    72,    73,    74,
+    75,    76,    77,    78,    18,     0,    19,     0,     0,     0,
+     0,    80,     0,     0,    81,     0,     0,    82,     0,    83,
      0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-     0,     0,     0,    79,     0,     0,    80,     0,     0,    81,
-     0,    82,     0,     0,     0,     0,     0,   120,     0,     0,
+    79,     0,     0,     0,     0,     0,     0,     0,     0,     0,
      0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-     0,   121,     0,     0,     0,     0,     0,     0,     0,     0,
-     0,   122,   123,     0,    79,     0,     0,    80,     0,     0,
-    81,     0,    82,   124,   125,   126,   127,   128,   129,   130,
-   131,   132,   133,   134,   135,   136,   137,   138,   139,   140,
-   141,   142,   143,   144,   145,   146,     0,     0,   147,   148,
-   149,   150,   151,   152,   153,   154,   155,   156,   157,   158
+     0,     0,    80,     0,     0,    81,     0,     0,    82,     0,
+    83,     0,     0,     0,     0,   122,     0,     0,     0,     0,
+     0,     0,     0,     0,     0,     0,     0,     0,     0,   123,
+     0,     0,     0,     0,     0,     0,     0,     0,     0,   124,
+   125,     0,     0,    80,     0,     0,    81,     0,     0,    82,
+     0,    83,   126,   127,   128,   129,   130,   131,   132,   133,
+   134,   135,   136,   137,   138,   139,   140,   141,   142,   143,
+   144,   145,   146,   147,   148,     0,     0,   149,   150,   151,
+   152,   153,   154,   155,   156,   157,   158,   159,   160
 };
 
 static const short yycheck[] = {    35,
-   126,   126,   222,    50,    23,     2,    29,   108,   245,   246,
-    15,    30,   264,   265,    50,    82,    34,    15,    22,   469,
-    24,   121,     9,   127,   124,    10,    11,    12,    13,    14,
-    15,    16,    17,   109,    21,   109,   273,   487,   486,    57,
-    61,   293,    39,   119,   117,   119,   146,   120,   496,   149,
-   150,   118,    57,   153,   154,   155,   156,   157,   158,    57,
-   164,   109,   162,   115,    52,    53,    54,   115,   120,   105,
-   106,   107,    10,    11,    12,    13,    14,    15,    16,    17,
-   111,    23,   109,   109,    45,   121,    47,    84,   124,   120,
-   117,   117,   109,    32,    33,   118,    55,    56,   115,   108,
-   119,    64,    65,    66,    67,    68,    69,    70,   144,   145,
-   146,   147,   148,   149,   150,    94,    95,   153,   154,   155,
-   156,   157,   158,   159,   160,   161,   162,   194,   195,   196,
-   115,    52,    53,    54,    20,    61,   192,    27,    28,     3,
-     4,   241,     3,     4,     3,     4,   202,    24,   385,     3,
-     4,   207,   208,     3,     4,    41,    42,    43,    44,    45,
-    46,    47,   198,   219,    50,   108,     4,   108,   224,   113,
-     4,   111,   108,   220,   108,     4,     4,   115,   111,   235,
-   236,   237,    24,     4,   220,    24,   114,   114,   111,   409,
-    59,   411,   239,     0,    10,    11,    12,    13,    14,    15,
-    16,    17,     4,   239,   240,   241,     4,     4,     4,     4,
-   310,   109,   312,   313,   314,   282,     7,     7,    25,     7,
-   320,   112,   109,    36,    31,   109,   109,   109,   329,   330,
-   331,   332,   333,   334,    41,    42,    43,    44,    45,    46,
-    47,   342,   343,   344,   345,   301,   113,   109,    24,   109,
-    24,   307,   109,   109,   109,    62,   109,   109,   109,    63,
-    24,    34,   111,   111,   111,   321,   322,   111,   111,   109,
-   207,   208,   109,   309,   310,   311,   312,   313,   314,   315,
-   316,   278,   219,   113,   320,   111,   111,   224,   111,   111,
-    21,   392,   111,    21,   112,   109,   111,   109,   235,   236,
-   237,   109,     4,   109,   360,    24,   362,     4,   109,   109,
-   366,    36,   111,    57,     4,   351,   416,   417,   418,   375,
-   376,   377,   109,   109,   109,   109,   109,   363,   429,   430,
-   431,   432,   109,   434,   435,   436,   437,   109,   109,   109,
-   109,   109,   109,   469,   469,   381,   109,   109,   448,   109,
-   406,   407,   109,   112,    24,   109,    57,   113,   414,   112,
-   115,   487,   487,   112,   301,   112,   109,   423,    21,   109,
-   307,   112,   408,   109,   112,   476,    36,   478,   479,   112,
-   416,   417,   418,   112,   321,   322,   422,    21,   112,   115,
-   112,   112,   428,   109,   450,   112,    21,   109,    75,    21,
-    21,     0,     0,    94,    39,    94,    94,    94,    23,   118,
-   192,    49,   448,    58,     2,    17,     5,     6,   363,   422,
-   352,   351,   386,   360,    -1,   362,    -1,    -1,   484,   366,
-    -1,    -1,    -1,    22,    -1,    24,    -1,    26,   375,   376,
-   377,   497,    -1,    -1,    -1,    -1,    -1,    -1,   504,    38,
-    39,    -1,   508,   509,    -1,    -1,    -1,    -1,    -1,    -1,
-    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   406,
-   407,    -1,    -1,    -1,    -1,    -1,    -1,   414,    -1,    -1,
-    -1,    -1,    -1,    -1,    -1,    -1,   423,    -1,    77,    78,
-    79,    80,    81,    82,    83,    84,    85,    86,    87,    88,
-    89,    90,    -1,    -1,    -1,    -1,    -1,    96,    -1,    98,
-    99,   100,   101,   450,   103,   104,   105,    -1,    -1,    -1,
-    -1,    -1,    -1,    -1,   113,    -1,    -1,   116,    -1,   118,
-    -1,    -1,   121,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-    -1,    -1,    -1,    -1,    -1,    -1,    -1,   484,    -1,    -1,
+   128,   128,    51,   225,    23,     2,   248,   249,    29,   110,
+    34,    30,   129,   472,    61,    51,    15,    15,   118,   123,
+    83,   121,   126,    10,    11,    12,    13,    14,    15,    16,
+    17,   490,    23,    57,   276,   110,   110,   110,     9,   109,
+   267,   268,    39,   116,   148,   120,   120,   151,   152,   166,
+    21,   155,   156,   157,   158,   159,   160,   120,    57,    57,
+   164,    10,    11,    12,    13,    14,    15,    16,    17,   296,
+    20,   107,   108,   109,   489,    32,    33,   112,   116,   110,
+    52,    53,    54,   121,   499,   116,   121,   123,    85,   109,
+   126,    41,    42,    43,    44,    45,    46,    47,   119,    71,
+    50,   120,    10,    11,    12,    13,    14,    15,    16,    17,
+   146,   147,   148,   149,   150,   151,   152,     0,    61,   155,
+   156,   157,   158,   159,   160,   161,   162,   163,   164,   116,
+   110,    55,    56,   110,   197,   198,   199,    24,   118,   195,
+   244,   118,    25,    53,    54,    55,   388,     4,    31,   205,
+    45,    22,    47,    24,   210,   211,    95,    96,    41,    42,
+    43,    44,    45,    46,    47,   201,   222,   116,    27,    28,
+   114,   227,     3,     4,   223,     3,     4,     3,     4,    62,
+     3,     4,   238,   239,   240,     3,     4,   223,   109,   109,
+   412,   109,   414,   242,    64,    65,    66,    67,    68,    69,
+    70,   112,   109,     4,     4,     4,   242,   243,   244,   313,
+   112,   315,   316,   317,    24,     4,    24,    24,   115,   323,
+   112,   115,   285,    59,     4,     4,     4,     4,     4,   110,
+   110,   332,   333,   334,   335,   336,   337,     7,     7,     7,
+   113,   110,   114,   110,   345,   346,   347,   348,   304,    36,
+   110,    24,   110,    24,   310,   110,   110,   110,   110,   110,
+   110,   110,    34,    24,   112,   112,   112,   112,   324,   325,
+   112,   112,   112,   210,   211,   112,   312,   313,   314,   315,
+   316,   317,   318,   319,   281,   222,   113,   323,   112,    63,
+   227,   112,   114,   110,   395,   110,   110,   110,   110,   110,
+    21,   238,   239,   240,   110,   110,    21,   363,   112,   365,
+     4,    24,   110,   369,   110,   419,   420,   421,   354,   110,
+   110,     4,   378,   379,   380,    36,   112,   110,   110,   110,
+   366,   432,   433,   434,   435,   110,   437,   438,   439,   440,
+    57,     4,    24,   110,   472,   472,   110,   451,   384,   114,
+   110,   110,   110,   409,   410,   110,   110,   110,   110,    57,
+   116,   417,   490,   490,   113,   113,   113,   304,   113,   110,
+   426,   113,   110,   310,   110,   411,   113,    21,   479,   113,
+   481,   482,   113,   419,   420,   421,   113,   324,   325,   425,
+    36,   116,    21,   113,   113,   431,    21,   453,   110,   113,
+   110,    76,    21,    21,     0,     0,    95,    95,    95,    95,
+    23,    39,   120,   355,    50,   451,   354,    59,     2,    17,
+   366,   425,   389,    -1,    -1,    -1,   363,    -1,   365,     5,
+     6,   487,   369,   195,    -1,    -1,    -1,    -1,    -1,    -1,
+    -1,   378,   379,   380,   500,    -1,    22,    -1,    24,    -1,
+    26,   507,    -1,    -1,    -1,   511,   512,    -1,    -1,    -1,
+    -1,    -1,    38,    39,    -1,    -1,    -1,    -1,    -1,    -1,
+    -1,    -1,   409,   410,    -1,    -1,    -1,    -1,    -1,    -1,
+   417,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   426,
     -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-   497,    -1,    -1,    -1,    -1,    -1,    -1,   504,    -1,    -1,
-    -1,   508,   509,     5,     6,    -1,     8,     9,    10,    11,
-    12,    13,    14,    15,    16,    17,    18,    19,    20,    21,
-    22,    -1,    24,     5,     6,    -1,     8,     9,    10,    11,
-    12,    13,    14,    15,    16,    17,    18,    19,    20,    21,
-    22,    -1,    24,    -1,    -1,    -1,    48,    -1,    -1,    -1,
-    -1,    20,    -1,    22,    -1,    24,    -1,    -1,    -1,    -1,
-    -1,    -1,    31,    32,    33,    -1,    48,     3,     4,     5,
-     6,     7,    41,    42,    43,    44,    45,    46,    47,    -1,
-    -1,    50,    51,    -1,    -1,    -1,    22,    -1,    24,    58,
-    26,    27,    28,    62,    -1,    -1,    -1,    -1,    -1,    -1,
-    -1,    -1,    38,    39,    -1,    -1,    -1,    -1,   110,    -1,
-    -1,   113,    -1,    -1,   116,    -1,   118,   119,    -1,    -1,
-    -1,    -1,    -1,    -1,    -1,    61,    -1,    -1,   110,    -1,
-    -1,   113,    -1,    -1,   116,    -1,   118,   119,    -1,    -1,
-    -1,    77,    78,    79,    80,    81,    82,    83,    84,    85,
-    86,    87,    88,    89,    90,    -1,    -1,    -1,    -1,    -1,
-    96,    -1,    98,    99,   100,   101,    -1,   103,   104,   105,
-     3,     4,    -1,    -1,     7,    -1,    -1,    -1,    -1,    -1,
-   116,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-    -1,    -1,    -1,    26,    27,    28,    -1,    -1,    -1,    -1,
+    -1,    -1,    78,    79,    80,    81,    82,    83,    84,    85,
+    86,    87,    88,    89,    90,    91,   453,    -1,    -1,    -1,
+    -1,    97,    -1,    99,   100,   101,   102,    -1,   104,   105,
+   106,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   114,    -1,
+    -1,   117,    -1,   119,    -1,    -1,   122,    -1,    -1,    -1,
+   487,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+    -1,    -1,    -1,   500,    -1,    -1,    -1,    -1,    -1,    -1,
+   507,    -1,    -1,    -1,   511,   512,     5,     6,    -1,     8,
+     9,    10,    11,    12,    13,    14,    15,    16,    17,    18,
+    19,    20,    21,    22,    -1,    24,     5,     6,    -1,     8,
+     9,    10,    11,    12,    13,    14,    15,    16,    17,    18,
+    19,    20,    21,    22,    -1,    24,    -1,    -1,    -1,    48,
+    -1,    -1,    -1,    -1,    20,    -1,    22,    -1,    24,    -1,
+    -1,    -1,    -1,    -1,    -1,    31,    32,    33,    -1,    48,
+     3,     4,     5,     6,     7,    41,    42,    43,    44,    45,
+    46,    47,    -1,    -1,    50,    51,    -1,    -1,    -1,    22,
+    -1,    24,    58,    26,    27,    28,    62,    -1,    -1,    -1,
     -1,    -1,    -1,    -1,    -1,    38,    39,    -1,    -1,    -1,
+    -1,    -1,   111,    -1,    -1,   114,    -1,    -1,   117,    -1,
+   119,   120,    -1,    -1,    -1,    -1,    -1,    -1,    61,    -1,
+    -1,    -1,   111,    -1,    -1,   114,    -1,    -1,   117,    -1,
+   119,   120,    -1,    -1,    -1,    78,    79,    80,    81,    82,
+    83,    84,    85,    86,    87,    88,    89,    90,    91,    -1,
+    -1,    -1,    -1,    -1,    97,    -1,    99,   100,   101,   102,
+    -1,   104,   105,   106,     3,     4,    -1,    -1,     7,    -1,
+    -1,    -1,    -1,    -1,   117,    -1,    -1,    -1,    -1,    -1,
+    -1,    -1,    -1,    -1,    -1,    -1,    -1,    26,    27,    28,
+    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    38,
+    39,    -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,    61,    -1,
-    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-    -1,    -1,    -1,    -1,    77,    78,    79,    80,    81,    82,
-    83,    84,    85,    86,    87,    88,    89,    90,    -1,    -1,
-    -1,    -1,    -1,    96,    -1,    98,    99,   100,   101,    -1,
-   103,   104,   105,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-    -1,     5,     6,   116,     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,    37,    -1,    -1,    -1,    -1,    -1,    -1,
-    -1,    -1,     5,     6,    48,     8,     9,    10,    11,    12,
+    -1,    -1,    61,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    78,
+    79,    80,    81,    82,    83,    84,    85,    86,    87,    88,
+    89,    90,    91,    -1,    -1,    -1,    -1,    -1,    97,    -1,
+    99,   100,   101,   102,    -1,   104,   105,   106,    -1,    -1,
+    -1,    -1,    -1,    -1,    -1,    -1,     5,     6,   117,     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,    37,    -1,
+    -1,    -1,    -1,    -1,    -1,    -1,    -1,     5,     6,    48,
+     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,    37,
+    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,     5,     6,
+    48,     8,     9,    10,    11,    12,    13,    14,    15,    16,
+    17,    18,    19,    20,    21,    22,    -1,    24,    -1,    -1,
+    -1,    -1,   111,    -1,    -1,   114,    -1,    -1,   117,    -1,
+   119,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+    -1,    48,     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,    -1,    37,    -1,    -1,    -1,    -1,    -1,
+    -1,    24,    -1,   111,    -1,    -1,   114,    -1,    -1,   117,
+    -1,   119,    -1,    -1,    37,    -1,    -1,    -1,    -1,    -1,
     -1,    -1,    -1,     5,     6,    48,     8,     9,    10,    11,
     12,    13,    14,    15,    16,    17,    18,    19,    20,    21,
-    22,    -1,    24,    -1,    -1,    -1,   110,    -1,    -1,   113,
-    -1,    -1,   116,    -1,   118,    -1,    -1,    -1,    -1,    -1,
+    22,    -1,    24,    -1,   111,    -1,    -1,   114,    -1,   116,
+   117,    -1,   119,    -1,    -1,    37,    -1,    -1,    -1,    -1,
     -1,    -1,    -1,    -1,     5,     6,    48,     8,     9,    10,
     11,    12,    13,    14,    15,    16,    17,    18,    19,    20,
-    21,    22,    -1,    24,    -1,    -1,    -1,   110,    -1,    -1,
-   113,    -1,    -1,   116,    -1,   118,    37,    -1,    -1,    -1,
+    21,    22,    -1,    24,    -1,    -1,    -1,    -1,   111,    -1,
+    -1,   114,    -1,    -1,   117,    -1,   119,    -1,    -1,    -1,
     -1,    -1,    -1,    -1,    -1,     5,     6,    48,     8,     9,
     10,    11,    12,    13,    14,    15,    16,    17,    18,    19,
-    20,    21,    22,    -1,    24,    -1,    -1,    -1,   110,    -1,
-    -1,   113,    -1,   115,   116,    -1,   118,    37,    -1,    -1,
+    20,    21,    22,    -1,    24,    -1,    -1,    -1,    -1,   111,
+    -1,    -1,   114,    -1,    -1,   117,    -1,   119,    -1,    -1,
     -1,    -1,    -1,    -1,    -1,    -1,     5,     6,    48,     8,
      9,    10,    11,    12,    13,    14,    15,    16,    17,    18,
-    19,    20,    21,    22,    -1,    24,    -1,    -1,    -1,   110,
-    -1,    -1,   113,    -1,    -1,   116,    -1,   118,    -1,    -1,
+    19,    20,    21,    22,    -1,    24,    -1,    -1,    -1,    -1,
+   111,    -1,    -1,   114,    -1,    -1,   117,    -1,   119,    -1,
     -1,    -1,    -1,    -1,    -1,    -1,    -1,     5,     6,    48,
      8,     9,    10,    11,    12,    13,    14,    15,    16,    17,
     18,    19,    20,    21,    22,    -1,    24,    -1,    -1,    -1,
-   110,    -1,    -1,   113,    -1,    -1,   116,    -1,   118,    -1,
-    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,     5,     6,
-    48,     8,     9,    10,    11,    12,    13,    14,    15,    16,
-    17,    18,    19,    20,    21,    22,    -1,    24,    -1,    -1,
-    -1,   110,    -1,    -1,   113,    -1,    -1,   116,    -1,   118,
-    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,     5,
-     6,    48,     8,     9,    10,    11,    12,    13,    14,    15,
-    16,    17,    18,    19,    20,    21,    22,    -1,    24,    -1,
-    -1,    -1,   110,    -1,    -1,   113,    -1,    -1,   116,    -1,
-   118,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-    -1,    -1,    48,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+    -1,   111,    -1,    -1,   114,    -1,    -1,   117,    -1,   119,
     -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-    -1,    -1,    -1,   110,    -1,    -1,   113,    -1,    -1,   116,
-    -1,   118,    -1,    -1,    -1,    -1,    -1,    35,    -1,    -1,
+    48,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
     -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-    -1,    49,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-    -1,    59,    60,    -1,   110,    -1,    -1,   113,    -1,    -1,
-   116,    -1,   118,    71,    72,    73,    74,    75,    76,    77,
-    78,    79,    80,    81,    82,    83,    84,    85,    86,    87,
-    88,    89,    90,    91,    92,    93,    -1,    -1,    96,    97,
-    98,    99,   100,   101,   102,   103,   104,   105,   106,   107
+    -1,    -1,   111,    -1,    -1,   114,    -1,    -1,   117,    -1,
+   119,    -1,    -1,    -1,    -1,    35,    -1,    -1,    -1,    -1,
+    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    49,
+    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    59,
+    60,    -1,    -1,   111,    -1,    -1,   114,    -1,    -1,   117,
+    -1,   119,    72,    73,    74,    75,    76,    77,    78,    79,
+    80,    81,    82,    83,    84,    85,    86,    87,    88,    89,
+    90,    91,    92,    93,    94,    -1,    -1,    97,    98,    99,
+   100,   101,   102,   103,   104,   105,   106,   107,   108
 };
 /* -*-C-*-  Note some compilers choke on comments on `#line' lines.  */
 #line 3 "/usr/share/bison.simple"
@@ -2358,7 +2365,7 @@
   switch (yyn) {
 
 case 2:
-#line 1097 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1098 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
   if (yyvsp[0].UIntVal > (uint32_t)INT32_MAX)     // Outside of my range!
     GEN_ERROR("Value too large for type!");
@@ -2367,7 +2374,7 @@
 ;
     break;}
 case 4:
-#line 1106 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1107 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
   if (yyvsp[0].UInt64Val > (uint64_t)INT64_MAX)     // Outside of my range!
     GEN_ERROR("Value too large for type!");
@@ -2376,81 +2383,81 @@
 ;
     break;}
 case 33:
-#line 1130 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1131 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     yyval.StrVal = yyvsp[-1].StrVal;
     CHECK_FOR_ERROR
   ;
     break;}
 case 34:
-#line 1134 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1135 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     yyval.StrVal = 0;
     CHECK_FOR_ERROR
   ;
     break;}
 case 35:
-#line 1139 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1140 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 { yyval.Linkage = GlobalValue::InternalLinkage; ;
     break;}
 case 36:
-#line 1140 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1141 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 { yyval.Linkage = GlobalValue::LinkOnceLinkage; ;
     break;}
 case 37:
-#line 1141 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1142 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 { yyval.Linkage = GlobalValue::WeakLinkage; ;
     break;}
 case 38:
-#line 1142 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1143 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 { yyval.Linkage = GlobalValue::AppendingLinkage; ;
     break;}
 case 39:
-#line 1143 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1144 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 { yyval.Linkage = GlobalValue::DLLImportLinkage; ;
     break;}
 case 40:
-#line 1144 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1145 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 { yyval.Linkage = GlobalValue::DLLExportLinkage; ;
     break;}
 case 41:
-#line 1145 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1146 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 { yyval.Linkage = GlobalValue::ExternalWeakLinkage; ;
     break;}
 case 42:
-#line 1146 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1147 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 { yyval.Linkage = GlobalValue::ExternalLinkage; ;
     break;}
 case 43:
-#line 1148 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1149 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 { yyval.UIntVal = CallingConv::C; ;
     break;}
 case 44:
-#line 1149 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1150 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 { yyval.UIntVal = CallingConv::C; ;
     break;}
 case 45:
-#line 1150 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1151 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 { yyval.UIntVal = CallingConv::CSRet; ;
     break;}
 case 46:
-#line 1151 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1152 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 { yyval.UIntVal = CallingConv::Fast; ;
     break;}
 case 47:
-#line 1152 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1153 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 { yyval.UIntVal = CallingConv::Cold; ;
     break;}
 case 48:
-#line 1153 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1154 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 { yyval.UIntVal = CallingConv::X86_StdCall; ;
     break;}
 case 49:
-#line 1154 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1155 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 { yyval.UIntVal = CallingConv::X86_FastCall; ;
     break;}
 case 50:
-#line 1155 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1156 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
                    if ((unsigned)yyvsp[0].UInt64Val != yyvsp[0].UInt64Val)
                      GEN_ERROR("Calling conv too large!");
@@ -2459,11 +2466,11 @@
                  ;
     break;}
 case 51:
-#line 1164 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1165 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 { yyval.UIntVal = 0; ;
     break;}
 case 52:
-#line 1165 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1166 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
   yyval.UIntVal = yyvsp[0].UInt64Val;
   if (yyval.UIntVal != 0 && !isPowerOf2_32(yyval.UIntVal))
@@ -2472,11 +2479,11 @@
 ;
     break;}
 case 53:
-#line 1171 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1172 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 { yyval.UIntVal = 0; ;
     break;}
 case 54:
-#line 1172 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1173 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
   yyval.UIntVal = yyvsp[0].UInt64Val;
   if (yyval.UIntVal != 0 && !isPowerOf2_32(yyval.UIntVal))
@@ -2485,7 +2492,7 @@
 ;
     break;}
 case 55:
-#line 1180 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1181 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
   for (unsigned i = 0, e = strlen(yyvsp[0].StrVal); i != e; ++i)
     if (yyvsp[0].StrVal[i] == '"' || yyvsp[0].StrVal[i] == '\\')
@@ -2495,23 +2502,23 @@
 ;
     break;}
 case 56:
-#line 1188 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1189 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 { yyval.StrVal = 0; ;
     break;}
 case 57:
-#line 1189 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1190 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 { yyval.StrVal = yyvsp[0].StrVal; ;
     break;}
 case 58:
-#line 1194 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1195 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {;
     break;}
 case 59:
-#line 1195 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1196 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {;
     break;}
 case 60:
-#line 1196 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1197 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     CurGV->setSection(yyvsp[0].StrVal);
     free(yyvsp[0].StrVal);
@@ -2519,7 +2526,7 @@
   ;
     break;}
 case 61:
-#line 1201 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1202 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     if (yyvsp[0].UInt64Val != 0 && !isPowerOf2_32(yyvsp[0].UInt64Val))
       GEN_ERROR("Alignment must be a power of two!");
@@ -2528,15 +2535,15 @@
   ;
     break;}
 case 63:
-#line 1215 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1216 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 { yyval.TypeVal = new PATypeHolder(yyvsp[0].PrimType); ;
     break;}
 case 65:
-#line 1216 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1217 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 { yyval.TypeVal = new PATypeHolder(yyvsp[0].PrimType); ;
     break;}
 case 66:
-#line 1218 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1219 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     if (!UpRefs.empty())
       GEN_ERROR("Invalid upreference in type: " + (*yyvsp[0].TypeVal)->getDescription());
@@ -2545,21 +2552,21 @@
   ;
     break;}
 case 80:
-#line 1230 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1231 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     yyval.TypeVal = new PATypeHolder(OpaqueType::get());
     CHECK_FOR_ERROR
   ;
     break;}
 case 81:
-#line 1234 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1235 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     yyval.TypeVal = new PATypeHolder(yyvsp[0].PrimType);
     CHECK_FOR_ERROR
   ;
     break;}
 case 82:
-#line 1238 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1239 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {            // Named types are also simple types...
   const Type* tmp = getTypeVal(yyvsp[0].ValIDVal);
   CHECK_FOR_ERROR
@@ -2567,7 +2574,7 @@
 ;
     break;}
 case 83:
-#line 1246 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1247 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {                   // Type UpReference
     if (yyvsp[0].UInt64Val > (uint64_t)~0U) GEN_ERROR("Value out of range!");
     OpaqueType *OT = OpaqueType::get();        // Use temporary placeholder
@@ -2578,7 +2585,7 @@
   ;
     break;}
 case 84:
-#line 1254 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1255 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {           // Function derived type?
     std::vector Params;
     for (std::list::iterator I = yyvsp[-1].TypeList->begin(),
@@ -2594,7 +2601,7 @@
   ;
     break;}
 case 85:
-#line 1267 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1268 "/Users/resistor/llvm/src/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;
@@ -2602,7 +2609,7 @@
   ;
     break;}
 case 86:
-#line 1272 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1273 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {          // Packed array type?
      const llvm::Type* ElemTy = yyvsp[-1].TypeVal->get();
      if ((unsigned)yyvsp[-3].UInt64Val != yyvsp[-3].UInt64Val)
@@ -2617,7 +2624,7 @@
   ;
     break;}
 case 87:
-#line 1284 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1285 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {                        // Structure type?
     std::vector Elements;
     for (std::list::iterator I = yyvsp[-1].TypeList->begin(),
@@ -2630,14 +2637,14 @@
   ;
     break;}
 case 88:
-#line 1294 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1295 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {                                  // Empty structure type?
     yyval.TypeVal = new PATypeHolder(StructType::get(std::vector()));
     CHECK_FOR_ERROR
   ;
     break;}
 case 89:
-#line 1298 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1299 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {                             // Pointer type?
     if (*yyvsp[-1].TypeVal == Type::LabelTy)
       GEN_ERROR("Cannot form a pointer to a basic block");
@@ -2647,7 +2654,7 @@
   ;
     break;}
 case 90:
-#line 1309 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1310 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     yyval.TypeList = new std::list();
     yyval.TypeList->push_back(*yyvsp[0].TypeVal); delete yyvsp[0].TypeVal;
@@ -2655,35 +2662,35 @@
   ;
     break;}
 case 91:
-#line 1314 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1315 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     (yyval.TypeList=yyvsp[-2].TypeList)->push_back(*yyvsp[0].TypeVal); delete yyvsp[0].TypeVal;
     CHECK_FOR_ERROR
   ;
     break;}
 case 93:
-#line 1321 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1322 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     (yyval.TypeList=yyvsp[-2].TypeList)->push_back(Type::VoidTy);
     CHECK_FOR_ERROR
   ;
     break;}
 case 94:
-#line 1325 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1326 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     (yyval.TypeList = new std::list())->push_back(Type::VoidTy);
     CHECK_FOR_ERROR
   ;
     break;}
 case 95:
-#line 1329 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1330 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     yyval.TypeList = new std::list();
     CHECK_FOR_ERROR
   ;
     break;}
 case 96:
-#line 1340 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1341 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 { // Nonempty unsized arr
     const ArrayType *ATy = dyn_cast(yyvsp[-3].TypeVal->get());
     if (ATy == 0)
@@ -2712,7 +2719,7 @@
   ;
     break;}
 case 97:
-#line 1366 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1367 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     const ArrayType *ATy = dyn_cast(yyvsp[-2].TypeVal->get());
     if (ATy == 0)
@@ -2729,7 +2736,7 @@
   ;
     break;}
 case 98:
-#line 1380 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1381 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     const ArrayType *ATy = dyn_cast(yyvsp[-2].TypeVal->get());
     if (ATy == 0)
@@ -2762,7 +2769,7 @@
   ;
     break;}
 case 99:
-#line 1410 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1411 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 { // Nonempty unsized arr
     const PackedType *PTy = dyn_cast(yyvsp[-3].TypeVal->get());
     if (PTy == 0)
@@ -2791,7 +2798,7 @@
   ;
     break;}
 case 100:
-#line 1436 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1437 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     const StructType *STy = dyn_cast(yyvsp[-3].TypeVal->get());
     if (STy == 0)
@@ -2815,7 +2822,7 @@
   ;
     break;}
 case 101:
-#line 1457 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1458 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     const StructType *STy = dyn_cast(yyvsp[-2].TypeVal->get());
     if (STy == 0)
@@ -2831,7 +2838,7 @@
   ;
     break;}
 case 102:
-#line 1470 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1471 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     const PointerType *PTy = dyn_cast(yyvsp[-1].TypeVal->get());
     if (PTy == 0)
@@ -2844,7 +2851,7 @@
   ;
     break;}
 case 103:
-#line 1480 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1481 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     yyval.ConstVal = UndefValue::get(yyvsp[-1].TypeVal->get());
     delete yyvsp[-1].TypeVal;
@@ -2852,7 +2859,7 @@
   ;
     break;}
 case 104:
-#line 1485 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1486 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     const PointerType *Ty = dyn_cast(yyvsp[-1].TypeVal->get());
     if (Ty == 0)
@@ -2916,7 +2923,7 @@
   ;
     break;}
 case 105:
-#line 1546 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1547 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     if (yyvsp[-1].TypeVal->get() != yyvsp[0].ConstVal->getType())
       GEN_ERROR("Mismatched types for constant expression!");
@@ -2926,7 +2933,7 @@
   ;
     break;}
 case 106:
-#line 1553 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1554 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     const Type *Ty = yyvsp[-1].TypeVal->get();
     if (isa(Ty) || Ty == Type::LabelTy || isa(Ty))
@@ -2937,7 +2944,7 @@
   ;
     break;}
 case 107:
-#line 1562 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1563 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {      // integral constants
     if (!ConstantSInt::isValueValidForType(yyvsp[-1].PrimType, yyvsp[0].SInt64Val))
       GEN_ERROR("Constant value doesn't fit in type!");
@@ -2946,7 +2953,7 @@
   ;
     break;}
 case 108:
-#line 1568 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1569 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {            // integral constants
     if (!ConstantUInt::isValueValidForType(yyvsp[-1].PrimType, yyvsp[0].UInt64Val))
       GEN_ERROR("Constant value doesn't fit in type!");
@@ -2955,21 +2962,21 @@
   ;
     break;}
 case 109:
-#line 1574 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1575 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {                      // Boolean constants
     yyval.ConstVal = ConstantBool::getTrue();
     CHECK_FOR_ERROR
   ;
     break;}
 case 110:
-#line 1578 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1579 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {                     // Boolean constants
     yyval.ConstVal = ConstantBool::getFalse();
     CHECK_FOR_ERROR
   ;
     break;}
 case 111:
-#line 1582 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1583 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {                   // Float & Double constants
     if (!ConstantFP::isValueValidForType(yyvsp[-1].PrimType, yyvsp[0].FPVal))
       GEN_ERROR("Floating point constant invalid for type!!");
@@ -2978,7 +2985,7 @@
   ;
     break;}
 case 112:
-#line 1590 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1591 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     if (!yyvsp[-3].ConstVal->getType()->isFirstClassType())
       GEN_ERROR("cast constant expression from a non-primitive type: '" +
@@ -2992,7 +2999,7 @@
   ;
     break;}
 case 113:
-#line 1601 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1602 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     if (!isa(yyvsp[-2].ConstVal->getType()))
       GEN_ERROR("GetElementPtr requires a pointer operand!");
@@ -3027,7 +3034,7 @@
   ;
     break;}
 case 114:
-#line 1633 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1634 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     if (yyvsp[-5].ConstVal->getType() != Type::BoolTy)
       GEN_ERROR("Select condition must be of boolean type!");
@@ -3038,7 +3045,7 @@
   ;
     break;}
 case 115:
-#line 1641 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1642 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     if (yyvsp[-3].ConstVal->getType() != yyvsp[-1].ConstVal->getType())
       GEN_ERROR("Binary operator types must match!");
@@ -3063,7 +3070,7 @@
   ;
     break;}
 case 116:
-#line 1663 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1664 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     if (yyvsp[-3].ConstVal->getType() != yyvsp[-1].ConstVal->getType())
       GEN_ERROR("Logical operator types must match!");
@@ -3077,7 +3084,7 @@
   ;
     break;}
 case 117:
-#line 1674 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1675 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     if (yyvsp[-3].ConstVal->getType() != yyvsp[-1].ConstVal->getType())
       GEN_ERROR("setcc operand types must match!");
@@ -3086,7 +3093,7 @@
   ;
     break;}
 case 118:
-#line 1680 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1681 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     if (yyvsp[-1].ConstVal->getType() != Type::UByteTy)
       GEN_ERROR("Shift count for shift constant must be unsigned byte!");
@@ -3097,7 +3104,7 @@
   ;
     break;}
 case 119:
-#line 1688 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1689 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     if (!ExtractElementInst::isValidOperands(yyvsp[-3].ConstVal, yyvsp[-1].ConstVal))
       GEN_ERROR("Invalid extractelement operands!");
@@ -3106,7 +3113,7 @@
   ;
     break;}
 case 120:
-#line 1694 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1695 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     if (!InsertElementInst::isValidOperands(yyvsp[-5].ConstVal, yyvsp[-3].ConstVal, yyvsp[-1].ConstVal))
       GEN_ERROR("Invalid insertelement operands!");
@@ -3115,7 +3122,7 @@
   ;
     break;}
 case 121:
-#line 1700 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1701 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     if (!ShuffleVectorInst::isValidOperands(yyvsp[-5].ConstVal, yyvsp[-3].ConstVal, yyvsp[-1].ConstVal))
       GEN_ERROR("Invalid shufflevector operands!");
@@ -3124,14 +3131,14 @@
   ;
     break;}
 case 122:
-#line 1709 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1710 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     (yyval.ConstVector = yyvsp[-2].ConstVector)->push_back(yyvsp[0].ConstVal);
     CHECK_FOR_ERROR
   ;
     break;}
 case 123:
-#line 1713 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1714 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     yyval.ConstVector = new std::vector();
     yyval.ConstVector->push_back(yyvsp[0].ConstVal);
@@ -3139,15 +3146,15 @@
   ;
     break;}
 case 124:
-#line 1721 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1722 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 { yyval.BoolVal = false; ;
     break;}
 case 125:
-#line 1721 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1722 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 { yyval.BoolVal = true; ;
     break;}
 case 126:
-#line 1731 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1732 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
   yyval.ModuleVal = ParserResult = yyvsp[0].ModuleVal;
   CurModule.ModuleDone();
@@ -3155,7 +3162,7 @@
 ;
     break;}
 case 127:
-#line 1739 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1740 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     yyval.ModuleVal = yyvsp[-1].ModuleVal;
     CurFun.FunctionDone();
@@ -3163,28 +3170,28 @@
   ;
     break;}
 case 128:
-#line 1744 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1745 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     yyval.ModuleVal = yyvsp[-1].ModuleVal;
     CHECK_FOR_ERROR
   ;
     break;}
 case 129:
-#line 1748 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1749 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     yyval.ModuleVal = yyvsp[-3].ModuleVal;
     CHECK_FOR_ERROR
   ;
     break;}
 case 130:
-#line 1752 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1753 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     yyval.ModuleVal = yyvsp[-1].ModuleVal;
     CHECK_FOR_ERROR
   ;
     break;}
 case 131:
-#line 1756 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1757 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     yyval.ModuleVal = CurModule.CurrentModule;
     // Emit an error if there are any unresolved types left.
@@ -3200,7 +3207,7 @@
   ;
     break;}
 case 132:
-#line 1771 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1772 "/Users/resistor/llvm/src/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:
@@ -3225,19 +3232,19 @@
   ;
     break;}
 case 133:
-#line 1793 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1794 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {       // Function prototypes can be in const pool
     CHECK_FOR_ERROR
   ;
     break;}
 case 134:
-#line 1796 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1797 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {  // Asm blocks can be in the const pool
     CHECK_FOR_ERROR
   ;
     break;}
 case 135:
-#line 1799 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1800 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     if (yyvsp[0].ConstVal == 0) 
       GEN_ERROR("Global value initializer is not a constant!");
@@ -3246,13 +3253,13 @@
   ;
     break;}
 case 136:
-#line 1804 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1805 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     CurGV = 0;
   ;
     break;}
 case 137:
-#line 1807 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1808 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     CurGV = ParseGlobalVariable(yyvsp[-3].StrVal, GlobalValue::ExternalLinkage, yyvsp[-1].BoolVal, *yyvsp[0].TypeVal, 0);
     CHECK_FOR_ERROR
@@ -3260,14 +3267,14 @@
   ;
     break;}
 case 138:
-#line 1811 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1812 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     CurGV = 0;
     CHECK_FOR_ERROR
   ;
     break;}
 case 139:
-#line 1815 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1816 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     CurGV = ParseGlobalVariable(yyvsp[-3].StrVal, GlobalValue::DLLImportLinkage, yyvsp[-1].BoolVal, *yyvsp[0].TypeVal, 0);
     CHECK_FOR_ERROR
@@ -3275,14 +3282,14 @@
   ;
     break;}
 case 140:
-#line 1819 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1820 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     CurGV = 0;
     CHECK_FOR_ERROR
   ;
     break;}
 case 141:
-#line 1823 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1824 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     CurGV = 
       ParseGlobalVariable(yyvsp[-3].StrVal, GlobalValue::ExternalWeakLinkage, yyvsp[-1].BoolVal, *yyvsp[0].TypeVal, 0);
@@ -3291,31 +3298,31 @@
   ;
     break;}
 case 142:
-#line 1828 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1829 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     CurGV = 0;
     CHECK_FOR_ERROR
   ;
     break;}
 case 143:
-#line 1832 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1833 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 { 
     CHECK_FOR_ERROR
   ;
     break;}
 case 144:
-#line 1835 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1836 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     CHECK_FOR_ERROR
   ;
     break;}
 case 145:
-#line 1838 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1839 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 { 
   ;
     break;}
 case 146:
-#line 1842 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1843 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
   const std::string &AsmSoFar = CurModule.CurrentModule->getModuleInlineAsm();
   char *EndStr = UnEscapeLexed(yyvsp[0].StrVal, true);
@@ -3330,22 +3337,22 @@
 ;
     break;}
 case 147:
-#line 1855 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1856 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 { yyval.Endianness = Module::BigEndian; ;
     break;}
 case 148:
-#line 1856 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1857 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 { yyval.Endianness = Module::LittleEndian; ;
     break;}
 case 149:
-#line 1858 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1859 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     CurModule.CurrentModule->setEndianness(yyvsp[0].Endianness);
     CHECK_FOR_ERROR
   ;
     break;}
 case 150:
-#line 1862 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1863 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     if (yyvsp[0].UInt64Val == 32)
       CurModule.CurrentModule->setPointerSize(Module::Pointer32);
@@ -3357,41 +3364,49 @@
   ;
     break;}
 case 151:
-#line 1871 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1872 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     CurModule.CurrentModule->setTargetTriple(yyvsp[0].StrVal);
     free(yyvsp[0].StrVal);
     CHECK_FOR_ERROR
   ;
     break;}
-case 153:
-#line 1879 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+case 152:
+#line 1877 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
+{
+    CurModule.CurrentModule->setDataLayout(yyvsp[0].StrVal);
+    free(yyvsp[0].StrVal);
+    CHECK_FOR_ERROR
+  ;
+    break;}
+case 154:
+#line 1885 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
           CurModule.CurrentModule->addLibrary(yyvsp[0].StrVal);
           free(yyvsp[0].StrVal);
           CHECK_FOR_ERROR
         ;
     break;}
-case 154:
-#line 1884 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+case 155:
+#line 1890 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
           CurModule.CurrentModule->addLibrary(yyvsp[0].StrVal);
           free(yyvsp[0].StrVal);
           CHECK_FOR_ERROR
         ;
     break;}
-case 155:
-#line 1889 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+case 156:
+#line 1895 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
           CHECK_FOR_ERROR
         ;
     break;}
-case 159:
-#line 1899 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+case 160:
+#line 1905 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 { yyval.StrVal = 0; ;
     break;}
-case 160:
-#line 1901 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+case 161:
+#line 1907 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
   if (*yyvsp[-1].TypeVal == Type::VoidTy)
     GEN_ERROR("void typed arguments are invalid!");
@@ -3399,8 +3414,8 @@
   CHECK_FOR_ERROR
 ;
     break;}
-case 161:
-#line 1908 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+case 162:
+#line 1914 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     yyval.ArgList = yyvsp[-2].ArgList;
     yyvsp[-2].ArgList->push_back(*yyvsp[0].ArgVal);
@@ -3408,8 +3423,8 @@
     CHECK_FOR_ERROR
   ;
     break;}
-case 162:
-#line 1914 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+case 163:
+#line 1920 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     yyval.ArgList = new std::vector >();
     yyval.ArgList->push_back(*yyvsp[0].ArgVal);
@@ -3417,15 +3432,15 @@
     CHECK_FOR_ERROR
   ;
     break;}
-case 163:
-#line 1921 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+case 164:
+#line 1927 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     yyval.ArgList = yyvsp[0].ArgList;
     CHECK_FOR_ERROR
   ;
     break;}
-case 164:
-#line 1925 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+case 165:
+#line 1931 "/Users/resistor/llvm/src/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));
     CHECK_FOR_ERROR
   ;
     break;}
-case 166:
-#line 1936 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+case 167:
+#line 1942 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     yyval.ArgList = 0;
     CHECK_FOR_ERROR
   ;
     break;}
-case 167:
-#line 1942 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+case 168:
+#line 1948 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
   UnEscapeLexed(yyvsp[-5].StrVal);
   std::string FunctionName(yyvsp[-5].StrVal);
@@ -3544,8 +3559,8 @@
   CHECK_FOR_ERROR
 ;
     break;}
-case 170:
-#line 2038 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+case 171:
+#line 2044 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
   yyval.FunctionVal = CurFun.CurrentFunction;
 
@@ -3554,105 +3569,105 @@
   yyval.FunctionVal->setLinkage(yyvsp[-2].Linkage);
 ;
     break;}
-case 173:
-#line 2048 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+case 174:
+#line 2054 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
   yyval.FunctionVal = yyvsp[-1].FunctionVal;
   CHECK_FOR_ERROR
 ;
     break;}
-case 175:
-#line 2054 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{ CurFun.Linkage = GlobalValue::DLLImportLinkage ;
-    break;}
 case 176:
-#line 2055 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2060 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 { CurFun.Linkage = GlobalValue::DLLImportLinkage ;
     break;}
 case 177:
-#line 2057 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{ CurFun.isDeclare = true; ;
+#line 2061 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
+{ CurFun.Linkage = GlobalValue::DLLImportLinkage ;
     break;}
 case 178:
-#line 2057 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2063 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
+{ CurFun.isDeclare = true; ;
+    break;}
+case 179:
+#line 2063 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     yyval.FunctionVal = CurFun.CurrentFunction;
     CurFun.FunctionDone();
     CHECK_FOR_ERROR
   ;
     break;}
-case 179:
-#line 2067 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+case 180:
+#line 2073 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     yyval.BoolVal = false;
     CHECK_FOR_ERROR
   ;
     break;}
-case 180:
-#line 2071 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+case 181:
+#line 2077 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     yyval.BoolVal = true;
     CHECK_FOR_ERROR
   ;
     break;}
-case 181:
-#line 2076 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+case 182:
+#line 2082 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {    // A reference to a direct constant
     yyval.ValIDVal = ValID::create(yyvsp[0].SInt64Val);
     CHECK_FOR_ERROR
   ;
     break;}
-case 182:
-#line 2080 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+case 183:
+#line 2086 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     yyval.ValIDVal = ValID::create(yyvsp[0].UInt64Val);
     CHECK_FOR_ERROR
   ;
     break;}
-case 183:
-#line 2084 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+case 184:
+#line 2090 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {                     // Perhaps it's an FP constant?
     yyval.ValIDVal = ValID::create(yyvsp[0].FPVal);
     CHECK_FOR_ERROR
   ;
     break;}
-case 184:
-#line 2088 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+case 185:
+#line 2094 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     yyval.ValIDVal = ValID::create(ConstantBool::getTrue());
     CHECK_FOR_ERROR
   ;
     break;}
-case 185:
-#line 2092 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+case 186:
+#line 2098 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     yyval.ValIDVal = ValID::create(ConstantBool::getFalse());
     CHECK_FOR_ERROR
   ;
     break;}
-case 186:
-#line 2096 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+case 187:
+#line 2102 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     yyval.ValIDVal = ValID::createNull();
     CHECK_FOR_ERROR
   ;
     break;}
-case 187:
-#line 2100 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+case 188:
+#line 2106 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     yyval.ValIDVal = ValID::createUndef();
     CHECK_FOR_ERROR
   ;
     break;}
-case 188:
-#line 2104 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+case 189:
+#line 2110 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {     // A vector zero constant.
     yyval.ValIDVal = ValID::createZeroInit();
     CHECK_FOR_ERROR
   ;
     break;}
-case 189:
-#line 2108 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+case 190:
+#line 2114 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 { // Nonempty unsized packed vector
     const Type *ETy = (*yyvsp[-1].ConstVector)[0]->getType();
     int NumElements = yyvsp[-1].ConstVector->size(); 
@@ -3679,15 +3694,15 @@
     CHECK_FOR_ERROR
   ;
     break;}
-case 190:
-#line 2133 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+case 191:
+#line 2139 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     yyval.ValIDVal = ValID::create(yyvsp[0].ConstVal);
     CHECK_FOR_ERROR
   ;
     break;}
-case 191:
-#line 2137 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+case 192:
+#line 2143 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     char *End = UnEscapeLexed(yyvsp[-2].StrVal, true);
     std::string AsmStr = std::string(yyvsp[-2].StrVal, End);
@@ -3699,43 +3714,43 @@
     CHECK_FOR_ERROR
   ;
     break;}
-case 192:
-#line 2151 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+case 193:
+#line 2157 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {  // Is it an integer reference...?
     yyval.ValIDVal = ValID::create(yyvsp[0].SIntVal);
     CHECK_FOR_ERROR
   ;
     break;}
-case 193:
-#line 2155 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+case 194:
+#line 2161 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {                   // Is it a named reference...?
     yyval.ValIDVal = ValID::create(yyvsp[0].StrVal);
     CHECK_FOR_ERROR
   ;
     break;}
-case 196:
-#line 2167 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+case 197:
+#line 2173 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     yyval.ValueVal = getVal(*yyvsp[-1].TypeVal, yyvsp[0].ValIDVal); delete yyvsp[-1].TypeVal;
     CHECK_FOR_ERROR
   ;
     break;}
-case 197:
-#line 2172 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+case 198:
+#line 2178 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     yyval.FunctionVal = yyvsp[-1].FunctionVal;
     CHECK_FOR_ERROR
   ;
     break;}
-case 198:
-#line 2176 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+case 199:
+#line 2182 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 { // Do not allow functions with 0 basic blocks   
     yyval.FunctionVal = yyvsp[-1].FunctionVal;
     CHECK_FOR_ERROR
   ;
     break;}
-case 199:
-#line 2185 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+case 200:
+#line 2191 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     setValueName(yyvsp[0].TermInstVal, yyvsp[-1].StrVal);
     CHECK_FOR_ERROR
@@ -3747,16 +3762,16 @@
     CHECK_FOR_ERROR
   ;
     break;}
-case 200:
-#line 2196 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+case 201:
+#line 2202 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     yyvsp[-1].BasicBlockVal->getInstList().push_back(yyvsp[0].InstVal);
     yyval.BasicBlockVal = yyvsp[-1].BasicBlockVal;
     CHECK_FOR_ERROR
   ;
     break;}
-case 201:
-#line 2201 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+case 202:
+#line 2207 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     yyval.BasicBlockVal = CurBB = getBBVal(ValID::create((int)CurFun.NextBBNum++), true);
     CHECK_FOR_ERROR
@@ -3770,8 +3785,8 @@
     CHECK_FOR_ERROR
   ;
     break;}
-case 202:
-#line 2213 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+case 203:
+#line 2219 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     yyval.BasicBlockVal = CurBB = getBBVal(ValID::create(yyvsp[0].StrVal), true);
     CHECK_FOR_ERROR
@@ -3785,30 +3800,30 @@
     CHECK_FOR_ERROR
   ;
     break;}
-case 203:
-#line 2226 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+case 204:
+#line 2232 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {              // Return with a result...
     yyval.TermInstVal = new ReturnInst(yyvsp[0].ValueVal);
     CHECK_FOR_ERROR
   ;
     break;}
-case 204:
-#line 2230 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+case 205:
+#line 2236 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {                                       // Return with no result...
     yyval.TermInstVal = new ReturnInst();
     CHECK_FOR_ERROR
   ;
     break;}
-case 205:
-#line 2234 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+case 206:
+#line 2240 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {                         // Unconditional Branch...
     BasicBlock* tmpBB = getBBVal(yyvsp[0].ValIDVal);
     CHECK_FOR_ERROR
     yyval.TermInstVal = new BranchInst(tmpBB);
   ;
     break;}
-case 206:
-#line 2239 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+case 207:
+#line 2245 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {  
     BasicBlock* tmpBBA = getBBVal(yyvsp[-3].ValIDVal);
     CHECK_FOR_ERROR
@@ -3819,8 +3834,8 @@
     yyval.TermInstVal = new BranchInst(tmpBBA, tmpBBB, tmpVal);
   ;
     break;}
-case 207:
-#line 2248 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+case 208:
+#line 2254 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     Value* tmpVal = getVal(yyvsp[-7].PrimType, yyvsp[-6].ValIDVal);
     CHECK_FOR_ERROR
@@ -3841,8 +3856,8 @@
     CHECK_FOR_ERROR
   ;
     break;}
-case 208:
-#line 2267 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+case 209:
+#line 2273 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     Value* tmpVal = getVal(yyvsp[-6].PrimType, yyvsp[-5].ValIDVal);
     CHECK_FOR_ERROR
@@ -3853,8 +3868,8 @@
     CHECK_FOR_ERROR
   ;
     break;}
-case 209:
-#line 2277 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+case 210:
+#line 2283 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     const PointerType *PFTy;
     const FunctionType *Ty;
@@ -3911,22 +3926,22 @@
     CHECK_FOR_ERROR
   ;
     break;}
-case 210:
-#line 2332 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+case 211:
+#line 2338 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     yyval.TermInstVal = new UnwindInst();
     CHECK_FOR_ERROR
   ;
     break;}
-case 211:
-#line 2336 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+case 212:
+#line 2342 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     yyval.TermInstVal = new UnreachableInst();
     CHECK_FOR_ERROR
   ;
     break;}
-case 212:
-#line 2343 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+case 213:
+#line 2349 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     yyval.JumpTable = yyvsp[-5].JumpTable;
     Constant *V = cast(getValNonImprovising(yyvsp[-4].PrimType, yyvsp[-3].ValIDVal));
@@ -3939,8 +3954,8 @@
     yyval.JumpTable->push_back(std::make_pair(V, tmpBB));
   ;
     break;}
-case 213:
-#line 2354 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+case 214:
+#line 2360 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     yyval.JumpTable = new std::vector >();
     Constant *V = cast(getValNonImprovising(yyvsp[-4].PrimType, yyvsp[-3].ValIDVal));
@@ -3954,8 +3969,8 @@
     yyval.JumpTable->push_back(std::make_pair(V, tmpBB)); 
   ;
     break;}
-case 214:
-#line 2367 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+case 215:
+#line 2373 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
   // Is this definition named?? if so, assign the name...
   setValueName(yyvsp[0].InstVal, yyvsp[-1].StrVal);
@@ -3965,8 +3980,8 @@
   CHECK_FOR_ERROR
 ;
     break;}
-case 215:
-#line 2376 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+case 216:
+#line 2382 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {    // Used for PHI nodes
     yyval.PHIList = new std::list >();
     Value* tmpVal = getVal(*yyvsp[-5].TypeVal, yyvsp[-3].ValIDVal);
@@ -3977,8 +3992,8 @@
     delete yyvsp[-5].TypeVal;
   ;
     break;}
-case 216:
-#line 2385 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+case 217:
+#line 2391 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     yyval.PHIList = yyvsp[-6].PHIList;
     Value* tmpVal = getVal(yyvsp[-6].PHIList->front().first->getType(), yyvsp[-3].ValIDVal);
@@ -3988,41 +4003,41 @@
     yyvsp[-6].PHIList->push_back(std::make_pair(tmpVal, tmpBB));
   ;
     break;}
-case 217:
-#line 2395 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+case 218:
+#line 2401 "/Users/resistor/llvm/src/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 218:
-#line 2399 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+case 219:
+#line 2405 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     yyval.ValueList = yyvsp[-2].ValueList;
     yyvsp[-2].ValueList->push_back(yyvsp[0].ValueVal);
     CHECK_FOR_ERROR
   ;
     break;}
-case 220:
-#line 2406 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+case 221:
+#line 2412 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 { yyval.ValueList = 0; ;
     break;}
-case 221:
-#line 2408 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+case 222:
+#line 2414 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     yyval.BoolVal = true;
     CHECK_FOR_ERROR
   ;
     break;}
-case 222:
-#line 2412 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+case 223:
+#line 2418 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     yyval.BoolVal = false;
     CHECK_FOR_ERROR
   ;
     break;}
-case 223:
-#line 2417 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+case 224:
+#line 2423 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     if (!(*yyvsp[-3].TypeVal)->isInteger() && !(*yyvsp[-3].TypeVal)->isFloatingPoint() && 
         !isa((*yyvsp[-3].TypeVal).get()))
@@ -4040,8 +4055,8 @@
     delete yyvsp[-3].TypeVal;
   ;
     break;}
-case 224:
-#line 2433 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+case 225:
+#line 2439 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     if (!(*yyvsp[-3].TypeVal)->isIntegral()) {
       if (!isa(yyvsp[-3].TypeVal->get()) ||
@@ -4058,8 +4073,8 @@
     delete yyvsp[-3].TypeVal;
   ;
     break;}
-case 225:
-#line 2448 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+case 226:
+#line 2454 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     if(isa((*yyvsp[-3].TypeVal).get())) {
       GEN_ERROR(
@@ -4075,8 +4090,8 @@
     delete yyvsp[-3].TypeVal;
   ;
     break;}
-case 226:
-#line 2462 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+case 227:
+#line 2468 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     std::cerr << "WARNING: Use of eliminated 'not' instruction:"
               << " Replacing with 'xor'.\n";
@@ -4091,8 +4106,8 @@
     CHECK_FOR_ERROR
   ;
     break;}
-case 227:
-#line 2475 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+case 228:
+#line 2481 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     if (yyvsp[0].ValueVal->getType() != Type::UByteTy)
       GEN_ERROR("Shift amount must be ubyte!");
@@ -4102,8 +4117,8 @@
     CHECK_FOR_ERROR
   ;
     break;}
-case 228:
-#line 2483 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+case 229:
+#line 2489 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     if (!yyvsp[0].TypeVal->get()->isFirstClassType())
       GEN_ERROR("cast instruction to a non-primitive type: '" +
@@ -4113,8 +4128,8 @@
     CHECK_FOR_ERROR
   ;
     break;}
-case 229:
-#line 2491 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+case 230:
+#line 2497 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     if (yyvsp[-4].ValueVal->getType() != Type::BoolTy)
       GEN_ERROR("select condition must be boolean!");
@@ -4124,8 +4139,8 @@
     CHECK_FOR_ERROR
   ;
     break;}
-case 230:
-#line 2499 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+case 231:
+#line 2505 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     NewVarArgs = true;
     yyval.InstVal = new VAArgInst(yyvsp[-2].ValueVal, *yyvsp[0].TypeVal);
@@ -4133,8 +4148,8 @@
     CHECK_FOR_ERROR
   ;
     break;}
-case 231:
-#line 2505 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+case 232:
+#line 2511 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     ObsoleteVarArgs = true;
     const Type* ArgTy = yyvsp[-2].ValueVal->getType();
@@ -4156,8 +4171,8 @@
     CHECK_FOR_ERROR
   ;
     break;}
-case 232:
-#line 2525 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+case 233:
+#line 2531 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     ObsoleteVarArgs = true;
     const Type* ArgTy = yyvsp[-2].ValueVal->getType();
@@ -4182,8 +4197,8 @@
     CHECK_FOR_ERROR
   ;
     break;}
-case 233:
-#line 2548 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+case 234:
+#line 2554 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     if (!ExtractElementInst::isValidOperands(yyvsp[-2].ValueVal, yyvsp[0].ValueVal))
       GEN_ERROR("Invalid extractelement operands!");
@@ -4191,8 +4206,8 @@
     CHECK_FOR_ERROR
   ;
     break;}
-case 234:
-#line 2554 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+case 235:
+#line 2560 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     if (!InsertElementInst::isValidOperands(yyvsp[-4].ValueVal, yyvsp[-2].ValueVal, yyvsp[0].ValueVal))
       GEN_ERROR("Invalid insertelement operands!");
@@ -4200,8 +4215,8 @@
     CHECK_FOR_ERROR
   ;
     break;}
-case 235:
-#line 2560 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+case 236:
+#line 2566 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     if (!ShuffleVectorInst::isValidOperands(yyvsp[-4].ValueVal, yyvsp[-2].ValueVal, yyvsp[0].ValueVal))
       GEN_ERROR("Invalid shufflevector operands!");
@@ -4209,8 +4224,8 @@
     CHECK_FOR_ERROR
   ;
     break;}
-case 236:
-#line 2566 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+case 237:
+#line 2572 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     const Type *Ty = yyvsp[0].PHIList->front().first->getType();
     if (!Ty->isFirstClassType())
@@ -4227,8 +4242,8 @@
     CHECK_FOR_ERROR
   ;
     break;}
-case 237:
-#line 2581 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+case 238:
+#line 2587 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     const PointerType *PFTy;
     const FunctionType *Ty;
@@ -4289,51 +4304,51 @@
     CHECK_FOR_ERROR
   ;
     break;}
-case 238:
-#line 2640 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+case 239:
+#line 2646 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     yyval.InstVal = yyvsp[0].InstVal;
     CHECK_FOR_ERROR
   ;
     break;}
-case 239:
-#line 2647 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+case 240:
+#line 2653 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 { 
     yyval.ValueList = yyvsp[0].ValueList; 
     CHECK_FOR_ERROR
   ;
     break;}
-case 240:
-#line 2650 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+case 241:
+#line 2656 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 { 
     yyval.ValueList = new std::vector(); 
     CHECK_FOR_ERROR
   ;
     break;}
-case 241:
-#line 2655 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+case 242:
+#line 2661 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     yyval.BoolVal = true;
     CHECK_FOR_ERROR
   ;
     break;}
-case 242:
-#line 2659 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+case 243:
+#line 2665 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     yyval.BoolVal = false;
     CHECK_FOR_ERROR
   ;
     break;}
-case 243:
-#line 2666 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+case 244:
+#line 2672 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     yyval.InstVal = new MallocInst(*yyvsp[-1].TypeVal, 0, yyvsp[0].UIntVal);
     delete yyvsp[-1].TypeVal;
     CHECK_FOR_ERROR
   ;
     break;}
-case 244:
-#line 2671 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+case 245:
+#line 2677 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     Value* tmpVal = getVal(yyvsp[-2].PrimType, yyvsp[-1].ValIDVal);
     CHECK_FOR_ERROR
@@ -4341,16 +4356,16 @@
     delete yyvsp[-4].TypeVal;
   ;
     break;}
-case 245:
-#line 2677 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+case 246:
+#line 2683 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     yyval.InstVal = new AllocaInst(*yyvsp[-1].TypeVal, 0, yyvsp[0].UIntVal);
     delete yyvsp[-1].TypeVal;
     CHECK_FOR_ERROR
   ;
     break;}
-case 246:
-#line 2682 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+case 247:
+#line 2688 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     Value* tmpVal = getVal(yyvsp[-2].PrimType, yyvsp[-1].ValIDVal);
     CHECK_FOR_ERROR
@@ -4358,8 +4373,8 @@
     delete yyvsp[-4].TypeVal;
   ;
     break;}
-case 247:
-#line 2688 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+case 248:
+#line 2694 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     if (!isa(yyvsp[0].ValueVal->getType()))
       GEN_ERROR("Trying to free nonpointer type " + 
@@ -4368,8 +4383,8 @@
     CHECK_FOR_ERROR
   ;
     break;}
-case 248:
-#line 2696 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+case 249:
+#line 2702 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     if (!isa(yyvsp[-1].TypeVal->get()))
       GEN_ERROR("Can't load from nonpointer type: " +
@@ -4383,8 +4398,8 @@
     delete yyvsp[-1].TypeVal;
   ;
     break;}
-case 249:
-#line 2708 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+case 250:
+#line 2714 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     const PointerType *PT = dyn_cast(yyvsp[-1].TypeVal->get());
     if (!PT)
@@ -4401,8 +4416,8 @@
     delete yyvsp[-1].TypeVal;
   ;
     break;}
-case 250:
-#line 2723 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+case 251:
+#line 2729 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 {
     if (!isa(yyvsp[-2].TypeVal->get()))
       GEN_ERROR("getelementptr insn requires pointer operand!");
@@ -4650,7 +4665,7 @@
     }
   return 1;
 }
-#line 2749 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2755 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
 
 
 void llvm::GenerateError(const std::string &message, int LineNo) {


Index: llvm/lib/AsmParser/llvmAsmParser.h.cvs
diff -u llvm/lib/AsmParser/llvmAsmParser.h.cvs:1.12 llvm/lib/AsmParser/llvmAsmParser.h.cvs:1.13
--- llvm/lib/AsmParser/llvmAsmParser.h.cvs:1.12	Sun Oct 15 18:27:25 2006
+++ llvm/lib/AsmParser/llvmAsmParser.h.cvs	Tue Oct 17 21:21:48 2006
@@ -105,43 +105,44 @@
 #define	COLDCC_TOK	322
 #define	X86_STDCALLCC_TOK	323
 #define	X86_FASTCALLCC_TOK	324
-#define	RET	325
-#define	BR	326
-#define	SWITCH	327
-#define	INVOKE	328
-#define	UNWIND	329
-#define	UNREACHABLE	330
-#define	ADD	331
-#define	SUB	332
-#define	MUL	333
-#define	DIV	334
-#define	REM	335
-#define	AND	336
-#define	OR	337
-#define	XOR	338
-#define	SETLE	339
-#define	SETGE	340
-#define	SETLT	341
-#define	SETGT	342
-#define	SETEQ	343
-#define	SETNE	344
-#define	MALLOC	345
-#define	ALLOCA	346
-#define	FREE	347
-#define	LOAD	348
-#define	STORE	349
-#define	GETELEMENTPTR	350
-#define	PHI_TOK	351
-#define	CAST	352
-#define	SELECT	353
-#define	SHL	354
-#define	SHR	355
-#define	VAARG	356
-#define	EXTRACTELEMENT	357
-#define	INSERTELEMENT	358
-#define	SHUFFLEVECTOR	359
-#define	VAARG_old	360
-#define	VANEXT_old	361
+#define	DATA	325
+#define	RET	326
+#define	BR	327
+#define	SWITCH	328
+#define	INVOKE	329
+#define	UNWIND	330
+#define	UNREACHABLE	331
+#define	ADD	332
+#define	SUB	333
+#define	MUL	334
+#define	DIV	335
+#define	REM	336
+#define	AND	337
+#define	OR	338
+#define	XOR	339
+#define	SETLE	340
+#define	SETGE	341
+#define	SETLT	342
+#define	SETGT	343
+#define	SETEQ	344
+#define	SETNE	345
+#define	MALLOC	346
+#define	ALLOCA	347
+#define	FREE	348
+#define	LOAD	349
+#define	STORE	350
+#define	GETELEMENTPTR	351
+#define	PHI_TOK	352
+#define	CAST	353
+#define	SELECT	354
+#define	SHL	355
+#define	SHR	356
+#define	VAARG	357
+#define	EXTRACTELEMENT	358
+#define	INSERTELEMENT	359
+#define	SHUFFLEVECTOR	360
+#define	VAARG_old	361
+#define	VANEXT_old	362
 
 
 extern YYSTYPE llvmAsmlval;


Index: llvm/lib/AsmParser/llvmAsmParser.y.cvs
diff -u llvm/lib/AsmParser/llvmAsmParser.y.cvs:1.17 llvm/lib/AsmParser/llvmAsmParser.y.cvs:1.18
--- llvm/lib/AsmParser/llvmAsmParser.y.cvs:1.17	Sun Oct 15 18:27:25 2006
+++ llvm/lib/AsmParser/llvmAsmParser.y.cvs	Tue Oct 17 21:21:48 2006
@@ -1068,6 +1068,7 @@
 %token DEPLIBS CALL TAIL ASM_TOK MODULE SIDEEFFECT
 %token CC_TOK CCC_TOK CSRETCC_TOK FASTCC_TOK COLDCC_TOK
 %token X86_STDCALLCC_TOK X86_FASTCALLCC_TOK
+%token DATA
 %type  OptCallingConv
 
 // Basic Block Terminating Operators
@@ -1873,6 +1874,11 @@
     free($3);
     CHECK_FOR_ERROR
   };
+  | DATA '=' STRINGCONSTANT {
+    CurModule.CurrentModule->setDataLayout($3);
+    free($3);
+    CHECK_FOR_ERROR
+  };
 
 LibrariesDefinition : '[' LibList ']';
 





From rspencer at reidspencer.com  Tue Oct 17 21:28:16 2006
From: rspencer at reidspencer.com (Reid Spencer)
Date: Tue, 17 Oct 2006 19:28:16 -0700
Subject: [llvm-commits] CVS: llvm/lib/AsmParser/llvmAsmParser.y Lexer.l
In-Reply-To: <200610180220.k9I2K9BE032160@zion.cs.uiuc.edu>
References: <200610180220.k9I2K9BE032160@zion.cs.uiuc.edu>
Message-ID: <1161138496.29146.18.camel@bashful.x10sys.com>

Owen,

Some comments ..

On Tue, 2006-10-17 at 21:20 -0500, Owen Anderson wrote:
> 
> Changes in directory llvm/lib/AsmParser:
> 
> llvmAsmParser.y updated: 1.265 -> 1.266
> Lexer.l updated: 1.77 -> 1.78
> ---
> Log message:
> 
> Add support for the new "target data" information in .ll files.  This provides 
> a better encoding of the targets data layout, rather than trying to guess it
> from the endianness and pointersize like before.
> 
> 
> ---
> Diffs of the changes:  (+7 -0)
> 
>  Lexer.l         |    1 +
>  llvmAsmParser.y |    6 ++++++
>  2 files changed, 7 insertions(+)
> 
> 
> Index: llvm/lib/AsmParser/llvmAsmParser.y
> diff -u llvm/lib/AsmParser/llvmAsmParser.y:1.265 llvm/lib/AsmParser/llvmAsmParser.y:1.266
> --- llvm/lib/AsmParser/llvmAsmParser.y:1.265	Sun Oct 15 18:26:46 2006
> +++ llvm/lib/AsmParser/llvmAsmParser.y	Tue Oct 17 21:19:55 2006
> @@ -1068,6 +1068,7 @@
>  %token DEPLIBS CALL TAIL ASM_TOK MODULE SIDEEFFECT
>  %token CC_TOK CCC_TOK CSRETCC_TOK FASTCC_TOK COLDCC_TOK
>  %token X86_STDCALLCC_TOK X86_FASTCALLCC_TOK
> +%token DATA

The word "Data" is somewhat bland. Since the method on Module is
"setDataLayout" can we make this "DataLayout" instead?  I'd like this to
be a bit more specific.

Chris: your thoughts?

>  %type  OptCallingConv
>  
>  // Basic Block Terminating Operators
> @@ -1873,6 +1874,11 @@
>      free($3);
>      CHECK_FOR_ERROR
>    };
> +  | DATA '=' STRINGCONSTANT {
> +    CurModule.CurrentModule->setDataLayout($3);
> +    free($3);
> +    CHECK_FOR_ERROR

I don't think you need a CHECK_FOR_ERROR here. Neither of the two
preceding calls will call GENERATE_ERROR.

> +  };
>  
>  LibrariesDefinition : '[' LibList ']';
>  
> 
> 
> Index: llvm/lib/AsmParser/Lexer.l
> diff -u llvm/lib/AsmParser/Lexer.l:1.77 llvm/lib/AsmParser/Lexer.l:1.78
> --- llvm/lib/AsmParser/Lexer.l:1.77	Sun Sep 17 15:25:45 2006
> +++ llvm/lib/AsmParser/Lexer.l	Tue Oct 17 21:19:55 2006
> @@ -210,6 +210,7 @@
>  deplibs         { return DEPLIBS; }
>  endian          { return ENDIAN; }
>  pointersize     { return POINTERSIZE; }
> +data          { return DATA; }

Same comment as above .. perhaps datalayout ?

>  little          { return LITTLE; }
>  big             { return BIG; }
>  volatile        { return VOLATILE; }
> 
> 
> 
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits



From resistor at mac.com  Wed Oct 18 00:50:26 2006
From: resistor at mac.com (Owen Anderson)
Date: Wed, 18 Oct 2006 00:50:26 -0500
Subject: [llvm-commits] CVS: llvm/docs/Lexicon.html
Message-ID: <200610180550.k9I5oQtu003078@zion.cs.uiuc.edu>



Changes in directory llvm/docs:

Lexicon.html updated: 1.14 -> 1.15
---
Log message:

Add LCSSA to the LLVM lexicon.


---
Diffs of the changes:  (+4 -1)

 Lexicon.html |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletion(-)


Index: llvm/docs/Lexicon.html
diff -u llvm/docs/Lexicon.html:1.14 llvm/docs/Lexicon.html:1.15
--- llvm/docs/Lexicon.html:1.14	Mon Mar 13 23:39:39 2006
+++ llvm/docs/Lexicon.html	Wed Oct 18 00:50:12 2006
@@ -40,6 +40,7 @@
     
     - L -
     
+      LCSSA
       LICM
       Load-VN
     
@@ -121,6 +122,8 @@
 
 
+
LCSSA
+
Loop-Closed Static Single Assignment Form
LICM
Loop Invariant Code Motion
Load-VN
@@ -170,7 +173,7 @@ src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01!">The LLVM Team
The LLVM Compiler Infrastructure
-Last modified: $Date: 2006/03/14 05:39:39 $ +Last modified: $Date: 2006/10/18 05:50:12 $ From asl at math.spbu.ru Wed Oct 18 04:12:43 2006 From: asl at math.spbu.ru (Anton Korobeynikov) Date: Wed, 18 Oct 2006 04:12:43 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86ATTAsmPrinter.cpp X86AsmPrinter.cpp Message-ID: <200610180912.k9I9Ch8A015472@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: X86ATTAsmPrinter.cpp updated: 1.68 -> 1.69 X86AsmPrinter.cpp updated: 1.202 -> 1.203 --- Log message: Fixed mingw\cygwin linkonce linkage once again. Added workaround for linker bug with linkonce sections. Changed sections prefix to allow linker merge them (PE loader doesn't like too much long-named sections :) ) All of this unbreaks libstdc++ on mingw32 allowing (small) programs to be compiled, linked and run. --- Diffs of the changes: (+9 -27) X86ATTAsmPrinter.cpp | 20 +++++++------------- X86AsmPrinter.cpp | 16 ++-------------- 2 files changed, 9 insertions(+), 27 deletions(-) Index: llvm/lib/Target/X86/X86ATTAsmPrinter.cpp diff -u llvm/lib/Target/X86/X86ATTAsmPrinter.cpp:1.68 llvm/lib/Target/X86/X86ATTAsmPrinter.cpp:1.69 --- llvm/lib/Target/X86/X86ATTAsmPrinter.cpp:1.68 Tue Oct 17 15:29:49 2006 +++ llvm/lib/Target/X86/X86ATTAsmPrinter.cpp Wed Oct 18 04:12:29 2006 @@ -40,7 +40,7 @@ if (Subtarget->isTargetDarwin()) { return ".section __TEXT,__textcoal_nt,coalesced,pure_instructions"; } else if (Subtarget->isTargetCygwin()) { - return "\t.section\t.llvm.linkonce.t." + CurrentFnName + ",\"ax\"\n"; + return "\t.section\t.text$linkonce." + CurrentFnName + ",\"ax\"\n"; } else { return "\t.section\t.llvm.linkonce.t." + CurrentFnName + ",\"ax\", at progbits\n"; @@ -90,6 +90,7 @@ O << "\t.globl\t" << CurrentFnName << "\n"; break; case Function::LinkOnceLinkage: + case Function::WeakLinkage: if (Subtarget->isTargetDarwin()) { O << "\t.globl\t" << CurrentFnName << "\n"; O << "\t.weak_definition\t" << CurrentFnName << "\n"; @@ -102,20 +103,13 @@ O << "\t.weak " << CurrentFnName << "\n"; } break; - case Function::WeakLinkage: - if (Subtarget->isTargetDarwin()) { - O << "\t.globl\t" << CurrentFnName << "\n"; - O << "\t.weak_definition\t" << CurrentFnName << "\n"; - } else if (Subtarget->isTargetCygwin()) { - EmitAlignment(4, F); // FIXME: This should be parameterized somewhere. - O << "\t.weak " << CurrentFnName << "\n"; - } else { - EmitAlignment(4, F); // FIXME: This should be parameterized somewhere. - O << "\t.weak " << CurrentFnName << "\n"; - } - break; } O << CurrentFnName << ":\n"; + // Add some workaround for linkonce linkage on Cygwin\MinGW + if (Subtarget->isTargetCygwin() && + (F->getLinkage() == Function::LinkOnceLinkage || + F->getLinkage() == Function::WeakLinkage)) + O << "_llvm$workaround$fake$stub_" << CurrentFnName << ":\n"; if (Subtarget->isTargetDarwin()) { // Emit pre-function debug information. Index: llvm/lib/Target/X86/X86AsmPrinter.cpp diff -u llvm/lib/Target/X86/X86AsmPrinter.cpp:1.202 llvm/lib/Target/X86/X86AsmPrinter.cpp:1.203 --- llvm/lib/Target/X86/X86AsmPrinter.cpp:1.202 Tue Oct 17 15:29:49 2006 +++ llvm/lib/Target/X86/X86AsmPrinter.cpp Wed Oct 18 04:12:29 2006 @@ -174,12 +174,13 @@ } else { switch (I->getLinkage()) { case GlobalValue::LinkOnceLinkage: + case GlobalValue::WeakLinkage: if (Subtarget->isTargetDarwin()) { O << "\t.globl " << name << "\n" << "\t.weak_definition " << name << "\n"; SwitchToDataSection(".section __DATA,__const_coal,coalesced", I); } else if (Subtarget->isTargetCygwin()) { - O << "\t.section\t.llvm.linkonce.d." << name << ",\"aw\"\n" + O << "\t.section\t.data$linkonce." << name << ",\"aw\"\n" << "\t.globl " << name << "\n" << "\t.linkonce same_size\n"; } else { @@ -187,19 +188,6 @@ << "\t.weak " << name << "\n"; } break; - case GlobalValue::WeakLinkage: - if (Subtarget->isTargetDarwin()) { - O << "\t.globl " << name << "\n" - << "\t.weak_definition " << name << "\n"; - SwitchToDataSection(".section __DATA,__const_coal,coalesced", I); - } else if (Subtarget->isTargetCygwin()) { - O << "\t.section\t.llvm.linkonce.d." << name << ",\"aw\"\n" - << "\t.weak " << name << "\n"; - } else { - O << "\t.section\t.llvm.linkonce.d." << name << ",\"aw\", at progbits\n" - << "\t.weak " << name << "\n"; - } - break; case GlobalValue::AppendingLinkage: // FIXME: appending linkage variables should go into a section of // their name or something. For now, just emit them as external. From rafael.espindola at gmail.com Wed Oct 18 07:03:22 2006 From: rafael.espindola at gmail.com (Rafael Espindola) Date: Wed, 18 Oct 2006 07:03:22 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp Message-ID: <200610181203.k9IC3Mmo018038@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/ARM: ARMISelDAGToDAG.cpp updated: 1.73 -> 1.74 --- Log message: implement CallingConv::Fast as CallingConv::C --- Diffs of the changes: (+3 -1) ARMISelDAGToDAG.cpp | 4 +++- 1 files changed, 3 insertions(+), 1 deletion(-) Index: llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp diff -u llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp:1.73 llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp:1.74 --- llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp:1.73 Tue Oct 17 16:05:33 2006 +++ llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp Wed Oct 18 07:03:07 2006 @@ -294,7 +294,9 @@ static SDOperand LowerCALL(SDOperand Op, SelectionDAG &DAG) { SDOperand Chain = Op.getOperand(0); unsigned CallConv = cast(Op.getOperand(1))->getValue(); - assert(CallConv == CallingConv::C && "unknown calling convention"); + assert((CallConv == CallingConv::C || + CallConv == CallingConv::Fast) + && "unknown calling convention"); bool isVarArg = cast(Op.getOperand(2))->getValue() != 0; bool isTailCall = cast(Op.getOperand(3))->getValue() != 0; SDOperand Callee = Op.getOperand(4); From rafael.espindola at gmail.com Wed Oct 18 07:03:23 2006 From: rafael.espindola at gmail.com (Rafael Espindola) Date: Wed, 18 Oct 2006 07:03:23 -0500 Subject: [llvm-commits] CVS: llvm/test/Regression/CodeGen/ARM/call.ll Message-ID: <200610181203.k9IC3N1J018043@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/CodeGen/ARM: call.ll updated: 1.2 -> 1.3 --- Log message: implement CallingConv::Fast as CallingConv::C --- Diffs of the changes: (+2 -2) call.ll | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/test/Regression/CodeGen/ARM/call.ll diff -u llvm/test/Regression/CodeGen/ARM/call.ll:1.2 llvm/test/Regression/CodeGen/ARM/call.ll:1.3 --- llvm/test/Regression/CodeGen/ARM/call.ll:1.2 Fri Oct 6 12:26:30 2006 +++ llvm/test/Regression/CodeGen/ARM/call.ll Wed Oct 18 07:03:07 2006 @@ -2,9 +2,9 @@ void %f() { entry: call void %g( int 1, int 2, int 3, int 4 ) - call void %h() + call fastcc void %h() ret void } declare void %g(int, int, int, int) -declare void %h() +declare fastcc void %h() From jlaskey at apple.com Wed Oct 18 07:30:11 2006 From: jlaskey at apple.com (Jim Laskey) Date: Wed, 18 Oct 2006 07:30:11 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Message-ID: <200610181230.k9ICUBnq018454@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/SelectionDAG: DAGCombiner.cpp updated: 1.229 -> 1.230 --- Log message: Use global info for alias analysis. --- Diffs of the changes: (+38 -9) DAGCombiner.cpp | 47 ++++++++++++++++++++++++++++++++++++++--------- 1 files changed, 38 insertions(+), 9 deletions(-) Index: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp diff -u llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.229 llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.230 --- llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.229 Tue Oct 17 16:24:15 2006 +++ llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Wed Oct 18 07:29:57 2006 @@ -256,10 +256,18 @@ void GatherAllAliases(SDNode *N, SDOperand OriginalChain, SmallVector &Aliases); + /// isAlias - Return true if there is any possibility that the two addresses + /// overlap. + bool isAlias(SDOperand Ptr1, int64_t Size1, + const Value *SrcValue1, int SrcValueOffset1, + SDOperand Ptr2, int64_t Size2, + const Value *SrcValue2, int SrcValueOffset1); + /// FindAliasInfo - Extracts the relevant alias information from the memory /// node. Returns true if the operand was a load. bool FindAliasInfo(SDNode *N, - SDOperand &Ptr, int64_t &Size, const Value *&SrcValue); + SDOperand &Ptr, int64_t &Size, + const Value *&SrcValue, int &SrcValueOffset); /// FindBetterChain - Walk up chain skipping non-aliasing memory nodes, /// looking for a better chain (aliasing node.) @@ -4005,8 +4013,11 @@ /// isAlias - Return true if there is any possibility that the two addresses /// overlap. -static bool isAlias(SDOperand Ptr1, int64_t Size1, const Value *SrcValue1, - SDOperand Ptr2, int64_t Size2, const Value *SrcValue2) { +bool DAGCombiner::isAlias(SDOperand Ptr1, int64_t Size1, + const Value *SrcValue1, int SrcValueOffset1, + SDOperand Ptr2, int64_t Size2, + const Value *SrcValue2, int SrcValueOffset2) +{ // If they are the same then they must be aliases. if (Ptr1 == Ptr2) return true; @@ -4022,23 +4033,37 @@ return!((Offset1 + Size1) <= Offset2 || (Offset2 + Size2) <= Offset1); } - // Otherwise they alias if either is unknown. - return !KnownBase1 || !KnownBase2; + // If we know both bases then they can't alias. + if (KnownBase1 && KnownBase2) return false; + + // Use alias analysis information. + int Overlap1 = Size1 + SrcValueOffset1 + Offset1; + int Overlap2 = Size2 + SrcValueOffset2 + Offset2; + AliasAnalysis::AliasResult AAResult = + AA.alias(SrcValue1, Overlap1, SrcValue2, Overlap2); + if (AAResult == AliasAnalysis::NoAlias) + return false; + + // Otherwise we have to assume they alias. + return true; } /// FindAliasInfo - Extracts the relevant alias information from the memory /// node. Returns true if the operand was a load. bool DAGCombiner::FindAliasInfo(SDNode *N, - SDOperand &Ptr, int64_t &Size, const Value *&SrcValue) { + SDOperand &Ptr, int64_t &Size, + const Value *&SrcValue, int &SrcValueOffset) { if (LoadSDNode *LD = dyn_cast(N)) { Ptr = LD->getBasePtr(); Size = MVT::getSizeInBits(LD->getLoadedVT()) >> 3; SrcValue = LD->getSrcValue(); + SrcValueOffset = LD->getSrcValueOffset(); return true; } else if (StoreSDNode *ST = dyn_cast(N)) { Ptr = ST->getBasePtr(); Size = MVT::getSizeInBits(ST->getStoredVT()) >> 3; SrcValue = ST->getSrcValue(); + SrcValueOffset = ST->getSrcValueOffset(); } else { assert(0 && "FindAliasInfo expected a memory operand"); } @@ -4057,7 +4082,8 @@ SDOperand Ptr; int64_t Size; const Value *SrcValue; - bool IsLoad = FindAliasInfo(N, Ptr, Size, SrcValue); + int SrcValueOffset; + bool IsLoad = FindAliasInfo(N, Ptr, Size, SrcValue, SrcValueOffset); // Starting off. Chains.push_back(OriginalChain); @@ -4084,11 +4110,14 @@ SDOperand OpPtr; int64_t OpSize; const Value *OpSrcValue; - bool IsOpLoad = FindAliasInfo(Chain.Val, OpPtr, OpSize, OpSrcValue); + int OpSrcValueOffset; + bool IsOpLoad = FindAliasInfo(Chain.Val, OpPtr, OpSize, + OpSrcValue, OpSrcValueOffset); // If chain is alias then stop here. if (!(IsLoad && IsOpLoad) && - isAlias(Ptr, Size, SrcValue, OpPtr, OpSize, OpSrcValue)) { + isAlias(Ptr, Size, SrcValue, SrcValueOffset, + OpPtr, OpSize, OpSrcValue, OpSrcValueOffset)) { Aliases.push_back(Chain); } else { // Look further up the chain. From rafael.espindola at gmail.com Wed Oct 18 11:21:11 2006 From: rafael.espindola at gmail.com (Rafael Espindola) Date: Wed, 18 Oct 2006 11:21:11 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/ARM/ARMInstrInfo.td Message-ID: <200610181621.k9IGLBps022253@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/ARM: ARMInstrInfo.td updated: 1.64 -> 1.65 --- Log message: add isTerminatortto b and bcond --- Diffs of the changes: (+9 -7) ARMInstrInfo.td | 16 +++++++++------- 1 files changed, 9 insertions(+), 7 deletions(-) Index: llvm/lib/Target/ARM/ARMInstrInfo.td diff -u llvm/lib/Target/ARM/ARMInstrInfo.td:1.64 llvm/lib/Target/ARM/ARMInstrInfo.td:1.65 --- llvm/lib/Target/ARM/ARMInstrInfo.td:1.64 Tue Oct 17 15:45:22 2006 +++ llvm/lib/Target/ARM/ARMInstrInfo.td Wed Oct 18 11:20:57 2006 @@ -210,13 +210,15 @@ def UMULL : IntBinOp<"umull r12,", mulhu>; } -def bcond : InstARM<(ops brtarget:$dst, CCOp:$cc), - "b$cc $dst", - [(armbr bb:$dst, imm:$cc)]>; - -def b : InstARM<(ops brtarget:$dst), - "b $dst", - [(br bb:$dst)]>; +let isTerminator = 1 in { + def bcond : InstARM<(ops brtarget:$dst, CCOp:$cc), + "b$cc $dst", + [(armbr bb:$dst, imm:$cc)]>; + + def b : InstARM<(ops brtarget:$dst), + "b $dst", + [(br bb:$dst)]>; +} def cmp : InstARM<(ops IntRegs:$a, op_addr_mode1:$b), "cmp $a, $b", From rafael.espindola at gmail.com Wed Oct 18 11:22:00 2006 From: rafael.espindola at gmail.com (Rafael Espindola) Date: Wed, 18 Oct 2006 11:22:00 -0500 Subject: [llvm-commits] CVS: llvm/test/Regression/CodeGen/ARM/call.ll Message-ID: <200610181622.k9IGM0p1022291@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/CodeGen/ARM: call.ll updated: 1.3 -> 1.4 --- Log message: add blx --- Diffs of the changes: (+11 -1) call.ll | 12 +++++++++++- 1 files changed, 11 insertions(+), 1 deletion(-) Index: llvm/test/Regression/CodeGen/ARM/call.ll diff -u llvm/test/Regression/CodeGen/ARM/call.ll:1.3 llvm/test/Regression/CodeGen/ARM/call.ll:1.4 --- llvm/test/Regression/CodeGen/ARM/call.ll:1.3 Wed Oct 18 07:03:07 2006 +++ llvm/test/Regression/CodeGen/ARM/call.ll Wed Oct 18 11:21:43 2006 @@ -1,4 +1,7 @@ -; RUN: llvm-as < %s | llc -march=arm +; RUN: llvm-as < %s | llc -march=arm && +; RUN: llvm-as < %s | llc -march=arm | grep bl && +; RUN: llvm-as < %s | llc -march=arm | grep blx + void %f() { entry: call void %g( int 1, int 2, int 3, int 4 ) @@ -8,3 +11,10 @@ declare void %g(int, int, int, int) declare fastcc void %h() + +void %g(void (...)* %g) { +entry: + %g_c = cast void (...)* %g to void ()* + call void %g_c( ) + ret void +} From rafael.espindola at gmail.com Wed Oct 18 11:21:59 2006 From: rafael.espindola at gmail.com (Rafael Espindola) Date: Wed, 18 Oct 2006 11:21:59 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/ARM/ARMInstrInfo.td Message-ID: <200610181621.k9IGLx72022286@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/ARM: ARMInstrInfo.td updated: 1.65 -> 1.66 --- Log message: add blx --- Diffs of the changes: (+1 -0) ARMInstrInfo.td | 1 + 1 files changed, 1 insertion(+) Index: llvm/lib/Target/ARM/ARMInstrInfo.td diff -u llvm/lib/Target/ARM/ARMInstrInfo.td:1.65 llvm/lib/Target/ARM/ARMInstrInfo.td:1.66 --- llvm/lib/Target/ARM/ARMInstrInfo.td:1.65 Wed Oct 18 11:20:57 2006 +++ llvm/lib/Target/ARM/ARMInstrInfo.td Wed Oct 18 11:21:43 2006 @@ -149,6 +149,7 @@ let noResults = 1, Defs = [R0, R1, R2, R3, R14] in { def bl: InstARM<(ops i32imm:$func, variable_ops), "bl $func", []>; + def blx : InstARM<(ops IntRegs:$func, variable_ops), "blx $func", [(ARMcall IntRegs:$func)]>; } def ldr : InstARM<(ops IntRegs:$dst, memri:$addr), From sabre at nondot.org Wed Oct 18 12:04:23 2006 From: sabre at nondot.org (Chris Lattner) Date: Wed, 18 Oct 2006 12:04:23 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/README-SSE.txt Message-ID: <200610181704.k9IH4NKS023080@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: README-SSE.txt updated: 1.6 -> 1.7 --- Log message: add a note --- Diffs of the changes: (+5 -0) README-SSE.txt | 5 +++++ 1 files changed, 5 insertions(+) Index: llvm/lib/Target/X86/README-SSE.txt diff -u llvm/lib/Target/X86/README-SSE.txt:1.6 llvm/lib/Target/X86/README-SSE.txt:1.7 --- llvm/lib/Target/X86/README-SSE.txt:1.6 Wed Oct 4 00:52:13 2006 +++ llvm/lib/Target/X86/README-SSE.txt Wed Oct 18 12:04:09 2006 @@ -28,6 +28,11 @@ //===---------------------------------------------------------------------===// +Expand libm rounding functions inline: Significant speedups possible. +http://gcc.gnu.org/ml/gcc-patches/2006-10/msg00909.html + +//===---------------------------------------------------------------------===// + When compiled with unsafemath enabled, "main" should enable SSE DAZ mode and other fast SSE modes. From sabre at nondot.org Wed Oct 18 13:27:02 2006 From: sabre at nondot.org (Chris Lattner) Date: Wed, 18 Oct 2006 13:27:02 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86ISelLowering.h Message-ID: <200610181827.k9IIR2to024608@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: X86ISelLowering.h updated: 1.74 -> 1.75 --- Log message: fit in 80 cols --- Diffs of the changes: (+12 -12) X86ISelLowering.h | 24 ++++++++++++------------ 1 files changed, 12 insertions(+), 12 deletions(-) Index: llvm/lib/Target/X86/X86ISelLowering.h diff -u llvm/lib/Target/X86/X86ISelLowering.h:1.74 llvm/lib/Target/X86/X86ISelLowering.h:1.75 --- llvm/lib/Target/X86/X86ISelLowering.h:1.74 Thu Sep 28 18:33:12 2006 +++ llvm/lib/Target/X86/X86ISelLowering.h Wed Oct 18 13:26:48 2006 @@ -50,8 +50,8 @@ /// FP_TO_INT*_IN_MEM - This instruction implements FP_TO_SINT with the /// integer destination in memory and a FP reg source. This corresponds /// to the X86::FIST*m instructions and the rounding mode change stuff. It - /// has two inputs (token chain and address) and two outputs (int value and - /// token chain). + /// has two inputs (token chain and address) and two outputs (int value + /// and token chain). FP_TO_INT16_IN_MEM, FP_TO_INT32_IN_MEM, FP_TO_INT64_IN_MEM, @@ -113,9 +113,9 @@ SETCC, /// X86 conditional moves. Operand 1 and operand 2 are the two values - /// to select from (operand 1 is a R/W operand). Operand 3 is the condition - /// code, and operand 4 is the flag operand produced by a CMP or TEST - /// instruction. It also writes a flag result. + /// to select from (operand 1 is a R/W operand). Operand 3 is the + /// condition code, and operand 4 is the flag operand produced by a CMP + /// or TEST instruction. It also writes a flag result. CMOV, /// X86 conditional branches. Operand 1 is the chain operand, operand 2 @@ -263,7 +263,7 @@ unsigned getShufflePSHUFLWImmediate(SDNode *N); } - //===----------------------------------------------------------------------===// + //===--------------------------------------------------------------------===// // X86TargetLowering - X86 Implementation of the TargetLowering interface class X86TargetLowering : public TargetLowering { int VarArgsFrameIndex; // FrameIndex for start of varargs area. @@ -319,10 +319,10 @@ getRegClassForInlineAsmConstraint(const std::string &Constraint, MVT::ValueType VT) const; - /// getRegForInlineAsmConstraint - Given a physical register constraint (e.g. - /// {edx}), return the register number and the register class for the - /// register. This should only be used for C_Register constraints. On error, - /// this returns a register number of 0. + /// getRegForInlineAsmConstraint - Given a physical register constraint + /// (e.g. {edx}), return the register number and the register class for the + /// register. This should only be used for C_Register constraints. On + /// error, this returns a register number of 0. std::pair getRegForInlineAsmConstraint(const std::string &Constraint, MVT::ValueType VT) const; @@ -334,8 +334,8 @@ /// isShuffleMaskLegal - Targets can use this to indicate that they only /// support *some* VECTOR_SHUFFLE operations, those with specific masks. - /// By default, if a target supports the VECTOR_SHUFFLE node, all mask values - /// are assumed to be legal. + /// By default, if a target supports the VECTOR_SHUFFLE node, all mask + /// values are assumed to be legal. virtual bool isShuffleMaskLegal(SDOperand Mask, MVT::ValueType VT) const; /// isVectorClearMaskLegal - Similar to isShuffleMaskLegal. This is From jlaskey at apple.com Wed Oct 18 14:08:45 2006 From: jlaskey at apple.com (Jim Laskey) Date: Wed, 18 Oct 2006 14:08:45 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Message-ID: <200610181908.k9IJ8jAZ025270@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/SelectionDAG: DAGCombiner.cpp updated: 1.230 -> 1.231 --- Log message: Add option for controlling inclusion of global AA. --- Diffs of the changes: (+12 -6) DAGCombiner.cpp | 18 ++++++++++++------ 1 files changed, 12 insertions(+), 6 deletions(-) Index: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp diff -u llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.230 llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.231 --- llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.230 Wed Oct 18 07:29:57 2006 +++ llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Wed Oct 18 14:08:31 2006 @@ -51,6 +51,10 @@ CombinerAA("combiner-alias-analysis", cl::Hidden, cl::desc("Turn on alias analysis during testing")); + static cl::opt + CombinerGlobalAA("combiner-global-alias-analysis", cl::Hidden, + cl::desc("Include global information in alias analysis")); + //------------------------------ DAGCombiner ---------------------------------// class VISIBILITY_HIDDEN DAGCombiner { @@ -4036,13 +4040,15 @@ // If we know both bases then they can't alias. if (KnownBase1 && KnownBase2) return false; - // Use alias analysis information. - int Overlap1 = Size1 + SrcValueOffset1 + Offset1; - int Overlap2 = Size2 + SrcValueOffset2 + Offset2; - AliasAnalysis::AliasResult AAResult = + if (CombinerGlobalAA) { + // Use alias analysis information. + int Overlap1 = Size1 + SrcValueOffset1 + Offset1; + int Overlap2 = Size2 + SrcValueOffset2 + Offset2; + AliasAnalysis::AliasResult AAResult = AA.alias(SrcValue1, Overlap1, SrcValue2, Overlap2); - if (AAResult == AliasAnalysis::NoAlias) - return false; + if (AAResult == AliasAnalysis::NoAlias) + return false; + } // Otherwise we have to assume they alias. return true; From reid at x10sys.com Wed Oct 18 14:24:10 2006 From: reid at x10sys.com (Reid Spencer) Date: Wed, 18 Oct 2006 14:24:10 -0500 Subject: [llvm-commits] CVS: llvm/.cvsignore Message-ID: <200610181924.k9IJOA1i025528@zion.cs.uiuc.edu> Changes in directory llvm: .cvsignore updated: 1.5 -> 1.6 --- Log message: Add llvm.spec, a generated file. --- Diffs of the changes: (+1 -0) .cvsignore | 1 + 1 files changed, 1 insertion(+) Index: llvm/.cvsignore diff -u llvm/.cvsignore:1.5 llvm/.cvsignore:1.6 --- llvm/.cvsignore:1.5 Fri Apr 7 10:55:18 2006 +++ llvm/.cvsignore Wed Oct 18 14:23:56 2006 @@ -7,3 +7,4 @@ configure.out LLVM-* _distcheckdir +llvm.spec From jlaskey at apple.com Wed Oct 18 14:26:36 2006 From: jlaskey at apple.com (Jim Laskey) Date: Wed, 18 Oct 2006 14:26:36 -0500 Subject: [llvm-commits] CVS: nightlytest-serverside/NightlyTestAccept.php Message-ID: <200610181926.k9IJQaA3025620@zion.cs.uiuc.edu> Changes in directory nightlytest-serverside: NightlyTestAccept.php updated: 1.59 -> 1.60 --- Log message: Exclude OS from machine selection. --- Diffs of the changes: (+2 -2) NightlyTestAccept.php | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: nightlytest-serverside/NightlyTestAccept.php diff -u nightlytest-serverside/NightlyTestAccept.php:1.59 nightlytest-serverside/NightlyTestAccept.php:1.60 --- nightlytest-serverside/NightlyTestAccept.php:1.59 Tue Sep 26 07:07:06 2006 +++ nightlytest-serverside/NightlyTestAccept.php Wed Oct 18 14:26:22 2006 @@ -138,7 +138,7 @@ * *******************************************************************************/ function DoesMachineExist($uname, $hardware, $os, $name, $nickname, $gcc_version) { - $query = "SELECT * FROM machine WHERE uname=\"$uname\" AND hardware=\"$hardware\" AND os=\"$os\" AND nickname=\"$nickname\" AND gcc=\"$gcc_version\""; + $query = "SELECT * FROM machine WHERE uname=\"$uname\" AND hardware=\"$hardware\" AND nickname=\"$nickname\" AND gcc=\"$gcc_version\""; $machine_query = mysql_query($query) or die(mysql_error()); $row = mysql_fetch_assoc($machine_query); @@ -185,7 +185,7 @@ * *******************************************************************************/ function GetMachineId($uname, $hardware, $os, $name, $nickname, $gcc_version) { - $query = "SELECT * FROM machine WHERE uname=\"$uname\" AND hardware=\"$hardware\" AND os=\"$os\" AND nickname=\"$nickname\" AND gcc=\"$gcc_version\""; + $query = "SELECT * FROM machine WHERE uname=\"$uname\" AND hardware=\"$hardware\" AND nickname=\"$nickname\" AND gcc=\"$gcc_version\""; $machine_query = mysql_query($query) or die(mysql_error()); $row = mysql_fetch_assoc($machine_query); mysql_free_result($machine_query); From rspencer at reidspencer.com Wed Oct 18 14:37:01 2006 From: rspencer at reidspencer.com (Reid Spencer) Date: Wed, 18 Oct 2006 12:37:01 -0700 Subject: [llvm-commits] CVS: nightlytest-serverside/NightlyTestAccept.php In-Reply-To: <200610181926.k9IJQaA3025620@zion.cs.uiuc.edu> References: <200610181926.k9IJQaA3025620@zion.cs.uiuc.edu> Message-ID: <1161200221.29146.76.camel@bashful.x10sys.com> Jim, This isn't a good idea for the reasons I described on llvm-dev. Reid. On Wed, 2006-10-18 at 14:26 -0500, Jim Laskey wrote: > > Changes in directory nightlytest-serverside: > > NightlyTestAccept.php updated: 1.59 -> 1.60 > --- > Log message: > > Exclude OS from machine selection. > > --- > Diffs of the changes: (+2 -2) > > NightlyTestAccept.php | 4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) > > > Index: nightlytest-serverside/NightlyTestAccept.php > diff -u nightlytest-serverside/NightlyTestAccept.php:1.59 nightlytest-serverside/NightlyTestAccept.php:1.60 > --- nightlytest-serverside/NightlyTestAccept.php:1.59 Tue Sep 26 07:07:06 2006 > +++ nightlytest-serverside/NightlyTestAccept.php Wed Oct 18 14:26:22 2006 > @@ -138,7 +138,7 @@ > * > *******************************************************************************/ > function DoesMachineExist($uname, $hardware, $os, $name, $nickname, $gcc_version) { > - $query = "SELECT * FROM machine WHERE uname=\"$uname\" AND hardware=\"$hardware\" AND os=\"$os\" AND nickname=\"$nickname\" AND gcc=\"$gcc_version\""; > + $query = "SELECT * FROM machine WHERE uname=\"$uname\" AND hardware=\"$hardware\" AND nickname=\"$nickname\" AND gcc=\"$gcc_version\""; > > $machine_query = mysql_query($query) or die(mysql_error()); > $row = mysql_fetch_assoc($machine_query); > @@ -185,7 +185,7 @@ > * > *******************************************************************************/ > function GetMachineId($uname, $hardware, $os, $name, $nickname, $gcc_version) { > - $query = "SELECT * FROM machine WHERE uname=\"$uname\" AND hardware=\"$hardware\" AND os=\"$os\" AND nickname=\"$nickname\" AND gcc=\"$gcc_version\""; > + $query = "SELECT * FROM machine WHERE uname=\"$uname\" AND hardware=\"$hardware\" AND nickname=\"$nickname\" AND gcc=\"$gcc_version\""; > $machine_query = mysql_query($query) or die(mysql_error()); > $row = mysql_fetch_assoc($machine_query); > mysql_free_result($machine_query); > > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From reid at x10sys.com Wed Oct 18 14:40:40 2006 From: reid at x10sys.com (Reid Spencer) Date: Wed, 18 Oct 2006 14:40:40 -0500 Subject: [llvm-commits] CVS: llvm-test/DiffOutput.sh Message-ID: <200610181940.k9IJeeOh025907@zion.cs.uiuc.edu> Changes in directory llvm-test: DiffOutput.sh updated: 1.16 -> 1.17 --- Log message: Catch standard error output from the diff program into the diff file as well as the standard output. This will help to record the difference info in the Output/*.diff files as well as locate the difference info in the correct place in the build output. --- Diffs of the changes: (+1 -1) DiffOutput.sh | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm-test/DiffOutput.sh diff -u llvm-test/DiffOutput.sh:1.16 llvm-test/DiffOutput.sh:1.17 --- llvm-test/DiffOutput.sh:1.16 Tue Apr 13 13:28:12 2004 +++ llvm-test/DiffOutput.sh Wed Oct 18 14:40:26 2006 @@ -32,7 +32,7 @@ GOODOUTPUT=Output/${PROG}.out-${GOODOUTPUT} # Diff the two files. -$DIFF $GOODOUTPUT $TESTOUTPUT > $DIFFOUTPUT || ( +$DIFF $GOODOUTPUT $TESTOUTPUT > $DIFFOUTPUT 2>&1 || ( # They are different! echo "******************** TEST ($WHICHOUTPUT) '$PROG' FAILED! ********************" echo "Execution Context Diff:" From clattner at apple.com Wed Oct 18 15:23:14 2006 From: clattner at apple.com (Chris Lattner) Date: Wed, 18 Oct 2006 13:23:14 -0700 Subject: [llvm-commits] CVS: nightlytest-serverside/NightlyTestAccept.php In-Reply-To: <1161200221.29146.76.camel@bashful.x10sys.com> References: <200610181926.k9IJQaA3025620@zion.cs.uiuc.edu> <1161200221.29146.76.camel@bashful.x10sys.com> Message-ID: <9B97685D-36F7-4D5B-B72A-83CA1D891493@apple.com> On Oct 18, 2006, at 12:37 PM, Reid Spencer wrote: > > This isn't a good idea for the reasons I described on llvm-dev. I really don't think it's a big deal. People can choose new nicknames when making a new config. -Chris From reid at x10sys.com Wed Oct 18 15:24:06 2006 From: reid at x10sys.com (Reid Spencer) Date: Wed, 18 Oct 2006 15:24:06 -0500 Subject: [llvm-commits] CVS: llvm/lib/Support/FileUtilities.cpp Message-ID: <200610182024.k9IKO64L026504@zion.cs.uiuc.edu> Changes in directory llvm/lib/Support: FileUtilities.cpp updated: 1.50 -> 1.51 --- Log message: Beef up the output from DiffFilesWithTolerance by setting the error code to describe the difference being reported. This assists with understanding differences an llvm-test and should help with bugpoint too. --- Diffs of the changes: (+16 -3) FileUtilities.cpp | 19 ++++++++++++++++--- 1 files changed, 16 insertions(+), 3 deletions(-) Index: llvm/lib/Support/FileUtilities.cpp diff -u llvm/lib/Support/FileUtilities.cpp:1.50 llvm/lib/Support/FileUtilities.cpp:1.51 --- llvm/lib/Support/FileUtilities.cpp:1.50 Wed Aug 23 15:37:59 2006 +++ llvm/lib/Support/FileUtilities.cpp Wed Oct 18 15:23:52 2006 @@ -85,7 +85,13 @@ } if (F1NumEnd == F1P || F2NumEnd == F2P) { - if (ErrorMsg) *ErrorMsg = "Comparison failed, not a numeric difference."; + if (ErrorMsg) { + *ErrorMsg = "FP Comparison failed, not a numeric difference between '"; + *ErrorMsg += F1P[0]; + *ErrorMsg += "' and '"; + *ErrorMsg += F2P[0]; + *ErrorMsg += "'"; + } return true; } @@ -160,9 +166,13 @@ // If they are both zero sized then they're the same if (A_size == 0 && B_size == 0) return 0; + // If only one of them is zero sized then they can't be the same - if ((A_size == 0 || B_size == 0)) + if ((A_size == 0 || B_size == 0)) { + if (Error) + *Error = "Files differ: one is zero-sized, the other isn't"; return 1; + } // Now its safe to mmap the files into memory becasue both files // have a non-zero size. @@ -190,8 +200,11 @@ if (std::memcmp(File1Start, File2Start, A_size) == 0) return 0; - if (AbsTol == 0 && RelTol == 0) + if (AbsTol == 0 && RelTol == 0) { + if (Error) + *Error = "Files differ without tolerance allowance"; return 1; // Files different! + } } char *OrigFile1Start = File1Start; From rspencer at reidspencer.com Wed Oct 18 15:28:00 2006 From: rspencer at reidspencer.com (Reid Spencer) Date: Wed, 18 Oct 2006 13:28:00 -0700 Subject: [llvm-commits] CVS: nightlytest-serverside/NightlyTestAccept.php In-Reply-To: <9B97685D-36F7-4D5B-B72A-83CA1D891493@apple.com> References: <200610181926.k9IJQaA3025620@zion.cs.uiuc.edu> <1161200221.29146.76.camel@bashful.x10sys.com> <9B97685D-36F7-4D5B-B72A-83CA1D891493@apple.com> Message-ID: <1161203280.29146.79.camel@bashful.x10sys.com> On Wed, 2006-10-18 at 13:23 -0700, Chris Lattner wrote: > On Oct 18, 2006, at 12:37 PM, Reid Spencer wrote: > > > > > This isn't a good idea for the reasons I described on llvm-dev. > > I really don't think it's a big deal. People can choose new > nicknames when making a new config. Sure, but what about the case where they don't choose a new nickname and radically change their operating system. It will continue to report under the same machine name and allow comparisons between apples and oranges. The change is made, lets just leave it alone for now. If it bites us we can undo the patch. Not worth arguing over :) > > -Chris From clattner at apple.com Wed Oct 18 16:08:55 2006 From: clattner at apple.com (Chris Lattner) Date: Wed, 18 Oct 2006 14:08:55 -0700 Subject: [llvm-commits] CVS: nightlytest-serverside/NightlyTestAccept.php In-Reply-To: <1161203280.29146.79.camel@bashful.x10sys.com> References: <200610181926.k9IJQaA3025620@zion.cs.uiuc.edu> <1161200221.29146.76.camel@bashful.x10sys.com> <9B97685D-36F7-4D5B-B72A-83CA1D891493@apple.com> <1161203280.29146.79.camel@bashful.x10sys.com> Message-ID: On Oct 18, 2006, at 1:28 PM, Reid Spencer wrote: > On Wed, 2006-10-18 at 13:23 -0700, Chris Lattner wrote: >> On Oct 18, 2006, at 12:37 PM, Reid Spencer wrote: >> >>> >>> This isn't a good idea for the reasons I described on llvm-dev. >> >> I really don't think it's a big deal. People can choose new >> nicknames when making a new config. > > Sure, but what about the case where they don't choose a new > nickname and > radically change their operating system. It will continue to report > under the same machine name and allow comparisons between apples and > oranges. I don't see how "allowing it" is such a problem. It just won't provide anything meaningful. The same thing happens whenever the meaning of llcbeta changes, which is often. > The change is made, lets just leave it alone for now. If it bites > us we > can undo the patch. Not worth arguing over :) agreed. -chris From reid at x10sys.com Wed Oct 18 22:59:01 2006 From: reid at x10sys.com (Reid Spencer) Date: Wed, 18 Oct 2006 22:59:01 -0500 Subject: [llvm-commits] [SignlessTypes] CVS: llvm/projects/Stacker/lib/compiler/StackerCompiler.cpp Message-ID: <200610190359.k9J3x19F003902@zion.cs.uiuc.edu> Changes in directory llvm/projects/Stacker/lib/compiler: StackerCompiler.cpp updated: 1.18 -> 1.18.2.1 --- Log message: For PR950: http://llvm.org/PR950 : This commit (on SignlessTypes branch) provides the first Iteration for moving LLVM away from Signed types. This patch removes the ConstantSInt and ConstantUInt classes from Type.h and makes all necessary changes in LLVM to compensate. --- Diffs of the changes: (+8 -8) StackerCompiler.cpp | 16 ++++++++-------- 1 files changed, 8 insertions(+), 8 deletions(-) Index: llvm/projects/Stacker/lib/compiler/StackerCompiler.cpp diff -u llvm/projects/Stacker/lib/compiler/StackerCompiler.cpp:1.18 llvm/projects/Stacker/lib/compiler/StackerCompiler.cpp:1.18.2.1 --- llvm/projects/Stacker/lib/compiler/StackerCompiler.cpp:1.18 Fri Aug 18 04:07:54 2006 +++ llvm/projects/Stacker/lib/compiler/StackerCompiler.cpp Wed Oct 18 22:57:56 2006 @@ -463,7 +463,7 @@ StackerCompiler::push_integer(BasicBlock* bb, int64_t value ) { // Just push a constant integer value - return push_value( bb, ConstantSInt::get( Type::LongTy, value ) ); + return push_value( bb, ConstantInt::get( Type::LongTy, value ) ); } Instruction* @@ -721,7 +721,7 @@ // Compare the condition against 0 SetCondInst* cond_inst = new SetCondInst( Instruction::SetNE, cond, - ConstantSInt::get( Type::LongTy, 0) ); + ConstantInt::get( Type::LongTy, uint32_t(0)) ); bb->getInstList().push_back( cond_inst ); // Create an exit block @@ -805,7 +805,7 @@ // Compare the condition against 0 SetCondInst* cond_inst = new SetCondInst( - Instruction::SetNE, cond, ConstantSInt::get( Type::LongTy, 0) ); + Instruction::SetNE, cond, ConstantInt::get( Type::LongTy, uint32_t(0))); test->getInstList().push_back( cond_inst ); // Add the branch instruction @@ -1019,7 +1019,7 @@ if (echo) bb->setName("DECR"); LoadInst* op1 = cast(pop_integer(bb)); BinaryOperator* subop = BinaryOperator::create( Instruction::Sub, op1, - ConstantSInt::get( Type::LongTy, 1 ) ); + ConstantInt::get( Type::LongTy, 1 ) ); bb->getInstList().push_back( subop ); push_value( bb, subop ); break; @@ -1089,7 +1089,7 @@ // bb->getInstList().push_back( negop ); // So we'll multiply by -1 (ugh) BinaryOperator* multop = BinaryOperator::create( Instruction::Mul, op1, - ConstantSInt::get( Type::LongTy, -1 ) ); + ConstantInt::get( Type::LongTy, -1 ) ); bb->getInstList().push_back( multop ); push_value( bb, multop ); break; @@ -1601,7 +1601,7 @@ bb->getInstList().push_back( format_gep ); // Get the character to print (a tab) - ConstantSInt* newline = ConstantSInt::get(Type::IntTy, + ConstantInt* newline = ConstantInt::get(Type::IntTy, static_cast('\t')); // Call printf @@ -1623,7 +1623,7 @@ bb->getInstList().push_back( format_gep ); // Get the character to print (a space) - ConstantSInt* newline = ConstantSInt::get(Type::IntTy, + ConstantInt* newline = ConstantInt::get(Type::IntTy, static_cast(' ')); // Call printf @@ -1645,7 +1645,7 @@ bb->getInstList().push_back( format_gep ); // Get the character to print (a newline) - ConstantSInt* newline = ConstantSInt::get(Type::IntTy, + ConstantInt* newline = ConstantInt::get(Type::IntTy, static_cast('\n')); // Call printf From reid at x10sys.com Wed Oct 18 22:59:01 2006 From: reid at x10sys.com (Reid Spencer) Date: Wed, 18 Oct 2006 22:59:01 -0500 Subject: [llvm-commits] [SignlessTypes] CVS: llvm/tools/bugpoint/ExtractFunction.cpp Message-ID: <200610190359.k9J3x1kJ003928@zion.cs.uiuc.edu> Changes in directory llvm/tools/bugpoint: ExtractFunction.cpp updated: 1.52 -> 1.52.2.1 --- Log message: For PR950: http://llvm.org/PR950 : This commit (on SignlessTypes branch) provides the first Iteration for moving LLVM away from Signed types. This patch removes the ConstantSInt and ConstantUInt classes from Type.h and makes all necessary changes in LLVM to compensate. --- Diffs of the changes: (+3 -3) ExtractFunction.cpp | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) Index: llvm/tools/bugpoint/ExtractFunction.cpp diff -u llvm/tools/bugpoint/ExtractFunction.cpp:1.52 llvm/tools/bugpoint/ExtractFunction.cpp:1.52.2.1 --- llvm/tools/bugpoint/ExtractFunction.cpp:1.52 Tue Aug 29 18:38:20 2006 +++ llvm/tools/bugpoint/ExtractFunction.cpp Wed Oct 18 22:57:56 2006 @@ -181,7 +181,7 @@ std::vector ArrayElts; for (unsigned i = 0, e = TorList.size(); i != e; ++i) { std::vector Elts; - Elts.push_back(ConstantSInt::get(Type::IntTy, TorList[i].second)); + Elts.push_back(ConstantInt::get(Type::IntTy, TorList[i].second)); Elts.push_back(TorList[i].first); ArrayElts.push_back(ConstantStruct::get(Elts)); } @@ -210,8 +210,8 @@ if (CS->getOperand(1)->isNullValue()) break; // Found a null terminator, stop here. - ConstantSInt *CI = dyn_cast(CS->getOperand(0)); - int Priority = CI ? CI->getValue() : 0; + ConstantInt *CI = dyn_cast(CS->getOperand(0)); + int Priority = CI ? CI->getSExtValue() : 0; Constant *FP = CS->getOperand(1); if (ConstantExpr *CE = dyn_cast(FP)) From reid at x10sys.com Wed Oct 18 22:59:01 2006 From: reid at x10sys.com (Reid Spencer) Date: Wed, 18 Oct 2006 22:59:01 -0500 Subject: [llvm-commits] [SignlessTypes] CVS: llvm/lib/Transforms/TransformInternals.cpp Message-ID: <200610190359.k9J3x1dM003904@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms: TransformInternals.cpp updated: 1.50 -> 1.50.8.1 --- Log message: For PR950: http://llvm.org/PR950 : This commit (on SignlessTypes branch) provides the first Iteration for moving LLVM away from Signed types. This patch removes the ConstantSInt and ConstantUInt classes from Type.h and makes all necessary changes in LLVM to compensate. --- Diffs of the changes: (+5 -4) TransformInternals.cpp | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) Index: llvm/lib/Transforms/TransformInternals.cpp diff -u llvm/lib/Transforms/TransformInternals.cpp:1.50 llvm/lib/Transforms/TransformInternals.cpp:1.50.8.1 --- llvm/lib/Transforms/TransformInternals.cpp:1.50 Fri Oct 28 23:41:30 2005 +++ llvm/lib/Transforms/TransformInternals.cpp Wed Oct 18 22:57:56 2006 @@ -34,7 +34,7 @@ (i == SL->MemberOffsets.size()-1 || Offset < SL->MemberOffsets[i+1])); // Make sure to save the current index... - Indices.push_back(ConstantUInt::get(Type::UIntTy, i)); + Indices.push_back(ConstantInt::get(Type::UIntTy, uint32_t(i))); Offset = SL->MemberOffsets[i]; return STy->getContainedType(i); } @@ -73,10 +73,11 @@ NextType = ATy->getElementType(); unsigned ChildSize = (unsigned)TD.getTypeSize(NextType); - if (ConstantSInt::isValueValidForType(Type::IntTy, Offset/ChildSize)) - Indices.push_back(ConstantSInt::get(Type::IntTy, Offset/ChildSize)); + if (ConstantInt::isValueValidForType(Type::IntTy, + uint64_t(Offset/ChildSize))) + Indices.push_back(ConstantInt::get(Type::IntTy, Offset/ChildSize)); else - Indices.push_back(ConstantSInt::get(Type::LongTy, Offset/ChildSize)); + Indices.push_back(ConstantInt::get(Type::LongTy, Offset/ChildSize)); ThisOffset = (Offset/ChildSize)*ChildSize; } else { Offset = 0; // Return the offset that we were able to achieve From reid at x10sys.com Wed Oct 18 22:58:59 2006 From: reid at x10sys.com (Reid Spencer) Date: Wed, 18 Oct 2006 22:58:59 -0500 Subject: [llvm-commits] [SignlessTypes] CVS: llvm/examples/HowToUseJIT/HowToUseJIT.cpp Message-ID: <200610190358.k9J3wxVx003846@zion.cs.uiuc.edu> Changes in directory llvm/examples/HowToUseJIT: HowToUseJIT.cpp updated: 1.11 -> 1.11.6.1 --- Log message: For PR950: http://llvm.org/PR950 : This commit (on SignlessTypes branch) provides the first Iteration for moving LLVM away from Signed types. This patch removes the ConstantSInt and ConstantUInt classes from Type.h and makes all necessary changes in LLVM to compensate. --- Diffs of the changes: (+2 -2) HowToUseJIT.cpp | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/examples/HowToUseJIT/HowToUseJIT.cpp diff -u llvm/examples/HowToUseJIT/HowToUseJIT.cpp:1.11 llvm/examples/HowToUseJIT/HowToUseJIT.cpp:1.11.6.1 --- llvm/examples/HowToUseJIT/HowToUseJIT.cpp:1.11 Thu Mar 23 21:11:31 2006 +++ llvm/examples/HowToUseJIT/HowToUseJIT.cpp Wed Oct 18 22:57:55 2006 @@ -60,7 +60,7 @@ BasicBlock *BB = new BasicBlock("EntryBlock", Add1F); // Get pointers to the constant `1'. - Value *One = ConstantSInt::get(Type::IntTy, 1); + Value *One = ConstantInt::get(Type::IntTy, 1); // Get pointers to the integer argument of the add1 function... assert(Add1F->arg_begin() != Add1F->arg_end()); // Make sure there's an arg @@ -84,7 +84,7 @@ BB = new BasicBlock("EntryBlock", FooF); // Get pointers to the constant `10'. - Value *Ten = ConstantSInt::get(Type::IntTy, 10); + Value *Ten = ConstantInt::get(Type::IntTy, 10); // Pass Ten to the call call: std::vector Params; From reid at x10sys.com Wed Oct 18 22:59:00 2006 From: reid at x10sys.com (Reid Spencer) Date: Wed, 18 Oct 2006 22:59:00 -0500 Subject: [llvm-commits] [SignlessTypes] CVS: llvm/lib/ExecutionEngine/ExecutionEngine.cpp Message-ID: <200610190359.k9J3x09h003852@zion.cs.uiuc.edu> Changes in directory llvm/lib/ExecutionEngine: ExecutionEngine.cpp updated: 1.85 -> 1.85.2.1 --- Log message: For PR950: http://llvm.org/PR950 : This commit (on SignlessTypes branch) provides the first Iteration for moving LLVM away from Signed types. This patch removes the ConstantSInt and ConstantUInt classes from Type.h and makes all necessary changes in LLVM to compensate. --- Diffs of the changes: (+13 -13) ExecutionEngine.cpp | 26 +++++++++++++------------- 1 files changed, 13 insertions(+), 13 deletions(-) Index: llvm/lib/ExecutionEngine/ExecutionEngine.cpp diff -u llvm/lib/ExecutionEngine/ExecutionEngine.cpp:1.85 llvm/lib/ExecutionEngine/ExecutionEngine.cpp:1.85.2.1 --- llvm/lib/ExecutionEngine/ExecutionEngine.cpp:1.85 Thu Sep 14 13:23:26 2006 +++ llvm/lib/ExecutionEngine/ExecutionEngine.cpp Wed Oct 18 22:57:56 2006 @@ -390,19 +390,19 @@ } switch (C->getType()->getTypeID()) { -#define GET_CONST_VAL(TY, CTY, CLASS) \ - case Type::TY##TyID: Result.TY##Val = (CTY)cast(C)->getValue(); break - GET_CONST_VAL(Bool , bool , ConstantBool); - GET_CONST_VAL(UByte , unsigned char , ConstantUInt); - GET_CONST_VAL(SByte , signed char , ConstantSInt); - GET_CONST_VAL(UShort , unsigned short, ConstantUInt); - GET_CONST_VAL(Short , signed short , ConstantSInt); - GET_CONST_VAL(UInt , unsigned int , ConstantUInt); - GET_CONST_VAL(Int , signed int , ConstantSInt); - GET_CONST_VAL(ULong , uint64_t , ConstantUInt); - GET_CONST_VAL(Long , int64_t , ConstantSInt); - GET_CONST_VAL(Float , float , ConstantFP); - GET_CONST_VAL(Double , double , ConstantFP); +#define GET_CONST_VAL(TY, CTY, CLASS, GETMETH) \ + case Type::TY##TyID: Result.TY##Val = (CTY)cast(C)->GETMETH(); break + GET_CONST_VAL(Bool , bool , ConstantBool, getValue); + GET_CONST_VAL(UByte , unsigned char , ConstantInt, getZExtValue); + GET_CONST_VAL(SByte , signed char , ConstantInt, getSExtValue); + GET_CONST_VAL(UShort , unsigned short, ConstantInt, getZExtValue); + GET_CONST_VAL(Short , signed short , ConstantInt, getSExtValue); + GET_CONST_VAL(UInt , unsigned int , ConstantInt, getZExtValue); + GET_CONST_VAL(Int , signed int , ConstantInt, getSExtValue); + GET_CONST_VAL(ULong , uint64_t , ConstantInt, getZExtValue); + GET_CONST_VAL(Long , int64_t , ConstantInt, getSExtValue); + GET_CONST_VAL(Float , float , ConstantFP, getValue); + GET_CONST_VAL(Double , double , ConstantFP, getValue); #undef GET_CONST_VAL case Type::PointerTyID: if (isa(C)) From reid at x10sys.com Wed Oct 18 22:58:57 2006 From: reid at x10sys.com (Reid Spencer) Date: Wed, 18 Oct 2006 22:58:57 -0500 Subject: [llvm-commits] [SignlessTypes] CVS: llvm/lib/Debugger/ProgramInfo.cpp Message-ID: <200610190358.k9J3wvrl003813@zion.cs.uiuc.edu> Changes in directory llvm/lib/Debugger: ProgramInfo.cpp updated: 1.17 -> 1.17.2.1 --- Log message: For PR950: http://llvm.org/PR950 : This commit (on SignlessTypes branch) provides the first Iteration for moving LLVM away from Signed types. This patch removes the ConstantSInt and ConstantUInt classes from Type.h and makes all necessary changes in LLVM to compensate. --- Diffs of the changes: (+4 -4) ProgramInfo.cpp | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) Index: llvm/lib/Debugger/ProgramInfo.cpp diff -u llvm/lib/Debugger/ProgramInfo.cpp:1.17 llvm/lib/Debugger/ProgramInfo.cpp:1.17.2.1 --- llvm/lib/Debugger/ProgramInfo.cpp:1.17 Fri Jul 28 17:03:44 2006 +++ llvm/lib/Debugger/ProgramInfo.cpp Wed Oct 18 22:57:56 2006 @@ -114,8 +114,8 @@ if (Desc && Desc->hasInitializer()) if (ConstantStruct *CS = dyn_cast(Desc->getInitializer())) if (CS->getNumOperands() > 4) { - if (ConstantUInt *CUI = dyn_cast(CS->getOperand(1))) - Version = CUI->getValue(); + if (ConstantInt *CUI = dyn_cast(CS->getOperand(1))) + Version = CUI->getZExtValue(); BaseName = CS->getOperand(3)->getStringValue(); Directory = CS->getOperand(4)->getStringValue(); @@ -237,8 +237,8 @@ if (Desc && Desc->hasInitializer()) if (ConstantStruct *CS = dyn_cast(Desc->getInitializer())) if (CS->getNumOperands() > 2) - if (ConstantUInt *CUI = dyn_cast(CS->getOperand(2))) - LangID = CUI->getValue(); + if (ConstantInt *CUI = dyn_cast(CS->getOperand(2))) + LangID = CUI->getZExtValue(); const SourceLanguage &Lang = SourceLanguage::get(LangID); SourceFileInfo *New = Lang.createSourceFileInfo(Desc, *this); From reid at x10sys.com Wed Oct 18 22:58:57 2006 From: reid at x10sys.com (Reid Spencer) Date: Wed, 18 Oct 2006 22:58:57 -0500 Subject: [llvm-commits] [SignlessTypes] CVS: llvm/tools/llvm2cpp/CppWriter.cpp Message-ID: <200610190358.k9J3wv2W003830@zion.cs.uiuc.edu> Changes in directory llvm/tools/llvm2cpp: CppWriter.cpp updated: 1.16 -> 1.16.2.1 --- Log message: For PR950: http://llvm.org/PR950 : This commit (on SignlessTypes branch) provides the first Iteration for moving LLVM away from Signed types. This patch removes the ConstantSInt and ConstantUInt classes from Type.h and makes all necessary changes in LLVM to compensate. --- Diffs of the changes: (+5 -6) CppWriter.cpp | 11 +++++------ 1 files changed, 5 insertions(+), 6 deletions(-) Index: llvm/tools/llvm2cpp/CppWriter.cpp diff -u llvm/tools/llvm2cpp/CppWriter.cpp:1.16 llvm/tools/llvm2cpp/CppWriter.cpp:1.16.2.1 --- llvm/tools/llvm2cpp/CppWriter.cpp:1.16 Thu Sep 28 18:24:48 2006 +++ llvm/tools/llvm2cpp/CppWriter.cpp Wed Oct 18 22:57:56 2006 @@ -678,12 +678,11 @@ if (const ConstantBool *CB = dyn_cast(CV)) { Out << "ConstantBool* " << constName << " = ConstantBool::get(" << (CB->getValue() ? "true" : "false") << ");"; - } else if (const ConstantSInt *CI = dyn_cast(CV)) { - Out << "ConstantSInt* " << constName << " = ConstantSInt::get(" - << typeName << ", " << CI->getValue() << ");"; - } else if (const ConstantUInt *CI = dyn_cast(CV)) { - Out << "ConstantUInt* " << constName << " = ConstantUInt::get(" - << typeName << ", " << CI->getValue() << ");"; + } else if (const ConstantInt *CI = dyn_cast(CV)) { + Out << "ConstantInt* " << constName << " = ConstantInt::get(" + << typeName << ", " + << (CV->getType()->isSigned() ? CI->getSExtValue() : CI->getZExtValue()) + << ");"; } else if (isa(CV)) { Out << "ConstantAggregateZero* " << constName << " = ConstantAggregateZero::get(" << typeName << ");"; From reid at x10sys.com Wed Oct 18 22:59:00 2006 From: reid at x10sys.com (Reid Spencer) Date: Wed, 18 Oct 2006 22:59:00 -0500 Subject: [llvm-commits] [SignlessTypes] CVS: llvm/examples/ParallelJIT/ParallelJIT.cpp Message-ID: <200610190359.k9J3x0a5003849@zion.cs.uiuc.edu> Changes in directory llvm/examples/ParallelJIT: ParallelJIT.cpp updated: 1.5 -> 1.5.6.1 --- Log message: For PR950: http://llvm.org/PR950 : This commit (on SignlessTypes branch) provides the first Iteration for moving LLVM away from Signed types. This patch removes the ConstantSInt and ConstantUInt classes from Type.h and makes all necessary changes in LLVM to compensate. --- Diffs of the changes: (+3 -3) ParallelJIT.cpp | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) Index: llvm/examples/ParallelJIT/ParallelJIT.cpp diff -u llvm/examples/ParallelJIT/ParallelJIT.cpp:1.5 llvm/examples/ParallelJIT/ParallelJIT.cpp:1.5.6.1 --- llvm/examples/ParallelJIT/ParallelJIT.cpp:1.5 Thu Mar 23 21:11:31 2006 +++ llvm/examples/ParallelJIT/ParallelJIT.cpp Wed Oct 18 22:57:55 2006 @@ -42,7 +42,7 @@ BasicBlock *BB = new BasicBlock("EntryBlock", Add1F); // Get pointers to the constant `1'. - Value *One = ConstantSInt::get(Type::IntTy, 1); + Value *One = ConstantInt::get(Type::IntTy, 1); // Get pointers to the integer argument of the add1 function... assert(Add1F->arg_begin() != Add1F->arg_end()); // Make sure there's an arg @@ -70,8 +70,8 @@ BasicBlock *BB = new BasicBlock("EntryBlock", FibF); // Get pointers to the constants. - Value *One = ConstantSInt::get(Type::IntTy, 1); - Value *Two = ConstantSInt::get(Type::IntTy, 2); + Value *One = ConstantInt::get(Type::IntTy, 1); + Value *Two = ConstantInt::get(Type::IntTy, 2); // Get pointer to the integer argument of the add1 function... Argument *ArgX = FibF->arg_begin(); // Get the arg. From reid at x10sys.com Wed Oct 18 22:58:57 2006 From: reid at x10sys.com (Reid Spencer) Date: Wed, 18 Oct 2006 22:58:57 -0500 Subject: [llvm-commits] [SignlessTypes] CVS: llvm/include/llvm/Constants.h Value.h Message-ID: <200610190358.k9J3wvd2003799@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm: Constants.h updated: 1.88 -> 1.88.2.1 Value.h updated: 1.84 -> 1.84.4.1 --- Log message: For PR950: http://llvm.org/PR950 : This commit (on SignlessTypes branch) provides the first Iteration for moving LLVM away from Signed types. This patch removes the ConstantSInt and ConstantUInt classes from Type.h and makes all necessary changes in LLVM to compensate. --- Diffs of the changes: (+44 -98) Constants.h | 139 ++++++++++++++++++------------------------------------------ Value.h | 3 - 2 files changed, 44 insertions(+), 98 deletions(-) Index: llvm/include/llvm/Constants.h diff -u llvm/include/llvm/Constants.h:1.88 llvm/include/llvm/Constants.h:1.88.2.1 --- llvm/include/llvm/Constants.h:1.88 Thu Sep 28 18:36:21 2006 +++ llvm/include/llvm/Constants.h Wed Oct 18 22:57:55 2006 @@ -46,6 +46,7 @@ uint64_t Unsigned; } Val; ConstantIntegral(const Type *Ty, ValueTy VT, uint64_t V); + ConstantIntegral(const Type *Ty, ValueTy VT, int64_t V); public: /// @brief Return the raw value of the constant as a 64-bit integer value. @@ -111,8 +112,7 @@ static inline bool classof(const ConstantIntegral *) { return true; } static bool classof(const Value *V) { return V->getValueType() == ConstantBoolVal || - V->getValueType() == ConstantSIntVal || - V->getValueType() == ConstantUIntVal; + V->getValueType() == ConstantIntVal; } }; @@ -165,13 +165,15 @@ //===----------------------------------------------------------------------===// -/// This is the abstract superclass of ConstantSInt & ConstantUInt, to make -/// dealing with integral constants easier when sign is irrelevant. -/// @brief Abstract clas for constant integers. +/// This is concrete integer subclass of ConstantIntegral that represents +/// both signed and unsigned integral constants, other than boolean. +/// @brief Class for constant integers. class ConstantInt : public ConstantIntegral { protected: ConstantInt(const ConstantInt &); // DO NOT IMPLEMENT - ConstantInt(const Type *Ty, ValueTy VT, uint64_t V); + ConstantInt(const Type *Ty, uint64_t V); + ConstantInt(const Type *Ty, int64_t V); + friend struct ConstantCreator; public: /// A helper method that can be used to determine if the constant contained /// within is equal to a constant. This only works for very small values, @@ -184,44 +186,18 @@ } /// Return a ConstantInt with the specified value for the specified type. - /// This only works for very small values, because this is all that can be - /// represented with all types integer types. + /// Overloads for ll the integer types are provided to ensure that implicit + /// conversions don't bite us and to get around compiler errors where the + /// compiler can't find a suitable overload for a given integer value. /// @brief Get a ConstantInt for a specific value. - static ConstantInt *get(const Type *Ty, unsigned char V); - - /// @returns true if this is the null integer value. - /// @see ConstantIntegral for details - /// @brief Implement override. - virtual bool isNullValue() const { return Val.Unsigned == 0; } - - /// @brief Methods to support type inquiry through isa, cast, and dyn_cast. - static inline bool classof(const ConstantInt *) { return true; } - static bool classof(const Value *V) { - return V->getValueType() == ConstantSIntVal || - V->getValueType() == ConstantUIntVal; - } -}; - - -//===----------------------------------------------------------------------===// -/// A concrete class to represent constant signed integer values for the types -/// sbyte, short, int, and long. -/// @brief Constant Signed Integer Class. -class ConstantSInt : public ConstantInt { - ConstantSInt(const ConstantSInt &); // DO NOT IMPLEMENT - friend struct ConstantCreator; - -protected: - ConstantSInt(const Type *Ty, int64_t V); -public: - /// This static factory methods returns objects of the specified value. Note - /// that repeated calls with the same operands return the same object. - /// @returns A ConstantSInt instant for the type and value requested. - /// @brief Get a signed integer constant. - static ConstantSInt *get( - const Type *Ty, ///< The type of constant (SByteTy, IntTy, ShortTy, LongTy) - int64_t V ///< The value for the constant integer. - ); + static ConstantInt *get(const Type *Ty, int8_t V); + static ConstantInt *get(const Type *Ty, uint8_t V); + static ConstantInt *get(const Type *Ty, int16_t V); + static ConstantInt *get(const Type *Ty, uint16_t V); + static ConstantInt *get(const Type *Ty, int32_t V); + static ConstantInt *get(const Type *Ty, uint32_t V); + static ConstantInt *get(const Type *Ty, uint64_t V); + static ConstantInt *get(const Type *Ty, int64_t V); /// This static method returns true if the type Ty is big enough to /// represent the value V. This can be used to avoid having the get method @@ -229,25 +205,30 @@ /// @returns true if V is a valid value for type Ty /// @brief Determine if the value is in range for the given type. static bool isValueValidForType(const Type *Ty, int64_t V); + static bool isValueValidForType(const Type *Ty, uint64_t V); - /// @returns the underlying value of this constant. - /// @brief Get the constant value. - inline int64_t getValue() const { return Val.Signed; } + /// @returns true if this is the null integer value. + /// @see ConstantIntegral for details + /// @brief Implement override. + virtual bool isNullValue() const { return Val.Unsigned == 0; } /// @returns true iff this constant's bits are all set to true. /// @see ConstantIntegral /// @brief Override implementation - virtual bool isAllOnesValue() const { return getValue() == -1; } + virtual bool isAllOnesValue() const { return getSExtValue() == -1; } /// @returns true iff this is the largest value that may be represented /// by this type. /// @see ConstantIntegeral /// @brief Override implementation virtual bool isMaxValue() const { - int64_t V = getValue(); - if (V < 0) return false; // Be careful about wrap-around on 'long's - ++V; - return !isValueValidForType(getType(), V) || V < 0; + if (getType()->isSigned()) { + int64_t V = getSExtValue(); + if (V < 0) return false; // Be careful about wrap-around on 'long's + ++V; + return !isValueValidForType(getType(), V) || V < 0; + } + return isAllOnesValue(); } /// @returns true if this is the smallest value that may be represented by @@ -255,52 +236,19 @@ /// @see ConstantIntegral /// @brief Override implementation virtual bool isMinValue() const { - int64_t V = getValue(); - if (V > 0) return false; // Be careful about wrap-around on 'long's - --V; - return !isValueValidForType(getType(), V) || V > 0; + if (getType()->isSigned()) { + int64_t V = getSExtValue(); + if (V > 0) return false; // Be careful about wrap-around on 'long's + --V; + return !isValueValidForType(getType(), V) || V > 0; + } + return getZExtValue() == 0; } - /// @brief Methods to support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const ConstantSInt *) { return true; } - static bool classof(const Value *V) { - return V->getValueType() == ConstantSIntVal; - } -}; - -//===----------------------------------------------------------------------===// -/// A concrete class that represents constant unsigned integer values of type -/// Type::UByteTy, Type::UShortTy, Type::UIntTy, or Type::ULongTy. -/// @brief Constant Unsigned Integer Class -class ConstantUInt : public ConstantInt { - ConstantUInt(const ConstantUInt &); // DO NOT IMPLEMENT - friend struct ConstantCreator; -protected: - ConstantUInt(const Type *Ty, uint64_t V); -public: - /// get() - Static factory methods - Return objects of the specified value - /// - static ConstantUInt *get(const Type *Ty, uint64_t V); - - /// isValueValidForType - return true if Ty is big enough to represent V. - /// - static bool isValueValidForType(const Type *Ty, uint64_t V); - - /// getValue - return the underlying value of this constant. - /// - inline uint64_t getValue() const { return Val.Unsigned; } - - /// isMaxValue - Return true if this is the largest value that may be - /// represented by this type. - /// - virtual bool isAllOnesValue() const; - virtual bool isMaxValue() const { return isAllOnesValue(); } - virtual bool isMinValue() const { return getValue() == 0; } - - /// Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const ConstantUInt *) { return true; } + /// @brief Methods to support type inquiry through isa, cast, and dyn_cast. + static inline bool classof(const ConstantInt *) { return true; } static bool classof(const Value *V) { - return V->getValueType() == ConstantUIntVal; + return V->getValueType() == ConstantIntVal; } }; @@ -591,8 +539,7 @@ } /// getSizeOf constant expr - computes the size of a type in a target - /// independent way (Note: the return type is ULong but the object is not - /// necessarily a ConstantUInt). + /// independent way (Note: the return type is a ULong). /// static Constant *getSizeOf(const Type *Ty); Index: llvm/include/llvm/Value.h diff -u llvm/include/llvm/Value.h:1.84 llvm/include/llvm/Value.h:1.84.4.1 --- llvm/include/llvm/Value.h:1.84 Mon Jun 5 11:29:06 2006 +++ llvm/include/llvm/Value.h Wed Oct 18 22:57:55 2006 @@ -151,8 +151,7 @@ ConstantExprVal, // This is an instance of ConstantExpr ConstantAggregateZeroVal, // This is an instance of ConstantAggregateNull ConstantBoolVal, // This is an instance of ConstantBool - ConstantSIntVal, // This is an instance of ConstantSInt - ConstantUIntVal, // This is an instance of ConstantUInt + ConstantIntVal, // This is an instance of ConstantInt ConstantFPVal, // This is an instance of ConstantFP ConstantArrayVal, // This is an instance of ConstantArray ConstantStructVal, // This is an instance of ConstantStruct From reid at x10sys.com Wed Oct 18 22:59:01 2006 From: reid at x10sys.com (Reid Spencer) Date: Wed, 18 Oct 2006 22:59:01 -0500 Subject: [llvm-commits] [SignlessTypes] CVS: llvm/lib/CodeGen/AsmPrinter.cpp IntrinsicLowering.cpp MachineDebugInfo.cpp Message-ID: <200610190359.k9J3x1Yu003947@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: AsmPrinter.cpp updated: 1.111 -> 1.111.2.1 IntrinsicLowering.cpp updated: 1.43 -> 1.43.6.1 MachineDebugInfo.cpp updated: 1.50 -> 1.50.2.1 --- Log message: For PR950: http://llvm.org/PR950 : This commit (on SignlessTypes branch) provides the first Iteration for moving LLVM away from Signed types. This patch removes the ConstantSInt and ConstantUInt classes from Type.h and makes all necessary changes in LLVM to compensate. --- Diffs of the changes: (+50 -39) AsmPrinter.cpp | 17 +++++++++-------- IntrinsicLowering.cpp | 43 ++++++++++++++++++++++++++----------------- MachineDebugInfo.cpp | 29 +++++++++++++++-------------- 3 files changed, 50 insertions(+), 39 deletions(-) Index: llvm/lib/CodeGen/AsmPrinter.cpp diff -u llvm/lib/CodeGen/AsmPrinter.cpp:1.111 llvm/lib/CodeGen/AsmPrinter.cpp:1.111.2.1 --- llvm/lib/CodeGen/AsmPrinter.cpp:1.111 Tue Oct 17 12:17:24 2006 +++ llvm/lib/CodeGen/AsmPrinter.cpp Wed Oct 18 22:57:55 2006 @@ -393,14 +393,15 @@ else if (const ConstantBool *CB = dyn_cast(CV)) { assert(CB->getValue()); O << "1"; - } else if (const ConstantSInt *CI = dyn_cast(CV)) - if (((CI->getValue() << 32) >> 32) == CI->getValue()) - O << CI->getValue(); - else - O << (uint64_t)CI->getValue(); - else if (const ConstantUInt *CI = dyn_cast(CV)) - O << CI->getValue(); - else if (const GlobalValue *GV = dyn_cast(CV)) { + } else if (const ConstantInt *CI = dyn_cast(CV)) { + if (CI->getType()->isSigned()) { + if (((CI->getSExtValue() << 32) >> 32) == CI->getSExtValue()) + O << CI->getSExtValue(); + else + O << (uint64_t)CI->getSExtValue(); + } else + O << CI->getZExtValue(); + } else if (const GlobalValue *GV = dyn_cast(CV)) { // This is a constant address for a global variable or function. Use the // name of the variable or function as the address value, possibly // decorating it with GlobalVarAddrPrefix/Suffix or Index: llvm/lib/CodeGen/IntrinsicLowering.cpp diff -u llvm/lib/CodeGen/IntrinsicLowering.cpp:1.43 llvm/lib/CodeGen/IntrinsicLowering.cpp:1.43.6.1 --- llvm/lib/CodeGen/IntrinsicLowering.cpp:1.43 Thu Mar 23 12:06:46 2006 +++ llvm/lib/CodeGen/IntrinsicLowering.cpp Wed Oct 18 22:57:55 2006 @@ -166,10 +166,12 @@ Value *Tmp1 = new ShiftInst(Instruction::Shr, V, ConstantInt::get(Type::UByteTy,24),"bswap.1", IP); Tmp3 = BinaryOperator::createAnd(Tmp3, - ConstantUInt::get(Type::UIntTy, 0xFF0000), + ConstantInt::get(Type::UIntTy, + uint32_t(0xFF0000)), "bswap.and3", IP); Tmp2 = BinaryOperator::createAnd(Tmp2, - ConstantUInt::get(Type::UIntTy, 0xFF00), + ConstantInt::get(Type::UIntTy, + uint32_t(0xFF00)), "bswap.and2", IP); Tmp4 = BinaryOperator::createOr(Tmp4, Tmp3, "bswap.or1", IP); Tmp2 = BinaryOperator::createOr(Tmp2, Tmp1, "bswap.or2", IP); @@ -194,23 +196,29 @@ Value *Tmp1 = new ShiftInst(Instruction::Shr, V, ConstantInt::get(Type::UByteTy,56),"bswap.1", IP); Tmp7 = BinaryOperator::createAnd(Tmp7, - ConstantUInt::get(Type::ULongTy, 0xFF000000000000ULL), - "bswap.and7", IP); + ConstantInt::get(Type::ULongTy, + uint64_t(0xFF000000000000ULL)), + "bswap.and7", IP); Tmp6 = BinaryOperator::createAnd(Tmp6, - ConstantUInt::get(Type::ULongTy, 0xFF0000000000ULL), - "bswap.and6", IP); + ConstantInt::get(Type::ULongTy, + uint64_t(0xFF0000000000ULL)), + "bswap.and6", IP); Tmp5 = BinaryOperator::createAnd(Tmp5, - ConstantUInt::get(Type::ULongTy, 0xFF00000000ULL), - "bswap.and5", IP); + ConstantInt::get(Type::ULongTy, + uint64_t(0xFF00000000ULL)), + "bswap.and5", IP); Tmp4 = BinaryOperator::createAnd(Tmp4, - ConstantUInt::get(Type::ULongTy, 0xFF000000ULL), - "bswap.and4", IP); + ConstantInt::get(Type::ULongTy, + uint64_t(0xFF000000ULL)), + "bswap.and4", IP); Tmp3 = BinaryOperator::createAnd(Tmp3, - ConstantUInt::get(Type::ULongTy, 0xFF0000ULL), - "bswap.and3", IP); + ConstantInt::get(Type::ULongTy, + uint64_t(0xFF0000ULL)), + "bswap.and3", IP); Tmp2 = BinaryOperator::createAnd(Tmp2, - ConstantUInt::get(Type::ULongTy, 0xFF00ULL), - "bswap.and2", IP); + ConstantInt::get(Type::ULongTy, + uint64_t(0xFF00ULL)), + "bswap.and2", IP); Tmp8 = BinaryOperator::createOr(Tmp8, Tmp7, "bswap.or1", IP); Tmp6 = BinaryOperator::createOr(Tmp6, Tmp5, "bswap.or2", IP); Tmp4 = BinaryOperator::createOr(Tmp4, Tmp3, "bswap.or3", IP); @@ -247,8 +255,9 @@ unsigned BitSize = V->getType()->getPrimitiveSizeInBits(); for (unsigned i = 1, ct = 0; i != BitSize; i <<= 1, ++ct) { Value *MaskCst = - ConstantExpr::getCast(ConstantUInt::get(Type::ULongTy, - MaskValues[ct]), V->getType()); + ConstantExpr::getCast(ConstantInt::get(Type::ULongTy, + uint64_t(MaskValues[ct])), + V->getType()); Value *LHS = BinaryOperator::createAnd(V, MaskCst, "cppop.and1", IP); Value *VShift = new ShiftInst(Instruction::Shr, V, ConstantInt::get(Type::UByteTy, i), "ctpop.sh", IP); @@ -395,7 +404,7 @@ case Intrinsic::readcyclecounter: { std::cerr << "WARNING: this target does not support the llvm.readcyclecoun" << "ter intrinsic. It is being lowered to a constant 0\n"; - CI->replaceAllUsesWith(ConstantUInt::get(Type::ULongTy, 0)); + CI->replaceAllUsesWith(ConstantInt::get(Type::ULongTy, uint32_t(0))); break; } Index: llvm/lib/CodeGen/MachineDebugInfo.cpp diff -u llvm/lib/CodeGen/MachineDebugInfo.cpp:1.50 llvm/lib/CodeGen/MachineDebugInfo.cpp:1.50.2.1 --- llvm/lib/CodeGen/MachineDebugInfo.cpp:1.50 Tue Oct 17 18:16:42 2006 +++ llvm/lib/CodeGen/MachineDebugInfo.cpp Wed Oct 18 22:57:55 2006 @@ -120,7 +120,7 @@ /// getUIntOperand - Return ith operand if it is an unsigned integer. /// -static ConstantUInt *getUIntOperand(GlobalVariable *GV, unsigned i) { +static ConstantInt *getUIntOperand(GlobalVariable *GV, unsigned i) { // Make sure the GlobalVariable has an initializer. if (!GV->hasInitializer()) return NULL; @@ -133,8 +133,9 @@ if (i >= N) return NULL; // Check constant. - return dyn_cast(CI->getOperand(i)); + return dyn_cast(CI->getOperand(i)); } + //===----------------------------------------------------------------------===// /// ApplyToFields - Target the visitor to each field of the debug information @@ -192,19 +193,19 @@ /// virtual void Apply(int &Field) { Constant *C = CI->getOperand(I++); - Field = cast(C)->getValue(); + Field = cast(C)->getSExtValue(); } virtual void Apply(unsigned &Field) { Constant *C = CI->getOperand(I++); - Field = cast(C)->getValue(); + Field = cast(C)->getZExtValue(); } virtual void Apply(int64_t &Field) { Constant *C = CI->getOperand(I++); - Field = cast(C)->getValue(); + Field = cast(C)->getSExtValue(); } virtual void Apply(uint64_t &Field) { Constant *C = CI->getOperand(I++); - Field = cast(C)->getValue(); + Field = cast(C)->getZExtValue(); } virtual void Apply(bool &Field) { Constant *C = CI->getOperand(I++); @@ -261,16 +262,16 @@ /// Apply - Set the value of each of the fields. /// virtual void Apply(int &Field) { - Elements.push_back(ConstantSInt::get(Type::IntTy, Field)); + Elements.push_back(ConstantInt::get(Type::IntTy, int32_t(Field))); } virtual void Apply(unsigned &Field) { - Elements.push_back(ConstantUInt::get(Type::UIntTy, Field)); + Elements.push_back(ConstantInt::get(Type::UIntTy, uint32_t(Field))); } virtual void Apply(int64_t &Field) { - Elements.push_back(ConstantSInt::get(Type::LongTy, Field)); + Elements.push_back(ConstantInt::get(Type::LongTy, int64_t(Field))); } virtual void Apply(uint64_t &Field) { - Elements.push_back(ConstantUInt::get(Type::ULongTy, Field)); + Elements.push_back(ConstantInt::get(Type::ULongTy, uint64_t(Field))); } virtual void Apply(bool &Field) { Elements.push_back(ConstantBool::get(Field)); @@ -467,8 +468,8 @@ /// TagFromGlobal - Returns the tag number from a debug info descriptor /// GlobalVariable. Return DIIValid if operand is not an unsigned int. unsigned DebugInfoDesc::TagFromGlobal(GlobalVariable *GV) { - ConstantUInt *C = getUIntOperand(GV, 0); - return C ? ((unsigned)C->getValue() & ~LLVMDebugVersionMask) : + ConstantInt *C = getUIntOperand(GV, 0); + return C ? ((unsigned)C->getZExtValue() & ~LLVMDebugVersionMask) : (unsigned)DW_TAG_invalid; } @@ -476,8 +477,8 @@ /// descriptor GlobalVariable. Return DIIValid if operand is not an unsigned /// int. unsigned DebugInfoDesc::VersionFromGlobal(GlobalVariable *GV) { - ConstantUInt *C = getUIntOperand(GV, 0); - return C ? ((unsigned)C->getValue() & LLVMDebugVersionMask) : + ConstantInt *C = getUIntOperand(GV, 0); + return C ? ((unsigned)C->getZExtValue() & LLVMDebugVersionMask) : (unsigned)DW_TAG_invalid; } From reid at x10sys.com Wed Oct 18 22:58:57 2006 From: reid at x10sys.com (Reid Spencer) Date: Wed, 18 Oct 2006 22:58:57 -0500 Subject: [llvm-commits] [SignlessTypes] CVS: llvm/lib/Analysis/BasicAliasAnalysis.cpp ConstantFolding.cpp ConstantRange.cpp ScalarEvolution.cpp Message-ID: <200610190358.k9J3wvq1003810@zion.cs.uiuc.edu> Changes in directory llvm/lib/Analysis: BasicAliasAnalysis.cpp updated: 1.86 -> 1.86.2.1 ConstantFolding.cpp updated: 1.4 -> 1.4.4.1 ConstantRange.cpp updated: 1.15 -> 1.15.2.1 ScalarEvolution.cpp updated: 1.53 -> 1.53.2.1 --- Log message: For PR950: http://llvm.org/PR950 : This commit (on SignlessTypes branch) provides the first Iteration for moving LLVM away from Signed types. This patch removes the ConstantSInt and ConstantUInt classes from Type.h and makes all necessary changes in LLVM to compensate. --- Diffs of the changes: (+23 -23) BasicAliasAnalysis.cpp | 11 +++++------ ConstantFolding.cpp | 11 ++++++----- ConstantRange.cpp | 2 +- ScalarEvolution.cpp | 22 +++++++++++----------- 4 files changed, 23 insertions(+), 23 deletions(-) Index: llvm/lib/Analysis/BasicAliasAnalysis.cpp diff -u llvm/lib/Analysis/BasicAliasAnalysis.cpp:1.86 llvm/lib/Analysis/BasicAliasAnalysis.cpp:1.86.2.1 --- llvm/lib/Analysis/BasicAliasAnalysis.cpp:1.86 Wed Oct 4 16:52:35 2006 +++ llvm/lib/Analysis/BasicAliasAnalysis.cpp Wed Oct 18 22:57:55 2006 @@ -468,11 +468,10 @@ /// CheckGEPInstructions - Check two GEP instructions with known must-aliasing /// base pointers. This checks to see if the index expressions preclude the /// pointers from aliasing... -AliasAnalysis::AliasResult BasicAliasAnalysis:: -CheckGEPInstructions(const Type* BasePtr1Ty, std::vector &GEP1Ops, - unsigned G1S, - const Type *BasePtr2Ty, std::vector &GEP2Ops, - unsigned G2S) { +AliasAnalysis::AliasResult +BasicAliasAnalysis::CheckGEPInstructions( + const Type* BasePtr1Ty, std::vector &GEP1Ops, unsigned G1S, + const Type *BasePtr2Ty, std::vector &GEP2Ops, unsigned G2S) { // We currently can't handle the case when the base pointers have different // primitive types. Since this is uncommon anyway, we are happy being // extremely conservative. @@ -685,7 +684,7 @@ // value possible. // if (const ArrayType *AT = dyn_cast(BasePtr1Ty)) - GEP1Ops[i] = ConstantSInt::get(Type::LongTy,AT->getNumElements()-1); + GEP1Ops[i] = ConstantInt::get(Type::LongTy, AT->getNumElements()-1); } } Index: llvm/lib/Analysis/ConstantFolding.cpp diff -u llvm/lib/Analysis/ConstantFolding.cpp:1.4 llvm/lib/Analysis/ConstantFolding.cpp:1.4.4.1 --- llvm/lib/Analysis/ConstantFolding.cpp:1.4 Sat Jun 17 13:17:52 2006 +++ llvm/lib/Analysis/ConstantFolding.cpp Wed Oct 18 22:57:55 2006 @@ -163,14 +163,15 @@ default: break; } - } else if (ConstantUInt *Op = dyn_cast(Operands[0])) { - uint64_t V = Op->getValue(); + } else if (ConstantInt *Op = dyn_cast(Operands[0])) { + assert(Op->getType()->isUnsigned() && "bswap args must be unsigned"); + uint64_t V = Op->getZExtValue(); if (Name == "llvm.bswap.i16") - return ConstantUInt::get(Ty, ByteSwap_16(V)); + return ConstantInt::get(Ty, ByteSwap_16(V)); else if (Name == "llvm.bswap.i32") - return ConstantUInt::get(Ty, ByteSwap_32(V)); + return ConstantInt::get(Ty, ByteSwap_32(V)); else if (Name == "llvm.bswap.i64") - return ConstantUInt::get(Ty, ByteSwap_64(V)); + return ConstantInt::get(Ty, ByteSwap_64(V)); } } else if (Operands.size() == 2) { if (ConstantFP *Op1 = dyn_cast(Operands[0])) { Index: llvm/lib/Analysis/ConstantRange.cpp diff -u llvm/lib/Analysis/ConstantRange.cpp:1.15 llvm/lib/Analysis/ConstantRange.cpp:1.15.2.1 --- llvm/lib/Analysis/ConstantRange.cpp:1.15 Thu Sep 28 18:14:29 2006 +++ llvm/lib/Analysis/ConstantRange.cpp Wed Oct 18 22:57:55 2006 @@ -288,7 +288,7 @@ // Change a source full set into [0, 1 << 8*numbytes) unsigned SrcTySize = getLower()->getType()->getPrimitiveSize(); return ConstantRange(Constant::getNullValue(Ty), - ConstantUInt::get(Ty, 1ULL << SrcTySize*8)); + ConstantInt::get(Ty, 1ULL << SrcTySize*8)); } Constant *Lower = getLower(); Index: llvm/lib/Analysis/ScalarEvolution.cpp diff -u llvm/lib/Analysis/ScalarEvolution.cpp:1.53 llvm/lib/Analysis/ScalarEvolution.cpp:1.53.2.1 --- llvm/lib/Analysis/ScalarEvolution.cpp:1.53 Wed Oct 4 16:49:37 2006 +++ llvm/lib/Analysis/ScalarEvolution.cpp Wed Oct 18 22:57:55 2006 @@ -177,7 +177,7 @@ // Make sure that SCEVConstant instances are all unsigned. if (V->getType()->isSigned()) { const Type *NewTy = V->getType()->getUnsignedVersion(); - V = cast(ConstantExpr::getCast(V, NewTy)); + V = cast(ConstantExpr::getCast(V, NewTy)); } SCEVConstant *&R = (*SCEVConstants)[V]; @@ -463,9 +463,9 @@ else if (Ty->isFloatingPoint()) C = ConstantFP::get(Ty, Val); else if (Ty->isSigned()) - C = ConstantSInt::get(Ty, Val); + C = ConstantInt::get(Ty, Val); else { - C = ConstantSInt::get(Ty->getSignedVersion(), Val); + C = ConstantInt::get(Ty->getSignedVersion(), Val); C = ConstantExpr::getCast(C, Ty); } return SCEVUnknown::get(C); @@ -511,7 +511,7 @@ uint64_t Result = 1; for (; NumSteps; --NumSteps) Result *= Val-(NumSteps-1); - Constant *Res = ConstantUInt::get(Type::ULongTy, Result); + Constant *Res = ConstantInt::get(Type::ULongTy, Result); return SCEVUnknown::get(ConstantExpr::getCast(Res, V->getType())); } @@ -1679,8 +1679,8 @@ unsigned MaxSteps = MaxBruteForceIterations; for (unsigned IterationNum = 0; IterationNum != MaxSteps; ++IterationNum) { - ConstantUInt *ItCst = - ConstantUInt::get(IdxExpr->getType()->getUnsignedVersion(), IterationNum); + ConstantInt *ItCst = + ConstantInt::get(IdxExpr->getType()->getUnsignedVersion(), IterationNum); ConstantInt *Val = EvaluateConstantChrecAtConstant(IdxExpr, ItCst); // Form the GEP offset. @@ -1896,7 +1896,7 @@ if (CondVal->getValue() == ExitWhen) { ConstantEvolutionLoopExitValue[PN] = PHIVal; ++NumBruteForceTripCountsComputed; - return SCEVConstant::get(ConstantUInt::get(Type::UIntTy, IterationNum)); + return SCEVConstant::get(ConstantInt::get(Type::UIntTy, IterationNum)); } // Compute the value of the PHI node for the next iteration. @@ -2076,10 +2076,10 @@ SqrtTerm = ConstantExpr::getSub(ConstantExpr::getMul(B, B), SqrtTerm); // Compute floor(sqrt(B^2-4ac)) - ConstantUInt *SqrtVal = - cast(ConstantExpr::getCast(SqrtTerm, + ConstantInt *SqrtVal = + cast(ConstantExpr::getCast(SqrtTerm, SqrtTerm->getType()->getUnsignedVersion())); - uint64_t SqrtValV = SqrtVal->getValue(); + uint64_t SqrtValV = SqrtVal->getZExtValue(); uint64_t SqrtValV2 = (uint64_t)sqrt((double)SqrtValV); // The square root might not be precise for arbitrary 64-bit integer // values. Do some sanity checks to ensure it's correct. @@ -2089,7 +2089,7 @@ return std::make_pair(CNC, CNC); } - SqrtVal = ConstantUInt::get(Type::ULongTy, SqrtValV2); + SqrtVal = ConstantInt::get(Type::ULongTy, SqrtValV2); SqrtTerm = ConstantExpr::getCast(SqrtVal, SqrtTerm->getType()); Constant *NegB = ConstantExpr::getNeg(B); From reid at x10sys.com Wed Oct 18 22:58:57 2006 From: reid at x10sys.com (Reid Spencer) Date: Wed, 18 Oct 2006 22:58:57 -0500 Subject: [llvm-commits] [SignlessTypes] CVS: llvm/lib/Target/TargetData.cpp Message-ID: <200610190358.k9J3wvra003771@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target: TargetData.cpp updated: 1.70 -> 1.70.4.1 --- Log message: For PR950: http://llvm.org/PR950 : This commit (on SignlessTypes branch) provides the first Iteration for moving LLVM away from Signed types. This patch removes the ConstantSInt and ConstantUInt classes from Type.h and makes all necessary changes in LLVM to compensate. --- Diffs of the changes: (+1 -1) TargetData.cpp | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/lib/Target/TargetData.cpp diff -u llvm/lib/Target/TargetData.cpp:1.70 llvm/lib/Target/TargetData.cpp:1.70.4.1 --- llvm/lib/Target/TargetData.cpp:1.70 Fri Jun 16 13:22:52 2006 +++ llvm/lib/Target/TargetData.cpp Wed Oct 18 22:57:56 2006 @@ -330,7 +330,7 @@ for (unsigned CurIDX = 0; CurIDX != Idx.size(); ++CurIDX, ++TI) { if (const StructType *STy = dyn_cast(*TI)) { assert(Idx[CurIDX]->getType() == Type::UIntTy && "Illegal struct idx"); - unsigned FieldNo = cast(Idx[CurIDX])->getValue(); + unsigned FieldNo = cast(Idx[CurIDX])->getZExtValue(); // Get structure layout information... const StructLayout *Layout = getStructLayout(STy); From reid at x10sys.com Wed Oct 18 22:58:57 2006 From: reid at x10sys.com (Reid Spencer) Date: Wed, 18 Oct 2006 22:58:57 -0500 Subject: [llvm-commits] [SignlessTypes] CVS: llvm/lib/Bytecode/Writer/Writer.cpp Message-ID: <200610190358.k9J3wvOC003773@zion.cs.uiuc.edu> Changes in directory llvm/lib/Bytecode/Writer: Writer.cpp updated: 1.124 -> 1.124.2.1 --- Log message: For PR950: http://llvm.org/PR950 : This commit (on SignlessTypes branch) provides the first Iteration for moving LLVM away from Signed types. This patch removes the ConstantSInt and ConstantUInt classes from Type.h and makes all necessary changes in LLVM to compensate. --- Diffs of the changes: (+6 -6) Writer.cpp | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) Index: llvm/lib/Bytecode/Writer/Writer.cpp diff -u llvm/lib/Bytecode/Writer/Writer.cpp:1.124 llvm/lib/Bytecode/Writer/Writer.cpp:1.124.2.1 --- llvm/lib/Bytecode/Writer/Writer.cpp:1.124 Thu Sep 14 13:23:26 2006 +++ llvm/lib/Bytecode/Writer/Writer.cpp Wed Oct 18 22:57:55 2006 @@ -293,7 +293,7 @@ assert(CE->getNumOperands() > 0 && "ConstantExpr with 0 operands"); assert(CE->getNumOperands() != 1 || CE->getOpcode() == Instruction::Cast); output_vbr(1+CE->getNumOperands()); // flags as an expr - output_vbr(CE->getOpcode()); // flags as an expr + output_vbr(CE->getOpcode()); // Put out the CE op code for (User::const_op_iterator OI = CE->op_begin(); OI != CE->op_end(); ++OI){ int Slot = Table.getSlot(*OI); @@ -307,7 +307,7 @@ output_vbr(1U); // 1 -> UndefValue constant. return; } else { - output_vbr(0U); // flag as not a ConstantExpr + output_vbr(0U); // flag as not a ConstantExpr (i.e. 0 operands) } switch (CPV->getType()->getTypeID()) { @@ -322,14 +322,14 @@ case Type::UShortTyID: case Type::UIntTyID: case Type::ULongTyID: - output_vbr(cast(CPV)->getValue()); + output_vbr(cast(CPV)->getZExtValue()); break; case Type::SByteTyID: // Signed integer types... case Type::ShortTyID: case Type::IntTyID: case Type::LongTyID: - output_vbr(cast(CPV)->getValue()); + output_vbr(cast(CPV)->getSExtValue()); break; case Type::ArrayTyID: { @@ -881,11 +881,11 @@ // FIXME: Most slabs only have 1 or 2 entries! We should encode this much // more compactly. - // Output type header: [num entries][type id number] + // Put out type header: [num entries][type id number] // output_vbr(NC); - // Output the Type ID Number... + // Put out the Type ID Number... int Slot = Table.getSlot(Plane.front()->getType()); assert (Slot != -1 && "Type in constant pool but not in function!!"); output_typeid((unsigned)Slot); From reid at x10sys.com Wed Oct 18 22:58:57 2006 From: reid at x10sys.com (Reid Spencer) Date: Wed, 18 Oct 2006 22:58:57 -0500 Subject: [llvm-commits] [SignlessTypes] CVS: llvm/lib/Transforms/IPO/GlobalOpt.cpp LowerSetJmp.cpp SimplifyLibCalls.cpp Message-ID: <200610190358.k9J3wvxl003795@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/IPO: GlobalOpt.cpp updated: 1.68 -> 1.68.2.1 LowerSetJmp.cpp updated: 1.29 -> 1.29.2.1 SimplifyLibCalls.cpp updated: 1.69 -> 1.69.2.1 --- Log message: For PR950: http://llvm.org/PR950 : This commit (on SignlessTypes branch) provides the first Iteration for moving LLVM away from Signed types. This patch removes the ConstantSInt and ConstantUInt classes from Type.h and makes all necessary changes in LLVM to compensate. --- Diffs of the changes: (+62 -62) GlobalOpt.cpp | 20 +++++----- LowerSetJmp.cpp | 4 +- SimplifyLibCalls.cpp | 100 +++++++++++++++++++++++++-------------------------- 3 files changed, 62 insertions(+), 62 deletions(-) Index: llvm/lib/Transforms/IPO/GlobalOpt.cpp diff -u llvm/lib/Transforms/IPO/GlobalOpt.cpp:1.68 llvm/lib/Transforms/IPO/GlobalOpt.cpp:1.68.2.1 --- llvm/lib/Transforms/IPO/GlobalOpt.cpp:1.68 Sat Sep 30 18:32:50 2006 +++ llvm/lib/Transforms/IPO/GlobalOpt.cpp Wed Oct 18 22:57:56 2006 @@ -384,7 +384,7 @@ NewGlobals.reserve(STy->getNumElements()); for (unsigned i = 0, e = STy->getNumElements(); i != e; ++i) { Constant *In = getAggregateConstantElement(Init, - ConstantUInt::get(Type::UIntTy, i)); + ConstantInt::get(Type::UIntTy, i)); assert(In && "Couldn't get element of initializer?"); GlobalVariable *NGV = new GlobalVariable(STy->getElementType(i), false, GlobalVariable::InternalLinkage, @@ -406,7 +406,7 @@ NewGlobals.reserve(NumElements); for (unsigned i = 0, e = NumElements; i != e; ++i) { Constant *In = getAggregateConstantElement(Init, - ConstantUInt::get(Type::UIntTy, i)); + ConstantInt::get(Type::UIntTy, i)); assert(In && "Couldn't get element of initializer?"); GlobalVariable *NGV = new GlobalVariable(STy->getElementType(), false, @@ -886,11 +886,12 @@ // Otherwise, this should be: 'getelementptr Ptr, Idx, uint FieldNo ...' GetElementPtrInst *GEPI = cast(User); - assert(GEPI->getNumOperands() >= 3 && isa(GEPI->getOperand(2)) + assert(GEPI->getNumOperands() >= 3 && isa(GEPI->getOperand(2)) + && GEPI->getOperand(2)->getType()->isUnsigned() && "Unexpected GEPI!"); // Load the pointer for this field. - unsigned FieldNo = cast(GEPI->getOperand(2))->getValue(); + unsigned FieldNo = cast(GEPI->getOperand(2))->getZExtValue(); if (InsertedLoadsForPtr.size() <= FieldNo) InsertedLoadsForPtr.resize(FieldNo+1); if (InsertedLoadsForPtr[FieldNo] == 0) @@ -1461,7 +1462,7 @@ const std::vector &Ctors) { // If we made a change, reassemble the initializer list. std::vector CSVals; - CSVals.push_back(ConstantSInt::get(Type::IntTy, 65535)); + CSVals.push_back(ConstantInt::get(Type::IntTy, 65535)); CSVals.push_back(0); // Create the new init list. @@ -1474,7 +1475,7 @@ std::vector(), false); const PointerType *PFTy = PointerType::get(FTy); CSVals[1] = Constant::getNullValue(PFTy); - CSVals[0] = ConstantSInt::get(Type::IntTy, 2147483647); + CSVals[0] = ConstantInt::get(Type::IntTy, 2147483647); } CAList.push_back(ConstantStruct::get(CSVals)); } @@ -1575,10 +1576,9 @@ } // Replace the element that we are supposed to. - ConstantUInt *CU = cast(Addr->getOperand(OpNo)); - assert(CU->getValue() < STy->getNumElements() && - "Struct index out of range!"); - unsigned Idx = (unsigned)CU->getValue(); + ConstantInt *CU = cast(Addr->getOperand(OpNo)); + unsigned Idx = (unsigned)CU->getZExtValue(); + assert(Idx < STy->getNumElements() && "Struct index out of range!"); Elts[Idx] = EvaluateStoreInto(Elts[Idx], Val, Addr, OpNo+1); // Return the modified struct. Index: llvm/lib/Transforms/IPO/LowerSetJmp.cpp diff -u llvm/lib/Transforms/IPO/LowerSetJmp.cpp:1.29 llvm/lib/Transforms/IPO/LowerSetJmp.cpp:1.29.2.1 --- llvm/lib/Transforms/IPO/LowerSetJmp.cpp:1.29 Sun Aug 27 17:42:52 2006 +++ llvm/lib/Transforms/IPO/LowerSetJmp.cpp Wed Oct 18 22:57:56 2006 @@ -378,7 +378,7 @@ CastInst* BufPtr = new CastInst(Inst->getOperand(1), SBPTy, "SBJmpBuf", Inst); new CallInst(AddSJToMap, make_vector(GetSetJmpMap(Func), BufPtr, - ConstantUInt::get(Type::UIntTy, + ConstantInt::get(Type::UIntTy, SetJmpIDMap[Func]++), 0), "", Inst); @@ -429,7 +429,7 @@ // Add the case for this setjmp's number... SwitchValuePair SVP = GetSJSwitch(Func, GetRethrowBB(Func)); - SVP.first->addCase(ConstantUInt::get(Type::UIntTy, SetJmpIDMap[Func] - 1), + SVP.first->addCase(ConstantInt::get(Type::UIntTy, SetJmpIDMap[Func] - 1), SetJmpContBlock); // Value coming from the handling of the exception. Index: llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp diff -u llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp:1.69 llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp:1.69.2.1 --- llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp:1.69 Thu Sep 14 13:23:27 2006 +++ llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp Wed Oct 18 22:57:56 2006 @@ -517,8 +517,8 @@ std::vector vals; vals.push_back(gep); // destination vals.push_back(ci->getOperand(2)); // source - vals.push_back(ConstantUInt::get(SLC.getIntPtrType(),len)); // length - vals.push_back(ConstantUInt::get(Type::UIntTy,1)); // alignment + vals.push_back(ConstantInt::get(SLC.getIntPtrType(),len)); // length + vals.push_back(ConstantInt::get(Type::UIntTy,1)); // alignment new CallInst(SLC.get_memcpy(), vals, "", ci); // Finally, substitute the first operand of the strcat call for the @@ -556,38 +556,38 @@ // Check that the first argument to strchr is a constant array of sbyte. // If it is, get the length and data, otherwise return false. uint64_t len = 0; - ConstantArray* CA; + ConstantArray* CA = 0; if (!getConstantStringLength(ci->getOperand(1),len,&CA)) return false; - // Check that the second argument to strchr is a constant int, return false - // if it isn't - ConstantSInt* CSI = dyn_cast(ci->getOperand(2)); - if (!CSI) { - // Just lower this to memchr since we know the length of the string as - // it is constant. + // Check that the second argument to strchr is a constant int. If it isn't + // a constant signed integer, we can try an alternate optimization + ConstantInt* CSI = dyn_cast(ci->getOperand(2)); + if (!CSI || CSI->getType()->isUnsigned() ) { + // The second operand is not constant, or not signed. Just lower this to + // memchr since we know the length of the string since it is constant. Function* f = SLC.get_memchr(); std::vector args; args.push_back(ci->getOperand(1)); args.push_back(ci->getOperand(2)); - args.push_back(ConstantUInt::get(SLC.getIntPtrType(),len)); + args.push_back(ConstantInt::get(SLC.getIntPtrType(),len)); ci->replaceAllUsesWith( new CallInst(f,args,ci->getName(),ci)); ci->eraseFromParent(); return true; } // Get the character we're looking for - int64_t chr = CSI->getValue(); + int64_t chr = CSI->getSExtValue(); // Compute the offset uint64_t offset = 0; bool char_found = false; for (uint64_t i = 0; i < len; ++i) { - if (ConstantSInt* CI = dyn_cast(CA->getOperand(i))) { + if (ConstantInt* CI = dyn_cast(CA->getOperand(i))) { // Check for the null terminator if (CI->isNullValue()) break; // we found end of string - else if (CI->getValue() == chr) { + else if (CI->getSExtValue() == chr) { char_found = true; offset = i; break; @@ -599,7 +599,7 @@ // (if c is a constant integer and s is a constant string) if (char_found) { std::vector indices; - indices.push_back(ConstantUInt::get(Type::ULongTy,offset)); + indices.push_back(ConstantInt::get(Type::ULongTy,offset)); GetElementPtrInst* GEP = new GetElementPtrInst(ci->getOperand(1),indices, ci->getOperand(1)->getName()+".strchr",ci); ci->replaceAllUsesWith(GEP); @@ -679,7 +679,7 @@ std::string str1 = A1->getAsString(); std::string str2 = A2->getAsString(); int result = strcmp(str1.c_str(), str2.c_str()); - ci->replaceAllUsesWith(ConstantSInt::get(Type::IntTy,result)); + ci->replaceAllUsesWith(ConstantInt::get(Type::IntTy,result)); ci->eraseFromParent(); return true; } @@ -769,7 +769,7 @@ std::string str1 = A1->getAsString(); std::string str2 = A2->getAsString(); int result = strncmp(str1.c_str(), str2.c_str(), len_arg); - ci->replaceAllUsesWith(ConstantSInt::get(Type::IntTy,result)); + ci->replaceAllUsesWith(ConstantInt::get(Type::IntTy,result)); ci->eraseFromParent(); return true; } @@ -843,8 +843,8 @@ std::vector vals; vals.push_back(dest); // destination vals.push_back(src); // source - vals.push_back(ConstantUInt::get(SLC.getIntPtrType(),len)); // length - vals.push_back(ConstantUInt::get(Type::UIntTy,1)); // alignment + vals.push_back(ConstantInt::get(SLC.getIntPtrType(),len)); // length + vals.push_back(ConstantInt::get(Type::UIntTy,1)); // alignment new CallInst(SLC.get_memcpy(), vals, "", ci); // Finally, substitute the first operand of the strcat call for the @@ -902,7 +902,7 @@ // strlen(x) == 0 -> *x == 0 LoadInst* load = new LoadInst(str,str->getName()+".first",ci); BinaryOperator* rbop = BinaryOperator::create(bop->getOpcode(), - load, ConstantSInt::get(Type::SByteTy,0), + load, ConstantInt::get(Type::SByteTy,0), bop->getName()+".strlen", ci); bop->replaceAllUsesWith(rbop); bop->eraseFromParent(); @@ -919,9 +919,9 @@ // strlen("xyz") -> 3 (for example) const Type *Ty = SLC.getTargetData()->getIntPtrType(); if (Ty->isSigned()) - ci->replaceAllUsesWith(ConstantSInt::get(Ty, len)); + ci->replaceAllUsesWith(ConstantInt::get(Ty, len)); else - ci->replaceAllUsesWith(ConstantUInt::get(Ty, len)); + ci->replaceAllUsesWith(ConstantInt::get(Ty, len)); ci->eraseFromParent(); return true; @@ -1174,7 +1174,7 @@ // Make sure we have a constant ubyte to work with so we can extract // the value to be filled. - ConstantUInt* FILL = dyn_cast(ci->getOperand(2)); + ConstantInt* FILL = dyn_cast(ci->getOperand(2)); if (!FILL) return false; if (FILL->getType() != Type::UByteTy) @@ -1183,7 +1183,7 @@ // memset(s,c,n) -> store s, c (for n=1,2,4,8) // Extract the fill character - uint64_t fill_char = FILL->getValue(); + uint64_t fill_char = FILL->getZExtValue(); uint64_t fill_value = fill_char; // Get the type we will cast to, based on size of memory area to fill, and @@ -1215,7 +1215,7 @@ // Cast dest to the right sized primitive and then load/store CastInst* DestCast = new CastInst(dest,PointerType::get(castType),dest->getName()+".cast",ci); - new StoreInst(ConstantUInt::get(castType,fill_value),DestCast, ci); + new StoreInst(ConstantInt::get(castType,fill_value),DestCast, ci); ci->eraseFromParent(); return true; } @@ -1344,7 +1344,7 @@ std::vector args; args.push_back(CastToCStr(ci->getOperand(2), *ci)); new CallInst(puts_func,args,ci->getName(),ci); - ci->replaceAllUsesWith(ConstantSInt::get(Type::IntTy,len)); + ci->replaceAllUsesWith(ConstantInt::get(Type::IntTy,len)); break; } case 'c': @@ -1359,7 +1359,7 @@ CastInst* cast = new CastInst(ci->getOperand(2), Type::IntTy, CI->getName()+".int", ci); new CallInst(putchar_func, cast, "", ci); - ci->replaceAllUsesWith(ConstantSInt::get(Type::IntTy, 1)); + ci->replaceAllUsesWith(ConstantInt::get(Type::IntTy, 1)); break; } default: @@ -1430,11 +1430,11 @@ std::vector args; args.push_back(ci->getOperand(2)); - args.push_back(ConstantUInt::get(SLC.getIntPtrType(),len)); - args.push_back(ConstantUInt::get(SLC.getIntPtrType(),1)); + args.push_back(ConstantInt::get(SLC.getIntPtrType(),len)); + args.push_back(ConstantInt::get(SLC.getIntPtrType(),1)); args.push_back(ci->getOperand(1)); new CallInst(fwrite_func,args,ci->getName(),ci); - ci->replaceAllUsesWith(ConstantSInt::get(Type::IntTy,len)); + ci->replaceAllUsesWith(ConstantInt::get(Type::IntTy,len)); ci->eraseFromParent(); return true; } @@ -1464,11 +1464,11 @@ return false; std::vector args; args.push_back(CastToCStr(ci->getOperand(3), *ci)); - args.push_back(ConstantUInt::get(SLC.getIntPtrType(),len)); - args.push_back(ConstantUInt::get(SLC.getIntPtrType(),1)); + args.push_back(ConstantInt::get(SLC.getIntPtrType(),len)); + args.push_back(ConstantInt::get(SLC.getIntPtrType(),1)); args.push_back(ci->getOperand(1)); new CallInst(fwrite_func,args,ci->getName(),ci); - ci->replaceAllUsesWith(ConstantSInt::get(Type::IntTy,len)); + ci->replaceAllUsesWith(ConstantInt::get(Type::IntTy,len)); } else { // fprintf(file,"%s",str) -> fputs(str,file) const Type* FILEptr_type = ci->getOperand(1)->getType(); @@ -1479,7 +1479,7 @@ args.push_back(CastToCStr(ci->getOperand(3), *ci)); args.push_back(ci->getOperand(1)); new CallInst(fputs_func,args,ci->getName(),ci); - ci->replaceAllUsesWith(ConstantSInt::get(Type::IntTy,len)); + ci->replaceAllUsesWith(ConstantInt::get(Type::IntTy,len)); } break; } @@ -1493,7 +1493,7 @@ CastInst* cast = new CastInst(ci->getOperand(3), Type::IntTy, CI->getName()+".int", ci); new CallInst(fputc_func,cast,ci->getOperand(1),"",ci); - ci->replaceAllUsesWith(ConstantSInt::get(Type::IntTy,1)); + ci->replaceAllUsesWith(ConstantInt::get(Type::IntTy,1)); break; } default: @@ -1537,7 +1537,7 @@ if (len == 0) { // If the length is 0, we just need to store a null byte new StoreInst(ConstantInt::get(Type::SByteTy,0),ci->getOperand(1),ci); - ci->replaceAllUsesWith(ConstantSInt::get(Type::IntTy,0)); + ci->replaceAllUsesWith(ConstantInt::get(Type::IntTy,0)); ci->eraseFromParent(); return true; } @@ -1563,10 +1563,10 @@ std::vector args; args.push_back(ci->getOperand(1)); args.push_back(ci->getOperand(2)); - args.push_back(ConstantUInt::get(SLC.getIntPtrType(),len)); - args.push_back(ConstantUInt::get(Type::UIntTy,1)); + args.push_back(ConstantInt::get(SLC.getIntPtrType(),len)); + args.push_back(ConstantInt::get(Type::UIntTy,1)); new CallInst(memcpy_func,args,"",ci); - ci->replaceAllUsesWith(ConstantSInt::get(Type::IntTy,len)); + ci->replaceAllUsesWith(ConstantInt::get(Type::IntTy,len)); ci->eraseFromParent(); return true; } @@ -1602,7 +1602,7 @@ args.push_back(CastToCStr(ci->getOperand(1), *ci)); args.push_back(CastToCStr(ci->getOperand(3), *ci)); args.push_back(Len1); - args.push_back(ConstantUInt::get(Type::UIntTy,1)); + args.push_back(ConstantInt::get(Type::UIntTy,1)); new CallInst(memcpy_func, args, "", ci); // The strlen result is the unincremented number of bytes in the string. @@ -1619,10 +1619,10 @@ CastInst* cast = new CastInst(ci->getOperand(3),Type::SByteTy,"char",ci); new StoreInst(cast, ci->getOperand(1), ci); GetElementPtrInst* gep = new GetElementPtrInst(ci->getOperand(1), - ConstantUInt::get(Type::UIntTy,1),ci->getOperand(1)->getName()+".end", + ConstantInt::get(Type::UIntTy,1),ci->getOperand(1)->getName()+".end", ci); new StoreInst(ConstantInt::get(Type::SByteTy,0),gep,ci); - ci->replaceAllUsesWith(ConstantSInt::get(Type::IntTy,1)); + ci->replaceAllUsesWith(ConstantInt::get(Type::IntTy,1)); ci->eraseFromParent(); return true; } @@ -1686,8 +1686,8 @@ return false; std::vector parms; parms.push_back(ci->getOperand(1)); - parms.push_back(ConstantUInt::get(SLC.getIntPtrType(),len)); - parms.push_back(ConstantUInt::get(SLC.getIntPtrType(),1)); + parms.push_back(ConstantInt::get(SLC.getIntPtrType(),len)); + parms.push_back(ConstantInt::get(SLC.getIntPtrType(),1)); parms.push_back(ci->getOperand(2)); new CallInst(fwrite_func,parms,"",ci); break; @@ -1718,9 +1718,9 @@ // isdigit(c) -> 0 or 1, if 'c' is constant uint64_t val = CI->getRawValue(); if (val >= '0' && val <='9') - ci->replaceAllUsesWith(ConstantSInt::get(Type::IntTy,1)); + ci->replaceAllUsesWith(ConstantInt::get(Type::IntTy,1)); else - ci->replaceAllUsesWith(ConstantSInt::get(Type::IntTy,0)); + ci->replaceAllUsesWith(ConstantInt::get(Type::IntTy,0)); ci->eraseFromParent(); return true; } @@ -1730,10 +1730,10 @@ new CastInst(ci->getOperand(1),Type::UIntTy, ci->getOperand(1)->getName()+".uint",ci); BinaryOperator* sub_inst = BinaryOperator::createSub(cast, - ConstantUInt::get(Type::UIntTy,0x30), + ConstantInt::get(Type::UIntTy,0x30), ci->getOperand(1)->getName()+".sub",ci); SetCondInst* setcond_inst = new SetCondInst(Instruction::SetLE,sub_inst, - ConstantUInt::get(Type::UIntTy,9), + ConstantInt::get(Type::UIntTy,9), ci->getOperand(1)->getName()+".cmp",ci); CastInst* c2 = new CastInst(setcond_inst,Type::IntTy, @@ -1760,7 +1760,7 @@ Value *V = CI->getOperand(1); if (V->getType()->isSigned()) V = new CastInst(V, V->getType()->getUnsignedVersion(), V->getName(), CI); - Value *Cmp = BinaryOperator::createSetLT(V, ConstantUInt::get(V->getType(), + Value *Cmp = BinaryOperator::createSetLT(V, ConstantInt::get(V->getType(), 128), V->getName()+".isascii", CI); if (Cmp->getType() != CI->getType()) @@ -1837,7 +1837,7 @@ val >>= 1; } } - TheCall->replaceAllUsesWith(ConstantSInt::get(Type::IntTy, result)); + TheCall->replaceAllUsesWith(ConstantInt::get(Type::IntTy, result)); TheCall->eraseFromParent(); return true; } @@ -1861,7 +1861,7 @@ Value *V = new CastInst(TheCall->getOperand(1), ArgType, "tmp", TheCall); Value *V2 = new CallInst(F, V, "tmp", TheCall); V2 = new CastInst(V2, Type::IntTy, "tmp", TheCall); - V2 = BinaryOperator::createAdd(V2, ConstantSInt::get(Type::IntTy, 1), + V2 = BinaryOperator::createAdd(V2, ConstantInt::get(Type::IntTy, 1), "tmp", TheCall); Value *Cond = BinaryOperator::createSetEQ(V, Constant::getNullValue(V->getType()), From reid at x10sys.com Wed Oct 18 22:58:57 2006 From: reid at x10sys.com (Reid Spencer) Date: Wed, 18 Oct 2006 22:58:57 -0500 Subject: [llvm-commits] [SignlessTypes] CVS: llvm/lib/Transforms/Utils/CodeExtractor.cpp Local.cpp LowerAllocations.cpp LowerInvoke.cpp LowerSwitch.cpp Message-ID: <200610190358.k9J3wvB4003837@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Utils: CodeExtractor.cpp updated: 1.40 -> 1.40.2.1 Local.cpp updated: 1.58 -> 1.58.4.1 LowerAllocations.cpp updated: 1.61 -> 1.61.2.1 LowerInvoke.cpp updated: 1.41 -> 1.41.2.1 LowerSwitch.cpp updated: 1.24 -> 1.24.2.1 --- Log message: For PR950: http://llvm.org/PR950 : This commit (on SignlessTypes branch) provides the first Iteration for moving LLVM away from Signed types. This patch removes the ConstantSInt and ConstantUInt classes from Type.h and makes all necessary changes in LLVM to compensate. --- Diffs of the changes: (+20 -19) CodeExtractor.cpp | 14 +++++++------- Local.cpp | 6 +++--- LowerAllocations.cpp | 2 +- LowerInvoke.cpp | 8 ++++---- LowerSwitch.cpp | 9 +++++---- 5 files changed, 20 insertions(+), 19 deletions(-) Index: llvm/lib/Transforms/Utils/CodeExtractor.cpp diff -u llvm/lib/Transforms/Utils/CodeExtractor.cpp:1.40 llvm/lib/Transforms/Utils/CodeExtractor.cpp:1.40.2.1 --- llvm/lib/Transforms/Utils/CodeExtractor.cpp:1.40 Thu Sep 28 17:58:25 2006 +++ llvm/lib/Transforms/Utils/CodeExtractor.cpp Wed Oct 18 22:57:56 2006 @@ -305,7 +305,7 @@ if (AggregateArgs) { std::vector Indices; Indices.push_back(Constant::getNullValue(Type::UIntTy)); - Indices.push_back(ConstantUInt::get(Type::UIntTy, i)); + Indices.push_back(ConstantInt::get(Type::UIntTy, i)); std::string GEPname = "gep_" + inputs[i]->getName(); TerminatorInst *TI = newFunction->begin()->getTerminator(); GetElementPtrInst *GEP = new GetElementPtrInst(AI, Indices, GEPname, TI); @@ -392,7 +392,7 @@ for (unsigned i = 0, e = inputs.size(); i != e; ++i) { std::vector Indices; Indices.push_back(Constant::getNullValue(Type::UIntTy)); - Indices.push_back(ConstantUInt::get(Type::UIntTy, i)); + Indices.push_back(ConstantInt::get(Type::UIntTy, i)); GetElementPtrInst *GEP = new GetElementPtrInst(Struct, Indices, "gep_" + StructValues[i]->getName()); @@ -418,7 +418,7 @@ if (AggregateArgs) { std::vector Indices; Indices.push_back(Constant::getNullValue(Type::UIntTy)); - Indices.push_back(ConstantUInt::get(Type::UIntTy, FirstOut + i)); + Indices.push_back(ConstantInt::get(Type::UIntTy, FirstOut + i)); GetElementPtrInst *GEP = new GetElementPtrInst(Struct, Indices, "gep_reload_" + outputs[i]->getName()); @@ -439,7 +439,7 @@ // Now we can emit a switch statement using the call as a value. SwitchInst *TheSwitch = - new SwitchInst(ConstantUInt::getNullValue(Type::UShortTy), + new SwitchInst(ConstantInt::getNullValue(Type::UShortTy), codeReplacer, 0, codeReplacer); // Since there may be multiple exits from the original region, make the new @@ -473,14 +473,14 @@ brVal = ConstantBool::get(!SuccNum); break; default: - brVal = ConstantUInt::get(Type::UShortTy, SuccNum); + brVal = ConstantInt::get(Type::UShortTy, SuccNum); break; } ReturnInst *NTRet = new ReturnInst(brVal, NewTarget); // Update the switch instruction. - TheSwitch->addCase(ConstantUInt::get(Type::UShortTy, SuccNum), + TheSwitch->addCase(ConstantInt::get(Type::UShortTy, SuccNum), OldTarget); // Restore values just before we exit @@ -519,7 +519,7 @@ if (AggregateArgs) { std::vector Indices; Indices.push_back(Constant::getNullValue(Type::UIntTy)); - Indices.push_back(ConstantUInt::get(Type::UIntTy,FirstOut+out)); + Indices.push_back(ConstantInt::get(Type::UIntTy,FirstOut+out)); GetElementPtrInst *GEP = new GetElementPtrInst(OAI, Indices, "gep_" + outputs[out]->getName(), Index: llvm/lib/Transforms/Utils/Local.cpp diff -u llvm/lib/Transforms/Utils/Local.cpp:1.58 llvm/lib/Transforms/Utils/Local.cpp:1.58.4.1 --- llvm/lib/Transforms/Utils/Local.cpp:1.58 Fri May 26 20:18:04 2006 +++ llvm/lib/Transforms/Utils/Local.cpp Wed Oct 18 22:57:56 2006 @@ -272,10 +272,10 @@ gep_type_iterator I = gep_type_begin(CE), E = gep_type_end(CE); for (++I; I != E; ++I) if (const StructType *STy = dyn_cast(*I)) { - ConstantUInt *CU = cast(I.getOperand()); - assert(CU->getValue() < STy->getNumElements() && + ConstantInt *CU = cast(I.getOperand()); + assert(CU->getZExtValue() < STy->getNumElements() && "Struct index out of range!"); - unsigned El = (unsigned)CU->getValue(); + unsigned El = (unsigned)CU->getZExtValue(); if (ConstantStruct *CS = dyn_cast(C)) { C = CS->getOperand(El); } else if (isa(C)) { Index: llvm/lib/Transforms/Utils/LowerAllocations.cpp diff -u llvm/lib/Transforms/Utils/LowerAllocations.cpp:1.61 llvm/lib/Transforms/Utils/LowerAllocations.cpp:1.61.2.1 --- llvm/lib/Transforms/Utils/LowerAllocations.cpp:1.61 Sun Aug 27 17:42:52 2006 +++ llvm/lib/Transforms/Utils/LowerAllocations.cpp Wed Oct 18 22:57:56 2006 @@ -119,7 +119,7 @@ // malloc(type) becomes sbyte *malloc(size) Value *MallocArg; if (LowerMallocArgToInteger) - MallocArg = ConstantUInt::get(Type::ULongTy, TD.getTypeSize(AllocTy)); + MallocArg = ConstantInt::get(Type::ULongTy, TD.getTypeSize(AllocTy)); else MallocArg = ConstantExpr::getSizeOf(AllocTy); MallocArg = ConstantExpr::getCast(cast(MallocArg), IntPtrTy); Index: llvm/lib/Transforms/Utils/LowerInvoke.cpp diff -u llvm/lib/Transforms/Utils/LowerInvoke.cpp:1.41 llvm/lib/Transforms/Utils/LowerInvoke.cpp:1.41.2.1 --- llvm/lib/Transforms/Utils/LowerInvoke.cpp:1.41 Tue Sep 5 12:48:07 2006 +++ llvm/lib/Transforms/Utils/LowerInvoke.cpp Wed Oct 18 22:57:56 2006 @@ -269,7 +269,7 @@ void LowerInvoke::rewriteExpensiveInvoke(InvokeInst *II, unsigned InvokeNo, AllocaInst *InvokeNum, SwitchInst *CatchSwitch) { - ConstantUInt *InvokeNoC = ConstantUInt::get(Type::UIntTy, InvokeNo); + ConstantInt *InvokeNoC = ConstantInt::get(Type::UIntTy, InvokeNo); // Insert a store of the invoke num before the invoke and store zero into the // location afterward. @@ -461,7 +461,7 @@ std::vector Idx; Idx.push_back(Constant::getNullValue(Type::IntTy)); - Idx.push_back(ConstantUInt::get(Type::UIntTy, 1)); + Idx.push_back(ConstantInt::get(Type::UIntTy, 1)); OldJmpBufPtr = new GetElementPtrInst(JmpBuf, Idx, "OldBuf", EntryBB->getTerminator()); @@ -500,7 +500,7 @@ BasicBlock *ContBlock = EntryBB->splitBasicBlock(EntryBB->getTerminator(), "setjmp.cont"); - Idx[1] = ConstantUInt::get(Type::UIntTy, 0); + Idx[1] = ConstantInt::get(Type::UIntTy, 0); Value *JmpBufPtr = new GetElementPtrInst(JmpBuf, Idx, "TheJmpBuf", EntryBB->getTerminator()); Value *SJRet = new CallInst(SetJmpFn, JmpBufPtr, "sjret", @@ -550,7 +550,7 @@ // Get a pointer to the jmpbuf and longjmp. std::vector Idx; Idx.push_back(Constant::getNullValue(Type::IntTy)); - Idx.push_back(ConstantUInt::get(Type::UIntTy, 0)); + Idx.push_back(ConstantInt::get(Type::UIntTy, 0)); Idx[0] = new GetElementPtrInst(BufPtr, Idx, "JmpBuf", UnwindBlock); Idx[1] = ConstantInt::get(Type::IntTy, 1); new CallInst(LongJmpFn, Idx, "", UnwindBlock); Index: llvm/lib/Transforms/Utils/LowerSwitch.cpp diff -u llvm/lib/Transforms/Utils/LowerSwitch.cpp:1.24 llvm/lib/Transforms/Utils/LowerSwitch.cpp:1.24.2.1 --- llvm/lib/Transforms/Utils/LowerSwitch.cpp:1.24 Sun Aug 27 17:42:52 2006 +++ llvm/lib/Transforms/Utils/LowerSwitch.cpp Wed Oct 18 22:57:56 2006 @@ -60,11 +60,12 @@ struct CaseCmp { bool operator () (const LowerSwitch::Case& C1, const LowerSwitch::Case& C2) { - if (const ConstantUInt* U1 = dyn_cast(C1.first)) - return U1->getValue() < cast(C2.first)->getValue(); - const ConstantSInt* S1 = dyn_cast(C1.first); - return S1->getValue() < cast(C2.first)->getValue(); + const ConstantInt* CI1 = cast(C1.first); + const ConstantInt* CI2 = cast(C2.first); + if (CI1->getType()->isUnsigned()) + return CI1->getZExtValue() < CI2->getZExtValue(); + return CI1->getSExtValue() < CI2->getSExtValue(); } }; From reid at x10sys.com Wed Oct 18 22:59:01 2006 From: reid at x10sys.com (Reid Spencer) Date: Wed, 18 Oct 2006 22:59:01 -0500 Subject: [llvm-commits] [SignlessTypes] CVS: llvm/lib/Bytecode/Reader/Reader.cpp Message-ID: <200610190359.k9J3x17E003925@zion.cs.uiuc.edu> Changes in directory llvm/lib/Bytecode/Reader: Reader.cpp updated: 1.198 -> 1.198.2.1 --- Log message: For PR950: http://llvm.org/PR950 : This commit (on SignlessTypes branch) provides the first Iteration for moving LLVM away from Signed types. This patch removes the ConstantSInt and ConstantUInt classes from Type.h and makes all necessary changes in LLVM to compensate. --- Diffs of the changes: (+10 -9) Reader.cpp | 19 ++++++++++--------- 1 files changed, 10 insertions(+), 9 deletions(-) Index: llvm/lib/Bytecode/Reader/Reader.cpp diff -u llvm/lib/Bytecode/Reader/Reader.cpp:1.198 llvm/lib/Bytecode/Reader/Reader.cpp:1.198.2.1 --- llvm/lib/Bytecode/Reader/Reader.cpp:1.198 Thu Sep 14 13:23:26 2006 +++ llvm/lib/Bytecode/Reader/Reader.cpp Wed Oct 18 22:57:55 2006 @@ -1010,8 +1010,9 @@ // Convert ubyte struct indices into uint struct indices. if (isa(TopTy) && hasRestrictedGEPTypes) - if (ConstantUInt *C = dyn_cast(Idx.back())) - Idx[Idx.size()-1] = ConstantExpr::getCast(C, Type::UIntTy); + if (ConstantInt *C = dyn_cast(Idx.back())) + if (C->getType() == Type::UByteTy) + Idx[Idx.size()-1] = ConstantExpr::getCast(C, Type::UIntTy); NextTy = GetElementPtrInst::getIndexedType(InstTy, Idx, true); } @@ -1549,15 +1550,15 @@ case Type::UShortTyID: case Type::UIntTyID: { unsigned Val = read_vbr_uint(); - if (!ConstantUInt::isValueValidForType(Ty, Val)) + if (!ConstantInt::isValueValidForType(Ty, uint64_t(Val))) error("Invalid unsigned byte/short/int read."); - Result = ConstantUInt::get(Ty, Val); + Result = ConstantInt::get(Ty, Val); if (Handler) Handler->handleConstantValue(Result); break; } case Type::ULongTyID: - Result = ConstantUInt::get(Ty, read_vbr_uint64()); + Result = ConstantInt::get(Ty, read_vbr_uint64()); if (Handler) Handler->handleConstantValue(Result); break; @@ -1566,9 +1567,9 @@ case Type::IntTyID: case Type::LongTyID: { int64_t Val = read_vbr_int64(); - if (!ConstantSInt::isValueValidForType(Ty, Val)) + if (!ConstantInt::isValueValidForType(Ty, Val)) error("Invalid signed byte/short/int/long read."); - Result = ConstantSInt::get(Ty, Val); + Result = ConstantInt::get(Ty, Val); if (Handler) Handler->handleConstantValue(Result); break; } @@ -1701,10 +1702,10 @@ std::vector Elements(ATy->getNumElements()); if (ATy->getElementType() == Type::SByteTy) for (unsigned i = 0, e = ATy->getNumElements(); i != e; ++i) - Elements[i] = ConstantSInt::get(Type::SByteTy, (signed char)Data[i]); + Elements[i] = ConstantInt::get(Type::SByteTy, (signed char)Data[i]); else for (unsigned i = 0, e = ATy->getNumElements(); i != e; ++i) - Elements[i] = ConstantUInt::get(Type::UByteTy, (unsigned char)Data[i]); + Elements[i] = ConstantInt::get(Type::UByteTy, (unsigned char)Data[i]); // Create the constant, inserting it as needed. Constant *C = ConstantArray::get(ATy, Elements); From reid at x10sys.com Wed Oct 18 22:58:57 2006 From: reid at x10sys.com (Reid Spencer) Date: Wed, 18 Oct 2006 22:58:57 -0500 Subject: [llvm-commits] [SignlessTypes] CVS: llvm/examples/ModuleMaker/ModuleMaker.cpp Message-ID: <200610190358.k9J3wvNA003783@zion.cs.uiuc.edu> Changes in directory llvm/examples/ModuleMaker: ModuleMaker.cpp updated: 1.8 -> 1.8.2.1 --- Log message: For PR950: http://llvm.org/PR950 : This commit (on SignlessTypes branch) provides the first Iteration for moving LLVM away from Signed types. This patch removes the ConstantSInt and ConstantUInt classes from Type.h and makes all necessary changes in LLVM to compensate. --- Diffs of the changes: (+2 -2) ModuleMaker.cpp | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/examples/ModuleMaker/ModuleMaker.cpp diff -u llvm/examples/ModuleMaker/ModuleMaker.cpp:1.8 llvm/examples/ModuleMaker/ModuleMaker.cpp:1.8.2.1 --- llvm/examples/ModuleMaker/ModuleMaker.cpp:1.8 Fri Jul 28 17:08:23 2006 +++ llvm/examples/ModuleMaker/ModuleMaker.cpp Wed Oct 18 22:57:55 2006 @@ -40,8 +40,8 @@ BasicBlock *BB = new BasicBlock("EntryBlock", F); // Get pointers to the constant integers... - Value *Two = ConstantSInt::get(Type::IntTy, 2); - Value *Three = ConstantSInt::get(Type::IntTy, 3); + Value *Two = ConstantInt::get(Type::IntTy, 2); + Value *Three = ConstantInt::get(Type::IntTy, 3); // Create the add instruction... does not insert... Instruction *Add = BinaryOperator::create(Instruction::Add, Two, Three, From reid at x10sys.com Wed Oct 18 22:59:01 2006 From: reid at x10sys.com (Reid Spencer) Date: Wed, 18 Oct 2006 22:59:01 -0500 Subject: [llvm-commits] [SignlessTypes] CVS: llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp Message-ID: <200610190359.k9J3x1Uq003934@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/ARM: ARMISelDAGToDAG.cpp updated: 1.74 -> 1.74.2.1 --- Log message: For PR950: http://llvm.org/PR950 : This commit (on SignlessTypes branch) provides the first Iteration for moving LLVM away from Signed types. This patch removes the ConstantSInt and ConstantUInt classes from Type.h and makes all necessary changes in LLVM to compensate. --- Diffs of the changes: (+1 -1) ARMISelDAGToDAG.cpp | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp diff -u llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp:1.74 llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp:1.74.2.1 --- llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp:1.74 Wed Oct 18 07:03:07 2006 +++ llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp Wed Oct 18 22:57:56 2006 @@ -806,7 +806,7 @@ uint32_t val = cast(N)->getValue(); if(!isRotInt8Immediate(val)) { const Type *t = MVT::getTypeForValueType(MVT::i32); - Constant *C = ConstantUInt::get(t, val); + Constant *C = ConstantInt::get(t, val); int alignment = 2; SDOperand Addr = CurDAG->getTargetConstantPool(C, MVT::i32, alignment); SDOperand Z = CurDAG->getTargetConstant(0, MVT::i32); From reid at x10sys.com Wed Oct 18 22:59:01 2006 From: reid at x10sys.com (Reid Spencer) Date: Wed, 18 Oct 2006 22:59:01 -0500 Subject: [llvm-commits] [SignlessTypes] CVS: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp SelectionDAGISel.cpp Message-ID: <200610190359.k9J3x1bL003927@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/SelectionDAG: LegalizeDAG.cpp updated: 1.412 -> 1.412.2.1 SelectionDAGISel.cpp updated: 1.289 -> 1.289.2.1 --- Log message: For PR950: http://llvm.org/PR950 : This commit (on SignlessTypes branch) provides the first Iteration for moving LLVM away from Signed types. This patch removes the ConstantSInt and ConstantUInt classes from Type.h and makes all necessary changes in LLVM to compensate. --- Diffs of the changes: (+43 -39) LegalizeDAG.cpp | 6 ++-- SelectionDAGISel.cpp | 76 ++++++++++++++++++++++++++------------------------- 2 files changed, 43 insertions(+), 39 deletions(-) Index: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp diff -u llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.412 llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.412.2.1 --- llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.412 Fri Oct 13 16:12:22 2006 +++ llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Wed Oct 18 22:57:55 2006 @@ -3562,7 +3562,7 @@ CV.push_back(ConstantFP::get(OpNTy, V->getValue())); } else if (ConstantSDNode *V = dyn_cast(Node->getOperand(i))) { - CV.push_back(ConstantUInt::get(OpNTy, V->getValue())); + CV.push_back(ConstantInt::get(OpNTy, V->getValue())); } else { assert(Node->getOperand(i).getOpcode() == ISD::UNDEF); CV.push_back(UndefValue::get(OpNTy)); @@ -3915,7 +3915,7 @@ SignSet, Four, Zero); uint64_t FF = 0x5f800000ULL; if (TLI.isLittleEndian()) FF <<= 32; - static Constant *FudgeFactor = ConstantUInt::get(Type::ULongTy, FF); + static Constant *FudgeFactor = ConstantInt::get(Type::ULongTy, FF); SDOperand CPIdx = DAG.getConstantPool(FudgeFactor, TLI.getPointerTy()); CPIdx = DAG.getNode(ISD::ADD, TLI.getPointerTy(), CPIdx, CstOffset); @@ -4046,7 +4046,7 @@ case MVT::i64: FF = 0x5F800000ULL; break; // 2^64 (as a float) } if (TLI.isLittleEndian()) FF <<= 32; - static Constant *FudgeFactor = ConstantUInt::get(Type::ULongTy, FF); + static Constant *FudgeFactor = ConstantInt::get(Type::ULongTy, FF); SDOperand CPIdx = DAG.getConstantPool(FudgeFactor, TLI.getPointerTy()); CPIdx = DAG.getNode(ISD::ADD, TLI.getPointerTy(), CPIdx, CstOffset); Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.289 llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.289.2.1 --- llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.289 Mon Oct 16 15:52:31 2006 +++ llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Wed Oct 18 22:57:55 2006 @@ -236,25 +236,27 @@ Function::iterator BB = Fn.begin(), EB = Fn.end(); for (BasicBlock::iterator I = BB->begin(), E = BB->end(); I != E; ++I) if (AllocaInst *AI = dyn_cast(I)) - if (ConstantUInt *CUI = dyn_cast(AI->getArraySize())) { - const Type *Ty = AI->getAllocatedType(); - uint64_t TySize = TLI.getTargetData()->getTypeSize(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), - // round up to the size of the value for potentially better performance. - // - // FIXME: This could be made better with a preferred alignment hook in - // TargetData. It serves primarily to 8-byte align doubles for X86. - if (Align < TySize && TySize <= 8) Align = TySize; - TySize *= CUI->getValue(); // Get total allocated size. - if (TySize == 0) TySize = 1; // Don't create zero-sized stack objects. - StaticAllocaMap[AI] = - MF.getFrameInfo()->CreateStackObject((unsigned)TySize, Align); - } + if (ConstantInt *CUI = dyn_cast(AI->getArraySize())) + if (CUI->getType()->isUnsigned()) { + const Type *Ty = AI->getAllocatedType(); + uint64_t TySize = TLI.getTargetData()->getTypeSize(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), round up to the size of the value for potentially + // better performance. + // + // FIXME: This could be made better with a preferred alignment hook in + // TargetData. It serves primarily to 8-byte align doubles for X86. + if (Align < TySize && TySize <= 8) Align = TySize; + TySize *= CUI->getZExtValue(); // Get total allocated size. + if (TySize == 0) TySize = 1; // Don't create zero-sized stack objects. + StaticAllocaMap[AI] = + MF.getFrameInfo()->CreateStackObject((unsigned)TySize, Align); + } for (; BB != EB; ++BB) for (BasicBlock::iterator I = BB->begin(), E = BB->end(); I != E; ++I) @@ -393,11 +395,13 @@ /// The comparison function for sorting Case values. struct CaseCmp { bool operator () (const Case& C1, const Case& C2) { - if (const ConstantUInt* U1 = dyn_cast(C1.first)) - return U1->getValue() < cast(C2.first)->getValue(); + if (const ConstantInt* I1 = dyn_cast(C1.first)) + if (I1->getType()->isUnsigned()) + return I1->getZExtValue() < + cast(C2.first)->getZExtValue(); - const ConstantSInt* S1 = dyn_cast(C1.first); - return S1->getValue() < cast(C2.first)->getValue(); + return cast(C1.first)->getSExtValue() < + cast(C2.first)->getSExtValue(); } }; @@ -1250,7 +1254,7 @@ OI != E; ++OI) { Value *Idx = *OI; if (const StructType *StTy = dyn_cast(Ty)) { - unsigned Field = cast(Idx)->getValue(); + unsigned Field = cast(Idx)->getZExtValue(); if (Field) { // N = N + Offset uint64_t Offset = TD->getStructLayout(StTy)->MemberOffsets[Field]; @@ -1264,12 +1268,13 @@ // If this is a constant subscript, handle it quickly. if (ConstantInt *CI = dyn_cast(Idx)) { if (CI->getRawValue() == 0) continue; - uint64_t Offs; - if (ConstantSInt *CSI = dyn_cast(CI)) - Offs = (int64_t)TD->getTypeSize(Ty)*CSI->getValue(); + if (CI->getType()->isSigned()) + Offs = (int64_t) + TD->getTypeSize(Ty)*cast(CI)->getSExtValue(); else - Offs = TD->getTypeSize(Ty)*cast(CI)->getValue(); + Offs = + TD->getTypeSize(Ty)*cast(CI)->getZExtValue(); N = DAG.getNode(ISD::ADD, N.getValueType(), N, getIntPtrConstant(Offs)); continue; } @@ -2723,7 +2728,7 @@ } void SelectionDAGLowering::visitFrameReturnAddress(CallInst &I, bool isFrame) { - unsigned Depth = (unsigned)cast(I.getOperand(1))->getValue(); + unsigned Depth = (unsigned)cast(I.getOperand(1))->getZExtValue(); std::pair Result = TLI.LowerFrameReturnAddress(isFrame, getRoot(), Depth, DAG); setValue(&I, Result.first); @@ -3150,7 +3155,7 @@ E = GEPI->op_end(); OI != E; ++OI) { Value *Idx = *OI; if (const StructType *StTy = dyn_cast(Ty)) { - unsigned Field = cast(Idx)->getValue(); + unsigned Field = cast(Idx)->getZExtValue(); if (Field) ConstantOffset += TD->getStructLayout(StTy)->MemberOffsets[Field]; Ty = StTy->getElementType(Field); @@ -3160,11 +3165,10 @@ // Handle constant subscripts. if (ConstantInt *CI = dyn_cast(Idx)) { if (CI->getRawValue() == 0) continue; - - if (ConstantSInt *CSI = dyn_cast(CI)) - ConstantOffset += (int64_t)TD->getTypeSize(Ty)*CSI->getValue(); + if (CI->getType()->isSigned()) + ConstantOffset += (int64_t)TD->getTypeSize(Ty)*CI->getSExtValue(); else - ConstantOffset+=TD->getTypeSize(Ty)*cast(CI)->getValue(); + ConstantOffset += TD->getTypeSize(Ty)*CI->getZExtValue(); continue; } @@ -3176,7 +3180,7 @@ uint64_t ElementSize = TD->getTypeSize(Ty); // Mask off bits that should not be set. ElementSize &= ~0ULL >> (64-UIntPtrTy->getPrimitiveSizeInBits()); - Constant *SizeCst = ConstantUInt::get(UIntPtrTy, ElementSize); + Constant *SizeCst = ConstantInt::get(UIntPtrTy, ElementSize); // Multiply by the element size and add to the base. Idx = BinaryOperator::createMul(Idx, SizeCst, "", GEPI); @@ -3186,7 +3190,7 @@ // Make sure that the offset fits in uintptr_t. ConstantOffset &= ~0ULL >> (64-UIntPtrTy->getPrimitiveSizeInBits()); - Constant *PtrOffset = ConstantUInt::get(UIntPtrTy, ConstantOffset); + Constant *PtrOffset = ConstantInt::get(UIntPtrTy, ConstantOffset); // Okay, we have now emitted all of the variable index parts to the BB that // the GEP is defined in. Loop over all of the using instructions, inserting From reid at x10sys.com Wed Oct 18 22:58:57 2006 From: reid at x10sys.com (Reid Spencer) Date: Wed, 18 Oct 2006 22:58:57 -0500 Subject: [llvm-commits] [SignlessTypes] CVS: llvm/lib/Transforms/Instrumentation/EmitFunctions.cpp ProfilingUtils.cpp RSProfiling.cpp TraceBasicBlocks.cpp Message-ID: <200610190358.k9J3wv6T003779@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Instrumentation: EmitFunctions.cpp updated: 1.25 -> 1.25.2.1 ProfilingUtils.cpp updated: 1.7 -> 1.7.8.1 RSProfiling.cpp updated: 1.7 -> 1.7.2.1 TraceBasicBlocks.cpp updated: 1.15 -> 1.15.2.1 --- Log message: For PR950: http://llvm.org/PR950 : This commit (on SignlessTypes branch) provides the first Iteration for moving LLVM away from Signed types. This patch removes the ConstantSInt and ConstantUInt classes from Type.h and makes all necessary changes in LLVM to compensate. --- Diffs of the changes: (+15 -15) EmitFunctions.cpp | 2 +- ProfilingUtils.cpp | 4 ++-- RSProfiling.cpp | 22 +++++++++++----------- TraceBasicBlocks.cpp | 2 +- 4 files changed, 15 insertions(+), 15 deletions(-) Index: llvm/lib/Transforms/Instrumentation/EmitFunctions.cpp diff -u llvm/lib/Transforms/Instrumentation/EmitFunctions.cpp:1.25 llvm/lib/Transforms/Instrumentation/EmitFunctions.cpp:1.25.2.1 --- llvm/lib/Transforms/Instrumentation/EmitFunctions.cpp:1.25 Sun Aug 27 17:42:52 2006 +++ llvm/lib/Transforms/Instrumentation/EmitFunctions.cpp Wed Oct 18 22:57:56 2006 @@ -110,7 +110,7 @@ M.getGlobalList().push_back(funcArray); - ConstantInt *cnst = ConstantSInt::get(Type::IntTy, counter); + ConstantInt *cnst = ConstantInt::get(Type::IntTy, counter); GlobalVariable *fnCount = new GlobalVariable(Type::IntTy, true, GlobalValue::ExternalLinkage, cnst, "llvmFunctionCount"); Index: llvm/lib/Transforms/Instrumentation/ProfilingUtils.cpp diff -u llvm/lib/Transforms/Instrumentation/ProfilingUtils.cpp:1.7 llvm/lib/Transforms/Instrumentation/ProfilingUtils.cpp:1.7.8.1 --- llvm/lib/Transforms/Instrumentation/ProfilingUtils.cpp:1.7 Sat Oct 22 23:37:20 2005 +++ llvm/lib/Transforms/Instrumentation/ProfilingUtils.cpp Wed Oct 18 22:57:56 2006 @@ -51,7 +51,7 @@ // pass null. Args[2] = ConstantPointerNull::get(UIntPtr); } - Args[3] = ConstantUInt::get(Type::UIntTy, NumElements); + Args[3] = ConstantInt::get(Type::UIntTy, NumElements); Instruction *InitCall = new CallInst(InitFn, Args, "newargc", InsertPos); @@ -96,7 +96,7 @@ // Create the getelementptr constant expression std::vector Indices(2); Indices[0] = Constant::getNullValue(Type::IntTy); - Indices[1] = ConstantSInt::get(Type::IntTy, CounterNum); + Indices[1] = ConstantInt::get(Type::IntTy, CounterNum); Constant *ElementPtr = ConstantExpr::getGetElementPtr(CounterArray, Indices); // Load, increment and store the value back. Index: llvm/lib/Transforms/Instrumentation/RSProfiling.cpp diff -u llvm/lib/Transforms/Instrumentation/RSProfiling.cpp:1.7 llvm/lib/Transforms/Instrumentation/RSProfiling.cpp:1.7.2.1 --- llvm/lib/Transforms/Instrumentation/RSProfiling.cpp:1.7 Sun Aug 27 19:42:29 2006 +++ llvm/lib/Transforms/Instrumentation/RSProfiling.cpp Wed Oct 18 22:57:56 2006 @@ -188,10 +188,10 @@ GlobalRandomCounter::GlobalRandomCounter(Module& M, const Type* t, uint64_t resetval) : T(t) { + ConstantInt* Init = ConstantInt::get(T, resetval); + ResetValue = Init; Counter = new GlobalVariable(T, false, GlobalValue::InternalLinkage, - ConstantUInt::get(T, resetval), - "RandomSteeringCounter", &M); - ResetValue = ConstantUInt::get(T, resetval); + Init, "RandomSteeringCounter", &M); } GlobalRandomCounter::~GlobalRandomCounter() {} @@ -205,7 +205,7 @@ LoadInst* l = new LoadInst(Counter, "counter", t); SetCondInst* s = new SetCondInst(Instruction::SetEQ, l, - ConstantUInt::get(T, 0), + ConstantInt::get(T, 0), "countercc", t); Value* nv = BinaryOperator::createSub(l, ConstantInt::get(T, 1), "counternew", t); @@ -225,10 +225,10 @@ GlobalRandomCounterOpt::GlobalRandomCounterOpt(Module& M, const Type* t, uint64_t resetval) : AI(0), T(t) { + ConstantInt* Init = ConstantInt::get(T, resetval); + ResetValue = Init; Counter = new GlobalVariable(T, false, GlobalValue::InternalLinkage, - ConstantUInt::get(T, resetval), - "RandomSteeringCounter", &M); - ResetValue = ConstantUInt::get(T, resetval); + Init, "RandomSteeringCounter", &M); } GlobalRandomCounterOpt::~GlobalRandomCounterOpt() {} @@ -278,7 +278,7 @@ LoadInst* l = new LoadInst(AI, "counter", t); SetCondInst* s = new SetCondInst(Instruction::SetEQ, l, - ConstantUInt::get(T, 0), + ConstantInt::get(T, 0), "countercc", t); Value* nv = BinaryOperator::createSub(l, ConstantInt::get(T, 1), "counternew", t); @@ -309,11 +309,11 @@ CallInst* c = new CallInst(F, "rdcc", t); BinaryOperator* b = - BinaryOperator::createAnd(c, ConstantUInt::get(Type::ULongTy, rm), + BinaryOperator::createAnd(c, ConstantInt::get(Type::ULongTy, rm), "mrdcc", t); SetCondInst* s = new SetCondInst(Instruction::SetEQ, b, - ConstantUInt::get(Type::ULongTy, 0), + ConstantInt::get(Type::ULongTy, 0), "mrdccc", t); t->setCondition(s); } @@ -339,7 +339,7 @@ // Create the getelementptr constant expression std::vector Indices(2); Indices[0] = Constant::getNullValue(Type::IntTy); - Indices[1] = ConstantSInt::get(Type::IntTy, CounterNum); + Indices[1] = ConstantInt::get(Type::IntTy, CounterNum); Constant *ElementPtr = ConstantExpr::getGetElementPtr(CounterArray, Indices); // Load, increment and store the value back. Index: llvm/lib/Transforms/Instrumentation/TraceBasicBlocks.cpp diff -u llvm/lib/Transforms/Instrumentation/TraceBasicBlocks.cpp:1.15 llvm/lib/Transforms/Instrumentation/TraceBasicBlocks.cpp:1.15.2.1 --- llvm/lib/Transforms/Instrumentation/TraceBasicBlocks.cpp:1.15 Sun Aug 27 17:42:52 2006 +++ llvm/lib/Transforms/Instrumentation/TraceBasicBlocks.cpp Wed Oct 18 22:57:56 2006 @@ -49,7 +49,7 @@ Function *InstrFn = M.getOrInsertFunction (FnName, Type::VoidTy, Type::UIntTy, (Type *)0); std::vector Args (1); - Args[0] = ConstantUInt::get (Type::UIntTy, BBNumber); + Args[0] = ConstantInt::get (Type::UIntTy, BBNumber); // Insert the call after any alloca or PHI instructions... BasicBlock::iterator InsertPos = BB->begin(); From reid at x10sys.com Wed Oct 18 22:59:01 2006 From: reid at x10sys.com (Reid Spencer) Date: Wed, 18 Oct 2006 22:59:01 -0500 Subject: [llvm-commits] [SignlessTypes] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp LoopStrengthReduce.cpp LowerGC.cpp LowerPacked.cpp ScalarReplAggregates.cpp Message-ID: <200610190359.k9J3x18J003964@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: InstructionCombining.cpp updated: 1.520 -> 1.520.2.1 LoopStrengthReduce.cpp updated: 1.89 -> 1.89.2.1 LowerGC.cpp updated: 1.13 -> 1.13.2.1 LowerPacked.cpp updated: 1.9 -> 1.9.2.1 ScalarReplAggregates.cpp updated: 1.44 -> 1.44.2.1 --- Log message: For PR950: http://llvm.org/PR950 : This commit (on SignlessTypes branch) provides the first Iteration for moving LLVM away from Signed types. This patch removes the ConstantSInt and ConstantUInt classes from Type.h and makes all necessary changes in LLVM to compensate. --- Diffs of the changes: (+301 -264) InstructionCombining.cpp | 517 +++++++++++++++++++++++++---------------------- LoopStrengthReduce.cpp | 4 LowerGC.cpp | 12 - LowerPacked.cpp | 22 +- ScalarReplAggregates.cpp | 10 5 files changed, 301 insertions(+), 264 deletions(-) Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.520 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.520.2.1 --- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.520 Mon Oct 16 18:08:08 2006 +++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp Wed Oct 18 22:57:56 2006 @@ -142,7 +142,7 @@ Instruction *FoldGEPSetCC(User *GEPLHS, Value *RHS, Instruction::BinaryOps Cond, Instruction &I); Instruction *visitShiftInst(ShiftInst &I); - Instruction *FoldShiftByConstant(Value *Op0, ConstantUInt *Op1, + Instruction *FoldShiftByConstant(Value *Op0, ConstantInt *Op1, ShiftInst &I); Instruction *visitCastInst(CastInst &CI); Instruction *FoldSelectOpOp(SelectInst &SI, Instruction *TI, @@ -576,14 +576,14 @@ /// GetConstantInType - Return a ConstantInt with the specified type and value. /// static ConstantIntegral *GetConstantInType(const Type *Ty, uint64_t Val) { - if (Ty->isUnsigned()) - return ConstantUInt::get(Ty, Val); + if (Ty->isUnsigned()) + return ConstantInt::get(Ty, Val); else if (Ty->getTypeID() == Type::BoolTyID) return ConstantBool::get(Val); int64_t SVal = Val; SVal <<= 64-Ty->getPrimitiveSizeInBits(); SVal >>= 64-Ty->getPrimitiveSizeInBits(); - return ConstantSInt::get(Ty, SVal); + return ConstantInt::get(Ty, SVal); } @@ -712,40 +712,42 @@ } case Instruction::Shl: // (shl X, C1) & C2 == 0 iff (X & C2 >>u C1) == 0 - if (ConstantUInt *SA = dyn_cast(I->getOperand(1))) { - Mask >>= SA->getValue(); + if (ConstantInt *SA = dyn_cast(I->getOperand(1))) { + uint64_t ShiftAmt = SA->getZExtValue(); + Mask >>= ShiftAmt; ComputeMaskedBits(I->getOperand(0), Mask, KnownZero, KnownOne, Depth+1); assert((KnownZero & KnownOne) == 0 && "Bits known to be one AND zero?"); - KnownZero <<= SA->getValue(); - KnownOne <<= SA->getValue(); - KnownZero |= (1ULL << SA->getValue())-1; // low bits known zero. + KnownZero <<= ShiftAmt; + KnownOne <<= ShiftAmt; + KnownZero |= (1ULL << ShiftAmt)-1; // low bits known zero. return; } break; case Instruction::Shr: // (ushr X, C1) & C2 == 0 iff (-1 >> C1) & C2 == 0 - if (ConstantUInt *SA = dyn_cast(I->getOperand(1))) { + if (ConstantInt *SA = dyn_cast(I->getOperand(1))) { // Compute the new bits that are at the top now. - uint64_t HighBits = (1ULL << SA->getValue())-1; - HighBits <<= I->getType()->getPrimitiveSizeInBits()-SA->getValue(); + uint64_t ShiftAmt = SA->getZExtValue(); + uint64_t HighBits = (1ULL << ShiftAmt)-1; + HighBits <<= I->getType()->getPrimitiveSizeInBits()-ShiftAmt; if (I->getType()->isUnsigned()) { // Unsigned shift right. - Mask <<= SA->getValue(); + Mask <<= ShiftAmt; ComputeMaskedBits(I->getOperand(0), Mask, KnownZero,KnownOne,Depth+1); assert((KnownZero & KnownOne) == 0&&"Bits known to be one AND zero?"); - KnownZero >>= SA->getValue(); - KnownOne >>= SA->getValue(); + KnownZero >>= ShiftAmt; + KnownOne >>= ShiftAmt; KnownZero |= HighBits; // high bits known zero. } else { - Mask <<= SA->getValue(); + Mask <<= ShiftAmt; ComputeMaskedBits(I->getOperand(0), Mask, KnownZero,KnownOne,Depth+1); assert((KnownZero & KnownOne) == 0&&"Bits known to be one AND zero?"); - KnownZero >>= SA->getValue(); - KnownOne >>= SA->getValue(); + KnownZero >>= ShiftAmt; + KnownOne >>= ShiftAmt; // Handle the sign bits. uint64_t SignBit = 1ULL << (I->getType()->getPrimitiveSizeInBits()-1); - SignBit >>= SA->getValue(); // Adjust to where it is now in the mask. + SignBit >>= ShiftAmt; // Adjust to where it is now in the mask. if (KnownZero & SignBit) { // New bits are known zero. KnownZero |= HighBits; @@ -1100,14 +1102,15 @@ break; } case Instruction::Shl: - if (ConstantUInt *SA = dyn_cast(I->getOperand(1))) { - if (SimplifyDemandedBits(I->getOperand(0), DemandedMask >> SA->getValue(), + if (ConstantInt *SA = dyn_cast(I->getOperand(1))) { + uint64_t ShiftAmt = SA->getZExtValue(); + if (SimplifyDemandedBits(I->getOperand(0), DemandedMask >> ShiftAmt, KnownZero, KnownOne, Depth+1)) return true; assert((KnownZero & KnownOne) == 0 && "Bits known to be one AND zero?"); - KnownZero <<= SA->getValue(); - KnownOne <<= SA->getValue(); - KnownZero |= (1ULL << SA->getValue())-1; // low bits known zero. + KnownZero <<= ShiftAmt; + KnownOne <<= ShiftAmt; + KnownZero |= (1ULL << ShiftAmt) - 1; // low bits known zero. } break; case Instruction::Shr: @@ -1131,38 +1134,38 @@ return UpdateValueUsesWith(I, NewVal); } - if (ConstantUInt *SA = dyn_cast(I->getOperand(1))) { - unsigned ShAmt = SA->getValue(); + if (ConstantInt *SA = dyn_cast(I->getOperand(1))) { + unsigned ShiftAmt = SA->getZExtValue(); // Compute the new bits that are at the top now. - uint64_t HighBits = (1ULL << ShAmt)-1; - HighBits <<= I->getType()->getPrimitiveSizeInBits() - ShAmt; + uint64_t HighBits = (1ULL << ShiftAmt)-1; + HighBits <<= I->getType()->getPrimitiveSizeInBits() - ShiftAmt; uint64_t TypeMask = I->getType()->getIntegralTypeMask(); if (I->getType()->isUnsigned()) { // Unsigned shift right. if (SimplifyDemandedBits(I->getOperand(0), - (DemandedMask << ShAmt) & TypeMask, + (DemandedMask << ShiftAmt) & TypeMask, KnownZero, KnownOne, Depth+1)) return true; assert((KnownZero & KnownOne) == 0 && "Bits known to be one AND zero?"); KnownZero &= TypeMask; KnownOne &= TypeMask; - KnownZero >>= ShAmt; - KnownOne >>= ShAmt; + KnownZero >>= ShiftAmt; + KnownOne >>= ShiftAmt; KnownZero |= HighBits; // high bits known zero. } else { // Signed shift right. if (SimplifyDemandedBits(I->getOperand(0), - (DemandedMask << ShAmt) & TypeMask, + (DemandedMask << ShiftAmt) & TypeMask, KnownZero, KnownOne, Depth+1)) return true; assert((KnownZero & KnownOne) == 0 && "Bits known to be one AND zero?"); KnownZero &= TypeMask; KnownOne &= TypeMask; - KnownZero >>= SA->getValue(); - KnownOne >>= SA->getValue(); + KnownZero >>= ShiftAmt; + KnownOne >>= ShiftAmt; // Handle the sign bits. uint64_t SignBit = 1ULL << (I->getType()->getPrimitiveSizeInBits()-1); - SignBit >>= SA->getValue(); // Adjust to where it is now in the mask. + SignBit >>= ShiftAmt; // Adjust to where it is now in the mask. // If the input sign bit is known to be zero, or if none of the top bits // are demanded, turn this into an unsigned shift right. @@ -1277,7 +1280,7 @@ case Instruction::InsertElement: { // If this is a variable index, we don't know which element it overwrites. // demand exactly the same input as we produce. - ConstantUInt *Idx = dyn_cast(I->getOperand(2)); + ConstantInt *Idx = dyn_cast(I->getOperand(2)); if (Idx == 0) { // Note that we can't propagate undef elt info, because we don't know // which elt is getting updated. @@ -1289,7 +1292,7 @@ // If this is inserting an element that isn't demanded, remove this // insertelement. - unsigned IdxNo = Idx->getValue(); + unsigned IdxNo = Idx->getZExtValue(); if (IdxNo >= VWidth || (DemandedElts & (1ULL << IdxNo)) == 0) return AddSoonDeadInstToWorklist(*I, 0); @@ -1894,14 +1897,15 @@ Value *NoopCastedRHS = RemoveNoopCast(Op1); if (ShiftInst *SI = dyn_cast(NoopCastedRHS)) if (SI->getOpcode() == Instruction::Shr) - if (ConstantUInt *CU = dyn_cast(SI->getOperand(1))) { + if (ConstantInt *CU = dyn_cast(SI->getOperand(1))) { const Type *NewTy; if (SI->getType()->isSigned()) NewTy = SI->getType()->getUnsignedVersion(); else NewTy = SI->getType()->getSignedVersion(); // Check to see if we are shifting out everything but the sign bit. - if (CU->getValue() == SI->getType()->getPrimitiveSizeInBits()-1) { + if (CU->getZExtValue() == + SI->getType()->getPrimitiveSizeInBits()-1) { // Ok, the transformation is safe. Insert a cast of the incoming // value, then the new shift, then the new cast. Instruction *FirstCast = new CastInst(SI->getOperand(0), NewTy, @@ -1972,8 +1976,8 @@ // 0 - (X sdiv C) -> (X sdiv -C) if (Op1I->getOpcode() == Instruction::Div) - if (ConstantSInt *CSI = dyn_cast(Op0)) - if (CSI->isNullValue()) + if (ConstantInt *CSI = dyn_cast(Op0)) + if (CSI->getType()->isSigned() && CSI->isNullValue()) if (Constant *DivRHS = dyn_cast(Op1I->getOperand(1))) return BinaryOperator::createDiv(Op1I->getOperand(0), ConstantExpr::getNeg(DivRHS)); @@ -2022,14 +2026,14 @@ return Opcode == Instruction::SetLT && RHS->isNullValue() || Opcode == Instruction::SetLE && RHS->isAllOnesValue(); } else { - ConstantUInt *RHSC = cast(RHS); + ConstantInt *RHSC = cast(RHS); // True if source is LHS > 127 or LHS >= 128, where the constants depend on // the size of the integer type. if (Opcode == Instruction::SetGE) - return RHSC->getValue() == + return RHSC->getZExtValue() == 1ULL << (RHS->getType()->getPrimitiveSizeInBits()-1); if (Opcode == Instruction::SetGT) - return RHSC->getValue() == + return RHSC->getZExtValue() == (1ULL << (RHS->getType()->getPrimitiveSizeInBits()-1))-1; } return false; @@ -2064,7 +2068,7 @@ if (isPowerOf2_64(Val)) { // Replace X*(2^C) with X << C uint64_t C = Log2_64(Val); return new ShiftInst(Instruction::Shl, Op0, - ConstantUInt::get(Type::UByteTy, C)); + ConstantInt::get(Type::UByteTy, C)); } } else if (ConstantFP *Op1F = dyn_cast(Op1)) { if (Op1F->isNullValue()) @@ -2125,7 +2129,7 @@ if (isa(SCIOp1) && isSignBitCheck(SCI->getOpcode(), SCIOp0, cast(SCIOp1))) { // Shift the X value right to turn it into "all signbits". - Constant *Amt = ConstantUInt::get(Type::UByteTy, + Constant *Amt = ConstantInt::get(Type::UByteTy, SCOpTy->getPrimitiveSizeInBits()-1); if (SCIOp0->getType()->isUnsigned()) { const Type *NewTy = SCIOp0->getType()->getSignedVersion(); @@ -2179,13 +2183,14 @@ // Check to see if this is an unsigned division with an exact power of 2, // if so, convert to a right shift. - if (ConstantUInt *C = dyn_cast(RHS)) - if (uint64_t Val = C->getValue()) // Don't break X / 0 - if (isPowerOf2_64(Val)) { - uint64_t C = Log2_64(Val); - return new ShiftInst(Instruction::Shr, Op0, - ConstantUInt::get(Type::UByteTy, C)); - } + if (ConstantInt *C = dyn_cast(RHS)) + if (C->getType()->isUnsigned()) + if (uint64_t Val = C->getZExtValue()) // Don't break X / 0 + if (isPowerOf2_64(Val)) { + uint64_t C = Log2_64(Val); + return new ShiftInst(Instruction::Shr, Op0, + ConstantInt::get(Type::UByteTy, C)); + } // -X/C -> X/-C if (RHS->getType()->isSigned()) @@ -2235,24 +2240,25 @@ // If this is 'udiv X, (Cond ? C1, C2)' where C1&C2 are powers of two, // transform this into: '(Cond ? (udiv X, C1) : (udiv X, C2))'. - if (ConstantUInt *STO = dyn_cast(SI->getOperand(1))) - if (ConstantUInt *SFO = dyn_cast(SI->getOperand(2))) { - // STO == 0 and SFO == 0 handled above. - uint64_t TVA = STO->getValue(), FVA = SFO->getValue(); - if (isPowerOf2_64(TVA) && isPowerOf2_64(FVA)) { - unsigned TSA = Log2_64(TVA), FSA = Log2_64(FVA); - Constant *TC = ConstantUInt::get(Type::UByteTy, TSA); - Instruction *TSI = new ShiftInst(Instruction::Shr, Op0, - TC, SI->getName()+".t"); - TSI = InsertNewInstBefore(TSI, I); - - Constant *FC = ConstantUInt::get(Type::UByteTy, FSA); - Instruction *FSI = new ShiftInst(Instruction::Shr, Op0, - FC, SI->getName()+".f"); - FSI = InsertNewInstBefore(FSI, I); - return new SelectInst(SI->getOperand(0), TSI, FSI); + if (ConstantInt *STO = dyn_cast(SI->getOperand(1))) + if (ConstantInt *SFO = dyn_cast(SI->getOperand(2))) + if (STO->getType()->isUnsigned() && SFO->getType()->isUnsigned()) { + // STO == 0 and SFO == 0 handled above. + uint64_t TVA = STO->getZExtValue(), FVA = SFO->getZExtValue(); + if (isPowerOf2_64(TVA) && isPowerOf2_64(FVA)) { + unsigned TSA = Log2_64(TVA), FSA = Log2_64(FVA); + Constant *TC = ConstantInt::get(Type::UByteTy, TSA); + Instruction *TSI = new ShiftInst(Instruction::Shr, Op0, + TC, SI->getName()+".t"); + TSI = InsertNewInstBefore(TSI, I); + + Constant *FC = ConstantInt::get(Type::UByteTy, FSA); + Instruction *FSI = new ShiftInst(Instruction::Shr, Op0, + FC, SI->getName()+".f"); + FSI = InsertNewInstBefore(FSI, I); + return new SelectInst(SI->getOperand(0), TSI, FSI); + } } - } } // 0 / X == 0, we don't need to preserve faults! @@ -2282,13 +2288,14 @@ if (Instruction *RHSI = dyn_cast(I.getOperand(1))) { // Turn A / (C1 << N), where C1 is "1<> (N+C2) [udiv only]. if (RHSI->getOpcode() == Instruction::Shl && - isa(RHSI->getOperand(0))) { - unsigned C1 = cast(RHSI->getOperand(0))->getRawValue(); + isa(RHSI->getOperand(0)) && + RHSI->getOperand(0)->getType()->isUnsigned()) { + uint64_t C1 = cast(RHSI->getOperand(0))->getRawValue(); if (isPowerOf2_64(C1)) { - unsigned C2 = Log2_64(C1); + uint64_t C2 = Log2_64(C1); Value *Add = RHSI->getOperand(1); if (C2) { - Constant *C2V = ConstantUInt::get(Add->getType(), C2); + Constant *C2V = ConstantInt::get(Add->getType(), C2); Add = InsertNewInstBefore(BinaryOperator::createAdd(Add, C2V, "tmp"), I); } @@ -2330,7 +2337,7 @@ unsigned Zeros = CountTrailingZeros_64(RHS->getZExtValue()); if (Zeros != V->getType()->getPrimitiveSizeInBits()) return ConstantExpr::getShl(Result, - ConstantUInt::get(Type::UByteTy, Zeros)); + ConstantInt::get(Type::UByteTy, Zeros)); } } else if (I->getOpcode() == Instruction::Cast) { Value *Op = I->getOperand(0); @@ -2356,8 +2363,8 @@ if (I.getType()->isSigned()) { if (Value *RHSNeg = dyn_castNegVal(Op1)) - if (!isa(RHSNeg) || - cast(RHSNeg)->getValue() > 0) { + if (!isa(RHSNeg) || !RHSNeg->getType()->isSigned() || + cast(RHSNeg)->getSExtValue() > 0) { // X % -Y -> X % Y AddUsesToWorkList(I); I.setOperand(1, RHSNeg); @@ -2392,9 +2399,10 @@ // Check to see if this is an unsigned remainder with an exact power of 2, // if so, convert to a bitwise and. - if (ConstantUInt *C = dyn_cast(RHS)) - if (isPowerOf2_64(C->getValue())) - return BinaryOperator::createAnd(Op0, SubOne(C)); + if (ConstantInt *C = dyn_cast(RHS)) + if (RHS->getType()->isUnsigned()) + if (isPowerOf2_64(C->getZExtValue())) + return BinaryOperator::createAnd(Op0, SubOne(C)); if (Instruction *Op0I = dyn_cast(Op0)) { if (SelectInst *SI = dyn_cast(Op0I)) { @@ -2415,8 +2423,9 @@ // Turn A % (C << N), where C is 2^k, into A & ((C << N)-1) [urem only]. if (I.getType()->isUnsigned() && RHSI->getOpcode() == Instruction::Shl && - isa(RHSI->getOperand(0))) { - unsigned C1 = cast(RHSI->getOperand(0))->getRawValue(); + isa(RHSI->getOperand(0)) && + RHSI->getOperand(0)->getType()->isUnsigned()) { + unsigned C1 = cast(RHSI->getOperand(0))->getZExtValue(); if (isPowerOf2_64(C1)) { Constant *N1 = ConstantInt::getAllOnesValue(I.getType()); Value *Add = InsertNewInstBefore(BinaryOperator::createAdd(RHSI, N1, @@ -2458,18 +2467,21 @@ } - if (ConstantUInt *STO = dyn_cast(SI->getOperand(1))) - if (ConstantUInt *SFO = dyn_cast(SI->getOperand(2))) { - // STO == 0 and SFO == 0 handled above. - - if (isPowerOf2_64(STO->getValue()) && isPowerOf2_64(SFO->getValue())){ - Value *TrueAnd = InsertNewInstBefore(BinaryOperator::createAnd(Op0, - SubOne(STO), SI->getName()+".t"), I); - Value *FalseAnd = InsertNewInstBefore(BinaryOperator::createAnd(Op0, - SubOne(SFO), SI->getName()+".f"), I); - return new SelectInst(SI->getOperand(0), TrueAnd, FalseAnd); + if (ConstantInt *STO = dyn_cast(SI->getOperand(1))) + if (ConstantInt *SFO = dyn_cast(SI->getOperand(2))) + if (STO->getType()->isUnsigned() && SFO->getType()->isUnsigned()) { + // STO == 0 and SFO == 0 handled above. + if (isPowerOf2_64(STO->getZExtValue()) && + isPowerOf2_64(SFO->getZExtValue())) { + Value *TrueAnd = InsertNewInstBefore( + BinaryOperator::createAnd(Op0, SubOne(STO), SI->getName()+".t"), + I); + Value *FalseAnd = InsertNewInstBefore( + BinaryOperator::createAnd(Op0, SubOne(SFO), SI->getName()+".f"), + I); + return new SelectInst(SI->getOperand(0), TrueAnd, FalseAnd); + } } - } } } @@ -2478,30 +2490,26 @@ // isMaxValueMinusOne - return true if this is Max-1 static bool isMaxValueMinusOne(const ConstantInt *C) { - if (const ConstantUInt *CU = dyn_cast(C)) - return CU->getValue() == C->getType()->getIntegralTypeMask()-1; - - const ConstantSInt *CS = cast(C); + if (C->getType()->isUnsigned()) + return C->getZExtValue() == C->getType()->getIntegralTypeMask()-1; // Calculate 0111111111..11111 unsigned TypeBits = C->getType()->getPrimitiveSizeInBits(); int64_t Val = INT64_MAX; // All ones Val >>= 64-TypeBits; // Shift out unwanted 1 bits... - return CS->getValue() == Val-1; + return C->getSExtValue() == Val-1; } // isMinValuePlusOne - return true if this is Min+1 static bool isMinValuePlusOne(const ConstantInt *C) { - if (const ConstantUInt *CU = dyn_cast(C)) - return CU->getValue() == 1; - - const ConstantSInt *CS = cast(C); + if (C->getType()->isUnsigned()) + return C->getZExtValue() == 1; // Calculate 1111111111000000000000 unsigned TypeBits = C->getType()->getPrimitiveSizeInBits(); int64_t Val = -1; // All ones Val <<= TypeBits-1; // Shift over to the right spot - return CS->getValue() == Val+1; + return C->getSExtValue() == Val+1; } // isOneBitSet - Return true if there is exactly one bit set in the specified @@ -2780,7 +2788,9 @@ return new SetCondInst(Instruction::SetEQ, V, V); Hi = SubOne(cast(Hi)); - if (cast(Lo)->isMinValue()) // V < 0 || V >= Hi ->'V > Hi-1' + + // V < 0 || V >= Hi ->'V > Hi-1' + if (cast(Lo)->isMinValue()) return new SetCondInst(Instruction::SetGT, V, Hi); // Emit X-Lo > Hi-Lo-1 @@ -3716,7 +3726,7 @@ } static bool isPositive(ConstantInt *C) { - return cast(C)->getValue() >= 0; + return C->getSExtValue() >= 0; } /// AddWithOverflow - Compute Result = In1+In2, returning true if the result @@ -3726,15 +3736,15 @@ Result = cast(ConstantExpr::getAdd(In1, In2)); if (In1->getType()->isUnsigned()) - return cast(Result)->getValue() < - cast(In1)->getValue(); + return cast(Result)->getZExtValue() < + cast(In1)->getZExtValue(); if (isPositive(In1) != isPositive(In2)) return false; if (isPositive(In1)) - return cast(Result)->getValue() < - cast(In1)->getValue(); - return cast(Result)->getValue() > - cast(In1)->getValue(); + return cast(Result)->getSExtValue() < + cast(In1)->getSExtValue(); + return cast(Result)->getSExtValue() > + cast(In1)->getSExtValue(); } /// EmitGEPOffset - Given a getelementptr instruction/constantexpr, emit the @@ -3753,7 +3763,7 @@ for (unsigned i = 1, e = GEP->getNumOperands(); i != e; ++i, ++GTI) { Value *Op = GEP->getOperand(i); uint64_t Size = TD.getTypeSize(GTI.getIndexedType()) & PtrSizeMask; - Constant *Scale = ConstantExpr::getCast(ConstantUInt::get(UIntPtrTy, Size), + Constant *Scale = ConstantExpr::getCast(ConstantInt::get(UIntPtrTy, Size), SIntPtrTy); if (Constant *OpC = dyn_cast(Op)) { if (!OpC->isNullValue()) { @@ -4139,14 +4149,14 @@ ConstantInt *NewCST; ConstantInt *NewCI; if (Cast->getOperand(0)->getType()->isSigned()) { - NewCST = ConstantSInt::get(Cast->getOperand(0)->getType(), + NewCST = ConstantInt::get(Cast->getOperand(0)->getType(), AndCST->getZExtValue()); - NewCI = ConstantSInt::get(Cast->getOperand(0)->getType(), + NewCI = ConstantInt::get(Cast->getOperand(0)->getType(), CI->getZExtValue()); } else { - NewCST = ConstantUInt::get(Cast->getOperand(0)->getType(), + NewCST = ConstantInt::get(Cast->getOperand(0)->getType(), AndCST->getZExtValue()); - NewCI = ConstantUInt::get(Cast->getOperand(0)->getType(), + NewCI = ConstantInt::get(Cast->getOperand(0)->getType(), CI->getZExtValue()); } Instruction *NewAnd = @@ -4172,8 +4182,8 @@ Shift = dyn_cast(CI->getOperand(0)); } - ConstantUInt *ShAmt; - ShAmt = Shift ? dyn_cast(Shift->getOperand(1)) : 0; + ConstantInt *ShAmt; + ShAmt = Shift ? dyn_cast(Shift->getOperand(1)) : 0; const Type *Ty = Shift ? Shift->getType() : 0; // Type of the shift. const Type *AndTy = AndCST->getType(); // Type of the and. @@ -4185,10 +4195,10 @@ if (!CanFold) { // To test for the bad case of the signed shr, see if any // of the bits shifted in could be tested after the mask. - int ShAmtVal = Ty->getPrimitiveSizeInBits()-ShAmt->getValue(); + int ShAmtVal = Ty->getPrimitiveSizeInBits()-ShAmt->getZExtValue(); if (ShAmtVal < 0) ShAmtVal = 0; // Out of range shift. - Constant *OShAmt = ConstantUInt::get(Type::UByteTy, ShAmtVal); + Constant *OShAmt = ConstantInt::get(Type::UByteTy, ShAmtVal); Constant *ShVal = ConstantExpr::getShl(ConstantInt::getAllOnesValue(AndTy), OShAmt); @@ -4277,14 +4287,14 @@ break; case Instruction::Shl: // (setcc (shl X, ShAmt), CI) - if (ConstantUInt *ShAmt = dyn_cast(LHSI->getOperand(1))) { + if (ConstantInt *ShAmt = dyn_cast(LHSI->getOperand(1))) { if (I.isEquality()) { unsigned TypeBits = CI->getType()->getPrimitiveSizeInBits(); // Check that the shift amount is in range. If not, don't perform // undefined shifts. When the shift is visited it will be // simplified. - if (ShAmt->getValue() >= TypeBits) + if (ShAmt->getZExtValue() >= TypeBits) break; // If we are comparing against bits always shifted out, the @@ -4299,14 +4309,14 @@ if (LHSI->hasOneUse()) { // Otherwise strength reduce the shift into an and. - unsigned ShAmtVal = (unsigned)ShAmt->getValue(); + unsigned ShAmtVal = (unsigned)ShAmt->getZExtValue(); uint64_t Val = (1ULL << (TypeBits-ShAmtVal))-1; Constant *Mask; if (CI->getType()->isUnsigned()) { - Mask = ConstantUInt::get(CI->getType(), Val); + Mask = ConstantInt::get(CI->getType(), Val); } else if (ShAmtVal != 0) { - Mask = ConstantSInt::get(CI->getType(), Val); + Mask = ConstantInt::get(CI->getType(), Val); } else { Mask = ConstantInt::getAllOnesValue(CI->getType()); } @@ -4323,13 +4333,13 @@ break; case Instruction::Shr: // (setcc (shr X, ShAmt), CI) - if (ConstantUInt *ShAmt = dyn_cast(LHSI->getOperand(1))) { + if (ConstantInt *ShAmt = dyn_cast(LHSI->getOperand(1))) { if (I.isEquality()) { // Check that the shift amount is in range. If not, don't perform // undefined shifts. When the shift is visited it will be // simplified. unsigned TypeBits = CI->getType()->getPrimitiveSizeInBits(); - if (ShAmt->getValue() >= TypeBits) + if (ShAmt->getZExtValue() >= TypeBits) break; // If we are comparing against bits always shifted out, the @@ -4344,7 +4354,7 @@ } if (LHSI->hasOneUse() || CI->isNullValue()) { - unsigned ShAmtVal = (unsigned)ShAmt->getValue(); + unsigned ShAmtVal = (unsigned)ShAmt->getZExtValue(); // Otherwise strength reduce the shift into an and. uint64_t Val = ~0ULL; // All ones. @@ -4353,9 +4363,9 @@ Constant *Mask; if (CI->getType()->isUnsigned()) { Val &= ~0ULL >> (64-TypeBits); - Mask = ConstantUInt::get(CI->getType(), Val); + Mask = ConstantInt::get(CI->getType(), Val); } else { - Mask = ConstantSInt::get(CI->getType(), Val); + Mask = ConstantInt::get(CI->getType(), Val); } Instruction *AndI = @@ -4466,22 +4476,40 @@ if (I.isEquality()) { bool isSetNE = I.getOpcode() == Instruction::SetNE; - // If the first operand is (and|or|xor) with a constant, and the second - // operand is a constant, simplify a bit. + // If the first operand is (add|sub|and|or|xor|rem) with a constant, and + // the second operand is a constant, simplify a bit. if (BinaryOperator *BO = dyn_cast(Op0)) { switch (BO->getOpcode()) { +#if 0 + case Instruction::SRem: + // If we have a signed (X % (2^c)) == 0, turn it into an unsigned one. + if (CI->isNullValue() && isa(BO->getOperand(1)) && + BO->hasOneUse()) { + int64_t V = cast(BO->getOperand(1))->getSExtValue(); + if (V > 1 && isPowerOf2_64(V)) { + Value *NewRem = InsertNewInstBefore( + BinaryOperator::createURem(BO->getOperand(0), + BO->getOperand(1), + BO->getName()), I); + return BinaryOperator::create( + I.getOpcode(), NewRem, + Constant::getNullValue(NewRem->getType())); + } + } + break; +#endif + case Instruction::Rem: // If we have a signed (X % (2^c)) == 0, turn it into an unsigned one. - if (CI->isNullValue() && isa(BO->getOperand(1)) && - BO->hasOneUse() && - cast(BO->getOperand(1))->getValue() > 1) { - int64_t V = cast(BO->getOperand(1))->getValue(); - if (isPowerOf2_64(V)) { + if (CI->isNullValue() && isa(BO->getOperand(1)) && + BO->hasOneUse() && BO->getOperand(1)->getType()->isSigned()) { + int64_t V = cast(BO->getOperand(1))->getSExtValue(); + if (V > 1 && isPowerOf2_64(V)) { unsigned L2 = Log2_64(V); const Type *UTy = BO->getType()->getUnsignedVersion(); Value *NewX = InsertNewInstBefore(new CastInst(BO->getOperand(0), UTy, "tmp"), I); - Constant *RHSCst = ConstantUInt::get(UTy, 1ULL << L2); + Constant *RHSCst = ConstantInt::get(UTy, 1ULL << L2); Value *NewRem =InsertNewInstBefore(BinaryOperator::createRem(NewX, RHSCst, BO->getName()), I); return BinaryOperator::create(I.getOpcode(), NewRem, @@ -4489,7 +4517,6 @@ } } break; - case Instruction::Add: // Replace ((add A, B) != C) with (A != C-B) if B & C are constants. if (ConstantInt *BOp1C = dyn_cast(BO->getOperand(1))) { @@ -4602,21 +4629,21 @@ if (I.getOpcode() == Instruction::SetLT && CI->isNullValue()) // X < 0 => x > 127 return BinaryOperator::createSetGT(CastOp, - ConstantUInt::get(SrcTy, (1ULL << (SrcTySize-1))-1)); + ConstantInt::get(SrcTy, (1ULL << (SrcTySize-1))-1)); else if (I.getOpcode() == Instruction::SetGT && - cast(CI)->getValue() == -1) + cast(CI)->getSExtValue() == -1) // X > -1 => x < 128 return BinaryOperator::createSetLT(CastOp, - ConstantUInt::get(SrcTy, 1ULL << (SrcTySize-1))); + ConstantInt::get(SrcTy, 1ULL << (SrcTySize-1))); } else { - ConstantUInt *CUI = cast(CI); + ConstantInt *CUI = cast(CI); if (I.getOpcode() == Instruction::SetLT && - CUI->getValue() == 1ULL << (SrcTySize-1)) + CUI->getZExtValue() == 1ULL << (SrcTySize-1)) // X < 128 => X > -1 return BinaryOperator::createSetGT(CastOp, - ConstantSInt::get(SrcTy, -1)); + ConstantInt::get(SrcTy, -1)); else if (I.getOpcode() == Instruction::SetGT && - CUI->getValue() == (1ULL << (SrcTySize-1))-1) + CUI->getZExtValue() == (1ULL << (SrcTySize-1))-1) // X > 127 => X < 0 return BinaryOperator::createSetLT(CastOp, Constant::getNullValue(SrcTy)); @@ -4800,13 +4827,13 @@ // We're performing a signed comparison. if (isSignSrc) { // Signed extend and signed comparison. - if (cast(CI)->getValue() < 0) // X < (small) --> false + if (cast(CI)->getSExtValue() < 0)// X < (small) --> false Result = ConstantBool::getFalse(); else - Result = ConstantBool::getTrue(); // X < (large) --> true + Result = ConstantBool::getTrue(); // X < (large) --> true } else { // Unsigned extend and signed comparison. - if (cast(CI)->getValue() < 0) + if (cast(CI)->getSExtValue() < 0) Result = ConstantBool::getFalse(); else Result = ConstantBool::getTrue(); @@ -4870,7 +4897,7 @@ // shr int -1, X = -1 (for any arithmetic shift rights of ~0) if (!isLeftShift) - if (ConstantSInt *CSI = dyn_cast(Op0)) + if (ConstantInt *CSI = dyn_cast(Op0)) if (CSI->isAllOnesValue()) return ReplaceInstUsesWith(I, CSI); @@ -4891,13 +4918,14 @@ } } - if (ConstantUInt *CUI = dyn_cast(Op1)) - if (Instruction *Res = FoldShiftByConstant(Op0, CUI, I)) - return Res; + if (ConstantInt *CUI = dyn_cast(Op1)) + if (CUI->getType()->isUnsigned()) + if (Instruction *Res = FoldShiftByConstant(Op0, CUI, I)) + return Res; return 0; } -Instruction *InstCombiner::FoldShiftByConstant(Value *Op0, ConstantUInt *Op1, +Instruction *InstCombiner::FoldShiftByConstant(Value *Op0, ConstantInt *Op1, ShiftInst &I) { bool isLeftShift = I.getOpcode() == Instruction::Shl; bool isSignedShift = Op0->getType()->isSigned(); @@ -4914,11 +4942,11 @@ // of a signed value. // unsigned TypeBits = Op0->getType()->getPrimitiveSizeInBits(); - if (Op1->getValue() >= TypeBits) { + if (Op1->getZExtValue() >= TypeBits) { if (isUnsignedShift || isLeftShift) return ReplaceInstUsesWith(I, Constant::getNullValue(Op0->getType())); else { - I.setOperand(1, ConstantUInt::get(Type::UByteTy, TypeBits-1)); + I.setOperand(1, ConstantInt::get(Type::UByteTy, TypeBits-1)); return &I; } } @@ -5088,7 +5116,7 @@ } } - if (ShiftOp && isa(ShiftOp->getOperand(1))) { + if (ShiftOp && isa(ShiftOp->getOperand(1))) { // Find the operands and properties of the input shift. Note that the // signedness of the input shift may differ from the current shift if there // is a noop cast between the two. @@ -5096,10 +5124,10 @@ bool isShiftOfSignedShift = ShiftOp->getType()->isSigned(); bool isShiftOfUnsignedShift = !isShiftOfSignedShift; - ConstantUInt *ShiftAmt1C = cast(ShiftOp->getOperand(1)); + ConstantInt *ShiftAmt1C = cast(ShiftOp->getOperand(1)); - unsigned ShiftAmt1 = (unsigned)ShiftAmt1C->getValue(); - unsigned ShiftAmt2 = (unsigned)Op1->getValue(); + unsigned ShiftAmt1 = (unsigned)ShiftAmt1C->getZExtValue(); + unsigned ShiftAmt2 = (unsigned)Op1->getZExtValue(); // Check for (A << c1) << c2 and (A >> c1) >> c2. if (isLeftShift == isShiftOfLeftShift) { @@ -5117,7 +5145,7 @@ if (isShiftOfSignedShift != isSignedShift) Op = InsertNewInstBefore(new CastInst(Op, I.getType(), "tmp"), I); return new ShiftInst(I.getOpcode(), Op, - ConstantUInt::get(Type::UByteTy, Amt)); + ConstantInt::get(Type::UByteTy, Amt)); } // Check for (A << c1) >> c2 or (A >> c1) << c2. If we are dealing with @@ -5144,7 +5172,7 @@ return ReplaceInstUsesWith(I, Mask); // (A << c) >> c === A & c2 } else if (ShiftAmt1 < ShiftAmt2) { return new ShiftInst(I.getOpcode(), Mask, - ConstantUInt::get(Type::UByteTy, ShiftAmt2-ShiftAmt1)); + ConstantInt::get(Type::UByteTy, ShiftAmt2-ShiftAmt1)); } else if (isShiftOfUnsignedShift || isShiftOfLeftShift) { if (isShiftOfUnsignedShift && !isShiftOfLeftShift && isSignedShift) { // Make sure to emit an unsigned shift right, not a signed one. @@ -5152,12 +5180,12 @@ Mask->getType()->getUnsignedVersion(), Op->getName()), I); Mask = new ShiftInst(Instruction::Shr, Mask, - ConstantUInt::get(Type::UByteTy, ShiftAmt1-ShiftAmt2)); + ConstantInt::get(Type::UByteTy, ShiftAmt1-ShiftAmt2)); InsertNewInstBefore(Mask, I); return new CastInst(Mask, I.getType()); } else { return new ShiftInst(ShiftOp->getOpcode(), Mask, - ConstantUInt::get(Type::UByteTy, ShiftAmt1-ShiftAmt2)); + ConstantInt::get(Type::UByteTy, ShiftAmt1-ShiftAmt2)); } } else { // (X >>s C1) << C2 where C1 > C2 === (X >>s (C1-C2)) & mask @@ -5166,7 +5194,7 @@ Mask->getName()), I); Instruction *Shift = new ShiftInst(ShiftOp->getOpcode(), Op, - ConstantUInt::get(Type::UByteTy, ShiftAmt1-ShiftAmt2)); + ConstantInt::get(Type::UByteTy, ShiftAmt1-ShiftAmt2)); InsertNewInstBefore(Shift, I); C = ConstantIntegral::getAllOnesValue(Shift->getType()); @@ -5206,33 +5234,37 @@ static Value *DecomposeSimpleLinearExpr(Value *Val, unsigned &Scale, unsigned &Offset) { assert(Val->getType() == Type::UIntTy && "Unexpected allocation size type!"); - if (ConstantUInt *CI = dyn_cast(Val)) { - Offset = CI->getValue(); - Scale = 1; - return ConstantUInt::get(Type::UIntTy, 0); + if (ConstantInt *CI = dyn_cast(Val)) { + if (CI->getType()->isUnsigned()) { + Offset = CI->getZExtValue(); + Scale = 1; + return ConstantInt::get(Type::UIntTy, 0); + } } else if (Instruction *I = dyn_cast(Val)) { if (I->getNumOperands() == 2) { - if (ConstantUInt *CUI = dyn_cast(I->getOperand(1))) { - if (I->getOpcode() == Instruction::Shl) { - // This is a value scaled by '1 << the shift amt'. - Scale = 1U << CUI->getValue(); - Offset = 0; - return I->getOperand(0); - } else if (I->getOpcode() == Instruction::Mul) { - // This value is scaled by 'CUI'. - Scale = CUI->getValue(); - Offset = 0; - return I->getOperand(0); - } else if (I->getOpcode() == Instruction::Add) { - // We have X+C. Check to see if we really have (X*C2)+C1, where C1 is - // divisible by C2. - unsigned SubScale; - Value *SubVal = DecomposeSimpleLinearExpr(I->getOperand(0), SubScale, - Offset); - Offset += CUI->getValue(); - if (SubScale > 1 && (Offset % SubScale == 0)) { - Scale = SubScale; - return SubVal; + if (ConstantInt *CUI = dyn_cast(I->getOperand(1))) { + if (CUI->getType()->isUnsigned()) { + if (I->getOpcode() == Instruction::Shl) { + // This is a value scaled by '1 << the shift amt'. + Scale = 1U << CUI->getZExtValue(); + Offset = 0; + return I->getOperand(0); + } else if (I->getOpcode() == Instruction::Mul) { + // This value is scaled by 'CUI'. + Scale = CUI->getZExtValue(); + Offset = 0; + return I->getOperand(0); + } else if (I->getOpcode() == Instruction::Add) { + // We have X+C. Check to see if we really have (X*C2)+C1, + // where C1 is divisible by C2. + unsigned SubScale; + Value *SubVal = + DecomposeSimpleLinearExpr(I->getOperand(0), SubScale, Offset); + Offset += CUI->getZExtValue(); + if (SubScale > 1 && (Offset % SubScale == 0)) { + Scale = SubScale; + return SubVal; + } } } } @@ -5306,9 +5338,12 @@ if (Scale == 1) { Amt = NumElements; } else { - Amt = ConstantUInt::get(Type::UIntTy, Scale); - if (ConstantUInt *CI = dyn_cast(NumElements)) - Amt = ConstantExpr::getMul(CI, cast(Amt)); + // If the allocation size is constant, form a constant mul expression + Amt = ConstantInt::get(Type::UIntTy, Scale); + if (isa(NumElements) && NumElements->getType()->isUnsigned()) + Amt = ConstantExpr::getMul( + cast(NumElements), cast(Amt)); + // otherwise multiply the amount and the number of elements else if (Scale != 1) { Instruction *Tmp = BinaryOperator::createMul(Amt, NumElements, "tmp"); Amt = InsertNewInstBefore(Tmp, AI); @@ -5316,7 +5351,7 @@ } if (unsigned Offset = (AllocElTySize*ArrayOffset)/CastElTySize) { - Value *Off = ConstantUInt::get(Type::UIntTy, Offset); + Value *Off = ConstantInt::get(Type::UIntTy, Offset); Instruction *Tmp = BinaryOperator::createAdd(Amt, Off, "tmp"); Amt = InsertNewInstBefore(Tmp, AI); } @@ -5452,7 +5487,7 @@ assert(CSrc->getType() != Type::ULongTy && "Cannot have type bigger than ulong!"); uint64_t AndValue = CSrc->getType()->getIntegralTypeMask(); - Constant *AndOp = ConstantUInt::get(A->getType()->getUnsignedVersion(), + Constant *AndOp = ConstantInt::get(A->getType()->getUnsignedVersion(), AndValue); AndOp = ConstantExpr::getCast(AndOp, A->getType()); Instruction *And = BinaryOperator::createAnd(CSrc->getOperand(0), AndOp); @@ -5580,7 +5615,7 @@ unsigned SrcBitSize = Src->getType()->getPrimitiveSizeInBits(); unsigned DestBitSize = CI.getType()->getPrimitiveSizeInBits(); assert(SrcBitSize < DestBitSize && "Not a zext?"); - Constant *C = ConstantUInt::get(Type::ULongTy, (1 << SrcBitSize)-1); + Constant *C = ConstantInt::get(Type::ULongTy, (1 << SrcBitSize)-1); C = ConstantExpr::getCast(C, CI.getType()); return BinaryOperator::createAnd(Res, C); } @@ -5645,7 +5680,7 @@ // simplifications. if (DestBitSize < SrcBitSize && Src->getType()->isSigned() && isa(Op1)) { - unsigned ShiftAmt = cast(Op1)->getValue(); + unsigned ShiftAmt = cast(Op1)->getZExtValue(); if (SrcBitSize > ShiftAmt && SrcBitSize-ShiftAmt >= DestBitSize) { // Convert to unsigned. Value *N1 = InsertOperandCastBefore(Op0, @@ -5963,7 +5998,7 @@ // Now that X is signed, we have to make the all ones value. Do // this by inserting a new SRA. unsigned Bits = X->getType()->getPrimitiveSizeInBits(); - Constant *ShAmt = ConstantUInt::get(Type::UByteTy, Bits-1); + Constant *ShAmt = ConstantInt::get(Type::UByteTy, Bits-1); Instruction *SRA = new ShiftInst(Instruction::Shr, X, ShAmt, "ones"); InsertNewInstBefore(SRA, SI); @@ -6264,13 +6299,13 @@ unsigned Alignment2 = GetKnownAlignment(MI->getOperand(2), TD); unsigned Align = std::min(Alignment1, Alignment2); if (MI->getAlignment()->getRawValue() < Align) { - MI->setAlignment(ConstantUInt::get(Type::UIntTy, Align)); + MI->setAlignment(ConstantInt::get(Type::UIntTy, Align)); Changed = true; } } else if (isa(MI)) { unsigned Alignment = GetKnownAlignment(MI->getDest(), TD); if (MI->getAlignment()->getRawValue() < Alignment) { - MI->setAlignment(ConstantUInt::get(Type::UIntTy, Alignment)); + MI->setAlignment(ConstantInt::get(Type::UIntTy, Alignment)); Changed = true; } } @@ -6527,14 +6562,14 @@ for (unsigned i = 0, e = NumCommonArgs; i != e; ++i, ++AI) { const Type *ParamTy = FT->getParamType(i); const Type *ActTy = (*AI)->getType(); - ConstantSInt* c = dyn_cast(*AI); + ConstantInt* c = dyn_cast(*AI); //Either we can cast directly, or we can upconvert the argument bool isConvertible = ActTy->isLosslesslyConvertibleTo(ParamTy) || (ParamTy->isIntegral() && ActTy->isIntegral() && ParamTy->isSigned() == ActTy->isSigned() && ParamTy->getPrimitiveSize() >= ActTy->getPrimitiveSize()) || (c && ParamTy->getPrimitiveSize() >= ActTy->getPrimitiveSize() && - c->getValue() > 0); + c->getSExtValue() > 0); if (Callee->isExternal() && !isConvertible) return false; } @@ -6859,11 +6894,12 @@ // If this is a constant idx, make sure to canonicalize it to be a signed // operand, otherwise CSE and other optimizations are pessimized. - if (ConstantUInt *CUI = dyn_cast(Op)) { - GEP.setOperand(i, ConstantExpr::getCast(CUI, - CUI->getType()->getSignedVersion())); - MadeChange = true; - } + if (ConstantInt *CUI = dyn_cast(Op)) + if (CUI->getType()->isUnsigned()) { + GEP.setOperand(i, + ConstantExpr::getCast(CUI, CUI->getType()->getSignedVersion())); + MadeChange = true; + } } if (MadeChange) return &GEP; @@ -7034,11 +7070,12 @@ } else if (Instruction *Inst =dyn_cast(GEP.getOperand(1))){ if (Inst->getOpcode() == Instruction::Shl && isa(Inst->getOperand(1))) { - unsigned ShAmt =cast(Inst->getOperand(1))->getValue(); + unsigned ShAmt = + cast(Inst->getOperand(1))->getZExtValue(); if (Inst->getType()->isSigned()) - Scale = ConstantSInt::get(Inst->getType(), 1ULL << ShAmt); + Scale = ConstantInt::get(Inst->getType(), 1ULL << ShAmt); else - Scale = ConstantUInt::get(Inst->getType(), 1ULL << ShAmt); + Scale = ConstantInt::get(Inst->getType(), 1ULL << ShAmt); NewIdx = Inst->getOperand(0); } else if (Inst->getOpcode() == Instruction::Mul && isa(Inst->getOperand(1))) { @@ -7050,12 +7087,8 @@ // If the index will be to exactly the right offset with the scale taken // out, perform the transformation. if (Scale && Scale->getRawValue() % ArrayEltSize == 0) { - if (ConstantSInt *C = dyn_cast(Scale)) - Scale = ConstantSInt::get(C->getType(), - (int64_t)C->getRawValue() / - (int64_t)ArrayEltSize); - else - Scale = ConstantUInt::get(Scale->getType(), + if (ConstantInt *C = dyn_cast(Scale)) + Scale = ConstantInt::get(Scale->getType(), Scale->getRawValue() / ArrayEltSize); if (Scale->getRawValue() != 1) { Constant *C = ConstantExpr::getCast(Scale, NewIdx->getType()); @@ -7080,8 +7113,9 @@ Instruction *InstCombiner::visitAllocationInst(AllocationInst &AI) { // Convert: malloc Ty, C - where C is a constant != 1 into: malloc [C x Ty], 1 if (AI.isArrayAllocation()) // Check C != 1 - if (const ConstantUInt *C = dyn_cast(AI.getArraySize())) { - const Type *NewTy = ArrayType::get(AI.getAllocatedType(), C->getValue()); + if (const ConstantInt *C = dyn_cast(AI.getArraySize())) { + const Type *NewTy = + ArrayType::get(AI.getAllocatedType(), C->getZExtValue()); AllocationInst *New = 0; // Create and insert the replacement instruction... @@ -7673,7 +7707,7 @@ if (isa(CP->getOperand(i))) Result.push_back(NElts*2); // undef -> 8 else - Result.push_back(cast(CP->getOperand(i))->getValue()); + Result.push_back(cast(CP->getOperand(i))->getZExtValue()); return Result; } @@ -7695,12 +7729,14 @@ return CP->getOperand(EltNo); else if (InsertElementInst *III = dyn_cast(V)) { // If this is an insert to a variable element, we don't know what it is. - if (!isa(III->getOperand(2))) return 0; - unsigned IIElt = cast(III->getOperand(2))->getValue(); + if (!isa(III->getOperand(2))) + return 0; + unsigned IIElt = cast(III->getOperand(2))->getZExtValue(); // If this is an insert to the element we are looking for, return the // inserted value. - if (EltNo == IIElt) return III->getOperand(1); + if (EltNo == IIElt) + return III->getOperand(1); // Otherwise, the insertelement doesn't modify the value, recurse on its // vector input. @@ -7744,21 +7780,22 @@ // If extracting a specified index from the vector, see if we can recursively // find a previously computed scalar that was inserted into the vector. - if (ConstantUInt *IdxC = dyn_cast(EI.getOperand(1))) { + if (ConstantInt *IdxC = dyn_cast(EI.getOperand(1))) { // This instruction only demands the single element from the input vector. // If the input vector has a single use, simplify it based on this use // property. + uint64_t IndexVal = IdxC->getZExtValue(); if (EI.getOperand(0)->hasOneUse()) { uint64_t UndefElts; if (Value *V = SimplifyDemandedVectorElts(EI.getOperand(0), - 1 << IdxC->getValue(), + 1 << IndexVal, UndefElts)) { EI.setOperand(0, V); return &EI; } } - if (Value *Elt = FindScalarElement(EI.getOperand(0), IdxC->getValue())) + if (Value *Elt = FindScalarElement(EI.getOperand(0), IndexVal)) return ReplaceInstUsesWith(EI, Elt); } @@ -7804,8 +7841,8 @@ } else if (ShuffleVectorInst *SVI = dyn_cast(I)) { // If this is extracting an element from a shufflevector, figure out where // it came from and extract from the appropriate input element instead. - if (ConstantUInt *Elt = dyn_cast(EI.getOperand(1))) { - unsigned SrcIdx = getShuffleMask(SVI)[Elt->getValue()]; + if (ConstantInt *Elt = dyn_cast(EI.getOperand(1))) { + unsigned SrcIdx = getShuffleMask(SVI)[Elt->getZExtValue()]; Value *Src; if (SrcIdx < SVI->getType()->getNumElements()) Src = SVI->getOperand(0); @@ -7836,11 +7873,11 @@ return true; } else if (V == LHS) { for (unsigned i = 0; i != NumElts; ++i) - Mask.push_back(ConstantUInt::get(Type::UIntTy, i)); + Mask.push_back(ConstantInt::get(Type::UIntTy, i)); return true; } else if (V == RHS) { for (unsigned i = 0; i != NumElts; ++i) - Mask.push_back(ConstantUInt::get(Type::UIntTy, i+NumElts)); + Mask.push_back(ConstantInt::get(Type::UIntTy, i+NumElts)); return true; } else if (InsertElementInst *IEI = dyn_cast(V)) { // If this is an insert of an extract from some other vector, include it. @@ -7874,11 +7911,11 @@ // If so, update the mask to reflect the inserted value. if (EI->getOperand(0) == LHS) { Mask[InsertedIdx & (NumElts-1)] = - ConstantUInt::get(Type::UIntTy, ExtractedIdx); + ConstantInt::get(Type::UIntTy, ExtractedIdx); } else { assert(EI->getOperand(0) == RHS); Mask[InsertedIdx & (NumElts-1)] = - ConstantUInt::get(Type::UIntTy, ExtractedIdx+NumElts); + ConstantInt::get(Type::UIntTy, ExtractedIdx+NumElts); } return true; @@ -7906,7 +7943,7 @@ Mask.assign(NumElts, UndefValue::get(Type::UIntTy)); return V; } else if (isa(V)) { - Mask.assign(NumElts, ConstantUInt::get(Type::UIntTy, 0)); + Mask.assign(NumElts, ConstantInt::get(Type::UIntTy, 0)); return V; } else if (InsertElementInst *IEI = dyn_cast(V)) { // If this is an insert of an extract from some other vector, include it. @@ -7927,7 +7964,7 @@ RHS = EI->getOperand(0); Value *V = CollectShuffleElements(VecOp, Mask, RHS); Mask[InsertedIdx & (NumElts-1)] = - ConstantUInt::get(Type::UIntTy, NumElts+ExtractedIdx); + ConstantInt::get(Type::UIntTy, NumElts+ExtractedIdx); return V; } @@ -7936,7 +7973,7 @@ // Everything but the extracted element is replaced with the RHS. for (unsigned i = 0; i != NumElts; ++i) { if (i != InsertedIdx) - Mask[i] = ConstantUInt::get(Type::UIntTy, NumElts+i); + Mask[i] = ConstantInt::get(Type::UIntTy, NumElts+i); } return V; } @@ -7953,7 +7990,7 @@ // Otherwise, can't do anything fancy. Return an identity vector. for (unsigned i = 0; i != NumElts; ++i) - Mask.push_back(ConstantUInt::get(Type::UIntTy, i)); + Mask.push_back(ConstantInt::get(Type::UIntTy, i)); return V; } @@ -7995,10 +8032,10 @@ Mask.assign(NumVectorElts, UndefValue::get(Type::UIntTy)); else { assert(isa(VecOp) && "Unknown thing"); - Mask.assign(NumVectorElts, ConstantUInt::get(Type::UIntTy, + Mask.assign(NumVectorElts, ConstantInt::get(Type::UIntTy, NumVectorElts)); } - Mask[InsertedIdx] = ConstantUInt::get(Type::UIntTy, ExtractedIdx); + Mask[InsertedIdx] = ConstantInt::get(Type::UIntTy, ExtractedIdx); return new ShuffleVectorInst(EI->getOperand(0), VecOp, ConstantPacked::get(Mask)); } @@ -8053,7 +8090,7 @@ Mask[i] = 2*e; // Turn into undef. else Mask[i] &= (e-1); // Force to LHS. - Elts.push_back(ConstantUInt::get(Type::UIntTy, Mask[i])); + Elts.push_back(ConstantInt::get(Type::UIntTy, Mask[i])); } } SVI.setOperand(0, SVI.getOperand(1)); @@ -8108,7 +8145,7 @@ if (NewMask[i] >= e*2) { Elts.push_back(UndefValue::get(Type::UIntTy)); } else { - Elts.push_back(ConstantUInt::get(Type::UIntTy, NewMask[i])); + Elts.push_back(ConstantInt::get(Type::UIntTy, NewMask[i])); } } return new ShuffleVectorInst(LHSSVI->getOperand(0), @@ -8178,7 +8215,7 @@ if (isFoldableGEP) { std::vector Ops(CE->op_begin()+1, CE->op_end()); uint64_t Offset = TD->getIndexedOffset(Ptr->getType(), Ops); - Constant *C = ConstantUInt::get(Type::ULongTy, Offset); + Constant *C = ConstantInt::get(Type::ULongTy, Offset); C = ConstantExpr::getCast(C, TD->getIntPtrType()); return ConstantExpr::getCast(C, CE->getType()); } Index: llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp diff -u llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:1.89 llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:1.89.2.1 --- llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:1.89 Sun Aug 27 17:42:52 2006 +++ llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp Wed Oct 18 22:57:56 2006 @@ -264,7 +264,7 @@ // operand. if (const StructType *STy = dyn_cast(*GTI)) { const StructLayout *SL = TD->getStructLayout(STy); - unsigned Idx = cast(GEP->getOperand(i))->getValue(); + unsigned Idx = cast(GEP->getOperand(i))->getZExtValue(); uint64_t Offset = SL->MemberOffsets[Idx]; GEPVal = SCEVAddExpr::get(GEPVal, SCEVUnknown::getIntegerSCEV(Offset, UIntPtrTy)); @@ -275,7 +275,7 @@ uint64_t TypeSize = TD->getTypeSize(GTI.getIndexedType()); if (TypeSize != 1) Idx = SCEVMulExpr::get(Idx, - SCEVConstant::get(ConstantUInt::get(UIntPtrTy, + SCEVConstant::get(ConstantInt::get(UIntPtrTy, TypeSize))); GEPVal = SCEVAddExpr::get(GEPVal, Idx); } Index: llvm/lib/Transforms/Scalar/LowerGC.cpp diff -u llvm/lib/Transforms/Scalar/LowerGC.cpp:1.13 llvm/lib/Transforms/Scalar/LowerGC.cpp:1.13.2.1 --- llvm/lib/Transforms/Scalar/LowerGC.cpp:1.13 Sun Aug 27 17:42:52 2006 +++ llvm/lib/Transforms/Scalar/LowerGC.cpp Wed Oct 18 22:57:56 2006 @@ -222,8 +222,8 @@ BasicBlock::iterator IP = AI; while (isa(IP)) ++IP; - Constant *Zero = ConstantUInt::get(Type::UIntTy, 0); - Constant *One = ConstantUInt::get(Type::UIntTy, 1); + Constant *Zero = ConstantInt::get(Type::UIntTy, 0); + Constant *One = ConstantInt::get(Type::UIntTy, 1); // Get a pointer to the prev pointer. std::vector Par; @@ -237,11 +237,11 @@ new StoreInst(PrevPtr, PrevPtrPtr, IP); // Set the number of elements in this record. - Par[1] = ConstantUInt::get(Type::UIntTy, 1); + Par[1] = ConstantInt::get(Type::UIntTy, 1); Value *NumEltsPtr = new GetElementPtrInst(AI, Par, "numeltsptr", IP); - new StoreInst(ConstantUInt::get(Type::UIntTy, GCRoots.size()), NumEltsPtr,IP); + new StoreInst(ConstantInt::get(Type::UIntTy, GCRoots.size()), NumEltsPtr,IP); - Par[1] = ConstantUInt::get(Type::UIntTy, 2); + Par[1] = ConstantInt::get(Type::UIntTy, 2); Par.resize(4); const PointerType *PtrLocTy = @@ -251,7 +251,7 @@ // Initialize all of the gcroot records now, and eliminate them as we go. for (unsigned i = 0, e = GCRoots.size(); i != e; ++i) { // Initialize the meta-data pointer. - Par[2] = ConstantUInt::get(Type::UIntTy, i); + Par[2] = ConstantInt::get(Type::UIntTy, i); Par[3] = One; Value *MetaDataPtr = new GetElementPtrInst(AI, Par, "MetaDataPtr", IP); assert(isa(GCRoots[i]->getOperand(2)) && "Must be a constant"); Index: llvm/lib/Transforms/Scalar/LowerPacked.cpp diff -u llvm/lib/Transforms/Scalar/LowerPacked.cpp:1.9 llvm/lib/Transforms/Scalar/LowerPacked.cpp:1.9.2.1 --- llvm/lib/Transforms/Scalar/LowerPacked.cpp:1.9 Sun Aug 27 17:42:52 2006 +++ llvm/lib/Transforms/Scalar/LowerPacked.cpp Wed Oct 18 22:57:56 2006 @@ -209,7 +209,7 @@ if (const PackedType* PKT = dyn_cast(LI.getType())) { // Initialization, Idx is needed for getelementptr needed later std::vector Idx(2); - Idx[0] = ConstantUInt::get(Type::UIntTy,0); + Idx[0] = ConstantInt::get(Type::UIntTy,0); ArrayType* AT = ArrayType::get(PKT->getContainedType(0), PKT->getNumElements()); @@ -227,7 +227,7 @@ for (unsigned i = 0, e = PKT->getNumElements(); i != e; ++i) { // Calculate the second index we will need - Idx[1] = ConstantUInt::get(Type::UIntTy,i); + Idx[1] = ConstantInt::get(Type::UIntTy,i); // Get the pointer Value* val = new GetElementPtrInst(array, @@ -283,7 +283,7 @@ dyn_cast(SI.getOperand(0)->getType())) { // We will need this for getelementptr std::vector Idx(2); - Idx[0] = ConstantUInt::get(Type::UIntTy,0); + Idx[0] = ConstantInt::get(Type::UIntTy,0); ArrayType* AT = ArrayType::get(PKT->getContainedType(0), PKT->getNumElements()); @@ -301,7 +301,7 @@ for (unsigned i = 0, e = PKT->getNumElements(); i != e; ++i) { // Generate the indices for getelementptr - Idx[1] = ConstantUInt::get(Type::UIntTy,i); + Idx[1] = ConstantInt::get(Type::UIntTy,i); Value* val = new GetElementPtrInst(array, Idx, "store.ge." + @@ -346,17 +346,17 @@ const PackedType *PTy = cast(EI.getOperand(0)->getType()); Value *op1 = EI.getOperand(1); - if (ConstantUInt *C = dyn_cast(op1)) { - EI.replaceAllUsesWith(op0Vals[C->getValue()]); + if (ConstantInt *C = dyn_cast(op1)) { + EI.replaceAllUsesWith(op0Vals[C->getZExtValue()]); } else { AllocaInst *alloca = new AllocaInst(PTy->getElementType(), - ConstantUInt::get(Type::UIntTy, PTy->getNumElements()), + ConstantInt::get(Type::UIntTy, PTy->getNumElements()), EI.getName() + ".alloca", EI.getParent()->getParent()->getEntryBlock().begin()); for (unsigned i = 0; i < PTy->getNumElements(); ++i) { GetElementPtrInst *GEP = - new GetElementPtrInst(alloca, ConstantUInt::get(Type::UIntTy, i), + new GetElementPtrInst(alloca, ConstantInt::get(Type::UIntTy, i), "store.ge", &EI); new StoreInst(op0Vals[i], GEP, &EI); } @@ -378,8 +378,8 @@ std::vector result; result.reserve(Vals.size()); - if (ConstantUInt *C = dyn_cast(Idx)) { - unsigned idxVal = C->getValue(); + if (ConstantInt *C = dyn_cast(Idx)) { + unsigned idxVal = C->getZExtValue(); for (unsigned i = 0; i != Vals.size(); ++i) { result.push_back(i == idxVal ? Elt : Vals[i]); } @@ -387,7 +387,7 @@ for (unsigned i = 0; i != Vals.size(); ++i) { SetCondInst *setcc = new SetCondInst(Instruction::SetEQ, Idx, - ConstantUInt::get(Type::UIntTy, i), + ConstantInt::get(Type::UIntTy, i), "setcc", &IE); SelectInst *select = new SelectInst(setcc, Elt, Vals[i], "select", &IE); Index: llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp diff -u llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp:1.44 llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp:1.44.2.1 --- llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp:1.44 Sun Oct 8 18:53:04 2006 +++ llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp Wed Oct 18 22:57:56 2006 @@ -608,13 +608,13 @@ if (const PackedType *PTy = dyn_cast(NV->getType())) { // Must be an element access. unsigned Elt = Offset/(TD.getTypeSize(PTy->getElementType())*8); - NV = new ExtractElementInst(NV, ConstantUInt::get(Type::UIntTy, Elt), + NV = new ExtractElementInst(NV, ConstantInt::get(Type::UIntTy, Elt), "tmp", LI); } else { assert(NV->getType()->isInteger() && "Unknown promotion!"); if (Offset && Offset < TD.getTypeSize(NV->getType())*8) NV = new ShiftInst(Instruction::Shr, NV, - ConstantUInt::get(Type::UByteTy, Offset), + ConstantInt::get(Type::UByteTy, Offset), LI->getName(), LI); NV = new CastInst(NV, LI->getType(), LI->getName(), LI); } @@ -635,7 +635,7 @@ // Must be an element insertion. unsigned Elt = Offset/(TD.getTypeSize(PTy->getElementType())*8); SV = new InsertElementInst(Old, SV, - ConstantUInt::get(Type::UIntTy, Elt), + ConstantInt::get(Type::UIntTy, Elt), "tmp", SI); } else { // If SV is signed, convert it to unsigned, so that the next cast zero @@ -646,7 +646,7 @@ SV = new CastInst(SV, Old->getType(), SV->getName(), SI); if (Offset && Offset < TD.getTypeSize(SV->getType())*8) SV = new ShiftInst(Instruction::Shl, SV, - ConstantUInt::get(Type::UByteTy, Offset), + ConstantInt::get(Type::UByteTy, Offset), SV->getName()+".adj", SI); // Mask out the bits we are about to insert from the old value. unsigned TotalBits = TD.getTypeSize(SV->getType())*8; @@ -657,7 +657,7 @@ if (TotalBits != 64) Mask = Mask & ((1ULL << TotalBits)-1); Old = BinaryOperator::createAnd(Old, - ConstantUInt::get(Old->getType(), Mask), + ConstantInt::get(Old->getType(), Mask), Old->getName()+".mask", SI); SV = BinaryOperator::createOr(Old, SV, SV->getName()+".ins", SI); } From reid at x10sys.com Wed Oct 18 22:59:01 2006 From: reid at x10sys.com (Reid Spencer) Date: Wed, 18 Oct 2006 22:59:01 -0500 Subject: [llvm-commits] [SignlessTypes] CVS: llvm/lib/VMCore/AsmWriter.cpp ConstantFolding.cpp Constants.cpp Instructions.cpp Type.cpp Verifier.cpp Message-ID: <200610190359.k9J3x1jB003922@zion.cs.uiuc.edu> Changes in directory llvm/lib/VMCore: AsmWriter.cpp updated: 1.208 -> 1.208.2.1 ConstantFolding.cpp updated: 1.93 -> 1.93.2.1 Constants.cpp updated: 1.163 -> 1.163.2.1 Instructions.cpp updated: 1.42 -> 1.42.2.1 Type.cpp updated: 1.147 -> 1.147.2.1 Verifier.cpp updated: 1.164 -> 1.164.2.1 --- Log message: For PR950: http://llvm.org/PR950 : This commit (on SignlessTypes branch) provides the first Iteration for moving LLVM away from Signed types. This patch removes the ConstantSInt and ConstantUInt classes from Type.h and makes all necessary changes in LLVM to compensate. --- Diffs of the changes: (+254 -201) AsmWriter.cpp | 9 - ConstantFolding.cpp | 297 ++++++++++++++++++++++++++++------------------------ Constants.cpp | 127 ++++++++++++---------- Instructions.cpp | 14 +- Type.cpp | 6 - Verifier.cpp | 2 6 files changed, 254 insertions(+), 201 deletions(-) Index: llvm/lib/VMCore/AsmWriter.cpp diff -u llvm/lib/VMCore/AsmWriter.cpp:1.208 llvm/lib/VMCore/AsmWriter.cpp:1.208.2.1 --- llvm/lib/VMCore/AsmWriter.cpp:1.208 Tue Oct 17 21:21:12 2006 +++ llvm/lib/VMCore/AsmWriter.cpp Wed Oct 18 22:57:56 2006 @@ -422,10 +422,11 @@ static std::string Indent = "\n"; if (const ConstantBool *CB = dyn_cast(CV)) { Out << (CB->getValue() ? "true" : "false"); - } else if (const ConstantSInt *CI = dyn_cast(CV)) { - Out << CI->getValue(); - } else if (const ConstantUInt *CI = dyn_cast(CV)) { - Out << CI->getValue(); + } else if (const ConstantInt *CI = dyn_cast(CV)) { + if (CI->getType()->isSigned()) + Out << CI->getSExtValue(); + else + Out << CI->getZExtValue(); } else if (const ConstantFP *CFP = dyn_cast(CV)) { // We would like to output the FP constant value in exponential notation, // but we cannot do this if doing so will lose precision. Check here to Index: llvm/lib/VMCore/ConstantFolding.cpp diff -u llvm/lib/VMCore/ConstantFolding.cpp:1.93 llvm/lib/VMCore/ConstantFolding.cpp:1.93.2.1 --- llvm/lib/VMCore/ConstantFolding.cpp:1.93 Fri Oct 13 12:22:21 2006 +++ llvm/lib/VMCore/ConstantFolding.cpp Wed Oct 18 22:57:56 2006 @@ -271,14 +271,14 @@ } DEF_CAST(Bool , ConstantBool, bool) - DEF_CAST(SByte , ConstantSInt, signed char) - DEF_CAST(UByte , ConstantUInt, unsigned char) - DEF_CAST(Short , ConstantSInt, signed short) - DEF_CAST(UShort, ConstantUInt, unsigned short) - DEF_CAST(Int , ConstantSInt, signed int) - DEF_CAST(UInt , ConstantUInt, unsigned int) - DEF_CAST(Long , ConstantSInt, int64_t) - DEF_CAST(ULong , ConstantUInt, uint64_t) + DEF_CAST(SByte , ConstantInt, signed char) + DEF_CAST(UByte , ConstantInt, unsigned char) + DEF_CAST(Short , ConstantInt, signed short) + DEF_CAST(UShort, ConstantInt, unsigned short) + DEF_CAST(Int , ConstantInt, signed int) + DEF_CAST(UInt , ConstantInt, unsigned int) + DEF_CAST(Long , ConstantInt, int64_t) + DEF_CAST(ULong , ConstantInt, uint64_t) DEF_CAST(Float , ConstantFP , float) DEF_CAST(Double, ConstantFP , double) #undef DEF_CAST @@ -303,28 +303,28 @@ return ConstantBool::getFalse(); } static Constant *CastToSByte (const Constant *V) { - return ConstantSInt::get(Type::SByteTy, 0); + return ConstantInt::get(Type::SByteTy, 0); } static Constant *CastToUByte (const Constant *V) { - return ConstantUInt::get(Type::UByteTy, 0); + return ConstantInt::get(Type::UByteTy, 0); } static Constant *CastToShort (const Constant *V) { - return ConstantSInt::get(Type::ShortTy, 0); + return ConstantInt::get(Type::ShortTy, 0); } static Constant *CastToUShort(const Constant *V) { - return ConstantUInt::get(Type::UShortTy, 0); + return ConstantInt::get(Type::UShortTy, 0); } static Constant *CastToInt (const Constant *V) { - return ConstantSInt::get(Type::IntTy, 0); + return ConstantInt::get(Type::IntTy, 0); } static Constant *CastToUInt (const Constant *V) { - return ConstantUInt::get(Type::UIntTy, 0); + return ConstantInt::get(Type::UIntTy, 0); } static Constant *CastToLong (const Constant *V) { - return ConstantSInt::get(Type::LongTy, 0); + return ConstantInt::get(Type::LongTy, 0); } static Constant *CastToULong (const Constant *V) { - return ConstantUInt::get(Type::ULongTy, 0); + return ConstantInt::get(Type::ULongTy, 0); } static Constant *CastToFloat (const Constant *V) { return ConstantFP::get(Type::FloatTy, 0); @@ -428,49 +428,46 @@ //===----------------------------------------------------------------------===// -// DirectRules Class +// DirectIntRules Class //===----------------------------------------------------------------------===// // -// DirectRules provides a concrete base classes of ConstRules for a variety of -// different types. This allows the C++ compiler to automatically generate our -// constant handling operations in a typesafe and accurate manner. +// DirectIntRules provides implementations of functions that are valid on +// integer types, but not all types in general. // namespace { -template -struct VISIBILITY_HIDDEN DirectRules - : public TemplateRules { - static Constant *Add(const ConstantClass *V1, const ConstantClass *V2) { - BuiltinType R = (BuiltinType)V1->getValue() + (BuiltinType)V2->getValue(); - return ConstantClass::get(*Ty, R); - } +template +struct VISIBILITY_HIDDEN DirectIntRules + : public TemplateRules > { - static Constant *Sub(const ConstantClass *V1, const ConstantClass *V2) { - BuiltinType R = (BuiltinType)V1->getValue() - (BuiltinType)V2->getValue(); - return ConstantClass::get(*Ty, R); + static Constant *Add(const ConstantInt *V1, const ConstantInt *V2) { + BuiltinType R = (BuiltinType)V1->getRawValue() + + (BuiltinType)V2->getRawValue(); + return ConstantInt::get(*Ty, R); } - static Constant *Mul(const ConstantClass *V1, const ConstantClass *V2) { - BuiltinType R = (BuiltinType)V1->getValue() * (BuiltinType)V2->getValue(); - return ConstantClass::get(*Ty, R); + static Constant *Sub(const ConstantInt *V1, const ConstantInt *V2) { + BuiltinType R = (BuiltinType)V1->getRawValue() - + (BuiltinType)V2->getRawValue(); + return ConstantInt::get(*Ty, R); } - static Constant *Div(const ConstantClass *V1, const ConstantClass *V2) { - if (V2->isNullValue()) return 0; - BuiltinType R = (BuiltinType)V1->getValue() / (BuiltinType)V2->getValue(); - return ConstantClass::get(*Ty, R); + static Constant *Mul(const ConstantInt *V1, const ConstantInt *V2) { + BuiltinType R = (BuiltinType)V1->getRawValue() * + (BuiltinType)V2->getRawValue(); + return ConstantInt::get(*Ty, R); } - static Constant *LessThan(const ConstantClass *V1, const ConstantClass *V2) { - bool R = (BuiltinType)V1->getValue() < (BuiltinType)V2->getValue(); + static Constant *LessThan(const ConstantInt *V1, const ConstantInt *V2) { + bool R = (BuiltinType)V1->getRawValue() < (BuiltinType)V2->getRawValue(); return ConstantBool::get(R); } - static Constant *EqualTo(const ConstantClass *V1, const ConstantClass *V2) { - bool R = (BuiltinType)V1->getValue() == (BuiltinType)V2->getValue(); + static Constant *EqualTo(const ConstantInt *V1, const ConstantInt *V2) { + bool R = (BuiltinType)V1->getRawValue() == (BuiltinType)V2->getRawValue(); return ConstantBool::get(R); } - static Constant *CastToPointer(const ConstantClass *V, + static Constant *CastToPointer(const ConstantInt *V, const PointerType *PTy) { if (V->isNullValue()) // Is it a FP or Integral null value? return ConstantPointerNull::get(PTy); @@ -479,79 +476,70 @@ // Casting operators. ick #define DEF_CAST(TYPE, CLASS, CTYPE) \ - static Constant *CastTo##TYPE (const ConstantClass *V) { \ - return CLASS::get(Type::TYPE##Ty, (CTYPE)(BuiltinType)V->getValue()); \ + static Constant *CastTo##TYPE (const ConstantInt *V) { \ + return CLASS::get(Type::TYPE##Ty, (CTYPE)(BuiltinType)V->getRawValue()); \ } DEF_CAST(Bool , ConstantBool, bool) - DEF_CAST(SByte , ConstantSInt, signed char) - DEF_CAST(UByte , ConstantUInt, unsigned char) - DEF_CAST(Short , ConstantSInt, signed short) - DEF_CAST(UShort, ConstantUInt, unsigned short) - DEF_CAST(Int , ConstantSInt, signed int) - DEF_CAST(UInt , ConstantUInt, unsigned int) - DEF_CAST(Long , ConstantSInt, int64_t) - DEF_CAST(ULong , ConstantUInt, uint64_t) - DEF_CAST(Float , ConstantFP , float) - DEF_CAST(Double, ConstantFP , double) + DEF_CAST(SByte , ConstantInt, signed char) + DEF_CAST(UByte , ConstantInt, unsigned char) + DEF_CAST(Short , ConstantInt, signed short) + DEF_CAST(UShort, ConstantInt, unsigned short) + DEF_CAST(Int , ConstantInt, signed int) + DEF_CAST(UInt , ConstantInt, unsigned int) + DEF_CAST(Long , ConstantInt, int64_t) + DEF_CAST(ULong , ConstantInt, uint64_t) + DEF_CAST(Float , ConstantFP , float) + DEF_CAST(Double, ConstantFP , double) #undef DEF_CAST -}; -} // end anonymous namespace - -//===----------------------------------------------------------------------===// -// DirectIntRules Class -//===----------------------------------------------------------------------===// -// -// DirectIntRules provides implementations of functions that are valid on -// integer types, but not all types in general. -// -namespace { -template -struct VISIBILITY_HIDDEN DirectIntRules - : public DirectRules > { - - static Constant *Div(const ConstantClass *V1, const ConstantClass *V2) { + static Constant *Div(const ConstantInt *V1, const ConstantInt *V2) { if (V2->isNullValue()) return 0; if (V2->isAllOnesValue() && // MIN_INT / -1 - (BuiltinType)V1->getValue() == -(BuiltinType)V1->getValue()) + (BuiltinType)V1->getRawValue() == -(BuiltinType)V1->getRawValue()) return 0; - BuiltinType R = (BuiltinType)V1->getValue() / (BuiltinType)V2->getValue(); - return ConstantClass::get(*Ty, R); + BuiltinType R = + (BuiltinType)V1->getRawValue() / (BuiltinType)V2->getRawValue(); + return ConstantInt::get(*Ty, R); } - static Constant *Rem(const ConstantClass *V1, - const ConstantClass *V2) { + static Constant *Rem(const ConstantInt *V1, + const ConstantInt *V2) { if (V2->isNullValue()) return 0; // X / 0 if (V2->isAllOnesValue() && // MIN_INT / -1 - (BuiltinType)V1->getValue() == -(BuiltinType)V1->getValue()) + (BuiltinType)V1->getRawValue() == -(BuiltinType)V1->getRawValue()) return 0; - BuiltinType R = (BuiltinType)V1->getValue() % (BuiltinType)V2->getValue(); - return ConstantClass::get(*Ty, R); + BuiltinType R = + (BuiltinType)V1->getRawValue() % (BuiltinType)V2->getRawValue(); + return ConstantInt::get(*Ty, R); } - static Constant *And(const ConstantClass *V1, const ConstantClass *V2) { - BuiltinType R = (BuiltinType)V1->getValue() & (BuiltinType)V2->getValue(); - return ConstantClass::get(*Ty, R); + static Constant *And(const ConstantInt *V1, const ConstantInt *V2) { + BuiltinType R = + (BuiltinType)V1->getRawValue() & (BuiltinType)V2->getRawValue(); + return ConstantInt::get(*Ty, R); } - static Constant *Or(const ConstantClass *V1, const ConstantClass *V2) { - BuiltinType R = (BuiltinType)V1->getValue() | (BuiltinType)V2->getValue(); - return ConstantClass::get(*Ty, R); + static Constant *Or(const ConstantInt *V1, const ConstantInt *V2) { + BuiltinType R = + (BuiltinType)V1->getRawValue() | (BuiltinType)V2->getRawValue(); + return ConstantInt::get(*Ty, R); } - static Constant *Xor(const ConstantClass *V1, const ConstantClass *V2) { - BuiltinType R = (BuiltinType)V1->getValue() ^ (BuiltinType)V2->getValue(); - return ConstantClass::get(*Ty, R); + static Constant *Xor(const ConstantInt *V1, const ConstantInt *V2) { + BuiltinType R = + (BuiltinType)V1->getRawValue() ^ (BuiltinType)V2->getRawValue(); + return ConstantInt::get(*Ty, R); } - static Constant *Shl(const ConstantClass *V1, const ConstantClass *V2) { - BuiltinType R = (BuiltinType)V1->getValue() << (BuiltinType)V2->getValue(); - return ConstantClass::get(*Ty, R); + static Constant *Shl(const ConstantInt *V1, const ConstantInt *V2) { + BuiltinType R = + (BuiltinType)V1->getRawValue() << (BuiltinType)V2->getRawValue(); + return ConstantInt::get(*Ty, R); } - static Constant *Shr(const ConstantClass *V1, const ConstantClass *V2) { - BuiltinType R = (BuiltinType)V1->getValue() >> (BuiltinType)V2->getValue(); - return ConstantClass::get(*Ty, R); + static Constant *Shr(const ConstantInt *V1, const ConstantInt *V2) { + BuiltinType R = + (BuiltinType)V1->getRawValue() >> (BuiltinType)V2->getRawValue(); + return ConstantInt::get(*Ty, R); } }; } // end anonymous namespace @@ -565,22 +553,74 @@ /// floating point types, but not all types in general. /// namespace { -template +template struct VISIBILITY_HIDDEN DirectFPRules - : public DirectRules > { - static Constant *Rem(const ConstantClass *V1, const ConstantClass *V2) { + : public TemplateRules > { + + static Constant *Add(const ConstantFP *V1, const ConstantFP *V2) { + BuiltinType R = (BuiltinType)V1->getValue() + + (BuiltinType)V2->getValue(); + return ConstantFP::get(*Ty, R); + } + + static Constant *Sub(const ConstantFP *V1, const ConstantFP *V2) { + BuiltinType R = (BuiltinType)V1->getValue() - (BuiltinType)V2->getValue(); + return ConstantFP::get(*Ty, R); + } + + static Constant *Mul(const ConstantFP *V1, const ConstantFP *V2) { + BuiltinType R = (BuiltinType)V1->getValue() * (BuiltinType)V2->getValue(); + return ConstantFP::get(*Ty, R); + } + + static Constant *LessThan(const ConstantFP *V1, const ConstantFP *V2) { + bool R = (BuiltinType)V1->getValue() < (BuiltinType)V2->getValue(); + return ConstantBool::get(R); + } + + static Constant *EqualTo(const ConstantFP *V1, const ConstantFP *V2) { + bool R = (BuiltinType)V1->getValue() == (BuiltinType)V2->getValue(); + return ConstantBool::get(R); + } + + static Constant *CastToPointer(const ConstantFP *V, + const PointerType *PTy) { + if (V->isNullValue()) // Is it a FP or Integral null value? + return ConstantPointerNull::get(PTy); + return 0; // Can't const prop other types of pointers + } + + // Casting operators. ick +#define DEF_CAST(TYPE, CLASS, CTYPE) \ + static Constant *CastTo##TYPE (const ConstantFP *V) { \ + return CLASS::get(Type::TYPE##Ty, (CTYPE)(BuiltinType)V->getValue()); \ + } + + DEF_CAST(Bool , ConstantBool, bool) + DEF_CAST(SByte , ConstantInt, signed char) + DEF_CAST(UByte , ConstantInt, unsigned char) + DEF_CAST(Short , ConstantInt, signed short) + DEF_CAST(UShort, ConstantInt, unsigned short) + DEF_CAST(Int , ConstantInt, signed int) + DEF_CAST(UInt , ConstantInt, unsigned int) + DEF_CAST(Long , ConstantInt, int64_t) + DEF_CAST(ULong , ConstantInt, uint64_t) + DEF_CAST(Float , ConstantFP , float) + DEF_CAST(Double, ConstantFP , double) +#undef DEF_CAST + + static Constant *Rem(const ConstantFP *V1, const ConstantFP *V2) { if (V2->isNullValue()) return 0; BuiltinType Result = std::fmod((BuiltinType)V1->getValue(), (BuiltinType)V2->getValue()); - return ConstantClass::get(*Ty, Result); + return ConstantFP::get(*Ty, Result); } - static Constant *Div(const ConstantClass *V1, const ConstantClass *V2) { + static Constant *Div(const ConstantFP *V1, const ConstantFP *V2) { BuiltinType inf = std::numeric_limits::infinity(); - if (V2->isExactlyValue(0.0)) return ConstantClass::get(*Ty, inf); - if (V2->isExactlyValue(-0.0)) return ConstantClass::get(*Ty, -inf); + if (V2->isExactlyValue(0.0)) return ConstantFP::get(*Ty, inf); + if (V2->isExactlyValue(-0.0)) return ConstantFP::get(*Ty, -inf); BuiltinType R = (BuiltinType)V1->getValue() / (BuiltinType)V2->getValue(); - return ConstantClass::get(*Ty, R); + return ConstantFP::get(*Ty, R); } }; } // end anonymous namespace @@ -590,26 +630,16 @@ static ManagedStatic NullPointerR; static ManagedStatic ConstantPackedR; static ManagedStatic GeneralPackedR; -static ManagedStatic > SByteR; -static ManagedStatic > UByteR; -static ManagedStatic > ShortR; -static ManagedStatic > UShortR; -static ManagedStatic > IntR; -static ManagedStatic > UIntR; -static ManagedStatic > LongR; -static ManagedStatic > ULongR; -static ManagedStatic > FloatR; -static ManagedStatic > DoubleR; +static ManagedStatic > SByteR; +static ManagedStatic > UByteR; +static ManagedStatic > ShortR; +static ManagedStatic > UShortR; +static ManagedStatic > IntR; +static ManagedStatic > UIntR; +static ManagedStatic > LongR; +static ManagedStatic > ULongR; +static ManagedStatic > FloatR; +static ManagedStatic > DoubleR; /// ConstRules::get - This method returns the constant rules implementation that /// implements the semantics of the two specified constants. @@ -705,7 +735,7 @@ for (unsigned i = 0; i != SrcNumElts; ++i) { uint64_t V = DoubleToBits(cast(CP->getOperand(i))->getValue()); - Constant *C = ConstantUInt::get(Type::ULongTy, V); + Constant *C = ConstantInt::get(Type::ULongTy, V); Result.push_back(ConstantExpr::getCast(C, DstEltTy)); } return ConstantPacked::get(Result); @@ -713,8 +743,8 @@ assert(SrcEltTy->getTypeID() == Type::FloatTyID); for (unsigned i = 0; i != SrcNumElts; ++i) { - unsigned V = FloatToBits(cast(CP->getOperand(i))->getValue()); - Constant *C = ConstantUInt::get(Type::UIntTy, V); + uint32_t V = FloatToBits(cast(CP->getOperand(i))->getValue()); + Constant *C = ConstantInt::get(Type::UIntTy, V); Result.push_back(ConstantExpr::getCast(C, DstEltTy)); } return ConstantPacked::get(Result); @@ -871,8 +901,8 @@ cast(Val->getType())->getElementType()); if (const ConstantPacked *CVal = dyn_cast(Val)) { - if (const ConstantUInt *CIdx = dyn_cast(Idx)) { - return const_cast(CVal->getOperand(CIdx->getValue())); + if (const ConstantInt *CIdx = dyn_cast(Idx)) { + return const_cast(CVal->getOperand(CIdx->getZExtValue())); } else if (isa(Idx)) { // ee({w,x,y,z}, undef) -> w (an arbitrary value). return const_cast(CVal->getOperand(0)); @@ -884,9 +914,9 @@ Constant *llvm::ConstantFoldInsertElementInstruction(const Constant *Val, const Constant *Elt, const Constant *Idx) { - const ConstantUInt *CIdx = dyn_cast(Idx); + const ConstantInt *CIdx = dyn_cast(Idx); if (!CIdx) return 0; - unsigned idxVal = CIdx->getValue(); + uint64_t idxVal = CIdx->getZExtValue(); if (const UndefValue *UVal = dyn_cast(Val)) { // Insertion of scalar constant into packed undef // Optimize away insertion of undef @@ -991,7 +1021,8 @@ // If they are really different, now that they are the same type, then we // found a difference! - if (cast(C1)->getValue() < cast(C2)->getValue()) + if (cast(C1)->getSExtValue() < + cast(C2)->getSExtValue()) return -1; else return 1; @@ -1427,10 +1458,10 @@ if (IdxList.size() == 1) { const Type *ElTy = cast(C->getType())->getElementType(); - if (unsigned ElSize = ElTy->getPrimitiveSize()) { + if (uint32_t ElSize = ElTy->getPrimitiveSize()) { // gep null, C is equal to C*sizeof(nullty). If nullty is a known llvm // type, we can statically fold this. - Constant *R = ConstantUInt::get(Type::UIntTy, ElSize); + Constant *R = ConstantInt::get(Type::UIntTy, ElSize); R = ConstantExpr::getCast(R, Idx0->getType()); R = ConstantExpr::getMul(R, Idx0); return ConstantExpr::getCast(R, C->getType()); Index: llvm/lib/VMCore/Constants.cpp diff -u llvm/lib/VMCore/Constants.cpp:1.163 llvm/lib/VMCore/Constants.cpp:1.163.2.1 --- llvm/lib/VMCore/Constants.cpp:1.163 Thu Sep 28 18:34:27 2006 +++ llvm/lib/VMCore/Constants.cpp Wed Oct 18 22:57:56 2006 @@ -66,35 +66,35 @@ return NullBool; } case Type::SByteTyID: { - static Constant *NullSByte = ConstantSInt::get(Type::SByteTy, 0); + static Constant *NullSByte = ConstantInt::get(Type::SByteTy, int8_t(0)); return NullSByte; } case Type::UByteTyID: { - static Constant *NullUByte = ConstantUInt::get(Type::UByteTy, 0); + static Constant *NullUByte = ConstantInt::get(Type::UByteTy, uint8_t(0)); return NullUByte; } case Type::ShortTyID: { - static Constant *NullShort = ConstantSInt::get(Type::ShortTy, 0); + static Constant *NullShort = ConstantInt::get(Type::ShortTy, int16_t(0)); return NullShort; } case Type::UShortTyID: { - static Constant *NullUShort = ConstantUInt::get(Type::UShortTy, 0); + static Constant *NullUShort = ConstantInt::get(Type::UShortTy, uint16_t(0)); return NullUShort; } case Type::IntTyID: { - static Constant *NullInt = ConstantSInt::get(Type::IntTy, 0); + static Constant *NullInt = ConstantInt::get(Type::IntTy, int32_t(0)); return NullInt; } case Type::UIntTyID: { - static Constant *NullUInt = ConstantUInt::get(Type::UIntTy, 0); + static Constant *NullUInt = ConstantInt::get(Type::UIntTy, uint32_t(0)); return NullUInt; } case Type::LongTyID: { - static Constant *NullLong = ConstantSInt::get(Type::LongTy, 0); + static Constant *NullLong = ConstantInt::get(Type::LongTy, int64_t(0)); return NullLong; } case Type::ULongTyID: { - static Constant *NullULong = ConstantUInt::get(Type::ULongTy, 0); + static Constant *NullULong = ConstantInt::get(Type::ULongTy, uint64_t(0)); return NullULong; } @@ -133,7 +133,7 @@ unsigned TypeBits = Ty->getPrimitiveSize()*8; int64_t Val = INT64_MAX; // All ones Val >>= 64-TypeBits; // Shift out unwanted 1 bits... - return ConstantSInt::get(Ty, Val); + return ConstantInt::get(Ty, Val); } case Type::UByteTyID: @@ -157,13 +157,13 @@ unsigned TypeBits = Ty->getPrimitiveSize()*8; int64_t Val = -1; // All ones Val <<= TypeBits-1; // Shift over to the right spot - return ConstantSInt::get(Ty, Val); + return ConstantInt::get(Ty, Val); } case Type::UByteTyID: case Type::UShortTyID: case Type::UIntTyID: - case Type::ULongTyID: return ConstantUInt::get(Ty, 0); + case Type::ULongTyID: return ConstantInt::get(Ty, 0); default: return 0; } @@ -176,7 +176,7 @@ case Type::SByteTyID: case Type::ShortTyID: case Type::IntTyID: - case Type::LongTyID: return ConstantSInt::get(Ty, -1); + case Type::LongTyID: return ConstantInt::get(Ty, int32_t(-1)); case Type::UByteTyID: case Type::UShortTyID: @@ -186,20 +186,12 @@ unsigned TypeBits = Ty->getPrimitiveSize()*8; uint64_t Val = ~0ULL; // All ones Val >>= 64-TypeBits; // Shift out unwanted 1 bits... - return ConstantUInt::get(Ty, Val); + return ConstantInt::get(Ty, Val); } default: return 0; } } -bool ConstantUInt::isAllOnesValue() const { - unsigned TypeBits = getType()->getPrimitiveSize()*8; - uint64_t Val = ~0ULL; // All ones - Val >>= 64-TypeBits; // Shift out inappropriate bits - return getValue() == Val; -} - - //===----------------------------------------------------------------------===// // ConstantXXX Classes //===----------------------------------------------------------------------===// @@ -212,26 +204,21 @@ Val.Unsigned = V; } -ConstantBool::ConstantBool(bool V) - : ConstantIntegral(Type::BoolTy, ConstantBoolVal, V) { +ConstantIntegral::ConstantIntegral(const Type *Ty, ValueTy VT, int64_t V) + : Constant(Ty, VT, 0, 0) { + Val.Signed = V; } -ConstantInt::ConstantInt(const Type *Ty, ValueTy VT, uint64_t V) - : ConstantIntegral(Ty, VT, V) { +ConstantBool::ConstantBool(bool V) + : ConstantIntegral(Type::BoolTy, ConstantBoolVal, uint64_t(V)) { } -ConstantSInt::ConstantSInt(const Type *Ty, int64_t V) - : ConstantInt(Ty, ConstantSIntVal, V) { - assert(Ty->isInteger() && Ty->isSigned() && - "Illegal type for signed integer constant!"); - assert(isValueValidForType(Ty, V) && "Value too large for type!"); +ConstantInt::ConstantInt(const Type *Ty, uint64_t V) + : ConstantIntegral(Ty, ConstantIntVal, V) { } -ConstantUInt::ConstantUInt(const Type *Ty, uint64_t V) - : ConstantInt(Ty, ConstantUIntVal, V) { - assert(Ty->isInteger() && Ty->isUnsigned() && - "Illegal type for unsigned integer constant!"); - assert(isValueValidForType(Ty, V) && "Value too large for type!"); +ConstantInt::ConstantInt(const Type *Ty, int64_t V) + : ConstantIntegral(Ty, ConstantIntVal, V) { } ConstantFP::ConstantFP(const Type *Ty, double V) @@ -584,23 +571,31 @@ //===----------------------------------------------------------------------===// // isValueValidForType implementations -bool ConstantSInt::isValueValidForType(const Type *Ty, int64_t Val) { +bool ConstantInt::isValueValidForType(const Type *Ty, int64_t Val) { switch (Ty->getTypeID()) { default: return false; // These can't be represented as integers!!! // Signed types... case Type::SByteTyID: return (Val <= INT8_MAX && Val >= INT8_MIN); + case Type::UByteTyID: + return (Val > 0) && (Val <= UINT8_MAX); case Type::ShortTyID: return (Val <= INT16_MAX && Val >= INT16_MIN); + case Type::UShortTyID: + return (Val > 0) && (Val <= UINT16_MAX); case Type::IntTyID: return (Val <= int(INT32_MAX) && Val >= int(INT32_MIN)); + case Type::UIntTyID: + return (Val > 0) && (Val <= UINT32_MAX); case Type::LongTyID: - return true; // This is the largest type... + return true; // always true, has to fit in largest type + case Type::ULongTyID: + return (Val >= 0); } } -bool ConstantUInt::isValueValidForType(const Type *Ty, uint64_t Val) { +bool ConstantInt::isValueValidForType(const Type *Ty, uint64_t Val) { switch (Ty->getTypeID()) { default: return false; // These can't be represented as integers!!! @@ -608,12 +603,20 @@ // Unsigned types... case Type::UByteTyID: return (Val <= UINT8_MAX); + case Type::SByteTyID: + return (Val <= INT8_MAX); case Type::UShortTyID: return (Val <= UINT16_MAX); + case Type::ShortTyID: + return (Val <= INT16_MAX); case Type::UIntTyID: return (Val <= UINT32_MAX); + case Type::IntTyID: + return (Val <= INT32_MAX); case Type::ULongTyID: return true; // This is the largest type... + case Type::LongTyID: + return (Val <= INT64_MAX); } } @@ -729,8 +732,9 @@ ConstantClass *getOrCreate(const TypeClass *Ty, const ValType &V) { MapKey Lookup(Ty, V); typename MapTy::iterator I = Map.lower_bound(Lookup); + // Is it in the map? if (I != Map.end() && I->first == Lookup) - return static_cast(I->second); // Is it in the map? + return static_cast(I->second); // If no preexisting value, create one now... ConstantClass *Result = @@ -887,23 +891,40 @@ return F = new ConstantBool(false); } -//---- ConstantUInt::get() and ConstantSInt::get() implementations... +//---- ConstantInt::get() implementations... // -static ManagedStatic > SIntConstants; -static ManagedStatic > UIntConstants; +static ManagedStatic > IntConstants; + +ConstantInt *ConstantInt::get(const Type *Ty, int64_t V) { + return IntConstants->getOrCreate(Ty, uint64_t(V)); +} + +ConstantInt *ConstantInt::get(const Type *Ty, int32_t V) { + return IntConstants->getOrCreate(Ty, uint64_t(V)); +} + +ConstantInt *ConstantInt::get(const Type *Ty, int16_t V) { + return IntConstants->getOrCreate(Ty, uint64_t(V)); +} + +ConstantInt *ConstantInt::get(const Type *Ty, int8_t V) { + return IntConstants->getOrCreate(Ty, uint64_t(V)); +} + +ConstantInt *ConstantInt::get(const Type *Ty, uint64_t V) { + return IntConstants->getOrCreate(Ty, uint64_t(V)); +} -ConstantSInt *ConstantSInt::get(const Type *Ty, int64_t V) { - return SIntConstants->getOrCreate(Ty, V); +ConstantInt *ConstantInt::get(const Type *Ty, uint32_t V) { + return IntConstants->getOrCreate(Ty, uint64_t(V)); } -ConstantUInt *ConstantUInt::get(const Type *Ty, uint64_t V) { - return UIntConstants->getOrCreate(Ty, V); +ConstantInt *ConstantInt::get(const Type *Ty, uint16_t V) { + return IntConstants->getOrCreate(Ty, uint64_t(V)); } -ConstantInt *ConstantInt::get(const Type *Ty, unsigned char V) { - assert(V <= 127 && "Can only be used with very small positive constants!"); - if (Ty->isSigned()) return ConstantSInt::get(Ty, V); - return ConstantUInt::get(Ty, V); +ConstantInt *ConstantInt::get(const Type *Ty, uint8_t V) { + return IntConstants->getOrCreate(Ty, uint64_t(V)); } //---- ConstantFP::get() implementation... @@ -1048,11 +1069,11 @@ Constant *ConstantArray::get(const std::string &Str, bool AddNull) { std::vector ElementVals; for (unsigned i = 0; i < Str.length(); ++i) - ElementVals.push_back(ConstantSInt::get(Type::SByteTy, Str[i])); + ElementVals.push_back(ConstantInt::get(Type::SByteTy, Str[i])); // Add a null terminator to the string... if (AddNull) { - ElementVals.push_back(ConstantSInt::get(Type::SByteTy, 0)); + ElementVals.push_back(ConstantInt::get(Type::SByteTy, 0)); } ArrayType *ATy = ArrayType::get(Type::SByteTy, ElementVals.size()); @@ -1416,7 +1437,7 @@ Constant *ConstantExpr::getPtrPtrFromArrayPtr(Constant *C) { // pointer from array is implemented as: getelementptr arr ptr, 0, 0 - static std::vector Indices(2, ConstantUInt::get(Type::UIntTy, 0)); + static std::vector Indices(2, ConstantInt::get(Type::UIntTy, 0)); return ConstantExpr::getGetElementPtr(C, Indices); } Index: llvm/lib/VMCore/Instructions.cpp diff -u llvm/lib/VMCore/Instructions.cpp:1.42 llvm/lib/VMCore/Instructions.cpp:1.42.2.1 --- llvm/lib/VMCore/Instructions.cpp:1.42 Thu Oct 5 01:24:58 2006 +++ llvm/lib/VMCore/Instructions.cpp Wed Oct 18 22:57:56 2006 @@ -513,7 +513,7 @@ static Value *getAISize(Value *Amt) { if (!Amt) - Amt = ConstantUInt::get(Type::UIntTy, 1); + Amt = ConstantInt::get(Type::UIntTy, 1); else { assert(!isa(Amt) && "Passed basic block into allocation size parameter! Ue other ctor"); @@ -546,8 +546,8 @@ } bool AllocationInst::isArrayAllocation() const { - if (ConstantUInt *CUI = dyn_cast(getOperand(0))) - return CUI->getValue() != 1; + if (ConstantInt *CUI = dyn_cast(getOperand(0))) + return CUI->getZExtValue() != 1; return true; } @@ -849,7 +849,7 @@ Instruction *InsertBef) : Instruction(cast(Val->getType())->getElementType(), ExtractElement, Ops, 2, Name, InsertBef) { - Constant *Index = ConstantUInt::get(Type::UIntTy, IndexV); + Constant *Index = ConstantInt::get(Type::UIntTy, IndexV); assert(isValidOperands(Val, Index) && "Invalid extractelement instruction operands!"); Ops[0].init(Val, this); @@ -874,7 +874,7 @@ BasicBlock *InsertAE) : Instruction(cast(Val->getType())->getElementType(), ExtractElement, Ops, 2, Name, InsertAE) { - Constant *Index = ConstantUInt::get(Type::UIntTy, IndexV); + Constant *Index = ConstantInt::get(Type::UIntTy, IndexV); assert(isValidOperands(Val, Index) && "Invalid extractelement instruction operands!"); @@ -915,7 +915,7 @@ const std::string &Name, Instruction *InsertBef) : Instruction(Vec->getType(), InsertElement, Ops, 3, Name, InsertBef) { - Constant *Index = ConstantUInt::get(Type::UIntTy, IndexV); + Constant *Index = ConstantInt::get(Type::UIntTy, IndexV); assert(isValidOperands(Vec, Elt, Index) && "Invalid insertelement instruction operands!"); Ops[0].init(Vec, this); @@ -940,7 +940,7 @@ const std::string &Name, BasicBlock *InsertAE) : Instruction(Vec->getType(), InsertElement, Ops, 3, Name, InsertAE) { - Constant *Index = ConstantUInt::get(Type::UIntTy, IndexV); + Constant *Index = ConstantInt::get(Type::UIntTy, IndexV); assert(isValidOperands(Vec, Elt, Index) && "Invalid insertelement instruction operands!"); Index: llvm/lib/VMCore/Type.cpp diff -u llvm/lib/VMCore/Type.cpp:1.147 llvm/lib/VMCore/Type.cpp:1.147.2.1 --- llvm/lib/VMCore/Type.cpp:1.147 Sun Oct 15 18:21:12 2006 +++ llvm/lib/VMCore/Type.cpp Wed Oct 18 22:57:56 2006 @@ -366,8 +366,8 @@ bool StructType::indexValid(const Value *V) const { // Structure indexes require unsigned integer constants. if (V->getType() == Type::UIntTy) - if (const ConstantUInt *CU = dyn_cast(V)) - return CU->getValue() < ContainedTys.size(); + if (const ConstantInt *CU = dyn_cast(V)) + return CU->getZExtValue() < ContainedTys.size(); return false; } @@ -376,7 +376,7 @@ // const Type *StructType::getTypeAtIndex(const Value *V) const { assert(indexValid(V) && "Invalid structure index!"); - unsigned Idx = (unsigned)cast(V)->getValue(); + unsigned Idx = (unsigned)cast(V)->getZExtValue(); return ContainedTys[Idx]; } Index: llvm/lib/VMCore/Verifier.cpp diff -u llvm/lib/VMCore/Verifier.cpp:1.164 llvm/lib/VMCore/Verifier.cpp:1.164.2.1 --- llvm/lib/VMCore/Verifier.cpp:1.164 Sun Sep 17 15:25:45 2006 +++ llvm/lib/VMCore/Verifier.cpp Wed Oct 18 22:57:56 2006 @@ -586,7 +586,7 @@ // Check to see if Mask is valid. if (const ConstantPacked *MV = dyn_cast(SV.getOperand(2))) { for (unsigned i = 0, e = MV->getNumOperands(); i != e; ++i) { - Assert1(isa(MV->getOperand(i)) || + Assert1(isa(MV->getOperand(i)) || isa(MV->getOperand(i)), "Invalid shufflevector shuffle mask!", &SV); } From reid at x10sys.com Wed Oct 18 22:59:00 2006 From: reid at x10sys.com (Reid Spencer) Date: Wed, 18 Oct 2006 22:59:00 -0500 Subject: [llvm-commits] [SignlessTypes] CVS: llvm/lib/Analysis/DataStructure/Local.cpp Message-ID: <200610190359.k9J3x0XU003858@zion.cs.uiuc.edu> Changes in directory llvm/lib/Analysis/DataStructure: Local.cpp updated: 1.154 -> 1.154.2.1 --- Log message: For PR950: http://llvm.org/PR950 : This commit (on SignlessTypes branch) provides the first Iteration for moving LLVM away from Signed types. This patch removes the ConstantSInt and ConstantUInt classes from Type.h and makes all necessary changes in LLVM to compensate. --- Diffs of the changes: (+1 -1) Local.cpp | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/lib/Analysis/DataStructure/Local.cpp diff -u llvm/lib/Analysis/DataStructure/Local.cpp:1.154 llvm/lib/Analysis/DataStructure/Local.cpp:1.154.2.1 --- llvm/lib/Analysis/DataStructure/Local.cpp:1.154 Fri Oct 13 12:38:22 2006 +++ llvm/lib/Analysis/DataStructure/Local.cpp Wed Oct 18 22:57:55 2006 @@ -407,7 +407,7 @@ I != E; ++I) if (const StructType *STy = dyn_cast(*I)) { unsigned FieldNo = - (unsigned)cast(I.getOperand())->getValue(); + (unsigned)cast(I.getOperand())->getZExtValue(); Offset += (unsigned)TD.getStructLayout(STy)->MemberOffsets[FieldNo]; } else if (const PointerType *PTy = dyn_cast(*I)) { if (!isa(I.getOperand()) || From reid at x10sys.com Wed Oct 18 22:58:58 2006 From: reid at x10sys.com (Reid Spencer) Date: Wed, 18 Oct 2006 22:58:58 -0500 Subject: [llvm-commits] [SignlessTypes] CVS: llvm/examples/Fibonacci/fibonacci.cpp Message-ID: <200610190358.k9J3ww1V003843@zion.cs.uiuc.edu> Changes in directory llvm/examples/Fibonacci: fibonacci.cpp updated: 1.11 -> 1.11.6.1 --- Log message: For PR950: http://llvm.org/PR950 : This commit (on SignlessTypes branch) provides the first Iteration for moving LLVM away from Signed types. This patch removes the ConstantSInt and ConstantUInt classes from Type.h and makes all necessary changes in LLVM to compensate. --- Diffs of the changes: (+2 -2) fibonacci.cpp | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/examples/Fibonacci/fibonacci.cpp diff -u llvm/examples/Fibonacci/fibonacci.cpp:1.11 llvm/examples/Fibonacci/fibonacci.cpp:1.11.6.1 --- llvm/examples/Fibonacci/fibonacci.cpp:1.11 Thu Mar 23 21:11:31 2006 +++ llvm/examples/Fibonacci/fibonacci.cpp Wed Oct 18 22:57:55 2006 @@ -45,8 +45,8 @@ BasicBlock *BB = new BasicBlock("EntryBlock", FibF); // Get pointers to the constants. - Value *One = ConstantSInt::get(Type::IntTy, 1); - Value *Two = ConstantSInt::get(Type::IntTy, 2); + Value *One = ConstantInt::get(Type::IntTy, 1); + Value *Two = ConstantInt::get(Type::IntTy, 2); // Get pointer to the integer argument of the add1 function... Argument *ArgX = FibF->arg_begin(); // Get the arg. From reid at x10sys.com Wed Oct 18 22:58:56 2006 From: reid at x10sys.com (Reid Spencer) Date: Wed, 18 Oct 2006 22:58:56 -0500 Subject: [llvm-commits] [SignlessTypes] CVS: llvm/lib/ExecutionEngine/Interpreter/Execution.cpp Message-ID: <200610190358.k9J3wuXi003765@zion.cs.uiuc.edu> Changes in directory llvm/lib/ExecutionEngine/Interpreter: Execution.cpp updated: 1.139 -> 1.139.6.1 --- Log message: For PR950: http://llvm.org/PR950 : This commit (on SignlessTypes branch) provides the first Iteration for moving LLVM away from Signed types. This patch removes the ConstantSInt and ConstantUInt classes from Type.h and makes all necessary changes in LLVM to compensate. --- Diffs of the changes: (+2 -2) Execution.cpp | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/lib/ExecutionEngine/Interpreter/Execution.cpp diff -u llvm/lib/ExecutionEngine/Interpreter/Execution.cpp:1.139 llvm/lib/ExecutionEngine/Interpreter/Execution.cpp:1.139.6.1 --- llvm/lib/ExecutionEngine/Interpreter/Execution.cpp:1.139 Mon Feb 6 23:29:44 2006 +++ llvm/lib/ExecutionEngine/Interpreter/Execution.cpp Wed Oct 18 22:57:56 2006 @@ -735,8 +735,8 @@ if (const StructType *STy = dyn_cast(*I)) { const StructLayout *SLO = TD.getStructLayout(STy); - const ConstantUInt *CPU = cast(I.getOperand()); - unsigned Index = unsigned(CPU->getValue()); + const ConstantInt *CPU = cast(I.getOperand()); + unsigned Index = unsigned(CPU->getZExtValue()); Total += (PointerTy)SLO->MemberOffsets[Index]; } else { From reid at x10sys.com Wed Oct 18 22:58:57 2006 From: reid at x10sys.com (Reid Spencer) Date: Wed, 18 Oct 2006 22:58:57 -0500 Subject: [llvm-commits] [SignlessTypes] CVS: llvm/lib/ExecutionEngine/JIT/JIT.cpp Message-ID: <200610190358.k9J3wvLQ003802@zion.cs.uiuc.edu> Changes in directory llvm/lib/ExecutionEngine/JIT: JIT.cpp updated: 1.80 -> 1.80.2.1 --- Log message: For PR950: http://llvm.org/PR950 : This commit (on SignlessTypes branch) provides the first Iteration for moving LLVM away from Signed types. This patch removes the ConstantSInt and ConstantUInt classes from Type.h and makes all necessary changes in LLVM to compensate. --- Diffs of the changes: (+12 -12) JIT.cpp | 24 ++++++++++++------------ 1 files changed, 12 insertions(+), 12 deletions(-) Index: llvm/lib/ExecutionEngine/JIT/JIT.cpp diff -u llvm/lib/ExecutionEngine/JIT/JIT.cpp:1.80 llvm/lib/ExecutionEngine/JIT/JIT.cpp:1.80.2.1 --- llvm/lib/ExecutionEngine/JIT/JIT.cpp:1.80 Sun Sep 3 23:14:57 2006 +++ llvm/lib/ExecutionEngine/JIT/JIT.cpp Wed Oct 18 22:57:56 2006 @@ -196,22 +196,22 @@ switch (ArgTy->getTypeID()) { default: assert(0 && "Unknown argument type for function call!"); case Type::BoolTyID: C = ConstantBool::get(AV.BoolVal); break; - case Type::SByteTyID: C = ConstantSInt::get(ArgTy, AV.SByteVal); break; - case Type::UByteTyID: C = ConstantUInt::get(ArgTy, AV.UByteVal); break; - case Type::ShortTyID: C = ConstantSInt::get(ArgTy, AV.ShortVal); break; - case Type::UShortTyID: C = ConstantUInt::get(ArgTy, AV.UShortVal); break; - case Type::IntTyID: C = ConstantSInt::get(ArgTy, AV.IntVal); break; - case Type::UIntTyID: C = ConstantUInt::get(ArgTy, AV.UIntVal); break; - case Type::LongTyID: C = ConstantSInt::get(ArgTy, AV.LongVal); break; - case Type::ULongTyID: C = ConstantUInt::get(ArgTy, AV.ULongVal); break; - case Type::FloatTyID: C = ConstantFP ::get(ArgTy, AV.FloatVal); break; - case Type::DoubleTyID: C = ConstantFP ::get(ArgTy, AV.DoubleVal); break; + case Type::SByteTyID: C = ConstantInt::get(ArgTy, AV.SByteVal); break; + case Type::UByteTyID: C = ConstantInt::get(ArgTy, AV.UByteVal); break; + case Type::ShortTyID: C = ConstantInt::get(ArgTy, AV.ShortVal); break; + case Type::UShortTyID: C = ConstantInt::get(ArgTy, AV.UShortVal); break; + case Type::IntTyID: C = ConstantInt::get(ArgTy, AV.IntVal); break; + case Type::UIntTyID: C = ConstantInt::get(ArgTy, AV.UIntVal); break; + case Type::LongTyID: C = ConstantInt::get(ArgTy, AV.LongVal); break; + case Type::ULongTyID: C = ConstantInt::get(ArgTy, AV.ULongVal); break; + case Type::FloatTyID: C = ConstantFP ::get(ArgTy, AV.FloatVal); break; + case Type::DoubleTyID: C = ConstantFP ::get(ArgTy, AV.DoubleVal); break; case Type::PointerTyID: void *ArgPtr = GVTOP(AV); if (sizeof(void*) == 4) { - C = ConstantSInt::get(Type::IntTy, (int)(intptr_t)ArgPtr); + C = ConstantInt::get(Type::IntTy, (int)(intptr_t)ArgPtr); } else { - C = ConstantSInt::get(Type::LongTy, (intptr_t)ArgPtr); + C = ConstantInt::get(Type::LongTy, (intptr_t)ArgPtr); } C = ConstantExpr::getCast(C, ArgTy); // Cast the integer to pointer break; From reid at x10sys.com Wed Oct 18 22:58:57 2006 From: reid at x10sys.com (Reid Spencer) Date: Wed, 18 Oct 2006 22:58:57 -0500 Subject: [llvm-commits] [SignlessTypes] CVS: llvm/lib/Target/Alpha/AlphaISelDAGToDAG.cpp Message-ID: <200610190358.k9J3wvco003816@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/Alpha: AlphaISelDAGToDAG.cpp updated: 1.58 -> 1.58.2.1 --- Log message: For PR950: http://llvm.org/PR950 : This commit (on SignlessTypes branch) provides the first Iteration for moving LLVM away from Signed types. This patch removes the ConstantSInt and ConstantUInt classes from Type.h and makes all necessary changes in LLVM to compensate. --- Diffs of the changes: (+1 -2) AlphaISelDAGToDAG.cpp | 3 +-- 1 files changed, 1 insertion(+), 2 deletions(-) Index: llvm/lib/Target/Alpha/AlphaISelDAGToDAG.cpp diff -u llvm/lib/Target/Alpha/AlphaISelDAGToDAG.cpp:1.58 llvm/lib/Target/Alpha/AlphaISelDAGToDAG.cpp:1.58.2.1 --- llvm/lib/Target/Alpha/AlphaISelDAGToDAG.cpp:1.58 Wed Oct 11 11:24:51 2006 +++ llvm/lib/Target/Alpha/AlphaISelDAGToDAG.cpp Wed Oct 18 22:57:56 2006 @@ -317,8 +317,7 @@ break; //(zext (LDAH (LDA))) //Else use the constant pool MachineConstantPool *CP = BB->getParent()->getConstantPool(); - ConstantUInt *C = - ConstantUInt::get(Type::getPrimitiveType(Type::ULongTyID) , uval); + ConstantInt *C = ConstantInt::get(Type::ULongTy, uval); SDOperand CPI = CurDAG->getTargetConstantPool(C, MVT::i64); SDNode *Tmp = CurDAG->getTargetNode(Alpha::LDAHr, MVT::i64, CPI, getGlobalBaseReg()); From reid at x10sys.com Wed Oct 18 22:58:57 2006 From: reid at x10sys.com (Reid Spencer) Date: Wed, 18 Oct 2006 22:58:57 -0500 Subject: [llvm-commits] [SignlessTypes] CVS: llvm/lib/AsmParser/Lexer.cpp.cvs llvmAsmParser.cpp.cvs llvmAsmParser.h.cvs llvmAsmParser.y llvmAsmParser.y.cvs Message-ID: <200610190358.k9J3wvYZ003834@zion.cs.uiuc.edu> Changes in directory llvm/lib/AsmParser: Lexer.cpp.cvs updated: 1.10 -> 1.10.2.1 llvmAsmParser.cpp.cvs updated: 1.18 -> 1.18.2.1 llvmAsmParser.h.cvs updated: 1.13 -> 1.13.2.1 llvmAsmParser.y updated: 1.266 -> 1.266.2.1 llvmAsmParser.y.cvs updated: 1.18 -> 1.18.2.1 --- Log message: For PR950: http://llvm.org/PR950 : This commit (on SignlessTypes branch) provides the first Iteration for moving LLVM away from Signed types. This patch removes the ConstantSInt and ConstantUInt classes from Type.h and makes all necessary changes in LLVM to compensate. --- Diffs of the changes: (+4034 -3040) Lexer.cpp.cvs | 271 +- llvmAsmParser.cpp.cvs | 6355 ++++++++++++++++++++++++++++---------------------- llvmAsmParser.h.cvs | 370 ++ llvmAsmParser.y | 28 llvmAsmParser.y.cvs | 28 5 files changed, 4034 insertions(+), 3018 deletions(-) Index: llvm/lib/AsmParser/Lexer.cpp.cvs diff -u llvm/lib/AsmParser/Lexer.cpp.cvs:1.10 llvm/lib/AsmParser/Lexer.cpp.cvs:1.10.2.1 --- llvm/lib/AsmParser/Lexer.cpp.cvs:1.10 Tue Oct 17 21:21:48 2006 +++ llvm/lib/AsmParser/Lexer.cpp.cvs Wed Oct 18 22:57:55 2006 @@ -17,10 +17,10 @@ #define yylineno llvmAsmlineno #line 20 "Lexer.cpp" -/* A lexical scanner generated by flex */ +/* A lexical scanner generated by flex*/ /* Scanner skeleton version: - * $Header: /var/cvs/llvm/llvm/lib/AsmParser/Lexer.cpp.cvs,v 1.10 2006/10/18 02:21:48 resistor Exp $ + * $Header: /var/cvs/llvm/llvm/lib/AsmParser/Lexer.cpp.cvs,v 1.10.2.1 2006/10/19 03:57:55 reid Exp $ */ #define FLEX_SCANNER @@ -28,6 +28,7 @@ #define YY_FLEX_MINOR_VERSION 5 #include +#include /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */ @@ -41,7 +42,6 @@ #ifdef __cplusplus #include -#include /* Use prototypes in function declarations. */ #define YY_USE_PROTOS @@ -153,6 +153,15 @@ #define unput(c) yyunput( c, yytext_ptr ) +/* Some routines like yy_flex_realloc() are emitted as static but are + not called by all lexers. This generates warnings in some compilers, + notably GCC. Arrange to suppress these. */ +#ifdef __GNUC__ +#define YY_MAY_BE_UNUSED __attribute__((unused)) +#else +#define YY_MAY_BE_UNUSED +#endif + /* The following is because we cannot portably get our hands on size_t * (without autoconf's help, which isn't available because we want * flex-generated scanners to compile on their own). @@ -259,7 +268,7 @@ YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len )); static void *yy_flex_alloc YY_PROTO(( yy_size_t )); -static inline void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )); +static inline void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )) YY_MAY_BE_UNUSED; static void yy_flex_free YY_PROTO(( void * )); #define yy_new_buffer yy_create_buffer @@ -829,7 +838,7 @@ #define YY_MORE_ADJ 0 #define YY_RESTORE_YY_MORE_OFFSET char *yytext; -#line 1 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 1 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" #define INITIAL 0 /*===-- Lexer.l - Scanner for llvm assembly files --------------*- C++ -*--===// // @@ -844,7 +853,7 @@ // //===----------------------------------------------------------------------===*/ #define YY_NEVER_INTERACTIVE 1 -#line 28 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 28 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" #include "ParserInternals.h" #include "llvm/Module.h" #include @@ -970,7 +979,7 @@ /* HexIntConstant - Hexadecimal constant generated by the CFE to avoid forcing * it to deal with 64 bit numbers. */ -#line 974 "Lexer.cpp" +#line 983 "Lexer.cpp" /* Macros after this point can all be overridden by user definitions in * section 1. @@ -1118,13 +1127,13 @@ YY_DECL { register yy_state_type yy_current_state; - register char *yy_cp, *yy_bp; + register char *yy_cp = NULL, *yy_bp = NULL; register int yy_act; -#line 179 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 179 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" -#line 1128 "Lexer.cpp" +#line 1137 "Lexer.cpp" if ( yy_init ) { @@ -1217,507 +1226,507 @@ { /* beginning of action switch */ case 1: YY_RULE_SETUP -#line 181 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 181 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { /* Ignore comments for now */ } YY_BREAK case 2: YY_RULE_SETUP -#line 183 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 183 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { return BEGINTOK; } YY_BREAK case 3: YY_RULE_SETUP -#line 184 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 184 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { return ENDTOK; } YY_BREAK case 4: YY_RULE_SETUP -#line 185 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 185 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { return TRUETOK; } YY_BREAK case 5: YY_RULE_SETUP -#line 186 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 186 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { return FALSETOK; } YY_BREAK case 6: YY_RULE_SETUP -#line 187 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 187 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { return DECLARE; } YY_BREAK case 7: YY_RULE_SETUP -#line 188 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 188 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { return GLOBAL; } YY_BREAK case 8: YY_RULE_SETUP -#line 189 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 189 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { return CONSTANT; } YY_BREAK case 9: YY_RULE_SETUP -#line 190 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 190 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { return INTERNAL; } YY_BREAK case 10: YY_RULE_SETUP -#line 191 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 191 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { return LINKONCE; } YY_BREAK case 11: YY_RULE_SETUP -#line 192 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 192 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { return WEAK; } YY_BREAK case 12: YY_RULE_SETUP -#line 193 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 193 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { return APPENDING; } YY_BREAK case 13: YY_RULE_SETUP -#line 194 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 194 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { return DLLIMPORT; } YY_BREAK case 14: YY_RULE_SETUP -#line 195 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 195 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { return DLLEXPORT; } YY_BREAK case 15: YY_RULE_SETUP -#line 196 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 196 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { return EXTERN_WEAK; } YY_BREAK case 16: YY_RULE_SETUP -#line 197 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 197 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { return EXTERNAL; } /* Deprecated, turn into external */ YY_BREAK case 17: YY_RULE_SETUP -#line 198 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 198 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { return EXTERNAL; } YY_BREAK case 18: YY_RULE_SETUP -#line 199 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 199 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { return IMPLEMENTATION; } YY_BREAK case 19: YY_RULE_SETUP -#line 200 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 200 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { return ZEROINITIALIZER; } YY_BREAK case 20: YY_RULE_SETUP -#line 201 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 201 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { return DOTDOTDOT; } YY_BREAK case 21: YY_RULE_SETUP -#line 202 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 202 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { return UNDEF; } YY_BREAK case 22: YY_RULE_SETUP -#line 203 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 203 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { return NULL_TOK; } YY_BREAK case 23: YY_RULE_SETUP -#line 204 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 204 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { return TO; } YY_BREAK case 24: YY_RULE_SETUP -#line 205 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 205 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { RET_TOK(TermOpVal, Unwind, UNWIND); } YY_BREAK case 25: YY_RULE_SETUP -#line 206 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 206 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { return NOT; } /* Deprecated, turned into XOR */ YY_BREAK case 26: YY_RULE_SETUP -#line 207 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 207 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { return TAIL; } YY_BREAK case 27: YY_RULE_SETUP -#line 208 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 208 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { return TARGET; } YY_BREAK case 28: YY_RULE_SETUP -#line 209 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 209 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { return TRIPLE; } YY_BREAK case 29: YY_RULE_SETUP -#line 210 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 210 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { return DEPLIBS; } YY_BREAK case 30: YY_RULE_SETUP -#line 211 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 211 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { return ENDIAN; } YY_BREAK case 31: YY_RULE_SETUP -#line 212 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 212 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { return POINTERSIZE; } YY_BREAK case 32: YY_RULE_SETUP -#line 213 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 213 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { return DATA; } YY_BREAK case 33: YY_RULE_SETUP -#line 214 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 214 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { return LITTLE; } YY_BREAK case 34: YY_RULE_SETUP -#line 215 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 215 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { return BIG; } YY_BREAK case 35: YY_RULE_SETUP -#line 216 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 216 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { return VOLATILE; } YY_BREAK case 36: YY_RULE_SETUP -#line 217 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 217 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { return ALIGN; } YY_BREAK case 37: YY_RULE_SETUP -#line 218 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 218 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { return SECTION; } YY_BREAK case 38: YY_RULE_SETUP -#line 219 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 219 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { return MODULE; } YY_BREAK case 39: YY_RULE_SETUP -#line 220 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 220 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { return ASM_TOK; } YY_BREAK case 40: YY_RULE_SETUP -#line 221 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 221 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { return SIDEEFFECT; } YY_BREAK case 41: YY_RULE_SETUP -#line 223 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 223 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { return CC_TOK; } YY_BREAK case 42: YY_RULE_SETUP -#line 224 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 224 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { return CCC_TOK; } YY_BREAK case 43: YY_RULE_SETUP -#line 225 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 225 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { return CSRETCC_TOK; } YY_BREAK case 44: YY_RULE_SETUP -#line 226 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 226 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { return FASTCC_TOK; } YY_BREAK case 45: YY_RULE_SETUP -#line 227 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 227 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { return COLDCC_TOK; } YY_BREAK case 46: YY_RULE_SETUP -#line 228 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 228 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { return X86_STDCALLCC_TOK; } YY_BREAK case 47: YY_RULE_SETUP -#line 229 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 229 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { return X86_FASTCALLCC_TOK; } YY_BREAK case 48: YY_RULE_SETUP -#line 231 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 231 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { llvmAsmlval.PrimType = Type::VoidTy ; return VOID; } YY_BREAK case 49: YY_RULE_SETUP -#line 232 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 232 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { llvmAsmlval.PrimType = Type::BoolTy ; return BOOL; } YY_BREAK case 50: YY_RULE_SETUP -#line 233 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 233 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { llvmAsmlval.PrimType = Type::SByteTy ; return SBYTE; } YY_BREAK case 51: YY_RULE_SETUP -#line 234 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 234 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { llvmAsmlval.PrimType = Type::UByteTy ; return UBYTE; } YY_BREAK case 52: YY_RULE_SETUP -#line 235 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 235 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { llvmAsmlval.PrimType = Type::ShortTy ; return SHORT; } YY_BREAK case 53: YY_RULE_SETUP -#line 236 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 236 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { llvmAsmlval.PrimType = Type::UShortTy; return USHORT; } YY_BREAK case 54: YY_RULE_SETUP -#line 237 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 237 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { llvmAsmlval.PrimType = Type::IntTy ; return INT; } YY_BREAK case 55: YY_RULE_SETUP -#line 238 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 238 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { llvmAsmlval.PrimType = Type::UIntTy ; return UINT; } YY_BREAK case 56: YY_RULE_SETUP -#line 239 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 239 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { llvmAsmlval.PrimType = Type::LongTy ; return LONG; } YY_BREAK case 57: YY_RULE_SETUP -#line 240 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 240 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { llvmAsmlval.PrimType = Type::ULongTy ; return ULONG; } YY_BREAK case 58: YY_RULE_SETUP -#line 241 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 241 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { llvmAsmlval.PrimType = Type::FloatTy ; return FLOAT; } YY_BREAK case 59: YY_RULE_SETUP -#line 242 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 242 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { llvmAsmlval.PrimType = Type::DoubleTy; return DOUBLE; } YY_BREAK case 60: YY_RULE_SETUP -#line 243 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 243 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { llvmAsmlval.PrimType = Type::LabelTy ; return LABEL; } YY_BREAK case 61: YY_RULE_SETUP -#line 244 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 244 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { return TYPE; } YY_BREAK case 62: YY_RULE_SETUP -#line 245 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 245 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { return OPAQUE; } YY_BREAK case 63: YY_RULE_SETUP -#line 247 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 247 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { RET_TOK(BinaryOpVal, Add, ADD); } YY_BREAK case 64: YY_RULE_SETUP -#line 248 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 248 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { RET_TOK(BinaryOpVal, Sub, SUB); } YY_BREAK case 65: YY_RULE_SETUP -#line 249 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 249 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { RET_TOK(BinaryOpVal, Mul, MUL); } YY_BREAK case 66: YY_RULE_SETUP -#line 250 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 250 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { RET_TOK(BinaryOpVal, Div, DIV); } YY_BREAK case 67: YY_RULE_SETUP -#line 251 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 251 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { RET_TOK(BinaryOpVal, Rem, REM); } YY_BREAK case 68: YY_RULE_SETUP -#line 252 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 252 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { RET_TOK(BinaryOpVal, And, AND); } YY_BREAK case 69: YY_RULE_SETUP -#line 253 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 253 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { RET_TOK(BinaryOpVal, Or , OR ); } YY_BREAK case 70: YY_RULE_SETUP -#line 254 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 254 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { RET_TOK(BinaryOpVal, Xor, XOR); } YY_BREAK case 71: YY_RULE_SETUP -#line 255 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 255 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { RET_TOK(BinaryOpVal, SetNE, SETNE); } YY_BREAK case 72: YY_RULE_SETUP -#line 256 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 256 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { RET_TOK(BinaryOpVal, SetEQ, SETEQ); } YY_BREAK case 73: YY_RULE_SETUP -#line 257 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 257 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { RET_TOK(BinaryOpVal, SetLT, SETLT); } YY_BREAK case 74: YY_RULE_SETUP -#line 258 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 258 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { RET_TOK(BinaryOpVal, SetGT, SETGT); } YY_BREAK case 75: YY_RULE_SETUP -#line 259 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 259 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { RET_TOK(BinaryOpVal, SetLE, SETLE); } YY_BREAK case 76: YY_RULE_SETUP -#line 260 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 260 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { RET_TOK(BinaryOpVal, SetGE, SETGE); } YY_BREAK case 77: YY_RULE_SETUP -#line 262 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 262 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { RET_TOK(OtherOpVal, PHI, PHI_TOK); } YY_BREAK case 78: YY_RULE_SETUP -#line 263 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 263 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { RET_TOK(OtherOpVal, Call, CALL); } YY_BREAK case 79: YY_RULE_SETUP -#line 264 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 264 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { RET_TOK(OtherOpVal, Cast, CAST); } YY_BREAK case 80: YY_RULE_SETUP -#line 265 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 265 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { RET_TOK(OtherOpVal, Select, SELECT); } YY_BREAK case 81: YY_RULE_SETUP -#line 266 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 266 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { RET_TOK(OtherOpVal, Shl, SHL); } YY_BREAK case 82: YY_RULE_SETUP -#line 267 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 267 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { RET_TOK(OtherOpVal, Shr, SHR); } YY_BREAK case 83: YY_RULE_SETUP -#line 268 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 268 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { return VANEXT_old; } YY_BREAK case 84: YY_RULE_SETUP -#line 269 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 269 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { return VAARG_old; } YY_BREAK case 85: YY_RULE_SETUP -#line 270 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 270 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { RET_TOK(OtherOpVal, VAArg , VAARG); } YY_BREAK case 86: YY_RULE_SETUP -#line 271 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 271 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { RET_TOK(TermOpVal, Ret, RET); } YY_BREAK case 87: YY_RULE_SETUP -#line 272 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 272 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { RET_TOK(TermOpVal, Br, BR); } YY_BREAK case 88: YY_RULE_SETUP -#line 273 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 273 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { RET_TOK(TermOpVal, Switch, SWITCH); } YY_BREAK case 89: YY_RULE_SETUP -#line 274 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 274 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { RET_TOK(TermOpVal, Invoke, INVOKE); } YY_BREAK case 90: YY_RULE_SETUP -#line 275 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 275 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { RET_TOK(TermOpVal, Unwind, UNWIND); } YY_BREAK case 91: YY_RULE_SETUP -#line 276 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 276 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { RET_TOK(TermOpVal, Unreachable, UNREACHABLE); } YY_BREAK case 92: YY_RULE_SETUP -#line 278 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 278 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { RET_TOK(MemOpVal, Malloc, MALLOC); } YY_BREAK case 93: YY_RULE_SETUP -#line 279 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 279 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { RET_TOK(MemOpVal, Alloca, ALLOCA); } YY_BREAK case 94: YY_RULE_SETUP -#line 280 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 280 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { RET_TOK(MemOpVal, Free, FREE); } YY_BREAK case 95: YY_RULE_SETUP -#line 281 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 281 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { RET_TOK(MemOpVal, Load, LOAD); } YY_BREAK case 96: YY_RULE_SETUP -#line 282 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 282 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { RET_TOK(MemOpVal, Store, STORE); } YY_BREAK case 97: YY_RULE_SETUP -#line 283 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 283 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { RET_TOK(MemOpVal, GetElementPtr, GETELEMENTPTR); } YY_BREAK case 98: YY_RULE_SETUP -#line 285 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 285 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { RET_TOK(OtherOpVal, ExtractElement, EXTRACTELEMENT); } YY_BREAK case 99: YY_RULE_SETUP -#line 286 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 286 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { RET_TOK(OtherOpVal, InsertElement, INSERTELEMENT); } YY_BREAK case 100: YY_RULE_SETUP -#line 287 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 287 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { RET_TOK(OtherOpVal, ShuffleVector, SHUFFLEVECTOR); } YY_BREAK case 101: YY_RULE_SETUP -#line 290 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 290 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { UnEscapeLexed(yytext+1); llvmAsmlval.StrVal = strdup(yytext+1); // Skip % @@ -1726,7 +1735,7 @@ YY_BREAK case 102: YY_RULE_SETUP -#line 295 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 295 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { yytext[strlen(yytext)-1] = 0; // nuke colon UnEscapeLexed(yytext); @@ -1736,7 +1745,7 @@ YY_BREAK case 103: YY_RULE_SETUP -#line 301 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 301 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { yytext[strlen(yytext)-2] = 0; // nuke colon, end quote UnEscapeLexed(yytext+1); @@ -1746,7 +1755,7 @@ YY_BREAK case 104: YY_RULE_SETUP -#line 308 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 308 "/proj/llvm/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 @@ -1759,12 +1768,12 @@ YY_BREAK case 105: YY_RULE_SETUP -#line 319 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 319 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { llvmAsmlval.UInt64Val = atoull(yytext); return EUINT64VAL; } YY_BREAK case 106: YY_RULE_SETUP -#line 320 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 320 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { uint64_t Val = atoull(yytext+1); // +1: we have bigger negative range @@ -1776,7 +1785,7 @@ YY_BREAK case 107: YY_RULE_SETUP -#line 328 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 328 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { llvmAsmlval.UInt64Val = HexIntToVal(yytext+3); return yytext[0] == 's' ? ESINT64VAL : EUINT64VAL; @@ -1784,7 +1793,7 @@ YY_BREAK case 108: YY_RULE_SETUP -#line 333 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 333 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { uint64_t Val = atoull(yytext+1); if ((unsigned)Val != Val) @@ -1795,7 +1804,7 @@ YY_BREAK case 109: YY_RULE_SETUP -#line 340 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 340 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { uint64_t Val = atoull(yytext+2); // +1: we have bigger negative range @@ -1807,16 +1816,16 @@ YY_BREAK case 110: YY_RULE_SETUP -#line 349 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 349 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { llvmAsmlval.FPVal = atof(yytext); return FPVAL; } YY_BREAK case 111: YY_RULE_SETUP -#line 350 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 350 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { llvmAsmlval.FPVal = HexToFP(yytext); return FPVAL; } YY_BREAK case YY_STATE_EOF(INITIAL): -#line 352 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 352 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { /* Make sure to free the internal buffers for flex when we are * done reading our input! @@ -1827,20 +1836,20 @@ YY_BREAK case 112: YY_RULE_SETUP -#line 360 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 360 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { /* Ignore whitespace */ } YY_BREAK case 113: YY_RULE_SETUP -#line 361 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 361 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { return yytext[0]; } YY_BREAK case 114: YY_RULE_SETUP -#line 363 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 363 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" YY_FATAL_ERROR( "flex scanner jammed" ); YY_BREAK -#line 1844 "Lexer.cpp" +#line 1853 "Lexer.cpp" case YY_END_OF_BUFFER: { @@ -2216,6 +2225,7 @@ #endif /* ifndef YY_NO_UNPUT */ +#ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput() #else @@ -2289,7 +2299,7 @@ return c; } - +#endif /* YY_NO_INPUT */ #ifdef YY_USE_PROTOS void yyrestart( FILE *input_file ) @@ -2400,11 +2410,6 @@ } -#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 ) @@ -2722,5 +2727,5 @@ return 0; } #endif -#line 363 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l" +#line 363 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" Index: llvm/lib/AsmParser/llvmAsmParser.cpp.cvs diff -u llvm/lib/AsmParser/llvmAsmParser.cpp.cvs:1.18 llvm/lib/AsmParser/llvmAsmParser.cpp.cvs:1.18.2.1 --- llvm/lib/AsmParser/llvmAsmParser.cpp.cvs:1.18 Tue Oct 17 21:21:48 2006 +++ llvm/lib/AsmParser/llvmAsmParser.cpp.cvs Wed Oct 18 22:57:55 2006 @@ -1,124 +1,290 @@ +/* A Bison parser, made by GNU Bison 2.1. */ -/* A Bison parser, made from /Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y - by GNU Bison version 1.28 */ +/* Skeleton parser for Yacc-like parsing with Bison, + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. -#define YYBISON 1 /* Identify Bison output. */ + 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., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, 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. */ + +/* 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 + +/* Bison version. */ +#define YYBISON_VERSION "2.1" + +/* Skeleton name. */ +#define YYSKELETON_NAME "yacc.c" + +/* Pure parsers. */ +#define YYPURE 0 + +/* Using locations. */ +#define YYLSP_NEEDED 0 +/* Substitute the variable and function 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 SECTION 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 DLLIMPORT 299 -#define DLLEXPORT 300 -#define EXTERN_WEAK 301 -#define OPAQUE 302 -#define NOT 303 -#define EXTERNAL 304 -#define TARGET 305 -#define TRIPLE 306 -#define ENDIAN 307 -#define POINTERSIZE 308 -#define LITTLE 309 -#define BIG 310 -#define ALIGN 311 -#define DEPLIBS 312 -#define CALL 313 -#define TAIL 314 -#define ASM_TOK 315 -#define MODULE 316 -#define SIDEEFFECT 317 -#define CC_TOK 318 -#define CCC_TOK 319 -#define CSRETCC_TOK 320 -#define FASTCC_TOK 321 -#define COLDCC_TOK 322 -#define X86_STDCALLCC_TOK 323 -#define X86_FASTCALLCC_TOK 324 -#define DATA 325 -#define RET 326 -#define BR 327 -#define SWITCH 328 -#define INVOKE 329 -#define UNWIND 330 -#define UNREACHABLE 331 -#define ADD 332 -#define SUB 333 -#define MUL 334 -#define DIV 335 -#define REM 336 -#define AND 337 -#define OR 338 -#define XOR 339 -#define SETLE 340 -#define SETGE 341 -#define SETLT 342 -#define SETGT 343 -#define SETEQ 344 -#define SETNE 345 -#define MALLOC 346 -#define ALLOCA 347 -#define FREE 348 -#define LOAD 349 -#define STORE 350 -#define GETELEMENTPTR 351 -#define PHI_TOK 352 -#define CAST 353 -#define SELECT 354 -#define SHL 355 -#define SHR 356 -#define VAARG 357 -#define EXTRACTELEMENT 358 -#define INSERTELEMENT 359 -#define SHUFFLEVECTOR 360 -#define VAARG_old 361 -#define VANEXT_old 362 -#line 14 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" + +/* 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, + SECTION = 289, + VOLATILE = 290, + TO = 291, + DOTDOTDOT = 292, + NULL_TOK = 293, + UNDEF = 294, + CONST = 295, + INTERNAL = 296, + LINKONCE = 297, + WEAK = 298, + APPENDING = 299, + DLLIMPORT = 300, + DLLEXPORT = 301, + EXTERN_WEAK = 302, + OPAQUE = 303, + NOT = 304, + EXTERNAL = 305, + TARGET = 306, + TRIPLE = 307, + ENDIAN = 308, + POINTERSIZE = 309, + LITTLE = 310, + BIG = 311, + ALIGN = 312, + DEPLIBS = 313, + CALL = 314, + TAIL = 315, + ASM_TOK = 316, + MODULE = 317, + SIDEEFFECT = 318, + CC_TOK = 319, + CCC_TOK = 320, + CSRETCC_TOK = 321, + FASTCC_TOK = 322, + COLDCC_TOK = 323, + X86_STDCALLCC_TOK = 324, + X86_FASTCALLCC_TOK = 325, + DATA = 326, + RET = 327, + BR = 328, + SWITCH = 329, + INVOKE = 330, + UNWIND = 331, + UNREACHABLE = 332, + ADD = 333, + SUB = 334, + MUL = 335, + DIV = 336, + REM = 337, + AND = 338, + OR = 339, + XOR = 340, + SETLE = 341, + SETGE = 342, + SETLT = 343, + SETGT = 344, + SETEQ = 345, + SETNE = 346, + MALLOC = 347, + ALLOCA = 348, + FREE = 349, + LOAD = 350, + STORE = 351, + GETELEMENTPTR = 352, + PHI_TOK = 353, + CAST = 354, + SELECT = 355, + SHL = 356, + SHR = 357, + VAARG = 358, + EXTRACTELEMENT = 359, + INSERTELEMENT = 360, + SHUFFLEVECTOR = 361, + VAARG_old = 362, + VANEXT_old = 363 + }; +#endif +/* Tokens. */ +#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 SECTION 289 +#define VOLATILE 290 +#define TO 291 +#define DOTDOTDOT 292 +#define NULL_TOK 293 +#define UNDEF 294 +#define CONST 295 +#define INTERNAL 296 +#define LINKONCE 297 +#define WEAK 298 +#define APPENDING 299 +#define DLLIMPORT 300 +#define DLLEXPORT 301 +#define EXTERN_WEAK 302 +#define OPAQUE 303 +#define NOT 304 +#define EXTERNAL 305 +#define TARGET 306 +#define TRIPLE 307 +#define ENDIAN 308 +#define POINTERSIZE 309 +#define LITTLE 310 +#define BIG 311 +#define ALIGN 312 +#define DEPLIBS 313 +#define CALL 314 +#define TAIL 315 +#define ASM_TOK 316 +#define MODULE 317 +#define SIDEEFFECT 318 +#define CC_TOK 319 +#define CCC_TOK 320 +#define CSRETCC_TOK 321 +#define FASTCC_TOK 322 +#define COLDCC_TOK 323 +#define X86_STDCALLCC_TOK 324 +#define X86_FASTCALLCC_TOK 325 +#define DATA 326 +#define RET 327 +#define BR 328 +#define SWITCH 329 +#define INVOKE 330 +#define UNWIND 331 +#define UNREACHABLE 332 +#define ADD 333 +#define SUB 334 +#define MUL 335 +#define DIV 336 +#define REM 337 +#define AND 338 +#define OR 339 +#define XOR 340 +#define SETLE 341 +#define SETGE 342 +#define SETLT 343 +#define SETGT 344 +#define SETEQ 345 +#define SETNE 346 +#define MALLOC 347 +#define ALLOCA 348 +#define FREE 349 +#define LOAD 350 +#define STORE 351 +#define GETELEMENTPTR 352 +#define PHI_TOK 353 +#define CAST 354 +#define SELECT 355 +#define SHL 356 +#define SHR 357 +#define VAARG 358 +#define EXTRACTELEMENT 359 +#define INSERTELEMENT 360 +#define SHUFFLEVECTOR 361 +#define VAARG_old 362 +#define VANEXT_old 363 + + + + +/* Copy the first part of user declarations. */ +#line 14 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" #include "ParserInternals.h" #include "llvm/CallingConv.h" @@ -415,25 +581,25 @@ // Check to make sure that "Ty" is an integral type, and that our // value will fit into the specified type... case ValID::ConstSIntVal: // Is it a constant pool reference?? - if (!ConstantSInt::isValueValidForType(Ty, D.ConstPool64)) { + if (!ConstantInt::isValueValidForType(Ty, D.ConstPool64)) { GenerateError("Signed integral constant '" + itostr(D.ConstPool64) + "' is invalid for type '" + Ty->getDescription() + "'!"); return 0; } - return ConstantSInt::get(Ty, D.ConstPool64); + return ConstantInt::get(Ty, D.ConstPool64); case ValID::ConstUIntVal: // Is it an unsigned const pool reference? - if (!ConstantUInt::isValueValidForType(Ty, D.UConstPool64)) { - if (!ConstantSInt::isValueValidForType(Ty, D.ConstPool64)) { + if (!ConstantInt::isValueValidForType(Ty, D.UConstPool64)) { + if (!ConstantInt::isValueValidForType(Ty, D.ConstPool64)) { GenerateError("Integral constant '" + utostr(D.UConstPool64) + "' is invalid or out of range!"); return 0; } else { // This is really a signed reference. Transmogrify. - return ConstantSInt::get(Ty, D.ConstPool64); + return ConstantInt::get(Ty, D.ConstPool64); } } else { - return ConstantUInt::get(Ty, D.UConstPool64); + return ConstantInt::get(Ty, D.UConstPool64); } case ValID::ConstFPVal: // Is it a floating point const pool reference? @@ -1078,8 +1244,28 @@ } -#line 974 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -typedef union { + +/* 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 + +/* Enabling the token table. */ +#ifndef YYTOKEN_TABLE +# define YYTOKEN_TABLE 0 +#endif + +#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) +#line 974 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +typedef union YYSTYPE { llvm::Module *ModuleVal; llvm::Function *FunctionVal; std::pair *ArgVal; @@ -1118,1003 +1304,1457 @@ llvm::Instruction::OtherOps OtherOpVal; llvm::Module::Endianness Endianness; } YYSTYPE; -#include +/* Line 196 of yacc.c. */ +#line 1309 "llvmAsmParser.tab.c" +# define yystype YYSTYPE /* obsolescent; will be withdrawn */ +# define YYSTYPE_IS_DECLARED 1 +# define YYSTYPE_IS_TRIVIAL 1 +#endif + + + +/* Copy the second part of user declarations. */ + + +/* Line 219 of yacc.c. */ +#line 1321 "llvmAsmParser.tab.c" + +#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) && (defined (__STDC__) || defined (__cplusplus)) +# include /* INFRINGES ON USER NAME SPACE */ +# define YYSIZE_T size_t +#endif +#if ! defined (YYSIZE_T) +# define YYSIZE_T unsigned int +#endif + +#ifndef YY_ +# if YYENABLE_NLS +# if ENABLE_NLS +# include /* INFRINGES ON USER NAME SPACE */ +# define YY_(msgid) dgettext ("bison-runtime", msgid) +# endif +# endif +# ifndef YY_ +# define YY_(msgid) msgid +# endif +#endif + +#if ! defined (yyoverflow) || YYERROR_VERBOSE + +/* The parser invokes alloca or malloc; define the necessary symbols. */ + +# ifdef YYSTACK_USE_ALLOCA +# if YYSTACK_USE_ALLOCA +# ifdef __GNUC__ +# define YYSTACK_ALLOC __builtin_alloca +# else +# define YYSTACK_ALLOC alloca +# if defined (__STDC__) || defined (__cplusplus) +# include /* INFRINGES ON USER NAME SPACE */ +# define YYINCLUDED_STDLIB_H +# endif +# endif +# endif +# endif + +# ifdef YYSTACK_ALLOC + /* Pacify GCC's `empty if-body' warning. */ +# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) +# ifndef YYSTACK_ALLOC_MAXIMUM + /* The OS might guarantee only one guard page at the bottom of the stack, + and a page size can be as small as 4096 bytes. So we cannot safely + invoke alloca (N) if N exceeds 4096. Use a slightly smaller number + to allow for a few compiler-allocated temporary stack slots. */ +# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2005 */ +# endif +# else +# define YYSTACK_ALLOC YYMALLOC +# define YYSTACK_FREE YYFREE +# ifndef YYSTACK_ALLOC_MAXIMUM +# define YYSTACK_ALLOC_MAXIMUM ((YYSIZE_T) -1) +# endif +# ifdef __cplusplus +extern "C" { +# endif +# ifndef YYMALLOC +# define YYMALLOC malloc +# if (! defined (malloc) && ! defined (YYINCLUDED_STDLIB_H) \ + && (defined (__STDC__) || defined (__cplusplus))) +void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# ifndef YYFREE +# define YYFREE free +# if (! defined (free) && ! defined (YYINCLUDED_STDLIB_H) \ + && (defined (__STDC__) || defined (__cplusplus))) +void free (void *); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# ifdef __cplusplus +} +# endif +# endif +#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */ -#ifndef __cplusplus -#ifndef __STDC__ -#define const -#endif -#endif +#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; + }; -#define YYFINAL 517 -#define YYFLAG -32768 -#define YYNTBASE 123 - -#define YYTRANSLATE(x) ((unsigned)(x) <= 362 ? yytranslate[x] : 197) - -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, 112, - 113, 121, 2, 110, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 117, - 109, 118, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 114, 111, 116, 2, 2, 2, 2, 2, 122, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 115, - 2, 2, 119, 2, 120, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 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, 95, 96, - 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, - 107, 108 -}; +/* The size of the maximum gap between one aligned stack and the next. */ +# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) -#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, 78, - 80, 82, 83, 84, 86, 88, 90, 92, 94, 96, - 99, 100, 103, 104, 108, 111, 112, 114, 115, 119, - 121, 124, 126, 128, 130, 132, 134, 136, 138, 140, - 142, 144, 146, 148, 150, 152, 154, 156, 158, 160, - 162, 164, 166, 169, 174, 180, 186, 190, 193, 196, - 198, 202, 204, 208, 210, 211, 216, 220, 224, 229, - 234, 238, 241, 244, 247, 250, 253, 256, 259, 262, - 265, 268, 275, 281, 290, 297, 304, 311, 318, 325, - 334, 343, 347, 349, 351, 353, 355, 358, 361, 366, - 369, 371, 376, 379, 384, 385, 393, 394, 402, 403, - 411, 412, 420, 424, 429, 430, 432, 434, 436, 440, - 444, 448, 452, 456, 460, 462, 463, 465, 467, 469, - 470, 473, 477, 479, 481, 485, 487, 488, 497, 499, - 501, 505, 507, 509, 512, 513, 515, 517, 518, 523, - 524, 526, 528, 530, 532, 534, 536, 538, 540, 542, - 546, 548, 554, 556, 558, 560, 562, 565, 568, 571, - 575, 578, 579, 581, 584, 587, 591, 601, 611, 620, - 634, 636, 638, 645, 651, 654, 661, 669, 671, 675, - 677, 678, 681, 683, 689, 695, 701, 704, 709, 714, - 721, 726, 731, 736, 741, 748, 755, 758, 766, 768, - 771, 772, 774, 775, 779, 786, 790, 797, 800, 805, - 812 -}; +/* 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 \ + { \ + 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) -static const short yyrhs[] = { 5, - 0, 6, 0, 3, 0, 4, 0, 78, 0, 79, - 0, 80, 0, 81, 0, 82, 0, 83, 0, 84, - 0, 85, 0, 86, 0, 87, 0, 88, 0, 89, - 0, 90, 0, 91, 0, 101, 0, 102, 0, 16, - 0, 14, 0, 12, 0, 10, 0, 17, 0, 15, - 0, 13, 0, 11, 0, 129, 0, 130, 0, 18, - 0, 19, 0, 165, 109, 0, 0, 41, 0, 42, - 0, 43, 0, 44, 0, 45, 0, 46, 0, 47, - 0, 0, 0, 65, 0, 66, 0, 67, 0, 68, - 0, 69, 0, 70, 0, 64, 4, 0, 0, 57, - 4, 0, 0, 110, 57, 4, 0, 34, 24, 0, - 0, 138, 0, 0, 110, 141, 140, 0, 138, 0, - 57, 4, 0, 144, 0, 8, 0, 146, 0, 8, - 0, 146, 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, 48, - 0, 145, 0, 180, 0, 111, 4, 0, 143, 112, - 148, 113, 0, 114, 4, 115, 146, 116, 0, 117, - 4, 115, 146, 118, 0, 119, 147, 120, 0, 119, - 120, 0, 146, 121, 0, 146, 0, 147, 110, 146, - 0, 147, 0, 147, 110, 37, 0, 37, 0, 0, - 144, 114, 151, 116, 0, 144, 114, 116, 0, 144, - 122, 24, 0, 144, 117, 151, 118, 0, 144, 119, - 151, 120, 0, 144, 119, 120, 0, 144, 38, 0, - 144, 39, 0, 144, 180, 0, 144, 150, 0, 144, - 26, 0, 129, 124, 0, 130, 4, 0, 9, 27, - 0, 9, 28, 0, 132, 7, 0, 99, 112, 149, - 36, 144, 113, 0, 97, 112, 149, 194, 113, 0, - 100, 112, 149, 110, 149, 110, 149, 113, 0, 125, - 112, 149, 110, 149, 113, 0, 126, 112, 149, 110, - 149, 113, 0, 127, 112, 149, 110, 149, 113, 0, - 128, 112, 149, 110, 149, 113, 0, 104, 112, 149, - 110, 149, 113, 0, 105, 112, 149, 110, 149, 110, - 149, 113, 0, 106, 112, 149, 110, 149, 110, 149, - 113, 0, 151, 110, 149, 0, 149, 0, 32, 0, - 33, 0, 154, 0, 154, 174, 0, 154, 176, 0, - 154, 62, 61, 160, 0, 154, 25, 0, 155, 0, - 155, 133, 20, 142, 0, 155, 176, 0, 155, 62, - 61, 160, 0, 0, 155, 133, 134, 152, 149, 156, - 140, 0, 0, 155, 133, 50, 152, 144, 157, 140, - 0, 0, 155, 133, 45, 152, 144, 158, 140, 0, - 0, 155, 133, 47, 152, 144, 159, 140, 0, 155, - 51, 162, 0, 155, 58, 109, 163, 0, 0, 24, - 0, 56, 0, 55, 0, 53, 109, 161, 0, 54, - 109, 4, 0, 52, 109, 24, 0, 71, 109, 24, - 0, 114, 164, 116, 0, 164, 110, 24, 0, 24, - 0, 0, 22, 0, 24, 0, 165, 0, 0, 144, - 166, 0, 168, 110, 167, 0, 167, 0, 168, 0, - 168, 110, 37, 0, 37, 0, 0, 135, 142, 165, - 112, 169, 113, 139, 136, 0, 29, 0, 119, 0, - 134, 170, 171, 0, 30, 0, 120, 0, 183, 173, - 0, 0, 45, 0, 47, 0, 0, 31, 177, 175, - 170, 0, 0, 63, 0, 3, 0, 4, 0, 7, - 0, 27, 0, 28, 0, 38, 0, 39, 0, 26, - 0, 117, 151, 118, 0, 150, 0, 61, 178, 24, - 110, 24, 0, 123, 0, 165, 0, 180, 0, 179, - 0, 144, 181, 0, 183, 184, 0, 172, 184, 0, - 185, 133, 186, 0, 185, 188, 0, 0, 23, 0, - 72, 182, 0, 72, 8, 0, 73, 21, 181, 0, - 73, 9, 181, 110, 21, 181, 110, 21, 181, 0, - 74, 131, 181, 110, 21, 181, 114, 187, 116, 0, - 74, 131, 181, 110, 21, 181, 114, 116, 0, 75, - 135, 142, 181, 112, 191, 113, 36, 21, 181, 76, - 21, 181, 0, 76, 0, 77, 0, 187, 131, 179, - 110, 21, 181, 0, 131, 179, 110, 21, 181, 0, - 133, 193, 0, 144, 114, 181, 110, 181, 116, 0, - 189, 110, 114, 181, 110, 181, 116, 0, 182, 0, - 190, 110, 182, 0, 190, 0, 0, 60, 59, 0, - 59, 0, 125, 144, 181, 110, 181, 0, 126, 144, - 181, 110, 181, 0, 127, 144, 181, 110, 181, 0, - 49, 182, 0, 128, 182, 110, 182, 0, 99, 182, - 36, 144, 0, 100, 182, 110, 182, 110, 182, 0, - 103, 182, 110, 144, 0, 107, 182, 110, 144, 0, - 108, 182, 110, 144, 0, 104, 182, 110, 182, 0, - 105, 182, 110, 182, 110, 182, 0, 106, 182, 110, - 182, 110, 182, 0, 98, 189, 0, 192, 135, 142, - 181, 112, 191, 113, 0, 196, 0, 110, 190, 0, - 0, 35, 0, 0, 92, 144, 137, 0, 92, 144, - 110, 15, 181, 137, 0, 93, 144, 137, 0, 93, - 144, 110, 15, 181, 137, 0, 94, 182, 0, 195, - 95, 144, 181, 0, 195, 96, 182, 110, 144, 181, - 0, 97, 144, 181, 194, 0 -}; +#endif +#if defined (__STDC__) || defined (__cplusplus) + typedef signed char yysigned_char; +#else + typedef short int yysigned_char; #endif -#if YYDEBUG != 0 -static const short yyrline[] = { 0, - 1097, 1098, 1106, 1107, 1117, 1117, 1117, 1117, 1117, 1118, - 1118, 1118, 1119, 1119, 1119, 1119, 1119, 1119, 1121, 1121, - 1125, 1125, 1125, 1125, 1126, 1126, 1126, 1126, 1127, 1127, - 1128, 1128, 1131, 1135, 1140, 1140, 1141, 1142, 1143, 1144, - 1145, 1146, 1149, 1149, 1150, 1151, 1152, 1153, 1154, 1155, - 1165, 1165, 1172, 1172, 1181, 1189, 1189, 1195, 1195, 1197, - 1202, 1216, 1216, 1217, 1217, 1219, 1229, 1229, 1229, 1229, - 1229, 1229, 1229, 1230, 1230, 1230, 1230, 1230, 1230, 1231, - 1235, 1239, 1247, 1255, 1268, 1273, 1285, 1295, 1299, 1310, - 1315, 1321, 1322, 1326, 1330, 1341, 1367, 1381, 1411, 1437, - 1458, 1471, 1481, 1486, 1547, 1554, 1563, 1569, 1575, 1579, - 1583, 1591, 1602, 1634, 1642, 1664, 1675, 1681, 1689, 1695, - 1701, 1710, 1714, 1722, 1722, 1732, 1740, 1745, 1749, 1753, - 1757, 1772, 1794, 1797, 1800, 1805, 1808, 1812, 1816, 1820, - 1824, 1829, 1833, 1836, 1839, 1843, 1856, 1857, 1859, 1863, - 1872, 1877, 1883, 1885, 1890, 1895, 1904, 1904, 1905, 1905, - 1907, 1914, 1920, 1927, 1931, 1937, 1942, 1947, 2042, 2042, - 2044, 2052, 2052, 2054, 2059, 2059, 2060, 2063, 2063, 2073, - 2077, 2082, 2086, 2090, 2094, 2098, 2102, 2106, 2110, 2114, - 2139, 2143, 2157, 2161, 2167, 2167, 2173, 2178, 2182, 2191, - 2202, 2207, 2219, 2232, 2236, 2240, 2245, 2254, 2273, 2282, - 2338, 2342, 2349, 2360, 2373, 2382, 2391, 2401, 2405, 2412, - 2412, 2414, 2418, 2423, 2439, 2454, 2468, 2481, 2489, 2497, - 2505, 2511, 2531, 2554, 2560, 2566, 2572, 2587, 2646, 2653, - 2656, 2661, 2665, 2672, 2677, 2683, 2688, 2694, 2702, 2714, - 2729 +/* YYFINAL -- State number of the termination state. */ +#define YYFINAL 4 +/* YYLAST -- Last index in YYTABLE. */ +#define YYLAST 1339 + +/* YYNTOKENS -- Number of terminals. */ +#define YYNTOKENS 123 +/* YYNNTS -- Number of nonterminals. */ +#define YYNNTS 75 +/* YYNRULES -- Number of rules. */ +#define YYNRULES 252 +/* YYNRULES -- Number of states. */ +#define YYNSTATES 517 + +/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ +#define YYUNDEFTOK 2 +#define YYMAXUTOK 363 + +#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, + 112, 113, 121, 2, 110, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 117, 109, 118, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 114, 111, 116, 2, 2, 2, 2, 2, 122, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 115, 2, 2, 119, 2, 120, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 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, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, + 105, 106, 107, 108 }; -#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, 81, 83, 85, 86, 87, 89, 91, 93, 95, + 97, 99, 102, 103, 106, 107, 111, 114, 115, 117, + 118, 122, 124, 127, 129, 131, 133, 135, 137, 139, + 141, 143, 145, 147, 149, 151, 153, 155, 157, 159, + 161, 163, 165, 167, 169, 172, 177, 183, 189, 193, + 196, 199, 201, 205, 207, 211, 213, 214, 219, 223, + 227, 232, 237, 241, 244, 247, 250, 253, 256, 259, + 262, 265, 268, 271, 278, 284, 293, 300, 307, 314, + 321, 328, 337, 346, 350, 352, 354, 356, 358, 361, + 364, 369, 372, 374, 379, 382, 387, 388, 396, 397, + 405, 406, 414, 415, 423, 427, 432, 433, 435, 437, + 439, 443, 447, 451, 455, 459, 463, 465, 466, 468, + 470, 472, 473, 476, 480, 482, 484, 488, 490, 491, + 500, 502, 504, 508, 510, 512, 515, 516, 518, 520, + 521, 526, 527, 529, 531, 533, 535, 537, 539, 541, + 543, 545, 549, 551, 557, 559, 561, 563, 565, 568, + 571, 574, 578, 581, 582, 584, 587, 590, 594, 604, + 614, 623, 637, 639, 641, 648, 654, 657, 664, 672, + 674, 678, 680, 681, 684, 686, 692, 698, 704, 707, + 712, 717, 724, 729, 734, 739, 744, 751, 758, 761, + 769, 771, 774, 775, 777, 778, 782, 789, 793, 800, + 803, 808, 815 +}; -#if YYDEBUG != 0 || defined (YYERROR_VERBOSE) +/* YYRHS -- A `-1'-separated list of the rules' RHS. */ +static const short int yyrhs[] = +{ + 154, 0, -1, 5, -1, 6, -1, 3, -1, 4, + -1, 78, -1, 79, -1, 80, -1, 81, -1, 82, + -1, 83, -1, 84, -1, 85, -1, 86, -1, 87, + -1, 88, -1, 89, -1, 90, -1, 91, -1, 101, + -1, 102, -1, 16, -1, 14, -1, 12, -1, 10, + -1, 17, -1, 15, -1, 13, -1, 11, -1, 130, + -1, 131, -1, 18, -1, 19, -1, 166, 109, -1, + -1, 41, -1, 42, -1, 43, -1, 44, -1, 45, + -1, 46, -1, 47, -1, -1, -1, 65, -1, 66, + -1, 67, -1, 68, -1, 69, -1, 70, -1, 64, + 4, -1, -1, 57, 4, -1, -1, 110, 57, 4, + -1, 34, 24, -1, -1, 139, -1, -1, 110, 142, + 141, -1, 139, -1, 57, 4, -1, 145, -1, 8, + -1, 147, -1, 8, -1, 147, -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, 48, -1, 146, -1, 181, -1, 111, + 4, -1, 144, 112, 149, 113, -1, 114, 4, 115, + 147, 116, -1, 117, 4, 115, 147, 118, -1, 119, + 148, 120, -1, 119, 120, -1, 147, 121, -1, 147, + -1, 148, 110, 147, -1, 148, -1, 148, 110, 37, + -1, 37, -1, -1, 145, 114, 152, 116, -1, 145, + 114, 116, -1, 145, 122, 24, -1, 145, 117, 152, + 118, -1, 145, 119, 152, 120, -1, 145, 119, 120, + -1, 145, 38, -1, 145, 39, -1, 145, 181, -1, + 145, 151, -1, 145, 26, -1, 130, 125, -1, 131, + 4, -1, 9, 27, -1, 9, 28, -1, 133, 7, + -1, 99, 112, 150, 36, 145, 113, -1, 97, 112, + 150, 195, 113, -1, 100, 112, 150, 110, 150, 110, + 150, 113, -1, 126, 112, 150, 110, 150, 113, -1, + 127, 112, 150, 110, 150, 113, -1, 128, 112, 150, + 110, 150, 113, -1, 129, 112, 150, 110, 150, 113, + -1, 104, 112, 150, 110, 150, 113, -1, 105, 112, + 150, 110, 150, 110, 150, 113, -1, 106, 112, 150, + 110, 150, 110, 150, 113, -1, 152, 110, 150, -1, + 150, -1, 32, -1, 33, -1, 155, -1, 155, 175, + -1, 155, 177, -1, 155, 62, 61, 161, -1, 155, + 25, -1, 156, -1, 156, 134, 20, 143, -1, 156, + 177, -1, 156, 62, 61, 161, -1, -1, 156, 134, + 135, 153, 150, 157, 141, -1, -1, 156, 134, 50, + 153, 145, 158, 141, -1, -1, 156, 134, 45, 153, + 145, 159, 141, -1, -1, 156, 134, 47, 153, 145, + 160, 141, -1, 156, 51, 163, -1, 156, 58, 109, + 164, -1, -1, 24, -1, 56, -1, 55, -1, 53, + 109, 162, -1, 54, 109, 4, -1, 52, 109, 24, + -1, 71, 109, 24, -1, 114, 165, 116, -1, 165, + 110, 24, -1, 24, -1, -1, 22, -1, 24, -1, + 166, -1, -1, 145, 167, -1, 169, 110, 168, -1, + 168, -1, 169, -1, 169, 110, 37, -1, 37, -1, + -1, 136, 143, 166, 112, 170, 113, 140, 137, -1, + 29, -1, 119, -1, 135, 171, 172, -1, 30, -1, + 120, -1, 184, 174, -1, -1, 45, -1, 47, -1, + -1, 31, 178, 176, 171, -1, -1, 63, -1, 3, + -1, 4, -1, 7, -1, 27, -1, 28, -1, 38, + -1, 39, -1, 26, -1, 117, 152, 118, -1, 151, + -1, 61, 179, 24, 110, 24, -1, 124, -1, 166, + -1, 181, -1, 180, -1, 145, 182, -1, 184, 185, + -1, 173, 185, -1, 186, 134, 187, -1, 186, 189, + -1, -1, 23, -1, 72, 183, -1, 72, 8, -1, + 73, 21, 182, -1, 73, 9, 182, 110, 21, 182, + 110, 21, 182, -1, 74, 132, 182, 110, 21, 182, + 114, 188, 116, -1, 74, 132, 182, 110, 21, 182, + 114, 116, -1, 75, 136, 143, 182, 112, 192, 113, + 36, 21, 182, 76, 21, 182, -1, 76, -1, 77, + -1, 188, 132, 180, 110, 21, 182, -1, 132, 180, + 110, 21, 182, -1, 134, 194, -1, 145, 114, 182, + 110, 182, 116, -1, 190, 110, 114, 182, 110, 182, + 116, -1, 183, -1, 191, 110, 183, -1, 191, -1, + -1, 60, 59, -1, 59, -1, 126, 145, 182, 110, + 182, -1, 127, 145, 182, 110, 182, -1, 128, 145, + 182, 110, 182, -1, 49, 183, -1, 129, 183, 110, + 183, -1, 99, 183, 36, 145, -1, 100, 183, 110, + 183, 110, 183, -1, 103, 183, 110, 145, -1, 107, + 183, 110, 145, -1, 108, 183, 110, 145, -1, 104, + 183, 110, 183, -1, 105, 183, 110, 183, 110, 183, + -1, 106, 183, 110, 183, 110, 183, -1, 98, 190, + -1, 193, 136, 143, 182, 112, 192, 113, -1, 197, + -1, 110, 191, -1, -1, 35, -1, -1, 92, 145, + 138, -1, 92, 145, 110, 15, 182, 138, -1, 93, + 145, 138, -1, 93, 145, 110, 15, 182, 138, -1, + 94, 183, -1, 196, 95, 145, 182, -1, 196, 96, + 183, 110, 145, 182, -1, 97, 145, 182, 195, -1 +}; -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","SECTION","VOLATILE","TO", -"DOTDOTDOT","NULL_TOK","UNDEF","CONST","INTERNAL","LINKONCE","WEAK","APPENDING", -"DLLIMPORT","DLLEXPORT","EXTERN_WEAK","OPAQUE","NOT","EXTERNAL","TARGET","TRIPLE", -"ENDIAN","POINTERSIZE","LITTLE","BIG","ALIGN","DEPLIBS","CALL","TAIL","ASM_TOK", -"MODULE","SIDEEFFECT","CC_TOK","CCC_TOK","CSRETCC_TOK","FASTCC_TOK","COLDCC_TOK", -"X86_STDCALLCC_TOK","X86_FASTCALLCC_TOK","DATA","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","EXTRACTELEMENT", -"INSERTELEMENT","SHUFFLEVECTOR","VAARG_old","VANEXT_old","'='","','","'\\\\'", -"'('","')'","'['","'x'","']'","'<'","'>'","'{'","'}'","'*'","'c'","INTVAL","EINT64VAL", -"ArithmeticOps","LogicalOps","SetCondOps","ShiftOps","SIntType","UIntType","IntType", -"FPType","OptAssign","OptLinkage","OptCallingConv","OptAlign","OptCAlign","SectionString", -"OptSection","GlobalVarAttributes","GlobalVarAttribute","TypesV","UpRTypesV", -"Types","PrimType","UpRTypes","TypeListI","ArgTypeListI","ConstVal","ConstExpr", -"ConstVector","GlobalType","Module","FunctionList","ConstPool","@1","@2","@3", -"@4","AsmBlock","BigOrLittle","TargetDefinition","LibrariesDefinition","LibList", -"Name","OptName","ArgVal","ArgListH","ArgList","FunctionHeaderH","BEGIN","FunctionHeader", -"END","Function","FnDeclareLinkage","FunctionProto","@5","OptSideEffect","ConstValueRef", -"SymbolicValueRef","ValueRef","ResolvedVal","BasicBlockList","BasicBlock","InstructionList", -"BBTerminatorInst","JumpTable","Inst","PHIList","ValueRefList","ValueRefListE", -"OptTailCall","InstVal","IndexList","OptVolatile","MemoryInst", NULL +/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ +static const unsigned short int yyrline[] = +{ + 0, 1097, 1097, 1098, 1106, 1107, 1117, 1117, 1117, 1117, + 1117, 1118, 1118, 1118, 1119, 1119, 1119, 1119, 1119, 1119, + 1121, 1121, 1125, 1125, 1125, 1125, 1126, 1126, 1126, 1126, + 1127, 1127, 1128, 1128, 1131, 1135, 1140, 1141, 1142, 1143, + 1144, 1145, 1146, 1147, 1149, 1150, 1151, 1152, 1153, 1154, + 1155, 1156, 1165, 1166, 1172, 1173, 1181, 1189, 1190, 1195, + 1196, 1197, 1202, 1216, 1216, 1217, 1217, 1219, 1229, 1229, + 1229, 1229, 1229, 1229, 1229, 1230, 1230, 1230, 1230, 1230, + 1230, 1231, 1235, 1239, 1247, 1255, 1268, 1273, 1285, 1295, + 1299, 1310, 1315, 1321, 1322, 1326, 1330, 1341, 1367, 1381, + 1411, 1437, 1458, 1471, 1481, 1486, 1547, 1554, 1563, 1569, + 1575, 1579, 1583, 1591, 1602, 1634, 1642, 1664, 1675, 1681, + 1689, 1695, 1701, 1710, 1714, 1722, 1722, 1732, 1740, 1745, + 1749, 1753, 1757, 1772, 1794, 1797, 1800, 1800, 1808, 1808, + 1816, 1816, 1824, 1824, 1833, 1836, 1839, 1843, 1856, 1857, + 1859, 1863, 1872, 1877, 1883, 1885, 1890, 1895, 1904, 1904, + 1905, 1905, 1907, 1914, 1920, 1927, 1931, 1937, 1942, 1947, + 2042, 2042, 2044, 2052, 2052, 2054, 2059, 2060, 2061, 2063, + 2063, 2073, 2077, 2082, 2086, 2090, 2094, 2098, 2102, 2106, + 2110, 2114, 2139, 2143, 2157, 2161, 2167, 2167, 2173, 2178, + 2182, 2191, 2202, 2207, 2219, 2232, 2236, 2240, 2245, 2254, + 2273, 2282, 2338, 2342, 2349, 2360, 2373, 2382, 2391, 2401, + 2405, 2412, 2412, 2414, 2418, 2423, 2439, 2454, 2468, 2481, + 2489, 2497, 2505, 2511, 2531, 2554, 2560, 2566, 2572, 2587, + 2646, 2653, 2656, 2661, 2665, 2672, 2677, 2683, 2688, 2694, + 2702, 2714, 2729 }; #endif -static const short yyr1[] = { 0, - 123, 123, 124, 124, 125, 125, 125, 125, 125, 126, - 126, 126, 127, 127, 127, 127, 127, 127, 128, 128, - 129, 129, 129, 129, 130, 130, 130, 130, 131, 131, - 132, 132, 133, 133, 134, 134, 134, 134, 134, 134, - 134, 134, 135, 135, 135, 135, 135, 135, 135, 135, - 136, 136, 137, 137, 138, 139, 139, 140, 140, 141, - 141, 142, 142, 143, 143, 144, 145, 145, 145, 145, - 145, 145, 145, 145, 145, 145, 145, 145, 145, 146, - 146, 146, 146, 146, 146, 146, 146, 146, 146, 147, - 147, 148, 148, 148, 148, 149, 149, 149, 149, 149, - 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, - 149, 150, 150, 150, 150, 150, 150, 150, 150, 150, - 150, 151, 151, 152, 152, 153, 154, 154, 154, 154, - 154, 155, 155, 155, 156, 155, 157, 155, 158, 155, - 159, 155, 155, 155, 155, 160, 161, 161, 162, 162, - 162, 162, 163, 164, 164, 164, 165, 165, 166, 166, - 167, 168, 168, 169, 169, 169, 169, 170, 171, 171, - 172, 173, 173, 174, 175, 175, 175, 177, 176, 178, - 178, 179, 179, 179, 179, 179, 179, 179, 179, 179, - 179, 179, 180, 180, 181, 181, 182, 183, 183, 184, - 185, 185, 185, 186, 186, 186, 186, 186, 186, 186, - 186, 186, 187, 187, 188, 189, 189, 190, 190, 191, - 191, 192, 192, 193, 193, 193, 193, 193, 193, 193, - 193, 193, 193, 193, 193, 193, 193, 193, 193, 194, - 194, 195, 195, 196, 196, 196, 196, 196, 196, 196, - 196 +#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE +/* YYTNAME[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", "SECTION", "VOLATILE", "TO", + "DOTDOTDOT", "NULL_TOK", "UNDEF", "CONST", "INTERNAL", "LINKONCE", + "WEAK", "APPENDING", "DLLIMPORT", "DLLEXPORT", "EXTERN_WEAK", "OPAQUE", + "NOT", "EXTERNAL", "TARGET", "TRIPLE", "ENDIAN", "POINTERSIZE", "LITTLE", + "BIG", "ALIGN", "DEPLIBS", "CALL", "TAIL", "ASM_TOK", "MODULE", + "SIDEEFFECT", "CC_TOK", "CCC_TOK", "CSRETCC_TOK", "FASTCC_TOK", + "COLDCC_TOK", "X86_STDCALLCC_TOK", "X86_FASTCALLCC_TOK", "DATA", "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", + "EXTRACTELEMENT", "INSERTELEMENT", "SHUFFLEVECTOR", "VAARG_old", + "VANEXT_old", "'='", "','", "'\\\\'", "'('", "')'", "'['", "'x'", "']'", + "'<'", "'>'", "'{'", "'}'", "'*'", "'c'", "$accept", "INTVAL", + "EINT64VAL", "ArithmeticOps", "LogicalOps", "SetCondOps", "ShiftOps", + "SIntType", "UIntType", "IntType", "FPType", "OptAssign", "OptLinkage", + "OptCallingConv", "OptAlign", "OptCAlign", "SectionString", "OptSection", + "GlobalVarAttributes", "GlobalVarAttribute", "TypesV", "UpRTypesV", + "Types", "PrimType", "UpRTypes", "TypeListI", "ArgTypeListI", "ConstVal", + "ConstExpr", "ConstVector", "GlobalType", "Module", "FunctionList", + "ConstPool", "@1", "@2", "@3", "@4", "AsmBlock", "BigOrLittle", + "TargetDefinition", "LibrariesDefinition", "LibList", "Name", "OptName", + "ArgVal", "ArgListH", "ArgList", "FunctionHeaderH", "BEGIN", + "FunctionHeader", "END", "Function", "FnDeclareLinkage", "FunctionProto", + "@5", "OptSideEffect", "ConstValueRef", "SymbolicValueRef", "ValueRef", + "ResolvedVal", "BasicBlockList", "BasicBlock", "InstructionList", + "BBTerminatorInst", "JumpTable", "Inst", "PHIList", "ValueRefList", + "ValueRefListE", "OptTailCall", "InstVal", "IndexList", "OptVolatile", + "MemoryInst", 0 }; +#endif -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, 1, 1, - 1, 0, 0, 1, 1, 1, 1, 1, 1, 2, - 0, 2, 0, 3, 2, 0, 1, 0, 3, 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, 6, 8, - 8, 3, 1, 1, 1, 1, 2, 2, 4, 2, - 1, 4, 2, 4, 0, 7, 0, 7, 0, 7, - 0, 7, 3, 4, 0, 1, 1, 1, 3, 3, - 3, 3, 3, 3, 1, 0, 1, 1, 1, 0, - 2, 3, 1, 1, 3, 1, 0, 8, 1, 1, - 3, 1, 1, 2, 0, 1, 1, 0, 4, 0, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, - 1, 5, 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, 4, 6, 6, 2, 7, 1, 2, - 0, 1, 0, 3, 6, 3, 6, 2, 4, 6, - 4 +# 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, 349, 350, 351, 352, 353, 354, + 355, 356, 357, 358, 359, 360, 361, 362, 363, 61, + 44, 92, 40, 41, 91, 120, 93, 60, 62, 123, + 125, 42, 99 }; +# endif -static const short yydefact[] = { 145, - 42, 131, 130, 178, 35, 36, 37, 38, 39, 40, - 41, 0, 43, 202, 127, 128, 202, 157, 158, 0, - 0, 0, 42, 0, 133, 175, 0, 0, 44, 45, - 46, 47, 48, 49, 0, 0, 203, 199, 34, 172, - 173, 174, 198, 0, 0, 0, 0, 143, 0, 0, - 0, 0, 0, 0, 0, 33, 176, 177, 43, 146, - 129, 50, 1, 2, 63, 67, 68, 69, 70, 71, - 72, 73, 74, 75, 76, 77, 78, 79, 80, 0, - 0, 0, 0, 193, 0, 0, 62, 81, 66, 194, - 82, 169, 170, 171, 243, 201, 0, 0, 0, 0, - 156, 144, 134, 132, 124, 125, 0, 0, 0, 0, - 179, 83, 0, 0, 65, 88, 90, 0, 0, 95, - 89, 242, 0, 223, 0, 0, 0, 0, 43, 211, - 212, 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, 0, 0, 0, 200, 43, 215, 0, 239, 151, - 148, 147, 149, 150, 152, 155, 0, 139, 141, 137, - 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, - 77, 0, 0, 0, 0, 135, 0, 0, 0, 87, - 167, 94, 92, 0, 0, 227, 222, 205, 204, 0, - 0, 24, 28, 23, 27, 22, 26, 21, 25, 29, - 30, 0, 0, 53, 53, 248, 0, 0, 237, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 153, 58, 58, 58, 109, - 110, 3, 4, 107, 108, 111, 106, 102, 103, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 105, 104, 58, 64, 64, 91, 166, - 160, 163, 164, 0, 0, 84, 182, 183, 184, 189, - 185, 186, 187, 188, 180, 0, 191, 196, 195, 197, - 0, 206, 0, 0, 0, 244, 0, 246, 241, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 154, 0, 140, 142, - 138, 0, 0, 0, 0, 0, 0, 97, 123, 0, - 0, 101, 0, 98, 0, 0, 0, 0, 136, 85, - 86, 159, 161, 0, 56, 93, 181, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 251, 0, 0, 229, - 0, 231, 234, 0, 0, 232, 233, 0, 0, 0, - 228, 0, 249, 0, 0, 0, 60, 58, 241, 0, - 0, 0, 0, 0, 0, 96, 99, 100, 0, 0, - 0, 0, 165, 162, 57, 51, 0, 190, 0, 0, - 221, 53, 54, 53, 218, 240, 0, 0, 0, 0, - 0, 224, 225, 226, 221, 0, 55, 61, 59, 0, - 0, 0, 0, 0, 0, 122, 0, 0, 0, 0, - 0, 168, 0, 0, 0, 220, 0, 0, 245, 247, - 0, 0, 0, 230, 235, 236, 0, 250, 113, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 52, 192, - 0, 0, 0, 219, 216, 0, 238, 112, 0, 119, - 0, 0, 115, 116, 117, 118, 0, 209, 0, 0, - 0, 217, 0, 0, 0, 207, 0, 208, 0, 0, - 114, 120, 121, 0, 0, 0, 0, 0, 0, 214, - 0, 0, 213, 210, 0, 0, 0 +/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ +static const unsigned char yyr1[] = +{ + 0, 123, 124, 124, 125, 125, 126, 126, 126, 126, + 126, 127, 127, 127, 128, 128, 128, 128, 128, 128, + 129, 129, 130, 130, 130, 130, 131, 131, 131, 131, + 132, 132, 133, 133, 134, 134, 135, 135, 135, 135, + 135, 135, 135, 135, 136, 136, 136, 136, 136, 136, + 136, 136, 137, 137, 138, 138, 139, 140, 140, 141, + 141, 142, 142, 143, 143, 144, 144, 145, 146, 146, + 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, + 146, 147, 147, 147, 147, 147, 147, 147, 147, 147, + 147, 148, 148, 149, 149, 149, 149, 150, 150, 150, + 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, + 150, 150, 150, 151, 151, 151, 151, 151, 151, 151, + 151, 151, 151, 152, 152, 153, 153, 154, 155, 155, + 155, 155, 155, 156, 156, 156, 157, 156, 158, 156, + 159, 156, 160, 156, 156, 156, 156, 161, 162, 162, + 163, 163, 163, 163, 164, 165, 165, 165, 166, 166, + 167, 167, 168, 169, 169, 170, 170, 170, 170, 171, + 172, 172, 173, 174, 174, 175, 176, 176, 176, 178, + 177, 179, 179, 180, 180, 180, 180, 180, 180, 180, + 180, 180, 180, 180, 181, 181, 182, 182, 183, 184, + 184, 185, 186, 186, 186, 187, 187, 187, 187, 187, + 187, 187, 187, 187, 188, 188, 189, 190, 190, 191, + 191, 192, 192, 193, 193, 194, 194, 194, 194, 194, + 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, + 194, 195, 195, 196, 196, 197, 197, 197, 197, 197, + 197, 197, 197 }; -static const short yydefgoto[] = { 84, - 254, 270, 271, 272, 273, 192, 193, 222, 194, 23, - 13, 35, 442, 306, 387, 406, 329, 388, 85, 86, - 195, 88, 89, 118, 204, 339, 297, 340, 107, 515, - 1, 2, 276, 249, 247, 248, 61, 173, 48, 102, - 177, 90, 353, 282, 283, 284, 36, 94, 14, 42, - 15, 59, 16, 26, 358, 298, 91, 300, 415, 17, - 38, 39, 165, 490, 96, 229, 446, 447, 166, 167, - 367, 168, 169 +/* 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, + 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, + 1, 2, 0, 2, 0, 3, 2, 0, 1, 0, + 3, 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, + 6, 8, 8, 3, 1, 1, 1, 1, 2, 2, + 4, 2, 1, 4, 2, 4, 0, 7, 0, 7, + 0, 7, 0, 7, 3, 4, 0, 1, 1, 1, + 3, 3, 3, 3, 3, 3, 1, 0, 1, 1, + 1, 0, 2, 3, 1, 1, 3, 1, 0, 8, + 1, 1, 3, 1, 1, 2, 0, 1, 1, 0, + 4, 0, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 3, 1, 5, 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, 4, 6, 6, 2, 7, + 1, 2, 0, 1, 0, 3, 6, 3, 6, 2, + 4, 6, 4 }; -static const short yypact[] = {-32768, - 118, 605,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, --32768, -46, 131, 10,-32768,-32768, -18,-32768,-32768, 29, - -69, 58, 51, -19,-32768, 106, 114, 144,-32768,-32768, --32768,-32768,-32768,-32768, 1060, -20,-32768,-32768, 130,-32768, --32768,-32768,-32768, 80, 81, 83, 94,-32768, 57, 114, - 1060, 44, 44, 44, 44,-32768,-32768,-32768, 131,-32768, --32768,-32768,-32768,-32768, 90,-32768,-32768,-32768,-32768,-32768, --32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 200, - 201, 202, 572,-32768, 130, 99,-32768,-32768, -34,-32768, --32768,-32768,-32768,-32768, 1231,-32768, 191, 77, 212, 193, - 194,-32768,-32768,-32768,-32768,-32768, 1101, 1101, 1101, 1142, --32768,-32768, 104, 107,-32768,-32768, -34, -74, 109, 852, --32768,-32768, 1101,-32768, 165, 1183, 30, 93, 131,-32768, --32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, --32768,-32768,-32768,-32768,-32768, 1101, 1101, 1101, 1101, 1101, - 1101, 1101,-32768,-32768, 1101, 1101, 1101, 1101, 1101, 1101, - 1101, 1101, 1101, 1101,-32768, 131,-32768, 62,-32768,-32768, --32768,-32768,-32768,-32768,-32768,-32768, -72,-32768,-32768,-32768, - 142, 170, 221, 173, 222, 175, 223, 178, 224, 231, - 232, 183, 225, 233, 425,-32768, 1101, 1101, 1101,-32768, - 893,-32768, 120, 128, 638,-32768,-32768, 90,-32768, 638, - 638,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, --32768, 638, 1060, 121, 132,-32768, 638, 129, 134, 214, - 141, 143, 146, 147, 148, 149, 150, 638, 638, 638, - 151, 1060, 1101, 1101, 228,-32768, 152, 152, 152,-32768, --32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 153, - 154, 155, 156, 159, 160, 934, 1142, 592, 230, 161, - 164, 177, 180,-32768,-32768, 152, -37, -99, -34,-32768, - 130,-32768, 184, 174, 978,-32768,-32768,-32768,-32768,-32768, --32768,-32768,-32768,-32768, 227, 1142,-32768,-32768,-32768,-32768, - 186,-32768, 187, 638, 2,-32768, 3,-32768, 188, 638, - 179, 1101, 1101, 1101, 1101, 1101, 1101, 1101, 1101, 189, - 190, 195, 1101, 638, 638, 196,-32768, -23,-32768,-32768, --32768, 1142, 1142, 1142, 1142, 1142, 1142,-32768,-32768, -30, - 21,-32768, -73,-32768, 1142, 1142, 1142, 1142,-32768,-32768, --32768,-32768,-32768, 1019, 229,-32768,-32768, 240, 24, 280, - 286, 197, 638, 307, 638, 1101,-32768, 203, 638,-32768, - 205,-32768,-32768, 210, 211,-32768,-32768, 638, 638, 638, --32768, 215,-32768, 1101, 288, 318,-32768, 152, 188, 290, - 218, 219, 220, 226, 1142,-32768,-32768,-32768, 234, 237, - 241, 242,-32768,-32768,-32768, 284, 243,-32768, 638, 638, - 1101, 246,-32768, 246,-32768, 247, 638, 248, 1101, 1101, - 1101,-32768,-32768,-32768, 1101, 638,-32768,-32768,-32768, 252, - 1101, 1142, 1142, 1142, 1142,-32768, 1142, 1142, 1142, 1142, - 338,-32768, 319, 249, 236, 247, 253, 303,-32768,-32768, - 1101, 245, 638,-32768,-32768,-32768, 254,-32768,-32768, 256, - 260, 259, 263, 265, 264, 267, 270, 274,-32768,-32768, - 357, 14, 355,-32768,-32768, 276,-32768,-32768, 1142,-32768, - 1142, 1142,-32768,-32768,-32768,-32768, 638,-32768, 742, 52, - 372,-32768, 281, 282, 287,-32768, 289,-32768, 742, 638, --32768,-32768,-32768, 376, 291, 326, 638, 382, 383,-32768, - 638, 638,-32768,-32768, 405, 406,-32768 +/* 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[] = +{ + 146, 0, 43, 132, 1, 131, 179, 36, 37, 38, + 39, 40, 41, 42, 0, 44, 203, 128, 129, 203, + 158, 159, 0, 0, 0, 43, 0, 134, 176, 0, + 0, 45, 46, 47, 48, 49, 50, 0, 0, 204, + 200, 35, 173, 174, 175, 199, 0, 0, 0, 0, + 144, 0, 0, 0, 0, 0, 0, 0, 34, 177, + 178, 44, 147, 130, 51, 2, 3, 64, 68, 69, + 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 0, 0, 0, 0, 194, 0, 0, 63, + 82, 67, 195, 83, 170, 171, 172, 244, 202, 0, + 0, 0, 0, 157, 145, 135, 133, 125, 126, 0, + 0, 0, 0, 180, 84, 0, 0, 66, 89, 91, + 0, 0, 96, 90, 243, 0, 224, 0, 0, 0, + 0, 44, 212, 213, 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, 0, 0, 0, 201, 44, 216, + 0, 240, 152, 149, 148, 150, 151, 153, 156, 0, + 140, 142, 138, 68, 69, 70, 71, 72, 73, 74, + 75, 76, 77, 78, 0, 0, 0, 0, 136, 0, + 0, 0, 88, 168, 95, 93, 0, 0, 228, 223, + 206, 205, 0, 0, 25, 29, 24, 28, 23, 27, + 22, 26, 30, 31, 0, 0, 54, 54, 249, 0, + 0, 238, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 154, 59, + 59, 59, 110, 111, 4, 5, 108, 109, 112, 107, + 103, 104, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 106, 105, 59, 65, + 65, 92, 167, 161, 164, 165, 0, 0, 85, 183, + 184, 185, 190, 186, 187, 188, 189, 181, 0, 192, + 197, 196, 198, 0, 207, 0, 0, 0, 245, 0, + 247, 242, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 155, + 0, 141, 143, 139, 0, 0, 0, 0, 0, 0, + 98, 124, 0, 0, 102, 0, 99, 0, 0, 0, + 0, 137, 86, 87, 160, 162, 0, 57, 94, 182, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 252, + 0, 0, 230, 0, 232, 235, 0, 0, 233, 234, + 0, 0, 0, 229, 0, 250, 0, 0, 0, 61, + 59, 242, 0, 0, 0, 0, 0, 0, 97, 100, + 101, 0, 0, 0, 0, 166, 163, 58, 52, 0, + 191, 0, 0, 222, 54, 55, 54, 219, 241, 0, + 0, 0, 0, 0, 225, 226, 227, 222, 0, 56, + 62, 60, 0, 0, 0, 0, 0, 0, 123, 0, + 0, 0, 0, 0, 169, 0, 0, 0, 221, 0, + 0, 246, 248, 0, 0, 0, 231, 236, 237, 0, + 251, 114, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 53, 193, 0, 0, 0, 220, 217, 0, 239, + 113, 0, 120, 0, 0, 116, 117, 118, 119, 0, + 210, 0, 0, 0, 218, 0, 0, 0, 208, 0, + 209, 0, 0, 115, 121, 122, 0, 0, 0, 0, + 0, 0, 215, 0, 0, 214, 211 }; -static const short yypgoto[] = {-32768, --32768, 312, 313, 314, 315, -127, -126, -458,-32768, 373, - 388, -116,-32768, -221, 59,-32768, -241,-32768, -48,-32768, - -35,-32768, -62, 293,-32768, -100, 239, -226, 91,-32768, --32768,-32768,-32768,-32768,-32768,-32768, 365,-32768,-32768,-32768, --32768, 4,-32768, 63,-32768,-32768, 359,-32768,-32768,-32768, --32768,-32768, 417,-32768,-32768, -414, -55, 64, -103,-32768, - 403,-32768,-32768,-32768,-32768,-32768, 55, -3,-32768,-32768, - 34,-32768,-32768 +/* YYDEFGOTO[NTERM-NUM]. */ +static const short int yydefgoto[] = +{ + -1, 86, 256, 272, 273, 274, 275, 194, 195, 224, + 196, 25, 15, 37, 444, 308, 389, 408, 331, 390, + 87, 88, 197, 90, 91, 120, 206, 341, 299, 342, + 109, 1, 2, 3, 278, 251, 249, 250, 63, 175, + 50, 104, 179, 92, 355, 284, 285, 286, 38, 96, + 16, 44, 17, 61, 18, 28, 360, 300, 93, 302, + 417, 19, 40, 41, 167, 492, 98, 231, 448, 449, + 168, 169, 369, 170, 171 }; - -#define YYLAST 1339 - - -static const short yytable[] = { 87, - 220, 221, 104, 308, 37, 24, 330, 331, 92, 196, - 385, 40, 223, 489, 27, 87, 363, 365, 351, 206, - 117, 121, 209, 212, 213, 214, 215, 216, 217, 218, - 219, 499, 37, 386, 349, 199, 395, 245, 210, 49, - 341, 343, 24, 246, 226, 200, 398, 230, 231, 242, - 211, 232, 233, 234, 235, 236, 237, 117, 364, 364, - 241, 212, 213, 214, 215, 216, 217, 218, 219, 359, - 51, 178, 179, 180, 497, 105, 106, -64, 350, 395, - 44, 45, 46, 121, 505, 396, 121, 205, 119, 56, - 205, 5, 6, 7, 8, 52, 10, 53, 93, 47, - 54, 41, 212, 213, 214, 215, 216, 217, 218, 219, - 224, 225, 205, 227, 228, 205, 205, -126, 50, 205, - 205, 205, 205, 205, 205, 238, 239, 240, 205, 488, - 395, 171, 172, 395, 277, 278, 279, 60, 397, 275, - 326, 408, 3, 108, 109, 110, 429, 62, 4, 299, - 57, 18, 58, 19, 299, 299, 243, 244, 5, 6, - 7, 8, 9, 10, 11, 281, 299, 498, 250, 251, - 101, 299, -24, -24, 304, -23, -23, -22, -22, 12, - -21, -21, 299, 299, 299, 252, 253, 87, 97, 98, - 449, 99, 450, 324, 28, 29, 30, 31, 32, 33, - 34, -65, 100, 112, 113, 114, 87, 325, 205, 371, - 120, 373, 374, 375, 170, 174, 175, 176, 197, 381, - 201, 198, 279, 207, -28, -27, -26, -25, 255, 285, - 305, 389, 390, 391, 392, 393, 394, -31, -32, 256, - 286, 307, 310, 311, 399, 400, 401, 402, 299, 312, - 313, 327, 314, 344, 299, 315, 316, 317, 318, 319, - 323, 328, 385, 407, 332, 333, 334, 335, 299, 299, - 336, 337, 345, 301, 302, 346, 370, 205, 372, 205, - 205, 205, 376, 377, 352, 303, 355, 205, 347, 357, - 309, 348, 369, 354, 436, 360, 361, 366, 378, 379, - 409, 320, 321, 322, 380, 384, 410, 299, 411, 299, - 413, 427, 417, 299, 419, 454, 455, 456, 281, 420, - 421, 428, 299, 299, 299, 431, 425, 432, 433, 434, - 205, 461, 462, 463, 464, 435, 465, 466, 467, 468, - 441, 469, 470, 437, 220, 221, 438, 474, 426, 472, - 439, 440, 443, 299, 299, 448, 451, 453, 471, 364, - 475, 299, 220, 221, 459, 473, 477, 362, 478, 479, - 299, 480, 481, 368, 482, 205, 483, 487, 493, 484, - 494, 495, 485, 205, 205, 205, 486, 382, 383, 205, - 491, 492, 500, 501, 502, 460, 507, 299, 504, 503, - 508, 509, 511, 512, 516, 517, 161, 162, 163, 164, - 55, 95, 203, 405, 103, 205, 404, 111, 25, 43, - 416, 457, 430, 0, 0, 0, 412, 0, 414, 63, - 64, 299, 418, 274, 0, 0, 0, 0, 0, 0, - 0, 422, 423, 424, 299, 0, 18, 0, 19, 0, - 257, 299, 0, 0, 0, 299, 299, 0, 0, 0, - 0, 0, 258, 259, 0, 0, 0, 0, 0, 0, - 0, 0, 444, 445, 0, 0, 0, 0, 0, 0, - 452, 0, 0, 0, 0, 0, 0, 0, 0, 458, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 132, 133, 134, 135, 136, 137, 138, 139, - 140, 141, 142, 143, 144, 145, 476, 0, 0, 0, - 0, 260, 0, 261, 262, 153, 154, 0, 263, 264, - 265, 0, 0, 0, 0, 0, 0, 0, 266, 0, - 0, 267, 0, 268, 0, 0, 269, 0, 0, 0, - 496, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 506, 0, 0, 0, 0, 0, 0, - 510, 0, 0, 0, 513, 514, 63, 64, 0, 115, - 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, - 76, 77, 78, 18, 0, 19, 63, 64, 0, 115, - 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, - 191, 77, 78, 18, 0, 19, 0, 0, 0, 79, - 0, 0, 0, 0, -34, 0, 18, 0, 19, 0, - 0, 0, 0, 0, 0, 4, -34, -34, 0, 79, - 287, 288, 63, 64, 289, -34, -34, -34, -34, -34, - -34, -34, 0, 0, -34, 20, 0, 0, 0, 18, - 0, 19, 21, 290, 291, 292, 22, 0, 0, 0, - 0, 0, 0, 0, 0, 293, 294, 0, 0, 0, - 0, 0, 80, 0, 0, 81, 0, 0, 82, 0, - 83, 116, 0, 0, 0, 0, 0, 0, 295, 0, - 0, 0, 80, 0, 0, 81, 0, 0, 82, 0, - 83, 342, 0, 0, 0, 132, 133, 134, 135, 136, - 137, 138, 139, 140, 141, 142, 143, 144, 145, 0, - 0, 0, 0, 0, 260, 0, 261, 262, 153, 154, - 0, 263, 264, 265, 287, 288, 0, 0, 289, 0, - 0, 0, 0, 0, 296, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 290, 291, 292, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 293, - 294, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 295, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 132, - 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, - 143, 144, 145, 0, 0, 0, 0, 0, 260, 0, - 261, 262, 153, 154, 0, 263, 264, 265, 0, 0, - 0, 0, 0, 0, 0, 0, 63, 64, 296, 115, - 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, - 76, 77, 78, 18, 0, 19, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 202, 0, - 0, 0, 0, 0, 0, 0, 0, 63, 64, 79, - 115, 66, 67, 68, 69, 70, 71, 72, 73, 74, - 75, 76, 77, 78, 18, 0, 19, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 280, - 0, 0, 0, 0, 0, 0, 0, 0, 63, 64, - 79, 115, 181, 182, 183, 184, 185, 186, 187, 188, - 189, 190, 191, 77, 78, 18, 0, 19, 0, 0, - 0, 0, 80, 0, 0, 81, 0, 0, 82, 0, - 83, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 79, 63, 64, 0, 115, 66, 67, 68, 69, - 70, 71, 72, 73, 74, 75, 76, 77, 78, 18, - 0, 19, 0, 80, 0, 0, 81, 0, 0, 82, - 0, 83, 0, 0, 356, 0, 0, 0, 0, 0, - 0, 0, 0, 63, 64, 79, 115, 66, 67, 68, - 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, - 18, 0, 19, 0, 80, 0, 0, 81, 0, 338, - 82, 0, 83, 0, 0, 403, 0, 0, 0, 0, - 0, 0, 0, 0, 63, 64, 79, 65, 66, 67, - 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, - 78, 18, 0, 19, 0, 0, 0, 0, 80, 0, - 0, 81, 0, 0, 82, 0, 83, 0, 0, 0, - 0, 0, 0, 0, 0, 63, 64, 79, 115, 66, - 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, - 77, 78, 18, 0, 19, 0, 0, 0, 0, 80, - 0, 0, 81, 0, 0, 82, 0, 83, 0, 0, - 0, 0, 0, 0, 0, 0, 63, 64, 79, 115, - 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, - 191, 77, 78, 18, 0, 19, 0, 0, 0, 0, - 80, 0, 0, 81, 0, 0, 82, 0, 83, 0, - 0, 0, 0, 0, 0, 0, 0, 63, 64, 79, - 208, 66, 67, 68, 69, 70, 71, 72, 73, 74, - 75, 76, 77, 78, 18, 0, 19, 0, 0, 0, - 0, 80, 0, 0, 81, 0, 0, 82, 0, 83, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 79, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 80, 0, 0, 81, 0, 0, 82, 0, - 83, 0, 0, 0, 0, 122, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 123, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 124, - 125, 0, 0, 80, 0, 0, 81, 0, 0, 82, - 0, 83, 126, 127, 128, 129, 130, 131, 132, 133, - 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, - 144, 145, 146, 147, 148, 0, 0, 149, 150, 151, - 152, 153, 154, 155, 156, 157, 158, 159, 160 +/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing + STATE-NUM. */ +#define YYPACT_NINF -410 +static const short int yypact[] = +{ + -410, 17, 118, 605, -410, -410, -410, -410, -410, -410, + -410, -410, -410, -410, 24, 160, 67, -410, -410, -15, + -410, -410, 27, -5, 46, -6, 10, -410, 86, 147, + 138, -410, -410, -410, -410, -410, -410, 1060, -20, -410, + -410, 110, -410, -410, -410, -410, 69, 70, 72, 73, + -410, 63, 147, 1060, 68, 68, 68, 68, -410, -410, + -410, 160, -410, -410, -410, -410, -410, 64, -410, -410, + -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, + -410, -410, 182, 183, 186, 572, -410, 110, 77, -410, + -410, -28, -410, -410, -410, -410, -410, 1231, -410, 168, + 83, 199, 180, 181, -410, -410, -410, -410, -410, 1101, + 1101, 1101, 1142, -410, -410, 91, 96, -410, -410, -28, + -98, 103, 852, -410, -410, 1101, -410, 157, 1183, 50, + 185, 160, -410, -410, -410, -410, -410, -410, -410, -410, + -410, -410, -410, -410, -410, -410, -410, -410, 1101, 1101, + 1101, 1101, 1101, 1101, 1101, -410, -410, 1101, 1101, 1101, + 1101, 1101, 1101, 1101, 1101, 1101, 1101, -410, 160, -410, + 49, -410, -410, -410, -410, -410, -410, -410, -410, -14, + -410, -410, -410, 120, 148, 213, 150, 214, 154, 215, + 166, 217, 224, 231, 170, 218, 232, 425, -410, 1101, + 1101, 1101, -410, 893, -410, 130, 128, 638, -410, -410, + 64, -410, 638, 638, -410, -410, -410, -410, -410, -410, + -410, -410, -410, -410, 638, 1060, 132, 133, -410, 638, + 136, 134, 216, 141, 143, 144, 146, 149, 151, 152, + 638, 638, 638, 153, 1060, 1101, 1101, 233, -410, 155, + 155, 155, -410, -410, -410, -410, -410, -410, -410, -410, + -410, -410, 156, 159, 161, 164, 175, 177, 934, 1142, + 592, 234, 178, 184, 187, 188, -410, -410, 155, -70, + -35, -28, -410, 110, -410, 162, 179, 978, -410, -410, + -410, -410, -410, -410, -410, -410, -410, 197, 1142, -410, + -410, -410, -410, 191, -410, 195, 638, 3, -410, 18, + -410, 196, 638, 193, 1101, 1101, 1101, 1101, 1101, 1101, + 1101, 1101, 201, 202, 203, 1101, 638, 638, 205, -410, + 13, -410, -410, -410, 1142, 1142, 1142, 1142, 1142, 1142, + -410, -410, -13, -99, -410, -78, -410, 1142, 1142, 1142, + 1142, -410, -410, -410, -410, -410, 1019, 230, -410, -410, + 242, -23, 246, 272, 208, 638, 290, 638, 1101, -410, + 211, 638, -410, 212, -410, -410, 219, 220, -410, -410, + 638, 638, 638, -410, 229, -410, 1101, 273, 294, -410, + 155, 196, 291, 226, 237, 240, 241, 1142, -410, -410, + -410, 243, 247, 248, 249, -410, -410, -410, 252, 250, + -410, 638, 638, 1101, 251, -410, 251, -410, 255, 638, + 256, 1101, 1101, 1101, -410, -410, -410, 1101, 638, -410, + -410, -410, 239, 1101, 1142, 1142, 1142, 1142, -410, 1142, + 1142, 1142, 1142, 322, -410, 304, 257, 228, 255, 259, + 286, -410, -410, 1101, 253, 638, -410, -410, -410, 260, + -410, -410, 262, 267, 265, 270, 277, 278, 279, 280, + 281, -410, -410, 323, 14, 320, -410, -410, 254, -410, + -410, 1142, -410, 1142, 1142, -410, -410, -410, -410, 638, + -410, 742, 52, 362, -410, 282, 284, 287, -410, 289, + -410, 742, 638, -410, -410, -410, 380, 292, 327, 638, + 383, 384, -410, 638, 638, -410, -410 }; -static const short yycheck[] = { 35, - 128, 128, 51, 225, 23, 2, 248, 249, 29, 110, - 34, 30, 129, 472, 61, 51, 15, 15, 118, 123, - 83, 121, 126, 10, 11, 12, 13, 14, 15, 16, - 17, 490, 23, 57, 276, 110, 110, 110, 9, 109, - 267, 268, 39, 116, 148, 120, 120, 151, 152, 166, - 21, 155, 156, 157, 158, 159, 160, 120, 57, 57, - 164, 10, 11, 12, 13, 14, 15, 16, 17, 296, - 20, 107, 108, 109, 489, 32, 33, 112, 116, 110, - 52, 53, 54, 121, 499, 116, 121, 123, 85, 109, - 126, 41, 42, 43, 44, 45, 46, 47, 119, 71, - 50, 120, 10, 11, 12, 13, 14, 15, 16, 17, - 146, 147, 148, 149, 150, 151, 152, 0, 61, 155, - 156, 157, 158, 159, 160, 161, 162, 163, 164, 116, - 110, 55, 56, 110, 197, 198, 199, 24, 118, 195, - 244, 118, 25, 53, 54, 55, 388, 4, 31, 205, - 45, 22, 47, 24, 210, 211, 95, 96, 41, 42, - 43, 44, 45, 46, 47, 201, 222, 116, 27, 28, - 114, 227, 3, 4, 223, 3, 4, 3, 4, 62, - 3, 4, 238, 239, 240, 3, 4, 223, 109, 109, - 412, 109, 414, 242, 64, 65, 66, 67, 68, 69, - 70, 112, 109, 4, 4, 4, 242, 243, 244, 313, - 112, 315, 316, 317, 24, 4, 24, 24, 115, 323, - 112, 115, 285, 59, 4, 4, 4, 4, 4, 110, - 110, 332, 333, 334, 335, 336, 337, 7, 7, 7, - 113, 110, 114, 110, 345, 346, 347, 348, 304, 36, - 110, 24, 110, 24, 310, 110, 110, 110, 110, 110, - 110, 110, 34, 24, 112, 112, 112, 112, 324, 325, - 112, 112, 112, 210, 211, 112, 312, 313, 314, 315, - 316, 317, 318, 319, 281, 222, 113, 323, 112, 63, - 227, 112, 114, 110, 395, 110, 110, 110, 110, 110, - 21, 238, 239, 240, 110, 110, 21, 363, 112, 365, - 4, 24, 110, 369, 110, 419, 420, 421, 354, 110, - 110, 4, 378, 379, 380, 36, 112, 110, 110, 110, - 366, 432, 433, 434, 435, 110, 437, 438, 439, 440, - 57, 4, 24, 110, 472, 472, 110, 451, 384, 114, - 110, 110, 110, 409, 410, 110, 110, 110, 110, 57, - 116, 417, 490, 490, 113, 113, 113, 304, 113, 110, - 426, 113, 110, 310, 110, 411, 113, 21, 479, 113, - 481, 482, 113, 419, 420, 421, 113, 324, 325, 425, - 36, 116, 21, 113, 113, 431, 21, 453, 110, 113, - 110, 76, 21, 21, 0, 0, 95, 95, 95, 95, - 23, 39, 120, 355, 50, 451, 354, 59, 2, 17, - 366, 425, 389, -1, -1, -1, 363, -1, 365, 5, - 6, 487, 369, 195, -1, -1, -1, -1, -1, -1, - -1, 378, 379, 380, 500, -1, 22, -1, 24, -1, - 26, 507, -1, -1, -1, 511, 512, -1, -1, -1, - -1, -1, 38, 39, -1, -1, -1, -1, -1, -1, - -1, -1, 409, 410, -1, -1, -1, -1, -1, -1, - 417, -1, -1, -1, -1, -1, -1, -1, -1, 426, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 78, 79, 80, 81, 82, 83, 84, 85, - 86, 87, 88, 89, 90, 91, 453, -1, -1, -1, - -1, 97, -1, 99, 100, 101, 102, -1, 104, 105, - 106, -1, -1, -1, -1, -1, -1, -1, 114, -1, - -1, 117, -1, 119, -1, -1, 122, -1, -1, -1, - 487, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 500, -1, -1, -1, -1, -1, -1, - 507, -1, -1, -1, 511, 512, 5, 6, -1, 8, - 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, - 19, 20, 21, 22, -1, 24, 5, 6, -1, 8, - 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, - 19, 20, 21, 22, -1, 24, -1, -1, -1, 48, - -1, -1, -1, -1, 20, -1, 22, -1, 24, -1, - -1, -1, -1, -1, -1, 31, 32, 33, -1, 48, - 3, 4, 5, 6, 7, 41, 42, 43, 44, 45, - 46, 47, -1, -1, 50, 51, -1, -1, -1, 22, - -1, 24, 58, 26, 27, 28, 62, -1, -1, -1, - -1, -1, -1, -1, -1, 38, 39, -1, -1, -1, - -1, -1, 111, -1, -1, 114, -1, -1, 117, -1, - 119, 120, -1, -1, -1, -1, -1, -1, 61, -1, - -1, -1, 111, -1, -1, 114, -1, -1, 117, -1, - 119, 120, -1, -1, -1, 78, 79, 80, 81, 82, - 83, 84, 85, 86, 87, 88, 89, 90, 91, -1, - -1, -1, -1, -1, 97, -1, 99, 100, 101, 102, - -1, 104, 105, 106, 3, 4, -1, -1, 7, -1, - -1, -1, -1, -1, 117, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 26, 27, 28, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 38, - 39, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 61, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 78, - 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, - 89, 90, 91, -1, -1, -1, -1, -1, 97, -1, - 99, 100, 101, 102, -1, 104, 105, 106, -1, -1, - -1, -1, -1, -1, -1, -1, 5, 6, 117, 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, 37, -1, - -1, -1, -1, -1, -1, -1, -1, 5, 6, 48, - 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, 37, - -1, -1, -1, -1, -1, -1, -1, -1, 5, 6, - 48, 8, 9, 10, 11, 12, 13, 14, 15, 16, - 17, 18, 19, 20, 21, 22, -1, 24, -1, -1, - -1, -1, 111, -1, -1, 114, -1, -1, 117, -1, - 119, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 48, 5, 6, -1, 8, 9, 10, 11, 12, - 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, - -1, 24, -1, 111, -1, -1, 114, -1, -1, 117, - -1, 119, -1, -1, 37, -1, -1, -1, -1, -1, - -1, -1, -1, 5, 6, 48, 8, 9, 10, 11, - 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, - 22, -1, 24, -1, 111, -1, -1, 114, -1, 116, - 117, -1, 119, -1, -1, 37, -1, -1, -1, -1, - -1, -1, -1, -1, 5, 6, 48, 8, 9, 10, - 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, - 21, 22, -1, 24, -1, -1, -1, -1, 111, -1, - -1, 114, -1, -1, 117, -1, 119, -1, -1, -1, - -1, -1, -1, -1, -1, 5, 6, 48, 8, 9, - 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, - 20, 21, 22, -1, 24, -1, -1, -1, -1, 111, - -1, -1, 114, -1, -1, 117, -1, 119, -1, -1, - -1, -1, -1, -1, -1, -1, 5, 6, 48, 8, - 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, - 19, 20, 21, 22, -1, 24, -1, -1, -1, -1, - 111, -1, -1, 114, -1, -1, 117, -1, 119, -1, - -1, -1, -1, -1, -1, -1, -1, 5, 6, 48, - 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, - 18, 19, 20, 21, 22, -1, 24, -1, -1, -1, - -1, 111, -1, -1, 114, -1, -1, 117, -1, 119, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 48, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 111, -1, -1, 114, -1, -1, 117, -1, - 119, -1, -1, -1, -1, 35, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 49, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 59, - 60, -1, -1, 111, -1, -1, 114, -1, -1, 117, - -1, 119, 72, 73, 74, 75, 76, 77, 78, 79, - 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, - 90, 91, 92, 93, 94, -1, -1, 97, 98, 99, - 100, 101, 102, 103, 104, 105, 106, 107, 108 +/* YYPGOTO[NTERM-NUM]. */ +static const short int yypgoto[] = +{ + -410, -410, -410, 309, 310, 311, 312, -129, -128, -398, + -410, 369, 386, -118, -410, -223, 55, -410, -244, -410, + -50, -410, -37, -410, -64, 293, -410, -102, 221, -192, + 53, -410, -410, -410, -410, -410, -410, -410, 361, -410, + -410, -410, -410, 2, -410, 58, -410, -410, 356, -410, + -410, -410, -410, -410, 416, -410, -410, -409, -57, 62, + -105, -410, 401, -410, -410, -410, -410, -410, 54, -4, + -410, -410, 30, -410, -410 }; -/* -*-C-*- Note some compilers choke on comments on `#line' lines. */ -#line 3 "/usr/share/bison.simple" -/* This file comes from bison-1.28. */ - -/* 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 */ +/* 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 -128 +static const short int yytable[] = +{ + 89, 222, 223, 106, 310, 26, 332, 333, 39, 94, + 198, 397, 201, 225, 53, 42, 89, 4, 365, 399, + 208, 119, 202, 211, 214, 215, 216, 217, 218, 219, + 220, 221, 397, 367, 351, 7, 8, 9, 10, 54, + 12, 55, 400, 26, 56, 228, 352, 387, 232, 233, + 244, 123, 234, 235, 236, 237, 238, 239, 119, 212, + 366, 243, 214, 215, 216, 217, 218, 219, 220, 221, + 388, 213, 180, 181, 182, 366, 491, 343, 345, 46, + 47, 48, 499, 353, -65, 29, 123, 397, 207, 121, + 39, 207, 507, 123, 501, 410, 247, 397, 49, 95, + 107, 108, 248, 398, 51, 43, 361, 52, 110, 111, + 112, 226, 227, 207, 229, 230, 207, 207, -127, 58, + 207, 207, 207, 207, 207, 207, 240, 241, 242, 207, + 490, 59, 20, 60, 21, 279, 280, 281, 173, 174, + 277, 328, 64, 5, 245, 246, 431, 252, 253, 6, + 301, -25, -25, -24, -24, 301, 301, -23, -23, 7, + 8, 9, 10, 11, 12, 13, 283, 301, 500, -22, + -22, 62, 301, 254, 255, 306, -66, 103, 99, 100, + 14, 101, 102, 301, 301, 301, 114, 115, 89, 122, + 116, 451, 172, 452, 326, 214, 215, 216, 217, 218, + 219, 220, 221, 176, 177, 178, 199, 89, 327, 207, + 373, 200, 375, 376, 377, 203, 209, -29, -28, -27, + 383, -26, 257, 281, 30, 31, 32, 33, 34, 35, + 36, -32, 391, 392, 393, 394, 395, 396, -33, 258, + 287, 288, 307, 309, 313, 401, 402, 403, 404, 301, + 312, 315, 314, 316, 317, 301, 318, 329, 346, 319, + 359, 320, 321, 325, 387, 330, 409, 411, 334, 301, + 301, 335, 356, 336, 303, 304, 337, 372, 207, 374, + 207, 207, 207, 378, 379, 354, 305, 338, 207, 339, + 347, 311, 357, 412, 415, 438, 348, 429, 430, 349, + 350, 362, 322, 323, 324, 363, 368, 371, 301, 443, + 301, 380, 381, 382, 301, 386, 456, 457, 458, 283, + 413, 419, 421, 301, 301, 301, 471, 433, 472, 422, + 423, 207, 463, 464, 465, 466, 434, 467, 468, 469, + 470, 427, 474, 366, 489, 222, 223, 435, 476, 428, + 436, 437, 461, 439, 301, 301, 493, 440, 441, 442, + 445, 450, 301, 222, 223, 453, 455, 473, 364, 477, + 494, 301, 475, 479, 370, 480, 207, 481, 482, 495, + 483, 496, 497, 502, 207, 207, 207, 484, 384, 385, + 207, 485, 486, 487, 488, 503, 462, 504, 301, 506, + 505, 509, 510, 511, 513, 514, 163, 164, 165, 166, + 97, 57, 407, 105, 406, 205, 207, 113, 276, 27, + 45, 432, 418, 459, 0, 0, 0, 414, 0, 416, + 65, 66, 301, 420, 0, 0, 0, 0, 0, 0, + 0, 0, 424, 425, 426, 301, 0, 20, 0, 21, + 0, 259, 301, 0, 0, 0, 301, 301, 0, 0, + 0, 0, 0, 260, 261, 0, 0, 0, 0, 0, + 0, 0, 0, 446, 447, 0, 0, 0, 0, 0, + 0, 454, 0, 0, 0, 0, 0, 0, 0, 0, + 460, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 134, 135, 136, 137, 138, 139, 140, + 141, 142, 143, 144, 145, 146, 147, 478, 0, 0, + 0, 0, 262, 0, 263, 264, 155, 156, 0, 265, + 266, 267, 0, 0, 0, 0, 0, 0, 0, 268, + 0, 0, 269, 0, 270, 0, 0, 271, 0, 0, + 0, 498, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 508, 0, 0, 0, 0, 0, + 0, 512, 0, 0, 0, 515, 516, 65, 66, 0, + 117, 68, 69, 70, 71, 72, 73, 74, 75, 76, + 77, 78, 79, 80, 20, 0, 21, 65, 66, 0, + 117, 183, 184, 185, 186, 187, 188, 189, 190, 191, + 192, 193, 79, 80, 20, 0, 21, 0, 0, 0, + 81, 0, 0, 0, 0, -35, 0, 20, 0, 21, + 0, 0, 0, 0, 0, 0, 6, -35, -35, 0, + 81, 289, 290, 65, 66, 291, -35, -35, -35, -35, + -35, -35, -35, 0, 0, -35, 22, 0, 0, 0, + 20, 0, 21, 23, 292, 293, 294, 24, 0, 0, + 0, 0, 0, 0, 0, 0, 295, 296, 0, 0, + 0, 0, 0, 82, 0, 0, 83, 0, 0, 84, + 0, 85, 118, 0, 0, 0, 0, 0, 0, 297, + 0, 0, 0, 82, 0, 0, 83, 0, 0, 84, + 0, 85, 344, 0, 0, 0, 134, 135, 136, 137, + 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, + 0, 0, 0, 0, 0, 262, 0, 263, 264, 155, + 156, 0, 265, 266, 267, 289, 290, 0, 0, 291, + 0, 0, 0, 0, 0, 298, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 292, 293, + 294, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 295, 296, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 297, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + 144, 145, 146, 147, 0, 0, 0, 0, 0, 262, + 0, 263, 264, 155, 156, 0, 265, 266, 267, 0, + 0, 0, 0, 0, 0, 0, 0, 65, 66, 298, + 117, 68, 69, 70, 71, 72, 73, 74, 75, 76, + 77, 78, 79, 80, 20, 0, 21, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 204, + 0, 0, 0, 0, 0, 0, 0, 0, 65, 66, + 81, 117, 68, 69, 70, 71, 72, 73, 74, 75, + 76, 77, 78, 79, 80, 20, 0, 21, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 282, 0, 0, 0, 0, 0, 0, 0, 0, 65, + 66, 81, 117, 183, 184, 185, 186, 187, 188, 189, + 190, 191, 192, 193, 79, 80, 20, 0, 21, 0, + 0, 0, 0, 82, 0, 0, 83, 0, 0, 84, + 0, 85, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 81, 65, 66, 0, 117, 68, 69, 70, + 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, + 20, 0, 21, 0, 82, 0, 0, 83, 0, 0, + 84, 0, 85, 0, 0, 358, 0, 0, 0, 0, + 0, 0, 0, 0, 65, 66, 81, 117, 68, 69, + 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 20, 0, 21, 0, 82, 0, 0, 83, 0, + 340, 84, 0, 85, 0, 0, 405, 0, 0, 0, + 0, 0, 0, 0, 0, 65, 66, 81, 67, 68, + 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, + 79, 80, 20, 0, 21, 0, 0, 0, 0, 82, + 0, 0, 83, 0, 0, 84, 0, 85, 0, 0, + 0, 0, 0, 0, 0, 0, 65, 66, 81, 117, + 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, + 78, 79, 80, 20, 0, 21, 0, 0, 0, 0, + 82, 0, 0, 83, 0, 0, 84, 0, 85, 0, + 0, 0, 0, 0, 0, 0, 0, 65, 66, 81, + 117, 183, 184, 185, 186, 187, 188, 189, 190, 191, + 192, 193, 79, 80, 20, 0, 21, 0, 0, 0, + 0, 82, 0, 0, 83, 0, 0, 84, 0, 85, + 0, 0, 0, 0, 0, 0, 0, 0, 65, 66, + 81, 210, 68, 69, 70, 71, 72, 73, 74, 75, + 76, 77, 78, 79, 80, 20, 0, 21, 0, 0, + 0, 0, 82, 0, 0, 83, 0, 0, 84, 0, + 85, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 81, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 82, 0, 0, 83, 0, 0, 84, + 0, 85, 0, 0, 0, 0, 124, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 125, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 126, 127, 0, 0, 82, 0, 0, 83, 0, 0, + 84, 0, 85, 128, 129, 130, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, + 145, 146, 147, 148, 149, 150, 0, 0, 151, 152, + 153, 154, 155, 156, 157, 158, 159, 160, 161, 162 +}; -#ifdef YYSTACK_USE_ALLOCA -#define YYSTACK_ALLOC alloca -#else -#define YYSTACK_ALLOC malloc -#endif +static const short int yycheck[] = +{ + 37, 130, 130, 53, 227, 3, 250, 251, 23, 29, + 112, 110, 110, 131, 20, 30, 53, 0, 15, 118, + 125, 85, 120, 128, 10, 11, 12, 13, 14, 15, + 16, 17, 110, 15, 278, 41, 42, 43, 44, 45, + 46, 47, 120, 41, 50, 150, 116, 34, 153, 154, + 168, 121, 157, 158, 159, 160, 161, 162, 122, 9, + 57, 166, 10, 11, 12, 13, 14, 15, 16, 17, + 57, 21, 109, 110, 111, 57, 474, 269, 270, 52, + 53, 54, 491, 118, 112, 61, 121, 110, 125, 87, + 23, 128, 501, 121, 492, 118, 110, 110, 71, 119, + 32, 33, 116, 116, 109, 120, 298, 61, 55, 56, + 57, 148, 149, 150, 151, 152, 153, 154, 0, 109, + 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, + 116, 45, 22, 47, 24, 199, 200, 201, 55, 56, + 197, 246, 4, 25, 95, 96, 390, 27, 28, 31, + 207, 3, 4, 3, 4, 212, 213, 3, 4, 41, + 42, 43, 44, 45, 46, 47, 203, 224, 116, 3, + 4, 24, 229, 3, 4, 225, 112, 114, 109, 109, + 62, 109, 109, 240, 241, 242, 4, 4, 225, 112, + 4, 414, 24, 416, 244, 10, 11, 12, 13, 14, + 15, 16, 17, 4, 24, 24, 115, 244, 245, 246, + 315, 115, 317, 318, 319, 112, 59, 4, 4, 4, + 325, 4, 4, 287, 64, 65, 66, 67, 68, 69, + 70, 7, 334, 335, 336, 337, 338, 339, 7, 7, + 110, 113, 110, 110, 110, 347, 348, 349, 350, 306, + 114, 110, 36, 110, 110, 312, 110, 24, 24, 110, + 63, 110, 110, 110, 34, 110, 24, 21, 112, 326, + 327, 112, 110, 112, 212, 213, 112, 314, 315, 316, + 317, 318, 319, 320, 321, 283, 224, 112, 325, 112, + 112, 229, 113, 21, 4, 397, 112, 24, 4, 112, + 112, 110, 240, 241, 242, 110, 110, 114, 365, 57, + 367, 110, 110, 110, 371, 110, 421, 422, 423, 356, + 112, 110, 110, 380, 381, 382, 4, 36, 24, 110, + 110, 368, 434, 435, 436, 437, 110, 439, 440, 441, + 442, 112, 114, 57, 21, 474, 474, 110, 453, 386, + 110, 110, 113, 110, 411, 412, 36, 110, 110, 110, + 110, 110, 419, 492, 492, 110, 110, 110, 306, 116, + 116, 428, 113, 113, 312, 113, 413, 110, 113, 481, + 110, 483, 484, 21, 421, 422, 423, 110, 326, 327, + 427, 113, 113, 113, 113, 113, 433, 113, 455, 110, + 113, 21, 110, 76, 21, 21, 97, 97, 97, 97, + 41, 25, 357, 52, 356, 122, 453, 61, 197, 3, + 19, 391, 368, 427, -1, -1, -1, 365, -1, 367, + 5, 6, 489, 371, -1, -1, -1, -1, -1, -1, + -1, -1, 380, 381, 382, 502, -1, 22, -1, 24, + -1, 26, 509, -1, -1, -1, 513, 514, -1, -1, + -1, -1, -1, 38, 39, -1, -1, -1, -1, -1, + -1, -1, -1, 411, 412, -1, -1, -1, -1, -1, + -1, 419, -1, -1, -1, -1, -1, -1, -1, -1, + 428, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 78, 79, 80, 81, 82, 83, 84, + 85, 86, 87, 88, 89, 90, 91, 455, -1, -1, + -1, -1, 97, -1, 99, 100, 101, 102, -1, 104, + 105, 106, -1, -1, -1, -1, -1, -1, -1, 114, + -1, -1, 117, -1, 119, -1, -1, 122, -1, -1, + -1, 489, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 502, -1, -1, -1, -1, -1, + -1, 509, -1, -1, -1, 513, 514, 5, 6, -1, + 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, + 18, 19, 20, 21, 22, -1, 24, 5, 6, -1, + 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, + 18, 19, 20, 21, 22, -1, 24, -1, -1, -1, + 48, -1, -1, -1, -1, 20, -1, 22, -1, 24, + -1, -1, -1, -1, -1, -1, 31, 32, 33, -1, + 48, 3, 4, 5, 6, 7, 41, 42, 43, 44, + 45, 46, 47, -1, -1, 50, 51, -1, -1, -1, + 22, -1, 24, 58, 26, 27, 28, 62, -1, -1, + -1, -1, -1, -1, -1, -1, 38, 39, -1, -1, + -1, -1, -1, 111, -1, -1, 114, -1, -1, 117, + -1, 119, 120, -1, -1, -1, -1, -1, -1, 61, + -1, -1, -1, 111, -1, -1, 114, -1, -1, 117, + -1, 119, 120, -1, -1, -1, 78, 79, 80, 81, + 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, + -1, -1, -1, -1, -1, 97, -1, 99, 100, 101, + 102, -1, 104, 105, 106, 3, 4, -1, -1, 7, + -1, -1, -1, -1, -1, 117, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 26, 27, + 28, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 38, 39, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 61, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, + 88, 89, 90, 91, -1, -1, -1, -1, -1, 97, + -1, 99, 100, 101, 102, -1, 104, 105, 106, -1, + -1, -1, -1, -1, -1, -1, -1, 5, 6, 117, + 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, 37, + -1, -1, -1, -1, -1, -1, -1, -1, 5, 6, + 48, 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, + 37, -1, -1, -1, -1, -1, -1, -1, -1, 5, + 6, 48, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, -1, 24, -1, + -1, -1, -1, 111, -1, -1, 114, -1, -1, 117, + -1, 119, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 48, 5, 6, -1, 8, 9, 10, 11, + 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, + 22, -1, 24, -1, 111, -1, -1, 114, -1, -1, + 117, -1, 119, -1, -1, 37, -1, -1, -1, -1, + -1, -1, -1, -1, 5, 6, 48, 8, 9, 10, + 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, + 21, 22, -1, 24, -1, 111, -1, -1, 114, -1, + 116, 117, -1, 119, -1, -1, 37, -1, -1, -1, + -1, -1, -1, -1, -1, 5, 6, 48, 8, 9, + 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, + 20, 21, 22, -1, 24, -1, -1, -1, -1, 111, + -1, -1, 114, -1, -1, 117, -1, 119, -1, -1, + -1, -1, -1, -1, -1, -1, 5, 6, 48, 8, + 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, + 19, 20, 21, 22, -1, 24, -1, -1, -1, -1, + 111, -1, -1, 114, -1, -1, 117, -1, 119, -1, + -1, -1, -1, -1, -1, -1, -1, 5, 6, 48, + 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, + 18, 19, 20, 21, 22, -1, 24, -1, -1, -1, + -1, 111, -1, -1, 114, -1, -1, 117, -1, 119, + -1, -1, -1, -1, -1, -1, -1, -1, 5, 6, + 48, 8, 9, 10, 11, 12, 13, 14, 15, 16, + 17, 18, 19, 20, 21, 22, -1, 24, -1, -1, + -1, -1, 111, -1, -1, 114, -1, -1, 117, -1, + 119, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 48, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 111, -1, -1, 114, -1, -1, 117, + -1, 119, -1, -1, -1, -1, 35, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 49, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 59, 60, -1, -1, 111, -1, -1, 114, -1, -1, + 117, -1, 119, 72, 73, 74, 75, 76, 77, 78, + 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, + 89, 90, 91, 92, 93, 94, -1, -1, 97, 98, + 99, 100, 101, 102, 103, 104, 105, 106, 107, 108 +}; -/* 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. */ +/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing + symbol of state STATE-NUM. */ +static const unsigned char yystos[] = +{ + 0, 154, 155, 156, 0, 25, 31, 41, 42, 43, + 44, 45, 46, 47, 62, 135, 173, 175, 177, 184, + 22, 24, 51, 58, 62, 134, 166, 177, 178, 61, + 64, 65, 66, 67, 68, 69, 70, 136, 171, 23, + 185, 186, 30, 120, 174, 185, 52, 53, 54, 71, + 163, 109, 61, 20, 45, 47, 50, 135, 109, 45, + 47, 176, 24, 161, 4, 5, 6, 8, 9, 10, + 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, + 21, 48, 111, 114, 117, 119, 124, 143, 144, 145, + 146, 147, 166, 181, 29, 119, 172, 134, 189, 109, + 109, 109, 109, 114, 164, 161, 143, 32, 33, 153, + 153, 153, 153, 171, 4, 4, 4, 8, 120, 147, + 148, 166, 112, 121, 35, 49, 59, 60, 72, 73, + 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, + 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, + 94, 97, 98, 99, 100, 101, 102, 103, 104, 105, + 106, 107, 108, 126, 127, 128, 129, 187, 193, 194, + 196, 197, 24, 55, 56, 162, 4, 24, 24, 165, + 145, 145, 145, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 130, 131, 133, 145, 150, 115, + 115, 110, 120, 112, 37, 148, 149, 145, 183, 59, + 8, 183, 9, 21, 10, 11, 12, 13, 14, 15, + 16, 17, 130, 131, 132, 136, 145, 145, 183, 145, + 145, 190, 183, 183, 183, 183, 183, 183, 183, 183, + 145, 145, 145, 183, 136, 95, 96, 110, 116, 159, + 160, 158, 27, 28, 3, 4, 125, 4, 7, 26, + 38, 39, 97, 99, 100, 104, 105, 106, 114, 117, + 119, 122, 126, 127, 128, 129, 151, 181, 157, 147, + 147, 147, 37, 145, 168, 169, 170, 110, 113, 3, + 4, 7, 26, 27, 28, 38, 39, 61, 117, 151, + 180, 181, 182, 182, 182, 182, 143, 110, 138, 110, + 138, 182, 114, 110, 36, 110, 110, 110, 110, 110, + 110, 110, 182, 182, 182, 110, 143, 145, 183, 24, + 110, 141, 141, 141, 112, 112, 112, 112, 112, 112, + 116, 150, 152, 152, 120, 152, 24, 112, 112, 112, + 112, 141, 116, 118, 166, 167, 110, 113, 37, 63, + 179, 152, 110, 110, 182, 15, 57, 15, 110, 195, + 182, 114, 145, 183, 145, 183, 183, 183, 145, 145, + 110, 110, 110, 183, 182, 182, 110, 34, 57, 139, + 142, 150, 150, 150, 150, 150, 150, 110, 116, 118, + 120, 150, 150, 150, 150, 37, 168, 139, 140, 24, + 118, 21, 21, 112, 182, 4, 182, 183, 191, 110, + 182, 110, 110, 110, 182, 182, 182, 112, 145, 24, + 4, 141, 195, 36, 110, 110, 110, 110, 150, 110, + 110, 110, 110, 57, 137, 110, 182, 182, 191, 192, + 110, 138, 138, 110, 182, 110, 183, 183, 183, 192, + 182, 113, 145, 150, 150, 150, 150, 150, 150, 150, + 150, 4, 24, 110, 114, 113, 183, 116, 182, 113, + 113, 110, 113, 110, 110, 113, 113, 113, 113, 21, + 116, 132, 188, 36, 116, 150, 150, 150, 182, 180, + 116, 132, 21, 113, 113, 113, 110, 180, 182, 21, + 110, 76, 182, 21, 21, 182, 182 +}; #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 yyerrlab1 -/* 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 yyerrorlab + + +/* 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); \ - yychar1 = YYTRANSLATE (yychar); \ + { \ + yychar = (Token); \ + yylval = (Value); \ + yytoken = YYTRANSLATE (yychar); \ YYPOPSTACK; \ goto yybackup; \ } \ else \ - { yyerror ("syntax error: cannot back up"); YYERROR; } \ + { \ + yyerror (YY_("syntax error: cannot back up")); \ + YYERROR; \ + } \ while (0) + #define YYTERROR 1 #define YYERRCODE 256 -#ifndef YYPURE -#define YYLEX yylex() + +/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. + If N is 0, then set CURRENT to the empty location which ends + the previous symbol: RHS[0] (always defined). */ + +#define YYRHSLOC(Rhs, K) ((Rhs)[K]) +#ifndef YYLLOC_DEFAULT +# define YYLLOC_DEFAULT(Current, Rhs, N) \ + do \ + if (N) \ + { \ + (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ + (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ + (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ + (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ + } \ + else \ + { \ + (Current).first_line = (Current).last_line = \ + YYRHSLOC (Rhs, 0).last_line; \ + (Current).first_column = (Current).last_column = \ + YYRHSLOC (Rhs, 0).last_column; \ + } \ + while (0) #endif -#ifdef YYPURE -#ifdef YYLSP_NEEDED -#ifdef YYLEX_PARAM -#define YYLEX yylex(&yylval, &yylloc, YYLEX_PARAM) -#else -#define YYLEX yylex(&yylval, &yylloc) + +/* YY_LOCATION_PRINT -- Print the location on the stream. + This macro was not mandated originally: define only if we know + we won't break user code: when these are the locations we know. */ + +#ifndef YY_LOCATION_PRINT +# if YYLTYPE_IS_TRIVIAL +# define YY_LOCATION_PRINT(File, Loc) \ + fprintf (File, "%d.%d-%d.%d", \ + (Loc).first_line, (Loc).first_column, \ + (Loc).last_line, (Loc).last_column) +# else +# define YY_LOCATION_PRINT(File, Loc) ((void) 0) +# endif #endif -#else /* not YYLSP_NEEDED */ + + +/* YYLEX -- calling `yylex' with the right arguments. */ + #ifdef YYLEX_PARAM -#define YYLEX yylex(&yylval, YYLEX_PARAM) +# define YYLEX yylex (YYLEX_PARAM) #else -#define YYLEX yylex(&yylval) -#endif -#endif /* not YYLSP_NEEDED */ +# define YYLEX yylex () #endif -/* If nonreentrant, generate the variables here */ +/* Enable debugging if requested. */ +#if YYDEBUG -#ifndef YYPURE +# ifndef YYFPRINTF +# include /* INFRINGES ON USER NAME SPACE */ +# define YYFPRINTF fprintf +# endif + +# define YYDPRINTF(Args) \ +do { \ + if (yydebug) \ + YYFPRINTF Args; \ +} while (0) + +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ +do { \ + if (yydebug) \ + { \ + YYFPRINTF (stderr, "%s ", Title); \ + yysymprint (stderr, \ + Type, Value); \ + YYFPRINTF (stderr, "\n"); \ + } \ +} while (0) -int yychar; /* the lookahead symbol */ -YYSTYPE yylval; /* the semantic value of the */ - /* lookahead symbol */ +/*------------------------------------------------------------------. +| yy_stack_print -- Print the state stack from its BOTTOM up to its | +| TOP (included). | +`------------------------------------------------------------------*/ -#ifdef YYLSP_NEEDED -YYLTYPE yylloc; /* location data for the lookahead */ - /* symbol */ +#if defined (__STDC__) || defined (__cplusplus) +static void +yy_stack_print (short int *bottom, short int *top) +#else +static void +yy_stack_print (bottom, top) + short int *bottom; + short int *top; #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) -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. */ +/*------------------------------------------------. +| Report that the YYRULE is going to be reduced. | +`------------------------------------------------*/ + +#if defined (__STDC__) || defined (__cplusplus) +static void +yy_reduce_print (int yyrule) +#else +static void +yy_reduce_print (yyrule) + int yyrule; #endif +{ + int yyi; + unsigned long int yylno = yyrline[yyrule]; + YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu), ", + 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]]); +} -/* YYINITDEPTH indicates the initial size of the parser's stacks */ +# 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 YY_SYMBOL_PRINT(Title, Type, Value, Location) +# define YY_STACK_PRINT(Bottom, Top) +# define YY_REDUCE_PRINT(Rule) +#endif /* !YYDEBUG */ + +/* YYINITDEPTH -- initial size of the parser's stacks. */ #ifndef YYINITDEPTH -#define YYINITDEPTH 200 +# define YYINITDEPTH 200 #endif -/* YYMAXDEPTH is the maximum size the stacks can grow to - (effective only if the built-in stack extension method is used). */ +/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only + if the built-in stack extension method is used). -#if YYMAXDEPTH == 0 -#undef YYMAXDEPTH -#endif + Do not make this value too large; the results are undefined if + YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) + evaluated with infinite-precision integer arithmetic. */ #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 -/* 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; +#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 char *f = from; - register char *t = to; - register int i = count; + const char *yys = yystr; + + while (*yys++ != '\0') + continue; - while (i-- > 0) - *t++ = *f++; + return yys - yystr - 1; } +# endif +# endif -#else /* __cplusplus */ +# 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 +{ + char *yyd = yydest; + const char *yys = yysrc; -/* This is the most reliable way to avoid incompatibilities - in available built-in functions on various systems. */ -static void -__yy_memcpy (char *to, char *from, unsigned int count) + while ((*yyd++ = *yys++) != '\0') + continue; + + return yyd - 1; +} +# endif +# endif + +# ifndef yytnamerr +/* Copy to YYRES the contents of YYSTR after stripping away unnecessary + quotes and backslashes, so that it's suitable for yyerror. The + heuristic is that double-quoting is unnecessary unless the string + contains an apostrophe, a comma, or backslash (other than + backslash-backslash). YYSTR is taken from yytname. If YYRES is + null, do not copy; instead, return the length of what the result + would have been. */ +static YYSIZE_T +yytnamerr (char *yyres, const char *yystr) { - register char *t = to; - register char *f = from; - register int i = count; + if (*yystr == '"') + { + size_t yyn = 0; + char const *yyp = yystr; + + for (;;) + switch (*++yyp) + { + case '\'': + case ',': + goto do_not_strip_quotes; + + case '\\': + if (*++yyp != '\\') + goto do_not_strip_quotes; + /* Fall through. */ + default: + if (yyres) + yyres[yyn] = *yyp; + yyn++; + break; + + case '"': + if (yyres) + yyres[yyn] = '\0'; + return yyn; + } + do_not_strip_quotes: ; + } - while (i-- > 0) - *t++ = *f++; + if (! yyres) + return yystrlen (yystr); + + return yystpcpy (yyres, yystr) - yyres; } +# endif + +#endif /* YYERROR_VERBOSE */ + + + +#if YYDEBUG +/*--------------------------------. +| Print this symbol on YYOUTPUT. | +`--------------------------------*/ +#if defined (__STDC__) || defined (__cplusplus) +static void +yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep) +#else +static void +yysymprint (yyoutput, yytype, yyvaluep) + FILE *yyoutput; + int yytype; + YYSTYPE *yyvaluep; #endif +{ + /* Pacify ``unused variable'' warnings. */ + (void) yyvaluep; + + if (yytype < YYNTOKENS) + YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); + else + YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); + + +# ifdef YYPRINT + if (yytype < YYNTOKENS) + YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); +# endif + switch (yytype) + { + default: + break; + } + YYFPRINTF (yyoutput, ")"); +} + +#endif /* ! YYDEBUG */ +/*-----------------------------------------------. +| Release the memory associated to this symbol. | +`-----------------------------------------------*/ + +#if defined (__STDC__) || defined (__cplusplus) +static void +yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) +#else +static void +yydestruct (yymsg, yytype, yyvaluep) + const char *yymsg; + int yytype; + YYSTYPE *yyvaluep; #endif +{ + /* Pacify ``unused variable'' warnings. */ + (void) yyvaluep; + + if (!yymsg) + yymsg = "Deleting"; + YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); + + switch (yytype) + { + + default: + break; + } +} -#line 217 "/usr/share/bison.simple" -/* 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. */ +/* Prevent warnings from -Wmissing-prototypes. */ #ifdef YYPARSE_PARAM -#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 */ +# 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 look-ahead symbol. */ +int yychar; + +/* The semantic value of the look-ahead symbol. */ +YYSTYPE yylval; + +/* Number of syntax errors so far. */ +int yynerrs; + + + +/*----------. +| yyparse. | +`----------*/ -/* Prevent warning if -Wstrict-prototypes. */ -#ifdef __GNUC__ #ifdef YYPARSE_PARAM -int yyparse (void *); +# 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) #else -int yyparse (void); +int +yyparse () + #endif #endif - -int -yyparse(YYPARSE_PARAM_ARG) - YYPARSE_PARAM_DECL { - register int yystate; - register int yyn; - 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; + + int yystate; + int yyn; + int yyresult; + /* Number of tokens to shift before error messages enabled. */ + int yyerrstatus; + /* Look-ahead 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; + short int *yyssp; + + /* The semantic value stack. */ + YYSTYPE yyvsa[YYINITDEPTH]; + YYSTYPE *yyvs = yyvsa; + YYSTYPE *yyvsp; + + -#define YYPOPSTACK (yyvsp--, yyssp--, yylsp--) -#else #define YYPOPSTACK (yyvsp--, yyssp--) -#endif - int yystacksize = YYINITDEPTH; - int yyfree_stacks = 0; + YYSIZE_T yystacksize = YYINITDEPTH; -#ifdef YYPURE - int yychar; - YYSTYPE yylval; - int yynerrs; -#ifdef YYLSP_NEEDED - YYLTYPE yylloc; -#endif -#endif + /* The variables used to return semantic value and location from the + action routines. */ + YYSTYPE yyval; - 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; -#if YYDEBUG != 0 - if (yydebug) - fprintf(stderr, "Starting parse\n"); -#endif + YYDPRINTF ((stderr, "Starting parse\n")); yystate = 0; yyerrstatus = 0; @@ -2126,742 +2766,749 @@ so that they stay on the same level as the state stack. The wasted elements are never initialized. */ - yyssp = yyss - 1; + yyssp = yyss; 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: - - *++yyssp = yystate; - - 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 + 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; + + if (yyss + yystacksize - 1 <= yyssp) + { /* Get the current used size of the three stacks, in elements. */ - int size = yyssp - yyss + 1; + YYSIZE_T yysize = yyssp - yyss + 1; #ifdef yyoverflow - /* 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 + { + /* 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 (YY_("memory exhausted"), + &yyss1, yysize * sizeof (*yyssp), + &yyvs1, yysize * sizeof (*yyvsp), - yyss = yyss1; yyvs = yyvs1; -#ifdef YYLSP_NEEDED - yyls = yyls1; -#endif + &yystacksize); + + yyss = yyss1; + yyvs = yyvs1; + } #else /* no yyoverflow */ +# ifndef YYSTACK_RELOCATE + goto yyexhaustedlab; +# else /* Extend the stack our own way. */ - if (yystacksize >= YYMAXDEPTH) - { - yyerror("parser stack overflow"); - if (yyfree_stacks) - { - free (yyss); - free (yyvs); -#ifdef YYLSP_NEEDED - free (yyls); -#endif - } - return 2; - } + if (YYMAXDEPTH <= yystacksize) + goto yyexhaustedlab; yystacksize *= 2; - if (yystacksize > YYMAXDEPTH) + if (YYMAXDEPTH < yystacksize) yystacksize = YYMAXDEPTH; -#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 + + { + short int *yyss1 = yyss; + union yyalloc *yyptr = + (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); + if (! yyptr) + goto yyexhaustedlab; + YYSTACK_RELOCATE (yyss); + YYSTACK_RELOCATE (yyvs); + +# undef YYSTACK_RELOCATE + if (yyss1 != yyssa) + YYSTACK_FREE (yyss1); + } +# endif #endif /* no yyoverflow */ - yyssp = yyss + size - 1; - yyvsp = yyvs + size - 1; -#ifdef YYLSP_NEEDED - yylsp = yyls + size - 1; -#endif + yyssp = yyss + yysize - 1; + yyvsp = yyvs + yysize - 1; -#if YYDEBUG != 0 - if (yydebug) - fprintf(stderr, "Stack size increased to %d\n", yystacksize); -#endif - if (yyssp >= yyss + yystacksize - 1) + YYDPRINTF ((stderr, "Stack size increased to %lu\n", + (unsigned long int) yystacksize)); + + if (yyss + yystacksize - 1 <= yyssp) YYABORT; } -#if YYDEBUG != 0 - if (yydebug) - fprintf(stderr, "Entering state %d\n", yystate); -#endif + YYDPRINTF ((stderr, "Entering state %d\n", yystate)); 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. */ +/* Read a look-ahead token if we need one and don't already have one. */ /* yyresume: */ - /* First try to decide what to do without reference to lookahead token. */ + /* First try to decide what to do without reference to look-ahead token. */ yyn = yypact[yystate]; - if (yyn == YYFLAG) + if (yyn == YYPACT_NINF) goto yydefault; - /* Not known => get a lookahead token if don't already have one. */ - - /* yychar is either YYEMPTY or YYEOF - or a valid token in external form. */ + /* Not known => get a look-ahead token if don't already have one. */ + /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */ if (yychar == YYEMPTY) { -#if YYDEBUG != 0 - if (yydebug) - fprintf(stderr, "Reading a token: "); -#endif + YYDPRINTF ((stderr, "Reading a token: ")); yychar = YYLEX; } - /* Convert token to internal form (in yychar1) for indexing tables with */ - - if (yychar <= 0) /* This means end of input. */ + if (yychar <= YYEOF) { - yychar1 = 0; - yychar = YYEOF; /* Don't call YYLEX any more */ - -#if YYDEBUG != 0 - if (yydebug) - fprintf(stderr, "Now at end of input.\n"); -#endif + yychar = yytoken = YYEOF; + YYDPRINTF ((stderr, "Now at end of input.\n")); } else { - 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 + yytoken = YYTRANSLATE (yychar); + YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); } - yyn += yychar1; - if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1) + /* 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) goto yydefault; - yyn = yytable[yyn]; - - /* 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) { - if (yyn == YYFLAG) + if (yyn == 0 || yyn == YYTABLE_NINF) goto yyerrlab; yyn = -yyn; goto yyreduce; } - else if (yyn == 0) - goto yyerrlab; if (yyn == YYFINAL) YYACCEPT; - /* Shift the lookahead token. */ - -#if YYDEBUG != 0 - if (yydebug) - fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]); -#endif + /* Shift the look-ahead token. */ + YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); /* 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; -/* Do the default action for the current state. */ -yydefault: +/*-----------------------------------------------------------. +| yydefault -- do the default action for the current state. | +`-----------------------------------------------------------*/ +yydefault: yyn = yydefact[yystate]; if (yyn == 0) goto yyerrlab; + goto yyreduce; -/* Do a reduction. yyn is the number of a rule to reduce with. */ + +/*-----------------------------. +| yyreduce -- Do a reduction. | +`-----------------------------*/ 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; - - fprintf (stderr, "Reducing via rule %d (line %d), ", - yyn, yyrline[yyn]); - /* 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 + /* If YYLEN is nonzero, implement the default value of the action: + `$$ = $1'. + 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]; - switch (yyn) { -case 2: -#line 1098 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - if (yyvsp[0].UIntVal > (uint32_t)INT32_MAX) // Outside of my range! + YY_REDUCE_PRINT (yyn); + switch (yyn) + { + case 3: +#line 1098 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + if ((yyvsp[0].UIntVal) > (uint32_t)INT32_MAX) // Outside of my range! GEN_ERROR("Value too large for type!"); - yyval.SIntVal = (int32_t)yyvsp[0].UIntVal; + (yyval.SIntVal) = (int32_t)(yyvsp[0].UIntVal); CHECK_FOR_ERROR -; - break;} -case 4: -#line 1107 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - if (yyvsp[0].UInt64Val > (uint64_t)INT64_MAX) // Outside of my range! +;} + break; + + case 5: +#line 1107 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + if ((yyvsp[0].UInt64Val) > (uint64_t)INT64_MAX) // Outside of my range! GEN_ERROR("Value too large for type!"); - yyval.SInt64Val = (int64_t)yyvsp[0].UInt64Val; + (yyval.SInt64Val) = (int64_t)(yyvsp[0].UInt64Val); CHECK_FOR_ERROR -; - break;} -case 33: -#line 1131 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - yyval.StrVal = yyvsp[-1].StrVal; +;} + break; + + case 34: +#line 1131 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + (yyval.StrVal) = (yyvsp[-1].StrVal); CHECK_FOR_ERROR - ; - break;} -case 34: -#line 1135 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - yyval.StrVal = 0; + ;} + break; + + case 35: +#line 1135 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + (yyval.StrVal) = 0; CHECK_FOR_ERROR - ; - break;} -case 35: -#line 1140 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ yyval.Linkage = GlobalValue::InternalLinkage; ; - break;} -case 36: -#line 1141 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ yyval.Linkage = GlobalValue::LinkOnceLinkage; ; - break;} -case 37: -#line 1142 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ yyval.Linkage = GlobalValue::WeakLinkage; ; - break;} -case 38: -#line 1143 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ yyval.Linkage = GlobalValue::AppendingLinkage; ; - break;} -case 39: -#line 1144 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ yyval.Linkage = GlobalValue::DLLImportLinkage; ; - break;} -case 40: -#line 1145 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ yyval.Linkage = GlobalValue::DLLExportLinkage; ; - break;} -case 41: -#line 1146 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ yyval.Linkage = GlobalValue::ExternalWeakLinkage; ; - break;} -case 42: -#line 1147 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ yyval.Linkage = GlobalValue::ExternalLinkage; ; - break;} -case 43: -#line 1149 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ yyval.UIntVal = CallingConv::C; ; - break;} -case 44: -#line 1150 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ yyval.UIntVal = CallingConv::C; ; - break;} -case 45: -#line 1151 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ yyval.UIntVal = CallingConv::CSRet; ; - break;} -case 46: -#line 1152 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ yyval.UIntVal = CallingConv::Fast; ; - break;} -case 47: -#line 1153 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ yyval.UIntVal = CallingConv::Cold; ; - break;} -case 48: -#line 1154 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ yyval.UIntVal = CallingConv::X86_StdCall; ; - break;} -case 49: -#line 1155 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ yyval.UIntVal = CallingConv::X86_FastCall; ; - break;} -case 50: -#line 1156 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - if ((unsigned)yyvsp[0].UInt64Val != yyvsp[0].UInt64Val) - GEN_ERROR("Calling conv too large!"); - yyval.UIntVal = yyvsp[0].UInt64Val; - CHECK_FOR_ERROR - ; - break;} -case 51: -#line 1165 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ yyval.UIntVal = 0; ; - break;} -case 52: -#line 1166 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - yyval.UIntVal = yyvsp[0].UInt64Val; - if (yyval.UIntVal != 0 && !isPowerOf2_32(yyval.UIntVal)) - GEN_ERROR("Alignment must be a power of two!"); + ;} + break; + + case 36: +#line 1140 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { (yyval.Linkage) = GlobalValue::InternalLinkage; ;} + break; + + case 37: +#line 1141 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { (yyval.Linkage) = GlobalValue::LinkOnceLinkage; ;} + break; + + case 38: +#line 1142 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { (yyval.Linkage) = GlobalValue::WeakLinkage; ;} + break; + + case 39: +#line 1143 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { (yyval.Linkage) = GlobalValue::AppendingLinkage; ;} + break; + + case 40: +#line 1144 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { (yyval.Linkage) = GlobalValue::DLLImportLinkage; ;} + break; + + case 41: +#line 1145 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { (yyval.Linkage) = GlobalValue::DLLExportLinkage; ;} + break; + + case 42: +#line 1146 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { (yyval.Linkage) = GlobalValue::ExternalWeakLinkage; ;} + break; + + case 43: +#line 1147 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { (yyval.Linkage) = GlobalValue::ExternalLinkage; ;} + break; + + case 44: +#line 1149 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { (yyval.UIntVal) = CallingConv::C; ;} + break; + + case 45: +#line 1150 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { (yyval.UIntVal) = CallingConv::C; ;} + break; + + case 46: +#line 1151 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { (yyval.UIntVal) = CallingConv::CSRet; ;} + break; + + case 47: +#line 1152 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { (yyval.UIntVal) = CallingConv::Fast; ;} + break; + + case 48: +#line 1153 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { (yyval.UIntVal) = CallingConv::Cold; ;} + break; + + case 49: +#line 1154 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { (yyval.UIntVal) = CallingConv::X86_StdCall; ;} + break; + + case 50: +#line 1155 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { (yyval.UIntVal) = CallingConv::X86_FastCall; ;} + break; + + case 51: +#line 1156 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + if ((unsigned)(yyvsp[0].UInt64Val) != (yyvsp[0].UInt64Val)) + GEN_ERROR("Calling conv too large!"); + (yyval.UIntVal) = (yyvsp[0].UInt64Val); + CHECK_FOR_ERROR + ;} + break; + + case 52: +#line 1165 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { (yyval.UIntVal) = 0; ;} + break; + + case 53: +#line 1166 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + (yyval.UIntVal) = (yyvsp[0].UInt64Val); + if ((yyval.UIntVal) != 0 && !isPowerOf2_32((yyval.UIntVal))) + GEN_ERROR("Alignment must be a power of two!"); CHECK_FOR_ERROR -; - break;} -case 53: -#line 1172 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ yyval.UIntVal = 0; ; - break;} -case 54: -#line 1173 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - yyval.UIntVal = yyvsp[0].UInt64Val; - if (yyval.UIntVal != 0 && !isPowerOf2_32(yyval.UIntVal)) +;} + break; + + case 54: +#line 1172 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { (yyval.UIntVal) = 0; ;} + break; + + case 55: +#line 1173 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + (yyval.UIntVal) = (yyvsp[0].UInt64Val); + if ((yyval.UIntVal) != 0 && !isPowerOf2_32((yyval.UIntVal))) GEN_ERROR("Alignment must be a power of two!"); CHECK_FOR_ERROR -; - break;} -case 55: -#line 1181 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - for (unsigned i = 0, e = strlen(yyvsp[0].StrVal); i != e; ++i) - if (yyvsp[0].StrVal[i] == '"' || yyvsp[0].StrVal[i] == '\\') +;} + break; + + case 56: +#line 1181 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + for (unsigned i = 0, e = strlen((yyvsp[0].StrVal)); i != e; ++i) + if ((yyvsp[0].StrVal)[i] == '"' || (yyvsp[0].StrVal)[i] == '\\') GEN_ERROR("Invalid character in section name!"); - yyval.StrVal = yyvsp[0].StrVal; + (yyval.StrVal) = (yyvsp[0].StrVal); CHECK_FOR_ERROR -; - break;} -case 56: -#line 1189 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ yyval.StrVal = 0; ; - break;} -case 57: -#line 1190 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ yyval.StrVal = yyvsp[0].StrVal; ; - break;} -case 58: -#line 1195 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{; - break;} -case 59: -#line 1196 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{; - break;} -case 60: -#line 1197 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - CurGV->setSection(yyvsp[0].StrVal); - free(yyvsp[0].StrVal); +;} + break; + + case 57: +#line 1189 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { (yyval.StrVal) = 0; ;} + break; + + case 58: +#line 1190 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { (yyval.StrVal) = (yyvsp[0].StrVal); ;} + break; + + case 59: +#line 1195 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + {;} + break; + + case 60: +#line 1196 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + {;} + break; + + case 61: +#line 1197 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + CurGV->setSection((yyvsp[0].StrVal)); + free((yyvsp[0].StrVal)); CHECK_FOR_ERROR - ; - break;} -case 61: -#line 1202 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - if (yyvsp[0].UInt64Val != 0 && !isPowerOf2_32(yyvsp[0].UInt64Val)) + ;} + break; + + case 62: +#line 1202 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + if ((yyvsp[0].UInt64Val) != 0 && !isPowerOf2_32((yyvsp[0].UInt64Val))) GEN_ERROR("Alignment must be a power of two!"); - CurGV->setAlignment(yyvsp[0].UInt64Val); + CurGV->setAlignment((yyvsp[0].UInt64Val)); CHECK_FOR_ERROR - ; - break;} -case 63: -#line 1216 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ yyval.TypeVal = new PATypeHolder(yyvsp[0].PrimType); ; - break;} -case 65: -#line 1217 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ yyval.TypeVal = new PATypeHolder(yyvsp[0].PrimType); ; - break;} -case 66: -#line 1219 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ + ;} + break; + + case 64: +#line 1216 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { (yyval.TypeVal) = new PATypeHolder((yyvsp[0].PrimType)); ;} + break; + + case 66: +#line 1217 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { (yyval.TypeVal) = new PATypeHolder((yyvsp[0].PrimType)); ;} + break; + + case 67: +#line 1219 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { if (!UpRefs.empty()) - GEN_ERROR("Invalid upreference in type: " + (*yyvsp[0].TypeVal)->getDescription()); - yyval.TypeVal = yyvsp[0].TypeVal; + GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[0].TypeVal))->getDescription()); + (yyval.TypeVal) = (yyvsp[0].TypeVal); CHECK_FOR_ERROR - ; - break;} -case 80: -#line 1231 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - yyval.TypeVal = new PATypeHolder(OpaqueType::get()); + ;} + break; + + case 81: +#line 1231 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + (yyval.TypeVal) = new PATypeHolder(OpaqueType::get()); CHECK_FOR_ERROR - ; - break;} -case 81: -#line 1235 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - yyval.TypeVal = new PATypeHolder(yyvsp[0].PrimType); + ;} + break; + + case 82: +#line 1235 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + (yyval.TypeVal) = new PATypeHolder((yyvsp[0].PrimType)); CHECK_FOR_ERROR - ; - break;} -case 82: -#line 1239 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ // Named types are also simple types... - const Type* tmp = getTypeVal(yyvsp[0].ValIDVal); + ;} + break; + + case 83: +#line 1239 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { // Named types are also simple types... + const Type* tmp = getTypeVal((yyvsp[0].ValIDVal)); CHECK_FOR_ERROR - yyval.TypeVal = new PATypeHolder(tmp); -; - break;} -case 83: -#line 1247 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ // Type UpReference - if (yyvsp[0].UInt64Val > (uint64_t)~0U) GEN_ERROR("Value out of range!"); + (yyval.TypeVal) = new PATypeHolder(tmp); +;} + break; + + case 84: +#line 1247 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { // Type UpReference + if ((yyvsp[0].UInt64Val) > (uint64_t)~0U) GEN_ERROR("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); + UpRefs.push_back(UpRefRecord((unsigned)(yyvsp[0].UInt64Val), OT)); // Add to vector... + (yyval.TypeVal) = new PATypeHolder(OT); UR_OUT("New Upreference!\n"); CHECK_FOR_ERROR - ; - break;} -case 84: -#line 1255 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ // Function derived type? + ;} + break; + + case 85: +#line 1255 "/proj/llvm/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) + for (std::list::iterator I = (yyvsp[-1].TypeList)->begin(), + E = (yyvsp[-1].TypeList)->end(); I != E; ++I) Params.push_back(*I); bool isVarArg = Params.size() && Params.back() == Type::VoidTy; if (isVarArg) Params.pop_back(); - 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 - CHECK_FOR_ERROR - ; - break;} -case 85: -#line 1268 "/Users/resistor/llvm/src/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; - CHECK_FOR_ERROR - ; - break;} -case 86: -#line 1273 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ // Packed array type? - const llvm::Type* ElemTy = yyvsp[-1].TypeVal->get(); - if ((unsigned)yyvsp[-3].UInt64Val != yyvsp[-3].UInt64Val) + (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 + CHECK_FOR_ERROR + ;} + break; + + case 86: +#line 1268 "/proj/llvm/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); + CHECK_FOR_ERROR + ;} + break; + + case 87: +#line 1273 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { // Packed array type? + const llvm::Type* ElemTy = (yyvsp[-1].TypeVal)->get(); + if ((unsigned)(yyvsp[-3].UInt64Val) != (yyvsp[-3].UInt64Val)) GEN_ERROR("Unsigned result not equal to signed result"); if (!ElemTy->isPrimitiveType()) GEN_ERROR("Elemental type of a PackedType must be primitive"); - if (!isPowerOf2_32(yyvsp[-3].UInt64Val)) + if (!isPowerOf2_32((yyvsp[-3].UInt64Val))) GEN_ERROR("Vector length should be a power of 2!"); - yyval.TypeVal = new PATypeHolder(HandleUpRefs(PackedType::get(*yyvsp[-1].TypeVal, (unsigned)yyvsp[-3].UInt64Val))); - delete yyvsp[-1].TypeVal; + (yyval.TypeVal) = new PATypeHolder(HandleUpRefs(PackedType::get(*(yyvsp[-1].TypeVal), (unsigned)(yyvsp[-3].UInt64Val)))); + delete (yyvsp[-1].TypeVal); CHECK_FOR_ERROR - ; - break;} -case 87: -#line 1285 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ // Structure type? + ;} + break; + + case 88: +#line 1285 "/proj/llvm/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) + for (std::list::iterator I = (yyvsp[-1].TypeList)->begin(), + E = (yyvsp[-1].TypeList)->end(); I != E; ++I) Elements.push_back(*I); - yyval.TypeVal = new PATypeHolder(HandleUpRefs(StructType::get(Elements))); - delete yyvsp[-1].TypeList; + (yyval.TypeVal) = new PATypeHolder(HandleUpRefs(StructType::get(Elements))); + delete (yyvsp[-1].TypeList); + CHECK_FOR_ERROR + ;} + break; + + case 89: +#line 1295 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { // Empty structure type? + (yyval.TypeVal) = new PATypeHolder(StructType::get(std::vector())); CHECK_FOR_ERROR - ; - break;} -case 88: -#line 1295 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ // Empty structure type? - yyval.TypeVal = new PATypeHolder(StructType::get(std::vector())); - CHECK_FOR_ERROR - ; - break;} -case 89: -#line 1299 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ // Pointer type? - if (*yyvsp[-1].TypeVal == Type::LabelTy) + ;} + break; + + case 90: +#line 1299 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { // Pointer type? + if (*(yyvsp[-1].TypeVal) == Type::LabelTy) GEN_ERROR("Cannot form a pointer to a basic block"); - yyval.TypeVal = new PATypeHolder(HandleUpRefs(PointerType::get(*yyvsp[-1].TypeVal))); - delete yyvsp[-1].TypeVal; + (yyval.TypeVal) = new PATypeHolder(HandleUpRefs(PointerType::get(*(yyvsp[-1].TypeVal)))); + delete (yyvsp[-1].TypeVal); CHECK_FOR_ERROR - ; - break;} -case 90: -#line 1310 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - yyval.TypeList = new std::list(); - yyval.TypeList->push_back(*yyvsp[0].TypeVal); delete yyvsp[0].TypeVal; + ;} + break; + + case 91: +#line 1310 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + (yyval.TypeList) = new std::list(); + (yyval.TypeList)->push_back(*(yyvsp[0].TypeVal)); delete (yyvsp[0].TypeVal); CHECK_FOR_ERROR - ; - break;} -case 91: -#line 1315 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - (yyval.TypeList=yyvsp[-2].TypeList)->push_back(*yyvsp[0].TypeVal); delete yyvsp[0].TypeVal; + ;} + break; + + case 92: +#line 1315 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + ((yyval.TypeList)=(yyvsp[-2].TypeList))->push_back(*(yyvsp[0].TypeVal)); delete (yyvsp[0].TypeVal); CHECK_FOR_ERROR - ; - break;} -case 93: -#line 1322 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - (yyval.TypeList=yyvsp[-2].TypeList)->push_back(Type::VoidTy); + ;} + break; + + case 94: +#line 1322 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + ((yyval.TypeList)=(yyvsp[-2].TypeList))->push_back(Type::VoidTy); CHECK_FOR_ERROR - ; - break;} -case 94: -#line 1326 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - (yyval.TypeList = new std::list())->push_back(Type::VoidTy); + ;} + break; + + case 95: +#line 1326 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + ((yyval.TypeList) = new std::list())->push_back(Type::VoidTy); CHECK_FOR_ERROR - ; - break;} -case 95: -#line 1330 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - yyval.TypeList = new std::list(); + ;} + break; + + case 96: +#line 1330 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + (yyval.TypeList) = new std::list(); CHECK_FOR_ERROR - ; - break;} -case 96: -#line 1341 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ // Nonempty unsized arr - const ArrayType *ATy = dyn_cast(yyvsp[-3].TypeVal->get()); + ;} + break; + + case 97: +#line 1341 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { // Nonempty unsized arr + const ArrayType *ATy = dyn_cast((yyvsp[-3].TypeVal)->get()); if (ATy == 0) GEN_ERROR("Cannot make array constant with type: '" + - (*yyvsp[-3].TypeVal)->getDescription() + "'!"); + (*(yyvsp[-3].TypeVal))->getDescription() + "'!"); const Type *ETy = ATy->getElementType(); int NumElements = ATy->getNumElements(); // Verify that we have the correct size... - if (NumElements != -1 && NumElements != (int)yyvsp[-1].ConstVector->size()) + if (NumElements != -1 && NumElements != (int)(yyvsp[-1].ConstVector)->size()) GEN_ERROR("Type mismatch: constant sized array initialized with " + - utostr(yyvsp[-1].ConstVector->size()) + " arguments, but has size of " + + utostr((yyvsp[-1].ConstVector)->size()) + " arguments, but has size of " + itostr(NumElements) + "!"); // Verify all elements are correct type! - for (unsigned i = 0; i < yyvsp[-1].ConstVector->size(); i++) { - if (ETy != (*yyvsp[-1].ConstVector)[i]->getType()) + for (unsigned i = 0; i < (yyvsp[-1].ConstVector)->size(); i++) { + if (ETy != (*(yyvsp[-1].ConstVector))[i]->getType()) GEN_ERROR("Element #" + utostr(i) + " is not of type '" + ETy->getDescription() +"' as required!\nIt is of type '"+ - (*yyvsp[-1].ConstVector)[i]->getType()->getDescription() + "'."); + (*(yyvsp[-1].ConstVector))[i]->getType()->getDescription() + "'."); } - yyval.ConstVal = ConstantArray::get(ATy, *yyvsp[-1].ConstVector); - delete yyvsp[-3].TypeVal; delete yyvsp[-1].ConstVector; + (yyval.ConstVal) = ConstantArray::get(ATy, *(yyvsp[-1].ConstVector)); + delete (yyvsp[-3].TypeVal); delete (yyvsp[-1].ConstVector); CHECK_FOR_ERROR - ; - break;} -case 97: -#line 1367 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - const ArrayType *ATy = dyn_cast(yyvsp[-2].TypeVal->get()); + ;} + break; + + case 98: +#line 1367 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + const ArrayType *ATy = dyn_cast((yyvsp[-2].TypeVal)->get()); if (ATy == 0) GEN_ERROR("Cannot make array constant with type: '" + - (*yyvsp[-2].TypeVal)->getDescription() + "'!"); + (*(yyvsp[-2].TypeVal))->getDescription() + "'!"); int NumElements = ATy->getNumElements(); if (NumElements != -1 && NumElements != 0) GEN_ERROR("Type mismatch: constant sized array initialized with 0" " arguments, but has size of " + itostr(NumElements) +"!"); - yyval.ConstVal = ConstantArray::get(ATy, std::vector()); - delete yyvsp[-2].TypeVal; + (yyval.ConstVal) = ConstantArray::get(ATy, std::vector()); + delete (yyvsp[-2].TypeVal); CHECK_FOR_ERROR - ; - break;} -case 98: -#line 1381 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - const ArrayType *ATy = dyn_cast(yyvsp[-2].TypeVal->get()); + ;} + break; + + case 99: +#line 1381 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + const ArrayType *ATy = dyn_cast((yyvsp[-2].TypeVal)->get()); if (ATy == 0) GEN_ERROR("Cannot make array constant with type: '" + - (*yyvsp[-2].TypeVal)->getDescription() + "'!"); + (*(yyvsp[-2].TypeVal))->getDescription() + "'!"); int NumElements = ATy->getNumElements(); const Type *ETy = ATy->getElementType(); - char *EndStr = UnEscapeLexed(yyvsp[0].StrVal, true); - if (NumElements != -1 && NumElements != (EndStr-yyvsp[0].StrVal)) + char *EndStr = UnEscapeLexed((yyvsp[0].StrVal), true); + if (NumElements != -1 && NumElements != (EndStr-(yyvsp[0].StrVal))) GEN_ERROR("Can't build string constant of size " + - itostr((int)(EndStr-yyvsp[0].StrVal)) + + itostr((int)(EndStr-(yyvsp[0].StrVal))) + " when array has size " + itostr(NumElements) + "!"); std::vector Vals; if (ETy == Type::SByteTy) { - for (signed char *C = (signed char *)yyvsp[0].StrVal; C != (signed char *)EndStr; ++C) - Vals.push_back(ConstantSInt::get(ETy, *C)); + for (signed char *C = (signed char *)(yyvsp[0].StrVal); C != (signed char *)EndStr; ++C) + Vals.push_back(ConstantInt::get(ETy, *C)); } else if (ETy == Type::UByteTy) { - for (unsigned char *C = (unsigned char *)yyvsp[0].StrVal; + for (unsigned char *C = (unsigned char *)(yyvsp[0].StrVal); C != (unsigned char*)EndStr; ++C) - Vals.push_back(ConstantUInt::get(ETy, *C)); + Vals.push_back(ConstantInt::get(ETy, *C)); } else { - free(yyvsp[0].StrVal); + free((yyvsp[0].StrVal)); GEN_ERROR("Cannot build string arrays of non byte sized elements!"); } - free(yyvsp[0].StrVal); - yyval.ConstVal = ConstantArray::get(ATy, Vals); - delete yyvsp[-2].TypeVal; - CHECK_FOR_ERROR - ; - break;} -case 99: -#line 1411 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ // Nonempty unsized arr - const PackedType *PTy = dyn_cast(yyvsp[-3].TypeVal->get()); + free((yyvsp[0].StrVal)); + (yyval.ConstVal) = ConstantArray::get(ATy, Vals); + delete (yyvsp[-2].TypeVal); + CHECK_FOR_ERROR + ;} + break; + + case 100: +#line 1411 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { // Nonempty unsized arr + const PackedType *PTy = dyn_cast((yyvsp[-3].TypeVal)->get()); if (PTy == 0) GEN_ERROR("Cannot make packed constant with type: '" + - (*yyvsp[-3].TypeVal)->getDescription() + "'!"); + (*(yyvsp[-3].TypeVal))->getDescription() + "'!"); const Type *ETy = PTy->getElementType(); int NumElements = PTy->getNumElements(); // Verify that we have the correct size... - if (NumElements != -1 && NumElements != (int)yyvsp[-1].ConstVector->size()) + if (NumElements != -1 && NumElements != (int)(yyvsp[-1].ConstVector)->size()) GEN_ERROR("Type mismatch: constant sized packed initialized with " + - utostr(yyvsp[-1].ConstVector->size()) + " arguments, but has size of " + + utostr((yyvsp[-1].ConstVector)->size()) + " arguments, but has size of " + itostr(NumElements) + "!"); // Verify all elements are correct type! - for (unsigned i = 0; i < yyvsp[-1].ConstVector->size(); i++) { - if (ETy != (*yyvsp[-1].ConstVector)[i]->getType()) + for (unsigned i = 0; i < (yyvsp[-1].ConstVector)->size(); i++) { + if (ETy != (*(yyvsp[-1].ConstVector))[i]->getType()) GEN_ERROR("Element #" + utostr(i) + " is not of type '" + ETy->getDescription() +"' as required!\nIt is of type '"+ - (*yyvsp[-1].ConstVector)[i]->getType()->getDescription() + "'."); + (*(yyvsp[-1].ConstVector))[i]->getType()->getDescription() + "'."); } - yyval.ConstVal = ConstantPacked::get(PTy, *yyvsp[-1].ConstVector); - delete yyvsp[-3].TypeVal; delete yyvsp[-1].ConstVector; + (yyval.ConstVal) = ConstantPacked::get(PTy, *(yyvsp[-1].ConstVector)); + delete (yyvsp[-3].TypeVal); delete (yyvsp[-1].ConstVector); CHECK_FOR_ERROR - ; - break;} -case 100: -#line 1437 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - const StructType *STy = dyn_cast(yyvsp[-3].TypeVal->get()); + ;} + break; + + case 101: +#line 1437 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + const StructType *STy = dyn_cast((yyvsp[-3].TypeVal)->get()); if (STy == 0) GEN_ERROR("Cannot make struct constant with type: '" + - (*yyvsp[-3].TypeVal)->getDescription() + "'!"); + (*(yyvsp[-3].TypeVal))->getDescription() + "'!"); - if (yyvsp[-1].ConstVector->size() != STy->getNumContainedTypes()) + if ((yyvsp[-1].ConstVector)->size() != STy->getNumContainedTypes()) GEN_ERROR("Illegal number of initializers for structure type!"); // Check to ensure that constants are compatible with the type initializer! - for (unsigned i = 0, e = yyvsp[-1].ConstVector->size(); i != e; ++i) - if ((*yyvsp[-1].ConstVector)[i]->getType() != STy->getElementType(i)) + for (unsigned i = 0, e = (yyvsp[-1].ConstVector)->size(); i != e; ++i) + if ((*(yyvsp[-1].ConstVector))[i]->getType() != STy->getElementType(i)) GEN_ERROR("Expected type '" + STy->getElementType(i)->getDescription() + "' for element #" + utostr(i) + " of structure initializer!"); - yyval.ConstVal = ConstantStruct::get(STy, *yyvsp[-1].ConstVector); - delete yyvsp[-3].TypeVal; delete yyvsp[-1].ConstVector; + (yyval.ConstVal) = ConstantStruct::get(STy, *(yyvsp[-1].ConstVector)); + delete (yyvsp[-3].TypeVal); delete (yyvsp[-1].ConstVector); CHECK_FOR_ERROR - ; - break;} -case 101: -#line 1458 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - const StructType *STy = dyn_cast(yyvsp[-2].TypeVal->get()); + ;} + break; + + case 102: +#line 1458 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + const StructType *STy = dyn_cast((yyvsp[-2].TypeVal)->get()); if (STy == 0) GEN_ERROR("Cannot make struct constant with type: '" + - (*yyvsp[-2].TypeVal)->getDescription() + "'!"); + (*(yyvsp[-2].TypeVal))->getDescription() + "'!"); if (STy->getNumContainedTypes() != 0) GEN_ERROR("Illegal number of initializers for structure type!"); - yyval.ConstVal = ConstantStruct::get(STy, std::vector()); - delete yyvsp[-2].TypeVal; + (yyval.ConstVal) = ConstantStruct::get(STy, std::vector()); + delete (yyvsp[-2].TypeVal); CHECK_FOR_ERROR - ; - break;} -case 102: -#line 1471 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - const PointerType *PTy = dyn_cast(yyvsp[-1].TypeVal->get()); + ;} + break; + + case 103: +#line 1471 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + const PointerType *PTy = dyn_cast((yyvsp[-1].TypeVal)->get()); if (PTy == 0) GEN_ERROR("Cannot make null pointer constant with type: '" + - (*yyvsp[-1].TypeVal)->getDescription() + "'!"); + (*(yyvsp[-1].TypeVal))->getDescription() + "'!"); - yyval.ConstVal = ConstantPointerNull::get(PTy); - delete yyvsp[-1].TypeVal; + (yyval.ConstVal) = ConstantPointerNull::get(PTy); + delete (yyvsp[-1].TypeVal); CHECK_FOR_ERROR - ; - break;} -case 103: -#line 1481 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - yyval.ConstVal = UndefValue::get(yyvsp[-1].TypeVal->get()); - delete yyvsp[-1].TypeVal; + ;} + break; + + case 104: +#line 1481 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + (yyval.ConstVal) = UndefValue::get((yyvsp[-1].TypeVal)->get()); + delete (yyvsp[-1].TypeVal); CHECK_FOR_ERROR - ; - break;} -case 104: -#line 1486 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - const PointerType *Ty = dyn_cast(yyvsp[-1].TypeVal->get()); + ;} + break; + + case 105: +#line 1486 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + const PointerType *Ty = dyn_cast((yyvsp[-1].TypeVal)->get()); if (Ty == 0) GEN_ERROR("Global const reference must be a pointer type!"); @@ -2875,7 +3522,7 @@ Function *SavedCurFn = CurFun.CurrentFunction; CurFun.CurrentFunction = 0; - Value *V = getValNonImprovising(Ty, yyvsp[0].ValIDVal); + Value *V = getValNonImprovising(Ty, (yyvsp[0].ValIDVal)); CHECK_FOR_ERROR CurFun.CurrentFunction = SavedCurFn; @@ -2890,14 +3537,14 @@ // First check to see if the forward references value is already created! PerModuleInfo::GlobalRefsType::iterator I = - CurModule.GlobalRefs.find(std::make_pair(PT, yyvsp[0].ValIDVal)); + CurModule.GlobalRefs.find(std::make_pair(PT, (yyvsp[0].ValIDVal))); if (I != CurModule.GlobalRefs.end()) { V = I->second; // Placeholder already exists, use it... - yyvsp[0].ValIDVal.destroy(); + (yyvsp[0].ValIDVal).destroy(); } else { std::string Name; - if (yyvsp[0].ValIDVal.Type == ValID::NameVal) Name = yyvsp[0].ValIDVal.Name; + if ((yyvsp[0].ValIDVal).Type == ValID::NameVal) Name = (yyvsp[0].ValIDVal).Name; // Create the forward referenced global. GlobalValue *GV; @@ -2912,149 +3559,160 @@ } // Keep track of the fact that we have a forward ref to recycle it - CurModule.GlobalRefs.insert(std::make_pair(std::make_pair(PT, yyvsp[0].ValIDVal), GV)); + CurModule.GlobalRefs.insert(std::make_pair(std::make_pair(PT, (yyvsp[0].ValIDVal)), GV)); V = GV; } } - yyval.ConstVal = cast(V); - delete yyvsp[-1].TypeVal; // Free the type handle + (yyval.ConstVal) = cast(V); + delete (yyvsp[-1].TypeVal); // Free the type handle CHECK_FOR_ERROR - ; - break;} -case 105: -#line 1547 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - if (yyvsp[-1].TypeVal->get() != yyvsp[0].ConstVal->getType()) + ;} + break; + + case 106: +#line 1547 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + if ((yyvsp[-1].TypeVal)->get() != (yyvsp[0].ConstVal)->getType()) GEN_ERROR("Mismatched types for constant expression!"); - yyval.ConstVal = yyvsp[0].ConstVal; - delete yyvsp[-1].TypeVal; + (yyval.ConstVal) = (yyvsp[0].ConstVal); + delete (yyvsp[-1].TypeVal); CHECK_FOR_ERROR - ; - break;} -case 106: -#line 1554 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - const Type *Ty = yyvsp[-1].TypeVal->get(); + ;} + break; + + case 107: +#line 1554 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + const Type *Ty = (yyvsp[-1].TypeVal)->get(); if (isa(Ty) || Ty == Type::LabelTy || isa(Ty)) GEN_ERROR("Cannot create a null initialized value of this type!"); - yyval.ConstVal = Constant::getNullValue(Ty); - delete yyvsp[-1].TypeVal; + (yyval.ConstVal) = Constant::getNullValue(Ty); + delete (yyvsp[-1].TypeVal); CHECK_FOR_ERROR - ; - break;} -case 107: -#line 1563 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ // integral constants - if (!ConstantSInt::isValueValidForType(yyvsp[-1].PrimType, yyvsp[0].SInt64Val)) + ;} + break; + + case 108: +#line 1563 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { // integral constants + if (!ConstantInt::isValueValidForType((yyvsp[-1].PrimType), (yyvsp[0].SInt64Val))) GEN_ERROR("Constant value doesn't fit in type!"); - yyval.ConstVal = ConstantSInt::get(yyvsp[-1].PrimType, yyvsp[0].SInt64Val); + (yyval.ConstVal) = ConstantInt::get((yyvsp[-1].PrimType), (yyvsp[0].SInt64Val)); CHECK_FOR_ERROR - ; - break;} -case 108: -#line 1569 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ // integral constants - if (!ConstantUInt::isValueValidForType(yyvsp[-1].PrimType, yyvsp[0].UInt64Val)) + ;} + break; + + case 109: +#line 1569 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { // integral constants + if (!ConstantInt::isValueValidForType((yyvsp[-1].PrimType), (yyvsp[0].UInt64Val))) GEN_ERROR("Constant value doesn't fit in type!"); - yyval.ConstVal = ConstantUInt::get(yyvsp[-1].PrimType, yyvsp[0].UInt64Val); + (yyval.ConstVal) = ConstantInt::get((yyvsp[-1].PrimType), (yyvsp[0].UInt64Val)); + CHECK_FOR_ERROR + ;} + break; + + case 110: +#line 1575 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { // Boolean constants + (yyval.ConstVal) = ConstantBool::getTrue(); + CHECK_FOR_ERROR + ;} + break; + + case 111: +#line 1579 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { // Boolean constants + (yyval.ConstVal) = ConstantBool::getFalse(); CHECK_FOR_ERROR - ; - break;} -case 109: -#line 1575 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ // Boolean constants - yyval.ConstVal = ConstantBool::getTrue(); - CHECK_FOR_ERROR - ; - break;} -case 110: -#line 1579 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ // Boolean constants - yyval.ConstVal = ConstantBool::getFalse(); - CHECK_FOR_ERROR - ; - break;} -case 111: -#line 1583 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ // Float & Double constants - if (!ConstantFP::isValueValidForType(yyvsp[-1].PrimType, yyvsp[0].FPVal)) + ;} + break; + + case 112: +#line 1583 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { // Float & Double constants + if (!ConstantFP::isValueValidForType((yyvsp[-1].PrimType), (yyvsp[0].FPVal))) GEN_ERROR("Floating point constant invalid for type!!"); - yyval.ConstVal = ConstantFP::get(yyvsp[-1].PrimType, yyvsp[0].FPVal); + (yyval.ConstVal) = ConstantFP::get((yyvsp[-1].PrimType), (yyvsp[0].FPVal)); CHECK_FOR_ERROR - ; - break;} -case 112: -#line 1591 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - if (!yyvsp[-3].ConstVal->getType()->isFirstClassType()) + ;} + break; + + case 113: +#line 1591 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + if (!(yyvsp[-3].ConstVal)->getType()->isFirstClassType()) GEN_ERROR("cast constant expression from a non-primitive type: '" + - yyvsp[-3].ConstVal->getType()->getDescription() + "'!"); - if (!yyvsp[-1].TypeVal->get()->isFirstClassType()) + (yyvsp[-3].ConstVal)->getType()->getDescription() + "'!"); + if (!(yyvsp[-1].TypeVal)->get()->isFirstClassType()) GEN_ERROR("cast constant expression to a non-primitive type: '" + - yyvsp[-1].TypeVal->get()->getDescription() + "'!"); - yyval.ConstVal = ConstantExpr::getCast(yyvsp[-3].ConstVal, yyvsp[-1].TypeVal->get()); - delete yyvsp[-1].TypeVal; - CHECK_FOR_ERROR - ; - break;} -case 113: -#line 1602 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - if (!isa(yyvsp[-2].ConstVal->getType())) + (yyvsp[-1].TypeVal)->get()->getDescription() + "'!"); + (yyval.ConstVal) = ConstantExpr::getCast((yyvsp[-3].ConstVal), (yyvsp[-1].TypeVal)->get()); + delete (yyvsp[-1].TypeVal); + CHECK_FOR_ERROR + ;} + break; + + case 114: +#line 1602 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + if (!isa((yyvsp[-2].ConstVal)->getType())) GEN_ERROR("GetElementPtr requires a pointer operand!"); // LLVM 1.2 and earlier used ubyte struct indices. Convert any ubyte struct // indices to uint struct indices for compatibility. generic_gep_type_iterator::iterator> - GTI = gep_type_begin(yyvsp[-2].ConstVal->getType(), yyvsp[-1].ValueList->begin(), yyvsp[-1].ValueList->end()), - GTE = gep_type_end(yyvsp[-2].ConstVal->getType(), yyvsp[-1].ValueList->begin(), yyvsp[-1].ValueList->end()); - for (unsigned i = 0, e = yyvsp[-1].ValueList->size(); i != e && GTI != GTE; ++i, ++GTI) + GTI = gep_type_begin((yyvsp[-2].ConstVal)->getType(), (yyvsp[-1].ValueList)->begin(), (yyvsp[-1].ValueList)->end()), + GTE = gep_type_end((yyvsp[-2].ConstVal)->getType(), (yyvsp[-1].ValueList)->begin(), (yyvsp[-1].ValueList)->end()); + for (unsigned i = 0, e = (yyvsp[-1].ValueList)->size(); i != e && GTI != GTE; ++i, ++GTI) if (isa(*GTI)) // Only change struct indices - if (ConstantUInt *CUI = dyn_cast((*yyvsp[-1].ValueList)[i])) + if (ConstantInt *CUI = dyn_cast((*(yyvsp[-1].ValueList))[i])) if (CUI->getType() == Type::UByteTy) - (*yyvsp[-1].ValueList)[i] = ConstantExpr::getCast(CUI, Type::UIntTy); + (*(yyvsp[-1].ValueList))[i] = ConstantExpr::getCast(CUI, Type::UIntTy); const Type *IdxTy = - GetElementPtrInst::getIndexedType(yyvsp[-2].ConstVal->getType(), *yyvsp[-1].ValueList, true); + GetElementPtrInst::getIndexedType((yyvsp[-2].ConstVal)->getType(), *(yyvsp[-1].ValueList), true); if (!IdxTy) GEN_ERROR("Index list invalid for constant getelementptr!"); std::vector IdxVec; - for (unsigned i = 0, e = yyvsp[-1].ValueList->size(); i != e; ++i) - if (Constant *C = dyn_cast((*yyvsp[-1].ValueList)[i])) + for (unsigned i = 0, e = (yyvsp[-1].ValueList)->size(); i != e; ++i) + if (Constant *C = dyn_cast((*(yyvsp[-1].ValueList))[i])) IdxVec.push_back(C); else GEN_ERROR("Indices to constant getelementptr must be constants!"); - delete yyvsp[-1].ValueList; + delete (yyvsp[-1].ValueList); - yyval.ConstVal = ConstantExpr::getGetElementPtr(yyvsp[-2].ConstVal, IdxVec); + (yyval.ConstVal) = ConstantExpr::getGetElementPtr((yyvsp[-2].ConstVal), IdxVec); CHECK_FOR_ERROR - ; - break;} -case 114: -#line 1634 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - if (yyvsp[-5].ConstVal->getType() != Type::BoolTy) + ;} + break; + + case 115: +#line 1634 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + if ((yyvsp[-5].ConstVal)->getType() != Type::BoolTy) GEN_ERROR("Select condition must be of boolean type!"); - if (yyvsp[-3].ConstVal->getType() != yyvsp[-1].ConstVal->getType()) + if ((yyvsp[-3].ConstVal)->getType() != (yyvsp[-1].ConstVal)->getType()) GEN_ERROR("Select operand types must match!"); - yyval.ConstVal = ConstantExpr::getSelect(yyvsp[-5].ConstVal, yyvsp[-3].ConstVal, yyvsp[-1].ConstVal); + (yyval.ConstVal) = ConstantExpr::getSelect((yyvsp[-5].ConstVal), (yyvsp[-3].ConstVal), (yyvsp[-1].ConstVal)); CHECK_FOR_ERROR - ; - break;} -case 115: -#line 1642 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - if (yyvsp[-3].ConstVal->getType() != yyvsp[-1].ConstVal->getType()) + ;} + break; + + case 116: +#line 1642 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + if ((yyvsp[-3].ConstVal)->getType() != (yyvsp[-1].ConstVal)->getType()) GEN_ERROR("Binary operator types must match!"); // HACK: llvm 1.3 and earlier used to emit invalid pointer constant exprs. // To retain backward compatibility with these early compilers, we emit a // cast to the appropriate integer type automatically if we are in the // broken case. See PR424 for more information. - if (!isa(yyvsp[-3].ConstVal->getType())) { - yyval.ConstVal = ConstantExpr::get(yyvsp[-5].BinaryOpVal, yyvsp[-3].ConstVal, yyvsp[-1].ConstVal); + if (!isa((yyvsp[-3].ConstVal)->getType())) { + (yyval.ConstVal) = ConstantExpr::get((yyvsp[-5].BinaryOpVal), (yyvsp[-3].ConstVal), (yyvsp[-1].ConstVal)); } else { const Type *IntPtrTy = 0; switch (CurModule.CurrentModule->getPointerSize()) { @@ -3062,138 +3720,154 @@ case Module::Pointer64: IntPtrTy = Type::LongTy; break; default: GEN_ERROR("invalid pointer binary constant expr!"); } - yyval.ConstVal = ConstantExpr::get(yyvsp[-5].BinaryOpVal, ConstantExpr::getCast(yyvsp[-3].ConstVal, IntPtrTy), - ConstantExpr::getCast(yyvsp[-1].ConstVal, IntPtrTy)); - yyval.ConstVal = ConstantExpr::getCast(yyval.ConstVal, yyvsp[-3].ConstVal->getType()); + (yyval.ConstVal) = ConstantExpr::get((yyvsp[-5].BinaryOpVal), ConstantExpr::getCast((yyvsp[-3].ConstVal), IntPtrTy), + ConstantExpr::getCast((yyvsp[-1].ConstVal), IntPtrTy)); + (yyval.ConstVal) = ConstantExpr::getCast((yyval.ConstVal), (yyvsp[-3].ConstVal)->getType()); } CHECK_FOR_ERROR - ; - break;} -case 116: -#line 1664 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - if (yyvsp[-3].ConstVal->getType() != yyvsp[-1].ConstVal->getType()) + ;} + break; + + case 117: +#line 1664 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + if ((yyvsp[-3].ConstVal)->getType() != (yyvsp[-1].ConstVal)->getType()) GEN_ERROR("Logical operator types must match!"); - if (!yyvsp[-3].ConstVal->getType()->isIntegral()) { - if (!isa(yyvsp[-3].ConstVal->getType()) || - !cast(yyvsp[-3].ConstVal->getType())->getElementType()->isIntegral()) + if (!(yyvsp[-3].ConstVal)->getType()->isIntegral()) { + if (!isa((yyvsp[-3].ConstVal)->getType()) || + !cast((yyvsp[-3].ConstVal)->getType())->getElementType()->isIntegral()) GEN_ERROR("Logical operator requires integral operands!"); } - yyval.ConstVal = ConstantExpr::get(yyvsp[-5].BinaryOpVal, yyvsp[-3].ConstVal, yyvsp[-1].ConstVal); + (yyval.ConstVal) = ConstantExpr::get((yyvsp[-5].BinaryOpVal), (yyvsp[-3].ConstVal), (yyvsp[-1].ConstVal)); CHECK_FOR_ERROR - ; - break;} -case 117: -#line 1675 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - if (yyvsp[-3].ConstVal->getType() != yyvsp[-1].ConstVal->getType()) + ;} + break; + + case 118: +#line 1675 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + if ((yyvsp[-3].ConstVal)->getType() != (yyvsp[-1].ConstVal)->getType()) GEN_ERROR("setcc operand types must match!"); - yyval.ConstVal = ConstantExpr::get(yyvsp[-5].BinaryOpVal, yyvsp[-3].ConstVal, yyvsp[-1].ConstVal); + (yyval.ConstVal) = ConstantExpr::get((yyvsp[-5].BinaryOpVal), (yyvsp[-3].ConstVal), (yyvsp[-1].ConstVal)); CHECK_FOR_ERROR - ; - break;} -case 118: -#line 1681 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - if (yyvsp[-1].ConstVal->getType() != Type::UByteTy) + ;} + break; + + case 119: +#line 1681 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + if ((yyvsp[-1].ConstVal)->getType() != Type::UByteTy) GEN_ERROR("Shift count for shift constant must be unsigned byte!"); - if (!yyvsp[-3].ConstVal->getType()->isInteger()) + if (!(yyvsp[-3].ConstVal)->getType()->isInteger()) GEN_ERROR("Shift constant expression requires integer operand!"); - yyval.ConstVal = ConstantExpr::get(yyvsp[-5].OtherOpVal, yyvsp[-3].ConstVal, yyvsp[-1].ConstVal); + (yyval.ConstVal) = ConstantExpr::get((yyvsp[-5].OtherOpVal), (yyvsp[-3].ConstVal), (yyvsp[-1].ConstVal)); CHECK_FOR_ERROR - ; - break;} -case 119: -#line 1689 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - if (!ExtractElementInst::isValidOperands(yyvsp[-3].ConstVal, yyvsp[-1].ConstVal)) + ;} + break; + + case 120: +#line 1689 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + if (!ExtractElementInst::isValidOperands((yyvsp[-3].ConstVal), (yyvsp[-1].ConstVal))) GEN_ERROR("Invalid extractelement operands!"); - yyval.ConstVal = ConstantExpr::getExtractElement(yyvsp[-3].ConstVal, yyvsp[-1].ConstVal); + (yyval.ConstVal) = ConstantExpr::getExtractElement((yyvsp[-3].ConstVal), (yyvsp[-1].ConstVal)); CHECK_FOR_ERROR - ; - break;} -case 120: -#line 1695 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - if (!InsertElementInst::isValidOperands(yyvsp[-5].ConstVal, yyvsp[-3].ConstVal, yyvsp[-1].ConstVal)) + ;} + break; + + case 121: +#line 1695 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + if (!InsertElementInst::isValidOperands((yyvsp[-5].ConstVal), (yyvsp[-3].ConstVal), (yyvsp[-1].ConstVal))) GEN_ERROR("Invalid insertelement operands!"); - yyval.ConstVal = ConstantExpr::getInsertElement(yyvsp[-5].ConstVal, yyvsp[-3].ConstVal, yyvsp[-1].ConstVal); + (yyval.ConstVal) = ConstantExpr::getInsertElement((yyvsp[-5].ConstVal), (yyvsp[-3].ConstVal), (yyvsp[-1].ConstVal)); CHECK_FOR_ERROR - ; - break;} -case 121: -#line 1701 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - if (!ShuffleVectorInst::isValidOperands(yyvsp[-5].ConstVal, yyvsp[-3].ConstVal, yyvsp[-1].ConstVal)) + ;} + break; + + case 122: +#line 1701 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + if (!ShuffleVectorInst::isValidOperands((yyvsp[-5].ConstVal), (yyvsp[-3].ConstVal), (yyvsp[-1].ConstVal))) GEN_ERROR("Invalid shufflevector operands!"); - yyval.ConstVal = ConstantExpr::getShuffleVector(yyvsp[-5].ConstVal, yyvsp[-3].ConstVal, yyvsp[-1].ConstVal); + (yyval.ConstVal) = ConstantExpr::getShuffleVector((yyvsp[-5].ConstVal), (yyvsp[-3].ConstVal), (yyvsp[-1].ConstVal)); CHECK_FOR_ERROR - ; - break;} -case 122: -#line 1710 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - (yyval.ConstVector = yyvsp[-2].ConstVector)->push_back(yyvsp[0].ConstVal); + ;} + break; + + case 123: +#line 1710 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + ((yyval.ConstVector) = (yyvsp[-2].ConstVector))->push_back((yyvsp[0].ConstVal)); CHECK_FOR_ERROR - ; - break;} -case 123: -#line 1714 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - yyval.ConstVector = new std::vector(); - yyval.ConstVector->push_back(yyvsp[0].ConstVal); + ;} + break; + + case 124: +#line 1714 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + (yyval.ConstVector) = new std::vector(); + (yyval.ConstVector)->push_back((yyvsp[0].ConstVal)); CHECK_FOR_ERROR - ; - break;} -case 124: -#line 1722 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ yyval.BoolVal = false; ; - break;} -case 125: -#line 1722 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ yyval.BoolVal = true; ; - break;} -case 126: -#line 1732 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - yyval.ModuleVal = ParserResult = yyvsp[0].ModuleVal; + ;} + break; + + case 125: +#line 1722 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { (yyval.BoolVal) = false; ;} + break; + + case 126: +#line 1722 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { (yyval.BoolVal) = true; ;} + break; + + case 127: +#line 1732 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + (yyval.ModuleVal) = ParserResult = (yyvsp[0].ModuleVal); CurModule.ModuleDone(); CHECK_FOR_ERROR; -; - break;} -case 127: -#line 1740 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - yyval.ModuleVal = yyvsp[-1].ModuleVal; +;} + break; + + case 128: +#line 1740 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + (yyval.ModuleVal) = (yyvsp[-1].ModuleVal); CurFun.FunctionDone(); CHECK_FOR_ERROR - ; - break;} -case 128: -#line 1745 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - yyval.ModuleVal = yyvsp[-1].ModuleVal; + ;} + break; + + case 129: +#line 1745 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + (yyval.ModuleVal) = (yyvsp[-1].ModuleVal); CHECK_FOR_ERROR - ; - break;} -case 129: -#line 1749 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - yyval.ModuleVal = yyvsp[-3].ModuleVal; + ;} + break; + + case 130: +#line 1749 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + (yyval.ModuleVal) = (yyvsp[-3].ModuleVal); CHECK_FOR_ERROR - ; - break;} -case 130: -#line 1753 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - yyval.ModuleVal = yyvsp[-1].ModuleVal; + ;} + break; + + case 131: +#line 1753 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + (yyval.ModuleVal) = (yyvsp[-1].ModuleVal); CHECK_FOR_ERROR - ; - break;} -case 131: -#line 1757 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - yyval.ModuleVal = CurModule.CurrentModule; + ;} + break; + + case 132: +#line 1757 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + (yyval.ModuleVal) = CurModule.CurrentModule; // Emit an error if there are any unresolved types left. if (!CurModule.LateResolveTypes.empty()) { const ValID &DID = CurModule.LateResolveTypes.begin()->first; @@ -3204,11 +3878,12 @@ } } CHECK_FOR_ERROR - ; - break;} -case 132: -#line 1772 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ + ;} + break; + + case 133: +#line 1772 "/proj/llvm/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: // @@ -3218,274 +3893,306 @@ // If types are not resolved eagerly, then the two types will not be // determined to be the same type! // - ResolveTypeTo(yyvsp[-2].StrVal, *yyvsp[0].TypeVal); + ResolveTypeTo((yyvsp[-2].StrVal), *(yyvsp[0].TypeVal)); - if (!setTypeName(*yyvsp[0].TypeVal, yyvsp[-2].StrVal) && !yyvsp[-2].StrVal) { + if (!setTypeName(*(yyvsp[0].TypeVal), (yyvsp[-2].StrVal)) && !(yyvsp[-2].StrVal)) { CHECK_FOR_ERROR // If this is a named type that is not a redefinition, add it to the slot // table. - CurModule.Types.push_back(*yyvsp[0].TypeVal); + CurModule.Types.push_back(*(yyvsp[0].TypeVal)); } - delete yyvsp[0].TypeVal; + delete (yyvsp[0].TypeVal); CHECK_FOR_ERROR - ; - break;} -case 133: -#line 1794 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ // Function prototypes can be in const pool - CHECK_FOR_ERROR - ; - break;} -case 134: -#line 1797 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ // Asm blocks can be in the const pool - CHECK_FOR_ERROR - ; - break;} -case 135: -#line 1800 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - if (yyvsp[0].ConstVal == 0) + ;} + break; + + case 134: +#line 1794 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { // Function prototypes can be in const pool + CHECK_FOR_ERROR + ;} + break; + + case 135: +#line 1797 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { // Asm blocks can be in the const pool + CHECK_FOR_ERROR + ;} + break; + + case 136: +#line 1800 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + if ((yyvsp[0].ConstVal) == 0) GEN_ERROR("Global value initializer is not a constant!"); - CurGV = ParseGlobalVariable(yyvsp[-3].StrVal, yyvsp[-2].Linkage, yyvsp[-1].BoolVal, yyvsp[0].ConstVal->getType(), yyvsp[0].ConstVal); + CurGV = ParseGlobalVariable((yyvsp[-3].StrVal), (yyvsp[-2].Linkage), (yyvsp[-1].BoolVal), (yyvsp[0].ConstVal)->getType(), (yyvsp[0].ConstVal)); CHECK_FOR_ERROR - ; - break;} -case 136: -#line 1805 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ + ;} + break; + + case 137: +#line 1805 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { CurGV = 0; - ; - break;} -case 137: -#line 1808 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - CurGV = ParseGlobalVariable(yyvsp[-3].StrVal, GlobalValue::ExternalLinkage, yyvsp[-1].BoolVal, *yyvsp[0].TypeVal, 0); + ;} + break; + + case 138: +#line 1808 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + CurGV = ParseGlobalVariable((yyvsp[-3].StrVal), GlobalValue::ExternalLinkage, (yyvsp[-1].BoolVal), *(yyvsp[0].TypeVal), 0); CHECK_FOR_ERROR - delete yyvsp[0].TypeVal; - ; - break;} -case 138: -#line 1812 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ + delete (yyvsp[0].TypeVal); + ;} + break; + + case 139: +#line 1812 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { CurGV = 0; CHECK_FOR_ERROR - ; - break;} -case 139: -#line 1816 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - CurGV = ParseGlobalVariable(yyvsp[-3].StrVal, GlobalValue::DLLImportLinkage, yyvsp[-1].BoolVal, *yyvsp[0].TypeVal, 0); + ;} + break; + + case 140: +#line 1816 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + CurGV = ParseGlobalVariable((yyvsp[-3].StrVal), GlobalValue::DLLImportLinkage, (yyvsp[-1].BoolVal), *(yyvsp[0].TypeVal), 0); CHECK_FOR_ERROR - delete yyvsp[0].TypeVal; - ; - break;} -case 140: -#line 1820 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ + delete (yyvsp[0].TypeVal); + ;} + break; + + case 141: +#line 1820 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { CurGV = 0; CHECK_FOR_ERROR - ; - break;} -case 141: -#line 1824 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ + ;} + break; + + case 142: +#line 1824 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { CurGV = - ParseGlobalVariable(yyvsp[-3].StrVal, GlobalValue::ExternalWeakLinkage, yyvsp[-1].BoolVal, *yyvsp[0].TypeVal, 0); + ParseGlobalVariable((yyvsp[-3].StrVal), GlobalValue::ExternalWeakLinkage, (yyvsp[-1].BoolVal), *(yyvsp[0].TypeVal), 0); CHECK_FOR_ERROR - delete yyvsp[0].TypeVal; - ; - break;} -case 142: -#line 1829 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ + delete (yyvsp[0].TypeVal); + ;} + break; + + case 143: +#line 1829 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { CurGV = 0; CHECK_FOR_ERROR - ; - break;} -case 143: -#line 1833 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - CHECK_FOR_ERROR - ; - break;} -case 144: -#line 1836 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ + ;} + break; + + case 144: +#line 1833 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { CHECK_FOR_ERROR - ; - break;} -case 145: -#line 1839 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - ; - break;} -case 146: -#line 1843 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ + ;} + break; + + case 145: +#line 1836 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + CHECK_FOR_ERROR + ;} + break; + + case 146: +#line 1839 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + ;} + break; + + case 147: +#line 1843 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { const std::string &AsmSoFar = CurModule.CurrentModule->getModuleInlineAsm(); - char *EndStr = UnEscapeLexed(yyvsp[0].StrVal, true); - std::string NewAsm(yyvsp[0].StrVal, EndStr); - free(yyvsp[0].StrVal); + char *EndStr = UnEscapeLexed((yyvsp[0].StrVal), true); + std::string NewAsm((yyvsp[0].StrVal), EndStr); + free((yyvsp[0].StrVal)); if (AsmSoFar.empty()) CurModule.CurrentModule->setModuleInlineAsm(NewAsm); else CurModule.CurrentModule->setModuleInlineAsm(AsmSoFar+"\n"+NewAsm); CHECK_FOR_ERROR -; - break;} -case 147: -#line 1856 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ yyval.Endianness = Module::BigEndian; ; - break;} -case 148: -#line 1857 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ yyval.Endianness = Module::LittleEndian; ; - break;} -case 149: -#line 1859 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - CurModule.CurrentModule->setEndianness(yyvsp[0].Endianness); +;} + break; + + case 148: +#line 1856 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { (yyval.Endianness) = Module::BigEndian; ;} + break; + + case 149: +#line 1857 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { (yyval.Endianness) = Module::LittleEndian; ;} + break; + + case 150: +#line 1859 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + CurModule.CurrentModule->setEndianness((yyvsp[0].Endianness)); CHECK_FOR_ERROR - ; - break;} -case 150: -#line 1863 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - if (yyvsp[0].UInt64Val == 32) + ;} + break; + + case 151: +#line 1863 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + if ((yyvsp[0].UInt64Val) == 32) CurModule.CurrentModule->setPointerSize(Module::Pointer32); - else if (yyvsp[0].UInt64Val == 64) + else if ((yyvsp[0].UInt64Val) == 64) CurModule.CurrentModule->setPointerSize(Module::Pointer64); else - GEN_ERROR("Invalid pointer size: '" + utostr(yyvsp[0].UInt64Val) + "'!"); + GEN_ERROR("Invalid pointer size: '" + utostr((yyvsp[0].UInt64Val)) + "'!"); CHECK_FOR_ERROR - ; - break;} -case 151: -#line 1872 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - CurModule.CurrentModule->setTargetTriple(yyvsp[0].StrVal); - free(yyvsp[0].StrVal); + ;} + break; + + case 152: +#line 1872 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + CurModule.CurrentModule->setTargetTriple((yyvsp[0].StrVal)); + free((yyvsp[0].StrVal)); CHECK_FOR_ERROR - ; - break;} -case 152: -#line 1877 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - CurModule.CurrentModule->setDataLayout(yyvsp[0].StrVal); - free(yyvsp[0].StrVal); + ;} + break; + + case 153: +#line 1877 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + CurModule.CurrentModule->setDataLayout((yyvsp[0].StrVal)); + free((yyvsp[0].StrVal)); CHECK_FOR_ERROR - ; - break;} -case 154: -#line 1885 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - CurModule.CurrentModule->addLibrary(yyvsp[0].StrVal); - free(yyvsp[0].StrVal); + ;} + break; + + case 155: +#line 1885 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + CurModule.CurrentModule->addLibrary((yyvsp[0].StrVal)); + free((yyvsp[0].StrVal)); CHECK_FOR_ERROR - ; - break;} -case 155: -#line 1890 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - CurModule.CurrentModule->addLibrary(yyvsp[0].StrVal); - free(yyvsp[0].StrVal); + ;} + break; + + case 156: +#line 1890 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + CurModule.CurrentModule->addLibrary((yyvsp[0].StrVal)); + free((yyvsp[0].StrVal)); CHECK_FOR_ERROR - ; - break;} -case 156: -#line 1895 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ + ;} + break; + + case 157: +#line 1895 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { CHECK_FOR_ERROR - ; - break;} -case 160: -#line 1905 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ yyval.StrVal = 0; ; - break;} -case 161: -#line 1907 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - if (*yyvsp[-1].TypeVal == Type::VoidTy) + ;} + break; + + case 161: +#line 1905 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { (yyval.StrVal) = 0; ;} + break; + + case 162: +#line 1907 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + if (*(yyvsp[-1].TypeVal) == Type::VoidTy) GEN_ERROR("void typed arguments are invalid!"); - yyval.ArgVal = new std::pair(yyvsp[-1].TypeVal, yyvsp[0].StrVal); + (yyval.ArgVal) = new std::pair((yyvsp[-1].TypeVal), (yyvsp[0].StrVal)); CHECK_FOR_ERROR -; - break;} -case 162: -#line 1914 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - yyval.ArgList = yyvsp[-2].ArgList; - yyvsp[-2].ArgList->push_back(*yyvsp[0].ArgVal); - delete yyvsp[0].ArgVal; - CHECK_FOR_ERROR - ; - break;} -case 163: -#line 1920 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - yyval.ArgList = new std::vector >(); - yyval.ArgList->push_back(*yyvsp[0].ArgVal); - delete yyvsp[0].ArgVal; - CHECK_FOR_ERROR - ; - break;} -case 164: -#line 1927 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - yyval.ArgList = yyvsp[0].ArgList; +;} + break; + + case 163: +#line 1914 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + (yyval.ArgList) = (yyvsp[-2].ArgList); + (yyvsp[-2].ArgList)->push_back(*(yyvsp[0].ArgVal)); + delete (yyvsp[0].ArgVal); CHECK_FOR_ERROR - ; - break;} -case 165: -#line 1931 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - yyval.ArgList = yyvsp[-2].ArgList; - yyval.ArgList->push_back(std::pair >(); + (yyval.ArgList)->push_back(*(yyvsp[0].ArgVal)); + delete (yyvsp[0].ArgVal); + CHECK_FOR_ERROR + ;} + break; + + case 165: +#line 1927 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + (yyval.ArgList) = (yyvsp[0].ArgList); + CHECK_FOR_ERROR + ;} + break; + + case 166: +#line 1931 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + (yyval.ArgList) = (yyvsp[-2].ArgList); + (yyval.ArgList)->push_back(std::pair(new PATypeHolder(Type::VoidTy), 0)); CHECK_FOR_ERROR - ; - break;} -case 166: -#line 1937 "/Users/resistor/llvm/src/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 167: +#line 1937 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + (yyval.ArgList) = new std::vector >(); + (yyval.ArgList)->push_back(std::make_pair(new PATypeHolder(Type::VoidTy), (char*)0)); CHECK_FOR_ERROR - ; - break;} -case 167: -#line 1942 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - yyval.ArgList = 0; + ;} + break; + + case 168: +#line 1942 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + (yyval.ArgList) = 0; CHECK_FOR_ERROR - ; - break;} -case 168: -#line 1948 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - UnEscapeLexed(yyvsp[-5].StrVal); - std::string FunctionName(yyvsp[-5].StrVal); - free(yyvsp[-5].StrVal); // Free strdup'd memory! + ;} + break; + + case 169: +#line 1948 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + UnEscapeLexed((yyvsp[-5].StrVal)); + std::string FunctionName((yyvsp[-5].StrVal)); + free((yyvsp[-5].StrVal)); // Free strdup'd memory! - if (!(*yyvsp[-6].TypeVal)->isFirstClassType() && *yyvsp[-6].TypeVal != Type::VoidTy) + if (!(*(yyvsp[-6].TypeVal))->isFirstClassType() && *(yyvsp[-6].TypeVal) != Type::VoidTy) GEN_ERROR("LLVM functions cannot return aggregate types!"); std::vector ParamTypeList; - if (yyvsp[-3].ArgList) { // If there are arguments... - for (std::vector >::iterator I = yyvsp[-3].ArgList->begin(); - I != yyvsp[-3].ArgList->end(); ++I) + if ((yyvsp[-3].ArgList)) { // If there are arguments... + for (std::vector >::iterator I = (yyvsp[-3].ArgList)->begin(); + I != (yyvsp[-3].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[-6].TypeVal, ParamTypeList, isVarArg); + const FunctionType *FT = FunctionType::get(*(yyvsp[-6].TypeVal), ParamTypeList, isVarArg); const PointerType *PFT = PointerType::get(FT); - delete yyvsp[-6].TypeVal; + delete (yyvsp[-6].TypeVal); ValID ID; if (!FunctionName.empty()) { @@ -3529,24 +4236,24 @@ // another function. Fn->setLinkage(CurFun.Linkage); } - Fn->setCallingConv(yyvsp[-7].UIntVal); - Fn->setAlignment(yyvsp[0].UIntVal); - if (yyvsp[-1].StrVal) { - Fn->setSection(yyvsp[-1].StrVal); - free(yyvsp[-1].StrVal); + Fn->setCallingConv((yyvsp[-7].UIntVal)); + Fn->setAlignment((yyvsp[0].UIntVal)); + if ((yyvsp[-1].StrVal)) { + Fn->setSection((yyvsp[-1].StrVal)); + free((yyvsp[-1].StrVal)); } // Add all of the arguments we parsed to the function... - if (yyvsp[-3].ArgList) { // Is null if empty... + if ((yyvsp[-3].ArgList)) { // Is null if empty... if (isVarArg) { // Nuke the last entry - assert(yyvsp[-3].ArgList->back().first->get() == Type::VoidTy && yyvsp[-3].ArgList->back().second == 0&& + assert((yyvsp[-3].ArgList)->back().first->get() == Type::VoidTy && (yyvsp[-3].ArgList)->back().second == 0&& "Not a varargs marker!"); - delete yyvsp[-3].ArgList->back().first; - yyvsp[-3].ArgList->pop_back(); // Delete the last entry + delete (yyvsp[-3].ArgList)->back().first; + (yyvsp[-3].ArgList)->pop_back(); // Delete the last entry } Function::arg_iterator ArgIt = Fn->arg_begin(); - for (std::vector >::iterator I = yyvsp[-3].ArgList->begin(); - I != yyvsp[-3].ArgList->end(); ++I, ++ArgIt) { + for (std::vector >::iterator I = (yyvsp[-3].ArgList)->begin(); + I != (yyvsp[-3].ArgList)->end(); ++I, ++ArgIt) { delete I->first; // Delete the typeholder... setValueName(ArgIt, I->second); // Insert arg into symtab... @@ -3554,123 +4261,140 @@ InsertValue(ArgIt); } - delete yyvsp[-3].ArgList; // We're now done with the argument list + delete (yyvsp[-3].ArgList); // We're now done with the argument list } CHECK_FOR_ERROR -; - break;} -case 171: -#line 2044 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - yyval.FunctionVal = CurFun.CurrentFunction; +;} + break; + + case 172: +#line 2044 "/proj/llvm/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 174: -#line 2054 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - yyval.FunctionVal = yyvsp[-1].FunctionVal; + (yyval.FunctionVal)->setLinkage((yyvsp[-2].Linkage)); +;} + break; + + case 175: +#line 2054 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + (yyval.FunctionVal) = (yyvsp[-1].FunctionVal); CHECK_FOR_ERROR -; - break;} -case 176: -#line 2060 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ CurFun.Linkage = GlobalValue::DLLImportLinkage ; - break;} -case 177: -#line 2061 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ CurFun.Linkage = GlobalValue::DLLImportLinkage ; - break;} -case 178: -#line 2063 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ CurFun.isDeclare = true; ; - break;} -case 179: -#line 2063 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - yyval.FunctionVal = CurFun.CurrentFunction; +;} + break; + + case 177: +#line 2060 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { CurFun.Linkage = GlobalValue::DLLImportLinkage ;} + break; + + case 178: +#line 2061 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { CurFun.Linkage = GlobalValue::DLLImportLinkage ;} + break; + + case 179: +#line 2063 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { CurFun.isDeclare = true; ;} + break; + + case 180: +#line 2063 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + (yyval.FunctionVal) = CurFun.CurrentFunction; CurFun.FunctionDone(); CHECK_FOR_ERROR - ; - break;} -case 180: -#line 2073 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - yyval.BoolVal = false; + ;} + break; + + case 181: +#line 2073 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + (yyval.BoolVal) = false; CHECK_FOR_ERROR - ; - break;} -case 181: -#line 2077 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - yyval.BoolVal = true; + ;} + break; + + case 182: +#line 2077 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + (yyval.BoolVal) = true; CHECK_FOR_ERROR - ; - break;} -case 182: -#line 2082 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ // A reference to a direct constant - yyval.ValIDVal = ValID::create(yyvsp[0].SInt64Val); - CHECK_FOR_ERROR - ; - break;} -case 183: -#line 2086 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - yyval.ValIDVal = ValID::create(yyvsp[0].UInt64Val); + ;} + break; + + case 183: +#line 2082 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { // A reference to a direct constant + (yyval.ValIDVal) = ValID::create((yyvsp[0].SInt64Val)); CHECK_FOR_ERROR - ; - break;} -case 184: -#line 2090 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ // Perhaps it's an FP constant? - yyval.ValIDVal = ValID::create(yyvsp[0].FPVal); - CHECK_FOR_ERROR - ; - break;} -case 185: -#line 2094 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - yyval.ValIDVal = ValID::create(ConstantBool::getTrue()); + ;} + break; + + case 184: +#line 2086 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + (yyval.ValIDVal) = ValID::create((yyvsp[0].UInt64Val)); CHECK_FOR_ERROR - ; - break;} -case 186: -#line 2098 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - yyval.ValIDVal = ValID::create(ConstantBool::getFalse()); + ;} + break; + + case 185: +#line 2090 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { // Perhaps it's an FP constant? + (yyval.ValIDVal) = ValID::create((yyvsp[0].FPVal)); CHECK_FOR_ERROR - ; - break;} -case 187: -#line 2102 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - yyval.ValIDVal = ValID::createNull(); + ;} + break; + + case 186: +#line 2094 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + (yyval.ValIDVal) = ValID::create(ConstantBool::getTrue()); CHECK_FOR_ERROR - ; - break;} -case 188: -#line 2106 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - yyval.ValIDVal = ValID::createUndef(); + ;} + break; + + case 187: +#line 2098 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + (yyval.ValIDVal) = ValID::create(ConstantBool::getFalse()); CHECK_FOR_ERROR - ; - break;} -case 189: -#line 2110 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ // A vector zero constant. - yyval.ValIDVal = ValID::createZeroInit(); - CHECK_FOR_ERROR - ; - break;} -case 190: -#line 2114 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ // Nonempty unsized packed vector - const Type *ETy = (*yyvsp[-1].ConstVector)[0]->getType(); - int NumElements = yyvsp[-1].ConstVector->size(); + ;} + break; + + case 188: +#line 2102 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + (yyval.ValIDVal) = ValID::createNull(); + CHECK_FOR_ERROR + ;} + break; + + case 189: +#line 2106 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + (yyval.ValIDVal) = ValID::createUndef(); + CHECK_FOR_ERROR + ;} + break; + + case 190: +#line 2110 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { // A vector zero constant. + (yyval.ValIDVal) = ValID::createZeroInit(); + CHECK_FOR_ERROR + ;} + break; + + case 191: +#line 2114 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { // Nonempty unsized packed vector + const Type *ETy = (*(yyvsp[-1].ConstVector))[0]->getType(); + int NumElements = (yyvsp[-1].ConstVector)->size(); PackedType* pt = PackedType::get(ETy, NumElements); PATypeHolder* PTy = new PATypeHolder( @@ -3682,98 +4406,108 @@ ); // Verify all elements are correct type! - for (unsigned i = 0; i < yyvsp[-1].ConstVector->size(); i++) { - if (ETy != (*yyvsp[-1].ConstVector)[i]->getType()) + for (unsigned i = 0; i < (yyvsp[-1].ConstVector)->size(); i++) { + if (ETy != (*(yyvsp[-1].ConstVector))[i]->getType()) GEN_ERROR("Element #" + utostr(i) + " is not of type '" + ETy->getDescription() +"' as required!\nIt is of type '" + - (*yyvsp[-1].ConstVector)[i]->getType()->getDescription() + "'."); + (*(yyvsp[-1].ConstVector))[i]->getType()->getDescription() + "'."); } - yyval.ValIDVal = ValID::create(ConstantPacked::get(pt, *yyvsp[-1].ConstVector)); - delete PTy; delete yyvsp[-1].ConstVector; + (yyval.ValIDVal) = ValID::create(ConstantPacked::get(pt, *(yyvsp[-1].ConstVector))); + delete PTy; delete (yyvsp[-1].ConstVector); CHECK_FOR_ERROR - ; - break;} -case 191: -#line 2139 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - yyval.ValIDVal = ValID::create(yyvsp[0].ConstVal); + ;} + break; + + case 192: +#line 2139 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + (yyval.ValIDVal) = ValID::create((yyvsp[0].ConstVal)); CHECK_FOR_ERROR - ; - break;} -case 192: -#line 2143 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - char *End = UnEscapeLexed(yyvsp[-2].StrVal, true); - std::string AsmStr = std::string(yyvsp[-2].StrVal, End); - End = UnEscapeLexed(yyvsp[0].StrVal, true); - std::string Constraints = std::string(yyvsp[0].StrVal, End); - yyval.ValIDVal = ValID::createInlineAsm(AsmStr, Constraints, yyvsp[-3].BoolVal); - free(yyvsp[-2].StrVal); - free(yyvsp[0].StrVal); - CHECK_FOR_ERROR - ; - break;} -case 193: -#line 2157 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ // Is it an integer reference...? - yyval.ValIDVal = ValID::create(yyvsp[0].SIntVal); - CHECK_FOR_ERROR - ; - break;} -case 194: -#line 2161 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ // Is it a named reference...? - yyval.ValIDVal = ValID::create(yyvsp[0].StrVal); - CHECK_FOR_ERROR - ; - break;} -case 197: -#line 2173 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - yyval.ValueVal = getVal(*yyvsp[-1].TypeVal, yyvsp[0].ValIDVal); delete yyvsp[-1].TypeVal; + ;} + break; + + case 193: +#line 2143 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + char *End = UnEscapeLexed((yyvsp[-2].StrVal), true); + std::string AsmStr = std::string((yyvsp[-2].StrVal), End); + End = UnEscapeLexed((yyvsp[0].StrVal), true); + std::string Constraints = std::string((yyvsp[0].StrVal), End); + (yyval.ValIDVal) = ValID::createInlineAsm(AsmStr, Constraints, (yyvsp[-3].BoolVal)); + free((yyvsp[-2].StrVal)); + free((yyvsp[0].StrVal)); CHECK_FOR_ERROR - ; - break;} -case 198: -#line 2178 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - yyval.FunctionVal = yyvsp[-1].FunctionVal; + ;} + break; + + case 194: +#line 2157 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { // Is it an integer reference...? + (yyval.ValIDVal) = ValID::create((yyvsp[0].SIntVal)); CHECK_FOR_ERROR - ; - break;} -case 199: -#line 2182 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ // Do not allow functions with 0 basic blocks - yyval.FunctionVal = yyvsp[-1].FunctionVal; - CHECK_FOR_ERROR - ; - break;} -case 200: -#line 2191 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - setValueName(yyvsp[0].TermInstVal, yyvsp[-1].StrVal); + ;} + break; + + case 195: +#line 2161 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { // Is it a named reference...? + (yyval.ValIDVal) = ValID::create((yyvsp[0].StrVal)); + CHECK_FOR_ERROR + ;} + break; + + case 198: +#line 2173 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + (yyval.ValueVal) = getVal(*(yyvsp[-1].TypeVal), (yyvsp[0].ValIDVal)); delete (yyvsp[-1].TypeVal); + CHECK_FOR_ERROR + ;} + break; + + case 199: +#line 2178 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + (yyval.FunctionVal) = (yyvsp[-1].FunctionVal); + CHECK_FOR_ERROR + ;} + break; + + case 200: +#line 2182 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { // Do not allow functions with 0 basic blocks + (yyval.FunctionVal) = (yyvsp[-1].FunctionVal); + CHECK_FOR_ERROR + ;} + break; + + case 201: +#line 2191 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + setValueName((yyvsp[0].TermInstVal), (yyvsp[-1].StrVal)); + CHECK_FOR_ERROR + InsertValue((yyvsp[0].TermInstVal)); + + (yyvsp[-2].BasicBlockVal)->getInstList().push_back((yyvsp[0].TermInstVal)); + InsertValue((yyvsp[-2].BasicBlockVal)); + (yyval.BasicBlockVal) = (yyvsp[-2].BasicBlockVal); + CHECK_FOR_ERROR + ;} + break; + + case 202: +#line 2202 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + (yyvsp[-1].BasicBlockVal)->getInstList().push_back((yyvsp[0].InstVal)); + (yyval.BasicBlockVal) = (yyvsp[-1].BasicBlockVal); CHECK_FOR_ERROR - InsertValue(yyvsp[0].TermInstVal); + ;} + break; - yyvsp[-2].BasicBlockVal->getInstList().push_back(yyvsp[0].TermInstVal); - InsertValue(yyvsp[-2].BasicBlockVal); - yyval.BasicBlockVal = yyvsp[-2].BasicBlockVal; - CHECK_FOR_ERROR - ; - break;} -case 201: -#line 2202 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - yyvsp[-1].BasicBlockVal->getInstList().push_back(yyvsp[0].InstVal); - yyval.BasicBlockVal = yyvsp[-1].BasicBlockVal; - CHECK_FOR_ERROR - ; - break;} -case 202: -#line 2207 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - yyval.BasicBlockVal = CurBB = getBBVal(ValID::create((int)CurFun.NextBBNum++), true); + case 203: +#line 2207 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + (yyval.BasicBlockVal) = CurBB = getBBVal(ValID::create((int)CurFun.NextBBNum++), true); CHECK_FOR_ERROR // Make sure to move the basic block to the correct location in the @@ -3781,14 +4515,15 @@ // referenced. Function::BasicBlockListType &BBL = CurFun.CurrentFunction->getBasicBlockList(); - BBL.splice(BBL.end(), BBL, yyval.BasicBlockVal); + BBL.splice(BBL.end(), BBL, (yyval.BasicBlockVal)); CHECK_FOR_ERROR - ; - break;} -case 203: -#line 2219 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - yyval.BasicBlockVal = CurBB = getBBVal(ValID::create(yyvsp[0].StrVal), true); + ;} + break; + + case 204: +#line 2219 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + (yyval.BasicBlockVal) = CurBB = getBBVal(ValID::create((yyvsp[0].StrVal)), true); CHECK_FOR_ERROR // Make sure to move the basic block to the correct location in the @@ -3796,90 +4531,97 @@ // referenced. Function::BasicBlockListType &BBL = CurFun.CurrentFunction->getBasicBlockList(); - BBL.splice(BBL.end(), BBL, yyval.BasicBlockVal); + BBL.splice(BBL.end(), BBL, (yyval.BasicBlockVal)); CHECK_FOR_ERROR - ; - break;} -case 204: -#line 2232 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ // Return with a result... - yyval.TermInstVal = new ReturnInst(yyvsp[0].ValueVal); - CHECK_FOR_ERROR - ; - break;} -case 205: -#line 2236 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ // Return with no result... - yyval.TermInstVal = new ReturnInst(); - CHECK_FOR_ERROR - ; - break;} -case 206: -#line 2240 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ // Unconditional Branch... - BasicBlock* tmpBB = getBBVal(yyvsp[0].ValIDVal); - CHECK_FOR_ERROR - yyval.TermInstVal = new BranchInst(tmpBB); - ; - break;} -case 207: -#line 2245 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - BasicBlock* tmpBBA = getBBVal(yyvsp[-3].ValIDVal); - CHECK_FOR_ERROR - BasicBlock* tmpBBB = getBBVal(yyvsp[0].ValIDVal); - CHECK_FOR_ERROR - Value* tmpVal = getVal(Type::BoolTy, yyvsp[-6].ValIDVal); - CHECK_FOR_ERROR - yyval.TermInstVal = new BranchInst(tmpBBA, tmpBBB, tmpVal); - ; - break;} -case 208: -#line 2254 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - Value* tmpVal = getVal(yyvsp[-7].PrimType, yyvsp[-6].ValIDVal); + ;} + break; + + case 205: +#line 2232 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { // Return with a result... + (yyval.TermInstVal) = new ReturnInst((yyvsp[0].ValueVal)); + CHECK_FOR_ERROR + ;} + break; + + case 206: +#line 2236 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { // Return with no result... + (yyval.TermInstVal) = new ReturnInst(); + CHECK_FOR_ERROR + ;} + break; + + case 207: +#line 2240 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { // Unconditional Branch... + BasicBlock* tmpBB = getBBVal((yyvsp[0].ValIDVal)); + CHECK_FOR_ERROR + (yyval.TermInstVal) = new BranchInst(tmpBB); + ;} + break; + + case 208: +#line 2245 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + BasicBlock* tmpBBA = getBBVal((yyvsp[-3].ValIDVal)); + CHECK_FOR_ERROR + BasicBlock* tmpBBB = getBBVal((yyvsp[0].ValIDVal)); + CHECK_FOR_ERROR + Value* tmpVal = getVal(Type::BoolTy, (yyvsp[-6].ValIDVal)); + CHECK_FOR_ERROR + (yyval.TermInstVal) = new BranchInst(tmpBBA, tmpBBB, tmpVal); + ;} + break; + + case 209: +#line 2254 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + Value* tmpVal = getVal((yyvsp[-7].PrimType), (yyvsp[-6].ValIDVal)); CHECK_FOR_ERROR - BasicBlock* tmpBB = getBBVal(yyvsp[-3].ValIDVal); + BasicBlock* tmpBB = getBBVal((yyvsp[-3].ValIDVal)); CHECK_FOR_ERROR - SwitchInst *S = new SwitchInst(tmpVal, tmpBB, yyvsp[-1].JumpTable->size()); - yyval.TermInstVal = S; + SwitchInst *S = new SwitchInst(tmpVal, tmpBB, (yyvsp[-1].JumpTable)->size()); + (yyval.TermInstVal) = S; - std::vector >::iterator I = yyvsp[-1].JumpTable->begin(), - E = yyvsp[-1].JumpTable->end(); + std::vector >::iterator I = (yyvsp[-1].JumpTable)->begin(), + E = (yyvsp[-1].JumpTable)->end(); for (; I != E; ++I) { if (ConstantInt *CI = dyn_cast(I->first)) S->addCase(CI, I->second); else GEN_ERROR("Switch case is constant, but not a simple integer!"); } - delete yyvsp[-1].JumpTable; + delete (yyvsp[-1].JumpTable); CHECK_FOR_ERROR - ; - break;} -case 209: -#line 2273 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - Value* tmpVal = getVal(yyvsp[-6].PrimType, yyvsp[-5].ValIDVal); + ;} + break; + + case 210: +#line 2273 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + Value* tmpVal = getVal((yyvsp[-6].PrimType), (yyvsp[-5].ValIDVal)); CHECK_FOR_ERROR - BasicBlock* tmpBB = getBBVal(yyvsp[-2].ValIDVal); + BasicBlock* tmpBB = getBBVal((yyvsp[-2].ValIDVal)); CHECK_FOR_ERROR SwitchInst *S = new SwitchInst(tmpVal, tmpBB, 0); - yyval.TermInstVal = S; + (yyval.TermInstVal) = S; CHECK_FOR_ERROR - ; - break;} -case 210: -#line 2283 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ + ;} + break; + + case 211: +#line 2283 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { const PointerType *PFTy; const FunctionType *Ty; - if (!(PFTy = dyn_cast(yyvsp[-10].TypeVal->get())) || + if (!(PFTy = dyn_cast((yyvsp[-10].TypeVal)->get())) || !(Ty = dyn_cast(PFTy->getElementType()))) { // Pull out the types of all of the arguments... std::vector ParamTypes; - if (yyvsp[-7].ValueList) { - for (std::vector::iterator I = yyvsp[-7].ValueList->begin(), E = yyvsp[-7].ValueList->end(); + if ((yyvsp[-7].ValueList)) { + for (std::vector::iterator I = (yyvsp[-7].ValueList)->begin(), E = (yyvsp[-7].ValueList)->end(); I != E; ++I) ParamTypes.push_back((*I)->getType()); } @@ -3887,27 +4629,27 @@ bool isVarArg = ParamTypes.size() && ParamTypes.back() == Type::VoidTy; if (isVarArg) ParamTypes.pop_back(); - Ty = FunctionType::get(yyvsp[-10].TypeVal->get(), ParamTypes, isVarArg); + Ty = FunctionType::get((yyvsp[-10].TypeVal)->get(), ParamTypes, isVarArg); PFTy = PointerType::get(Ty); } - Value *V = getVal(PFTy, yyvsp[-9].ValIDVal); // Get the function we're calling... + Value *V = getVal(PFTy, (yyvsp[-9].ValIDVal)); // Get the function we're calling... CHECK_FOR_ERROR - BasicBlock *Normal = getBBVal(yyvsp[-3].ValIDVal); + BasicBlock *Normal = getBBVal((yyvsp[-3].ValIDVal)); CHECK_FOR_ERROR - BasicBlock *Except = getBBVal(yyvsp[0].ValIDVal); + BasicBlock *Except = getBBVal((yyvsp[0].ValIDVal)); CHECK_FOR_ERROR // Create the call node... - if (!yyvsp[-7].ValueList) { // Has no arguments? - yyval.TermInstVal = new InvokeInst(V, Normal, Except, std::vector()); + if (!(yyvsp[-7].ValueList)) { // Has no arguments? + (yyval.TermInstVal) = new InvokeInst(V, Normal, Except, std::vector()); } else { // Has arguments? // Loop through FunctionType's arguments and ensure they are specified // correctly! // FunctionType::param_iterator I = Ty->param_begin(); FunctionType::param_iterator E = Ty->param_end(); - std::vector::iterator ArgI = yyvsp[-7].ValueList->begin(), ArgE = yyvsp[-7].ValueList->end(); + std::vector::iterator ArgI = (yyvsp[-7].ValueList)->begin(), ArgE = (yyvsp[-7].ValueList)->end(); for (; ArgI != ArgE && I != E; ++ArgI, ++I) if ((*ArgI)->getType() != *I) @@ -3917,242 +4659,263 @@ if (I != E || (ArgI != ArgE && !Ty->isVarArg())) GEN_ERROR("Invalid number of parameters detected!"); - yyval.TermInstVal = new InvokeInst(V, Normal, Except, *yyvsp[-7].ValueList); + (yyval.TermInstVal) = new InvokeInst(V, Normal, Except, *(yyvsp[-7].ValueList)); } - cast(yyval.TermInstVal)->setCallingConv(yyvsp[-11].UIntVal); + cast((yyval.TermInstVal))->setCallingConv((yyvsp[-11].UIntVal)); - delete yyvsp[-10].TypeVal; - delete yyvsp[-7].ValueList; + delete (yyvsp[-10].TypeVal); + delete (yyvsp[-7].ValueList); CHECK_FOR_ERROR - ; - break;} -case 211: -#line 2338 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - yyval.TermInstVal = new UnwindInst(); + ;} + break; + + case 212: +#line 2338 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + (yyval.TermInstVal) = new UnwindInst(); CHECK_FOR_ERROR - ; - break;} -case 212: -#line 2342 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - yyval.TermInstVal = new UnreachableInst(); + ;} + break; + + case 213: +#line 2342 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + (yyval.TermInstVal) = new UnreachableInst(); CHECK_FOR_ERROR - ; - break;} -case 213: -#line 2349 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - yyval.JumpTable = yyvsp[-5].JumpTable; - Constant *V = cast(getValNonImprovising(yyvsp[-4].PrimType, yyvsp[-3].ValIDVal)); + ;} + break; + + case 214: +#line 2349 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + (yyval.JumpTable) = (yyvsp[-5].JumpTable); + Constant *V = cast(getValNonImprovising((yyvsp[-4].PrimType), (yyvsp[-3].ValIDVal))); CHECK_FOR_ERROR if (V == 0) GEN_ERROR("May only switch on a constant pool value!"); - BasicBlock* tmpBB = getBBVal(yyvsp[0].ValIDVal); + BasicBlock* tmpBB = getBBVal((yyvsp[0].ValIDVal)); CHECK_FOR_ERROR - yyval.JumpTable->push_back(std::make_pair(V, tmpBB)); - ; - break;} -case 214: -#line 2360 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - yyval.JumpTable = new std::vector >(); - Constant *V = cast(getValNonImprovising(yyvsp[-4].PrimType, yyvsp[-3].ValIDVal)); + (yyval.JumpTable)->push_back(std::make_pair(V, tmpBB)); + ;} + break; + + case 215: +#line 2360 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + (yyval.JumpTable) = new std::vector >(); + Constant *V = cast(getValNonImprovising((yyvsp[-4].PrimType), (yyvsp[-3].ValIDVal))); CHECK_FOR_ERROR if (V == 0) GEN_ERROR("May only switch on a constant pool value!"); - BasicBlock* tmpBB = getBBVal(yyvsp[0].ValIDVal); + BasicBlock* tmpBB = getBBVal((yyvsp[0].ValIDVal)); CHECK_FOR_ERROR - yyval.JumpTable->push_back(std::make_pair(V, tmpBB)); - ; - break;} -case 215: -#line 2373 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ + (yyval.JumpTable)->push_back(std::make_pair(V, tmpBB)); + ;} + break; + + case 216: +#line 2373 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { // Is this definition named?? if so, assign the name... - setValueName(yyvsp[0].InstVal, yyvsp[-1].StrVal); + setValueName((yyvsp[0].InstVal), (yyvsp[-1].StrVal)); CHECK_FOR_ERROR - InsertValue(yyvsp[0].InstVal); - yyval.InstVal = yyvsp[0].InstVal; + InsertValue((yyvsp[0].InstVal)); + (yyval.InstVal) = (yyvsp[0].InstVal); CHECK_FOR_ERROR -; - break;} -case 216: -#line 2382 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ // Used for PHI nodes - yyval.PHIList = new std::list >(); - Value* tmpVal = getVal(*yyvsp[-5].TypeVal, yyvsp[-3].ValIDVal); - CHECK_FOR_ERROR - BasicBlock* tmpBB = getBBVal(yyvsp[-1].ValIDVal); - CHECK_FOR_ERROR - yyval.PHIList->push_back(std::make_pair(tmpVal, tmpBB)); - delete yyvsp[-5].TypeVal; - ; - break;} -case 217: -#line 2391 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - yyval.PHIList = yyvsp[-6].PHIList; - Value* tmpVal = getVal(yyvsp[-6].PHIList->front().first->getType(), yyvsp[-3].ValIDVal); +;} + break; + + case 217: +#line 2382 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { // Used for PHI nodes + (yyval.PHIList) = new std::list >(); + Value* tmpVal = getVal(*(yyvsp[-5].TypeVal), (yyvsp[-3].ValIDVal)); + CHECK_FOR_ERROR + BasicBlock* tmpBB = getBBVal((yyvsp[-1].ValIDVal)); + CHECK_FOR_ERROR + (yyval.PHIList)->push_back(std::make_pair(tmpVal, tmpBB)); + delete (yyvsp[-5].TypeVal); + ;} + break; + + case 218: +#line 2391 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + (yyval.PHIList) = (yyvsp[-6].PHIList); + Value* tmpVal = getVal((yyvsp[-6].PHIList)->front().first->getType(), (yyvsp[-3].ValIDVal)); CHECK_FOR_ERROR - BasicBlock* tmpBB = getBBVal(yyvsp[-1].ValIDVal); + BasicBlock* tmpBB = getBBVal((yyvsp[-1].ValIDVal)); CHECK_FOR_ERROR - yyvsp[-6].PHIList->push_back(std::make_pair(tmpVal, tmpBB)); - ; - break;} -case 218: -#line 2401 "/Users/resistor/llvm/src/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 219: -#line 2405 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - yyval.ValueList = yyvsp[-2].ValueList; - yyvsp[-2].ValueList->push_back(yyvsp[0].ValueVal); + (yyvsp[-6].PHIList)->push_back(std::make_pair(tmpVal, tmpBB)); + ;} + break; + + case 219: +#line 2401 "/proj/llvm/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 220: +#line 2405 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + (yyval.ValueList) = (yyvsp[-2].ValueList); + (yyvsp[-2].ValueList)->push_back((yyvsp[0].ValueVal)); CHECK_FOR_ERROR - ; - break;} -case 221: -#line 2412 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ yyval.ValueList = 0; ; - break;} -case 222: -#line 2414 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - yyval.BoolVal = true; + ;} + break; + + case 222: +#line 2412 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { (yyval.ValueList) = 0; ;} + break; + + case 223: +#line 2414 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + (yyval.BoolVal) = true; CHECK_FOR_ERROR - ; - break;} -case 223: -#line 2418 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - yyval.BoolVal = false; + ;} + break; + + case 224: +#line 2418 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + (yyval.BoolVal) = false; CHECK_FOR_ERROR - ; - break;} -case 224: -#line 2423 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - if (!(*yyvsp[-3].TypeVal)->isInteger() && !(*yyvsp[-3].TypeVal)->isFloatingPoint() && - !isa((*yyvsp[-3].TypeVal).get())) + ;} + break; + + case 225: +#line 2423 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + if (!(*(yyvsp[-3].TypeVal))->isInteger() && !(*(yyvsp[-3].TypeVal))->isFloatingPoint() && + !isa((*(yyvsp[-3].TypeVal)).get())) GEN_ERROR( "Arithmetic operator requires integer, FP, or packed operands!"); - if (isa((*yyvsp[-3].TypeVal).get()) && yyvsp[-4].BinaryOpVal == Instruction::Rem) + if (isa((*(yyvsp[-3].TypeVal)).get()) && (yyvsp[-4].BinaryOpVal) == Instruction::Rem) GEN_ERROR("Rem not supported on packed types!"); - Value* val1 = getVal(*yyvsp[-3].TypeVal, yyvsp[-2].ValIDVal); + Value* val1 = getVal(*(yyvsp[-3].TypeVal), (yyvsp[-2].ValIDVal)); CHECK_FOR_ERROR - Value* val2 = getVal(*yyvsp[-3].TypeVal, yyvsp[0].ValIDVal); + Value* val2 = getVal(*(yyvsp[-3].TypeVal), (yyvsp[0].ValIDVal)); CHECK_FOR_ERROR - yyval.InstVal = BinaryOperator::create(yyvsp[-4].BinaryOpVal, val1, val2); - if (yyval.InstVal == 0) + (yyval.InstVal) = BinaryOperator::create((yyvsp[-4].BinaryOpVal), val1, val2); + if ((yyval.InstVal) == 0) GEN_ERROR("binary operator returned null!"); - delete yyvsp[-3].TypeVal; - ; - break;} -case 225: -#line 2439 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - if (!(*yyvsp[-3].TypeVal)->isIntegral()) { - if (!isa(yyvsp[-3].TypeVal->get()) || - !cast(yyvsp[-3].TypeVal->get())->getElementType()->isIntegral()) + delete (yyvsp[-3].TypeVal); + ;} + break; + + case 226: +#line 2439 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + if (!(*(yyvsp[-3].TypeVal))->isIntegral()) { + if (!isa((yyvsp[-3].TypeVal)->get()) || + !cast((yyvsp[-3].TypeVal)->get())->getElementType()->isIntegral()) GEN_ERROR("Logical operator requires integral operands!"); } - Value* tmpVal1 = getVal(*yyvsp[-3].TypeVal, yyvsp[-2].ValIDVal); + Value* tmpVal1 = getVal(*(yyvsp[-3].TypeVal), (yyvsp[-2].ValIDVal)); CHECK_FOR_ERROR - Value* tmpVal2 = getVal(*yyvsp[-3].TypeVal, yyvsp[0].ValIDVal); + Value* tmpVal2 = getVal(*(yyvsp[-3].TypeVal), (yyvsp[0].ValIDVal)); CHECK_FOR_ERROR - yyval.InstVal = BinaryOperator::create(yyvsp[-4].BinaryOpVal, tmpVal1, tmpVal2); - if (yyval.InstVal == 0) + (yyval.InstVal) = BinaryOperator::create((yyvsp[-4].BinaryOpVal), tmpVal1, tmpVal2); + if ((yyval.InstVal) == 0) GEN_ERROR("binary operator returned null!"); - delete yyvsp[-3].TypeVal; - ; - break;} -case 226: -#line 2454 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - if(isa((*yyvsp[-3].TypeVal).get())) { + delete (yyvsp[-3].TypeVal); + ;} + break; + + case 227: +#line 2454 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + if(isa((*(yyvsp[-3].TypeVal)).get())) { GEN_ERROR( "PackedTypes currently not supported in setcc instructions!"); } - Value* tmpVal1 = getVal(*yyvsp[-3].TypeVal, yyvsp[-2].ValIDVal); + Value* tmpVal1 = getVal(*(yyvsp[-3].TypeVal), (yyvsp[-2].ValIDVal)); CHECK_FOR_ERROR - Value* tmpVal2 = getVal(*yyvsp[-3].TypeVal, yyvsp[0].ValIDVal); + Value* tmpVal2 = getVal(*(yyvsp[-3].TypeVal), (yyvsp[0].ValIDVal)); CHECK_FOR_ERROR - yyval.InstVal = new SetCondInst(yyvsp[-4].BinaryOpVal, tmpVal1, tmpVal2); - if (yyval.InstVal == 0) + (yyval.InstVal) = new SetCondInst((yyvsp[-4].BinaryOpVal), tmpVal1, tmpVal2); + if ((yyval.InstVal) == 0) GEN_ERROR("binary operator returned null!"); - delete yyvsp[-3].TypeVal; - ; - break;} -case 227: -#line 2468 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ + delete (yyvsp[-3].TypeVal); + ;} + break; + + case 228: +#line 2468 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { std::cerr << "WARNING: Use of eliminated 'not' instruction:" << " Replacing with 'xor'.\n"; - Value *Ones = ConstantIntegral::getAllOnesValue(yyvsp[0].ValueVal->getType()); + Value *Ones = ConstantIntegral::getAllOnesValue((yyvsp[0].ValueVal)->getType()); if (Ones == 0) GEN_ERROR("Expected integral type for not instruction!"); - yyval.InstVal = BinaryOperator::create(Instruction::Xor, yyvsp[0].ValueVal, Ones); - if (yyval.InstVal == 0) + (yyval.InstVal) = BinaryOperator::create(Instruction::Xor, (yyvsp[0].ValueVal), Ones); + if ((yyval.InstVal) == 0) GEN_ERROR("Could not create a xor instruction!"); CHECK_FOR_ERROR - ; - break;} -case 228: -#line 2481 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - if (yyvsp[0].ValueVal->getType() != Type::UByteTy) + ;} + break; + + case 229: +#line 2481 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + if ((yyvsp[0].ValueVal)->getType() != Type::UByteTy) GEN_ERROR("Shift amount must be ubyte!"); - if (!yyvsp[-2].ValueVal->getType()->isInteger()) + if (!(yyvsp[-2].ValueVal)->getType()->isInteger()) GEN_ERROR("Shift constant expression requires integer operand!"); - yyval.InstVal = new ShiftInst(yyvsp[-3].OtherOpVal, yyvsp[-2].ValueVal, yyvsp[0].ValueVal); + (yyval.InstVal) = new ShiftInst((yyvsp[-3].OtherOpVal), (yyvsp[-2].ValueVal), (yyvsp[0].ValueVal)); CHECK_FOR_ERROR - ; - break;} -case 229: -#line 2489 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - if (!yyvsp[0].TypeVal->get()->isFirstClassType()) + ;} + break; + + case 230: +#line 2489 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + if (!(yyvsp[0].TypeVal)->get()->isFirstClassType()) GEN_ERROR("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; - CHECK_FOR_ERROR - ; - break;} -case 230: -#line 2497 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - if (yyvsp[-4].ValueVal->getType() != Type::BoolTy) + (yyvsp[0].TypeVal)->get()->getDescription() + "'!"); + (yyval.InstVal) = new CastInst((yyvsp[-2].ValueVal), *(yyvsp[0].TypeVal)); + delete (yyvsp[0].TypeVal); + CHECK_FOR_ERROR + ;} + break; + + case 231: +#line 2497 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + if ((yyvsp[-4].ValueVal)->getType() != Type::BoolTy) GEN_ERROR("select condition must be boolean!"); - if (yyvsp[-2].ValueVal->getType() != yyvsp[0].ValueVal->getType()) + if ((yyvsp[-2].ValueVal)->getType() != (yyvsp[0].ValueVal)->getType()) GEN_ERROR("select value types should match!"); - yyval.InstVal = new SelectInst(yyvsp[-4].ValueVal, yyvsp[-2].ValueVal, yyvsp[0].ValueVal); + (yyval.InstVal) = new SelectInst((yyvsp[-4].ValueVal), (yyvsp[-2].ValueVal), (yyvsp[0].ValueVal)); CHECK_FOR_ERROR - ; - break;} -case 231: -#line 2505 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ + ;} + break; + + case 232: +#line 2505 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { NewVarArgs = true; - yyval.InstVal = new VAArgInst(yyvsp[-2].ValueVal, *yyvsp[0].TypeVal); - delete yyvsp[0].TypeVal; + (yyval.InstVal) = new VAArgInst((yyvsp[-2].ValueVal), *(yyvsp[0].TypeVal)); + delete (yyvsp[0].TypeVal); CHECK_FOR_ERROR - ; - break;} -case 232: -#line 2511 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ + ;} + break; + + case 233: +#line 2511 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { ObsoleteVarArgs = true; - const Type* ArgTy = yyvsp[-2].ValueVal->getType(); + const Type* ArgTy = (yyvsp[-2].ValueVal)->getType(); Function* NF = CurModule.CurrentModule-> getOrInsertFunction("llvm.va_copy", ArgTy, ArgTy, (Type *)0); @@ -4163,19 +4926,20 @@ //b = vaarg foo, t AllocaInst* foo = new AllocaInst(ArgTy, 0, "vaarg.fix"); CurBB->getInstList().push_back(foo); - CallInst* bar = new CallInst(NF, yyvsp[-2].ValueVal); + CallInst* bar = new CallInst(NF, (yyvsp[-2].ValueVal)); CurBB->getInstList().push_back(bar); CurBB->getInstList().push_back(new StoreInst(bar, foo)); - yyval.InstVal = new VAArgInst(foo, *yyvsp[0].TypeVal); - delete yyvsp[0].TypeVal; + (yyval.InstVal) = new VAArgInst(foo, *(yyvsp[0].TypeVal)); + delete (yyvsp[0].TypeVal); CHECK_FOR_ERROR - ; - break;} -case 233: -#line 2531 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ + ;} + break; + + case 234: +#line 2531 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { ObsoleteVarArgs = true; - const Type* ArgTy = yyvsp[-2].ValueVal->getType(); + const Type* ArgTy = (yyvsp[-2].ValueVal)->getType(); Function* NF = CurModule.CurrentModule-> getOrInsertFunction("llvm.va_copy", ArgTy, ArgTy, (Type *)0); @@ -4187,73 +4951,78 @@ //b = load foo AllocaInst* foo = new AllocaInst(ArgTy, 0, "vanext.fix"); CurBB->getInstList().push_back(foo); - CallInst* bar = new CallInst(NF, yyvsp[-2].ValueVal); + CallInst* bar = new CallInst(NF, (yyvsp[-2].ValueVal)); CurBB->getInstList().push_back(bar); CurBB->getInstList().push_back(new StoreInst(bar, foo)); - Instruction* tmp = new VAArgInst(foo, *yyvsp[0].TypeVal); + Instruction* tmp = new VAArgInst(foo, *(yyvsp[0].TypeVal)); CurBB->getInstList().push_back(tmp); - yyval.InstVal = new LoadInst(foo); - delete yyvsp[0].TypeVal; + (yyval.InstVal) = new LoadInst(foo); + delete (yyvsp[0].TypeVal); CHECK_FOR_ERROR - ; - break;} -case 234: -#line 2554 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - if (!ExtractElementInst::isValidOperands(yyvsp[-2].ValueVal, yyvsp[0].ValueVal)) + ;} + break; + + case 235: +#line 2554 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + if (!ExtractElementInst::isValidOperands((yyvsp[-2].ValueVal), (yyvsp[0].ValueVal))) GEN_ERROR("Invalid extractelement operands!"); - yyval.InstVal = new ExtractElementInst(yyvsp[-2].ValueVal, yyvsp[0].ValueVal); + (yyval.InstVal) = new ExtractElementInst((yyvsp[-2].ValueVal), (yyvsp[0].ValueVal)); CHECK_FOR_ERROR - ; - break;} -case 235: -#line 2560 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - if (!InsertElementInst::isValidOperands(yyvsp[-4].ValueVal, yyvsp[-2].ValueVal, yyvsp[0].ValueVal)) + ;} + break; + + case 236: +#line 2560 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + if (!InsertElementInst::isValidOperands((yyvsp[-4].ValueVal), (yyvsp[-2].ValueVal), (yyvsp[0].ValueVal))) GEN_ERROR("Invalid insertelement operands!"); - yyval.InstVal = new InsertElementInst(yyvsp[-4].ValueVal, yyvsp[-2].ValueVal, yyvsp[0].ValueVal); + (yyval.InstVal) = new InsertElementInst((yyvsp[-4].ValueVal), (yyvsp[-2].ValueVal), (yyvsp[0].ValueVal)); CHECK_FOR_ERROR - ; - break;} -case 236: -#line 2566 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - if (!ShuffleVectorInst::isValidOperands(yyvsp[-4].ValueVal, yyvsp[-2].ValueVal, yyvsp[0].ValueVal)) + ;} + break; + + case 237: +#line 2566 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + if (!ShuffleVectorInst::isValidOperands((yyvsp[-4].ValueVal), (yyvsp[-2].ValueVal), (yyvsp[0].ValueVal))) GEN_ERROR("Invalid shufflevector operands!"); - yyval.InstVal = new ShuffleVectorInst(yyvsp[-4].ValueVal, yyvsp[-2].ValueVal, yyvsp[0].ValueVal); + (yyval.InstVal) = new ShuffleVectorInst((yyvsp[-4].ValueVal), (yyvsp[-2].ValueVal), (yyvsp[0].ValueVal)); CHECK_FOR_ERROR - ; - break;} -case 237: -#line 2572 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - const Type *Ty = yyvsp[0].PHIList->front().first->getType(); + ;} + break; + + case 238: +#line 2572 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + const Type *Ty = (yyvsp[0].PHIList)->front().first->getType(); if (!Ty->isFirstClassType()) GEN_ERROR("PHI node operands must be of first class type!"); - yyval.InstVal = new PHINode(Ty); - ((PHINode*)yyval.InstVal)->reserveOperandSpace(yyvsp[0].PHIList->size()); - while (yyvsp[0].PHIList->begin() != yyvsp[0].PHIList->end()) { - if (yyvsp[0].PHIList->front().first->getType() != Ty) + (yyval.InstVal) = new PHINode(Ty); + ((PHINode*)(yyval.InstVal))->reserveOperandSpace((yyvsp[0].PHIList)->size()); + while ((yyvsp[0].PHIList)->begin() != (yyvsp[0].PHIList)->end()) { + if ((yyvsp[0].PHIList)->front().first->getType() != Ty) GEN_ERROR("All elements of a PHI node must be of the same type!"); - cast(yyval.InstVal)->addIncoming(yyvsp[0].PHIList->front().first, yyvsp[0].PHIList->front().second); - yyvsp[0].PHIList->pop_front(); + cast((yyval.InstVal))->addIncoming((yyvsp[0].PHIList)->front().first, (yyvsp[0].PHIList)->front().second); + (yyvsp[0].PHIList)->pop_front(); } - delete yyvsp[0].PHIList; // Free the list... + delete (yyvsp[0].PHIList); // Free the list... CHECK_FOR_ERROR - ; - break;} -case 238: -#line 2587 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ + ;} + break; + + case 239: +#line 2587 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { const PointerType *PFTy; const FunctionType *Ty; - if (!(PFTy = dyn_cast(yyvsp[-4].TypeVal->get())) || + if (!(PFTy = dyn_cast((yyvsp[-4].TypeVal)->get())) || !(Ty = dyn_cast(PFTy->getElementType()))) { // Pull out the types of all of the arguments... std::vector ParamTypes; - if (yyvsp[-1].ValueList) { - for (std::vector::iterator I = yyvsp[-1].ValueList->begin(), E = yyvsp[-1].ValueList->end(); + if ((yyvsp[-1].ValueList)) { + for (std::vector::iterator I = (yyvsp[-1].ValueList)->begin(), E = (yyvsp[-1].ValueList)->end(); I != E; ++I) ParamTypes.push_back((*I)->getType()); } @@ -4261,31 +5030,31 @@ bool isVarArg = ParamTypes.size() && ParamTypes.back() == Type::VoidTy; if (isVarArg) ParamTypes.pop_back(); - if (!(*yyvsp[-4].TypeVal)->isFirstClassType() && *yyvsp[-4].TypeVal != Type::VoidTy) + if (!(*(yyvsp[-4].TypeVal))->isFirstClassType() && *(yyvsp[-4].TypeVal) != Type::VoidTy) GEN_ERROR("LLVM functions cannot return aggregate types!"); - Ty = FunctionType::get(yyvsp[-4].TypeVal->get(), ParamTypes, isVarArg); + Ty = FunctionType::get((yyvsp[-4].TypeVal)->get(), ParamTypes, isVarArg); PFTy = PointerType::get(Ty); } - Value *V = getVal(PFTy, yyvsp[-3].ValIDVal); // Get the function we're calling... + Value *V = getVal(PFTy, (yyvsp[-3].ValIDVal)); // Get the function we're calling... CHECK_FOR_ERROR // Create the call node... - if (!yyvsp[-1].ValueList) { // Has no arguments? + if (!(yyvsp[-1].ValueList)) { // Has no arguments? // Make sure no arguments is a good thing! if (Ty->getNumParams() != 0) GEN_ERROR("No arguments passed to a function that " "expects arguments!"); - yyval.InstVal = new CallInst(V, std::vector()); + (yyval.InstVal) = new CallInst(V, std::vector()); } else { // Has arguments? // Loop through FunctionType's arguments and ensure they are specified // correctly! // FunctionType::param_iterator I = Ty->param_begin(); FunctionType::param_iterator E = Ty->param_end(); - std::vector::iterator ArgI = yyvsp[-1].ValueList->begin(), ArgE = yyvsp[-1].ValueList->end(); + std::vector::iterator ArgI = (yyvsp[-1].ValueList)->begin(), ArgE = (yyvsp[-1].ValueList)->end(); for (; ArgI != ArgE && I != E; ++ArgI, ++I) if ((*ArgI)->getType() != *I) @@ -4295,377 +5064,442 @@ if (I != E || (ArgI != ArgE && !Ty->isVarArg())) GEN_ERROR("Invalid number of parameters detected!"); - yyval.InstVal = new CallInst(V, *yyvsp[-1].ValueList); + (yyval.InstVal) = new CallInst(V, *(yyvsp[-1].ValueList)); } - cast(yyval.InstVal)->setTailCall(yyvsp[-6].BoolVal); - cast(yyval.InstVal)->setCallingConv(yyvsp[-5].UIntVal); - delete yyvsp[-4].TypeVal; - delete yyvsp[-1].ValueList; - CHECK_FOR_ERROR - ; - break;} -case 239: -#line 2646 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - yyval.InstVal = yyvsp[0].InstVal; + cast((yyval.InstVal))->setTailCall((yyvsp[-6].BoolVal)); + cast((yyval.InstVal))->setCallingConv((yyvsp[-5].UIntVal)); + delete (yyvsp[-4].TypeVal); + delete (yyvsp[-1].ValueList); CHECK_FOR_ERROR - ; - break;} -case 240: -#line 2653 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - yyval.ValueList = yyvsp[0].ValueList; - CHECK_FOR_ERROR - ; - break;} -case 241: -#line 2656 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - yyval.ValueList = new std::vector(); - CHECK_FOR_ERROR - ; - break;} -case 242: -#line 2661 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - yyval.BoolVal = true; + ;} + break; + + case 240: +#line 2646 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + (yyval.InstVal) = (yyvsp[0].InstVal); CHECK_FOR_ERROR - ; - break;} -case 243: -#line 2665 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - yyval.BoolVal = false; + ;} + break; + + case 241: +#line 2653 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + (yyval.ValueList) = (yyvsp[0].ValueList); CHECK_FOR_ERROR - ; - break;} -case 244: -#line 2672 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - yyval.InstVal = new MallocInst(*yyvsp[-1].TypeVal, 0, yyvsp[0].UIntVal); - delete yyvsp[-1].TypeVal; + ;} + break; + + case 242: +#line 2656 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + (yyval.ValueList) = new std::vector(); CHECK_FOR_ERROR - ; - break;} -case 245: -#line 2677 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - Value* tmpVal = getVal(yyvsp[-2].PrimType, yyvsp[-1].ValIDVal); + ;} + break; + + case 243: +#line 2661 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + (yyval.BoolVal) = true; CHECK_FOR_ERROR - yyval.InstVal = new MallocInst(*yyvsp[-4].TypeVal, tmpVal, yyvsp[0].UIntVal); - delete yyvsp[-4].TypeVal; - ; - break;} -case 246: -#line 2683 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - yyval.InstVal = new AllocaInst(*yyvsp[-1].TypeVal, 0, yyvsp[0].UIntVal); - delete yyvsp[-1].TypeVal; + ;} + break; + + case 244: +#line 2665 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + (yyval.BoolVal) = false; CHECK_FOR_ERROR - ; - break;} -case 247: -#line 2688 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - Value* tmpVal = getVal(yyvsp[-2].PrimType, yyvsp[-1].ValIDVal); + ;} + break; + + case 245: +#line 2672 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + (yyval.InstVal) = new MallocInst(*(yyvsp[-1].TypeVal), 0, (yyvsp[0].UIntVal)); + delete (yyvsp[-1].TypeVal); CHECK_FOR_ERROR - yyval.InstVal = new AllocaInst(*yyvsp[-4].TypeVal, tmpVal, yyvsp[0].UIntVal); - delete yyvsp[-4].TypeVal; - ; - break;} -case 248: -#line 2694 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - if (!isa(yyvsp[0].ValueVal->getType())) + ;} + break; + + case 246: +#line 2677 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + Value* tmpVal = getVal((yyvsp[-2].PrimType), (yyvsp[-1].ValIDVal)); + CHECK_FOR_ERROR + (yyval.InstVal) = new MallocInst(*(yyvsp[-4].TypeVal), tmpVal, (yyvsp[0].UIntVal)); + delete (yyvsp[-4].TypeVal); + ;} + break; + + case 247: +#line 2683 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + (yyval.InstVal) = new AllocaInst(*(yyvsp[-1].TypeVal), 0, (yyvsp[0].UIntVal)); + delete (yyvsp[-1].TypeVal); + CHECK_FOR_ERROR + ;} + break; + + case 248: +#line 2688 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + Value* tmpVal = getVal((yyvsp[-2].PrimType), (yyvsp[-1].ValIDVal)); + CHECK_FOR_ERROR + (yyval.InstVal) = new AllocaInst(*(yyvsp[-4].TypeVal), tmpVal, (yyvsp[0].UIntVal)); + delete (yyvsp[-4].TypeVal); + ;} + break; + + case 249: +#line 2694 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + if (!isa((yyvsp[0].ValueVal)->getType())) GEN_ERROR("Trying to free nonpointer type " + - yyvsp[0].ValueVal->getType()->getDescription() + "!"); - yyval.InstVal = new FreeInst(yyvsp[0].ValueVal); + (yyvsp[0].ValueVal)->getType()->getDescription() + "!"); + (yyval.InstVal) = new FreeInst((yyvsp[0].ValueVal)); CHECK_FOR_ERROR - ; - break;} -case 249: -#line 2702 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - if (!isa(yyvsp[-1].TypeVal->get())) + ;} + break; + + case 250: +#line 2702 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + if (!isa((yyvsp[-1].TypeVal)->get())) GEN_ERROR("Can't load from nonpointer type: " + - (*yyvsp[-1].TypeVal)->getDescription()); - if (!cast(yyvsp[-1].TypeVal->get())->getElementType()->isFirstClassType()) + (*(yyvsp[-1].TypeVal))->getDescription()); + if (!cast((yyvsp[-1].TypeVal)->get())->getElementType()->isFirstClassType()) GEN_ERROR("Can't load from pointer of non-first-class type: " + - (*yyvsp[-1].TypeVal)->getDescription()); - Value* tmpVal = getVal(*yyvsp[-1].TypeVal, yyvsp[0].ValIDVal); + (*(yyvsp[-1].TypeVal))->getDescription()); + Value* tmpVal = getVal(*(yyvsp[-1].TypeVal), (yyvsp[0].ValIDVal)); CHECK_FOR_ERROR - yyval.InstVal = new LoadInst(tmpVal, "", yyvsp[-3].BoolVal); - delete yyvsp[-1].TypeVal; - ; - break;} -case 250: -#line 2714 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - const PointerType *PT = dyn_cast(yyvsp[-1].TypeVal->get()); + (yyval.InstVal) = new LoadInst(tmpVal, "", (yyvsp[-3].BoolVal)); + delete (yyvsp[-1].TypeVal); + ;} + break; + + case 251: +#line 2714 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + const PointerType *PT = dyn_cast((yyvsp[-1].TypeVal)->get()); if (!PT) GEN_ERROR("Can't store to a nonpointer type: " + - (*yyvsp[-1].TypeVal)->getDescription()); + (*(yyvsp[-1].TypeVal))->getDescription()); const Type *ElTy = PT->getElementType(); - if (ElTy != yyvsp[-3].ValueVal->getType()) - GEN_ERROR("Can't store '" + yyvsp[-3].ValueVal->getType()->getDescription() + + if (ElTy != (yyvsp[-3].ValueVal)->getType()) + GEN_ERROR("Can't store '" + (yyvsp[-3].ValueVal)->getType()->getDescription() + "' into space of type '" + ElTy->getDescription() + "'!"); - Value* tmpVal = getVal(*yyvsp[-1].TypeVal, yyvsp[0].ValIDVal); + Value* tmpVal = getVal(*(yyvsp[-1].TypeVal), (yyvsp[0].ValIDVal)); CHECK_FOR_ERROR - yyval.InstVal = new StoreInst(yyvsp[-3].ValueVal, tmpVal, yyvsp[-5].BoolVal); - delete yyvsp[-1].TypeVal; - ; - break;} -case 251: -#line 2729 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" -{ - if (!isa(yyvsp[-2].TypeVal->get())) + (yyval.InstVal) = new StoreInst((yyvsp[-3].ValueVal), tmpVal, (yyvsp[-5].BoolVal)); + delete (yyvsp[-1].TypeVal); + ;} + break; + + case 252: +#line 2729 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + { + if (!isa((yyvsp[-2].TypeVal)->get())) GEN_ERROR("getelementptr insn requires pointer operand!"); // LLVM 1.2 and earlier used ubyte struct indices. Convert any ubyte struct // indices to uint struct indices for compatibility. generic_gep_type_iterator::iterator> - GTI = gep_type_begin(yyvsp[-2].TypeVal->get(), yyvsp[0].ValueList->begin(), yyvsp[0].ValueList->end()), - GTE = gep_type_end(yyvsp[-2].TypeVal->get(), yyvsp[0].ValueList->begin(), yyvsp[0].ValueList->end()); - for (unsigned i = 0, e = yyvsp[0].ValueList->size(); i != e && GTI != GTE; ++i, ++GTI) + GTI = gep_type_begin((yyvsp[-2].TypeVal)->get(), (yyvsp[0].ValueList)->begin(), (yyvsp[0].ValueList)->end()), + GTE = gep_type_end((yyvsp[-2].TypeVal)->get(), (yyvsp[0].ValueList)->begin(), (yyvsp[0].ValueList)->end()); + for (unsigned i = 0, e = (yyvsp[0].ValueList)->size(); i != e && GTI != GTE; ++i, ++GTI) if (isa(*GTI)) // Only change struct indices - if (ConstantUInt *CUI = dyn_cast((*yyvsp[0].ValueList)[i])) + if (ConstantInt *CUI = dyn_cast((*(yyvsp[0].ValueList))[i])) if (CUI->getType() == Type::UByteTy) - (*yyvsp[0].ValueList)[i] = ConstantExpr::getCast(CUI, Type::UIntTy); + (*(yyvsp[0].ValueList))[i] = ConstantExpr::getCast(CUI, Type::UIntTy); - if (!GetElementPtrInst::getIndexedType(*yyvsp[-2].TypeVal, *yyvsp[0].ValueList, true)) + if (!GetElementPtrInst::getIndexedType(*(yyvsp[-2].TypeVal), *(yyvsp[0].ValueList), true)) GEN_ERROR("Invalid getelementptr indices for type '" + - (*yyvsp[-2].TypeVal)->getDescription()+ "'!"); - Value* tmpVal = getVal(*yyvsp[-2].TypeVal, yyvsp[-1].ValIDVal); + (*(yyvsp[-2].TypeVal))->getDescription()+ "'!"); + Value* tmpVal = getVal(*(yyvsp[-2].TypeVal), (yyvsp[-1].ValIDVal)); CHECK_FOR_ERROR - yyval.InstVal = new GetElementPtrInst(tmpVal, *yyvsp[0].ValueList); - delete yyvsp[-2].TypeVal; - delete yyvsp[0].ValueList; - ; - break;} -} - /* the action file gets copied in in place of this dollarsign */ -#line 543 "/usr/share/bison.simple" + (yyval.InstVal) = new GetElementPtrInst(tmpVal, *(yyvsp[0].ValueList)); + delete (yyvsp[-2].TypeVal); + delete (yyvsp[0].ValueList); + ;} + break; + + + default: break; + } + +/* Line 1126 of yacc.c. */ +#line 5235 "llvmAsmParser.tab.c" yyvsp -= yylen; yyssp -= yylen; -#ifdef YYLSP_NEEDED - yylsp -= yylen; -#endif -#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 + + YY_STACK_PRINT (yyss, yyssp); *++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 - YYNTBASE] + *yyssp; - if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp) + yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; + if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) yystate = yytable[yystate]; else - yystate = yydefgoto[yyn - YYNTBASE]; + yystate = yydefgoto[yyn - YYNTOKENS]; goto yynewstate; -yyerrlab: /* here on detecting error */ - if (! yyerrstatus) - /* If not already recovering from an error, report this error. */ +/*------------------------------------. +| yyerrlab -- here on detecting error | +`------------------------------------*/ +yyerrlab: + /* If not already recovering from an error, report this error. */ + if (!yyerrstatus) { ++yynerrs; - -#ifdef YYERROR_VERBOSE +#if YYERROR_VERBOSE yyn = yypact[yystate]; - if (yyn > YYFLAG && yyn < YYLAST) + if (YYPACT_NINF < yyn && yyn < YYLAST) { - 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) - { - strcpy(msg, "parse error"); + int yytype = YYTRANSLATE (yychar); + YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); + YYSIZE_T yysize = yysize0; + YYSIZE_T yysize1; + int yysize_overflow = 0; + char *yymsg = 0; +# define YYERROR_VERBOSE_ARGS_MAXIMUM 5 + char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; + int yyx; - if (count < 5) +#if 0 + /* This is so xgettext sees the translatable formats that are + constructed on the fly. */ + YY_("syntax error, unexpected %s"); + YY_("syntax error, unexpected %s, expecting %s"); + YY_("syntax error, unexpected %s, expecting %s or %s"); + YY_("syntax error, unexpected %s, expecting %s or %s or %s"); + YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); +#endif + char *yyfmt; + char const *yyf; + static char const yyunexpected[] = "syntax error, unexpected %s"; + static char const yyexpecting[] = ", expecting %s"; + static char const yyor[] = " or %s"; + char yyformat[sizeof yyunexpected + + sizeof yyexpecting - 1 + + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) + * (sizeof yyor - 1))]; + char const *yyprefix = yyexpecting; + + /* 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 = 1; + + yyarg[0] = yytname[yytype]; + yyfmt = yystpcpy (yyformat, yyunexpected); + + for (yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) + { + if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) + { + yycount = 1; + yysize = yysize0; + yyformat[sizeof yyunexpected - 1] = '\0'; + break; + } + yyarg[yycount++] = yytname[yyx]; + yysize1 = yysize + yytnamerr (0, yytname[yyx]); + yysize_overflow |= yysize1 < yysize; + yysize = yysize1; + yyfmt = yystpcpy (yyfmt, yyprefix); + yyprefix = yyor; + } + + yyf = YY_(yyformat); + yysize1 = yysize + yystrlen (yyf); + yysize_overflow |= yysize1 < yysize; + yysize = yysize1; + + if (!yysize_overflow && yysize <= YYSTACK_ALLOC_MAXIMUM) + yymsg = (char *) YYSTACK_ALLOC (yysize); + if (yymsg) + { + /* Avoid sprintf, as that infringes on the user's name space. + Don't have undefined behavior even if the translation + produced a string with the wrong number of "%s"s. */ + char *yyp = yymsg; + int yyi = 0; + while ((*yyp = *yyf)) { - count = 0; - for (x = (yyn < 0 ? -yyn : 0); - x < (sizeof(yytname) / sizeof(char *)); x++) - if (yycheck[x + yyn] == x) - { - strcat(msg, count == 0 ? ", expecting `" : " or `"); - strcat(msg, yytname[x]); - strcat(msg, "'"); - count++; - } + if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) + { + yyp += yytnamerr (yyp, yyarg[yyi++]); + yyf += 2; + } + else + { + yyp++; + yyf++; + } } - yyerror(msg); - free(msg); + yyerror (yymsg); + YYSTACK_FREE (yymsg); } else - yyerror ("parse error; also virtual memory exceeded"); + { + yyerror (YY_("syntax error")); + goto yyexhaustedlab; + } } else #endif /* YYERROR_VERBOSE */ - yyerror("parse error"); + yyerror (YY_("syntax 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. */ - - /* return failure if at end of input */ - if (yychar == YYEOF) - YYABORT; + /* If just tried and failed to reuse look-ahead token after an + error, discard it. */ -#if YYDEBUG != 0 - if (yydebug) - fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]); -#endif - - yychar = YYEMPTY; + if (yychar <= YYEOF) + { + /* Return failure if at end of input. */ + if (yychar == YYEOF) + YYABORT; + } + else + { + yydestruct ("Error: discarding", yytoken, &yylval); + yychar = YYEMPTY; + } } - /* Else will try to reuse lookahead token - after shifting the error token. */ - - yyerrstatus = 3; /* Each real token shifted decrements this */ + /* Else will try to reuse look-ahead token after shifting the error + token. */ + goto yyerrlab1; - goto yyerrhandle; -yyerrdefault: /* current state does not do anything special for the error token. */ +/*---------------------------------------------------. +| yyerrorlab -- error raised explicitly by YYERROR. | +`---------------------------------------------------*/ +yyerrorlab: + + /* Pacify compilers like GCC when the user code never invokes + YYERROR and the label yyerrorlab therefore never appears in user + code. */ + if (0) + goto yyerrorlab; -#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 +yyvsp -= yylen; + yyssp -= yylen; + yystate = *yyssp; + goto yyerrlab1; -yyerrpop: /* pop the current state because it cannot handle the error token */ - if (yyssp == yyss) YYABORT; - yyvsp--; - yystate = *--yyssp; -#ifdef YYLSP_NEEDED - yylsp--; -#endif +/*-------------------------------------------------------------. +| yyerrlab1 -- common code for both syntax error and YYERROR. | +`-------------------------------------------------------------*/ +yyerrlab1: + yyerrstatus = 3; /* Each real token shifted decrements this. */ -#if YYDEBUG != 0 - if (yydebug) + for (;;) { - short *ssp1 = yyss - 1; - fprintf (stderr, "Error: state stack now"); - while (ssp1 != yyssp) - fprintf (stderr, " %d", *++ssp1); - fprintf (stderr, "\n"); - } -#endif - -yyerrhandle: + yyn = yypact[yystate]; + if (yyn != YYPACT_NINF) + { + yyn += YYTERROR; + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) + { + yyn = yytable[yyn]; + if (0 < yyn) + break; + } + } - yyn = yypact[yystate]; - if (yyn == YYFLAG) - goto yyerrdefault; + /* Pop the current state because it cannot handle the error token. */ + if (yyssp == yyss) + YYABORT; - 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; + yydestruct ("Error: popping", yystos[yystate], yyvsp); + YYPOPSTACK; + yystate = *yyssp; + YY_STACK_PRINT (yyss, yyssp); } - else if (yyn == 0) - goto yyerrpop; if (yyn == YYFINAL) YYACCEPT; -#if YYDEBUG != 0 - if (yydebug) - fprintf(stderr, "Shifting error token, "); -#endif - *++yyvsp = yylval; -#ifdef YYLSP_NEEDED - *++yylsp = yylloc; -#endif + + + /* Shift the error token. */ + YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); yystate = yyn; goto yynewstate; - yyacceptlab: - /* YYACCEPT comes here. */ - if (yyfree_stacks) - { - free (yyss); - free (yyvs); -#ifdef YYLSP_NEEDED - free (yyls); -#endif - } - return 0; - yyabortlab: - /* YYABORT comes here. */ - if (yyfree_stacks) - { - free (yyss); - free (yyvs); -#ifdef YYLSP_NEEDED - free (yyls); +/*-------------------------------------. +| yyacceptlab -- YYACCEPT comes here. | +`-------------------------------------*/ +yyacceptlab: + yyresult = 0; + goto yyreturn; + +/*-----------------------------------. +| yyabortlab -- YYABORT comes here. | +`-----------------------------------*/ +yyabortlab: + yyresult = 1; + goto yyreturn; + +#ifndef yyoverflow +/*-------------------------------------------------. +| yyexhaustedlab -- memory exhaustion comes here. | +`-------------------------------------------------*/ +yyexhaustedlab: + yyerror (YY_("memory exhausted")); + yyresult = 2; + /* Fall through. */ +#endif + +yyreturn: + if (yychar != YYEOF && yychar != YYEMPTY) + yydestruct ("Cleanup: discarding lookahead", + yytoken, &yylval); + while (yyssp != yyss) + { + yydestruct ("Cleanup: popping", + yystos[*yyssp], yyvsp); + YYPOPSTACK; + } +#ifndef yyoverflow + if (yyss != yyssa) + YYSTACK_FREE (yyss); #endif - } - return 1; + return yyresult; } -#line 2755 "/Users/resistor/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y" + + +#line 2755 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" void llvm::GenerateError(const std::string &message, int LineNo) { @@ -4688,3 +5522,4 @@ GenerateError(errMsg); return 0; } + Index: llvm/lib/AsmParser/llvmAsmParser.h.cvs diff -u llvm/lib/AsmParser/llvmAsmParser.h.cvs:1.13 llvm/lib/AsmParser/llvmAsmParser.h.cvs:1.13.2.1 --- llvm/lib/AsmParser/llvmAsmParser.h.cvs:1.13 Tue Oct 17 21:21:48 2006 +++ llvm/lib/AsmParser/llvmAsmParser.h.cvs Wed Oct 18 22:57:55 2006 @@ -1,4 +1,256 @@ -typedef union { +/* A Bison parser, made by GNU Bison 2.1. */ + +/* Skeleton parser for Yacc-like parsing with Bison, + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005 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., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, 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, + SECTION = 289, + VOLATILE = 290, + TO = 291, + DOTDOTDOT = 292, + NULL_TOK = 293, + UNDEF = 294, + CONST = 295, + INTERNAL = 296, + LINKONCE = 297, + WEAK = 298, + APPENDING = 299, + DLLIMPORT = 300, + DLLEXPORT = 301, + EXTERN_WEAK = 302, + OPAQUE = 303, + NOT = 304, + EXTERNAL = 305, + TARGET = 306, + TRIPLE = 307, + ENDIAN = 308, + POINTERSIZE = 309, + LITTLE = 310, + BIG = 311, + ALIGN = 312, + DEPLIBS = 313, + CALL = 314, + TAIL = 315, + ASM_TOK = 316, + MODULE = 317, + SIDEEFFECT = 318, + CC_TOK = 319, + CCC_TOK = 320, + CSRETCC_TOK = 321, + FASTCC_TOK = 322, + COLDCC_TOK = 323, + X86_STDCALLCC_TOK = 324, + X86_FASTCALLCC_TOK = 325, + DATA = 326, + RET = 327, + BR = 328, + SWITCH = 329, + INVOKE = 330, + UNWIND = 331, + UNREACHABLE = 332, + ADD = 333, + SUB = 334, + MUL = 335, + DIV = 336, + REM = 337, + AND = 338, + OR = 339, + XOR = 340, + SETLE = 341, + SETGE = 342, + SETLT = 343, + SETGT = 344, + SETEQ = 345, + SETNE = 346, + MALLOC = 347, + ALLOCA = 348, + FREE = 349, + LOAD = 350, + STORE = 351, + GETELEMENTPTR = 352, + PHI_TOK = 353, + CAST = 354, + SELECT = 355, + SHL = 356, + SHR = 357, + VAARG = 358, + EXTRACTELEMENT = 359, + INSERTELEMENT = 360, + SHUFFLEVECTOR = 361, + VAARG_old = 362, + VANEXT_old = 363 + }; +#endif +/* Tokens. */ +#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 SECTION 289 +#define VOLATILE 290 +#define TO 291 +#define DOTDOTDOT 292 +#define NULL_TOK 293 +#define UNDEF 294 +#define CONST 295 +#define INTERNAL 296 +#define LINKONCE 297 +#define WEAK 298 +#define APPENDING 299 +#define DLLIMPORT 300 +#define DLLEXPORT 301 +#define EXTERN_WEAK 302 +#define OPAQUE 303 +#define NOT 304 +#define EXTERNAL 305 +#define TARGET 306 +#define TRIPLE 307 +#define ENDIAN 308 +#define POINTERSIZE 309 +#define LITTLE 310 +#define BIG 311 +#define ALIGN 312 +#define DEPLIBS 313 +#define CALL 314 +#define TAIL 315 +#define ASM_TOK 316 +#define MODULE 317 +#define SIDEEFFECT 318 +#define CC_TOK 319 +#define CCC_TOK 320 +#define CSRETCC_TOK 321 +#define FASTCC_TOK 322 +#define COLDCC_TOK 323 +#define X86_STDCALLCC_TOK 324 +#define X86_FASTCALLCC_TOK 325 +#define DATA 326 +#define RET 327 +#define BR 328 +#define SWITCH 329 +#define INVOKE 330 +#define UNWIND 331 +#define UNREACHABLE 332 +#define ADD 333 +#define SUB 334 +#define MUL 335 +#define DIV 336 +#define REM 337 +#define AND 338 +#define OR 339 +#define XOR 340 +#define SETLE 341 +#define SETGE 342 +#define SETLT 343 +#define SETGT 344 +#define SETEQ 345 +#define SETNE 346 +#define MALLOC 347 +#define ALLOCA 348 +#define FREE 349 +#define LOAD 350 +#define STORE 351 +#define GETELEMENTPTR 352 +#define PHI_TOK 353 +#define CAST 354 +#define SELECT 355 +#define SHL 356 +#define SHR 357 +#define VAARG 358 +#define EXTRACTELEMENT 359 +#define INSERTELEMENT 360 +#define SHUFFLEVECTOR 361 +#define VAARG_old 362 +#define VANEXT_old 363 + + + + +#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) +#line 974 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +typedef union YYSTYPE { llvm::Module *ModuleVal; llvm::Function *FunctionVal; std::pair *ArgVal; @@ -37,112 +289,14 @@ llvm::Instruction::OtherOps OtherOpVal; llvm::Module::Endianness Endianness; } YYSTYPE; -#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 SECTION 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 DLLIMPORT 299 -#define DLLEXPORT 300 -#define EXTERN_WEAK 301 -#define OPAQUE 302 -#define NOT 303 -#define EXTERNAL 304 -#define TARGET 305 -#define TRIPLE 306 -#define ENDIAN 307 -#define POINTERSIZE 308 -#define LITTLE 309 -#define BIG 310 -#define ALIGN 311 -#define DEPLIBS 312 -#define CALL 313 -#define TAIL 314 -#define ASM_TOK 315 -#define MODULE 316 -#define SIDEEFFECT 317 -#define CC_TOK 318 -#define CCC_TOK 319 -#define CSRETCC_TOK 320 -#define FASTCC_TOK 321 -#define COLDCC_TOK 322 -#define X86_STDCALLCC_TOK 323 -#define X86_FASTCALLCC_TOK 324 -#define DATA 325 -#define RET 326 -#define BR 327 -#define SWITCH 328 -#define INVOKE 329 -#define UNWIND 330 -#define UNREACHABLE 331 -#define ADD 332 -#define SUB 333 -#define MUL 334 -#define DIV 335 -#define REM 336 -#define AND 337 -#define OR 338 -#define XOR 339 -#define SETLE 340 -#define SETGE 341 -#define SETLT 342 -#define SETGT 343 -#define SETEQ 344 -#define SETNE 345 -#define MALLOC 346 -#define ALLOCA 347 -#define FREE 348 -#define LOAD 349 -#define STORE 350 -#define GETELEMENTPTR 351 -#define PHI_TOK 352 -#define CAST 353 -#define SELECT 354 -#define SHL 355 -#define SHR 356 -#define VAARG 357 -#define EXTRACTELEMENT 358 -#define INSERTELEMENT 359 -#define SHUFFLEVECTOR 360 -#define VAARG_old 361 -#define VANEXT_old 362 - +/* Line 1447 of yacc.c. */ +#line 294 "llvmAsmParser.tab.h" +# define yystype YYSTYPE /* obsolescent; will be withdrawn */ +# define YYSTYPE_IS_DECLARED 1 +# define YYSTYPE_IS_TRIVIAL 1 +#endif extern YYSTYPE llvmAsmlval; + + + Index: llvm/lib/AsmParser/llvmAsmParser.y diff -u llvm/lib/AsmParser/llvmAsmParser.y:1.266 llvm/lib/AsmParser/llvmAsmParser.y:1.266.2.1 --- llvm/lib/AsmParser/llvmAsmParser.y:1.266 Tue Oct 17 21:19:55 2006 +++ llvm/lib/AsmParser/llvmAsmParser.y Wed Oct 18 22:57:55 2006 @@ -307,25 +307,25 @@ // Check to make sure that "Ty" is an integral type, and that our // value will fit into the specified type... case ValID::ConstSIntVal: // Is it a constant pool reference?? - if (!ConstantSInt::isValueValidForType(Ty, D.ConstPool64)) { + if (!ConstantInt::isValueValidForType(Ty, D.ConstPool64)) { GenerateError("Signed integral constant '" + itostr(D.ConstPool64) + "' is invalid for type '" + Ty->getDescription() + "'!"); return 0; } - return ConstantSInt::get(Ty, D.ConstPool64); + return ConstantInt::get(Ty, D.ConstPool64); case ValID::ConstUIntVal: // Is it an unsigned const pool reference? - if (!ConstantUInt::isValueValidForType(Ty, D.UConstPool64)) { - if (!ConstantSInt::isValueValidForType(Ty, D.ConstPool64)) { + if (!ConstantInt::isValueValidForType(Ty, D.UConstPool64)) { + if (!ConstantInt::isValueValidForType(Ty, D.ConstPool64)) { GenerateError("Integral constant '" + utostr(D.UConstPool64) + "' is invalid or out of range!"); return 0; } else { // This is really a signed reference. Transmogrify. - return ConstantSInt::get(Ty, D.ConstPool64); + return ConstantInt::get(Ty, D.ConstPool64); } } else { - return ConstantUInt::get(Ty, D.UConstPool64); + return ConstantInt::get(Ty, D.UConstPool64); } case ValID::ConstFPVal: // Is it a floating point const pool reference? @@ -1394,11 +1394,11 @@ std::vector Vals; if (ETy == Type::SByteTy) { for (signed char *C = (signed char *)$3; C != (signed char *)EndStr; ++C) - Vals.push_back(ConstantSInt::get(ETy, *C)); + Vals.push_back(ConstantInt::get(ETy, *C)); } else if (ETy == Type::UByteTy) { for (unsigned char *C = (unsigned char *)$3; C != (unsigned char*)EndStr; ++C) - Vals.push_back(ConstantUInt::get(ETy, *C)); + Vals.push_back(ConstantInt::get(ETy, *C)); } else { free($3); GEN_ERROR("Cannot build string arrays of non byte sized elements!"); @@ -1561,15 +1561,15 @@ }; ConstVal : SIntType EINT64VAL { // integral constants - if (!ConstantSInt::isValueValidForType($1, $2)) + if (!ConstantInt::isValueValidForType($1, $2)) GEN_ERROR("Constant value doesn't fit in type!"); - $$ = ConstantSInt::get($1, $2); + $$ = ConstantInt::get($1, $2); CHECK_FOR_ERROR } | UIntType EUINT64VAL { // integral constants - if (!ConstantUInt::isValueValidForType($1, $2)) + if (!ConstantInt::isValueValidForType($1, $2)) GEN_ERROR("Constant value doesn't fit in type!"); - $$ = ConstantUInt::get($1, $2); + $$ = ConstantInt::get($1, $2); CHECK_FOR_ERROR } | BOOL TRUETOK { // Boolean constants @@ -1610,7 +1610,7 @@ GTE = gep_type_end($3->getType(), $4->begin(), $4->end()); for (unsigned i = 0, e = $4->size(); i != e && GTI != GTE; ++i, ++GTI) if (isa(*GTI)) // Only change struct indices - if (ConstantUInt *CUI = dyn_cast((*$4)[i])) + if (ConstantInt *CUI = dyn_cast((*$4)[i])) if (CUI->getType() == Type::UByteTy) (*$4)[i] = ConstantExpr::getCast(CUI, Type::UIntTy); @@ -2737,7 +2737,7 @@ GTE = gep_type_end($2->get(), $4->begin(), $4->end()); for (unsigned i = 0, e = $4->size(); i != e && GTI != GTE; ++i, ++GTI) if (isa(*GTI)) // Only change struct indices - if (ConstantUInt *CUI = dyn_cast((*$4)[i])) + if (ConstantInt *CUI = dyn_cast((*$4)[i])) if (CUI->getType() == Type::UByteTy) (*$4)[i] = ConstantExpr::getCast(CUI, Type::UIntTy); Index: llvm/lib/AsmParser/llvmAsmParser.y.cvs diff -u llvm/lib/AsmParser/llvmAsmParser.y.cvs:1.18 llvm/lib/AsmParser/llvmAsmParser.y.cvs:1.18.2.1 --- llvm/lib/AsmParser/llvmAsmParser.y.cvs:1.18 Tue Oct 17 21:21:48 2006 +++ llvm/lib/AsmParser/llvmAsmParser.y.cvs Wed Oct 18 22:57:55 2006 @@ -307,25 +307,25 @@ // Check to make sure that "Ty" is an integral type, and that our // value will fit into the specified type... case ValID::ConstSIntVal: // Is it a constant pool reference?? - if (!ConstantSInt::isValueValidForType(Ty, D.ConstPool64)) { + if (!ConstantInt::isValueValidForType(Ty, D.ConstPool64)) { GenerateError("Signed integral constant '" + itostr(D.ConstPool64) + "' is invalid for type '" + Ty->getDescription() + "'!"); return 0; } - return ConstantSInt::get(Ty, D.ConstPool64); + return ConstantInt::get(Ty, D.ConstPool64); case ValID::ConstUIntVal: // Is it an unsigned const pool reference? - if (!ConstantUInt::isValueValidForType(Ty, D.UConstPool64)) { - if (!ConstantSInt::isValueValidForType(Ty, D.ConstPool64)) { + if (!ConstantInt::isValueValidForType(Ty, D.UConstPool64)) { + if (!ConstantInt::isValueValidForType(Ty, D.ConstPool64)) { GenerateError("Integral constant '" + utostr(D.UConstPool64) + "' is invalid or out of range!"); return 0; } else { // This is really a signed reference. Transmogrify. - return ConstantSInt::get(Ty, D.ConstPool64); + return ConstantInt::get(Ty, D.ConstPool64); } } else { - return ConstantUInt::get(Ty, D.UConstPool64); + return ConstantInt::get(Ty, D.UConstPool64); } case ValID::ConstFPVal: // Is it a floating point const pool reference? @@ -1394,11 +1394,11 @@ std::vector Vals; if (ETy == Type::SByteTy) { for (signed char *C = (signed char *)$3; C != (signed char *)EndStr; ++C) - Vals.push_back(ConstantSInt::get(ETy, *C)); + Vals.push_back(ConstantInt::get(ETy, *C)); } else if (ETy == Type::UByteTy) { for (unsigned char *C = (unsigned char *)$3; C != (unsigned char*)EndStr; ++C) - Vals.push_back(ConstantUInt::get(ETy, *C)); + Vals.push_back(ConstantInt::get(ETy, *C)); } else { free($3); GEN_ERROR("Cannot build string arrays of non byte sized elements!"); @@ -1561,15 +1561,15 @@ }; ConstVal : SIntType EINT64VAL { // integral constants - if (!ConstantSInt::isValueValidForType($1, $2)) + if (!ConstantInt::isValueValidForType($1, $2)) GEN_ERROR("Constant value doesn't fit in type!"); - $$ = ConstantSInt::get($1, $2); + $$ = ConstantInt::get($1, $2); CHECK_FOR_ERROR } | UIntType EUINT64VAL { // integral constants - if (!ConstantUInt::isValueValidForType($1, $2)) + if (!ConstantInt::isValueValidForType($1, $2)) GEN_ERROR("Constant value doesn't fit in type!"); - $$ = ConstantUInt::get($1, $2); + $$ = ConstantInt::get($1, $2); CHECK_FOR_ERROR } | BOOL TRUETOK { // Boolean constants @@ -1610,7 +1610,7 @@ GTE = gep_type_end($3->getType(), $4->begin(), $4->end()); for (unsigned i = 0, e = $4->size(); i != e && GTI != GTE; ++i, ++GTI) if (isa(*GTI)) // Only change struct indices - if (ConstantUInt *CUI = dyn_cast((*$4)[i])) + if (ConstantInt *CUI = dyn_cast((*$4)[i])) if (CUI->getType() == Type::UByteTy) (*$4)[i] = ConstantExpr::getCast(CUI, Type::UIntTy); @@ -2737,7 +2737,7 @@ GTE = gep_type_end($2->get(), $4->begin(), $4->end()); for (unsigned i = 0, e = $4->size(); i != e && GTI != GTE; ++i, ++GTI) if (isa(*GTI)) // Only change struct indices - if (ConstantUInt *CUI = dyn_cast((*$4)[i])) + if (ConstantInt *CUI = dyn_cast((*$4)[i])) if (CUI->getType() == Type::UByteTy) (*$4)[i] = ConstantExpr::getCast(CUI, Type::UIntTy); From reid at x10sys.com Wed Oct 18 22:59:00 2006 From: reid at x10sys.com (Reid Spencer) Date: Wed, 18 Oct 2006 22:59:00 -0500 Subject: [llvm-commits] [SignlessTypes] CVS: llvm/lib/Target/CBackend/Writer.cpp Message-ID: <200610190359.k9J3x0bR003855@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/CBackend: Writer.cpp updated: 1.272 -> 1.272.2.1 --- Log message: For PR950: http://llvm.org/PR950 : This commit (on SignlessTypes branch) provides the first Iteration for moving LLVM away from Signed types. This patch removes the ConstantSInt and ConstantUInt classes from Type.h and makes all necessary changes in LLVM to compensate. --- Diffs of the changes: (+10 -10) Writer.cpp | 20 ++++++++++---------- 1 files changed, 10 insertions(+), 10 deletions(-) Index: llvm/lib/Target/CBackend/Writer.cpp diff -u llvm/lib/Target/CBackend/Writer.cpp:1.272 llvm/lib/Target/CBackend/Writer.cpp:1.272.2.1 --- llvm/lib/Target/CBackend/Writer.cpp:1.272 Thu Sep 28 18:19:29 2006 +++ llvm/lib/Target/CBackend/Writer.cpp Wed Oct 18 22:57:56 2006 @@ -642,31 +642,31 @@ break; case Type::SByteTyID: case Type::ShortTyID: - Out << cast(CPV)->getValue(); + Out << cast(CPV)->getSExtValue(); break; case Type::IntTyID: - if ((int)cast(CPV)->getValue() == (int)0x80000000) + if ((int)cast(CPV)->getSExtValue() == (int)0x80000000) Out << "((int)0x80000000U)"; // Handle MININT specially to avoid warning else - Out << cast(CPV)->getValue(); + Out << cast(CPV)->getSExtValue(); break; case Type::LongTyID: - if (cast(CPV)->isMinValue()) + if (cast(CPV)->isMinValue()) Out << "(/*INT64_MIN*/(-9223372036854775807LL)-1)"; else - Out << cast(CPV)->getValue() << "ll"; + Out << cast(CPV)->getSExtValue() << "ll"; break; case Type::UByteTyID: case Type::UShortTyID: - Out << cast(CPV)->getValue(); + Out << cast(CPV)->getZExtValue(); break; case Type::UIntTyID: - Out << cast(CPV)->getValue() << 'u'; + Out << cast(CPV)->getZExtValue() << 'u'; break; case Type::ULongTyID: - Out << cast(CPV)->getValue() << "ull"; + Out << cast(CPV)->getZExtValue() << "ull"; break; case Type::FloatTyID: @@ -2002,14 +2002,14 @@ // Print out the -> operator if possible... if (TmpI != E && isa(*TmpI)) { Out << (HasImplicitAddress ? "." : "->"); - Out << "field" << cast(TmpI.getOperand())->getValue(); + Out << "field" << cast(TmpI.getOperand())->getZExtValue(); I = ++TmpI; } } for (; I != E; ++I) if (isa(*I)) { - Out << ".field" << cast(I.getOperand())->getValue(); + Out << ".field" << cast(I.getOperand())->getZExtValue(); } else { Out << '['; writeOperand(I.getOperand()); From reid at x10sys.com Wed Oct 18 23:01:05 2006 From: reid at x10sys.com (Reid Spencer) Date: Wed, 18 Oct 2006 23:01:05 -0500 Subject: [llvm-commits] [SignlessTypes] CVS: llvm-test/SingleSource/UnitTests/Vector/SSE/sse.expandfft.c sse.stepfft.c Message-ID: <200610190401.k9J415Np004030@zion.cs.uiuc.edu> Changes in directory llvm-test/SingleSource/UnitTests/Vector/SSE: sse.expandfft.c updated: 1.3 -> 1.3.6.1 sse.stepfft.c updated: 1.2 -> 1.2.6.1 --- Log message: For PR950: http://llvm.org/PR950 : This commit (on SignlessTypes branch) provides the first Iteration for moving LLVM away from Signed types. This patch removes the ConstantSInt and ConstantUInt classes from Type.h and makes all necessary changes in LLVM to compensate. --- Diffs of the changes: (+11 -9) sse.expandfft.c | 12 +++++++----- sse.stepfft.c | 8 ++++---- 2 files changed, 11 insertions(+), 9 deletions(-) Index: llvm-test/SingleSource/UnitTests/Vector/SSE/sse.expandfft.c diff -u llvm-test/SingleSource/UnitTests/Vector/SSE/sse.expandfft.c:1.3 llvm-test/SingleSource/UnitTests/Vector/SSE/sse.expandfft.c:1.3.6.1 --- llvm-test/SingleSource/UnitTests/Vector/SSE/sse.expandfft.c:1.3 Tue Apr 4 13:51:30 2006 +++ llvm-test/SingleSource/UnitTests/Vector/SSE/sse.expandfft.c Wed Oct 18 23:00:51 2006 @@ -5,6 +5,7 @@ #include "xmmintrin.h" #define N 1024 #define N2 N/2 + main() { /* @@ -14,15 +15,16 @@ wpp, SAM. Math. ETHZ 21 May, 2002 */ int first,i,icase,it,n; - float error,fnm1,seed,sign,z0,z1,ggl(); + double error; + float fnm1,seed,sign,z0,z1,ggl(); float *x,*y,*z,*w; float t1,ln2,mflops; void cffti(),cfft2(); /* allocate storage for x,y,z,w on 4-word bndr. */ - x = (float *)_mm_malloc(8*N, 16); - y = (float *)_mm_malloc(8*N, 16); - z = (float *)_mm_malloc(8*N, 16); - w = (float *)_mm_malloc(4*N, 16); + x = (float *)valloc(8*N); + y = (float *)valloc(8*N); + z = (float *)valloc(8*N); + w = (float *)valloc(4*N); first = 1; seed = 331.0; for(icase=0;icase<2;icase++){ Index: llvm-test/SingleSource/UnitTests/Vector/SSE/sse.stepfft.c diff -u llvm-test/SingleSource/UnitTests/Vector/SSE/sse.stepfft.c:1.2 llvm-test/SingleSource/UnitTests/Vector/SSE/sse.stepfft.c:1.2.6.1 --- llvm-test/SingleSource/UnitTests/Vector/SSE/sse.stepfft.c:1.2 Tue Apr 4 13:52:26 2006 +++ llvm-test/SingleSource/UnitTests/Vector/SSE/sse.stepfft.c Wed Oct 18 23:00:51 2006 @@ -17,10 +17,10 @@ float t1,ln2,mflops; void cffti(),cfft2(); /* allocate storage for x,y,z,w on 4-word bndr. */ - x = (float *)_mm_malloc(8*N, 16); - y = (float *)_mm_malloc(8*N, 16); - z = (float *)_mm_malloc(8*N, 16); - w = (float *)_mm_malloc(4*N, 16); + x = (float *)valloc(8*N); + y = (float *)valloc(8*N); + z = (float *)valloc(8*N); + w = (float *)valloc(4*N); first = 1; seed = 331.0; for(icase=0;icase<2;icase++){ From rafael.espindola at gmail.com Thu Oct 19 05:56:58 2006 From: rafael.espindola at gmail.com (Rafael Espindola) Date: Thu, 19 Oct 2006 05:56:58 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp Message-ID: <200610191056.k9JAuwbA019342@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/ARM: ARMISelDAGToDAG.cpp updated: 1.74 -> 1.75 --- Log message: expand brind so that we don't have to implement jump tables right now --- Diffs of the changes: (+1 -0) ARMISelDAGToDAG.cpp | 1 + 1 files changed, 1 insertion(+) Index: llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp diff -u llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp:1.74 llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp:1.75 --- llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp:1.74 Wed Oct 18 07:03:07 2006 +++ llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp Thu Oct 19 05:56:43 2006 @@ -66,6 +66,7 @@ setOperationAction(ISD::SETCC, MVT::f64, Expand); setOperationAction(ISD::SELECT_CC, MVT::i32, Custom); + setOperationAction(ISD::BRIND, MVT::i32, Expand); setOperationAction(ISD::BR_CC, MVT::i32, Custom); setOperationAction(ISD::BR_CC, MVT::f32, Custom); setOperationAction(ISD::BR_CC, MVT::f64, Custom); From rafael.espindola at gmail.com Thu Oct 19 07:07:04 2006 From: rafael.espindola at gmail.com (Rafael Espindola) Date: Thu, 19 Oct 2006 07:07:04 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp Message-ID: <200610191207.k9JC74s0020363@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/ARM: ARMISelDAGToDAG.cpp updated: 1.75 -> 1.76 --- Log message: expand SIGN_EXTEND_INREG --- Diffs of the changes: (+4 -0) ARMISelDAGToDAG.cpp | 4 ++++ 1 files changed, 4 insertions(+) Index: llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp diff -u llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp:1.75 llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp:1.76 --- llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp:1.75 Thu Oct 19 05:56:43 2006 +++ llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp Thu Oct 19 07:06:50 2006 @@ -59,6 +59,10 @@ setOperationAction(ISD::GlobalAddress, MVT::i32, Custom); setOperationAction(ISD::ConstantPool, MVT::i32, Custom); + setOperationAction(ISD::SIGN_EXTEND_INREG, MVT::i16, Expand); + setOperationAction(ISD::SIGN_EXTEND_INREG, MVT::i8 , Expand); + setOperationAction(ISD::SIGN_EXTEND_INREG, MVT::i1 , Expand); + setOperationAction(ISD::SELECT, MVT::i32, Expand); setOperationAction(ISD::SETCC, MVT::i32, Expand); From rafael.espindola at gmail.com Thu Oct 19 07:45:18 2006 From: rafael.espindola at gmail.com (Rafael Espindola) Date: Thu, 19 Oct 2006 07:45:18 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/ARM/ARMInstrInfo.td Message-ID: <200610191245.k9JCjIpm020924@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/ARM: ARMInstrInfo.td updated: 1.66 -> 1.67 --- Log message: implement extloadi8 and extloadi16 --- Diffs of the changes: (+8 -0) ARMInstrInfo.td | 8 ++++++++ 1 files changed, 8 insertions(+) Index: llvm/lib/Target/ARM/ARMInstrInfo.td diff -u llvm/lib/Target/ARM/ARMInstrInfo.td:1.66 llvm/lib/Target/ARM/ARMInstrInfo.td:1.67 --- llvm/lib/Target/ARM/ARMInstrInfo.td:1.66 Wed Oct 18 11:21:43 2006 +++ llvm/lib/Target/ARM/ARMInstrInfo.td Thu Oct 19 07:45:04 2006 @@ -160,6 +160,10 @@ "ldrb $dst, [$addr]", [(set IntRegs:$dst, (zextloadi8 IntRegs:$addr))]>; +def LDRB2 : InstARM<(ops IntRegs:$dst, IntRegs:$addr), + "ldrb $dst, [$addr]", + [(set IntRegs:$dst, (extloadi8 IntRegs:$addr))]>; + def LDRSB : InstARM<(ops IntRegs:$dst, IntRegs:$addr), "ldrsb $dst, [$addr]", [(set IntRegs:$dst, (sextloadi8 IntRegs:$addr))]>; @@ -168,6 +172,10 @@ "ldrh $dst, [$addr]", [(set IntRegs:$dst, (zextloadi16 IntRegs:$addr))]>; +def LDRH2 : InstARM<(ops IntRegs:$dst, IntRegs:$addr), + "ldrh $dst, [$addr]", + [(set IntRegs:$dst, (extloadi16 IntRegs:$addr))]>; + def LDRSH : InstARM<(ops IntRegs:$dst, IntRegs:$addr), "ldrsh $dst, [$addr]", [(set IntRegs:$dst, (sextloadi16 IntRegs:$addr))]>; From rafael.espindola at gmail.com Thu Oct 19 08:30:54 2006 From: rafael.espindola at gmail.com (Rafael Espindola) Date: Thu, 19 Oct 2006 08:30:54 -0500 Subject: [llvm-commits] CVS: llvm/test/Regression/CodeGen/ARM/constants.ll Message-ID: <200610191330.k9JDUs2t021592@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/CodeGen/ARM: constants.ll updated: 1.1 -> 1.2 --- Log message: print common symbols --- Diffs of the changes: (+4 -1) constants.ll | 5 ++++- 1 files changed, 4 insertions(+), 1 deletion(-) Index: llvm/test/Regression/CodeGen/ARM/constants.ll diff -u llvm/test/Regression/CodeGen/ARM/constants.ll:1.1 llvm/test/Regression/CodeGen/ARM/constants.ll:1.2 --- llvm/test/Regression/CodeGen/ARM/constants.ll:1.1 Thu Sep 21 06:29:52 2006 +++ llvm/test/Regression/CodeGen/ARM/constants.ll Thu Oct 19 08:30:40 2006 @@ -4,7 +4,10 @@ ; RUN: llvm-as < %s | llc -march=arm | grep "mov r0, #256" | wc -l | grep 1 && ; RUN: llvm-as < %s | llc -march=arm | grep ".word.*257" | wc -l | grep 1 && ; RUN: llvm-as < %s | llc -march=arm | grep "mov r0, #-1073741761" | wc -l | grep 1 && -; RUN: llvm-as < %s | llc -march=arm | grep "mov r0, #1008" | wc -l | grep 1 +; RUN: llvm-as < %s | llc -march=arm | grep "mov r0, #1008" | wc -l | grep 1 && +; RUN: llvm-as < %s | llc -march=arm | grep "\.comm.*a,4,4" | wc -l | grep 1 + +%a = internal global int 0 uint %f1() { ret uint 0 From rafael.espindola at gmail.com Thu Oct 19 08:30:56 2006 From: rafael.espindola at gmail.com (Rafael Espindola) Date: Thu, 19 Oct 2006 08:30:56 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/ARM/ARMAsmPrinter.cpp Message-ID: <200610191330.k9JDUuOJ021598@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/ARM: ARMAsmPrinter.cpp updated: 1.24 -> 1.25 --- Log message: print common symbols --- Diffs of the changes: (+33 -17) ARMAsmPrinter.cpp | 50 +++++++++++++++++++++++++++++++++----------------- 1 files changed, 33 insertions(+), 17 deletions(-) Index: llvm/lib/Target/ARM/ARMAsmPrinter.cpp diff -u llvm/lib/Target/ARM/ARMAsmPrinter.cpp:1.24 llvm/lib/Target/ARM/ARMAsmPrinter.cpp:1.25 --- llvm/lib/Target/ARM/ARMAsmPrinter.cpp:1.24 Tue Oct 17 13:04:52 2006 +++ llvm/lib/Target/ARM/ARMAsmPrinter.cpp Thu Oct 19 08:30:40 2006 @@ -278,26 +278,42 @@ unsigned Size = TD->getTypeSize(C->getType()); unsigned Align = TD->getTypeAlignment(C->getType()); - switch (I->getLinkage()) { - default: - assert(0 && "Unknown linkage type!"); - break; - case GlobalValue::ExternalLinkage: - O << "\t.globl " << name << "\n"; - break; - case GlobalValue::InternalLinkage: - break; - } + if (C->isNullValue() && + (I->hasLinkOnceLinkage() || I->hasInternalLinkage() || + I->hasWeakLinkage())) { + SwitchToDataSection(".data", I); + if (I->hasInternalLinkage()) + O << "\t.local " << name << "\n"; + + O << "\t.comm " << name << "," << TD->getTypeSize(C->getType()) + << "," << (unsigned)TD->getTypeAlignment(C->getType()); + O << "\t\t"; + O << TAI->getCommentString() << " "; + WriteAsOperand(O, I, true, true, &M); + O << "\n"; + } else { + switch (I->getLinkage()) { + default: + assert(0 && "Unknown linkage type!"); + break; + case GlobalValue::ExternalLinkage: + O << "\t.globl " << name << "\n"; + break; + case GlobalValue::InternalLinkage: + break; + } - assert (!C->isNullValue()); - SwitchToDataSection(".data", I); + assert (!C->isNullValue()); + SwitchToDataSection(".data", I); - EmitAlignment(Align, I); - O << "\t.type " << name << ", %object\n"; - O << "\t.size " << name << ", " << Size << "\n"; - O << name << ":\n"; - EmitGlobalConstant(C); + EmitAlignment(Align, I); + O << "\t.type " << name << ", %object\n"; + O << "\t.size " << name << ", " << Size << "\n"; + O << name << ":\n"; + EmitGlobalConstant(C); + } } + AsmPrinter::doFinalization(M); return false; // success } From rafael.espindola at gmail.com Thu Oct 19 08:45:15 2006 From: rafael.espindola at gmail.com (Rafael Espindola) Date: Thu, 19 Oct 2006 08:45:15 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/ARM/ARMInstrInfo.td Message-ID: <200610191345.k9JDjFHB021809@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/ARM: ARMInstrInfo.td updated: 1.67 -> 1.68 --- Log message: implement undef --- Diffs of the changes: (+8 -0) ARMInstrInfo.td | 8 ++++++++ 1 files changed, 8 insertions(+) Index: llvm/lib/Target/ARM/ARMInstrInfo.td diff -u llvm/lib/Target/ARM/ARMInstrInfo.td:1.67 llvm/lib/Target/ARM/ARMInstrInfo.td:1.68 --- llvm/lib/Target/ARM/ARMInstrInfo.td:1.67 Thu Oct 19 07:45:04 2006 +++ llvm/lib/Target/ARM/ARMInstrInfo.td Thu Oct 19 08:45:00 2006 @@ -143,6 +143,14 @@ "!ADJCALLSTACKDOWN $amt", [(callseq_start imm:$amt)]>, Imp<[R13],[R13]>; +def IMPLICIT_DEF_Int : InstARM<(ops IntRegs:$dst), + "@IMPLICIT_DEF $dst", + [(set IntRegs:$dst, (undef))]>; +def IMPLICIT_DEF_FP : InstARM<(ops FPRegs:$dst), "@IMPLICIT_DEF $dst", + [(set FPRegs:$dst, (undef))]>; +def IMPLICIT_DEF_DFP : InstARM<(ops DFPRegs:$dst), "@IMPLICIT_DEF $dst", + [(set DFPRegs:$dst, (undef))]>; + let isReturn = 1 in { def bx: InstARM<(ops), "bx r14", [(retflag)]>; } From reid at x10sys.com Thu Oct 19 10:24:18 2006 From: reid at x10sys.com (Reid Spencer) Date: Thu, 19 Oct 2006 10:24:18 -0500 Subject: [llvm-commits] CVS: llvm/utils/NewNightlyTest.pl Message-ID: <200610191524.k9JFOItM023573@zion.cs.uiuc.edu> Changes in directory llvm/utils: NewNightlyTest.pl updated: 1.63 -> 1.64 --- Log message: 80 cols fix. --- Diffs of the changes: (+2 -1) NewNightlyTest.pl | 3 ++- 1 files changed, 2 insertions(+), 1 deletion(-) Index: llvm/utils/NewNightlyTest.pl diff -u llvm/utils/NewNightlyTest.pl:1.63 llvm/utils/NewNightlyTest.pl:1.64 --- llvm/utils/NewNightlyTest.pl:1.63 Fri Sep 29 12:31:45 2006 +++ llvm/utils/NewNightlyTest.pl Thu Oct 19 10:24:04 2006 @@ -136,7 +136,8 @@ "OPTIMIZE_OPTION=-O2"; $BUILDTYPE="release"; next;} if (/^-release-asserts$/){ $MAKEOPTS = "$MAKEOPTS ENABLE_OPTIMIZED=1 ". "DISABLE-ASSERTIONS=1 ". - "OPTIMIZE_OPTION=-O2"; $BUILDTYPE="release-asserts"; next;} + "OPTIMIZE_OPTION=-O2"; + $BUILDTYPE="release-asserts"; next;} if (/^-enable-llcbeta$/) { $PROGTESTOPTS .= " ENABLE_LLCBETA=1"; next; } if (/^-disable-llc$/) { $PROGTESTOPTS .= " DISABLE_LLC=1"; $CONFIGUREARGS .= " --disable-llc_diffs"; next; } From reid at x10sys.com Thu Oct 19 11:54:26 2006 From: reid at x10sys.com (Reid Spencer) Date: Thu, 19 Oct 2006 11:54:26 -0500 Subject: [llvm-commits] CVS: llvm-test/SingleSource/UnitTests/Vector/SSE/sse.expandfft.c sse.stepfft.c Message-ID: <200610191654.k9JGsQ37024989@zion.cs.uiuc.edu> Changes in directory llvm-test/SingleSource/UnitTests/Vector/SSE: sse.expandfft.c updated: 1.3 -> 1.4 sse.stepfft.c updated: 1.2 -> 1.3 --- Log message: Change this program to use the valloc method as _mm_alloc is not present on all platforms. valloc is overkill, but there's only four such allocations in the program so it shouldn't cause scalability problems due to page-size allocations and it will ensure the largest necessary alignment size on any platform.o This helps the test program compile on Linux. --- Diffs of the changes: (+11 -9) sse.expandfft.c | 12 +++++++----- sse.stepfft.c | 8 ++++---- 2 files changed, 11 insertions(+), 9 deletions(-) Index: llvm-test/SingleSource/UnitTests/Vector/SSE/sse.expandfft.c diff -u llvm-test/SingleSource/UnitTests/Vector/SSE/sse.expandfft.c:1.3 llvm-test/SingleSource/UnitTests/Vector/SSE/sse.expandfft.c:1.4 --- llvm-test/SingleSource/UnitTests/Vector/SSE/sse.expandfft.c:1.3 Tue Apr 4 13:51:30 2006 +++ llvm-test/SingleSource/UnitTests/Vector/SSE/sse.expandfft.c Thu Oct 19 11:54:12 2006 @@ -5,6 +5,7 @@ #include "xmmintrin.h" #define N 1024 #define N2 N/2 + main() { /* @@ -14,15 +15,16 @@ wpp, SAM. Math. ETHZ 21 May, 2002 */ int first,i,icase,it,n; - float error,fnm1,seed,sign,z0,z1,ggl(); + double error; + float fnm1,seed,sign,z0,z1,ggl(); float *x,*y,*z,*w; float t1,ln2,mflops; void cffti(),cfft2(); /* allocate storage for x,y,z,w on 4-word bndr. */ - x = (float *)_mm_malloc(8*N, 16); - y = (float *)_mm_malloc(8*N, 16); - z = (float *)_mm_malloc(8*N, 16); - w = (float *)_mm_malloc(4*N, 16); + x = (float *)valloc(8*N); + y = (float *)valloc(8*N); + z = (float *)valloc(8*N); + w = (float *)valloc(4*N); first = 1; seed = 331.0; for(icase=0;icase<2;icase++){ Index: llvm-test/SingleSource/UnitTests/Vector/SSE/sse.stepfft.c diff -u llvm-test/SingleSource/UnitTests/Vector/SSE/sse.stepfft.c:1.2 llvm-test/SingleSource/UnitTests/Vector/SSE/sse.stepfft.c:1.3 --- llvm-test/SingleSource/UnitTests/Vector/SSE/sse.stepfft.c:1.2 Tue Apr 4 13:52:26 2006 +++ llvm-test/SingleSource/UnitTests/Vector/SSE/sse.stepfft.c Thu Oct 19 11:54:12 2006 @@ -17,10 +17,10 @@ float t1,ln2,mflops; void cffti(),cfft2(); /* allocate storage for x,y,z,w on 4-word bndr. */ - x = (float *)_mm_malloc(8*N, 16); - y = (float *)_mm_malloc(8*N, 16); - z = (float *)_mm_malloc(8*N, 16); - w = (float *)_mm_malloc(4*N, 16); + x = (float *)valloc(8*N); + y = (float *)valloc(8*N); + z = (float *)valloc(8*N); + w = (float *)valloc(4*N); first = 1; seed = 331.0; for(icase=0;icase<2;icase++){ From rafael.espindola at gmail.com Thu Oct 19 12:05:17 2006 From: rafael.espindola at gmail.com (Rafael Espindola) Date: Thu, 19 Oct 2006 12:05:17 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/ARM/ARMInstrInfo.td Message-ID: <200610191705.k9JH5H4x025211@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/ARM: ARMInstrInfo.td updated: 1.68 -> 1.69 --- Log message: use Pat to implement extloadi8 and extloadi16 --- Diffs of the changes: (+5 -8) ARMInstrInfo.td | 13 +++++-------- 1 files changed, 5 insertions(+), 8 deletions(-) Index: llvm/lib/Target/ARM/ARMInstrInfo.td diff -u llvm/lib/Target/ARM/ARMInstrInfo.td:1.68 llvm/lib/Target/ARM/ARMInstrInfo.td:1.69 --- llvm/lib/Target/ARM/ARMInstrInfo.td:1.68 Thu Oct 19 08:45:00 2006 +++ llvm/lib/Target/ARM/ARMInstrInfo.td Thu Oct 19 12:05:03 2006 @@ -168,10 +168,6 @@ "ldrb $dst, [$addr]", [(set IntRegs:$dst, (zextloadi8 IntRegs:$addr))]>; -def LDRB2 : InstARM<(ops IntRegs:$dst, IntRegs:$addr), - "ldrb $dst, [$addr]", - [(set IntRegs:$dst, (extloadi8 IntRegs:$addr))]>; - def LDRSB : InstARM<(ops IntRegs:$dst, IntRegs:$addr), "ldrsb $dst, [$addr]", [(set IntRegs:$dst, (sextloadi8 IntRegs:$addr))]>; @@ -180,10 +176,6 @@ "ldrh $dst, [$addr]", [(set IntRegs:$dst, (zextloadi16 IntRegs:$addr))]>; -def LDRH2 : InstARM<(ops IntRegs:$dst, IntRegs:$addr), - "ldrh $dst, [$addr]", - [(set IntRegs:$dst, (extloadi16 IntRegs:$addr))]>; - def LDRSH : InstARM<(ops IntRegs:$dst, IntRegs:$addr), "ldrsh $dst, [$addr]", [(set IntRegs:$dst, (sextloadi16 IntRegs:$addr))]>; @@ -342,3 +334,8 @@ def : Pat<(ARMcall texternalsym:$dst), (bl texternalsym:$dst)>; + +def : Pat<(extloadi8 IntRegs:$addr), + (LDRB IntRegs:$addr)>; +def : Pat<(extloadi16 IntRegs:$addr), + (LDRH IntRegs:$addr)>; From dpatel at apple.com Thu Oct 19 13:54:24 2006 From: dpatel at apple.com (Devang Patel) Date: Thu, 19 Oct 2006 13:54:24 -0500 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/InstCombine/2006-10-19-SignedToUnsignedCastAndConst.ll 2004-11-27-SetCCForCastLargerAndConstant.ll Message-ID: <200610191854.k9JIsOd4027468@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/InstCombine: 2006-10-19-SignedToUnsignedCastAndConst.ll added (r1.1) 2004-11-27-SetCCForCastLargerAndConstant.ll updated: 1.5 -> 1.6 --- Log message: Fix bug in PR454: http://llvm.org/PR454 resolution. Added new test case. This fixes llvmAsmParser.cpp miscompile by llvm on PowerPC Darwin. --- Diffs of the changes: (+8 -24) 2004-11-27-SetCCForCastLargerAndConstant.ll | 24 ------------------------ 2006-10-19-SignedToUnsignedCastAndConst.ll | 8 ++++++++ 2 files changed, 8 insertions(+), 24 deletions(-) Index: llvm/test/Regression/Transforms/InstCombine/2006-10-19-SignedToUnsignedCastAndConst.ll diff -c /dev/null llvm/test/Regression/Transforms/InstCombine/2006-10-19-SignedToUnsignedCastAndConst.ll:1.1 *** /dev/null Thu Oct 19 13:54:18 2006 --- llvm/test/Regression/Transforms/InstCombine/2006-10-19-SignedToUnsignedCastAndConst.ll Thu Oct 19 13:54:08 2006 *************** *** 0 **** --- 1,8 ---- + ; This test case is reduced from llvmAsmParser.cpp + ; The optimizer should not remove the cast here. + ; RUN: llvm-as %s -o - | opt -instcombine | llvm-dis | grep 'cast.*int' + bool %test(short %X) { + %A = cast short %X to uint + %B = setgt uint %A, 1330 + ret bool %B + } Index: llvm/test/Regression/Transforms/InstCombine/2004-11-27-SetCCForCastLargerAndConstant.ll diff -u llvm/test/Regression/Transforms/InstCombine/2004-11-27-SetCCForCastLargerAndConstant.ll:1.5 llvm/test/Regression/Transforms/InstCombine/2004-11-27-SetCCForCastLargerAndConstant.ll:1.6 --- llvm/test/Regression/Transforms/InstCombine/2004-11-27-SetCCForCastLargerAndConstant.ll:1.5 Sun Apr 24 01:55:40 2005 +++ llvm/test/Regression/Transforms/InstCombine/2004-11-27-SetCCForCastLargerAndConstant.ll Thu Oct 19 13:54:08 2006 @@ -31,12 +31,6 @@ ret bool %C } -bool %lt_signed_to_small_unsigned(sbyte %SB) { - %Y = cast sbyte %SB to uint ; [#uses=1] - %C = setlt uint %Y, 17 ; [#uses=1] - ret bool %C -} - bool %lt_signed_to_small_signed(sbyte %SB) { %Y = cast sbyte %SB to int %C = setlt int %Y, 17 @@ -73,12 +67,6 @@ ret bool %C } -bool %lt_unsigned_to_small_signed(ubyte %SB) { - %Y = cast ubyte %SB to int - %C = setlt int %Y, 17 - ret bool %C -} - bool %lt_unsigned_to_small_negative(ubyte %SB) { %Y = cast ubyte %SB to int %C = setlt int %Y, -17 @@ -103,12 +91,6 @@ ret bool %C } -bool %gt_signed_to_small_unsigned(sbyte %SB) { - %Y = cast sbyte %SB to uint ; [#uses=1] - %C = setgt uint %Y, 17 ; [#uses=1] - ret bool %C -} - bool %gt_signed_to_small_signed(sbyte %SB) { %Y = cast sbyte %SB to int %C = setgt int %Y, 17 @@ -145,12 +127,6 @@ ret bool %C } -bool %gt_unsigned_to_small_signed(ubyte %SB) { - %Y = cast ubyte %SB to int - %C = setgt int %Y, 17 - ret bool %C -} - bool %gt_unsigned_to_small_negative(ubyte %SB) { %Y = cast ubyte %SB to int %C = setgt int %Y, -17 From dpatel at apple.com Thu Oct 19 13:54:23 2006 From: dpatel at apple.com (Devang Patel) Date: Thu, 19 Oct 2006 13:54:23 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp Message-ID: <200610191854.k9JIsNjb027461@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: InstructionCombining.cpp updated: 1.520 -> 1.521 --- Log message: Fix bug in PR454: http://llvm.org/PR454 resolution. Added new test case. This fixes llvmAsmParser.cpp miscompile by llvm on PowerPC Darwin. --- Diffs of the changes: (+15 -1) InstructionCombining.cpp | 16 +++++++++++++++- 1 files changed, 15 insertions(+), 1 deletion(-) Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.520 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.521 --- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.520 Mon Oct 16 18:08:08 2006 +++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp Thu Oct 19 13:54:08 2006 @@ -4785,7 +4785,21 @@ Constant *Res = ConstantExpr::getCast(CI, SrcTy); if (ConstantExpr::getCast(Res, DestTy) == CI) { - RHSCIOp = Res; + // Make sure that src sign and dest sign match. For example, + // + // %A = cast short %X to uint + // %B = setgt uint %A, 1330 + // + // It is incorrect to transformt this into + // + // %B = setgt short %X, 1330 + // + // because %A may have negative value. + // However, it is OK if SrcTy is bool. See cast-set.ll testcase. + if (isSignSrc == isSignDest || SrcTy == Type::BoolTy) + RHSCIOp = Res; + else + return 0; } else { // If the value cannot be represented in the shorter type, we cannot emit // a simple comparison. From dpatel at apple.com Thu Oct 19 14:05:53 2006 From: dpatel at apple.com (Devang Patel) Date: Thu, 19 Oct 2006 14:05:53 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp Message-ID: <200610191905.k9JJ5r8J027683@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: InstructionCombining.cpp updated: 1.521 -> 1.522 --- Log message: Typo. --- 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.521 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.522 --- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.521 Thu Oct 19 13:54:08 2006 +++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp Thu Oct 19 14:05:38 2006 @@ -4790,7 +4790,7 @@ // %A = cast short %X to uint // %B = setgt uint %A, 1330 // - // It is incorrect to transformt this into + // It is incorrect to tranform this into // // %B = setgt short %X, 1330 // From reid at x10sys.com Thu Oct 19 14:16:14 2006 From: reid at x10sys.com (Reid Spencer) Date: Thu, 19 Oct 2006 14:16:14 -0500 Subject: [llvm-commits] [SignlessTypes] CVS: llvm/lib/AsmParser/Lexer.l llvmAsmParser.y ParserInternals.h Message-ID: <200610191916.k9JJGEri027891@zion.cs.uiuc.edu> Changes in directory llvm/lib/AsmParser: Lexer.l updated: 1.78 -> 1.78.2.1 llvmAsmParser.y updated: 1.266.2.1 -> 1.266.2.2 ParserInternals.h updated: 1.45 -> 1.45.2.1 --- Log message: Add support for handling sdiv and udiv instructions while retaining backwards compatibility with the old div instruction. --- Diffs of the changes: (+69 -20) Lexer.l | 16 +++++++++++++-- ParserInternals.h | 16 +++++++++++++++ llvmAsmParser.y | 57 ++++++++++++++++++++++++++++++++++++------------------ 3 files changed, 69 insertions(+), 20 deletions(-) Index: llvm/lib/AsmParser/Lexer.l diff -u llvm/lib/AsmParser/Lexer.l:1.78 llvm/lib/AsmParser/Lexer.l:1.78.2.1 --- llvm/lib/AsmParser/Lexer.l:1.78 Tue Oct 17 21:19:55 2006 +++ llvm/lib/AsmParser/Lexer.l Thu Oct 19 14:16:00 2006 @@ -39,8 +39,18 @@ yy_scan_string (str); } +// Construct a token value for a non-obsolete token #define RET_TOK(type, Enum, sym) \ - llvmAsmlval.type = Instruction::Enum; return sym + llvmAsmlval.type.opcode = Instruction::Enum; \ + llvmAsmlval.type.obsolete = false; \ + return sym + +// Construct a token value for an obsolete token +#define RET_TOK_OBSOLETE(type, Enum, sym) \ + llvmAsmlval.type.opcode = Instruction::Enum; \ + llvmAsmlval.type.obsolete = true; \ + return sym + namespace llvm { @@ -247,7 +257,9 @@ add { RET_TOK(BinaryOpVal, Add, ADD); } sub { RET_TOK(BinaryOpVal, Sub, SUB); } mul { RET_TOK(BinaryOpVal, Mul, MUL); } -div { RET_TOK(BinaryOpVal, Div, DIV); } +div { RET_TOK_OBSOLETE(BinaryOpVal, UDiv, UDIV); } +udiv { RET_TOK(BinaryOpVal, UDiv, UDIV); } +sdiv { RET_TOK(BinaryOpVal, UDiv, UDIV); } rem { RET_TOK(BinaryOpVal, Rem, REM); } and { RET_TOK(BinaryOpVal, And, AND); } or { RET_TOK(BinaryOpVal, Or , OR ); } Index: llvm/lib/AsmParser/llvmAsmParser.y diff -u llvm/lib/AsmParser/llvmAsmParser.y:1.266.2.1 llvm/lib/AsmParser/llvmAsmParser.y:1.266.2.2 --- llvm/lib/AsmParser/llvmAsmParser.y:1.266.2.1 Wed Oct 18 22:57:55 2006 +++ llvm/lib/AsmParser/llvmAsmParser.y Thu Oct 19 14:16:00 2006 @@ -813,6 +813,23 @@ return Ty; } +// This function is +template +static void sanitizeOpCode(OpcodeInfo &OI, const PATypeHolder& Ty) { + if (OI.obsolete) { + switch (OI.opcode) { + default: + GenerateError("Invalid Obsolete OpCode"); + break; + case Instruction::UDiv: + if (Ty->isSigned()) + OI.opcode = Instruction::SDiv; + break; + } + OI.obsolete = false; + } +} + // common code from the two 'RunVMAsmParser' functions static Module* RunParser(Module * M) { @@ -1004,11 +1021,11 @@ char *StrVal; // This memory is strdup'd! llvm::ValID ValIDVal; // strdup'd memory maybe! - llvm::Instruction::BinaryOps BinaryOpVal; - llvm::Instruction::TermOps TermOpVal; - llvm::Instruction::MemoryOps MemOpVal; - llvm::Instruction::OtherOps OtherOpVal; - llvm::Module::Endianness Endianness; + BinaryOpInfo BinaryOpVal; + TermOpInfo TermOpVal; + MemOpInfo MemOpVal; + OtherOpInfo OtherOpVal; + llvm::Module::Endianness Endianness; } %type Module FunctionList @@ -1076,8 +1093,8 @@ // Binary Operators %type ArithmeticOps LogicalOps SetCondOps // Binops Subcatagories -%token ADD SUB MUL DIV REM AND OR XOR -%token SETLE SETGE SETLT SETGT SETEQ SETNE // Binary Comarators +%token ADD SUB MUL UDIV SDIV REM AND OR XOR +%token SETLE SETGE SETLT SETGT SETEQ SETNE // Binary Comparators // Memory Instructions %token MALLOC ALLOCA FREE LOAD STORE GETELEMENTPTR @@ -1114,7 +1131,7 @@ // Operations that are notably excluded from this list include: // RET, BR, & SWITCH because they end basic blocks and are treated specially. // -ArithmeticOps: ADD | SUB | MUL | DIV | REM; +ArithmeticOps: ADD | SUB | MUL | UDIV | SDIV | REM ; LogicalOps : AND | OR | XOR; SetCondOps : SETLE | SETGE | SETLT | SETGT | SETEQ | SETNE; @@ -1642,12 +1659,14 @@ | ArithmeticOps '(' ConstVal ',' ConstVal ')' { if ($3->getType() != $5->getType()) GEN_ERROR("Binary operator types must match!"); + sanitizeOpCode($1,$3->getType()); + CHECK_FOR_ERROR; // HACK: llvm 1.3 and earlier used to emit invalid pointer constant exprs. // To retain backward compatibility with these early compilers, we emit a // cast to the appropriate integer type automatically if we are in the // broken case. See PR424 for more information. if (!isa($3->getType())) { - $$ = ConstantExpr::get($1, $3, $5); + $$ = ConstantExpr::get($1.opcode, $3, $5); } else { const Type *IntPtrTy = 0; switch (CurModule.CurrentModule->getPointerSize()) { @@ -1655,7 +1674,7 @@ case Module::Pointer64: IntPtrTy = Type::LongTy; break; default: GEN_ERROR("invalid pointer binary constant expr!"); } - $$ = ConstantExpr::get($1, ConstantExpr::getCast($3, IntPtrTy), + $$ = ConstantExpr::get($1.opcode, ConstantExpr::getCast($3, IntPtrTy), ConstantExpr::getCast($5, IntPtrTy)); $$ = ConstantExpr::getCast($$, $3->getType()); } @@ -1669,13 +1688,13 @@ !cast($3->getType())->getElementType()->isIntegral()) GEN_ERROR("Logical operator requires integral operands!"); } - $$ = ConstantExpr::get($1, $3, $5); + $$ = ConstantExpr::get($1.opcode, $3, $5); CHECK_FOR_ERROR } | SetCondOps '(' ConstVal ',' ConstVal ')' { if ($3->getType() != $5->getType()) GEN_ERROR("setcc operand types must match!"); - $$ = ConstantExpr::get($1, $3, $5); + $$ = ConstantExpr::get($1.opcode, $3, $5); CHECK_FOR_ERROR } | ShiftOps '(' ConstVal ',' ConstVal ')' { @@ -1683,7 +1702,7 @@ GEN_ERROR("Shift count for shift constant must be unsigned byte!"); if (!$3->getType()->isInteger()) GEN_ERROR("Shift constant expression requires integer operand!"); - $$ = ConstantExpr::get($1, $3, $5); + $$ = ConstantExpr::get($1.opcode, $3, $5); CHECK_FOR_ERROR } | EXTRACTELEMENT '(' ConstVal ',' ConstVal ')' { @@ -2425,13 +2444,15 @@ !isa((*$2).get())) GEN_ERROR( "Arithmetic operator requires integer, FP, or packed operands!"); - if (isa((*$2).get()) && $1 == Instruction::Rem) + if (isa((*$2).get()) && $1.opcode == Instruction::Rem) GEN_ERROR("Rem not supported on packed types!"); + sanitizeOpCode($1,*$2); + CHECK_FOR_ERROR; Value* val1 = getVal(*$2, $3); CHECK_FOR_ERROR Value* val2 = getVal(*$2, $5); CHECK_FOR_ERROR - $$ = BinaryOperator::create($1, val1, val2); + $$ = BinaryOperator::create($1.opcode, val1, val2); if ($$ == 0) GEN_ERROR("binary operator returned null!"); delete $2; @@ -2446,7 +2467,7 @@ CHECK_FOR_ERROR Value* tmpVal2 = getVal(*$2, $5); CHECK_FOR_ERROR - $$ = BinaryOperator::create($1, tmpVal1, tmpVal2); + $$ = BinaryOperator::create($1.opcode, tmpVal1, tmpVal2); if ($$ == 0) GEN_ERROR("binary operator returned null!"); delete $2; @@ -2460,7 +2481,7 @@ CHECK_FOR_ERROR Value* tmpVal2 = getVal(*$2, $5); CHECK_FOR_ERROR - $$ = new SetCondInst($1, tmpVal1, tmpVal2); + $$ = new SetCondInst($1.opcode, tmpVal1, tmpVal2); if ($$ == 0) GEN_ERROR("binary operator returned null!"); delete $2; @@ -2483,7 +2504,7 @@ GEN_ERROR("Shift amount must be ubyte!"); if (!$2->getType()->isInteger()) GEN_ERROR("Shift constant expression requires integer operand!"); - $$ = new ShiftInst($1, $2, $4); + $$ = new ShiftInst($1.opcode, $2, $4); CHECK_FOR_ERROR } | CAST ResolvedVal TO Types { Index: llvm/lib/AsmParser/ParserInternals.h diff -u llvm/lib/AsmParser/ParserInternals.h:1.45 llvm/lib/AsmParser/ParserInternals.h:1.45.2.1 --- llvm/lib/AsmParser/ParserInternals.h:1.45 Thu Sep 28 18:35:21 2006 +++ llvm/lib/AsmParser/ParserInternals.h Thu Oct 19 14:16:00 2006 @@ -201,4 +201,20 @@ } // End llvm namespace +// This structure is used to keep track of obsolete opcodes. The lexer will +// retain the ability to parse obsolete opcode mnemonics. In this case it will +// set "obsolete" to true and the opcode will be the replacement opcode. For +// example if "rem" is encountered then opcode will be set to "urem" and the +// "obsolete" flag will be true. If the opcode is not obsolete then "obsolete" +// will be false. +template +struct OpcodeInfo { + Enum opcode; + bool obsolete; +}; +typedef OpcodeInfo BinaryOpInfo; +typedef OpcodeInfo TermOpInfo; +typedef OpcodeInfo MemOpInfo; +typedef OpcodeInfo OtherOpInfo; + #endif From dpatel at apple.com Thu Oct 19 14:21:52 2006 From: dpatel at apple.com (Devang Patel) Date: Thu, 19 Oct 2006 14:21:52 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp Message-ID: <200610191921.k9JJLqHM028021@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: InstructionCombining.cpp updated: 1.522 -> 1.523 --- Log message: Typo Typo. --- 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.522 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.523 --- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.522 Thu Oct 19 14:05:38 2006 +++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp Thu Oct 19 14:21:36 2006 @@ -4790,7 +4790,7 @@ // %A = cast short %X to uint // %B = setgt uint %A, 1330 // - // It is incorrect to tranform this into + // It is incorrect to transform this into // // %B = setgt short %X, 1330 // From reid at x10sys.com Thu Oct 19 14:21:51 2006 From: reid at x10sys.com (Reid Spencer) Date: Thu, 19 Oct 2006 14:21:51 -0500 Subject: [llvm-commits] [SignlessTypes] CVS: llvm/include/llvm/Instruction.def Message-ID: <200610191921.k9JJLp6F028016@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm: Instruction.def updated: 1.19 -> 1.19.6.1 --- Log message: Replace Div with UDiv and SDiv, renumber accordingly. --- Diffs of the changes: (+38 -37) Instruction.def | 75 ++++++++++++++++++++++++++++---------------------------- 1 files changed, 38 insertions(+), 37 deletions(-) Index: llvm/include/llvm/Instruction.def diff -u llvm/include/llvm/Instruction.def:1.19 llvm/include/llvm/Instruction.def:1.19.6.1 --- llvm/include/llvm/Instruction.def:1.19 Fri Apr 7 20:15:18 2006 +++ llvm/include/llvm/Instruction.def Thu Oct 19 14:21:35 2006 @@ -90,55 +90,56 @@ // Standard binary operators... FIRST_BINARY_INST( 7) -HANDLE_BINARY_INST( 7, Add , BinaryOperator) -HANDLE_BINARY_INST( 8, Sub , BinaryOperator) -HANDLE_BINARY_INST( 9, Mul , BinaryOperator) -HANDLE_BINARY_INST(10, Div , BinaryOperator) -HANDLE_BINARY_INST(11, Rem , BinaryOperator) +HANDLE_BINARY_INST( 7, Add , BinaryOperator) +HANDLE_BINARY_INST( 8, Sub , BinaryOperator) +HANDLE_BINARY_INST( 9, Mul , BinaryOperator) +HANDLE_BINARY_INST(10, UDiv , BinaryOperator) +HANDLE_BINARY_INST(11, SDiv , BinaryOperator) +HANDLE_BINARY_INST(12, Rem , BinaryOperator) // Logical operators... -HANDLE_BINARY_INST(12, And , BinaryOperator) -HANDLE_BINARY_INST(13, Or , BinaryOperator) -HANDLE_BINARY_INST(14, Xor , BinaryOperator) +HANDLE_BINARY_INST(13, And , BinaryOperator) +HANDLE_BINARY_INST(14, Or , BinaryOperator) +HANDLE_BINARY_INST(15, Xor , BinaryOperator) // Binary comparison operators... -HANDLE_BINARY_INST(15, SetEQ , SetCondInst) -HANDLE_BINARY_INST(16, SetNE , SetCondInst) -HANDLE_BINARY_INST(17, SetLE , SetCondInst) -HANDLE_BINARY_INST(18, SetGE , SetCondInst) -HANDLE_BINARY_INST(19, SetLT , SetCondInst) -HANDLE_BINARY_INST(20, SetGT , SetCondInst) - LAST_BINARY_INST(20) +HANDLE_BINARY_INST(16, SetEQ , SetCondInst) +HANDLE_BINARY_INST(17, SetNE , SetCondInst) +HANDLE_BINARY_INST(18, SetLE , SetCondInst) +HANDLE_BINARY_INST(19, SetGE , SetCondInst) +HANDLE_BINARY_INST(20, SetLT , SetCondInst) +HANDLE_BINARY_INST(21, SetGT , SetCondInst) + LAST_BINARY_INST(21) // Memory operators... - FIRST_MEMORY_INST(21) -HANDLE_MEMORY_INST(21, Malloc, MallocInst) // Heap management instructions -HANDLE_MEMORY_INST(22, Free , FreeInst ) -HANDLE_MEMORY_INST(23, Alloca, AllocaInst) // Stack management -HANDLE_MEMORY_INST(24, Load , LoadInst ) // Memory manipulation instrs -HANDLE_MEMORY_INST(25, Store , StoreInst ) -HANDLE_MEMORY_INST(26, GetElementPtr, GetElementPtrInst) - LAST_MEMORY_INST(26) + FIRST_MEMORY_INST(22) +HANDLE_MEMORY_INST(22, Malloc, MallocInst) // Heap management instructions +HANDLE_MEMORY_INST(23, Free , FreeInst ) +HANDLE_MEMORY_INST(24, Alloca, AllocaInst) // Stack management +HANDLE_MEMORY_INST(25, Load , LoadInst ) // Memory manipulation instrs +HANDLE_MEMORY_INST(26, Store , StoreInst ) +HANDLE_MEMORY_INST(27, GetElementPtr, GetElementPtrInst) + LAST_MEMORY_INST(27) // Other operators... - FIRST_OTHER_INST(27) -HANDLE_OTHER_INST(27, PHI , PHINode ) // PHI node instruction -HANDLE_OTHER_INST(28, Cast , CastInst ) // Type cast -HANDLE_OTHER_INST(29, Call , CallInst ) // Call a function + FIRST_OTHER_INST(28) +HANDLE_OTHER_INST(28, PHI , PHINode ) // PHI node instruction +HANDLE_OTHER_INST(29, Cast , CastInst ) // Type cast +HANDLE_OTHER_INST(30, Call , CallInst ) // Call a function -HANDLE_OTHER_INST(30, Shl , ShiftInst ) // Shift operations -HANDLE_OTHER_INST(31, Shr , ShiftInst ) +HANDLE_OTHER_INST(31, Shl , ShiftInst ) // Shift operations +HANDLE_OTHER_INST(32, Shr , ShiftInst ) // 32 -> Empty slot used to be used for vanext in llvm 1.5 and before. // 33 -> Empty slot used to be used for vaarg in llvm 1.5 and before. -HANDLE_OTHER_INST(34, Select , SelectInst ) // select instruction +HANDLE_OTHER_INST(33, Select , SelectInst ) // select instruction -HANDLE_OTHER_INST(35, UserOp1, Instruction) // May be used internally in a pass -HANDLE_OTHER_INST(36, UserOp2, Instruction) -HANDLE_OTHER_INST(37, VAArg , VAArgInst ) // vaarg instruction -HANDLE_OTHER_INST(38, ExtractElement, ExtractElementInst)// extract from vector. -HANDLE_OTHER_INST(39, InsertElement, InsertElementInst) // insert into vector -HANDLE_OTHER_INST(40, ShuffleVector, ShuffleVectorInst) // shuffle two vectors. - LAST_OTHER_INST(40) +HANDLE_OTHER_INST(34, UserOp1, Instruction) // May be used internally in a pass +HANDLE_OTHER_INST(35, UserOp2, Instruction) +HANDLE_OTHER_INST(36, VAArg , VAArgInst ) // vaarg instruction +HANDLE_OTHER_INST(37, ExtractElement, ExtractElementInst)// extract from vector. +HANDLE_OTHER_INST(38, InsertElement, InsertElementInst) // insert into vector +HANDLE_OTHER_INST(39, ShuffleVector, ShuffleVectorInst) // shuffle two vectors. + LAST_OTHER_INST(39) #undef FIRST_TERM_INST #undef HANDLE_TERM_INST From reid at x10sys.com Thu Oct 19 14:23:11 2006 From: reid at x10sys.com (Reid Spencer) Date: Thu, 19 Oct 2006 14:23:11 -0500 Subject: [llvm-commits] [SignlessTypes] CVS: llvm/lib/AsmParser/Lexer.cpp.cvs Lexer.l.cvs llvmAsmParser.cpp.cvs llvmAsmParser.h.cvs llvmAsmParser.y.cvs Message-ID: <200610191923.k9JJNBC4028063@zion.cs.uiuc.edu> Changes in directory llvm/lib/AsmParser: Lexer.cpp.cvs updated: 1.10.2.1 -> 1.10.2.2 Lexer.l.cvs updated: 1.8 -> 1.8.2.1 llvmAsmParser.cpp.cvs updated: 1.18.2.1 -> 1.18.2.2 llvmAsmParser.h.cvs updated: 1.13.2.1 -> 1.13.2.2 llvmAsmParser.y.cvs updated: 1.18.2.1 -> 1.18.2.2 --- Log message: Update generated files. --- Diffs of the changes: (+1788 -1709) Lexer.cpp.cvs | 1172 ++++++++++++++------------- Lexer.l.cvs | 16 llvmAsmParser.cpp.cvs | 2124 +++++++++++++++++++++++++------------------------- llvmAsmParser.h.cvs | 128 +-- llvmAsmParser.y.cvs | 57 - 5 files changed, 1788 insertions(+), 1709 deletions(-) Index: llvm/lib/AsmParser/Lexer.cpp.cvs diff -u llvm/lib/AsmParser/Lexer.cpp.cvs:1.10.2.1 llvm/lib/AsmParser/Lexer.cpp.cvs:1.10.2.2 --- llvm/lib/AsmParser/Lexer.cpp.cvs:1.10.2.1 Wed Oct 18 22:57:55 2006 +++ llvm/lib/AsmParser/Lexer.cpp.cvs Thu Oct 19 14:22:56 2006 @@ -20,7 +20,7 @@ /* A lexical scanner generated by flex*/ /* Scanner skeleton version: - * $Header: /var/cvs/llvm/llvm/lib/AsmParser/Lexer.cpp.cvs,v 1.10.2.1 2006/10/19 03:57:55 reid Exp $ + * $Header: /var/cvs/llvm/llvm/lib/AsmParser/Lexer.cpp.cvs,v 1.10.2.2 2006/10/19 19:22:56 reid Exp $ */ #define FLEX_SCANNER @@ -317,35 +317,35 @@ *yy_cp = '\0'; \ yy_c_buf_p = yy_cp; -#define YY_NUM_RULES 114 -#define YY_END_OF_BUFFER 115 -static yyconst short int yy_acclist[192] = +#define YY_NUM_RULES 116 +#define YY_END_OF_BUFFER 117 +static yyconst short int yy_acclist[194] = { 0, - 115, 113, 114, 112, 113, 114, 112, 114, 113, 114, - 113, 114, 113, 114, 113, 114, 113, 114, 113, 114, - 105, 113, 114, 105, 113, 114, 1, 113, 114, 113, - 114, 113, 114, 113, 114, 113, 114, 113, 114, 113, - 114, 113, 114, 113, 114, 113, 114, 113, 114, 113, - 114, 113, 114, 113, 114, 113, 114, 113, 114, 113, - 114, 113, 114, 113, 114, 113, 114, 113, 114, 113, - 114, 104, 102, 101, 101, 108, 106, 110, 105, 1, - 87, 41, 69, 23, 104, 101, 101, 109, 110, 20, - 110, 111, 63, 68, 39, 34, 42, 66, 3, 54, - - 65, 25, 77, 67, 86, 81, 82, 64, 70, 103, - 110, 110, 49, 78, 79, 32, 94, 95, 56, 22, - 107, 26, 4, 61, 55, 48, 11, 110, 36, 2, - 5, 58, 60, 50, 72, 76, 74, 75, 73, 71, - 52, 96, 51, 57, 21, 84, 93, 45, 59, 30, - 24, 44, 7, 89, 33, 92, 38, 62, 80, 88, - 27, 28, 90, 53, 85, 83, 43, 6, 29, 37, - 8, 17, 9, 10, 35, 12, 14, 13, 40, 15, - 31, 91, 97, 99, 100, 16, 46, 98, 18, 47, - 19 + 117, 115, 116, 114, 115, 116, 114, 116, 115, 116, + 115, 116, 115, 116, 115, 116, 115, 116, 115, 116, + 107, 115, 116, 107, 115, 116, 1, 115, 116, 115, + 116, 115, 116, 115, 116, 115, 116, 115, 116, 115, + 116, 115, 116, 115, 116, 115, 116, 115, 116, 115, + 116, 115, 116, 115, 116, 115, 116, 115, 116, 115, + 116, 115, 116, 115, 116, 115, 116, 115, 116, 115, + 116, 106, 104, 103, 103, 110, 108, 112, 107, 1, + 89, 41, 71, 23, 106, 103, 103, 111, 112, 20, + 112, 113, 63, 70, 39, 34, 42, 66, 3, 54, + + 65, 25, 79, 69, 88, 83, 84, 64, 72, 105, + 112, 112, 49, 80, 81, 32, 96, 97, 56, 22, + 109, 68, 26, 4, 61, 67, 55, 48, 11, 112, + 36, 2, 5, 58, 60, 50, 74, 78, 76, 77, + 75, 73, 52, 98, 51, 57, 21, 86, 95, 45, + 59, 30, 24, 44, 7, 91, 33, 94, 38, 62, + 82, 90, 27, 28, 92, 53, 87, 85, 43, 6, + 29, 37, 8, 17, 9, 10, 35, 12, 14, 13, + 40, 15, 31, 93, 99, 101, 102, 16, 46, 100, + 18, 47, 19 } ; -static yyconst short int yy_accept[505] = +static yyconst short int yy_accept[511] = { 0, 1, 1, 1, 2, 4, 7, 9, 11, 13, 15, 17, 19, 21, 24, 27, 30, 32, 34, 36, 38, @@ -358,51 +358,51 @@ 83, 83, 83, 83, 83, 83, 83, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, - 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, - 85, 85, 85, 85, 86, 87, 89, 90, 91, 92, - 92, 93, 94, 94, 94, 95, 95, 96, 96, 97, - 97, 97, 97, 98, 98, 98, 98, 98, 98, 98, - 99, 99, 99, 100, 100, 100, 100, 100, 100, 100, - 100, 100, 100, 100, 101, 101, 101, 101, 101, 101, - 101, 101, 101, 102, 103, 103, 103, 104, 104, 105, - 106, 106, 106, 106, 106, 106, 107, 107, 108, 108, - 108, 108, 109, 109, 109, 109, 109, 109, 109, 109, + 84, 85, 85, 85, 85, 85, 85, 85, 85, 85, + 85, 85, 85, 85, 85, 85, 86, 87, 89, 90, + 91, 92, 92, 93, 94, 94, 94, 95, 95, 96, + 96, 97, 97, 97, 97, 98, 98, 98, 98, 98, + 98, 98, 99, 99, 99, 100, 100, 100, 100, 100, + 100, 100, 100, 100, 100, 100, 101, 101, 101, 101, + 101, 101, 101, 101, 101, 102, 103, 103, 103, 104, + 104, 105, 106, 106, 106, 106, 106, 106, 106, 107, + 107, 108, 108, 108, 108, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, - 109, 109, 109, 109, 110, 110, 111, 112, 112, 112, - 112, 113, 113, 113, 113, 113, 114, 115, 116, 116, - 116, 116, 117, 117, 117, 117, 117, 117, 117, 117, - 117, 117, 117, 117, 117, 118, 118, 118, 118, 118, - 118, 118, 118, 118, 118, 119, 120, 120, 120, 121, - 121, 121, 122, 122, 122, 122, 122, 122, 122, 122, - 122, 122, 122, 122, 122, 123, 123, 123, 124, 125, - 125, 126, 126, 126, 126, 126, 126, 126, 126, 126, - 126, 127, 127, 128, 128, 128, 129, 130, 130, 130, - 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, - - 131, 131, 131, 132, 132, 133, 133, 133, 133, 133, - 133, 133, 134, 134, 134, 134, 134, 134, 134, 135, - 135, 135, 136, 137, 138, 139, 140, 141, 142, 142, - 142, 143, 143, 143, 143, 144, 145, 146, 146, 146, - 146, 146, 146, 147, 147, 147, 147, 147, 147, 148, - 148, 149, 149, 149, 149, 149, 149, 149, 150, 151, - 152, 152, 152, 153, 153, 154, 154, 154, 154, 155, - 155, 156, 157, 158, 159, 159, 159, 160, 160, 160, - 161, 162, 163, 163, 163, 164, 165, 166, 167, 167, - 167, 167, 167, 167, 167, 168, 169, 170, 170, 170, - - 170, 170, 170, 170, 170, 170, 170, 170, 170, 171, - 171, 171, 171, 171, 171, 171, 171, 171, 171, 172, - 172, 172, 172, 173, 173, 173, 173, 173, 174, 175, - 175, 175, 175, 175, 175, 176, 176, 176, 176, 177, - 178, 179, 179, 179, 179, 179, 179, 179, 179, 179, - 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, - 179, 179, 180, 180, 180, 180, 180, 180, 181, 181, - 181, 181, 181, 182, 182, 182, 183, 183, 183, 183, - 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, - 184, 184, 185, 186, 187, 187, 188, 188, 189, 190, + 109, 109, 109, 109, 109, 109, 109, 109, 110, 110, + 111, 112, 112, 112, 112, 113, 113, 113, 113, 113, + 114, 115, 116, 116, 116, 116, 117, 117, 117, 117, + 117, 117, 117, 117, 117, 117, 117, 117, 117, 118, + 118, 118, 118, 118, 118, 118, 118, 118, 118, 119, + 120, 120, 120, 121, 121, 121, 122, 122, 123, 123, + 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, + 124, 124, 124, 125, 126, 126, 127, 128, 128, 128, + 128, 128, 128, 128, 128, 128, 128, 129, 129, 130, + 130, 130, 131, 132, 132, 132, 133, 133, 133, 133, + + 133, 133, 133, 133, 133, 133, 133, 133, 133, 134, + 134, 135, 135, 135, 135, 135, 135, 135, 136, 136, + 136, 136, 136, 136, 136, 137, 137, 137, 138, 139, + 140, 141, 142, 143, 144, 144, 144, 145, 145, 145, + 145, 146, 147, 148, 148, 148, 148, 148, 148, 149, + 149, 149, 149, 149, 149, 150, 150, 151, 151, 151, + 151, 151, 151, 151, 152, 153, 154, 154, 154, 155, + 155, 156, 156, 156, 156, 157, 157, 158, 159, 160, + 161, 161, 161, 162, 162, 162, 163, 164, 165, 165, + 165, 166, 167, 168, 169, 169, 169, 169, 169, 169, + + 169, 170, 171, 172, 172, 172, 172, 172, 172, 172, + 172, 172, 172, 172, 172, 173, 173, 173, 173, 173, + 173, 173, 173, 173, 173, 174, 174, 174, 174, 175, + 175, 175, 175, 175, 176, 177, 177, 177, 177, 177, + 177, 178, 178, 178, 178, 179, 180, 181, 181, 181, + 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, + 181, 181, 181, 181, 181, 181, 181, 181, 182, 182, + 182, 182, 182, 182, 183, 183, 183, 183, 183, 184, + 184, 184, 185, 185, 185, 185, 185, 185, 185, 185, + 185, 185, 185, 185, 185, 185, 186, 186, 187, 188, - 191, 191, 192, 192 + 189, 189, 190, 190, 191, 192, 193, 193, 194, 194 } ; static yyconst int yy_ec[256] = @@ -446,256 +446,260 @@ 3, 3, 3 } ; -static yyconst short int yy_base[509] = +static yyconst short int yy_base[515] = { 0, - 0, 0, 1096, 1097, 1097, 1097, 1091, 1080, 36, 40, + 0, 0, 1108, 1109, 1109, 1109, 1103, 1092, 36, 40, 44, 50, 56, 62, 0, 63, 66, 81, 89, 47, 90, 91, 76, 96, 108, 49, 97, 110, 68, 137, - 120, 168, 112, 115, 135, 127, 1089, 1097, 1078, 1097, - 0, 158, 173, 180, 196, 70, 201, 216, 221, 0, - 121, 152, 123, 139, 166, 140, 162, 184, 1077, 222, - 180, 31, 186, 119, 232, 208, 144, 225, 234, 236, - 235, 188, 238, 240, 246, 241, 245, 203, 248, 256, - 254, 258, 262, 252, 272, 274, 1076, 276, 278, 280, - 255, 253, 283, 284, 285, 286, 288, 297, 300, 1075, - - 301, 292, 295, 307, 309, 318, 316, 315, 322, 312, - 147, 329, 330, 1074, 0, 344, 349, 1073, 363, 380, - 0, 1072, 338, 336, 1071, 355, 1070, 356, 1069, 353, - 367, 334, 1068, 375, 365, 381, 384, 370, 371, 1067, - 388, 392, 391, 393, 394, 395, 396, 400, 399, 407, - 406, 409, 411, 413, 410, 414, 418, 421, 425, 426, - 427, 429, 1066, 1065, 430, 431, 1064, 435, 1063, 1062, - 458, 436, 439, 434, 469, 1061, 449, 1060, 438, 441, - 458, 1059, 471, 472, 474, 473, 481, 482, 475, 476, - 483, 488, 489, 493, 495, 496, 504, 501, 503, 505, - - 510, 507, 516, 1058, 511, 1097, 527, 541, 545, 549, - 554, 555, 440, 556, 557, 1057, 1056, 1055, 558, 559, - 560, 1054, 527, 518, 561, 189, 562, 528, 566, 563, - 564, 567, 568, 570, 1053, 571, 587, 580, 578, 579, - 581, 590, 591, 596, 1052, 1051, 594, 598, 1050, 597, - 601, 0, 606, 603, 607, 602, 608, 610, 618, 620, - 625, 623, 628, 629, 1049, 630, 626, 1048, 1047, 638, - 1046, 634, 640, 642, 644, 646, 648, 651, 653, 652, - 1045, 654, 1044, 656, 657, 662, 1043, 662, 665, 1042, - 668, 671, 674, 680, 682, 683, 684, 685, 687, 686, - - 689, 690, 1041, 691, 1040, 696, 692, 695, 693, 700, - 699, 1039, 710, 712, 713, 714, 715, 719, 1038, 718, - 722, 1037, 1036, 1035, 1034, 1033, 1032, 1031, 725, 729, - 1030, 726, 730, 732, 1029, 1028, 1027, 731, 735, 743, - 733, 737, 1026, 734, 746, 744, 747, 750, 1025, 752, - 1024, 755, 761, 760, 758, 763, 764, 1023, 1022, 1021, - 771, 762, 1020, 773, 1019, 774, 777, 779, 1018, 787, - 1017, 1016, 1015, 1014, 778, 788, 1013, 791, 792, 1012, - 1011, 1010, 790, 795, 1009, 1008, 1007, 1006, 793, 796, - 798, 797, 804, 801, 1005, 1004, 1003, 809, 811, 812, - - 813, 814, 816, 817, 820, 822, 827, 819, 1002, 815, - 833, 826, 839, 843, 845, 846, 847, 848, 999, 849, - 850, 851, 990, 854, 857, 855, 856, 989, 987, 858, - 866, 876, 862, 861, 986, 879, 880, 881, 984, 983, - 982, 882, 884, 888, 890, 889, 863, 891, 896, 897, - 899, 901, 900, 902, 903, 904, 908, 909, 912, 913, - 916, 980, 918, 924, 923, 925, 926, 977, 928, 929, - 930, 931, 975, 935, 936, 973, 934, 944, 942, 946, - 950, 954, 956, 957, 958, 960, 961, 959, 962, 864, - 964, 829, 766, 604, 969, 519, 965, 517, 477, 446, + 120, 168, 112, 115, 135, 127, 1101, 1109, 1090, 1109, + 0, 158, 173, 196, 201, 70, 206, 221, 226, 0, + 121, 152, 123, 139, 159, 140, 162, 166, 1089, 227, + 179, 31, 187, 119, 237, 182, 230, 188, 238, 240, + 239, 241, 180, 243, 250, 248, 251, 252, 255, 260, + 264, 262, 269, 257, 271, 282, 1088, 275, 281, 283, + 285, 289, 290, 293, 304, 297, 291, 292, 301, 302, + + 1087, 307, 310, 296, 313, 318, 321, 330, 332, 336, + 333, 337, 213, 334, 345, 1086, 0, 361, 365, 1085, + 379, 396, 0, 1084, 354, 349, 1083, 371, 1082, 370, + 1081, 369, 372, 327, 1080, 373, 385, 391, 347, 386, + 397, 1079, 402, 398, 403, 399, 405, 406, 409, 413, + 410, 420, 417, 421, 422, 424, 425, 430, 427, 434, + 437, 435, 438, 440, 1078, 1077, 444, 442, 1076, 448, + 1075, 1074, 470, 447, 449, 458, 451, 482, 1073, 450, + 1072, 484, 452, 483, 1071, 463, 485, 487, 488, 492, + 496, 489, 490, 495, 502, 508, 503, 513, 510, 506, + + 509, 511, 516, 521, 526, 527, 210, 1070, 528, 1109, + 539, 556, 560, 564, 569, 530, 533, 534, 570, 1069, + 1068, 1067, 571, 572, 573, 1066, 539, 575, 574, 295, + 576, 577, 579, 581, 580, 583, 586, 584, 1065, 589, + 594, 597, 590, 600, 603, 605, 608, 609, 1064, 1063, + 610, 612, 1062, 613, 615, 0, 614, 1061, 616, 618, + 619, 622, 632, 633, 630, 634, 640, 643, 647, 1060, + 648, 635, 1059, 1058, 651, 1057, 1056, 656, 636, 658, + 659, 661, 662, 663, 665, 666, 1055, 668, 1054, 670, + 669, 676, 1053, 681, 677, 1052, 687, 690, 689, 679, + + 697, 688, 698, 699, 701, 702, 704, 705, 1051, 706, + 1050, 710, 709, 711, 714, 715, 720, 1049, 716, 722, + 723, 726, 734, 736, 1048, 728, 738, 1047, 1046, 1045, + 1044, 1043, 1042, 1041, 739, 740, 1040, 741, 742, 747, + 1039, 1038, 1037, 744, 748, 749, 751, 752, 1036, 758, + 759, 764, 760, 762, 1035, 771, 1034, 768, 766, 777, + 770, 775, 776, 1033, 1032, 1031, 791, 778, 1030, 782, + 1029, 780, 788, 799, 1028, 800, 1027, 1026, 1025, 1024, + 787, 802, 1023, 803, 805, 1022, 1021, 1020, 809, 806, + 1019, 1018, 1017, 1016, 810, 811, 813, 814, 817, 816, + + 1015, 1014, 1013, 820, 823, 824, 828, 826, 829, 830, + 831, 836, 840, 832, 1010, 837, 848, 853, 855, 852, + 842, 856, 845, 859, 1000, 864, 866, 867, 999, 869, + 871, 872, 873, 998, 996, 877, 874, 878, 879, 875, + 995, 886, 891, 892, 994, 989, 988, 897, 898, 880, + 899, 900, 901, 906, 908, 909, 910, 912, 911, 914, + 915, 918, 920, 921, 923, 924, 927, 987, 928, 936, + 937, 938, 940, 982, 942, 935, 941, 943, 790, 946, + 947, 545, 948, 959, 949, 961, 965, 967, 968, 969, + 971, 970, 973, 972, 974, 543, 975, 456, 455, 454, - 970, 333, 1097, 1005, 1007, 83, 1011, 80 + 976, 253, 984, 178, 177, 147, 981, 144, 1109, 1016, + 1018, 83, 1022, 80 } ; -static yyconst short int yy_def[509] = +static yyconst short int yy_def[515] = { 0, - 503, 1, 503, 503, 503, 503, 504, 505, 506, 503, - 505, 505, 505, 505, 507, 505, 505, 505, 505, 505, - 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, - 505, 505, 505, 505, 505, 505, 504, 503, 505, 503, - 508, 508, 503, 503, 505, 505, 505, 505, 505, 507, - 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, - 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, - 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, - 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, - 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, - - 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, - 505, 505, 505, 503, 508, 508, 503, 505, 505, 505, - 49, 505, 505, 505, 505, 505, 505, 505, 505, 505, - 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, - 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, - 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, - 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, - 49, 505, 505, 505, 505, 505, 505, 505, 505, 505, - 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, - 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, - - 505, 505, 505, 505, 505, 503, 503, 503, 503, 505, - 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, - 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, - 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, - 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, - 505, 171, 505, 505, 505, 505, 505, 505, 505, 505, - 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, - 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, - 505, 505, 505, 505, 505, 503, 505, 505, 505, 505, - 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, - - 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, - 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, - 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, - 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, - 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, - 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, - 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, - 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, - 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, - 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, - - 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, - 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, - 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, - 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, - 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, - 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, - 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, - 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, - 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, - 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, + 509, 1, 509, 509, 509, 509, 510, 511, 512, 509, + 511, 511, 511, 511, 513, 511, 511, 511, 511, 511, + 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, + 511, 511, 511, 511, 511, 511, 510, 509, 511, 509, + 514, 514, 509, 509, 511, 511, 511, 511, 511, 513, + 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, + 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, + 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, + 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, + 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, + + 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, + 511, 511, 511, 511, 511, 509, 514, 514, 509, 511, + 511, 511, 49, 511, 511, 511, 511, 511, 511, 511, + 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, + 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, + 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, + 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, + 511, 511, 49, 511, 511, 511, 511, 511, 511, 511, + 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, + 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, + + 511, 511, 511, 511, 511, 511, 511, 511, 511, 509, + 509, 509, 509, 511, 511, 511, 511, 511, 511, 511, + 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, + 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, + 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, + 511, 511, 511, 511, 511, 173, 511, 511, 511, 511, + 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, + 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, + 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, + 511, 509, 511, 511, 511, 511, 511, 511, 511, 511, + + 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, + 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, + 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, + 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, + 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, + 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, + 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, + 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, + 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, + 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, + + 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, + 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, + 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, + 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, + 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, + 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, + 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, + 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, + 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, + 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, - 505, 505, 0, 503, 503, 503, 503, 503 + 511, 511, 511, 511, 511, 511, 511, 511, 0, 509, + 509, 509, 509, 509 } ; -static yyconst short int yy_nxt[1141] = +static yyconst short int yy_nxt[1153] = { 0, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 4, 15, 8, 8, 8, 16, 17, 18, 19, 20, 21, 22, 8, 23, 8, 24, 25, 26, 27, 28, 8, 29, 30, 31, 32, 33, 34, 35, 8, 36, 42, 40, 43, 43, 43, 43, 44, - 44, 44, 44, 45, 45, 45, 45, 40, 46, 134, - 40, 135, 40, 40, 47, 48, 48, 48, 48, 40, - 47, 48, 48, 48, 48, 40, 40, 69, 118, 40, - 84, 40, 115, 40, 51, 41, 85, 70, 56, 40, + 44, 44, 44, 45, 45, 45, 45, 40, 46, 136, + 40, 137, 40, 40, 47, 48, 48, 48, 48, 40, + 47, 48, 48, 48, 48, 40, 40, 69, 120, 40, + 84, 40, 117, 40, 51, 41, 85, 70, 56, 40, 90, 52, 57, 53, 40, 54, 49, 58, 55, 60, 59, 61, 40, 40, 40, 76, 77, 64, 71, 40, 40, 65, 62, 74, 78, 66, 63, 67, 72, 75, 68, 40, 79, 40, 73, 40, 81, 80, 40, 86, - 108, 87, 40, 40, 40, 88, 40, 110, 99, 82, - 40, 89, 122, 109, 125, 83, 91, 111, 40, 113, - 40, 100, 40, 40, 101, 137, 92, 40, 203, 93, - 40, 102, 94, 95, 128, 40, 112, 116, 116, 116, - 116, 126, 141, 96, 97, 40, 98, 91, 123, 40, - 124, 40, 43, 43, 43, 43, 129, 103, 117, 44, - 44, 44, 44, 40, 104, 127, 105, 40, 106, 40, - - 133, 40, 40, 107, 47, 45, 45, 45, 45, 40, - 119, 119, 119, 119, 40, 130, 40, 120, 297, 148, - 136, 40, 156, 120, 47, 48, 48, 48, 48, 40, - 121, 121, 121, 121, 40, 40, 121, 121, 40, 121, - 121, 121, 121, 121, 121, 40, 140, 40, 40, 40, - 131, 40, 138, 40, 40, 143, 144, 132, 40, 40, - 149, 40, 142, 146, 139, 40, 40, 40, 40, 40, - 147, 40, 145, 152, 159, 40, 150, 151, 157, 162, - 153, 154, 161, 155, 158, 40, 160, 40, 164, 40, - 163, 40, 166, 40, 172, 171, 40, 40, 40, 40, - - 165, 40, 167, 173, 168, 40, 180, 182, 40, 169, - 40, 174, 176, 40, 40, 177, 170, 181, 178, 175, - 40, 179, 40, 183, 188, 40, 184, 186, 40, 40, - 202, 40, 197, 198, 185, 40, 189, 190, 187, 192, - 191, 196, 40, 40, 193, 199, 40, 40, 200, 40, - 201, 40, 194, 116, 116, 116, 116, 195, 207, 207, - 207, 207, 212, 204, 205, 208, 40, 213, 40, 40, - 218, 208, 119, 119, 119, 119, 40, 214, 40, 120, - 40, 216, 215, 40, 40, 120, 209, 210, 40, 211, - 211, 211, 211, 40, 40, 217, 219, 40, 223, 224, - - 220, 40, 222, 221, 40, 40, 40, 40, 40, 40, - 225, 227, 40, 40, 226, 229, 230, 228, 234, 40, - 40, 235, 40, 40, 40, 237, 40, 40, 231, 236, - 232, 40, 233, 239, 40, 240, 242, 238, 40, 40, - 40, 241, 40, 40, 40, 243, 245, 40, 40, 40, - 246, 40, 40, 40, 40, 247, 255, 244, 249, 40, - 288, 261, 40, 262, 250, 251, 248, 252, 252, 252, - 252, 40, 253, 252, 252, 254, 252, 252, 252, 252, - 252, 252, 40, 260, 40, 40, 40, 40, 40, 40, - 40, 256, 263, 257, 40, 40, 40, 258, 266, 259, - - 265, 40, 40, 268, 269, 267, 40, 264, 40, 40, - 273, 270, 271, 272, 40, 275, 40, 40, 40, 274, - 40, 276, 278, 40, 40, 280, 281, 277, 282, 40, - 40, 40, 40, 284, 283, 279, 207, 207, 207, 207, - 40, 40, 285, 208, 295, 294, 299, 209, 209, 208, - 286, 286, 286, 286, 286, 286, 286, 286, 211, 211, - 211, 211, 40, 211, 211, 211, 211, 40, 40, 40, - 40, 40, 40, 40, 40, 40, 40, 40, 291, 40, - 40, 40, 302, 40, 40, 287, 289, 290, 304, 303, - 298, 40, 40, 40, 40, 292, 293, 301, 300, 306, - - 40, 296, 308, 40, 40, 307, 305, 40, 311, 40, - 40, 40, 309, 310, 40, 40, 40, 40, 312, 40, - 40, 40, 313, 40, 314, 315, 316, 321, 319, 320, - 323, 40, 325, 40, 317, 322, 40, 318, 40, 40, - 327, 40, 40, 40, 324, 330, 326, 40, 329, 332, - 331, 40, 333, 40, 334, 40, 328, 40, 336, 40, - 335, 40, 339, 337, 40, 40, 40, 40, 338, 40, - 40, 286, 286, 286, 286, 40, 340, 343, 40, 346, - 349, 40, 341, 348, 40, 342, 350, 40, 351, 352, - 345, 347, 344, 40, 353, 40, 40, 40, 40, 40, - - 40, 355, 40, 40, 40, 40, 40, 358, 40, 40, - 362, 363, 40, 40, 354, 356, 357, 359, 364, 361, - 365, 369, 360, 40, 366, 40, 40, 40, 40, 367, - 368, 40, 40, 372, 371, 40, 373, 374, 40, 40, - 370, 375, 40, 40, 40, 40, 40, 40, 40, 376, - 40, 380, 379, 378, 382, 384, 40, 40, 377, 40, - 40, 387, 390, 40, 385, 40, 381, 383, 40, 386, - 388, 40, 389, 40, 40, 40, 40, 40, 393, 40, - 392, 395, 396, 391, 40, 394, 40, 40, 400, 401, - 40, 40, 40, 397, 398, 399, 404, 406, 402, 405, - - 40, 40, 403, 40, 40, 40, 40, 407, 40, 40, - 40, 40, 408, 410, 40, 411, 412, 40, 409, 416, - 413, 414, 40, 417, 40, 40, 40, 40, 40, 40, - 40, 415, 40, 40, 418, 40, 424, 419, 425, 40, - 40, 423, 40, 420, 433, 421, 40, 426, 427, 429, - 428, 422, 40, 431, 430, 432, 40, 434, 40, 40, - 40, 40, 40, 40, 40, 435, 437, 40, 40, 40, - 40, 40, 439, 442, 40, 40, 40, 40, 446, 40, - 451, 436, 443, 438, 447, 440, 441, 444, 448, 40, - 450, 445, 40, 40, 40, 40, 449, 40, 453, 452, - - 455, 40, 40, 40, 40, 460, 456, 454, 458, 40, - 40, 461, 40, 40, 40, 40, 40, 40, 459, 465, - 467, 40, 40, 463, 457, 40, 40, 464, 466, 40, - 468, 40, 462, 469, 472, 473, 40, 40, 40, 40, - 470, 40, 40, 40, 40, 471, 476, 40, 40, 40, - 480, 477, 474, 478, 479, 40, 482, 40, 485, 40, - 475, 483, 486, 40, 487, 481, 484, 40, 488, 40, - 40, 40, 40, 40, 40, 40, 489, 40, 40, 494, - 495, 496, 40, 40, 490, 491, 40, 501, 40, 500, - 40, 493, 492, 40, 499, 40, 40, 40, 498, 40, + 110, 87, 40, 40, 40, 88, 40, 112, 100, 82, + 40, 89, 124, 111, 127, 83, 91, 113, 40, 115, + 40, 101, 40, 40, 102, 139, 92, 40, 93, 94, + 40, 103, 95, 96, 130, 40, 114, 118, 118, 118, + 118, 128, 40, 97, 98, 40, 99, 91, 125, 40, + 126, 40, 43, 43, 43, 43, 131, 104, 129, 105, + 40, 40, 40, 40, 106, 40, 107, 132, 108, 135, + + 40, 40, 151, 109, 119, 44, 44, 44, 44, 47, + 45, 45, 45, 45, 40, 121, 121, 121, 121, 40, + 142, 138, 122, 40, 207, 144, 40, 290, 122, 47, + 48, 48, 48, 48, 40, 123, 123, 123, 123, 40, + 40, 123, 123, 40, 123, 123, 123, 123, 123, 123, + 40, 40, 40, 40, 40, 133, 40, 140, 143, 145, + 146, 40, 134, 40, 40, 40, 40, 148, 40, 141, + 40, 158, 150, 40, 149, 40, 147, 40, 161, 152, + 154, 153, 40, 164, 40, 159, 155, 156, 40, 157, + 162, 160, 163, 166, 40, 40, 40, 165, 40, 167, + + 168, 169, 40, 40, 40, 40, 40, 170, 40, 40, + 40, 185, 171, 176, 40, 40, 175, 40, 183, 172, + 40, 177, 184, 40, 303, 173, 40, 186, 187, 178, + 174, 40, 179, 189, 40, 180, 188, 192, 181, 193, + 40, 182, 191, 40, 190, 40, 40, 40, 194, 40, + 40, 196, 195, 201, 202, 206, 197, 200, 40, 204, + 40, 205, 40, 222, 198, 226, 203, 40, 208, 199, + 118, 118, 118, 118, 211, 211, 211, 211, 216, 209, + 217, 212, 40, 40, 40, 40, 40, 212, 121, 121, + 121, 121, 40, 218, 223, 122, 219, 220, 40, 40, + + 221, 122, 213, 214, 40, 215, 215, 215, 215, 40, + 40, 40, 40, 225, 227, 40, 40, 231, 40, 40, + 224, 233, 40, 40, 229, 228, 40, 234, 230, 232, + 40, 238, 239, 40, 40, 40, 241, 40, 40, 235, + 40, 236, 240, 40, 243, 237, 244, 40, 40, 242, + 40, 40, 246, 40, 247, 40, 245, 40, 249, 250, + 40, 40, 40, 40, 40, 40, 251, 40, 40, 40, + 248, 40, 253, 260, 267, 254, 40, 252, 255, 256, + 256, 256, 256, 257, 265, 256, 256, 258, 256, 256, + 256, 256, 256, 256, 259, 40, 40, 40, 40, 269, + + 40, 40, 40, 40, 261, 40, 262, 266, 40, 40, + 263, 271, 264, 270, 273, 40, 40, 268, 274, 40, + 272, 40, 40, 40, 40, 275, 40, 284, 276, 40, + 279, 277, 278, 280, 40, 281, 282, 283, 286, 40, + 40, 40, 287, 40, 288, 285, 40, 40, 211, 211, + 211, 211, 40, 294, 289, 212, 40, 300, 40, 291, + 293, 212, 213, 213, 295, 292, 292, 292, 292, 292, + 292, 292, 292, 215, 215, 215, 215, 40, 215, 215, + 215, 215, 40, 40, 40, 40, 40, 40, 40, 40, + 40, 297, 40, 40, 40, 305, 40, 40, 308, 40, + + 296, 301, 40, 40, 304, 309, 310, 40, 298, 299, + 40, 306, 313, 40, 302, 307, 40, 312, 40, 314, + 311, 40, 40, 40, 315, 40, 40, 40, 40, 40, + 317, 40, 40, 318, 316, 40, 325, 320, 327, 319, + 322, 321, 326, 40, 329, 40, 40, 40, 40, 40, + 323, 324, 328, 40, 331, 333, 40, 335, 330, 343, + 40, 40, 336, 340, 40, 337, 334, 338, 332, 40, + 339, 40, 40, 341, 40, 40, 40, 345, 40, 40, + 342, 40, 40, 40, 344, 292, 292, 292, 292, 349, + 40, 346, 40, 352, 40, 354, 347, 348, 356, 355, + + 40, 40, 40, 40, 351, 353, 350, 357, 358, 359, + 40, 40, 40, 360, 40, 40, 361, 40, 40, 40, + 362, 364, 40, 40, 40, 368, 369, 40, 40, 40, + 363, 365, 370, 40, 367, 40, 40, 371, 366, 40, + 372, 40, 375, 378, 377, 374, 376, 40, 379, 40, + 373, 40, 40, 40, 40, 40, 380, 40, 381, 382, + 40, 40, 40, 385, 40, 40, 386, 384, 390, 388, + 391, 40, 40, 40, 383, 40, 393, 40, 387, 40, + 389, 40, 396, 40, 40, 395, 401, 392, 40, 40, + 40, 40, 398, 40, 394, 40, 397, 399, 400, 402, + + 40, 40, 410, 40, 40, 403, 404, 405, 406, 407, + 411, 409, 40, 40, 408, 40, 40, 412, 40, 40, + 413, 414, 40, 40, 40, 416, 40, 40, 417, 40, + 40, 419, 415, 40, 422, 418, 40, 40, 420, 40, + 423, 40, 40, 40, 40, 40, 421, 424, 430, 40, + 40, 431, 425, 40, 426, 40, 429, 427, 40, 433, + 432, 40, 435, 428, 434, 40, 40, 436, 40, 40, + 438, 439, 40, 440, 441, 437, 443, 40, 442, 40, + 40, 444, 40, 445, 40, 40, 40, 40, 40, 448, + 40, 40, 40, 40, 457, 452, 454, 449, 455, 40, + + 446, 450, 447, 453, 40, 40, 458, 456, 451, 459, + 40, 40, 40, 40, 40, 461, 463, 464, 460, 40, + 462, 40, 40, 40, 40, 40, 467, 40, 40, 465, + 471, 40, 473, 40, 40, 469, 40, 40, 470, 472, + 40, 40, 474, 466, 468, 478, 479, 475, 40, 40, + 40, 40, 476, 40, 40, 40, 40, 477, 482, 40, + 40, 40, 40, 480, 486, 483, 484, 488, 485, 491, + 481, 487, 40, 489, 40, 494, 492, 490, 40, 493, + 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, + 501, 495, 500, 502, 40, 40, 506, 40, 497, 496, - 40, 497, 40, 40, 502, 37, 37, 37, 37, 39, - 39, 50, 40, 50, 50, 40, 40, 40, 40, 40, + 40, 40, 40, 499, 498, 505, 507, 40, 40, 40, + 504, 40, 40, 40, 503, 508, 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, 40, 40, 40, 40, 40, 40, 40, 40, - 40, 40, 40, 40, 40, 40, 40, 206, 40, 40, - 40, 40, 114, 40, 38, 503, 3, 503, 503, 503, + 40, 40, 40, 40, 40, 40, 40, 40, 40, 210, - 503, 503, 503, 503, 503, 503, 503, 503, 503, 503, - 503, 503, 503, 503, 503, 503, 503, 503, 503, 503, - 503, 503, 503, 503, 503, 503, 503, 503, 503, 503, - 503, 503, 503, 503, 503, 503, 503, 503, 503, 503 + 40, 40, 40, 40, 116, 40, 38, 509, 3, 509, + 509, 509, 509, 509, 509, 509, 509, 509, 509, 509, + 509, 509, 509, 509, 509, 509, 509, 509, 509, 509, + 509, 509, 509, 509, 509, 509, 509, 509, 509, 509, + 509, 509, 509, 509, 509, 509, 509, 509, 509, 509, + 509, 509 } ; -static yyconst short int yy_chk[1141] = +static yyconst short int yy_chk[1153] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -705,7 +709,7 @@ 10, 10, 10, 11, 11, 11, 11, 11, 12, 62, 20, 62, 26, 12, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 16, 20, 46, 17, - 26, 29, 508, 46, 16, 506, 26, 20, 17, 23, + 26, 29, 514, 46, 16, 512, 26, 20, 17, 23, 29, 16, 17, 16, 18, 16, 13, 17, 16, 18, 17, 18, 19, 21, 22, 23, 23, 19, 21, 24, @@ -713,115 +717,117 @@ 19, 25, 24, 28, 21, 33, 25, 24, 34, 27, 33, 27, 64, 31, 51, 28, 53, 34, 31, 25, 36, 28, 51, 33, 53, 25, 30, 35, 35, 36, - 30, 31, 54, 56, 31, 64, 30, 67, 111, 30, - 111, 31, 30, 30, 56, 52, 35, 42, 42, 42, - 42, 54, 67, 30, 30, 57, 30, 32, 52, 55, - 52, 32, 43, 43, 43, 43, 57, 32, 44, 44, - 44, 44, 44, 61, 32, 55, 32, 58, 32, 63, - - 61, 72, 226, 32, 45, 45, 45, 45, 45, 45, - 47, 47, 47, 47, 47, 58, 78, 47, 226, 72, - 63, 66, 78, 47, 48, 48, 48, 48, 48, 48, - 49, 49, 49, 49, 49, 60, 49, 49, 68, 49, - 49, 49, 49, 49, 49, 65, 66, 69, 71, 70, - 60, 73, 65, 74, 76, 69, 70, 60, 77, 75, - 73, 79, 68, 71, 65, 84, 92, 81, 91, 80, - 71, 82, 70, 76, 80, 83, 74, 75, 79, 82, - 77, 77, 81, 77, 79, 85, 80, 86, 84, 88, - 83, 89, 86, 90, 92, 91, 93, 94, 95, 96, - - 85, 97, 88, 93, 89, 102, 95, 97, 103, 90, - 98, 93, 94, 99, 101, 94, 90, 96, 94, 93, - 104, 94, 105, 98, 102, 110, 99, 101, 108, 107, - 110, 106, 108, 108, 99, 109, 103, 104, 101, 106, - 105, 107, 112, 113, 106, 108, 502, 132, 109, 124, - 109, 123, 106, 116, 116, 116, 116, 106, 117, 117, - 117, 117, 123, 112, 113, 117, 130, 124, 126, 128, - 132, 117, 119, 119, 119, 119, 119, 126, 135, 119, - 131, 130, 128, 138, 139, 119, 120, 120, 134, 120, - 120, 120, 120, 120, 136, 131, 134, 137, 138, 139, - - 135, 141, 137, 136, 143, 142, 144, 145, 146, 147, - 141, 142, 149, 148, 141, 144, 145, 143, 148, 151, - 150, 149, 152, 155, 153, 151, 154, 156, 145, 150, - 146, 157, 147, 153, 158, 154, 156, 152, 159, 160, - 161, 155, 162, 165, 166, 157, 159, 174, 168, 172, - 160, 179, 173, 213, 180, 161, 174, 158, 165, 500, - 213, 179, 177, 180, 166, 168, 162, 171, 171, 171, - 171, 181, 172, 171, 171, 173, 171, 171, 171, 171, - 171, 171, 175, 177, 183, 184, 186, 185, 189, 190, - 499, 175, 181, 175, 187, 188, 191, 175, 185, 175, - - 184, 192, 193, 187, 188, 186, 194, 183, 195, 196, - 192, 189, 190, 191, 198, 194, 199, 197, 200, 193, - 202, 195, 197, 201, 205, 199, 200, 196, 201, 203, - 498, 224, 496, 203, 202, 198, 207, 207, 207, 207, - 223, 228, 205, 207, 224, 223, 228, 208, 208, 207, - 208, 208, 208, 208, 209, 209, 209, 209, 210, 210, - 210, 210, 210, 211, 211, 211, 211, 211, 212, 214, - 215, 219, 220, 221, 225, 227, 230, 231, 219, 229, - 232, 233, 231, 234, 236, 212, 214, 215, 233, 232, - 227, 239, 240, 238, 241, 220, 221, 230, 229, 236, - - 237, 225, 238, 242, 243, 237, 234, 247, 241, 244, - 250, 248, 239, 240, 251, 256, 254, 494, 242, 253, - 255, 257, 243, 258, 244, 247, 248, 255, 253, 254, - 257, 259, 258, 260, 250, 256, 262, 251, 261, 267, - 259, 263, 264, 266, 257, 262, 258, 272, 261, 264, - 263, 270, 266, 273, 267, 274, 260, 275, 272, 276, - 270, 277, 275, 273, 278, 280, 279, 282, 274, 284, - 285, 286, 286, 286, 286, 288, 276, 279, 289, 284, - 288, 291, 277, 285, 292, 278, 289, 293, 291, 292, - 282, 284, 280, 294, 293, 295, 296, 297, 298, 300, - - 299, 295, 301, 302, 304, 307, 309, 298, 308, 306, - 302, 304, 311, 310, 294, 296, 297, 299, 306, 301, - 307, 311, 300, 313, 308, 314, 315, 316, 317, 309, - 310, 320, 318, 315, 314, 321, 316, 317, 329, 332, - 313, 318, 330, 333, 338, 334, 341, 344, 339, 320, - 342, 332, 330, 329, 334, 339, 340, 346, 321, 345, - 347, 342, 346, 348, 340, 350, 333, 338, 352, 341, - 344, 355, 345, 354, 353, 362, 356, 357, 350, 493, - 348, 353, 354, 347, 361, 352, 364, 366, 361, 361, - 367, 375, 368, 355, 356, 357, 366, 368, 362, 367, - - 370, 376, 364, 383, 378, 379, 389, 370, 384, 390, - 392, 391, 375, 378, 394, 379, 383, 393, 376, 391, - 384, 389, 398, 392, 399, 400, 401, 402, 410, 403, - 404, 390, 408, 405, 393, 406, 402, 394, 403, 412, - 407, 401, 492, 398, 412, 399, 411, 404, 405, 407, - 406, 400, 413, 410, 408, 411, 414, 413, 415, 416, - 417, 418, 420, 421, 422, 414, 416, 424, 426, 427, - 425, 430, 418, 422, 434, 433, 447, 490, 427, 431, - 434, 415, 424, 417, 430, 420, 421, 425, 431, 432, - 433, 426, 436, 437, 438, 442, 432, 443, 437, 436, - - 442, 444, 446, 445, 448, 447, 443, 438, 445, 449, - 450, 448, 451, 453, 452, 454, 455, 456, 446, 452, - 454, 457, 458, 450, 444, 459, 460, 451, 453, 461, - 455, 463, 449, 456, 459, 460, 465, 464, 466, 467, - 457, 469, 470, 471, 472, 458, 464, 477, 474, 475, - 469, 465, 461, 466, 467, 479, 471, 478, 475, 480, - 463, 472, 477, 481, 478, 470, 474, 482, 479, 483, - 484, 485, 488, 486, 487, 489, 480, 491, 497, 485, - 486, 487, 495, 501, 481, 482, 476, 497, 473, 495, - 468, 484, 483, 462, 491, 441, 440, 439, 489, 435, - - 429, 488, 428, 423, 501, 504, 504, 504, 504, 505, - 505, 507, 419, 507, 507, 409, 397, 396, 395, 388, - 387, 386, 385, 382, 381, 380, 377, 374, 373, 372, - 371, 369, 365, 363, 360, 359, 358, 351, 349, 343, - 337, 336, 335, 331, 328, 327, 326, 325, 324, 323, - 322, 319, 312, 305, 303, 290, 287, 283, 281, 271, - 269, 268, 265, 249, 246, 245, 235, 222, 218, 217, - 216, 204, 182, 178, 176, 170, 169, 167, 164, 163, - 140, 133, 129, 127, 125, 122, 118, 114, 100, 87, - 59, 39, 37, 8, 7, 3, 503, 503, 503, 503, - - 503, 503, 503, 503, 503, 503, 503, 503, 503, 503, - 503, 503, 503, 503, 503, 503, 503, 503, 503, 503, - 503, 503, 503, 503, 503, 503, 503, 503, 503, 503, - 503, 503, 503, 503, 503, 503, 503, 503, 503, 503 + 30, 31, 54, 56, 31, 64, 30, 508, 30, 30, + 506, 31, 30, 30, 56, 52, 35, 42, 42, 42, + 42, 54, 55, 30, 30, 57, 30, 32, 52, 58, + 52, 32, 43, 43, 43, 43, 57, 32, 55, 32, + 505, 504, 61, 73, 32, 66, 32, 58, 32, 61, + + 63, 68, 73, 32, 44, 44, 44, 44, 44, 45, + 45, 45, 45, 45, 45, 47, 47, 47, 47, 47, + 66, 63, 47, 207, 113, 68, 113, 207, 47, 48, + 48, 48, 48, 48, 48, 49, 49, 49, 49, 49, + 60, 49, 49, 67, 49, 49, 49, 49, 49, 49, + 65, 69, 71, 70, 72, 60, 74, 65, 67, 69, + 70, 76, 60, 75, 77, 78, 502, 71, 79, 65, + 84, 78, 72, 80, 71, 82, 70, 81, 80, 74, + 76, 75, 83, 82, 85, 79, 77, 77, 88, 77, + 80, 79, 81, 84, 89, 86, 90, 83, 91, 85, + + 86, 88, 92, 93, 97, 98, 94, 89, 230, 104, + 96, 98, 90, 94, 99, 100, 93, 95, 96, 90, + 102, 94, 97, 103, 230, 91, 105, 99, 100, 94, + 92, 106, 95, 102, 107, 95, 100, 104, 95, 105, + 134, 95, 103, 108, 102, 109, 111, 114, 106, 110, + 112, 108, 107, 110, 110, 112, 108, 109, 115, 111, + 139, 111, 126, 134, 108, 139, 110, 125, 114, 108, + 118, 118, 118, 118, 119, 119, 119, 119, 125, 115, + 126, 119, 132, 130, 128, 133, 136, 119, 121, 121, + 121, 121, 121, 128, 136, 121, 130, 132, 137, 140, + + 133, 121, 122, 122, 138, 122, 122, 122, 122, 122, + 141, 144, 146, 138, 140, 143, 145, 144, 147, 148, + 137, 146, 149, 151, 143, 141, 150, 147, 143, 145, + 153, 150, 151, 152, 154, 155, 153, 156, 157, 147, + 159, 148, 152, 158, 155, 149, 156, 160, 162, 154, + 161, 163, 158, 164, 159, 168, 157, 167, 161, 162, + 174, 170, 175, 180, 177, 183, 163, 500, 499, 498, + 160, 176, 167, 177, 183, 168, 186, 164, 170, 173, + 173, 173, 173, 174, 180, 173, 173, 175, 173, 173, + 173, 173, 173, 173, 176, 178, 184, 182, 187, 186, + + 188, 189, 192, 193, 178, 190, 178, 182, 194, 191, + 178, 188, 178, 187, 190, 195, 197, 184, 191, 200, + 189, 196, 201, 199, 202, 192, 198, 201, 193, 203, + 196, 194, 195, 197, 204, 198, 199, 200, 203, 205, + 206, 209, 204, 216, 205, 202, 217, 218, 211, 211, + 211, 211, 227, 217, 206, 211, 496, 227, 482, 209, + 216, 211, 212, 212, 218, 212, 212, 212, 212, 213, + 213, 213, 213, 214, 214, 214, 214, 214, 215, 215, + 215, 215, 215, 219, 223, 224, 225, 229, 228, 231, + 232, 223, 233, 235, 234, 232, 236, 238, 235, 237, + + 219, 228, 240, 243, 231, 236, 237, 241, 224, 225, + 242, 233, 241, 244, 229, 234, 245, 240, 246, 242, + 238, 247, 248, 251, 243, 252, 254, 257, 255, 259, + 245, 260, 261, 246, 244, 262, 257, 248, 260, 247, + 252, 251, 259, 265, 262, 263, 264, 266, 272, 279, + 254, 255, 261, 267, 263, 264, 268, 266, 262, 279, + 269, 271, 267, 272, 275, 268, 265, 269, 263, 278, + 271, 280, 281, 275, 282, 283, 284, 281, 285, 286, + 278, 288, 291, 290, 280, 292, 292, 292, 292, 285, + 295, 282, 300, 290, 294, 291, 283, 284, 295, 294, + + 297, 302, 299, 298, 288, 290, 286, 297, 298, 299, + 301, 303, 304, 300, 305, 306, 301, 307, 308, 310, + 302, 304, 313, 312, 314, 308, 310, 315, 316, 319, + 303, 305, 312, 317, 307, 320, 321, 313, 306, 322, + 314, 326, 317, 321, 320, 316, 319, 323, 322, 324, + 315, 327, 335, 336, 338, 339, 323, 344, 324, 326, + 340, 345, 346, 336, 347, 348, 338, 335, 345, 340, + 346, 350, 351, 353, 327, 354, 348, 352, 339, 359, + 344, 358, 352, 361, 356, 351, 359, 347, 362, 363, + 360, 368, 354, 372, 350, 370, 353, 356, 358, 360, + + 381, 373, 372, 479, 367, 361, 362, 363, 367, 367, + 373, 370, 374, 376, 368, 382, 384, 374, 385, 390, + 376, 381, 389, 395, 396, 384, 397, 398, 385, 400, + 399, 390, 382, 404, 397, 389, 405, 406, 395, 408, + 398, 407, 409, 410, 411, 414, 396, 399, 408, 412, + 416, 409, 400, 413, 404, 421, 407, 405, 423, 411, + 410, 417, 413, 406, 412, 420, 418, 414, 419, 422, + 417, 418, 424, 419, 420, 416, 422, 426, 421, 427, + 428, 423, 430, 424, 431, 432, 433, 437, 440, 428, + 436, 438, 439, 450, 440, 433, 437, 430, 438, 442, + + 426, 431, 427, 436, 443, 444, 442, 439, 432, 443, + 448, 449, 451, 452, 453, 448, 450, 451, 444, 454, + 449, 455, 456, 457, 459, 458, 454, 460, 461, 452, + 458, 462, 460, 463, 464, 456, 465, 466, 457, 459, + 467, 469, 461, 453, 455, 465, 466, 462, 476, 470, + 471, 472, 463, 473, 477, 475, 478, 464, 470, 480, + 481, 483, 485, 467, 475, 471, 472, 477, 473, 481, + 469, 476, 484, 478, 486, 485, 483, 480, 487, 484, + 488, 489, 490, 492, 491, 494, 493, 495, 497, 501, + 492, 486, 491, 493, 507, 474, 501, 503, 488, 487, + + 468, 447, 446, 490, 489, 497, 503, 445, 441, 435, + 495, 434, 429, 425, 494, 507, 510, 510, 510, 510, + 511, 511, 513, 415, 513, 513, 403, 402, 401, 394, + 393, 392, 391, 388, 387, 386, 383, 380, 379, 378, + 377, 375, 371, 369, 366, 365, 364, 357, 355, 349, + 343, 342, 341, 337, 334, 333, 332, 331, 330, 329, + 328, 325, 318, 311, 309, 296, 293, 289, 287, 277, + 276, 274, 273, 270, 258, 253, 250, 249, 239, 226, + 222, 221, 220, 208, 185, 181, 179, 172, 171, 169, + 166, 165, 142, 135, 131, 129, 127, 124, 120, 116, + + 101, 87, 59, 39, 37, 8, 7, 3, 509, 509, + 509, 509, 509, 509, 509, 509, 509, 509, 509, 509, + 509, 509, 509, 509, 509, 509, 509, 509, 509, 509, + 509, 509, 509, 509, 509, 509, 509, 509, 509, 509, + 509, 509, 509, 509, 509, 509, 509, 509, 509, 509, + 509, 509 } ; static yy_state_type yy_state_buf[YY_BUF_SIZE + 2], *yy_state_ptr; @@ -838,7 +844,7 @@ #define YY_MORE_ADJ 0 #define YY_RESTORE_YY_MORE_OFFSET char *yytext; -#line 1 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 1 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" #define INITIAL 0 /*===-- Lexer.l - Scanner for llvm assembly files --------------*- C++ -*--===// // @@ -853,7 +859,7 @@ // //===----------------------------------------------------------------------===*/ #define YY_NEVER_INTERACTIVE 1 -#line 28 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 28 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" #include "ParserInternals.h" #include "llvm/Module.h" #include @@ -868,8 +874,18 @@ yy_scan_string (str); } +// Construct a token value for a non-obsolete token #define RET_TOK(type, Enum, sym) \ - llvmAsmlval.type = Instruction::Enum; return sym + llvmAsmlval.type.opcode = Instruction::Enum; \ + llvmAsmlval.type.obsolete = false; \ + return sym + +// Construct a token value for an obsolete token +#define RET_TOK_OBSOLETE(type, Enum, sym) \ + llvmAsmlval.type.opcode = Instruction::Enum; \ + llvmAsmlval.type.obsolete = true; \ + return sym + namespace llvm { @@ -979,7 +995,7 @@ /* HexIntConstant - Hexadecimal constant generated by the CFE to avoid forcing * it to deal with 64 bit numbers. */ -#line 983 "Lexer.cpp" +#line 999 "Lexer.cpp" /* Macros after this point can all be overridden by user definitions in * section 1. @@ -1130,10 +1146,10 @@ register char *yy_cp = NULL, *yy_bp = NULL; register int yy_act; -#line 179 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 189 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" -#line 1137 "Lexer.cpp" +#line 1153 "Lexer.cpp" if ( yy_init ) { @@ -1181,14 +1197,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 >= 504 ) + if ( yy_current_state >= 510 ) 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 != 503 ); + while ( yy_current_state != 509 ); yy_find_action: yy_current_state = *--yy_state_ptr; @@ -1226,516 +1242,526 @@ { /* beginning of action switch */ case 1: YY_RULE_SETUP -#line 181 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 191 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { /* Ignore comments for now */ } YY_BREAK case 2: YY_RULE_SETUP -#line 183 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 193 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { return BEGINTOK; } YY_BREAK case 3: YY_RULE_SETUP -#line 184 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 194 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { return ENDTOK; } YY_BREAK case 4: YY_RULE_SETUP -#line 185 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 195 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { return TRUETOK; } YY_BREAK case 5: YY_RULE_SETUP -#line 186 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 196 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { return FALSETOK; } YY_BREAK case 6: YY_RULE_SETUP -#line 187 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 197 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { return DECLARE; } YY_BREAK case 7: YY_RULE_SETUP -#line 188 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 198 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { return GLOBAL; } YY_BREAK case 8: YY_RULE_SETUP -#line 189 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 199 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { return CONSTANT; } YY_BREAK case 9: YY_RULE_SETUP -#line 190 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 200 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { return INTERNAL; } YY_BREAK case 10: YY_RULE_SETUP -#line 191 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 201 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { return LINKONCE; } YY_BREAK case 11: YY_RULE_SETUP -#line 192 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 202 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { return WEAK; } YY_BREAK case 12: YY_RULE_SETUP -#line 193 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 203 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { return APPENDING; } YY_BREAK case 13: YY_RULE_SETUP -#line 194 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 204 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { return DLLIMPORT; } YY_BREAK case 14: YY_RULE_SETUP -#line 195 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 205 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { return DLLEXPORT; } YY_BREAK case 15: YY_RULE_SETUP -#line 196 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 206 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { return EXTERN_WEAK; } YY_BREAK case 16: YY_RULE_SETUP -#line 197 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 207 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { return EXTERNAL; } /* Deprecated, turn into external */ YY_BREAK case 17: YY_RULE_SETUP -#line 198 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 208 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { return EXTERNAL; } YY_BREAK case 18: YY_RULE_SETUP -#line 199 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 209 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { return IMPLEMENTATION; } YY_BREAK case 19: YY_RULE_SETUP -#line 200 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 210 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { return ZEROINITIALIZER; } YY_BREAK case 20: YY_RULE_SETUP -#line 201 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 211 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { return DOTDOTDOT; } YY_BREAK case 21: YY_RULE_SETUP -#line 202 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 212 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { return UNDEF; } YY_BREAK case 22: YY_RULE_SETUP -#line 203 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 213 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { return NULL_TOK; } YY_BREAK case 23: YY_RULE_SETUP -#line 204 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 214 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { return TO; } YY_BREAK case 24: YY_RULE_SETUP -#line 205 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 215 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { RET_TOK(TermOpVal, Unwind, UNWIND); } YY_BREAK case 25: YY_RULE_SETUP -#line 206 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 216 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { return NOT; } /* Deprecated, turned into XOR */ YY_BREAK case 26: YY_RULE_SETUP -#line 207 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 217 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { return TAIL; } YY_BREAK case 27: YY_RULE_SETUP -#line 208 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 218 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { return TARGET; } YY_BREAK case 28: YY_RULE_SETUP -#line 209 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 219 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { return TRIPLE; } YY_BREAK case 29: YY_RULE_SETUP -#line 210 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 220 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { return DEPLIBS; } YY_BREAK case 30: YY_RULE_SETUP -#line 211 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 221 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { return ENDIAN; } YY_BREAK case 31: YY_RULE_SETUP -#line 212 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 222 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { return POINTERSIZE; } YY_BREAK case 32: YY_RULE_SETUP -#line 213 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 223 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { return DATA; } YY_BREAK case 33: YY_RULE_SETUP -#line 214 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 224 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { return LITTLE; } YY_BREAK case 34: YY_RULE_SETUP -#line 215 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 225 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { return BIG; } YY_BREAK case 35: YY_RULE_SETUP -#line 216 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 226 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { return VOLATILE; } YY_BREAK case 36: YY_RULE_SETUP -#line 217 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 227 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { return ALIGN; } YY_BREAK case 37: YY_RULE_SETUP -#line 218 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 228 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { return SECTION; } YY_BREAK case 38: YY_RULE_SETUP -#line 219 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 229 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { return MODULE; } YY_BREAK case 39: YY_RULE_SETUP -#line 220 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 230 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { return ASM_TOK; } YY_BREAK case 40: YY_RULE_SETUP -#line 221 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 231 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { return SIDEEFFECT; } YY_BREAK case 41: YY_RULE_SETUP -#line 223 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 233 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { return CC_TOK; } YY_BREAK case 42: YY_RULE_SETUP -#line 224 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 234 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { return CCC_TOK; } YY_BREAK case 43: YY_RULE_SETUP -#line 225 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 235 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { return CSRETCC_TOK; } YY_BREAK case 44: YY_RULE_SETUP -#line 226 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 236 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { return FASTCC_TOK; } YY_BREAK case 45: YY_RULE_SETUP -#line 227 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 237 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { return COLDCC_TOK; } YY_BREAK case 46: YY_RULE_SETUP -#line 228 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 238 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { return X86_STDCALLCC_TOK; } YY_BREAK case 47: YY_RULE_SETUP -#line 229 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 239 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { return X86_FASTCALLCC_TOK; } YY_BREAK case 48: YY_RULE_SETUP -#line 231 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 241 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { llvmAsmlval.PrimType = Type::VoidTy ; return VOID; } YY_BREAK case 49: YY_RULE_SETUP -#line 232 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 242 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { llvmAsmlval.PrimType = Type::BoolTy ; return BOOL; } YY_BREAK case 50: YY_RULE_SETUP -#line 233 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 243 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { llvmAsmlval.PrimType = Type::SByteTy ; return SBYTE; } YY_BREAK case 51: YY_RULE_SETUP -#line 234 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 244 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { llvmAsmlval.PrimType = Type::UByteTy ; return UBYTE; } YY_BREAK case 52: YY_RULE_SETUP -#line 235 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 245 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { llvmAsmlval.PrimType = Type::ShortTy ; return SHORT; } YY_BREAK case 53: YY_RULE_SETUP -#line 236 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 246 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { llvmAsmlval.PrimType = Type::UShortTy; return USHORT; } YY_BREAK case 54: YY_RULE_SETUP -#line 237 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 247 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { llvmAsmlval.PrimType = Type::IntTy ; return INT; } YY_BREAK case 55: YY_RULE_SETUP -#line 238 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 248 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { llvmAsmlval.PrimType = Type::UIntTy ; return UINT; } YY_BREAK case 56: YY_RULE_SETUP -#line 239 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 249 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { llvmAsmlval.PrimType = Type::LongTy ; return LONG; } YY_BREAK case 57: YY_RULE_SETUP -#line 240 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 250 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { llvmAsmlval.PrimType = Type::ULongTy ; return ULONG; } YY_BREAK case 58: YY_RULE_SETUP -#line 241 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 251 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { llvmAsmlval.PrimType = Type::FloatTy ; return FLOAT; } YY_BREAK case 59: YY_RULE_SETUP -#line 242 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 252 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { llvmAsmlval.PrimType = Type::DoubleTy; return DOUBLE; } YY_BREAK case 60: YY_RULE_SETUP -#line 243 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 253 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { llvmAsmlval.PrimType = Type::LabelTy ; return LABEL; } YY_BREAK case 61: YY_RULE_SETUP -#line 244 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 254 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { return TYPE; } YY_BREAK case 62: YY_RULE_SETUP -#line 245 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 255 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { return OPAQUE; } YY_BREAK case 63: YY_RULE_SETUP -#line 247 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 257 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { RET_TOK(BinaryOpVal, Add, ADD); } YY_BREAK case 64: YY_RULE_SETUP -#line 248 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 258 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { RET_TOK(BinaryOpVal, Sub, SUB); } YY_BREAK case 65: YY_RULE_SETUP -#line 249 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 259 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { RET_TOK(BinaryOpVal, Mul, MUL); } YY_BREAK case 66: YY_RULE_SETUP -#line 250 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(BinaryOpVal, Div, DIV); } +#line 260 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +{ RET_TOK_OBSOLETE(BinaryOpVal, UDiv, UDIV); } YY_BREAK case 67: YY_RULE_SETUP -#line 251 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(BinaryOpVal, Rem, REM); } +#line 261 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +{ RET_TOK(BinaryOpVal, UDiv, UDIV); } YY_BREAK case 68: YY_RULE_SETUP -#line 252 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(BinaryOpVal, And, AND); } +#line 262 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +{ RET_TOK(BinaryOpVal, UDiv, UDIV); } YY_BREAK case 69: YY_RULE_SETUP -#line 253 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(BinaryOpVal, Or , OR ); } +#line 263 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +{ RET_TOK(BinaryOpVal, Rem, REM); } YY_BREAK case 70: YY_RULE_SETUP -#line 254 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(BinaryOpVal, Xor, XOR); } +#line 264 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +{ RET_TOK(BinaryOpVal, And, AND); } YY_BREAK case 71: YY_RULE_SETUP -#line 255 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(BinaryOpVal, SetNE, SETNE); } +#line 265 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +{ RET_TOK(BinaryOpVal, Or , OR ); } YY_BREAK case 72: YY_RULE_SETUP -#line 256 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(BinaryOpVal, SetEQ, SETEQ); } +#line 266 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +{ RET_TOK(BinaryOpVal, Xor, XOR); } YY_BREAK case 73: YY_RULE_SETUP -#line 257 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(BinaryOpVal, SetLT, SETLT); } +#line 267 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +{ RET_TOK(BinaryOpVal, SetNE, SETNE); } YY_BREAK case 74: YY_RULE_SETUP -#line 258 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(BinaryOpVal, SetGT, SETGT); } +#line 268 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +{ RET_TOK(BinaryOpVal, SetEQ, SETEQ); } YY_BREAK case 75: YY_RULE_SETUP -#line 259 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(BinaryOpVal, SetLE, SETLE); } +#line 269 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +{ RET_TOK(BinaryOpVal, SetLT, SETLT); } YY_BREAK case 76: YY_RULE_SETUP -#line 260 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(BinaryOpVal, SetGE, SETGE); } +#line 270 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +{ RET_TOK(BinaryOpVal, SetGT, SETGT); } YY_BREAK case 77: YY_RULE_SETUP -#line 262 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(OtherOpVal, PHI, PHI_TOK); } +#line 271 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +{ RET_TOK(BinaryOpVal, SetLE, SETLE); } YY_BREAK case 78: YY_RULE_SETUP -#line 263 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(OtherOpVal, Call, CALL); } +#line 272 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +{ RET_TOK(BinaryOpVal, SetGE, SETGE); } YY_BREAK case 79: YY_RULE_SETUP -#line 264 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(OtherOpVal, Cast, CAST); } +#line 274 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +{ RET_TOK(OtherOpVal, PHI, PHI_TOK); } YY_BREAK case 80: YY_RULE_SETUP -#line 265 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(OtherOpVal, Select, SELECT); } +#line 275 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +{ RET_TOK(OtherOpVal, Call, CALL); } YY_BREAK case 81: YY_RULE_SETUP -#line 266 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(OtherOpVal, Shl, SHL); } +#line 276 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +{ RET_TOK(OtherOpVal, Cast, CAST); } YY_BREAK case 82: YY_RULE_SETUP -#line 267 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(OtherOpVal, Shr, SHR); } +#line 277 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +{ RET_TOK(OtherOpVal, Select, SELECT); } YY_BREAK case 83: YY_RULE_SETUP -#line 268 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" -{ return VANEXT_old; } +#line 278 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +{ RET_TOK(OtherOpVal, Shl, SHL); } YY_BREAK case 84: YY_RULE_SETUP -#line 269 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" -{ return VAARG_old; } +#line 279 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +{ RET_TOK(OtherOpVal, Shr, SHR); } YY_BREAK case 85: YY_RULE_SETUP -#line 270 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(OtherOpVal, VAArg , VAARG); } +#line 280 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +{ return VANEXT_old; } YY_BREAK case 86: YY_RULE_SETUP -#line 271 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(TermOpVal, Ret, RET); } +#line 281 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +{ return VAARG_old; } YY_BREAK case 87: YY_RULE_SETUP -#line 272 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(TermOpVal, Br, BR); } +#line 282 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +{ RET_TOK(OtherOpVal, VAArg , VAARG); } YY_BREAK case 88: YY_RULE_SETUP -#line 273 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(TermOpVal, Switch, SWITCH); } +#line 283 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +{ RET_TOK(TermOpVal, Ret, RET); } YY_BREAK case 89: YY_RULE_SETUP -#line 274 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(TermOpVal, Invoke, INVOKE); } +#line 284 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +{ RET_TOK(TermOpVal, Br, BR); } YY_BREAK case 90: YY_RULE_SETUP -#line 275 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(TermOpVal, Unwind, UNWIND); } +#line 285 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +{ RET_TOK(TermOpVal, Switch, SWITCH); } YY_BREAK case 91: YY_RULE_SETUP -#line 276 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(TermOpVal, Unreachable, UNREACHABLE); } +#line 286 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +{ RET_TOK(TermOpVal, Invoke, INVOKE); } YY_BREAK case 92: YY_RULE_SETUP -#line 278 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(MemOpVal, Malloc, MALLOC); } +#line 287 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +{ RET_TOK(TermOpVal, Unwind, UNWIND); } YY_BREAK case 93: YY_RULE_SETUP -#line 279 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(MemOpVal, Alloca, ALLOCA); } +#line 288 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +{ RET_TOK(TermOpVal, Unreachable, UNREACHABLE); } YY_BREAK case 94: YY_RULE_SETUP -#line 280 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(MemOpVal, Free, FREE); } +#line 290 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +{ RET_TOK(MemOpVal, Malloc, MALLOC); } YY_BREAK case 95: YY_RULE_SETUP -#line 281 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(MemOpVal, Load, LOAD); } +#line 291 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +{ RET_TOK(MemOpVal, Alloca, ALLOCA); } YY_BREAK case 96: YY_RULE_SETUP -#line 282 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(MemOpVal, Store, STORE); } +#line 292 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +{ RET_TOK(MemOpVal, Free, FREE); } YY_BREAK case 97: YY_RULE_SETUP -#line 283 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(MemOpVal, GetElementPtr, GETELEMENTPTR); } +#line 293 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +{ RET_TOK(MemOpVal, Load, LOAD); } YY_BREAK case 98: YY_RULE_SETUP -#line 285 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(OtherOpVal, ExtractElement, EXTRACTELEMENT); } +#line 294 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +{ RET_TOK(MemOpVal, Store, STORE); } YY_BREAK case 99: YY_RULE_SETUP -#line 286 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(OtherOpVal, InsertElement, INSERTELEMENT); } +#line 295 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +{ RET_TOK(MemOpVal, GetElementPtr, GETELEMENTPTR); } YY_BREAK case 100: YY_RULE_SETUP -#line 287 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(OtherOpVal, ShuffleVector, SHUFFLEVECTOR); } +#line 297 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +{ RET_TOK(OtherOpVal, ExtractElement, EXTRACTELEMENT); } YY_BREAK case 101: YY_RULE_SETUP -#line 290 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 298 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +{ RET_TOK(OtherOpVal, InsertElement, INSERTELEMENT); } + YY_BREAK +case 102: +YY_RULE_SETUP +#line 299 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +{ RET_TOK(OtherOpVal, ShuffleVector, SHUFFLEVECTOR); } + YY_BREAK +case 103: +YY_RULE_SETUP +#line 302 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { UnEscapeLexed(yytext+1); llvmAsmlval.StrVal = strdup(yytext+1); // Skip % return VAR_ID; } YY_BREAK -case 102: +case 104: YY_RULE_SETUP -#line 295 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 307 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { yytext[strlen(yytext)-1] = 0; // nuke colon UnEscapeLexed(yytext); @@ -1743,9 +1769,9 @@ return LABELSTR; } YY_BREAK -case 103: +case 105: YY_RULE_SETUP -#line 301 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 313 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { yytext[strlen(yytext)-2] = 0; // nuke colon, end quote UnEscapeLexed(yytext+1); @@ -1753,9 +1779,9 @@ return LABELSTR; } YY_BREAK -case 104: +case 106: YY_RULE_SETUP -#line 308 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 320 "/proj/llvm/llvm2/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 @@ -1766,14 +1792,14 @@ return STRINGCONSTANT; } YY_BREAK -case 105: +case 107: YY_RULE_SETUP -#line 319 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 331 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { llvmAsmlval.UInt64Val = atoull(yytext); return EUINT64VAL; } YY_BREAK -case 106: +case 108: YY_RULE_SETUP -#line 320 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 332 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { uint64_t Val = atoull(yytext+1); // +1: we have bigger negative range @@ -1783,17 +1809,17 @@ return ESINT64VAL; } YY_BREAK -case 107: +case 109: YY_RULE_SETUP -#line 328 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 340 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { llvmAsmlval.UInt64Val = HexIntToVal(yytext+3); return yytext[0] == 's' ? ESINT64VAL : EUINT64VAL; } YY_BREAK -case 108: +case 110: YY_RULE_SETUP -#line 333 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 345 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { uint64_t Val = atoull(yytext+1); if ((unsigned)Val != Val) @@ -1802,9 +1828,9 @@ return UINTVAL; } YY_BREAK -case 109: +case 111: YY_RULE_SETUP -#line 340 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 352 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { uint64_t Val = atoull(yytext+2); // +1: we have bigger negative range @@ -1814,18 +1840,18 @@ return SINTVAL; } YY_BREAK -case 110: +case 112: YY_RULE_SETUP -#line 349 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 361 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { llvmAsmlval.FPVal = atof(yytext); return FPVAL; } YY_BREAK -case 111: +case 113: YY_RULE_SETUP -#line 350 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 362 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { llvmAsmlval.FPVal = HexToFP(yytext); return FPVAL; } YY_BREAK case YY_STATE_EOF(INITIAL): -#line 352 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 364 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { /* Make sure to free the internal buffers for flex when we are * done reading our input! @@ -1834,22 +1860,22 @@ return EOF; } YY_BREAK -case 112: +case 114: YY_RULE_SETUP -#line 360 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 372 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { /* Ignore whitespace */ } YY_BREAK -case 113: +case 115: YY_RULE_SETUP -#line 361 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 373 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { return yytext[0]; } YY_BREAK -case 114: +case 116: YY_RULE_SETUP -#line 363 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 375 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" YY_FATAL_ERROR( "flex scanner jammed" ); YY_BREAK -#line 1853 "Lexer.cpp" +#line 1879 "Lexer.cpp" case YY_END_OF_BUFFER: { @@ -2136,7 +2162,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 >= 504 ) + if ( yy_current_state >= 510 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; @@ -2166,11 +2192,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 >= 504 ) + if ( yy_current_state >= 510 ) 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 == 503); + yy_is_jam = (yy_current_state == 509); if ( ! yy_is_jam ) *yy_state_ptr++ = yy_current_state; @@ -2727,5 +2753,5 @@ return 0; } #endif -#line 363 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 375 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" Index: llvm/lib/AsmParser/Lexer.l.cvs diff -u llvm/lib/AsmParser/Lexer.l.cvs:1.8 llvm/lib/AsmParser/Lexer.l.cvs:1.8.2.1 --- llvm/lib/AsmParser/Lexer.l.cvs:1.8 Tue Oct 17 21:21:48 2006 +++ llvm/lib/AsmParser/Lexer.l.cvs Thu Oct 19 14:22:56 2006 @@ -39,8 +39,18 @@ yy_scan_string (str); } +// Construct a token value for a non-obsolete token #define RET_TOK(type, Enum, sym) \ - llvmAsmlval.type = Instruction::Enum; return sym + llvmAsmlval.type.opcode = Instruction::Enum; \ + llvmAsmlval.type.obsolete = false; \ + return sym + +// Construct a token value for an obsolete token +#define RET_TOK_OBSOLETE(type, Enum, sym) \ + llvmAsmlval.type.opcode = Instruction::Enum; \ + llvmAsmlval.type.obsolete = true; \ + return sym + namespace llvm { @@ -247,7 +257,9 @@ add { RET_TOK(BinaryOpVal, Add, ADD); } sub { RET_TOK(BinaryOpVal, Sub, SUB); } mul { RET_TOK(BinaryOpVal, Mul, MUL); } -div { RET_TOK(BinaryOpVal, Div, DIV); } +div { RET_TOK_OBSOLETE(BinaryOpVal, UDiv, UDIV); } +udiv { RET_TOK(BinaryOpVal, UDiv, UDIV); } +sdiv { RET_TOK(BinaryOpVal, UDiv, UDIV); } rem { RET_TOK(BinaryOpVal, Rem, REM); } and { RET_TOK(BinaryOpVal, And, AND); } or { RET_TOK(BinaryOpVal, Or , OR ); } Index: llvm/lib/AsmParser/llvmAsmParser.cpp.cvs diff -u llvm/lib/AsmParser/llvmAsmParser.cpp.cvs:1.18.2.1 llvm/lib/AsmParser/llvmAsmParser.cpp.cvs:1.18.2.2 --- llvm/lib/AsmParser/llvmAsmParser.cpp.cvs:1.18.2.1 Wed Oct 18 22:57:55 2006 +++ llvm/lib/AsmParser/llvmAsmParser.cpp.cvs Thu Oct 19 14:22:56 2006 @@ -142,34 +142,35 @@ ADD = 333, SUB = 334, MUL = 335, - DIV = 336, - REM = 337, - AND = 338, - OR = 339, - XOR = 340, - SETLE = 341, - SETGE = 342, - SETLT = 343, - SETGT = 344, - SETEQ = 345, - SETNE = 346, - MALLOC = 347, - ALLOCA = 348, - FREE = 349, - LOAD = 350, - STORE = 351, - GETELEMENTPTR = 352, - PHI_TOK = 353, - CAST = 354, - SELECT = 355, - SHL = 356, - SHR = 357, - VAARG = 358, - EXTRACTELEMENT = 359, - INSERTELEMENT = 360, - SHUFFLEVECTOR = 361, - VAARG_old = 362, - VANEXT_old = 363 + UDIV = 336, + SDIV = 337, + REM = 338, + AND = 339, + OR = 340, + XOR = 341, + SETLE = 342, + SETGE = 343, + SETLT = 344, + SETGT = 345, + SETEQ = 346, + SETNE = 347, + MALLOC = 348, + ALLOCA = 349, + FREE = 350, + LOAD = 351, + STORE = 352, + GETELEMENTPTR = 353, + PHI_TOK = 354, + CAST = 355, + SELECT = 356, + SHL = 357, + SHR = 358, + VAARG = 359, + EXTRACTELEMENT = 360, + INSERTELEMENT = 361, + SHUFFLEVECTOR = 362, + VAARG_old = 363, + VANEXT_old = 364 }; #endif /* Tokens. */ @@ -251,40 +252,41 @@ #define ADD 333 #define SUB 334 #define MUL 335 -#define DIV 336 -#define REM 337 -#define AND 338 -#define OR 339 -#define XOR 340 -#define SETLE 341 -#define SETGE 342 -#define SETLT 343 -#define SETGT 344 -#define SETEQ 345 -#define SETNE 346 -#define MALLOC 347 -#define ALLOCA 348 -#define FREE 349 -#define LOAD 350 -#define STORE 351 -#define GETELEMENTPTR 352 -#define PHI_TOK 353 -#define CAST 354 -#define SELECT 355 -#define SHL 356 -#define SHR 357 -#define VAARG 358 -#define EXTRACTELEMENT 359 -#define INSERTELEMENT 360 -#define SHUFFLEVECTOR 361 -#define VAARG_old 362 -#define VANEXT_old 363 +#define UDIV 336 +#define SDIV 337 +#define REM 338 +#define AND 339 +#define OR 340 +#define XOR 341 +#define SETLE 342 +#define SETGE 343 +#define SETLT 344 +#define SETGT 345 +#define SETEQ 346 +#define SETNE 347 +#define MALLOC 348 +#define ALLOCA 349 +#define FREE 350 +#define LOAD 351 +#define STORE 352 +#define GETELEMENTPTR 353 +#define PHI_TOK 354 +#define CAST 355 +#define SELECT 356 +#define SHL 357 +#define SHR 358 +#define VAARG 359 +#define EXTRACTELEMENT 360 +#define INSERTELEMENT 361 +#define SHUFFLEVECTOR 362 +#define VAARG_old 363 +#define VANEXT_old 364 /* Copy the first part of user declarations. */ -#line 14 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 14 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" #include "ParserInternals.h" #include "llvm/CallingConv.h" @@ -1087,6 +1089,23 @@ return Ty; } +// This function is +template +static void sanitizeOpCode(OpcodeInfo &OI, const PATypeHolder& Ty) { + if (OI.obsolete) { + switch (OI.opcode) { + default: + GenerateError("Invalid Obsolete OpCode"); + break; + case Instruction::UDiv: + if (Ty->isSigned()) + OI.opcode = Instruction::SDiv; + break; + } + OI.obsolete = false; + } +} + // common code from the two 'RunVMAsmParser' functions static Module* RunParser(Module * M) { @@ -1264,7 +1283,7 @@ #endif #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) -#line 974 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 991 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" typedef union YYSTYPE { llvm::Module *ModuleVal; llvm::Function *FunctionVal; @@ -1298,14 +1317,14 @@ char *StrVal; // This memory is strdup'd! llvm::ValID ValIDVal; // strdup'd memory maybe! - llvm::Instruction::BinaryOps BinaryOpVal; - llvm::Instruction::TermOps TermOpVal; - llvm::Instruction::MemoryOps MemOpVal; - llvm::Instruction::OtherOps OtherOpVal; - llvm::Module::Endianness Endianness; + BinaryOpInfo BinaryOpVal; + TermOpInfo TermOpVal; + MemOpInfo MemOpVal; + OtherOpInfo OtherOpVal; + llvm::Module::Endianness Endianness; } YYSTYPE; /* Line 196 of yacc.c. */ -#line 1309 "llvmAsmParser.tab.c" +#line 1328 "llvmAsmParser.tab.c" # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 # define YYSTYPE_IS_TRIVIAL 1 @@ -1317,7 +1336,7 @@ /* Line 219 of yacc.c. */ -#line 1321 "llvmAsmParser.tab.c" +#line 1340 "llvmAsmParser.tab.c" #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) # define YYSIZE_T __SIZE_TYPE__ @@ -1468,20 +1487,20 @@ /* YYFINAL -- State number of the termination state. */ #define YYFINAL 4 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 1339 +#define YYLAST 1301 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 123 +#define YYNTOKENS 124 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 75 /* YYNRULES -- Number of rules. */ -#define YYNRULES 252 +#define YYNRULES 253 /* YYNRULES -- Number of states. */ -#define YYNSTATES 517 +#define YYNSTATES 518 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 -#define YYMAXUTOK 363 +#define YYMAXUTOK 364 #define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) @@ -1493,15 +1512,15 @@ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 112, 113, 121, 2, 110, 2, 2, 2, 2, 2, + 113, 114, 122, 2, 111, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 117, 109, 118, 2, 2, 2, 2, 2, 2, 2, + 118, 110, 119, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 114, 111, 116, 2, 2, 2, 2, 2, 122, + 2, 115, 112, 117, 2, 2, 2, 2, 2, 123, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 115, 2, 2, 119, 2, 120, 2, 2, 2, 2, + 116, 2, 2, 120, 2, 121, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -1525,7 +1544,7 @@ 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, - 105, 106, 107, 108 + 105, 106, 107, 108, 109 }; #if YYDEBUG @@ -1536,147 +1555,148 @@ 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, 81, 83, 85, 86, 87, 89, 91, 93, 95, - 97, 99, 102, 103, 106, 107, 111, 114, 115, 117, - 118, 122, 124, 127, 129, 131, 133, 135, 137, 139, + 59, 61, 63, 65, 67, 69, 72, 73, 75, 77, + 79, 81, 83, 85, 87, 88, 89, 91, 93, 95, + 97, 99, 101, 104, 105, 108, 109, 113, 116, 117, + 119, 120, 124, 126, 129, 131, 133, 135, 137, 139, 141, 143, 145, 147, 149, 151, 153, 155, 157, 159, - 161, 163, 165, 167, 169, 172, 177, 183, 189, 193, - 196, 199, 201, 205, 207, 211, 213, 214, 219, 223, - 227, 232, 237, 241, 244, 247, 250, 253, 256, 259, - 262, 265, 268, 271, 278, 284, 293, 300, 307, 314, - 321, 328, 337, 346, 350, 352, 354, 356, 358, 361, - 364, 369, 372, 374, 379, 382, 387, 388, 396, 397, - 405, 406, 414, 415, 423, 427, 432, 433, 435, 437, - 439, 443, 447, 451, 455, 459, 463, 465, 466, 468, - 470, 472, 473, 476, 480, 482, 484, 488, 490, 491, - 500, 502, 504, 508, 510, 512, 515, 516, 518, 520, - 521, 526, 527, 529, 531, 533, 535, 537, 539, 541, - 543, 545, 549, 551, 557, 559, 561, 563, 565, 568, - 571, 574, 578, 581, 582, 584, 587, 590, 594, 604, - 614, 623, 637, 639, 641, 648, 654, 657, 664, 672, - 674, 678, 680, 681, 684, 686, 692, 698, 704, 707, - 712, 717, 724, 729, 734, 739, 744, 751, 758, 761, - 769, 771, 774, 775, 777, 778, 782, 789, 793, 800, - 803, 808, 815 + 161, 163, 165, 167, 169, 171, 174, 179, 185, 191, + 195, 198, 201, 203, 207, 209, 213, 215, 216, 221, + 225, 229, 234, 239, 243, 246, 249, 252, 255, 258, + 261, 264, 267, 270, 273, 280, 286, 295, 302, 309, + 316, 323, 330, 339, 348, 352, 354, 356, 358, 360, + 363, 366, 371, 374, 376, 381, 384, 389, 390, 398, + 399, 407, 408, 416, 417, 425, 429, 434, 435, 437, + 439, 441, 445, 449, 453, 457, 461, 465, 467, 468, + 470, 472, 474, 475, 478, 482, 484, 486, 490, 492, + 493, 502, 504, 506, 510, 512, 514, 517, 518, 520, + 522, 523, 528, 529, 531, 533, 535, 537, 539, 541, + 543, 545, 547, 551, 553, 559, 561, 563, 565, 567, + 570, 573, 576, 580, 583, 584, 586, 589, 592, 596, + 606, 616, 625, 639, 641, 643, 650, 656, 659, 666, + 674, 676, 680, 682, 683, 686, 688, 694, 700, 706, + 709, 714, 719, 726, 731, 736, 741, 746, 753, 760, + 763, 771, 773, 776, 777, 779, 780, 784, 791, 795, + 802, 805, 810, 817 }; /* YYRHS -- A `-1'-separated list of the rules' RHS. */ static const short int yyrhs[] = { - 154, 0, -1, 5, -1, 6, -1, 3, -1, 4, + 155, 0, -1, 5, -1, 6, -1, 3, -1, 4, -1, 78, -1, 79, -1, 80, -1, 81, -1, 82, -1, 83, -1, 84, -1, 85, -1, 86, -1, 87, - -1, 88, -1, 89, -1, 90, -1, 91, -1, 101, - -1, 102, -1, 16, -1, 14, -1, 12, -1, 10, - -1, 17, -1, 15, -1, 13, -1, 11, -1, 130, - -1, 131, -1, 18, -1, 19, -1, 166, 109, -1, - -1, 41, -1, 42, -1, 43, -1, 44, -1, 45, - -1, 46, -1, 47, -1, -1, -1, 65, -1, 66, - -1, 67, -1, 68, -1, 69, -1, 70, -1, 64, - 4, -1, -1, 57, 4, -1, -1, 110, 57, 4, - -1, 34, 24, -1, -1, 139, -1, -1, 110, 142, - 141, -1, 139, -1, 57, 4, -1, 145, -1, 8, - -1, 147, -1, 8, -1, 147, -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, 48, -1, 146, -1, 181, -1, 111, - 4, -1, 144, 112, 149, 113, -1, 114, 4, 115, - 147, 116, -1, 117, 4, 115, 147, 118, -1, 119, - 148, 120, -1, 119, 120, -1, 147, 121, -1, 147, - -1, 148, 110, 147, -1, 148, -1, 148, 110, 37, - -1, 37, -1, -1, 145, 114, 152, 116, -1, 145, - 114, 116, -1, 145, 122, 24, -1, 145, 117, 152, - 118, -1, 145, 119, 152, 120, -1, 145, 119, 120, - -1, 145, 38, -1, 145, 39, -1, 145, 181, -1, - 145, 151, -1, 145, 26, -1, 130, 125, -1, 131, - 4, -1, 9, 27, -1, 9, 28, -1, 133, 7, - -1, 99, 112, 150, 36, 145, 113, -1, 97, 112, - 150, 195, 113, -1, 100, 112, 150, 110, 150, 110, - 150, 113, -1, 126, 112, 150, 110, 150, 113, -1, - 127, 112, 150, 110, 150, 113, -1, 128, 112, 150, - 110, 150, 113, -1, 129, 112, 150, 110, 150, 113, - -1, 104, 112, 150, 110, 150, 113, -1, 105, 112, - 150, 110, 150, 110, 150, 113, -1, 106, 112, 150, - 110, 150, 110, 150, 113, -1, 152, 110, 150, -1, - 150, -1, 32, -1, 33, -1, 155, -1, 155, 175, - -1, 155, 177, -1, 155, 62, 61, 161, -1, 155, - 25, -1, 156, -1, 156, 134, 20, 143, -1, 156, - 177, -1, 156, 62, 61, 161, -1, -1, 156, 134, - 135, 153, 150, 157, 141, -1, -1, 156, 134, 50, - 153, 145, 158, 141, -1, -1, 156, 134, 45, 153, - 145, 159, 141, -1, -1, 156, 134, 47, 153, 145, - 160, 141, -1, 156, 51, 163, -1, 156, 58, 109, - 164, -1, -1, 24, -1, 56, -1, 55, -1, 53, - 109, 162, -1, 54, 109, 4, -1, 52, 109, 24, - -1, 71, 109, 24, -1, 114, 165, 116, -1, 165, - 110, 24, -1, 24, -1, -1, 22, -1, 24, -1, - 166, -1, -1, 145, 167, -1, 169, 110, 168, -1, - 168, -1, 169, -1, 169, 110, 37, -1, 37, -1, - -1, 136, 143, 166, 112, 170, 113, 140, 137, -1, - 29, -1, 119, -1, 135, 171, 172, -1, 30, -1, - 120, -1, 184, 174, -1, -1, 45, -1, 47, -1, - -1, 31, 178, 176, 171, -1, -1, 63, -1, 3, - -1, 4, -1, 7, -1, 27, -1, 28, -1, 38, - -1, 39, -1, 26, -1, 117, 152, 118, -1, 151, - -1, 61, 179, 24, 110, 24, -1, 124, -1, 166, - -1, 181, -1, 180, -1, 145, 182, -1, 184, 185, - -1, 173, 185, -1, 186, 134, 187, -1, 186, 189, - -1, -1, 23, -1, 72, 183, -1, 72, 8, -1, - 73, 21, 182, -1, 73, 9, 182, 110, 21, 182, - 110, 21, 182, -1, 74, 132, 182, 110, 21, 182, - 114, 188, 116, -1, 74, 132, 182, 110, 21, 182, - 114, 116, -1, 75, 136, 143, 182, 112, 192, 113, - 36, 21, 182, 76, 21, 182, -1, 76, -1, 77, - -1, 188, 132, 180, 110, 21, 182, -1, 132, 180, - 110, 21, 182, -1, 134, 194, -1, 145, 114, 182, - 110, 182, 116, -1, 190, 110, 114, 182, 110, 182, - 116, -1, 183, -1, 191, 110, 183, -1, 191, -1, - -1, 60, 59, -1, 59, -1, 126, 145, 182, 110, - 182, -1, 127, 145, 182, 110, 182, -1, 128, 145, - 182, 110, 182, -1, 49, 183, -1, 129, 183, 110, - 183, -1, 99, 183, 36, 145, -1, 100, 183, 110, - 183, 110, 183, -1, 103, 183, 110, 145, -1, 107, - 183, 110, 145, -1, 108, 183, 110, 145, -1, 104, - 183, 110, 183, -1, 105, 183, 110, 183, 110, 183, - -1, 106, 183, 110, 183, 110, 183, -1, 98, 190, - -1, 193, 136, 143, 182, 112, 192, 113, -1, 197, - -1, 110, 191, -1, -1, 35, -1, -1, 92, 145, - 138, -1, 92, 145, 110, 15, 182, 138, -1, 93, - 145, 138, -1, 93, 145, 110, 15, 182, 138, -1, - 94, 183, -1, 196, 95, 145, 182, -1, 196, 96, - 183, 110, 145, 182, -1, 97, 145, 182, 195, -1 + -1, 88, -1, 89, -1, 90, -1, 91, -1, 92, + -1, 102, -1, 103, -1, 16, -1, 14, -1, 12, + -1, 10, -1, 17, -1, 15, -1, 13, -1, 11, + -1, 131, -1, 132, -1, 18, -1, 19, -1, 167, + 110, -1, -1, 41, -1, 42, -1, 43, -1, 44, + -1, 45, -1, 46, -1, 47, -1, -1, -1, 65, + -1, 66, -1, 67, -1, 68, -1, 69, -1, 70, + -1, 64, 4, -1, -1, 57, 4, -1, -1, 111, + 57, 4, -1, 34, 24, -1, -1, 140, -1, -1, + 111, 143, 142, -1, 140, -1, 57, 4, -1, 146, + -1, 8, -1, 148, -1, 8, -1, 148, -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, 48, -1, 147, -1, 182, + -1, 112, 4, -1, 145, 113, 150, 114, -1, 115, + 4, 116, 148, 117, -1, 118, 4, 116, 148, 119, + -1, 120, 149, 121, -1, 120, 121, -1, 148, 122, + -1, 148, -1, 149, 111, 148, -1, 149, -1, 149, + 111, 37, -1, 37, -1, -1, 146, 115, 153, 117, + -1, 146, 115, 117, -1, 146, 123, 24, -1, 146, + 118, 153, 119, -1, 146, 120, 153, 121, -1, 146, + 120, 121, -1, 146, 38, -1, 146, 39, -1, 146, + 182, -1, 146, 152, -1, 146, 26, -1, 131, 126, + -1, 132, 4, -1, 9, 27, -1, 9, 28, -1, + 134, 7, -1, 100, 113, 151, 36, 146, 114, -1, + 98, 113, 151, 196, 114, -1, 101, 113, 151, 111, + 151, 111, 151, 114, -1, 127, 113, 151, 111, 151, + 114, -1, 128, 113, 151, 111, 151, 114, -1, 129, + 113, 151, 111, 151, 114, -1, 130, 113, 151, 111, + 151, 114, -1, 105, 113, 151, 111, 151, 114, -1, + 106, 113, 151, 111, 151, 111, 151, 114, -1, 107, + 113, 151, 111, 151, 111, 151, 114, -1, 153, 111, + 151, -1, 151, -1, 32, -1, 33, -1, 156, -1, + 156, 176, -1, 156, 178, -1, 156, 62, 61, 162, + -1, 156, 25, -1, 157, -1, 157, 135, 20, 144, + -1, 157, 178, -1, 157, 62, 61, 162, -1, -1, + 157, 135, 136, 154, 151, 158, 142, -1, -1, 157, + 135, 50, 154, 146, 159, 142, -1, -1, 157, 135, + 45, 154, 146, 160, 142, -1, -1, 157, 135, 47, + 154, 146, 161, 142, -1, 157, 51, 164, -1, 157, + 58, 110, 165, -1, -1, 24, -1, 56, -1, 55, + -1, 53, 110, 163, -1, 54, 110, 4, -1, 52, + 110, 24, -1, 71, 110, 24, -1, 115, 166, 117, + -1, 166, 111, 24, -1, 24, -1, -1, 22, -1, + 24, -1, 167, -1, -1, 146, 168, -1, 170, 111, + 169, -1, 169, -1, 170, -1, 170, 111, 37, -1, + 37, -1, -1, 137, 144, 167, 113, 171, 114, 141, + 138, -1, 29, -1, 120, -1, 136, 172, 173, -1, + 30, -1, 121, -1, 185, 175, -1, -1, 45, -1, + 47, -1, -1, 31, 179, 177, 172, -1, -1, 63, + -1, 3, -1, 4, -1, 7, -1, 27, -1, 28, + -1, 38, -1, 39, -1, 26, -1, 118, 153, 119, + -1, 152, -1, 61, 180, 24, 111, 24, -1, 125, + -1, 167, -1, 182, -1, 181, -1, 146, 183, -1, + 185, 186, -1, 174, 186, -1, 187, 135, 188, -1, + 187, 190, -1, -1, 23, -1, 72, 184, -1, 72, + 8, -1, 73, 21, 183, -1, 73, 9, 183, 111, + 21, 183, 111, 21, 183, -1, 74, 133, 183, 111, + 21, 183, 115, 189, 117, -1, 74, 133, 183, 111, + 21, 183, 115, 117, -1, 75, 137, 144, 183, 113, + 193, 114, 36, 21, 183, 76, 21, 183, -1, 76, + -1, 77, -1, 189, 133, 181, 111, 21, 183, -1, + 133, 181, 111, 21, 183, -1, 135, 195, -1, 146, + 115, 183, 111, 183, 117, -1, 191, 111, 115, 183, + 111, 183, 117, -1, 184, -1, 192, 111, 184, -1, + 192, -1, -1, 60, 59, -1, 59, -1, 127, 146, + 183, 111, 183, -1, 128, 146, 183, 111, 183, -1, + 129, 146, 183, 111, 183, -1, 49, 184, -1, 130, + 184, 111, 184, -1, 100, 184, 36, 146, -1, 101, + 184, 111, 184, 111, 184, -1, 104, 184, 111, 146, + -1, 108, 184, 111, 146, -1, 109, 184, 111, 146, + -1, 105, 184, 111, 184, -1, 106, 184, 111, 184, + 111, 184, -1, 107, 184, 111, 184, 111, 184, -1, + 99, 191, -1, 194, 137, 144, 183, 113, 193, 114, + -1, 198, -1, 111, 192, -1, -1, 35, -1, -1, + 93, 146, 139, -1, 93, 146, 111, 15, 183, 139, + -1, 94, 146, 139, -1, 94, 146, 111, 15, 183, + 139, -1, 95, 184, -1, 197, 96, 146, 183, -1, + 197, 97, 184, 111, 146, 183, -1, 98, 146, 183, + 196, -1 }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const unsigned short int yyrline[] = { - 0, 1097, 1097, 1098, 1106, 1107, 1117, 1117, 1117, 1117, - 1117, 1118, 1118, 1118, 1119, 1119, 1119, 1119, 1119, 1119, - 1121, 1121, 1125, 1125, 1125, 1125, 1126, 1126, 1126, 1126, - 1127, 1127, 1128, 1128, 1131, 1135, 1140, 1141, 1142, 1143, - 1144, 1145, 1146, 1147, 1149, 1150, 1151, 1152, 1153, 1154, - 1155, 1156, 1165, 1166, 1172, 1173, 1181, 1189, 1190, 1195, - 1196, 1197, 1202, 1216, 1216, 1217, 1217, 1219, 1229, 1229, - 1229, 1229, 1229, 1229, 1229, 1230, 1230, 1230, 1230, 1230, - 1230, 1231, 1235, 1239, 1247, 1255, 1268, 1273, 1285, 1295, - 1299, 1310, 1315, 1321, 1322, 1326, 1330, 1341, 1367, 1381, - 1411, 1437, 1458, 1471, 1481, 1486, 1547, 1554, 1563, 1569, - 1575, 1579, 1583, 1591, 1602, 1634, 1642, 1664, 1675, 1681, - 1689, 1695, 1701, 1710, 1714, 1722, 1722, 1732, 1740, 1745, - 1749, 1753, 1757, 1772, 1794, 1797, 1800, 1800, 1808, 1808, - 1816, 1816, 1824, 1824, 1833, 1836, 1839, 1843, 1856, 1857, - 1859, 1863, 1872, 1877, 1883, 1885, 1890, 1895, 1904, 1904, - 1905, 1905, 1907, 1914, 1920, 1927, 1931, 1937, 1942, 1947, - 2042, 2042, 2044, 2052, 2052, 2054, 2059, 2060, 2061, 2063, - 2063, 2073, 2077, 2082, 2086, 2090, 2094, 2098, 2102, 2106, - 2110, 2114, 2139, 2143, 2157, 2161, 2167, 2167, 2173, 2178, - 2182, 2191, 2202, 2207, 2219, 2232, 2236, 2240, 2245, 2254, - 2273, 2282, 2338, 2342, 2349, 2360, 2373, 2382, 2391, 2401, - 2405, 2412, 2412, 2414, 2418, 2423, 2439, 2454, 2468, 2481, - 2489, 2497, 2505, 2511, 2531, 2554, 2560, 2566, 2572, 2587, - 2646, 2653, 2656, 2661, 2665, 2672, 2677, 2683, 2688, 2694, - 2702, 2714, 2729 + 0, 1114, 1114, 1115, 1123, 1124, 1134, 1134, 1134, 1134, + 1134, 1134, 1135, 1135, 1135, 1136, 1136, 1136, 1136, 1136, + 1136, 1138, 1138, 1142, 1142, 1142, 1142, 1143, 1143, 1143, + 1143, 1144, 1144, 1145, 1145, 1148, 1152, 1157, 1158, 1159, + 1160, 1161, 1162, 1163, 1164, 1166, 1167, 1168, 1169, 1170, + 1171, 1172, 1173, 1182, 1183, 1189, 1190, 1198, 1206, 1207, + 1212, 1213, 1214, 1219, 1233, 1233, 1234, 1234, 1236, 1246, + 1246, 1246, 1246, 1246, 1246, 1246, 1247, 1247, 1247, 1247, + 1247, 1247, 1248, 1252, 1256, 1264, 1272, 1285, 1290, 1302, + 1312, 1316, 1327, 1332, 1338, 1339, 1343, 1347, 1358, 1384, + 1398, 1428, 1454, 1475, 1488, 1498, 1503, 1564, 1571, 1580, + 1586, 1592, 1596, 1600, 1608, 1619, 1651, 1659, 1683, 1694, + 1700, 1708, 1714, 1720, 1729, 1733, 1741, 1741, 1751, 1759, + 1764, 1768, 1772, 1776, 1791, 1813, 1816, 1819, 1819, 1827, + 1827, 1835, 1835, 1843, 1843, 1852, 1855, 1858, 1862, 1875, + 1876, 1878, 1882, 1891, 1896, 1902, 1904, 1909, 1914, 1923, + 1923, 1924, 1924, 1926, 1933, 1939, 1946, 1950, 1956, 1961, + 1966, 2061, 2061, 2063, 2071, 2071, 2073, 2078, 2079, 2080, + 2082, 2082, 2092, 2096, 2101, 2105, 2109, 2113, 2117, 2121, + 2125, 2129, 2133, 2158, 2162, 2176, 2180, 2186, 2186, 2192, + 2197, 2201, 2210, 2221, 2226, 2238, 2251, 2255, 2259, 2264, + 2273, 2292, 2301, 2357, 2361, 2368, 2379, 2392, 2401, 2410, + 2420, 2424, 2431, 2431, 2433, 2437, 2442, 2460, 2475, 2489, + 2502, 2510, 2518, 2526, 2532, 2552, 2575, 2581, 2587, 2593, + 2608, 2667, 2674, 2677, 2682, 2686, 2693, 2698, 2704, 2709, + 2715, 2723, 2735, 2750 }; #endif @@ -1698,8 +1718,8 @@ "SIDEEFFECT", "CC_TOK", "CCC_TOK", "CSRETCC_TOK", "FASTCC_TOK", "COLDCC_TOK", "X86_STDCALLCC_TOK", "X86_FASTCALLCC_TOK", "DATA", "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", + "UDIV", "SDIV", "REM", "AND", "OR", "XOR", "SETLE", "SETGE", "SETLT", + "SETGT", "SETEQ", "SETNE", "MALLOC", "ALLOCA", "FREE", "LOAD", "STORE", "GETELEMENTPTR", "PHI_TOK", "CAST", "SELECT", "SHL", "SHR", "VAARG", "EXTRACTELEMENT", "INSERTELEMENT", "SHUFFLEVECTOR", "VAARG_old", "VANEXT_old", "'='", "','", "'\\\\'", "'('", "')'", "'['", "'x'", "']'", @@ -1737,41 +1757,41 @@ 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, - 355, 356, 357, 358, 359, 360, 361, 362, 363, 61, - 44, 92, 40, 41, 91, 120, 93, 60, 62, 123, - 125, 42, 99 + 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, + 61, 44, 92, 40, 41, 91, 120, 93, 60, 62, + 123, 125, 42, 99 }; # endif /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const unsigned char yyr1[] = { - 0, 123, 124, 124, 125, 125, 126, 126, 126, 126, - 126, 127, 127, 127, 128, 128, 128, 128, 128, 128, - 129, 129, 130, 130, 130, 130, 131, 131, 131, 131, - 132, 132, 133, 133, 134, 134, 135, 135, 135, 135, - 135, 135, 135, 135, 136, 136, 136, 136, 136, 136, - 136, 136, 137, 137, 138, 138, 139, 140, 140, 141, - 141, 142, 142, 143, 143, 144, 144, 145, 146, 146, - 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, - 146, 147, 147, 147, 147, 147, 147, 147, 147, 147, - 147, 148, 148, 149, 149, 149, 149, 150, 150, 150, - 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, - 150, 150, 150, 151, 151, 151, 151, 151, 151, 151, - 151, 151, 151, 152, 152, 153, 153, 154, 155, 155, - 155, 155, 155, 156, 156, 156, 157, 156, 158, 156, - 159, 156, 160, 156, 156, 156, 156, 161, 162, 162, - 163, 163, 163, 163, 164, 165, 165, 165, 166, 166, - 167, 167, 168, 169, 169, 170, 170, 170, 170, 171, - 172, 172, 173, 174, 174, 175, 176, 176, 176, 178, - 177, 179, 179, 180, 180, 180, 180, 180, 180, 180, - 180, 180, 180, 180, 181, 181, 182, 182, 183, 184, - 184, 185, 186, 186, 186, 187, 187, 187, 187, 187, - 187, 187, 187, 187, 188, 188, 189, 190, 190, 191, - 191, 192, 192, 193, 193, 194, 194, 194, 194, 194, - 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, - 194, 195, 195, 196, 196, 197, 197, 197, 197, 197, - 197, 197, 197 + 0, 124, 125, 125, 126, 126, 127, 127, 127, 127, + 127, 127, 128, 128, 128, 129, 129, 129, 129, 129, + 129, 130, 130, 131, 131, 131, 131, 132, 132, 132, + 132, 133, 133, 134, 134, 135, 135, 136, 136, 136, + 136, 136, 136, 136, 136, 137, 137, 137, 137, 137, + 137, 137, 137, 138, 138, 139, 139, 140, 141, 141, + 142, 142, 143, 143, 144, 144, 145, 145, 146, 147, + 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, + 147, 147, 148, 148, 148, 148, 148, 148, 148, 148, + 148, 148, 149, 149, 150, 150, 150, 150, 151, 151, + 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, + 151, 151, 151, 151, 152, 152, 152, 152, 152, 152, + 152, 152, 152, 152, 153, 153, 154, 154, 155, 156, + 156, 156, 156, 156, 157, 157, 157, 158, 157, 159, + 157, 160, 157, 161, 157, 157, 157, 157, 162, 163, + 163, 164, 164, 164, 164, 165, 166, 166, 166, 167, + 167, 168, 168, 169, 170, 170, 171, 171, 171, 171, + 172, 173, 173, 174, 175, 175, 176, 177, 177, 177, + 179, 178, 180, 180, 181, 181, 181, 181, 181, 181, + 181, 181, 181, 181, 181, 182, 182, 183, 183, 184, + 185, 185, 186, 187, 187, 187, 188, 188, 188, 188, + 188, 188, 188, 188, 188, 189, 189, 190, 191, 191, + 192, 192, 193, 193, 194, 194, 195, 195, 195, 195, + 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, + 195, 195, 196, 196, 197, 197, 198, 198, 198, 198, + 198, 198, 198, 198 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ @@ -1780,29 +1800,29 @@ 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, - 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, - 1, 2, 0, 2, 0, 3, 2, 0, 1, 0, - 3, 1, 2, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 2, 0, 1, 1, 1, + 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, + 1, 1, 2, 0, 2, 0, 3, 2, 0, 1, + 0, 3, 1, 2, 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, - 6, 8, 8, 3, 1, 1, 1, 1, 2, 2, - 4, 2, 1, 4, 2, 4, 0, 7, 0, 7, - 0, 7, 0, 7, 3, 4, 0, 1, 1, 1, - 3, 3, 3, 3, 3, 3, 1, 0, 1, 1, - 1, 0, 2, 3, 1, 1, 3, 1, 0, 8, - 1, 1, 3, 1, 1, 2, 0, 1, 1, 0, - 4, 0, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 3, 1, 5, 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, 4, 6, 6, 2, 7, - 1, 2, 0, 1, 0, 3, 6, 3, 6, 2, - 4, 6, 4 + 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, 6, 8, 8, 3, 1, 1, 1, 1, 2, + 2, 4, 2, 1, 4, 2, 4, 0, 7, 0, + 7, 0, 7, 0, 7, 3, 4, 0, 1, 1, + 1, 3, 3, 3, 3, 3, 3, 1, 0, 1, + 1, 1, 0, 2, 3, 1, 1, 3, 1, 0, + 8, 1, 1, 3, 1, 1, 2, 0, 1, 1, + 0, 4, 0, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 3, 1, 5, 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, 4, 6, 6, 2, + 7, 1, 2, 0, 1, 0, 3, 6, 3, 6, + 2, 4, 6, 4 }; /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state @@ -1810,482 +1830,476 @@ means the default is an error. */ static const unsigned char yydefact[] = { - 146, 0, 43, 132, 1, 131, 179, 36, 37, 38, - 39, 40, 41, 42, 0, 44, 203, 128, 129, 203, - 158, 159, 0, 0, 0, 43, 0, 134, 176, 0, - 0, 45, 46, 47, 48, 49, 50, 0, 0, 204, - 200, 35, 173, 174, 175, 199, 0, 0, 0, 0, - 144, 0, 0, 0, 0, 0, 0, 0, 34, 177, - 178, 44, 147, 130, 51, 2, 3, 64, 68, 69, - 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, - 80, 81, 0, 0, 0, 0, 194, 0, 0, 63, - 82, 67, 195, 83, 170, 171, 172, 244, 202, 0, - 0, 0, 0, 157, 145, 135, 133, 125, 126, 0, - 0, 0, 0, 180, 84, 0, 0, 66, 89, 91, - 0, 0, 96, 90, 243, 0, 224, 0, 0, 0, - 0, 44, 212, 213, 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, 0, 0, 0, 201, 44, 216, - 0, 240, 152, 149, 148, 150, 151, 153, 156, 0, - 140, 142, 138, 68, 69, 70, 71, 72, 73, 74, - 75, 76, 77, 78, 0, 0, 0, 0, 136, 0, - 0, 0, 88, 168, 95, 93, 0, 0, 228, 223, - 206, 205, 0, 0, 25, 29, 24, 28, 23, 27, - 22, 26, 30, 31, 0, 0, 54, 54, 249, 0, - 0, 238, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 154, 59, - 59, 59, 110, 111, 4, 5, 108, 109, 112, 107, - 103, 104, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 106, 105, 59, 65, - 65, 92, 167, 161, 164, 165, 0, 0, 85, 183, - 184, 185, 190, 186, 187, 188, 189, 181, 0, 192, - 197, 196, 198, 0, 207, 0, 0, 0, 245, 0, - 247, 242, 0, 0, 0, 0, 0, 0, 0, 0, + 147, 0, 44, 133, 1, 132, 180, 37, 38, 39, + 40, 41, 42, 43, 0, 45, 204, 129, 130, 204, + 159, 160, 0, 0, 0, 44, 0, 135, 177, 0, + 0, 46, 47, 48, 49, 50, 51, 0, 0, 205, + 201, 36, 174, 175, 176, 200, 0, 0, 0, 0, + 145, 0, 0, 0, 0, 0, 0, 0, 35, 178, + 179, 45, 148, 131, 52, 2, 3, 65, 69, 70, + 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, + 81, 82, 0, 0, 0, 0, 195, 0, 0, 64, + 83, 68, 196, 84, 171, 172, 173, 245, 203, 0, + 0, 0, 0, 158, 146, 136, 134, 126, 127, 0, + 0, 0, 0, 181, 85, 0, 0, 67, 90, 92, + 0, 0, 97, 91, 244, 0, 225, 0, 0, 0, + 0, 45, 213, 214, 6, 7, 8, 9, 10, 11, + 12, 13, 14, 15, 16, 17, 18, 19, 20, 0, + 0, 0, 0, 0, 0, 0, 21, 22, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 202, 45, + 217, 0, 241, 153, 150, 149, 151, 152, 154, 157, + 0, 141, 143, 139, 69, 70, 71, 72, 73, 74, + 75, 76, 77, 78, 79, 0, 0, 0, 0, 137, + 0, 0, 0, 89, 169, 96, 94, 0, 0, 229, + 224, 207, 206, 0, 0, 26, 30, 25, 29, 24, + 28, 23, 27, 31, 32, 0, 0, 55, 55, 250, + 0, 0, 239, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 155, - 0, 141, 143, 139, 0, 0, 0, 0, 0, 0, - 98, 124, 0, 0, 102, 0, 99, 0, 0, 0, - 0, 137, 86, 87, 160, 162, 0, 57, 94, 182, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 252, - 0, 0, 230, 0, 232, 235, 0, 0, 233, 234, - 0, 0, 0, 229, 0, 250, 0, 0, 0, 61, - 59, 242, 0, 0, 0, 0, 0, 0, 97, 100, - 101, 0, 0, 0, 0, 166, 163, 58, 52, 0, - 191, 0, 0, 222, 54, 55, 54, 219, 241, 0, - 0, 0, 0, 0, 225, 226, 227, 222, 0, 56, - 62, 60, 0, 0, 0, 0, 0, 0, 123, 0, - 0, 0, 0, 0, 169, 0, 0, 0, 221, 0, - 0, 246, 248, 0, 0, 0, 231, 236, 237, 0, - 251, 114, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 53, 193, 0, 0, 0, 220, 217, 0, 239, - 113, 0, 120, 0, 0, 116, 117, 118, 119, 0, - 210, 0, 0, 0, 218, 0, 0, 0, 208, 0, - 209, 0, 0, 115, 121, 122, 0, 0, 0, 0, - 0, 0, 215, 0, 0, 214, 211 + 60, 60, 60, 111, 112, 4, 5, 109, 110, 113, + 108, 104, 105, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 107, 106, 60, + 66, 66, 93, 168, 162, 165, 166, 0, 0, 86, + 184, 185, 186, 191, 187, 188, 189, 190, 182, 0, + 193, 198, 197, 199, 0, 208, 0, 0, 0, 246, + 0, 248, 243, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 156, 0, 142, 144, 140, 0, 0, 0, 0, 0, + 0, 99, 125, 0, 0, 103, 0, 100, 0, 0, + 0, 0, 138, 87, 88, 161, 163, 0, 58, 95, + 183, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 253, 0, 0, 231, 0, 233, 236, 0, 0, 234, + 235, 0, 0, 0, 230, 0, 251, 0, 0, 0, + 62, 60, 243, 0, 0, 0, 0, 0, 0, 98, + 101, 102, 0, 0, 0, 0, 167, 164, 59, 53, + 0, 192, 0, 0, 223, 55, 56, 55, 220, 242, + 0, 0, 0, 0, 0, 226, 227, 228, 223, 0, + 57, 63, 61, 0, 0, 0, 0, 0, 0, 124, + 0, 0, 0, 0, 0, 170, 0, 0, 0, 222, + 0, 0, 247, 249, 0, 0, 0, 232, 237, 238, + 0, 252, 115, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 54, 194, 0, 0, 0, 221, 218, 0, + 240, 114, 0, 121, 0, 0, 117, 118, 119, 120, + 0, 211, 0, 0, 0, 219, 0, 0, 0, 209, + 0, 210, 0, 0, 116, 122, 123, 0, 0, 0, + 0, 0, 0, 216, 0, 0, 215, 212 }; /* YYDEFGOTO[NTERM-NUM]. */ static const short int yydefgoto[] = { - -1, 86, 256, 272, 273, 274, 275, 194, 195, 224, - 196, 25, 15, 37, 444, 308, 389, 408, 331, 390, - 87, 88, 197, 90, 91, 120, 206, 341, 299, 342, - 109, 1, 2, 3, 278, 251, 249, 250, 63, 175, - 50, 104, 179, 92, 355, 284, 285, 286, 38, 96, - 16, 44, 17, 61, 18, 28, 360, 300, 93, 302, - 417, 19, 40, 41, 167, 492, 98, 231, 448, 449, - 168, 169, 369, 170, 171 + -1, 86, 257, 273, 274, 275, 276, 195, 196, 225, + 197, 25, 15, 37, 445, 309, 390, 409, 332, 391, + 87, 88, 198, 90, 91, 120, 207, 342, 300, 343, + 109, 1, 2, 3, 279, 252, 250, 251, 63, 176, + 50, 104, 180, 92, 356, 285, 286, 287, 38, 96, + 16, 44, 17, 61, 18, 28, 361, 301, 93, 303, + 418, 19, 40, 41, 168, 493, 98, 232, 449, 450, + 169, 170, 370, 171, 172 }; /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ -#define YYPACT_NINF -410 +#define YYPACT_NINF -459 static const short int yypact[] = { - -410, 17, 118, 605, -410, -410, -410, -410, -410, -410, - -410, -410, -410, -410, 24, 160, 67, -410, -410, -15, - -410, -410, 27, -5, 46, -6, 10, -410, 86, 147, - 138, -410, -410, -410, -410, -410, -410, 1060, -20, -410, - -410, 110, -410, -410, -410, -410, 69, 70, 72, 73, - -410, 63, 147, 1060, 68, 68, 68, 68, -410, -410, - -410, 160, -410, -410, -410, -410, -410, 64, -410, -410, - -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, - -410, -410, 182, 183, 186, 572, -410, 110, 77, -410, - -410, -28, -410, -410, -410, -410, -410, 1231, -410, 168, - 83, 199, 180, 181, -410, -410, -410, -410, -410, 1101, - 1101, 1101, 1142, -410, -410, 91, 96, -410, -410, -28, - -98, 103, 852, -410, -410, 1101, -410, 157, 1183, 50, - 185, 160, -410, -410, -410, -410, -410, -410, -410, -410, - -410, -410, -410, -410, -410, -410, -410, -410, 1101, 1101, - 1101, 1101, 1101, 1101, 1101, -410, -410, 1101, 1101, 1101, - 1101, 1101, 1101, 1101, 1101, 1101, 1101, -410, 160, -410, - 49, -410, -410, -410, -410, -410, -410, -410, -410, -14, - -410, -410, -410, 120, 148, 213, 150, 214, 154, 215, - 166, 217, 224, 231, 170, 218, 232, 425, -410, 1101, - 1101, 1101, -410, 893, -410, 130, 128, 638, -410, -410, - 64, -410, 638, 638, -410, -410, -410, -410, -410, -410, - -410, -410, -410, -410, 638, 1060, 132, 133, -410, 638, - 136, 134, 216, 141, 143, 144, 146, 149, 151, 152, - 638, 638, 638, 153, 1060, 1101, 1101, 233, -410, 155, - 155, 155, -410, -410, -410, -410, -410, -410, -410, -410, - -410, -410, 156, 159, 161, 164, 175, 177, 934, 1142, - 592, 234, 178, 184, 187, 188, -410, -410, 155, -70, - -35, -28, -410, 110, -410, 162, 179, 978, -410, -410, - -410, -410, -410, -410, -410, -410, -410, 197, 1142, -410, - -410, -410, -410, 191, -410, 195, 638, 3, -410, 18, - -410, 196, 638, 193, 1101, 1101, 1101, 1101, 1101, 1101, - 1101, 1101, 201, 202, 203, 1101, 638, 638, 205, -410, - 13, -410, -410, -410, 1142, 1142, 1142, 1142, 1142, 1142, - -410, -410, -13, -99, -410, -78, -410, 1142, 1142, 1142, - 1142, -410, -410, -410, -410, -410, 1019, 230, -410, -410, - 242, -23, 246, 272, 208, 638, 290, 638, 1101, -410, - 211, 638, -410, 212, -410, -410, 219, 220, -410, -410, - 638, 638, 638, -410, 229, -410, 1101, 273, 294, -410, - 155, 196, 291, 226, 237, 240, 241, 1142, -410, -410, - -410, 243, 247, 248, 249, -410, -410, -410, 252, 250, - -410, 638, 638, 1101, 251, -410, 251, -410, 255, 638, - 256, 1101, 1101, 1101, -410, -410, -410, 1101, 638, -410, - -410, -410, 239, 1101, 1142, 1142, 1142, 1142, -410, 1142, - 1142, 1142, 1142, 322, -410, 304, 257, 228, 255, 259, - 286, -410, -410, 1101, 253, 638, -410, -410, -410, 260, - -410, -410, 262, 267, 265, 270, 277, 278, 279, 280, - 281, -410, -410, 323, 14, 320, -410, -410, 254, -410, - -410, 1142, -410, 1142, 1142, -410, -410, -410, -410, 638, - -410, 742, 52, 362, -410, 282, 284, 287, -410, 289, - -410, 742, 638, -410, -410, -410, 380, 292, 327, 638, - 383, 384, -410, 638, 638, -410, -410 + -459, 8, 119, 464, -459, -459, -459, -459, -459, -459, + -459, -459, -459, -459, -46, 162, 21, -459, -459, -11, + -459, -459, 23, -25, 59, 219, 35, -459, -5, 109, + 143, -459, -459, -459, -459, -459, -459, 1020, 12, -459, + -459, 112, -459, -459, -459, -459, 80, 82, 84, 88, + -459, 54, 109, 1020, 121, 121, 121, 121, -459, -459, + -459, 162, -459, -459, -459, -459, -459, 90, -459, -459, + -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, + -459, -459, 196, 197, 202, 574, -459, 112, 99, -459, + -459, -42, -459, -459, -459, -459, -459, 1192, -459, 192, + 103, 213, 194, 195, -459, -459, -459, -459, -459, 1061, + 1061, 1061, 1102, -459, -459, 104, 106, -459, -459, -42, + -100, 110, 856, -459, -459, 1061, -459, 165, 1143, 69, + 390, 162, -459, -459, -459, -459, -459, -459, -459, -459, + -459, -459, -459, -459, -459, -459, -459, -459, -459, 1061, + 1061, 1061, 1061, 1061, 1061, 1061, -459, -459, 1061, 1061, + 1061, 1061, 1061, 1061, 1061, 1061, 1061, 1061, -459, 162, + -459, 75, -459, -459, -459, -459, -459, -459, -459, -459, + -72, -459, -459, -459, 147, 174, 236, 176, 237, 179, + 238, 184, 239, 244, 245, 193, 240, 246, 455, -459, + 1061, 1061, 1061, -459, 897, -459, 134, 140, 640, -459, + -459, 90, -459, 640, 640, -459, -459, -459, -459, -459, + -459, -459, -459, -459, -459, 640, 1020, 144, 146, -459, + 640, 152, 148, 222, 157, 161, 163, 166, 177, 180, + 182, 640, 640, 640, 183, 1020, 1061, 1061, 249, -459, + 186, 186, 186, -459, -459, -459, -459, -459, -459, -459, + -459, -459, -459, 185, 187, 188, 189, 199, 200, 87, + 1102, 594, 266, 201, 203, 208, 209, -459, -459, 186, + -36, 33, -42, -459, 112, -459, 212, 181, 938, -459, + -459, -459, -459, -459, -459, -459, -459, -459, 243, 1102, + -459, -459, -459, -459, 216, -459, 217, 640, -6, -459, + 3, -459, 218, 640, 215, 1061, 1061, 1061, 1061, 1061, + 1061, 1061, 1061, 220, 226, 231, 1061, 640, 640, 232, + -459, -21, -459, -459, -459, 1102, 1102, 1102, 1102, 1102, + 1102, -459, -459, 32, -32, -459, -74, -459, 1102, 1102, + 1102, 1102, -459, -459, -459, -459, -459, 979, 265, -459, + -459, 283, 29, 287, 289, 235, 640, 340, 640, 1061, + -459, 234, 640, -459, 241, -459, -459, 242, 247, -459, + -459, 640, 640, 640, -459, 248, -459, 1061, 327, 350, + -459, 186, 218, 321, 251, 255, 256, 257, 1102, -459, + -459, -459, 259, 260, 262, 263, -459, -459, -459, 302, + 267, -459, 640, 640, 1061, 268, -459, 268, -459, 270, + 640, 273, 1061, 1061, 1061, -459, -459, -459, 1061, 640, + -459, -459, -459, 274, 1061, 1102, 1102, 1102, 1102, -459, + 1102, 1102, 1102, 1102, 356, -459, 352, 281, 278, 270, + 280, 338, -459, -459, 1061, 279, 640, -459, -459, -459, + 284, -459, -459, 294, 298, 296, 300, 301, 299, 304, + 305, 306, -459, -459, 393, 14, 379, -459, -459, 307, + -459, -459, 1102, -459, 1102, 1102, -459, -459, -459, -459, + 640, -459, 745, 53, 395, -459, 308, 309, 311, -459, + 310, -459, 745, 640, -459, -459, -459, 405, 316, 353, + 640, 410, 411, -459, 640, 640, -459, -459 }; /* YYPGOTO[NTERM-NUM]. */ static const short int yypgoto[] = { - -410, -410, -410, 309, 310, 311, 312, -129, -128, -398, - -410, 369, 386, -118, -410, -223, 55, -410, -244, -410, - -50, -410, -37, -410, -64, 293, -410, -102, 221, -192, - 53, -410, -410, -410, -410, -410, -410, -410, 361, -410, - -410, -410, -410, 2, -410, 58, -410, -410, 356, -410, - -410, -410, -410, -410, 416, -410, -410, -409, -57, 62, - -105, -410, 401, -410, -410, -410, -410, -410, 54, -4, - -410, -410, 30, -410, -410 + -459, -459, -459, 339, 341, 342, 343, -129, -128, -458, + -459, 394, 412, -117, -459, -224, 83, -459, -245, -459, + -50, -459, -37, -459, -63, 320, -459, -102, 250, -238, + 27, -459, -459, -459, -459, -459, -459, -459, 397, -459, + -459, -459, -459, 2, -459, 93, -459, -459, 386, -459, + -459, -459, -459, -459, 448, -459, -459, -454, -57, 62, + -105, -459, 433, -459, -459, -459, -459, -459, 85, 28, + -459, -459, 63, -459, -459 }; /* 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 -128 +#define YYTABLE_NINF -129 static const short int yytable[] = { - 89, 222, 223, 106, 310, 26, 332, 333, 39, 94, - 198, 397, 201, 225, 53, 42, 89, 4, 365, 399, - 208, 119, 202, 211, 214, 215, 216, 217, 218, 219, - 220, 221, 397, 367, 351, 7, 8, 9, 10, 54, - 12, 55, 400, 26, 56, 228, 352, 387, 232, 233, - 244, 123, 234, 235, 236, 237, 238, 239, 119, 212, - 366, 243, 214, 215, 216, 217, 218, 219, 220, 221, - 388, 213, 180, 181, 182, 366, 491, 343, 345, 46, - 47, 48, 499, 353, -65, 29, 123, 397, 207, 121, - 39, 207, 507, 123, 501, 410, 247, 397, 49, 95, - 107, 108, 248, 398, 51, 43, 361, 52, 110, 111, - 112, 226, 227, 207, 229, 230, 207, 207, -127, 58, - 207, 207, 207, 207, 207, 207, 240, 241, 242, 207, - 490, 59, 20, 60, 21, 279, 280, 281, 173, 174, - 277, 328, 64, 5, 245, 246, 431, 252, 253, 6, - 301, -25, -25, -24, -24, 301, 301, -23, -23, 7, - 8, 9, 10, 11, 12, 13, 283, 301, 500, -22, - -22, 62, 301, 254, 255, 306, -66, 103, 99, 100, - 14, 101, 102, 301, 301, 301, 114, 115, 89, 122, - 116, 451, 172, 452, 326, 214, 215, 216, 217, 218, - 219, 220, 221, 176, 177, 178, 199, 89, 327, 207, - 373, 200, 375, 376, 377, 203, 209, -29, -28, -27, - 383, -26, 257, 281, 30, 31, 32, 33, 34, 35, - 36, -32, 391, 392, 393, 394, 395, 396, -33, 258, - 287, 288, 307, 309, 313, 401, 402, 403, 404, 301, - 312, 315, 314, 316, 317, 301, 318, 329, 346, 319, - 359, 320, 321, 325, 387, 330, 409, 411, 334, 301, - 301, 335, 356, 336, 303, 304, 337, 372, 207, 374, - 207, 207, 207, 378, 379, 354, 305, 338, 207, 339, - 347, 311, 357, 412, 415, 438, 348, 429, 430, 349, - 350, 362, 322, 323, 324, 363, 368, 371, 301, 443, - 301, 380, 381, 382, 301, 386, 456, 457, 458, 283, - 413, 419, 421, 301, 301, 301, 471, 433, 472, 422, - 423, 207, 463, 464, 465, 466, 434, 467, 468, 469, - 470, 427, 474, 366, 489, 222, 223, 435, 476, 428, - 436, 437, 461, 439, 301, 301, 493, 440, 441, 442, - 445, 450, 301, 222, 223, 453, 455, 473, 364, 477, - 494, 301, 475, 479, 370, 480, 207, 481, 482, 495, - 483, 496, 497, 502, 207, 207, 207, 484, 384, 385, - 207, 485, 486, 487, 488, 503, 462, 504, 301, 506, - 505, 509, 510, 511, 513, 514, 163, 164, 165, 166, - 97, 57, 407, 105, 406, 205, 207, 113, 276, 27, - 45, 432, 418, 459, 0, 0, 0, 414, 0, 416, - 65, 66, 301, 420, 0, 0, 0, 0, 0, 0, - 0, 0, 424, 425, 426, 301, 0, 20, 0, 21, - 0, 259, 301, 0, 0, 0, 301, 301, 0, 0, - 0, 0, 0, 260, 261, 0, 0, 0, 0, 0, - 0, 0, 0, 446, 447, 0, 0, 0, 0, 0, - 0, 454, 0, 0, 0, 0, 0, 0, 0, 0, - 460, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 89, 223, 224, 106, 311, 26, 333, 334, 4, 366, + 199, 202, 39, 388, 226, 29, 89, 492, 368, 42, + 209, 203, 119, 212, 215, 216, 217, 218, 219, 220, + 221, 222, 344, 346, 352, 502, 389, 398, 500, 248, + 59, 94, 60, 26, 39, 249, 229, 401, 508, 233, + 234, 367, 245, 235, 236, 237, 238, 239, 240, 119, + 367, 362, 244, 215, 216, 217, 218, 219, 220, 221, + 222, -66, 181, 182, 183, 46, 47, 48, 213, 398, + 123, 353, 110, 111, 112, 51, 123, 400, 208, 121, + 214, 208, 65, 66, 49, 117, 184, 185, 186, 187, + 188, 189, 190, 191, 192, 193, 194, 79, 80, 20, + 43, 21, 227, 228, 208, 230, 231, 208, 208, -128, + 52, 208, 208, 208, 208, 208, 208, 241, 242, 243, + 208, 491, 95, 62, 20, 81, 21, 280, 281, 282, + 398, 278, 329, 398, 5, 58, 432, 64, 411, 399, + 6, 302, 354, 107, 108, 123, 302, 302, 174, 175, + 7, 8, 9, 10, 11, 12, 13, 284, 302, 103, + 501, 246, 247, 302, 253, 254, 307, -26, -26, -25, + -25, 14, -24, -24, 302, 302, 302, -23, -23, 89, + 99, 452, 100, 453, 101, 327, 255, 256, 102, 82, + 114, 115, 83, -67, 341, 84, 116, 85, 89, 328, + 208, 374, 122, 376, 377, 378, 173, 177, 178, 179, + 200, 384, 201, 204, 210, 282, 30, 31, 32, 33, + 34, 35, 36, 392, 393, 394, 395, 396, 397, 53, + -30, -29, -28, -27, 258, 288, 402, 403, 404, 405, + 302, -33, -34, 259, 289, 308, 302, 310, 315, 314, + 7, 8, 9, 10, 54, 12, 55, 313, 316, 56, + 302, 302, 317, 330, 318, 304, 305, 319, 373, 208, + 375, 208, 208, 208, 379, 380, 355, 306, 320, 208, + 347, 321, 312, 322, 326, 358, 439, 331, 335, 388, + 336, 337, 338, 323, 324, 325, 360, 410, 412, 302, + 413, 302, 339, 340, 348, 302, 349, 457, 458, 459, + 284, 350, 351, 357, 302, 302, 302, 363, 364, 369, + 372, 381, 208, 464, 465, 466, 467, 382, 468, 469, + 470, 471, 383, 387, 416, 420, 223, 224, 414, 477, + 429, 430, 422, 423, 431, 302, 302, 434, 424, 444, + 472, 428, 435, 302, 223, 224, 436, 437, 438, 365, + 440, 441, 302, 442, 443, 371, 473, 208, 446, 451, + 496, 454, 497, 498, 456, 208, 208, 208, 462, 385, + 386, 208, 474, 475, 476, 367, 478, 463, 480, 302, + 215, 216, 217, 218, 219, 220, 221, 222, 481, 482, + 483, 484, 485, 486, 490, 494, 503, 208, 487, 488, + 489, 507, 504, 505, 495, 506, 510, 511, 415, 512, + 417, 514, 515, 302, 421, 97, 164, 57, 165, 166, + 167, 408, 206, 425, 426, 427, 302, 113, 277, 105, + 407, 27, 45, 302, 419, 433, 460, 302, 302, 0, + 65, 66, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 447, 448, 0, 20, 0, 21, + 0, 260, 455, 0, -36, 0, 20, 0, 21, 0, + 0, 461, 0, 261, 262, 6, -36, -36, 0, 0, + 0, 0, 0, 0, 0, -36, -36, -36, -36, -36, + -36, -36, 0, 0, -36, 22, 0, 0, 479, 0, + 0, 0, 23, 0, 0, 0, 24, 0, 0, 0, 0, 0, 0, 134, 135, 136, 137, 138, 139, 140, - 141, 142, 143, 144, 145, 146, 147, 478, 0, 0, - 0, 0, 262, 0, 263, 264, 155, 156, 0, 265, - 266, 267, 0, 0, 0, 0, 0, 0, 0, 268, - 0, 0, 269, 0, 270, 0, 0, 271, 0, 0, - 0, 498, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 508, 0, 0, 0, 0, 0, - 0, 512, 0, 0, 0, 515, 516, 65, 66, 0, - 117, 68, 69, 70, 71, 72, 73, 74, 75, 76, - 77, 78, 79, 80, 20, 0, 21, 65, 66, 0, - 117, 183, 184, 185, 186, 187, 188, 189, 190, 191, - 192, 193, 79, 80, 20, 0, 21, 0, 0, 0, - 81, 0, 0, 0, 0, -35, 0, 20, 0, 21, - 0, 0, 0, 0, 0, 0, 6, -35, -35, 0, - 81, 289, 290, 65, 66, 291, -35, -35, -35, -35, - -35, -35, -35, 0, 0, -35, 22, 0, 0, 0, - 20, 0, 21, 23, 292, 293, 294, 24, 0, 0, - 0, 0, 0, 0, 0, 0, 295, 296, 0, 0, - 0, 0, 0, 82, 0, 0, 83, 0, 0, 84, - 0, 85, 118, 0, 0, 0, 0, 0, 0, 297, - 0, 0, 0, 82, 0, 0, 83, 0, 0, 84, - 0, 85, 344, 0, 0, 0, 134, 135, 136, 137, - 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, - 0, 0, 0, 0, 0, 262, 0, 263, 264, 155, - 156, 0, 265, 266, 267, 289, 290, 0, 0, 291, - 0, 0, 0, 0, 0, 298, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 292, 293, - 294, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 295, 296, 0, 0, 0, 0, 0, 0, 0, 0, + 141, 142, 143, 144, 145, 146, 147, 148, 0, 0, + 0, 0, 499, 263, 0, 264, 265, 156, 157, 0, + 266, 267, 268, 0, 0, 509, 0, 0, 0, 0, + 269, 0, 513, 270, 0, 271, 516, 517, 272, 65, + 66, 0, 117, 68, 69, 70, 71, 72, 73, 74, + 75, 76, 77, 78, 79, 80, 20, 0, 21, 65, + 66, 0, 117, 184, 185, 186, 187, 188, 189, 190, + 191, 192, 193, 194, 79, 80, 20, 0, 21, 0, + 0, 0, 81, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 297, 0, 0, 0, 0, 0, 0, + 0, 0, 81, 290, 291, 65, 66, 292, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, - 144, 145, 146, 147, 0, 0, 0, 0, 0, 262, - 0, 263, 264, 155, 156, 0, 265, 266, 267, 0, - 0, 0, 0, 0, 0, 0, 0, 65, 66, 298, - 117, 68, 69, 70, 71, 72, 73, 74, 75, 76, - 77, 78, 79, 80, 20, 0, 21, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 204, - 0, 0, 0, 0, 0, 0, 0, 0, 65, 66, - 81, 117, 68, 69, 70, 71, 72, 73, 74, 75, - 76, 77, 78, 79, 80, 20, 0, 21, 0, 0, + 0, 0, 20, 0, 21, 0, 293, 294, 295, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 296, 297, + 0, 0, 0, 0, 0, 0, 82, 0, 0, 83, + 0, 0, 84, 0, 85, 118, 0, 0, 0, 0, + 0, 298, 0, 0, 0, 0, 82, 0, 0, 83, + 0, 0, 84, 0, 85, 345, 0, 0, 134, 135, + 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, + 146, 147, 148, 0, 0, 0, 0, 0, 263, 0, + 264, 265, 156, 157, 0, 266, 267, 268, 290, 291, + 0, 0, 292, 0, 0, 0, 0, 0, 299, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 282, 0, 0, 0, 0, 0, 0, 0, 0, 65, - 66, 81, 117, 183, 184, 185, 186, 187, 188, 189, - 190, 191, 192, 193, 79, 80, 20, 0, 21, 0, - 0, 0, 0, 82, 0, 0, 83, 0, 0, 84, - 0, 85, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 81, 65, 66, 0, 117, 68, 69, 70, + 0, 293, 294, 295, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 296, 297, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 298, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 134, 135, 136, 137, 138, 139, 140, + 141, 142, 143, 144, 145, 146, 147, 148, 0, 0, + 0, 0, 0, 263, 0, 264, 265, 156, 157, 0, + 266, 267, 268, 0, 0, 0, 0, 0, 0, 0, + 0, 65, 66, 299, 117, 68, 69, 70, 71, 72, + 73, 74, 75, 76, 77, 78, 79, 80, 20, 0, + 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 205, 0, 0, 0, 0, 0, 0, + 0, 0, 65, 66, 81, 117, 68, 69, 70, 71, + 72, 73, 74, 75, 76, 77, 78, 79, 80, 20, + 0, 21, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 283, 0, 0, 0, 0, 0, + 0, 0, 0, 65, 66, 81, 117, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, - 20, 0, 21, 0, 82, 0, 0, 83, 0, 0, - 84, 0, 85, 0, 0, 358, 0, 0, 0, 0, + 20, 0, 21, 0, 0, 0, 0, 0, 82, 0, + 0, 83, 0, 0, 84, 359, 85, 0, 0, 0, 0, 0, 0, 0, 65, 66, 81, 117, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, - 80, 20, 0, 21, 0, 82, 0, 0, 83, 0, - 340, 84, 0, 85, 0, 0, 405, 0, 0, 0, + 80, 20, 0, 21, 0, 0, 0, 0, 0, 82, + 0, 0, 83, 0, 0, 84, 406, 85, 0, 0, 0, 0, 0, 0, 0, 65, 66, 81, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, - 79, 80, 20, 0, 21, 0, 0, 0, 0, 82, - 0, 0, 83, 0, 0, 84, 0, 85, 0, 0, + 79, 80, 20, 0, 21, 0, 0, 0, 0, 0, + 82, 0, 0, 83, 0, 0, 84, 0, 85, 0, 0, 0, 0, 0, 0, 0, 65, 66, 81, 117, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 20, 0, 21, 0, 0, 0, 0, - 82, 0, 0, 83, 0, 0, 84, 0, 85, 0, - 0, 0, 0, 0, 0, 0, 0, 65, 66, 81, - 117, 183, 184, 185, 186, 187, 188, 189, 190, 191, - 192, 193, 79, 80, 20, 0, 21, 0, 0, 0, 0, 82, 0, 0, 83, 0, 0, 84, 0, 85, - 0, 0, 0, 0, 0, 0, 0, 0, 65, 66, - 81, 210, 68, 69, 70, 71, 72, 73, 74, 75, - 76, 77, 78, 79, 80, 20, 0, 21, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 65, 66, 81, + 117, 184, 185, 186, 187, 188, 189, 190, 191, 192, + 193, 194, 79, 80, 20, 0, 21, 0, 0, 0, 0, 0, 82, 0, 0, 83, 0, 0, 84, 0, - 85, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 85, 0, 0, 0, 0, 0, 0, 0, 65, 66, + 81, 211, 68, 69, 70, 71, 72, 73, 74, 75, + 76, 77, 78, 79, 80, 20, 0, 21, 0, 0, + 0, 0, 0, 82, 0, 0, 83, 0, 0, 84, + 0, 85, 0, 0, 0, 0, 0, 0, 0, 0, 0, 81, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 82, 0, 0, 83, 0, 0, 84, - 0, 85, 0, 0, 0, 0, 124, 0, 0, 0, + 0, 0, 0, 0, 82, 0, 0, 83, 0, 0, + 84, 0, 85, 0, 0, 0, 0, 124, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 125, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 126, 127, 0, 0, 82, 0, 0, 83, 0, 0, - 84, 0, 85, 128, 129, 130, 131, 132, 133, 134, - 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, - 145, 146, 147, 148, 149, 150, 0, 0, 151, 152, - 153, 154, 155, 156, 157, 158, 159, 160, 161, 162 + 0, 125, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 126, 127, 0, 0, 82, 0, 0, 83, 0, + 0, 84, 0, 85, 128, 129, 130, 131, 132, 133, + 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + 144, 145, 146, 147, 148, 149, 150, 151, 0, 0, + 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, + 162, 163 }; static const short int yycheck[] = { - 37, 130, 130, 53, 227, 3, 250, 251, 23, 29, - 112, 110, 110, 131, 20, 30, 53, 0, 15, 118, - 125, 85, 120, 128, 10, 11, 12, 13, 14, 15, - 16, 17, 110, 15, 278, 41, 42, 43, 44, 45, - 46, 47, 120, 41, 50, 150, 116, 34, 153, 154, - 168, 121, 157, 158, 159, 160, 161, 162, 122, 9, - 57, 166, 10, 11, 12, 13, 14, 15, 16, 17, - 57, 21, 109, 110, 111, 57, 474, 269, 270, 52, - 53, 54, 491, 118, 112, 61, 121, 110, 125, 87, - 23, 128, 501, 121, 492, 118, 110, 110, 71, 119, - 32, 33, 116, 116, 109, 120, 298, 61, 55, 56, - 57, 148, 149, 150, 151, 152, 153, 154, 0, 109, - 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, - 116, 45, 22, 47, 24, 199, 200, 201, 55, 56, - 197, 246, 4, 25, 95, 96, 390, 27, 28, 31, - 207, 3, 4, 3, 4, 212, 213, 3, 4, 41, - 42, 43, 44, 45, 46, 47, 203, 224, 116, 3, - 4, 24, 229, 3, 4, 225, 112, 114, 109, 109, - 62, 109, 109, 240, 241, 242, 4, 4, 225, 112, - 4, 414, 24, 416, 244, 10, 11, 12, 13, 14, - 15, 16, 17, 4, 24, 24, 115, 244, 245, 246, - 315, 115, 317, 318, 319, 112, 59, 4, 4, 4, - 325, 4, 4, 287, 64, 65, 66, 67, 68, 69, - 70, 7, 334, 335, 336, 337, 338, 339, 7, 7, - 110, 113, 110, 110, 110, 347, 348, 349, 350, 306, - 114, 110, 36, 110, 110, 312, 110, 24, 24, 110, - 63, 110, 110, 110, 34, 110, 24, 21, 112, 326, - 327, 112, 110, 112, 212, 213, 112, 314, 315, 316, - 317, 318, 319, 320, 321, 283, 224, 112, 325, 112, - 112, 229, 113, 21, 4, 397, 112, 24, 4, 112, - 112, 110, 240, 241, 242, 110, 110, 114, 365, 57, - 367, 110, 110, 110, 371, 110, 421, 422, 423, 356, - 112, 110, 110, 380, 381, 382, 4, 36, 24, 110, - 110, 368, 434, 435, 436, 437, 110, 439, 440, 441, - 442, 112, 114, 57, 21, 474, 474, 110, 453, 386, - 110, 110, 113, 110, 411, 412, 36, 110, 110, 110, - 110, 110, 419, 492, 492, 110, 110, 110, 306, 116, - 116, 428, 113, 113, 312, 113, 413, 110, 113, 481, - 110, 483, 484, 21, 421, 422, 423, 110, 326, 327, - 427, 113, 113, 113, 113, 113, 433, 113, 455, 110, - 113, 21, 110, 76, 21, 21, 97, 97, 97, 97, - 41, 25, 357, 52, 356, 122, 453, 61, 197, 3, - 19, 391, 368, 427, -1, -1, -1, 365, -1, 367, - 5, 6, 489, 371, -1, -1, -1, -1, -1, -1, - -1, -1, 380, 381, 382, 502, -1, 22, -1, 24, - -1, 26, 509, -1, -1, -1, 513, 514, -1, -1, - -1, -1, -1, 38, 39, -1, -1, -1, -1, -1, - -1, -1, -1, 411, 412, -1, -1, -1, -1, -1, - -1, 419, -1, -1, -1, -1, -1, -1, -1, -1, - 428, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 37, 130, 130, 53, 228, 3, 251, 252, 0, 15, + 112, 111, 23, 34, 131, 61, 53, 475, 15, 30, + 125, 121, 85, 128, 10, 11, 12, 13, 14, 15, + 16, 17, 270, 271, 279, 493, 57, 111, 492, 111, + 45, 29, 47, 41, 23, 117, 151, 121, 502, 154, + 155, 57, 169, 158, 159, 160, 161, 162, 163, 122, + 57, 299, 167, 10, 11, 12, 13, 14, 15, 16, + 17, 113, 109, 110, 111, 52, 53, 54, 9, 111, + 122, 117, 55, 56, 57, 110, 122, 119, 125, 87, + 21, 128, 5, 6, 71, 8, 9, 10, 11, 12, + 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, + 121, 24, 149, 150, 151, 152, 153, 154, 155, 0, + 61, 158, 159, 160, 161, 162, 163, 164, 165, 166, + 167, 117, 120, 24, 22, 48, 24, 200, 201, 202, + 111, 198, 247, 111, 25, 110, 391, 4, 119, 117, + 31, 208, 119, 32, 33, 122, 213, 214, 55, 56, + 41, 42, 43, 44, 45, 46, 47, 204, 225, 115, + 117, 96, 97, 230, 27, 28, 226, 3, 4, 3, + 4, 62, 3, 4, 241, 242, 243, 3, 4, 226, + 110, 415, 110, 417, 110, 245, 3, 4, 110, 112, + 4, 4, 115, 113, 117, 118, 4, 120, 245, 246, + 247, 316, 113, 318, 319, 320, 24, 4, 24, 24, + 116, 326, 116, 113, 59, 288, 64, 65, 66, 67, + 68, 69, 70, 335, 336, 337, 338, 339, 340, 20, + 4, 4, 4, 4, 4, 111, 348, 349, 350, 351, + 307, 7, 7, 7, 114, 111, 313, 111, 36, 111, + 41, 42, 43, 44, 45, 46, 47, 115, 111, 50, + 327, 328, 111, 24, 111, 213, 214, 111, 315, 316, + 317, 318, 319, 320, 321, 322, 284, 225, 111, 326, + 24, 111, 230, 111, 111, 114, 398, 111, 113, 34, + 113, 113, 113, 241, 242, 243, 63, 24, 21, 366, + 21, 368, 113, 113, 113, 372, 113, 422, 423, 424, + 357, 113, 113, 111, 381, 382, 383, 111, 111, 111, + 115, 111, 369, 435, 436, 437, 438, 111, 440, 441, + 442, 443, 111, 111, 4, 111, 475, 475, 113, 454, + 387, 24, 111, 111, 4, 412, 413, 36, 111, 57, + 4, 113, 111, 420, 493, 493, 111, 111, 111, 307, + 111, 111, 429, 111, 111, 313, 24, 414, 111, 111, + 482, 111, 484, 485, 111, 422, 423, 424, 114, 327, + 328, 428, 111, 115, 114, 57, 117, 434, 114, 456, + 10, 11, 12, 13, 14, 15, 16, 17, 114, 111, + 114, 111, 111, 114, 21, 36, 21, 454, 114, 114, + 114, 111, 114, 114, 117, 114, 21, 111, 366, 76, + 368, 21, 21, 490, 372, 41, 97, 25, 97, 97, + 97, 358, 122, 381, 382, 383, 503, 61, 198, 52, + 357, 3, 19, 510, 369, 392, 428, 514, 515, -1, + 5, 6, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 412, 413, -1, 22, -1, 24, + -1, 26, 420, -1, 20, -1, 22, -1, 24, -1, + -1, 429, -1, 38, 39, 31, 32, 33, -1, -1, + -1, -1, -1, -1, -1, 41, 42, 43, 44, 45, + 46, 47, -1, -1, 50, 51, -1, -1, 456, -1, + -1, -1, 58, -1, -1, -1, 62, -1, -1, -1, -1, -1, -1, 78, 79, 80, 81, 82, 83, 84, - 85, 86, 87, 88, 89, 90, 91, 455, -1, -1, - -1, -1, 97, -1, 99, 100, 101, 102, -1, 104, - 105, 106, -1, -1, -1, -1, -1, -1, -1, 114, - -1, -1, 117, -1, 119, -1, -1, 122, -1, -1, - -1, 489, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 502, -1, -1, -1, -1, -1, - -1, 509, -1, -1, -1, 513, 514, 5, 6, -1, - 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, - 18, 19, 20, 21, 22, -1, 24, 5, 6, -1, - 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, - 18, 19, 20, 21, 22, -1, 24, -1, -1, -1, - 48, -1, -1, -1, -1, 20, -1, 22, -1, 24, - -1, -1, -1, -1, -1, -1, 31, 32, 33, -1, - 48, 3, 4, 5, 6, 7, 41, 42, 43, 44, - 45, 46, 47, -1, -1, 50, 51, -1, -1, -1, - 22, -1, 24, 58, 26, 27, 28, 62, -1, -1, - -1, -1, -1, -1, -1, -1, 38, 39, -1, -1, - -1, -1, -1, 111, -1, -1, 114, -1, -1, 117, - -1, 119, 120, -1, -1, -1, -1, -1, -1, 61, - -1, -1, -1, 111, -1, -1, 114, -1, -1, 117, - -1, 119, 120, -1, -1, -1, 78, 79, 80, 81, - 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, - -1, -1, -1, -1, -1, 97, -1, 99, 100, 101, - 102, -1, 104, 105, 106, 3, 4, -1, -1, 7, - -1, -1, -1, -1, -1, 117, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 26, 27, - 28, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 38, 39, -1, -1, -1, -1, -1, -1, -1, -1, + 85, 86, 87, 88, 89, 90, 91, 92, -1, -1, + -1, -1, 490, 98, -1, 100, 101, 102, 103, -1, + 105, 106, 107, -1, -1, 503, -1, -1, -1, -1, + 115, -1, 510, 118, -1, 120, 514, 515, 123, 5, + 6, -1, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, -1, 24, 5, + 6, -1, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, -1, 24, -1, + -1, -1, 48, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 61, -1, -1, -1, -1, -1, -1, + -1, -1, 48, 3, 4, 5, 6, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, - 88, 89, 90, 91, -1, -1, -1, -1, -1, 97, - -1, 99, 100, 101, 102, -1, 104, 105, 106, -1, - -1, -1, -1, -1, -1, -1, -1, 5, 6, 117, - 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, 37, - -1, -1, -1, -1, -1, -1, -1, -1, 5, 6, - 48, 8, 9, 10, 11, 12, 13, 14, 15, 16, - 17, 18, 19, 20, 21, 22, -1, 24, -1, -1, + -1, -1, 22, -1, 24, -1, 26, 27, 28, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 38, 39, + -1, -1, -1, -1, -1, -1, 112, -1, -1, 115, + -1, -1, 118, -1, 120, 121, -1, -1, -1, -1, + -1, 61, -1, -1, -1, -1, 112, -1, -1, 115, + -1, -1, 118, -1, 120, 121, -1, -1, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, + 90, 91, 92, -1, -1, -1, -1, -1, 98, -1, + 100, 101, 102, 103, -1, 105, 106, 107, 3, 4, + -1, -1, 7, -1, -1, -1, -1, -1, 118, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 37, -1, -1, -1, -1, -1, -1, -1, -1, 5, - 6, 48, 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, -1, 24, -1, - -1, -1, -1, 111, -1, -1, 114, -1, -1, 117, - -1, 119, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 48, 5, 6, -1, 8, 9, 10, 11, + -1, 26, 27, 28, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 38, 39, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 61, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 78, 79, 80, 81, 82, 83, 84, + 85, 86, 87, 88, 89, 90, 91, 92, -1, -1, + -1, -1, -1, 98, -1, 100, 101, 102, 103, -1, + 105, 106, 107, -1, -1, -1, -1, -1, -1, -1, + -1, 5, 6, 118, 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, 37, -1, -1, -1, -1, -1, -1, + -1, -1, 5, 6, 48, 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, 37, -1, -1, -1, -1, -1, + -1, -1, -1, 5, 6, 48, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, - 22, -1, 24, -1, 111, -1, -1, 114, -1, -1, - 117, -1, 119, -1, -1, 37, -1, -1, -1, -1, + 22, -1, 24, -1, -1, -1, -1, -1, 112, -1, + -1, 115, -1, -1, 118, 37, 120, -1, -1, -1, -1, -1, -1, -1, 5, 6, 48, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, - 21, 22, -1, 24, -1, 111, -1, -1, 114, -1, - 116, 117, -1, 119, -1, -1, 37, -1, -1, -1, + 21, 22, -1, 24, -1, -1, -1, -1, -1, 112, + -1, -1, 115, -1, -1, 118, 37, 120, -1, -1, -1, -1, -1, -1, -1, 5, 6, 48, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, - 20, 21, 22, -1, 24, -1, -1, -1, -1, 111, - -1, -1, 114, -1, -1, 117, -1, 119, -1, -1, + 20, 21, 22, -1, 24, -1, -1, -1, -1, -1, + 112, -1, -1, 115, -1, -1, 118, -1, 120, -1, -1, -1, -1, -1, -1, -1, 5, 6, 48, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, -1, 24, -1, -1, -1, -1, - 111, -1, -1, 114, -1, -1, 117, -1, 119, -1, + -1, 112, -1, -1, 115, -1, -1, 118, -1, 120, -1, -1, -1, -1, -1, -1, -1, 5, 6, 48, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, -1, 24, -1, -1, -1, - -1, 111, -1, -1, 114, -1, -1, 117, -1, 119, - -1, -1, -1, -1, -1, -1, -1, -1, 5, 6, + -1, -1, 112, -1, -1, 115, -1, -1, 118, -1, + 120, -1, -1, -1, -1, -1, -1, -1, 5, 6, 48, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, -1, 24, -1, -1, - -1, -1, 111, -1, -1, 114, -1, -1, 117, -1, - 119, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 112, -1, -1, 115, -1, -1, 118, + -1, 120, -1, -1, -1, -1, -1, -1, -1, -1, -1, 48, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 111, -1, -1, 114, -1, -1, 117, - -1, 119, -1, -1, -1, -1, 35, -1, -1, -1, + -1, -1, -1, -1, 112, -1, -1, 115, -1, -1, + 118, -1, 120, -1, -1, -1, -1, 35, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 49, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 59, 60, -1, -1, 111, -1, -1, 114, -1, -1, - 117, -1, 119, 72, 73, 74, 75, 76, 77, 78, - 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, - 89, 90, 91, 92, 93, 94, -1, -1, 97, 98, - 99, 100, 101, 102, 103, 104, 105, 106, 107, 108 + -1, 49, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 59, 60, -1, -1, 112, -1, -1, 115, -1, + -1, 118, -1, 120, 72, 73, 74, 75, 76, 77, + 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, + 88, 89, 90, 91, 92, 93, 94, 95, -1, -1, + 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, + 108, 109 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ static const unsigned char yystos[] = { - 0, 154, 155, 156, 0, 25, 31, 41, 42, 43, - 44, 45, 46, 47, 62, 135, 173, 175, 177, 184, - 22, 24, 51, 58, 62, 134, 166, 177, 178, 61, - 64, 65, 66, 67, 68, 69, 70, 136, 171, 23, - 185, 186, 30, 120, 174, 185, 52, 53, 54, 71, - 163, 109, 61, 20, 45, 47, 50, 135, 109, 45, - 47, 176, 24, 161, 4, 5, 6, 8, 9, 10, + 0, 155, 156, 157, 0, 25, 31, 41, 42, 43, + 44, 45, 46, 47, 62, 136, 174, 176, 178, 185, + 22, 24, 51, 58, 62, 135, 167, 178, 179, 61, + 64, 65, 66, 67, 68, 69, 70, 137, 172, 23, + 186, 187, 30, 121, 175, 186, 52, 53, 54, 71, + 164, 110, 61, 20, 45, 47, 50, 136, 110, 45, + 47, 177, 24, 162, 4, 5, 6, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, - 21, 48, 111, 114, 117, 119, 124, 143, 144, 145, - 146, 147, 166, 181, 29, 119, 172, 134, 189, 109, - 109, 109, 109, 114, 164, 161, 143, 32, 33, 153, - 153, 153, 153, 171, 4, 4, 4, 8, 120, 147, - 148, 166, 112, 121, 35, 49, 59, 60, 72, 73, + 21, 48, 112, 115, 118, 120, 125, 144, 145, 146, + 147, 148, 167, 182, 29, 120, 173, 135, 190, 110, + 110, 110, 110, 115, 165, 162, 144, 32, 33, 154, + 154, 154, 154, 172, 4, 4, 4, 8, 121, 148, + 149, 167, 113, 122, 35, 49, 59, 60, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, - 94, 97, 98, 99, 100, 101, 102, 103, 104, 105, - 106, 107, 108, 126, 127, 128, 129, 187, 193, 194, - 196, 197, 24, 55, 56, 162, 4, 24, 24, 165, - 145, 145, 145, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 130, 131, 133, 145, 150, 115, - 115, 110, 120, 112, 37, 148, 149, 145, 183, 59, - 8, 183, 9, 21, 10, 11, 12, 13, 14, 15, - 16, 17, 130, 131, 132, 136, 145, 145, 183, 145, - 145, 190, 183, 183, 183, 183, 183, 183, 183, 183, - 145, 145, 145, 183, 136, 95, 96, 110, 116, 159, - 160, 158, 27, 28, 3, 4, 125, 4, 7, 26, - 38, 39, 97, 99, 100, 104, 105, 106, 114, 117, - 119, 122, 126, 127, 128, 129, 151, 181, 157, 147, - 147, 147, 37, 145, 168, 169, 170, 110, 113, 3, - 4, 7, 26, 27, 28, 38, 39, 61, 117, 151, - 180, 181, 182, 182, 182, 182, 143, 110, 138, 110, - 138, 182, 114, 110, 36, 110, 110, 110, 110, 110, - 110, 110, 182, 182, 182, 110, 143, 145, 183, 24, - 110, 141, 141, 141, 112, 112, 112, 112, 112, 112, - 116, 150, 152, 152, 120, 152, 24, 112, 112, 112, - 112, 141, 116, 118, 166, 167, 110, 113, 37, 63, - 179, 152, 110, 110, 182, 15, 57, 15, 110, 195, - 182, 114, 145, 183, 145, 183, 183, 183, 145, 145, - 110, 110, 110, 183, 182, 182, 110, 34, 57, 139, - 142, 150, 150, 150, 150, 150, 150, 110, 116, 118, - 120, 150, 150, 150, 150, 37, 168, 139, 140, 24, - 118, 21, 21, 112, 182, 4, 182, 183, 191, 110, - 182, 110, 110, 110, 182, 182, 182, 112, 145, 24, - 4, 141, 195, 36, 110, 110, 110, 110, 150, 110, - 110, 110, 110, 57, 137, 110, 182, 182, 191, 192, - 110, 138, 138, 110, 182, 110, 183, 183, 183, 192, - 182, 113, 145, 150, 150, 150, 150, 150, 150, 150, - 150, 4, 24, 110, 114, 113, 183, 116, 182, 113, - 113, 110, 113, 110, 110, 113, 113, 113, 113, 21, - 116, 132, 188, 36, 116, 150, 150, 150, 182, 180, - 116, 132, 21, 113, 113, 113, 110, 180, 182, 21, - 110, 76, 182, 21, 21, 182, 182 + 94, 95, 98, 99, 100, 101, 102, 103, 104, 105, + 106, 107, 108, 109, 127, 128, 129, 130, 188, 194, + 195, 197, 198, 24, 55, 56, 163, 4, 24, 24, + 166, 146, 146, 146, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 131, 132, 134, 146, 151, + 116, 116, 111, 121, 113, 37, 149, 150, 146, 184, + 59, 8, 184, 9, 21, 10, 11, 12, 13, 14, + 15, 16, 17, 131, 132, 133, 137, 146, 146, 184, + 146, 146, 191, 184, 184, 184, 184, 184, 184, 184, + 184, 146, 146, 146, 184, 137, 96, 97, 111, 117, + 160, 161, 159, 27, 28, 3, 4, 126, 4, 7, + 26, 38, 39, 98, 100, 101, 105, 106, 107, 115, + 118, 120, 123, 127, 128, 129, 130, 152, 182, 158, + 148, 148, 148, 37, 146, 169, 170, 171, 111, 114, + 3, 4, 7, 26, 27, 28, 38, 39, 61, 118, + 152, 181, 182, 183, 183, 183, 183, 144, 111, 139, + 111, 139, 183, 115, 111, 36, 111, 111, 111, 111, + 111, 111, 111, 183, 183, 183, 111, 144, 146, 184, + 24, 111, 142, 142, 142, 113, 113, 113, 113, 113, + 113, 117, 151, 153, 153, 121, 153, 24, 113, 113, + 113, 113, 142, 117, 119, 167, 168, 111, 114, 37, + 63, 180, 153, 111, 111, 183, 15, 57, 15, 111, + 196, 183, 115, 146, 184, 146, 184, 184, 184, 146, + 146, 111, 111, 111, 184, 183, 183, 111, 34, 57, + 140, 143, 151, 151, 151, 151, 151, 151, 111, 117, + 119, 121, 151, 151, 151, 151, 37, 169, 140, 141, + 24, 119, 21, 21, 113, 183, 4, 183, 184, 192, + 111, 183, 111, 111, 111, 183, 183, 183, 113, 146, + 24, 4, 142, 196, 36, 111, 111, 111, 111, 151, + 111, 111, 111, 111, 57, 138, 111, 183, 183, 192, + 193, 111, 139, 139, 111, 183, 111, 184, 184, 184, + 193, 183, 114, 146, 151, 151, 151, 151, 151, 151, + 151, 151, 4, 24, 111, 115, 114, 184, 117, 183, + 114, 114, 111, 114, 111, 111, 114, 114, 114, 114, + 21, 117, 133, 189, 36, 117, 151, 151, 151, 183, + 181, 117, 133, 21, 114, 114, 114, 111, 181, 183, + 21, 111, 76, 183, 21, 21, 183, 183 }; #define yyerrok (yyerrstatus = 0) @@ -2955,7 +2969,7 @@ switch (yyn) { case 3: -#line 1098 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1115 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[0].UIntVal) > (uint32_t)INT32_MAX) // Outside of my range! GEN_ERROR("Value too large for type!"); @@ -2965,7 +2979,7 @@ break; case 5: -#line 1107 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1124 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[0].UInt64Val) > (uint64_t)INT64_MAX) // Outside of my range! GEN_ERROR("Value too large for type!"); @@ -2974,99 +2988,99 @@ ;} break; - case 34: -#line 1131 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 35: +#line 1148 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.StrVal) = (yyvsp[-1].StrVal); CHECK_FOR_ERROR ;} break; - case 35: -#line 1135 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 36: +#line 1152 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.StrVal) = 0; CHECK_FOR_ERROR ;} break; - case 36: -#line 1140 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 37: +#line 1157 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::InternalLinkage; ;} break; - case 37: -#line 1141 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 38: +#line 1158 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::LinkOnceLinkage; ;} break; - case 38: -#line 1142 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 39: +#line 1159 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::WeakLinkage; ;} break; - case 39: -#line 1143 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 40: +#line 1160 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::AppendingLinkage; ;} break; - case 40: -#line 1144 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 41: +#line 1161 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::DLLImportLinkage; ;} break; - case 41: -#line 1145 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 42: +#line 1162 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::DLLExportLinkage; ;} break; - case 42: -#line 1146 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 43: +#line 1163 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::ExternalWeakLinkage; ;} break; - case 43: -#line 1147 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 44: +#line 1164 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::ExternalLinkage; ;} break; - case 44: -#line 1149 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 45: +#line 1166 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = CallingConv::C; ;} break; - case 45: -#line 1150 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 46: +#line 1167 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = CallingConv::C; ;} break; - case 46: -#line 1151 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 47: +#line 1168 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = CallingConv::CSRet; ;} break; - case 47: -#line 1152 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 48: +#line 1169 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = CallingConv::Fast; ;} break; - case 48: -#line 1153 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 49: +#line 1170 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = CallingConv::Cold; ;} break; - case 49: -#line 1154 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 50: +#line 1171 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = CallingConv::X86_StdCall; ;} break; - case 50: -#line 1155 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 51: +#line 1172 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = CallingConv::X86_FastCall; ;} break; - case 51: -#line 1156 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 52: +#line 1173 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { if ((unsigned)(yyvsp[0].UInt64Val) != (yyvsp[0].UInt64Val)) GEN_ERROR("Calling conv too large!"); @@ -3075,13 +3089,13 @@ ;} break; - case 52: -#line 1165 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 53: +#line 1182 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = 0; ;} break; - case 53: -#line 1166 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 54: +#line 1183 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = (yyvsp[0].UInt64Val); if ((yyval.UIntVal) != 0 && !isPowerOf2_32((yyval.UIntVal))) @@ -3090,13 +3104,13 @@ ;} break; - case 54: -#line 1172 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 55: +#line 1189 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = 0; ;} break; - case 55: -#line 1173 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 56: +#line 1190 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = (yyvsp[0].UInt64Val); if ((yyval.UIntVal) != 0 && !isPowerOf2_32((yyval.UIntVal))) @@ -3105,8 +3119,8 @@ ;} break; - case 56: -#line 1181 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 57: +#line 1198 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { for (unsigned i = 0, e = strlen((yyvsp[0].StrVal)); i != e; ++i) if ((yyvsp[0].StrVal)[i] == '"' || (yyvsp[0].StrVal)[i] == '\\') @@ -3116,28 +3130,28 @@ ;} break; - case 57: -#line 1189 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 58: +#line 1206 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.StrVal) = 0; ;} break; - case 58: -#line 1190 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 59: +#line 1207 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.StrVal) = (yyvsp[0].StrVal); ;} break; - case 59: -#line 1195 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 60: +#line 1212 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" {;} break; - case 60: -#line 1196 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 61: +#line 1213 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" {;} break; - case 61: -#line 1197 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 62: +#line 1214 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { CurGV->setSection((yyvsp[0].StrVal)); free((yyvsp[0].StrVal)); @@ -3145,8 +3159,8 @@ ;} break; - case 62: -#line 1202 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 63: +#line 1219 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[0].UInt64Val) != 0 && !isPowerOf2_32((yyvsp[0].UInt64Val))) GEN_ERROR("Alignment must be a power of two!"); @@ -3155,18 +3169,18 @@ ;} break; - case 64: -#line 1216 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 65: +#line 1233 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeVal) = new PATypeHolder((yyvsp[0].PrimType)); ;} break; - case 66: -#line 1217 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 67: +#line 1234 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeVal) = new PATypeHolder((yyvsp[0].PrimType)); ;} break; - case 67: -#line 1219 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 68: +#line 1236 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[0].TypeVal))->getDescription()); @@ -3175,24 +3189,24 @@ ;} break; - case 81: -#line 1231 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 82: +#line 1248 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeVal) = new PATypeHolder(OpaqueType::get()); CHECK_FOR_ERROR ;} break; - case 82: -#line 1235 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 83: +#line 1252 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeVal) = new PATypeHolder((yyvsp[0].PrimType)); CHECK_FOR_ERROR ;} break; - case 83: -#line 1239 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 84: +#line 1256 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { // Named types are also simple types... const Type* tmp = getTypeVal((yyvsp[0].ValIDVal)); CHECK_FOR_ERROR @@ -3200,8 +3214,8 @@ ;} break; - case 84: -#line 1247 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 85: +#line 1264 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { // Type UpReference if ((yyvsp[0].UInt64Val) > (uint64_t)~0U) GEN_ERROR("Value out of range!"); OpaqueType *OT = OpaqueType::get(); // Use temporary placeholder @@ -3212,8 +3226,8 @@ ;} break; - case 85: -#line 1255 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 86: +#line 1272 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { // Function derived type? std::vector Params; for (std::list::iterator I = (yyvsp[-1].TypeList)->begin(), @@ -3229,8 +3243,8 @@ ;} break; - case 86: -#line 1268 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 87: +#line 1285 "/proj/llvm/llvm2/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); @@ -3238,8 +3252,8 @@ ;} break; - case 87: -#line 1273 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 88: +#line 1290 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { // Packed array type? const llvm::Type* ElemTy = (yyvsp[-1].TypeVal)->get(); if ((unsigned)(yyvsp[-3].UInt64Val) != (yyvsp[-3].UInt64Val)) @@ -3254,8 +3268,8 @@ ;} break; - case 88: -#line 1285 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 89: +#line 1302 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { // Structure type? std::vector Elements; for (std::list::iterator I = (yyvsp[-1].TypeList)->begin(), @@ -3268,16 +3282,16 @@ ;} break; - case 89: -#line 1295 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 90: +#line 1312 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { // Empty structure type? (yyval.TypeVal) = new PATypeHolder(StructType::get(std::vector())); CHECK_FOR_ERROR ;} break; - case 90: -#line 1299 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 91: +#line 1316 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { // Pointer type? if (*(yyvsp[-1].TypeVal) == Type::LabelTy) GEN_ERROR("Cannot form a pointer to a basic block"); @@ -3287,8 +3301,8 @@ ;} break; - case 91: -#line 1310 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 92: +#line 1327 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeList) = new std::list(); (yyval.TypeList)->push_back(*(yyvsp[0].TypeVal)); delete (yyvsp[0].TypeVal); @@ -3296,40 +3310,40 @@ ;} break; - case 92: -#line 1315 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 93: +#line 1332 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { ((yyval.TypeList)=(yyvsp[-2].TypeList))->push_back(*(yyvsp[0].TypeVal)); delete (yyvsp[0].TypeVal); CHECK_FOR_ERROR ;} break; - case 94: -#line 1322 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 95: +#line 1339 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { ((yyval.TypeList)=(yyvsp[-2].TypeList))->push_back(Type::VoidTy); CHECK_FOR_ERROR ;} break; - case 95: -#line 1326 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 96: +#line 1343 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { ((yyval.TypeList) = new std::list())->push_back(Type::VoidTy); CHECK_FOR_ERROR ;} break; - case 96: -#line 1330 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 97: +#line 1347 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeList) = new std::list(); CHECK_FOR_ERROR ;} break; - case 97: -#line 1341 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 98: +#line 1358 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { // Nonempty unsized arr const ArrayType *ATy = dyn_cast((yyvsp[-3].TypeVal)->get()); if (ATy == 0) @@ -3358,8 +3372,8 @@ ;} break; - case 98: -#line 1367 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 99: +#line 1384 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { const ArrayType *ATy = dyn_cast((yyvsp[-2].TypeVal)->get()); if (ATy == 0) @@ -3376,8 +3390,8 @@ ;} break; - case 99: -#line 1381 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 100: +#line 1398 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { const ArrayType *ATy = dyn_cast((yyvsp[-2].TypeVal)->get()); if (ATy == 0) @@ -3410,8 +3424,8 @@ ;} break; - case 100: -#line 1411 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 101: +#line 1428 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { // Nonempty unsized arr const PackedType *PTy = dyn_cast((yyvsp[-3].TypeVal)->get()); if (PTy == 0) @@ -3440,8 +3454,8 @@ ;} break; - case 101: -#line 1437 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 102: +#line 1454 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { const StructType *STy = dyn_cast((yyvsp[-3].TypeVal)->get()); if (STy == 0) @@ -3465,8 +3479,8 @@ ;} break; - case 102: -#line 1458 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 103: +#line 1475 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { const StructType *STy = dyn_cast((yyvsp[-2].TypeVal)->get()); if (STy == 0) @@ -3482,8 +3496,8 @@ ;} break; - case 103: -#line 1471 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 104: +#line 1488 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { const PointerType *PTy = dyn_cast((yyvsp[-1].TypeVal)->get()); if (PTy == 0) @@ -3496,8 +3510,8 @@ ;} break; - case 104: -#line 1481 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 105: +#line 1498 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.ConstVal) = UndefValue::get((yyvsp[-1].TypeVal)->get()); delete (yyvsp[-1].TypeVal); @@ -3505,8 +3519,8 @@ ;} break; - case 105: -#line 1486 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 106: +#line 1503 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { const PointerType *Ty = dyn_cast((yyvsp[-1].TypeVal)->get()); if (Ty == 0) @@ -3570,8 +3584,8 @@ ;} break; - case 106: -#line 1547 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 107: +#line 1564 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[-1].TypeVal)->get() != (yyvsp[0].ConstVal)->getType()) GEN_ERROR("Mismatched types for constant expression!"); @@ -3581,8 +3595,8 @@ ;} break; - case 107: -#line 1554 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 108: +#line 1571 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { const Type *Ty = (yyvsp[-1].TypeVal)->get(); if (isa(Ty) || Ty == Type::LabelTy || isa(Ty)) @@ -3593,8 +3607,8 @@ ;} break; - case 108: -#line 1563 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 109: +#line 1580 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { // integral constants if (!ConstantInt::isValueValidForType((yyvsp[-1].PrimType), (yyvsp[0].SInt64Val))) GEN_ERROR("Constant value doesn't fit in type!"); @@ -3603,8 +3617,8 @@ ;} break; - case 109: -#line 1569 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 110: +#line 1586 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { // integral constants if (!ConstantInt::isValueValidForType((yyvsp[-1].PrimType), (yyvsp[0].UInt64Val))) GEN_ERROR("Constant value doesn't fit in type!"); @@ -3613,24 +3627,24 @@ ;} break; - case 110: -#line 1575 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 111: +#line 1592 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { // Boolean constants (yyval.ConstVal) = ConstantBool::getTrue(); CHECK_FOR_ERROR ;} break; - case 111: -#line 1579 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 112: +#line 1596 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { // Boolean constants (yyval.ConstVal) = ConstantBool::getFalse(); CHECK_FOR_ERROR ;} break; - case 112: -#line 1583 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 113: +#line 1600 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { // Float & Double constants if (!ConstantFP::isValueValidForType((yyvsp[-1].PrimType), (yyvsp[0].FPVal))) GEN_ERROR("Floating point constant invalid for type!!"); @@ -3639,8 +3653,8 @@ ;} break; - case 113: -#line 1591 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 114: +#line 1608 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { if (!(yyvsp[-3].ConstVal)->getType()->isFirstClassType()) GEN_ERROR("cast constant expression from a non-primitive type: '" + @@ -3654,8 +3668,8 @@ ;} break; - case 114: -#line 1602 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 115: +#line 1619 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { if (!isa((yyvsp[-2].ConstVal)->getType())) GEN_ERROR("GetElementPtr requires a pointer operand!"); @@ -3690,8 +3704,8 @@ ;} break; - case 115: -#line 1634 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 116: +#line 1651 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[-5].ConstVal)->getType() != Type::BoolTy) GEN_ERROR("Select condition must be of boolean type!"); @@ -3702,17 +3716,19 @@ ;} break; - case 116: -#line 1642 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 117: +#line 1659 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[-3].ConstVal)->getType() != (yyvsp[-1].ConstVal)->getType()) GEN_ERROR("Binary operator types must match!"); + sanitizeOpCode((yyvsp[-5].BinaryOpVal),(yyvsp[-3].ConstVal)->getType()); + CHECK_FOR_ERROR; // HACK: llvm 1.3 and earlier used to emit invalid pointer constant exprs. // To retain backward compatibility with these early compilers, we emit a // cast to the appropriate integer type automatically if we are in the // broken case. See PR424 for more information. if (!isa((yyvsp[-3].ConstVal)->getType())) { - (yyval.ConstVal) = ConstantExpr::get((yyvsp[-5].BinaryOpVal), (yyvsp[-3].ConstVal), (yyvsp[-1].ConstVal)); + (yyval.ConstVal) = ConstantExpr::get((yyvsp[-5].BinaryOpVal).opcode, (yyvsp[-3].ConstVal), (yyvsp[-1].ConstVal)); } else { const Type *IntPtrTy = 0; switch (CurModule.CurrentModule->getPointerSize()) { @@ -3720,7 +3736,7 @@ case Module::Pointer64: IntPtrTy = Type::LongTy; break; default: GEN_ERROR("invalid pointer binary constant expr!"); } - (yyval.ConstVal) = ConstantExpr::get((yyvsp[-5].BinaryOpVal), ConstantExpr::getCast((yyvsp[-3].ConstVal), IntPtrTy), + (yyval.ConstVal) = ConstantExpr::get((yyvsp[-5].BinaryOpVal).opcode, ConstantExpr::getCast((yyvsp[-3].ConstVal), IntPtrTy), ConstantExpr::getCast((yyvsp[-1].ConstVal), IntPtrTy)); (yyval.ConstVal) = ConstantExpr::getCast((yyval.ConstVal), (yyvsp[-3].ConstVal)->getType()); } @@ -3728,8 +3744,8 @@ ;} break; - case 117: -#line 1664 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 118: +#line 1683 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[-3].ConstVal)->getType() != (yyvsp[-1].ConstVal)->getType()) GEN_ERROR("Logical operator types must match!"); @@ -3738,35 +3754,35 @@ !cast((yyvsp[-3].ConstVal)->getType())->getElementType()->isIntegral()) GEN_ERROR("Logical operator requires integral operands!"); } - (yyval.ConstVal) = ConstantExpr::get((yyvsp[-5].BinaryOpVal), (yyvsp[-3].ConstVal), (yyvsp[-1].ConstVal)); + (yyval.ConstVal) = ConstantExpr::get((yyvsp[-5].BinaryOpVal).opcode, (yyvsp[-3].ConstVal), (yyvsp[-1].ConstVal)); CHECK_FOR_ERROR ;} break; - case 118: -#line 1675 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 119: +#line 1694 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[-3].ConstVal)->getType() != (yyvsp[-1].ConstVal)->getType()) GEN_ERROR("setcc operand types must match!"); - (yyval.ConstVal) = ConstantExpr::get((yyvsp[-5].BinaryOpVal), (yyvsp[-3].ConstVal), (yyvsp[-1].ConstVal)); + (yyval.ConstVal) = ConstantExpr::get((yyvsp[-5].BinaryOpVal).opcode, (yyvsp[-3].ConstVal), (yyvsp[-1].ConstVal)); CHECK_FOR_ERROR ;} break; - case 119: -#line 1681 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 120: +#line 1700 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[-1].ConstVal)->getType() != Type::UByteTy) GEN_ERROR("Shift count for shift constant must be unsigned byte!"); if (!(yyvsp[-3].ConstVal)->getType()->isInteger()) GEN_ERROR("Shift constant expression requires integer operand!"); - (yyval.ConstVal) = ConstantExpr::get((yyvsp[-5].OtherOpVal), (yyvsp[-3].ConstVal), (yyvsp[-1].ConstVal)); + (yyval.ConstVal) = ConstantExpr::get((yyvsp[-5].OtherOpVal).opcode, (yyvsp[-3].ConstVal), (yyvsp[-1].ConstVal)); CHECK_FOR_ERROR ;} break; - case 120: -#line 1689 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 121: +#line 1708 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { if (!ExtractElementInst::isValidOperands((yyvsp[-3].ConstVal), (yyvsp[-1].ConstVal))) GEN_ERROR("Invalid extractelement operands!"); @@ -3775,8 +3791,8 @@ ;} break; - case 121: -#line 1695 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 122: +#line 1714 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { if (!InsertElementInst::isValidOperands((yyvsp[-5].ConstVal), (yyvsp[-3].ConstVal), (yyvsp[-1].ConstVal))) GEN_ERROR("Invalid insertelement operands!"); @@ -3785,8 +3801,8 @@ ;} break; - case 122: -#line 1701 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 123: +#line 1720 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { if (!ShuffleVectorInst::isValidOperands((yyvsp[-5].ConstVal), (yyvsp[-3].ConstVal), (yyvsp[-1].ConstVal))) GEN_ERROR("Invalid shufflevector operands!"); @@ -3795,16 +3811,16 @@ ;} break; - case 123: -#line 1710 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 124: +#line 1729 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { ((yyval.ConstVector) = (yyvsp[-2].ConstVector))->push_back((yyvsp[0].ConstVal)); CHECK_FOR_ERROR ;} break; - case 124: -#line 1714 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 125: +#line 1733 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.ConstVector) = new std::vector(); (yyval.ConstVector)->push_back((yyvsp[0].ConstVal)); @@ -3812,18 +3828,18 @@ ;} break; - case 125: -#line 1722 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 126: +#line 1741 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = false; ;} break; - case 126: -#line 1722 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 127: +#line 1741 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = true; ;} break; - case 127: -#line 1732 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 128: +#line 1751 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.ModuleVal) = ParserResult = (yyvsp[0].ModuleVal); CurModule.ModuleDone(); @@ -3831,8 +3847,8 @@ ;} break; - case 128: -#line 1740 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 129: +#line 1759 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.ModuleVal) = (yyvsp[-1].ModuleVal); CurFun.FunctionDone(); @@ -3840,32 +3856,32 @@ ;} break; - case 129: -#line 1745 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 130: +#line 1764 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.ModuleVal) = (yyvsp[-1].ModuleVal); CHECK_FOR_ERROR ;} break; - case 130: -#line 1749 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 131: +#line 1768 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.ModuleVal) = (yyvsp[-3].ModuleVal); CHECK_FOR_ERROR ;} break; - case 131: -#line 1753 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 132: +#line 1772 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.ModuleVal) = (yyvsp[-1].ModuleVal); CHECK_FOR_ERROR ;} break; - case 132: -#line 1757 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 133: +#line 1776 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.ModuleVal) = CurModule.CurrentModule; // Emit an error if there are any unresolved types left. @@ -3881,8 +3897,8 @@ ;} break; - case 133: -#line 1772 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 134: +#line 1791 "/proj/llvm/llvm2/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: @@ -3907,22 +3923,22 @@ ;} break; - case 134: -#line 1794 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 135: +#line 1813 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { // Function prototypes can be in const pool CHECK_FOR_ERROR ;} break; - case 135: -#line 1797 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 136: +#line 1816 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { // Asm blocks can be in the const pool CHECK_FOR_ERROR ;} break; - case 136: -#line 1800 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 137: +#line 1819 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[0].ConstVal) == 0) GEN_ERROR("Global value initializer is not a constant!"); @@ -3931,15 +3947,15 @@ ;} break; - case 137: -#line 1805 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 138: +#line 1824 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { CurGV = 0; ;} break; - case 138: -#line 1808 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 139: +#line 1827 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { CurGV = ParseGlobalVariable((yyvsp[-3].StrVal), GlobalValue::ExternalLinkage, (yyvsp[-1].BoolVal), *(yyvsp[0].TypeVal), 0); CHECK_FOR_ERROR @@ -3947,16 +3963,16 @@ ;} break; - case 139: -#line 1812 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 140: +#line 1831 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { CurGV = 0; CHECK_FOR_ERROR ;} break; - case 140: -#line 1816 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 141: +#line 1835 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { CurGV = ParseGlobalVariable((yyvsp[-3].StrVal), GlobalValue::DLLImportLinkage, (yyvsp[-1].BoolVal), *(yyvsp[0].TypeVal), 0); CHECK_FOR_ERROR @@ -3964,16 +3980,16 @@ ;} break; - case 141: -#line 1820 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 142: +#line 1839 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { CurGV = 0; CHECK_FOR_ERROR ;} break; - case 142: -#line 1824 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 143: +#line 1843 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { CurGV = ParseGlobalVariable((yyvsp[-3].StrVal), GlobalValue::ExternalWeakLinkage, (yyvsp[-1].BoolVal), *(yyvsp[0].TypeVal), 0); @@ -3982,36 +3998,36 @@ ;} break; - case 143: -#line 1829 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 144: +#line 1848 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { CurGV = 0; CHECK_FOR_ERROR ;} break; - case 144: -#line 1833 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 145: +#line 1852 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { CHECK_FOR_ERROR ;} break; - case 145: -#line 1836 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 146: +#line 1855 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { CHECK_FOR_ERROR ;} break; - case 146: -#line 1839 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 147: +#line 1858 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { ;} break; - case 147: -#line 1843 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 148: +#line 1862 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { const std::string &AsmSoFar = CurModule.CurrentModule->getModuleInlineAsm(); char *EndStr = UnEscapeLexed((yyvsp[0].StrVal), true); @@ -4026,26 +4042,26 @@ ;} break; - case 148: -#line 1856 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 149: +#line 1875 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.Endianness) = Module::BigEndian; ;} break; - case 149: -#line 1857 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 150: +#line 1876 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.Endianness) = Module::LittleEndian; ;} break; - case 150: -#line 1859 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 151: +#line 1878 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { CurModule.CurrentModule->setEndianness((yyvsp[0].Endianness)); CHECK_FOR_ERROR ;} break; - case 151: -#line 1863 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 152: +#line 1882 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[0].UInt64Val) == 32) CurModule.CurrentModule->setPointerSize(Module::Pointer32); @@ -4057,8 +4073,8 @@ ;} break; - case 152: -#line 1872 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 153: +#line 1891 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { CurModule.CurrentModule->setTargetTriple((yyvsp[0].StrVal)); free((yyvsp[0].StrVal)); @@ -4066,8 +4082,8 @@ ;} break; - case 153: -#line 1877 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 154: +#line 1896 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { CurModule.CurrentModule->setDataLayout((yyvsp[0].StrVal)); free((yyvsp[0].StrVal)); @@ -4075,8 +4091,8 @@ ;} break; - case 155: -#line 1885 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 156: +#line 1904 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { CurModule.CurrentModule->addLibrary((yyvsp[0].StrVal)); free((yyvsp[0].StrVal)); @@ -4084,8 +4100,8 @@ ;} break; - case 156: -#line 1890 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 157: +#line 1909 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { CurModule.CurrentModule->addLibrary((yyvsp[0].StrVal)); free((yyvsp[0].StrVal)); @@ -4093,20 +4109,20 @@ ;} break; - case 157: -#line 1895 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 158: +#line 1914 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { CHECK_FOR_ERROR ;} break; - case 161: -#line 1905 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 162: +#line 1924 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.StrVal) = 0; ;} break; - case 162: -#line 1907 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 163: +#line 1926 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { if (*(yyvsp[-1].TypeVal) == Type::VoidTy) GEN_ERROR("void typed arguments are invalid!"); @@ -4115,8 +4131,8 @@ ;} break; - case 163: -#line 1914 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 164: +#line 1933 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.ArgList) = (yyvsp[-2].ArgList); (yyvsp[-2].ArgList)->push_back(*(yyvsp[0].ArgVal)); @@ -4125,8 +4141,8 @@ ;} break; - case 164: -#line 1920 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 165: +#line 1939 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.ArgList) = new std::vector >(); (yyval.ArgList)->push_back(*(yyvsp[0].ArgVal)); @@ -4135,16 +4151,16 @@ ;} break; - case 165: -#line 1927 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 166: +#line 1946 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.ArgList) = (yyvsp[0].ArgList); CHECK_FOR_ERROR ;} break; - case 166: -#line 1931 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 167: +#line 1950 "/proj/llvm/llvm2/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)); @@ -4162,16 +4178,16 @@ ;} break; - case 168: -#line 1942 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 169: +#line 1961 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.ArgList) = 0; CHECK_FOR_ERROR ;} break; - case 169: -#line 1948 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 170: +#line 1967 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { UnEscapeLexed((yyvsp[-5].StrVal)); std::string FunctionName((yyvsp[-5].StrVal)); @@ -4267,8 +4283,8 @@ ;} break; - case 172: -#line 2044 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 173: +#line 2063 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.FunctionVal) = CurFun.CurrentFunction; @@ -4278,31 +4294,31 @@ ;} break; - case 175: -#line 2054 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 176: +#line 2073 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.FunctionVal) = (yyvsp[-1].FunctionVal); CHECK_FOR_ERROR ;} break; - case 177: -#line 2060 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 178: +#line 2079 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { CurFun.Linkage = GlobalValue::DLLImportLinkage ;} break; - case 178: -#line 2061 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 179: +#line 2080 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { CurFun.Linkage = GlobalValue::DLLImportLinkage ;} break; - case 179: -#line 2063 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 180: +#line 2082 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { CurFun.isDeclare = true; ;} break; - case 180: -#line 2063 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 181: +#line 2082 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.FunctionVal) = CurFun.CurrentFunction; CurFun.FunctionDone(); @@ -4310,88 +4326,88 @@ ;} break; - case 181: -#line 2073 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 182: +#line 2092 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = false; CHECK_FOR_ERROR ;} break; - case 182: -#line 2077 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 183: +#line 2096 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = true; CHECK_FOR_ERROR ;} break; - case 183: -#line 2082 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 184: +#line 2101 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { // A reference to a direct constant (yyval.ValIDVal) = ValID::create((yyvsp[0].SInt64Val)); CHECK_FOR_ERROR ;} break; - case 184: -#line 2086 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 185: +#line 2105 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.ValIDVal) = ValID::create((yyvsp[0].UInt64Val)); CHECK_FOR_ERROR ;} break; - case 185: -#line 2090 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 186: +#line 2109 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { // Perhaps it's an FP constant? (yyval.ValIDVal) = ValID::create((yyvsp[0].FPVal)); CHECK_FOR_ERROR ;} break; - case 186: -#line 2094 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 187: +#line 2113 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.ValIDVal) = ValID::create(ConstantBool::getTrue()); CHECK_FOR_ERROR ;} break; - case 187: -#line 2098 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 188: +#line 2117 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.ValIDVal) = ValID::create(ConstantBool::getFalse()); CHECK_FOR_ERROR ;} break; - case 188: -#line 2102 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 189: +#line 2121 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.ValIDVal) = ValID::createNull(); CHECK_FOR_ERROR ;} break; - case 189: -#line 2106 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 190: +#line 2125 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.ValIDVal) = ValID::createUndef(); CHECK_FOR_ERROR ;} break; - case 190: -#line 2110 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 191: +#line 2129 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { // A vector zero constant. (yyval.ValIDVal) = ValID::createZeroInit(); CHECK_FOR_ERROR ;} break; - case 191: -#line 2114 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 192: +#line 2133 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { // Nonempty unsized packed vector const Type *ETy = (*(yyvsp[-1].ConstVector))[0]->getType(); int NumElements = (yyvsp[-1].ConstVector)->size(); @@ -4419,16 +4435,16 @@ ;} break; - case 192: -#line 2139 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 193: +#line 2158 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.ValIDVal) = ValID::create((yyvsp[0].ConstVal)); CHECK_FOR_ERROR ;} break; - case 193: -#line 2143 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 194: +#line 2162 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { char *End = UnEscapeLexed((yyvsp[-2].StrVal), true); std::string AsmStr = std::string((yyvsp[-2].StrVal), End); @@ -4441,48 +4457,48 @@ ;} break; - case 194: -#line 2157 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 195: +#line 2176 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { // Is it an integer reference...? (yyval.ValIDVal) = ValID::create((yyvsp[0].SIntVal)); CHECK_FOR_ERROR ;} break; - case 195: -#line 2161 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 196: +#line 2180 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { // Is it a named reference...? (yyval.ValIDVal) = ValID::create((yyvsp[0].StrVal)); CHECK_FOR_ERROR ;} break; - case 198: -#line 2173 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 199: +#line 2192 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.ValueVal) = getVal(*(yyvsp[-1].TypeVal), (yyvsp[0].ValIDVal)); delete (yyvsp[-1].TypeVal); CHECK_FOR_ERROR ;} break; - case 199: -#line 2178 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 200: +#line 2197 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.FunctionVal) = (yyvsp[-1].FunctionVal); CHECK_FOR_ERROR ;} break; - case 200: -#line 2182 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 201: +#line 2201 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { // Do not allow functions with 0 basic blocks (yyval.FunctionVal) = (yyvsp[-1].FunctionVal); CHECK_FOR_ERROR ;} break; - case 201: -#line 2191 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 202: +#line 2210 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { setValueName((yyvsp[0].TermInstVal), (yyvsp[-1].StrVal)); CHECK_FOR_ERROR @@ -4495,8 +4511,8 @@ ;} break; - case 202: -#line 2202 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 203: +#line 2221 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyvsp[-1].BasicBlockVal)->getInstList().push_back((yyvsp[0].InstVal)); (yyval.BasicBlockVal) = (yyvsp[-1].BasicBlockVal); @@ -4504,8 +4520,8 @@ ;} break; - case 203: -#line 2207 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 204: +#line 2226 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.BasicBlockVal) = CurBB = getBBVal(ValID::create((int)CurFun.NextBBNum++), true); CHECK_FOR_ERROR @@ -4520,8 +4536,8 @@ ;} break; - case 204: -#line 2219 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 205: +#line 2238 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.BasicBlockVal) = CurBB = getBBVal(ValID::create((yyvsp[0].StrVal)), true); CHECK_FOR_ERROR @@ -4536,24 +4552,24 @@ ;} break; - case 205: -#line 2232 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 206: +#line 2251 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { // Return with a result... (yyval.TermInstVal) = new ReturnInst((yyvsp[0].ValueVal)); CHECK_FOR_ERROR ;} break; - case 206: -#line 2236 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 207: +#line 2255 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { // Return with no result... (yyval.TermInstVal) = new ReturnInst(); CHECK_FOR_ERROR ;} break; - case 207: -#line 2240 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 208: +#line 2259 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { // Unconditional Branch... BasicBlock* tmpBB = getBBVal((yyvsp[0].ValIDVal)); CHECK_FOR_ERROR @@ -4561,8 +4577,8 @@ ;} break; - case 208: -#line 2245 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 209: +#line 2264 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { BasicBlock* tmpBBA = getBBVal((yyvsp[-3].ValIDVal)); CHECK_FOR_ERROR @@ -4574,8 +4590,8 @@ ;} break; - case 209: -#line 2254 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 210: +#line 2273 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { Value* tmpVal = getVal((yyvsp[-7].PrimType), (yyvsp[-6].ValIDVal)); CHECK_FOR_ERROR @@ -4597,8 +4613,8 @@ ;} break; - case 210: -#line 2273 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 211: +#line 2292 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { Value* tmpVal = getVal((yyvsp[-6].PrimType), (yyvsp[-5].ValIDVal)); CHECK_FOR_ERROR @@ -4610,8 +4626,8 @@ ;} break; - case 211: -#line 2283 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 212: +#line 2302 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { const PointerType *PFTy; const FunctionType *Ty; @@ -4669,24 +4685,24 @@ ;} break; - case 212: -#line 2338 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 213: +#line 2357 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.TermInstVal) = new UnwindInst(); CHECK_FOR_ERROR ;} break; - case 213: -#line 2342 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 214: +#line 2361 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.TermInstVal) = new UnreachableInst(); CHECK_FOR_ERROR ;} break; - case 214: -#line 2349 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 215: +#line 2368 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.JumpTable) = (yyvsp[-5].JumpTable); Constant *V = cast(getValNonImprovising((yyvsp[-4].PrimType), (yyvsp[-3].ValIDVal))); @@ -4700,8 +4716,8 @@ ;} break; - case 215: -#line 2360 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 216: +#line 2379 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.JumpTable) = new std::vector >(); Constant *V = cast(getValNonImprovising((yyvsp[-4].PrimType), (yyvsp[-3].ValIDVal))); @@ -4716,8 +4732,8 @@ ;} break; - case 216: -#line 2373 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 217: +#line 2392 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { // Is this definition named?? if so, assign the name... setValueName((yyvsp[0].InstVal), (yyvsp[-1].StrVal)); @@ -4728,8 +4744,8 @@ ;} break; - case 217: -#line 2382 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 218: +#line 2401 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { // Used for PHI nodes (yyval.PHIList) = new std::list >(); Value* tmpVal = getVal(*(yyvsp[-5].TypeVal), (yyvsp[-3].ValIDVal)); @@ -4741,8 +4757,8 @@ ;} break; - case 218: -#line 2391 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 219: +#line 2410 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.PHIList) = (yyvsp[-6].PHIList); Value* tmpVal = getVal((yyvsp[-6].PHIList)->front().first->getType(), (yyvsp[-3].ValIDVal)); @@ -4753,16 +4769,16 @@ ;} break; - case 219: -#line 2401 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 220: +#line 2420 "/proj/llvm/llvm2/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 220: -#line 2405 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 221: +#line 2424 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.ValueList) = (yyvsp[-2].ValueList); (yyvsp[-2].ValueList)->push_back((yyvsp[0].ValueVal)); @@ -4770,49 +4786,51 @@ ;} break; - case 222: -#line 2412 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 223: +#line 2431 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.ValueList) = 0; ;} break; - case 223: -#line 2414 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 224: +#line 2433 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = true; CHECK_FOR_ERROR ;} break; - case 224: -#line 2418 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 225: +#line 2437 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = false; CHECK_FOR_ERROR ;} break; - case 225: -#line 2423 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 226: +#line 2442 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { if (!(*(yyvsp[-3].TypeVal))->isInteger() && !(*(yyvsp[-3].TypeVal))->isFloatingPoint() && !isa((*(yyvsp[-3].TypeVal)).get())) GEN_ERROR( "Arithmetic operator requires integer, FP, or packed operands!"); - if (isa((*(yyvsp[-3].TypeVal)).get()) && (yyvsp[-4].BinaryOpVal) == Instruction::Rem) + if (isa((*(yyvsp[-3].TypeVal)).get()) && (yyvsp[-4].BinaryOpVal).opcode == Instruction::Rem) GEN_ERROR("Rem not supported on packed types!"); + sanitizeOpCode((yyvsp[-4].BinaryOpVal),*(yyvsp[-3].TypeVal)); + CHECK_FOR_ERROR; Value* val1 = getVal(*(yyvsp[-3].TypeVal), (yyvsp[-2].ValIDVal)); CHECK_FOR_ERROR Value* val2 = getVal(*(yyvsp[-3].TypeVal), (yyvsp[0].ValIDVal)); CHECK_FOR_ERROR - (yyval.InstVal) = BinaryOperator::create((yyvsp[-4].BinaryOpVal), val1, val2); + (yyval.InstVal) = BinaryOperator::create((yyvsp[-4].BinaryOpVal).opcode, val1, val2); if ((yyval.InstVal) == 0) GEN_ERROR("binary operator returned null!"); delete (yyvsp[-3].TypeVal); ;} break; - case 226: -#line 2439 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 227: +#line 2460 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { if (!(*(yyvsp[-3].TypeVal))->isIntegral()) { if (!isa((yyvsp[-3].TypeVal)->get()) || @@ -4823,15 +4841,15 @@ CHECK_FOR_ERROR Value* tmpVal2 = getVal(*(yyvsp[-3].TypeVal), (yyvsp[0].ValIDVal)); CHECK_FOR_ERROR - (yyval.InstVal) = BinaryOperator::create((yyvsp[-4].BinaryOpVal), tmpVal1, tmpVal2); + (yyval.InstVal) = BinaryOperator::create((yyvsp[-4].BinaryOpVal).opcode, tmpVal1, tmpVal2); if ((yyval.InstVal) == 0) GEN_ERROR("binary operator returned null!"); delete (yyvsp[-3].TypeVal); ;} break; - case 227: -#line 2454 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 228: +#line 2475 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { if(isa((*(yyvsp[-3].TypeVal)).get())) { GEN_ERROR( @@ -4841,15 +4859,15 @@ CHECK_FOR_ERROR Value* tmpVal2 = getVal(*(yyvsp[-3].TypeVal), (yyvsp[0].ValIDVal)); CHECK_FOR_ERROR - (yyval.InstVal) = new SetCondInst((yyvsp[-4].BinaryOpVal), tmpVal1, tmpVal2); + (yyval.InstVal) = new SetCondInst((yyvsp[-4].BinaryOpVal).opcode, tmpVal1, tmpVal2); if ((yyval.InstVal) == 0) GEN_ERROR("binary operator returned null!"); delete (yyvsp[-3].TypeVal); ;} break; - case 228: -#line 2468 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 229: +#line 2489 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { std::cerr << "WARNING: Use of eliminated 'not' instruction:" << " Replacing with 'xor'.\n"; @@ -4865,20 +4883,20 @@ ;} break; - case 229: -#line 2481 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 230: +#line 2502 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[0].ValueVal)->getType() != Type::UByteTy) GEN_ERROR("Shift amount must be ubyte!"); if (!(yyvsp[-2].ValueVal)->getType()->isInteger()) GEN_ERROR("Shift constant expression requires integer operand!"); - (yyval.InstVal) = new ShiftInst((yyvsp[-3].OtherOpVal), (yyvsp[-2].ValueVal), (yyvsp[0].ValueVal)); + (yyval.InstVal) = new ShiftInst((yyvsp[-3].OtherOpVal).opcode, (yyvsp[-2].ValueVal), (yyvsp[0].ValueVal)); CHECK_FOR_ERROR ;} break; - case 230: -#line 2489 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 231: +#line 2510 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { if (!(yyvsp[0].TypeVal)->get()->isFirstClassType()) GEN_ERROR("cast instruction to a non-primitive type: '" + @@ -4889,8 +4907,8 @@ ;} break; - case 231: -#line 2497 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 232: +#line 2518 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[-4].ValueVal)->getType() != Type::BoolTy) GEN_ERROR("select condition must be boolean!"); @@ -4901,8 +4919,8 @@ ;} break; - case 232: -#line 2505 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 233: +#line 2526 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { NewVarArgs = true; (yyval.InstVal) = new VAArgInst((yyvsp[-2].ValueVal), *(yyvsp[0].TypeVal)); @@ -4911,8 +4929,8 @@ ;} break; - case 233: -#line 2511 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 234: +#line 2532 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { ObsoleteVarArgs = true; const Type* ArgTy = (yyvsp[-2].ValueVal)->getType(); @@ -4935,8 +4953,8 @@ ;} break; - case 234: -#line 2531 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 235: +#line 2552 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { ObsoleteVarArgs = true; const Type* ArgTy = (yyvsp[-2].ValueVal)->getType(); @@ -4962,8 +4980,8 @@ ;} break; - case 235: -#line 2554 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 236: +#line 2575 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { if (!ExtractElementInst::isValidOperands((yyvsp[-2].ValueVal), (yyvsp[0].ValueVal))) GEN_ERROR("Invalid extractelement operands!"); @@ -4972,8 +4990,8 @@ ;} break; - case 236: -#line 2560 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 237: +#line 2581 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { if (!InsertElementInst::isValidOperands((yyvsp[-4].ValueVal), (yyvsp[-2].ValueVal), (yyvsp[0].ValueVal))) GEN_ERROR("Invalid insertelement operands!"); @@ -4982,8 +5000,8 @@ ;} break; - case 237: -#line 2566 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 238: +#line 2587 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { if (!ShuffleVectorInst::isValidOperands((yyvsp[-4].ValueVal), (yyvsp[-2].ValueVal), (yyvsp[0].ValueVal))) GEN_ERROR("Invalid shufflevector operands!"); @@ -4992,8 +5010,8 @@ ;} break; - case 238: -#line 2572 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 239: +#line 2593 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { const Type *Ty = (yyvsp[0].PHIList)->front().first->getType(); if (!Ty->isFirstClassType()) @@ -5011,8 +5029,8 @@ ;} break; - case 239: -#line 2587 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 240: +#line 2608 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { const PointerType *PFTy; const FunctionType *Ty; @@ -5074,48 +5092,48 @@ ;} break; - case 240: -#line 2646 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 241: +#line 2667 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.InstVal) = (yyvsp[0].InstVal); CHECK_FOR_ERROR ;} break; - case 241: -#line 2653 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 242: +#line 2674 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.ValueList) = (yyvsp[0].ValueList); CHECK_FOR_ERROR ;} break; - case 242: -#line 2656 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 243: +#line 2677 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.ValueList) = new std::vector(); CHECK_FOR_ERROR ;} break; - case 243: -#line 2661 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 244: +#line 2682 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = true; CHECK_FOR_ERROR ;} break; - case 244: -#line 2665 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 245: +#line 2686 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = false; CHECK_FOR_ERROR ;} break; - case 245: -#line 2672 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 246: +#line 2693 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.InstVal) = new MallocInst(*(yyvsp[-1].TypeVal), 0, (yyvsp[0].UIntVal)); delete (yyvsp[-1].TypeVal); @@ -5123,8 +5141,8 @@ ;} break; - case 246: -#line 2677 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 247: +#line 2698 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { Value* tmpVal = getVal((yyvsp[-2].PrimType), (yyvsp[-1].ValIDVal)); CHECK_FOR_ERROR @@ -5133,8 +5151,8 @@ ;} break; - case 247: -#line 2683 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 248: +#line 2704 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.InstVal) = new AllocaInst(*(yyvsp[-1].TypeVal), 0, (yyvsp[0].UIntVal)); delete (yyvsp[-1].TypeVal); @@ -5142,8 +5160,8 @@ ;} break; - case 248: -#line 2688 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 249: +#line 2709 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { Value* tmpVal = getVal((yyvsp[-2].PrimType), (yyvsp[-1].ValIDVal)); CHECK_FOR_ERROR @@ -5152,8 +5170,8 @@ ;} break; - case 249: -#line 2694 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 250: +#line 2715 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { if (!isa((yyvsp[0].ValueVal)->getType())) GEN_ERROR("Trying to free nonpointer type " + @@ -5163,8 +5181,8 @@ ;} break; - case 250: -#line 2702 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 251: +#line 2723 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { if (!isa((yyvsp[-1].TypeVal)->get())) GEN_ERROR("Can't load from nonpointer type: " + @@ -5179,8 +5197,8 @@ ;} break; - case 251: -#line 2714 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 252: +#line 2735 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { const PointerType *PT = dyn_cast((yyvsp[-1].TypeVal)->get()); if (!PT) @@ -5198,8 +5216,8 @@ ;} break; - case 252: -#line 2729 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 253: +#line 2750 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { if (!isa((yyvsp[-2].TypeVal)->get())) GEN_ERROR("getelementptr insn requires pointer operand!"); @@ -5231,7 +5249,7 @@ } /* Line 1126 of yacc.c. */ -#line 5235 "llvmAsmParser.tab.c" +#line 5253 "llvmAsmParser.tab.c" yyvsp -= yylen; yyssp -= yylen; @@ -5499,7 +5517,7 @@ } -#line 2755 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2776 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" void llvm::GenerateError(const std::string &message, int LineNo) { Index: llvm/lib/AsmParser/llvmAsmParser.h.cvs diff -u llvm/lib/AsmParser/llvmAsmParser.h.cvs:1.13.2.1 llvm/lib/AsmParser/llvmAsmParser.h.cvs:1.13.2.2 --- llvm/lib/AsmParser/llvmAsmParser.h.cvs:1.13.2.1 Wed Oct 18 22:57:55 2006 +++ llvm/lib/AsmParser/llvmAsmParser.h.cvs Thu Oct 19 14:22:56 2006 @@ -107,34 +107,35 @@ ADD = 333, SUB = 334, MUL = 335, - DIV = 336, - REM = 337, - AND = 338, - OR = 339, - XOR = 340, - SETLE = 341, - SETGE = 342, - SETLT = 343, - SETGT = 344, - SETEQ = 345, - SETNE = 346, - MALLOC = 347, - ALLOCA = 348, - FREE = 349, - LOAD = 350, - STORE = 351, - GETELEMENTPTR = 352, - PHI_TOK = 353, - CAST = 354, - SELECT = 355, - SHL = 356, - SHR = 357, - VAARG = 358, - EXTRACTELEMENT = 359, - INSERTELEMENT = 360, - SHUFFLEVECTOR = 361, - VAARG_old = 362, - VANEXT_old = 363 + UDIV = 336, + SDIV = 337, + REM = 338, + AND = 339, + OR = 340, + XOR = 341, + SETLE = 342, + SETGE = 343, + SETLT = 344, + SETGT = 345, + SETEQ = 346, + SETNE = 347, + MALLOC = 348, + ALLOCA = 349, + FREE = 350, + LOAD = 351, + STORE = 352, + GETELEMENTPTR = 353, + PHI_TOK = 354, + CAST = 355, + SELECT = 356, + SHL = 357, + SHR = 358, + VAARG = 359, + EXTRACTELEMENT = 360, + INSERTELEMENT = 361, + SHUFFLEVECTOR = 362, + VAARG_old = 363, + VANEXT_old = 364 }; #endif /* Tokens. */ @@ -216,40 +217,41 @@ #define ADD 333 #define SUB 334 #define MUL 335 -#define DIV 336 -#define REM 337 -#define AND 338 -#define OR 339 -#define XOR 340 -#define SETLE 341 -#define SETGE 342 -#define SETLT 343 -#define SETGT 344 -#define SETEQ 345 -#define SETNE 346 -#define MALLOC 347 -#define ALLOCA 348 -#define FREE 349 -#define LOAD 350 -#define STORE 351 -#define GETELEMENTPTR 352 -#define PHI_TOK 353 -#define CAST 354 -#define SELECT 355 -#define SHL 356 -#define SHR 357 -#define VAARG 358 -#define EXTRACTELEMENT 359 -#define INSERTELEMENT 360 -#define SHUFFLEVECTOR 361 -#define VAARG_old 362 -#define VANEXT_old 363 +#define UDIV 336 +#define SDIV 337 +#define REM 338 +#define AND 339 +#define OR 340 +#define XOR 341 +#define SETLE 342 +#define SETGE 343 +#define SETLT 344 +#define SETGT 345 +#define SETEQ 346 +#define SETNE 347 +#define MALLOC 348 +#define ALLOCA 349 +#define FREE 350 +#define LOAD 351 +#define STORE 352 +#define GETELEMENTPTR 353 +#define PHI_TOK 354 +#define CAST 355 +#define SELECT 356 +#define SHL 357 +#define SHR 358 +#define VAARG 359 +#define EXTRACTELEMENT 360 +#define INSERTELEMENT 361 +#define SHUFFLEVECTOR 362 +#define VAARG_old 363 +#define VANEXT_old 364 #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) -#line 974 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 991 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" typedef union YYSTYPE { llvm::Module *ModuleVal; llvm::Function *FunctionVal; @@ -283,14 +285,14 @@ char *StrVal; // This memory is strdup'd! llvm::ValID ValIDVal; // strdup'd memory maybe! - llvm::Instruction::BinaryOps BinaryOpVal; - llvm::Instruction::TermOps TermOpVal; - llvm::Instruction::MemoryOps MemOpVal; - llvm::Instruction::OtherOps OtherOpVal; - llvm::Module::Endianness Endianness; + BinaryOpInfo BinaryOpVal; + TermOpInfo TermOpVal; + MemOpInfo MemOpVal; + OtherOpInfo OtherOpVal; + llvm::Module::Endianness Endianness; } YYSTYPE; /* Line 1447 of yacc.c. */ -#line 294 "llvmAsmParser.tab.h" +#line 296 "llvmAsmParser.tab.h" # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 # define YYSTYPE_IS_TRIVIAL 1 Index: llvm/lib/AsmParser/llvmAsmParser.y.cvs diff -u llvm/lib/AsmParser/llvmAsmParser.y.cvs:1.18.2.1 llvm/lib/AsmParser/llvmAsmParser.y.cvs:1.18.2.2 --- llvm/lib/AsmParser/llvmAsmParser.y.cvs:1.18.2.1 Wed Oct 18 22:57:55 2006 +++ llvm/lib/AsmParser/llvmAsmParser.y.cvs Thu Oct 19 14:22:56 2006 @@ -813,6 +813,23 @@ return Ty; } +// This function is +template +static void sanitizeOpCode(OpcodeInfo &OI, const PATypeHolder& Ty) { + if (OI.obsolete) { + switch (OI.opcode) { + default: + GenerateError("Invalid Obsolete OpCode"); + break; + case Instruction::UDiv: + if (Ty->isSigned()) + OI.opcode = Instruction::SDiv; + break; + } + OI.obsolete = false; + } +} + // common code from the two 'RunVMAsmParser' functions static Module* RunParser(Module * M) { @@ -1004,11 +1021,11 @@ char *StrVal; // This memory is strdup'd! llvm::ValID ValIDVal; // strdup'd memory maybe! - llvm::Instruction::BinaryOps BinaryOpVal; - llvm::Instruction::TermOps TermOpVal; - llvm::Instruction::MemoryOps MemOpVal; - llvm::Instruction::OtherOps OtherOpVal; - llvm::Module::Endianness Endianness; + BinaryOpInfo BinaryOpVal; + TermOpInfo TermOpVal; + MemOpInfo MemOpVal; + OtherOpInfo OtherOpVal; + llvm::Module::Endianness Endianness; } %type Module FunctionList @@ -1076,8 +1093,8 @@ // Binary Operators %type ArithmeticOps LogicalOps SetCondOps // Binops Subcatagories -%token ADD SUB MUL DIV REM AND OR XOR -%token SETLE SETGE SETLT SETGT SETEQ SETNE // Binary Comarators +%token ADD SUB MUL UDIV SDIV REM AND OR XOR +%token SETLE SETGE SETLT SETGT SETEQ SETNE // Binary Comparators // Memory Instructions %token MALLOC ALLOCA FREE LOAD STORE GETELEMENTPTR @@ -1114,7 +1131,7 @@ // Operations that are notably excluded from this list include: // RET, BR, & SWITCH because they end basic blocks and are treated specially. // -ArithmeticOps: ADD | SUB | MUL | DIV | REM; +ArithmeticOps: ADD | SUB | MUL | UDIV | SDIV | REM ; LogicalOps : AND | OR | XOR; SetCondOps : SETLE | SETGE | SETLT | SETGT | SETEQ | SETNE; @@ -1642,12 +1659,14 @@ | ArithmeticOps '(' ConstVal ',' ConstVal ')' { if ($3->getType() != $5->getType()) GEN_ERROR("Binary operator types must match!"); + sanitizeOpCode($1,$3->getType()); + CHECK_FOR_ERROR; // HACK: llvm 1.3 and earlier used to emit invalid pointer constant exprs. // To retain backward compatibility with these early compilers, we emit a // cast to the appropriate integer type automatically if we are in the // broken case. See PR424 for more information. if (!isa($3->getType())) { - $$ = ConstantExpr::get($1, $3, $5); + $$ = ConstantExpr::get($1.opcode, $3, $5); } else { const Type *IntPtrTy = 0; switch (CurModule.CurrentModule->getPointerSize()) { @@ -1655,7 +1674,7 @@ case Module::Pointer64: IntPtrTy = Type::LongTy; break; default: GEN_ERROR("invalid pointer binary constant expr!"); } - $$ = ConstantExpr::get($1, ConstantExpr::getCast($3, IntPtrTy), + $$ = ConstantExpr::get($1.opcode, ConstantExpr::getCast($3, IntPtrTy), ConstantExpr::getCast($5, IntPtrTy)); $$ = ConstantExpr::getCast($$, $3->getType()); } @@ -1669,13 +1688,13 @@ !cast($3->getType())->getElementType()->isIntegral()) GEN_ERROR("Logical operator requires integral operands!"); } - $$ = ConstantExpr::get($1, $3, $5); + $$ = ConstantExpr::get($1.opcode, $3, $5); CHECK_FOR_ERROR } | SetCondOps '(' ConstVal ',' ConstVal ')' { if ($3->getType() != $5->getType()) GEN_ERROR("setcc operand types must match!"); - $$ = ConstantExpr::get($1, $3, $5); + $$ = ConstantExpr::get($1.opcode, $3, $5); CHECK_FOR_ERROR } | ShiftOps '(' ConstVal ',' ConstVal ')' { @@ -1683,7 +1702,7 @@ GEN_ERROR("Shift count for shift constant must be unsigned byte!"); if (!$3->getType()->isInteger()) GEN_ERROR("Shift constant expression requires integer operand!"); - $$ = ConstantExpr::get($1, $3, $5); + $$ = ConstantExpr::get($1.opcode, $3, $5); CHECK_FOR_ERROR } | EXTRACTELEMENT '(' ConstVal ',' ConstVal ')' { @@ -2425,13 +2444,15 @@ !isa((*$2).get())) GEN_ERROR( "Arithmetic operator requires integer, FP, or packed operands!"); - if (isa((*$2).get()) && $1 == Instruction::Rem) + if (isa((*$2).get()) && $1.opcode == Instruction::Rem) GEN_ERROR("Rem not supported on packed types!"); + sanitizeOpCode($1,*$2); + CHECK_FOR_ERROR; Value* val1 = getVal(*$2, $3); CHECK_FOR_ERROR Value* val2 = getVal(*$2, $5); CHECK_FOR_ERROR - $$ = BinaryOperator::create($1, val1, val2); + $$ = BinaryOperator::create($1.opcode, val1, val2); if ($$ == 0) GEN_ERROR("binary operator returned null!"); delete $2; @@ -2446,7 +2467,7 @@ CHECK_FOR_ERROR Value* tmpVal2 = getVal(*$2, $5); CHECK_FOR_ERROR - $$ = BinaryOperator::create($1, tmpVal1, tmpVal2); + $$ = BinaryOperator::create($1.opcode, tmpVal1, tmpVal2); if ($$ == 0) GEN_ERROR("binary operator returned null!"); delete $2; @@ -2460,7 +2481,7 @@ CHECK_FOR_ERROR Value* tmpVal2 = getVal(*$2, $5); CHECK_FOR_ERROR - $$ = new SetCondInst($1, tmpVal1, tmpVal2); + $$ = new SetCondInst($1.opcode, tmpVal1, tmpVal2); if ($$ == 0) GEN_ERROR("binary operator returned null!"); delete $2; @@ -2483,7 +2504,7 @@ GEN_ERROR("Shift amount must be ubyte!"); if (!$2->getType()->isInteger()) GEN_ERROR("Shift constant expression requires integer operand!"); - $$ = new ShiftInst($1, $2, $4); + $$ = new ShiftInst($1.opcode, $2, $4); CHECK_FOR_ERROR } | CAST ResolvedVal TO Types { From reid at x10sys.com Thu Oct 19 14:53:45 2006 From: reid at x10sys.com (Reid Spencer) Date: Thu, 19 Oct 2006 14:53:45 -0500 Subject: [llvm-commits] [SignlessTypes] CVS: llvm/lib/VMCore/ConstantFolding.cpp Constants.cpp Instruction.cpp Instructions.cpp Message-ID: <200610191953.k9JJrjr1028654@zion.cs.uiuc.edu> Changes in directory llvm/lib/VMCore: ConstantFolding.cpp updated: 1.93.2.1 -> 1.93.2.2 Constants.cpp updated: 1.163.2.1 -> 1.163.2.2 Instruction.cpp updated: 1.53 -> 1.53.2.1 Instructions.cpp updated: 1.42.2.1 -> 1.42.2.2 --- Log message: Make adjustments for DIV -> SDIV UDIV --- Diffs of the changes: (+64 -28) ConstantFolding.cpp | 75 ++++++++++++++++++++++++++++++++++++---------------- Constants.cpp | 9 ++++-- Instruction.cpp | 6 ++-- Instructions.cpp | 2 - 4 files changed, 64 insertions(+), 28 deletions(-) Index: llvm/lib/VMCore/ConstantFolding.cpp diff -u llvm/lib/VMCore/ConstantFolding.cpp:1.93.2.1 llvm/lib/VMCore/ConstantFolding.cpp:1.93.2.2 --- llvm/lib/VMCore/ConstantFolding.cpp:1.93.2.1 Wed Oct 18 22:57:56 2006 +++ llvm/lib/VMCore/ConstantFolding.cpp Thu Oct 19 14:53:31 2006 @@ -40,7 +40,8 @@ virtual Constant *add(const Constant *V1, const Constant *V2) const = 0; virtual Constant *sub(const Constant *V1, const Constant *V2) const = 0; virtual Constant *mul(const Constant *V1, const Constant *V2) const = 0; - virtual Constant *div(const Constant *V1, const Constant *V2) const = 0; + virtual Constant *udiv(const Constant *V1, const Constant *V2) const = 0; + virtual Constant *sdiv(const Constant *V1, const Constant *V2) const = 0; virtual Constant *rem(const Constant *V1, const Constant *V2) const = 0; virtual Constant *op_and(const Constant *V1, const Constant *V2) const = 0; virtual Constant *op_or (const Constant *V1, const Constant *V2) const = 0; @@ -106,8 +107,11 @@ virtual Constant *mul(const Constant *V1, const Constant *V2) const { return SubClassName::Mul((const ArgType *)V1, (const ArgType *)V2); } - virtual Constant *div(const Constant *V1, const Constant *V2) const { - return SubClassName::Div((const ArgType *)V1, (const ArgType *)V2); + virtual Constant *udiv(const Constant *V1, const Constant *V2) const { + return SubClassName::UDiv((const ArgType *)V1, (const ArgType *)V2); + } + virtual Constant *sdiv(const Constant *V1, const Constant *V2) const { + return SubClassName::SDiv((const ArgType *)V1, (const ArgType *)V2); } virtual Constant *rem(const Constant *V1, const Constant *V2) const { return SubClassName::Rem((const ArgType *)V1, (const ArgType *)V2); @@ -178,16 +182,17 @@ // Default "noop" implementations //===--------------------------------------------------------------------===// - static Constant *Add(const ArgType *V1, const ArgType *V2) { return 0; } - static Constant *Sub(const ArgType *V1, const ArgType *V2) { return 0; } - static Constant *Mul(const ArgType *V1, const ArgType *V2) { return 0; } - static Constant *Div(const ArgType *V1, const ArgType *V2) { return 0; } - static Constant *Rem(const ArgType *V1, const ArgType *V2) { return 0; } - static Constant *And(const ArgType *V1, const ArgType *V2) { return 0; } - static Constant *Or (const ArgType *V1, const ArgType *V2) { return 0; } - static Constant *Xor(const ArgType *V1, const ArgType *V2) { return 0; } - static Constant *Shl(const ArgType *V1, const ArgType *V2) { return 0; } - static Constant *Shr(const ArgType *V1, const ArgType *V2) { return 0; } + static Constant *Add (const ArgType *V1, const ArgType *V2) { return 0; } + static Constant *Sub (const ArgType *V1, const ArgType *V2) { return 0; } + static Constant *Mul (const ArgType *V1, const ArgType *V2) { return 0; } + static Constant *SDiv(const ArgType *V1, const ArgType *V2) { return 0; } + static Constant *UDiv(const ArgType *V1, const ArgType *V2) { return 0; } + static Constant *Rem (const ArgType *V1, const ArgType *V2) { return 0; } + static Constant *And (const ArgType *V1, const ArgType *V2) { return 0; } + static Constant *Or (const ArgType *V1, const ArgType *V2) { return 0; } + static Constant *Xor (const ArgType *V1, const ArgType *V2) { return 0; } + static Constant *Shl (const ArgType *V1, const ArgType *V2) { return 0; } + static Constant *Shr (const ArgType *V1, const ArgType *V2) { return 0; } static Constant *LessThan(const ArgType *V1, const ArgType *V2) { return 0; } @@ -373,8 +378,11 @@ static Constant *Mul(const ConstantPacked *V1, const ConstantPacked *V2) { return EvalVectorOp(V1, V2, ConstantExpr::getMul); } - static Constant *Div(const ConstantPacked *V1, const ConstantPacked *V2) { - return EvalVectorOp(V1, V2, ConstantExpr::getDiv); + static Constant *UDiv(const ConstantPacked *V1, const ConstantPacked *V2) { + return EvalVectorOp(V1, V2, ConstantExpr::getUDiv); + } + static Constant *SDiv(const ConstantPacked *V1, const ConstantPacked *V2) { + return EvalVectorOp(V1, V2, ConstantExpr::getSDiv); } static Constant *Rem(const ConstantPacked *V1, const ConstantPacked *V2) { return EvalVectorOp(V1, V2, ConstantExpr::getRem); @@ -493,8 +501,20 @@ DEF_CAST(Double, ConstantFP , double) #undef DEF_CAST - static Constant *Div(const ConstantInt *V1, const ConstantInt *V2) { - if (V2->isNullValue()) return 0; + static Constant *UDiv(const ConstantInt *V1, const ConstantInt *V2) { + if (V2->isNullValue()) + return 0; + if (V2->isAllOnesValue() && // MIN_INT / -1 + (BuiltinType)V1->getRawValue() == -(BuiltinType)V1->getRawValue()) + return 0; + BuiltinType R = + (BuiltinType)V1->getRawValue() / (BuiltinType)V2->getRawValue(); + return ConstantInt::get(*Ty, R); + } + + static Constant *SDiv(const ConstantInt *V1, const ConstantInt *V2) { + if (V2->isNullValue()) + return 0; if (V2->isAllOnesValue() && // MIN_INT / -1 (BuiltinType)V1->getRawValue() == -(BuiltinType)V1->getRawValue()) return 0; @@ -615,7 +635,14 @@ (BuiltinType)V2->getValue()); return ConstantFP::get(*Ty, Result); } - static Constant *Div(const ConstantFP *V1, const ConstantFP *V2) { + static Constant *UDiv(const ConstantFP *V1, const ConstantFP *V2) { + BuiltinType inf = std::numeric_limits::infinity(); + if (V2->isExactlyValue(0.0)) return ConstantFP::get(*Ty, inf); + if (V2->isExactlyValue(-0.0)) return ConstantFP::get(*Ty, -inf); + BuiltinType R = (BuiltinType)V1->getValue() / (BuiltinType)V2->getValue(); + return ConstantFP::get(*Ty, R); + } + static Constant *SDiv(const ConstantFP *V1, const ConstantFP *V2) { BuiltinType inf = std::numeric_limits::infinity(); if (V2->isExactlyValue(0.0)) return ConstantFP::get(*Ty, inf); if (V2->isExactlyValue(-0.0)) return ConstantFP::get(*Ty, -inf); @@ -1224,7 +1251,8 @@ case Instruction::Add: C = ConstRules::get(V1, V2).add(V1, V2); break; case Instruction::Sub: C = ConstRules::get(V1, V2).sub(V1, V2); break; case Instruction::Mul: C = ConstRules::get(V1, V2).mul(V1, V2); break; - case Instruction::Div: C = ConstRules::get(V1, V2).div(V1, V2); break; + case Instruction::UDiv: C = ConstRules::get(V1, V2).udiv(V1, V2); break; + case Instruction::SDiv: C = ConstRules::get(V1, V2).sdiv(V1, V2); break; case Instruction::Rem: C = ConstRules::get(V1, V2).rem(V1, V2); break; case Instruction::And: C = ConstRules::get(V1, V2).op_and(V1, V2); break; case Instruction::Or: C = ConstRules::get(V1, V2).op_or (V1, V2); break; @@ -1307,7 +1335,8 @@ case Instruction::Mul: case Instruction::And: return Constant::getNullValue(V1->getType()); - case Instruction::Div: + case Instruction::UDiv: + case Instruction::SDiv: case Instruction::Rem: if (!isa(V2)) // undef/X -> 0 return Constant::getNullValue(V1->getType()); @@ -1358,7 +1387,8 @@ if (CI->getRawValue() == 1) return const_cast(V1); // X * 1 == X break; - case Instruction::Div: + case Instruction::UDiv: + case Instruction::SDiv: if (const ConstantInt *CI = dyn_cast(V2)) if (CI->getRawValue() == 1) return const_cast(V1); // X / 1 == X @@ -1419,7 +1449,8 @@ case Instruction::Shl: case Instruction::Shr: case Instruction::Sub: - case Instruction::Div: + case Instruction::SDiv: + case Instruction::UDiv: case Instruction::Rem: default: // These instructions cannot be flopped around. break; Index: llvm/lib/VMCore/Constants.cpp diff -u llvm/lib/VMCore/Constants.cpp:1.163.2.1 llvm/lib/VMCore/Constants.cpp:1.163.2.2 --- llvm/lib/VMCore/Constants.cpp:1.163.2.1 Wed Oct 18 22:57:56 2006 +++ llvm/lib/VMCore/Constants.cpp Thu Oct 19 14:53:31 2006 @@ -429,8 +429,11 @@ Constant *ConstantExpr::getMul(Constant *C1, Constant *C2) { return get(Instruction::Mul, C1, C2); } -Constant *ConstantExpr::getDiv(Constant *C1, Constant *C2) { - return get(Instruction::Div, C1, C2); +Constant *ConstantExpr::getUDiv(Constant *C1, Constant *C2) { + return get(Instruction::UDiv, C1, C2); +} +Constant *ConstantExpr::getSDiv(Constant *C1, Constant *C2) { + return get(Instruction::SDiv, C1, C2); } Constant *ConstantExpr::getRem(Constant *C1, Constant *C2) { return get(Instruction::Rem, C1, C2); @@ -1467,7 +1470,7 @@ #ifndef NDEBUG switch (Opcode) { case Instruction::Add: case Instruction::Sub: - case Instruction::Mul: case Instruction::Div: + case Instruction::Mul: case Instruction::UDiv: case Instruction::SDiv: case Instruction::Rem: assert(C1->getType() == C2->getType() && "Op types should be identical!"); assert((C1->getType()->isInteger() || C1->getType()->isFloatingPoint() || Index: llvm/lib/VMCore/Instruction.cpp diff -u llvm/lib/VMCore/Instruction.cpp:1.53 llvm/lib/VMCore/Instruction.cpp:1.53.2.1 --- llvm/lib/VMCore/Instruction.cpp:1.53 Sun Sep 17 14:14:47 2006 +++ llvm/lib/VMCore/Instruction.cpp Thu Oct 19 14:53:31 2006 @@ -94,7 +94,8 @@ case Add: return "add"; case Sub: return "sub"; case Mul: return "mul"; - case Div: return "div"; + case UDiv: return "udiv"; + case SDiv: return "sdiv"; case Rem: return "rem"; // Logical operators... @@ -221,7 +222,8 @@ /// bool Instruction::isTrapping(unsigned op) { switch(op) { - case Div: + case SDiv: + case UDiv: case Rem: case Load: case Store: Index: llvm/lib/VMCore/Instructions.cpp diff -u llvm/lib/VMCore/Instructions.cpp:1.42.2.1 llvm/lib/VMCore/Instructions.cpp:1.42.2.2 --- llvm/lib/VMCore/Instructions.cpp:1.42.2.1 Wed Oct 18 22:57:56 2006 +++ llvm/lib/VMCore/Instructions.cpp Thu Oct 19 14:53:31 2006 @@ -1022,7 +1022,7 @@ #ifndef NDEBUG switch (iType) { case Add: case Sub: - case Mul: case Div: + case Mul: case UDiv: case SDiv: case Rem: assert(getType() == LHS->getType() && "Arithmetic operation should return same type as operands!"); From reid at x10sys.com Thu Oct 19 15:59:08 2006 From: reid at x10sys.com (Reid Spencer) Date: Thu, 19 Oct 2006 15:59:08 -0500 Subject: [llvm-commits] [SignlessTypes] CVS: llvm/docs/ProgrammersManual.html Stacker.html Message-ID: <200610192059.k9JKx8Do029900@zion.cs.uiuc.edu> Changes in directory llvm/docs: ProgrammersManual.html updated: 1.94 -> 1.94.2.1 Stacker.html updated: 1.20 -> 1.20.6.1 --- Log message: Adjust documentation for Constant[SU]Int -> ConstantInt. --- Diffs of the changes: (+14 -19) ProgrammersManual.html | 21 ++++++++------------- Stacker.html | 12 ++++++------ 2 files changed, 14 insertions(+), 19 deletions(-) Index: llvm/docs/ProgrammersManual.html diff -u llvm/docs/ProgrammersManual.html:1.94 llvm/docs/ProgrammersManual.html:1.94.2.1 --- llvm/docs/ProgrammersManual.html:1.94 Wed Oct 11 13:00:22 2006 +++ llvm/docs/ProgrammersManual.html Thu Oct 19 15:58:53 2006 @@ -2390,8 +2390,8 @@

Constant represents a base class for different types of constants. It -is subclassed by ConstantBool, ConstantInt, ConstantSInt, ConstantUInt, -ConstantArray etc for representing the various types of Constants.

+is subclassed by ConstantBool, ConstantInt, ConstantArray etc for representing +the various types of Constants.

@@ -2406,17 +2406,12 @@
Important Subclasses of Constant
    -
  • ConstantSInt : This subclass of Constant represents a signed integer - constant. +
  • ConstantInt : This subclass of Constant represents an integer constant.
      -
    • int64_t getValue() const: Returns the underlying value of - this constant.
    • -
    -
  • -
  • ConstantUInt : This class represents an unsigned integer. -
      -
    • uint64_t getValue() const: Returns the underlying value of - this constant.
    • +
    • int64_t getSExtValue() const: Returns the underlying value of + this constant as a sign extended signed integer value.
    • +
    • uint64_t getZExtValue() const: Returns the underlying value + of this constant as a zero extended unsigned integer value.
  • ConstantFP : This class represents a floating point constant. @@ -2559,7 +2554,7 @@ Dinakar Dhurjati and Chris Lattner
    The LLVM Compiler Infrastructure
    - Last modified: $Date: 2006/10/11 18:00:22 $ + Last modified: $Date: 2006/10/19 20:58:53 $ Index: llvm/docs/Stacker.html diff -u llvm/docs/Stacker.html:1.20 llvm/docs/Stacker.html:1.20.6.1 --- llvm/docs/Stacker.html:1.20 Mon Mar 13 23:39:39 2006 +++ llvm/docs/Stacker.html Thu Oct 19 15:58:53 2006 @@ -139,7 +139,7 @@ Value* expression(BasicBlock* bb, Value* a, Value* b, Value* x, Value* y ) { - ConstantSInt* one = ConstantSInt::get(Type::IntTy, 1); + ConstantInt* one = ConstantInt::get(Type::IntTy, 1); BinaryOperator* or1 = BinaryOperator::createOr(a, b, "", bb); BinaryOperator* add1 = BinaryOperator::createAdd(x, one, "", bb); BinaryOperator* add2 = BinaryOperator::createAdd(y, one, "", bb); @@ -308,7 +308,7 @@

     std::vector<Value*> index_vector;
    -index_vector.push_back( ConstantSInt::get( Type::LongTy, 0 );
    +index_vector.push_back( ConstantInt::get( Type::LongTy, 0 );
     // ... push other indices ...
     GetElementPtrInst* gep = new GetElementPtrInst( ptr, index_vector );
     
    @@ -367,9 +367,9 @@
    • Constants are Values like anything else and can be operands of instructions
    • Integer constants, frequently needed, can be created using the static "get" - methods of the ConstantInt, ConstantSInt, and ConstantUInt classes. The nice thing - about these is that you can "get" any kind of integer quickly.
    • -
    • There's a special method on Constant class which allows you to get the null + methods of the ConstantInt class. The nice thing about these is that you can + "get" any kind of integer quickly.
    • +
    • There's a special method on Constant class which allows you to get the null constant for any type. This is really handy for initializing large arrays or structures, etc.
    @@ -1405,7 +1405,7 @@ Reid Spencer
    LLVM Compiler Infrastructure
    - Last modified: $Date: 2006/03/14 05:39:39 $ + Last modified: $Date: 2006/10/19 20:58:53 $ From dpatel at apple.com Thu Oct 19 15:59:27 2006 From: dpatel at apple.com (Devang Patel) Date: Thu, 19 Oct 2006 15:59:27 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp Message-ID: <200610192059.k9JKxRkc029920@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: InstructionCombining.cpp updated: 1.523 -> 1.524 --- Log message: It is OK to remove extra cast if operation is EQ/NE even though source and destination sign may not match but other conditions are met. --- Diffs of the changes: (+3 -2) InstructionCombining.cpp | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.523 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.524 --- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.523 Thu Oct 19 14:21:36 2006 +++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp Thu Oct 19 15:59:13 2006 @@ -4795,8 +4795,9 @@ // %B = setgt short %X, 1330 // // because %A may have negative value. - // However, it is OK if SrcTy is bool. See cast-set.ll testcase. - if (isSignSrc == isSignDest || SrcTy == Type::BoolTy) + // However, it is OK if SrcTy is bool (See cast-set.ll testcase) + // OR operation is EQ/NE. + if (isSignSrc == isSignDest || SrcTy == Type::BoolTy || SCI.isEquality()) RHSCIOp = Res; else return 0; From dpatel at apple.com Thu Oct 19 15:59:28 2006 From: dpatel at apple.com (Devang Patel) Date: Thu, 19 Oct 2006 15:59:28 -0500 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/InstCombine/2006-10-19-SignedToUnsignedCastAndConst-2.ll Message-ID: <200610192059.k9JKxSPo029926@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/InstCombine: 2006-10-19-SignedToUnsignedCastAndConst-2.ll added (r1.1) --- Log message: It is OK to remove extra cast if operation is EQ/NE even though source and destination sign may not match but other conditions are met. --- Diffs of the changes: (+9 -0) 2006-10-19-SignedToUnsignedCastAndConst-2.ll | 9 +++++++++ 1 files changed, 9 insertions(+) Index: llvm/test/Regression/Transforms/InstCombine/2006-10-19-SignedToUnsignedCastAndConst-2.ll diff -c /dev/null llvm/test/Regression/Transforms/InstCombine/2006-10-19-SignedToUnsignedCastAndConst-2.ll:1.1 *** /dev/null Thu Oct 19 15:59:23 2006 --- llvm/test/Regression/Transforms/InstCombine/2006-10-19-SignedToUnsignedCastAndConst-2.ll Thu Oct 19 15:59:13 2006 *************** *** 0 **** --- 1,9 ---- + ; The optimizer should be able to remove cast operation here. + ; RUN: llvm-as %s -o - | opt -instcombine | llvm-dis | not grep 'cast.*int' + + bool %eq_signed_to_small_unsigned(sbyte %SB) { + %Y = cast sbyte %SB to uint ; [#uses=1] + %C = seteq uint %Y, 17 ; [#uses=1] + ret bool %C + } + From reid at x10sys.com Thu Oct 19 16:06:40 2006 From: reid at x10sys.com (Reid Spencer) Date: Thu, 19 Oct 2006 16:06:40 -0500 Subject: [llvm-commits] [SignlessTypes] CVS: llvm/projects/Stacker/lib/compiler/StackerCompiler.cpp Message-ID: <200610192106.k9JL6e9e030058@zion.cs.uiuc.edu> Changes in directory llvm/projects/Stacker/lib/compiler: StackerCompiler.cpp updated: 1.18.2.1 -> 1.18.2.2 --- Log message: Remove useless conversions. --- Diffs of the changes: (+2 -2) StackerCompiler.cpp | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/projects/Stacker/lib/compiler/StackerCompiler.cpp diff -u llvm/projects/Stacker/lib/compiler/StackerCompiler.cpp:1.18.2.1 llvm/projects/Stacker/lib/compiler/StackerCompiler.cpp:1.18.2.2 --- llvm/projects/Stacker/lib/compiler/StackerCompiler.cpp:1.18.2.1 Wed Oct 18 22:57:56 2006 +++ llvm/projects/Stacker/lib/compiler/StackerCompiler.cpp Thu Oct 19 16:06:26 2006 @@ -721,7 +721,7 @@ // Compare the condition against 0 SetCondInst* cond_inst = new SetCondInst( Instruction::SetNE, cond, - ConstantInt::get( Type::LongTy, uint32_t(0)) ); + ConstantInt::get( Type::LongTy, 0) ); bb->getInstList().push_back( cond_inst ); // Create an exit block @@ -805,7 +805,7 @@ // Compare the condition against 0 SetCondInst* cond_inst = new SetCondInst( - Instruction::SetNE, cond, ConstantInt::get( Type::LongTy, uint32_t(0))); + Instruction::SetNE, cond, ConstantInt::get( Type::LongTy, 0)); test->getInstList().push_back( cond_inst ); // Add the branch instruction From isanbard at gmail.com Thu Oct 19 16:46:52 2006 From: isanbard at gmail.com (Bill Wendling) Date: Thu, 19 Oct 2006 16:46:52 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Message-ID: <200610192146.k9JLkqRm030809@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/SelectionDAG: SelectionDAGISel.cpp updated: 1.289 -> 1.290 --- Log message: Partially in response to PR926: http://llvm.org/PR926 : insert the newly created machine basic blocks into the basic block list when lowering the switch inst. into a binary tree of if-then statements. This allows the "visitSwitchCase" func to allow for fall-through behavior. --- Diffs of the changes: (+17 -8) SelectionDAGISel.cpp | 25 +++++++++++++++++-------- 1 files changed, 17 insertions(+), 8 deletions(-) Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.289 llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.290 --- llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.289 Mon Oct 16 15:52:31 2006 +++ llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Thu Oct 19 16:46:38 2006 @@ -882,6 +882,7 @@ // Figure out which block is immediately after the current one. MachineBasicBlock *NextBlock = 0; MachineFunction::iterator BBI = CurMBB; + if (++BBI != CurMBB->getParent()->end()) NextBlock = BBI; @@ -890,10 +891,12 @@ if (I.getNumOperands() == 2) { // Update machine-CFG edges. MachineBasicBlock *DefaultMBB = FuncInfo.MBBMap[I.getDefaultDest()]; + // If this is not a fall-through branch, emit the branch. if (DefaultMBB != NextBlock) DAG.setRoot(DAG.getNode(ISD::BR, MVT::Other, getRoot(), DAG.getBasicBlock(DefaultMBB))); + CurMBB->addSuccessor(DefaultMBB); return; } @@ -902,10 +905,12 @@ // representing each one, and sort the vector so that we can efficiently // create a binary search tree from them. std::vector Cases; + for (unsigned i = 1; i < I.getNumSuccessors(); ++i) { MachineBasicBlock *SMBB = FuncInfo.MBBMap[I.getSuccessor(i)]; Cases.push_back(Case(I.getSuccessorValue(i), SMBB)); } + std::sort(Cases.begin(), Cases.end(), CaseCmp()); // Get the Value to be switched on and default basic blocks, which will be @@ -956,6 +961,7 @@ SwitchOp = DAG.getNode(ISD::TRUNCATE, TLI.getPointerTy(), SUB); else SwitchOp = DAG.getNode(ISD::ZERO_EXTEND, TLI.getPointerTy(), SUB); + unsigned JumpTableReg = FuncInfo.MakeReg(TLI.getPointerTy()); SDOperand CopyTo = DAG.getCopyToReg(getRoot(), JumpTableReg, SwitchOp); @@ -973,14 +979,14 @@ // the default BB. std::vector DestBBs; uint64_t TEI = First; - for (CaseItr ii = Cases.begin(), ee = Cases.end(); ii != ee; ++TEI) { + + for (CaseItr ii = Cases.begin(), ee = Cases.end(); ii != ee; ++TEI) if (cast(ii->first)->getRawValue() == TEI) { DestBBs.push_back(ii->second); ++ii; } else { DestBBs.push_back(Default); } - } // Update successor info for (std::vector::iterator I = DestBBs.begin(), @@ -1024,16 +1030,15 @@ MachineBasicBlock *Target = CR.Range.first->second; SelectionDAGISel::CaseBlock CB(ISD::SETEQ, SV, C, Target, Default, CR.CaseBB); + // If the MBB representing the leaf node is the current MBB, then just // call visitSwitchCase to emit the code into the current block. // Otherwise, push the CaseBlock onto the vector to be later processed // by SDISel, and insert the node's MBB before the next MBB. if (CR.CaseBB == CurMBB) visitSwitchCase(CB); - else { + else SwitchCases.push_back(CB); - CurMF->getBasicBlockList().insert(BBI, CR.CaseBB); - } } else { // split case range at pivot CaseItr Pivot = CR.Range.first + (Size / 2); @@ -1041,6 +1046,7 @@ CaseRange RHSR(Pivot, CR.Range.second); Constant *C = Pivot->first; MachineBasicBlock *RHSBB = 0, *LHSBB = 0; + // We know that we branch to the LHS if the Value being switched on is // less than the Pivot value, C. We use this to optimize our binary // tree a bit, by recognizing that if SV is greater than or equal to the @@ -1054,8 +1060,10 @@ LHSBB = LHSR.first->second; } else { LHSBB = new MachineBasicBlock(LLVMBB); + CurMF->getBasicBlockList().insert(BBI, LHSBB); CaseVec.push_back(CaseRec(LHSBB,C,CR.GE,LHSR)); } + // Similar to the optimization above, if the Value being switched on is // known to be less than the Constant CR.LT, and the current Case Value // is CR.LT - 1, then we can branch directly to the target block for @@ -1066,19 +1074,20 @@ RHSBB = RHSR.first->second; } else { RHSBB = new MachineBasicBlock(LLVMBB); + CurMF->getBasicBlockList().insert(BBI, RHSBB); CaseVec.push_back(CaseRec(RHSBB,CR.LT,C,RHSR)); } + // Create a CaseBlock record representing a conditional branch to // the LHS node if the value being switched on SV is less than C. // Otherwise, branch to LHS. ISD::CondCode CC = C->getType()->isSigned() ? ISD::SETLT : ISD::SETULT; SelectionDAGISel::CaseBlock CB(CC, SV, C, LHSBB, RHSBB, CR.CaseBB); + if (CR.CaseBB == CurMBB) visitSwitchCase(CB); - else { + else SwitchCases.push_back(CB); - CurMF->getBasicBlockList().insert(BBI, CR.CaseBB); - } } } } From isanbard at gmail.com Thu Oct 19 18:22:13 2006 From: isanbard at gmail.com (Bill Wendling) Date: Thu, 19 Oct 2006 18:22:13 -0500 Subject: [llvm-commits] CVS: llvm/test/Regression/CodeGen/X86/2006-10-19-SwitchUnnecessaryBranching.ll Message-ID: <200610192322.k9JNMDLS032434@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/CodeGen/X86: 2006-10-19-SwitchUnnecessaryBranching.ll added (r1.1) --- Log message: Testcase for P926 --- Diffs of the changes: (+27 -0) 2006-10-19-SwitchUnnecessaryBranching.ll | 27 +++++++++++++++++++++++++++ 1 files changed, 27 insertions(+) Index: llvm/test/Regression/CodeGen/X86/2006-10-19-SwitchUnnecessaryBranching.ll diff -c /dev/null llvm/test/Regression/CodeGen/X86/2006-10-19-SwitchUnnecessaryBranching.ll:1.1 *** /dev/null Thu Oct 19 18:22:09 2006 --- llvm/test/Regression/CodeGen/X86/2006-10-19-SwitchUnnecessaryBranching.ll Thu Oct 19 18:21:59 2006 *************** *** 0 **** --- 1,27 ---- + ; RUN: llvm-as < %s | llc -march=x86 | %prcontext "jg LBB1_5" 1 | grep "LBB1_4:" + + %str = internal constant [14 x sbyte] c"Hello world!\0A\00" ; <[14 x sbyte]*> [#uses=1] + %str = internal constant [13 x sbyte] c"Blah world!\0A\00" ; <[13 x sbyte]*> [#uses=1] + + implementation ; Functions: + + int %main(int %argc, sbyte** %argv) { + entry: + switch int %argc, label %UnifiedReturnBlock [ + int 1, label %bb + int 2, label %bb2 + ] + + bb: ; preds = %entry + %tmp1 = tail call int (sbyte*, ...)* %printf( sbyte* getelementptr ([14 x sbyte]* %str, int 0, uint 0) ) ; [#uses=0] + ret int 0 + + bb2: ; preds = %entry + %tmp4 = tail call int (sbyte*, ...)* %printf( sbyte* getelementptr ([13 x sbyte]* %str, int 0, uint 0) ) ; [#uses=0] + ret int 0 + + UnifiedReturnBlock: ; preds = %entry + ret int 0 + } + + declare int %printf(sbyte*, ...) From reid at x10sys.com Thu Oct 19 18:54:28 2006 From: reid at x10sys.com (Reid Spencer) Date: Thu, 19 Oct 2006 18:54:28 -0500 Subject: [llvm-commits] [SignlessTypes] CVS: llvm/lib/Bytecode/Reader/Reader.cpp Message-ID: <200610192354.k9JNsSZ9000598@zion.cs.uiuc.edu> Changes in directory llvm/lib/Bytecode/Reader: Reader.cpp updated: 1.198.2.1 -> 1.198.2.2 --- Log message: Combine two loops that no longer need to be differentiated by type signedness. --- Diffs of the changes: (+3 -6) Reader.cpp | 9 +++------ 1 files changed, 3 insertions(+), 6 deletions(-) Index: llvm/lib/Bytecode/Reader/Reader.cpp diff -u llvm/lib/Bytecode/Reader/Reader.cpp:1.198.2.1 llvm/lib/Bytecode/Reader/Reader.cpp:1.198.2.2 --- llvm/lib/Bytecode/Reader/Reader.cpp:1.198.2.1 Wed Oct 18 22:57:55 2006 +++ llvm/lib/Bytecode/Reader/Reader.cpp Thu Oct 19 18:54:13 2006 @@ -1700,12 +1700,9 @@ read_data(Data, Data+ATy->getNumElements()); std::vector Elements(ATy->getNumElements()); - if (ATy->getElementType() == Type::SByteTy) - for (unsigned i = 0, e = ATy->getNumElements(); i != e; ++i) - Elements[i] = ConstantInt::get(Type::SByteTy, (signed char)Data[i]); - else - for (unsigned i = 0, e = ATy->getNumElements(); i != e; ++i) - Elements[i] = ConstantInt::get(Type::UByteTy, (unsigned char)Data[i]); + const Type* ElemType = ATy->getElementType(); + for (unsigned i = 0, e = ATy->getNumElements(); i != e; ++i) + Elements[i] = ConstantInt::get(ElemType, (unsigned char)Data[i]); // Create the constant, inserting it as needed. Constant *C = ConstantArray::get(ATy, Elements); From sabre at nondot.org Thu Oct 19 19:27:21 2006 From: sabre at nondot.org (Chris Lattner) Date: Thu, 19 Oct 2006 19:27:21 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/Constant.h Message-ID: <200610200027.k9K0RLQ9001326@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm: Constant.h updated: 1.31 -> 1.32 --- Log message: add a method to determine whether evaluation of a constant can trap. --- Diffs of the changes: (+4 -0) Constant.h | 4 ++++ 1 files changed, 4 insertions(+) Index: llvm/include/llvm/Constant.h diff -u llvm/include/llvm/Constant.h:1.31 llvm/include/llvm/Constant.h:1.32 --- llvm/include/llvm/Constant.h:1.31 Wed Sep 27 19:37:43 2006 +++ llvm/include/llvm/Constant.h Thu Oct 19 19:27:06 2006 @@ -54,6 +54,10 @@ virtual bool isNullValue() const = 0; virtual void print(std::ostream &O) const; + + /// canTrap - Return true if evaluation of this constant could trap. This is + /// true for things like constant expressions that could divide by zero. + bool canTrap() const; // Specialize get/setOperand for Constant's as their operands are always // constants as well. From sabre at nondot.org Thu Oct 19 19:27:22 2006 From: sabre at nondot.org (Chris Lattner) Date: Thu, 19 Oct 2006 19:27:22 -0500 Subject: [llvm-commits] CVS: llvm/lib/VMCore/Constants.cpp Message-ID: <200610200027.k9K0RMVO001332@zion.cs.uiuc.edu> Changes in directory llvm/lib/VMCore: Constants.cpp updated: 1.163 -> 1.164 --- Log message: add a method to determine whether evaluation of a constant can trap. --- Diffs of the changes: (+27 -0) Constants.cpp | 27 +++++++++++++++++++++++++++ 1 files changed, 27 insertions(+) Index: llvm/lib/VMCore/Constants.cpp diff -u llvm/lib/VMCore/Constants.cpp:1.163 llvm/lib/VMCore/Constants.cpp:1.164 --- llvm/lib/VMCore/Constants.cpp:1.163 Thu Sep 28 18:34:27 2006 +++ llvm/lib/VMCore/Constants.cpp Thu Oct 19 19:27:06 2006 @@ -58,6 +58,33 @@ delete this; } +/// canTrap - Return true if evaluation of this constant could trap. This is +/// true for things like constant expressions that could divide by zero. +bool Constant::canTrap() const { + assert(getType()->isFirstClassType() && "Cannot evaluate aggregate vals!"); + // The only thing that could possibly trap are constant exprs. + const ConstantExpr *CE = dyn_cast(this); + if (!CE) return false; + + // ConstantExpr traps if any operands can trap. + for (unsigned i = 0, e = getNumOperands(); i != e; ++i) + if (getOperand(i)->canTrap()) + return true; + + // Otherwise, only specific operations can trap. + switch (CE->getOpcode()) { + default: + return false; + case Instruction::Div: + case Instruction::Rem: + // Div and rem can trap if the RHS is not known to be non-zero. + if (!isa(getOperand(1)) || getOperand(1)->isNullValue()) + return true; + return false; + } +} + + // Static constructor to create a '0' constant of arbitrary type... Constant *Constant::getNullValue(const Type *Ty) { switch (Ty->getTypeID()) { From reid at x10sys.com Thu Oct 19 19:35:15 2006 From: reid at x10sys.com (Reid Spencer) Date: Thu, 19 Oct 2006 19:35:15 -0500 Subject: [llvm-commits] [SignlessTypes] CVS: llvm/include/llvm/Instruction.def IntrinsicInst.h Message-ID: <200610200035.k9K0ZFDP001566@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm: Instruction.def updated: 1.19.6.1 -> 1.19.6.2 IntrinsicInst.h updated: 1.18 -> 1.18.4.1 --- Log message: Make some simplifications for ConstantInt: 1. Get rid of getRawValue, replace with getZExtValue 2. Single constructor (uint64_t) and get method (int64_t) 3. Canonicalize the constant to a zero extended unsigned 64-bit integer when it is created. 4. Adjust getZExtValue() to be a do-nothing (just returns the already canonicalized value). 5. Compensate for above changes everywhere else. --- Diffs of the changes: (+39 -40) Instruction.def | 75 +++++++++++++++++++++++++++----------------------------- IntrinsicInst.h | 4 +- 2 files changed, 39 insertions(+), 40 deletions(-) Index: llvm/include/llvm/Instruction.def diff -u llvm/include/llvm/Instruction.def:1.19.6.1 llvm/include/llvm/Instruction.def:1.19.6.2 --- llvm/include/llvm/Instruction.def:1.19.6.1 Thu Oct 19 14:21:35 2006 +++ llvm/include/llvm/Instruction.def Thu Oct 19 19:34:43 2006 @@ -90,56 +90,55 @@ // Standard binary operators... FIRST_BINARY_INST( 7) -HANDLE_BINARY_INST( 7, Add , BinaryOperator) -HANDLE_BINARY_INST( 8, Sub , BinaryOperator) -HANDLE_BINARY_INST( 9, Mul , BinaryOperator) -HANDLE_BINARY_INST(10, UDiv , BinaryOperator) -HANDLE_BINARY_INST(11, SDiv , BinaryOperator) -HANDLE_BINARY_INST(12, Rem , BinaryOperator) +HANDLE_BINARY_INST( 7, Add , BinaryOperator) +HANDLE_BINARY_INST( 8, Sub , BinaryOperator) +HANDLE_BINARY_INST( 9, Mul , BinaryOperator) +HANDLE_BINARY_INST(10, Div , BinaryOperator) +HANDLE_BINARY_INST(11, Rem , BinaryOperator) // Logical operators... -HANDLE_BINARY_INST(13, And , BinaryOperator) -HANDLE_BINARY_INST(14, Or , BinaryOperator) -HANDLE_BINARY_INST(15, Xor , BinaryOperator) +HANDLE_BINARY_INST(12, And , BinaryOperator) +HANDLE_BINARY_INST(13, Or , BinaryOperator) +HANDLE_BINARY_INST(14, Xor , BinaryOperator) // Binary comparison operators... -HANDLE_BINARY_INST(16, SetEQ , SetCondInst) -HANDLE_BINARY_INST(17, SetNE , SetCondInst) -HANDLE_BINARY_INST(18, SetLE , SetCondInst) -HANDLE_BINARY_INST(19, SetGE , SetCondInst) -HANDLE_BINARY_INST(20, SetLT , SetCondInst) -HANDLE_BINARY_INST(21, SetGT , SetCondInst) - LAST_BINARY_INST(21) +HANDLE_BINARY_INST(15, SetEQ , SetCondInst) +HANDLE_BINARY_INST(16, SetNE , SetCondInst) +HANDLE_BINARY_INST(17, SetLE , SetCondInst) +HANDLE_BINARY_INST(18, SetGE , SetCondInst) +HANDLE_BINARY_INST(19, SetLT , SetCondInst) +HANDLE_BINARY_INST(20, SetGT , SetCondInst) + LAST_BINARY_INST(20) // Memory operators... - FIRST_MEMORY_INST(22) -HANDLE_MEMORY_INST(22, Malloc, MallocInst) // Heap management instructions -HANDLE_MEMORY_INST(23, Free , FreeInst ) -HANDLE_MEMORY_INST(24, Alloca, AllocaInst) // Stack management -HANDLE_MEMORY_INST(25, Load , LoadInst ) // Memory manipulation instrs -HANDLE_MEMORY_INST(26, Store , StoreInst ) -HANDLE_MEMORY_INST(27, GetElementPtr, GetElementPtrInst) - LAST_MEMORY_INST(27) + FIRST_MEMORY_INST(21) +HANDLE_MEMORY_INST(21, Malloc, MallocInst) // Heap management instructions +HANDLE_MEMORY_INST(22, Free , FreeInst ) +HANDLE_MEMORY_INST(23, Alloca, AllocaInst) // Stack management +HANDLE_MEMORY_INST(24, Load , LoadInst ) // Memory manipulation instrs +HANDLE_MEMORY_INST(25, Store , StoreInst ) +HANDLE_MEMORY_INST(26, GetElementPtr, GetElementPtrInst) + LAST_MEMORY_INST(26) // Other operators... - FIRST_OTHER_INST(28) -HANDLE_OTHER_INST(28, PHI , PHINode ) // PHI node instruction -HANDLE_OTHER_INST(29, Cast , CastInst ) // Type cast -HANDLE_OTHER_INST(30, Call , CallInst ) // Call a function + FIRST_OTHER_INST(27) +HANDLE_OTHER_INST(27, PHI , PHINode ) // PHI node instruction +HANDLE_OTHER_INST(28, Cast , CastInst ) // Type cast +HANDLE_OTHER_INST(29, Call , CallInst ) // Call a function -HANDLE_OTHER_INST(31, Shl , ShiftInst ) // Shift operations -HANDLE_OTHER_INST(32, Shr , ShiftInst ) +HANDLE_OTHER_INST(30, Shl , ShiftInst ) // Shift operations +HANDLE_OTHER_INST(31, Shr , ShiftInst ) // 32 -> Empty slot used to be used for vanext in llvm 1.5 and before. // 33 -> Empty slot used to be used for vaarg in llvm 1.5 and before. -HANDLE_OTHER_INST(33, Select , SelectInst ) // select instruction +HANDLE_OTHER_INST(34, Select , SelectInst ) // select instruction -HANDLE_OTHER_INST(34, UserOp1, Instruction) // May be used internally in a pass -HANDLE_OTHER_INST(35, UserOp2, Instruction) -HANDLE_OTHER_INST(36, VAArg , VAArgInst ) // vaarg instruction -HANDLE_OTHER_INST(37, ExtractElement, ExtractElementInst)// extract from vector. -HANDLE_OTHER_INST(38, InsertElement, InsertElementInst) // insert into vector -HANDLE_OTHER_INST(39, ShuffleVector, ShuffleVectorInst) // shuffle two vectors. - LAST_OTHER_INST(39) +HANDLE_OTHER_INST(35, UserOp1, Instruction) // May be used internally in a pass +HANDLE_OTHER_INST(36, UserOp2, Instruction) +HANDLE_OTHER_INST(37, VAArg , VAArgInst ) // vaarg instruction +HANDLE_OTHER_INST(38, ExtractElement, ExtractElementInst)// extract from vector. +HANDLE_OTHER_INST(39, InsertElement, InsertElementInst) // insert into vector +HANDLE_OTHER_INST(40, ShuffleVector, ShuffleVectorInst) // shuffle two vectors. + LAST_OTHER_INST(40) #undef FIRST_TERM_INST #undef HANDLE_TERM_INST Index: llvm/include/llvm/IntrinsicInst.h diff -u llvm/include/llvm/IntrinsicInst.h:1.18 llvm/include/llvm/IntrinsicInst.h:1.18.4.1 --- llvm/include/llvm/IntrinsicInst.h:1.18 Wed Jul 26 11:18:00 2006 +++ llvm/include/llvm/IntrinsicInst.h Thu Oct 19 19:34:43 2006 @@ -97,10 +97,10 @@ } unsigned getLine() const { - return unsigned(cast(getOperand(1))->getRawValue()); + return unsigned(cast(getOperand(1))->getZExtValue()); } unsigned getColumn() const { - return unsigned(cast(getOperand(2))->getRawValue()); + return unsigned(cast(getOperand(2))->getZExtValue()); } std::string getFileName() const; From reid at x10sys.com Thu Oct 19 19:35:17 2006 From: reid at x10sys.com (Reid Spencer) Date: Thu, 19 Oct 2006 19:35:17 -0500 Subject: [llvm-commits] [SignlessTypes] CVS: llvm/lib/Target/CBackend/Writer.cpp Message-ID: <200610200035.k9K0ZHVk001594@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/CBackend: Writer.cpp updated: 1.272.2.1 -> 1.272.2.2 --- Log message: Make some simplifications for ConstantInt: 1. Get rid of getRawValue, replace with getZExtValue 2. Single constructor (uint64_t) and get method (int64_t) 3. Canonicalize the constant to a zero extended unsigned 64-bit integer when it is created. 4. Adjust getZExtValue() to be a do-nothing (just returns the already canonicalized value). 5. Compensate for above changes everywhere else. --- Diffs of the changes: (+1 -1) Writer.cpp | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/lib/Target/CBackend/Writer.cpp diff -u llvm/lib/Target/CBackend/Writer.cpp:1.272.2.1 llvm/lib/Target/CBackend/Writer.cpp:1.272.2.2 --- llvm/lib/Target/CBackend/Writer.cpp:1.272.2.1 Wed Oct 18 22:57:56 2006 +++ llvm/lib/Target/CBackend/Writer.cpp Thu Oct 19 19:34:44 2006 @@ -460,7 +460,7 @@ // Do not include the last character, which we know is null for (unsigned i = 0, e = CPA->getNumOperands()-1; i != e; ++i) { - unsigned char C = cast(CPA->getOperand(i))->getRawValue(); + unsigned char C = cast(CPA->getOperand(i))->getZExtValue(); // Print it out literally if it is a printable character. The only thing // to be careful about is when the last letter output was a hex escape From reid at x10sys.com Thu Oct 19 19:35:16 2006 From: reid at x10sys.com (Reid Spencer) Date: Thu, 19 Oct 2006 19:35:16 -0500 Subject: [llvm-commits] [SignlessTypes] CVS: llvm/lib/VMCore/ConstantFolding.cpp Constants.cpp Instruction.cpp Instructions.cpp Message-ID: <200610200035.k9K0ZG4Z001582@zion.cs.uiuc.edu> Changes in directory llvm/lib/VMCore: ConstantFolding.cpp updated: 1.93.2.2 -> 1.93.2.3 Constants.cpp updated: 1.163.2.2 -> 1.163.2.3 Instruction.cpp updated: 1.53.2.1 -> 1.53.2.2 Instructions.cpp updated: 1.42.2.2 -> 1.42.2.3 --- Log message: Make some simplifications for ConstantInt: 1. Get rid of getRawValue, replace with getZExtValue 2. Single constructor (uint64_t) and get method (int64_t) 3. Canonicalize the constant to a zero extended unsigned 64-bit integer when it is created. 4. Adjust getZExtValue() to be a do-nothing (just returns the already canonicalized value). 5. Compensate for above changes everywhere else. --- Diffs of the changes: (+72 -138) ConstantFolding.cpp | 123 +++++++++++++++++++--------------------------------- Constants.cpp | 79 +++++++++------------------------ Instruction.cpp | 6 -- Instructions.cpp | 2 4 files changed, 72 insertions(+), 138 deletions(-) Index: llvm/lib/VMCore/ConstantFolding.cpp diff -u llvm/lib/VMCore/ConstantFolding.cpp:1.93.2.2 llvm/lib/VMCore/ConstantFolding.cpp:1.93.2.3 --- llvm/lib/VMCore/ConstantFolding.cpp:1.93.2.2 Thu Oct 19 14:53:31 2006 +++ llvm/lib/VMCore/ConstantFolding.cpp Thu Oct 19 19:34:44 2006 @@ -40,8 +40,7 @@ virtual Constant *add(const Constant *V1, const Constant *V2) const = 0; virtual Constant *sub(const Constant *V1, const Constant *V2) const = 0; virtual Constant *mul(const Constant *V1, const Constant *V2) const = 0; - virtual Constant *udiv(const Constant *V1, const Constant *V2) const = 0; - virtual Constant *sdiv(const Constant *V1, const Constant *V2) const = 0; + virtual Constant *div(const Constant *V1, const Constant *V2) const = 0; virtual Constant *rem(const Constant *V1, const Constant *V2) const = 0; virtual Constant *op_and(const Constant *V1, const Constant *V2) const = 0; virtual Constant *op_or (const Constant *V1, const Constant *V2) const = 0; @@ -107,11 +106,8 @@ virtual Constant *mul(const Constant *V1, const Constant *V2) const { return SubClassName::Mul((const ArgType *)V1, (const ArgType *)V2); } - virtual Constant *udiv(const Constant *V1, const Constant *V2) const { - return SubClassName::UDiv((const ArgType *)V1, (const ArgType *)V2); - } - virtual Constant *sdiv(const Constant *V1, const Constant *V2) const { - return SubClassName::SDiv((const ArgType *)V1, (const ArgType *)V2); + virtual Constant *div(const Constant *V1, const Constant *V2) const { + return SubClassName::Div((const ArgType *)V1, (const ArgType *)V2); } virtual Constant *rem(const Constant *V1, const Constant *V2) const { return SubClassName::Rem((const ArgType *)V1, (const ArgType *)V2); @@ -182,17 +178,16 @@ // Default "noop" implementations //===--------------------------------------------------------------------===// - static Constant *Add (const ArgType *V1, const ArgType *V2) { return 0; } - static Constant *Sub (const ArgType *V1, const ArgType *V2) { return 0; } - static Constant *Mul (const ArgType *V1, const ArgType *V2) { return 0; } - static Constant *SDiv(const ArgType *V1, const ArgType *V2) { return 0; } - static Constant *UDiv(const ArgType *V1, const ArgType *V2) { return 0; } - static Constant *Rem (const ArgType *V1, const ArgType *V2) { return 0; } - static Constant *And (const ArgType *V1, const ArgType *V2) { return 0; } - static Constant *Or (const ArgType *V1, const ArgType *V2) { return 0; } - static Constant *Xor (const ArgType *V1, const ArgType *V2) { return 0; } - static Constant *Shl (const ArgType *V1, const ArgType *V2) { return 0; } - static Constant *Shr (const ArgType *V1, const ArgType *V2) { return 0; } + static Constant *Add(const ArgType *V1, const ArgType *V2) { return 0; } + static Constant *Sub(const ArgType *V1, const ArgType *V2) { return 0; } + static Constant *Mul(const ArgType *V1, const ArgType *V2) { return 0; } + static Constant *Div(const ArgType *V1, const ArgType *V2) { return 0; } + static Constant *Rem(const ArgType *V1, const ArgType *V2) { return 0; } + static Constant *And(const ArgType *V1, const ArgType *V2) { return 0; } + static Constant *Or (const ArgType *V1, const ArgType *V2) { return 0; } + static Constant *Xor(const ArgType *V1, const ArgType *V2) { return 0; } + static Constant *Shl(const ArgType *V1, const ArgType *V2) { return 0; } + static Constant *Shr(const ArgType *V1, const ArgType *V2) { return 0; } static Constant *LessThan(const ArgType *V1, const ArgType *V2) { return 0; } @@ -378,11 +373,8 @@ static Constant *Mul(const ConstantPacked *V1, const ConstantPacked *V2) { return EvalVectorOp(V1, V2, ConstantExpr::getMul); } - static Constant *UDiv(const ConstantPacked *V1, const ConstantPacked *V2) { - return EvalVectorOp(V1, V2, ConstantExpr::getUDiv); - } - static Constant *SDiv(const ConstantPacked *V1, const ConstantPacked *V2) { - return EvalVectorOp(V1, V2, ConstantExpr::getSDiv); + static Constant *Div(const ConstantPacked *V1, const ConstantPacked *V2) { + return EvalVectorOp(V1, V2, ConstantExpr::getDiv); } static Constant *Rem(const ConstantPacked *V1, const ConstantPacked *V2) { return EvalVectorOp(V1, V2, ConstantExpr::getRem); @@ -448,30 +440,30 @@ : public TemplateRules > { static Constant *Add(const ConstantInt *V1, const ConstantInt *V2) { - BuiltinType R = (BuiltinType)V1->getRawValue() + - (BuiltinType)V2->getRawValue(); + BuiltinType R = (BuiltinType)V1->getZExtValue() + + (BuiltinType)V2->getZExtValue(); return ConstantInt::get(*Ty, R); } static Constant *Sub(const ConstantInt *V1, const ConstantInt *V2) { - BuiltinType R = (BuiltinType)V1->getRawValue() - - (BuiltinType)V2->getRawValue(); + BuiltinType R = (BuiltinType)V1->getZExtValue() - + (BuiltinType)V2->getZExtValue(); return ConstantInt::get(*Ty, R); } static Constant *Mul(const ConstantInt *V1, const ConstantInt *V2) { - BuiltinType R = (BuiltinType)V1->getRawValue() * - (BuiltinType)V2->getRawValue(); + BuiltinType R = (BuiltinType)V1->getZExtValue() * + (BuiltinType)V2->getZExtValue(); return ConstantInt::get(*Ty, R); } static Constant *LessThan(const ConstantInt *V1, const ConstantInt *V2) { - bool R = (BuiltinType)V1->getRawValue() < (BuiltinType)V2->getRawValue(); + bool R = (BuiltinType)V1->getZExtValue() < (BuiltinType)V2->getZExtValue(); return ConstantBool::get(R); } static Constant *EqualTo(const ConstantInt *V1, const ConstantInt *V2) { - bool R = (BuiltinType)V1->getRawValue() == (BuiltinType)V2->getRawValue(); + bool R = (BuiltinType)V1->getZExtValue() == (BuiltinType)V2->getZExtValue(); return ConstantBool::get(R); } @@ -485,7 +477,7 @@ // Casting operators. ick #define DEF_CAST(TYPE, CLASS, CTYPE) \ static Constant *CastTo##TYPE (const ConstantInt *V) { \ - return CLASS::get(Type::TYPE##Ty, (CTYPE)(BuiltinType)V->getRawValue()); \ + return CLASS::get(Type::TYPE##Ty, (CTYPE)(BuiltinType)V->getZExtValue()); \ } DEF_CAST(Bool , ConstantBool, bool) @@ -501,25 +493,13 @@ DEF_CAST(Double, ConstantFP , double) #undef DEF_CAST - static Constant *UDiv(const ConstantInt *V1, const ConstantInt *V2) { - if (V2->isNullValue()) - return 0; - if (V2->isAllOnesValue() && // MIN_INT / -1 - (BuiltinType)V1->getRawValue() == -(BuiltinType)V1->getRawValue()) - return 0; - BuiltinType R = - (BuiltinType)V1->getRawValue() / (BuiltinType)V2->getRawValue(); - return ConstantInt::get(*Ty, R); - } - - static Constant *SDiv(const ConstantInt *V1, const ConstantInt *V2) { - if (V2->isNullValue()) - return 0; + static Constant *Div(const ConstantInt *V1, const ConstantInt *V2) { + if (V2->isNullValue()) return 0; if (V2->isAllOnesValue() && // MIN_INT / -1 - (BuiltinType)V1->getRawValue() == -(BuiltinType)V1->getRawValue()) + (BuiltinType)V1->getZExtValue() == -(BuiltinType)V1->getZExtValue()) return 0; BuiltinType R = - (BuiltinType)V1->getRawValue() / (BuiltinType)V2->getRawValue(); + (BuiltinType)V1->getZExtValue() / (BuiltinType)V2->getZExtValue(); return ConstantInt::get(*Ty, R); } @@ -527,38 +507,38 @@ const ConstantInt *V2) { if (V2->isNullValue()) return 0; // X / 0 if (V2->isAllOnesValue() && // MIN_INT / -1 - (BuiltinType)V1->getRawValue() == -(BuiltinType)V1->getRawValue()) + (BuiltinType)V1->getZExtValue() == -(BuiltinType)V1->getZExtValue()) return 0; BuiltinType R = - (BuiltinType)V1->getRawValue() % (BuiltinType)V2->getRawValue(); + (BuiltinType)V1->getZExtValue() % (BuiltinType)V2->getZExtValue(); return ConstantInt::get(*Ty, R); } static Constant *And(const ConstantInt *V1, const ConstantInt *V2) { BuiltinType R = - (BuiltinType)V1->getRawValue() & (BuiltinType)V2->getRawValue(); + (BuiltinType)V1->getZExtValue() & (BuiltinType)V2->getZExtValue(); return ConstantInt::get(*Ty, R); } static Constant *Or(const ConstantInt *V1, const ConstantInt *V2) { BuiltinType R = - (BuiltinType)V1->getRawValue() | (BuiltinType)V2->getRawValue(); + (BuiltinType)V1->getZExtValue() | (BuiltinType)V2->getZExtValue(); return ConstantInt::get(*Ty, R); } static Constant *Xor(const ConstantInt *V1, const ConstantInt *V2) { BuiltinType R = - (BuiltinType)V1->getRawValue() ^ (BuiltinType)V2->getRawValue(); + (BuiltinType)V1->getZExtValue() ^ (BuiltinType)V2->getZExtValue(); return ConstantInt::get(*Ty, R); } static Constant *Shl(const ConstantInt *V1, const ConstantInt *V2) { BuiltinType R = - (BuiltinType)V1->getRawValue() << (BuiltinType)V2->getRawValue(); + (BuiltinType)V1->getZExtValue() << (BuiltinType)V2->getZExtValue(); return ConstantInt::get(*Ty, R); } static Constant *Shr(const ConstantInt *V1, const ConstantInt *V2) { BuiltinType R = - (BuiltinType)V1->getRawValue() >> (BuiltinType)V2->getRawValue(); + (BuiltinType)V1->getZExtValue() >> (BuiltinType)V2->getZExtValue(); return ConstantInt::get(*Ty, R); } }; @@ -635,14 +615,7 @@ (BuiltinType)V2->getValue()); return ConstantFP::get(*Ty, Result); } - static Constant *UDiv(const ConstantFP *V1, const ConstantFP *V2) { - BuiltinType inf = std::numeric_limits::infinity(); - if (V2->isExactlyValue(0.0)) return ConstantFP::get(*Ty, inf); - if (V2->isExactlyValue(-0.0)) return ConstantFP::get(*Ty, -inf); - BuiltinType R = (BuiltinType)V1->getValue() / (BuiltinType)V2->getValue(); - return ConstantFP::get(*Ty, R); - } - static Constant *SDiv(const ConstantFP *V1, const ConstantFP *V2) { + static Constant *Div(const ConstantFP *V1, const ConstantFP *V2) { BuiltinType inf = std::numeric_limits::infinity(); if (V2->isExactlyValue(0.0)) return ConstantFP::get(*Ty, inf); if (V2->isExactlyValue(-0.0)) return ConstantFP::get(*Ty, -inf); @@ -741,7 +714,7 @@ if (DstEltTy->getTypeID() == Type::DoubleTyID) { for (unsigned i = 0; i != SrcNumElts; ++i) { double V = - BitsToDouble(cast(CP->getOperand(i))->getRawValue()); + BitsToDouble(cast(CP->getOperand(i))->getZExtValue()); Result.push_back(ConstantFP::get(Type::DoubleTy, V)); } return ConstantPacked::get(Result); @@ -749,7 +722,7 @@ assert(DstEltTy == Type::FloatTy && "Unknown fp type!"); for (unsigned i = 0; i != SrcNumElts; ++i) { float V = - BitsToFloat(cast(CP->getOperand(i))->getRawValue()); + BitsToFloat(cast(CP->getOperand(i))->getZExtValue()); Result.push_back(ConstantFP::get(Type::FloatTy, V)); } return ConstantPacked::get(Result); @@ -1251,8 +1224,7 @@ case Instruction::Add: C = ConstRules::get(V1, V2).add(V1, V2); break; case Instruction::Sub: C = ConstRules::get(V1, V2).sub(V1, V2); break; case Instruction::Mul: C = ConstRules::get(V1, V2).mul(V1, V2); break; - case Instruction::UDiv: C = ConstRules::get(V1, V2).udiv(V1, V2); break; - case Instruction::SDiv: C = ConstRules::get(V1, V2).sdiv(V1, V2); break; + case Instruction::Div: C = ConstRules::get(V1, V2).div(V1, V2); break; case Instruction::Rem: C = ConstRules::get(V1, V2).rem(V1, V2); break; case Instruction::And: C = ConstRules::get(V1, V2).op_and(V1, V2); break; case Instruction::Or: C = ConstRules::get(V1, V2).op_or (V1, V2); break; @@ -1335,8 +1307,7 @@ case Instruction::Mul: case Instruction::And: return Constant::getNullValue(V1->getType()); - case Instruction::UDiv: - case Instruction::SDiv: + case Instruction::Div: case Instruction::Rem: if (!isa(V2)) // undef/X -> 0 return Constant::getNullValue(V1->getType()); @@ -1384,18 +1355,17 @@ case Instruction::Mul: if (V2->isNullValue()) return const_cast(V2); // X * 0 == 0 if (const ConstantInt *CI = dyn_cast(V2)) - if (CI->getRawValue() == 1) + if (CI->getZExtValue() == 1) return const_cast(V1); // X * 1 == X break; - case Instruction::UDiv: - case Instruction::SDiv: + case Instruction::Div: if (const ConstantInt *CI = dyn_cast(V2)) - if (CI->getRawValue() == 1) + if (CI->getZExtValue() == 1) return const_cast(V1); // X / 1 == X break; case Instruction::Rem: if (const ConstantInt *CI = dyn_cast(V2)) - if (CI->getRawValue() == 1) + if (CI->getZExtValue() == 1) return Constant::getNullValue(CI->getType()); // X % 1 == 0 break; case Instruction::And: @@ -1409,7 +1379,7 @@ // Functions are at least 4-byte aligned. If and'ing the address of a // function with a constant < 4, fold it to zero. if (const ConstantInt *CI = dyn_cast(V2)) - if (CI->getRawValue() < 4 && isa(CPR)) + if (CI->getZExtValue() < 4 && isa(CPR)) return Constant::getNullValue(CI->getType()); } break; @@ -1449,8 +1419,7 @@ case Instruction::Shl: case Instruction::Shr: case Instruction::Sub: - case Instruction::SDiv: - case Instruction::UDiv: + case Instruction::Div: case Instruction::Rem: default: // These instructions cannot be flopped around. break; Index: llvm/lib/VMCore/Constants.cpp diff -u llvm/lib/VMCore/Constants.cpp:1.163.2.2 llvm/lib/VMCore/Constants.cpp:1.163.2.3 --- llvm/lib/VMCore/Constants.cpp:1.163.2.2 Thu Oct 19 14:53:31 2006 +++ llvm/lib/VMCore/Constants.cpp Thu Oct 19 19:34:44 2006 @@ -66,35 +66,35 @@ return NullBool; } case Type::SByteTyID: { - static Constant *NullSByte = ConstantInt::get(Type::SByteTy, int8_t(0)); + static Constant *NullSByte = ConstantInt::get(Type::SByteTy, 0); return NullSByte; } case Type::UByteTyID: { - static Constant *NullUByte = ConstantInt::get(Type::UByteTy, uint8_t(0)); + static Constant *NullUByte = ConstantInt::get(Type::UByteTy, 0); return NullUByte; } case Type::ShortTyID: { - static Constant *NullShort = ConstantInt::get(Type::ShortTy, int16_t(0)); + static Constant *NullShort = ConstantInt::get(Type::ShortTy, 0); return NullShort; } case Type::UShortTyID: { - static Constant *NullUShort = ConstantInt::get(Type::UShortTy, uint16_t(0)); + static Constant *NullUShort = ConstantInt::get(Type::UShortTy, 0); return NullUShort; } case Type::IntTyID: { - static Constant *NullInt = ConstantInt::get(Type::IntTy, int32_t(0)); + static Constant *NullInt = ConstantInt::get(Type::IntTy, 0); return NullInt; } case Type::UIntTyID: { - static Constant *NullUInt = ConstantInt::get(Type::UIntTy, uint32_t(0)); + static Constant *NullUInt = ConstantInt::get(Type::UIntTy, 0); return NullUInt; } case Type::LongTyID: { - static Constant *NullLong = ConstantInt::get(Type::LongTy, int64_t(0)); + static Constant *NullLong = ConstantInt::get(Type::LongTy, 0); return NullLong; } case Type::ULongTyID: { - static Constant *NullULong = ConstantInt::get(Type::ULongTy, uint64_t(0)); + static Constant *NullULong = ConstantInt::get(Type::ULongTy, 0); return NullULong; } @@ -176,7 +176,7 @@ case Type::SByteTyID: case Type::ShortTyID: case Type::IntTyID: - case Type::LongTyID: return ConstantInt::get(Ty, int32_t(-1)); + case Type::LongTyID: return ConstantInt::get(Ty, -1); case Type::UByteTyID: case Type::UShortTyID: @@ -201,12 +201,7 @@ ConstantIntegral::ConstantIntegral(const Type *Ty, ValueTy VT, uint64_t V) : Constant(Ty, VT, 0, 0) { - Val.Unsigned = V; -} - -ConstantIntegral::ConstantIntegral(const Type *Ty, ValueTy VT, int64_t V) - : Constant(Ty, VT, 0, 0) { - Val.Signed = V; + Val.Unsigned = V; } ConstantBool::ConstantBool(bool V) @@ -217,10 +212,6 @@ : ConstantIntegral(Ty, ConstantIntVal, V) { } -ConstantInt::ConstantInt(const Type *Ty, int64_t V) - : ConstantIntegral(Ty, ConstantIntVal, V) { -} - ConstantFP::ConstantFP(const Type *Ty, double V) : Constant(Ty, ConstantFPVal, 0, 0) { assert(isValueValidForType(Ty, V) && "Value too large for type!"); @@ -429,11 +420,8 @@ Constant *ConstantExpr::getMul(Constant *C1, Constant *C2) { return get(Instruction::Mul, C1, C2); } -Constant *ConstantExpr::getUDiv(Constant *C1, Constant *C2) { - return get(Instruction::UDiv, C1, C2); -} -Constant *ConstantExpr::getSDiv(Constant *C1, Constant *C2) { - return get(Instruction::SDiv, C1, C2); +Constant *ConstantExpr::getDiv(Constant *C1, Constant *C2) { + return get(Instruction::Div, C1, C2); } Constant *ConstantExpr::getRem(Constant *C1, Constant *C2) { return get(Instruction::Rem, C1, C2); @@ -898,36 +886,15 @@ // static ManagedStatic > IntConstants; +// Get a ConstantInt from an int64_t. Note here that we canoncialize the value +// to a uint64_t value that has been zero extended down to the size of the +// integer type of the ConstantInt. This allows the getZExtValue method to +// just return the stored value while getSExtValue has to convert back to sign +// extended. getZExtValue is more common in LLVM than getSExtValue(). ConstantInt *ConstantInt::get(const Type *Ty, int64_t V) { - return IntConstants->getOrCreate(Ty, uint64_t(V)); -} - -ConstantInt *ConstantInt::get(const Type *Ty, int32_t V) { - return IntConstants->getOrCreate(Ty, uint64_t(V)); -} - -ConstantInt *ConstantInt::get(const Type *Ty, int16_t V) { - return IntConstants->getOrCreate(Ty, uint64_t(V)); -} - -ConstantInt *ConstantInt::get(const Type *Ty, int8_t V) { - return IntConstants->getOrCreate(Ty, uint64_t(V)); -} - -ConstantInt *ConstantInt::get(const Type *Ty, uint64_t V) { - return IntConstants->getOrCreate(Ty, uint64_t(V)); -} - -ConstantInt *ConstantInt::get(const Type *Ty, uint32_t V) { - return IntConstants->getOrCreate(Ty, uint64_t(V)); -} - -ConstantInt *ConstantInt::get(const Type *Ty, uint16_t V) { - return IntConstants->getOrCreate(Ty, uint64_t(V)); -} - -ConstantInt *ConstantInt::get(const Type *Ty, uint8_t V) { - return IntConstants->getOrCreate(Ty, uint64_t(V)); + unsigned Size = Ty->getPrimitiveSizeInBits(); + uint64_t ZeroExtendedCanonicalization = V & (~uint64_t(0UL) >> (64-Size)); + return IntConstants->getOrCreate(Ty, ZeroExtendedCanonicalization ); } //---- ConstantFP::get() implementation... @@ -1106,7 +1073,7 @@ assert(isString() && "Not a string!"); std::string Result; for (unsigned i = 0, e = getNumOperands(); i != e; ++i) - Result += (char)cast(getOperand(i))->getRawValue(); + Result += (char)cast(getOperand(i))->getZExtValue(); return Result; } @@ -1470,7 +1437,7 @@ #ifndef NDEBUG switch (Opcode) { case Instruction::Add: case Instruction::Sub: - case Instruction::Mul: case Instruction::UDiv: case Instruction::SDiv: + case Instruction::Mul: case Instruction::Div: case Instruction::Rem: assert(C1->getType() == C2->getType() && "Op types should be identical!"); assert((C1->getType()->isInteger() || C1->getType()->isFloatingPoint() || @@ -1917,7 +1884,7 @@ if (CE->getNumOperands() == 3 && cast(CE->getOperand(1))->isNullValue() && isa(CE->getOperand(2))) { - Offset += cast(CE->getOperand(2))->getRawValue(); + Offset += cast(CE->getOperand(2))->getZExtValue(); return CE->getOperand(0)->getStringValue(Chop, Offset); } } Index: llvm/lib/VMCore/Instruction.cpp diff -u llvm/lib/VMCore/Instruction.cpp:1.53.2.1 llvm/lib/VMCore/Instruction.cpp:1.53.2.2 --- llvm/lib/VMCore/Instruction.cpp:1.53.2.1 Thu Oct 19 14:53:31 2006 +++ llvm/lib/VMCore/Instruction.cpp Thu Oct 19 19:34:44 2006 @@ -94,8 +94,7 @@ case Add: return "add"; case Sub: return "sub"; case Mul: return "mul"; - case UDiv: return "udiv"; - case SDiv: return "sdiv"; + case Div: return "div"; case Rem: return "rem"; // Logical operators... @@ -222,8 +221,7 @@ /// bool Instruction::isTrapping(unsigned op) { switch(op) { - case SDiv: - case UDiv: + case Div: case Rem: case Load: case Store: Index: llvm/lib/VMCore/Instructions.cpp diff -u llvm/lib/VMCore/Instructions.cpp:1.42.2.2 llvm/lib/VMCore/Instructions.cpp:1.42.2.3 --- llvm/lib/VMCore/Instructions.cpp:1.42.2.2 Thu Oct 19 14:53:31 2006 +++ llvm/lib/VMCore/Instructions.cpp Thu Oct 19 19:34:44 2006 @@ -1022,7 +1022,7 @@ #ifndef NDEBUG switch (iType) { case Add: case Sub: - case Mul: case UDiv: case SDiv: + case Mul: case Div: case Rem: assert(getType() == LHS->getType() && "Arithmetic operation should return same type as operands!"); From reid at x10sys.com Thu Oct 19 19:35:19 2006 From: reid at x10sys.com (Reid Spencer) Date: Thu, 19 Oct 2006 19:35:19 -0500 Subject: [llvm-commits] [SignlessTypes] CVS: llvm/lib/Analysis/BasicAliasAnalysis.cpp ConstantRange.cpp ScalarEvolution.cpp ScalarEvolutionExpander.cpp Message-ID: <200610200035.k9K0ZJE0001610@zion.cs.uiuc.edu> Changes in directory llvm/lib/Analysis: BasicAliasAnalysis.cpp updated: 1.86.2.1 -> 1.86.2.2 ConstantRange.cpp updated: 1.15.2.1 -> 1.15.2.2 ScalarEvolution.cpp updated: 1.53.2.1 -> 1.53.2.2 ScalarEvolutionExpander.cpp updated: 1.3 -> 1.3.6.1 --- Log message: Make some simplifications for ConstantInt: 1. Get rid of getRawValue, replace with getZExtValue 2. Single constructor (uint64_t) and get method (int64_t) 3. Canonicalize the constant to a zero extended unsigned 64-bit integer when it is created. 4. Adjust getZExtValue() to be a do-nothing (just returns the already canonicalized value). 5. Compensate for above changes everywhere else. --- Diffs of the changes: (+7 -7) BasicAliasAnalysis.cpp | 4 ++-- ConstantRange.cpp | 2 +- ScalarEvolution.cpp | 6 +++--- ScalarEvolutionExpander.cpp | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) Index: llvm/lib/Analysis/BasicAliasAnalysis.cpp diff -u llvm/lib/Analysis/BasicAliasAnalysis.cpp:1.86.2.1 llvm/lib/Analysis/BasicAliasAnalysis.cpp:1.86.2.2 --- llvm/lib/Analysis/BasicAliasAnalysis.cpp:1.86.2.1 Wed Oct 18 22:57:55 2006 +++ llvm/lib/Analysis/BasicAliasAnalysis.cpp Thu Oct 19 19:34:43 2006 @@ -669,7 +669,7 @@ if (const ConstantInt *Op1C = dyn_cast(Op1)) { // If this is an array index, make sure the array element is in range. if (const ArrayType *AT = dyn_cast(BasePtr1Ty)) - if (Op1C->getRawValue() >= AT->getNumElements()) + if (Op1C->getZExtValue() >= AT->getNumElements()) return MayAlias; // Be conservative with out-of-range accesses } else { @@ -692,7 +692,7 @@ if (const ConstantInt *Op2C = dyn_cast(Op2)) { // If this is an array index, make sure the array element is in range. if (const ArrayType *AT = dyn_cast(BasePtr1Ty)) - if (Op2C->getRawValue() >= AT->getNumElements()) + if (Op2C->getZExtValue() >= AT->getNumElements()) return MayAlias; // Be conservative with out-of-range accesses } else { // Conservatively assume the minimum value for this index GEP2Ops[i] = Constant::getNullValue(Op2->getType()); Index: llvm/lib/Analysis/ConstantRange.cpp diff -u llvm/lib/Analysis/ConstantRange.cpp:1.15.2.1 llvm/lib/Analysis/ConstantRange.cpp:1.15.2.2 --- llvm/lib/Analysis/ConstantRange.cpp:1.15.2.1 Wed Oct 18 22:57:55 2006 +++ llvm/lib/Analysis/ConstantRange.cpp Thu Oct 19 19:34:43 2006 @@ -161,7 +161,7 @@ // Simply subtract the bounds... Constant *Result = ConstantExpr::getSub(Upper, Lower); - return cast(Result)->getRawValue(); + return cast(Result)->getZExtValue(); } /// contains - Return true if the specified value is in the set. Index: llvm/lib/Analysis/ScalarEvolution.cpp diff -u llvm/lib/Analysis/ScalarEvolution.cpp:1.53.2.1 llvm/lib/Analysis/ScalarEvolution.cpp:1.53.2.2 --- llvm/lib/Analysis/ScalarEvolution.cpp:1.53.2.1 Wed Oct 18 22:57:55 2006 +++ llvm/lib/Analysis/ScalarEvolution.cpp Thu Oct 19 19:34:43 2006 @@ -507,7 +507,7 @@ // Handle this case efficiently, it is common to have constant iteration // counts while computing loop exit values. if (SCEVConstant *SC = dyn_cast(V)) { - uint64_t Val = SC->getValue()->getRawValue(); + uint64_t Val = SC->getValue()->getZExtValue(); uint64_t Result = 1; for (; NumSteps; --NumSteps) Result *= Val-(NumSteps-1); @@ -1605,7 +1605,7 @@ const std::vector &Indices) { Constant *Init = GV->getInitializer(); for (unsigned i = 0, e = Indices.size(); i != e; ++i) { - uint64_t Idx = Indices[i]->getRawValue(); + uint64_t Idx = Indices[i]->getZExtValue(); if (ConstantStruct *CS = dyn_cast(Init)) { assert(Idx < CS->getNumOperands() && "Bad struct index!"); Init = cast(CS->getOperand(Idx)); @@ -1935,7 +1935,7 @@ // this is a constant evolving PHI node, get the final value at // the specified iteration number. Constant *RV = getConstantEvolutionLoopExitValue(PN, - ICC->getValue()->getRawValue(), + ICC->getValue()->getZExtValue(), LI); if (RV) return SCEVUnknown::get(RV); } Index: llvm/lib/Analysis/ScalarEvolutionExpander.cpp diff -u llvm/lib/Analysis/ScalarEvolutionExpander.cpp:1.3 llvm/lib/Analysis/ScalarEvolutionExpander.cpp:1.3.6.1 --- llvm/lib/Analysis/ScalarEvolutionExpander.cpp:1.3 Sat Feb 4 03:51:53 2006 +++ llvm/lib/Analysis/ScalarEvolutionExpander.cpp Thu Oct 19 19:34:43 2006 @@ -144,7 +144,7 @@ // IF the step is by one, just return the inserted IV. if (ConstantIntegral *CI = dyn_cast(F)) - if (CI->getRawValue() == 1) + if (CI->getZExtValue() == 1) return I; // If the insert point is directly inside of the loop, emit the multiply at From reid at x10sys.com Thu Oct 19 19:35:18 2006 From: reid at x10sys.com (Reid Spencer) Date: Thu, 19 Oct 2006 19:35:18 -0500 Subject: [llvm-commits] [SignlessTypes] CVS: llvm/lib/Target/X86/X86IntelAsmPrinter.cpp Message-ID: <200610200035.k9K0ZImd001599@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: X86IntelAsmPrinter.cpp updated: 1.60 -> 1.60.2.1 --- Log message: Make some simplifications for ConstantInt: 1. Get rid of getRawValue, replace with getZExtValue 2. Single constructor (uint64_t) and get method (int64_t) 3. Canonicalize the constant to a zero extended unsigned 64-bit integer when it is created. 4. Adjust getZExtValue() to be a do-nothing (just returns the already canonicalized value). 5. Compensate for above changes everywhere else. --- Diffs of the changes: (+1 -1) X86IntelAsmPrinter.cpp | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/lib/Target/X86/X86IntelAsmPrinter.cpp diff -u llvm/lib/Target/X86/X86IntelAsmPrinter.cpp:1.60 llvm/lib/Target/X86/X86IntelAsmPrinter.cpp:1.60.2.1 --- llvm/lib/Target/X86/X86IntelAsmPrinter.cpp:1.60 Wed Oct 4 22:01:21 2006 +++ llvm/lib/Target/X86/X86IntelAsmPrinter.cpp Thu Oct 19 19:34:44 2006 @@ -474,7 +474,7 @@ unsigned len = 0; bool inString = false; for (unsigned i = 0; i < NumElts; i++) { - int n = cast(CVA->getOperand(i))->getRawValue() & 255; + int n = cast(CVA->getOperand(i))->getZExtValue() & 255; if (len == 0) O << "\tdb "; From reid at x10sys.com Thu Oct 19 19:35:13 2006 From: reid at x10sys.com (Reid Spencer) Date: Thu, 19 Oct 2006 19:35:13 -0500 Subject: [llvm-commits] [SignlessTypes] CVS: llvm/lib/Transforms/TransformInternals.h Message-ID: <200610200035.k9K0ZDq9001544@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms: TransformInternals.h updated: 1.27 -> 1.27.10.1 --- Log message: Make some simplifications for ConstantInt: 1. Get rid of getRawValue, replace with getZExtValue 2. Single constructor (uint64_t) and get method (int64_t) 3. Canonicalize the constant to a zero extended unsigned 64-bit integer when it is created. 4. Adjust getZExtValue() to be a do-nothing (just returns the already canonicalized value). 5. Compensate for above changes everywhere else. --- Diffs of the changes: (+1 -1) TransformInternals.h | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/lib/Transforms/TransformInternals.h diff -u llvm/lib/Transforms/TransformInternals.h:1.27 llvm/lib/Transforms/TransformInternals.h:1.27.10.1 --- llvm/lib/Transforms/TransformInternals.h:1.27 Tue Jul 26 11:38:28 2005 +++ llvm/lib/Transforms/TransformInternals.h Thu Oct 19 19:34:44 2006 @@ -25,7 +25,7 @@ namespace llvm { static inline int64_t getConstantValue(const ConstantInt *CPI) { - return (int64_t)cast(CPI)->getRawValue(); + return (int64_t)cast(CPI)->getZExtValue(); } From reid at x10sys.com Thu Oct 19 19:35:16 2006 From: reid at x10sys.com (Reid Spencer) Date: Thu, 19 Oct 2006 19:35:16 -0500 Subject: [llvm-commits] [SignlessTypes] CVS: llvm/lib/CodeGen/AsmPrinter.cpp IntrinsicLowering.cpp Message-ID: <200610200035.k9K0ZGB9001573@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: AsmPrinter.cpp updated: 1.111.2.1 -> 1.111.2.2 IntrinsicLowering.cpp updated: 1.43.6.1 -> 1.43.6.2 --- Log message: Make some simplifications for ConstantInt: 1. Get rid of getRawValue, replace with getZExtValue 2. Single constructor (uint64_t) and get method (int64_t) 3. Canonicalize the constant to a zero extended unsigned 64-bit integer when it is created. 4. Adjust getZExtValue() to be a do-nothing (just returns the already canonicalized value). 5. Compensate for above changes everywhere else. --- Diffs of the changes: (+13 -21) AsmPrinter.cpp | 6 +++--- IntrinsicLowering.cpp | 28 ++++++++++------------------ 2 files changed, 13 insertions(+), 21 deletions(-) Index: llvm/lib/CodeGen/AsmPrinter.cpp diff -u llvm/lib/CodeGen/AsmPrinter.cpp:1.111.2.1 llvm/lib/CodeGen/AsmPrinter.cpp:1.111.2.2 --- llvm/lib/CodeGen/AsmPrinter.cpp:1.111.2.1 Wed Oct 18 22:57:55 2006 +++ llvm/lib/CodeGen/AsmPrinter.cpp Thu Oct 19 19:34:43 2006 @@ -493,7 +493,7 @@ O << "\""; for (unsigned i = 0; i != LastElt; ++i) { unsigned char C = - (unsigned char)cast(CVA->getOperand(i))->getRawValue(); + (unsigned char)cast(CVA->getOperand(i))->getZExtValue(); if (C == '"') { O << "\\\""; @@ -525,7 +525,7 @@ void AsmPrinter::EmitString(const ConstantArray *CVA) const { unsigned NumElts = CVA->getNumOperands(); if (TAI->getAscizDirective() && NumElts && - cast(CVA->getOperand(NumElts-1))->getRawValue() == 0) { + cast(CVA->getOperand(NumElts-1))->getZExtValue() == 0) { O << TAI->getAscizDirective(); printAsCString(O, CVA, NumElts-1); } else { @@ -605,7 +605,7 @@ } } else if (CV->getType() == Type::ULongTy || CV->getType() == Type::LongTy) { if (const ConstantInt *CI = dyn_cast(CV)) { - uint64_t Val = CI->getRawValue(); + uint64_t Val = CI->getZExtValue(); if (TAI->getData64bitsDirective()) O << TAI->getData64bitsDirective() << Val << "\n"; Index: llvm/lib/CodeGen/IntrinsicLowering.cpp diff -u llvm/lib/CodeGen/IntrinsicLowering.cpp:1.43.6.1 llvm/lib/CodeGen/IntrinsicLowering.cpp:1.43.6.2 --- llvm/lib/CodeGen/IntrinsicLowering.cpp:1.43.6.1 Wed Oct 18 22:57:55 2006 +++ llvm/lib/CodeGen/IntrinsicLowering.cpp Thu Oct 19 19:34:43 2006 @@ -166,12 +166,10 @@ Value *Tmp1 = new ShiftInst(Instruction::Shr, V, ConstantInt::get(Type::UByteTy,24),"bswap.1", IP); Tmp3 = BinaryOperator::createAnd(Tmp3, - ConstantInt::get(Type::UIntTy, - uint32_t(0xFF0000)), + ConstantInt::get(Type::UIntTy, 0xFF0000), "bswap.and3", IP); Tmp2 = BinaryOperator::createAnd(Tmp2, - ConstantInt::get(Type::UIntTy, - uint32_t(0xFF00)), + ConstantInt::get(Type::UIntTy, 0xFF00), "bswap.and2", IP); Tmp4 = BinaryOperator::createOr(Tmp4, Tmp3, "bswap.or1", IP); Tmp2 = BinaryOperator::createOr(Tmp2, Tmp1, "bswap.or2", IP); @@ -197,27 +195,22 @@ ConstantInt::get(Type::UByteTy,56),"bswap.1", IP); Tmp7 = BinaryOperator::createAnd(Tmp7, ConstantInt::get(Type::ULongTy, - uint64_t(0xFF000000000000ULL)), + 0xFF000000000000ULL), "bswap.and7", IP); Tmp6 = BinaryOperator::createAnd(Tmp6, - ConstantInt::get(Type::ULongTy, - uint64_t(0xFF0000000000ULL)), + ConstantInt::get(Type::ULongTy, 0xFF0000000000ULL), "bswap.and6", IP); Tmp5 = BinaryOperator::createAnd(Tmp5, - ConstantInt::get(Type::ULongTy, - uint64_t(0xFF00000000ULL)), + ConstantInt::get(Type::ULongTy, 0xFF00000000ULL), "bswap.and5", IP); Tmp4 = BinaryOperator::createAnd(Tmp4, - ConstantInt::get(Type::ULongTy, - uint64_t(0xFF000000ULL)), + ConstantInt::get(Type::ULongTy, 0xFF000000ULL), "bswap.and4", IP); Tmp3 = BinaryOperator::createAnd(Tmp3, - ConstantInt::get(Type::ULongTy, - uint64_t(0xFF0000ULL)), + ConstantInt::get(Type::ULongTy, 0xFF0000ULL), "bswap.and3", IP); Tmp2 = BinaryOperator::createAnd(Tmp2, - ConstantInt::get(Type::ULongTy, - uint64_t(0xFF00ULL)), + ConstantInt::get(Type::ULongTy, 0xFF00ULL), "bswap.and2", IP); Tmp8 = BinaryOperator::createOr(Tmp8, Tmp7, "bswap.or1", IP); Tmp6 = BinaryOperator::createOr(Tmp6, Tmp5, "bswap.or2", IP); @@ -255,8 +248,7 @@ unsigned BitSize = V->getType()->getPrimitiveSizeInBits(); for (unsigned i = 1, ct = 0; i != BitSize; i <<= 1, ++ct) { Value *MaskCst = - ConstantExpr::getCast(ConstantInt::get(Type::ULongTy, - uint64_t(MaskValues[ct])), + ConstantExpr::getCast(ConstantInt::get(Type::ULongTy, MaskValues[ct]), V->getType()); Value *LHS = BinaryOperator::createAnd(V, MaskCst, "cppop.and1", IP); Value *VShift = new ShiftInst(Instruction::Shr, V, @@ -404,7 +396,7 @@ case Intrinsic::readcyclecounter: { std::cerr << "WARNING: this target does not support the llvm.readcyclecoun" << "ter intrinsic. It is being lowered to a constant 0\n"; - CI->replaceAllUsesWith(ConstantInt::get(Type::ULongTy, uint32_t(0))); + CI->replaceAllUsesWith(ConstantInt::get(Type::ULongTy, 0)); break; } From reid at x10sys.com Thu Oct 19 19:35:19 2006 From: reid at x10sys.com (Reid Spencer) Date: Thu, 19 Oct 2006 19:35:19 -0500 Subject: [llvm-commits] [SignlessTypes] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp LoopStrengthReduce.cpp LoopUnroll.cpp Reassociate.cpp ScalarReplAggregates.cpp Message-ID: <200610200035.k9K0ZJvc001631@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: InstructionCombining.cpp updated: 1.520.2.1 -> 1.520.2.2 LoopStrengthReduce.cpp updated: 1.89.2.1 -> 1.89.2.2 LoopUnroll.cpp updated: 1.28 -> 1.28.2.1 Reassociate.cpp updated: 1.62 -> 1.62.2.1 ScalarReplAggregates.cpp updated: 1.44.2.1 -> 1.44.2.2 --- Log message: Make some simplifications for ConstantInt: 1. Get rid of getRawValue, replace with getZExtValue 2. Single constructor (uint64_t) and get method (int64_t) 3. Canonicalize the constant to a zero extended unsigned 64-bit integer when it is created. 4. Adjust getZExtValue() to be a do-nothing (just returns the already canonicalized value). 5. Compensate for above changes everywhere else. --- Diffs of the changes: (+50 -50) InstructionCombining.cpp | 78 +++++++++++++++++++++++------------------------ LoopStrengthReduce.cpp | 2 - LoopUnroll.cpp | 4 +- Reassociate.cpp | 2 - ScalarReplAggregates.cpp | 14 ++++---- 5 files changed, 50 insertions(+), 50 deletions(-) Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.520.2.1 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.520.2.2 --- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.520.2.1 Wed Oct 18 22:57:56 2006 +++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp Thu Oct 19 19:34:44 2006 @@ -1798,14 +1798,14 @@ if (Anded == CRHS) { // See if all bits from the first bit set in the Add RHS up are included // in the mask. First, get the rightmost bit. - uint64_t AddRHSV = CRHS->getRawValue(); + uint64_t AddRHSV = CRHS->getZExtValue(); // Form a mask of all bits from the lowest bit added through the top. uint64_t AddRHSHighBits = ~((AddRHSV & -AddRHSV)-1); AddRHSHighBits &= C2->getType()->getIntegralTypeMask(); // See if the and mask includes all of these bits. - uint64_t AddRHSHighBitsAnd = AddRHSHighBits & C2->getRawValue(); + uint64_t AddRHSHighBitsAnd = AddRHSHighBits & C2->getZExtValue(); if (AddRHSHighBits == AddRHSHighBitsAnd) { // Okay, the xform is safe. Insert the new add pronto. @@ -1848,7 +1848,7 @@ // highest order bit set. static bool isSignBit(ConstantInt *CI) { unsigned NumBits = CI->getType()->getPrimitiveSizeInBits(); - return (CI->getRawValue() & (~0ULL >> (64-NumBits))) == (1ULL << (NumBits-1)); + return (CI->getZExtValue() & (~0ULL >> (64-NumBits))) == (1ULL << (NumBits-1)); } /// RemoveNoopCast - Strip off nonconverting casts from the value. @@ -2064,7 +2064,7 @@ if (CI->isAllOnesValue()) // X * -1 == 0 - X return BinaryOperator::createNeg(Op0, I.getName()); - int64_t Val = (int64_t)cast(CI)->getRawValue(); + int64_t Val = (int64_t)cast(CI)->getZExtValue(); if (isPowerOf2_64(Val)) { // Replace X*(2^C) with X << C uint64_t C = Log2_64(Val); return new ShiftInst(Instruction::Shl, Op0, @@ -2290,7 +2290,7 @@ if (RHSI->getOpcode() == Instruction::Shl && isa(RHSI->getOperand(0)) && RHSI->getOperand(0)->getType()->isUnsigned()) { - uint64_t C1 = cast(RHSI->getOperand(0))->getRawValue(); + uint64_t C1 = cast(RHSI->getOperand(0))->getZExtValue(); if (isPowerOf2_64(C1)) { uint64_t C2 = Log2_64(C1); Value *Add = RHSI->getOperand(1); @@ -2515,17 +2515,17 @@ // isOneBitSet - Return true if there is exactly one bit set in the specified // constant. static bool isOneBitSet(const ConstantInt *CI) { - uint64_t V = CI->getRawValue(); + uint64_t V = CI->getZExtValue(); return V && (V & (V-1)) == 0; } #if 0 // Currently unused // isLowOnes - Return true if the constant is of the form 0+1+. static bool isLowOnes(const ConstantInt *CI) { - uint64_t V = CI->getRawValue(); + uint64_t V = CI->getZExtValue(); // There won't be bits set in parts that the type doesn't contain. - V &= ConstantInt::getAllOnesValue(CI->getType())->getRawValue(); + V &= ConstantInt::getAllOnesValue(CI->getType())->getZExtValue(); uint64_t U = V+1; // If it is low ones, this should be a power of two. return U && V && (U & V) == 0; @@ -2535,11 +2535,11 @@ // isHighOnes - Return true if the constant is of the form 1+0+. // This is the same as lowones(~X). static bool isHighOnes(const ConstantInt *CI) { - uint64_t V = ~CI->getRawValue(); + uint64_t V = ~CI->getZExtValue(); if (~V == 0) return false; // 0's does not match "1+" // There won't be bits set in parts that the type doesn't contain. - V &= ConstantInt::getAllOnesValue(CI->getType())->getRawValue(); + V &= ConstantInt::getAllOnesValue(CI->getType())->getZExtValue(); uint64_t U = V+1; // If it is low ones, this should be a power of two. return U && V && (U & V) == 0; @@ -2664,7 +2664,7 @@ // Adding a one to a single bit bit-field should be turned into an XOR // of the bit. First thing to check is to see if this AND is with a // single bit constant. - uint64_t AndRHSV = cast(AndRHS)->getRawValue(); + uint64_t AndRHSV = cast(AndRHS)->getZExtValue(); // Clear bits that are not part of the constant. AndRHSV &= AndRHS->getType()->getIntegralTypeMask(); @@ -2674,7 +2674,7 @@ // Ok, at this point, we know that we are masking the result of the // ADD down to exactly one bit. If the constant we are adding has // no bits set below this bit, then we can eliminate the ADD. - uint64_t AddRHS = cast(OpRHS)->getRawValue(); + uint64_t AddRHS = cast(OpRHS)->getZExtValue(); // Check to see if any bits below the one bit set in AndRHSV are set. if ((AddRHS & (AndRHSV-1)) == 0) { @@ -2810,7 +2810,7 @@ // MSB, so 0x000FFF0, 0x0000FFFF, and 0xFF0000FF are all runs. 0x0F0F0000 is // not, since all 1s are not contiguous. static bool isRunOfOnes(ConstantIntegral *Val, unsigned &MB, unsigned &ME) { - uint64_t V = Val->getRawValue(); + uint64_t V = Val->getZExtValue(); if (!isShiftedMask_64(V)) return false; // look for the first zero bit after the run of ones @@ -2846,7 +2846,7 @@ case Instruction::And: if (ConstantExpr::getAnd(N, Mask) == Mask) { // If the AndRHS is a power of two minus one (0+1+), this is simple. - if ((Mask->getRawValue() & Mask->getRawValue()+1) == 0) + if ((Mask->getZExtValue() & Mask->getZExtValue()+1) == 0) break; // Otherwise, if Mask is 0+1+0+, and if B is known to have the low 0+ @@ -2864,7 +2864,7 @@ case Instruction::Or: case Instruction::Xor: // If the AndRHS is a power of two minus one (0+1+), and N&Mask == 0 - if ((Mask->getRawValue() & Mask->getRawValue()+1) == 0 && + if ((Mask->getZExtValue() & Mask->getZExtValue()+1) == 0 && ConstantExpr::getAnd(N, Mask)->isNullValue()) break; return 0; @@ -3178,7 +3178,7 @@ // defines a byte. We only handle unsigned types here. if (isa(I) && isa(I->getOperand(1))) { // Not shifting the entire input by N-1 bytes? - if (cast(I->getOperand(1))->getRawValue() != + if (cast(I->getOperand(1))->getZExtValue() != 8*(ByteValues.size()-1)) return true; @@ -3209,19 +3209,19 @@ Instruction *SI = cast(Shift); // Make sure that the shift amount is by a multiple of 8 and isn't too big. - if (ShiftAmt->getRawValue() & 7 || - ShiftAmt->getRawValue() > 8*ByteValues.size()) + if (ShiftAmt->getZExtValue() & 7 || + ShiftAmt->getZExtValue() > 8*ByteValues.size()) return true; // Turn 0xFF -> 0, 0xFF00 -> 1, 0xFF0000 -> 2, etc. unsigned DestByte; for (DestByte = 0; DestByte != ByteValues.size(); ++DestByte) - if (AndAmt->getRawValue() == uint64_t(0xFF) << 8*DestByte) + if (AndAmt->getZExtValue() == uint64_t(0xFF) << 8*DestByte) break; // Unknown mask for bswap. if (DestByte == ByteValues.size()) return true; - unsigned ShiftBytes = ShiftAmt->getRawValue()/8; + unsigned ShiftBytes = ShiftAmt->getZExtValue()/8; unsigned SrcByte; if (SI->getOpcode() == Instruction::Shl) SrcByte = DestByte - ShiftBytes; @@ -3382,7 +3382,7 @@ // replace with V+N. if (C1 == ConstantExpr::getNot(C2)) { Value *V1 = 0, *V2 = 0; - if ((C2->getRawValue() & (C2->getRawValue()+1)) == 0 && // C2 == 0+1+ + if ((C2->getZExtValue() & (C2->getZExtValue()+1)) == 0 && // C2 == 0+1+ match(A, m_Add(m_Value(V1), m_Value(V2)))) { // Add commutes, try both ways. if (V1 == B && MaskedValueIsZero(V2, C2->getZExtValue())) @@ -3391,7 +3391,7 @@ return ReplaceInstUsesWith(I, A); } // Or commutes, try both ways. - if ((C1->getRawValue() & (C1->getRawValue()+1)) == 0 && + if ((C1->getZExtValue() & (C1->getZExtValue()+1)) == 0 && match(B, m_Add(m_Value(V1), m_Value(V2)))) { // Add commutes, try both ways. if (V1 == A && MaskedValueIsZero(V2, C1->getZExtValue())) @@ -5082,7 +5082,7 @@ // operation. // if (isValid && !isLeftShift && isSignedShift) { - uint64_t Val = Op0C->getRawValue(); + uint64_t Val = Op0C->getZExtValue(); isValid = ((Val & (1 << (TypeBits-1))) != 0) == highBitSet; } @@ -5961,9 +5961,9 @@ if (ConstantInt *TrueValC = dyn_cast(TrueVal)) if (ConstantInt *FalseValC = dyn_cast(FalseVal)) { // select C, 1, 0 -> cast C to int - if (FalseValC->isNullValue() && TrueValC->getRawValue() == 1) { + if (FalseValC->isNullValue() && TrueValC->getZExtValue() == 1) { return new CastInst(CondVal, SI.getType()); - } else if (TrueValC->isNullValue() && FalseValC->getRawValue() == 1) { + } else if (TrueValC->isNullValue() && FalseValC->getZExtValue() == 1) { // select C, 0, 1 -> cast !C to int Value *NotCond = InsertNewInstBefore(BinaryOperator::createNot(CondVal, @@ -5983,7 +5983,7 @@ IC->getOpcode() == Instruction::SetLT; else { unsigned Bits = CmpCst->getType()->getPrimitiveSizeInBits(); - CanXForm = (CmpCst->getRawValue() == ~0ULL >> (64-Bits+1)) && + CanXForm = (CmpCst->getZExtValue() == ~0ULL >> (64-Bits+1)) && IC->getOpcode() == Instruction::SetGT; } @@ -6265,7 +6265,7 @@ if (NumBytes->isNullValue()) return EraseInstFromFunction(CI); if (ConstantInt *CI = dyn_cast(NumBytes)) - if (CI->getRawValue() == 1) { + if (CI->getZExtValue() == 1) { // Replace the instruction with just byte operations. We would // transform other cases to loads/stores, but we don't know if // alignment is sufficient. @@ -6298,13 +6298,13 @@ unsigned Alignment1 = GetKnownAlignment(MI->getOperand(1), TD); unsigned Alignment2 = GetKnownAlignment(MI->getOperand(2), TD); unsigned Align = std::min(Alignment1, Alignment2); - if (MI->getAlignment()->getRawValue() < Align) { + if (MI->getAlignment()->getZExtValue() < Align) { MI->setAlignment(ConstantInt::get(Type::UIntTy, Align)); Changed = true; } } else if (isa(MI)) { unsigned Alignment = GetKnownAlignment(MI->getDest(), TD); - if (MI->getAlignment()->getRawValue() < Alignment) { + if (MI->getAlignment()->getZExtValue() < Alignment) { MI->setAlignment(ConstantInt::get(Type::UIntTy, Alignment)); Changed = true; } @@ -6388,7 +6388,7 @@ for (unsigned i = 0; i != 16; ++i) { if (isa(Mask->getOperand(i))) continue; - unsigned Idx =cast(Mask->getOperand(i))->getRawValue(); + unsigned Idx =cast(Mask->getOperand(i))->getZExtValue(); Idx &= 31; // Match the hardware behavior. if (ExtractedElts[Idx] == 0) { @@ -7086,11 +7086,11 @@ // If the index will be to exactly the right offset with the scale taken // out, perform the transformation. - if (Scale && Scale->getRawValue() % ArrayEltSize == 0) { + if (Scale && Scale->getZExtValue() % ArrayEltSize == 0) { if (ConstantInt *C = dyn_cast(Scale)) Scale = ConstantInt::get(Scale->getType(), - Scale->getRawValue() / ArrayEltSize); - if (Scale->getRawValue() != 1) { + Scale->getZExtValue() / ArrayEltSize); + if (Scale->getZExtValue() != 1) { Constant *C = ConstantExpr::getCast(Scale, NewIdx->getType()); Instruction *Sc = BinaryOperator::createMul(NewIdx, C, "idxscale"); NewIdx = InsertNewInstBefore(Sc, GEP); @@ -7887,7 +7887,7 @@ if (!isa(IdxOp)) return false; - unsigned InsertedIdx = cast(IdxOp)->getRawValue(); + unsigned InsertedIdx = cast(IdxOp)->getZExtValue(); if (isa(ScalarOp)) { // inserting undef into vector. // Okay, we can handle this if the vector we are insertinting into is @@ -7901,7 +7901,7 @@ if (isa(EI->getOperand(1)) && EI->getOperand(0)->getType() == V->getType()) { unsigned ExtractedIdx = - cast(EI->getOperand(1))->getRawValue(); + cast(EI->getOperand(1))->getZExtValue(); // This must be extracting from either LHS or RHS. if (EI->getOperand(0) == LHS || EI->getOperand(0) == RHS) { @@ -7955,8 +7955,8 @@ if (isa(EI->getOperand(1)) && isa(IdxOp) && EI->getOperand(0)->getType() == V->getType()) { unsigned ExtractedIdx = - cast(EI->getOperand(1))->getRawValue(); - unsigned InsertedIdx = cast(IdxOp)->getRawValue(); + cast(EI->getOperand(1))->getZExtValue(); + unsigned InsertedIdx = cast(IdxOp)->getZExtValue(); // Either the extracted from or inserted into vector must be RHSVec, // otherwise we'd end up with a shuffle of three inputs. @@ -8005,8 +8005,8 @@ if (isa(EI->getOperand(1)) && isa(IdxOp) && EI->getOperand(0)->getType() == IE.getType()) { unsigned NumVectorElts = IE.getType()->getNumElements(); - unsigned ExtractedIdx=cast(EI->getOperand(1))->getRawValue(); - unsigned InsertedIdx = cast(IdxOp)->getRawValue(); + unsigned ExtractedIdx=cast(EI->getOperand(1))->getZExtValue(); + unsigned InsertedIdx = cast(IdxOp)->getZExtValue(); if (ExtractedIdx >= NumVectorElts) // Out of range extract. return ReplaceInstUsesWith(IE, VecOp); Index: llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp diff -u llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:1.89.2.1 llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:1.89.2.2 --- llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:1.89.2.1 Wed Oct 18 22:57:56 2006 +++ llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp Thu Oct 19 19:34:44 2006 @@ -861,7 +861,7 @@ /// static bool isZero(SCEVHandle &V) { if (SCEVConstant *SC = dyn_cast(V)) - return SC->getValue()->getRawValue() == 0; + return SC->getValue()->getZExtValue() == 0; return false; } Index: llvm/lib/Transforms/Scalar/LoopUnroll.cpp diff -u llvm/lib/Transforms/Scalar/LoopUnroll.cpp:1.28 llvm/lib/Transforms/Scalar/LoopUnroll.cpp:1.28.2.1 --- llvm/lib/Transforms/Scalar/LoopUnroll.cpp:1.28 Tue Aug 29 01:10:56 2006 +++ llvm/lib/Transforms/Scalar/LoopUnroll.cpp Thu Oct 19 19:34:44 2006 @@ -190,8 +190,8 @@ ConstantInt *TripCountC = dyn_cast_or_null(L->getTripCount()); if (!TripCountC) return Changed; // Must have constant trip count! - uint64_t TripCountFull = TripCountC->getRawValue(); - if (TripCountFull != TripCountC->getRawValue() || TripCountFull == 0) + uint64_t TripCountFull = TripCountC->getZExtValue(); + if (TripCountFull != TripCountC->getZExtValue() || TripCountFull == 0) return Changed; // More than 2^32 iterations??? unsigned LoopSize = ApproximateLoopSize(L); Index: llvm/lib/Transforms/Scalar/Reassociate.cpp diff -u llvm/lib/Transforms/Scalar/Reassociate.cpp:1.62 llvm/lib/Transforms/Scalar/Reassociate.cpp:1.62.2.1 --- llvm/lib/Transforms/Scalar/Reassociate.cpp:1.62 Sun Aug 27 17:42:52 2006 +++ llvm/lib/Transforms/Scalar/Reassociate.cpp Thu Oct 19 19:34:44 2006 @@ -549,7 +549,7 @@ if (CstVal->isNullValue()) { // ... * 0 -> 0 ++NumAnnihil; return CstVal; - } else if (cast(CstVal)->getRawValue() == 1) { + } else if (cast(CstVal)->getZExtValue() == 1) { Ops.pop_back(); // ... * 1 -> ... } break; Index: llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp diff -u llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp:1.44.2.1 llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp:1.44.2.2 --- llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp:1.44.2.1 Wed Oct 18 22:57:56 2006 +++ llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp Thu Oct 19 19:34:44 2006 @@ -203,7 +203,7 @@ GetElementPtrInst *GEPI = cast(User); // We now know that the GEP is of the form: GEP , 0, unsigned Idx = - (unsigned)cast(GEPI->getOperand(2))->getRawValue(); + (unsigned)cast(GEPI->getOperand(2))->getZExtValue(); assert(Idx < ElementAllocas.size() && "Index out of range?"); AllocaInst *AllocaToUse = ElementAllocas[Idx]; @@ -306,7 +306,7 @@ // Check to make sure that index falls within the array. If not, // something funny is going on, so we won't do the optimization. // - if (cast(GEPI->getOperand(2))->getRawValue() >= NumElements) + if (cast(GEPI->getOperand(2))->getZExtValue() >= NumElements) return 0; // We cannot scalar repl this level of the array unless any array @@ -320,7 +320,7 @@ const ArrayType *SubArrayTy = cast(*I); uint64_t NumElements = SubArrayTy->getNumElements(); if (!isa(I.getOperand())) return 0; - if (cast(I.getOperand())->getRawValue() >= NumElements) + if (cast(I.getOperand())->getZExtValue() >= NumElements) return 0; } @@ -499,7 +499,7 @@ } else if (GetElementPtrInst *GEP = dyn_cast(User)) { // Check to see if this is stepping over an element: GEP Ptr, int C if (GEP->getNumOperands() == 2 && isa(GEP->getOperand(1))) { - unsigned Idx = cast(GEP->getOperand(1))->getRawValue(); + unsigned Idx = cast(GEP->getOperand(1))->getZExtValue(); unsigned ElSize = TD.getTypeSize(PTy->getElementType()); unsigned BitOffset = Idx*ElSize*8; if (BitOffset > 64 || !isPowerOf2_32(ElSize)) return 0; @@ -520,7 +520,7 @@ // We are stepping into an element, e.g. a structure or an array: // GEP Ptr, int 0, uint C const Type *AggTy = PTy->getElementType(); - unsigned Idx = cast(GEP->getOperand(2))->getRawValue(); + unsigned Idx = cast(GEP->getOperand(2))->getZExtValue(); if (const ArrayType *ATy = dyn_cast(AggTy)) { if (Idx >= ATy->getNumElements()) return 0; // Out of range. @@ -688,7 +688,7 @@ // Check to see if this is stepping over an element: GEP Ptr, int C unsigned NewOffset = Offset; if (GEP->getNumOperands() == 2) { - unsigned Idx = cast(GEP->getOperand(1))->getRawValue(); + unsigned Idx = cast(GEP->getOperand(1))->getZExtValue(); unsigned BitOffset = Idx*AggSizeInBits; if (TD.isLittleEndian() || isVectorInsert) @@ -698,7 +698,7 @@ } else if (GEP->getNumOperands() == 3) { // We know that operand #2 is zero. - unsigned Idx = cast(GEP->getOperand(2))->getRawValue(); + unsigned Idx = cast(GEP->getOperand(2))->getZExtValue(); const Type *AggTy = AggPtrTy->getElementType(); if (const SequentialType *SeqTy = dyn_cast(AggTy)) { unsigned ElSizeBits = TD.getTypeSize(SeqTy->getElementType())*8; From reid at x10sys.com Thu Oct 19 19:35:19 2006 From: reid at x10sys.com (Reid Spencer) Date: Thu, 19 Oct 2006 19:35:19 -0500 Subject: [llvm-commits] [SignlessTypes] CVS: llvm/lib/Transforms/IPO/ArgumentPromotion.cpp GlobalOpt.cpp SimplifyLibCalls.cpp Message-ID: <200610200035.k9K0ZJDj001619@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/IPO: ArgumentPromotion.cpp updated: 1.27 -> 1.27.2.1 GlobalOpt.cpp updated: 1.68.2.1 -> 1.68.2.2 SimplifyLibCalls.cpp updated: 1.69.2.1 -> 1.69.2.2 --- Log message: Make some simplifications for ConstantInt: 1. Get rid of getRawValue, replace with getZExtValue 2. Single constructor (uint64_t) and get method (int64_t) 3. Canonicalize the constant to a zero extended unsigned 64-bit integer when it is created. 4. Adjust getZExtValue() to be a do-nothing (just returns the already canonicalized value). 5. Compensate for above changes everywhere else. --- Diffs of the changes: (+32 -33) ArgumentPromotion.cpp | 6 +++--- GlobalOpt.cpp | 21 ++++++++++----------- SimplifyLibCalls.cpp | 38 +++++++++++++++++++------------------- 3 files changed, 32 insertions(+), 33 deletions(-) Index: llvm/lib/Transforms/IPO/ArgumentPromotion.cpp diff -u llvm/lib/Transforms/IPO/ArgumentPromotion.cpp:1.27 llvm/lib/Transforms/IPO/ArgumentPromotion.cpp:1.27.2.1 --- llvm/lib/Transforms/IPO/ArgumentPromotion.cpp:1.27 Tue Oct 3 02:26:07 2006 +++ llvm/lib/Transforms/IPO/ArgumentPromotion.cpp Thu Oct 19 19:34:44 2006 @@ -307,8 +307,8 @@ unsigned idx = 0; for (; idx < LHS.size() && idx < RHS.size(); ++idx) { if (LHS[idx] != RHS[idx]) { - return cast(LHS[idx])->getRawValue() < - cast(RHS[idx])->getRawValue(); + return cast(LHS[idx])->getZExtValue() < + cast(RHS[idx])->getZExtValue(); } } @@ -518,7 +518,7 @@ std::string NewName = I->getName(); for (unsigned i = 0, e = Operands.size(); i != e; ++i) if (ConstantInt *CI = dyn_cast(Operands[i])) - NewName += "."+itostr((int64_t)CI->getRawValue()); + NewName += "."+itostr((int64_t)CI->getZExtValue()); else NewName += ".x"; TheArg->setName(NewName+".val"); Index: llvm/lib/Transforms/IPO/GlobalOpt.cpp diff -u llvm/lib/Transforms/IPO/GlobalOpt.cpp:1.68.2.1 llvm/lib/Transforms/IPO/GlobalOpt.cpp:1.68.2.2 --- llvm/lib/Transforms/IPO/GlobalOpt.cpp:1.68.2.1 Wed Oct 18 22:57:56 2006 +++ llvm/lib/Transforms/IPO/GlobalOpt.cpp Thu Oct 19 19:34:44 2006 @@ -270,7 +270,7 @@ static Constant *getAggregateConstantElement(Constant *Agg, Constant *Idx) { ConstantInt *CI = dyn_cast(Idx); if (!CI) return 0; - unsigned IdxV = (unsigned)CI->getRawValue(); + unsigned IdxV = CI->getZExtValue(); if (ConstantStruct *CS = dyn_cast(Agg)) { if (IdxV < CS->getNumOperands()) return CS->getOperand(IdxV); @@ -435,8 +435,7 @@ // Ignore the 1th operand, which has to be zero or else the program is quite // broken (undefined). Get the 2nd operand, which is the structure or array // index. - unsigned Val = - (unsigned)cast(GEP->getOperand(2))->getRawValue(); + unsigned Val = cast(GEP->getOperand(2))->getZExtValue(); if (Val >= NewGlobals.size()) Val = 0; // Out of bound array access. Value *NewPtr = NewGlobals[Val]; @@ -673,11 +672,11 @@ DEBUG(std::cerr << "PROMOTING MALLOC GLOBAL: " << *GV << " MALLOC = " <<*MI); ConstantInt *NElements = cast(MI->getArraySize()); - if (NElements->getRawValue() != 1) { + if (NElements->getZExtValue() != 1) { // If we have an array allocation, transform it to a single element // allocation to make the code below simpler. Type *NewTy = ArrayType::get(MI->getAllocatedType(), - (unsigned)NElements->getRawValue()); + NElements->getZExtValue()); MallocInst *NewMI = new MallocInst(NewTy, Constant::getNullValue(Type::UIntTy), MI->getAlignment(), MI->getName(), MI); @@ -1089,7 +1088,7 @@ // Restrict this transformation to only working on small allocations // (2048 bytes currently), as we don't want to introduce a 16M global or // something. - if (NElements->getRawValue()* + if (NElements->getZExtValue()* TD.getTypeSize(MI->getAllocatedType()) < 2048) { GVI = OptimizeGlobalAddressOfMalloc(GV, MI); return true; @@ -1432,7 +1431,7 @@ // Init priority must be standard. ConstantInt *CI = dyn_cast(CS->getOperand(0)); - if (!CI || CI->getRawValue() != 65535) + if (!CI || CI->getZExtValue() != 65535) return 0; } else { return 0; @@ -1577,7 +1576,7 @@ // Replace the element that we are supposed to. ConstantInt *CU = cast(Addr->getOperand(OpNo)); - unsigned Idx = (unsigned)CU->getZExtValue(); + unsigned Idx = CU->getZExtValue(); assert(Idx < STy->getNumElements() && "Struct index out of range!"); Elts[Idx] = EvaluateStoreInto(Elts[Idx], Val, Addr, OpNo+1); @@ -1603,9 +1602,9 @@ " ConstantFoldLoadThroughGEPConstantExpr"); } - assert((uint64_t)CI->getRawValue() < ATy->getNumElements()); - Elts[(uint64_t)CI->getRawValue()] = - EvaluateStoreInto(Elts[(uint64_t)CI->getRawValue()], Val, Addr, OpNo+1); + assert(CI->getZExtValue() < ATy->getNumElements()); + Elts[CI->getZExtValue()] = + EvaluateStoreInto(Elts[CI->getZExtValue()], Val, Addr, OpNo+1); return ConstantArray::get(ATy, Elts); } } Index: llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp diff -u llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp:1.69.2.1 llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp:1.69.2.2 --- llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp:1.69.2.1 Wed Oct 18 22:57:56 2006 +++ llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp Thu Oct 19 19:34:44 2006 @@ -723,7 +723,7 @@ bool len_arg_is_const = false; if (ConstantInt* len_CI = dyn_cast(ci->getOperand(3))) { len_arg_is_const = true; - len_arg = len_CI->getRawValue(); + len_arg = len_CI->getZExtValue(); if (len_arg == 0) { // strncmp(x,y,0) -> 0 ci->replaceAllUsesWith(ConstantInt::get(Type::IntTy,0)); @@ -891,7 +891,7 @@ if (ConstantInt* CI = dyn_cast(bop->getOperand(1))) { // Get the value the strlen result is compared to - uint64_t val = CI->getRawValue(); + uint64_t val = CI->getZExtValue(); // If its compared against length 0 with == or != if (val == 0 && @@ -985,7 +985,7 @@ // Make sure we have a constant length. ConstantInt *LenC = dyn_cast(CI->getOperand(3)); if (!LenC) return false; - uint64_t Len = LenC->getRawValue(); + uint64_t Len = LenC->getZExtValue(); // If the length is zero, this returns 0. switch (Len) { @@ -1075,8 +1075,8 @@ return false; // If the length is larger than the alignment, we can't optimize - uint64_t len = LEN->getRawValue(); - uint64_t alignment = ALIGN->getRawValue(); + uint64_t len = LEN->getZExtValue(); + uint64_t alignment = ALIGN->getZExtValue(); if (alignment == 0) alignment = 1; // Alignment 0 is identity for alignment 1 if (len > alignment) @@ -1154,8 +1154,8 @@ return false; // Extract the length and alignment - uint64_t len = LEN->getRawValue(); - uint64_t alignment = ALIGN->getRawValue(); + uint64_t len = LEN->getZExtValue(); + uint64_t alignment = ALIGN->getZExtValue(); // Alignment 0 is identity for alignment 1 if (alignment == 0) @@ -1325,16 +1325,16 @@ // The first character has to be a % if (ConstantInt* CI = dyn_cast(CA->getOperand(0))) - if (CI->getRawValue() != '%') + if (CI->getZExtValue() != '%') return false; // Get the second character and switch on its value ConstantInt* CI = dyn_cast(CA->getOperand(1)); - switch (CI->getRawValue()) { + switch (CI->getZExtValue()) { case 's': { if (len != 3 || - dyn_cast(CA->getOperand(2))->getRawValue() != '\n') + dyn_cast(CA->getOperand(2))->getZExtValue() != '\n') return false; // printf("%s\n",str) -> puts(str) @@ -1409,7 +1409,7 @@ for (unsigned i = 0; i < len; ++i) { if (ConstantInt* CI = dyn_cast(CA->getOperand(i))) { // Check for the null terminator - if (CI->getRawValue() == '%') + if (CI->getZExtValue() == '%') return false; // we found end of string } else { return false; @@ -1446,12 +1446,12 @@ // The first character has to be a % if (ConstantInt* CI = dyn_cast(CA->getOperand(0))) - if (CI->getRawValue() != '%') + if (CI->getZExtValue() != '%') return false; // Get the second character and switch on its value ConstantInt* CI = dyn_cast(CA->getOperand(1)); - switch (CI->getRawValue()) { + switch (CI->getZExtValue()) { case 's': { uint64_t len = 0; @@ -1546,7 +1546,7 @@ for (unsigned i = 0; i < len; ++i) { if (ConstantInt* CI = dyn_cast(CA->getOperand(i))) { // Check for the null terminator - if (CI->getRawValue() == '%') + if (CI->getZExtValue() == '%') return false; // we found a %, can't optimize } else { return false; // initializer is not constant int, can't optimize @@ -1578,12 +1578,12 @@ // The first character has to be a % if (ConstantInt* CI = dyn_cast(CA->getOperand(0))) - if (CI->getRawValue() != '%') + if (CI->getZExtValue() != '%') return false; // Get the second character and switch on its value ConstantInt* CI = dyn_cast(CA->getOperand(1)); - switch (CI->getRawValue()) { + switch (CI->getZExtValue()) { case 's': { // sprintf(dest,"%s",str) -> llvm.memcpy(dest, str, strlen(str)+1, 1) Function* strlen_func = SLC.get_strlen(); @@ -1716,7 +1716,7 @@ virtual bool OptimizeCall(CallInst *ci, SimplifyLibCalls &SLC) { if (ConstantInt* CI = dyn_cast(ci->getOperand(1))) { // isdigit(c) -> 0 or 1, if 'c' is constant - uint64_t val = CI->getRawValue(); + uint64_t val = CI->getZExtValue(); if (val >= '0' && val <='9') ci->replaceAllUsesWith(ConstantInt::get(Type::IntTy,1)); else @@ -1828,7 +1828,7 @@ // ffs(cnst) -> bit# // ffsl(cnst) -> bit# // ffsll(cnst) -> bit# - uint64_t val = CI->getRawValue(); + uint64_t val = CI->getZExtValue(); int result = 0; if (val) { ++result; @@ -2048,7 +2048,7 @@ // value. We'll need this later for indexing the ConstantArray. uint64_t start_idx = 0; if (ConstantInt* CI = dyn_cast(GEP->getOperand(2))) - start_idx = CI->getRawValue(); + start_idx = CI->getZExtValue(); else return false; From reid at x10sys.com Thu Oct 19 19:35:19 2006 From: reid at x10sys.com (Reid Spencer) Date: Thu, 19 Oct 2006 19:35:19 -0500 Subject: [llvm-commits] [SignlessTypes] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Message-ID: <200610200035.k9K0ZJKx001640@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/SelectionDAG: SelectionDAGISel.cpp updated: 1.289.2.1 -> 1.289.2.2 --- Log message: Make some simplifications for ConstantInt: 1. Get rid of getRawValue, replace with getZExtValue 2. Single constructor (uint64_t) and get method (int64_t) 3. Canonicalize the constant to a zero extended unsigned 64-bit integer when it is created. 4. Adjust getZExtValue() to be a do-nothing (just returns the already canonicalized value). 5. Compensate for above changes everywhere else. --- Diffs of the changes: (+11 -11) SelectionDAGISel.cpp | 22 +++++++++++----------- 1 files changed, 11 insertions(+), 11 deletions(-) Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.289.2.1 llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.289.2.2 --- llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.289.2.1 Wed Oct 18 22:57:55 2006 +++ llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Thu Oct 19 19:34:43 2006 @@ -641,7 +641,7 @@ return N = DAG.getNode(ISD::VBUILD_VECTOR,MVT::Vector,&Ops[0],Ops.size()); } else { // Canonicalize all constant ints to be unsigned. - return N = DAG.getConstant(cast(C)->getRawValue(),VT); + return N = DAG.getConstant(cast(C)->getZExtValue(),VT); } } @@ -929,8 +929,8 @@ // lowering the switch to a binary tree of conditional branches. if (TLI.isOperationLegal(ISD::BRIND, TLI.getPointerTy()) && Cases.size() > 5) { - uint64_t First = cast(Cases.front().first)->getRawValue(); - uint64_t Last = cast(Cases.back().first)->getRawValue(); + uint64_t First =cast(Cases.front().first)->getZExtValue(); + uint64_t Last = cast(Cases.back().first)->getZExtValue(); double Density = (double)Cases.size() / (double)((Last - First) + 1ULL); if (Density >= 0.3125) { @@ -978,7 +978,7 @@ std::vector DestBBs; uint64_t TEI = First; for (CaseItr ii = Cases.begin(), ee = Cases.end(); ii != ee; ++TEI) { - if (cast(ii->first)->getRawValue() == TEI) { + if (cast(ii->first)->getZExtValue() == TEI) { DestBBs.push_back(ii->second); ++ii; } else { @@ -1053,8 +1053,8 @@ // rather than creating a leaf node for it. if ((LHSR.second - LHSR.first) == 1 && LHSR.first->first == CR.GE && - cast(C)->getRawValue() == - (cast(CR.GE)->getRawValue() + 1ULL)) { + cast(C)->getZExtValue() == + (cast(CR.GE)->getZExtValue() + 1ULL)) { LHSBB = LHSR.first->second; } else { LHSBB = new MachineBasicBlock(LLVMBB); @@ -1065,8 +1065,8 @@ // is CR.LT - 1, then we can branch directly to the target block for // the current Case Value, rather than emitting a RHS leaf node for it. if ((RHSR.second - RHSR.first) == 1 && CR.LT && - cast(RHSR.first->first)->getRawValue() == - (cast(CR.LT)->getRawValue() - 1ULL)) { + cast(RHSR.first->first)->getZExtValue() == + (cast(CR.LT)->getZExtValue() - 1ULL)) { RHSBB = RHSR.first->second; } else { RHSBB = new MachineBasicBlock(LLVMBB); @@ -1267,7 +1267,7 @@ // If this is a constant subscript, handle it quickly. if (ConstantInt *CI = dyn_cast(Idx)) { - if (CI->getRawValue() == 0) continue; + if (CI->getZExtValue() == 0) continue; uint64_t Offs; if (CI->getType()->isSigned()) Offs = (int64_t) @@ -3122,7 +3122,7 @@ for (GetElementPtrInst::op_iterator OI = GEPI->op_begin()+1, E = GEPI->op_end(); OI != E; ++OI) { if (ConstantInt *CI = dyn_cast(*OI)) { - if (CI->getRawValue()) { + if (CI->getZExtValue()) { hasConstantIndex = true; break; } @@ -3164,7 +3164,7 @@ // Handle constant subscripts. if (ConstantInt *CI = dyn_cast(Idx)) { - if (CI->getRawValue() == 0) continue; + if (CI->getZExtValue() == 0) continue; if (CI->getType()->isSigned()) ConstantOffset += (int64_t)TD->getTypeSize(Ty)*CI->getSExtValue(); else From reid at x10sys.com Thu Oct 19 19:35:19 2006 From: reid at x10sys.com (Reid Spencer) Date: Thu, 19 Oct 2006 19:35:19 -0500 Subject: [llvm-commits] [SignlessTypes] CVS: llvm/lib/Transforms/Utils/Local.cpp LowerAllocations.cpp LowerSwitch.cpp SimplifyCFG.cpp Message-ID: <200610200035.k9K0ZJSf001643@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Utils: Local.cpp updated: 1.58.4.1 -> 1.58.4.2 LowerAllocations.cpp updated: 1.61.2.1 -> 1.61.2.2 LowerSwitch.cpp updated: 1.24.2.1 -> 1.24.2.2 SimplifyCFG.cpp updated: 1.99 -> 1.99.2.1 --- Log message: Make some simplifications for ConstantInt: 1. Get rid of getRawValue, replace with getZExtValue 2. Single constructor (uint64_t) and get method (int64_t) 3. Canonicalize the constant to a zero extended unsigned 64-bit integer when it is created. 4. Adjust getZExtValue() to be a do-nothing (just returns the already canonicalized value). 5. Compensate for above changes everywhere else. --- Diffs of the changes: (+7 -7) Local.cpp | 8 ++++---- LowerAllocations.cpp | 2 +- LowerSwitch.cpp | 2 +- SimplifyCFG.cpp | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) Index: llvm/lib/Transforms/Utils/Local.cpp diff -u llvm/lib/Transforms/Utils/Local.cpp:1.58.4.1 llvm/lib/Transforms/Utils/Local.cpp:1.58.4.2 --- llvm/lib/Transforms/Utils/Local.cpp:1.58.4.1 Wed Oct 18 22:57:56 2006 +++ llvm/lib/Transforms/Utils/Local.cpp Thu Oct 19 19:34:44 2006 @@ -287,10 +287,10 @@ } } else if (ConstantInt *CI = dyn_cast(I.getOperand())) { if (const ArrayType *ATy = dyn_cast(*I)) { - if ((uint64_t)CI->getRawValue() >= ATy->getNumElements()) + if (CI->getZExtValue() >= ATy->getNumElements()) return 0; if (ConstantArray *CA = dyn_cast(C)) - C = CA->getOperand((unsigned)CI->getRawValue()); + C = CA->getOperand(CI->getZExtValue()); else if (isa(C)) C = Constant::getNullValue(ATy->getElementType()); else if (isa(C)) @@ -298,10 +298,10 @@ else return 0; } else if (const PackedType *PTy = dyn_cast(*I)) { - if ((uint64_t)CI->getRawValue() >= PTy->getNumElements()) + if (CI->getZExtValue() >= PTy->getNumElements()) return 0; if (ConstantPacked *CP = dyn_cast(C)) - C = CP->getOperand((unsigned)CI->getRawValue()); + C = CP->getOperand(CI->getZExtValue()); else if (isa(C)) C = Constant::getNullValue(PTy->getElementType()); else if (isa(C)) Index: llvm/lib/Transforms/Utils/LowerAllocations.cpp diff -u llvm/lib/Transforms/Utils/LowerAllocations.cpp:1.61.2.1 llvm/lib/Transforms/Utils/LowerAllocations.cpp:1.61.2.2 --- llvm/lib/Transforms/Utils/LowerAllocations.cpp:1.61.2.1 Wed Oct 18 22:57:56 2006 +++ llvm/lib/Transforms/Utils/LowerAllocations.cpp Thu Oct 19 19:34:44 2006 @@ -126,7 +126,7 @@ if (MI->isArrayAllocation()) { if (isa(MallocArg) && - cast(MallocArg)->getRawValue() == 1) { + cast(MallocArg)->getZExtValue() == 1) { MallocArg = MI->getOperand(0); // Operand * 1 = Operand } else if (Constant *CO = dyn_cast(MI->getOperand(0))) { CO = ConstantExpr::getCast(CO, IntPtrTy); Index: llvm/lib/Transforms/Utils/LowerSwitch.cpp diff -u llvm/lib/Transforms/Utils/LowerSwitch.cpp:1.24.2.1 llvm/lib/Transforms/Utils/LowerSwitch.cpp:1.24.2.2 --- llvm/lib/Transforms/Utils/LowerSwitch.cpp:1.24.2.1 Wed Oct 18 22:57:56 2006 +++ llvm/lib/Transforms/Utils/LowerSwitch.cpp Thu Oct 19 19:34:44 2006 @@ -130,7 +130,7 @@ Case& Pivot = *(Begin + Mid); DEBUG(std::cerr << "Pivot ==> " - << (int64_t)cast(Pivot.first)->getRawValue() + << cast(Pivot.first)->getSExtValue() << "\n"); BasicBlock* LBranch = switchConvert(LHS.begin(), LHS.end(), Val, Index: llvm/lib/Transforms/Utils/SimplifyCFG.cpp diff -u llvm/lib/Transforms/Utils/SimplifyCFG.cpp:1.99 llvm/lib/Transforms/Utils/SimplifyCFG.cpp:1.99.2.1 --- llvm/lib/Transforms/Utils/SimplifyCFG.cpp:1.99 Thu Aug 3 16:40:24 2006 +++ llvm/lib/Transforms/Utils/SimplifyCFG.cpp Thu Oct 19 19:34:44 2006 @@ -1153,7 +1153,7 @@ /// applications that sort ConstantInt's to ensure uniqueness. struct ConstantIntOrdering { bool operator()(const ConstantInt *LHS, const ConstantInt *RHS) const { - return LHS->getRawValue() < RHS->getRawValue(); + return LHS->getZExtValue() < RHS->getZExtValue(); } }; } From reid at x10sys.com Thu Oct 19 19:35:16 2006 From: reid at x10sys.com (Reid Spencer) Date: Thu, 19 Oct 2006 19:35:16 -0500 Subject: [llvm-commits] [SignlessTypes] CVS: llvm/lib/Target/TargetData.cpp Message-ID: <200610200035.k9K0ZGsD001589@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target: TargetData.cpp updated: 1.70.4.1 -> 1.70.4.2 --- Log message: Make some simplifications for ConstantInt: 1. Get rid of getRawValue, replace with getZExtValue 2. Single constructor (uint64_t) and get method (int64_t) 3. Canonicalize the constant to a zero extended unsigned 64-bit integer when it is created. 4. Adjust getZExtValue() to be a do-nothing (just returns the already canonicalized value). 5. Compensate for above changes everywhere else. --- Diffs of the changes: (+1 -1) TargetData.cpp | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/lib/Target/TargetData.cpp diff -u llvm/lib/Target/TargetData.cpp:1.70.4.1 llvm/lib/Target/TargetData.cpp:1.70.4.2 --- llvm/lib/Target/TargetData.cpp:1.70.4.1 Wed Oct 18 22:57:56 2006 +++ llvm/lib/Target/TargetData.cpp Thu Oct 19 19:34:43 2006 @@ -346,7 +346,7 @@ Ty = cast(Ty)->getElementType(); // Get the array index and the size of each array element. - int64_t arrayIdx = cast(Idx[CurIDX])->getRawValue(); + int64_t arrayIdx = cast(Idx[CurIDX])->getZExtValue(); Result += arrayIdx * (int64_t)getTypeSize(Ty); } } From reid at x10sys.com Thu Oct 19 19:35:14 2006 From: reid at x10sys.com (Reid Spencer) Date: Thu, 19 Oct 2006 19:35:14 -0500 Subject: [llvm-commits] [SignlessTypes] CVS: llvm/lib/AsmParser/Lexer.cpp.cvs Lexer.l Lexer.l.cvs ParserInternals.h llvmAsmParser.cpp.cvs llvmAsmParser.h.cvs llvmAsmParser.y llvmAsmParser.y.cvs Message-ID: <200610200035.k9K0ZEIa001559@zion.cs.uiuc.edu> Changes in directory llvm/lib/AsmParser: Lexer.cpp.cvs updated: 1.10.2.2 -> 1.10.2.3 Lexer.l updated: 1.78.2.1 -> 1.78.2.2 Lexer.l.cvs updated: 1.8.2.1 -> 1.8.2.2 ParserInternals.h updated: 1.45.2.1 -> 1.45.2.2 llvmAsmParser.cpp.cvs updated: 1.18.2.2 -> 1.18.2.3 llvmAsmParser.h.cvs updated: 1.13.2.2 -> 1.13.2.3 llvmAsmParser.y updated: 1.266.2.2 -> 1.266.2.3 llvmAsmParser.y.cvs updated: 1.18.2.2 -> 1.18.2.3 --- Log message: Make some simplifications for ConstantInt: 1. Get rid of getRawValue, replace with getZExtValue 2. Single constructor (uint64_t) and get method (int64_t) 3. Canonicalize the constant to a zero extended unsigned 64-bit integer when it is created. 4. Adjust getZExtValue() to be a do-nothing (just returns the already canonicalized value). 5. Compensate for above changes everywhere else. --- Diffs of the changes: (+1729 -1857) Lexer.cpp.cvs | 1172 +++++++++++++-------------- Lexer.l | 16 Lexer.l.cvs | 16 ParserInternals.h | 16 llvmAsmParser.cpp.cvs | 2124 ++++++++++++++++++++++++-------------------------- llvmAsmParser.h.cvs | 128 +-- llvmAsmParser.y | 57 - llvmAsmParser.y.cvs | 57 - 8 files changed, 1729 insertions(+), 1857 deletions(-) Index: llvm/lib/AsmParser/Lexer.cpp.cvs diff -u llvm/lib/AsmParser/Lexer.cpp.cvs:1.10.2.2 llvm/lib/AsmParser/Lexer.cpp.cvs:1.10.2.3 --- llvm/lib/AsmParser/Lexer.cpp.cvs:1.10.2.2 Thu Oct 19 14:22:56 2006 +++ llvm/lib/AsmParser/Lexer.cpp.cvs Thu Oct 19 19:34:43 2006 @@ -20,7 +20,7 @@ /* A lexical scanner generated by flex*/ /* Scanner skeleton version: - * $Header: /var/cvs/llvm/llvm/lib/AsmParser/Lexer.cpp.cvs,v 1.10.2.2 2006/10/19 19:22:56 reid Exp $ + * $Header: /var/cvs/llvm/llvm/lib/AsmParser/Lexer.cpp.cvs,v 1.10.2.3 2006/10/20 00:34:43 reid Exp $ */ #define FLEX_SCANNER @@ -317,35 +317,35 @@ *yy_cp = '\0'; \ yy_c_buf_p = yy_cp; -#define YY_NUM_RULES 116 -#define YY_END_OF_BUFFER 117 -static yyconst short int yy_acclist[194] = +#define YY_NUM_RULES 114 +#define YY_END_OF_BUFFER 115 +static yyconst short int yy_acclist[192] = { 0, - 117, 115, 116, 114, 115, 116, 114, 116, 115, 116, - 115, 116, 115, 116, 115, 116, 115, 116, 115, 116, - 107, 115, 116, 107, 115, 116, 1, 115, 116, 115, - 116, 115, 116, 115, 116, 115, 116, 115, 116, 115, - 116, 115, 116, 115, 116, 115, 116, 115, 116, 115, - 116, 115, 116, 115, 116, 115, 116, 115, 116, 115, - 116, 115, 116, 115, 116, 115, 116, 115, 116, 115, - 116, 106, 104, 103, 103, 110, 108, 112, 107, 1, - 89, 41, 71, 23, 106, 103, 103, 111, 112, 20, - 112, 113, 63, 70, 39, 34, 42, 66, 3, 54, - - 65, 25, 79, 69, 88, 83, 84, 64, 72, 105, - 112, 112, 49, 80, 81, 32, 96, 97, 56, 22, - 109, 68, 26, 4, 61, 67, 55, 48, 11, 112, - 36, 2, 5, 58, 60, 50, 74, 78, 76, 77, - 75, 73, 52, 98, 51, 57, 21, 86, 95, 45, - 59, 30, 24, 44, 7, 91, 33, 94, 38, 62, - 82, 90, 27, 28, 92, 53, 87, 85, 43, 6, - 29, 37, 8, 17, 9, 10, 35, 12, 14, 13, - 40, 15, 31, 93, 99, 101, 102, 16, 46, 100, - 18, 47, 19 + 115, 113, 114, 112, 113, 114, 112, 114, 113, 114, + 113, 114, 113, 114, 113, 114, 113, 114, 113, 114, + 105, 113, 114, 105, 113, 114, 1, 113, 114, 113, + 114, 113, 114, 113, 114, 113, 114, 113, 114, 113, + 114, 113, 114, 113, 114, 113, 114, 113, 114, 113, + 114, 113, 114, 113, 114, 113, 114, 113, 114, 113, + 114, 113, 114, 113, 114, 113, 114, 113, 114, 113, + 114, 104, 102, 101, 101, 108, 106, 110, 105, 1, + 87, 41, 69, 23, 104, 101, 101, 109, 110, 20, + 110, 111, 63, 68, 39, 34, 42, 66, 3, 54, + + 65, 25, 77, 67, 86, 81, 82, 64, 70, 103, + 110, 110, 49, 78, 79, 32, 94, 95, 56, 22, + 107, 26, 4, 61, 55, 48, 11, 110, 36, 2, + 5, 58, 60, 50, 72, 76, 74, 75, 73, 71, + 52, 96, 51, 57, 21, 84, 93, 45, 59, 30, + 24, 44, 7, 89, 33, 92, 38, 62, 80, 88, + 27, 28, 90, 53, 85, 83, 43, 6, 29, 37, + 8, 17, 9, 10, 35, 12, 14, 13, 40, 15, + 31, 91, 97, 99, 100, 16, 46, 98, 18, 47, + 19 } ; -static yyconst short int yy_accept[511] = +static yyconst short int yy_accept[505] = { 0, 1, 1, 1, 2, 4, 7, 9, 11, 13, 15, 17, 19, 21, 24, 27, 30, 32, 34, 36, 38, @@ -358,51 +358,51 @@ 83, 83, 83, 83, 83, 83, 83, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, - 84, 85, 85, 85, 85, 85, 85, 85, 85, 85, - 85, 85, 85, 85, 85, 85, 86, 87, 89, 90, - 91, 92, 92, 93, 94, 94, 94, 95, 95, 96, - 96, 97, 97, 97, 97, 98, 98, 98, 98, 98, - 98, 98, 99, 99, 99, 100, 100, 100, 100, 100, - 100, 100, 100, 100, 100, 100, 101, 101, 101, 101, - 101, 101, 101, 101, 101, 102, 103, 103, 103, 104, - 104, 105, 106, 106, 106, 106, 106, 106, 106, 107, - 107, 108, 108, 108, 108, 109, 109, 109, 109, 109, + 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, + 85, 85, 85, 85, 86, 87, 89, 90, 91, 92, + 92, 93, 94, 94, 94, 95, 95, 96, 96, 97, + 97, 97, 97, 98, 98, 98, 98, 98, 98, 98, + 99, 99, 99, 100, 100, 100, 100, 100, 100, 100, + 100, 100, 100, 100, 101, 101, 101, 101, 101, 101, + 101, 101, 101, 102, 103, 103, 103, 104, 104, 105, + 106, 106, 106, 106, 106, 106, 107, 107, 108, 108, + 108, 108, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, - 109, 109, 109, 109, 109, 109, 109, 109, 110, 110, - 111, 112, 112, 112, 112, 113, 113, 113, 113, 113, - 114, 115, 116, 116, 116, 116, 117, 117, 117, 117, - 117, 117, 117, 117, 117, 117, 117, 117, 117, 118, - 118, 118, 118, 118, 118, 118, 118, 118, 118, 119, - 120, 120, 120, 121, 121, 121, 122, 122, 123, 123, - 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, - 124, 124, 124, 125, 126, 126, 127, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 129, 129, 130, - 130, 130, 131, 132, 132, 132, 133, 133, 133, 133, - - 133, 133, 133, 133, 133, 133, 133, 133, 133, 134, - 134, 135, 135, 135, 135, 135, 135, 135, 136, 136, - 136, 136, 136, 136, 136, 137, 137, 137, 138, 139, - 140, 141, 142, 143, 144, 144, 144, 145, 145, 145, - 145, 146, 147, 148, 148, 148, 148, 148, 148, 149, - 149, 149, 149, 149, 149, 150, 150, 151, 151, 151, - 151, 151, 151, 151, 152, 153, 154, 154, 154, 155, - 155, 156, 156, 156, 156, 157, 157, 158, 159, 160, - 161, 161, 161, 162, 162, 162, 163, 164, 165, 165, - 165, 166, 167, 168, 169, 169, 169, 169, 169, 169, - - 169, 170, 171, 172, 172, 172, 172, 172, 172, 172, - 172, 172, 172, 172, 172, 173, 173, 173, 173, 173, - 173, 173, 173, 173, 173, 174, 174, 174, 174, 175, - 175, 175, 175, 175, 176, 177, 177, 177, 177, 177, - 177, 178, 178, 178, 178, 179, 180, 181, 181, 181, - 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, - 181, 181, 181, 181, 181, 181, 181, 181, 182, 182, - 182, 182, 182, 182, 183, 183, 183, 183, 183, 184, - 184, 184, 185, 185, 185, 185, 185, 185, 185, 185, - 185, 185, 185, 185, 185, 185, 186, 186, 187, 188, + 109, 109, 109, 109, 110, 110, 111, 112, 112, 112, + 112, 113, 113, 113, 113, 113, 114, 115, 116, 116, + 116, 116, 117, 117, 117, 117, 117, 117, 117, 117, + 117, 117, 117, 117, 117, 118, 118, 118, 118, 118, + 118, 118, 118, 118, 118, 119, 120, 120, 120, 121, + 121, 121, 122, 122, 122, 122, 122, 122, 122, 122, + 122, 122, 122, 122, 122, 123, 123, 123, 124, 125, + 125, 126, 126, 126, 126, 126, 126, 126, 126, 126, + 126, 127, 127, 128, 128, 128, 129, 130, 130, 130, + 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, + + 131, 131, 131, 132, 132, 133, 133, 133, 133, 133, + 133, 133, 134, 134, 134, 134, 134, 134, 134, 135, + 135, 135, 136, 137, 138, 139, 140, 141, 142, 142, + 142, 143, 143, 143, 143, 144, 145, 146, 146, 146, + 146, 146, 146, 147, 147, 147, 147, 147, 147, 148, + 148, 149, 149, 149, 149, 149, 149, 149, 150, 151, + 152, 152, 152, 153, 153, 154, 154, 154, 154, 155, + 155, 156, 157, 158, 159, 159, 159, 160, 160, 160, + 161, 162, 163, 163, 163, 164, 165, 166, 167, 167, + 167, 167, 167, 167, 167, 168, 169, 170, 170, 170, + + 170, 170, 170, 170, 170, 170, 170, 170, 170, 171, + 171, 171, 171, 171, 171, 171, 171, 171, 171, 172, + 172, 172, 172, 173, 173, 173, 173, 173, 174, 175, + 175, 175, 175, 175, 175, 176, 176, 176, 176, 177, + 178, 179, 179, 179, 179, 179, 179, 179, 179, 179, + 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, + 179, 179, 180, 180, 180, 180, 180, 180, 181, 181, + 181, 181, 181, 182, 182, 182, 183, 183, 183, 183, + 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, + 184, 184, 185, 186, 187, 187, 188, 188, 189, 190, - 189, 189, 190, 190, 191, 192, 193, 193, 194, 194 + 191, 191, 192, 192 } ; static yyconst int yy_ec[256] = @@ -446,260 +446,256 @@ 3, 3, 3 } ; -static yyconst short int yy_base[515] = +static yyconst short int yy_base[509] = { 0, - 0, 0, 1108, 1109, 1109, 1109, 1103, 1092, 36, 40, + 0, 0, 1096, 1097, 1097, 1097, 1091, 1080, 36, 40, 44, 50, 56, 62, 0, 63, 66, 81, 89, 47, 90, 91, 76, 96, 108, 49, 97, 110, 68, 137, - 120, 168, 112, 115, 135, 127, 1101, 1109, 1090, 1109, - 0, 158, 173, 196, 201, 70, 206, 221, 226, 0, - 121, 152, 123, 139, 159, 140, 162, 166, 1089, 227, - 179, 31, 187, 119, 237, 182, 230, 188, 238, 240, - 239, 241, 180, 243, 250, 248, 251, 252, 255, 260, - 264, 262, 269, 257, 271, 282, 1088, 275, 281, 283, - 285, 289, 290, 293, 304, 297, 291, 292, 301, 302, - - 1087, 307, 310, 296, 313, 318, 321, 330, 332, 336, - 333, 337, 213, 334, 345, 1086, 0, 361, 365, 1085, - 379, 396, 0, 1084, 354, 349, 1083, 371, 1082, 370, - 1081, 369, 372, 327, 1080, 373, 385, 391, 347, 386, - 397, 1079, 402, 398, 403, 399, 405, 406, 409, 413, - 410, 420, 417, 421, 422, 424, 425, 430, 427, 434, - 437, 435, 438, 440, 1078, 1077, 444, 442, 1076, 448, - 1075, 1074, 470, 447, 449, 458, 451, 482, 1073, 450, - 1072, 484, 452, 483, 1071, 463, 485, 487, 488, 492, - 496, 489, 490, 495, 502, 508, 503, 513, 510, 506, - - 509, 511, 516, 521, 526, 527, 210, 1070, 528, 1109, - 539, 556, 560, 564, 569, 530, 533, 534, 570, 1069, - 1068, 1067, 571, 572, 573, 1066, 539, 575, 574, 295, - 576, 577, 579, 581, 580, 583, 586, 584, 1065, 589, - 594, 597, 590, 600, 603, 605, 608, 609, 1064, 1063, - 610, 612, 1062, 613, 615, 0, 614, 1061, 616, 618, - 619, 622, 632, 633, 630, 634, 640, 643, 647, 1060, - 648, 635, 1059, 1058, 651, 1057, 1056, 656, 636, 658, - 659, 661, 662, 663, 665, 666, 1055, 668, 1054, 670, - 669, 676, 1053, 681, 677, 1052, 687, 690, 689, 679, - - 697, 688, 698, 699, 701, 702, 704, 705, 1051, 706, - 1050, 710, 709, 711, 714, 715, 720, 1049, 716, 722, - 723, 726, 734, 736, 1048, 728, 738, 1047, 1046, 1045, - 1044, 1043, 1042, 1041, 739, 740, 1040, 741, 742, 747, - 1039, 1038, 1037, 744, 748, 749, 751, 752, 1036, 758, - 759, 764, 760, 762, 1035, 771, 1034, 768, 766, 777, - 770, 775, 776, 1033, 1032, 1031, 791, 778, 1030, 782, - 1029, 780, 788, 799, 1028, 800, 1027, 1026, 1025, 1024, - 787, 802, 1023, 803, 805, 1022, 1021, 1020, 809, 806, - 1019, 1018, 1017, 1016, 810, 811, 813, 814, 817, 816, - - 1015, 1014, 1013, 820, 823, 824, 828, 826, 829, 830, - 831, 836, 840, 832, 1010, 837, 848, 853, 855, 852, - 842, 856, 845, 859, 1000, 864, 866, 867, 999, 869, - 871, 872, 873, 998, 996, 877, 874, 878, 879, 875, - 995, 886, 891, 892, 994, 989, 988, 897, 898, 880, - 899, 900, 901, 906, 908, 909, 910, 912, 911, 914, - 915, 918, 920, 921, 923, 924, 927, 987, 928, 936, - 937, 938, 940, 982, 942, 935, 941, 943, 790, 946, - 947, 545, 948, 959, 949, 961, 965, 967, 968, 969, - 971, 970, 973, 972, 974, 543, 975, 456, 455, 454, + 120, 168, 112, 115, 135, 127, 1089, 1097, 1078, 1097, + 0, 158, 173, 180, 196, 70, 201, 216, 221, 0, + 121, 152, 123, 139, 166, 140, 162, 184, 1077, 222, + 180, 31, 186, 119, 232, 208, 144, 225, 234, 236, + 235, 188, 238, 240, 246, 241, 245, 203, 248, 256, + 254, 258, 262, 252, 272, 274, 1076, 276, 278, 280, + 255, 253, 283, 284, 285, 286, 288, 297, 300, 1075, + + 301, 292, 295, 307, 309, 318, 316, 315, 322, 312, + 147, 329, 330, 1074, 0, 344, 349, 1073, 363, 380, + 0, 1072, 338, 336, 1071, 355, 1070, 356, 1069, 353, + 367, 334, 1068, 375, 365, 381, 384, 370, 371, 1067, + 388, 392, 391, 393, 394, 395, 396, 400, 399, 407, + 406, 409, 411, 413, 410, 414, 418, 421, 425, 426, + 427, 429, 1066, 1065, 430, 431, 1064, 435, 1063, 1062, + 458, 436, 439, 434, 469, 1061, 449, 1060, 438, 441, + 458, 1059, 471, 472, 474, 473, 481, 482, 475, 476, + 483, 488, 489, 493, 495, 496, 504, 501, 503, 505, + + 510, 507, 516, 1058, 511, 1097, 527, 541, 545, 549, + 554, 555, 440, 556, 557, 1057, 1056, 1055, 558, 559, + 560, 1054, 527, 518, 561, 189, 562, 528, 566, 563, + 564, 567, 568, 570, 1053, 571, 587, 580, 578, 579, + 581, 590, 591, 596, 1052, 1051, 594, 598, 1050, 597, + 601, 0, 606, 603, 607, 602, 608, 610, 618, 620, + 625, 623, 628, 629, 1049, 630, 626, 1048, 1047, 638, + 1046, 634, 640, 642, 644, 646, 648, 651, 653, 652, + 1045, 654, 1044, 656, 657, 662, 1043, 662, 665, 1042, + 668, 671, 674, 680, 682, 683, 684, 685, 687, 686, + + 689, 690, 1041, 691, 1040, 696, 692, 695, 693, 700, + 699, 1039, 710, 712, 713, 714, 715, 719, 1038, 718, + 722, 1037, 1036, 1035, 1034, 1033, 1032, 1031, 725, 729, + 1030, 726, 730, 732, 1029, 1028, 1027, 731, 735, 743, + 733, 737, 1026, 734, 746, 744, 747, 750, 1025, 752, + 1024, 755, 761, 760, 758, 763, 764, 1023, 1022, 1021, + 771, 762, 1020, 773, 1019, 774, 777, 779, 1018, 787, + 1017, 1016, 1015, 1014, 778, 788, 1013, 791, 792, 1012, + 1011, 1010, 790, 795, 1009, 1008, 1007, 1006, 793, 796, + 798, 797, 804, 801, 1005, 1004, 1003, 809, 811, 812, + + 813, 814, 816, 817, 820, 822, 827, 819, 1002, 815, + 833, 826, 839, 843, 845, 846, 847, 848, 999, 849, + 850, 851, 990, 854, 857, 855, 856, 989, 987, 858, + 866, 876, 862, 861, 986, 879, 880, 881, 984, 983, + 982, 882, 884, 888, 890, 889, 863, 891, 896, 897, + 899, 901, 900, 902, 903, 904, 908, 909, 912, 913, + 916, 980, 918, 924, 923, 925, 926, 977, 928, 929, + 930, 931, 975, 935, 936, 973, 934, 944, 942, 946, + 950, 954, 956, 957, 958, 960, 961, 959, 962, 864, + 964, 829, 766, 604, 969, 519, 965, 517, 477, 446, - 976, 253, 984, 178, 177, 147, 981, 144, 1109, 1016, - 1018, 83, 1022, 80 + 970, 333, 1097, 1005, 1007, 83, 1011, 80 } ; -static yyconst short int yy_def[515] = +static yyconst short int yy_def[509] = { 0, - 509, 1, 509, 509, 509, 509, 510, 511, 512, 509, - 511, 511, 511, 511, 513, 511, 511, 511, 511, 511, - 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, - 511, 511, 511, 511, 511, 511, 510, 509, 511, 509, - 514, 514, 509, 509, 511, 511, 511, 511, 511, 513, - 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, - 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, - 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, - 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, - 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, - - 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, - 511, 511, 511, 511, 511, 509, 514, 514, 509, 511, - 511, 511, 49, 511, 511, 511, 511, 511, 511, 511, - 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, - 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, - 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, - 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, - 511, 511, 49, 511, 511, 511, 511, 511, 511, 511, - 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, - 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, - - 511, 511, 511, 511, 511, 511, 511, 511, 511, 509, - 509, 509, 509, 511, 511, 511, 511, 511, 511, 511, - 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, - 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, - 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, - 511, 511, 511, 511, 511, 173, 511, 511, 511, 511, - 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, - 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, - 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, - 511, 509, 511, 511, 511, 511, 511, 511, 511, 511, - - 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, - 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, - 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, - 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, - 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, - 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, - 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, - 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, - 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, - 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, - - 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, - 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, - 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, - 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, - 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, - 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, - 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, - 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, - 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, - 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, + 503, 1, 503, 503, 503, 503, 504, 505, 506, 503, + 505, 505, 505, 505, 507, 505, 505, 505, 505, 505, + 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, + 505, 505, 505, 505, 505, 505, 504, 503, 505, 503, + 508, 508, 503, 503, 505, 505, 505, 505, 505, 507, + 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, + 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, + 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, + 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, + 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, + + 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, + 505, 505, 505, 503, 508, 508, 503, 505, 505, 505, + 49, 505, 505, 505, 505, 505, 505, 505, 505, 505, + 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, + 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, + 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, + 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, + 49, 505, 505, 505, 505, 505, 505, 505, 505, 505, + 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, + 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, + + 505, 505, 505, 505, 505, 503, 503, 503, 503, 505, + 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, + 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, + 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, + 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, + 505, 171, 505, 505, 505, 505, 505, 505, 505, 505, + 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, + 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, + 505, 505, 505, 505, 505, 503, 505, 505, 505, 505, + 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, + + 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, + 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, + 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, + 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, + 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, + 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, + 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, + 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, + 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, + 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, + + 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, + 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, + 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, + 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, + 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, + 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, + 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, + 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, + 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, + 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, - 511, 511, 511, 511, 511, 511, 511, 511, 0, 509, - 509, 509, 509, 509 + 505, 505, 0, 503, 503, 503, 503, 503 } ; -static yyconst short int yy_nxt[1153] = +static yyconst short int yy_nxt[1141] = { 0, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 4, 15, 8, 8, 8, 16, 17, 18, 19, 20, 21, 22, 8, 23, 8, 24, 25, 26, 27, 28, 8, 29, 30, 31, 32, 33, 34, 35, 8, 36, 42, 40, 43, 43, 43, 43, 44, - 44, 44, 44, 45, 45, 45, 45, 40, 46, 136, - 40, 137, 40, 40, 47, 48, 48, 48, 48, 40, - 47, 48, 48, 48, 48, 40, 40, 69, 120, 40, - 84, 40, 117, 40, 51, 41, 85, 70, 56, 40, + 44, 44, 44, 45, 45, 45, 45, 40, 46, 134, + 40, 135, 40, 40, 47, 48, 48, 48, 48, 40, + 47, 48, 48, 48, 48, 40, 40, 69, 118, 40, + 84, 40, 115, 40, 51, 41, 85, 70, 56, 40, 90, 52, 57, 53, 40, 54, 49, 58, 55, 60, 59, 61, 40, 40, 40, 76, 77, 64, 71, 40, 40, 65, 62, 74, 78, 66, 63, 67, 72, 75, 68, 40, 79, 40, 73, 40, 81, 80, 40, 86, - 110, 87, 40, 40, 40, 88, 40, 112, 100, 82, - 40, 89, 124, 111, 127, 83, 91, 113, 40, 115, - 40, 101, 40, 40, 102, 139, 92, 40, 93, 94, - 40, 103, 95, 96, 130, 40, 114, 118, 118, 118, - 118, 128, 40, 97, 98, 40, 99, 91, 125, 40, - 126, 40, 43, 43, 43, 43, 131, 104, 129, 105, - 40, 40, 40, 40, 106, 40, 107, 132, 108, 135, - - 40, 40, 151, 109, 119, 44, 44, 44, 44, 47, - 45, 45, 45, 45, 40, 121, 121, 121, 121, 40, - 142, 138, 122, 40, 207, 144, 40, 290, 122, 47, - 48, 48, 48, 48, 40, 123, 123, 123, 123, 40, - 40, 123, 123, 40, 123, 123, 123, 123, 123, 123, - 40, 40, 40, 40, 40, 133, 40, 140, 143, 145, - 146, 40, 134, 40, 40, 40, 40, 148, 40, 141, - 40, 158, 150, 40, 149, 40, 147, 40, 161, 152, - 154, 153, 40, 164, 40, 159, 155, 156, 40, 157, - 162, 160, 163, 166, 40, 40, 40, 165, 40, 167, - - 168, 169, 40, 40, 40, 40, 40, 170, 40, 40, - 40, 185, 171, 176, 40, 40, 175, 40, 183, 172, - 40, 177, 184, 40, 303, 173, 40, 186, 187, 178, - 174, 40, 179, 189, 40, 180, 188, 192, 181, 193, - 40, 182, 191, 40, 190, 40, 40, 40, 194, 40, - 40, 196, 195, 201, 202, 206, 197, 200, 40, 204, - 40, 205, 40, 222, 198, 226, 203, 40, 208, 199, - 118, 118, 118, 118, 211, 211, 211, 211, 216, 209, - 217, 212, 40, 40, 40, 40, 40, 212, 121, 121, - 121, 121, 40, 218, 223, 122, 219, 220, 40, 40, - - 221, 122, 213, 214, 40, 215, 215, 215, 215, 40, - 40, 40, 40, 225, 227, 40, 40, 231, 40, 40, - 224, 233, 40, 40, 229, 228, 40, 234, 230, 232, - 40, 238, 239, 40, 40, 40, 241, 40, 40, 235, - 40, 236, 240, 40, 243, 237, 244, 40, 40, 242, - 40, 40, 246, 40, 247, 40, 245, 40, 249, 250, - 40, 40, 40, 40, 40, 40, 251, 40, 40, 40, - 248, 40, 253, 260, 267, 254, 40, 252, 255, 256, - 256, 256, 256, 257, 265, 256, 256, 258, 256, 256, - 256, 256, 256, 256, 259, 40, 40, 40, 40, 269, - - 40, 40, 40, 40, 261, 40, 262, 266, 40, 40, - 263, 271, 264, 270, 273, 40, 40, 268, 274, 40, - 272, 40, 40, 40, 40, 275, 40, 284, 276, 40, - 279, 277, 278, 280, 40, 281, 282, 283, 286, 40, - 40, 40, 287, 40, 288, 285, 40, 40, 211, 211, - 211, 211, 40, 294, 289, 212, 40, 300, 40, 291, - 293, 212, 213, 213, 295, 292, 292, 292, 292, 292, - 292, 292, 292, 215, 215, 215, 215, 40, 215, 215, - 215, 215, 40, 40, 40, 40, 40, 40, 40, 40, - 40, 297, 40, 40, 40, 305, 40, 40, 308, 40, - - 296, 301, 40, 40, 304, 309, 310, 40, 298, 299, - 40, 306, 313, 40, 302, 307, 40, 312, 40, 314, - 311, 40, 40, 40, 315, 40, 40, 40, 40, 40, - 317, 40, 40, 318, 316, 40, 325, 320, 327, 319, - 322, 321, 326, 40, 329, 40, 40, 40, 40, 40, - 323, 324, 328, 40, 331, 333, 40, 335, 330, 343, - 40, 40, 336, 340, 40, 337, 334, 338, 332, 40, - 339, 40, 40, 341, 40, 40, 40, 345, 40, 40, - 342, 40, 40, 40, 344, 292, 292, 292, 292, 349, - 40, 346, 40, 352, 40, 354, 347, 348, 356, 355, - - 40, 40, 40, 40, 351, 353, 350, 357, 358, 359, - 40, 40, 40, 360, 40, 40, 361, 40, 40, 40, - 362, 364, 40, 40, 40, 368, 369, 40, 40, 40, - 363, 365, 370, 40, 367, 40, 40, 371, 366, 40, - 372, 40, 375, 378, 377, 374, 376, 40, 379, 40, - 373, 40, 40, 40, 40, 40, 380, 40, 381, 382, - 40, 40, 40, 385, 40, 40, 386, 384, 390, 388, - 391, 40, 40, 40, 383, 40, 393, 40, 387, 40, - 389, 40, 396, 40, 40, 395, 401, 392, 40, 40, - 40, 40, 398, 40, 394, 40, 397, 399, 400, 402, - - 40, 40, 410, 40, 40, 403, 404, 405, 406, 407, - 411, 409, 40, 40, 408, 40, 40, 412, 40, 40, - 413, 414, 40, 40, 40, 416, 40, 40, 417, 40, - 40, 419, 415, 40, 422, 418, 40, 40, 420, 40, - 423, 40, 40, 40, 40, 40, 421, 424, 430, 40, - 40, 431, 425, 40, 426, 40, 429, 427, 40, 433, - 432, 40, 435, 428, 434, 40, 40, 436, 40, 40, - 438, 439, 40, 440, 441, 437, 443, 40, 442, 40, - 40, 444, 40, 445, 40, 40, 40, 40, 40, 448, - 40, 40, 40, 40, 457, 452, 454, 449, 455, 40, - - 446, 450, 447, 453, 40, 40, 458, 456, 451, 459, - 40, 40, 40, 40, 40, 461, 463, 464, 460, 40, - 462, 40, 40, 40, 40, 40, 467, 40, 40, 465, - 471, 40, 473, 40, 40, 469, 40, 40, 470, 472, - 40, 40, 474, 466, 468, 478, 479, 475, 40, 40, - 40, 40, 476, 40, 40, 40, 40, 477, 482, 40, - 40, 40, 40, 480, 486, 483, 484, 488, 485, 491, - 481, 487, 40, 489, 40, 494, 492, 490, 40, 493, - 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, - 501, 495, 500, 502, 40, 40, 506, 40, 497, 496, + 108, 87, 40, 40, 40, 88, 40, 110, 99, 82, + 40, 89, 122, 109, 125, 83, 91, 111, 40, 113, + 40, 100, 40, 40, 101, 137, 92, 40, 203, 93, + 40, 102, 94, 95, 128, 40, 112, 116, 116, 116, + 116, 126, 141, 96, 97, 40, 98, 91, 123, 40, + 124, 40, 43, 43, 43, 43, 129, 103, 117, 44, + 44, 44, 44, 40, 104, 127, 105, 40, 106, 40, + + 133, 40, 40, 107, 47, 45, 45, 45, 45, 40, + 119, 119, 119, 119, 40, 130, 40, 120, 297, 148, + 136, 40, 156, 120, 47, 48, 48, 48, 48, 40, + 121, 121, 121, 121, 40, 40, 121, 121, 40, 121, + 121, 121, 121, 121, 121, 40, 140, 40, 40, 40, + 131, 40, 138, 40, 40, 143, 144, 132, 40, 40, + 149, 40, 142, 146, 139, 40, 40, 40, 40, 40, + 147, 40, 145, 152, 159, 40, 150, 151, 157, 162, + 153, 154, 161, 155, 158, 40, 160, 40, 164, 40, + 163, 40, 166, 40, 172, 171, 40, 40, 40, 40, + + 165, 40, 167, 173, 168, 40, 180, 182, 40, 169, + 40, 174, 176, 40, 40, 177, 170, 181, 178, 175, + 40, 179, 40, 183, 188, 40, 184, 186, 40, 40, + 202, 40, 197, 198, 185, 40, 189, 190, 187, 192, + 191, 196, 40, 40, 193, 199, 40, 40, 200, 40, + 201, 40, 194, 116, 116, 116, 116, 195, 207, 207, + 207, 207, 212, 204, 205, 208, 40, 213, 40, 40, + 218, 208, 119, 119, 119, 119, 40, 214, 40, 120, + 40, 216, 215, 40, 40, 120, 209, 210, 40, 211, + 211, 211, 211, 40, 40, 217, 219, 40, 223, 224, + + 220, 40, 222, 221, 40, 40, 40, 40, 40, 40, + 225, 227, 40, 40, 226, 229, 230, 228, 234, 40, + 40, 235, 40, 40, 40, 237, 40, 40, 231, 236, + 232, 40, 233, 239, 40, 240, 242, 238, 40, 40, + 40, 241, 40, 40, 40, 243, 245, 40, 40, 40, + 246, 40, 40, 40, 40, 247, 255, 244, 249, 40, + 288, 261, 40, 262, 250, 251, 248, 252, 252, 252, + 252, 40, 253, 252, 252, 254, 252, 252, 252, 252, + 252, 252, 40, 260, 40, 40, 40, 40, 40, 40, + 40, 256, 263, 257, 40, 40, 40, 258, 266, 259, + + 265, 40, 40, 268, 269, 267, 40, 264, 40, 40, + 273, 270, 271, 272, 40, 275, 40, 40, 40, 274, + 40, 276, 278, 40, 40, 280, 281, 277, 282, 40, + 40, 40, 40, 284, 283, 279, 207, 207, 207, 207, + 40, 40, 285, 208, 295, 294, 299, 209, 209, 208, + 286, 286, 286, 286, 286, 286, 286, 286, 211, 211, + 211, 211, 40, 211, 211, 211, 211, 40, 40, 40, + 40, 40, 40, 40, 40, 40, 40, 40, 291, 40, + 40, 40, 302, 40, 40, 287, 289, 290, 304, 303, + 298, 40, 40, 40, 40, 292, 293, 301, 300, 306, + + 40, 296, 308, 40, 40, 307, 305, 40, 311, 40, + 40, 40, 309, 310, 40, 40, 40, 40, 312, 40, + 40, 40, 313, 40, 314, 315, 316, 321, 319, 320, + 323, 40, 325, 40, 317, 322, 40, 318, 40, 40, + 327, 40, 40, 40, 324, 330, 326, 40, 329, 332, + 331, 40, 333, 40, 334, 40, 328, 40, 336, 40, + 335, 40, 339, 337, 40, 40, 40, 40, 338, 40, + 40, 286, 286, 286, 286, 40, 340, 343, 40, 346, + 349, 40, 341, 348, 40, 342, 350, 40, 351, 352, + 345, 347, 344, 40, 353, 40, 40, 40, 40, 40, + + 40, 355, 40, 40, 40, 40, 40, 358, 40, 40, + 362, 363, 40, 40, 354, 356, 357, 359, 364, 361, + 365, 369, 360, 40, 366, 40, 40, 40, 40, 367, + 368, 40, 40, 372, 371, 40, 373, 374, 40, 40, + 370, 375, 40, 40, 40, 40, 40, 40, 40, 376, + 40, 380, 379, 378, 382, 384, 40, 40, 377, 40, + 40, 387, 390, 40, 385, 40, 381, 383, 40, 386, + 388, 40, 389, 40, 40, 40, 40, 40, 393, 40, + 392, 395, 396, 391, 40, 394, 40, 40, 400, 401, + 40, 40, 40, 397, 398, 399, 404, 406, 402, 405, + + 40, 40, 403, 40, 40, 40, 40, 407, 40, 40, + 40, 40, 408, 410, 40, 411, 412, 40, 409, 416, + 413, 414, 40, 417, 40, 40, 40, 40, 40, 40, + 40, 415, 40, 40, 418, 40, 424, 419, 425, 40, + 40, 423, 40, 420, 433, 421, 40, 426, 427, 429, + 428, 422, 40, 431, 430, 432, 40, 434, 40, 40, + 40, 40, 40, 40, 40, 435, 437, 40, 40, 40, + 40, 40, 439, 442, 40, 40, 40, 40, 446, 40, + 451, 436, 443, 438, 447, 440, 441, 444, 448, 40, + 450, 445, 40, 40, 40, 40, 449, 40, 453, 452, + + 455, 40, 40, 40, 40, 460, 456, 454, 458, 40, + 40, 461, 40, 40, 40, 40, 40, 40, 459, 465, + 467, 40, 40, 463, 457, 40, 40, 464, 466, 40, + 468, 40, 462, 469, 472, 473, 40, 40, 40, 40, + 470, 40, 40, 40, 40, 471, 476, 40, 40, 40, + 480, 477, 474, 478, 479, 40, 482, 40, 485, 40, + 475, 483, 486, 40, 487, 481, 484, 40, 488, 40, + 40, 40, 40, 40, 40, 40, 489, 40, 40, 494, + 495, 496, 40, 40, 490, 491, 40, 501, 40, 500, + 40, 493, 492, 40, 499, 40, 40, 40, 498, 40, - 40, 40, 40, 499, 498, 505, 507, 40, 40, 40, - 504, 40, 40, 40, 503, 508, 37, 37, 37, 37, - 39, 39, 50, 40, 50, 50, 40, 40, 40, 40, + 40, 497, 40, 40, 502, 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, 40, 40, 40, 40, 40, 40, 40, 40, 40, - 40, 40, 40, 40, 40, 40, 40, 40, 40, 210, + 40, 40, 40, 40, 40, 40, 40, 206, 40, 40, + 40, 40, 114, 40, 38, 503, 3, 503, 503, 503, - 40, 40, 40, 40, 116, 40, 38, 509, 3, 509, - 509, 509, 509, 509, 509, 509, 509, 509, 509, 509, - 509, 509, 509, 509, 509, 509, 509, 509, 509, 509, - 509, 509, 509, 509, 509, 509, 509, 509, 509, 509, - 509, 509, 509, 509, 509, 509, 509, 509, 509, 509, - 509, 509 + 503, 503, 503, 503, 503, 503, 503, 503, 503, 503, + 503, 503, 503, 503, 503, 503, 503, 503, 503, 503, + 503, 503, 503, 503, 503, 503, 503, 503, 503, 503, + 503, 503, 503, 503, 503, 503, 503, 503, 503, 503 } ; -static yyconst short int yy_chk[1153] = +static yyconst short int yy_chk[1141] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -709,7 +705,7 @@ 10, 10, 10, 11, 11, 11, 11, 11, 12, 62, 20, 62, 26, 12, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 16, 20, 46, 17, - 26, 29, 514, 46, 16, 512, 26, 20, 17, 23, + 26, 29, 508, 46, 16, 506, 26, 20, 17, 23, 29, 16, 17, 16, 18, 16, 13, 17, 16, 18, 17, 18, 19, 21, 22, 23, 23, 19, 21, 24, @@ -717,117 +713,115 @@ 19, 25, 24, 28, 21, 33, 25, 24, 34, 27, 33, 27, 64, 31, 51, 28, 53, 34, 31, 25, 36, 28, 51, 33, 53, 25, 30, 35, 35, 36, - 30, 31, 54, 56, 31, 64, 30, 508, 30, 30, - 506, 31, 30, 30, 56, 52, 35, 42, 42, 42, - 42, 54, 55, 30, 30, 57, 30, 32, 52, 58, - 52, 32, 43, 43, 43, 43, 57, 32, 55, 32, - 505, 504, 61, 73, 32, 66, 32, 58, 32, 61, - - 63, 68, 73, 32, 44, 44, 44, 44, 44, 45, - 45, 45, 45, 45, 45, 47, 47, 47, 47, 47, - 66, 63, 47, 207, 113, 68, 113, 207, 47, 48, - 48, 48, 48, 48, 48, 49, 49, 49, 49, 49, - 60, 49, 49, 67, 49, 49, 49, 49, 49, 49, - 65, 69, 71, 70, 72, 60, 74, 65, 67, 69, - 70, 76, 60, 75, 77, 78, 502, 71, 79, 65, - 84, 78, 72, 80, 71, 82, 70, 81, 80, 74, - 76, 75, 83, 82, 85, 79, 77, 77, 88, 77, - 80, 79, 81, 84, 89, 86, 90, 83, 91, 85, - - 86, 88, 92, 93, 97, 98, 94, 89, 230, 104, - 96, 98, 90, 94, 99, 100, 93, 95, 96, 90, - 102, 94, 97, 103, 230, 91, 105, 99, 100, 94, - 92, 106, 95, 102, 107, 95, 100, 104, 95, 105, - 134, 95, 103, 108, 102, 109, 111, 114, 106, 110, - 112, 108, 107, 110, 110, 112, 108, 109, 115, 111, - 139, 111, 126, 134, 108, 139, 110, 125, 114, 108, - 118, 118, 118, 118, 119, 119, 119, 119, 125, 115, - 126, 119, 132, 130, 128, 133, 136, 119, 121, 121, - 121, 121, 121, 128, 136, 121, 130, 132, 137, 140, - - 133, 121, 122, 122, 138, 122, 122, 122, 122, 122, - 141, 144, 146, 138, 140, 143, 145, 144, 147, 148, - 137, 146, 149, 151, 143, 141, 150, 147, 143, 145, - 153, 150, 151, 152, 154, 155, 153, 156, 157, 147, - 159, 148, 152, 158, 155, 149, 156, 160, 162, 154, - 161, 163, 158, 164, 159, 168, 157, 167, 161, 162, - 174, 170, 175, 180, 177, 183, 163, 500, 499, 498, - 160, 176, 167, 177, 183, 168, 186, 164, 170, 173, - 173, 173, 173, 174, 180, 173, 173, 175, 173, 173, - 173, 173, 173, 173, 176, 178, 184, 182, 187, 186, - - 188, 189, 192, 193, 178, 190, 178, 182, 194, 191, - 178, 188, 178, 187, 190, 195, 197, 184, 191, 200, - 189, 196, 201, 199, 202, 192, 198, 201, 193, 203, - 196, 194, 195, 197, 204, 198, 199, 200, 203, 205, - 206, 209, 204, 216, 205, 202, 217, 218, 211, 211, - 211, 211, 227, 217, 206, 211, 496, 227, 482, 209, - 216, 211, 212, 212, 218, 212, 212, 212, 212, 213, - 213, 213, 213, 214, 214, 214, 214, 214, 215, 215, - 215, 215, 215, 219, 223, 224, 225, 229, 228, 231, - 232, 223, 233, 235, 234, 232, 236, 238, 235, 237, - - 219, 228, 240, 243, 231, 236, 237, 241, 224, 225, - 242, 233, 241, 244, 229, 234, 245, 240, 246, 242, - 238, 247, 248, 251, 243, 252, 254, 257, 255, 259, - 245, 260, 261, 246, 244, 262, 257, 248, 260, 247, - 252, 251, 259, 265, 262, 263, 264, 266, 272, 279, - 254, 255, 261, 267, 263, 264, 268, 266, 262, 279, - 269, 271, 267, 272, 275, 268, 265, 269, 263, 278, - 271, 280, 281, 275, 282, 283, 284, 281, 285, 286, - 278, 288, 291, 290, 280, 292, 292, 292, 292, 285, - 295, 282, 300, 290, 294, 291, 283, 284, 295, 294, - - 297, 302, 299, 298, 288, 290, 286, 297, 298, 299, - 301, 303, 304, 300, 305, 306, 301, 307, 308, 310, - 302, 304, 313, 312, 314, 308, 310, 315, 316, 319, - 303, 305, 312, 317, 307, 320, 321, 313, 306, 322, - 314, 326, 317, 321, 320, 316, 319, 323, 322, 324, - 315, 327, 335, 336, 338, 339, 323, 344, 324, 326, - 340, 345, 346, 336, 347, 348, 338, 335, 345, 340, - 346, 350, 351, 353, 327, 354, 348, 352, 339, 359, - 344, 358, 352, 361, 356, 351, 359, 347, 362, 363, - 360, 368, 354, 372, 350, 370, 353, 356, 358, 360, - - 381, 373, 372, 479, 367, 361, 362, 363, 367, 367, - 373, 370, 374, 376, 368, 382, 384, 374, 385, 390, - 376, 381, 389, 395, 396, 384, 397, 398, 385, 400, - 399, 390, 382, 404, 397, 389, 405, 406, 395, 408, - 398, 407, 409, 410, 411, 414, 396, 399, 408, 412, - 416, 409, 400, 413, 404, 421, 407, 405, 423, 411, - 410, 417, 413, 406, 412, 420, 418, 414, 419, 422, - 417, 418, 424, 419, 420, 416, 422, 426, 421, 427, - 428, 423, 430, 424, 431, 432, 433, 437, 440, 428, - 436, 438, 439, 450, 440, 433, 437, 430, 438, 442, - - 426, 431, 427, 436, 443, 444, 442, 439, 432, 443, - 448, 449, 451, 452, 453, 448, 450, 451, 444, 454, - 449, 455, 456, 457, 459, 458, 454, 460, 461, 452, - 458, 462, 460, 463, 464, 456, 465, 466, 457, 459, - 467, 469, 461, 453, 455, 465, 466, 462, 476, 470, - 471, 472, 463, 473, 477, 475, 478, 464, 470, 480, - 481, 483, 485, 467, 475, 471, 472, 477, 473, 481, - 469, 476, 484, 478, 486, 485, 483, 480, 487, 484, - 488, 489, 490, 492, 491, 494, 493, 495, 497, 501, - 492, 486, 491, 493, 507, 474, 501, 503, 488, 487, - - 468, 447, 446, 490, 489, 497, 503, 445, 441, 435, - 495, 434, 429, 425, 494, 507, 510, 510, 510, 510, - 511, 511, 513, 415, 513, 513, 403, 402, 401, 394, - 393, 392, 391, 388, 387, 386, 383, 380, 379, 378, - 377, 375, 371, 369, 366, 365, 364, 357, 355, 349, - 343, 342, 341, 337, 334, 333, 332, 331, 330, 329, - 328, 325, 318, 311, 309, 296, 293, 289, 287, 277, - 276, 274, 273, 270, 258, 253, 250, 249, 239, 226, - 222, 221, 220, 208, 185, 181, 179, 172, 171, 169, - 166, 165, 142, 135, 131, 129, 127, 124, 120, 116, - - 101, 87, 59, 39, 37, 8, 7, 3, 509, 509, - 509, 509, 509, 509, 509, 509, 509, 509, 509, 509, - 509, 509, 509, 509, 509, 509, 509, 509, 509, 509, - 509, 509, 509, 509, 509, 509, 509, 509, 509, 509, - 509, 509, 509, 509, 509, 509, 509, 509, 509, 509, - 509, 509 + 30, 31, 54, 56, 31, 64, 30, 67, 111, 30, + 111, 31, 30, 30, 56, 52, 35, 42, 42, 42, + 42, 54, 67, 30, 30, 57, 30, 32, 52, 55, + 52, 32, 43, 43, 43, 43, 57, 32, 44, 44, + 44, 44, 44, 61, 32, 55, 32, 58, 32, 63, + + 61, 72, 226, 32, 45, 45, 45, 45, 45, 45, + 47, 47, 47, 47, 47, 58, 78, 47, 226, 72, + 63, 66, 78, 47, 48, 48, 48, 48, 48, 48, + 49, 49, 49, 49, 49, 60, 49, 49, 68, 49, + 49, 49, 49, 49, 49, 65, 66, 69, 71, 70, + 60, 73, 65, 74, 76, 69, 70, 60, 77, 75, + 73, 79, 68, 71, 65, 84, 92, 81, 91, 80, + 71, 82, 70, 76, 80, 83, 74, 75, 79, 82, + 77, 77, 81, 77, 79, 85, 80, 86, 84, 88, + 83, 89, 86, 90, 92, 91, 93, 94, 95, 96, + + 85, 97, 88, 93, 89, 102, 95, 97, 103, 90, + 98, 93, 94, 99, 101, 94, 90, 96, 94, 93, + 104, 94, 105, 98, 102, 110, 99, 101, 108, 107, + 110, 106, 108, 108, 99, 109, 103, 104, 101, 106, + 105, 107, 112, 113, 106, 108, 502, 132, 109, 124, + 109, 123, 106, 116, 116, 116, 116, 106, 117, 117, + 117, 117, 123, 112, 113, 117, 130, 124, 126, 128, + 132, 117, 119, 119, 119, 119, 119, 126, 135, 119, + 131, 130, 128, 138, 139, 119, 120, 120, 134, 120, + 120, 120, 120, 120, 136, 131, 134, 137, 138, 139, + + 135, 141, 137, 136, 143, 142, 144, 145, 146, 147, + 141, 142, 149, 148, 141, 144, 145, 143, 148, 151, + 150, 149, 152, 155, 153, 151, 154, 156, 145, 150, + 146, 157, 147, 153, 158, 154, 156, 152, 159, 160, + 161, 155, 162, 165, 166, 157, 159, 174, 168, 172, + 160, 179, 173, 213, 180, 161, 174, 158, 165, 500, + 213, 179, 177, 180, 166, 168, 162, 171, 171, 171, + 171, 181, 172, 171, 171, 173, 171, 171, 171, 171, + 171, 171, 175, 177, 183, 184, 186, 185, 189, 190, + 499, 175, 181, 175, 187, 188, 191, 175, 185, 175, + + 184, 192, 193, 187, 188, 186, 194, 183, 195, 196, + 192, 189, 190, 191, 198, 194, 199, 197, 200, 193, + 202, 195, 197, 201, 205, 199, 200, 196, 201, 203, + 498, 224, 496, 203, 202, 198, 207, 207, 207, 207, + 223, 228, 205, 207, 224, 223, 228, 208, 208, 207, + 208, 208, 208, 208, 209, 209, 209, 209, 210, 210, + 210, 210, 210, 211, 211, 211, 211, 211, 212, 214, + 215, 219, 220, 221, 225, 227, 230, 231, 219, 229, + 232, 233, 231, 234, 236, 212, 214, 215, 233, 232, + 227, 239, 240, 238, 241, 220, 221, 230, 229, 236, + + 237, 225, 238, 242, 243, 237, 234, 247, 241, 244, + 250, 248, 239, 240, 251, 256, 254, 494, 242, 253, + 255, 257, 243, 258, 244, 247, 248, 255, 253, 254, + 257, 259, 258, 260, 250, 256, 262, 251, 261, 267, + 259, 263, 264, 266, 257, 262, 258, 272, 261, 264, + 263, 270, 266, 273, 267, 274, 260, 275, 272, 276, + 270, 277, 275, 273, 278, 280, 279, 282, 274, 284, + 285, 286, 286, 286, 286, 288, 276, 279, 289, 284, + 288, 291, 277, 285, 292, 278, 289, 293, 291, 292, + 282, 284, 280, 294, 293, 295, 296, 297, 298, 300, + + 299, 295, 301, 302, 304, 307, 309, 298, 308, 306, + 302, 304, 311, 310, 294, 296, 297, 299, 306, 301, + 307, 311, 300, 313, 308, 314, 315, 316, 317, 309, + 310, 320, 318, 315, 314, 321, 316, 317, 329, 332, + 313, 318, 330, 333, 338, 334, 341, 344, 339, 320, + 342, 332, 330, 329, 334, 339, 340, 346, 321, 345, + 347, 342, 346, 348, 340, 350, 333, 338, 352, 341, + 344, 355, 345, 354, 353, 362, 356, 357, 350, 493, + 348, 353, 354, 347, 361, 352, 364, 366, 361, 361, + 367, 375, 368, 355, 356, 357, 366, 368, 362, 367, + + 370, 376, 364, 383, 378, 379, 389, 370, 384, 390, + 392, 391, 375, 378, 394, 379, 383, 393, 376, 391, + 384, 389, 398, 392, 399, 400, 401, 402, 410, 403, + 404, 390, 408, 405, 393, 406, 402, 394, 403, 412, + 407, 401, 492, 398, 412, 399, 411, 404, 405, 407, + 406, 400, 413, 410, 408, 411, 414, 413, 415, 416, + 417, 418, 420, 421, 422, 414, 416, 424, 426, 427, + 425, 430, 418, 422, 434, 433, 447, 490, 427, 431, + 434, 415, 424, 417, 430, 420, 421, 425, 431, 432, + 433, 426, 436, 437, 438, 442, 432, 443, 437, 436, + + 442, 444, 446, 445, 448, 447, 443, 438, 445, 449, + 450, 448, 451, 453, 452, 454, 455, 456, 446, 452, + 454, 457, 458, 450, 444, 459, 460, 451, 453, 461, + 455, 463, 449, 456, 459, 460, 465, 464, 466, 467, + 457, 469, 470, 471, 472, 458, 464, 477, 474, 475, + 469, 465, 461, 466, 467, 479, 471, 478, 475, 480, + 463, 472, 477, 481, 478, 470, 474, 482, 479, 483, + 484, 485, 488, 486, 487, 489, 480, 491, 497, 485, + 486, 487, 495, 501, 481, 482, 476, 497, 473, 495, + 468, 484, 483, 462, 491, 441, 440, 439, 489, 435, + + 429, 488, 428, 423, 501, 504, 504, 504, 504, 505, + 505, 507, 419, 507, 507, 409, 397, 396, 395, 388, + 387, 386, 385, 382, 381, 380, 377, 374, 373, 372, + 371, 369, 365, 363, 360, 359, 358, 351, 349, 343, + 337, 336, 335, 331, 328, 327, 326, 325, 324, 323, + 322, 319, 312, 305, 303, 290, 287, 283, 281, 271, + 269, 268, 265, 249, 246, 245, 235, 222, 218, 217, + 216, 204, 182, 178, 176, 170, 169, 167, 164, 163, + 140, 133, 129, 127, 125, 122, 118, 114, 100, 87, + 59, 39, 37, 8, 7, 3, 503, 503, 503, 503, + + 503, 503, 503, 503, 503, 503, 503, 503, 503, 503, + 503, 503, 503, 503, 503, 503, 503, 503, 503, 503, + 503, 503, 503, 503, 503, 503, 503, 503, 503, 503, + 503, 503, 503, 503, 503, 503, 503, 503, 503, 503 } ; static yy_state_type yy_state_buf[YY_BUF_SIZE + 2], *yy_state_ptr; @@ -844,7 +838,7 @@ #define YY_MORE_ADJ 0 #define YY_RESTORE_YY_MORE_OFFSET char *yytext; -#line 1 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 1 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" #define INITIAL 0 /*===-- Lexer.l - Scanner for llvm assembly files --------------*- C++ -*--===// // @@ -859,7 +853,7 @@ // //===----------------------------------------------------------------------===*/ #define YY_NEVER_INTERACTIVE 1 -#line 28 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 28 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" #include "ParserInternals.h" #include "llvm/Module.h" #include @@ -874,18 +868,8 @@ yy_scan_string (str); } -// Construct a token value for a non-obsolete token #define RET_TOK(type, Enum, sym) \ - llvmAsmlval.type.opcode = Instruction::Enum; \ - llvmAsmlval.type.obsolete = false; \ - return sym - -// Construct a token value for an obsolete token -#define RET_TOK_OBSOLETE(type, Enum, sym) \ - llvmAsmlval.type.opcode = Instruction::Enum; \ - llvmAsmlval.type.obsolete = true; \ - return sym - + llvmAsmlval.type = Instruction::Enum; return sym namespace llvm { @@ -995,7 +979,7 @@ /* HexIntConstant - Hexadecimal constant generated by the CFE to avoid forcing * it to deal with 64 bit numbers. */ -#line 999 "Lexer.cpp" +#line 983 "Lexer.cpp" /* Macros after this point can all be overridden by user definitions in * section 1. @@ -1146,10 +1130,10 @@ register char *yy_cp = NULL, *yy_bp = NULL; register int yy_act; -#line 189 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 179 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" -#line 1153 "Lexer.cpp" +#line 1137 "Lexer.cpp" if ( yy_init ) { @@ -1197,14 +1181,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 >= 510 ) + if ( yy_current_state >= 504 ) 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 != 509 ); + while ( yy_current_state != 503 ); yy_find_action: yy_current_state = *--yy_state_ptr; @@ -1242,526 +1226,516 @@ { /* beginning of action switch */ case 1: YY_RULE_SETUP -#line 191 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 181 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { /* Ignore comments for now */ } YY_BREAK case 2: YY_RULE_SETUP -#line 193 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 183 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { return BEGINTOK; } YY_BREAK case 3: YY_RULE_SETUP -#line 194 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 184 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { return ENDTOK; } YY_BREAK case 4: YY_RULE_SETUP -#line 195 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 185 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { return TRUETOK; } YY_BREAK case 5: YY_RULE_SETUP -#line 196 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 186 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { return FALSETOK; } YY_BREAK case 6: YY_RULE_SETUP -#line 197 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 187 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { return DECLARE; } YY_BREAK case 7: YY_RULE_SETUP -#line 198 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 188 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { return GLOBAL; } YY_BREAK case 8: YY_RULE_SETUP -#line 199 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 189 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { return CONSTANT; } YY_BREAK case 9: YY_RULE_SETUP -#line 200 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 190 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { return INTERNAL; } YY_BREAK case 10: YY_RULE_SETUP -#line 201 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 191 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { return LINKONCE; } YY_BREAK case 11: YY_RULE_SETUP -#line 202 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 192 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { return WEAK; } YY_BREAK case 12: YY_RULE_SETUP -#line 203 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 193 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { return APPENDING; } YY_BREAK case 13: YY_RULE_SETUP -#line 204 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 194 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { return DLLIMPORT; } YY_BREAK case 14: YY_RULE_SETUP -#line 205 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 195 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { return DLLEXPORT; } YY_BREAK case 15: YY_RULE_SETUP -#line 206 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 196 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { return EXTERN_WEAK; } YY_BREAK case 16: YY_RULE_SETUP -#line 207 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 197 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { return EXTERNAL; } /* Deprecated, turn into external */ YY_BREAK case 17: YY_RULE_SETUP -#line 208 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 198 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { return EXTERNAL; } YY_BREAK case 18: YY_RULE_SETUP -#line 209 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 199 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { return IMPLEMENTATION; } YY_BREAK case 19: YY_RULE_SETUP -#line 210 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 200 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { return ZEROINITIALIZER; } YY_BREAK case 20: YY_RULE_SETUP -#line 211 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 201 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { return DOTDOTDOT; } YY_BREAK case 21: YY_RULE_SETUP -#line 212 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 202 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { return UNDEF; } YY_BREAK case 22: YY_RULE_SETUP -#line 213 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 203 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { return NULL_TOK; } YY_BREAK case 23: YY_RULE_SETUP -#line 214 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 204 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { return TO; } YY_BREAK case 24: YY_RULE_SETUP -#line 215 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 205 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { RET_TOK(TermOpVal, Unwind, UNWIND); } YY_BREAK case 25: YY_RULE_SETUP -#line 216 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 206 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { return NOT; } /* Deprecated, turned into XOR */ YY_BREAK case 26: YY_RULE_SETUP -#line 217 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 207 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { return TAIL; } YY_BREAK case 27: YY_RULE_SETUP -#line 218 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 208 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { return TARGET; } YY_BREAK case 28: YY_RULE_SETUP -#line 219 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 209 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { return TRIPLE; } YY_BREAK case 29: YY_RULE_SETUP -#line 220 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 210 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { return DEPLIBS; } YY_BREAK case 30: YY_RULE_SETUP -#line 221 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 211 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { return ENDIAN; } YY_BREAK case 31: YY_RULE_SETUP -#line 222 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 212 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { return POINTERSIZE; } YY_BREAK case 32: YY_RULE_SETUP -#line 223 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 213 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { return DATA; } YY_BREAK case 33: YY_RULE_SETUP -#line 224 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 214 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { return LITTLE; } YY_BREAK case 34: YY_RULE_SETUP -#line 225 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 215 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { return BIG; } YY_BREAK case 35: YY_RULE_SETUP -#line 226 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 216 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { return VOLATILE; } YY_BREAK case 36: YY_RULE_SETUP -#line 227 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 217 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { return ALIGN; } YY_BREAK case 37: YY_RULE_SETUP -#line 228 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 218 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { return SECTION; } YY_BREAK case 38: YY_RULE_SETUP -#line 229 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 219 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { return MODULE; } YY_BREAK case 39: YY_RULE_SETUP -#line 230 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 220 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { return ASM_TOK; } YY_BREAK case 40: YY_RULE_SETUP -#line 231 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 221 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { return SIDEEFFECT; } YY_BREAK case 41: YY_RULE_SETUP -#line 233 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 223 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { return CC_TOK; } YY_BREAK case 42: YY_RULE_SETUP -#line 234 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 224 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { return CCC_TOK; } YY_BREAK case 43: YY_RULE_SETUP -#line 235 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 225 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { return CSRETCC_TOK; } YY_BREAK case 44: YY_RULE_SETUP -#line 236 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 226 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { return FASTCC_TOK; } YY_BREAK case 45: YY_RULE_SETUP -#line 237 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 227 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { return COLDCC_TOK; } YY_BREAK case 46: YY_RULE_SETUP -#line 238 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 228 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { return X86_STDCALLCC_TOK; } YY_BREAK case 47: YY_RULE_SETUP -#line 239 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 229 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { return X86_FASTCALLCC_TOK; } YY_BREAK case 48: YY_RULE_SETUP -#line 241 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 231 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { llvmAsmlval.PrimType = Type::VoidTy ; return VOID; } YY_BREAK case 49: YY_RULE_SETUP -#line 242 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 232 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { llvmAsmlval.PrimType = Type::BoolTy ; return BOOL; } YY_BREAK case 50: YY_RULE_SETUP -#line 243 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 233 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { llvmAsmlval.PrimType = Type::SByteTy ; return SBYTE; } YY_BREAK case 51: YY_RULE_SETUP -#line 244 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 234 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { llvmAsmlval.PrimType = Type::UByteTy ; return UBYTE; } YY_BREAK case 52: YY_RULE_SETUP -#line 245 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 235 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { llvmAsmlval.PrimType = Type::ShortTy ; return SHORT; } YY_BREAK case 53: YY_RULE_SETUP -#line 246 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 236 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { llvmAsmlval.PrimType = Type::UShortTy; return USHORT; } YY_BREAK case 54: YY_RULE_SETUP -#line 247 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 237 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { llvmAsmlval.PrimType = Type::IntTy ; return INT; } YY_BREAK case 55: YY_RULE_SETUP -#line 248 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 238 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { llvmAsmlval.PrimType = Type::UIntTy ; return UINT; } YY_BREAK case 56: YY_RULE_SETUP -#line 249 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 239 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { llvmAsmlval.PrimType = Type::LongTy ; return LONG; } YY_BREAK case 57: YY_RULE_SETUP -#line 250 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 240 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { llvmAsmlval.PrimType = Type::ULongTy ; return ULONG; } YY_BREAK case 58: YY_RULE_SETUP -#line 251 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 241 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { llvmAsmlval.PrimType = Type::FloatTy ; return FLOAT; } YY_BREAK case 59: YY_RULE_SETUP -#line 252 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 242 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { llvmAsmlval.PrimType = Type::DoubleTy; return DOUBLE; } YY_BREAK case 60: YY_RULE_SETUP -#line 253 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 243 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { llvmAsmlval.PrimType = Type::LabelTy ; return LABEL; } YY_BREAK case 61: YY_RULE_SETUP -#line 254 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 244 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { return TYPE; } YY_BREAK case 62: YY_RULE_SETUP -#line 255 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 245 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { return OPAQUE; } YY_BREAK case 63: YY_RULE_SETUP -#line 257 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 247 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { RET_TOK(BinaryOpVal, Add, ADD); } YY_BREAK case 64: YY_RULE_SETUP -#line 258 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 248 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { RET_TOK(BinaryOpVal, Sub, SUB); } YY_BREAK case 65: YY_RULE_SETUP -#line 259 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 249 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { RET_TOK(BinaryOpVal, Mul, MUL); } YY_BREAK case 66: YY_RULE_SETUP -#line 260 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" -{ RET_TOK_OBSOLETE(BinaryOpVal, UDiv, UDIV); } +#line 250 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +{ RET_TOK(BinaryOpVal, Div, DIV); } YY_BREAK case 67: YY_RULE_SETUP -#line 261 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" -{ RET_TOK(BinaryOpVal, UDiv, UDIV); } - YY_BREAK -case 68: -YY_RULE_SETUP -#line 262 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" -{ RET_TOK(BinaryOpVal, UDiv, UDIV); } - YY_BREAK -case 69: -YY_RULE_SETUP -#line 263 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 251 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { RET_TOK(BinaryOpVal, Rem, REM); } YY_BREAK -case 70: +case 68: YY_RULE_SETUP -#line 264 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 252 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { RET_TOK(BinaryOpVal, And, AND); } YY_BREAK -case 71: +case 69: YY_RULE_SETUP -#line 265 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 253 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { RET_TOK(BinaryOpVal, Or , OR ); } YY_BREAK -case 72: +case 70: YY_RULE_SETUP -#line 266 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 254 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { RET_TOK(BinaryOpVal, Xor, XOR); } YY_BREAK -case 73: +case 71: YY_RULE_SETUP -#line 267 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 255 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { RET_TOK(BinaryOpVal, SetNE, SETNE); } YY_BREAK -case 74: +case 72: YY_RULE_SETUP -#line 268 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 256 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { RET_TOK(BinaryOpVal, SetEQ, SETEQ); } YY_BREAK -case 75: +case 73: YY_RULE_SETUP -#line 269 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 257 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { RET_TOK(BinaryOpVal, SetLT, SETLT); } YY_BREAK -case 76: +case 74: YY_RULE_SETUP -#line 270 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 258 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { RET_TOK(BinaryOpVal, SetGT, SETGT); } YY_BREAK -case 77: +case 75: YY_RULE_SETUP -#line 271 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 259 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { RET_TOK(BinaryOpVal, SetLE, SETLE); } YY_BREAK -case 78: +case 76: YY_RULE_SETUP -#line 272 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 260 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { RET_TOK(BinaryOpVal, SetGE, SETGE); } YY_BREAK -case 79: +case 77: YY_RULE_SETUP -#line 274 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 262 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { RET_TOK(OtherOpVal, PHI, PHI_TOK); } YY_BREAK -case 80: +case 78: YY_RULE_SETUP -#line 275 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 263 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { RET_TOK(OtherOpVal, Call, CALL); } YY_BREAK -case 81: +case 79: YY_RULE_SETUP -#line 276 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 264 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { RET_TOK(OtherOpVal, Cast, CAST); } YY_BREAK -case 82: +case 80: YY_RULE_SETUP -#line 277 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 265 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { RET_TOK(OtherOpVal, Select, SELECT); } YY_BREAK -case 83: +case 81: YY_RULE_SETUP -#line 278 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 266 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { RET_TOK(OtherOpVal, Shl, SHL); } YY_BREAK -case 84: +case 82: YY_RULE_SETUP -#line 279 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 267 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { RET_TOK(OtherOpVal, Shr, SHR); } YY_BREAK -case 85: +case 83: YY_RULE_SETUP -#line 280 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 268 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { return VANEXT_old; } YY_BREAK -case 86: +case 84: YY_RULE_SETUP -#line 281 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 269 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { return VAARG_old; } YY_BREAK -case 87: +case 85: YY_RULE_SETUP -#line 282 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 270 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { RET_TOK(OtherOpVal, VAArg , VAARG); } YY_BREAK -case 88: +case 86: YY_RULE_SETUP -#line 283 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 271 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { RET_TOK(TermOpVal, Ret, RET); } YY_BREAK -case 89: +case 87: YY_RULE_SETUP -#line 284 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 272 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { RET_TOK(TermOpVal, Br, BR); } YY_BREAK -case 90: +case 88: YY_RULE_SETUP -#line 285 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 273 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { RET_TOK(TermOpVal, Switch, SWITCH); } YY_BREAK -case 91: +case 89: YY_RULE_SETUP -#line 286 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 274 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { RET_TOK(TermOpVal, Invoke, INVOKE); } YY_BREAK -case 92: +case 90: YY_RULE_SETUP -#line 287 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 275 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { RET_TOK(TermOpVal, Unwind, UNWIND); } YY_BREAK -case 93: +case 91: YY_RULE_SETUP -#line 288 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 276 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { RET_TOK(TermOpVal, Unreachable, UNREACHABLE); } YY_BREAK -case 94: +case 92: YY_RULE_SETUP -#line 290 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 278 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { RET_TOK(MemOpVal, Malloc, MALLOC); } YY_BREAK -case 95: +case 93: YY_RULE_SETUP -#line 291 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 279 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { RET_TOK(MemOpVal, Alloca, ALLOCA); } YY_BREAK -case 96: +case 94: YY_RULE_SETUP -#line 292 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 280 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { RET_TOK(MemOpVal, Free, FREE); } YY_BREAK -case 97: +case 95: YY_RULE_SETUP -#line 293 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 281 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { RET_TOK(MemOpVal, Load, LOAD); } YY_BREAK -case 98: +case 96: YY_RULE_SETUP -#line 294 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 282 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { RET_TOK(MemOpVal, Store, STORE); } YY_BREAK -case 99: +case 97: YY_RULE_SETUP -#line 295 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 283 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { RET_TOK(MemOpVal, GetElementPtr, GETELEMENTPTR); } YY_BREAK -case 100: +case 98: YY_RULE_SETUP -#line 297 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 285 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { RET_TOK(OtherOpVal, ExtractElement, EXTRACTELEMENT); } YY_BREAK -case 101: +case 99: YY_RULE_SETUP -#line 298 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 286 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { RET_TOK(OtherOpVal, InsertElement, INSERTELEMENT); } YY_BREAK -case 102: +case 100: YY_RULE_SETUP -#line 299 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 287 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { RET_TOK(OtherOpVal, ShuffleVector, SHUFFLEVECTOR); } YY_BREAK -case 103: +case 101: YY_RULE_SETUP -#line 302 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 290 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { UnEscapeLexed(yytext+1); llvmAsmlval.StrVal = strdup(yytext+1); // Skip % return VAR_ID; } YY_BREAK -case 104: +case 102: YY_RULE_SETUP -#line 307 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 295 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { yytext[strlen(yytext)-1] = 0; // nuke colon UnEscapeLexed(yytext); @@ -1769,9 +1743,9 @@ return LABELSTR; } YY_BREAK -case 105: +case 103: YY_RULE_SETUP -#line 313 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 301 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { yytext[strlen(yytext)-2] = 0; // nuke colon, end quote UnEscapeLexed(yytext+1); @@ -1779,9 +1753,9 @@ return LABELSTR; } YY_BREAK -case 106: +case 104: YY_RULE_SETUP -#line 320 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 308 "/proj/llvm/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 @@ -1792,14 +1766,14 @@ return STRINGCONSTANT; } YY_BREAK -case 107: +case 105: YY_RULE_SETUP -#line 331 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 319 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { llvmAsmlval.UInt64Val = atoull(yytext); return EUINT64VAL; } YY_BREAK -case 108: +case 106: YY_RULE_SETUP -#line 332 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 320 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { uint64_t Val = atoull(yytext+1); // +1: we have bigger negative range @@ -1809,17 +1783,17 @@ return ESINT64VAL; } YY_BREAK -case 109: +case 107: YY_RULE_SETUP -#line 340 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 328 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { llvmAsmlval.UInt64Val = HexIntToVal(yytext+3); return yytext[0] == 's' ? ESINT64VAL : EUINT64VAL; } YY_BREAK -case 110: +case 108: YY_RULE_SETUP -#line 345 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 333 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { uint64_t Val = atoull(yytext+1); if ((unsigned)Val != Val) @@ -1828,9 +1802,9 @@ return UINTVAL; } YY_BREAK -case 111: +case 109: YY_RULE_SETUP -#line 352 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 340 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { uint64_t Val = atoull(yytext+2); // +1: we have bigger negative range @@ -1840,18 +1814,18 @@ return SINTVAL; } YY_BREAK -case 112: +case 110: YY_RULE_SETUP -#line 361 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 349 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { llvmAsmlval.FPVal = atof(yytext); return FPVAL; } YY_BREAK -case 113: +case 111: YY_RULE_SETUP -#line 362 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 350 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { llvmAsmlval.FPVal = HexToFP(yytext); return FPVAL; } YY_BREAK case YY_STATE_EOF(INITIAL): -#line 364 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 352 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { /* Make sure to free the internal buffers for flex when we are * done reading our input! @@ -1860,22 +1834,22 @@ return EOF; } YY_BREAK -case 114: +case 112: YY_RULE_SETUP -#line 372 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 360 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { /* Ignore whitespace */ } YY_BREAK -case 115: +case 113: YY_RULE_SETUP -#line 373 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 361 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" { return yytext[0]; } YY_BREAK -case 116: +case 114: YY_RULE_SETUP -#line 375 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 363 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" YY_FATAL_ERROR( "flex scanner jammed" ); YY_BREAK -#line 1879 "Lexer.cpp" +#line 1853 "Lexer.cpp" case YY_END_OF_BUFFER: { @@ -2162,7 +2136,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 >= 510 ) + if ( yy_current_state >= 504 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; @@ -2192,11 +2166,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 >= 510 ) + if ( yy_current_state >= 504 ) 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 == 509); + yy_is_jam = (yy_current_state == 503); if ( ! yy_is_jam ) *yy_state_ptr++ = yy_current_state; @@ -2753,5 +2727,5 @@ return 0; } #endif -#line 375 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +#line 363 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" Index: llvm/lib/AsmParser/Lexer.l diff -u llvm/lib/AsmParser/Lexer.l:1.78.2.1 llvm/lib/AsmParser/Lexer.l:1.78.2.2 --- llvm/lib/AsmParser/Lexer.l:1.78.2.1 Thu Oct 19 14:16:00 2006 +++ llvm/lib/AsmParser/Lexer.l Thu Oct 19 19:34:43 2006 @@ -39,18 +39,8 @@ yy_scan_string (str); } -// Construct a token value for a non-obsolete token #define RET_TOK(type, Enum, sym) \ - llvmAsmlval.type.opcode = Instruction::Enum; \ - llvmAsmlval.type.obsolete = false; \ - return sym - -// Construct a token value for an obsolete token -#define RET_TOK_OBSOLETE(type, Enum, sym) \ - llvmAsmlval.type.opcode = Instruction::Enum; \ - llvmAsmlval.type.obsolete = true; \ - return sym - + llvmAsmlval.type = Instruction::Enum; return sym namespace llvm { @@ -257,9 +247,7 @@ add { RET_TOK(BinaryOpVal, Add, ADD); } sub { RET_TOK(BinaryOpVal, Sub, SUB); } mul { RET_TOK(BinaryOpVal, Mul, MUL); } -div { RET_TOK_OBSOLETE(BinaryOpVal, UDiv, UDIV); } -udiv { RET_TOK(BinaryOpVal, UDiv, UDIV); } -sdiv { RET_TOK(BinaryOpVal, UDiv, UDIV); } +div { RET_TOK(BinaryOpVal, Div, DIV); } rem { RET_TOK(BinaryOpVal, Rem, REM); } and { RET_TOK(BinaryOpVal, And, AND); } or { RET_TOK(BinaryOpVal, Or , OR ); } Index: llvm/lib/AsmParser/Lexer.l.cvs diff -u llvm/lib/AsmParser/Lexer.l.cvs:1.8.2.1 llvm/lib/AsmParser/Lexer.l.cvs:1.8.2.2 --- llvm/lib/AsmParser/Lexer.l.cvs:1.8.2.1 Thu Oct 19 14:22:56 2006 +++ llvm/lib/AsmParser/Lexer.l.cvs Thu Oct 19 19:34:43 2006 @@ -39,18 +39,8 @@ yy_scan_string (str); } -// Construct a token value for a non-obsolete token #define RET_TOK(type, Enum, sym) \ - llvmAsmlval.type.opcode = Instruction::Enum; \ - llvmAsmlval.type.obsolete = false; \ - return sym - -// Construct a token value for an obsolete token -#define RET_TOK_OBSOLETE(type, Enum, sym) \ - llvmAsmlval.type.opcode = Instruction::Enum; \ - llvmAsmlval.type.obsolete = true; \ - return sym - + llvmAsmlval.type = Instruction::Enum; return sym namespace llvm { @@ -257,9 +247,7 @@ add { RET_TOK(BinaryOpVal, Add, ADD); } sub { RET_TOK(BinaryOpVal, Sub, SUB); } mul { RET_TOK(BinaryOpVal, Mul, MUL); } -div { RET_TOK_OBSOLETE(BinaryOpVal, UDiv, UDIV); } -udiv { RET_TOK(BinaryOpVal, UDiv, UDIV); } -sdiv { RET_TOK(BinaryOpVal, UDiv, UDIV); } +div { RET_TOK(BinaryOpVal, Div, DIV); } rem { RET_TOK(BinaryOpVal, Rem, REM); } and { RET_TOK(BinaryOpVal, And, AND); } or { RET_TOK(BinaryOpVal, Or , OR ); } Index: llvm/lib/AsmParser/ParserInternals.h diff -u llvm/lib/AsmParser/ParserInternals.h:1.45.2.1 llvm/lib/AsmParser/ParserInternals.h:1.45.2.2 --- llvm/lib/AsmParser/ParserInternals.h:1.45.2.1 Thu Oct 19 14:16:00 2006 +++ llvm/lib/AsmParser/ParserInternals.h Thu Oct 19 19:34:43 2006 @@ -201,20 +201,4 @@ } // End llvm namespace -// This structure is used to keep track of obsolete opcodes. The lexer will -// retain the ability to parse obsolete opcode mnemonics. In this case it will -// set "obsolete" to true and the opcode will be the replacement opcode. For -// example if "rem" is encountered then opcode will be set to "urem" and the -// "obsolete" flag will be true. If the opcode is not obsolete then "obsolete" -// will be false. -template -struct OpcodeInfo { - Enum opcode; - bool obsolete; -}; -typedef OpcodeInfo BinaryOpInfo; -typedef OpcodeInfo TermOpInfo; -typedef OpcodeInfo MemOpInfo; -typedef OpcodeInfo OtherOpInfo; - #endif Index: llvm/lib/AsmParser/llvmAsmParser.cpp.cvs diff -u llvm/lib/AsmParser/llvmAsmParser.cpp.cvs:1.18.2.2 llvm/lib/AsmParser/llvmAsmParser.cpp.cvs:1.18.2.3 --- llvm/lib/AsmParser/llvmAsmParser.cpp.cvs:1.18.2.2 Thu Oct 19 14:22:56 2006 +++ llvm/lib/AsmParser/llvmAsmParser.cpp.cvs Thu Oct 19 19:34:43 2006 @@ -142,35 +142,34 @@ ADD = 333, SUB = 334, MUL = 335, - UDIV = 336, - SDIV = 337, - REM = 338, - AND = 339, - OR = 340, - XOR = 341, - SETLE = 342, - SETGE = 343, - SETLT = 344, - SETGT = 345, - SETEQ = 346, - SETNE = 347, - MALLOC = 348, - ALLOCA = 349, - FREE = 350, - LOAD = 351, - STORE = 352, - GETELEMENTPTR = 353, - PHI_TOK = 354, - CAST = 355, - SELECT = 356, - SHL = 357, - SHR = 358, - VAARG = 359, - EXTRACTELEMENT = 360, - INSERTELEMENT = 361, - SHUFFLEVECTOR = 362, - VAARG_old = 363, - VANEXT_old = 364 + DIV = 336, + REM = 337, + AND = 338, + OR = 339, + XOR = 340, + SETLE = 341, + SETGE = 342, + SETLT = 343, + SETGT = 344, + SETEQ = 345, + SETNE = 346, + MALLOC = 347, + ALLOCA = 348, + FREE = 349, + LOAD = 350, + STORE = 351, + GETELEMENTPTR = 352, + PHI_TOK = 353, + CAST = 354, + SELECT = 355, + SHL = 356, + SHR = 357, + VAARG = 358, + EXTRACTELEMENT = 359, + INSERTELEMENT = 360, + SHUFFLEVECTOR = 361, + VAARG_old = 362, + VANEXT_old = 363 }; #endif /* Tokens. */ @@ -252,41 +251,40 @@ #define ADD 333 #define SUB 334 #define MUL 335 -#define UDIV 336 -#define SDIV 337 -#define REM 338 -#define AND 339 -#define OR 340 -#define XOR 341 -#define SETLE 342 -#define SETGE 343 -#define SETLT 344 -#define SETGT 345 -#define SETEQ 346 -#define SETNE 347 -#define MALLOC 348 -#define ALLOCA 349 -#define FREE 350 -#define LOAD 351 -#define STORE 352 -#define GETELEMENTPTR 353 -#define PHI_TOK 354 -#define CAST 355 -#define SELECT 356 -#define SHL 357 -#define SHR 358 -#define VAARG 359 -#define EXTRACTELEMENT 360 -#define INSERTELEMENT 361 -#define SHUFFLEVECTOR 362 -#define VAARG_old 363 -#define VANEXT_old 364 +#define DIV 336 +#define REM 337 +#define AND 338 +#define OR 339 +#define XOR 340 +#define SETLE 341 +#define SETGE 342 +#define SETLT 343 +#define SETGT 344 +#define SETEQ 345 +#define SETNE 346 +#define MALLOC 347 +#define ALLOCA 348 +#define FREE 349 +#define LOAD 350 +#define STORE 351 +#define GETELEMENTPTR 352 +#define PHI_TOK 353 +#define CAST 354 +#define SELECT 355 +#define SHL 356 +#define SHR 357 +#define VAARG 358 +#define EXTRACTELEMENT 359 +#define INSERTELEMENT 360 +#define SHUFFLEVECTOR 361 +#define VAARG_old 362 +#define VANEXT_old 363 /* Copy the first part of user declarations. */ -#line 14 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" +#line 14 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" #include "ParserInternals.h" #include "llvm/CallingConv.h" @@ -1089,23 +1087,6 @@ return Ty; } -// This function is -template -static void sanitizeOpCode(OpcodeInfo &OI, const PATypeHolder& Ty) { - if (OI.obsolete) { - switch (OI.opcode) { - default: - GenerateError("Invalid Obsolete OpCode"); - break; - case Instruction::UDiv: - if (Ty->isSigned()) - OI.opcode = Instruction::SDiv; - break; - } - OI.obsolete = false; - } -} - // common code from the two 'RunVMAsmParser' functions static Module* RunParser(Module * M) { @@ -1283,7 +1264,7 @@ #endif #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) -#line 991 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" +#line 974 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" typedef union YYSTYPE { llvm::Module *ModuleVal; llvm::Function *FunctionVal; @@ -1317,14 +1298,14 @@ char *StrVal; // This memory is strdup'd! llvm::ValID ValIDVal; // strdup'd memory maybe! - BinaryOpInfo BinaryOpVal; - TermOpInfo TermOpVal; - MemOpInfo MemOpVal; - OtherOpInfo OtherOpVal; - llvm::Module::Endianness Endianness; + llvm::Instruction::BinaryOps BinaryOpVal; + llvm::Instruction::TermOps TermOpVal; + llvm::Instruction::MemoryOps MemOpVal; + llvm::Instruction::OtherOps OtherOpVal; + llvm::Module::Endianness Endianness; } YYSTYPE; /* Line 196 of yacc.c. */ -#line 1328 "llvmAsmParser.tab.c" +#line 1309 "llvmAsmParser.tab.c" # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 # define YYSTYPE_IS_TRIVIAL 1 @@ -1336,7 +1317,7 @@ /* Line 219 of yacc.c. */ -#line 1340 "llvmAsmParser.tab.c" +#line 1321 "llvmAsmParser.tab.c" #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) # define YYSIZE_T __SIZE_TYPE__ @@ -1487,20 +1468,20 @@ /* YYFINAL -- State number of the termination state. */ #define YYFINAL 4 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 1301 +#define YYLAST 1339 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 124 +#define YYNTOKENS 123 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 75 /* YYNRULES -- Number of rules. */ -#define YYNRULES 253 +#define YYNRULES 252 /* YYNRULES -- Number of states. */ -#define YYNSTATES 518 +#define YYNSTATES 517 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 -#define YYMAXUTOK 364 +#define YYMAXUTOK 363 #define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) @@ -1512,15 +1493,15 @@ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 113, 114, 122, 2, 111, 2, 2, 2, 2, 2, + 112, 113, 121, 2, 110, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 118, 110, 119, 2, 2, 2, 2, 2, 2, 2, + 117, 109, 118, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 115, 112, 117, 2, 2, 2, 2, 2, 123, + 2, 114, 111, 116, 2, 2, 2, 2, 2, 122, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 116, 2, 2, 120, 2, 121, 2, 2, 2, 2, + 115, 2, 2, 119, 2, 120, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -1544,7 +1525,7 @@ 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, - 105, 106, 107, 108, 109 + 105, 106, 107, 108 }; #if YYDEBUG @@ -1555,148 +1536,147 @@ 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, 69, 72, 73, 75, 77, - 79, 81, 83, 85, 87, 88, 89, 91, 93, 95, - 97, 99, 101, 104, 105, 108, 109, 113, 116, 117, - 119, 120, 124, 126, 129, 131, 133, 135, 137, 139, + 59, 61, 63, 65, 67, 70, 71, 73, 75, 77, + 79, 81, 83, 85, 86, 87, 89, 91, 93, 95, + 97, 99, 102, 103, 106, 107, 111, 114, 115, 117, + 118, 122, 124, 127, 129, 131, 133, 135, 137, 139, 141, 143, 145, 147, 149, 151, 153, 155, 157, 159, - 161, 163, 165, 167, 169, 171, 174, 179, 185, 191, - 195, 198, 201, 203, 207, 209, 213, 215, 216, 221, - 225, 229, 234, 239, 243, 246, 249, 252, 255, 258, - 261, 264, 267, 270, 273, 280, 286, 295, 302, 309, - 316, 323, 330, 339, 348, 352, 354, 356, 358, 360, - 363, 366, 371, 374, 376, 381, 384, 389, 390, 398, - 399, 407, 408, 416, 417, 425, 429, 434, 435, 437, - 439, 441, 445, 449, 453, 457, 461, 465, 467, 468, - 470, 472, 474, 475, 478, 482, 484, 486, 490, 492, - 493, 502, 504, 506, 510, 512, 514, 517, 518, 520, - 522, 523, 528, 529, 531, 533, 535, 537, 539, 541, - 543, 545, 547, 551, 553, 559, 561, 563, 565, 567, - 570, 573, 576, 580, 583, 584, 586, 589, 592, 596, - 606, 616, 625, 639, 641, 643, 650, 656, 659, 666, - 674, 676, 680, 682, 683, 686, 688, 694, 700, 706, - 709, 714, 719, 726, 731, 736, 741, 746, 753, 760, - 763, 771, 773, 776, 777, 779, 780, 784, 791, 795, - 802, 805, 810, 817 + 161, 163, 165, 167, 169, 172, 177, 183, 189, 193, + 196, 199, 201, 205, 207, 211, 213, 214, 219, 223, + 227, 232, 237, 241, 244, 247, 250, 253, 256, 259, + 262, 265, 268, 271, 278, 284, 293, 300, 307, 314, + 321, 328, 337, 346, 350, 352, 354, 356, 358, 361, + 364, 369, 372, 374, 379, 382, 387, 388, 396, 397, + 405, 406, 414, 415, 423, 427, 432, 433, 435, 437, + 439, 443, 447, 451, 455, 459, 463, 465, 466, 468, + 470, 472, 473, 476, 480, 482, 484, 488, 490, 491, + 500, 502, 504, 508, 510, 512, 515, 516, 518, 520, + 521, 526, 527, 529, 531, 533, 535, 537, 539, 541, + 543, 545, 549, 551, 557, 559, 561, 563, 565, 568, + 571, 574, 578, 581, 582, 584, 587, 590, 594, 604, + 614, 623, 637, 639, 641, 648, 654, 657, 664, 672, + 674, 678, 680, 681, 684, 686, 692, 698, 704, 707, + 712, 717, 724, 729, 734, 739, 744, 751, 758, 761, + 769, 771, 774, 775, 777, 778, 782, 789, 793, 800, + 803, 808, 815 }; /* YYRHS -- A `-1'-separated list of the rules' RHS. */ static const short int yyrhs[] = { - 155, 0, -1, 5, -1, 6, -1, 3, -1, 4, + 154, 0, -1, 5, -1, 6, -1, 3, -1, 4, -1, 78, -1, 79, -1, 80, -1, 81, -1, 82, -1, 83, -1, 84, -1, 85, -1, 86, -1, 87, - -1, 88, -1, 89, -1, 90, -1, 91, -1, 92, - -1, 102, -1, 103, -1, 16, -1, 14, -1, 12, - -1, 10, -1, 17, -1, 15, -1, 13, -1, 11, - -1, 131, -1, 132, -1, 18, -1, 19, -1, 167, - 110, -1, -1, 41, -1, 42, -1, 43, -1, 44, - -1, 45, -1, 46, -1, 47, -1, -1, -1, 65, - -1, 66, -1, 67, -1, 68, -1, 69, -1, 70, - -1, 64, 4, -1, -1, 57, 4, -1, -1, 111, - 57, 4, -1, 34, 24, -1, -1, 140, -1, -1, - 111, 143, 142, -1, 140, -1, 57, 4, -1, 146, - -1, 8, -1, 148, -1, 8, -1, 148, -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, 48, -1, 147, -1, 182, - -1, 112, 4, -1, 145, 113, 150, 114, -1, 115, - 4, 116, 148, 117, -1, 118, 4, 116, 148, 119, - -1, 120, 149, 121, -1, 120, 121, -1, 148, 122, - -1, 148, -1, 149, 111, 148, -1, 149, -1, 149, - 111, 37, -1, 37, -1, -1, 146, 115, 153, 117, - -1, 146, 115, 117, -1, 146, 123, 24, -1, 146, - 118, 153, 119, -1, 146, 120, 153, 121, -1, 146, - 120, 121, -1, 146, 38, -1, 146, 39, -1, 146, - 182, -1, 146, 152, -1, 146, 26, -1, 131, 126, - -1, 132, 4, -1, 9, 27, -1, 9, 28, -1, - 134, 7, -1, 100, 113, 151, 36, 146, 114, -1, - 98, 113, 151, 196, 114, -1, 101, 113, 151, 111, - 151, 111, 151, 114, -1, 127, 113, 151, 111, 151, - 114, -1, 128, 113, 151, 111, 151, 114, -1, 129, - 113, 151, 111, 151, 114, -1, 130, 113, 151, 111, - 151, 114, -1, 105, 113, 151, 111, 151, 114, -1, - 106, 113, 151, 111, 151, 111, 151, 114, -1, 107, - 113, 151, 111, 151, 111, 151, 114, -1, 153, 111, - 151, -1, 151, -1, 32, -1, 33, -1, 156, -1, - 156, 176, -1, 156, 178, -1, 156, 62, 61, 162, - -1, 156, 25, -1, 157, -1, 157, 135, 20, 144, - -1, 157, 178, -1, 157, 62, 61, 162, -1, -1, - 157, 135, 136, 154, 151, 158, 142, -1, -1, 157, - 135, 50, 154, 146, 159, 142, -1, -1, 157, 135, - 45, 154, 146, 160, 142, -1, -1, 157, 135, 47, - 154, 146, 161, 142, -1, 157, 51, 164, -1, 157, - 58, 110, 165, -1, -1, 24, -1, 56, -1, 55, - -1, 53, 110, 163, -1, 54, 110, 4, -1, 52, - 110, 24, -1, 71, 110, 24, -1, 115, 166, 117, - -1, 166, 111, 24, -1, 24, -1, -1, 22, -1, - 24, -1, 167, -1, -1, 146, 168, -1, 170, 111, - 169, -1, 169, -1, 170, -1, 170, 111, 37, -1, - 37, -1, -1, 137, 144, 167, 113, 171, 114, 141, - 138, -1, 29, -1, 120, -1, 136, 172, 173, -1, - 30, -1, 121, -1, 185, 175, -1, -1, 45, -1, - 47, -1, -1, 31, 179, 177, 172, -1, -1, 63, - -1, 3, -1, 4, -1, 7, -1, 27, -1, 28, - -1, 38, -1, 39, -1, 26, -1, 118, 153, 119, - -1, 152, -1, 61, 180, 24, 111, 24, -1, 125, - -1, 167, -1, 182, -1, 181, -1, 146, 183, -1, - 185, 186, -1, 174, 186, -1, 187, 135, 188, -1, - 187, 190, -1, -1, 23, -1, 72, 184, -1, 72, - 8, -1, 73, 21, 183, -1, 73, 9, 183, 111, - 21, 183, 111, 21, 183, -1, 74, 133, 183, 111, - 21, 183, 115, 189, 117, -1, 74, 133, 183, 111, - 21, 183, 115, 117, -1, 75, 137, 144, 183, 113, - 193, 114, 36, 21, 183, 76, 21, 183, -1, 76, - -1, 77, -1, 189, 133, 181, 111, 21, 183, -1, - 133, 181, 111, 21, 183, -1, 135, 195, -1, 146, - 115, 183, 111, 183, 117, -1, 191, 111, 115, 183, - 111, 183, 117, -1, 184, -1, 192, 111, 184, -1, - 192, -1, -1, 60, 59, -1, 59, -1, 127, 146, - 183, 111, 183, -1, 128, 146, 183, 111, 183, -1, - 129, 146, 183, 111, 183, -1, 49, 184, -1, 130, - 184, 111, 184, -1, 100, 184, 36, 146, -1, 101, - 184, 111, 184, 111, 184, -1, 104, 184, 111, 146, - -1, 108, 184, 111, 146, -1, 109, 184, 111, 146, - -1, 105, 184, 111, 184, -1, 106, 184, 111, 184, - 111, 184, -1, 107, 184, 111, 184, 111, 184, -1, - 99, 191, -1, 194, 137, 144, 183, 113, 193, 114, - -1, 198, -1, 111, 192, -1, -1, 35, -1, -1, - 93, 146, 139, -1, 93, 146, 111, 15, 183, 139, - -1, 94, 146, 139, -1, 94, 146, 111, 15, 183, - 139, -1, 95, 184, -1, 197, 96, 146, 183, -1, - 197, 97, 184, 111, 146, 183, -1, 98, 146, 183, - 196, -1 + -1, 88, -1, 89, -1, 90, -1, 91, -1, 101, + -1, 102, -1, 16, -1, 14, -1, 12, -1, 10, + -1, 17, -1, 15, -1, 13, -1, 11, -1, 130, + -1, 131, -1, 18, -1, 19, -1, 166, 109, -1, + -1, 41, -1, 42, -1, 43, -1, 44, -1, 45, + -1, 46, -1, 47, -1, -1, -1, 65, -1, 66, + -1, 67, -1, 68, -1, 69, -1, 70, -1, 64, + 4, -1, -1, 57, 4, -1, -1, 110, 57, 4, + -1, 34, 24, -1, -1, 139, -1, -1, 110, 142, + 141, -1, 139, -1, 57, 4, -1, 145, -1, 8, + -1, 147, -1, 8, -1, 147, -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, 48, -1, 146, -1, 181, -1, 111, + 4, -1, 144, 112, 149, 113, -1, 114, 4, 115, + 147, 116, -1, 117, 4, 115, 147, 118, -1, 119, + 148, 120, -1, 119, 120, -1, 147, 121, -1, 147, + -1, 148, 110, 147, -1, 148, -1, 148, 110, 37, + -1, 37, -1, -1, 145, 114, 152, 116, -1, 145, + 114, 116, -1, 145, 122, 24, -1, 145, 117, 152, + 118, -1, 145, 119, 152, 120, -1, 145, 119, 120, + -1, 145, 38, -1, 145, 39, -1, 145, 181, -1, + 145, 151, -1, 145, 26, -1, 130, 125, -1, 131, + 4, -1, 9, 27, -1, 9, 28, -1, 133, 7, + -1, 99, 112, 150, 36, 145, 113, -1, 97, 112, + 150, 195, 113, -1, 100, 112, 150, 110, 150, 110, + 150, 113, -1, 126, 112, 150, 110, 150, 113, -1, + 127, 112, 150, 110, 150, 113, -1, 128, 112, 150, + 110, 150, 113, -1, 129, 112, 150, 110, 150, 113, + -1, 104, 112, 150, 110, 150, 113, -1, 105, 112, + 150, 110, 150, 110, 150, 113, -1, 106, 112, 150, + 110, 150, 110, 150, 113, -1, 152, 110, 150, -1, + 150, -1, 32, -1, 33, -1, 155, -1, 155, 175, + -1, 155, 177, -1, 155, 62, 61, 161, -1, 155, + 25, -1, 156, -1, 156, 134, 20, 143, -1, 156, + 177, -1, 156, 62, 61, 161, -1, -1, 156, 134, + 135, 153, 150, 157, 141, -1, -1, 156, 134, 50, + 153, 145, 158, 141, -1, -1, 156, 134, 45, 153, + 145, 159, 141, -1, -1, 156, 134, 47, 153, 145, + 160, 141, -1, 156, 51, 163, -1, 156, 58, 109, + 164, -1, -1, 24, -1, 56, -1, 55, -1, 53, + 109, 162, -1, 54, 109, 4, -1, 52, 109, 24, + -1, 71, 109, 24, -1, 114, 165, 116, -1, 165, + 110, 24, -1, 24, -1, -1, 22, -1, 24, -1, + 166, -1, -1, 145, 167, -1, 169, 110, 168, -1, + 168, -1, 169, -1, 169, 110, 37, -1, 37, -1, + -1, 136, 143, 166, 112, 170, 113, 140, 137, -1, + 29, -1, 119, -1, 135, 171, 172, -1, 30, -1, + 120, -1, 184, 174, -1, -1, 45, -1, 47, -1, + -1, 31, 178, 176, 171, -1, -1, 63, -1, 3, + -1, 4, -1, 7, -1, 27, -1, 28, -1, 38, + -1, 39, -1, 26, -1, 117, 152, 118, -1, 151, + -1, 61, 179, 24, 110, 24, -1, 124, -1, 166, + -1, 181, -1, 180, -1, 145, 182, -1, 184, 185, + -1, 173, 185, -1, 186, 134, 187, -1, 186, 189, + -1, -1, 23, -1, 72, 183, -1, 72, 8, -1, + 73, 21, 182, -1, 73, 9, 182, 110, 21, 182, + 110, 21, 182, -1, 74, 132, 182, 110, 21, 182, + 114, 188, 116, -1, 74, 132, 182, 110, 21, 182, + 114, 116, -1, 75, 136, 143, 182, 112, 192, 113, + 36, 21, 182, 76, 21, 182, -1, 76, -1, 77, + -1, 188, 132, 180, 110, 21, 182, -1, 132, 180, + 110, 21, 182, -1, 134, 194, -1, 145, 114, 182, + 110, 182, 116, -1, 190, 110, 114, 182, 110, 182, + 116, -1, 183, -1, 191, 110, 183, -1, 191, -1, + -1, 60, 59, -1, 59, -1, 126, 145, 182, 110, + 182, -1, 127, 145, 182, 110, 182, -1, 128, 145, + 182, 110, 182, -1, 49, 183, -1, 129, 183, 110, + 183, -1, 99, 183, 36, 145, -1, 100, 183, 110, + 183, 110, 183, -1, 103, 183, 110, 145, -1, 107, + 183, 110, 145, -1, 108, 183, 110, 145, -1, 104, + 183, 110, 183, -1, 105, 183, 110, 183, 110, 183, + -1, 106, 183, 110, 183, 110, 183, -1, 98, 190, + -1, 193, 136, 143, 182, 112, 192, 113, -1, 197, + -1, 110, 191, -1, -1, 35, -1, -1, 92, 145, + 138, -1, 92, 145, 110, 15, 182, 138, -1, 93, + 145, 138, -1, 93, 145, 110, 15, 182, 138, -1, + 94, 183, -1, 196, 95, 145, 182, -1, 196, 96, + 183, 110, 145, 182, -1, 97, 145, 182, 195, -1 }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const unsigned short int yyrline[] = { - 0, 1114, 1114, 1115, 1123, 1124, 1134, 1134, 1134, 1134, - 1134, 1134, 1135, 1135, 1135, 1136, 1136, 1136, 1136, 1136, - 1136, 1138, 1138, 1142, 1142, 1142, 1142, 1143, 1143, 1143, - 1143, 1144, 1144, 1145, 1145, 1148, 1152, 1157, 1158, 1159, - 1160, 1161, 1162, 1163, 1164, 1166, 1167, 1168, 1169, 1170, - 1171, 1172, 1173, 1182, 1183, 1189, 1190, 1198, 1206, 1207, - 1212, 1213, 1214, 1219, 1233, 1233, 1234, 1234, 1236, 1246, - 1246, 1246, 1246, 1246, 1246, 1246, 1247, 1247, 1247, 1247, - 1247, 1247, 1248, 1252, 1256, 1264, 1272, 1285, 1290, 1302, - 1312, 1316, 1327, 1332, 1338, 1339, 1343, 1347, 1358, 1384, - 1398, 1428, 1454, 1475, 1488, 1498, 1503, 1564, 1571, 1580, - 1586, 1592, 1596, 1600, 1608, 1619, 1651, 1659, 1683, 1694, - 1700, 1708, 1714, 1720, 1729, 1733, 1741, 1741, 1751, 1759, - 1764, 1768, 1772, 1776, 1791, 1813, 1816, 1819, 1819, 1827, - 1827, 1835, 1835, 1843, 1843, 1852, 1855, 1858, 1862, 1875, - 1876, 1878, 1882, 1891, 1896, 1902, 1904, 1909, 1914, 1923, - 1923, 1924, 1924, 1926, 1933, 1939, 1946, 1950, 1956, 1961, - 1966, 2061, 2061, 2063, 2071, 2071, 2073, 2078, 2079, 2080, - 2082, 2082, 2092, 2096, 2101, 2105, 2109, 2113, 2117, 2121, - 2125, 2129, 2133, 2158, 2162, 2176, 2180, 2186, 2186, 2192, - 2197, 2201, 2210, 2221, 2226, 2238, 2251, 2255, 2259, 2264, - 2273, 2292, 2301, 2357, 2361, 2368, 2379, 2392, 2401, 2410, - 2420, 2424, 2431, 2431, 2433, 2437, 2442, 2460, 2475, 2489, - 2502, 2510, 2518, 2526, 2532, 2552, 2575, 2581, 2587, 2593, - 2608, 2667, 2674, 2677, 2682, 2686, 2693, 2698, 2704, 2709, - 2715, 2723, 2735, 2750 + 0, 1097, 1097, 1098, 1106, 1107, 1117, 1117, 1117, 1117, + 1117, 1118, 1118, 1118, 1119, 1119, 1119, 1119, 1119, 1119, + 1121, 1121, 1125, 1125, 1125, 1125, 1126, 1126, 1126, 1126, + 1127, 1127, 1128, 1128, 1131, 1135, 1140, 1141, 1142, 1143, + 1144, 1145, 1146, 1147, 1149, 1150, 1151, 1152, 1153, 1154, + 1155, 1156, 1165, 1166, 1172, 1173, 1181, 1189, 1190, 1195, + 1196, 1197, 1202, 1216, 1216, 1217, 1217, 1219, 1229, 1229, + 1229, 1229, 1229, 1229, 1229, 1230, 1230, 1230, 1230, 1230, + 1230, 1231, 1235, 1239, 1247, 1255, 1268, 1273, 1285, 1295, + 1299, 1310, 1315, 1321, 1322, 1326, 1330, 1341, 1367, 1381, + 1411, 1437, 1458, 1471, 1481, 1486, 1547, 1554, 1563, 1569, + 1575, 1579, 1583, 1591, 1602, 1634, 1642, 1664, 1675, 1681, + 1689, 1695, 1701, 1710, 1714, 1722, 1722, 1732, 1740, 1745, + 1749, 1753, 1757, 1772, 1794, 1797, 1800, 1800, 1808, 1808, + 1816, 1816, 1824, 1824, 1833, 1836, 1839, 1843, 1856, 1857, + 1859, 1863, 1872, 1877, 1883, 1885, 1890, 1895, 1904, 1904, + 1905, 1905, 1907, 1914, 1920, 1927, 1931, 1937, 1942, 1947, + 2042, 2042, 2044, 2052, 2052, 2054, 2059, 2060, 2061, 2063, + 2063, 2073, 2077, 2082, 2086, 2090, 2094, 2098, 2102, 2106, + 2110, 2114, 2139, 2143, 2157, 2161, 2167, 2167, 2173, 2178, + 2182, 2191, 2202, 2207, 2219, 2232, 2236, 2240, 2245, 2254, + 2273, 2282, 2338, 2342, 2349, 2360, 2373, 2382, 2391, 2401, + 2405, 2412, 2412, 2414, 2418, 2423, 2439, 2454, 2468, 2481, + 2489, 2497, 2505, 2511, 2531, 2554, 2560, 2566, 2572, 2587, + 2646, 2653, 2656, 2661, 2665, 2672, 2677, 2683, 2688, 2694, + 2702, 2714, 2729 }; #endif @@ -1718,8 +1698,8 @@ "SIDEEFFECT", "CC_TOK", "CCC_TOK", "CSRETCC_TOK", "FASTCC_TOK", "COLDCC_TOK", "X86_STDCALLCC_TOK", "X86_FASTCALLCC_TOK", "DATA", "RET", "BR", "SWITCH", "INVOKE", "UNWIND", "UNREACHABLE", "ADD", "SUB", "MUL", - "UDIV", "SDIV", "REM", "AND", "OR", "XOR", "SETLE", "SETGE", "SETLT", - "SETGT", "SETEQ", "SETNE", "MALLOC", "ALLOCA", "FREE", "LOAD", "STORE", + "DIV", "REM", "AND", "OR", "XOR", "SETLE", "SETGE", "SETLT", "SETGT", + "SETEQ", "SETNE", "MALLOC", "ALLOCA", "FREE", "LOAD", "STORE", "GETELEMENTPTR", "PHI_TOK", "CAST", "SELECT", "SHL", "SHR", "VAARG", "EXTRACTELEMENT", "INSERTELEMENT", "SHUFFLEVECTOR", "VAARG_old", "VANEXT_old", "'='", "','", "'\\\\'", "'('", "')'", "'['", "'x'", "']'", @@ -1757,41 +1737,41 @@ 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, - 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, - 61, 44, 92, 40, 41, 91, 120, 93, 60, 62, - 123, 125, 42, 99 + 355, 356, 357, 358, 359, 360, 361, 362, 363, 61, + 44, 92, 40, 41, 91, 120, 93, 60, 62, 123, + 125, 42, 99 }; # endif /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const unsigned char yyr1[] = { - 0, 124, 125, 125, 126, 126, 127, 127, 127, 127, - 127, 127, 128, 128, 128, 129, 129, 129, 129, 129, - 129, 130, 130, 131, 131, 131, 131, 132, 132, 132, - 132, 133, 133, 134, 134, 135, 135, 136, 136, 136, - 136, 136, 136, 136, 136, 137, 137, 137, 137, 137, - 137, 137, 137, 138, 138, 139, 139, 140, 141, 141, - 142, 142, 143, 143, 144, 144, 145, 145, 146, 147, - 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, - 147, 147, 148, 148, 148, 148, 148, 148, 148, 148, - 148, 148, 149, 149, 150, 150, 150, 150, 151, 151, - 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, - 151, 151, 151, 151, 152, 152, 152, 152, 152, 152, - 152, 152, 152, 152, 153, 153, 154, 154, 155, 156, - 156, 156, 156, 156, 157, 157, 157, 158, 157, 159, - 157, 160, 157, 161, 157, 157, 157, 157, 162, 163, - 163, 164, 164, 164, 164, 165, 166, 166, 166, 167, - 167, 168, 168, 169, 170, 170, 171, 171, 171, 171, - 172, 173, 173, 174, 175, 175, 176, 177, 177, 177, - 179, 178, 180, 180, 181, 181, 181, 181, 181, 181, - 181, 181, 181, 181, 181, 182, 182, 183, 183, 184, - 185, 185, 186, 187, 187, 187, 188, 188, 188, 188, - 188, 188, 188, 188, 188, 189, 189, 190, 191, 191, - 192, 192, 193, 193, 194, 194, 195, 195, 195, 195, - 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, - 195, 195, 196, 196, 197, 197, 198, 198, 198, 198, - 198, 198, 198, 198 + 0, 123, 124, 124, 125, 125, 126, 126, 126, 126, + 126, 127, 127, 127, 128, 128, 128, 128, 128, 128, + 129, 129, 130, 130, 130, 130, 131, 131, 131, 131, + 132, 132, 133, 133, 134, 134, 135, 135, 135, 135, + 135, 135, 135, 135, 136, 136, 136, 136, 136, 136, + 136, 136, 137, 137, 138, 138, 139, 140, 140, 141, + 141, 142, 142, 143, 143, 144, 144, 145, 146, 146, + 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, + 146, 147, 147, 147, 147, 147, 147, 147, 147, 147, + 147, 148, 148, 149, 149, 149, 149, 150, 150, 150, + 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, + 150, 150, 150, 151, 151, 151, 151, 151, 151, 151, + 151, 151, 151, 152, 152, 153, 153, 154, 155, 155, + 155, 155, 155, 156, 156, 156, 157, 156, 158, 156, + 159, 156, 160, 156, 156, 156, 156, 161, 162, 162, + 163, 163, 163, 163, 164, 165, 165, 165, 166, 166, + 167, 167, 168, 169, 169, 170, 170, 170, 170, 171, + 172, 172, 173, 174, 174, 175, 176, 176, 176, 178, + 177, 179, 179, 180, 180, 180, 180, 180, 180, 180, + 180, 180, 180, 180, 181, 181, 182, 182, 183, 184, + 184, 185, 186, 186, 186, 187, 187, 187, 187, 187, + 187, 187, 187, 187, 188, 188, 189, 190, 190, 191, + 191, 192, 192, 193, 193, 194, 194, 194, 194, 194, + 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, + 194, 195, 195, 196, 196, 197, 197, 197, 197, 197, + 197, 197, 197 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ @@ -1800,29 +1780,29 @@ 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, 1, 2, 0, 1, 1, 1, - 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, - 1, 1, 2, 0, 2, 0, 3, 2, 0, 1, - 0, 3, 1, 2, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 2, 0, 1, 1, 1, 1, + 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, + 1, 2, 0, 2, 0, 3, 2, 0, 1, 0, + 3, 1, 2, 1, 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, 6, 8, 8, 3, 1, 1, 1, 1, 2, - 2, 4, 2, 1, 4, 2, 4, 0, 7, 0, - 7, 0, 7, 0, 7, 3, 4, 0, 1, 1, - 1, 3, 3, 3, 3, 3, 3, 1, 0, 1, - 1, 1, 0, 2, 3, 1, 1, 3, 1, 0, - 8, 1, 1, 3, 1, 1, 2, 0, 1, 1, - 0, 4, 0, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 3, 1, 5, 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, 4, 6, 6, 2, - 7, 1, 2, 0, 1, 0, 3, 6, 3, 6, - 2, 4, 6, 4 + 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, + 6, 8, 8, 3, 1, 1, 1, 1, 2, 2, + 4, 2, 1, 4, 2, 4, 0, 7, 0, 7, + 0, 7, 0, 7, 3, 4, 0, 1, 1, 1, + 3, 3, 3, 3, 3, 3, 1, 0, 1, 1, + 1, 0, 2, 3, 1, 1, 3, 1, 0, 8, + 1, 1, 3, 1, 1, 2, 0, 1, 1, 0, + 4, 0, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 3, 1, 5, 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, 4, 6, 6, 2, 7, + 1, 2, 0, 1, 0, 3, 6, 3, 6, 2, + 4, 6, 4 }; /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state @@ -1830,476 +1810,482 @@ means the default is an error. */ static const unsigned char yydefact[] = { - 147, 0, 44, 133, 1, 132, 180, 37, 38, 39, - 40, 41, 42, 43, 0, 45, 204, 129, 130, 204, - 159, 160, 0, 0, 0, 44, 0, 135, 177, 0, - 0, 46, 47, 48, 49, 50, 51, 0, 0, 205, - 201, 36, 174, 175, 176, 200, 0, 0, 0, 0, - 145, 0, 0, 0, 0, 0, 0, 0, 35, 178, - 179, 45, 148, 131, 52, 2, 3, 65, 69, 70, - 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, - 81, 82, 0, 0, 0, 0, 195, 0, 0, 64, - 83, 68, 196, 84, 171, 172, 173, 245, 203, 0, - 0, 0, 0, 158, 146, 136, 134, 126, 127, 0, - 0, 0, 0, 181, 85, 0, 0, 67, 90, 92, - 0, 0, 97, 91, 244, 0, 225, 0, 0, 0, - 0, 45, 213, 214, 6, 7, 8, 9, 10, 11, - 12, 13, 14, 15, 16, 17, 18, 19, 20, 0, - 0, 0, 0, 0, 0, 0, 21, 22, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 202, 45, - 217, 0, 241, 153, 150, 149, 151, 152, 154, 157, - 0, 141, 143, 139, 69, 70, 71, 72, 73, 74, - 75, 76, 77, 78, 79, 0, 0, 0, 0, 137, - 0, 0, 0, 89, 169, 96, 94, 0, 0, 229, - 224, 207, 206, 0, 0, 26, 30, 25, 29, 24, - 28, 23, 27, 31, 32, 0, 0, 55, 55, 250, - 0, 0, 239, 0, 0, 0, 0, 0, 0, 0, + 146, 0, 43, 132, 1, 131, 179, 36, 37, 38, + 39, 40, 41, 42, 0, 44, 203, 128, 129, 203, + 158, 159, 0, 0, 0, 43, 0, 134, 176, 0, + 0, 45, 46, 47, 48, 49, 50, 0, 0, 204, + 200, 35, 173, 174, 175, 199, 0, 0, 0, 0, + 144, 0, 0, 0, 0, 0, 0, 0, 34, 177, + 178, 44, 147, 130, 51, 2, 3, 64, 68, 69, + 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 0, 0, 0, 0, 194, 0, 0, 63, + 82, 67, 195, 83, 170, 171, 172, 244, 202, 0, + 0, 0, 0, 157, 145, 135, 133, 125, 126, 0, + 0, 0, 0, 180, 84, 0, 0, 66, 89, 91, + 0, 0, 96, 90, 243, 0, 224, 0, 0, 0, + 0, 44, 212, 213, 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, 0, 0, 0, 201, 44, 216, + 0, 240, 152, 149, 148, 150, 151, 153, 156, 0, + 140, 142, 138, 68, 69, 70, 71, 72, 73, 74, + 75, 76, 77, 78, 0, 0, 0, 0, 136, 0, + 0, 0, 88, 168, 95, 93, 0, 0, 228, 223, + 206, 205, 0, 0, 25, 29, 24, 28, 23, 27, + 22, 26, 30, 31, 0, 0, 54, 54, 249, 0, + 0, 238, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 154, 59, + 59, 59, 110, 111, 4, 5, 108, 109, 112, 107, + 103, 104, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 106, 105, 59, 65, + 65, 92, 167, 161, 164, 165, 0, 0, 85, 183, + 184, 185, 190, 186, 187, 188, 189, 181, 0, 192, + 197, 196, 198, 0, 207, 0, 0, 0, 245, 0, + 247, 242, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 155, - 60, 60, 60, 111, 112, 4, 5, 109, 110, 113, - 108, 104, 105, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 107, 106, 60, - 66, 66, 93, 168, 162, 165, 166, 0, 0, 86, - 184, 185, 186, 191, 187, 188, 189, 190, 182, 0, - 193, 198, 197, 199, 0, 208, 0, 0, 0, 246, - 0, 248, 243, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 156, 0, 142, 144, 140, 0, 0, 0, 0, 0, - 0, 99, 125, 0, 0, 103, 0, 100, 0, 0, - 0, 0, 138, 87, 88, 161, 163, 0, 58, 95, - 183, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 253, 0, 0, 231, 0, 233, 236, 0, 0, 234, - 235, 0, 0, 0, 230, 0, 251, 0, 0, 0, - 62, 60, 243, 0, 0, 0, 0, 0, 0, 98, - 101, 102, 0, 0, 0, 0, 167, 164, 59, 53, - 0, 192, 0, 0, 223, 55, 56, 55, 220, 242, - 0, 0, 0, 0, 0, 226, 227, 228, 223, 0, - 57, 63, 61, 0, 0, 0, 0, 0, 0, 124, - 0, 0, 0, 0, 0, 170, 0, 0, 0, 222, - 0, 0, 247, 249, 0, 0, 0, 232, 237, 238, - 0, 252, 115, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 54, 194, 0, 0, 0, 221, 218, 0, - 240, 114, 0, 121, 0, 0, 117, 118, 119, 120, - 0, 211, 0, 0, 0, 219, 0, 0, 0, 209, - 0, 210, 0, 0, 116, 122, 123, 0, 0, 0, - 0, 0, 0, 216, 0, 0, 215, 212 + 0, 141, 143, 139, 0, 0, 0, 0, 0, 0, + 98, 124, 0, 0, 102, 0, 99, 0, 0, 0, + 0, 137, 86, 87, 160, 162, 0, 57, 94, 182, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 252, + 0, 0, 230, 0, 232, 235, 0, 0, 233, 234, + 0, 0, 0, 229, 0, 250, 0, 0, 0, 61, + 59, 242, 0, 0, 0, 0, 0, 0, 97, 100, + 101, 0, 0, 0, 0, 166, 163, 58, 52, 0, + 191, 0, 0, 222, 54, 55, 54, 219, 241, 0, + 0, 0, 0, 0, 225, 226, 227, 222, 0, 56, + 62, 60, 0, 0, 0, 0, 0, 0, 123, 0, + 0, 0, 0, 0, 169, 0, 0, 0, 221, 0, + 0, 246, 248, 0, 0, 0, 231, 236, 237, 0, + 251, 114, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 53, 193, 0, 0, 0, 220, 217, 0, 239, + 113, 0, 120, 0, 0, 116, 117, 118, 119, 0, + 210, 0, 0, 0, 218, 0, 0, 0, 208, 0, + 209, 0, 0, 115, 121, 122, 0, 0, 0, 0, + 0, 0, 215, 0, 0, 214, 211 }; /* YYDEFGOTO[NTERM-NUM]. */ static const short int yydefgoto[] = { - -1, 86, 257, 273, 274, 275, 276, 195, 196, 225, - 197, 25, 15, 37, 445, 309, 390, 409, 332, 391, - 87, 88, 198, 90, 91, 120, 207, 342, 300, 343, - 109, 1, 2, 3, 279, 252, 250, 251, 63, 176, - 50, 104, 180, 92, 356, 285, 286, 287, 38, 96, - 16, 44, 17, 61, 18, 28, 361, 301, 93, 303, - 418, 19, 40, 41, 168, 493, 98, 232, 449, 450, - 169, 170, 370, 171, 172 + -1, 86, 256, 272, 273, 274, 275, 194, 195, 224, + 196, 25, 15, 37, 444, 308, 389, 408, 331, 390, + 87, 88, 197, 90, 91, 120, 206, 341, 299, 342, + 109, 1, 2, 3, 278, 251, 249, 250, 63, 175, + 50, 104, 179, 92, 355, 284, 285, 286, 38, 96, + 16, 44, 17, 61, 18, 28, 360, 300, 93, 302, + 417, 19, 40, 41, 167, 492, 98, 231, 448, 449, + 168, 169, 369, 170, 171 }; /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ -#define YYPACT_NINF -459 +#define YYPACT_NINF -410 static const short int yypact[] = { - -459, 8, 119, 464, -459, -459, -459, -459, -459, -459, - -459, -459, -459, -459, -46, 162, 21, -459, -459, -11, - -459, -459, 23, -25, 59, 219, 35, -459, -5, 109, - 143, -459, -459, -459, -459, -459, -459, 1020, 12, -459, - -459, 112, -459, -459, -459, -459, 80, 82, 84, 88, - -459, 54, 109, 1020, 121, 121, 121, 121, -459, -459, - -459, 162, -459, -459, -459, -459, -459, 90, -459, -459, - -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, - -459, -459, 196, 197, 202, 574, -459, 112, 99, -459, - -459, -42, -459, -459, -459, -459, -459, 1192, -459, 192, - 103, 213, 194, 195, -459, -459, -459, -459, -459, 1061, - 1061, 1061, 1102, -459, -459, 104, 106, -459, -459, -42, - -100, 110, 856, -459, -459, 1061, -459, 165, 1143, 69, - 390, 162, -459, -459, -459, -459, -459, -459, -459, -459, - -459, -459, -459, -459, -459, -459, -459, -459, -459, 1061, - 1061, 1061, 1061, 1061, 1061, 1061, -459, -459, 1061, 1061, - 1061, 1061, 1061, 1061, 1061, 1061, 1061, 1061, -459, 162, - -459, 75, -459, -459, -459, -459, -459, -459, -459, -459, - -72, -459, -459, -459, 147, 174, 236, 176, 237, 179, - 238, 184, 239, 244, 245, 193, 240, 246, 455, -459, - 1061, 1061, 1061, -459, 897, -459, 134, 140, 640, -459, - -459, 90, -459, 640, 640, -459, -459, -459, -459, -459, - -459, -459, -459, -459, -459, 640, 1020, 144, 146, -459, - 640, 152, 148, 222, 157, 161, 163, 166, 177, 180, - 182, 640, 640, 640, 183, 1020, 1061, 1061, 249, -459, - 186, 186, 186, -459, -459, -459, -459, -459, -459, -459, - -459, -459, -459, 185, 187, 188, 189, 199, 200, 87, - 1102, 594, 266, 201, 203, 208, 209, -459, -459, 186, - -36, 33, -42, -459, 112, -459, 212, 181, 938, -459, - -459, -459, -459, -459, -459, -459, -459, -459, 243, 1102, - -459, -459, -459, -459, 216, -459, 217, 640, -6, -459, - 3, -459, 218, 640, 215, 1061, 1061, 1061, 1061, 1061, - 1061, 1061, 1061, 220, 226, 231, 1061, 640, 640, 232, - -459, -21, -459, -459, -459, 1102, 1102, 1102, 1102, 1102, - 1102, -459, -459, 32, -32, -459, -74, -459, 1102, 1102, - 1102, 1102, -459, -459, -459, -459, -459, 979, 265, -459, - -459, 283, 29, 287, 289, 235, 640, 340, 640, 1061, - -459, 234, 640, -459, 241, -459, -459, 242, 247, -459, - -459, 640, 640, 640, -459, 248, -459, 1061, 327, 350, - -459, 186, 218, 321, 251, 255, 256, 257, 1102, -459, - -459, -459, 259, 260, 262, 263, -459, -459, -459, 302, - 267, -459, 640, 640, 1061, 268, -459, 268, -459, 270, - 640, 273, 1061, 1061, 1061, -459, -459, -459, 1061, 640, - -459, -459, -459, 274, 1061, 1102, 1102, 1102, 1102, -459, - 1102, 1102, 1102, 1102, 356, -459, 352, 281, 278, 270, - 280, 338, -459, -459, 1061, 279, 640, -459, -459, -459, - 284, -459, -459, 294, 298, 296, 300, 301, 299, 304, - 305, 306, -459, -459, 393, 14, 379, -459, -459, 307, - -459, -459, 1102, -459, 1102, 1102, -459, -459, -459, -459, - 640, -459, 745, 53, 395, -459, 308, 309, 311, -459, - 310, -459, 745, 640, -459, -459, -459, 405, 316, 353, - 640, 410, 411, -459, 640, 640, -459, -459 + -410, 17, 118, 605, -410, -410, -410, -410, -410, -410, + -410, -410, -410, -410, 24, 160, 67, -410, -410, -15, + -410, -410, 27, -5, 46, -6, 10, -410, 86, 147, + 138, -410, -410, -410, -410, -410, -410, 1060, -20, -410, + -410, 110, -410, -410, -410, -410, 69, 70, 72, 73, + -410, 63, 147, 1060, 68, 68, 68, 68, -410, -410, + -410, 160, -410, -410, -410, -410, -410, 64, -410, -410, + -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, + -410, -410, 182, 183, 186, 572, -410, 110, 77, -410, + -410, -28, -410, -410, -410, -410, -410, 1231, -410, 168, + 83, 199, 180, 181, -410, -410, -410, -410, -410, 1101, + 1101, 1101, 1142, -410, -410, 91, 96, -410, -410, -28, + -98, 103, 852, -410, -410, 1101, -410, 157, 1183, 50, + 185, 160, -410, -410, -410, -410, -410, -410, -410, -410, + -410, -410, -410, -410, -410, -410, -410, -410, 1101, 1101, + 1101, 1101, 1101, 1101, 1101, -410, -410, 1101, 1101, 1101, + 1101, 1101, 1101, 1101, 1101, 1101, 1101, -410, 160, -410, + 49, -410, -410, -410, -410, -410, -410, -410, -410, -14, + -410, -410, -410, 120, 148, 213, 150, 214, 154, 215, + 166, 217, 224, 231, 170, 218, 232, 425, -410, 1101, + 1101, 1101, -410, 893, -410, 130, 128, 638, -410, -410, + 64, -410, 638, 638, -410, -410, -410, -410, -410, -410, + -410, -410, -410, -410, 638, 1060, 132, 133, -410, 638, + 136, 134, 216, 141, 143, 144, 146, 149, 151, 152, + 638, 638, 638, 153, 1060, 1101, 1101, 233, -410, 155, + 155, 155, -410, -410, -410, -410, -410, -410, -410, -410, + -410, -410, 156, 159, 161, 164, 175, 177, 934, 1142, + 592, 234, 178, 184, 187, 188, -410, -410, 155, -70, + -35, -28, -410, 110, -410, 162, 179, 978, -410, -410, + -410, -410, -410, -410, -410, -410, -410, 197, 1142, -410, + -410, -410, -410, 191, -410, 195, 638, 3, -410, 18, + -410, 196, 638, 193, 1101, 1101, 1101, 1101, 1101, 1101, + 1101, 1101, 201, 202, 203, 1101, 638, 638, 205, -410, + 13, -410, -410, -410, 1142, 1142, 1142, 1142, 1142, 1142, + -410, -410, -13, -99, -410, -78, -410, 1142, 1142, 1142, + 1142, -410, -410, -410, -410, -410, 1019, 230, -410, -410, + 242, -23, 246, 272, 208, 638, 290, 638, 1101, -410, + 211, 638, -410, 212, -410, -410, 219, 220, -410, -410, + 638, 638, 638, -410, 229, -410, 1101, 273, 294, -410, + 155, 196, 291, 226, 237, 240, 241, 1142, -410, -410, + -410, 243, 247, 248, 249, -410, -410, -410, 252, 250, + -410, 638, 638, 1101, 251, -410, 251, -410, 255, 638, + 256, 1101, 1101, 1101, -410, -410, -410, 1101, 638, -410, + -410, -410, 239, 1101, 1142, 1142, 1142, 1142, -410, 1142, + 1142, 1142, 1142, 322, -410, 304, 257, 228, 255, 259, + 286, -410, -410, 1101, 253, 638, -410, -410, -410, 260, + -410, -410, 262, 267, 265, 270, 277, 278, 279, 280, + 281, -410, -410, 323, 14, 320, -410, -410, 254, -410, + -410, 1142, -410, 1142, 1142, -410, -410, -410, -410, 638, + -410, 742, 52, 362, -410, 282, 284, 287, -410, 289, + -410, 742, 638, -410, -410, -410, 380, 292, 327, 638, + 383, 384, -410, 638, 638, -410, -410 }; /* YYPGOTO[NTERM-NUM]. */ static const short int yypgoto[] = { - -459, -459, -459, 339, 341, 342, 343, -129, -128, -458, - -459, 394, 412, -117, -459, -224, 83, -459, -245, -459, - -50, -459, -37, -459, -63, 320, -459, -102, 250, -238, - 27, -459, -459, -459, -459, -459, -459, -459, 397, -459, - -459, -459, -459, 2, -459, 93, -459, -459, 386, -459, - -459, -459, -459, -459, 448, -459, -459, -454, -57, 62, - -105, -459, 433, -459, -459, -459, -459, -459, 85, 28, - -459, -459, 63, -459, -459 + -410, -410, -410, 309, 310, 311, 312, -129, -128, -398, + -410, 369, 386, -118, -410, -223, 55, -410, -244, -410, + -50, -410, -37, -410, -64, 293, -410, -102, 221, -192, + 53, -410, -410, -410, -410, -410, -410, -410, 361, -410, + -410, -410, -410, 2, -410, 58, -410, -410, 356, -410, + -410, -410, -410, -410, 416, -410, -410, -409, -57, 62, + -105, -410, 401, -410, -410, -410, -410, -410, 54, -4, + -410, -410, 30, -410, -410 }; /* 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 -129 +#define YYTABLE_NINF -128 static const short int yytable[] = { - 89, 223, 224, 106, 311, 26, 333, 334, 4, 366, - 199, 202, 39, 388, 226, 29, 89, 492, 368, 42, - 209, 203, 119, 212, 215, 216, 217, 218, 219, 220, - 221, 222, 344, 346, 352, 502, 389, 398, 500, 248, - 59, 94, 60, 26, 39, 249, 229, 401, 508, 233, - 234, 367, 245, 235, 236, 237, 238, 239, 240, 119, - 367, 362, 244, 215, 216, 217, 218, 219, 220, 221, - 222, -66, 181, 182, 183, 46, 47, 48, 213, 398, - 123, 353, 110, 111, 112, 51, 123, 400, 208, 121, - 214, 208, 65, 66, 49, 117, 184, 185, 186, 187, - 188, 189, 190, 191, 192, 193, 194, 79, 80, 20, - 43, 21, 227, 228, 208, 230, 231, 208, 208, -128, - 52, 208, 208, 208, 208, 208, 208, 241, 242, 243, - 208, 491, 95, 62, 20, 81, 21, 280, 281, 282, - 398, 278, 329, 398, 5, 58, 432, 64, 411, 399, - 6, 302, 354, 107, 108, 123, 302, 302, 174, 175, - 7, 8, 9, 10, 11, 12, 13, 284, 302, 103, - 501, 246, 247, 302, 253, 254, 307, -26, -26, -25, - -25, 14, -24, -24, 302, 302, 302, -23, -23, 89, - 99, 452, 100, 453, 101, 327, 255, 256, 102, 82, - 114, 115, 83, -67, 341, 84, 116, 85, 89, 328, - 208, 374, 122, 376, 377, 378, 173, 177, 178, 179, - 200, 384, 201, 204, 210, 282, 30, 31, 32, 33, - 34, 35, 36, 392, 393, 394, 395, 396, 397, 53, - -30, -29, -28, -27, 258, 288, 402, 403, 404, 405, - 302, -33, -34, 259, 289, 308, 302, 310, 315, 314, - 7, 8, 9, 10, 54, 12, 55, 313, 316, 56, - 302, 302, 317, 330, 318, 304, 305, 319, 373, 208, - 375, 208, 208, 208, 379, 380, 355, 306, 320, 208, - 347, 321, 312, 322, 326, 358, 439, 331, 335, 388, - 336, 337, 338, 323, 324, 325, 360, 410, 412, 302, - 413, 302, 339, 340, 348, 302, 349, 457, 458, 459, - 284, 350, 351, 357, 302, 302, 302, 363, 364, 369, - 372, 381, 208, 464, 465, 466, 467, 382, 468, 469, - 470, 471, 383, 387, 416, 420, 223, 224, 414, 477, - 429, 430, 422, 423, 431, 302, 302, 434, 424, 444, - 472, 428, 435, 302, 223, 224, 436, 437, 438, 365, - 440, 441, 302, 442, 443, 371, 473, 208, 446, 451, - 496, 454, 497, 498, 456, 208, 208, 208, 462, 385, - 386, 208, 474, 475, 476, 367, 478, 463, 480, 302, - 215, 216, 217, 218, 219, 220, 221, 222, 481, 482, - 483, 484, 485, 486, 490, 494, 503, 208, 487, 488, - 489, 507, 504, 505, 495, 506, 510, 511, 415, 512, - 417, 514, 515, 302, 421, 97, 164, 57, 165, 166, - 167, 408, 206, 425, 426, 427, 302, 113, 277, 105, - 407, 27, 45, 302, 419, 433, 460, 302, 302, 0, - 65, 66, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 447, 448, 0, 20, 0, 21, - 0, 260, 455, 0, -36, 0, 20, 0, 21, 0, - 0, 461, 0, 261, 262, 6, -36, -36, 0, 0, - 0, 0, 0, 0, 0, -36, -36, -36, -36, -36, - -36, -36, 0, 0, -36, 22, 0, 0, 479, 0, - 0, 0, 23, 0, 0, 0, 24, 0, 0, 0, + 89, 222, 223, 106, 310, 26, 332, 333, 39, 94, + 198, 397, 201, 225, 53, 42, 89, 4, 365, 399, + 208, 119, 202, 211, 214, 215, 216, 217, 218, 219, + 220, 221, 397, 367, 351, 7, 8, 9, 10, 54, + 12, 55, 400, 26, 56, 228, 352, 387, 232, 233, + 244, 123, 234, 235, 236, 237, 238, 239, 119, 212, + 366, 243, 214, 215, 216, 217, 218, 219, 220, 221, + 388, 213, 180, 181, 182, 366, 491, 343, 345, 46, + 47, 48, 499, 353, -65, 29, 123, 397, 207, 121, + 39, 207, 507, 123, 501, 410, 247, 397, 49, 95, + 107, 108, 248, 398, 51, 43, 361, 52, 110, 111, + 112, 226, 227, 207, 229, 230, 207, 207, -127, 58, + 207, 207, 207, 207, 207, 207, 240, 241, 242, 207, + 490, 59, 20, 60, 21, 279, 280, 281, 173, 174, + 277, 328, 64, 5, 245, 246, 431, 252, 253, 6, + 301, -25, -25, -24, -24, 301, 301, -23, -23, 7, + 8, 9, 10, 11, 12, 13, 283, 301, 500, -22, + -22, 62, 301, 254, 255, 306, -66, 103, 99, 100, + 14, 101, 102, 301, 301, 301, 114, 115, 89, 122, + 116, 451, 172, 452, 326, 214, 215, 216, 217, 218, + 219, 220, 221, 176, 177, 178, 199, 89, 327, 207, + 373, 200, 375, 376, 377, 203, 209, -29, -28, -27, + 383, -26, 257, 281, 30, 31, 32, 33, 34, 35, + 36, -32, 391, 392, 393, 394, 395, 396, -33, 258, + 287, 288, 307, 309, 313, 401, 402, 403, 404, 301, + 312, 315, 314, 316, 317, 301, 318, 329, 346, 319, + 359, 320, 321, 325, 387, 330, 409, 411, 334, 301, + 301, 335, 356, 336, 303, 304, 337, 372, 207, 374, + 207, 207, 207, 378, 379, 354, 305, 338, 207, 339, + 347, 311, 357, 412, 415, 438, 348, 429, 430, 349, + 350, 362, 322, 323, 324, 363, 368, 371, 301, 443, + 301, 380, 381, 382, 301, 386, 456, 457, 458, 283, + 413, 419, 421, 301, 301, 301, 471, 433, 472, 422, + 423, 207, 463, 464, 465, 466, 434, 467, 468, 469, + 470, 427, 474, 366, 489, 222, 223, 435, 476, 428, + 436, 437, 461, 439, 301, 301, 493, 440, 441, 442, + 445, 450, 301, 222, 223, 453, 455, 473, 364, 477, + 494, 301, 475, 479, 370, 480, 207, 481, 482, 495, + 483, 496, 497, 502, 207, 207, 207, 484, 384, 385, + 207, 485, 486, 487, 488, 503, 462, 504, 301, 506, + 505, 509, 510, 511, 513, 514, 163, 164, 165, 166, + 97, 57, 407, 105, 406, 205, 207, 113, 276, 27, + 45, 432, 418, 459, 0, 0, 0, 414, 0, 416, + 65, 66, 301, 420, 0, 0, 0, 0, 0, 0, + 0, 0, 424, 425, 426, 301, 0, 20, 0, 21, + 0, 259, 301, 0, 0, 0, 301, 301, 0, 0, + 0, 0, 0, 260, 261, 0, 0, 0, 0, 0, + 0, 0, 0, 446, 447, 0, 0, 0, 0, 0, + 0, 454, 0, 0, 0, 0, 0, 0, 0, 0, + 460, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 134, 135, 136, 137, 138, 139, 140, - 141, 142, 143, 144, 145, 146, 147, 148, 0, 0, - 0, 0, 499, 263, 0, 264, 265, 156, 157, 0, - 266, 267, 268, 0, 0, 509, 0, 0, 0, 0, - 269, 0, 513, 270, 0, 271, 516, 517, 272, 65, - 66, 0, 117, 68, 69, 70, 71, 72, 73, 74, - 75, 76, 77, 78, 79, 80, 20, 0, 21, 65, - 66, 0, 117, 184, 185, 186, 187, 188, 189, 190, - 191, 192, 193, 194, 79, 80, 20, 0, 21, 0, - 0, 0, 81, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 81, 290, 291, 65, 66, 292, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 20, 0, 21, 0, 293, 294, 295, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 296, 297, - 0, 0, 0, 0, 0, 0, 82, 0, 0, 83, - 0, 0, 84, 0, 85, 118, 0, 0, 0, 0, - 0, 298, 0, 0, 0, 0, 82, 0, 0, 83, - 0, 0, 84, 0, 85, 345, 0, 0, 134, 135, - 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, - 146, 147, 148, 0, 0, 0, 0, 0, 263, 0, - 264, 265, 156, 157, 0, 266, 267, 268, 290, 291, - 0, 0, 292, 0, 0, 0, 0, 0, 299, 0, + 141, 142, 143, 144, 145, 146, 147, 478, 0, 0, + 0, 0, 262, 0, 263, 264, 155, 156, 0, 265, + 266, 267, 0, 0, 0, 0, 0, 0, 0, 268, + 0, 0, 269, 0, 270, 0, 0, 271, 0, 0, + 0, 498, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 508, 0, 0, 0, 0, 0, + 0, 512, 0, 0, 0, 515, 516, 65, 66, 0, + 117, 68, 69, 70, 71, 72, 73, 74, 75, 76, + 77, 78, 79, 80, 20, 0, 21, 65, 66, 0, + 117, 183, 184, 185, 186, 187, 188, 189, 190, 191, + 192, 193, 79, 80, 20, 0, 21, 0, 0, 0, + 81, 0, 0, 0, 0, -35, 0, 20, 0, 21, + 0, 0, 0, 0, 0, 0, 6, -35, -35, 0, + 81, 289, 290, 65, 66, 291, -35, -35, -35, -35, + -35, -35, -35, 0, 0, -35, 22, 0, 0, 0, + 20, 0, 21, 23, 292, 293, 294, 24, 0, 0, + 0, 0, 0, 0, 0, 0, 295, 296, 0, 0, + 0, 0, 0, 82, 0, 0, 83, 0, 0, 84, + 0, 85, 118, 0, 0, 0, 0, 0, 0, 297, + 0, 0, 0, 82, 0, 0, 83, 0, 0, 84, + 0, 85, 344, 0, 0, 0, 134, 135, 136, 137, + 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, + 0, 0, 0, 0, 0, 262, 0, 263, 264, 155, + 156, 0, 265, 266, 267, 289, 290, 0, 0, 291, + 0, 0, 0, 0, 0, 298, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 292, 293, + 294, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 295, 296, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 293, 294, 295, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 296, 297, 0, 0, 0, 0, 0, + 0, 0, 0, 297, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 298, 0, 0, 0, + 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + 144, 145, 146, 147, 0, 0, 0, 0, 0, 262, + 0, 263, 264, 155, 156, 0, 265, 266, 267, 0, + 0, 0, 0, 0, 0, 0, 0, 65, 66, 298, + 117, 68, 69, 70, 71, 72, 73, 74, 75, 76, + 77, 78, 79, 80, 20, 0, 21, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 204, + 0, 0, 0, 0, 0, 0, 0, 0, 65, 66, + 81, 117, 68, 69, 70, 71, 72, 73, 74, 75, + 76, 77, 78, 79, 80, 20, 0, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 134, 135, 136, 137, 138, 139, 140, - 141, 142, 143, 144, 145, 146, 147, 148, 0, 0, - 0, 0, 0, 263, 0, 264, 265, 156, 157, 0, - 266, 267, 268, 0, 0, 0, 0, 0, 0, 0, - 0, 65, 66, 299, 117, 68, 69, 70, 71, 72, - 73, 74, 75, 76, 77, 78, 79, 80, 20, 0, - 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 205, 0, 0, 0, 0, 0, 0, - 0, 0, 65, 66, 81, 117, 68, 69, 70, 71, - 72, 73, 74, 75, 76, 77, 78, 79, 80, 20, - 0, 21, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 283, 0, 0, 0, 0, 0, - 0, 0, 0, 65, 66, 81, 117, 68, 69, 70, + 282, 0, 0, 0, 0, 0, 0, 0, 0, 65, + 66, 81, 117, 183, 184, 185, 186, 187, 188, 189, + 190, 191, 192, 193, 79, 80, 20, 0, 21, 0, + 0, 0, 0, 82, 0, 0, 83, 0, 0, 84, + 0, 85, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 81, 65, 66, 0, 117, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, - 20, 0, 21, 0, 0, 0, 0, 0, 82, 0, - 0, 83, 0, 0, 84, 359, 85, 0, 0, 0, + 20, 0, 21, 0, 82, 0, 0, 83, 0, 0, + 84, 0, 85, 0, 0, 358, 0, 0, 0, 0, 0, 0, 0, 0, 65, 66, 81, 117, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, - 80, 20, 0, 21, 0, 0, 0, 0, 0, 82, - 0, 0, 83, 0, 0, 84, 406, 85, 0, 0, + 80, 20, 0, 21, 0, 82, 0, 0, 83, 0, + 340, 84, 0, 85, 0, 0, 405, 0, 0, 0, 0, 0, 0, 0, 0, 65, 66, 81, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, - 79, 80, 20, 0, 21, 0, 0, 0, 0, 0, - 82, 0, 0, 83, 0, 0, 84, 0, 85, 0, + 79, 80, 20, 0, 21, 0, 0, 0, 0, 82, + 0, 0, 83, 0, 0, 84, 0, 85, 0, 0, 0, 0, 0, 0, 0, 0, 65, 66, 81, 117, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 20, 0, 21, 0, 0, 0, 0, - 0, 82, 0, 0, 83, 0, 0, 84, 0, 85, + 82, 0, 0, 83, 0, 0, 84, 0, 85, 0, 0, 0, 0, 0, 0, 0, 0, 65, 66, 81, - 117, 184, 185, 186, 187, 188, 189, 190, 191, 192, - 193, 194, 79, 80, 20, 0, 21, 0, 0, 0, - 0, 0, 82, 0, 0, 83, 0, 0, 84, 0, - 85, 0, 0, 0, 0, 0, 0, 0, 65, 66, - 81, 211, 68, 69, 70, 71, 72, 73, 74, 75, + 117, 183, 184, 185, 186, 187, 188, 189, 190, 191, + 192, 193, 79, 80, 20, 0, 21, 0, 0, 0, + 0, 82, 0, 0, 83, 0, 0, 84, 0, 85, + 0, 0, 0, 0, 0, 0, 0, 0, 65, 66, + 81, 210, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 20, 0, 21, 0, 0, - 0, 0, 0, 82, 0, 0, 83, 0, 0, 84, - 0, 85, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 82, 0, 0, 83, 0, 0, 84, 0, + 85, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 81, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 82, 0, 0, 83, 0, 0, - 84, 0, 85, 0, 0, 0, 0, 124, 0, 0, + 0, 0, 0, 82, 0, 0, 83, 0, 0, 84, + 0, 85, 0, 0, 0, 0, 124, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 125, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 126, 127, 0, 0, 82, 0, 0, 83, 0, - 0, 84, 0, 85, 128, 129, 130, 131, 132, 133, - 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, - 144, 145, 146, 147, 148, 149, 150, 151, 0, 0, - 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, - 162, 163 + 125, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 126, 127, 0, 0, 82, 0, 0, 83, 0, 0, + 84, 0, 85, 128, 129, 130, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, + 145, 146, 147, 148, 149, 150, 0, 0, 151, 152, + 153, 154, 155, 156, 157, 158, 159, 160, 161, 162 }; static const short int yycheck[] = { - 37, 130, 130, 53, 228, 3, 251, 252, 0, 15, - 112, 111, 23, 34, 131, 61, 53, 475, 15, 30, - 125, 121, 85, 128, 10, 11, 12, 13, 14, 15, - 16, 17, 270, 271, 279, 493, 57, 111, 492, 111, - 45, 29, 47, 41, 23, 117, 151, 121, 502, 154, - 155, 57, 169, 158, 159, 160, 161, 162, 163, 122, - 57, 299, 167, 10, 11, 12, 13, 14, 15, 16, - 17, 113, 109, 110, 111, 52, 53, 54, 9, 111, - 122, 117, 55, 56, 57, 110, 122, 119, 125, 87, - 21, 128, 5, 6, 71, 8, 9, 10, 11, 12, - 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, - 121, 24, 149, 150, 151, 152, 153, 154, 155, 0, - 61, 158, 159, 160, 161, 162, 163, 164, 165, 166, - 167, 117, 120, 24, 22, 48, 24, 200, 201, 202, - 111, 198, 247, 111, 25, 110, 391, 4, 119, 117, - 31, 208, 119, 32, 33, 122, 213, 214, 55, 56, - 41, 42, 43, 44, 45, 46, 47, 204, 225, 115, - 117, 96, 97, 230, 27, 28, 226, 3, 4, 3, - 4, 62, 3, 4, 241, 242, 243, 3, 4, 226, - 110, 415, 110, 417, 110, 245, 3, 4, 110, 112, - 4, 4, 115, 113, 117, 118, 4, 120, 245, 246, - 247, 316, 113, 318, 319, 320, 24, 4, 24, 24, - 116, 326, 116, 113, 59, 288, 64, 65, 66, 67, - 68, 69, 70, 335, 336, 337, 338, 339, 340, 20, - 4, 4, 4, 4, 4, 111, 348, 349, 350, 351, - 307, 7, 7, 7, 114, 111, 313, 111, 36, 111, - 41, 42, 43, 44, 45, 46, 47, 115, 111, 50, - 327, 328, 111, 24, 111, 213, 214, 111, 315, 316, - 317, 318, 319, 320, 321, 322, 284, 225, 111, 326, - 24, 111, 230, 111, 111, 114, 398, 111, 113, 34, - 113, 113, 113, 241, 242, 243, 63, 24, 21, 366, - 21, 368, 113, 113, 113, 372, 113, 422, 423, 424, - 357, 113, 113, 111, 381, 382, 383, 111, 111, 111, - 115, 111, 369, 435, 436, 437, 438, 111, 440, 441, - 442, 443, 111, 111, 4, 111, 475, 475, 113, 454, - 387, 24, 111, 111, 4, 412, 413, 36, 111, 57, - 4, 113, 111, 420, 493, 493, 111, 111, 111, 307, - 111, 111, 429, 111, 111, 313, 24, 414, 111, 111, - 482, 111, 484, 485, 111, 422, 423, 424, 114, 327, - 328, 428, 111, 115, 114, 57, 117, 434, 114, 456, - 10, 11, 12, 13, 14, 15, 16, 17, 114, 111, - 114, 111, 111, 114, 21, 36, 21, 454, 114, 114, - 114, 111, 114, 114, 117, 114, 21, 111, 366, 76, - 368, 21, 21, 490, 372, 41, 97, 25, 97, 97, - 97, 358, 122, 381, 382, 383, 503, 61, 198, 52, - 357, 3, 19, 510, 369, 392, 428, 514, 515, -1, - 5, 6, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 412, 413, -1, 22, -1, 24, - -1, 26, 420, -1, 20, -1, 22, -1, 24, -1, - -1, 429, -1, 38, 39, 31, 32, 33, -1, -1, - -1, -1, -1, -1, -1, 41, 42, 43, 44, 45, - 46, 47, -1, -1, 50, 51, -1, -1, 456, -1, - -1, -1, 58, -1, -1, -1, 62, -1, -1, -1, + 37, 130, 130, 53, 227, 3, 250, 251, 23, 29, + 112, 110, 110, 131, 20, 30, 53, 0, 15, 118, + 125, 85, 120, 128, 10, 11, 12, 13, 14, 15, + 16, 17, 110, 15, 278, 41, 42, 43, 44, 45, + 46, 47, 120, 41, 50, 150, 116, 34, 153, 154, + 168, 121, 157, 158, 159, 160, 161, 162, 122, 9, + 57, 166, 10, 11, 12, 13, 14, 15, 16, 17, + 57, 21, 109, 110, 111, 57, 474, 269, 270, 52, + 53, 54, 491, 118, 112, 61, 121, 110, 125, 87, + 23, 128, 501, 121, 492, 118, 110, 110, 71, 119, + 32, 33, 116, 116, 109, 120, 298, 61, 55, 56, + 57, 148, 149, 150, 151, 152, 153, 154, 0, 109, + 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, + 116, 45, 22, 47, 24, 199, 200, 201, 55, 56, + 197, 246, 4, 25, 95, 96, 390, 27, 28, 31, + 207, 3, 4, 3, 4, 212, 213, 3, 4, 41, + 42, 43, 44, 45, 46, 47, 203, 224, 116, 3, + 4, 24, 229, 3, 4, 225, 112, 114, 109, 109, + 62, 109, 109, 240, 241, 242, 4, 4, 225, 112, + 4, 414, 24, 416, 244, 10, 11, 12, 13, 14, + 15, 16, 17, 4, 24, 24, 115, 244, 245, 246, + 315, 115, 317, 318, 319, 112, 59, 4, 4, 4, + 325, 4, 4, 287, 64, 65, 66, 67, 68, 69, + 70, 7, 334, 335, 336, 337, 338, 339, 7, 7, + 110, 113, 110, 110, 110, 347, 348, 349, 350, 306, + 114, 110, 36, 110, 110, 312, 110, 24, 24, 110, + 63, 110, 110, 110, 34, 110, 24, 21, 112, 326, + 327, 112, 110, 112, 212, 213, 112, 314, 315, 316, + 317, 318, 319, 320, 321, 283, 224, 112, 325, 112, + 112, 229, 113, 21, 4, 397, 112, 24, 4, 112, + 112, 110, 240, 241, 242, 110, 110, 114, 365, 57, + 367, 110, 110, 110, 371, 110, 421, 422, 423, 356, + 112, 110, 110, 380, 381, 382, 4, 36, 24, 110, + 110, 368, 434, 435, 436, 437, 110, 439, 440, 441, + 442, 112, 114, 57, 21, 474, 474, 110, 453, 386, + 110, 110, 113, 110, 411, 412, 36, 110, 110, 110, + 110, 110, 419, 492, 492, 110, 110, 110, 306, 116, + 116, 428, 113, 113, 312, 113, 413, 110, 113, 481, + 110, 483, 484, 21, 421, 422, 423, 110, 326, 327, + 427, 113, 113, 113, 113, 113, 433, 113, 455, 110, + 113, 21, 110, 76, 21, 21, 97, 97, 97, 97, + 41, 25, 357, 52, 356, 122, 453, 61, 197, 3, + 19, 391, 368, 427, -1, -1, -1, 365, -1, 367, + 5, 6, 489, 371, -1, -1, -1, -1, -1, -1, + -1, -1, 380, 381, 382, 502, -1, 22, -1, 24, + -1, 26, 509, -1, -1, -1, 513, 514, -1, -1, + -1, -1, -1, 38, 39, -1, -1, -1, -1, -1, + -1, -1, -1, 411, 412, -1, -1, -1, -1, -1, + -1, 419, -1, -1, -1, -1, -1, -1, -1, -1, + 428, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 78, 79, 80, 81, 82, 83, 84, - 85, 86, 87, 88, 89, 90, 91, 92, -1, -1, - -1, -1, 490, 98, -1, 100, 101, 102, 103, -1, - 105, 106, 107, -1, -1, 503, -1, -1, -1, -1, - 115, -1, 510, 118, -1, 120, 514, 515, 123, 5, - 6, -1, 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, -1, 24, 5, - 6, -1, 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, -1, 24, -1, - -1, -1, 48, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 48, 3, 4, 5, 6, 7, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 22, -1, 24, -1, 26, 27, 28, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 38, 39, - -1, -1, -1, -1, -1, -1, 112, -1, -1, 115, - -1, -1, 118, -1, 120, 121, -1, -1, -1, -1, - -1, 61, -1, -1, -1, -1, 112, -1, -1, 115, - -1, -1, 118, -1, 120, 121, -1, -1, 78, 79, - 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, - 90, 91, 92, -1, -1, -1, -1, -1, 98, -1, - 100, 101, 102, 103, -1, 105, 106, 107, 3, 4, - -1, -1, 7, -1, -1, -1, -1, -1, 118, -1, + 85, 86, 87, 88, 89, 90, 91, 455, -1, -1, + -1, -1, 97, -1, 99, 100, 101, 102, -1, 104, + 105, 106, -1, -1, -1, -1, -1, -1, -1, 114, + -1, -1, 117, -1, 119, -1, -1, 122, -1, -1, + -1, 489, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 502, -1, -1, -1, -1, -1, + -1, 509, -1, -1, -1, 513, 514, 5, 6, -1, + 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, + 18, 19, 20, 21, 22, -1, 24, 5, 6, -1, + 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, + 18, 19, 20, 21, 22, -1, 24, -1, -1, -1, + 48, -1, -1, -1, -1, 20, -1, 22, -1, 24, + -1, -1, -1, -1, -1, -1, 31, 32, 33, -1, + 48, 3, 4, 5, 6, 7, 41, 42, 43, 44, + 45, 46, 47, -1, -1, 50, 51, -1, -1, -1, + 22, -1, 24, 58, 26, 27, 28, 62, -1, -1, + -1, -1, -1, -1, -1, -1, 38, 39, -1, -1, + -1, -1, -1, 111, -1, -1, 114, -1, -1, 117, + -1, 119, 120, -1, -1, -1, -1, -1, -1, 61, + -1, -1, -1, 111, -1, -1, 114, -1, -1, 117, + -1, 119, 120, -1, -1, -1, 78, 79, 80, 81, + 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, + -1, -1, -1, -1, -1, 97, -1, 99, 100, 101, + 102, -1, 104, 105, 106, 3, 4, -1, -1, 7, + -1, -1, -1, -1, -1, 117, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 26, 27, + 28, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 38, 39, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 26, 27, 28, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 38, 39, -1, -1, -1, -1, -1, + -1, -1, -1, 61, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 61, -1, -1, -1, + 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, + 88, 89, 90, 91, -1, -1, -1, -1, -1, 97, + -1, 99, 100, 101, 102, -1, 104, 105, 106, -1, + -1, -1, -1, -1, -1, -1, -1, 5, 6, 117, + 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, 37, + -1, -1, -1, -1, -1, -1, -1, -1, 5, 6, + 48, 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, 78, 79, 80, 81, 82, 83, 84, - 85, 86, 87, 88, 89, 90, 91, 92, -1, -1, - -1, -1, -1, 98, -1, 100, 101, 102, 103, -1, - 105, 106, 107, -1, -1, -1, -1, -1, -1, -1, - -1, 5, 6, 118, 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, 37, -1, -1, -1, -1, -1, -1, - -1, -1, 5, 6, 48, 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, 37, -1, -1, -1, -1, -1, - -1, -1, -1, 5, 6, 48, 8, 9, 10, 11, + 37, -1, -1, -1, -1, -1, -1, -1, -1, 5, + 6, 48, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, -1, 24, -1, + -1, -1, -1, 111, -1, -1, 114, -1, -1, 117, + -1, 119, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 48, 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, 112, -1, - -1, 115, -1, -1, 118, 37, 120, -1, -1, -1, + 22, -1, 24, -1, 111, -1, -1, 114, -1, -1, + 117, -1, 119, -1, -1, 37, -1, -1, -1, -1, -1, -1, -1, -1, 5, 6, 48, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, - 21, 22, -1, 24, -1, -1, -1, -1, -1, 112, - -1, -1, 115, -1, -1, 118, 37, 120, -1, -1, + 21, 22, -1, 24, -1, 111, -1, -1, 114, -1, + 116, 117, -1, 119, -1, -1, 37, -1, -1, -1, -1, -1, -1, -1, -1, 5, 6, 48, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, - 20, 21, 22, -1, 24, -1, -1, -1, -1, -1, - 112, -1, -1, 115, -1, -1, 118, -1, 120, -1, + 20, 21, 22, -1, 24, -1, -1, -1, -1, 111, + -1, -1, 114, -1, -1, 117, -1, 119, -1, -1, -1, -1, -1, -1, -1, -1, 5, 6, 48, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, -1, 24, -1, -1, -1, -1, - -1, 112, -1, -1, 115, -1, -1, 118, -1, 120, + 111, -1, -1, 114, -1, -1, 117, -1, 119, -1, -1, -1, -1, -1, -1, -1, -1, 5, 6, 48, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, -1, 24, -1, -1, -1, - -1, -1, 112, -1, -1, 115, -1, -1, 118, -1, - 120, -1, -1, -1, -1, -1, -1, -1, 5, 6, + -1, 111, -1, -1, 114, -1, -1, 117, -1, 119, + -1, -1, -1, -1, -1, -1, -1, -1, 5, 6, 48, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, -1, 24, -1, -1, - -1, -1, -1, 112, -1, -1, 115, -1, -1, 118, - -1, 120, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 111, -1, -1, 114, -1, -1, 117, -1, + 119, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 48, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 112, -1, -1, 115, -1, -1, - 118, -1, 120, -1, -1, -1, -1, 35, -1, -1, + -1, -1, -1, 111, -1, -1, 114, -1, -1, 117, + -1, 119, -1, -1, -1, -1, 35, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 49, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 59, 60, -1, -1, 112, -1, -1, 115, -1, - -1, 118, -1, 120, 72, 73, 74, 75, 76, 77, - 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, - 88, 89, 90, 91, 92, 93, 94, 95, -1, -1, - 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, - 108, 109 + 49, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 59, 60, -1, -1, 111, -1, -1, 114, -1, -1, + 117, -1, 119, 72, 73, 74, 75, 76, 77, 78, + 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, + 89, 90, 91, 92, 93, 94, -1, -1, 97, 98, + 99, 100, 101, 102, 103, 104, 105, 106, 107, 108 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ static const unsigned char yystos[] = { - 0, 155, 156, 157, 0, 25, 31, 41, 42, 43, - 44, 45, 46, 47, 62, 136, 174, 176, 178, 185, - 22, 24, 51, 58, 62, 135, 167, 178, 179, 61, - 64, 65, 66, 67, 68, 69, 70, 137, 172, 23, - 186, 187, 30, 121, 175, 186, 52, 53, 54, 71, - 164, 110, 61, 20, 45, 47, 50, 136, 110, 45, - 47, 177, 24, 162, 4, 5, 6, 8, 9, 10, + 0, 154, 155, 156, 0, 25, 31, 41, 42, 43, + 44, 45, 46, 47, 62, 135, 173, 175, 177, 184, + 22, 24, 51, 58, 62, 134, 166, 177, 178, 61, + 64, 65, 66, 67, 68, 69, 70, 136, 171, 23, + 185, 186, 30, 120, 174, 185, 52, 53, 54, 71, + 163, 109, 61, 20, 45, 47, 50, 135, 109, 45, + 47, 176, 24, 161, 4, 5, 6, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, - 21, 48, 112, 115, 118, 120, 125, 144, 145, 146, - 147, 148, 167, 182, 29, 120, 173, 135, 190, 110, - 110, 110, 110, 115, 165, 162, 144, 32, 33, 154, - 154, 154, 154, 172, 4, 4, 4, 8, 121, 148, - 149, 167, 113, 122, 35, 49, 59, 60, 72, 73, + 21, 48, 111, 114, 117, 119, 124, 143, 144, 145, + 146, 147, 166, 181, 29, 119, 172, 134, 189, 109, + 109, 109, 109, 114, 164, 161, 143, 32, 33, 153, + 153, 153, 153, 171, 4, 4, 4, 8, 120, 147, + 148, 166, 112, 121, 35, 49, 59, 60, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, - 94, 95, 98, 99, 100, 101, 102, 103, 104, 105, - 106, 107, 108, 109, 127, 128, 129, 130, 188, 194, - 195, 197, 198, 24, 55, 56, 163, 4, 24, 24, - 166, 146, 146, 146, 9, 10, 11, 12, 13, 14, - 15, 16, 17, 18, 19, 131, 132, 134, 146, 151, - 116, 116, 111, 121, 113, 37, 149, 150, 146, 184, - 59, 8, 184, 9, 21, 10, 11, 12, 13, 14, - 15, 16, 17, 131, 132, 133, 137, 146, 146, 184, - 146, 146, 191, 184, 184, 184, 184, 184, 184, 184, - 184, 146, 146, 146, 184, 137, 96, 97, 111, 117, - 160, 161, 159, 27, 28, 3, 4, 126, 4, 7, - 26, 38, 39, 98, 100, 101, 105, 106, 107, 115, - 118, 120, 123, 127, 128, 129, 130, 152, 182, 158, - 148, 148, 148, 37, 146, 169, 170, 171, 111, 114, - 3, 4, 7, 26, 27, 28, 38, 39, 61, 118, - 152, 181, 182, 183, 183, 183, 183, 144, 111, 139, - 111, 139, 183, 115, 111, 36, 111, 111, 111, 111, - 111, 111, 111, 183, 183, 183, 111, 144, 146, 184, - 24, 111, 142, 142, 142, 113, 113, 113, 113, 113, - 113, 117, 151, 153, 153, 121, 153, 24, 113, 113, - 113, 113, 142, 117, 119, 167, 168, 111, 114, 37, - 63, 180, 153, 111, 111, 183, 15, 57, 15, 111, - 196, 183, 115, 146, 184, 146, 184, 184, 184, 146, - 146, 111, 111, 111, 184, 183, 183, 111, 34, 57, - 140, 143, 151, 151, 151, 151, 151, 151, 111, 117, - 119, 121, 151, 151, 151, 151, 37, 169, 140, 141, - 24, 119, 21, 21, 113, 183, 4, 183, 184, 192, - 111, 183, 111, 111, 111, 183, 183, 183, 113, 146, - 24, 4, 142, 196, 36, 111, 111, 111, 111, 151, - 111, 111, 111, 111, 57, 138, 111, 183, 183, 192, - 193, 111, 139, 139, 111, 183, 111, 184, 184, 184, - 193, 183, 114, 146, 151, 151, 151, 151, 151, 151, - 151, 151, 4, 24, 111, 115, 114, 184, 117, 183, - 114, 114, 111, 114, 111, 111, 114, 114, 114, 114, - 21, 117, 133, 189, 36, 117, 151, 151, 151, 183, - 181, 117, 133, 21, 114, 114, 114, 111, 181, 183, - 21, 111, 76, 183, 21, 21, 183, 183 + 94, 97, 98, 99, 100, 101, 102, 103, 104, 105, + 106, 107, 108, 126, 127, 128, 129, 187, 193, 194, + 196, 197, 24, 55, 56, 162, 4, 24, 24, 165, + 145, 145, 145, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 130, 131, 133, 145, 150, 115, + 115, 110, 120, 112, 37, 148, 149, 145, 183, 59, + 8, 183, 9, 21, 10, 11, 12, 13, 14, 15, + 16, 17, 130, 131, 132, 136, 145, 145, 183, 145, + 145, 190, 183, 183, 183, 183, 183, 183, 183, 183, + 145, 145, 145, 183, 136, 95, 96, 110, 116, 159, + 160, 158, 27, 28, 3, 4, 125, 4, 7, 26, + 38, 39, 97, 99, 100, 104, 105, 106, 114, 117, + 119, 122, 126, 127, 128, 129, 151, 181, 157, 147, + 147, 147, 37, 145, 168, 169, 170, 110, 113, 3, + 4, 7, 26, 27, 28, 38, 39, 61, 117, 151, + 180, 181, 182, 182, 182, 182, 143, 110, 138, 110, + 138, 182, 114, 110, 36, 110, 110, 110, 110, 110, + 110, 110, 182, 182, 182, 110, 143, 145, 183, 24, + 110, 141, 141, 141, 112, 112, 112, 112, 112, 112, + 116, 150, 152, 152, 120, 152, 24, 112, 112, 112, + 112, 141, 116, 118, 166, 167, 110, 113, 37, 63, + 179, 152, 110, 110, 182, 15, 57, 15, 110, 195, + 182, 114, 145, 183, 145, 183, 183, 183, 145, 145, + 110, 110, 110, 183, 182, 182, 110, 34, 57, 139, + 142, 150, 150, 150, 150, 150, 150, 110, 116, 118, + 120, 150, 150, 150, 150, 37, 168, 139, 140, 24, + 118, 21, 21, 112, 182, 4, 182, 183, 191, 110, + 182, 110, 110, 110, 182, 182, 182, 112, 145, 24, + 4, 141, 195, 36, 110, 110, 110, 110, 150, 110, + 110, 110, 110, 57, 137, 110, 182, 182, 191, 192, + 110, 138, 138, 110, 182, 110, 183, 183, 183, 192, + 182, 113, 145, 150, 150, 150, 150, 150, 150, 150, + 150, 4, 24, 110, 114, 113, 183, 116, 182, 113, + 113, 110, 113, 110, 110, 113, 113, 113, 113, 21, + 116, 132, 188, 36, 116, 150, 150, 150, 182, 180, + 116, 132, 21, 113, 113, 113, 110, 180, 182, 21, + 110, 76, 182, 21, 21, 182, 182 }; #define yyerrok (yyerrstatus = 0) @@ -2969,7 +2955,7 @@ switch (yyn) { case 3: -#line 1115 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" +#line 1098 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[0].UIntVal) > (uint32_t)INT32_MAX) // Outside of my range! GEN_ERROR("Value too large for type!"); @@ -2979,7 +2965,7 @@ break; case 5: -#line 1124 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" +#line 1107 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[0].UInt64Val) > (uint64_t)INT64_MAX) // Outside of my range! GEN_ERROR("Value too large for type!"); @@ -2988,99 +2974,99 @@ ;} break; - case 35: -#line 1148 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 34: +#line 1131 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.StrVal) = (yyvsp[-1].StrVal); CHECK_FOR_ERROR ;} break; - case 36: -#line 1152 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 35: +#line 1135 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.StrVal) = 0; CHECK_FOR_ERROR ;} break; - case 37: -#line 1157 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 36: +#line 1140 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::InternalLinkage; ;} break; - case 38: -#line 1158 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 37: +#line 1141 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::LinkOnceLinkage; ;} break; - case 39: -#line 1159 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 38: +#line 1142 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::WeakLinkage; ;} break; - case 40: -#line 1160 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 39: +#line 1143 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::AppendingLinkage; ;} break; - case 41: -#line 1161 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 40: +#line 1144 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::DLLImportLinkage; ;} break; - case 42: -#line 1162 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 41: +#line 1145 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::DLLExportLinkage; ;} break; - case 43: -#line 1163 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 42: +#line 1146 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::ExternalWeakLinkage; ;} break; - case 44: -#line 1164 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 43: +#line 1147 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::ExternalLinkage; ;} break; - case 45: -#line 1166 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 44: +#line 1149 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = CallingConv::C; ;} break; - case 46: -#line 1167 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 45: +#line 1150 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = CallingConv::C; ;} break; - case 47: -#line 1168 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 46: +#line 1151 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = CallingConv::CSRet; ;} break; - case 48: -#line 1169 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 47: +#line 1152 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = CallingConv::Fast; ;} break; - case 49: -#line 1170 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 48: +#line 1153 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = CallingConv::Cold; ;} break; - case 50: -#line 1171 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 49: +#line 1154 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = CallingConv::X86_StdCall; ;} break; - case 51: -#line 1172 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 50: +#line 1155 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = CallingConv::X86_FastCall; ;} break; - case 52: -#line 1173 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 51: +#line 1156 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { if ((unsigned)(yyvsp[0].UInt64Val) != (yyvsp[0].UInt64Val)) GEN_ERROR("Calling conv too large!"); @@ -3089,13 +3075,13 @@ ;} break; - case 53: -#line 1182 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 52: +#line 1165 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = 0; ;} break; - case 54: -#line 1183 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 53: +#line 1166 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = (yyvsp[0].UInt64Val); if ((yyval.UIntVal) != 0 && !isPowerOf2_32((yyval.UIntVal))) @@ -3104,13 +3090,13 @@ ;} break; - case 55: -#line 1189 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 54: +#line 1172 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = 0; ;} break; - case 56: -#line 1190 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 55: +#line 1173 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = (yyvsp[0].UInt64Val); if ((yyval.UIntVal) != 0 && !isPowerOf2_32((yyval.UIntVal))) @@ -3119,8 +3105,8 @@ ;} break; - case 57: -#line 1198 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 56: +#line 1181 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { for (unsigned i = 0, e = strlen((yyvsp[0].StrVal)); i != e; ++i) if ((yyvsp[0].StrVal)[i] == '"' || (yyvsp[0].StrVal)[i] == '\\') @@ -3130,28 +3116,28 @@ ;} break; - case 58: -#line 1206 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 57: +#line 1189 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.StrVal) = 0; ;} break; - case 59: -#line 1207 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 58: +#line 1190 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.StrVal) = (yyvsp[0].StrVal); ;} break; - case 60: -#line 1212 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 59: +#line 1195 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" {;} break; - case 61: -#line 1213 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 60: +#line 1196 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" {;} break; - case 62: -#line 1214 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 61: +#line 1197 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { CurGV->setSection((yyvsp[0].StrVal)); free((yyvsp[0].StrVal)); @@ -3159,8 +3145,8 @@ ;} break; - case 63: -#line 1219 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 62: +#line 1202 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[0].UInt64Val) != 0 && !isPowerOf2_32((yyvsp[0].UInt64Val))) GEN_ERROR("Alignment must be a power of two!"); @@ -3169,18 +3155,18 @@ ;} break; - case 65: -#line 1233 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 64: +#line 1216 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeVal) = new PATypeHolder((yyvsp[0].PrimType)); ;} break; - case 67: -#line 1234 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 66: +#line 1217 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeVal) = new PATypeHolder((yyvsp[0].PrimType)); ;} break; - case 68: -#line 1236 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 67: +#line 1219 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[0].TypeVal))->getDescription()); @@ -3189,24 +3175,24 @@ ;} break; - case 82: -#line 1248 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 81: +#line 1231 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeVal) = new PATypeHolder(OpaqueType::get()); CHECK_FOR_ERROR ;} break; - case 83: -#line 1252 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 82: +#line 1235 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeVal) = new PATypeHolder((yyvsp[0].PrimType)); CHECK_FOR_ERROR ;} break; - case 84: -#line 1256 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 83: +#line 1239 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { // Named types are also simple types... const Type* tmp = getTypeVal((yyvsp[0].ValIDVal)); CHECK_FOR_ERROR @@ -3214,8 +3200,8 @@ ;} break; - case 85: -#line 1264 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 84: +#line 1247 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { // Type UpReference if ((yyvsp[0].UInt64Val) > (uint64_t)~0U) GEN_ERROR("Value out of range!"); OpaqueType *OT = OpaqueType::get(); // Use temporary placeholder @@ -3226,8 +3212,8 @@ ;} break; - case 86: -#line 1272 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 85: +#line 1255 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { // Function derived type? std::vector Params; for (std::list::iterator I = (yyvsp[-1].TypeList)->begin(), @@ -3243,8 +3229,8 @@ ;} break; - case 87: -#line 1285 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 86: +#line 1268 "/proj/llvm/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); @@ -3252,8 +3238,8 @@ ;} break; - case 88: -#line 1290 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 87: +#line 1273 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { // Packed array type? const llvm::Type* ElemTy = (yyvsp[-1].TypeVal)->get(); if ((unsigned)(yyvsp[-3].UInt64Val) != (yyvsp[-3].UInt64Val)) @@ -3268,8 +3254,8 @@ ;} break; - case 89: -#line 1302 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 88: +#line 1285 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { // Structure type? std::vector Elements; for (std::list::iterator I = (yyvsp[-1].TypeList)->begin(), @@ -3282,16 +3268,16 @@ ;} break; - case 90: -#line 1312 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 89: +#line 1295 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { // Empty structure type? (yyval.TypeVal) = new PATypeHolder(StructType::get(std::vector())); CHECK_FOR_ERROR ;} break; - case 91: -#line 1316 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 90: +#line 1299 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { // Pointer type? if (*(yyvsp[-1].TypeVal) == Type::LabelTy) GEN_ERROR("Cannot form a pointer to a basic block"); @@ -3301,8 +3287,8 @@ ;} break; - case 92: -#line 1327 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 91: +#line 1310 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeList) = new std::list(); (yyval.TypeList)->push_back(*(yyvsp[0].TypeVal)); delete (yyvsp[0].TypeVal); @@ -3310,40 +3296,40 @@ ;} break; - case 93: -#line 1332 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 92: +#line 1315 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { ((yyval.TypeList)=(yyvsp[-2].TypeList))->push_back(*(yyvsp[0].TypeVal)); delete (yyvsp[0].TypeVal); CHECK_FOR_ERROR ;} break; - case 95: -#line 1339 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 94: +#line 1322 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { ((yyval.TypeList)=(yyvsp[-2].TypeList))->push_back(Type::VoidTy); CHECK_FOR_ERROR ;} break; - case 96: -#line 1343 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 95: +#line 1326 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { ((yyval.TypeList) = new std::list())->push_back(Type::VoidTy); CHECK_FOR_ERROR ;} break; - case 97: -#line 1347 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 96: +#line 1330 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeList) = new std::list(); CHECK_FOR_ERROR ;} break; - case 98: -#line 1358 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 97: +#line 1341 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { // Nonempty unsized arr const ArrayType *ATy = dyn_cast((yyvsp[-3].TypeVal)->get()); if (ATy == 0) @@ -3372,8 +3358,8 @@ ;} break; - case 99: -#line 1384 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 98: +#line 1367 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { const ArrayType *ATy = dyn_cast((yyvsp[-2].TypeVal)->get()); if (ATy == 0) @@ -3390,8 +3376,8 @@ ;} break; - case 100: -#line 1398 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 99: +#line 1381 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { const ArrayType *ATy = dyn_cast((yyvsp[-2].TypeVal)->get()); if (ATy == 0) @@ -3424,8 +3410,8 @@ ;} break; - case 101: -#line 1428 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 100: +#line 1411 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { // Nonempty unsized arr const PackedType *PTy = dyn_cast((yyvsp[-3].TypeVal)->get()); if (PTy == 0) @@ -3454,8 +3440,8 @@ ;} break; - case 102: -#line 1454 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 101: +#line 1437 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { const StructType *STy = dyn_cast((yyvsp[-3].TypeVal)->get()); if (STy == 0) @@ -3479,8 +3465,8 @@ ;} break; - case 103: -#line 1475 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 102: +#line 1458 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { const StructType *STy = dyn_cast((yyvsp[-2].TypeVal)->get()); if (STy == 0) @@ -3496,8 +3482,8 @@ ;} break; - case 104: -#line 1488 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 103: +#line 1471 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { const PointerType *PTy = dyn_cast((yyvsp[-1].TypeVal)->get()); if (PTy == 0) @@ -3510,8 +3496,8 @@ ;} break; - case 105: -#line 1498 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 104: +#line 1481 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ConstVal) = UndefValue::get((yyvsp[-1].TypeVal)->get()); delete (yyvsp[-1].TypeVal); @@ -3519,8 +3505,8 @@ ;} break; - case 106: -#line 1503 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 105: +#line 1486 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { const PointerType *Ty = dyn_cast((yyvsp[-1].TypeVal)->get()); if (Ty == 0) @@ -3584,8 +3570,8 @@ ;} break; - case 107: -#line 1564 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 106: +#line 1547 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[-1].TypeVal)->get() != (yyvsp[0].ConstVal)->getType()) GEN_ERROR("Mismatched types for constant expression!"); @@ -3595,8 +3581,8 @@ ;} break; - case 108: -#line 1571 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 107: +#line 1554 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { const Type *Ty = (yyvsp[-1].TypeVal)->get(); if (isa(Ty) || Ty == Type::LabelTy || isa(Ty)) @@ -3607,8 +3593,8 @@ ;} break; - case 109: -#line 1580 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 108: +#line 1563 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { // integral constants if (!ConstantInt::isValueValidForType((yyvsp[-1].PrimType), (yyvsp[0].SInt64Val))) GEN_ERROR("Constant value doesn't fit in type!"); @@ -3617,8 +3603,8 @@ ;} break; - case 110: -#line 1586 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 109: +#line 1569 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { // integral constants if (!ConstantInt::isValueValidForType((yyvsp[-1].PrimType), (yyvsp[0].UInt64Val))) GEN_ERROR("Constant value doesn't fit in type!"); @@ -3627,24 +3613,24 @@ ;} break; - case 111: -#line 1592 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 110: +#line 1575 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { // Boolean constants (yyval.ConstVal) = ConstantBool::getTrue(); CHECK_FOR_ERROR ;} break; - case 112: -#line 1596 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 111: +#line 1579 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { // Boolean constants (yyval.ConstVal) = ConstantBool::getFalse(); CHECK_FOR_ERROR ;} break; - case 113: -#line 1600 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 112: +#line 1583 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { // Float & Double constants if (!ConstantFP::isValueValidForType((yyvsp[-1].PrimType), (yyvsp[0].FPVal))) GEN_ERROR("Floating point constant invalid for type!!"); @@ -3653,8 +3639,8 @@ ;} break; - case 114: -#line 1608 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 113: +#line 1591 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { if (!(yyvsp[-3].ConstVal)->getType()->isFirstClassType()) GEN_ERROR("cast constant expression from a non-primitive type: '" + @@ -3668,8 +3654,8 @@ ;} break; - case 115: -#line 1619 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 114: +#line 1602 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { if (!isa((yyvsp[-2].ConstVal)->getType())) GEN_ERROR("GetElementPtr requires a pointer operand!"); @@ -3704,8 +3690,8 @@ ;} break; - case 116: -#line 1651 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 115: +#line 1634 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[-5].ConstVal)->getType() != Type::BoolTy) GEN_ERROR("Select condition must be of boolean type!"); @@ -3716,19 +3702,17 @@ ;} break; - case 117: -#line 1659 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 116: +#line 1642 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[-3].ConstVal)->getType() != (yyvsp[-1].ConstVal)->getType()) GEN_ERROR("Binary operator types must match!"); - sanitizeOpCode((yyvsp[-5].BinaryOpVal),(yyvsp[-3].ConstVal)->getType()); - CHECK_FOR_ERROR; // HACK: llvm 1.3 and earlier used to emit invalid pointer constant exprs. // To retain backward compatibility with these early compilers, we emit a // cast to the appropriate integer type automatically if we are in the // broken case. See PR424 for more information. if (!isa((yyvsp[-3].ConstVal)->getType())) { - (yyval.ConstVal) = ConstantExpr::get((yyvsp[-5].BinaryOpVal).opcode, (yyvsp[-3].ConstVal), (yyvsp[-1].ConstVal)); + (yyval.ConstVal) = ConstantExpr::get((yyvsp[-5].BinaryOpVal), (yyvsp[-3].ConstVal), (yyvsp[-1].ConstVal)); } else { const Type *IntPtrTy = 0; switch (CurModule.CurrentModule->getPointerSize()) { @@ -3736,7 +3720,7 @@ case Module::Pointer64: IntPtrTy = Type::LongTy; break; default: GEN_ERROR("invalid pointer binary constant expr!"); } - (yyval.ConstVal) = ConstantExpr::get((yyvsp[-5].BinaryOpVal).opcode, ConstantExpr::getCast((yyvsp[-3].ConstVal), IntPtrTy), + (yyval.ConstVal) = ConstantExpr::get((yyvsp[-5].BinaryOpVal), ConstantExpr::getCast((yyvsp[-3].ConstVal), IntPtrTy), ConstantExpr::getCast((yyvsp[-1].ConstVal), IntPtrTy)); (yyval.ConstVal) = ConstantExpr::getCast((yyval.ConstVal), (yyvsp[-3].ConstVal)->getType()); } @@ -3744,8 +3728,8 @@ ;} break; - case 118: -#line 1683 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 117: +#line 1664 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[-3].ConstVal)->getType() != (yyvsp[-1].ConstVal)->getType()) GEN_ERROR("Logical operator types must match!"); @@ -3754,35 +3738,35 @@ !cast((yyvsp[-3].ConstVal)->getType())->getElementType()->isIntegral()) GEN_ERROR("Logical operator requires integral operands!"); } - (yyval.ConstVal) = ConstantExpr::get((yyvsp[-5].BinaryOpVal).opcode, (yyvsp[-3].ConstVal), (yyvsp[-1].ConstVal)); + (yyval.ConstVal) = ConstantExpr::get((yyvsp[-5].BinaryOpVal), (yyvsp[-3].ConstVal), (yyvsp[-1].ConstVal)); CHECK_FOR_ERROR ;} break; - case 119: -#line 1694 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 118: +#line 1675 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[-3].ConstVal)->getType() != (yyvsp[-1].ConstVal)->getType()) GEN_ERROR("setcc operand types must match!"); - (yyval.ConstVal) = ConstantExpr::get((yyvsp[-5].BinaryOpVal).opcode, (yyvsp[-3].ConstVal), (yyvsp[-1].ConstVal)); + (yyval.ConstVal) = ConstantExpr::get((yyvsp[-5].BinaryOpVal), (yyvsp[-3].ConstVal), (yyvsp[-1].ConstVal)); CHECK_FOR_ERROR ;} break; - case 120: -#line 1700 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 119: +#line 1681 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[-1].ConstVal)->getType() != Type::UByteTy) GEN_ERROR("Shift count for shift constant must be unsigned byte!"); if (!(yyvsp[-3].ConstVal)->getType()->isInteger()) GEN_ERROR("Shift constant expression requires integer operand!"); - (yyval.ConstVal) = ConstantExpr::get((yyvsp[-5].OtherOpVal).opcode, (yyvsp[-3].ConstVal), (yyvsp[-1].ConstVal)); + (yyval.ConstVal) = ConstantExpr::get((yyvsp[-5].OtherOpVal), (yyvsp[-3].ConstVal), (yyvsp[-1].ConstVal)); CHECK_FOR_ERROR ;} break; - case 121: -#line 1708 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 120: +#line 1689 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { if (!ExtractElementInst::isValidOperands((yyvsp[-3].ConstVal), (yyvsp[-1].ConstVal))) GEN_ERROR("Invalid extractelement operands!"); @@ -3791,8 +3775,8 @@ ;} break; - case 122: -#line 1714 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 121: +#line 1695 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { if (!InsertElementInst::isValidOperands((yyvsp[-5].ConstVal), (yyvsp[-3].ConstVal), (yyvsp[-1].ConstVal))) GEN_ERROR("Invalid insertelement operands!"); @@ -3801,8 +3785,8 @@ ;} break; - case 123: -#line 1720 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 122: +#line 1701 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { if (!ShuffleVectorInst::isValidOperands((yyvsp[-5].ConstVal), (yyvsp[-3].ConstVal), (yyvsp[-1].ConstVal))) GEN_ERROR("Invalid shufflevector operands!"); @@ -3811,16 +3795,16 @@ ;} break; - case 124: -#line 1729 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 123: +#line 1710 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { ((yyval.ConstVector) = (yyvsp[-2].ConstVector))->push_back((yyvsp[0].ConstVal)); CHECK_FOR_ERROR ;} break; - case 125: -#line 1733 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 124: +#line 1714 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ConstVector) = new std::vector(); (yyval.ConstVector)->push_back((yyvsp[0].ConstVal)); @@ -3828,18 +3812,18 @@ ;} break; - case 126: -#line 1741 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 125: +#line 1722 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = false; ;} break; - case 127: -#line 1741 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 126: +#line 1722 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = true; ;} break; - case 128: -#line 1751 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 127: +#line 1732 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ModuleVal) = ParserResult = (yyvsp[0].ModuleVal); CurModule.ModuleDone(); @@ -3847,8 +3831,8 @@ ;} break; - case 129: -#line 1759 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 128: +#line 1740 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ModuleVal) = (yyvsp[-1].ModuleVal); CurFun.FunctionDone(); @@ -3856,32 +3840,32 @@ ;} break; - case 130: -#line 1764 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 129: +#line 1745 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ModuleVal) = (yyvsp[-1].ModuleVal); CHECK_FOR_ERROR ;} break; - case 131: -#line 1768 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 130: +#line 1749 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ModuleVal) = (yyvsp[-3].ModuleVal); CHECK_FOR_ERROR ;} break; - case 132: -#line 1772 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 131: +#line 1753 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ModuleVal) = (yyvsp[-1].ModuleVal); CHECK_FOR_ERROR ;} break; - case 133: -#line 1776 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 132: +#line 1757 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ModuleVal) = CurModule.CurrentModule; // Emit an error if there are any unresolved types left. @@ -3897,8 +3881,8 @@ ;} break; - case 134: -#line 1791 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 133: +#line 1772 "/proj/llvm/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: @@ -3923,22 +3907,22 @@ ;} break; - case 135: -#line 1813 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 134: +#line 1794 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { // Function prototypes can be in const pool CHECK_FOR_ERROR ;} break; - case 136: -#line 1816 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 135: +#line 1797 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { // Asm blocks can be in the const pool CHECK_FOR_ERROR ;} break; - case 137: -#line 1819 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 136: +#line 1800 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[0].ConstVal) == 0) GEN_ERROR("Global value initializer is not a constant!"); @@ -3947,15 +3931,15 @@ ;} break; - case 138: -#line 1824 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 137: +#line 1805 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { CurGV = 0; ;} break; - case 139: -#line 1827 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 138: +#line 1808 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { CurGV = ParseGlobalVariable((yyvsp[-3].StrVal), GlobalValue::ExternalLinkage, (yyvsp[-1].BoolVal), *(yyvsp[0].TypeVal), 0); CHECK_FOR_ERROR @@ -3963,16 +3947,16 @@ ;} break; - case 140: -#line 1831 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 139: +#line 1812 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { CurGV = 0; CHECK_FOR_ERROR ;} break; - case 141: -#line 1835 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 140: +#line 1816 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { CurGV = ParseGlobalVariable((yyvsp[-3].StrVal), GlobalValue::DLLImportLinkage, (yyvsp[-1].BoolVal), *(yyvsp[0].TypeVal), 0); CHECK_FOR_ERROR @@ -3980,16 +3964,16 @@ ;} break; - case 142: -#line 1839 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 141: +#line 1820 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { CurGV = 0; CHECK_FOR_ERROR ;} break; - case 143: -#line 1843 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 142: +#line 1824 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { CurGV = ParseGlobalVariable((yyvsp[-3].StrVal), GlobalValue::ExternalWeakLinkage, (yyvsp[-1].BoolVal), *(yyvsp[0].TypeVal), 0); @@ -3998,36 +3982,36 @@ ;} break; - case 144: -#line 1848 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 143: +#line 1829 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { CurGV = 0; CHECK_FOR_ERROR ;} break; - case 145: -#line 1852 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 144: +#line 1833 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { CHECK_FOR_ERROR ;} break; - case 146: -#line 1855 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 145: +#line 1836 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { CHECK_FOR_ERROR ;} break; - case 147: -#line 1858 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 146: +#line 1839 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { ;} break; - case 148: -#line 1862 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 147: +#line 1843 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { const std::string &AsmSoFar = CurModule.CurrentModule->getModuleInlineAsm(); char *EndStr = UnEscapeLexed((yyvsp[0].StrVal), true); @@ -4042,26 +4026,26 @@ ;} break; - case 149: -#line 1875 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 148: +#line 1856 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Endianness) = Module::BigEndian; ;} break; - case 150: -#line 1876 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 149: +#line 1857 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Endianness) = Module::LittleEndian; ;} break; - case 151: -#line 1878 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 150: +#line 1859 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { CurModule.CurrentModule->setEndianness((yyvsp[0].Endianness)); CHECK_FOR_ERROR ;} break; - case 152: -#line 1882 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 151: +#line 1863 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[0].UInt64Val) == 32) CurModule.CurrentModule->setPointerSize(Module::Pointer32); @@ -4073,8 +4057,8 @@ ;} break; - case 153: -#line 1891 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 152: +#line 1872 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { CurModule.CurrentModule->setTargetTriple((yyvsp[0].StrVal)); free((yyvsp[0].StrVal)); @@ -4082,8 +4066,8 @@ ;} break; - case 154: -#line 1896 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 153: +#line 1877 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { CurModule.CurrentModule->setDataLayout((yyvsp[0].StrVal)); free((yyvsp[0].StrVal)); @@ -4091,8 +4075,8 @@ ;} break; - case 156: -#line 1904 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 155: +#line 1885 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { CurModule.CurrentModule->addLibrary((yyvsp[0].StrVal)); free((yyvsp[0].StrVal)); @@ -4100,8 +4084,8 @@ ;} break; - case 157: -#line 1909 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 156: +#line 1890 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { CurModule.CurrentModule->addLibrary((yyvsp[0].StrVal)); free((yyvsp[0].StrVal)); @@ -4109,20 +4093,20 @@ ;} break; - case 158: -#line 1914 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 157: +#line 1895 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { CHECK_FOR_ERROR ;} break; - case 162: -#line 1924 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 161: +#line 1905 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.StrVal) = 0; ;} break; - case 163: -#line 1926 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 162: +#line 1907 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { if (*(yyvsp[-1].TypeVal) == Type::VoidTy) GEN_ERROR("void typed arguments are invalid!"); @@ -4131,8 +4115,8 @@ ;} break; - case 164: -#line 1933 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 163: +#line 1914 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ArgList) = (yyvsp[-2].ArgList); (yyvsp[-2].ArgList)->push_back(*(yyvsp[0].ArgVal)); @@ -4141,8 +4125,8 @@ ;} break; - case 165: -#line 1939 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 164: +#line 1920 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ArgList) = new std::vector >(); (yyval.ArgList)->push_back(*(yyvsp[0].ArgVal)); @@ -4151,16 +4135,16 @@ ;} break; - case 166: -#line 1946 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 165: +#line 1927 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ArgList) = (yyvsp[0].ArgList); CHECK_FOR_ERROR ;} break; - case 167: -#line 1950 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 166: +#line 1931 "/proj/llvm/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)); @@ -4178,16 +4162,16 @@ ;} break; - case 169: -#line 1961 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 168: +#line 1942 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ArgList) = 0; CHECK_FOR_ERROR ;} break; - case 170: -#line 1967 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 169: +#line 1948 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { UnEscapeLexed((yyvsp[-5].StrVal)); std::string FunctionName((yyvsp[-5].StrVal)); @@ -4283,8 +4267,8 @@ ;} break; - case 173: -#line 2063 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 172: +#line 2044 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FunctionVal) = CurFun.CurrentFunction; @@ -4294,31 +4278,31 @@ ;} break; - case 176: -#line 2073 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 175: +#line 2054 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FunctionVal) = (yyvsp[-1].FunctionVal); CHECK_FOR_ERROR ;} break; - case 178: -#line 2079 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 177: +#line 2060 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { CurFun.Linkage = GlobalValue::DLLImportLinkage ;} break; - case 179: -#line 2080 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 178: +#line 2061 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { CurFun.Linkage = GlobalValue::DLLImportLinkage ;} break; - case 180: -#line 2082 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 179: +#line 2063 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { CurFun.isDeclare = true; ;} break; - case 181: -#line 2082 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 180: +#line 2063 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FunctionVal) = CurFun.CurrentFunction; CurFun.FunctionDone(); @@ -4326,88 +4310,88 @@ ;} break; - case 182: -#line 2092 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 181: +#line 2073 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = false; CHECK_FOR_ERROR ;} break; - case 183: -#line 2096 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 182: +#line 2077 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = true; CHECK_FOR_ERROR ;} break; - case 184: -#line 2101 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 183: +#line 2082 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { // A reference to a direct constant (yyval.ValIDVal) = ValID::create((yyvsp[0].SInt64Val)); CHECK_FOR_ERROR ;} break; - case 185: -#line 2105 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 184: +#line 2086 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ValIDVal) = ValID::create((yyvsp[0].UInt64Val)); CHECK_FOR_ERROR ;} break; - case 186: -#line 2109 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 185: +#line 2090 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { // Perhaps it's an FP constant? (yyval.ValIDVal) = ValID::create((yyvsp[0].FPVal)); CHECK_FOR_ERROR ;} break; - case 187: -#line 2113 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 186: +#line 2094 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ValIDVal) = ValID::create(ConstantBool::getTrue()); CHECK_FOR_ERROR ;} break; - case 188: -#line 2117 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 187: +#line 2098 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ValIDVal) = ValID::create(ConstantBool::getFalse()); CHECK_FOR_ERROR ;} break; - case 189: -#line 2121 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 188: +#line 2102 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ValIDVal) = ValID::createNull(); CHECK_FOR_ERROR ;} break; - case 190: -#line 2125 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 189: +#line 2106 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ValIDVal) = ValID::createUndef(); CHECK_FOR_ERROR ;} break; - case 191: -#line 2129 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 190: +#line 2110 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { // A vector zero constant. (yyval.ValIDVal) = ValID::createZeroInit(); CHECK_FOR_ERROR ;} break; - case 192: -#line 2133 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 191: +#line 2114 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { // Nonempty unsized packed vector const Type *ETy = (*(yyvsp[-1].ConstVector))[0]->getType(); int NumElements = (yyvsp[-1].ConstVector)->size(); @@ -4435,16 +4419,16 @@ ;} break; - case 193: -#line 2158 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 192: +#line 2139 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ValIDVal) = ValID::create((yyvsp[0].ConstVal)); CHECK_FOR_ERROR ;} break; - case 194: -#line 2162 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 193: +#line 2143 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { char *End = UnEscapeLexed((yyvsp[-2].StrVal), true); std::string AsmStr = std::string((yyvsp[-2].StrVal), End); @@ -4457,48 +4441,48 @@ ;} break; - case 195: -#line 2176 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 194: +#line 2157 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { // Is it an integer reference...? (yyval.ValIDVal) = ValID::create((yyvsp[0].SIntVal)); CHECK_FOR_ERROR ;} break; - case 196: -#line 2180 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 195: +#line 2161 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { // Is it a named reference...? (yyval.ValIDVal) = ValID::create((yyvsp[0].StrVal)); CHECK_FOR_ERROR ;} break; - case 199: -#line 2192 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 198: +#line 2173 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ValueVal) = getVal(*(yyvsp[-1].TypeVal), (yyvsp[0].ValIDVal)); delete (yyvsp[-1].TypeVal); CHECK_FOR_ERROR ;} break; - case 200: -#line 2197 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 199: +#line 2178 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FunctionVal) = (yyvsp[-1].FunctionVal); CHECK_FOR_ERROR ;} break; - case 201: -#line 2201 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 200: +#line 2182 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { // Do not allow functions with 0 basic blocks (yyval.FunctionVal) = (yyvsp[-1].FunctionVal); CHECK_FOR_ERROR ;} break; - case 202: -#line 2210 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 201: +#line 2191 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { setValueName((yyvsp[0].TermInstVal), (yyvsp[-1].StrVal)); CHECK_FOR_ERROR @@ -4511,8 +4495,8 @@ ;} break; - case 203: -#line 2221 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 202: +#line 2202 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { (yyvsp[-1].BasicBlockVal)->getInstList().push_back((yyvsp[0].InstVal)); (yyval.BasicBlockVal) = (yyvsp[-1].BasicBlockVal); @@ -4520,8 +4504,8 @@ ;} break; - case 204: -#line 2226 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 203: +#line 2207 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.BasicBlockVal) = CurBB = getBBVal(ValID::create((int)CurFun.NextBBNum++), true); CHECK_FOR_ERROR @@ -4536,8 +4520,8 @@ ;} break; - case 205: -#line 2238 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 204: +#line 2219 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.BasicBlockVal) = CurBB = getBBVal(ValID::create((yyvsp[0].StrVal)), true); CHECK_FOR_ERROR @@ -4552,24 +4536,24 @@ ;} break; - case 206: -#line 2251 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 205: +#line 2232 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { // Return with a result... (yyval.TermInstVal) = new ReturnInst((yyvsp[0].ValueVal)); CHECK_FOR_ERROR ;} break; - case 207: -#line 2255 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 206: +#line 2236 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { // Return with no result... (yyval.TermInstVal) = new ReturnInst(); CHECK_FOR_ERROR ;} break; - case 208: -#line 2259 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 207: +#line 2240 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { // Unconditional Branch... BasicBlock* tmpBB = getBBVal((yyvsp[0].ValIDVal)); CHECK_FOR_ERROR @@ -4577,8 +4561,8 @@ ;} break; - case 209: -#line 2264 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 208: +#line 2245 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { BasicBlock* tmpBBA = getBBVal((yyvsp[-3].ValIDVal)); CHECK_FOR_ERROR @@ -4590,8 +4574,8 @@ ;} break; - case 210: -#line 2273 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 209: +#line 2254 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { Value* tmpVal = getVal((yyvsp[-7].PrimType), (yyvsp[-6].ValIDVal)); CHECK_FOR_ERROR @@ -4613,8 +4597,8 @@ ;} break; - case 211: -#line 2292 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 210: +#line 2273 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { Value* tmpVal = getVal((yyvsp[-6].PrimType), (yyvsp[-5].ValIDVal)); CHECK_FOR_ERROR @@ -4626,8 +4610,8 @@ ;} break; - case 212: -#line 2302 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 211: +#line 2283 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { const PointerType *PFTy; const FunctionType *Ty; @@ -4685,24 +4669,24 @@ ;} break; - case 213: -#line 2357 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 212: +#line 2338 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.TermInstVal) = new UnwindInst(); CHECK_FOR_ERROR ;} break; - case 214: -#line 2361 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 213: +#line 2342 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.TermInstVal) = new UnreachableInst(); CHECK_FOR_ERROR ;} break; - case 215: -#line 2368 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 214: +#line 2349 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.JumpTable) = (yyvsp[-5].JumpTable); Constant *V = cast(getValNonImprovising((yyvsp[-4].PrimType), (yyvsp[-3].ValIDVal))); @@ -4716,8 +4700,8 @@ ;} break; - case 216: -#line 2379 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 215: +#line 2360 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.JumpTable) = new std::vector >(); Constant *V = cast(getValNonImprovising((yyvsp[-4].PrimType), (yyvsp[-3].ValIDVal))); @@ -4732,8 +4716,8 @@ ;} break; - case 217: -#line 2392 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 216: +#line 2373 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { // Is this definition named?? if so, assign the name... setValueName((yyvsp[0].InstVal), (yyvsp[-1].StrVal)); @@ -4744,8 +4728,8 @@ ;} break; - case 218: -#line 2401 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 217: +#line 2382 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { // Used for PHI nodes (yyval.PHIList) = new std::list >(); Value* tmpVal = getVal(*(yyvsp[-5].TypeVal), (yyvsp[-3].ValIDVal)); @@ -4757,8 +4741,8 @@ ;} break; - case 219: -#line 2410 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 218: +#line 2391 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.PHIList) = (yyvsp[-6].PHIList); Value* tmpVal = getVal((yyvsp[-6].PHIList)->front().first->getType(), (yyvsp[-3].ValIDVal)); @@ -4769,16 +4753,16 @@ ;} break; - case 220: -#line 2420 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 219: +#line 2401 "/proj/llvm/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 221: -#line 2424 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 220: +#line 2405 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ValueList) = (yyvsp[-2].ValueList); (yyvsp[-2].ValueList)->push_back((yyvsp[0].ValueVal)); @@ -4786,51 +4770,49 @@ ;} break; - case 223: -#line 2431 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 222: +#line 2412 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ValueList) = 0; ;} break; - case 224: -#line 2433 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 223: +#line 2414 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = true; CHECK_FOR_ERROR ;} break; - case 225: -#line 2437 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 224: +#line 2418 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = false; CHECK_FOR_ERROR ;} break; - case 226: -#line 2442 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 225: +#line 2423 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { if (!(*(yyvsp[-3].TypeVal))->isInteger() && !(*(yyvsp[-3].TypeVal))->isFloatingPoint() && !isa((*(yyvsp[-3].TypeVal)).get())) GEN_ERROR( "Arithmetic operator requires integer, FP, or packed operands!"); - if (isa((*(yyvsp[-3].TypeVal)).get()) && (yyvsp[-4].BinaryOpVal).opcode == Instruction::Rem) + if (isa((*(yyvsp[-3].TypeVal)).get()) && (yyvsp[-4].BinaryOpVal) == Instruction::Rem) GEN_ERROR("Rem not supported on packed types!"); - sanitizeOpCode((yyvsp[-4].BinaryOpVal),*(yyvsp[-3].TypeVal)); - CHECK_FOR_ERROR; Value* val1 = getVal(*(yyvsp[-3].TypeVal), (yyvsp[-2].ValIDVal)); CHECK_FOR_ERROR Value* val2 = getVal(*(yyvsp[-3].TypeVal), (yyvsp[0].ValIDVal)); CHECK_FOR_ERROR - (yyval.InstVal) = BinaryOperator::create((yyvsp[-4].BinaryOpVal).opcode, val1, val2); + (yyval.InstVal) = BinaryOperator::create((yyvsp[-4].BinaryOpVal), val1, val2); if ((yyval.InstVal) == 0) GEN_ERROR("binary operator returned null!"); delete (yyvsp[-3].TypeVal); ;} break; - case 227: -#line 2460 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 226: +#line 2439 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { if (!(*(yyvsp[-3].TypeVal))->isIntegral()) { if (!isa((yyvsp[-3].TypeVal)->get()) || @@ -4841,15 +4823,15 @@ CHECK_FOR_ERROR Value* tmpVal2 = getVal(*(yyvsp[-3].TypeVal), (yyvsp[0].ValIDVal)); CHECK_FOR_ERROR - (yyval.InstVal) = BinaryOperator::create((yyvsp[-4].BinaryOpVal).opcode, tmpVal1, tmpVal2); + (yyval.InstVal) = BinaryOperator::create((yyvsp[-4].BinaryOpVal), tmpVal1, tmpVal2); if ((yyval.InstVal) == 0) GEN_ERROR("binary operator returned null!"); delete (yyvsp[-3].TypeVal); ;} break; - case 228: -#line 2475 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 227: +#line 2454 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { if(isa((*(yyvsp[-3].TypeVal)).get())) { GEN_ERROR( @@ -4859,15 +4841,15 @@ CHECK_FOR_ERROR Value* tmpVal2 = getVal(*(yyvsp[-3].TypeVal), (yyvsp[0].ValIDVal)); CHECK_FOR_ERROR - (yyval.InstVal) = new SetCondInst((yyvsp[-4].BinaryOpVal).opcode, tmpVal1, tmpVal2); + (yyval.InstVal) = new SetCondInst((yyvsp[-4].BinaryOpVal), tmpVal1, tmpVal2); if ((yyval.InstVal) == 0) GEN_ERROR("binary operator returned null!"); delete (yyvsp[-3].TypeVal); ;} break; - case 229: -#line 2489 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 228: +#line 2468 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { std::cerr << "WARNING: Use of eliminated 'not' instruction:" << " Replacing with 'xor'.\n"; @@ -4883,20 +4865,20 @@ ;} break; - case 230: -#line 2502 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 229: +#line 2481 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[0].ValueVal)->getType() != Type::UByteTy) GEN_ERROR("Shift amount must be ubyte!"); if (!(yyvsp[-2].ValueVal)->getType()->isInteger()) GEN_ERROR("Shift constant expression requires integer operand!"); - (yyval.InstVal) = new ShiftInst((yyvsp[-3].OtherOpVal).opcode, (yyvsp[-2].ValueVal), (yyvsp[0].ValueVal)); + (yyval.InstVal) = new ShiftInst((yyvsp[-3].OtherOpVal), (yyvsp[-2].ValueVal), (yyvsp[0].ValueVal)); CHECK_FOR_ERROR ;} break; - case 231: -#line 2510 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 230: +#line 2489 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { if (!(yyvsp[0].TypeVal)->get()->isFirstClassType()) GEN_ERROR("cast instruction to a non-primitive type: '" + @@ -4907,8 +4889,8 @@ ;} break; - case 232: -#line 2518 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 231: +#line 2497 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[-4].ValueVal)->getType() != Type::BoolTy) GEN_ERROR("select condition must be boolean!"); @@ -4919,8 +4901,8 @@ ;} break; - case 233: -#line 2526 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 232: +#line 2505 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { NewVarArgs = true; (yyval.InstVal) = new VAArgInst((yyvsp[-2].ValueVal), *(yyvsp[0].TypeVal)); @@ -4929,8 +4911,8 @@ ;} break; - case 234: -#line 2532 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 233: +#line 2511 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { ObsoleteVarArgs = true; const Type* ArgTy = (yyvsp[-2].ValueVal)->getType(); @@ -4953,8 +4935,8 @@ ;} break; - case 235: -#line 2552 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 234: +#line 2531 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { ObsoleteVarArgs = true; const Type* ArgTy = (yyvsp[-2].ValueVal)->getType(); @@ -4980,8 +4962,8 @@ ;} break; - case 236: -#line 2575 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 235: +#line 2554 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { if (!ExtractElementInst::isValidOperands((yyvsp[-2].ValueVal), (yyvsp[0].ValueVal))) GEN_ERROR("Invalid extractelement operands!"); @@ -4990,8 +4972,8 @@ ;} break; - case 237: -#line 2581 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 236: +#line 2560 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { if (!InsertElementInst::isValidOperands((yyvsp[-4].ValueVal), (yyvsp[-2].ValueVal), (yyvsp[0].ValueVal))) GEN_ERROR("Invalid insertelement operands!"); @@ -5000,8 +4982,8 @@ ;} break; - case 238: -#line 2587 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 237: +#line 2566 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { if (!ShuffleVectorInst::isValidOperands((yyvsp[-4].ValueVal), (yyvsp[-2].ValueVal), (yyvsp[0].ValueVal))) GEN_ERROR("Invalid shufflevector operands!"); @@ -5010,8 +4992,8 @@ ;} break; - case 239: -#line 2593 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 238: +#line 2572 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { const Type *Ty = (yyvsp[0].PHIList)->front().first->getType(); if (!Ty->isFirstClassType()) @@ -5029,8 +5011,8 @@ ;} break; - case 240: -#line 2608 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 239: +#line 2587 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { const PointerType *PFTy; const FunctionType *Ty; @@ -5092,48 +5074,48 @@ ;} break; - case 241: -#line 2667 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 240: +#line 2646 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.InstVal) = (yyvsp[0].InstVal); CHECK_FOR_ERROR ;} break; - case 242: -#line 2674 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 241: +#line 2653 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ValueList) = (yyvsp[0].ValueList); CHECK_FOR_ERROR ;} break; - case 243: -#line 2677 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 242: +#line 2656 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ValueList) = new std::vector(); CHECK_FOR_ERROR ;} break; - case 244: -#line 2682 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 243: +#line 2661 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = true; CHECK_FOR_ERROR ;} break; - case 245: -#line 2686 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 244: +#line 2665 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = false; CHECK_FOR_ERROR ;} break; - case 246: -#line 2693 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 245: +#line 2672 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.InstVal) = new MallocInst(*(yyvsp[-1].TypeVal), 0, (yyvsp[0].UIntVal)); delete (yyvsp[-1].TypeVal); @@ -5141,8 +5123,8 @@ ;} break; - case 247: -#line 2698 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 246: +#line 2677 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { Value* tmpVal = getVal((yyvsp[-2].PrimType), (yyvsp[-1].ValIDVal)); CHECK_FOR_ERROR @@ -5151,8 +5133,8 @@ ;} break; - case 248: -#line 2704 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 247: +#line 2683 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.InstVal) = new AllocaInst(*(yyvsp[-1].TypeVal), 0, (yyvsp[0].UIntVal)); delete (yyvsp[-1].TypeVal); @@ -5160,8 +5142,8 @@ ;} break; - case 249: -#line 2709 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 248: +#line 2688 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { Value* tmpVal = getVal((yyvsp[-2].PrimType), (yyvsp[-1].ValIDVal)); CHECK_FOR_ERROR @@ -5170,8 +5152,8 @@ ;} break; - case 250: -#line 2715 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 249: +#line 2694 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { if (!isa((yyvsp[0].ValueVal)->getType())) GEN_ERROR("Trying to free nonpointer type " + @@ -5181,8 +5163,8 @@ ;} break; - case 251: -#line 2723 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 250: +#line 2702 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { if (!isa((yyvsp[-1].TypeVal)->get())) GEN_ERROR("Can't load from nonpointer type: " + @@ -5197,8 +5179,8 @@ ;} break; - case 252: -#line 2735 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 251: +#line 2714 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { const PointerType *PT = dyn_cast((yyvsp[-1].TypeVal)->get()); if (!PT) @@ -5216,8 +5198,8 @@ ;} break; - case 253: -#line 2750 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" + case 252: +#line 2729 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" { if (!isa((yyvsp[-2].TypeVal)->get())) GEN_ERROR("getelementptr insn requires pointer operand!"); @@ -5249,7 +5231,7 @@ } /* Line 1126 of yacc.c. */ -#line 5253 "llvmAsmParser.tab.c" +#line 5235 "llvmAsmParser.tab.c" yyvsp -= yylen; yyssp -= yylen; @@ -5517,7 +5499,7 @@ } -#line 2776 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" +#line 2755 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" void llvm::GenerateError(const std::string &message, int LineNo) { Index: llvm/lib/AsmParser/llvmAsmParser.h.cvs diff -u llvm/lib/AsmParser/llvmAsmParser.h.cvs:1.13.2.2 llvm/lib/AsmParser/llvmAsmParser.h.cvs:1.13.2.3 --- llvm/lib/AsmParser/llvmAsmParser.h.cvs:1.13.2.2 Thu Oct 19 14:22:56 2006 +++ llvm/lib/AsmParser/llvmAsmParser.h.cvs Thu Oct 19 19:34:43 2006 @@ -107,35 +107,34 @@ ADD = 333, SUB = 334, MUL = 335, - UDIV = 336, - SDIV = 337, - REM = 338, - AND = 339, - OR = 340, - XOR = 341, - SETLE = 342, - SETGE = 343, - SETLT = 344, - SETGT = 345, - SETEQ = 346, - SETNE = 347, - MALLOC = 348, - ALLOCA = 349, - FREE = 350, - LOAD = 351, - STORE = 352, - GETELEMENTPTR = 353, - PHI_TOK = 354, - CAST = 355, - SELECT = 356, - SHL = 357, - SHR = 358, - VAARG = 359, - EXTRACTELEMENT = 360, - INSERTELEMENT = 361, - SHUFFLEVECTOR = 362, - VAARG_old = 363, - VANEXT_old = 364 + DIV = 336, + REM = 337, + AND = 338, + OR = 339, + XOR = 340, + SETLE = 341, + SETGE = 342, + SETLT = 343, + SETGT = 344, + SETEQ = 345, + SETNE = 346, + MALLOC = 347, + ALLOCA = 348, + FREE = 349, + LOAD = 350, + STORE = 351, + GETELEMENTPTR = 352, + PHI_TOK = 353, + CAST = 354, + SELECT = 355, + SHL = 356, + SHR = 357, + VAARG = 358, + EXTRACTELEMENT = 359, + INSERTELEMENT = 360, + SHUFFLEVECTOR = 361, + VAARG_old = 362, + VANEXT_old = 363 }; #endif /* Tokens. */ @@ -217,41 +216,40 @@ #define ADD 333 #define SUB 334 #define MUL 335 -#define UDIV 336 -#define SDIV 337 -#define REM 338 -#define AND 339 -#define OR 340 -#define XOR 341 -#define SETLE 342 -#define SETGE 343 -#define SETLT 344 -#define SETGT 345 -#define SETEQ 346 -#define SETNE 347 -#define MALLOC 348 -#define ALLOCA 349 -#define FREE 350 -#define LOAD 351 -#define STORE 352 -#define GETELEMENTPTR 353 -#define PHI_TOK 354 -#define CAST 355 -#define SELECT 356 -#define SHL 357 -#define SHR 358 -#define VAARG 359 -#define EXTRACTELEMENT 360 -#define INSERTELEMENT 361 -#define SHUFFLEVECTOR 362 -#define VAARG_old 363 -#define VANEXT_old 364 +#define DIV 336 +#define REM 337 +#define AND 338 +#define OR 339 +#define XOR 340 +#define SETLE 341 +#define SETGE 342 +#define SETLT 343 +#define SETGT 344 +#define SETEQ 345 +#define SETNE 346 +#define MALLOC 347 +#define ALLOCA 348 +#define FREE 349 +#define LOAD 350 +#define STORE 351 +#define GETELEMENTPTR 352 +#define PHI_TOK 353 +#define CAST 354 +#define SELECT 355 +#define SHL 356 +#define SHR 357 +#define VAARG 358 +#define EXTRACTELEMENT 359 +#define INSERTELEMENT 360 +#define SHUFFLEVECTOR 361 +#define VAARG_old 362 +#define VANEXT_old 363 #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) -#line 991 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" +#line 974 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" typedef union YYSTYPE { llvm::Module *ModuleVal; llvm::Function *FunctionVal; @@ -285,14 +283,14 @@ char *StrVal; // This memory is strdup'd! llvm::ValID ValIDVal; // strdup'd memory maybe! - BinaryOpInfo BinaryOpVal; - TermOpInfo TermOpVal; - MemOpInfo MemOpVal; - OtherOpInfo OtherOpVal; - llvm::Module::Endianness Endianness; + llvm::Instruction::BinaryOps BinaryOpVal; + llvm::Instruction::TermOps TermOpVal; + llvm::Instruction::MemoryOps MemOpVal; + llvm::Instruction::OtherOps OtherOpVal; + llvm::Module::Endianness Endianness; } YYSTYPE; /* Line 1447 of yacc.c. */ -#line 296 "llvmAsmParser.tab.h" +#line 294 "llvmAsmParser.tab.h" # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 # define YYSTYPE_IS_TRIVIAL 1 Index: llvm/lib/AsmParser/llvmAsmParser.y diff -u llvm/lib/AsmParser/llvmAsmParser.y:1.266.2.2 llvm/lib/AsmParser/llvmAsmParser.y:1.266.2.3 --- llvm/lib/AsmParser/llvmAsmParser.y:1.266.2.2 Thu Oct 19 14:16:00 2006 +++ llvm/lib/AsmParser/llvmAsmParser.y Thu Oct 19 19:34:43 2006 @@ -813,23 +813,6 @@ return Ty; } -// This function is -template -static void sanitizeOpCode(OpcodeInfo &OI, const PATypeHolder& Ty) { - if (OI.obsolete) { - switch (OI.opcode) { - default: - GenerateError("Invalid Obsolete OpCode"); - break; - case Instruction::UDiv: - if (Ty->isSigned()) - OI.opcode = Instruction::SDiv; - break; - } - OI.obsolete = false; - } -} - // common code from the two 'RunVMAsmParser' functions static Module* RunParser(Module * M) { @@ -1021,11 +1004,11 @@ char *StrVal; // This memory is strdup'd! llvm::ValID ValIDVal; // strdup'd memory maybe! - BinaryOpInfo BinaryOpVal; - TermOpInfo TermOpVal; - MemOpInfo MemOpVal; - OtherOpInfo OtherOpVal; - llvm::Module::Endianness Endianness; + llvm::Instruction::BinaryOps BinaryOpVal; + llvm::Instruction::TermOps TermOpVal; + llvm::Instruction::MemoryOps MemOpVal; + llvm::Instruction::OtherOps OtherOpVal; + llvm::Module::Endianness Endianness; } %type Module FunctionList @@ -1093,8 +1076,8 @@ // Binary Operators %type ArithmeticOps LogicalOps SetCondOps // Binops Subcatagories -%token ADD SUB MUL UDIV SDIV REM AND OR XOR -%token SETLE SETGE SETLT SETGT SETEQ SETNE // Binary Comparators +%token ADD SUB MUL DIV REM AND OR XOR +%token SETLE SETGE SETLT SETGT SETEQ SETNE // Binary Comarators // Memory Instructions %token MALLOC ALLOCA FREE LOAD STORE GETELEMENTPTR @@ -1131,7 +1114,7 @@ // Operations that are notably excluded from this list include: // RET, BR, & SWITCH because they end basic blocks and are treated specially. // -ArithmeticOps: ADD | SUB | MUL | UDIV | SDIV | REM ; +ArithmeticOps: ADD | SUB | MUL | DIV | REM; LogicalOps : AND | OR | XOR; SetCondOps : SETLE | SETGE | SETLT | SETGT | SETEQ | SETNE; @@ -1659,14 +1642,12 @@ | ArithmeticOps '(' ConstVal ',' ConstVal ')' { if ($3->getType() != $5->getType()) GEN_ERROR("Binary operator types must match!"); - sanitizeOpCode($1,$3->getType()); - CHECK_FOR_ERROR; // HACK: llvm 1.3 and earlier used to emit invalid pointer constant exprs. // To retain backward compatibility with these early compilers, we emit a // cast to the appropriate integer type automatically if we are in the // broken case. See PR424 for more information. if (!isa($3->getType())) { - $$ = ConstantExpr::get($1.opcode, $3, $5); + $$ = ConstantExpr::get($1, $3, $5); } else { const Type *IntPtrTy = 0; switch (CurModule.CurrentModule->getPointerSize()) { @@ -1674,7 +1655,7 @@ case Module::Pointer64: IntPtrTy = Type::LongTy; break; default: GEN_ERROR("invalid pointer binary constant expr!"); } - $$ = ConstantExpr::get($1.opcode, ConstantExpr::getCast($3, IntPtrTy), + $$ = ConstantExpr::get($1, ConstantExpr::getCast($3, IntPtrTy), ConstantExpr::getCast($5, IntPtrTy)); $$ = ConstantExpr::getCast($$, $3->getType()); } @@ -1688,13 +1669,13 @@ !cast($3->getType())->getElementType()->isIntegral()) GEN_ERROR("Logical operator requires integral operands!"); } - $$ = ConstantExpr::get($1.opcode, $3, $5); + $$ = ConstantExpr::get($1, $3, $5); CHECK_FOR_ERROR } | SetCondOps '(' ConstVal ',' ConstVal ')' { if ($3->getType() != $5->getType()) GEN_ERROR("setcc operand types must match!"); - $$ = ConstantExpr::get($1.opcode, $3, $5); + $$ = ConstantExpr::get($1, $3, $5); CHECK_FOR_ERROR } | ShiftOps '(' ConstVal ',' ConstVal ')' { @@ -1702,7 +1683,7 @@ GEN_ERROR("Shift count for shift constant must be unsigned byte!"); if (!$3->getType()->isInteger()) GEN_ERROR("Shift constant expression requires integer operand!"); - $$ = ConstantExpr::get($1.opcode, $3, $5); + $$ = ConstantExpr::get($1, $3, $5); CHECK_FOR_ERROR } | EXTRACTELEMENT '(' ConstVal ',' ConstVal ')' { @@ -2444,15 +2425,13 @@ !isa((*$2).get())) GEN_ERROR( "Arithmetic operator requires integer, FP, or packed operands!"); - if (isa((*$2).get()) && $1.opcode == Instruction::Rem) + if (isa((*$2).get()) && $1 == Instruction::Rem) GEN_ERROR("Rem not supported on packed types!"); - sanitizeOpCode($1,*$2); - CHECK_FOR_ERROR; Value* val1 = getVal(*$2, $3); CHECK_FOR_ERROR Value* val2 = getVal(*$2, $5); CHECK_FOR_ERROR - $$ = BinaryOperator::create($1.opcode, val1, val2); + $$ = BinaryOperator::create($1, val1, val2); if ($$ == 0) GEN_ERROR("binary operator returned null!"); delete $2; @@ -2467,7 +2446,7 @@ CHECK_FOR_ERROR Value* tmpVal2 = getVal(*$2, $5); CHECK_FOR_ERROR - $$ = BinaryOperator::create($1.opcode, tmpVal1, tmpVal2); + $$ = BinaryOperator::create($1, tmpVal1, tmpVal2); if ($$ == 0) GEN_ERROR("binary operator returned null!"); delete $2; @@ -2481,7 +2460,7 @@ CHECK_FOR_ERROR Value* tmpVal2 = getVal(*$2, $5); CHECK_FOR_ERROR - $$ = new SetCondInst($1.opcode, tmpVal1, tmpVal2); + $$ = new SetCondInst($1, tmpVal1, tmpVal2); if ($$ == 0) GEN_ERROR("binary operator returned null!"); delete $2; @@ -2504,7 +2483,7 @@ GEN_ERROR("Shift amount must be ubyte!"); if (!$2->getType()->isInteger()) GEN_ERROR("Shift constant expression requires integer operand!"); - $$ = new ShiftInst($1.opcode, $2, $4); + $$ = new ShiftInst($1, $2, $4); CHECK_FOR_ERROR } | CAST ResolvedVal TO Types { Index: llvm/lib/AsmParser/llvmAsmParser.y.cvs diff -u llvm/lib/AsmParser/llvmAsmParser.y.cvs:1.18.2.2 llvm/lib/AsmParser/llvmAsmParser.y.cvs:1.18.2.3 --- llvm/lib/AsmParser/llvmAsmParser.y.cvs:1.18.2.2 Thu Oct 19 14:22:56 2006 +++ llvm/lib/AsmParser/llvmAsmParser.y.cvs Thu Oct 19 19:34:43 2006 @@ -813,23 +813,6 @@ return Ty; } -// This function is -template -static void sanitizeOpCode(OpcodeInfo &OI, const PATypeHolder& Ty) { - if (OI.obsolete) { - switch (OI.opcode) { - default: - GenerateError("Invalid Obsolete OpCode"); - break; - case Instruction::UDiv: - if (Ty->isSigned()) - OI.opcode = Instruction::SDiv; - break; - } - OI.obsolete = false; - } -} - // common code from the two 'RunVMAsmParser' functions static Module* RunParser(Module * M) { @@ -1021,11 +1004,11 @@ char *StrVal; // This memory is strdup'd! llvm::ValID ValIDVal; // strdup'd memory maybe! - BinaryOpInfo BinaryOpVal; - TermOpInfo TermOpVal; - MemOpInfo MemOpVal; - OtherOpInfo OtherOpVal; - llvm::Module::Endianness Endianness; + llvm::Instruction::BinaryOps BinaryOpVal; + llvm::Instruction::TermOps TermOpVal; + llvm::Instruction::MemoryOps MemOpVal; + llvm::Instruction::OtherOps OtherOpVal; + llvm::Module::Endianness Endianness; } %type Module FunctionList @@ -1093,8 +1076,8 @@ // Binary Operators %type ArithmeticOps LogicalOps SetCondOps // Binops Subcatagories -%token ADD SUB MUL UDIV SDIV REM AND OR XOR -%token SETLE SETGE SETLT SETGT SETEQ SETNE // Binary Comparators +%token ADD SUB MUL DIV REM AND OR XOR +%token SETLE SETGE SETLT SETGT SETEQ SETNE // Binary Comarators // Memory Instructions %token MALLOC ALLOCA FREE LOAD STORE GETELEMENTPTR @@ -1131,7 +1114,7 @@ // Operations that are notably excluded from this list include: // RET, BR, & SWITCH because they end basic blocks and are treated specially. // -ArithmeticOps: ADD | SUB | MUL | UDIV | SDIV | REM ; +ArithmeticOps: ADD | SUB | MUL | DIV | REM; LogicalOps : AND | OR | XOR; SetCondOps : SETLE | SETGE | SETLT | SETGT | SETEQ | SETNE; @@ -1659,14 +1642,12 @@ | ArithmeticOps '(' ConstVal ',' ConstVal ')' { if ($3->getType() != $5->getType()) GEN_ERROR("Binary operator types must match!"); - sanitizeOpCode($1,$3->getType()); - CHECK_FOR_ERROR; // HACK: llvm 1.3 and earlier used to emit invalid pointer constant exprs. // To retain backward compatibility with these early compilers, we emit a // cast to the appropriate integer type automatically if we are in the // broken case. See PR424 for more information. if (!isa($3->getType())) { - $$ = ConstantExpr::get($1.opcode, $3, $5); + $$ = ConstantExpr::get($1, $3, $5); } else { const Type *IntPtrTy = 0; switch (CurModule.CurrentModule->getPointerSize()) { @@ -1674,7 +1655,7 @@ case Module::Pointer64: IntPtrTy = Type::LongTy; break; default: GEN_ERROR("invalid pointer binary constant expr!"); } - $$ = ConstantExpr::get($1.opcode, ConstantExpr::getCast($3, IntPtrTy), + $$ = ConstantExpr::get($1, ConstantExpr::getCast($3, IntPtrTy), ConstantExpr::getCast($5, IntPtrTy)); $$ = ConstantExpr::getCast($$, $3->getType()); } @@ -1688,13 +1669,13 @@ !cast($3->getType())->getElementType()->isIntegral()) GEN_ERROR("Logical operator requires integral operands!"); } - $$ = ConstantExpr::get($1.opcode, $3, $5); + $$ = ConstantExpr::get($1, $3, $5); CHECK_FOR_ERROR } | SetCondOps '(' ConstVal ',' ConstVal ')' { if ($3->getType() != $5->getType()) GEN_ERROR("setcc operand types must match!"); - $$ = ConstantExpr::get($1.opcode, $3, $5); + $$ = ConstantExpr::get($1, $3, $5); CHECK_FOR_ERROR } | ShiftOps '(' ConstVal ',' ConstVal ')' { @@ -1702,7 +1683,7 @@ GEN_ERROR("Shift count for shift constant must be unsigned byte!"); if (!$3->getType()->isInteger()) GEN_ERROR("Shift constant expression requires integer operand!"); - $$ = ConstantExpr::get($1.opcode, $3, $5); + $$ = ConstantExpr::get($1, $3, $5); CHECK_FOR_ERROR } | EXTRACTELEMENT '(' ConstVal ',' ConstVal ')' { @@ -2444,15 +2425,13 @@ !isa((*$2).get())) GEN_ERROR( "Arithmetic operator requires integer, FP, or packed operands!"); - if (isa((*$2).get()) && $1.opcode == Instruction::Rem) + if (isa((*$2).get()) && $1 == Instruction::Rem) GEN_ERROR("Rem not supported on packed types!"); - sanitizeOpCode($1,*$2); - CHECK_FOR_ERROR; Value* val1 = getVal(*$2, $3); CHECK_FOR_ERROR Value* val2 = getVal(*$2, $5); CHECK_FOR_ERROR - $$ = BinaryOperator::create($1.opcode, val1, val2); + $$ = BinaryOperator::create($1, val1, val2); if ($$ == 0) GEN_ERROR("binary operator returned null!"); delete $2; @@ -2467,7 +2446,7 @@ CHECK_FOR_ERROR Value* tmpVal2 = getVal(*$2, $5); CHECK_FOR_ERROR - $$ = BinaryOperator::create($1.opcode, tmpVal1, tmpVal2); + $$ = BinaryOperator::create($1, tmpVal1, tmpVal2); if ($$ == 0) GEN_ERROR("binary operator returned null!"); delete $2; @@ -2481,7 +2460,7 @@ CHECK_FOR_ERROR Value* tmpVal2 = getVal(*$2, $5); CHECK_FOR_ERROR - $$ = new SetCondInst($1.opcode, tmpVal1, tmpVal2); + $$ = new SetCondInst($1, tmpVal1, tmpVal2); if ($$ == 0) GEN_ERROR("binary operator returned null!"); delete $2; @@ -2504,7 +2483,7 @@ GEN_ERROR("Shift amount must be ubyte!"); if (!$2->getType()->isInteger()) GEN_ERROR("Shift constant expression requires integer operand!"); - $$ = new ShiftInst($1.opcode, $2, $4); + $$ = new ShiftInst($1, $2, $4); CHECK_FOR_ERROR } | CAST ResolvedVal TO Types { From sabre at nondot.org Thu Oct 19 19:41:45 2006 From: sabre at nondot.org (Chris Lattner) Date: Thu, 19 Oct 2006 19:41:45 -0500 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/SimplifyCFG/2006-10-19-UncondDiv.ll Message-ID: <200610200041.k9K0fjM4001814@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/SimplifyCFG: 2006-10-19-UncondDiv.ll added (r1.1) --- Log message: new testcase for PR957: http://llvm.org/PR957 --- Diffs of the changes: (+35 -0) 2006-10-19-UncondDiv.ll | 35 +++++++++++++++++++++++++++++++++++ 1 files changed, 35 insertions(+) Index: llvm/test/Regression/Transforms/SimplifyCFG/2006-10-19-UncondDiv.ll diff -c /dev/null llvm/test/Regression/Transforms/SimplifyCFG/2006-10-19-UncondDiv.ll:1.1 *** /dev/null Thu Oct 19 19:41:41 2006 --- llvm/test/Regression/Transforms/SimplifyCFG/2006-10-19-UncondDiv.ll Thu Oct 19 19:41:31 2006 *************** *** 0 **** --- 1,35 ---- + ; RUN: llvm-as < %s | opt -simplifycfg -disable-output && + ; RUN: llvm-as < %s | opt -simplifycfg | llvm-dis | not grep select + + ; PR957 + + uint %test(uint %tmp) { + cond_false179: ; preds = %cond_true + %tmp181 = seteq uint %tmp, 0 ; [#uses=1] + br bool %tmp181, label %cond_true182, label %cond_next185 + + cond_true182: ; preds = %cond_false179 + br label %cond_next185 + + cond_next185: ; preds = %cond_true182, %cond_false179 + %d0.3 = phi uint [ div (uint 1, uint 0), %cond_true182 ], [ %tmp, + %cond_false179 ] ; [#uses=7] + + ret uint %d0.3 + } + + uint %test2(uint %tmp) { + cond_false179: ; preds = %cond_true + %tmp181 = seteq uint %tmp, 0 ; [#uses=1] + br bool %tmp181, label %cond_true182, label %cond_next185 + + cond_true182: ; preds = %cond_false179 + br label %cond_next185 + + cond_next185: ; preds = %cond_true182, %cond_false179 + %d0.3 = phi uint [ div (uint 1, uint 0), %cond_true182 ], [ %tmp, + %cond_false179 ] ; [#uses=7] + call uint %test(uint 4) + ret uint %d0.3 + } + From sabre at nondot.org Thu Oct 19 19:42:21 2006 From: sabre at nondot.org (Chris Lattner) Date: Thu, 19 Oct 2006 19:42:21 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Utils/SimplifyCFG.cpp Message-ID: <200610200042.k9K0gLIu001862@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Utils: SimplifyCFG.cpp updated: 1.99 -> 1.100 --- Log message: Fix SimplifyCFG/2006-10-19-UncondDiv.ll by disabling a bad xform. --- Diffs of the changes: (+39 -22) SimplifyCFG.cpp | 61 +++++++++++++++++++++++++++++++++++--------------------- 1 files changed, 39 insertions(+), 22 deletions(-) Index: llvm/lib/Transforms/Utils/SimplifyCFG.cpp diff -u llvm/lib/Transforms/Utils/SimplifyCFG.cpp:1.99 llvm/lib/Transforms/Utils/SimplifyCFG.cpp:1.100 --- llvm/lib/Transforms/Utils/SimplifyCFG.cpp:1.99 Thu Aug 3 16:40:24 2006 +++ llvm/lib/Transforms/Utils/SimplifyCFG.cpp Thu Oct 19 19:42:07 2006 @@ -323,7 +323,14 @@ static bool DominatesMergePoint(Value *V, BasicBlock *BB, std::set *AggressiveInsts) { Instruction *I = dyn_cast(V); - if (!I) return true; // Non-instructions all dominate instructions. + if (!I) { + // Non-instructions all dominate instructions, but not all constantexprs + // can be executed unconditionally. + if (ConstantExpr *C = dyn_cast(V)) + if (C->canTrap()) + return false; + return true; + } BasicBlock *PBB = I->getParent(); // We don't want to allow weird loops that might have the "if condition" in @@ -1297,28 +1304,38 @@ if (FVPN->getParent() == FalseSucc) FalseValue = FVPN->getIncomingValueForBlock(BI->getParent()); - TrueSucc->removePredecessor(BI->getParent()); - FalseSucc->removePredecessor(BI->getParent()); + // In order for this transformation to be safe, we must be able to + // unconditionally execute both operands to the return. This is + // normally the case, but we could have a potentially-trapping + // constant expression that prevents this transformation from being + // safe. + if ((!isa(TrueValue) || + !cast(TrueValue)->canTrap()) && + (!isa(TrueValue) || + !cast(TrueValue)->canTrap())) { + TrueSucc->removePredecessor(BI->getParent()); + FalseSucc->removePredecessor(BI->getParent()); - // Insert a new select instruction. - Value *NewRetVal; - Value *BrCond = BI->getCondition(); - if (TrueValue != FalseValue) - NewRetVal = new SelectInst(BrCond, TrueValue, - FalseValue, "retval", BI); - else - NewRetVal = TrueValue; - - DEBUG(std::cerr << "\nCHANGING BRANCH TO TWO RETURNS INTO SELECT:" - << "\n " << *BI << "Select = " << *NewRetVal - << "TRUEBLOCK: " << *TrueSucc << "FALSEBLOCK: "<< *FalseSucc); - - new ReturnInst(NewRetVal, BI); - BI->eraseFromParent(); - if (Instruction *BrCondI = dyn_cast(BrCond)) - if (isInstructionTriviallyDead(BrCondI)) - BrCondI->eraseFromParent(); - return true; + // Insert a new select instruction. + Value *NewRetVal; + Value *BrCond = BI->getCondition(); + if (TrueValue != FalseValue) + NewRetVal = new SelectInst(BrCond, TrueValue, + FalseValue, "retval", BI); + else + NewRetVal = TrueValue; + + DEBUG(std::cerr << "\nCHANGING BRANCH TO TWO RETURNS INTO SELECT:" + << "\n " << *BI << "Select = " << *NewRetVal + << "TRUEBLOCK: " << *TrueSucc << "FALSEBLOCK: "<< *FalseSucc); + + new ReturnInst(NewRetVal, BI); + BI->eraseFromParent(); + if (Instruction *BrCondI = dyn_cast(BrCond)) + if (isInstructionTriviallyDead(BrCondI)) + BrCondI->eraseFromParent(); + return true; + } } } } From reid at x10sys.com Thu Oct 19 19:43:32 2006 From: reid at x10sys.com (Reid Spencer) Date: Thu, 19 Oct 2006 19:43:32 -0500 Subject: [llvm-commits] [SignlessTypes] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Message-ID: <200610200043.k9K0hWeI001890@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/SelectionDAG: SelectionDAGISel.cpp updated: 1.289.2.2 -> 1.289.2.3 --- Log message: Remove an un-needed test. --- Diffs of the changes: (+20 -21) SelectionDAGISel.cpp | 41 ++++++++++++++++++++--------------------- 1 files changed, 20 insertions(+), 21 deletions(-) Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.289.2.2 llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.289.2.3 --- llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.289.2.2 Thu Oct 19 19:34:43 2006 +++ llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Thu Oct 19 19:43:17 2006 @@ -236,27 +236,26 @@ Function::iterator BB = Fn.begin(), EB = Fn.end(); for (BasicBlock::iterator I = BB->begin(), E = BB->end(); I != E; ++I) if (AllocaInst *AI = dyn_cast(I)) - if (ConstantInt *CUI = dyn_cast(AI->getArraySize())) - if (CUI->getType()->isUnsigned()) { - const Type *Ty = AI->getAllocatedType(); - uint64_t TySize = TLI.getTargetData()->getTypeSize(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), round up to the size of the value for potentially - // better performance. - // - // FIXME: This could be made better with a preferred alignment hook in - // TargetData. It serves primarily to 8-byte align doubles for X86. - if (Align < TySize && TySize <= 8) Align = TySize; - TySize *= CUI->getZExtValue(); // Get total allocated size. - if (TySize == 0) TySize = 1; // Don't create zero-sized stack objects. - StaticAllocaMap[AI] = - MF.getFrameInfo()->CreateStackObject((unsigned)TySize, Align); - } + if (ConstantInt *CUI = dyn_cast(AI->getArraySize())) { + const Type *Ty = AI->getAllocatedType(); + uint64_t TySize = TLI.getTargetData()->getTypeSize(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), round up to the size of the value for potentially + // better performance. + // + // FIXME: This could be made better with a preferred alignment hook in + // TargetData. It serves primarily to 8-byte align doubles for X86. + if (Align < TySize && TySize <= 8) Align = TySize; + TySize *= CUI->getZExtValue(); // Get total allocated size. + if (TySize == 0) TySize = 1; // Don't create zero-sized stack objects. + StaticAllocaMap[AI] = + MF.getFrameInfo()->CreateStackObject((unsigned)TySize, Align); + } for (; BB != EB; ++BB) for (BasicBlock::iterator I = BB->begin(), E = BB->end(); I != E; ++I) From dpatel at apple.com Thu Oct 19 20:17:10 2006 From: dpatel at apple.com (Devang Patel) Date: Thu, 19 Oct 2006 20:17:10 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp Message-ID: <200610200117.k9K1HAXm002643@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: InstructionCombining.cpp updated: 1.524 -> 1.525 --- Log message: While creating mask, use 1ULL instead of 1. --- 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.524 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.525 --- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.524 Thu Oct 19 15:59:13 2006 +++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp Thu Oct 19 20:16:56 2006 @@ -5595,7 +5595,7 @@ unsigned SrcBitSize = Src->getType()->getPrimitiveSizeInBits(); unsigned DestBitSize = CI.getType()->getPrimitiveSizeInBits(); assert(SrcBitSize < DestBitSize && "Not a zext?"); - Constant *C = ConstantUInt::get(Type::ULongTy, (1 << SrcBitSize)-1); + Constant *C = ConstantUInt::get(Type::ULongTy, (1ULL << SrcBitSize)-1); C = ConstantExpr::getCast(C, CI.getType()); return BinaryOperator::createAnd(Res, C); } From reid at x10sys.com Thu Oct 19 20:17:35 2006 From: reid at x10sys.com (Reid Spencer) Date: Thu, 19 Oct 2006 20:17:35 -0500 Subject: [llvm-commits] [SignlessTypes] CVS: llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp Message-ID: <200610200117.k9K1HZ4x002659@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/ARM: ARMISelDAGToDAG.cpp updated: 1.74.2.1 -> 1.74.2.2 --- Log message: Get rid of useless call. --- Diffs of the changes: (+1 -2) ARMISelDAGToDAG.cpp | 3 +-- 1 files changed, 1 insertion(+), 2 deletions(-) Index: llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp diff -u llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp:1.74.2.1 llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp:1.74.2.2 --- llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp:1.74.2.1 Wed Oct 18 22:57:56 2006 +++ llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp Thu Oct 19 20:17:20 2006 @@ -805,8 +805,7 @@ case ISD::Constant: { uint32_t val = cast(N)->getValue(); if(!isRotInt8Immediate(val)) { - const Type *t = MVT::getTypeForValueType(MVT::i32); - Constant *C = ConstantInt::get(t, val); + Constant *C = ConstantInt::get(Type::UIntTy, val); int alignment = 2; SDOperand Addr = CurDAG->getTargetConstantPool(C, MVT::i32, alignment); SDOperand Z = CurDAG->getTargetConstant(0, MVT::i32); From reid at x10sys.com Thu Oct 19 23:27:42 2006 From: reid at x10sys.com (Reid Spencer) Date: Thu, 19 Oct 2006 23:27:42 -0500 Subject: [llvm-commits] [SignlessTypes] CVS: llvm/lib/VMCore/ConstantFolding.cpp Constants.cpp Instruction.cpp Instructions.cpp Message-ID: <200610200427.k9K4RgCE006102@zion.cs.uiuc.edu> Changes in directory llvm/lib/VMCore: ConstantFolding.cpp updated: 1.93.2.3 -> 1.93.2.4 Constants.cpp updated: 1.163.2.3 -> 1.163.2.4 Instruction.cpp updated: 1.53.2.2 -> 1.53.2.3 Instructions.cpp updated: 1.42.2.3 -> 1.42.2.4 --- Log message: Initial patch for DIV -> SDIV/UDIV --- Diffs of the changes: (+64 -28) ConstantFolding.cpp | 75 ++++++++++++++++++++++++++++++++++++---------------- Constants.cpp | 9 ++++-- Instruction.cpp | 6 ++-- Instructions.cpp | 2 - 4 files changed, 64 insertions(+), 28 deletions(-) Index: llvm/lib/VMCore/ConstantFolding.cpp diff -u llvm/lib/VMCore/ConstantFolding.cpp:1.93.2.3 llvm/lib/VMCore/ConstantFolding.cpp:1.93.2.4 --- llvm/lib/VMCore/ConstantFolding.cpp:1.93.2.3 Thu Oct 19 19:34:44 2006 +++ llvm/lib/VMCore/ConstantFolding.cpp Thu Oct 19 23:27:18 2006 @@ -40,7 +40,8 @@ virtual Constant *add(const Constant *V1, const Constant *V2) const = 0; virtual Constant *sub(const Constant *V1, const Constant *V2) const = 0; virtual Constant *mul(const Constant *V1, const Constant *V2) const = 0; - virtual Constant *div(const Constant *V1, const Constant *V2) const = 0; + virtual Constant *udiv(const Constant *V1, const Constant *V2) const = 0; + virtual Constant *sdiv(const Constant *V1, const Constant *V2) const = 0; virtual Constant *rem(const Constant *V1, const Constant *V2) const = 0; virtual Constant *op_and(const Constant *V1, const Constant *V2) const = 0; virtual Constant *op_or (const Constant *V1, const Constant *V2) const = 0; @@ -106,8 +107,11 @@ virtual Constant *mul(const Constant *V1, const Constant *V2) const { return SubClassName::Mul((const ArgType *)V1, (const ArgType *)V2); } - virtual Constant *div(const Constant *V1, const Constant *V2) const { - return SubClassName::Div((const ArgType *)V1, (const ArgType *)V2); + virtual Constant *udiv(const Constant *V1, const Constant *V2) const { + return SubClassName::UDiv((const ArgType *)V1, (const ArgType *)V2); + } + virtual Constant *sdiv(const Constant *V1, const Constant *V2) const { + return SubClassName::SDiv((const ArgType *)V1, (const ArgType *)V2); } virtual Constant *rem(const Constant *V1, const Constant *V2) const { return SubClassName::Rem((const ArgType *)V1, (const ArgType *)V2); @@ -178,16 +182,17 @@ // Default "noop" implementations //===--------------------------------------------------------------------===// - static Constant *Add(const ArgType *V1, const ArgType *V2) { return 0; } - static Constant *Sub(const ArgType *V1, const ArgType *V2) { return 0; } - static Constant *Mul(const ArgType *V1, const ArgType *V2) { return 0; } - static Constant *Div(const ArgType *V1, const ArgType *V2) { return 0; } - static Constant *Rem(const ArgType *V1, const ArgType *V2) { return 0; } - static Constant *And(const ArgType *V1, const ArgType *V2) { return 0; } - static Constant *Or (const ArgType *V1, const ArgType *V2) { return 0; } - static Constant *Xor(const ArgType *V1, const ArgType *V2) { return 0; } - static Constant *Shl(const ArgType *V1, const ArgType *V2) { return 0; } - static Constant *Shr(const ArgType *V1, const ArgType *V2) { return 0; } + static Constant *Add (const ArgType *V1, const ArgType *V2) { return 0; } + static Constant *Sub (const ArgType *V1, const ArgType *V2) { return 0; } + static Constant *Mul (const ArgType *V1, const ArgType *V2) { return 0; } + static Constant *SDiv(const ArgType *V1, const ArgType *V2) { return 0; } + static Constant *UDiv(const ArgType *V1, const ArgType *V2) { return 0; } + static Constant *Rem (const ArgType *V1, const ArgType *V2) { return 0; } + static Constant *And (const ArgType *V1, const ArgType *V2) { return 0; } + static Constant *Or (const ArgType *V1, const ArgType *V2) { return 0; } + static Constant *Xor (const ArgType *V1, const ArgType *V2) { return 0; } + static Constant *Shl (const ArgType *V1, const ArgType *V2) { return 0; } + static Constant *Shr (const ArgType *V1, const ArgType *V2) { return 0; } static Constant *LessThan(const ArgType *V1, const ArgType *V2) { return 0; } @@ -373,8 +378,11 @@ static Constant *Mul(const ConstantPacked *V1, const ConstantPacked *V2) { return EvalVectorOp(V1, V2, ConstantExpr::getMul); } - static Constant *Div(const ConstantPacked *V1, const ConstantPacked *V2) { - return EvalVectorOp(V1, V2, ConstantExpr::getDiv); + static Constant *UDiv(const ConstantPacked *V1, const ConstantPacked *V2) { + return EvalVectorOp(V1, V2, ConstantExpr::getUDiv); + } + static Constant *SDiv(const ConstantPacked *V1, const ConstantPacked *V2) { + return EvalVectorOp(V1, V2, ConstantExpr::getSDiv); } static Constant *Rem(const ConstantPacked *V1, const ConstantPacked *V2) { return EvalVectorOp(V1, V2, ConstantExpr::getRem); @@ -493,8 +501,20 @@ DEF_CAST(Double, ConstantFP , double) #undef DEF_CAST - static Constant *Div(const ConstantInt *V1, const ConstantInt *V2) { - if (V2->isNullValue()) return 0; + static Constant *UDiv(const ConstantInt *V1, const ConstantInt *V2) { + if (V2->isNullValue()) + return 0; + if (V2->isAllOnesValue() && // MIN_INT / -1 + (BuiltinType)V1->getRawValue() == -(BuiltinType)V1->getRawValue()) + return 0; + BuiltinType R = + (BuiltinType)V1->getRawValue() / (BuiltinType)V2->getRawValue(); + return ConstantInt::get(*Ty, R); + } + + static Constant *SDiv(const ConstantInt *V1, const ConstantInt *V2) { + if (V2->isNullValue()) + return 0; if (V2->isAllOnesValue() && // MIN_INT / -1 (BuiltinType)V1->getZExtValue() == -(BuiltinType)V1->getZExtValue()) return 0; @@ -615,7 +635,14 @@ (BuiltinType)V2->getValue()); return ConstantFP::get(*Ty, Result); } - static Constant *Div(const ConstantFP *V1, const ConstantFP *V2) { + static Constant *UDiv(const ConstantFP *V1, const ConstantFP *V2) { + BuiltinType inf = std::numeric_limits::infinity(); + if (V2->isExactlyValue(0.0)) return ConstantFP::get(*Ty, inf); + if (V2->isExactlyValue(-0.0)) return ConstantFP::get(*Ty, -inf); + BuiltinType R = (BuiltinType)V1->getValue() / (BuiltinType)V2->getValue(); + return ConstantFP::get(*Ty, R); + } + static Constant *SDiv(const ConstantFP *V1, const ConstantFP *V2) { BuiltinType inf = std::numeric_limits::infinity(); if (V2->isExactlyValue(0.0)) return ConstantFP::get(*Ty, inf); if (V2->isExactlyValue(-0.0)) return ConstantFP::get(*Ty, -inf); @@ -1224,7 +1251,8 @@ case Instruction::Add: C = ConstRules::get(V1, V2).add(V1, V2); break; case Instruction::Sub: C = ConstRules::get(V1, V2).sub(V1, V2); break; case Instruction::Mul: C = ConstRules::get(V1, V2).mul(V1, V2); break; - case Instruction::Div: C = ConstRules::get(V1, V2).div(V1, V2); break; + case Instruction::UDiv: C = ConstRules::get(V1, V2).udiv(V1, V2); break; + case Instruction::SDiv: C = ConstRules::get(V1, V2).sdiv(V1, V2); break; case Instruction::Rem: C = ConstRules::get(V1, V2).rem(V1, V2); break; case Instruction::And: C = ConstRules::get(V1, V2).op_and(V1, V2); break; case Instruction::Or: C = ConstRules::get(V1, V2).op_or (V1, V2); break; @@ -1307,7 +1335,8 @@ case Instruction::Mul: case Instruction::And: return Constant::getNullValue(V1->getType()); - case Instruction::Div: + case Instruction::UDiv: + case Instruction::SDiv: case Instruction::Rem: if (!isa(V2)) // undef/X -> 0 return Constant::getNullValue(V1->getType()); @@ -1358,7 +1387,8 @@ if (CI->getZExtValue() == 1) return const_cast(V1); // X * 1 == X break; - case Instruction::Div: + case Instruction::UDiv: + case Instruction::SDiv: if (const ConstantInt *CI = dyn_cast(V2)) if (CI->getZExtValue() == 1) return const_cast(V1); // X / 1 == X @@ -1419,7 +1449,8 @@ case Instruction::Shl: case Instruction::Shr: case Instruction::Sub: - case Instruction::Div: + case Instruction::SDiv: + case Instruction::UDiv: case Instruction::Rem: default: // These instructions cannot be flopped around. break; Index: llvm/lib/VMCore/Constants.cpp diff -u llvm/lib/VMCore/Constants.cpp:1.163.2.3 llvm/lib/VMCore/Constants.cpp:1.163.2.4 --- llvm/lib/VMCore/Constants.cpp:1.163.2.3 Thu Oct 19 19:34:44 2006 +++ llvm/lib/VMCore/Constants.cpp Thu Oct 19 23:27:18 2006 @@ -420,8 +420,11 @@ Constant *ConstantExpr::getMul(Constant *C1, Constant *C2) { return get(Instruction::Mul, C1, C2); } -Constant *ConstantExpr::getDiv(Constant *C1, Constant *C2) { - return get(Instruction::Div, C1, C2); +Constant *ConstantExpr::getUDiv(Constant *C1, Constant *C2) { + return get(Instruction::UDiv, C1, C2); +} +Constant *ConstantExpr::getSDiv(Constant *C1, Constant *C2) { + return get(Instruction::SDiv, C1, C2); } Constant *ConstantExpr::getRem(Constant *C1, Constant *C2) { return get(Instruction::Rem, C1, C2); @@ -1437,7 +1440,7 @@ #ifndef NDEBUG switch (Opcode) { case Instruction::Add: case Instruction::Sub: - case Instruction::Mul: case Instruction::Div: + case Instruction::Mul: case Instruction::UDiv: case Instruction::SDiv: case Instruction::Rem: assert(C1->getType() == C2->getType() && "Op types should be identical!"); assert((C1->getType()->isInteger() || C1->getType()->isFloatingPoint() || Index: llvm/lib/VMCore/Instruction.cpp diff -u llvm/lib/VMCore/Instruction.cpp:1.53.2.2 llvm/lib/VMCore/Instruction.cpp:1.53.2.3 --- llvm/lib/VMCore/Instruction.cpp:1.53.2.2 Thu Oct 19 19:34:44 2006 +++ llvm/lib/VMCore/Instruction.cpp Thu Oct 19 23:27:18 2006 @@ -94,7 +94,8 @@ case Add: return "add"; case Sub: return "sub"; case Mul: return "mul"; - case Div: return "div"; + case UDiv: return "udiv"; + case SDiv: return "sdiv"; case Rem: return "rem"; // Logical operators... @@ -221,7 +222,8 @@ /// bool Instruction::isTrapping(unsigned op) { switch(op) { - case Div: + case SDiv: + case UDiv: case Rem: case Load: case Store: Index: llvm/lib/VMCore/Instructions.cpp diff -u llvm/lib/VMCore/Instructions.cpp:1.42.2.3 llvm/lib/VMCore/Instructions.cpp:1.42.2.4 --- llvm/lib/VMCore/Instructions.cpp:1.42.2.3 Thu Oct 19 19:34:44 2006 +++ llvm/lib/VMCore/Instructions.cpp Thu Oct 19 23:27:18 2006 @@ -1022,7 +1022,7 @@ #ifndef NDEBUG switch (iType) { case Add: case Sub: - case Mul: case Div: + case Mul: case UDiv: case SDiv: case Rem: assert(getType() == LHS->getType() && "Arithmetic operation should return same type as operands!"); From reid at x10sys.com Thu Oct 19 23:27:45 2006 From: reid at x10sys.com (Reid Spencer) Date: Thu, 19 Oct 2006 23:27:45 -0500 Subject: [llvm-commits] [SignlessTypes] CVS: llvm/include/llvm/Analysis/ScalarEvolutionExpander.h ScalarEvolutionExpressions.h Message-ID: <200610200427.k9K4Rjf8006112@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/Analysis: ScalarEvolutionExpander.h updated: 1.5 -> 1.5.6.1 ScalarEvolutionExpressions.h updated: 1.7 -> 1.7.6.1 --- Log message: Initial patch for DIV -> SDIV/UDIV --- Diffs of the changes: (+2 -2) ScalarEvolutionExpander.h | 2 +- ScalarEvolutionExpressions.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/include/llvm/Analysis/ScalarEvolutionExpander.h diff -u llvm/include/llvm/Analysis/ScalarEvolutionExpander.h:1.5 llvm/include/llvm/Analysis/ScalarEvolutionExpander.h:1.5.6.1 --- llvm/include/llvm/Analysis/ScalarEvolutionExpander.h:1.5 Fri Mar 31 22:48:52 2006 +++ llvm/include/llvm/Analysis/ScalarEvolutionExpander.h Thu Oct 19 23:27:17 2006 @@ -140,7 +140,7 @@ const Type *Ty = S->getType(); Value *LHS = expandInTy(S->getLHS(), Ty); Value *RHS = expandInTy(S->getRHS(), Ty); - return BinaryOperator::createDiv(LHS, RHS, "tmp.", InsertPt); + return BinaryOperator::createSDiv(LHS, RHS, "tmp.", InsertPt); } Value *visitAddRecExpr(SCEVAddRecExpr *S); Index: llvm/include/llvm/Analysis/ScalarEvolutionExpressions.h diff -u llvm/include/llvm/Analysis/ScalarEvolutionExpressions.h:1.7 llvm/include/llvm/Analysis/ScalarEvolutionExpressions.h:1.7.6.1 --- llvm/include/llvm/Analysis/ScalarEvolutionExpressions.h:1.7 Fri Mar 31 22:48:52 2006 +++ llvm/include/llvm/Analysis/ScalarEvolutionExpressions.h Thu Oct 19 23:27:17 2006 @@ -293,7 +293,7 @@ //===--------------------------------------------------------------------===// - /// SCEVSDivExpr - This class represents a binary unsigned division operation. + /// SCEVSDivExpr - This class represents a binary signed division operation. /// class SCEVSDivExpr : public SCEV { SCEVHandle LHS, RHS; From reid at x10sys.com Thu Oct 19 23:27:42 2006 From: reid at x10sys.com (Reid Spencer) Date: Thu, 19 Oct 2006 23:27:42 -0500 Subject: [llvm-commits] [SignlessTypes] CVS: llvm/include/llvm/Support/PatternMatch.h Message-ID: <200610200427.k9K4RgOe006086@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/Support: PatternMatch.h updated: 1.9 -> 1.9.2.1 --- Log message: Initial patch for DIV -> SDIV/UDIV --- Diffs of the changes: (+8 -2) PatternMatch.h | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-) Index: llvm/include/llvm/Support/PatternMatch.h diff -u llvm/include/llvm/Support/PatternMatch.h:1.9 llvm/include/llvm/Support/PatternMatch.h:1.9.2.1 --- llvm/include/llvm/Support/PatternMatch.h:1.9 Mon Sep 18 00:17:11 2006 +++ llvm/include/llvm/Support/PatternMatch.h Thu Oct 19 23:27:17 2006 @@ -112,9 +112,15 @@ } template -inline BinaryOp_match m_Div(const LHS &L, +inline BinaryOp_match m_UDiv(const LHS &L, const RHS &R) { - return BinaryOp_match(L, R); + return BinaryOp_match(L, R); +} + +template +inline BinaryOp_match m_SDiv(const LHS &L, + const RHS &R) { + return BinaryOp_match(L, R); } template From reid at x10sys.com Thu Oct 19 23:27:46 2006 From: reid at x10sys.com (Reid Spencer) Date: Thu, 19 Oct 2006 23:27:46 -0500 Subject: [llvm-commits] [SignlessTypes] CVS: llvm/lib/Analysis/ScalarEvolution.cpp Message-ID: <200610200427.k9K4RkaK006127@zion.cs.uiuc.edu> Changes in directory llvm/lib/Analysis: ScalarEvolution.cpp updated: 1.53.2.2 -> 1.53.2.3 --- Log message: Initial patch for DIV -> SDIV/UDIV --- Diffs of the changes: (+13 -13) ScalarEvolution.cpp | 26 +++++++++++++------------- 1 files changed, 13 insertions(+), 13 deletions(-) Index: llvm/lib/Analysis/ScalarEvolution.cpp diff -u llvm/lib/Analysis/ScalarEvolution.cpp:1.53.2.2 llvm/lib/Analysis/ScalarEvolution.cpp:1.53.2.3 --- llvm/lib/Analysis/ScalarEvolution.cpp:1.53.2.2 Thu Oct 19 19:34:43 2006 +++ llvm/lib/Analysis/ScalarEvolution.cpp Thu Oct 19 23:27:17 2006 @@ -989,9 +989,9 @@ SCEVHandle SCEVSDivExpr::get(const SCEVHandle &LHS, const SCEVHandle &RHS) { if (SCEVConstant *RHSC = dyn_cast(RHS)) { if (RHSC->getValue()->equalsInt(1)) - return LHS; // X /s 1 --> x + return LHS; // X sdiv 1 --> x if (RHSC->getValue()->isAllOnesValue()) - return SCEV::getNegativeSCEV(LHS); // X /s -1 --> -x + return SCEV::getNegativeSCEV(LHS); // X sdiv -1 --> -x if (SCEVConstant *LHSC = dyn_cast(LHS)) { Constant *LHSCV = LHSC->getValue(); @@ -1001,7 +1001,7 @@ LHSCV->getType()->getSignedVersion()); if (RHSCV->getType()->isUnsigned()) RHSCV = ConstantExpr::getCast(RHSCV, LHSCV->getType()); - return SCEVUnknown::get(ConstantExpr::getDiv(LHSCV, RHSCV)); + return SCEVUnknown::get(ConstantExpr::getSDiv(LHSCV, RHSCV)); } } @@ -1384,8 +1384,8 @@ case Instruction::Mul: return SCEVMulExpr::get(getSCEV(I->getOperand(0)), getSCEV(I->getOperand(1))); - case Instruction::Div: - if (V->getType()->isInteger() && V->getType()->isSigned()) + case Instruction::SDiv: + if (V->getType()->isInteger()) return SCEVSDivExpr::get(getSCEV(I->getOperand(0)), getSCEV(I->getOperand(1))); break; @@ -2058,16 +2058,16 @@ return std::make_pair(CNC, CNC); } - Constant *Two = ConstantInt::get(L->getValue()->getType(), 2); + Constant *C = L->getValue(); + Constant *Two = ConstantInt::get(C->getType(), 2); // Convert from chrec coefficients to polynomial coefficients AX^2+BX+C - Constant *C = L->getValue(); // The B coefficient is M-N/2 Constant *B = ConstantExpr::getSub(M->getValue(), - ConstantExpr::getDiv(N->getValue(), + ConstantExpr::getSDiv(N->getValue(), Two)); // The A coefficient is N/2 - Constant *A = ConstantExpr::getDiv(N->getValue(), Two); + Constant *A = ConstantExpr::getSDiv(N->getValue(), Two); // Compute the B^2-4ac term. Constant *SqrtTerm = @@ -2102,9 +2102,9 @@ SqrtTerm = ConstantExpr::getCast(SqrtTerm, SignedTy); Constant *Solution1 = - ConstantExpr::getDiv(ConstantExpr::getAdd(NegB, SqrtTerm), TwoA); + ConstantExpr::getSDiv(ConstantExpr::getAdd(NegB, SqrtTerm), TwoA); Constant *Solution2 = - ConstantExpr::getDiv(ConstantExpr::getSub(NegB, SqrtTerm), TwoA); + ConstantExpr::getSDiv(ConstantExpr::getSub(NegB, SqrtTerm), TwoA); return std::make_pair(SCEVUnknown::get(Solution1), SCEVUnknown::get(Solution2)); } @@ -2150,7 +2150,7 @@ Constant *StartNegC = ConstantExpr::getNeg(StartCC); Constant *Rem = ConstantExpr::getRem(StartNegC, StepC->getValue()); if (Rem->isNullValue()) { - Constant *Result =ConstantExpr::getDiv(StartNegC,StepC->getValue()); + Constant *Result =ConstantExpr::getSDiv(StartNegC,StepC->getValue()); return SCEVUnknown::get(Result); } } @@ -2352,7 +2352,7 @@ Constant *ExitValue = Upper; if (A != One) { ExitValue = ConstantExpr::getSub(ConstantExpr::getAdd(Upper, A), One); - ExitValue = ConstantExpr::getDiv(ExitValue, A); + ExitValue = ConstantExpr::getSDiv(ExitValue, A); } assert(isa(ExitValue) && "Constant folding of integers not implemented?"); From reid at x10sys.com Thu Oct 19 23:27:45 2006 From: reid at x10sys.com (Reid Spencer) Date: Thu, 19 Oct 2006 23:27:45 -0500 Subject: [llvm-commits] [SignlessTypes] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp Message-ID: <200610200427.k9K4RjJ7006110@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: InstructionCombining.cpp updated: 1.520.2.2 -> 1.520.2.3 --- Log message: Initial patch for DIV -> SDIV/UDIV --- Diffs of the changes: (+13 -10) InstructionCombining.cpp | 23 +++++++++++++---------- 1 files changed, 13 insertions(+), 10 deletions(-) Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.520.2.2 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.520.2.3 --- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.520.2.2 Thu Oct 19 19:34:44 2006 +++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp Thu Oct 19 23:27:17 2006 @@ -1975,11 +1975,11 @@ } // 0 - (X sdiv C) -> (X sdiv -C) - if (Op1I->getOpcode() == Instruction::Div) + if (Op1I->getOpcode() == Instruction::SDiv) if (ConstantInt *CSI = dyn_cast(Op0)) - if (CSI->getType()->isSigned() && CSI->isNullValue()) + if (CSI->isNullValue()) if (Constant *DivRHS = dyn_cast(Op1I->getOperand(1))) - return BinaryOperator::createDiv(Op1I->getOperand(0), + return BinaryOperator::createSDiv(Op1I->getOperand(0), ConstantExpr::getNeg(DivRHS)); // X - X*C --> X * (1-C) @@ -2174,11 +2174,13 @@ return BinaryOperator::createNeg(Op0); if (Instruction *LHS = dyn_cast(Op0)) - if (LHS->getOpcode() == Instruction::Div) + if (LHS->getOpcode() == Instruction::SDiv || + LHS->getOpcode()==Instruction::UDiv) if (ConstantInt *LHSRHS = dyn_cast(LHS->getOperand(1))) { // (X / C1) / C2 -> X / (C1*C2) - return BinaryOperator::createDiv(LHS->getOperand(0), - ConstantExpr::getMul(RHS, LHSRHS)); + return BinaryOperator::create( + Instruction::BinaryOps(LHS->getOpcode()), LHS->getOperand(0), + ConstantExpr::getMul(RHS, LHSRHS),""); } // Check to see if this is an unsigned division with an exact power of 2, @@ -2195,7 +2197,7 @@ // -X/C -> X/-C if (RHS->getType()->isSigned()) if (Value *LHSNeg = dyn_castNegVal(Op0)) - return BinaryOperator::createDiv(LHSNeg, ConstantExpr::getNeg(RHS)); + return BinaryOperator::createSDiv(LHSNeg, ConstantExpr::getNeg(RHS)); if (!RHS->isNullValue()) { if (SelectInst *SI = dyn_cast(Op0)) @@ -2279,7 +2281,7 @@ RHS = ConstantExpr::getCast(R, NTy); else RHS = InsertNewInstBefore(new CastInst(Op1, NTy, Op1->getName()), I); - Instruction *Div = BinaryOperator::createDiv(LHS, RHS, I.getName()); + Instruction *Div = BinaryOperator::createUDiv(LHS, RHS, I.getName()); InsertNewInstBefore(Div, I); return new CastInst(Div, I.getType()); } @@ -3722,7 +3724,7 @@ static bool MulWithOverflow(ConstantInt *&Result, ConstantInt *In1, ConstantInt *In2) { Result = cast(ConstantExpr::getMul(In1, In2)); - return !In2->isNullValue() && ConstantExpr::getDiv(Result, In2) != In1; + return !In2->isNullValue() && ConstantExpr::getUDiv(Result, In2) != In1; } static bool isPositive(ConstantInt *C) { @@ -4379,7 +4381,8 @@ } break; - case Instruction::Div: + case Instruction::SDiv: + case Instruction::UDiv: // Fold: (div X, C1) op C2 -> range check if (ConstantInt *DivRHS = dyn_cast(LHSI->getOperand(1))) { // Fold this div into the comparison, producing a range check. From reid at x10sys.com Thu Oct 19 23:27:42 2006 From: reid at x10sys.com (Reid Spencer) Date: Thu, 19 Oct 2006 23:27:42 -0500 Subject: [llvm-commits] [SignlessTypes] CVS: llvm/projects/Stacker/lib/compiler/StackerCompiler.cpp Message-ID: <200610200427.k9K4RgLB006092@zion.cs.uiuc.edu> Changes in directory llvm/projects/Stacker/lib/compiler: StackerCompiler.cpp updated: 1.18.2.2 -> 1.18.2.3 --- Log message: Initial patch for DIV -> SDIV/UDIV --- Diffs of the changes: (+2 -2) StackerCompiler.cpp | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/projects/Stacker/lib/compiler/StackerCompiler.cpp diff -u llvm/projects/Stacker/lib/compiler/StackerCompiler.cpp:1.18.2.2 llvm/projects/Stacker/lib/compiler/StackerCompiler.cpp:1.18.2.3 --- llvm/projects/Stacker/lib/compiler/StackerCompiler.cpp:1.18.2.2 Thu Oct 19 16:06:26 2006 +++ llvm/projects/Stacker/lib/compiler/StackerCompiler.cpp Thu Oct 19 23:27:18 2006 @@ -1041,7 +1041,7 @@ LoadInst* op1 = cast(pop_integer(bb)); LoadInst* op2 = cast(pop_integer(bb)); BinaryOperator* divop = - BinaryOperator::create( Instruction::Div, op1, op2); + BinaryOperator::create( Instruction::SDiv, op1, op2); bb->getInstList().push_back( divop ); push_value( bb, divop ); break; @@ -1072,7 +1072,7 @@ // Divide by the third operand BinaryOperator* divop = - BinaryOperator::create( Instruction::Div, multop, op3); + BinaryOperator::create( Instruction::SDiv, multop, op3); bb->getInstList().push_back( divop ); // Push the result From reid at x10sys.com Thu Oct 19 23:27:45 2006 From: reid at x10sys.com (Reid Spencer) Date: Thu, 19 Oct 2006 23:27:45 -0500 Subject: [llvm-commits] [SignlessTypes] CVS: llvm/include/llvm/Constants.h Instruction.def Message-ID: <200610200427.k9K4Rj0T006122@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm: Constants.h updated: 1.88.2.1 -> 1.88.2.2 Instruction.def updated: 1.19.6.2 -> 1.19.6.3 --- Log message: Initial patch for DIV -> SDIV/UDIV --- Diffs of the changes: (+40 -38) Constants.h | 3 +- Instruction.def | 75 ++++++++++++++++++++++++++++---------------------------- 2 files changed, 40 insertions(+), 38 deletions(-) Index: llvm/include/llvm/Constants.h diff -u llvm/include/llvm/Constants.h:1.88.2.1 llvm/include/llvm/Constants.h:1.88.2.2 --- llvm/include/llvm/Constants.h:1.88.2.1 Wed Oct 18 22:57:55 2006 +++ llvm/include/llvm/Constants.h Thu Oct 19 23:27:17 2006 @@ -560,7 +560,8 @@ static Constant *getAdd(Constant *C1, Constant *C2); static Constant *getSub(Constant *C1, Constant *C2); static Constant *getMul(Constant *C1, Constant *C2); - static Constant *getDiv(Constant *C1, Constant *C2); + static Constant *getUDiv(Constant *C1, Constant *C2); + static Constant *getSDiv(Constant *C1, Constant *C2); static Constant *getRem(Constant *C1, Constant *C2); static Constant *getAnd(Constant *C1, Constant *C2); static Constant *getOr(Constant *C1, Constant *C2); Index: llvm/include/llvm/Instruction.def diff -u llvm/include/llvm/Instruction.def:1.19.6.2 llvm/include/llvm/Instruction.def:1.19.6.3 --- llvm/include/llvm/Instruction.def:1.19.6.2 Thu Oct 19 19:34:43 2006 +++ llvm/include/llvm/Instruction.def Thu Oct 19 23:27:17 2006 @@ -90,55 +90,56 @@ // Standard binary operators... FIRST_BINARY_INST( 7) -HANDLE_BINARY_INST( 7, Add , BinaryOperator) -HANDLE_BINARY_INST( 8, Sub , BinaryOperator) -HANDLE_BINARY_INST( 9, Mul , BinaryOperator) -HANDLE_BINARY_INST(10, Div , BinaryOperator) -HANDLE_BINARY_INST(11, Rem , BinaryOperator) +HANDLE_BINARY_INST( 7, Add , BinaryOperator) +HANDLE_BINARY_INST( 8, Sub , BinaryOperator) +HANDLE_BINARY_INST( 9, Mul , BinaryOperator) +HANDLE_BINARY_INST(10, UDiv , BinaryOperator) +HANDLE_BINARY_INST(11, SDiv , BinaryOperator) +HANDLE_BINARY_INST(12, Rem , BinaryOperator) // Logical operators... -HANDLE_BINARY_INST(12, And , BinaryOperator) -HANDLE_BINARY_INST(13, Or , BinaryOperator) -HANDLE_BINARY_INST(14, Xor , BinaryOperator) +HANDLE_BINARY_INST(13, And , BinaryOperator) +HANDLE_BINARY_INST(14, Or , BinaryOperator) +HANDLE_BINARY_INST(15, Xor , BinaryOperator) // Binary comparison operators... -HANDLE_BINARY_INST(15, SetEQ , SetCondInst) -HANDLE_BINARY_INST(16, SetNE , SetCondInst) -HANDLE_BINARY_INST(17, SetLE , SetCondInst) -HANDLE_BINARY_INST(18, SetGE , SetCondInst) -HANDLE_BINARY_INST(19, SetLT , SetCondInst) -HANDLE_BINARY_INST(20, SetGT , SetCondInst) - LAST_BINARY_INST(20) +HANDLE_BINARY_INST(16, SetEQ , SetCondInst) +HANDLE_BINARY_INST(17, SetNE , SetCondInst) +HANDLE_BINARY_INST(18, SetLE , SetCondInst) +HANDLE_BINARY_INST(19, SetGE , SetCondInst) +HANDLE_BINARY_INST(20, SetLT , SetCondInst) +HANDLE_BINARY_INST(21, SetGT , SetCondInst) + LAST_BINARY_INST(21) // Memory operators... - FIRST_MEMORY_INST(21) -HANDLE_MEMORY_INST(21, Malloc, MallocInst) // Heap management instructions -HANDLE_MEMORY_INST(22, Free , FreeInst ) -HANDLE_MEMORY_INST(23, Alloca, AllocaInst) // Stack management -HANDLE_MEMORY_INST(24, Load , LoadInst ) // Memory manipulation instrs -HANDLE_MEMORY_INST(25, Store , StoreInst ) -HANDLE_MEMORY_INST(26, GetElementPtr, GetElementPtrInst) - LAST_MEMORY_INST(26) + FIRST_MEMORY_INST(22) +HANDLE_MEMORY_INST(22, Malloc, MallocInst) // Heap management instructions +HANDLE_MEMORY_INST(23, Free , FreeInst ) +HANDLE_MEMORY_INST(24, Alloca, AllocaInst) // Stack management +HANDLE_MEMORY_INST(25, Load , LoadInst ) // Memory manipulation instrs +HANDLE_MEMORY_INST(26, Store , StoreInst ) +HANDLE_MEMORY_INST(27, GetElementPtr, GetElementPtrInst) + LAST_MEMORY_INST(27) // Other operators... - FIRST_OTHER_INST(27) -HANDLE_OTHER_INST(27, PHI , PHINode ) // PHI node instruction -HANDLE_OTHER_INST(28, Cast , CastInst ) // Type cast -HANDLE_OTHER_INST(29, Call , CallInst ) // Call a function + FIRST_OTHER_INST(28) +HANDLE_OTHER_INST(28, PHI , PHINode ) // PHI node instruction +HANDLE_OTHER_INST(29, Cast , CastInst ) // Type cast +HANDLE_OTHER_INST(30, Call , CallInst ) // Call a function -HANDLE_OTHER_INST(30, Shl , ShiftInst ) // Shift operations -HANDLE_OTHER_INST(31, Shr , ShiftInst ) +HANDLE_OTHER_INST(31, Shl , ShiftInst ) // Shift operations +HANDLE_OTHER_INST(32, Shr , ShiftInst ) // 32 -> Empty slot used to be used for vanext in llvm 1.5 and before. // 33 -> Empty slot used to be used for vaarg in llvm 1.5 and before. -HANDLE_OTHER_INST(34, Select , SelectInst ) // select instruction +HANDLE_OTHER_INST(33, Select , SelectInst ) // select instruction -HANDLE_OTHER_INST(35, UserOp1, Instruction) // May be used internally in a pass -HANDLE_OTHER_INST(36, UserOp2, Instruction) -HANDLE_OTHER_INST(37, VAArg , VAArgInst ) // vaarg instruction -HANDLE_OTHER_INST(38, ExtractElement, ExtractElementInst)// extract from vector. -HANDLE_OTHER_INST(39, InsertElement, InsertElementInst) // insert into vector -HANDLE_OTHER_INST(40, ShuffleVector, ShuffleVectorInst) // shuffle two vectors. - LAST_OTHER_INST(40) +HANDLE_OTHER_INST(34, UserOp1, Instruction) // May be used internally in a pass +HANDLE_OTHER_INST(35, UserOp2, Instruction) +HANDLE_OTHER_INST(36, VAArg , VAArgInst ) // vaarg instruction +HANDLE_OTHER_INST(37, ExtractElement, ExtractElementInst)// extract from vector. +HANDLE_OTHER_INST(38, InsertElement, InsertElementInst) // insert into vector +HANDLE_OTHER_INST(39, ShuffleVector, ShuffleVectorInst) // shuffle two vectors. + LAST_OTHER_INST(39) #undef FIRST_TERM_INST #undef HANDLE_TERM_INST From reid at x10sys.com Thu Oct 19 23:27:46 2006 From: reid at x10sys.com (Reid Spencer) Date: Thu, 19 Oct 2006 23:27:46 -0500 Subject: [llvm-commits] [SignlessTypes] CVS: llvm/lib/Bytecode/Reader/Reader.cpp Message-ID: <200610200427.k9K4RkS9006137@zion.cs.uiuc.edu> Changes in directory llvm/lib/Bytecode/Reader: Reader.cpp updated: 1.198.2.2 -> 1.198.2.3 --- Log message: Initial patch for DIV -> SDIV/UDIV --- Diffs of the changes: (+2 -0) Reader.cpp | 2 ++ 1 files changed, 2 insertions(+) Index: llvm/lib/Bytecode/Reader/Reader.cpp diff -u llvm/lib/Bytecode/Reader/Reader.cpp:1.198.2.2 llvm/lib/Bytecode/Reader/Reader.cpp:1.198.2.3 --- llvm/lib/Bytecode/Reader/Reader.cpp:1.198.2.2 Thu Oct 19 18:54:13 2006 +++ llvm/lib/Bytecode/Reader/Reader.cpp Thu Oct 19 23:27:17 2006 @@ -675,6 +675,7 @@ Result = new VAArgInst(getValue(iType, Oprnds[0]), getSanitizedType(Oprnds[1])); break; +#if 0 // FIXME: This needs to be handled case 32: { //VANext_old const Type* ArgTy = getValue(iType, Oprnds[0])->getType(); Function* NF = TheModule->getOrInsertFunction("llvm.va_copy", ArgTy, ArgTy, @@ -714,6 +715,7 @@ Result = new VAArgInst(foo, getSanitizedType(Oprnds[1])); break; } +#endif case Instruction::ExtractElement: { if (Oprnds.size() != 2) error("Invalid extractelement instruction!"); From reid at x10sys.com Thu Oct 19 23:27:46 2006 From: reid at x10sys.com (Reid Spencer) Date: Thu, 19 Oct 2006 23:27:46 -0500 Subject: [llvm-commits] [SignlessTypes] CVS: llvm/lib/AsmParser/Lexer.cpp.cvs Lexer.l Lexer.l.cvs ParserInternals.h llvmAsmParser.cpp.cvs llvmAsmParser.h.cvs llvmAsmParser.y llvmAsmParser.y.cvs Message-ID: <200610200427.k9K4RkfC006151@zion.cs.uiuc.edu> Changes in directory llvm/lib/AsmParser: Lexer.cpp.cvs updated: 1.10.2.3 -> 1.10.2.4 Lexer.l updated: 1.78.2.2 -> 1.78.2.3 Lexer.l.cvs updated: 1.8.2.2 -> 1.8.2.3 ParserInternals.h updated: 1.45.2.2 -> 1.45.2.3 llvmAsmParser.cpp.cvs updated: 1.18.2.3 -> 1.18.2.4 llvmAsmParser.h.cvs updated: 1.13.2.3 -> 1.13.2.4 llvmAsmParser.y updated: 1.266.2.3 -> 1.266.2.4 llvmAsmParser.y.cvs updated: 1.18.2.3 -> 1.18.2.4 --- Log message: Initial patch for DIV -> SDIV/UDIV --- Diffs of the changes: (+1857 -1729) Lexer.cpp.cvs | 1172 ++++++++++++++------------- Lexer.l | 16 Lexer.l.cvs | 16 ParserInternals.h | 16 llvmAsmParser.cpp.cvs | 2124 +++++++++++++++++++++++++------------------------- llvmAsmParser.h.cvs | 128 +-- llvmAsmParser.y | 57 - llvmAsmParser.y.cvs | 57 - 8 files changed, 1857 insertions(+), 1729 deletions(-) Index: llvm/lib/AsmParser/Lexer.cpp.cvs diff -u llvm/lib/AsmParser/Lexer.cpp.cvs:1.10.2.3 llvm/lib/AsmParser/Lexer.cpp.cvs:1.10.2.4 --- llvm/lib/AsmParser/Lexer.cpp.cvs:1.10.2.3 Thu Oct 19 19:34:43 2006 +++ llvm/lib/AsmParser/Lexer.cpp.cvs Thu Oct 19 23:27:17 2006 @@ -20,7 +20,7 @@ /* A lexical scanner generated by flex*/ /* Scanner skeleton version: - * $Header: /var/cvs/llvm/llvm/lib/AsmParser/Lexer.cpp.cvs,v 1.10.2.3 2006/10/20 00:34:43 reid Exp $ + * $Header: /var/cvs/llvm/llvm/lib/AsmParser/Lexer.cpp.cvs,v 1.10.2.4 2006/10/20 04:27:17 reid Exp $ */ #define FLEX_SCANNER @@ -317,35 +317,35 @@ *yy_cp = '\0'; \ yy_c_buf_p = yy_cp; -#define YY_NUM_RULES 114 -#define YY_END_OF_BUFFER 115 -static yyconst short int yy_acclist[192] = +#define YY_NUM_RULES 116 +#define YY_END_OF_BUFFER 117 +static yyconst short int yy_acclist[194] = { 0, - 115, 113, 114, 112, 113, 114, 112, 114, 113, 114, - 113, 114, 113, 114, 113, 114, 113, 114, 113, 114, - 105, 113, 114, 105, 113, 114, 1, 113, 114, 113, - 114, 113, 114, 113, 114, 113, 114, 113, 114, 113, - 114, 113, 114, 113, 114, 113, 114, 113, 114, 113, - 114, 113, 114, 113, 114, 113, 114, 113, 114, 113, - 114, 113, 114, 113, 114, 113, 114, 113, 114, 113, - 114, 104, 102, 101, 101, 108, 106, 110, 105, 1, - 87, 41, 69, 23, 104, 101, 101, 109, 110, 20, - 110, 111, 63, 68, 39, 34, 42, 66, 3, 54, - - 65, 25, 77, 67, 86, 81, 82, 64, 70, 103, - 110, 110, 49, 78, 79, 32, 94, 95, 56, 22, - 107, 26, 4, 61, 55, 48, 11, 110, 36, 2, - 5, 58, 60, 50, 72, 76, 74, 75, 73, 71, - 52, 96, 51, 57, 21, 84, 93, 45, 59, 30, - 24, 44, 7, 89, 33, 92, 38, 62, 80, 88, - 27, 28, 90, 53, 85, 83, 43, 6, 29, 37, - 8, 17, 9, 10, 35, 12, 14, 13, 40, 15, - 31, 91, 97, 99, 100, 16, 46, 98, 18, 47, - 19 + 117, 115, 116, 114, 115, 116, 114, 116, 115, 116, + 115, 116, 115, 116, 115, 116, 115, 116, 115, 116, + 107, 115, 116, 107, 115, 116, 1, 115, 116, 115, + 116, 115, 116, 115, 116, 115, 116, 115, 116, 115, + 116, 115, 116, 115, 116, 115, 116, 115, 116, 115, + 116, 115, 116, 115, 116, 115, 116, 115, 116, 115, + 116, 115, 116, 115, 116, 115, 116, 115, 116, 115, + 116, 106, 104, 103, 103, 110, 108, 112, 107, 1, + 89, 41, 71, 23, 106, 103, 103, 111, 112, 20, + 112, 113, 63, 70, 39, 34, 42, 66, 3, 54, + + 65, 25, 79, 69, 88, 83, 84, 64, 72, 105, + 112, 112, 49, 80, 81, 32, 96, 97, 56, 22, + 109, 68, 26, 4, 61, 67, 55, 48, 11, 112, + 36, 2, 5, 58, 60, 50, 74, 78, 76, 77, + 75, 73, 52, 98, 51, 57, 21, 86, 95, 45, + 59, 30, 24, 44, 7, 91, 33, 94, 38, 62, + 82, 90, 27, 28, 92, 53, 87, 85, 43, 6, + 29, 37, 8, 17, 9, 10, 35, 12, 14, 13, + 40, 15, 31, 93, 99, 101, 102, 16, 46, 100, + 18, 47, 19 } ; -static yyconst short int yy_accept[505] = +static yyconst short int yy_accept[511] = { 0, 1, 1, 1, 2, 4, 7, 9, 11, 13, 15, 17, 19, 21, 24, 27, 30, 32, 34, 36, 38, @@ -358,51 +358,51 @@ 83, 83, 83, 83, 83, 83, 83, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, - 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, - 85, 85, 85, 85, 86, 87, 89, 90, 91, 92, - 92, 93, 94, 94, 94, 95, 95, 96, 96, 97, - 97, 97, 97, 98, 98, 98, 98, 98, 98, 98, - 99, 99, 99, 100, 100, 100, 100, 100, 100, 100, - 100, 100, 100, 100, 101, 101, 101, 101, 101, 101, - 101, 101, 101, 102, 103, 103, 103, 104, 104, 105, - 106, 106, 106, 106, 106, 106, 107, 107, 108, 108, - 108, 108, 109, 109, 109, 109, 109, 109, 109, 109, + 84, 85, 85, 85, 85, 85, 85, 85, 85, 85, + 85, 85, 85, 85, 85, 85, 86, 87, 89, 90, + 91, 92, 92, 93, 94, 94, 94, 95, 95, 96, + 96, 97, 97, 97, 97, 98, 98, 98, 98, 98, + 98, 98, 99, 99, 99, 100, 100, 100, 100, 100, + 100, 100, 100, 100, 100, 100, 101, 101, 101, 101, + 101, 101, 101, 101, 101, 102, 103, 103, 103, 104, + 104, 105, 106, 106, 106, 106, 106, 106, 106, 107, + 107, 108, 108, 108, 108, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, - 109, 109, 109, 109, 110, 110, 111, 112, 112, 112, - 112, 113, 113, 113, 113, 113, 114, 115, 116, 116, - 116, 116, 117, 117, 117, 117, 117, 117, 117, 117, - 117, 117, 117, 117, 117, 118, 118, 118, 118, 118, - 118, 118, 118, 118, 118, 119, 120, 120, 120, 121, - 121, 121, 122, 122, 122, 122, 122, 122, 122, 122, - 122, 122, 122, 122, 122, 123, 123, 123, 124, 125, - 125, 126, 126, 126, 126, 126, 126, 126, 126, 126, - 126, 127, 127, 128, 128, 128, 129, 130, 130, 130, - 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, - - 131, 131, 131, 132, 132, 133, 133, 133, 133, 133, - 133, 133, 134, 134, 134, 134, 134, 134, 134, 135, - 135, 135, 136, 137, 138, 139, 140, 141, 142, 142, - 142, 143, 143, 143, 143, 144, 145, 146, 146, 146, - 146, 146, 146, 147, 147, 147, 147, 147, 147, 148, - 148, 149, 149, 149, 149, 149, 149, 149, 150, 151, - 152, 152, 152, 153, 153, 154, 154, 154, 154, 155, - 155, 156, 157, 158, 159, 159, 159, 160, 160, 160, - 161, 162, 163, 163, 163, 164, 165, 166, 167, 167, - 167, 167, 167, 167, 167, 168, 169, 170, 170, 170, - - 170, 170, 170, 170, 170, 170, 170, 170, 170, 171, - 171, 171, 171, 171, 171, 171, 171, 171, 171, 172, - 172, 172, 172, 173, 173, 173, 173, 173, 174, 175, - 175, 175, 175, 175, 175, 176, 176, 176, 176, 177, - 178, 179, 179, 179, 179, 179, 179, 179, 179, 179, - 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, - 179, 179, 180, 180, 180, 180, 180, 180, 181, 181, - 181, 181, 181, 182, 182, 182, 183, 183, 183, 183, - 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, - 184, 184, 185, 186, 187, 187, 188, 188, 189, 190, + 109, 109, 109, 109, 109, 109, 109, 109, 110, 110, + 111, 112, 112, 112, 112, 113, 113, 113, 113, 113, + 114, 115, 116, 116, 116, 116, 117, 117, 117, 117, + 117, 117, 117, 117, 117, 117, 117, 117, 117, 118, + 118, 118, 118, 118, 118, 118, 118, 118, 118, 119, + 120, 120, 120, 121, 121, 121, 122, 122, 123, 123, + 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, + 124, 124, 124, 125, 126, 126, 127, 128, 128, 128, + 128, 128, 128, 128, 128, 128, 128, 129, 129, 130, + 130, 130, 131, 132, 132, 132, 133, 133, 133, 133, + + 133, 133, 133, 133, 133, 133, 133, 133, 133, 134, + 134, 135, 135, 135, 135, 135, 135, 135, 136, 136, + 136, 136, 136, 136, 136, 137, 137, 137, 138, 139, + 140, 141, 142, 143, 144, 144, 144, 145, 145, 145, + 145, 146, 147, 148, 148, 148, 148, 148, 148, 149, + 149, 149, 149, 149, 149, 150, 150, 151, 151, 151, + 151, 151, 151, 151, 152, 153, 154, 154, 154, 155, + 155, 156, 156, 156, 156, 157, 157, 158, 159, 160, + 161, 161, 161, 162, 162, 162, 163, 164, 165, 165, + 165, 166, 167, 168, 169, 169, 169, 169, 169, 169, + + 169, 170, 171, 172, 172, 172, 172, 172, 172, 172, + 172, 172, 172, 172, 172, 173, 173, 173, 173, 173, + 173, 173, 173, 173, 173, 174, 174, 174, 174, 175, + 175, 175, 175, 175, 176, 177, 177, 177, 177, 177, + 177, 178, 178, 178, 178, 179, 180, 181, 181, 181, + 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, + 181, 181, 181, 181, 181, 181, 181, 181, 182, 182, + 182, 182, 182, 182, 183, 183, 183, 183, 183, 184, + 184, 184, 185, 185, 185, 185, 185, 185, 185, 185, + 185, 185, 185, 185, 185, 185, 186, 186, 187, 188, - 191, 191, 192, 192 + 189, 189, 190, 190, 191, 192, 193, 193, 194, 194 } ; static yyconst int yy_ec[256] = @@ -446,256 +446,260 @@ 3, 3, 3 } ; -static yyconst short int yy_base[509] = +static yyconst short int yy_base[515] = { 0, - 0, 0, 1096, 1097, 1097, 1097, 1091, 1080, 36, 40, + 0, 0, 1108, 1109, 1109, 1109, 1103, 1092, 36, 40, 44, 50, 56, 62, 0, 63, 66, 81, 89, 47, 90, 91, 76, 96, 108, 49, 97, 110, 68, 137, - 120, 168, 112, 115, 135, 127, 1089, 1097, 1078, 1097, - 0, 158, 173, 180, 196, 70, 201, 216, 221, 0, - 121, 152, 123, 139, 166, 140, 162, 184, 1077, 222, - 180, 31, 186, 119, 232, 208, 144, 225, 234, 236, - 235, 188, 238, 240, 246, 241, 245, 203, 248, 256, - 254, 258, 262, 252, 272, 274, 1076, 276, 278, 280, - 255, 253, 283, 284, 285, 286, 288, 297, 300, 1075, - - 301, 292, 295, 307, 309, 318, 316, 315, 322, 312, - 147, 329, 330, 1074, 0, 344, 349, 1073, 363, 380, - 0, 1072, 338, 336, 1071, 355, 1070, 356, 1069, 353, - 367, 334, 1068, 375, 365, 381, 384, 370, 371, 1067, - 388, 392, 391, 393, 394, 395, 396, 400, 399, 407, - 406, 409, 411, 413, 410, 414, 418, 421, 425, 426, - 427, 429, 1066, 1065, 430, 431, 1064, 435, 1063, 1062, - 458, 436, 439, 434, 469, 1061, 449, 1060, 438, 441, - 458, 1059, 471, 472, 474, 473, 481, 482, 475, 476, - 483, 488, 489, 493, 495, 496, 504, 501, 503, 505, - - 510, 507, 516, 1058, 511, 1097, 527, 541, 545, 549, - 554, 555, 440, 556, 557, 1057, 1056, 1055, 558, 559, - 560, 1054, 527, 518, 561, 189, 562, 528, 566, 563, - 564, 567, 568, 570, 1053, 571, 587, 580, 578, 579, - 581, 590, 591, 596, 1052, 1051, 594, 598, 1050, 597, - 601, 0, 606, 603, 607, 602, 608, 610, 618, 620, - 625, 623, 628, 629, 1049, 630, 626, 1048, 1047, 638, - 1046, 634, 640, 642, 644, 646, 648, 651, 653, 652, - 1045, 654, 1044, 656, 657, 662, 1043, 662, 665, 1042, - 668, 671, 674, 680, 682, 683, 684, 685, 687, 686, - - 689, 690, 1041, 691, 1040, 696, 692, 695, 693, 700, - 699, 1039, 710, 712, 713, 714, 715, 719, 1038, 718, - 722, 1037, 1036, 1035, 1034, 1033, 1032, 1031, 725, 729, - 1030, 726, 730, 732, 1029, 1028, 1027, 731, 735, 743, - 733, 737, 1026, 734, 746, 744, 747, 750, 1025, 752, - 1024, 755, 761, 760, 758, 763, 764, 1023, 1022, 1021, - 771, 762, 1020, 773, 1019, 774, 777, 779, 1018, 787, - 1017, 1016, 1015, 1014, 778, 788, 1013, 791, 792, 1012, - 1011, 1010, 790, 795, 1009, 1008, 1007, 1006, 793, 796, - 798, 797, 804, 801, 1005, 1004, 1003, 809, 811, 812, - - 813, 814, 816, 817, 820, 822, 827, 819, 1002, 815, - 833, 826, 839, 843, 845, 846, 847, 848, 999, 849, - 850, 851, 990, 854, 857, 855, 856, 989, 987, 858, - 866, 876, 862, 861, 986, 879, 880, 881, 984, 983, - 982, 882, 884, 888, 890, 889, 863, 891, 896, 897, - 899, 901, 900, 902, 903, 904, 908, 909, 912, 913, - 916, 980, 918, 924, 923, 925, 926, 977, 928, 929, - 930, 931, 975, 935, 936, 973, 934, 944, 942, 946, - 950, 954, 956, 957, 958, 960, 961, 959, 962, 864, - 964, 829, 766, 604, 969, 519, 965, 517, 477, 446, + 120, 168, 112, 115, 135, 127, 1101, 1109, 1090, 1109, + 0, 158, 173, 196, 201, 70, 206, 221, 226, 0, + 121, 152, 123, 139, 159, 140, 162, 166, 1089, 227, + 179, 31, 187, 119, 237, 182, 230, 188, 238, 240, + 239, 241, 180, 243, 250, 248, 251, 252, 255, 260, + 264, 262, 269, 257, 271, 282, 1088, 275, 281, 283, + 285, 289, 290, 293, 304, 297, 291, 292, 301, 302, + + 1087, 307, 310, 296, 313, 318, 321, 330, 332, 336, + 333, 337, 213, 334, 345, 1086, 0, 361, 365, 1085, + 379, 396, 0, 1084, 354, 349, 1083, 371, 1082, 370, + 1081, 369, 372, 327, 1080, 373, 385, 391, 347, 386, + 397, 1079, 402, 398, 403, 399, 405, 406, 409, 413, + 410, 420, 417, 421, 422, 424, 425, 430, 427, 434, + 437, 435, 438, 440, 1078, 1077, 444, 442, 1076, 448, + 1075, 1074, 470, 447, 449, 458, 451, 482, 1073, 450, + 1072, 484, 452, 483, 1071, 463, 485, 487, 488, 492, + 496, 489, 490, 495, 502, 508, 503, 513, 510, 506, + + 509, 511, 516, 521, 526, 527, 210, 1070, 528, 1109, + 539, 556, 560, 564, 569, 530, 533, 534, 570, 1069, + 1068, 1067, 571, 572, 573, 1066, 539, 575, 574, 295, + 576, 577, 579, 581, 580, 583, 586, 584, 1065, 589, + 594, 597, 590, 600, 603, 605, 608, 609, 1064, 1063, + 610, 612, 1062, 613, 615, 0, 614, 1061, 616, 618, + 619, 622, 632, 633, 630, 634, 640, 643, 647, 1060, + 648, 635, 1059, 1058, 651, 1057, 1056, 656, 636, 658, + 659, 661, 662, 663, 665, 666, 1055, 668, 1054, 670, + 669, 676, 1053, 681, 677, 1052, 687, 690, 689, 679, + + 697, 688, 698, 699, 701, 702, 704, 705, 1051, 706, + 1050, 710, 709, 711, 714, 715, 720, 1049, 716, 722, + 723, 726, 734, 736, 1048, 728, 738, 1047, 1046, 1045, + 1044, 1043, 1042, 1041, 739, 740, 1040, 741, 742, 747, + 1039, 1038, 1037, 744, 748, 749, 751, 752, 1036, 758, + 759, 764, 760, 762, 1035, 771, 1034, 768, 766, 777, + 770, 775, 776, 1033, 1032, 1031, 791, 778, 1030, 782, + 1029, 780, 788, 799, 1028, 800, 1027, 1026, 1025, 1024, + 787, 802, 1023, 803, 805, 1022, 1021, 1020, 809, 806, + 1019, 1018, 1017, 1016, 810, 811, 813, 814, 817, 816, + + 1015, 1014, 1013, 820, 823, 824, 828, 826, 829, 830, + 831, 836, 840, 832, 1010, 837, 848, 853, 855, 852, + 842, 856, 845, 859, 1000, 864, 866, 867, 999, 869, + 871, 872, 873, 998, 996, 877, 874, 878, 879, 875, + 995, 886, 891, 892, 994, 989, 988, 897, 898, 880, + 899, 900, 901, 906, 908, 909, 910, 912, 911, 914, + 915, 918, 920, 921, 923, 924, 927, 987, 928, 936, + 937, 938, 940, 982, 942, 935, 941, 943, 790, 946, + 947, 545, 948, 959, 949, 961, 965, 967, 968, 969, + 971, 970, 973, 972, 974, 543, 975, 456, 455, 454, - 970, 333, 1097, 1005, 1007, 83, 1011, 80 + 976, 253, 984, 178, 177, 147, 981, 144, 1109, 1016, + 1018, 83, 1022, 80 } ; -static yyconst short int yy_def[509] = +static yyconst short int yy_def[515] = { 0, - 503, 1, 503, 503, 503, 503, 504, 505, 506, 503, - 505, 505, 505, 505, 507, 505, 505, 505, 505, 505, - 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, - 505, 505, 505, 505, 505, 505, 504, 503, 505, 503, - 508, 508, 503, 503, 505, 505, 505, 505, 505, 507, - 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, - 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, - 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, - 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, - 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, - - 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, - 505, 505, 505, 503, 508, 508, 503, 505, 505, 505, - 49, 505, 505, 505, 505, 505, 505, 505, 505, 505, - 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, - 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, - 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, - 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, - 49, 505, 505, 505, 505, 505, 505, 505, 505, 505, - 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, - 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, - - 505, 505, 505, 505, 505, 503, 503, 503, 503, 505, - 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, - 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, - 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, - 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, - 505, 171, 505, 505, 505, 505, 505, 505, 505, 505, - 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, - 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, - 505, 505, 505, 505, 505, 503, 505, 505, 505, 505, - 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, - - 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, - 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, - 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, - 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, - 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, - 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, - 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, - 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, - 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, - 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, - - 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, - 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, - 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, - 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, - 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, - 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, - 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, - 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, - 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, - 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, + 509, 1, 509, 509, 509, 509, 510, 511, 512, 509, + 511, 511, 511, 511, 513, 511, 511, 511, 511, 511, + 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, + 511, 511, 511, 511, 511, 511, 510, 509, 511, 509, + 514, 514, 509, 509, 511, 511, 511, 511, 511, 513, + 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, + 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, + 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, + 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, + 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, + + 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, + 511, 511, 511, 511, 511, 509, 514, 514, 509, 511, + 511, 511, 49, 511, 511, 511, 511, 511, 511, 511, + 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, + 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, + 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, + 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, + 511, 511, 49, 511, 511, 511, 511, 511, 511, 511, + 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, + 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, + + 511, 511, 511, 511, 511, 511, 511, 511, 511, 509, + 509, 509, 509, 511, 511, 511, 511, 511, 511, 511, + 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, + 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, + 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, + 511, 511, 511, 511, 511, 173, 511, 511, 511, 511, + 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, + 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, + 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, + 511, 509, 511, 511, 511, 511, 511, 511, 511, 511, + + 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, + 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, + 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, + 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, + 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, + 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, + 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, + 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, + 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, + 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, + + 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, + 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, + 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, + 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, + 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, + 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, + 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, + 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, + 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, + 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, - 505, 505, 0, 503, 503, 503, 503, 503 + 511, 511, 511, 511, 511, 511, 511, 511, 0, 509, + 509, 509, 509, 509 } ; -static yyconst short int yy_nxt[1141] = +static yyconst short int yy_nxt[1153] = { 0, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 4, 15, 8, 8, 8, 16, 17, 18, 19, 20, 21, 22, 8, 23, 8, 24, 25, 26, 27, 28, 8, 29, 30, 31, 32, 33, 34, 35, 8, 36, 42, 40, 43, 43, 43, 43, 44, - 44, 44, 44, 45, 45, 45, 45, 40, 46, 134, - 40, 135, 40, 40, 47, 48, 48, 48, 48, 40, - 47, 48, 48, 48, 48, 40, 40, 69, 118, 40, - 84, 40, 115, 40, 51, 41, 85, 70, 56, 40, + 44, 44, 44, 45, 45, 45, 45, 40, 46, 136, + 40, 137, 40, 40, 47, 48, 48, 48, 48, 40, + 47, 48, 48, 48, 48, 40, 40, 69, 120, 40, + 84, 40, 117, 40, 51, 41, 85, 70, 56, 40, 90, 52, 57, 53, 40, 54, 49, 58, 55, 60, 59, 61, 40, 40, 40, 76, 77, 64, 71, 40, 40, 65, 62, 74, 78, 66, 63, 67, 72, 75, 68, 40, 79, 40, 73, 40, 81, 80, 40, 86, - 108, 87, 40, 40, 40, 88, 40, 110, 99, 82, - 40, 89, 122, 109, 125, 83, 91, 111, 40, 113, - 40, 100, 40, 40, 101, 137, 92, 40, 203, 93, - 40, 102, 94, 95, 128, 40, 112, 116, 116, 116, - 116, 126, 141, 96, 97, 40, 98, 91, 123, 40, - 124, 40, 43, 43, 43, 43, 129, 103, 117, 44, - 44, 44, 44, 40, 104, 127, 105, 40, 106, 40, - - 133, 40, 40, 107, 47, 45, 45, 45, 45, 40, - 119, 119, 119, 119, 40, 130, 40, 120, 297, 148, - 136, 40, 156, 120, 47, 48, 48, 48, 48, 40, - 121, 121, 121, 121, 40, 40, 121, 121, 40, 121, - 121, 121, 121, 121, 121, 40, 140, 40, 40, 40, - 131, 40, 138, 40, 40, 143, 144, 132, 40, 40, - 149, 40, 142, 146, 139, 40, 40, 40, 40, 40, - 147, 40, 145, 152, 159, 40, 150, 151, 157, 162, - 153, 154, 161, 155, 158, 40, 160, 40, 164, 40, - 163, 40, 166, 40, 172, 171, 40, 40, 40, 40, - - 165, 40, 167, 173, 168, 40, 180, 182, 40, 169, - 40, 174, 176, 40, 40, 177, 170, 181, 178, 175, - 40, 179, 40, 183, 188, 40, 184, 186, 40, 40, - 202, 40, 197, 198, 185, 40, 189, 190, 187, 192, - 191, 196, 40, 40, 193, 199, 40, 40, 200, 40, - 201, 40, 194, 116, 116, 116, 116, 195, 207, 207, - 207, 207, 212, 204, 205, 208, 40, 213, 40, 40, - 218, 208, 119, 119, 119, 119, 40, 214, 40, 120, - 40, 216, 215, 40, 40, 120, 209, 210, 40, 211, - 211, 211, 211, 40, 40, 217, 219, 40, 223, 224, - - 220, 40, 222, 221, 40, 40, 40, 40, 40, 40, - 225, 227, 40, 40, 226, 229, 230, 228, 234, 40, - 40, 235, 40, 40, 40, 237, 40, 40, 231, 236, - 232, 40, 233, 239, 40, 240, 242, 238, 40, 40, - 40, 241, 40, 40, 40, 243, 245, 40, 40, 40, - 246, 40, 40, 40, 40, 247, 255, 244, 249, 40, - 288, 261, 40, 262, 250, 251, 248, 252, 252, 252, - 252, 40, 253, 252, 252, 254, 252, 252, 252, 252, - 252, 252, 40, 260, 40, 40, 40, 40, 40, 40, - 40, 256, 263, 257, 40, 40, 40, 258, 266, 259, - - 265, 40, 40, 268, 269, 267, 40, 264, 40, 40, - 273, 270, 271, 272, 40, 275, 40, 40, 40, 274, - 40, 276, 278, 40, 40, 280, 281, 277, 282, 40, - 40, 40, 40, 284, 283, 279, 207, 207, 207, 207, - 40, 40, 285, 208, 295, 294, 299, 209, 209, 208, - 286, 286, 286, 286, 286, 286, 286, 286, 211, 211, - 211, 211, 40, 211, 211, 211, 211, 40, 40, 40, - 40, 40, 40, 40, 40, 40, 40, 40, 291, 40, - 40, 40, 302, 40, 40, 287, 289, 290, 304, 303, - 298, 40, 40, 40, 40, 292, 293, 301, 300, 306, - - 40, 296, 308, 40, 40, 307, 305, 40, 311, 40, - 40, 40, 309, 310, 40, 40, 40, 40, 312, 40, - 40, 40, 313, 40, 314, 315, 316, 321, 319, 320, - 323, 40, 325, 40, 317, 322, 40, 318, 40, 40, - 327, 40, 40, 40, 324, 330, 326, 40, 329, 332, - 331, 40, 333, 40, 334, 40, 328, 40, 336, 40, - 335, 40, 339, 337, 40, 40, 40, 40, 338, 40, - 40, 286, 286, 286, 286, 40, 340, 343, 40, 346, - 349, 40, 341, 348, 40, 342, 350, 40, 351, 352, - 345, 347, 344, 40, 353, 40, 40, 40, 40, 40, - - 40, 355, 40, 40, 40, 40, 40, 358, 40, 40, - 362, 363, 40, 40, 354, 356, 357, 359, 364, 361, - 365, 369, 360, 40, 366, 40, 40, 40, 40, 367, - 368, 40, 40, 372, 371, 40, 373, 374, 40, 40, - 370, 375, 40, 40, 40, 40, 40, 40, 40, 376, - 40, 380, 379, 378, 382, 384, 40, 40, 377, 40, - 40, 387, 390, 40, 385, 40, 381, 383, 40, 386, - 388, 40, 389, 40, 40, 40, 40, 40, 393, 40, - 392, 395, 396, 391, 40, 394, 40, 40, 400, 401, - 40, 40, 40, 397, 398, 399, 404, 406, 402, 405, - - 40, 40, 403, 40, 40, 40, 40, 407, 40, 40, - 40, 40, 408, 410, 40, 411, 412, 40, 409, 416, - 413, 414, 40, 417, 40, 40, 40, 40, 40, 40, - 40, 415, 40, 40, 418, 40, 424, 419, 425, 40, - 40, 423, 40, 420, 433, 421, 40, 426, 427, 429, - 428, 422, 40, 431, 430, 432, 40, 434, 40, 40, - 40, 40, 40, 40, 40, 435, 437, 40, 40, 40, - 40, 40, 439, 442, 40, 40, 40, 40, 446, 40, - 451, 436, 443, 438, 447, 440, 441, 444, 448, 40, - 450, 445, 40, 40, 40, 40, 449, 40, 453, 452, - - 455, 40, 40, 40, 40, 460, 456, 454, 458, 40, - 40, 461, 40, 40, 40, 40, 40, 40, 459, 465, - 467, 40, 40, 463, 457, 40, 40, 464, 466, 40, - 468, 40, 462, 469, 472, 473, 40, 40, 40, 40, - 470, 40, 40, 40, 40, 471, 476, 40, 40, 40, - 480, 477, 474, 478, 479, 40, 482, 40, 485, 40, - 475, 483, 486, 40, 487, 481, 484, 40, 488, 40, - 40, 40, 40, 40, 40, 40, 489, 40, 40, 494, - 495, 496, 40, 40, 490, 491, 40, 501, 40, 500, - 40, 493, 492, 40, 499, 40, 40, 40, 498, 40, + 110, 87, 40, 40, 40, 88, 40, 112, 100, 82, + 40, 89, 124, 111, 127, 83, 91, 113, 40, 115, + 40, 101, 40, 40, 102, 139, 92, 40, 93, 94, + 40, 103, 95, 96, 130, 40, 114, 118, 118, 118, + 118, 128, 40, 97, 98, 40, 99, 91, 125, 40, + 126, 40, 43, 43, 43, 43, 131, 104, 129, 105, + 40, 40, 40, 40, 106, 40, 107, 132, 108, 135, + + 40, 40, 151, 109, 119, 44, 44, 44, 44, 47, + 45, 45, 45, 45, 40, 121, 121, 121, 121, 40, + 142, 138, 122, 40, 207, 144, 40, 290, 122, 47, + 48, 48, 48, 48, 40, 123, 123, 123, 123, 40, + 40, 123, 123, 40, 123, 123, 123, 123, 123, 123, + 40, 40, 40, 40, 40, 133, 40, 140, 143, 145, + 146, 40, 134, 40, 40, 40, 40, 148, 40, 141, + 40, 158, 150, 40, 149, 40, 147, 40, 161, 152, + 154, 153, 40, 164, 40, 159, 155, 156, 40, 157, + 162, 160, 163, 166, 40, 40, 40, 165, 40, 167, + + 168, 169, 40, 40, 40, 40, 40, 170, 40, 40, + 40, 185, 171, 176, 40, 40, 175, 40, 183, 172, + 40, 177, 184, 40, 303, 173, 40, 186, 187, 178, + 174, 40, 179, 189, 40, 180, 188, 192, 181, 193, + 40, 182, 191, 40, 190, 40, 40, 40, 194, 40, + 40, 196, 195, 201, 202, 206, 197, 200, 40, 204, + 40, 205, 40, 222, 198, 226, 203, 40, 208, 199, + 118, 118, 118, 118, 211, 211, 211, 211, 216, 209, + 217, 212, 40, 40, 40, 40, 40, 212, 121, 121, + 121, 121, 40, 218, 223, 122, 219, 220, 40, 40, + + 221, 122, 213, 214, 40, 215, 215, 215, 215, 40, + 40, 40, 40, 225, 227, 40, 40, 231, 40, 40, + 224, 233, 40, 40, 229, 228, 40, 234, 230, 232, + 40, 238, 239, 40, 40, 40, 241, 40, 40, 235, + 40, 236, 240, 40, 243, 237, 244, 40, 40, 242, + 40, 40, 246, 40, 247, 40, 245, 40, 249, 250, + 40, 40, 40, 40, 40, 40, 251, 40, 40, 40, + 248, 40, 253, 260, 267, 254, 40, 252, 255, 256, + 256, 256, 256, 257, 265, 256, 256, 258, 256, 256, + 256, 256, 256, 256, 259, 40, 40, 40, 40, 269, + + 40, 40, 40, 40, 261, 40, 262, 266, 40, 40, + 263, 271, 264, 270, 273, 40, 40, 268, 274, 40, + 272, 40, 40, 40, 40, 275, 40, 284, 276, 40, + 279, 277, 278, 280, 40, 281, 282, 283, 286, 40, + 40, 40, 287, 40, 288, 285, 40, 40, 211, 211, + 211, 211, 40, 294, 289, 212, 40, 300, 40, 291, + 293, 212, 213, 213, 295, 292, 292, 292, 292, 292, + 292, 292, 292, 215, 215, 215, 215, 40, 215, 215, + 215, 215, 40, 40, 40, 40, 40, 40, 40, 40, + 40, 297, 40, 40, 40, 305, 40, 40, 308, 40, + + 296, 301, 40, 40, 304, 309, 310, 40, 298, 299, + 40, 306, 313, 40, 302, 307, 40, 312, 40, 314, + 311, 40, 40, 40, 315, 40, 40, 40, 40, 40, + 317, 40, 40, 318, 316, 40, 325, 320, 327, 319, + 322, 321, 326, 40, 329, 40, 40, 40, 40, 40, + 323, 324, 328, 40, 331, 333, 40, 335, 330, 343, + 40, 40, 336, 340, 40, 337, 334, 338, 332, 40, + 339, 40, 40, 341, 40, 40, 40, 345, 40, 40, + 342, 40, 40, 40, 344, 292, 292, 292, 292, 349, + 40, 346, 40, 352, 40, 354, 347, 348, 356, 355, + + 40, 40, 40, 40, 351, 353, 350, 357, 358, 359, + 40, 40, 40, 360, 40, 40, 361, 40, 40, 40, + 362, 364, 40, 40, 40, 368, 369, 40, 40, 40, + 363, 365, 370, 40, 367, 40, 40, 371, 366, 40, + 372, 40, 375, 378, 377, 374, 376, 40, 379, 40, + 373, 40, 40, 40, 40, 40, 380, 40, 381, 382, + 40, 40, 40, 385, 40, 40, 386, 384, 390, 388, + 391, 40, 40, 40, 383, 40, 393, 40, 387, 40, + 389, 40, 396, 40, 40, 395, 401, 392, 40, 40, + 40, 40, 398, 40, 394, 40, 397, 399, 400, 402, + + 40, 40, 410, 40, 40, 403, 404, 405, 406, 407, + 411, 409, 40, 40, 408, 40, 40, 412, 40, 40, + 413, 414, 40, 40, 40, 416, 40, 40, 417, 40, + 40, 419, 415, 40, 422, 418, 40, 40, 420, 40, + 423, 40, 40, 40, 40, 40, 421, 424, 430, 40, + 40, 431, 425, 40, 426, 40, 429, 427, 40, 433, + 432, 40, 435, 428, 434, 40, 40, 436, 40, 40, + 438, 439, 40, 440, 441, 437, 443, 40, 442, 40, + 40, 444, 40, 445, 40, 40, 40, 40, 40, 448, + 40, 40, 40, 40, 457, 452, 454, 449, 455, 40, + + 446, 450, 447, 453, 40, 40, 458, 456, 451, 459, + 40, 40, 40, 40, 40, 461, 463, 464, 460, 40, + 462, 40, 40, 40, 40, 40, 467, 40, 40, 465, + 471, 40, 473, 40, 40, 469, 40, 40, 470, 472, + 40, 40, 474, 466, 468, 478, 479, 475, 40, 40, + 40, 40, 476, 40, 40, 40, 40, 477, 482, 40, + 40, 40, 40, 480, 486, 483, 484, 488, 485, 491, + 481, 487, 40, 489, 40, 494, 492, 490, 40, 493, + 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, + 501, 495, 500, 502, 40, 40, 506, 40, 497, 496, - 40, 497, 40, 40, 502, 37, 37, 37, 37, 39, - 39, 50, 40, 50, 50, 40, 40, 40, 40, 40, + 40, 40, 40, 499, 498, 505, 507, 40, 40, 40, + 504, 40, 40, 40, 503, 508, 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, 40, 40, 40, 40, 40, 40, 40, 40, - 40, 40, 40, 40, 40, 40, 40, 206, 40, 40, - 40, 40, 114, 40, 38, 503, 3, 503, 503, 503, + 40, 40, 40, 40, 40, 40, 40, 40, 40, 210, - 503, 503, 503, 503, 503, 503, 503, 503, 503, 503, - 503, 503, 503, 503, 503, 503, 503, 503, 503, 503, - 503, 503, 503, 503, 503, 503, 503, 503, 503, 503, - 503, 503, 503, 503, 503, 503, 503, 503, 503, 503 + 40, 40, 40, 40, 116, 40, 38, 509, 3, 509, + 509, 509, 509, 509, 509, 509, 509, 509, 509, 509, + 509, 509, 509, 509, 509, 509, 509, 509, 509, 509, + 509, 509, 509, 509, 509, 509, 509, 509, 509, 509, + 509, 509, 509, 509, 509, 509, 509, 509, 509, 509, + 509, 509 } ; -static yyconst short int yy_chk[1141] = +static yyconst short int yy_chk[1153] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -705,7 +709,7 @@ 10, 10, 10, 11, 11, 11, 11, 11, 12, 62, 20, 62, 26, 12, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 16, 20, 46, 17, - 26, 29, 508, 46, 16, 506, 26, 20, 17, 23, + 26, 29, 514, 46, 16, 512, 26, 20, 17, 23, 29, 16, 17, 16, 18, 16, 13, 17, 16, 18, 17, 18, 19, 21, 22, 23, 23, 19, 21, 24, @@ -713,115 +717,117 @@ 19, 25, 24, 28, 21, 33, 25, 24, 34, 27, 33, 27, 64, 31, 51, 28, 53, 34, 31, 25, 36, 28, 51, 33, 53, 25, 30, 35, 35, 36, - 30, 31, 54, 56, 31, 64, 30, 67, 111, 30, - 111, 31, 30, 30, 56, 52, 35, 42, 42, 42, - 42, 54, 67, 30, 30, 57, 30, 32, 52, 55, - 52, 32, 43, 43, 43, 43, 57, 32, 44, 44, - 44, 44, 44, 61, 32, 55, 32, 58, 32, 63, - - 61, 72, 226, 32, 45, 45, 45, 45, 45, 45, - 47, 47, 47, 47, 47, 58, 78, 47, 226, 72, - 63, 66, 78, 47, 48, 48, 48, 48, 48, 48, - 49, 49, 49, 49, 49, 60, 49, 49, 68, 49, - 49, 49, 49, 49, 49, 65, 66, 69, 71, 70, - 60, 73, 65, 74, 76, 69, 70, 60, 77, 75, - 73, 79, 68, 71, 65, 84, 92, 81, 91, 80, - 71, 82, 70, 76, 80, 83, 74, 75, 79, 82, - 77, 77, 81, 77, 79, 85, 80, 86, 84, 88, - 83, 89, 86, 90, 92, 91, 93, 94, 95, 96, - - 85, 97, 88, 93, 89, 102, 95, 97, 103, 90, - 98, 93, 94, 99, 101, 94, 90, 96, 94, 93, - 104, 94, 105, 98, 102, 110, 99, 101, 108, 107, - 110, 106, 108, 108, 99, 109, 103, 104, 101, 106, - 105, 107, 112, 113, 106, 108, 502, 132, 109, 124, - 109, 123, 106, 116, 116, 116, 116, 106, 117, 117, - 117, 117, 123, 112, 113, 117, 130, 124, 126, 128, - 132, 117, 119, 119, 119, 119, 119, 126, 135, 119, - 131, 130, 128, 138, 139, 119, 120, 120, 134, 120, - 120, 120, 120, 120, 136, 131, 134, 137, 138, 139, - - 135, 141, 137, 136, 143, 142, 144, 145, 146, 147, - 141, 142, 149, 148, 141, 144, 145, 143, 148, 151, - 150, 149, 152, 155, 153, 151, 154, 156, 145, 150, - 146, 157, 147, 153, 158, 154, 156, 152, 159, 160, - 161, 155, 162, 165, 166, 157, 159, 174, 168, 172, - 160, 179, 173, 213, 180, 161, 174, 158, 165, 500, - 213, 179, 177, 180, 166, 168, 162, 171, 171, 171, - 171, 181, 172, 171, 171, 173, 171, 171, 171, 171, - 171, 171, 175, 177, 183, 184, 186, 185, 189, 190, - 499, 175, 181, 175, 187, 188, 191, 175, 185, 175, - - 184, 192, 193, 187, 188, 186, 194, 183, 195, 196, - 192, 189, 190, 191, 198, 194, 199, 197, 200, 193, - 202, 195, 197, 201, 205, 199, 200, 196, 201, 203, - 498, 224, 496, 203, 202, 198, 207, 207, 207, 207, - 223, 228, 205, 207, 224, 223, 228, 208, 208, 207, - 208, 208, 208, 208, 209, 209, 209, 209, 210, 210, - 210, 210, 210, 211, 211, 211, 211, 211, 212, 214, - 215, 219, 220, 221, 225, 227, 230, 231, 219, 229, - 232, 233, 231, 234, 236, 212, 214, 215, 233, 232, - 227, 239, 240, 238, 241, 220, 221, 230, 229, 236, - - 237, 225, 238, 242, 243, 237, 234, 247, 241, 244, - 250, 248, 239, 240, 251, 256, 254, 494, 242, 253, - 255, 257, 243, 258, 244, 247, 248, 255, 253, 254, - 257, 259, 258, 260, 250, 256, 262, 251, 261, 267, - 259, 263, 264, 266, 257, 262, 258, 272, 261, 264, - 263, 270, 266, 273, 267, 274, 260, 275, 272, 276, - 270, 277, 275, 273, 278, 280, 279, 282, 274, 284, - 285, 286, 286, 286, 286, 288, 276, 279, 289, 284, - 288, 291, 277, 285, 292, 278, 289, 293, 291, 292, - 282, 284, 280, 294, 293, 295, 296, 297, 298, 300, - - 299, 295, 301, 302, 304, 307, 309, 298, 308, 306, - 302, 304, 311, 310, 294, 296, 297, 299, 306, 301, - 307, 311, 300, 313, 308, 314, 315, 316, 317, 309, - 310, 320, 318, 315, 314, 321, 316, 317, 329, 332, - 313, 318, 330, 333, 338, 334, 341, 344, 339, 320, - 342, 332, 330, 329, 334, 339, 340, 346, 321, 345, - 347, 342, 346, 348, 340, 350, 333, 338, 352, 341, - 344, 355, 345, 354, 353, 362, 356, 357, 350, 493, - 348, 353, 354, 347, 361, 352, 364, 366, 361, 361, - 367, 375, 368, 355, 356, 357, 366, 368, 362, 367, - - 370, 376, 364, 383, 378, 379, 389, 370, 384, 390, - 392, 391, 375, 378, 394, 379, 383, 393, 376, 391, - 384, 389, 398, 392, 399, 400, 401, 402, 410, 403, - 404, 390, 408, 405, 393, 406, 402, 394, 403, 412, - 407, 401, 492, 398, 412, 399, 411, 404, 405, 407, - 406, 400, 413, 410, 408, 411, 414, 413, 415, 416, - 417, 418, 420, 421, 422, 414, 416, 424, 426, 427, - 425, 430, 418, 422, 434, 433, 447, 490, 427, 431, - 434, 415, 424, 417, 430, 420, 421, 425, 431, 432, - 433, 426, 436, 437, 438, 442, 432, 443, 437, 436, - - 442, 444, 446, 445, 448, 447, 443, 438, 445, 449, - 450, 448, 451, 453, 452, 454, 455, 456, 446, 452, - 454, 457, 458, 450, 444, 459, 460, 451, 453, 461, - 455, 463, 449, 456, 459, 460, 465, 464, 466, 467, - 457, 469, 470, 471, 472, 458, 464, 477, 474, 475, - 469, 465, 461, 466, 467, 479, 471, 478, 475, 480, - 463, 472, 477, 481, 478, 470, 474, 482, 479, 483, - 484, 485, 488, 486, 487, 489, 480, 491, 497, 485, - 486, 487, 495, 501, 481, 482, 476, 497, 473, 495, - 468, 484, 483, 462, 491, 441, 440, 439, 489, 435, - - 429, 488, 428, 423, 501, 504, 504, 504, 504, 505, - 505, 507, 419, 507, 507, 409, 397, 396, 395, 388, - 387, 386, 385, 382, 381, 380, 377, 374, 373, 372, - 371, 369, 365, 363, 360, 359, 358, 351, 349, 343, - 337, 336, 335, 331, 328, 327, 326, 325, 324, 323, - 322, 319, 312, 305, 303, 290, 287, 283, 281, 271, - 269, 268, 265, 249, 246, 245, 235, 222, 218, 217, - 216, 204, 182, 178, 176, 170, 169, 167, 164, 163, - 140, 133, 129, 127, 125, 122, 118, 114, 100, 87, - 59, 39, 37, 8, 7, 3, 503, 503, 503, 503, - - 503, 503, 503, 503, 503, 503, 503, 503, 503, 503, - 503, 503, 503, 503, 503, 503, 503, 503, 503, 503, - 503, 503, 503, 503, 503, 503, 503, 503, 503, 503, - 503, 503, 503, 503, 503, 503, 503, 503, 503, 503 + 30, 31, 54, 56, 31, 64, 30, 508, 30, 30, + 506, 31, 30, 30, 56, 52, 35, 42, 42, 42, + 42, 54, 55, 30, 30, 57, 30, 32, 52, 58, + 52, 32, 43, 43, 43, 43, 57, 32, 55, 32, + 505, 504, 61, 73, 32, 66, 32, 58, 32, 61, + + 63, 68, 73, 32, 44, 44, 44, 44, 44, 45, + 45, 45, 45, 45, 45, 47, 47, 47, 47, 47, + 66, 63, 47, 207, 113, 68, 113, 207, 47, 48, + 48, 48, 48, 48, 48, 49, 49, 49, 49, 49, + 60, 49, 49, 67, 49, 49, 49, 49, 49, 49, + 65, 69, 71, 70, 72, 60, 74, 65, 67, 69, + 70, 76, 60, 75, 77, 78, 502, 71, 79, 65, + 84, 78, 72, 80, 71, 82, 70, 81, 80, 74, + 76, 75, 83, 82, 85, 79, 77, 77, 88, 77, + 80, 79, 81, 84, 89, 86, 90, 83, 91, 85, + + 86, 88, 92, 93, 97, 98, 94, 89, 230, 104, + 96, 98, 90, 94, 99, 100, 93, 95, 96, 90, + 102, 94, 97, 103, 230, 91, 105, 99, 100, 94, + 92, 106, 95, 102, 107, 95, 100, 104, 95, 105, + 134, 95, 103, 108, 102, 109, 111, 114, 106, 110, + 112, 108, 107, 110, 110, 112, 108, 109, 115, 111, + 139, 111, 126, 134, 108, 139, 110, 125, 114, 108, + 118, 118, 118, 118, 119, 119, 119, 119, 125, 115, + 126, 119, 132, 130, 128, 133, 136, 119, 121, 121, + 121, 121, 121, 128, 136, 121, 130, 132, 137, 140, + + 133, 121, 122, 122, 138, 122, 122, 122, 122, 122, + 141, 144, 146, 138, 140, 143, 145, 144, 147, 148, + 137, 146, 149, 151, 143, 141, 150, 147, 143, 145, + 153, 150, 151, 152, 154, 155, 153, 156, 157, 147, + 159, 148, 152, 158, 155, 149, 156, 160, 162, 154, + 161, 163, 158, 164, 159, 168, 157, 167, 161, 162, + 174, 170, 175, 180, 177, 183, 163, 500, 499, 498, + 160, 176, 167, 177, 183, 168, 186, 164, 170, 173, + 173, 173, 173, 174, 180, 173, 173, 175, 173, 173, + 173, 173, 173, 173, 176, 178, 184, 182, 187, 186, + + 188, 189, 192, 193, 178, 190, 178, 182, 194, 191, + 178, 188, 178, 187, 190, 195, 197, 184, 191, 200, + 189, 196, 201, 199, 202, 192, 198, 201, 193, 203, + 196, 194, 195, 197, 204, 198, 199, 200, 203, 205, + 206, 209, 204, 216, 205, 202, 217, 218, 211, 211, + 211, 211, 227, 217, 206, 211, 496, 227, 482, 209, + 216, 211, 212, 212, 218, 212, 212, 212, 212, 213, + 213, 213, 213, 214, 214, 214, 214, 214, 215, 215, + 215, 215, 215, 219, 223, 224, 225, 229, 228, 231, + 232, 223, 233, 235, 234, 232, 236, 238, 235, 237, + + 219, 228, 240, 243, 231, 236, 237, 241, 224, 225, + 242, 233, 241, 244, 229, 234, 245, 240, 246, 242, + 238, 247, 248, 251, 243, 252, 254, 257, 255, 259, + 245, 260, 261, 246, 244, 262, 257, 248, 260, 247, + 252, 251, 259, 265, 262, 263, 264, 266, 272, 279, + 254, 255, 261, 267, 263, 264, 268, 266, 262, 279, + 269, 271, 267, 272, 275, 268, 265, 269, 263, 278, + 271, 280, 281, 275, 282, 283, 284, 281, 285, 286, + 278, 288, 291, 290, 280, 292, 292, 292, 292, 285, + 295, 282, 300, 290, 294, 291, 283, 284, 295, 294, + + 297, 302, 299, 298, 288, 290, 286, 297, 298, 299, + 301, 303, 304, 300, 305, 306, 301, 307, 308, 310, + 302, 304, 313, 312, 314, 308, 310, 315, 316, 319, + 303, 305, 312, 317, 307, 320, 321, 313, 306, 322, + 314, 326, 317, 321, 320, 316, 319, 323, 322, 324, + 315, 327, 335, 336, 338, 339, 323, 344, 324, 326, + 340, 345, 346, 336, 347, 348, 338, 335, 345, 340, + 346, 350, 351, 353, 327, 354, 348, 352, 339, 359, + 344, 358, 352, 361, 356, 351, 359, 347, 362, 363, + 360, 368, 354, 372, 350, 370, 353, 356, 358, 360, + + 381, 373, 372, 479, 367, 361, 362, 363, 367, 367, + 373, 370, 374, 376, 368, 382, 384, 374, 385, 390, + 376, 381, 389, 395, 396, 384, 397, 398, 385, 400, + 399, 390, 382, 404, 397, 389, 405, 406, 395, 408, + 398, 407, 409, 410, 411, 414, 396, 399, 408, 412, + 416, 409, 400, 413, 404, 421, 407, 405, 423, 411, + 410, 417, 413, 406, 412, 420, 418, 414, 419, 422, + 417, 418, 424, 419, 420, 416, 422, 426, 421, 427, + 428, 423, 430, 424, 431, 432, 433, 437, 440, 428, + 436, 438, 439, 450, 440, 433, 437, 430, 438, 442, + + 426, 431, 427, 436, 443, 444, 442, 439, 432, 443, + 448, 449, 451, 452, 453, 448, 450, 451, 444, 454, + 449, 455, 456, 457, 459, 458, 454, 460, 461, 452, + 458, 462, 460, 463, 464, 456, 465, 466, 457, 459, + 467, 469, 461, 453, 455, 465, 466, 462, 476, 470, + 471, 472, 463, 473, 477, 475, 478, 464, 470, 480, + 481, 483, 485, 467, 475, 471, 472, 477, 473, 481, + 469, 476, 484, 478, 486, 485, 483, 480, 487, 484, + 488, 489, 490, 492, 491, 494, 493, 495, 497, 501, + 492, 486, 491, 493, 507, 474, 501, 503, 488, 487, + + 468, 447, 446, 490, 489, 497, 503, 445, 441, 435, + 495, 434, 429, 425, 494, 507, 510, 510, 510, 510, + 511, 511, 513, 415, 513, 513, 403, 402, 401, 394, + 393, 392, 391, 388, 387, 386, 383, 380, 379, 378, + 377, 375, 371, 369, 366, 365, 364, 357, 355, 349, + 343, 342, 341, 337, 334, 333, 332, 331, 330, 329, + 328, 325, 318, 311, 309, 296, 293, 289, 287, 277, + 276, 274, 273, 270, 258, 253, 250, 249, 239, 226, + 222, 221, 220, 208, 185, 181, 179, 172, 171, 169, + 166, 165, 142, 135, 131, 129, 127, 124, 120, 116, + + 101, 87, 59, 39, 37, 8, 7, 3, 509, 509, + 509, 509, 509, 509, 509, 509, 509, 509, 509, 509, + 509, 509, 509, 509, 509, 509, 509, 509, 509, 509, + 509, 509, 509, 509, 509, 509, 509, 509, 509, 509, + 509, 509, 509, 509, 509, 509, 509, 509, 509, 509, + 509, 509 } ; static yy_state_type yy_state_buf[YY_BUF_SIZE + 2], *yy_state_ptr; @@ -838,7 +844,7 @@ #define YY_MORE_ADJ 0 #define YY_RESTORE_YY_MORE_OFFSET char *yytext; -#line 1 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 1 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" #define INITIAL 0 /*===-- Lexer.l - Scanner for llvm assembly files --------------*- C++ -*--===// // @@ -853,7 +859,7 @@ // //===----------------------------------------------------------------------===*/ #define YY_NEVER_INTERACTIVE 1 -#line 28 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 28 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" #include "ParserInternals.h" #include "llvm/Module.h" #include @@ -868,8 +874,18 @@ yy_scan_string (str); } +// Construct a token value for a non-obsolete token #define RET_TOK(type, Enum, sym) \ - llvmAsmlval.type = Instruction::Enum; return sym + llvmAsmlval.type.opcode = Instruction::Enum; \ + llvmAsmlval.type.obsolete = false; \ + return sym + +// Construct a token value for an obsolete token +#define RET_TOK_OBSOLETE(type, Enum, sym) \ + llvmAsmlval.type.opcode = Instruction::Enum; \ + llvmAsmlval.type.obsolete = true; \ + return sym + namespace llvm { @@ -979,7 +995,7 @@ /* HexIntConstant - Hexadecimal constant generated by the CFE to avoid forcing * it to deal with 64 bit numbers. */ -#line 983 "Lexer.cpp" +#line 999 "Lexer.cpp" /* Macros after this point can all be overridden by user definitions in * section 1. @@ -1130,10 +1146,10 @@ register char *yy_cp = NULL, *yy_bp = NULL; register int yy_act; -#line 179 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 189 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" -#line 1137 "Lexer.cpp" +#line 1153 "Lexer.cpp" if ( yy_init ) { @@ -1181,14 +1197,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 >= 504 ) + if ( yy_current_state >= 510 ) 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 != 503 ); + while ( yy_current_state != 509 ); yy_find_action: yy_current_state = *--yy_state_ptr; @@ -1226,516 +1242,526 @@ { /* beginning of action switch */ case 1: YY_RULE_SETUP -#line 181 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 191 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { /* Ignore comments for now */ } YY_BREAK case 2: YY_RULE_SETUP -#line 183 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 193 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { return BEGINTOK; } YY_BREAK case 3: YY_RULE_SETUP -#line 184 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 194 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { return ENDTOK; } YY_BREAK case 4: YY_RULE_SETUP -#line 185 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 195 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { return TRUETOK; } YY_BREAK case 5: YY_RULE_SETUP -#line 186 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 196 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { return FALSETOK; } YY_BREAK case 6: YY_RULE_SETUP -#line 187 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 197 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { return DECLARE; } YY_BREAK case 7: YY_RULE_SETUP -#line 188 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 198 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { return GLOBAL; } YY_BREAK case 8: YY_RULE_SETUP -#line 189 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 199 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { return CONSTANT; } YY_BREAK case 9: YY_RULE_SETUP -#line 190 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 200 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { return INTERNAL; } YY_BREAK case 10: YY_RULE_SETUP -#line 191 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 201 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { return LINKONCE; } YY_BREAK case 11: YY_RULE_SETUP -#line 192 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 202 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { return WEAK; } YY_BREAK case 12: YY_RULE_SETUP -#line 193 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 203 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { return APPENDING; } YY_BREAK case 13: YY_RULE_SETUP -#line 194 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 204 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { return DLLIMPORT; } YY_BREAK case 14: YY_RULE_SETUP -#line 195 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 205 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { return DLLEXPORT; } YY_BREAK case 15: YY_RULE_SETUP -#line 196 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 206 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { return EXTERN_WEAK; } YY_BREAK case 16: YY_RULE_SETUP -#line 197 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 207 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { return EXTERNAL; } /* Deprecated, turn into external */ YY_BREAK case 17: YY_RULE_SETUP -#line 198 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 208 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { return EXTERNAL; } YY_BREAK case 18: YY_RULE_SETUP -#line 199 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 209 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { return IMPLEMENTATION; } YY_BREAK case 19: YY_RULE_SETUP -#line 200 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 210 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { return ZEROINITIALIZER; } YY_BREAK case 20: YY_RULE_SETUP -#line 201 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 211 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { return DOTDOTDOT; } YY_BREAK case 21: YY_RULE_SETUP -#line 202 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 212 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { return UNDEF; } YY_BREAK case 22: YY_RULE_SETUP -#line 203 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 213 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { return NULL_TOK; } YY_BREAK case 23: YY_RULE_SETUP -#line 204 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 214 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { return TO; } YY_BREAK case 24: YY_RULE_SETUP -#line 205 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 215 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { RET_TOK(TermOpVal, Unwind, UNWIND); } YY_BREAK case 25: YY_RULE_SETUP -#line 206 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 216 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { return NOT; } /* Deprecated, turned into XOR */ YY_BREAK case 26: YY_RULE_SETUP -#line 207 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 217 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { return TAIL; } YY_BREAK case 27: YY_RULE_SETUP -#line 208 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 218 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { return TARGET; } YY_BREAK case 28: YY_RULE_SETUP -#line 209 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 219 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { return TRIPLE; } YY_BREAK case 29: YY_RULE_SETUP -#line 210 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 220 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { return DEPLIBS; } YY_BREAK case 30: YY_RULE_SETUP -#line 211 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 221 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { return ENDIAN; } YY_BREAK case 31: YY_RULE_SETUP -#line 212 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 222 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { return POINTERSIZE; } YY_BREAK case 32: YY_RULE_SETUP -#line 213 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 223 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { return DATA; } YY_BREAK case 33: YY_RULE_SETUP -#line 214 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 224 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { return LITTLE; } YY_BREAK case 34: YY_RULE_SETUP -#line 215 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 225 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { return BIG; } YY_BREAK case 35: YY_RULE_SETUP -#line 216 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 226 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { return VOLATILE; } YY_BREAK case 36: YY_RULE_SETUP -#line 217 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 227 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { return ALIGN; } YY_BREAK case 37: YY_RULE_SETUP -#line 218 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 228 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { return SECTION; } YY_BREAK case 38: YY_RULE_SETUP -#line 219 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 229 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { return MODULE; } YY_BREAK case 39: YY_RULE_SETUP -#line 220 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 230 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { return ASM_TOK; } YY_BREAK case 40: YY_RULE_SETUP -#line 221 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 231 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { return SIDEEFFECT; } YY_BREAK case 41: YY_RULE_SETUP -#line 223 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 233 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { return CC_TOK; } YY_BREAK case 42: YY_RULE_SETUP -#line 224 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 234 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { return CCC_TOK; } YY_BREAK case 43: YY_RULE_SETUP -#line 225 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 235 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { return CSRETCC_TOK; } YY_BREAK case 44: YY_RULE_SETUP -#line 226 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 236 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { return FASTCC_TOK; } YY_BREAK case 45: YY_RULE_SETUP -#line 227 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 237 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { return COLDCC_TOK; } YY_BREAK case 46: YY_RULE_SETUP -#line 228 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 238 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { return X86_STDCALLCC_TOK; } YY_BREAK case 47: YY_RULE_SETUP -#line 229 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 239 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { return X86_FASTCALLCC_TOK; } YY_BREAK case 48: YY_RULE_SETUP -#line 231 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 241 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { llvmAsmlval.PrimType = Type::VoidTy ; return VOID; } YY_BREAK case 49: YY_RULE_SETUP -#line 232 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 242 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { llvmAsmlval.PrimType = Type::BoolTy ; return BOOL; } YY_BREAK case 50: YY_RULE_SETUP -#line 233 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 243 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { llvmAsmlval.PrimType = Type::SByteTy ; return SBYTE; } YY_BREAK case 51: YY_RULE_SETUP -#line 234 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 244 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { llvmAsmlval.PrimType = Type::UByteTy ; return UBYTE; } YY_BREAK case 52: YY_RULE_SETUP -#line 235 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 245 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { llvmAsmlval.PrimType = Type::ShortTy ; return SHORT; } YY_BREAK case 53: YY_RULE_SETUP -#line 236 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 246 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { llvmAsmlval.PrimType = Type::UShortTy; return USHORT; } YY_BREAK case 54: YY_RULE_SETUP -#line 237 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 247 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { llvmAsmlval.PrimType = Type::IntTy ; return INT; } YY_BREAK case 55: YY_RULE_SETUP -#line 238 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 248 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { llvmAsmlval.PrimType = Type::UIntTy ; return UINT; } YY_BREAK case 56: YY_RULE_SETUP -#line 239 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 249 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { llvmAsmlval.PrimType = Type::LongTy ; return LONG; } YY_BREAK case 57: YY_RULE_SETUP -#line 240 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 250 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { llvmAsmlval.PrimType = Type::ULongTy ; return ULONG; } YY_BREAK case 58: YY_RULE_SETUP -#line 241 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 251 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { llvmAsmlval.PrimType = Type::FloatTy ; return FLOAT; } YY_BREAK case 59: YY_RULE_SETUP -#line 242 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 252 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { llvmAsmlval.PrimType = Type::DoubleTy; return DOUBLE; } YY_BREAK case 60: YY_RULE_SETUP -#line 243 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 253 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { llvmAsmlval.PrimType = Type::LabelTy ; return LABEL; } YY_BREAK case 61: YY_RULE_SETUP -#line 244 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 254 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { return TYPE; } YY_BREAK case 62: YY_RULE_SETUP -#line 245 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 255 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { return OPAQUE; } YY_BREAK case 63: YY_RULE_SETUP -#line 247 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 257 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { RET_TOK(BinaryOpVal, Add, ADD); } YY_BREAK case 64: YY_RULE_SETUP -#line 248 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 258 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { RET_TOK(BinaryOpVal, Sub, SUB); } YY_BREAK case 65: YY_RULE_SETUP -#line 249 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 259 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { RET_TOK(BinaryOpVal, Mul, MUL); } YY_BREAK case 66: YY_RULE_SETUP -#line 250 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(BinaryOpVal, Div, DIV); } +#line 260 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +{ RET_TOK_OBSOLETE(BinaryOpVal, UDiv, UDIV); } YY_BREAK case 67: YY_RULE_SETUP -#line 251 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(BinaryOpVal, Rem, REM); } +#line 261 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +{ RET_TOK(BinaryOpVal, UDiv, UDIV); } YY_BREAK case 68: YY_RULE_SETUP -#line 252 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(BinaryOpVal, And, AND); } +#line 262 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +{ RET_TOK(BinaryOpVal, UDiv, UDIV); } YY_BREAK case 69: YY_RULE_SETUP -#line 253 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(BinaryOpVal, Or , OR ); } +#line 263 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +{ RET_TOK(BinaryOpVal, Rem, REM); } YY_BREAK case 70: YY_RULE_SETUP -#line 254 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(BinaryOpVal, Xor, XOR); } +#line 264 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +{ RET_TOK(BinaryOpVal, And, AND); } YY_BREAK case 71: YY_RULE_SETUP -#line 255 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(BinaryOpVal, SetNE, SETNE); } +#line 265 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +{ RET_TOK(BinaryOpVal, Or , OR ); } YY_BREAK case 72: YY_RULE_SETUP -#line 256 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(BinaryOpVal, SetEQ, SETEQ); } +#line 266 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +{ RET_TOK(BinaryOpVal, Xor, XOR); } YY_BREAK case 73: YY_RULE_SETUP -#line 257 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(BinaryOpVal, SetLT, SETLT); } +#line 267 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +{ RET_TOK(BinaryOpVal, SetNE, SETNE); } YY_BREAK case 74: YY_RULE_SETUP -#line 258 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(BinaryOpVal, SetGT, SETGT); } +#line 268 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +{ RET_TOK(BinaryOpVal, SetEQ, SETEQ); } YY_BREAK case 75: YY_RULE_SETUP -#line 259 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(BinaryOpVal, SetLE, SETLE); } +#line 269 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +{ RET_TOK(BinaryOpVal, SetLT, SETLT); } YY_BREAK case 76: YY_RULE_SETUP -#line 260 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(BinaryOpVal, SetGE, SETGE); } +#line 270 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +{ RET_TOK(BinaryOpVal, SetGT, SETGT); } YY_BREAK case 77: YY_RULE_SETUP -#line 262 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(OtherOpVal, PHI, PHI_TOK); } +#line 271 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +{ RET_TOK(BinaryOpVal, SetLE, SETLE); } YY_BREAK case 78: YY_RULE_SETUP -#line 263 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(OtherOpVal, Call, CALL); } +#line 272 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +{ RET_TOK(BinaryOpVal, SetGE, SETGE); } YY_BREAK case 79: YY_RULE_SETUP -#line 264 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(OtherOpVal, Cast, CAST); } +#line 274 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +{ RET_TOK(OtherOpVal, PHI, PHI_TOK); } YY_BREAK case 80: YY_RULE_SETUP -#line 265 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(OtherOpVal, Select, SELECT); } +#line 275 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +{ RET_TOK(OtherOpVal, Call, CALL); } YY_BREAK case 81: YY_RULE_SETUP -#line 266 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(OtherOpVal, Shl, SHL); } +#line 276 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +{ RET_TOK(OtherOpVal, Cast, CAST); } YY_BREAK case 82: YY_RULE_SETUP -#line 267 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(OtherOpVal, Shr, SHR); } +#line 277 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +{ RET_TOK(OtherOpVal, Select, SELECT); } YY_BREAK case 83: YY_RULE_SETUP -#line 268 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" -{ return VANEXT_old; } +#line 278 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +{ RET_TOK(OtherOpVal, Shl, SHL); } YY_BREAK case 84: YY_RULE_SETUP -#line 269 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" -{ return VAARG_old; } +#line 279 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +{ RET_TOK(OtherOpVal, Shr, SHR); } YY_BREAK case 85: YY_RULE_SETUP -#line 270 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(OtherOpVal, VAArg , VAARG); } +#line 280 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +{ return VANEXT_old; } YY_BREAK case 86: YY_RULE_SETUP -#line 271 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(TermOpVal, Ret, RET); } +#line 281 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +{ return VAARG_old; } YY_BREAK case 87: YY_RULE_SETUP -#line 272 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(TermOpVal, Br, BR); } +#line 282 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +{ RET_TOK(OtherOpVal, VAArg , VAARG); } YY_BREAK case 88: YY_RULE_SETUP -#line 273 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(TermOpVal, Switch, SWITCH); } +#line 283 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +{ RET_TOK(TermOpVal, Ret, RET); } YY_BREAK case 89: YY_RULE_SETUP -#line 274 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(TermOpVal, Invoke, INVOKE); } +#line 284 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +{ RET_TOK(TermOpVal, Br, BR); } YY_BREAK case 90: YY_RULE_SETUP -#line 275 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(TermOpVal, Unwind, UNWIND); } +#line 285 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +{ RET_TOK(TermOpVal, Switch, SWITCH); } YY_BREAK case 91: YY_RULE_SETUP -#line 276 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(TermOpVal, Unreachable, UNREACHABLE); } +#line 286 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +{ RET_TOK(TermOpVal, Invoke, INVOKE); } YY_BREAK case 92: YY_RULE_SETUP -#line 278 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(MemOpVal, Malloc, MALLOC); } +#line 287 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +{ RET_TOK(TermOpVal, Unwind, UNWIND); } YY_BREAK case 93: YY_RULE_SETUP -#line 279 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(MemOpVal, Alloca, ALLOCA); } +#line 288 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +{ RET_TOK(TermOpVal, Unreachable, UNREACHABLE); } YY_BREAK case 94: YY_RULE_SETUP -#line 280 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(MemOpVal, Free, FREE); } +#line 290 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +{ RET_TOK(MemOpVal, Malloc, MALLOC); } YY_BREAK case 95: YY_RULE_SETUP -#line 281 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(MemOpVal, Load, LOAD); } +#line 291 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +{ RET_TOK(MemOpVal, Alloca, ALLOCA); } YY_BREAK case 96: YY_RULE_SETUP -#line 282 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(MemOpVal, Store, STORE); } +#line 292 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +{ RET_TOK(MemOpVal, Free, FREE); } YY_BREAK case 97: YY_RULE_SETUP -#line 283 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(MemOpVal, GetElementPtr, GETELEMENTPTR); } +#line 293 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +{ RET_TOK(MemOpVal, Load, LOAD); } YY_BREAK case 98: YY_RULE_SETUP -#line 285 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(OtherOpVal, ExtractElement, EXTRACTELEMENT); } +#line 294 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +{ RET_TOK(MemOpVal, Store, STORE); } YY_BREAK case 99: YY_RULE_SETUP -#line 286 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(OtherOpVal, InsertElement, INSERTELEMENT); } +#line 295 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +{ RET_TOK(MemOpVal, GetElementPtr, GETELEMENTPTR); } YY_BREAK case 100: YY_RULE_SETUP -#line 287 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" -{ RET_TOK(OtherOpVal, ShuffleVector, SHUFFLEVECTOR); } +#line 297 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +{ RET_TOK(OtherOpVal, ExtractElement, EXTRACTELEMENT); } YY_BREAK case 101: YY_RULE_SETUP -#line 290 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 298 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +{ RET_TOK(OtherOpVal, InsertElement, INSERTELEMENT); } + YY_BREAK +case 102: +YY_RULE_SETUP +#line 299 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" +{ RET_TOK(OtherOpVal, ShuffleVector, SHUFFLEVECTOR); } + YY_BREAK +case 103: +YY_RULE_SETUP +#line 302 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { UnEscapeLexed(yytext+1); llvmAsmlval.StrVal = strdup(yytext+1); // Skip % return VAR_ID; } YY_BREAK -case 102: +case 104: YY_RULE_SETUP -#line 295 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 307 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { yytext[strlen(yytext)-1] = 0; // nuke colon UnEscapeLexed(yytext); @@ -1743,9 +1769,9 @@ return LABELSTR; } YY_BREAK -case 103: +case 105: YY_RULE_SETUP -#line 301 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 313 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { yytext[strlen(yytext)-2] = 0; // nuke colon, end quote UnEscapeLexed(yytext+1); @@ -1753,9 +1779,9 @@ return LABELSTR; } YY_BREAK -case 104: +case 106: YY_RULE_SETUP -#line 308 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 320 "/proj/llvm/llvm2/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 @@ -1766,14 +1792,14 @@ return STRINGCONSTANT; } YY_BREAK -case 105: +case 107: YY_RULE_SETUP -#line 319 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 331 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { llvmAsmlval.UInt64Val = atoull(yytext); return EUINT64VAL; } YY_BREAK -case 106: +case 108: YY_RULE_SETUP -#line 320 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 332 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { uint64_t Val = atoull(yytext+1); // +1: we have bigger negative range @@ -1783,17 +1809,17 @@ return ESINT64VAL; } YY_BREAK -case 107: +case 109: YY_RULE_SETUP -#line 328 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 340 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { llvmAsmlval.UInt64Val = HexIntToVal(yytext+3); return yytext[0] == 's' ? ESINT64VAL : EUINT64VAL; } YY_BREAK -case 108: +case 110: YY_RULE_SETUP -#line 333 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 345 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { uint64_t Val = atoull(yytext+1); if ((unsigned)Val != Val) @@ -1802,9 +1828,9 @@ return UINTVAL; } YY_BREAK -case 109: +case 111: YY_RULE_SETUP -#line 340 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 352 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { uint64_t Val = atoull(yytext+2); // +1: we have bigger negative range @@ -1814,18 +1840,18 @@ return SINTVAL; } YY_BREAK -case 110: +case 112: YY_RULE_SETUP -#line 349 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 361 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { llvmAsmlval.FPVal = atof(yytext); return FPVAL; } YY_BREAK -case 111: +case 113: YY_RULE_SETUP -#line 350 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 362 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { llvmAsmlval.FPVal = HexToFP(yytext); return FPVAL; } YY_BREAK case YY_STATE_EOF(INITIAL): -#line 352 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 364 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { /* Make sure to free the internal buffers for flex when we are * done reading our input! @@ -1834,22 +1860,22 @@ return EOF; } YY_BREAK -case 112: +case 114: YY_RULE_SETUP -#line 360 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 372 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { /* Ignore whitespace */ } YY_BREAK -case 113: +case 115: YY_RULE_SETUP -#line 361 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 373 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" { return yytext[0]; } YY_BREAK -case 114: +case 116: YY_RULE_SETUP -#line 363 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 375 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" YY_FATAL_ERROR( "flex scanner jammed" ); YY_BREAK -#line 1853 "Lexer.cpp" +#line 1879 "Lexer.cpp" case YY_END_OF_BUFFER: { @@ -2136,7 +2162,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 >= 504 ) + if ( yy_current_state >= 510 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; @@ -2166,11 +2192,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 >= 504 ) + if ( yy_current_state >= 510 ) 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 == 503); + yy_is_jam = (yy_current_state == 509); if ( ! yy_is_jam ) *yy_state_ptr++ = yy_current_state; @@ -2727,5 +2753,5 @@ return 0; } #endif -#line 363 "/proj/llvm/llvm/lib/AsmParser/Lexer.l" +#line 375 "/proj/llvm/llvm2/lib/AsmParser/Lexer.l" Index: llvm/lib/AsmParser/Lexer.l diff -u llvm/lib/AsmParser/Lexer.l:1.78.2.2 llvm/lib/AsmParser/Lexer.l:1.78.2.3 --- llvm/lib/AsmParser/Lexer.l:1.78.2.2 Thu Oct 19 19:34:43 2006 +++ llvm/lib/AsmParser/Lexer.l Thu Oct 19 23:27:17 2006 @@ -39,8 +39,18 @@ yy_scan_string (str); } +// Construct a token value for a non-obsolete token #define RET_TOK(type, Enum, sym) \ - llvmAsmlval.type = Instruction::Enum; return sym + llvmAsmlval.type.opcode = Instruction::Enum; \ + llvmAsmlval.type.obsolete = false; \ + return sym + +// Construct a token value for an obsolete token +#define RET_TOK_OBSOLETE(type, Enum, sym) \ + llvmAsmlval.type.opcode = Instruction::Enum; \ + llvmAsmlval.type.obsolete = true; \ + return sym + namespace llvm { @@ -247,7 +257,9 @@ add { RET_TOK(BinaryOpVal, Add, ADD); } sub { RET_TOK(BinaryOpVal, Sub, SUB); } mul { RET_TOK(BinaryOpVal, Mul, MUL); } -div { RET_TOK(BinaryOpVal, Div, DIV); } +div { RET_TOK_OBSOLETE(BinaryOpVal, UDiv, UDIV); } +udiv { RET_TOK(BinaryOpVal, UDiv, UDIV); } +sdiv { RET_TOK(BinaryOpVal, UDiv, UDIV); } rem { RET_TOK(BinaryOpVal, Rem, REM); } and { RET_TOK(BinaryOpVal, And, AND); } or { RET_TOK(BinaryOpVal, Or , OR ); } Index: llvm/lib/AsmParser/Lexer.l.cvs diff -u llvm/lib/AsmParser/Lexer.l.cvs:1.8.2.2 llvm/lib/AsmParser/Lexer.l.cvs:1.8.2.3 --- llvm/lib/AsmParser/Lexer.l.cvs:1.8.2.2 Thu Oct 19 19:34:43 2006 +++ llvm/lib/AsmParser/Lexer.l.cvs Thu Oct 19 23:27:17 2006 @@ -39,8 +39,18 @@ yy_scan_string (str); } +// Construct a token value for a non-obsolete token #define RET_TOK(type, Enum, sym) \ - llvmAsmlval.type = Instruction::Enum; return sym + llvmAsmlval.type.opcode = Instruction::Enum; \ + llvmAsmlval.type.obsolete = false; \ + return sym + +// Construct a token value for an obsolete token +#define RET_TOK_OBSOLETE(type, Enum, sym) \ + llvmAsmlval.type.opcode = Instruction::Enum; \ + llvmAsmlval.type.obsolete = true; \ + return sym + namespace llvm { @@ -247,7 +257,9 @@ add { RET_TOK(BinaryOpVal, Add, ADD); } sub { RET_TOK(BinaryOpVal, Sub, SUB); } mul { RET_TOK(BinaryOpVal, Mul, MUL); } -div { RET_TOK(BinaryOpVal, Div, DIV); } +div { RET_TOK_OBSOLETE(BinaryOpVal, UDiv, UDIV); } +udiv { RET_TOK(BinaryOpVal, UDiv, UDIV); } +sdiv { RET_TOK(BinaryOpVal, UDiv, UDIV); } rem { RET_TOK(BinaryOpVal, Rem, REM); } and { RET_TOK(BinaryOpVal, And, AND); } or { RET_TOK(BinaryOpVal, Or , OR ); } Index: llvm/lib/AsmParser/ParserInternals.h diff -u llvm/lib/AsmParser/ParserInternals.h:1.45.2.2 llvm/lib/AsmParser/ParserInternals.h:1.45.2.3 --- llvm/lib/AsmParser/ParserInternals.h:1.45.2.2 Thu Oct 19 19:34:43 2006 +++ llvm/lib/AsmParser/ParserInternals.h Thu Oct 19 23:27:17 2006 @@ -201,4 +201,20 @@ } // End llvm namespace +// This structure is used to keep track of obsolete opcodes. The lexer will +// retain the ability to parse obsolete opcode mnemonics. In this case it will +// set "obsolete" to true and the opcode will be the replacement opcode. For +// example if "rem" is encountered then opcode will be set to "urem" and the +// "obsolete" flag will be true. If the opcode is not obsolete then "obsolete" +// will be false. +template +struct OpcodeInfo { + Enum opcode; + bool obsolete; +}; +typedef OpcodeInfo BinaryOpInfo; +typedef OpcodeInfo TermOpInfo; +typedef OpcodeInfo MemOpInfo; +typedef OpcodeInfo OtherOpInfo; + #endif Index: llvm/lib/AsmParser/llvmAsmParser.cpp.cvs diff -u llvm/lib/AsmParser/llvmAsmParser.cpp.cvs:1.18.2.3 llvm/lib/AsmParser/llvmAsmParser.cpp.cvs:1.18.2.4 --- llvm/lib/AsmParser/llvmAsmParser.cpp.cvs:1.18.2.3 Thu Oct 19 19:34:43 2006 +++ llvm/lib/AsmParser/llvmAsmParser.cpp.cvs Thu Oct 19 23:27:17 2006 @@ -142,34 +142,35 @@ ADD = 333, SUB = 334, MUL = 335, - DIV = 336, - REM = 337, - AND = 338, - OR = 339, - XOR = 340, - SETLE = 341, - SETGE = 342, - SETLT = 343, - SETGT = 344, - SETEQ = 345, - SETNE = 346, - MALLOC = 347, - ALLOCA = 348, - FREE = 349, - LOAD = 350, - STORE = 351, - GETELEMENTPTR = 352, - PHI_TOK = 353, - CAST = 354, - SELECT = 355, - SHL = 356, - SHR = 357, - VAARG = 358, - EXTRACTELEMENT = 359, - INSERTELEMENT = 360, - SHUFFLEVECTOR = 361, - VAARG_old = 362, - VANEXT_old = 363 + UDIV = 336, + SDIV = 337, + REM = 338, + AND = 339, + OR = 340, + XOR = 341, + SETLE = 342, + SETGE = 343, + SETLT = 344, + SETGT = 345, + SETEQ = 346, + SETNE = 347, + MALLOC = 348, + ALLOCA = 349, + FREE = 350, + LOAD = 351, + STORE = 352, + GETELEMENTPTR = 353, + PHI_TOK = 354, + CAST = 355, + SELECT = 356, + SHL = 357, + SHR = 358, + VAARG = 359, + EXTRACTELEMENT = 360, + INSERTELEMENT = 361, + SHUFFLEVECTOR = 362, + VAARG_old = 363, + VANEXT_old = 364 }; #endif /* Tokens. */ @@ -251,40 +252,41 @@ #define ADD 333 #define SUB 334 #define MUL 335 -#define DIV 336 -#define REM 337 -#define AND 338 -#define OR 339 -#define XOR 340 -#define SETLE 341 -#define SETGE 342 -#define SETLT 343 -#define SETGT 344 -#define SETEQ 345 -#define SETNE 346 -#define MALLOC 347 -#define ALLOCA 348 -#define FREE 349 -#define LOAD 350 -#define STORE 351 -#define GETELEMENTPTR 352 -#define PHI_TOK 353 -#define CAST 354 -#define SELECT 355 -#define SHL 356 -#define SHR 357 -#define VAARG 358 -#define EXTRACTELEMENT 359 -#define INSERTELEMENT 360 -#define SHUFFLEVECTOR 361 -#define VAARG_old 362 -#define VANEXT_old 363 +#define UDIV 336 +#define SDIV 337 +#define REM 338 +#define AND 339 +#define OR 340 +#define XOR 341 +#define SETLE 342 +#define SETGE 343 +#define SETLT 344 +#define SETGT 345 +#define SETEQ 346 +#define SETNE 347 +#define MALLOC 348 +#define ALLOCA 349 +#define FREE 350 +#define LOAD 351 +#define STORE 352 +#define GETELEMENTPTR 353 +#define PHI_TOK 354 +#define CAST 355 +#define SELECT 356 +#define SHL 357 +#define SHR 358 +#define VAARG 359 +#define EXTRACTELEMENT 360 +#define INSERTELEMENT 361 +#define SHUFFLEVECTOR 362 +#define VAARG_old 363 +#define VANEXT_old 364 /* Copy the first part of user declarations. */ -#line 14 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 14 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" #include "ParserInternals.h" #include "llvm/CallingConv.h" @@ -1087,6 +1089,23 @@ return Ty; } +// This function is +template +static void sanitizeOpCode(OpcodeInfo &OI, const PATypeHolder& Ty) { + if (OI.obsolete) { + switch (OI.opcode) { + default: + GenerateError("Invalid Obsolete OpCode"); + break; + case Instruction::UDiv: + if (Ty->isSigned()) + OI.opcode = Instruction::SDiv; + break; + } + OI.obsolete = false; + } +} + // common code from the two 'RunVMAsmParser' functions static Module* RunParser(Module * M) { @@ -1264,7 +1283,7 @@ #endif #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) -#line 974 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 991 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" typedef union YYSTYPE { llvm::Module *ModuleVal; llvm::Function *FunctionVal; @@ -1298,14 +1317,14 @@ char *StrVal; // This memory is strdup'd! llvm::ValID ValIDVal; // strdup'd memory maybe! - llvm::Instruction::BinaryOps BinaryOpVal; - llvm::Instruction::TermOps TermOpVal; - llvm::Instruction::MemoryOps MemOpVal; - llvm::Instruction::OtherOps OtherOpVal; - llvm::Module::Endianness Endianness; + BinaryOpInfo BinaryOpVal; + TermOpInfo TermOpVal; + MemOpInfo MemOpVal; + OtherOpInfo OtherOpVal; + llvm::Module::Endianness Endianness; } YYSTYPE; /* Line 196 of yacc.c. */ -#line 1309 "llvmAsmParser.tab.c" +#line 1328 "llvmAsmParser.tab.c" # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 # define YYSTYPE_IS_TRIVIAL 1 @@ -1317,7 +1336,7 @@ /* Line 219 of yacc.c. */ -#line 1321 "llvmAsmParser.tab.c" +#line 1340 "llvmAsmParser.tab.c" #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) # define YYSIZE_T __SIZE_TYPE__ @@ -1468,20 +1487,20 @@ /* YYFINAL -- State number of the termination state. */ #define YYFINAL 4 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 1339 +#define YYLAST 1301 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 123 +#define YYNTOKENS 124 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 75 /* YYNRULES -- Number of rules. */ -#define YYNRULES 252 +#define YYNRULES 253 /* YYNRULES -- Number of states. */ -#define YYNSTATES 517 +#define YYNSTATES 518 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 -#define YYMAXUTOK 363 +#define YYMAXUTOK 364 #define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) @@ -1493,15 +1512,15 @@ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 112, 113, 121, 2, 110, 2, 2, 2, 2, 2, + 113, 114, 122, 2, 111, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 117, 109, 118, 2, 2, 2, 2, 2, 2, 2, + 118, 110, 119, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 114, 111, 116, 2, 2, 2, 2, 2, 122, + 2, 115, 112, 117, 2, 2, 2, 2, 2, 123, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 115, 2, 2, 119, 2, 120, 2, 2, 2, 2, + 116, 2, 2, 120, 2, 121, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -1525,7 +1544,7 @@ 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, - 105, 106, 107, 108 + 105, 106, 107, 108, 109 }; #if YYDEBUG @@ -1536,147 +1555,148 @@ 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, 81, 83, 85, 86, 87, 89, 91, 93, 95, - 97, 99, 102, 103, 106, 107, 111, 114, 115, 117, - 118, 122, 124, 127, 129, 131, 133, 135, 137, 139, + 59, 61, 63, 65, 67, 69, 72, 73, 75, 77, + 79, 81, 83, 85, 87, 88, 89, 91, 93, 95, + 97, 99, 101, 104, 105, 108, 109, 113, 116, 117, + 119, 120, 124, 126, 129, 131, 133, 135, 137, 139, 141, 143, 145, 147, 149, 151, 153, 155, 157, 159, - 161, 163, 165, 167, 169, 172, 177, 183, 189, 193, - 196, 199, 201, 205, 207, 211, 213, 214, 219, 223, - 227, 232, 237, 241, 244, 247, 250, 253, 256, 259, - 262, 265, 268, 271, 278, 284, 293, 300, 307, 314, - 321, 328, 337, 346, 350, 352, 354, 356, 358, 361, - 364, 369, 372, 374, 379, 382, 387, 388, 396, 397, - 405, 406, 414, 415, 423, 427, 432, 433, 435, 437, - 439, 443, 447, 451, 455, 459, 463, 465, 466, 468, - 470, 472, 473, 476, 480, 482, 484, 488, 490, 491, - 500, 502, 504, 508, 510, 512, 515, 516, 518, 520, - 521, 526, 527, 529, 531, 533, 535, 537, 539, 541, - 543, 545, 549, 551, 557, 559, 561, 563, 565, 568, - 571, 574, 578, 581, 582, 584, 587, 590, 594, 604, - 614, 623, 637, 639, 641, 648, 654, 657, 664, 672, - 674, 678, 680, 681, 684, 686, 692, 698, 704, 707, - 712, 717, 724, 729, 734, 739, 744, 751, 758, 761, - 769, 771, 774, 775, 777, 778, 782, 789, 793, 800, - 803, 808, 815 + 161, 163, 165, 167, 169, 171, 174, 179, 185, 191, + 195, 198, 201, 203, 207, 209, 213, 215, 216, 221, + 225, 229, 234, 239, 243, 246, 249, 252, 255, 258, + 261, 264, 267, 270, 273, 280, 286, 295, 302, 309, + 316, 323, 330, 339, 348, 352, 354, 356, 358, 360, + 363, 366, 371, 374, 376, 381, 384, 389, 390, 398, + 399, 407, 408, 416, 417, 425, 429, 434, 435, 437, + 439, 441, 445, 449, 453, 457, 461, 465, 467, 468, + 470, 472, 474, 475, 478, 482, 484, 486, 490, 492, + 493, 502, 504, 506, 510, 512, 514, 517, 518, 520, + 522, 523, 528, 529, 531, 533, 535, 537, 539, 541, + 543, 545, 547, 551, 553, 559, 561, 563, 565, 567, + 570, 573, 576, 580, 583, 584, 586, 589, 592, 596, + 606, 616, 625, 639, 641, 643, 650, 656, 659, 666, + 674, 676, 680, 682, 683, 686, 688, 694, 700, 706, + 709, 714, 719, 726, 731, 736, 741, 746, 753, 760, + 763, 771, 773, 776, 777, 779, 780, 784, 791, 795, + 802, 805, 810, 817 }; /* YYRHS -- A `-1'-separated list of the rules' RHS. */ static const short int yyrhs[] = { - 154, 0, -1, 5, -1, 6, -1, 3, -1, 4, + 155, 0, -1, 5, -1, 6, -1, 3, -1, 4, -1, 78, -1, 79, -1, 80, -1, 81, -1, 82, -1, 83, -1, 84, -1, 85, -1, 86, -1, 87, - -1, 88, -1, 89, -1, 90, -1, 91, -1, 101, - -1, 102, -1, 16, -1, 14, -1, 12, -1, 10, - -1, 17, -1, 15, -1, 13, -1, 11, -1, 130, - -1, 131, -1, 18, -1, 19, -1, 166, 109, -1, - -1, 41, -1, 42, -1, 43, -1, 44, -1, 45, - -1, 46, -1, 47, -1, -1, -1, 65, -1, 66, - -1, 67, -1, 68, -1, 69, -1, 70, -1, 64, - 4, -1, -1, 57, 4, -1, -1, 110, 57, 4, - -1, 34, 24, -1, -1, 139, -1, -1, 110, 142, - 141, -1, 139, -1, 57, 4, -1, 145, -1, 8, - -1, 147, -1, 8, -1, 147, -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, 48, -1, 146, -1, 181, -1, 111, - 4, -1, 144, 112, 149, 113, -1, 114, 4, 115, - 147, 116, -1, 117, 4, 115, 147, 118, -1, 119, - 148, 120, -1, 119, 120, -1, 147, 121, -1, 147, - -1, 148, 110, 147, -1, 148, -1, 148, 110, 37, - -1, 37, -1, -1, 145, 114, 152, 116, -1, 145, - 114, 116, -1, 145, 122, 24, -1, 145, 117, 152, - 118, -1, 145, 119, 152, 120, -1, 145, 119, 120, - -1, 145, 38, -1, 145, 39, -1, 145, 181, -1, - 145, 151, -1, 145, 26, -1, 130, 125, -1, 131, - 4, -1, 9, 27, -1, 9, 28, -1, 133, 7, - -1, 99, 112, 150, 36, 145, 113, -1, 97, 112, - 150, 195, 113, -1, 100, 112, 150, 110, 150, 110, - 150, 113, -1, 126, 112, 150, 110, 150, 113, -1, - 127, 112, 150, 110, 150, 113, -1, 128, 112, 150, - 110, 150, 113, -1, 129, 112, 150, 110, 150, 113, - -1, 104, 112, 150, 110, 150, 113, -1, 105, 112, - 150, 110, 150, 110, 150, 113, -1, 106, 112, 150, - 110, 150, 110, 150, 113, -1, 152, 110, 150, -1, - 150, -1, 32, -1, 33, -1, 155, -1, 155, 175, - -1, 155, 177, -1, 155, 62, 61, 161, -1, 155, - 25, -1, 156, -1, 156, 134, 20, 143, -1, 156, - 177, -1, 156, 62, 61, 161, -1, -1, 156, 134, - 135, 153, 150, 157, 141, -1, -1, 156, 134, 50, - 153, 145, 158, 141, -1, -1, 156, 134, 45, 153, - 145, 159, 141, -1, -1, 156, 134, 47, 153, 145, - 160, 141, -1, 156, 51, 163, -1, 156, 58, 109, - 164, -1, -1, 24, -1, 56, -1, 55, -1, 53, - 109, 162, -1, 54, 109, 4, -1, 52, 109, 24, - -1, 71, 109, 24, -1, 114, 165, 116, -1, 165, - 110, 24, -1, 24, -1, -1, 22, -1, 24, -1, - 166, -1, -1, 145, 167, -1, 169, 110, 168, -1, - 168, -1, 169, -1, 169, 110, 37, -1, 37, -1, - -1, 136, 143, 166, 112, 170, 113, 140, 137, -1, - 29, -1, 119, -1, 135, 171, 172, -1, 30, -1, - 120, -1, 184, 174, -1, -1, 45, -1, 47, -1, - -1, 31, 178, 176, 171, -1, -1, 63, -1, 3, - -1, 4, -1, 7, -1, 27, -1, 28, -1, 38, - -1, 39, -1, 26, -1, 117, 152, 118, -1, 151, - -1, 61, 179, 24, 110, 24, -1, 124, -1, 166, - -1, 181, -1, 180, -1, 145, 182, -1, 184, 185, - -1, 173, 185, -1, 186, 134, 187, -1, 186, 189, - -1, -1, 23, -1, 72, 183, -1, 72, 8, -1, - 73, 21, 182, -1, 73, 9, 182, 110, 21, 182, - 110, 21, 182, -1, 74, 132, 182, 110, 21, 182, - 114, 188, 116, -1, 74, 132, 182, 110, 21, 182, - 114, 116, -1, 75, 136, 143, 182, 112, 192, 113, - 36, 21, 182, 76, 21, 182, -1, 76, -1, 77, - -1, 188, 132, 180, 110, 21, 182, -1, 132, 180, - 110, 21, 182, -1, 134, 194, -1, 145, 114, 182, - 110, 182, 116, -1, 190, 110, 114, 182, 110, 182, - 116, -1, 183, -1, 191, 110, 183, -1, 191, -1, - -1, 60, 59, -1, 59, -1, 126, 145, 182, 110, - 182, -1, 127, 145, 182, 110, 182, -1, 128, 145, - 182, 110, 182, -1, 49, 183, -1, 129, 183, 110, - 183, -1, 99, 183, 36, 145, -1, 100, 183, 110, - 183, 110, 183, -1, 103, 183, 110, 145, -1, 107, - 183, 110, 145, -1, 108, 183, 110, 145, -1, 104, - 183, 110, 183, -1, 105, 183, 110, 183, 110, 183, - -1, 106, 183, 110, 183, 110, 183, -1, 98, 190, - -1, 193, 136, 143, 182, 112, 192, 113, -1, 197, - -1, 110, 191, -1, -1, 35, -1, -1, 92, 145, - 138, -1, 92, 145, 110, 15, 182, 138, -1, 93, - 145, 138, -1, 93, 145, 110, 15, 182, 138, -1, - 94, 183, -1, 196, 95, 145, 182, -1, 196, 96, - 183, 110, 145, 182, -1, 97, 145, 182, 195, -1 + -1, 88, -1, 89, -1, 90, -1, 91, -1, 92, + -1, 102, -1, 103, -1, 16, -1, 14, -1, 12, + -1, 10, -1, 17, -1, 15, -1, 13, -1, 11, + -1, 131, -1, 132, -1, 18, -1, 19, -1, 167, + 110, -1, -1, 41, -1, 42, -1, 43, -1, 44, + -1, 45, -1, 46, -1, 47, -1, -1, -1, 65, + -1, 66, -1, 67, -1, 68, -1, 69, -1, 70, + -1, 64, 4, -1, -1, 57, 4, -1, -1, 111, + 57, 4, -1, 34, 24, -1, -1, 140, -1, -1, + 111, 143, 142, -1, 140, -1, 57, 4, -1, 146, + -1, 8, -1, 148, -1, 8, -1, 148, -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, 48, -1, 147, -1, 182, + -1, 112, 4, -1, 145, 113, 150, 114, -1, 115, + 4, 116, 148, 117, -1, 118, 4, 116, 148, 119, + -1, 120, 149, 121, -1, 120, 121, -1, 148, 122, + -1, 148, -1, 149, 111, 148, -1, 149, -1, 149, + 111, 37, -1, 37, -1, -1, 146, 115, 153, 117, + -1, 146, 115, 117, -1, 146, 123, 24, -1, 146, + 118, 153, 119, -1, 146, 120, 153, 121, -1, 146, + 120, 121, -1, 146, 38, -1, 146, 39, -1, 146, + 182, -1, 146, 152, -1, 146, 26, -1, 131, 126, + -1, 132, 4, -1, 9, 27, -1, 9, 28, -1, + 134, 7, -1, 100, 113, 151, 36, 146, 114, -1, + 98, 113, 151, 196, 114, -1, 101, 113, 151, 111, + 151, 111, 151, 114, -1, 127, 113, 151, 111, 151, + 114, -1, 128, 113, 151, 111, 151, 114, -1, 129, + 113, 151, 111, 151, 114, -1, 130, 113, 151, 111, + 151, 114, -1, 105, 113, 151, 111, 151, 114, -1, + 106, 113, 151, 111, 151, 111, 151, 114, -1, 107, + 113, 151, 111, 151, 111, 151, 114, -1, 153, 111, + 151, -1, 151, -1, 32, -1, 33, -1, 156, -1, + 156, 176, -1, 156, 178, -1, 156, 62, 61, 162, + -1, 156, 25, -1, 157, -1, 157, 135, 20, 144, + -1, 157, 178, -1, 157, 62, 61, 162, -1, -1, + 157, 135, 136, 154, 151, 158, 142, -1, -1, 157, + 135, 50, 154, 146, 159, 142, -1, -1, 157, 135, + 45, 154, 146, 160, 142, -1, -1, 157, 135, 47, + 154, 146, 161, 142, -1, 157, 51, 164, -1, 157, + 58, 110, 165, -1, -1, 24, -1, 56, -1, 55, + -1, 53, 110, 163, -1, 54, 110, 4, -1, 52, + 110, 24, -1, 71, 110, 24, -1, 115, 166, 117, + -1, 166, 111, 24, -1, 24, -1, -1, 22, -1, + 24, -1, 167, -1, -1, 146, 168, -1, 170, 111, + 169, -1, 169, -1, 170, -1, 170, 111, 37, -1, + 37, -1, -1, 137, 144, 167, 113, 171, 114, 141, + 138, -1, 29, -1, 120, -1, 136, 172, 173, -1, + 30, -1, 121, -1, 185, 175, -1, -1, 45, -1, + 47, -1, -1, 31, 179, 177, 172, -1, -1, 63, + -1, 3, -1, 4, -1, 7, -1, 27, -1, 28, + -1, 38, -1, 39, -1, 26, -1, 118, 153, 119, + -1, 152, -1, 61, 180, 24, 111, 24, -1, 125, + -1, 167, -1, 182, -1, 181, -1, 146, 183, -1, + 185, 186, -1, 174, 186, -1, 187, 135, 188, -1, + 187, 190, -1, -1, 23, -1, 72, 184, -1, 72, + 8, -1, 73, 21, 183, -1, 73, 9, 183, 111, + 21, 183, 111, 21, 183, -1, 74, 133, 183, 111, + 21, 183, 115, 189, 117, -1, 74, 133, 183, 111, + 21, 183, 115, 117, -1, 75, 137, 144, 183, 113, + 193, 114, 36, 21, 183, 76, 21, 183, -1, 76, + -1, 77, -1, 189, 133, 181, 111, 21, 183, -1, + 133, 181, 111, 21, 183, -1, 135, 195, -1, 146, + 115, 183, 111, 183, 117, -1, 191, 111, 115, 183, + 111, 183, 117, -1, 184, -1, 192, 111, 184, -1, + 192, -1, -1, 60, 59, -1, 59, -1, 127, 146, + 183, 111, 183, -1, 128, 146, 183, 111, 183, -1, + 129, 146, 183, 111, 183, -1, 49, 184, -1, 130, + 184, 111, 184, -1, 100, 184, 36, 146, -1, 101, + 184, 111, 184, 111, 184, -1, 104, 184, 111, 146, + -1, 108, 184, 111, 146, -1, 109, 184, 111, 146, + -1, 105, 184, 111, 184, -1, 106, 184, 111, 184, + 111, 184, -1, 107, 184, 111, 184, 111, 184, -1, + 99, 191, -1, 194, 137, 144, 183, 113, 193, 114, + -1, 198, -1, 111, 192, -1, -1, 35, -1, -1, + 93, 146, 139, -1, 93, 146, 111, 15, 183, 139, + -1, 94, 146, 139, -1, 94, 146, 111, 15, 183, + 139, -1, 95, 184, -1, 197, 96, 146, 183, -1, + 197, 97, 184, 111, 146, 183, -1, 98, 146, 183, + 196, -1 }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const unsigned short int yyrline[] = { - 0, 1097, 1097, 1098, 1106, 1107, 1117, 1117, 1117, 1117, - 1117, 1118, 1118, 1118, 1119, 1119, 1119, 1119, 1119, 1119, - 1121, 1121, 1125, 1125, 1125, 1125, 1126, 1126, 1126, 1126, - 1127, 1127, 1128, 1128, 1131, 1135, 1140, 1141, 1142, 1143, - 1144, 1145, 1146, 1147, 1149, 1150, 1151, 1152, 1153, 1154, - 1155, 1156, 1165, 1166, 1172, 1173, 1181, 1189, 1190, 1195, - 1196, 1197, 1202, 1216, 1216, 1217, 1217, 1219, 1229, 1229, - 1229, 1229, 1229, 1229, 1229, 1230, 1230, 1230, 1230, 1230, - 1230, 1231, 1235, 1239, 1247, 1255, 1268, 1273, 1285, 1295, - 1299, 1310, 1315, 1321, 1322, 1326, 1330, 1341, 1367, 1381, - 1411, 1437, 1458, 1471, 1481, 1486, 1547, 1554, 1563, 1569, - 1575, 1579, 1583, 1591, 1602, 1634, 1642, 1664, 1675, 1681, - 1689, 1695, 1701, 1710, 1714, 1722, 1722, 1732, 1740, 1745, - 1749, 1753, 1757, 1772, 1794, 1797, 1800, 1800, 1808, 1808, - 1816, 1816, 1824, 1824, 1833, 1836, 1839, 1843, 1856, 1857, - 1859, 1863, 1872, 1877, 1883, 1885, 1890, 1895, 1904, 1904, - 1905, 1905, 1907, 1914, 1920, 1927, 1931, 1937, 1942, 1947, - 2042, 2042, 2044, 2052, 2052, 2054, 2059, 2060, 2061, 2063, - 2063, 2073, 2077, 2082, 2086, 2090, 2094, 2098, 2102, 2106, - 2110, 2114, 2139, 2143, 2157, 2161, 2167, 2167, 2173, 2178, - 2182, 2191, 2202, 2207, 2219, 2232, 2236, 2240, 2245, 2254, - 2273, 2282, 2338, 2342, 2349, 2360, 2373, 2382, 2391, 2401, - 2405, 2412, 2412, 2414, 2418, 2423, 2439, 2454, 2468, 2481, - 2489, 2497, 2505, 2511, 2531, 2554, 2560, 2566, 2572, 2587, - 2646, 2653, 2656, 2661, 2665, 2672, 2677, 2683, 2688, 2694, - 2702, 2714, 2729 + 0, 1114, 1114, 1115, 1123, 1124, 1134, 1134, 1134, 1134, + 1134, 1134, 1135, 1135, 1135, 1136, 1136, 1136, 1136, 1136, + 1136, 1138, 1138, 1142, 1142, 1142, 1142, 1143, 1143, 1143, + 1143, 1144, 1144, 1145, 1145, 1148, 1152, 1157, 1158, 1159, + 1160, 1161, 1162, 1163, 1164, 1166, 1167, 1168, 1169, 1170, + 1171, 1172, 1173, 1182, 1183, 1189, 1190, 1198, 1206, 1207, + 1212, 1213, 1214, 1219, 1233, 1233, 1234, 1234, 1236, 1246, + 1246, 1246, 1246, 1246, 1246, 1246, 1247, 1247, 1247, 1247, + 1247, 1247, 1248, 1252, 1256, 1264, 1272, 1285, 1290, 1302, + 1312, 1316, 1327, 1332, 1338, 1339, 1343, 1347, 1358, 1384, + 1398, 1428, 1454, 1475, 1488, 1498, 1503, 1564, 1571, 1580, + 1586, 1592, 1596, 1600, 1608, 1619, 1651, 1659, 1683, 1694, + 1700, 1708, 1714, 1720, 1729, 1733, 1741, 1741, 1751, 1759, + 1764, 1768, 1772, 1776, 1791, 1813, 1816, 1819, 1819, 1827, + 1827, 1835, 1835, 1843, 1843, 1852, 1855, 1858, 1862, 1875, + 1876, 1878, 1882, 1891, 1896, 1902, 1904, 1909, 1914, 1923, + 1923, 1924, 1924, 1926, 1933, 1939, 1946, 1950, 1956, 1961, + 1966, 2061, 2061, 2063, 2071, 2071, 2073, 2078, 2079, 2080, + 2082, 2082, 2092, 2096, 2101, 2105, 2109, 2113, 2117, 2121, + 2125, 2129, 2133, 2158, 2162, 2176, 2180, 2186, 2186, 2192, + 2197, 2201, 2210, 2221, 2226, 2238, 2251, 2255, 2259, 2264, + 2273, 2292, 2301, 2357, 2361, 2368, 2379, 2392, 2401, 2410, + 2420, 2424, 2431, 2431, 2433, 2437, 2442, 2460, 2475, 2489, + 2502, 2510, 2518, 2526, 2532, 2552, 2575, 2581, 2587, 2593, + 2608, 2667, 2674, 2677, 2682, 2686, 2693, 2698, 2704, 2709, + 2715, 2723, 2735, 2750 }; #endif @@ -1698,8 +1718,8 @@ "SIDEEFFECT", "CC_TOK", "CCC_TOK", "CSRETCC_TOK", "FASTCC_TOK", "COLDCC_TOK", "X86_STDCALLCC_TOK", "X86_FASTCALLCC_TOK", "DATA", "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", + "UDIV", "SDIV", "REM", "AND", "OR", "XOR", "SETLE", "SETGE", "SETLT", + "SETGT", "SETEQ", "SETNE", "MALLOC", "ALLOCA", "FREE", "LOAD", "STORE", "GETELEMENTPTR", "PHI_TOK", "CAST", "SELECT", "SHL", "SHR", "VAARG", "EXTRACTELEMENT", "INSERTELEMENT", "SHUFFLEVECTOR", "VAARG_old", "VANEXT_old", "'='", "','", "'\\\\'", "'('", "')'", "'['", "'x'", "']'", @@ -1737,41 +1757,41 @@ 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, - 355, 356, 357, 358, 359, 360, 361, 362, 363, 61, - 44, 92, 40, 41, 91, 120, 93, 60, 62, 123, - 125, 42, 99 + 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, + 61, 44, 92, 40, 41, 91, 120, 93, 60, 62, + 123, 125, 42, 99 }; # endif /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const unsigned char yyr1[] = { - 0, 123, 124, 124, 125, 125, 126, 126, 126, 126, - 126, 127, 127, 127, 128, 128, 128, 128, 128, 128, - 129, 129, 130, 130, 130, 130, 131, 131, 131, 131, - 132, 132, 133, 133, 134, 134, 135, 135, 135, 135, - 135, 135, 135, 135, 136, 136, 136, 136, 136, 136, - 136, 136, 137, 137, 138, 138, 139, 140, 140, 141, - 141, 142, 142, 143, 143, 144, 144, 145, 146, 146, - 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, - 146, 147, 147, 147, 147, 147, 147, 147, 147, 147, - 147, 148, 148, 149, 149, 149, 149, 150, 150, 150, - 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, - 150, 150, 150, 151, 151, 151, 151, 151, 151, 151, - 151, 151, 151, 152, 152, 153, 153, 154, 155, 155, - 155, 155, 155, 156, 156, 156, 157, 156, 158, 156, - 159, 156, 160, 156, 156, 156, 156, 161, 162, 162, - 163, 163, 163, 163, 164, 165, 165, 165, 166, 166, - 167, 167, 168, 169, 169, 170, 170, 170, 170, 171, - 172, 172, 173, 174, 174, 175, 176, 176, 176, 178, - 177, 179, 179, 180, 180, 180, 180, 180, 180, 180, - 180, 180, 180, 180, 181, 181, 182, 182, 183, 184, - 184, 185, 186, 186, 186, 187, 187, 187, 187, 187, - 187, 187, 187, 187, 188, 188, 189, 190, 190, 191, - 191, 192, 192, 193, 193, 194, 194, 194, 194, 194, - 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, - 194, 195, 195, 196, 196, 197, 197, 197, 197, 197, - 197, 197, 197 + 0, 124, 125, 125, 126, 126, 127, 127, 127, 127, + 127, 127, 128, 128, 128, 129, 129, 129, 129, 129, + 129, 130, 130, 131, 131, 131, 131, 132, 132, 132, + 132, 133, 133, 134, 134, 135, 135, 136, 136, 136, + 136, 136, 136, 136, 136, 137, 137, 137, 137, 137, + 137, 137, 137, 138, 138, 139, 139, 140, 141, 141, + 142, 142, 143, 143, 144, 144, 145, 145, 146, 147, + 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, + 147, 147, 148, 148, 148, 148, 148, 148, 148, 148, + 148, 148, 149, 149, 150, 150, 150, 150, 151, 151, + 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, + 151, 151, 151, 151, 152, 152, 152, 152, 152, 152, + 152, 152, 152, 152, 153, 153, 154, 154, 155, 156, + 156, 156, 156, 156, 157, 157, 157, 158, 157, 159, + 157, 160, 157, 161, 157, 157, 157, 157, 162, 163, + 163, 164, 164, 164, 164, 165, 166, 166, 166, 167, + 167, 168, 168, 169, 170, 170, 171, 171, 171, 171, + 172, 173, 173, 174, 175, 175, 176, 177, 177, 177, + 179, 178, 180, 180, 181, 181, 181, 181, 181, 181, + 181, 181, 181, 181, 181, 182, 182, 183, 183, 184, + 185, 185, 186, 187, 187, 187, 188, 188, 188, 188, + 188, 188, 188, 188, 188, 189, 189, 190, 191, 191, + 192, 192, 193, 193, 194, 194, 195, 195, 195, 195, + 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, + 195, 195, 196, 196, 197, 197, 198, 198, 198, 198, + 198, 198, 198, 198 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ @@ -1780,29 +1800,29 @@ 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, - 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, - 1, 2, 0, 2, 0, 3, 2, 0, 1, 0, - 3, 1, 2, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 2, 0, 1, 1, 1, + 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, + 1, 1, 2, 0, 2, 0, 3, 2, 0, 1, + 0, 3, 1, 2, 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, - 6, 8, 8, 3, 1, 1, 1, 1, 2, 2, - 4, 2, 1, 4, 2, 4, 0, 7, 0, 7, - 0, 7, 0, 7, 3, 4, 0, 1, 1, 1, - 3, 3, 3, 3, 3, 3, 1, 0, 1, 1, - 1, 0, 2, 3, 1, 1, 3, 1, 0, 8, - 1, 1, 3, 1, 1, 2, 0, 1, 1, 0, - 4, 0, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 3, 1, 5, 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, 4, 6, 6, 2, 7, - 1, 2, 0, 1, 0, 3, 6, 3, 6, 2, - 4, 6, 4 + 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, 6, 8, 8, 3, 1, 1, 1, 1, 2, + 2, 4, 2, 1, 4, 2, 4, 0, 7, 0, + 7, 0, 7, 0, 7, 3, 4, 0, 1, 1, + 1, 3, 3, 3, 3, 3, 3, 1, 0, 1, + 1, 1, 0, 2, 3, 1, 1, 3, 1, 0, + 8, 1, 1, 3, 1, 1, 2, 0, 1, 1, + 0, 4, 0, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 3, 1, 5, 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, 4, 6, 6, 2, + 7, 1, 2, 0, 1, 0, 3, 6, 3, 6, + 2, 4, 6, 4 }; /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state @@ -1810,482 +1830,476 @@ means the default is an error. */ static const unsigned char yydefact[] = { - 146, 0, 43, 132, 1, 131, 179, 36, 37, 38, - 39, 40, 41, 42, 0, 44, 203, 128, 129, 203, - 158, 159, 0, 0, 0, 43, 0, 134, 176, 0, - 0, 45, 46, 47, 48, 49, 50, 0, 0, 204, - 200, 35, 173, 174, 175, 199, 0, 0, 0, 0, - 144, 0, 0, 0, 0, 0, 0, 0, 34, 177, - 178, 44, 147, 130, 51, 2, 3, 64, 68, 69, - 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, - 80, 81, 0, 0, 0, 0, 194, 0, 0, 63, - 82, 67, 195, 83, 170, 171, 172, 244, 202, 0, - 0, 0, 0, 157, 145, 135, 133, 125, 126, 0, - 0, 0, 0, 180, 84, 0, 0, 66, 89, 91, - 0, 0, 96, 90, 243, 0, 224, 0, 0, 0, - 0, 44, 212, 213, 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, 0, 0, 0, 201, 44, 216, - 0, 240, 152, 149, 148, 150, 151, 153, 156, 0, - 140, 142, 138, 68, 69, 70, 71, 72, 73, 74, - 75, 76, 77, 78, 0, 0, 0, 0, 136, 0, - 0, 0, 88, 168, 95, 93, 0, 0, 228, 223, - 206, 205, 0, 0, 25, 29, 24, 28, 23, 27, - 22, 26, 30, 31, 0, 0, 54, 54, 249, 0, - 0, 238, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 154, 59, - 59, 59, 110, 111, 4, 5, 108, 109, 112, 107, - 103, 104, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 106, 105, 59, 65, - 65, 92, 167, 161, 164, 165, 0, 0, 85, 183, - 184, 185, 190, 186, 187, 188, 189, 181, 0, 192, - 197, 196, 198, 0, 207, 0, 0, 0, 245, 0, - 247, 242, 0, 0, 0, 0, 0, 0, 0, 0, + 147, 0, 44, 133, 1, 132, 180, 37, 38, 39, + 40, 41, 42, 43, 0, 45, 204, 129, 130, 204, + 159, 160, 0, 0, 0, 44, 0, 135, 177, 0, + 0, 46, 47, 48, 49, 50, 51, 0, 0, 205, + 201, 36, 174, 175, 176, 200, 0, 0, 0, 0, + 145, 0, 0, 0, 0, 0, 0, 0, 35, 178, + 179, 45, 148, 131, 52, 2, 3, 65, 69, 70, + 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, + 81, 82, 0, 0, 0, 0, 195, 0, 0, 64, + 83, 68, 196, 84, 171, 172, 173, 245, 203, 0, + 0, 0, 0, 158, 146, 136, 134, 126, 127, 0, + 0, 0, 0, 181, 85, 0, 0, 67, 90, 92, + 0, 0, 97, 91, 244, 0, 225, 0, 0, 0, + 0, 45, 213, 214, 6, 7, 8, 9, 10, 11, + 12, 13, 14, 15, 16, 17, 18, 19, 20, 0, + 0, 0, 0, 0, 0, 0, 21, 22, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 202, 45, + 217, 0, 241, 153, 150, 149, 151, 152, 154, 157, + 0, 141, 143, 139, 69, 70, 71, 72, 73, 74, + 75, 76, 77, 78, 79, 0, 0, 0, 0, 137, + 0, 0, 0, 89, 169, 96, 94, 0, 0, 229, + 224, 207, 206, 0, 0, 26, 30, 25, 29, 24, + 28, 23, 27, 31, 32, 0, 0, 55, 55, 250, + 0, 0, 239, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 155, - 0, 141, 143, 139, 0, 0, 0, 0, 0, 0, - 98, 124, 0, 0, 102, 0, 99, 0, 0, 0, - 0, 137, 86, 87, 160, 162, 0, 57, 94, 182, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 252, - 0, 0, 230, 0, 232, 235, 0, 0, 233, 234, - 0, 0, 0, 229, 0, 250, 0, 0, 0, 61, - 59, 242, 0, 0, 0, 0, 0, 0, 97, 100, - 101, 0, 0, 0, 0, 166, 163, 58, 52, 0, - 191, 0, 0, 222, 54, 55, 54, 219, 241, 0, - 0, 0, 0, 0, 225, 226, 227, 222, 0, 56, - 62, 60, 0, 0, 0, 0, 0, 0, 123, 0, - 0, 0, 0, 0, 169, 0, 0, 0, 221, 0, - 0, 246, 248, 0, 0, 0, 231, 236, 237, 0, - 251, 114, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 53, 193, 0, 0, 0, 220, 217, 0, 239, - 113, 0, 120, 0, 0, 116, 117, 118, 119, 0, - 210, 0, 0, 0, 218, 0, 0, 0, 208, 0, - 209, 0, 0, 115, 121, 122, 0, 0, 0, 0, - 0, 0, 215, 0, 0, 214, 211 + 60, 60, 60, 111, 112, 4, 5, 109, 110, 113, + 108, 104, 105, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 107, 106, 60, + 66, 66, 93, 168, 162, 165, 166, 0, 0, 86, + 184, 185, 186, 191, 187, 188, 189, 190, 182, 0, + 193, 198, 197, 199, 0, 208, 0, 0, 0, 246, + 0, 248, 243, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 156, 0, 142, 144, 140, 0, 0, 0, 0, 0, + 0, 99, 125, 0, 0, 103, 0, 100, 0, 0, + 0, 0, 138, 87, 88, 161, 163, 0, 58, 95, + 183, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 253, 0, 0, 231, 0, 233, 236, 0, 0, 234, + 235, 0, 0, 0, 230, 0, 251, 0, 0, 0, + 62, 60, 243, 0, 0, 0, 0, 0, 0, 98, + 101, 102, 0, 0, 0, 0, 167, 164, 59, 53, + 0, 192, 0, 0, 223, 55, 56, 55, 220, 242, + 0, 0, 0, 0, 0, 226, 227, 228, 223, 0, + 57, 63, 61, 0, 0, 0, 0, 0, 0, 124, + 0, 0, 0, 0, 0, 170, 0, 0, 0, 222, + 0, 0, 247, 249, 0, 0, 0, 232, 237, 238, + 0, 252, 115, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 54, 194, 0, 0, 0, 221, 218, 0, + 240, 114, 0, 121, 0, 0, 117, 118, 119, 120, + 0, 211, 0, 0, 0, 219, 0, 0, 0, 209, + 0, 210, 0, 0, 116, 122, 123, 0, 0, 0, + 0, 0, 0, 216, 0, 0, 215, 212 }; /* YYDEFGOTO[NTERM-NUM]. */ static const short int yydefgoto[] = { - -1, 86, 256, 272, 273, 274, 275, 194, 195, 224, - 196, 25, 15, 37, 444, 308, 389, 408, 331, 390, - 87, 88, 197, 90, 91, 120, 206, 341, 299, 342, - 109, 1, 2, 3, 278, 251, 249, 250, 63, 175, - 50, 104, 179, 92, 355, 284, 285, 286, 38, 96, - 16, 44, 17, 61, 18, 28, 360, 300, 93, 302, - 417, 19, 40, 41, 167, 492, 98, 231, 448, 449, - 168, 169, 369, 170, 171 + -1, 86, 257, 273, 274, 275, 276, 195, 196, 225, + 197, 25, 15, 37, 445, 309, 390, 409, 332, 391, + 87, 88, 198, 90, 91, 120, 207, 342, 300, 343, + 109, 1, 2, 3, 279, 252, 250, 251, 63, 176, + 50, 104, 180, 92, 356, 285, 286, 287, 38, 96, + 16, 44, 17, 61, 18, 28, 361, 301, 93, 303, + 418, 19, 40, 41, 168, 493, 98, 232, 449, 450, + 169, 170, 370, 171, 172 }; /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ -#define YYPACT_NINF -410 +#define YYPACT_NINF -459 static const short int yypact[] = { - -410, 17, 118, 605, -410, -410, -410, -410, -410, -410, - -410, -410, -410, -410, 24, 160, 67, -410, -410, -15, - -410, -410, 27, -5, 46, -6, 10, -410, 86, 147, - 138, -410, -410, -410, -410, -410, -410, 1060, -20, -410, - -410, 110, -410, -410, -410, -410, 69, 70, 72, 73, - -410, 63, 147, 1060, 68, 68, 68, 68, -410, -410, - -410, 160, -410, -410, -410, -410, -410, 64, -410, -410, - -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, - -410, -410, 182, 183, 186, 572, -410, 110, 77, -410, - -410, -28, -410, -410, -410, -410, -410, 1231, -410, 168, - 83, 199, 180, 181, -410, -410, -410, -410, -410, 1101, - 1101, 1101, 1142, -410, -410, 91, 96, -410, -410, -28, - -98, 103, 852, -410, -410, 1101, -410, 157, 1183, 50, - 185, 160, -410, -410, -410, -410, -410, -410, -410, -410, - -410, -410, -410, -410, -410, -410, -410, -410, 1101, 1101, - 1101, 1101, 1101, 1101, 1101, -410, -410, 1101, 1101, 1101, - 1101, 1101, 1101, 1101, 1101, 1101, 1101, -410, 160, -410, - 49, -410, -410, -410, -410, -410, -410, -410, -410, -14, - -410, -410, -410, 120, 148, 213, 150, 214, 154, 215, - 166, 217, 224, 231, 170, 218, 232, 425, -410, 1101, - 1101, 1101, -410, 893, -410, 130, 128, 638, -410, -410, - 64, -410, 638, 638, -410, -410, -410, -410, -410, -410, - -410, -410, -410, -410, 638, 1060, 132, 133, -410, 638, - 136, 134, 216, 141, 143, 144, 146, 149, 151, 152, - 638, 638, 638, 153, 1060, 1101, 1101, 233, -410, 155, - 155, 155, -410, -410, -410, -410, -410, -410, -410, -410, - -410, -410, 156, 159, 161, 164, 175, 177, 934, 1142, - 592, 234, 178, 184, 187, 188, -410, -410, 155, -70, - -35, -28, -410, 110, -410, 162, 179, 978, -410, -410, - -410, -410, -410, -410, -410, -410, -410, 197, 1142, -410, - -410, -410, -410, 191, -410, 195, 638, 3, -410, 18, - -410, 196, 638, 193, 1101, 1101, 1101, 1101, 1101, 1101, - 1101, 1101, 201, 202, 203, 1101, 638, 638, 205, -410, - 13, -410, -410, -410, 1142, 1142, 1142, 1142, 1142, 1142, - -410, -410, -13, -99, -410, -78, -410, 1142, 1142, 1142, - 1142, -410, -410, -410, -410, -410, 1019, 230, -410, -410, - 242, -23, 246, 272, 208, 638, 290, 638, 1101, -410, - 211, 638, -410, 212, -410, -410, 219, 220, -410, -410, - 638, 638, 638, -410, 229, -410, 1101, 273, 294, -410, - 155, 196, 291, 226, 237, 240, 241, 1142, -410, -410, - -410, 243, 247, 248, 249, -410, -410, -410, 252, 250, - -410, 638, 638, 1101, 251, -410, 251, -410, 255, 638, - 256, 1101, 1101, 1101, -410, -410, -410, 1101, 638, -410, - -410, -410, 239, 1101, 1142, 1142, 1142, 1142, -410, 1142, - 1142, 1142, 1142, 322, -410, 304, 257, 228, 255, 259, - 286, -410, -410, 1101, 253, 638, -410, -410, -410, 260, - -410, -410, 262, 267, 265, 270, 277, 278, 279, 280, - 281, -410, -410, 323, 14, 320, -410, -410, 254, -410, - -410, 1142, -410, 1142, 1142, -410, -410, -410, -410, 638, - -410, 742, 52, 362, -410, 282, 284, 287, -410, 289, - -410, 742, 638, -410, -410, -410, 380, 292, 327, 638, - 383, 384, -410, 638, 638, -410, -410 + -459, 8, 119, 464, -459, -459, -459, -459, -459, -459, + -459, -459, -459, -459, -46, 162, 21, -459, -459, -11, + -459, -459, 23, -25, 59, 219, 35, -459, -5, 109, + 143, -459, -459, -459, -459, -459, -459, 1020, 12, -459, + -459, 112, -459, -459, -459, -459, 80, 82, 84, 88, + -459, 54, 109, 1020, 121, 121, 121, 121, -459, -459, + -459, 162, -459, -459, -459, -459, -459, 90, -459, -459, + -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, + -459, -459, 196, 197, 202, 574, -459, 112, 99, -459, + -459, -42, -459, -459, -459, -459, -459, 1192, -459, 192, + 103, 213, 194, 195, -459, -459, -459, -459, -459, 1061, + 1061, 1061, 1102, -459, -459, 104, 106, -459, -459, -42, + -100, 110, 856, -459, -459, 1061, -459, 165, 1143, 69, + 390, 162, -459, -459, -459, -459, -459, -459, -459, -459, + -459, -459, -459, -459, -459, -459, -459, -459, -459, 1061, + 1061, 1061, 1061, 1061, 1061, 1061, -459, -459, 1061, 1061, + 1061, 1061, 1061, 1061, 1061, 1061, 1061, 1061, -459, 162, + -459, 75, -459, -459, -459, -459, -459, -459, -459, -459, + -72, -459, -459, -459, 147, 174, 236, 176, 237, 179, + 238, 184, 239, 244, 245, 193, 240, 246, 455, -459, + 1061, 1061, 1061, -459, 897, -459, 134, 140, 640, -459, + -459, 90, -459, 640, 640, -459, -459, -459, -459, -459, + -459, -459, -459, -459, -459, 640, 1020, 144, 146, -459, + 640, 152, 148, 222, 157, 161, 163, 166, 177, 180, + 182, 640, 640, 640, 183, 1020, 1061, 1061, 249, -459, + 186, 186, 186, -459, -459, -459, -459, -459, -459, -459, + -459, -459, -459, 185, 187, 188, 189, 199, 200, 87, + 1102, 594, 266, 201, 203, 208, 209, -459, -459, 186, + -36, 33, -42, -459, 112, -459, 212, 181, 938, -459, + -459, -459, -459, -459, -459, -459, -459, -459, 243, 1102, + -459, -459, -459, -459, 216, -459, 217, 640, -6, -459, + 3, -459, 218, 640, 215, 1061, 1061, 1061, 1061, 1061, + 1061, 1061, 1061, 220, 226, 231, 1061, 640, 640, 232, + -459, -21, -459, -459, -459, 1102, 1102, 1102, 1102, 1102, + 1102, -459, -459, 32, -32, -459, -74, -459, 1102, 1102, + 1102, 1102, -459, -459, -459, -459, -459, 979, 265, -459, + -459, 283, 29, 287, 289, 235, 640, 340, 640, 1061, + -459, 234, 640, -459, 241, -459, -459, 242, 247, -459, + -459, 640, 640, 640, -459, 248, -459, 1061, 327, 350, + -459, 186, 218, 321, 251, 255, 256, 257, 1102, -459, + -459, -459, 259, 260, 262, 263, -459, -459, -459, 302, + 267, -459, 640, 640, 1061, 268, -459, 268, -459, 270, + 640, 273, 1061, 1061, 1061, -459, -459, -459, 1061, 640, + -459, -459, -459, 274, 1061, 1102, 1102, 1102, 1102, -459, + 1102, 1102, 1102, 1102, 356, -459, 352, 281, 278, 270, + 280, 338, -459, -459, 1061, 279, 640, -459, -459, -459, + 284, -459, -459, 294, 298, 296, 300, 301, 299, 304, + 305, 306, -459, -459, 393, 14, 379, -459, -459, 307, + -459, -459, 1102, -459, 1102, 1102, -459, -459, -459, -459, + 640, -459, 745, 53, 395, -459, 308, 309, 311, -459, + 310, -459, 745, 640, -459, -459, -459, 405, 316, 353, + 640, 410, 411, -459, 640, 640, -459, -459 }; /* YYPGOTO[NTERM-NUM]. */ static const short int yypgoto[] = { - -410, -410, -410, 309, 310, 311, 312, -129, -128, -398, - -410, 369, 386, -118, -410, -223, 55, -410, -244, -410, - -50, -410, -37, -410, -64, 293, -410, -102, 221, -192, - 53, -410, -410, -410, -410, -410, -410, -410, 361, -410, - -410, -410, -410, 2, -410, 58, -410, -410, 356, -410, - -410, -410, -410, -410, 416, -410, -410, -409, -57, 62, - -105, -410, 401, -410, -410, -410, -410, -410, 54, -4, - -410, -410, 30, -410, -410 + -459, -459, -459, 339, 341, 342, 343, -129, -128, -458, + -459, 394, 412, -117, -459, -224, 83, -459, -245, -459, + -50, -459, -37, -459, -63, 320, -459, -102, 250, -238, + 27, -459, -459, -459, -459, -459, -459, -459, 397, -459, + -459, -459, -459, 2, -459, 93, -459, -459, 386, -459, + -459, -459, -459, -459, 448, -459, -459, -454, -57, 62, + -105, -459, 433, -459, -459, -459, -459, -459, 85, 28, + -459, -459, 63, -459, -459 }; /* 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 -128 +#define YYTABLE_NINF -129 static const short int yytable[] = { - 89, 222, 223, 106, 310, 26, 332, 333, 39, 94, - 198, 397, 201, 225, 53, 42, 89, 4, 365, 399, - 208, 119, 202, 211, 214, 215, 216, 217, 218, 219, - 220, 221, 397, 367, 351, 7, 8, 9, 10, 54, - 12, 55, 400, 26, 56, 228, 352, 387, 232, 233, - 244, 123, 234, 235, 236, 237, 238, 239, 119, 212, - 366, 243, 214, 215, 216, 217, 218, 219, 220, 221, - 388, 213, 180, 181, 182, 366, 491, 343, 345, 46, - 47, 48, 499, 353, -65, 29, 123, 397, 207, 121, - 39, 207, 507, 123, 501, 410, 247, 397, 49, 95, - 107, 108, 248, 398, 51, 43, 361, 52, 110, 111, - 112, 226, 227, 207, 229, 230, 207, 207, -127, 58, - 207, 207, 207, 207, 207, 207, 240, 241, 242, 207, - 490, 59, 20, 60, 21, 279, 280, 281, 173, 174, - 277, 328, 64, 5, 245, 246, 431, 252, 253, 6, - 301, -25, -25, -24, -24, 301, 301, -23, -23, 7, - 8, 9, 10, 11, 12, 13, 283, 301, 500, -22, - -22, 62, 301, 254, 255, 306, -66, 103, 99, 100, - 14, 101, 102, 301, 301, 301, 114, 115, 89, 122, - 116, 451, 172, 452, 326, 214, 215, 216, 217, 218, - 219, 220, 221, 176, 177, 178, 199, 89, 327, 207, - 373, 200, 375, 376, 377, 203, 209, -29, -28, -27, - 383, -26, 257, 281, 30, 31, 32, 33, 34, 35, - 36, -32, 391, 392, 393, 394, 395, 396, -33, 258, - 287, 288, 307, 309, 313, 401, 402, 403, 404, 301, - 312, 315, 314, 316, 317, 301, 318, 329, 346, 319, - 359, 320, 321, 325, 387, 330, 409, 411, 334, 301, - 301, 335, 356, 336, 303, 304, 337, 372, 207, 374, - 207, 207, 207, 378, 379, 354, 305, 338, 207, 339, - 347, 311, 357, 412, 415, 438, 348, 429, 430, 349, - 350, 362, 322, 323, 324, 363, 368, 371, 301, 443, - 301, 380, 381, 382, 301, 386, 456, 457, 458, 283, - 413, 419, 421, 301, 301, 301, 471, 433, 472, 422, - 423, 207, 463, 464, 465, 466, 434, 467, 468, 469, - 470, 427, 474, 366, 489, 222, 223, 435, 476, 428, - 436, 437, 461, 439, 301, 301, 493, 440, 441, 442, - 445, 450, 301, 222, 223, 453, 455, 473, 364, 477, - 494, 301, 475, 479, 370, 480, 207, 481, 482, 495, - 483, 496, 497, 502, 207, 207, 207, 484, 384, 385, - 207, 485, 486, 487, 488, 503, 462, 504, 301, 506, - 505, 509, 510, 511, 513, 514, 163, 164, 165, 166, - 97, 57, 407, 105, 406, 205, 207, 113, 276, 27, - 45, 432, 418, 459, 0, 0, 0, 414, 0, 416, - 65, 66, 301, 420, 0, 0, 0, 0, 0, 0, - 0, 0, 424, 425, 426, 301, 0, 20, 0, 21, - 0, 259, 301, 0, 0, 0, 301, 301, 0, 0, - 0, 0, 0, 260, 261, 0, 0, 0, 0, 0, - 0, 0, 0, 446, 447, 0, 0, 0, 0, 0, - 0, 454, 0, 0, 0, 0, 0, 0, 0, 0, - 460, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 89, 223, 224, 106, 311, 26, 333, 334, 4, 366, + 199, 202, 39, 388, 226, 29, 89, 492, 368, 42, + 209, 203, 119, 212, 215, 216, 217, 218, 219, 220, + 221, 222, 344, 346, 352, 502, 389, 398, 500, 248, + 59, 94, 60, 26, 39, 249, 229, 401, 508, 233, + 234, 367, 245, 235, 236, 237, 238, 239, 240, 119, + 367, 362, 244, 215, 216, 217, 218, 219, 220, 221, + 222, -66, 181, 182, 183, 46, 47, 48, 213, 398, + 123, 353, 110, 111, 112, 51, 123, 400, 208, 121, + 214, 208, 65, 66, 49, 117, 184, 185, 186, 187, + 188, 189, 190, 191, 192, 193, 194, 79, 80, 20, + 43, 21, 227, 228, 208, 230, 231, 208, 208, -128, + 52, 208, 208, 208, 208, 208, 208, 241, 242, 243, + 208, 491, 95, 62, 20, 81, 21, 280, 281, 282, + 398, 278, 329, 398, 5, 58, 432, 64, 411, 399, + 6, 302, 354, 107, 108, 123, 302, 302, 174, 175, + 7, 8, 9, 10, 11, 12, 13, 284, 302, 103, + 501, 246, 247, 302, 253, 254, 307, -26, -26, -25, + -25, 14, -24, -24, 302, 302, 302, -23, -23, 89, + 99, 452, 100, 453, 101, 327, 255, 256, 102, 82, + 114, 115, 83, -67, 341, 84, 116, 85, 89, 328, + 208, 374, 122, 376, 377, 378, 173, 177, 178, 179, + 200, 384, 201, 204, 210, 282, 30, 31, 32, 33, + 34, 35, 36, 392, 393, 394, 395, 396, 397, 53, + -30, -29, -28, -27, 258, 288, 402, 403, 404, 405, + 302, -33, -34, 259, 289, 308, 302, 310, 315, 314, + 7, 8, 9, 10, 54, 12, 55, 313, 316, 56, + 302, 302, 317, 330, 318, 304, 305, 319, 373, 208, + 375, 208, 208, 208, 379, 380, 355, 306, 320, 208, + 347, 321, 312, 322, 326, 358, 439, 331, 335, 388, + 336, 337, 338, 323, 324, 325, 360, 410, 412, 302, + 413, 302, 339, 340, 348, 302, 349, 457, 458, 459, + 284, 350, 351, 357, 302, 302, 302, 363, 364, 369, + 372, 381, 208, 464, 465, 466, 467, 382, 468, 469, + 470, 471, 383, 387, 416, 420, 223, 224, 414, 477, + 429, 430, 422, 423, 431, 302, 302, 434, 424, 444, + 472, 428, 435, 302, 223, 224, 436, 437, 438, 365, + 440, 441, 302, 442, 443, 371, 473, 208, 446, 451, + 496, 454, 497, 498, 456, 208, 208, 208, 462, 385, + 386, 208, 474, 475, 476, 367, 478, 463, 480, 302, + 215, 216, 217, 218, 219, 220, 221, 222, 481, 482, + 483, 484, 485, 486, 490, 494, 503, 208, 487, 488, + 489, 507, 504, 505, 495, 506, 510, 511, 415, 512, + 417, 514, 515, 302, 421, 97, 164, 57, 165, 166, + 167, 408, 206, 425, 426, 427, 302, 113, 277, 105, + 407, 27, 45, 302, 419, 433, 460, 302, 302, 0, + 65, 66, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 447, 448, 0, 20, 0, 21, + 0, 260, 455, 0, -36, 0, 20, 0, 21, 0, + 0, 461, 0, 261, 262, 6, -36, -36, 0, 0, + 0, 0, 0, 0, 0, -36, -36, -36, -36, -36, + -36, -36, 0, 0, -36, 22, 0, 0, 479, 0, + 0, 0, 23, 0, 0, 0, 24, 0, 0, 0, 0, 0, 0, 134, 135, 136, 137, 138, 139, 140, - 141, 142, 143, 144, 145, 146, 147, 478, 0, 0, - 0, 0, 262, 0, 263, 264, 155, 156, 0, 265, - 266, 267, 0, 0, 0, 0, 0, 0, 0, 268, - 0, 0, 269, 0, 270, 0, 0, 271, 0, 0, - 0, 498, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 508, 0, 0, 0, 0, 0, - 0, 512, 0, 0, 0, 515, 516, 65, 66, 0, - 117, 68, 69, 70, 71, 72, 73, 74, 75, 76, - 77, 78, 79, 80, 20, 0, 21, 65, 66, 0, - 117, 183, 184, 185, 186, 187, 188, 189, 190, 191, - 192, 193, 79, 80, 20, 0, 21, 0, 0, 0, - 81, 0, 0, 0, 0, -35, 0, 20, 0, 21, - 0, 0, 0, 0, 0, 0, 6, -35, -35, 0, - 81, 289, 290, 65, 66, 291, -35, -35, -35, -35, - -35, -35, -35, 0, 0, -35, 22, 0, 0, 0, - 20, 0, 21, 23, 292, 293, 294, 24, 0, 0, - 0, 0, 0, 0, 0, 0, 295, 296, 0, 0, - 0, 0, 0, 82, 0, 0, 83, 0, 0, 84, - 0, 85, 118, 0, 0, 0, 0, 0, 0, 297, - 0, 0, 0, 82, 0, 0, 83, 0, 0, 84, - 0, 85, 344, 0, 0, 0, 134, 135, 136, 137, - 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, - 0, 0, 0, 0, 0, 262, 0, 263, 264, 155, - 156, 0, 265, 266, 267, 289, 290, 0, 0, 291, - 0, 0, 0, 0, 0, 298, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 292, 293, - 294, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 295, 296, 0, 0, 0, 0, 0, 0, 0, 0, + 141, 142, 143, 144, 145, 146, 147, 148, 0, 0, + 0, 0, 499, 263, 0, 264, 265, 156, 157, 0, + 266, 267, 268, 0, 0, 509, 0, 0, 0, 0, + 269, 0, 513, 270, 0, 271, 516, 517, 272, 65, + 66, 0, 117, 68, 69, 70, 71, 72, 73, 74, + 75, 76, 77, 78, 79, 80, 20, 0, 21, 65, + 66, 0, 117, 184, 185, 186, 187, 188, 189, 190, + 191, 192, 193, 194, 79, 80, 20, 0, 21, 0, + 0, 0, 81, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 297, 0, 0, 0, 0, 0, 0, + 0, 0, 81, 290, 291, 65, 66, 292, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, - 144, 145, 146, 147, 0, 0, 0, 0, 0, 262, - 0, 263, 264, 155, 156, 0, 265, 266, 267, 0, - 0, 0, 0, 0, 0, 0, 0, 65, 66, 298, - 117, 68, 69, 70, 71, 72, 73, 74, 75, 76, - 77, 78, 79, 80, 20, 0, 21, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 204, - 0, 0, 0, 0, 0, 0, 0, 0, 65, 66, - 81, 117, 68, 69, 70, 71, 72, 73, 74, 75, - 76, 77, 78, 79, 80, 20, 0, 21, 0, 0, + 0, 0, 20, 0, 21, 0, 293, 294, 295, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 296, 297, + 0, 0, 0, 0, 0, 0, 82, 0, 0, 83, + 0, 0, 84, 0, 85, 118, 0, 0, 0, 0, + 0, 298, 0, 0, 0, 0, 82, 0, 0, 83, + 0, 0, 84, 0, 85, 345, 0, 0, 134, 135, + 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, + 146, 147, 148, 0, 0, 0, 0, 0, 263, 0, + 264, 265, 156, 157, 0, 266, 267, 268, 290, 291, + 0, 0, 292, 0, 0, 0, 0, 0, 299, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 282, 0, 0, 0, 0, 0, 0, 0, 0, 65, - 66, 81, 117, 183, 184, 185, 186, 187, 188, 189, - 190, 191, 192, 193, 79, 80, 20, 0, 21, 0, - 0, 0, 0, 82, 0, 0, 83, 0, 0, 84, - 0, 85, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 81, 65, 66, 0, 117, 68, 69, 70, + 0, 293, 294, 295, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 296, 297, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 298, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 134, 135, 136, 137, 138, 139, 140, + 141, 142, 143, 144, 145, 146, 147, 148, 0, 0, + 0, 0, 0, 263, 0, 264, 265, 156, 157, 0, + 266, 267, 268, 0, 0, 0, 0, 0, 0, 0, + 0, 65, 66, 299, 117, 68, 69, 70, 71, 72, + 73, 74, 75, 76, 77, 78, 79, 80, 20, 0, + 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 205, 0, 0, 0, 0, 0, 0, + 0, 0, 65, 66, 81, 117, 68, 69, 70, 71, + 72, 73, 74, 75, 76, 77, 78, 79, 80, 20, + 0, 21, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 283, 0, 0, 0, 0, 0, + 0, 0, 0, 65, 66, 81, 117, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, - 20, 0, 21, 0, 82, 0, 0, 83, 0, 0, - 84, 0, 85, 0, 0, 358, 0, 0, 0, 0, + 20, 0, 21, 0, 0, 0, 0, 0, 82, 0, + 0, 83, 0, 0, 84, 359, 85, 0, 0, 0, 0, 0, 0, 0, 65, 66, 81, 117, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, - 80, 20, 0, 21, 0, 82, 0, 0, 83, 0, - 340, 84, 0, 85, 0, 0, 405, 0, 0, 0, + 80, 20, 0, 21, 0, 0, 0, 0, 0, 82, + 0, 0, 83, 0, 0, 84, 406, 85, 0, 0, 0, 0, 0, 0, 0, 65, 66, 81, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, - 79, 80, 20, 0, 21, 0, 0, 0, 0, 82, - 0, 0, 83, 0, 0, 84, 0, 85, 0, 0, + 79, 80, 20, 0, 21, 0, 0, 0, 0, 0, + 82, 0, 0, 83, 0, 0, 84, 0, 85, 0, 0, 0, 0, 0, 0, 0, 65, 66, 81, 117, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 20, 0, 21, 0, 0, 0, 0, - 82, 0, 0, 83, 0, 0, 84, 0, 85, 0, - 0, 0, 0, 0, 0, 0, 0, 65, 66, 81, - 117, 183, 184, 185, 186, 187, 188, 189, 190, 191, - 192, 193, 79, 80, 20, 0, 21, 0, 0, 0, 0, 82, 0, 0, 83, 0, 0, 84, 0, 85, - 0, 0, 0, 0, 0, 0, 0, 0, 65, 66, - 81, 210, 68, 69, 70, 71, 72, 73, 74, 75, - 76, 77, 78, 79, 80, 20, 0, 21, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 65, 66, 81, + 117, 184, 185, 186, 187, 188, 189, 190, 191, 192, + 193, 194, 79, 80, 20, 0, 21, 0, 0, 0, 0, 0, 82, 0, 0, 83, 0, 0, 84, 0, - 85, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 85, 0, 0, 0, 0, 0, 0, 0, 65, 66, + 81, 211, 68, 69, 70, 71, 72, 73, 74, 75, + 76, 77, 78, 79, 80, 20, 0, 21, 0, 0, + 0, 0, 0, 82, 0, 0, 83, 0, 0, 84, + 0, 85, 0, 0, 0, 0, 0, 0, 0, 0, 0, 81, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 82, 0, 0, 83, 0, 0, 84, - 0, 85, 0, 0, 0, 0, 124, 0, 0, 0, + 0, 0, 0, 0, 82, 0, 0, 83, 0, 0, + 84, 0, 85, 0, 0, 0, 0, 124, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 125, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 126, 127, 0, 0, 82, 0, 0, 83, 0, 0, - 84, 0, 85, 128, 129, 130, 131, 132, 133, 134, - 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, - 145, 146, 147, 148, 149, 150, 0, 0, 151, 152, - 153, 154, 155, 156, 157, 158, 159, 160, 161, 162 + 0, 125, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 126, 127, 0, 0, 82, 0, 0, 83, 0, + 0, 84, 0, 85, 128, 129, 130, 131, 132, 133, + 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + 144, 145, 146, 147, 148, 149, 150, 151, 0, 0, + 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, + 162, 163 }; static const short int yycheck[] = { - 37, 130, 130, 53, 227, 3, 250, 251, 23, 29, - 112, 110, 110, 131, 20, 30, 53, 0, 15, 118, - 125, 85, 120, 128, 10, 11, 12, 13, 14, 15, - 16, 17, 110, 15, 278, 41, 42, 43, 44, 45, - 46, 47, 120, 41, 50, 150, 116, 34, 153, 154, - 168, 121, 157, 158, 159, 160, 161, 162, 122, 9, - 57, 166, 10, 11, 12, 13, 14, 15, 16, 17, - 57, 21, 109, 110, 111, 57, 474, 269, 270, 52, - 53, 54, 491, 118, 112, 61, 121, 110, 125, 87, - 23, 128, 501, 121, 492, 118, 110, 110, 71, 119, - 32, 33, 116, 116, 109, 120, 298, 61, 55, 56, - 57, 148, 149, 150, 151, 152, 153, 154, 0, 109, - 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, - 116, 45, 22, 47, 24, 199, 200, 201, 55, 56, - 197, 246, 4, 25, 95, 96, 390, 27, 28, 31, - 207, 3, 4, 3, 4, 212, 213, 3, 4, 41, - 42, 43, 44, 45, 46, 47, 203, 224, 116, 3, - 4, 24, 229, 3, 4, 225, 112, 114, 109, 109, - 62, 109, 109, 240, 241, 242, 4, 4, 225, 112, - 4, 414, 24, 416, 244, 10, 11, 12, 13, 14, - 15, 16, 17, 4, 24, 24, 115, 244, 245, 246, - 315, 115, 317, 318, 319, 112, 59, 4, 4, 4, - 325, 4, 4, 287, 64, 65, 66, 67, 68, 69, - 70, 7, 334, 335, 336, 337, 338, 339, 7, 7, - 110, 113, 110, 110, 110, 347, 348, 349, 350, 306, - 114, 110, 36, 110, 110, 312, 110, 24, 24, 110, - 63, 110, 110, 110, 34, 110, 24, 21, 112, 326, - 327, 112, 110, 112, 212, 213, 112, 314, 315, 316, - 317, 318, 319, 320, 321, 283, 224, 112, 325, 112, - 112, 229, 113, 21, 4, 397, 112, 24, 4, 112, - 112, 110, 240, 241, 242, 110, 110, 114, 365, 57, - 367, 110, 110, 110, 371, 110, 421, 422, 423, 356, - 112, 110, 110, 380, 381, 382, 4, 36, 24, 110, - 110, 368, 434, 435, 436, 437, 110, 439, 440, 441, - 442, 112, 114, 57, 21, 474, 474, 110, 453, 386, - 110, 110, 113, 110, 411, 412, 36, 110, 110, 110, - 110, 110, 419, 492, 492, 110, 110, 110, 306, 116, - 116, 428, 113, 113, 312, 113, 413, 110, 113, 481, - 110, 483, 484, 21, 421, 422, 423, 110, 326, 327, - 427, 113, 113, 113, 113, 113, 433, 113, 455, 110, - 113, 21, 110, 76, 21, 21, 97, 97, 97, 97, - 41, 25, 357, 52, 356, 122, 453, 61, 197, 3, - 19, 391, 368, 427, -1, -1, -1, 365, -1, 367, - 5, 6, 489, 371, -1, -1, -1, -1, -1, -1, - -1, -1, 380, 381, 382, 502, -1, 22, -1, 24, - -1, 26, 509, -1, -1, -1, 513, 514, -1, -1, - -1, -1, -1, 38, 39, -1, -1, -1, -1, -1, - -1, -1, -1, 411, 412, -1, -1, -1, -1, -1, - -1, 419, -1, -1, -1, -1, -1, -1, -1, -1, - 428, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 37, 130, 130, 53, 228, 3, 251, 252, 0, 15, + 112, 111, 23, 34, 131, 61, 53, 475, 15, 30, + 125, 121, 85, 128, 10, 11, 12, 13, 14, 15, + 16, 17, 270, 271, 279, 493, 57, 111, 492, 111, + 45, 29, 47, 41, 23, 117, 151, 121, 502, 154, + 155, 57, 169, 158, 159, 160, 161, 162, 163, 122, + 57, 299, 167, 10, 11, 12, 13, 14, 15, 16, + 17, 113, 109, 110, 111, 52, 53, 54, 9, 111, + 122, 117, 55, 56, 57, 110, 122, 119, 125, 87, + 21, 128, 5, 6, 71, 8, 9, 10, 11, 12, + 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, + 121, 24, 149, 150, 151, 152, 153, 154, 155, 0, + 61, 158, 159, 160, 161, 162, 163, 164, 165, 166, + 167, 117, 120, 24, 22, 48, 24, 200, 201, 202, + 111, 198, 247, 111, 25, 110, 391, 4, 119, 117, + 31, 208, 119, 32, 33, 122, 213, 214, 55, 56, + 41, 42, 43, 44, 45, 46, 47, 204, 225, 115, + 117, 96, 97, 230, 27, 28, 226, 3, 4, 3, + 4, 62, 3, 4, 241, 242, 243, 3, 4, 226, + 110, 415, 110, 417, 110, 245, 3, 4, 110, 112, + 4, 4, 115, 113, 117, 118, 4, 120, 245, 246, + 247, 316, 113, 318, 319, 320, 24, 4, 24, 24, + 116, 326, 116, 113, 59, 288, 64, 65, 66, 67, + 68, 69, 70, 335, 336, 337, 338, 339, 340, 20, + 4, 4, 4, 4, 4, 111, 348, 349, 350, 351, + 307, 7, 7, 7, 114, 111, 313, 111, 36, 111, + 41, 42, 43, 44, 45, 46, 47, 115, 111, 50, + 327, 328, 111, 24, 111, 213, 214, 111, 315, 316, + 317, 318, 319, 320, 321, 322, 284, 225, 111, 326, + 24, 111, 230, 111, 111, 114, 398, 111, 113, 34, + 113, 113, 113, 241, 242, 243, 63, 24, 21, 366, + 21, 368, 113, 113, 113, 372, 113, 422, 423, 424, + 357, 113, 113, 111, 381, 382, 383, 111, 111, 111, + 115, 111, 369, 435, 436, 437, 438, 111, 440, 441, + 442, 443, 111, 111, 4, 111, 475, 475, 113, 454, + 387, 24, 111, 111, 4, 412, 413, 36, 111, 57, + 4, 113, 111, 420, 493, 493, 111, 111, 111, 307, + 111, 111, 429, 111, 111, 313, 24, 414, 111, 111, + 482, 111, 484, 485, 111, 422, 423, 424, 114, 327, + 328, 428, 111, 115, 114, 57, 117, 434, 114, 456, + 10, 11, 12, 13, 14, 15, 16, 17, 114, 111, + 114, 111, 111, 114, 21, 36, 21, 454, 114, 114, + 114, 111, 114, 114, 117, 114, 21, 111, 366, 76, + 368, 21, 21, 490, 372, 41, 97, 25, 97, 97, + 97, 358, 122, 381, 382, 383, 503, 61, 198, 52, + 357, 3, 19, 510, 369, 392, 428, 514, 515, -1, + 5, 6, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 412, 413, -1, 22, -1, 24, + -1, 26, 420, -1, 20, -1, 22, -1, 24, -1, + -1, 429, -1, 38, 39, 31, 32, 33, -1, -1, + -1, -1, -1, -1, -1, 41, 42, 43, 44, 45, + 46, 47, -1, -1, 50, 51, -1, -1, 456, -1, + -1, -1, 58, -1, -1, -1, 62, -1, -1, -1, -1, -1, -1, 78, 79, 80, 81, 82, 83, 84, - 85, 86, 87, 88, 89, 90, 91, 455, -1, -1, - -1, -1, 97, -1, 99, 100, 101, 102, -1, 104, - 105, 106, -1, -1, -1, -1, -1, -1, -1, 114, - -1, -1, 117, -1, 119, -1, -1, 122, -1, -1, - -1, 489, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 502, -1, -1, -1, -1, -1, - -1, 509, -1, -1, -1, 513, 514, 5, 6, -1, - 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, - 18, 19, 20, 21, 22, -1, 24, 5, 6, -1, - 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, - 18, 19, 20, 21, 22, -1, 24, -1, -1, -1, - 48, -1, -1, -1, -1, 20, -1, 22, -1, 24, - -1, -1, -1, -1, -1, -1, 31, 32, 33, -1, - 48, 3, 4, 5, 6, 7, 41, 42, 43, 44, - 45, 46, 47, -1, -1, 50, 51, -1, -1, -1, - 22, -1, 24, 58, 26, 27, 28, 62, -1, -1, - -1, -1, -1, -1, -1, -1, 38, 39, -1, -1, - -1, -1, -1, 111, -1, -1, 114, -1, -1, 117, - -1, 119, 120, -1, -1, -1, -1, -1, -1, 61, - -1, -1, -1, 111, -1, -1, 114, -1, -1, 117, - -1, 119, 120, -1, -1, -1, 78, 79, 80, 81, - 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, - -1, -1, -1, -1, -1, 97, -1, 99, 100, 101, - 102, -1, 104, 105, 106, 3, 4, -1, -1, 7, - -1, -1, -1, -1, -1, 117, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 26, 27, - 28, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 38, 39, -1, -1, -1, -1, -1, -1, -1, -1, + 85, 86, 87, 88, 89, 90, 91, 92, -1, -1, + -1, -1, 490, 98, -1, 100, 101, 102, 103, -1, + 105, 106, 107, -1, -1, 503, -1, -1, -1, -1, + 115, -1, 510, 118, -1, 120, 514, 515, 123, 5, + 6, -1, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, -1, 24, 5, + 6, -1, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, -1, 24, -1, + -1, -1, 48, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 61, -1, -1, -1, -1, -1, -1, + -1, -1, 48, 3, 4, 5, 6, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, - 88, 89, 90, 91, -1, -1, -1, -1, -1, 97, - -1, 99, 100, 101, 102, -1, 104, 105, 106, -1, - -1, -1, -1, -1, -1, -1, -1, 5, 6, 117, - 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, 37, - -1, -1, -1, -1, -1, -1, -1, -1, 5, 6, - 48, 8, 9, 10, 11, 12, 13, 14, 15, 16, - 17, 18, 19, 20, 21, 22, -1, 24, -1, -1, + -1, -1, 22, -1, 24, -1, 26, 27, 28, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 38, 39, + -1, -1, -1, -1, -1, -1, 112, -1, -1, 115, + -1, -1, 118, -1, 120, 121, -1, -1, -1, -1, + -1, 61, -1, -1, -1, -1, 112, -1, -1, 115, + -1, -1, 118, -1, 120, 121, -1, -1, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, + 90, 91, 92, -1, -1, -1, -1, -1, 98, -1, + 100, 101, 102, 103, -1, 105, 106, 107, 3, 4, + -1, -1, 7, -1, -1, -1, -1, -1, 118, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 37, -1, -1, -1, -1, -1, -1, -1, -1, 5, - 6, 48, 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, -1, 24, -1, - -1, -1, -1, 111, -1, -1, 114, -1, -1, 117, - -1, 119, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 48, 5, 6, -1, 8, 9, 10, 11, + -1, 26, 27, 28, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 38, 39, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 61, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 78, 79, 80, 81, 82, 83, 84, + 85, 86, 87, 88, 89, 90, 91, 92, -1, -1, + -1, -1, -1, 98, -1, 100, 101, 102, 103, -1, + 105, 106, 107, -1, -1, -1, -1, -1, -1, -1, + -1, 5, 6, 118, 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, 37, -1, -1, -1, -1, -1, -1, + -1, -1, 5, 6, 48, 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, 37, -1, -1, -1, -1, -1, + -1, -1, -1, 5, 6, 48, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, - 22, -1, 24, -1, 111, -1, -1, 114, -1, -1, - 117, -1, 119, -1, -1, 37, -1, -1, -1, -1, + 22, -1, 24, -1, -1, -1, -1, -1, 112, -1, + -1, 115, -1, -1, 118, 37, 120, -1, -1, -1, -1, -1, -1, -1, 5, 6, 48, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, - 21, 22, -1, 24, -1, 111, -1, -1, 114, -1, - 116, 117, -1, 119, -1, -1, 37, -1, -1, -1, + 21, 22, -1, 24, -1, -1, -1, -1, -1, 112, + -1, -1, 115, -1, -1, 118, 37, 120, -1, -1, -1, -1, -1, -1, -1, 5, 6, 48, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, - 20, 21, 22, -1, 24, -1, -1, -1, -1, 111, - -1, -1, 114, -1, -1, 117, -1, 119, -1, -1, + 20, 21, 22, -1, 24, -1, -1, -1, -1, -1, + 112, -1, -1, 115, -1, -1, 118, -1, 120, -1, -1, -1, -1, -1, -1, -1, 5, 6, 48, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, -1, 24, -1, -1, -1, -1, - 111, -1, -1, 114, -1, -1, 117, -1, 119, -1, + -1, 112, -1, -1, 115, -1, -1, 118, -1, 120, -1, -1, -1, -1, -1, -1, -1, 5, 6, 48, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, -1, 24, -1, -1, -1, - -1, 111, -1, -1, 114, -1, -1, 117, -1, 119, - -1, -1, -1, -1, -1, -1, -1, -1, 5, 6, + -1, -1, 112, -1, -1, 115, -1, -1, 118, -1, + 120, -1, -1, -1, -1, -1, -1, -1, 5, 6, 48, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, -1, 24, -1, -1, - -1, -1, 111, -1, -1, 114, -1, -1, 117, -1, - 119, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 112, -1, -1, 115, -1, -1, 118, + -1, 120, -1, -1, -1, -1, -1, -1, -1, -1, -1, 48, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 111, -1, -1, 114, -1, -1, 117, - -1, 119, -1, -1, -1, -1, 35, -1, -1, -1, + -1, -1, -1, -1, 112, -1, -1, 115, -1, -1, + 118, -1, 120, -1, -1, -1, -1, 35, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 49, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 59, 60, -1, -1, 111, -1, -1, 114, -1, -1, - 117, -1, 119, 72, 73, 74, 75, 76, 77, 78, - 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, - 89, 90, 91, 92, 93, 94, -1, -1, 97, 98, - 99, 100, 101, 102, 103, 104, 105, 106, 107, 108 + -1, 49, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 59, 60, -1, -1, 112, -1, -1, 115, -1, + -1, 118, -1, 120, 72, 73, 74, 75, 76, 77, + 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, + 88, 89, 90, 91, 92, 93, 94, 95, -1, -1, + 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, + 108, 109 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ static const unsigned char yystos[] = { - 0, 154, 155, 156, 0, 25, 31, 41, 42, 43, - 44, 45, 46, 47, 62, 135, 173, 175, 177, 184, - 22, 24, 51, 58, 62, 134, 166, 177, 178, 61, - 64, 65, 66, 67, 68, 69, 70, 136, 171, 23, - 185, 186, 30, 120, 174, 185, 52, 53, 54, 71, - 163, 109, 61, 20, 45, 47, 50, 135, 109, 45, - 47, 176, 24, 161, 4, 5, 6, 8, 9, 10, + 0, 155, 156, 157, 0, 25, 31, 41, 42, 43, + 44, 45, 46, 47, 62, 136, 174, 176, 178, 185, + 22, 24, 51, 58, 62, 135, 167, 178, 179, 61, + 64, 65, 66, 67, 68, 69, 70, 137, 172, 23, + 186, 187, 30, 121, 175, 186, 52, 53, 54, 71, + 164, 110, 61, 20, 45, 47, 50, 136, 110, 45, + 47, 177, 24, 162, 4, 5, 6, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, - 21, 48, 111, 114, 117, 119, 124, 143, 144, 145, - 146, 147, 166, 181, 29, 119, 172, 134, 189, 109, - 109, 109, 109, 114, 164, 161, 143, 32, 33, 153, - 153, 153, 153, 171, 4, 4, 4, 8, 120, 147, - 148, 166, 112, 121, 35, 49, 59, 60, 72, 73, + 21, 48, 112, 115, 118, 120, 125, 144, 145, 146, + 147, 148, 167, 182, 29, 120, 173, 135, 190, 110, + 110, 110, 110, 115, 165, 162, 144, 32, 33, 154, + 154, 154, 154, 172, 4, 4, 4, 8, 121, 148, + 149, 167, 113, 122, 35, 49, 59, 60, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, - 94, 97, 98, 99, 100, 101, 102, 103, 104, 105, - 106, 107, 108, 126, 127, 128, 129, 187, 193, 194, - 196, 197, 24, 55, 56, 162, 4, 24, 24, 165, - 145, 145, 145, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 130, 131, 133, 145, 150, 115, - 115, 110, 120, 112, 37, 148, 149, 145, 183, 59, - 8, 183, 9, 21, 10, 11, 12, 13, 14, 15, - 16, 17, 130, 131, 132, 136, 145, 145, 183, 145, - 145, 190, 183, 183, 183, 183, 183, 183, 183, 183, - 145, 145, 145, 183, 136, 95, 96, 110, 116, 159, - 160, 158, 27, 28, 3, 4, 125, 4, 7, 26, - 38, 39, 97, 99, 100, 104, 105, 106, 114, 117, - 119, 122, 126, 127, 128, 129, 151, 181, 157, 147, - 147, 147, 37, 145, 168, 169, 170, 110, 113, 3, - 4, 7, 26, 27, 28, 38, 39, 61, 117, 151, - 180, 181, 182, 182, 182, 182, 143, 110, 138, 110, - 138, 182, 114, 110, 36, 110, 110, 110, 110, 110, - 110, 110, 182, 182, 182, 110, 143, 145, 183, 24, - 110, 141, 141, 141, 112, 112, 112, 112, 112, 112, - 116, 150, 152, 152, 120, 152, 24, 112, 112, 112, - 112, 141, 116, 118, 166, 167, 110, 113, 37, 63, - 179, 152, 110, 110, 182, 15, 57, 15, 110, 195, - 182, 114, 145, 183, 145, 183, 183, 183, 145, 145, - 110, 110, 110, 183, 182, 182, 110, 34, 57, 139, - 142, 150, 150, 150, 150, 150, 150, 110, 116, 118, - 120, 150, 150, 150, 150, 37, 168, 139, 140, 24, - 118, 21, 21, 112, 182, 4, 182, 183, 191, 110, - 182, 110, 110, 110, 182, 182, 182, 112, 145, 24, - 4, 141, 195, 36, 110, 110, 110, 110, 150, 110, - 110, 110, 110, 57, 137, 110, 182, 182, 191, 192, - 110, 138, 138, 110, 182, 110, 183, 183, 183, 192, - 182, 113, 145, 150, 150, 150, 150, 150, 150, 150, - 150, 4, 24, 110, 114, 113, 183, 116, 182, 113, - 113, 110, 113, 110, 110, 113, 113, 113, 113, 21, - 116, 132, 188, 36, 116, 150, 150, 150, 182, 180, - 116, 132, 21, 113, 113, 113, 110, 180, 182, 21, - 110, 76, 182, 21, 21, 182, 182 + 94, 95, 98, 99, 100, 101, 102, 103, 104, 105, + 106, 107, 108, 109, 127, 128, 129, 130, 188, 194, + 195, 197, 198, 24, 55, 56, 163, 4, 24, 24, + 166, 146, 146, 146, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 131, 132, 134, 146, 151, + 116, 116, 111, 121, 113, 37, 149, 150, 146, 184, + 59, 8, 184, 9, 21, 10, 11, 12, 13, 14, + 15, 16, 17, 131, 132, 133, 137, 146, 146, 184, + 146, 146, 191, 184, 184, 184, 184, 184, 184, 184, + 184, 146, 146, 146, 184, 137, 96, 97, 111, 117, + 160, 161, 159, 27, 28, 3, 4, 126, 4, 7, + 26, 38, 39, 98, 100, 101, 105, 106, 107, 115, + 118, 120, 123, 127, 128, 129, 130, 152, 182, 158, + 148, 148, 148, 37, 146, 169, 170, 171, 111, 114, + 3, 4, 7, 26, 27, 28, 38, 39, 61, 118, + 152, 181, 182, 183, 183, 183, 183, 144, 111, 139, + 111, 139, 183, 115, 111, 36, 111, 111, 111, 111, + 111, 111, 111, 183, 183, 183, 111, 144, 146, 184, + 24, 111, 142, 142, 142, 113, 113, 113, 113, 113, + 113, 117, 151, 153, 153, 121, 153, 24, 113, 113, + 113, 113, 142, 117, 119, 167, 168, 111, 114, 37, + 63, 180, 153, 111, 111, 183, 15, 57, 15, 111, + 196, 183, 115, 146, 184, 146, 184, 184, 184, 146, + 146, 111, 111, 111, 184, 183, 183, 111, 34, 57, + 140, 143, 151, 151, 151, 151, 151, 151, 111, 117, + 119, 121, 151, 151, 151, 151, 37, 169, 140, 141, + 24, 119, 21, 21, 113, 183, 4, 183, 184, 192, + 111, 183, 111, 111, 111, 183, 183, 183, 113, 146, + 24, 4, 142, 196, 36, 111, 111, 111, 111, 151, + 111, 111, 111, 111, 57, 138, 111, 183, 183, 192, + 193, 111, 139, 139, 111, 183, 111, 184, 184, 184, + 193, 183, 114, 146, 151, 151, 151, 151, 151, 151, + 151, 151, 4, 24, 111, 115, 114, 184, 117, 183, + 114, 114, 111, 114, 111, 111, 114, 114, 114, 114, + 21, 117, 133, 189, 36, 117, 151, 151, 151, 183, + 181, 117, 133, 21, 114, 114, 114, 111, 181, 183, + 21, 111, 76, 183, 21, 21, 183, 183 }; #define yyerrok (yyerrstatus = 0) @@ -2955,7 +2969,7 @@ switch (yyn) { case 3: -#line 1098 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1115 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[0].UIntVal) > (uint32_t)INT32_MAX) // Outside of my range! GEN_ERROR("Value too large for type!"); @@ -2965,7 +2979,7 @@ break; case 5: -#line 1107 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1124 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[0].UInt64Val) > (uint64_t)INT64_MAX) // Outside of my range! GEN_ERROR("Value too large for type!"); @@ -2974,99 +2988,99 @@ ;} break; - case 34: -#line 1131 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 35: +#line 1148 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.StrVal) = (yyvsp[-1].StrVal); CHECK_FOR_ERROR ;} break; - case 35: -#line 1135 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 36: +#line 1152 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.StrVal) = 0; CHECK_FOR_ERROR ;} break; - case 36: -#line 1140 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 37: +#line 1157 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::InternalLinkage; ;} break; - case 37: -#line 1141 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 38: +#line 1158 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::LinkOnceLinkage; ;} break; - case 38: -#line 1142 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 39: +#line 1159 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::WeakLinkage; ;} break; - case 39: -#line 1143 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 40: +#line 1160 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::AppendingLinkage; ;} break; - case 40: -#line 1144 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 41: +#line 1161 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::DLLImportLinkage; ;} break; - case 41: -#line 1145 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 42: +#line 1162 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::DLLExportLinkage; ;} break; - case 42: -#line 1146 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 43: +#line 1163 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::ExternalWeakLinkage; ;} break; - case 43: -#line 1147 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 44: +#line 1164 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::ExternalLinkage; ;} break; - case 44: -#line 1149 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 45: +#line 1166 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = CallingConv::C; ;} break; - case 45: -#line 1150 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 46: +#line 1167 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = CallingConv::C; ;} break; - case 46: -#line 1151 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 47: +#line 1168 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = CallingConv::CSRet; ;} break; - case 47: -#line 1152 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 48: +#line 1169 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = CallingConv::Fast; ;} break; - case 48: -#line 1153 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 49: +#line 1170 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = CallingConv::Cold; ;} break; - case 49: -#line 1154 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 50: +#line 1171 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = CallingConv::X86_StdCall; ;} break; - case 50: -#line 1155 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 51: +#line 1172 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = CallingConv::X86_FastCall; ;} break; - case 51: -#line 1156 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 52: +#line 1173 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { if ((unsigned)(yyvsp[0].UInt64Val) != (yyvsp[0].UInt64Val)) GEN_ERROR("Calling conv too large!"); @@ -3075,13 +3089,13 @@ ;} break; - case 52: -#line 1165 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 53: +#line 1182 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = 0; ;} break; - case 53: -#line 1166 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 54: +#line 1183 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = (yyvsp[0].UInt64Val); if ((yyval.UIntVal) != 0 && !isPowerOf2_32((yyval.UIntVal))) @@ -3090,13 +3104,13 @@ ;} break; - case 54: -#line 1172 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 55: +#line 1189 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = 0; ;} break; - case 55: -#line 1173 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 56: +#line 1190 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = (yyvsp[0].UInt64Val); if ((yyval.UIntVal) != 0 && !isPowerOf2_32((yyval.UIntVal))) @@ -3105,8 +3119,8 @@ ;} break; - case 56: -#line 1181 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 57: +#line 1198 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { for (unsigned i = 0, e = strlen((yyvsp[0].StrVal)); i != e; ++i) if ((yyvsp[0].StrVal)[i] == '"' || (yyvsp[0].StrVal)[i] == '\\') @@ -3116,28 +3130,28 @@ ;} break; - case 57: -#line 1189 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 58: +#line 1206 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.StrVal) = 0; ;} break; - case 58: -#line 1190 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 59: +#line 1207 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.StrVal) = (yyvsp[0].StrVal); ;} break; - case 59: -#line 1195 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 60: +#line 1212 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" {;} break; - case 60: -#line 1196 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 61: +#line 1213 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" {;} break; - case 61: -#line 1197 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 62: +#line 1214 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { CurGV->setSection((yyvsp[0].StrVal)); free((yyvsp[0].StrVal)); @@ -3145,8 +3159,8 @@ ;} break; - case 62: -#line 1202 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 63: +#line 1219 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[0].UInt64Val) != 0 && !isPowerOf2_32((yyvsp[0].UInt64Val))) GEN_ERROR("Alignment must be a power of two!"); @@ -3155,18 +3169,18 @@ ;} break; - case 64: -#line 1216 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 65: +#line 1233 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeVal) = new PATypeHolder((yyvsp[0].PrimType)); ;} break; - case 66: -#line 1217 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 67: +#line 1234 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeVal) = new PATypeHolder((yyvsp[0].PrimType)); ;} break; - case 67: -#line 1219 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 68: +#line 1236 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[0].TypeVal))->getDescription()); @@ -3175,24 +3189,24 @@ ;} break; - case 81: -#line 1231 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 82: +#line 1248 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeVal) = new PATypeHolder(OpaqueType::get()); CHECK_FOR_ERROR ;} break; - case 82: -#line 1235 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 83: +#line 1252 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeVal) = new PATypeHolder((yyvsp[0].PrimType)); CHECK_FOR_ERROR ;} break; - case 83: -#line 1239 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 84: +#line 1256 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { // Named types are also simple types... const Type* tmp = getTypeVal((yyvsp[0].ValIDVal)); CHECK_FOR_ERROR @@ -3200,8 +3214,8 @@ ;} break; - case 84: -#line 1247 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 85: +#line 1264 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { // Type UpReference if ((yyvsp[0].UInt64Val) > (uint64_t)~0U) GEN_ERROR("Value out of range!"); OpaqueType *OT = OpaqueType::get(); // Use temporary placeholder @@ -3212,8 +3226,8 @@ ;} break; - case 85: -#line 1255 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 86: +#line 1272 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { // Function derived type? std::vector Params; for (std::list::iterator I = (yyvsp[-1].TypeList)->begin(), @@ -3229,8 +3243,8 @@ ;} break; - case 86: -#line 1268 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 87: +#line 1285 "/proj/llvm/llvm2/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); @@ -3238,8 +3252,8 @@ ;} break; - case 87: -#line 1273 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 88: +#line 1290 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { // Packed array type? const llvm::Type* ElemTy = (yyvsp[-1].TypeVal)->get(); if ((unsigned)(yyvsp[-3].UInt64Val) != (yyvsp[-3].UInt64Val)) @@ -3254,8 +3268,8 @@ ;} break; - case 88: -#line 1285 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 89: +#line 1302 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { // Structure type? std::vector Elements; for (std::list::iterator I = (yyvsp[-1].TypeList)->begin(), @@ -3268,16 +3282,16 @@ ;} break; - case 89: -#line 1295 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 90: +#line 1312 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { // Empty structure type? (yyval.TypeVal) = new PATypeHolder(StructType::get(std::vector())); CHECK_FOR_ERROR ;} break; - case 90: -#line 1299 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 91: +#line 1316 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { // Pointer type? if (*(yyvsp[-1].TypeVal) == Type::LabelTy) GEN_ERROR("Cannot form a pointer to a basic block"); @@ -3287,8 +3301,8 @@ ;} break; - case 91: -#line 1310 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 92: +#line 1327 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeList) = new std::list(); (yyval.TypeList)->push_back(*(yyvsp[0].TypeVal)); delete (yyvsp[0].TypeVal); @@ -3296,40 +3310,40 @@ ;} break; - case 92: -#line 1315 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 93: +#line 1332 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { ((yyval.TypeList)=(yyvsp[-2].TypeList))->push_back(*(yyvsp[0].TypeVal)); delete (yyvsp[0].TypeVal); CHECK_FOR_ERROR ;} break; - case 94: -#line 1322 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 95: +#line 1339 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { ((yyval.TypeList)=(yyvsp[-2].TypeList))->push_back(Type::VoidTy); CHECK_FOR_ERROR ;} break; - case 95: -#line 1326 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 96: +#line 1343 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { ((yyval.TypeList) = new std::list())->push_back(Type::VoidTy); CHECK_FOR_ERROR ;} break; - case 96: -#line 1330 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 97: +#line 1347 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeList) = new std::list(); CHECK_FOR_ERROR ;} break; - case 97: -#line 1341 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 98: +#line 1358 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { // Nonempty unsized arr const ArrayType *ATy = dyn_cast((yyvsp[-3].TypeVal)->get()); if (ATy == 0) @@ -3358,8 +3372,8 @@ ;} break; - case 98: -#line 1367 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 99: +#line 1384 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { const ArrayType *ATy = dyn_cast((yyvsp[-2].TypeVal)->get()); if (ATy == 0) @@ -3376,8 +3390,8 @@ ;} break; - case 99: -#line 1381 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 100: +#line 1398 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { const ArrayType *ATy = dyn_cast((yyvsp[-2].TypeVal)->get()); if (ATy == 0) @@ -3410,8 +3424,8 @@ ;} break; - case 100: -#line 1411 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 101: +#line 1428 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { // Nonempty unsized arr const PackedType *PTy = dyn_cast((yyvsp[-3].TypeVal)->get()); if (PTy == 0) @@ -3440,8 +3454,8 @@ ;} break; - case 101: -#line 1437 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 102: +#line 1454 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { const StructType *STy = dyn_cast((yyvsp[-3].TypeVal)->get()); if (STy == 0) @@ -3465,8 +3479,8 @@ ;} break; - case 102: -#line 1458 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 103: +#line 1475 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { const StructType *STy = dyn_cast((yyvsp[-2].TypeVal)->get()); if (STy == 0) @@ -3482,8 +3496,8 @@ ;} break; - case 103: -#line 1471 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 104: +#line 1488 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { const PointerType *PTy = dyn_cast((yyvsp[-1].TypeVal)->get()); if (PTy == 0) @@ -3496,8 +3510,8 @@ ;} break; - case 104: -#line 1481 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 105: +#line 1498 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.ConstVal) = UndefValue::get((yyvsp[-1].TypeVal)->get()); delete (yyvsp[-1].TypeVal); @@ -3505,8 +3519,8 @@ ;} break; - case 105: -#line 1486 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 106: +#line 1503 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { const PointerType *Ty = dyn_cast((yyvsp[-1].TypeVal)->get()); if (Ty == 0) @@ -3570,8 +3584,8 @@ ;} break; - case 106: -#line 1547 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 107: +#line 1564 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[-1].TypeVal)->get() != (yyvsp[0].ConstVal)->getType()) GEN_ERROR("Mismatched types for constant expression!"); @@ -3581,8 +3595,8 @@ ;} break; - case 107: -#line 1554 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 108: +#line 1571 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { const Type *Ty = (yyvsp[-1].TypeVal)->get(); if (isa(Ty) || Ty == Type::LabelTy || isa(Ty)) @@ -3593,8 +3607,8 @@ ;} break; - case 108: -#line 1563 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 109: +#line 1580 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { // integral constants if (!ConstantInt::isValueValidForType((yyvsp[-1].PrimType), (yyvsp[0].SInt64Val))) GEN_ERROR("Constant value doesn't fit in type!"); @@ -3603,8 +3617,8 @@ ;} break; - case 109: -#line 1569 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 110: +#line 1586 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { // integral constants if (!ConstantInt::isValueValidForType((yyvsp[-1].PrimType), (yyvsp[0].UInt64Val))) GEN_ERROR("Constant value doesn't fit in type!"); @@ -3613,24 +3627,24 @@ ;} break; - case 110: -#line 1575 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 111: +#line 1592 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { // Boolean constants (yyval.ConstVal) = ConstantBool::getTrue(); CHECK_FOR_ERROR ;} break; - case 111: -#line 1579 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 112: +#line 1596 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { // Boolean constants (yyval.ConstVal) = ConstantBool::getFalse(); CHECK_FOR_ERROR ;} break; - case 112: -#line 1583 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 113: +#line 1600 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { // Float & Double constants if (!ConstantFP::isValueValidForType((yyvsp[-1].PrimType), (yyvsp[0].FPVal))) GEN_ERROR("Floating point constant invalid for type!!"); @@ -3639,8 +3653,8 @@ ;} break; - case 113: -#line 1591 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 114: +#line 1608 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { if (!(yyvsp[-3].ConstVal)->getType()->isFirstClassType()) GEN_ERROR("cast constant expression from a non-primitive type: '" + @@ -3654,8 +3668,8 @@ ;} break; - case 114: -#line 1602 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 115: +#line 1619 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { if (!isa((yyvsp[-2].ConstVal)->getType())) GEN_ERROR("GetElementPtr requires a pointer operand!"); @@ -3690,8 +3704,8 @@ ;} break; - case 115: -#line 1634 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 116: +#line 1651 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[-5].ConstVal)->getType() != Type::BoolTy) GEN_ERROR("Select condition must be of boolean type!"); @@ -3702,17 +3716,19 @@ ;} break; - case 116: -#line 1642 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 117: +#line 1659 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[-3].ConstVal)->getType() != (yyvsp[-1].ConstVal)->getType()) GEN_ERROR("Binary operator types must match!"); + sanitizeOpCode((yyvsp[-5].BinaryOpVal),(yyvsp[-3].ConstVal)->getType()); + CHECK_FOR_ERROR; // HACK: llvm 1.3 and earlier used to emit invalid pointer constant exprs. // To retain backward compatibility with these early compilers, we emit a // cast to the appropriate integer type automatically if we are in the // broken case. See PR424 for more information. if (!isa((yyvsp[-3].ConstVal)->getType())) { - (yyval.ConstVal) = ConstantExpr::get((yyvsp[-5].BinaryOpVal), (yyvsp[-3].ConstVal), (yyvsp[-1].ConstVal)); + (yyval.ConstVal) = ConstantExpr::get((yyvsp[-5].BinaryOpVal).opcode, (yyvsp[-3].ConstVal), (yyvsp[-1].ConstVal)); } else { const Type *IntPtrTy = 0; switch (CurModule.CurrentModule->getPointerSize()) { @@ -3720,7 +3736,7 @@ case Module::Pointer64: IntPtrTy = Type::LongTy; break; default: GEN_ERROR("invalid pointer binary constant expr!"); } - (yyval.ConstVal) = ConstantExpr::get((yyvsp[-5].BinaryOpVal), ConstantExpr::getCast((yyvsp[-3].ConstVal), IntPtrTy), + (yyval.ConstVal) = ConstantExpr::get((yyvsp[-5].BinaryOpVal).opcode, ConstantExpr::getCast((yyvsp[-3].ConstVal), IntPtrTy), ConstantExpr::getCast((yyvsp[-1].ConstVal), IntPtrTy)); (yyval.ConstVal) = ConstantExpr::getCast((yyval.ConstVal), (yyvsp[-3].ConstVal)->getType()); } @@ -3728,8 +3744,8 @@ ;} break; - case 117: -#line 1664 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 118: +#line 1683 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[-3].ConstVal)->getType() != (yyvsp[-1].ConstVal)->getType()) GEN_ERROR("Logical operator types must match!"); @@ -3738,35 +3754,35 @@ !cast((yyvsp[-3].ConstVal)->getType())->getElementType()->isIntegral()) GEN_ERROR("Logical operator requires integral operands!"); } - (yyval.ConstVal) = ConstantExpr::get((yyvsp[-5].BinaryOpVal), (yyvsp[-3].ConstVal), (yyvsp[-1].ConstVal)); + (yyval.ConstVal) = ConstantExpr::get((yyvsp[-5].BinaryOpVal).opcode, (yyvsp[-3].ConstVal), (yyvsp[-1].ConstVal)); CHECK_FOR_ERROR ;} break; - case 118: -#line 1675 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 119: +#line 1694 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[-3].ConstVal)->getType() != (yyvsp[-1].ConstVal)->getType()) GEN_ERROR("setcc operand types must match!"); - (yyval.ConstVal) = ConstantExpr::get((yyvsp[-5].BinaryOpVal), (yyvsp[-3].ConstVal), (yyvsp[-1].ConstVal)); + (yyval.ConstVal) = ConstantExpr::get((yyvsp[-5].BinaryOpVal).opcode, (yyvsp[-3].ConstVal), (yyvsp[-1].ConstVal)); CHECK_FOR_ERROR ;} break; - case 119: -#line 1681 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 120: +#line 1700 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[-1].ConstVal)->getType() != Type::UByteTy) GEN_ERROR("Shift count for shift constant must be unsigned byte!"); if (!(yyvsp[-3].ConstVal)->getType()->isInteger()) GEN_ERROR("Shift constant expression requires integer operand!"); - (yyval.ConstVal) = ConstantExpr::get((yyvsp[-5].OtherOpVal), (yyvsp[-3].ConstVal), (yyvsp[-1].ConstVal)); + (yyval.ConstVal) = ConstantExpr::get((yyvsp[-5].OtherOpVal).opcode, (yyvsp[-3].ConstVal), (yyvsp[-1].ConstVal)); CHECK_FOR_ERROR ;} break; - case 120: -#line 1689 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 121: +#line 1708 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { if (!ExtractElementInst::isValidOperands((yyvsp[-3].ConstVal), (yyvsp[-1].ConstVal))) GEN_ERROR("Invalid extractelement operands!"); @@ -3775,8 +3791,8 @@ ;} break; - case 121: -#line 1695 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 122: +#line 1714 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { if (!InsertElementInst::isValidOperands((yyvsp[-5].ConstVal), (yyvsp[-3].ConstVal), (yyvsp[-1].ConstVal))) GEN_ERROR("Invalid insertelement operands!"); @@ -3785,8 +3801,8 @@ ;} break; - case 122: -#line 1701 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 123: +#line 1720 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { if (!ShuffleVectorInst::isValidOperands((yyvsp[-5].ConstVal), (yyvsp[-3].ConstVal), (yyvsp[-1].ConstVal))) GEN_ERROR("Invalid shufflevector operands!"); @@ -3795,16 +3811,16 @@ ;} break; - case 123: -#line 1710 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 124: +#line 1729 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { ((yyval.ConstVector) = (yyvsp[-2].ConstVector))->push_back((yyvsp[0].ConstVal)); CHECK_FOR_ERROR ;} break; - case 124: -#line 1714 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 125: +#line 1733 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.ConstVector) = new std::vector(); (yyval.ConstVector)->push_back((yyvsp[0].ConstVal)); @@ -3812,18 +3828,18 @@ ;} break; - case 125: -#line 1722 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 126: +#line 1741 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = false; ;} break; - case 126: -#line 1722 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 127: +#line 1741 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = true; ;} break; - case 127: -#line 1732 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 128: +#line 1751 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.ModuleVal) = ParserResult = (yyvsp[0].ModuleVal); CurModule.ModuleDone(); @@ -3831,8 +3847,8 @@ ;} break; - case 128: -#line 1740 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 129: +#line 1759 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.ModuleVal) = (yyvsp[-1].ModuleVal); CurFun.FunctionDone(); @@ -3840,32 +3856,32 @@ ;} break; - case 129: -#line 1745 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 130: +#line 1764 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.ModuleVal) = (yyvsp[-1].ModuleVal); CHECK_FOR_ERROR ;} break; - case 130: -#line 1749 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 131: +#line 1768 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.ModuleVal) = (yyvsp[-3].ModuleVal); CHECK_FOR_ERROR ;} break; - case 131: -#line 1753 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 132: +#line 1772 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.ModuleVal) = (yyvsp[-1].ModuleVal); CHECK_FOR_ERROR ;} break; - case 132: -#line 1757 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 133: +#line 1776 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.ModuleVal) = CurModule.CurrentModule; // Emit an error if there are any unresolved types left. @@ -3881,8 +3897,8 @@ ;} break; - case 133: -#line 1772 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 134: +#line 1791 "/proj/llvm/llvm2/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: @@ -3907,22 +3923,22 @@ ;} break; - case 134: -#line 1794 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 135: +#line 1813 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { // Function prototypes can be in const pool CHECK_FOR_ERROR ;} break; - case 135: -#line 1797 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 136: +#line 1816 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { // Asm blocks can be in the const pool CHECK_FOR_ERROR ;} break; - case 136: -#line 1800 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 137: +#line 1819 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[0].ConstVal) == 0) GEN_ERROR("Global value initializer is not a constant!"); @@ -3931,15 +3947,15 @@ ;} break; - case 137: -#line 1805 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 138: +#line 1824 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { CurGV = 0; ;} break; - case 138: -#line 1808 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 139: +#line 1827 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { CurGV = ParseGlobalVariable((yyvsp[-3].StrVal), GlobalValue::ExternalLinkage, (yyvsp[-1].BoolVal), *(yyvsp[0].TypeVal), 0); CHECK_FOR_ERROR @@ -3947,16 +3963,16 @@ ;} break; - case 139: -#line 1812 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 140: +#line 1831 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { CurGV = 0; CHECK_FOR_ERROR ;} break; - case 140: -#line 1816 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 141: +#line 1835 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { CurGV = ParseGlobalVariable((yyvsp[-3].StrVal), GlobalValue::DLLImportLinkage, (yyvsp[-1].BoolVal), *(yyvsp[0].TypeVal), 0); CHECK_FOR_ERROR @@ -3964,16 +3980,16 @@ ;} break; - case 141: -#line 1820 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 142: +#line 1839 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { CurGV = 0; CHECK_FOR_ERROR ;} break; - case 142: -#line 1824 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 143: +#line 1843 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { CurGV = ParseGlobalVariable((yyvsp[-3].StrVal), GlobalValue::ExternalWeakLinkage, (yyvsp[-1].BoolVal), *(yyvsp[0].TypeVal), 0); @@ -3982,36 +3998,36 @@ ;} break; - case 143: -#line 1829 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 144: +#line 1848 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { CurGV = 0; CHECK_FOR_ERROR ;} break; - case 144: -#line 1833 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 145: +#line 1852 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { CHECK_FOR_ERROR ;} break; - case 145: -#line 1836 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 146: +#line 1855 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { CHECK_FOR_ERROR ;} break; - case 146: -#line 1839 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 147: +#line 1858 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { ;} break; - case 147: -#line 1843 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 148: +#line 1862 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { const std::string &AsmSoFar = CurModule.CurrentModule->getModuleInlineAsm(); char *EndStr = UnEscapeLexed((yyvsp[0].StrVal), true); @@ -4026,26 +4042,26 @@ ;} break; - case 148: -#line 1856 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 149: +#line 1875 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.Endianness) = Module::BigEndian; ;} break; - case 149: -#line 1857 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 150: +#line 1876 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.Endianness) = Module::LittleEndian; ;} break; - case 150: -#line 1859 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 151: +#line 1878 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { CurModule.CurrentModule->setEndianness((yyvsp[0].Endianness)); CHECK_FOR_ERROR ;} break; - case 151: -#line 1863 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 152: +#line 1882 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[0].UInt64Val) == 32) CurModule.CurrentModule->setPointerSize(Module::Pointer32); @@ -4057,8 +4073,8 @@ ;} break; - case 152: -#line 1872 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 153: +#line 1891 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { CurModule.CurrentModule->setTargetTriple((yyvsp[0].StrVal)); free((yyvsp[0].StrVal)); @@ -4066,8 +4082,8 @@ ;} break; - case 153: -#line 1877 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 154: +#line 1896 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { CurModule.CurrentModule->setDataLayout((yyvsp[0].StrVal)); free((yyvsp[0].StrVal)); @@ -4075,8 +4091,8 @@ ;} break; - case 155: -#line 1885 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 156: +#line 1904 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { CurModule.CurrentModule->addLibrary((yyvsp[0].StrVal)); free((yyvsp[0].StrVal)); @@ -4084,8 +4100,8 @@ ;} break; - case 156: -#line 1890 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 157: +#line 1909 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { CurModule.CurrentModule->addLibrary((yyvsp[0].StrVal)); free((yyvsp[0].StrVal)); @@ -4093,20 +4109,20 @@ ;} break; - case 157: -#line 1895 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 158: +#line 1914 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { CHECK_FOR_ERROR ;} break; - case 161: -#line 1905 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 162: +#line 1924 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.StrVal) = 0; ;} break; - case 162: -#line 1907 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 163: +#line 1926 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { if (*(yyvsp[-1].TypeVal) == Type::VoidTy) GEN_ERROR("void typed arguments are invalid!"); @@ -4115,8 +4131,8 @@ ;} break; - case 163: -#line 1914 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 164: +#line 1933 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.ArgList) = (yyvsp[-2].ArgList); (yyvsp[-2].ArgList)->push_back(*(yyvsp[0].ArgVal)); @@ -4125,8 +4141,8 @@ ;} break; - case 164: -#line 1920 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 165: +#line 1939 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.ArgList) = new std::vector >(); (yyval.ArgList)->push_back(*(yyvsp[0].ArgVal)); @@ -4135,16 +4151,16 @@ ;} break; - case 165: -#line 1927 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 166: +#line 1946 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.ArgList) = (yyvsp[0].ArgList); CHECK_FOR_ERROR ;} break; - case 166: -#line 1931 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 167: +#line 1950 "/proj/llvm/llvm2/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)); @@ -4162,16 +4178,16 @@ ;} break; - case 168: -#line 1942 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 169: +#line 1961 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.ArgList) = 0; CHECK_FOR_ERROR ;} break; - case 169: -#line 1948 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 170: +#line 1967 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { UnEscapeLexed((yyvsp[-5].StrVal)); std::string FunctionName((yyvsp[-5].StrVal)); @@ -4267,8 +4283,8 @@ ;} break; - case 172: -#line 2044 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 173: +#line 2063 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.FunctionVal) = CurFun.CurrentFunction; @@ -4278,31 +4294,31 @@ ;} break; - case 175: -#line 2054 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 176: +#line 2073 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.FunctionVal) = (yyvsp[-1].FunctionVal); CHECK_FOR_ERROR ;} break; - case 177: -#line 2060 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 178: +#line 2079 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { CurFun.Linkage = GlobalValue::DLLImportLinkage ;} break; - case 178: -#line 2061 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 179: +#line 2080 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { CurFun.Linkage = GlobalValue::DLLImportLinkage ;} break; - case 179: -#line 2063 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 180: +#line 2082 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { CurFun.isDeclare = true; ;} break; - case 180: -#line 2063 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 181: +#line 2082 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.FunctionVal) = CurFun.CurrentFunction; CurFun.FunctionDone(); @@ -4310,88 +4326,88 @@ ;} break; - case 181: -#line 2073 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 182: +#line 2092 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = false; CHECK_FOR_ERROR ;} break; - case 182: -#line 2077 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 183: +#line 2096 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = true; CHECK_FOR_ERROR ;} break; - case 183: -#line 2082 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 184: +#line 2101 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { // A reference to a direct constant (yyval.ValIDVal) = ValID::create((yyvsp[0].SInt64Val)); CHECK_FOR_ERROR ;} break; - case 184: -#line 2086 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 185: +#line 2105 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.ValIDVal) = ValID::create((yyvsp[0].UInt64Val)); CHECK_FOR_ERROR ;} break; - case 185: -#line 2090 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 186: +#line 2109 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { // Perhaps it's an FP constant? (yyval.ValIDVal) = ValID::create((yyvsp[0].FPVal)); CHECK_FOR_ERROR ;} break; - case 186: -#line 2094 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 187: +#line 2113 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.ValIDVal) = ValID::create(ConstantBool::getTrue()); CHECK_FOR_ERROR ;} break; - case 187: -#line 2098 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 188: +#line 2117 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.ValIDVal) = ValID::create(ConstantBool::getFalse()); CHECK_FOR_ERROR ;} break; - case 188: -#line 2102 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 189: +#line 2121 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.ValIDVal) = ValID::createNull(); CHECK_FOR_ERROR ;} break; - case 189: -#line 2106 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 190: +#line 2125 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.ValIDVal) = ValID::createUndef(); CHECK_FOR_ERROR ;} break; - case 190: -#line 2110 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 191: +#line 2129 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { // A vector zero constant. (yyval.ValIDVal) = ValID::createZeroInit(); CHECK_FOR_ERROR ;} break; - case 191: -#line 2114 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 192: +#line 2133 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { // Nonempty unsized packed vector const Type *ETy = (*(yyvsp[-1].ConstVector))[0]->getType(); int NumElements = (yyvsp[-1].ConstVector)->size(); @@ -4419,16 +4435,16 @@ ;} break; - case 192: -#line 2139 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 193: +#line 2158 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.ValIDVal) = ValID::create((yyvsp[0].ConstVal)); CHECK_FOR_ERROR ;} break; - case 193: -#line 2143 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 194: +#line 2162 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { char *End = UnEscapeLexed((yyvsp[-2].StrVal), true); std::string AsmStr = std::string((yyvsp[-2].StrVal), End); @@ -4441,48 +4457,48 @@ ;} break; - case 194: -#line 2157 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 195: +#line 2176 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { // Is it an integer reference...? (yyval.ValIDVal) = ValID::create((yyvsp[0].SIntVal)); CHECK_FOR_ERROR ;} break; - case 195: -#line 2161 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 196: +#line 2180 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { // Is it a named reference...? (yyval.ValIDVal) = ValID::create((yyvsp[0].StrVal)); CHECK_FOR_ERROR ;} break; - case 198: -#line 2173 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 199: +#line 2192 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.ValueVal) = getVal(*(yyvsp[-1].TypeVal), (yyvsp[0].ValIDVal)); delete (yyvsp[-1].TypeVal); CHECK_FOR_ERROR ;} break; - case 199: -#line 2178 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 200: +#line 2197 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.FunctionVal) = (yyvsp[-1].FunctionVal); CHECK_FOR_ERROR ;} break; - case 200: -#line 2182 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 201: +#line 2201 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { // Do not allow functions with 0 basic blocks (yyval.FunctionVal) = (yyvsp[-1].FunctionVal); CHECK_FOR_ERROR ;} break; - case 201: -#line 2191 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 202: +#line 2210 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { setValueName((yyvsp[0].TermInstVal), (yyvsp[-1].StrVal)); CHECK_FOR_ERROR @@ -4495,8 +4511,8 @@ ;} break; - case 202: -#line 2202 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 203: +#line 2221 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyvsp[-1].BasicBlockVal)->getInstList().push_back((yyvsp[0].InstVal)); (yyval.BasicBlockVal) = (yyvsp[-1].BasicBlockVal); @@ -4504,8 +4520,8 @@ ;} break; - case 203: -#line 2207 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 204: +#line 2226 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.BasicBlockVal) = CurBB = getBBVal(ValID::create((int)CurFun.NextBBNum++), true); CHECK_FOR_ERROR @@ -4520,8 +4536,8 @@ ;} break; - case 204: -#line 2219 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 205: +#line 2238 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.BasicBlockVal) = CurBB = getBBVal(ValID::create((yyvsp[0].StrVal)), true); CHECK_FOR_ERROR @@ -4536,24 +4552,24 @@ ;} break; - case 205: -#line 2232 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 206: +#line 2251 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { // Return with a result... (yyval.TermInstVal) = new ReturnInst((yyvsp[0].ValueVal)); CHECK_FOR_ERROR ;} break; - case 206: -#line 2236 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 207: +#line 2255 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { // Return with no result... (yyval.TermInstVal) = new ReturnInst(); CHECK_FOR_ERROR ;} break; - case 207: -#line 2240 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 208: +#line 2259 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { // Unconditional Branch... BasicBlock* tmpBB = getBBVal((yyvsp[0].ValIDVal)); CHECK_FOR_ERROR @@ -4561,8 +4577,8 @@ ;} break; - case 208: -#line 2245 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 209: +#line 2264 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { BasicBlock* tmpBBA = getBBVal((yyvsp[-3].ValIDVal)); CHECK_FOR_ERROR @@ -4574,8 +4590,8 @@ ;} break; - case 209: -#line 2254 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 210: +#line 2273 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { Value* tmpVal = getVal((yyvsp[-7].PrimType), (yyvsp[-6].ValIDVal)); CHECK_FOR_ERROR @@ -4597,8 +4613,8 @@ ;} break; - case 210: -#line 2273 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 211: +#line 2292 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { Value* tmpVal = getVal((yyvsp[-6].PrimType), (yyvsp[-5].ValIDVal)); CHECK_FOR_ERROR @@ -4610,8 +4626,8 @@ ;} break; - case 211: -#line 2283 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 212: +#line 2302 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { const PointerType *PFTy; const FunctionType *Ty; @@ -4669,24 +4685,24 @@ ;} break; - case 212: -#line 2338 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 213: +#line 2357 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.TermInstVal) = new UnwindInst(); CHECK_FOR_ERROR ;} break; - case 213: -#line 2342 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 214: +#line 2361 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.TermInstVal) = new UnreachableInst(); CHECK_FOR_ERROR ;} break; - case 214: -#line 2349 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 215: +#line 2368 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.JumpTable) = (yyvsp[-5].JumpTable); Constant *V = cast(getValNonImprovising((yyvsp[-4].PrimType), (yyvsp[-3].ValIDVal))); @@ -4700,8 +4716,8 @@ ;} break; - case 215: -#line 2360 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 216: +#line 2379 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.JumpTable) = new std::vector >(); Constant *V = cast(getValNonImprovising((yyvsp[-4].PrimType), (yyvsp[-3].ValIDVal))); @@ -4716,8 +4732,8 @@ ;} break; - case 216: -#line 2373 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 217: +#line 2392 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { // Is this definition named?? if so, assign the name... setValueName((yyvsp[0].InstVal), (yyvsp[-1].StrVal)); @@ -4728,8 +4744,8 @@ ;} break; - case 217: -#line 2382 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 218: +#line 2401 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { // Used for PHI nodes (yyval.PHIList) = new std::list >(); Value* tmpVal = getVal(*(yyvsp[-5].TypeVal), (yyvsp[-3].ValIDVal)); @@ -4741,8 +4757,8 @@ ;} break; - case 218: -#line 2391 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 219: +#line 2410 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.PHIList) = (yyvsp[-6].PHIList); Value* tmpVal = getVal((yyvsp[-6].PHIList)->front().first->getType(), (yyvsp[-3].ValIDVal)); @@ -4753,16 +4769,16 @@ ;} break; - case 219: -#line 2401 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 220: +#line 2420 "/proj/llvm/llvm2/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 220: -#line 2405 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 221: +#line 2424 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.ValueList) = (yyvsp[-2].ValueList); (yyvsp[-2].ValueList)->push_back((yyvsp[0].ValueVal)); @@ -4770,49 +4786,51 @@ ;} break; - case 222: -#line 2412 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 223: +#line 2431 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.ValueList) = 0; ;} break; - case 223: -#line 2414 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 224: +#line 2433 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = true; CHECK_FOR_ERROR ;} break; - case 224: -#line 2418 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 225: +#line 2437 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = false; CHECK_FOR_ERROR ;} break; - case 225: -#line 2423 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 226: +#line 2442 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { if (!(*(yyvsp[-3].TypeVal))->isInteger() && !(*(yyvsp[-3].TypeVal))->isFloatingPoint() && !isa((*(yyvsp[-3].TypeVal)).get())) GEN_ERROR( "Arithmetic operator requires integer, FP, or packed operands!"); - if (isa((*(yyvsp[-3].TypeVal)).get()) && (yyvsp[-4].BinaryOpVal) == Instruction::Rem) + if (isa((*(yyvsp[-3].TypeVal)).get()) && (yyvsp[-4].BinaryOpVal).opcode == Instruction::Rem) GEN_ERROR("Rem not supported on packed types!"); + sanitizeOpCode((yyvsp[-4].BinaryOpVal),*(yyvsp[-3].TypeVal)); + CHECK_FOR_ERROR; Value* val1 = getVal(*(yyvsp[-3].TypeVal), (yyvsp[-2].ValIDVal)); CHECK_FOR_ERROR Value* val2 = getVal(*(yyvsp[-3].TypeVal), (yyvsp[0].ValIDVal)); CHECK_FOR_ERROR - (yyval.InstVal) = BinaryOperator::create((yyvsp[-4].BinaryOpVal), val1, val2); + (yyval.InstVal) = BinaryOperator::create((yyvsp[-4].BinaryOpVal).opcode, val1, val2); if ((yyval.InstVal) == 0) GEN_ERROR("binary operator returned null!"); delete (yyvsp[-3].TypeVal); ;} break; - case 226: -#line 2439 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 227: +#line 2460 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { if (!(*(yyvsp[-3].TypeVal))->isIntegral()) { if (!isa((yyvsp[-3].TypeVal)->get()) || @@ -4823,15 +4841,15 @@ CHECK_FOR_ERROR Value* tmpVal2 = getVal(*(yyvsp[-3].TypeVal), (yyvsp[0].ValIDVal)); CHECK_FOR_ERROR - (yyval.InstVal) = BinaryOperator::create((yyvsp[-4].BinaryOpVal), tmpVal1, tmpVal2); + (yyval.InstVal) = BinaryOperator::create((yyvsp[-4].BinaryOpVal).opcode, tmpVal1, tmpVal2); if ((yyval.InstVal) == 0) GEN_ERROR("binary operator returned null!"); delete (yyvsp[-3].TypeVal); ;} break; - case 227: -#line 2454 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 228: +#line 2475 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { if(isa((*(yyvsp[-3].TypeVal)).get())) { GEN_ERROR( @@ -4841,15 +4859,15 @@ CHECK_FOR_ERROR Value* tmpVal2 = getVal(*(yyvsp[-3].TypeVal), (yyvsp[0].ValIDVal)); CHECK_FOR_ERROR - (yyval.InstVal) = new SetCondInst((yyvsp[-4].BinaryOpVal), tmpVal1, tmpVal2); + (yyval.InstVal) = new SetCondInst((yyvsp[-4].BinaryOpVal).opcode, tmpVal1, tmpVal2); if ((yyval.InstVal) == 0) GEN_ERROR("binary operator returned null!"); delete (yyvsp[-3].TypeVal); ;} break; - case 228: -#line 2468 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 229: +#line 2489 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { std::cerr << "WARNING: Use of eliminated 'not' instruction:" << " Replacing with 'xor'.\n"; @@ -4865,20 +4883,20 @@ ;} break; - case 229: -#line 2481 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 230: +#line 2502 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[0].ValueVal)->getType() != Type::UByteTy) GEN_ERROR("Shift amount must be ubyte!"); if (!(yyvsp[-2].ValueVal)->getType()->isInteger()) GEN_ERROR("Shift constant expression requires integer operand!"); - (yyval.InstVal) = new ShiftInst((yyvsp[-3].OtherOpVal), (yyvsp[-2].ValueVal), (yyvsp[0].ValueVal)); + (yyval.InstVal) = new ShiftInst((yyvsp[-3].OtherOpVal).opcode, (yyvsp[-2].ValueVal), (yyvsp[0].ValueVal)); CHECK_FOR_ERROR ;} break; - case 230: -#line 2489 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 231: +#line 2510 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { if (!(yyvsp[0].TypeVal)->get()->isFirstClassType()) GEN_ERROR("cast instruction to a non-primitive type: '" + @@ -4889,8 +4907,8 @@ ;} break; - case 231: -#line 2497 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 232: +#line 2518 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[-4].ValueVal)->getType() != Type::BoolTy) GEN_ERROR("select condition must be boolean!"); @@ -4901,8 +4919,8 @@ ;} break; - case 232: -#line 2505 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 233: +#line 2526 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { NewVarArgs = true; (yyval.InstVal) = new VAArgInst((yyvsp[-2].ValueVal), *(yyvsp[0].TypeVal)); @@ -4911,8 +4929,8 @@ ;} break; - case 233: -#line 2511 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 234: +#line 2532 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { ObsoleteVarArgs = true; const Type* ArgTy = (yyvsp[-2].ValueVal)->getType(); @@ -4935,8 +4953,8 @@ ;} break; - case 234: -#line 2531 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 235: +#line 2552 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { ObsoleteVarArgs = true; const Type* ArgTy = (yyvsp[-2].ValueVal)->getType(); @@ -4962,8 +4980,8 @@ ;} break; - case 235: -#line 2554 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 236: +#line 2575 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { if (!ExtractElementInst::isValidOperands((yyvsp[-2].ValueVal), (yyvsp[0].ValueVal))) GEN_ERROR("Invalid extractelement operands!"); @@ -4972,8 +4990,8 @@ ;} break; - case 236: -#line 2560 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 237: +#line 2581 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { if (!InsertElementInst::isValidOperands((yyvsp[-4].ValueVal), (yyvsp[-2].ValueVal), (yyvsp[0].ValueVal))) GEN_ERROR("Invalid insertelement operands!"); @@ -4982,8 +5000,8 @@ ;} break; - case 237: -#line 2566 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 238: +#line 2587 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { if (!ShuffleVectorInst::isValidOperands((yyvsp[-4].ValueVal), (yyvsp[-2].ValueVal), (yyvsp[0].ValueVal))) GEN_ERROR("Invalid shufflevector operands!"); @@ -4992,8 +5010,8 @@ ;} break; - case 238: -#line 2572 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 239: +#line 2593 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { const Type *Ty = (yyvsp[0].PHIList)->front().first->getType(); if (!Ty->isFirstClassType()) @@ -5011,8 +5029,8 @@ ;} break; - case 239: -#line 2587 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 240: +#line 2608 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { const PointerType *PFTy; const FunctionType *Ty; @@ -5074,48 +5092,48 @@ ;} break; - case 240: -#line 2646 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 241: +#line 2667 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.InstVal) = (yyvsp[0].InstVal); CHECK_FOR_ERROR ;} break; - case 241: -#line 2653 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 242: +#line 2674 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.ValueList) = (yyvsp[0].ValueList); CHECK_FOR_ERROR ;} break; - case 242: -#line 2656 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 243: +#line 2677 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.ValueList) = new std::vector(); CHECK_FOR_ERROR ;} break; - case 243: -#line 2661 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 244: +#line 2682 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = true; CHECK_FOR_ERROR ;} break; - case 244: -#line 2665 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 245: +#line 2686 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = false; CHECK_FOR_ERROR ;} break; - case 245: -#line 2672 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 246: +#line 2693 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.InstVal) = new MallocInst(*(yyvsp[-1].TypeVal), 0, (yyvsp[0].UIntVal)); delete (yyvsp[-1].TypeVal); @@ -5123,8 +5141,8 @@ ;} break; - case 246: -#line 2677 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 247: +#line 2698 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { Value* tmpVal = getVal((yyvsp[-2].PrimType), (yyvsp[-1].ValIDVal)); CHECK_FOR_ERROR @@ -5133,8 +5151,8 @@ ;} break; - case 247: -#line 2683 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 248: +#line 2704 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { (yyval.InstVal) = new AllocaInst(*(yyvsp[-1].TypeVal), 0, (yyvsp[0].UIntVal)); delete (yyvsp[-1].TypeVal); @@ -5142,8 +5160,8 @@ ;} break; - case 248: -#line 2688 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 249: +#line 2709 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { Value* tmpVal = getVal((yyvsp[-2].PrimType), (yyvsp[-1].ValIDVal)); CHECK_FOR_ERROR @@ -5152,8 +5170,8 @@ ;} break; - case 249: -#line 2694 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 250: +#line 2715 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { if (!isa((yyvsp[0].ValueVal)->getType())) GEN_ERROR("Trying to free nonpointer type " + @@ -5163,8 +5181,8 @@ ;} break; - case 250: -#line 2702 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 251: +#line 2723 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { if (!isa((yyvsp[-1].TypeVal)->get())) GEN_ERROR("Can't load from nonpointer type: " + @@ -5179,8 +5197,8 @@ ;} break; - case 251: -#line 2714 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 252: +#line 2735 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { const PointerType *PT = dyn_cast((yyvsp[-1].TypeVal)->get()); if (!PT) @@ -5198,8 +5216,8 @@ ;} break; - case 252: -#line 2729 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" + case 253: +#line 2750 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" { if (!isa((yyvsp[-2].TypeVal)->get())) GEN_ERROR("getelementptr insn requires pointer operand!"); @@ -5231,7 +5249,7 @@ } /* Line 1126 of yacc.c. */ -#line 5235 "llvmAsmParser.tab.c" +#line 5253 "llvmAsmParser.tab.c" yyvsp -= yylen; yyssp -= yylen; @@ -5499,7 +5517,7 @@ } -#line 2755 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2776 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" void llvm::GenerateError(const std::string &message, int LineNo) { Index: llvm/lib/AsmParser/llvmAsmParser.h.cvs diff -u llvm/lib/AsmParser/llvmAsmParser.h.cvs:1.13.2.3 llvm/lib/AsmParser/llvmAsmParser.h.cvs:1.13.2.4 --- llvm/lib/AsmParser/llvmAsmParser.h.cvs:1.13.2.3 Thu Oct 19 19:34:43 2006 +++ llvm/lib/AsmParser/llvmAsmParser.h.cvs Thu Oct 19 23:27:17 2006 @@ -107,34 +107,35 @@ ADD = 333, SUB = 334, MUL = 335, - DIV = 336, - REM = 337, - AND = 338, - OR = 339, - XOR = 340, - SETLE = 341, - SETGE = 342, - SETLT = 343, - SETGT = 344, - SETEQ = 345, - SETNE = 346, - MALLOC = 347, - ALLOCA = 348, - FREE = 349, - LOAD = 350, - STORE = 351, - GETELEMENTPTR = 352, - PHI_TOK = 353, - CAST = 354, - SELECT = 355, - SHL = 356, - SHR = 357, - VAARG = 358, - EXTRACTELEMENT = 359, - INSERTELEMENT = 360, - SHUFFLEVECTOR = 361, - VAARG_old = 362, - VANEXT_old = 363 + UDIV = 336, + SDIV = 337, + REM = 338, + AND = 339, + OR = 340, + XOR = 341, + SETLE = 342, + SETGE = 343, + SETLT = 344, + SETGT = 345, + SETEQ = 346, + SETNE = 347, + MALLOC = 348, + ALLOCA = 349, + FREE = 350, + LOAD = 351, + STORE = 352, + GETELEMENTPTR = 353, + PHI_TOK = 354, + CAST = 355, + SELECT = 356, + SHL = 357, + SHR = 358, + VAARG = 359, + EXTRACTELEMENT = 360, + INSERTELEMENT = 361, + SHUFFLEVECTOR = 362, + VAARG_old = 363, + VANEXT_old = 364 }; #endif /* Tokens. */ @@ -216,40 +217,41 @@ #define ADD 333 #define SUB 334 #define MUL 335 -#define DIV 336 -#define REM 337 -#define AND 338 -#define OR 339 -#define XOR 340 -#define SETLE 341 -#define SETGE 342 -#define SETLT 343 -#define SETGT 344 -#define SETEQ 345 -#define SETNE 346 -#define MALLOC 347 -#define ALLOCA 348 -#define FREE 349 -#define LOAD 350 -#define STORE 351 -#define GETELEMENTPTR 352 -#define PHI_TOK 353 -#define CAST 354 -#define SELECT 355 -#define SHL 356 -#define SHR 357 -#define VAARG 358 -#define EXTRACTELEMENT 359 -#define INSERTELEMENT 360 -#define SHUFFLEVECTOR 361 -#define VAARG_old 362 -#define VANEXT_old 363 +#define UDIV 336 +#define SDIV 337 +#define REM 338 +#define AND 339 +#define OR 340 +#define XOR 341 +#define SETLE 342 +#define SETGE 343 +#define SETLT 344 +#define SETGT 345 +#define SETEQ 346 +#define SETNE 347 +#define MALLOC 348 +#define ALLOCA 349 +#define FREE 350 +#define LOAD 351 +#define STORE 352 +#define GETELEMENTPTR 353 +#define PHI_TOK 354 +#define CAST 355 +#define SELECT 356 +#define SHL 357 +#define SHR 358 +#define VAARG 359 +#define EXTRACTELEMENT 360 +#define INSERTELEMENT 361 +#define SHUFFLEVECTOR 362 +#define VAARG_old 363 +#define VANEXT_old 364 #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) -#line 974 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +#line 991 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y" typedef union YYSTYPE { llvm::Module *ModuleVal; llvm::Function *FunctionVal; @@ -283,14 +285,14 @@ char *StrVal; // This memory is strdup'd! llvm::ValID ValIDVal; // strdup'd memory maybe! - llvm::Instruction::BinaryOps BinaryOpVal; - llvm::Instruction::TermOps TermOpVal; - llvm::Instruction::MemoryOps MemOpVal; - llvm::Instruction::OtherOps OtherOpVal; - llvm::Module::Endianness Endianness; + BinaryOpInfo BinaryOpVal; + TermOpInfo TermOpVal; + MemOpInfo MemOpVal; + OtherOpInfo OtherOpVal; + llvm::Module::Endianness Endianness; } YYSTYPE; /* Line 1447 of yacc.c. */ -#line 294 "llvmAsmParser.tab.h" +#line 296 "llvmAsmParser.tab.h" # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 # define YYSTYPE_IS_TRIVIAL 1 Index: llvm/lib/AsmParser/llvmAsmParser.y diff -u llvm/lib/AsmParser/llvmAsmParser.y:1.266.2.3 llvm/lib/AsmParser/llvmAsmParser.y:1.266.2.4 --- llvm/lib/AsmParser/llvmAsmParser.y:1.266.2.3 Thu Oct 19 19:34:43 2006 +++ llvm/lib/AsmParser/llvmAsmParser.y Thu Oct 19 23:27:17 2006 @@ -813,6 +813,23 @@ return Ty; } +// This function is +template +static void sanitizeOpCode(OpcodeInfo &OI, const PATypeHolder& Ty) { + if (OI.obsolete) { + switch (OI.opcode) { + default: + GenerateError("Invalid Obsolete OpCode"); + break; + case Instruction::UDiv: + if (Ty->isSigned()) + OI.opcode = Instruction::SDiv; + break; + } + OI.obsolete = false; + } +} + // common code from the two 'RunVMAsmParser' functions static Module* RunParser(Module * M) { @@ -1004,11 +1021,11 @@ char *StrVal; // This memory is strdup'd! llvm::ValID ValIDVal; // strdup'd memory maybe! - llvm::Instruction::BinaryOps BinaryOpVal; - llvm::Instruction::TermOps TermOpVal; - llvm::Instruction::MemoryOps MemOpVal; - llvm::Instruction::OtherOps OtherOpVal; - llvm::Module::Endianness Endianness; + BinaryOpInfo BinaryOpVal; + TermOpInfo TermOpVal; + MemOpInfo MemOpVal; + OtherOpInfo OtherOpVal; + llvm::Module::Endianness Endianness; } %type Module FunctionList @@ -1076,8 +1093,8 @@ // Binary Operators %type ArithmeticOps LogicalOps SetCondOps // Binops Subcatagories -%token ADD SUB MUL DIV REM AND OR XOR -%token SETLE SETGE SETLT SETGT SETEQ SETNE // Binary Comarators +%token ADD SUB MUL UDIV SDIV REM AND OR XOR +%token SETLE SETGE SETLT SETGT SETEQ SETNE // Binary Comparators // Memory Instructions %token MALLOC ALLOCA FREE LOAD STORE GETELEMENTPTR @@ -1114,7 +1131,7 @@ // Operations that are notably excluded from this list include: // RET, BR, & SWITCH because they end basic blocks and are treated specially. // -ArithmeticOps: ADD | SUB | MUL | DIV | REM; +ArithmeticOps: ADD | SUB | MUL | UDIV | SDIV | REM ; LogicalOps : AND | OR | XOR; SetCondOps : SETLE | SETGE | SETLT | SETGT | SETEQ | SETNE; @@ -1642,12 +1659,14 @@ | ArithmeticOps '(' ConstVal ',' ConstVal ')' { if ($3->getType() != $5->getType()) GEN_ERROR("Binary operator types must match!"); + sanitizeOpCode($1,$3->getType()); + CHECK_FOR_ERROR; // HACK: llvm 1.3 and earlier used to emit invalid pointer constant exprs. // To retain backward compatibility with these early compilers, we emit a // cast to the appropriate integer type automatically if we are in the // broken case. See PR424 for more information. if (!isa($3->getType())) { - $$ = ConstantExpr::get($1, $3, $5); + $$ = ConstantExpr::get($1.opcode, $3, $5); } else { const Type *IntPtrTy = 0; switch (CurModule.CurrentModule->getPointerSize()) { @@ -1655,7 +1674,7 @@ case Module::Pointer64: IntPtrTy = Type::LongTy; break; default: GEN_ERROR("invalid pointer binary constant expr!"); } - $$ = ConstantExpr::get($1, ConstantExpr::getCast($3, IntPtrTy), + $$ = ConstantExpr::get($1.opcode, ConstantExpr::getCast($3, IntPtrTy), ConstantExpr::getCast($5, IntPtrTy)); $$ = ConstantExpr::getCast($$, $3->getType()); } @@ -1669,13 +1688,13 @@ !cast($3->getType())->getElementType()->isIntegral()) GEN_ERROR("Logical operator requires integral operands!"); } - $$ = ConstantExpr::get($1, $3, $5); + $$ = ConstantExpr::get($1.opcode, $3, $5); CHECK_FOR_ERROR } | SetCondOps '(' ConstVal ',' ConstVal ')' { if ($3->getType() != $5->getType()) GEN_ERROR("setcc operand types must match!"); - $$ = ConstantExpr::get($1, $3, $5); + $$ = ConstantExpr::get($1.opcode, $3, $5); CHECK_FOR_ERROR } | ShiftOps '(' ConstVal ',' ConstVal ')' { @@ -1683,7 +1702,7 @@ GEN_ERROR("Shift count for shift constant must be unsigned byte!"); if (!$3->getType()->isInteger()) GEN_ERROR("Shift constant expression requires integer operand!"); - $$ = ConstantExpr::get($1, $3, $5); + $$ = ConstantExpr::get($1.opcode, $3, $5); CHECK_FOR_ERROR } | EXTRACTELEMENT '(' ConstVal ',' ConstVal ')' { @@ -2425,13 +2444,15 @@ !isa((*$2).get())) GEN_ERROR( "Arithmetic operator requires integer, FP, or packed operands!"); - if (isa((*$2).get()) && $1 == Instruction::Rem) + if (isa((*$2).get()) && $1.opcode == Instruction::Rem) GEN_ERROR("Rem not supported on packed types!"); + sanitizeOpCode($1,*$2); + CHECK_FOR_ERROR; Value* val1 = getVal(*$2, $3); CHECK_FOR_ERROR Value* val2 = getVal(*$2, $5); CHECK_FOR_ERROR - $$ = BinaryOperator::create($1, val1, val2); + $$ = BinaryOperator::create($1.opcode, val1, val2); if ($$ == 0) GEN_ERROR("binary operator returned null!"); delete $2; @@ -2446,7 +2467,7 @@ CHECK_FOR_ERROR Value* tmpVal2 = getVal(*$2, $5); CHECK_FOR_ERROR - $$ = BinaryOperator::create($1, tmpVal1, tmpVal2); + $$ = BinaryOperator::create($1.opcode, tmpVal1, tmpVal2); if ($$ == 0) GEN_ERROR("binary operator returned null!"); delete $2; @@ -2460,7 +2481,7 @@ CHECK_FOR_ERROR Value* tmpVal2 = getVal(*$2, $5); CHECK_FOR_ERROR - $$ = new SetCondInst($1, tmpVal1, tmpVal2); + $$ = new SetCondInst($1.opcode, tmpVal1, tmpVal2); if ($$ == 0) GEN_ERROR("binary operator returned null!"); delete $2; @@ -2483,7 +2504,7 @@ GEN_ERROR("Shift amount must be ubyte!"); if (!$2->getType()->isInteger()) GEN_ERROR("Shift constant expression requires integer operand!"); - $$ = new ShiftInst($1, $2, $4); + $$ = new ShiftInst($1.opcode, $2, $4); CHECK_FOR_ERROR } | CAST ResolvedVal TO Types { Index: llvm/lib/AsmParser/llvmAsmParser.y.cvs diff -u llvm/lib/AsmParser/llvmAsmParser.y.cvs:1.18.2.3 llvm/lib/AsmParser/llvmAsmParser.y.cvs:1.18.2.4 --- llvm/lib/AsmParser/llvmAsmParser.y.cvs:1.18.2.3 Thu Oct 19 19:34:43 2006 +++ llvm/lib/AsmParser/llvmAsmParser.y.cvs Thu Oct 19 23:27:17 2006 @@ -813,6 +813,23 @@ return Ty; } +// This function is +template +static void sanitizeOpCode(OpcodeInfo &OI, const PATypeHolder& Ty) { + if (OI.obsolete) { + switch (OI.opcode) { + default: + GenerateError("Invalid Obsolete OpCode"); + break; + case Instruction::UDiv: + if (Ty->isSigned()) + OI.opcode = Instruction::SDiv; + break; + } + OI.obsolete = false; + } +} + // common code from the two 'RunVMAsmParser' functions static Module* RunParser(Module * M) { @@ -1004,11 +1021,11 @@ char *StrVal; // This memory is strdup'd! llvm::ValID ValIDVal; // strdup'd memory maybe! - llvm::Instruction::BinaryOps BinaryOpVal; - llvm::Instruction::TermOps TermOpVal; - llvm::Instruction::MemoryOps MemOpVal; - llvm::Instruction::OtherOps OtherOpVal; - llvm::Module::Endianness Endianness; + BinaryOpInfo BinaryOpVal; + TermOpInfo TermOpVal; + MemOpInfo MemOpVal; + OtherOpInfo OtherOpVal; + llvm::Module::Endianness Endianness; } %type Module FunctionList @@ -1076,8 +1093,8 @@ // Binary Operators %type ArithmeticOps LogicalOps SetCondOps // Binops Subcatagories -%token ADD SUB MUL DIV REM AND OR XOR -%token SETLE SETGE SETLT SETGT SETEQ SETNE // Binary Comarators +%token ADD SUB MUL UDIV SDIV REM AND OR XOR +%token SETLE SETGE SETLT SETGT SETEQ SETNE // Binary Comparators // Memory Instructions %token MALLOC ALLOCA FREE LOAD STORE GETELEMENTPTR @@ -1114,7 +1131,7 @@ // Operations that are notably excluded from this list include: // RET, BR, & SWITCH because they end basic blocks and are treated specially. // -ArithmeticOps: ADD | SUB | MUL | DIV | REM; +ArithmeticOps: ADD | SUB | MUL | UDIV | SDIV | REM ; LogicalOps : AND | OR | XOR; SetCondOps : SETLE | SETGE | SETLT | SETGT | SETEQ | SETNE; @@ -1642,12 +1659,14 @@ | ArithmeticOps '(' ConstVal ',' ConstVal ')' { if ($3->getType() != $5->getType()) GEN_ERROR("Binary operator types must match!"); + sanitizeOpCode($1,$3->getType()); + CHECK_FOR_ERROR; // HACK: llvm 1.3 and earlier used to emit invalid pointer constant exprs. // To retain backward compatibility with these early compilers, we emit a // cast to the appropriate integer type automatically if we are in the // broken case. See PR424 for more information. if (!isa($3->getType())) { - $$ = ConstantExpr::get($1, $3, $5); + $$ = ConstantExpr::get($1.opcode, $3, $5); } else { const Type *IntPtrTy = 0; switch (CurModule.CurrentModule->getPointerSize()) { @@ -1655,7 +1674,7 @@ case Module::Pointer64: IntPtrTy = Type::LongTy; break; default: GEN_ERROR("invalid pointer binary constant expr!"); } - $$ = ConstantExpr::get($1, ConstantExpr::getCast($3, IntPtrTy), + $$ = ConstantExpr::get($1.opcode, ConstantExpr::getCast($3, IntPtrTy), ConstantExpr::getCast($5, IntPtrTy)); $$ = ConstantExpr::getCast($$, $3->getType()); } @@ -1669,13 +1688,13 @@ !cast($3->getType())->getElementType()->isIntegral()) GEN_ERROR("Logical operator requires integral operands!"); } - $$ = ConstantExpr::get($1, $3, $5); + $$ = ConstantExpr::get($1.opcode, $3, $5); CHECK_FOR_ERROR } | SetCondOps '(' ConstVal ',' ConstVal ')' { if ($3->getType() != $5->getType()) GEN_ERROR("setcc operand types must match!"); - $$ = ConstantExpr::get($1, $3, $5); + $$ = ConstantExpr::get($1.opcode, $3, $5); CHECK_FOR_ERROR } | ShiftOps '(' ConstVal ',' ConstVal ')' { @@ -1683,7 +1702,7 @@ GEN_ERROR("Shift count for shift constant must be unsigned byte!"); if (!$3->getType()->isInteger()) GEN_ERROR("Shift constant expression requires integer operand!"); - $$ = ConstantExpr::get($1, $3, $5); + $$ = ConstantExpr::get($1.opcode, $3, $5); CHECK_FOR_ERROR } | EXTRACTELEMENT '(' ConstVal ',' ConstVal ')' { @@ -2425,13 +2444,15 @@ !isa((*$2).get())) GEN_ERROR( "Arithmetic operator requires integer, FP, or packed operands!"); - if (isa((*$2).get()) && $1 == Instruction::Rem) + if (isa((*$2).get()) && $1.opcode == Instruction::Rem) GEN_ERROR("Rem not supported on packed types!"); + sanitizeOpCode($1,*$2); + CHECK_FOR_ERROR; Value* val1 = getVal(*$2, $3); CHECK_FOR_ERROR Value* val2 = getVal(*$2, $5); CHECK_FOR_ERROR - $$ = BinaryOperator::create($1, val1, val2); + $$ = BinaryOperator::create($1.opcode, val1, val2); if ($$ == 0) GEN_ERROR("binary operator returned null!"); delete $2; @@ -2446,7 +2467,7 @@ CHECK_FOR_ERROR Value* tmpVal2 = getVal(*$2, $5); CHECK_FOR_ERROR - $$ = BinaryOperator::create($1, tmpVal1, tmpVal2); + $$ = BinaryOperator::create($1.opcode, tmpVal1, tmpVal2); if ($$ == 0) GEN_ERROR("binary operator returned null!"); delete $2; @@ -2460,7 +2481,7 @@ CHECK_FOR_ERROR Value* tmpVal2 = getVal(*$2, $5); CHECK_FOR_ERROR - $$ = new SetCondInst($1, tmpVal1, tmpVal2); + $$ = new SetCondInst($1.opcode, tmpVal1, tmpVal2); if ($$ == 0) GEN_ERROR("binary operator returned null!"); delete $2; @@ -2483,7 +2504,7 @@ GEN_ERROR("Shift amount must be ubyte!"); if (!$2->getType()->isInteger()) GEN_ERROR("Shift constant expression requires integer operand!"); - $$ = new ShiftInst($1, $2, $4); + $$ = new ShiftInst($1.opcode, $2, $4); CHECK_FOR_ERROR } | CAST ResolvedVal TO Types { From rspencer at reidspencer.com Fri Oct 20 01:56:04 2006 From: rspencer at reidspencer.com (Reid Spencer) Date: Thu, 19 Oct 2006 23:56:04 -0700 Subject: [llvm-commits] CVS: llvm/test/Regression/CodeGen/X86/2006-10-19-SwitchUnnecessaryBranching.ll In-Reply-To: <200610192322.k9JNMDLS032434@zion.cs.uiuc.edu> References: <200610192322.k9JNMDLS032434@zion.cs.uiuc.edu> Message-ID: <1161327364.29146.306.camel@bashful.x10sys.com> Bill, After updating to the head, this test case is failing for me on Linux. Reid. On Thu, 2006-10-19 at 18:22 -0500, Bill Wendling wrote: > > Changes in directory llvm/test/Regression/CodeGen/X86: > > 2006-10-19-SwitchUnnecessaryBranching.ll added (r1.1) > --- > Log message: > > Testcase for P926 > > > --- > Diffs of the changes: (+27 -0) > > 2006-10-19-SwitchUnnecessaryBranching.ll | 27 +++++++++++++++++++++++++++ > 1 files changed, 27 insertions(+) > > > Index: llvm/test/Regression/CodeGen/X86/2006-10-19-SwitchUnnecessaryBranching.ll > diff -c /dev/null llvm/test/Regression/CodeGen/X86/2006-10-19-SwitchUnnecessaryBranching.ll:1.1 > *** /dev/null Thu Oct 19 18:22:09 2006 > --- llvm/test/Regression/CodeGen/X86/2006-10-19-SwitchUnnecessaryBranching.ll Thu Oct 19 18:21:59 2006 > *************** > *** 0 **** > --- 1,27 ---- > + ; RUN: llvm-as < %s | llc -march=x86 | %prcontext "jg LBB1_5" 1 | grep "LBB1_4:" Are you sure that "grep" is right? > + > + %str = internal constant [14 x sbyte] c"Hello world!\0A\00" ; <[14 x sbyte]*> [#uses=1] > + %str = internal constant [13 x sbyte] c"Blah world!\0A\00" ; <[13 x sbyte]*> [#uses=1] > + > + implementation ; Functions: > + > + int %main(int %argc, sbyte** %argv) { > + entry: > + switch int %argc, label %UnifiedReturnBlock [ > + int 1, label %bb > + int 2, label %bb2 > + ] > + > + bb: ; preds = %entry > + %tmp1 = tail call int (sbyte*, ...)* %printf( sbyte* getelementptr ([14 x sbyte]* %str, int 0, uint 0) ) ; [#uses=0] > + ret int 0 > + > + bb2: ; preds = %entry > + %tmp4 = tail call int (sbyte*, ...)* %printf( sbyte* getelementptr ([13 x sbyte]* %str, int 0, uint 0) ) ; [#uses=0] > + ret int 0 > + > + UnifiedReturnBlock: ; preds = %entry > + ret int 0 > + } > + > + declare int %printf(sbyte*, ...) > > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From reid at x10sys.com Fri Oct 20 02:08:30 2006 From: reid at x10sys.com (Reid Spencer) Date: Fri, 20 Oct 2006 02:08:30 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86IntelAsmPrinter.cpp Message-ID: <200610200708.k9K78UIA009520@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: X86IntelAsmPrinter.cpp updated: 1.60 -> 1.61 --- Log message: For PR950: http://llvm.org/PR950 : This patch implements the first increment for the Signless Types feature. All changes pertain to removing the ConstantSInt and ConstantUInt classes in favor of just using ConstantInt. --- Diffs of the changes: (+1 -1) X86IntelAsmPrinter.cpp | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/lib/Target/X86/X86IntelAsmPrinter.cpp diff -u llvm/lib/Target/X86/X86IntelAsmPrinter.cpp:1.60 llvm/lib/Target/X86/X86IntelAsmPrinter.cpp:1.61 --- llvm/lib/Target/X86/X86IntelAsmPrinter.cpp:1.60 Wed Oct 4 22:01:21 2006 +++ llvm/lib/Target/X86/X86IntelAsmPrinter.cpp Fri Oct 20 02:07:24 2006 @@ -474,7 +474,7 @@ unsigned len = 0; bool inString = false; for (unsigned i = 0; i < NumElts; i++) { - int n = cast(CVA->getOperand(i))->getRawValue() & 255; + int n = cast(CVA->getOperand(i))->getZExtValue() & 255; if (len == 0) O << "\tdb "; From reid at x10sys.com Fri Oct 20 02:08:25 2006 From: reid at x10sys.com (Reid Spencer) Date: Fri, 20 Oct 2006 02:08:25 -0500 Subject: [llvm-commits] CVS: llvm/lib/Bytecode/Writer/Writer.cpp Message-ID: <200610200708.k9K78PiI009513@zion.cs.uiuc.edu> Changes in directory llvm/lib/Bytecode/Writer: Writer.cpp updated: 1.124 -> 1.125 --- Log message: For PR950: http://llvm.org/PR950 : This patch implements the first increment for the Signless Types feature. All changes pertain to removing the ConstantSInt and ConstantUInt classes in favor of just using ConstantInt. --- Diffs of the changes: (+6 -6) Writer.cpp | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) Index: llvm/lib/Bytecode/Writer/Writer.cpp diff -u llvm/lib/Bytecode/Writer/Writer.cpp:1.124 llvm/lib/Bytecode/Writer/Writer.cpp:1.125 --- llvm/lib/Bytecode/Writer/Writer.cpp:1.124 Thu Sep 14 13:23:26 2006 +++ llvm/lib/Bytecode/Writer/Writer.cpp Fri Oct 20 02:07:24 2006 @@ -293,7 +293,7 @@ assert(CE->getNumOperands() > 0 && "ConstantExpr with 0 operands"); assert(CE->getNumOperands() != 1 || CE->getOpcode() == Instruction::Cast); output_vbr(1+CE->getNumOperands()); // flags as an expr - output_vbr(CE->getOpcode()); // flags as an expr + output_vbr(CE->getOpcode()); // Put out the CE op code for (User::const_op_iterator OI = CE->op_begin(); OI != CE->op_end(); ++OI){ int Slot = Table.getSlot(*OI); @@ -307,7 +307,7 @@ output_vbr(1U); // 1 -> UndefValue constant. return; } else { - output_vbr(0U); // flag as not a ConstantExpr + output_vbr(0U); // flag as not a ConstantExpr (i.e. 0 operands) } switch (CPV->getType()->getTypeID()) { @@ -322,14 +322,14 @@ case Type::UShortTyID: case Type::UIntTyID: case Type::ULongTyID: - output_vbr(cast(CPV)->getValue()); + output_vbr(cast(CPV)->getZExtValue()); break; case Type::SByteTyID: // Signed integer types... case Type::ShortTyID: case Type::IntTyID: case Type::LongTyID: - output_vbr(cast(CPV)->getValue()); + output_vbr(cast(CPV)->getSExtValue()); break; case Type::ArrayTyID: { @@ -881,11 +881,11 @@ // FIXME: Most slabs only have 1 or 2 entries! We should encode this much // more compactly. - // Output type header: [num entries][type id number] + // Put out type header: [num entries][type id number] // output_vbr(NC); - // Output the Type ID Number... + // Put out the Type ID Number... int Slot = Table.getSlot(Plane.front()->getType()); assert (Slot != -1 && "Type in constant pool but not in function!!"); output_typeid((unsigned)Slot); From reid at x10sys.com Fri Oct 20 02:08:32 2006 From: reid at x10sys.com (Reid Spencer) Date: Fri, 20 Oct 2006 02:08:32 -0500 Subject: [llvm-commits] CVS: llvm/lib/Analysis/BasicAliasAnalysis.cpp ConstantFolding.cpp ConstantRange.cpp ScalarEvolution.cpp ScalarEvolutionExpander.cpp Message-ID: <200610200708.k9K78WWr009563@zion.cs.uiuc.edu> Changes in directory llvm/lib/Analysis: BasicAliasAnalysis.cpp updated: 1.86 -> 1.87 ConstantFolding.cpp updated: 1.4 -> 1.5 ConstantRange.cpp updated: 1.15 -> 1.16 ScalarEvolution.cpp updated: 1.53 -> 1.54 ScalarEvolutionExpander.cpp updated: 1.3 -> 1.4 --- Log message: For PR950: http://llvm.org/PR950 : This patch implements the first increment for the Signless Types feature. All changes pertain to removing the ConstantSInt and ConstantUInt classes in favor of just using ConstantInt. --- Diffs of the changes: (+30 -30) BasicAliasAnalysis.cpp | 15 +++++++-------- ConstantFolding.cpp | 11 ++++++----- ConstantRange.cpp | 4 ++-- ScalarEvolution.cpp | 28 ++++++++++++++-------------- ScalarEvolutionExpander.cpp | 2 +- 5 files changed, 30 insertions(+), 30 deletions(-) Index: llvm/lib/Analysis/BasicAliasAnalysis.cpp diff -u llvm/lib/Analysis/BasicAliasAnalysis.cpp:1.86 llvm/lib/Analysis/BasicAliasAnalysis.cpp:1.87 --- llvm/lib/Analysis/BasicAliasAnalysis.cpp:1.86 Wed Oct 4 16:52:35 2006 +++ llvm/lib/Analysis/BasicAliasAnalysis.cpp Fri Oct 20 02:07:24 2006 @@ -468,11 +468,10 @@ /// CheckGEPInstructions - Check two GEP instructions with known must-aliasing /// base pointers. This checks to see if the index expressions preclude the /// pointers from aliasing... -AliasAnalysis::AliasResult BasicAliasAnalysis:: -CheckGEPInstructions(const Type* BasePtr1Ty, std::vector &GEP1Ops, - unsigned G1S, - const Type *BasePtr2Ty, std::vector &GEP2Ops, - unsigned G2S) { +AliasAnalysis::AliasResult +BasicAliasAnalysis::CheckGEPInstructions( + const Type* BasePtr1Ty, std::vector &GEP1Ops, unsigned G1S, + const Type *BasePtr2Ty, std::vector &GEP2Ops, unsigned G2S) { // We currently can't handle the case when the base pointers have different // primitive types. Since this is uncommon anyway, we are happy being // extremely conservative. @@ -670,7 +669,7 @@ if (const ConstantInt *Op1C = dyn_cast(Op1)) { // If this is an array index, make sure the array element is in range. if (const ArrayType *AT = dyn_cast(BasePtr1Ty)) - if (Op1C->getRawValue() >= AT->getNumElements()) + if (Op1C->getZExtValue() >= AT->getNumElements()) return MayAlias; // Be conservative with out-of-range accesses } else { @@ -685,7 +684,7 @@ // value possible. // if (const ArrayType *AT = dyn_cast(BasePtr1Ty)) - GEP1Ops[i] = ConstantSInt::get(Type::LongTy,AT->getNumElements()-1); + GEP1Ops[i] = ConstantInt::get(Type::LongTy, AT->getNumElements()-1); } } @@ -693,7 +692,7 @@ if (const ConstantInt *Op2C = dyn_cast(Op2)) { // If this is an array index, make sure the array element is in range. if (const ArrayType *AT = dyn_cast(BasePtr1Ty)) - if (Op2C->getRawValue() >= AT->getNumElements()) + if (Op2C->getZExtValue() >= AT->getNumElements()) return MayAlias; // Be conservative with out-of-range accesses } else { // Conservatively assume the minimum value for this index GEP2Ops[i] = Constant::getNullValue(Op2->getType()); Index: llvm/lib/Analysis/ConstantFolding.cpp diff -u llvm/lib/Analysis/ConstantFolding.cpp:1.4 llvm/lib/Analysis/ConstantFolding.cpp:1.5 --- llvm/lib/Analysis/ConstantFolding.cpp:1.4 Sat Jun 17 13:17:52 2006 +++ llvm/lib/Analysis/ConstantFolding.cpp Fri Oct 20 02:07:24 2006 @@ -163,14 +163,15 @@ default: break; } - } else if (ConstantUInt *Op = dyn_cast(Operands[0])) { - uint64_t V = Op->getValue(); + } else if (ConstantInt *Op = dyn_cast(Operands[0])) { + assert(Op->getType()->isUnsigned() && "bswap args must be unsigned"); + uint64_t V = Op->getZExtValue(); if (Name == "llvm.bswap.i16") - return ConstantUInt::get(Ty, ByteSwap_16(V)); + return ConstantInt::get(Ty, ByteSwap_16(V)); else if (Name == "llvm.bswap.i32") - return ConstantUInt::get(Ty, ByteSwap_32(V)); + return ConstantInt::get(Ty, ByteSwap_32(V)); else if (Name == "llvm.bswap.i64") - return ConstantUInt::get(Ty, ByteSwap_64(V)); + return ConstantInt::get(Ty, ByteSwap_64(V)); } } else if (Operands.size() == 2) { if (ConstantFP *Op1 = dyn_cast(Operands[0])) { Index: llvm/lib/Analysis/ConstantRange.cpp diff -u llvm/lib/Analysis/ConstantRange.cpp:1.15 llvm/lib/Analysis/ConstantRange.cpp:1.16 --- llvm/lib/Analysis/ConstantRange.cpp:1.15 Thu Sep 28 18:14:29 2006 +++ llvm/lib/Analysis/ConstantRange.cpp Fri Oct 20 02:07:24 2006 @@ -161,7 +161,7 @@ // Simply subtract the bounds... Constant *Result = ConstantExpr::getSub(Upper, Lower); - return cast(Result)->getRawValue(); + return cast(Result)->getZExtValue(); } /// contains - Return true if the specified value is in the set. @@ -288,7 +288,7 @@ // Change a source full set into [0, 1 << 8*numbytes) unsigned SrcTySize = getLower()->getType()->getPrimitiveSize(); return ConstantRange(Constant::getNullValue(Ty), - ConstantUInt::get(Ty, 1ULL << SrcTySize*8)); + ConstantInt::get(Ty, 1ULL << SrcTySize*8)); } Constant *Lower = getLower(); Index: llvm/lib/Analysis/ScalarEvolution.cpp diff -u llvm/lib/Analysis/ScalarEvolution.cpp:1.53 llvm/lib/Analysis/ScalarEvolution.cpp:1.54 --- llvm/lib/Analysis/ScalarEvolution.cpp:1.53 Wed Oct 4 16:49:37 2006 +++ llvm/lib/Analysis/ScalarEvolution.cpp Fri Oct 20 02:07:24 2006 @@ -177,7 +177,7 @@ // Make sure that SCEVConstant instances are all unsigned. if (V->getType()->isSigned()) { const Type *NewTy = V->getType()->getUnsignedVersion(); - V = cast(ConstantExpr::getCast(V, NewTy)); + V = cast(ConstantExpr::getCast(V, NewTy)); } SCEVConstant *&R = (*SCEVConstants)[V]; @@ -463,9 +463,9 @@ else if (Ty->isFloatingPoint()) C = ConstantFP::get(Ty, Val); else if (Ty->isSigned()) - C = ConstantSInt::get(Ty, Val); + C = ConstantInt::get(Ty, Val); else { - C = ConstantSInt::get(Ty->getSignedVersion(), Val); + C = ConstantInt::get(Ty->getSignedVersion(), Val); C = ConstantExpr::getCast(C, Ty); } return SCEVUnknown::get(C); @@ -507,11 +507,11 @@ // Handle this case efficiently, it is common to have constant iteration // counts while computing loop exit values. if (SCEVConstant *SC = dyn_cast(V)) { - uint64_t Val = SC->getValue()->getRawValue(); + uint64_t Val = SC->getValue()->getZExtValue(); uint64_t Result = 1; for (; NumSteps; --NumSteps) Result *= Val-(NumSteps-1); - Constant *Res = ConstantUInt::get(Type::ULongTy, Result); + Constant *Res = ConstantInt::get(Type::ULongTy, Result); return SCEVUnknown::get(ConstantExpr::getCast(Res, V->getType())); } @@ -1605,7 +1605,7 @@ const std::vector &Indices) { Constant *Init = GV->getInitializer(); for (unsigned i = 0, e = Indices.size(); i != e; ++i) { - uint64_t Idx = Indices[i]->getRawValue(); + uint64_t Idx = Indices[i]->getZExtValue(); if (ConstantStruct *CS = dyn_cast(Init)) { assert(Idx < CS->getNumOperands() && "Bad struct index!"); Init = cast(CS->getOperand(Idx)); @@ -1679,8 +1679,8 @@ unsigned MaxSteps = MaxBruteForceIterations; for (unsigned IterationNum = 0; IterationNum != MaxSteps; ++IterationNum) { - ConstantUInt *ItCst = - ConstantUInt::get(IdxExpr->getType()->getUnsignedVersion(), IterationNum); + ConstantInt *ItCst = + ConstantInt::get(IdxExpr->getType()->getUnsignedVersion(), IterationNum); ConstantInt *Val = EvaluateConstantChrecAtConstant(IdxExpr, ItCst); // Form the GEP offset. @@ -1896,7 +1896,7 @@ if (CondVal->getValue() == ExitWhen) { ConstantEvolutionLoopExitValue[PN] = PHIVal; ++NumBruteForceTripCountsComputed; - return SCEVConstant::get(ConstantUInt::get(Type::UIntTy, IterationNum)); + return SCEVConstant::get(ConstantInt::get(Type::UIntTy, IterationNum)); } // Compute the value of the PHI node for the next iteration. @@ -1935,7 +1935,7 @@ // this is a constant evolving PHI node, get the final value at // the specified iteration number. Constant *RV = getConstantEvolutionLoopExitValue(PN, - ICC->getValue()->getRawValue(), + ICC->getValue()->getZExtValue(), LI); if (RV) return SCEVUnknown::get(RV); } @@ -2076,10 +2076,10 @@ SqrtTerm = ConstantExpr::getSub(ConstantExpr::getMul(B, B), SqrtTerm); // Compute floor(sqrt(B^2-4ac)) - ConstantUInt *SqrtVal = - cast(ConstantExpr::getCast(SqrtTerm, + ConstantInt *SqrtVal = + cast(ConstantExpr::getCast(SqrtTerm, SqrtTerm->getType()->getUnsignedVersion())); - uint64_t SqrtValV = SqrtVal->getValue(); + uint64_t SqrtValV = SqrtVal->getZExtValue(); uint64_t SqrtValV2 = (uint64_t)sqrt((double)SqrtValV); // The square root might not be precise for arbitrary 64-bit integer // values. Do some sanity checks to ensure it's correct. @@ -2089,7 +2089,7 @@ return std::make_pair(CNC, CNC); } - SqrtVal = ConstantUInt::get(Type::ULongTy, SqrtValV2); + SqrtVal = ConstantInt::get(Type::ULongTy, SqrtValV2); SqrtTerm = ConstantExpr::getCast(SqrtVal, SqrtTerm->getType()); Constant *NegB = ConstantExpr::getNeg(B); Index: llvm/lib/Analysis/ScalarEvolutionExpander.cpp diff -u llvm/lib/Analysis/ScalarEvolutionExpander.cpp:1.3 llvm/lib/Analysis/ScalarEvolutionExpander.cpp:1.4 --- llvm/lib/Analysis/ScalarEvolutionExpander.cpp:1.3 Sat Feb 4 03:51:53 2006 +++ llvm/lib/Analysis/ScalarEvolutionExpander.cpp Fri Oct 20 02:07:24 2006 @@ -144,7 +144,7 @@ // IF the step is by one, just return the inserted IV. if (ConstantIntegral *CI = dyn_cast(F)) - if (CI->getRawValue() == 1) + if (CI->getZExtValue() == 1) return I; // If the insert point is directly inside of the loop, emit the multiply at From reid at x10sys.com Fri Oct 20 02:08:32 2006 From: reid at x10sys.com (Reid Spencer) Date: Fri, 20 Oct 2006 02:08:32 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp Message-ID: <200610200708.k9K78W1q009552@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/ARM: ARMISelDAGToDAG.cpp updated: 1.76 -> 1.77 --- Log message: For PR950: http://llvm.org/PR950 : This patch implements the first increment for the Signless Types feature. All changes pertain to removing the ConstantSInt and ConstantUInt classes in favor of just using ConstantInt. --- Diffs of the changes: (+1 -2) ARMISelDAGToDAG.cpp | 3 +-- 1 files changed, 1 insertion(+), 2 deletions(-) Index: llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp diff -u llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp:1.76 llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp:1.77 --- llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp:1.76 Thu Oct 19 07:06:50 2006 +++ llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp Fri Oct 20 02:07:24 2006 @@ -810,8 +810,7 @@ case ISD::Constant: { uint32_t val = cast(N)->getValue(); if(!isRotInt8Immediate(val)) { - const Type *t = MVT::getTypeForValueType(MVT::i32); - Constant *C = ConstantUInt::get(t, val); + Constant *C = ConstantInt::get(Type::UIntTy, val); int alignment = 2; SDOperand Addr = CurDAG->getTargetConstantPool(C, MVT::i32, alignment); SDOperand Z = CurDAG->getTargetConstant(0, MVT::i32); From reid at x10sys.com Fri Oct 20 02:08:30 2006 From: reid at x10sys.com (Reid Spencer) Date: Fri, 20 Oct 2006 02:08:30 -0500 Subject: [llvm-commits] CVS: llvm/tools/llvm2cpp/CppWriter.cpp Message-ID: <200610200708.k9K78UTa009522@zion.cs.uiuc.edu> Changes in directory llvm/tools/llvm2cpp: CppWriter.cpp updated: 1.16 -> 1.17 --- Log message: For PR950: http://llvm.org/PR950 : This patch implements the first increment for the Signless Types feature. All changes pertain to removing the ConstantSInt and ConstantUInt classes in favor of just using ConstantInt. --- Diffs of the changes: (+5 -6) CppWriter.cpp | 11 +++++------ 1 files changed, 5 insertions(+), 6 deletions(-) Index: llvm/tools/llvm2cpp/CppWriter.cpp diff -u llvm/tools/llvm2cpp/CppWriter.cpp:1.16 llvm/tools/llvm2cpp/CppWriter.cpp:1.17 --- llvm/tools/llvm2cpp/CppWriter.cpp:1.16 Thu Sep 28 18:24:48 2006 +++ llvm/tools/llvm2cpp/CppWriter.cpp Fri Oct 20 02:07:24 2006 @@ -678,12 +678,11 @@ if (const ConstantBool *CB = dyn_cast(CV)) { Out << "ConstantBool* " << constName << " = ConstantBool::get(" << (CB->getValue() ? "true" : "false") << ");"; - } else if (const ConstantSInt *CI = dyn_cast(CV)) { - Out << "ConstantSInt* " << constName << " = ConstantSInt::get(" - << typeName << ", " << CI->getValue() << ");"; - } else if (const ConstantUInt *CI = dyn_cast(CV)) { - Out << "ConstantUInt* " << constName << " = ConstantUInt::get(" - << typeName << ", " << CI->getValue() << ");"; + } else if (const ConstantInt *CI = dyn_cast(CV)) { + Out << "ConstantInt* " << constName << " = ConstantInt::get(" + << typeName << ", " + << (CV->getType()->isSigned() ? CI->getSExtValue() : CI->getZExtValue()) + << ");"; } else if (isa(CV)) { Out << "ConstantAggregateZero* " << constName << " = ConstantAggregateZero::get(" << typeName << ");"; From reid at x10sys.com Fri Oct 20 02:08:34 2006 From: reid at x10sys.com (Reid Spencer) Date: Fri, 20 Oct 2006 02:08:34 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/CBackend/Writer.cpp Message-ID: <200610200708.k9K78Yum009632@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/CBackend: Writer.cpp updated: 1.272 -> 1.273 --- Log message: For PR950: http://llvm.org/PR950 : This patch implements the first increment for the Signless Types feature. All changes pertain to removing the ConstantSInt and ConstantUInt classes in favor of just using ConstantInt. --- Diffs of the changes: (+11 -11) Writer.cpp | 22 +++++++++++----------- 1 files changed, 11 insertions(+), 11 deletions(-) Index: llvm/lib/Target/CBackend/Writer.cpp diff -u llvm/lib/Target/CBackend/Writer.cpp:1.272 llvm/lib/Target/CBackend/Writer.cpp:1.273 --- llvm/lib/Target/CBackend/Writer.cpp:1.272 Thu Sep 28 18:19:29 2006 +++ llvm/lib/Target/CBackend/Writer.cpp Fri Oct 20 02:07:24 2006 @@ -460,7 +460,7 @@ // Do not include the last character, which we know is null for (unsigned i = 0, e = CPA->getNumOperands()-1; i != e; ++i) { - unsigned char C = cast(CPA->getOperand(i))->getRawValue(); + unsigned char C = cast(CPA->getOperand(i))->getZExtValue(); // Print it out literally if it is a printable character. The only thing // to be careful about is when the last letter output was a hex escape @@ -642,31 +642,31 @@ break; case Type::SByteTyID: case Type::ShortTyID: - Out << cast(CPV)->getValue(); + Out << cast(CPV)->getSExtValue(); break; case Type::IntTyID: - if ((int)cast(CPV)->getValue() == (int)0x80000000) + if ((int)cast(CPV)->getSExtValue() == (int)0x80000000) Out << "((int)0x80000000U)"; // Handle MININT specially to avoid warning else - Out << cast(CPV)->getValue(); + Out << cast(CPV)->getSExtValue(); break; case Type::LongTyID: - if (cast(CPV)->isMinValue()) + if (cast(CPV)->isMinValue()) Out << "(/*INT64_MIN*/(-9223372036854775807LL)-1)"; else - Out << cast(CPV)->getValue() << "ll"; + Out << cast(CPV)->getSExtValue() << "ll"; break; case Type::UByteTyID: case Type::UShortTyID: - Out << cast(CPV)->getValue(); + Out << cast(CPV)->getZExtValue(); break; case Type::UIntTyID: - Out << cast(CPV)->getValue() << 'u'; + Out << cast(CPV)->getZExtValue() << 'u'; break; case Type::ULongTyID: - Out << cast(CPV)->getValue() << "ull"; + Out << cast(CPV)->getZExtValue() << "ull"; break; case Type::FloatTyID: @@ -2002,14 +2002,14 @@ // Print out the -> operator if possible... if (TmpI != E && isa(*TmpI)) { Out << (HasImplicitAddress ? "." : "->"); - Out << "field" << cast(TmpI.getOperand())->getValue(); + Out << "field" << cast(TmpI.getOperand())->getZExtValue(); I = ++TmpI; } } for (; I != E; ++I) if (isa(*I)) { - Out << ".field" << cast(I.getOperand())->getValue(); + Out << ".field" << cast(I.getOperand())->getZExtValue(); } else { Out << '['; writeOperand(I.getOperand()); From reid at x10sys.com Fri Oct 20 02:08:34 2006 From: reid at x10sys.com (Reid Spencer) Date: Fri, 20 Oct 2006 02:08:34 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/IPO/ArgumentPromotion.cpp GlobalOpt.cpp LowerSetJmp.cpp SimplifyLibCalls.cpp Message-ID: <200610200708.k9K78YL1009620@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/IPO: ArgumentPromotion.cpp updated: 1.27 -> 1.28 GlobalOpt.cpp updated: 1.68 -> 1.69 LowerSetJmp.cpp updated: 1.29 -> 1.30 SimplifyLibCalls.cpp updated: 1.69 -> 1.70 --- Log message: For PR950: http://llvm.org/PR950 : This patch implements the first increment for the Signless Types feature. All changes pertain to removing the ConstantSInt and ConstantUInt classes in favor of just using ConstantInt. --- Diffs of the changes: (+93 -94) ArgumentPromotion.cpp | 6 +- GlobalOpt.cpp | 39 ++++++-------- LowerSetJmp.cpp | 4 - SimplifyLibCalls.cpp | 138 +++++++++++++++++++++++++------------------------- 4 files changed, 93 insertions(+), 94 deletions(-) Index: llvm/lib/Transforms/IPO/ArgumentPromotion.cpp diff -u llvm/lib/Transforms/IPO/ArgumentPromotion.cpp:1.27 llvm/lib/Transforms/IPO/ArgumentPromotion.cpp:1.28 --- llvm/lib/Transforms/IPO/ArgumentPromotion.cpp:1.27 Tue Oct 3 02:26:07 2006 +++ llvm/lib/Transforms/IPO/ArgumentPromotion.cpp Fri Oct 20 02:07:24 2006 @@ -307,8 +307,8 @@ unsigned idx = 0; for (; idx < LHS.size() && idx < RHS.size(); ++idx) { if (LHS[idx] != RHS[idx]) { - return cast(LHS[idx])->getRawValue() < - cast(RHS[idx])->getRawValue(); + return cast(LHS[idx])->getZExtValue() < + cast(RHS[idx])->getZExtValue(); } } @@ -518,7 +518,7 @@ std::string NewName = I->getName(); for (unsigned i = 0, e = Operands.size(); i != e; ++i) if (ConstantInt *CI = dyn_cast(Operands[i])) - NewName += "."+itostr((int64_t)CI->getRawValue()); + NewName += "."+itostr((int64_t)CI->getZExtValue()); else NewName += ".x"; TheArg->setName(NewName+".val"); Index: llvm/lib/Transforms/IPO/GlobalOpt.cpp diff -u llvm/lib/Transforms/IPO/GlobalOpt.cpp:1.68 llvm/lib/Transforms/IPO/GlobalOpt.cpp:1.69 --- llvm/lib/Transforms/IPO/GlobalOpt.cpp:1.68 Sat Sep 30 18:32:50 2006 +++ llvm/lib/Transforms/IPO/GlobalOpt.cpp Fri Oct 20 02:07:24 2006 @@ -270,7 +270,7 @@ static Constant *getAggregateConstantElement(Constant *Agg, Constant *Idx) { ConstantInt *CI = dyn_cast(Idx); if (!CI) return 0; - unsigned IdxV = (unsigned)CI->getRawValue(); + unsigned IdxV = CI->getZExtValue(); if (ConstantStruct *CS = dyn_cast(Agg)) { if (IdxV < CS->getNumOperands()) return CS->getOperand(IdxV); @@ -384,7 +384,7 @@ NewGlobals.reserve(STy->getNumElements()); for (unsigned i = 0, e = STy->getNumElements(); i != e; ++i) { Constant *In = getAggregateConstantElement(Init, - ConstantUInt::get(Type::UIntTy, i)); + ConstantInt::get(Type::UIntTy, i)); assert(In && "Couldn't get element of initializer?"); GlobalVariable *NGV = new GlobalVariable(STy->getElementType(i), false, GlobalVariable::InternalLinkage, @@ -406,7 +406,7 @@ NewGlobals.reserve(NumElements); for (unsigned i = 0, e = NumElements; i != e; ++i) { Constant *In = getAggregateConstantElement(Init, - ConstantUInt::get(Type::UIntTy, i)); + ConstantInt::get(Type::UIntTy, i)); assert(In && "Couldn't get element of initializer?"); GlobalVariable *NGV = new GlobalVariable(STy->getElementType(), false, @@ -435,8 +435,7 @@ // Ignore the 1th operand, which has to be zero or else the program is quite // broken (undefined). Get the 2nd operand, which is the structure or array // index. - unsigned Val = - (unsigned)cast(GEP->getOperand(2))->getRawValue(); + unsigned Val = cast(GEP->getOperand(2))->getZExtValue(); if (Val >= NewGlobals.size()) Val = 0; // Out of bound array access. Value *NewPtr = NewGlobals[Val]; @@ -673,11 +672,11 @@ DEBUG(std::cerr << "PROMOTING MALLOC GLOBAL: " << *GV << " MALLOC = " <<*MI); ConstantInt *NElements = cast(MI->getArraySize()); - if (NElements->getRawValue() != 1) { + if (NElements->getZExtValue() != 1) { // If we have an array allocation, transform it to a single element // allocation to make the code below simpler. Type *NewTy = ArrayType::get(MI->getAllocatedType(), - (unsigned)NElements->getRawValue()); + NElements->getZExtValue()); MallocInst *NewMI = new MallocInst(NewTy, Constant::getNullValue(Type::UIntTy), MI->getAlignment(), MI->getName(), MI); @@ -886,11 +885,12 @@ // Otherwise, this should be: 'getelementptr Ptr, Idx, uint FieldNo ...' GetElementPtrInst *GEPI = cast(User); - assert(GEPI->getNumOperands() >= 3 && isa(GEPI->getOperand(2)) + assert(GEPI->getNumOperands() >= 3 && isa(GEPI->getOperand(2)) + && GEPI->getOperand(2)->getType()->isUnsigned() && "Unexpected GEPI!"); // Load the pointer for this field. - unsigned FieldNo = cast(GEPI->getOperand(2))->getValue(); + unsigned FieldNo = cast(GEPI->getOperand(2))->getZExtValue(); if (InsertedLoadsForPtr.size() <= FieldNo) InsertedLoadsForPtr.resize(FieldNo+1); if (InsertedLoadsForPtr[FieldNo] == 0) @@ -1088,7 +1088,7 @@ // Restrict this transformation to only working on small allocations // (2048 bytes currently), as we don't want to introduce a 16M global or // something. - if (NElements->getRawValue()* + if (NElements->getZExtValue()* TD.getTypeSize(MI->getAllocatedType()) < 2048) { GVI = OptimizeGlobalAddressOfMalloc(GV, MI); return true; @@ -1431,7 +1431,7 @@ // Init priority must be standard. ConstantInt *CI = dyn_cast(CS->getOperand(0)); - if (!CI || CI->getRawValue() != 65535) + if (!CI || CI->getZExtValue() != 65535) return 0; } else { return 0; @@ -1461,7 +1461,7 @@ const std::vector &Ctors) { // If we made a change, reassemble the initializer list. std::vector CSVals; - CSVals.push_back(ConstantSInt::get(Type::IntTy, 65535)); + CSVals.push_back(ConstantInt::get(Type::IntTy, 65535)); CSVals.push_back(0); // Create the new init list. @@ -1474,7 +1474,7 @@ std::vector(), false); const PointerType *PFTy = PointerType::get(FTy); CSVals[1] = Constant::getNullValue(PFTy); - CSVals[0] = ConstantSInt::get(Type::IntTy, 2147483647); + CSVals[0] = ConstantInt::get(Type::IntTy, 2147483647); } CAList.push_back(ConstantStruct::get(CSVals)); } @@ -1575,10 +1575,9 @@ } // Replace the element that we are supposed to. - ConstantUInt *CU = cast(Addr->getOperand(OpNo)); - assert(CU->getValue() < STy->getNumElements() && - "Struct index out of range!"); - unsigned Idx = (unsigned)CU->getValue(); + ConstantInt *CU = cast(Addr->getOperand(OpNo)); + unsigned Idx = CU->getZExtValue(); + assert(Idx < STy->getNumElements() && "Struct index out of range!"); Elts[Idx] = EvaluateStoreInto(Elts[Idx], Val, Addr, OpNo+1); // Return the modified struct. @@ -1603,9 +1602,9 @@ " ConstantFoldLoadThroughGEPConstantExpr"); } - assert((uint64_t)CI->getRawValue() < ATy->getNumElements()); - Elts[(uint64_t)CI->getRawValue()] = - EvaluateStoreInto(Elts[(uint64_t)CI->getRawValue()], Val, Addr, OpNo+1); + assert(CI->getZExtValue() < ATy->getNumElements()); + Elts[CI->getZExtValue()] = + EvaluateStoreInto(Elts[CI->getZExtValue()], Val, Addr, OpNo+1); return ConstantArray::get(ATy, Elts); } } Index: llvm/lib/Transforms/IPO/LowerSetJmp.cpp diff -u llvm/lib/Transforms/IPO/LowerSetJmp.cpp:1.29 llvm/lib/Transforms/IPO/LowerSetJmp.cpp:1.30 --- llvm/lib/Transforms/IPO/LowerSetJmp.cpp:1.29 Sun Aug 27 17:42:52 2006 +++ llvm/lib/Transforms/IPO/LowerSetJmp.cpp Fri Oct 20 02:07:24 2006 @@ -378,7 +378,7 @@ CastInst* BufPtr = new CastInst(Inst->getOperand(1), SBPTy, "SBJmpBuf", Inst); new CallInst(AddSJToMap, make_vector(GetSetJmpMap(Func), BufPtr, - ConstantUInt::get(Type::UIntTy, + ConstantInt::get(Type::UIntTy, SetJmpIDMap[Func]++), 0), "", Inst); @@ -429,7 +429,7 @@ // Add the case for this setjmp's number... SwitchValuePair SVP = GetSJSwitch(Func, GetRethrowBB(Func)); - SVP.first->addCase(ConstantUInt::get(Type::UIntTy, SetJmpIDMap[Func] - 1), + SVP.first->addCase(ConstantInt::get(Type::UIntTy, SetJmpIDMap[Func] - 1), SetJmpContBlock); // Value coming from the handling of the exception. Index: llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp diff -u llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp:1.69 llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp:1.70 --- llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp:1.69 Thu Sep 14 13:23:27 2006 +++ llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp Fri Oct 20 02:07:24 2006 @@ -517,8 +517,8 @@ std::vector vals; vals.push_back(gep); // destination vals.push_back(ci->getOperand(2)); // source - vals.push_back(ConstantUInt::get(SLC.getIntPtrType(),len)); // length - vals.push_back(ConstantUInt::get(Type::UIntTy,1)); // alignment + vals.push_back(ConstantInt::get(SLC.getIntPtrType(),len)); // length + vals.push_back(ConstantInt::get(Type::UIntTy,1)); // alignment new CallInst(SLC.get_memcpy(), vals, "", ci); // Finally, substitute the first operand of the strcat call for the @@ -556,38 +556,38 @@ // Check that the first argument to strchr is a constant array of sbyte. // If it is, get the length and data, otherwise return false. uint64_t len = 0; - ConstantArray* CA; + ConstantArray* CA = 0; if (!getConstantStringLength(ci->getOperand(1),len,&CA)) return false; - // Check that the second argument to strchr is a constant int, return false - // if it isn't - ConstantSInt* CSI = dyn_cast(ci->getOperand(2)); - if (!CSI) { - // Just lower this to memchr since we know the length of the string as - // it is constant. + // Check that the second argument to strchr is a constant int. If it isn't + // a constant signed integer, we can try an alternate optimization + ConstantInt* CSI = dyn_cast(ci->getOperand(2)); + if (!CSI || CSI->getType()->isUnsigned() ) { + // The second operand is not constant, or not signed. Just lower this to + // memchr since we know the length of the string since it is constant. Function* f = SLC.get_memchr(); std::vector args; args.push_back(ci->getOperand(1)); args.push_back(ci->getOperand(2)); - args.push_back(ConstantUInt::get(SLC.getIntPtrType(),len)); + args.push_back(ConstantInt::get(SLC.getIntPtrType(),len)); ci->replaceAllUsesWith( new CallInst(f,args,ci->getName(),ci)); ci->eraseFromParent(); return true; } // Get the character we're looking for - int64_t chr = CSI->getValue(); + int64_t chr = CSI->getSExtValue(); // Compute the offset uint64_t offset = 0; bool char_found = false; for (uint64_t i = 0; i < len; ++i) { - if (ConstantSInt* CI = dyn_cast(CA->getOperand(i))) { + if (ConstantInt* CI = dyn_cast(CA->getOperand(i))) { // Check for the null terminator if (CI->isNullValue()) break; // we found end of string - else if (CI->getValue() == chr) { + else if (CI->getSExtValue() == chr) { char_found = true; offset = i; break; @@ -599,7 +599,7 @@ // (if c is a constant integer and s is a constant string) if (char_found) { std::vector indices; - indices.push_back(ConstantUInt::get(Type::ULongTy,offset)); + indices.push_back(ConstantInt::get(Type::ULongTy,offset)); GetElementPtrInst* GEP = new GetElementPtrInst(ci->getOperand(1),indices, ci->getOperand(1)->getName()+".strchr",ci); ci->replaceAllUsesWith(GEP); @@ -679,7 +679,7 @@ std::string str1 = A1->getAsString(); std::string str2 = A2->getAsString(); int result = strcmp(str1.c_str(), str2.c_str()); - ci->replaceAllUsesWith(ConstantSInt::get(Type::IntTy,result)); + ci->replaceAllUsesWith(ConstantInt::get(Type::IntTy,result)); ci->eraseFromParent(); return true; } @@ -723,7 +723,7 @@ bool len_arg_is_const = false; if (ConstantInt* len_CI = dyn_cast(ci->getOperand(3))) { len_arg_is_const = true; - len_arg = len_CI->getRawValue(); + len_arg = len_CI->getZExtValue(); if (len_arg == 0) { // strncmp(x,y,0) -> 0 ci->replaceAllUsesWith(ConstantInt::get(Type::IntTy,0)); @@ -769,7 +769,7 @@ std::string str1 = A1->getAsString(); std::string str2 = A2->getAsString(); int result = strncmp(str1.c_str(), str2.c_str(), len_arg); - ci->replaceAllUsesWith(ConstantSInt::get(Type::IntTy,result)); + ci->replaceAllUsesWith(ConstantInt::get(Type::IntTy,result)); ci->eraseFromParent(); return true; } @@ -843,8 +843,8 @@ std::vector vals; vals.push_back(dest); // destination vals.push_back(src); // source - vals.push_back(ConstantUInt::get(SLC.getIntPtrType(),len)); // length - vals.push_back(ConstantUInt::get(Type::UIntTy,1)); // alignment + vals.push_back(ConstantInt::get(SLC.getIntPtrType(),len)); // length + vals.push_back(ConstantInt::get(Type::UIntTy,1)); // alignment new CallInst(SLC.get_memcpy(), vals, "", ci); // Finally, substitute the first operand of the strcat call for the @@ -891,7 +891,7 @@ if (ConstantInt* CI = dyn_cast(bop->getOperand(1))) { // Get the value the strlen result is compared to - uint64_t val = CI->getRawValue(); + uint64_t val = CI->getZExtValue(); // If its compared against length 0 with == or != if (val == 0 && @@ -902,7 +902,7 @@ // strlen(x) == 0 -> *x == 0 LoadInst* load = new LoadInst(str,str->getName()+".first",ci); BinaryOperator* rbop = BinaryOperator::create(bop->getOpcode(), - load, ConstantSInt::get(Type::SByteTy,0), + load, ConstantInt::get(Type::SByteTy,0), bop->getName()+".strlen", ci); bop->replaceAllUsesWith(rbop); bop->eraseFromParent(); @@ -919,9 +919,9 @@ // strlen("xyz") -> 3 (for example) const Type *Ty = SLC.getTargetData()->getIntPtrType(); if (Ty->isSigned()) - ci->replaceAllUsesWith(ConstantSInt::get(Ty, len)); + ci->replaceAllUsesWith(ConstantInt::get(Ty, len)); else - ci->replaceAllUsesWith(ConstantUInt::get(Ty, len)); + ci->replaceAllUsesWith(ConstantInt::get(Ty, len)); ci->eraseFromParent(); return true; @@ -985,7 +985,7 @@ // Make sure we have a constant length. ConstantInt *LenC = dyn_cast(CI->getOperand(3)); if (!LenC) return false; - uint64_t Len = LenC->getRawValue(); + uint64_t Len = LenC->getZExtValue(); // If the length is zero, this returns 0. switch (Len) { @@ -1075,8 +1075,8 @@ return false; // If the length is larger than the alignment, we can't optimize - uint64_t len = LEN->getRawValue(); - uint64_t alignment = ALIGN->getRawValue(); + uint64_t len = LEN->getZExtValue(); + uint64_t alignment = ALIGN->getZExtValue(); if (alignment == 0) alignment = 1; // Alignment 0 is identity for alignment 1 if (len > alignment) @@ -1154,8 +1154,8 @@ return false; // Extract the length and alignment - uint64_t len = LEN->getRawValue(); - uint64_t alignment = ALIGN->getRawValue(); + uint64_t len = LEN->getZExtValue(); + uint64_t alignment = ALIGN->getZExtValue(); // Alignment 0 is identity for alignment 1 if (alignment == 0) @@ -1174,7 +1174,7 @@ // Make sure we have a constant ubyte to work with so we can extract // the value to be filled. - ConstantUInt* FILL = dyn_cast(ci->getOperand(2)); + ConstantInt* FILL = dyn_cast(ci->getOperand(2)); if (!FILL) return false; if (FILL->getType() != Type::UByteTy) @@ -1183,7 +1183,7 @@ // memset(s,c,n) -> store s, c (for n=1,2,4,8) // Extract the fill character - uint64_t fill_char = FILL->getValue(); + uint64_t fill_char = FILL->getZExtValue(); uint64_t fill_value = fill_char; // Get the type we will cast to, based on size of memory area to fill, and @@ -1215,7 +1215,7 @@ // Cast dest to the right sized primitive and then load/store CastInst* DestCast = new CastInst(dest,PointerType::get(castType),dest->getName()+".cast",ci); - new StoreInst(ConstantUInt::get(castType,fill_value),DestCast, ci); + new StoreInst(ConstantInt::get(castType,fill_value),DestCast, ci); ci->eraseFromParent(); return true; } @@ -1325,16 +1325,16 @@ // The first character has to be a % if (ConstantInt* CI = dyn_cast(CA->getOperand(0))) - if (CI->getRawValue() != '%') + if (CI->getZExtValue() != '%') return false; // Get the second character and switch on its value ConstantInt* CI = dyn_cast(CA->getOperand(1)); - switch (CI->getRawValue()) { + switch (CI->getZExtValue()) { case 's': { if (len != 3 || - dyn_cast(CA->getOperand(2))->getRawValue() != '\n') + dyn_cast(CA->getOperand(2))->getZExtValue() != '\n') return false; // printf("%s\n",str) -> puts(str) @@ -1344,7 +1344,7 @@ std::vector args; args.push_back(CastToCStr(ci->getOperand(2), *ci)); new CallInst(puts_func,args,ci->getName(),ci); - ci->replaceAllUsesWith(ConstantSInt::get(Type::IntTy,len)); + ci->replaceAllUsesWith(ConstantInt::get(Type::IntTy,len)); break; } case 'c': @@ -1359,7 +1359,7 @@ CastInst* cast = new CastInst(ci->getOperand(2), Type::IntTy, CI->getName()+".int", ci); new CallInst(putchar_func, cast, "", ci); - ci->replaceAllUsesWith(ConstantSInt::get(Type::IntTy, 1)); + ci->replaceAllUsesWith(ConstantInt::get(Type::IntTy, 1)); break; } default: @@ -1409,7 +1409,7 @@ for (unsigned i = 0; i < len; ++i) { if (ConstantInt* CI = dyn_cast(CA->getOperand(i))) { // Check for the null terminator - if (CI->getRawValue() == '%') + if (CI->getZExtValue() == '%') return false; // we found end of string } else { return false; @@ -1430,11 +1430,11 @@ std::vector args; args.push_back(ci->getOperand(2)); - args.push_back(ConstantUInt::get(SLC.getIntPtrType(),len)); - args.push_back(ConstantUInt::get(SLC.getIntPtrType(),1)); + args.push_back(ConstantInt::get(SLC.getIntPtrType(),len)); + args.push_back(ConstantInt::get(SLC.getIntPtrType(),1)); args.push_back(ci->getOperand(1)); new CallInst(fwrite_func,args,ci->getName(),ci); - ci->replaceAllUsesWith(ConstantSInt::get(Type::IntTy,len)); + ci->replaceAllUsesWith(ConstantInt::get(Type::IntTy,len)); ci->eraseFromParent(); return true; } @@ -1446,12 +1446,12 @@ // The first character has to be a % if (ConstantInt* CI = dyn_cast(CA->getOperand(0))) - if (CI->getRawValue() != '%') + if (CI->getZExtValue() != '%') return false; // Get the second character and switch on its value ConstantInt* CI = dyn_cast(CA->getOperand(1)); - switch (CI->getRawValue()) { + switch (CI->getZExtValue()) { case 's': { uint64_t len = 0; @@ -1464,11 +1464,11 @@ return false; std::vector args; args.push_back(CastToCStr(ci->getOperand(3), *ci)); - args.push_back(ConstantUInt::get(SLC.getIntPtrType(),len)); - args.push_back(ConstantUInt::get(SLC.getIntPtrType(),1)); + args.push_back(ConstantInt::get(SLC.getIntPtrType(),len)); + args.push_back(ConstantInt::get(SLC.getIntPtrType(),1)); args.push_back(ci->getOperand(1)); new CallInst(fwrite_func,args,ci->getName(),ci); - ci->replaceAllUsesWith(ConstantSInt::get(Type::IntTy,len)); + ci->replaceAllUsesWith(ConstantInt::get(Type::IntTy,len)); } else { // fprintf(file,"%s",str) -> fputs(str,file) const Type* FILEptr_type = ci->getOperand(1)->getType(); @@ -1479,7 +1479,7 @@ args.push_back(CastToCStr(ci->getOperand(3), *ci)); args.push_back(ci->getOperand(1)); new CallInst(fputs_func,args,ci->getName(),ci); - ci->replaceAllUsesWith(ConstantSInt::get(Type::IntTy,len)); + ci->replaceAllUsesWith(ConstantInt::get(Type::IntTy,len)); } break; } @@ -1493,7 +1493,7 @@ CastInst* cast = new CastInst(ci->getOperand(3), Type::IntTy, CI->getName()+".int", ci); new CallInst(fputc_func,cast,ci->getOperand(1),"",ci); - ci->replaceAllUsesWith(ConstantSInt::get(Type::IntTy,1)); + ci->replaceAllUsesWith(ConstantInt::get(Type::IntTy,1)); break; } default: @@ -1537,7 +1537,7 @@ if (len == 0) { // If the length is 0, we just need to store a null byte new StoreInst(ConstantInt::get(Type::SByteTy,0),ci->getOperand(1),ci); - ci->replaceAllUsesWith(ConstantSInt::get(Type::IntTy,0)); + ci->replaceAllUsesWith(ConstantInt::get(Type::IntTy,0)); ci->eraseFromParent(); return true; } @@ -1546,7 +1546,7 @@ for (unsigned i = 0; i < len; ++i) { if (ConstantInt* CI = dyn_cast(CA->getOperand(i))) { // Check for the null terminator - if (CI->getRawValue() == '%') + if (CI->getZExtValue() == '%') return false; // we found a %, can't optimize } else { return false; // initializer is not constant int, can't optimize @@ -1563,10 +1563,10 @@ std::vector args; args.push_back(ci->getOperand(1)); args.push_back(ci->getOperand(2)); - args.push_back(ConstantUInt::get(SLC.getIntPtrType(),len)); - args.push_back(ConstantUInt::get(Type::UIntTy,1)); + args.push_back(ConstantInt::get(SLC.getIntPtrType(),len)); + args.push_back(ConstantInt::get(Type::UIntTy,1)); new CallInst(memcpy_func,args,"",ci); - ci->replaceAllUsesWith(ConstantSInt::get(Type::IntTy,len)); + ci->replaceAllUsesWith(ConstantInt::get(Type::IntTy,len)); ci->eraseFromParent(); return true; } @@ -1578,12 +1578,12 @@ // The first character has to be a % if (ConstantInt* CI = dyn_cast(CA->getOperand(0))) - if (CI->getRawValue() != '%') + if (CI->getZExtValue() != '%') return false; // Get the second character and switch on its value ConstantInt* CI = dyn_cast(CA->getOperand(1)); - switch (CI->getRawValue()) { + switch (CI->getZExtValue()) { case 's': { // sprintf(dest,"%s",str) -> llvm.memcpy(dest, str, strlen(str)+1, 1) Function* strlen_func = SLC.get_strlen(); @@ -1602,7 +1602,7 @@ args.push_back(CastToCStr(ci->getOperand(1), *ci)); args.push_back(CastToCStr(ci->getOperand(3), *ci)); args.push_back(Len1); - args.push_back(ConstantUInt::get(Type::UIntTy,1)); + args.push_back(ConstantInt::get(Type::UIntTy,1)); new CallInst(memcpy_func, args, "", ci); // The strlen result is the unincremented number of bytes in the string. @@ -1619,10 +1619,10 @@ CastInst* cast = new CastInst(ci->getOperand(3),Type::SByteTy,"char",ci); new StoreInst(cast, ci->getOperand(1), ci); GetElementPtrInst* gep = new GetElementPtrInst(ci->getOperand(1), - ConstantUInt::get(Type::UIntTy,1),ci->getOperand(1)->getName()+".end", + ConstantInt::get(Type::UIntTy,1),ci->getOperand(1)->getName()+".end", ci); new StoreInst(ConstantInt::get(Type::SByteTy,0),gep,ci); - ci->replaceAllUsesWith(ConstantSInt::get(Type::IntTy,1)); + ci->replaceAllUsesWith(ConstantInt::get(Type::IntTy,1)); ci->eraseFromParent(); return true; } @@ -1686,8 +1686,8 @@ return false; std::vector parms; parms.push_back(ci->getOperand(1)); - parms.push_back(ConstantUInt::get(SLC.getIntPtrType(),len)); - parms.push_back(ConstantUInt::get(SLC.getIntPtrType(),1)); + parms.push_back(ConstantInt::get(SLC.getIntPtrType(),len)); + parms.push_back(ConstantInt::get(SLC.getIntPtrType(),1)); parms.push_back(ci->getOperand(2)); new CallInst(fwrite_func,parms,"",ci); break; @@ -1716,11 +1716,11 @@ virtual bool OptimizeCall(CallInst *ci, SimplifyLibCalls &SLC) { if (ConstantInt* CI = dyn_cast(ci->getOperand(1))) { // isdigit(c) -> 0 or 1, if 'c' is constant - uint64_t val = CI->getRawValue(); + uint64_t val = CI->getZExtValue(); if (val >= '0' && val <='9') - ci->replaceAllUsesWith(ConstantSInt::get(Type::IntTy,1)); + ci->replaceAllUsesWith(ConstantInt::get(Type::IntTy,1)); else - ci->replaceAllUsesWith(ConstantSInt::get(Type::IntTy,0)); + ci->replaceAllUsesWith(ConstantInt::get(Type::IntTy,0)); ci->eraseFromParent(); return true; } @@ -1730,10 +1730,10 @@ new CastInst(ci->getOperand(1),Type::UIntTy, ci->getOperand(1)->getName()+".uint",ci); BinaryOperator* sub_inst = BinaryOperator::createSub(cast, - ConstantUInt::get(Type::UIntTy,0x30), + ConstantInt::get(Type::UIntTy,0x30), ci->getOperand(1)->getName()+".sub",ci); SetCondInst* setcond_inst = new SetCondInst(Instruction::SetLE,sub_inst, - ConstantUInt::get(Type::UIntTy,9), + ConstantInt::get(Type::UIntTy,9), ci->getOperand(1)->getName()+".cmp",ci); CastInst* c2 = new CastInst(setcond_inst,Type::IntTy, @@ -1760,7 +1760,7 @@ Value *V = CI->getOperand(1); if (V->getType()->isSigned()) V = new CastInst(V, V->getType()->getUnsignedVersion(), V->getName(), CI); - Value *Cmp = BinaryOperator::createSetLT(V, ConstantUInt::get(V->getType(), + Value *Cmp = BinaryOperator::createSetLT(V, ConstantInt::get(V->getType(), 128), V->getName()+".isascii", CI); if (Cmp->getType() != CI->getType()) @@ -1828,7 +1828,7 @@ // ffs(cnst) -> bit# // ffsl(cnst) -> bit# // ffsll(cnst) -> bit# - uint64_t val = CI->getRawValue(); + uint64_t val = CI->getZExtValue(); int result = 0; if (val) { ++result; @@ -1837,7 +1837,7 @@ val >>= 1; } } - TheCall->replaceAllUsesWith(ConstantSInt::get(Type::IntTy, result)); + TheCall->replaceAllUsesWith(ConstantInt::get(Type::IntTy, result)); TheCall->eraseFromParent(); return true; } @@ -1861,7 +1861,7 @@ Value *V = new CastInst(TheCall->getOperand(1), ArgType, "tmp", TheCall); Value *V2 = new CallInst(F, V, "tmp", TheCall); V2 = new CastInst(V2, Type::IntTy, "tmp", TheCall); - V2 = BinaryOperator::createAdd(V2, ConstantSInt::get(Type::IntTy, 1), + V2 = BinaryOperator::createAdd(V2, ConstantInt::get(Type::IntTy, 1), "tmp", TheCall); Value *Cond = BinaryOperator::createSetEQ(V, Constant::getNullValue(V->getType()), @@ -2048,7 +2048,7 @@ // value. We'll need this later for indexing the ConstantArray. uint64_t start_idx = 0; if (ConstantInt* CI = dyn_cast(GEP->getOperand(2))) - start_idx = CI->getRawValue(); + start_idx = CI->getZExtValue(); else return false; From reid at x10sys.com Fri Oct 20 02:08:34 2006 From: reid at x10sys.com (Reid Spencer) Date: Fri, 20 Oct 2006 02:08:34 -0500 Subject: [llvm-commits] CVS: llvm/projects/Stacker/lib/compiler/StackerCompiler.cpp Message-ID: <200610200708.k9K78Ywc009610@zion.cs.uiuc.edu> Changes in directory llvm/projects/Stacker/lib/compiler: StackerCompiler.cpp updated: 1.18 -> 1.19 --- Log message: For PR950: http://llvm.org/PR950 : This patch implements the first increment for the Signless Types feature. All changes pertain to removing the ConstantSInt and ConstantUInt classes in favor of just using ConstantInt. --- Diffs of the changes: (+8 -8) StackerCompiler.cpp | 16 ++++++++-------- 1 files changed, 8 insertions(+), 8 deletions(-) Index: llvm/projects/Stacker/lib/compiler/StackerCompiler.cpp diff -u llvm/projects/Stacker/lib/compiler/StackerCompiler.cpp:1.18 llvm/projects/Stacker/lib/compiler/StackerCompiler.cpp:1.19 --- llvm/projects/Stacker/lib/compiler/StackerCompiler.cpp:1.18 Fri Aug 18 04:07:54 2006 +++ llvm/projects/Stacker/lib/compiler/StackerCompiler.cpp Fri Oct 20 02:07:24 2006 @@ -463,7 +463,7 @@ StackerCompiler::push_integer(BasicBlock* bb, int64_t value ) { // Just push a constant integer value - return push_value( bb, ConstantSInt::get( Type::LongTy, value ) ); + return push_value( bb, ConstantInt::get( Type::LongTy, value ) ); } Instruction* @@ -721,7 +721,7 @@ // Compare the condition against 0 SetCondInst* cond_inst = new SetCondInst( Instruction::SetNE, cond, - ConstantSInt::get( Type::LongTy, 0) ); + ConstantInt::get( Type::LongTy, 0) ); bb->getInstList().push_back( cond_inst ); // Create an exit block @@ -805,7 +805,7 @@ // Compare the condition against 0 SetCondInst* cond_inst = new SetCondInst( - Instruction::SetNE, cond, ConstantSInt::get( Type::LongTy, 0) ); + Instruction::SetNE, cond, ConstantInt::get( Type::LongTy, 0)); test->getInstList().push_back( cond_inst ); // Add the branch instruction @@ -1019,7 +1019,7 @@ if (echo) bb->setName("DECR"); LoadInst* op1 = cast(pop_integer(bb)); BinaryOperator* subop = BinaryOperator::create( Instruction::Sub, op1, - ConstantSInt::get( Type::LongTy, 1 ) ); + ConstantInt::get( Type::LongTy, 1 ) ); bb->getInstList().push_back( subop ); push_value( bb, subop ); break; @@ -1089,7 +1089,7 @@ // bb->getInstList().push_back( negop ); // So we'll multiply by -1 (ugh) BinaryOperator* multop = BinaryOperator::create( Instruction::Mul, op1, - ConstantSInt::get( Type::LongTy, -1 ) ); + ConstantInt::get( Type::LongTy, -1 ) ); bb->getInstList().push_back( multop ); push_value( bb, multop ); break; @@ -1601,7 +1601,7 @@ bb->getInstList().push_back( format_gep ); // Get the character to print (a tab) - ConstantSInt* newline = ConstantSInt::get(Type::IntTy, + ConstantInt* newline = ConstantInt::get(Type::IntTy, static_cast('\t')); // Call printf @@ -1623,7 +1623,7 @@ bb->getInstList().push_back( format_gep ); // Get the character to print (a space) - ConstantSInt* newline = ConstantSInt::get(Type::IntTy, + ConstantInt* newline = ConstantInt::get(Type::IntTy, static_cast(' ')); // Call printf @@ -1645,7 +1645,7 @@ bb->getInstList().push_back( format_gep ); // Get the character to print (a newline) - ConstantSInt* newline = ConstantSInt::get(Type::IntTy, + ConstantInt* newline = ConstantInt::get(Type::IntTy, static_cast('\n')); // Call printf From reid at x10sys.com Fri Oct 20 02:08:30 2006 From: reid at x10sys.com (Reid Spencer) Date: Fri, 20 Oct 2006 02:08:30 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/TargetData.cpp Message-ID: <200610200708.k9K78U5S009526@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target: TargetData.cpp updated: 1.70 -> 1.71 --- Log message: For PR950: http://llvm.org/PR950 : This patch implements the first increment for the Signless Types feature. All changes pertain to removing the ConstantSInt and ConstantUInt classes in favor of just using ConstantInt. --- Diffs of the changes: (+2 -2) TargetData.cpp | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/lib/Target/TargetData.cpp diff -u llvm/lib/Target/TargetData.cpp:1.70 llvm/lib/Target/TargetData.cpp:1.71 --- llvm/lib/Target/TargetData.cpp:1.70 Fri Jun 16 13:22:52 2006 +++ llvm/lib/Target/TargetData.cpp Fri Oct 20 02:07:24 2006 @@ -330,7 +330,7 @@ for (unsigned CurIDX = 0; CurIDX != Idx.size(); ++CurIDX, ++TI) { if (const StructType *STy = dyn_cast(*TI)) { assert(Idx[CurIDX]->getType() == Type::UIntTy && "Illegal struct idx"); - unsigned FieldNo = cast(Idx[CurIDX])->getValue(); + unsigned FieldNo = cast(Idx[CurIDX])->getZExtValue(); // Get structure layout information... const StructLayout *Layout = getStructLayout(STy); @@ -346,7 +346,7 @@ Ty = cast(Ty)->getElementType(); // Get the array index and the size of each array element. - int64_t arrayIdx = cast(Idx[CurIDX])->getRawValue(); + int64_t arrayIdx = cast(Idx[CurIDX])->getSExtValue(); Result += arrayIdx * (int64_t)getTypeSize(Ty); } } From reid at x10sys.com Fri Oct 20 02:08:33 2006 From: reid at x10sys.com (Reid Spencer) Date: Fri, 20 Oct 2006 02:08:33 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Instrumentation/EmitFunctions.cpp ProfilingUtils.cpp RSProfiling.cpp TraceBasicBlocks.cpp Message-ID: <200610200708.k9K78XSx009583@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Instrumentation: EmitFunctions.cpp updated: 1.25 -> 1.26 ProfilingUtils.cpp updated: 1.7 -> 1.8 RSProfiling.cpp updated: 1.7 -> 1.8 TraceBasicBlocks.cpp updated: 1.15 -> 1.16 --- Log message: For PR950: http://llvm.org/PR950 : This patch implements the first increment for the Signless Types feature. All changes pertain to removing the ConstantSInt and ConstantUInt classes in favor of just using ConstantInt. --- Diffs of the changes: (+15 -15) EmitFunctions.cpp | 2 +- ProfilingUtils.cpp | 4 ++-- RSProfiling.cpp | 22 +++++++++++----------- TraceBasicBlocks.cpp | 2 +- 4 files changed, 15 insertions(+), 15 deletions(-) Index: llvm/lib/Transforms/Instrumentation/EmitFunctions.cpp diff -u llvm/lib/Transforms/Instrumentation/EmitFunctions.cpp:1.25 llvm/lib/Transforms/Instrumentation/EmitFunctions.cpp:1.26 --- llvm/lib/Transforms/Instrumentation/EmitFunctions.cpp:1.25 Sun Aug 27 17:42:52 2006 +++ llvm/lib/Transforms/Instrumentation/EmitFunctions.cpp Fri Oct 20 02:07:24 2006 @@ -110,7 +110,7 @@ M.getGlobalList().push_back(funcArray); - ConstantInt *cnst = ConstantSInt::get(Type::IntTy, counter); + ConstantInt *cnst = ConstantInt::get(Type::IntTy, counter); GlobalVariable *fnCount = new GlobalVariable(Type::IntTy, true, GlobalValue::ExternalLinkage, cnst, "llvmFunctionCount"); Index: llvm/lib/Transforms/Instrumentation/ProfilingUtils.cpp diff -u llvm/lib/Transforms/Instrumentation/ProfilingUtils.cpp:1.7 llvm/lib/Transforms/Instrumentation/ProfilingUtils.cpp:1.8 --- llvm/lib/Transforms/Instrumentation/ProfilingUtils.cpp:1.7 Sat Oct 22 23:37:20 2005 +++ llvm/lib/Transforms/Instrumentation/ProfilingUtils.cpp Fri Oct 20 02:07:24 2006 @@ -51,7 +51,7 @@ // pass null. Args[2] = ConstantPointerNull::get(UIntPtr); } - Args[3] = ConstantUInt::get(Type::UIntTy, NumElements); + Args[3] = ConstantInt::get(Type::UIntTy, NumElements); Instruction *InitCall = new CallInst(InitFn, Args, "newargc", InsertPos); @@ -96,7 +96,7 @@ // Create the getelementptr constant expression std::vector Indices(2); Indices[0] = Constant::getNullValue(Type::IntTy); - Indices[1] = ConstantSInt::get(Type::IntTy, CounterNum); + Indices[1] = ConstantInt::get(Type::IntTy, CounterNum); Constant *ElementPtr = ConstantExpr::getGetElementPtr(CounterArray, Indices); // Load, increment and store the value back. Index: llvm/lib/Transforms/Instrumentation/RSProfiling.cpp diff -u llvm/lib/Transforms/Instrumentation/RSProfiling.cpp:1.7 llvm/lib/Transforms/Instrumentation/RSProfiling.cpp:1.8 --- llvm/lib/Transforms/Instrumentation/RSProfiling.cpp:1.7 Sun Aug 27 19:42:29 2006 +++ llvm/lib/Transforms/Instrumentation/RSProfiling.cpp Fri Oct 20 02:07:24 2006 @@ -188,10 +188,10 @@ GlobalRandomCounter::GlobalRandomCounter(Module& M, const Type* t, uint64_t resetval) : T(t) { + ConstantInt* Init = ConstantInt::get(T, resetval); + ResetValue = Init; Counter = new GlobalVariable(T, false, GlobalValue::InternalLinkage, - ConstantUInt::get(T, resetval), - "RandomSteeringCounter", &M); - ResetValue = ConstantUInt::get(T, resetval); + Init, "RandomSteeringCounter", &M); } GlobalRandomCounter::~GlobalRandomCounter() {} @@ -205,7 +205,7 @@ LoadInst* l = new LoadInst(Counter, "counter", t); SetCondInst* s = new SetCondInst(Instruction::SetEQ, l, - ConstantUInt::get(T, 0), + ConstantInt::get(T, 0), "countercc", t); Value* nv = BinaryOperator::createSub(l, ConstantInt::get(T, 1), "counternew", t); @@ -225,10 +225,10 @@ GlobalRandomCounterOpt::GlobalRandomCounterOpt(Module& M, const Type* t, uint64_t resetval) : AI(0), T(t) { + ConstantInt* Init = ConstantInt::get(T, resetval); + ResetValue = Init; Counter = new GlobalVariable(T, false, GlobalValue::InternalLinkage, - ConstantUInt::get(T, resetval), - "RandomSteeringCounter", &M); - ResetValue = ConstantUInt::get(T, resetval); + Init, "RandomSteeringCounter", &M); } GlobalRandomCounterOpt::~GlobalRandomCounterOpt() {} @@ -278,7 +278,7 @@ LoadInst* l = new LoadInst(AI, "counter", t); SetCondInst* s = new SetCondInst(Instruction::SetEQ, l, - ConstantUInt::get(T, 0), + ConstantInt::get(T, 0), "countercc", t); Value* nv = BinaryOperator::createSub(l, ConstantInt::get(T, 1), "counternew", t); @@ -309,11 +309,11 @@ CallInst* c = new CallInst(F, "rdcc", t); BinaryOperator* b = - BinaryOperator::createAnd(c, ConstantUInt::get(Type::ULongTy, rm), + BinaryOperator::createAnd(c, ConstantInt::get(Type::ULongTy, rm), "mrdcc", t); SetCondInst* s = new SetCondInst(Instruction::SetEQ, b, - ConstantUInt::get(Type::ULongTy, 0), + ConstantInt::get(Type::ULongTy, 0), "mrdccc", t); t->setCondition(s); } @@ -339,7 +339,7 @@ // Create the getelementptr constant expression std::vector Indices(2); Indices[0] = Constant::getNullValue(Type::IntTy); - Indices[1] = ConstantSInt::get(Type::IntTy, CounterNum); + Indices[1] = ConstantInt::get(Type::IntTy, CounterNum); Constant *ElementPtr = ConstantExpr::getGetElementPtr(CounterArray, Indices); // Load, increment and store the value back. Index: llvm/lib/Transforms/Instrumentation/TraceBasicBlocks.cpp diff -u llvm/lib/Transforms/Instrumentation/TraceBasicBlocks.cpp:1.15 llvm/lib/Transforms/Instrumentation/TraceBasicBlocks.cpp:1.16 --- llvm/lib/Transforms/Instrumentation/TraceBasicBlocks.cpp:1.15 Sun Aug 27 17:42:52 2006 +++ llvm/lib/Transforms/Instrumentation/TraceBasicBlocks.cpp Fri Oct 20 02:07:24 2006 @@ -49,7 +49,7 @@ Function *InstrFn = M.getOrInsertFunction (FnName, Type::VoidTy, Type::UIntTy, (Type *)0); std::vector Args (1); - Args[0] = ConstantUInt::get (Type::UIntTy, BBNumber); + Args[0] = ConstantInt::get (Type::UIntTy, BBNumber); // Insert the call after any alloca or PHI instructions... BasicBlock::iterator InsertPos = BB->begin(); From reid at x10sys.com Fri Oct 20 02:08:30 2006 From: reid at x10sys.com (Reid Spencer) Date: Fri, 20 Oct 2006 02:08:30 -0500 Subject: [llvm-commits] CVS: llvm/docs/ProgrammersManual.html Stacker.html Message-ID: <200610200708.k9K78UHB009538@zion.cs.uiuc.edu> Changes in directory llvm/docs: ProgrammersManual.html updated: 1.94 -> 1.95 Stacker.html updated: 1.20 -> 1.21 --- Log message: For PR950: http://llvm.org/PR950 : This patch implements the first increment for the Signless Types feature. All changes pertain to removing the ConstantSInt and ConstantUInt classes in favor of just using ConstantInt. --- Diffs of the changes: (+14 -19) ProgrammersManual.html | 21 ++++++++------------- Stacker.html | 12 ++++++------ 2 files changed, 14 insertions(+), 19 deletions(-) Index: llvm/docs/ProgrammersManual.html diff -u llvm/docs/ProgrammersManual.html:1.94 llvm/docs/ProgrammersManual.html:1.95 --- llvm/docs/ProgrammersManual.html:1.94 Wed Oct 11 13:00:22 2006 +++ llvm/docs/ProgrammersManual.html Fri Oct 20 02:07:23 2006 @@ -2390,8 +2390,8 @@

    Constant represents a base class for different types of constants. It -is subclassed by ConstantBool, ConstantInt, ConstantSInt, ConstantUInt, -ConstantArray etc for representing the various types of Constants.

    +is subclassed by ConstantBool, ConstantInt, ConstantArray etc for representing +the various types of Constants.